shaka-player 3.2.8 → 3.2.11
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/build-and-test.yaml +67 -15
- package/.github/workflows/compute-incremental-coverage.py +251 -0
- package/.github/workflows/report-incremental-coverage.yaml +39 -0
- package/.github/workflows/selenium-lab-tests.yaml +44 -1
- package/AUTHORS +1 -1
- package/CHANGELOG.md +37 -0
- package/CONTRIBUTORS +4 -1
- package/README.md +20 -6
- package/demo/common/assets.js +1 -1
- package/demo/index.html +0 -2
- package/demo/main.js +3 -3
- package/dist/controls.css +1 -1
- package/dist/demo.compiled.debug.js +3 -3
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +3 -3
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +2 -2
- package/dist/locales.js +29 -29
- package/dist/receiver.compiled.debug.js +1 -1
- package/dist/receiver.compiled.debug.map +1 -1
- package/dist/receiver.compiled.js +1 -1
- package/dist/receiver.compiled.map +1 -1
- package/dist/shaka-player.compiled.d.ts +12 -1
- package/dist/shaka-player.compiled.debug.d.ts +12 -1
- package/dist/shaka-player.compiled.debug.externs.js +49 -38
- package/dist/shaka-player.compiled.debug.js +238 -227
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +49 -38
- package/dist/shaka-player.compiled.js +766 -760
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +12 -1
- package/dist/shaka-player.ui.debug.d.ts +12 -1
- package/dist/shaka-player.ui.debug.externs.js +49 -38
- package/dist/shaka-player.ui.debug.js +227 -217
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +49 -38
- package/dist/shaka-player.ui.js +870 -865
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/welcome.md +6 -3
- package/karma.conf.js +3 -11
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +14 -6
- package/lib/media/drm_engine.js +1 -1
- package/lib/media/presentation_timeline.js +24 -1
- package/lib/media/streaming_engine.js +1 -0
- package/lib/player.js +1 -6
- package/lib/polyfill/media_capabilities.js +3 -0
- package/lib/polyfill/videoplaybackquality.js +3 -1
- package/lib/text/cue.js +0 -5
- package/lib/text/simple_text_displayer.js +21 -9
- package/lib/text/ui_text_displayer.js +83 -19
- package/lib/util/buffer_utils.js +3 -0
- package/lib/util/object_utils.js +1 -0
- package/lib/util/platform.js +41 -1
- package/lib/util/stream_utils.js +24 -3
- package/lib/util/string_utils.js +102 -13
- package/maintained-branches.md +15 -0
- package/package.json +6 -5
- package/test/text/simple_text_displayer_unit.js +27 -0
- package/test/text/ui_text_displayer_unit.js +65 -0
- package/test/util/string_utils_unit.js +46 -8
- package/app-engine/README.md +0 -9
- package/app-engine/demo-version-index/README.md +0 -14
- package/app-engine/demo-version-index/app.yaml +0 -2
- package/app-engine/demo-version-index/main.py +0 -162
- package/app-engine/demo-version-index/requirements.txt +0 -6
- package/app-engine/demo-version-index/templates/index.html +0 -114
- package/app-engine/shaka-player-demo/README.md +0 -18
- package/app-engine/shaka-player-demo/app.yaml +0 -61
- package/app-engine/shaka-player-demo/main.py +0 -95
- package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
- package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
- package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
- package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
- package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
- package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
- package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
- package/app-engine/shaka-player-demo/posters/standard.png +0 -0
- package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
- package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
- package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
- package/app-engine/shaka-player-demo/posters.py +0 -110
- package/app-engine/shaka-player-demo/requirements.txt +0 -5
- package/app-engine/shaka-player-demo/time.txt +0 -1
- package/build/README.md +0 -127
- package/build/__init__.py +0 -0
- package/build/all.py +0 -150
- package/build/apps.py +0 -186
- package/build/build.py +0 -392
- package/build/check.py +0 -354
- package/build/checkversion.py +0 -84
- package/build/compiler.py +0 -513
- package/build/conformance.textproto +0 -321
- package/build/docker/Dockerfile +0 -20
- package/build/docker/docker-compose.yml +0 -10
- package/build/docs.py +0 -54
- package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
- package/build/eslint-plugin-shaka-rules/index.js +0 -24
- package/build/eslint-plugin-shaka-rules/package.json +0 -7
- package/build/eslint-plugin-shaka-rules/private.js +0 -109
- package/build/gendeps.py +0 -71
- package/build/generateExterns.js +0 -867
- package/build/generateLocalizations.py +0 -262
- package/build/generateTsDefs.py +0 -137
- package/build/install-linux-prereqs.sh +0 -136
- package/build/license-header +0 -5
- package/build/misspellings.txt +0 -38
- package/build/pixelsChanged.js +0 -35
- package/build/shaka-lab.yaml +0 -163
- package/build/shakaBuildHelpers.py +0 -356
- package/build/stats.py +0 -816
- package/build/subprocessWindowsPatch.py +0 -103
- package/build/test.py +0 -541
- package/build/types/ads +0 -8
- package/build/types/cast +0 -6
- package/build/types/cea +0 -13
- package/build/types/complete +0 -9
- package/build/types/core +0 -106
- package/build/types/dash +0 -8
- package/build/types/hls +0 -9
- package/build/types/manifests +0 -5
- package/build/types/networking +0 -6
- package/build/types/offline +0 -21
- package/build/types/polyfill +0 -19
- package/build/types/text +0 -11
- package/build/types/ui +0 -37
- package/build/updateScreenshots.py +0 -85
- package/build/wrapper.template.js +0 -52
|
@@ -15,19 +15,19 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
|
|
18
|
-
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
19
|
-
function ta(a,b){a.i={
|
|
20
|
-
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.
|
|
18
|
+
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ug=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function ta(a,b){a.i={Wd:b,ce:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.Wd;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
|
|
20
|
+
function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ce?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
|
|
21
21
|
function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
|
|
22
|
-
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.
|
|
23
|
-
function Da(a){this.next=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return
|
|
22
|
+
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ce)throw b.Wd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
|
|
23
|
+
function Da(a){this.next=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
|
|
24
24
|
function Ea(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Ea(new Da(new ya(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
25
25
|
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.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
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.D),reject:g(this.l)}};b.prototype.D=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.G(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.C(g):this.m(g)}};
|
|
27
27
|
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.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.F();this.u()};b.prototype.F=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
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.G=function(g){var h=this.j();g.
|
|
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).
|
|
29
|
+
b.prototype.G=function(g){var h=this.j();g.qc(h.resolve,h.reject)};b.prototype.J=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.qc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.qc=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).qc(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).qc(n(p.length-1),m),k=h.next();
|
|
31
31
|
while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
32
32
|
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=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(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
33
33
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
|
|
@@ -39,21 +39,22 @@ h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g
|
|
|
39
39
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
40
40
|
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
41
41
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
|
|
42
|
-
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ha(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{
|
|
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 Ha(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{ae:e,ue:f}}return{ae:-1,ue:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ha(this,b,c).ae}});
|
|
43
43
|
fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});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}});
|
|
44
|
-
function Ja(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ja(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ha(this,b,c).
|
|
44
|
+
function Ja(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ja(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ha(this,b,c).ue}});
|
|
45
45
|
fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ja(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});function Ka(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}
|
|
46
46
|
fa("Array.prototype.keys",function(a){return a?a:function(){return Ka(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Na});
|
|
47
47
|
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 Ka(this,function(b,c){return c})}});
|
|
48
48
|
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 Ka(this,function(b,c){return[b,c]})}});
|
|
49
49
|
fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ja(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
50
|
-
fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;
|
|
50
|
+
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)Ga(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;
|
|
51
|
+
function M(a,b){var c=a.split("."),d=Oa;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
52
|
@license
|
|
52
53
|
Shaka Player
|
|
53
54
|
Copyright 2016 Google LLC
|
|
54
55
|
SPDX-License-Identifier: Apache-2.0
|
|
55
56
|
*/
|
|
56
|
-
function Pa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function Ra(a){return a.g/(1-Math.pow(a.i,a.h))};function Sa(){this.h=new Pa(2);this.i=new Pa(5);this.g=0}Sa.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ra(this.h),Ra(this.i))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Fa.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 cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Va=db[2];Ua=db[1]};function eb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function fb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function gb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={
|
|
57
|
+
function Pa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function Ra(a){return a.g/(1-Math.pow(a.i,a.h))};function Sa(){this.h=new Pa(2);this.i=new Pa(5);this.g=0}Sa.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ra(this.h),Ra(this.i))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Fa.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 cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Va=db[2];Ua=db[1]};function eb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function fb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function gb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Rc:d.Rc},e=a.next()){d.Rc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Rc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
57
58
|
function hb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ib(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
|
|
58
59
|
[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ib.prototype.clone=function(){var a=new ib(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
59
60
|
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(!hb(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(!hb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",ib);var lb="auto";
|
|
@@ -82,807 +83,812 @@ function Wb(a){var b;a instanceof Wb?(Xb(this,a.Aa),this.lb=a.lb,this.Da=a.Da,Yb
|
|
|
82
83
|
r.toString=function(){var a=[],b=this.Aa;b&&a.push(bc(b,cc,!0),":");if(b=this.Da){a.push("//");var c=this.lb;c&&a.push(bc(c,cc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.zb;null!=b&&a.push(":",String(b))}if(b=this.ua)this.Da&&"/"!=b.charAt(0)&&a.push("/"),a.push(bc(b,"/"==b.charAt(0)?dc:ec,!0));(b=this.g.toString())&&a.push("?",b);(b=this.ab)&&a.push("#",bc(b,fc));return a.join("")};
|
|
83
84
|
r.resolve=function(a){var b=this.clone();"data"===b.Aa&&(b=new Wb);var c=!!a.Aa;c?Xb(b,a.Aa):c=!!a.lb;c?b.lb=a.lb:c=!!a.Da;c?b.Da=a.Da:c=null!=a.zb;var d=a.ua;if(c)Yb(b,a.zb);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Da&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.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
85
|
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.ua=d:c=""!==a.g.toString();c?Zb(b,a.g.clone()):c=!!a.ab;c&&(b.ab=a.ab);return b};r.clone=function(){return new Wb(this)};function Xb(a,b,c){a.Aa=c?$b(b,!0):b;a.Aa&&(a.Aa=a.Aa.replace(/:$/,""))}function Yb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.zb=b}else a.zb=null}function Zb(a,b,c){b instanceof ac?a.g=b:(c||(b=bc(b,gc)),a.g=new ac(b))}
|
|
85
|
-
function $b(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function bc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,hc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function hc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var cc=/[#\/\?@]/g,ec=/[#\?:]/g,dc=/[#\?]/g,gc=/[#\?@]/g,fc=/#/g;function ac(a){this.g=a||null}r=ac.prototype;r.sa=null;r.
|
|
86
|
-
r.add=function(a,b){if(!this.sa&&(this.sa={},this.
|
|
87
|
-
r.toString=function(){if(this.g)return this.g;if(!this.sa)return"";var a=[],b;for(b in this.sa)for(var c=encodeURIComponent(b),d=this.sa[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 ac;a.g=this.g;if(this.sa){var b={},c;for(c in this.sa)b[c]=this.sa[c].concat();a.sa=b;a.
|
|
88
|
-
function kc(a,b){if(1==b.length)return b[0];var c=lc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function lc(a,b){for(var c=t(mc[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==nc?"":null}var nc="text",oc={Ma:"video",Ya:"audio",Y:nc,Jb:"image",
|
|
89
|
-
function
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
function
|
|
95
|
-
function
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
function
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
function
|
|
105
|
-
function
|
|
106
|
-
var
|
|
86
|
+
function $b(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function bc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,hc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function hc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var cc=/[#\/\?@]/g,ec=/[#\?:]/g,dc=/[#\?]/g,gc=/[#\?@]/g,fc=/#/g;function ac(a){this.g=a||null}r=ac.prototype;r.sa=null;r.sc=null;
|
|
87
|
+
r.add=function(a,b){if(!this.sa&&(this.sa={},this.sc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.sa.hasOwnProperty(a)&&this.sa[a])||(this.sa[a]=c=[]);c.push(b);this.sc++;return this};
|
|
88
|
+
r.toString=function(){if(this.g)return this.g;if(!this.sa)return"";var a=[],b;for(b in this.sa)for(var c=encodeURIComponent(b),d=this.sa[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 ac;a.g=this.g;if(this.sa){var b={},c;for(c in this.sa)b[c]=this.sa[c].concat();a.sa=b;a.sc=this.sc}return a};function ic(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Wb(d)});return a.map(function(d){return new Wb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function jc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
89
|
+
function kc(a,b){if(1==b.length)return b[0];var c=lc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function lc(a,b){for(var c=t(mc[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==nc?"":null}var nc="text",oc={Ma:"video",Ya:"audio",Y:nc,Jb:"image",Sf:"application"},mc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}pc.prototype.resolve=function(){};pc.prototype.reject=function(){};function qc(a){this.h=a;this.g=void 0}qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function rc(a){this.h=a;this.g=null}rc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Db=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new rc(function(){b.h()})).R(a);return this};O.prototype.ya=function(a){var b=this;this.stop();this.g=(new rc(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.ya;O.prototype.tickAfter=O.prototype.R;
|
|
90
|
+
O.prototype.tickNow=O.prototype.Db;function sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function tc(a){return""!=uc().canPlayType(a)}function vc(){return wc("Xbox One")}function xc(){return wc("Tizen")}function yc(){return wc("Web0S")}function zc(){return wc("CrKey")}function Ac(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!xc()&&!wc("PC=EOS")&&!Bc()}function Bc(){return wc("PlayStation 4")}
|
|
91
|
+
function Dc(){if(!Ac())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 wc(a){return(navigator.userAgent||"").includes(a)}function uc(){if(Ec)return Ec;Fc||(Fc=new O(function(){Ec=null}));(Ec=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ec=document.createElement("video"));Fc.R(1);return Ec}var Fc=null,Ec=null;function Gc(){}
|
|
92
|
+
function Hc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Bc())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==
|
|
93
|
+
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
94
|
+
function Ic(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Jc.value()(d)}
|
|
95
|
+
function Kc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Hc(c);if(254==c[0]&&255==c[1])return Ic(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ic(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Ic(a,!1);if(0==c[1]&&0==c[3])return Ic(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Hc(a);throw new N(2,2,2003);}
|
|
96
|
+
function Lc(a){if(window.TextEncoder&&!Bc()){var b=new TextEncoder;return Gb(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 Gb(b)}function Mc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Gc);Gc.resetFromCharCode=function(){Jc.g=void 0};Gc.toUTF16=Mc;Gc.toUTF8=Lc;Gc.fromBytesAutoDetect=Kc;Gc.fromUTF16=Ic;
|
|
97
|
+
Gc.fromUTF8=Hc;var Jc=new qc(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={Ta:65536};0<b.Ta;b={Ta:b.Ta},b.Ta/=2)if(a(b.Ta))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ta)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ta));return e}}(b);return null});function Nc(){}function Oc(a){a=Fb(a);a=Jc.value()(a);return btoa(a)}function Pc(a,b){b=void 0==b?!0:b;var c=Oc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Qc(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 Rc(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 Sc(a){var b=Fb(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 Tc(){for(var a=Fa.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(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Nc);Nc.concat=Tc;Nc.toHex=Sc;Nc.fromHex=Rc;Nc.fromBase64=Qc;Nc.toBase64=Pc;Nc.toStandardBase64=Oc;
|
|
99
|
+
Nc.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Uc(){var a=this;this.o=Tb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Tc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Tc.apply(Nc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Uc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
|
|
100
|
+
function Vc(a,b){if(!Tb.get("muxjs")()||!Wc(a))return!1;if(b)return MediaSource.isTypeSupported(Xc(b,a));var c=Xc("audio",a),d=Xc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Wc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
101
|
+
function Xc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Yc(a,b){a.l=!0;a.h=new pc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Zc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function $c(a,b,c){a=Zc(a,b);if(Wc(a)){if(Tb.get("muxjs")())return Xc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
|
|
102
|
+
function ad(a){var b=bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
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 cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
104
|
+
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function dd(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function ed(a){return fd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}dd.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
|
|
105
|
+
function gd(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Fb(b)),h["return"]();e={periodStart:a.u,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Fb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);z(h)})}
|
|
106
|
+
dd.prototype.remove=function(a,b){var c=this;return L(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function hd(a,b,c){a.j=b;a.m=c}function id(a,b,c){a.s=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 kd(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ib(c.startTime,c.endTime,c.text)});return b}function ld(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())ld(a,d.value,c)}
|
|
108
|
+
function md(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,[]);ld(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.s&&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.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",dd);dd.prototype.destroy=dd.prototype.destroy;dd.findParser=function(a){return fd[a]};dd.unregisterParser=function(a){delete fd[a]};dd.registerParser=function(a,b){fd[a]=b};var fd={};function nd(a,b){a=od(a);b=od(b);return a.split("-")[0]==b.split("-")[0]}function pd(a,b){a=od(a);b=od(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function qd(a,b){a=od(a);b=od(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function od(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=rd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function sd(a,b){a=od(a);b=od(b);return b==a?4:pd(b,a)?3:qd(b,a)?2:pd(a,b)?1:0}
|
|
110
|
+
function td(a){return a.language?od(a.language):a.audio&&a.audio.language?od(a.audio.language):a.video&&a.video.language?od(a.video.language):"und"}
|
|
111
|
+
function ud(a,b){for(var c=od(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(od(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,pd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,qd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,pd(c,f))return f;return null}
|
|
112
|
+
var rd=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",
|
|
107
113
|
"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",
|
|
108
114
|
"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",
|
|
109
115
|
"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",
|
|
110
116
|
"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",
|
|
111
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
112
|
-
|
|
113
|
-
function
|
|
114
|
-
function
|
|
115
|
-
function
|
|
116
|
-
function
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
function
|
|
121
|
-
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Rd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Rd(d));return e});z(c)})}
|
|
122
|
-
function Od(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return L(function(D){if(1==D.g)return A(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);F(D);JSON.stringify(w);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Sd(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),
|
|
117
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function vd(){this.g={}}r=vd.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 wd(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 xd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=yd(f,b,c);f=zd(f,d);b=Ad(f);b=Bd(b);var g=Cd(b,e);a.variants=a.variants.filter(function(h){return Dd(h)==g?!0:!1})}function Ad(a){var b=new vd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Dd(c);b.push(d,c)}return b}
|
|
118
|
+
function Bd(a){var b=0,c=new Map,d=a.size();wd(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 vd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
|
|
119
|
+
function yd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={bd:d.bd},e=b.next())if(d.bd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.bd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Oc:d.Oc},b=c.next())if(d.Oc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Oc)}}(d)),b.length){a=b;break}return a}
|
|
120
|
+
function Cd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ed||d==Fd){if(a=Gd(a,d),1==a.size())return a.keys()[0]}else if(d==Hd)break;return Id(a)}function Gd(a,b){var c=0,d=new vd;wd(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}
|
|
121
|
+
function Id(a){var b="",c=Infinity;wd(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 Dd(a){var b="";a.video&&(b=ad(a.video.codecs));var c="";a.audio&&(c=ad(a.audio.codecs));return b+"-"+c}function Jd(a,b,c){a.variants=a.variants.filter(function(d){return Kd(d,b,c)})}
|
|
122
|
+
function Kd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
|
|
123
|
+
function Ld(a,b){return L(function(c){if(1==c.g)return u(c,Md(b,0<b.offlineSessionIds.length),2);Nd(a,b);Od(b);Pd(b);z(c)})}
|
|
124
|
+
function Md(a,b){return L(function(c){if(1==c.g)return u(c,Qd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Rd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=kc("video",g);g=kc("audio",g);g=$c(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=$c(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Sd(f.codecs),f=$c(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(vc()&&e&&(e.width&&
|
|
125
|
+
1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Td(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Td(d));return e});z(c)})}
|
|
126
|
+
function Qd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(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 L(function(D){if(1==D.g)return A(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Ud(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),
|
|
123
127
|
0)})}
|
|
124
|
-
function
|
|
125
|
-
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=
|
|
128
|
+
function Ud(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=kc("video",g);f=Rd(f);g=kc("audio",g);g=$c(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Rd(f);f=$c(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";
|
|
129
|
+
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Sd(d.codecs),f=$c(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,[]);
|
|
126
130
|
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&&
|
|
127
|
-
(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
|
|
128
|
-
function
|
|
129
|
-
function
|
|
130
|
-
function
|
|
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 Sd(a){return xc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
|
|
132
|
+
function Rd(a){return"vp9"==a?"vp09.00.41.08":a}function Nd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Vd(d,a.audio)||c&&a&&a.video&&!Vd(c,a.video)?!1:!0})}function Od(a){a.textStreams=a.textStreams.filter(function(b){return ed(Zc(b.mimeType,b.codecs))})}function Pd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(yc()||xc()||zc())&&c.push("image/webp");return c.includes(b.mimeType)})}
|
|
133
|
+
function Vd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
134
|
+
function Wd(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
|
|
131
135
|
frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
|
|
132
|
-
null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
133
|
-
function
|
|
136
|
+
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}
|
|
137
|
+
function Xd(a){return{id:a.id,active:!1,type:nc,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,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,originalAudioId:null,
|
|
134
138
|
originalTextId:a.originalId,originalImageId:null}}
|
|
135
|
-
function
|
|
136
|
-
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
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
function
|
|
141
|
-
function
|
|
142
|
-
|
|
143
|
-
function
|
|
144
|
-
r.chooseVariant=function(){var a=
|
|
145
|
-
r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){if(!(128E3<=this.h.g))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;var c=this.chooseVariant();this.h.getBandwidthEstimate(
|
|
146
|
-
r.configure=function(a){this.g=a};function
|
|
147
|
-
|
|
148
|
-
function
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
function
|
|
152
|
-
function
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
function
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
function
|
|
159
|
-
r.request=function(a,b){var c=this,d=new
|
|
160
|
-
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.
|
|
161
|
-
function
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
function
|
|
167
|
-
r.Ra=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.
|
|
168
|
-
|
|
169
|
-
function
|
|
170
|
-
function
|
|
171
|
-
function
|
|
172
|
-
function vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(
|
|
173
|
-
|
|
174
|
-
r.Ob=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.G),g=f.next();!g.done;g=f.next())
|
|
175
|
-
c,2)}
|
|
176
|
-
function
|
|
177
|
-
A(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function
|
|
178
|
-
function
|
|
179
|
-
function
|
|
180
|
-
function
|
|
181
|
-
f.keySystem;var D=d.get(f.keySystem);var C=[],B=[],E=[],G=[],H=new Set;
|
|
182
|
-
D.next())C=C.value,C.distinctiveIdentifierRequired&&(
|
|
183
|
-
|
|
184
|
-
function
|
|
185
|
-
l.
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
-
function
|
|
139
|
+
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,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
|
|
140
|
+
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}
|
|
141
|
+
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}
|
|
142
|
+
function be(a){return{id:Zd(a),active:!1,type:"",bandwidth:0,language:od(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType: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,originalTextId:null,originalImageId:null}}
|
|
143
|
+
function de(a){return a.allowedByApplication&&a.allowedByKeySystem}function ee(a){return a.filter(function(b){return de(b)})}
|
|
144
|
+
function zd(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)))}
|
|
145
|
+
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=ud(od(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return od(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=he(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(Ob,[]);return a.length?
|
|
146
|
+
he(e,a[0]):e}function he(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Td(a){var b=[];a.audio&&b.push(ie(a.audio));a.video&&b.push(ie(a.video));return b.join(", ")}
|
|
147
|
+
function ie(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var $d=0,Ed="smooth",Fd="powerEfficient",Hd="bandwidth";function je(){var a=this;this.l=null;this.j=!1;this.h=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Sa;var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=je.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
|
|
148
|
+
r.chooseVariant=function(){var a=ke(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(le(this));this.i.length&&!a.length&&(a=ke(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
|
|
149
|
+
r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){if(!(128E3<=this.h.g))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;var c=this.chooseVariant();this.h.getBandwidthEstimate(le(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(le(this))};r.setVariants=function(a){this.i=a};r.playbackRateChanged=function(a){this.o=a};
|
|
150
|
+
r.configure=function(a){this.g=a};function le(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function ke(a,b){a&&(b=b.filter(function(c){return Kd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",je);je.prototype.configure=je.prototype.configure;je.prototype.playbackRateChanged=je.prototype.playbackRateChanged;
|
|
151
|
+
je.prototype.setVariants=je.prototype.setVariants;je.prototype.getBandwidthEstimate=je.prototype.getBandwidthEstimate;je.prototype.segmentDownloaded=je.prototype.segmentDownloaded;je.prototype.disable=je.prototype.disable;je.prototype.enable=je.prototype.enable;je.prototype.chooseVariant=je.prototype.chooseVariant;je.prototype.init=je.prototype.init;je.prototype.stop=je.prototype.stop;function me(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)}me.prototype.add=function(a){return ne(this.h,a)?(this.g.add(a),!0):!1};
|
|
152
|
+
function ne(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)&&oe(c,d)&&pe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(oe(c,d)&&pe(c.roles,d.roles)));return c?!1:!0}me.prototype.values=function(){return this.g.values()};
|
|
153
|
+
function oe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return bd(f)[0]}),d=b.codecs.split(",").map(function(f){return bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function pe(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 qe(a){this.g=a;this.h=new re(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}qe.prototype.create=function(a){var b=this,c=a.filter(function(d){return ne(b.g,d)});return c.length?new me(c[0],c):this.h.create(a)};function re(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
154
|
+
re.prototype.create=function(a){var b=[];b=se(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=te(b,this.j);a.length&&(b=a);this.g&&(a=zd(b,this.g),a.length&&(b=a));this.h&&(a=ue(b,this.h),a.length&&(b=a));a=new me(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,ne(a.h,c)&&a.add(c);return a};function se(a,b){var c=od(b),d=ud(c,a.map(function(e){return td(e)}));return d?a.filter(function(e){return d==td(e)}):[]}
|
|
155
|
+
function te(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ue(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function ve(){this.g=we;this.h=(new Map).set(we,2).set(xe,1)}function ye(a,b,c){a.h.set(we,c).set(xe,b)}var xe=0,we=1;function ze(a,b){var c=Ae();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}
|
|
156
|
+
function Be(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).R(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ae(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ce(a,b){this.promise=a;this.i=b;this.g=!1}function De(a){return new Ce(Promise.reject(a),function(){return Promise.resolve()})}function Ee(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ce(a,function(){return Promise.resolve()})}function Fe(a){return new Ce(Promise.resolve(a),function(){return Promise.resolve()})}function Ge(a){return new Ce(a,function(){return a["catch"](function(){})})}Ce.prototype.abort=function(){this.g=!0;return this.i()};
|
|
157
|
+
function He(a){return new Ce(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ce.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
158
|
+
Ce.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ie(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new pc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ce(f,function(){return d()})};
|
|
159
|
+
function Ie(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ce);Ce.prototype.chain=Ce.prototype.Z;Ce.prototype["finally"]=Ce.prototype["finally"];Ce.all=He;Ce.prototype.abort=Ce.prototype.abort;Ce.notAbortable=Ge;Ce.completed=Fe;Ce.aborted=Ee;Ce.failed=De;function P(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}
|
|
160
|
+
function Je(a){var b=new P(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};P.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",P);function Ke(){this.da=new vd;this.pc=this}Ke.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Ke.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Ke.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.pc;a.currentTarget=this.pc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
161
|
+
Ke.prototype.release=function(){this.da=null};function Le(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 Me(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ne(){this.g=[]}function Oe(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Ne.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 Pe(a){Ke.call(this);this.i=!1;this.l=new Ne;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Pe,Ke);r=Pe.prototype;r.Jd=function(a){this.m=a};function Qe(a,b,c,d){c=c||Re;var e=Se[a];if(!e||c>=e.priority)Se[a]={priority:c,wf:b,xf:void 0===d?!1:d}}r.yf=function(a){this.g.add(a)};r.Of=function(a){this.g["delete"](a)};r.Ge=function(){this.g.clear()};r.zf=function(a){this.h.add(a)};r.Pf=function(a){this.h["delete"](a)};r.He=function(){this.h.clear()};
|
|
162
|
+
function Te(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ke.prototype.release.call(this);return this.l.destroy()};
|
|
163
|
+
r.request=function(a,b){var c=this,d=new Ue;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ve(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Le(b.retryParameters):Ae();b.uris=Le(b.uris);e=We(this,a,b);var f=e.Z(function(){return Xe(c,a,b,new ze(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return Ye(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
164
|
+
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.mf||!c.j||q.fromCache||a!=Ze||c.j(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Ve(m.promise,function(){return m.abort()},d);Oe(this.l,e);return e};
|
|
165
|
+
function We(a,b,c){var d=Fe(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Xc:e.Xc},f=a.next())e.Xc=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.Xc(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
|
|
166
|
+
function Xe(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Wb(c.uris[e]),k=h.Aa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Xb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Se[k])?k.wf:null;if(!m)return De(new N(2,1,1E3,h));var n=k.xf,p=null,q=null,v=!1,y;return Ge(Be(d)).Z(function(){if(a.i)return Ee();y=Date.now();var x=m(c.uris[e],c,b,function(C,B,E){p&&p.stop();q&&q.R(D/1E3);a.j&&b==Ze&&(a.j(C,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
|
|
167
|
+
w&&(p=new O(function(){v=!0;x.abort()}),p.R(w/1E3));var D=c.retryParameters.stallTimeout;D&&(q=new O(function(){v=!0;x.abort()}));return x}).Z(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,mf:l}},function(x){p&&p.stop();q&&q.stop();if(a.i)return Ee();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new P("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
|
|
168
|
+
return Xe(a,b,c,d,e,x,g)}}throw x;})}function Ye(a,b,c){var d=Fe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Yc:e.Yc},f=a.next())e.Yc=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.Yc(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Pe);Pe.prototype.request=Pe.prototype.request;Pe.prototype.destroy=Pe.prototype.destroy;
|
|
169
|
+
Pe.makeRequest=Te;Pe.defaultRetryParameters=function(){return Ae()};Pe.prototype.clearAllResponseFilters=Pe.prototype.He;Pe.prototype.unregisterResponseFilter=Pe.prototype.Pf;Pe.prototype.registerResponseFilter=Pe.prototype.zf;Pe.prototype.clearAllRequestFilters=Pe.prototype.Ge;Pe.prototype.unregisterRequestFilter=Pe.prototype.Of;Pe.prototype.registerRequestFilter=Pe.prototype.yf;Pe.unregisterScheme=function(a){delete Se[a]};Pe.registerScheme=Qe;Pe.prototype.setForceHTTPS=Pe.prototype.Jd;
|
|
170
|
+
function Ue(){this.g=0}Pe.NumBytesRemainingClass=Ue;function Ve(a,b,c){Ce.call(this,a,b);this.h=c}pa(Ve,Ce);Pe.PendingRequest=Ve;var Ze=1;Pe.RequestType={MANIFEST:0,SEGMENT:Ze,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Re=3;Pe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Re};var Se={};function $e(a){this.g=!1;this.h=new pc;this.i=a}$e.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 af(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function bf(){this.g=new vd}r=bf.prototype;r.release=function(){this.Ra();this.g=null};r.v=function(a,b,c,d){this.g&&(a=new cf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.ec(a,b,e);c(g)}var f=this;this.v(a,b,e,d)};r.ec=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.ec(),this.g.remove(b,e))}};
|
|
171
|
+
r.Ra=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.ec();this.g.g={}}};M("shaka.util.EventManager",bf);bf.prototype.removeAll=bf.prototype.Ra;bf.prototype.unlisten=bf.prototype.ec;bf.prototype.listenOnce=bf.prototype.oa;bf.prototype.listen=bf.prototype.v;bf.prototype.release=bf.prototype.release;function cf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=df(a,d);this.target.addEventListener(b,c,this.g)}
|
|
172
|
+
cf.prototype.ec=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function df(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 ef(a)?b:b.capture||!1}
|
|
173
|
+
function ef(a){var b=ff;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}ff=b}return b||!1}var ff=void 0;function gf(){}function hf(a){a=Kc(a);return(new Wb(a)).Da}function jf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Mc(b,!0):e=b;a=Kc(a);a=Mc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",gf);gf.initDataTransform=jf;gf.defaultGetContentId=hf;function kf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function lf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function mf(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 nf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function of(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 pf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.l=this.s=null;this.ia=this.aa=!1;this.F=0;this.g=null;this.o=new bf;this.i=new Map;this.B=[];this.u=new pc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.T=new O(function(){return qf(c)});this.J=!1;this.G=[];this.M=!1;this.ea=(new O(function(){rf(c)})).ya(b);this.u["catch"](function(){});this.j=new $e(function(){return sf(c)});this.V=!1}r=pf.prototype;r.destroy=function(){return this.j.destroy()};
|
|
174
|
+
function sf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,tf(a),2);case 2:if(!a.l){b.A(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.D.clear(),a.s=null,a.B=[],a.h=null,a.m=function(){},a.C=null,a.V=!1,z(b)}})}r.configure=function(a){this.h=a};function uf(a,b,c){a.ia=!0;a.B=[];a.J=c;return vf(a,b)}
|
|
175
|
+
function yf(a,b,c){a.B=c;a.J=0<c.length;return vf(a,b)}function zf(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 Af(a,g,[])}
|
|
176
|
+
function vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g){if(c=Bf(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=mf(a.h.servers),Cf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Df(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Ef(q,mf(a.h.servers),mf(a.h.advanced||{}));return u(x,
|
|
177
|
+
Qd(b,a.J,a.V),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.aa=!0,x["return"](Promise.resolve());y=Af(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
|
|
178
|
+
r.Ob=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.G),g=f.next();!g.done;g=f.next())Ff(b,g.value);b.M=!0;b.G=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.v(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return tf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
|
|
179
|
+
c,2)}af(b.j);Gf(b);b.g.initData.length||b.B.length||(d=function(f){return Hf(b,f.initDataType,Fb(f.initData))},b.o.v(b.l,"encrypted",d));z(e)})};
|
|
180
|
+
function If(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Te([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.C.ib.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
|
|
181
|
+
A(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Jf(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Kf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ia=new pc,d.push(e.Ia);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
|
|
182
|
+
function Gf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Hf(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())Kf(a,d.value);b.length||a.B.length||a.u.resolve();return a.u}function Hf(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!wc("Tizen 2"))return;Lf(a,b,c,a.g.sessionType)}function Mf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
|
|
183
|
+
function Nf(a){a=a.i.keys();a=kf(a,function(b){return b.sessionId});return Array.from(a)}r.Sb=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.yc=function(){return nf(this.da)};
|
|
184
|
+
function Af(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Of(a,c,d);x.A(2);break}return u(x,Pf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);af(a.j);A(x,4);a.D.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.D.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.D.add(q.contentType.toLowerCase());if(c.length){var w=
|
|
185
|
+
f.keySystem;var D=d.get(f.keySystem);var C=[],B=[],E=[],G=[],H=new Set;Qf(D,C,E,B,G,H);var J=a.J?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
|
|
186
|
+
D.next())C=C.value,C.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(w.persistentStateRequired=C.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),C=[],B=[],E=[],G=[],H=new Set,Qf(w.drmInfos,C,E,B,G,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
187
|
+
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,af(a.j),a.s=v,a.aa=!0,u(x,If(a),7);case 7:af(a.j);va(x,0);break;case 4:y=F(x);af(a.j,y);a.g=null;a.D.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
|
|
188
|
+
function Of(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Df(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Vc:d.Vc},e=a.next())for(d.Vc=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==
|
|
189
|
+
l.Vc}}(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}
|
|
190
|
+
function Pf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
191
|
+
w.h,w["return"](c);case 6:F(w);case 7:af(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(D){return!!D.licenseServerUri});if(x!=p){w.A(13);break}A(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:af(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
|
|
192
|
+
function Bf(a){a=mf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Rc(f),h=Rc(e);g={kty:"oct",kid:Pc(g,!1),k:Pc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Lc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
189
193
|
serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
|
|
190
|
-
function
|
|
191
|
-
if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;
|
|
192
|
-
function
|
|
193
|
-
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function
|
|
194
|
-
function
|
|
195
|
-
l.promise,4);case 4:k=
|
|
196
|
-
!0;
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
function
|
|
200
|
-
c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return A(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,
|
|
201
|
-
function
|
|
202
|
-
function
|
|
203
|
-
function
|
|
194
|
+
function Kf(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.v(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.G.push(k):Ff(a,k)});a.o.v(c,"keystatuseschange",function(k){return Rf(a,k)});e={initData:null,loaded:!1,zd:Infinity,Ia:null,type:"persistent-license"};a.i.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;af(a.j);
|
|
195
|
+
if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Sf(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),af(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
|
|
196
|
+
function Lf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.v(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.G.push(f):Ff(a,f)});a.o.v(e,"keystatuseschange",function(f){return Rf(a,f)});a.i.set(e,{initData:c,loaded:!1,zd:Infinity,Ia:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Pc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
|
|
197
|
+
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function Tf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=hf(a),a=jf(a,c,b));return a}
|
|
198
|
+
function Ff(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;L(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Pc(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=Te([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Mf(a.g.keySystem)&&Uf(g),h=Date.now(),A(x,2),l=a.C.ib.request(2,g),u(x,
|
|
199
|
+
l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.Ia&&d.Ia.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.F+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Pc(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ia&&d.Ia.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new P("drmsessionupdate");a.C.onEvent(v);d&&(d.Ia&&d.Ia.resolve(),y=new O(function(){d.loaded=
|
|
200
|
+
!0;Sf(a)&&a.u.resolve()}),y.R(Vf));z(x)}})}function Uf(a){var b=Ic(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Qc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
201
|
+
function Rf(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(Mf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Bc())){k=Ib(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=Sc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ia&&(a.i["delete"](c),c.close()["catch"](function(){}));
|
|
202
|
+
Sf(a)&&(a.u.resolve(),a.T.R(Wf))}function qf(a){var b=a.ja,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.C.Fc(nf(c))}
|
|
203
|
+
function Xf(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
204
|
+
c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return A(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,wc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](nf(f))})}
|
|
205
|
+
function Yf(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Zf)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
|
|
206
|
+
function tf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return A(g,2),a.ia||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Yf(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
|
|
207
|
+
function $f(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={za:f.za},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.za=[];f.za=f.za.concat(e.initData||[]);f.za=f.za.concat(h.initData||[]);f.za=f.za.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.za.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
204
208
|
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,
|
|
205
|
-
initData:f.za,keyIds:g});break}}return c}function
|
|
206
|
-
function
|
|
207
|
-
function
|
|
208
|
-
m.
|
|
209
|
-
function
|
|
210
|
-
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var
|
|
211
|
-
function
|
|
212
|
-
|
|
213
|
-
r.
|
|
214
|
-
r.skip=function(a){if(this.g+a>this.N.byteLength)throw
|
|
215
|
-
|
|
216
|
-
r.
|
|
217
|
-
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.W(),b.N.byteLength-b.W()))}};function
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
if(d)return a;if(0==g.length||!e)throw ab(
|
|
221
|
-
function
|
|
222
|
-
k.setUint32(b,a+1);return e}function
|
|
223
|
-
q||-1===v)p=
|
|
224
|
-
function
|
|
225
|
-
function
|
|
226
|
-
var
|
|
227
|
-
[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"]]),
|
|
228
|
-
[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
|
|
229
|
-
var
|
|
230
|
-
function
|
|
231
|
-
function
|
|
232
|
-
b=null;c=t(
|
|
233
|
-
b.skip(1),d=
|
|
234
|
-
function
|
|
235
|
-
var
|
|
236
|
-
function
|
|
237
|
-
function
|
|
238
|
-
d=1===(d&1);if(c.h!==
|
|
239
|
-
(e&246)&&32===(d&224))
|
|
240
|
-
0,h-1),
|
|
241
|
-
function
|
|
242
|
-
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]
|
|
243
|
-
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&
|
|
244
|
-
function
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
(k.X()&31)){var
|
|
248
|
-
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function
|
|
249
|
-
function
|
|
250
|
-
;function
|
|
251
|
-
function
|
|
252
|
-
function
|
|
209
|
+
initData:f.za,keyIds:g});break}}return c}function Df(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function rf(a){a.i.forEach(function(b,c){var d=b.zd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.zd=e)})}function Sf(a){a=a.i.values();return lf(a,function(b){return b.loaded})}
|
|
210
|
+
function Cf(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)}
|
|
211
|
+
function Qf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={ic:h.ic},l=k.next())h.ic=l.value,e.some(function(m){return function(n){var p=
|
|
212
|
+
m.ic;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.ic)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
213
|
+
function Ef(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
|
|
214
|
+
(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Zf=1,Vf=5,Wf=.5,ag=new qc(function(){return Gb(new Uint8Array([0]))});function bg(){}function cg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=dg[d.toLowerCase()]))return k["return"](e);if(f=eg(a))if(g=fg[f])return k["return"](g);return d?k.A(2):u(k,gg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=dg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
|
|
215
|
+
function gg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Te([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function eg(a){a=(new Wb(a)).ua.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",bg);bg.unregisterParserByMime=function(a){delete dg[a]};bg.registerParserByMime=function(a,b){dg[a]=b};
|
|
216
|
+
bg.registerParserByExtension=function(a,b){fg[a]=b};var dg={},fg={};function hg(a,b){this.N=Ib(a);this.h=b==ig;this.g=0}r=hg.prototype;r.na=function(){return this.g<this.N.byteLength};r.W=function(){return this.g};r.Te=function(){return this.N.byteLength};r.X=function(){try{var a=this.N.getUint8(this.g);this.g+=1;return a}catch(b){throw jg();}};r.Ab=function(){try{var a=this.N.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw jg();}};r.L=function(){try{var a=this.N.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw jg();}};
|
|
217
|
+
r.he=function(){try{var a=this.N.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw jg();}};r.Bb=function(){try{if(this.h){var a=this.N.getUint32(this.g,!0);var b=this.N.getUint32(this.g+4,!0)}else b=this.N.getUint32(this.g,!1),a=this.N.getUint32(this.g+4,!1)}catch(c){throw jg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Wa=function(a){if(this.g+a>this.N.byteLength)throw jg();var b=Fb(this.N,this.g,a);this.g+=a;return b};
|
|
218
|
+
r.skip=function(a){if(this.g+a>this.N.byteLength)throw jg();this.g+=a};r.je=function(a){if(this.g<a)throw jg();this.g-=a};r.seek=function(a){if(0>a||a>this.N.byteLength)throw jg();this.g=a};r.Zb=function(){for(var a=this.g;this.na()&&0!=this.N.getUint8(this.g);)this.g+=1;a=Fb(this.N,a,this.g-a);this.g+=1;return Hc(a)};function jg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",hg);hg.prototype.readTerminatedString=hg.prototype.Zb;hg.prototype.seek=hg.prototype.seek;hg.prototype.rewind=hg.prototype.je;
|
|
219
|
+
hg.prototype.skip=hg.prototype.skip;hg.prototype.readBytes=hg.prototype.Wa;hg.prototype.readUint64=hg.prototype.Bb;hg.prototype.readInt32=hg.prototype.he;hg.prototype.readUint32=hg.prototype.L;hg.prototype.readUint16=hg.prototype.Ab;hg.prototype.readUint8=hg.prototype.X;hg.prototype.getLength=hg.prototype.Te;hg.prototype.getPosition=hg.prototype.W;hg.prototype.hasMoreData=hg.prototype.na;var ig=1;hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ig};function kg(){this.i=[];this.h=[];this.g=!1}r=kg.prototype;r.box=function(a,b){var c=lg(a);this.i[c]=mg;this.h[c]=b;return this};r.P=function(a,b){var c=lg(a);this.i[c]=ng;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new hg(a,0);for(this.g=!1;a.na()&&!this.g;)this.Hc(0,a,b,c)};
|
|
220
|
+
r.Hc=function(a,b,c,d){var e=b.W();if(d&&e+8>b.N.byteLength)this.g=!0;else{var f=b.L(),g=b.L(),h=!1;switch(f){case 0:f=b.N.byteLength-e;break;case 1:if(d&&b.W()+8>b.N.byteLength){this.g=!0;return}f=b.Bb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==ng){if(d&&b.W()+4>b.N.byteLength){this.g=!0;return}m=b.L();l=m>>>24;m&=16777215}g=e+f;c&&g>b.N.byteLength&&(g=b.N.byteLength);d&&g>b.N.byteLength?this.g=!0:(d=g-b.W(),b=0<d?b.Wa(d):new Uint8Array(0),b=new hg(b,0),k({parser:this,partialOkay:c||
|
|
221
|
+
!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.W(),b.N.byteLength-b.W()))}};function og(a){for(var b=pg(a);a.reader.na()&&!a.parser.g;)a.parser.Hc(a.start+b,a.reader,a.partialOkay)}function qg(a){for(var b=pg(a),c=a.reader.L(),d=0;d<c&&(a.parser.Hc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function rg(a){return function(b){a(b.reader.Wa(b.reader.N.byteLength-b.reader.W()))}}
|
|
222
|
+
function lg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function sg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function pg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",kg);kg.headerSize=pg;kg.typeToString=sg;kg.allData=rg;kg.sampleDescription=qg;kg.children=og;kg.prototype.parseNext=kg.prototype.Hc;kg.prototype.parse=kg.prototype.parse;kg.prototype.stop=kg.prototype.stop;
|
|
223
|
+
kg.prototype.fullBox=kg.prototype.P;kg.prototype.box=kg.prototype.box;var mg=0,ng=1;function tg(a){function b(){d=!0}function c(l){f.push(l);og(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new kg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);qg(l)}).P("encv",b).P("enca",b).P("avc1",function(l){g.push({box:l,Yb:1701733238})}).P("avc3",function(l){g.push({box:l,Yb:1701733238})}).P("ac-3",function(l){g.push({box:l,Yb:1701733217})}).P("ec-3",function(l){g.push({box:l,Yb:1701733217})}).P("mp4a",function(l){g.push({box:l,Yb:1701733217})}).parse(a);
|
|
224
|
+
if(d)return a;if(0==g.length||!e)throw ab(Sc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=ug(a,e,k.box,f,k.Yb);return a}
|
|
225
|
+
function ug(a,b,c,d,e){var f=vg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);wg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=vc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,wg(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=pg(b);a=k.getUint32(b);
|
|
226
|
+
k.setUint32(b,a+1);return e}function wg(a,b,c){a=Ib(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var vg=new qc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function xg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(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=yg(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===
|
|
227
|
+
q||-1===v)p=zg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var x=y.l,w=y.i,D=y.j,C=y.h;if(x!=h||w!=k||D!=l||C!=m)n.payload&&a.nestedCues.push(n),n=yg(d,e,x,w,D,C),h=x,k=w,l=D,m=C;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=zg(d,e),a.nestedCues.push(n));n=yg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
228
|
+
function yg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function zg(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Ag(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Bg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Cg(this)}function Dg(a,b,c){return xg(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Cg(a){Eg(a,0,15);a.g=1}function Fg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Gg:d=Hg.has(c)?Hg.get(c):String.fromCharCode(c);break;case Ig:d=Jg.get(c);break;case Kg:a.i[a.g].pop();d=Lg.get(c);break;case Mg:a.i[a.g].pop(),d=Ng.get(c)}d&&a.i[a.g].push(new Ag(d,a.m,a.j,a.o,a.l))}}
|
|
229
|
+
function Og(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Eg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
230
|
+
var Gg=0,Ig=1,Kg=2,Mg=3,Hg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Jg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Lg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
231
|
+
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Ng=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
232
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Pg(a,b){this.h=Qg;this.o=new Bg(a,b);this.i=new Bg(a,b);this.l=new Bg(a,b);this.g=this.i;this.j=0;this.m=null}function Rg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Sg&&a.h!==Tg&&(e=Dg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Eg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Eg(c,0,15),d.g=15);a.h=Sg;d.h=b;return e}function Ug(a){a.h=Vg;a.g=a.l;a.g.h=0}function Wg(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Tg}
|
|
233
|
+
var Qg=0,Vg=1,Sg=3,Tg=4,Xg="black green blue cyan red yellow magenta black".split(" "),Yg="white green blue cyan red yellow magenta white_italics".split(" ");function Zg(){this.l=!1;this.B=this.D=0;this.C=$g;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";ah(this)}function ah(a){a.i=[];for(var b=0;15>b;b++)a.i.push(bh())}function bh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ch(a,b){dh(a)&&(a.i[a.h][a.g]=new Ag(b,a.u,a.o,a.m,a.s),a.g++)}function dh(a){var b=a.g<a.B&&0<=a.g;return a.h<a.D&&0<=a.h&&b}Zg.prototype.isVisible=function(){return this.l};
|
|
234
|
+
function eh(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.C===fh?"left":a.C===gh?"right":mb;if(c=xg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var fh=0,gh=1,$g=2;function hh(){this.i=[];this.h=null;this.g=0}function ih(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new jh(a.h)),a.h=null,a.g=0))}function jh(a){this.g=0;this.h=a}jh.prototype.na=function(){return this.g<this.h.length};jh.prototype.W=function(){return this.g};function kh(a){if(!a.na())throw new N(2,2,3E3);return a.h[a.g++]}jh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function lh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
235
|
+
function mh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=kh(b).value;b=null;c=t(nh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=eh(e,d,a.i)),ah(e);return b}if(137===c)for(b=kh(b).value,b=t(nh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=kh(b).value;b=null;c=t(nh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=eh(e,d,a.i)),e.l=!1;return b}if(139===c){c=kh(b).value;
|
|
236
|
+
b=null;c=t(nh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=eh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=kh(b).value,oh(a,b,d);if(143===c)return d=oh(a,255,d),ph(a),d;if(144===c)b.skip(1),d=kh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=kh(b).value,c=kh(b).value,b.skip(1),a.g&&(b=qh((c&48)>>4,(c&12)>>2,c&3),a.g.s=qh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=kh(b).value,b=kh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
237
|
+
b.skip(1),d=kh(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Zg;f.j=d;a.h[c]=f}d=kh(b).value;kh(b);kh(b);f=kh(b).value;var g=kh(b).value;b=kh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.D=(f&15)+1;b.B=(g&63)+1;a.g=a.h[c]}}}return null}function nh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
238
|
+
function oh(a,b,c){var d=null;b=t(nh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=eh(f,c,a.i));a.h[e]=null}return d}function ph(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function qh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return rh[a<<2|b<<1|c]}
|
|
239
|
+
var sh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),rh="black blue green cyan red magenta yellow white".split(" ");function th(){this.h=[];this.g=[];this.i=new hh;this.l=0;this.s=new Map([["CC1",new Pg(0,0)],["CC2",new Pg(0,1)],["CC3",new Pg(1,0)],["CC4",new Pg(1,1)]]);this.o=this.m=0;this.j=new Map;uh(this)}function uh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Cg(b.i),Cg(b.l),Cg(b.o)}
|
|
240
|
+
function vh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=wh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())ih(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=xh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
|
|
241
|
+
function wh(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.Na||!b.wa&&!b.Na||!yh(b.wa)||!yh(b.Na))return 45<=++a.l&&uh(a),null;a.l=0;b.wa&=127;b.Na&=127;if(!b.wa&&!b.Na)return null;d=null;if(16===(b.wa&112))a:{var e=b.wa;d=b.Na;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Yg[f]:7===f&&(h=!0);
|
|
242
|
+
d=1===(d&1);if(c.h!==Tg){f=c.g;if(c.h===Sg&&e!==f.g){var k=1+e-f.h;Og(f,k,1+f.g-f.h,f.h);Eg(f,0,k-1);Eg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Fg(c.g,Gg,32),g=!1,e=Yg[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Xg[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Fg(c.g,Ig,d);else if(18===
|
|
243
|
+
(e&246)&&32===(d&224))Fg(c.g,e&1?Mg:Kg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Na){case 32:Ug(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Rg(c,2,d);break;case 38:e=Rg(c,3,d);break;case 39:e=Rg(c,4,d);break;case 40:Fg(c.g,Gg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Cg(c.o);Wg(c);break;case 43:Wg(c);break;case 44:e=c.i;g=null;c.h!==Tg&&(g=Dg(e,c.j,d));Eg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Sg?e=null:(g=Dg(e,c.j,d),h=e.g-e.h+1,Og(e,h-1,h,e.h),Eg(e,
|
|
244
|
+
0,h-1),Eg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Eg(c.l,0,15);break;case 47:e=null,c.h!==Tg&&(e=Dg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ug(c),c.j=d}d=e;break a}d=null}else e=b.Na,Fg(c.g,Gg,b.wa),Fg(c.g,Gg,e);return d}
|
|
245
|
+
function xh(a,b){var c=[];try{for(;b.na();){var d=kh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=kh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new lh(e));for(var g=a.j.get(e),h=b.W();b.W()-h<f;){e=b;var k=kh(e),l=k.value,m=k.pts;if(16===l){var n=kh(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:!dh(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=eh(q,p,g.i));if(q.h+1>=q.D){p=q;for(var v=0,y=1;15>y;y++,
|
|
246
|
+
v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=bh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=eh(q,p,g.i));q.i[q.h]=bh();q.g=0;break;case 12:q.isVisible()&&(e=eh(q,p,g.i)),ah(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=mh(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?ch(g.g,"\u266a"):ch(g.g,
|
|
247
|
+
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ch(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(sh.has(e)){var w=sh.get(e);ch(g.g,w)}else ch(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ch(g.g,"_"):ch(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function yh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function zh(a,b){var c=null,d=null,e=a.L();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:e,Ud:c,Je:d}}function Ah(a,b){return{cd:1==b?a.Bb():a.L()}}function Bh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.L()}}
|
|
248
|
+
function Ch(a,b,c){var d=a.L(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Fd:null,sampleSize:null,Jc:null};c&256&&(g.Fd=a.L());c&512&&(g.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(g.Jc=0==b?a.L():a.he());e.push(g)}return{tg:d,ke:e}};function Dh(){this.i=new Map;this.h=this.g=0}
|
|
249
|
+
Dh.prototype.init=function(a){var b=this,c=[],d=[];(new kg).box("moov",og).box("mvex",og).P("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.L();f=f.L();b.g=e;b.h=f}).box("trak",og).P("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.L();c.push(e)}).box("mdia",og).P("mdhd",function(e){e=Bh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
250
|
+
Dh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new kg).box("moof",og).box("traf",og).P("trun",function(k){f=Ch(k.reader,k.version,k.flags).ke}).P("tfhd",function(k){k=zh(k.reader,k.flags);d=k.Ud||b.g;e=k.Je||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).P("tfdt",function(k){g=Ah(k.reader,k.version).cd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.na();){var x=k.L();if(6==
|
|
251
|
+
(k.X()&31)){var w=0;q.length>v&&(w=q[v].Jc||0);w=(l+w)/m;for(var D=[],C,B=k.Wa(x-1),E=C=0;E<B.length;)2==C&&3==B[E]?(C=0,B=[].concat(ia(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?C++:C=0,E++;C=B;for(E=0;E<C.length;){for(B=0;255==C[E];)B+=255,E++;B+=C[E++];for(var G=0;255==C[E];)G+=255,E++;G+=C[E++];4==B&&D.push(C.subarray(E,E+G));E+=G}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({vf:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Fd||n):l+n,v++,y=q.length>
|
|
252
|
+
v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Eh(){this.h=new Dh;this.g=new th}Eh.prototype.init=function(a){this.h.init(a)};
|
|
253
|
+
function Fh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.vf);if(0<f.length&&(d=a.g,e=e.pts,f=new hg(f,0),181===f.X()&&49===f.Ab()&&1195456820===f.L()&&3===f.X())){var g=f.X();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.X(),l=(k&4)>>2,m=f.X(),n=f.X();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,wa:m,Na: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 vh(a.g)}
|
|
254
|
+
;function Gh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Hh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Ih(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Jh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
|
|
255
|
+
function Kh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Jh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Jh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Lh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.G={};this.F={};this.g=null;this.J=d||function(){};this.i={};this.o=new bf;this.s={};this.u=b;this.C=new pc;this.m=Mh(this,this.C);this.B=new $e(function(){return Nh(e)});this.D=""}function Mh(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.D);b.resolve()});a.D=Oh(c);a.j.src=a.D;return c}r=Lh.prototype;r.destroy=function(){return this.B.destroy()};
|
|
256
|
+
function Nh(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Pb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
|
|
253
257
|
{};z(l)})}
|
|
254
|
-
r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=oc,u(m,c.C,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={pa:e.pa},g=f.next())e.pa=g.value,h=a.get(e.pa),k=
|
|
255
|
-
c.h[e.pa]=l,c.G[e.pa]=k,c.i[e.pa]=[],c.F[e.pa]=!!h.drmInfos.length);z(m)})};function
|
|
256
|
-
function
|
|
257
|
-
function
|
|
258
|
-
m,e));l.captions&&l.captions.length&&(n=a.h[g.Ma].timestampOffset,p=
|
|
259
|
-
function
|
|
260
|
-
function
|
|
261
|
-
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,
|
|
262
|
-
function
|
|
263
|
-
function
|
|
264
|
-
function
|
|
265
|
-
r.
|
|
266
|
-
r.xb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.
|
|
267
|
-
r.hb=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.cb()-this.m)};r.
|
|
268
|
-
r.Oa=function(){return Math.max(0,this.cb()-(this.U()||this.hb()?this.
|
|
269
|
-
S.prototype.setUserSeekStart=S.prototype.
|
|
270
|
-
S.prototype.setStatic=S.prototype.
|
|
271
|
-
function
|
|
272
|
-
c||0==c&&!a.o||(d=b.start(c),d>=a.B.Oa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new P("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function
|
|
273
|
-
function
|
|
274
|
-
function
|
|
275
|
-
function
|
|
276
|
-
l-3);h<k&&(h=
|
|
277
|
-
function
|
|
278
|
-
function
|
|
258
|
+
r.init=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g)return d=oc,u(m,c.C,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={pa:e.pa},g=f.next())e.pa=g.value,h=a.get(e.pa),k=Zc(h.mimeType,h.codecs),e.pa==d.Y?Rh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Vc(k,e.pa)||(c.s[e.pa]=new Uc,k=Xc(e.pa,k)),l=c.m.addSourceBuffer(k),c.o.v(l,"error",function(n){return function(){c.i[n.pa][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.o.v(l,"updateend",function(n){return function(){return Sh(c,n.pa)}}(e)),
|
|
259
|
+
c.h[e.pa]=l,c.G[e.pa]=k,c.i[e.pa]=[],c.F[e.pa]=!!h.drmInfos.length);z(m)})};function Rh(a,b){a.g||(a.g=new dd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Rb(fd[b]))}function Th(a){return a.m?"ended"==a.m.readyState:!0}function Uh(a,b){if(b==nc)var c=a.g.g;else c=Vh(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Wh(a,b){return b==nc?a.g.h:Gh(Vh(a,b))}
|
|
260
|
+
function Xh(a,b,c){if(b==nc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Vh(a,b);return Ih(a,c)}r.wc=function(){var a={total:Jh(this.j.buffered),audio:Jh(Vh(this,"audio")),video:Jh(Vh(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 Vh(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
261
|
+
function Yh(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=oc;if(b==g.Y)return u(v,gd(a.g,c,d,e),0);if(a.s[b])return u(v,Yc(a.s[b],c),10);if(f)return a.g||Rh(a,"text/vtt"),null==d&&null==e?a.u.init(c):(h=Fh(a.u,c),h.length&&(k=a.h[g.Ma].timestampOffset,md(a.g,h,d,e,k))),c=Zh(a,c,d,b),u(v,$h(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Zh(a,c,d,b);return u(v,$h(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Rh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
|
|
262
|
+
m,e));l.captions&&l.captions.length&&(n=a.h[g.Ma].timestampOffset,p=kd(l.captions),md(a.g,p,d,e,n));q=l.data;q=Zh(a,q,d,b);return u(v,$h(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function ai(a,b){var c=Wh(a,"video")||0;id(a.g,b,c)}function bi(a){a.g&&id(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=oc;return a==e.Y?u(f,d.g.remove(b,c),0):u(f,$h(d,a,function(){c<=b?Sh(d,a):d.h[a].remove(b,c)}),0)})};
|
|
263
|
+
function ci(a,b){var c;return L(function(d){c=oc;return b==c.Y?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,$h(a,b,function(){var e=a.m.duration;0>=e?Sh(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=oc;return a==c.Y?d["return"]():u(d,$h(b,a,function(){b.j.currentTime-=.001;Sh(b,a)}),0)})};
|
|
264
|
+
function di(a,b,c,d,e){var f;return L(function(g){f=oc;return b==f.Y?(a.g.u=c,hd(a.g,d,e),g["return"]()):u(g,Promise.all([$h(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Sh(a,b)}),$h(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Sh(a,b)}),$h(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Sh(a,b)})]),0)})}
|
|
265
|
+
r.endOfStream=function(a){var b=this;return L(function(c){return u(c,ei(b,function(){Th(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ha=function(a){var b=this;return L(function(c){return u(c,ei(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Sh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),fi(a,b))}function $h(a,b,c){af(a.B);c={start:c,p:new pc};a.i[b].push(c);1==a.i[b].length&&gi(a,b);return c.p}
|
|
266
|
+
function ei(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:af(a.B);c=[];d={};for(e in a.h)d.Hb=new pc,f={start:function(l){return function(){return l.Hb.resolve()}}(d),p:d.Hb},a.i[e].push(f),c.push(d.Hb),1==a.i[e].length&&f.start(),d={Hb:d.Hb};A(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)fi(a,h)}z(k)}})}function fi(a,b){a.i[b].shift();gi(a,b)}
|
|
267
|
+
function gi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),fi(a,b)}}function Zh(a,b,c,d){var e=a.F[d];null==c&&e&&(xc()||vc())&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=tg(b));return b}var Oh=window.URL.createObjectURL;function hi(a,b,c){this.ma=a;this.ha=b;this.ba=c}hi.prototype.Vb=function(){return this.ha};hi.prototype.Rb=function(){return this.ba};function ii(a,b){return a&&b?a.Vb()==b.Vb()&&a.Rb()==b.Rb()&&hb(a.ma(),b.ma()):a==b}M("shaka.media.InitSegmentReference",hi);hi.prototype.getEndByte=hi.prototype.Rb;hi.prototype.getStartByte=hi.prototype.Vb;
|
|
268
|
+
function ji(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.ha=d;this.ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=ji.prototype;r.ma=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Re=function(){return this.endTime};r.Vb=function(){return this.ha};r.Rb=function(){return this.ba};r.jf=function(){return this.tilesLayout};
|
|
269
|
+
r.hf=function(){return this.i};M("shaka.media.SegmentReference",ji);ji.prototype.getTileDuration=ji.prototype.hf;ji.prototype.getTilesLayout=ji.prototype.jf;ji.prototype.getEndByte=ji.prototype.Rb;ji.prototype.getStartByte=ji.prototype.Vb;ji.prototype.getEndTime=ji.prototype.Re;ji.prototype.getStartTime=ji.prototype.getStartTime;ji.prototype.getUris=ji.prototype.ma;function S(a,b,c){this.l=a;this.Ic=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.C=0;this.D=!1}r=S.prototype;r.getDuration=function(){return this.i};r.Xe=function(){return this.g};r.Ha=function(a){this.i=a};r.cf=function(){return this.l};r.pe=function(a){this.o=a};r.dc=function(a){this.s=a};r.Md=function(a){this.m=a};r.Kf=function(a){this.Ic=a};r.Qe=function(){return this.Ic};
|
|
270
|
+
r.xb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.xd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&!this.D&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.rd=function(){this.D=!0};r.xd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.wd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
|
|
271
|
+
r.U=function(){return Infinity==this.i&&!this.s};r.hb=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.cb()-this.m)};r.qe=function(a){this.u=a};r.cb=function(){return this.U()||this.hb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.C,this.i):this.h?Math.min(this.h,this.i):this.i};r.Ub=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.cb()-this.m+a,this.Oa()))};r.ub=function(){return this.Ub(0)};
|
|
272
|
+
r.Oa=function(){return Math.max(0,this.cb()-(this.U()||this.hb()?this.Ic:0))};r.te=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.oe=function(a){this.C=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.oe;S.prototype.usingPresentationStartTime=S.prototype.te;S.prototype.getSeekRangeEnd=S.prototype.Oa;S.prototype.getSeekRangeStart=S.prototype.ub;S.prototype.getSafeSeekRangeStart=S.prototype.Ub;S.prototype.getSegmentAvailabilityEnd=S.prototype.cb;
|
|
273
|
+
S.prototype.setUserSeekStart=S.prototype.qe;S.prototype.getSegmentAvailabilityStart=S.prototype.Pa;S.prototype.isInProgress=S.prototype.hb;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.wd;S.prototype.notifyMinSegmentStartTime=S.prototype.xd;S.prototype.lockStartTime=S.prototype.rd;S.prototype.notifySegments=S.prototype.xb;S.prototype.getDelay=S.prototype.Qe;S.prototype.setDelay=S.prototype.Kf;
|
|
274
|
+
S.prototype.setSegmentAvailabilityDuration=S.prototype.Md;S.prototype.setStatic=S.prototype.dc;S.prototype.setClockOffset=S.prototype.pe;S.prototype.getPresentationStartTime=S.prototype.cf;S.prototype.setDuration=S.prototype.Ha;S.prototype.getMaxSegmentDuration=S.prototype.Xe;S.prototype.getDuration=S.prototype.getDuration;function ki(a,b){this.j=a;this.m=li(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ki.prototype.release=function(){this.j=null;this.i=function(){}};function mi(a,b){a.i=b}function ni(a){this.g=a}function li(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Jh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function oi(a,b,c,d,e){var f=this;this.g=a;this.B=b;this.l=c;this.u=e;this.i=new bf;this.s=!1;this.C=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.v(a,"waiting",function(){return pi(f)});this.m=(new O(function(){pi(f)})).ya(.25)}oi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.u=null};oi.prototype.Bd=function(){this.o=!0;pi(this)};
|
|
275
|
+
function pi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.C&&(a.j=!1,a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=li(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Kh(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
276
|
+
c||0==c&&!a.o||(d=b.start(c),d>=a.B.Oa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new P("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function qi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ri.value().get(b),c.oa(a,b,d))}var ri=new qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function si(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new bf;this.i=new ti(a);qi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){ui(d,d.j)})}si.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 vi(a){return a.m?a.g.currentTime:a.j}function wi(a,b){0<a.g.readyState?xi(a.i,b):qi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){ui(a,a.j)})}
|
|
277
|
+
function ui(a,b){.001>Math.abs(a.g.currentTime-b)?yi(a):(a.h.oa(a.g,"seeking",function(){yi(a)}),xi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function yi(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function ti(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ti.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
278
|
+
function xi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ya(.1)};function zi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new bf;qi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}zi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};zi.prototype.o=function(a){this.h=this.j?this.h:a};zi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};zi.prototype.C=function(){};
|
|
279
|
+
function Ai(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.D=b.minBufferTime||0;this.l=c;this.B=e;this.u=null;this.j=new oi(a,b.presentationTimeline,c,Bi(a,c),f);this.h=new si(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=vi(g.h);h=Ci(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;wi(g.h,h);h=void 0;break a}g.B();h=void 0}return h},Di(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vi(g.h),k=g.g.ub(),l=g.g.Oa();3>l-k&&(k=
|
|
280
|
+
l-3);h<k&&(h=Ci(g,h),g.i.currentTime=h)}})).ya(.25)}Ai.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};Ai.prototype.o=function(a){wi(this.h,a)};Ai.prototype.m=function(){var a=vi(this.h);return 0<this.i.readyState&&!this.i.paused?Ei(this,a):a};
|
|
281
|
+
function Di(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ub():a.g.Oa():0>b&&(b=a.g.Oa()+b);return Fi(a,Ei(a,b))}Ai.prototype.C=function(){this.j.Bd()};function Fi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ci(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ub(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ub(c),k=a.g.Ub(d);c=a.g.Ub(c+d);return b>=g?Fi(a,b):b>f?f:b<e?Hh(a.i.buffered,k)?k:c:b>=h||Hh(a.i.buffered,b)?b:c}
|
|
282
|
+
function Ei(a,b){var c=a.g.ub();if(b<c)return c;c=a.g.Oa();return b>c?c:b}function Bi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ki(new ni(a),b.stallThreshold);mi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=U.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.qf=function(){this.i=!0};
|
|
279
283
|
r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
|
|
280
|
-
r.
|
|
281
|
-
r.Va=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new
|
|
282
|
-
r.
|
|
283
|
-
function
|
|
284
|
-
U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.
|
|
288
|
-
|
|
289
|
-
function
|
|
290
|
-
function(c){b.g["delete"](c.region)})}pa(
|
|
291
|
-
|
|
292
|
-
function
|
|
293
|
-
function
|
|
294
|
-
function
|
|
295
|
-
function
|
|
296
|
-
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();z(e)})}function
|
|
297
|
-
function
|
|
298
|
-
(m
|
|
299
|
-
function
|
|
300
|
-
case 7:f=Array.from(a.h.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:
|
|
301
|
-
function
|
|
302
|
-
var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,
|
|
303
|
-
function
|
|
304
|
-
function
|
|
305
|
-
B=n.subarray(0,C);n=n.subarray(C);return u(E,
|
|
306
|
-
e.Y&&a.j.ignoreTextStreamFailures)a.h["delete"](e.Y),
|
|
307
|
-
function
|
|
308
|
-
function
|
|
309
|
-
case 4:return n=v.h,
|
|
310
|
-
function
|
|
311
|
-
k=k.reader.Wa(k.reader.N.byteLength-k.reader.W());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.
|
|
312
|
-
function
|
|
313
|
-
function
|
|
314
|
-
function
|
|
315
|
-
function
|
|
316
|
-
function
|
|
317
|
-
function
|
|
318
|
-
function
|
|
319
|
-
r.append=function(a){function b(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
function
|
|
323
|
-
function
|
|
324
|
-
window&&(this.l=new ResizeObserver(function(){
|
|
325
|
-
r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.
|
|
326
|
-
function
|
|
327
|
-
h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.
|
|
328
|
-
function
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
284
|
+
r.Dc=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ia(a)))};r.wb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Dc(a);this.$a(b)};r.$a=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
|
|
285
|
+
r.Va=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new ji(a.startTime,b,a.j,a.ha,a.ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
|
|
286
|
+
r.Kc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ia(d)):(c.g.stop(),c.g=null)}),this.g.ya(a))};U.prototype[Symbol.iterator]=function(){return this.bb(0)};U.prototype.bb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Gi(this,b,d)};
|
|
287
|
+
function Hi(a,b,c){return new U([new ji(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Hi;U.prototype.getIteratorForTime=U.prototype.bb;U.prototype.updateEvery=U.prototype.Kc;U.prototype.fit=U.prototype.Va;U.prototype.evict=U.prototype.$a;U.prototype.mergeAndEvict=U.prototype.wb;U.prototype.merge=U.prototype.Dc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.qf;
|
|
288
|
+
U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Gi(a,b,c){this.i=a;this.h=b;this.g=c}Gi.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.bb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
|
|
289
|
+
Gi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.ma().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Gi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.ma().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Gi);Gi.prototype.next=Gi.prototype.next;Gi.prototype.current=Gi.prototype.current;
|
|
290
|
+
Gi.prototype.seek=Gi.prototype.seek;function Ii(){U.call(this,[]);this.j=[]}pa(Ii,U);r=Ii.prototype;r.clone=function(){var a=new Ii;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
|
|
291
|
+
r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.Dc=function(){};r.$a=function(){};r.wb=function(){};r.Va=function(){};r.Kc=function(){};M("shaka.media.MetaSegmentIndex",Ii);Ii.prototype.updateEvery=Ii.prototype.Kc;Ii.prototype.fit=Ii.prototype.Va;Ii.prototype.mergeAndEvict=Ii.prototype.wb;Ii.prototype.evict=Ii.prototype.$a;Ii.prototype.merge=Ii.prototype.Dc;
|
|
292
|
+
Ii.prototype.offset=Ii.prototype.offset;Ii.prototype.get=Ii.prototype.get;Ii.prototype.find=Ii.prototype.find;Ii.prototype.release=Ii.prototype.release;function Ji(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ac();this.h=new O(function(){b.g.fe(.25*b.i)})}Ji.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ji.prototype.set=function(a){this.i=a;Ki(this)};Ji.prototype.xc=function(){return this.g.xc()};function Ki(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ac()!=b&&a.g.Ld(b);return}catch(c){}a.h.ya(.25);0!=a.g.Ac()&&a.g.Ld(0)};function Li(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Mi(b,!1)})).ya(.25)}Li.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()};
|
|
293
|
+
function Mi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?Ni:e>h.endTime?Oi:Pi;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.ob==k&&n.nb==l&&n.gb(h,f)}}};function Qi(a){Ke.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 P("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ya(2)}pa(Qi,Ke);Qi.prototype.release=function(){this.g.clear();this.h.stop();Ke.prototype.release.call(this)};function Ri(a){Ke.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{ob:null,nb:Pi,gb:function(c,d){return Si(b,"enter",c,d)}},{ob:Ni,nb:Pi,gb:function(c,d){return Si(b,"enter",c,d)}},{ob:Oi,nb:Pi,gb:function(c,d){return Si(b,"enter",c,d)}},{ob:Pi,nb:Ni,gb:function(c,d){return Si(b,"exit",c,d)}},{ob:Pi,nb:Oi,gb:function(c,d){return Si(b,"exit",c,d)}},{ob:Ni,nb:Oi,gb:function(c,d){return Si(b,"skip",c,d)}},{ob:Oi,nb:Ni,gb:function(c,d){return Si(b,"skip",c,d)}}];this.h=new bf;this.h.v(this.i,"regionremove",
|
|
294
|
+
function(c){b.g["delete"](c.region)})}pa(Ri,Ke);Ri.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ke.prototype.release.call(this)};function Si(a,b,c,d){b=new P(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Ni=1,Pi=2,Oi=3;function Ti(a,b,c,d,e){a=Te(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ui(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.h=new Map;this.B=!1;this.C=null;this.s=!1;this.i=new $e(function(){return Vi(c)})}Ui.prototype.destroy=function(){return this.i.destroy()};function Vi(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Wi(e),b.push(Xi(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.j=null;z(f)})}
|
|
295
|
+
Ui.prototype.configure=function(a){this.j=a;this.C=new ze({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)};Ui.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,Yi(a),2);af(a.i);a.B=!0;z(b)})};
|
|
296
|
+
function Zi(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=oc,A(k,2),u(k,ci(a.g.O,c.Y),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Zc(b.mimeType,b.codecs);Rh(a.g.O,e);f=a.g.O.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=$i(b),a.h.set(c.Y,h),aj(a,h,0);z(k)}})}function bj(a){var b=a.h.get(nc);b&&(Wi(b),Xi(b)["catch"](function(){}),a.h["delete"](nc));a.o=null}
|
|
297
|
+
function cj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.kb&&(dj(a,e,!1,0,!1),c.kb=d)}else if(d=c.kb)c.kb=null,dj(a,d,!0,0,!1)}}function ej(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.B&&(b.video&&dj(a,b.video,c,d,e),b.audio&&dj(a,b.audio,c,d,e))}function fj(a,b){a.o=b;a.B&&dj(a,b,!0,0,!1)}
|
|
298
|
+
function dj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=nc?f&&(f.kb&&(b.trickModeVideo?(f.kb=b,b=b.trickModeVideo):f.kb=null),f.stream!=b||e)&&(b.type==nc&&Rh(a.g.O,Zc(b.mimeType,b.codecs)),f.stream=b,f.$=null,c&&(f.Pb?f.Nc=!0:f.Ga?(f.mb=!0,f.rc=d,f.Nc=!0):(Wi(f),gj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),hj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Zi(a,b)}
|
|
299
|
+
function hj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.zc();var g=Wh(a.g.O,b.type),h=b.stream.segmentIndex.find(b.xa?b.xa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ba?k.ba-k.ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ba?k.ba-k.ha:null)||0),k=a.g.getBandwidthEstimate(),
|
|
300
|
+
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();z(e)})}function ij(a,b){b.Pb||b.mb||(b.Ga?(b.mb=!0,b.rc=0):null==Uh(a.g.O,b.type)?null==b.Ja&&aj(a,b,0):(Wi(b),gj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
|
|
301
|
+
function Yi(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=oc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Ya,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Y,a.o),d.add(a.o));e=a.g.O;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}af(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.O.Ha(p):a.g.O.Ha(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.h.has(k)||
|
|
302
|
+
(m=$i(l),a.h.set(k,m),aj(a,m,0));z(n)})}function $i(a){return{stream:a,type:a.type,$:null,xa:null,Cc:null,qd:null,pd:null,od:null,kb:null,endOfStream:!1,Ga:!1,Ja:null,mb:!1,rc:0,Nc:!1,Pb:!1,Dd:!1,Wb:!1,ta:null}}
|
|
303
|
+
function jj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:af(a.i);if(b.Ga||null==b.Ja||b.Pb)return h["return"]();b.Ja=null;if(!b.mb){h.A(2);break}return u(h,gj(a,b,b.Nc,b.rc),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 null==b.Ja&&aj(a,b,0),h["return"]();case 4:A(h,6);d=kj(a,b);null!=d&&(aj(a,b,d),b.Wb=!1);va(h,7);break;case 6:return e=F(h),u(h,lj(a,e),8);case 8:return h["return"]();
|
|
304
|
+
case 7:f=Array.from(a.h.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:af(a.i),g=a.g.O.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ha(g),z(h)}})}
|
|
305
|
+
function kj(a,b){if(mj(b))return ai(a.g.O,b.stream.originalId||""),null;b.type==nc&&bi(a.g.O);var c=a.g.zc(),d=b.xa?b.xa.endTime:c,e=Xh(a.g.O,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(nc))&&mj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=Wh(a.g.O,b.type);e=nj(a,b,c,e);if(!e)return a.j.updateIntervalSeconds;f=Infinity;
|
|
306
|
+
var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,mj(h)||h.$&&!h.$.current()||(f=Math.min(f,h.xa?h.xa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;oj(a,b,c,e)["catch"](function(){});return null}
|
|
307
|
+
function nj(a,b,c,d){if(b.$)return b.$.current();if(b.xa||d)return b.$=b.stream.segmentIndex.bb(b.xa?b.xa.endTime:d),b.$&&b.$.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.$=b.stream.segmentIndex.bb(d),e=b.$&&b.$.next().value);e||(b.$=b.stream.segmentIndex.bb(c),e=b.$&&b.$.next().value);return e}
|
|
308
|
+
function oj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){switch(x.g){case 1:return e=oc,f=b.stream,g=b.$,b.Ga=!0,A(x,2),u(x,pj(a,b,d),4);case 4:af(a.i);if(a.s)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var D,C,B;return L(function(E){af(a.i);if(a.s)return E["return"]();n=qj(n,w);D=!1;C=0;(new kg).box("mdat",function(G){C=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return E.A(0);
|
|
309
|
+
B=n.subarray(0,C);n=n.subarray(C);return u(E,rj(a,b,c,f,d,B),0)})},u(x,sj(a,b,d,p),6);l=sj(a,b,d);return u(x,l,7);case 7:return m=x.h,af(a.i),a.s?x["return"]():b.mb?(b.Ga=!1,aj(a,b,0),x["return"]()):u(x,rj(a,b,c,f,d,m),6);case 6:af(a.i);if(a.s)return x["return"]();b.xa=d;g.next();b.Ga=!1;b.Dd=!1;q=a.g.O.wc();v=q[b.type];$a(JSON.stringify(v));b.mb||a.g.Bd();aj(a,b,0);va(x,0);break;case 2:y=F(x);af(a.i,y);if(a.s)return x["return"]();b.Ga=!1;if(7001==y.code)b.Ga=!1,b.Ja=null,aj(a,b,0),x.A(0);else if(b.type==
|
|
310
|
+
e.Y&&a.j.ignoreTextStreamFailures)a.h["delete"](e.Y),x.A(0);else if(3017==y.code)tj(a,b,y),x.A(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ga=!1,b.Ja=null,aj(a,b,1),x.A(0);else return b.Wb=!0,y.severity=2,u(x,lj(a,y),0)}})}function qj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
311
|
+
function tj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Dd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Wb=!0;a.s=!0;a.g.onError(c);return}b.Dd=!0}aj(a,b,4)}
|
|
312
|
+
function pj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.qd||e!=b.pd||f!=b.od)h=function(){var n;return L(function(p){if(1==p.g)return A(p,2),b.pd=e,b.od=f,b.qd=g,u(p,di(a.g.O,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=F(p);b.pd=null;b.od=null;b.qd=null;throw n;})},d.push(h());!ii(c.h,b.Cc)&&(b.Cc=c.h)&&(k=sj(a,b,c.h),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
|
|
313
|
+
case 4:return n=v.h,af(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Yh(a.g.O,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Cc=null,q;}})},d.push(l()));return u(m,Promise.all(d),0)})}
|
|
314
|
+
function rj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new kg).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Zb();var n=k.reader.Zb();var p=k.reader.L();var q=k.reader.L();var v=k.reader.L();var y=k.reader.L();var x=e.startTime+q/p}else p=k.reader.L(),x=k.reader.Bb()/p+e.timestampOffset,q=x-e.startTime,v=k.reader.L(),y=k.reader.L(),m=k.reader.Zb(),n=k.reader.Zb();
|
|
315
|
+
k=k.reader.Wa(k.reader.N.byteLength-k.reader.W());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.uf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new P(uj,l),a.g.onEvent(l)))}).parse(f),u(h,vj(a,b,c),2);if(3!=h.g)return af(a.i),u(h,Yh(a.g.O,b.type,f,e.startTime,e.endTime,g),3);af(a.i);z(h)})}
|
|
316
|
+
function vj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Uh(a.g.O,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.O.remove(b.type,e,e+g),2)}af(a.i);z(h)})}function mj(a){return a&&a.type==nc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
317
|
+
function sj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=Ze,f=Ti(c.ma(),c.ha,c.ba,a.j.retryParameters,d),g=a.g.ib.request(e,f),b.ta=g,u(k,g.promise,2);h=k.h;b.ta=null;return k["return"](h.data)})}
|
|
318
|
+
function gj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.mb=!1,b.Nc=!1,b.rc=0,b.Pb=!0,b.xa=null,b.Cc=null,b.$=null,d?(e=a.g.zc(),f=a.g.O.getDuration(),u(g,a.g.O.remove(b.type,e+d,f),3)):u(g,ci(a.g.O,b.type),4);if(3!=g.g)return af(a.i),c?u(g,a.g.O.flush(b.type),3):g.A(3);af(a.i);b.Pb=!1;b.endOfStream=!1;aj(a,b,0);z(g)})}
|
|
319
|
+
function aj(a,b,c){var d=b.type;if(d!=nc||a.h.has(d))b.Ja=(new rc(function(){var e;return L(function(f){if(1==f.g)return A(f,2),u(f,jj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function Wi(a){null!=a.Ja&&(a.Ja.stop(),a.Ja=null)}function Xi(a){return L(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function lj(a,b){return L(function(c){if(1==c.g)return u(c,Be(a.C),2);af(a.i);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function wj(a,b){var c=xj(),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 yj(d)});this.s=new $e(function(){return zj(d)})}wj.prototype.destroy=function(){return this.s.destroy()};function zj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Aj(a),u(e,a.u,2);a.g&&a.g.Ea.jb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ea.jb();a.g=null;a.m=[];a.j=null;z(e)})}
|
|
320
|
+
function Bj(a,b){var c={yb:function(){},Ec:function(){},jb:function(){},onError:function(){},Gc:function(){},sg:function(){}};a.m.push({create:b,Ea:c});a.h&&a.h.abort();Aj(a);return c}
|
|
321
|
+
function yj(a){return L(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.fb)var c=!1;else{a.g&&(a.g.Ea.jb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ea.yb(),a.g={node:d.node,payload:d.payload,fb:d.fb,Ea:c.Ea}):c.Ea.Gc();c=!0}c?c=Promise.resolve():a.g?c=Cj(a):(a.j.tf(a.i),a.o=new pc,c=a.o);b=u(b,c,1)}return b})}
|
|
322
|
+
function Cj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.Ze(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Le(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.Ea.Ec(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ea.jb();else a.g.Ea.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Aj(a){a.o&&(a.o.resolve(),a.o=null)};function Dj(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=Dj.prototype;r.remove=function(a,b){if(!this.g)return!1;Ej(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
323
|
+
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||h.spacer?(h.spacer&&Kb("shaka.extern.Cue",
|
|
324
|
+
"Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={pb:f.pb},g=d.next())f.pb=g.value,a.some(function(h){return function(k){return k.startTime==h.pb.startTime&&k.endTime==h.pb.endTime&&k.text==h.pb.payload?!0:!1}}(f))||(g=Fj(f.pb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
|
|
325
|
+
k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Ej(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"};
|
|
326
|
+
function Fj(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}
|
|
327
|
+
function Ej(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Dj);Dj.prototype.setTextVisibility=Dj.prototype.setTextVisibility;Dj.prototype.isTextVisible=Dj.prototype.isTextVisible;Dj.prototype.destroy=Dj.prototype.destroy;Dj.prototype.append=Dj.prototype.append;Dj.prototype.remove=Dj.prototype.remove;function Gj(){}function Hj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Gj);Gj.removeAllChildren=Hj;function Ij(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 O(function(){Jj(c)})).ya(.25);this.h=new Map;this.s=new bf;this.s.v(document,"fullscreenchange",function(){Jj(c,!0)});this.l=null;"ResizeObserver"in
|
|
328
|
+
window&&(this.l=new ResizeObserver(function(){Jj(c,!0)}),this.l.observe(this.g));this.o=new Map}r=Ij.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={fc:c.fc},d=a.next())c.fc=d.value,b.some(function(e){return function(f){return tb(f,e.fc)}}(c))||this.i.push(c.fc);Jj(this)};
|
|
329
|
+
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});Jj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
|
|
330
|
+
function Kj(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.ve:null;l&&(g.push(l.dd),l.$b&&g.push(l.$b),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Lj(a,k,e),l=a.h.get(k),n=l.ve,f=!0));0<k.nestedCues.length&&n&&Kj(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?
|
|
331
|
+
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.$b?(c.appendChild(d.$b),d.$b.appendChild(d.dd)):c.appendChild(d.dd)}}function Jj(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())Hj(e.value);Hj(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));Kj(a,a.i,a.g,c,[])}}}
|
|
332
|
+
function Lj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Mj(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");
|
|
333
|
+
e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.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,{dd:f,
|
|
334
|
+
ve:e,$b:c})}
|
|
335
|
+
function Mj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Nj(c.linePadding,c,a.m);f.paddingRight=Nj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
|
|
336
|
+
"center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Oj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
|
|
337
|
+
g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Nj(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
|
|
338
|
+
pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==
|
|
339
|
+
nb?f.width=c.size+"%":f.height=c.size+"%")}function Nj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Oj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Ij);
|
|
340
|
+
Ij.prototype.setTextVisibility=Ij.prototype.setTextVisibility;Ij.prototype.isTextVisible=Ij.prototype.isTextVisible;Ij.prototype.remove=Ij.prototype.remove;Ij.prototype.destroy=Ij.prototype.destroy;Ij.prototype.append=Ij.prototype.append;function Pj(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+">"},
|
|
336
341
|
"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
|
|
337
|
-
break;case "right":k.push("align:right");break;case mb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function
|
|
338
|
-
function
|
|
339
|
-
k),g=!1)}return g}function
|
|
340
|
-
function
|
|
342
|
+
break;case "right":k.push("align:right");break;case mb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Qj(){}
|
|
343
|
+
function Rj(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]=Le(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Le(l)),k=Rj(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 "+
|
|
344
|
+
k),g=!1)}return g}function Sj(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 Tj(a,b){return a&&b}M("shaka.util.ConfigUtils",Qj);Qj.convertToConfigObject=Sj;Qj.mergeConfigObjects=Rj;function Uj(){}
|
|
345
|
+
function Vj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ae(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Tf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ae(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
|
|
341
346
|
ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
|
|
342
|
-
manifestPreprocessor:function(g){return
|
|
343
|
-
useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||
|
|
344
|
-
3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return
|
|
347
|
+
manifestPreprocessor:function(g){return Tj([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Ae(),failureCallback:function(g){return Tj([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,
|
|
348
|
+
useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||xc()||zc())d.gapDetectionThreshold=.5;if(yc()||xc()||zc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return L(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),
|
|
349
|
+
3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Tj([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new je},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,
|
|
345
350
|
minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
|
|
346
|
-
e.trackSelectionCallback=function(g){return L(function(h){return h["return"](
|
|
347
|
-
function
|
|
348
|
-
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!=nc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",
|
|
349
|
-
function
|
|
350
|
-
this.Nb=this.h.preferForcedSubs;this.Mb=[];b&&b(this);this.D=
|
|
351
|
-
f){return
|
|
352
|
-
d.set(this.qb,function(e,f){return
|
|
353
|
-
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,
|
|
354
|
-
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==
|
|
355
|
-
if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:
|
|
356
|
-
r.
|
|
357
|
-
r.load=function(a,b,c){var d=this;if(this.l==
|
|
358
|
-
function(l){return k(l)}})};function
|
|
359
|
-
function
|
|
351
|
+
e.trackSelectionCallback=function(g){return L(function(h){return h["return"](Wj(g,f.preferredAudioLanguage))})};return f}function Xj(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Rj(a,b,c||Vj(),d,"")}
|
|
352
|
+
function Wj(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ud(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return od(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/
|
|
353
|
+
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!=nc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Uj);Uj.mergeConfigObjects=Xj;function Yj(){this.g=null;this.h=[]}function Zj(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 ak(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}
|
|
354
|
+
function bk(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 ck(){this.i=this.h=null;this.g=[]}function dk(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 ek(){this.o=this.s=this.D=this.B=this.m=this.j=this.C=this.l=this.i=this.F=this.G=this.J=this.u=this.M=NaN;this.g=new Yj;this.h=new ck};function V(a,b){Ke.call(this);var c=this;this.l=fk;this.mc=this.g=null;this.ia=!1;this.tc=new bf;this.Lb=new bf;this.o=new bf;this.ed=this.u=this.Kb=this.i=this.uc=this.G=this.j=this.vc=this.J=this.oc=this.F=this.La=this.C=this.M=this.m=this.D=null;this.nd=1E9;this.h=gk(this);this.md={width:Infinity,height:Infinity};this.s=null;this.Ba=new re(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ca=this.h.preferredTextLanguage;this.Eb=this.h.preferredTextRole;
|
|
355
|
+
this.Nb=this.h.preferForcedSubs;this.Mb=[];b&&b(this);this.D=hk(this);this.D.Jd(this.h.streaming.forceHTTPS);this.B=null;ik&&(this.B=Rb(ik));this.tc.v(window,"online",function(){c.Ed()});this.T={name:"detach"};this.V={name:"attach"};this.ea={name:"unload"};this.sd={name:"manifest-parser"};this.ld={name:"manifest"};this.Ka={name:"media-source"};this.gd={name:"drm-engine"};this.aa={name:"load"};this.vd={name:"src-equals-drm-engine"};this.qb={name:"src-equals"};var d=new Map;d.set(this.V,function(e,
|
|
356
|
+
f){return Ge(jk(c,e,f))});d.set(this.T,function(e){e.H&&(c.Lb.Ra(),e.H=null);c.B&&c.B.release();c.g=null;e=Promise.resolve();return Ge(e)});d.set(this.ea,function(e){return Ge(kk(c,e))});d.set(this.Ka,function(e){e=lk(c,e);return Ge(e)});d.set(this.sd,function(e,f){var g=mk(c,e,f);return Ge(g)});d.set(this.ld,function(e){return nk(c,e)});d.set(this.gd,function(e){e=ok(c,e);return Ge(e)});d.set(this.aa,function(e,f){return Ge(pk(c,e,f))});d.set(this.vd,function(e,f){var g=qk(c,e,f);return Ge(g)});
|
|
357
|
+
d.set(this.qb,function(e,f){return rk(c,e,f)});this.ja=new wj(this.T,{Ze:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.H!=h.H?c.T:g==c.V?c.V:g==c.Ka||g==c.aa?c.Ka:g==c.qb?c.vd:null);e==c.Ka&&(k=g==c.aa&&f.H==h.H?c.sd:c.ea);e==c.sd&&(k=sk(c.aa,c.ld,c.ea,g,f,h));e==c.ld&&(k=sk(c.aa,c.gd,c.ea,g,f,h));e==c.gd&&(k=sk(c.aa,c.aa,c.ea,g,f,h));e==c.vd&&(k=g==c.qb&&f.H==h.H?c.qb:c.ea);if(e==c.aa||e==c.qb)k=c.ea;e==c.ea&&(k=h.H&&f.H==h.H?c.V:c.T);return k},Le:function(e,f,g){c.dispatchEvent(tk(uk,
|
|
358
|
+
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,kk(c,e),2):f["return"](e.H?c.V:c.T)})},tf:function(e){c.dispatchEvent(tk(vk,(new Map).set("state",e.name)))}});a&&this.Ob(a,!0)}pa(V,Ke);function tk(a,b){return new P(a,b)}r=V.prototype;
|
|
359
|
+
r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==wk)return c["return"]();a.l=wk;b=Bj(a.ja,function(){return{node:a.T,payload:xj(),fb:!1}});return u(c,new Promise(function(d){b.yb=function(){};b.Ec=function(){d()};b.jb=function(){d()};b.onError=function(){d()};b.Gc=function(){d()}}),2);case 2:return u(c,a.ja.destroy(),3);case 3:a.tc&&(a.tc.release(),a.tc=null);a.Lb&&(a.Lb.release(),a.Lb=null);a.o&&(a.o.release(),a.o=null);a.ed=null;a.u=null;a.h=null;a.s=null;a.mc=null;
|
|
360
|
+
if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Ke.prototype.release.call(a),z(c)}})};r.Ob=function(a,b){b=void 0===b?!0:b;if(this.l==wk)return Promise.reject(xk());var c=xj();c.H=a;sc()||(b=!1);var d=b?this.Ka:this.V,e=Bj(this.ja,function(){return{node:d,payload:c,fb:!1}});e.yb=function(){};return yk(e)};r.detach=function(){var a=this;if(this.l==wk)return Promise.reject(xk());var b=Bj(this.ja,function(){return{node:a.T,payload:xj(),fb:!1}});b.yb=function(){};return yk(b)};
|
|
361
|
+
r.Pd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==wk)return Promise.reject(xk());sc()||(a=!1);var c=xj(),d=Bj(this.ja,function(e){var f=e.H&&a?b.Ka:e.H?b.V:b.T;c.H=e.H;return{node:f,payload:c,fb:!1}});d.yb=function(){};return yk(d)};
|
|
362
|
+
r.load=function(a,b,c){var d=this;if(this.l==wk)return Promise.reject(xk());this.dispatchEvent(tk(zk));var e=xj();e.uri=a;e.Nd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ak(this,e)?this.qb:this.aa,g=Bj(this.ja,function(h){if(null==h.H)return null;e.H=h.H;return{node:f,payload:e,fb:!0}});this.s=new ek;g.yb=function(){};return new Promise(function(h,k){g.Gc=function(){return k(new N(2,7,7002))};g.Ec=function(){h();d.dispatchEvent(tk(Bk))};g.jb=function(){return k(xk())};g.onError=
|
|
363
|
+
function(l){return k(l)}})};function Ak(a,b){if(!sc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=eg(d),c=Ck[c]);if(c){if(""==(b.H||uc()).canPlayType(c))return!1;if(!sc()||!(c in dg||eg(d)in fg)||a.h.streaming.preferNativeHls)return!0;if(Ac())return a.h.streaming.useNativeHlsOnSafari}return!1}function jk(a,b,c){null==b.H&&(b.H=c.H,a.Lb.v(b.H,"error",function(){var d=Dk(a);d&&Ek(a,d)}));a.g=b.H;return Promise.resolve()}
|
|
364
|
+
function kk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=wk&&(a.l=fk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(tk(Fk));b.mimeType=null;b.startTime=null;b.uri=null;b.H&&a.o.Ra();a.La&&(a.La.release(),a.La=null);a.oc&&(a.oc.stop(),a.oc=null);if(!a.G){n.A(3);break}return u(n,a.G.stop(),4);case 4:a.G=null,a.uc=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,a.j.destroy(),
|
|
360
365
|
8);case 8:a.j=null;case 7:a.F&&(a.F.release(),a.F=null);a.C&&(a.C.release(),a.C=null);if(!a.M){n.A(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.B)a.B.onAssetUnload();if(!b.H||!b.H.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).R(.1)}),12);case 12:for(b.H.removeAttribute("src"),b.H.load();b.H.lastChild;)b.H.removeChild(b.H.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.Kb=null;a.J=null;if(a.i){d=t(a.i.variants);
|
|
361
|
-
for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new
|
|
362
|
-
function
|
|
363
|
-
function
|
|
364
|
-
function
|
|
365
|
-
l;break a}k=null}null==k&&(h.g.add(g),g=new P("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return
|
|
366
|
-
a.G.start(c,e),2);g.i=m.h;h=
|
|
367
|
-
function
|
|
368
|
-
function
|
|
369
|
-
(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ba=new
|
|
370
|
-
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);
|
|
371
|
-
break}n=a.C.m();return u(y,
|
|
372
|
-
a.o.oa(d,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.
|
|
373
|
-
function
|
|
374
|
-
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?
|
|
366
|
+
for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new ek;a.hd=null;Gk(a);z(n)}})}
|
|
367
|
+
function lk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Eh,d=a.h.textDisplayFactory,e=Rb(d),a.hd=d,f=Hk(b.H,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())Ik(a,n,p,"ID3",v.value);if(a.B)a.B.onHlsTimedMetadata(m,n)}}),u(g,f.C,2);a.M=f;z(g)})}
|
|
368
|
+
function mk(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.D,a.Kb=d,f=a,u(h,cg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.uc=h.h;a.G=Rb(a.uc);g=Le(a.h.manifest);c.H&&"AUDIO"===c.H.nodeName&&(g.disableVideo=!0);a.G.configure(g);z(h)})}
|
|
369
|
+
function nk(a,b){var c=b.uri,d=a.D;a.vc=new Qi(function(){return a.ac()});a.vc.addEventListener("regionadd",function(g){g=g.region;Jk(a,Kk,g);if(a.B)a.B.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Lk(a,g)},makeTextStreamsForClosedCaptions:function(g){return Mk(a,g)},onTimelineRegionAdded:function(g){var h=a.vc;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=
|
|
370
|
+
l;break a}k=null}null==k&&(h.g.add(g),g=new P("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ek(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ce(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,
|
|
371
|
+
a.G.start(c,e),2);g.i=m.h;h=tk(Nk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);Ok(a.i);k=Date.now()/1E3;l=k-f;a.s.C=l;z(m)})}(),function(){return a.G.stop()})}
|
|
372
|
+
function ok(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Pk(a,{ib:a.D,onError:function(f){Ek(a,f)},Fc:function(f){Qk(a,f)},onExpirationUpdated:function(f,g){Rk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Sk&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,yf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Ob(b.H),3):u(e,Lk(a,a.i),0)})}
|
|
373
|
+
function pk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.H;e=b.uri;a.Kb=e;a.F=new Ji({Ac:function(){return d.playbackRate},xc:function(){return d.defaultPlaybackRate},Ld:function(x){d.playbackRate=x},fe:function(x){d.currentTime+=x}});f=function(){return Tk(a)};g=function(){return Uk(a)};a.o.v(d,"playing",f);a.o.v(d,"pause",f);a.o.v(d,"ended",f);a.o.v(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.ed==h||(a.ed=h,a.u=Rb(h),"function"!=typeof a.u.playbackRateChanged&&
|
|
374
|
+
(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Ba=new re(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ca=a.h.preferredTextLanguage;a.Eb=a.h.preferredTextRole;a.Nb=a.h.preferForcedSubs;Vk(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&Wk(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.C=Xk(a,b.startTime);a.La=Yk(a);
|
|
375
|
+
k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Zk(a,k);xd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=$k(a);a.j.configure(a.h.streaming);a.l=al;d.textTracks&&a.o.v(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":bl(a,x)}});a.dispatchEvent(tk(cl));l=null;if(m=a.Bc().find(function(x){return x.active})){y.A(2);break}l=dl(a)?a.u.chooseVariant():null;Wk(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
|
|
376
|
+
break}n=a.C.m();return u(y,el(l,n),4);case 4:p=y.h,a.C.o(p);case 3:fl(a,null,Wd(l));case 2:return q=a.eb().find(function(x){return x.active}),q||((v=fe(a.i.textStreams,a.Ca,a.Eb,a.Nb)[0]||null)&&dk(a.s.h,v,!0),l&&(v?(l.audio&&gl(a,l.audio,v)&&(a.ia=!0),a.ia&&a.M.l.setTextVisibility(!0),hl(a)):a.ia=!1),v&&(a.h.streaming.alwaysStreamText||a.kd())&&fj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),il(a)),Nd(a.j?a.j.l:null,a.i),jl(a.i),kl(a),dl(a),a.i.variants.some(function(x){return x.primary}),
|
|
377
|
+
a.o.oa(d,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Nd}),z(y)}})}
|
|
378
|
+
function qk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=oc,e=Date.now()/1E3,f=!0,a.m=Pk(a,{ib:a.D,onError:function(n){Ek(a,n)},Fc:function(n){Qk(a,n)},onExpirationUpdated:function(n,p){Rk(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Sk&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=eg(g),k=Ck[h],"application/x-mpegurl"==k&&Ac()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
379
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.V=!0,u(m,yf(a.m,[l],[]),2)):u(m,a.m.Ob(b.H),
|
|
375
380
|
0)})}
|
|
376
|
-
function
|
|
377
|
-
a.o.oa(e,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.
|
|
378
|
-
"change",function(){return
|
|
379
|
-
|
|
380
|
-
function
|
|
381
|
-
function
|
|
382
|
-
function
|
|
383
|
-
function
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
function
|
|
387
|
-
function
|
|
388
|
-
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
389
|
-
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=
|
|
390
|
-
function
|
|
391
|
-
|
|
392
|
-
r.
|
|
393
|
-
r.
|
|
394
|
-
r
|
|
395
|
-
r.
|
|
396
|
-
r.
|
|
397
|
-
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=
|
|
398
|
-
r.
|
|
399
|
-
v=m*n;y=f.l-f.startTime;
|
|
400
|
-
r.
|
|
401
|
-
r.
|
|
402
|
-
|
|
403
|
-
r.
|
|
404
|
-
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=
|
|
405
|
-
r.
|
|
406
|
-
r.
|
|
407
|
-
r.
|
|
408
|
-
function
|
|
409
|
-
r.
|
|
410
|
-
r
|
|
411
|
-
r
|
|
412
|
-
r.getStats=function(){if(this.l!=
|
|
413
|
-
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.J=Number(a.droppedVideoFrames),c.G=b,this.s.F=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.F?a.F:NaN):a=NaN;this.s.m=a;if(this.l==
|
|
414
|
-
(this.s.D=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.G,f=d.J,g=d.F,h=d.o,k=d.i,l=d.l,m=d.C,n=d.j,p=
|
|
415
|
-
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:
|
|
416
|
-
r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=
|
|
417
|
-
b&&k.label==(f||"")&&k.kind==c}))return
|
|
418
|
-
closedCaptions:null};if(!
|
|
419
|
-
r.
|
|
420
|
-
oc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,
|
|
421
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};
|
|
422
|
-
r.
|
|
423
|
-
case 5:throw new N(1,2,2012);}})};function
|
|
424
|
-
function
|
|
425
|
-
function
|
|
426
|
-
r.
|
|
427
|
-
function
|
|
428
|
-
function
|
|
429
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:nc,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
|
|
430
|
-
function
|
|
431
|
-
function
|
|
432
|
-
f.next())g=g.value,
|
|
433
|
-
function
|
|
434
|
-
function
|
|
435
|
-
function
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
function
|
|
439
|
-
function
|
|
440
|
-
function
|
|
441
|
-
(e=!0)}}}if(!e||
|
|
442
|
-
function
|
|
443
|
-
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function
|
|
444
|
-
function
|
|
445
|
-
h.push({language:l,role:n,label:p})}});return h}function
|
|
446
|
-
V.prototype.getManifestParserFactory=V.prototype.
|
|
447
|
-
V.prototype.getPlayheadTimeAsDate=V.prototype
|
|
448
|
-
V.prototype.getAudioLanguagesAndRoles=V.prototype.
|
|
449
|
-
V.prototype.getExpiration=V.prototype.Sb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.
|
|
450
|
-
V.prototype.getLoadMode=V.prototype.
|
|
451
|
-
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,
|
|
452
|
-
|
|
453
|
-
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=
|
|
454
|
-
V.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");
|
|
455
|
-
|
|
456
|
-
var
|
|
457
|
-
|
|
458
|
-
var
|
|
459
|
-
ssa:"text/x-ssa",ass:"text/x-ssa"};function
|
|
381
|
+
function rk(a,b,c){function d(){return Tk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Kb=b.uri;var e=b.H;a.C=new zi(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.C.o(b.startTime);a.F=new Ji({Ac:function(){return e.playbackRate},xc:function(){return e.defaultPlaybackRate},Ld:function(h){e.playbackRate=h},fe:function(h){e.currentTime+=h}});Zk(a,a.h.streaming.rebufferingGoal);a.o.v(e,"playing",d);a.o.v(e,"pause",d);a.o.v(e,"ended",d);a.o.v(e,"ratechange",function(){return Uk(a)});"none"!=e.preload&&
|
|
382
|
+
a.o.oa(e,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Nd});e.audioTracks&&(a.o.v(e.audioTracks,"addtrack",function(){return kl(a)}),a.o.v(e.audioTracks,"removetrack",function(){return kl(a)}),a.o.v(e.audioTracks,"change",function(){return kl(a)}));e.textTracks&&(a.o.v(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":ll(a,h);break;case "chapters":bl(a,h);break;default:kl(a)}}),a.o.v(e.textTracks,"removetrack",function(){return kl(a)}),a.o.v(e.textTracks,
|
|
383
|
+
"change",function(){return kl(a)}));e.src=b.uri;(xc()||yc())&&e.load();a.l=ml;a.dispatchEvent(tk(cl));var g=new pc;qi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){g.resolve()});qi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var h;return L(function(k){if(1==k.g)return nl(a),h=ol(a),h.find(function(l){return"disabled"!=l.mode})?k.A(2):u(k,new Promise(function(l){a.o.oa(e.textTracks,"change",l);(new O(l)).R(1)}),2);if(f)return k["return"]();pl(a);z(k)})});e.error?g.reject(Dk(a)):"none"==e.preload&&
|
|
384
|
+
(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),g.resolve());a.o.oa(e,"error",function(){g.reject(Dk(a))});return new Ce(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}function nl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Gd(b);var c=a.h.preferredVariantRole;""!=c&&a.Gd(b,c)}}
|
|
385
|
+
function pl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Hd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Hd(b,d,c)}}
|
|
386
|
+
function ll(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.v(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ik(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new O(function(){var d=ql(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Db().R(.5);a.Mb.push(function(){c.stop()})}}
|
|
387
|
+
function Ik(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(tk(rl,b))}function bl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Db().R(.5);a.Mb.push(function(){c.stop()})}}function Ok(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 Pk(a,b){return new pf(b,a.h.drm.updateExpirationTime)}
|
|
388
|
+
function hk(a){return new Pe(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
|
|
389
|
+
function Xk(a,b){return new Ai(a.g,a.i,a.h.streaming,b,function(){a.La&&Mi(a.La,!0);if(a.j)for(var c=a.j,d=c.g.zc(),e=c.j.smallGapLimit,f=t(c.h.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.h.get(g);h.$=null;var k=c.g.O;g==nc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Vh(k,g),k=Hh(k,d,e));if(!k&&((null!=Wh(c.g.O,g)||h.Ga)&&ij(c,h),h.ta&&(h.ta.abort(),h.ta=null),g===nc))for(g=c.g.O.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,uh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())ph(h.value)}a.J&&
|
|
390
|
+
sl(a)},function(c){return a.dispatchEvent(c)})}function Yk(a){var b=new Ri(a.vc);b.addEventListener("enter",function(d){Jk(a,tl,d.region)});b.addEventListener("exit",function(d){Jk(a,ul,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Jk(a,tl,e),Jk(a,ul,e))});var c=new Li(a.g);c.g.add(b);return c}function Zk(a,b){a.J=new ve;a.J.g=xe;ye(a.J,b,Math.min(.5,b/2));Gk(a);a.oc=(new O(function(){sl(a)})).ya(.25)}
|
|
391
|
+
function sl(a){switch(a.l){case ml:if(a.g.ended)var b=!0;else{var c=Gh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case al:a:if(a.g.ended||Th(a.M))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.cb();var d=Gh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ih(a.g.buffered,a.g.currentTime);c=a.J;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?we:xe;c.g=d;b!=d&&Gk(a)}function Hk(a,b,c,d){return new Lh(a,b,c,d)}
|
|
392
|
+
function $k(a){return new Ui(a.i,{zc:function(){return a.C.m()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},O:a.M,ib:a.D,onError:function(b){return Ek(a,b)},onEvent:function(b){return a.dispatchEvent(b)},uf:function(){a.G&&a.G.update&&a.G.update()},Bd:function(){a.C&&a.C.C();sl(a)}})}
|
|
393
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Sj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
|
|
394
|
+
0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Xj(this.h,a,gk(this));vl(this);return c};
|
|
395
|
+
function vl(a){if(a.G){var b=Le(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.G.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{wl(a,a.i)}catch(f){Ek(a,f)}a.u&&dl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||xl(a)}a.D&&a.D.Jd(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.hd!=b)){var c=Rb(b),d=a.M,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.hd=b;a.j&&(b=a.j,(c=b.h.get(nc))&&
|
|
396
|
+
dj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),il(a));a.J&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),ye(a.J,b,Math.min(.5,b/2)));a.i&&Vk(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=gk(this);Xj(a,this.h,gk(this));return a};
|
|
397
|
+
r.Oe=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.ac().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.Ef=function(){for(var a in this.h)delete this.h[a];Xj(this.h,gk(this),gk(this));vl(this)};r.Ue=function(){return this.l};r.Ye=function(){return this.g};r.Tb=function(){return this.D};r.fd=function(){return this.Kb};
|
|
398
|
+
r.Yd=function(){return this.B?this.B:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.hb=function(){return this.i?this.i.presentationTimeline.hb():!1};r.nf=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};
|
|
399
|
+
r.ac=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ub(),end:a.Oa()}}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.lf=function(){this.U()&&(this.g.currentTime=this.ac().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.Sb=function(){return this.m?this.m.Sb():Infinity};r.yc=function(){return this.m?this.m.yc():{}};
|
|
400
|
+
r.jd=function(){return this.J?this.J.g==xe:!1};r.$e=function(){return this.g?this.F?this.F.i:1:0};r.Nf=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.l==al&&(this.u.playbackRateChanged(a),cj(this.j,1<Math.abs(a))))};r.Ee=function(){var a=this.F.xc();this.l==ml&&this.F.set(a);this.l==al&&(this.F.set(a),this.u.playbackRateChanged(a),cj(this.j,!1))};
|
|
401
|
+
r.Bc=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)}):[]};
|
|
402
|
+
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?ol(this).map(function(f){return ae(f)}):[]};r.Se=function(){return this.i?this.i.imageStreams.map(function(a){return Yd(a)}):[]};
|
|
403
|
+
r.gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B;return L(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.A(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.A(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
|
|
404
|
+
v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;C=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,D=B%m*p,C=Math.floor(B/m)*q);return E["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:w,duration:x,uris:f.ma(),width:p})}return E["return"](null)})};
|
|
405
|
+
r.me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(dk(this.s.h,b,!1),fj(this.j,b),yl(this),this.Ca=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ol(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Zd(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";yl(this)}};
|
|
406
|
+
r.ne=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)&&(Wk(this,d,!1,b,c),this.Ba=new qe(d),dl(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,
|
|
407
|
+
Zd(c)==a.id){zl(this,c);break}};r.Ne=function(){return Al(this.Bc())};r.ff=function(){return Al(this.eb())};r.Me=function(){return Array.from(Bl(this.Bc()))};r.ef=function(){return Array.from(Bl(this.eb()))};
|
|
408
|
+
r.Gd=function(a,b){if(this.i&&this.C){this.Ba=new re(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ba.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=Wd(f),this.ne(c,!0)):xl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=od(a);f=d=null;e=
|
|
409
|
+
t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ce(g);od(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?zl(this,f):d&&zl(this,d)}};
|
|
410
|
+
r.Hd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ca=a,this.Eb=b||"",this.Nb=c,(a=fe(this.i.textStreams,this.Ca,this.Eb,this.Nb)[0]||null)&&a!=this.j.o&&(dk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.kd()))fj(this.j,a),yl(this)}else{var d=od(a);(a=this.eb().find(function(e){return od(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.me(a)}};
|
|
411
|
+
r.Ff=function(a){if(this.i&&this.C){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ba=new re(b.language,"",0,a),xl(this))}};r.kd=function(){var a=this.ia;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ol(this).some(function(b){return"showing"==b.mode}):a};r.Zd=function(){return this.g&&this.g.src&&this.g.textTracks?Cl(this).map(function(a){return ae(a)}):[]};
|
|
412
|
+
r.Pe=function(a){var b=od(a),c=Cl(this).filter(function(f){return od(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function ol(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
|
|
413
|
+
function ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Cl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
414
|
+
r.Lf=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.l==al)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.Ca,this.Eb,this.Nb),0<a.length&&(fj(this.j,a[0]),yl(this))):bj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=ol(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}hl(this)}};
|
|
415
|
+
r.bf=function(){if(!this.U())return null;var a=this.ja.l,b=0;if(this.C)b=this.C.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
416
|
+
r.$d=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.wc=function(){if(this.l==al)return this.M.wc();var a={total:[],audio:[],video:[],text:[]};this.l==ml&&(a.total=Jh(this.g.buffered));return a};
|
|
417
|
+
r.getStats=function(){if(this.l!=al&&this.l!=ml)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Tk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
418
|
+
b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.J=Number(a.droppedVideoFrames),c.G=b,this.s.F=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.F?a.F:NaN):a=NaN;this.s.m=a;if(this.l==al){if(a=this.j.l)this.s.s=(this.F?this.F.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.M=a.video.width||NaN,c.u=b);this.U()&&(a=this.$d().valueOf()+1E3*this.ac().end,this.s.B=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
|
|
419
|
+
(this.s.D=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.G,f=d.J,g=d.F,h=d.o,k=d.i,l=d.l,m=d.C,n=d.j,p=ak(d.g,"playing"),q=ak(d.g,"paused"),v=ak(d.g,"buffering"),y=d.m,x=d.B,w=d.D,D=bk(d.g),C=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,C.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
|
|
420
|
+
estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:D,switchHistory:C}};
|
|
421
|
+
r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=al&&this.l!=ml)throw new N(1,7,7004);if(!d){var h=eg(a);d=Dl[h];if(!d)throw new N(1,2,2011,h);}if(this.l==ml){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.eb().find(function(k){return k.language==
|
|
422
|
+
b&&k.label==(f||"")&&k.kind==c}))return kl(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.nd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Hi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:nc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
|
|
423
|
+
closedCaptions:null};if(!ed(Zc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);kl(this);return Xd(a)};
|
|
424
|
+
r.Ae=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,D;return L(function(C){switch(C.g){case 1:if(h.l!=al&&h.l!=ml)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,El(h,a),3);case 3:d=C.h;case 2:k=[];if(h.B)try{k=h.B.getServerSideCuePoints()}catch(B){}if(h.l!=ml){C.A(4);break}g&&(c="forced");return u(C,Fl(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 kl(h),C["return"](m);throw new N(1,2,2012);case 4:n=
|
|
425
|
+
oc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,Gl(a,h.D,h.h.streaming.retryParameters),7);case 7:q=C.h,v=Hl(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Oh(y),d="text/vtt";case 6:x={id:h.nd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Hi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Y,primary:!1,trickModeVideo:null,
|
|
426
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Zc(x.mimeType,x.codecs);D=ed(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);kl(h);return C["return"](Xd(x))}})};
|
|
427
|
+
r.ze=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=al&&d.l!=ml)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,El(d,a),3);case 3:c=k.h;case 2:e=[];if(d.B)try{e=d.B.getServerSideCuePoints()}catch(l){}return u(k,Fl(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Zd();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
|
|
428
|
+
case 5:throw new N(1,2,2012);}})};function El(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=eg(b);if(d=Dl[c])return e["return"](d);A(e,2);return u(e,gg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
|
|
429
|
+
function Fl(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Gl(b,a.D,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=Hl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Oh(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
|
|
430
|
+
function Gl(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Ze,e=Te([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Hl(a,b,c,d){var e=fd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),Pj(b,d);throw new N(2,2,2014,c);}r.Kd=function(a,b){this.md.width=a;this.md.height=b};
|
|
431
|
+
r.Ed=function(){if(this.l==al){var a=this.j;if(a.i.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Wb&&(c.Wb=!1,aj(a,c,.1));a=!0}}else a=!1;return a};r.Ve=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.We=function(){return this.uc};
|
|
432
|
+
function gk(a){var b=Vj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.Ed())};b.textDisplayFactory=function(){return a.mc?new Ij(a.g,a.mc):new Dj(a.g)};return b}r.re=function(a){this.mc=a};
|
|
433
|
+
function Mk(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 Ii;h={id:a.nd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
434
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:nc,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 Lk(a,b){return L(function(c){if(1==c.g)return u(c,Il(a,b),2);wl(a,b);z(c)})}
|
|
435
|
+
function Il(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Ld(c,b),2);jl(b);z(d)})}
|
|
436
|
+
function wl(a,b){if(a.l!=wk){for(var c=a.h.restrictions,d=a.md,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Kd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&kl(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
|
|
437
|
+
f.next())g=g.value,Hf(a.m,g.initDataType,g.initData);Jl(a,b)}}
|
|
438
|
+
function el(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return L(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)})}
|
|
439
|
+
function Gk(a){var b=a.jd();if(a.s&&a.J&&a.C){var c=a.F;c.j=b;Ki(c);Tk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(tk(Kl,b))}function Uk(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=tk(Ll),a.dispatchEvent(b))}function Tk(a){if(a.s&&a.J){var b=a.s.g;a.J.g==xe?Zj(b,"buffering"):a.g.paused?Zj(b,"paused"):a.g.ended?Zj(b,"ended"):Zj(b,"playing")}}
|
|
440
|
+
function dl(a){try{Jl(a,a.i)}catch(c){return Ek(a,c),!1}var b=a.i.variants.filter(function(c){return de(c)});b=a.Ba.create(b);a.u.setVariants(Array.from(b.values()));return!0}function xl(a){var b;(b=dl(a)?a.u.chooseVariant():null)&&Wk(a,b,!0,!0,0)}
|
|
441
|
+
function Wk(a,b,c,d,e){var f=a.j.l;if(b==f)d&&ej(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));ej(a.j,b,d,e);d=null;f&&(d=Wd(f));b=Wd(b);c?fl(a,d,b):Ml(a,d,b)}}function zl(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);Ml(a,c,d)}
|
|
442
|
+
function gl(a,b,c){a=od(a.h.preferredTextLanguage);b=od(b.language);c=od(c.language);return nd(c,a)&&!nd(b,c)}function fl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=tk(Nl,b);Ol(a,b)}function kl(a){var b=tk(Pl);Ol(a,b)}function Ml(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=tk(Ql,b);Ol(a,b)}function yl(a){var b=tk(Rl);Ol(a,b)}function hl(a){var b=tk(Sl);Ol(a,b)}function il(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Ol(a,tk(Tl,b))}
|
|
443
|
+
function Ek(a,b){if(a.l!=wk){var c=tk(Ul,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Jk(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(tk(b,c))}
|
|
444
|
+
function Dk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
|
|
445
|
+
function Qk(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&&!Vl.includes(l)}h!=f.allowedByKeySystem&&
|
|
446
|
+
(e=!0)}}}if(!e||dl(a))(d=a.j.l)&&!d.allowedByKeySystem&&xl(a),e&&kl(a)}}function Rk(a,b,c){if(a.G&&a.G.onExpirationUpdated)a.G.onExpirationUpdated(b,c);b=tk(Wl);a.dispatchEvent(b)}function Vk(a,b,c){0<b&&(a.U()||a.qe(b));b=a.getDuration();c<b&&(a.U()||a.Ha(c))}
|
|
447
|
+
function Jl(a,b){var c=a.m?a.m.yc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Vl.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
|
|
448
|
+
missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function jl(a){if(!a.variants.some(de))throw new N(2,4,4032);}function Ol(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=wk&&a.dispatchEvent(b);z(c)})}function Bl(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(od(c.language)):b.add("und");return b}
|
|
449
|
+
function Al(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=od(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));
|
|
450
|
+
h.push({language:l,role:n,label:p})}});return h}function xk(){return new N(2,7,7E3)}function sk(a,b,c,d,e,f){return d==a&&e.H==f.H&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function xj(){return{H:null,mimeType:null,startTime:null,Nd:NaN,uri:null}}function yk(a){return new Promise(function(b,c){a.jb=function(){return c(xk())};a.Ec=function(){return b()};a.onError=function(d){return c(d)};a.Gc=function(){return c(xk())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.re;
|
|
451
|
+
V.prototype.getManifestParserFactory=V.prototype.We;V.prototype.getManifest=V.prototype.Ve;V.prototype.retryStreaming=V.prototype.Ed;V.prototype.setMaxHardwareResolution=V.prototype.Kd;V.prototype.addChaptersTrack=V.prototype.ze;V.prototype.addTextTrackAsync=V.prototype.Ae;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.wc;V.prototype.getPresentationStartTimeAsDate=V.prototype.$d;
|
|
452
|
+
V.prototype.getPlayheadTimeAsDate=V.prototype.bf;V.prototype.setTextTrackVisibility=V.prototype.Lf;V.prototype.getChapters=V.prototype.Pe;V.prototype.getChaptersTracks=V.prototype.Zd;V.prototype.isTextTrackVisible=V.prototype.kd;V.prototype.selectVariantsByLabel=V.prototype.Ff;V.prototype.selectTextLanguage=V.prototype.Hd;V.prototype.selectAudioLanguage=V.prototype.Gd;V.prototype.getTextLanguages=V.prototype.ef;V.prototype.getAudioLanguages=V.prototype.Me;V.prototype.getTextLanguagesAndRoles=V.prototype.ff;
|
|
453
|
+
V.prototype.getAudioLanguagesAndRoles=V.prototype.Ne;V.prototype.selectVariantTrack=V.prototype.ne;V.prototype.selectTextTrack=V.prototype.me;V.prototype.getThumbnails=V.prototype.gf;V.prototype.getImageTracks=V.prototype.Se;V.prototype.getTextTracks=V.prototype.eb;V.prototype.getVariantTracks=V.prototype.Bc;V.prototype.cancelTrickPlay=V.prototype.Ee;V.prototype.trickPlay=V.prototype.Nf;V.prototype.getPlaybackRate=V.prototype.$e;V.prototype.isBuffering=V.prototype.jd;V.prototype.getKeyStatuses=V.prototype.yc;
|
|
454
|
+
V.prototype.getExpiration=V.prototype.Sb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.lf;V.prototype.seekRange=V.prototype.ac;V.prototype.isAudioOnly=V.prototype.nf;V.prototype.isInProgress=V.prototype.hb;V.prototype.isLive=V.prototype.U;V.prototype.getAdManager=V.prototype.Yd;V.prototype.getAssetUri=V.prototype.fd;V.prototype.getNetworkingEngine=V.prototype.Tb;V.prototype.getMediaElement=V.prototype.Ye;
|
|
455
|
+
V.prototype.getLoadMode=V.prototype.Ue;V.prototype.resetConfiguration=V.prototype.Ef;V.prototype.getBufferFullness=V.prototype.Oe;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Pd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Ob;
|
|
456
|
+
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,Xf(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(sc()){for(var l in dg)k[l]=!0;for(var m in fg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=sc()?!!dg[n]:tc(n);for(var p in l)k[p]=
|
|
457
|
+
sc()?!!fg[p]:tc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
|
|
458
|
+
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=sc()?ed(l)?!0:MediaSource.isTypeSupported(l)||Vc(l):tc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Xl;for(g in f)e[g]=f[g]();return h["return"](e)})};
|
|
459
|
+
V.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wc("Trident/"))return!1;var a=Dc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:sc()?!0:tc("application/x-mpegurl")};V.setAdManagerFactory=function(a){ik=a};
|
|
460
|
+
V.registerSupportPlugin=function(a,b){Xl[a]=b};V.prototype.destroy=V.prototype.destroy;
|
|
461
|
+
var Tl="abrstatuschanged",Nl="adaptation",Kl="buffering",Sk="drmsessionupdate",uj="emsg",Ul="error",Wl="expirationupdated",Bk="loaded",zk="loading",Nk="manifestparsed",rl="metadata",uk="onstatechange",vk="onstateidle",Ll="ratechange",cl="streaming",Rl="textchanged",Sl="texttrackvisibility",Kk="timelineregionadded",tl="timelineregionenter",ul="timelineregionexit",Pl="trackschanged",Fk="unloading",Ql="variantchanged",Yl={Tf:Tl,Uf:Nl,Vf:Kl,Wf:Sk,Yf:uj,Error:Ul,Zf:Wl,$f:"largegap",ag:Bk,bg:zk,cg:Nk,Metadata:rl,
|
|
462
|
+
dg:uk,eg:vk,fg:Ll,gg:"sessiondata",hg:cl,ig:Rl,jg:Sl,kg:Kk,lg:tl,mg:ul,ng:Pl,og:Fk,pg:Ql},wk=0,fk=1,al=2,ml=3;V.LoadMode={DESTROYED:wk,NOT_LOADED:fk,MEDIA_SOURCE:al,SRC_EQUALS:ml};V.version="v3.2.11";var Zl=["3","2"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(Zl[0]),Number(Zl[1])));
|
|
463
|
+
var Vl=["output-restricted","internal-error"],Xl={},ik=null,Ck={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"},Dl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
464
|
+
ssa:"text/x-ssa",ass:"text/x-ssa"};function $l(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new bf;this.j.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.v(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=W.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};
|
|
460
465
|
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()};
|
|
461
466
|
r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",W);
|
|
462
467
|
W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;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;
|
|
463
|
-
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
|
|
464
|
-
function(f){
|
|
465
|
-
function
|
|
466
|
-
a.h.v(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){
|
|
467
|
-
function
|
|
468
|
-
function(c){b(c,"ad-third-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
468
|
+
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 am(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new bf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.11");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){bm(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
469
|
+
function(f){cm(e,f)});this.i.onended=function(){e.l.contentComplete()}}am.prototype.stop=function(){this.g&&this.g.stop();this.m&&Hj(this.m)};am.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function cm(a,b){b.getError();dm(a,null);a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
470
|
+
function bm(a,b){a.j(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new P("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",d)))}em(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
471
|
+
a.h.v(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){dm(a,null)}}
|
|
472
|
+
function em(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new P(d,e))}a.h.v(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){cm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){fm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.STARTED,function(c){fm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.v(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
473
|
+
function(c){b(c,"ad-third-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){dm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){dm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
469
474
|
a.h.v(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.o.i=!0;b(c,"ad-paused")});a.h.v(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.o.i=!1;b(c,"ad-resumed")});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.v(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.v(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.v(a.g,
|
|
470
475
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.v(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.v(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.v(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.v(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.v(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
471
|
-
function(c){b(c,"ad-metadata")});a.h.v(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function
|
|
472
|
-
function
|
|
476
|
+
function(c){b(c,"ad-metadata")});a.h.v(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function fm(a,b){var c=b.getAd();a.o=new W(c,a.g);c=(new Map).set("ad",a.o).set("sdkAdObject",c).set("originalEvent",b);a.j(new P("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
|
|
477
|
+
function dm(a,b){a.j(new P("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.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)};
|
|
473
478
|
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.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
474
479
|
r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
|
|
475
480
|
X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;
|
|
476
|
-
X.prototype.getDuration=X.prototype.getDuration;function
|
|
481
|
+
X.prototype.getDuration=X.prototype.getDuration;function gm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.D=!1;this.u=this.m=this.o=null;this.B="";this.C=[];this.h=new bf;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 P("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){hm(e,f)});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
477
482
|
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.v(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new P("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
478
483
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.v(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.v(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new P("ad-first-quartile"))});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new P("ad-midpoint"))});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new P("ad-third-quartile"))});
|
|
479
484
|
this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new P("ad-complete"));e.i(new P("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.v(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new P("ad-skipped"));e.i(new P("ad-stopped"))});this.h.v(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.C=
|
|
480
|
-
f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}
|
|
481
|
-
function
|
|
482
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);
|
|
483
|
-
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new
|
|
484
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.
|
|
485
|
-
(c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.
|
|
485
|
+
f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}gm.prototype.stop=function(){this.B="";this.o=null;this.C=[]};gm.prototype.release=function(){this.stop();this.h&&this.h.release()};gm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
486
|
+
function hm(a,b){a.i(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.D||a.h.v(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 Y(){Ke.call(this);this.g=this.i=null;this.h=new $l;this.j=navigator.language}pa(Y,Ke);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new am(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)})};
|
|
487
|
+
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ke.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.h=new $l};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
|
|
488
|
+
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new gm(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)})};
|
|
489
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.11";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
490
|
+
(c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.11";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
|
|
486
491
|
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
|
|
487
492
|
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
|
|
488
493
|
Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
489
494
|
Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
|
|
490
|
-
Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
|
|
491
|
-
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(
|
|
492
|
-
function
|
|
493
|
-
function
|
|
494
|
-
var
|
|
495
|
-
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},
|
|
496
|
-
|
|
497
|
-
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.G=0;this.i={};this.l=null;
|
|
498
|
-
r.init=function(){if(this.F.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Db();var a=new chrome.cast.SessionRequest(this.F);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(
|
|
499
|
-
a):
|
|
500
|
-
r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!
|
|
501
|
-
r.get=function(a,b){var c=this;if("video"==a){if(
|
|
502
|
-
r.set=function(a,b,c){this.g[a][b]=c;
|
|
503
|
-
r.
|
|
504
|
-
function
|
|
505
|
-
function
|
|
506
|
-
r.destroy=function(a){a&&this.g.sb();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;
|
|
507
|
-
r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=
|
|
508
|
-
r.
|
|
509
|
-
function
|
|
510
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
511
|
-
function
|
|
512
|
-
function
|
|
513
|
-
function
|
|
514
|
-
function
|
|
515
|
-
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 P(
|
|
516
|
-
function
|
|
517
|
-
function
|
|
518
|
-
if("setVideoContainer"==b)return function(c){return a.h.
|
|
519
|
-
M("shaka.cast.CastProxy",
|
|
520
|
-
r.
|
|
521
|
-
r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.F&&(a.F.stop(),a.F=null),a.g=null,a.G=null,a.C=null,a.D=!1,a.o=!0,a.l=null,a.s=null,
|
|
522
|
-
function
|
|
523
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
524
|
-
!1
|
|
525
|
-
function
|
|
526
|
-
function
|
|
527
|
-
a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
528
|
-
function
|
|
529
|
-
function
|
|
530
|
-
function
|
|
531
|
-
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.G[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return
|
|
532
|
-
function
|
|
533
|
-
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||
|
|
534
|
-
function
|
|
535
|
-
M("shaka.cast.CastReceiver",
|
|
536
|
-
function
|
|
537
|
-
function
|
|
538
|
-
function
|
|
539
|
-
function
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{
|
|
543
|
-
function
|
|
544
|
-
function
|
|
545
|
-
function
|
|
546
|
-
function
|
|
547
|
-
function
|
|
548
|
-
var
|
|
495
|
+
Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";ik=function(){return new Y};function im(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof P){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
|
|
496
|
+
TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Jh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
|
|
497
|
+
function jm(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=km(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})}
|
|
498
|
+
function km(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
499
|
+
var lm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),mm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),nm=["loop","playbackRate"],om=["pause","play"],pm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
|
|
500
|
+
getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},qm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},rm=[["getConfiguration","configure"]],sm=[["isTextTrackVisible","setTextTrackVisibility"]],tm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
|
|
501
|
+
um=["attach","detach","load","unload"];function vm(a,b,c,d,e,f){var g=this;this.F=a;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.D=e;this.J=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return wm(g)};this.C=function(h,k){var l=jm(k);switch(l.type){case "event":var m=l.targetName;l=Je(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.T(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
|
|
502
|
+
for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.G=0;this.i={};this.l=null;xm.add(this)}r=vm.prototype;r.destroy=function(){xm["delete"](this);ym(this);zm&&Am(this);this.j&&(this.j.stop(),this.j=null);this.D=this.s=null;this.h=this.m=!1;this.C=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.Cd=function(){return this.M};
|
|
503
|
+
r.init=function(){if(this.F.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Db();var a=new chrome.cast.SessionRequest(this.F);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(xm),d=c.next();!d.done;d=c.next())Bm(d.value,b)},function(b){for(var c=t(xm),d=c.next();!d.done;d=c.next())d=d.value,Cm="available"==b,d.j.Db()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Cm&&this.j.R(Dm);(a=zm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Bm(this,
|
|
504
|
+
a):zm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Em),window.__onGCastApiAvailable!=Em&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Id=function(a){this.o=a;this.h&&Fm(this,{type:"appData",appData:this.o})};
|
|
505
|
+
r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!Cm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new pc;chrome.cast.requestSession(function(d){return Gm(b,a,d)},function(d){return Hm(b,d)});return u(c,b.l,0)})};function Im(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return Gm(a,b,c)},function(c){return Hm(a,c)})}}r.sb=function(){if(this.h){ym(this);if(zm){Am(this);try{zm.stop(function(){},function(){})}catch(a){}zm=null}wm(this)}};
|
|
506
|
+
r.get=function(a,b){var c=this;if("video"==a){if(om.includes(b))return function(){return c.ie.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(qm[b]&&!this.get("player","isLive")())return function(){};if(tm.includes(b))return function(){return c.ie.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(um.includes(b))return function(){return c.Bf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(pm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
507
|
+
r.set=function(a,b,c){this.g[a][b]=c;Fm(this,{type:"set",targetName:a,property:b,value:c})};function Gm(a,b,c){zm=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);wm(a);Fm(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Hm(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
|
|
508
|
+
r.ie=function(a,b){Fm(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Bf=function(a,b){var c=Fa.apply(2,arguments),d=new pc,e=this.G.toString();this.G++;this.i[e]=d;try{Fm(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Bm(a,b){var c=a.J();a.l=new pc;a.u=!0;Gm(a,c,b)}function Am(a){var b=zm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
509
|
+
function wm(a){var b=zm?"connected"==zm.status:!1;if(a.h&&!b){a.D();for(var c in a.g)a.g[c]={};ym(a)}a.h=b;a.M=b?zm.receiver.friendlyName:"";a.j.Db()}function ym(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Fm(a,b){var c=im(b),d=zm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new P("error",(new Map).set("detail",c)),a.s("player",d),a.sb(),c;}}var Dm=.02,Cm=!1,zm=null,xm=new Set;
|
|
510
|
+
function Em(a){if(a){a=t(xm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Jm(a,b,c){Ke.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.B=c;this.u=new Map;this.g=new vm(c,function(){return Km(d)},function(){return Lm(d)},function(e,f){return Mm(d,e,f)},function(){return Nm(d)},function(){return Om(d)});Pm(this)}pa(Jm,Ke);r=Jm.prototype;
|
|
511
|
+
r.destroy=function(a){a&&this.g.sb();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;Ke.prototype.release.call(this);return Promise.all(a)};r.kf=function(){return this.l};r.af=function(){return this.s};r.Ce=function(){return this.g.m&&Cm};r.ra=function(){return this.g.ra()};r.Cd=function(){return this.g.Cd()};
|
|
512
|
+
r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=Om(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Pd(),0):c["return"]()})};r.Id=function(a){this.g.Id(a)};r.Mf=function(){Im(this.g)};r.sb=function(){this.g.sb()};
|
|
513
|
+
r.Fe=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.B)return c["return"]();b.B=a;b.g.sb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new vm(a,function(){return Km(b)},function(){return Lm(b)},function(d,e){return Mm(b,d,e)},function(){return Nm(b)},function(){return Om(b)});b.g.init();z(c)})};
|
|
514
|
+
function Pm(a){a.g.init();a.m=new bf;for(var b=t(lm),c=b.next();!c.done;c=b.next())a.m.v(a.i,c.value,function(f){a.g.ra()||(f=Je(f),a.j.dispatchEvent(f))});for(var d in Yl)a.m.v(a.h,Yl[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Fb=e,Object.defineProperty(a.l,b.Fb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Qm(a,f.Fb)}}(b),set:function(f){return function(g){var h=f.Fb;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Fb:b.Fb};a.s={};Rm(a,
|
|
515
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Sm(a,f)}})});Tm(a);a.j=new Ke;a.j.pc=a.l;a.o=new Ke;a.o.pc=a.s}function Tm(a){var b=new Map;Rm(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)})}
|
|
516
|
+
function Rm(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)}}
|
|
517
|
+
function Om(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.fd(),startTime:null};a.i.pause();for(var c=t(nm),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(rm);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(sm);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 Km(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
|
|
518
|
+
function Lm(a){var b=new P(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
519
|
+
function Nm(a){for(var b=t(rm),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(nm);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(nm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(sm);for(k=
|
|
520
|
+
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 P(Ul,h);a.h.dispatchEvent(h)})}
|
|
521
|
+
function Qm(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)}
|
|
522
|
+
function Sm(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.Tb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Yd()};
|
|
523
|
+
if("setVideoContainer"==b)return function(c){return a.h.re(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&&pm[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Mm(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
|
|
524
|
+
M("shaka.cast.CastProxy",Jm);Jm.prototype.changeReceiverId=Jm.prototype.Fe;Jm.prototype.forceDisconnect=Jm.prototype.sb;Jm.prototype.suggestDisconnect=Jm.prototype.Mf;Jm.prototype.setAppData=Jm.prototype.Id;Jm.prototype.cast=Jm.prototype.cast;Jm.prototype.receiverName=Jm.prototype.Cd;Jm.prototype.isCasting=Jm.prototype.ra;Jm.prototype.canCast=Jm.prototype.Ce;Jm.prototype.getPlayer=Jm.prototype.af;Jm.prototype.getVideo=Jm.prototype.kf;Jm.prototype.destroy=Jm.prototype.destroy;function Um(a,b,c,d){Ke.call(this);var e=this;this.g=a;this.h=b;this.j=new bf;this.G={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.D=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.F=new O(function(){Vm(e)});Wm(this)}pa(Um,Ke);r=Um.prototype;r.isConnected=function(){return this.D};r.pf=function(){return this.o};r.If=function(a){this.i=a};r.Ie=function(){this.i=null};
|
|
525
|
+
r.Jf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Hf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Gf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
526
|
+
r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.F&&(a.F.stop(),a.F=null),a.g=null,a.G=null,a.C=null,a.D=!1,a.o=!0,a.l=null,a.s=null,Ke.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
|
|
527
|
+
function Wm(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Xm(a)};b.onSenderDisconnected=function(){return Xm(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Ym(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Ym(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 Zm(a,
|
|
528
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return $m(a,e)};b.start();b=t(lm);for(var c=b.next();!c.done;c=b.next())a.j.v(a.g,c.value,function(e){return an(a,"video",e)});for(var d in Yl)a.j.v(a.h,Yl[d],function(e){return an(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Kd(3840,2160):a.h.Kd(1920,1080);a.j.v(a.g,"loadeddata",function(){a.B=!0});a.j.v(a.h,"loading",function(){a.o=
|
|
529
|
+
!1;jn(a)});a.j.v(a.g,"playing",function(){a.o=!1;jn(a)});a.j.v(a.g,"pause",function(){jn(a)});a.j.v(a.h,"unloading",function(){a.o=!0;jn(a)});a.j.v(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,jn(a))})).R(kn)})}function Xm(a){a.m=0;a.u=!0;a.D=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;jn(a)}
|
|
530
|
+
function jn(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new P("caststatuschanged");a.dispatchEvent(b);ln(a)||mn(a);z(c)})}
|
|
531
|
+
function nn(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Ul,k=(new Map).set("detail",g),l=new P(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)q=b.playerAfterLoad[p],
|
|
532
|
+
a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),mn(a));z(v)}})}function an(a,b,c){a.h&&(Vm(a),Ym(a,{type:"event",targetName:b,event:c},a.l))}
|
|
533
|
+
function Vm(a){a.F.R(on);for(var b={video:{},player:{}},c=t(mm),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 qm)0==a.m%qm[e]&&(b.player[e]=a.h[e]());for(var f in pm)0==a.m%pm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.B&&(a.m+=1);Ym(a,{type:"update",update:b},a.l);ln(a)}function ln(a){return a.u&&(a.g.duration||a.h.U())?(pn(a),a.u=!1,!0):!1}
|
|
534
|
+
function pn(a,b){var c={contentId:a.h.fd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);mn(a,void 0===b?0:b,c)}
|
|
535
|
+
function $m(a,b){var c=jm(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;nn(a,c.initState,c.appData);Vm(a);break;case "appData":a.C(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.G[d][e]=c;break;case "call":d=a.G[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
|
|
536
|
+
c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.G[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return qn(a,h,g,null)},function(k){return qn(a,h,g,k)})}}
|
|
537
|
+
function Zm(a,b){var c=jm(b.data);switch(c.type){case "PLAY":a.g.play();mn(a);break;case "PAUSE":a.g.pause();mn(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(),mn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),mn(a));break;case "STOP":a.h.Pd().then(function(){a.h&&mn(a)});break;case "GET_STATUS":pn(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));
|
|
538
|
+
null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||mn(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.J(d.contentId);g=c.autoplay||!0;a.C(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&pn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Ym(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Ym(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
539
|
+
function qn(a,b,c,d){a.h&&Ym(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Ym(a,b,c,d){a.D&&(a=im(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function mn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?rn:a.h.jd()?sn:a.g.paused?tn:un,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Ym(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
540
|
+
M("shaka.cast.CastReceiver",Um);Um.prototype.destroy=Um.prototype.destroy;Um.prototype.setContentArtist=Um.prototype.Gf;Um.prototype.setContentImage=Um.prototype.Hf;Um.prototype.setContentTitle=Um.prototype.Jf;Um.prototype.clearContentMetadata=Um.prototype.Ie;Um.prototype.setContentMetadata=Um.prototype.If;Um.prototype.isIdle=Um.prototype.pf;Um.prototype.isConnected=Um.prototype.isConnected;var on=.5,kn=5,rn="IDLE",un="PLAYING",sn="BUFFERING",tn="PAUSED";function vn(a){var b=this;this.g=[];this.h=[];this.data=[];(new kg).box("moov",og).P("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.N,-12,c.size);b.data.push(d);b.g.push(Sc(c.reader.Wa(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=Sc(c.reader.Wa(16));b.h.push(f)}}}}).parse(a)}
|
|
541
|
+
function wn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function xn(a){if(!a)return a;var b=new vn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={hc:c.hc},d=b.next())c.hc=d.value,a.some(function(e){return function(f){return Db(f,e.hc)}}(c))||a.push(c.hc);return Tc.apply(Nc,ia(a))};function yn(a,b){var c=zn(a,b);return 1!=c.length?null:c[0]}function An(a,b,c){a=Bn(a,b,c);return 1!=a.length?null:a[0]}function zn(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 Cn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
542
|
+
function Bn(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 Dn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function En(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 Fn(a){return Array.from(a.childNodes).every(Gn)?a.textContent.trim():null}
|
|
543
|
+
function Gn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Hn(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 In(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
|
|
544
|
+
function Jn(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}
|
|
545
|
+
function Kn(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 Ln(a){a=Number(a);return 0===a%1?a:null}function Mn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Nn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function On(a){a=Number(a);return isNaN(a)?null:a}function Pn(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
546
|
+
function Qn(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Rn(a,b){try{var c=Hc(a);return Qn(c,b)}catch(d){return null}};function Sn(a,b,c){var d=Tn(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.le?(e=h.init||e,!1):!0}),f.length&&(a=Un(e,f,c),0==a.length&&(a=[jc("",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(jc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
|
|
547
|
+
t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Td:g,qg:e,drmInfos:a,Xd:!0}}function Vn(a,b,c,d){var e=Sn(a,c,d);if(b.Xd){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.Xd=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.Td||b.Td}
|
|
548
|
+
function Wn(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
549
|
+
function Xn(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 Yn(a){a=An(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Qc(a.textContent);a=Wn(a).filter(function(b){return b.type===Zn})[0];if(!a)return"";a=Ic(a.value,!0);return(a=Qn(a,"WRMHEADER"))?Xn(a):""}
|
|
550
|
+
function Un(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.le];if(f){var g;if(g=An(e.node,"urn:microsoft:playready","pro")){g=Qc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:wn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=jc(f,e.init||a||g);if(f=$n.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
|
|
551
|
+
function Tn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ao(c.value))&&b.push(c);return b}
|
|
552
|
+
function ao(a){var b=a.getAttribute("schemeIdUri"),c=Dn(a,"urn:mpeg:cenc:2013","default_KID"),d=Bn(a,"urn:mpeg:cenc:2013","pssh").map(Fn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Qc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,le:b,keyId:c,init:0<e.length?e:null}}
|
|
553
|
+
var Zn=1,$n=(new Map).set("com.widevine.alpha",function(a){return(a=An(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Yn).set("com.microsoft.playready.recommendation",Yn).set("com.microsoft.playready.software",Yn).set("com.microsoft.playready.hardware",Yn);function bo(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=
|
|
549
554
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
550
|
-
function
|
|
551
|
-
p||0;if(0>p)if(q){q=
|
|
552
|
-
function
|
|
553
|
-
function
|
|
554
|
-
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
|
|
555
|
-
function
|
|
556
|
-
function
|
|
557
|
-
function
|
|
558
|
-
function
|
|
559
|
-
function
|
|
560
|
-
function
|
|
561
|
-
function
|
|
562
|
-
function
|
|
563
|
-
J=new
|
|
564
|
-
function
|
|
565
|
-
Infinity,d);return{tb:function(){return Promise.resolve(e)}}}function
|
|
566
|
-
function
|
|
567
|
-
function
|
|
568
|
-
p,!0),l.wb(m,a.presentationTimeline.Pa())):(l=new U(m),d&&a.Za&&(c[d]=l));a.presentationTimeline.xb(m);q&&l.Va(n,p);return{tb:function(){return Promise.resolve(l)}}}function
|
|
569
|
-
function
|
|
570
|
-
function
|
|
571
|
-
y=b.
|
|
572
|
-
function
|
|
573
|
-
function
|
|
574
|
-
function
|
|
575
|
-
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(
|
|
555
|
+
function co(a,b){var c=eo(a,b,"timescale"),d=1;c&&(d=Mn(c)||1);var e=eo(a,b,"duration");c=Mn(e||"");"image"==a.I.contentType&&(c=On(e||""));c&&(c/=d);var f=eo(a,b,"startNumber");e=Number(eo(a,b,"presentationTimeOffset"))||0;var g=Nn(f||"");if(null==f||null==g)g=1;var h=fo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.S.duration||Infinity;h=zn(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Hn(p,"t",Nn),y=Hn(p,"d",Nn);p=Hn(p,"r",Ln);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
|
|
556
|
+
p||0;if(0>p)if(q){q=Hn(q,"t",Nn);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,Qf:v}),v=m}f=l}return{timescale:d,ga:c,Cb:g,Sa:e/d||0,Qd:e,timeline:f}}function eo(a,b,c){return[b(a.I),b(a.ka),b(a.ca)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
557
|
+
function fo(a,b,c){return[b(a.I),b(a.ka),b(a.ca)].filter(Qb).map(function(d){return yn(d,c)}).reduce(function(d,e){return d||e})}
|
|
558
|
+
function go(a,b,c,d,e,f){for(var g=Dn(a,"http://www.w3.org/1999/xlink","href"),h=Dn(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 De(new N(2,4,4028));if("onLoad"!=h)return De(new N(2,4,4027));var m=ic([d],[g]);return e.request(0,Te(m,b)).Z(function(n){n=Rn(n.data,a.tagName);if(!n)return De(new N(2,4,4001,g));
|
|
559
|
+
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 ho(a,b,c,m[0],e,f+1)})}
|
|
560
|
+
function ho(a,b,c,d,e,f){f=void 0===f?0:f;if(Dn(a,"http://www.w3.org/1999/xlink","href")){var g=go(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return ho(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"==Dn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ho(k,b,c,d,e,f)));return He(g).Z(function(){return a})};function io(a,b,c,d,e,f,g){var h,k=(new kg).P("sidx",function(l){h=jo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
|
|
561
|
+
function jo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.Bb(),m=g.reader.Bb();g.reader.skip(2);var n=g.reader.Ab();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 N(2,3,3006);h.push(new ji(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 ko(a){this.h=Ib(a);this.g=new hg(this.h,0)}ko.prototype.na=function(){return this.g.na()};
|
|
562
|
+
function lo(a){var b=mo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=mo(a);a:{d=t(no);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.W();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.W()+b<=a.h.byteLength?b:a.h.byteLength-a.g.W();d=Ib(a.h,a.g.W(),b);a.g.skip(b);return new oo(c,d)}
|
|
563
|
+
function mo(a){var b=a.g.W(),c=a.g.X();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var no=[[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 oo(a,b){this.id=a;this.g=b}
|
|
564
|
+
function po(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function qo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ko(a.g);for(var n=null,p=null;a.na();){var q=lo(a);if(187==q.id){var v=ro(q);v&&(q=c*v.Rf,v=b+v.Af,null!=n&&m.push(new ji(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new ji(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
565
|
+
function ro(a){var b=new ko(a.g);a=lo(b);if(179!=a.id)throw new N(2,3,3013);a=po(a);b=lo(b);if(183!=b.id)throw new N(2,3,3012);b=new ko(b.g);for(var c=0;b.na();){var d=lo(b);if(241==d.id){c=po(d);break}}return{Rf:a,Af:c}};function so(a,b){var c=fo(a,b,"Initialization");if(!c)return null;var d=a.I.va,e=c.getAttribute("sourceURL");e&&(d=ic(a.I.va,[e]));e=0;var f=null;if(c=Hn(c,"range",Kn))e=c.start,f=c.end;return new hi(function(){return d},e,f)}
|
|
566
|
+
function to(a,b){var c=Number(eo(a,uo,"presentationTimeOffset"))||0,d=eo(a,uo,"timescale"),e=1;d&&(e=Mn(d)||1);var f=c/e||0,g=so(a,uo);vo(a,g);var h=Me(a);return{tb:function(){var k=fo(h,uo,"RepresentationIndex"),l=h.I.va;k&&(k=k.getAttribute("sourceURL"))&&(l=ic(h.I.va,[k]));k=wo(h);return xo(h,b,g,l,k.start,k.end,f)}}}
|
|
567
|
+
function xo(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,C,B,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Za||!a.S.de,l=a.S.start,m=a.S.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ma(),c.ha,c.ba):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;D=null;C=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=io(x,e,d,c,C,B,E);else{H=new ko(w);if(440786851!=lo(H).id)throw new N(2,3,3008);var J=lo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
|
|
568
|
+
J=new ko(J.g);for(var I=null;J.na();){var K=lo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new ko(I.g);K=1E6;for(J=null;I.na();){var Q=lo(I);if(2807729==Q.id)K=po(Q);else if(17545==Q.id)if(4==Q.g.byteLength)J=Q.g.getFloat32(0);else if(8==Q.g.byteLength)J=Q.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=lo(new ko(x));if(475249515!=K.id)throw new N(2,3,3007);H=qo(K,H,I,J,d,c,C,B,E)}D=H;h.xb(D);q=new U(D);k&&q.Va(B,E,!0);return G["return"](q)})}
|
|
569
|
+
function uo(a){return a.bc}function wo(a){var b=fo(a,uo,"RepresentationIndex");a=eo(a,uo,"indexRange");a=Kn(a||"");b&&(a=Hn(b,"range",Kn,a));return a}function vo(a,b){yo(a,b);if(!wo(a))throw new N(2,4,4002);}function yo(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=nc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function zo(a,b){var c=so(a,Ao),d=Bo(a);if(!d.ga&&!d.timeline&&1<d.vb.length)throw new N(2,4,4002);if(!d.ga&&!a.S.duration&&!d.timeline&&1==d.vb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=a.ca.id+","+a.I.id,e=b[f]);c=Co(a.S.start,a.S.duration,a.I.va,d,c);d=!e;e?e.wb(c,a.presentationTimeline.Pa()):(e=new U(c),f&&a.Za&&(b[f]=e));a.presentationTimeline.xb(c);a.Za&&a.S.de||e.Va(a.S.start,a.S.duration?a.S.start+a.S.duration:
|
|
570
|
+
Infinity,d);return{tb:function(){return Promise.resolve(e)}}}function Ao(a){return a.Xa}function Bo(a){var b=Do(a);a=co(a,Ao);var c=a.Cb;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,Cb:c,Sa:a.Sa,timeline:a.timeline,vb:b}}
|
|
571
|
+
function Co(a,b,c,d,e){var f=d.vb.length;d.timeline&&d.timeline.length!=d.vb.length&&(f=Math.min(d.timeline.length,d.vb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Tc:m.Tc},n++){var p=d.vb[n];m.Tc=ic(c,[p.sf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new ji(a+l,a+q,function(v){return function(){return v.Tc}}(m),p.start,p.end,e,g,a,h));l=q}return k}
|
|
572
|
+
function Do(a){return[a.I.Xa,a.ka.Xa,a.ca.Xa].filter(Qb).map(function(b){return zn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.be&&(a.be=!0);var c=b.getAttribute("media");b=Hn(b,"mediaRange",Kn,{start:0,end:null});return{sf:c,start:b.start,end:b.end}})};function Eo(a,b,c,d,e,f){var g=Fo(a),h=Go(a);Ho(h);var k=Me(a);if(h.Xb)return yo(a,g),{tb:function(){var v=bo(h.Xb,k.I.id,null,k.bandwidth||null,null);v=ic(k.I.va,[v]);return xo(k,b,g,v,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.wd(h.ga),a.presentationTimeline.xd(a.S.start)),{tb:function(){return Io(k,h,e,g,f)}};var l=null;d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,l=c[d]);var m=Jo(k,h,g),n=a.S.start,p=a.S.duration?a.S.start+a.S.duration:Infinity,q=Infinity!=p;l?(q&&(new U(m)).Va(n,
|
|
573
|
+
p,!0),l.wb(m,a.presentationTimeline.Pa())):(l=new U(m),d&&a.Za&&(c[d]=l));a.presentationTimeline.xb(m);q&&l.Va(n,p);return{tb:function(){return Promise.resolve(l)}}}function Ko(a){return a.cc}function Go(a){var b=co(a,Ko),c=eo(a,Ko,"media");a=eo(a,Ko,"index");return{ga:b.ga,timescale:b.timescale,Cb:b.Cb,Sa:b.Sa,Qd:b.Qd,timeline:b.timeline,ud:c,Xb:a}}
|
|
574
|
+
function Ho(a){var b=a.Xb?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Xb&&(a.timeline=null),a.ga=null);if(!a.Xb&&!a.ud)throw new N(2,4,4002);}
|
|
575
|
+
function Io(a,b,c,d,e){function f(I){var K=(I-q)*p,Q=K+b.Sa,T=K+l;K=T+p;var R=Math.min(K,h());T=new ji(T,R,function(){var da=bo(y,w,I,x,Q*v);return ic(D,[da])},0,null,d,C,l,h());T.l=K;return T}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.cb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.S.start,m=a.ca.id,n=a.S.duration,p=b.ga,q=b.Cb,v=b.timescale,
|
|
576
|
+
y=b.ud,x=a.bandwidth||null,w=a.I.id,D=a.I.va,C=l-b.Sa,B=g();a=a.Za?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.cb()<h();E=k.U();if(c||E){var J=Math.max(a,B+1);H.Kc(p,function(){var I=k.Pa();H.$a(I);var K=t(g());K.next();K=K.next().value;for(var Q=[];J<=K;){var T=f(J);Q.push(T);J++}return I>h()&&!Q.length?null:Q})}return Promise.resolve(H)}
|
|
577
|
+
function Jo(a,b,c){var d=a.S.start,e=a.S.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Sc:h.Sc,Wc:h.Wc,Zc:h.Zc,Pc:h.Pc,ad:h.ad,Qc:h.Qc},k++){var l=b.timeline[k],m=l.start,n=l.Qf;l=l.end;h.Zc=k+b.Cb;h.ad=n+b.Qd;h.Wc=a.I.id;h.Pc=a.bandwidth||null;h.Sc=b.ud;h.Qc=a.I.va;g.push(new ji(d+m,d+l,function(p){return function(){var q=bo(p.Sc,p.Wc,p.Zc,p.Pc||null,p.ad);return ic(p.Qc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
|
|
578
|
+
function Fo(a){var b=eo(a,Ko,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.va;return new hi(function(){var f=bo(b,c,null,d,null);return ic(e,[f])},0,null)};function Lo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Lo.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=[]};
|
|
579
|
+
function Mo(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,La;return L(function(Ia){switch(Ia.g){case 1:d=oc;No(b);Oo(b);Po(b);Qo(b);if(!c&&1==b.length){e=b[0];a.g=e.nc;a.h=e.Mc;a.j=e.textStreams;a.i=e.imageStreams;Ia.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 Ia["return"]();k=b.map(function(Aa){return Aa.nc});l=b.map(function(Aa){return Aa.Mc});m=b.map(function(Aa){return Aa.textStreams});n=b.map(function(Aa){return Aa.imageStreams});
|
|
580
|
+
p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(Ro(d.Y));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Ro(d.Jb));return u(Ia,So(a.g,k,f,To,Uo),3);case 3:return u(Ia,So(a.h,l,f,To,Uo),4);case 4:return u(Ia,So(a.j,m,f,To,Uo),5);case 5:return u(Ia,So(a.i,n,f,To,Uo),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(Q=K.value,T=t(a.h),R=T.next();!R.done;R=T.next())da=R.value,sa=$f(Q.drmInfos,da.drmInfos),Q.drmInfos.length&&da.drmInfos.length&&
|
|
576
581
|
!sa.length||(La=D++,C.push({id:La,language:Q.language,primary:Q.primary,audio:Q,video:da,bandwidth:(Q.bandwidth||0)+(da.bandwidth||0),drmInfos:sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())H=G.value,J=D++,C.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Ya?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
|
|
577
|
-
a.l=C;z(Ia)}})}function
|
|
578
|
-
function
|
|
579
|
-
function
|
|
580
|
-
function
|
|
581
|
-
function
|
|
582
|
-
k.push(
|
|
583
|
-
B.variantIds=[
|
|
584
|
-
function
|
|
585
|
-
case 12:(D=K.h)&&a.push(D);
|
|
586
|
-
function
|
|
587
|
-
function
|
|
588
|
-
function
|
|
589
|
-
function
|
|
590
|
-
(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
591
|
-
function
|
|
592
|
-
function
|
|
593
|
-
function
|
|
594
|
-
function
|
|
595
|
-
d=
|
|
596
|
-
function
|
|
597
|
-
function
|
|
598
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
599
|
-
function
|
|
600
|
-
function
|
|
601
|
-
r.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.u={};this.j=null;null!=this.C&&(this.C.stop(),this.C=null);return this.m.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return A(c,2),u(c,
|
|
602
|
-
function
|
|
603
|
-
function
|
|
604
|
-
function
|
|
605
|
-
"timeShiftBufferDepth",
|
|
606
|
-
(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.
|
|
607
|
-
B.
|
|
608
|
-
function
|
|
609
|
-
null;break}g=m+q}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,
|
|
610
|
-
function
|
|
611
|
-
}d=c.filter(function(m){return!m.
|
|
612
|
-
[]:
|
|
613
|
-
function
|
|
614
|
-
function
|
|
615
|
-
l}}var n;m=
|
|
616
|
-
10)));m=
|
|
617
|
-
1,null!=q)for(q=t(q.split(";")),
|
|
618
|
-
(l=l[0],l.textContent&&(E=l.textContent));l=
|
|
619
|
-
m.value,p=t(C.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(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ka.id||"__fake__"+a.F++,contentType:b.ka.contentType,language:B,
|
|
620
|
-
function
|
|
621
|
-
throw G;}q=
|
|
582
|
+
a.l=C;z(Ia)}})}function No(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.nc),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&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.nc=c}}
|
|
583
|
+
function Po(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&&gb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
|
|
584
|
+
function Oo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Mc),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&&gb(e.roles,h.roles)&&of(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Mc=c}}
|
|
585
|
+
function Qo(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}}
|
|
586
|
+
function Vo(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q;return L(function(T){switch(T.g){case 1:b=oc;if(1==a.length)return T["return"](a[0]);c=a.map(function(R){return R.filter(function(da){return da.type==b.Ya})});d=a.map(function(R){return R.filter(function(da){return da.type==b.Ma})});e=a.map(function(R){return R.filter(function(da){return da.type==b.Y})});f=a.map(function(R){return R.filter(function(da){return da.type==b.Jb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
|
|
587
|
+
k.push(Wo(b.Y));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Wo(b.Jb));return u(T,So([],c,0,Xo,Yo),2);case 2:return p=T.h,u(T,So([],d,0,Xo,Yo),3);case 3:return q=T.h,u(T,So([],e,0,Xo,Yo),4);case 4:return v=T.h,u(T,So([],f,0,Xo,Yo),5);case 5:y=T.h;x=0;if(q.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,J=t(q),I=J.next();!I.done;I=J.next())K=I.value,Q=x++,K.variantIds.push(Q),H.variantIds.push(Q);else for(w=q.concat(p),D=t(w),C=D.next();!C.done;C=D.next())B=C.value,
|
|
588
|
+
B.variantIds=[x++];return T["return"](q.concat(p).concat(v).concat(y))}})}
|
|
589
|
+
function So(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I;return L(function(K){switch(K.g){case 1:f=oc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.A(4);break}m=l.value;return u(K,Zo(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.A(2);break;case 4:p=t(g),q=p.next();case 6:if(q.done){K.A(8);break}v=q.value;y=t(v);x=y.next();case 9:if(x.done){q=p.next();K.A(6);break}w=x.value;return u(K,$o(w,b,d,e,g),12);
|
|
590
|
+
case 12:(D=K.h)&&a.push(D);x=y.next();K.A(9);break;case 8:C=t(g);for(q=C.next();!q.done;q=C.next())for(B=q.value,E={},G=t(B),x=G.next();!x.done;E={Ua:E.Ua},x=G.next())if(E.Ua=x.value,H=E.Ua.type==f.Y&&!E.Ua.language,J=E.Ua.type==f.Jb&&!E.Ua.tilesLayout,!H&&!J&&(I=a.some(function(Q){return function(T){return T.mimeType==Q.Ua.mimeType&&ad(T.codecs)==ad(Q.Ua.codecs)}}(E))))throw new N(2,4,4037);return K["return"](a)}})}
|
|
591
|
+
function Zo(a,b,c,d,e){var f;return L(function(g){if(1==g.g)return(f=ap(b,a))?u(g,bp(f),2):g["return"](!1);cp(a,f,c,d,e);return g["return"](!0)})}function bp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
|
|
592
|
+
function $o(a,b,c,d,e){var f,g;return L(function(h){if(1==h.g)return f=c(a),(g=ap(b,f))?f.createSegmentIndex?u(h,bp(g),2):h.A(2):h["return"](null);cp(f,g,0,d,e);return h["return"](f)})}function cp(a,b,c,d,e){for(var f=0;f<b.length;f++)if(f>=c){var g=b[f];d(a,g);var h=!0;"audio"==a.type&&0==sd(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}
|
|
593
|
+
function To(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ii;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Xo(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
594
|
+
function Uo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=$f(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
|
|
595
|
+
(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=To(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Uo(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Uo(a.trickModeVideo,b)}
|
|
596
|
+
function Yo(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)}}}
|
|
597
|
+
function ap(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:dp,video:dp,text:ep,image:fp}[f.type],h={audio:gp,video:hp,text:ip,image:jp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function dp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||ad(b.codecs)!=ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<$f(c,d).length:1)}return c?!1:!0}
|
|
598
|
+
function ep(a,b){return a.language?b.language?0==sd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function fp(a){return a.tilesLayout?!0:!1}
|
|
599
|
+
function gp(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
|
|
600
|
+
d=kp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==lp)return!0;if(d==mp)return!1;d=kp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==lp?!0:d==mp?!1:a.bandwidth&&np(a.bandwidth,b.bandwidth,c.bandwidth)==lp?!0:!1}
|
|
601
|
+
function hp(a,b,c){if(a.id==c.id)return!0;var d=kp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==lp)return!0;if(d==mp)return!1;if(a.frameRate){d=kp(a.frameRate,b.frameRate,c.frameRate);if(d==lp)return!0;if(d==mp)return!1}return a.bandwidth&&np(a.bandwidth,b.bandwidth,c.bandwidth)==lp?!0:!1}
|
|
602
|
+
function ip(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(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!=
|
|
603
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function jp(a,b,c){return a.id==c.id?!0:kp(a.width*a.height,b.width*b.height,c.width*c.height)==lp?!0:!1}function Wo(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}}
|
|
604
|
+
function Ro(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),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}}
|
|
605
|
+
function kp(a,b,c){if(b==a&&a!=c)return mp;if(c==a&&a!=b)return lp;if(b>a){if(c<=a||c-a<b-a)return lp;if(c-a>b-a)return mp}else{if(c>a)return mp;if(a-c<a-b)return lp;if(a-c>a-b)return mp}return op}function np(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?lp:b<a?mp:op}var lp=1,op=0,mp=-1;function pp(){var a=this;this.h=this.g=null;this.l=[];this.i=null;this.F=1;this.u={};this.M={};this.j=new Lo;this.D=0;this.G=new Pa(5);this.C=new O(function(){qp(a)});this.m=new Ne;this.o=null;this.J=[];this.s=Infinity;this.B=!1}r=pp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.l=[a],c.h=b,u(e,rp(c),2);d=e.h;c.h&&sp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
|
|
606
|
+
r.stop=function(){for(var a=t(Object.values(this.u)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.u={};this.j=null;null!=this.C&&(this.C.stop(),this.C=null);return this.m.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return A(c,2),u(c,rp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
|
|
607
|
+
function rp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Te(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),Oe(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,tp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);return k["return"](h)})}
|
|
608
|
+
function tp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Rn(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](up(a,d,c));f=a.g.dash.xlinkFailGracefully;g=ho(d,a.g.retryParameters,f,c,a.h.networkingEngine);Oe(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](up(a,h,c))})}
|
|
609
|
+
function up(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,La,Ia,Aa;return L(function(Ma){switch(Ma.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=zn(b,"Location").map(Fn).filter(Qb);0<f.length&&(g=ic(e,f),e=a.l=g);h=zn(b,"BaseURL");k=h.map(Fn);l=ic(e,k);m=0;h&&h.length&&(m=Hn(h[0],"availabilityTimeOffset",On)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Hn(b,"minBufferTime",Jn)||0);a.D=Hn(b,"minimumUpdatePeriod",Jn,-1);q=Hn(b,"availabilityStartTime",In);v=Hn(b,
|
|
610
|
+
"timeShiftBufferDepth",Jn);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Hn(b,"suggestedPresentationDelay",Jn));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Hn(b,"maxSegmentDuration",Jn));C=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.u)),G=E.next();!G.done;G=E.next())H=G.value,H.$a(B.Pa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=x?x:J,B=new S(q,I,a.g.dash.autoCorrectDrift);B.dc("static"==C);(K=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
|
|
611
|
+
(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Md(v);Q=b.getAttribute("profiles")||"";T={Za:"static"!=C,presentationTimeline:B,ca:null,S:null,ka:null,I:null,bandwidth:0,be:!1,rb:m,profiles:Q.split(",")};R=vp(a,T,l,b);da=R.duration;sa=R.periods;"static"!=C&&R.Vd||B.Ha(da||Infinity);a.s&&!a.B&&(La=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.oe(a.s):a.s&&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.");
|
|
612
|
+
B.wd(D||1);return u(Ma,Mo(a.j,sa,T.Za),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);Ma.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.te()){Ma.A(4);break}Ia=zn(b,"UTCTiming");return u(Ma,wp(a,l,Ia),5);case 5:Aa=Ma.h;if(!a.h)return Ma["return"]();B.pe(Aa);case 4:B.rd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ma)}})}
|
|
613
|
+
function vp(a,b,c,d){var e=Hn(d,"mediaPresentationDuration",Jn),f=[],g=0;d=zn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Hn(k,"start",Jn,g),n=k.id,p=Hn(k,"duration",Jn),q=null;if(l){var v=Hn(l,"start",Jn);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.o&&null!==n&&null!==m&&m<a.o)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.o||m>a.o)&&(a.o=m);g=xp(a,b,c,{start:m,duration:q,node:k,de:null==q||!l});f.push(g);b.ca.id&&q&&(a.M[b.ca.id]=q);if(null==q){g=
|
|
614
|
+
null;break}g=m+q}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Vd:!1}:{periods:f,duration:g,Vd:!0}}
|
|
615
|
+
function xp(a,b,c,d){b.ca=yp(d.node,null,c);b.S=d;b.ca.rb=b.rb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=zn(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())zp(a,d.start,d.duration,f.value,c);c=zn(d.node,"AdaptationSet").map(function(m){return Ap(a,b,m)}).filter(Qb);if(b.Za){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Df);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
|
|
616
|
+
}d=c.filter(function(m){return!m.Od});c=c.filter(function(m){return m.Od});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Od.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={lc:h.lc},l=k.next())h.lc=l.value,h.lc.trickModeVideo=e.streams.find(function(m){return function(n){return ad(m.lc.codecs)==ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Bp(d,"audio");g=a.g.disableVideo?[]:Bp(d,"video");f=a.g.disableText?
|
|
617
|
+
[]:Bp(d,nc);c=a.g.disableThumbnails?[]:Bp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,nc:d,Mc:e,textStreams:g,imageStreams:f}}
|
|
618
|
+
function Bp(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
619
|
+
function Ap(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=yp(c,b.ca,null);var e=!1,f=zn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Qb),h=void 0,k=b.ka.contentType==nc;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=
|
|
620
|
+
l}}var n;m=zn(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=zn(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"),
|
|
621
|
+
10)));m=zn(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,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,D=w);v.set(x,od(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
622
|
+
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,od(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=zn(c,"ContentProtection");var C=Sn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=od(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=zn(c,"Label"))&&l.length&&
|
|
623
|
+
(l=l[0],l.textContent&&(E=l.textContent));l=zn(c,"Representation");c=l.map(function(G){if(G=Cp(a,b,C,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=Dp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ka.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
624
|
+
m.value,p=t(C.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(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ka.id||"__fake__"+a.F++,contentType:b.ka.contentType,language:B,rg:e,streams:c,drmInfos:C.drmInfos,Od:f,Df:k}}
|
|
625
|
+
function Cp(a,b,c,d,e,f,g,h,k,l){b.I=yp(l,b.ka,null);a.s=Math.min(a.s,b.I.rb);if(!Ep(b.I))return null;var m=b.S.start;b.bandwidth=Hn(l,"bandwidth",Mn)||0;var n=b.I.contentType,p=n==nc||"application"==n;n="image"==n;try{var q=function(G,H,J){return Fp(a,G,H,J)};if(b.I.bc)var v=to(b,q);else if(b.I.Xa)v=zo(b,a.u);else if(b.I.cc)v=Eo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.va,x=b.S.duration||0;v={tb:function(){return Promise.resolve(Hi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
|
|
626
|
+
throw G;}q=zn(l,"ContentProtection");q=Vn(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;zn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=zn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
|
|
622
627
|
(C=l.getAttribute("value")),!C))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={id:a.F++,originalId:b.I.id,createSegmentIndex:function(){var G;return L(function(H){if(1==H.g){if(E.segmentIndex)return H.A(0);G=E;return u(H,v.tb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,
|
|
623
|
-
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.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.
|
|
624
|
-
function
|
|
625
|
-
function
|
|
626
|
-
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=
|
|
627
|
-
"height",
|
|
628
|
-
function
|
|
629
|
-
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
|
|
630
|
-
function
|
|
631
|
-
function
|
|
632
|
-
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,
|
|
628
|
+
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.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.yd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:C};return E}
|
|
629
|
+
function qp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,rp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();sp(a,b);z(d)}})}function sp(a,b){0>a.D||a.C.R(Math.max(3,a.D-b,Ra(a.G)))}
|
|
630
|
+
function yp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,yd:null,audioSamplingRate:null,rb:0};c=c||b.va;var d=zn(a,"BaseURL"),e=d.map(Fn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Hn(a,"frameRate",Pn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=zn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
|
|
631
|
+
m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=zn(a,"AudioChannelConfiguration");m=Gp(m)||b.yd;p=Hn(a,"audioSamplingRate",Nn)||b.audioSamplingRate;f||(f=Dp(g,h));var q=yn(a,"SegmentBase"),v=yn(a,"SegmentTemplate"),y=q?Hn(q,"availabilityTimeOffset",On)||0:0,x=v?Hn(v,"availabilityTimeOffset",On)||0:0;d=d&&d.length?Hn(d[0],"availabilityTimeOffset",On)||0:0;d=b.rb+d+y+x;return{va:ic(c,e),bc:q||b.bc,Xa:yn(a,"SegmentList")||b.Xa,cc:v||b.cc,width:Hn(a,"width",Nn)||b.width,height:Hn(a,
|
|
632
|
+
"height",Nn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),yd:m,audioSamplingRate:p,rb:d}}
|
|
633
|
+
function Gp(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=
|
|
634
|
+
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 Ep(a){var b=a.bc?1:0;b+=a.Xa?1:0;b+=a.cc?1:0;if(0==b)return a.contentType==nc||"application"==a.contentType?!0:!1;1!=b&&(a.bc&&(a.Xa=null),a.cc=null);return!0}
|
|
635
|
+
function Hp(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=ic(b,[c]),f=Te(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Oe(a.m,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Hc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
|
|
636
|
+
function wp(a,b,c){var d,e,f,g,h,k,l,m;return L(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;A(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.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);
|
|
637
|
+
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,Hp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Hp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
|
|
633
638
|
case 9:va(n,3);break;case 5:F(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)}})}
|
|
634
|
-
function
|
|
635
|
-
function
|
|
636
|
-
|
|
637
|
-
function
|
|
638
|
-
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=
|
|
639
|
-
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new
|
|
640
|
-
var
|
|
641
|
-
M("shaka.net.DataUriPlugin"
|
|
642
|
-
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,
|
|
643
|
-
r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==
|
|
644
|
-
function
|
|
645
|
-
q=m[m.length-1];if(v=
|
|
646
|
-
function
|
|
647
|
-
ic([a.M],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),
|
|
648
|
-
a.g.defaultPresentationDelay:a.aa?a.aa:3*a.ia),a.i.
|
|
649
|
-
Ia.next())(Ma=
|
|
650
|
-
function
|
|
651
|
-
function
|
|
652
|
-
function
|
|
639
|
+
function zp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Hn(d,"timescale",Nn)||1;d=t(zn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Hn(k,"presentationTime",Nn)||0,m=Hn(k,"duration",Nn)||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))}}
|
|
640
|
+
function Fp(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=Ze,f=Ti(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Oe(a.m,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Dp(a,b){return ed(Zc(a,b))?nc:a.split("/")[0]}M("shaka.dash.DashParser",pp);fg.mpd=function(){return new pp};dg["application/dash+xml"]=function(){return new pp};dg["video/vnd.mpeg.dash.mpd"]=function(){return new pp};function Ip(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Jp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Jp.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};
|
|
641
|
+
Jp.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 Kp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Lp(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Mp(a,b){this.name=a;this.value=b};function Np(a,b){return a.filter(function(c){return c.name==b})}function Op(a,b){return a.filter(function(c){return Kp(c,"TYPE")==b})}function Pp(a,b){var c=Np(a,b);return c.length?c[0]:null}function Qp(a,b,c){c=void 0===c?0:c;return(a=Pp(a,b))?Number(a.value):c};function Rp(a){this.h=a;this.g=0}function Sp(a){Tp(a,/[ \t]+/gm)}function Tp(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 Up(a){return a.g==a.h.length?null:(a=Tp(a,/[^ \t\n]*/gm))?a[0]:null};function Vp(){this.g=0}
|
|
642
|
+
function Wp(a,b,c){b=Hc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Xp(a,g),--a.g,Yp.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=Xp(a,h);if(Zp.includes(h.name)){if(1!=b)throw new N(2,4,4017);
|
|
643
|
+
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=Xp(a,m),Yp.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=ic([d],[m.trim()])[0],h&&g.push(h),e.push(new Lp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Lp("",g,k)));return new Ip(c,b,f,e)}f.push(h);
|
|
644
|
+
"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Mp("URI",k)),e=!0)}}return new Ip(c,b,f)}function Xp(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Rp(f);var h;(h=Tp(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Tp(f,k);)d.push(new Mp(h[1],h[2]||h[3])),Sp(f)}return new Jp(c,e,d,g)}
|
|
645
|
+
var Yp="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(" "),Zp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function $p(){}function aq(a){try{var b=bq(a);return Fe({uri:a,ge:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return De(c)}}function bq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Qc(a):e=Lc(a);return{data:e,contentType:c}}
|
|
646
|
+
M("shaka.net.DataUriPlugin",$p);$p.parse=aq;Qe("data",aq);function cq(){var a=this;this.g=this.j=null;this.Ka=1;this.o=new Map;this.u=new Map;this.Ca=new Set;this.h=new Map;this.i=null;this.M="";this.da=new Vp;this.Ba=0;this.B=new O(function(){dq(a)});this.m=eq;this.C=null;this.ia=0;this.F=Infinity;this.aa=this.ja=0;this.D=new Ne;this.V=[];this.J=new Map;this.La=!1;this.s=new Map;this.T=null;this.ea=new Map;this.G=new Map;this.l=!1}r=cq.prototype;r.configure=function(a){this.g=a};
|
|
647
|
+
r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,fq(c,Te([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,gq(c,d.data),3);e=c.Ba;0<e&&c.B.R(e);return f["return"](c.C)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.j=null;this.Ca.clear();this.C=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
648
|
+
r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==eq)return e["return"]();b=[];a.T=null;c=Array.from(a.h.values());return c.length?u(e,hq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(hq(a,c[d]));return u(e,Promise.all(b),0)})};
|
|
649
|
+
function hq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=iq,d=b.ye,e=new Wb(d),a.l&&b.De&&Zb(e,new ac("_HLS_skip=YES")),u(y,fq(a,Te([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=Wp(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Np(g.g,"EXT-X-DEFINE");k=jq(a,h);l=b.stream;return u(y,kq(a,b.Lc,g,l.type,l.mimeType,b.td,k,b.Ke),3)}m=y.h;l.segmentIndex.wb(m,a.i.Pa());m.length&&(n=Qp(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.td.get(n),l.segmentIndex.$a(p));
|
|
650
|
+
q=m[m.length-1];if(v=Pp(g.g,"EXT-X-ENDLIST"))lq(a,c.xe),a.i.Ha(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
|
|
651
|
+
function gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,La,Ia,Aa,Ma,Cc,jd;return L(function(Qa){switch(Qa.g){case 1:c=Wp(a.da,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=Np(c.g,"EXT-X-DEFINE");mq(a,d);e=Np(c.g,"EXT-X-MEDIA");f=Np(c.g,"EXT-X-STREAM-INF");g=Np(c.g,"EXT-X-IMAGE-STREAM-INF");nq(a,f);h=Np(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
|
|
652
|
+
ic([a.M],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),x=new P("sessiondata",y),a.j)a.j.onEvent(x);return u(Qa,oq(a,e),2);case 2:return pq(a,e),u(Qa,qq(a,f),3);case 3:return w=Qa.h,u(Qa,rq(a,e),4);case 4:return D=Qa.h,u(Qa,sq(a,g),5);case 5:C=Qa.h;if(!a.j)throw new N(2,7,7001);if(a.La&&0==w.length)throw new N(2,4,4034);E=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.ee),"text"!=J.stream.type&&(E=Math.min(E,J.rf-J.ee));a.m!=eq?(a.i=new S(0,a.g.defaultPresentationDelay?
|
|
653
|
+
a.g.defaultPresentationDelay:a.aa?a.aa:3*a.ia),a.i.dc(!1)):(a.i=new S(null,0),a.i.dc(!0));if(a.m!=eq)a.Ba=a.F,I=iq,a.m==I.we&&(K=a.i.Ic,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.i.Md(K));else for(a.i.Ha(E),a.i.offset(-B),Q=t(a.h.values()),H=Q.next();!H.done;H=Q.next())T=H.value,T.stream.segmentIndex.offset(-B),T.stream.segmentIndex.Va(0,E);a.V=[];R=[];da=t(w);for(sa=da.next();!sa.done;sa=da.next())for(La=sa.value,Ia=t([La.video,La.audio]),Aa=Ia.next();!Aa.done;Aa=
|
|
654
|
+
Ia.next())(Ma=Aa.value)&&R.push(Ma);return u(Qa,Promise.all(R.map(function(ge){return L(function(wf){return u(wf,ge.createSegmentIndex(),0)})})),6);case 6:Cc=t(R);for(Aa=Cc.next();!Aa.done;Aa=Cc.next())jd=Aa.value,a.V.push(jd.segmentIndex.K);tq(a);a.i.rd();a.C={presentationTimeline:a.i,variants:w,textStreams:D,imageStreams:C,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.C);z(Qa)}})}
|
|
655
|
+
function mq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function jq(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}
|
|
656
|
+
function nq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=uq(a,e);if(g){var h=lc(nc,e);a.s.set(g,h);fb(e,h)}f&&(g=kc("audio",e),a.s.set(f,g));d&&(f=kc("video",e),a.s.set(d,f))}}
|
|
657
|
+
function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=Op(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return L(function(C){if(1==C.g){if(x=a.g.disableText)return C["return"](null);A(C,2);return u(C,vq(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.g.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Kp(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
|
|
653
658
|
t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
|
|
654
|
-
function
|
|
655
|
-
function
|
|
656
|
-
function
|
|
657
|
-
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;C=a.g.disableAudio;if(!
|
|
658
|
-
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.Ca.add(H))}}y=
|
|
659
|
-
function
|
|
660
|
-
|
|
661
|
-
function
|
|
662
|
-
function
|
|
663
|
-
v="YES"==q;return u(
|
|
664
|
-
function
|
|
659
|
+
function sq(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);A(l,2);return u(l,wq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
|
|
660
|
+
function oq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,vq(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return vq(a,e)});return u(d,Promise.all(c),0)})}
|
|
661
|
+
function qq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Kp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,xq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=t(D),B=C.next();!B.done;B=C.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
|
|
662
|
+
void 0,B.frameRate=Number(h)||void 0,B.hdr=q||void 0;C=a.g.disableAudio;if(!w.length||C)w=[null];C=a.g.disableVideo;if(!D.length||C)D=[null];C=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,I=B?B.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Lc:"")+" - "+(B?B.Lc:"");G&&J&&I.length&&K.length&&!(0<$f(I,K).length)||a.Ca.has(H)||(G={id:a.Ka++,language:G?G.language:"und",primary:!!G&&G.primary||
|
|
663
|
+
!!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.Ca.add(H))}}y=x.call(y,C)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
|
|
664
|
+
function xq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g)return c=oc,d=uq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Kp(b,"URI"),p=k.audio.find(function(w){return w&&w.Lc==n}),q=lc(c.Ma,d),(v=lc(c.Ya,d))&&!q?l=c.Ya:!h.length&&v&&q?(l=c.Ma,d=[[q,v].join()]):k.audio.length&&p?(l=c.Ya,m=!0):l=k.video.length?c.Ya:c.Ma,m?x.A(2):u(x,yq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
|
|
665
|
+
zq(k);return x["return"](k)})}function uq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");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=bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Aq(a){a=Z(a,"LANGUAGE")||"und";return od(a)}
|
|
666
|
+
function zq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function pq(a,b){var c=Op(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Aq(e);var f=Kp(e,"GROUP-ID");e=Kp(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
|
|
667
|
+
function vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g){c=Kp(b,"GROUP-ID");d="";var w=Kp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=nc);e=w;e!=nc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Bq(Kp(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=Aq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
|
|
668
|
+
v="YES"==q;return u(x,Cq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(null==y)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
|
|
669
|
+
function wq(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=Bq(Kp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Aq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Cq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
665
670
|
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)})}
|
|
666
|
-
function
|
|
667
|
-
function
|
|
668
|
-
H.next())if(I=J.value,K=
|
|
669
|
-
case 4:
|
|
670
|
-
encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:
|
|
671
|
-
function
|
|
672
|
-
function
|
|
673
|
-
function
|
|
674
|
-
[
|
|
675
|
-
function
|
|
676
|
-
function
|
|
677
|
-
p))for(D=h;D.has(
|
|
678
|
-
E++;R.A(5);break;case 7:return R["return"](B)}})}function
|
|
679
|
-
function
|
|
680
|
-
e.uris[0]);return u(k,
|
|
681
|
-
function
|
|
682
|
-
3);case 3:return q=
|
|
683
|
-
function
|
|
684
|
-
function
|
|
685
|
-
f.Ab();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function
|
|
686
|
-
function
|
|
687
|
-
function
|
|
688
|
-
var
|
|
689
|
-
vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},
|
|
690
|
-
|
|
691
|
-
function
|
|
692
|
-
f(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,m-n,y-m),n=m,p=J;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:
|
|
693
|
-
function
|
|
694
|
-
function
|
|
695
|
-
c);k(y)}catch(
|
|
696
|
-
|
|
697
|
-
function
|
|
698
|
-
function
|
|
699
|
-
function
|
|
700
|
-
r.updateManifestExpiration=function(a,b){var c=
|
|
701
|
-
r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=
|
|
702
|
-
r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=
|
|
703
|
-
function
|
|
704
|
-
function
|
|
705
|
-
|
|
706
|
-
function
|
|
707
|
-
function
|
|
708
|
-
function
|
|
709
|
-
|
|
710
|
-
function
|
|
711
|
-
function
|
|
712
|
-
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}}
|
|
713
|
-
function
|
|
714
|
-
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
|
|
715
|
-
|
|
671
|
+
function yq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=Bq(Kp(b,"URI"),a.o);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=kc(d,c);return u(k,Cq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
|
|
672
|
+
function Cq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,La,Ia,Aa,Ma,Cc,jd,Qa,ge,wf,bn,cn,dn,Ph,Qh,xf,en,fn,gn,hn;return L(function(bb){switch(bb.g){case 1:return p=ic([a.M],[b])[0],u(bb,fq(a,Te([p],a.g.retryParameters),0),2);case 2:q=bb.h;p=q.uri;v=Wp(a.da,q.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())D=w.value,C=Np(D.g,"EXT-X-KEY"),y.push.apply(y,ia(C));B=!1;E=[];G=new Set;H=t(y);for(J=H.next();!J.done;J=
|
|
673
|
+
H.next())if(I=J.value,K=Kp(I,"METHOD"),"NONE"!=K){B=!0;if("AES-128"==K)return a.La=!0,bb["return"](null);Q=Kp(I,"KEYFORMAT");if(R=(T=Dq[Q])?T(I):null){if(R.keyIds)for(da=t(R.keyIds),sa=da.next();!sa.done;sa=da.next())La=sa.value,G.add(La);E.push(R)}}if(B&&!E.length)throw new N(2,4,4026);Ia=Np(v.g,"EXT-X-DEFINE");Aa=jq(a,Ia);Eq(a,v);return u(bb,Fq(a,d,c,v,Aa),3);case 3:return Ma=bb.h,Gq.includes(Ma)&&(c=""),Cc=new Map,jd=new Map,A(bb,4),u(bb,kq(a,b,v,d,Ma,Cc,Aa,jd),6);case 6:Qa=bb.h;va(bb,5);break;
|
|
674
|
+
case 4:ge=F(bb);if(4035==ge.code)return Va("Skipping unsupported HLS stream",Ma,b),bb["return"](null);throw ge;case 5:wf=Qa[0].startTime;bn=Qa[Qa.length-1].endTime;cn=new U(Qa);dn=d==nc?"subtitle":void 0;Ph=[];if(l)for(Qh=t(l.split(",")),xf=Qh.next();!xf.done;xf=Qh.next())en=xf.value,Ph.push(en);gn=(fn=Pp(v.g,"EXT-X-SERVER-CONTROL"))?null!=fn.getAttribute("CAN-SKIP-UNTIL"):!1;hn={id:a.Ka++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:cn,mimeType:Ma,codecs:c,kind:dn,
|
|
675
|
+
encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Ph,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return bb["return"]({stream:hn,Lc:b,ye:p,ee:wf,rf:bn,td:Cc,Ke:jd,De:gn})}})}
|
|
676
|
+
function Eq(a,b){var c=Pp(b.g,"EXT-X-PLAYLIST-TYPE"),d=Pp(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)lq(a,eq);else{c?lq(a,Hq):lq(a,Iq);d=Pp(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Pp(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(Kp(c,"PART-TARGET")),a.F=Math.min(a.ja,a.F),c=Pp(b.g,"EXT-X-SERVER-CONTROL"),a.aa=c?Number(Kp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ia=Math.max(d,a.ia)}}
|
|
677
|
+
function Jq(a,b,c,d){c=Pp(c,"EXT-X-MAP");if(!c)return null;var e=Kp(c,"URI");d=Bq(ic([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Kq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Kq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new hi(function(){return[a]},c,d)}
|
|
678
|
+
function Lq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Bq(d.h,g),n=Pp(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={Uc:y.Uc},x++){var w=d.i[x],D=0==x?c:v[v.length-1],C=0==x?e:D.endTime,B=Number(Z(w,"DURATION"))||a.ja;if(B){B=C+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(D=Z(w,"BYTERANGE-START"))?Number(D):0:(E=Z(w,"BYTERANGE"),D=t(Mq(D,E)),E=D.next().value,G=D.next().value);if(w=Z(w,"URI"))y.Uc=ic([h],
|
|
679
|
+
[w])[0],v.push(new ji(C,B,function(H){return function(){return[H.Uc]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Pp(l,"EXT-X-BYTERANGE"))?(q=t(Mq(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].ha,q=v[v.length-1].ba);c="";a=null;"image"==k&&(c="1x1",k=Pp(l,"EXT-X-TILES"))&&(c=Kp(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new ji(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
|
|
680
|
+
function Mq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ba+1,d=c+d-1);return[c,d]}function tq(a){if(a.i){for(var b=t(a.V),c=b.next();!c.done;c=b.next())a.i.xb(c.value);a.V=[]}}
|
|
681
|
+
function kq(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T;return L(function(R){switch(R.g){case 1:k=c.segments;m=Qp(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=Pp(c.g,"EXT-X-SKIP"))?Number(Z(n,"SKIPPED-SEGMENTS")):0;q=m+p;if(a.m!=eq&&f.has(q)){v=f.get(q);R.A(2);break}if(null!=a.T){R.A(3);break}l=Jq(a,c.h,k[0].g,g);y=a;return u(R,Nq(a,b,l,e,q,!1,k[0],g,d),4);case 4:y.T=R.h;case 3:v=a.T;case 2:x=k[0].h;x.split("/").pop();w=Qp(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(w)||h.set(w,q),
|
|
682
|
+
p))for(D=h;D.has(w+1)&&D.get(w+1)<q;)w++;C=a.G.get(w)||0;B=[];E=0;case 5:if(!(E<k.length)){R.A(7);break}G=k[E];H=B[B.length-1];J=0==E?v:H.endTime;q=m+p+E;f.set(q,J);l=Jq(a,c.h,G.g,g);I=Pp(G.g,"EXT-X-DISCONTINUITY");if(!I){R.A(8);break}w++;h.set(w,q);return u(R,Oq(a,w,b,l,e,q,G,g,J,d),9);case 9:C=R.h;case 8:!a.l&&(K=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());Q=Pp(G.g,"EXTINF");a.l||Q?(T=Lq(a,l,H,G,J,C,g,c.h,d))&&B.push(T):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.");
|
|
683
|
+
E++;R.A(5);break;case 7:return R["return"](B)}})}function Oq(a,b,c,d,e,f,g,h,k,l){var m,n;return L(function(p){if(1==p.g)return m=0,a.G.has(b)?(m=a.G.get(b),p.A(2)):u(p,Nq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.G.set(b,m));return p["return"](m)})}
|
|
684
|
+
function Pq(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:c=Ze;d=Ti(b.ma(),b.ha,b.ba,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](fq(a,d,c));e=Ti(b.ma(),b.ha,b.ha+2048-1,a.g.retryParameters);A(k,2);return u(k,fq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Va("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
|
|
685
|
+
e.uris[0]);return u(k,fq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
|
|
686
|
+
function Nq(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:l=Lq(a,c,null,g,0,0,h,"",k);if(a.C&&!f&&(m=a.h.get(b),n=m.td.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Gq.includes(d))throw Va("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Va("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.A(2);break}p=[Pq(a,l)];c&&p.push(Pq(a,c));return u(w,Promise.all(p),
|
|
687
|
+
3);case 3:return q=w.h,v=q[0],y=q[1]||q[0],w["return"](Qq(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.A(4);break}return u(w,Pq(a,l),5);case 5:return x=w.h,w["return"](Rq(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
|
|
688
|
+
function Qq(a,b,c,d){var e=0;(new kg).box("moov",og).box("trak",og).box("mdia",og).P("mdhd",function(h){e=Bh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new kg).box("moof",og).box("traf",og).P("tfdt",function(h){f=Ah(h.reader,h.version).cd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
|
|
689
|
+
function Rq(a,b,c){function d(){f.seek(g+188);h=f.X();71!=h&&(f.seek(g+192),h=f.X());71!=h&&(f.seek(g+204),h=f.X());71!=h&&e();f.je(1)}function e(){throw new N(2,4,4030,a,b);}var f=new hg(c,0),g=0,h=0;for(c=Math.min(f.N.byteLength-188,940);;){g=f.W();h=f.X();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Ab();if(8191==(k&8191))d();else if(k&16384)if(k=(f.X()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.X(),f.skip(k)),1!=f.L()>>8)d();else{f.skip(3);c=f.X()>>6;0!=c&&1!=c||e();0==f.X()&&e();c=f.X();k=f.Ab();var l=
|
|
690
|
+
f.Ab();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Bq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
|
|
691
|
+
function Fq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){if(1==w.g){f=oc;g=Ze;h=Math.trunc((d.segments.length-1)/2);k=Bq(d.segments[h].h,e);l=new Wb(k);m=l.ua.split(".").pop();n=Sq[b];if(p=n[m])return w["return"](p);if(b==f.Y)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Jb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=Te([k],a.g.retryParameters);q.method="HEAD";return u(w,fq(a,q,g),2)}v=w.h;y=v.headers["content-type"];return y?w["return"](y.split(";")[0]):
|
|
692
|
+
(x=n.mp4,w["return"](x))})}function dq(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.Ba,a.B.R(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.B.R(.1);z(d)})}function lq(a,b){a.m=b;a.i&&a.i.dc(a.m==eq);a.m!=eq||a.B.stop()}function fq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Oe(a.D,b);return b.promise}M("shaka.hls.HlsParser",cq);
|
|
693
|
+
var Gq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Sq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
694
|
+
vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Dq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Kp(a,"URI");b=bq(b);b=Fb(b.data);b=jc("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=
|
|
695
|
+
Kp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Kp(a,"URI");a=bq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=wn(a,b);return jc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},eq="VOD",Iq="EVENT",Hq="LIVE",iq={xe:eq,Xf:Iq,we:Hq};fg.m3u8=function(){return new cq};dg["application/x-mpegurl"]=function(){return new cq};dg["application/vnd.apple.mpegurl"]=function(){return new cq};function Tq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ge:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Kc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Uq(){}function Vq(a,b,c,d){var e=new Wq;mf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Xq,g={Rd:!1,se:!1};a=Yq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Ce(a,function(){g.Rd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.se=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
|
|
696
|
+
function Yq(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,C;return L(function(B){switch(B.g){case 1:return g=Zq,h=$q,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,q=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var H,J;return L(function(I){switch(I.g){case 1:return A(I,2),u(I,q.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}m+=H.value.byteLength;if(!f){I.A(5);break}return u(I,
|
|
697
|
+
f(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,m-n,y-m),n=m,p=J;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;va(B,3);break;case 2:w=F(B);if(d.Rd)throw new N(1,1,7001,a,b);if(d.se)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return D={},C=k.headers,C.forEach(function(E,G){D[G.trim()]=E}),B["return"](Tq(D,l,k.status,a,k.url,b))}})}
|
|
698
|
+
function ar(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Uq);Uq.isSupported=ar;Uq.parse=Vq;var Zq=window.fetch,Xq=window.AbortController,$q=window.ReadableStream,Wq=window.Headers;ar()&&(Qe("http",Vq,2,!0),Qe("https",Vq,2,!0));function br(){}
|
|
699
|
+
function cr(a,b,c,d){var e=new dr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),q={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),q[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=Tq(q,n.response,n.status,a,n.responseURL,
|
|
700
|
+
c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Ce(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",br);br.parse=cr;var dr=window.XMLHttpRequest;
|
|
701
|
+
Qe("http",cr,1,!0);Qe("https",cr,1,!0);function er(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function fr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}er.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 gr(a){var b=this;this.o=a;this.h=new Map;this.i=new $e(function(){return hr(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new er}gr.prototype.destroy=function(){return this.i.destroy()};function ir(a,b,c){a.m=b;a.l=c}function hr(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
|
|
702
|
+
function jr(a,b,c,d,e,f){af(a.i);var g=fr(a.g,d);d=(a.h.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return u(v,kr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new vn(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(g,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.h.set(b,d);return d}
|
|
703
|
+
function lr(a,b,c){af(a.i);var d=(a.h.get(b)||Promise.resolve()).then(function(){return L(function(e){return u(e,c(),0)})});a.h.set(b,d)}function mr(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function kr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=Ze,d=a.o.request(c,b),e=function(){return d.abort()},a.j.push(e),u(g,d.promise,2);f=g.h;fb(a.j,e);return g["return"](f.data)})};function nr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}nr.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
|
|
704
|
+
function or(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}nr.prototype.store=function(){return this.h};nr.prototype.promise=function(){return this.g};function pr(a){this.h=a;this.g=[]}pr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function qr(a,b){return rr(a,b,"readwrite")}function rr(a,b,c){c=a.h.transaction([b],c);var d=new nr(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function sr(a,b,c){this.g=new pr(a);this.i=b;this.h=c}r=sr.prototype;r.destroy=function(){return this.g.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return tr(this.i)};r.removeSegments=function(a,b){return ur(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,vr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Sd(e)}))})};r.addManifests=function(){return tr(this.h)};
|
|
705
|
+
r.updateManifestExpiration=function(a,b){var c=qr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return ur(this,this.h,a,b)};r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,vr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Qb(e)})))})};
|
|
706
|
+
r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=rr(a.g,a.h,"readonly"),c=new Map,u(d,or(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Qb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.Sd=function(a){return a};r.Qb=function(a){return Promise.resolve(a)};function tr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
|
|
707
|
+
r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=qr(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={kc:g.kc},k=h.next())l=k.value,g.kc=e.add(l),g.kc.onsuccess=function(n){return function(){f.push(n.kc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
|
|
708
|
+
function ur(a,b,c,d){a=qr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={jc:e.jc},f=c.next())e.jc=f.value,b["delete"](e.jc).onsuccess=function(g){return function(){return d(g.jc)}}(e);return a.promise()}
|
|
709
|
+
function vr(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=rr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Ib:h.Ib,Gb:h.Gb},l=k.next())h.Gb=l.value,h.Ib=e.get(h.Gb),h.Ib.onsuccess=function(n){return function(){void 0==n.Ib.result&&g.push(n.Gb);f[n.Gb]=n.Ib.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function wr(a){this.g=new pr(a)}wr.prototype.destroy=function(){return this.g.destroy()};wr.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=rr(a.g,"session-ids","readonly"),c=[],u(d,or(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};wr.prototype.add=function(a){var b=qr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
710
|
+
wr.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=qr(b.g,"session-ids"),u(d,or(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function xr(){this.g=new Map}xr.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)};xr.prototype.init=function(){var a=this;yr.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)};
|
|
711
|
+
function zr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Fa:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Ar(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Fa:d,la:f},e)})})}
|
|
712
|
+
function Br(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Cr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Dr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
713
|
+
function Er(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=yr,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 Fr(a,b){yr.set(a,b)}M("shaka.offline.StorageMuxer",xr);xr.unregister=function(a){yr["delete"](a)};xr.register=Fr;xr.prototype.destroy=xr.prototype.destroy;var yr=new Map;function Gr(){sr.apply(this,arguments)}pa(Gr,sr);Gr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=qr(c.g,c.h);e=d.store();f=new pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
|
|
714
|
+
Gr.prototype.Qb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Hr(a.periods[c],e),b.push(f);return u(h,Vo(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})})};
|
|
715
|
+
function Hr(a,b){Ir(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Jr(e,a.startTime,b)})}
|
|
716
|
+
function Jr(a,b,c){var d=a.initSegmentUri?Kr(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=Kr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
717
|
+
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}}Gr.prototype.Sd=function(a){return{data:a.data}};function Kr(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
|
|
718
|
+
function Ir(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++,
|
|
719
|
+
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 Lr(){sr.apply(this,arguments)}pa(Lr,sr);
|
|
720
|
+
Lr.prototype.Qb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Mr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Vo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
|
|
716
721
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
|
|
717
|
-
function
|
|
718
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function
|
|
719
|
-
r.init=function(){var a=this,b=new pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new
|
|
720
|
-
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new
|
|
722
|
+
function Mr(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,
|
|
723
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Nr(){sr.apply(this,arguments)}pa(Nr,sr);Nr.prototype.hasFixedKeySpace=function(){return!1};Nr.prototype.addSegments=function(a){return this.add(this.i,a)};Nr.prototype.addManifests=function(a){return this.add(this.h,a)};Nr.prototype.Qb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Or(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Or.prototype;
|
|
724
|
+
r.init=function(){var a=this,b=new pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Gr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Lr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Lr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
|
|
725
|
+
e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Nr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new wr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
|
|
721
726
|
r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
|
|
722
727
|
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};
|
|
723
|
-
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,
|
|
724
|
-
function
|
|
725
|
-
function
|
|
726
|
-
function
|
|
728
|
+
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Pr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
|
|
729
|
+
function Pr(){var a=new pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Fr("idb",function(){return zc()||vc()||!window.indexedDB?null:new Or});function Qr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Qr.prototype.Fa=function(){return this.i};Qr.prototype.la=function(){return this.h};Qr.prototype.key=function(){return this.l};Qr.prototype.toString=function(){return this.j};
|
|
730
|
+
function Rr(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 Qr(b,c,d,Number(a[4])):null};function Sr(a,b){this.h=a;this.g=b}
|
|
731
|
+
function Tr(a,b){var c=new S(null,0);c.Ha(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ur(a,d,e,c);e=b.streams.filter(function(l){return l.type==nc}).map(function(l){return Vr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Vr(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=
|
|
727
732
|
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}}
|
|
728
|
-
function
|
|
729
|
-
e.value,g=
|
|
730
|
-
function
|
|
731
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function
|
|
732
|
-
function
|
|
733
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=
|
|
734
|
-
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
735
|
-
|
|
736
|
-
function
|
|
737
|
-
function
|
|
738
|
-
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return A(h,2),u(h,
|
|
739
|
-
function
|
|
740
|
-
function
|
|
741
|
-
4);case 4:b.h=null,b.g=null,z(k)}})})}function
|
|
742
|
-
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
743
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
744
|
-
return g.promise.then(h)};return
|
|
745
|
-
function
|
|
746
|
-
h,n,b,c,e,f),11);case 11:q=
|
|
747
|
-
function
|
|
748
|
-
d.push(
|
|
749
|
-
R.next();!E.done;E=R.next())da=E.value,"variant"==da.type&&K.add(da.id),"text"==da.type&&Q.add(da.id),"image"==da.type&&T.add(da.id);a.variants=a.variants.filter(function(La){return K.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return Q.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return T.has(La.id)});
|
|
750
|
-
function
|
|
751
|
-
G.initData.length})}),v=p&&!q,y=null,v&&(
|
|
752
|
-
function
|
|
753
|
-
function
|
|
754
|
-
function
|
|
755
|
-
function
|
|
756
|
-
r.list=function(){return
|
|
757
|
-
function
|
|
758
|
-
function(m){return m.createSegmentIndex()})),3);
|
|
759
|
-
function
|
|
760
|
-
n.set(null,Promise.resolve(null));m=new Map;p=
|
|
761
|
-
expiration:d.Sb(),streams:a,sessionIds:h?
|
|
762
|
-
function
|
|
763
|
-
tilesLayout:f.tilesLayout},m=f.id;
|
|
764
|
-
function
|
|
765
|
-
function
|
|
766
|
-
function
|
|
767
|
-
function
|
|
768
|
-
function
|
|
769
|
-
function
|
|
770
|
-
function
|
|
771
|
-
|
|
772
|
-
var
|
|
773
|
-
|
|
774
|
-
function
|
|
775
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
776
|
-
function
|
|
777
|
-
function
|
|
778
|
-
l=
|
|
779
|
-
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(
|
|
780
|
-
function
|
|
781
|
-
function
|
|
782
|
-
function
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
function
|
|
787
|
-
function
|
|
733
|
+
function Ur(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
|
|
734
|
+
e.value,g=Vr(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=Vr(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}
|
|
735
|
+
function Vr(a,b,c){var d=b.segments.map(function(e){return Wr(a,e)});c.xb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
|
|
736
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Wr(a,b){var c=new Qr("segment",a.h,a.g,b.dataKey);return new ji(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Xr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
737
|
+
function Xr(a,b){var c=new Qr("segment",a.h,a.g,b);return new hi(function(){return[c.toString()]},0,null)};function Yr(){this.g=null}r=Yr.prototype;r.configure=function(){};
|
|
738
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Rr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new xr;ua(m);return u(m,e.init(),4);case 4:return u(m,Br(e,d.Fa(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Sr(d.Fa(),d.la()),l=Tr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
739
|
+
r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new xr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Br(e,d.Fa(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
|
|
740
|
+
dg["application/x-offline-manifest"]=function(){return new Yr};function Zr(){}function $r(a){var b=Rr(a);b&&"manifest"==b.g?(a={uri:a,ge:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Fe(a)):a=b&&"segment"==b.g?as(b.key(),b):De(new N(2,1,9004,a));return a}
|
|
741
|
+
function as(a,b){var c=new xr;return Fe(void 0).Z(function(){return c.init()}).Z(function(){return Br(c,b.Fa(),b.la())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Zr);Zr.plugin=$r;Qe("offline",$r);function bs(a,b,c){var d,e,f,g,h,k;return L(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,cs(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=ds(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)}})}
|
|
742
|
+
function ds(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new pf({ib:b,onError:function(){},Fc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,zf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,If(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
|
|
743
|
+
9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return A(h,2),u(h,Jf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
|
|
744
|
+
function cs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function es(a,b,c){var d=b.presentationTimeline.getDuration();b=fs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function gs(a,b){var c=Tr(new Sr(a.Fa(),a.la()),b),d=b.appMetadata||{};c=fs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
|
|
745
|
+
function fs(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 hs(){this.g={}}function is(a,b,c){c=c.endTime-c.startTime;return js(a,b)*c}function js(a,b){var c=a.g[b];null==c&&(c=0);return c};function ks(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Tb()):(this.h=Vj(),this.g=new Pe);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new $e(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.l.map(function(l){return hr(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(),
|
|
746
|
+
4);case 4:b.h=null,b.g=null,z(k)}})})}function ls(){if(sc())a:{var a=t(yr.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=ks.prototype;r.destroy=function(){return this.m.destroy()};
|
|
747
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Sj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Xj(this.h,a)};r.getConfiguration=function(){var a=Vj();Xj(a,this.h,Vj());return a};r.Tb=function(){return this.g};
|
|
748
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new gr(this.g);this.l.push(f);b=ms(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,cg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Rb(h))})},e,f);var g=new Ce(b,function(){return hr(f)});g["finally"](function(){fb(d.l,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
|
|
749
|
+
return g.promise.then(h)};return ns(this,g)};r.df=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
|
|
750
|
+
function ms(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:return os(),h=g=null,k=new xr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,ps(a,b,g,e),6);case 6:n=w.h;qs(a);p=!n.presentationTimeline.U()&&!n.presentationTimeline.hb();if(!p)throw new N(2,9,9005,b);return u(w,rs(a,n,function(D){m=m||D},e),7);case 7:h=w.h;qs(a);if(m)throw m;return u(w,ss(n,e),8);case 8:return u(w,k.init(),9);case 9:return qs(a),u(w,zr(k),10);case 10:return l=w.h,qs(a),u(w,ts(a,l.la,
|
|
751
|
+
h,n,b,c,e,f),11);case 11:q=w.h;qs(a);if(m)throw m;return u(w,l.la.addManifests([q]),12);case 12:return v=w.h,qs(a),y=new Qr("manifest",l.path.Fa,l.path.la,v[0]),w["return"](gs(y,q));case 3:return wa(w),a.j=[],u(w,k.destroy(),13);case 13:if(!g){w.A(14);break}return u(w,g.stop(),14);case 14:if(!h){w.A(16);break}return u(w,h.destroy(),16);case 16:xa(w,0);break;case 2:x=F(w);if(!l){w.A(18);break}return u(w,l.la.removeSegments(a.j,function(){}),18);case 18:throw m||x;}})}
|
|
752
|
+
function ss(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da;return L(function(sa){switch(sa.g){case 1:return c={width:Infinity,height:Infinity},Jd(a,b.restrictions,c),u(sa,Md(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;xd(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,
|
|
753
|
+
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;D=a.presentationTimeline.getDuration();C=0;B=t(w);for(E=B.next();!E.done;E=B.next())G=E.value,H=G.bandwidth*D/8,C+=H;A(sa,4);return u(sa,b.offline.downloadSizeCallback(C),6);case 6:J=sa.h;if(!J)throw new N(2,9,9014);va(sa,5);break;case 4:I=F(sa);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;Q=new Set;T=new Set;R=t(w);for(E=
|
|
754
|
+
R.next();!E.done;E=R.next())da=E.value,"variant"==da.type&&K.add(da.id),"text"==da.type&&Q.add(da.id),"image"==da.type&&T.add(da.id);a.variants=a.variants.filter(function(La){return K.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return Q.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return T.has(La.id)});us(a);z(sa)}})}
|
|
755
|
+
function ts(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,y,x,w,D,C;return L(function(B){switch(B.g){case 1:return k=es(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&y==G&&Hf(c,"cenc",E)},ir(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),q=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
|
|
756
|
+
G.initData.length})}),v=p&&!q,y=null,v&&(x=c.g,y=vs.get(x.keySystem)),ua(B),D=w=ws(a,h,b,c,d,e,f,g),u(B,mr(h),4);case 4:D.size=B.h;w.expiration=c.Sb();C=Nf(c);w.sessionIds=g.offline.usePersistentLicense?C:[];if(p&&g.offline.usePersistentLicense&&!C.length)throw new N(2,9,9007);return B["return"](w);case 2:return wa(B),u(B,h.destroy(),5);case 5:xa(B,0)}})}r.remove=function(a){return xs(this,ys(this,a))};
|
|
757
|
+
function ys(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:os();c=Rr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new xr;ua(k);return u(k,e.init(),4);case 4:return u(k,Br(e,d.Fa(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([zs(a,h,e),As(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
|
|
758
|
+
function Bs(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:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function zs(a,b,c){return L(function(d){return u(d,Cs(a.g,a.h.drm,c,b),0)})}
|
|
759
|
+
function As(a,b,c){function d(){}var e=Ds(c);gs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Cf=function(){return xs(this,Es(this))};
|
|
760
|
+
function Es(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return os(),b=a.g,c=a.h.drm,d=new xr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],Cr(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,bs(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 wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
|
|
761
|
+
r.list=function(){return xs(this,Fs())};function Fs(){var a,b,c;return L(function(d){switch(d.g){case 1:return os(),a=[],b=new xr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ar(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=gs(new Qr("manifest",e.Fa,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
|
|
762
|
+
function ps(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),qs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,qs(a),k=Gs(h),u(l,Promise.all(kf(k,
|
|
763
|
+
function(m){return m.createSegmentIndex()})),3);qs(a);if(e)throw e;return l["return"](h)})}function rs(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new pf({ib:a.g,onError:c,Fc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,uf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,If(e),3);case 3:return u(f,Gf(e),4);case 4:return f["return"](e)}})}
|
|
764
|
+
function ws(a,b,c,d,e,f,g,h){for(var k=new hs,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,q=m.video;p&&!q&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&q&&(n.g[q.id]=q.bandwidth||m.bandwidth);if(p&&q){var v=p.bandwidth||393216,y=q.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[q.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
|
|
765
|
+
n.set(null,Promise.resolve(null));m=new Map;p=Gs(e);l=new Map;p=t(p);for(q=p.next();!q.done;q=p.next())q=q.value,v=Hs(a,b,c,k,e,q,h,n,m),l.set(q.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
|
|
766
|
+
expiration:d.Sb(),streams:a,sessionIds:h?Nf(d):[],drmInfo:b,appMetadata:g}}
|
|
767
|
+
function Hs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
|
|
768
|
+
tilesLayout:f.tilesLayout},m=f.id;Is(f,e.presentationTimeline.Pa(),function(n){var p=Js(a,b,m,f.id,c,d,n.h,g,h),q=Ks(a,b,m,f.id,c,d,n,g,k);lr(b,m,function(){var v,y;return L(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,q,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
|
|
769
|
+
function Js(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Ti(g.ma(),g.ha,g.ba,h.streaming.retryParameters);b=jr(b,c,h,.5*js(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
|
|
770
|
+
function Ks(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ha,g.ba].join("-");if(k.has(l))return k.get(l);h=Ti(g.ma(),g.ha,g.ba,h.streaming.retryParameters);b=jr(b,c,h,is(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Is(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 qs(a){if(a.m.g)throw new N(2,9,7001);}
|
|
771
|
+
function os(){if(!ls())throw new N(2,9,9E3);}function xs(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return xa(c,0)})}function ns(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
|
|
772
|
+
function Ds(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
|
|
773
|
+
function Cs(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Dr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Bs(d,!1),videoCapabilities:Bs(d,!0)}});return u(h,bs(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)})}
|
|
774
|
+
function Gs(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}
|
|
775
|
+
function us(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",ks);ks.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new xr,ua(b),u(b,Er(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};ks.prototype.list=ks.prototype.list;
|
|
776
|
+
ks.prototype.removeEmeSessions=ks.prototype.Cf;ks.prototype.remove=ks.prototype.remove;ks.prototype.getStoreInProgress=ks.prototype.df;ks.prototype.store=ks.prototype.store;ks.prototype.getNetworkingEngine=ks.prototype.Tb;ks.prototype.getConfiguration=ks.prototype.getConfiguration;ks.prototype.configure=ks.prototype.configure;ks.prototype.destroy=ks.prototype.destroy;ks.support=ls;
|
|
777
|
+
var vs=(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");
|
|
778
|
+
Xl.offline=ls;function Ls(){}function Ms(a,b){for(var c={priority:b||0,Be:a},d=0;d<Ns.length;d++)if(Ns[d].priority<c.priority){Ns.splice(d,0,c);return}Ns.push(c)}M("shaka.polyfill",Ls);Ls.register=Ms;Ls.installAll=function(){for(var a=t(Ns),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Be()}catch(c){Va("Error installing polyfill!",c)}}};var Ns=[];function Os(){}function Ps(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Qs(b.value)}function Qs(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)}})}Ls.Aria=Os;Os.install=Ps;Ms(Ps);function Rs(){}function Ss(){Ts()}Ls.EncryptionScheme=Rs;Rs.install=Ss;Ms(Ss,-2);function Us(){}
|
|
779
|
+
function Vs(){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}}),
|
|
780
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ws);document.addEventListener("webkitfullscreenerror",Ws);document.addEventListener("mozfullscreenchange",Ws);document.addEventListener("mozfullscreenerror",Ws);document.addEventListener("MSFullscreenChange",Ws);document.addEventListener("MSFullscreenError",Ws)}}
|
|
781
|
+
function Ws(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)}Ls.Fullscreen=Us;Us.install=Vs;Ms(Vs);function Xs(){}function Ys(){}Ls.MathRound=Xs;Xs.install=Ys;Ms(Ys);function Zs(){}function $s(){if(zc()||Ac()||Bc()||wc("PlayStation 5")||yc()||xc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),at=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=bt}
|
|
782
|
+
function bt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!sc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=tc(g),!h)||a.audio&&(k=a.audio.contentType,
|
|
783
|
+
l=tc(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};
|
|
784
|
+
n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Ls.MediaCapabilities=Zs;Zs.install=$s;var at=null;Zs.originalMcap=at;Ms($s,-1);function ct(){}function dt(){var a=Dc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?et():a?(ft(),12>=a?(gt(),ht()):gt()):(wc("Tizen 2")||wc("Tizen 3")||wc("Tizen 4"))&&it());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&jt()}
|
|
785
|
+
function gt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function ht(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ft(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
|
|
786
|
+
function it(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=bd(b)[0]&&a(b)}}function et(){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)}}
|
|
787
|
+
function jt(){var a=MediaSource.isTypeSupported;yc()||(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)})}Ls.MediaSource=ct;ct.install=dt;Ms(dt);function kt(){}function lt(){screen.orientation||void 0!=window.orientation&&mt()}function mt(){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 nt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new P("change");b.dispatchEvent(c)})}Ls.Orientation=kt;
|
|
788
|
+
kt.install=lt;function nt(){Ke.call(this);this.type="";this.angle=0}pa(nt,Ke);
|
|
789
|
+
nt.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)};
|
|
790
|
+
nt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ms(lt);function ot(){}function pt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qt,window.MediaKeys=rt,window.MediaKeySystemAccess=st,navigator.requestMediaKeySystemAccess=tt)}function tt(a,b){try{var c=new st(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
791
|
+
function qt(a){var b=this.mediaKeys;b&&b!=a&&ut(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ut(a,this):Promise.resolve()}function vt(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ic(a.subarray(4),!0);a=Lc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}Ls.PatchedMediaKeysApple=ot;ot.install=pt;
|
|
792
|
+
function st(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,
|
|
788
793
|
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;}
|
|
789
|
-
|
|
790
|
-
function
|
|
791
|
-
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.v(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(e.message));e=new P("message",e);c.dispatchEvent(e)});this.j.v(d,"webkitkeyadded",function(){c.h&&(
|
|
792
|
-
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
793
|
-
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}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
|
|
794
|
-
function
|
|
795
|
-
function
|
|
796
|
-
function
|
|
794
|
+
st.prototype.createMediaKeys=function(){var a=new rt(this.keySystem);return Promise.resolve(a)};st.prototype.getConfiguration=function(){return this.g};function rt(a){this.h=new WebKitMediaKeys(a);this.g=new bf}rt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new wt(this.h,a)};rt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
795
|
+
function ut(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.v(b,"webkitneedkey",vt);try{return qi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function wt(a){Ke.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new bf;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new xt}pa(wt,Ke);r=wt.prototype;
|
|
796
|
+
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.v(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(e.message));e=new P("message",e);c.dispatchEvent(e)});this.j.v(d,"webkitkeyadded",function(){c.h&&(yt(c,"usable"),c.h.resolve(),c.h=null)});this.j.v(d,"webkitkeyerror",function(){var e=
|
|
797
|
+
Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:yt(c,"output-not-allowed");break;default:yt(c,"internal-error")}});yt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
798
|
+
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}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 yt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
799
|
+
function xt(){this.size=0;this.g=void 0}r=xt.prototype;r.forEach=function(a){this.g&&a(this.g,ag.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ag.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Ms(pt);function zt(){}function At(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Bt,window.MediaKeySystemAccess=Ct,navigator.requestMediaKeySystemAccess=Dt,HTMLMediaElement.prototype.setMediaKeys=Et)}function Dt(a,b){try{var c=new Ct(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
|
|
800
|
+
function Ft(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Gb(xn(a.initData));this.dispatchEvent(b)}}Ls.PatchedMediaKeysMs=zt;zt.install=At;
|
|
801
|
+
function Ct(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
|
|
797
802
|
!0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
function
|
|
801
|
-
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{this.i=this.l.createSession("video/mp4",Fb(b),null),this.j.v(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(d.message));d=new P("message",d);c.dispatchEvent(d)}),this.j.v(this.i,"mskeyadded",function(){c.g?(
|
|
802
|
-
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:
|
|
803
|
-
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}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
|
|
804
|
-
function
|
|
805
|
-
function
|
|
806
|
-
function
|
|
807
|
-
function
|
|
803
|
+
Ct.prototype.createMediaKeys=function(){var a=new Bt(this.keySystem);return Promise.resolve(a)};Ct.prototype.getConfiguration=function(){return this.g};function Et(a){var b=this.mediaKeys;b&&b!=a&&Gt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Gt(a,this):Promise.resolve()}function Bt(a){this.h=new MSMediaKeys(a);this.g=new bf}
|
|
804
|
+
Bt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ht(this.h,a)};Bt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Gt(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.v(b,"msneedkey",Ft);try{return qi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
|
|
805
|
+
function Ht(a){Ke.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new bf;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new It}pa(Ht,Ke);r=Ht.prototype;
|
|
806
|
+
r.generateRequest=function(a,b){var c=this;this.g=new pc;try{this.i=this.l.createSession("video/mp4",Fb(b),null),this.j.v(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Gb(d.message));d=new P("message",d);c.dispatchEvent(d)}),this.j.v(this.i,"mskeyadded",function(){c.g?(Jt(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Jt(c,"usable"),c.h.resolve(),c.h=null)}),this.j.v(this.i,"mskeyerror",
|
|
807
|
+
function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Jt(c,"output-not-allowed");break;default:Jt(c,"internal-error")}}),Jt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
808
|
+
r.update=function(a){this.h=new pc;try{this.i.update(Fb(a))}catch(b){this.h.reject(b)}return this.h};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}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 Jt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}
|
|
809
|
+
function It(){this.size=0;this.g=void 0}r=It.prototype;r.forEach=function(a){this.g&&a(this.g,ag.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ag.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};Ms(At);function Kt(){}function Lt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Mt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Nt,window.MediaKeys=Ot,window.MediaKeySystemAccess=Pt)}function Mt(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
810
|
+
function Nt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ls.PatchedMediaKeysNop=Kt;Kt.install=Lt;function Ot(){throw new TypeError("Illegal constructor.");}Ot.prototype.createSession=function(){};Ot.prototype.setServerCertificate=function(){};function Pt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Pt.prototype.getConfiguration=function(){};Pt.prototype.createMediaKeys=function(){};Ms(Lt,-10);function Qt(){}function Rt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)St="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Tt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ut;window.MediaKeys=Vt;window.MediaKeySystemAccess=Wt}}
|
|
811
|
+
function Xt(a){var b=St;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Tt(a,b){try{var c=new Wt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ut(a){var b=this.mediaKeys;b&&b!=a&&Yt(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Yt(a,this);return Promise.resolve()}Ls.PatchedMediaKeysWebkit=Qt;Qt.install=Rt;
|
|
812
|
+
function Wt(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
|
|
808
813
|
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"]):
|
|
809
|
-
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;}
|
|
810
|
-
function
|
|
811
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.v(b,c+"keyerror",function(d){var e=
|
|
812
|
-
function
|
|
813
|
-
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
|
|
814
|
-
function
|
|
815
|
-
function
|
|
816
|
-
function
|
|
817
|
-
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=
|
|
818
|
-
r.has=function(a){var b=
|
|
819
|
-
function
|
|
820
|
-
function
|
|
821
|
-
function
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
m=
|
|
825
|
-
p.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var
|
|
826
|
-
Number(
|
|
827
|
-
function
|
|
828
|
-
a=[];if(!y)for(var
|
|
829
|
-
c=b.next();!c.done;c=b.next())c=c.value,
|
|
830
|
-
(g=
|
|
831
|
-
function
|
|
832
|
-
f))a.backgroundColor=g;if(g=
|
|
833
|
-
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=
|
|
834
|
-
function
|
|
835
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&fb(a.textDecoration,"overline")}}function
|
|
836
|
-
function
|
|
837
|
-
function
|
|
838
|
-
function
|
|
839
|
-
function
|
|
840
|
-
function
|
|
841
|
-
var
|
|
842
|
-
end:"end"},
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
[];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
|
|
846
|
-
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");
|
|
814
|
+
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;}Wt.prototype.createMediaKeys=function(){var a=new Vt(this.g);return Promise.resolve(a)};Wt.prototype.getConfiguration=function(){return this.h};function Vt(a){this.l=a;this.h=null;this.g=new bf;this.i=[];this.j=new Map}
|
|
815
|
+
function Yt(a,b){a.h=b;a.g.Ra();var c=St;b&&(a.g.v(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.v(b,c+"keymessage",function(d){var e=Zt(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new P("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.v(b,c+"keyadded",function(d){if(d=Zt(a,d.sessionId))$t(d,"usable"),
|
|
816
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.v(b,c+"keyerror",function(d){var e=Zt(a,d.sessionId);e&&e.handleError(d)}))}Vt.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 au(b,this.l,a);this.i.push(a);return a};Vt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
817
|
+
function Zt(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 au(a,b,c){Ke.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new pc;this.keyStatuses=new bu}pa(au,Ke);r=au.prototype;
|
|
818
|
+
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?$t(this,"output-restricted"):1==b?$t(this,"expired"):$t(this,"internal-error"))};
|
|
819
|
+
function cu(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=Fb(Lc("LOAD_SESSION|"+c));else{var e=Lc("PERSISTENT|");d=Tc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new pc;var f=Xt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
|
|
820
|
+
function du(a,b,c){if(a.g)a.g.then(function(){return du(a,b,c)})["catch"](function(){return du(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Hc(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=Qc(e.keys[0].k);e=Qc(e.keys[0].kid)}else d=Fb(c),e=null;var f=Xt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
821
|
+
function $t(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return cu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?cu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new pc;du(this,b,a);return b};
|
|
822
|
+
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=Xt("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 bu(){this.size=0;this.g=void 0}r=bu.prototype;r.forEach=function(a){this.g&&a(this.g,ag.value())};r.get=function(a){if(this.has(a))return this.g};
|
|
823
|
+
r.has=function(a){var b=ag.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var St="";Ms(Rt);function eu(){}function fu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=gu,Object.defineProperty(a,"disablePictureInPicture",{get:hu,set:iu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ju,document.addEventListener("webkitpresentationmodechanged",ku,!0))}}
|
|
824
|
+
function ku(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)}
|
|
825
|
+
function gu(){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 ju(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
826
|
+
function hu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function iu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ls.PiPWebkit=eu;eu.install=fu;Ms(fu);function lu(){}function mu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=nu)}function nu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ls.StorageEstimate=lu;lu.install=mu;Ms(mu);function ou(){}function pu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ls.VideoPlayPromise=ou;ou.install=pu;Ms(pu);function qu(){}function ru(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||wc("Web0S")&&wc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=su)}}function su(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ls.VideoPlaybackQuality=qu;qu.install=ru;Ms(ru);function tu(){}function uu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vu;else if(6==b)a=wu;else{try{var c=!!vu(1,2,"")}catch(d){c=!1}c&&(a=vu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vu(a,b,c){return new window.TextTrackCue(a,b,c)}function wu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ls.VTTCue=tu;tu.install=uu;Ms(uu);function xu(){}xu.prototype.parseInit=function(){};xu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Hc(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=yu.exec(f))){var g=zu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",xu);xu.prototype.parseMedia=xu.prototype.parseMedia;
|
|
827
|
+
xu.prototype.parseInit=xu.prototype.parseInit;var yu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;fd["application/x-subtitle-lrc"]=function(){return new xu};function Au(){}Au.prototype.parseInit=function(){};
|
|
828
|
+
Au.prototype.parseMedia=function(a,b){var c=Hc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=En(g,Bu,"frameRate"),k=En(g,Bu,"subFrameRate"),l=En(g,Bu,"frameRateMultiplier"),
|
|
829
|
+
m=En(g,Bu,"tickRate"),n=En(g,Bu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=En(g,Cu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Du(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Cn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),q=p.next();!q.done;q=
|
|
830
|
+
p.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;e&&(x=Eu.exec(e)||Fu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=Gu(v,l,"extent"))w=(D=Eu.exec(w))||Fu.exec(w),null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),D||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=Gu(v,l,"origin"))w=(D=Eu.exec(v))||Fu.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=
|
|
831
|
+
Number(w[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(zn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(zn(f,"div"));for(p=e.next();!p.done;p=e.next())if(zn(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Hu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
|
|
832
|
+
function Hu(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(Iu),y=v.next();!y.done&&!(q=Ju(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});
|
|
833
|
+
a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Hu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Ku(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Lu(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
|
|
834
|
+
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 ib(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Ju(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==C})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
|
|
835
|
+
(g=Ju(l,"region",f,"")[0]);Mu(b,p,g,q,e,v,0==a.length);return b}
|
|
836
|
+
function Mu(a,b,c,d,e,f,g){f=f||g;"rtl"==Nu(b,c,e,"direction",f)&&(a.direction="rtl");g=Nu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=jb);(g=Nu(b,c,e,"textAlign",!0))?(a.positionAlign=Ou[g],a.lineAlign=Pu[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=Nu(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Nu(b,c,e,"color",f))a.color=g;if(g=Nu(b,c,e,"backgroundColor",
|
|
837
|
+
f))a.backgroundColor=g;if(g=Nu(b,c,e,"border",f))a.border=g;if(g=Nu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Nu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Nu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Nu(b,c,e,"lineHeight",f))&&g.match(Qu)&&(a.lineHeight=g);(g=Nu(b,c,e,"fontSize",f))&&(g.match(Qu)||g.match(Ru))&&(a.fontSize=g);if(g=Nu(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
|
|
838
|
+
d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Nu(b,c,e,"letterSpacing",f))&&d.match(Qu)&&(a.letterSpacing=d);(d=Nu(b,c,e,"linePadding",f))&&d.match(Qu)&&(a.linePadding=d);if(f=Nu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Gu(c,e,"textDecoration"))&&Su(a,c);(b=Tu(b,e,"textDecoration"))&&Su(a,b)}
|
|
839
|
+
function Su(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")&&fb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&fb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
840
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&fb(a.textDecoration,"overline")}}function Nu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Tu(a,c,d))?a:e?Gu(b,c,d):null}function Gu(a,b,c){if(!a)return null;var d=En(a,Cu,c);return d?d:Uu(a,b,c)}function Tu(a,b,c){var d=En(a,Cu,c);return d?d:Uu(a,b,c)}
|
|
841
|
+
function Uu(a,b,c){a=Ju(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Dn(a[e],"urn:ebu:tt:style",c);f||(f=En(a[e],Cu,c));f||(f=Tu(a[e],b,c));f&&(d=f)}return d}
|
|
842
|
+
function Ju(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Dn(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 Lu(a,b,c,d){a=Ku(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}}
|
|
843
|
+
function Ku(a,b){var c=Vu(a.getAttribute("begin"),b),d=Vu(a.getAttribute("end"),b),e=Vu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
|
|
844
|
+
function Vu(a,b){var c=null;if(Wu.test(a)){c=Wu.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(Xu.test(a))c=Yu(Xu,a);else if(Zu.test(a))c=Yu(Zu,a);else if($u.test(a))c=$u.exec(a),c=Number(c[1])/b.frameRate;else if(av.test(a))c=av.exec(a),c=Number(c[1])/b.g;else if(bv.test(a))c=Yu(bv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
845
|
+
function Yu(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Au);Au.prototype.parseMedia=Au.prototype.parseMedia;Au.prototype.parseInit=Au.prototype.parseInit;function Du(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
846
|
+
var Eu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ru=/^(\d{1,2}(?:\.\d+)?|100)%$/,Qu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Fu=/^(\d+)px (\d+)px$/,Wu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Zu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,$u=/^(\d*(?:\.\d*)?)f$/,av=/^(\d*(?:\.\d*)?)t$/,bv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Pu={left:pb,center:"center",right:"end",start:pb,
|
|
847
|
+
end:"end"},Ou={left:"line-left",center:"center",right:"line-right"},Bu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Iu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];fd["application/ttml+xml"]=function(){return new Au};function cv(){this.g=new Au}cv.prototype.parseInit=function(a){var b=!1;(new kg).box("moov",og).box("trak",og).box("mdia",og).box("minf",og).box("stbl",og).P("stsd",qg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};cv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new kg).box("mdat",rg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",cv);cv.prototype.parseMedia=cv.prototype.parseMedia;
|
|
848
|
+
cv.prototype.parseInit=cv.prototype.parseInit;fd['application/mp4; codecs="stpp"']=function(){return new cv};fd['application/mp4; codecs="stpp.ttml"']=function(){return new cv};fd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new cv};fd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new cv};function dv(){}dv.prototype.parseInit=function(){};
|
|
849
|
+
dv.prototype.parseMedia=function(a,b){var c=Hc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=ev(new Rp(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
|
|
850
|
+
[];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 Rp(g);var h=new kb;Up(g);Sp(g);for(var k=Up(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
|
|
851
|
+
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Sp(g);k=Up(g)}f.push(h)}e=new Map;fv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ib(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
|
|
847
852
|
/^\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=
|
|
848
|
-
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new
|
|
849
|
-
""):h=new ib(m,n,"");
|
|
850
|
-
function
|
|
851
|
-
function
|
|
852
|
-
function
|
|
853
|
-
"italic";break;case "u":e.textDecoration.push("underline")}}if(
|
|
854
|
-
function
|
|
855
|
-
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
856
|
-
function
|
|
857
|
-
|
|
858
|
-
c+q.
|
|
859
|
-
function
|
|
860
|
-
function
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={
|
|
864
|
-
function
|
|
853
|
+
!0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Rp(h[0]);m=ev(k);q=Tp(k,/[ \t]+--\x3e[ \t]+/g);n=ev(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
|
|
854
|
+
""):h=new ib(m,n,"");gv(p,h,e);Sp(k);for(m=Up(k);m;)hv(h,m,f),Sp(k),m=Up(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function fv(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set(c,e)}
|
|
855
|
+
function gv(a,b,c){0===c.size&&fv(c);a=iv(a);var d=Qn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())jv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
|
|
856
|
+
function iv(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 kv(a,b){return a&&0<a.length?a:b}
|
|
857
|
+
function jv(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=kv(h.backgroundColor,e.backgroundColor),e.color=kv(h.color,e.color),e.fontFamily=kv(h.fontFamily,e.fontFamily),e.fontSize=kv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
|
|
858
|
+
"italic";break;case "u":e.textDecoration.push("underline")}}if(Gn(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())jv(a.value,e,c,d)}
|
|
859
|
+
function hv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
|
|
860
|
+
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=lv(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 lv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
861
|
+
function ev(a){a=Tp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",dv);dv.prototype.parseMedia=dv.prototype.parseMedia;dv.prototype.parseInit=dv.prototype.parseInit;fd["text/vtt"]=function(){return new dv};fd['text/vtt; codecs="vtt"']=function(){return new dv};fd['text/vtt; codecs="wvtt"']=function(){return new dv};function mv(){this.g=null}mv.prototype.parseInit=function(a){var b=this,c=!1;(new kg).box("moov",og).box("trak",og).box("mdia",og).P("mdhd",function(d){d=Bh(d.reader,d.version);b.g=d.timescale}).box("minf",og).box("stbl",og).P("stsd",qg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
|
|
862
|
+
mv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new kg).box("moof",og).box("traf",og).P("tfdt",function(B){g=!0;c=Ah(B.reader,B.version).cd}).P("tfhd",function(B){l=zh(B.reader,B.flags).Ud}).P("trun",function(B){h=!0;d=Ch(B.reader,B.version,B.flags).ke}).box("mdat",rg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new hg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Fd||l,y=q.Jc?
|
|
863
|
+
c+q.Jc:m;m=y+(v||0);var x=0;do{var w=n.L();x+=w;var D=n.L(),C=null;"vttc"==sg(D)?8<w&&(C=n.Wa(w-8)):n.skip(w-8);v&&C&&(w=nv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(Qb)};function nv(a,b,c){var d,e,f;(new kg).box("payl",rg(function(g){d=Hc(g)})).box("iden",rg(function(g){e=Hc(g)})).box("sttg",rg(function(g){f=Hc(g)})).parse(a);return d?ov(d,e,f,b,c):null}
|
|
864
|
+
function ov(a,b,c,d,e){d=new ib(d,e,"");gv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rp(c),b=Up(a);b;)hv(d,b,[]),Sp(a),b=Up(a);return d}M("shaka.text.Mp4VttParser",mv);mv.prototype.parseMedia=mv.prototype.parseMedia;mv.prototype.parseInit=mv.prototype.parseInit;fd['application/mp4; codecs="wvtt"']=function(){return new mv};function pv(){}pv.prototype.parseInit=function(){};pv.prototype.parseMedia=function(a){var b=Hc(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 Rp(c[0]),e=qv(d),f=Tp(d,/,/g);d=qv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
865
|
+
function qv(a){a=Tp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.parseInit=pv.prototype.parseInit;fd["text/x-subviewer"]=function(){return new pv};function rv(){this.g=new dv}rv.prototype.parseInit=function(){};rv.prototype.parseMedia=function(a,b){var c=Hc(a);c=sv(c);c=Fb(Lc(c));return this.g.parseMedia(c,b)};function sv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",rv);rv.srt2webvtt=sv;rv.prototype.parseMedia=rv.prototype.parseMedia;
|
|
866
|
+
rv.prototype.parseInit=rv.prototype.parseInit;fd["text/srt"]=function(){return new rv};function tv(){}tv.prototype.parseInit=function(){};
|
|
867
|
+
tv.prototype.parseMedia=function(a){var b="",c="";a=Hc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=uv.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=vv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(wv);else if("Style"==e){e=f.split(wv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
868
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={$c:e.$c},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(wv);else if("Dialogue"==f){g=g.split(wv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xv(f.Start);var k=xv(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.$c=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.$c}}(e)))&&yv(g,f);d.push(g)}return d};
|
|
869
|
+
function yv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=zv(c))a.color=c;if(c=b.BackColour)if(c=zv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
|
|
865
870
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=mb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
|
|
866
|
-
function
|
|
867
|
-
|
|
871
|
+
function zv(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 xv(a){a=Av.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.parseInit=tv.prototype.parseInit;var uv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vv=/^\s*([^:]+):\s*(.*)/,wv=/\s*,\s*/,Av=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
872
|
+
fd["text/x-ssa"]=function(){return new tv};/*
|
|
868
873
|
@license
|
|
869
874
|
EME Encryption Scheme Polyfill
|
|
870
875
|
Copyright 2019 Google LLC
|
|
871
876
|
SPDX-License-Identifier: Apache-2.0
|
|
872
877
|
*/
|
|
873
|
-
function
|
|
874
|
-
function
|
|
878
|
+
function Bv(){}var Cv;function Dv(){Cv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Cv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ev):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
879
|
+
function Ev(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Cv.call(c,a,b),2);d=e.h;if(Fv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Cv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Gv;return e["return"](Gv.call(c,
|
|
875
880
|
a,b))})}
|
|
876
|
-
function
|
|
877
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,
|
|
878
|
-
function
|
|
879
|
-
function
|
|
880
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
881
|
-
function
|
|
882
|
-
new
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
function
|
|
886
|
-
function
|
|
881
|
+
function Gv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Hv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Iv(h.videoCapabilities,d),l=Iv(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."),
|
|
882
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Cv.call(c,a,e),2)}p=q.h;return q["return"](new Jv(p,d))})}function Iv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Bv);Bv.install=Dv;function Kv(){}var Lv;
|
|
883
|
+
function Mv(){Lv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Lv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Nv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
884
|
+
function Nv(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Lv.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Fv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Lv,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
885
|
+
navigator.mediaCapabilities.decodingInfo=Ov;if(d){f.A(3);break}e=c;return u(f,Pv(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](Ov.call(b,a))}})}
|
|
886
|
+
function Ov(a){var b=this,c,d,e,f,g,h,k,l;return L(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=Hv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Lv.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
887
|
+
new Jv(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,Pv(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
|
|
888
|
+
function Pv(a){var b,c;return L(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,
|
|
889
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",Kv);Kv.install=Mv;function Jv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
890
|
+
Jv.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};Jv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
891
|
+
function Hv(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 Fv(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}
|
|
892
|
+
function Qv(){}function Ts(){Dv();Mv()}M("EncryptionSchemePolyfills",Qv);Qv.install=Ts;"undefined"!==typeof module&&module.exports&&(module.exports=Qv);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
887
893
|
|
|
888
894
|
//# sourceMappingURL=shaka-player.compiled.map
|