tcplayer.js 5.3.4-beta.31 → 5.3.4-beta.32
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/CHANGELOG.md +120 -0
- package/dist/font/VideoJS.svg +114 -0
- package/dist/font/VideoJS.ttf +0 -0
- package/dist/font/VideoJS.woff +0 -0
- package/dist/ie8/videojs-ie8.js +2600 -0
- package/dist/ie8/videojs-ie8.min.js +1 -0
- package/dist/lang/ar.js +34 -0
- package/dist/lang/ba.js +26 -0
- package/dist/lang/bg.js +26 -0
- package/dist/lang/ca.js +26 -0
- package/dist/lang/cs.js +26 -0
- package/dist/lang/da.js +26 -0
- package/dist/lang/de.js +84 -0
- package/dist/lang/el.js +40 -0
- package/dist/lang/en.js +100 -0
- package/dist/lang/es.js +27 -0
- package/dist/lang/fa.js +84 -0
- package/dist/lang/fi.js +26 -0
- package/dist/lang/fr.js +84 -0
- package/dist/lang/gl.js +27 -0
- package/dist/lang/he.js +84 -0
- package/dist/lang/hr.js +26 -0
- package/dist/lang/hu.js +26 -0
- package/dist/lang/it.js +26 -0
- package/dist/lang/ja.js +26 -0
- package/dist/lang/ko.js +26 -0
- package/dist/lang/nb.js +26 -0
- package/dist/lang/nl.js +84 -0
- package/dist/lang/nn.js +26 -0
- package/dist/lang/pl.js +34 -0
- package/dist/lang/pt-BR.js +26 -0
- package/dist/lang/pt-PT.js +41 -0
- package/dist/lang/ru.js +84 -0
- package/dist/lang/sk.js +84 -0
- package/dist/lang/sr.js +26 -0
- package/dist/lang/sv.js +26 -0
- package/dist/lang/tr.js +76 -0
- package/dist/lang/uk.js +40 -0
- package/dist/lang/vi.js +84 -0
- package/dist/lang/zh-CN.js +123 -0
- package/dist/lang/zh-TW.js +83 -0
- package/dist/libs/TXLivePlayer-1.3.7.min.js +1 -0
- package/dist/libs/dash.all.min.v3.1.3.js +2 -0
- package/dist/libs/dash.all.min.v5.1.0.js +3 -0
- package/dist/libs/flv.min.1.6.4.js +10 -0
- package/dist/libs/hls.dev.js +36405 -0
- package/dist/libs/hls.min.1.1.8.js +2 -0
- package/dist/libs/hls.min.1.6.7.js +1 -0
- package/dist/libs/hlsp2p.min.1.6.28.js +3 -0
- package/dist/libs/qvbp2p_common.min.1.8.29.js +1 -0
- package/dist/libs/shaka.min.4.15.7.js +1735 -0
- package/dist/libs/tcpcrypto.1.0.0.js +2 -0
- package/dist/libs/vconsole.min.3.3.0.js +10 -0
- package/dist/player.swf +0 -0
- package/dist/plugins/tcplayer-safe-check-plugin.1.0.0.js +2 -0
- package/dist/plugins/tcplayer-vr-plugin.1.0.0.js +2 -0
- package/dist/tcplayer.min.css +1 -0
- package/dist/tcplayer.v5.3.4.min.js +9 -9
- package/package.json +1 -1
|
@@ -0,0 +1,1735 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skipped minification because the original files appears to be already minified.
|
|
3
|
+
* Original file: /npm/shaka-player@4.15.7/dist/shaka-player.compiled.js
|
|
4
|
+
*
|
|
5
|
+
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
6
|
+
*/
|
|
7
|
+
/*
|
|
8
|
+
@license
|
|
9
|
+
Shaka Player
|
|
10
|
+
Copyright 2016 Google LLC
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
*/
|
|
13
|
+
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
|
|
14
|
+
|
|
15
|
+
Copyright The Closure Library Authors.
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
*/
|
|
18
|
+
var p;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
19
|
+
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
|
|
20
|
+
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
21
|
+
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
22
|
+
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
|
|
23
|
+
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ja;
|
|
24
|
+
function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.zm=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
|
|
25
|
+
function ua(a,b){a.i={Sh:b,di:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function F(a,b,c){a.g=c;return{value:b}}qa.prototype.u=function(a){this.g=a};function G(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a,b){a.m=0;a.j=b||0}function Aa(a,b,c){a.g=b;a.m=c||0}function Ba(a,b){a.m=b||0;b=a.i.Sh;a.i=null;return b}function Ca(a){a.A=[a.i];a.m=0;a.j=0}
|
|
26
|
+
function Da(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.di?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Ea(a){this.g=new qa;this.h=a}function Ha(a,b){sa(a.g);var c=a.g.l;if(c)return Ja(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ka(a)}
|
|
27
|
+
function Ja(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,ua(a.g,g),Ka(a)}a.g.l=null;d.call(a.g,f);return Ka(a)}function Ka(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,ua(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.di)throw b.Sh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
28
|
+
function La(a){this.next=function(b){sa(a.g);a.g.l?b=Ja(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ka(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ja(a,a.g.l["throw"],b,a.g.s):(ua(a.g,b),b=Ka(a));return b};this.return=function(b){return Ha(a,b)};this[Symbol.iterator]=function(){return this}}function Ma(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())})}
|
|
29
|
+
function Q(a){return Ma(new La(new Ea(a)))}function Oa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
|
|
30
|
+
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=
|
|
31
|
+
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.m(g)}};
|
|
32
|
+
b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
|
|
33
|
+
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.A=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;
|
|
34
|
+
b.prototype.H=function(g){var h=this.j();g.Le(h.resolve,h.reject)};b.prototype.I=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(q,r){return"function"==typeof q?function(u){try{l(q(u))}catch(w){m(w)}}:r}var l,m,n=new b(function(q,r){l=q;m=r});this.Le(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Le=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
|
|
35
|
+
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).Le(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(w){q[u]=w;r--;0==r&&l(q)}}var q=[],r=0;do q.push(void 0),r++,d(k.value).Le(n(q.length-1),m),k=h.next();
|
|
36
|
+
while(!k.done)})};return b});function Pa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
|
|
37
|
+
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(!Pa(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
38
|
+
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(!Pa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Pa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Pa(k,
|
|
39
|
+
g)&&Pa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Pa(k,g)&&Pa(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
40
|
+
fa("Map",function(a){function b(){var h={};return h.sc=h.next=h.head=h}function c(h,k){var l=h[1];return ha(function(){if(l){for(;l.head!=h[1];)l=l.sc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Pa(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
|
|
41
|
+
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
|
|
42
|
+
m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],sc:this[1].sc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].sc.next=l.entry,this[1].sc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.sc.next=
|
|
43
|
+
h.entry.next,h.entry.next.sc=h.entry.sc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].sc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
|
|
44
|
+
function(h,k){for(var l=this.entries(),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});
|
|
45
|
+
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||
|
|
46
|
+
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;b.prototype[Symbol.iterator]=
|
|
47
|
+
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 Qa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.values",function(a){return a?a:function(){return Qa(this,function(b,c){return c})}});
|
|
48
|
+
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.keys",function(a){return a?a:function(){return Qa(this,function(b){return b})}});
|
|
49
|
+
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;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
|
|
50
|
+
function Ra(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!==Ra(this,b,"includes").indexOf(b,c||0)}});
|
|
51
|
+
fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
|
|
52
|
+
function Sa(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{ai:e,v:f}}return{ai:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Sa(this,b,c).ai}});
|
|
53
|
+
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
|
|
54
|
+
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Sa(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push([d,b[d]]);return c}});
|
|
55
|
+
var Ta="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)Pa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ta});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;})})}});
|
|
56
|
+
fa("Array.prototype.entries",function(a){return a?a:function(){return Qa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ra(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)});
|
|
57
|
+
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Pa(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
|
|
58
|
+
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});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}});var Ua=this||self;
|
|
59
|
+
function T(a,b){a=a.split(".");var c=Ua;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
|
|
60
|
+
@license
|
|
61
|
+
Shaka Player
|
|
62
|
+
Copyright 2016 Google LLC
|
|
63
|
+
SPDX-License-Identifier: Apache-2.0
|
|
64
|
+
*/
|
|
65
|
+
function Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Wa(this.h),Wa(this.j))};function Ya(){}function ab(){}function bb(){}function cb(a){var b=Oa.apply(1,arguments);db.has(a)||(db.add(a),bb.apply(Ya,x(b)))}function eb(){}function fb(){}function gb(){}var db=new Set;
|
|
66
|
+
window.console&&((new Map).set(1,function(){return console.error.apply(console,x(Oa.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,x(Oa.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,x(Oa.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,x(Oa.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,x(Oa.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,x(Oa.apply(0,arguments)))}),
|
|
67
|
+
bb=function(){return console.warn.apply(console,x(Oa.apply(0,arguments)))},ab=function(){console.error.apply(console,x(Oa.apply(0,arguments)))});function hb(){this.g=new Map}p=hb.prototype;p.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};p.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};p.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};p.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};p.size=function(){return this.g.size};p.keys=function(){return Array.from(this.g.keys())};function jb(){this.g=new hb}p=jb.prototype;p.release=function(){this.Ra();this.g=null};p.D=function(a,b,c,d){this.g&&(a=new kb(a,b,c,d),this.g.push(b,a))};p.Aa=function(a,b,c,d){function e(g){f.Ja(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};p.Ja=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.Ja(),this.g.remove(b,e))}};
|
|
68
|
+
p.Ra=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.Ja();this.g.g.clear()}};T("shaka.util.EventManager",jb);jb.prototype.removeAll=jb.prototype.Ra;jb.prototype.unlisten=jb.prototype.Ja;jb.prototype.listenOnce=jb.prototype.Aa;jb.prototype.listen=jb.prototype.D;jb.prototype.release=jb.prototype.release;
|
|
69
|
+
function kb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=lb(a,d);this.target.addEventListener(b,c,this.g)}kb.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function lb(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 nb(a)?b:b.capture||!1}
|
|
70
|
+
function nb(a){var b=ob;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}ob=b}return b||!1}var ob=void 0;T("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function pb(a){this.h=a;this.g=void 0}pb.prototype.value=function(){void 0===this.g&&(this.g=this.h());return this.g};/*
|
|
71
|
+
@license
|
|
72
|
+
Shaka Player
|
|
73
|
+
Copyright 2025 Google LLC
|
|
74
|
+
SPDX-License-Identifier: Apache-2.0
|
|
75
|
+
*/
|
|
76
|
+
function rb(){return sb.value()}var tb=null,ub=null,sb=new pb(function(){var a=void 0;tb&&(a=tb());!a&&ub&&(a=ub());return a});function vb(a,b){this.g=a;this.h=b}vb.prototype.toString=function(){return"v"+this.g+"."+this.h};function wb(a,b){var c=new vb(5,0),d=xb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function yb(a,b,c,d){bb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function zb(a,b,c,d){ab([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var xb=null;/*
|
|
77
|
+
@license
|
|
78
|
+
Copyright 2008 The Closure Library Authors
|
|
79
|
+
SPDX-License-Identifier: Apache-2.0
|
|
80
|
+
*/
|
|
81
|
+
var Ab=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
|
82
|
+
@license
|
|
83
|
+
Copyright 2006 The Closure Library Authors
|
|
84
|
+
SPDX-License-Identifier: Apache-2.0
|
|
85
|
+
*/
|
|
86
|
+
function Bb(a){var b;a instanceof Bb?(Cb(this,a.cc),this.ed=a.ed,Db(this,a.Cb),Eb(this,a.vd),this.ob=a.ob,Fb(this,a.g.clone()),this.Nc=a.Nc):a&&(b=String(a).match(Ab))?(Cb(this,b[1]||"",!0),this.ed=Gb(b[2]||""),Db(this,b[3]||"",!0),Eb(this,b[4]),this.ob=Gb(b[5]||"",!0),Fb(this,b[6]||"",!0),this.Nc=Gb(b[7]||"")):this.g=new Hb(null)}p=Bb.prototype;p.cc="";p.ed="";p.Cb="";p.vd=null;p.ob="";p.Nc="";
|
|
87
|
+
p.toString=function(){var a=[],b=this.cc;b&&a.push(Ib(b,Jb,!0),":");if(b=this.Cb){a.push("//");var c=this.ed;c&&a.push(Ib(c,Jb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.vd;null!=b&&a.push(":",String(b))}if(b=this.ob)this.Cb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ib(b,"/"==b.charAt(0)?Kb:Lb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Nc)&&a.push("#",Ib(b,Mb));return a.join("")};
|
|
88
|
+
p.resolve=function(a){var b=this.clone();"data"===b.cc&&(b=new Bb);var c=!!a.cc;c?Cb(b,a.cc):c=!!a.ed;c?b.ed=a.ed:c=!!a.Cb;c?Db(b,a.Cb):c=null!=a.vd;var d=a.ob;if(c)Eb(b,a.vd);else if(c=!!a.ob){if("/"!=d.charAt(0))if(this.Cb&&!this.ob)d="/"+d;else{var e=b.ob.lastIndexOf("/");-1!=e&&(d=b.ob.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(""):".."==
|
|
89
|
+
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.ob=d:c=""!==a.g.toString();c?Fb(b,a.g.clone()):c=!!a.Nc;c&&(b.Nc=a.Nc);return b};p.clone=function(){return new Bb(this)};function Cb(a,b,c){a.cc=c?Gb(b,!0):b;a.cc&&(a.cc=a.cc.replace(/:$/,""))}function Db(a,b,c){a.Cb=c?Gb(b,!0):b}function Eb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.vd=b}else a.vd=null}
|
|
90
|
+
function Fb(a,b,c){b instanceof Hb?a.g=b:(c||(b=Ib(b,Nb)),a.g=new Hb(b))}function Gb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ib(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ob),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ob(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Hb(a){this.g=a||null}
|
|
91
|
+
function Pb(a){if(!a.fb&&(a.fb=new Map,a.Ld=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}p=Hb.prototype;p.fb=null;p.Ld=null;function Qb(a){Pb(a);return a.Ld}p.add=function(a,b){Pb(this);this.g=null;var c=this.fb.has(a)?this.fb.get(a):null;c||this.fb.set(a,c=[]);c.push(b);this.Ld++;return this};
|
|
92
|
+
p.set=function(a,b){Pb(this);this.g=null;this.fb.has(a)?this.fb.set(a,[b]):this.add(a,b);return this};p.get=function(a){Pb(this);return this.fb.get(a)||[]};p.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var a=[],b=t(this.fb.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.fb.get(d);for(var e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
|
|
93
|
+
p.clone=function(){var a=new Hb;a.g=this.g;if(this.fb){for(var b=new Map,c=t(this.fb),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.fb=b;a.Ld=this.Ld}return a};function Rb(){}function Sb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Tb(a);b=Tb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ub(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
|
|
94
|
+
function Tb(a,b,c){c=void 0===c?Infinity:c;return Vb(a,void 0===b?0:b,c,Uint8Array)}function Xb(a,b,c){c=void 0===c?Infinity:c;return Vb(a,void 0===b?0:b,c,Uint16Array)}function Yb(a,b,c){c=void 0===c?Infinity:c;return Vb(a,void 0===b?0:b,c,DataView)}
|
|
95
|
+
function Vb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}T("shaka.util.BufferUtils",Rb);Rb.toDataView=Yb;Rb.toUint16=Xb;Rb.toUint8=Tb;Rb.toArrayBuffer=Ub;Rb.equal=Sb;function U(a,b,c){var d=Oa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Zb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}U.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};T("shaka.util.Error",U);var Zb=!0;U.Severity={RECOVERABLE:1,CRITICAL:2};U.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
96
|
+
U.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
97
|
+
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,
|
|
98
|
+
WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
|
|
99
|
+
DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,
|
|
100
|
+
DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,
|
|
101
|
+
AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
|
|
102
|
+
LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
|
|
103
|
+
PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,
|
|
104
|
+
KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function $b(){}
|
|
105
|
+
function ac(a){if(!a)return"";a=Tb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!rb().ph())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&ab('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)&&
|
|
106
|
+
128==(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}
|
|
107
|
+
function bc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Yb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return cc(d)}
|
|
108
|
+
function dc(a){function b(d){return c.byteLength<=d||9<=c[d]&&126>=c[d]}if(!a)return"";var c=Tb(a);if(239==c[0]&&187==c[1]&&191==c[2])return ac(c);if(254==c[0]&&255==c[1])return bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return bc(a,!1);if(0==c[1]&&0==c[3])return bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ac(a);throw new U(2,2,2003);}
|
|
109
|
+
function ec(a){if(window.TextEncoder&&!rb().ph()){var b=new TextEncoder;return Ub(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 Ub(b)}function fc(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}function cc(a){return hc.value()(a)}
|
|
110
|
+
function ic(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}T("shaka.util.StringUtils",$b);$b.resetFromCharCode=function(){hc.g=void 0};
|
|
111
|
+
$b.toUTF16=fc;$b.toUTF8=ec;$b.fromBytesAutoDetect=dc;$b.fromUTF16=bc;$b.fromUTF8=ac;var hc=new pb(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={Hc:65536};0<b.Hc;b={Hc:b.Hc},b.Hc/=2)if(a(b.Hc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Hc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Hc));return e}}(b);return null});function jc(){}function kc(a){a=cc(Tb(a));return btoa(a)}function lc(a,b){b=void 0==b?!0:b;a=kc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function mc(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 nc(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}
|
|
112
|
+
function oc(a){var b=Tb(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 pc(){for(var a=Oa.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Tb(e),c);c+=e.byteLength}return b}T("shaka.util.Uint8ArrayUtils",jc);jc.concat=pc;jc.toHex=oc;jc.fromHex=nc;jc.fromBase64=mc;jc.toBase64=lc;
|
|
113
|
+
jc.toStandardBase64=kc;function qc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new Bb(a[0]);b=new Bb(b[0]);b=d.resolve(b);c&&Fb(b,c);return[b.toString()]}b=b.map(function(h){return new Bb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new Bb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&Fb(g,c),d.push(g.toString())}return d}
|
|
114
|
+
function rc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
115
|
+
function sc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=lc(nc(h),!1));var l=g;22!=l.length&&(l=lc(nc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Tb(ec(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
116
|
+
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function tc(a,b){if(1==b.length)return b[0];a=uc(a,b);if(null!=a)return a;throw new U(2,4,4025,b);}function uc(a,b){var c=vc.get(a);c=t(c);for(var 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==wc?"":null}
|
|
117
|
+
function xc(a,b){var c=[];a=vc.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
|
|
118
|
+
var wc="text",yc={Ca:"video",ea:"audio",Ta:wc,Tf:"image",hl:"application"},zc=1/15,vc=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Ac(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.o=d;this.j=!1;a:{"undefined"===typeof libDPIModule&&bb("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,wb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{bb("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(bb("Could not find LCEVC Library on this page"),
|
|
119
|
+
a=!1):(this.h.SupportObject.SupportStatus||bb(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
|
|
120
|
+
function Bc(a,b,c,d){"video"!==d.type||a.o&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.o)}function Cc(a){a.g&&a.i.classList.add("shaka-hidden")}Ac.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Dc(a){return a&&"undefined"!==typeof LCEVCdec?"lvc1"==a.codecs:!1}T("shaka.lcevc.Dec",Ac);Ac.prototype.release=Ac.prototype.release;function Ec(a){if(Fc.has(a))return Fc.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Fc.set(a,b),b):!1}function Gc(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function Hc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Fc=new Map;function Ic(){}Ic.prototype.extract=function(){};Ic.prototype.decode=function(){return[]};Ic.prototype.clear=function(){};Ic.prototype.getStreams=function(){return[]};function Jc(){}Jc.prototype.init=function(){};Jc.prototype.parse=function(){return[]};function Kc(){}p=Kc.prototype;p.init=function(){};p.vf=function(){};p.Fd=function(){};p.remove=function(){};p.Uf=function(){};T("shaka.media.IClosedCaptionParser",Kc);function Lc(a){this.h=new Map;this.i=0;this.j=new Jc;if(a=Mc(a.toLowerCase()))this.j=a();this.g=new Ic;if(a=Nc)this.g=a(),this.h.set(this.i,this.g)}p=Lc.prototype;
|
|
121
|
+
p.init=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?-1:c;if(-1!=c&&this.i!=c){b=c;var d=this.h.get(b);this.h.set(this.i,this.g);if(d)this.g=d;else{if(d=Nc)this.g=d();this.h.set(b,this.g)}}else b||this.Fd();this.j.init(a);-1!=c&&(this.i=c)};p.vf=function(a){a=this.j.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Tb(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};p.Fd=function(){this.g.clear()};
|
|
122
|
+
p.remove=function(a){a=void 0===a?[]:a;a=new Set(a);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=c.value,!a.has(c)){var d=this.h.get(c);d&&d.clear();this.h.delete(c)}};p.Uf=function(){return this.g.getStreams()};function Oc(a,b){Pc.set(a,b)}function Mc(a){return Pc.get(a)}T("shaka.media.ClosedCaptionParser",Lc);Lc.findDecoder=function(){return Nc};Lc.unregisterDecoder=function(){Nc=null};Lc.registerDecoder=function(a){Nc=a};Lc.findParser=Mc;Lc.unregisterParser=function(a){Pc.delete(a)};
|
|
123
|
+
Lc.registerParser=Oc;var Pc=new Map,Nc=null;function Qc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Rc;this.scroll=Sc}T("shaka.text.CueRegion",Qc);var Rc=1;Qc.units={PX:0,PERCENTAGE:Rc,LINES:2};var Sc="";Qc.scrollMode={NONE:Sc,UP:"up"};function Tc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Uc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Vc(a,b,c){c||(c=Tc);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={ei:void 0},d=a.next()){e.ei=d.value;d=b.findIndex(function(f){return function(g){return c(f.ei,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
124
|
+
function Wc(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=Tc);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 Xc(a){this.h=a||"";this.g=0}function Yc(a){Zc(a,/[ \t]+/gm)}function Zc(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function $c(a){return a.g==a.h.length?null:(a=Zc(a,/[^ \t\n]*/gm))?a[0]:null}
|
|
125
|
+
function bd(a){a=Zc(a,cd);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function dd(a){return a?bd(new Xc(a)):null}var cd=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function ed(){}function fd(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=Array.isArray(d);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 WeakSet;return b(a)}function gd(a){var b={},c;for(c in a)b[c]=a[c];return b}
|
|
126
|
+
function hd(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=hd(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],void 0!==e&&(e=hd(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a}T("shaka.util.ObjectUtils",ed);ed.alphabeticalKeyOrderStringify=hd;
|
|
127
|
+
ed.shallowCloneObject=gd;ed.cloneObject=fd;/*
|
|
128
|
+
@license
|
|
129
|
+
tXml
|
|
130
|
+
Copyright 2015 Tobias Nickel
|
|
131
|
+
SPDX-License-Identifier: MIT
|
|
132
|
+
*/
|
|
133
|
+
function id(a,b){var c=void 0===c?!1:c;a=dc(a);return kd(a,b,c)}function kd(a,b,c){a=ld(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function md(a){return nd.has(a)?nd.get(a):""}
|
|
134
|
+
function ld(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
|
|
135
|
+
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64<q&&91>q||96<q&&123>q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
|
|
136
|
+
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(q.startsWith("xmlns:")){r=u;var w=q.split(":")[1];nd.set(r,w);od.set(w,r)}"tt"===m&&"xml:space"===q&&"preserve"===u&&(l=!0);n[q]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
|
|
137
|
+
0;n<m;n++)q=k[n],"string"!==typeof q?b&&(q.parent=l):n==m-1&&"\n"==q&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
|
|
138
|
+
function pd(a){return"string"===typeof a}function qd(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function rd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function sd(a){if("string"===typeof a)return ic(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:ic(a)}
|
|
139
|
+
function td(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=sd(a))&&(a=a.trim());return a}function ud(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())ud(d.value,b,c)}return c}function vd(a,b){a=rd(a,b);return 1!=a.length?null:a[0]}function wd(a,b,c){a=xd(a,b,c);return 1!=a.length?null:a[0]}
|
|
140
|
+
function yd(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function zd(a,b,c){b=md(b);return a.attributes[b+":"+c]||null}function xd(a,b,c){var d=md(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function Ad(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=zd(a,d.value,c))return d;return null}
|
|
141
|
+
function Bd(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function Cd(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)?)?$","i").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}
|
|
142
|
+
function Dd(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 Ed(a){a=Number(a);return 0===a%1?a:null}function Fd(a){a=Number(a);return 0===a%1&&0<a?a:null}function Gd(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Hd(a){a=Number(a);return isNaN(a)?null:a}function Id(a){return a?"true"===a.toLowerCase():!1}
|
|
143
|
+
function Jd(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
144
|
+
function Ld(a){var b=[];a=ic(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,wc:c.split("/@")[1]||
|
|
145
|
+
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].wc=c.slice(1))}return b}
|
|
146
|
+
function Md(a,b){var c=Ld(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Nd(a,"t",d.t)),null!==d.n&&(c=Nd(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.wc)&&a[c]?Od(a[c],e,d,td(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
147
|
+
function Nd(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Od(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
148
|
+
function Pd(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=od.has(b)?od.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Pd(d),b.appendChild(c);return b}
|
|
149
|
+
function Qd(a){if(!a)return null;var b={tagName:a.tagName,attributes:gd(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Qd(c),c.parent=b,b.children.push(c));return b}var nd=new Map,od=new Map;function Rd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Qc;this.position=null;this.positionAlign=Sd;this.size=0;this.textAlign=Ud;this.direction=Vd;this.writingMode=Wd;this.lineInterpretation=Xd;this.line=null;this.lineHeight="";this.lineAlign=Yd;this.displayAlign=Zd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$d;this.fontStyle=ae;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
150
|
+
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Lc:32,rows:15}}function be(a,b){a=new Rd(a,b,"");a.lineBreak=!0;return a}Rd.prototype.clone=function(){var a=new Rd(0,0,""),b;for(b in this)a[b]=this[b],Array.isArray(a[b])&&(a[b]=a[b].slice());return a};
|
|
151
|
+
function ce(a,b){if(a.payload!=b.payload||!(.001>Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Wc(a.nestedCues,b.nestedCues,ce))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(!Wc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
152
|
+
function de(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&fe(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(ie)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
|
|
153
|
+
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=je(c);a.payload="";try{var m=kd("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
|
|
154
|
+
m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())ke(c.value,a,b);else a.payload=ic(c);else a.payload=ic(c)}else a.payload=ic(c)}function fe(a){for(var b=t(Object.entries(le)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(me));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
155
|
+
function je(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
|
|
156
|
+
function ke(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Qc;d.position=null;d.size=0;d.textAlign=Ud;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=ne(g.backgroundColor,h.backgroundColor),h.color=ne(g.color,h.color),h.fontFamily=ne(g.fontFamily,h.fontFamily),
|
|
157
|
+
h.fontSize=ne(g.fontSize,h.fontSize),h.textShadow=ne(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=be(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=oe;break;case "i":d.fontStyle=pe;break;case "u":d.textDecoration.push(qe);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
|
|
158
|
+
if(f=dd(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(pd(a)||1==e.length&&pd(e[0]))for(c=sd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=be(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=ic(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())ke(a.value,d,c)}function ne(a,b){return a&&0<a.length?a:b}T("shaka.text.Cue",Rd);Rd.parseCuePayload=de;Rd.equal=ce;
|
|
159
|
+
Rd.prototype.clone=Rd.prototype.clone;var Sd="auto";Rd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sd};var Ud="center",re={LEFT:"left",RIGHT:"right",CENTER:Ud,START:"start",END:"end"};Rd.textAlign=re;var Zd="after",se={BEFORE:"before",CENTER:"center",AFTER:Zd};Rd.displayAlign=se;var Vd="ltr";Rd.direction={HORIZONTAL_LEFT_TO_RIGHT:Vd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Wd="horizontal-tb";Rd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Wd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
|
|
160
|
+
var Xd=0;Rd.lineInterpretation={LINE_NUMBER:Xd,PERCENTAGE:1};var Yd="start",te={CENTER:"center",START:Yd,END:"end"};Rd.lineAlign=te;var le={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rd.defaultTextColor=le;var me={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rd.defaultTextBackgroundColor=me;var $d=400,oe=700;Rd.fontWeight={NORMAL:$d,BOLD:oe};
|
|
161
|
+
var ae="normal",pe="italic",ue={NORMAL:ae,ITALIC:pe,OBLIQUE:"oblique"};Rd.fontStyle=ue;var qe="underline";Rd.textDecoration={UNDERLINE:qe,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var ie=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ve(){}ve.prototype.destroy=function(){};function we(a,b,c){xe.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,wf:b})}function ye(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ze,Ae,Be,Ce]),e=d.next();!e.done;e=d.next())if(e=xe.get(c+"-"+e.value)){var f=e.wf(),g=f.isSupported(a,b);f.destroy();if(g)return e.wf}return null}T("shaka.transmuxer.TransmuxerEngine",ve);ve.findTransmuxer=ye;ve.unregisterTransmuxer=function(a,b){xe.delete(a.toLowerCase().split(";")[0]+"-"+b)};
|
|
162
|
+
ve.registerTransmuxer=we;ve.prototype.destroy=ve.prototype.destroy;var xe=new Map,Ce=1,Be=2,Ae=3,ze=4;ve.PluginPriority={FALLBACK:Ce,PREFERRED_SECONDARY:Be,PREFERRED:Ae,APPLICATION:ze};function De(){}function Ee(a,b){var c=a;b&&!Fe.includes(a)&&(c+='; codecs="'+b+'"');return c}function Ge(a,b){b&&(a+='; codecs="'+b+'"');return a}function He(a,b,c){var d=Ee(a,b);b=Ge(a,b);ye(b)?(a=ye(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}function Ie(a){return a.split(";")[0].split("/")[1]}
|
|
163
|
+
function Je(a){var b=Ke(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===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:case "ac3"===a:case "ac-3"===a:return"ac-3";
|
|
164
|
+
case "mp4a"===a&&"a6"===b:case "eac3"===a:case "ec-3"===a:return"ec-3";case "ac-4"===a:return"ac-4";case "mp4a"===a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:case "vp9"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";
|
|
165
|
+
case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}function Le(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Ke(c.value),b.push(c[0]);return b.sort().join(",")}function Ne(a){return a.split(";")[0]}function Oe(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Pe(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}
|
|
166
|
+
function Ke(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}T("shaka.util.MimeUtils",De);De.getFullTypeWithAllCodecs=Ge;De.getFullType=Ee;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Fe=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Qe(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function Re(a,b){Se.set(a,b)}function Te(a){return Se.get(a)}function Ue(a){return Se.has(a)?!0:"application/cea-608"==a||"application/cea-708"==a?!!Nc:!1}Qe.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
|
|
167
|
+
function Ve(a,b,c,d,e){var f,g,h,k,l,m,n;return Q(function(q){if(1==q.g)return F(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Tb(b)),q.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Tb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);G(q)})}
|
|
168
|
+
Qe.prototype.remove=function(a,b){var c=this;return Q(function(d){if(1==d.g)return F(d,Promise.resolve(),2);!c.j||!c.j.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));G(d)})};function We(a,b,c){a.l=b;a.m=c}function Xe(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
|
|
169
|
+
function Ye(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ye(a,d.value,c)}
|
|
170
|
+
function Ze(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,[]);Ye(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.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,
|
|
171
|
+
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}T("shaka.text.TextEngine",Qe);Qe.prototype.destroy=Qe.prototype.destroy;Qe.findParser=Te;Qe.unregisterParser=function(a){Se.delete(a)};Qe.registerParser=Re;var Se=new Map;function $e(a){this.h=a;this.g=null}$e.prototype.ia=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};$e.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function af(a){this.h=a;this.g=null}af.prototype.Jb=function(){this.stop();this.h();return this};af.prototype.ia=function(a){var b=this;this.stop();this.g=(new $e(function(){b.h()})).ia(a);return this};af.prototype.Fa=function(a){var b=this;this.stop();this.g=(new $e(function(){b.g.ia(a);b.h()})).ia(a);return this};af.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};T("shaka.util.Timer",af);af.prototype.stop=af.prototype.stop;af.prototype.tickEvery=af.prototype.Fa;
|
|
172
|
+
af.prototype.tickAfter=af.prototype.ia;af.prototype.tickNow=af.prototype.Jb;function bf(a,b){return a.concat(b)}function cf(){}function df(a){return null!=a}function ef(a,b){return Promise.race([b,new Promise(function(c,d){(new af(d)).ia(a)})])};function ff(){}function gf(a,b){a=hf(a);b=hf(b);return a.split("-")[0]==b.split("-")[0]}function jf(a,b){a=hf(a);b=hf(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function kf(a,b){a=hf(a);b=hf(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
|
|
173
|
+
function hf(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=lf.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function mf(a,b){a=hf(a);b=hf(b);return b==a?4:jf(b,a)?3:kf(b,a)?2:jf(a,b)?1:0}function nf(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=lf.get(a)||a}
|
|
174
|
+
function of(a){return a.language?hf(a.language):a.audio&&a.audio.language?hf(a.audio.language):a.video&&a.video.language?hf(a.video.language):"und"}
|
|
175
|
+
function pf(a,b){a=hf(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(hf(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,jf(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,kf(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,jf(a,b))return b;return null}T("shaka.util.LanguageUtils",ff);ff.findClosestLocale=pf;ff.getLocaleForVariant=of;
|
|
176
|
+
ff.getLocaleForText=function(a){return hf(a.language||"und")};ff.getBase=nf;ff.relatedness=mf;ff.areSiblings=function(a,b){var c=nf(a),d=nf(b);return a!=c&&b!=d&&c==d};ff.normalize=hf;ff.isSiblingOf=kf;ff.isParentOf=jf;ff.areLanguageCompatible=gf;ff.areLocaleCompatible=function(a,b){a=hf(a);b=hf(b);return a==b};
|
|
177
|
+
var lf=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",
|
|
178
|
+
"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",
|
|
179
|
+
"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",
|
|
180
|
+
"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",
|
|
181
|
+
"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",
|
|
182
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function qf(){}
|
|
183
|
+
function rf(a,b,c,d,e){function f(y){var z=String(y.width||"")+String(y.height||"")+String(Math.round(y.frameRate||0))+(y.hdr||"")+y.fastSwitching;y.dependencyStream&&(z+=y.dependencyStream.baseOriginalId||"");return z}function g(y){var z=y.language+(y.channelsCount||0)+(y.audioSamplingRate||0)+y.roles.join(",")+y.label+y.groupId+y.fastSwitching;y.dependencyStream&&(z+=y.dependencyStream.baseOriginalId||"");return z}if(e.length){var h=a.textStreams;e=t(e);for(var k=e.next(),l={};!k.done;l={xh:void 0},
|
|
184
|
+
k=e.next())if(l.xh=k.value,k=h.filter(function(y){return function(z){return z.codecs.startsWith(y.xh)||z.mimeType.startsWith(y.xh)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=sf(h,b,c);if(d.length){b=new hb;c=t(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(y,z){y=0;var A=[];z=t(z);for(var C=z.next(),E={};!C.done;E={Rf:void 0},C=z.next())E.Rf=C.value,C=d.filter(function(H){return function(B){return H.Rf.decodingInfos[0][B]}}(E)).length,
|
|
185
|
+
C>y?(y=C,A=[E.Rf]):C==y&&A.push(E.Rf);m.push.apply(m,x(A))});h=m}c=new Set;b=new Set;h=t(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(y,z){return y.bandwidth-z.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var q=l[l.length-1],r=Je(q.codecs),u=Je(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
|
|
186
|
+
n.push(e.id);c.set(k,l)}var w={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(y,z){if(!y.bandwidth||!z.bandwidth||y.bandwidth==z.bandwidth){if(y.codecs&&z.codecs&&y.codecs!=z.codecs&&y.width==z.width){var A=Je(y.codecs),C=Je(z.codecs);if(A!=C)return(w[A]||1)-(w[C]||1)}return y.width-z.width}return y.bandwidth-z.bandwidth});b=Gc();var v=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
|
|
187
|
+
l=c.get(k)||[];if(l.length){q=l[l.length-1];if(!b&&(r=Je(q.codecs),u=Je(e.codecs),r!==u))continue;r=Je(q.codecs);u=Je(e.codecs);r!=u||e.bandwidth&&q.bandwidth&&!(e.bandwidth>q.bandwidth)||(l.push(e),v.push(e.id))}else l.push(e),v.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(y){var z=y.audio;y=y.video;return z&&!n.includes(z.id)||y&&!v.includes(y.id)?!1:!0})}
|
|
188
|
+
function sf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={videoCodec:void 0},d=b.next())if(e.videoCodec=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.videoCodec)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={audioCodec:void 0},b=c.next())if(d.audioCodec=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.audioCodec)}}(d)),b.length){a=b;break}return a}
|
|
189
|
+
function tf(a,b,c){a.variants=a.variants.filter(function(d){return uf(d,b,c)})}
|
|
190
|
+
function uf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
|
|
191
|
+
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function vf(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return F(e,wf(a,b,0<b.offlineSessionIds.length,c,d),2);xf(b);return F(e,yf(b),0)})}
|
|
192
|
+
function wf(a,b,c,d,e){var f,g;return Q(function(h){if(1==h.g)return rb().Pi()&&zf(b.variants),F(h,Af(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Bf(k,f,e);if(!l){var m=[];k.audio&&m.push(Cf(k.audio));k.video&&m.push(Cf(k.video))}return l});G(h)})}
|
|
193
|
+
function zf(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
|
|
194
|
+
function Bf(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=rb(),e="Xbox"===d.Ob();d="MOBILE"===d.La()&&"GECKO"===d.Da();var f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(e&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(e=f&&f.dependencyStream)&&!Dc(e))return!1;a=a.audio;return d&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
|
|
195
|
+
function Df(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g){c=function(m,n){if(m){var q=gd(m);q.supported=m.supported&&n.supported;q.powerEfficient=m.powerEfficient&&n.powerEfficient;q.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!q.keySystemAccess&&(q.keySystemAccess=n.keySystemAccess);return q}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Ke:void 0},g=f.next())k=g.value,h.Ke=hd(k),h.cache=Ef,h.cache.has(h.Ke)?d=c(d,h.cache.get(h.Ke)):e.push(Ff(k).then(function(m){return function(n){var q=
|
|
196
|
+
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())q=c(q,r.value);q&&(m.cache.set(m.Ke,q),d=c(d,q))}}(h)));return F(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);G(l)})}
|
|
197
|
+
function Ff(a){var b=[""];a.video&&(b=Oe(a.video.contentType).split(","));var c=[""];a.audio&&(c=Oe(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={Mc:void 0},g=f.next())g=g.value,h.Mc=fd(a),a.video&&(h.Mc.video.contentType=Ee(Ne(h.Mc.video.contentType),e)),a.audio&&(h.Mc.audio.contentType=Ee(Ne(h.Mc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){("MOBILE"==rb().La()?ef(5,navigator.mediaCapabilities.decodingInfo(k.Mc)):
|
|
198
|
+
navigator.mediaCapabilities.decodingInfo(k.Mc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
|
|
199
|
+
function Af(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H;return Q(function(B){switch(B.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return B.return();f=t(d);g=f.next();h={};case 2:if(g.done){B.u(4);break}h.ui=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){B.u(7);break}n=m.value;q=Gf(n,b,c).filter(function(D){return function(I){I=I[0];return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===D.ui}}(h));r=t(q);u=r.next();case 8:if(u.done){B.u(10);break}w=u.value;
|
|
200
|
+
return F(B,Df(n,w),9);case 9:u=r.next();B.u(8);break;case 10:n.decodingInfos.some(function(D){return D.supported})&&(k=!0);m=l.next();B.u(5);break;case 7:if(k)return B.return();h={ui:void 0};g=f.next();B.u(2);break;case 4:v=t(a),y=v.next();case 12:if(y.done){B.u(0);break}z=y.value;A=Gf(z,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=t(A);E=C.next();case 15:if(E.done){y=v.next();B.u(12);break}H=E.value;return F(B,Df(z,H),
|
|
201
|
+
16);case 16:E=C.next(),B.u(15)}})}
|
|
202
|
+
function Gf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Oe(k);if(l.includes(",")&&!d){var m=l.split(","),n=Ne(k);l=tc("video",m);m=tc("audio",m);m=Hf(m,n);n=He(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=If(l);k={contentType:He(Ne(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||30};if(e.hdr)switch(e.hdr){case "PQ":k.transferFunction=
|
|
203
|
+
"pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Ne(l),l=Hf(Oe(l),k),k=He(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=k.value,l=t(g),n=l.next();!n.done;n=
|
|
204
|
+
l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;n=t(n);for(m=n.next();!m.done;m=n.next()){m=
|
|
205
|
+
m.value;var q=m.videoRobustness+","+m.audioRobustness;l.get(q)||l.set(q,[]);l.get(q).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];q=t(h);for(var r=q.next();!r.done;r=q.next()){r=Object.assign({},r.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},w=t(n),v=w.next();!v.done;v=w.next()){v=v.value;if(v.initData&&v.initData.length){for(var y=new Set,z=t(v.initData),A=z.next();!A.done;A=z.next())y.add(A.value.initDataType);
|
|
206
|
+
u.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");v.persistentStateRequired&&(u.persistentState="required");v.sessionType&&(u.sessionTypes=[v.sessionType]);d&&(u.audio?(v.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||v.encryptionScheme),u.audio.robustness=u.audio.robustness||v.audioRobustness):(u.audio={robustness:v.audioRobustness},v.encryptionScheme&&(u.audio.encryptionScheme=v.encryptionScheme)),""==u.audio.robustness&&
|
|
207
|
+
delete u.audio.robustness);e&&(u.video?(v.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||v.encryptionScheme),u.video.robustness=u.video.robustness||v.videoRobustness):(u.video={robustness:v.videoRobustness},v.encryptionScheme&&(u.video.encryptionScheme=v.encryptionScheme)),""==u.video.robustness&&delete u.video.robustness)}r.keySystemConfiguration=u;m.push(r)}a.push(m)}}return a}
|
|
208
|
+
function Hf(a,b){var c=rb();return"flac"==a.toLowerCase()?"WEBKIT"!=c.Da()?"flac":"fLaC":"opus"===a.toLowerCase()?"WEBKIT"!=c.Da()?"opus":"mp4"==Ie(b)?"Opus":"opus":"ac-3"==a.toLowerCase()&&c.ee()?"ec-3":a}function If(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}
|
|
209
|
+
function xf(a){a.textStreams=a.textStreams.filter(function(b){b=Ee(b.mimeType,b.codecs);return Ue(b)})}
|
|
210
|
+
function yf(a){var b,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(Jf.has(f)){l.u(5);break}g=Kf.get(f);if(!g){Jf.set(f,!1);l.u(5);break}return F(l,Nf(g),7);case 7:h=l.h,Jf.set(f,h);case 5:(k=Jf.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,G(l)}})}
|
|
211
|
+
function Nf(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
|
|
212
|
+
function Of(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),q=n.next();!q.done;q=n.next())m.add(q.value);if(c)for(n=t(c.roles),q=n.next();!q.done;q=n.next())m.add(q.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:l,
|
|
213
|
+
width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,
|
|
214
|
+
originalLanguage:null};if(c){a.videoId=c.id;a.originalVideoId=c.originalId;a.width=c.width||null;a.height=c.height||null;a.frameRate=c.frameRate||null;a.pixelAspectRatio=c.pixelAspectRatio||null;a.videoBandwidth=c.bandwidth||null;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec;if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;
|
|
215
|
+
a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;c=g.split(",");try{a.videoCodec=tc("video",c),a.audioCodec=tc("audio",c)}catch(r){}}}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,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,b=b.dependencyStream)&&
|
|
216
|
+
(a.audioCodec=b.codecs||a.audioCodec);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}function Pf(a){return{id:a.id,active:!1,type:wc,bandwidth:a.bandwidth||0,language:a.language,label:a.label,kind:a.kind||null,mimeType:a.mimeType,codecs:a.codecs||null,primary:a.primary,roles:a.roles,accessibilityPurpose:a.accessibilityPurpose,forced:a.forced,originalTextId:a.originalId,originalLanguage:a.originalLanguage}}
|
|
217
|
+
function Qf(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Rf(a.segmentIndex));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,type:"image",bandwidth:a.bandwidth||0,width:b,height:c,mimeType:a.mimeType,codecs:a.codecs||null,tilesLayout:e||null,originalImageId:a.originalId}}function Sf(a){a.__shaka_id||(a.__shaka_id=Xf++);return a.__shaka_id}
|
|
218
|
+
function Yf(a){var b={id:Sf(a),active:"disabled"!=a.mode,type:wc,bandwidth:0,language:hf(a.language||"und"),label:a.label,kind:a.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==a.kind,originalTextId:a.id,originalLanguage:a.language};"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);return b}
|
|
219
|
+
function Zf(a,b){var c=a?a.language:null;c={id:Sf(a||b),active:a?a.enabled:b.selected,type:"variant",bandwidth:0,language:hf(c||"und"),label:a?a.label:null,kind:a?a.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:a?"main"==a.kind:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,
|
|
220
|
+
spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:b?b.id:null,originalAudioId:a?a.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:c};a&&a.kind&&(c.roles=[a.kind],c.audioRoles=[a.kind]);a&&a.configuration&&(a.configuration.codec&&(c.audioCodec=a.configuration.codec,c.codecs=c.audioCodec),a.configuration.bitrate&&(c.audioBandwidth=a.configuration.bitrate,c.bandwidth+=c.audioBandwidth),a.configuration.sampleRate&&(c.audioSamplingRate=
|
|
221
|
+
a.configuration.sampleRate),a.configuration.numberOfChannels&&(c.channelsCount=a.configuration.numberOfChannels));if(b&&b.configuration&&(b.configuration.codec&&(c.videoCodec=b.configuration.codec,c.codecs=c.codecs?c.codecs+(","+c.videoCodec):c.videoCodec),b.configuration.bitrate&&(c.videoBandwidth=b.configuration.bitrate,c.bandwidth+=c.videoBandwidth),b.configuration.framerate&&(c.frameRate=b.configuration.framerate),b.configuration.width&&(c.width=b.configuration.width),b.configuration.height&&
|
|
222
|
+
(c.height=b.configuration.height),b.configuration.colorSpace&&b.configuration.colorSpace.transfer))switch(b.configuration.colorSpace.transfer){case "pq":c.hdr="PQ";break;case "hlg":c.hdr="HLG";break;case "bt709":c.hdr="SDR"}return c}function $f(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function ag(a){return a.filter(function(b){return $f(b)})}
|
|
223
|
+
function bg(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=pf(hf(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return hf(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=cg(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(bf,[]);return a.length?
|
|
224
|
+
cg(e,a[0]):e}function cg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function dg(a,b){b.length&&(b=b.filter(function(c){return Je(a.codecs)==Je(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
|
|
225
|
+
function Cf(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"}
|
|
226
|
+
function eg(a,b,c){if(0==c.autoShowText)return!1;if(1==c.autoShowText)return!0;var d=hf(c.preferredTextLanguage);b=hf(b.language);if(2==c.autoShowText)return gf(b,d);if(3==c.autoShowText){if(!a)return!1;a=hf(a.language);return gf(b,d)&&!gf(a,b)}bb("Invalid autoShowText setting!");return!1}
|
|
227
|
+
function fg(a){var b={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c?Ne(c):"",codecs:c?Oe(c):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,
|
|
228
|
+
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};d.fullMimeTypes.add(Ee(d.mimeType,d.codecs));c.startsWith("audio/")?(d.type="audio",b.audio=d):b.video=d}return b}T("shaka.util.StreamUtils",qf);qf.meetsRestrictions=uf;
|
|
229
|
+
var Ef=new Map,Xf=0,Jf=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Kf=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function gg(){var a=this;this.G=null;this.o=!1;this.m=new Xa;this.j=new jb;navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.m=new Xa;a.g&&a.m.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.F=[];this.H=1;this.I=!1;this.h=this.l=this.g=this.s=null;this.A=new af(function(){if(a.o&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
|
|
230
|
+
a.chooseVariant();b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.B=window;"documentPictureInPicture"in window&&this.j.D(window.documentPictureInPicture,"enter",function(){a.B=window.documentPictureInPicture.window;a.A&&a.A.Jb();a.j.Aa(a.B,"pagehide",function(){a.B=window;a.A&&a.A.Jb()})});this.C=this.i=null}p=gg.prototype;p.stop=function(){this.G=null;this.o=!1;this.F=[];this.H=1;this.l=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.A.stop();this.C=this.i=null};
|
|
231
|
+
p.release=function(){this.j.release();this.A=null};p.init=function(a){this.G=a};
|
|
232
|
+
p.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;a=this.B.screen.height*c;b=this.B.screen.width*c}if(this.h&&this.g.restrictToElementSize){c=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var d=this.l.clientHeight,e=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(d=this.i.height,e=this.i.width);a=Math.min(a,d*c);b=Math.min(b,e*c)}c=this.F.filter(function(l){return l&&
|
|
233
|
+
!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.F);d=c;c.length!=this.F.length&&(d=this.F.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=hg(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=ig(c);c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=hg(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&
|
|
234
|
+
!c.length&&(c=hg(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];for(var f=isNaN(this.H)?1:Math.abs(this.H),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.s=Date.now();return b};
|
|
235
|
+
p.enable=function(){this.o=!0};p.disable=function(){this.o=!1};p.segmentDownloaded=function(a,b,c,d){var e=a;this.g.removeLatencyFromFirstPacketTime&&d&&1===d.packetNumber&&d.timeToFirstByte&&(e=a-d.timeToFirstByte);e>=this.g.cacheLoadThreshold&&this.m.sample(e,b);c&&null!=this.s&&this.o&&jg(this)};p.trySuggestStreams=function(){null!=this.s&&this.o&&jg(this)};
|
|
236
|
+
p.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.m.getBandwidthEstimate(a);return this.C?this.C.getBandwidthEstimate(a):a};p.setVariants=function(a){this.F=a};p.playbackRateChanged=function(a){this.H=a};
|
|
237
|
+
p.setMediaElement=function(a){function b(){c.A.ia(kg)}var c=this;this.l=a;this.h&&(this.h.disconnect(),this.h=null);this.l&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.l));this.j.D(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.D(c.i,"resize",b))});this.j.D(a,"leavepictureinpicture",function(){c.i&&c.j.Ja(c.i,"resize",b);c.i=null})};p.setCmsdManager=function(a){this.C=a};
|
|
238
|
+
p.configure=function(a){this.g=a;this.m&&this.g&&this.m.configure(this.g.advanced)};function jg(a){if(!a.I){var b=a.m;if(!(b.g>=b.i))return;a.I=!0;a.s-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.s<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.G(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}
|
|
239
|
+
function hg(a,b,c,d,e){if(a.C){var f=a.C.Yh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return uf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function ig(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}T("shaka.abr.SimpleAbrManager",gg);gg.prototype.configure=gg.prototype.configure;
|
|
240
|
+
gg.prototype.setCmsdManager=gg.prototype.setCmsdManager;gg.prototype.setMediaElement=gg.prototype.setMediaElement;gg.prototype.playbackRateChanged=gg.prototype.playbackRateChanged;gg.prototype.setVariants=gg.prototype.setVariants;gg.prototype.getBandwidthEstimate=gg.prototype.getBandwidthEstimate;gg.prototype.trySuggestStreams=gg.prototype.trySuggestStreams;gg.prototype.segmentDownloaded=gg.prototype.segmentDownloaded;gg.prototype.disable=gg.prototype.disable;gg.prototype.enable=gg.prototype.enable;
|
|
241
|
+
gg.prototype.chooseVariant=gg.prototype.chooseVariant;gg.prototype.init=gg.prototype.init;gg.prototype.release=gg.prototype.release;gg.prototype.stop=gg.prototype.stop;var kg=1;T("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function lg(a,b){if(a===b||!a.length||!b.length)return!0;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;if(mg(c))return!0;for(var d=t(b),e=d.next();!e.done;e=d.next())if(e=e.value,c.keySystem===e.keySystem||mg(e))return!0}return!1}
|
|
242
|
+
function ng(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
243
|
+
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}else mg(d)?c.push(d):mg(f)&&c.push(f)}return c}
|
|
244
|
+
function og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function pg(a){return a?!!a.match(/^com\.apple\.fps/):!1}function mg(a){return(a=a.licenseServerUri)?a.startsWith("data:application/json;base64,"):!1}var qg=new pb(function(){return Ub(new Uint8Array([0]))}),rg=new Map;function sg(a,b){var c=tg();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}
|
|
245
|
+
function ug(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(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 F(d,new Promise(function(e){(new af(e)).ia(c/1E3)}),2)}a.h*=a.m;G(d)})}function tg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function vg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}vg.prototype.resolve=function(){};vg.prototype.reject=function(){};function wg(a,b){this.promise=a;this.i=b;this.g=null}function xg(a){return new wg(Promise.reject(a),function(){return Promise.resolve()})}function yg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new wg(a,function(){return Promise.resolve()})}function zg(a){return new wg(Promise.resolve(a),function(){return Promise.resolve()})}function Ag(a){return new wg(a,function(){return a.catch(function(){})})}wg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
|
|
246
|
+
function Bg(a){return new wg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}wg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
247
|
+
wg.prototype.Va=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Cg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new vg;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new wg(f,function(){return d()})};
|
|
248
|
+
function Cg(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()}}}ea.Object.defineProperties(wg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});T("shaka.util.AbortableOperation",wg);wg.prototype.chain=wg.prototype.Va;wg.prototype["finally"]=wg.prototype.finally;
|
|
249
|
+
wg.all=Bg;wg.prototype.abort=wg.prototype.abort;wg.notAbortable=Ag;wg.completed=zg;wg.aborted=yg;wg.failed=xg;function V(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}
|
|
250
|
+
function Dg(a){var b=new V(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}V.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};V.prototype.stopImmediatePropagation=function(){this.g=!0};V.prototype.stopPropagation=function(){};T("shaka.util.FakeEvent",V);
|
|
251
|
+
var Eg={jl:"abrstatuschanged",kl:"adaptation",ll:"audiotrackchanged",ol:"audiotrackschanged",ql:"boundarycrossed",rl:"buffering",ul:"canupdatestarttime",vl:"complete",wl:"currentitemchanged",xl:"downloadcompleted",yl:"downloadfailed",zl:"downloadheadersreceived",Al:"drmsessionupdate",Cl:"emsg",Il:"itemsinserted",Jl:"itemsremoved",Zl:"prft",Error:"error",Dl:"expirationupdated",El:"firstquartile",Fl:"gapjumped",Kl:"keystatuschanged",Ol:"loaded",Pl:"loading",Rl:"manifestparsed",Sl:"manifestupdated",
|
|
252
|
+
Tl:"mediaqualitychanged",Ul:"mediasourcerecovered",Vl:"metadataadded",Metadata:"metadata",Wl:"midpoint",Xl:"nospatialvideoinfo",Yl:"onstatechange",$l:"ratechange",cm:"segmentappended",dm:"sessiondata",em:"spatialvideoinfo",fm:"stalldetected",gm:"started",hm:"statechanged",im:"streaming",jm:"textchanged",lm:"texttrackvisibility",mm:"thirdquartile",nm:"timelineregionadded",om:"timelineregionenter",pm:"timelineregionexit",qm:"trackschanged",sm:"unloading",um:"variantchanged"};function Fg(){this.Ya=new hb;this.ze=this}Fg.prototype.addEventListener=function(a,b){this.Ya&&this.Ya.push(a,b)};Fg.prototype.removeEventListener=function(a,b){this.Ya&&this.Ya.remove(a,b)};Fg.prototype.dispatchEvent=function(a){if(!this.Ya)return!0;var b=this.Ya.get(a.type)||[],c=this.Ya.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.ze;a.currentTarget=this.ze;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
253
|
+
Fg.prototype.release=function(){this.Ya=null};function Gg(){this.g=[]}function Hg(a,b){a.g.push(b.finally(function(){Uc(a.g,b)}))}Gg.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 Ig(a,b,c,d,e,f,g){Fg.call(this);this.i=null;this.j=!1;this.s=new Gg;this.g=new Set;this.h=new Set;this.o=a||null;this.m=b||null;this.A=c||null;this.B=d||null;this.C=e||null;this.G=f||null;this.F=g||null;this.l=new Map}pa(Ig,Fg);p=Ig.prototype;p.configure=function(a){this.i=a};function Jg(a,b,c,d){d=void 0===d?!1:d;c=c||Kg;var e=Lg.get(a);(!e||c>=e.priority)&&Lg.set(a,{priority:c,wf:b,Ak:d})}
|
|
254
|
+
function Mg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Dk=function(a){this.g.add(a)};p.Zk=function(a){this.g.delete(a)};p.kj=function(){this.g.clear()};p.Ek=function(a){this.h.add(a)};p.$k=function(a){this.h.delete(a)};p.lj=function(){this.h.clear()};p.Mh=function(){this.l.clear()};
|
|
255
|
+
function Ng(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.j=!0;this.g.clear();this.h.clear();this.l.clear();Fg.prototype.release.call(this);return this.s.destroy()};
|
|
256
|
+
p.request=function(a,b,c){var d=this,e=new Og;if(this.j){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new Pg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?fd(b.retryParameters):tg();b.uris=fd(b.uris);f=Qg(this,a,b,c);var g=f.Va(function(){return Rg(d,a,b,c,new sg(b.retryParameters,!1),0,null,e)}),h=g.Va(function(q){return Sg(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
257
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Va(function(q){var r=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=r;q.$j||!d.o||u.fromCache||"HEAD"==b.method||a!=Tg||d.o(u.timeMs,u.data.byteLength,Ug(c),b,c);d.F&&d.F(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new Pg(n.promise,function(){return n.abort()},e);Hg(this.s,f);return f};
|
|
258
|
+
function Qg(a,b,c,d){function e(h){f=f.Va(function(){c.body&&(c.body=Ub(c.body));return h(b,c,d)})}var f=zg(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Va(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})}
|
|
259
|
+
function Rg(a,b,c,d,e,f,g,h){a.i.forceHTTP&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.i.forceHTTPS&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new Bb(c.uris[f]),l=k.cc,m=!1;l||(l=location.protocol,l=l.slice(0,-1),Cb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=Lg.get(l))?l.wf:null;if(!n)return xg(new U(2,1,1E3,k));var q=l.Ak;(k=a.l.get(k.Cb))&&(c.headers["common-access-token"]=k);var r=null,u=null,w=!1,v=!1,y;return Ag(ug(e)).Va(function(){if(a.j)return yg();
|
|
260
|
+
y=Date.now();var z=0;c.requestStartTime=Date.now();var A=n(c.uris[f],c,b,function(H,B,D){r&&r.stop();u&&u.ia(E/1E3);a.o&&b==Tg&&(z++,c.packetNumber=z,a.o(H,B,Ug(d),c,d),m=!0,h.g=D)},function(H){v=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.m&&a.m(H,c,b)},{minBytesForProgressEvents:a.i.minBytesForProgressEvents});if(!q)return A;var C=c.retryParameters.connectionTimeout;C&&(r=new af(function(){w=!0;A.abort()}),r.ia(C/1E3));var E=c.retryParameters.stallTimeout;E&&(u=new af(function(){w=!0;A.abort()}));
|
|
261
|
+
return A}).Va(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-y);var A=z.headers["common-access-token"];if(A){var C=new Bb(z.uri);a.l.set(C.Cb,A)}A={response:z,$j:m};!v&&a.m&&a.m(z.headers,c,b);a.A&&a.A(c,z);return A},function(z){r&&r.stop();u&&u.stop();if(a.B){var A=null,C=0;z instanceof U&&(A=z,1001==z.code&&(C=z.data[1]));a.B(c,A,C,w)}if(a.j)return yg();w&&(z=new U(1,1,1003,c.uris[f],b));if(z instanceof U){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity){A=
|
|
262
|
+
(new Map).set("error",z);A=new V("retry",A);A.cancelable=!0;a.dispatchEvent(A);if(A.defaultPrevented)throw z;f=(f+1)%c.uris.length;return Rg(a,b,c,d,e,f,z,h)}}throw z;})}
|
|
263
|
+
function Sg(a,b,c,d){var e=zg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Di:void 0},f=a.next())g.Di=f.value,e=e.Va(function(h){return function(){var k=c.response;k.data&&(k.data=Ub(k.data));return(0,h.Di)(b,k,d)}}(g));return e.Va(function(){return c},function(h){var k=2;if(h instanceof U){if(7001==h.code)throw h;k=h.severity}throw new U(k,1,1007,h);})}function Ug(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}T("shaka.net.NetworkingEngine",Ig);
|
|
264
|
+
Ig.prototype.request=Ig.prototype.request;Ig.prototype.destroy=Ig.prototype.destroy;Ig.makeRequest=Ng;Ig.defaultRetryParameters=function(){return tg()};Ig.prototype.clearCommonAccessTokenMap=Ig.prototype.Mh;Ig.prototype.clearAllResponseFilters=Ig.prototype.lj;Ig.prototype.unregisterResponseFilter=Ig.prototype.$k;Ig.prototype.registerResponseFilter=Ig.prototype.Ek;Ig.prototype.clearAllRequestFilters=Ig.prototype.kj;Ig.prototype.unregisterRequestFilter=Ig.prototype.Zk;
|
|
265
|
+
Ig.prototype.registerRequestFilter=Ig.prototype.Dk;Ig.unregisterScheme=function(a){Lg.delete(a)};Ig.registerScheme=Jg;Ig.prototype.configure=Ig.prototype.configure;function Og(){this.g=0}Ig.NumBytesRemainingClass=Og;function Pg(a,b,c){wg.call(this,a,b);this.h=c}pa(Pg,wg);Ig.PendingRequest=Pg;var Tg=1;Ig.RequestType={MANIFEST:0,SEGMENT:Tg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
|
|
266
|
+
Ig.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Kg=3;Ig.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Kg};var Lg=new Map;function Vg(a){this.g=!1;this.h=new vg;this.i=a}Vg.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 Wg(a,b){if(a.g){if(b instanceof U&&7003==b.code)throw b;throw new U(2,7,7003,b);}};function Xg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Yg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Zg(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 $g(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function ah(a,b){this.h=Yb(a);this.i=b==bh;this.g=0}p=ah.prototype;p.Ga=function(){return this.g<this.h.byteLength};p.Ma=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.X=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw ch();}};p.Ba=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw ch();}};p.T=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw ch();}};
|
|
267
|
+
p.Yg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw ch();}};p.yd=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw ch();}if(2097151<b)throw new U(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Ub=function(a){if(this.g+a>this.h.byteLength)throw ch();var b=Tb(this.h,this.g,a);this.g+=a;return b};
|
|
268
|
+
p.skip=function(a){if(this.g+a>this.h.byteLength)throw ch();this.g+=a};p.Ei=function(a){if(this.g<a)throw ch();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw ch();this.g=a};p.Vc=function(){for(var a=this.g;this.Ga()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Tb(this.h,a,this.g-a);this.g+=1;return ac(a)};function ch(){return new U(2,3,3E3)}T("shaka.util.DataViewReader",ah);ah.prototype.readTerminatedString=ah.prototype.Vc;ah.prototype.seek=ah.prototype.seek;ah.prototype.rewind=ah.prototype.Ei;
|
|
269
|
+
ah.prototype.skip=ah.prototype.skip;ah.prototype.readBytes=ah.prototype.Ub;ah.prototype.readUint64=ah.prototype.yd;ah.prototype.readInt32=ah.prototype.Yg;ah.prototype.readUint32=ah.prototype.T;ah.prototype.readUint16=ah.prototype.Ba;ah.prototype.readUint8=ah.prototype.X;ah.prototype.getLength=ah.prototype.getLength;ah.prototype.getPosition=ah.prototype.Ma;ah.prototype.hasMoreData=ah.prototype.Ga;var bh=1;ah.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:bh};function dh(){this.i=new Map;this.h=new Map;this.g=!1}p=dh.prototype;p.box=function(a,b){a=eh(a);this.i.set(a,fh);this.h.set(a,b);return this};p.R=function(a,b){a=eh(a);this.i.set(a,gh);this.h.set(a,b);return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new ah(a,0);for(this.g=!1;a.Ga()&&!this.g;)this.td(0,a,b,c)};
|
|
270
|
+
p.td=function(a,b,c,d){var e=b.Ma();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.T(),g=b.T(),h=hh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ma()+8>b.getLength()){this.g=!0;return}f=b.yd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==gh){if(d&&b.Ma()+4>b.getLength()){this.g=!0;return}n=b.T();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(g-=b.Ma(),b=0<g?b.Ub(g):new Uint8Array(0),b=new ah(b,0),l({name:h,parser:this,
|
|
271
|
+
partialOkay:c||!1,stopOnPartial:d||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ma(),b.getLength()-b.Ma()))}};function ih(a){for(var b=jh(a);a.reader.Ga()&&!a.parser.g;)a.parser.td(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function kh(a){for(var b=jh(a),c=a.reader.T(),d=0;d<c&&(a.parser.td(a.start+b,a.reader,a.partialOkay,a.stopOnPartial),!a.parser.g);d++);}
|
|
272
|
+
function lh(a){var b=jh(a);for(a.reader.skip(78);a.reader.Ga()&&!a.parser.g;)a.parser.td(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function mh(a){var b=jh(a);a.reader.skip(8);var c=a.reader.Ba();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ga()&&!a.parser.g;)a.parser.td(a.start+b,a.reader,a.partialOkay,a.stopOnPartial)}function nh(a){return function(b){a(b.reader.Ub(b.reader.getLength()-b.reader.Ma()))}}
|
|
273
|
+
function eh(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 hh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function jh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}T("shaka.util.Mp4Parser",dh);dh.headerSize=jh;dh.typeToString=hh;dh.allData=nh;dh.audioSampleEntry=mh;dh.visualSampleEntry=lh;dh.sampleDescription=kh;dh.children=ih;dh.prototype.parseNext=dh.prototype.td;dh.prototype.parse=dh.prototype.parse;
|
|
274
|
+
dh.prototype.stop=dh.prototype.stop;dh.prototype.fullBox=dh.prototype.R;dh.prototype.box=dh.prototype.box;var fh=0,gh=1;function oh(a){var b=this;this.g=[];this.h=[];this.data=[];(new dh).box("moov",ih).box("moof",ih).R("pssh",function(c){if(!(1<c.version)){var d=Tb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(oc(c.reader.Ub(16)));if(0<c.version){d=c.reader.T();for(var e=0;e<d;e++){var f=oc(c.reader.Ub(16));b.h.push(f)}}}}).parse(a)}
|
|
275
|
+
function ph(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Yb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=nc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function qh(a){var b=this;this.C=a;this.j=this.A=null;this.na=this.P=!1;this.I=0;this.g=null;this.o=new jb;this.i=new Map;this.U=[];this.B=new Map;this.K=!1;this.l=new vg;this.h=null;this.s=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.ba=new Map;this.ka=new Map;this.L=new af(function(){return rh(b)});this.N=!1;this.M=[];this.W=!1;this.F=new af(function(){sh(b)});this.l.catch(function(){});this.m=new Vg(function(){return th(b)});this.ha=!1;this.G=this.H=null;this.S=function(){return!1}}
|
|
276
|
+
p=qh.prototype;p.destroy=function(){return this.m.destroy()};function th(a){return Q(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.l.reject(),a.F.stop(),a.F=null,a.L.stop(),a.L=null,F(b,xh(a),2);case 2:if(!a.j){b.u(3);break}xa(b,4);return F(b,a.j.setMediaKeys(null),6);case 6:Aa(b,5);break;case 4:Ba(b);case 5:a.j=null;case 3:a.g=null,a.A=null,a.B=new Map,a.h=null,a.s=function(){},a.C=null,a.ha=!1,a.H=null,G(b)}})}
|
|
277
|
+
p.configure=function(a,b){this.h=a;b&&(this.S=b);this.F&&this.P&&this.g&&this.F.Fa(this.h.updateExpirationTime)};function yh(a,b,c){a.na=!0;a.B=new Map;a.N=c;return zh(a,b,!1)}
|
|
278
|
+
function Ah(a,b,c,d){d=void 0===d?!0:d;a.B=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.B.set(e.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.B.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.N=0<a.B.size;return zh(a,b,d)}
|
|
279
|
+
function Bh(a,b,c,d,e,f){function g(k){k=rc(b,k,null);k.licenseServerUri=c;k.serverCertificate=d;k.persistentStateRequired=!0;k.sessionType="persistent-license";return k}var h=[];f.length&&h.push(f[0].contentType);e.length&&h.push(e[0].contentType);h=fg(h);h.video&&(f=g(f[0].encryptionScheme||""),h.video.drmInfos.push(f));h.audio&&(e=g(e[0].encryptionScheme||""),h.audio.drmInfos.push(e));return Ch(a,[h])}
|
|
280
|
+
function zh(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C;return Q(function(E){if(1==E.g){Dh(a.h.clearKeys,b);d=b.some(function(H){return H.video&&H.video.drmInfos.length||H.audio&&H.audio.drmInfos.length?!0:!1});e=Zg(a.h.servers);f=Zg(a.h.advanced||{});!d&&c&&Eh(b,e);g=new WeakSet;h=t(b);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Fh(l),n=t(m),q=n.next();!q.done;q=n.next())r=q.value,g.has(r)||(g.add(r),Gh(r,e,f,a.h.keySystemsMapping));u=function(H,B){var D=[];H=t(H);for(var I=H.next();!I.done;I=
|
|
281
|
+
H.next()){I=I.value;var K=I[B]||f.has(I.keySystem)&&f.get(I.keySystem)[B]||"",J;if(J=""==K)J=(J=I.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1;J&&("audioRobustness"==B?K=[a.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==B&&(K=[a.h.defaultVideoRobustnessForWidevine]));if("string"===typeof K)D.push(I);else if(Array.isArray(K))for(0===K.length&&(K=[""]),K=t(K),J=K.next();!J.done;J=K.next()){var L={};D.push(Object.assign({},I,(L[B]=J.value,L)))}}return D};w=new WeakSet;v=t(b);for(y=v.next();!y.done;y=
|
|
282
|
+
v.next())z=y.value,z.video&&!w.has(z.video)&&(z.video.drmInfos=u(z.video.drmInfos,"videoRobustness"),z.video.drmInfos=u(z.video.drmInfos,"audioRobustness"),w.add(z.video)),z.audio&&!w.has(z.audio)&&(z.audio.drmInfos=u(z.audio.drmInfos,"videoRobustness"),z.audio.drmInfos=u(z.audio.drmInfos,"audioRobustness"),w.add(z.audio));return F(E,Af(b,a.N,a.ha,a.h.preferredKeySystems),2)}Wg(a.m);A=d||0<e.size;if(!A)return a.P=!0,E.return(Promise.resolve());C=Ch(a,b);return E.return(d?C:C.catch(function(){}))})}
|
|
283
|
+
function Hh(a){var b;return Q(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.H){c.u(2);break}return F(c,a.H,3);case 3:return Wg(a.m),c.return();case 2:return xa(c,4),a.H=a.j.setMediaKeys(a.A),F(c,a.H,6);case 6:Aa(c,5);break;case 4:b=Ba(c),a.s(new U(2,6,6003,b.message));case 5:Wg(a.m),G(c)}})}function Ih(a,b){return Q(function(c){if(1==c.g)return F(c,Hh(a),2);Jh(a,b.initDataType,Tb(b.initData));G(c)})}
|
|
284
|
+
p.fc=function(a){var b=this,c,d;return Q(function(e){if(1==e.g){if(b.j===a)return e.return();if(!b.A)return b.o.Aa(a,"encrypted",function(){b.s(new U(2,6,6010))}),e.return();b.j=a;b.o.Aa(b.j,"play",function(){for(var f=t(b.M),g=f.next();!g.done;g=f.next())Kh(b,g.value);b.W=!0;b.M=[]});b.j.remote?(b.o.D(b.j.remote,"connect",function(){return xh(b)}),b.o.D(b.j.remote,"connecting",function(){return xh(b)}),b.o.D(b.j.remote,"disconnect",function(){return xh(b)})):"webkitCurrentPlaybackTargetIsWireless"in
|
|
285
|
+
b.j&&b.o.D(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return xh(b)});b.G=b.g?b.g.initData.find(function(f){return 0<f.initData.length})||null:null;c=b.g.keySystem;return(d=rb().Qg(c))||!(b.G||b.B.size||b.h.parseInbandPsshEnabled)?(b.o.D(b.j,"encrypted",function(f){return Ih(b,f)}),e.u(2)):F(e,Hh(b),2)}Lh(b).catch(function(){});G(e)})};
|
|
286
|
+
function Mh(a){var b,c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=Ng([a.g.serverCertificateUri],a.h.retryParameters);xa(g,3);c=a.C.pc.request(5,b,{isPreload:a.S()});return F(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Tb(d.data);Aa(g,4);break;case 3:throw e=Ba(g),new U(2,6,6017,e);case 4:if(a.m.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
287
|
+
xa(g,6);return F(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:Aa(g,0);break;case 6:throw f=Ba(g),new U(2,6,6004,f.message);}})}function Nh(a,b){var c,d,e;return Q(function(f){if(1==f.g)return F(f,Oh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Kb=new vg,d.push(e.Kb);d.push(c.remove());return F(f,Promise.all(d),3)}a.i.delete(c);G(f)})}
|
|
288
|
+
function Lh(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!a.B.size)return g.u(2);a.B.forEach(function(h,k){Oh(a,k,h)});return F(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Ph(a))return g.return(a.l);a.K=!1;a.l=new vg;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Jh(a,f.initDataType,f.initData);Qh(a)&&a.l.resolve();return g.return(a.l)})}
|
|
289
|
+
function Jh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Sb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&Sb(c,g.initData)&&(f=!0)});if(f)return}a.K=!0;0<a.i.size&&Qh(a)&&(a.l.resolve(),a.K=!1,a.l=new vg,a.l.catch(function(){}));Rh(a,b,c,a.g.sessionType)}}function Sh(a){a=a.i.keys();a=Xg(a,function(b){return b.sessionId});return Array.from(a)}
|
|
290
|
+
p.Eg=function(){var a=this,b=this.i.keys();b=Xg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.Pd=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};function Th(a){return a.I?a.I:NaN}p.Te=function(){return $g(this.ka)};
|
|
291
|
+
function Ch(a,b){var c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:c=new Map;d=Uh(a,b,c);if(!d){if(!navigator.requestMediaKeySystemAccess)throw new U(2,6,6020);throw new U(2,6,6001);}Wg(a.m);xa(l,2);d.getConfiguration();var m=e=a.h.keySystemsMapping[d.keySystem]||d.keySystem,n=c.get(e),q=[],r=[],u=[],w=[],v=[],y=new Set,z=new Set;Vh(n,q,r,w,u,v,y,z);var A=a.N?"persistent-license":"temporary";m={keySystem:m,encryptionScheme:q[0],licenseServerUri:r[0],distinctiveIdentifierRequired:n[0].distinctiveIdentifierRequired,
|
|
292
|
+
persistentStateRequired:n[0].persistentStateRequired,sessionType:n[0].sessionType||A,audioRobustness:n[0].audioRobustness||"",videoRobustness:n[0].videoRobustness||"",serverCertificate:w[0],serverCertificateUri:u[0],initData:v,keyIds:y};0<z.size&&(m.keySystemUris=z);n=t(n);for(z=n.next();!z.done;z=n.next())z=z.value,z.distinctiveIdentifierRequired&&(m.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(m.persistentStateRequired=z.persistentStateRequired);a.g=
|
|
293
|
+
m;if(!a.g.licenseServerUri)throw new U(2,6,6012,a.g.keySystem);return F(l,d.createMediaKeys(),4);case 4:f=l.h;Wg(a.m);a.A=f;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.A)){l.u(5);break}xa(l,6);return F(l,a.A.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),8);case 8:g=l.h;if("usable"!=g)throw new U(2,6,6018);Wg(a.m);Aa(l,5,2);break;case 6:h=Ba(l,2);if(h instanceof U)throw h;throw new U(2,6,6019,h.message);case 5:return a.P=!0,a.F.Fa(a.h.updateExpirationTime),F(l,Mh(a),9);case 9:Wg(a.m);
|
|
294
|
+
Aa(l,0);break;case 2:k=Ba(l);Wg(a.m,k);a.g=null;if(k instanceof U)throw k;throw new U(2,6,6002,k.message);}})}
|
|
295
|
+
function Uh(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Fh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new U(2,6,6E3);d=a.h.preferredKeySystems;d.length||(e=Zg(a.h.servers),1==e.size&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={wi:void 0},g=e.next()){f.wi=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(q){return q.supported&&
|
|
296
|
+
null!=q.keySystemAccess&&q.keySystemAccess.keySystem==n.wi}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.h.keySystemsMapping[l]&&(m=c.get(a.h.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
|
|
297
|
+
f)return k.keySystemAccess}}}return null}function Wh(a){Qh(a)&&a.l.resolve()}function Xh(a,b){(new af(function(){b.loaded=!0;Wh(a)})).ia(Yh)}
|
|
298
|
+
function Oh(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new U(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(n):Kh(a,n)});a.o.D(d,"keystatuseschange",function(n){return Zh(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Tg:Infinity,Kb:null,type:"persistent-license"};a.i.set(d,f);xa(m,2);return F(m,
|
|
299
|
+
d.load(b),4);case 4:return g=m.h,Wg(a.m),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new U(h,6,6013)),f.loaded=!0),Xh(a,f),Wh(a),m.return(d);case 2:k=Ba(m),Wg(a.m,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new U(l,6,6005,k.message)),f.loaded=!0,Wh(a);case 3:return m.return(Promise.resolve())}})}
|
|
300
|
+
function Rh(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.s(new U(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.W?a.M.push(f):Kh(a,f)});a.o.D(e,"keystatuseschange",function(f){return Zh(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Tg:Infinity,Kb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof U||(b=new U(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&lc(c);e.generateRequest(b,c).catch(function(f){if(!a.m.g){a.i.delete(e);
|
|
301
|
+
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.s(new U(2,6,6006,f.message,f,h))}})}function $h(a){return Q(function(b){return 1==b.g?a.K?F(b,a.l,3):b.u(0):F(b,Promise.all(a.U.map(function(c){return c.promise})),0)})}
|
|
302
|
+
function Kh(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w;Q(function(v){switch(v.g){case 1:c=b.target;a.h.logLicenseExchange&&lc(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=Ng([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
|
|
303
|
+
f.headers[h];if("org.w3.clearkey"===a.g.keySystem){var y=g,z=a.g;try{var A=dc(y.body);if(A){var C=JSON.parse(A);C.type||(C.type=z.sessionType,y.body=ec(JSON.stringify(C)))}}catch(E){}}if(og(a.g.keySystem))if(y=bc(g.body,!0,!0),y.includes("PlayReadyKeyMessage")){y=kd(y,"PlayReadyKeyMessage");z=ud(y,"HttpHeader");z=t(z);for(A=z.next();!A.done;A=z.next())C=A.value,A=ud(C,"name")[0],C=ud(C,"value")[0],g.headers[sd(A)]=sd(C);y=ud(y,"Challenge")[0];g.body=mc(sd(y))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
|
|
304
|
+
k=Date.now();xa(v,2);m=a.C.pc.request(2,g,{isPreload:a.S()});a.U.push(m);return F(v,m.promise,4);case 4:l=v.h;Uc(a.U,m);Aa(v,3);break;case 2:n=Ba(v);if(a.m.g)return v.return();q=new U(2,6,6007,n);1==a.i.size?(a.s(q),d&&d.Kb&&d.Kb.reject(q)):(d&&d.Kb&&d.Kb.reject(q),a.i.delete(c),Qh(a)&&(a.l.resolve(),a.L.ia(.1)));return v.return();case 3:if(a.m.g)return v.return();a.I+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&lc(l.data);xa(v,5);return F(v,c.update(l.data),7);case 7:Aa(v,6);break;case 5:return r=
|
|
305
|
+
Ba(v),u=new U(2,6,6008,r.message),a.s(u),d&&d.Kb&&d.Kb.reject(u),v.return();case 6:if(a.m.g)return v.return();w=new V("drmsessionupdate");a.C.onEvent(w);d&&(d.Kb&&d.Kb.resolve(),Xh(a,d));G(v)}})}
|
|
306
|
+
function Zh(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}h=rb();if(og(a.g.keySystem)&&16==g.byteLength&&h.fh()){h=Yb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=oc(g).slice(0,32);a.ba.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Kb&&(a.i.delete(b),ai(b));Qh(a)&&(a.l.resolve(),
|
|
307
|
+
a.L.ia(bi))}function rh(a){var b=a.ba,c=a.ka;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.s(new U(2,6,6014));a.C.rf($g(c))}
|
|
308
|
+
function ci(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S;return Q(function(ba){if(1==ba.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&
|
|
309
|
+
window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b={};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return ba.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},
|
|
310
|
+
{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs"];r=new Map;u=rb();w=function(W,Fa){var Ga,za,na,va,Ia,ta,ra,wa,Za,$a,ib,qb,mb;return Q(function(Na){switch(Na.g){case 1:return xa(Na,2),F(Na,Fa.createMediaKeys(),5);case 5:Ga=Na.h;case 4:Aa(Na,3);break;case 2:return Ba(Na),Na.return();case 3:na=(za=Fa.getConfiguration().sessionTypes)?
|
|
311
|
+
za.includes("persistent-license"):!1;u.mi()&&(na=!1);va=Fa.getConfiguration().videoCapabilities;Ia=Fa.getConfiguration().audioCapabilities;ta={persistentState:na,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(W)&&r.get(W)?ta=r.get(W):r.set(W,ta);(ra=va[0].encryptionScheme)&&!ta.encryptionSchemes.includes(ra)&&ta.encryptionSchemes.push(ra);(wa=va[0].robustness)&&!ta.videoRobustnessLevels.includes(wa)&&ta.videoRobustnessLevels.push(wa);(Za=Ia[0].robustness)&&
|
|
312
|
+
!ta.audioRobustnessLevels.includes(Za)&&ta.audioRobustnessLevels.push(Za);if("getStatusForPolicy"in Ga){$a=[];ib=t(f);qb=ib.next();for(mb={};!qb.done;mb={Td:void 0},qb=ib.next())mb.Td=qb.value,ta.minHdcpVersions.includes(mb.Td)||$a.push(Ga.getStatusForPolicy({minHdcpVersion:mb.Td}).then(function(Td){return function(gc){"usable"!=gc||ta.minHdcpVersions.includes(Td.Td)||ta.minHdcpVersions.push(Td.Td)}}(mb)));return F(Na,Promise.all($a),0)}Na.u(0)}})};v=function(W,Fa,Ga,za){var na,va,Ia,ta,ra,wa,Za,
|
|
313
|
+
$a,ib,qb,mb;return Q(function(Na){switch(Na.g){case 1:xa(Na,2);na=fd(n);va=t(na.videoCapabilities);for(Ia=va.next();!Ia.done;Ia=va.next())ta=Ia.value,ta.encryptionScheme=Fa,ta.robustness=Ga;ra=t(na.audioCapabilities);for(wa=ra.next();!wa.done;wa=ra.next())Za=wa.value,Za.encryptionScheme=Fa,Za.robustness=za;$a=fd(na);$a.persistentState="required";$a.sessionTypes=["persistent-license"];ib=[$a,na];mb=rb();return"MOBILE"==mb.La()?F(Na,ef(5,navigator.requestMediaKeySystemAccess(W,ib)),7):F(Na,navigator.requestMediaKeySystemAccess(W,
|
|
314
|
+
ib),6);case 6:qb=Na.h;Na.u(5);break;case 7:qb=Na.h;case 5:return F(Na,w(W,qb),8);case 8:Aa(Na,0);break;case 2:Ba(Na),G(Na)}})};y=function(W,Fa,Ga,za){var na,va,Ia,ta;return Q(function(ra){switch(ra.g){case 1:return xa(ra,2),na={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:W,video:{encryptionScheme:Fa,robustness:Ga},audio:{encryptionScheme:Fa,
|
|
315
|
+
robustness:za}}},Ia=rb(),"MOBILE"==Ia.La()?F(ra,ef(5,navigator.mediaCapabilities.decodingInfo(na)),7):F(ra,navigator.mediaCapabilities.decodingInfo(na),6);case 6:va=ra.h;ra.u(5);break;case 7:va=ra.h;case 5:return ta=va.keySystemAccess,F(ra,w(W,ta),8);case 8:Aa(ra,0);break;case 2:Ba(ra),G(ra)}})};z=t(a);for(A=z.next();!A.done;A=z.next())C=A.value,r.set(C,null);E=function(W){return"WEBKIT"===rb().Da()&&"org.w3.clearkey"===W?!1:!0};H=[];B=t(q);for(D=B.next();!D.done;D=B.next())for(I=D.value,K=t(a),J=
|
|
316
|
+
K.next();!J.done;J=K.next())L=J.value,E(L)&&(H.push(v(L,I,"","")),H.push(y(L,I,"","")));N=t(a);for(O=N.next();!O.done;O=N.next())for(M=O.value,P=t(k[M]||[]),R=P.next();!R.done;R=P.next())S=R.value,E(M)&&(H.push(v(M,null,S,"")),H.push(v(M,null,"",S)),H.push(y(M,null,S,"")),H.push(y(M,null,"",S)));return F(ba,Promise.all(H),2)}return ba.return($g(r))})}
|
|
317
|
+
function ai(a){return Q(function(b){if(1==b.g)return xa(b,2),F(b,ef(di,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return Aa(b,0);Ba(b);G(b)})}
|
|
318
|
+
function xh(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return F(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return xa(g,2),a.na||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?F(g,ai(e),5):F(g,e.remove(),5);if(2!=g.g)return Aa(g,0);Ba(g);G(g)})})),0)})}function Fh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
319
|
+
function sh(a){a.i.forEach(function(b,c){var d=b.Tg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Tg=e)})}function Qh(a){a=a.i.values();return Yg(a,function(b){return b.loaded})}function Ph(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.ba.get(c.value))return!1;return!0}
|
|
320
|
+
function Eh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
321
|
+
function Vh(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Ha:void 0},l=a.next()){m.Ha=l.value;b.includes(m.Ha.encryptionScheme)||b.push(m.Ha.encryptionScheme);"org.w3.clearkey"==m.Ha.keySystem&&m.Ha.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ha.licenseServerUri)||k.push(m.Ha.licenseServerUri):c.includes(m.Ha.licenseServerUri)||c.push(m.Ha.licenseServerUri);e.includes(m.Ha.serverCertificateUri)||e.push(m.Ha.serverCertificateUri);m.Ha.serverCertificate&&
|
|
322
|
+
(d.some(function(r){return function(u){return Sb(u,r.Ha.serverCertificate)}}(m))||d.push(m.Ha.serverCertificate));if(m.Ha.initData){l=t(m.Ha.initData);for(var n=l.next(),q={};!n.done;q={Kg:void 0},n=l.next())q.Kg=n.value,f.some(function(r){return function(u){var w=r.Kg;return u.keyId&&u.keyId==w.keyId?!0:u.initDataType==w.initDataType&&Sb(u.initData,w.initData)}}(q))||f.push(q.Kg)}if(m.Ha.keyIds)for(l=t(m.Ha.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ha.keySystemUris&&h)for(m=t(m.Ha.keySystemUris),
|
|
323
|
+
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
|
|
324
|
+
function Gh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
|
|
325
|
+
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}function Dh(a,b){a=Zg(a);if(0!=a.size){a=sc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var di=1,Yh=5,bi=.5;function ei(a,b,c){c=void 0===c?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
|
|
326
|
+
ei.prototype.add=function(a,b){var c=this.h;b=void 0===b?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||2<d.channelsCount||2<e.channelsCount)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!fi(d,e))&&gi(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||fi(c,d))&&gi(c.roles,d.roles)));return d?!1:(this.g.add(a),
|
|
327
|
+
!0)};ei.prototype.values=function(){return this.g.values()};function fi(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Le(d)});b=b.codecs.split(",").map(function(d){return Le(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}
|
|
328
|
+
function gi(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}T("shaka.media.AdaptationSet",ei);T("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function hi(){}hi.prototype.create=function(){};hi.prototype.configure=function(){};hi.prototype.getConfiguration=function(){};T("shaka.media.AdaptationSetCriteria",hi);function ii(){this.g=ji;this.i=(new Map).set(ji,2).set(ki,1);this.h=0}var ki=0,ji=1;/*
|
|
329
|
+
@license
|
|
330
|
+
Shaka Player
|
|
331
|
+
Copyright 2023 Google LLC
|
|
332
|
+
SPDX-License-Identifier: Apache-2.0
|
|
333
|
+
*/
|
|
334
|
+
function li(a,b,c){this.g=a;this.i=b;this.h=c}function mi(a,b){return Q(function(c){if(1==c.g)return F(c,vf(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||rf(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some($f))throw new U(2,4,4032);return c.return(ni(a,b))})}
|
|
335
|
+
function oi(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=uf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}
|
|
336
|
+
function ni(a,b){var c=oi(a,b);if(b){var d=a.h?a.h.g:null;if(d&&a.h.A){for(var e=new Set,f=t(b.variants),g=f.next();!g.done;g=f.next())g=g.value,g.audio&&e.add(g.audio),g.video&&e.add(g.video);e=t(e);for(f=e.next();!f.done;f=e.next())pi(a,d.keySystem,f.value)}qi(a,b)}return c}function pi(a,b,c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Jh(a.h,e.initDataType,e.initData)}}
|
|
337
|
+
function qi(a,b){a=a.h?a.h.Te():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set,h=new Set;b=t(b.variants);for(var k=b.next();!k.done;k=b.next())k=k.value,k.audio&&h.add(k.audio),k.video&&h.add(k.video),k.allowedByApplication?k.allowedByKeySystem&&(d=!0):e=!0;h=t(h);for(b=h.next();!b.done;b=h.next())if(b=b.value,b.keyIds.size)for(b=t(b.keyIds),k=b.next();!k.done;k=b.next()){k=k.value;var l=a[c?"00":k];l?ri.includes(l)&&g.add(l):f.add(k)}if(!d)throw a={hasAppRestrictions:e,
|
|
338
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new U(2,4,4012,a);}var ri=["output-restricted","internal-error"];function si(){}function ti(a,b){ui.set(a,b)}function vi(){var a={};rb();if(wi())for(var b=t(ui.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=wi()?ui.has(c):""!=xi().canPlayType(c);return a}function yi(a,b){if(b){var c=ui.get(b.toLowerCase());if(c)return c}throw new U(2,4,4E3,a,b);}T("shaka.media.ManifestParser",si);
|
|
339
|
+
si.unregisterParserByMime=function(a){ui.delete(a)};si.registerParserByMime=ti;si.registerParserByExtension=function(){wb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};si.AccessibilityPurpose={tm:"visually impaired",Gl:"hard of hearing",bm:"spoken subtitles"};var ui=new Map;function zi(a,b){var c=null,d=null,e=null,f=null,g=a.T();b&1&&(e=a.yd());b&2&&(f=a.T());b&8&&(c=a.T());b&16&&(d=a.T());return{trackId:g,Md:c,Nd:d,gj:e,Fi:f}}function Ai(a,b){return 1==b?(b=a.T(),a=a.T(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.T()}}function Bi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.T();a.skip(4);a=a.Ba();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
340
|
+
function Ci(a,b,c){var d=a.T(),e=[],f=null;c&1&&(f=a.Yg());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={hh:null,sampleSize:null,Bf:null};c&256&&(h.hh=a.T());c&512&&(h.sampleSize=a.T());c&1024&&a.skip(4);c&2048&&(h.Bf=0==b?a.T():a.Yg());e.push(h)}return{ym:d,gh:e,mg:f}}function Di(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Ba();a.skip(2);a.skip(2);a.skip(2);a=a.Ba()+a.Ba()/65536;return{channelCount:b,sampleRate:a}}function Ei(a){a=a.T();return{codec:hh(a)}}
|
|
341
|
+
function Fi(a){var b=null,c=null,d=a.Ub(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.Ba()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Ba();a.Ba();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,oe:c}}
|
|
342
|
+
function Gi(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Hi(a){return(10>a?"0":"")+a};function Ii(a){if(!Ji){Ji=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ki=Li("ftyp",b,d,b,c);b=Li("dref",Mi);Ni=Li("dinf",b)}this.g=a}
|
|
343
|
+
function Oi(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Li;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Pi+1));m=Math.floor(m%(Pi+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Qi(h,4)),[0,0,0,0],x(Qi(n,4)),x(Qi(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Qi(k,2)),[0,0],x(Qi(l,
|
|
344
|
+
2)),[0,0]));h=Li("tkhd",h);k=Li;n=g.duration*g.timescale;l=Math.floor(n/(Pi+1));n=Math.floor(n%(Pi+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Qi(g.timescale,4)),x(Qi(l,4)),x(Qi(n,4)),x(Qi(m,2)),[0,0]));l=Li("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ri;break;case "audio":m=Si}n=Li("hdlr",m);a:{switch(g.type){case "video":g=Li("minf",Li("vmhd",Ti),Ni,Ui(g));break a;
|
|
345
|
+
case "audio":g=Li("minf",Li("smhd",Vi),Ni,Ui(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=pc.apply(jc,x(b));f=a.g[0];c=Li;d=f.duration*f.timescale;e=Math.floor(d/(Pi+1));d=Math.floor(d%(Pi+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Qi(f.timescale,4)),x(Qi(e,4)),x(Qi(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
346
|
+
255]));e=Li("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Qi(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Li("trex",k),h.call(g,k);a=pc.apply(jc,x(d));a=Li("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=pc.apply(jc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Ki.byteLength+
|
|
347
|
+
a.byteLength);b.set(Ki);b.set(a,Ki.byteLength);return b}
|
|
348
|
+
function Ui(a){var b=Li,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=rb().ee()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(0<a.Na.byteLength)var e=Li("avcC",a.Na);else{e=Li;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ab.length;n++){var q=Wi(a.Ab[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),
|
|
349
|
+
f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Qi(c,2)),x(Qi(d,2)),[0,72,0,0,0,72,
|
|
350
|
+
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Xi(a);g=new Uint8Array([]);a.encrypted&&(g=Yi(0,a.stream,a.codecs),d="encv");d=Li(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Na.byteLength&&(c=Li("hvcC",a.Na)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Qi(d,2)),x(Qi(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,
|
|
351
|
+
105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Xi(a),g=new Uint8Array([]),a.encrypted&&(g=Yi(0,a.stream,a.codecs),e="encv"),d=Li(e,d,c,h,g));break;case "audio":if("mp3"==c)a=Li(".mp3",Zi(a));else if("ac-3"==c)c=Li("dac3",a.Ea),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Yi(0,a.stream,a.codecs),d="enca"),a=Li(d,Zi(a),c,e);else if("ec-3"==c)c=Li("dec3",a.Ea),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Yi(0,a.stream,a.codecs),
|
|
352
|
+
d="enca"),a=Li(d,Zi(a),c,e);else if("opus"==c)c=Li("dOps",a.Ea),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Yi(0,a.stream,a.codecs),d="enca"),a=Li(d,Zi(a),c,e);else{if(0<a.Ea.byteLength)c=Li("esds",a.Ea);else{c=Li;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=tc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),
|
|
353
|
+
10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Qi(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Yi(0,a.stream,a.codecs),d="enca");a=Li(d,Zi(a),c,e)}d=a}a=Li("stsd",$i,d);return b("stbl",a,Li("stts",aj),Li("stsc",bj),Li("stsz",cj),Li("stco",dj))}function Xi(a){if(!a.Wa&&!a.Xa)return new Uint8Array([]);var b=a.Xa;a=new Uint8Array([].concat(x(Qi(a.Wa,4)),x(Qi(b,4))));return Li("pasp",a)}
|
|
354
|
+
function Zi(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Qi(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
355
|
+
function Yi(a,b,c){a=Li;c=new Uint8Array([].concat(x(Qi(ej(c.split(".")[0]),4))));c=Li("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(x(Qi(ej(d),4)),[0,1,0,0]));d=Li("schm",d);e=Li;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=t(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Wi(h.value)}b=new Uint8Array([0,0,0,0,0,
|
|
356
|
+
0,1,8]);b=Li("tenc",b,f);return a("sinf",c,d,e("schi",b))}
|
|
357
|
+
function fj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Li;var g=new Uint8Array([0,0,0,0].concat(x(Qi(c.data?c.data.Vb:0,4))));g=Li("mfhd",g);var h;var k=c.data?c.data.yb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.ib<<4|m.kb<<2|m.jb}k=Li("sdtp",l);var n=k.length+92;l=Li;h=new Uint8Array([0,0,0,58].concat(x(Qi(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Li("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
358
|
+
0;var q=Math.floor(m%(Pi+1));m=new Uint8Array([1,0,0,0].concat(x(Qi(Math.floor(m/(Pi+1)),4)),x(Qi(q,4))));m=Li("tfdt",m);var r=n;n=c.data?c.data.yb:[];q=n.length;var u=12+16*q,w=new Uint8Array(u);r+=8+u;w.set(["video"===c.type?1:0,0,15,1].concat(x(Qi(q,4)),x(Qi(r,4))),0);for(r=0;r<q;r++){var v=n[r];u=Qi(v.duration,4);var y=Qi(v.size,4),z=v.flags;v=Qi(v.rb,4);w.set([].concat(x(u),x(y),[z.wb<<2|z.ib,z.kb<<6|z.jb<<4|z.xb,z.hb&61440,z.hb&15],x(v)),12+16*r)}n=Li("trun",w);k=l("traf",h,m,n,k);f=f("moof",
|
|
359
|
+
g,k);e.call(d,b,[f,gj(c)])}return pc.apply(jc,x(b))}function gj(a){a=(a.data?a.data.yb:[]).map(function(b){return b.data});a=pc.apply(jc,x(a));return Li("mdat",a)}function Qi(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Wi(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}function ej(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<8*(a.length-c-1);return b}
|
|
360
|
+
function Li(a){var b=Oa.apply(1,arguments),c=hj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],hj.set(a,c));for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
361
|
+
var Ji=!1,Pi=Math.pow(2,32)-1,hj=new Map,Ri=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Si=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),aj=new Uint8Array([0,0,0,0,0,0,0,0]),bj=new Uint8Array([0,0,0,0,0,0,0,0]),dj=new Uint8Array([0,0,0,0,0,0,0,0]),cj=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ti=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Vi=new Uint8Array([0,
|
|
362
|
+
0,0,0,0,0,0,0]),$i=new Uint8Array([0,0,0,0,0,0,0,1]),Ki=new Uint8Array([]),Mi=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ni=new Uint8Array([]);function ij(a){a=Tb(a);var b=null;(new dh).box("moov",ih).box("trak",ih).box("mdia",ih).box("minf",ih).box("stbl",ih).R("stsd",kh).box("enca",function(c){b=c.reader.h;return mh(c)}).box("sinf",ih).box("frma",function(c){c.parser.stop();"ec-3"===Ei(c.reader).codec&&b&&2!==b.getUint16(16)&&b.setUint16(16,2)}).parse(a);return a}
|
|
363
|
+
function jj(a,b,c){function d(r){n.push({box:r,oi:1701733217})}function e(r){n.push({box:r,oi:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);ih(r)}var h=b=Tb(b),k=!1,l,m=[],n=[];(new dh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).R("stsd",function(r){l=r;m.push(r);kh(r)}).R("encv",f).R("enca",f).R("dvav",e).R("dva1",e).R("dvh1",e).R("dvhe",e).R("dvc1",e).R("dvi1",e).R("hev1",e).R("hvc1",e).R("avc1",e).R("avc3",e).R("ac-3",d).R("ec-3",d).R("ac-4",
|
|
364
|
+
d).R("Opus",d).R("fLaC",d).R("mp4a",d).parse(b);if(k)return b;if(0==n.length||!l)throw gb(oc(b)),new U(2,3,3019,c);n.reverse();c=t(n);for(var q=c.next();!q.done;q=c.next())q=q.value,h=kj(a,h,l,q.box,m,q.oi);return rb().Ai()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
|
|
365
|
+
function lj(a){a=Tb(a);var b=[];(new dh).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(mj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return pc.apply(jc,x(c))}
|
|
366
|
+
function mj(a){function b(n){g.push(n);ih(n)}var c,d,e,f,g=[];(new dh).box("moof",b).box("traf",b).R("tfhd",function(n){c=n;e=zi(n.reader,n.flags)}).R("trun",function(n){d=n;f=Ci(n.reader,n.version,n.flags)}).parse(a);if(e&&2!==e.Fi){var h=c.start+jh(c)+4+(null!==e.gj?8:0),k=Yb(a);if(null!==e.Fi)k.setUint32(h,2);else{nj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&null!==f.mg&&k.setInt32(d.start+jh(d)+4,f.mg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
|
|
367
|
+
4);a.set(l);l=[];for(var m=3;0<=m;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,nj(a,k.start,k.size+4)}}return a}
|
|
368
|
+
function kj(a,b,c,d,e,f){var g=Yi(new Ii([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Yb(a).setUint32(4,f);a.set(g,d.size);nj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=rb().$e()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,nj(f,e.start,e.size+a.byteLength);a=Yb(f,c.start);c=jh(c);b=a.getUint32(c);a.setUint32(c,b+1);return f}
|
|
369
|
+
function nj(a,b,c){a=Yb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
|
|
370
|
+
function oj(a){function b(e){d.push({start:e.start,size:e.size});ih(e)}var c=Tb(a),d=[];(new dh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Yb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);1633889587==h?f.setUint32(g,1700998451):1684103987==h&&f.setUint32(g,1684366131)}}).parse(c);return c};function pj(a,b,c,d,e,f,g,h){this.O=a;this.startByte=b;this.endByte=c;this.rd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.h=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=void 0===h?!1:h}pj.prototype.Bc=function(){return this.startByte};pj.prototype.zc=function(){return this.endByte};pj.prototype.ge=function(a){this.h=a};pj.prototype.Yb=function(){return this.h};
|
|
371
|
+
function qj(a,b){return a===b?!0:a&&b?a.Bc()==b.Bc()&&a.zc()==b.zc()&&Wc(a.O().sort(),b.O().sort())&&Sb(a.Yb(),b.Yb()):a==b}T("shaka.media.InitSegmentReference",pj);pj.prototype.getEndByte=pj.prototype.zc;pj.prototype.getStartByte=pj.prototype.Bc;
|
|
372
|
+
function rj(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w){l=void 0===l?[]:l;r=void 0===r?sj:r;this.startTime=a;this.j=this.endTime=b;this.C=c;this.startByte=d;this.endByte=e;this.Y=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===q?null:q;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.thumbnailSprite=null;this.i=-1;this.A=void 0===w?!1:w;this.F=this.o=!1;a=t(this.g);
|
|
373
|
+
for(b=a.next();!b.done;b=a.next())b.value.ki();this.A&&this.g.length&&this.g[this.g.length-1].ji();this.s=this.bandwidth=this.mimeType=this.codecs=null;this.G=!1}p=rj.prototype;p.O=function(){return this.C()};p.getStartTime=function(){return this.startTime};p.zj=function(){return this.endTime};p.Bc=function(){return this.startByte};p.zc=function(){return this.endByte};p.Vj=function(){return this.tilesLayout};p.Uj=function(){return this.B};p.Cc=function(){return this.status};
|
|
374
|
+
p.qk=function(){this.status=tj};p.Pg=function(){this.preload=!0};p.isPreload=function(){return this.preload};p.qd=function(){this.l=!1};p.fk=function(){return this.l};p.ki=function(){this.o=!0};p.hk=function(){return this.o};p.ji=function(){this.F=!0};p.gk=function(){return this.F};p.ii=function(){this.m=!0};p.bk=function(){return this.m};p.Hf=function(a){this.thumbnailSprite=a};p.Sj=function(){return this.thumbnailSprite};
|
|
375
|
+
p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};p.vh=function(a){null==this.h?ab("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.ge=function(a,b){this.s=a;this.G=void 0===b?!1:b};p.Yb=function(a){var b=this.s;(void 0===a||a)&&this.G&&(this.s=null);return b};
|
|
376
|
+
function uj(a,b){a.Y=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())uj(c.value,b)}T("shaka.media.SegmentReference",rj);rj.prototype.getSegmentData=rj.prototype.Yb;rj.prototype.setSegmentData=rj.prototype.ge;rj.prototype.syncAgainst=rj.prototype.vh;rj.prototype.offset=rj.prototype.offset;rj.prototype.getThumbnailSprite=rj.prototype.Sj;rj.prototype.setThumbnailSprite=rj.prototype.Hf;rj.prototype.hasByterangeOptimization=rj.prototype.bk;rj.prototype.markAsByterangeOptimization=rj.prototype.ii;
|
|
377
|
+
rj.prototype.isLastPartial=rj.prototype.gk;rj.prototype.markAsLastPartial=rj.prototype.ji;rj.prototype.isPartial=rj.prototype.hk;rj.prototype.markAsPartial=rj.prototype.ki;rj.prototype.isIndependent=rj.prototype.fk;rj.prototype.markAsNonIndependent=rj.prototype.qd;rj.prototype.isPreload=rj.prototype.isPreload;rj.prototype.markAsPreload=rj.prototype.Pg;rj.prototype.markAsUnavailable=rj.prototype.qk;rj.prototype.getStatus=rj.prototype.Cc;rj.prototype.getTileDuration=rj.prototype.Uj;
|
|
378
|
+
rj.prototype.getTilesLayout=rj.prototype.Vj;rj.prototype.getEndByte=rj.prototype.zc;rj.prototype.getStartByte=rj.prototype.Bc;rj.prototype.getEndTime=rj.prototype.zj;rj.prototype.getStartTime=rj.prototype.getStartTime;rj.prototype.getUris=rj.prototype.O;var sj=0,tj=1;rj.Status={il:sj,rm:tj,Ql:2};function vj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function wj(a){return!a||vj(a)?null:a.length?a.end(a.length-1):null}function xj(a,b){return!a||!a.length||vj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function yj(a,b){if(!a||!a.length||vj(a))return 0;var c=0;a=t(zj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
379
|
+
function Aj(a,b,c){if(!a||!a.length||vj(a))return null;a=zj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function zj(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 Bj(){}function Cj(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function Dj(a){for(var b=!1,c=a.getElementsByTagName("source"),d=c.length-1;0<=d;--d)a.removeChild(c[d]),b=!0;a.src&&(a.removeAttribute("src"),b=!0);return b}function Ej(a){for(;a.firstChild;)a.removeChild(a.firstChild)}
|
|
380
|
+
function xi(){if(Fj)return Fj;Gj||(Gj=new af(function(){Fj=null}));(Fj=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Fj=document.createElement("video"));Gj.ia(1);return Fj}
|
|
381
|
+
function Hj(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?F(h,document.fonts.ready,2):h.return();if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family===a&&"swap"===f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);G(h)})}
|
|
382
|
+
T("shaka.util.Dom",Bj);Bj.removeAllChildren=Ej;Bj.clearSourceFromVideo=Dj;var Gj=null,Fj=null;/*
|
|
383
|
+
@license
|
|
384
|
+
Shaka Player
|
|
385
|
+
Copyright 2022 Google LLC
|
|
386
|
+
SPDX-License-Identifier: Apache-2.0
|
|
387
|
+
*/
|
|
388
|
+
function Ij(){}function Jj(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Kj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Lj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
389
|
+
function Mj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=ac(Tb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=ac(Tb(a.data,3+c,f)),h;"--\x3e"===d?h=ac(Tb(a.data,4+c+f)):h=Ub(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
390
|
+
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=ac(Tb(a.data,1,d));a=ac(Tb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=ac(Tb(a.data,1,d));a=ac(Tb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=ac(Tb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
391
|
+
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Ub(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ub(a.data),b):null}
|
|
392
|
+
function Nj(a){for(var b=0,c=[];Jj(a,b);){var d=Lj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Lj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Mj(e))&&c.push(f);b+=e.size+10}Kj(a,b)&&(b+=10)}return c}function Oj(a,b){for(var c=b=void 0===b?0:b,d=0;Jj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Lj(a,b+6),Kj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}T("shaka.util.Id3Utils",Ij);Ij.getID3Data=Oj;
|
|
393
|
+
Ij.getID3Frames=Nj;function Pj(a){return(new Date(Date.UTC(1900,0,1,0,0,0,0)+a)).getTime()};/*
|
|
394
|
+
|
|
395
|
+
Copyright Brightcove, Inc.
|
|
396
|
+
|
|
397
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
398
|
+
you may not use this file except in compliance with the License.
|
|
399
|
+
You may obtain a copy of the License at
|
|
400
|
+
|
|
401
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
402
|
+
|
|
403
|
+
Unless required by applicable law or agreed to in writing, software
|
|
404
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
405
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
406
|
+
See the License for the specific language governing permissions and
|
|
407
|
+
limitations under the License.
|
|
408
|
+
*/
|
|
409
|
+
function Qj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Tb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Rj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new ah(c,0)).T(),a.g=8*d,a.i-=d)}function Sj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Rj(a)}a.h<<=b;a.g-=b}
|
|
410
|
+
function Tj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Rj(a);c=b-c;return 0<c?d<<c|Tj(a,c):d}function Uj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Rj(a);return b+Uj(a)}function Vj(a){Sj(a,1+Uj(a))}function X(a){var b=Uj(a);return Tj(a,b+1)-1}function Wj(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Xj(a){return 1===Tj(a,1)}function Yj(a){return Tj(a,8)}
|
|
411
|
+
function Zj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Wj(a),d=(c+d+256)%256),c=0===d?c:d}function ak(a){Yj(a);X(a);return X(a)}T("shaka.util.ExpGolomb",Qj);function bk(){this.H=null;this.I=!1;this.m=this.K=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.F=null;this.l=[];this.A=this.G=this.o=this.s=null}p=bk.prototype;p.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};p.Ff=function(a){null!=this.A&&this.A!=a&&(this.o=this.s=null);this.A=a};
|
|
412
|
+
p.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,ck(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.H=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.H:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ye:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
413
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var r=f[n+1]+2;switch(f[n]){case 5:var u=cc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
414
|
+
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.G={channelCount:0===(u&15)?2:u&15,jj:u,sampleRate:48E3}))}n+=r;q-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Ye&&(g.Ye=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
415
|
+
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.B=f.audioCodec);-1!=f.Ye&&(this.F=f.Ye);d&&!this.I&&(d=!1,e=b-188);this.I=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
416
|
+
break;case this.F:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
417
|
+
function dk(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=ek(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=c.pts!=
|
|
418
|
+
e?ek(d,a.o):d);a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.zk=function(a){wb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Vg(a,{Zd:null,state:null})};
|
|
419
|
+
p.Vg=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.Zd)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
|
|
420
|
+
g)),0<n&&(n=a.subarray(0,n),f.data=pc(f.data,n),f.fullData=pc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.Zd&&(c=k.length?k[k.length-1]:b.Zd)&&(c.data=pc(c.data,a),c.fullData=pc(c.fullData,a));b.state=f;return k};
|
|
421
|
+
p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=pc.apply(jc,x(c.value)),(c=dk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Nj(c.data),dts:c.dts,pts:c.pts});return a};
|
|
422
|
+
p.sb=function(){if(this.i.length&&!this.h.length)for(var a=t(this.i),b=a.next();!b.done;b=a.next()){var c=pc.apply(jc,x(b.value)),d=dk(this,c);b=this.h.length?this.h[this.h.length-1]:null;d&&null!=d.pts&&null!=d.dts&&(!b||b.pts!=d.pts&&b.dts!=d.dts)?this.h.push(d):this.h.length&&(c=d?d.data:c)&&(b=this.h.pop(),b.data=pc(b.data,c),this.h.push(b))}return this.h};
|
|
423
|
+
p.Rc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=t(this.j),c=b.next();!c.done;c=b.next()){var d=pc.apply(jc,x(c.value)),e=dk(this,d);c=this.g.length?this.g[this.g.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?this.g.push(e):this.g.length&&(d=e?e.data:d)&&(c=this.g.pop(),c.data=pc(c.data,d),this.g.push(c))}if(a){b={Zd:null,state:null};c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())e=e.value,e.nalus=this.Vg(e,b),e.nalus.length&&(c.push(e),
|
|
424
|
+
b.Zd=e.nalus[e.nalus.length-1]);this.g=c}}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.sb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Rc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Od=function(){return{audio:this.B,video:this.m}};p.Xe=function(){for(var a=[],b=t(this.Rc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};
|
|
425
|
+
p.Yj=function(){wb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ig();return{height:a.height,width:a.width}};p.Ig=function(){return"hvc"==this.m?fk(this):gk(this)};function pk(a){var b=a.Rc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
|
|
426
|
+
function gk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Xe();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new Qj(c.data);var d=Yj(c),e=Yj(c),f=Yj(c);Vj(c);if(qk.includes(d)){var g=X(c);3===g&&Sj(c,1);Vj(c);Vj(c);Sj(c,1);if(Xj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Xj(c)&&(6>h?Zj(c,16):Zj(c,64))}}Vj(c);g=X(c);if(0===g)X(c);else if(1===g)for(Sj(c,1),Vj(c),Vj(c),g=X(c),h=0;h<g;h++)Vj(c);Vj(c);Sj(c,1);g=X(c);h=X(c);var k=Tj(c,1);0===k&&Sj(c,1);Sj(c,
|
|
427
|
+
1);var l=0,m=0,n=0,q=0;Xj(c)&&(l=X(c),m=X(c),n=X(c),q=X(c));b.height=String((2-k)*(h+1)*16-2*n-2*q);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=pk(a);return b}
|
|
428
|
+
function fk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Xe();if(!c.length)return b;c=c.find(function(E){return 33==E.type});if(!c)return b;var d=new Qj(c.fullData,!0);Yj(d);Yj(d);Tj(d,4);var e=Tj(d,3);Xj(d);var f=Tj(d,2),g=Tj(d,1),h=Tj(d,5),k=Tj(d,32);c=Yj(d);for(var l=Yj(d),m=Yj(d),n=Yj(d),q=Yj(d),r=Yj(d),u=Yj(d),w=[],v=[],y=0;y<e;y++)w.push(Xj(d)),v.push(Xj(d));if(0<e)for(y=e;8>y;y++)Tj(d,2);for(y=0;y<e;y++)w[y]&&Tj(d,88),v[y]&&Yj(d);X(d);e=X(d);3==e&&Tj(d,1);w=X(d);v=X(d);var z=
|
|
429
|
+
y=0,A=0,C=0;Xj(d)&&(y+=X(d),z+=X(d),A+=X(d),C+=X(d));b.width=String(w-(y+z)*(1===e||2===e?2:1));b.height=String(v-(A+C)*(1===e?2:1));d=function(E){for(var H=0,B=0;32>B;B++)H|=(E>>B&1)<<31-B;return H>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
|
|
430
|
+
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=pk(a);return b}function ek(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function rk(a){return 0>ck(a)?!1:!0}function ck(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}T("shaka.util.TsParser",bk);bk.syncOffset=ck;bk.probe=rk;bk.prototype.getVideoInfo=bk.prototype.Ig;bk.prototype.getVideoResolution=bk.prototype.Yj;
|
|
431
|
+
bk.prototype.getVideoNalus=bk.prototype.Xe;bk.prototype.getCodecs=bk.prototype.Od;bk.prototype.getStartTime=bk.prototype.getStartTime;bk.prototype.getVideoData=bk.prototype.Rc;bk.prototype.getAudioData=bk.prototype.sb;bk.prototype.getMetadata=bk.prototype.getMetadata;bk.prototype.parseNalus=bk.prototype.Vg;bk.prototype.parseAvcNalus=bk.prototype.zk;bk.prototype.parse=bk.prototype.parse;bk.prototype.setDiscontinuitySequence=bk.prototype.Ff;bk.prototype.clearData=bk.prototype.clearData;
|
|
432
|
+
bk.Timescale=9E4;var qk=[100,110,122,244,44,83,86,118,128,138,139,134];function sk(a,b,c,d,e){var f=this;this.g=a;this.N=c;this.A=d;this.ha=b;this.l=new Map;this.C=new Map;this.Oa=new Map;this.h=null;this.Ka=!1;this.M=e||null;this.o=new Map;this.s=new jb;this.j=new Map;this.I=null;this.K=new vg;this.za="";this.eb=!1;this.ya=!0;this.L=!1;this.B=this.P=null;this.i=tk(this,this.K);this.Ya=this.F=!1;this.H=new Vg(function(){return uk(f)});this.G=!1;this.W="UNKNOWN";this.Za=this.ab=!1;this.Pa=new vg;this.m=!1;this.wa=null;this.ba=new Map;this.na=this.S=this.va=this.U=null;
|
|
433
|
+
this.ka=new vg;this.g.remote&&(this.L="disconnected"!=this.g.remote.state,this.s.D(this.g.remote,"connect",function(){f.L="disconnected"!=f.g.remote.state}),this.s.D(this.g.remote,"connecting",function(){f.L="disconnected"!=f.g.remote.state}),this.s.D(this.g.remote,"disconnect",function(){f.L="disconnected"!=f.g.remote.state}))}
|
|
434
|
+
function tk(a,b){a.ya=!0;if(window.ManagedMediaSource){a.B||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ya=!0});a.s.D(c,"endstreaming",function(){a.ya=!1})}else c=new MediaSource;a.s.Aa(c,"sourceopen",function(){URL.revokeObjectURL(a.za);b.resolve()});a.s.Aa(a.g,"playing",function(){a.eb=!0});a.za=vk(c);a.A.useSourceElements?(a.g.removeAttribute("src"),a.P&&a.g.removeChild(a.P),a.B&&a.g.removeChild(a.B),a.P=Cj(a.za),a.g.appendChild(a.P),a.B&&a.g.appendChild(a.B),
|
|
435
|
+
a.g.load()):a.g.src=a.za;return c}function wk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&a.A.useSourceElements&&(a.B&&a.g.removeChild(a.B),a.B=Cj(b,c),a.g.appendChild(a.B),a.g.disableRemotePlayback=!1)}
|
|
436
|
+
function xk(){var a='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",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Fe)),b=
|
|
437
|
+
{};rb();a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;Ue(c)?b[c]=!0:b[c]=wi()?Ec(c)||(ye(c)?!0:!1):""!=xi().canPlayType(c);var d=c.split(";")[0];b[d]=b[d]||b[c]}return b}p=sk.prototype;p.destroy=function(){return this.H.destroy()};
|
|
438
|
+
function uk(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,w;return Q(function(v){if(1==v.g){b=[];c=t(a.o);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.o.set(l,h.slice(0,1)),k&&b.push(k.p.catch(cf)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())q=n.value,q.p.reject(new U(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return F(v,Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())w=u.value,w.destroy();a.s&&(a.s.release(),a.s=null);a.g&&a.B&&
|
|
439
|
+
a.g.removeChild(a.B);a.g&&a.P&&(a.g.removeChild(a.P),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.P=null;a.B=null;a.A=null;a.i=null;a.h=null;a.ha=null;a.l.clear();a.Oa.clear();a.j.clear();a.I=null;a.o.clear();a.M=null;a.ba.clear();a.N=null;G(v)})}
|
|
440
|
+
p.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return f=yc,F(n,e.K,2);if(3!=n.g){if(!yk(e)&&!zk(e))return n.u(3);ab("Expected MediaSource to be open during init(); reopening the media source.");e.K=new vg;e.i=tk(e,e.K);return F(n,e.K,3)}e.G=b;e.W=c;e.ab=d;e.Za=!e.G&&"HLS"==e.W&&!e.ab;e.ba.clear();e.U=null;e.va=null;e.S=null;e.na=null;e.ka=new vg;g=t(a.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=
|
|
441
|
+
a.get(k),Ak(e,k,l,l.codecs),e.m?(e.o.set(f.ea,[]),e.o.set(f.Ca,[])):e.o.set(k,[]);(m=a.get(f.ea))&&m.isAudioMuxedInVideo&&(e.m=!0);G(n)})};
|
|
442
|
+
function Ak(a,b,c,d){"audio"==b&&d&&(d=Hf(d,c.mimeType));var e=Ee(c.mimeType,d);if(b==wc)Bk(a,e,a.G,c.external);else{var f=a.A.forceTransmux;if(!Ec(e)||!a.G&&Fe.includes(e))f=!0;var g=Ge(c.mimeType,d);if(f){f=uc("audio",(d||"").split(","));d=uc("video",(d||"").split(","));if(f&&d){a.m=!0;Ak(a,"audio",c,f);Ak(a,"video",c,d);return}if(d=ye(g))e=d(),a.j.set(b,e),e=e.convertCodecs(b,g)}g=e+a.A.addExtraFeaturesToSourceBuffer(e);Wg(a.H);try{var h=a.i.addSourceBuffer(g)}catch(k){throw new U(2,3,3015,k,"The mediaSource_ status was "+
|
|
443
|
+
a.i.readyState+" expected 'open'",null);}a.G&&(h.mode=Ck);a.s.D(h,"error",function(){var k=a.o.get(b)[0];k.p.reject(new U(2,3,3014,a.g.error?a.g.error.code:0,k.uri))});a.s.D(h,"updateend",function(){return Dk(a,b)});a.l.set(b,h);a.C.set(b,e);a.Oa.set(b,!!c.drmInfos.length)}}p.configure=function(a){this.A=a;this.h&&(this.h.A=a.modifyCueCallback)};function Ek(a){return a.ya&&!a.L&&!a.F}
|
|
444
|
+
function Bk(a,b,c,d){a.h||(a.h=new Qe(a.ha),a.h&&(a.h.A=a.A.modifyCueCallback));var e=a.h;d=d||a.Ka;a=a.W;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=Se.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):wb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):wb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
445
|
+
function yk(a){return a.F?!1:a.i?"ended"==a.i.readyState:!0}function zk(a){return a.F?!1:a.i?"closed"==a.i.readyState:!0}function Fk(a,b){a.l.size?b==wc?a=a.h.g:(a=Gk(a,b),a=!a||vj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function Hk(a,b){return a.l.size?b==wc?a.h.h:wj(Gk(a,b)):null}function Ik(a,b,c){if(b==wc)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Gk(a,b);return yj(a,c)}
|
|
446
|
+
p.Nb=function(){var a={total:this.F?[]:zj(this.g.buffered),audio:zj(Gk(this,"audio")),video:zj(Gk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Gk(a,b){if(a.F||a.L)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
|
|
447
|
+
function Jk(a,b,c,d,e,f){var g=null,h=[],k=Tb(c);if(Fe.includes(f))b=Nj(k),b.length&&d&&((c=b.find(function(r){return"com.apple.streaming.transportStreamTimestamp"===r.description}))&&"number"==typeof c.data&&(g=Math.round(c.data)/1E3),a.N.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.Y&&d.Y.timescale){var l=d.Y.timescale;if(!isNaN(l)){var m=null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.A.dispatchAllEmsgBoxes,
|
|
448
|
+
n=0,q=!1;k=new dh;m&&k.R("emsg",function(r){var u=e.emsgSchemeIdUris;if(0===r.version){var w=r.reader.Vc();var v=r.reader.Vc();var y=r.reader.T();var z=r.reader.T();var A=r.reader.T();var C=r.reader.T();var E=d.startTime+z/y}else y=r.reader.T(),E=r.reader.yd()/y+d.timestampOffset,z=E-d.startTime,A=r.reader.T(),C=r.reader.T(),w=r.reader.Vc(),v=r.reader.Vc();r=r.reader.Ub(r.reader.getLength()-r.reader.Ma());if(u&&u.includes(w)||a.A.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==w)a.N.yk();else if(u=
|
|
449
|
+
E+A/y,a.N.wk({startTime:E,endTime:u,schemeIdUri:w,value:v,timescale:y,presentationTimeDelta:z,eventDuration:A,id:C,messageData:r}),"https://aomedia.org/emsg/ID3"==w||"https://developer.apple.com/streaming/emsg-id3"==w)if(y=Nj(r),y.length)a.N.onMetadata([{cueTime:E,data:r,frames:y,dts:E,pts:E}],0,u)});k.R("prft",function(r){var u=r.reader,w=r.version;u.T();r=u.T();var v=u.T();r=1E3*r+v/Math.pow(2,32)*1E3;0===w?u=u.T():(w=u.T(),u=u.T(),u=w*Math.pow(2,32)+u);r=Pj(r);u=(new Map).set("detail",{wallClockTime:r,
|
|
450
|
+
programStartDate:new Date(r-u/l*1E3)});u=new V("prft",u);a.N.onEvent(u)}).box("moof",ih).box("traf",ih).R("tfdt",function(r){q||(n=Ai(r.reader,r.version).baseMediaDecodeTime/l,q=!0,m||r.parser.stop())}).parse(c,!0);q&&0==d.timestampOffset&&(g=n)}}else f.includes("/mp4")||f.includes("/webm")||!rk(k)||(a.ba.has(b)||a.ba.set(b,new bk),h=a.ba.get(b),h.clearData(),h.Ff(d.i),h.parse(k),k=h.getStartTime(b),null!=k&&(g=k),h=h.getMetadata());return{timestamp:g,metadata:h}}
|
|
451
|
+
function Kk(a,b,c,d,e,f,g,h,k,l,m){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L;return Q(function(N){switch(N.g){case 1:n=yc;if(b!=n.Ta){N.u(2);break}if("HLS"!=a.W){N.u(3);break}return F(N,a.Pa,4);case 4:q=N.h,a.h.s=q;case 3:return F(N,Ve(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.O()[0]:null),5);case 5:return N.return();case 2:if(l||!a.m){N.u(6);break}return F(N,Kk(a,n.ea,c,d,e,f,g,h,k,!0),7);case 7:return F(N,Kk(a,n.Ca,c,d,e,
|
|
452
|
+
f,g,h,k,!0),8);case 8:return N.return();case 6:if(!a.l.has(b))return N.return();r=a.l.get(b).timestampOffset;u=a.C.get(b);a.j.has(b)&&(u=a.j.get(b).getOriginalMimeType());if(d&&(w=Jk(a,b,c,d,e,u),v=w.timestamp,y=w.metadata,null!=v&&(null==a.U&&b==n.Ca&&(a.U=v,a.va=d.startTime,null!=a.S&&(z=0,a.va==a.na&&(z=a.U-a.S),a.ka.resolve(z))),null==a.S&&b==n.ea&&(a.S=v,a.na=d.startTime,null!=a.U&&(A=0,a.va==a.na&&(A=a.U-a.S),a.ka.resolve(A))),C=v,E=Fe,!a.G&&E.includes(a.C.get(b))&&(C=0),H=d.startTime-C,B=Math.abs(r-
|
|
453
|
+
H),(.001<=B||g||h)&&(!k||0<H||!r)&&(r=H,a.Za&&(Lk(a,b,function(){return Mk(a,b)},null),Lk(a,b,function(){return Nk(a,b,r)},null))),(D=b==n.Ca||!a.l.has(n.Ca))&&a.Pa.resolve(r)),y.length))a.N.onMetadata(y,r,d?d.endTime:null);f&&b==n.Ca&&(a.h||Bk(a,"application/cea-608",a.G,!1),a.I||(I=u.split(";",1)[0],a.I=new Lc(I)),d?(K=a.I.vf(c),K.length&&Ze(a.h,K,d.startTime,d.endTime,r)):a.I.init(c,h,m));if(!a.j.has(b)){N.u(9);break}return F(N,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:c=N.h;case 9:c=
|
|
454
|
+
Ok(a,e,c,d,b);if(!d||!a.G||b==n.Ta){N.u(11);break}if(!g&&!h){N.u(11);break}J=d.startTime;if("HLS"!=a.W||a.m||b!=n.ea||!a.l.has(n.Ca)){N.u(13);break}return F(N,a.ka,14);case 14:L=N.h,.15<Math.abs(L)&&(J-=L);case 13:Lk(a,b,function(){return Mk(a,b)},null),Lk(a,b,function(){return Nk(a,b,J)},null);case 11:return F(N,Lk(a,b,function(){var O=c;a.M&&Bc(a.M,O,r,e);a.l.get(b).appendBuffer(O)},d?d.O()[0]:null),15);case 15:G(N)}})}function Pk(a,b){var c=Hk(a,"video")||0;Xe(a.h,b,c)}
|
|
455
|
+
function Qk(a){a.h&&Xe(a.h,"",0)}p.remove=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=yc,a==f.Ca&&e.I&&e.I.remove(d),a==f.Ta?F(g,e.h.remove(b,c),0):c>b?F(g,Lk(e,a,function(){return Rk(e,a,b,c)},null),5):g.u(0)):e.m?F(g,Lk(e,f.ea,function(){return Rk(e,f.ea,b,c)},null),0):g.u(0)})};
|
|
456
|
+
function Sk(a,b){var c;return Q(function(d){return 1==d.g?(c=yc,b==c.Ta?a.h?F(d,a.h.remove(0,Infinity),0):d.return():F(d,Lk(a,b,function(){return Rk(a,b,0,a.i.duration)},null),4)):a.m?F(d,Lk(a,c.ea,function(){return Rk(a,c.ea,0,a.i.duration)},null),0):d.u(0)})}p.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=yc,a==c.Ta?d.return():F(d,Lk(b,a,function(){b.g.currentTime-=.001;Dk(b,a)},null),2)):b.m?F(d,Lk(b,c.ea,function(){var e=c.ea;b.g.currentTime-=.001;Dk(b,e)},null),0):d.u(0)})};
|
|
457
|
+
function Tk(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(q){if(1==q.g){l=yc;if(b==l.Ta)return f||(a.h.s=c),We(a.h,d,e),q.return();m=[];return F(q,Uk(a,b,g,h,k),2)}n=q.h;n||(m.push(Lk(a,b,function(){return Mk(a,b)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Mk(a,l.ea)},null)));f||(m.push(Lk(a,b,function(){return Nk(a,b,c)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Nk(a,l.ea,c)},null)));if(0!=d||Infinity!=e)m.push(Lk(a,b,function(){return Vk(a,b,d,e)},null)),a.m&&m.push(Lk(a,l.ea,function(){return Vk(a,
|
|
458
|
+
l.ea,d,e)},null));return m.length?F(q,Promise.all(m),0):q.u(0)})}function Wk(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=yc;if(b==d.Ta)return f.return();b==d.Ca&&(a.Pa=new vg);if(!a.G||(e=Hk(a,b))&&.15>Math.abs(e-c))return f.return();Lk(a,b,function(){return Mk(a,b)},null);a.m&&Lk(a,d.ea,function(){return Mk(a,d.ea)},null);return F(f,Lk(a,b,function(){return Nk(a,b,c)},null),2)}return a.m?F(f,Lk(a,d.ea,function(){return Nk(a,d.ea,c)},null),0):f.u(0)})}
|
|
459
|
+
p.endOfStream=function(a){var b=this;return Q(function(c){return F(c,Xk(b,function(){yk(b)||zk(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};p.pb=function(a){var b=this;return Q(function(c){return F(c,Xk(b,function(){if(b.A.durationReductionEmitsUpdateEnd&&a<b.i.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new vg,uri:null};b.o.get(e).unshift(f)}b.i.duration=a;b.wa=a}),0)})};p.getDuration=function(){return this.i.duration};
|
|
460
|
+
function Yk(a,b,c){Q(function(d){return a.H.g||a.g.error||a.L||a.F||yk(a)||zk(a)?d.return():F(d,Xk(a,function(){yk(a)||zk(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function Zk(a){Q(function(b){return a.H.g||a.g.error||a.L||a.F||yk(a)||zk(a)?b.return():F(b,Xk(a,function(){yk(a)||zk(a)||a.i.clearLiveSeekableRange()}),0)})}function Rk(a,b,c,d){d<=c?Dk(a,b):a.l.get(b).remove(c,d)}
|
|
461
|
+
function Mk(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;Dk(a,b)}function Nk(a,b,c){0>c&&(c+=.001);a.l.get(b).timestampOffset=c;Dk(a,b)}function Vk(a,b,c,d){var e=a.l.get(b);if(e.appendWindowEnd!==d||e.appendWindowStart!==c)e.appendWindowStart=0,e.appendWindowEnd=d,e.appendWindowStart=c;Dk(a,b)}
|
|
462
|
+
function Dk(a,b){if(a.F||a.H.g){var c=a.o.get(b);c&&c.length&&((c=c[0])&&c.p&&c.p.resolve(),a.o.set(b,[]))}else if(c=a.o.get(b)[0])c.p.resolve(),$k(a,b)}function Lk(a,b,c,d){Wg(a.H);c={start:c,p:new vg,uri:d};a.o.get(b).push(c);1==a.o.get(b).length&&al(a,b);return c.p}
|
|
463
|
+
function Xk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){switch(w.g){case 1:Wg(a.H);c=[];d=Array.from(a.l.keys());e=t(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new vg,k={start:function(v){return function(){return v.ready.resolve()}}(g),p:g.ready,uri:null},l=a.o.get(h),l.push(k),c.push(g.ready),1==l.length&&k.start();xa(w,2);return F(w,Promise.all(c),4);case 4:Aa(w,3);break;case 2:throw m=Ba(w),m;case 3:return xa(w,5,6),F(w,b(),6);case 6:Ca(w);n=t(d);for(q=
|
|
464
|
+
n.next();!q.done;q=n.next())r=q.value,$k(a,r);Da(w,0);break;case 5:throw u=Ba(w),new U(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function $k(a,b){a.o.get(b).shift();al(a,b)}function al(a,b){var c=a.o.get(b)[0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):Ek(a)?c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new U(2,3,3024,b)),$k(a,b)}}function bl(a,b){a.ha=b;a.h&&(a.h.j=b)}
|
|
465
|
+
function Ok(a,b,c,d,e){if("mp4"!=Ie(a.C.get(e)))return c;var f=null===d,g=a.Oa.get(e),h=a.N.Ej(),k=!1;d&&d.Y&&(k=d.Y.encrypted);d=d?d.O()[0]:null;var l=rb();a.A.correctEc3Enca&&f&&"audio"===e&&(c=ij(c));a.A.insertFakeEncryptionInInit&&g&&l.fe(h,e)&&(f?c=jj(b,c,d):!k&&l.Bi(e)&&(c=lj(c)));f&&l.ee()&&(c=oj(c));return c}
|
|
466
|
+
function cl(a,b,c,d){return Lk(a,b,function(){if(b!==wc){a.C.get(b);if(Gc()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.A.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.C.set(b,c)}Dk(a,b)}},null)}
|
|
467
|
+
function dl(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E;return Q(function(H){if(1==H.g){if(a.F||a.L)return H.return();c=yc;a.F=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ya=!0);a.eb&&(a.g.autoplay=!1);ya(H,2);a.s.Ra();f=t(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(B){}}a.j.clear();a.l.clear();n=a.i.duration;a.K=new vg;a.i=tk(a,a.K);return F(H,a.K,4)}if(2!=
|
|
468
|
+
H.g){!isNaN(n)&&n?a.i.duration=n:!isNaN(a.wa)&&a.wa&&(a.i.duration=a.wa);q=new vg;r=a.i.sourceBuffers;u=b.size;w=0;v=function(){w++;w===u&&(q.resolve(),a.s.Ja(r,"addsourcebuffer",v))};a.s.D(r,"addsourcebuffer",v);y=t(b.keys());for(z=y.next();!z.done;z=y.next())A=z.value,C=b.get(A),Ak(a,A,C,C.codecs);(E=b.get(c.ea))&&E.isAudioMuxedInVideo&&(a.m=!0);a.m&&!a.o.has(c.ea)&&a.o.set(c.ea,[]);a.g.currentTime=d;return F(H,q,2)}Ca(H);a.F=!1;Wg(a.H);a.s.Aa(a.g,"canplaythrough",function(){a.H.g||(a.g.autoplay=
|
|
469
|
+
e,a.Ya&&(a.Ya=!1,a.g.play()))});return Da(H,0)})}function el(a,b){return Xk(a,function(){return dl(a,b)})}function fl(a,b,c,d){var e=!1,f=uc("audio",(d||"").split(",")),g=uc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Ee(c,h);var k=Ne(a.C.get(b)),l=a.A.forceTransmux;!Ec(d)||!a.G&&Fe.includes(d)?l=!0:l||c==k||(l="WEBKIT"===rb().Da()&&Fe.includes(c));if(l&&(a=Ge(c,h),c=ye(a))){var m=c();f&&g&&(e=!0);d=m.convertCodecs(b,a)}b=Je(Oe(d));return{ec:m,Xk:e,Jh:Ne(d),codec:b,mimeType:d}}
|
|
470
|
+
function gl(a,b,c,d,e){if(b==wc)return{type:hl,nf:c,ec:null};var f=Je(Oe(a.C.get(b))),g=Ne(a.C.get(b)),h=fl(a,b,c,d),k=h.ec,l=h.Xk,m=h.Jh,n=h.codec;h=h.mimeType;var q=!0;l&&a.C.has("audio")&&(c=fl(a,"audio",c,d),d=Je(Oe(a.C.get("audio"))),q=Ne(a.C.get("audio")),q=d==c.codec&&q==c.Jh,c.ec&&c.ec.destroy());if(f===n&&g===m&&q)return{type:hl,nf:h,ec:k};f=!0;if(a.m&&!e.has("audio")||l&&k&&!a.j.has(b))f=!1;if(f&&"smooth"===a.A.codecSwitchingStrategy&&Gc())return{type:il,nf:h,ec:k};k&&k.destroy();return{type:jl,
|
|
471
|
+
nf:h,ec:null}}function Uk(a,b,c,d,e){var f,g,h,k,l,m;return Q(function(n){if(1==n.g){f=yc;g=gl(a,b,c,d,e);h=g.type;k=g.ec;l=g.nf;if(m=e.get(f.ea))a.m=m.isAudioMuxedInVideo;if(h==hl)return a.j.has(b)&&!k?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&k?a.j.set(b,k):k&&(a.j.has(b)&&a.j.get(b).transmux!==k.transmux?(a.j.get(b).destroy(),a.j.set(b,k)):k.destroy()),n.return(!1);if(h==il)return F(n,cl(a,b,l,k),3);if(h!=jl)return n.u(3);k&&k.destroy();return F(n,el(a,e),3)}return n.return(!0)})}
|
|
472
|
+
function kl(a,b,c,d,e){a=gl(a,b,c,d,e);a.ec&&a.ec.destroy();return a.type==jl}var vk=window.URL.createObjectURL,Ck="sequence",hl="none",jl="reset",il="changeType";function ll(a,b,c){this.i=a;this.C=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.B=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.o=!1;this.m=a}p=ll.prototype;p.getDuration=function(){return this.l};p.Hj=function(){return this.h};p.Li=function(a){this.i=a};p.pb=function(a){this.l=a};p.Nj=function(){return this.i};p.Ki=function(a){this.A=a};p.Zc=function(a){a&&!this.B&&(this.I=!0);this.B=a};p.Gf=function(a){this.s=a};p.We=function(){return this.s};
|
|
473
|
+
p.lh=function(a){this.C=a};p.yj=function(){return this.C};p.si=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.pf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.o&&(this.i=c-this.g-this.h)}}};
|
|
474
|
+
p.$d=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.pf(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.o&&(this.i=d-this.g-this.h)}};p.ri=function(a,b){this.pf(a);Infinity==b||this.V()||(this.g=Math.max(this.g,b))};p.Ij=function(){return this.g};p.hf=function(){this.o=!0};
|
|
475
|
+
p.ik=function(){return this.o};p.mh=function(a){this.m=a};p.Dj=function(){return this.m};p.pf=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};p.Rg=function(a){this.h=Math.max(this.h,a)};p.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};p.V=function(){return Infinity==this.l&&!this.B};p.Tc=function(){return Infinity!=this.l&&!this.B};p.Gb=function(){return Math.max(this.H,this.Ac()-this.s)};p.Ni=function(a){this.H=a};
|
|
476
|
+
p.Ac=function(){return this.V()||this.Tc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};p.Qd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ac()-this.s+a,this.Fb()))};p.Xb=function(){return this.Qd(0)};p.Fb=function(){return Math.max(0,this.Ac()-(this.V()||this.Tc()?this.C:0))};p.Zi=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
|
|
477
|
+
p.Ji=function(a){this.G=a};p.tj=function(){return this.G};T("shaka.media.PresentationTimeline",ll);ll.prototype.getAvailabilityTimeOffset=ll.prototype.tj;ll.prototype.setAvailabilityTimeOffset=ll.prototype.Ji;ll.prototype.usingPresentationStartTime=ll.prototype.Zi;ll.prototype.getSeekRangeEnd=ll.prototype.Fb;ll.prototype.getSeekRangeStart=ll.prototype.Xb;ll.prototype.getSafeSeekRangeStart=ll.prototype.Qd;ll.prototype.getSegmentAvailabilityEnd=ll.prototype.Ac;ll.prototype.setUserSeekStart=ll.prototype.Ni;
|
|
478
|
+
ll.prototype.getSegmentAvailabilityStart=ll.prototype.Gb;ll.prototype.isInProgress=ll.prototype.Tc;ll.prototype.isLive=ll.prototype.V;ll.prototype.offset=ll.prototype.offset;ll.prototype.notifyMaxSegmentDuration=ll.prototype.Rg;ll.prototype.notifyMinSegmentStartTime=ll.prototype.pf;ll.prototype.getInitialProgramDateTime=ll.prototype.Dj;ll.prototype.setInitialProgramDateTime=ll.prototype.mh;ll.prototype.isStartTimeLocked=ll.prototype.ik;ll.prototype.lockStartTime=ll.prototype.hf;
|
|
479
|
+
ll.prototype.getMaxSegmentEndTime=ll.prototype.Ij;ll.prototype.notifyPeriodDuration=ll.prototype.ri;ll.prototype.notifySegments=ll.prototype.$d;ll.prototype.notifyTimeRange=ll.prototype.si;ll.prototype.getDelay=ll.prototype.yj;ll.prototype.setDelay=ll.prototype.lh;ll.prototype.getSegmentAvailabilityDuration=ll.prototype.We;ll.prototype.setSegmentAvailabilityDuration=ll.prototype.Gf;ll.prototype.setStatic=ll.prototype.Zc;ll.prototype.setClockOffset=ll.prototype.Ki;
|
|
480
|
+
ll.prototype.getPresentationStartTime=ll.prototype.Nj;ll.prototype.setDuration=ll.prototype.pb;ll.prototype.setPresentationStartTime=ll.prototype.Li;ll.prototype.getMaxSegmentDuration=ll.prototype.Hj;ll.prototype.getDuration=ll.prototype.getDuration;function ml(a,b,c,d){var e=this;this.s=d;this.g=a;this.B=b;this.h=c;this.o=new jb;this.l=!1;this.F=a.readyState;this.G=this.C=this.j=0;this.m=nl(this);this.A=!1;this.o.D(a,"waiting",function(){return ol(e)});this.i=(new af(function(){ol(e)})).Fa(this.h.gapJumpTimerTime)}ml.prototype.release=function(){this.o&&(this.o.release(),this.o=null);null!=this.i&&(this.i.stop(),this.i=null);this.m&&(this.m.release(),this.m=null);this.g=this.B=this.s=null};
|
|
481
|
+
ml.prototype.tf=function(){this.A=!0;this.i&&this.i.Fa(this.h.gapJumpTimerTime);ol(this)};
|
|
482
|
+
function ol(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.j&&(a.g.autoplay||a.g.currentTime!=a.j)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.m)){b=a.m;var c=b.h,d=pl(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.i=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.i)b.j&&b.j(b.g,e),b.i=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Aj(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.A||(e=c.start(d),
|
|
483
|
+
(f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.B.Fb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.C++,a.s(new V("gapjumped")))))}}}
|
|
484
|
+
function nl(a){if(!a.h.stallEnabled)return null;var b=a.h.stallThreshold,c=a.h.stallSkip;return new ql(new rl(a.g),b,function(){var d;return Q(function(e){if(1==e.g)return d=zj(a.g.buffered),d.length?c?(a.g.currentTime+=c,e.u(2)):F(e,a.g.play(),3):e.return();if(2!=e.g){if(!a.g)return e.return();a.g.pause();a.g.play()}a.G++;a.s(new V("stalldetected"));G(e)})})}function ql(a,b,c){this.h=a;this.m=pl(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.i=!1;this.o=b;this.j=c}
|
|
485
|
+
ql.prototype.release=function(){this.h&&this.h.release();this.j=this.h=null};function rl(a){var b=this;this.g=a;this.h=new jb;this.i=!1;this.h.D(this.g,"audiofocuspaused",function(){b.i=!0});this.h.D(this.g,"audiofocusgranted",function(){b.i=!1});this.h.D(this.g,"audiofocuslost",function(){b.i=!0})}
|
|
486
|
+
function pl(a){if(a.g.paused||0==a.g.playbackRate||a.i||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(zj(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}rl.prototype.release=function(){this.h&&this.h.release();this.h=null};function sl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=tl.value().get(b),c.Aa(a,b,d))}var tl=new pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ul(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new jb;this.i=new vl(a);sl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){wl(e,e.j())})}ul.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function xl(a){return a.o?a.g.currentTime:a.j()}
|
|
487
|
+
function yl(a,b){0<a.g.readyState?zl(a.i,b):sl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){wl(a,a.j())})}function wl(a,b){.001>Math.abs(a.g.currentTime-b)?Al(a):(a.h.Aa(a.g,"seeking",function(){Al(a)}),zl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Al(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
488
|
+
function vl(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new af(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}vl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function zl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Fa(.1)};function Bl(a){this.g=a;this.i=!1;this.h=null;this.j=new jb}p=Bl.prototype;p.ready=function(){function a(){if(null==b.h||0==b.h&&Infinity!=b.g.duration)b.i=!0;else{var c=b.g.currentTime,d=null;if("number"===typeof b.h)d=b.h;else if(b.h instanceof Date){var e=Cl(b);null!==e&&(d=b.h.getTime()/1E3-e,d=Dl(b,d))}null==d?b.i=!0:(0>d&&(d=Math.max(0,c+d)),c!=d?(b.j.Aa(b.g,"seeking",function(){b.i=!0}),b.g.currentTime=d):b.i=!0)}}var b=this;sl(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){a()})};
|
|
489
|
+
p.release=function(){this.j&&(this.j.release(),this.j=null);this.g=null};p.Vf=function(a){this.h=this.i?this.h:a};p.De=function(){var a=this.i?this.g.currentTime:this.h;a instanceof Date&&(a=a.getTime()/1E3-(Cl(this)||0),a=Dl(this,a));return a||0};p.Eh=function(){return 0};p.Dh=function(){return 0};p.pi=function(){};p.ci=function(){var a=wj(this.g.buffered);return null!=a&&a>=this.g.duration-1};function Cl(a){return a.g.getStartDate&&(a=a.g.getStartDate().getTime(),!isNaN(a))?a/1E3:null}
|
|
490
|
+
function Dl(a,b){a=a.g.seekable;0<a.length&&(b=Math.max(a.start(0),b),b=Math.min(a.end(a.length-1),b));return b}
|
|
491
|
+
function El(a,b,c,d,e,f){var g=this;this.h=a;this.g=b.presentationTimeline;this.l=c;this.s=e;this.o=null;this.j=new ml(a,b.presentationTimeline,c,f);this.i=new ul(a,function(){a:{var h=g.j;h.l=!0;h.A=!1;h.i&&h.i.Fa(h.h.gapJumpTimerTime);ol(h);var k=xl(g.i);h=Fl(g,k);if(!Hc()&&.001<Math.abs(h-k)){k=!1;var l=rb().Gi();if(l){var m=Date.now()/1E3;if(!g.o||g.o<m-l)g.o=m,k=!0}else k=!0;if(k){yl(g.i,h);h=void 0;break a}}g.s();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.l&&(k.l=!0,k.j=h);k.i&&
|
|
492
|
+
k.i.Fa(k.h.gapJumpTimerTime);ol(k)},function(){return Gl(g,d)});this.m=new af(function(){if(0!=g.h.readyState&&!g.h.paused){var h=xl(g.i),k=g.g.Xb(),l=g.g.Fb();3>l-k&&(k=l-3);h<k&&(h=Fl(g,h),g.h.currentTime=h)}})}p=El.prototype;p.ready=function(){this.m.Fa(.25)};p.release=function(){this.i&&(this.i.release(),this.i=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.h=this.i=this.g=this.l=null;this.s=function(){}};p.Vf=function(a){yl(this.i,Gl(this,a))};
|
|
493
|
+
p.De=function(){var a=xl(this.i);return 0<this.h.readyState&&!this.h.paused?Hl(this,a):a};p.Eh=function(){return this.j.G};p.Dh=function(){return this.j.C};function Gl(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Xb():a.g.Fb():b instanceof Date?b=b.getTime()/1E3-(a.g.m||a.g.i):0>b&&(b=a.g.Fb()+b);return Il(a,Hl(a,b))}p.pi=function(){this.j.tf()};p.ci=function(){if(this.g.V()){var a=this.g.Ac(),b=wj(this.h.buffered);if(null!=b&&b>=a)return!0}return!1};
|
|
494
|
+
function Il(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Fl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.Xb(),f=a.g.Fb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Qd(c),k=a.g.Qd(d);c=a.g.Qd(c+d);return b>=g?Il(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?a.g.V()&&a.l.returnToEndOfLiveWindowWhenOutside?f-a.l.safeSeekEndOffset:xj(a.h.buffered,k)?k:c:b>=h||xj(a.h.buffered,b)?b:c}function Hl(a,b){var c=a.g.Xb();if(b<c)return c;a=a.g.Fb();return b>a?a:b};function Jl(a){this.g=a;this.m=null;this.i=0;this.o=!1}p=Jl.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.rk=function(){this.o=!0};p.Eb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Rf(a){return a.g[0]||null}
|
|
495
|
+
p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};p.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
496
|
+
p.kf=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};p.Yd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.kf(a);this.$a(b)};p.$a=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
497
|
+
p.ld=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new rj(a.startTime,b,a.C,a.startByte,a.endByte,a.Y,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
498
|
+
p.Lf=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new af(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Fa(a))};Jl.prototype[Symbol.iterator]=function(){return this.Wb(0)};
|
|
499
|
+
Jl.prototype.Wb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return ab("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Kl(this,d,f,c)};Jl.prototype.Pe=function(){return-1};
|
|
500
|
+
function Ll(a,b,c){a=new rj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Jl([a])}T("shaka.media.SegmentIndex",Jl);Jl.forSingleSegment=Ll;Jl.prototype.getIteratorForTime=Jl.prototype.Wb;Jl.prototype.updateEvery=Jl.prototype.Lf;Jl.prototype.fit=Jl.prototype.ld;Jl.prototype.evict=Jl.prototype.$a;Jl.prototype.mergeAndEvict=Jl.prototype.Yd;Jl.prototype.offset=Jl.prototype.offset;Jl.prototype.get=Jl.prototype.get;Jl.prototype.find=Jl.prototype.find;Jl.prototype.markImmutable=Jl.prototype.rk;
|
|
501
|
+
Jl.prototype.release=Jl.prototype.release;Jl.prototype.getNumEvicted=Jl.prototype.getNumEvicted;Jl.prototype.getNumReferences=Jl.prototype.getNumReferences;function Kl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}p=Kl.prototype;p.Dd=function(a){this.reverse=a};p.oj=function(){return this.h};p.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.A&&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};
|
|
502
|
+
p.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.A&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};p.dh=function(){var a=this.current();if(a.o&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
|
|
503
|
+
T("shaka.media.SegmentIterator",Kl);Kl.prototype.resetToLastIndependent=Kl.prototype.dh;Kl.prototype.next=Kl.prototype.next;Kl.prototype.current=Kl.prototype.current;Kl.prototype.currentPosition=Kl.prototype.oj;Kl.prototype.setReverse=Kl.prototype.Dd;function Ml(){Jl.call(this,[]);this.h=[]}pa(Ml,Jl);p=Ml.prototype;p.clone=function(){var a=new Ml;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
|
|
504
|
+
p.Eb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Eb(a)};function Nl(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};function Ol(a,b){a=t(a.h);for(var c=a.next();!c.done;c=a.next())if(c=c.value,null!=c.find(b))return c.Pe();return-1}
|
|
505
|
+
p.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.kf=function(){};p.$a=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.$a(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};p.Yd=function(){};p.ld=function(){};p.Lf=function(){};T("shaka.media.MetaSegmentIndex",Ml);
|
|
506
|
+
Ml.prototype.updateEvery=Ml.prototype.Lf;Ml.prototype.fit=Ml.prototype.ld;Ml.prototype.mergeAndEvict=Ml.prototype.Yd;Ml.prototype.evict=Ml.prototype.$a;Ml.prototype.merge=Ml.prototype.kf;Ml.prototype.offset=Ml.prototype.offset;Ml.prototype.get=Ml.prototype.get;Ml.prototype.find=Ml.prototype.find;Ml.prototype.forEachTopLevelReference=Ml.prototype.Eb;Ml.prototype.release=Ml.prototype.release;function Pl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ve();this.h=new af(function(){b.g.ni(.25*b.i)})}Pl.prototype.release=function(){this.set(this.Pc());this.h&&(this.h.stop(),this.h=null);this.g=null};Pl.prototype.set=function(a){this.i=a;Ql(this)};Pl.prototype.Pc=function(){return this.g.Pc()};function Ql(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ve()!=b&&a.g.nh(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Ve()&&a.g.nh(0)};function Rl(a){var b=this;this.j=a;this.h=new jb;this.g=new Set;this.i=(new af(function(){Sl(b,!1)})).Jb();a.paused||this.i.Fa(.25);this.h.D(a,"playing",function(){b.i.Jb().Fa(.25)});this.h.D(a,"pause",function(){b.i.stop()})}Rl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Sl(a,b){var c=a.j.currentTime;a=t(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function Tl(a){Fg.call(this);this.g=new Map;this.h=a}pa(Tl,Fg);Tl.prototype.release=function(){this.g.clear();Fg.prototype.release.call(this)};function Ul(a,b){var c=a.g.get(b);c||(c={ce:[],lg:null,contentType:b},a.g.set(b,c));return c}function Vl(a,b,c){var d=Ul(a,b.contentType);Wl(a,d);a={rd:b,position:c};d=d.ce;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
507
|
+
Tl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.lg;a:{var e=c.ce;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.rd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
508
|
+
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Wc(d.roles,e.roles);(g||h||d)&&Xl(this,a,e.contentType)&&(c.lg=e,d=new V("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Xl(this,a,e.contentType)&&(c.lg=e,JSON.stringify(e),c=new V("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
509
|
+
function Xl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Wl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ce;b.ce=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.ce=[]}
|
|
510
|
+
function Yl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
511
|
+
a.language);return b};function Zl(a){Fg.call(this);this.h=new Map;this.i=a;this.g=null}pa(Zl,Fg);Zl.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);Fg.prototype.release.call(this)};function $l(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new V("regionadd",new Map([["region",b]])),a.dispatchEvent(b),am(a))}
|
|
512
|
+
function am(a){a.g||(a.g=(new af(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new V("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).Fa(2))};function bm(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function cm(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
513
|
+
function dm(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.Wb(b,!0,a.o));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.endByte&&(d=!1);2==c.Cc()&&(d=!1);c.Yb(!1)&&(d=!1);d&&c.Y&&b.push(em(a,c.Y));d&&!a.h.has(c)&&(d=new fm(a.l),b.push(gm(d,c,a.i)),a.h.set(c,d))}hm(a);return Promise.all(b)}
|
|
514
|
+
function em(a,b){if(!a.i.segmentIndex||b.Yb()||Array.from(a.j.keys()).some(function(e){return qj(e,b)}))return Promise.resolve();var c=new fm(a.l),d=gm(c,b,a.i);a.j.set(b,c);return d}function im(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&jm(a,c)}function km(a){im(a,a.h);im(a,a.j);a.g=null}bm.prototype.$a=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&jm(this,d);b&&hm(this)};
|
|
515
|
+
bm.prototype.Dd=function(a){this.o=a;this.g&&this.g.Dd(a)};function hm(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Lg:void 0},d=c.next())e.Lg=d.value,b.some(function(f){return function(g){return qj(g.Y,f.Lg)}}(e))||jm(a,e.Lg)}function lm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&jm(a,d)}hm(a)}function mm(a,b){b&&b!==a.i&&(km(a),a.i=b)}function jm(a,b){var c=a.h;b instanceof pj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
|
|
516
|
+
function fm(a){this.g=a;this.ae=this.sh=null}function gm(a,b,c){var d=new Uint8Array(0);a.ae=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0<d.byteLength?d=pc(d,e):d=e,a.sh?F(f,a.sh(d),3):f.u(0);d=new Uint8Array(0);G(f)})});return a.ae.promise.catch(function(e){return e instanceof U&&7001==e.code?Promise.resolve():Promise.reject(e)})}fm.prototype.abort=function(){this.ae&&this.ae.abort()};function nm(a){var b=Ne(a),c=b.split("/")[0];a=Oe(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,oe:null,colorGamut:null,frameRate:null}}
|
|
517
|
+
function om(a,b,c){function d(B){y=B.name;var D=B.reader;D.skip(24);var I=D.Ba(),K=D.Ba();D.skip(50);q=String(I);n=String(K);B.reader.Ga()&&ih(B)}function e(B){var D=Di(B.reader);r=D.channelCount;u=D.sampleRate;f(B.name)}function f(B){B=B.toLowerCase();switch(B){case "avc1":case "avc3":h.push(B+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(B+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(B+".05.04");l=!0;break;case "vp09":h.push(B+".00.10.08");l=!0;break;case "av01":h.push(B+".0.01M.08");
|
|
518
|
+
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(B);k=!0;break;case "apac":g.push("apac.31.00"),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,q=null,r=null,u=null,w=null,v=null,y;(new dh).box("moov",ih).box("trak",ih).box("mdia",ih).R("mdhd",function(B){m=Bi(B.reader,B.version).language}).box("minf",ih).box("stbl",ih).R("stsd",kh).box("mp4a",function(B){var D=Di(B.reader);r=D.channelCount;u=D.sampleRate;B.reader.Ga()?ih(B):f(B.name)}).box("esds",
|
|
519
|
+
function(B){B=B.reader;for(var D="mp4a",I,K;B.Ga();){I=B.X();for(var J=B.X();J&128;)J=B.X();if(3==I)B.Ba(),J=B.X(),J&128&&B.Ba(),J&64&&B.skip(B.X()),J&32&&B.Ba();else if(4==I)K=B.X(),B.skip(12);else if(5==I)break}K&&(D+="."+Gi(K),5==I&&B.Ga()&&(I=B.X(),K=(I&248)>>3,31===K&&B.Ga()&&(K=32+((I&7)<<3)+((B.X()&224)>>5)),D+="."+K));g.push(D);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("apac",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",
|
|
520
|
+
d).box("dvh1",d).box("dvhe",d).box("vp09",d).box("av01",d).box("avcC",function(B){var D=y||"";switch(y){case "dvav":D="avc3";break;case "dva1":D="avc1"}B=B.reader;B.skip(1);B=D+"."+Gi(B.X())+Gi(B.X())+Gi(B.X());h.push(B);l=!0}).box("hvcC",function(B){var D=y||"";switch(y){case "dvh1":D="hvc1";break;case "dvhe":D="hev1"}var I=B.reader;I.skip(1);B=I.X();var K=["","A","B","C"][B>>6],J=B&31,L=I.T(),N=(B&32)>>5?"H":"L";B=[I.X(),I.X(),I.X(),I.X(),I.X(),I.X()];I=I.X();for(var O=0,M=0;32>M;M++){O|=L&1;if(31==
|
|
521
|
+
M)break;O<<=1;L>>=1}D=D+("."+K+J)+("."+Gi(O,!0));D+="."+N+I;K="";for(J=B.length;J--;)if((N=B[J])||K)K="."+N.toString(16).toUpperCase()+K;D+=K;h.push(D);l=!0}).box("dvcC",function(B){var D=y||"";switch(y){case "hvc1":D="dvh1";break;case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=B.reader;I.skip(2);B=I.X();I=I.X();h.push(D+"."+Hi(B>>1&127)+"."+Hi(B<<5&32|I>>3&31));l=!0}).box("dvvC",function(B){var D=y||"";switch(y){case "hvc1":D="dvh1";break;
|
|
522
|
+
case "hev1":D="dvhe";break;case "avc1":D="dva1";break;case "avc3":D="dvav";break;case "av01":D="dav1"}var I=B.reader;I.skip(2);B=I.X();I=I.X();h.push(D+"."+Hi(B>>1&127)+"."+Hi(B<<5&32|I>>3&31));l=!0}).R("vpcC",function(B){var D=y||"",I=B.reader;B=I.X();var K=I.X();I=I.X()>>4&15;h.push(D+"."+Hi(B)+"."+Hi(K)+"."+Hi(I));l=!0}).box("av1C",function(B){var D=y||"";switch(y){case "dav1":D="av01"}var I=B.reader;I.skip(1);B=I.X();I=I.X();var K=B>>>5,J=(I&64)>>6;h.push(D+"."+K+"."+Hi(B&31)+(I>>>7?"H":"M")+
|
|
523
|
+
"."+Hi(2===K&&J?(I&32)>>5?12:10:J?10:8)+"."+((I&16)>>4)+"."+((I&8)>>3)+((I&4)>>2)+(I&3)+"."+Hi(1)+"."+Hi(1)+"."+Hi(1)+".0");l=!0}).box("enca",mh).box("encv",lh).box("sinf",ih).box("frma",function(B){B=Ei(B.reader).codec;f(B)}).box("colr",function(B){h=h.map(function(K){if(K.startsWith("av01.")){var J=B.reader,L=J.Ma(),N=J.Ub(4);var O=String.fromCharCode(N[0]);O+=String.fromCharCode(N[1]);O+=String.fromCharCode(N[2]);O+=String.fromCharCode(N[3]);if("nclx"===O){N=J.Ba();O=J.Ba();var M=J.Ba(),P=J.X()>>
|
|
524
|
+
7,R=K.split(".");10==R.length&&(R[6]=Hi(N),R[7]=Hi(O),R[8]=Hi(M),R[9]=String(P),K=R.join("."))}J.seek(L)}return K});var D=Fi(B.reader),I=D.colorGamut;w=D.oe;v=I}).parse(a||b,!0,!0);if(!g.length&&!h.length)return null;var z=k&&!l,A=new Map;if(l&&!c){c=new Lc("video/mp4");a&&c.init(a);try{c.vf(b);for(var C=t(c.Uf()),E=C.next();!E.done;E=C.next()){var H=E.value;A.set(H,H)}}catch(B){}c.Fd()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:pm(g.concat(h)).join(", "),language:m,height:n,
|
|
525
|
+
width:q,channelCount:r,sampleRate:u,closedCaptions:A,oe:w,colorGamut:v,frameRate:null}}function pm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Le(d);b.has(e)||(c.push(d),b.add(e))}b=xc("audio",c);d=xc("video",c);a=xc(wc,c);d=qm(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
526
|
+
function qm(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?Ec('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
527
|
+
function rm(a){var b=null;(new dh).box("moov",ih).box("trak",ih).box("mdia",ih).box("minf",ih).box("stbl",ih).R("stsd",kh).box("encv",lh).box("enca",mh).box("sinf",ih).box("schi",ih).R("tenc",function(c){c=c.reader;c.X();c.X();c.X();c.X();b=oc(c.Ub(16))}).parse(a,!0);return b}
|
|
528
|
+
function sm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):F(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Tb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function tm(a,b,c,d,e){a=Ng(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function um(a,b){var c=this;this.g=b;this.j=a;this.i=null;this.K=new Map;this.C=1;this.A=this.o=null;this.P=0;this.h=new Map;this.I=!1;this.S=null;this.B=!1;this.l=new Vg(function(){return vm(c)});this.M=Date.now()/1E3;this.m=new Map;this.N={projection:null,hfov:null};this.W=0;this.U=Infinity;this.F=null;this.L=[];this.s=new af(function(){if(c.j&&c.g)if(c.j.presentationTimeline.V()){var d=c.j.presentationTimeline.Xb(),e=c.j.presentationTimeline.Fb();1<e-d?Yk(c.g.Z,d,e):Zk(c.g.Z)}else Zk(c.g.Z),c.s&&
|
|
529
|
+
c.s.stop();else c.s&&c.s.stop()});this.G=null;this.H=new af(function(){var d=c.g.video;!d.ended&&c.G&&(d.currentTime=c.G,c.G=null)})}p=um.prototype;p.destroy=function(){return this.l.destroy()};
|
|
530
|
+
function vm(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g){a.s&&a.s.stop();a.s=null;a.H&&a.H.stop();a.H=null;b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,wm(e),b.push(xm(e)),e.$&&(km(e.$),e.$=null);f=t(a.m.values());for(g=f.next();!g.done;g=f.next())h=g.value,km(h);return F(k,Promise.all(b),2)}a.h.clear();a.m.clear();a.g=null;a.j=null;a.i=null;a.G=null;G(k)})}
|
|
531
|
+
p.configure=function(a){this.i=a;this.S=new sg({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);if(a.disableAudioPrefetch){var b=this.h.get("audio");b&&b.$&&(km(b.$),b.$=null);b=t(this.m.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,km(this.m.get(c)),this.m.delete(c)}a.disableTextPrefetch&&(b=this.h.get(wc))&&
|
|
532
|
+
b.$&&(km(b.$),b.$=null);a.disableVideoPrefetch&&(b=this.h.get("video"))&&b.$&&(km(b.$),b.$=null);b=t(this.h.keys());for(c=b.next();!c.done;c=b.next())c=this.h.get(c.value),c.$?(lm(c.$,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(km(c.$),c.$=null)):0<a.segmentPrefetchLimit&&(c.$=ym(this,c.stream));a.disableAudioPrefetch||zm(this)};function Am(a,b,c){a.j.presentationTimeline.V()||(a.W=b,a.U=c)}
|
|
533
|
+
p.start=function(a){var b=this;return Q(function(c){if(1==c.g)return F(c,Bm(b,a||new Map),2);Wg(b.l);b.I=!0;G(c)})};function Cm(a,b){var c,d,e,f,g,h,k;Q(function(l){switch(l.g){case 1:return c=yc,a.P++,d=a.P,xa(l,2),F(l,Sk(a.g.Z,c.Ta),4);case 4:Aa(l,3);break;case 2:if(e=Ba(l),a.g)a.g.onError(e);case 3:f=Ee(b.mimeType,b.codecs),Bk(a.g.Z,f,a.j.sequenceMode,b.external),g=a.g.Z.ha,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.P==d&&(k=Dm(a,b),a.h.set(c.Ta,k),Em(a,k,0)),G(l)}})}
|
|
534
|
+
function Fm(a){var b=a.h.get(wc);b&&(wm(b),xm(b).catch(function(){}),a.F=a.h.get(wc),a.h.delete(wc),b.stream&&b.stream.closeSegmentIndex&&b.stream.closeSegmentIndex());a.A=null}
|
|
535
|
+
function Gm(a,b){for(var c=0>a.g.ub(),d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.sa&&e.sa.Dd(c),e.$&&e.$.Dd(c);d=t(a.m.values());for(e=d.next();!e.done;e=d.next())e.value.Dd(c);if(c=a.h.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Fc&&(Hm(a,b,!1,0,!1),c.Fc=d);else if(b=c.Fc)c.Fc=null,Hm(a,b,!0,0,!1)}
|
|
536
|
+
function Im(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.o=b;a.I&&(b.video&&Hm(a,b.video,c,d,e,f),b.audio&&Hm(a,b.audio,c,d,e,f))}function Jm(a,b){Q(function(c){if(1==c.g)return a.F=null,a.A=b,a.I?b.segmentIndex?c.u(2):F(c,b.createSegmentIndex(),2):c.return();Hm(a,b,!0,0,!1);G(c)})}function Km(a){var b=a.h.get(wc);b&&Hm(a,b.stream,!0,0,!0)}
|
|
537
|
+
function Lm(a,b){for(var c=t(a.K.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.K.delete(d))}}
|
|
538
|
+
function Hm(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=wc?g&&(g.Fc&&(b.trickModeVideo?(g.Fc=b,b=b.trickModeVideo):g.Fc=null),g.stream!=b||e)&&(a.m.has(b)?g.$=a.m.get(b):g.$&&mm(g.$,b),b.type==wc&&g.stream!=b&&(e=Ee(b.mimeType,b.codecs),Bk(a.g.Z,e,a.j.sequenceMode,b.external)),!a.m.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Qa?(e="("+g.type+":"+g.stream.id+")",a.K.has(e)||a.K.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,
|
|
539
|
+
g.stream=b,g.sa=null,g.ag=!!f,b.dependencyStream?g.yc=Dm(a,b.dependencyStream):g.yc=null,e&&(g.mb=null,g.lc=null,g.kc=null,b.isAudioMuxedInVideo&&(b=null,"video"===g.type?b=a.h.get("audio"):"audio"===g.type&&(b=a.h.get("video")),b&&(xm(b).catch(function(){}),b.mb=null,b.lc=null,b.kc=null,Mm(a,b),Nm(a,b).catch(function(h){if(a.g)a.g.onError(h)})))),c?g.Kc?g.Sf=!0:g.Qa?(g.Ic=!0,g.Oe=d,g.Sf=!0):(wm(g),Om(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Qa||g.zb||Em(a,g,0),Nm(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
540
|
+
Cm(a,b)}
|
|
541
|
+
function Nm(a,b){var c,d,e;return Q(function(f){if(1==f.g){if(!b.Hb)return f.return();c=b.stream;d=b.Hb;return c.segmentIndex?f.u(2):F(f,c.createSegmentIndex(),2)}if(4!=f.g)return e=c.dependencyStream,!e||e.segmentIndex?f.u(4):F(f,e.createSegmentIndex(),4);if(b.Hb!=d||b.stream!=c)return f.return();var g=a.g.Qc();var h=Hk(a.g.Z,b.type),k=b.stream.segmentIndex.find(b.Ia?b.Ia.endTime:g),l=null==k?null:b.stream.segmentIndex.get(k);k=l?l.endByte?l.endByte-l.startByte:null:null;l&&!k&&(k=(l.endTime-l.getStartTime())*
|
|
542
|
+
(b.stream.bandwidth||0)/8);k?((l=l.Y)&&(k+=(l.endByte?l.endByte-l.startByte:null)||0),l=a.g.getBandwidthEstimate(),g=8*k/l<(h||0)-g-a.i.rebufferingGoal||b.Hb.h.g>k?!0:!1):g=!1;g&&b.Hb.abort();G(f)})}
|
|
543
|
+
p.Yc=function(){if(this.g){for(var a=this.g.Qc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=this.g.Z;d==wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Gk(e,d),e=xj(e,a));if(!e){this.M=0;c.$&&(c.$.g=null);if("audio"===c.type){e=t(this.m.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.sa=null;(null!=Hk(this.g.Z,d)||c.Qa)&&Mm(this,c);c.Hb&&(c.Hb.abort(),c.Hb=null);d===wc&&(d=this.g.Z,d.I&&d.I.Fd());c.Yc=!0}}Pm(this)&&Qm(this)}};
|
|
544
|
+
function Mm(a,b){b.Kc||b.Ic||(b.Qa?(b.Ic=!0,b.Oe=0):null==Fk(a.g.Z,b.type)?null==b.zb&&Em(a,b,0):(wm(b),Om(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
545
|
+
function Bm(a,b){var c,d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){if(!a.o)throw new U(2,5,5006);c=Rm(a,!0);d=a.g.Z;return F(m,d.init(c,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}Wg(a.l);a.updateDuration();e=t(c.keys());for(f=e.next();!f.done;f=e.next())g=f.value,h=c.get(g),a.h.has(g)||(k=Dm(a,h),b.has(h.id)&&(l=b.get(h.id),cm(l,function(n,q,r){return Sm(n,q,r||null,a.i.retryParameters,a.g.pc)}),k.$=l),a.h.set(g,k),Em(a,k,0));G(m)})}
|
|
546
|
+
function Dm(a,b){var c={stream:b,type:b.type,sa:null,$:ym(a,b),Ia:null,mb:null,gf:null,lc:null,kc:null,df:null,ef:null,Fc:null,endOfStream:!1,Qa:!1,zb:null,Ic:!1,Oe:0,Sf:!1,Kc:!1,Yc:!0,ag:!1,$g:!1,Sd:!1,Hb:null,yc:null};b.dependencyStream&&(c.yc=Dm(a,b.dependencyStream));return c}
|
|
547
|
+
function ym(a,b){if("video"===b.type&&a.i.disableVideoPrefetch||"audio"===b.type&&a.i.disableAudioPrefetch||b.type===wc&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===wc&&a.i.disableTextPrefetch)return null;if(a.m.has(b))return a.m.get(b);var c=a.h.get(b.type);return(c=c&&c.$)&&b===c.i?c:0<a.i.segmentPrefetchLimit?new bm(a.i.segmentPrefetchLimit,b,function(d,e,f){return Sm(d,e,f||null,a.i.retryParameters,a.g.pc)},0>a.g.ub()):null}
|
|
548
|
+
function zm(a){for(var b=a.i.segmentPrefetchLimit,c=a.i.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Mb:void 0},e=d.next())if(f.Mb=e.value,f.Mb.audio)if(a.m.has(f.Mb.audio)){if(e=a.m.get(f.Mb.audio),lm(e,b),!(0<b&&c.some(function(h){return function(k){return gf(h.Mb.audio.language,k)}}(f)))){var g=a.h.get(f.Mb.audio.type);e!==(g&&g.$)&&km(e);a.m.delete(f.Mb.audio)}}else 0>=b||!c.some(function(h){return function(k){return gf(h.Mb.audio.language,k)}}(f))||!(e=ym(a,f.Mb.audio))||
|
|
549
|
+
(f.Mb.audio.segmentIndex||f.Mb.audio.createSegmentIndex(),a.m.set(f.Mb.audio,e))}p.updateDuration=function(){var a=Hc(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.s&&this.s.stop(),Zk(this.g.Z)),this.g.Z.pb(b)):a?(this.s&&this.s.Fa(.5),this.g.Z.pb(Infinity)):this.g.Z.pb(Math.pow(2,32))};
|
|
550
|
+
function Tm(a,b){var c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:Wg(a.l);c=yc;if(b.Qa||null==b.zb||b.Kc)return n.return();b.zb=null;if(!b.Ic){n.u(2);break}return F(n,Om(a,b,b.Sf,b.Oe),3);case 3:return n.return();case 2:Lm(a,b);if(b.stream.segmentIndex){n.u(4);break}d=b.stream;xa(n,5);return F(n,b.stream.createSegmentIndex(),7);case 7:Aa(n,6);break;case 5:return e=Ba(n),F(n,Um(a,b,e),8);case 8:return n.return();case 6:if(d!=b.stream)return d.closeSegmentIndex&&d.closeSegmentIndex(),b.Qa||
|
|
551
|
+
b.zb||Em(a,b,0),n.return();case 4:if(!b.yc){n.u(9);break}if(b.yc.stream.segmentIndex){n.u(9);break}xa(n,11);return F(n,b.yc.stream.createSegmentIndex(),13);case 13:Aa(n,9);break;case 11:Ba(n);case 9:xa(n,14);f=Vm(a,b);null!=f&&(Em(a,b,f),b.Sd=!1);Aa(n,15);break;case 14:return g=Ba(n),F(n,Um(a,b,g),16);case 16:return n.return();case 15:if(b.type===c.Ta)return n.return();h=[b];k=b.type===c.ea?c.Ca:c.ea;(l=a.h.get(k))&&h.push(l);if(!a.I||!h.every(function(q){return q.endOfStream})){n.u(0);break}return F(n,
|
|
552
|
+
a.g.Z.endOfStream(),18);case 18:Wg(a.l),m=a.g.Z.getDuration(),0!=m&&m<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.pb(m),G(n)}})}
|
|
553
|
+
function Vm(a,b){if(Wm(b))return Pk(a.g.Z,b.stream.originalId||""),null;b.type==wc&&Qk(a.g.Z);if(b.stream.isAudioMuxedInVideo)return null;var c=a.i.updateIntervalSeconds/Math.max(1,Math.abs(a.g.ub()));if(!Ek(a.g.Z)&&b.type!=wc)return c/2;var d=a.g.Qc();if("audio"===b.type)for(var e=t(a.m.keys()),f=e.next();!f.done;f=e.next())f=a.m.get(f.value),f.$a(d,!0),dm(f,d);e=b.Ia?b.Ia.endTime:d;var g=Ik(a.g.Z,b.type,d);f=Math.max(1,Math.max(a.i.rebufferingGoal,a.i.bufferingGoal)*a.C);var h=a.j.presentationTimeline.getDuration()-
|
|
554
|
+
e,k=Hk(a.g.Z,b.type);if(1E-6>h&&k)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(wc))&&Wm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=f)return c/2;h=!b.sa;k=Xm(a,b,d,k);if(!k)return c;g=b.mb;var l=k.Y;g&&l&&qj(l,g)&&(g.g=l.g);g=!1;h&&b.ag&&(g=!0,b.ag=!1);h=Infinity;l=Array.from(a.h.values());l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,Wm(m)||m.sa&&!m.sa.current()||(h=Math.min(h,m.Ia?m.Ia.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;b.$&&b.sa&&!a.m.has(b.stream)&&
|
|
555
|
+
(b.$.$a(k.startTime+.001),dm(b.$,k.startTime).catch(function(){}));if(Pm(a)&&Ym(a,b,k))return null;Zm(a,b,d,k,g).catch(function(){});b.yc&&$m(a,b.yc,d,f);return null}
|
|
556
|
+
function Xm(a,b,c,d){if(b.sa)return(c=b.sa.current())&&b.Ia&&.001>Math.abs(b.Ia.startTime-c.startTime)&&(c=b.sa.next().value),c;if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,a=0>a.g.ub(),b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Wb(c,!1,a)),b.sa&&b.sa.next().value;d=a.j.sequenceMode||Pm(a)?0:a.i.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.ub();var f=null;d&&(b.stream.segmentIndex&&(b.sa=b.stream.segmentIndex.Wb(e,!1,a)),f=b.sa&&b.sa.next().value);f||(b.stream.segmentIndex&&(b.sa=
|
|
557
|
+
b.stream.segmentIndex.Wb(c,!1,a)),f=b.sa&&b.sa.next().value);return f}
|
|
558
|
+
function Zm(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H;return Q(function(B){switch(B.g){case 1:f=yc;g=b.stream;h=b.sa;b.Qa=!0;xa(B,2);if(2==d.Cc())throw new U(1,1,1011);return F(B,an(a,b,d,e),4);case 4:Wg(a.l);if(a.B)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.i.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return r=new Uint8Array(0),w=u=!1,y=function(D){var I,K,J,L;return Q(function(N){switch(N.g){case 1:if(u)return N.return();
|
|
559
|
+
w=!0;Wg(a.l);if(a.B)return N.return();xa(N,2);r=pc(r,D);I=!1;K=0;(new dh).box("mdat",function(O){K=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){N.u(4);break}J=r.subarray(0,K);r=r.subarray(K);return F(N,bn(a,b,c,g,d,J,!0,e),5);case 5:b.$&&b.sa&&dm(b.$,d.startTime,!0);case 4:Aa(N,0);break;case 2:v=L=Ba(N),G(N)}})},F(B,cn(a,b,d,y),9);n=cn(a,b,d);return F(B,n,7);case 7:q=B.h;Wg(a.l);if(a.B)return B.return();Wg(a.l);return b.Ic?(b.Qa=!1,Em(a,b,0),B.return()):F(B,bn(a,b,c,g,d,q,!1,e),6);case 9:z=B.h;if(v)throw v;
|
|
560
|
+
if(w){B.u(10);break}u=!0;Wg(a.l);return a.B?B.return():b.Ic?(b.Qa=!1,Em(a,b,0),B.return()):F(B,bn(a,b,c,g,d,z,!1,e),10);case 10:b.$&&b.sa&&dm(b.$,d.startTime,!0);case 6:Wg(a.l);if(a.B)return B.return();b.Ia=d;h.next();b.Qa=!1;b.$g=!1;A=a.g.Z.Nb();C=A[b.type];fb(JSON.stringify(C));b.Ic||(E=null,b.type===f.Ca?E=a.h.get(f.ea):b.type===f.ea&&(E=a.h.get(f.Ca)),E&&E.type==f.ea?a.g.tf(d,b.stream,E.stream.isAudioMuxedInVideo):a.g.tf(d,b.stream,b.stream.codecs.includes(",")));Em(a,b,0);Aa(B,0);break;case 2:H=
|
|
561
|
+
Ba(B);Wg(a.l,H);if(a.B)return B.return();b.Qa=!1;if(7001==H.code)b.Qa=!1,wm(b),Em(a,b,0),B.u(0);else if(b.type==f.Ta&&a.i.ignoreTextStreamFailures)a.h.delete(f.Ta),B.u(0);else{if(3017==H.code)return F(B,dn(a,b,H),0);b.Sd=!0;1==H.category&&b.$&&jm(b.$,d);H.severity=2;return F(B,Um(a,b,H),0)}}})}
|
|
562
|
+
function $m(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){switch(w.g){case 1:e=b.stream;for(h=(g=(f=e.segmentIndex)&&f.Wb(c))&&g.next().value;h&&a.L.includes(h.startTime);)h=g&&g.next().value;if(!h){w.u(0);break}k=h.Y;if(!k||qj(k,b.mb)){w.u(3);break}b.mb=k;xa(w,4);return F(w,cn(a,b,k),6);case 6:l=w.h;var v=a.g.Z;v.M&&Bc(v.M,l,0,e);a.L=[];Aa(w,3);break;case 4:throw m=Ba(w),b.mb=null,m;case 3:if(b.Ia&&b.Ia==h){w.u(0);break}b.Ia=h;xa(w,8);return F(w,cn(a,b,h),10);case 10:n=w.h;v=a.g.Z;v.M&&
|
|
563
|
+
Bc(v.M,n,0,e);a.L.push(h.startTime);Aa(w,9);break;case 8:throw q=Ba(w),b.Ia=null,q;case 9:r=Math.max.apply(Math,[0].concat(x(a.L)));u=a.g.Qc();if(u+d>r)return F(w,$m(a,b,h.startTime,d),0);w.u(0)}})}
|
|
564
|
+
function dn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.h.values());if(e=d.some(function(m){return m!=b&&m.$g}))return l.u(2);f=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.i.avoidEvictionOnQuotaExceededError)return Em(a,b,4),l.return();h=Math.round(100*a.C);if(20<h)a.C-=.2;else if(4<h)a.C-=.04;else return b.Sd=!0,a.B=!0,a.g.onError(c),l.return();b.$g=!0;k=a.g.Qc();return F(l,en(a,b,k),2)}Em(a,b,4);
|
|
565
|
+
G(l)})}
|
|
566
|
+
function an(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A;return Q(function(C){switch(C.g){case 1:e=yc;f=null==b.Ia;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.W)-.1);k=Math.min(c.appendWindowEnd,a.U)+.1;l=c.codecs||b.stream.codecs;m=Le(l);n=Ne(c.mimeType||b.stream.mimeType);q=c.timestampOffset;if(q==b.gf&&h==b.lc&&k==b.kc&&m==b.df&&n==b.ef){C.u(2);break}r=b.df&&b.ef&&kl(a.g.Z,b.type,n,l,Rm(a));if(!r){C.u(3);break}u=null;b.type===e.Ca?u=a.h.get(e.ea):b.type===e.ea&&(u=a.h.get(e.Ca));if(!u){C.u(3);break}return F(C,
|
|
567
|
+
xm(u).catch(function(){}),5);case 5:u.mb=null,u.lc=null,u.kc=null,Mm(a,u);case 3:return F(C,fn(a,b,q,h,k,c,m,n),2);case 2:return qj(c.Y,b.mb)||(b.mb=c.Y,c.l&&c.Y&&(w=cn(a,b,c.Y),v=function(){var E,H,B,D,I,K,J,L,N;return Q(function(O){switch(O.g){case 1:return xa(O,2),F(O,w,4);case 4:return E=O.h,Wg(a.l),H=null,B=new Map,D={projection:null,hfov:null},I=new dh,I.box("moov",ih).box("trak",ih).box("mdia",ih).R("mdhd",function(M){H=Bi(M.reader,M.version).timescale}).box("hdlr",function(M){M=M.reader;M.skip(8);
|
|
568
|
+
switch(M.Vc()){case "soun":B.set(e.ea,H);break;case "vide":B.set(e.Ca,H)}H=null}),b.type===e.Ca&&I.box("minf",ih).box("stbl",ih).R("stsd",kh).box("encv",lh).box("avc1",lh).box("avc3",lh).box("hev1",lh).box("hvc1",lh).box("dvav",lh).box("dva1",lh).box("dvh1",lh).box("dvhe",lh).box("dvc1",lh).box("dvi1",lh).box("vexu",ih).box("proj",ih).R("prji",function(M){M=M.reader.Vc();D.projection=M}).box("hfov",function(M){M=M.reader.T()/1E3;D.hfov=M}),I.parse(E,!0,!0),b.type===e.Ca&&gn(a,D),B.has(b.type)?c.Y.timescale=
|
|
569
|
+
B.get(b.type):null!=H&&(c.Y.timescale=H),K=b.stream.segmentIndex,K instanceof Ml&&(J=Ol(K,c.startTime)),L=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,F(O,a.g.Kh(b.type,E),5);case 5:return F(O,Kk(a.g.Z,b.type,E,null,b.stream,L,b.Yc,d,!1,!1,J),6);case 6:Aa(O,0);break;case 2:throw N=Ba(O),b.mb=null,N;}})},y=c.startTime,f&&(z=Hk(a.g.Z,b.type),null!=z&&(y=z)),a.g.xk(y,c.Y),g.push(v()))),A=b.Ia?b.Ia.i:-1,c.i!=A&&g.push(Wk(a.g.Z,b.type,c.startTime)),F(C,Promise.all(g),0)}})}
|
|
570
|
+
function fn(a,b,c,d,e,f,g,h){var k,l,m,n,q;return Q(function(r){switch(r.g){case 1:k=yc;l=Rm(a);xa(r,2);b.lc=d;b.kc=e;g&&(b.df=g);h&&(b.ef=h);b.gf=c;m=a.j.sequenceMode||"HLS"==a.j.type;n=null;b.type===k.Ca?n=a.h.get(k.ea):b.type===k.ea&&(n=a.h.get(k.Ca));if(!(n&&n.stream&&n.stream.isAudioMuxedInVideo)){r.u(4);break}return F(r,Tk(a.g.Z,n.type,c,d,e,m,n.stream.mimeType,n.stream.codecs,l),4);case 4:return F(r,Tk(a.g.Z,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),6);case 6:Aa(r,
|
|
571
|
+
0);break;case 2:throw q=Ba(r),b.lc=null,b.kc=null,b.df=null,b.ef=null,b.gf=null,q;}})}
|
|
572
|
+
function bn(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,q;return Q(function(r){switch(r.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.i.shouldFixTimestampOffset&&(l="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,m=null,e.Y&&(m=e.Y.timescale),(n=l&&m&&"video"===d.type&&"DASH"==a.j.type)&&(new dh).box("moof",ih).box("traf",ih).R("tfdt",function(u){var w,v,y,z,A,C;return Q(function(E){w=Ai(u.reader,u.version);v=w.baseMediaDecodeTime;if(!v)return E.return();y=-v/
|
|
573
|
+
m;z=Number(b.gf)||0;if(!(z<y))return E.u(0);A=b.lc;C=b.kc;return F(E,fn(a,b,y,A,C,e),0)})}).parse(f,!1,g)),F(r,en(a,b,c),2);case 2:return Wg(a.l),q=b.Yc,b.Yc=!1,F(r,a.g.Kh(b.type,f),3);case 3:return F(r,Kk(a.g.Z,b.type,f,e,d,k,q,h,g),4);case 4:Wg(a.l),G(r)}})}
|
|
574
|
+
function en(a,b,c){var d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g){d=b.stream.segmentIndex;d instanceof Ml&&(d.$a(a.j.presentationTimeline.Gb()),e=[],Nl(d,function(r){e.push(r.Pe())}));f=Math.max(a.i.bufferBehind*a.C,a.j.presentationTimeline.h);g=Fk(a.g.Z,b.type);if(null==g)return a.F==b&&(a.F=null),q.return();h=c-g;k=a.i.evictionGoal;l=a.j.presentationTimeline.Xb();m=a.j.presentationTimeline.Fb();n=h-f;m-l>k&&(n=Math.max(h-f,l-k-g));return n<=k?q.return():F(q,a.g.Z.remove(b.type,g,g+n,e),2)}if(4!=
|
|
575
|
+
q.g)return Wg(a.l),a.F?F(q,en(a,a.F,c),4):q.u(0);Wg(a.l);G(q)})}function Wm(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
576
|
+
function cn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.Yb())return l.return(e);f=null;if(b.$){var m=b.$,n=m.h;c instanceof pj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.sh=d),f=m.ae):f=null}f||(f=Sm(c,b.stream,d||null,a.i.retryParameters,a.g.pc));g=0;b.sa&&(g=b.sa.h);b.Hb=f;return F(l,f.promise,2);case 2:h=l.h;b.Hb=null;k=h.data;if(!c.aesKey){l.u(3);break}return F(l,sm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
577
|
+
function Sm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof rj?a:void 0,h=g?1:0;a=tm(a.O(),a.startByte,a.endByte,d,c);a.contentType=b.type;return e.request(Tg,a,{type:h,stream:b,segment:g,isPreload:f})}
|
|
578
|
+
function Om(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Ic=!1,b.Sf=!1,b.Oe=0,b.Kc=!0,b.Ia=null,b.sa=null,b.$&&!a.m.has(b.stream)&&km(b.$),d?(e=a.g.Qc(),f=a.g.Z.getDuration(),F(g,a.g.Z.remove(b.type,e+d,f),3)):F(g,Sk(a.g.Z,b.type),4);if(3!=g.g)return Wg(a.l),c?F(g,a.g.Z.flush(b.type),3):g.u(3);Wg(a.l);b.Kc=!1;b.endOfStream=!1;b.Qa||b.zb||Em(a,b,0);G(g)})}
|
|
579
|
+
function Em(a,b,c){var d=b.type;if(d!=wc||a.h.has(d))b.zb=(new $e(function(){var e;return Q(function(f){if(1==f.g)return xa(f,2),F(f,Tm(a,b),4);if(2!=f.g)return Aa(f,0);e=Ba(f);if(a.g)a.g.onError(e);G(f)})})).ia(c)}function wm(a){null!=a.zb&&(a.zb.stop(),a.zb=null)}function xm(a){return Q(function(b){return a.Hb?F(b,a.Hb.abort(),0):b.u(0)})}
|
|
580
|
+
function Um(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.Qa=!1,wm(b),Em(a,b,0),e.return()):F(e,ug(a.S),2);Wg(a.l);if(1===c.category&&1003!=c.code){if(b.Fc)return Gm(a,!1),e.return();d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.i.failureCallback(c);G(e)})}
|
|
581
|
+
function hn(a,b){b=void 0===b?!1:b;var c=void 0===c?!0:c;var d,e,f,g,h;return Q(function(k){if(1==k.g){d=Date.now()/1E3;e=a.i.minTimeBetweenRecoveries;if(!b){if(!a.i.allowMediaSourceRecoveries||d-a.M<e)return k.return(!1);a.M=d}f=yc;if(g=a.h.get(f.ea))g.mb=null,g.lc=null,g.kc=null,c&&Mm(a,g),xm(g).catch(function(){}),g.sa&&g.sa.dh(),wm(g);if(h=a.h.get(f.Ca))h.mb=null,h.lc=null,h.kc=null,c&&Mm(a,h),xm(h).catch(function(){}),h.sa&&h.sa.dh(),wm(h);return F(k,el(a.g.Z,Rm(a)),2)}!h||h.Kc||h.Qa||h.zb||
|
|
582
|
+
Em(a,h,0);!g||g.Kc||g.Qa||g.zb||Em(a,g,0);return k.return(!0)})}function gn(a,b){if(a.N.projection!=b.projection||a.N.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new V("spatialvideoinfo",c)}else c=new V("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.N=b}}function Pm(a){return"keep"!==a.i.crossBoundaryStrategy?!0:!1}
|
|
583
|
+
function Qm(a){if(Pm(a)){a.H.stop();var b=a.g.Qc(),c=a.h.get("video")||a.h.get("audio");c&&(c=c.mb)&&null!==c.g&&(b=c.g-b,0>b||1<b||(a.G=c.g+.1,a.H.ia(b)))}}
|
|
584
|
+
function Ym(a,b,c){if(b.type===wc)return!1;var d=b.mb;if(!d)return!1;var e=c.Y;c=d.g!==e.g;"reset_to_encrypted"===a.i.crossBoundaryStrategy&&(d.encrypted||e.encrypted||(c=!1),d.encrypted&&(a.i.crossBoundaryStrategy="keep"));"RESET_ON_ENCRYPTION_CHANGE"===a.i.crossBoundaryStrategy&&d.encrypted==e.encrypted&&(c=!1);if(c&&b.Yc){var f=a.g.video,g=f.paused;hn(a,!0).then(function(){var h=(new Map).set("oldEncrypted",d.encrypted).set("newEncrypted",e.encrypted);a.g.onEvent(new V("boundarycrossed",h));g||
|
|
585
|
+
f.play()})}return c}function Rm(a,b){b=void 0===b?!1:b;var c=new Map;a.o.audio&&c.set("audio",a.o.audio);a.o.video&&c.set("video",a.o.video);b&&a.A&&c.set(wc,a.A);return c};function jn(){}
|
|
586
|
+
function kn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=fd(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=fd(n)),m=kn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(ab("Invalid config, wrong type for "+m),
|
|
587
|
+
k=!1):"function"==typeof c[l]&&c[l].length!=b[l].length?(bb("Unexpected number of arguments for "+m),a[l]=b[l]):a[l]=Array.isArray(a[l])?b[l].slice():b[l]:(ab("Invalid config, unrecognized key "+m),k=!1)}return k}function ln(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 mn(a,b){return a&&b}
|
|
588
|
+
function nn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
|
|
589
|
+
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0<Object.keys(l).length||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?Vc(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&"object"===typeof f&&!Array.isArray(f)}a=d(a,b);c(a);return a}T("shaka.util.ConfigUtils",jn);jn.getDifferenceFromConfigObjects=nn;jn.convertToConfigObject=ln;jn.mergeConfigObjects=kn;T("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function on(){}function pn(a){a=dc(a);return(new Bb(a)).Cb}function qn(a,b,c){function d(h){Yb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Tb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new U(2,6,6015);var e;"string"==typeof b?e=fc(b,!0):e=b;a=dc(a);a=fc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function rn(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dc(a).split("skd://").pop();return qn(a,c,b)}
|
|
590
|
+
function sn(a,b){2===a&&(a=b.drmInfo)&&pg(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}T("shaka.drm.FairPlay",on);
|
|
591
|
+
on.commonFairPlayResponse=function(a,b){if(2===a&&(a=b.originalRequest.drmInfo)&&pg(a.keySystem)){try{var c=ac(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ub(mc(c)))}};on.muxFairPlayRequest=function(a,b){sn(a,b)};
|
|
592
|
+
on.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&pg(c.keySystem)&&sn(a,b)}};on.conaxFairPlayRequest=function(a,b){sn(a,b)};on.ezdrmFairPlayRequest=function(a,b){sn(a,b)};on.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&pg(a.keySystem)&&(a=Tb(b.body),a=lc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ec("spc="+a))};on.muxInitDataTransform=function(a,b,c){return rn(a,b,c)};
|
|
593
|
+
on.expressplayInitDataTransform=function(a,b,c){return rn(a,b,c)};on.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Xb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return qn(a,d,b)};on.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dc(a).split(";").pop();return qn(a,c,b)};
|
|
594
|
+
on.verimatrixInitDataTransform=function(a,b,c){return rn(a,b,c)};on.initDataTransform=qn;on.defaultGetContentId=pn;on.isFairPlaySupported=function(){var a;return Q(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},xa(b,2),F(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Ba(b);return b.return(!1)})};function tn(){this.g=null}tn.prototype.configure=function(a){this.g=a};tn.prototype.getConfiguration=function(){return this.g};
|
|
595
|
+
tn.prototype.create=function(a){var b;if(this.g.language){var c=un(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(f){return f.primary}),b=b.length?b:a);a=vn(b,this.g.role);a.length&&(b=a);this.g.videoLayout&&(a=wn(b,this.g.videoLayout),a.length&&(b=a));this.g.Ec&&(a=xn(b,this.g.Ec),a.length&&(b=a));var d=[this.g.channelCount,this.g.preferredAudioChannelCount];a=d.filter(function(f,g){return f&&d.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=yn(b,c.value),c.length){b=
|
|
596
|
+
c;break}this.g.Jc&&(a=zn(b,this.g.Jc),a.length&&(b=a));this.g.Ed&&(a=An(b,this.g.Ed),a.length&&(b=a));a=Bn(b,this.g.spatialAudio);a.length&&(b=a);var e=[this.g.audioCodec,this.g.Gd].concat(x(this.g.preferredAudioCodecs));a=e.filter(function(f,g){return f&&e.indexOf(f)===g});if(a.length)for(a=t(a),c=a.next();!c.done;c=a.next())if(c=Cn(b,c.value),c.length){b=c;break}return new ei(b[0],b,!("smooth"==this.g.codecSwitchingStrategy&&Gc()))};
|
|
597
|
+
function un(a,b){b=hf(b);var c=pf(b,a.map(function(d){return of(d)}));return c?a.filter(function(d){return c==of(d)}):[]}function vn(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function zn(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function An(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
598
|
+
function yn(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}function xn(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Dn(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}
|
|
599
|
+
function wn(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Bn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Cn(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function En(){}
|
|
600
|
+
function Fn(){var a=Infinity,b=rb();navigator.connection&&navigator.connection.saveData&&(a=360);var c={retryParameters:tg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(h,k,l){"apple"===window.shakaMediaKeysPolyfill&&"skd"==k&&(k=l.serverCertificate,l=pn(h),h=qn(h,l,k));return h},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,
|
|
601
|
+
minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},d="reload",e=!1;Gc()&&b.cd()&&(d="smooth",e=!0);e={retryParameters:tg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,
|
|
602
|
+
updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
603
|
+
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Gn,manifestPreprocessorTXml:Hn,sequenceMode:!1,multiTypeVariantsAllowed:e,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
|
|
604
|
+
ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:b.bd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Gn,manifestPreprocessorTXml:Hn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};
|
|
605
|
+
var f={trackSelectionCallback:function(h){return Q(function(k){return k.return(h)})},downloadSizeCallback:function(h){var k;return Q(function(l){if(1==l.g)return navigator.storage&&navigator.storage.estimate?F(l,navigator.storage.estimate(),3):l.return(!0);k=l.h;return l.return(k.usage+h<.95*k.quota)})},progressCallback:function(h,k){return mn([h,k])},usePersistentLicense:!0,numberOfParallelDownloads:5},g={drm:c,manifest:e,streaming:{retryParameters:tg(),failureCallback:function(h){return mn([h])},
|
|
606
|
+
rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,
|
|
607
|
+
prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
|
|
608
|
+
preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3},mediaSource:{codecSwitchingStrategy:d,addExtraFeaturesToSourceBuffer:function(h){return mn([h],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(h,k){return mn([h,k])},dispatchAllEmsgBoxes:!1,
|
|
609
|
+
useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:f,abrFactory:function(){return new gg},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(tn,[null].concat(x(Oa.apply(0,arguments)))))},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,
|
|
610
|
+
minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
|
|
611
|
+
preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,
|
|
612
|
+
textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,
|
|
613
|
+
allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};f.trackSelectionCallback=function(h){return Q(function(k){return k.return(In(h,g.preferredAudioLanguage,g.preferredVideoHdrLevel))})};return b.Ua(g)}
|
|
614
|
+
function Jn(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
|
|
615
|
+
function Kn(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return kn(a,b,c||Fn(),d,"")}
|
|
616
|
+
function In(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Dn(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=pf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return hf(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
617
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=wc&&"image"!=c.type||b.push(c);return b}function Gn(a){return mn([a],a)}function Hn(a){return mn([a],a)}T("shaka.util.PlayerConfiguration",En);En.mergeConfigObjects=Kn;En.createDefaultForLL=Jn;En.createDefault=Fn;function Ln(){this.g=null;this.h=[]}function Mn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Nn(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 On(){this.i=this.h=null;this.g=[]}function Pn(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 Qn(){this.B=this.W=NaN;this.l="";this.j=this.gi=this.s=this.A=this.K=this.C=this.o=this.m=this.I=this.F=this.i=this.S=this.U=this.M=this.N=this.P=NaN;this.L=0;this.G=this.H=NaN;this.g=new Ln;this.h=new On}function Rn(a,b,c){a.P=b;a.N=c}function Sn(a,b,c){a.W=b;a.B=c}function Tn(a,b){a.i=isNaN(a.i)?b:Math.max(a.i,b)}function Un(a,b){a.j=isNaN(a.j)?b:a.j+b}
|
|
618
|
+
function Vn(a){var b=a.W,c=a.B,d=a.l,e=a.A,f=a.N,g=a.P,h=a.M,k=a.U,l=a.S,m=a.s,n=a.i,q=a.F,r=a.I,u=a.m,w=Mn(a.g,"playing"),v=Mn(a.g,"paused"),y=Mn(a.g,"buffering"),z=a.o,A=a.C,C=a.K,E=a.gi,H=a.j,B=a.L,D=a.H,I=a.G,K=Nn(a.g),J=[];a=t(a.h.g);for(var L=a.next();!L.done;L=a.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:b,height:c,currentCodecs:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,corruptedFrames:h,
|
|
619
|
+
stallsDetected:k,gapsJumped:l,estimatedBandwidth:m,completionPercent:n,loadLatency:q,manifestTimeSeconds:r,drmTimeSeconds:u,playTime:w,pauseTime:v,bufferingTime:y,licenseTime:z,liveLatency:A,maxSegmentDuration:C,manifestSizeBytes:E,bytesDownloaded:H,nonFatalErrorCount:B,manifestPeriodCount:D,manifestGapCount:I,stateHistory:K,switchHistory:J}};function Wn(a,b,c,d){Fg.call(this);this.N=a;this.W=b;this.Oa=d.networkingEngine;this.m=c;this.A=null;this.Ka=0;this.ab=d.hd;this.F=d.nk;this.eb=d.pk;this.g=d.config;this.l=this.G=this.h=null;this.wa=!1;this.H=d.Ck;this.ya=!1;this.i=null;this.na=!1;this.j=this.C=null;this.ha=!1;this.M=new Map;this.za=!1;this.Pa=d.Bk;this.ba=new Qn;this.va=new vg;this.s=new vg;this.P=null;this.o=!1;this.ka=d.ej;this.U=this.K=null;this.Za=d.dj;this.S=!1;this.L=[];this.I=[];this.B=!0}pa(Wn,Fg);
|
|
620
|
+
function Xn(a,b,c){(a=b?a.I:a.L)?a.push(c):c()}function Yn(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Zn(a,b){a.P=b;a.S=!0;if(a.L){b=t(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=Wn.prototype;p.getStartTime=function(){return this.m};p.nd=function(){return this.N};p.Fg=function(){return this.h};function $n(a){a.ha=!0;return a.j}function ao(a){a.ya=!0;return a.H}p.getStats=function(){return this.ba};
|
|
621
|
+
function bo(a){a.na=!0;return a.i}p.Mj=function(){return this.K?Of(this.K):null};p.Lj=function(){return this.U?Pf(this.U):null};function co(a){a.za=!0;return a.M}function eo(a,b,c){a.j=b;a.C=c}
|
|
622
|
+
p.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return F(c,Promise.resolve(),2);case 2:return xa(c,3),F(c,fo(a),5);case 5:return go(a),F(c,vo(a),6);case 6:go(a);if("webkit"===window.shakaMediaKeysPolyfill){c.u(7);break}return F(c,wo(a),8);case 8:go(a);case 7:if(!a.ka){c.u(9);break}return F(c,xo(a),10);case 10:go(a);case 9:if(!a.ka||!a.i){c.u(11);break}return F(c,$h(a.i),12);case 12:go(a);case 11:a.s.resolve();Aa(c,0);break;case 3:b=Ba(c),b instanceof U&&(7001==
|
|
623
|
+
b.code||7003==b.code)||a.s.reject(b),G(c)}})})()};p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):Fg.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.s.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function go(a){if(a.o)throw new U(2,7,7003);}function yo(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))}
|
|
624
|
+
function fo(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:yo(a,"manifest-parser");a.l||(a.G=yi(a.N,a.W),a.l=a.G(),a.l.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;yo(a,"manifest");if(a.h){h.u(2);break}return F(h,a.l.start(a.N,a.eb),3);case 3:a.h=h.h;case 2:return a.va.resolve(),c=new V("manifestparsed",void 0),F(h,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new U(2,4,4036);zo(a.h);d=oi(a.F,a.h);if(!d){h.u(5);break}e=new V("trackschanged",
|
|
625
|
+
void 0);return F(h,Promise.resolve(),6);case 6:go(a),a.dispatchEvent(e);case 5:f=Date.now()/1E3,g=f-b,a.ba.I=g,G(h)}})}
|
|
626
|
+
function wo(a,b){var c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.h||a.i)return g.return();yo(a,"drm-engine");a.Ka=Date.now()/1E3;a.i=a.ab();a.F.h=a.i;a.i.configure(a.g.drm,function(){return a.B});c=ag(a.h.variants);d=!0;a.h&&a.h.presentationTimeline&&(d=a.h.presentationTimeline.V());return F(g,Ah(a.i,c,a.h.offlineSessionIds,d),2);case 2:go(a);if(!b){g.u(3);break}return F(g,a.i.fc(b),4);case 4:go(a);case 3:return F(g,mi(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new V("trackschanged",
|
|
627
|
+
void 0);return F(g,Promise.resolve(),7);case 7:a.dispatchEvent(f),G(g)}})}p.configure=function(a,b){a=ln(a,b);Kn(this.g,a)};p.getConfiguration=function(){return fd(this.g)};
|
|
628
|
+
function vo(a){var b,c,d,e,f,g;return Q(function(h){a.A||(a.A=a.g.adaptationSetCriteriaFactory(),a.A.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredVariantRole,channelCount:a.g.preferredAudioChannelCount,Ec:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,Jc:a.g.preferredAudioLabel,Ed:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:a.g.preferredAudioCodecs,
|
|
629
|
+
preferredAudioChannelCount:a.g.preferredAudioChannelCount}));a.Za&&(b=a.g.abrFactory,a.C=b,a.j=b(),a.j.configure(a.g.abr));c=Ao(a);if(!c||1!=a.h.variants.length&&"HLS"!=a.h.type)return h.u(0);d=[];e=t([c.video,c.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&d.push(g.createSegmentIndex());return 0<d.length?F(h,Promise.all(d),0):h.u(0)})}
|
|
630
|
+
function xo(a){var b,c,d,e;return Q(function(f){b=Ao(a);if(!b)return f.u(0);c=a.h.presentationTimeline.V();d=[];a.K=b;b.video&&d.push(Bo(a,b.video,c));b.audio&&d.push(Bo(a,b.audio,c));(e=bg(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&eg(b.audio,e,a.g)&&(d.push(Bo(a,e,c)),a.U=e);return F(f,Promise.all(d),0)})}
|
|
631
|
+
function Ao(a){var b=ag(a.h.variants);b=a.A.create(b);a.j.configure(a.g.abr);a.j.setVariants(Array.from(b.values()));return a.j.chooseVariant()}
|
|
632
|
+
function Bo(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new bm(d,b,function(l,m,n){return Sm(l,m,n||null,a.g.streaming.retryParameters,a.Oa,a.B)},!1),a.M.set(b.id,e),b.segmentIndex?k.u(2):F(k,b.createSegmentIndex(),2);f="number"===typeof a.m?a.m:0;g=b.segmentIndex.Wb(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=Rf(b.segmentIndex));return h?c?h.Y?F(k,em(e,h.Y),0):k.u(0):F(k,dm(e,h.startTime),0):k.u(0)})}p.fl=function(){return this.s};
|
|
633
|
+
p.destroy=function(){var a=this,b,c,d;return Q(function(e){switch(e.g){case 1:a.o=!0;if(!a.l||a.wa){e.u(2);break}return F(e,a.l.stop(),2);case 2:if(!a.j||a.ha){e.u(4);break}return F(e,a.j.stop(),4);case 4:a.H&&!a.ya&&a.H.release();if(!a.i||a.na){e.u(6);break}return F(e,a.i.destroy(),6);case 6:if(0<a.M.size&&!a.za)for(b=t(a.M.values()),c=b.next();!c.done;c=b.next())d=c.value,km(d);G(e)}})};
|
|
634
|
+
function zo(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))}T("shaka.media.PreloadManager",Wn);Wn.prototype.destroy=Wn.prototype.destroy;Wn.prototype.waitForFinish=Wn.prototype.fl;Wn.prototype.getPrefetchedTextTrack=Wn.prototype.Lj;Wn.prototype.getPrefetchedVariantTrack=Wn.prototype.Mj;function Co(a,b){Fg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{gd:null,fd:Do,Sc:function(d,e){return Eo(c,"enter",d,e)}},{gd:Fo,fd:Do,Sc:function(d,e){return Eo(c,"enter",d,e)}},{gd:Go,fd:Do,Sc:function(d,e){return Eo(c,"enter",d,e)}},{gd:Do,fd:Fo,Sc:function(d,e){return Eo(c,"exit",d,e)}},{gd:Do,fd:Go,Sc:function(d,e){return Eo(c,"exit",d,e)}},{gd:Fo,fd:Go,Sc:function(d,e){e?Eo(c,"skip",d,e):(Eo(c,"enter",d,e),Eo(c,"exit",d,e))}},{gd:Go,fd:Fo,Sc:function(d,e){return Eo(c,"skip",
|
|
635
|
+
d,e)}}];this.h=new jb;this.h.D(this.i,"regionremove",function(d){c.g.delete(d.region)})}pa(Co,Fg);Co.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Fg.prototype.release.call(this)};
|
|
636
|
+
Co.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Fo:a>d.endTime?Go:Do;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.gd==e&&h.fd==f&&h.Sc(d,b)}}};function Eo(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Fo=1,Do=2,Go=3;function Ho(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new Bb(a)).ob.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Io.get(d))return m.return(e);f=0;g=Ng([a],c);xa(m,2);g.method="HEAD";return F(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];Aa(m,3);break;case 2:k=Ba(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return F(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
637
|
+
e.toLowerCase().split(";").shift():"")}})}
|
|
638
|
+
var Io=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
|
|
639
|
+
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");/*
|
|
640
|
+
@license
|
|
641
|
+
Copyright 2013 Ali Al Dallal
|
|
642
|
+
|
|
643
|
+
Licensed under the MIT license.
|
|
644
|
+
|
|
645
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
646
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
647
|
+
in the Software without restriction, including without limitation the rights
|
|
648
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
649
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
650
|
+
furnished to do so, subject to the following conditions:
|
|
651
|
+
|
|
652
|
+
The above copyright notice and this permission notice shall be included in
|
|
653
|
+
all copies or substantial portions of the Software.
|
|
654
|
+
|
|
655
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
656
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
657
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
658
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
659
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
660
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
661
|
+
SOFTWARE.
|
|
662
|
+
*/
|
|
663
|
+
for(var Jo={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili",
|
|
664
|
+
"be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\u00e0","ca-ES":"Catal\u00e0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",
|
|
665
|
+
cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\u00d6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)",
|
|
666
|
+
"en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\u00f1ol","es-AR":"Espa\u00f1ol (Argentine)","es-419":"Espa\u00f1ol (Latinoam\u00e9rica)","es-CL":"Espa\u00f1ol (Chile)","es-CO":"Espa\u00f1ol (Colombia)","es-EC":"Espa\u00f1ol (Ecuador)","es-ES":"Espa\u00f1ol (Espa\u00f1a)","es-LA":"Espa\u00f1ol (Latinoam\u00e9rica)","es-NI":"Espa\u00f1ol (Nicaragua)","es-MX":"Espa\u00f1ol (M\u00e9xico)",
|
|
667
|
+
"es-US":"Espa\u00f1ol (Estados Unidos)","es-VE":"Espa\u00f1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\u00f8royskt",fr:"Fran\u00e7ais","fr-CA":"Fran\u00e7ais (Canada)","fr-FR":"Fran\u00e7ais (France)","fr-BE":"Fran\u00e7ais (Belgique)","fr-CH":"Fran\u00e7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",
|
|
668
|
+
gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\u00f1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\u00f2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",
|
|
669
|
+
id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\u00cdslenska","is-IS":"\u00cdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",
|
|
670
|
+
ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\u00ee","ku-TR":"Kurd\u00ee",la:"Latin","la-VA":"Latin",lb:"L\u00ebtzebuergesch","li-NL":"L\u00e8mb\u00f6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
|
|
671
|
+
ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\u00e5l)","nb-NO":"Norsk (bokm\u00e5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\u00eb)",
|
|
672
|
+
"nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\u00eas","pt-BR":"Portugu\u00eas (Brasil)","pt-PT":"Portugu\u00eas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\u00e2n\u0103","ro-RO":"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",
|
|
673
|
+
"ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\u00e1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili",
|
|
674
|
+
"sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",
|
|
675
|
+
tlh:"tlhIngan-Hol",tr:"T\u00fcrk\u00e7e","tr-TR":"T\u00fcrk\u00e7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",
|
|
676
|
+
zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},Ko=t(Object.keys(Jo)),Lo=Ko.next();!Lo.done;Lo=Ko.next()){var Mo=Lo.value;Jo[Mo.toLowerCase()]=Jo[Mo]};function No(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return No(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=oe,e=a.fontStyle==pe,f=a.textDecoration.includes(qe);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Oo(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Oo(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
|
|
677
|
+
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
678
|
+
function Oo(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
679
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Po(a,b){var c=[];a=t(Qo(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Po(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=No(d,b);c.push(e)}return c}
|
|
680
|
+
function Qo(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={ig:void 0},c=a.next())d.ig=c.value,b.some(function(e){return function(f){return ce(e.ig,f)}}(d))||b.push(d.ig);return b}
|
|
681
|
+
function Ro(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
682
|
+
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
|
|
683
|
+
function So(a,b){var c=Po(b),d=[];b=a.cues?Array.from(a.cues):[];c=t(c);for(var e=c.next(),f={};!e.done;f={pd:void 0},e=c.next())f.pd=e.value,!b.some(function(g){return function(h){return h.startTime==g.pd.startTime&&h.endTime==g.pd.endTime&&h.text==g.pd.payload?!0:!1}}(f))&&f.pd.payload&&(e=Ro(f.pd))&&d.push(e);b=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-
|
|
684
|
+
d.indexOf(h)});b=t(b);for(c=b.next();!c.done;c=b.next())a.addCue(c.value)}function To(a,b){var c=!1;"disabled"===a.mode&&(c=!0,a.mode="hidden");for(var d=0;d<a.cues.length;){var e=a.cues[d];b(e)?a.removeCue(e):d++}c&&(a.mode="disabled")};function Uo(a){var b=this;this.i=a;this.l=new jb;this.j=null;this.h=new Map;this.g=-1;this.s=!1;this.o=null;this.B=function(){b.l.Ja(b.i,"textchanged",b.m);b.l.Ja(b.j.textTracks,"change",b.A);for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d.value.remove();b.h.clear();b.g=-1;b.j=null};this.m=function(){var c=new Map,d=b.i.Dc();d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;if(b.h.has(e.id)){var f=b.h.get(e.id);e.active||"disabled"===f.track.mode||(f.track.mode="disabled");b.h.delete(e.id)}else{f=
|
|
685
|
+
b.j.ownerDocument.createElement("track");f.kind=Vo(e);var g=f,h=void 0;if(e.label)h=e.label;else if(e.language)if(e.language in Jo)h=Jo[e.language];else{var k=nf(e.language);k in Jo&&(h=Jo[k]+" ("+e.language+")")}h||(h=e.originalTextId,e.language&&e.language!==e.originalTextId&&(h+=" ("+e.language+")"));g.label=h;e.language in Jo&&(f.srclang=e.language);"CHROMIUM"===rb().Da()&&(f.src="data:,WEBVTT");f.track.mode="disabled";b.j.appendChild(f)}c.set(e.id,f);e.active&&(b.g=e.id)}d=t(b.h.values());for(e=
|
|
686
|
+
d.next();!e.done;e=d.next())e.value.remove();-1<b.g&&(c.has(b.g)?(d=c.get(b.g).track,"disabled"===d.mode&&(d.mode=b.s?"showing":"hidden")):b.g=-1);b.h=c};this.A=function(){if(!b.o){var c=b.j;b.o=(new af(function(){b.o=null;if(b.j===c){var d=-1,e=!1;if(b.h.has(b.g)){var f=b.h.get(b.g);"showing"===f.track.mode?(d=b.g,e=!0):"hidden"===f.track.mode&&(d=b.g)}if(!e)for(e=t(b.h),f=e.next();!f.done;f=e.next()){var g=t(f.value);f=g.next().value;g=g.next().value;if("showing"===g.track.mode){d=f;break}else 0>
|
|
687
|
+
d&&"hidden"===g.track.mode&&(d=f)}e=t(b.h);for(f=e.next();!f.done;f=e.next())g=t(f.value),f=g.next().value,g=g.next().value,f!==d&&"disabled"!==g.track.mode&&(g.track.mode="disabled");b.g!==d&&(b.g=d,-1<d&&b.i.jh({id:d}));b.i.oh(-1<d&&"showing"===b.h.get(d).track.mode)}})).ia(0)}};this.l.D(a,"loaded",function(){return b.enableTextDisplayer()});this.enableTextDisplayer()}p=Uo.prototype;p.configure=function(){};
|
|
688
|
+
p.remove=function(a,b){if(this.i)this.h.has(this.g)&&To(this.h.get(this.g).track,function(c){return c.startTime<b&&c.endTime>a});else return!1;return!0};p.append=function(a){this.h.has(this.g)&&So(this.h.get(this.g).track,a)};p.destroy=function(){this.i&&(this.j&&this.B(),this.i=null);this.l&&(this.l.release(),this.l=null);return Promise.resolve()};p.isTextVisible=function(){return this.s};
|
|
689
|
+
p.setTextVisibility=function(a){this.s=a;if(this.h.has(this.g)){var b=this.h.get(this.g).track;"disabled"!==b.mode&&(a=a?"showing":"hidden",b.mode!==a&&(b.mode=a))}else if(this.i&&3===this.i.m)if(b=Array.from(this.i.h.textTracks).filter(function(d){return["captions","subtitles","forced"].includes(d.kind)}),a){a=null;b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"showing"===c.mode){a=null;break}else a||"hidden"!==c.mode||(a=c);a&&(a.mode="showing")}else for(a=t(b),b=a.next();!b.done;b=
|
|
690
|
+
a.next())b=b.value,"showing"===b.mode&&(b.mode="hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.m&&(this.j=this.i.h,this.l.Aa(this.i,"unloading",this.B),this.l.D(this.i,"textchanged",this.m),this.l.D(this.j.textTracks,"change",this.A),this.m())};
|
|
691
|
+
function Vo(a){var b=rb();return a.forced&&"WEBKIT"===b.Da()?"forced":"caption"===a.kind||a.roles&&a.roles.some(function(c){return c.includes("transcribes-spoken-dialog")})&&a.roles.some(function(c){return c.includes("describes-music-and-sound")})?"captions":"subtitles"}T("shaka.text.NativeTextDisplayer",Uo);Uo.prototype.enableTextDisplayer=Uo.prototype.enableTextDisplayer;Uo.prototype.setTextLanguage=Uo.prototype.setTextLanguage;Uo.prototype.setTextVisibility=Uo.prototype.setTextVisibility;
|
|
692
|
+
Uo.prototype.isTextVisible=Uo.prototype.isTextVisible;Uo.prototype.destroy=Uo.prototype.destroy;Uo.prototype.append=Uo.prototype.append;Uo.prototype.remove=Uo.prototype.remove;Uo.prototype.configure=Uo.prototype.configure;function Wo(a,b){wb("SimpleTextDisplayer","Please migrate to NativeTextDisplayer");this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}p=Wo.prototype;p.configure=function(){};p.remove=function(a,b){if(!this.g)return!1;To(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
693
|
+
p.append=function(a){this.g&&So(this.g,a)};p.destroy=function(){this.g&&(To(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Xo(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Xo(this)};function Xo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}
|
|
694
|
+
T("shaka.text.SimpleTextDisplayer",Wo);Wo.prototype.enableTextDisplayer=Wo.prototype.enableTextDisplayer;Wo.prototype.setTextLanguage=Wo.prototype.setTextLanguage;Wo.prototype.setTextVisibility=Wo.prototype.setTextVisibility;Wo.prototype.isTextVisible=Wo.prototype.isTextVisible;Wo.prototype.destroy=Wo.prototype.destroy;Wo.prototype.append=Wo.prototype.append;Wo.prototype.remove=Wo.prototype.remove;Wo.prototype.configure=Wo.prototype.configure;function Yo(){}p=Yo.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};T("shaka.text.StubTextDisplayer",Yo);Yo.prototype.enableTextDisplayer=Yo.prototype.enableTextDisplayer;Yo.prototype.setTextLanguage=Yo.prototype.setTextLanguage;Yo.prototype.setTextVisibility=Yo.prototype.setTextVisibility;
|
|
695
|
+
Yo.prototype.isTextVisible=Yo.prototype.isTextVisible;Yo.prototype.destroy=Yo.prototype.destroy;Yo.prototype.append=Yo.prototype.append;Yo.prototype.remove=Yo.prototype.remove;Yo.prototype.configure=Yo.prototype.configure;function Zo(a,b){var c=this;this.m=!1;this.h=[];this.j=a;this.o=b;this.B=this.s=null;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.A=new af(function(){c.j.paused||$o(c)});ap(this);this.l=new Map;this.i=new jb;this.i.D(document,"fullscreenchange",function(){$o(c,!0)});this.i.D(this.j,"seeking",
|
|
696
|
+
function(){$o(c,!0)});this.i.D(this.j,"ratechange",function(){ap(c)});this.i.D(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.s=e/d:c.s=null});this.C=null;"ResizeObserver"in window&&(this.C=new ResizeObserver(function(){$o(c,!0)}),this.C.observe(this.g));this.F=new Map}p=Zo.prototype;p.configure=function(a){this.B=a;ap(this);$o(this,!0)};
|
|
697
|
+
p.append=function(a){var b=[].concat(x(this.h));a=t(Qo(a));for(var c=a.next(),d={};!c.done;d={jg:void 0},c=a.next())d.jg=c.value,b.some(function(e){return function(f){return ce(f,e.jg)}}(d))||this.h.push(d.jg);this.h.length&&ap(this);$o(this)};
|
|
698
|
+
p.destroy=function(){if(!this.g)return Promise.resolve();this.g.parentElement&&this.o.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.A&&(this.A.stop(),this.A=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.C&&(this.C.disconnect(),this.C=null);return Promise.resolve()};p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});$o(this,c>this.h.length);this.h.length||ap(this);return!0};
|
|
699
|
+
p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){(this.m=a)?(this.g.parentElement||this.o.appendChild(this.g),$o(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function ap(a){a.A&&(a.h.length?a.A.Fa((a.B?a.B.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.A.stop())}
|
|
700
|
+
function bp(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
701
|
+
function cp(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.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.aj:null;l&&(g.push(l.kg),l.Xc&&g.push(l.Xc),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?bp(a,n)||(f=!0):(dp(a,k,e),l=a.l.get(k),n=l.aj,f=!0));0<k.nestedCues.length&&n&&cp(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(q,r){return q.startTime!=
|
|
702
|
+
r.startTime?q.startTime-r.startTime:q.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.Xc?(d.Xc.contains(c)&&d.Xc.removeChild(c),c.appendChild(d.Xc),d.Xc.appendChild(d.kg)):c.appendChild(d.kg)}}function $o(a,b){if(a.g){var c=a.j.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.F.values());for(var d=b.next();!d.done;d=b.next())Ej(d.value);Ej(a.g);a.l.clear();a.F.clear()}a.m&&cp(a,a.h,a.g,c,[])}}
|
|
703
|
+
function dp(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&ep(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.s===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Rc?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Rc?"%":"px");if(a.F.has(c))c=a.F.get(c);else{e=document.createElement("span");var k=g.heightUnits==Rc?"%":"px",l=g.widthUnits==
|
|
704
|
+
Rc?"%":"px",m=g.viewportAnchorUnits==Rc?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.s===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
|
|
705
|
+
g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
|
|
706
|
+
"before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.F.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{kg:f,aj:e,Xc:c})}
|
|
707
|
+
function fp(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sd?c:"left"===a||"start"===a&&b===Vd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Vd?"line-right":"center"}
|
|
708
|
+
function ep(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=gp(c.linePadding,c,a.o);f.paddingRight=gp(c.linePadding,c,a.o);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
709
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=hp(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.setAttribute("translate","no"),l.textContent=
|
|
710
|
+
k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=
|
|
711
|
+
c.letterSpacing;f.fontSize=gp(c.fontSize,c,a.o,a.B?a.B.fontScaleFactor:1);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xd&&(g=1,h=16,a.s&&1>a.s&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wd?(f.width="100%",c.lineAlign==Yd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yd?f.right=d+"%":"end"==c.lineAlign&&(f.left=
|
|
712
|
+
100-d+"%"))));f.lineHeight=c.lineHeight;a=fp(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Wd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Wd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Wd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+
|
|
713
|
+
"%");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==Wd?f.width=c.size+"%":f.height=c.size+"%")}
|
|
714
|
+
function gp(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function hp(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}T("shaka.text.UITextDisplayer",Zo);Zo.prototype.enableTextDisplayer=Zo.prototype.enableTextDisplayer;
|
|
715
|
+
Zo.prototype.setTextLanguage=Zo.prototype.setTextLanguage;Zo.prototype.setTextVisibility=Zo.prototype.setTextVisibility;Zo.prototype.isTextVisible=Zo.prototype.isTextVisible;Zo.prototype.remove=Zo.prototype.remove;Zo.prototype.destroy=Zo.prototype.destroy;Zo.prototype.append=Zo.prototype.append;Zo.prototype.configure=Zo.prototype.configure;function ip(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Po(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
716
|
+
break;case "right":g.push("align:right");break;case Ud:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}T("shaka.text.WebVttGenerator",function(){});function jp(a,b){this.h=a;this.g=b;this.i=void 0;this.s=!1;this.F=!0;this.l=this.B=!1;this.o=this.m=void 0;this.A=0;this.G=!1;this.C=new jb;this.j=null}jp.prototype.setMediaElement=function(a){this.j=a;kp(this)};jp.prototype.configure=function(a){this.g=a};function lp(a){a.s=!1;a.F=!0;a.B=!1;a.l=!1;a.m=0;a.o=0;a.A=0;a.G=!1;a.j=null;a.C.Ra()}function mp(a,b){a.l=b;a.l?a.i==np?a.i=op:a.i==pp&&(a.i=qp):a.i==op?a.i=np:a.i==qp&&(a.i=pp)}
|
|
717
|
+
function rp(a,b){if(a.g&&a.g.enabled&&a.g.version==sp&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.A=b}).catch(function(){a.A=0})}}
|
|
718
|
+
function tp(a,b,c){try{if(!a.g.enabled)return b;var d=up(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=vp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=wp;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=xp;break a}e=void 0}d.ot=e;d.su=
|
|
719
|
+
!0;var f=yp(d);return zp(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function kp(a){a.C.Aa(a.j,"play",function(){a.m||(a.m=Date.now())});a.C.Aa(a.j,"playing",function(){a.o||(a.o=Date.now())})}function up(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
720
|
+
function Ap(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled)if(a=Bp(a,c),d)d=Cp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var e=yp(a);e&&(b.uris=b.uris.map(function(f){return zp(f,e)}))}}function Dp(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
721
|
+
function Ep(a){if(0===a.type)return Fp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?wp:Gp;if("audio"==b)return vp;if("text"==b)return"application/mp4"===a.mimeType?Hp:Ip}}function Jp(a,b){b=a.h.Nb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
722
|
+
function Kp(a,b){b=a.h.Nb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Lp(a,b){var c=a.h.Qb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Gp:return a.videoBandwidth||NaN;case vp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
723
|
+
function Bp(a,b){b=void 0===b?{}:b;Object.assign(b,up(a));b.pr=a.h.ub();var c=b.ot===Gp||b.ot===wp;a.B&&c&&(b.bs=!0,b.su=!0,a.B=!1);null==b.su&&(b.su=a.F);b.v===sp&&(a.h.V()&&(b.ltc=a.h.Ue()),c=!a.G&&a.o&&a.m?a.o-(a.A||a.m):void 0,void 0!=c&&(b.msd=c,a.G=!0));return Dp(a,b)}
|
|
724
|
+
function yp(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
725
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Cp(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=yp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
726
|
+
function zp(a,b){if(!b||a.includes("offline:"))return a;a=new Bb(a);a.g.set("CMCD",b);return a.toString()}var xp="m",vp="a",Gp="v",wp="av",Fp="i",Ip="c",Hp="tt",sp=2,np="d",op="ld",pp="h",qp="lh";T("shaka.util.CmcdManager.StreamingFormat",{DASH:np,Ml:op,HLS:pp,Nl:qp,am:"s",OTHER:"o"});function Mp(a){this.h=a;this.g=null}p=Mp.prototype;p.configure=function(a){this.h=a};p.Yh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Np)?1E3*this.g.get(Np):null};p.Wh=function(){return this.h.enabled&&this.g&&this.g.has(Op)?1E3*this.g.get(Op):null};p.Oj=function(){return this.h.enabled&&this.g&&this.g.has(Pp)?this.g.get(Pp):null};p.Pj=function(){return this.h.enabled&&this.g&&this.g.has(Qp)?this.g.get(Qp):null};
|
|
727
|
+
p.getBandwidthEstimate=function(a){var b=this.Wh();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Rp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}T("shaka.util.CmsdManager",Mp);Mp.prototype.getBandwidthEstimate=Mp.prototype.getBandwidthEstimate;Mp.prototype.getRoundTripTime=Mp.prototype.Pj;Mp.prototype.getResponseDelay=Mp.prototype.Oj;Mp.prototype.getEstimatedThroughput=Mp.prototype.Wh;
|
|
728
|
+
Mp.prototype.getMaxBitrate=Mp.prototype.Yh;var Op="etp",Np="mb",Pp="rd",Qp="rtt";function Sp(){this.g=null;this.h=[]}function Tp(a,b){return Q(function(c){if(1==c.g)return a.g?F(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;G(c)})}Sp.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Y(a,b,c){b=void 0===b?null:b;Fg.call(this);var d=this;this.m=Up;this.h=null;this.we=b;this.ba=!1;this.Be=new jb;this.pe=new jb;this.j=new jb;this.bc=new jb;this.wd=new jb;this.F=this.G=this.C=this.I=null;this.Ce=0;this.ka=new Sp;this.N=this.ha=this.W=this.i=this.qc=this.H=this.l=this.le=this.S=this.Gh=this.va=this.L=this.ab=this.ya=this.me=this.P=this.Ka=this.K=this.Zb=null;this.Oa=!1;this.Za=this.s=null;this.ve=1E9;this.Ae=[];this.eb=[];this.Wf=-1;this.g=Vp(this);this.Yf=Jn();this.U=null;
|
|
729
|
+
this.Ee=-1;this.$b=null;this.wa={width:Infinity,height:Infinity};this.ue=new li(this.g,this.wa,null);this.ye=[];this.A=null;this.M=this.g.adaptationSetCriteriaFactory();this.M.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Ec:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Jc:this.g.preferredAudioLabel,Ed:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,
|
|
730
|
+
audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount});this.xd=this.g.preferredTextLanguage;this.se=this.g.preferredTextRole;this.re=this.g.preferForcedSubs;this.qe=[];c&&c(this);this.L=Wp(this);this.va=new Mp(this.g.cmsd);this.I=Xp(this);this.zd=this.na=this.za=this.B=null;this.$f=!1;this.Xf=[];this.Zf=new af(function(){return Q(function(e){if(1==e.g)return d.na?F(e,d.fc(d.zd,!0),3):e.u(0);if(4!=e.g)return F(e,d.load(d.na),
|
|
731
|
+
4);d.$f?d.zd.pause():d.zd.play();d.na=null;d.$f=!1;G(e)})});Yp&&(this.B=Yp(),this.B.configure(this.g.ads),this.wd.D(this.B,"ad-content-pause-requested",function(e){var f;return Q(function(g){if(1==g.g){d.Zf.stop();if(d.na)return g.u(0);d.zd=d.h;d.$f=d.Wd();f=e.saveLivePosition||!1;return F(g,d.Qh(!0,f),3)}d.na=g.h;G(g)})}),this.wd.D(this.B,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.na){var f=d.na;f.m&&e&&("number"===typeof f.m?f.m+=e:f.m.setTime(f.m.getTime()+1E3*e))}d.Zf.ia(.1)}),
|
|
732
|
+
this.wd.D(this.B,"ad-content-attach-requested",function(){return Q(function(e){return d.h||!d.zd?e.u(0):F(e,d.fc(d.zd,!0),0)})}));Zp&&(this.za=Zp(this),this.za.configure(this.g.queue));this.Be.D(window,"online",function(){$p(d);d.eh()});this.xe=new af(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.xe.stop();f&&aq(d,!1,void 0,!1,!1)});
|
|
733
|
+
this.Pa=null;a&&(wb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.fc(a,!0));this.o=null}pa(Y,Fg);function bq(a){null!=a.S&&(Cc(a.S),a.S.release(),a.S=null)}function cq(a,b,c){c||b.lcevc.enabled?(bq(a),null==a.S&&(a.S=new Ac(a.h,a.Gh,b.lcevc,c),a.G&&(a.G.M=a.S))):bq(a)}function dq(a,b){return new V(a,b)}p=Y.prototype;
|
|
734
|
+
p.destroy=function(){var a=this,b;return Q(function(c){switch(c.g){case 1:if(a.m==eq)return c.return();bq(a);b=a.detach();a.m=eq;return F(c,b,2);case 2:return F(c,a.ng(),3);case 3:a.Be&&(a.Be.release(),a.Be=null);a.pe&&(a.pe.release(),a.pe=null);a.j&&(a.j.release(),a.j=null);a.bc&&(a.bc.release(),a.bc=null);a.wd&&(a.wd.release(),a.wd=null);a.Za=null;a.g=null;a.A=null;a.we=null;a.L=null;a.va=null;if(!a.I){c.u(4);break}return F(c,a.I.destroy(),5);case 5:a.I=null;case 4:a.s&&(a.s.release(),a.s=null),
|
|
735
|
+
a.za&&(a.za.destroy(),a.za=null),Fg.prototype.release.call(a),G(c)}})};function fq(a,b){gq.set(a,b)}function hq(a,b){a.dispatchEvent(dq("onstatechange",(new Map).set("state",b)))}
|
|
736
|
+
p.fc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return Q(function(g){switch(g.g){case 1:if(c.m==eq)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return F(g,c.detach(),2);case 2:return F(g,iq(c,"attach"),4);case 4:if(g.h)return g.return();xa(g,5,6);d||(hq(c,"attach"),e=function(){var h=jq(c,!1);h&&kq(c,h)},c.pe.D(a,"error",e),c.h=a,c.L&&c.L.setMediaElement(a));rb();if(!b||!wi()||c.G){g.u(6);break}return F(g,lq(c),6);case 6:Ca(g);c.ka.release();Da(g,0);break;case 5:return f=
|
|
737
|
+
Ba(g),F(g,c.detach(),10);case 10:throw f;}})};p.fj=function(a){this.Gh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){if(1==c.g){if(b.m==eq)throw new U(2,7,7E3);return F(c,b.vc(!1,a),2)}if(3!=c.g)return F(c,iq(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.pe.Ra(),b.h=null),hq(b,"detach"),b.B&&!a&&b.B.release()}finally{b.ka.release()}G(c)})};
|
|
738
|
+
function iq(a,b){var c;return Q(function(d){return 1==d.g?(c=++a.Ce,F(d,Tp(a.ka,b),2)):c!=a.Ce?(a.ka.release(),d.return(!0)):d.return(!1)})}
|
|
739
|
+
p.vc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q,r,u,w;return Q(function(v){switch(v.g){case 1:return c.m!=eq&&(c.m=Up),F(v,iq(c,"unload"),2);case 2:if(v.h)return v.return();ya(v,3);c.Oa=!1;hq(c,"unload");bq(c);d=c.qe.map(function(y){return y()});c.qe=[];return F(v,Promise.all(d),5);case 5:c.dispatchEvent(dq("unloading"));c.me&&(c.me.release(),c.me=null);c.ya&&(c.ya.release(),c.ya=null);c.ab&&(c.ab.release(),c.ab=null);c.h&&(c.j.Ra(),c.bc.Ra());c.xe.stop();c.Zb&&
|
|
740
|
+
(c.Zb.release(),c.Zb=null);c.Ka&&(c.Ka.stop(),c.Ka=null);if(!c.H){v.u(6);break}return F(v,c.H.stop(),7);case 7:c.H=null,c.qc=null;case 6:if(!c.s){v.u(8);break}return F(v,c.s.stop(),8);case 8:if(!c.l){v.u(10);break}return F(v,c.l.destroy(),11);case 11:c.l=null;case 10:c.K&&(c.K.release(),c.K=null);c.F&&(c.F.release(),c.F=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.C){v.u(12);break}return F(v,c.C.destroy(),13);case 13:c.C=null;case 12:if(!c.G){v.u(14);break}return F(v,c.G.destroy(),15);case 15:c.G=
|
|
741
|
+
null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=null);b||c.Zf.stop();c.L&&lp(c.L);c.va&&(c.va.g=null);if(!c.o){v.u(16);break}return F(v,c.o.destroy(),17);case 17:c.o=null;case 16:c.ba=!1;if(c.h){e=t(c.Xf);for(f=e.next();!f.done;f=e.next())g=f.value,g.src.startsWith("blob:")&&URL.revokeObjectURL(g.src),g.remove();c.Xf=[];Dj(c.h)&&c.h.load()}if(!c.C){v.u(18);break}return F(v,c.C.destroy(),19);case 19:c.C=null;case 18:c.Pa&&c.W!=c.Pa.nd()&&(c.Pa.o||c.Pa.destroy(),c.Pa=null);
|
|
742
|
+
c.W=null;c.ha=null;c.P=null;if(c.i){h=t(c.i.variants);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=t([l.audio,l.video]),n=m.next();!n.done;n=m.next())(q=n.value)&&q.segmentIndex&&q.segmentIndex.release();r=t(c.i.textStreams);for(u=r.next();!u.done;u=r.next())w=u.value,w.segmentIndex&&w.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Ef.clear(),rg.clear());c.i=null;c.A=new Qn;c.Fh=null;c.$b=null;c.U=null;c.Ee=-1;c.Ae=[];c.eb=[];c.Wf=-1;c.I&&c.I.Mh();mq(c);case 3:Ca(v);c.ka.release();
|
|
743
|
+
Da(v,4);break;case 4:rb();if(a&&wi()&&!c.G&&c.h)return F(v,lq(c),0);v.u(0)}})};p.cl=function(a){this.N=a};
|
|
744
|
+
p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,u,w,v,y;return Q(function(z){switch(z.g){case 1:if(d.m==eq)throw new U(2,7,7E3);e=null;f="";if(a instanceof Wn){if(a.o)throw new U(2,7,7006);e=a;f=e.nd()||""}else f=a||"";return F(z,Tp(d.ka,"load"),2);case 2:d.ka.release();if(!d.h)throw new U(2,7,7002);if(!d.W){z.u(3);break}d.W=f;return F(z,d.vc(!1),3);case 3:g=++d.Ce;h=function(){return Q(function(A){if(1==A.g)return d.Ce==g?A.u(0):e?F(A,e.destroy(),3):A.u(3);throw new U(2,
|
|
745
|
+
7,7E3);})};k=function(A,C){return Q(function(E){switch(E.g){case 1:return ya(E,2),F(E,Tp(d.ka,C),4);case 4:return F(E,h(),5);case 5:return F(E,A(),6);case 6:return F(E,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ca(E),d.ka.release(),Da(E,0)}})};xa(z,5,6);null==b&&e&&(b=e.getStartTime());d.N=b;d.Oa=!1;d.dispatchEvent(dq("loading"));if(e){c=e.W;z.u(8);break}if(c){z.u(8);break}return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,nq(d,f),2);c=A.h;G(A)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Zn(e,
|
|
746
|
+
d);d.A=e.getStats();z.u(11);break}return F(z,oq(d,f,b,c,!0,d.g),12);case 12:(e=z.h)?(e.B=!1,Zn(e,d),d.A=e.getStats(),e.start(),e.s.catch(function(){})):d.A=new Qn;case 11:m=!e;n=Date.now()/1E3;d.A=e?e.getStats():new Qn;d.W=f;d.ha=c||null;mq(d);q=function(){var A=d.Nb(),C={start:0,end:0};if(A.total.length){C.start=Infinity;A=t(A.total);for(var E=A.next();!E.done;E=A.next())E=E.value,E.start<C.start&&(C.start=E.start),E.end>C.end&&(C.end=E.end)}return C};d.ya=new Zl(q);d.ya.addEventListener("regionadd",
|
|
747
|
+
function(A){pq(d,A.region,"metadataadded")});if(m)return F(z,k(function(){return Q(function(A){return F(A,qq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.ab=new Zl(q);return F(z,k(function(){return Q(function(A){if(1==A.g)return F(A,Promise.race([e.va,e.s]),2);d.qc=e.G;var C=e;C.wa=!0;d.H=C.l;d.i=e.Fg();G(A)})},"waitForFinish"),15);case 15:if(d.G){z.u(16);break}return F(z,k(function(){return Q(function(A){return F(A,lq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&
|
|
748
|
+
(d.o.enableTextDisplayer?d.o.enableTextDisplayer():wb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),F(z,k(function(){return Q(function(A){return F(A,e.s,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.ue=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.me=ao(e);d.le=e.Pa;if(r=e.A)d.M=r;l&&d.h&&"AUDIO"===d.h.nodeName&&(rq(d),d.configure("manifest.disableVideo",!0));if(e.i){z.u(19);break}return F(z,k(function(){return Q(function(A){return F(A,
|
|
749
|
+
wo(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.C=bo(e),F(z,k(function(){return Q(function(A){return F(A,d.C.fc(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(u=e.C)||d.Za&&d.Za==u||(d.s=$n(e),d.Za=e.C,"function"!=typeof d.s.setMediaElement&&(wb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(wb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),
|
|
750
|
+
d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(wb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),w=co(e),v=e.K,F(z,k(function(){return Q(function(A){return F(A,sq(d,n,v,w),0)})},"loadInner_"),22);case 22:Yn(e);d.ha&&rb().Wi()&&Pe(d.ha)&&wk(d.G,d.W,d.ha);z.u(14);break;case 23:return F(z,k(function(){return Q(function(A){return F(A,tq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(dq("loaded"));
|
|
751
|
+
case 6:Ca(z);if(!e){z.u(25);break}return F(z,e.destroy(),25);case 25:d.Pa=null;Da(z,0);break;case 5:y=Ba(z);if(!y||7E3==y.code){z.u(27);break}return F(z,d.vc(!1),27);case 27:throw y;}})};function rq(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
|
|
752
|
+
p.Yk=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,uq(c),2):3!=e.g?(d=e.h,F(e,c.vc(a,b),3)):e.return(d)})};p.Qh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?F(e,uq(c,b),2):3!=e.g?(d=e.h,F(e,c.detach(a),3)):e.return(d)})};
|
|
753
|
+
function uq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.qc&&a.W&&a.g))return e.u(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return F(e,vq(a,a.W,d,a.ha,a.g,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.ye.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.qc;f.h=a.i;f.l=g;f.G=h;c.A=a.M;c.start();a.i=null;a.H=null;a.qc=null;a.s=null;a.Za=null}return e.return(c)})}
|
|
754
|
+
p.preload=function(a,b,c,d){b=void 0===b?null:b;var e=this,f,g;return Q(function(h){if(1==h.g)return f=Vp(e),Kn(f,d||e.g,Vp(e)),F(h,oq(e,a,b,c,!1,f),2);(g=h.h)?g.start():kq(e,new U(2,7,7005));return h.return(g)})};p.ng=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.ye);for(d=c.next();!d.done;d=c.next())e=d.value,e.o||b.push(e.destroy());a.ye=[];return F(f,Promise.all(b),0)})};
|
|
755
|
+
function oq(a,b,c,d,e,f){e=void 0===e?!1:e;var g,h,k,l,m;return Q(function(n){if(1==n.g)return d?n.u(2):F(n,nq(a,b),3);2!=n.g&&(d=n.h);if(g=wq(a,d))return n.return(null);h=f||a.g;k=!1;l=!0;e&&(a.s&&a.Za==h.abrFactory&&(l=!1),a.h&&"AUDIO"===a.h.nodeName&&(k=!0));m=vq(a,b,c,d||null,h,!e,k,l);m=e?m.then(function(q){q.B=!1;return q}):m.then(function(q){a.ye.push(q);return q});return n.return(m)})}
|
|
756
|
+
function vq(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,r,u,w,v,y,z,A,C,E,H;return Q(function(B){if(1==B.g){k=null;l=fd(e);g&&(l.manifest.disableVideo=!0);m=function(){return k.S&&k.o?null:k};n=function(){return m()?m().getConfiguration():a.g};if(Infinity!=a.wa.width||Infinity!=a.wa.height||a.g.ignoreHardwareResolution)return B.u(2);q=rb();return F(B,q.ic(),3)}2!=B.g&&(r=B.h,a.wa.width=r.width,a.wa.height=r.height);u=new li(l,a.wa,null);w={networkingEngine:a.I,
|
|
757
|
+
filter:function(D){var I,K;return Q(function(J){if(1==J.g)return F(J,mi(u,D),2);if(4!=J.g){I=J.h;if(!I)return J.u(0);K=dq("trackschanged");return F(J,Promise.resolve(),4)}k.dispatchEvent(K);G(J)})},makeTextStreamsForClosedCaptions:function(D){return xq(a,D)},onTimelineRegionAdded:function(D){$l(k.H,D)},onEvent:function(D){return k.dispatchEvent(D)},onError:function(D){return k.onError(D)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},updateDuration:function(){a.l&&k.S&&a.l.updateDuration()},
|
|
758
|
+
newDrmInfo:function(D){var I=k.i,K=I?I.g:null;K&&I.A&&pi(u,K.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",a.V());k.dispatchEvent(dq("manifestupdated",D));Xn(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(D,I,K,J){var L=D;if("com.apple.hls.interstitial"==D&&(L="com.apple.quicktime.HLS",D={startTime:I,endTime:K,values:J},a.B))a.B.onHLSInterstitialMetadata(a,a.h,D);J=t(J);D=J.next();
|
|
759
|
+
for(var N={};!D.done;N={Xg:void 0},D=J.next())N.Xg=D.value,"ID"!=N.Xg.name&&Xn(k,!1,function(O){return function(){yq(a,I,K,L,O.Xg)}}(N))},disableStream:function(D){return a.disableStream(D,a.g.streaming.maxDisabledTime)},addFont:function(D,I){return a.addFont(D,I)}};v=new Zl(function(){return a.Sa()});v.addEventListener("regionadd",function(D){var I=D.region;zq(a,"timelineregionadded",I,k);Xn(k,!1,function(){a.B&&(a.B.onDashTimedMetadata(I),a.B.onDASHInterstitialMetadata(a,a.h,I))})});y=null;l.streaming.observeQualityChanges&&
|
|
760
|
+
(y=new Tl(function(){return a.Nb()}),y.addEventListener("qualitychange",function(D){Aq(a,D.quality,D.position)}),y.addEventListener("audiotrackchange",function(D){Aq(a,D.quality,D.position,!0)}));z=!0;A={pc:a.I,onError:function(D){return k.onError(D)},rf:function(D){Xn(k,!0,function(){if(a.C)a:{var I=D,K=dq("keystatuschanged");a.dispatchEvent(K);var J=Object.keys(I);1==J.length&&""==J[0]&&(J=["00"],I={"00":I[""]});K=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=a.keySystem();for(var N=Zg(a.g.drm.clearKeys),
|
|
761
|
+
O=t(a.i.variants),M=O.next();!M.done;M=O.next()){M=M.value;var P=[];M.audio&&P.push(M.audio);M.video&&P.push(M.video);P=t(P);for(var R=P.next();!R.done;R=P.next()){var S=R.value;R=M.allowedByKeySystem;if(S.keyIds.size)if(S.drmInfos.length&&!N.size){S=t(S.drmInfos);for(var ba=S.next();!ba.done;ba=S.next())if(ba=ba.value,ba.keyIds.size&&ba.keySystem==J){M.allowedByKeySystem=!0;ba=t(ba.keyIds);for(var W=ba.next();!W.done;W=ba.next())if(W=W.value,(W=I[K?"00":W])||a.C.G)M.allowedByKeySystem=M.allowedByKeySystem&&
|
|
762
|
+
!!W&&!ri.includes(W)}}else for(M.allowedByKeySystem=!0,S=t(S.keyIds),ba=S.next();!ba.done;ba=S.next())if(ba=ba.value,(ba=I[K?"00":ba])||a.C.G)M.allowedByKeySystem=M.allowedByKeySystem&&!!ba&&!ri.includes(ba);R!=M.allowedByKeySystem&&(L=!0)}}}if(L&&(Bq(a),!Cq(a)))break a;(I=a.l.o)&&!I.allowedByKeySystem&&aq(a)}})},onExpirationUpdated:function(D,I){var K=dq("expirationupdated");k.dispatchEvent(K);if((K=k.l)&&K.onExpirationUpdated)K.onExpirationUpdated(D,I)},onEvent:function(D){k.dispatchEvent(D);"drmsessionupdate"==
|
|
763
|
+
D.type&&z&&(z=!1,D=Date.now()/1E3-k.Ka,(a.A||k.getStats()).m=D,a.S&&Cc(a.S))}};C=Xp(a,m);Mg(a.I,C);E=function(){return a.hd(A)};H={config:l,pk:w,Ck:v,Bk:y,hd:E,nk:u,networkingEngine:C,ej:f,dj:h};k=new Wn(b,d,c,H);h||eo(k,a.s,a.Za);return B.return(k)})}function nq(a,b){var c,d,e;return Q(function(f){if(1==f.g)return c=a.g.manifest.retryParameters,F(f,Ho(b,a.I,c),2);d=f.h;"application/x-mpegurl"==d&&(e=rb(),"WEBKIT"===e.Da()&&(d="application/vnd.apple.mpegurl"));return f.return(d)})}
|
|
764
|
+
function wq(a,b){if(!wi(rb()))return!0;if(b){if(""==(a.h||xi()).canPlayType(b))return!1;if(!wi(rb())||!ui.has(b))return!0;if(Pe(b))return"WEBKIT"===rb().Da()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1}
|
|
765
|
+
function Dq(a){var b=a.g.textDisplayFactory;if(a.Fh!==b){var c=a.o;a.o=b();a.o.configure?a.o.configure(a.g.textDisplayer):wb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.o.setTextLanguage||wb("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');c?(a.o.setTextVisibility(c.isTextVisible()),c.destroy().catch(function(){})):a.o.setTextVisibility(a.ba);a.G&&bl(a.G,a.o);a.Fh=b;a.l&&Km(a.l)}else a.o&&a.o.configure&&a.o.configure(a.g.textDisplayer)}
|
|
766
|
+
function lq(a){var b,c,d;return Q(function(e){if(1==e.g)return rb(),hq(a,"media-source"),a.g.mediaSource.useSourceElements&&Dj(a.h),Dq(a),b=Eq(a.h,a.o,{Ej:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),q=n.next();!q.done;q=n.next())yq(a,l,m,"org.id3",q.value);if(a.B)a.B.onHlsTimedMetadata(k,l)}},wk:function(f){a.ab&&$l(a.ab,
|
|
767
|
+
{schemeIdUri:f.schemeIdUri,startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},yk:function(){a.H&&a.H.update&&a.H.update()}},a.S,a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Ka=d,F(e,b.K,2);a.G=b;G(e)})}
|
|
768
|
+
function Fq(a,b,c){function d(){return Gq(a)}a.j.D(b,"playing",d);a.j.D(b,"pause",d);a.j.D(b,"ended",d);a.j.D(b,"ratechange",function(){var f=a.h.playbackRate;0!=f&&(a.K&&(a.K.set(f),a.m==Hq&&a.s.playbackRateChanged(f),Iq(a,f)),f=dq("ratechange"),a.dispatchEvent(f))});b.remote&&(a.j.D(b.remote,"connect",function(){a.l&&"connected"==b.remote.state&&Jq(a);Bq(a)}),a.j.D(b.remote,"connecting",function(){return Bq(a)}),a.j.D(b.remote,"disconnect",function(){return Q(function(f){if(1==f.g)return a.l&&"disconnected"==
|
|
769
|
+
b.remote.state?F(f,hn(a.l),3):f.u(2);2!=f.g&&Jq(a);Bq(a);G(f)})}));b.audioTracks&&(a.j.D(b.audioTracks,"addtrack",function(){return Bq(a)}),a.j.D(b.audioTracks,"removetrack",function(){return Bq(a)}),a.j.D(b.audioTracks,"change",function(){return Bq(a)}));b.videoTracks&&(a.j.D(b.videoTracks,"addtrack",function(){return Bq(a)}),a.j.D(b.videoTracks,"removetrack",function(){return Bq(a)}),a.j.D(b.videoTracks,"change",function(){return Bq(a)}));if(b.textTracks){var e=function(){a.m===Kq&&a.o instanceof
|
|
770
|
+
Uo&&Jq(a);Bq(a)};a.j.D(b.textTracks,"addtrack",function(f){if(f.track)switch(f=f.track,f.kind){case "metadata":Lq(a,f);break;case "chapters":Mq(a,f);break;default:e()}});a.j.D(b.textTracks,"removetrack",e);a.j.D(b.textTracks,"change",e);"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.j.D(b,"waiting",function(){a.l&&Qm(a.l)}),a.j.D(b,"timeupdate",function(){a.l&&Qm(a.l)}))}"none"!=b.preload&&a.j.Aa(b,"loadedmetadata",function(){a.A.F=Date.now()/1E3-c})}
|
|
771
|
+
function sq(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:hq(a,"load");e=a.h;a.K=new Pl({Ve:function(){return e.playbackRate},Pc:function(){return e.defaultPlaybackRate},nh:function(R){e.playbackRate=R},ni:function(R){e.currentTime+=R}});Fq(a,e,b);"onchange"in window.screen&&a.j.D(window.screen,"change",function(){if(a.M.getConfiguration){var R=a.M.getConfiguration();"AUTO"==R.Ec?Cq(a):"AUTO"==a.g.preferredVideoHdrLevel&&a.g.abr.enabled&&
|
|
772
|
+
(R.Ec="AUTO",a.M.configure(R),Cq(a))}});f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Dc(l));cq(a,a.g,f);a.xd=a.g.preferredTextLanguage;a.se=a.g.preferredTextRole;a.re=a.g.preferForcedSubs;Nq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(R,S,ba){a.i&&a.l&&R!=a.l.o&&Oq(a,R,!0,void 0===S?!1:S,void 0===ba?0:ba)});a.s.setMediaElement(e);a.s.setCmsdManager(a.va);a.l=Pq(a);a.l.configure(a.g.streaming);a.m=Hq;
|
|
773
|
+
a.dispatchEvent(dq("streaming"));m=c;case 2:(q=a.l.o)||m||(m=Cq(a)?a.s.chooseVariant():null);r=[];n=q||m;u=t([n.video,n.audio]);for(w=u.next();!w.done;w=u.next())(v=w.value)&&!v.segmentIndex&&(r.push(v.createSegmentIndex()),v.dependencyStream&&r.push(v.dependencyStream.createSegmentIndex()));if(!(0<r.length)){P.u(4);break}return F(P,Promise.all(r),4);case 4:if(!n||0!=n.disabledUntilTime){P.u(2);break}if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?
|
|
774
|
+
a.configure(a.Yf):bb("Low-latency 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."));a.L&&(mp(a.L,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),rp(a.L,1E3*b));Nq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Am(a.l,a.g.playRangeStart,a.g.playRangeEnd);a.Oa=!0;a.dispatchEvent(dq("canupdatestarttime"));y=function(R){a.F=Qq(a,R);a.Zb=Rq(a,R);Sq(a,e,!1)};
|
|
775
|
+
a.g.streaming.startAtSegmentBoundary||(z=a.N,null==z&&a.i.startTime&&(z=a.i.startTime),y(z));if(q){P.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){P.u(8);break}A=a.i.presentationTimeline;a.N instanceof Date&&(E=A.m||A.i,H=a.N.getTime()/1E3-E,null!=H&&(C=H));null==C&&(C="number"===typeof a.N?a.N:a.h.currentTime);null==a.N&&a.i.startTime&&(C=a.i.startTime);B=A.Xb();D=A.Fb();C<B?C=B:C>D&&(C=D);return F(P,Tq(m,C),9);case 9:I=P.h,y(I);case 8:Oq(a,m,!0,!1,0);case 7:return a.F.ready(),K=a.Dc().find(function(R){return R.active}),
|
|
776
|
+
K||((J=bg(a.i.textStreams,a.xd,a.se,a.re)[0]||null)&&Pn(a.A.h,J,!0),m&&(J?(eg(m.audio,J,a.g)&&(a.ba=!0),a.ba&&a.o.setTextVisibility(!0)):(a.ba=!1,a.o.setTextVisibility(!1)),Uq(a)),J&&(a.g.streaming.alwaysStreamText||a.Ng())&&(Jm(a.l,J),Vq(a))),F(P,a.l.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Wq(a));Bq(a);Cq(a);a.i.variants.some(function(R){return R.primary});if((L=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||
|
|
777
|
+
a.g.streaming.vodDynamicPlaybackRate)N=function(){return Xq(a)},a.j.D(e,"timeupdate",N);L||(O=function(){return Yq(a)},a.j.D(e,"timeupdate",O),Yq(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(M=function(){var R;return Q(function(S){if(1==S.g){R=a.Sa().end-a.h.currentTime;if(isNaN(R)||!(R<=a.g.streaming.preloadNextUrlWindow))return S.u(0);a.j.Ja(e,"timeupdate",M);return F(S,a.preload(a.i.nextUrl),4)}a.Pa=S.h;G(S)})},a.j.D(e,"timeupdate",M)),a.j.D(e,"ended",function(){a.load(a.Pa||a.i.nextUrl)})));
|
|
778
|
+
if(a.B)a.B.onManifestUpdated(L);G(P)}})}function qq(a,b){var c,d,e;return Q(function(f){return 1==f.g?(c=Date.now()/1E3,d=!0,a.C=a.hd({pc:a.I,onError:function(g){kq(a,g)},rf:function(){},onExpirationUpdated:function(){var g=dq("expirationupdated");a.dispatchEvent(g)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&d&&(d=!1,a.A.m=Date.now()/1E3-c)}}),a.C.configure(a.g.drm),e=fg([b]),a.C.ha=!0,F(f,Ah(a.C,[e],[]),2)):F(f,a.C.fc(a.h),0)})}
|
|
779
|
+
function tq(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){switch(w.g){case 1:hq(a,"src-equals");d=a.h;a.F=new Bl(d);e=!1;a.qe.push(function(){e=!0});a.dispatchEvent(dq("canupdatestarttime"));null!=a.N&&a.F.Vf(a.N);a.Zb=Zq(a,a.N||0);a.K=new Pl({Ve:function(){return d.playbackRate},Pc:function(){return d.defaultPlaybackRate},nh:function(v){d.playbackRate=v},ni:function(v){d.currentTime+=v}});Sq(a,d,!0);d.textTracks&&(Dq(a),f=function(v){if(!(a.o instanceof Uo)){var y=$q(a).find(function(z){return"disabled"!==
|
|
780
|
+
z.mode});y&&(y.mode=v?"showing":"hidden");a.o instanceof Wo&&(y=ar(a))&&(y.mode=!v&&a.o.isTextVisible()?"showing":"hidden")}},a.j.D(d,"enterpictureinpicture",function(){return f(!0)}),a.j.D(d,"leavepictureinpicture",function(){return f(!1)}),d.remote?(a.j.D(d.remote,"connect",function(){return f(!1)}),a.j.D(d.remote,"connecting",function(){return f(!1)}),a.j.D(d.remote,"disconnect",function(){return f(!1)})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.j.D(d,"webkitcurrentplaybacktargetiswirelesschanged",
|
|
781
|
+
function(){return f(!1)}),g=d,g.webkitSupportsFullscreen&&a.j.D(g,"webkitpresentationmodechanged",function(){return f("inline"!==g.webkitPresentationMode)}));Fq(a,d,b);h=tp(a.L,a.W,c);!h.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(h+="#t=",0<a.g.playRangeStart&&(h+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(h+=","+a.g.playRangeEnd));if(!a.G){w.u(2);break}return F(w,a.G.destroy(),3);case 3:a.G=null;case 2:return Dj(d),d.src=h,k=rb(),"TV"==k.La()&&d.load(),"none"!=d.preload&&
|
|
782
|
+
!d.autoplay&&Pe(c)&&"WEBKIT"===k.Da()&&d.load(),a.m=Kq,a.dispatchEvent(dq("streaming")),l=new vg,sl(d,HTMLMediaElement.HAVE_METADATA,a.j,function(){a.F.ready();a.ha&&Pe(a.ha)||l.resolve()}),m=function(){return new Promise(function(v){var y=new af(v);a.j.D(d.textTracks,"change",function(){return y.ia(.5)});y.ia(.5)})},sl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.j,function(){var v,y,z,A,C;return Q(function(E){if(1==E.g)return F(E,m(),2);if(e)return E.return();br(a);v=$q(a);v.some(function(H){return"showing"===
|
|
783
|
+
H.mode})&&(a.ba=!0,a.o.setTextVisibility(!0));if(!(a.o instanceof Uo))for(v.length&&(a.o.enableTextDisplayer?a.o.enableTextDisplayer():wb("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),y=!1,z=t(v),A=z.next();!A.done;A=z.next())C=A.value,"disabled"!==C.mode&&(y?(C.mode="disabled",bb("Found more than one enabled text track, disabling it",C)):(cr(a,C),y=!0));dr(a);a.ha&&Pe(a.ha)&&l.resolve();G(E)})}),d.error?l.reject(jq(a)):"none"==d.preload&&(bb('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.'),
|
|
784
|
+
l.resolve()),a.j.Aa(d,"error",function(){l.reject(jq(a))}),F(w,ef(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Xq(a)},a.j.D(d,"timeupdate",q);n||(r=function(){return Yq(a)},a.j.D(d,"timeupdate",r),Yq(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Sa().end,a.j.D(d,"progress",function(){var v=a.Sa().end;u!=v&&(a.B.onManifestUpdated(a.V()),u=v)})));
|
|
785
|
+
a.Oa=!0;G(w)}})}function br(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Hi(b,a.g.preferredVariantRole)}function dr(a){var b=a.g.preferredTextLanguage;""!=b&&a.ih(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
786
|
+
function Lq(a,b){if("metadata"==b.kind){b.mode="hidden";a.j.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,yq(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={xc:void 0},f=e.next())g.xc=f.value,"com.apple.quicktime.HLS"==g.xc.type&&null!=g.xc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.xc.startTime&&k.endTime==h.xc.endTime}}(g)),
|
|
787
|
+
f||(f={startTime:g.xc.startTime,endTime:g.xc.endTime,values:[]},d.push(f)),f.values.push(g.xc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.B&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.B.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new af(function(){var d=er(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Jb().ia(.5);
|
|
788
|
+
a.qe.push(function(){c.stop()})}}function pq(a,b,c){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(dq(c,b))}function yq(a,b,c,d,e){a.ya&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),$l(a.ya,b))}function Mq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new af(function(){b.mode="hidden"})).Jb().ia(.5);a.qe.push(function(){c.stop()})}}
|
|
789
|
+
p.Gk=function(){for(var a=this.ka;a.g;)a.release()};p.hd=function(a){return new qh(a)};
|
|
790
|
+
function Xp(a,b){function c(f){b()?b().dispatchEvent(f):a.dispatchEvent(f)}function d(f){b()?Xn(b(),!0,f):f()}b||(b=function(){return null});var e=new Ig(function(f,g,h,k,l){var m=b()?b().j:a.s;m&&m.segmentDownloaded(f,g,h,k,l)},function(f,g,h){g=(new Map).set("headers",f).set("request",g).set("requestType",h);c(dq("downloadheadersreceived",g));d(function(){if(a.va){var k=a.va;if(k.h.enabled){var l=f["cmsd-static"];if(l)try{var m=new Map,n=l.split(",");for(l=0;l<n.length;l++){var q=n[l].split("=");
|
|
791
|
+
m.set(q[0],Rp(q[1]))}}catch(y){}if(m=f["cmsd-dynamic"]){try{var r=new Map,u=m.split(";");for(m=1;m<u.length;m++){var w=u[m].split("=");r.set(w[0],Rp(w[1]))}var v=r}catch(y){v=null}v&&(k.g=v)}}}})},function(f,g){f=(new Map).set("request",f).set("response",g);c(dq("downloadcompleted",f))},function(f,g,h,k){f=(new Map).set("request",f).set("error",g).set("httpResponseCode",h).set("aborted",k);c(dq("downloadfailed",f))},function(f,g,h){d(function(){var k=a.L,l=h;l=void 0===l?{}:l;if(k.g.enabled)if("HEAD"===
|
|
792
|
+
g.method)Ap(k,g);else switch(f){case 0:try{if(k.g.enabled){if(l.type){a:{switch(l.type){case 4:var m=k.l?op:np;break a;case 3:case 2:m=k.l?qp:pp;break a;case 5:m="s";break a}m=void 0}k.i=m}Ap(k,g,{ot:xp,su:!k.s})}}catch(M){cb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Tg:try{if(k.g.enabled){var n=g.uris[0],q=l.segment;m=0;q&&(m=q.endTime-q.startTime);var r={d:1E3*m,st:k.h.V()?"l":"v"};r.ot=Ep(l);var u=r.ot===Gp||r.ot===vp||r.ot===wp||r.ot===Hp,w=l.stream;if(w){var v=
|
|
793
|
+
k.h.ub();if(u&&(r.bl=Jp(k,w.type),r.ot!==Hp)){var y=Kp(k,w.type);r.dl=v?y/Math.abs(v):y}w.bandwidth&&(r.br=w.bandwidth/1E3);if(w.segmentIndex&&q){var z=w.segmentIndex.Wb(q.endTime,!0,0>v);if(z){var A=z.next().value;if(A&&A!=q){if(n&&!Wc(q.O(),A.O())){var C=A.O()[0],E=new URL(C),H=new URL(n);if(E.origin!==H.origin)var B=C;else{for(var D=E.pathname.split("/").slice(1),I=H.pathname.split("/").slice(1,-1);D[0]===I[0];)D.shift(),I.shift();for(;I.length;)I.shift(),D.unshift("..");B=D.join("/")}r.nor=B}if((A.startByte||
|
|
794
|
+
A.endByte)&&(q.startByte!=A.startByte||q.endByte!=A.endByte)){var K=A.startByte+"-";A.endByte&&(K+=A.endByte);r.nrr=K}}}var J=k.h.ub()||1,L=Kp(k,w.type)||500,N=w.bandwidth;var O=N?N*(q.endTime-q.startTime)/1E3/(L/J/1E3)*k.g.rtpSafetyFactor:NaN;isNaN(O)||(r.rtp=O)}}u&&r.ot!==Hp&&(r.tb=Lp(k,r.ot)/1E3);Ap(k,g,r)}}catch(M){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Ap(k,g,{ot:"k"});break;case 4:Ap(k,g,{ot:"o"})}})},function(f,g,h,k){(f=b()?b().l:a.H)&&
|
|
795
|
+
f.banLocation&&f.banLocation(k)},function(f,g){if(g.data){g=g.data.byteLength;var h=b()?b().getStats():a.A;h&&(Un(h,g),0===f&&(h.gi=g))}});e.configure(a.g.networking);return e}function Qq(a,b){return new El(a.h,a.i,a.g.streaming,b,function(){a.Zb&&Sl(a.Zb,!0);a.l&&a.l.Yc();a.P&&fr(a)},function(c){return a.dispatchEvent(c)})}
|
|
796
|
+
function Rq(a,b){var c=a.V()||"number"===typeof b&&0<b;b=new Co(a.me,c);b.addEventListener("enter",function(f){zq(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){zq(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(zq(a,"timelineregionenter",g),zq(a,"timelineregionexit",g))});var d=new Co(a.ya,c);d.addEventListener("enter",function(f){pq(a,f.region,"metadata")});c=new Co(a.ab,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",
|
|
797
|
+
f.region.emsg);a.dispatchEvent(dq("emsg",f))});var e=new Rl(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.le&&e.g.add(a.le);return e}function Zq(a,b){b=new Co(a.ya,b instanceof Date||0<b);b.addEventListener("enter",function(d){pq(a,d.region,"metadata")});var c=new Rl(a.h);c.g.add(b);return c}
|
|
798
|
+
function Sq(a,b,c){a.P=new ii;a.P.g=ki;gr(a);mq(a);a.Ka=new af(function(){fr(a)});a.g.streaming.rebufferingGoal&&a.Ka.Fa(.25);a.j.D(b,"waiting",function(){return fr(a)});a.j.D(b,"canplaythrough",function(){return fr(a)});a.j.D(b,"playing",function(){return fr(a)});a.j.D(b,"seeked",function(){return fr(a)});c&&(a.j.D(b,"stalled",function(){return fr(a)}),a.j.D(b,"progress",function(){return fr(a)}),a.j.D(b,"timeupdate",function(){return fr(a)}))}
|
|
799
|
+
function gr(a){var b=a.g.streaming.rebufferingGoal;a.P.i.set(ji,Math.min(.5,b/2)).set(ki,b)}function fr(a){var b=a.G?yk(a.G):!1,c=a.Wd()||b||a.F.ci(),d=yj(a.h.buffered,a.h.currentTime);b=a.P;var e=b.i.get(b.g),f=b.g;c=c||d>=e&&0<d?ji:ki;b.g=c;(f=f!=c)&&c===ji&&(b.h=Date.now());f&&mq(a)}function Eq(a,b,c,d,e){return new sk(a,b,c,e,d)}
|
|
800
|
+
function Wp(a){return new jp({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Nb:function(){return a.Nb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},ub:function(){return a.ub()},Pb:function(){return a.Pb()},Qb:function(){return a.Qb()},V:function(){return a.V()},Ue:function(){return a.Ue()}},a.g.cmcd)}
|
|
801
|
+
function Pq(a){return new um(a.i,{Qc:function(){return a.F?a.F.De():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},ub:function(){return a.ub()},video:a.h,Z:a.G,pc:a.I,onError:function(b){return kq(a,b)},onEvent:function(b){return a.dispatchEvent(b)},tf:function(b,c,d){var e=b.startTime;b=b.endTime;c=c.type;if(c!=wc){if(a.F){a.F.pi();var f=Fk(a.G,c);!a.V()&&a.h.paused&&!a.h.seeking&&null!=f&&0<f&&a.F.De()<f&&a.F.Vf(f)}fr(a)}d=(new Map).set("start",e).set("end",b).set("contentType",
|
|
802
|
+
c).set("isMuxed",d);a.dispatchEvent(dq("segmentappended",d))},xk:function(b,c){(c=c.rd)&&a.le&&Vl(a.le,c,b)},Kh:function(b,c){var d=a.C;if(d.h.parseInbandPsshEnabled&&!d.G&&["audio","video"].includes(b)){b=new oh(Tb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;Jh(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},disableStream:function(b,
|
|
803
|
+
c){return a.disableStream(b,c)}})}
|
|
804
|
+
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ln(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(wb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(wb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource=a.mediaSource||
|
|
805
|
+
{},a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);if(a.streaming&&"useNativeHlsOnSafari"in a.streaming){wb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var c=rb();a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&"WEBKIT"===c.Da();delete a.streaming.useNativeHlsOnSafari}a.streaming&&"boolean"==typeof a.streaming.liveSync&&(wb("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),
|
|
806
|
+
c=a.streaming.liveSync,a.streaming.liveSync={},a.streaming.liveSync.enabled=c);if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&
|
|
807
|
+
(wb("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(wb("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in
|
|
808
|
+
a.streaming&&(wb("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(wb("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=
|
|
809
|
+
a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(wb("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in a.streaming&&(wb("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),
|
|
810
|
+
a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);a.streaming&&"liveSyncPanicMode"in a.streaming&&(wb("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(wb("streaming.liveSyncPanicThreshold",
|
|
811
|
+
"Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){wb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};
|
|
812
|
+
delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(wb("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(wb("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in
|
|
813
|
+
a.manifest.dash&&(wb("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete a.manifest.dash.enableAudioGroups);a.streaming&&"dispatchAllEmsgBoxes"in a.streaming&&(wb("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource=a.mediaSource||{},a.mediaSource.dispatchAllEmsgBoxes=a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in
|
|
814
|
+
a.streaming&&(wb("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(wb("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);
|
|
815
|
+
a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(wb("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&(wb("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,
|
|
816
|
+
delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(wb("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(wb("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);
|
|
817
|
+
if(a.drm&&a.drm.advanced){c=!1;for(var f in a.drm.advanced){var g=a.drm.advanced[f];d=g.videoRobustness;g=g.audioRobustness;"videoRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].videoRobustness)&&(a.drm.advanced[f].videoRobustness=[d],c=!0);"audioRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].audioRobustness)&&(a.drm.advanced[f].audioRobustness=[g],c=!0)}c&&wb("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&
|
|
818
|
+
"forceHTTP"in a.streaming&&(wb("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTP=a.streaming.forceHTTP,delete a.streaming.forceHTTP);a.streaming&&"forceHTTPS"in a.streaming&&(wb("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),a.networking=a.networking||{},a.networking.forceHTTPS=a.streaming.forceHTTPS,delete a.streaming.forceHTTPS);a.streaming&&"minBytesForProgressEvents"in a.streaming&&
|
|
819
|
+
(wb("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),a.networking=a.networking||{},a.networking.minBytesForProgressEvents=a.streaming.minBytesForProgressEvents,delete a.streaming.minBytesForProgressEvents);f=Kn(this.g,a,Vp(this));hr(this);return f};p.nj=function(a){this.Yf=a};
|
|
820
|
+
function hr(a){a.ue=new li(a.g,a.wa,a.C);if(a.H){var b=fd(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.C&&a.C.configure(a.g.drm);if(a.l){a.l.configure(a.g.streaming);try{a.m!=eq&&ni(a.ue,a.i)&&Bq(a)}catch(c){kq(a,c)}a.s&&Cq(a);b=a.l.o;!b||b.allowedByApplication&&b.allowedByKeySystem||aq(a)}a.I&&a.I.configure(a.g.networking);a.G&&(a.G.configure(a.g.mediaSource),a.G.Ka=a.g.manifest.segmentRelativeVttTiming);a.o&&Dq(a);a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?
|
|
821
|
+
a.s.enable():a.s.disable(),Wq(a));a.P&&gr(a);a.Ka&&(a.g.streaming.rebufferingGoal?a.Ka.Fa(.25):a.Ka.stop());a.i&&Nq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.L&&a.L.configure(a.g.cmcd);a.va&&a.va.configure(a.g.cmsd);a.za&&a.za.configure(a.g.queue)}p.getConfiguration=function(){var a=Vp(this);Kn(a,this.g,Vp(this));return a};p.xj=function(){return this.Yf};p.Zh=function(){var a=Vp(this);Kn(a,this.g,Vp(this));return nn(this.g,Vp(this))};
|
|
822
|
+
p.Vh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Sa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};p.Ci=function(){for(var a in this.g)delete this.g[a];Kn(this.g,Vp(this),Vp(this));hr(this)};p.Fj=function(){return this.m};p.Xh=function(){return this.i?this.i.type:null};p.Jj=function(){return this.h};
|
|
823
|
+
p.Pb=function(){return this.I};p.nd=function(){return this.W};p.Uh=function(){return this.B?this.B:null};p.$h=function(){return this.za?this.za:null};p.V=function(){return this.i&&!this.ua()?this.i.presentationTimeline.V():this.h&&(this.h.src||this.ua())?Infinity==this.h.duration:!1};p.Tc=function(){return this.i?this.i.presentationTimeline.Tc():!1};
|
|
824
|
+
p.ck=function(){if(this.i&&!this.ua()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&(this.h.src||this.ua())?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};p.jk=function(){if(this.i&&!this.ua()){var a=this.i.variants;if(!a.length)return!1;a=a[0];return a.audio||!a.video?!1:!a.video.codecs.includes(",")}return this.h&&(this.h.src||this.ua())&&this.h.audioTracks?0==this.h.audioTracks.length:!1};
|
|
825
|
+
p.Sa=function(){if(this.i&&!this.ua()){if(!this.Oa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Xb(),end:a.Fb()}}if(this.h&&(this.h.src||this.ua())&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};p.Zj=function(){this.V()&&(this.h.currentTime=this.Sa().end)};p.dk=function(){return this.Oa};
|
|
826
|
+
p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.C?this.C.g:null};p.Pd=function(){return this.C?this.C.Pd():Infinity};p.Eg=function(){return this.C?this.C.Eg():[]};p.Te=function(){return this.C?this.C.Te():{}};p.Mg=function(){return this.P?this.P.g==ki:!!this.W};p.ub=function(){return this.h?this.K?this.K.i:1:0};p.Ch=function(a){this.m==Hq&&this.l&&Gm(this.l,a)};
|
|
827
|
+
p.ke=function(a,b){b=void 0===b?!0:b;0==a?bb("A trick play rate of 0 is unsupported!"):(this.K.set(a),this.m==Hq&&(this.s.playbackRateChanged(a),this.Ch(b&&1!=a)),Iq(this,a))};p.Id=function(){var a=this.K.Pc();this.m==Kq&&this.K.set(a);this.m==Hq&&(this.K.set(a),this.s.playbackRateChanged(a),this.Ch(!1));this.bc.Ra()};
|
|
828
|
+
p.Qb=function(){if(this.i&&!this.ua()){for(var a=this.l?this.l.o:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,$f(e)){var f=Of(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}if(this.h&&this.h.audioTracks){var g=ir(this);a=Array.from(this.h.audioTracks);return a.length?a.map(function(h){return Zf(h,g)}):g?[Zf(null,g)]:[]}return[]};
|
|
829
|
+
p.Dc=function(){if(this.i){if(this.ua())return[];for(var a=this.l?this.l.A:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Pf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?$q(this).map(function(f){return Yf(f)}):[]};p.Cj=function(){var a=this.Ae;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Qf(b)})};
|
|
830
|
+
p.qj=function(a){var b=this,c,d;return Q(function(e){if(1==e.g)return F(e,jr(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Eb(function(f){var g=kr(f.tilesLayout||c.tilesLayout);if(g)for(var h=g.rows*g.Lc,k=f.j-f.startTime,l=0;l<h;l++){var m=lr(f,c,f.startTime+k*l/h,g);d.push(m)}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function kr(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Lc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
831
|
+
p.Tj=function(a,b){var c=this,d,e,f,g;return Q(function(h){if(1==h.g)return F(h,jr(c,a),2);d=h.h;if(!d)return h.return(null);e=d.segmentIndex.find(b);if(null==e)return h.return(null);f=d.segmentIndex.get(e);return(g=kr(f.tilesLayout||d.tilesLayout))?h.return(lr(f,d,b,g)):h.return(null)})};
|
|
832
|
+
function jr(a,b){var c,d;return Q(function(e){if(1==e.g){if(a.m!=Hq&&a.m!=Kq)return e.return(null);c=a.Ae;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);null!=b&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.u(2):F(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
|
|
833
|
+
function lr(a,b,c,d){var e=b.width||0,f=b.height||0,g=e/d.Lc,h=f/d.rows,k=d.Lc*d.rows,l=a.j-a.startTime;l=a.B||l/k;var m=a.startTime,n=0,q=0;1<k&&(q=Math.floor((c-a.startTime)/l),m=a.startTime+q*l,n=q%d.Lc*g,q=Math.floor(q/d.Lc)*h);d=!1;if(c=a.thumbnailSprite)d=!0,h=c.height,n=c.positionX,q=c.positionY,g=c.width;return{segment:a,imageHeight:f,imageWidth:e,height:h,positionX:n,positionY:q,startTime:m,duration:l,uris:a.O(),startByte:a.Bc(),endByte:a.zc(),width:g,sprite:d,mimeType:a.mimeType||b.mimeType,
|
|
834
|
+
codecs:a.codecs||b.codecs}}
|
|
835
|
+
p.jh=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.l.A&&(Pn(c.A.h,d,!1),Jm(c.l,d),Jq(c),Vq(c),c.xd=d.language)}var c=this;if(this.i&&this.F&&(b(),!this.ua()))return;(function(){if(c.h&&c.h.textTracks){var d=$q(c),e=d.find(function(h){return Sf(h)===a.id});if(e){if(c.o instanceof Uo){d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f===e?c.ba?"showing":"hidden":"disabled";f.mode!==g&&(f.mode=g)}}else d=d.find(function(h){return"disabled"!==h.mode}),
|
|
836
|
+
d!==e&&(d&&(d.mode="disabled",c.j.Ja(d,"cuechange"),c.o.remove(0,Infinity)),e&&cr(c,e));Jq(c);Vq(c)}}})()};
|
|
837
|
+
function cr(a,b){a.j.D(b,"cuechange",function(){a.o.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(Infinity===f.endTime||f.endTime<f.startTime)f=null;else{var g=new Rd(f.startTime,f.endTime,f.text);g.line="number"===typeof f.line?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
|
|
838
|
+
Xd:1;g.position="number"===typeof f.position?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;"lr"===f.vertical?g.writingMode="vertical-lr":"rl"===f.vertical&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
|
|
839
|
+
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=Rc,g.region.width=f.region.width,g.region.widthUnits=Rc);de(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.o.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
|
|
840
|
+
p.Ef=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&$f(f)){var g=e.l.o;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&bb("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.ua()?Oq(e,f,!1,!1,0):Oq(e,f,!1,b||!1,c||0);e.M.configure({language:f.language,
|
|
841
|
+
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,Ec:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",Jc:f.audio&&f.audio.label?f.audio.label:"",Ed:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:"",Gd:g.audio&&g.audio.codecs?g.audio.codecs:"",Fe:g.audio&&
|
|
842
|
+
g.audio.channelsCount?g.audio.channelsCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount});Cq(e)}}var e=this;b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.ua()))return;(function(){if(a.originalAudioId&&e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,Sf(g)==a.id){mr(e,g);break}}})()};
|
|
843
|
+
p.Ok=function(a,b){function c(){var e=d.M.getConfiguration();e.audioCodec=a.codecs||"";e.Jc=a.label||"";e.channelCount=a.channelsCount||0;e.language=a.language;e.role=a.roles[0]||"";e.spatialAudio=a.spatialAudio;d.M.configure(e);aq(d,!0,b,!1,!1)}var d=this;b=void 0===b?0:b;if(this.i&&this.F&&(c(),!this.ua()))return;(function(){if(d.h&&d.h.audioTracks){var e=hf(a.language),f=Array.from(d.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=h.language||"und";if(h.label==
|
|
844
|
+
a.label&&hf(k)==e&&h.kind==a.roles[0]){g=h;break}}g&&mr(d,g)}})()};
|
|
845
|
+
p.getAudioTracks=function(){if(this.i&&!this.ua()){var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a;this.m!=Hq||this.ua()||(c=a.filter(function(f){return f.originalVideoId===b.originalVideoId&&f.audioCodec}));if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalAudioId;e||null==d.audioId||(e=String(d.audioId));e&&a.set(e,{active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,
|
|
846
|
+
codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage})}return Array.from(a.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(f){var g=f.language;g={active:f.enabled,language:hf(g||"und"),label:f.label,mimeType:null,codecs:null,primary:"main"==f.kind,roles:[],accessibilityPurpose:null,
|
|
847
|
+
channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:g};f.kind&&g.roles.push(f.kind);f.configuration&&(f.configuration.codec&&(g.codecs=f.configuration.codec),f.configuration.sampleRate&&(g.audioSamplingRate=f.configuration.sampleRate),f.configuration.numberOfChannels&&(g.channelsCount=f.configuration.numberOfChannels));return g}):[]};
|
|
848
|
+
p.Qk=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;var d=this.Qb();if(d.length){var e=d.find(function(f){return f.active});e&&(d=d.find(function(f){return f.audioId===e.audioId&&(f.videoBandwidth||f.bandwidth)==a.bandwidth&&f.width==a.width&&f.height==a.height&&f.frameRate==a.frameRate&&f.pixelAspectRatio==a.pixelAspectRatio&&f.hdr==a.hdr&&f.colorGamut==a.colorGamut&&f.videoLayout==a.videoLayout&&f.videoMimeType==a.mimeType&&f.videoCodec==a.codecs}))&&!d.active&&this.Ef(d,b,c)}};
|
|
849
|
+
p.getVideoTracks=function(){if(this.m==Kq||this.ua())return[];var a=this.Qb();if(!a.length)return[];var b=a.find(function(f){return f.active});if(!b)return[];var c=a.filter(function(f){return f.originalAudioId===b.originalAudioId&&f.audioId===b.audioId&&f.audioGroupId===b.audioGroupId&&f.videoCodec});if(!c.length)return[];a=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.originalVideoId;e||null==d.videoId||(e=String(d.videoId));e&&a.set(e,{active:d.active,bandwidth:d.videoBandwidth||
|
|
850
|
+
d.bandwidth,width:d.width,height:d.height,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,mimeType:d.videoMimeType,codecs:d.videoCodec})}return Array.from(a.values())};p.sj=function(){return nr(this.Qb())};p.Rj=function(){return nr(this.Dc())};p.rj=function(){return Array.from(or(this.Qb()))};p.Qj=function(){return Array.from(or(this.Dc()))};
|
|
851
|
+
p.Hi=function(a,b,c,d,e,f,g){function h(){function l(u,w){return u.video||w.video?u.video&&w.video?Math.abs((u.video.height||0)-(w.video.height||0))+Math.abs((u.video.width||0)-(w.video.width||0)):Infinity:0}var m=k.l.o;k.M=k.g.adaptationSetCriteriaFactory();k.M.configure({language:a,role:b||"",channelCount:c||0,Ec:"",spatialAudio:f||!1,videoLayout:"",Jc:g||"",Ed:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,audioCodec:e||"",Gd:m.audio&&m.audio.codecs?m.audio.codecs:"",Fe:m.audio&&
|
|
852
|
+
m.audio.channelsCount?m.audio.channelsCount:0,preferredAudioCodecs:k.g.preferredAudioCodecs,preferredAudioChannelCount:k.g.preferredAudioChannelCount});var n=k.M.create(k.i.variants),q=null;n=t(n.values());for(var r=n.next();!r.done;r=n.next())r=r.value,$f(r)&&(!q||l(q,m)>l(r,m))&&(q=r);q!=m&&(q?(m=Of(q),k.Ef(m,!0,d||0)):aq(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.F&&(h(),!this.ua()))return;(function(){if(k.h&&k.h.audioTracks){var l=
|
|
853
|
+
bg(k.Qb(),a,b||"",!1)[0];l&&k.Ef(l)}})()};p.ih=function(a,b,c){function d(){e.xd=a;e.se=b||"";e.re=c||!1;var f=bg(e.i.textStreams,e.xd,e.se,e.re)[0]||null;f&&f!=e.l.A&&(Pn(e.A.h,f,!1),e.g.streaming.alwaysStreamText||e.Ng())&&(Jm(e.l,f),Jq(e),Vq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.F&&(d(),!this.ua()))return;(function(){var f=bg(e.Dc(),a,b||"",c||!1)[0];f&&e.jh(f)})()};
|
|
854
|
+
p.Pk=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.M=e.g.adaptationSetCriteriaFactory(),e.M.configure({language:f.language,role:"",channelCount:0,Ec:"",spatialAudio:!1,videoLayout:"",Ed:"",Jc:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount}),aq(e,b,c))}var e=
|
|
855
|
+
this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F&&(d(),!this.ua()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&mr(e,g)}})()};p.Ng=function(){var a=this.ba;return this.o?this.o.isTextVisible():a};p.wj=function(){return this.eb.map(function(a){return Pf(a)})};
|
|
856
|
+
p.uj=function(a){wb("getChapters","Please use an getChaptersAsync.");if(!this.eb.length)return[];var b=hf(a);a=this.eb.filter(function(f){return hf(f.language)==b});if(!a.length)return[];var c=[],d=new Set;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,e.segmentIndex&&e.segmentIndex.Eb(function(f){var g=f.O()[0],h=f.startTime+"-"+f.endTime+"-"+g;f={id:h,title:g,startTime:f.startTime,endTime:f.endTime};d.has(h)||(c.push(f),d.add(h))});return c};
|
|
857
|
+
p.vj=function(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b.eb.length)return l.return([]);c=hf(a);d=b.eb.filter(function(m){return hf(m.language)==c});if(!d.length)return l.return([]);e=[];f=new Set;g=t(d);h=g.next();case 2:if(h.done){l.u(4);break}k=h.value;if(k.segmentIndex){l.u(5);break}return F(l,k.createSegmentIndex(),5);case 5:k.segmentIndex.Eb(function(m){var n=m.O()[0],q=m.startTime+"-"+m.endTime+"-"+n;m={id:q,title:n,startTime:m.startTime,endTime:m.endTime};f.has(q)||
|
|
858
|
+
(e.push(m),f.add(q))});h=g.next();l.u(2);break;case 4:return l.return(e)}})};function $q(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function ar(a){return Array.from(a.h.textTracks).find(function(b){return"Shaka Player TextTrack"==b.label})}function er(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}
|
|
859
|
+
p.oh=function(a){a=!!a;this.ba!=a&&(this.ba=a,this.m==Hq?(this.o.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.l.A||(a=bg(this.i.textStreams,this.xd,this.se,this.re),0<a.length&&(Jm(this.l,a[0]),Jq(this),Vq(this))):Fm(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.o.setTextVisibility(a),Uq(this))};
|
|
860
|
+
p.Kj=function(){if(this.F)var a=this.F.De();else{if(null==this.N)return new Date;if(this.N instanceof Date)return this.N;a=this.N}if(this.i&&!this.ua()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};
|
|
861
|
+
p.Gg=function(){if(this.i&&!this.ua()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};p.We=function(){return this.V()?this.i?this.i.presentationTimeline.We():null:null};p.Nb=function(){if(this.m==Hq)return this.G.Nb();var a={total:[],audio:[],video:[],text:[]};this.m==Kq&&(a.total=zj(this.h.buffered));return a};
|
|
862
|
+
p.Ue=function(){if(!this.h||!this.h.currentTime)return null;var a=this.Gg().getTime()+1E3*this.h.currentTime;return Math.floor(Date.now()-a)};
|
|
863
|
+
p.getStats=function(){if(this.m!=Hq&&this.m!=Kq)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,
|
|
864
|
+
switchHistory:[],stateHistory:[]};Gq(this);var a=this.h,b=a.currentTime/a.duration;isNaN(b)||this.V()||Tn(this.A,Math.round(100*b));this.F&&(this.A.S=this.F.Dh(),this.A.U=this.F.Eh());a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),Rn(this.A,Number(b.droppedVideoFrames),Number(b.totalVideoFrames)),this.A.M=Number(b.corruptedVideoFrames));this.A.o=this.C?Th(this.C):NaN;Sn(this.A,a.videoWidth||NaN,a.videoHeight||NaN);this.A.l="";this.V()&&null!=this.Gg()&&(a=this.Ue()||0,this.A.C=a/1E3);b=
|
|
865
|
+
this.Qb().find(function(e){return e.active});a=this.Dc().find(function(e){return e.active});if(b){if(b.bandwidth){var c=this.K?this.K.i:1,d=c*b.bandwidth;a&&a.bandwidth&&(d+=c*a.bandwidth);this.A.A=d}b.width&&b.height&&Sn(this.A,b.width||NaN,b.height||NaN);b=b.codecs;a&&(b+=","+(a.codecs||a.mimeType));b&&(this.A.l=b)}this.m!=Hq||this.ua()||(this.i&&(this.A.H=this.i.periodCount,this.A.G=this.i.gapCount,this.i.presentationTimeline&&(this.A.K=this.i.presentationTimeline.h)),a=this.s.getBandwidthEstimate(),
|
|
866
|
+
this.A.s=a);this.m==Kq&&Un(this.A,NaN);return Vn(this.A)};
|
|
867
|
+
p.Hd=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,r,u,w,v,y,z,A;return Q(function(C){switch(C.g){case 1:if(h.m!=Hq&&h.m!=Kq)throw new U(1,7,7004);"subtitles"!=c&&"captions"!=c&&bb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){C.u(2);break}return F(C,pr(h,a),3);case 3:d=C.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.m!=Kq){C.u(4);break}l=rb();g&&"WEBKIT"===l.Da()&&(c="forced");return F(C,qr(h,a,b,c,d,f||"",k),5);case 5:m=C.h;if(m.track)return Bq(h),
|
|
868
|
+
C.return(Yf(m.track));throw new U(1,2,2012);case 4:n=yc;q=h.Sa();r=q.end-q.start;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new U(1,4,4033);if(!k.length){C.u(6);break}return F(C,rr(h,a,h.I,h.g.streaming.retryParameters),7);case 7:u=C.h,w=sr(h,u,d,k),v=new Blob([w],{type:"text/vtt"}),a=vk(v),d="text/vtt";case 6:y={id:h.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ll(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,
|
|
869
|
+
drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.Ta,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ee(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};z=Ee(y.mimeType,y.codecs);A=Ue(z);if(!A)throw new U(2,2,2014,d);h.i.textStreams.push(y);Bq(h);return C.return(Pf(y))}})};
|
|
870
|
+
p.He=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C;return Q(function(E){switch(E.g){case 1:if(c.m!=Hq&&c.m!=Kq)throw new U(1,7,7004);if(b){E.u(2);break}return F(E,pr(c,a),3);case 3:b=E.h;case 2:if("text/vtt"!=b)throw new U(1,2,2017,a);d=yc;e=c.Sa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new U(1,4,4045);return F(E,rr(c,a,c.I,c.g.streaming.retryParameters),4);case 4:g=E.h;h=Te(b);if(!h)throw new U(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
|
|
871
|
+
segmentEnd:f,vttOffset:0};m=Tb(g);n=k.parseMedia(m,l,a,[]);q=[];r=t(n);u=r.next();for(w={};!u.done;w={Qf:void 0,jd:void 0},u=r.next())w.jd=u.value,w.Qf=null,v=function(H){return function(){null==H.Qf&&(H.Qf=qc([a],[H.jd.payload]));return H.Qf||[]}}(w),y=new rj(w.jd.startTime,w.jd.endTime,v,0,null,null,0,0,Infinity),w.jd.payload.includes("#xywh")&&(z=w.jd.payload.split("#xywh=")[1].split(","),4===z.length&&y.Hf({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
|
|
872
|
+
10)})),q.push(y);A=b;if(!q.length){E.u(5);break}return F(E,Ho(q[0].O()[0],c.I,c.g.manifest.retryParameters),6);case 6:A=E.h;case 5:return C={id:c.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jl(q),mimeType:A||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Tf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
|
|
873
|
+
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ee(A||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Kq?c.Ae.push(C):c.i.imageStreams.push(C),Bq(c),E.return(Qf(C))}})};
|
|
874
|
+
p.Ge=function(a,b,c){var d=this,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z;return Q(function(A){switch(A.g){case 1:if(d.m!=Hq&&d.m!=Kq)throw new U(1,7,7004);if(c){A.u(2);break}return F(A,pr(d,a),3);case 3:c=A.h;case 2:e=yc;f=d.Sa();g=f.end-f.start;d.i&&(g=d.i.presentationTimeline.getDuration());if(Infinity==g)throw new U(1,4,4054);return F(A,rr(d,a,d.I,d.g.streaming.retryParameters),4);case 4:h=A.h;k=Te(c);if(!k)throw new U(2,2,2014,c);l=k();m={periodStart:0,segmentStart:0,segmentEnd:g,vttOffset:0};n=Tb(h);q=
|
|
875
|
+
l.parseMedia(n,m,a,[]);r=[];u=t(q);w=u.next();for(v={};!w.done;v={Qe:void 0},w=u.next())v.Qe=w.value,y=new rj(v.Qe.startTime,v.Qe.endTime,function(C){return function(){return[C.Qe.payload]}}(v),0,null,null,0,0,Infinity),r.push(y);z={id:d.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jl(r),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:null,type:e.Ta,primary:!1,trickModeVideo:null,
|
|
876
|
+
dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ee("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null};d.eb.push(z);Bq(d);return A.return(Pf(z))}})};
|
|
877
|
+
function pr(a,b){var c;return Q(function(d){switch(d.g){case 1:return xa(d,2),F(d,Ho(b,a.I,a.g.streaming.retryParameters),4);case 4:c=d.h;Aa(d,3);break;case 2:Ba(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}
|
|
878
|
+
function qr(a,b,c,d,e,f,g){var h,k,l,m;return Q(function(n){if(1==n.g)return"text/vtt"!=e||g.length?F(n,rr(a,b,a.I,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=sr(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=vk(l),e="text/vtt");m=document.createElement("track");var q=a.L,r=b;try{if(q.g.enabled){var u=up(q);u.ot=Ip;u.su=!0;var w=yp(u);var v=zp(r,w)}else v=r}catch(y){cb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),v=r}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
879
|
+
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);a.Xf.push(m);return n.return(m)})}function rr(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){e=Tg;f=Ng([b],d);f.method="GET";var k=a.L;try{k.g.enabled&&Ap(k,f,{ot:Ip,su:!0})}catch(l){cb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return F(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
880
|
+
function sr(a,b,c,d){var e=Te(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Tb(b),b=c.parseMedia(b,a,null,[]),ip(b,d);throw new U(2,2,2014,c);}p.Vk=function(a,b){this.wa.width=a;this.wa.height=b};p.eh=function(a){if(this.m==Hq){var b=this.l;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.B)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Sd||d.Qa||d.zb||(d.Sd=!1,Em(b,d,a));b=!0}}else b=!1;return b};
|
|
881
|
+
p.Fg=function(){bb("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};p.Gj=function(){return this.qc};
|
|
882
|
+
p.Aj=function(){var a={video:null,audio:null,text:null};if(this.m!=Hq)return a;var b=this.l.o,c=this.h.currentTime;b=t([b.video,b.audio,this.l.A]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==wc&&(a.text=e)}return a};
|
|
883
|
+
function Vp(a){var b=Fn();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.eh(d))}};b.textDisplayFactory=function(){var c=rb();return a.we&&(document.fullscreenEnabled||"WEBKIT"!==c.Da())?new Zo(a.h,a.we):"track"in document.createElement("track")?new Uo(a):new Yo};return b}p.Oi=function(a){this.we=a};
|
|
884
|
+
function xq(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 Ml,l=e.closedCaptions.get(g);h={id:a.ve++,originalId:g,groupId:null,
|
|
885
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:wc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Ee(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
|
|
886
|
+
b.textStreams.push(h);c.add(g)}}
|
|
887
|
+
function Tq(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return Q(function(r){if(1==r.g)return k?k.segmentIndex?r.u(2):F(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Wb(l))?m.next().value:null;if(!n)return r.return(null);q=n.startTime;return r.return(q)})},F(h,e(c,b),2);if(3!=h.g)return f=h.h,F(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)})}
|
|
888
|
+
function mq(a){var b=a.Mg();if(a.A&&a.P&&a.F){if(0==a.g.streaming.rebufferingGoal){var c=a.K;c.j=!1;Ql(c)}else c=a.K,c.j=b,Ql(c);a.L&&(c=a.L,b||c.s||(c.s=!0),c.s&&b&&(c.B=!0),c.F=b);Gq(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ee<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.U&&(a.U=Math.min(a.U+
|
|
889
|
+
++a.Ee*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(dq("buffering",b))}function Iq(a,b){a.bc.Ra();a.bc.D(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.Sa(),e=a.V(),f=e?a.g.streaming.safeSeekOffset:0;0<b?(!e||1<=b)&&Math.floor(c)>=Math.floor(d.end)&&a.Id():Math.floor(c)<=Math.floor(d.start+f)&&a.Id()})}
|
|
890
|
+
function Gq(a){if(a.A&&a.P){var b=a.A.g,c="playing";a.P.g==ki?c="buffering":a.Wd()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(dq("statechanged",c)))}}
|
|
891
|
+
function Xq(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.Vh();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.ke(d,!1):1==e&&b!==a.K.Pc()&&a.Id()}if(c&&(c=a.Sa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
|
|
892
|
+
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
|
|
893
|
+
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.U||"number"!==typeof g||(a.U=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.$b&&null!==a.U&&"number"===typeof g&&a.Ee<n&&Date.now()-a.$b>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
|
|
894
|
+
a.U=Math.max(a.U-(g-f)/2,f+d),a.$b=Date.now());e&&null!==a.U&&(h=a.U+d,k=a.U-d);g=c.end-a.h.currentTime;d=0;a.m==Kq&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.P.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.ke(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.ke(l,!1),a.$b=null):void 0!=k&&m&&g-d<k?(b!=m&&a.ke(m,!1),a.$b=null):b!==a.K.Pc()&&(a.Id(),a.$b=Date.now())}}
|
|
895
|
+
function Yq(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Wf<e?(a.Wf=e,!0):!1},c=a.Sa();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=dq("started");else if(b(25,c))d=dq("firstquartile");else if(b(50,c))d=dq("midpoint");else if(b(75,c))d=dq("thirdquartile");else{if(b(100,c)||100<c)d=dq("complete");a.g&&Infinity!=a.g.playRangeEnd&&
|
|
896
|
+
a.Wd()&&a.h.pause()}d&&a.dispatchEvent(d)}}}function Cq(a){try{qi(a.ue,a.i)}catch(c){return kq(a,c),!1}var b=ag(a.i.variants);b=a.M.create(b);a.s.setVariants(Array.from(b.values()));return!0}function aq(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Cq(a)?a.s.chooseVariant():null)&&Oq(a,f,e,b,c,d)}
|
|
897
|
+
function Oq(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.l.o;if(b==g)d&&Im(a.l,b,d,e,!0);else{var h=a.A.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Im(a.l,b,d,e,f,c);d=null;g&&(d=Of(g));g=Of(b);g.active=!0;if(a.S&&(e=a.S,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.Xh()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
|
|
898
|
+
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=dq("adaptation",c),tr(a,c)):ur(a,d,g);vr(a,d,g)}}function mr(a,b){var c=Array.from(a.h.audioTracks).find(function(e){return e.enabled});b.enabled=!0;if(c){b.id!==c.id&&(c.enabled=!1);var d=ir(a);c=Zf(c,d);b=Zf(b,d);ur(a,c,b);vr(a,c,b)}}function ir(a){return a.h&&a.h.videoTracks?Array.from(a.h.videoTracks).find(function(b){return b.selected}):null}
|
|
899
|
+
function Bq(a){var b=dq("trackschanged");tr(a,b);wr(a)}function ur(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=dq("variantchanged",b);tr(a,b)}function vr(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&wr(a)}function wr(a){var b=dq("audiotrackschanged");tr(a,b)}function Jq(a){var b=dq("textchanged");tr(a,b)}function Uq(a){var b=dq("texttrackvisibility");tr(a,b)}
|
|
900
|
+
function Wq(a){a.g.abr.enabled||$p(a);var b=(new Map).set("newStatus",a.g.abr.enabled);tr(a,dq("abrstatuschanged",b))}function Vq(a){var b=a.Dc().find(function(c){return c.active});b&&a.o&&a.o.setTextLanguage&&a.o.setTextLanguage(b.language)}function $p(a,b){b=void 0===b?!0:b;if(a.m==Hq){a.xe.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Cq(a)}}
|
|
901
|
+
p.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===eq||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.xe.Fa(1);b=this.Nb().video.reduce(function(h,
|
|
902
|
+
k){return h+k.end-k.start},0);aq(this,!1,b,!0,!1);return!0}return!1};
|
|
903
|
+
function kq(a,b){var c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(a.m==eq)return h.return();1===b.severity&&a.A.L++;c=!0;if(!(a.Oa&&a.i&&a.l)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3024!=b.code&&3018!=b.code){h.u(2);break}d=rb();if("WEBKIT"===d.Da()&&3016==b.code)return h.return();xa(h,3);return F(h,hn(a.l),5);case 5:e=h.h;c=!e;e&&(f=dq("mediasourcerecovered"),a.dispatchEvent(f));Aa(h,2);break;case 3:Ba(h),c=!0;case 2:if(!c)return h.return();2===b.severity&&$p(a,!1);g=dq("error",(new Map).set("detail",
|
|
904
|
+
b));a.dispatchEvent(g);g.defaultPrevented&&(b.handled=!0);G(h)}})}p.addFont=function(a,b){return Hj(a,b)};function zq(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(dq(b,a))}
|
|
905
|
+
function Aq(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(dq(d?"audiotrackchanged":"mediaqualitychanged",b))}
|
|
906
|
+
function jq(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new U(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Nq(a,b,c){0<b&&(a.V()||a.Ni(b));b=a.getDuration();c<b&&(a.V()||a.pb(c))}function tr(a,b){Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);a.m!=eq&&a.dispatchEvent(b);G(c)})}
|
|
907
|
+
function or(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(hf(c.language)):b.add("und");return b}
|
|
908
|
+
function nr(a){for(var b=new Map,c=new Map,d=0;d<a.length;d++){var e=a[d],f="und",g=[];e.language&&(f=hf(e.language));"variant"==e.type?g=e.audioRoles:g=e.roles;g&&g.length||(g=[""]);b.has(f)||b.set(f,new Set);g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,b.get(f).add(h),e.label&&(c.has(f)||c.set(f,new Map),c.get(f).set(h,e.label))}var k=[];b.forEach(function(l,m){l=t(l);for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=null;c.has(m)&&c.get(m).has(n)&&(q=c.get(m).get(n));k.push({language:m,
|
|
909
|
+
role:n,label:q})}});return k}p.ua=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};p.Wd=function(){return!this.h||this.h.ended?!0:this.Oa&&!this.V()&&this.h.currentTime>=this.Sa().end};T("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.Wd;Y.prototype.isRemotePlayback=Y.prototype.ua;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.Oi;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Aj;Y.prototype.getManifestParserFactory=Y.prototype.Gj;
|
|
910
|
+
Y.prototype.getManifest=Y.prototype.Fg;Y.prototype.retryStreaming=Y.prototype.eh;Y.prototype.setMaxHardwareResolution=Y.prototype.Vk;Y.prototype.addChaptersTrack=Y.prototype.Ge;Y.prototype.addThumbnailsTrack=Y.prototype.He;Y.prototype.addTextTrackAsync=Y.prototype.Hd;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Nb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.We;Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Gg;
|
|
911
|
+
Y.prototype.getPlayheadTimeAsDate=Y.prototype.Kj;Y.prototype.setTextTrackVisibility=Y.prototype.oh;Y.prototype.getChaptersAsync=Y.prototype.vj;Y.prototype.getChapters=Y.prototype.uj;Y.prototype.getChaptersTracks=Y.prototype.wj;Y.prototype.isTextTrackVisible=Y.prototype.Ng;Y.prototype.selectVariantsByLabel=Y.prototype.Pk;Y.prototype.selectTextLanguage=Y.prototype.ih;Y.prototype.selectAudioLanguage=Y.prototype.Hi;Y.prototype.getTextLanguages=Y.prototype.Qj;Y.prototype.getAudioLanguages=Y.prototype.rj;
|
|
912
|
+
Y.prototype.getTextLanguagesAndRoles=Y.prototype.Rj;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.sj;Y.prototype.getVideoTracks=Y.prototype.getVideoTracks;Y.prototype.selectVideoTrack=Y.prototype.Qk;Y.prototype.getAudioTracks=Y.prototype.getAudioTracks;Y.prototype.selectAudioTrack=Y.prototype.Ok;Y.prototype.selectVariantTrack=Y.prototype.Ef;Y.prototype.selectTextTrack=Y.prototype.jh;Y.prototype.getThumbnails=Y.prototype.Tj;Y.prototype.getAllThumbnails=Y.prototype.qj;
|
|
913
|
+
Y.prototype.getImageTracks=Y.prototype.Cj;Y.prototype.getTextTracks=Y.prototype.Dc;Y.prototype.getVariantTracks=Y.prototype.Qb;Y.prototype.cancelTrickPlay=Y.prototype.Id;Y.prototype.trickPlay=Y.prototype.ke;Y.prototype.useTrickPlayTrackIfAvailable=Y.prototype.Ch;Y.prototype.getPlaybackRate=Y.prototype.ub;Y.prototype.isBuffering=Y.prototype.Mg;Y.prototype.getKeyStatuses=Y.prototype.Te;Y.prototype.getActiveSessionsMetadata=Y.prototype.Eg;Y.prototype.getExpiration=Y.prototype.Pd;
|
|
914
|
+
Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.dk;Y.prototype.goToLive=Y.prototype.Zj;Y.prototype.seekRange=Y.prototype.Sa;Y.prototype.isVideoOnly=Y.prototype.jk;Y.prototype.isAudioOnly=Y.prototype.ck;Y.prototype.isInProgress=Y.prototype.Tc;Y.prototype.isLive=Y.prototype.V;Y.prototype.getQueueManager=Y.prototype.$h;Y.prototype.getAdManager=Y.prototype.Uh;Y.prototype.getAssetUri=Y.prototype.nd;
|
|
915
|
+
Y.prototype.getNetworkingEngine=Y.prototype.Pb;Y.prototype.getMediaElement=Y.prototype.Jj;Y.prototype.getManifestType=Y.prototype.Xh;Y.prototype.getLoadMode=Y.prototype.Fj;Y.prototype.resetConfiguration=Y.prototype.Ci;Y.prototype.getBufferFullness=Y.prototype.Vh;Y.prototype.getNonDefaultConfiguration=Y.prototype.Zh;Y.prototype.getConfigurationForLowLatency=Y.prototype.xj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.nj;
|
|
916
|
+
Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Gk;Y.prototype.destroyAllPreloads=Y.prototype.ng;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Qh;Y.prototype.unloadAndSavePreload=Y.prototype.Yk;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.cl;Y.prototype.unload=Y.prototype.vc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.fj;Y.prototype.attach=Y.prototype.fc;
|
|
917
|
+
Y.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return F(k,ci(),3);case 3:b=k.h;case 2:return c=vi(),d=xk(),e=rb(),F(k,e.ic(),4);case 4:return f=k.h,g={manifest:c,media:d,drm:b,hardwareResolution:f},h=gq,h.forEach(function(l,m){g[m]=l()}),k.return(g)}})};
|
|
918
|
+
Y.isBrowserSupported=function(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))return!1;rb();return wi()?!0:""!=xi().canPlayType("application/x-mpegurl")};Y.setQueueManagerFactory=function(a){Zp=a};Y.setAdManagerFactory=function(a){Yp=a};Y.registerSupportPlugin=fq;Y.prototype.destroy=Y.prototype.destroy;var eq=0,Up=1,Hq=2,Kq=3;
|
|
919
|
+
Y.LoadMode={DESTROYED:eq,NOT_LOADED:Up,MEDIA_SOURCE:Hq,SRC_EQUALS:Kq};Y.version="v4.15.7";var xr=["4","15"];xb=new function(a){this.g=a;this.i=yb;this.h=zb}(new vb(Number(xr[0]),Number(xr[1])));var gq=new Map,Yp=null,Zp=null;function yr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function zr(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ar(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.j=this.h.getVolume();this.l=new jb;this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Ar.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};
|
|
920
|
+
p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};
|
|
921
|
+
p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.m.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){this.h.resize(a,b)};p.setMuted=function(a){(this.m.muted=a)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
922
|
+
p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};
|
|
923
|
+
p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};T("shaka.ads.ClientSideAd",Ar);Ar.prototype.release=Ar.prototype.release;Ar.prototype.getPodIndex=Ar.prototype.getPodIndex;
|
|
924
|
+
Ar.prototype.getTimeOffset=Ar.prototype.getTimeOffset;Ar.prototype.getMediaUrl=Ar.prototype.getMediaUrl;Ar.prototype.getAdvertiserName=Ar.prototype.getAdvertiserName;Ar.prototype.getCreativeAdId=Ar.prototype.getCreativeAdId;Ar.prototype.getAdId=Ar.prototype.getAdId;Ar.prototype.getVastAdId=Ar.prototype.getVastAdId;Ar.prototype.getVastMediaWidth=Ar.prototype.getVastMediaWidth;Ar.prototype.getVastMediaHeight=Ar.prototype.getVastMediaHeight;Ar.prototype.getVastMediaBitrate=Ar.prototype.getVastMediaBitrate;
|
|
925
|
+
Ar.prototype.getDescription=Ar.prototype.getDescription;Ar.prototype.getTitle=Ar.prototype.getTitle;Ar.prototype.getPositionInSequence=Ar.prototype.getPositionInSequence;Ar.prototype.getSequenceLength=Ar.prototype.getSequenceLength;Ar.prototype.setMuted=Ar.prototype.setMuted;Ar.prototype.resize=Ar.prototype.resize;Ar.prototype.isLinear=Ar.prototype.isLinear;Ar.prototype.isMuted=Ar.prototype.isMuted;Ar.prototype.setVolume=Ar.prototype.setVolume;Ar.prototype.getVolume=Ar.prototype.getVolume;
|
|
926
|
+
Ar.prototype.play=Ar.prototype.play;Ar.prototype.pause=Ar.prototype.pause;Ar.prototype.skip=Ar.prototype.skip;Ar.prototype.canSkipNow=Ar.prototype.canSkipNow;Ar.prototype.getTimeUntilSkippable=Ar.prototype.getTimeUntilSkippable;Ar.prototype.isSkippable=Ar.prototype.isSkippable;Ar.prototype.isPaused=Ar.prototype.isPaused;Ar.prototype.getRemainingTime=Ar.prototype.getRemainingTime;Ar.prototype.getMinSuggestedDuration=Ar.prototype.getMinSuggestedDuration;Ar.prototype.getDuration=Ar.prototype.getDuration;
|
|
927
|
+
Ar.prototype.isUsingAnotherMediaElement=Ar.prototype.isUsingAnotherMediaElement;Ar.prototype.hasCustomClick=Ar.prototype.hasCustomClick;Ar.prototype.isClientRendering=Ar.prototype.isClientRendering;Ar.prototype.needsSkipUI=Ar.prototype.needsSkipUI;function Br(){}
|
|
928
|
+
function Cr(a,b){var c=[];a=t(rd(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=vd(d.value,"InLine"))if(d=vd(d,"Creatives")){d=t(rd(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=vd(e,"Linear");f&&Dr(c,b,f);if(e=vd(e,"NonLinearAds")){e=rd(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=vd(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=vd(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=td(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+
|
|
929
|
+
encodeURIComponent(l));var m=yd(k,"width",Ed)||yd(k,"expandedWidth",Ed),n=yd(k,"height",Ed)||yd(k,"expandedHeight",Ed);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=dd(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:q,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,
|
|
930
|
+
currentVideo:null,background:null})}}}}}}return c}
|
|
931
|
+
function Dr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=dd(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=vd(c,"MediaFiles")){var f=rd(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=t(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=td(f);if(g){a.push({id:null,groupId:null,startTime:d,
|
|
932
|
+
endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}T("shaka.ads.Utils",Br);Br.ADS_LOADED="ads-loaded";Br.AD_STARTED="ad-started";Br.AD_FIRST_QUARTILE="ad-first-quartile";Br.AD_MIDPOINT="ad-midpoint";Br.AD_THIRD_QUARTILE="ad-third-quartile";Br.AD_COMPLETE="ad-complete";
|
|
933
|
+
Br.AD_STOPPED="ad-stopped";Br.AD_SKIPPED="ad-skipped";Br.AD_VOLUME_CHANGED="ad-volume-changed";Br.AD_MUTED="ad-muted";Br.AD_PAUSED="ad-paused";Br.AD_RESUMED="ad-resumed";Br.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Br.CUEPOINTS_CHANGED="ad-cue-points-changed";Br.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Br.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Br.AD_CLICKED="ad-clicked";Br.AD_PROGRESS="ad-progress";Br.AD_BUFFERING="ad-buffering";Br.AD_IMPRESSION="ad-impression";
|
|
934
|
+
Br.AD_DURATION_CHANGED="ad-duration-changed";Br.AD_CLOSED="ad-closed";Br.AD_LOADED="ad-loaded";Br.ALL_ADS_COMPLETED="all-ads-completed";Br.AD_LINEAR_CHANGED="ad-linear-changed";Br.AD_METADATA="ad-metadata";Br.AD_RECOVERABLE_ERROR="ad-recoverable-error";Br.AD_ERROR="ad-error";Br.AD_BREAK_READY="ad-break-ready";Br.AD_INTERACTION="ad-interaction";Br.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Br.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Br.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Er(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new jb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.15.7");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
|
|
935
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Fr(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Gr(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.Aa(this.i,"play",function(){f.F=!0})}Er.prototype.configure=function(a){this.o=a};Er.prototype.stop=function(){this.g&&this.g.stop();this.s&&Ej(this.s)};
|
|
936
|
+
Er.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function Gr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));Hr(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
937
|
+
function Fr(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new V("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
938
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Ir(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,
|
|
939
|
+
a.i.offsetHeight)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.Aa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){Hr(a,null)}}
|
|
940
|
+
function Ir(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new V(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Gr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Jr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){Jr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
941
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Hr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Hr(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
942
|
+
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
943
|
+
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
944
|
+
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
945
|
+
function Jr(a,b){var c=b.getAd();c?(a.j=new Ar(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.o.supportsMultipleMediaElements||a.l(new V("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new V("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.o.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
946
|
+
function Hr(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.o.supportsMultipleMediaElements&&a.l(new V("ad-content-resume-requested"));a.l(new V("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.o.customPlayheadTracker||a.i.ended||a.i.play())};function Kr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.A=c;this.o=d;this.m=e;this.s=f;this.B=b.overlay}p=Kr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return this.s};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()};
|
|
947
|
+
p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h};p.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};p.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()};
|
|
948
|
+
p.skip=function(){this.canSkipNow()&&this.A()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return null==this.B};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.o};p.getPositionInSequence=function(){return this.m};p.getTitle=function(){return""};
|
|
949
|
+
p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.i.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.i.uri};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.g=null};
|
|
950
|
+
T("shaka.ads.InterstitialAd",Kr);Kr.prototype.release=Kr.prototype.release;Kr.prototype.getPodIndex=Kr.prototype.getPodIndex;Kr.prototype.getTimeOffset=Kr.prototype.getTimeOffset;Kr.prototype.getMediaUrl=Kr.prototype.getMediaUrl;Kr.prototype.getAdvertiserName=Kr.prototype.getAdvertiserName;Kr.prototype.getCreativeAdId=Kr.prototype.getCreativeAdId;Kr.prototype.getAdId=Kr.prototype.getAdId;Kr.prototype.getVastAdId=Kr.prototype.getVastAdId;Kr.prototype.getVastMediaWidth=Kr.prototype.getVastMediaWidth;
|
|
951
|
+
Kr.prototype.getVastMediaHeight=Kr.prototype.getVastMediaHeight;Kr.prototype.getVastMediaBitrate=Kr.prototype.getVastMediaBitrate;Kr.prototype.getDescription=Kr.prototype.getDescription;Kr.prototype.getTitle=Kr.prototype.getTitle;Kr.prototype.getPositionInSequence=Kr.prototype.getPositionInSequence;Kr.prototype.getSequenceLength=Kr.prototype.getSequenceLength;Kr.prototype.setMuted=Kr.prototype.setMuted;Kr.prototype.resize=Kr.prototype.resize;Kr.prototype.isLinear=Kr.prototype.isLinear;
|
|
952
|
+
Kr.prototype.isMuted=Kr.prototype.isMuted;Kr.prototype.setVolume=Kr.prototype.setVolume;Kr.prototype.getVolume=Kr.prototype.getVolume;Kr.prototype.play=Kr.prototype.play;Kr.prototype.pause=Kr.prototype.pause;Kr.prototype.skip=Kr.prototype.skip;Kr.prototype.canSkipNow=Kr.prototype.canSkipNow;Kr.prototype.getTimeUntilSkippable=Kr.prototype.getTimeUntilSkippable;Kr.prototype.isSkippable=Kr.prototype.isSkippable;Kr.prototype.isPaused=Kr.prototype.isPaused;Kr.prototype.getRemainingTime=Kr.prototype.getRemainingTime;
|
|
953
|
+
Kr.prototype.getMinSuggestedDuration=Kr.prototype.getMinSuggestedDuration;Kr.prototype.getDuration=Kr.prototype.getDuration;Kr.prototype.isUsingAnotherMediaElement=Kr.prototype.isUsingAnotherMediaElement;Kr.prototype.hasCustomClick=Kr.prototype.hasCustomClick;Kr.prototype.isClientRendering=Kr.prototype.isClientRendering;Kr.prototype.needsSkipUI=Kr.prototype.needsSkipUI;function Lr(a,b,c){this.g=a;this.j=b;this.h=c;this.i=null==a.overlay}p=Lr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return-1};p.isPaused=function(){return!1};p.isSkippable=function(){return!1};p.getTimeUntilSkippable=function(){return 0};
|
|
954
|
+
p.canSkipNow=function(){return!1};p.skip=function(){};p.pause=function(){};p.play=function(){};p.getVolume=function(){return 1};p.setVolume=function(){};p.isMuted=function(){return!1};p.isLinear=function(){return this.i};p.resize=function(){};p.setMuted=function(){};p.getSequenceLength=function(){return this.j};p.getPositionInSequence=function(){return this.h};p.getTitle=function(){return""};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
|
|
955
|
+
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.id||""};p.getCreativeAdId=function(){return""};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return this.g.uri};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){};T("shaka.ads.InterstitialStaticAd",Lr);Lr.prototype.release=Lr.prototype.release;Lr.prototype.getPodIndex=Lr.prototype.getPodIndex;Lr.prototype.getTimeOffset=Lr.prototype.getTimeOffset;
|
|
956
|
+
Lr.prototype.getMediaUrl=Lr.prototype.getMediaUrl;Lr.prototype.getAdvertiserName=Lr.prototype.getAdvertiserName;Lr.prototype.getCreativeAdId=Lr.prototype.getCreativeAdId;Lr.prototype.getAdId=Lr.prototype.getAdId;Lr.prototype.getVastAdId=Lr.prototype.getVastAdId;Lr.prototype.getVastMediaWidth=Lr.prototype.getVastMediaWidth;Lr.prototype.getVastMediaHeight=Lr.prototype.getVastMediaHeight;Lr.prototype.getVastMediaBitrate=Lr.prototype.getVastMediaBitrate;Lr.prototype.getDescription=Lr.prototype.getDescription;
|
|
957
|
+
Lr.prototype.getTitle=Lr.prototype.getTitle;Lr.prototype.getPositionInSequence=Lr.prototype.getPositionInSequence;Lr.prototype.getSequenceLength=Lr.prototype.getSequenceLength;Lr.prototype.setMuted=Lr.prototype.setMuted;Lr.prototype.resize=Lr.prototype.resize;Lr.prototype.isLinear=Lr.prototype.isLinear;Lr.prototype.isMuted=Lr.prototype.isMuted;Lr.prototype.setVolume=Lr.prototype.setVolume;Lr.prototype.getVolume=Lr.prototype.getVolume;Lr.prototype.play=Lr.prototype.play;Lr.prototype.pause=Lr.prototype.pause;
|
|
958
|
+
Lr.prototype.skip=Lr.prototype.skip;Lr.prototype.canSkipNow=Lr.prototype.canSkipNow;Lr.prototype.getTimeUntilSkippable=Lr.prototype.getTimeUntilSkippable;Lr.prototype.isSkippable=Lr.prototype.isSkippable;Lr.prototype.isPaused=Lr.prototype.isPaused;Lr.prototype.getRemainingTime=Lr.prototype.getRemainingTime;Lr.prototype.getMinSuggestedDuration=Lr.prototype.getMinSuggestedDuration;Lr.prototype.getDuration=Lr.prototype.getDuration;Lr.prototype.isUsingAnotherMediaElement=Lr.prototype.isUsingAnotherMediaElement;
|
|
959
|
+
Lr.prototype.hasCustomClick=Lr.prototype.hasCustomClick;Lr.prototype.isClientRendering=Lr.prototype.isClientRendering;Lr.prototype.needsSkipUI=Lr.prototype.needsSkipUI;function Mr(a,b,c,d){var e=this;this.M=null;this.B=a;this.C=b;this.g=c;this.G=null;this.A=!0;this.h=this.g;this.i=d;this.U=new Set;this.H=new Set;this.F=new Map;this.L=new Map;this.j=new Y;Nr(this);this.I=new jb;this.l=new jb;this.K=!1;this.ha=this.o=this.s=this.m=null;this.ka=!1;this.P=-1;this.ba=function(){if(!e.K&&e.m&&!e.C.ua()){e.m=e.g.currentTime;var f=Or(e);f&&Pr(e,f,1,1,Date.now())}};this.W=function(){if(!(e.K||e.m||e.C.ua())){e.m=e.g.currentTime;var f=Or(e,!0);f&&Pr(e,f,1,1,Date.now())}};
|
|
960
|
+
this.na=function(){if(!e.K&&e.m&&!e.C.ua()){var f=e.g.currentTime;e.s&&!e.s.pre&&!e.s.post&&f<(e.s.endTime||e.s.startTime)&&(e.s=null)}};this.S=new af(this.ba);this.N=new af(function(){var f,g,h,k,l,m,n,q,r,u,w;return Q(function(v){switch(v.g){case 1:if(!e.H.size||null==e.m){v.u(0);break}f=e.C.m;if(f==eq||f==Up)return v.return();g=!1;h=Array.from(e.H);k=e.C.Sa();l=t(h);m=l.next();case 3:if(m.done){v.u(5);break}n=m.value;if(n==e.s){v.u(4);break}q=n.endTime||n.startTime;if(!(1<=k.start-q)){r=n.startTime-
|
|
961
|
+
e.m;0<r&&10>=r&&(!e.F.has(n)&&Qr(n)&&e.F.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),Rr(e,n));v.u(4);break}if(!e.F.has(n)){v.u(7);break}return F(v,e.F.get(n),8);case 8:(u=v.h)&&u.destroy(),e.F.delete(n);case 7:Sr(e,n),w=JSON.stringify(n),e.U.has(w)&&e.U.delete(w),e.H.delete(n),Tr(e),n.overlay||(g=!0);case 4:m=l.next();v.u(3);break;case 5:g&&Ur(e),G(v)}})});this.configure(this.C.getConfiguration().ads)}p=Mr.prototype;p.configure=function(a){this.M=a;Vr(this)};
|
|
962
|
+
function Wr(a){if(!a.ka&&a.H.size){a.I.D(a.g,"playing",a.W);a.I.D(a.g,"timeupdate",a.W);a.I.D(a.g,"seeked",a.na);a.I.D(a.g,"ended",a.ba);if("requestVideoFrameCallback"in a.g&&!Xr()){var b=a.g,c=function(){-1!=a.P&&(a.ba(),-1!=a.P&&(a.P=b.requestVideoFrameCallback(c)))};a.P=b.requestVideoFrameCallback(c)}else a.S.Fa(.025);a.N&&a.N.Fa(1);a.ka=!0}}
|
|
963
|
+
function Tr(a){a.ka&&!a.H.size&&(a.I.Ja(a.g,"playing",a.W),a.I.Ja(a.g,"timeupdate",a.W),a.I.Ja(a.g,"seeked",a.na),a.I.Ja(a.g,"ended",a.ba),-1!=a.P&&(a.g.cancelVideoFrameCallback(a.P),a.P=-1),a.S&&a.S.stop(),a.N&&a.N.stop(),a.ka=!1)}
|
|
964
|
+
function Vr(a){if(a.B&&a.M&&!a.K){var b=a.M.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.h=a.g,a.G&&(a.G.parentElement&&a.B.removeChild(a.G),a.G=null)):(a.G||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.G=b),a.h=a.G))}else a.A=!0}
|
|
965
|
+
p.stop=function(){this.l&&this.l.Ra();this.U.clear();this.H.clear();this.j.ng();if(this.F.size){var a=Array.from(this.F.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.F.clear();if(this.L.size)for(a=Array.from(this.L.keys()),a=t(a),b=a.next();!b.done;b=a.next())Sr(this,b.value);this.L.clear();this.j.detach();this.K=!1;this.s=this.m=null;this.A=!0;this.h=this.g;this.G=null;Yr(this);Tr(this);this.B&&Ej(this.B);this.o&&(this.o.stop(),this.o=
|
|
966
|
+
null)};p.release=function(){this.stop();this.I&&this.I.release();this.l&&this.l.release();this.S&&(this.S.stop(),this.S=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};p.od=function(){return this.j};function Zr(a,b){var c;Q(function(d){if(1==d.g)return Nr(a),F(d,$r(a,b),2);c=d.h;c.length?as(a,c):bb("Unsupported HLS interstitial",b);G(d)})}
|
|
967
|
+
function bs(a,b){var c=vd(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=yd(c,"z",Ed);if(d&&0!=g){var h=null,k=vd(c,"Background");if(k){var l=k.attributes.uri;l?h="center / contain no-repeat url('"+l+"')":h=td(k)}k=1920;l=1080;var m=vd(c,"Viewport");if(m){k=yd(m,"x",Ed);if(null==k)return;l=yd(m,"y",Ed);if(null==l)return}var n={viewport:{x:k,y:l},topLeft:{x:0,y:0},size:{x:k,y:l}},q=vd(c,"Overlay");if(m&&q){var r=vd(q,"TopLeft"),u=vd(q,"Size");if(r&&
|
|
968
|
+
u){q=yd(r,"x",Ed);if(null==q)return;r=yd(r,"y",Ed);if(null==r)return;var w=yd(u,"x",Ed);if(null==w)return;u=yd(u,"y",Ed);if(null==u)return;n.topLeft.x=q;n.topLeft.y=r;n.size.x=w;n.size.y=u}}q=null;c=vd(c,"Squeeze");if(m&&c&&(u=vd(c,"TopLeft"),c=vd(c,"Size"),u&&c)){m=yd(u,"x",Ed);if(null==m)return;q=yd(u,"y",Ed);if(null==q)return;u=yd(c,"x",Ed);if(null==u)return;c=yd(c,"y",Ed);if(null==c)return;q={viewport:{x:k,y:l},topLeft:{x:m,y:q},size:{x:u,y:c}}}as(a,[{id:b.id,groupId:null,startTime:b.startTime,
|
|
969
|
+
endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:n,displayOnBackground:-1==g,currentVideo:q,background:h}])}}
|
|
970
|
+
p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},F(n,cs(b,a,c),2);case 2:d=n.h;e=id(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=Cr(e,b.m);n.u(3);break}if("vmap:VMAP"!=e.tagName){n.u(3);break}for(var q=[],r=t(rd(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var w=u.value,v=w.attributes.timeOffset;v&&(u=null,"start"==v?u=0:"end"==v?u=Infinity:u=dd(v),(w=vd(w,"vmap:AdSource"))&&(w=vd(w,"vmap:AdTagURI"))&&
|
|
971
|
+
(w=sd(w))&&q.push({time:u,uri:w}))}g=t(q);h=g.next();case 5:if(h.done){n.u(3);break}k=h.value;return F(n,cs(b,k.uri,c),8);case 8:l=n.h;m=id(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(Cr(m,k.time)));h=g.next();n.u(5);break;case 3:as(b,f),G(n)}})};
|
|
972
|
+
function as(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.u(4);break}f=e.value;if(!f.uri){bb("Missing URL in interstitial",f);m.u(3);break}if(f.mimeType){m.u(5);break}xa(m,6);g=a.j.Pb();return F(m,Ho(f.uri,g,a.C.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;Aa(m,5);break;case 6:Ba(m);case 5:h=f.id||JSON.stringify(f);if(a.U.has(h)){m.u(3);break}f.loop&&!f.overlay&&bb("Loop is only supported in overlay interstitials",f);
|
|
973
|
+
f.overlay||(c=!0);a.U.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0<l&&10>=l&&(k=!0)):k=!0;k&&(!a.F.has(f)&&Qr(f)&&a.F.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Rr(a,f));case 3:e=d.next();m.u(2);break;case 4:c&&Ur(a),Wr(a),G(m)}})}
|
|
974
|
+
function Or(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){var f=a.g.ended,g=Array.from(a.H).sort(function(n,q){return q.startTime-n.startTime}),h=g;h=b?g.filter(function(n){return n.pre}):f?g.filter(function(n){return n.post}):g.filter(function(n){return!n.pre&&!n.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.m-Math.round(1E3*h.startTime)/1E3,m=1;a.M.allowStartInMiddleOfInterstitial&&
|
|
975
|
+
h.endTime&&Infinity!=h.endTime&&(m=h.endTime-h.startTime);0<l&&(l<=m||!h.canJump)&&(k=null==c&&a.s&&!a.s.pre&&!a.s.post&&a.s.startTime>=h.startTime?!1:!0)}k&&(!a.s||h.startTime>=a.s.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e}
|
|
976
|
+
function Pr(a,b,c,d,e,f){f=void 0===f?0:f;a.s=b;Vr(a);a.A||!a.B||a.h.parentElement||a.B.appendChild(a.h);1==d&&1==c&&(c=Array.from(a.H).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:.001>Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),Tr(a),b.overlay||Ur(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?ds(a,b,c,d,f):bb("Unsupported interstitial",b):a.A&&b.overlay?bb("Unsupported interstitial",b):es(a,b,c,d,e,f)}
|
|
977
|
+
function ds(a,b,c,d,e){function f(){a.o&&(a.o.stop(),a.o=null);a.B.removeChild(k);Yr(a,b);a.i(new V("ad-stopped"));a.l.Ra();var q=Or(a,b.pre,d-e);q?Pr(a,q,c,++d,Date.now(),e):a.K=!1}a.K=!0;var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";fs(a,b);a.i(new V("ad-started",(new Map).set("ad",new Lr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new V("ad-error",(new Map).set("originalEvent",
|
|
978
|
+
q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.B.appendChild(k);var n=Date.now();a.o&&a.o.stop();a.o=new af(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new V("ad-complete")),
|
|
979
|
+
f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new V("ad-complete")),f()):a.g.currentTime<b.startTime&&(a.i(new V("ad-skipped")),f())});b.playoutLimit&&!b.endTime?a.o.ia(b.playoutLimit):b.endTime&&a.o.Fa(.025);a.l.D(a.g,"seeked",function(){var q=a.g.currentTime;if(q<b.startTime||b.endTime&&q>b.endTime)a.o&&a.o.stop(),a.i(new V("ad-skipped")),f()})}
|
|
980
|
+
function es(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I;Q(function(K){switch(K.g){case 1:g=Date.now();a.K=!0;if(!a.A||1!=d){K.u(2);break}a.i(new V("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new vg;k=function(J){return Q(function(L){if(1==L.g)return"detach"!=J.state?L.u(0):Xr()?F(L,new Promise(function(N){return(new af(N)).ia(.1)}),3):L.u(3);h.resolve();a.l.Ja(a.C,"onstatechange",k);G(L)})};a.l.D(a.C,"onstatechange",k);return F(K,h,2);case 2:return fs(a,b),a.A||
|
|
981
|
+
(a.h.style.display="",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),q=!1,r=function(){if(!a.A&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&
|
|
982
|
+
Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var J=Date.now();a.g.currentTime+=(J-e)/1E3;e=J}},u=function(J){var L,N;return Q(function(O){if(1==O.g){r();L=Or(a,b.pre,d-f);if(J&&b.groupId)for(;L&&L.groupId==b.groupId;)d++,L=Or(a,b.pre,d-f);a.o&&(!b.groupId||L&&L.groupId!=b.groupId)&&(a.o.stop(),a.o=null);Yr(a,b);if(L&&!L.overlay)return O.u(2);b.post&&(a.m=null,a.s=null);return a.A?F(O,a.j.detach(),4):F(O,a.j.vc(),4)}2!=O.g&&(a.A&&(N=b.resumeOffset,null==N&&(N=b.timelineRange&&
|
|
983
|
+
b.endTime&&Infinity!=b.endTime?b.endTime-(a.m||0):(Date.now()-e)/1E3),a.i(new V("ad-content-resume-requested",(new Map).set("offset",N)))),a.i(new V("ad-stopped")),a.l.Ra(),a.K=!1,a.A?Ur(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Vr(a);L&&(a.i(new V("ad-stopped")),a.l.Ra(),Pr(a,L,c,++d,e,f));G(O)})},w=function(J){return Q(function(L){if(q)return L.return();q=!0;a.i(new V("ad-error",(new Map).set("originalEvent",J)));return F(L,u(!1),0)})},v=function(){return Q(function(J){if(1==J.g){if(q)return J.return();
|
|
984
|
+
q=!0;return F(J,u(!1),2)}a.i(new V("ad-complete"));G(J)})},a.ha=function(){return Q(function(J){if(q)return J.return();q=!0;a.i(new V("ad-skipped"));return F(J,u(!0),0)})},y=new Kr(a.h,b,a.ha,c,d,!a.A),a.A||(y.setMuted(a.g.muted),y.setVolume(a.g.volume)),a.i(new V("ad-started",(new Map).set("ad",y))),(z=y.canSkipNow())&&a.i(new V("ad-skip-state-changed")),a.l.Aa(a.j,"error",w),a.l.D(a.h,"timeupdate",function(){if(a.h.duration){var J=y.canSkipNow();z!=J&&0<y.getRemainingTime()&&0<y.getDuration()&&
|
|
985
|
+
a.i(new V("ad-skip-state-changed"));z=J}}),a.l.Aa(a.j,"firstquartile",function(){r();a.i(new V("ad-first-quartile"))}),a.l.Aa(a.j,"midpoint",function(){r();a.i(new V("ad-midpoint"))}),a.l.Aa(a.j,"thirdquartile",function(){r();a.i(new V("ad-third-quartile"))}),a.l.Aa(a.j,"complete",v),a.l.D(a.h,"play",function(){a.i(new V("ad-resumed"))}),a.l.D(a.h,"pause",function(){var J=a.j.getConfiguration();a.h.currentTime>=J.playRangeEnd?v():a.i(new V("ad-paused"))}),a.l.D(a.h,"volumechange",function(){a.h.muted?
|
|
986
|
+
a.i(new V("ad-muted")):a.i(new V("ad-volume-changed"))}),xa(K,4),Nr(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0<A&&a.j.configure("playRangeEnd",A)),b.playoutLimit&&!a.o&&(a.o=(new af(function(){a.ha()})).ia(b.playoutLimit),a.j.configure("playRangeEnd",b.playoutLimit)),F(K,a.j.fc(a.h),6);case 6:return C=null,a.M.allowStartInMiddleOfInterstitial&&null!=a.m&&(E=a.m-b.startTime,.25<Math.abs(E)&&(C=E)),a.F.has(b)?F(K,a.F.get(b),10):F(K,a.j.load(b.uri,
|
|
987
|
+
C,b.mimeType||void 0),8);case 10:return H=K.h,a.F.delete(b),H?F(K,a.j.load(H),8):F(K,a.j.load(b.uri,C,b.mimeType||void 0),8);case 8:a.h.play();B=(Date.now()-g)/1E3;a.i(new V("ads-loaded",(new Map).set("loadTime",B)));a.A&&a.g.play();b.overlay&&(D=function(){var J=a.g.currentTime-b.startTime;.1<Math.abs(J-a.h.currentTime)&&(a.h.currentTime=J)},a.l.Aa(a.h,"playing",D),a.l.D(a.g,"seeking",D),a.l.D(a.g,"seeked",function(){var J=a.g.currentTime;(J<b.startTime||b.endTime&&J>b.endTime)&&a.ha()}));Aa(K,0);
|
|
988
|
+
break;case 4:I=Ba(K);if(!a.K)return K.return();w(I);G(K)}})}
|
|
989
|
+
function fs(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0<f&&100>=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0<f&&100>=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.B&&
|
|
990
|
+
(a.B.style.pointerEvents="none",b.background&&(a.B.style.background=b.background));a.G&&(a.G.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Yr(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.B&&(a.B.style.pointerEvents="",!b||b.background)&&(a.B.style.background="");a.G&&(a.G.style.background="")}
|
|
991
|
+
function $r(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na,va,Ia,ta;return Q(function(ra){switch(ra.g){case 1:c=[];if(!b)return ra.return(c);d=b.values.find(function(wa){return"X-ASSET-URI"==wa.key});e=b.values.find(function(wa){return"X-ASSET-LIST"==wa.key});if(!d&&!e)return ra.return(c);f=null;if(g=b.values.find(function(wa){return"ID"==wa.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==
|
|
992
|
+
typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(wa){return"X-RESTRICT"==wa.key});n=m=!0;l&&l.data&&(q=l.data,m=!q.includes("SKIP"),n=!q.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(wa){return"X-ENABLE-SKIP-AFTER"==wa.key}))w=u.data,r=parseFloat(w),isNaN(r)&&(r=m?0:null);v=null;if(y=b.values.find(function(wa){return"X-ENABLE-SKIP-FOR"==wa.key}))z=y.data,v=parseFloat(z),isNaN(r)&&(v=null);A=null;if(C=b.values.find(function(wa){return"X-RESUME-OFFSET"==
|
|
993
|
+
wa.key}))E=C.data,A=parseFloat(E),isNaN(A)&&(A=null);H=null;if(B=b.values.find(function(wa){return"X-PLAYOUT-LIMIT"==wa.key}))D=B.data,H=parseFloat(D),isNaN(H)&&(H=null);J=K=I=!1;if(L=b.values.find(function(wa){return"CUE"==wa.key}))N=L.data,I=N.includes("ONCE"),K=N.includes("PRE"),J=N.includes("POST");O=!1;(M=b.values.find(function(wa){return"X-TIMELINE-OCCUPIES"==wa.key}))?(P=M.data,O=P.includes("RANGE")):!C&&a.C.V()&&(O=!K&&!J);if(d){R=d.data;if(!R)return ra.return(c);c.push({id:f,groupId:null,
|
|
994
|
+
startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:H,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ra.u(2);break}if(!e){ra.u(2);break}S=e.data;if(!S)return ra.return(c);xa(ra,4);ba={type:11};return F(ra,cs(a,S,ba),6);case 6:W=ra.h;Fa=ac(W);Ga=JSON.parse(Fa);if(za=Ga["SKIP-CONTROL"])na=za["ENABLE-SKIP-AFTER"],"number"==typeof na&&(r=parseFloat(na),isNaN(na)&&(r=m?
|
|
995
|
+
0:null)),va=za["ENABLE-SKIP-FOR"],"number"==typeof va&&(v=parseFloat(va),isNaN(va)&&(v=null));for(Ia=0;Ia<Ga.ASSETS.length;Ia++)ta=Ga.ASSETS[Ia],ta.URI&&c.push({id:f+"_shaka_asset_"+Ia,groupId:f,startTime:h,endTime:k,uri:ta.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:v,canJump:n,resumeOffset:A,playoutLimit:H,once:I,pre:K,post:J,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});Aa(ra,2);break;case 4:Ba(ra);case 2:return ra.return(c)}})}
|
|
996
|
+
function Ur(a){for(var b=[],c=t(a.H),d=c.next(),e={};!d.done;e={uc:void 0},d=c.next())d=d.value,d.overlay||(e.uc={start:d.startTime,end:null},d.pre?(e.uc.start=0,e.uc.end=null):d.post?(e.uc.start=-1,e.uc.end=null):d.timelineRange&&(e.uc.end=d.endTime),b.find(function(f){return function(g){return f.uc.start==g.start&&f.uc.end==g.end}}(e))||b.push(e.uc));a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
997
|
+
function Nr(a){a.j.configure(a.C.Zh());a.j.configure("ads.disableHLSInterstitial",!0);a.j.configure("ads.disableDASHInterstitial",!0);a.j.configure("playRangeEnd",Infinity);Mg(a.C.Pb(),a.j.Pb())}function cs(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Ng([b],tg()),e=a.C.Pb().request(7,d,c),F(g,e.promise,2);f=g.h;return g.return(f.data)})}function Qr(a){return(a=a.mimeType)?!a.startsWith("image/")&&"text/html"!==a:!0}
|
|
998
|
+
function Xr(){var a=rb().La();return"TV"==a||"CONSOLE"==a||"CAST"==a?!0:!1}function Rr(a,b){if(!(a.L.has(b)||a.M&&!a.M.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.L.set(b,d)}}
|
|
999
|
+
function Sr(a,b){if(a.L.has(b)){var c=a.L.get(b);c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.L.delete(b)}};function gs(a,b,c,d,e){this.h=a;this.j=dd(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}p=gs.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.h.durationInSeconds};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
|
|
1000
|
+
p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return"number"==typeof this.j?!0:!1};p.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};p.pause=function(){return this.g.pause()};p.play=function(){return this.g.play()};
|
|
1001
|
+
p.getVolume=function(){return this.g.volume};p.setVolume=function(a){this.g.volume=a};p.isMuted=function(){return this.g.muted};p.isLinear=function(){return this.o};p.resize=function(){};p.setMuted=function(a){this.g.muted=a};p.getSequenceLength=function(){return this.l?this.l:1};p.getPositionInSequence=function(){return this.i?this.i:1};p.getTitle=function(){return this.h.adTitle};p.getDescription=function(){return""};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return 0};
|
|
1002
|
+
p.getVastMediaWidth=function(){return 0};p.getVastAdId=function(){return this.h.vastAdId||""};p.getAdId=function(){return this.h.adId};p.getCreativeAdId=function(){return this.h.creativeId};p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.l=this.i=this.g=this.h=null};T("shaka.ads.MediaTailorAd",gs);gs.prototype.release=gs.prototype.release;gs.prototype.getPodIndex=gs.prototype.getPodIndex;
|
|
1003
|
+
gs.prototype.getTimeOffset=gs.prototype.getTimeOffset;gs.prototype.getMediaUrl=gs.prototype.getMediaUrl;gs.prototype.getAdvertiserName=gs.prototype.getAdvertiserName;gs.prototype.getCreativeAdId=gs.prototype.getCreativeAdId;gs.prototype.getAdId=gs.prototype.getAdId;gs.prototype.getVastAdId=gs.prototype.getVastAdId;gs.prototype.getVastMediaWidth=gs.prototype.getVastMediaWidth;gs.prototype.getVastMediaHeight=gs.prototype.getVastMediaHeight;gs.prototype.getVastMediaBitrate=gs.prototype.getVastMediaBitrate;
|
|
1004
|
+
gs.prototype.getDescription=gs.prototype.getDescription;gs.prototype.getTitle=gs.prototype.getTitle;gs.prototype.getPositionInSequence=gs.prototype.getPositionInSequence;gs.prototype.getSequenceLength=gs.prototype.getSequenceLength;gs.prototype.setMuted=gs.prototype.setMuted;gs.prototype.resize=gs.prototype.resize;gs.prototype.isLinear=gs.prototype.isLinear;gs.prototype.isMuted=gs.prototype.isMuted;gs.prototype.setVolume=gs.prototype.setVolume;gs.prototype.getVolume=gs.prototype.getVolume;
|
|
1005
|
+
gs.prototype.play=gs.prototype.play;gs.prototype.pause=gs.prototype.pause;gs.prototype.skip=gs.prototype.skip;gs.prototype.canSkipNow=gs.prototype.canSkipNow;gs.prototype.getTimeUntilSkippable=gs.prototype.getTimeUntilSkippable;gs.prototype.isSkippable=gs.prototype.isSkippable;gs.prototype.isPaused=gs.prototype.isPaused;gs.prototype.getRemainingTime=gs.prototype.getRemainingTime;gs.prototype.getMinSuggestedDuration=gs.prototype.getMinSuggestedDuration;gs.prototype.getDuration=gs.prototype.getDuration;
|
|
1006
|
+
gs.prototype.isUsingAnotherMediaElement=gs.prototype.isUsingAnotherMediaElement;gs.prototype.hasCustomClick=gs.prototype.hasCustomClick;gs.prototype.isClientRendering=gs.prototype.isClientRendering;gs.prototype.needsSkipUI=gs.prototype.needsSkipUI;function hs(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.P=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.M=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.N=!0;this.H="";this.o=new jb}hs.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Ja(b.target,b.type,b.listener);is(this);this.m=[];this.s=[];this.G="";this.N=!0;this.H="";this.A=null;this.j=[];this.M=[];this.F.clear()};
|
|
1007
|
+
hs.prototype.release=function(){this.stop();this.o&&this.o.release()};hs.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(js(this,this.G,this.N),this.N=!1)};hs.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
1008
|
+
function ks(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u;Q(function(w){if(1==w.g)return d={type:7},e=Ng([b],tg()),e.method="POST",c&&(f=JSON.stringify(c),e.body=ec(f)),g=a.K.request(7,e,d),xa(w,2),F(w,g.promise,4);if(2!=w.g){h=w.h;k=ac(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new Bb(b),n=new Bb(l.trackingUrl),a.G=m.resolve(n).toString(),q=Date.now()/1E3,r=q-a.P,a.i(new V("ads-loaded",(new Map).set("loadTime",r))),u=new Bb(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
1009
|
+
return Aa(w,0)}Ba(w);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,w.return();a.l.resolve(a.H);a.l=null;G(w)})}
|
|
1010
|
+
function js(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z;Q(function(A){if(1==A.g)return d={type:8},e=Ng([b],tg()),f=a.K.request(7,e,d),xa(A,2),F(A,f.promise,4);if(2!=A.g){g=A.h;h=[];k=ac(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(q=n.value,r=t(q.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w.nonLinearAdList),y=v.next();!y.done;y=v.next())z=y.value,ls(a,z);h=a.getCuePoints();
|
|
1011
|
+
a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",h))),is(a),a.j=[];c&&(a.I||0<h.length)&&ms(a);return Aa(A,0)}Ba(A);G(A)})}
|
|
1012
|
+
function ls(a,b){var c,d,e,f,g,h,k,l,m;Q(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=ns(b);if(d=a.F.get(c))return n.return();e={type:9};f=Ng([b.staticResource],tg());g=a.K.request(7,f,e);xa(n,2);a.F.set(c,[]);return F(n,g.promise,4)}if(2!=n.g)return h=n.h,k=ac(h.data),l=JSON.parse(k),m=l.apps,a.F.set(c,m),Aa(n,0);Ba(n);a.F.delete(c);G(n)})}
|
|
1013
|
+
function ns(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function ms(a){os(a);a.I||(ps(a),a.o.D(a.h,"seeked",function(){ps(a)}),a.o.D(a.h,"ended",function(){is(a)}));a.o.D(a.h,"timeupdate",function(){os(a)})}
|
|
1014
|
+
function ps(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.M.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
|
|
1015
|
+
function os(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),qs(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),qs(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),qs(a,"thirdQuartile"));d=a.g.getRemainingTime();
|
|
1016
|
+
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&qs(a,"skipStateChanged");0<e&&(0>=d||d>e)&&is(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}is(a);a.L=e;a.g=new gs(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&qs(a,"breakStart");rs(a);break}}}if(!a.g)for(d=
|
|
1017
|
+
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(ns(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){is(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
|
|
1018
|
+
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new gs(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&qs(a,"breakStart");rs(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
|
|
1019
|
+
function is(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.M.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?qs(a,"skip"):qs(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ja(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&qs(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
|
|
1020
|
+
function rs(a){var b=!1;a.h.paused?b=!0:(qs(a,"impression"),qs(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&qs(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||qs(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(qs(a,"impression"),qs(a,"start"),b=!1):qs(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){qs(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
1021
|
+
d.type,d.listener)}
|
|
1022
|
+
function qs(a,b){var c=a.C.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=Ng([e],tg()),e.method="POST",a.K.request(7,e,d))}switch(b){case "impression":a.i(new V("ad-impression"));break;case "start":a.i(new V("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new V("ad-muted"));break;case "unmute":a.i(new V("ad-volume-changed"));break;
|
|
1023
|
+
case "resume":a.i(new V("ad-resumed"));break;case "pause":a.i(new V("ad-paused"));break;case "firstQuartile":a.i(new V("ad-first-quartile"));break;case "midpoint":a.i(new V("ad-midpoint"));break;case "thirdQuartile":a.i(new V("ad-third-quartile"));break;case "complete":a.i(new V("ad-complete"));a.i(new V("ad-stopped"));break;case "skip":a.i(new V("ad-skipped"));a.i(new V("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
|
|
1024
|
+
break;case "skipStateChanged":a.i(new V("ad-skip-state-changed"))}};function ss(a,b){this.g=a;this.i=null;this.h=b}p=ss.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.hasCustomClick=function(){return!0};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()};
|
|
1025
|
+
p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){};
|
|
1026
|
+
p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
1027
|
+
p.getVastAdId=function(){return""};p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};T("shaka.ads.ServerSideAd",ss);
|
|
1028
|
+
ss.prototype.release=ss.prototype.release;ss.prototype.getPodIndex=ss.prototype.getPodIndex;ss.prototype.getTimeOffset=ss.prototype.getTimeOffset;ss.prototype.getMediaUrl=ss.prototype.getMediaUrl;ss.prototype.getAdvertiserName=ss.prototype.getAdvertiserName;ss.prototype.getCreativeAdId=ss.prototype.getCreativeAdId;ss.prototype.getAdId=ss.prototype.getAdId;ss.prototype.getVastAdId=ss.prototype.getVastAdId;ss.prototype.getVastMediaWidth=ss.prototype.getVastMediaWidth;
|
|
1029
|
+
ss.prototype.getVastMediaHeight=ss.prototype.getVastMediaHeight;ss.prototype.getVastMediaBitrate=ss.prototype.getVastMediaBitrate;ss.prototype.getDescription=ss.prototype.getDescription;ss.prototype.getTitle=ss.prototype.getTitle;ss.prototype.getPositionInSequence=ss.prototype.getPositionInSequence;ss.prototype.getSequenceLength=ss.prototype.getSequenceLength;ss.prototype.setMuted=ss.prototype.setMuted;ss.prototype.resize=ss.prototype.resize;ss.prototype.isLinear=ss.prototype.isLinear;
|
|
1030
|
+
ss.prototype.isMuted=ss.prototype.isMuted;ss.prototype.setVolume=ss.prototype.setVolume;ss.prototype.getVolume=ss.prototype.getVolume;ss.prototype.play=ss.prototype.play;ss.prototype.pause=ss.prototype.pause;ss.prototype.skip=ss.prototype.skip;ss.prototype.canSkipNow=ss.prototype.canSkipNow;ss.prototype.getTimeUntilSkippable=ss.prototype.getTimeUntilSkippable;ss.prototype.isSkippable=ss.prototype.isSkippable;ss.prototype.isPaused=ss.prototype.isPaused;ss.prototype.getRemainingTime=ss.prototype.getRemainingTime;
|
|
1031
|
+
ss.prototype.getMinSuggestedDuration=ss.prototype.getMinSuggestedDuration;ss.prototype.getDuration=ss.prototype.getDuration;ss.prototype.isUsingAnotherMediaElement=ss.prototype.isUsingAnotherMediaElement;ss.prototype.hasCustomClick=ss.prototype.hasCustomClick;ss.prototype.isClientRendering=ss.prototype.isClientRendering;ss.prototype.needsSkipUI=ss.prototype.needsSkipUI;function ts(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new jb;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 V("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){us(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
1032
|
+
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.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new ss(f,e.l);e.A&&(e.m.i=e.A);e.i(new V("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
1033
|
+
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new V("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new V("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new V("ad-third-quartile"))});
|
|
1034
|
+
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new V("ad-complete"));e.i(new V("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new V("ad-skipped"));e.i(new V("ad-stopped"))});this.h.D(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=
|
|
1035
|
+
f;e.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=ts.prototype;p.configure=function(){};p.stop=function(){this.B="";this.o=null;this.C=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.C};
|
|
1036
|
+
function us(a,b){a.i(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Z(){Fg.call(this);this.h=this.i=this.j=this.g=null;this.m=new yr;this.o=navigator.language;this.l=null}pa(Z,Fg);p=Z.prototype;p.setLocale=function(a){this.o=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Mr(a,b,c,function(e){return vs(d,e)});this.g.configure(this.l)};
|
|
1037
|
+
p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new Er(a,b,this.o,c,function(e){return vs(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);Fg.prototype.release.call(this)};
|
|
1038
|
+
p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new yr};p.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
1039
|
+
p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new hs(a,b,c,function(e){return vs(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new vg,ks(d,a,b),d.H=c||"",d.P=Date.now()/1E3,a=d.l);return a};
|
|
1040
|
+
p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.G=a;b.i(new V("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new ts(a,b,this.o,function(d){return vs(c,d)});this.h.configure(this.l)};
|
|
1041
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('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 overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.15.7";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
1042
|
+
(c.G=!0),c.j=new vg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&bb('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 overridden.');a.mpt="Shaka Player";a.mpv="v4.15.7";this.h.g.replaceAdTagParameters(a)};
|
|
1043
|
+
p.getServerSideCuePoints=function(){wb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:zr(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
1044
|
+
p.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Zr(this.g,c))};
|
|
1045
|
+
p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m=
|
|
1046
|
+
l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=yd(m,"maxDuration",Ed))&&(g=l/c.timescale);(l=yd(m,"returnOffset",Ed))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&as(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
|
|
1047
|
+
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&vd(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&bs(this.g,c))}};p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);as(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};
|
|
1048
|
+
p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.od()};function vs(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}T("shaka.ads.AdManager",Z);Z.prototype.getInterstitialPlayer=Z.prototype.getInterstitialPlayer;Z.prototype.addAdUrlInterstitial=Z.prototype.addAdUrlInterstitial;
|
|
1049
|
+
Z.prototype.addCustomInterstitial=Z.prototype.addCustomInterstitial;Z.prototype.onDASHInterstitialMetadata=Z.prototype.onDASHInterstitialMetadata;Z.prototype.onHLSInterstitialMetadata=Z.prototype.onHLSInterstitialMetadata;Z.prototype.onCueMetadataChange=Z.prototype.onCueMetadataChange;Z.prototype.onHlsTimedMetadata=Z.prototype.onHlsTimedMetadata;Z.prototype.onDashTimedMetadata=Z.prototype.onDashTimedMetadata;Z.prototype.onManifestUpdated=Z.prototype.onManifestUpdated;Z.prototype.getStats=Z.prototype.getStats;
|
|
1050
|
+
Z.prototype.getCuePoints=Z.prototype.getCuePoints;Z.prototype.getServerSideCuePoints=Z.prototype.getServerSideCuePoints;Z.prototype.replaceServerSideAdTagParameters=Z.prototype.replaceServerSideAdTagParameters;Z.prototype.requestServerSideStream=Z.prototype.requestServerSideStream;Z.prototype.initServerSide=Z.prototype.initServerSide;Z.prototype.addMediaTailorTrackingUrl=Z.prototype.addMediaTailorTrackingUrl;Z.prototype.requestMediaTailorStream=Z.prototype.requestMediaTailorStream;
|
|
1051
|
+
Z.prototype.initMediaTailor=Z.prototype.initMediaTailor;Z.prototype.updateClientSideAdsRenderingSettings=Z.prototype.updateClientSideAdsRenderingSettings;Z.prototype.requestClientSideAds=Z.prototype.requestClientSideAds;Z.prototype.onAssetUnload=Z.prototype.onAssetUnload;Z.prototype.release=Z.prototype.release;Z.prototype.initClientSide=Z.prototype.initClientSide;Z.prototype.initInterstitial=Z.prototype.initInterstitial;Z.prototype.configure=Z.prototype.configure;Z.prototype.setLocale=Z.prototype.setLocale;
|
|
1052
|
+
Z.ADS_LOADED="ads-loaded";Z.AD_STARTED="ad-started";Z.AD_FIRST_QUARTILE="ad-first-quartile";Z.AD_MIDPOINT="ad-midpoint";Z.AD_THIRD_QUARTILE="ad-third-quartile";Z.AD_COMPLETE="ad-complete";Z.AD_STOPPED="ad-stopped";Z.AD_SKIPPED="ad-skipped";Z.AD_VOLUME_CHANGED="ad-volume-changed";Z.AD_MUTED="ad-muted";Z.AD_PAUSED="ad-paused";Z.AD_RESUMED="ad-resumed";Z.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Z.CUEPOINTS_CHANGED="ad-cue-points-changed";Z.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";
|
|
1053
|
+
Z.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Z.AD_CLICKED="ad-clicked";Z.AD_PROGRESS="ad-progress";Z.AD_BUFFERING="ad-buffering";Z.AD_IMPRESSION="ad-impression";Z.AD_DURATION_CHANGED="ad-duration-changed";Z.AD_CLOSED="ad-closed";Z.AD_LOADED="ad-loaded";Z.ALL_ADS_COMPLETED="all-ads-completed";Z.AD_LINEAR_CHANGED="ad-linear-changed";Z.AD_METADATA="ad-metadata";Z.AD_RECOVERABLE_ERROR="ad-recoverable-error";Z.AD_ERROR="ad-error";Z.AD_BREAK_READY="ad-break-ready";Z.AD_INTERACTION="ad-interaction";
|
|
1054
|
+
Z.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Z.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Z.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Yp=function(){return new Z};function ws(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof V){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
|
|
1055
|
+
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(zj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
1056
|
+
function xs(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=ys(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
1057
|
+
function ys(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
1058
|
+
var zs="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),As="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Bs=["loop","playbackRate"],Cs=["pause","play"],Ds=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
|
|
1059
|
+
4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),Es=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",
|
|
1060
|
+
2).set("getVariantTracks",2),Fs=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Gs=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Hs=[["isTextTrackVisible","setTextTrackVisibility"]],Is="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),
|
|
1061
|
+
Js="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Ks(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new af(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.M=f;this.i=this.m=!1;this.I="";this.o=null;this.B=function(){return Ls(h)};this.C=function(k,l){k=xs(l);switch(k.type){case "event":var m=k.targetName,n=Dg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(q=k.id,n=k.error,l=k.res,k=h.h.get(q),h.h.delete(q),k)if(n){q=new U(n.severity,
|
|
1062
|
+
n.category,n.code);for(m in n)q[m]=n[m];k.reject(q)}else k.resolve(l)}};this.g={video:{},player:{}};this.H=0;this.h=new Map;this.j=null;Ms.add(this)}p=Ks.prototype;p.destroy=function(){Ms.delete(this);Ns(this);Os&&Ps(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.i=this.m=!1;this.C=this.B=this.j=this.h=this.g=this.o=null;return Promise.resolve()};p.vb=function(){return this.i};p.Zg=function(){return this.I};
|
|
1063
|
+
p.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Jb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Ms),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new vg;d.s=!0;Qs(d,e)}},function(b){for(var c=t(Ms),d=c.next();!d.done;d=c.next())d=d.value,Rs="available"==b,d.l.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Rs&&this.l.ia(Ss);(a=Os)&&
|
|
1064
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new vg,this.s=!0,Qs(this,a)):Os=null}else window.__onGCastApiAvailable!==Ts&&(Us=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Ts)};p.kh=function(a){this.o=a;this.i&&Vs(this,{type:"appData",appData:this.o})};
|
|
1065
|
+
p.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new U(1,8,8E3);if(!Rs)throw new U(1,8,8001);if(a.i)throw new U(1,8,8002);a.j=new vg;chrome.cast.requestSession(function(c){return Qs(a,c)},function(c){return Ws(a,c)});return F(b,a.j,0)})};function Xs(a){a.i&&chrome.cast.requestSession(function(b){return Qs(a,b)},function(b){return Ws(a,b)})}p.md=function(){if(this.i){Ns(this);if(Os){Ps(this);try{Os.stop(function(){},function(){})}catch(a){}Os=null}Ls(this)}};
|
|
1066
|
+
p.get=function(a,b){var c=this;if("video"==a){if(Cs.includes(b))return function(){return c.zi.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))}}else if("player"==a){if(Fs.has(b)&&!this.get("player","isLive")())return function(){};if(Is.includes(b))return function(){return c.zi.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(Js.includes(b))return function(){return c.Hk.apply(c,[a,b].concat(x(Oa.apply(0,arguments))))};if(Ds.has(b)||Es.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
1067
|
+
p.set=function(a,b,c){this.g[a][b]=c;Vs(this,{type:"set",targetName:a,property:b,value:c})};function Qs(a,b){var c=a.M();Os=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Ls(a);Vs(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function Ws(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))}
|
|
1068
|
+
p.zi=function(a,b){Vs(this,{type:"call",targetName:a,methodName:b,args:Oa.apply(2,arguments)})};p.Hk=function(a,b){var c=Oa.apply(2,arguments),d=new vg,e=this.H.toString();this.H++;this.h.set(e,d);try{Vs(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ps(a){var b=Os;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
1069
|
+
function Ls(a){var b=Os?"connected"==Os.status:!1;if(a.i&&!b){a.F();for(var c in a.g)a.g[c]={};Ns(a)}a.i=b;a.I=b?Os.receiver.friendlyName:"";a.l.Jb()}function Ns(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new U(1,7,7E3))}}
|
|
1070
|
+
function Vs(a,b){b=ws(b);var c=Os;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},eb)}catch(d){throw b=new U(2,8,8005,d),c=new V("error",(new Map).set("detail",b)),a.A("player",c),a.md(),b;}}var Ss=.02,Rs=!1,Os=null,Us=null,Ms=new Set;function Ts(a){Us?window.__onGCastApiAvailable=Us:delete window.__onGCastApiAvailable;Us=null;if(a)for(var b=t(Ms),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ys(a,b,c,d){d=void 0===d?!1:d;Fg.call(this);var e=this;this.i=a;this.h=b;this.l=this.o=this.m=this.s=this.j=null;this.H=c;this.G=d;this.C=[];this.B=[];this.A=[];this.F=new Map;this.g=null;window.chrome?(this.g=new Ks(c,function(){return Zs(e)},function(){return $s(e)},function(f,g){return at(e,f,g)},function(){return bt(e)},function(){return ct(e)},d),dt(this)):(this.j=this.i,this.s=this.h)}pa(Ys,Fg);p=Ys.prototype;
|
|
1071
|
+
p.destroy=function(a){this.g&&(void 0===a?0:a)&&this.g.md();this.l&&(this.l.release(),this.l=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.j=this.i=null;Fg.prototype.release.call(this);return Promise.all(a)};p.Xj=function(){return this.j};p.od=function(){return this.s};p.hj=function(){return this.g?this.g.m&&Rs:!1};p.vb=function(){return this.g?this.g.vb():!1};p.Zg=function(){return this.g?this.g.Zg():""};
|
|
1072
|
+
p.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?F(b,a.g.cast(),2):b.return():a.h?F(b,a.h.vc(),0):b.return()})};p.kh=function(a){this.g&&this.g.kh(a)};p.Wk=function(){this.g&&Xs(this.g)};p.md=function(){this.g&&this.g.md()};
|
|
1073
|
+
p.ij=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.H&&b==c.G)return d.return();c.H=a;c.G=b;if(!c.g)return d.return();c.g.md();return F(d,c.g.destroy(),2)}c.g=null;c.g=new Ks(a,function(){return Zs(c)},function(){return $s(c)},function(e,f){return at(c,e,f)},function(){return bt(c)},function(){return ct(c)},b);c.g.init();G(d)})};
|
|
1074
|
+
function dt(a){a.g.init();a.l=new jb;for(var b=t(zs),c=b.next();!c.done;c=b.next())a.l.D(a.i,c.value,function(f){a.g.vb()||(f=Dg(f),a.m.dispatchEvent(f))});for(var d in Eg)a.l.D(a.h,Eg[d],function(f){a.g.vb()||a.o.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={Xd:b.Xd},b.Xd=e,Object.defineProperty(a.j,b.Xd,{configurable:!1,enumerable:!0,get:function(f){return function(){return et(a,f.Xd)}}(b),set:function(f){return function(g){var h=f.Xd;a.g.vb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};ft(a,
|
|
1075
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return gt(a,f)}})});ht(a);a.m=new Fg;a.m.ze=a.j;a.o=new Fg;a.o.ze=a.s;a.l.D(a.h,"unloading",function(){a.g&&a.g.vb()||it(a)})}function ht(a){var b=new Map;ft(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.F.set(c,d):a.F.set(d,c)):b.set(d,c)})}
|
|
1076
|
+
function ft(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
1077
|
+
function ct(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.nd(),startTime:null,addThumbnailsTrackCalls:a.C,addTextTrackAsyncCalls:a.B,addChaptersTrackCalls:a.A};a.i.pause();for(var c=t(Bs),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(Gs);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(Hs);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}
|
|
1078
|
+
function Zs(a){var b=new V("caststatuschanged");a.dispatchEvent(b)}function $s(a){var b=new V(a.j.paused?"pause":"play");a.m.dispatchEvent(b)}
|
|
1079
|
+
function bt(a){for(var b=t(Gs),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.C,f=a.B,g=a.A;it(a);var h=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var k=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var l;(d=a.g.get("player","getTextTracks")())&&d.length&&(l=d.find(function(q){return q.active}));var m=a.g.get("player","isTextTrackVisible")();h&&(a.i.autoplay=!1,b=a.h.load(h,c));var n={};c=t(Bs);for(d=
|
|
1080
|
+
c.next();!d.done;d=c.next())d=d.value,n[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var q=t(e),r=q.next();!r.done;r=q.next()){r=r.value;var u;(u=a.od()).He.apply(u,x(r))}q=t(f);for(u=q.next();!u.done;u=q.next()){u=u.value;var w;(w=a.od()).Hd.apply(w,x(u))}w=t(g);for(q=w.next();!q.done;q=w.next()){q=q.value;var v;(v=a.od()).Ge.apply(v,x(q))}v=t(Bs);for(w=v.next();!w.done;w=v.next())w=w.value,a.i[w]=n[w];v=t(Hs);for(w=v.next();!w.done;w=v.next())q=w.value,w=q[1],q=a.g.get("player",q[0])(),a.h[w](q);
|
|
1081
|
+
a.h.oh(m);l&&a.h.ih(l.language,l.roles,l.forced);a.i.autoplay=k;h&&a.i.play()}},function(q){q=(new Map).set("detail",q);q=new V("error",q);a.h.dispatchEvent(q)})}
|
|
1082
|
+
function et(a,b){if("addEventListener"==b)return function(d,e,f){return a.m.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.m.removeEventListener(d,e,f)};if(a.g.vb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.vb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
1083
|
+
function gt(a,b,c){c=void 0===c?!1:c;a.F.has(b)&&(b=a.F.get(b));if("addEventListener"==b)return function(d,e,f){return a.o.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.o.removeEventListener(d,e,f)};if("getMediaElement"==b)return function(){return a.j};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Pb()};if("getDrmEngine"==b)return function(){return a.h.C};if("getAdManager"==
|
|
1084
|
+
b)return function(){return a.h.Uh()};if("getQueueManager"==b)return function(){return a.h.$h()};if("setVideoContainer"==b)return function(d){return a.h.Oi(d)};if(!c){if("addThumbnailsTrack"==b)return function(){var d=Oa.apply(0,arguments);a.C.push(d);return gt(a,b,!0).apply(null,x(d))};if("addTextTrackAsync"==b)return function(){var d=Oa.apply(0,arguments);a.B.push(d);return gt(a,b,!0).apply(null,x(d))};if("addChaptersTrack"==b)return function(){var d=Oa.apply(0,arguments);a.A.push(d);return gt(a,
|
|
1085
|
+
b,!0).apply(null,x(d))}}if(a.g.vb()){if("getManifest"==b||"drmInfo"==b)return function(){bb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){bb(b+"() does not work while casting!");return Promise.resolve()};if("getChapters"==b)return function(){bb(b+"() does not work while casting!");return[]}}return a.g.vb()&&0==Object.keys(a.g.g.video).length&&(Ds.has(b)||Es.has(b))||!a.g.vb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
1086
|
+
function at(a,b,c){a.g.vb()&&("video"==b?a.m.dispatchEvent(c):"player"==b&&("unloading"==c.type&&it(a),a.o.dispatchEvent(c)))}function it(a){a.C=[];a.B=[];a.A=[]}T("shaka.cast.CastProxy",Ys);Ys.prototype.changeReceiverId=Ys.prototype.ij;Ys.prototype.forceDisconnect=Ys.prototype.md;Ys.prototype.suggestDisconnect=Ys.prototype.Wk;Ys.prototype.setAppData=Ys.prototype.kh;Ys.prototype.cast=Ys.prototype.cast;Ys.prototype.receiverName=Ys.prototype.Zg;Ys.prototype.isCasting=Ys.prototype.vb;
|
|
1087
|
+
Ys.prototype.canCast=Ys.prototype.hj;Ys.prototype.getPlayer=Ys.prototype.od;Ys.prototype.getVideo=Ys.prototype.Xj;Ys.prototype.destroy=Ys.prototype.destroy;function jt(a,b,c,d){Fg.call(this);var e=this;this.h=a;this.g=b;this.j=new jb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new af(function(){kt(e)});lt(this)}pa(jt,Fg);p=jt.prototype;p.isConnected=function(){return this.G};p.ek=function(){return this.o};p.Tk=function(a){this.i=a};p.mj=function(){this.i=null};
|
|
1088
|
+
p.Uk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.Sk=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.Rk=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
1089
|
+
p.destroy=function(){var a=this,b,c;return Q(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.g&&(b.push(a.g.destroy()),a.g=null),a.C&&(a.C.stop(),a.C=null),a.h=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,Fg.prototype.release.call(a),F(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();G(d)})};
|
|
1090
|
+
function lt(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mt(a)};b.onSenderDisconnected=function(){return mt(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&nt(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);nt(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 ot(a,
|
|
1091
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return pt(a,e)};b.start();b=t(zs);for(var c=b.next();!c.done;c=b.next())a.j.D(a.h,c.value,function(e){return qt(a,"video",e)});for(var d in Eg)a.j.D(a.g,Eg[d],function(e){return qt(a,"player",e)});a.j.D(a.h,"loadeddata",function(){a.B=!0});a.j.D(a.g,"loading",function(){a.o=!1;rt(a)});a.j.D(a.h,"playing",function(){a.o=!1;rt(a)});a.j.D(a.h,"pause",function(){rt(a)});a.j.D(a.g,"unloading",function(){a.o=!0;rt(a)});
|
|
1092
|
+
a.j.D(a.h,"ended",function(){(new af(function(){a.h&&a.h.ended&&(a.o=!0,rt(a))})).ia(st)})}function mt(a){a.m=0;a.A=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;rt(a)}function rt(a){var b;Q(function(c){if(1==c.g)return F(c,Promise.resolve(),2);if(!a.g)return c.return();b=new V("caststatuschanged");a.dispatchEvent(b);tt(a)||ut(a);G(c)})}
|
|
1093
|
+
function vt(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E;Q(function(H){switch(H.g){case 1:for(d in b.player)e=b.player[d],a.g[d](e);a.F(c);f=a.h.autoplay;return b.manifest?(a.h.autoplay=!1,xa(H,5),F(H,a.g.load(b.manifest,b.startTime),7)):F(H,Promise.resolve(),3);case 7:if(b.addThumbnailsTrackCalls)for(g=t(b.addThumbnailsTrackCalls),h=g.next();!h.done;h=g.next())k=h.value,a.g.He.apply(a.g,x(k));if(b.addTextTrackAsyncCalls)for(l=t(b.addTextTrackAsyncCalls),m=l.next();!m.done;m=l.next())n=m.value,
|
|
1094
|
+
a.g.Hd.apply(a.g,x(n));if(b.addChaptersTrackCalls)for(q=t(b.addChaptersTrackCalls),r=q.next();!r.done;r=q.next())u=r.value,a.g.Ge.apply(a.g,x(u));Aa(H,3);break;case 5:return w=Ba(H),v=(new Map).set("detail",w),y=new V("error",v),a.g&&a.g.dispatchEvent(y),H.return();case 3:if(!a.g)return H.return();for(z in b.video)A=b.video[z],a.h[z]=A;for(C in b.playerAfterLoad)E=b.playerAfterLoad[C],a.g[C](E);a.h.autoplay=f;b.manifest&&(a.h.play(),ut(a));G(H)}})}
|
|
1095
|
+
function qt(a,b,c){a.g&&(kt(a),nt(a,{type:"event",targetName:b,event:c},a.l))}
|
|
1096
|
+
function kt(a){a.C.ia(wt);for(var b={video:{},player:{}},c=t(As),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.h[d];a.g.V()&&Fs.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.g[f]())});Ds.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.g[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;nt(a,{type:"update",update:b},a.l);Es.forEach(function(e,f){0==a.m%e&&(e={player:{}},e.player[f]=a.g[f](),nt(a,{type:"update",update:e},
|
|
1097
|
+
a.l))});a.B&&(a.m+=1);tt(a)}function tt(a){return a.A&&(a.h.duration||a.g.V())?(xt(a),a.A=!1,!0):!1}function xt(a,b){var c={contentId:a.g.nd(),streamType:a.g.V()?"LIVE":"BUFFERED",contentType:""};a.g.V()||(c.duration=a.h.duration);a.i&&(c.metadata=a.i);ut(a,void 0===b?0:b,c)}
|
|
1098
|
+
function pt(a,b){var c=xs(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;vt(a,c.initState,c.appData);kt(a);break;case "appData":a.F(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
1099
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(h){return yt(a,g,f,null,h)},function(h){return yt(a,g,f,h,null)})}}
|
|
1100
|
+
function ot(a,b){var c=xs(b.data);switch(c.type){case "PLAY":a.h.play();ut(a);break;case "PAUSE":a.h.pause();ut(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.h.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.h.play(),ut(a)):d&&"PLAYBACK_PAUSE"==d&&(a.h.pause(),ut(a));break;case "STOP":a.g.vc().then(function(){a.g&&ut(a)});break;case "GET_STATUS":xt(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.h.volume,f=a.h.muted;null!=b&&(a.h.volume=Number(b));
|
|
1101
|
+
null!=d&&(a.h.muted=d);e==a.h.volume&&f==a.h.muted||ut(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.h.autoplay=!0);a.g.load(e,d).then(function(){a.g&&xt(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");nt(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:nt(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
1102
|
+
function yt(a,b,c,d,e){a.g&&nt(a,{type:"asyncComplete",id:c,error:d,res:e},a.l,b)}function nt(a,b,c,d){a.G&&(a=ws(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ut(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.h.playbackRate,playerState:a.o?zt:a.g.Mg()?At:a.h.paused?Bt:Ct,currentTime:a.h.currentTime,supportedMediaCommands:63,volume:{level:a.h.volume,muted:a.h.muted}};c&&(d.media=c);nt(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
1103
|
+
T("shaka.cast.CastReceiver",jt);jt.prototype.destroy=jt.prototype.destroy;jt.prototype.setContentArtist=jt.prototype.Rk;jt.prototype.setContentImage=jt.prototype.Sk;jt.prototype.setContentTitle=jt.prototype.Uk;jt.prototype.clearContentMetadata=jt.prototype.mj;jt.prototype.setContentMetadata=jt.prototype.Tk;jt.prototype.isIdle=jt.prototype.ek;jt.prototype.isConnected=jt.prototype.isConnected;var wt=.5,st=5,zt="IDLE",Ct="PLAYING",At="BUFFERING",Bt="PAUSED";function Dt(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Et(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],r=-1,u=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){r=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){u=w;break}if(-1===
|
|
1104
|
+
r||-1===u)q=Ft(d,e),a.nestedCues.push(q);else{for(;r<=u;r++)if(w=q[r]){var v=w.l,y=w.i,z=w.j,A=w.h;if(v!=h||y!=k||z!=l||A!=m)n.payload&&a.nestedCues.push(n),n=Et(d,e,v,y,z,A),h=v,k=y,l=z,m=A;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ft(d,e),a.nestedCues.push(n));n=Et(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Et(a,b,c,d,e,f){a=new Rd(a,b,"");c&&a.textDecoration.push(qe);d&&(a.fontStyle=pe);a.color=e;a.backgroundColor=f;return a}
|
|
1105
|
+
function Ft(a,b){a=new Rd(a,b,"");a.lineBreak=!0;return a}function Gt(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ht(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.o="black";this.s=this.A=null;It(this)}function Jt(a,b,c){var d="CC"+((a.C<<1|a.B)+1),e=new Rd(b,c,"");e.lineInterpretation=1;var f=Kt.get(a.g);f&&(e.line=f);null!=a.s&&null!=a.A&&(e.position=10+Math.min(70,10*a.s)+2.5*a.A);(b=Dt(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Kt.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function It(a){Lt(a,0,15);a.g=1}
|
|
1106
|
+
function Mt(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Nt.has(c)?Nt.get(c):String.fromCharCode(c);break;case 1:d=Ot.get(c);break;case 2:a.i[a.g].pop();d=Pt.get(c);break;case 3:a.i[a.g].pop(),d=Qt.get(c)}d&&a.i[a.g].push(new Gt(d,a.m,a.j,a.o,a.l))}}function Rt(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Lt(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
1107
|
+
var Nt=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"]]),Ot=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Pt=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
|
|
1108
|
+
[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"]]),Qt=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
1109
|
+
[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"]]),Kt=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function St(a,b){this.h=0;this.o=new Ht(a,b);this.i=new Ht(a,b);this.g=this.j=new Ht(a,b);this.l=0;this.m=null}function Tt(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Jt(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Lt(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Lt(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Ut(a){a.h=1;a.g=a.j;a.g.h=0}function Vt(a){cb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var Wt="black green blue cyan red yellow magenta black".split(" "),Xt="white green blue cyan red yellow magenta white_italics".split(" ");function Yt(a,b){this.I=b;this.M=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";Zt(this)}function Zt(a){a.i=[];for(var b=0;16>b;b++)a.i.push($t())}function $t(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function au(a,b){bu(a)&&(a.i[a.h][a.g]=new Gt(b,a.C,a.A,a.s,a.B),a.g++)}function bu(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}Yt.prototype.isVisible=function(){return this.l};
|
|
1110
|
+
function cu(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=$t()}
|
|
1111
|
+
function du(a,b,c){var d=new Rd(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Ud;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Rc:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
1112
|
+
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Dt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Yt.prototype.display=function(){this.l=!0};function eu(){this.i=[];this.h=null;this.g=0}function fu(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 gu(a.h)),a.h=null,a.g=0))}function gu(a){this.g=0;this.h=a}gu.prototype.Ga=function(){return this.g<this.h.length};gu.prototype.Ma=function(){return this.g};function hu(a){if(!a.Ga())throw new U(2,2,3E3);return a.h[a.g++]}gu.prototype.skip=function(a){if(this.g+a>this.h.length)throw new U(2,2,3E3);this.g+=a};
|
|
1113
|
+
gu.prototype.Ei=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function iu(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
1114
|
+
function ju(a,b,c,d){if(!a.g)return[];if(24==c)return c=hu(b).value,d=hu(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),au(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!bu(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=du(b,d,a.i));b.h+1>=b.o?cu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=du(b,d,a.i));b.i[b.h]=$t();b.g=0;break;case 12:b.isVisible()&&
|
|
1115
|
+
(e=du(b,d,a.i)),Zt(b),b.h=0,b.g=0}return e?[e]:[]}
|
|
1116
|
+
function ku(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=hu(b).value;b=[];c=t(lu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=du(e,d,a.i);f&&b.push(f)}Zt(e)}return b}if(137===c)for(b=hu(b).value,b=t(lu(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=hu(b).value;b=null;c=t(lu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=du(e,d,a.i)),e.l=!1;return b?
|
|
1117
|
+
[b]:[]}if(139===c){c=hu(b).value;b=null;c=t(lu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=du(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=hu(b).value,mu(a,b,d);if(143===c)return d=mu(a,255,d),nu(a),d;if(144===c)b.skip(1),d=hu(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=hu(b).value,c=hu(b).value,b.skip(1),a.g&&(b=ou((c&48)>>4,(c&12)>>2,c&3),a.g.B=ou((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=hu(b).value,b=hu(b).value,a.g&&(a=
|
|
1118
|
+
a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=hu(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new Yt(c,a.i),f.j=d,a.h[c]=f);d=hu(b).value;f=hu(b).value;var g=hu(b).value,h=hu(b).value,k=hu(b).value;b=hu(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
|
|
1119
|
+
function lu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function mu(a,b,c){var d=[];b=t(lu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=du(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function nu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ou(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return pu[a<<2|b<<1|c]}
|
|
1120
|
+
var qu=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"]]),pu="black blue green cyan red magenta yellow white".split(" ");function ru(){this.h=[];this.g=[];this.i=new eu;this.l=0;this.m=new Map([["CC1",new St(0,0)],["CC2",new St(0,1)],["CC3",new St(1,0)],["CC4",new St(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;su(this)}ru.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;su(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())nu(b.value)};
|
|
1121
|
+
function su(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,It(c.i),It(c.j),It(c.o);a.B=!0}
|
|
1122
|
+
ru.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new ah(a,0);if(!(8>a.getLength())&&181===a.X()&&49===a.Ba()&&1195456820===a.T()&&3===a.X()&&(c=a.X(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.X(),f=(e&4)>>2,g=a.X(),h=a.X();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Bb:g,hc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
1123
|
+
ru.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=tu(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())fu(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=uu(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
1124
|
+
function tu(a,b){var c=b.type;if(16===(b.Bb&112)){var d=b.Bb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Bb&&255===b.hc||!b.Bb&&!b.hc||!vu(b.Bb)||!vu(b.hc))return 45<=++a.l&&su(a),null;a.l=0;b.Bb&=127;b.hc&=127;var e=b.Bb;if(1<=e&&15>=e||!b.Bb&&!b.hc)return null;e=null;if(16===(b.Bb&112))a:{a.A.add(d),d=b.Bb;a=b.hc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
|
|
1125
|
+
null;var g=95<a?a-96:a-64;13>=g?d=Xt[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Rt(g,c,1+g.g-g.h,g.h),Lt(g,0,c-1),Lt(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.s=f,g.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Mt(c.g,0,32),d=!1,b=Xt[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Wt[(a&
|
|
1126
|
+
14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Mt(c.g,1,a);else if(18===(d&246)&&32===(a&224))Mt(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.hc){case 32:Ut(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Tt(c,2,a);break;case 38:d=Tt(c,3,a);break;case 39:d=Tt(c,4,a);break;case 40:Mt(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:It(c.o);Vt(c);break;case 43:Vt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Jt(b,c.l,a));Lt(b,0,15);break;case 45:b=
|
|
1127
|
+
c.g;3!==c.h?d=null:(d=Jt(b,c.l,a),e=b.g-b.h+1,Rt(b,e-1,e,b.h),Lt(b,0,e-1),Lt(b,b.g,15-b.g),c.l=a);break;case 46:Lt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Jt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ut(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.hc,Mt(c.g,0,b.Bb),Mt(c.g,0,a);return e}
|
|
1128
|
+
function uu(a,b){var c=[];try{for(;b.Ga();){var d=hu(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=hu(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new iu(e));for(var g=a.j.get(e),h=b.Ma();b.Ma()-h<f;){e=g;var k=b,l=hu(k),m=l.value,n=l.pts;if(16===m){var q=hu(k);m=m<<16|q.value}if(0<=m&&31>=m)var r=ju(e,k,m,n);else if(128<=m&&159>=m)r=ku(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
|
|
1129
|
+
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?au(e.g,"\u266a"):au(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&au(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(qu.has(k)){var u=qu.get(k);au(e.g,u)}else au(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?au(e.g,"_"):au(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof U&&3E3===w.code)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
|
|
1130
|
+
else throw w;}return c}function vu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}ru.prototype.getStreams=function(){return Array.from(this.A)};T("shaka.cea.CeaDecoder",ru);Nc=function(){return new ru};function wu(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function xu(){this.j=new Map;this.i=this.h=0;this.g=yu}
|
|
1131
|
+
xu.prototype.init=function(a){function b(f){f=f.name;zu.has(f)&&(c.g=zu.get(f))}var c=this,d=[],e=[];(new dh).box("moov",ih).box("mvex",ih).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.T();g=g.T();c.h=f;c.i=g}).box("trak",ih).R("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.T();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Ba();g.Ba();g.Ba();g.Ba();d.push(h)}).box("mdia",ih).R("mdhd",
|
|
1132
|
+
function(f){f=Bi(f.reader,f.version);e.push(f.timescale)}).box("minf",ih).box("stbl",ih).R("stsd",kh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",lh).box("sinf",ih).box("frma",function(f){f=Ei(f.reader).codec;zu.has(f)&&(c.g=zu.get(f))}).parse(a,!0,!0);if(!d.length||!e.length||d.length!=e.length)throw new U(2,2,2010);this.g==yu&&bb("Unable to determine bitstream format for CEA parsing!");
|
|
1133
|
+
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
1134
|
+
xu.prototype.parse=function(a){var b=this;if(this.g==yu)return[];var c=[],d=0,e=[];(new dh).box("moof",function(f){d=f.start;e=[];ih(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Md:b.h,Nd:b.i,ti:[],timescale:9E4});ih(f)}).R("trun",function(f){var g=e[e.length-1];f=Ci(f.reader,f.version,f.flags);g.ti.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=zi(f.reader,f.flags);g.Md=f.Md||b.h;g.Nd=f.Nd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
|
|
1135
|
+
1];f=Ai(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ma(),k=t(e),l=k.next();!l.done;l=k.next())l=l.value,null===l.baseMediaDecodeTime?bb("Unable to find base media decode time for CEA captions!"):(f.reader.seek(h),Au(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Md,l.Nd,g,l.ti,c))}).parse(a,!1,!0);return c};
|
|
1136
|
+
function Au(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.gh});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].mg);b.Ga();){g=b.T();var q=b.X(),r=null;r=!1;h=1;switch(a.g){case Bu:r=q&31;r=6==r;break;case Cu:h=2;b.skip(1);r=q>>1&63;r=39==r||40==r;break;case Du:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,l<n.length&&(q=n[l].Bf||0),q=(c+q)/d,h=t(wu(b.Ub(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:q});else try{b.skip(g-
|
|
1137
|
+
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].hh||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}T("shaka.cea.Mp4CeaParser",xu);var yu=0,Bu=1,Cu=2,Du=3,zu=(new Map).set("avc1",Bu).set("avc3",Bu).set("dvav",Bu).set("dva1",Bu).set("hev1",Cu).set("hvc1",Cu).set("dvh1",Cu).set("dvhe",Cu).set("vvc1",Du).set("vvi1",Du).set("dvc1",Du).set("dvi1",Du);Oc("video/mp4",function(){return new xu});function Eu(){this.g=null}Eu.prototype.init=function(){};Eu.prototype.parse=function(a){this.g?this.g.clearData():this.g=new bk;var b=[];a=Tb(a);if(!rk(a))return b;a=this.g.parse(a);var c=a.Od(),d=a.Xe();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(wu(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
1138
|
+
T("shaka.cea.TsCeaParser",Eu);Oc("video/mp2t",function(){return new Eu});function Fu(a){var b=0,c=Yb(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=Tb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Gu(a){a=mc(sd(a));a=Fu(a).filter(function(b){return b.type===Hu})[0];if(!a)return null;a=bc(a.value,!0);return(a=kd(a,"WRMHEADER"))?a:null}
|
|
1139
|
+
function Iu(a){try{var b=Gu(a);if(b)a:{for(var c=t(ud(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=sd(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Hu=1;function Ju(a,b,c){var d=Ku(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new U(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Bd});if(1<f.length)throw new U(2,4,4050);f.length&&(g=Lu(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Bd}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Bd?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
1140
|
+
l.Bd});f.length&&(a=Mu(e,k,f,c,h),0==a.length&&(a=[rc("",k,e)]))}if(d.length&&!g&&(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(rc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Oh:h,vm:e,drmInfos:a,cg:g,Th:!0}}
|
|
1141
|
+
function Nu(a,b,c,d){var e=Ju(a,c,d);if(b.Th){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.Th=!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 U(2,4,4008);return e.Oh||b.Oh}
|
|
1142
|
+
function Ou(a){var b=wd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=sd(b)))return b;if((b=wd(a.node,"urn:microsoft:playready","pro"))&&sd(b))return Iu(b);if(a=wd(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=sd(a)){b=mc(a);a=8;b=Yb(b);var c=b.getUint8(a);a+=20;0<c&&(a+=4+16*b.getUint32(a));a=Tb(b,a+4);a=kc(a);a=kd("<pro>"+a+"</pro>");return Iu(a)}return""}
|
|
1143
|
+
function Mu(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Bd];if(h){var k;if((k=wd(g.node,"urn:microsoft:playready","pro"))&&sd(k)){k=sd(k);k=mc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:ph(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Bd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
|
|
1144
|
+
172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:ph(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=rc(h,b,g.init||a||k||l);if(h=Pu.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Ku(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Qu(c.value))&&b.push(c);return b}
|
|
1145
|
+
function Qu(a){var b=a.attributes.schemeIdUri,c=zd(a,"urn:mpeg:cenc:2013","default_KID"),d=xd(a,"urn:mpeg:cenc:2013","pssh").map(td),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:mc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,Bd:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
1146
|
+
function Lu(a){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var b=wd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new U(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new U(2,4,4051);b=wd(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new U(2,4,4051);a=b.attributes.IV;b=ic(b.attributes.keyUriTemplate);
|
|
1147
|
+
if(!a||!b)throw new U(2,4,4051);a=nc(a.substr(2));if(16!=a.byteLength)throw new U(2,4,4048);return{kk:b,iv:a}}
|
|
1148
|
+
var Pu=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4054);if(a=wd(a.node,"https://dashif.org/CPS","Laurl"))if(a=sd(a))return a;return""}).set("com.widevine.alpha",function(a){var b=wd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=sd(b))?b:(a=wd(a.node,"urn:microsoft","laurl"))?ic(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Ou).set("com.microsoft.playready.recommendation",Ou).set("com.microsoft.playready.software",
|
|
1149
|
+
Ou).set("com.microsoft.playready.hardware",Ou).set("org.w3.clearkey",function(a){var b=wd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=sd(b))?b:(a=wd(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=sd(a))?a:""});function Ru(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g.get(k);if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&bb("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
|
|
1150
|
+
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
1151
|
+
function Su(a,b){var c=Tu(a,b,"timescale"),d=1;c&&(d=Fd(c)||1);c=Tu(a,b,"duration");var e=(c=Fd(c||""))?c/d:null,f=Tu(a,b,"startNumber"),g=Number(Tu(a,b,"presentationTimeOffset"))||0,h=Gd(f||"");if(null==f||null==h)h=1;f=null;if(b=Uu(a,b,"SegmentTimeline")){b=rd(b,"S");f=d;a=a.ma.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var q=b[n],r=b[n+1],u=yd(q,"t",Gd),w=yd(q,"d",Gd),v=yd(q,"r",Ed);q=yd(q,"k",Ed)||0;null!=u&&(u-=g);if(w){u=null!=u?u:m;v=v||0;if(0>v)if(r){r=yd(r,"t",Gd);if(null==
|
|
1152
|
+
r)break;else if(u>=r)break;v=Math.ceil((r-u)/w)-1}else{if(Infinity==a)break;else if(u/f>=a)break;v=Math.ceil((a*f-u)/w)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=v;++r)m=u+w,l.push({start:u/f,end:m/f,Bh:u,rc:q,Nk:l.length+k}),u=m}}f=l}return{timescale:d,Kf:c,gb:e,ie:h,Ib:g/d||0,dd:g,timeline:f}}function Vu(a,b){return[b(a.J),b(a.oa),b(a.ra)].filter(df)}function Tu(a,b,c){b=Vu(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
1153
|
+
function Uu(a,b,c){b=Vu(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=vd(d.value,c));d=b.next());return a}
|
|
1154
|
+
function Wu(a,b,c,d,e,f){for(var g=zd(a,"http://www.w3.org/1999/xlink","href"),h=zd(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=md("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return xg(new U(2,4,4028));if("onLoad"!=h)return xg(new U(2,4,4027));var q=qc([d],[g]);return e.request(0,Ng(q,b)).Va(function(r){r=id(r.data,a.tagName);if(!r)return xg(new U(2,4,4001,g));for(a.children=
|
|
1155
|
+
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var w=u.next();!w.done;w=u.next())w=w.value,a.attributes[w]=r.attributes[w];return Xu(a,b,c,q[0],e,f+1)})}
|
|
1156
|
+
function Xu(a,b,c,d,e,f){f=void 0===f?0:f;if(zd(a,"http://www.w3.org/1999/xlink","href")){var g=Wu(a,b,c,d,e,f);c&&(g=g.Va(void 0,function(){return Xu(a,b,c,d,e,f)}));return g}g=[];for(var h=t(qd(a)),k=h.next(),l={};!k.done;l={Jd:void 0},k=h.next())l.Jd=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==zd(l.Jd,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Jd}}(l)):"SegmentTimeline"!=l.Jd.tagName&&g.push(Xu(l.Jd,b,c,d,e,f));return Bg(g).Va(function(){return a})}
|
|
1157
|
+
;function Yu(a,b,c,d,e,f,g){var h,k=(new dh).R("sidx",function(l){h=Zu(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new U(2,3,3004);}
|
|
1158
|
+
function Zu(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.T();if(0==k)throw new U(2,3,3005);if(0==g.version){var l=g.reader.T();var m=g.reader.T()}else l=g.reader.yd(),m=g.reader.yd();g.reader.skip(2);var n=g.reader.Ba();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.T(),r=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.T();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new rj(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function $u(a){this.h=Yb(a);this.g=new ah(this.h,0)}$u.prototype.Ga=function(){return this.g.Ga()};
|
|
1159
|
+
function av(a){var b=bv(a);if(7<b.length)throw new U(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=bv(a);a:{d=t(cv);for(var e=d.next();!e.done;e=d.next())if(Sb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ma();else{if(8==b.length&&b[1]&224)throw new U(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.Ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ma();d=Yb(a.h,a.g.Ma(),b);a.g.skip(b);return new dv(c,
|
|
1160
|
+
d)}function bv(a){var b=a.g.Ma(),c=a.g.X();if(0==c)throw new U(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Tb(a.h,b,c)}var cv=[[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 dv(a,b){this.id=a;this.g=b}
|
|
1161
|
+
function ev(a){if(8<a.g.byteLength)throw new U(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new U(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 fv(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new $u(a.g);for(var n=null,q=null;a.Ga();){var r=av(a);if(187==r.id){var u=gv(r);u&&(r=c*u.al,u=b+u.Fk,null!=n&&m.push(new rj(n+g,r+g,l,q,u-1,f,g,h,k)),n=r,q=u)}}null!=n&&m.push(new rj(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
1162
|
+
function gv(a){var b=new $u(a.g);a=av(b);if(179!=a.id)throw new U(2,3,3013);a=ev(a);b=av(b);if(183!=b.id)throw new U(2,3,3012);b=new $u(b.g);for(var c=0;b.Ga();){var d=av(b);if(241==d.id){c=ev(d);break}}return{al:a,Fk:c}};function hv(a,b,c){b=Uu(a,b,"Initialization");if(!b)return null;var d=a.J.cb(),e=b.attributes.sourceURL;e&&(d=qc(d,[ic(e)],a.Lb()));e=0;var f=null;if(b=yd(b,"range",Dd))e=b.start,f=b.end;c=new pj(function(){return d},e,f,iv(a),null,null,c,a.oa.encrypted);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;a.ma&&!a.ma.bf&&(c.g=a.ma.start+a.ma.duration);return c}
|
|
1163
|
+
function jv(a,b,c){var d=Number(Tu(a,kv,"presentationTimeOffset"))||0,e=Tu(a,kv,"timescale"),f=1;e&&(f=Fd(e)||1);var g=d/f||0,h=hv(a,kv,c);lv(a,h);var k=gd(a);return{endTime:-1,timeline:-1,Oc:function(){var l=Uu(k,kv,"RepresentationIndex");var m=k.J.cb();l&&(l=ic(l.attributes.sourceURL))&&(m=qc(m,[l],k.Lb()));l=mv(k);return nv(k,b,h,m,l.start,l.end,g)},timescale:f}}
|
|
1164
|
+
function nv(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D;return Q(function(I){if(1==I.g)return h=a.presentationTimeline,k=!a.Db||!a.ma.bf,l=a.ma.start,m=a.ma.duration,n=a.J.mimeType.split("/")[1],q=b,r=null,u=[q(d,e,f,!1),"webm"==n?q(c.O(),c.startByte,c.endByte,!0):null],q=null,F(I,Promise.all(u),2);w=I.h;v=w[0];y=w[1]||null;z=null;A=l-g;C=l;E=m?l+m:Infinity;if("mp4"==n)var K=Yu(v,e,d,c,A,C,E);else{K=v;var J=new $u(y);if(440786851!=av(J).id)throw new U(2,3,3008);var L=av(J);if(408125543!=
|
|
1165
|
+
L.id)throw new U(2,3,3009);J=L.g.byteOffset;L=new $u(L.g);for(var N=null;L.Ga();){var O=av(L);if(357149030==O.id){N=O;break}}if(!N)throw new U(2,3,3010);N=new $u(N.g);O=1E6;for(L=null;N.Ga();){var M=av(N);if(2807729==M.id)O=ev(M);else if(17545==M.id)if(4==M.g.byteLength)L=M.g.getFloat32(0);else if(8==M.g.byteLength)L=M.g.getFloat64(0);else throw new U(2,3,3003);}if(null==L)throw new U(2,3,3011);N=O/1E9;L*=N;K=av(new $u(K));if(475249515!=K.id)throw new U(2,3,3007);K=fv(K,J,N,L,d,c,A,C,E)}z=K;H=t(z);
|
|
1166
|
+
for(B=H.next();!B.done;B=H.next())D=B.value,D.codecs=a.J.codecs,D.mimeType=a.J.mimeType,D.bandwidth=a.bandwidth;h.$d(z);r=new Jl(z);k&&r.ld(C,E,!0);return I.return(r)})}function kv(a){return a.Cd}function mv(a){var b=Uu(a,kv,"RepresentationIndex");a=Tu(a,kv,"indexRange");a=Dd(a||"");b&&(a=yd(b,"range",Dd,a));return a}function lv(a,b){ov(a,b);if(!mv(a))throw new U(2,4,4002);}
|
|
1167
|
+
function ov(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=wc&&"mp4"!=c&&"webm"!=c)throw new U(2,4,4006);if("webm"==c&&!b)throw new U(2,4,4005);}
|
|
1168
|
+
function iv(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.qf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.oa.label||null,roles:a.roles||null,language:a.oa.language||null}};function pv(a,b,c){var d=hv(a,qv,c),e=rv(a);if(!e.gb&&!e.timeline&&1<e.sd.length)throw new U(2,4,4002);if(!e.gb&&!a.ma.duration&&!e.timeline&&1==e.sd.length)throw new U(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new U(2,4,4002);var f=null,g=null;a.ra.id&&a.J.id&&(g=b.get(a.ra.id+","+a.J.id))&&(f=g.segmentIndex);var h=sv(a.ma.start,a.ma.duration,a.J.cb,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.Lb);b=!f;f?f.Yd(h,a.presentationTimeline.Gb()):f=new Jl(h);a.presentationTimeline.$d(h);a.Db&&
|
|
1169
|
+
a.ma.bf||f.ld(a.ma.start,a.ma.duration?a.ma.start+a.ma.duration:Infinity,b);g&&(g.segmentIndex=f);return{endTime:-1,timeline:-1,Oc:function(){f&&0!=f.getNumReferences()||f.kf(h);return Promise.resolve(f)},timescale:e.timescale}}function qv(a){return a.tc}function rv(a){var b=tv(a);a=Su(a,qv);var c=a.ie;0==c&&(c=1);var d=0;a.gb?d=a.gb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{gb:a.gb,startTime:d,ie:c,Ib:a.Ib,timescale:a.timescale,timeline:a.timeline,sd:b}}
|
|
1170
|
+
function sv(a,b,c,d,e,f,g,h,k,l){var m=d.sd.length;d.timeline&&d.timeline.length!=d.sd.length&&(m=Math.min(d.timeline.length,d.sd.length));for(var n=a-d.Ib,q=b?a+b:Infinity,r=[],u=d.startTime,w={},v=0;v<m;w={Mf:void 0,Cf:void 0},v++){w.Cf=d.sd[v];var y=u;u=void 0;u=null!=d.gb?y+d.gb:d.timeline?d.timeline[v].end:y+b;w.Mf=null;w=new rj(a+y,a+u,function(z){return function(){null==z.Mf&&(z.Mf=qc(c(),[z.Cf.tk],l()));return z.Mf}}(w),w.Cf.start,w.Cf.end,e,n,a,q,[],"",null,null,sj,f);w.codecs=h;w.mimeType=
|
|
1171
|
+
g;w.bandwidth=k;r.push(w)}return r}function tv(a){return[a.J.tc,a.oa.tc,a.ra.tc].filter(df).map(function(b){return rd(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Jg&&(a.Jg=!0);var c=ic(b.attributes.media);b=yd(b,"mediaRange",Dd,{start:0,end:null});return{tk:c,start:b.start,end:b.end}})};function uv(a,b,c,d,e,f,g,h,k,l){k||a.J.Ze||(a.J.Ze=Tu(a,vv,"initialization"));var m=a.J.Ze?wv(a,g):null,n=xv(a);yv(n);var q=gd(a);if(n.Vd)return ov(a,m),{endTime:-1,timeline:-1,Oc:function(){var y=Ru(n.Vd,q.J.originalId,null,null,q.bandwidth||null,null);y=qc(q.J.cb(),[y]);return nv(q,b,m,y,0,null,n.Ib)},timescale:n.timescale};if(n.gb)return d||"image"===a.oa.contentType||"text"===a.oa.contentType||(d=a.ma.start,l=a.ra.id,c=a.ma.duration,l=(l=null!=l&&f.get(l)||c)?d+l:Infinity,a.presentationTimeline.Rg(n.gb),
|
|
1172
|
+
a.presentationTimeline.ri(d,l)),{endTime:-1,timeline:-1,Oc:function(){return zv(q,n,e,m,f,g,h,a.J.Df)},timescale:n.timescale};var r=null;d=d=null;a.ra.id&&a.J.id&&(d=a.ra.id+","+a.J.id,d=c.get(d))&&(r=d.segmentIndex);var u=a.ma.start,w=a.ma.duration?u+a.ma.duration:Infinity;if(r)l=r,Av(l,n,u,w,m,a.Db),l.$a(a.presentationTimeline.Gb());else{c=0;k=-1;if(null!=a.ra.id&&null!=a.J.id){var v=l.get(a.ra.id);if(v)k=v.timeline;else for(l=t(l.values()),v=l.next();!v.done;v=l.next())if(v=v.value,Math.abs(n.Ib-
|
|
1173
|
+
v.endTime)<=zc&&v.ah.includes(a.J.id)){k=v.timeline;break}else v.timeline>=c&&(c=v.timeline+1)}-1==k&&(k=c);r=new Bv(a.Db,n,a.J.originalId,a.bandwidth,a.J.cb,a.Lb,u,w,m,g,a.J.Df,k)}n.timeline&&"image"!==a.oa.contentType&&"text"!==a.oa.contentType&&a.presentationTimeline.si(r.h?r.h.timeline:[],u);d&&a.Db&&(d.segmentIndex=r);d=(d=(d=n.timeline)&&d[d.length-1])?d.end+n.Ib:-1;l=-1;r instanceof Bv&&(l=r.Pe());return{endTime:d,timeline:l,Oc:function(){r instanceof Bv&&0==r.getNumReferences()&&Av(r,n,u,
|
|
1174
|
+
w,m,a.Db);return Promise.resolve(r)},timescale:n.timescale}}function vv(a){return a.Gc}function xv(a){var b=Su(a,vv),c=Tu(a,vv,"media"),d=Tu(a,vv,"index"),e=Tu(a,vv,"k"),f=0;e&&(f=parseInt(e,10));return{Kf:b.Kf,gb:b.gb,timescale:b.timescale,ie:b.ie,Ib:b.Ib,dd:b.dd,timeline:b.timeline,ac:c&&ic(c),Vd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,vk:f}}
|
|
1175
|
+
function yv(a){var b=a.Vd?1:0;b+=a.timeline?1:0;b+=a.gb?1:0;if(0==b)throw new U(2,4,4002);1!=b&&(a.Vd&&(a.timeline=null),a.Kf=null,a.gb=null);if(!a.Vd&&!a.ac)throw new U(2,4,4002);}
|
|
1176
|
+
function zv(a,b,c,d,e,f,g,h){function k(L){var N=L-v,O=N*w,M=b.Kf,P=N*M;"BigInt"in window&&P>Number.MAX_SAFE_INTEGER&&(P=BigInt(N)*BigInt(M));O+=q;N=O+w;M=Math.min(N,m());var R=[],S=b.vk;if(S)for(var ba=(M-O)/S,W={},Fa=0;Fa<S;W={Ri:void 0},Fa++){var Ga=O+ba*Fa,za=Ga+ba;W.Ri=Fa;W=new rj(Ga,za,function(na){return function(){var va=Ru(y,A,L,na.Ri,z,P);return qc(C(),[va],E())}}(W),0,null,d,H,q,m(),[],"",null,null,sj,f);W.codecs=a.J.codecs;W.mimeType=a.J.mimeType;0==h?0<Fa&&W.qd():0!=Fa%h&&W.qd();R.push(W)}O=
|
|
1177
|
+
new rj(O,M,function(){if(S)return[];var na=Ru(y,A,L,null,z,P);return qc(C(),[na],E())},0,null,d,H,q,m(),R,"",null,null,sj,f,0<R.length);O.codecs=a.J.codecs;O.mimeType=a.J.mimeType;O.bandwidth=a.bandwidth;O.j=N;return O}function l(){var L=[Math.max(n.Gb(),q),Math.min(n.Ac(),m())].map(function(N){return N-q});L=[Math.ceil(L[0]/w),Math.ceil(L[1]/w)-1];a.J.qb&&L[1]++;return L.map(function(N){return N+v})}function m(){var L=null!=r&&e.get(r)||u;return L?q+L:Infinity}var n=a.presentationTimeline,q=a.ma.start,
|
|
1178
|
+
r=a.ra.id,u=a.ma.duration,w=b.gb,v=b.ie,y=b.ac,z=a.bandwidth||null,A=a.J.originalId,C=a.J.cb,E=a.Lb,H=q-b.Ib,B=l();c=a.Db?Math.max(B[0],B[1]-c+1):B[0];g=g||B[1];B=[];for(var D=c;D<=g;++D){var I=k(D);B.push(I)}var K=new Jl(B);B=n.Ac()<m();D=n.V();if(B||D){var J=Math.max(c,g+1);c=w;a.J.qb&&(c=.1);K.Lf(c,function(){var L=n.Gb();K.$a(L);var N=t(l());N.next();N=N.next().value;for(var O=[];J<=N;){var M=k(J);O.push(M);J++}return L>m()&&!O.length?null:O})}return Promise.resolve(K)}
|
|
1179
|
+
function wv(a,b){var c=a.J.Ze;c||(c=Tu(a,vv,"initialization"));if(!c)return null;c=ic(c);var d=a.J.originalId,e=a.bandwidth||null,f=a.J.cb,g=a.Lb;b=new pj(function(){var h=Ru(c,d,null,null,e,null);return qc(f(),[h],g())},0,null,iv(a),null,null,b,a.oa.encrypted);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;a.ma&&!a.ma.bf&&(b.g=a.ma.start+a.ma.duration);return b}
|
|
1180
|
+
function Bv(a,b,c,d,e,f,g,h,k,l,m,n){Jl.call(this,[]);this.C=a;this.h=b;this.G=c;this.B=d;this.F=e;this.I=f;this.j=g;this.l=h;this.s=k;this.A=l;this.H=m;this.K=n;Cv(this)}pa(Bv,Jl);p=Bv.prototype;p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){Jl.prototype.release.call(this);this.h=null};
|
|
1181
|
+
p.$a=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
|
|
1182
|
+
function Av(a,b,c,d,e,f){Dv(a,e);a.C=f;if(a.h){a.h.dd!==b.dd&&(a.h.timeline=b.timeline,a.h.dd=b.dd,a.h.Ib=b.Ib);a.h.ac!==b.ac&&(a.h.ac=b.ac);c=a.h.timeline;if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Cv(a)}function Dv(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&uj(c,b)}}
|
|
1183
|
+
function Cv(a){if(a.h&&!a.o){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.$a(a.j)}}
|
|
1184
|
+
p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
1185
|
+
p.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){c=this.h.timeline[a];var d=c.Nk,e=c.Bh+this.h.dd,f=this.j-this.h.Ib,g=this.j+c.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.C&&.1<Math.abs(h-this.l)?Math.min(h,this.l):this.l);var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=!1;c.rc&&this.h&&this.h.ac&&(q=this.h.ac.includes("$SubNumber$"));if(q){q=(c.end-c.start)/c.rc;for(var r={},u=0;u<c.rc;r={Nf:void 0,
|
|
1186
|
+
Si:void 0},u++){var w=c.start+q*u,v=w+q;r.Si=u;r.Nf=null;r=new rj(this.j+w,this.j+v,function(y){return function(){if(!b.h)return[];null==y.Nf&&(y.Nf=Ev(b.h.ac,b.G,d,b.B,e,y.Si,b.F,b.I));return y.Nf}}(r),0,null,this.s,f,this.j,this.l,[],"",null,null,sj,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.H?0<u&&r.qd():0!=u%this.H&&r.qd();n.push(r)}}c=new rj(this.j+c.start,h,function(){return 0<n.length||!b.h?[]:Ev(b.h.ac,b.G,d,b.B,e,null,b.F,b.I)},0,null,this.s,f,this.j,this.l,n,"",null,null,sj,this.A,
|
|
1187
|
+
0<n.length);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};p.Eb=function(a){Cv(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Ev(a,b,c,d,e,f,g,h){a=Ru(a,b,c,f,d||null,e);return qc(g(),[a],h()).map(function(k){return k.toString()})}p.Pe=function(){return this.K};function Fv(a){this.o=null;this.A=a;this.G=new Gg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Fv.prototype.configure=function(a){this.o=a};Fv.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Fv.prototype.setManifestType=function(a){this.s=a};
|
|
1188
|
+
function Gv(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g)return c=qc(a.i,[Hv(a,b)]),d=Ng(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),Hg(a.G,e),xa(l,2),F(l,e.promise,4);if(2!=l.g)return f=l.h,g=ac(f.data),h=JSON.parse(g),1==h.VERSION&&Iv(a,h,f.uri),Aa(l,0);if((k=Ba(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new af(function(){Gv(a,b)});a.g.ia(a.C);G(l)})}
|
|
1189
|
+
function Hv(a,b){if(!a.m.length)return b;b=new Bb(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Qb(e)&&Fb(b,e);return b.toString()}function Iv(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new af(function(){Gv(a,d)});if(c=b.TTL)a.C=c;a.g.ia(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
1190
|
+
function Jv(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Fv.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
1191
|
+
function Kv(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={ud:void 0},f=e.next())if(g.ud=f.value,f=b.get(g.ud))d.push({Wg:g.ud,location:f});else if(f=a.F.find(function(k){return function(l){return l.Hl==k.ud}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].bj?(h=new Bb(h),Db(h,f["URI-REPLACEMENT"].bj),d.push({Wg:g.ud,location:h.toString()})):d.push({Wg:g.ud,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
1192
|
+
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new Bb(k.location)).Cb))return!1;return!0});d.length&&(a.B=d[0].Wg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:qc(a.i,d)};function Lv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}p=Lv.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};p.Wj=function(){return this.l};p.Hg=function(){return this.j.slice()};p.Bj=function(){return this.i};
|
|
1193
|
+
p.Ph=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
|
|
1194
|
+
a}));else if(a.type==wc)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
1195
|
+
function Mv(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Nv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ov(n),n]})),l=new Map(h.textStreams.map(function(n){return[Pv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Qv(n),n]}));if(b){var m=Rv(wc);l.set(Pv(m),m);m=Rv("image");h.set(Qv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Ih:c,$i:d,Xi:e,bi:f}}
|
|
1196
|
+
p.gg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba;return Q(function(W){if(1==W.g){e=yc;if(!b&&1==a.length)return f=Mv(a,!1),g=f.Ih,h=f.$i,k=f.Xi,l=f.bi,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),W.u(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)r=a[q],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=q));if(-1==n)return W.return();u=Mv(a,!0);w=u.Ih;v=u.$i;y=u.Xi;z=u.bi;
|
|
1197
|
+
return F(W,Promise.all([Sv(d,d.h,w,n,Tv,Uv,m),Sv(d,d.g,v,n,Tv,Uv,m),Sv(d,d.j,y,n,Tv,Uv,m),Sv(d,d.i,z,n,Tv,Uv,m)]),2)}A=0;C=[];if(d.g.length&&d.h.length)for(J=t(d.h),L=J.next();!L.done;L=J.next())for(N=L.value,O=t(d.g),M=O.next();!M.done;M=O.next())P=M.value,R=ng(N.drmInfos,P.drmInfos),N.drmInfos.length&&P.drmInfos.length&&!R.length||(S=(N.bandwidth||0)+(P.bandwidth||0),N.dependencyStream&&(S+=N.dependencyStream.bandwidth||0),P.dependencyStream&&(S+=P.dependencyStream.bandwidth||0),ba=A++,C.push({id:ba,
|
|
1198
|
+
language:N.language,disabledUntilTime:0,primary:N.primary,audio:N,video:P,bandwidth:S,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=d.g.length?d.g:d.h,H=t(E),B=H.next();!B.done;B=H.next())D=B.value,I=A++,K=D.bandwidth||0,D.dependencyStream&&(K+=D.dependencyStream.bandwidth||0),C.push({id:I,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==e.ea?D:null,video:D.type==e.Ca?D:null,bandwidth:K,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
1199
|
+
decodingInfos:[]});d.l=C;G(W)})};
|
|
1200
|
+
function Vv(a){var b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O;return Q(function(M){switch(M.g){case 1:b=yc;if(1==a.length)return M.return(a[0]);c=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.ea}).map(function(R){return[Nv(R),R]}))});d=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.Ca}).map(function(R){return[Ov(R),R]}))});e=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.Ta}).map(function(R){return[Pv(R),R]}))});
|
|
1201
|
+
f=a.map(function(P){return new Map(P.filter(function(R){return R.type===b.Tf}).map(function(R){return[Qv(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Wv(b.Ta),k.set(Pv(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,r=Wv(b.Tf),q.set(Qv(r),r);u=new Lv;return F(M,Sv(u,[],c,0,Xv,Yv,0),2);case 2:return w=M.h,F(M,Sv(u,[],d,0,Xv,Yv,0),3);case 3:return v=M.h,F(M,Sv(u,[],e,0,Xv,Yv,0),4);case 4:return y=M.h,F(M,Sv(u,[],f,0,Xv,Yv,0),5);case 5:z=M.h;A=0;if(v.length&&w.length)for(D=
|
|
1202
|
+
t(w),I=D.next();!I.done;I=D.next())for(K=I.value,J=t(v),L=J.next();!L.done;L=J.next())N=L.value,O=A++,N.variantIds.push(O),K.variantIds.push(O);else for(C=v.concat(w),E=t(C),H=E.next();!H.done;H=E.next())B=H.value,B.variantIds=[A++];return M.return(v.concat(w).concat(y).concat(z))}})}
|
|
1203
|
+
function Sv(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K;return Q(function(J){switch(J.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){J.u(4);break}n=m.value;return F(J,Zv(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new U(2,4,4037);m=l.next();J.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(w=u.value,v=t(w),y=v.next();!y.done;y=v.next())z=y.value,(A=$v(a,z,c,e,f,h))&&b.push(A);C=t(h);for(E=C.next();!E.done;E=
|
|
1204
|
+
C.next())for(H=E.value,B=t(H),D=B.next(),I={};!D.done;I={qh:void 0},D=B.next())if(I.qh=D.value,!aw(I.qh)&&(K=b.some(function(L){return function(N){return bw(a,L.qh,N)}}(I))))throw new U(2,4,4037);return J.return(b)}})}function Zv(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return cw(a,c,b,0<g),b.matchedStreams?b.segmentIndex?F(h,dw(b,d+g),2):h.u(2):h.return(!1);ew(b,d,e,f,g);return h.return(!0)})}
|
|
1205
|
+
function dw(a,b){var c,d,e,f,g,h;return Q(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return F(k,Promise.all(c),2)}if(a.segmentIndex instanceof Ml)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);G(k)})}
|
|
1206
|
+
function $v(a,b,c,d,e,f){if(aw(b))return null;var g=d(b);cw(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return Q(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Ml;return F(h,dw(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;ew(g,0,e,f,0);return g}
|
|
1207
|
+
function ew(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==mf(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
|
|
1208
|
+
function Tv(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
|
|
1209
|
+
null;b.trickModeVideo=null;b.dependencyStream=null;return b}function Xv(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
|
|
1210
|
+
function Uv(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=ng(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new U(2,
|
|
1211
|
+
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Tv(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
|
|
1212
|
+
for(var g=new Ml,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Uv(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Uv(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Tv(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
|
|
1213
|
+
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new Ml,h=t(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),Uv(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Uv(a.dependencyStream,b))}
|
|
1214
|
+
function Yv(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
1215
|
+
function cw(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=fw(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
1216
|
+
function fw(a,b,c){var d={audio:Nv,video:Ov,text:Pv,image:Qv}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return bw(a,l,m)},video:function(l,m){return bw(a,l,m)},text:gw,image:hw}[c.type];for(var g={audio:iw,video:jw,text:kw,image:lw}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!aw(e)&&b.delete(d(e));return e}
|
|
1217
|
+
function mw(a,b){return a.mimeType!=b.mimeType?!1:nw(a.codecs)===nw(b.codecs)}p.Ii=function(a){this.o=a};p.Mi=function(a){this.s=a};function bw(a,b,c){return!mw(b,c)&&!a.o||b.drmInfos&&!lg(b.drmInfos,c.drmInfos)?!1:!0}function gw(a,b){return b.language?a.forced!==b.forced||0==mf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function hw(){return!0}
|
|
1218
|
+
function iw(a,b,c){var d=ow(a,b,c);if(d===pw)return!0;if(d===qw)return!1;d=mf(a.language,b.language);var e=mf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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;if(c.roles.length!==b.roles.length)return c.roles.length<b.roles.length}else{if(!c.roles.length&&
|
|
1219
|
+
b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=rw(a.channelsCount,b.channelsCount,c.channelsCount);if(d==pw)return!0;if(d==qw)return!1;d=rw(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==pw?!0:d==qw?!1:a.bandwidth&&Iw(a.bandwidth,b.bandwidth,c.bandwidth)==pw?!0:!1}
|
|
1220
|
+
function jw(a,b,c){var d=ow(a,b,c);if(d===pw)return!0;if(d===qw)return!1;d=rw(a.width*a.height,b.width*b.height,c.width*c.height);if(d==pw)return!0;if(d==qw)return!1;if(a.frameRate){d=rw(a.frameRate,b.frameRate,c.frameRate);if(d==pw)return!0;if(d==qw)return!1}return a.bandwidth&&Iw(a.bandwidth,b.bandwidth,c.bandwidth)==pw?!0:!1}
|
|
1221
|
+
function kw(a,b,c){var d=mf(a.language,b.language),e=mf(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(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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;
|
|
1222
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function lw(a,b,c){return rw(a.width*a.height,b.width*b.height,c.width*c.height)==pw?!0:!1}
|
|
1223
|
+
function Wv(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
|
|
1224
|
+
function Rv(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jl([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
|
|
1225
|
+
baseOriginalId:null}}function rw(a,b,c){if(b==a&&a!=c)return qw;if(c==a&&a!=b)return pw;if(b>a){if(c<=a||c-a<b-a)return pw;if(c-a>b-a)return qw}else{if(c>a)return qw;if(a-c<a-b)return pw;if(a-c>a-b)return qw}return Jw}function ow(a,b,c){var d=a.mimeType===b.mimeType&&a.codecs===b.codecs,e=a.mimeType===c.mimeType&&a.codecs===c.codecs;if(d&&!e)return qw;if(!d&&e)return pw;b=mw(a,b);a=mw(a,c);return b&&!a?qw:!b&&a?pw:Jw}function Iw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?pw:b<a?qw:Jw}
|
|
1226
|
+
function aw(a){switch(a.type){case wc:return!a.language;case "image":return!a.tilesLayout;default:return!1}}function Ov(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
|
|
1227
|
+
function Nv(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Pv(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Qv(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function nw(a){if(!Kw.has(a)){var b=Je(a);Kw.set(a,b)}return Kw.get(a)}
|
|
1228
|
+
T("shaka.util.PeriodCombiner",Lv);Lv.prototype.setUseStreamOnce=Lv.prototype.Mi;Lv.prototype.setAllowMultiTypeVariants=Lv.prototype.Ii;Lv.prototype.combinePeriods=Lv.prototype.gg;Lv.prototype.deleteStream=Lv.prototype.Ph;Lv.prototype.getImageStreams=Lv.prototype.Bj;Lv.prototype.getTextStreams=Lv.prototype.Hg;Lv.prototype.getVariants=Lv.prototype.Wj;var pw=1,Jw=0,qw=-1,Kw=new Map;function Lw(a,b){var c=new DOMParser,d=Mw.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Nw(a,b){try{var c=dc(a);return Lw(c,b)}catch(d){return null}}
|
|
1229
|
+
var Mw=new pb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ow(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.za=1;this.G=[];this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0};this.s=new Map;this.B=new Map;this.o=new Map;this.C=new Map;this.wa=new Map;this.m=new Lv;this.K=0;this.ya=new Va(5);this.L=new af(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.H.Ja(a.I,"timeupdate"),a.I.paused)){a.H.Aa(a.I,"timeupdate",function(){return Pw(a)});return}Pw(a)});this.P=new Gg;this.N=null;this.F=[];this.ha=Infinity;this.va=!1;this.h=
|
|
1230
|
+
null;this.M=0;this.S=!1;this.H=new jb;this.I=null;this.U=!1;this.ba="";this.na=function(){return!1};this.W=[];this.ka=new Set}p=Ow.prototype;p.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.na=b);c&&this.i&&this.i.presentationTimeline.V()&&this.L.Jb();this.h&&this.h.configure(this.g);this.m&&(this.m.Ii(this.g.dash.multiTypeVariantsAllowed&&Gc()),this.m.Mi(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
1231
|
+
p.start=function(a,b){var c=this,d;return Q(function(e){if(1==e.g)return c.va=b.isLowLatencyMode(),c.A=[a],c.j=b,F(e,Qw(c),2);d=e.h;c.j&&Rw(c,d);if(!c.j)throw new U(2,7,7001);return e.return(c.i)})};
|
|
1232
|
+
p.stop=function(){for(var a=t(this.o.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o.clear();this.C.clear();this.s.clear();this.B.clear();this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.H&&(this.H.release(),this.H=null);this.ka.clear();return this.P.destroy()};
|
|
1233
|
+
p.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return xa(c,2),F(c,Qw(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.j||!b)return c.return();a.j.onError(b);G(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Ac();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Rw(this,0))}}};
|
|
1234
|
+
p.banLocation=function(a){this.h&&this.h.banLocation(a)};p.setMediaElement=function(a){this.I=a};
|
|
1235
|
+
function Qw(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g)return b=4,c="MPD",d=Sw(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Kv(a.h,"Location",!0),f.length&&(e=f)),g=Ng(e,a.g.retryParameters),h=Date.now(),F(q,Tw(a,g,0,{type:b}),2);if(3!=q.g){k=q.h;if(!a.j)return q.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new Bb(k.uri);a.ba=l.g.toString();return F(q,Uw(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ya.sample(1,n);a.ka.clear();
|
|
1236
|
+
return q.return(n)})}
|
|
1237
|
+
function Uw(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){if(1==w.g){e=b;f=a.g.dash.manifestPreprocessor;g=Gn;if(f!=g){wb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Nw(e,d);if(!h)throw new U(2,4,4001,c);f(h);e=ec(h.outerHTML)}k=id(e,d);if(!k)throw new U(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Hn;l!=m&&l(k);if("Patch"===d)return w.return(Vw(a,k));if(n=a.g.dash.disableXlinkProcessing)return w.return(Ww(a,k,c));
|
|
1238
|
+
q=a.g.dash.xlinkFailGracefully;r=Xu(k,a.g.retryParameters,q,c,a.j.networkingEngine);Hg(a.P,r);return F(w,r.promise,2)}u=w.h;return w.return(Ww(a,u,c))})}
|
|
1239
|
+
function Ww(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na,va,Ia,ta,ra,wa,Za,$a,ib,qb,mb,Na,Td,gc,ee,Lf,Mf;return Q(function(ad){switch(ad.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=rd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=td(l))q=qc(d,[n])[0],m&&(a.h?Jv(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(r=Kv(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.mf=b.attributes.id||
|
|
1240
|
+
"";a.l.be=yd(b,"publishTime",Bd)||0;a.G=rd(b,"PatchLocation");u=Promise.resolve();if((w=vd(b,"ContentSteering"))&&a.j){v=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=v;else if(a.h=new Fv(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=v,y=td(w))(z=yd(w,"queryBeforeStart",Id,!1))?u=Gv(a.h,y):Gv(a.h,y);A=t(f.keys());for(C=A.next();!C.done;C=A.next())E=C.value,H=f.get(E),Jv(a.h,"Location",E,H)}B=rd(b,"BaseURL");D=!1;if(a.h)for(I=t(B),K=I.next();!K.done;K=I.next())J=K.value,
|
|
1241
|
+
L=J.attributes.serviceLocation,N=td(J),L&&N&&(Jv(a.h,"BaseURL",L,N),D=!0);a.W=null;D&&a.h||(O=B.map(td),a.W=qc(d,O));M=function(){return a.h&&D?Kv(a.h,"BaseURL"):a.W?a.W:[]};a.l.cb=M;P=0;B&&B.length&&(P=yd(B[0],"availabilityTimeOffset",Hd)||0);a.l.qb=P;a.K=yd(b,"minimumUpdatePeriod",Cd,-1);R=yd(b,"availabilityStartTime",Bd);S=yd(b,"timeShiftBufferDepth",Cd);ba=a.g.dash.ignoreSuggestedPresentationDelay;W=null;ba||(W=yd(b,"suggestedPresentationDelay",Cd));Fa=a.g.dash.ignoreMaxSegmentDuration;Ga=null;
|
|
1242
|
+
Fa||(Ga=yd(b,"maxSegmentDuration",Cd));za=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.U=a.i.presentationTimeline.V()&&"static"==za);a.l.type=za;if(a.i)for(na=a.i.presentationTimeline,va=na.Gb(),Ia=t(a.o.values()),ta=Ia.next();!ta.done;ta=Ia.next())ra=ta.value,ra.segmentIndex&&ra.segmentIndex.$a(va);else wa=a.g.dash.ignoreMinBufferTime,Za=0,wa||(Za=yd(b,"minBufferTime",Cd)||0),$a=0,$a=null!=W?Math.min(W,S||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:Math.min(1.5*
|
|
1243
|
+
Za,S||Infinity),na=new ll(R,$a,a.g.dash.autoCorrectDrift);na.Zc("static"==za);(ib=na.V())&&!isNaN(a.g.availabilityWindowOverride)&&(S=a.g.availabilityWindowOverride);null==S&&(S=Infinity);na.Gf(S);qb=b.attributes.profiles||"";a.l.profiles=qb.split(",");mb={Db:"static"!=za,presentationTimeline:na,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:P,nc:null,profiles:qb.split(","),roles:null,Lb:function(){return""}};return F(ad,u,2);case 2:a.M=0;Na=Xw(a,mb,M,b,!1);Td=Na.duration;gc=Na.periods;("static"!=
|
|
1244
|
+
za||a.U)&&Na.Rh||na.pb(Td||Infinity);a.S&&a.va&&na.Ji(a.ha);na.Rg(Ga||1);a.S&&a.va&&(ee=null!=W?W:a.g.defaultPresentationDelay,na.lh(ee));if(!a.i)return F(ad,a.m.gg(gc,mb.Db),6);a.i.periodCount=gc.length;a.i.gapCount=a.M;return F(ad,Yw(a,gc,!1),4);case 6:a.i={presentationTimeline:na,variants:a.m.l,textStreams:a.m.Hg(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Zw(b),nextUrl:$w(b),periodCount:gc.length,
|
|
1245
|
+
gapCount:a.M,isLowLatency:a.S,startTime:null};if(!na.Zi()){ad.u(7);break}Lf=rd(b,"UTCTiming");return F(ad,ax(a,M,Lf),8);case 8:Mf=ad.h;if(!a.j)return ad.return();na.Ki(Mf);case 7:na.hf(),a.m&&!a.i.presentationTimeline.V()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),bx(a),cx(a,gc),G(ad)}})}
|
|
1246
|
+
function Yw(a,b,c){var d;return Q(function(e){if(1==e.g)return F(e,a.m.gg(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Hg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);G(e)})}
|
|
1247
|
+
function Vw(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L;return Q(function(N){if(1==N.g){c=b.attributes.mpdId;d=yd(b,"originalPublishTime",Bd);if(!c||c!==a.l.mf||d!==a.l.be)throw a.G=[],new U(1,4,4052);e=[];f=[];g=new Set;h=t(qd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ld(l.attributes.sel||""),n=m[m.length-1],q=td(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.wc){r=td(l)||"";var O=Cd(r);if(null!=O){a.l.nc=O;for(var M=t(a.s.values()),P=M.next();!P.done;P=M.next())P.value.nc=
|
|
1248
|
+
O}}else if("type"===n.wc){a.i.presentationTimeline.Zc("static"==q);a.l.type=q;O=t(a.s.values());for(M=O.next();!M.done;M=O.next())M.value.Db="dynamic"==q;"static"==q&&(a.K=-1)}else"publishTime"===n.wc?a.l.be=Bd(q)||0:null===n.wc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)Md(a.G,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&dx(a,n.id);else if("SegmentTemplate"===n.name){M=Ld(l.attributes.sel||"");O=M[M.length-1];if(O.wc){M=ex(a,M);P=td(l)||
|
|
1249
|
+
"";for(var R=t(M),S=R.next();!S.done;S=R.next())S=a.s.get(S.value),Od(S.J.Gc,l.tagName,O.wc,P);O=M}else O=[];u=O;w=t(u);for(v=w.next();!v.done;v=w.next())y=v.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){O=Ld(l.attributes.sel||"");O=ex(a,O);M=t(O);for(P=M.next();!P.done;P=M.next())P=a.s.get(P.value),P=Uu(P,vv,"SegmentTimeline"),R=rd(P,"S"),Md(R,l),P.children=R;z=O;A=t(z);for(C=A.next();!C.done;C=A.next())E=C.value,g.add(E)}H=t(g);for(B=H.next();!B.done;B=H.next())D=B.value,fx(a,
|
|
1250
|
+
D);I=t(f);for(K=I.next();!K.done;K=I.next())J=K.value,e.push.apply(e,x(gx(a,J)));if(!e.length)return N.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.M;return F(N,Yw(a,e,!0),2)}"static"==a.l.type&&(L=a.l.nc,a.i.presentationTimeline.pb(L||Infinity));G(N)})}
|
|
1251
|
+
function gx(a,b){return Xw(a,{Db:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:a.l.qb,profiles:a.l.profiles,nc:a.l.nc,roles:null,Lb:function(){return""}},a.l.cb,b,!0).periods}function dx(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);Uu(e,vv,"SegmentTimeline").children=[];fx(a,d);a.s.delete(d)}a.F=a.F.filter(function(f){return f!==b})}
|
|
1252
|
+
function ex(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ra.id===c&&a.oa.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ra.id===c&&a.oa.position===e&&a.J.id&&b.push(c+
|
|
1253
|
+
","+a.J.id);return b}function fx(a,b){var c=a.s.get(b),d=a.o.get(b);d.segmentIndex&&d.segmentIndex.$a(a.i.presentationTimeline.Gb());try{var e=uv(c,function(f,g,h,k){return hx(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.wa,c.J.aesKey,null,!0,a.B);d.createSegmentIndex=function(){return Q(function(f){if(1==f.g)return d.segmentIndex?f.u(0):F(f,e.Oc(),3);d.segmentIndex=f.h;G(f)})}}catch(f){if(b=c.J.contentType,b!=wc&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1254
|
+
function Zw(a){var b=vd(a,"ServiceDescription");if(!b)return null;a=vd(b,"Latency");b=vd(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
1255
|
+
return c}function $w(a){a=rd(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
1256
|
+
function Xw(a,b,c,d,e){var f=b.nc;f||(f=yd(d,"mediaPresentationDuration",Cd),a.l.nc=f);var g=0;a.i&&a.i.presentationTimeline&&a.U&&(g=a.i.presentationTimeline.Xb());var h=[],k=g;d=rd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],q=yd(m,"start",Cd,k),r=m.attributes.id,u=yd(m,"duration",Cd);q=0==l&&0==q&&a.U?g:q;var w=null;if(n){var v=yd(n,"start",Cd);null!=v&&(w=v-q+g)}else null!=f&&(w=f-q+g);v=zc;w&&u&&Math.abs(w-u)>v&&w>u&&a.M++;null==w&&(w=u);if(!(null!==a.N&&null!==r&&null!==q&&q<
|
|
1257
|
+
a.N)||a.F.includes(r)||l+1==d.length){null!==q&&(null===a.N||q>a.N)&&(a.N=q);k=ix(a,b,c,{start:q,duration:w,node:m,bf:null==w||!n});h.push(k);b.ra.id&&w&&a.wa.set(b.ra.id,w);if(null==w){k=null;break}k=q+w}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.F.includes(c)||a.F.push(c);else a.F=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,Rh:!1}:{periods:h,duration:k,Rh:!0}}
|
|
1258
|
+
function bx(a){var b=Array.from(a.C.keys()).filter(function(h){return!a.F.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.C.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.o.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Ph(g,c),a.o.delete(f)))}d&&a.C.delete(c)}}function cx(a,b){b=new Set(b.map(function(e){return e.id}));for(var c=t(a.B.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.has(d)||a.B.delete(d)}
|
|
1259
|
+
function ix(a,b,c,d){b.ra=jx(a,d.node,null,c);b.ma=d;b.ra.qb=b.qb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=rd(d.node,"EventStream");c=b.presentationTimeline.Gb();e=t(e);for(var f=e.next();!f.done;f=e.next())kx(a,d.start,d.duration,f.value,c);c=rd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=lx(a,e)))b.Lb=e;c=rd(d.node,"AdaptationSet").map(function(r,u){return mx(a,b,u,r)}).filter(df);if(b.Db){e=
|
|
1260
|
+
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.Jk);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new U(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.pj),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={rh:void 0},m=l.next())if(n.rh=m.value,e.has(n.rh.originalId)){f||
|
|
1261
|
+
(f=rd(d.node,"AdaptationSet").map(function(r,u){return mx(a,b,u,r)}).filter(df));m=t(f);for(var q=m.next();!q.done;q=m.next())if(q=q.value.streams.find(function(r){return function(u){return u.originalId==r.rh.originalId}}(n)))q.dependencyStream=e.get(q.originalId),q.originalId+=q.dependencyStream.originalId,k.push(q)}k.length&&h.streams.push.apply(h.streams,x(k))}d=c.filter(function(r){return!r.Ah});c=c.filter(function(r){return r.Ah});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=
|
|
1262
|
+
e.value,f=e.Ah.split(" "),g=t(d),h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())dg(k.value,e.streams);c=nx(a.g.disableAudio,d,"audio");e=nx(a.g.disableVideo,d,"video");f=nx(a.g.disableText,d,wc);d=nx(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.ra.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
|
|
1263
|
+
function nx(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
1264
|
+
function mx(a,b,c,d){function e(L){var N=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];N&&L&&(L=qc(b.oa.cb(),[L],b.Lb()),a.j.addFont(N,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.oa=jx(a,d,b.ra,null);b.oa.position=c;var h=!1;c=rd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(df),
|
|
1265
|
+
l=void 0,m=b.oa.contentType==wc;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=rd(d,"EssentialProperty");c=null;var u=!1;n=null;q=!1;r=t(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
1266
|
+
v)var y=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var z=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=lx(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=rd(d,"SupplementalProperty");q=t(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
|
|
1267
|
+
w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?y=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?z=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=lx(a,r));n&&(b.Lb=n);n=rd(d,"Accessibility");var C=new Map,E;n=t(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
|
|
1268
|
+
q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?E="visually impaired":"2"==r?E="hard of hearing":"9"==r&&(E="spoken subtitles"));else if(q=1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var H=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],H=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,H=v);C.set(w,hf(H))}else C.set("svc1","und");else if(q=1,null!=r)for(r=
|
|
1269
|
+
r.split(";"),w=t(r),v=w.next();!v.done;v=w.next()){H=v.value;var B=v=void 0;H.includes("=")?(H=H.split("="),v=H[0].startsWith("CC")?H[0]:"CC"+H[0],B=H[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,B=H);C.set(v,hf(B))}else C.set("CC1","und");n=rd(d,"ContentProtection");var D=Ju(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.oa.encrypted=0<n.length;var I=hf(b.oa.language||"und"),K=b.oa.label,J=new Map;d=rd(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];q=t(d);for(r=q.next();!r.done;r=q.next())if(w=
|
|
1270
|
+
r.value,r=zd(w,"urn:scte:dash:scte214-extensions","supplementalCodecs"))w=fd(w),w.attributes.codecs=r.split(" ").join(","),w.attributes.id&&(w.attributes.supplementalId=w.attributes.id+"_supplementalCodecs"),n.push(w);d.push.apply(d,x(n))}n=d.map(function(L){var N=ox(a,b,D,l,I,K,h,k,C,L,E,A);return N&&(N.hdr=N.hdr||y,N.colorGamut=N.colorGamut||z,N.fastSwitching=u,L=L.attributes.dependencyId)?(N.baseOriginalId=L,J.set(L,N),null):N}).filter(function(L){return!!L});if(0==n.length&&0==J.size){c="image"==
|
|
1271
|
+
b.oa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new U(2,4,4003);}if(!b.oa.contentType||"application"==b.oa.contentType)for(b.oa.contentType=px(n[0].mimeType,n[0].codecs),m=t(n),q=m.next();!q.done;q=m.next())q.value.type=b.oa.contentType;m=b.oa.id||"__fake__"+a.za++;q=t(n);for(r=q.next();!r.done;r=q.next()){r=r.value;w=t(D.drmInfos);for(v=w.next();!v.done;v=w.next())v=v.value,v.keyIds=v.keyIds&&r.keyIds?new Set([].concat(x(v.keyIds),x(r.keyIds))):v.keyIds||r.keyIds;r.groupId=
|
|
1272
|
+
m}d=d.map(function(L){return L.attributes.supplementalId||L.attributes.id}).filter(df);return{id:m,contentType:b.oa.contentType,language:I,wm:h,streams:n,drmInfos:D.drmInfos,Ah:c,Jk:d,pj:J}}
|
|
1273
|
+
function lx(a,b){if((b=wd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&yd(b,"useMPDUrlQuery",Id,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.ba:c.split("&").map(function(d){if("$querypart$"==d)return a.ba;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new Hb(a.ba)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
|
|
1274
|
+
function ox(a,b,c,d,e,f,g,h,k,l,m,n){b.J=jx(a,l,b.oa,null);var q=b.J.id;a.ha=Math.min(a.ha,b.J.qb);a.S=0<a.ha;if(!qx(b.J))return null;var r=b.ma.start;b.bandwidth=yd(l,"bandwidth",Fd)||0;b.roles=h;var u=rd(l,"SupplementalProperty"),w=rd(l,"EssentialProperty"),v=rd(l,"ContentProtection");l=null;var y=w.find(function(M){return"urn:mpeg:dash:urlparam:2014"==M.attributes.schemeIdUri});y?l=lx(a,y):(y=u.find(function(M){return"urn:mpeg:dash:urlparam:2014"==M.attributes.schemeIdUri}))&&(l=lx(a,y));l&&(b.Lb=
|
|
1275
|
+
l);y=b.J.contentType;l=y==wc||"application"==y;y="image"==y;v.length&&(b.oa.encrypted=!0);try{var z=void 0;if(c.cg){var A=b.J.cb,C=b.Lb,E=qc(A(),[c.cg.kk],C()),H=Ng(E,a.g.retryParameters);z={bitsKey:128,blockCipherMode:"CBC",iv:c.cg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,P,R;return Q(function(S){if(1==S.g)return F(S,Tw(a,H,6),2);if(3!=S.g){M=S.h;if(!M.data||16!=M.data.byteLength)throw new U(2,4,4049);P={name:"AES-CBC"};R=z;return F(S,window.crypto.subtle.importKey("raw",M.data,P,
|
|
1276
|
+
!0,["decrypt"]),3)}R.cryptoKey=S.h;z.fetchKey=void 0;G(S)})}}}b.J.aesKey=z;A=function(M,P,R,S){return hx(a,M,P,R,S)};if(b.J.Cd)var B=jv(b,A,z);else if(b.J.tc)B=pv(b,a.o,z);else if(b.J.Gc)B=uv(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.wa,z,n,!1,a.B);else{var D=b.ma.duration||0,I=b.J.cb,K=b.J.mimeType,J=b.J.codecs;B={endTime:-1,timeline:-1,Oc:function(){var M=Ll(r,D,I());M.Eb(function(P){P.mimeType=K;P.codecs=J});return Promise.resolve(M)},timescale:1}}}catch(M){if((l||y)&&4002==M.code)return null;
|
|
1277
|
+
throw M;}n=Nu(v,c,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);v=!1;u.some(function(M){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==M.attributes.schemeIdUri&&"JOC"==M.attributes.value})&&(v=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var L;if(y&&((w=w.find(function(M){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(L=w.attributes.value),!L))return null;var N;
|
|
1278
|
+
l=b.J.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"))&&(N="PQ");w=b.J.id?b.ra.id+","+b.J.id:"";a.G.length&&q&&a.s.set(b.ra.id+","+q,rx(b));b.J.yf&&sx(a,b.J.yf,B,b.presentationTimeline);-1!=B.endTime&&null!=b.ra.id&&null!=b.J.id&&((q=a.B.get(b.ra.id))?(q.endTime=B.endTime,q.ah.includes(b.J.id)||q.ah.push(b.J.id),a.B.set(b.ra.id,q)):a.B.set(b.ra.id,{endTime:B.endTime,timeline:B.timeline,ah:[b.J.id]}));
|
|
1279
|
+
var O=w&&a.o.has(w)?a.o.get(w):{id:a.za++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){O.segmentIndex&&(O.segmentIndex.release(),O.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.oa.language,label:f,
|
|
1280
|
+
type:b.oa.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.J.qf,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:v,closedCaptions:k,hdr:N,colorGamut:void 0,videoLayout:void 0,tilesLayout:L,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Ee(b.J.mimeType,b.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};O.createSegmentIndex=function(){var M;return Q(function(P){if(1==P.g){if(O.segmentIndex)return P.u(0);
|
|
1281
|
+
M=O;return F(P,B.Oc(),3)}M.segmentIndex=P.h;G(P)})};w&&b.Db&&!a.o.has(w)&&(b=b.ra.id||"",a.C.has(b)||a.C.set(b,[]),a.o.set(w,O),a.C.get(b).push(w));return O}
|
|
1282
|
+
function sx(a,b,c,d){if(!a.ka.has(b)){a.ka.add(b);var e=yd(b,"presentationTime",Gd)||0,f=vd(b,"UTCTiming"),g;if(g=f&&f.attributes.schemeIdUri)f=f.attributes.schemeIdUri,g=!("urn:mpeg:dash:utc:http-ntp:2014"===f||"urn:mpeg:dash:utc:ntp:2014"===f||"urn:mpeg:dash:utc:sntp:2014"===f);g?b=1E3*(yd(b,"wallClockTime",Bd)||0):(b=yd(b,"wallClockTime",Gd)||0,b=Pj(b));c=new Date(b-e/c.timescale*1E3);e=c.getTime()/1E3;isNaN(e)||(d.o||d.mh(e),d=(new Map).set("detail",{wallClockTime:b,programStartDate:c}),d=new V("prft",
|
|
1283
|
+
d),a.j.onEvent(d))}}function rx(a){function b(c){if(!c)return null;c=gd(c);c.Cd=null;c.tc=null;c.Gc=Qd(c.Gc);c.yf=null;return c}a=gd(a);a.ra=b(a.ra);a.oa=b(a.oa);a.J=b(a.J);a.ma&&(a.ma=gd(a.ma),a.ma.node=null);return a}
|
|
1284
|
+
function Pw(a){var b,c;return Q(function(d){switch(d.g){case 1:return b=0,xa(d,2),F(d,Qw(a),4);case 4:b=d.h;Aa(d,3);break;case 2:if(c=Ba(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Rw(a,b);G(d)}})}function Rw(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.L.ia(Math.max(c-b,Wa(a.ya)))}}
|
|
1285
|
+
function jx(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,qf:null,audioSamplingRate:null,qb:0,Df:0,encrypted:!1};d=d||c.cb;var e=b.attributes.id,f=b.attributes.supplementalId,g=rd(b,"BaseURL"),h,k=!1;if(a.h)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=td(n);m&&n&&(Jv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(td));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n=
|
|
1286
|
+
pm([b.attributes.codecs||c.codecs]).join(",");var q=yd(b,"frameRate",Jd)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,u=tx(rd(b,"InbandEventStream"),c.emsgSchemeIdUris),w=rd(b,"AudioChannelConfiguration");w=ux(w)||c.qf;var v=yd(b,"audioSamplingRate",Gd)||c.audioSamplingRate;l||(l=px(m,n));var y=vd(b,"SegmentBase"),z=vd(b,"SegmentTemplate"),A=y?yd(y,"availabilityTimeOffset",Hd)||0:0,C=z?yd(z,"availabilityTimeOffset",Hd)||0:0,E=g&&g.length?yd(g[0],"availabilityTimeOffset",Hd)||0:0;A=c.qb+E+A+
|
|
1287
|
+
C;C=null;(E=vd(b,"SegmentSequenceProperties"))&&(E=vd(E,"SAP"))&&(C=yd(E,"cadence",Ed));E=b.attributes.label;var H=rd(b,"Label");H&&H.length&&(H=H[0],sd(H)&&(E=sd(H)));return{cb:function(){return qc(d(),g.length?a.h&&k?Kv(a.h,e):h?h:[]:[])},Cd:y||c.Cd,tc:vd(b,"SegmentList")||c.tc,Gc:z||c.Gc,yf:vd(b,"ProducerReferenceTime")||c.yf,width:yd(b,"width",Gd)||c.width,height:yd(b,"height",Gd)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:q,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,
|
|
1288
|
+
language:b.attributes.lang,qf:w,audioSamplingRate:v,qb:A,Ze:null,Df:C||c.Df,label:E||null,encrypted:!1}}function tx(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
1289
|
+
function ux(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
|
|
1290
|
+
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
|
|
1291
|
+
function qx(a){var b=a.Cd?1:0;b+=a.tc?1:0;b+=a.Gc?1:0;if(0==b)return a.contentType==wc||"application"==a.contentType?!0:!1;1!=b&&(a.Cd&&(a.tc=null),a.Gc=null);return!0}
|
|
1292
|
+
function vx(a,b,c,d){var e,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return e=[ic(c)],f=qc(b(),e),g=Ng(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.na()}),Hg(a.P,h),F(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=ac(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1293
|
+
function ax(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.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.u(4);break}h=g.value;xa(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.u(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.u(8);
|
|
1294
|
+
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":bb("NTP UTCTiming scheme is not supported");break;default:bb("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return F(n,vx(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return F(n,vx(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:Aa(n,
|
|
1295
|
+
3);break;case 5:Ba(n);case 3:g=f.next();n.u(2);break;case 4:return bb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1296
|
+
function kx(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=yd(d,"timescale",Gd)||1,k=yd(d,"presentationTimeOffset",Gd)||0;d=t(rd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=yd(l,"presentationTime",Gd)||0,n=yd(l,"duration",Gd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:Pd(l),eventNode:Qd(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1297
|
+
function hx(a,b,c,d,e){var f,g,h,k;return Q(function(l){if(1==l.g)return f=Tg,g=e?0:1,h=tm(b,c,d,a.g.retryParameters),F(l,Tw(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function px(a,b){b=Ee(a,b);return Ue(b)?wc:a.split("/")[0]}function Tw(a,b,c,d){d||(d={});d.isPreload=a.na();b=a.j.networkingEngine.request(c,b,d);Hg(a.P,b);return b.promise}
|
|
1298
|
+
function Sw(a){var b=a.l.be;if(!a.l.mf||!b||!a.G.length)return[];var c=Date.now()/1E3,d=a.G.filter(function(e){e=Gd(e.attributes.ttl);return!e||b+e>c}).map(td).filter(df);return d.length?qc(a.A,d):[]}T("shaka.dash.DashParser",Ow);ti("application/dash+xml",function(){return new Ow});ti("video/vnd.mpeg.dash.mpd",function(){return new Ow});function wx(){}T("shaka.dependencies",wx);wx.has=function(a){return xx.has(a)};wx.add=function(a,b){if(!yx[a])throw Error(a+" is not supported");a==zx?wb("mux.js","mux.js is no longer used in Shaka Player."):xx.set(a,function(){return b})};var zx="muxjs",yx={xm:zx,ISOBoxer:"ISOBoxer"};wx.Allowed=yx;var xx=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Ax(){this.j=new pb(function(){return["Oculus","Quest"].some(function(a){return navigator.userAgent.includes(a.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase()?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?
|
|
1299
|
+
"MOBILE":"DESKTOP"});this.l=new pb(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function wi(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}p=Ax.prototype;p.dc=function(){return!!navigator.mediaCapabilities};
|
|
1300
|
+
p.La=function(){return this.j.value()};p.Da=function(){return this.l.value()};p.fe=function(){return!1};p.Ai=function(){return!1};p.$e=function(){return!1};p.Bi=function(){return!1};p.ee=function(){return!1};p.bd=function(){return!0};p.cd=function(){return!0};p.je=function(){return!0};p.Gi=function(){return 0};p.ic=function(){return Promise.resolve({width:Infinity,height:Infinity})};p.Pi=function(){return!1};p.ph=function(){return!1};
|
|
1301
|
+
p.Ua=function(a){var b=this.La();if("TV"===b||"CONSOLE"===b||"CAST"===b)a.ads.customPlayheadTracker=!0,a.ads.skipPlayDetection=!0,a.ads.supportsMultipleMediaElements=!1;return a};p.uh=function(){return!!window.indexedDB};p.xi=function(){return[]};function Dn(a){rb();return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}p.Wi=function(){return!1};p.li=function(){return!1};p.fh=function(){return!1};p.If=function(){return!0};p.mi=function(){return!1};
|
|
1302
|
+
p.Vi=function(){return!0};p.$c=function(){return!1};p.Qg=function(a){return"com.apple.fps"===a};p.toString=function(){return"Device: "+this.Ob()+" v"+this.xa()+"; Type: "+this.La()};function Bx(){Ax.call(this);this.g=new pb(function(){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});this.h=new pb(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}pa(Bx,Ax);p=Bx.prototype;p.xa=function(){return this.g.value()};p.Ob=function(){return"Apple Browser"};p.La=function(){return this.h.value()};
|
|
1303
|
+
p.Da=function(){return"WEBKIT"};p.dc=function(){return!1};p.fe=function(a,b){return"audio"===b};p.$e=function(){return!0};p.Bi=function(a){return"audio"===a};p.Ua=function(a){Ax.prototype.Ua.call(this,a);a.abr.minTimeToSwitch=.5;return a};p.Wi=function(){return!0};
|
|
1304
|
+
(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(tb=function(){return new Bx});function Cx(){if(!Dx())throw Error("Not a Chromecast device!");Ax.call(this);this.h=new pb(function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null});this.g=new pb(function(){var a=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;a=a.toLowerCase();return a.includes("android")?Ex:a.includes("fuchsia")?Fx:Gx})}pa(Cx,Ax);p=Cx.prototype;p.xa=function(){return this.h.value()};p.Ob=function(){return"Chromecast with "+this.g.value()};
|
|
1305
|
+
p.La=function(){return"CAST"};p.Da=function(){return"CHROMIUM"};p.dc=function(){return Ax.prototype.dc.call(this)&&this.g.value()!==Gx};p.cd=function(){return this.g.value()!==Gx};p.Gi=function(){switch(this.g.value()){case Ex:return 0;case Fx:return 3;default:return 1}};
|
|
1306
|
+
p.ic=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:a=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;b={width:1280,height:720};xa(f,2);if(!(c=a)){f.u(4);break}return F(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:c=f.h;case 4:if(c){b.width=3840;b.height=2160;f.u(6);break}if(!(d=a)){f.u(7);break}return F(f,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:d=
|
|
1307
|
+
f.h;case 7:d&&(b.width=1920,b.height=1080);case 6:Aa(f,3);break;case 2:e=Ba(f),ab("Failed to check canDisplayType:",e);case 3:return f.return(b)}})};p.Ua=function(a){Ax.prototype.Ua.call(this,a);a.streaming.stallSkip=0;return a};p.uh=function(){return!1};p.$c=function(){return!0};function Dx(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var Ex="Android",Fx="Fuchsia",Gx="Linux";Dx()&&(tb=function(){return new Cx});function Hx(){Ax.call(this);var a=this;this.i=new pb(function(){var b=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return b?parseInt(b[2],10):null});this.g=new pb(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"});this.h=new pb(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?
|
|
1308
|
+
navigator.platform.toLowerCase().includes("win32"):!1});this.o=new pb(function(){return navigator.userAgent.match(/Edge?\//)?!a.h.value():!0});this.m=new pb(function(){return navigator.userAgent.includes("sony.hbbtv.tv")})}pa(Hx,Ax);p=Hx.prototype;p.xa=function(){return this.i.value()};p.Ob=function(){return this.g.value()};p.fe=function(a){return og(a)?"Edge"===this.g.value()&&this.h.value():!1};p.Ai=function(){return"Edge"===this.g.value()&&this.h.value()};
|
|
1309
|
+
p.$e=function(){return"Edge"===this.g.value()&&this.h.value()};p.cd=function(){return this.o.value()};p.Ua=function(a){Ax.prototype.Ua.call(this,a);if(this.h.value())switch(this.g.value()){case "Firefox":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case "Chrome":a.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return a};
|
|
1310
|
+
p.fh=function(){return"Edge"===this.g.value()||this.m.value()};p.$c=function(){if("GECKO"===this.Da()){var a=this.xa();return null!==a?100<=a:Ax.prototype.$c.call(this)}return Ax.prototype.$c.call(this)};p.Qg=function(a){return"GECKO"===this.Da()?a.startsWith("com.microsoft.playready.recommendation"):Ax.prototype.Qg.call(this,a)};ub=function(){return new Hx};function Ix(){Ax.apply(this,arguments)}pa(Ix,Ax);p=Ix.prototype;p.xa=function(){return null};p.Ob=function(){return"Hisense"};p.La=function(){return"TV"};p.dc=function(){return!1};p.ic=function(){var a={width:1920,height:1080},b=null;if(window.Hisense_Get4KSupportState)try{b=window.Hisense_Get4KSupportState()}catch(c){}null==b&&(b=navigator.userAgent.includes("UHD"));b&&(a.width=3840,a.height=2160);return Promise.resolve(a)};p.Ua=function(a){Ax.prototype.Ua.call(this,a);a.streaming.stallSkip=0;return a};
|
|
1311
|
+
if(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))tb=function(){return new Ix};function Jx(){Ax.call(this);this.g=new pb(function(){var a=navigator.userAgent.match(/PlayStation (\d+)/);return a?parseInt(a[1],10):null})}pa(Jx,Ax);p=Jx.prototype;p.Ob=function(){return"PlayStation"};p.La=function(){return"CONSOLE"};p.Da=function(){return"WEBKIT"};p.xa=function(){return this.g.value()};p.dc=function(){return!1};p.bd=function(){return!1};p.cd=function(){return!1};p.ph=function(){return 4===this.xa()};
|
|
1312
|
+
p.ic=function(){var a,b,c,d,e;return Q(function(f){switch(f.g){case 1:return a={width:1920,height:1080},b=!1,xa(f,2),F(f,window.msdk.device.getDisplayInfo(),4);case 4:c=f.h;b="4K"===c.resolution;Aa(f,3);break;case 2:return Ba(f),xa(f,5),F(f,window.msdk.device.getDisplayInfoImmediate(),7);case 7:d=f.h;b="4K"===d.resolution;Aa(f,3);break;case 5:e=Ba(f),bb("PlayStation: Failed to get the display info:",e);case 3:return b&&(a.width=3840,a.height=2160),f.return(a)}})};
|
|
1313
|
+
p.Ua=function(a){Ax.prototype.Ua.call(this,a);4===this.xa()&&a.drm.preferredKeySystems.push("com.microsoft.playready");a.streaming.clearDecodingCache=!0;return a};p.fh=function(){return 4===this.xa()};p.If=function(){return 4!==this.xa()};navigator.userAgent.includes("PlayStation")&&(tb=function(){return new Jx});function Kx(){Ax.call(this);var a=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=a?parseInt(a[1],10):null;this.h=a?parseInt(a[2],10):null}pa(Kx,Ax);p=Kx.prototype;p.xa=function(){return this.g};p.Ob=function(){return"Tizen"};p.Da=function(){return"CHROMIUM"};p.La=function(){return"TV"};p.fe=function(){return!0};p.ee=function(){return 3===this.xa()};p.dc=function(){return!1};p.bd=function(){var a=this.xa();return null!==a?4<=a:Ax.prototype.bd.call(this)};p.cd=function(){return!1};
|
|
1314
|
+
p.je=function(){return this.g&&this.h?5===this.g?5<=this.h:5<this.g:Ax.prototype.je.call(this)};
|
|
1315
|
+
p.ic=function(){var a=window.devicePixelRatio;a={width:1920<window.screen.width*a?3840:1920,height:1080<window.screen.height*a?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var b=webapis.systeminfo.getMaxVideoResolution();a.width=b.width;a.height=b.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,
|
|
1316
|
+
a.height=2160)}catch(c){bb("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Ua=function(a){Ax.prototype.Ua.call(this,a);a.drm.ignoreDuplicateInitData=2!==this.xa();3===this.xa()&&(a.streaming.crossBoundaryStrategy="reset_to_encrypted");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;a.streaming.gapPadding=2;return a};p.xi=function(){var a=[];null!==this.g&&5>this.g&&a.push("opus");return a};p.li=function(){return!0};
|
|
1317
|
+
p.mi=function(){return 3===this.xa()};navigator.userAgent.includes("Tizen")&&(tb=function(){return new Kx});function Lx(){Ax.apply(this,arguments)}pa(Lx,Ax);Lx.prototype.xa=function(){return null};Lx.prototype.Ob=function(){return"Vizio"};Lx.prototype.La=function(){return"TV"};Lx.prototype.dc=function(){return!1};navigator.userAgent.includes("VIZIO SmartCast")&&(tb=function(){return new Lx});function Mx(){Ax.call(this);this.h=new pb(function(){return navigator.userAgent.includes("DT_STB_BCM")});this.g=new pb(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;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})}pa(Mx,Ax);p=Mx.prototype;p.xa=function(){return this.g.value()};p.Ob=function(){return"WebKit STB"};p.La=function(){return"TV"};p.Da=function(){return"WEBKIT"};
|
|
1318
|
+
p.dc=function(){return!1};p.bd=function(){var a=this.g.value();return null!==a?15<=a:!0};p.ic=function(){return Promise.resolve({width:window.screen.width*window.devicePixelRatio,height:window.screen.height*window.devicePixelRatio})};p.If=function(){return!this.h.value()};
|
|
1319
|
+
if(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))tb=function(){return new Mx};function Nx(){Ax.call(this);this.g=Ox()}pa(Nx,Ax);p=Nx.prototype;p.xa=function(){return this.g};p.Ob=function(){return"WebOS"};p.La=function(){return"TV"};p.Da=function(){return"CHROMIUM"};p.dc=function(){return!1};p.bd=function(){var a=this.xa();return null!==a?3<a:Ax.prototype.bd.call(this)};p.cd=function(){var a=this.xa();return null!==a?6<a:Ax.prototype.cd.call(this)};p.je=function(){var a=this.xa();return null!==a?3<a:Ax.prototype.je.call(this)};
|
|
1320
|
+
p.ic=function(){var a={width:1920,height:1080};try{var b=JSON.parse(window.PalmSystem.deviceInfo);a.width=Math.max(1920,b.screenWidth);a.height=Math.max(1080,b.screenHeight)}catch(c){bb("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};p.Ua=function(a){Ax.prototype.Ua.call(this,a);3===this.xa()&&(a.streaming.crossBoundaryStrategy="reset");a.streaming.shouldFixTimestampOffset=!0;a.streaming.stallSkip=0;return a};
|
|
1321
|
+
function Ox(){var a=null,b=navigator.userAgent.match(/Chrome\/(\d+)/);b&&(a=parseInt(b[1],10));switch(a){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}p.Vi=function(){return!1};p.$c=function(){var a=this.xa();return null!==a?6<=a:Ax.prototype.$c.call(this)};navigator.userAgent.includes("Web0S")&&(tb=function(){return new Nx});function Px(){Ax.call(this);this.g=navigator.userAgent.includes("Edge/");var a=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=a?parseInt(a[1],10):null}pa(Px,Ax);p=Px.prototype;p.xa=function(){return this.h};p.Ob=function(){return"Xbox"};p.La=function(){return"CONSOLE"};p.Da=function(){return this.g?"EDGE":"CHROMIUM"};p.fe=function(){return!0};p.$e=function(){return!0};p.Pi=function(){return this.g};
|
|
1322
|
+
p.ic=function(){var a={width:1920,height:1080},b=Qx();if(b)try{var c=new b.Media.Protection.ProtectionCapabilities,d=b.Media.Protection.ProtectionCapabilityResult;b=null;do b=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(b===d.maybe);b===d.probably&&(a.width=3840,a.height=2160)}catch(e){bb("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(a)};
|
|
1323
|
+
p.Ua=function(a){Ax.prototype.Ua.call(this,a);a.drm.parseInbandPsshEnabled=this.g;a.drm.preferredKeySystems.push("com.microsoft.playready");this.g&&(a.streaming.gapPadding=.01);return a};p.uh=function(){return!1};function Qx(){var a=null;try{a="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(b){}return a}if(navigator.userAgent.includes("Xbox One")||null!==Qx())tb=function(){return new Px};function Rx(a,b,c){this.type=a;this.aa=b;this.segments=c||null}function Sx(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Sx.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
1324
|
+
function Tx(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Ux(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Vx(a,b,c){return(a=Ux(a,b))?a.value:c||null}function Wx(a,b){a=Ux(a,b);if(!a)throw new U(2,4,4023,b);return a.value}function Xx(a,b,c){c=void 0===c?[]:c;this.aa=b;this.g=a;this.rc=c}function Yx(a,b){this.name=a;this.value=b};function Zx(a,b){return a.filter(function(c){return c.name==b})}function $x(a,b){return a.filter(function(c){return Wx(c,"TYPE")==b})}function ay(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function by(a,b,c){c=void 0===c?0:c;return(a=ay(a,b))?Number(a.value):c}function cy(a,b,c){return b?dy(a,[b],c):[]}function dy(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return ey(e,c)}));return qc(a,d)}
|
|
1325
|
+
function ey(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new U(2,4,4039,e);}}return a};function fy(){this.g=0}
|
|
1326
|
+
function gy(a,b){b=ac(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new U(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=hy(a,f),--a.g,iy.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=hy(a,g);if(jy.includes(g.name)){if(1!=b)throw new U(2,4,4017);g=
|
|
1327
|
+
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=hy(a,k),iy.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Vx(k,"TYPE")?f.push(k):"MAP"==Vx(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Xx(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Xx("",d,f)));return new Rx(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1328
|
+
g.name&&(g.attributes.push(new Yx("URI",h)),d=!0)}}return new Rx(b,e)}function hy(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new U(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Xc(d);var f;(f=Zc(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Zc(d,g);)c.push(new Yx(f[1],f[2]||f[3])),Yc(d)}return new Sx(a,b,c,e)}
|
|
1329
|
+
var iy="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 EXT-X-PART-INF EXT-X-DATERANGE".split(" "),jy="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function ky(){}function ly(a,b){try{var c=my(a);return zg({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return xg(d)}}
|
|
1330
|
+
function my(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(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=mc(a):e=ec(a);return{data:e,contentType:c}}T("shaka.net.DataUriPlugin",ky);ky.parse=ly;Jg("data",ly);function ny(){var a=this;this.g=this.h=null;this.G=1;this.A=new Map;this.K=new Map;this.B=new Map;this.B.set("video",new Map);this.B.set("audio",new Map);this.B.set(wc,new Map);this.B.set("image",new Map);this.$b=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return oy(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=Wx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Wx(b,"URI");c=my(c.split("?")[0]);
|
|
1331
|
+
c=Tb(c.data);d=rc("com.widevine.alpha",d,[{initDataType:"cenc",initData:c}]);(b=Vx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=Wx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");b=Wx(b,"URI");b=my(b.split("?")[0]);b=Tb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);c=ph(b,c,new Set,0);d=rc("com.microsoft.playready",
|
|
1332
|
+
d,[{initDataType:"cenc",initData:c}]);if(b=kd(["<PLAYREADY>",lc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Iu(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=Wx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=Wx(b,"URI");c=my(c.split("?")[0]);c=Tb(c.data);d=rc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=Vx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));
|
|
1333
|
+
b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.ab=new Set;this.i=new Map;this.l=null;this.F="";this.Ya=new fy;this.L=-1;this.ha=Infinity;this.ba=this.qc=this.Za=!1;this.C=new af(function(){if(a.U&&!a.g.continueLoadingWhenPaused&&(a.S.Ja(a.U,"timeupdate"),a.U.paused)){a.S.Aa(a.U,"timeupdate",function(){return py(a)});return}py(a)});this.za=qy;this.m=null;this.Pa=0;this.o=Infinity;this.Oa=this.Ka=this.P=0;this.W=new Gg;this.H=new Map;this.I=new Map;this.ya=new Map;this.na=new Map;
|
|
1334
|
+
this.M=new Map;this.va=new Map;this.wa=new Map;this.bc=this.ka=!1;this.eb=new Va(5);this.j=null;this.N=!0;this.S=new jb;this.s=this.U=null;this.Zb=function(){return!1}}p=ny.prototype;p.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.Zb=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.V()&&this.C.Jb()};
|
|
1335
|
+
p.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.ka=b.isLowLatencyMode(),F(e,ry(c,[a]).promise,2)):3!=e.g?(d=e.h,c.F=d.uri,F(e,sy(c,d.data),3)):e.return(c.m)})};
|
|
1336
|
+
p.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.ab.clear();this.m=null;this.i.clear();this.K.clear();this.I.clear();this.A.clear();this.ya.clear();this.na.clear();this.M.clear();this.va.clear();this.wa.clear();this.j&&this.j.destroy();this.S&&(this.S.release(),this.S=null);return Promise.all(a)};
|
|
1337
|
+
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,q;return Q(function(r){if(1==r.g){if(!ty(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(uy(a,g));return F(r,Promise.all(b),2)}vy(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.Rd});d.length&&!h&&(k=wy,xy(a,k.cj),l=d.map(function(u){return u.mc}),a.l.pb(Math.min.apply(Math,x(l))),
|
|
1338
|
+
a.h.updateDuration());h&&yy(a);m=t(d);for(n=m.next();!n.done;n=m.next())q=n.value,q.stream.isAudioMuxedInVideo||!q.stream.segmentIndex||Rf(q.stream.segmentIndex)||a.h.disableStream(q.stream);G(r)})};function zy(a,b){return ty(a)?a.B.get(b.type):b.jf}
|
|
1339
|
+
function uy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga;return Q(function(za){switch(za.g){case 1:if(b.stream.isAudioMuxedInVideo)return za.return();c=[];d=t(b.O());for(e=d.next();!e.done;e=d.next())f=e.value,g=new Bb(f),h=g.g,b.Me&&(0<=b.Sb&&h.add("_HLS_msn",String(b.Sb)),0<=b.Tb&&h.add("_HLS_part",String(b.Tb))),b.Ne&&h.add("_HLS_skip","YES"),Qb(h)&&Fb(g,Gb(h.toString())),c.push(g.toString());xa(za,2);return F(za,ry(a,c,!0).promise,4);case 4:k=za.h;Aa(za,
|
|
1340
|
+
3);break;case 2:throw l=Ba(za),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return za.return();m=gy(a.Ya,k.data);if(1!=m.type)throw new U(2,4,4017);n=k.uri;n==k.originalUri||b.O().includes(n)||b.zf.push(n);q=Zx(m.aa,"EXT-X-DEFINE");r=Ay(a,q,n);u=b.stream;w=zy(a,b);return F(za,By(a,m,u.mimeType,b.O,r),5);case 5:v=za.h;y=v.keyIds;z=v.drmInfos;A=v.encrypted;C=v.Hh;u.encrypted||!A||C||(u.encrypted=!0);E=function(na,va){return na.size===va.size&&[].concat(x(na)).every(function(Ia){return va.has(Ia)})};
|
|
1341
|
+
E(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));H=Cy(a,m,w,r,b.O,b.type);B=H.segments;if(D=H.bandwidth)u.bandwidth=D;I=Yl(u);K=t(B);for(J=K.next();!J.done;J=K.next())L=J.value,L.Y&&(L.Y.rd=I);u.segmentIndex.Yd(B,a.l.Gb());B.length&&(N=by(m.aa,"EXT-X-MEDIA-SEQUENCE",0),M=(O=ay(m.aa,"EXT-X-SKIP"))?Number(Vx(O,"SKIPPED-SEGMENTS")):0,P=Dy(N,B),R=P.Sb,S=P.Tb,b.Sb=R+M,b.Tb=S,ba=w.get(N),u.segmentIndex.$a(ba));if(W=Rf(u.segmentIndex))b.Uc=W.startTime,Fa=B[B.length-1],b.mc=Fa.endTime;if(Ga=ay(m.aa,
|
|
1342
|
+
"EXT-X-ENDLIST"))b.Rd=!0;Ey(a,m);Fy(a,m.aa,u.type,r,b.O);G(za)}})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.banLocation(a)};p.setMediaElement=function(a){this.U=a};
|
|
1343
|
+
function Gy(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.L,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=zy(a,f);if(g=Rf(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.L=Math.max(a.L,l));f.og=l;break}}}}if(!(0>a.L))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Hy(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.og,0<f&&(e.g.splice(0,f),e=Rf(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1344
|
+
Iy(a,d,e)}
|
|
1345
|
+
function Jy(a,b){if(Infinity==a.ha){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Rf(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ha=Math.min(a.ha,c.h))}b=a.ha;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Hy(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Rf(e);if(f)if(null==f.h)ab("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.O(),"Expect AV sync issues!");else for(Iy(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.vh(b)}}}}
|
|
1346
|
+
function Iy(a,b,c){if(!(.001>Math.abs(c))){b.Uc+=c;b.mc+=c;a=zy(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.O()}}
|
|
1347
|
+
function sy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na,va,Ia,ta,ra;return Q(function(wa){switch(wa.g){case 1:c=yc;d=gy(a.Ya,b);e=Zx(d.aa,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ll(null,0);a.l.Zc(!0);k=function(){return[a.F]};l=null;m=new Map;if(1==d.type)return a.N=!1,R=Zx(d.aa,"EXT-X-DEFINE"),m=Ay(a,R,a.F),l=c.Ca,S="",ba=new Map,F(wa,Ky(a,a.G++,m,d,k,"",l,S,!0,"Media Playlist",null,ba,null,!1,null,!1),7);Ly(a,e);n=Zx(d.aa,"EXT-X-MEDIA");q=Zx(d.aa,"EXT-X-STREAM-INF");
|
|
1348
|
+
r=Zx(d.aa,"EXT-X-IMAGE-STREAM-INF");u=Zx(d.aa,"EXT-X-I-FRAME-STREAM-INF");w=Zx(d.aa,"EXT-X-SESSION-KEY");v=Zx(d.aa,"EXT-X-SESSION-DATA");y=Zx(d.aa,"EXT-X-CONTENT-STEERING");My(a,v);return F(wa,Ny(a,y),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];A=t(q);C=A.next();for(E={};!C.done;E={Ti:void 0},C=A.next())if(H=C.value,B=Vx(H,"SUPPLEMENTAL-CODECS"))E.Ti=B.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),D=H.attributes.map(function(Za){return function($a){var ib=$a.name,qb=$a.value;"CODECS"==
|
|
1349
|
+
ib&&(qb=Za.Ti.join(","),$a=$a.value.split(","),1<$a.length&&($a=uc("audio",$a))&&(qb+=","+$a));return new Yx(ib,qb)}}(E)),z.push(new Sx(H.id,H.name,D,null));q.push.apply(q,x(z));I=[];K=t(u);J=K.next();for(L={};!J.done;L={Ui:void 0},J=K.next())if(N=J.value,O=Vx(N,"SUPPLEMENTAL-CODECS"))L.Ui=O.split(/\s*,\s*/).map(function(Za){return Za.split("/")[0]}),M=N.attributes.map(function(Za){return function($a){var ib=$a.name;$a=$a.value;"CODECS"==ib&&($a=Za.Ui.join(","));return new Yx(ib,$a)}}(L)),I.push(new Sx(N.id,
|
|
1350
|
+
N.name,M,null));u.push.apply(u,x(I))}Oy(a,q);Py(a,n);P=Qy(a,u);return F(wa,Ry(a,q,w,n,k,a.A,P),5);case 5:return f=wa.h,g=Sy(a,n),F(wa,Ty(a,r,u),6);case 6:h=wa.h;wa.u(3);break;case 7:W=wa.h,a.i.set(a.F,W),W.stream&&(Fa=Yl(W.stream),W.stream.segmentIndex.Eb(function(Za){Za.Y&&(Za.Y.rd=Fa)})),l=W.stream.type,Ga=!0,a.g.disableAudio&&"audio"==W.type?Ga=!1:a.g.disableVideo&&"video"==W.type&&!W.stream.codecs.includes(",")&&(Ga=!1),Ga&&f.push({id:0,language:hf(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
|
|
1351
|
+
W.type?W.stream:null,video:"video"==W.type?W.stream:null,bandwidth:W.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new U(2,7,7001);Uy(a,d);1==d.type&&(ty(a)&&(Vy(a,d),za=a.o,a.C.ia(za)),na=Array.from(a.i.values()),Wy(a,na),yy(a),Fy(a,d.aa,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1352
|
+
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.ba||!a.g.hls.disableCodecGuessing){wa.u(8);break}va=[];Ia=t(a.m.variants);for(ta=Ia.next();!ta.done;ta=Ia.next())ra=ta.value,ra.audio&&""===ra.audio.codecs&&va.push(ra.audio.createSegmentIndex()),ra.video&&""===ra.video.codecs&&va.push(ra.video.createSegmentIndex());return F(wa,Promise.all(va),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),G(wa)}})}
|
|
1353
|
+
function Xy(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A;return Q(function(C){if(1==C.g){c=nm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return C.return(c);d=Yy(a,b);e=d.segment;f=d.segmentIndex;g=e.O();h=g[0];k=new Bb(h);l=k.ob.split(".").pop();return(m=Zy.get(l))?C.return(nm(m)):F(C,Promise.all([$y(a,e.Y,0),$y(a,e,f)]),2)}n=C.h;q=n[1].mimeType;r=n[0].data;u=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");v=["audio/mp4","video/mp4","video/iso.segment"];y=e.Y||v.includes(q);
|
|
1354
|
+
if(!y&&rk(Tb(u))){var E=u,H=a.g.disableAudio,B=a.g.disableVideo,D=a.g.disableText;var I=Tb(E);var K=(new bk).parse(I),J=K.Od();I=K.Ig();var L=[],N=!1,O=!1;if(!H)switch(J.audio){case "aac":case "aac-loas":K.sb().length&&(L.push("mp4a.40.2"),N=!0);break;case "mp3":K.sb().length&&(L.push("mp4a.40.34"),N=!0);break;case "ac3":K.sb().length&&(L.push("ac-3"),N=!0);break;case "ec3":K.sb().length&&(L.push("ec-3"),N=!0);break;case "opus":K.sb().length&&(L.push("opus"),N=!0)}if(!B)switch(J.video){case "avc":I.codec?
|
|
1355
|
+
L.push(I.codec):L.push("avc1.42E01E");O=!0;break;case "hvc":I.codec?L.push(I.codec):L.push("hvc1.1.6.L93.90");O=!0;break;case "av1":L.push("av01.0.01M.08"),O=!0}if(L.length){H=N&&!O;B=new Map;if(O&&!D){D=new Lc("video/mp2t");D.vf(E);E=t(D.Uf());for(O=E.next();!O.done;O=E.next())O=O.value,B.set(O,O);D.Fd()}I={type:H?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:B,oe:null,colorGamut:null,frameRate:I.frameRate}}else I=
|
|
1356
|
+
null;if(z=I)return C.return(z)}else if(y||w.includes(l))if(A=om(r,u,a.g.disableText))return C.return(A);return q?C.return(nm(q)):C.return(c)})}
|
|
1357
|
+
function $y(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=Tg;e=tm(b.O(),b.Bc(),b.zc(),a.g.retryParameters);f=b instanceof rj?1:0;return F(l,az(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.u(3);break}return F(l,sm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof rj?b.ge(h,!0):b.ge(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
|
|
1358
|
+
function yy(a){if(ty(a)){if(a.za==bz){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.mc),c=Math.min(c,e.Uc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Gf(b)}}else a.l.pb(cz(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Rf(c.stream.segmentIndex))&&
|
|
1359
|
+
c.h&&a.l.mh(c.h);a.l.hf()}function Ly(a,b){var c=(new Bb(a.F)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Vx(e,"NAME");var f=Vx(e,"VALUE");e=Vx(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
|
|
1360
|
+
function Ay(a,b,c){c=(new Bb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Vx(f,"NAME"),h=Vx(f,"VALUE");e=Vx(f,"QUERYPARAM");f=Vx(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d}
|
|
1361
|
+
function Oy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Vx(d,"AUDIO");c=Vx(d,"VIDEO");var f=Vx(d,"SUBTITLES");d=dz(a,d);if(f){var g=uc(wc,d);a.I.set(f,g);Uc(d,g)}e&&(f=uc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.I.set(e,f));c&&(e=uc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.I.set(c,e))}}
|
|
1362
|
+
function My(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Vx(d,"DATA-ID");c=Vx(d,"URI");var f=Vx(d,"LANGUAGE");d=Vx(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",cy([a.F],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new V("sessiondata",e);if(a.h)a.h.onEvent(c)}}
|
|
1363
|
+
function Ny(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Vx(f,"PATHWAY-ID"),h=Vx(f,"SERVER-URI"),g&&h){a.j=new Fv(a.h);a.j.configure(a.g);a.j.i=[a.F];a.j.setManifestType("HLS");a.j.h=g;c=Gv(a.j,h);break}return F(k,c,0)})}
|
|
1364
|
+
function Sy(a,b){var c=$x(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return ez(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Wx(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.K.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=fz(wc,d)||gz(wc),hz(f.stream)}}return b.filter(function(g){return g})}
|
|
1365
|
+
function hz(a){var b=new Set([Ee(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Eb(function(c){c.mimeType&&b.add(Ee(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1366
|
+
function Ty(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);xa(m,2);return F(m,iz(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Ba(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=jz(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
|
|
1367
|
+
throw k;}})),F(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function kz(a,b,c){b=b.filter(function(h){var k=Vx(h,"URI")||"";h=Vx(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Tx(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)ez(a,d[g],c,!1)}function Qy(a,b){return b.map(function(c){c=jz(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
|
|
1368
|
+
function Ry(a,b,c,d,e,f,g){var h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na,va,Ia;return Q(function(ta){switch(ta.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0<c.length)){ta.u(2);break}l=t(c);m=l.next();case 3:if(m.done){ta.u(2);break}n=m.value;q=Wx(n,"METHOD");r=Vx(n,"KEYFORMAT")||"identity";u=null;if("NONE"==q){ta.u(4);break}if(lz(q)){w=cy(e(),Wx(n,"URI"),f);v=w.sort().join("");a.M.has(v)||(y=Ng(w,a.g.retryParameters),z=az(a,y,6).promise,a.M.set(v,z));ta.u(4);break}if("identity"==
|
|
1369
|
+
r)return F(ta,mz(a,n,"",e,null,f),12);A=a.$b.get(r);if(!A){C=null;ta.u(10);break}return F(ta,A(n,"",null),11);case 11:C=ta.h;case 10:u=C;ta.u(6);break;case 12:u=ta.h;case 6:if(u){if(u.keyIds)for(E=t(u.keyIds),H=E.next();!H.done;H=E.next())B=H.value,k.add(B);h.push(u)}case 4:m=l.next();ta.u(3);break;case 2:D={};I=t(b);for(K=I.next();!K.done;K=I.next())J=K.value,L=Tx(J,!a.j),D[L]?D[L].push(J):D[L]=[J];N=[];for(O in D)M=D[O],P=M[0],R=Vx(P,"FRAME-RATE"),S=Number(Vx(P,"AVERAGE-BANDWIDTH"))||Number(Wx(P,
|
|
1370
|
+
"BANDWIDTH")),ba=Vx(P,"RESOLUTION"),W=t(ba?ba.split("x"):[null,null]),Fa=W.next().value,Ga=W.next().value,za=Vx(P,"VIDEO-RANGE"),(na=Vx(P,"REQ-VIDEO-LAYOUT"))&&na.includes(",")&&(va=na.split(",").filter(function(ra){return"CH-STEREO"==ra||"CH-MONO"==ra}),na=va[0]),na=na||"CH-MONO",Ia=nz(a,M,d),N.push.apply(N,x(oz(a,Ia.audio,Ia.video,S,Fa,Ga,R,za,na,h,k,g)));return ta.return(N.filter(function(ra){return null!=ra}))}})}
|
|
1371
|
+
function nz(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Vx(m,"AUDIO");var n=Vx(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Vx(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(Wx(u,"GROUP-ID"))}),kz(a,c,e));c=(e=f.sort().join(","))&&a.K.has(e)?a.K.get(e):[];g?d.audio.push.apply(d.audio,x(c)):h&&d.video.push.apply(d.video,x(c));g=!1;var r=b.map(function(u){return Wx(u,
|
|
1372
|
+
"URI")});l=d.audio.find(function(u){return u&&u.O().find(function(w){return r.includes(w)})});h=dz(a,b[0]);c=uc("video",h);(k=uc("audio",h))&&!c?(l="audio",g=0<d.audio.length):!d.audio.length&&!d.video.length&&k&&c?(l="video",h=[[c,k].join()]):d.audio.length&&l?(l="audio",g=!0):l=d.video.length&&!d.audio.length?"audio":"video";g||(a=pz(a,b,h,l),e&&(a.stream.groupId=e),d[a.stream.type]=[a]);return d}
|
|
1373
|
+
function dz(a,b){b=Vx(b,"CODECS")||"";a.ba=0<b.length;a.ba||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return pm(b.split(/\s*,\s*/))}
|
|
1374
|
+
function oz(a,b,c,d,e,f,g,h,k,l,m,n){for(var q=t(c),r=q.next();!r.done;r=q.next())qz(r.value.stream,e,f,g,h,k,null);e=a.g.disableVideo;if(!c.length||e)c=[null];e&&(b=b.filter(function(y){return!y.stream.isAudioMuxedInVideo}));e=a.g.disableAudio;if(!b.length||e)b=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||dg(k,n);k&&
|
|
1375
|
+
!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);q=f?f.stream.drmInfos:null;r=u?u.stream.drmInfos:null;u=u?u.O().sort().join(","):"";var w=f?f.O().sort().join(","):"",v=[];h&&h.codecs&&v.push(h.codecs);k&&k.codecs&&v.push(k.codecs);u=[u,w,v.sort()].join("-");h&&k&&!lg(q,r)||a.ab.has(u)||(h={id:a.G++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.ab.add(u))}return e}
|
|
1376
|
+
function Py(a,b){b=$x(b,"CLOSED-CAPTIONS");a.N=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Vx(d,"LANGUAGE");c=hf(e||"und");e||(e=Vx(d,"NAME"))&&(c=e);e=Wx(d,"GROUP-ID");d=Wx(d,"INSTREAM-ID").replace("SERVICE","svc");a.H.get(e)||a.H.set(e,new Map);a.H.get(e).set(d,c)}}
|
|
1377
|
+
function ez(a,b,c,d){d=void 0===d?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=d?Wx(l,"URI"):Vx(l,"URI")||"shaka://hls-muxed";l=Wx(l,"GROUP-ID");e.push(k);f.push(l);g.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=Wx(k,"TYPE").toLowerCase();"subtitles"==h&&(h=wc);if(h==wc)b=Vx(k,"CODECS")||"";else for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.I.has(l)){b=a.I.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);l=a.G++;if(a.j){g=t(g);for(var m=
|
|
1378
|
+
g.next();!m.done;m=g.next()){var n=t(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Jv(a.j,l,m,n)}}c=Vx(k,"LANGUAGE");g=Vx(k,"NAME");m="YES"==Vx(k,"DEFAULT");"audio"==h?n=(n=Vx(k,"CHANNELS"))?parseInt(n.split("/")[0],10):null:n=null;var q;"audio"==h?(q=Vx(k,"CHANNELS"))?(q=q.split("/"),q=2!=q.length?!1:"JOC"===q[1]||q[1].includes("ATMOS")):q=!1:q=!1;var r=Vx(k,"CHARACTERISTICS"),u="YES"==Vx(k,"FORCED");"audio"==h?k=(k=Vx(k,"SAMPLE-RATE"))?parseInt(k,10):null:k=null;e=rz(a,l,e,b,h,c,m,g,
|
|
1379
|
+
n,null,r,u,k,q);e.stream&&(e.stream.groupId=d);a.K.has(d)?a.K.get(d).push(e):a.K.set(d,[e]);a.i.set(f,e);return e}
|
|
1380
|
+
function iz(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(q){if(1==q.g){c=Wx(b,"URI");d=Vx(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Vx(b,"LANGUAGE");f=Vx(b,"NAME");g=Vx(b,"CHARACTERISTICS");h=rz(a,a.G++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Vx(b,"RESOLUTION"))?F(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=Rf(h.stream.segmentIndex),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
1381
|
+
Number(m.split("x")[1]));if(n=Vx(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
|
|
1382
|
+
function jz(a,b){var c="video",d=Wx(b,"URI"),e=Vx(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Vx(b,"LANGUAGE"),g=Vx(b,"NAME"),h=Vx(b,"CHARACTERISTICS");c=rz(a,a.G++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Vx(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Vx(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
|
|
1383
|
+
function pz(a,b,c,d){for(var e=a.G++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Wx(k,"URI");k=Vx(k,"PATHWAY-ID");a.j&&k&&Jv(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=Vx(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.N=!1;b=null;break a}if(b){if("NONE"!=b){b=a.H.get(b);break a}a.N=!1}else if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=tc(d,c);d=rz(a,e,f,c,d,
|
|
1384
|
+
null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
|
|
1385
|
+
function rz(a,b,c,d,e,f,g,h,k,l,m,n,q,r){function u(C){var E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na;return Q(function(va){switch(va.g){case 1:return E=yc,xa(va,2),F(va,C.promise,4);case 4:H=va.h;if(C.aborted)return va.return();B=H.uri;B!=H.originalUri&&(D=y.O(),D.includes(B)||y.zf.push(B));I=gy(a.Ya,H.data);if(1!=I.type)throw new U(2,4,4017);K=Zx(I.aa,"EXT-X-DEFINE");J=Ay(a,K,B);L=!1;(!a.ba&&a.g.hls.disableCodecGuessing||a.N&&e==E.Ca&&!a.g.hls.disableClosedCaptionsDetection)&&0<I.segments.length&&
|
|
1386
|
+
(a.N=!1,L=!0);N=!a.ba&&a.g.hls.disableCodecGuessing;O=ty(a);return F(va,Ky(a,0,J,I,w,d,e,f,g,h,k,l,m,n,q,r,void 0,L,N),5);case 5:M=va.h;if(C.aborted)return va.return();P=M.stream;Uy(a,I);ty(a)&&!O&&Vy(a,I);y.Uc=M.Uc;y.mc=M.mc;y.Ne=M.Ne;y.Me=M.Me;y.Rd=M.Rd;y.jf=M.jf;y.Sb=M.Sb;y.Tb=M.Tb;v.segmentIndex=P.segmentIndex;v.encrypted=P.encrypted;v.drmInfos=P.drmInfos;v.keyIds=P.keyIds;v.mimeType=P.mimeType;v.bandwidth=v.bandwidth||P.bandwidth;v.codecs=v.codecs||P.codecs;v.closedCaptions=v.closedCaptions||
|
|
1387
|
+
P.closedCaptions;v.width=v.width||P.width;v.height=v.height||P.height;v.hdr=v.hdr||P.hdr;v.colorGamut=v.colorGamut||P.colorGamut;v.frameRate=v.frameRate||P.frameRate;"und"==v.language&&"und"!=P.language&&(v.language=P.language);v.language=v.language||P.language;v.channelsCount=v.channelsCount||P.channelsCount;v.audioSamplingRate=v.audioSamplingRate||P.audioSamplingRate;hz(v);v.drmInfos.length&&a.h.newDrmInfo(v);R=!1;if(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)R=!0;
|
|
1388
|
+
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);e==E.Ta&&(S=Rf(P.segmentIndex))&&S.Y&&(v.mimeType="application/mp4",hz(v));ba=Yl(v);v.segmentIndex.Eb(function(Ia){Ia.Y&&(Ia.Y.rd=ba)});sz(a)&&(a.qc?Wy(a,[y]):(a.qc=!0,W=Array.from(a.i.values()),Fa=W.filter(function(Ia){return Ia.stream.segmentIndex}),Wy(a,Fa),yy(a),Ga=a.o,0<Ga&&a.C.ia(Ga)));Fy(a,I.aa,v.type,J,w);a.m&&(a.m.startTime=a.s);Aa(va,0);break;case 2:za=Ba(va);v.closeSegmentIndex();if(7001===za.code)return va.return();na=a.h.disableStream(v);
|
|
1389
|
+
if(!na)throw za;G(va)}})}function w(){return a.j&&1<c.length?Kv(a.j,b):y.zf.concat(dy([a.F],c,a.A))}var v=tz(a,d,e,f,g,h,k,l,m,n,q,r);c.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",hz(v));var y={stream:v,type:e,zf:[],Uc:0,mc:0,jf:new Map,Ne:!1,Me:!1,Rd:!1,og:-1,Sb:-1,Tb:-1,O:w},z=null,A;v.createSegmentIndex=function(){if(z)return z;if(v.isAudioMuxedInVideo)return v.segmentIndex=new Jl([]),Promise.resolve();A=ry(a,y.O(),!0);return z=new Promise(function(C){C(u(A))})};
|
|
1390
|
+
v.closeSegmentIndex=function(){z&&!v.segmentIndex&&A.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);z=null};return y}function cz(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.mc));return b}function vy(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Eb(function(e){c.push(e)});a.l.$d(c)}
|
|
1391
|
+
function Wy(a,b){if(!ty(a))for(var c=cz(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.ld(0,c);vy(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=ty(a)&&!a.Za;c=!ty(a)&&a.Za&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Gy(a,b,d):(Jy(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Gy(a,
|
|
1392
|
+
b))}function Hy(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function sz(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1393
|
+
function Ky(a,b,c,d,e,f,g,h,k,l,m,n,q,r,u,w,v,y,z){y=void 0===y?!0:y;z=void 0===z?!0:z;var A,C,E,H,B,D,I,K,J,L,N,O,M,P,R,S,ba,W,Fa,Ga,za,na,va,Ia,ta,ra,wa,Za,$a;return Q(function(ib){switch(ib.g){case 1:A=d.segments||[];C=A.every(function(qb){return ay(qb.aa,"EXT-X-GAP")?!0:!1});if(!A.length||C)throw new U(2,4,4053);uz(a,d);ty(a)&&Ey(a,d);E=ty(a)?a.B.get(g):new Map;H=Cy(a,d,E,c,e,g);B=H.segments;D=H.bandwidth;N=L=J=K=I=null;if(!(0<B.length&&y)){ib.u(2);break}return F(ib,Xy(a,B),3);case 3:O=ib.h,g!=
|
|
1394
|
+
O.type&&ty(a)&&(a.B.set(O.type,a.B.get(g)),a.B.set(g,new Map)),g=O.type,h=O.language,m=O.channelCount,u=O.sampleRate,a.g.disableText||(n=O.closedCaptions),K=O.height,I=O.width,J=O.oe,L=O.colorGamut,N=O.frameRate,z&&(v=O.mimeType,f=O.codecs);case 2:if(v){ib.u(4);break}return F(ib,vz(a,g,f,B),5);case 5:v=ib.h,g!=wc||f||"application/mp4"!=v||!B[0]||B[0].Y||(v="text/vtt");case 4:return F(ib,By(a,d,v,e,c),6);case 6:M=ib.h;P=M.drmInfos;R=M.keyIds;S=M.encrypted;ba=M.Hh;if(S&&!P.length&&!ba)throw new U(2,
|
|
1395
|
+
4,4026);W=tz(a,f,g,h,k,l,m,n,q,r,u,w);W.encrypted=S&&!ba;W.drmInfos=P;W.keyIds=R;W.mimeType=v;D&&(W.bandwidth=D);hz(W);"video"==g&&(I||K||J||L)&&qz(W,I,K,N,J,null,L);ty(a)&&Ey(a,d);Fa=B[0].startTime;Ga=B[B.length-1];za=Ga.endTime;na=new Jl(B);W.segmentIndex=na;Ia=(va=ay(d.aa,"EXT-X-SERVER-CONTROL"))?null!=Ux(va,"CAN-SKIP-UNTIL"):!1;ta=va?null!=Ux(va,"CAN-BLOCK-RELOAD"):!1;ra=by(d.aa,"EXT-X-MEDIA-SEQUENCE",0);wa=Dy(ra,B);Za=wa.Sb;$a=wa.Tb;return ib.return({stream:W,type:g,zf:[],O:e,Uc:Fa,mc:za,Ne:Ia,
|
|
1396
|
+
Me:ta,Rd:!1,og:-1,Sb:Za,Tb:$a,jf:E})}})}function Dy(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Sb:a,Tb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Sb:a,Tb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Sb:a,Tb:c}}
|
|
1397
|
+
function tz(a,b,c,d,e,f,g,h,k,l,m,n){var q=fz(c,b)||gz(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==wc?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.G++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1398
|
+
segmentIndex:null,mimeType:q,codecs:b,kind:c==wc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:hf(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,
|
|
1399
|
+
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};hz(a);return a}
|
|
1400
|
+
function By(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R;return Q(function(S){switch(S.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Zx(k.aa,"EXT-X-KEY"),m=null,l.length)for(m=wz(a,b,k.aa,d,e),n=t(l),q=n.next();!q.done;q=n.next())r=q.value,f.set(r,m);w=u=!1;v=[];y=new Set;z=t(f);A=z.next();case 2:if(A.done){S.u(4);break}C=A.value;E=t(C);H=E.next().value;B=E.next().value;D=H;I=B;K=Wx(D,"METHOD");if("NONE"==
|
|
1401
|
+
K){S.u(3);break}u=!0;J=Vx(D,"KEYFORMAT")||"identity";L=null;if(lz(K)){w=!0;S.u(3);break}if("identity"==J)return F(S,mz(a,D,c,d,I,e),11);N=a.$b.get(J);if(!N){O=null;S.u(9);break}return F(S,N(D,c,I),10);case 10:O=S.h;case 9:L=O;S.u(6);break;case 11:L=S.h;case 6:if(L){if(L.keyIds)for(M=t(L.keyIds),P=M.next();!P.done;P=M.next())R=P.value,y.add(R);v.push(L)}case 3:A=z.next();S.u(2);break;case 4:return S.return({drmInfos:v,keyIds:y,encrypted:u,Hh:w})}})}
|
|
1402
|
+
function xz(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new U(2,4,4042);var f=0,g=Vx(b,"IV","");if(g){var h=nc(g.substr(2));if(16!=h.byteLength)throw new U(2,4,4048);}else f=by(c.aa,"EXT-X-MEDIA-SEQUENCE",0);var k=cy(d(),Wx(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.na.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Wx(b,
|
|
1403
|
+
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,q,r,u;return Q(function(w){if(1==w.g)return a.M.has(l)||(n=Ng(k,a.g.retryParameters),q=az(a,n,6).promise,a.M.set(l,q)),F(w,a.M.get(l),2);if(3!=w.g){r=w.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new U(2,4,4049);u={name:"CTR"==m.blockCipherMode?"AES-CTR":"AES-CBC",length:m.bitsKey};return F(w,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}m.cryptoKey=
|
|
1404
|
+
w.h;m.fetchKey=void 0;G(w)})};a.na.set(c,m)}return a.na.get(c)}function Uy(a,b){null==a.s&&(b=ay(b.aa,"EXT-X-START"))&&(a.s=Number(Wx(b,"TIME-OFFSET")))}function uz(a,b){var c=ay(b.aa,"EXT-X-PLAYLIST-TYPE");b=ay(b.aa,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?xy(a,qy):c?xy(a,bz):xy(a,yz)}
|
|
1405
|
+
function Ey(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=ay(d[e].aa,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=ay(b.aa,"EXT-X-TARGETDURATION");if(!d)throw new U(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=ay(b.aa,"EXT-X-PART-INF"))a.P=Number(Wx(e,"PART-TARGET"));b=ay(b.aa,"EXT-X-SERVER-CONTROL");a.ka&&a.P?(a.o=a.bc?5*a.P<=c?Math.min(a.P,a.o):Math.min(c,a.o):Math.min(a.P,a.o),a.Oa=b?Number(Wx(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),
|
|
1406
|
+
c=b?Ux(b,"HOLD-BACK"):null,a.Ka=c?Number(c.value):0);a.Pa=Math.max(d,a.Pa)}function Vy(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Oa)c=a.Oa;else if(a.Ka)c=a.Ka;else for(var d=b.segments.length,e=d-Math.min(d,a.g.hls.liveSegmentsDelay);e<d;e++){var f=ay(b.segments[e].aa,"EXTINF");c=f?c+Number(f.value.split(",")[0]):c+a.Pa}a.s&&0>a.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.Li(0);a.l.lh(c);a.l.Zc(!1)}
|
|
1407
|
+
function wz(a,b,c,d,e){var f=ay(c,"EXT-X-MAP");if(!f)return null;var g=Wx(f,"URI"),h=cy(d(),g,e);g=[h.toString(),Vx(f,"BYTERANGE","")].join("-");if(!a.ya.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=Wx(n,"METHOD"),lz(m)&&n.id<f.id?(m=!1,k=xz(a,n,b,d,e)):m="NONE"!=m):"EXT-X-BYTERANGE"==n.name&&n.id<f.id&&(l=n);b=zz(h,f,l,k,m);a.ya.set(g,b)}return a.ya.get(g)}
|
|
1408
|
+
function zz(a,b,c,d,e){var f=0,g=null;b=Vx(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new pj(function(){return a},f,g,null,null,null,d,e)}
|
|
1409
|
+
function Az(a,b,c,d,e,f,g,h,k){function l(S){S=(new Bb(S)).ob.split(".").pop();var ba=Bz.get(g).get(S);ba||(ba=Zy.get(S));return ba}var m=d.aa,n=ay(m,"EXTINF"),q=0,r=0,u=null;d.rc.length&&(a.m.isLowLatency=!0);var w=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=ay(m,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(w=Bd(v.value),a.Za=!0)}var y=sj;ay(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.rc.length)throw new U(2,4,4024,"EXTINF");if(!a.ka)return null}var z=[];v=!1;var A=null,C=!1,E=!1;if(a.ka&&
|
|
1410
|
+
d.rc.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var H=w,B={},D=0;D<d.rc.length;B={Of:void 0,uf:void 0},D++){var I=d.rc[D],K=0==D?c:z[z.length-1],J=0==D?e:K.endTime,L=Number(Vx(I,"DURATION"))||a.P;if(L){var N=J+L,O=0,M=null;"EXT-X-PRELOAD-HINT"==I.name?(O=(O=Vx(I,"BYTERANGE-START"))?Number(O):0,(K=Vx(I,"BYTERANGE-LENGTH"))?M=O+Number(K)-1:O&&(M=Number.MAX_SAFE_INTEGER)):(O=Vx(I,"BYTERANGE"),M=t(Cz(K,O)),O=M.next().value,M=M.next().value);B.uf=Vx(I,"URI");if(B.uf){K=
|
|
1411
|
+
sj;"YES"==Vx(I,"GAP")&&(a.m.gapCount++,K=2,C=!0);B.Of=null;var P=function(S){return function(){null==S.Of&&(S.Of=cy(h(),S.uf,f));return S.Of}}(B);q&&0<=O&&null!=M&&(A=P,v=!0);J=new rj(J,N,P,O,M,b,0,0,Infinity,[],"",null,H,K,k);"EXT-X-PRELOAD-HINT"==I.name&&(J.Pg(),E=!0);"YES"!=Vx(I,"INDEPENDENT")&&0<D&&J.qd();if(B=l(B.uf))J.mimeType=B,Dz.has(B)&&(J.Y=null);z.push(J);H&&(H+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(z.length)q=z[z.length-1].endTime;else return null;
|
|
1412
|
+
v&&(C||0!=z[0].startByte?(v=!1,A=null):z=[]);(n=ay(m,"EXT-X-BYTERANGE"))?(u=t(Cz(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].startByte,u=z[z.length-1].endByte);c="";n=null;"image"==g&&(c="1x1",m=ay(m,"EXT-X-TILES"))&&(c=Wx(m,"LAYOUT"),(m=Vx(m,"DURATION"))&&(n=Number(m)));var R=null;b=new rj(e,q,function(){if(A)return A();null==R&&(R=cy(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,w,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,Dz.has(e)&&(b.Y=null);v&&(a.bc=!0,b.ii(),
|
|
1413
|
+
E&&b.Pg());return b}function Cz(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.endByte+1,d=c+b-1);return[c,d]}
|
|
1414
|
+
function Fy(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Hy(a,c))for(b=Zx(b,"EXT-X-DATERANGE"),b=b.filter(function(K){return null!=Ux(K,"START-DATE")}).sort(function(K,J){K=Wx(K,"START-DATE");J=Wx(J,"START-DATE");return K<J?-1:K>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Wx(g,"START-DATE"),k=Bd(h);if(!isNaN(k)){var l=Math.max(0,k-f),m=null,n=Vx(g,"END-DATE");if(n){var q=Bd(n);if(!isNaN(q)&&(m=q-f,0>m))continue}if(null==m){var r=Vx(g,"DURATION")||Vx(g,"PLANNED-DURATION");if(r){var u=
|
|
1415
|
+
parseFloat(r);isNaN(u)||(m=l+u);if(0>k-f+u)continue}}var w=Vx(g,"CLASS")||"com.apple.quicktime.HLS",v="YES"==Vx(g,"END-ON-NEXT");if(null==m&&v){for(var y=c+1;y<b.length;y++){var z=Vx(b[y],"CLASS")||"com.apple.quicktime.HLS";if(w==z){var A=Wx(b[y],"START-DATE"),C=Bd(A);if(!isNaN(C)&&C&&C>k){m=Math.max(0,C-f);break}}}if(null==m)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var E=[],H=t(g.attributes),B=H.next();!B.done;B=H.next()){var D=B.value;if(!y.includes(D.name)){var I=
|
|
1416
|
+
ey(D.value,d);if("X-ASSET-URI"==D.name||"X-ASSET-LIST"==D.name)I=cy(e(),D.value,d)[0];E.push({key:D.name,description:"",data:I,mimeType:null,pictureType:null})}}if(1<E.length)a.h.onMetadata(w,l,m,E)}}catch(K){}}}}
|
|
1417
|
+
function Cy(a,b,c,d,e,f){var g=b.segments,h=void 0,k=by(b.aa,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=by(b.aa,"EXT-X-MEDIA-SEQUENCE",0),m=ay(b.aa,"EXT-X-SKIP"),n=m?Number(Vx(m,"SKIPPED-SEGMENTS")):0,q=l+n,r=0;ty(a)&&c.has(q)&&(r=c.get(q));0===r&&a.za==bz&&0<c.size&&!c.has(q)&&null!=a.l.i&&(r=a.l.Gb());var u=[],w=null;m=[];for(var v=0;v<g.length;v++){var y=g[v],z=0==v?r:w.endTime;q=l+n+v;ay(y.aa,"EXT-X-DISCONTINUITY")&&(k++,w&&w.Y&&(w.Y.g=z));var A=t(y.aa);for(var C=A.next();!C.done;C=A.next())C=C.value,
|
|
1418
|
+
"EXT-X-KEY"==C.name&&(lz(Wx(C,"METHOD"))?h=xz(a,C,b,e,d):h=void 0);c.set(q,z);A=wz(a,b,y.aa,e,d);if(z=Az(a,A,w,y,z,d,f,e,h))(w=by(y.aa,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.i=k,Hy(a,f)&&null!=a.L&&q<a.L||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(E,H){return E+H.duration},0),b=Math.round(m.reduce(function(E,H){return E+H.bitrate*H.duration},0)/b*1E3));if(m=u.some(function(E){return null!=
|
|
1419
|
+
E.h}))for(c={},d=0;d<u.length;c={Se:void 0,Re:void 0,Je:void 0,Wc:void 0,Ie:void 0},d++)if(c.Wc=u[d],null==c.Wc.h)for(c.Re=0,c.Se=d,e=function(E){return function(){var H=u[E.Se];if(H){if(null!=H.h)return H.h+E.Re;E.Re-=H.endTime-H.startTime;E.Se+=1}return null}}(c),c.Ie=0,c.Je=d,g=function(E){return function(){var H=u[E.Je];if(H){H!=E.Wc&&(E.Ie+=H.endTime-H.startTime);if(null!=H.h)return H.h+E.Ie;--E.Je}return null}}(c);null==c.Wc.h;)c.Wc.h=g(),null==c.Wc.h&&(c.Wc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=
|
|
1420
|
+
c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ha;if(m&&Infinity!=c&&!Hy(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.vh(c);return{segments:u,bandwidth:b}}function fz(a,b){if(a==wc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1421
|
+
function gz(a){return a==wc?"text/vtt":Bz.get(a).get("mp4")}function Yy(a,b){a=ty(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.Cc()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
|
|
1422
|
+
function vz(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v;return Q(function(y){switch(y.g){case 1:e=Tg;f=Yy(a,d);g=f.segment;if(2==g.status)return y.return(gz(b));h=g.O();k=new Bb(h[0]);l=k.ob.split(".").pop();m=Bz.get(b);if((n=m.get(l))||(n=Zy.get(l))||(n=fz(b,c)))return y.return(n);r=1;u=Ng(h,a.g.retryParameters);xa(y,2);u.method="HEAD";return F(y,az(a,u,e,{type:r}).promise,4);case 4:w=y.h;q=w.headers["content-type"];Aa(y,3);break;case 2:v=Ba(y);if(!v||1002!=v.code&&1001!=v.code){y.u(3);break}u.method=
|
|
1423
|
+
"GET";a.g.hls.allowRangeRequestsToGuessMimeType&&(u.headers.Range="bytes=0-0");return F(y,az(a,u,e,{type:r}).promise,6);case 6:w=y.h,q=w.headers["content-type"];case 3:if(!q){y.u(7);break}n=q.toLowerCase().split(";")[0];if("application/octet-stream"!=n){y.u(8);break}if(w.data.byteLength){y.u(9);break}u.method="GET";return F(y,az(a,u,e,{type:r}).promise,10);case 10:w=y.h;case 9:rk(Tb(w.data))&&(n="video/mp2t");case 8:if("application/octet-stream"!=n)return y.return(n);case 7:return y.return(gz(b))}})}
|
|
1424
|
+
function qz(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function ry(a,b,c){return az(a,Ng(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1425
|
+
function py(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(h,2);b=Date.now();return F(h,a.update(),4);case 4:c=Date.now();ty(a)&&(d=(c-b)/1E3,a.eb.sample(1,d),e=0<a.g.updatePeriod?a.g.updatePeriod:a.o,f=Math.max(0,e-Wa(a.eb)),a.C.ia(f));Aa(h,3);break;case 2:g=Ba(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.C.ia(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
|
|
1426
|
+
G(h)}})}function ty(a){return a.za!=qy}function xy(a,b){a.za=b;a.l&&a.l.Zc(!ty(a));ty(a)||a.C.stop()}function az(a,b,c,d){if(!a.W)throw new U(2,7,7001);d||(d={});d.isPreload=a.Zb();b=a.h.networkingEngine.request(c,b,d);Hg(a.W,b);return b}function lz(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1427
|
+
function oy(a,b,c,d){var e,f,g,h,k,l;return Q(function(m){if(1==m.g){if("video/mp2t"==c)throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);e=Wx(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";"SAMPLE-AES"==e&&(g="cbcs");h=Wx(b,"URI");k=rc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new Bb(h)).Cb.replace(/-/g,"").toLowerCase();return(l=32===n.length&&/^[0-9a-f]+$/.test(n)?
|
|
1428
|
+
n:null)||!d?m.u(2):F(m,Ez(a,d),3)}2!=m.g&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
|
|
1429
|
+
function mz(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v,y;return Q(function(z){switch(z.g){case 1:if("video/mp2t"==c)throw new U(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new U(2,4,4041);g=Wx(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return z.return(null);k=cy(d(),Wx(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=oc(mc(k[0].split("data:text/plain;base64,").pop()));z.u(2);break}m=k.sort().join("");a.va.has(m)||(n=Ng(k,a.g.retryParameters),q=az(a,n,6).promise,
|
|
1430
|
+
a.va.set(m,q));return F(z,a.va.get(m),3);case 3:r=z.h,l=oc(r.data);case 2:u="00000000000000000000000000000000";if(!e){z.u(4);break}return F(z,Ez(a,e),5);case 5:(w=z.h)&&(u=w);case 4:return v=new Map,v.set(u,l),y="cenc","SAMPLE-AES"==g&&(y="cbcs"),z.return(sc(v,y))}})}
|
|
1431
|
+
function Ez(a,b){var c,d,e,f;return Q(function(g){if(1==g.g){c=null;if(a.wa.has(b))return c=a.wa.get(b),g.u(2);d=tm(b.O(),b.Bc(),b.zc(),a.g.retryParameters);e=Tg;return F(g,az(a,d,e,{type:0}).promise,3)}2!=g.g&&(f=g.h,b.ge(f.data),c=rm(f.data),a.wa.set(b,c));return g.return(c)})}T("shaka.hls.HlsParser",ny);
|
|
1432
|
+
var Zy=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),Fz=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),Gz=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
|
|
1433
|
+
"video/mp2t").set("tsv","video/mp2t"),Hz=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),Iz=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Bz=(new Map).set("audio",Fz).set("video",Gz).set("text",Hz).set("image",Iz),Dz=new Set(["video/mp2t"].concat(x(Fe))),
|
|
1434
|
+
qy="VOD",yz="EVENT",bz="LIVE",wy={cj:qy,Bl:yz,Ll:bz};ti("application/x-mpegurl",function(){return new ny});ti("application/vnd.apple.mpegurl",function(){return new ny});function Jz(a){return Iu(a)}var Kz=(new Map).set("com.microsoft.playready",Jz).set("com.microsoft.playready.recommendation",Jz).set("com.microsoft.playready.software",Jz).set("com.microsoft.playready.hardware",Jz);function Lz(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.C=new Va(5);this.o=new af(function(){Mz(a)});this.B=new Gg;this.m=new Map;this.A=function(){return!1}}p=Lz.prototype;p.configure=function(a,b){this.g=a;b&&(this.A=b)};p.start=function(a,b){var c=this;return Q(function(d){if(1==d.g)return c.l=[a],c.h=b,F(d,Nz(c),2);if(!c.h)throw new U(2,7,7001);return d.return(c.j)})};
|
|
1435
|
+
function Mz(a){var b;Q(function(c){switch(c.g){case 1:return xa(c,2),F(c,Nz(a),4);case 4:Aa(c,3);break;case 2:b=Ba(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();G(c)}})}p.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.B.destroy()};
|
|
1436
|
+
p.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return xa(c,2),F(c,Nz(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.h||!b)return c.return();a.h.onError(b);G(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};
|
|
1437
|
+
function Nz(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g)return b=Ng(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.A()}),Hg(a.B,e),F(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=Gn){wb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Nw(m,"SmoothStreamingMedia");if(!m)throw new U(2,
|
|
1438
|
+
4,4046,l);n(m);m=ec(m.outerHTML)}var q=id(m,"SmoothStreamingMedia");if(!q)throw new U(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Hn&&l(q);a.i||(a.i=new ll(null,0));if(l=yd(q,"IsLive",Id,!1))throw new U(2,4,4047);a.i.Zc(!l);n=yd(q,"TimeScale",Gd,1E7);m=yd(q,"DVRWindowLength",Gd);l&&(0===m||isNaN(m))&&(m=Infinity);var r=yd(q,"CanSeek",Id,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Gf(r);
|
|
1439
|
+
m=yd(q,"Duration",Gd,Infinity);l||a.i.pb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=rd(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(rd(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var w=m[u],v=w.attributes.SystemID.toLowerCase(),y=n[v];if(y){var z;a:{if(z=Gu(w)){z=t(ud(z,"DATA"));for(var A=z.next();!A.done;A=z.next())if(A=vd(A.value,"KID")){z=mc(sd(A));z=new Uint8Array([z[3],z[2],z[1],z[0],
|
|
1440
|
+
z[5],z[4],z[7],z[6]].concat(x(z.slice(8))));z=oc(z);break a}}z=null}A=mc(sd(w));v=nc(v.replace(/-/g,""));v=[{initData:ph(A,v,new Set,0),initDataType:"cenc",keyId:z}];v=rc(y,"cenc",v);z&&v.keyIds.add(z);if(y=Kz.get(y))v.licenseServerUri=y(w);r.push(v)}}n=r}else n=[];u=n;r=[];n=[];m=[];q=rd(q,"StreamIndex");q=t(q);for(w=q.next();!w.done;w=q.next()){w=w.value;y=rd(w,"QualityLevel");v=l.timescale;z=l.duration;A=rd(w,"c");for(var C=[],E=0,H=0;H<A.length;++H){var B=A[H],D=A[H+1],I=yd(B,"t",Gd),K=yd(B,"d",
|
|
1441
|
+
Gd);B=yd(B,"r",Ed);if(!K)break;I=null!=I?I:E;(B=B||0)&&B--;if(0>B)if(D){D=yd(D,"t",Gd);if(null==D)break;else if(I>=D)break;B=Math.ceil((D-I)/K)-1}else{if(Infinity==z)break;else if(I/v>=z)break;B=Math.ceil((z*v-I)/K)-1}for(D=0;D<=B;++D)E=I+K,C.push({start:I/v,end:E/v,Bh:I}),I=E}v=C;y=t(y);for(z=y.next();!z.done;z=y.next())(z=Oz(a,w,z.value,v,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=wc||a.g.disableText||m.push(z):n.push(z):r.push(z))}q=[];r=t(0<r.length?r:
|
|
1442
|
+
[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,w=t(0<n.length?n:[null]),C=w.next();!C.done;C=w.next())y=q,v=y.push,z=a,A=u,C=C.value,H=0,A&&A.bandwidth&&0<A.bandwidth&&(H+=A.bandwidth),C&&C.bandwidth&&0<C.bandwidth&&(H+=C.bandwidth),z={id:z.s++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!C&&C.primary,audio:A,video:C,bandwidth:H,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(y,z);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
|
|
1443
|
+
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.hf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.C.sample(1,h);G(k)})}
|
|
1444
|
+
function Oz(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return bb("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=yd(c,"Bitrate",Fd),m=yd(c,"MaxWidth",Fd),n=yd(c,"MaxHeight",Fd),q=yd(c,"Channels",Fd),r=yd(c,"SamplingRate",Fd),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.pb(Math.min(u,w));var v={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1445
|
+
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:hf(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
|
|
1446
|
+
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=Pz.get(e))&&v.roles.push(e),"main"===e&&(v.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return bb('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
|
|
1447
|
+
null;if(!Qz.includes(e.toUpperCase()))return bb("Codec not supported:",e),null;c=Rz(c,g,e,v);v.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;v.type="audio";v.mimeType="mss/audio/mp4";v.codecs=Sz(e,c);break;case "video":if(!c)return bb("Quality unsupported without CodecPrivateData",g),null;v.type="video";v.mimeType="mss/video/mp4";v.codecs=Tz(c);break;case "text":if(v.type=wc,v.mimeType="application/mp4","TTML"===e||
|
|
1448
|
+
"DFXP"===e)v.codecs="stpp"}v.fullMimeTypes.add(Ee(v.mimeType,v.codecs));v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(a.m.has(v.id))var y=a.m.get(v.id);else y=[],"video"==v.type&&(y=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),y={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Ab:y,Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:null,stream:v},y=Oi(new Ii([y])),
|
|
1449
|
+
a.m.set(v.id,y);y=Uz(a,new pj(function(){return[]},0,null,Yl(v),v.mssPrivateData.timescale,y,null,v.encrypted),v,b,d);v.segmentIndex=new Jl(y);return Promise.resolve()};v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)};return v}
|
|
1450
|
+
function Rz(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1451
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Sz(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Tz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1452
|
+
function Uz(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={Jf:void 0},g=e.next())h.Jf=g.value,d.push(new rj(h.Jf.start,h.Jf.end,function(k){return function(){return qc(a.l,[f.replace("{start time}",String(k.Jf.Bh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}T("shaka.mss.MssParser",Lz);
|
|
1453
|
+
var Qz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Pz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");ti("application/vnd.ms-sstr+xml",function(){return new Lz});function Vz(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=dc(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Wz(){}
|
|
1454
|
+
function Xz(a,b,c,d,e,f){var g=new Yz;Zg(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Zz,k={Lh:!1,Yi:!1};a=$z(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new wg(a,function(){k.Lh=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new af(function(){k.Yi=!0;h.abort()});l.ia(b/1E3);a.finally(function(){l.stop()})}return a}
|
|
1455
|
+
function $z(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,u,w,v,y,z,A,C,E,H,B;return Q(function(D){switch(D.g){case 1:return l=aA,m=bA,q=new ArrayBuffer(0),u=r=0,w={},v=Date.now(),xa(D,2),F(D,l(a,d),4);case 4:n=D.h;w=cA(n.headers);g(w);if("HEAD"==d.method){D.u(5);break}z=(y=n.headers.get("Content-Length"))?parseInt(y,10):0;if(!n.body)return F(D,n.arrayBuffer(),9);A=n.clone().body.getReader();C=function(I){function K(){var J,L,N,O;return Q(function(M){switch(M.g){case 1:return xa(M,2),F(M,A.read(),4);case 4:J=
|
|
1456
|
+
M.h;Aa(M,3);break;case 2:return Ba(M),M.return();case 3:if(J.done){M.u(5);break}r+=J.value.byteLength;if(!h){M.u(5);break}return F(M,h(J.value),5);case 5:L=Date.now();N=r-u;if(100<L-v&&N>=k||J.done)O=J.done?0:z-r,f(L-v,N,O),u=r,v=L;J.done?I.close():(I.enqueue(J.value),K());G(M)}})}K()};new m({start:C});return F(D,n.arrayBuffer(),8);case 8:q=D.h;D.u(5);break;case 9:q=D.h,E=Date.now(),f(E-v,q.byteLength,0);case 5:b.headers.Range&&(H=b.headers.Range.replace("bytes=","").split("-").filter(function(I){return I}).map(function(I){return parseInt(I,
|
|
1457
|
+
10)}),2==H.length&&q.byteLength!=H[1]-H[0]+1&&bb("Payload length does not match range requested bytes",b,n));Aa(D,3);break;case 2:B=Ba(D);if(e.Lh)throw new U(1,1,7001,a,c);if(e.Yi)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,B,c);case 3:return D.return(Vz(w,q,n.status,a,n.url,b,c))}})}function cA(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
1458
|
+
function dA(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}T("shaka.net.HttpFetchPlugin",Wz);Wz.isSupported=dA;Wz.parse=Xz;var aA=window.fetch,Zz=window.AbortController,bA=window.ReadableStream,Yz=window.Headers;dA()&&(Jg("http",Xz,2,!0),Jg("https",Xz,2,!0),Jg("blob",Xz,2,!0));function eA(){}
|
|
1459
|
+
function fA(a,b,c,d,e,f){var g=new gA,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;var q={};g.onabort=function(){n(new U(1,1,7001,a,c))};g.onreadystatechange=function(){if(g.readyState===XMLHttpRequest.HEADERS_RECEIVED){var u=g.getAllResponseHeaders().trim().split("\r\n"),w={};u=t(u);for(var v=u.next();!v.done;v=u.next())v=v.value.split(": "),w[v[0].toLowerCase()]=v.slice(1).join(": ");
|
|
1460
|
+
q=w;e(q)}};g.onload=function(u){var w=g.response;try{d(Date.now()-h,u.loaded-k,0);var v=Vz(q,w,g.status,a,g.responseURL,b,c);m(v)}catch(y){n(y)}};g.onerror=function(u){n(new U(1,1,1002,a,u,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(u){var w=Date.now(),v=f.minBytesForProgressEvents||0,y=u.loaded-k;if(100<w-h&&y>=v||u.lengthComputable&&u.loaded==u.total)d(w-h,y,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),
|
|
1461
|
+
b.headers[r]);g.send(b.body)});return new wg(l,function(){g.abort();return Promise.resolve()})}T("shaka.net.HttpXHRPlugin",eA);eA.parse=fA;var gA=window.XMLHttpRequest;Jg("http",fA,1,!0);Jg("https",fA,1,!0);Jg("blob",fA,1,!0);function hA(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function iA(a){var b=a.Yb(!1);return b?lc(b):a.O().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.startByte+":"+a.endByte}function jA(a,b){return tm(a.g.O(),a.g.startByte,a.g.endByte,b.streaming.retryParameters)};function kA(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function lA(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}kA.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function mA(a){return 0==a.i?0:a.j/a.i};function nA(a){var b=this;this.s=a;this.i=new Map;this.h=new Vg(function(){return oA(b).catch(function(){})});this.j=[];this.o=function(){};this.m=function(){};this.g=new kA;this.l=!1}nA.prototype.destroy=function(){return this.h.destroy()};function pA(a,b,c){a.o=b;a.m=c}function oA(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
|
|
1462
|
+
nA.prototype.queue=function(a,b,c,d,e){var f=this;Wg(this.h);var g=(this.i.get(a)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return Q(function(u){if(1==u.g)return F(u,qA(f,b),2);h=u.h;if(f.h.g)throw new U(2,9,7001);if(d)for(m in k=Tb(h),l=new oh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],f.m(q,r);f.g.close(c,h.byteLength);f.o(mA(f.g),f.g.g);return u.return(e(h))})});this.i.set(a,g);return g};
|
|
1463
|
+
function rA(a,b,c,d,e,f){Wg(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Tb(c);h=new oh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.o(mA(a.g),a.g.g);return f(c)});a.i.set(b,g)}function sA(a){return Q(function(b){return 1==b.g?F(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
|
|
1464
|
+
function qA(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=Tg,d=a.s.request(c,b),e=function(){return d.abort()},a.j.push(e),F(g,d.promise,2);f=g.h;Uc(a.j,e);return g.return(f.data)})};function tA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new vg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}tA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return F(b,a.g,4)}if(2!=b.g)return Aa(b,0);Ba(b);G(b)})};
|
|
1465
|
+
function uA(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return F(g,b(f.key,f.value,f),2)}f.continue();G(g)})}})}tA.prototype.store=function(){return this.h};tA.prototype.promise=function(){return this.g};function vA(a){this.h=a;this.g=[]}vA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function wA(a,b){return xA(a,b,"readwrite")}function xA(a,b,c){c=a.h.transaction([b],c);var d=new tA(c,b);a.g.push(d);d.promise().then(function(){Uc(a.g,d)},function(){Uc(a.g,d)});return d};function yA(a,b,c){this.h=new vA(a);this.i=b;this.g=c}p=yA.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return zA(this.i)};p.removeSegments=function(a,b){return AA(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,BA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Nh(e)}))})};p.addManifests=function(){return zA(this.g)};
|
|
1466
|
+
p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function CA(a,b,c){a=wA(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=wA(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return AA(this,this.g,a,b)};
|
|
1467
|
+
p.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return F(d,BA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Kd(e)})))})};p.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=xA(a.h,a.g,"readonly"),c=new Map,F(d,uA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return F(h,a.Kd(f),2);g=h.h;c.set(e,g);G(h)})}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};p.Nh=function(a){return a};p.Kd=function(a){return Promise.resolve(a)};
|
|
1468
|
+
function zA(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=wA(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={bh:void 0},h=g.next())l=h.value,k.bh=e.add(l),k.bh.onsuccess=function(n){return function(){f.push(n.bh.result)}}(k);return F(m,d.promise(),2)}return m.return(f)})};
|
|
1469
|
+
function AA(a,b,c,d){a=wA(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Og:void 0},e=c.next())f.Og=e.value,b.delete(f.Og).onsuccess=function(g){return function(){return d(g.Og)}}(f);return a.promise()}
|
|
1470
|
+
function BA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=xA(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={Af:void 0,cf:void 0},k=h.next())l.cf=k.value,l.Af=e.get(l.cf),l.Af.onsuccess=function(n){return function(){void 0==n.Af.result&&g.push(n.cf);f[n.cf]=n.Af.result}}(l);return F(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function DA(a){this.g=new vA(a)}DA.prototype.destroy=function(){return this.g.destroy()};DA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=xA(a.g,"session-ids","readonly"),c=[],F(d,uA(b,function(e,f){c.push(f)}),2)):3!=d.g?F(d,b.promise(),3):d.return(c)})};DA.prototype.add=function(a){var b=wA(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()};
|
|
1471
|
+
DA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=wA(b.g,"session-ids"),F(d,uA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):F(d,c.promise(),0)})};function EA(){this.g=new Map}EA.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)};EA.prototype.init=function(){var a=this;FA.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
|
|
1472
|
+
function GA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Rb:d,bb:f},bb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function HA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Rb:d,bb:f},e)})})}
|
|
1473
|
+
function IA(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function JA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function KA(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1474
|
+
function LA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=FA,d.forEach(function(f){(f=f())&&b.push(f)})),F(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):F(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function MA(a,b){FA.set(a,b)}T("shaka.offline.StorageMuxer",EA);EA.unregister=function(a){FA.delete(a)};EA.register=MA;EA.prototype.destroy=EA.prototype.destroy;var FA=new Map;function NA(){yA.apply(this,arguments)}pa(NA,yA);NA.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return Q(function(g){d=wA(c.h,c.g);e=d.store();f=new vg;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new U(2,9,9012,"Could not find values for "+a))};return F(g,Promise.all([d.promise(),f]),0)})};
|
|
1475
|
+
NA.prototype.Kd=function(a){var b,c,d,e,f,g;return Q(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=OA(a.periods[c],e),b.push(f);return F(h,Vv(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1476
|
+
function OA(a,b){PA(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return QA(e,a.startTime,b)})}
|
|
1477
|
+
function QA(a,b,c){var d=a.initSegmentUri?RA(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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=
|
|
1478
|
+
RA(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}NA.prototype.Nh=function(a){return{data:a.data}};
|
|
1479
|
+
function RA(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 U(2,9,9004,"Could not parse uri "+a);}
|
|
1480
|
+
function PA(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){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
|
|
1481
|
+
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);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 SA(){yA.apply(this,arguments)}pa(SA,yA);
|
|
1482
|
+
SA.prototype.Kd=function(a){var b,c,d,e,f,g;return Q(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(TA(n,k.startTime,k.startTime+e));f=l;b.push(f)}return F(h,Vv(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1483
|
+
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1484
|
+
function TA(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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,
|
|
1485
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function UA(){yA.apply(this,arguments)}pa(UA,yA);p=UA.prototype;p.hasFixedKeySpace=function(){return!1};p.addSegments=function(a){return this.add(this.i,a)};p.addManifests=function(a){return this.add(this.g,a)};p.updateManifest=function(a,b){return CA(this,a,b)};p.Kd=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function VA(){this.m=this.j=this.i=this.h=this.g=this.l=null}p=VA.prototype;
|
|
1486
|
+
p.init=function(){var a=this,b=new vg,c=!1,d=new af(function(){c=!0;b.reject(new U(2,9,9017))});"number"===typeof WA&&0<WA&&d.ia(WA);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){d.stop();var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new NA(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new SA(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;
|
|
1487
|
+
g=g.contains("manifest-v3")&&g.contains("segment-v3")?new SA(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new UA(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new DA(f):null;a.m=f;b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};
|
|
1488
|
+
e.onerror=function(f){c||(d.stop(),b.reject(new U(2,9,9001,e.error)),f.preventDefault())};return b};p.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return F(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),G(b)}})};
|
|
1489
|
+
p.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};p.getEmeSessionCell=function(){return this.m};
|
|
1490
|
+
p.erase=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return F(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return F(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return F(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return F(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),F(b,XA(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,F(b,a.init(),0)}})};
|
|
1491
|
+
function XA(){var a=new vg,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new U(2,9,9001,b.error));c.preventDefault()};return a}var WA=5;T("shaka.offline.indexeddb.StorageMechanismOpenTimeout",WA);MA("idb",function(){return rb().uh()?new VA:null});function YA(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}YA.prototype.Rb=function(){return this.i};YA.prototype.bb=function(){return this.h};YA.prototype.key=function(){return this.l};YA.prototype.toString=function(){return this.j};
|
|
1492
|
+
function ZA(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 YA(b,c,d,Number(a[4])):null};function $A(a,b){this.h=a;this.g=b}
|
|
1493
|
+
function aB(a,b){var c=new ll(null,0);c.pb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=bB(a,d,e,c);e=b.streams.filter(function(l){return l.type==wc}).map(function(l){return cB(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return cB(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=
|
|
1494
|
+
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
|
|
1495
|
+
function bB(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
|
|
1496
|
+
b.next())for(g=e.value,e=cB(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=cB(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
|
|
1497
|
+
function cB(a,b,c){var d=b.segments.map(function(e){return dB(a,e,b)});c.$d(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jl(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1498
|
+
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Ee(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}
|
|
1499
|
+
function dB(a,b,c){var d=new YA("segment",a.h,a.g,b.dataKey);a=new rj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?eB(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.Hf(b.thumbnailSprite);return a}function eB(a,b){var c=new YA("segment",a.h,a.g,b);return new pj(function(){return[c.toString()]},0,null)};function fB(){this.g=null}p=fB.prototype;p.configure=function(){};
|
|
1500
|
+
p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=ZA(a);c.g=d;if(null==d||"manifest"!=d.g)throw new U(2,1,9004,a);e=new EA;ya(m,2);return F(m,e.init(),4);case 4:return F(m,IA(e,d.Rb(),d.bb()),5);case 5:return f=m.h,F(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new $A(d.Rb(),d.bb()),l=aB(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ca(m),F(m,e.destroy(),7);case 7:Da(m,0)}})};p.stop=function(){return Promise.resolve()};
|
|
1501
|
+
p.update=function(){};
|
|
1502
|
+
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:return d=c.g,e=new EA,xa(m,2,3),F(m,e.init(),5);case 5:return F(m,IA(e,d.Rb(),d.bb()),6);case 6:return f=m.h,F(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.u(3);break}return F(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ca(m),F(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Ba(m),m.u(3)}})};
|
|
1503
|
+
p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};ti("application/x-offline-manifest",function(){return new fB});function gB(){}function hB(a,b){var c=ZA(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=zg(a)):a=c&&"segment"==c.g?iB(c.key(),c,b):xg(new U(2,1,9004,a));return a}
|
|
1504
|
+
function iB(a,b,c){var d=new EA;return zg(void 0).Va(function(){return d.init()}).Va(function(){return IA(d,b.Rb(),b.bb())}).Va(function(e){return e.getSegments([b.key()])}).Va(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}T("shaka.offline.OfflineScheme",gB);gB.plugin=hB;Jg("offline",hB);function jB(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,kB(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=lB(a,b,g);return F(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1505
|
+
function lB(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new qh({pc:b,onError:function(){},rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),F(f,Bh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Ba(f),F(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],F(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1==
|
|
1506
|
+
h.g)return xa(h,2),F(h,Nh(d,g),4);if(2!=h.g)return e.push(g),Aa(h,0);Ba(h);G(h)})})),6);case 6:return F(f,d.destroy(),7);case 7:return f.return(e)}})}function kB(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Vc(a.audioCapabilities,b.audioCapabilities,c)&&Vc(a.videoCapabilities,b.videoCapabilities,c)};function mB(a,b,c){var d=b.presentationTimeline.getDuration();b=nB(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function oB(a,b){var c=aB(new $A(a.Rb(),a.bb()),b),d=b.appMetadata||{};c=nB(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1507
|
+
function nB(a){var b=[],c=ag(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Of(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Pf(c.value));return b};function pB(){this.g=new Map}function qB(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function rB(a,b){a.g.set(b.id,b.bandwidth||2048)}function sB(a,b){a=a.g.get(b);null==a&&(a=0);return a};function tB(a){var b=this;if(a&&a.constructor!=Y)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Pb()):(this.h=Fn(),this.g=new Ig,this.g.configure(this.h.networking));this.i=[];this.l=[];var c=!a;this.j=new Vg(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return F(k,Promise.all(b.l.map(function(l){return oA(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 F(k,Promise.all(e),3);case 3:if(!c){k.u(4);
|
|
1508
|
+
break}return F(k,b.g.destroy(),4);case 4:b.h=null,b.g=null,G(k)}})});this.m=1E9}function uB(){if(wi(rb()))a:{var a=t(FA.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}p=tB.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ln(a,b));return Kn(this.h,a)};p.getConfiguration=function(){var a=Fn();Kn(a,this.h,Fn());return a};p.Pb=function(){return this.g};
|
|
1509
|
+
p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new nA(this.g);this.l.push(h);b=vB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.u(2):F(l,Ho(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=yi(a,c||null);return l.return(k())})},g,h);b=new wg(b,function(){return oA(h)});b.finally(function(){Uc(f.l,h)});return wB(this,b)};
|
|
1510
|
+
function vB(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M;return Q(function(P){switch(P.g){case 1:return xB(),l=k=null,m=new EA,r=q=n=null,xa(P,2,3),F(P,f(),5);case 5:return k=P.h,F(P,yB(a,b,k,g),6);case 6:u=P.h;zB(a);w=!u.presentationTimeline.V()&&!u.presentationTimeline.Tc();if(!w)throw new U(2,9,9005,b);v=t(d);y=v.next();case 7:if(y.done){P.u(9);break}z=y.value;return F(P,AB(a,z,u),10);case 10:A=P.h;u.imageStreams.push(A);zB(a);y=v.next();P.u(7);break;case 9:C=t(e),E=C.next();
|
|
1511
|
+
case 11:if(E.done)return Dh(g.drm.clearKeys,u.variants),D=u.variants.some(function(R){if(R.audio)for(var S=t(R.audio.drmInfos),ba=S.next();!ba.done;ba=S.next())if(ba.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),S=R.next();!S.done;S=R.next())if(S.value.licenseServerUri.startsWith("data:"))return!0;return!1}),I=g.offline.usePersistentLicense,D&&(I=!1),F(P,a.hd(u,function(R){r=r||R},g,I),15);H=E.value;return F(P,BB(a,u,H.uri,H.language,H.kind,H.mime,H.codecs),
|
|
1512
|
+
14);case 14:B=P.h;u.textStreams.push(B);zB(a);E=C.next();P.u(11);break;case 15:l=P.h;zB(a);if(r)throw r;return F(P,CB(u,l,g,I),16);case 16:return F(P,m.init(),17);case 17:return zB(a),F(P,GA(m),18);case 18:return n=P.h,zB(a),K=DB(l,u,b,c,g,h,I),J=K.lk,L=K.yh,F(P,n.bb.addManifests([J]),19);case 19:N=P.h;zB(a);q=N[0];zB(a);if(r)throw r;return F(P,EB(a,L,q,J,h,g,n.bb,u,l,I),20);case 20:return zB(a),FB(u,J,l,I),F(P,n.bb.updateManifest(q,J),21);case 21:return zB(a),O=new YA("manifest",n.path.Rb,n.path.bb,
|
|
1513
|
+
q),P.return(oB(O,J));case 3:return Ca(P),F(P,m.destroy(),22);case 22:if(!k){P.u(23);break}return F(P,k.stop(),23);case 23:if(!l){P.u(25);break}return F(P,l.destroy(),25);case 25:Da(P,0);break;case 2:M=Ba(P);if(null==q){P.u(27);break}return F(P,GB(q),27);case 27:throw r||M;}})}
|
|
1514
|
+
function EB(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,u,w,v,y,z,A,C;return Q(function(E){switch(E.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(H,B){var D,I,K,J,L,N,O,M,P;return Q(function(R){if(1==R.g){D=t(H);I=D.next();for(K={};!I.done;K={jc:void 0},I=D.next())K.jc=I.value,q(),J=jA(K.jc,f),L=K.jc.i,N=K.jc.h,O=function(S){return function(ba){var W,Fa,Ga,za;return Q(function(na){switch(na.g){case 1:W=S.jc.g;Fa=W.Yb(!1);if(!W.aesKey||Fa){na.u(2);break}return F(na,sm(ba,W.aesKey,
|
|
1515
|
+
S.jc.j),3);case 3:ba=na.h;case 2:return Ga=iA(W),F(na,g.addSegments([{data:ba}]),4);case 4:za=na.h,q(),m[Ga]=za[0],n+=ba.byteLength,G(na)}})}}(K),M=K.jc.g,(P=M.Yb(!1))?rA(e,K.jc.groupId,P,L,N,O):e.queue(K.jc.groupId,J,L,N,O);return F(R,sA(e),2)}q();if(!B||e.l)return R.u(0);FB(h,d,k,l);return F(R,g.updateManifest(c,d),0)})};u=!1;xa(E,2);if(!HB(h)||!u||IB(h)){E.u(4);break}return F(E,r(b.filter(function(H){return H.h}),!0),5);case 5:return q(),b=b.filter(function(H){return!H.h}),w=m,v=n,m={},n=0,F(E,
|
|
1516
|
+
JB(g,c,d,w,v,function(){return zB(a)}),6);case 6:q();case 4:if(u){E.u(7);break}return F(E,r(b,!1),8);case 8:return q(),y=m,z=n,m={},n=0,F(E,JB(g,c,d,y,z,function(){return q()}),9);case 9:q();case 7:Aa(E,0);break;case 2:return A=Ba(E),C=Object.values(m),F(E,g.removeSegments(C,function(){}),10);case 10:throw A;}})}
|
|
1517
|
+
function GB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new EA,F(f,b.init(),2);case 2:return F(f,GA(b),3);case 3:return c=f.h,d=new YA("manifest",c.path.Rb,c.path.bb,a),F(f,b.destroy(),4);case 4:return e=new tB,F(f,e.remove(d.toString()),0)}})}
|
|
1518
|
+
function JB(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,u,w,v;return Q(function(y){switch(y.g){case 1:g=!1;xa(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())r=q.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
|
|
1519
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return F(y,a.updateManifest(b,c),4);case 4:g=!0;f();Aa(y,0);break;case 2:return w=Ba(y),F(y,GB(b),5);case 5:if(g){y.u(6);break}v=Object.values(d);return F(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
|
|
1520
|
+
function CB(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,u,w,v,y,z,A,C,E,H,B,D,I,K,J,L,N,O,M,P,R;return Q(function(S){switch(S.g){case 1:return e={width:Infinity,height:Infinity},tf(a,c.restrictions,e),F(S,wf(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;rf(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Of(q));r=t(a.textStreams);for(u=r.next();!u.done;u=
|
|
1521
|
+
r.next())w=u.value,f.push(Pf(w));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())z=y.value,f.push(Qf(z));return F(S,c.offline.trackSelectionCallback(f),3);case 3:A=S.h;C=a.presentationTimeline.getDuration();E=0;H=t(A);for(B=H.next();!B.done;B=H.next())D=B.value,I=D.bandwidth*C/8,E+=I;xa(S,4);return F(S,c.offline.downloadSizeCallback(E),6);case 6:K=S.h;if(!K)throw new U(2,9,9014);Aa(S,5);break;case 4:J=Ba(S);if(J instanceof U)throw J;throw new U(2,9,9015);case 5:L=new Set;N=new Set;O=new Set;
|
|
1522
|
+
M=t(A);for(P=M.next();!P.done;P=M.next())R=P.value,"variant"==R.type&&L.add(R.id),"text"==R.type&&N.add(R.id),"image"==R.type&&O.add(R.id);a.variants=a.variants.filter(function(ba){return L.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return N.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return O.has(ba.id)});KB(a);G(S)}})}
|
|
1523
|
+
function DB(a,b,c,d,e,f,g){var h=mB(c,b,d),k=e.offline.progressCallback;pA(f,function(u,w){h.size=w;k(h,u)},function(u,w){l&&g&&m==w&&Jh(a,"cenc",u)});var l=HB(b)&&!IB(b),m=null;l&&(m=LB.get(a.g.keySystem));for(var n=new pB,q=t(b.textStreams),r=q.next();!r.done;r=q.next())n.g.set(r.value.id,52);q=t(b.imageStreams);for(r=q.next();!r.done;r=q.next())rB(n,r.value);q=t(b.variants);for(r=q.next();!r.done;r=q.next())qB(n,r.value);f=MB(f,n,b,e);e=f.streams;f=f.yh;(n=a.g)&&g&&(n.initData=[]);return{lk:{creationTime:Date.now(),
|
|
1524
|
+
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pd(),streams:e,sessionIds:g?Sh(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},yh:f}}function HB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1525
|
+
function IB(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function FB(a,b,c,d){b.expiration=c.Pd();c=Sh(c);b.sessionIds=d?c:[];if(HB(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return NB(this,OB(this,a))};
|
|
1526
|
+
function OB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:xB();c=ZA(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new EA;ya(k,2);return F(k,e.init(),4);case 4:return F(k,IA(e,d.Rb(),d.bb()),5);case 5:return f=k.h,F(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],F(k,Promise.all([PB(a,h,e),QB(f,d,h)]),2);case 2:return Ca(k),F(k,e.destroy(),8);case 8:Da(k,0)}})}
|
|
1527
|
+
function RB(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:Ee(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Ee(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function PB(a,b,c){return Q(function(d){return F(d,SB(a.g,a.h.drm,c,b),0)})}
|
|
1528
|
+
function QB(a,b,c){function d(){}var e=TB(c);oB(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Ik=function(){return NB(this,UB(this))};
|
|
1529
|
+
function UB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return xB(),b=a.g,c=a.h.drm,d=new EA,e=!1,ya(n,2),F(n,d.init(),4);case 4:f=[],JA(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return F(n,k.getAll(),8);case 8:return l=n.h,F(n,jB(c,b,l),9);case 9:return m=n.h,F(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Ca(n),F(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
|
|
1530
|
+
p.list=function(){return NB(this,VB())};function VB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return xB(),a=[],b=new EA,ya(d,2),F(d,b.init(),4);case 4:return c=Promise.resolve(),HA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return F(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=oB(new YA("manifest",e.Rb,e.bb,l),k);a.push(k)});G(h)})})}),F(d,c,2);case 2:return Ca(d),F(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
|
|
1531
|
+
function yB(a,b,c,d){var e,f,g,h,k;return Q(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},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
|
|
1532
|
+
addFont:function(){}},c.configure(d.manifest),zB(a),F(l,c.start(b,g),2);if(3!=l.g)return h=l.h,zB(a),k=WB(h),F(l,Promise.all(Xg(k,function(m){return m.createSegmentIndex()})),3);zB(a);if(e)throw e;return l.return(h)})}
|
|
1533
|
+
function AB(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,u,w,v,y;return Q(function(z){switch(z.g){case 1:return F(z,XB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return F(z,YB(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=Te(d);if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Tb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);q=n.next();for(r={};!q.done;r={Pf:void 0,kd:void 0},q=n.next())r.kd=q.value,r.Pf=null,
|
|
1534
|
+
u=function(A){return function(){null==A.Pf&&(A.Pf=qc([b],[A.kd.payload]));return A.Pf||[]}}(r),w=new rj(r.kd.startTime,r.kd.endTime,u,0,null,null,0,0,Infinity),r.kd.payload.includes("#xywh")&&(v=r.kd.payload.split("#xywh=")[1].split(","),4===v.length&&w.Hf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);y=d;if(!m.length){z.u(4);break}return F(z,Ho(m[0].O()[0],a.g,a.h.manifest.retryParameters),5);case 5:y=z.h;case 4:return z.return({id:a.m++,
|
|
1535
|
+
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jl(m),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ee(y||
|
|
1536
|
+
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
|
|
1537
|
+
function BB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.u(2):F(m,XB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ll(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:wc,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
|
|
1538
|
+
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ee(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=Ee(h.mimeType,h.codecs);l=Ue(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}
|
|
1539
|
+
function XB(a,b){var c;return Q(function(d){switch(d.g){case 1:return xa(d,2),F(d,Ho(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;Aa(d,3);break;case 2:Ba(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})}function YB(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Tg,e=Ng([a],c),e.method="GET",F(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
|
|
1540
|
+
p.hd=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new qh({pc:e.g,onError:b,rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),F(g,yh(f,a.variants,d),2)):3!=g.g?F(g,Lh(f),3):g.return(f)})};
|
|
1541
|
+
function MB(a,b,c,d){var e=new Map,f=WB(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ZB(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),yh:Array.from(e.values())}}
|
|
1542
|
+
function ZB(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1543
|
+
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;$B(d,c.presentationTimeline.Gb(),function(l,m){var n=iA(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=sB(b,d.id)*r;r=lA(a.g,r);f.set(n,new hA(l,r,k,!1,m))}l.Y&&(q=iA(l.Y),f.has(q)||(r=.5*sB(b,
|
|
1544
|
+
d.id),r=lA(a.g,r),f.set(q,new hA(l.Y,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g}
|
|
1545
|
+
function $B(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function zB(a){if(a.j.g)throw new U(2,9,7001);}function xB(){if(!uB())throw new U(2,9,9E3);}function NB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),ya(c,2),F(c,b,4);if(2!=c.g)return c.return(c.h);Ca(c);Uc(a.i,b);return Da(c,0)})}function wB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Uc(a.i,c)})}
|
|
1546
|
+
function TB(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1547
|
+
function SB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=KA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:RB(d,!1),videoCapabilities:RB(d,!0)}});return F(h,jB(b,a,f),2)}return 3!=h.g?(g=h.h,F(h,e.remove(g),3)):F(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1548
|
+
function WB(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1549
|
+
function KB(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());}T("shaka.offline.Storage",tB);tB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new EA,ya(b,2),F(b,LA(a),2)):5!=b.g?(Ca(b),F(b,a.destroy(),5)):Da(b,0)})};
|
|
1550
|
+
tB.prototype.list=tB.prototype.list;tB.prototype.removeEmeSessions=tB.prototype.Ik;tB.prototype.remove=tB.prototype.remove;tB.prototype.store=tB.prototype.store;tB.prototype.getNetworkingEngine=tB.prototype.Pb;tB.prototype.getConfiguration=tB.prototype.getConfiguration;tB.prototype.configure=tB.prototype.configure;tB.prototype.destroy=tB.prototype.destroy;tB.support=uB;
|
|
1551
|
+
var LB=(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.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
|
|
1552
|
+
fq("offline",uB);function aC(){}function bC(a,b){a={priority:b||0,callback:a};for(b=0;b<cC.length;b++)if(cC[b].priority<a.priority){cC.splice(b,0,a);return}cC.push(a)}T("shaka.polyfill",aC);aC.register=bC;aC.installAll=function(){for(var a=t(cC),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){bb("Error installing polyfill!",c)}}};var cC=[];function dC(){}function eC(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())fC(b.value)}function fC(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)}})}aC.Aria=dC;dC.install=eC;bC(eC);function gC(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}gC.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};gC.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function hC(a){if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("org.w3")||a.startsWith("com.huawei"))return"cenc";bb("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
|
|
1553
|
+
function iC(a){if(!a)return!1;a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function jC(a,b){return!a||a==b||("cbcs"==a||"cbcs-1-9"==a)&&rb().$c()?!0:!1};function kC(){}var lC;function mC(){rb().If()&&!lC&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(lC=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=nC,navigator.emeEncryptionSchemePolyfilled=!0)}
|
|
1554
|
+
function nC(a,b){var c=this,d,e;return Q(function(f){if(1==f.g)return F(f,lC.call(c,a,b),2);d=f.h;if(e=iC(d))return navigator.requestMediaKeySystemAccess=lC,f.return(d);navigator.requestMediaKeySystemAccess=oC;return f.return(oC.call(c,a,b))})}
|
|
1555
|
+
function oC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,r,u;return Q(function(w){if(1==w.g){d=hC(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=pC(h.videoCapabilities,d),l=pC(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."),n.name="NotSupportedError",
|
|
1556
|
+
n.code=DOMException.NOT_SUPPORTED_ERR,n;return F(w,lC.call(c,a,e),2)}q=w.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return w.return(new gC(q,r,u))})}function pC(a,b){return a?a.filter(function(c){return jC(c.encryptionScheme,b)}):a}aC.EmeEncryptionScheme=kC;kC.install=mC;bC(mC);function qC(){}
|
|
1557
|
+
function rC(){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}}),
|
|
1558
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sC);document.addEventListener("webkitfullscreenerror",sC);document.addEventListener("mozfullscreenchange",sC);document.addEventListener("mozfullscreenerror",sC);document.addEventListener("MSFullscreenChange",sC);document.addEventListener("MSFullscreenError",sC)}}
|
|
1559
|
+
function sC(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)}aC.Fullscreen=qC;qC.install=rC;bC(rC);function tC(){}var uC;function vC(){rb().If()&&!uC&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(uC=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=wC,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}
|
|
1560
|
+
function wC(a){var b=this,c,d,e;return Q(function(f){switch(f.g){case 1:return F(f,uC.call(b,a),2);case 2:c=f.h;if(!c.supported||!a.keySystemConfiguration)return f.return(c);d=c.keySystemAccess;if(e=iC(d))return navigator.mediaCapabilities.decodingInfo=uC,f.return(c);navigator.mediaCapabilities.decodingInfo=xC;if(d){f.u(3);break}return F(f,yC(a),4);case 4:return c.keySystemAccess=f.h,f.return(c);case 3:return f.return(xC.call(b,a))}})}
|
|
1561
|
+
function xC(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:return d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=hC(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},jC(d,g)&&jC(c,g))?F(l,uC.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=new gC(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);
|
|
1562
|
+
break}return F(l,yC(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
|
|
1563
|
+
function yC(a){var b,c;return Q(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
|
|
1564
|
+
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return F(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}aC.MCapEncryptionScheme=tC;tC.install=vC;bC(vC,-2);function zC(){}function AC(){rb().dc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),zC.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=BC)}
|
|
1565
|
+
function BC(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};rb();c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=""!=xi().canPlayType(e),!f)||d&&(g=d.contentType,h=""!=xi().canPlayType(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!wi())return q.return(b);if(!c){q.u(3);break}return F(q,CC(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var r=
|
|
1566
|
+
rb().La(),u=d.contentType;"CAST"===r&&d.spatialRendering&&(u+="; spatialRendering=true");l=Ec(u);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return F(q,DC(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}function CC(a){var b,c,d;return Q(function(e){return 1==e.g?(b=rb(),c=b.La(),"CAST"!==c?e.u(2):F(e,EC(a),3)):2!=e.g?(d=e.h,e.return(d)):e.return(Ec(a.contentType))})}
|
|
1567
|
+
function DC(a,b,c){var d,e,f,g,h,k,l,m,n,q,r;return Q(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},rb().li()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));
|
|
1568
|
+
h={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=Ne(k)+";"+Le(k);n=Ne(l)+";"+Le(l);q=c.keySystem;r=null;xa(u,2);if(rg.has(m+"#"+n+"#"+q)){r=rg.get(m+"#"+n+"#"+q)||null;u.u(4);break}return F(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,rg.set(m+"#"+n+"#"+q,r);case 4:Aa(u,
|
|
1569
|
+
3);break;case 2:Ba(u);case 3:return u.return(r)}})}
|
|
1570
|
+
function EC(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Ec(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
|
|
1571
|
+
default:return g.return(!1)}e=!1;f=FC;return f.has(b)?(e=f.get(b),g.u(2)):F(g,cast.__platform__.canDisplayType(b),3)}2!=g.g&&(e=g.h,f.set(b,e));return g.return(e)})}aC.MediaCapabilities=zC;zC.install=AC;zC.originalMcap=null;var FC=new Map;bC(AC,-1);function GC(){}function HC(){var a=rb(),b="WEBKIT"===a.Da()?a.xa():null;(window.MediaSource||window.ManagedMediaSource)&&b&&window.MediaSource&&(12>=b?(IC(),JC()):15>=b&&IC());a=t(a.xi());for(b=a.next();!b.done;b=a.next())KC(b.value);(window.MediaSource||window.ManagedMediaSource)&&LC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&MC()}
|
|
1572
|
+
function IC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Oa.apply(0,arguments));b.abort=function(){};return b}}function JC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1573
|
+
function LC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Ie(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Ie(c)&&b(c)}}}
|
|
1574
|
+
function KC(a){var b=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(d){return Le(d)!=a&&b(d)};if(window.ManagedMediaSource){var c=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(d){return Le(d)!=a&&c(d)}}}
|
|
1575
|
+
function MC(){var a=MediaSource.isTypeSupported;rb().Vi()&&(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)})}aC.MediaSource=GC;GC.install=HC;bC(HC);function NC(){}function OC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?PC():void 0!=window.orientation&&QC())}function PC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1576
|
+
function QC(){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 RC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}aC.Orientation=NC;NC.install=OC;function RC(){Fg.call(this);this.type="";this.angle=0}pa(RC,Fg);
|
|
1577
|
+
RC.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)};
|
|
1578
|
+
RC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};bC(OC);function SC(){}var TC,UC,VC,WC,XC,YC;
|
|
1579
|
+
function ZC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys&&window.shakaMediaKeysPolyfill!=$C){if(void 0===a?0:a)TC=!0,UC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),VC=HTMLMediaElement.prototype.setMediaKeys,WC=window.MediaKeys,XC=window.MediaKeySystemAccess,YC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=aD;window.MediaKeys=bD;window.MediaKeySystemAccess=
|
|
1580
|
+
cD;navigator.requestMediaKeySystemAccess=dD;window.shakaMediaKeysPolyfill=$C;Ef.clear();rg.clear()}}function dD(a,b){try{var c=new cD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function aD(a){var b=this.mediaKeys;b&&b!=a&&eD(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?eD(a,this):Promise.resolve()}
|
|
1581
|
+
function fD(a){a=Tb(a.initData);if(Yb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=bc(a.subarray(4),!0);a=ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ub(a);this.dispatchEvent(b)}aC.PatchedMediaKeysApple=SC;
|
|
1582
|
+
SC.uninstall=function(){window.shakaMediaKeysPolyfill==$C&&TC&&(TC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",UC),HTMLMediaElement.prototype.setMediaKeys=VC,window.MediaKeys=WC,window.MediaKeySystemAccess=XC,navigator.requestMediaKeySystemAccess=YC,UC=YC=VC=XC=WC=null,window.shakaMediaKeysPolyfill="",Ef.clear(),rg.clear())};SC.install=ZC;
|
|
1583
|
+
function cD(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1584
|
+
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1585
|
+
cD.prototype.createMediaKeys=function(){var a=new bD(this.keySystem);return Promise.resolve(a)};cD.prototype.getConfiguration=function(){return this.g};function bD(a){this.h=new WebKitMediaKeys(a);this.g=new jb}bD.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new gD(this.h,a)};bD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1586
|
+
function eD(a,b){a.g.Ra();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",fD);try{return sl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}bD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function gD(a){Fg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new jb;this.sessionId="";this.expiration=NaN;this.closed=new vg;this.keyStatuses=new hD}pa(gD,Fg);p=gD.prototype;
|
|
1587
|
+
p.generateRequest=function(a,b){var c=this;this.h=new vg;try{var d=this.l.createSession("video/mp4",Tb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cc()?"license-request":"license-renewal").set("message",Ub(e.message));e=new V("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(iD(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1588
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:iD(c,"output-not-allowed");break;default:iD(c,"internal-error")}});iD(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1589
|
+
p.update=function(a){this.g=new vg;try{this.i.update(Tb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function iD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}
|
|
1590
|
+
function hD(){this.size=0;this.g=void 0}p=hD.prototype;p.Cc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,qg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=qg.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var $C="apple";bC(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||ZC())});function jD(){}function kD(){if(window.MediaKeys){var a=rb();MediaKeys.prototype.setServerCertificate&&a.je()||(MediaKeys.prototype.setServerCertificate=lD)}}function lD(){return Promise.resolve(!1)}aC.PatchedMediaKeysCert=jD;jD.install=kD;bC(kD);function mD(){}
|
|
1591
|
+
function nD(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)oD="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=pD;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qD;window.MediaKeys=rD;window.MediaKeySystemAccess=sD;window.shakaMediaKeysPolyfill=tD}}
|
|
1592
|
+
function uD(a){var b=oD;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function pD(a,b){try{var c=new sD(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qD(a){var b=this.mediaKeys;b&&b!=a&&vD(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&vD(a,this);return Promise.resolve()}aC.PatchedMediaKeysWebkit=mD;mD.install=nD;
|
|
1593
|
+
function sD(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");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
1594
|
+
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1595
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}sD.prototype.createMediaKeys=function(){var a=new rD(this.g);return Promise.resolve(a)};sD.prototype.getConfiguration=function(){return this.h};function rD(a){this.l=a;this.h=null;this.g=new jb;this.i=[];this.j=new Map}
|
|
1596
|
+
function vD(a,b){a.h=b;a.g.Ra();var c=oD;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ub(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=wD(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cc()?"licenserequest":"licenserenewal").set("message",d.message),d=new V("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=wD(a,d.sessionId))&&d.ready()}),
|
|
1597
|
+
a.g.D(b,c+"keyerror",function(d){var e=wD(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?xD(e,"output-restricted"):1==f?xD(e,"expired"):xD(e,"internal-error"))}}))}
|
|
1598
|
+
rD.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 yD(b,this.l,a);this.i.push(a);return a};rD.prototype.setServerCertificate=function(){return Promise.resolve(!1)};rD.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1599
|
+
function wD(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 yD(a,b,c){Fg.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 vg;this.keyStatuses=new zD}pa(yD,Fg);p=yD.prototype;p.ready=function(){xD(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1600
|
+
function AD(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=Tb(ec("LOAD_SESSION|"+c));else{var e=ec("PERSISTENT|");d=pc(e,b)}else d=Tb(b)}catch(g){return Promise.reject(g)}a.h=new vg;var f=uD("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new af(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).ia(.01)}return a.h}
|
|
1601
|
+
function BD(a,b,c){if(a.g)a.g.then(function(){return BD(a,b,c)}).catch(function(){return BD(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ac(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=mc(e.keys[0].k);e=mc(e.keys[0].kid)}else d=Tb(c),e=null;var f=uD("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1602
|
+
function xD(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return AD(this,b,null)};p.load=function(a){return"persistent-license"==this.l?AD(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new vg;BD(this,b,a);return b};
|
|
1603
|
+
p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=uD("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function zD(){this.size=0;this.g=void 0}p=zD.prototype;p.Cc=function(){return this.g};
|
|
1604
|
+
p.forEach=function(a){this.g&&a(this.g,qg.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=qg.value();return this.g&&Sb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var oD="",tD="webkit";bC(nD);function CD(){}function DD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ED,Object.defineProperty(a,"disablePictureInPicture",{get:FD,set:GD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=HD,document.addEventListener("webkitpresentationmodechanged",ID,!0))}}
|
|
1605
|
+
function ID(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)}
|
|
1606
|
+
function ED(){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 HD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1607
|
+
function FD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function GD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}aC.PiPWebkit=CD;CD.install=DD;bC(DD);function JD(){}function KD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=LD))}function LD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}aC.RandomUUID=JD;JD.install=KD;bC(KD);function MD(){}function ND(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:OD})}function OD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}aC.Symbol=MD;MD.install=ND;bC(ND);function PD(){}function QD(){for(var a=t([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),b=a.next();!b.done;b=a.next())b=b.value,b.prototype.indexOf||(b.prototype.indexOf=RD),b.prototype.lastIndexOf||(b.prototype.lastIndexOf=SD),b.prototype.includes||(b.prototype.includes=TD)}function RD(a,b){return Array.prototype.indexOf.call(this,a,b)}function SD(a,b){return Array.prototype.lastIndexOf.call(this,a,b)}
|
|
1608
|
+
function TD(a,b){return-1!==this.indexOf(a,b)}aC.TypedArray=PD;PD.install=QD;bC(QD);function UD(){}function VD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}aC.VideoPlayPromise=UD;UD.install=VD;bC(VD);function WD(){}function XD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||"number"===typeof xi().webkitDroppedFrameCount)&&(a.getVideoPlaybackQuality=YD)}}function YD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}aC.VideoPlaybackQuality=WD;WD.install=XD;bC(XD);function ZD(){}function $D(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=aE;else if(6==b)a=bE;else{try{var c=!!aE(1,2,"")}catch(d){c=!1}c&&(a=aE)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function aE(a,b,c){return new window.TextTrackCue(a,b,c)}function bE(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}aC.VTTCue=ZD;ZD.install=$D;bC($D);function cE(a){Fg.call(this);this.h=a;this.l=null;this.g=[];this.i=-1;this.j=null;this.m=new jb}pa(cE,Fg);p=cE.prototype;p.destroy=function(){var a=this;return Q(function(b){if(1==b.g)return F(b,a.removeAllItems(),2);a.h=null;a.m&&(a.m.release(),a.m=null);Fg.prototype.release.call(a);G(b)})};p.configure=function(a){this.l=a};p.getConfiguration=function(){return this.l};p.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i<this.g.length?this.g[this.i]:null};p.getCurrentItemIndex=function(){return this.i};
|
|
1609
|
+
p.getItems=function(){return this.g.slice()};p.insertItems=function(a){this.g.push.apply(this.g,x(a));this.dispatchEvent(new V("itemsinserted"))};p.removeAllItems=function(){var a=this;return Q(function(b){switch(b.g){case 1:a.m.Ra();if(!(a.g.length&&0<=a.i)){b.u(2);break}return F(b,a.h.vc(),2);case 2:if(!a.j){b.u(4);break}if(a.j.xf.o){b.u(5);break}return F(b,a.j.xf.destroy(),5);case 5:a.j=null;case 4:a.g=[],a.i=-1,a.dispatchEvent(new V("itemsremoved")),G(b)}})};
|
|
1610
|
+
p.playItem=function(a){var b=this,c,d,e,f,g,h,k,l,m,n,q,r,u,w;return Q(function(v){if(1==v.g){b.m.Ra();if(!b.g.length||a>=b.g.length)throw new U(2,7,7007);c=b.g[a];b.i!=a&&(b.i=a,b.dispatchEvent(new V("currentitemchanged")));d=b.h.h;e=b.l?b.l.preloadNextUrlWindow:0;0<e&&(f=!1,b.m.D(d,"timeupdate",function(){var y,z,A,C;return Q(function(E){switch(E.g){case 1:if(b.j||1>=b.g.length||f||b.h.V()||!d.duration)return E.return();y=b.h.Sa().end-d.currentTime;if(isNaN(y)){E.u(0);break}if(!(y<=e)){E.u(0);break}z=
|
|
1611
|
+
b.l&&b.l.repeatMode;A=null;b.i+1<b.g.length?A=b.g[b.i+1]:1==z&&(A=b.g[0]);if(!A){E.u(0);break}f=!0;C=null;xa(E,5);return F(E,b.h.preload(A.manifestUri,A.startTime,A.mimeType,A.config),7);case 7:C=E.h;Aa(E,6);break;case 5:Ba(E),C=null;case 6:b.j={item:A,xf:C},f=!1,G(E)}})}));b.m.D(b.h,"complete",function(){var y=b.l&&b.l.repeatMode,z=!1;if(2==y)z=!0;else{var A=b.i+1;A<b.g.length?b.playItem(A):1==y&&(1==b.g.length?z=!0:b.playItem(0))}z&&(d.paused?(d.currentTime=b.h.Sa().start,d.play()):b.m.D(d,"paused",
|
|
1612
|
+
function(){d.currentTime=b.h.Sa().start;d.play()}))});c.config&&(b.h.Ci(),b.h.configure(c.config));g=c.manifestUri;b.j&&b.j.item==c&&b.j.xf&&(g=b.j.xf);return F(v,b.h.load(g,c.startTime,c.mimeType),2)}b.j=null;if(c.extraText)for(h=t(c.extraText),k=h.next();!k.done;k=h.next())l=k.value,l.mime?b.h.Hd(l.uri,l.language,l.kind,l.mime,l.codecs):b.h.Hd(l.uri,l.language,l.kind);if(c.extraThumbnail)for(m=t(c.extraThumbnail),n=m.next();!n.done;n=m.next())q=n.value,b.h.He(q);if(c.extraChapter)for(r=t(c.extraChapter),
|
|
1613
|
+
u=r.next();!u.done;u=r.next())w=u.value,b.h.Ge(w.uri,w.language,w.mime);G(v)})};T("shaka.queue.QueueManager",cE);cE.prototype.playItem=cE.prototype.playItem;cE.prototype.removeAllItems=cE.prototype.removeAllItems;cE.prototype.insertItems=cE.prototype.insertItems;cE.prototype.getItems=cE.prototype.getItems;cE.prototype.getCurrentItemIndex=cE.prototype.getCurrentItemIndex;cE.prototype.getCurrentItem=cE.prototype.getCurrentItem;cE.prototype.getConfiguration=cE.prototype.getConfiguration;
|
|
1614
|
+
cE.prototype.configure=cE.prototype.configure;cE.prototype.destroy=cE.prototype.destroy;Zp=function(a){return new cE(a)};function dE(){}dE.prototype.parseInit=function(){};dE.prototype.setSequenceMode=function(){};dE.prototype.setManifestType=function(){};dE.prototype.parseMedia=function(a,b){var c=null,d=[];a=ac(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=eE.exec(e))){var f=fE.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1615
|
+
T("shaka.text.LrcTextParser",dE);dE.prototype.parseMedia=dE.prototype.parseMedia;dE.prototype.setManifestType=dE.prototype.setManifestType;dE.prototype.setSequenceMode=dE.prototype.setSequenceMode;dE.prototype.parseInit=dE.prototype.parseInit;var eE=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,fE=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Re("application/x-subtitle-lrc",function(){return new dE});function gE(){}gE.prototype.parseInit=function(){};gE.prototype.setSequenceMode=function(){};gE.prototype.setManifestType=function(){};
|
|
1616
|
+
gE.prototype.parseMedia=function(a,b,c,d){var e=ac(a);a=[];if(""==e)return a;var f=kd(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=ud(f,"body")[0];if(!e)return[];var g=Ad(f,hE,"frameRate"),h=Ad(f,hE,"subFrameRate"),k=Ad(f,hE,"frameRateMultiplier"),l=Ad(f,hE,"tickRate"),m=Ad(f,hE,"cellResolution"),n=f.attributes["xml:space"]||"default",q=Ad(f,iE,"extent");if("default"!=n&&"preserve"!=n)throw new U(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new jE(g,h,k,l);m=kE(m);
|
|
1617
|
+
h=ud(f,"metadata")[0];h=(h?h.children:[]).filter(function(w){return"\n"!=w});k=ud(f,"style");f=ud(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=lE(u.value,k,q))&&l.push(u);if(rd(e,"p").length)throw new U(2,2,2001,"<p> can only be inside <div> in TTML");q=t(rd(e,"div"));for(r=q.next();!r.done;r=q.next())if(rd(r.value,"span").length)throw new U(2,2,2001,"<span> can only be inside <p> in TTML");if(b=mE(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
|
|
1618
|
+
a.push(b);return a};
|
|
1619
|
+
function mE(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(pd(a)){if(!m)return null;var u={tagName:"span",children:[sd(a)],attributes:{},parent:null}}else u=a;for(var w=null,v=t(nE),y=v.next();!y.done&&!(w=oE(u,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=null;y=Ad(u,nE,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(y&&z.test(y)){v=parseInt(y.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&y&&!y.startsWith("#")&&(z=new Bb(n),y=new Bb(y),(y=z.resolve(y).toString())&&
|
|
1620
|
+
(v=y));if("p"==a.tagName||w||v)m=!0;a=m;y="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(pd);h=[];if(!z)for(var A=t(u.children),C=A.next();!C.done;C=A.next())(C=mE(C.value,b,c,d,e,f,g,y,k,u,m,n,q))&&h.push(C);d=null!=l;n=sd(u);n=u.children.length&&n&&/\S/.test(n);A=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(A||n||"br"==u.tagName||0!=h.length||d&&!y))return null;q=pE(u,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=qE(r,c,n,q),n=q.start,
|
|
1621
|
+
q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,q=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),q=Math.max(q,c.endTime);if("br"==u.tagName)return e=new Rd(n,q,""),e.lineBreak=!0,e;b="";z&&(b=ic(sd(u)||""),y&&(b=b.replace(/\s+/g," ")));b=new Rd(n,q,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=oE(u,"region",f,"")[0];if(u.attributes.region&&
|
|
1622
|
+
k&&k.attributes["xml:id"]){var E=k.attributes["xml:id"];b.region=g.filter(function(H){return H.id==E})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=oE(l,"region",f,"")[0]);rE(b,u,g,w,v,e,a,0==h.length);return b}
|
|
1623
|
+
function lE(a,b,c){var d=new Qc,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=sE.exec(c)||tE.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=uE(a,b,"extent");if(g){var h=(f=sE.exec(g))||tE.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Rc:0,d.heightUnits=f||null!=e?Rc:0)}if(a=uE(a,b,"origin"))if(h=(f=sE.exec(a))||tE.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
|
|
1624
|
+
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Rc,d.height=100-d.viewportAnchorY,d.heightUnits=Rc):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Rc:0;return d}function vE(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
|
|
1625
|
+
function rE(a,b,c,d,e,f,g,h){g=g||h;"rtl"==wE(b,c,f,"direction",g)&&(a.direction="rtl");h=wE(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Vd);(h=wE(b,c,f,"textAlign",!0))?(a.positionAlign=xE.get(h),a.lineAlign=yE.get(h),a.textAlign=re[h.toUpperCase()]):a.textAlign=Ud;if(h=wE(b,c,f,"displayAlign",!0))a.displayAlign=se[h.toUpperCase()];if(h=wE(b,c,f,"color",g))a.color=vE(h);if(h=wE(b,
|
|
1626
|
+
c,f,"backgroundColor",g))a.backgroundColor=vE(h);if(h=wE(b,c,f,"border",g))a.border=h;if(h=wE(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
|
|
1627
|
+
k}).join(",")}(h=wE(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=oe);h=wE(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=wE(b,c,f,"lineHeight",g))&&h.match(zE)&&(a.lineHeight=h);(h=wE(b,c,f,"fontSize",g))&&(h.match(zE)||h.match(AE))&&(a.fontSize=h);if(h=wE(b,c,f,"fontStyle",g))a.fontStyle=ue[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=sd(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
|
|
1628
|
+
e);if(d=wE(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(zE)?a.textStrokeColor=a.color:(a.textStrokeColor=vE(d[0]),d.shift()),d[0]&&d[0].match(zE)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=wE(b,c,f,"letterSpacing",g))&&d.match(zE)&&(a.letterSpacing=d);(d=wE(b,c,f,"linePadding",g))&&d.match(zE)&&(a.linePadding=d);if(d=wE(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=uE(c,f,"textDecoration"))&&BE(a,d);(d=CE(b,f,"textDecoration"))&&BE(a,d);if(d=wE(b,c,f,"textCombine",g))a.textCombineUpright=
|
|
1629
|
+
d;switch(wE(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
|
|
1630
|
+
function BE(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(qe)||a.textDecoration.push(qe);break;case "noUnderline":a.textDecoration.includes(qe)&&Uc(a.textDecoration,qe);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Uc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1631
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Uc(a.textDecoration,"overline")}}function wE(a,b,c,d,e){e=void 0===e?!0:e;return(a=CE(a,c,d))?a:e?uE(b,c,d):null}function uE(a,b,c){if(!a)return null;var d=Ad(a,iE,c);return d?d:DE(a,b,c)}function CE(a,b,c){var d=Ad(a,iE,c);return d?d:DE(a,b,c)}
|
|
1632
|
+
function DE(a,b,c){a=oE(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=zd(a[e],"urn:ebu:tt:style",c);f||(f=Ad(a[e],iE,c));f||(f=CE(a[e],b,c));f&&(d=f)}return d}function oE(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?zd(g,e,b):g.attributes[b])&&(g=g.parent,g););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.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1633
|
+
function qE(a,b,c,d){a=pE(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}}function pE(a,b){var c=EE(a.attributes.begin,b),d=EE(a.attributes.end,b);a=EE(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1634
|
+
function EE(a,b){var c=null;if(FE.test(a)){a=FE.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(GE.test(a))c=HE(GE,a);else if(IE.test(a))c=HE(IE,a);else if(JE.test(a))a=JE.exec(a),c=Number(a[1])/b.frameRate;else if(KE.test(a))a=KE.exec(a),c=Number(a[1])/b.g;else if(LE.test(a))c=HE(LE,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1635
|
+
function HE(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function kE(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Lc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}T("shaka.text.TtmlTextParser",gE);gE.prototype.parseMedia=gE.prototype.parseMedia;gE.prototype.setManifestType=gE.prototype.setManifestType;gE.prototype.setSequenceMode=gE.prototype.setSequenceMode;gE.prototype.parseInit=gE.prototype.parseInit;
|
|
1636
|
+
function jE(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]))}
|
|
1637
|
+
var sE=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,AE=/^(\d{1,4}(?:\.\d+)?|100)%$/,zE=/^(\d+px|\d+em|\d*\.?\d+c)$/,tE=/^(\d+)px (\d+)px$/,FE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,GE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,IE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,JE=/^(\d*(?:\.\d*)?)f$/,KE=/^(\d*(?:\.\d*)?)t$/,LE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),yE=(new Map).set("left",Yd).set("center","center").set("right",
|
|
1638
|
+
"end").set("start",Yd).set("end","end"),xE=(new Map).set("left","line-left").set("center","center").set("right","line-right"),hE=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],iE=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],nE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Re("application/ttml+xml",function(){return new gE});function ME(){this.g=new gE}ME.prototype.parseInit=function(a){var b=!1;(new dh).box("moov",ih).box("trak",ih).box("mdia",ih).box("minf",ih).box("stbl",ih).R("stsd",kh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};ME.prototype.setSequenceMode=function(){};ME.prototype.setManifestType=function(){};
|
|
1639
|
+
ME.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new dh).box("moof",ih).box("traf",ih).R("tfhd",function(y){e=zi(y.reader,y.flags).Nd}).R("trun",function(y){y=Ci(y.reader,y.version,y.flags);y=t(y.gh);for(var z=y.next();!z.done;z=y.next())h.push(z.value.sampleSize||e||0)}).R("subs",function(y){for(var z=y.reader,A=z.T(),C=-1,E=0;E<A;E++){var H=z.T();C+=H;H=z.Ba();for(var B=[],D=0;D<H;D++)1==y.version?B.push(z.T()):B.push(z.Ba()),z.X(),z.X(),z.T();g.set(C,B)}}).box("mdat",
|
|
1640
|
+
nh(function(y){f.push(y)})).parse(a,!1);if(0==f.length)throw new U(2,2,2007);for(var k=pc.apply(jc,x(f)),l=0,m=0;m<h.length;m++){var n=Tb(k,l,h[m]);l+=h[m];var q=g.get(m);if(q&&q.length){n=Tb(n,0,q[0]);for(var r=[],u=q[0],w=1;w<q.length;w++){var v=Tb(a,u,q[w]);v=kc(v);r.push("data:image/png;base64,"+v);u+=q[w]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};T("shaka.text.Mp4TtmlParser",ME);ME.prototype.parseMedia=ME.prototype.parseMedia;
|
|
1641
|
+
ME.prototype.setManifestType=ME.prototype.setManifestType;ME.prototype.setSequenceMode=ME.prototype.setSequenceMode;ME.prototype.parseInit=ME.prototype.parseInit;Re('application/mp4; codecs="stpp"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.im1i"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.im1t"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.im2i"',function(){return new ME});
|
|
1642
|
+
Re('application/mp4; codecs="stpp.ttml.im2t"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.etd1"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new ME});Re('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new ME});Re('application/mp4; codecs="stpp.TTML.im1t"',function(){return new ME});function NE(){this.g="UNKNOWN"}NE.prototype.parseInit=function(){};NE.prototype.setSequenceMode=function(){};NE.prototype.setManifestType=function(a){this.g=a};
|
|
1643
|
+
NE.prototype.parseMedia=function(a,b){a=ac(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new U(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new U(2,2,2E3);a=dd(a[1]);if(null==a)throw new U(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
|
|
1644
|
+
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Xc(e);var f=new Qc;$c(e);Yc(e);for(var g=$c(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
|
|
1645
|
+
h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Yc(e);g=$c(e)}b.push(f)}d=new Map;fe(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
|
|
1646
|
+
(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var r=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
|
|
1647
|
+
r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=oe;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=ae;break;case "italic":m=!0;l.fontStyle=pe;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
|
|
1648
|
+
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Xc(l[0]),g=bd(h),n=Zc(h,/[ \t]+--\x3e[ \t]+/g),k=bd(h),null==g||null==n||null==k)bb("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Rd(g,k,m);Yc(h);for(g=$c(h);g;)OE(l,g,b),Yc(h),g=$c(h);
|
|
1649
|
+
de(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
|
|
1650
|
+
function OE(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ud:a.textAlign=re[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|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1651
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sd);else if(d=/^region:(.*)$/.exec(b)){if(b=PE(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=te[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Xd,a.line=Number(c[1]),c[2]&&(a.lineAlign=te[c[2].toUpperCase()])}
|
|
1652
|
+
function PE(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}T("shaka.text.VttTextParser",NE);NE.prototype.parseMedia=NE.prototype.parseMedia;NE.prototype.setManifestType=NE.prototype.setManifestType;NE.prototype.setSequenceMode=NE.prototype.setSequenceMode;NE.prototype.parseInit=NE.prototype.parseInit;Re("text/vtt",function(){return new NE});Re('text/vtt; codecs="vtt"',function(){return new NE});Re('text/vtt; codecs="wvtt"',function(){return new NE});function QE(){this.g=null}QE.prototype.parseInit=function(a){var b=this,c=!1;(new dh).box("moov",ih).box("trak",ih).box("mdia",ih).R("mdhd",function(d){d=Bi(d.reader,d.version);b.g=d.timescale}).box("minf",ih).box("stbl",ih).R("stsd",kh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new U(2,2,2008);if(!c)throw new U(2,2,2008);};QE.prototype.setSequenceMode=function(){};QE.prototype.setManifestType=function(){};
|
|
1653
|
+
QE.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new U(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new dh).box("moof",ih).box("traf",ih).R("tfdt",function(A){g=!0;c=Ai(A.reader,A.version).baseMediaDecodeTime}).R("tfhd",function(A){l=zi(A.reader,A.flags).Md}).R("trun",function(A){h=!0;d=Ci(A.reader,A.version,A.flags).gh}).box("mdat",nh(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new U(2,2,2008);a=c;for(var m=new ah(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
|
|
1654
|
+
q.value;var r=q.hh||l,u=q.Bf?c+q.Bf:a;a=u+(r||0);var w=0;do{var v=m.T();w+=v;var y=m.T(),z=null;"vttc"==hh(y)?8<v&&(z=m.Ub(v-8)):m.skip(v-8);r&&z&&(v=RE(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(v))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(df)};function RE(a,b,c){var d,e,f;(new dh).box("payl",nh(function(g){d=ac(g)})).box("iden",nh(function(g){e=ac(g)})).box("sttg",nh(function(g){f=ac(g)})).parse(a);return d?SE(d,e,f,b,c):null}
|
|
1655
|
+
function SE(a,b,c,d,e){a=new Rd(d,e,a);de(a);b&&(a.id=b);if(c)for(b=new Xc(c),c=$c(b);c;)OE(a,c,[]),Yc(b),c=$c(b);return a}T("shaka.text.Mp4VttParser",QE);QE.prototype.parseMedia=QE.prototype.parseMedia;QE.prototype.setManifestType=QE.prototype.setManifestType;QE.prototype.setSequenceMode=QE.prototype.setSequenceMode;QE.prototype.parseInit=QE.prototype.parseInit;Re('application/mp4; codecs="wvtt"',function(){return new QE});function TE(){}TE.prototype.parseInit=function(){};TE.prototype.setSequenceMode=function(){};TE.prototype.setManifestType=function(){};TE.prototype.parseMedia=function(a){var b=ac(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 Xc(c[0]),e=bd(d),f=Zc(d,/,/g);d=bd(d);if(null==e||null==f||null==d)throw new U(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rd(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1656
|
+
T("shaka.text.SbvTextParser",TE);TE.prototype.parseMedia=TE.prototype.parseMedia;TE.prototype.setManifestType=TE.prototype.setManifestType;TE.prototype.setSequenceMode=TE.prototype.setSequenceMode;TE.prototype.parseInit=TE.prototype.parseInit;Re("text/x-subviewer",function(){return new TE});function UE(){this.g=new NE}UE.prototype.parseInit=function(){};UE.prototype.setSequenceMode=function(){};UE.prototype.setManifestType=function(){};UE.prototype.parseMedia=function(a,b,c){a=ac(a);a=VE(a);a=Tb(ec(a));return this.g.parseMedia(a,b,c,[])};
|
|
1657
|
+
function VE(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}T("shaka.text.SrtTextParser",UE);UE.srt2webvtt=VE;UE.prototype.parseMedia=UE.prototype.parseMedia;
|
|
1658
|
+
UE.prototype.setManifestType=UE.prototype.setManifestType;UE.prototype.setSequenceMode=UE.prototype.setSequenceMode;UE.prototype.parseInit=UE.prototype.parseInit;Re("text/srt",function(){return new UE});function WE(){}WE.prototype.parseInit=function(){};WE.prototype.setSequenceMode=function(){};WE.prototype.setManifestType=function(){};
|
|
1659
|
+
WE.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=ac(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=XE.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=YE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(ZE);else if("Style"==a){a=f.split(ZE);f={};for(var g=0;g<e.length&&
|
|
1660
|
+
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Qi:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=YE.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(ZE);else if("Dialogue"==f){g=g.split(ZE);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=$E(f.Start);var k=$E(f.End);g=new Rd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Qi=f.Style;(a=d.find(function(l){return function(m){return m.Name==
|
|
1661
|
+
l.Qi}}(a)))&&aF(g,a);e.push(g)}return e};
|
|
1662
|
+
function aF(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=bF(c))a.color=c;if(c=b.BackColour)if(c=bF(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=oe);b.Italic&&(a.fontStyle=pe);b.Underline&&a.textDecoration.push(qe);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Zd;a.textAlign="start";break;case 2:a.displayAlign=Zd;a.textAlign=Ud;break;case 3:a.displayAlign=Zd;a.textAlign="end";break;case 5:a.displayAlign=
|
|
1663
|
+
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Ud;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=Ud;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function bF(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}
|
|
1664
|
+
function $E(a){a=cF.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}T("shaka.text.SsaTextParser",WE);WE.prototype.parseMedia=WE.prototype.parseMedia;WE.prototype.setManifestType=WE.prototype.setManifestType;WE.prototype.setSequenceMode=WE.prototype.setSequenceMode;WE.prototype.parseInit=WE.prototype.parseInit;var XE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,YE=/^\s*([^:]+):\s*(.*)/,ZE=/\s*,\s*/,cF=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
|
|
1665
|
+
Re("text/x-ssa",function(){return new WE});function dF(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Ud:c,qa:a}:null}function eF(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
|
|
1666
|
+
function fF(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1667
|
+
function gF(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1668
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function hF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=hF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Oe(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1669
|
+
p.transmux=function(a,b,c,d){for(var e=Tb(a),f=Oj(e),g=f.length;g<e.length&&!fF(e,g);g++);a=1E3*c.endTime;f=Nj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=eF(e,g);if(!f)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=dF(e,g);if(!k)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));var l=k.Ud+k.qa;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1670
|
+
k.Ud,g+l),size:k.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:a,yb:h},stream:b};d=new Ii([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Oi(d),this.g.set(c,b));c=this.i!==b;d=fj(d);this.i=b;this.h++;return c?(b=pc(b,d),Promise.resolve(b)):
|
|
1671
|
+
Promise.resolve(d)};T("shaka.transmuxer.AacTransmuxer",hF);hF.prototype.transmux=hF.prototype.transmux;hF.prototype.getOriginalMimeType=hF.prototype.getOriginalMimeType;hF.prototype.convertCodecs=hF.prototype.convertCodecs;hF.prototype.isSupported=hF.prototype.isSupported;hF.prototype.destroy=hF.prototype.destroy;we("audio/aac",function(){return new hF("audio/aac")},Ce);function iF(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1672
|
+
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ea:a,qa:e}}
|
|
1673
|
+
function jF(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function kF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=kF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?rb().ee()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1674
|
+
p.transmux=function(a,b,c,d){a=Tb(a);for(var e=Oj(a),f=e.length;f<a.length&&!jF(a,f);f++);var g=1E3*c.endTime;e=Nj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=iF(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ea;k.push({data:a.subarray(f,f+l.qa),size:l.qa,duration:1536,
|
|
1675
|
+
rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});f+=l.qa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Ea:h,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:a,yb:k},stream:b};d=new Ii([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Oi(d),this.g.set(c,b));c=this.i!==b;d=fj(d);this.i=b;this.h++;return c?(b=pc(b,d),Promise.resolve(b)):Promise.resolve(d)};T("shaka.transmuxer.Ac3Transmuxer",kF);
|
|
1676
|
+
kF.prototype.transmux=kF.prototype.transmux;kF.prototype.getOriginalMimeType=kF.prototype.getOriginalMimeType;kF.prototype.convertCodecs=kF.prototype.convertCodecs;kF.prototype.isSupported=kF.prototype.isSupported;kF.prototype.destroy=kF.prototype.destroy;we("audio/ac3",function(){return new kF("audio/ac3")},Ce);function lF(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Qj(a.subarray(b+2));Sj(c,2);Sj(c,3);var d=Tj(c,11)+1<<1,e=Tj(c,2);if(3==e){e=Tj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Tj(c,2);var g=Tj(c,3),h=Tj(c,1);c=Tj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ea:a,qa:d}};function mF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=mF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1677
|
+
p.transmux=function(a,b,c,d){a=Tb(a);for(var e=Oj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Nj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=lF(a,f);if(!l)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ea;k.push({data:a.subarray(f,f+l.qa),
|
|
1678
|
+
size:l.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});f+=l.qa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ab:[],Ea:h,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:a,yb:k},stream:b};d=new Ii([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Oi(d),this.g.set(c,b));c=this.i!==b;d=fj(d);this.i=b;this.h++;return c?(b=pc(b,d),Promise.resolve(b)):Promise.resolve(d)};
|
|
1679
|
+
T("shaka.transmuxer.Ec3Transmuxer",mF);mF.prototype.transmux=mF.prototype.transmux;mF.prototype.getOriginalMimeType=mF.prototype.getOriginalMimeType;mF.prototype.convertCodecs=mF.prototype.convertCodecs;mF.prototype.isSupported=mF.prototype.isSupported;mF.prototype.destroy=mF.prototype.destroy;we("audio/ec3",function(){return new mF("audio/ec3")},Ce);function nF(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new Qj(b.data),d=Yj(c);Yj(c);Yj(c);Vj(c);if(oF.includes(d)&&(d=X(c),3===d&&Sj(c,1),Vj(c),Vj(c),Sj(c,1),Xj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Xj(c)&&(6>e?Zj(c,16):Zj(c,64))}Vj(c);d=X(c);if(0===d)X(c);else if(1===d)for(Sj(c,1),Vj(c),Vj(c),d=X(c),e=0;e<d;e++)Vj(c);Vj(c);Sj(c,1);var f=X(c),g=X(c),h=Tj(c,1);0===h&&Sj(c,1);Sj(c,1);var k=0,l=0,m=0,n=0;
|
|
1680
|
+
Xj(c)&&(k=X(c),l=X(c),m=X(c),n=X(c));e=d=1;if(Xj(c)&&Xj(c)){var q=Yj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=r[q-1],e=u[q-1]):255===q&&(d=Tj(c,16),e=Tj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
|
|
1681
|
+
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Na:a,Wa:d,Xa:e}}
|
|
1682
|
+
function pF(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],w=t(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var y=v.fullData.byteLength,z=new Uint8Array(4);z[0]=y>>24&255;z[1]=y>>16&255;z[2]=y>>8&255;z[3]=y&255;u.push(z);u.push(v.fullData)}e.data=pc.apply(jc,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
|
|
1683
|
+
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var q=!1;n=!0;var r=m.data;l&&4<r.length&&(r=ak(new Qj(r)),2===r||4===r||7===r||9===r)&&(q=!0);q&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=q;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
|
|
1684
|
+
return d}var oF=[100,110,122,244,44,83,86,118,128,138,139,134];function qF(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=rF(b.fullData);a=sF(c.fullData);var f=tF(d.fullData);b=uF(b.fullData,c.fullData,d.fullData,{Sg:e.Sg,wh:e.wh,Cg:a.Cg,Dg:a.Dg,wg:a.wg,Bg:a.Bg,xg:a.xg,yg:a.yg,zg:a.zg,Ag:a.Ag,pg:a.pg,qg:a.qg,rg:a.rg,sg:a.sg,ug:a.ug,vg:a.vg,hg:a.hg,lf:a.lf,fg:a.fg,eg:a.eg,dg:a.dg,Ug:f.Ug});return{height:a.height,width:a.width,
|
|
1685
|
+
Na:b,Wa:a.Mk,Xa:a.Lk}}function rF(a){var b=new Qj(a,!0);Yj(b);Yj(b);Tj(b,4);Tj(b,2);Tj(b,6);a=Tj(b,3);b=Xj(b);return{Sg:a+1,wh:b}}
|
|
1686
|
+
function sF(a){a=new Qj(a,!0);Yj(a);Yj(a);var b=0,c=0,d=0,e=0;Tj(a,4);var f=Tj(a,3);Xj(a);for(var g=Tj(a,2),h=Tj(a,1),k=Tj(a,5),l=Yj(a),m=Yj(a),n=Yj(a),q=Yj(a),r=Yj(a),u=Yj(a),w=Yj(a),v=Yj(a),y=Yj(a),z=Yj(a),A=Yj(a),C=[],E=[],H=0;H<f;H++)C.push(Xj(a)),E.push(Xj(a));if(0<f)for(H=f;8>H;H++)Tj(a,2);for(H=0;H<f;H++)C[H]&&Tj(a,88),E[H]&&Yj(a);X(a);C=X(a);3==C&&Tj(a,1);E=X(a);H=X(a);Xj(a)&&(b+=X(a),c+=X(a),d+=X(a),e+=X(a));var B=X(a),D=X(a),I=X(a);if(Xj(a))for(var K=0;K<=f;K++)X(a),X(a),X(a);else X(a),
|
|
1687
|
+
X(a),X(a);X(a);X(a);X(a);X(a);X(a);X(a);if(Xj(a)&&Xj(a))for(K=0;4>K;K++)for(var J=0;J<(3===K?2:6);J++)if(Xj(a)){var L=Math.min(64,1<<4+(K<<1));1<K&&Wj(a);for(var N=0;N<L;N++)Wj(a)}else X(a);Xj(a);Xj(a);Xj(a)&&(Yj(a),X(a),X(a),Xj(a));K=X(a);for(L=J=0;L<K;L++)if(N=!1,0!==L&&(N=Xj(a)),N){L===K&&X(a);Xj(a);X(a);for(var O=N=0;O<=J;O++){var M=Xj(a),P=!1;M||(P=Xj(a));(M||P)&&N++}J=N}else{O=X(a);N=X(a);J=O+N;for(M=0;M<O;M++)X(a),Xj(a);for(O=0;O<N;O++)X(a),Xj(a)}if(Xj(a))for(K=X(a),J=0;J<K;J++){for(L=0;L<
|
|
1688
|
+
I+4;L++)Tj(a,1);Tj(a,1)}K=I=1;J=0;Xj(a);Xj(a);if(Xj(a)){Xj(a)&&(L=Yj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<L&&16>=L?(I=N[L-1],K=O[L-1]):255===L&&(I=Tj(a,16),K=Tj(a,16)));Xj(a)&&Xj(a);Xj(a)&&(Tj(a,3),Xj(a),Xj(a)&&(Yj(a),Yj(a),Yj(a)));Xj(a)&&(X(a),X(a));Xj(a);Xj(a);Xj(a);if(L=Xj(a))X(a),X(a),X(a),X(a);if(Xj(a)&&(Tj(a,32),Tj(a,32),Xj(a)&&X(a),Xj(a))){O=!1;L=Xj(a);N=Xj(a);if(L||N){if(O=Xj(a))Yj(a),Tj(a,5),Xj(a),Tj(a,5);Tj(a,4);Tj(a,4);O&&
|
|
1689
|
+
Tj(a,4);Tj(a,5);Tj(a,5);Tj(a,5)}for(M=0;M<=f;M++){var R=!0;P=1;Xj(a)||(R=Xj(a));var S=!1;R?X(a):S=Xj(a);S||(P=X(a)+1);if(L){for(R=0;R<P;R++)X(a),X(a),O&&(X(a),X(a));Xj(a)}if(N){for(R=0;R<P;R++)X(a),X(a),O&&(X(a),X(a));Xj(a)}}}Xj(a)&&(Xj(a),Xj(a),Xj(a),J=X(a),X(a),X(a),X(a),X(a))}return{wg:A,Cg:g,Dg:h,Bg:k,xg:l,yg:m,zg:n,Ag:q,pg:r,qg:u,rg:w,sg:v,ug:y,vg:z,lf:J,hg:0,fg:C,eg:B,dg:D,width:E-(b+c)*(1===C||2===C?2:1),height:H-(d+e)*(1===C?2:1),Mk:I,Lk:K}}
|
|
1690
|
+
function tF(a){var b=new Qj(a,!0);Yj(b);Yj(b);X(b);X(b);Xj(b);Xj(b);Tj(b,3);Xj(b);Xj(b);X(b);X(b);Wj(b);Xj(b);Xj(b);Xj(b)&&X(b);Wj(b);Wj(b);Xj(b);Xj(b);Xj(b);Xj(b);a=Xj(b);b=Xj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Ug:c}}
|
|
1691
|
+
function uF(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Cg&3)<<6|(d.Dg?1:0)<<5|d.Bg&31;e[2]=d.xg;e[3]=d.yg;e[4]=d.zg;e[5]=d.Ag;e[6]=d.pg;e[7]=d.qg;e[8]=d.rg;e[9]=d.sg;e[10]=d.ug;e[11]=d.vg;e[12]=d.wg;e[13]=240|(d.lf&3840)>>8;e[14]=d.lf&255;e[15]=252|d.Ug&3;e[16]=252|d.fg&3;e[17]=248|d.eg&7;e[18]=248|d.dg&7;e[19]=0;e[20]=0;e[21]=(d.hg&3)<<6|(d.Sg&7)<<3|(d.wh?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1692
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function vF(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*wF[14*(3===c?3-d:3===d?3:4)+e-1];f=xF[3*(3===c?0:2===c?1:2)+f];c=yF[c][d];var h=zF[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,qa:k,Kk:8*c*h}}return null}
|
|
1693
|
+
function AF(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function BF(a,b){if(b+1<a.length&&AF(a,b)){var c=vF(a,b),d=4;c&&c.qa&&(d=c.qa);b+=d;return b===a.length||b+1<a.length&&AF(a,b)}return!1}
|
|
1694
|
+
var wF=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],xF=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],yF=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],zF=[0,1,1,4];function CF(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=CF.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?Ec(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.j};
|
|
1695
|
+
p.transmux=function(a,b,c,d){for(var e=Tb(a),f=Oj(e).length;f<e.length&&!BF(e,f);f++);var g;for(a=[];f<e.length;){var h=vF(e,f);if(!h)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));g||(g=h);f+h.qa<=e.length&&a.push({data:e.subarray(f,f+h.qa),size:h.qa,duration:1152,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});f+=h.qa}if(!g)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));e=9E4*g.Kk/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1696
|
+
duration:d,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:a},stream:b};d=new Ii([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Oi(d),this.g.set(c,b));c=this.i!==b;d=fj(d);this.i=b;this.h++;return c?(b=pc(b,d),Promise.resolve(b)):Promise.resolve(d)};T("shaka.transmuxer.Mp3Transmuxer",CF);CF.prototype.transmux=CF.prototype.transmux;CF.prototype.getOriginalMimeType=CF.prototype.getOriginalMimeType;CF.prototype.convertCodecs=CF.prototype.convertCodecs;
|
|
1697
|
+
CF.prototype.isSupported=CF.prototype.isSupported;CF.prototype.destroy=CF.prototype.destroy;we("audio/mpeg",function(){return new CF("audio/mpeg")},Ce);function DF(a){this.h=a;this.g=null}p=DF.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Oe(a).split(","),c=uc("audio",b);b=uc("video",b);return!c||b||"mp3"!=Je(c)?!1:Ec(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1698
|
+
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new bk;this.g.Ff(c.i);a=Tb(a);a=this.g.parse(a);if("mp3"!=a.Od().audio||"audio"!=e)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));c=new Uint8Array([]);e=t(a.sb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=vF(a,b))?(b+d.qa<=a.length&&(c=pc(c,a.subarray(b,b+d.qa))),b+=d.qa):b++;return Promise.resolve(c)};T("shaka.transmuxer.MpegTsTransmuxer",DF);DF.prototype.transmux=DF.prototype.transmux;
|
|
1699
|
+
DF.prototype.getOriginalMimeType=DF.prototype.getOriginalMimeType;DF.prototype.convertCodecs=DF.prototype.convertCodecs;DF.prototype.isSupported=DF.prototype.isSupported;DF.prototype.destroy=DF.prototype.destroy;we("video/mp2t",function(){return new DF("video/mp2t")},Be);/*
|
|
1700
|
+
@license
|
|
1701
|
+
MSS Transmuxer
|
|
1702
|
+
Copyright 2015 Dash Industry Forum
|
|
1703
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
1704
|
+
*/
|
|
1705
|
+
function EF(a){this.h=a;(this.g=xx.get("ISOBoxer")())&&FF(this)}
|
|
1706
|
+
function FF(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1707
|
+
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1708
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==GF[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=EF.prototype;p.destroy=function(){};
|
|
1709
|
+
p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Ec(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ec(b)||Ec(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
|
|
1710
|
+
p.transmux=function(a,b,c){if(!c)return Promise.resolve(Tb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.O()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
|
|
1711
|
+
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
|
|
1712
|
+
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=HF(u,"traf")+HF(h,"senc")+16);var v=Tb(e.write());return Promise.resolve(v)}catch(y){return y instanceof U?Promise.reject(y):Promise.reject(new U(2,3,3022,c?c.O()[0]:null))}};function HF(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}T("shaka.transmuxer.MssTransmuxer",EF);EF.prototype.transmux=EF.prototype.transmux;
|
|
1713
|
+
EF.prototype.getOriginalMimeType=EF.prototype.getOriginalMimeType;EF.prototype.convertCodecs=EF.prototype.convertCodecs;EF.prototype.isSupported=EF.prototype.isSupported;EF.prototype.destroy=EF.prototype.destroy;var GF=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);we("mss/audio/mp4",function(){return new EF("mss/audio/mp4")},Ce);we("mss/video/mp4",function(){return new EF("mss/video/mp4")},Ce);function IF(a){this.m=a;this.g=0;this.j=new Map;this.l=this.i=this.h=null}p=IF.prototype;p.destroy=function(){this.j.clear();this.i&&this.i.destroy()};
|
|
1714
|
+
p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Oe(c).split(",");c=uc("audio",d);d=uc("video",d);if(c&&(c=Je(c),!JF.includes(c))||d&&(c=Je(d),!KF.includes(c)))return!1;if(b)return Ec(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Ec(b)||Ec(a)};
|
|
1715
|
+
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Oe(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Hf(c,"audio/mp4")}).map(If).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.getOriginalMimeType=function(){return this.m};
|
|
1716
|
+
p.transmux=function(a,b,c,d,e){var f=Tb(a);if("audio"==e&&!rk(f)){for(var g=Oj(f),h=g.length;h<f.length;h++)if(BF(f,h))return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));for(h=g.length;h<f.length;h++)if(fF(f,h))return this.i||(this.i=new hF("audio/aac")),this.i.transmux(a,b,c,d,e);return Promise.reject(new U(2,3,3018,c?c.O()[0]:null))}this.h?this.h.clearData():this.h=new bk;this.h.Ff(c.i);var k=this.h.parse(f),l=[],m=k.Od();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],r=null,
|
|
1717
|
+
u=k.Rc(),w=pF(u);if(!w.length)throw new U(2,3,3023,c?c.O()[0]:null);for(var v=0;v<w.length;v++){var y=w[v];null==r&&(r=y.dts);var z=void 0;z=v+1<w.length?(w[v+1].dts||0)-(y.dts||0):1<w.length?(y.dts||0)-(w[v-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:y.data,size:y.data.byteLength,duration:z,rb:Math.round((y.pts||0)-(y.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:y.isKeyframe?2:1,xb:y.isKeyframe?0:1}})}for(var A=[],C=t(u),E=C.next();!E.done;E=C.next())A.push.apply(A,x(E.value.nalus));var H=nF(A);
|
|
1718
|
+
if(!H||null==r)throw new U(2,3,3018,c?c.O()[0]:null);b.height=H.height;b.width=H.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ab:[],Ea:new Uint8Array([]),Na:H.Na,Wa:H.Wa,Xa:H.Xa,data:{Vb:this.g,baseMediaDecodeTime:r,yb:q},stream:b};break;case "hvc":var B=[],D=null,I=[],K=k.Rc();if(!K.length)throw new U(2,3,3023,c?c.O()[0]:null);for(var J=0;J<K.length;J++){var L=K[J],N=L.nalus;I.push.apply(I,x(N));for(var O=!1,M=[],P=!1,R=t(N),S=R.next();!S.done;S=
|
|
1719
|
+
R.next()){var ba=S.value;switch(ba.type){case 1:case 0:var W=P=!0;break;case 19:case 20:case 21:O=W=P=!0;break;case 32:W=!0;break;case 33:W=!0;break;case 34:W=!0;break;case 35:P=W=!0;break;case 39:case 40:W=!0;break;default:W=!1}if(P&&W){var Fa=ba.fullData.byteLength,Ga=new Uint8Array(4);Ga[0]=Fa>>24&255;Ga[1]=Fa>>16&255;Ga[2]=Fa>>8&255;Ga[3]=Fa&255;M.push(Ga);M.push(ba.fullData)}}var za=M.length?{data:pc.apply(jc,x(M)),isKeyframe:O}:null;if(za){null==D&&null!=L.dts&&(D=L.dts);var na=void 0;na=J+
|
|
1720
|
+
1<K.length?(K[J+1].dts||0)-(L.dts||0):1<K.length?(L.dts||0)-(K[J-1].dts||0):9E4*(c.endTime-c.startTime);B.push({data:za.data,size:za.data.byteLength,duration:na,rb:Math.round((L.pts||0)-(L.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:za.isKeyframe?2:1,xb:za.isKeyframe?0:1}})}}var va=qF(I);if(!va||null==D)throw new U(2,3,3018,c?c.O()[0]:null);b.height=va.height;b.width=va.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Ab:[],Ea:new Uint8Array([]),
|
|
1721
|
+
Na:va.Na,Wa:va.Wa,Xa:va.Xa,data:{Vb:this.g,baseMediaDecodeTime:D,yb:B},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ia=[],ta,ra=null,wa=null,Za=null,$a=t(k.sb()),ib=$a.next();!ib.done;ib=$a.next()){var qb=ib.value,mb=qb.data;if(mb){var Na=0;if(-1==wa&&Za)mb=pc(Za,qb.data),wa=null;else if(null!=wa&&Za){Na=Math.max(0,wa);var Td=pc(Za,mb.subarray(0,Na));Ia.push({data:Td,size:Td.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});wa=Za=null}ta=eF(mb,
|
|
1722
|
+
Na);if(!ta)throw new U(2,3,3018,c?c.O()[0]:null);b.audioSamplingRate=ta.sampleRate;b.channelsCount=ta.channelCount;null==ra&&null!==qb.pts&&(ra=qb.pts);for(;Na<mb.length;){var gc=dF(mb,Na);if(!gc){Za=mb.subarray(Na,mb.length);wa=-1;break}var ee=gc.Ud+gc.qa;wa=Math.max(0,Na+ee-mb.length);0!=wa?Za=mb.subarray(Na+gc.Ud,Na+ee):Na+ee<=mb.length&&Ia.push({data:mb.subarray(Na+gc.Ud,Na+ee),size:gc.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});Na+=ee}}}if(!ta||null==ra){if(!k.Rc().length)throw new U(2,
|
|
1723
|
+
3,3018,c?c.O()[0]:null);ra=9E4*c.startTime;var Lf=uc("audio",b.codecs.split(","));if(!Lf||!b.channelsCount||!b.audioSamplingRate)throw new U(2,3,3018,c?c.O()[0]:null);ta={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Lf};var Mf=gF(Lf,b.channelsCount);if(!Mf)throw new U(2,3,3018,c?c.O()[0]:null);for(var ad=ra+9E4*(c.endTime-c.startTime),sw=ra;sw<ad;)Ia.push({data:Mf,size:Mf.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),sw+=1024/ta.sampleRate*9E4}var tw=ta.sampleRate,
|
|
1724
|
+
MF=ra/9E4*tw;n={id:b.id,type:"audio",codecs:ta.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:tw,duration:d,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:MF,yb:Ia},stream:b};break;case "ac3":for(var uw=[],hk=0,ho=new Uint8Array([]),ik=null,vw=t(k.sb()),io=vw.next();!io.done;io=vw.next()){var jo=io.value,ko=jo.data;null==ik&&null!==jo.pts&&(ik=jo.pts);for(var Tf=0;Tf<ko.length;){var ge=iF(ko,Tf);ge?(b.audioSamplingRate=ge.sampleRate,b.channelsCount=
|
|
1725
|
+
ge.channelCount,hk=ge.sampleRate,ho=ge.Ea,uw.push({data:ko.subarray(Tf,Tf+ge.qa),size:ge.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Tf+=ge.qa):Tf++}}if(0==hk||0==ho.byteLength||null==ik)throw new U(2,3,3018,c?c.O()[0]:null);var NF=ik/9E4*hk;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:hk,duration:d,Ab:[],Ea:ho,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:NF,yb:uw},stream:b};break;case "ec3":for(var ww=[],jk=0,
|
|
1726
|
+
lo=new Uint8Array([]),kk=null,xw=t(k.sb()),mo=xw.next();!mo.done;mo=xw.next()){var no=mo.value,oo=no.data;null==kk&&null!==no.pts&&(kk=no.pts);for(var Uf=0;Uf<oo.length;){var he=lF(oo,Uf);he?(b.audioSamplingRate=he.sampleRate,b.channelsCount=he.channelCount,jk=he.sampleRate,lo=he.Ea,ww.push({data:oo.subarray(Uf,Uf+he.qa),size:he.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Uf+=he.qa):Uf++}}if(0==jk||0==lo.byteLength||null==kk)throw new U(2,3,3018,c?c.O()[0]:null);var OF=kk/9E4*jk;
|
|
1727
|
+
n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:jk,duration:d,Ab:[],Ea:lo,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:OF,yb:ww},stream:b};break;case "mp3":for(var yw=[],lk,mk=null,zw=t(k.sb()),po=zw.next();!po.done;po=zw.next()){var qo=po.value,uh=qo.data;if(uh){null==mk&&null!==qo.pts&&(mk=qo.pts);for(var Me=0;Me<uh.length;){var Vf=vF(uh,Me);Vf?(lk||(lk=Vf),Me+Vf.qa<=uh.length&&yw.push({data:uh.subarray(Me,Me+Vf.qa),size:Vf.qa,duration:1152,
|
|
1728
|
+
rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Me+=Vf.qa):Me++}}}if(!lk||null==mk)throw new U(2,3,3018,c?c.O()[0]:null);var Aw=lk.sampleRate,PF=mk/9E4*Aw;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aw,duration:d,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:PF,yb:yw},stream:b};break;case "opus":var Bw=[],nk=null,jd=k.G;if(!jd)throw new U(2,3,3018,c?c.O()[0]:null);var Wb=[];switch(jd.jj){case 1:case 2:Wb=
|
|
1729
|
+
[0];break;case 0:Wb=[255,1,1,0,1];break;case 128:Wb=[255,2,0,0,1];break;case 3:Wb=[1,2,1,0,2,1];break;case 4:Wb=[1,2,2,0,1,2,3];break;case 5:Wb=[1,3,2,0,4,1,2,3];break;case 6:Wb=[1,4,2,0,4,1,2,3,5];break;case 7:Wb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Wb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Wb=[1,1,2,0,1];break;case 131:Wb=[1,1,3,0,1,2];break;case 132:Wb=[1,1,4,0,1,2,3];break;case 133:Wb=[1,1,5,0,1,2,3,4];break;case 134:Wb=[1,1,6,0,1,2,3,4,5];break;case 135:Wb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Wb=
|
|
1730
|
+
[1,1,8,0,1,2,3,4,5,6,7]}var Cw=new Uint8Array([0,jd.channelCount,0,0,jd.sampleRate>>>24&255,jd.sampleRate>>>17&255,jd.sampleRate>>>8&255,jd.sampleRate>>>0&255,0,0].concat(x(Wb)));for(var Dw=jd.sampleRate,Ew=t(k.sb()),ro=Ew.next();!ro.done;ro=Ew.next()){var so=ro.value,Wf=so.data;null==nk&&null!==so.pts&&(nk=so.pts);for(var vh=0;vh<Wf.length;){for(var QF=0!==(Wf[vh+1]&16),RF=0!==(Wf[vh+1]&8),Kd=vh+2,ok=0;255===Wf[Kd];)ok+=255,Kd+=1;ok+=Wf[Kd];Kd+=1;Kd+=QF?2:0;Kd+=RF?2:0;var Fw=Wf.slice(Kd,Kd+ok);Bw.push({data:Fw,
|
|
1731
|
+
size:Fw.byteLength,duration:960,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}});vh=Kd+ok}}if(0==Cw.byteLength||null==nk)throw new U(2,3,3018,c?c.O()[0]:null);b.audioSamplingRate=jd.sampleRate;b.channelsCount=jd.channelCount;var SF=nk/9E4*Dw;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Dw,duration:d,Ab:[],Ea:Cw,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:SF,yb:Bw},stream:b}}n&&(l.push(n),n=null)}}catch(to){return to&&3023==to.code?
|
|
1732
|
+
Promise.resolve(new Uint8Array([])):Promise.reject(to)}if(!l.length)return Promise.reject(new U(2,3,3018,c?c.O()[0]:null));var Gw=new Ii(l),uo=b.id+"_"+c.i;if(this.j.has(uo))var wh=this.j.get(uo);else wh=Oi(Gw),this.j.set(uo,wh);var TF=this.l!==wh,Hw=fj(Gw);this.l=wh;this.g++;if(TF){var UF=pc(wh,Hw);return Promise.resolve(UF)}return Promise.resolve(Hw)};T("shaka.transmuxer.TsTransmuxer",IF);IF.prototype.transmux=IF.prototype.transmux;IF.prototype.getOriginalMimeType=IF.prototype.getOriginalMimeType;
|
|
1733
|
+
IF.prototype.convertCodecs=IF.prototype.convertCodecs;IF.prototype.isSupported=IF.prototype.isSupported;IF.prototype.destroy=IF.prototype.destroy;var JF=["aac","ac-3","ec-3","mp3","opus"],KF=["avc","hevc"];we("video/mp2t",function(){return new IF("video/mp2t")},Ae);function LF(){}pa(LF,on);T("shaka.util.FairPlayUtils",LF);}).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})();
|
|
1734
|
+
|
|
1735
|
+
//# sourceMappingURL=shaka-player.compiled.map
|