shaka-player 4.2.4 → 4.3.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.
- package/.github/workflows/sync-labels.yaml +1 -1
- package/.github/workflows/update-issues.yaml +1 -1
- package/AUTHORS +4 -0
- package/CHANGELOG.md +85 -54
- package/CONTRIBUTORS +4 -0
- package/README.md +14 -0
- package/demo/common/assets.js +58 -0
- package/demo/common/message_ids.js +22 -1
- package/demo/config.js +89 -5
- package/demo/demo.less +7 -1
- package/demo/index.html +8 -1
- package/demo/locales/en.json +21 -1
- package/demo/locales/source.json +82 -2
- package/demo/main.js +57 -1
- package/demo/search.js +2 -0
- package/demo/visualizer.js +337 -0
- package/demo/visualizer_button.js +103 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +83 -58
- package/dist/demo.compiled.debug.map +4 -4
- package/dist/demo.compiled.js +83 -58
- package/dist/demo.compiled.map +4 -4
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +16 -9
- package/dist/locales.js +32 -32
- package/dist/receiver.compiled.debug.js +23 -19
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +23 -19
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +173 -26
- package/dist/shaka-player.compiled.debug.d.ts +173 -26
- package/dist/shaka-player.compiled.debug.externs.js +161 -31
- package/dist/shaka-player.compiled.debug.js +464 -401
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +161 -31
- package/dist/shaka-player.compiled.js +897 -862
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +173 -26
- package/dist/shaka-player.ui.debug.d.ts +173 -26
- package/dist/shaka-player.ui.debug.externs.js +161 -31
- package/dist/shaka-player.ui.debug.js +488 -422
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +161 -31
- package/dist/shaka-player.ui.js +1053 -1018
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/lcevc-architecture.png +0 -0
- package/docs/design/lcevc-demo.png +0 -0
- package/docs/design/lcevc-integration.md +72 -0
- package/docs/tutorials/fairplay.md +7 -0
- package/docs/tutorials/faq.md +1 -1
- package/docs/tutorials/ui.md +7 -7
- package/docs/tutorials/upgrade.md +6 -0
- package/externs/ima.js +13 -1
- package/externs/lcevc.js +81 -0
- package/externs/mux.js +1 -42
- package/externs/shaka/ads.js +11 -1
- package/externs/shaka/manifest_parser.js +5 -1
- package/externs/shaka/player.js +178 -15
- package/lib/abr/simple_abr_manager.js +7 -0
- package/lib/ads/ad_manager.js +0 -8
- package/lib/ads/client_side_ad.js +15 -0
- package/lib/ads/client_side_ad_manager.js +21 -8
- package/lib/ads/server_side_ad.js +15 -0
- package/lib/ads/server_side_ad_manager.js +3 -3
- package/lib/cast/cast_utils.js +2 -0
- package/lib/cea/dummy_cea_parser.js +28 -0
- package/lib/cea/i_cea_parser.js +14 -2
- package/lib/cea/mp4_cea_parser.js +87 -5
- package/lib/config/auto_show_text.js +33 -0
- package/lib/dash/dash_parser.js +1 -1
- package/lib/hls/hls_parser.js +790 -374
- package/lib/lcevc/lcevc_dil.js +152 -0
- package/lib/media/closed_caption_parser.js +9 -6
- package/lib/media/drm_engine.js +14 -6
- package/lib/media/media_source_engine.js +106 -26
- package/lib/media/presentation_timeline.js +26 -11
- package/lib/media/segment_reference.js +49 -1
- package/lib/media/streaming_engine.js +142 -12
- package/lib/media/transmuxer.js +73 -18
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +454 -75
- package/lib/polyfill/patchedmediakeys_apple.js +55 -1
- package/lib/text/ui_text_displayer.js +5 -5
- package/lib/text/vtt_text_parser.js +35 -1
- package/lib/util/dom_utils.js +0 -1
- package/lib/util/error.js +17 -0
- package/lib/util/fake_event.js +2 -0
- package/lib/util/id3_utils.js +300 -0
- package/lib/util/mime_utils.js +3 -6
- package/lib/util/mp4_box_parsers.js +15 -5
- package/lib/util/platform.js +9 -1
- package/lib/util/player_configuration.js +23 -1
- package/lib/util/ts_parser.js +499 -0
- package/maintained-branches.md +2 -2
- package/package.json +4 -1
- package/roadmap.md +5 -3
- package/test/ads/ad_manager_unit.js +180 -29
- package/test/cast/cast_utils_unit.js +3 -1
- package/test/dash/dash_parser_content_protection_unit.js +1 -0
- package/test/dash/dash_parser_live_unit.js +1 -0
- package/test/dash/dash_parser_manifest_unit.js +93 -1
- package/test/dash/dash_parser_segment_base_unit.js +1 -0
- package/test/dash/dash_parser_segment_list_unit.js +1 -0
- package/test/dash/dash_parser_segment_template_unit.js +1 -0
- package/test/demo/demo_unit.js +2 -1
- package/test/hls/hls_live_unit.js +253 -19
- package/test/hls/hls_parser_unit.js +500 -12
- package/test/media/closed_caption_parser_unit.js +2 -1
- package/test/media/drm_engine_integration.js +3 -1
- package/test/media/media_source_engine_integration.js +71 -6
- package/test/media/media_source_engine_unit.js +10 -5
- package/test/media/streaming_engine_integration.js +4 -1
- package/test/media/streaming_engine_unit.js +144 -1
- package/test/media/transmuxer_integration.js +21 -10
- package/test/player_integration.js +224 -82
- package/test/player_unit.js +5 -2
- package/test/polyfill/patchedmediakeys_apple_unit.js +124 -0
- package/test/test/assets/id3-metadata.aac +0 -0
- package/test/test/assets/id3-metadata.ts +0 -0
- package/test/test/assets/thumbnails-sprites.vtt +10 -0
- package/test/test/assets/thumbnails.vtt +10 -0
- package/test/test/util/dash_parser_util.js +2 -0
- package/test/test/util/fake_ad.js +21 -0
- package/test/test/util/fake_media_source_engine.js +7 -0
- package/test/test/util/id3_generator.js +100 -0
- package/test/test/util/manifest_generator.js +3 -6
- package/test/test/util/simple_fakes.js +4 -0
- package/test/test/util/stream_generator.js +38 -0
- package/test/test/util/test_scheme.js +43 -14
- package/test/text/vtt_text_parser_unit.js +11 -0
- package/test/ui/text_displayer_layout_unit.js +14 -0
- package/test/util/id3_utils_unit.js +116 -0
- package/test/util/ts_parser_unit.js +77 -0
- package/ui/less/containers.less +7 -0
- package/ui/ui.js +43 -4
|
@@ -9,918 +9,953 @@
|
|
|
9
9
|
Copyright The Closure Library Authors.
|
|
10
10
|
SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var
|
|
13
|
-
function
|
|
14
|
-
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;
|
|
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=
|
|
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 ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},
|
|
17
|
-
if("function"==typeof Object.setPrototypeOf)
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
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=
|
|
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.
|
|
27
|
-
b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.
|
|
28
|
-
function(){if(this.o)return!1;var g=
|
|
29
|
-
b.prototype.
|
|
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).
|
|
31
|
-
while(!k.done)})};return b});function
|
|
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(!
|
|
33
|
-
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!
|
|
34
|
-
|
|
35
|
-
fa("Map",function(a){function b(){var h={};return h.
|
|
12
|
+
var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
13
|
+
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{for(var c=ea,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ca(c,d,{configurable:!0,writable:!0,value:f})}}
|
|
14
|
+
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
15
|
+
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]&&ca(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
|
+
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 ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
|
|
17
|
+
if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;ma=pa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=la;
|
|
18
|
+
function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.yh=b.prototype}function ta(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ua(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ta.prototype.s=function(a){this.h=a};
|
|
19
|
+
function wa(a,b){a.i={Ce:b,Je:!0};a.g=a.m||a.j}ta.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ta.prototype.A=function(a){this.g=a};function A(a){a.g=0}function D(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a){a.m=0;a.j=2}function za(a,b){a.g=b;a.m=0}function Aa(a){a.m=0;var b=a.i.Ce;a.i=null;return b}function Ba(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function Ca(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Je?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 Da(a){this.g=new ta;this.h=a}function Ea(a,b){ua(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ga(a)}
|
|
21
|
+
function Fa(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,wa(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}
|
|
22
|
+
function Ga(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,wa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Je)throw b.Ce;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Ha(a){this.next=function(b){ua(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ga(a));return b};this["throw"]=function(b){ua(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(wa(a.g,b),b=Ga(a));return b};this["return"]=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
|
+
function Ia(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 G(a){return Ia(new Ha(new Da(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
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.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.H(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.B()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
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.H=function(g){var h=this.j();g.Kc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Kc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Kc=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).Kc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Kc(n(p.length-1),m),k=h.next();
|
|
31
|
+
while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
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(!Ka(k,g)){var l=new c;ca(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
|
+
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
34
|
+
Ka(k,g)&&Ka(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
35
|
+
fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ka(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
|
|
36
36
|
list:m,index:-1,fa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
37
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,
|
|
38
|
-
h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.
|
|
37
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Qa.next=l.fa,this.g.Qa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Qa.next=h.fa.next,h.fa.next.Qa=h.fa.Qa,
|
|
38
|
+
h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
40
40
|
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
|
|
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
|
|
44
|
-
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==
|
|
45
|
-
function
|
|
46
|
-
fa("Object.assign",function(a){return a||
|
|
47
|
-
fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return
|
|
48
|
-
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=
|
|
49
|
-
fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)
|
|
50
|
-
function
|
|
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 La(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{He:e,v:f}}return{He:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).He}});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
|
+
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 Ma(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
|
+
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(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
|
+
function Na(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 Na(this,function(b){return b})}});var Oa="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)Ka(d,e)&&(a[e]=d[e])}return a};
|
|
46
|
+
fa("Object.assign",function(a){return a||Oa});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
|
|
47
|
+
fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});
|
|
48
|
+
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
49
|
+
fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;
|
|
50
|
+
function L(a,b){var c=a.split("."),d=Pa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
|
|
51
51
|
@license
|
|
52
52
|
Shaka Player
|
|
53
53
|
Copyright 2016 Google LLC
|
|
54
54
|
SPDX-License-Identifier: Apache-2.0
|
|
55
55
|
*/
|
|
56
|
-
function
|
|
57
|
-
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=ib;this.endTime=b;this.payload=c;this.region=new jb;this.position=null;this.positionAlign=kb;this.size=0;this.textAlign=lb;this.writingMode=mb;this.lineInterpretation=
|
|
56
|
+
function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.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 Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(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(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ja.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={nd:d.nd},e=a.next()){d.nd=e.value;e=b.findIndex(function(f){return function(g){return c(f.nd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
57
|
+
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=ib;this.endTime=b;this.payload=c;this.region=new jb;this.position=null;this.positionAlign=kb;this.size=0;this.textAlign=lb;this.writingMode=mb;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=
|
|
58
58
|
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}}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};
|
|
59
|
-
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}
|
|
60
|
-
hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kb};var lb="center",ub={LEFT:"left",RIGHT:"right",CENTER:lb,START:"start",END:"end"};hb.textAlign=ub;var
|
|
61
|
-
hb.lineInterpretation={LINE_NUMBER:
|
|
62
|
-
var
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
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,
|
|
66
|
-
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,
|
|
67
|
-
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,
|
|
68
|
-
NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,
|
|
69
|
-
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,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,
|
|
70
|
-
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,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,
|
|
71
|
-
MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
|
|
59
|
+
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}L("shaka.text.Cue",hb);var kb="auto";
|
|
60
|
+
hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kb};var lb="center",ub={LEFT:"left",RIGHT:"right",CENTER:lb,START:"start",END:"end"};hb.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};hb.displayAlign=vb;var ib="ltr";hb.direction={HORIZONTAL_LEFT_TO_RIGHT:ib,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mb="horizontal-tb";hb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
|
|
61
|
+
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};
|
|
62
|
+
var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jb(){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=Bb}L("shaka.text.CueRegion",jb);var Ab=1;jb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";jb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=N(a),d=N(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Fb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
|
+
function N(a,b,c){c=void 0===c?Infinity:c;return Gb(a,void 0===b?0:b,c,Uint8Array)}function Hb(a,b,c){c=void 0===c?Infinity:c;return Gb(a,void 0===b?0:b,c,DataView)}function Gb(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(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",Cb);Cb.toDataView=Hb;Cb.toUint8=N;Cb.toArrayBuffer=Fb;Cb.equal=Db;function O(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};L("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
64
|
+
O.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,
|
|
65
|
+
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,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,
|
|
66
|
+
WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,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,
|
|
67
|
+
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,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,
|
|
68
|
+
DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,
|
|
69
|
+
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,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,
|
|
70
|
+
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,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,
|
|
71
|
+
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,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
|
|
72
72
|
@license
|
|
73
73
|
Copyright 2008 The Closure Library Authors
|
|
74
74
|
SPDX-License-Identifier: Apache-2.0
|
|
75
75
|
*/
|
|
76
|
-
var
|
|
76
|
+
var Ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
77
77
|
@license
|
|
78
78
|
Copyright 2006 The Closure Library Authors
|
|
79
79
|
SPDX-License-Identifier: Apache-2.0
|
|
80
80
|
*/
|
|
81
|
-
function
|
|
82
|
-
r.toString=function(){var a=[],b=this.
|
|
83
|
-
r.resolve=function(a){var b=this.clone();"data"===b.
|
|
84
|
-
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.
|
|
85
|
-
function
|
|
86
|
-
function
|
|
87
|
-
r.set=function(a,b){
|
|
88
|
-
function
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
function
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
function
|
|
95
|
-
function
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
function
|
|
99
|
-
function
|
|
100
|
-
function
|
|
101
|
-
function
|
|
102
|
-
case "mp4a"===a&&"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
bd
|
|
106
|
-
function
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
function
|
|
111
|
-
|
|
112
|
-
|
|
81
|
+
function Jb(a){var b;a instanceof Jb?(Kb(this,a.Da),this.pb=a.pb,this.Fa=a.Fa,Lb(this,a.Jb),this.qa=a.qa,Mb(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Ib))?(Kb(this,b[1]||"",!0),this.pb=Nb(b[2]||""),this.Fa=Nb(b[3]||"",!0),Lb(this,b[4]),this.qa=Nb(b[5]||"",!0),Mb(this,b[6]||"",!0),this.gb=Nb(b[7]||"")):this.g=new Ob(null)}r=Jb.prototype;r.Da="";r.pb="";r.Fa="";r.Jb=null;r.qa="";r.gb="";
|
|
82
|
+
r.toString=function(){var a=[],b=this.Da;b&&a.push(Pb(b,Qb,!0),":");if(b=this.Fa){a.push("//");var c=this.pb;c&&a.push(Pb(c,Qb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Jb;null!=b&&a.push(":",String(b))}if(b=this.qa)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Pb(b,"/"==b.charAt(0)?Rb:Sb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Pb(b,Tb));return a.join("")};
|
|
83
|
+
r.resolve=function(a){var b=this.clone();"data"===b.Da&&(b=new Jb);var c=!!a.Da;c?Kb(b,a.Da):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Jb;var d=a.qa;if(c)Lb(b,a.Jb);else if(c=!!a.qa){if("/"!=d.charAt(0))if(this.Fa&&!this.qa)d="/"+d;else{var e=b.qa.lastIndexOf("/");-1!=e&&(d=b.qa.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(""):".."==
|
|
84
|
+
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.qa=d:c=""!==a.g.toString();c?Mb(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};r.clone=function(){return new Jb(this)};function Kb(a,b,c){a.Da=c?Nb(b,!0):b;a.Da&&(a.Da=a.Da.replace(/:$/,""))}function Lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Jb=b}else a.Jb=null}function Mb(a,b,c){b instanceof Ob?a.g=b:(c||(b=Pb(b,Vb)),a.g=new Ob(b))}
|
|
85
|
+
function Nb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Pb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Qb=/[#\/\?@]/g,Sb=/[#\?:]/g,Rb=/[#\?]/g,Vb=/[#\?@]/g,Tb=/#/g;function Ob(a){this.g=a||null}
|
|
86
|
+
function Xb(a){if(!a.ma&&(a.ma={},a.Nc=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=Ob.prototype;r.ma=null;r.Nc=null;r.add=function(a,b){Xb(this);this.g=null;var c=this.ma.hasOwnProperty(a)&&this.ma[a];c||(this.ma[a]=c=[]);c.push(b);this.Nc++;return this};
|
|
87
|
+
r.set=function(a,b){Xb(this);this.g=null;this.ma.hasOwnProperty(a)?this.ma[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.ma)return"";var a=[],b;for(b in this.ma)for(var c=encodeURIComponent(b),d=this.ma[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 Ob;a.g=this.g;if(this.ma){var b={},c;for(c in this.ma)b[c]=this.ma[c].concat();a.ma=b;a.Nc=this.Nc}return a};function Yb(a,b){return a.concat(b)}function Zb(){}function $b(a){return null!=a};function ac(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Jb(d)});return a.map(function(d){return new Jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Yb,[]).map(function(d){return d.toString()})}function bc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
88
|
+
function cc(a,b){if(1==b.length)return b[0];var c=dc(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function dc(a,b){for(var c=t(ec[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==fc?"":null}
|
|
89
|
+
var fc="text",gc={ua:"video",Gc:"audio",Z:fc,Vb:"image",Fg:"application"},ec={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function hc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}hc.prototype.resolve=function(){};hc.prototype.reject=function(){};function ic(a){this.h=a;this.g=void 0}ic.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function jc(a){this.h=a;this.g=null}jc.prototype.O=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};jc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.Lb=function(){this.stop();this.h();return this};Q.prototype.O=function(a){var b=this;this.stop();this.g=(new jc(function(){b.h()})).O(a);return this};Q.prototype.Ba=function(a){var b=this;this.stop();this.g=(new jc(function(){b.g.O(a);b.h()})).O(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.Ba;Q.prototype.tickAfter=Q.prototype.O;
|
|
90
|
+
Q.prototype.tickNow=Q.prototype.Lb;function kc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function lc(a){return""!=mc().canPlayType(a)}function nc(){return oc("Xbox One")}function pc(){return oc("Tizen")}function qc(){return oc("Web0S")&&oc("Chrome/38.0.2125.122 Safari/537.36")}function rc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!pc()&&!oc("PC=EOS")&&!oc("VirginMedia")&&!sc()&&!oc("AFT")}function sc(){return oc("PlayStation 4")}
|
|
91
|
+
function tc(){if(!rc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function oc(a){return(navigator.userAgent||"").includes(a)}function mc(){if(uc)return uc;vc||(vc=new Q(function(){uc=null}));(uc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(uc=document.createElement("video"));vc.O(1);return uc}var vc=null,uc=null;function wc(){}
|
|
92
|
+
function xc(a){if(!a)return"";a=N(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!sc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==(a[c+
|
|
93
|
+
2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
94
|
+
function yc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Hb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return zc.value()(d)}
|
|
95
|
+
function Ac(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=N(a);if(239==c[0]&&187==c[1]&&191==c[2])return xc(c);if(254==c[0]&&255==c[1])return yc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yc(a,!1);if(0==c[1]&&0==c[3])return yc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xc(a);throw new O(2,2,2003);}
|
|
96
|
+
function Bc(a){if(window.TextEncoder&&!sc()){var b=new TextEncoder;return Fb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Fb(b)}function Cc(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}L("shaka.util.StringUtils",wc);wc.resetFromCharCode=function(){zc.g=void 0};wc.toUTF16=Cc;wc.toUTF8=Bc;wc.fromBytesAutoDetect=Ac;wc.fromUTF16=yc;
|
|
97
|
+
wc.fromUTF8=xc;var zc=new ic(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={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Dc(){}function Ec(a){a=N(a);a=zc.value()(a);return btoa(a)}function Fc(a,b){b=void 0==b?!0:b;var c=Ec(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Gc(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 Hc(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}
|
|
98
|
+
function Ic(a){var b=N(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 Jc(){for(var a=Ja.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(N(d),c),c+=d.byteLength;return b}L("shaka.util.Uint8ArrayUtils",Dc);Dc.concat=Jc;Dc.toHex=Ic;Dc.fromHex=Hc;Dc.fromBase64=Gc;Dc.toBase64=Fc;Dc.toStandardBase64=Ec;function Kc(){}L("shaka.dependencies",Kc);Kc.has=function(a){return Lc.has(a)};Kc.add=function(a,b){if(!Mc[a])throw Error(a+" is not supported");Lc.set(a,function(){return b})};var Mc={muxjs:"muxjs"};Kc.Allowed=Mc;var Lc=new Map([["muxjs",function(){return window.muxjs}]]);function Nc(a){var b=this;this.o=a;this.m=Lc.get("muxjs")();this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.l=[];this.i=[];this.j=!1;this.g.on("data",function(c){b.i=c.captions;b.l.push(Jc(c.initSegment,c.data))});this.g.on("done",function(){var c={data:Jc.apply(Dc,ia(b.l)),captions:b.i};b.h.resolve(c);b.j=!1})}Nc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
99
|
+
function Oc(a,b){var c=Pc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Lc.get("muxjs")()||!c&&!d)return!1;if(d)return MediaSource.isTypeSupported('audio/mp4; codecs="mp4a.40.2"');if(b)return MediaSource.isTypeSupported(Qc(b,a));c=Qc("audio",a);d=Qc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Pc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
100
|
+
function Rc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Pc(b)?Qc(a,b):b}function Qc(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}
|
|
101
|
+
function Sc(a,b){a.j=!0;a.h=new hc;a.l=[];a.i=[];var c=N(b);a.g.push(c);a.g.flush();a.j&&a.h.reject(new O(2,3,3018));return a.h};function Tc(){}function Uc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Vc(a,b,c){a=Uc(a,b);return Oc(a,c)?Rc(c,a):"audio"==c?a.replace("video","audio"):a}
|
|
102
|
+
function Wc(a){var b=Xc(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";
|
|
103
|
+
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 Yc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Xc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}L("shaka.util.MimeUtils",Tc);Tc.getFullType=Uc;
|
|
104
|
+
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Zc(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function $c(a){return ad[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Zc.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
|
|
105
|
+
function bd(a,b,c,d){var e,f,g,h;return G(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(N(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(N(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);A(k)})}
|
|
106
|
+
Zc.prototype.remove=function(a,b){var c=this;return G(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));A(d)})};function cd(a,b,c){a.l=b;a.m=c}function dd(a,b,c){a.B=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)}
|
|
107
|
+
function ed(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 fd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())fd(a,d.value,c)}
|
|
108
|
+
function gd(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,[]);fd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&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,
|
|
109
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}L("shaka.text.TextEngine",Zc);Zc.prototype.destroy=Zc.prototype.destroy;Zc.findParser=function(a){return ad[a]};Zc.unregisterParser=function(a){delete ad[a]};Zc.registerParser=function(a,b){ad[a]=b};var ad={};function hd(){}function id(a,b){a=jd(a);b=jd(b);return a.split("-")[0]==b.split("-")[0]}function kd(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ld(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function jd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=md.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
|
|
110
|
+
function nd(a,b){a=jd(a);b=jd(b);return b==a?4:kd(b,a)?3:ld(b,a)?2:kd(a,b)?1:0}function od(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=md.get(a)||a}function pd(a){return a.language?jd(a.language):a.audio&&a.audio.language?jd(a.audio.language):a.video&&a.video.language?jd(a.video.language):"und"}
|
|
111
|
+
function qd(a,b){for(var c=jd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(jd(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,kd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ld(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,kd(c,f))return f;return null}L("shaka.util.LanguageUtils",hd);hd.findClosestLocale=qd;hd.getLocaleForVariant=pd;
|
|
112
|
+
hd.getLocaleForText=function(a){return jd(a.language||"und")};hd.getBase=od;hd.relatedness=nd;hd.areSiblings=function(a,b){var c=od(a),d=od(b);return a!=c&&b!=d&&c==d};hd.normalize=jd;hd.isSiblingOf=ld;hd.isParentOf=kd;hd.areLanguageCompatible=id;hd.areLocaleCompatible=function(a,b){a=jd(a);b=jd(b);return a==b};
|
|
113
|
+
var md=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",
|
|
113
114
|
"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",
|
|
114
115
|
"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",
|
|
115
116
|
"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",
|
|
116
117
|
"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",
|
|
117
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
function
|
|
123
|
-
function
|
|
124
|
-
function
|
|
125
|
-
1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(
|
|
126
|
-
function
|
|
118
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function rd(){this.g={}}r=rd.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 sd(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 td(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=ud(f,b,c);f=vd(f,d);b=wd(f);b=xd(b);var g=yd(b,e);a.variants=a.variants.filter(function(h){return zd(h)==g?!0:!1})}function wd(a){var b=new rd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=zd(c);b.push(d,c)}return b}
|
|
119
|
+
function xd(a){var b=0,c=new Map,d=a.size();sd(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 rd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
120
|
+
function ud(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={yd:d.yd},e=b.next())if(d.yd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.yd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={kd:d.kd},b=c.next())if(d.kd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.kd)}}(d)),b.length){a=b;break}return a}
|
|
121
|
+
function yd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ad||d==Bd){if(a=Cd(a,d),1==a.size())return a.keys()[0]}else if(d==Dd)break;return Ed(a)}function Cd(a,b){var c=0,d=new rd;sd(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}
|
|
122
|
+
function Ed(a){var b="",c=Infinity;sd(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 zd(a){var b="";a.video&&(b=Wc(a.video.codecs));var c="";a.audio&&(c=Wc(a.audio.codecs));return b+"-"+c}function Fd(a,b,c){a.variants=a.variants.filter(function(d){return Gd(d,b,c)})}
|
|
123
|
+
function Gd(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}
|
|
124
|
+
function Hd(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=Gd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Id(a,b){return G(function(c){if(1==c.g)return u(c,Jd(b,0<b.offlineSessionIds.length),2);Kd(a,b);Ld(b);return u(c,Md(b),0)})}
|
|
125
|
+
function Jd(a,b){return G(function(c){if(1==c.g)return u(c,Nd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Od(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=cc("video",g);g=cc("audio",g);g=Vc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Vc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Pd(f.codecs),f=Vc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(nc()&&e&&(e.width&&
|
|
126
|
+
1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Qd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Qd(d));return e});A(c)})}
|
|
127
|
+
function Nd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return G(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return w=C.h,y.decodingInfos.push(w),za(C,0);Aa(C);JSON.stringify(x);A(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Rd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
|
|
127
128
|
0)})}
|
|
128
|
-
function
|
|
129
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
129
|
+
function Rd(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=cc("video",g);f=Od(f);g=cc("audio",g);g=Vc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Od(f);f=Vc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
130
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Pd(d.codecs),f=Vc(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,[]);
|
|
130
131
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
131
|
-
(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
|
|
132
|
-
function
|
|
133
|
-
function
|
|
134
|
-
function
|
|
135
|
-
function
|
|
132
|
+
(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 Pd(a){return pc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
133
|
+
function Od(a){return"vp9"==a?"vp09.00.41.08":a}function Kd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Sd(d,a.audio)||c&&a&&a.video&&!Sd(c,a.video)?!1:!0})}function Ld(a){a.textStreams=a.textStreams.filter(function(b){return $c(Uc(b.mimeType,b.codecs))})}
|
|
134
|
+
function Md(a){var b,c,d,e,f,g,h,k;return G(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(Td.has(f)){l.A(5);break}g=Ud.get(f);if(!g){Td.set(f,!1);l.A(5);break}return u(l,Vd(g),7);case 7:h=l.h,Td.set(f,h);case 5:(k=Td.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
|
|
135
|
+
function Vd(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 Sd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
136
|
+
function Wd(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 n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
|
|
136
137
|
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,
|
|
137
138
|
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.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
138
|
-
function
|
|
139
|
+
function Xd(a){return{id:a.id,active:!1,type:fc,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,
|
|
139
140
|
originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
|
|
140
|
-
function
|
|
141
|
-
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
|
|
142
|
-
function
|
|
143
|
-
function
|
|
144
|
-
originalTextId:null,originalImageId:null}}function
|
|
145
|
-
function
|
|
146
|
-
function
|
|
147
|
-
|
|
148
|
-
function
|
|
149
|
-
var
|
|
141
|
+
function Yd(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:[],
|
|
142
|
+
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 Zd(a){a.__shaka_id||(a.__shaka_id=$d++);return a.__shaka_id}
|
|
143
|
+
function ae(a){var b=be(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 ce(a){var b=be(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}
|
|
144
|
+
function be(a){return{id:Zd(a),active:!1,type:"",bandwidth:0,language:jd(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,
|
|
145
|
+
originalTextId:null,originalImageId:null}}function de(a){return a.allowedByApplication&&a.allowedByKeySystem}function ee(a){return a.filter(function(b){return de(b)})}
|
|
146
|
+
function vd(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)))}
|
|
147
|
+
function fe(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=qd(jd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return jd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ge(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(Yb,[]);return a.length?
|
|
148
|
+
ge(e,a[0]):e}function ge(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Qd(a){var b=[];a.audio&&b.push(he(a.audio));a.video&&b.push(he(a.video));return b.join(", ")}
|
|
149
|
+
function he(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"}
|
|
150
|
+
var $d=0,Ad="smooth",Bd="powerEfficient",Dd="bandwidth",Td=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ud=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ie(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new Q(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=ie.prototype;
|
|
150
151
|
r.stop=function(){this.l=null;this.o=!1;this.m=[];this.u=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};r.init=function(a){this.l=a};
|
|
151
|
-
r.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=
|
|
152
|
-
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.s=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
153
|
-
r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(
|
|
154
|
-
r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
function
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
function
|
|
161
|
-
function
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
function
|
|
165
|
-
function
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
function
|
|
170
|
-
r.request=function(a,b){var c=this,d=new
|
|
171
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.
|
|
172
|
-
function
|
|
173
|
-
function
|
|
174
|
-
if(!n)return w;var
|
|
175
|
-
c.uris[e],b));if(w instanceof
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
r.
|
|
180
|
-
|
|
181
|
-
function
|
|
182
|
-
r.
|
|
183
|
-
r.skip=function(a){if(this.g+a>this.S.byteLength)throw
|
|
184
|
-
|
|
185
|
-
r.
|
|
186
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function
|
|
187
|
-
function
|
|
188
|
-
|
|
189
|
-
function
|
|
190
|
-
function
|
|
191
|
-
function
|
|
192
|
-
function
|
|
193
|
-
function
|
|
194
|
-
function
|
|
195
|
-
var
|
|
196
|
-
function
|
|
197
|
-
function
|
|
198
|
-
function
|
|
199
|
-
return u(x,
|
|
200
|
-
function
|
|
201
|
-
r.Yb=function(a){var b=this,c;return
|
|
202
|
-
u(d,
|
|
203
|
-
function
|
|
204
|
-
|
|
205
|
-
function
|
|
206
|
-
function
|
|
207
|
-
function
|
|
208
|
-
f.keySystem;var
|
|
209
|
-
|
|
210
|
-
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:
|
|
211
|
-
function
|
|
212
|
-
l.
|
|
213
|
-
function
|
|
214
|
-
w.h,w["return"](c);case 6:
|
|
215
|
-
function
|
|
216
|
-
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
217
|
-
function
|
|
218
|
-
case 4:f=h.h;
|
|
219
|
-
function
|
|
220
|
-
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
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new
|
|
224
|
-
function
|
|
225
|
-
function
|
|
226
|
-
c.close()["catch"](function(){}));
|
|
227
|
-
function
|
|
228
|
-
p;return
|
|
229
|
-
function
|
|
230
|
-
function
|
|
231
|
-
function
|
|
152
|
+
r.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=je(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ke(this));this.m.length&&!a.length&&(a=je(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
|
|
153
|
+
d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),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.s=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
|
|
154
|
+
r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(ke(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ke(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
|
|
155
|
+
r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.O(le)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ke(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
156
|
+
function je(a,b,c,d){a&&(b=b.filter(function(e){return Gd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}L("shaka.abr.SimpleAbrManager",ie);ie.prototype.configure=ie.prototype.configure;ie.prototype.setMediaElement=ie.prototype.setMediaElement;ie.prototype.playbackRateChanged=ie.prototype.playbackRateChanged;ie.prototype.setVariants=ie.prototype.setVariants;ie.prototype.getBandwidthEstimate=ie.prototype.getBandwidthEstimate;ie.prototype.segmentDownloaded=ie.prototype.segmentDownloaded;
|
|
157
|
+
ie.prototype.disable=ie.prototype.disable;ie.prototype.enable=ie.prototype.enable;ie.prototype.chooseVariant=ie.prototype.chooseVariant;ie.prototype.init=ie.prototype.init;ie.prototype.stop=ie.prototype.stop;var le=1;function me(a,b){this.g=a;this.h=b}me.prototype.toString=function(){return"v"+this.g+"."+this.h};function ne(a,b){var c=new me(5,0),d=oe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function pe(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function qe(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var oe=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});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};
|
|
158
|
+
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()};
|
|
159
|
+
function te(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Xc(f)[0]}),d=b.codecs.split(",").map(function(f){return Xc(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}
|
|
160
|
+
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=vd(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=jd(b),d=qd(c,a.map(function(e){return pd(e)}));return d?a.filter(function(e){return d==pd(e)}):[]}
|
|
161
|
+
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}
|
|
162
|
+
function Ge(a){var b,c;return G(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(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 Q(e)).O(c/1E3)}),2)}a.h*=a.m;A(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 O(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()};
|
|
163
|
+
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};
|
|
164
|
+
He.prototype.Y=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 hc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new He(f,function(){return d()})};
|
|
165
|
+
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()}}}L("shaka.util.AbortableOperation",He);He.prototype.chain=He.prototype.Y;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}
|
|
166
|
+
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(){};L("shaka.util.FakeEvent",S);
|
|
167
|
+
var Pe={Hg:"abrstatuschanged",Ig:"adaptation",Jg:"buffering",Lg:"downloadfailed",Mg:"downloadheadersreceived",Ng:"drmsessionupdate",Pg:"emsg",bh:"prft",Error:"error",Qg:"expirationupdated",Rg:"gapjumped",Ug:"loaded",Vg:"loading",Xg:"manifestparsed",Yg:"mediaqualitychanged",Metadata:"metadata",$g:"onstatechange",ah:"onstateidle",dh:"ratechange",fh:"segmentappended",gh:"sessiondata",hh:"stalldetected",ih:"streaming",jh:"textchanged",kh:"texttrackvisibility",lh:"timelineregionadded",mh:"timelineregionenter",
|
|
168
|
+
nh:"timelineregionexit",oh:"trackschanged",qh:"unloading",rh:"variantchanged"};function Qe(){this.da=new rd;this.Vc=this}Qe.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Qe.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Qe.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Vc;a.currentTarget=this.Vc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
169
|
+
Qe.prototype.release=function(){this.da=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}ra(Ve,Qe);r=Ve.prototype;r.ie=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,ig:b,jg:void 0===d?!1:d}}r.kg=function(a){this.g.add(a)};r.Ag=function(a){this.g["delete"](a)};r.qf=function(){this.g.clear()};r.lg=function(a){this.h.add(a)};r.Bg=function(a){this.h["delete"](a)};r.rf=function(){this.h.clear()};
|
|
170
|
+
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()};
|
|
171
|
+
r.request=function(a,b){var c=this,d=new $e;if(this.i){var e=Promise.reject(new O(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.Y(function(){return cf(c,a,b,new Ee(b.retryParameters,!1),0,null,d)}),g=f.Y(function(n){return df(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
172
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Y(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Xf||!c.l||q.fromCache||a!=ef||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new af(m.promise,function(){return m.abort()},d);Ue(this.m,e);return e};
|
|
173
|
+
function bf(a,b,c){var d=Ke(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={td:e.td},f=a.next())e.td=f.value,d=d.Y(function(g){return function(){c.body&&(c.body=Fb(c.body));return g.td(b,c)}}(e));return d.Y(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
|
|
174
|
+
function cf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Jb(c.uris[e]),k=h.Da,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ye[k])?k.ig:null;if(!m)return Ie(new O(2,1,1E3,h));var n=k.jg,p=null,q=null,v=!1,y=!1,x;return Le(Ge(d)).Y(function(){if(a.i)return Je();x=Date.now();var w=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();q&&q.O(z/1E3);a.l&&b==ef&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);y=!0});
|
|
175
|
+
if(!n)return w;var C=c.retryParameters.connectionTimeout;C&&(p=new Q(function(){v=!0;w.abort()}),p.O(C/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new Q(function(){v=!0;w.abort()}));return w}).Y(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var C={response:w,Xf:l};!y&&a.j&&a.j(w.headers,c,b);return C},function(w){p&&p.stop();q&&q.stop();if(a.s){var C=null,z=0;w instanceof O&&(C=w,1001==w.code&&(z=w.data[1]));a.s(c,C,z,v)}if(a.i)return Je();v&&(w=new O(1,1,1003,
|
|
176
|
+
c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new S("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,cf(a,b,c,d,e,w,g)}throw w;})}
|
|
177
|
+
function df(a,b,c){var d=Ke(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={ud:e.ud},f=a.next())e.ud=f.value,d=d.Y(function(g){return function(){var h=c.response;h.data&&(h.data=Fb(h.data));return g.ud(b,h)}}(e));return d.Y(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}L("shaka.net.NetworkingEngine",Ve);Ve.prototype.request=Ve.prototype.request;Ve.prototype.destroy=Ve.prototype.destroy;Ve.makeRequest=Ze;
|
|
178
|
+
Ve.defaultRetryParameters=function(){return Fe()};Ve.prototype.clearAllResponseFilters=Ve.prototype.rf;Ve.prototype.unregisterResponseFilter=Ve.prototype.Bg;Ve.prototype.registerResponseFilter=Ve.prototype.lg;Ve.prototype.clearAllRequestFilters=Ve.prototype.qf;Ve.prototype.unregisterRequestFilter=Ve.prototype.Ag;Ve.prototype.registerRequestFilter=Ve.prototype.kg;Ve.unregisterScheme=function(a){delete Ye[a]};Ve.registerScheme=We;Ve.prototype.setForceHTTPS=Ve.prototype.ie;function $e(){this.g=0}
|
|
179
|
+
Ve.NumBytesRemainingClass=$e;function af(a,b,c){He.call(this,a,b);this.h=c}ra(af,He);Ve.PendingRequest=af;var ef=1;Ve.RequestType={MANIFEST:0,SEGMENT:ef,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var Xe=3;Ve.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Xe};var Ye={};function ff(a){this.g=!1;this.h=new hc;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 O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function hf(){this.g=new rd}r=hf.prototype;r.release=function(){this.nb();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new jf(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.yc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.yc=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.yc(),this.g.remove(b,e))}};
|
|
180
|
+
r.nb=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.yc();this.g.g={}}};L("shaka.util.EventManager",hf);hf.prototype.removeAll=hf.prototype.nb;hf.prototype.unlisten=hf.prototype.yc;hf.prototype.listenOnce=hf.prototype.na;hf.prototype.listen=hf.prototype.C;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)}
|
|
181
|
+
jf.prototype.yc=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}
|
|
182
|
+
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){this.S=Hb(a);this.h=b==tf;this.g=0}r=sf.prototype;r.la=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.Ff=function(){return this.S.byteLength};r.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw uf();}};r.Zd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw uf();}};r.L=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw uf();}};
|
|
183
|
+
r.Oe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw uf();}};r.ab=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw uf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.$a=function(a){if(this.g+a>this.S.byteLength)throw uf();var b=N(this.S,this.g,a);this.g+=a;return b};
|
|
184
|
+
r.skip=function(a){if(this.g+a>this.S.byteLength)throw uf();this.g+=a};r.rg=function(a){if(this.g<a)throw uf();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw uf();this.g=a};r.rc=function(){for(var a=this.g;this.la()&&0!=this.S.getUint8(this.g);)this.g+=1;a=N(this.S,a,this.g-a);this.g+=1;return xc(a)};function uf(){return new O(2,3,3E3)}L("shaka.util.DataViewReader",sf);sf.prototype.readTerminatedString=sf.prototype.rc;sf.prototype.seek=sf.prototype.seek;sf.prototype.rewind=sf.prototype.rg;
|
|
185
|
+
sf.prototype.skip=sf.prototype.skip;sf.prototype.readBytes=sf.prototype.$a;sf.prototype.readUint64=sf.prototype.ab;sf.prototype.readInt32=sf.prototype.Oe;sf.prototype.readUint32=sf.prototype.L;sf.prototype.readUint16=sf.prototype.Zd;sf.prototype.readUint8=sf.prototype.Ra;sf.prototype.getLength=sf.prototype.Ff;sf.prototype.getPosition=sf.prototype.$;sf.prototype.hasMoreData=sf.prototype.la;var tf=1;sf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:tf};function vf(){this.i=[];this.h=[];this.g=!1}r=vf.prototype;r.box=function(a,b){var c=wf(a);this.i[c]=xf;this.h[c]=b;return this};r.T=function(a,b){var c=wf(a);this.i[c]=yf;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new sf(a,0);for(this.g=!1;a.la()&&!this.g;)this.ed(0,a,b,c)};
|
|
186
|
+
r.ed=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.L(),g=b.L(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.ab();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==yf){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.L();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.$a(d):new Uint8Array(0),b=new sf(b,0),k({parser:this,partialOkay:c||
|
|
187
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function zf(a){for(var b=Af(a);a.reader.la()&&!a.parser.g;)a.parser.ed(a.start+b,a.reader,a.partialOkay)}function Bf(a){for(var b=Af(a),c=a.reader.L(),d=0;d<c&&(a.parser.ed(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Cf(a){return function(b){a(b.reader.$a(b.reader.S.byteLength-b.reader.$()))}}
|
|
188
|
+
function wf(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 Df(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Af(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",vf);vf.headerSize=Af;vf.typeToString=Df;vf.allData=Cf;vf.sampleDescription=Bf;vf.children=zf;vf.prototype.parseNext=vf.prototype.ed;vf.prototype.parse=vf.prototype.parse;vf.prototype.stop=vf.prototype.stop;
|
|
189
|
+
vf.prototype.fullBox=vf.prototype.T;vf.prototype.box=vf.prototype.box;var xf=0,yf=1;function Ef(a){var b=this;this.g=[];this.h=[];this.data=[];(new vf).box("moov",zf).box("moof",zf).T("pssh",function(c){if(!(1<c.version)){var d=N(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Ic(c.reader.$a(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=Ic(c.reader.$a(16));b.h.push(f)}}}}).parse(a)}
|
|
190
|
+
function Ff(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=Hb(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=Hc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Gf(a,b){var c=Hf(a,b);return 1!=c.length?null:c[0]}function If(a,b,c){a=Jf(a,b,c);return 1!=a.length?null:a[0]}function Hf(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 Kf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
191
|
+
function Jf(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 Lf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Mf(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 Nf(a){return Array.from(a.childNodes).every(Of)?a.textContent.trim():null}
|
|
192
|
+
function Of(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Pf(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 Qf(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}
|
|
193
|
+
function Rf(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}
|
|
194
|
+
function Sf(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 Tf(a){a=Number(a);return 0===a%1?a:null}function Uf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Vf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Wf(a){a=Number(a);return isNaN(a)?null:a}function Xf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
195
|
+
function Yf(a,b){var c=new DOMParser,d=Zf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function $f(a,b){try{var c=xc(a);return Yf(c,b)}catch(d){return null}}
|
|
196
|
+
var Zf=new ic(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ag(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ea=this.X=!1;this.H=0;this.g=null;this.s=new hf;this.i=new Map;this.B=[];this.o=new hc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ha=new Map;this.ca=new Map;this.P=new Q(function(){return bg(c)});this.M=!1;this.K=[];this.N=!1;this.da=(new Q(function(){cg(c)})).Ba(b);this.o["catch"](function(){});this.j=new ff(function(){return dg(c)});this.W=!1;this.F=null}r=ag.prototype;r.destroy=function(){return this.j.destroy()};
|
|
197
|
+
function dg(a){return G(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.da.stop(),a.da=null,a.P.stop(),a.P=null,u(b,eg(a),2);case 2:if(!a.l){b.A(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};function fg(a,b,c){a.ea=!0;a.B=[];a.M=c;return gg(a,b)}
|
|
198
|
+
function hg(a,b,c){a.B=c;a.M=0<c.length;return gg(a,b)}function ig(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 jg(a,g,[])}
|
|
199
|
+
function gg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return G(function(x){if(1==x.g){if(c=kg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),lg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=mg(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,ng(q,pf(a.h.servers),pf(a.h.advanced||{}),a.h.keySystemsMapping);
|
|
200
|
+
return u(x,Nd(b,a.M,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.X=!0,x["return"](Promise.resolve());y=jg(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
|
|
201
|
+
function og(a){var b;return G(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 gf(a.j),c["return"]();case 2:return D(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:za(c,5);break;case 4:b=Aa(c),a.m(new O(2,6,6003,b.message));case 5:gf(a.j),A(c)}})}function pg(a,b){return G(function(c){if(1==c.g)return u(c,og(a),2);qg(a,b.initDataType,N(b.initData));A(c)})}
|
|
202
|
+
r.Yb=function(a){var b=this,c;return G(function(d){if(1==d.g){if(!b.u)return b.s.na(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.s.na(b.l,"play",function(){for(var e=t(b.K),f=e.next();!f.done;f=e.next())rg(b,f.value);b.N=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return eg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?
|
|
203
|
+
u(d,og(b),2):d.A(2)}sg(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return pg(b,e)});A(d)})};
|
|
204
|
+
function tg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.u||!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);D(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=N(d.data);za(g,4);break;case 3:throw e=Aa(g),new O(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"]();
|
|
205
|
+
D(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:za(g,0);break;case 6:throw f=Aa(g),new O(2,6,6004,f.message);}})}function ug(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,vg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new hc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
|
|
206
|
+
function sg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,qg(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())vg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function qg(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(Db(c,e.value.initData)&&!oc("Tizen 2"))return;0<a.i.size&&wg(a)&&(a.o.resolve(),a.o=new hc,a.o["catch"](function(){}));xg(a,b,c,a.g.sessionType)}}
|
|
207
|
+
function yg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function zg(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.hc=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.Qc=function(){return qf(this.ca)};
|
|
208
|
+
function jg(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return G(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Ag(a,c,d);x.A(2);break}return u(x,Bg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);gf(a.j);D(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
|
|
209
|
+
f.keySystem;var C=d.get(f.keySystem);var z=[],B=[],E=[],F=[],H=new Set;Cg(C,z,E,B,F,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||I,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:F,keyIds:H};C=t(C);for(z=C.next();!z.done;z=
|
|
210
|
+
C.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),z=[],B=[],E=[],F=[],H=new Set,Cg(w.drmInfos,z,E,B,F,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
211
|
+
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,gf(a.j),a.u=v,a.X=!0,u(x,tg(a),7);case 7:gf(a.j);za(x,0);break;case 4:y=Aa(x);gf(a.j,y);a.g=null;a.G.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
|
|
212
|
+
function Ag(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(mg(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 O(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={rd:d.rd},e=a.next())for(d.rd=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==
|
|
213
|
+
l.rd}}(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}
|
|
214
|
+
function Bg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);D(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
215
|
+
w.h,w["return"](c);case 6:Aa(w);case 7:gf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.A(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.A(13);break}D(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:Aa(w);case 16:gf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
|
|
216
|
+
function kg(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Fc(Hc(f),!1));var h=e;22!=h.length&&(h=Fc(Hc(e),!1));g={kty:"oct",kid:g,k:h};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:N(Bc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
|
|
217
|
+
videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
218
|
+
function vg(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.K.push(k):rg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Dg(a,k)});e={initData:null,initDataType:null,loaded:!1,Ud:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);
|
|
219
|
+
case 4:f=h.h;gf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;wg(a)&&a.o.resolve();return h["return"](c);case 2:g=Aa(h),gf(a.j,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
220
|
+
function xg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.K.push(f):rg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Dg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Ud:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Fc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
221
|
+
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 O(2,6,6006,f.message,f,h))}})}
|
|
222
|
+
function rg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;G(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Fc(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),
|
|
223
|
+
yg(a.g.keySystem)&&Eg(g),h=Date.now(),D(x,2),l=a.D.lb.request(2,g),u(x,l.promise,4);case 4:k=x.h;za(x,3);break;case 2:return m=Aa(x),n=new O(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Fc(k.data);D(x,5);return u(x,c.update(k.data),7);case 7:za(x,6);break;case 5:return p=Aa(x),q=new O(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new S("drmsessionupdate");
|
|
224
|
+
a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new Q(function(){d.loaded=!0;wg(a)&&a.o.resolve()}),y.O(Fg));A(x)}})}
|
|
225
|
+
function Eg(a){var b=yc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Yf(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Gc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
226
|
+
function Dg(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(yg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||sc())){k=Hb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Ic(h).slice(0,32);a.ha.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),
|
|
227
|
+
c.close()["catch"](function(){}));wg(a)&&(a.o.resolve(),a.P.O(Gg))}function bg(a){var b=a.ha,c=a.ca;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 O(2,6,6014));a.D.cd(qf(c))}
|
|
228
|
+
function Hg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation 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,c],f=new Map,g=function(l){var m,n,
|
|
229
|
+
p;return G(function(q){switch(q.g){case 1:D(q,2);if("org.w3.clearkey"===l&&tc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,oc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:za(q,0);break;case 2:Aa(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
|
|
230
|
+
function Ig(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).O(Jg)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return za(c,0);Aa(c);A(c)})}
|
|
231
|
+
function eg(a){var b;return G(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 G(function(g){if(1==g.g)return D(g,2),a.ea||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ig(e),5):u(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);A(g)})})),0)})}
|
|
232
|
+
function Kg(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={Ca:f.Ca},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ca=[];f.Ca=f.Ca.concat(e.initData||[]);f.Ca=f.Ca.concat(h.initData||[]);f.Ca=f.Ca.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ca.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
232
233
|
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,
|
|
233
|
-
initData:f.
|
|
234
|
-
function
|
|
235
|
-
function
|
|
236
|
-
m.
|
|
237
|
-
function
|
|
238
|
-
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
|
|
239
|
-
function
|
|
240
|
-
|
|
241
|
-
if(d)return a;if(0==g.length||!e)throw ab(
|
|
242
|
-
function
|
|
243
|
-
k.setUint32(b,a+1);return e}function
|
|
244
|
-
q||-1===v)p=
|
|
245
|
-
function
|
|
246
|
-
function
|
|
247
|
-
var
|
|
248
|
-
[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"]]),
|
|
249
|
-
[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
|
|
250
|
-
var
|
|
251
|
-
function
|
|
252
|
-
function
|
|
253
|
-
b=null;c=t(
|
|
254
|
-
b.skip(1),d=
|
|
255
|
-
function
|
|
256
|
-
var
|
|
257
|
-
function
|
|
258
|
-
function
|
|
259
|
-
d=1===(d&1);if(c.h!==
|
|
260
|
-
(e&246)&&32===(d&224))
|
|
261
|
-
0,h-1),
|
|
262
|
-
function
|
|
263
|
-
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=
|
|
264
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&
|
|
265
|
-
function
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
v
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
function
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
function
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
function
|
|
304
|
-
function
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
r.
|
|
309
|
-
function
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
function(
|
|
317
|
-
function
|
|
318
|
-
r.
|
|
319
|
-
function
|
|
320
|
-
|
|
321
|
-
function
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
r.
|
|
325
|
-
function
|
|
326
|
-
function
|
|
327
|
-
function
|
|
328
|
-
function
|
|
329
|
-
|
|
330
|
-
function
|
|
331
|
-
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
function
|
|
337
|
-
function
|
|
338
|
-
function
|
|
339
|
-
|
|
340
|
-
function
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
function
|
|
344
|
-
function
|
|
345
|
-
function
|
|
346
|
-
function
|
|
347
|
-
|
|
348
|
-
function
|
|
234
|
+
initData:f.Ca,keyIds:g});break}}return c}function mg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function cg(a){a.i.forEach(function(b,c){var d=b.Ud,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ud=e)})}function wg(a){a=a.i.values();return of(a,function(b){return b.loaded})}
|
|
235
|
+
function lg(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)}
|
|
236
|
+
function Cg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={Cc:h.Cc},l=k.next())h.Cc=l.value,e.some(function(m){return function(n){var p=
|
|
237
|
+
m.Cc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.Cc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
238
|
+
function ng(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=
|
|
239
|
+
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 Jg=1,Fg=5,Gg=.5,Lg=new ic(function(){return Fb(new Uint8Array([0]))});function Mg(){}function Ng(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=Og[d.toLowerCase()]))return k["return"](e);if(f=Pg(a))if(g=Qg[f])return k["return"](g);return d?k.A(2):u(k,Rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Og[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
|
|
240
|
+
function Rg(a,b,c){var d,e,f;return G(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 Pg(a){a=(new Jb(a)).qa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",Mg);Mg.unregisterParserByMime=function(a){delete Og[a]};Mg.registerParserByMime=function(a,b){Og[a]=b};
|
|
241
|
+
Mg.registerParserByExtension=function(a,b){Qg[a]=b};var Og={},Qg={};function Sg(a){function b(){d=!0}function c(l){f.push(l);zf(l)}a=N(a);var d=!1,e,f=[],g=[];(new vf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Bf(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,pc:1701733238})}).T("avc3",function(l){g.push({box:l,pc:1701733238})}).T("ac-3",function(l){g.push({box:l,pc:1701733217})}).T("ec-3",function(l){g.push({box:l,pc:1701733217})}).T("mp4a",function(l){g.push({box:l,pc:1701733217})}).parse(a);
|
|
242
|
+
if(d)return a;if(0==g.length||!e)throw ab(Ic(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Tg(a,e,k.box,f,k.pc);return a}
|
|
243
|
+
function Tg(a,b,c,d,e){var f=Ug.value(),g=a.subarray(c.start,c.start+c.size),h=Hb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Vg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=nc()?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,Vg(e,d.start,d.size+k.byteLength);k=Hb(e,b.start);b=Af(b);a=k.getUint32(b);
|
|
244
|
+
k.setUint32(b,a+1);return e}function Vg(a,b,c){a=Hb(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 Ug=new ic(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 Wg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Xg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){q=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
|
|
245
|
+
q||-1===v)p=Yg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var x=y.l,w=y.i,C=y.j,z=y.h;if(x!=h||w!=k||C!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Xg(d,e,x,w,C,z),h=x,k=w,l=C,m=z;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Yg(d,e),a.nestedCues.push(n));n=Xg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
246
|
+
function Xg(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 Yg(a,b){var c=new hb(a,b,"");c.lineBreak=!0;return c}function Zg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function $g(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";ah(this)}function bh(a,b,c){return Wg(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function ah(a){ch(a,0,15);a.g=1}function dh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case eh:d=fh.has(c)?fh.get(c):String.fromCharCode(c);break;case gh:d=hh.get(c);break;case ih:a.i[a.g].pop();d=jh.get(c);break;case kh:a.i[a.g].pop(),d=lh.get(c)}d&&a.i[a.g].push(new Zg(d,a.m,a.j,a.o,a.l))}}
|
|
247
|
+
function mh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function ch(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
248
|
+
var eh=0,gh=1,ih=2,kh=3,fh=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"]]),hh=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"]]),jh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
249
|
+
[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"]]),lh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
250
|
+
[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 nh(a,b){this.h=oh;this.o=new $g(a,b);this.i=new $g(a,b);this.l=new $g(a,b);this.g=this.i;this.j=0;this.m=null}function ph(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==qh&&a.h!==rh&&(e=bh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,ch(c,0,15),c=a.l,c.g=0<c.h?c.h:0,ch(c,0,15),d.g=15);a.h=qh;d.h=b;return e}function sh(a){a.h=th;a.g=a.l;a.g.h=0}function uh(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=rh}
|
|
251
|
+
var oh=0,th=1,qh=3,rh=4,vh="black green blue cyan red yellow magenta black".split(" "),wh="white green blue cyan red yellow magenta white_italics".split(" ");function xh(){this.l=!1;this.B=this.F=0;this.D=yh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";zh(this)}function zh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ah())}function Ah(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Bh(a,b){Ch(a)&&(a.i[a.h][a.g]=new Zg(b,a.u,a.o,a.m,a.s),a.g++)}function Ch(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}xh.prototype.isVisible=function(){return this.l};
|
|
252
|
+
function Dh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===Eh?"left":a.D===Fh?"right":lb;if(c=Wg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Eh=0,Fh=1,yh=2;function Gh(){this.i=[];this.h=null;this.g=0}function Hh(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 Ih(a.h)),a.h=null,a.g=0))}function Ih(a){this.g=0;this.h=a}Ih.prototype.la=function(){return this.g<this.h.length};Ih.prototype.$=function(){return this.g};function Jh(a){if(!a.la())throw new O(2,2,3E3);return a.h[a.g++]}Ih.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Kh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
253
|
+
function Lh(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=Jh(b).value;b=null;c=t(Mh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Dh(e,d,a.i)),zh(e);return b}if(137===c)for(b=Jh(b).value,b=t(Mh(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=Jh(b).value;b=null;c=t(Mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Dh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Jh(b).value;
|
|
254
|
+
b=null;c=t(Mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Dh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Jh(b).value,Nh(a,b,d);if(143===c)return d=Nh(a,255,d),Oh(a),d;if(144===c)b.skip(1),d=Jh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Jh(b).value,c=Jh(b).value,b.skip(1),a.g&&(b=Ph((c&48)>>4,(c&12)>>2,c&3),a.g.s=Ph((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Jh(b).value,b=Jh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
255
|
+
b.skip(1),d=Jh(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 xh;f.j=d;a.h[c]=f}d=Jh(b).value;Jh(b);Jh(b);f=Jh(b).value;var g=Jh(b).value;b=Jh(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.B=(g&63)+1;a.g=a.h[c]}}}return null}function Mh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
256
|
+
function Nh(a,b,c){var d=null;b=t(Mh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Dh(f,c,a.i));a.h[e]=null}return d}function Oh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Ph(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Qh[a<<2|b<<1|c]}
|
|
257
|
+
var Rh=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"]]),Qh="black blue green cyan red magenta yellow white".split(" ");function Sh(){this.h=[];this.g=[];this.i=new Gh;this.l=0;this.s=new Map([["CC1",new nh(0,0)],["CC2",new nh(0,1)],["CC3",new nh(1,0)],["CC4",new nh(1,1)]]);this.o=this.m=0;this.j=new Map;Th(this)}function Th(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,ah(b.i),ah(b.l),ah(b.o)}
|
|
258
|
+
function Uh(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=Vh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Hh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Wh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
259
|
+
function Vh(a,b){var c=b.type;if(16===(b.wa&112)){var d=b.wa>>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.wa&&255===b.La||!b.wa&&!b.La||!Xh(b.wa)||!Xh(b.La))return 45<=++a.l&&Th(a),null;a.l=0;b.wa&=127;b.La&=127;if(!b.wa&&!b.La)return null;d=null;if(16===(b.wa&112))a:{var e=b.wa;d=b.La;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=wh[f]:7===f&&(h=!0);
|
|
260
|
+
d=1===(d&1);if(c.h!==rh){f=c.g;if(c.h===qh&&e!==f.g){var k=1+e-f.h;mh(f,k,1+f.g-f.h,f.h);ch(f,0,k-1);ch(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",dh(c.g,eh,32),g=!1,e=wh[(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=vh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))dh(c.g,gh,d);else if(18===
|
|
261
|
+
(e&246)&&32===(d&224))dh(c.g,e&1?kh:ih,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.La){case 32:sh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=ph(c,2,d);break;case 38:e=ph(c,3,d);break;case 39:e=ph(c,4,d);break;case 40:dh(c.g,eh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ah(c.o);uh(c);break;case 43:uh(c);break;case 44:e=c.i;g=null;c.h!==rh&&(g=bh(e,c.j,d));ch(e,0,15);e=g;break;case 45:e=c.g;c.h!==qh?e=null:(g=bh(e,c.j,d),h=e.g-e.h+1,mh(e,h-1,h,e.h),ch(e,
|
|
262
|
+
0,h-1),ch(e,e.g,15-e.g),c.j=d,e=g);break;case 46:ch(c.l,0,15);break;case 47:e=null,c.h!==rh&&(e=bh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,sh(c),c.j=d}d=e;break a}d=null}else e=b.La,dh(c.g,eh,b.wa),dh(c.g,eh,e);return d}
|
|
263
|
+
function Wh(a,b){var c=[];try{for(;b.la();){var d=Jh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Jh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Kh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Jh(e),l=k.value,m=k.pts;if(16===l){var n=Jh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Ch(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Dh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
|
|
264
|
+
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Ah()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Dh(q,p,g.i));q.i[q.h]=Ah();q.g=0;break;case 12:q.isVisible()&&(e=Dh(q,p,g.i)),zh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Lh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Bh(g.g,"\u266a"):Bh(g.g,
|
|
265
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Bh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Rh.has(e)){var w=Rh.get(e);Bh(g.g,w)}else Bh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Bh(g.g,"_"):Bh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Xh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Yh(){}Yh.prototype.init=function(){};Yh.prototype.parse=function(){return[]};function Zh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.ab());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Ae:c,wf:d,sh:e}}function $h(a,b){return{ue:1==b?a.ab():a.L()}}function ai(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.L()}}
|
|
266
|
+
function bi(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={de:null,sampleSize:null,fd:null};c&256&&(h.de=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.fd=0==b?a.L():a.Oe());e.push(h)}return{xh:d,Qe:e,vf:f}};function ci(){this.j=new Map;this.i=this.h=0;this.g=di}
|
|
267
|
+
ci.prototype.init=function(a){function b(f){return function(){c.g=f}}var c=this,d=[],e=[];(new vf).box("moov",zf).box("mvex",zf).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.L();g=g.L();c.h=f;c.i=g}).box("trak",zf).T("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.L();d.push(f)}).box("mdia",zf).T("mdhd",function(f){f=ai(f.reader,f.version);e.push(f.timescale)}).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("avc1",b(ei)).box("avc3",b(ei)).box("hev1",
|
|
268
|
+
b(fi)).box("hvc1",b(fi)).box("dvh1",b(fi)).box("dvhe",b(fi)).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==di&&Va("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
269
|
+
ci.prototype.parse=function(a){var b=this;if(this.g==di)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new vf).box("moof",function(m){g=m.start;zf(m)}).box("traf",zf).T("trun",function(m){m=bi(m.reader,m.version,m.flags);f=m.Qe;h=m.vf}).T("tfhd",function(m){m=Zh(m.reader,m.flags);d=m.Ae||b.h;e=m.wf||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).T("tfdt",function(m){k=$h(m.reader,m.version).ue}).box("mdat",function(m){if(null===k)throw new O(2,2,2010);a:{var n=m.reader,p=k,q=l,
|
|
270
|
+
v=d,y=e,x=f,w=0,C=y;x.length&&(C=x[0].sampleSize||y);for(n.skip((g||0)+(h||0)-m.start-8);n.la();){m=n.L();var z=n.Ra();switch(b.g){case ei:z&=31;z=6==z;break;case fi:z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;x.length>w&&(z=x[w].fd||0);z=(p+z)/q;for(var B=[],E,F=n.$a(m-1),H=E=0;H<F.length;)2==E&&3==F[H]?(E=0,F=[].concat(ia(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?E++:E=0,H++;E=F;for(H=0;H<E.length;){for(F=0;255==E[H];)F+=255,H++;F+=E[H++];for(var I=0;255==E[H];)I+=255,H++;I+=E[H++];
|
|
271
|
+
4==F&&B.push(E.subarray(H,H+I));H+=I}B=t(B);for(E=B.next();!E.done;E=B.next())c.push({hg:E.value,pts:z})}else try{n.skip(m-1)}catch(J){break}C-=m+4;0==C&&(p=x.length>w?p+(x[w].de||v):p+v,w++,C=x.length>w?x[w].sampleSize||y:y)}}}).parse(a,!1);return c};var di=0,ei=1,fi=2;function gi(a){this.h=new Yh;a.includes("video/mp4")&&(this.h=new ci);this.g=new Sh}gi.prototype.init=function(a){this.h.init(a)};
|
|
272
|
+
function hi(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=N(e.hg);if(0<f.length&&(d=a.g,e=e.pts,f=new sf(f,0),181===f.Ra()&&49===f.Zd()&&1195456820===f.L()&&3===f.Ra())){var g=f.Ra();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ra(),l=(k&4)>>2,m=f.Ra(),n=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,wa:m,La:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Uh(a.g)}
|
|
273
|
+
;function ii(a,b,c,d,e){this.xa=a;this.Aa=b;this.ka=c;this.Od=void 0===d?null:d;this.timescale=e}ii.prototype.kc=function(){return this.Aa};ii.prototype.fc=function(){return this.ka};function ji(a,b){return a&&b?a.kc()==b.kc()&&a.fc()==b.fc()&&gb(a.xa(),b.xa()):a==b}L("shaka.media.InitSegmentReference",ii);ii.prototype.getEndByte=ii.prototype.fc;ii.prototype.getStartByte=ii.prototype.kc;
|
|
274
|
+
function ki(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?li:q;this.startTime=a;this.j=this.endTime=b;this.s=c;this.Aa=d;this.ka=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.o=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v;this.m=null}r=ki.prototype;r.xa=function(){return this.s()};r.getStartTime=function(){return this.startTime};r.Df=function(){return this.endTime};
|
|
275
|
+
r.kc=function(){return this.Aa};r.fc=function(){return this.ka};r.Uf=function(){return this.tilesLayout};r.Tf=function(){return this.o};r.Db=function(){return this.status};r.ag=function(){this.status=mi};r.Xe=function(a){this.m=a};r.Rf=function(){return this.m};L("shaka.media.SegmentReference",ki);ki.prototype.getThumbnailSprite=ki.prototype.Rf;ki.prototype.setThumbnailSprite=ki.prototype.Xe;ki.prototype.markAsUnavailable=ki.prototype.ag;ki.prototype.getStatus=ki.prototype.Db;
|
|
276
|
+
ki.prototype.getTileDuration=ki.prototype.Tf;ki.prototype.getTilesLayout=ki.prototype.Uf;ki.prototype.getEndByte=ki.prototype.fc;ki.prototype.getStartByte=ki.prototype.kc;ki.prototype.getEndTime=ki.prototype.Df;ki.prototype.getStartTime=ki.prototype.getStartTime;ki.prototype.getUris=ki.prototype.xa;var li=0,mi=1;ki.Status={Gg:li,ph:mi,Wg:2};function ni(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 oi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function pi(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)}
|
|
277
|
+
function qi(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(ri(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 si(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ri(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ri(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};/*
|
|
278
|
+
@license
|
|
279
|
+
Shaka Player
|
|
280
|
+
Copyright 2022 Google LLC
|
|
281
|
+
SPDX-License-Identifier: Apache-2.0
|
|
282
|
+
*/
|
|
283
|
+
function ti(){}function ui(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
284
|
+
function vi(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=xc(N(a.data,1,c));a=xc(N(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=xc(N(a.data,1,c));a=xc(N(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
|
|
285
|
+
a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=xc(N(a.data,0,d));a=Fb(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=xc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Fb(a.data),b):null}
|
|
286
|
+
function wi(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=ui(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=ui(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=vi(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
|
|
287
|
+
L("shaka.util.Id3Utils",ti);ti.getID3Frames=wi;function xi(){this.o=null;this.s=!1;this.l=this.m=null;this.B=[];this.g=this.h=null;this.u=[];this.j=null;this.i=[]}
|
|
288
|
+
xi.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,yi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.o=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.o:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Fd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
|
|
289
|
+
15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.Fd&&(g.Fd=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.Fd);d&&!this.s&&(d=!1,e=b-188);this.s=!0;break;case this.l:f=
|
|
290
|
+
a.subarray(h,e+188);null==this.m&&(h=zi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.B.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=zi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.u.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
|
|
291
|
+
function zi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),wh:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
|
|
292
|
+
function Ai(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=Jc(a.i[d],c);var e=zi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:wi(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}xi.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function yi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}L("shaka.util.TsParser",xi);function Bi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Va("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Va("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Va(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
|
|
293
|
+
(this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Bi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ci(a,b){var c=Di;switch(b.mimeType){case "video/webm":c=Ei;break;case "video/mp4":c=Fi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}L("shaka.lcevc.Dil",Bi);Bi.prototype.release=Bi.prototype.release;var Di=0,Ei=1,Fi=2;function Gi(a,b,c,d){var e=this;this.j=a;this.F=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.H=!1;this.W=c||function(){};this.D=d||null;this.i={};this.u=new hf;this.o={};this.s=null;this.K=new hc;this.l=Hi(this,this.K);this.G=new ff(function(){return Ii(e)});this.N="";this.B=!1;this.X=new hc}function Hi(a,b){var c=new MediaSource;a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Ji(c);a.j.src=a.N;return c}r=Gi.prototype;r.destroy=function(){return this.G.destroy()};
|
|
294
|
+
function Ii(a){var b,c,d,e,f,g,h,k;return G(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"](Zb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.F=null;a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.s=
|
|
295
|
+
null;a.i={};a.D=null;A(l)})}
|
|
296
|
+
r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g)return e=gc,u(p,d.K,2);d.B=c;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=Uc(k.mimeType,k.codecs),f.oa==e.Z?Ki(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Oc(l,f.oa)||(d.o[f.oa]=new Nc(l),l=Rc(f.oa,l)),m=l+d.F.sourceBufferExtraFeatures,n=d.l.addSourceBuffer(m),d.u.C(n,"error",function(q){return function(){d.i[q.oa][0].p.reject(new O(2,3,3014,d.j.error?
|
|
297
|
+
d.j.error.code:0))}}(f)),d.u.C(n,"updateend",function(q){return function(){return Li(d,q.oa)}}(f)),d.h[f.oa]=n,d.M[f.oa]=l,d.i[f.oa]=[],d.P[f.oa]=!!k.drmInfos.length);A(p)})};r.configure=function(a){this.F=a};function Ki(a,b,c){a.g||(a.g=new Zc(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,ad[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Mi(a){return a.l?"ended"==a.l.readyState:!0}
|
|
298
|
+
function Ni(a,b){return b==fc?a.g.g:ni(Oi(a,b))}function Pi(a,b){return b==fc?a.g.h:oi(Oi(a,b))}function Qi(a,b,c){if(b==fc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Oi(a,b);return qi(a,c)}r.Ma=function(){var a={total:ri(this.j.buffered),audio:ri(Oi(this,"audio")),video:ri(Oi(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 Oi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
299
|
+
function Ri(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P;return G(function(K){switch(K.g){case 1:h=gc;if(b!=h.Z){K.A(2);break}if(!a.B){K.A(3);break}return u(K,a.X,4);case 4:k=K.h,a.g.s=k;case 3:return u(K,bd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return K["return"]();case 2:l=N(c);m=a.M[b];a.o[b]&&(m=a.o[b].o);0>yi(l)?Si.includes(m)&&(q=wi(l),q.length&&d&&(v={cueTime:d.startTime,data:l,frames:q,dts:d.startTime,pts:d.startTime},a.W([v],
|
|
300
|
+
0,d.endTime))):(n=Ai((new xi).parse(l)),n.length&&(p=a.h[b].timestampOffset,a.W(n,p,d?d.endTime:null)));if(!a.o[b]){e&&b==h.ua&&(a.g||Ki(a,"text/vtt",a.B),a.s||(a.s=new gi(m)),d?(y=hi(a.s,c),y.length&&(x=a.h[h.ua].timestampOffset,gd(a.g,y,d.startTime,d.endTime,x))):a.s.init(c));K.A(6);break}f&&a.o[b].g.resetCaptions();return u(K,Sc(a.o[b],c),7);case 7:w=K.h,a.g||Ki(a,"text/vtt",a.B),w.captions&&w.captions.length&&(C=a.h[h.ua].timestampOffset,z=ed(w.captions),gd(a.g,z,d?d.startTime:null,d?d.endTime:
|
|
301
|
+
null,C)),c=w.data;case 6:c=Ti(a,c,d?d.startTime:null,b);B=a.h[b];E=Ui;if(!a.B||B.mode==E||!d){K.A(8);break}F=b==h.ua||!(h.ua in a.h);if(!F){K.A(9);break}H=[B.appendWindowStart,B.appendWindowEnd];B.appendWindowStart=0;B.appendWindowEnd=Infinity;I=B.timestampOffset;B.timestampOffset=0;return u(K,Vi(a,b,function(){return Wi(a,b,c)}),10);case 10:return u(K,Vi(a,b,function(){return Xi(a,b)}),11);case 11:return B.timestampOffset=I,B.appendWindowStart=H[0],B.appendWindowEnd=H[1],J=ni(Oi(a,b)),M=(d.startTime||
|
|
302
|
+
0)-(J||0),a.X.resolve(M),u(K,Vi(a,b,function(){return Yi(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ua){K.A(9);break}return u(K,Vi(a,b,function(){a.j.currentTime-=.001;Li(a,b)}),9);case 9:B.mode=E;case 8:return d&&a.B&&b!=h.Z&&(f||g)&&(P=d.startTime,Vi(a,b,function(){return Xi(a,b)}),Vi(a,b,function(){var Y=P;0>Y&&(Y+=.001);a.h[b].timestampOffset=Y;Li(a,b)})),u(K,Vi(a,b,function(){Wi(a,b,c)}),15);case 15:A(K)}})}function Zi(a,b){var c=Pi(a,"video")||0;dd(a.g,b,c)}function $i(a){a.g&&dd(a.g,"",0)}
|
|
303
|
+
r.remove=function(a,b,c){var d=this,e;return G(function(f){e=gc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,Vi(d,a,function(){return Yi(d,a,b,c)}),0)})};function aj(a,b){var c;return G(function(d){c=gc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Vi(a,b,function(){return Yi(a,b,0,a.l.duration)}),0)})}r.flush=function(a){var b=this,c;return G(function(d){c=gc;return a==c.Z?d["return"]():u(d,Vi(b,a,function(){b.j.currentTime-=.001;Li(b,a)}),0)})};
|
|
304
|
+
function bj(a,b,c,d,e,f){var g;return G(function(h){g=gc;return b==g.Z?(f||(a.g.s=c),cd(a.g,d,e),h["return"]()):u(h,Promise.all([Vi(a,b,function(){return Xi(a,b)}),f?Promise.resolve():Vi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Li(a,b)}),Vi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Li(a,b)})]),0)})}
|
|
305
|
+
r.endOfStream=function(a){var b=this;return G(function(c){return u(c,cj(b,function(){Mi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return G(function(c){return u(c,cj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new hc};b.i[d].unshift(e)}b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function Wi(a,b,c){if("video"==b&&a.D){var d=a.D;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}
|
|
306
|
+
function Yi(a,b,c,d){d<=c?Li(a,b):a.h[b].remove(c,d)}function Xi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Li(a,b)}function Li(a,b){var c=a.i[b][0];c&&(c.p.resolve(),dj(a,b))}function Vi(a,b,c){gf(a.G);c={start:c,p:new hc};a.i[b].push(c);1==a.i[b].length&&ej(a,b);return c.p}
|
|
307
|
+
function cj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:gf(a.G);c=[];d={};for(e in a.h)d.Tb=new hc,f={start:function(l){return function(){return l.Tb.resolve()}}(d),p:d.Tb},a.i[e].push(f),c.push(d.Tb),1==a.i[e].length&&f.start(),d={Tb:d.Tb};D(k,2);return u(k,Promise.all(c),4);case 4:za(k,3);break;case 2:throw g=Aa(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)dj(a,h)}A(k)}})}function dj(a,b){a.i[b].shift();ej(a,b)}
|
|
308
|
+
function ej(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),dj(a,b)}}function Ti(a,b,c,d){var e=a.P[d];null==c&&e&&(pc()||nc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=Sg(b));return b}var Ji=window.URL.createObjectURL,Ui="sequence",Si=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.i=a;this.m=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.u=!0;this.B=0;this.D=void 0===c?!0:c;this.F=0;this.G=!1}r=T.prototype;r.getDuration=function(){return this.j};r.Jf=function(){return this.g};r.We=function(a){this.i=a};r.Ia=function(a){this.j=a};r.Of=function(){return this.i};r.Ue=function(a){this.s=a};r.xc=function(a){this.u=a};r.le=function(a){this.o=a};r.Ve=function(a){this.m=a};r.Cf=function(){return this.m};
|
|
309
|
+
r.Hb=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b=Math.min(b,d.startTime),c=Math.max(c,d.endTime),this.g=Math.max(this.g,d.endTime-d.startTime);this.Sd(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.G&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};r.Md=function(){this.G=!0};r.Sd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.Rd=function(a){this.g=Math.max(this.g,a)};
|
|
310
|
+
r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.U=function(){return Infinity==this.j&&!this.u};r.kb=function(){return Infinity!=this.j&&!this.u};r.Oa=function(){return Math.max(this.B,this.hb()-this.o)};r.Ye=function(a){this.B=a};r.hb=function(){return this.U()||this.kb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j};
|
|
311
|
+
r.jc=function(a){var b=Math.max(this.l,this.B);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.o+a,this.Na()))};r.Cb=function(){return this.jc(0)};r.Na=function(){return Math.max(0,this.hb()-(this.U()||this.kb()?this.m:0))};r.cf=function(){return null==this.i||null!=this.h&&this.D?!1:!0};r.Te=function(a){this.F=a};L("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Te;T.prototype.usingPresentationStartTime=T.prototype.cf;
|
|
312
|
+
T.prototype.getSeekRangeEnd=T.prototype.Na;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.jc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;T.prototype.setUserSeekStart=T.prototype.Ye;T.prototype.getSegmentAvailabilityStart=T.prototype.Oa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.U;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Rd;T.prototype.notifyMinSegmentStartTime=T.prototype.Sd;
|
|
313
|
+
T.prototype.lockStartTime=T.prototype.Md;T.prototype.notifySegments=T.prototype.Hb;T.prototype.getDelay=T.prototype.Cf;T.prototype.setDelay=T.prototype.Ve;T.prototype.setSegmentAvailabilityDuration=T.prototype.le;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Ue;T.prototype.getPresentationStartTime=T.prototype.Of;T.prototype.setDuration=T.prototype.Ia;T.prototype.setPresentationStartTime=T.prototype.We;T.prototype.getMaxSegmentDuration=T.prototype.Jf;
|
|
314
|
+
T.prototype.getDuration=T.prototype.getDuration;function fj(a,b,c){this.l=c;this.j=a;this.s=gj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}fj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function hj(a,b){a.i=b}function ij(a){this.g=a}function gj(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(ri(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 jj(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.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return kj(f)});this.j=(new Q(function(){kj(f)})).Ba(.25)}jj.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};jj.prototype.Vd=function(){this.l=!0;kj(this)};
|
|
315
|
+
function kj(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.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=gj(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=si(c,b,a.D.gapDetectionThreshold),null==
|
|
316
|
+
d||0==d&&!a.l||(e=c.start(d),e>=a.s.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new S("gapjumped")))))}}};function lj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=mj.value().get(b),c.na(a,b,d))}var mj=new ic(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function nj(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 oj(a);lj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){pj(d,d.j)})}nj.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 qj(a){return a.m?a.g.currentTime:a.j}function rj(a,b){0<a.g.readyState?sj(a.i,b):lj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){pj(a,a.j)})}
|
|
317
|
+
function pj(a,b){.001>Math.abs(a.g.currentTime-b)?tj(a):(a.h.na(a.g,"seeking",function(){tj(a)}),sj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function tj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function oj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}oj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
318
|
+
function sj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ba(.1)};function uj(a){this.g=a;this.j=!1;this.h=null;this.i=new hf}r=uj.prototype;r.zd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;lj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.Bd=function(a){this.h=this.j?this.h:a};r.Hc=function(){return(this.j?this.g.currentTime:this.h)||0};r.se=function(){return 0};
|
|
319
|
+
r.re=function(){return 0};r.Me=function(){};
|
|
320
|
+
function vj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=wj(a,c,f);this.j=new jj(a,b.presentationTimeline,c,this.o,f);this.h=new nj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=qj(g.h);h=xj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;rj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},yj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=qj(g.h),k=g.g.Cb(),l=g.g.Na();3>
|
|
321
|
+
l-k&&(k=l-3);h<k&&(h=xj(g,h),g.i.currentTime=h)}})}r=vj.prototype;r.zd=function(){this.m.Ba(.25)};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.u=function(){}};r.Bd=function(a){rj(this.h,a)};r.Hc=function(){var a=qj(this.h);return 0<this.i.readyState&&!this.i.paused?zj(this,a):a};r.se=function(){return this.o?this.o.o:0};r.re=function(){return this.j.u};
|
|
322
|
+
function yj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Na():0>b&&(b=a.g.Na()+b);return Aj(a,zj(a,b))}r.Me=function(){this.j.Vd()};function Aj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function xj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.jc(c),k=a.g.jc(d);c=a.g.jc(c+d);return b>=g?Aj(a,b):b>f?f:b<e?pi(a.i.buffered,k)?k:c:b>=h||pi(a.i.buffered,b)?b:c}
|
|
323
|
+
function zj(a,b){var c=a.g.Cb();if(b<c)return c;c=a.g.Na();return b>c?c:b}function wj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new fj(new ij(a),b.stallThreshold,c);hj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Bj(a){this.g=a;this.h=null;this.i=0;this.j=!1}r=Bj.prototype;r.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};r.bg=function(){this.j=!0};function Cj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b(d.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
|
|
324
|
+
r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.j)for(var b=t(this.g),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.i);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.oc=function(a){!this.j&&a.length&&(this.g=this.g.filter(function(b){return b.startTime<a[0].startTime}),this.g.push.apply(this.g,ia(a)))};
|
|
325
|
+
r.Gb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.oc(a);this.fb(b)};r.fb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
326
|
+
r.Ya=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new ki(a.startTime,b,a.s,a.Aa,a.ka,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.o,a.g,a.status,a.l))}};
|
|
327
|
+
r.gd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new Q(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.Ba(a))};Bj.prototype[Symbol.iterator]=function(){return this.Bb(0)};Bj.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.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Dj(this,b,d)};
|
|
328
|
+
function Ej(a,b,c){return new Bj([new ki(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",Bj);Bj.forSingleSegment=Ej;Bj.prototype.getIteratorForTime=Bj.prototype.Bb;Bj.prototype.updateEvery=Bj.prototype.gd;Bj.prototype.fit=Bj.prototype.Ya;Bj.prototype.evict=Bj.prototype.fb;Bj.prototype.mergeAndEvict=Bj.prototype.Gb;Bj.prototype.offset=Bj.prototype.offset;Bj.prototype.get=Bj.prototype.get;Bj.prototype.find=Bj.prototype.find;Bj.prototype.markImmutable=Bj.prototype.bg;
|
|
329
|
+
Bj.prototype.release=Bj.prototype.release;function Dj(a,b,c){this.i=a;this.g=b;this.h=c}Dj.prototype.uf=function(){return this.g};Dj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.xa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
|
|
330
|
+
Dj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.xa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",Dj);Dj.prototype.next=Dj.prototype.next;Dj.prototype.current=Dj.prototype.current;Dj.prototype.currentPosition=Dj.prototype.uf;function Fj(){Bj.call(this,[]);this.l=[]}ra(Fj,Bj);r=Fj.prototype;r.clone=function(){var a=new Fj;a.l=this.l.slice();return a};
|
|
331
|
+
r.release=function(){for(var a=t(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};r.find=function(a){for(var b=0,c=t(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};r.get=function(a){for(var b=0,c=t(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};r.offset=function(){};r.oc=function(){};r.fb=function(){};r.Gb=function(){};r.Ya=function(){};r.gd=function(){};
|
|
332
|
+
L("shaka.media.MetaSegmentIndex",Fj);Fj.prototype.updateEvery=Fj.prototype.gd;Fj.prototype.fit=Fj.prototype.Ya;Fj.prototype.mergeAndEvict=Fj.prototype.Gb;Fj.prototype.evict=Fj.prototype.fb;Fj.prototype.merge=Fj.prototype.oc;Fj.prototype.offset=Fj.prototype.offset;Fj.prototype.get=Fj.prototype.get;Fj.prototype.find=Fj.prototype.find;Fj.prototype.release=Fj.prototype.release;function Gj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Tc();this.h=new Q(function(){b.g.Le(.25*b.i)})}Gj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Gj.prototype.set=function(a){this.i=a;Hj(this)};Gj.prototype.Pc=function(){return this.g.Pc()};function Hj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Tc()!=b&&a.g.ke(b);return}catch(c){}a.h.Ba(.25);0!=a.g.Tc()&&a.g.ke(0)};function Ij(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Jj(b,!1)})).Ba(.25)}Ij.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 Jj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Kj(a){Qe.call(this);this.g=new Map;this.h=a}ra(Kj,Qe);Kj.prototype.release=function(){this.g.clear();Qe.prototype.release.call(this)};function Lj(a,b){var c=a.g.get(b);c||(c={qc:[],ye:null,contentType:b},a.g.set(b,c));return c}function Mj(a,b,c){var d=Lj(a,b.contentType);Nj(a,d);a={Od:b,position:c};d=d.qc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
333
|
+
Kj.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.qc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Od;break a}}d=null}if(e=d)e=c.ye,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);
|
|
334
|
+
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.ye=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Nj(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.qc;b.qc=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.qc=[]};function Oj(a){Qe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(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))})).Ba(2)}ra(Oj,Qe);Oj.prototype.release=function(){this.g.clear();this.h.stop();Qe.prototype.release.call(this)};function Pj(a){Qe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{rb:null,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Sj,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Tj,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Qj,qb:Sj,jb:function(c,d){return Rj(b,"exit",c,d)}},{rb:Qj,qb:Tj,jb:function(c,d){return Rj(b,"exit",c,d)}},{rb:Sj,qb:Tj,jb:function(c,d){return Rj(b,"skip",c,d)}},{rb:Tj,qb:Sj,jb:function(c,d){return Rj(b,"skip",c,d)}}];this.h=new hf;this.h.C(this.i,"regionremove",
|
|
335
|
+
function(c){b.g["delete"](c.region)})}ra(Pj,Qe);Pj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Qe.prototype.release.call(this)};Pj.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?Sj:a>d.endTime?Tj:Qj;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)}};
|
|
336
|
+
function Rj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Sj=1,Qj=2,Tj=3;function Uj(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 Vj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.D=!1;this.j=new Map;this.B=!1;this.F=null;this.s=!1;this.h=new ff(function(){return Wj(c)})}r=Vj.prototype;r.destroy=function(){return this.h.destroy()};function Wj(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Xj(e),b.push(Yj(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;A(f)})}
|
|
337
|
+
r.configure=function(a){this.i=a;this.F=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)};r.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,Zj(a),2);gf(a.h);a.B=!0;A(b)})};
|
|
338
|
+
function ak(a,b){var c,d,e,f,g,h;G(function(k){switch(k.g){case 1:return c=gc,D(k,2),u(k,aj(a.g.R,c.Z),4);case 4:za(k,3);break;case 2:if(d=Aa(k),a.g)a.g.onError(d);case 3:e=Uc(b.mimeType,b.codecs);Ki(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=bk(b),a.j.set(c.Z,h),ck(a,h,0);A(k)}})}function dk(a){var b=a.j.get(fc);b&&(Xj(b),Yj(b)["catch"](function(){}),a.j["delete"](fc));a.o=null}
|
|
339
|
+
function ek(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(fk(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,fk(a,d,!0,0,!1)}}function gk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&fk(a,b.video,c,d,e,f),b.audio&&fk(a,b.audio,c,d,e,f))}function hk(a,b){a.o=b;a.B&&fk(a,b,!0,0,!1)}
|
|
340
|
+
function fk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=fc?g&&(g.ob&&(b.trickModeVideo?(g.ob=b,b=b.trickModeVideo):g.ob=null),g.stream!=b||e)&&(b.type==fc&&Ki(a.g.R,Uc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.te=!!f,c&&(g.ac?g.jd=!0:g.Ha?(g.cb=!0,g.Mc=d,g.jd=!0):(Xj(g),ik(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),jk(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):ak(a,b)}
|
|
341
|
+
function jk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.Sc();var g=Pi(a.g.R,b.type),h=b.stream.segmentIndex.find(b.ya?b.ya.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),
|
|
342
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.sa.h.g>h?!0:!1):f=!1;f&&b.sa.abort();A(e)})}
|
|
343
|
+
r.uc=function(){for(var a=this.g.Sc(),b=t(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);c.ba=null;var e=this.g.R;d==fc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Oi(e,d),e=pi(e,a));if(!e){(null!=Pi(this.g.R,d)||c.Ha)&&kk(this,c);c.sa&&(c.sa.abort(),c.sa=null);if(d===fc&&(d=this.g.R,d.s))for(d=d.s.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Th(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Oh(e.value);c.uc=!0}}};
|
|
344
|
+
function kk(a,b){b.ac||b.cb||(b.Ha?(b.cb=!0,b.Mc=0):null==Ni(a.g.R,b.type)?null==b.Ta&&ck(a,b,0):(Xj(b),ik(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
345
|
+
function Zj(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){if(1==n.g){b=gc;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gc,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ua,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.R;f=a.i.forceTransmux;return u(n,e.init(c,f,a.m.sequenceMode),2)}gf(a.h);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=bk(l),a.j.set(k,m),ck(a,m,0));A(n)})}
|
|
346
|
+
function bk(a){return{stream:a,type:a.type,ba:null,ya:null,Zc:null,Kd:null,Jd:null,Id:null,ob:null,endOfStream:!1,Ha:!1,Ta:null,cb:!1,Mc:0,jd:!1,ac:!1,uc:!0,ae:!1,mc:!1,sa:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
|
|
347
|
+
function lk(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:gf(a.h);if(b.Ha||null==b.Ta||b.ac)return h["return"]();b.Ta=null;if(!b.cb){h.A(2);break}return u(h,ik(a,b,b.jd,b.Mc),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.Ta&&ck(a,b,0),h["return"]();case 4:D(h,6);d=mk(a,b);null!=d&&(ck(a,b,d),b.mc=!1);za(h,7);break;case 6:return e=
|
|
348
|
+
Aa(h),u(h,nk(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:gf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
|
|
349
|
+
function mk(a,b){if(ok(b))return Zi(a.g.R,b.stream.originalId||""),null;b.type==fc&&$i(a.g.R);var c=a.g.Sc(),d=b.ya?b.ya.endTime:c,e=Qi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Pi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(fc))&&ok(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=pk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
|
|
350
|
+
f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,ok(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.ya?h.ya.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;qk(a,b,c,e)["catch"](function(){});return null}
|
|
351
|
+
function pk(a,b,c,d){if(b.ba)return b.ba.current();if(b.ya||d)return b.ba=b.stream.segmentIndex.Bb(b.ya?b.ya.endTime:d),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Bb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Bb(c),e=b.ba&&b.ba.next().value);return e}
|
|
352
|
+
function qk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:e=gc;f=b.stream;g=b.ba;b.Ha=!0;D(z,2);if(2==d.Db())throw new O(1,1,1011);return u(z,rk(a,b,d),4);case 4:gf(a.h);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),q=p=!1,v=function(B){var E,F,H;return G(function(I){if(p)return I["return"]();q=!0;gf(a.h);if(a.s)return I["return"]();n=sk(n,B);E=
|
|
353
|
+
!1;F=0;(new vf).box("mdat",function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return I.A(0);H=n.subarray(0,F);n=n.subarray(F);return u(I,tk(a,b,c,f,d,H),0)})},u(z,uk(a,b,d,v),11);l=uk(a,b,d);return u(z,l,7);case 7:m=z.h;gf(a.h);if(a.s)return z["return"]();if(!d.l){z.A(8);break}return u(z,vk(m,d,g),9);case 9:m=z.h;case 8:return gf(a.h),b.cb?(b.Ha=!1,ck(a,b,0),z["return"]()):u(z,tk(a,b,c,f,d,m),6);case 11:y=z.h;if(q){z.A(6);break}p=!0;gf(a.h);return a.s?z["return"]():b.cb?(b.Ha=!1,ck(a,b,0),z["return"]()):
|
|
354
|
+
u(z,tk(a,b,c,f,d,y),6);case 6:gf(a.h);if(a.s)return z["return"]();b.ya=d;g.next();b.Ha=!1;b.ae=!1;x=a.g.R.Ma();w=x[b.type];$a(JSON.stringify(w));b.cb||a.g.Vd(d.startTime,d.endTime,b.type);ck(a,b,0);za(z,0);break;case 2:C=Aa(z);gf(a.h,C);if(a.s)return z["return"]();b.Ha=!1;if(7001==C.code)b.Ha=!1,b.Ta=null,ck(a,b,0),z.A(0);else if(b.type==e.Z&&a.i.ignoreTextStreamFailures)a.j["delete"](e.Z),z.A(0);else if(3017==C.code)wk(a,b,C),z.A(0);else return b.mc=!0,C.severity=2,u(z,nk(a,C),0)}})}
|
|
355
|
+
function vk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=N(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h["return"](window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function sk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
356
|
+
function wk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.ae})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.mc=!0;a.s=!0;a.g.onError(c);return}b.ae=!0}ck(a,b,4)}
|
|
357
|
+
function rk(a,b,c){var d,e,f,g,h,k,l;return G(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Kd||e!=b.Jd||f!=b.Id)h=function(){var n;return G(function(p){if(1==p.g)return D(p,2),b.Jd=e,b.Id=f,b.Kd=g,u(p,bj(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return za(p,0);n=Aa(p);b.Jd=null;b.Id=null;b.Kd=null;throw n;})},d.push(h());!ji(c.h,b.Zc)&&(b.Zc=c.h)&&(k=uk(a,b,c.h),l=function(){var n,p,q,v;return G(function(y){switch(y.g){case 1:return D(y,
|
|
358
|
+
2),u(y,k,4);case 4:return n=y.h,gf(a.h),p=new vf,p.box("moov",zf).box("trak",zf).box("mdia",zf).T("mdhd",function(x){x=ai(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),q=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(y,a.g.ve(b.type,n),5);case 5:return u(y,Ri(a.g.R,b.type,n,null,q),6);case 6:za(y,0);break;case 2:throw v=Aa(y),b.Zc=null,v;}})},a.g.eg(c.startTime,c.h),d.push(l()));return u(m,Promise.all(d),0)})}
|
|
359
|
+
function tk(a,b,c,d,e,f){var g,h,k,l,m,n;return G(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.D;if(k||l)h=new vf;k&&h.T("emsg",function(q){var v=d.emsgSchemeIdUris;if(0===q.version){var y=q.reader.rc();var x=q.reader.rc();var w=q.reader.L();var C=q.reader.L();var z=q.reader.L();var B=q.reader.L();var E=e.startTime+C/w}else w=q.reader.L(),E=q.reader.ab()/w+e.timestampOffset,
|
|
360
|
+
C=E-e.startTime,z=q.reader.L(),B=q.reader.L(),y=q.reader.rc(),x=q.reader.rc();q=q.reader.$a(q.reader.S.byteLength-q.reader.$());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.fg():"https://aomedia.org/emsg/ID3"==y?(v=wi(q),v.length&&e&&a.g.gg([{cueTime:e.startTime,data:q,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/w,schemeIdUri:y,value:x,timescale:w,presentationTimeDelta:C,eventDuration:z,id:B,messageData:q}),
|
|
361
|
+
v=new S("emsg",v),a.g.onEvent(v))});l&&h.T("prft",function(q){a:{if(!a.D&&e.h.timescale){q.reader.L();var v=q.reader.L(),y=q.reader.L();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===q.version)var x=q.reader.L();else try{x=q.reader.ab()}catch(w){a.D=!0;x=void 0;break a}q=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();x=(new Map).set("detail",{wallClockTime:q,programStartDate:new Date(q-x/e.h.timescale*1E3)});x=new S("prft",x);a.g.onEvent(x);a.D=!0}x=void 0}return x});(k||l)&&h.parse(f);
|
|
362
|
+
return u(p,xk(a,b,c),2);case 2:return gf(a.h),m=b.uc,b.uc=!1,n=b.te,b.te=!1,u(p,a.g.ve(b.type,f),3);case 3:return u(p,Ri(a.g.R,b.type,f,e,g,m,n),4);case 4:gf(a.h),A(p)}})}function xk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ni(a.g.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.R.remove(b.type,e,e+g),2)}gf(a.h);A(h)})}
|
|
363
|
+
function ok(a){return a&&a.type==fc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function uk(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=ef,f=Uj(c.xa(),c.Aa,c.ka,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ii,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.sa=h,u(l,h.promise,2);k=l.h;b.sa=null;return l["return"](k.data)})}
|
|
364
|
+
function ik(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.cb=!1,b.jd=!1,b.Mc=0,b.ac=!0,b.ya=null,b.Zc=null,b.ba=null,d?(e=a.g.Sc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,aj(a.g.R,b.type),4);if(3!=g.g)return gf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);gf(a.h);b.ac=!1;b.endOfStream=!1;ck(a,b,0);A(g)})}
|
|
365
|
+
function ck(a,b,c){var d=b.type;if(d!=fc||a.j.has(d))b.Ta=(new jc(function(){var e;return G(function(f){if(1==f.g)return D(f,2),u(f,lk(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);A(f)})})).O(c)}function Xj(a){null!=a.Ta&&(a.Ta.stop(),a.Ta=null)}function Yj(a){return G(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function nk(a,b){return G(function(c){if(1==c.g)return u(c,Ge(a.F),2);gf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);A(c)})};function yk(a,b){var c=zk(),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 Ak(d)});this.s=new ff(function(){return Bk(d)})}yk.prototype.destroy=function(){return this.s.destroy()};function Bk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Ck(a),u(e,a.u,2);a.g&&a.g.Ga.mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.mb();a.g=null;a.m=[];a.j=null;A(e)})}
|
|
366
|
+
function Dk(a,b){var c={Ib:function(){},bd:function(){},mb:function(){},onError:function(){},dd:function(){},vh:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Ck(a);return c}
|
|
367
|
+
function Ak(a){return G(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.Ga.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Ib(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ga:c.Ga}):c.Ga.dd();c=!0}c?c=Promise.resolve():a.g?c=Ek(a):(a.j.dg(a.i),a.o=new hc,c=a.o);b=u(b,c,1)}return b})}
|
|
368
|
+
function Ek(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Lf(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.xf(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.Ga.bd(),a.g=null);za(d,0);break;case 2:b=Aa(d);if(7001==b.code)a.g.Ga.mb();else a.g.Ga.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,A(d)}})}function Ck(a){a.o&&(a.o.resolve(),a.o=null)};function Fk(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=Fk.prototype;r.remove=function(a,b){if(!this.g)return!1;Gk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
349
369
|
r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
|
|
350
|
-
l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={
|
|
351
|
-
e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(
|
|
352
|
-
function
|
|
353
|
-
function
|
|
354
|
-
window&&(this.l=new ResizeObserver(function(){
|
|
355
|
-
r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=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});
|
|
356
|
-
function
|
|
357
|
-
p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.
|
|
358
|
-
function
|
|
359
|
-
"absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{
|
|
360
|
-
function
|
|
361
|
-
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";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=
|
|
362
|
-
"before"==c.displayAlign?"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=
|
|
363
|
-
f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
|
|
364
|
-
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function
|
|
365
|
-
function
|
|
370
|
+
l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={sb:f.sb},g=d.next())f.sb=g.value,a.some(function(h){return function(k){return k.startTime==h.sb.startTime&&k.endTime==h.sb.endTime&&k.text==h.sb.payload?!0:!1}}(f))||(g=Hk(f.sb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
|
|
371
|
+
e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Gk(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"};
|
|
372
|
+
function Hk(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}
|
|
373
|
+
function Gk(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}L("shaka.text.SimpleTextDisplayer",Fk);Fk.prototype.setTextVisibility=Fk.prototype.setTextVisibility;Fk.prototype.isTextVisible=Fk.prototype.isTextVisible;Fk.prototype.destroy=Fk.prototype.destroy;Fk.prototype.append=Fk.prototype.append;Fk.prototype.remove=Fk.prototype.remove;function Ik(){}function Jk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Ik);Ik.removeAllChildren=Jk;function Kk(a,b){var c=this;this.j=!1;this.i=[];this.B=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.u=(new Q(function(){Lk(c)})).Ba(.25);this.h=new Map;this.s=new hf;this.s.C(document,"fullscreenchange",function(){Lk(c,!0)});this.l=null;"ResizeObserver"in
|
|
374
|
+
window&&(this.l=new ResizeObserver(function(){Lk(c,!0)}),this.l.observe(this.g));this.o=new Map}r=Kk.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Bc:c.Bc},d=a.next())c.Bc=d.value,b.some(function(e){return function(f){return tb(f,e.Bc)}}(c))||this.i.push(c.Bc);Lk(this)};
|
|
375
|
+
r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=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});Lk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
|
|
376
|
+
function Mk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.df:null;l&&(g.push(l.Cd),l.sc&&g.push(l.sc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Nk(a,k,e),l=a.h.get(k),n=l.df,f=!0));0<k.nestedCues.length&&n&&Mk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=q.startTime?
|
|
377
|
+
p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.sc?(c.appendChild(d.sc),d.sc.appendChild(d.Cd)):c.appendChild(d.Cd)}}function Lk(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())Jk(e.value);Jk(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Mk(a,a.i,a.g,c,[])}}}
|
|
378
|
+
function Nk(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&&Ok(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position=
|
|
379
|
+
"absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Cd:f,df:e,sc:c})}
|
|
380
|
+
function Ok(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=Pk(c.linePadding,c,a.m);f.paddingRight=Pk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
381
|
+
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";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=Qk(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=
|
|
382
|
+
"before"==c.displayAlign?"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=Pk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==
|
|
383
|
+
pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==mb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
|
|
384
|
+
f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function Pk(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}}
|
|
385
|
+
function Qk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}L("shaka.text.UITextDisplayer",Kk);Kk.prototype.setTextVisibility=Kk.prototype.setTextVisibility;Kk.prototype.isTextVisible=Kk.prototype.isTextVisible;Kk.prototype.remove=Kk.prototype.remove;Kk.prototype.destroy=Kk.prototype.destroy;Kk.prototype.append=Kk.prototype.append;function Rk(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
|
|
366
386
|
"");k=k.reduceRight(function(p,q){return p+"</"+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 lb:k.push("align:middle");
|
|
367
|
-
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}
|
|
368
|
-
function
|
|
369
|
-
function
|
|
370
|
-
function
|
|
371
|
-
function
|
|
372
|
-
function
|
|
373
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
374
|
-
function
|
|
375
|
-
function
|
|
376
|
-
k),g=!1)}return g}function
|
|
377
|
-
function
|
|
387
|
+
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}L("shaka.text.WebVttGenerator",function(){});function Sk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Tk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Uk:Vk};d.ot=Wk(c);var e=d.ot===Xk||d.ot===Yk||d.ot===Zk||d.ot===$k;e&&(d.bl=al(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==$k&&(d.tb=bl(a,d.ot)/1E3);cl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
|
|
388
|
+
function dl(a,b,c){try{if(!a.g.enabled)return b;var d=el(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Zk;break a;case "application/x-mpegurl":e=fl;break a}e=void 0}d.ot=e;d.su=!0;var f=gl(d);return hl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function el(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}}
|
|
389
|
+
function cl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,el(a));c.pr=a.h.Rc();var e=c.ot===Xk||c.ot===Zk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=il(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=gl(c);f&&(b.uris=b.uris.map(function(g){return hl(g,f)}))}}}
|
|
390
|
+
function Wk(a){var b=a.type;if(a.init)return jl;if("video"==b)return a.codecs.includes(",")?Zk:Xk;if("audio"==b)return Yk;if("text"==b)return"application/mp4"===a.mimeType?$k:kl}function al(a,b){var c=a.h.Ma()[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}
|
|
391
|
+
function bl(a,b){var c=a.h.Pa();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 Xk:return d.videoBandwidth||NaN;case Yk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
392
|
+
function gl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=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"===
|
|
393
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function il(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=gl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
394
|
+
function hl(a,b){if(!b||a.includes("offline:"))return a;var c=new Jb(a);c.g.set("CMCD",b);return c.toString()}var fl="m",Yk="a",Xk="v",Zk="av",jl="i",kl="c",$k="tt",Vk="v",Uk="l";L("shaka.util.CmcdManager.StreamingFormat",{Kg:"d",Sg:"h",eh:"s",Zg:"o"});function ll(){}
|
|
395
|
+
function ml(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=ml(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 "+
|
|
396
|
+
k),g=!1)}return g}function nl(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 ol(a,b){return a&&b}L("shaka.util.ConfigUtils",ll);ll.convertToConfigObject=nl;ll.mergeConfigObjects=ml;function pl(){}
|
|
397
|
+
function ql(){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 ol([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:nc()},c={retryParameters:Fe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
|
|
378
398
|
dash:{clockSyncUri:"",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",
|
|
379
|
-
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return
|
|
380
|
-
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,
|
|
381
|
-
0;var e={trackSelectionCallback:function(g){return
|
|
382
|
-
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},restrictToElementSize:!1,
|
|
383
|
-
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,
|
|
384
|
-
|
|
385
|
-
function
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
d.set(this.
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
a
|
|
394
|
-
r.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
function
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
function
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
function
|
|
407
|
-
function
|
|
408
|
-
(a.
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
a.s.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
a
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
function
|
|
420
|
-
|
|
421
|
-
function
|
|
422
|
-
function
|
|
423
|
-
function
|
|
424
|
-
function
|
|
425
|
-
function
|
|
426
|
-
function
|
|
427
|
-
function
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
function
|
|
431
|
-
|
|
432
|
-
r.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
r.
|
|
437
|
-
r.
|
|
438
|
-
r.
|
|
439
|
-
|
|
440
|
-
r.
|
|
441
|
-
r.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
r.
|
|
446
|
-
|
|
447
|
-
r.
|
|
448
|
-
|
|
449
|
-
r.
|
|
450
|
-
r.
|
|
451
|
-
r.
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
r.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
function
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
function
|
|
467
|
-
|
|
468
|
-
function
|
|
469
|
-
|
|
470
|
-
function
|
|
471
|
-
function
|
|
472
|
-
function
|
|
473
|
-
function
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
function
|
|
477
|
-
function
|
|
478
|
-
function
|
|
479
|
-
function
|
|
480
|
-
|
|
481
|
-
function
|
|
482
|
-
|
|
483
|
-
function
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
U.
|
|
494
|
-
U.
|
|
495
|
-
|
|
496
|
-
|
|
399
|
+
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return ol([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Fe(),
|
|
400
|
+
failureCallback:function(g){return ol([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!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,
|
|
401
|
+
parsePrftBox:!1};if(oc("Web0S")||pc()||oc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return G(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return G(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 ol([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
|
|
402
|
+
streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new ie},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},restrictToElementSize:!1,
|
|
403
|
+
restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,
|
|
404
|
+
textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h["return"](rl(g,f.preferredAudioLanguage))})};return f}
|
|
405
|
+
function sl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return ml(a,b,c||ql(),d,"")}
|
|
406
|
+
function rl(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=qd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return jd(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/
|
|
407
|
+
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!=fc&&"image"!=g.type||c.push(g);return c}L("shaka.util.PlayerConfiguration",pl);pl.mergeConfigObjects=sl;pl.createDefault=ql;function tl(){this.g=null;this.h=[]}function ul(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 vl(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}
|
|
408
|
+
function wl(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 xl(){this.i=this.h=null;this.g=[]}function yl(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 zl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.N=this.P=this.H=this.K=this.M=this.l=this.o=NaN;this.g=new tl;this.h=new xl};function U(a,b){Qe.call(this);var c=this;this.l=Al;this.Oc=this.g=null;this.ha=!1;this.Wc=new hf;this.Mb=new hf;this.s=new hf;this.Wb=this.i=this.Xc=this.K=this.j=this.ta=this.M=this.bf=this.W=this.Yc=this.N=this.Uc=this.H=this.wb=this.B=this.G=this.m=this.D=null;this.cc=!1;this.Nd=this.u=null;this.Xd=1E9;this.h=Bl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ka=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.ub=this.h.preferredTextLanguage;
|
|
409
|
+
this.$b=this.h.preferredTextRole;this.Zb=this.h.preferForcedSubs;this.Xb=[];this.ec=null;b&&b(this);this.D=Cl(this);this.D.ie(this.h.streaming.forceHTTPS);this.F=null;Dl&&(this.F=Dl());this.Wc.C(window,"online",function(){c.be()});this.P={name:"detach"};this.X={name:"attach"};this.ea={name:"unload"};this.Yd={name:"manifest-parser"};this.Wd={name:"manifest"};this.vb={name:"media-source"};this.Qd={name:"drm-engine"};this.ca={name:"load"};this.ce={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};
|
|
410
|
+
var d=new Map;d.set(this.X,function(e,f){return Le(El(c,e,f))});d.set(this.P,function(e){e.J&&(c.Mb.nb(),e.J=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Le(e)});d.set(this.ea,function(e){return Le(Fl(c,e))});d.set(this.vb,function(e){e=Gl(c,e);return Le(e)});d.set(this.Yd,function(e,f){var g=Hl(c,e,f);return Le(g)});d.set(this.Wd,function(e){return Il(c,e)});d.set(this.Qd,function(e){e=Jl(c,e);return Le(e)});d.set(this.ca,function(e,f){return Le(Kl(c,e,f))});d.set(this.ce,function(e,
|
|
411
|
+
f){var g=Ll(c,e,f);return Le(g)});d.set(this.xb,function(e,f){return Ml(c,e,f)});this.Ea=new yk(this.P,{Lf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.J!=h.J?c.P:g==c.X?c.X:g==c.vb||g==c.ca?c.vb:g==c.xb?c.ce:null);e==c.vb&&(k=g==c.ca&&f.J==h.J?c.Yd:c.ea);e==c.Yd&&(k=Nl(c.ca,c.Wd,c.ea,g,f,h));e==c.Wd&&(k=Nl(c.ca,c.Qd,c.ea,g,f,h));e==c.Qd&&(k=Nl(c.ca,c.ca,c.ea,g,f,h));e==c.ce&&(k=g==c.xb&&f.J==h.J?c.xb:c.ea);if(e==c.ca||e==c.xb)k=c.ea;e==c.ea&&(k=h.J&&f.J==h.J?c.X:c.P);
|
|
412
|
+
return k},xf:function(e,f,g){c.dispatchEvent(Ol("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,Fl(c,e),2):f["return"](e.J?c.X:c.P)})},dg:function(e){c.dispatchEvent(Ol("onstateidle",(new Map).set("state",e.name)))}});this.$e=new Q(function(){Hd(c.i.variants,c.h.restrictions,c.dc)&&Pl(c)});a&&this.Yb(a,!0)}ra(U,Qe);function Ql(a){null!=a.M&&(a.M.release(),a.M=null)}
|
|
413
|
+
function Rl(a,b){if(b.lcevc.enabled){var c=a.Pa();c&&c[0]&&c[0].videoMimeType==Sl.ts&&(navigator.userAgent.match(/Edge?\//)||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Va("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));Ql(a);null==a.M&&(a.M=new Bi(a.g,a.bf,b.lcevc),a.G&&(a.G.D=a.M))}else Ql(a)}function Ol(a,b){return new S(a,b)}r=U.prototype;
|
|
414
|
+
r.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==Tl)return c["return"]();Ql(a);a.l=Tl;b=Dk(a.Ea,function(){return{node:a.P,payload:zk(),ib:!1}});return u(c,new Promise(function(d){b.Ib=function(){};b.bd=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.dd=function(){d()}}),2);case 2:return u(c,a.Ea.destroy(),3);case 3:a.Wc&&(a.Wc.release(),a.Wc=null);a.Mb&&(a.Mb.release(),a.Mb=null);a.s&&(a.s.release(),a.s=null);a.Nd=null;a.u=null;a.h=null;a.o=null;
|
|
415
|
+
a.Oc=null;a.W=null;if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Qe.prototype.release.call(a),A(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==Tl)return Promise.reject(Ul());var c=zk();c.J=a;kc()||(b=!1);var d=b?this.vb:this.X,e=Dk(this.Ea,function(){return{node:d,payload:c,ib:!1}});e.Ib=function(){};return Vl(e)};r.kf=function(a){this.bf=a};
|
|
416
|
+
r.detach=function(){var a=this;if(this.l==Tl)return Promise.reject(Ul());var b=Dk(this.Ea,function(){return{node:a.P,payload:zk(),ib:!1}});b.Ib=function(){};return Vl(b)};r.pe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Tl)return Promise.reject(Ul());this.cc=!1;kc()||(a=!1);Ql(this);var c=zk(),d=Dk(this.Ea,function(e){var f=e.J&&a?b.vb:e.J?b.X:b.P;c.J=e.J;return{node:f,payload:c,ib:!1}});d.Ib=function(){};return Vl(d)};r.Eg=function(a){this.ec=a};
|
|
417
|
+
r.load=function(a,b,c){var d=this;this.ec=null;this.cc=!1;if(this.l==Tl)return Promise.reject(Ul());this.dispatchEvent(Ol("loading"));var e=zk();e.uri=a;e.me=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Wl(this,e)?this.xb:this.ca,g=Dk(this.Ea,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,ib:!0}});this.o=new zl;this.W=Xl(this);g.Ib=function(){};return new Promise(function(h,k){g.dd=function(){return k(new O(2,7,7002))};g.bd=function(){h();d.dispatchEvent(Ol("loaded"))};
|
|
418
|
+
g.mb=function(){return k(Ul())};g.onError=function(l){return k(l)}})};function Wl(a,b){if(!kc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Pg(d),c=Sl[c]);if(c){if(""==(b.J||mc()).canPlayType(c))return!1;if(!kc()||!(c in Og||Pg(d)in Qg)||a.h.streaming.preferNativeHls)return!0;if(rc())return a.h.streaming.useNativeHlsOnSafari}return!1}function El(a,b,c){null==b.J&&(b.J=c.J,a.Mb.C(b.J,"error",function(){var d=Yl(a);d&&Zl(a,d)}));a.g=b.J;return Promise.resolve()}
|
|
419
|
+
function Fl(a,b){var c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return a.l!=Tl&&(a.l=Al),c=a.Xb.map(function(p){return p()}),a.Xb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Ol("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.s.nb();a.$e.stop();a.wb&&(a.wb.release(),a.wb=null);a.Uc&&(a.Uc.stop(),a.Uc=null);if(!a.K){n.A(3);break}return u(n,a.K.stop(),4);case 4:a.K=null,a.Xc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
|
|
420
|
+
a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.B&&(a.B.release(),a.B=null);if(!a.G){n.A(9);break}return u(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.J||!b.J.src){n.A(11);break}return u(n,new Promise(function(p){return(new Q(p)).O(.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){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Wb=null;a.N=null;if(a.i){d=
|
|
421
|
+
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.o=new zl;a.Td=null;$l(a);A(n)}})}
|
|
422
|
+
function Gl(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.Td=c,e=am(b.J,d,function(k,l,m){bm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.K,2);a.G=e;A(h)})}
|
|
423
|
+
function Hl(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.D,a.Wb=d,f=a,u(h,Ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Xc=h.h;a.K=a.Xc();g=Re(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.K.configure(g);A(h)})}
|
|
424
|
+
function Il(a,b){var c=b.uri,d=a.D;a.Yc=new Oj(function(){return a.tc()});a.Yc.addEventListener("regionadd",function(g){g=g.region;cm(a,"timelineregionadded",g);if(a.F)a.F.onDashTimedMetadata(g)});a.ta=null;a.h.streaming.observeQualityChanges&&(a.ta=new Kj(function(){return a.Ma()}),a.ta.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,
|
|
425
|
+
height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Ol("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,cl(k,g,{ot:fl,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Tk(a.W,g,h)},filter:function(g){return dm(a,g)},makeTextStreamsForClosedCaptions:function(g){return em(a,
|
|
426
|
+
g)},onTimelineRegionAdded:function(g){var h=a.Yc;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 Zl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
|
|
427
|
+
enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(g){var h=a.m?a.m.g:null;h&&a.m.u&&fm(a,h.keySystem,g)}},f=Date.now()/1E3;return new He(function(){var g,h,k,l;return G(function(m){if(1==m.g)return g=a,u(m,a.K.start(c,e),2);g.i=m.h;h=Ol("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);gm(a.i);k=Date.now()/1E3;l=k-f;a.o.F=l;A(m)})}(),function(){return a.K.stop()})}
|
|
428
|
+
function Jl(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=hm(a,{lb:a.D,onError:function(f){Zl(a,f)},cd:function(f){im(a,f)},onExpirationUpdated:function(f,g){jm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,hg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.J),3):u(e,dm(a,a.i),0)})}
|
|
429
|
+
function Kl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:b.startTime=c.startTime;null!=a.ec&&(b.startTime=a.ec,a.ec=null);d=b.J;e=b.uri;a.Wb=e;a.H=new Gj({Tc:function(){return d.playbackRate},Pc:function(){return d.defaultPlaybackRate},ke:function(E){d.playbackRate=E},Le:function(E){d.currentTime+=E}});f=function(){return km(a)};g=function(){return lm(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);Rl(a,a.h);h=a.h.abrFactory;
|
|
430
|
+
a.u&&a.Nd==h||(a.Nd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(ne("AbrManager","Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new we(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.ub=a.h.preferredTextLanguage;a.$b=a.h.preferredTextRole;a.Zb=a.h.preferForcedSubs;mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(E,F,H){a.j&&E!=a.j.l&&nm(a,E,!0,void 0===
|
|
431
|
+
F?!1:F,void 0===H?0:H)});a.u.setMediaElement(d);td(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=om(a);a.j.configure(a.h.streaming);a.l=pm;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":qm(a,E)}});a.dispatchEvent(Ol("streaming"));k=null;(l=a.Pa().find(function(E){return E.active}))||(k=Pl(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=
|
|
432
|
+
q.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){B.A(2);break}return u(B,Promise.all(m),2);case 2:a.B=rm(a,b.startTime);a.wb=sm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);tm(a,y);if(l){B.A(4);break}nm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.A(5);break}x=a.B.Hc();return u(B,um(k,x),6);case 6:w=B.h,a.B.Bd(w);case 5:vm(a,null,Wd(k));case 4:return a.B.zd(),C=a.Eb().find(function(E){return E.active}),C||((z=fe(a.i.textStreams,a.ub,a.$b,a.Zb)[0]||
|
|
433
|
+
null)&&yl(a.o.h,z,!0),k&&(z?(k.audio&&wm(a,k.audio,z)&&(a.ha=!0),a.ha&&a.G.m.setTextVisibility(!0),xm(a)):a.ha=!1),z&&(a.h.streaming.alwaysStreamText||a.Hd())&&hk(a.j,z)),u(B,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),ym(a)),Kd(a.j?a.j.l:null,a.i),zm(a.i),Am(a),Bm(a),a.i.variants.some(function(E){return E.primary}),a.cc=!0,a.s.na(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.me}),A(B)}})}
|
|
434
|
+
function Ll(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=gc,e=Date.now()/1E3,f=!0,a.m=hm(a,{lb:a.D,onError:function(n){Zl(a,n)},cd:function(n){im(a,n)},onExpirationUpdated:function(n,p){jm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Pg(g),k=Sl[h],"application/x-mpegurl"==k&&rc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
435
|
+
primary:!1,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?Yc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
436
|
+
a.m.W=!0,u(m,hg(a.m,[l],[]),2)):u(m,a.m.Yb(b.J),0)})}
|
|
437
|
+
function Ml(a,b,c){function d(){return km(a)}b.uri=c.uri;b.startTime=c.startTime;a.Wb=b.uri;var e=b.J;a.B=new uj(e);var f=!1;a.Xb.push(function(){f=!0});null!=b.startTime&&a.B.Bd(b.startTime);a.H=new Gj({Tc:function(){return e.playbackRate},Pc:function(){return e.defaultPlaybackRate},ke:function(k){e.playbackRate=k},Le:function(k){e.currentTime+=k}});tm(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return lm(a)});"none"!=
|
|
438
|
+
e.preload&&a.s.na(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.me});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return Am(a)}),a.s.C(e.audioTracks,"removetrack",function(){return Am(a)}),a.s.C(e.audioTracks,"change",function(){return Am(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Cm(a,k);break;case "chapters":qm(a,k);break;default:Am(a)}}),a.s.C(e.textTracks,"removetrack",function(){return Am(a)}),a.s.C(e.textTracks,
|
|
439
|
+
"change",function(){return Am(a)}));var g=Pg(b.uri);e.src=dl(a.W,b.uri,Sl[g]);(pc()||oc("Web0S"))&&e.load();a.l=Dm;a.dispatchEvent(Ol("streaming"));var h=new hc;lj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.zd();h.resolve()});lj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return G(function(l){if(1==l.g)return Em(a),k=Fm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.na(e.textTracks,"change",m);(new Q(m)).O(1)}),2);if(f)return l["return"]();
|
|
440
|
+
Gm(a);A(l)})});e.error?h.reject(Yl(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.s.na(e,"error",function(){h.reject(Yl(a))});return(new He(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})).Y(function(){a.cc=!0})}
|
|
441
|
+
function Em(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.fe(b);var c=a.h.preferredVariantRole;""!=c&&a.fe(b,c)}}function Gm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ge(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ge(b,d,c)}}
|
|
442
|
+
function Cm(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hm(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Im(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().O(.5);a.Xb.push(function(){c.stop()})}}
|
|
443
|
+
function bm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Hm(a,f,g,"org.id3",k.value);if(a.F)a.F.onHlsTimedMetadata(e,f)}}function Hm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ol("metadata",b))}
|
|
444
|
+
function qm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Lb().O(.5);a.Xb.push(function(){c.stop()})}}function gm(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 hm(a,b){return new ag(b,a.h.drm.updateExpirationTime)}
|
|
445
|
+
function Cl(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(Ol("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Ol("downloadfailed",b))})}
|
|
446
|
+
function rm(a,b){return new vj(a.g,a.i,a.h.streaming,b,function(){a.wb&&Jj(a.wb,!0);a.j&&a.j.uc();a.N&&Jm(a)},function(c){return a.dispatchEvent(c)})}
|
|
447
|
+
function sm(a){var b=new Pj(a.Yc);b.addEventListener("enter",function(d){cm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){cm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(cm(a,"timelineregionenter",e),cm(a,"timelineregionexit",e))});var c=new Ij(a.g);c.g.add(b);a.ta&&c.g.add(a.ta);return c}function tm(a,b){a.N=new Ae;a.N.g=Ce;De(a.N,b,Math.min(.5,b/2));$l(a);a.Uc=(new Q(function(){Jm(a)})).Ba(.25)}
|
|
448
|
+
function Jm(a){switch(a.l){case Dm:if(a.g.ended)var b=!0;else{var c=oi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case pm:a:if(a.g.ended||Mi(a.G))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.hb();var d=oi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=qi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Be:Ce;c.g=d;b!=d&&$l(a)}function am(a,b,c,d){return new Gi(a,b,c,d)}
|
|
449
|
+
function Xl(a){return new Sk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Pa:function(){return a.Pa()},Rc:function(){return a.Rc()},U:function(){return a.U()}},a.h.cmcd)}
|
|
450
|
+
function om(a){return new Vj(a.i,{Sc:function(){return a.B?a.B.Hc():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Tk(a.W,b,c)},R:a.G,lb:a.D,onError:function(b){return Zl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},fg:function(){a.K&&a.K.update&&a.K.update()},Vd:function(b,c,d){a.B&&a.B.Me();Jm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Ol("segmentappended",b))},eg:function(b,c){var d=c.Od;d&&a.ta&&
|
|
451
|
+
Mj(a.ta,d,b)},ve:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=new Ef(N(c)),f=0,g=t(e.data),h=g.next();!h.done;h=g.next())f+=h.value.length;if(0==f)d=Promise.resolve();else{f=new Uint8Array(f);g=0;e=t(e.data);for(h=e.next();!h.done;h=e.next())h=h.value,f.set(h,g),g+=h.length;qg(d,"cenc",f);d=d.o}}else d=Promise.resolve();return d},gg:function(b,c,d){bm(a,b,c,d)}})}
|
|
452
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ne("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
|
|
453
|
+
.01));var c=sl(this.h,a,Bl(this));Km(this);return c};
|
|
454
|
+
function Km(a){if(a.K){var b=Re(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Lm(a,a.i)}catch(f){Zl(a,f)}a.u&&Bm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Mm(a)}a.D&&a.D.ie(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Td!=b)){var c=b(),d=a.G,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
455
|
+
e.destroy());d.g&&(d.g.i=c);a.Td=b;a.j&&(b=a.j,(c=b.j.get(fc))&&fk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),ym(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),De(a.N,b,Math.min(.5,b/2)));a.i&&mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Bl(this);sl(a,this.h,Bl(this));return a};
|
|
456
|
+
r.Af=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.tc().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.qg=function(){for(var a in this.h)delete this.h[a];sl(this.h,Bl(this),Bl(this));Km(this)};r.Gf=function(){return this.l};r.Kf=function(){return this.g};r.ic=function(){return this.D};r.Ed=function(){return this.Wb};
|
|
457
|
+
r.Ee=function(){return this.F?this.F:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};r.Yf=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};
|
|
458
|
+
r.tc=function(){if(!this.cc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Na()}}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.Wf=function(){this.U()&&(this.g.currentTime=this.tc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.hc=function(){return this.m?this.m.hc():Infinity};
|
|
459
|
+
r.Qc=function(){return this.m?this.m.Qc():{}};r.Gd=function(){return this.N?this.N.g==Ce:!1};r.Rc=function(){return this.g?this.H?this.H.i:1:0};r.zg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==pm&&(this.u.playbackRateChanged(a),ek(this.j,1<Math.abs(a))))};r.nf=function(){var a=this.H.Pc();this.l==Dm&&this.H.set(a);this.l==pm&&(this.H.set(a),this.u.playbackRateChanged(a),ek(this.j,!1))};
|
|
460
|
+
r.Pa=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,de(e)){var f=Wd(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 ce(g)}):[]};
|
|
461
|
+
r.Eb=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=Xd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Fm(this).map(function(f){return ae(f)}):[]};r.Ef=function(){return this.i?this.i.imageStreams.map(function(a){return Yd(a)}):[]};
|
|
462
|
+
r.Sf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.A(3):u(H,d.createSegmentIndex(),3):H["return"](null):H.A(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=
|
|
463
|
+
l/n;v=m*n;y=f.j-f.startTime;x=f.o||y/v;w=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,z=Math.floor(B/m)*q);E=!1;if(F=f.m)E=!0,q=F.height,C=F.positionX,z=F.positionY,p=F.width;return H["return"]({imageHeight:l,imageWidth:k,height:q,positionX:C,positionY:z,startTime:w,duration:x,uris:f.xa(),width:p,sprite:E})}return H["return"](null)})};
|
|
464
|
+
r.Re=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&&(yl(this.o.h,b,!1),hk(this.j,b),Nm(this),this.ub=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Fm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Zd(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";Nm(this)}};
|
|
465
|
+
r.Se=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&&de(d)&&(nm(this,d,!1,b,c),this.Ka=new ve(d),Bm(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,
|
|
466
|
+
Zd(c)==a.id){Om(this,c);break}};r.zf=function(){return Pm(this.Pa())};r.Qf=function(){return Pm(this.Eb())};r.yf=function(){return Array.from(Qm(this.Pa()))};r.Pf=function(){return Array.from(Qm(this.Eb()))};
|
|
467
|
+
r.fe=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.B){this.Ka=new we(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.Ka.create(this.i.variants);c=null;d=t(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=Wd(c),this.Se(b,!0)):Mm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
|
|
468
|
+
a=jd(a);d=c=null;e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ce(f);jd(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?Om(this,d):c&&Om(this,c)}};
|
|
469
|
+
r.ge=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.ub=a,this.$b=b||"",this.Zb=c,(a=fe(this.i.textStreams,this.ub,this.$b,this.Zb)[0]||null)&&a!=this.j.o&&(yl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Hd()))hk(this.j,a),Nm(this)}else{var d=jd(a);(a=this.Eb().find(function(e){return jd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Re(a)}};
|
|
470
|
+
r.sg=function(a){if(this.i&&this.B){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.Ka=new we(b.language,"",0,a),Mm(this))}};r.Hd=function(){var a=this.ha;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Fm(this).some(function(b){return"showing"==b.mode}):a};r.Fe=function(){return this.g&&this.g.src&&this.g.textTracks?Rm(this).map(function(a){return ae(a)}):[]};
|
|
471
|
+
r.Bf=function(a){var b=jd(a),c=Rm(this).filter(function(g){return jd(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};
|
|
472
|
+
function Fm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Im(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Rm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
473
|
+
r.xg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==pm)this.G.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.ub,this.$b,this.Zb),0<a.length&&(hk(this.j,a[0]),Nm(this))):dk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Fm(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")}xm(this)}};
|
|
474
|
+
r.Nf=function(){if(!this.U())return null;var a=this.Ea.l,b=0;if(this.B)b=this.B.Hc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
475
|
+
r.Ge=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ma=function(){if(this.l==pm)return this.G.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==Dm&&(a.total=ri(this.g.buffered));return a};
|
|
476
|
+
r.getStats=function(){if(this.l!=pm&&this.l!=Dm)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:[]};km(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
477
|
+
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.N=this.B.re(),this.o.P=this.B.se());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.o.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.o.s=c;if(this.l==pm){if(c=this.j.l)this.o.B=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.Ge().valueOf()+
|
|
478
|
+
1E3*this.tc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==Dm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.K;var f=e.M,g=e.H,h=e.P,k=e.N,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=vl(e.g,"playing"),y=vl(e.g,"paused"),x=vl(e.g,"buffering"),w=e.s,C=e.D,z=e.G,B=wl(e.g),E=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
|
|
479
|
+
id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:v,pauseTime:y,bufferingTime:x,licenseTime:w,liveLatency:C,maxSegmentDuration:z,stateHistory:B,switchHistory:E}};
|
|
480
|
+
r.gf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:if(h.l!=pm&&h.l!=Dm)throw new O(1,7,7004);if(d){z.A(2);break}return u(z,Sm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(B){}if(h.l!=Dm){z.A(4);break}g&&(c="forced");return u(z,Tm(h,a,b,c,d,f||"",k),5);case 5:l=h.Eb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Am(h),z["return"](m);throw new O(1,2,2012);case 4:n=
|
|
481
|
+
gc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){z.A(6);break}return u(z,Um(h,a,h.D,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Vm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ji(y),d="text/vtt";case 6:x={id:h.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ej(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
|
|
482
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Uc(x.mimeType,x.codecs);C=$c(w);if(!C)throw new O(2,2,2014,d);h.i.textStreams.push(x);Am(h);return z["return"](Xd(x))}})};
|
|
483
|
+
r.hf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:if(c.l!=pm&&c.l!=Dm)throw new O(1,7,7004);if(c.l==Dm)throw new O(1,2,2016);if(b){z.A(2);break}return u(z,Sm(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=gc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new O(1,4,4045);return u(z,Um(c,a,c.D,c.h.streaming.retryParameters),4);case 4:f=z.h;g=ad[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
|
|
484
|
+
segmentEnd:e,vttOffset:0};l=N(f);m=h.parseMedia(l,k);n=[];p={};q=t(m);for(v=q.next();!v.done;p={Qb:p.Qb},v=q.next())y=v.value,p.Qb=ac([a],[y.payload])[0],x=new ki(y.startTime,y.endTime,function(B){return function(){return[B.Qb]}}(p),0,null,null,0,0,Infinity),p.Qb.includes("#xywh")&&(w=p.Qb.split("#xywh=")[1].split(","),4===w.length&&x.Xe({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),n.push(x);C={id:c.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
485
|
+
segmentIndex:new Bj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Vb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);Am(c);return z["return"](Yd(C))}})};
|
|
486
|
+
r.ff=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=pm&&d.l!=Dm)throw new O(1,7,7004);if(c){k.A(2);break}return u(k,Sm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,Tm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Fe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.na(f,"load",l);d.s.na(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
487
|
+
case 5:throw new O(1,2,2012);}})};function Sm(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=Pg(b);if(d=Wm[c])return e["return"](d);D(e,2);return u(e,Rg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;za(e,3);break;case 2:Aa(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
|
|
488
|
+
function Tm(a,b,c,d,e,f,g){var h,k,l,m;return G(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Um(a,b,a.D,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=Vm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ji(l),e="text/vtt");m=document.createElement("track");var p=a.W,q=b;try{if(p.g.enabled){var v=el(p);v.ot=kl;v.su=!0;var y=gl(v);var x=hl(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
489
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function Um(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=ef;f=Ze([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&cl(k,f,{ot:kl,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)})}
|
|
490
|
+
function Vm(a,b,c,d){var e=ad[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=N(b),b=c.parseMedia(b,a),Rk(b,d);throw new O(2,2,2014,c);}r.je=function(a,b){this.dc.width=a;this.dc.height=b};r.be=function(a){if(this.l==pm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,d.mc&&(d.mc=!1,ck(b,d,a));b=!0}}else b=!1;return b};
|
|
491
|
+
r.Hf=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.If=function(){return this.Xc};
|
|
492
|
+
function Bl(a){var b=ql();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.be(d))}};b.textDisplayFactory=function(){return a.Oc?new Kk(a.g,a.Oc):new Fk(a.g)};return b}r.Ze=function(a){this.Oc=a};
|
|
493
|
+
function em(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 Fj;h={id:a.Xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
494
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:fc,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 dm(a,b){return G(function(c){if(1==c.g)return u(c,Xm(a,b),2);Lm(a,b);A(c)})}
|
|
495
|
+
function Xm(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Id(c,b),2);zm(b);A(d)})}function Lm(a,b){if(a.l!=Tl){Hd(b.variants,a.h.restrictions,a.dc)&&a.j&&Am(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,fm(a,c.keySystem,e.video),fm(a,c.keySystem,e.audio);Ym(a,b)}}
|
|
496
|
+
function fm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,qg(a.m,e.initDataType,e.initData)}}}
|
|
497
|
+
function um(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return G(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.Bb(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["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)})}
|
|
498
|
+
function $l(a){var b=a.Gd();if(a.o&&a.N&&a.B){var c=a.H;c.j=b;Hj(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);km(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ol("buffering",b))}function lm(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Ol("ratechange"),a.dispatchEvent(b))}function km(a){if(a.o&&a.N){var b=a.o.g;a.N.g==Ce?ul(b,"buffering"):a.g.paused?ul(b,"paused"):a.g.ended?ul(b,"ended"):ul(b,"playing")}}
|
|
499
|
+
function Bm(a){try{Ym(a,a.i)}catch(c){return Zl(a,c),!1}var b=a.i.variants.filter(function(c){return de(c)});b=a.Ka.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Pl(a){return Bm(a)?a.u.chooseVariant():null}function Mm(a){var b=Pl(a);b&&nm(a,b,!0,!0,0)}
|
|
500
|
+
function nm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&gk(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));gk(a.j,b,d,e,void 0,c);d=null;f&&(d=Wd(f));b=Wd(b);c?vm(a,d,b):Zm(a,d,b)}}function Om(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=ce(c);var d=ce(b);Zm(a,c,d)}
|
|
501
|
+
function wm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=jd(a.h.preferredTextLanguage);c=jd(c.language);if(2==a.h.autoShowText)return id(c,d);if(3==a.h.autoShowText)return a=jd(b.language),id(c,d)&&!id(a,c);Va("Invalid autoShowText setting!");return!1}function vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ci(a.M,c);c=Ol("adaptation",b);$m(a,c)}function Am(a){var b=Ol("trackschanged");$m(a,b)}
|
|
502
|
+
function Zm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ci(a.M,c);c=Ol("variantchanged",b);$m(a,c)}function Nm(a){var b=Ol("textchanged");$m(a,b)}function xm(a){var b=Ol("texttrackvisibility");$m(a,b)}function ym(a){var b=(new Map).set("newStatus",a.h.abr.enabled);$m(a,Ol("abrstatuschanged",b))}
|
|
503
|
+
function an(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Pa().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);Hd(e.variants,a.h.restrictions,a.dc);d=Pl(a);if(!d)return!1;e=a.Ma().video.reduce(function(h,k){return h+k.end-k.start},0);nm(a,d,!1,!0,e);a.$e.O(c);return!0}
|
|
504
|
+
function Zl(a,b){if(a.l!=Tl)if(an(a,b))b.handled=!0;else{var c=Ol("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function cm(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(Ol(b,c))}
|
|
505
|
+
function Yl(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 O(2,3,3016,b,c,a.g.error.message)}
|
|
506
|
+
function im(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&&!bn.includes(l)}h!=f.allowedByKeySystem&&
|
|
507
|
+
(e=!0)}}}if(!e||Bm(a))(d=a.j.l)&&!d.allowedByKeySystem&&Mm(a),e&&Am(a)}}function jm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=Ol("expirationupdated");a.dispatchEvent(b)}function mm(a,b,c){0<b&&(a.U()||a.Ye(b));b=a.getDuration();c<b&&(a.U()||a.Ia(c))}
|
|
508
|
+
function Ym(a,b){var c=a.m?a.m.Qc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?bn.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
509
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function zm(a){if(!a.variants.some(de))throw new O(2,4,4032);}function $m(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Tl&&a.dispatchEvent(b);A(c)})}function Qm(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(jd(c.language)):b.add("und");return b}
|
|
510
|
+
function Pm(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=jd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
|
|
511
|
+
h.push({language:l,role:n,label:p})}});return h}function Ul(){return new O(2,7,7E3)}function Nl(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function zk(){return{J:null,mimeType:null,startTime:null,me:NaN,uri:null}}function Vl(a){return new Promise(function(b,c){a.mb=function(){return c(Ul())};a.bd=function(){return b()};a.onError=function(d){return c(d)};a.dd=function(){return c(Ul())}})}L("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ze;
|
|
512
|
+
U.prototype.getManifestParserFactory=U.prototype.If;U.prototype.getManifest=U.prototype.Hf;U.prototype.retryStreaming=U.prototype.be;U.prototype.setMaxHardwareResolution=U.prototype.je;U.prototype.addChaptersTrack=U.prototype.ff;U.prototype.addThumbnailsTrack=U.prototype.hf;U.prototype.addTextTrackAsync=U.prototype.gf;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ma;U.prototype.getPresentationStartTimeAsDate=U.prototype.Ge;U.prototype.getPlayheadTimeAsDate=U.prototype.Nf;
|
|
513
|
+
U.prototype.setTextTrackVisibility=U.prototype.xg;U.prototype.getChapters=U.prototype.Bf;U.prototype.getChaptersTracks=U.prototype.Fe;U.prototype.isTextTrackVisible=U.prototype.Hd;U.prototype.selectVariantsByLabel=U.prototype.sg;U.prototype.selectTextLanguage=U.prototype.ge;U.prototype.selectAudioLanguage=U.prototype.fe;U.prototype.getTextLanguages=U.prototype.Pf;U.prototype.getAudioLanguages=U.prototype.yf;U.prototype.getTextLanguagesAndRoles=U.prototype.Qf;
|
|
514
|
+
U.prototype.getAudioLanguagesAndRoles=U.prototype.zf;U.prototype.selectVariantTrack=U.prototype.Se;U.prototype.selectTextTrack=U.prototype.Re;U.prototype.getThumbnails=U.prototype.Sf;U.prototype.getImageTracks=U.prototype.Ef;U.prototype.getTextTracks=U.prototype.Eb;U.prototype.getVariantTracks=U.prototype.Pa;U.prototype.cancelTrickPlay=U.prototype.nf;U.prototype.trickPlay=U.prototype.zg;U.prototype.getPlaybackRate=U.prototype.Rc;U.prototype.isBuffering=U.prototype.Gd;U.prototype.getKeyStatuses=U.prototype.Qc;
|
|
515
|
+
U.prototype.getExpiration=U.prototype.hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Wf;U.prototype.seekRange=U.prototype.tc;U.prototype.isAudioOnly=U.prototype.Yf;U.prototype.isInProgress=U.prototype.kb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.Ee;U.prototype.getAssetUri=U.prototype.Ed;U.prototype.getNetworkingEngine=U.prototype.ic;U.prototype.getMediaElement=U.prototype.Kf;
|
|
516
|
+
U.prototype.getLoadMode=U.prototype.Gf;U.prototype.resetConfiguration=U.prototype.qg;U.prototype.getBufferFullness=U.prototype.Af;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.Eg;U.prototype.unload=U.prototype.pe;U.prototype.detach=U.prototype.detach;U.prototype.attachCanvas=U.prototype.kf;U.prototype.attach=U.prototype.Yb;
|
|
517
|
+
U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Hg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(kc()){for(var l in Og)k[l]=!0;for(var m in Qg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=kc()?!!Og[n]:lc(n);for(var p in l)k[p]=
|
|
518
|
+
kc()?!!Qg[p]:lc(l[p]);c=k;p='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(Si));
|
|
519
|
+
k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=kc()?$c(l)?!0:MediaSource.isTypeSupported(l)||Oc(l):lc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=cn;for(g in f)e[g]=f[g]();return h["return"](e)})};
|
|
520
|
+
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||oc("Trident/"))return!1;var a=tc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:kc()?!0:lc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Dl=a};
|
|
521
|
+
U.registerSupportPlugin=function(a,b){cn[a]=b};U.prototype.destroy=U.prototype.destroy;var Tl=0,Al=1,pm=2,Dm=3;U.LoadMode={DESTROYED:Tl,NOT_LOADED:Al,MEDIA_SOURCE:pm,SRC_EQUALS:Dm};U.version="v4.3.0";var dn=["4","3"];oe=new function(a){this.g=a;this.i=pe;this.h=qe}(new me(Number(dn[0]),Number(dn[1])));
|
|
522
|
+
var bn=["output-restricted","internal-error"],cn={},Dl=null,Sl={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"},Wm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
523
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function en(){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.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(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};
|
|
497
524
|
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()};
|
|
498
525
|
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()};
|
|
499
|
-
r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};
|
|
500
|
-
V.prototype.
|
|
501
|
-
V.prototype.getDuration=V.prototype.getDuration;function
|
|
502
|
-
function(f){
|
|
503
|
-
function
|
|
504
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,
|
|
505
|
-
{once:!0})}catch(f){
|
|
506
|
-
function
|
|
507
|
-
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
508
|
-
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0
|
|
509
|
-
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,
|
|
510
|
-
function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
511
|
-
function
|
|
526
|
+
r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getDescription=V.prototype.getDescription;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;
|
|
527
|
+
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;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;
|
|
528
|
+
V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function fn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new hf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.0");this.g=null;this.h.na(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){gn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
529
|
+
function(f){hn(e,f)});this.i.onended=function(){e.m.contentComplete()}}fn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Jk(this.o)};fn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function hn(a,b){b.getError();jn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
530
|
+
function gn(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(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.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}kn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
531
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ln(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,ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
|
|
532
|
+
{once:!0})}catch(f){jn(a,null)}}function ln(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
533
|
+
function kn(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new S(d,e))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){mn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){mn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
534
|
+
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){jn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){jn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
535
|
+
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
536
|
+
a.h.C(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,
|
|
537
|
+
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
538
|
+
function mn(a,b){var c=b.getAd();c?(a.j=new V(c,a.g,a.i),c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",c)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())):Va("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}function jn(a,b){a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.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)};
|
|
512
539
|
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};
|
|
513
|
-
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};
|
|
514
|
-
W.prototype.
|
|
515
|
-
W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function
|
|
516
|
-
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(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
|
|
517
|
-
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(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.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new
|
|
518
|
-
this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new
|
|
519
|
-
f;e.i(new
|
|
520
|
-
function
|
|
521
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);
|
|
522
|
-
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new
|
|
523
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new
|
|
524
|
-
(c.F=!0),c.j=new
|
|
525
|
-
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)};
|
|
540
|
+
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.getTitle=function(){return this.i.getTitle()};r.getDescription=function(){return this.i.getDescription()};r.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;
|
|
541
|
+
W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.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;
|
|
542
|
+
W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function nn(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.B="";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.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){on(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
543
|
+
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(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.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
544
|
+
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(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.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
|
|
545
|
+
this.h.C(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.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.C(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=
|
|
546
|
+
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}nn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};nn.prototype.release=function(){this.stop();this.h&&this.h.release()};nn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
547
|
+
function on(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.C(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 en;this.j=navigator.language}ra(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 O(2,10,1E4);this.i&&this.i.release();this.i=new fn(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)})};
|
|
548
|
+
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 en};r.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
|
|
549
|
+
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new nn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
550
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(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.3.0";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
551
|
+
(c.F=!0),c.j=new hc,c.g.requestStream(a),c.B=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(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.3.0";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.D};
|
|
552
|
+
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)};L("shaka.ads.AdManager",X);
|
|
526
553
|
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;
|
|
527
554
|
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";
|
|
528
555
|
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";
|
|
529
|
-
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";
|
|
530
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(
|
|
531
|
-
function
|
|
532
|
-
function
|
|
533
|
-
var
|
|
534
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
535
|
-
|
|
536
|
-
m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.
|
|
537
|
-
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.
|
|
538
|
-
|
|
539
|
-
function
|
|
540
|
-
r.get=function(a,b){var c=this;if("video"==a){if(
|
|
541
|
-
r.set=function(a,b,c){this.g[a][b]=c;
|
|
542
|
-
r.
|
|
543
|
-
function
|
|
544
|
-
function
|
|
545
|
-
r.destroy=function(a){a&&this.g.
|
|
546
|
-
r.cast=function(){var a=this,b;return
|
|
547
|
-
r.
|
|
548
|
-
function
|
|
549
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
550
|
-
function
|
|
551
|
-
function
|
|
552
|
-
function
|
|
553
|
-
function
|
|
554
|
-
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
|
|
555
|
-
function
|
|
556
|
-
function
|
|
557
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
558
|
-
function
|
|
559
|
-
|
|
560
|
-
r.
|
|
561
|
-
r.destroy=function(){var a=this,b,c;return
|
|
562
|
-
function
|
|
563
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
564
|
-
!1;
|
|
565
|
-
function
|
|
566
|
-
function
|
|
567
|
-
a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play()
|
|
568
|
-
function
|
|
569
|
-
1);
|
|
570
|
-
function
|
|
571
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.
|
|
572
|
-
function
|
|
573
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted
|
|
574
|
-
function
|
|
575
|
-
|
|
576
|
-
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
577
|
-
function
|
|
578
|
-
function
|
|
579
|
-
function
|
|
580
|
-
226,251,75]),m=new Uint8Array([]);k=[{initData:
|
|
581
|
-
function
|
|
582
|
-
var
|
|
556
|
+
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";Dl=function(){return new X};function pn(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
|
|
557
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(ri(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}})}
|
|
558
|
+
function qn(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=rn(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})}
|
|
559
|
+
function rn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
560
|
+
var sn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),tn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),un=["loop","playbackRate"],vn=["pause","play"],wn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
561
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},xn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},yn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},zn=[["getConfiguration","configure"]],Bn=[["isTextTrackVisible","setTextTrackVisibility"]],Cn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
562
|
+
Dn=["attach","attachCanvas","detach","load","unload"];function En(a,b,c,d,e,f,g){var h=this;this.G=a;this.N=g;this.j=new Q(b);this.P=c;this.u=!1;this.s=d;this.F=e;this.K=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return Fn(h)};this.D=function(k,l){var m=qn(l);switch(m.type){case "event":var n=m.targetName;m=Oe(m.event);h.s(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var q in n[p])m[q]=n[p][q]}h.u&&(h.P(),h.u=!1);break;case "asyncComplete":if(p=m.id,m=m.error,q=h.i[p],delete h.i[p],q)if(m){p=new O(m.severity,m.category,
|
|
563
|
+
m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;Gn.add(this)}r=En.prototype;r.destroy=function(){Gn["delete"](this);Hn(this);In&&Jn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.$d=function(){return this.M};
|
|
564
|
+
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.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Gn),d=c.next();!d.done;d=c.next())Kn(d.value,b)},function(b){for(var c=t(Gn),d=c.next();!d.done;d=c.next())d=d.value,Ln="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ln&&this.j.O(Mn);(a=In)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
565
|
+
Kn(this,a):In=null}else window.__onGCastApiAvailable!==Nn&&(On=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Nn)};r.he=function(a){this.o=a;this.h&&Pn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new O(1,8,8E3);if(!Ln)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new hc;chrome.cast.requestSession(function(d){return Qn(b,a,d)},function(d){return Rn(b,d)});return u(c,b.l,0)})};
|
|
566
|
+
function Sn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Qn(a,b,c)},function(c){return Rn(a,c)})}}r.zb=function(){if(this.h){Hn(this);if(In){Jn(this);try{In.stop(function(){},function(){})}catch(a){}In=null}Fn(this)}};
|
|
567
|
+
r.get=function(a,b){var c=this;if("video"==a){if(vn.includes(b))return function(){return c.Pe.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))}}else if("player"==a){if(yn[b]&&!this.get("player","isLive")())return function(){};if(Cn.includes(b))return function(){return c.Pe.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))};if(Dn.includes(b))return function(){return c.ng.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))};if(wn[b]||xn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
568
|
+
r.set=function(a,b,c){this.g[a][b]=c;Pn(this,{type:"set",targetName:a,property:b,value:c})};function Qn(a,b,c){In=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Fn(a);Pn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Rn(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 O(2,8,c,b))}
|
|
569
|
+
r.Pe=function(a,b){Pn(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};r.ng=function(a,b){var c=Ja.apply(2,arguments),d=new hc,e=this.H.toString();this.H++;this.i[e]=d;try{Pn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Kn(a,b){var c=a.K();a.l=new hc;a.u=!0;Qn(a,c,b)}function Jn(a){var b=In;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
|
|
570
|
+
function Fn(a){var b=In?"connected"==In.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Hn(a)}a.h=b;a.M=b?In.receiver.friendlyName:"";a.j.Lb()}function Hn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function Pn(a,b){var c=pn(b),d=In;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new O(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var Mn=.02,Ln=!1,In=null,On=null,Gn=new Set;
|
|
571
|
+
function Nn(a){On?window.__onGCastApiAvailable=On:delete window.__onGCastApiAvailable;On=null;if(a)for(var b=t(Gn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Tn(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.B=d;this.u=new Map;this.g=new En(c,function(){return Un(e)},function(){return Vn(e)},function(f,g){return Wn(e,f,g)},function(){return Xn(e)},function(){return Yn(e)},d);Zn(this)}ra(Tn,Qe);r=Tn.prototype;
|
|
572
|
+
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.Vf=function(){return this.l};r.Mf=function(){return this.s};r.mf=function(){return this.g.m&&Ln};r.ra=function(){return this.g.ra()};r.$d=function(){return this.g.$d()};
|
|
573
|
+
r.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=Yn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.pe(),0):c["return"]()})};r.he=function(a){this.g.he(a)};r.yg=function(){Sn(this.g)};r.zb=function(){this.g.zb()};
|
|
574
|
+
r.pf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d["return"]();c.D=a;c.B=b;c.g.zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new En(a,function(){return Un(c)},function(){return Vn(c)},function(e,f){return Wn(c,e,f)},function(){return Xn(c)},function(){return Yn(c)},b);c.g.init();A(d)})};
|
|
575
|
+
function Zn(a){a.g.init();a.m=new hf;for(var b=t(sn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.ra()||(f=Oe(f),a.j.dispatchEvent(f))});for(var d in Pe)a.m.C(a.h,Pe[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Rb=e,Object.defineProperty(a.l,b.Rb,{configurable:!1,enumerable:!0,get:function(f){return function(){return $n(a,f.Rb)}}(b),set:function(f){return function(g){var h=f.Rb;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Rb:b.Rb};a.s={};ao(a,
|
|
576
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return bo(a,f)}})});co(a);a.j=new Qe;a.j.Vc=a.l;a.o=new Qe;a.o.Vc=a.s}function co(a){var b=new Map;ao(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)})}
|
|
577
|
+
function ao(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)}}
|
|
578
|
+
function Yn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ed(),startTime:null};a.i.pause();for(var c=t(un),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(zn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Bn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Un(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
|
|
579
|
+
function Vn(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
580
|
+
function Xn(a){for(var b=t(zn),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(un);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(un),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Bn);for(k=
|
|
581
|
+
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)})}
|
|
582
|
+
function $n(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)}
|
|
583
|
+
function bo(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.ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Ee()};
|
|
584
|
+
if("setVideoContainer"==b)return function(c){return a.h.Ze(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&&(wn[b]||xn[b])||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
585
|
+
function Wn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Tn);Tn.prototype.changeReceiverId=Tn.prototype.pf;Tn.prototype.forceDisconnect=Tn.prototype.zb;Tn.prototype.suggestDisconnect=Tn.prototype.yg;Tn.prototype.setAppData=Tn.prototype.he;Tn.prototype.cast=Tn.prototype.cast;Tn.prototype.receiverName=Tn.prototype.$d;Tn.prototype.isCasting=Tn.prototype.ra;Tn.prototype.canCast=Tn.prototype.mf;Tn.prototype.getPlayer=Tn.prototype.Mf;
|
|
586
|
+
Tn.prototype.getVideo=Tn.prototype.Vf;Tn.prototype.destroy=Tn.prototype.destroy;function eo(a,b,c,d){Qe.call(this);var e=this;this.g=a;this.h=b;this.j=new hf;this.H={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.B=!1;this.u=!0;this.s=this.l=null;this.G=new Q(function(){fo(e)});go(this)}ra(eo,Qe);r=eo.prototype;r.isConnected=function(){return this.F};r.Zf=function(){return this.o};r.vg=function(a){this.i=a};r.tf=function(){this.i=null};
|
|
587
|
+
r.wg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.ug=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.tg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
588
|
+
r.destroy=function(){var a=this,b,c;return G(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.H=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();A(d)})};
|
|
589
|
+
function go(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ho(a)};b.onSenderDisconnected=function(){return ho(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&io(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);io(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 jo(a,
|
|
590
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return ko(a,e)};b.start();b=t(sn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return lo(a,"video",e)});for(var d in Pe)a.j.C(a.h,Pe[d],function(e){return lo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.je(3840,2160):a.h.je(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
|
|
591
|
+
!1;mo(a)});a.j.C(a.g,"playing",function(){a.o=!1;mo(a)});a.j.C(a.g,"pause",function(){mo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;mo(a)});a.j.C(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.o=!0,mo(a))})).O(no)})}function ho(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;mo(a)}
|
|
592
|
+
function mo(a){var b;G(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);oo(a)||po(a);A(c)})}
|
|
593
|
+
function qo(a,b,c){var d,e,f,g,h,k,l,m,n,p;G(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,D(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:za(q,3);break;case 5:return g=Aa(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(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
|
|
594
|
+
a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),po(a));A(q)}})}function lo(a,b,c){a.h&&(fo(a),io(a,{type:"event",targetName:b,event:c},a.l))}
|
|
595
|
+
function fo(a){a.G.O(ro);for(var b={video:{},player:{}},c=t(tn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in yn)0==a.m%yn[e]&&(b.player[e]=a.h[e]());for(var f in wn)0==a.m%wn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;io(a,{type:"update",update:b},a.l);for(var g in xn)0==a.m%xn[g]&&(b={player:{}},b.player[g]=a.h[g](),io(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
596
|
+
1);oo(a)}function oo(a){return a.u&&(a.g.duration||a.h.U())?(so(a),a.u=!1,!0):!1}function so(a,b){var c={contentId:a.h.Ed(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);po(a,void 0===b?0:b,c)}
|
|
597
|
+
function ko(a,b){var c=qn(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;qo(a,c.initState,c.appData);fo(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
598
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.H[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return to(a,h,g,null)},function(k){return to(a,h,g,k)})}}
|
|
599
|
+
function jo(a,b){var c=qn(b.data);switch(c.type){case "PLAY":a.g.play();po(a);break;case "PAUSE":a.g.pause();po(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(),po(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),po(a));break;case "STOP":a.h.pe().then(function(){a.h&&po(a)});break;case "GET_STATUS":so(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));
|
|
600
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||po(a);break;case "LOAD":a.m=0;a.B=!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&&so(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");io(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:io(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
601
|
+
function to(a,b,c,d){a.h&&io(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function io(a,b,c,d){a.F&&(a=pn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function po(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?uo:a.h.Gd()?vo:a.g.paused?wo:xo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);io(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
602
|
+
L("shaka.cast.CastReceiver",eo);eo.prototype.destroy=eo.prototype.destroy;eo.prototype.setContentArtist=eo.prototype.tg;eo.prototype.setContentImage=eo.prototype.ug;eo.prototype.setContentTitle=eo.prototype.wg;eo.prototype.clearContentMetadata=eo.prototype.tf;eo.prototype.setContentMetadata=eo.prototype.vg;eo.prototype.isIdle=eo.prototype.Zf;eo.prototype.isConnected=eo.prototype.isConnected;var ro=.5,no=5,uo="IDLE",xo="PLAYING",vo="BUFFERING",wo="PAUSED";function yo(a,b,c){var d=zo(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 O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ee?(e=h.init||e,!1):!0}),f.length&&(a=Ao(e,f,c,g),0==a.length&&(a=[bc("",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(bc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
|
|
603
|
+
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ze:g,th:e,drmInfos:a,De:!0}}function Bo(a,b,c,d){var e=yo(a,c,d);if(b.De){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.De=!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 O(2,4,4008);return e.ze||b.ze}
|
|
604
|
+
function Co(a){var b=0,c=Hb(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=N(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
605
|
+
function Do(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=If(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Gc(a.textContent);a=Co(a).filter(function(b){return b.type===Fo})[0];if(!a)return"";a=yc(a.value,!0);return(a=Yf(a,"WRMHEADER"))?Do(a):""}
|
|
606
|
+
function Ao(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.ee];if(g){var h;if(h=If(f.node,"urn:microsoft:playready","pro")){h=Gc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Ff(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ee)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,
|
|
607
|
+
226,251,75]),m=new Uint8Array([]);k=[{initData:Ff(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=bc(g,f.init||a||h||k);if(g=Go.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function zo(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}
|
|
608
|
+
function Ho(a){var b=a.getAttribute("schemeIdUri"),c=Lf(a,"urn:mpeg:cenc:2013","default_KID"),d=Jf(a,"urn:mpeg:cenc:2013","pssh").map(Nf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Gc(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ee:b,keyId:c,init:0<e.length?e:null}}
|
|
609
|
+
var Fo=1,Go=(new Map).set("com.widevine.alpha",function(a){return(a=If(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=If(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=
|
|
583
610
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
584
|
-
function
|
|
585
|
-
p||0;if(0>p)if(q){q=
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
function
|
|
594
|
-
function
|
|
595
|
-
function
|
|
596
|
-
function
|
|
597
|
-
I=new
|
|
598
|
-
function
|
|
599
|
-
function
|
|
600
|
-
Infinity,c);f&&(f.segmentIndex=e);return{
|
|
601
|
-
function
|
|
602
|
-
function
|
|
603
|
-
n;l?(p&&(new
|
|
604
|
-
function
|
|
605
|
-
function
|
|
606
|
-
y=b.
|
|
607
|
-
function
|
|
608
|
-
function
|
|
609
|
-
function
|
|
610
|
-
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(
|
|
611
|
-
!
|
|
612
|
-
a.l=z;A(
|
|
613
|
-
function
|
|
614
|
-
function
|
|
615
|
-
function
|
|
616
|
-
function
|
|
617
|
-
k.push(
|
|
618
|
-
B.variantIds=[x++];return
|
|
619
|
-
function
|
|
620
|
-
z.next())for(B=q.value,
|
|
621
|
-
function
|
|
622
|
-
function
|
|
623
|
-
function
|
|
624
|
-
function
|
|
625
|
-
function
|
|
626
|
-
function
|
|
627
|
-
(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=
|
|
628
|
-
function
|
|
629
|
-
function
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
d=
|
|
633
|
-
function
|
|
634
|
-
function
|
|
635
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
636
|
-
function
|
|
637
|
-
function
|
|
638
|
-
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
|
|
639
|
-
function
|
|
640
|
-
function
|
|
641
|
-
function
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
B.
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
function
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
1,null!=q)
|
|
655
|
-
(
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
(
|
|
660
|
-
(
|
|
661
|
-
|
|
662
|
-
function
|
|
663
|
-
|
|
664
|
-
"
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
function
|
|
669
|
-
case
|
|
670
|
-
case
|
|
671
|
-
|
|
672
|
-
function
|
|
673
|
-
|
|
674
|
-
function
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
r.
|
|
681
|
-
function
|
|
682
|
-
function
|
|
683
|
-
function
|
|
684
|
-
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
a
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
t(
|
|
694
|
-
function
|
|
695
|
-
function
|
|
696
|
-
function
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
function
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
|
|
704
|
-
function
|
|
705
|
-
if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}function
|
|
706
|
-
function
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
function
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
function
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
function
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
function
|
|
730
|
-
|
|
731
|
-
function
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
function
|
|
735
|
-
|
|
736
|
-
function
|
|
737
|
-
function
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
function
|
|
741
|
-
function
|
|
742
|
-
function
|
|
743
|
-
|
|
744
|
-
function
|
|
745
|
-
function
|
|
746
|
-
function
|
|
747
|
-
|
|
748
|
-
function fs(a,
|
|
749
|
-
function
|
|
750
|
-
|
|
751
|
-
function
|
|
752
|
-
|
|
753
|
-
|
|
611
|
+
function Jo(a,b){var c=Ko(a,b,"timescale"),d=1;c&&(d=Uf(c)||1);var e=Ko(a,b,"duration");c=Uf(e||"");"image"==a.I.contentType&&(c=Wf(e||""));c&&(c/=d);var f=Ko(a,b,"startNumber");e=Number(Ko(a,b,"presentationTimeOffset"))||0;var g=Vf(f||"");if(null==f||null==g)g=1;var h=Lo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.V.duration||Infinity;h=Hf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Pf(p,"t",Vf),y=Pf(p,"d",Vf);p=Pf(p,"r",Tf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
612
|
+
p||0;if(0>p)if(q){q=Pf(q,"t",Vf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,Cg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Sa:e/d||0,qe:e,timeline:f}}function Ko(a,b,c){return[b(a.I),b(a.ia),b(a.aa)].filter($b).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
613
|
+
function Lo(a,b,c){return[b(a.I),b(a.ia),b(a.aa)].filter($b).map(function(d){return Gf(d,c)}).reduce(function(d,e){return d||e})}
|
|
614
|
+
function Mo(a,b,c,d,e,f){for(var g=Lf(a,"http://www.w3.org/1999/xlink","href"),h=Lf(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 O(2,4,4028));if("onLoad"!=h)return Ie(new O(2,4,4027));var m=ac([d],[g]);return e.request(0,Ze(m,b)).Y(function(n){n=$f(n.data,a.tagName);if(!n)return Ie(new O(2,4,4001,g));
|
|
615
|
+
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return No(a,b,c,m[0],e,f+1)})}
|
|
616
|
+
function No(a,b,c,d,e,f){f=void 0===f?0:f;if(Lf(a,"http://www.w3.org/1999/xlink","href")){var g=Mo(a,b,c,d,e,f);c&&(g=g.Y(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"==Lf(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).Y(function(){return a})};function Oo(a,b,c,d,e,f,g){var h,k=(new vf).T("sidx",function(l){h=Po(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
617
|
+
function Po(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.ab(),m=g.reader.ab();g.reader.skip(2);var n=g.reader.Zd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.L(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.L();g.reader.skip(4);if(1==q)throw new O(2,3,3006);h.push(new ki(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Qo(a){this.h=Hb(a);this.g=new sf(this.h,0)}Qo.prototype.la=function(){return this.g.la()};
|
|
618
|
+
function Ro(a){var b=So(a);if(7<b.length)throw new O(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(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new O(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.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Hb(a.h,a.g.$(),b);a.g.skip(b);return new Uo(c,d)}
|
|
619
|
+
function So(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return N(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}
|
|
620
|
+
function Vo(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Wo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Qo(a.g);for(var n=null,p=null;a.la();){var q=Ro(a);if(187==q.id){var v=Xo(q);v&&(q=c*v.Dg,v=b+v.mg,null!=n&&m.push(new ki(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new ki(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
621
|
+
function Xo(a){var b=new Qo(a.g);a=Ro(b);if(179!=a.id)throw new O(2,3,3013);a=Vo(a);b=Ro(b);if(183!=b.id)throw new O(2,3,3012);b=new Qo(b.g);for(var c=0;b.la();){var d=Ro(b);if(241==d.id){c=Vo(d);break}}return{Dg:a,mg:c}};function Yo(a,b){var c=Lo(a,b,"Initialization");if(!c)return null;var d=a.I.va,e=c.getAttribute("sourceURL");e&&(d=ac(a.I.va,[e]));e=0;var f=null;if(c=Pf(c,"range",Sf))e=c.start,f=c.end;return new ii(function(){return d},e,f,Zo(a))}
|
|
622
|
+
function $o(a,b){var c=Number(Ko(a,ap,"presentationTimeOffset"))||0,d=Ko(a,ap,"timescale"),e=1;d&&(e=Uf(d)||1);var f=c/e||0,g=Yo(a,ap);bp(a,g);var h=Se(a);return{Ab:function(){var k=Lo(h,ap,"RepresentationIndex"),l=h.I.va;k&&(k=k.getAttribute("sourceURL"))&&(l=ac(h.I.va,[k]));k=cp(h);return dp(h,b,g,l,k.start,k.end,f)}}}
|
|
623
|
+
function dp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,C,z,B,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Xa||!a.V.Ke,l=a.V.start,m=a.V.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.xa(),c.Aa,c.ka):null],p=null,u(F,Promise.all(v),2);y=F.h;x=y[0];w=y[1]||null;C=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=Oo(x,e,d,c,z,B,E);else{H=new Qo(w);if(440786851!=Ro(H).id)throw new O(2,3,3008);var I=Ro(H);if(408125543!=I.id)throw new O(2,3,3009);H=I.g.byteOffset;
|
|
624
|
+
I=new Qo(I.g);for(var J=null;I.la();){var M=Ro(I);if(357149030==M.id){J=M;break}}if(!J)throw new O(2,3,3010);J=new Qo(J.g);M=1E6;for(I=null;J.la();){var P=Ro(J);if(2807729==P.id)M=Vo(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new O(2,3,3003);}if(null==I)throw new O(2,3,3011);J=M/1E9;I*=J;M=Ro(new Qo(x));if(475249515!=M.id)throw new O(2,3,3007);H=Wo(M,H,J,I,d,c,z,B,E)}C=H;h.Hb(C);q=new Bj(C);k&&q.Ya(B,E,!0);return F["return"](q)})}
|
|
625
|
+
function ap(a){return a.vc}function cp(a){var b=Lo(a,ap,"RepresentationIndex");a=Ko(a,ap,"indexRange");a=Sf(a||"");b&&(a=Pf(b,"range",Sf,a));return a}function bp(a,b){ep(a,b);if(!cp(a))throw new O(2,4,4002);}function ep(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=fc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
626
|
+
function Zo(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.ad,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function fp(a,b){var c=Yo(a,gp),d=hp(a);if(!d.ga&&!d.timeline&&1<d.Fb.length)throw new O(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.Fb.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.aa.id&&a.I.id&&(f=b[a.aa.id+","+a.I.id])&&(e=f.segmentIndex);var g=ip(a.V.start,a.V.duration,a.I.va,d,c);c=!e;e?e.Gb(g,a.presentationTimeline.Oa()):e=new Bj(g);a.presentationTimeline.Hb(g);a.Xa&&a.V.Ke||e.Ya(a.V.start,a.V.duration?a.V.start+a.V.duration:
|
|
627
|
+
Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.g.length||e.oc(g);return Promise.resolve(e)}}}function gp(a){return a.bb}function hp(a){var b=jp(a);a=Jo(a,gp);var c=a.Kb;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Kb:c,Sa:a.Sa,timeline:a.timeline,Fb:b}}
|
|
628
|
+
function ip(a,b,c,d,e){var f=d.Fb.length;d.timeline&&d.timeline.length!=d.Fb.length&&(f=Math.min(d.timeline.length,d.Fb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={pd:m.pd},n++){var p=d.Fb[n];m.pd=ac(c,[p.cg]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new ki(a+l,a+q,function(v){return function(){return v.pd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
629
|
+
function jp(a){return[a.I.bb,a.ia.bb,a.aa.bb].filter($b).map(function(b){return Hf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ie&&(a.Ie=!0);var c=b.getAttribute("media");b=Pf(b,"mediaRange",Sf,{start:0,end:null});return{cg:c,start:b.start,end:b.end}})};function kp(a,b,c,d,e,f){var g=lp(a),h=mp(a);np(h);var k=Se(a);if(h.nc)return ep(a,g),{Ab:function(){var q=Io(h.nc,k.I.id,null,k.bandwidth||null,null);q=ac(k.I.va,[q]);return dp(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Rd(h.ga),a.presentationTimeline.Sd(a.V.start)),{Ab:function(){return op(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.I.id&&(d=a.aa.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=pp(k,h,g);c=a.V.start;var n=a.V.duration?a.V.start+a.V.duration:Infinity,p=Infinity!=
|
|
630
|
+
n;l?(p&&(new Bj(m)).Ya(c,n,!0),l.Gb(m,a.presentationTimeline.Oa())):l=new Bj(m);a.presentationTimeline.Hb(m);p&&l.Ya(c,n);d&&a.Xa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.g.length||l.oc(m);return Promise.resolve(l)}}}function qp(a){return a.wc}function mp(a){var b=Jo(a,qp),c=Ko(a,qp,"media");a=Ko(a,qp,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Sa:b.Sa,qe:b.qe,timeline:b.timeline,Pd:c,nc:a}}
|
|
631
|
+
function np(a){var b=a.nc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.nc&&(a.timeline=null),a.ga=null);if(!a.nc&&!a.Pd)throw new O(2,4,4002);}
|
|
632
|
+
function op(a,b,c,d,e){function f(J){var M=(J-q)*p,P=M+b.Sa,K=M+l;M=K+p;var Y=Math.min(M,h());K=new ki(K,Y,function(){var ba=Io(y,w,J,x,P*v);return ac(C,[ba])},0,null,d,z,l,h());K.j=M;return K}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.hb(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,n=a.V.duration,p=b.ga,q=b.Kb,v=b.timescale,
|
|
633
|
+
y=b.Pd,x=a.bandwidth||null,w=a.I.id,C=a.I.va,z=l-b.Sa,B=g();a=a.Xa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var F=f(E);c.push(F)}var H=new Bj(c);c=k.hb()<h();E=k.U();if(c||E){var I=Math.max(a,B+1);H.gd(p,function(){var J=k.Oa();H.fb(J);var M=t(g());M.next();M=M.next().value;for(var P=[];I<=M;){var K=f(I);P.push(K);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
|
|
634
|
+
function pp(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={od:h.od,sd:h.sd,vd:h.vd,ld:h.ld,xd:h.xd,md:h.md},k++){var l=b.timeline[k],m=l.start,n=l.Cg;l=l.end;h.vd=k+b.Kb;h.xd=n+b.qe;h.sd=a.I.id;h.ld=a.bandwidth||null;h.od=b.Pd;h.md=a.I.va;g.push(new ki(d+m,d+l,function(p){return function(){var q=Io(p.od,p.sd,p.vd,p.ld||null,p.xd);return ac(p.md,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
635
|
+
function lp(a){var b=Ko(a,qp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.va;return new ii(function(){var f=Io(b,c,null,d,null);return ac(e,[f])},0,null,Zo(a))};function rp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}rp.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=[]};
|
|
636
|
+
function sp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va;return G(function(ka){switch(ka.g){case 1:d=gc;tp(b);up(b);vp(b);wp(b);if(!c&&1==b.length){e=b[0];a.g=e.Jc;a.h=e.hd;a.j=e.textStreams;a.i=e.imageStreams;ka.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 ka["return"]();k=b.map(function(na){return na.Jc});l=b.map(function(na){return na.hd});m=b.map(function(na){return na.textStreams});n=b.map(function(na){return na.imageStreams});
|
|
637
|
+
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(xp(d.Z));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(xp(d.Vb));return u(ka,yp(a.g,k,f,zp,Ap),3);case 3:return u(ka,yp(a.h,l,f,zp,Ap),4);case 4:return u(ka,yp(a.j,m,f,zp,Ap),5);case 5:return u(ka,yp(a.i,n,f,zp,Ap),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),M=J.next();!M.done;M=J.next())for(P=M.value,K=t(a.h),Y=K.next();!Y.done;Y=K.next())ba=Y.value,sa=Kg(P.drmInfos,ba.drmInfos),P.drmInfos.length&&ba.drmInfos.length&&
|
|
638
|
+
!sa.length||(va=C++,z.push({id:va,language:P.language,primary:P.primary,audio:P,video:ba,bandwidth:(P.bandwidth||0)+(ba.bandwidth||0),drmInfos:sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),F=E.next();!F.done;F=E.next())H=F.value,I=C++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.Gc?H:null,video:H.type==d.ua?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
639
|
+
a.l=z;A(ka)}})}function tp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Jc),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.Jc=c}}
|
|
640
|
+
function vp(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}}
|
|
641
|
+
function up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.hd),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.hd=c}}
|
|
642
|
+
function wp(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}}
|
|
643
|
+
function Bp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P;return G(function(K){switch(K.g){case 1:b=gc;if(1==a.length)return K["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Gc})});d=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.ua})});e=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Z})});f=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Vb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
644
|
+
k.push(Cp(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Cp(b.Vb));return u(K,yp([],c,0,Dp,Ep),2);case 2:return p=K.h,u(K,yp([],d,0,Dp,Ep),3);case 3:return q=K.h,u(K,yp([],e,0,Dp,Ep),4);case 4:return v=K.h,u(K,yp([],f,0,Dp,Ep),5);case 5:y=K.h;x=0;if(q.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(H=F.value,I=t(q),J=I.next();!J.done;J=I.next())M=J.value,P=x++,M.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),C=t(w),z=C.next();!z.done;z=C.next())B=z.value,
|
|
645
|
+
B.variantIds=[x++];return K["return"](q.concat(p).concat(v).concat(y))}})}
|
|
646
|
+
function yp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J;return G(function(M){switch(M.g){case 1:f=gc;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){M.A(4);break}m=l.value;return u(M,Fp(m,b,c,e,g),5);case 5:n=M.h;if(!n)throw new O(2,4,4037);l=k.next();M.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(C=Gp(w,b,d,e,g))&&a.push(C);z=t(g);for(q=z.next();!q.done;q=
|
|
647
|
+
z.next())for(B=q.value,E={},F=t(B),x=F.next();!x.done;E={Wa:E.Wa},x=F.next())if(E.Wa=x.value,H=E.Wa.type==f.Z&&!E.Wa.language,I=E.Wa.type==f.Vb&&!E.Wa.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(K){return K.mimeType==P.Wa.mimeType&&Wc(K.codecs)==Wc(P.Wa.codecs)}}(E))))throw new O(2,4,4037);return M["return"](a)}})}
|
|
648
|
+
function Fp(a,b,c,d,e){return G(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)})}
|
|
649
|
+
function Ip(a,b){var c,d,e,f,g,h,k;return G(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 Fj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.l.push(k.segmentIndex);A(l)})}
|
|
650
|
+
function Gp(a,b,c,d,e){var f=c(a);Hp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Fj;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==nd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
|
|
651
|
+
function zp(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}
|
|
652
|
+
function Dp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
653
|
+
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=Kg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
654
|
+
(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=zp(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)}
|
|
655
|
+
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)}}}
|
|
656
|
+
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||Wc(b.codecs)!=Wc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Kg(c,d).length:1)}return c?!1:!0}
|
|
657
|
+
function Lp(a,b){return a.language?b.language?0==nd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Mp(a){return a.tilesLayout?!0:!1}
|
|
658
|
+
function Np(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
|
|
659
|
+
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}
|
|
660
|
+
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}
|
|
661
|
+
function Pp(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(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!=
|
|
662
|
+
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}}
|
|
663
|
+
function xp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj([]),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}}
|
|
664
|
+
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 rp;this.F=0;this.H=new Qa(5);this.D=new Q(function(){Xp(a)});this.o=new Te;this.s=null;this.K=[];this.u=Infinity;this.B=!1}r=Wp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.B=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 O(2,7,7001);return e["return"](c.i)})};
|
|
665
|
+
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 G(function(c){if(1==c.g)return D(c,2),u(c,Yp(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
|
|
666
|
+
function Yp(a){var b,c,d,e,f,g,h;return G(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,$p(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k["return"](h)})}
|
|
667
|
+
function $p(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=$f(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](aq(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"](aq(a,h,c))})}
|
|
668
|
+
function aq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va,ka,na;return G(function(R){switch(R.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Hf(b,"Location").map(Nf).filter($b);0<f.length&&(g=ac(e,f),e=a.m=g);h=Hf(b,"BaseURL");k=h.map(Nf);l=ac(e,k);m=0;h&&h.length&&(m=Pf(h[0],"availabilityTimeOffset",Wf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Pf(b,"minBufferTime",Rf)||0);a.F=Pf(b,"minimumUpdatePeriod",Rf,-1);q=Pf(b,"availabilityStartTime",Qf);v=Pf(b,"timeShiftBufferDepth",
|
|
669
|
+
Rf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Pf(b,"suggestedPresentationDelay",Rf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Pf(b,"maxSegmentDuration",Rf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.fb(B.Oa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new T(q,J,a.g.dash.autoCorrectDrift);B.xc("static"==z);(M=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
670
|
+
(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.le(v);P=b.getAttribute("profiles")||"";K={Xa:"static"!=z,presentationTimeline:B,aa:null,V:null,ia:null,I:null,bandwidth:0,Ie:!1,yb:m,profiles:P.split(",")};Y=bq(a,K,l,b);ba=Y.duration;sa=Y.periods;"static"!=z&&Y.Be||B.Ia(ba||Infinity);a.u&&!a.B&&(va=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Te(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.");
|
|
671
|
+
B.Rd(C||1);return u(R,sp(a.j,sa,K.Xa),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);R.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:a.g.dash.sequenceMode};if(!B.cf()){R.A(4);break}ka=Hf(b,"UTCTiming");return u(R,cq(a,l,ka),5);case 5:na=R.h;if(!a.h)return R["return"]();B.Ue(na);case 4:B.Md();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
|
|
672
|
+
A(R)}})}
|
|
673
|
+
function bq(a,b,c,d){var e=Pf(d,"mediaPresentationDuration",Rf),f=[],g=0;d=Hf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Pf(k,"start",Rf,g),n=k.id,p=Pf(k,"duration",Rf),q=null;if(l){var v=Pf(l,"start",Rf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=dq(a,b,c,{start:m,duration:q,node:k,Ke:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
|
|
674
|
+
null;break}g=m+q}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Be:!1}:{periods:f,duration:g,Be:!0}}
|
|
675
|
+
function dq(a,b,c,d){b.aa=eq(d.node,null,c);b.V=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Hf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=t(e);for(var f=e.next();!f.done;f=e.next())fq(a,d.start,d.duration,f.value,c);c=Hf(d.node,"AdaptationSet").map(function(m){return gq(a,b,m)}).filter($b);if(b.Xa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.pg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);
|
|
676
|
+
}d=c.filter(function(m){return!m.oe});c=c.filter(function(m){return m.oe});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.oe.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={Fc:h.Fc},l=k.next())h.Fc=l.value,h.Fc.trickModeVideo=e.streams.find(function(m){return function(n){return Wc(m.Fc.codecs)==Wc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:hq(d,"audio");g=a.g.disableVideo?[]:hq(d,"video");f=a.g.disableText?
|
|
677
|
+
[]:hq(d,fc);c=a.g.disableThumbnails?[]:hq(d,"image");if(!g.length&&!e.length)throw new O(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.aa.id,Jc:d,hd:e,textStreams:g,imageStreams:f}}
|
|
678
|
+
function hq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
679
|
+
function gq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ia=eq(c,b.aa,null);var e=!1,f=Hf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter($b),h=void 0,k=b.ia.contentType==fc;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=
|
|
680
|
+
l}}var n;m=Hf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Hf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
|
|
681
|
+
10)));m=Hf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,C=w);v.set(x,jd(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
682
|
+
1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,jd(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Hf(c,"ContentProtection");var z=yo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=jd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Hf(c,"Label"))&&l.length&&
|
|
683
|
+
(l=l[0],l.textContent&&(E=l.textContent));l=Hf(c,"Representation");c=l.map(function(F){if(F=iq(a,b,z,h,B,E,e,g,v,F))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=jq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ia.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
684
|
+
m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.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(F){return F.getAttribute("id")}).filter($b);return{id:b.ia.id||"__fake__"+a.G++,contentType:b.ia.contentType,language:B,uh:e,streams:c,drmInfos:z.drmInfos,oe:f,pg:k}}
|
|
685
|
+
function iq(a,b,c,d,e,f,g,h,k,l){b.I=eq(l,b.ia,null);a.u=Math.min(a.u,b.I.yb);if(!kq(b.I))return null;var m=b.V.start;b.bandwidth=Pf(l,"bandwidth",Uf)||0;var n=b.I.contentType,p=n==fc||"application"==n;n="image"==n;try{var q=function(H,I,J){return lq(a,H,I,J)};if(b.I.vc)var v=$o(b,q);else if(b.I.bb)v=fp(b,a.l);else if(b.I.wc)v=kp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.va,x=b.V.duration||0;v={Ab:function(){return Promise.resolve(Ej(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
686
|
+
throw H;}q=Hf(l,"ContentProtection");q=Bo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Hf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Hf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
687
|
+
(z=l.getAttribute("value")),!z))return null;var B;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"))&&(B="PQ");var E=b.I.id?b.aa.id+","+b.I.id:"",F={id:a.G++,originalId:b.I.id,createSegmentIndex:function(){var H,I,J;return G(function(M){if(1==M.g){I=(H=E&&b.Xa&&a.l[E])?a.l[E]:F;if(I.segmentIndex)return M.A(0);J=I;return u(M,v.Ab(),3)}J.segmentIndex=M.h;A(M)})},closeSegmentIndex:function(){F.segmentIndex&&
|
|
688
|
+
(F.segmentIndex.release(),F.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.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.I.ad,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,
|
|
689
|
+
hdr:B,tilesLayout:z,matchedStreams:[]};E&&b.Xa&&!a.l[E]&&(a.l[E]=F);return F}function Xp(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,Yp(a),4);case 4:b=d.h;za(d,3);break;case 2:c=Aa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Zp(a,b);A(d)}})}function Zp(a,b){0>a.F||a.D.O(Math.max(3,a.F-b,Ra(a.H)))}
|
|
690
|
+
function eq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ad:null,audioSamplingRate:null,yb:0};c=c||b.va;var d=Hf(a,"BaseURL"),e=d.map(Nf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Pf(a,"frameRate",Xf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Hf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
691
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Hf(a,"AudioChannelConfiguration");m=mq(m)||b.ad;p=Pf(a,"audioSamplingRate",Vf)||b.audioSamplingRate;f||(f=jq(g,h));var q=Gf(a,"SegmentBase"),v=Gf(a,"SegmentTemplate"),y=q?Pf(q,"availabilityTimeOffset",Wf)||0:0,x=v?Pf(v,"availabilityTimeOffset",Wf)||0:0;d=d&&d.length?Pf(d[0],"availabilityTimeOffset",Wf)||0:0;d=b.yb+d+y+x;return{va:ac(c,e),vc:q||b.vc,bb:Gf(a,"SegmentList")||b.bb,wc:v||b.wc,width:Pf(a,"width",Vf)||b.width,height:Pf(a,
|
|
692
|
+
"height",Vf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ad:m,audioSamplingRate:p,yb:d}}
|
|
693
|
+
function mq(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=
|
|
694
|
+
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 kq(a){var b=a.vc?1:0;b+=a.bb?1:0;b+=a.wc?1:0;if(0==b)return a.contentType==fc||"application"==a.contentType?!0:!1;1!=b&&(a.vc&&(a.bb=null),a.wc=null);return!0}
|
|
695
|
+
function nq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=ac(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=xc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
696
|
+
function cq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;D(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.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 n.A(8);
|
|
697
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,nq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,nq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
698
|
+
case 9:za(n,3);break;case 5:Aa(n);case 3:g=f.next();n.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!"),n["return"](0)}})}
|
|
699
|
+
function fq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Pf(d,"timescale",Vf)||1;d=t(Hf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Pf(k,"presentationTime",Vf)||0,m=Pf(k,"duration",Vf)||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))}}
|
|
700
|
+
function lq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=ef,f=Uj(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 jq(a,b){return $c(Uc(a,b))?fc:a.split("/")[0]}L("shaka.dash.DashParser",Wp);Qg.mpd=function(){return new Wp};Og["application/dash+xml"]=function(){return new Wp};Og["video/vnd.mpeg.dash.mpd"]=function(){return new Wp};function oq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function pq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}pq.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};
|
|
701
|
+
pq.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 qq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function rq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function sq(a,b){this.name=a;this.value=b};function tq(a,b){return a.filter(function(c){return c.name==b})}function uq(a,b){return a.filter(function(c){return qq(c,"TYPE")==b})}function vq(a,b){var c=tq(a,b);return c.length?c[0]:null}function wq(a){var b=0;b=void 0===b?0:b;return(a=vq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function xq(a,b){return ac([a],[b])[0]};function yq(a){this.h=a;this.g=0}function zq(a){Aq(a,/[ \t]+/gm)}function Aq(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 Bq(a){return a.g==a.h.length?null:(a=Aq(a,/[^ \t\n]*/gm))?a[0]:null};function Cq(){this.g=0}
|
|
702
|
+
function Dq(a,b,c){b=xc(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 O(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=Eq(a,g),--a.g,Fq.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=Eq(a,h);if(Gq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
|
|
703
|
+
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=Eq(a,m),Fq.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=xq(d,m.trim()),h&&g.push(h),e.push(new rq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new rq("",g,k)));return new oq(c,b,f,e)}f.push(h);
|
|
704
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new sq("URI",k)),e=!0)}}return new oq(c,b,f)}function Eq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new yq(f);var h;(h=Aq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Aq(f,k);)d.push(new sq(h[1],h[2]||h[3])),zq(f)}return new pq(c,e,d,g)}
|
|
705
|
+
var Fq="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(" "),Gq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Hq(){}function Iq(a){try{var b=Jq(a);return Ke({uri:a,Ne:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ie(c)}}function Jq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=Gc(a):e=Bc(a);return{data:e,contentType:c}}
|
|
706
|
+
L("shaka.net.DataUriPlugin",Hq);Hq.parse=Iq;We("data",Iq);function Kq(){var a=this;this.g=this.i=null;this.Ea=1;this.o=new Map;this.u=new Map;this.F=new Map;this.F.set("video",new Map);this.F.set("audio",new Map);this.F.set(fc,new Map);this.F.set("image",new Map);this.ta=new Set;this.h=new Map;this.j=null;this.N="";this.X=new Cq;this.P=0;this.B=-1;this.M=Infinity;this.Ka=!1;this.m=new Q(function(){Lq(a)});this.ha=Mq;this.D=null;this.da=0;this.H=Infinity;this.W=this.ea=0;this.G=new Te;this.K=new Map;this.s=new Map;this.ca=new Map;this.l=!1}r=Kq.prototype;
|
|
707
|
+
r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,Nq(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,Oq(c,d.data,a),3)):e["return"](c.D)})};r.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ta.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
708
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!Pq(a))return m["return"]();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Qq(a,g));return u(m,Promise.all(b),2)}Rq(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.lc});d.length&&!h&&(k=Sq,Tq(a,k.ef),l=c.map(function(n){return n.Za}),a.j.Ia(Math.min.apply(Math,ia(l))),a.i.updateDuration());A(m)})};
|
|
709
|
+
function Uq(a,b){return Pq(a)?a.F.get(b.type):b.$c}
|
|
710
|
+
function Qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){if(1==z.g)return c=b.Ic,d=new Jb(c),a.l&&b.Lc&&Mb(d,new Ob("_HLS_skip=YES")),u(z,Nq(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z["return"]();f=Dq(a.X,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=tq(f.g,"EXT-X-DEFINE");h=Vq(a,g);k=b.stream;l=Uq(a,b);m=Wq(f,k.mimeType);n=m.keyIds;p=m.drmInfos;q=function(B,E){return B.size===E.size&&[].concat(ia(B)).every(function(F){return E.has(F)})};q(k.keyIds,n)||(k.keyIds=
|
|
711
|
+
n,k.drmInfos=p,a.i.newDrmInfo(k));v=Xq(a,f,k.type,l,h);k.segmentIndex.Gb(v,a.j.Oa());v.length&&(y=wq(f.g),x=l.get(y),k.segmentIndex.fb(x));w=v[v.length-1];if(C=vq(f.g,"EXT-X-ENDLIST"))b.lc=!0,b.Za=w.endTime;A(z)})}r.onExpirationUpdated=function(){};
|
|
712
|
+
function Yq(a,b){for(var c=-1==a.B,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Uq(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.B=Math.max(a.B,k));e.Dd=k;break}}}}if(!(0>a.B))for(c=t(b),e=c.next();!e.done;e=c.next())if(d=e.value,e=d.stream.segmentIndex)e.g.splice(0,a.B-d.Dd),(e=e.g[0]||null)&&Zq(a,d,-e.startTime)}
|
|
713
|
+
function $q(a,b){if(Infinity==a.M)for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value.stream.segmentIndex.g[0]||null;null!=e&&null!=e.g&&(a.M=Math.min(a.M,e.g))}c=a.M;if(Infinity!=c)for(e=t(a.h.values()),d=e.next();!d.done;d=e.next()){d=d.value;var f=d.stream.segmentIndex;null!=f&&(f=f.g[0]||null,null==f.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.zc,"Expect AV sync issues!"):Zq(a,d,f.g-c-f.startTime))}}
|
|
714
|
+
function Zq(a,b,c){b.stream.segmentIndex.offset(c);b.Za+=c;a=Uq(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
|
|
715
|
+
function Oq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va;return G(function(ka){switch(ka.g){case 1:d=Dq(a.X,b,a.N);e=tq(d.g,"EXT-X-DEFINE");for(var na=t(e),R=na.next();!R.done;R=na.next()){var ya=R.value;R=Z(ya,"NAME");ya=Z(ya,"VALUE");R&&ya&&(a.o.has(R)||a.o.set(R,ya))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Jb(d.segments[0].i),I=H.qa.split(".").pop(),(J=ar[I])&&(F=J)),M=F.split(";")[0],P=M.split("/")[0],K=Yc(F),
|
|
716
|
+
Y=new Map,u(ka,br(a,d,c,c,K,P,"",!0,"Media Playlist",null,Y,null,!1,!1,M),5);k=tq(d.g,"EXT-X-MEDIA");l=tq(d.g,"EXT-X-STREAM-INF");m=tq(d.g,"EXT-X-IMAGE-STREAM-INF");n=tq(d.g,"EXT-X-SESSION-KEY");na=t(l);for(R=na.next();!R.done;R=na.next()){var Ub=R.value;ya=Z(Ub,"AUDIO");R=Z(Ub,"VIDEO");var nb=Z(Ub,"SUBTITLES");Ub=cr(a,Ub);if(nb){var An=dc(fc,Ub);a.s.set(nb,An);eb(Ub,An)}ya&&(nb=dc("audio",Ub),nb||(nb=a.g.hls.defaultAudioCodec),a.s.set(ya,nb));R&&(ya=dc("video",Ub),ya||(ya=a.g.hls.defaultVideoCodec),
|
|
717
|
+
a.s.set(R,ya))}p=tq(d.g,"EXT-X-SESSION-DATA");q=t(p);for(v=q.next();!v.done;v=q.next())if(y=v.value,x=Z(y,"DATA-ID"),w=Z(y,"URI"),C=Z(y,"LANGUAGE"),z=Z(y,"VALUE"),B=(new Map).set("id",x),w&&B.set("uri",xq(a.N,w)),C&&B.set("language",C),z&&B.set("value",z),E=new S("sessiondata",B),a.i)a.i.onEvent(E);dr(a,k);na=uq(k,"CLOSED-CAPTIONS");na=t(na);for(R=na.next();!R.done;R=na.next())nb=R.value,R=er(nb),ya=qq(nb,"GROUP-ID"),nb=qq(nb,"INSTREAM-ID"),a.K.get(ya)||a.K.set(ya,new Map),a.K.get(ya).set(nb,R);f=
|
|
718
|
+
fr(a,l,n);g=gr(a,k);return u(ka,hr(a,m),4);case 4:h=ka.h;ka.A(3);break;case 5:ba=ka.h,a.h.set(c,ba),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==P?ba.stream:null,video:"video"==P?ba.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.j=new T(null,0);a.j.xc(!0);1==d.type&&(Pq(a)&&(ir(a),sa=a.P,a.m.O(sa)),va=Array.from(a.h.values()),jr(a,va),kr(a));a.D={presentationTimeline:a.j,variants:f,textStreams:g,
|
|
719
|
+
imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.D);A(ka)}})}function kr(a){if(Pq(a)){if(a.P=a.H,a.ha==lr){var b=mr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.le(b)}}else a.j.Ia(mr(a));a.j.Md()}
|
|
720
|
+
function Vq(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}
|
|
721
|
+
function gr(a,b){var c=uq(b,"SUBTITLES"),d=c.map(function(h){if(a.g.disableText)return null;try{return nr(a,h).stream}catch(k){if(a.g.hls.ignoreTextStreamFailures)return null;throw k;}});c=t(c);for(var e=c.next();!e.done;e=c.next()){var f=qq(e.value,"GROUP-ID");if(e=a.s.get(f))if(f=a.u.get(f)){f=t(f);for(var g=f.next();!g.done;g=f.next())g.value.stream.codecs=e}}return d.filter(function(h){return h})}
|
|
722
|
+
function hr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);D(l,2);return u(l,or(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=Aa(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
723
|
+
function dr(a,b){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});for(var c=t(b),d=c.next();!d.done;d=c.next())nr(a,d.value)}
|
|
724
|
+
function fr(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=qq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=pr[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(qq(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,q=n.next().value,
|
|
725
|
+
v=Z(k,"VIDEO-RANGE");k=qr(a,k);n=k.audio;k=k.video;for(var y=t(k),x=y.next();!x.done;x=y.next())if(x=x.value.stream)x.width=Number(p)||void 0,x.height=Number(q)||void 0,x.frameRate=Number(l)||void 0,x.hdr=v||void 0;l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,q=t(k),v=q.next();!v.done;v=q.next()){var w=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(y=w?w.stream:null)y.drmInfos=d,y.keyIds=
|
|
726
|
+
e;x=p?p.stream.drmInfos:null;var C=w?w.stream.drmInfos:null;w=(w?w.zc:"")+" - "+(p?p.zc:"");v&&y&&x.length&&C.length&&!(0<Kg(x,C).length)||a.ta.has(w)||(v={id:a.Ea++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ta.add(w))}return l}).reduce(Yb,[]);return b=b.filter(function(k){return null!=k})}
|
|
727
|
+
function qr(a,b){var c=cr(a,b),d=Z(b,"AUDIO"),e=Z(b,"VIDEO"),f=d||e;f=f&&a.u.has(f)?a.u.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=qq(b,"URI"),h=d.audio.find(function(m){return m&&m.zc==g}),k=dc("video",c),l=dc("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length?"audio":"video";e||(c=rr(a,b,c,f),d[c.stream.type]=[c]);return d}
|
|
728
|
+
function cr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.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=Xc(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function er(a){a=Z(a,"LANGUAGE")||"und";return jd(a)}
|
|
729
|
+
function nr(a,b){var c=qq(b,"GROUP-ID"),d="",e=qq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=fc);var f=e;f!=fc&&c&&a.s.has(c)&&(d=a.s.get(c));e=sr(qq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=er(b),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Z(b,"CHARACTERISTICS"),p="YES"==Z(b,"FORCED");d=tr(a,e,d,f,g,k,h,l,null,n,p,m);a.u.has(c)?a.u.get(c).push(d):a.u.set(c,
|
|
730
|
+
[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
|
|
731
|
+
function or(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g){c=sr(qq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=er(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=tr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?p["return"](a.h.get(c)):(k=Z(b,"RESOLUTION"))?u(p,h.stream.createSegmentIndex(),3):p.A(2)}2!=p.g&&(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=
|
|
732
|
+
Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}function rr(a,b,c,d){var e=sr(qq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);b=Z(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.K.get(b):null;c=cc(d,c);d=tr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
|
|
733
|
+
function tr(a,b,c,d,e,f,g,h,k,l,m,n){function p(C){var z,B,E,F,H,I,J,M,P,K,Y,ba,sa;return G(function(va){if(1==va.g)return u(va,Nq(a,y.Ic),2);if(3!=va.g){z=va.h;if(C.aborted)return va["return"]();B=z.uri;E=Dq(a.X,z.data,B);F=Pq(a);return u(va,br(a,E,b,B,c,d,e,f,g,h,k,l,m,n),3)}H=va.h;if(C.aborted)return va["return"]();I=H.stream;Pq(a)&&!F&&ir(a);y.Ic=B;y.Za=H.Za;y.Lc=H.Lc;y.lc=H.lc;y.$c=H.$c;y.Ld=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;v.kind=
|
|
734
|
+
I.kind;v.roles=I.roles;v.mimeType=I.mimeType;v.drmInfos.length&&a.i.newDrmInfo(v);J=gc;if(d==J.ua||d==J.Gc)for(M=t(a.h.values()),P=M.next();!P.done;P=M.next())K=P.value,K.Ld||K.type!=d||(K.stream.mimeType=I.mimeType);ur(a)&&(a.Ka?jr(a,[y]):(a.Ka=!0,Y=Array.from(a.h.values()),ba=Y.filter(function(ka){return ka.stream.segmentIndex}),jr(a,ba),kr(a),sa=a.P,0<sa&&a.m.O(sa)));A(va)})}var q=xq(a.N,b),v=vr(a,c,d,e,f,g,h,k,m,n);Si.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,zc:b,Ic:q,Za:0,$c:new Map,
|
|
735
|
+
Lc:!1,lc:!1,Dd:-1,Ld:!1},x=null,w=new AbortController;v.createSegmentIndex=function(){if(x)return x;w=new AbortController;return x=new Promise(function(C){C(p(w.signal))})};v.closeSegmentIndex=function(){x&&!v.segmentIndex&&w.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);x=null};return y}function mr(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Za));return b}
|
|
736
|
+
function Rq(a,b){for(var c=[],d=t(b),e=d.next();!e.done;e=d.next())e=e.value,e.segmentIndex&&Cj(e.segmentIndex,function(f){c.push(f)});a.j.Hb(c)}function jr(a,b){if(!Pq(a))for(var c=mr(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ya(0,c);c=t(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,Si.includes(e.mimeType)&&(e.codecs="");Rq(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Yq(a,b):$q(a,b)}
|
|
737
|
+
function ur(a){if(!a.D)return!1;var b=[],c=[];a=t(a.D.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
738
|
+
function br(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va,ka;return G(function(na){if(1==na.g){if(1!=b.type)throw new O(2,4,4017);y=tq(b.g,"EXT-X-DEFINE");x=Vq(a,y);var R=vq(b.g,"EXT-X-PLAYLIST-TYPE"),ya=vq(b.g,"EXT-X-ENDLIST");ya=R&&"VOD"==R.value||ya;R=R&&"EVENT"==R.value&&!ya;R=!ya&&!R;if(ya)Tq(a,Mq);else{R?Tq(a,lr):Tq(a,wr);ya=vq(b.g,"EXT-X-TARGETDURATION");if(!ya)throw new O(2,4,4024,"EXT-X-TARGETDURATION");ya=Number(ya.value);R=vq(b.g,"EXT-X-PART-INF");a.l&&R?(a.ea=
|
|
739
|
+
Number(qq(R,"PART-TARGET")),a.H=Math.min(a.ea,a.H),R=vq(b.g,"EXT-X-SERVER-CONTROL"),a.W=R?Number(qq(R,"PART-HOLD-BACK")):0):a.H=Math.min(ya,a.H);a.da=Math.max(ya,a.da)}return v?na.A(2):u(na,xr(a,f,e,b,x),3)}2!=na.g&&(v=na.h);w=Wq(b,v);C=w.drmInfos;z=w.keyIds;B=w.encrypted;E=w.jf;if(B&&!C.length&&!E)throw new O(2,4,4026);F=Pq(a)?a.F.get(f):new Map;H=Xq(a,b,f,F,x);I=H[H.length-1].endTime;J=new Bj(H);M=f==fc?"subtitle":void 0;P=[];if(n)for(K=t(n.split(",")),Y=K.next();!Y.done;Y=K.next())ba=Y.value,P.push(ba);
|
|
740
|
+
va=(sa=vq(b.g,"EXT-X-SERVER-CONTROL"))?null!=sa.getAttribute("CAN-SKIP-UNTIL"):!1;ka=vr(a,e,f,g,h,k,l,m,p,q);ka.segmentIndex=J;ka.encrypted=B;ka.drmInfos=C;ka.keyIds=z;ka.kind=M;ka.roles=P;ka.mimeType=v;return na["return"]({stream:ka,type:f,zc:c,Ic:d,Za:I,Lc:va,lc:!1,Dd:-1,$c:F,Ld:!1})})}
|
|
741
|
+
function vr(a,b,c,d,e,f,g,h,k,l){var m=yr(c,b)||(c==fc?"text/vtt":zr[c].mp4);return{id:a.Ea++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:m,codecs:b,kind:void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],forced:k,channelsCount:g,audioSamplingRate:null,spatialAudio:l,closedCaptions:h,
|
|
742
|
+
hdr:void 0,tilesLayout:void 0}}
|
|
743
|
+
function Wq(a,b){var c=[];if(a.segments)for(var d=t(a.segments),e=d.next();!e.done;e=d.next())e=tq(e.value.g,"EXT-X-KEY"),c.push.apply(c,ia(e));e=d=!1;var f=[],g=new Set;c=t(c);for(var h=c.next();!h.done;h=c.next()){h=h.value;var k=qq(h,"METHOD");if("NONE"!=k)if(d=!0,"AES-128"==k)e=!0;else if(k=Z(h,"KEYFORMAT")||"identity",h=(k=pr[k])?k(h,b):null){if(h.keyIds){k=t(h.keyIds);for(var l=k.next();!l.done;l=k.next())g.add(l.value)}f.push(h)}}return{drmInfos:f,keyIds:g,encrypted:d,jf:e}}
|
|
744
|
+
function Ar(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Hc(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=wq(c.g);b=xq(c.h,qq(b,"URI"));var g=Ze([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return G(function(m){if(1==m.g)return u(m,Br(a,g,6),2);if(3!=m.g){k=
|
|
745
|
+
m.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l=h;return u(m,window.crypto.subtle.importKey("raw",k.data,"AES-CBC",!0,["decrypt"]),3)}l.cryptoKey=m.h;h.fetchKey=void 0;A(m)})}};return h}function ir(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.W?a.W:a.da*a.g.hls.liveSegmentsDelay;a.j.We(0);a.j.Ve(b);a.j.xc(!1)}
|
|
746
|
+
function Cr(a,b,c,d){c=vq(c,"EXT-X-MAP");if(!c)return null;var e=qq(c,"URI");d=sr(xq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ca.has(b)||(c=Dr(d,c),a.ca.set(b,c));return a.ca.get(b)}function Dr(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 ii(function(){return[a]},c,d)}
|
|
747
|
+
function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=sr(d.i,f),n=vq(l,"EXTINF"),p=f=0,q=null;d.h.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 v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=vq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Qf(y.value))}y=li;vq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new O(2,4,4024,"EXTINF");
|
|
748
|
+
if(!a.l)return null}var x=[];if(a.l)for(var w={},C=0;C<d.h.length;w={qd:w.qd},C++){var z=d.h[C],B=0==C?c:x[x.length-1],E=0==C?e:B.endTime,F=Number(Z(z,"DURATION"))||a.ea;if(F){F=E+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=t(Fr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.qd=xq(g,B),B=li,"YES"==Z(z,"GAP")&&(B=2),x.push(new ki(E,F,function(J){return function(){return[J.qd]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
|
|
749
|
+
f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=vq(l,"EXT-X-BYTERANGE"))?(q=t(Fr(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Aa,q=x[x.length-1].ka);c="";a=null;"image"==h&&(c="1x1",h=vq(l,"EXT-X-TILES"))&&(c=qq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new ki(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function Fr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+d-1);return[c,d]}
|
|
750
|
+
function Xq(a,b,c,d,e){var f=b.segments,g=void 0,h=wq(b.g),k=vq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;Pq(a)&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==qq(w,"METHOD")&&(g=Ar(a,w,b));d.set(l,y);x=Cr(a,b.h,v.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());(p=v=Er(a,x,p,v,y,
|
|
751
|
+
e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.B&&l<a.B||n.push(v))}if(a=n.some(function(C){return null!=C.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,Ac:b.Ac,Ua:b.Ua,Nb:b.Nb},c++)if(b.Ua=n[c],null==b.Ua.g)for(b.Ob=0,b.Pb=c,d=function(C){return function(){var z=n[C.Pb];if(z){if(null!=z.g)return z.g+C.Ob;C.Ob-=z.endTime-z.startTime;C.Pb+=1}return null}}(b),b.Nb=0,b.Ac=c,e=function(C){return function(){var z=n[C.Ac];if(z){z!=C.Ua&&(C.Nb+=z.endTime-z.startTime);if(null!=z.g)return z.g+
|
|
752
|
+
C.Nb;--C.Ac}return null}}(b);null==b.Ua.g;)b.Ua.g=e(),null==b.Ua.g&&(b.Ua.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=t(c.i),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}function sr(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 O(2,4,4039,f);}}return c}
|
|
753
|
+
function yr(a,b){if(a==fc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
|
|
754
|
+
function xr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v;return G(function(y){if(1==y.g){f=ef;g=Math.trunc((d.segments.length-1)/2);h=sr(d.segments[g].i,e);k=new Jb(h);l=k.qa.split(".").pop();m=zr[b];if((n=m[l])||(n=ar[l])||(n=yr(b,c)))return y["return"](n);p=Ze([h],a.g.retryParameters);p.method="HEAD";return u(y,Br(a,p,f),2)}q=y.h;return(v=q.headers["content-type"])?y["return"](v.split(";")[0]):y["return"](b==fc?"text/vtt":zr[b].mp4)})}
|
|
755
|
+
function Nq(a,b){var c=Ze([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Br(a,c,0)}function Lq(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d["return"]();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return Pq(a)&&(b=a.P,a.m.O(b)),za(d,0);c=Aa(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.m.O(.1);A(d)})}function Pq(a){return a.ha!=Mq}function Tq(a,b){a.ha=b;a.j&&a.j.xc(!Pq(a));Pq(a)||a.m.stop()}
|
|
756
|
+
function Br(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);Ue(a.G,b);return b.promise}L("shaka.hls.HlsParser",Kq);
|
|
757
|
+
var ar={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},zr={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"},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",webvtt:"txt/vtt",
|
|
758
|
+
ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},pr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return bc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
759
|
+
b=qq(a,"URI");b=Jq(b);b=N(b.data);b=bc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=qq(a,"URI");a=Jq(a);a=N(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ff(a,b,new Set,0);return bc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
|
|
760
|
+
qq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?bc("org.w3.clearkey",null):null}},Mq="VOD",wr="EVENT",lr="LIVE",Sq={ef:Mq,Og:wr,Tg:lr};oc("Tizen 3")||oc("Tizen 2")||qc()||(Qg.m3u8=function(){return new Kq},Og["application/x-mpegurl"]=function(){return new Kq},Og["application/vnd.apple.mpegurl"]=function(){return new Kq});function Gr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ne:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ac(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Hr(){}function Ir(a,b,c,d,e){var f=new Jr;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Kr,h={we:!1,af:!1};a=Lr(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.we=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.af=!0;g.abort()});k.O(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
761
|
+
function Lr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:return h=Mr,k=Nr,p=n=0,q=Date.now(),D(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(Or(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(E){function F(){var H,I;return G(function(J){switch(J.g){case 1:return D(J,2),u(J,v.read(),4);case 4:H=J.h;za(J,3);break;case 2:return Aa(J),J["return"]();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
|
|
762
|
+
break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),F());A(J)}})}F()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;za(B,3);break;case 2:C=Aa(B);if(d.we)throw new O(1,1,7001,a,b);if(d.af)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,C,b);case 3:return z=Or(l.headers),B["return"](Gr(z,m,l.status,a,l.url,b))}})}function Or(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
763
|
+
function Pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Hr);Hr.isSupported=Pr;Hr.parse=Ir;var Mr=window.fetch,Kr=window.AbortController,Nr=window.ReadableStream,Jr=window.Headers;Pr()&&(We("http",Ir,2,!0),We("https",Ir,2,!0),We("blob",Ir,2,!0));function Qr(){}
|
|
764
|
+
function Rr(a,b,c,d,e){var f=new Sr,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 O(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Tr(f);e(q);n=!0}};f.onload=function(){var q=Tr(f),v=f.response;try{var y=Gr(q,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(q){m(new O(1,1,1002,a,q,
|
|
765
|
+
c))};f.ontimeout=function(){m(new O(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 p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new He(k,function(){f.abort();return Promise.resolve()})}
|
|
766
|
+
function Tr(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}L("shaka.net.HttpXHRPlugin",Qr);Qr.parse=Rr;var Sr=window.XMLHttpRequest;We("http",Rr,1,!0);We("https",Rr,1,!0);We("blob",Rr,1,!0);function Ur(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Vr(a){return a.xa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ka}function Wr(a,b){return Uj(a.g.xa(),a.g.Aa,a.g.ka,b.streaming.retryParameters)};function Xr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Yr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Xr.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 Zr(a){var b=this;this.o=a;this.j=new Map;this.i=new ff(function(){return $r(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Xr}Zr.prototype.destroy=function(){return this.i.destroy()};function as(a,b,c){a.m=b;a.l=c}function $r(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
767
|
+
function bs(a,b,c,d,e,f){gf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return G(function(v){if(1==v.g)return u(v,cs(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=N(h),l=new Ef(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ds(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
|
|
768
|
+
function cs(a,b){var c,d,e,f;return G(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 es(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new hc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}es.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);A(b)})};
|
|
769
|
+
function fs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(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"]();A(g)})}})}es.prototype.store=function(){return this.h};es.prototype.promise=function(){return this.g};function gs(a){this.h=a;this.g=[]}gs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function hs(a,b){return is(a,b,"readwrite")}function is(a,b,c){c=a.h.transaction([b],c);var d=new es(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function js(a,b,c){this.h=new gs(a);this.i=b;this.g=c}r=js.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return ks(this.i)};r.removeSegments=function(a,b){return ls(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,ms(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.xe(e)}))})};r.addManifests=function(){return ks(this.g)};
|
|
770
|
+
r.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function ns(a,b,c){a=hs(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=hs(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 ls(this,this.g,a,b)};
|
|
771
|
+
r.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,ms(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 G(function(d){return 1==d.g?(b=is(a.h,a.g,"readonly"),c=new Map,u(d,fs(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.xe=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
|
|
772
|
+
function ks(a){return Promise.reject(new O(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 G(function(m){if(1==m.g){d=hs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Ec:g.Ec},k=h.next())l=k.value,g.Ec=e.add(l),g.Ec.onsuccess=function(n){return function(){f.push(n.Ec.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
773
|
+
function ls(a,b,c,d){a=hs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Dc:e.Dc},f=c.next())e.Dc=f.value,b["delete"](e.Dc).onsuccess=function(g){return function(){return d(g.Dc)}}(e);return a.promise()}
|
|
774
|
+
function ms(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Ub:h.Ub,Sb:h.Sb},l=k.next())h.Sb=l.value,h.Ub=e.get(h.Sb),h.Ub.onsuccess=function(n){return function(){void 0==n.Ub.result&&g.push(n.Sb);f[n.Sb]=n.Ub.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function os(a){this.g=new gs(a)}os.prototype.destroy=function(){return this.g.destroy()};os.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=is(a.g,"session-ids","readonly"),c=[],u(d,fs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};os.prototype.add=function(a){var b=hs(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()};
|
|
775
|
+
os.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=hs(b.g,"session-ids"),u(d,fs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ps(){this.g=new Map}ps.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)};ps.prototype.init=function(){var a=this;qs.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)};
|
|
776
|
+
function rs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{za:d,ja:f},ja:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({za:d,ja:f},e)})})}
|
|
777
|
+
function ts(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function us(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vs(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
778
|
+
function ws(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=qs,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 xs(a,b){qs.set(a,b)}L("shaka.offline.StorageMuxer",ps);ps.unregister=function(a){qs["delete"](a)};ps.register=xs;ps.prototype.destroy=ps.prototype.destroy;var qs=new Map;function ys(){js.apply(this,arguments)}ra(ys,js);ys.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=hs(c.h,c.g);e=d.store();f=new hc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
779
|
+
ys.prototype.bc=function(a){var b,c,d,e,f,g;return G(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=zs(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})})};
|
|
780
|
+
function zs(a,b){As(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Bs(e,a.startTime,b)})}
|
|
781
|
+
function Bs(a,b,c){var d=a.initSegmentUri?Cs(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=Cs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
782
|
+
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}}ys.prototype.xe=function(a){return{data:a.data}};function Cs(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 O(2,9,9004,"Could not parse uri "+a);}
|
|
783
|
+
function As(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++,
|
|
784
|
+
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 Ds(){js.apply(this,arguments)}ra(Ds,js);
|
|
785
|
+
Ds.prototype.bc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Es(n,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==
|
|
754
786
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
755
|
-
function
|
|
756
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
757
|
-
r.init=function(){var a=this,b=new
|
|
758
|
-
new
|
|
759
|
-
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return
|
|
787
|
+
function Es(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,
|
|
788
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Fs(){js.apply(this,arguments)}ra(Fs,js);r=Fs.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 ns(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Gs(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Gs.prototype;
|
|
789
|
+
r.init=function(){var a=this,b=new hc,c=!1,d=new Q(function(){c=!0;b.reject(new O(2,9,9017))});d.O(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ys(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ds(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
790
|
+
new Ds(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Fs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new os(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
|
|
791
|
+
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return G(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(),A(b)}})};
|
|
760
792
|
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};
|
|
761
|
-
r.erase=function(){var a=this;return
|
|
762
|
-
function
|
|
763
|
-
function
|
|
764
|
-
function
|
|
793
|
+
r.erase=function(){var a=this;return G(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,Hs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
794
|
+
function Hs(){var a=new hc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}xs("idb",function(){return oc("CrKey")||nc()||!window.indexedDB?null:new Gs});function Is(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Is.prototype.za=function(){return this.i};Is.prototype.ja=function(){return this.h};Is.prototype.key=function(){return this.l};Is.prototype.toString=function(){return this.j};
|
|
795
|
+
function Js(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 Is(b,c,d,Number(a[4])):null};function Ks(a,b){this.h=a;this.g=b}
|
|
796
|
+
function Ls(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ms(a,d,e,c);e=b.streams.filter(function(l){return l.type==fc}).map(function(l){return Ns(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ns(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=
|
|
765
797
|
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}}
|
|
766
|
-
function
|
|
767
|
-
b.next())for(e=e.value,g=
|
|
768
|
-
function
|
|
769
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
770
|
-
function
|
|
771
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return
|
|
772
|
-
r.update=function(){};
|
|
773
|
-
|
|
774
|
-
function
|
|
775
|
-
function
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
function
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
function
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
(
|
|
788
|
-
|
|
789
|
-
d
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
function
|
|
795
|
-
function
|
|
796
|
-
function
|
|
797
|
-
function
|
|
798
|
-
|
|
799
|
-
function
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
function
|
|
803
|
-
function
|
|
804
|
-
|
|
805
|
-
tilesLayout:
|
|
806
|
-
function
|
|
807
|
-
function
|
|
808
|
-
function
|
|
809
|
-
function
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
function
|
|
814
|
-
|
|
815
|
-
function
|
|
816
|
-
function
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
function
|
|
821
|
-
function
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
function
|
|
798
|
+
function Ms(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=
|
|
799
|
+
b.next())for(e=e.value,g=Ns(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=Ns(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}
|
|
800
|
+
function Ns(a,b,c){var d=b.segments.map(function(e){return Os(a,e)});c.Hb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj(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,
|
|
801
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Os(a,b){var c=new Is("segment",a.h,a.g,b.dataKey);return new ki(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ps(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
802
|
+
function Ps(a,b){var c=new Is("segment",a.h,a.g,b);return new ii(function(){return[c.toString()]},0,null)};function Qs(){this.g=null}r=Qs.prototype;r.configure=function(){};
|
|
803
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=Js(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new ps;xa(m);return u(m,e.init(),4);case 4:return u(m,ts(e,d.za(),d.ja()),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 Ks(d.za(),d.ja()),l=Ls(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return Ba(m),u(m,e.destroy(),7);case 7:Ca(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
804
|
+
r.update=function(){};
|
|
805
|
+
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new ps,D(m,2,3),u(m,e.init(),5);case 5:return u(m,ts(e,d.za(),d.ja()),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 Ba(m),u(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.A(3)}})};
|
|
806
|
+
Og["application/x-offline-manifest"]=function(){return new Qs};function Rs(){}function Ss(a){var b=Js(a);b&&"manifest"==b.g?(a={uri:a,Ne:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ke(a)):a=b&&"segment"==b.g?Ts(b.key(),b):Ie(new O(2,1,9004,a));return a}
|
|
807
|
+
function Ts(a,b){var c=new ps;return Ke(void 0).Y(function(){return c.init()}).Y(function(){return ts(c,b.za(),b.ja())}).Y(function(d){return d.getSegments([b.key()])}).Y(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Rs);Rs.plugin=Ss;We("offline",Ss);function Us(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Vs(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ws(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)}})}
|
|
808
|
+
function Ws(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new ag({lb:b,onError:function(){},cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,ig(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return D(f,6),u(f,tg(d),8);case 8:za(f,7);break;case 6:return Aa(f),u(f,d.destroy(),
|
|
809
|
+
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return D(h,2),u(h,ug(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
810
|
+
function Vs(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 Xs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ys(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zs(a,b){var c=Ls(new Ks(a.za(),a.ja()),b),d=b.appMetadata||{};c=Ys(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}}
|
|
811
|
+
function Ys(a){var b=[],c=ee(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Wd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Xd(c.value));return b};function $s(){this.g={}}function at(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 bt(a,b){a.g[b.id]=b.bandwidth||2048}function ct(a,b){var c=a.g[b];null==c&&(c=0);return c};function dt(a){var b=this;if(a&&a.constructor!=U)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.ic()):(this.h=ql(),this.g=new Ve);this.i=[];this.j=[];var c=!a;this.l=new ff(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return $r(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);
|
|
812
|
+
case 4:b.h=null,b.g=null,A(k)}})})}function et(){if(kc())a:{var a=t(qs.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=dt.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));return sl(this.h,a)};r.getConfiguration=function(){var a=ql();sl(a,this.h,ql());return a};r.ic=function(){return this.g};
|
|
813
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zr(this.g);this.j.push(f);b=ft(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,Ng(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new He(b,function(){return $r(f)});b["finally"](function(){eb(d.j,f)});return gt(this,b)};
|
|
814
|
+
function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:return ht(),h=g=null,k=new ps,n=m=l=null,D(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,it(a,b,g,e),6);case 6:p=B.h;jt(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.kb();if(!q)throw new O(2,9,9005,b);return u(B,kt(a,p,function(E){n=n||E},e),7);case 7:h=B.h;jt(a);if(n)throw n;return u(B,lt(p,e),8);case 8:return u(B,k.init(),9);case 9:return jt(a),u(B,rs(k),10);case 10:return l=B.h,jt(a),v=mt(h,
|
|
815
|
+
p,b,c,e,f),y=v.$f,x=v.ne,u(B,l.ja.addManifests([y]),11);case 11:w=B.h;jt(a);m=w[0];jt(a);if(n)throw n;return u(B,nt(a,x,m,y,f,e,l.ja,p,h),12);case 12:return jt(a),C=new Is("manifest",l.path.za,l.path.ja,m),B["return"](Zs(C,y));case 3:return Ba(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:Ca(B,0);break;case 2:z=Aa(B);if(null==m){B.A(18);break}return u(B,ot(m),18);case 18:throw n||z;}})}
|
|
816
|
+
function nt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,H,I,J,M,P,K;return G(function(Y){if(1==Y.g){F={};H=t(B);for(I=H.next();!I.done;F={eb:F.eb},I=H.next())F.eb=I.value,J=Wr(F.eb,f),M=F.eb.i,P=F.eb.h,K=function(ba){return function(sa){var va,ka,na;return G(function(R){if(1==R.g)return u(R,g.addSegments([{data:sa}]),2);va=R.h;jt(a);ka=ba.eb.g;na=Vr(ka);l[na]=va[0];m+=sa.byteLength;A(R)})}}(F),bs(e,F.eb.groupId,J,M,P,K);return u(Y,
|
|
817
|
+
ds(e),2)}if(!E)return Y.A(0);jt(a);pt(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;D(z,2);if(!qt(h)||!p||rt(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return jt(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,st(g,c,d,q,v,function(){return jt(a)}),6);case 6:jt(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return jt(a),y=l,x=m,l={},m=0,u(z,st(g,c,d,y,x,function(){return jt(a)}),9);case 9:jt(a);case 7:za(z,0);break;case 2:return w=Aa(z),
|
|
818
|
+
C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function ot(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new ps,u(f,b.init(),2);case 2:return u(f,rs(b),3);case 3:return c=f.h,d=new Is("manifest",c.path.za,c.path.ja,a),u(f,b.destroy(),4);case 4:return e=new dt,u(f,e.remove(d.toString()),0)}})}
|
|
819
|
+
function st(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:g=!1;D(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.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&&
|
|
820
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();za(w,0);break;case 2:return y=Aa(w),u(w,ot(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
|
|
821
|
+
function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba;return G(function(sa){switch(sa.g){case 1:return c={width:Infinity,height:Infinity},Fd(a,b.restrictions,c),u(sa,Jd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;td(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Wd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
|
|
822
|
+
d.push(Xd(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(Yd(x));return u(sa,b.offline.trackSelectionCallback(d),3);case 3:w=sa.h;C=a.presentationTimeline.getDuration();z=0;B=t(w);for(E=B.next();!E.done;E=B.next())F=E.value,H=F.bandwidth*C/8,z+=H;D(sa,4);return u(sa,b.offline.downloadSizeCallback(z),6);case 6:I=sa.h;if(!I)throw new O(2,9,9014);za(sa,5);break;case 4:J=Aa(sa);if(J instanceof O)throw J;throw new O(2,9,9015);case 5:M=new Set;P=new Set;K=new Set;Y=t(w);for(E=
|
|
823
|
+
Y.next();!E.done;E=Y.next())ba=E.value,"variant"==ba.type&&M.add(ba.id),"text"==ba.type&&P.add(ba.id),"image"==ba.type&&K.add(ba.id);a.variants=a.variants.filter(function(va){return M.has(va.id)});a.textStreams=a.textStreams.filter(function(va){return P.has(va.id)});a.imageStreams=a.imageStreams.filter(function(va){return K.has(va.id)});tt(a);A(sa)}})}
|
|
824
|
+
function mt(a,b,c,d,e,f){var g=Xs(c,b,d),h=e.offline.progressCallback;as(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&qg(a,"cenc",q)});var k=qt(b)&&!rt(b),l=null;k&&(l=ut.get(a.g.keySystem));for(var m=new $s,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())bt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())at(m,n.value);m=vt(f,m,b,e);f=m.streams;m=m.ne;p=a.g;n=e.offline.usePersistentLicense;
|
|
825
|
+
p&&n&&(p.initData=[]);return{$f:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.hc(),streams:f,sessionIds:n?zg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ne:m}}function qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
826
|
+
function rt(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 pt(a,b,c,d){b.expiration=c.hc();c=zg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(qt(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}r.remove=function(a){return wt(this,xt(this,a))};
|
|
827
|
+
function xt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:ht();c=Js(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new ps;xa(k);return u(k,e.init(),4);case 4:return u(k,ts(e,d.za(),d.ja()),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([yt(a,h,e),zt(f,d,h)]),2);case 2:return Ba(k),u(k,e.destroy(),8);case 8:Ca(k,0)}})}
|
|
828
|
+
function At(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:Uc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Uc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function yt(a,b,c){return G(function(d){return u(d,Bt(a.g,a.h.drm,c,b),0)})}
|
|
829
|
+
function zt(a,b,c){function d(){}var e=Ct(c);Zs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.og=function(){return wt(this,Dt(this))};
|
|
830
|
+
function Dt(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return ht(),b=a.g,c=a.h.drm,d=new ps,e=!1,xa(n),u(n,d.init(),4);case 4:f=[],us(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Us(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return Ba(n),u(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n["return"](!e)}})}
|
|
831
|
+
r.list=function(){return wt(this,Et())};function Et(){var a,b,c;return G(function(d){switch(d.g){case 1:return ht(),a=[],b=new ps,xa(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ss(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Zs(new Is("manifest",e.za,e.ja,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return Ba(d),u(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d["return"](a)}})}
|
|
832
|
+
function it(a,b,c,d){var e,f,g,h,k;return G(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(){},updateDuration:function(){},newDrmInfo:function(){}},
|
|
833
|
+
c.configure(d.manifest),jt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,jt(a),k=Ft(h),u(l,Promise.all(nf(k,function(m){return m.createSegmentIndex()})),3);jt(a);if(e)throw e;return l["return"](h)})}
|
|
834
|
+
function kt(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new ag({lb:a.g,onError:c,cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,fg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,tg(e),3);case 3:return u(f,sg(e),4);case 4:return f["return"](e)}})}
|
|
835
|
+
function vt(a,b,c,d){var e=new Map,f=Ft(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Gt(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()),ne:Array.from(e.values())}}
|
|
836
|
+
function Gt(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,
|
|
837
|
+
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Ht(d,c.presentationTimeline.Oa(),function(l){var m=Vr(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=ct(b,d.id)*p;p=Yr(a.g,p);f.set(m,new Ur(l,p,k,!1))}l.h&&(n=Vr(l.h),f.has(n)||(p=.5*ct(b,d.id),p=Yr(a.g,p),f.set(n,new Ur(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
|
|
838
|
+
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Ht(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 jt(a){if(a.l.g)throw new O(2,9,7001);}function ht(){if(!et())throw new O(2,9,9E3);}function wt(a,b){return G(function(c){if(1==c.g)return a.i.push(b),xa(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);Ba(c);eb(a.i,b);return Ca(c,0)})}
|
|
839
|
+
function gt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function Ct(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)}
|
|
840
|
+
function Bt(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=vs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:At(d,!1),videoCapabilities:At(d,!0)}});return u(h,Us(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)})}
|
|
841
|
+
function Ft(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}
|
|
842
|
+
function tt(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());}L("shaka.offline.Storage",dt);dt.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new ps,xa(b),u(b,ws(a),2)):5!=b.g?(Ba(b),u(b,a.destroy(),5)):Ca(b,0)})};dt.prototype.list=dt.prototype.list;
|
|
843
|
+
dt.prototype.removeEmeSessions=dt.prototype.og;dt.prototype.remove=dt.prototype.remove;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.ic;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
|
|
844
|
+
var ut=(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");
|
|
845
|
+
cn.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,lf:a},d=0;d<Kt.length;d++)if(Kt[d].priority<c.priority){Kt.splice(d,0,c);return}Kt.push(c)}L("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=t(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.lf()}catch(c){Va("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(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)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
|
|
846
|
+
function St(){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}}),
|
|
847
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Tt);document.addEventListener("webkitfullscreenerror",Tt);document.addEventListener("mozfullscreenchange",Tt);document.addEventListener("mozfullscreenerror",Tt);document.addEventListener("MSFullscreenChange",Tt);document.addEventListener("MSFullscreenError",Tt)}}
|
|
848
|
+
function Tt(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)}It.Fullscreen=Rt;Rt.install=St;Jt(St);function Ut(){}function Vt(){var a=!0;if(rc()||oc("PlayStation 5")||sc()||oc("Web0S")||pc()||oc("CrKey")||oc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Wt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Xt)}
|
|
849
|
+
function Xt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!kc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=lc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
850
|
+
l=lc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
|
|
851
|
+
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);D(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;za(w,4);break;case 3:Aa(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}It.MediaCapabilities=Ut;Ut.install=Vt;var Wt=null;Ut.originalMcap=Wt;Jt(Vt,-1);function Yt(){}function Zt(){var a=tc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?$t():a?12>=a?(au(),bu()):au():(oc("Tizen 2")||oc("Tizen 3")||oc("Tizen 4"))&&cu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&du()}
|
|
852
|
+
function au(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function bu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Xc(b)[0]&&a(b)}}
|
|
853
|
+
function $t(){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)}}
|
|
854
|
+
function du(){var a=MediaSource.isTypeSupported;oc("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)})}It.MediaSource=Yt;Yt.install=Zt;Jt(Zt);function eu(){}function fu(){screen.orientation||void 0!=window.orientation&&gu()}function gu(){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 hu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}It.Orientation=eu;
|
|
855
|
+
eu.install=fu;function hu(){Qe.call(this);this.type="";this.angle=0}ra(hu,Qe);
|
|
856
|
+
hu.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)};
|
|
857
|
+
hu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Jt(fu);function iu(){}function ju(a,b){try{var c=new ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function lu(a){var b=this.mediaKeys;b&&b!=a&&mu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?mu(a,this):Promise.resolve()}function nu(a){a=N(a.initData);if(Hb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=yc(a.subarray(4),!0);a=Bc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fb(a);this.dispatchEvent(b)}
|
|
858
|
+
It.PatchedMediaKeysApple=iu;iu.uninstall=function(){this.g&&(this.g=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",this.h),HTMLMediaElement.prototype.setMediaKeys=this.i,window.MediaKeys=this.m,window.MediaKeySystemAccess=this.l,navigator.requestMediaKeySystemAccess=this.j,this.h=this.j=this.i=this.l=this.m=null,window.shakaMediaKeysPolyfill=!1)};
|
|
859
|
+
iu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)this.g=!0,this.h=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),this.i=HTMLMediaElement.prototype.setMediaKeys,this.m=window.MediaKeys,this.l=window.MediaKeySystemAccess,this.j=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=lu;window.MediaKeys=ou;window.MediaKeySystemAccess=
|
|
860
|
+
ku;navigator.requestMediaKeySystemAccess=ju;window.shakaMediaKeysPolyfill=!0}};
|
|
861
|
+
function ku(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
827
862
|
k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
828
|
-
|
|
829
|
-
function
|
|
830
|
-
r.generateRequest=function(a,b){var c=this;this.h=new
|
|
831
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
832
|
-
r.update=function(a){this.g=new
|
|
833
|
-
function
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
function
|
|
837
|
-
function
|
|
863
|
+
ku.prototype.createMediaKeys=function(){var a=new ou(this.keySystem);return Promise.resolve(a)};ku.prototype.getConfiguration=function(){return this.g};function ou(a){this.h=new WebKitMediaKeys(a);this.g=new hf}ou.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new pu(this.h,a)};ou.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
864
|
+
function mu(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",nu);try{return lj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function pu(a){Qe.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hf;this.sessionId="";this.expiration=NaN;this.closed=new hc;this.keyStatuses=new qu}ra(pu,Qe);r=pu.prototype;
|
|
865
|
+
r.generateRequest=function(a,b){var c=this;this.h=new hc;try{var d=this.l.createSession("video/mp4",N(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Db()?"license-request":"license-renewal").set("message",Fb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(ru(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
|
|
866
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ru(c,"output-not-allowed");break;default:ru(c,"internal-error")}});ru(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
867
|
+
r.update=function(a){this.g=new hc;try{this.i.update(N(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ru(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}
|
|
868
|
+
function qu(){this.size=0;this.g=void 0}r=qu.prototype;r.Db=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Lg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Lg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function su(){}function tu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=uu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vu,window.MediaKeys=wu,window.MediaKeySystemAccess=xu,window.shakaMediaKeysPolyfill=!0)}function uu(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
869
|
+
function vu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}It.PatchedMediaKeysNop=su;su.install=tu;function wu(){throw new TypeError("Illegal constructor.");}wu.prototype.createSession=function(){};wu.prototype.setServerCertificate=function(){};function xu(){this.keySystem="";throw new TypeError("Illegal constructor.");}xu.prototype.getConfiguration=function(){};xu.prototype.createMediaKeys=function(){};Jt(tu,-10);function yu(){}
|
|
870
|
+
function zu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Au="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Bu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Cu;window.MediaKeys=Du;window.MediaKeySystemAccess=Eu;window.shakaMediaKeysPolyfill=!0}}
|
|
871
|
+
function Fu(a){var b=Au;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Bu(a,b){try{var c=new Eu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Cu(a){var b=this.mediaKeys;b&&b!=a&&Gu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Gu(a,this);return Promise.resolve()}It.PatchedMediaKeysWebkit=yu;yu.install=zu;
|
|
872
|
+
function Eu(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),
|
|
838
873
|
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"]):
|
|
839
|
-
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;}
|
|
840
|
-
function
|
|
841
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=
|
|
842
|
-
function
|
|
843
|
-
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?
|
|
844
|
-
function
|
|
845
|
-
function
|
|
846
|
-
function
|
|
847
|
-
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=
|
|
848
|
-
r.forEach=function(a){this.g&&a(this.g,
|
|
849
|
-
function
|
|
850
|
-
function
|
|
851
|
-
function
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?
|
|
855
|
-
null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),
|
|
856
|
-
2,2001,"<p> can only be inside <div> in TTML");n=t(
|
|
857
|
-
function
|
|
858
|
-
a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=
|
|
859
|
-
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
860
|
-
(g=
|
|
861
|
-
function
|
|
862
|
-
f))a.backgroundColor=g;if(g=
|
|
863
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=
|
|
864
|
-
|
|
865
|
-
function
|
|
866
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function
|
|
867
|
-
function
|
|
868
|
-
function
|
|
869
|
-
function
|
|
870
|
-
function
|
|
871
|
-
function
|
|
872
|
-
function
|
|
873
|
-
var
|
|
874
|
-
end:"end"},
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
f/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
|
|
878
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
879
|
-
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=
|
|
880
|
-
!0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new
|
|
881
|
-
h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");
|
|
882
|
-
function
|
|
883
|
-
d}else b.payload=a}function
|
|
884
|
-
function
|
|
885
|
-
"italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=
|
|
886
|
-
function
|
|
887
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
888
|
-
function
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
c+q.
|
|
892
|
-
function
|
|
893
|
-
function
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
897
|
-
function
|
|
874
|
+
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;}Eu.prototype.createMediaKeys=function(){var a=new Du(this.g);return Promise.resolve(a)};Eu.prototype.getConfiguration=function(){return this.h};function Du(a){this.l=a;this.h=null;this.g=new hf;this.i=[];this.j=new Map}
|
|
875
|
+
function Gu(a,b){a.h=b;a.g.nb();var c=Au;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=Hu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Db()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=Hu(a,d.sessionId))Iu(d,"usable"),
|
|
876
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=Hu(a,d.sessionId);e&&e.handleError(d)}))}Du.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 Ju(b,this.l,a);this.i.push(a);return a};Du.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
877
|
+
function Hu(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 Ju(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 hc;this.keyStatuses=new Ku}ra(Ju,Qe);r=Ju.prototype;
|
|
878
|
+
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?Iu(this,"output-restricted"):1==b?Iu(this,"expired"):Iu(this,"internal-error"))};
|
|
879
|
+
function Lu(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=N(Bc("LOAD_SESSION|"+c));else{var e=Bc("PERSISTENT|");d=Jc(e,b)}else d=N(b)}catch(g){return Promise.reject(g)}a.h=new hc;var f=Fu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).O(.01)}return a.h}
|
|
880
|
+
function Mu(a,b,c){if(a.g)a.g.then(function(){return Mu(a,b,c)})["catch"](function(){return Mu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xc(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=Gc(e.keys[0].k);e=Gc(e.keys[0].kid)}else d=N(c),e=null;var f=Fu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
881
|
+
function Iu(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 Lu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Lu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new hc;Mu(this,b,a);return b};
|
|
882
|
+
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=Fu("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 Ku(){this.size=0;this.g=void 0}r=Ku.prototype;r.Db=function(){return this.g};
|
|
883
|
+
r.forEach=function(a){this.g&&a(this.g,Lg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Lg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Au="";Jt(zu);function Nu(){}function Ou(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Pu,Object.defineProperty(a,"disablePictureInPicture",{get:Qu,set:Ru,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Su,document.addEventListener("webkitpresentationmodechanged",Tu,!0))}}
|
|
884
|
+
function Tu(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)}
|
|
885
|
+
function Pu(){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 Su(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
886
|
+
function Qu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ru(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}It.PiPWebkit=Nu;Nu.install=Ou;Jt(Ou);function Uu(){}function Vu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Wu))}function Wu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}It.RandomUUID=Uu;Uu.install=Vu;Jt(Vu);function Xu(){}function Yu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Zu)}function Zu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}It.StorageEstimate=Xu;Xu.install=Yu;Jt(Yu);function $u(){}function av(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:bv})}function bv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}It.Symbol=$u;$u.install=av;Jt(av);function cv(){}function dv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}It.VideoPlayPromise=cv;cv.install=dv;Jt(dv);function ev(){}function fv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||qc())&&(a.getVideoPlaybackQuality=gv)}}function gv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}It.VideoPlaybackQuality=ev;ev.install=fv;Jt(fv);function hv(){}function iv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=jv;else if(6==b)a=kv;else{try{var c=!!jv(1,2,"")}catch(d){c=!1}c&&(a=jv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function jv(a,b,c){return new window.TextTrackCue(a,b,c)}function kv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}It.VTTCue=hv;hv.install=iv;Jt(iv);function lv(){}lv.prototype.parseInit=function(){};lv.prototype.setSequenceMode=function(){};lv.prototype.parseMedia=function(a,b){var c=null,d=[],e=xc(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=mv.exec(f))){var g=nv.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};L("shaka.text.LrcTextParser",lv);lv.prototype.parseMedia=lv.prototype.parseMedia;
|
|
887
|
+
lv.prototype.setSequenceMode=lv.prototype.setSequenceMode;lv.prototype.parseInit=lv.prototype.parseInit;var mv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,nv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ad["application/x-subtitle-lrc"]=function(){return new lv};function ov(){}ov.prototype.parseInit=function(){};ov.prototype.setSequenceMode=function(){};
|
|
888
|
+
ov.prototype.parseMedia=function(a,b){var c=xc(a),d=[];if(""==c)return d;var e=Yf(c,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Mf(e,pv,"frameRate"),g=Mf(e,pv,"subFrameRate"),h=Mf(e,pv,"frameRateMultiplier"),k=Mf(e,pv,"tickRate"),l=Mf(e,pv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Mf(e,qv,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new rv(f,g,
|
|
889
|
+
h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Kf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;n&&(x=sv.exec(n)||tv.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=uv(v,h,"extent"))w=(C=sv.exec(w))||tv.exec(w),
|
|
890
|
+
null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),C||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=C||null!=y?Ab:0,q.heightUnits=C||null!=x?Ab:0);if(v=uv(v,h,"origin"))w=(C=sv.exec(v))||tv.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=Number(w[2]),C||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=C||null!=y?Ab:0)}else q=null;q&&k.push(q)}if(Hf(c,"p").length)throw new O(2,
|
|
891
|
+
2,2001,"<p> can only be inside <div> in TTML");n=t(Hf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Hf(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(c=vv(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
|
|
892
|
+
function vv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(wv),y=v.next();!y.done&&!(q=xv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
|
|
893
|
+
a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=vv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=yv(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=zv(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
|
|
894
|
+
c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=xv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
895
|
+
(g=xv(l,"region",f,"")[0]);Av(b,p,g,q,e,v,0==a.length);return b}
|
|
896
|
+
function Av(a,b,c,d,e,f,g){f=f||g;"rtl"==Bv(b,c,e,"direction",f)&&(a.direction="rtl");g=Bv(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=ib);(g=Bv(b,c,e,"textAlign",!0))?(a.positionAlign=Cv[g],a.lineAlign=Dv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=Bv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Bv(b,c,e,"color",f))a.color=g;if(g=Bv(b,c,e,"backgroundColor",
|
|
897
|
+
f))a.backgroundColor=g;if(g=Bv(b,c,e,"border",f))a.border=g;if(g=Bv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Bv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Bv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Bv(b,c,e,"lineHeight",f))&&g.match(Ev)&&(a.lineHeight=g);(g=Bv(b,c,e,"fontSize",f))&&(g.match(Ev)||g.match(Fv))&&(a.fontSize=g);if(g=Bv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
898
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Bv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Ev)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Ev)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Bv(b,c,e,"letterSpacing",f))&&d.match(Ev)&&(a.letterSpacing=d);(d=Bv(b,c,e,"linePadding",f))&&d.match(Ev)&&(a.linePadding=d);if(f=Bv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=uv(c,e,"textDecoration"))&&Gv(a,c);(b=
|
|
899
|
+
Hv(b,e,"textDecoration"))&&Gv(a,b)}
|
|
900
|
+
function Gv(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")||
|
|
901
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function Bv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Hv(a,c,d))?a:e?uv(b,c,d):null}function uv(a,b,c){if(!a)return null;var d=Mf(a,qv,c);return d?d:Iv(a,b,c)}function Hv(a,b,c){var d=Mf(a,qv,c);return d?d:Iv(a,b,c)}
|
|
902
|
+
function Iv(a,b,c){a=xv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Lf(a[e],"urn:ebu:tt:style",c);f||(f=Mf(a[e],qv,c));f||(f=Hv(a[e],b,c));f&&(d=f)}return d}
|
|
903
|
+
function xv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Lf(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 zv(a,b,c,d){a=yv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
904
|
+
function yv(a,b){var c=Jv(a.getAttribute("begin"),b),d=Jv(a.getAttribute("end"),b),e=Jv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
905
|
+
function Jv(a,b){var c=null;if(Kv.test(a)){c=Kv.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(Lv.test(a))c=Mv(Lv,a);else if(Nv.test(a))c=Mv(Nv,a);else if(Ov.test(a))c=Ov.exec(a),c=Number(c[1])/b.frameRate;else if(Pv.test(a))c=Pv.exec(a),c=Number(c[1])/b.g;else if(Qv.test(a))c=Mv(Qv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
906
|
+
function Mv(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)}L("shaka.text.TtmlTextParser",ov);ov.prototype.parseMedia=ov.prototype.parseMedia;ov.prototype.setSequenceMode=ov.prototype.setSequenceMode;ov.prototype.parseInit=ov.prototype.parseInit;
|
|
907
|
+
function rv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
908
|
+
var sv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Fv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ev=/^(\d+px|\d+em|\d*\.?\d+c)$/,tv=/^(\d+)px (\d+)px$/,Kv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Lv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Nv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ov=/^(\d*(?:\.\d*)?)f$/,Pv=/^(\d*(?:\.\d*)?)t$/,Qv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Dv={left:pb,center:"center",right:"end",start:pb,
|
|
909
|
+
end:"end"},Cv={left:"line-left",center:"center",right:"line-right"},pv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],qv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],wv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ad["application/ttml+xml"]=function(){return new ov};function Rv(){this.g=new ov}Rv.prototype.parseInit=function(a){var b=!1;(new vf).box("moov",zf).box("trak",zf).box("mdia",zf).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Rv.prototype.setSequenceMode=function(){};Rv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vf).box("mdat",Cf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
|
|
910
|
+
L("shaka.text.Mp4TtmlParser",Rv);Rv.prototype.parseMedia=Rv.prototype.parseMedia;Rv.prototype.setSequenceMode=Rv.prototype.setSequenceMode;Rv.prototype.parseInit=Rv.prototype.parseInit;ad['application/mp4; codecs="stpp"']=function(){return new Rv};ad['application/mp4; codecs="stpp.ttml"']=function(){return new Rv};ad['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Rv};ad['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Rv};function Sv(){this.g=!1}Sv.prototype.parseInit=function(){};Sv.prototype.setSequenceMode=function(a){this.g=a};
|
|
911
|
+
Sv.prototype.parseMedia=function(a,b){var c=xc(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 O(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=Tv(new yq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
|
|
912
|
+
f/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 yq(g);var h=new jb;Bq(g);zq(g);for(var k=Bq(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))?
|
|
913
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");zq(g);k=Bq(g)}f.push(h)}e=new Map;Uv(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 n=!1,p=0;p<k.length;p++){var q=
|
|
914
|
+
/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=sb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
|
|
915
|
+
!0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new yq(h[0]);m=Tv(k);q=Aq(k,/[ \t]+--\x3e[ \t]+/g);n=Tv(k);if(null==m||null==q||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=Vv(h.slice(1).join("\n").trim());e.has("global")?(h=e.get("global").clone(),
|
|
916
|
+
h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");Wv(p,h,e);zq(k);for(m=Bq(k);m;)Xv(h,m,f),zq(k),m=Bq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Uv(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)}
|
|
917
|
+
function Wv(a,b,c){0===c.size&&Uv(c);a=Yv(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Zv)&&d.push(e),e=-1);d=t(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=Yf("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(f);for(f=a.next();!f.done;f=a.next())$v(f.value,b,d,c);b.nestedCues=
|
|
918
|
+
d}else b.payload=a}function Yv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function aw(a,b){return a&&0<a.length?a:b}
|
|
919
|
+
function $v(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=aw(h.backgroundColor,e.backgroundColor),e.color=aw(h.color,e.color),e.fontFamily=aw(h.fontFamily,e.fontFamily),e.fontSize=aw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
920
|
+
"italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Tv(new yq(g)))e.startTime=g}}if(Of(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())$v(a.value,e,c,d)}
|
|
921
|
+
function Xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb: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"==
|
|
922
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=bw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=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 bw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
923
|
+
function Tv(a){a=Aq(a,Zv);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Vv(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"},c=/&(?:amp|lt|gt|quot|#(0+)?39);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",Sv);Sv.prototype.parseMedia=Sv.prototype.parseMedia;Sv.prototype.setSequenceMode=Sv.prototype.setSequenceMode;
|
|
924
|
+
Sv.prototype.parseInit=Sv.prototype.parseInit;var Zv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;ad["text/vtt"]=function(){return new Sv};ad['text/vtt; codecs="vtt"']=function(){return new Sv};ad['text/vtt; codecs="wvtt"']=function(){return new Sv};function cw(){this.g=null}cw.prototype.parseInit=function(a){var b=this,c=!1;(new vf).box("moov",zf).box("trak",zf).box("mdia",zf).T("mdhd",function(d){d=ai(d.reader,d.version);b.g=d.timescale}).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};cw.prototype.setSequenceMode=function(){};
|
|
925
|
+
cw.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vf).box("moof",zf).box("traf",zf).T("tfdt",function(B){g=!0;c=$h(B.reader,B.version).ue}).T("tfhd",function(B){l=Zh(B.reader,B.flags).Ae}).T("trun",function(B){h=!0;d=bi(B.reader,B.version,B.flags).Qe}).box("mdat",Cf(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new sf(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.de||l,y=q.fd?
|
|
926
|
+
c+q.fd:m;m=y+(v||0);var x=0;do{var w=n.L();x+=w;var C=n.L(),z=null;"vttc"==Df(C)?8<w&&(z=n.$a(w-8)):n.skip(w-8);v&&z&&(w=dw(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter($b)};function dw(a,b,c){var d,e,f;(new vf).box("payl",Cf(function(g){d=xc(g)})).box("iden",Cf(function(g){e=xc(g)})).box("sttg",Cf(function(g){f=xc(g)})).parse(a);return d?ew(d,e,f,b,c):null}
|
|
927
|
+
function ew(a,b,c,d,e){d=new hb(d,e,"");Wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new yq(c),b=Bq(a);b;)Xv(d,b,[]),zq(a),b=Bq(a);return d}L("shaka.text.Mp4VttParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;cw.prototype.setSequenceMode=cw.prototype.setSequenceMode;cw.prototype.parseInit=cw.prototype.parseInit;ad['application/mp4; codecs="wvtt"']=function(){return new cw};function fw(){}fw.prototype.parseInit=function(){};fw.prototype.setSequenceMode=function(){};fw.prototype.parseMedia=function(a){var b=xc(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 yq(c[0]),e=gw(d),f=Aq(d,/,/g);d=gw(d);if(null==e||null==f||null==d)throw new O(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};
|
|
928
|
+
function gw(a){a=Aq(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)}L("shaka.text.SbvTextParser",fw);fw.prototype.parseMedia=fw.prototype.parseMedia;fw.prototype.setSequenceMode=fw.prototype.setSequenceMode;fw.prototype.parseInit=fw.prototype.parseInit;ad["text/x-subviewer"]=function(){return new fw};function hw(){this.g=new Sv}hw.prototype.parseInit=function(){};hw.prototype.setSequenceMode=function(){};hw.prototype.parseMedia=function(a,b){var c=xc(a);c=iw(c);c=N(Bc(c));return this.g.parseMedia(c,b)};function iw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=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}L("shaka.text.SrtTextParser",hw);
|
|
929
|
+
hw.srt2webvtt=iw;hw.prototype.parseMedia=hw.prototype.parseMedia;hw.prototype.setSequenceMode=hw.prototype.setSequenceMode;hw.prototype.parseInit=hw.prototype.parseInit;ad["text/srt"]=function(){return new hw};function jw(){}jw.prototype.parseInit=function(){};jw.prototype.setSequenceMode=function(){};
|
|
930
|
+
jw.prototype.parseMedia=function(a){var b="",c="";a=xc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=kw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=lw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(mw);else if("Style"==e){e=f.split(mw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
931
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={wd:e.wd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=lw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(mw);else if("Dialogue"==f){g=g.split(mw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=nw(f.Start);var k=nw(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.wd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.wd}}(e)))&&ow(g,f);d.push(g)}return d};
|
|
932
|
+
function ow(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=pw(c))a.color=c;if(c=b.BackColour)if(c=pw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=lb;break;case 3:a.displayAlign=qb;a.textAlign="end";
|
|
898
933
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;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=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
899
|
-
function
|
|
900
|
-
var
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
934
|
+
function pw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function nw(a){a=qw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",jw);jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.setSequenceMode=jw.prototype.setSequenceMode;jw.prototype.parseInit=jw.prototype.parseInit;
|
|
935
|
+
var kw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,lw=/^\s*([^:]+):\s*(.*)/,mw=/\s*,\s*/,qw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ad["text/x-ssa"]=function(){return new jw};function rw(){}function sw(a,b,c){function d(h){Hb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(N(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Cc(b,!0):e=b;a=Ac(a);a=Cc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",rw);
|
|
936
|
+
rw.commonFairPlayResponse=function(a,b){if(2===a){try{var c=xc(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=Fb(Gc(c)))}};rw.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};rw.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
|
|
937
|
+
rw.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=N(b.body);c=Fc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Bc("spc="+c)}};rw.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return sw(a,d,b)};
|
|
938
|
+
rw.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(a).split(";").pop();return sw(a,c,b)};rw.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(a).split("skd://").pop();return sw(a,c,b)};rw.initDataTransform=sw;rw.defaultGetContentId=function(a){a=Ac(a);return(new Jb(a)).Fa};
|
|
939
|
+
rw.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);Aa(b);return b["return"](!1)})};/*
|
|
905
940
|
@license
|
|
906
941
|
EME Encryption Scheme Polyfill
|
|
907
942
|
Copyright 2019 Google LLC
|
|
908
943
|
SPDX-License-Identifier: Apache-2.0
|
|
909
944
|
*/
|
|
910
|
-
function
|
|
911
|
-
function
|
|
945
|
+
function tw(){}var uw;function vw(){uw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(uw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ww):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
946
|
+
function ww(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,uw.call(c,a,b),2);d=e.h;if(xw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=uw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=yw;return e["return"](yw.call(c,
|
|
912
947
|
a,b))})}
|
|
913
|
-
function
|
|
914
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q
|
|
915
|
-
function
|
|
916
|
-
function
|
|
917
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
918
|
-
function
|
|
919
|
-
new
|
|
920
|
-
function
|
|
921
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}
|
|
922
|
-
|
|
923
|
-
function
|
|
924
|
-
function
|
|
948
|
+
function yw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return G(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=zw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Aw(h.videoCapabilities,d),l=Aw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
949
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,uw.call(c,a,e),2)}p=q.h;return q["return"](new Bw(p,d))})}function Aw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",tw);tw.install=vw;function Cw(){}var Dw;
|
|
950
|
+
function Ew(){Dw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Dw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Fw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
951
|
+
function Fw(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Dw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&xw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Dw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
952
|
+
navigator.mediaCapabilities.decodingInfo=Gw;if(d){f.A(3);break}e=c;return u(f,Hw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](Gw.call(b,a))}})}
|
|
953
|
+
function Gw(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=zw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Dw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
954
|
+
new Bw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,Hw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
|
|
955
|
+
function Hw(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
956
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}L("McEncryptionSchemePolyfill",Cw);Cw.install=Ew;function Bw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
957
|
+
Bw.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};Bw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
958
|
+
function zw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function xw(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}
|
|
959
|
+
function Iw(){}function Qt(){vw();Ew()}L("EncryptionSchemePolyfills",Iw);Iw.install=Qt;"undefined"!==typeof module&&module.exports&&(module.exports=Iw);}).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})();
|
|
925
960
|
|
|
926
961
|
//# sourceMappingURL=shaka-player.compiled.map
|