PageSourceSearch

https://www.dolby.com/Static/Core/Js/vendors~shaka-player.min.js?v=1787147001

js dolby.com collected 2026-09-24 09:12:27 UTC 902,301 bytes, 1 lines download raw bytes

1(self.webpackChunkdolby_labs_web=self.webpackChunkdolby_labs_web||[]).push([[154],{89545:function(e,t,n){function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},i.apply(null,arguments)}!function(){var e="undefined"!=typeof window?window:n.g,r={};for(var a in function(e,t,n){var r;function a(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var s=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function u(e,t){if(t)e:{var n=s;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&o(n,e,{configurable:!0,writable:!0,value:t})}}function l(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function c(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:a(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function d(e){if(!(e instanceof Array)){e=c(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}u("Symbol",function(e){function t(e,t){this.g=e,o(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),u("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=s[t[n]];"function"==typeof i&&"function"!=typeof i.prototype[e]&&o(i.prototype,e,{configurable:!0,writable:!0,value:function(){return l(a(this))}})}return e});var h,p="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)h=Object.setPrototypeOf;else{var f;e:{var g={};try{g.__proto__={a:!0},f=g.a;break e}catch(e){}f=!1}h=f?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var m=h;function v(e,t){if(e.prototype=p(t.prototype),e.prototype.constructor=e,m)m(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Kn=t.prototype}function y(){this.s=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.B=this.i=null}function b(e){if(e.s)throw new TypeError("Generator is already running");e.s=!0}function T(e,t){e.i={Mi:t,Yi:!0},e.g=e.m||e.j}function S(e,t,n){return e.g=n,{value:t}}function w(e){e.g=0}function A(e,t,n){e.m=t,null!=n&&(e.j=n)}function E(e,t){e.m=0,e.j=t||0}function x(e,t,n){e.g=t,e.m=n||0}function k(e,t){return e.m=t||0,t=e.i.Mi,e.i=null,t}function I(e){e.B=[e.i],e.m=0,e.j=0}function C(e,t){var n=e.B.splice(0)[0];(n=e.i=e.i||n)?n.Yi?e.g=e.m||e.j:null!=n.A&&e.j<n.A?(e.g=n.A,e.i=null):e.g=e.j:e.g=t}function M(e){this.g=new y,this.h=e}function L(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.s=!1,r;var a=r.value}catch(t){return e.g.l=null,T(e.g,t),R(e)}
vendor: 5,374 bytes, line 1
1return e.g.l=null,i.call(e.g,a),R(e)}function R(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.s=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,T(e.g,t)}if(e.g.s=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Yi)throw t.Mi;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function P(e){this.next=function(t){return b(e.g),e.g.l?t=L(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=R(e)),t},this.throw=function(t){return b(e.g),e.g.l?t=L(e,e.g.l.throw,t,e.g.u):(T(e.g,t),t=R(e)),t},this.return=function(t){return function(e,t){b(e.g);var n=e.g.l;return n?L(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),R(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function D(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise(function(i,r){!function e(a){a.done?i(a.value):Promise.resolve(a.value).then(t,n).then(e,r)}(e.next())})}(new P(new M(e)))}function N(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function O(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function U(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function j(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var a=e[r];if(t.call(n,a,r,e))return{Vi:r,v:a}}return{Vi:-1,v:void 0}}y.prototype.u=function(e){this.h=e},y.prototype.return=function(e){this.i={return:e},this.g=this.j},y.prototype.A=function(e){this.g=e},u("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.s=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t(function(t){t(e)})}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i(function(){t.l()})}this.g.push(e)};var r=s.setTimeout;n.prototype.i=function(e){r(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i(function(){throw e})},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.I(t,e):this.m(e)},t.prototype.l=function(e){this.u(2,e)},t.prototype.m=function(e){this.u(1,e)},t.prototype.u=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.B()},t.prototype.G=function(){var e=this;r(function(){if(e.C()){var t=s.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.C=function(){if(this.s)return!1;var e=s.CustomEvent,t=s.Event,n=s.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=s.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.B=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.cf(t.resolve,t.reject)},t.prototype.I=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t(function(e,t){r=e,a=t});return this.cf(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.cf=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.s=!0},t.resolve=i,t.reject=function(e){return new t(function(t,n){n(e)})},t.race=function(e){return new t(function(t,n){for(var r=c(e),a=r.next();!a.done;a=r.next())i(a.value).cf(t,n)})},t.all=function(e){var n=c(e),r=n.next();return r.done?i([]):new t(function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,i(r.value).cf(a(o.length-1),t),r=n.next()}while(!r.done)})},t}),u("WeakMap",function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=c(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){if(!_(e,s)){var t=new n;o(e,s,{value:t})}}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([[t,2],[n,3]]);return 2==i.get(t)&&3==i.get(n)&&(i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var u=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!_(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&_(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&_(e,s)&&_(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&_(e,s)&&_(e[s],this.g))&&delete e[s][this.g]},t}),u("Map",function(e){function t(){var e={};return e.zc=e.next=e.head=e}function n(e,t){var n=e[1];return l(function(){if(n){for(;n.head!=e[1];)n=n.zc;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}})}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e[0][n];if(i&&_(e[0],n))for(e=0;e<i.length;e++){var r=i[e];if(t!=t&&r.key!=r.key||t===r.key)return{id:n,list:i,index:e,entry:r}}return{id:n,list:i,index:-1,entry:void 0}}function r(e){if(this[0]={},this[1]=t(),this.size=0,e){e=c(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(c([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&"s"==r.value[1]&&!((r=i.next()).done||4!=r.value[0].x||"t"!=r.value[1]||!i.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this[0][n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this[1],zc:this[1].zc,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].zc.next=n.entry,this[1].zc=n.entry,this.size++),this},r.prototype.delete=function(e){return!(!(e=i(this,e)).entry||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.zc.next=e.entry.next,e.entry.next.zc=e.entry.zc,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].zc=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).entry},r.prototype.get=function(e){return(e=i(this,e).entry)&&e.value},r.prototype.entries=function(){return n(this,function(e){return[e.key,e.value]})},r.prototype.keys=function(){return n(this,function(e){return e.key})},r.prototype.values=function(){return n(this,function(e){return e.value})},r.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var o=0;return r}),u("Array.prototype.keys",function(e){return e||function(){return O(this,function(e){return e})}}),u("Set",function(e){function t(e){if(this.g=new Map,e){e=c(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(c([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&r.value[1]==t&&(!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach(function(i){return e.call(t,i,i,n)})},t)}),u("Array.prototype.values",function(e){return e||function(){return O(this,function(e,t){return t})}}),u("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),u("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),u("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for(0>(t=t||0)&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}),u("String.prototype.includes",function(e){return e||function(e,t){return-1!==U(this,e,"includes").indexOf(e,t||0)}}),u("String.fromCodePoint",function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var i=Number(arguments[n]);if(0>i||1114111<i||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);65535>=i?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(i>>>10&1023|55296),t+=String.fromCharCode(1023&i|56320))}return t}}),u("Array.prototype.findIndex",function(e){return e||function(e,t){return j(this,e,t).Vi}}),u("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=c(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([t]);return!(!i.has(t)||i.has(n))&&(i.delete(t),i.add(n),!i.has(t)&&i.has(n))}catch(e){return!1}}()?e:(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t)}),u("Array.prototype.find",function(e){return e||function(e,t){return j(this,e,t).v}}),u("String.prototype.startsWith",function(e){return e||function(e,t){var n=U(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}}),u("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)_(e,t)&&n.push([t,e[t]]);return n}});var B="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)_(i,r)&&(e[r]=i[r])}return e};function F(e){if(0>(e=Math.trunc(e)||0)&&(e+=this.length),!(0>e||e>=this.length))return this[e]}function V(e){return e||F}u("Object.assign",function(e){return e||B}),u("Promise.prototype.finally",function(e){return e||function(e){return this.then(function(t){return Promise.resolve(e()).then(function(){return t})},function(t){return Promise.resolve(e()).then(function(){throw t})})}}),u("Array.prototype.entries",function(e){return e||function(){return O(this,function(e,t){return[e,t]})}}),u("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),u("String.prototype.repeat",function(e){return e||function(e){var t=U(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),u("Number.EPSILON",function(){return Math.pow(2,-52)}),u("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),u("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}}),u("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)_(e,t)&&n.push(e[t]);return n}}),u("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),u("String.prototype.endsWith",function(e){return e||function(e,t){var n=U(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var i=e.length;0<i&&0<t;)if(n[--t]!=e[--i])return!1;return 0>=i}}),u("Math.trunc",function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}}),u("Array.prototype.at",function(e){return e||F}),u("Int8Array.prototype.at",V),u("Uint8Array.prototype.at",V),u("Uint8ClampedArray.prototype.at",V),u("Int16Array.prototype.at",V),u("Uint16Array.prototype.at",V),u("Int32Array.prototype.at",V),u("Uint32Array.prototype.at",V),u("Float32Array.prototype.at",V),u("Float64Array.prototype.at",V),u("String.prototype.at",function(e){return e||F});var G=this||self;function H(e,t){e=e.split(".");var n,i=G;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function z(t,n){if(n)if(n instanceof Map)for(var i=c(n.keys()),r=i.next();!r.done;r=i.next())r=r.value,Object.defineProperty(this,r,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function K(e){var t,n=new z(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}z.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},z.prototype.stopImmediatePropagation=function(){this.g=!0},z.prototype.stopPropagation=function(){},H("shaka.util.FakeEvent",z);var W={wm:"abrstatuschanged",xm:"adaptation",ym:"audiotrackchanged",zm:"audiotrackschanged",Am:"boundarycrossed",Bm:"buffering",Cm:"canupdatestarttime",Dm:"complete",Em:"currentitemchanged",Fm:"downloadcompleted",Gm:"downloadfailed",Hm:"downloadheadersreceived",Im:"drmsessionupdate",Km:"emsg",Qm:"itemsinserted",Rm:"itemsremoved",jn:"prft",Error:"error",Lm:"expirationupdated",Mm:"firstquartile",Nm:"gapjumped",Sm:"keystatuschanged",Wm:"loaded",Xm:"loading",Zm:"manifestparsed",$m:"manifestupdated",an:"mediaqualitychanged",cn:"mediasourcerecovered",dn:"metadataadded",Metadata:"metadata",fn:"midpoint",gn:"nospatialvideoinfo",hn:"onstatechange",ln:"ratechange",on:"segmentappended",pn:"sessiondata",qn:"spatialvideoinfo",rn:"stalldetected",sn:"started",tn:"statechanged",un:"streaming",vn:"textchanged",wn:"texttrackvisibility",xn:"thirdquartile",yn:"timelineregi
1onadded",zn:"timelineregionenter",An:"timelineregionexit",Bn:"trackschanged",Dn:"unloading",Fn:"variantchanged"};function q(){}function X(){}function Y(){}function J(e){var t=N.apply(1,arguments);$.has(e)||($.add(e),Y.apply(q,d(t)))}function Q(){}var $=new Set;function Z(){this.g=new Map}function ee(){this.fb=new Z,this.Qe=this}function te(e,t){for(var n=[],i=(e=c(e)).next();!i.done;i=e.next())n.push(t(i.value));return n}function ne(e,t){for(var n=(e=c(e)).next();!n.done;n=e.next())if(t(n.value))return!0;return!1}function ie(e,t){for(var n=[],i=(e=c(e)).next();!i.done;i=e.next())t(i=i.value)&&n.push(i);return n}e.console&&((new Map).set(1,function(){return console.error.apply(console,d(N.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,d(N.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,d(N.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,d(N.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,d(N.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,d(N.apply(0,arguments)))}),Y=function(){return console.warn.apply(console,d(N.apply(0,arguments)))},X=function(){console.error.apply(console,d(N.apply(0,arguments)))}),(r=Z.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},r.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},r.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(e){return e!=t});this.g.set(e,n),n.length||this.g.delete(e)}},r.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},r.size=function(){return this.g.size},r.keys=function(){return Array.from(this.g.keys())},ee.prototype.addEventListener=function(e,t){this.fb&&this.fb.push(e,t)},ee.prototype.removeEventListener=function(e,t){this.fb&&this.fb.remove(e,t)},ee.prototype.dispatchEvent=function(e){if(!this.fb)return!0;var t=this.fb.get(e.type)||[],n=this.fb.get("All");for(n&&(t=t.concat(n)),n=(t=c(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Qe,e.currentTarget=this.Qe;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},ee.prototype.release=function(){this.fb=null};var re=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function ae(e){var t;e instanceof ae?(oe(this,e.hc),this.qd=e.qd,se(this,e.Gb),ue(this,e.Id),this.ub=e.ub,le(this,e.g.clone()),this.Yc=e.Yc):e&&(t=String(e).match(re))?(oe(this,t[1]||"",!0),this.qd=ce(t[2]||""),se(this,t[3]||"",!0),ue(this,t[4]),this.ub=ce(t[5]||"",!0),le(this,t[6]||"",!0),this.Yc=ce(t[7]||"")):this.g=new ye(null)}function oe(e,t,n){e.hc=n?ce(t,!0):t,e.hc&&(e.hc=e.hc.replace(/:$/,""))}function se(e,t,n){e.Gb=n?ce(t,!0):t}function ue(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Id=t}else e.Id=null}function le(e,t,n){t instanceof ye?e.g=t:(n||(t=de(t,me)),e.g=new ye(t))}function ce(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function de(e,t,n){return null!=e?(e=encodeURI(e).replace(t,he),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function he(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(r=ae.prototype).hc="",r.qd="",r.Gb="",r.Id=null,r.ub="",r.Yc="",r.toString=function(){var e=[],t=this.hc;if(t&&e.push(de(t,pe,!0),":"),t=this.Gb){e.push("//");var n=this.qd;n&&e.push(de(n,pe,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Id)&&e.push(":",String(t))}return(t=this.ub)&&(this.Gb&&"/"!=t.charAt(0)&&e.push("/"),e.push(de(t,"/"==t.charAt(0)?ge:fe,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Yc)&&e.push("#",de(t,ve)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.hc&&(t=new ae);var n=!!e.hc;n?oe(t,e.hc):n=!!e.qd,n?t.qd=e.qd:n=!!e.Gb,n?se(t,e.Gb):n=null!=e.Id;var i=e.ub;if(n)ue(t,e.Id);else if(n=!!e.ub){if("/"!=i.charAt(0))if(this.Gb&&!this.ub)i="/"+i;else{var r=t.ub.lastIndexOf("/");-1!=r&&(i=t.ub.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.ub=i:n=""!==e.g.toString(),n?le(t,e.g.clone()):n=!!e.Yc,n&&(t.Yc=e.Yc),t},r.clone=function(){return new ae(this)};
1var pe=/[#\/\?@]/g,fe=/[#\?:]/g,ge=/[#\?]/g,me=/[#\?@]/g,ve=/#/g;function ye(e){this.g=e||null}function be(e){if(!e.kb&&(e.kb=new Map,e.Xd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),r=r||"",e.add(a,decodeURIComponent(r.replace(/\+/g," ")))}}function Te(e){return be(e),e.Xd}function Se(){}function we(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=Ee(e);t=Ee(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function Ae(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Ee(e,t,n){return Ie(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function xe(e,t,n){return Ie(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function ke(e,t,n){return Ie(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function Ie(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,a=1;"BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function Ce(e,t,n){var i=N.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,Me)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(r=ye.prototype).kb=null,r.Xd=null,r.add=function(e,t){be(this),this.g=null;var n=this.kb.has(e)?this.kb.get(e):null;return n||this.kb.set(e,n=[]),n.push(t),this.Xd++,this},r.set=function(e,t){return be(this),this.g=null,this.kb.has(e)?this.kb.set(e,[t]):this.add(e,t),this},r.get=function(e){return be(this),this.kb.get(e)||[]},r.toString=function(){if(this.g)return this.g;if(!this.kb||!this.kb.size)return"";for(var e=[],t=c(this.kb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.kb.get(i);for(var r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),e.push(a)}}return this.g=e.join("&")},r.clone=function(){var e=new ye;if(e.g=this.g,this.kb){for(var t=new Map,n=c(this.kb),i=n.next();!i.done;i=n.next()){var r=c(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.kb=t,e.Xd=this.Xd}return e},H("shaka.util.BufferUtils",Se),Se.toDataView=ke,Se.toUint16=xe,Se.toUint8=Ee,Se.toArrayBuffer=Ae,Se.equal=we,Ce.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},H("shaka.util.Error",Ce);var Me=!0;function Le(e){this.h=e,this.g=void 0}function Re(){return Ne.value()}Ce.Severity={RECOVERABLE:1,CRITICAL:2},Ce.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Ce.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,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,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,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,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_
1LIMIT: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,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,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,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,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},Le.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var Pe=null,De=null,Ne=new Le(function(){var e=void 0;return Pe&&(e=Pe()),!e&&De&&(e=De()),e});function _e(){}function Oe(t){if(!t)return"";if(239==(t=Ee(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!Re().$h())return(t=(new TextDecoder).decode(t)).includes("�")&&X('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if(128&t[i]?t.length>=i+2&&192==(224&t[i])&&128==(192&t[i+1])?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&224==(240&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&240==(241&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])&&128==(192&t[i+3])&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3):r=t[i],65535>=r)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+a)}}return n}function Ue(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new Ce(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=ke(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return Ve(i)}function je(e){function t(e){return n.byteLength<=e||9<=n[e]&&126>=n[e]}if(!e)return"";var n=Ee(e);if(239==n[0]&&187==n[1]&&191==n[2])return Oe(n);if(254==n[0]&&255==n[1])return Ue(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Ue(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Ue(e,!1);if(0==n[1]&&0==n[3])return Ue(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Oe(e);throw new Ce(2,2,2003)}function Be(t){if(e.TextEncoder&&!Re().$h()){var n=new TextEncoder;return Ae(n.encode(t))}t=encodeURIComponent(t),t=unescape(t),n=new Uint8Array(t.length);for(var i=0;i<t.length;
1i++)n[i]=t[i].charCodeAt(0);return Ae(n)}function Fe(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function Ve(e){return He.value()(e)}function Ge(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return"#"==e[1]?0<=(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10))&&1114111>=e?String.fromCodePoint(e):"":t[e]||"'"}):e||""}H("shaka.util.StringUtils",_e),_e.resetFromCharCode=function(){He.g=void 0},_e.toUTF16=Fe,_e.toUTF8=Be,_e.fromBytesAutoDetect=je,_e.fromUTF16=Ue,_e.fromUTF8=Oe;var He=new Le(function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={Qc:65536};0<t.Qc;(t={Qc:t.Qc}).Qc/=2)if(e(t.Qc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Qc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Qc));return n}}(t);return null});function ze(){}function Ke(e){return e=Ve(Ee(e)),btoa(e)}function We(e,t){return t=null==t||t,e=Ke(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function qe(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}function Xe(t){for(var n=t.length/2,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.parseInt(t.substr(2*r,2),16);return i}function Ye(e){var t=Ee(e);e="";for(var n=(t=c(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function Je(){for(var e=N.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&1===r.BYTES_PER_ELEMENT?t.set(r,n):t.set(Ee(r),n),n+=r.byteLength}return t}function Qe(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new ae(e[0]);return t=new ae(t[0]),t=i.resolve(t),n&&le(t,n),[t.toString()]}t=t.map(function(e){return new ae(e)}),i=[];for(var r=(e=c(e)).next();!r.done;r=e.next()){r=new ae(r.value);for(var a=c(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&le(o,n),i.push(o.toString())}return i}function $e(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function Ze(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=We(Xe(t),!1));var o=e;22!=o.length&&(o=We(Xe(e),!1)),e={kty:"oct",kid:n,k:o},i.push(e),r.push(e.kid),a.push(t)}),t=JSON.stringify({keys:i});var o=JSON.stringify({kids:r});return o=[{initData:Ee(Be(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:n,licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(a)}}function et(e,t){if(1==t.length)return t[0];if(null!=(e=tt(e,t)))return e;throw new Ce(2,4,4025,t)}function tt(e,t){for(var n=ot.get(e),i=(n=c(n)).next();!i.done;i=n.next()){i=i.value;for(var r=c(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==it?"":null}function nt(e,t){for(var n=[],i=(e=c(e=ot.get(e))).next();!i.done;i=e.next()){i=i.value;for(var r=c(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}H("shaka.util.Uint8ArrayUtils",ze),ze.concat=Je,ze.toHex=Ye,ze.fromHex=Xe,ze.fromBase64=qe,ze.toBase64=We,ze.toStandardBase64=Ke;var it="text",rt={Ea:"video",ma:"audio",gb:it,qg:"image",um:"application"},at=1/15,ot=(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 st(){}function ut(e,t){return e=dt(e),t=dt(t),e.split("-")[0]==t.split("-")[0]}function lt(e,t){return e=dt(e),t=dt(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function ct(e,t){return e=dt(e),t=dt(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function dt(e){var t=(e=c(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=c(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=vt.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function ht(e,t){var n=ft(e),i=ft(t);return e!=n&&t!=i&&n==i}function pt(e,t){return e=dt(e),(t=dt(t))==e?4:lt(t,e)?3:ct(t,e)?2:lt(e,t)?1:0}function ft(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),vt.get(e)||e}function gt(e){return e.language?dt(e.language):e.audio&&e.audio.language?dt(e.audio.language):e.video&&e.video.language?dt(e.video.language):"und"}function mt(e,t){e=dt(e);for(var n=new Set,i=(t=c(t)).next();!i.done;i=t.next())n.add(dt(i.value));for(i=(t=c(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=c(n)).next();!i.done;i=t.next())if(lt(i=i.value,e))return i;for(i=(t=c(n)).next();!i.done;i=t.next())if(ct(i=i.value,e))return i;for(t=(n=c(n)).next();!t.done;t=n.next())if(lt(e,t=t.value))return t;return null}
1H("shaka.util.LanguageUtils",st),st.findClosestLocale=mt,st.getLocaleForVariant=gt,st.getLocaleForText=function(e){return dt(e.language||"und")},st.getBase=ft,st.relatedness=pt,st.areSiblings=ht,st.normalize=dt,st.isSiblingOf=ct,st.isParentOf=lt,st.areLanguageCompatible=ut,st.areLocaleCompatible=function(e,t){return(e=dt(e))==(t=dt(t))};var vt=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","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","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","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","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","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function yt(e){ee.call(this),this.j=dt(e),this.i=new Map,this.g=new Set,this.h=new Map}function bt(e){for(var t=e.h,n=e.j,i=e.g,r=new Set,a=c(i),o=a.next(),s={};!o.done;s={oe:void 0},o=a.next()){s.oe=o.value,r.add(s.oe),r.add(ft(s.oe)),(o=ie(t.keys(),function(e){return function(t){return ht(t,e.oe)}}(s))).sort();for(var u=(o=c(o)).next();!u.done;u=o.next())r.add(u.value);for((s=ie(t.keys(),function(e){return function(t){return ft(t)==e.oe}}(s))).sort(),o=(s=c(s)).next();!o.done;o=s.next())r.add(o.value)}for(r.add(n),n=[],a=(r=c(r)).next();!a.done;a=r.next())(a=t.get(a.value))&&n.push(a);for(n.reverse(),e.i.clear(),r=(t=c(n)).next();!r.done;r=t.next())r.value.forEach(function(t,n){e.i.set(n,t)});for(t=e.i.keys(),r=new Set,a=(n=c(e.g)).next();!a.done;a=n.next())Tt(a=e.h.get(a.value)||new Map,t,r);0<r.size&&(i=(new Map).set("locales",Array.from(i)).set("missing",Array.from(r)),e.dispatchEvent(new z("missing-localizations",i)))}function Tt(e,t,n){for(var i=(t=c(t)).next();!i.done;i=t.next())i=i.value,e.get(i)||n.add(i)}v(yt,ee),(r=yt.prototype).release=function(){ee.prototype.release.call(this)},r.Di=function(e){var t=this;this.g.clear();for(var n=(e=c(e)).next();!n.done;n=e.next())this.g.add(dt(n.value));bt(this),(e=ie(this.g,function(e){return!t.h.has(e)})).length&&this.dispatchEvent(new z("unknown-locales",(new Map).set("locales",e))),e=ie(this.g,function(e){return t.h.has(e)}),e=(new Map).set("locales",e.length?e:[this.j]),this.dispatchEvent(new z("locale-changed",e))},r.Va=function(e,t,n){e=dt(e),void 0===n&&(n=St);var i=this.h.get(e)||new Map;return t.forEach(function(e,t){i.has(t)&&n!=St||i.set(t,e)}),this.h.set(e,i),bt(this),this.dispatchEvent(new z("locale-updated")),this},r.Zl=function(e){for(var t=c(e.keys()),n=t.next();!n.done;n=t.next())n=n.value,e.set(n,this.resolve(n))},r.resolve=function(e){var t=this.i.get(e);return t||(e=(new Map).set("locales",Array.from(this.g)).set("missing",e),this.dispatchEvent(new z("unknown-localization",e)),"")},r.Dk=function(){return this.g},H("shaka.ui.Localization",yt),yt.prototype.getCurrentLocales=yt.prototype.Dk,yt.prototype.resolve=yt.prototype.resolve,yt.prototype.resolveDictionary=yt.prototype.Zl,yt.prototype.insert=yt.prototype.Va,yt.prototype.changeLocale=yt.prototype.Di,yt.prototype.release=yt.prototype.release;var St=1;function wt(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function At(e){return e.h/(1-Math.pow(e.g,e.i))}function Et(){this.h=new wt(2),this.j=new wt(5),this.g=0,this.i=128e3,this.l=16e3}
1function xt(){this.g=new Z}function kt(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(e){return!n.has(e)}),function(e){var t=It;if(null==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}It=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}yt.ConflictResolution={USE_OLD:0,USE_NEW:St},yt.UNKNOWN_LOCALES="unknown-locales",yt.UNKNOWN_LOCALIZATION="unknown-localization",yt.MISSING_LOCALIZATIONS="missing-localizations",yt.LOCALE_CHANGED="locale-changed",yt.LOCALE_UPDATED="locale-updated",wt.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)},Et.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},Et.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},Et.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(At(this.h),At(this.j))},(r=xt.prototype).release=function(){this.Sa(),this.g=null},r.o=function(e,t,n,i){this.g&&(e=new kt(e,t,n,i),this.g.push(t,e))},r.qa=function(e,t,n,i){var r=this;this.o(e,t,function i(a){r.Da(e,t,i),n(a)},i)},r.Da=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=c(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Da(),this.g.remove(t,r))},r.Sa=function(){if(this.g){for(var e=[],t=c(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,d(n.value));for(t=(e=c(e)).next();!t.done;t=e.next())t.value.Da();this.g.g.clear()}},H("shaka.util.EventManager",xt),xt.prototype.removeAll=xt.prototype.Sa,xt.prototype.unlisten=xt.prototype.Da,xt.prototype.listenOnce=xt.prototype.qa,xt.prototype.listen=xt.prototype.o,xt.prototype.release=xt.prototype.release,kt.prototype.Da=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var It=void 0;function Ct(e,t){this.g=e,this.h=t}function Mt(e,t){var n=new Ct(5,0),i=Pt,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function Lt(e,t,n,i){Y([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Rt(e,t,n,i){X([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}H("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),Ct.prototype.toString=function(){return"v"+this.g+"."+this.h};var Pt=null;function Dt(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.s=i,this.j=!1;e:{if("undefined"==typeof libDPIModule&&Y("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else{if("undefined"==typeof LcevcDil){Y("Could not find LCEVC Library on this page"),e=!1;break e}this.h=LcevcDil,this.j=!0,Mt("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead")}void 0===this.h.SupportObject?(Y("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Y(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!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))}function Nt(e,t,n,i){"video"!==i.type||e.s&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.s)}function _t(e){e.g&&e.i.classList.add("shaka-hidden")}function Ot(e){return!(!e||"undefined"==typeof LCEVCdec)&&"lvc1"==e.codecs}function Ut(t){if(Ft.has(t))return Ft.get(t);var n=e.ManagedMediaSource||e.MediaSource;
1return!!n&&(n=n.isTypeSupported(t),Ft.set(t,n),n)}function jt(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType}function Bt(){var t=e.ManagedMediaSource||e.MediaSource;return!(!t||!t.prototype)&&(!!t.prototype.setLiveSeekableRange&&!!t.prototype.clearLiveSeekableRange)}Dt.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},H("shaka.lcevc.Dec",Dt),Dt.prototype.release=Dt.prototype.release;var Ft=new Map;function Vt(){}function Gt(){}function Ht(){}function zt(e){this.h=new Map,this.i=0,this.j=new Gt,(e=Wt(e.toLowerCase()))&&(this.j=e()),this.g=new Vt,(e=Xt)&&(this.g=e(),this.h.set(this.i,this.g))}function Kt(e,t){qt.set(e,t)}function Wt(e){return qt.get(e)}Vt.prototype.extract=function(){},Vt.prototype.decode=function(){return[]},Vt.prototype.clear=function(){},Vt.prototype.getStreams=function(){return[]},Gt.prototype.init=function(){},Gt.prototype.parse=function(){return[]},(r=Ht.prototype).init=function(){},r.Of=function(){},r.Sd=function(){},r.remove=function(){},r.rg=function(){},H("shaka.media.IClosedCaptionParser",Ht),(r=zt.prototype).init=function(e,t,n){if(t=void 0!==t&&t,-1!=(n=void 0===n?-1:n)&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=Xt)&&(this.g=i()),this.h.set(t,this.g))}else t||this.Sd();this.j.init(e),-1!=n&&(this.i=n)},r.Of=function(e){for(var t=(e=c(e=this.j.parse(e))).next();!t.done;t=e.next()){var n=Ee((t=t.value).packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},r.Sd=function(){this.g.clear()},r.remove=function(e){e=void 0===e?[]:e,e=new Set(e);for(var t=c(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},r.rg=function(){return this.g.getStreams()},H("shaka.media.ClosedCaptionParser",zt),zt.findDecoder=function(){return Xt},zt.unregisterDecoder=function(){Xt=null},zt.registerDecoder=function(e){Xt=e},zt.findParser=Wt,zt.unregisterParser=function(e){qt.delete(e)},zt.registerParser=Kt;var qt=new Map,Xt=null;function Yt(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Jt,this.scroll=Qt}H("shaka.text.CueRegion",Yt);var Jt=1;Yt.units={PX:0,PERCENTAGE:Jt,LINES:2};var Qt="";function $t(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Zt(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function en(e,t,n){if(n||(n=$t),e.length!=t.length)return!1;t=t.slice();for(var i=(e=c(e)).next(),r={};!i.done;r={$i:void 0},i=e.next()){if(r.$i=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.$i,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function tn(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=$t),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function nn(e){this.h=e||"",this.g=0}function rn(e){an(e,/[ \t]+/gm)}function an(e,t){return t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g?null:(e.g+=t.length,t.results)}function on(e){return e.g==e.h.length?null:(e=an(e,/[^ \t\n]*/gm))?e[0]:null}function sn(e){if(null==(e=an(e,ln)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function un(e){return e?sn(new nn(e)):null}Yt.scrollMode={NONE:Qt,UP:"up"};var ln=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function cn(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||ArrayBuffer.isView(n))return n;if(t.has(n))return null;var i=Array.isArray(n);if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function dn(e){var t,n={};for(t in e)n[t]=e[t];return n}function hn(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];void 0!==r&&(r=hn(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if("function"==typeof e)e="";else if(e instanceof Object){for((n=Object.keys(e)).sort(),t=[],i=(n=c(n)).next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),void 0!==(r=e[r])&&(r=hn(r))&&t.push(i+":"+r);
1e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function pn(e,t){var n=void 0!==n&&n;return fn(e=je(e),t,n)}function fn(e,t,n){return e=function(e,t){function n(a,o){o=void 0!==o&&o;for(var s=[];e[r];)if(60==e.charCodeAt(r)){if(47===e.charCodeAt(r+1)){o=r+2,r=e.indexOf(">",r);var u=(o=e.substring(o,r)).indexOf(a);if(-1==u){var l=a.indexOf(".");0<l&&(u=o.indexOf(a.substring(0,l)))}if(-1==u)throw a=e.substring(0,r).split("\n"),Error("Unexpected close tag\nLine: "+(a.length-1)+"\nColumn: "+(a[a.length-1].length+1)+"\nChar: "+e[r]);r+1&&(r+=1);break}if(33===e.charCodeAt(r+1)){if(45==e.charCodeAt(r+2)){for(;-1!==r&&(62!==e.charCodeAt(r)||45!=e.charCodeAt(r-1)||45!=e.charCodeAt(r-2)||-1==r);)r=e.indexOf(">",r+1);-1===r&&(r=e.length)}else if(91===e.charCodeAt(r+2)&&91===e.charCodeAt(r+8)&&"cdata"===e.substr(r+3,5).toLowerCase()){-1==(u=e.indexOf("]]>",r))?(s.push(e.substr(r+9)),r=e.length):(s.push(e.substring(r+9,u)),r=u+3);continue}r++;continue}e:{l=o,r++;var c=i(),h={};for(u=[];62!==e.charCodeAt(r)&&e[r];){var p=e.charCodeAt(r);if(64<p&&91>p||96<p&&123>p){p=i();for(var f=e.charCodeAt(r);f&&39!==f&&34!==f&&!(64<f&&91>f||96<f&&123>f)&&62!==f;)r++,f=e.charCodeAt(r);var g=r+1;if(r=e.indexOf(e[r],g),g=e.slice(g,r),39===f||34===f){if(-1===r){if(l={tagName:c,attributes:h,children:u,parent:null},t)for(c=0;c<u.length;c++)"string"!=typeof u[c]&&(u[c].parent=l);u=l;break e}}else g=null,r--;if(p.startsWith("xmlns:")){f=g;var m=p.split(":")[1];Hn.set(f,m),zn.set(m,f)}"tt"===c&&"xml:space"===p&&"preserve"===g&&(l=!0),h[p]=g}r++}for(47!==e.charCodeAt(r-1)?(r++,u=n(c,l)):r++,l={tagName:c,attributes:h,children:u,parent:null},c=u.length,h=0;h<c;h++)"string"!=typeof(p=u[h])?t&&(p.parent=l):h==c-1&&"\n"==p&&u.pop();u=l}if(s.push(u),"string"==typeof u)break;"?"===u.tagName[0]&&u.children&&(s.push.apply(s,d(u.children)),u.children=[])}else u=r,-2===(r=e.indexOf("<",r)-1)&&(r=e.length),u=e.slice(u,r+1),o?0<u.length&&s.push(u):(s.length&&1==u.length&&"\n"==u[0]||0<u.trim().length)&&s.push(u),r++;return s}function i(){for(var t=r;-1==="\r\n\t>/= ".indexOf(e[r])&&e[r];)r++;return e.slice(t,r)}var r=0;return n("")}(e,void 0!==n&&n),!t&&e.length?e[0]:(e=e.find(function(e){return t.split(",").includes(e.tagName)}))?e:null}function gn(e){return Hn.has(e)?Hn.get(e):""}function mn(e){return"string"==typeof e}function vn(e){var t=[];if(!e.children)return[];for(var n=(e=c(e.children)).next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function yn(e,t){var n=[];if(!e.children)return[];for(var i=(e=c(e.children)).next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function bn(e){return"string"==typeof e?Ge(e):""===(e=e.children.reduce(function(e,t){return"string"==typeof t?e+t:e},""))?null:Ge(e)}function Tn(e){return Array.from(e.children).every(function(e){return"string"==typeof e})?((e=bn(e))&&(e=e.trim()),e):null}function Sn(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children)for(var i=(e=c(e.children)).next();!i.done;i=e.next())Sn(i.value,t,n);return n}function wn(e,t){return 1!=(e=yn(e,t)).length?null:e[0]}function An(e,t,n){return 1!=(e=kn(e,t,n)).length?null:e[0]}function En(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.attributes[t])&&(r=n(e)),null==r?i:r}function xn(e,t,n){return t=gn(t),e.attributes[t+":"+n]||null}function kn(e,t,n){var i=gn(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=c(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function In(e,t,n){for(var i=(t=c(t)).next();!i.done;i=t.next())if(i=xn(e,i.value,n))return i;return null}function Cn(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Mn(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function Ln(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function Rn(e){return 0==(e=Number(e))%1?e:null}function Pn(e){return 0==(e=Number(e))%1&&0<e?e:null}function Dn(e){return 0==(e=Number(e))%1&&0<=e?e:null}function Nn(e){return e=Number(e),isNaN(e)?null:e}function _n(e){return!!e&&"true"===e.toLowerCase()}function On(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Un(e){for(var t=[],n=(e=c(e=Ge(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/))).next();!n.done;n=e.next()){var i=(n=n.value).match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),a=n.match(/(@t='(\d+)')/),o=n.match(/(@n='(\d+)')/),s=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:a?Number(a[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:s?Number(s[1])-1:null,Dc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Dc=n.slice(1))}return t}function jn(e,t){var n=Un(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;null==(n=i.position)&&(null!==i.t&&(n=Bn(e,"t",i.t)),null!==i.n&&(n=Bn(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.Dc)&&e[n]?Fn(e[n],r,i,Tn(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(d(t.children))))}}function Bn(e,t,n){for(var i=0,r=(e=c(e)).next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function Fn(e,t,n,i){"remove"===t?delete e.attributes[n]:"add"!==t&&"replace"!==t||(e.attributes[n]=i)}function Vn(e){var t="",n=e.tagName.split(":");for(var i in 0<n.length&&(t=n[0],t=zn.has(t)?zn.get(t):""),t=document.createElementNS(t,e.tagName),e.attributes)t.setAttribute(i,e.attributes[i]);for(i=(e=c(e.children)).next();!i.done;i=e.next())n=void 0,n="string"==typeof(i=i.value)?new Text(i):Vn(i),t.appendChild(n);return t}function Gn(e){if(!e)return null;for(var t={tagName:e.tagName,attributes:dn(e.attributes),children:[],parent:null},n=(e=c(e.children)).next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=Gn(n)).parent=t),t.children.push(n);return t}var Hn=new Map,zn=new Map;function Kn(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Yt,this.position=null,this.positionAlign=$n,this.size=0,this.textAlign=Zn,this.direction=ii,this.writingMode=ri,this.lineInterpretation=ai,this.line=null,this.lineHeight="",this.lineAlign=oi,this.displayAlign=ti,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=ci,this.fontStyle=hi,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",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={Wc:32,rows:15}}function Wn(e,t){return(e=new Kn(e,t,"")).lineBreak=!0,e}function qn(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!tn(e.nestedCues,t.nestedCues,qn))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[
1n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!tn(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}function Xn(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&Yn(t);var i=n;n=[];for(var r=-1,a=0;a<i.length;a++)"<"===i[a]?r=a+1:">"===i[a]&&0<r&&((r=i.substr(r,a-r)).match(mi)&&n.push(r),r=-1);for(a=(n=c(n)).next();!a.done;a=n.next())a=a.value,i=i.replace("<"+a+">",'<div time="'+a+'">'),i+="</div>";e:{a=i,r=[];var o=-1;n="",i=!1;for(var s=0;s<a.length;s++)if("/"===a[s]){var u=a.indexOf(">",s);if(-1===u){n=a;break e}if((u=a.substring(s+1,u))&&"v"==u){i=!0;var l=null;if(r.length&&(l=r[r.length-1]),l){if(l===u)n+="/"+u+">";else{if(!l.startsWith("v")){n+=a[s];continue}n+="/"+l+">"}s+=u.length+1}else n+=a[s]}else n+=a[s]}else"<"===a[s]?"v"!=a[o=s+1]&&(o=-1):">"===a[s]&&0<o&&(r.push(a.substr(o,s-o)),o=-1),n+=a[s];for(r=(a=c(r)).next();!r.done;r=a.next())o=(r=r.value).replace(" ",".voice-"),n=(n=n.replace("<"+r+">","<"+o+">")).replace("</"+r+">","</"+o+">"),i||(n+="</"+o+">")}n=function(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return t[e]||""}):e||""}(n),e.payload="";try{var d=fn("<span>"+n+"</span>","span")}catch(e){}if(d)if(1!=(d=d.children).length||d[0].tagName)for(n=(d=c(d)).next();!n.done;n=d.next())Jn(n.value,e,t);else e.payload=Ge(n);else e.payload=Ge(n)}else e.payload=Ge(n)}function Yn(e){for(var t=c(Object.entries(ui)),n=t.next();!n.done;n=t.next()){var i=c(n.value);n=i.next().value,i=i.next().value;var r=new Kn(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=c(Object.entries(li))).next();!n.done;n=t.next())n=(i=c(n.value)).next().value,i=i.next().value,(r=new Kn(0,0,"")).backgroundColor=i,e.set("."+n,r)}function Jn(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new Yt,i.position=null,i.size=0,i.textAlign=Zn,e.tagName)for(var r=c(e.tagName.split(/(?=[ .])+/g)),a=r.next();!a.done;a=r.next()){var o=a=a.value;if(o.startsWith(".voice-")){var s=o.split("-").pop();
1o='v[voice="'+s+'"]',n.has(o)||(o="v[voice="+s+"]")}switch(n.has(o)&&(s=i,o=n.get(o))&&(s.backgroundColor=Qn(o.backgroundColor,s.backgroundColor),s.color=Qn(o.color,s.color),s.fontFamily=Qn(o.fontFamily,s.fontFamily),s.fontSize=Qn(o.fontSize,s.fontSize),s.textShadow=Qn(o.textShadow,s.textShadow),s.fontWeight=o.fontWeight,s.fontStyle=o.fontStyle,s.opacity=o.opacity,s.rubyTag=o.rubyTag,s.textCombineUpright=o.textCombineUpright,s.wrapLine=o.wrapLine),a){case"br":return i=Wn(i.startTime,i.endTime),void t.nestedCues.push(i);case"b":i.fontWeight=di;break;case"i":i.fontStyle=pi;break;case"u":i.textDecoration.push(gi);break;case"font":(a=e.attributes.color)&&(i.color=a);break;case"div":if(!(a=e.attributes.time))break;(a=un(a))&&(i.startTime=a);break;case"ruby":case"rp":case"rt":i.rubyTag=a}}if(r=e.children,mn(e)||1==r.length&&mn(r[0]))for(n=bn(e).split("\n"),e=!0,r=(n=c(n)).next();!r.done;r=n.next())r=r.value,e||(e=Wn(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&((e=i.clone()).payload=Ge(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),e=(t=c(r)).next();!e.done;e=t.next())Jn(e.value,i,n)}function Qn(e,t){return e&&0<e.length?e:t}Kn.prototype.clone=function(){var e,t=new Kn(0,0,"");for(e in this)t[e]=this[e],Array.isArray(t[e])&&(t[e]=t[e].slice());return t},H("shaka.text.Cue",Kn),Kn.parseCuePayload=Xn,Kn.equal=qn,Kn.prototype.clone=Kn.prototype.clone;var $n="auto";Kn.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:$n};var Zn="center",ei={LEFT:"left",RIGHT:"right",CENTER:Zn,START:"start",END:"end"};Kn.textAlign=ei;var ti="after",ni={BEFORE:"before",CENTER:"center",AFTER:ti};Kn.displayAlign=ni;var ii="ltr";Kn.direction={HORIZONTAL_LEFT_TO_RIGHT:ii,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ri="horizontal-tb";Kn.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ri,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ai=0;Kn.lineInterpretation={LINE_NUMBER:ai,PERCENTAGE:1};var oi="start",si={CENTER:"center",START:oi,END:"end"};Kn.lineAlign=si;var ui={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Kn.defaultTextColor=ui;var li={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Kn.defaultTextBackgroundColor=li;var ci=400,di=700;Kn.fontWeight={NORMAL:ci,BOLD:di};var hi="normal",pi="italic",fi={NORMAL:hi,ITALIC:pi,OBLIQUE:"oblique"};Kn.fontStyle=fi;var gi="underline";Kn.textDecoration={UNDERLINE:gi,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var mi=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function vi(){}function yi(e,t,n){Ti.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,Pf:t})}function bi(e,t){for(var n=e.toLowerCase().split(";")[0],i=c([Ei,Ai,wi,Si]),r=i.next();!r.done;r=i.next())if(r=Ti.get(n+"-"+r.value)){var a=r.Pf(),o=a.isSupported(e,t);if(a.destroy(),o)return r.Pf}return null}vi.prototype.destroy=function(){},H("shaka.transmuxer.TransmuxerEngine",vi),vi.findTransmuxer=bi,vi.unregisterTransmuxer=function(e,t){Ti.delete(e.toLowerCase().split(";")[0]+"-"+t)},vi.registerTransmuxer=yi,vi.prototype.destroy=vi.prototype.destroy;var Ti=new Map,Si=1,wi=2,Ai=3,Ei=4;function xi(){}function ki(e,t){var n=e;return t&&!Oi.includes(e)&&(n+='; codecs="'+t+'"'),n}function Ii(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Ci(e,t,n){var i=ki(e,t);return bi(t=Ii(e,t))?(e=bi(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function Mi(e){return e.split(";")[0].split("/")[1]}function Li(e){var t=_i(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:case"ac3"===e:case"ac-3"===e:return"ac-3";case"mp4a"===e&&"a6"===t:case"eac3"===e:case"ec-3"===e:return"ec-3";case"ac-4"===e:return"ac-4";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";
1case"vp09"===e:case"vp9"===e:return"vp9";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"vvc1"===e:case"vvi1"===e:return"vvc";case"dvh1"===e:case"dvhe"===e:return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc"}return e}function Ri(e){for(var t=[],n=(e=c(e.split(","))).next();!n.done;n=e.next())n=_i(n.value),t.push(n[0]);return t.sort().join(",")}function Pi(e){return e.split(";")[0]}function Di(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Ni(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function _i(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}vi.PluginPriority={FALLBACK:Si,PREFERRED_SECONDARY:wi,PREFERRED:Ai,APPLICATION:Ei},H("shaka.util.MimeUtils",xi),xi.getFullTypeWithAllCodecs=Ii,xi.getFullType=ki,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Oi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Ui(e){this.i=null,this.j=e,this.C=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.D="",this.B=function(){},this.s=new Map}function ji(e,t){Hi.set(e,t)}function Bi(e){return Hi.get(e)}function Fi(e){return!!Hi.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!Xt}function Vi(e,t,n){if(e.D=t,t=e.s.get(t))for(var i=c(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(e){return e.endTime<=n}))&&e.j.append(r)}function Gi(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=c(t.nestedCues)).next();!i.done;i=t.next())Gi(e,i.value,n)}Ui.prototype.destroy=function(){return this.j=this.i=null,this.s.clear(),Promise.resolve()},Ui.prototype.remove=function(e,t){var n=this;return D(function(i){if(1==i.g)return S(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),w(i)})},H("shaka.text.TextEngine",Ui),Ui.prototype.destroy=Ui.prototype.destroy,Ui.findParser=Bi,Ui.unregisterParser=function(e){Hi.delete(e)},Ui.registerParser=ji;var Hi=new Map;function zi(e){this.h=e,this.g=null}function Ki(e){this.h=e,this.g=null}function Wi(e,t){return e.concat(t)}function qi(){}function Xi(e){return null!=e}function Yi(e,t){return Promise.race([t,new Promise(function(t,n){new Ki(n).X(e)})])}function Ji(){}function Qi(e,t,n,i,r){function a(e){var t=String(e.width||"")+String(e.height||"")+String(Math.round(e.frameRate||0))+(e.hdr||"")+e.fastSwitching;return e.dependencyStream&&(t+=e.dependencyStream.baseOriginalId||""),t}function o(e){var t=e.language+(e.channelsCount||0)+(e.audioSamplingRate||0)+e.roles.join(",")+e.label+e.groupId+e.fastSwitching;return e.dependencyStream&&(t+=e.dependencyStream.baseOriginalId||""),t}if(r.length){for(var s=e.textStreams,u=(r=c(r)).next(),l={};!u.done;l={ji:void 0},u=r.next())if(l.ji=u.value,(u=s.filter(function(e){return function(t){return!(!t.codecs.startsWith(e.ji)&&!t.mimeType.startsWith(e.ji))}}(l))).length){s=u;break}e.textStreams=s}if(s=e.variants,(t.length||n.length)&&(s=function(e,t,n){for(var i=(t=c(t)).next(),r={};!i.done;r={videoCodec:void 0},i=t.next())if(r.videoCodec=i.value,i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.videoCodec)}}(r)),i.length){e=i;break}for(n=c(n),t=n.next(),i={};!t.done;i={audioCodec:void 0},t=n.next())if(i.audioCodec=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.audioCodec)}}(i)),t.length){e=t;break}return e}(s,t,n)),i.length){for(t=new Z,s=(n=c(s)).next();!s.done;s=n.next())s=s.value,t.push(String(s.video.width||0),s);var h=[];t.forEach(function(e,t){e=0;for(var n=[],r=(t=c(t)).next(),a={};!r.done;a={og:void 0},r=t.next())a.og=r.value,(r=i.filter(function(e){return function(t){return e.og.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.og]):r==e&&n.push(a.og);h.push.apply(h,d(n))}),s=h}for(n=new Set,t=new Set,r=(s=c(s)).next();!r.done;r=s.next())(r=r.value).audio&&n.add(r.audio),r.video&&t.add(r.video);s=Array.from(n).sort(function(e,t){return e.bandwidth-t.bandwidth});var p=[];for(n=new Map,r=(s=c(s)).next();!r.done;r=s.next()){if(u=o(r=r.value),(l=n.get(u)||[]).length){var f=l[l.length-1],g=Li(f.codecs),m=Li(r.codecs);g!=m||r.bandwidth&&f.bandwidth&&!(r.bandwidth>
1f.bandwidth)||(l.push(r),p.push(r.id))}else l.push(r),p.push(r.id);n.set(u,l)}var v={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};s=Array.from(t).sort(function(e,t){if(!e.bandwidth||!t.bandwidth||e.bandwidth==t.bandwidth){if(e.codecs&&t.codecs&&e.codecs!=t.codecs&&e.width==t.width){var n=Li(e.codecs),i=Li(t.codecs);if(n!=i)return(v[n]||1)-(v[i]||1)}return e.width-t.width}return e.bandwidth-t.bandwidth}),t=jt();var y=[];for(n=new Map,r=(s=c(s)).next();!r.done;r=s.next()){if(u=a(r=r.value),(l=n.get(u)||[]).length){if(f=l[l.length-1],!t&&(g=Li(f.codecs))!==(m=Li(r.codecs)))continue;(g=Li(f.codecs))!=(m=Li(r.codecs))||r.bandwidth&&f.bandwidth&&!(r.bandwidth>f.bandwidth)||(l.push(r),y.push(r.id))}else l.push(r),y.push(r.id);n.set(u,l)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,!(t&&!p.includes(t.id)||e&&!y.includes(e.id))})}function $i(e,t,n){function i(e,t,n){return e>=t&&e<=n}var r=e.video;if(r&&r.width&&r.height){var a=r.width,o=r.height;if(o>a&&(a=(o=c([o,a])).next().value,o=o.next().value),!i(a,t.minWidth,Math.min(t.maxWidth,n.width))||!i(o,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Zi(e,t,n,i){return n=void 0===n?[]:n,i=void 0===i?{}:i,D(function(r){return 1==r.g?S(r,er(e,t,0<t.offlineSessionIds.length,n,i),2):(function(e){e.textStreams=e.textStreams.filter(function(e){return Fi(e=ki(e.mimeType,e.codecs))})}(t),S(r,function(e){var t,n,i,r,a,o,s;return D(function(u){switch(u.g){case 1:t=[],n=c(e.imageStreams),i=n.next();case 2:if(i.done){u.A(4);break}if(r=i.value,"application/mp4"==(a=r.mimeType)&&"mjpg"==r.codecs&&(a="image/jpg"),wr.has(a)){u.A(5);break}if(!(o=Ar.get(a))){wr.set(a,!1),u.A(5);break}return S(u,function(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(2===n.height)}})}(o),7);case 7:s=u.h,wr.set(a,s);case 5:wr.get(a)&&t.push(r),i=n.next(),u.A(2);break;case 4:e.imageStreams=t,w(u)}})}(t),0))})}function er(e,t,n,i,r){var a,o;return D(function(s){if(1==s.g)return Re().Jj()&&function(e){for(var t=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set,i=(e=c(e)).next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(n=c(n),e=n.next();!e.done;e=n.next()){e=e.value;for(var r=(i=c(t)).next();!r.done;r=i.next()){var a=c(r.value);if(r=a.next().value,a=a.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,a);break}}}}(t.variants),S(s,ir(t.variants,n,!1,i),2);a=null,e&&(o=e.g)&&(a=o.keySystem),t.variants=t.variants.filter(function(e){var t=function(e,t,n){if(!e.decodingInfos.some(function(e){return!(!e.supported||t&&(e=e.keySystemAccess)&&(n[e.keySystem]||e.keySystem)!=t)}))return!1;var i=Re(),r="Xbox"===i.Rb();i="MOBILE"===i.Ja()&&"GECKO"===i.Ia();var a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(r&&a&&(1920<o||1080<s)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3."))||(r=a&&a.dependencyStream)&&!Ot(r))&&(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}(e,a,r);if(!t){var n=[];e.audio&&n.push(yr(e.audio)),e.video&&n.push(yr(e.video))}return t}),w(s)})}function tr(e,t){var n,i,r,a,o,s,u;return D(function(l){if(1==l.g){for(n=function(e,t){if(e){var n=dn(e);return n.supported=e.supported&&t.supported,n.powerEfficient=e.powerEfficient&&t.powerEfficient,n.smooth=e.smooth&&t.smooth,t.keySystemAccess&&!n.keySystemAccess&&(n.keySystemAccess=t.keySystemAccess),n}return t},i=null,r=[],a=c(t),o=a.next(),s={};!o.done;s={cache:void 0,bf:void 0},o=a.next())u=o.value,s.bf=hn(u),s.cache=Tr,s.cache.has(s.bf)?i=n(i,s.cache.get(s.bf)):r.push(nr(u).then(function(e){return function(t){for(var r=null,a=(t=c(t||[])).next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.bf,r),i=n(i,r))}}(s)));return S(l,Promise.all(r),2)}i&&e.decodingInfos.push(i),w(l)})}function nr(e){var t=[""];e.video&&(t=Di(e.video.contentType).split(","));var n=[""];e.audio&&(n=Di(e.audio.contentType).split(","));for(var i=[],r=(t=c(t)).next();!r.done;r=t.next()){r=r.value;for(var a=c(n),o=a.next(),s={};!o.done;s={Xc:void 0},o=a.next())o=o.value,s.Xc=cn(e),e.video&&(s.Xc.video.contentType=ki(Pi(s.Xc.video.contentType),r)),e.audio&&(s.Xc.audio.contentType=ki(Pi(s.Xc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){("MOBILE"==Re().Ja()?Yi(5,navigator.mediaCapabilities.decodingInfo(e.Xc)):navigator.mediaCapabilities.decodingInfo(e.Xc)).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function ir(e,t,n,i){var r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w,A;return D(function(E){switch(E.g){case 1:if(e.some(function(e){return e.decodingInfos.length}))return E.return();r=c(i),a=r.next(),o={};case 2:if(a.done){E.A(4);break}o.nj=a.value,s=!1,u=c(e),l=u.next();case 5:if(l.done){E.A(7);break}d=l.value,h=rr(d,t,n).filter((x=o,function(e){return((e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)===x.nj})),p=c(h),f=p.next();case 8:if(f.done){E.A(10);break}return g=f.value,S(E,tr(d,g),9);case 9:f=p.next(),E.A(8);break;case 10:d.decodingInfos.length&&(s=!0),l=u.next(),E.A(5);break;case 7:if(s)return E.return();o={nj:void 0},a=r.next(),E.A(2);break;case 4:m=c(e),v=m.next();case 12:if(v.done){E.A(0);break}y=v.value,b=rr(y,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}),T=c(b),w=T.next();case 15:if(w.done){v=m.next(),E.A(12);break}return A=w.value,S(E,tr(y,A),16);case 16:w=T.next(),E.A(15)}var x})}function rr(e,t,n){var r=e.audio,a=e.video,o=[],s=[];if(a)for(var u=c(a.fullMimeTypes),l=u.next();!l.done;l=u.next()){var d=Di(l=l.value);if(d.includes(",")&&!r){var h=d.split(","),p=Pi(l);d=et("video",h),p=Ci(p,h=ar(h=et("audio",h),p),"audio"),s.push({contentType:p,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(d=or(d),l={contentType:Ci(Pi(l),d,"video"),width:a.width||64,height:a.height||64,bitrate:a.bandwidth||e.bandwidth||1,framerate:a.frameRate||1},a.hdr)switch(a.hdr){case"SDR":l.transferFunction="srgb";break;case"PQ":l.transferFunction="pq";break;case"HLG":l.transferFunction="hlg"}a.colorGamut&&(l.colorGamut=a.colorGamut),o.push(l)}if(r)for(l=(u=c(r.fullMimeTypes)).next();!l.done;l=u.next())l=Ci(l=Pi(d=l.value),d=ar(Di(d),l),"audio"),s.push({contentType:l,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(u=[],0==o.length&&o.push(null),0==s.length&&s.push(null),l=(o=c(o)).next();!l.done;l=o.next())for(l=l.value,p=(d=c(s)).next();!p.done;p=d.next())p=p.value,h={type:n?"file":"media-source"},l&&(h.video=l),p&&(h.audio=p),u.push(h);if(!(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[u];for(e=[],n=new Map,o=(s=c(s)).next();!o.done;o=s.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],l=(o=c(n.keys())).next();!l.done;l=o.next()){for(l=l.value,p=n.get(l),d=new Map,h=(p=c(p)).next();!h.done;h=p.next()){var f=(h=h.value).videoRobustness+","+h.audioRobustness;d.get(f)||d.set(f,[]),d.get(f).push(h)}
1for(p=(d=c(d.values())).next();!p.done;p=d.next()){p=p.value,h=[];for(var g=(f=c(u)).next();!g.done;g=f.next()){g=i({},g.value);for(var m={keySystem:l,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},v=c(p),y=v.next();!y.done;y=v.next()){if((y=y.value).initData&&y.initData.length){for(var b=new Set,T=c(y.initData),S=T.next();!S.done;S=T.next())b.add(S.value.initDataType);m.initDataType=y.initData[0].initDataType}y.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required"),y.persistentStateRequired&&(m.persistentState="required"),y.sessionType&&(m.sessionTypes=[y.sessionType]),r&&(m.audio?(y.encryptionScheme&&(m.audio.encryptionScheme=m.audio.encryptionScheme||y.encryptionScheme),m.audio.robustness=m.audio.robustness||y.audioRobustness):(m.audio={robustness:y.audioRobustness},y.encryptionScheme&&(m.audio.encryptionScheme=y.encryptionScheme)),""==m.audio.robustness&&delete m.audio.robustness),a&&(m.video?(y.encryptionScheme&&(m.video.encryptionScheme=m.video.encryptionScheme||y.encryptionScheme),m.video.robustness=m.video.robustness||y.videoRobustness):(m.video={robustness:y.videoRobustness},y.encryptionScheme&&(m.video.encryptionScheme=y.encryptionScheme)),""==m.video.robustness&&delete m.video.robustness)}g.keySystemConfiguration=m,h.push(g)}e.push(h)}}return e}function ar(e,t){var n=Re();return"flac"==e.toLowerCase()?"WEBKIT"!=n.Ia()?"flac":"fLaC":"opus"===e.toLowerCase()?"WEBKIT"!=n.Ia()?"opus":"mp4"==Mi(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&n.we()?"ec-3":e}function or(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function sr(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var d=new Set;if(t)for(var h=c(t.roles),p=h.next();!p.done;p=h.next())d.add(p.value);if(n)for(p=(h=c(n.roles)).next();!p.done;p=h.next())d.add(p.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),o.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=o.split(",");try{e.videoCodec=et("video",n),e.audioCodec=et("audio",n)}catch(e){}}
1return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function ur(e){return{id:e.id,active:!1,type:it,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function lr(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=zu(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function cr(e){return e.__shaka_id||(e.__shaka_id=Sr++),e.__shaka_id}function dr(e){var t={id:cr(e),active:"disabled"!=e.mode,type:it,bandwidth:0,language:dt(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==e.kind,originalTextId:e.id,originalLanguage:e.language};return"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function hr(e,t){var n=e?e.language:null;if(n={id:cr(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:dt(n||"und"),label:e?e.label:null,kind:e?e.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:!!e&&"main"==e.kind,roles:[],forced:!1,audioR
1oles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+","+n.videoCodec:n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function pr(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function fr(e){return e.filter(function(e){return pr(e)})}function gr(e,t,n,i){var r=e,a=e.filter(function(e){return e.primary});a.length&&(r=a);var o=r.length?r[0].language:"";if(r=r.filter(function(e){return e.language==o}),t){var s=mt(dt(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return dt(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=mr(r,n)).length)return e}else if(e=r.filter(function(e){return 0==e.roles.length}),e.length)return e;return e=r.map(function(e){return e.roles}).reduce(Wi,[]),e.length?mr(r,e[0]):r}function mr(e,t){return e.filter(function(e){return e.roles.includes(t)})}function vr(e,t){t.length&&(t=t.filter(function(t){return Li(e.codecs)==Li(t.codecs)}).sort(function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:(e.width||0)-(t.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(t){return e.width==t.width&&e.height==t.height})))&&(e.trickModeVideo=t)}function yr(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function br(e,t,n){if(0==n.autoShowText)return!1;if(1==n.autoShowText)return!0;var i=dt(n.preferredTextLanguage);return t=dt(t.language),2==n.autoShowText?ut(t,i):3==n.autoShowText?!!e&&(e=dt(e.language),ut(t,i)&&!ut(e,t)):(Y("Invalid autoShowText setting!"),!1)}zi.prototype.X=function(t){var n=this;this.stop();var i=!0,r=null;return this.g=function(){e.clearTimeout(r),i=!1},r=e.setTimeout(function(){i&&n.h()},1e3*t),this},zi.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Ki.prototype.Ka=function(){return this.stop(),this.h(),this},Ki.prototype.X=function(e){var t=this;return this.stop(),this.g=new zi(function(){t.h()}).X(e),this},Ki.prototype.ya=function(e){var t=this;return this.stop(),this.g=new zi(function(){t.g.X(e),t.h()}).X(e),this},Ki.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},H("shaka.util.Timer",Ki),Ki.prototype.stop=Ki.prototype.stop,Ki.prototype.tickEvery=Ki.prototype.ya,Ki.prototype.tickAfter=Ki.prototype.X,Ki.prototype.tickNow=Ki.prototype.Ka,H("shaka.util.StreamUtils",Ji),Ji.meetsRestrictions=$i;var Tr=new Map,Sr=0,wr=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ar=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
1FDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Er(){var t=this;this.G=null,this.l=!1,this.s=new Et,this.j=new xt,navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(t.l&&t.g.useNetworkInformation){t.s=new Et,t.g&&t.s.configure(t.g.advanced);var e=t.chooseVariant();e&&navigator.onLine&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.m=this.g=this.u=null,this.B=new Ki(function(){if(t.l&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.C=e,"documentPictureInPicture"in e&&this.j.o(e.documentPictureInPicture,"enter",function(){t.C=e.documentPictureInPicture.window,t.B&&t.B.Ka(),t.j.qa(t.C,"pagehide",function(){t.C=e,t.B&&t.B.Ka()})}),this.D=this.i=null}function xr(e){if(!e.I){var t=e.s;if(!(t.g>=t.i))return;e.I=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function kr(e,t,n,i,r){if(e.D){var a=e.D.Qi();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return $i(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(r=Er.prototype).stop=function(){this.G=null,this.l=!1,this.F=[],this.H=1,this.m=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.B.stop(),this.D=this.i=null},r.release=function(){this.j.release(),this.B=null},r.init=function(e){this.G=e},r.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;e=this.C.screen.height*n,t=this.C.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;var i=this.m.clientHeight,r=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if((n=this.F.filter(function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(e){return e&&!!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})),n=kr(this,this.g.restrictions,i,1/0,1/0),1/0!=e||1/0!=t){for(n=function(e){for(var t=[],n=(e=c(e)).next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(e,t){return e.width-t.width})}(n),r=(n=c(n)).next();!r.done;r=n.next())if((r=r.value).height>=e&&r.width>=t){e=r.height,t=r.width;break}n=kr(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=[(n=kr(this,null,i,1/0,1/0))[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var a=isNaN(this.H)?1:Math.abs(this.H),o=a*r.bandwidth/this.g.bandwidthDowngradeTarget,s={bandwidth:1/0},u=i+1;u<n.length;u++)if(r.bandwidth!=n[u].bandwidth){s=n[u];break}a=a*s.bandwidth/this.g.bandwidthUpgradeTarget,e>=o&&e<=a&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.u=Date.now(),t},r.enable=function(){this.l=!0},r.disable=function(){this.l=!1},r.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&1===i.packetNumber&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r<this.g.cacheLoadThreshold||(this.s.sample(r,t),n&&null!=this.u&&this.l&&xr(this))},r.trySuggestStreams=function(){null!=this.u&&this.l&&xr(this)},r.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.s.getBandwidthEstimate(e),this.D?this.D.getBandwidthEstimate(e):e)},r.setVariants=function(e){this.F=e},r.playbackRateChanged=function(e){this.H=e},r.setMediaElement=function(t){function n(){i.B.X(Ir)}var i=this;this.m=t,this.h&&(this.h.disconnect(),this.h=null),this.m&&"ResizeObserver"in e&&(this.h=new ResizeObserver(n),this.h.observe(this.m)),this.j.o(t,"enterpictureinpicture",function(e){e.pictureInPictureWindow&&(i.i=e.pictureInPictureWindow,i.j.o(i.i,"resize",n))}),this.j.o(t,"leavepictureinpicture",function(){i.i&&i.j.Da(i.i,"resize",n),i.i=null})},r.setCmsdManager=function(e){this.D=e},r.configure=function(e){this.g=e,this.s&&this.g&&this.s.configure(this.g.advanced)},H("shaka.abr.SimpleAbrManager",Er),Er.prototype.configure=Er.prototype.configure,Er.prototype.setCmsdManager=Er.prototype.setCmsdManager,Er.prototype.setMediaElement=Er.prototype.setMediaElement,Er.prototype.playbackRateChanged=Er.prototype.playbackRateChanged,Er.prototype.setVariants=Er.prototype.setVariants,Er.prototype.getBandwidthEstimate=Er.prototype.getBandwidthEstimate,Er.prototype.trySuggestStreams=Er.prototype.trySuggestStreams,Er.prototype.segmentDownloaded=Er.prototype.segmentDownloaded,Er.prototype.disable=Er.prototype.disable,Er.prototype.enable=Er.prototype.enable,Er.prototype.chooseVariant=Er.prototype.chooseVariant,Er.prototype.init=Er.prototype.init,Er.prototype.release=Er.prototype.release,Er.prototype.stop=Er.prototype.stop;var Ir=1;function Cr(e,t){if(e===t||!e.length||!t.length)return!0;for(var n=(e=c(e)).next();!n.done;n=e.next()){if(Pr(n=n.value))return!0;for(var i=c(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||Pr(r))return!0}return!1}function Mr(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=(e=c(e)).next();!i.done;i=e.next()){i=i.value;for(var r=c(t),a=r.next();!a.done;a=r.next()){if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=c((i.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,r.set(s.keyId,s);r=Array.from(r.values()),o=i.keyIds&&a.keyIds?new Set([].concat(d(i.keyIds),d(a.keyIds))):i.keyIds||a.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||a.persistentStateRequired,videoRobustness:i.videoRobustness||a.videoRobustness,audioR
1obustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}Pr(i)?n.push(i):Pr(a)&&n.push(a)}}return n}function Lr(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Rr(e){return!!e&&!!e.match(/^com\.apple\.fps/)}function Pr(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}H("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});var Dr=new Le(function(){return Ae(new Uint8Array([0]))}),Nr=new Map;function _r(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.s=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Or(e){var t,n;return D(function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new Ce(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?i.return():(n=e.h*(1+(2*Math.random()-1)*e.s),S(i,new Promise(function(e){new Ki(e).X(n/1e3)}),2))}e.h*=e.m,w(i)})}function Ur(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function jr(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function Br(e,t){this.promise=e,this.i=t,this.g=null}function Fr(e){return new Br(Promise.reject(e),function(){return Promise.resolve()})}function Vr(){var e=Promise.reject(new Ce(2,7,7001));return e.catch(function(){}),new Br(e,function(){return Promise.resolve()})}function Gr(e){return new Br(Promise.resolve(e),function(){return Promise.resolve()})}function Hr(e){return new Br(e,function(){return e.catch(function(){})})}function zr(e){return new Br(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function Kr(){this.g=[]}function Wr(e,t){e.g.push(t.finally(function(){Zt(e.g,t)}))}function qr(e,t,n,i,r,a,o){ee.call(this),this.i=null,this.j=!1,this.u=new Kr,this.g=new Set,this.h=new Set,this.s=e||null,this.m=t||null,this.B=n||null,this.C=i||null,this.D=r||null,this.G=a||null,this.F=o||null,this.l=new Map}function Xr(e,t,n,i){i=void 0!==i&&i,n=n||na;var r=ia.get(e);(!r||n>=r.priority)&&ia.set(e,{priority:n,Pf:t,Pl:i})}function Yr(e,t){for(var n=c(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=c(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function Jr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function Qr(e,t,n,i,r,a,o,s){e.i.forceHTTP&&(n.uris[a]=n.uris[a].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[a]=n.uris[a].replace("http://","https://")),0<a&&e.G&&e.G(t,i,n.uris[a],n.uris[a-1]);var u=new ae(n.uris[a]),l=u.hc,c=!1;l||(oe(u,l=(l=location.protocol).slice(0,-1)),n.uris[a]=u.toString()),l=l.toLowerCase();var d=(l=ia.get(l))?l.Pf:null;if(!d)return Fr(new Ce(2,1,1e3,u));var h=l.Pl;(u=e.l.get(u.Gb))&&(n.headers["common-access-token"]=u);var p,f=null,g=null,m=!1,v=!1;return Hr(Or(r)).ab(function(){if(e.j)return Vr();p=Date.now();var r=0;n.requestStartTime=Date.now();var o=d(n.uris[a],n,t,function(a,o,u){f&&f.stop(),g&&g.X(l/1e3),e.s&&t==ta&&(r++,n.packetNumber=r,e.s(a,o,$r(i),n,i),c=!0,s.g=u)},function(i){v=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(i,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!h)return o;var u=n.retryParameters.connectionTimeout;u&&(f=new Ki(function(){m=!0,o.abort()})).X(u/1e3);var l=n.retryParameters.stallTimeout;return l&&(g=new Ki(function(){m=!0,o.abort()})),o}).ab(function(i){f&&f.stop(),g&&g.stop(),null==i.timeMs&&(i.timeMs=Date.now()-p);var r=i.headers["common-access-token"];if(r){var a=new ae(i.uri);e.l.set(a.Gb,r)}return r={response:i,ql:c},!v&&e.m&&e.m(i.headers,n,t),e.B&&e.B(n,i),r},function(u){if(f&&f.stop(),g&&g.stop(),e.C){var l=null,c=0;u instanceof Ce&&(l=u,1001==u.code&&(c=u.data[1])),e.C(n,l,c,m)}if(e.j)return Vr();if(m&&(u=new Ce(1,1,1003,n.uris[a],t)),u instanceof Ce){if(7001==u.code)throw u;if(1010==u.code)throw o;if(1==u.severity){if((l=new z("retry",l=(new Map).set("error",u))).cancelable=!0,e.dispatchEvent(l),l.defaultPrevented)throw u;return a=(a+1)%n.uris.length,Qr(e,t,n,i,r,a,u,s)}}throw u})}function $r(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.s)return!1}return!0}function Zr(){this.g=0}function ea(e,t,n){Br.call(this,e,t),this.h=n}jr.prototype.resolve=function(){},jr.prototype.reject=function(){},Br.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},Br.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},Br.prototype.ab=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new jr;a.catch(function(){});var o=new Ce(2,7,7001);return this.promise.then(n(!0),n(!1)),new Br(a,function(){return i()})},s.Object.defineProperties(Br.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),H("shaka.util.AbortableOperation",Br),Br.prototype.chain=Br.prototype.ab,Br.prototype.finally=Br.prototype.finally,Br.all=zr,Br.prototype.abort=Br.prototype.abort,Br.notAbortable=Hr,Br.completed=Gr,Br.aborted=Vr,Br.failed=Fr,Kr.prototype.destroy=function(){for(var e=[],t=c(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},v(qr,ee),(r=qr.prototype).configure=function(e){this.i=e},r.Sl=function(e){this.g.add(e)},r.pm=function(e){this.g.delete(e)},r.hk=function(){this.g.clear()},r.Tl=function(e){this.h.add(e)},r.qm=function(e){this.h.delete(e)},r.ik=function(){this.h.clear()},r.Fi=function(){this.l.clear()},r.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),ee.prototype.release.call(this),this.u.destroy()},r.request=function(e,t,n){var i=this,r=new Zr;if(this.j){var a=Promise.reject(new Ce(2,7,7001));return a.catch(function(){}),new ea(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?cn(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=cn(t.uris),a=function(e,t,n,i){function r(e){a=a.ab(function(){return n.body&&(n.body=Ae(n.body)),e(t,n,i)})}var a=Gr(void 0);e.D&&r(e.D);for(var o=(e=c(e.g)).next();!o.done;o=e.next())r(o.value);return a.ab(void 0,function(e){if(e instanceof Ce&&7001==e.code)throw e;throw new Ce(2,1,1006,e)})}(this,e,t,n);var o=a.ab(function(){return Qr(i,e,t,n,new _r(t.retryParameters,!1),0,null,r)}),s=o.ab(function(t){return function(e,t,n,i){for(var r=Gr(void 0),a=(e=c(e.h)).next(),o={};!a.done;o={uj:void 0},a=e.next())o.uj=a.value,r=r.ab(function(e){return function(){var r=n.response;return r.data&&(r.data=Ae(r.data)),(0,e.uj)(t,r,i)}}(o));return r.ab(function(){return n},function(e){var t=2;if(e instanceof Ce){if(7001==e.code)throw e;t=e.severity}throw new Ce(t,1,1007,e)})}(i,e,t,n)}),u=Date.now(),l=0;a.promise.then(function(){l=Date.now()-u},function(){});var d=0;o.promise.then(function(){d=Date.now()},function(){});var h=s.ab(function(r){var a=Date.now()-d,o=r.response;return o.timeMs+=l,o.timeMs+=a,r.ql||!i.s||o.fromCache||"HEAD"==t.method||e!=ta||i.s(o.timeMs,o.data.byteLength,$r(n),t,n),i.F&&i.F(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new ea(h.promise,function(){return h.abort()},r),Wr(this.u,a),a},H("shaka.net.NetworkingEngine",qr),qr.prototype.request=qr.prototype.request,qr.prototype.destroy=qr.prototype.destroy,qr.makeRequest=Jr,qr.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},qr.prototype.clearCommonAccessTokenMap=qr.prototype.Fi,qr.prototype.clearAllResponseFilters=qr.prototype.ik,qr.prototype.unregisterResponseFilter=qr.prototype.qm,qr.prototype.registerResponseFilter=qr.prototype.Tl,qr.prototype.clearAllRequestFilters=qr.prototype.hk,qr.prototype.unregisterRequestFilter=qr.prototype.pm,qr.prototype.registerRequestFilter=qr.prototype.Sl,qr.unregisterScheme=function(e){ia.delete(e)},qr.registerScheme=Xr,qr.prototype.configure=qr.prototype.configure,qr.NumBytesRemainingClass=Zr,v(ea,Br),qr.PendingRequest=ea;var ta=1;qr.RequestType={MANIFEST:0,SEGMENT:ta,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},qr.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 na=3;qr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:na};var ia=new Map;function ra(e){this.g=!1,this.h=new jr,this.i=e}function aa(e,t){if(e.g){if(t instanceof Ce&&7003==t.code)throw t;throw new Ce(2,7,7003,t)}}function oa(e){for(var t=new Map,n=c(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function sa(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function ua(e,t){this.h=ke(e),this.i=t==ca,this.g=0}function la(){return new Ce(2,3,3e3)}ra.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))},(r=ua.prototype).Oa=function(){return this.g<this.h.byteLength},r.Ua=function(){return this.g},r.getLength=function(){return this.h.byteLength},r.aa=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw la()}},r.Fa=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw la()}},r.W=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw la()}},r.Jh=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw la()}},r.Ld=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw la()}if(2097151<t)throw new Ce(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},r.Xb=function(e){if(this.g+e>this.h.byteLength)throw la();var t=Ee(this.h,this.g,e);return this.g+=e,t}
1,r.skip=function(e){if(this.g+e>this.h.byteLength)throw la();this.g+=e},r.vj=function(e){if(this.g<e)throw la();this.g-=e},r.seek=function(e){if(0>e||e>this.h.byteLength)throw la();this.g=e},r.hd=function(){for(var e=this.g;this.Oa()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=Ee(this.h,e,this.g-e),this.g+=1,Oe(e)},H("shaka.util.DataViewReader",ua),ua.prototype.readTerminatedString=ua.prototype.hd,ua.prototype.seek=ua.prototype.seek,ua.prototype.rewind=ua.prototype.vj,ua.prototype.skip=ua.prototype.skip,ua.prototype.readBytes=ua.prototype.Xb,ua.prototype.readUint64=ua.prototype.Ld,ua.prototype.readInt32=ua.prototype.Jh,ua.prototype.readUint32=ua.prototype.W,ua.prototype.readUint16=ua.prototype.Fa,ua.prototype.readUint8=ua.prototype.aa,ua.prototype.getLength=ua.prototype.getLength,ua.prototype.getPosition=ua.prototype.Ua,ua.prototype.hasMoreData=ua.prototype.Oa;var ca=1;function da(){this.i=new Map,this.h=new Map,this.g=!1}function ha(e){for(var t=ba(e);e.reader.Oa()&&!e.parser.g;)e.parser.Gd(e.start+t,e.reader,e.partialOkay)}function pa(e){for(var t=ba(e),n=e.reader.W(),i=0;i<n&&(e.parser.Gd(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function fa(e){var t=ba(e);for(e.reader.skip(78);e.reader.Oa()&&!e.parser.g;)e.parser.Gd(e.start+t,e.reader,e.partialOkay)}function ga(e){var t=ba(e);e.reader.skip(8);var n=e.reader.Fa();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.Oa()&&!e.parser.g;)e.parser.Gd(e.start+t,e.reader,e.partialOkay)}function ma(e){return function(t){e(t.reader.Xb(t.reader.getLength()-t.reader.Ua()))}}function va(e){for(var t=0,n=(e=c(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function ya(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function ba(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}ua.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ca},(r=da.prototype).box=function(e,t){return e=va(e),this.i.set(e,Ta),this.h.set(e,t),this},r.V=function(e,t){return e=va(e),this.i.set(e,Sa),this.h.set(e,t),this},r.stop=function(){this.g=!0},r.parse=function(e,t,n){for(e=new ua(e,0),this.g=!1;e.Oa()&&!this.g;)this.Gd(0,e,t,n)},r.Gd=function(e,t,n,i){var r=t.Ua();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.W(),o=t.W(),s=ya(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.Ua()+8>t.getLength())return void(this.g=!0);a=t.Ld(),u=!0}var l=this.h.get(o);if(l){var c=null,d=null;if(this.i.get(o)==Sa){if(i&&t.Ua()+4>t.getLength())return void(this.g=!0);c=(d=t.W())>>>24,d&=16777215}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:(i=o-t.Ua(),l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new ua(t=0<i?t.Xb(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u}))}else t.skip(Math.min(r+a-t.Ua(),t.getLength()-t.Ua()))}},H("shaka.util.Mp4Parser",da),da.headerSize=ba,da.typeToString=ya,da.allData=ma,da.audioSampleEntry=ga,da.visualSampleEntry=fa,da.sampleDescription=pa,da.children=ha,da.prototype.parseNext=da.prototype.Gd,da.prototype.parse=da.prototype.parse,da.prototype.stop=da.prototype.stop,da.prototype.fullBox=da.prototype.V,da.prototype.box=da.prototype.box;var Ta=0,Sa=1;function wa(e){var t=this;this.g=[],this.h=[],this.data=[],(new da).box("moov",ha).box("moof",ha).V("pssh",function(e){if(!(1<e.version)){var n=Ee(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(Ye(e.reader.Xb(16))),0<e.version){n=e.reader.W();for(var i=0;i<n;i++){var r=Ye(e.reader.Xb(16));t.h.push(r)}}}}).parse(e)}function Aa(e,t,n,i){var r=e.length,a=t.length+16+r;0<i&&(a+=4+16*n.size);var o=new Uint8Array(a),s=ke(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,1886614376),u+=4,1>i?s.setUint32(u,0):s.setUint32(u,16777216),u+=4,o.set(t,u),u+=t.length,0<i)for(s.setUint32(u,n.size),u+=4,n=(t=c(n)).next();!n.done;n=t.next())n=Xe(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function Ea(e){var t=this;this.D=e,this.j=this.B=null,this.ba=this.Z=!1,this.H=0,this.g=null,this.s=new xt,this.i=new Map,this.P=[],this.C=new Map,this.J=!1,this.m=new jr,this.h=null,this.u=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.U=new Map,this.$=new Map,this.K=new Ki(function(){return function(e){var t=e.U,n=e.$;n.clear(),t.forEach(function(e,t){return n.set(t,e)}),t=Array.from(n.values()),t.length&&t.every(function(e){return"expired"==e})&&e.u(new Ce(2,6,6014)),e.D.Lf(sa(n))}(t)}),this.N=!1,this.L=[],this.R=!1,this.I=new Ki(function(){!function(e){e.i.forEac
1h(function(t,n){var i=t.Eh,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.Eh=r)})}(t)}),this.m.catch(function(){}),this.l=new ra(function(){return function(e){return D(function(t){switch(t.g){case 1:return e.s.release(),e.s=null,e.m.reject(),e.I.stop(),e.I=null,e.K.stop(),e.K=null,S(t,ja(e),2);case 2:if(!e.j){t.A(3);break}return A(t,4),S(t,e.j.setMediaKeys(null),6);case 6:x(t,5);break;case 4:k(t);case 5:e.j=null;case 3:e.g=null,e.B=null,e.C=new Map,e.h=null,e.u=function(){},e.D=null,e.Y=!1,e.G=null,w(t)}})}(t)}),this.Y=!1,this.F=this.G=null,this.O=function(){return!1}}function xa(e,t,n,i){i=void 0===i||i,e.C=new Map;for(var r=(n=c(n)).next();!r.done;r=n.next())e.C.set(r.value,{initData:null,initDataType:null});for(r=(n=c(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.C.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.N=0<e.C.size,ka(e,t,i)}function ka(e,t,n){var r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w;return D(function(A){if(1==A.g){for(Ha(e.h.clearKeys,t),r=t.some(function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)}),a=oa(e.h.servers),o=oa(e.h.advanced||{}),!r&&n&&function(e,t){var n=[];for(t.forEach(function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=c(e),t=e.next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(t,a),s=new WeakSet,u=c(t),l=u.next();!l.done;l=u.next())for(d=l.value,h=Ba(d),p=c(h),f=p.next();!f.done;f=p.next())g=f.value,s.has(g)||(s.add(g),Ga(g,a,o,e.h.keySystemsMapping));for(m=function(t,n){for(var r=[],a=(t=c(t)).next();!a.done;a=t.next()){var s,u=(a=a.value)[n]||o.has(a.keySystem)&&o.get(a.
1keySystem)[n]||"";if((s=""==u)&&(s=!!(s=a.keySystem)&&!!s.match(/^com\.widevine\.alpha/)),s&&("audioRobustness"==n?u=[e.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(u=[e.h.defaultVideoRobustnessForWidevine])),"string"==typeof u)r.push(a);else if(Array.isArray(u))for(0===u.length&&(u=[""]),s=(u=c(u)).next();!s.done;s=u.next()){var l={};r.push(i({},a,(l[n]=s.value,l)))}}return r},v=new WeakSet,y=c(t),b=y.next();!b.done;b=y.next())(T=b.value).video&&!v.has(T.video)&&(T.video.drmInfos=m(T.video.drmInfos,"videoRobustness"),T.video.drmInfos=m(T.video.drmInfos,"audioRobustness"),v.add(T.video)),T.audio&&!v.has(T.audio)&&(T.audio.drmInfos=m(T.audio.drmInfos,"videoRobustness"),T.audio.drmInfos=m(T.audio.drmInfos,"audioRobustness"),v.add(T.audio));return S(A,ir(t,e.N,e.Y,e.h.preferredKeySystems),2)}return aa(e.l),r||0<a.size?(w=Ra(e,void 0,t),A.return(r?w:w.catch(function(){}))):(e.Z=!0,A.return(Promise.resolve()))})}function Ia(e){var t;return D(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.A(2);break}return S(n,e.G,3);case 3:return aa(e.l),n.return();case 2:return A(n,4),e.G=e.j.setMediaKeys(e.B),S(n,e.G,6);case 6:x(n,5);break;case 4:t=k(n),e.u(new Ce(2,6,6003,t.message));case 5:aa(e.l),w(n)}})}function Ca(e){var t,n,i,r;
1return D(function(a){if(1==a.g)return e.C.size?(e.C.forEach(function(t,n){Na(e,n,t)}),S(a,e.m,3)):a.A(2);if(2!=a.g){if(0<(e.g&&e.g.keyIds||new Set([])).size&&function(e){for(var t=c(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.U.get(n.value))return!1;return!0}(e))return a.return(e.m);e.J=!1,e.m=new jr,e.m.catch(function(){})}for(t=(e.g?e.g.initData:[])||[],n=c(t),i=n.next();!i.done;i=n.next())r=i.value,Ma(e,r.initDataType,r.initData);return Fa(e)&&e.m.resolve(),a.return(e.m)})}function Ma(e,t,n){if(n.length){if(e.h.ignoreDuplicateInitData){for(var i=e.i.values(),r=(i=c(i)).next();!r.done;r=i.next())if(we(n,r.value.initData))return;var a=!1;if(e.C.forEach(function(e){!a&&we(n,e.initData)&&(a=!0)}),a)return}e.J=!0,0<e.i.size&&Fa(e)&&(e.m.resolve(),e.J=!1,e.m=new jr,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.B.createSession(i)}catch(t){return void e.u(new Ce(2,6,6005,t.message))}e.s.o(r,"message",function(t){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.R?e.L.push(t):_a(e,t)}),e.s.o(r,"keystatuseschange",function(t){return Oa(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Eh:1/0,Nb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){return t=n,n instanceof Ce||(t=new Ce(2,6,6016,n)),void e.u(t)}e.h.logLicenseExchange&&We(n),r.generateRequest(t,n).catch(function(t){if(!e.l.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=Math.pow(2,32)),i="0x"+i.toString(16)}e.u(new Ce(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}
1function La(e){return e=te(e=e.i.keys(),function(e){return e.sessionId}),Array.from(e)}function Ra(e,t,n){var i,r,a,o,s,u,l;return D(function(d){switch(d.g){case 1:if(i=new Map,n.length){r=function(e,t,n){for(var i=c(t),r=i.next();!r.done;r=i.next())for(var a=(r=c(Ba(r.value))).next();!a.done;a=r.next())a=a.value,n.has(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);if(1==n.size&&n.has(""))throw new Ce(2,6,6e3);i=e.h.preferredKeySystems,i.length||(r=oa(e.h.servers),1==r.size&&(i=Array.from(r.keys()))),r=c(i);var o=r.next();for(a={};!o.done;a={oj:void 0},o=r.next()){a.oj=o.value;for(var s=(o=c(t)).next();!s.done;s=o.next())if(s=s.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.oj}}(a)))return s.keySystemAccess}for(r=c([!0,!1]),a=r.next();!a.done;a=r.next())for(a=a.value,o=c(t),s=o.next();!s.done;s=o.next())for(var u=(s=c(s.value.decodingInfos)).next();!u.done;u=s.next())if((u=u.value).supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!i.includes(l)){var d=n.get(l);for(!d&&e.h.keySystemsMapping[l]&&(d=n.get(e.h.keySystemsMapping[l])),d=(l=c(d)).next();!d.done;d=l.next())if(!!d.value.licenseServerUri==a)return u.keySystemAccess}}return null}(e,n,i),d.A(2);break}return S(d,function(e,t){var n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y;return D(function(b){switch(b.g){case 1:if(1==t.size&&t.has(""))throw new Ce(2,6,6e3);for(i=c(t.values()),r=i.next();!r.done;r=i.next())0==(a=r.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=c(e.h.preferredKeySystems),s=o.next();
1case 2:if(s.done){b.A(4);break}if(u=s.value,!t.has(u)){b.A(3);break}return l=t.get(u),A(b,6),S(b,navigator.requestMediaKeySystemAccess(u,[l]),8);case 8:return n=b.h,b.return(n);case 6:k(b);case 7:aa(e.l);case 3:s=o.next(),b.A(2);break;case 4:d=c([!0,!1]),h=d.next();case 9:if(h.done){b.A(11);break}p=h.value,f=c(t.keys()),g=f.next();case 12:if(g.done){h=d.next(),b.A(9);break}if(m=g.value,v=t.get(m),y=v.drmInfos.some(function(e){return!!e.licenseServerUri}),y!=p){b.A(13);break}return A(b,15),S(b,navigator.requestMediaKeySystemAccess(m,[v]),17);case 17:return n=b.h,b.return(n);case 15:k(b);case 16:aa(e.l);case 13:g=f.next(),b.A(12);break;case 11:return b.return(n)}})}(e,t),3);case 3:r=d.h;case 2:if(!(a=r)){if(!navigator.requestMediaKeySystemAccess)throw new Ce(2,6,6020);throw new Ce(2,6,6001)}if(aa(e.l),A(d,4),a.getConfiguration(),o=e.h.keySystemsMapping[a.keySystem]||a.keySystem,n.length){var h=o,p=i.get(o),f=[],g=[],m=[],v=[],y=[],b=new Set,T=new Set;Va(p,f,g,v,m,y,b,T);var w=e.N?"persistent-license":"temporary";for(h={keySystem:h,encryptionScheme:f[0],licenseServerUri:g[0],distinctiveIdentifierRequired:p[0].distinctiveIdentifierRequired,persistentStateRequired:p[0].persistentStateRequired,sessionType:p[0].sessionType||w,audioRobustness:p[0].audioRobustness||"",videoRobustness:p[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:m[0],initData:y,keyIds:b},0<T.size&&(h.keySystemUris=T),T=(p=c(p)).next();!T.done;T=p.next())(T=T.value).distinctiveIdentifierRequired&&(h.distinctiveIdentifierRequired=T.distinctiveIdentifierRequired),T.persistentStateRequired&&(h.persistentStateRequired=T.persistentStateRequired);p=h}else p=o,T=t.get(o),h=[],f=[],g=[],m=[],v=[],y=new Set,Va(T.drmInfos,h,f,m,g,v,y),p={keySystem:p,encryptionScheme:h[0],licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==T.distinctiveIdentifier,persistentStateRequired:"required"==T.persistentState,sessionType:T.sessionTypes[0]||"temporary",audioRobustness:(T.audioCapabilities?T.audioCapabilities[0].robustness:"")||"",videoRobustness:(T.videoCapabilities?T.videoCapabilities[0].robustness:"")||"",serverCertificate:m[0],serverCertificateUri:g[0],initData:v,keyIds:y};if(e.g=p,!e.g.licenseServerUri)throw new Ce(2,6,6012,e.g.keySystem);return S(d,a.createMediaKeys(),6);case 6:if(s=d.h,aa(e.l),e.B=s,""==e.h.minHdcpVersion||!("getStatusForPolicy"in e.B)){d.A(7);break}return A(d,8),S(d,e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),10);case 10:if("usable"!=d.h)throw new Ce(2,6,6018);aa(e.l),x(d,7,4);break;case 8:if((u=k(d,4))instanceof Ce)throw u;throw new Ce(2,6,6019,u.message);case 7:return e.Z=!0,S(d,function(e){var t,n;return D(function(i){switch(i.g){case 1:if(!e.B||!e.g)return i.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){i.A(2);break}return t=Jr([e.g.serverCertificateUri],e.h.retryParameters),A(i,3),S(i,e.D.xc.request(5,t,{isPreload:e.O()}).promise,5);case 5:n=i.h,e.g.serverCertificate=Ee(n.data),x(i,4);break;case 3:throw new Ce(2,6,6017,k(i));case 4:if(e.l.g)return i.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(A(i,6),S(i,e.B.setServerCertificate(e.g.serverCertificate),8)):i.return();case 8:x(i,0);break;case 6:throw new Ce(2,6,6004,k(i).message)}})}(e),11);case 11:aa(e.l),x(d,0);break;case 4:if(l=k(d),aa(e.l,l),e.g=null,l instanceof Ce)throw l;throw new Ce(2,6,6002,l.message)}})}function Pa(e){Fa(e)&&e.m.resolve()}function Da(e,t){new Ki(function(){t.loaded=!0,Pa(e)}).X(Ka)}function Na(e,t,n){var i,r,a,o,s,u,l;return D(function(c){switch(c.g){case 1:try{i=e.B.createSession("persistent-license")}catch(t){return r=new Ce(2,6,6005,t.message),e.u(r),c.return(Promise.reject(r))}return e.s.o(i,"message",function(t){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.R?e.L.push(t):_a(e,t)}),e.s.o(i,"keystatuseschange",function(t){return Oa(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Eh:1/0,Nb:null,type:"persistent-license"},e.i.set(i,a),A(c,2),S(c,i.load(t),4);case 4:return o=c.h,aa(e.l),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.u(new Ce(s,6,6013)),a.loaded=!0),Da(e,a),Pa(e),c.return(i);case 2:u=k(c),aa(e.l,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.u(new Ce(l,6,6005,u.message)),a.loaded=!0,Pa(e);case 3:return c.return(Promise.resolve())}})}function _a(e,t){var n,i,r,a,o,s,u,l,d,h,p,f,g,m;D(function(v){switch(v.g){case 1:if(n=t.target,e.h.logLicenseExchange&&We(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=Jr([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if("org.w3.clearkey"===e.g.keySystem){var y=o,b=e.g;try{var T=je(y.body);if(T){var E=JSON.parse(T);E.type||(E.type=b.sessionType,y.body=Be(JSON.stringify(E)))}}catch(e){}}if(Lr(e.g.keySystem))if((y=Ue(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(T=(b=c(b=Sn(y=fn(y,"PlayReadyKeyMessage"),"HttpHeader"))).next();!T.done;T=b.next())T=Sn(E=T.value,"name")[0],E=Sn(E,"value")[0],o.headers[bn(T)]=bn(E);y=Sn(y,"Challenge")[0],o.body=qe(bn(y))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),A(v,2),d=e.D.xc.request(2,o,{isPreload:e.O()}),e.P.push(d),S(v,d.promise,4);case 4:l=v.h,Zt(e.P,d),x(v,3);break;case 2:return h=k(v),e.l.g?v.return():(p=new Ce(2,6,6007,h),1==e.i.size?(e.u(p),i&&i.Nb&&i.Nb.reject(p)):(i&&i.Nb&&i.Nb.reject(p),e.i.delete(n),Fa(e)&&(e.m.resolve(),e.K.X(.1))),v.return());case 3:return e.l.g?v.return():(e.H+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&We(l.data),A(v,5),S(v,n.update(l.data),7));case 7:x(v,6);break;case 5:return f=k(v),g=new Ce(2,6,6008,f.message),e.u(g),i&&i.Nb&&i.Nb.reject(g),v.return();case 6:if(e.l.g)return v.return();m=new z("drmsessionupdate"),e.D.onEvent(m),i&&(i.Nb&&i.Nb.resolve(),Da(e,i)),w(v)}})}function Oa(e,t){t=t.target;var n=e.i.get(t),i=!1;
1t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(a=Re(),Lr(e.g.keySystem)&&16==r.byteLength&&a.Ph()){var o=(a=ke(r)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(i=!0),r=Ye(r).slice(0,32),e.U.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.Nb&&(e.i.delete(t),Ua(t)),Fa(e)&&(e.m.resolve(),e.K.X(Wa))}function Ua(e){return D(function(t){return 1==t.g?(A(t,2),S(t,Yi(za,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.g?x(t,0):(k(t),void w(t))})}function ja(e){var t;return D(function(n){return t=Array.from(e.i.entries()),e.i.clear(),S(n,Promise.all(t.map(function(t){var n=(t=c(t)).next().value,i=t.next().value;return D(function(t){return 1==t.g?(A(t,2),e.ba||e.C.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?S(t,Ua(n),5):S(t,n.remove(),5)):2!=t.g?x(t,0):(k(t),void w(t))})})),0)})}function Ba(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Fa(e){return function(e,t){for(var n=(e=c(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),function(e){return e.loaded})}function Va(t,n,i,r,a,o,s,u){for(var l=[],h=(t=c(t)).next(),p={};!h.done;p={Qa:void 0},h=t.next()){if(p.Qa=h.value,n.includes(p.Qa.encryptionScheme)||n.push(p.Qa.encryptionScheme),"org.w3.clearkey"==p.Qa.keySystem&&p.Qa.licenseServerUri.startsWith("data:application/json;base64,")?l.includes(p.Qa.licenseServerUri)||l.push(p.Qa.licenseServerUri):i.includes(p.Qa.licenseServerUri)||i.push(p.Qa.licenseServerUri),a.includes(p.Qa.serverCertificateUri)||a.push(p.Qa.serverCertificateUri),p.Qa.serverCertificate&&(r.some(function(e){return function(t){return we(t,e.Qa.serverCertificate)}}(p))||r.push(p.Qa.serverCertificate)),p.Qa.initData)for(var f=(h=c(p.Qa.initData)).next(),g={};!f.done;g={sh:void 0},f=h.next())g.sh=f.value,o.some(function(e){return function(t){var n=e.sh;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&we(t.initData,n.initData)}}(g))||o.push(g.sh);if(p.Qa.keyIds)for(f=(h=c(p.Qa.keyIds)).next();!f.done;f=h.next())s.add(f.value);if(p.Qa.keySystemUris&&u)for(h=(p=c(p.Qa.keySystemUris)).next();!h.done;h=p.next())u.add(h.value)}if(1==l.length)i.push(l[0]);else if(0<l.length){for(n=[],r=(l=c(l)).next();!r.done;r=l.next())r=e.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),n.push.apply(n,d(r.keys));l=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(l))}}function Ga(t,n,i,r){var a=t.keySystem;!a||"org.w3.clearkey"==a&&t.licenseServerUri||(n.size&&n.get(a)&&(n=n.get(a),t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}function Ha(e,t){if(0!=(e=oa(e)).size){e=Ze(e);for(var n=(t=c(t)).next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(r=Ea.prototype).destroy=function(){return this.l.destroy()},r.configure=function(e,t){this.h=e,t&&(this.O=t),this.I&&this.I.ya(this.h.updateExpirationTime)},r.$b=function(e){var t,n,i=this;return D(function(r){if(1==r.g)return i.j===e?r.return():i.B?(i.j=e,i.s.qa(i.j,"play",function(){for(var e=c(i.L),t=e.next();!t.done;t=e.next())_a(i,t.value);i.R=!0,i.L=[]}),i.j.remote?(i.s.o(i.j.remote,"connect",function(){return ja(i)}),i.s.o(i.j.remote,"connecting",function(){return ja(i)}),i.s.o(i.j.remote,"disconnect",function(){return ja(i)})):"webkitCurrentPlaybackTargetIsWireless"in i.j&&i.s.o(i.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ja(i)}),i.F=i.g&&i.g.initData.find(function(e){return 0<e.initData.length}
1)||null,t=i.g.keySystem,n="com.apple.fps"==t,"GECKO"===Re().Ia()&&t.startsWith("com.microsoft.playready.recommendation")&&(n=!0),n||!(i.F||i.C.size||i.h.parseInbandPsshEnabled)?(i.s.o(i.j,"encrypted",function(e){return function(e,t){return D(function(n){if(1==n.g)return S(n,Ia(e),2);Ma(e,t.initDataType,Ee(t.initData)),w(n)})}(i,e)}),r.A(2)):S(r,Ia(i),2)):(i.s.qa(e,"encrypted",function(){i.u(new Ce(2,6,6010))}),r.return());Ca(i).catch(function(){}),w(r)})},r.eh=function(){var e=this,t=this.i.keys();return t=te(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}),Array.from(t)},r.be=function(){for(var e=1/0,t=this.i.keys(),n=(t=c(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},r.nf=function(){return sa(this.$)};var za=1,Ka=5,Wa=.5;function qa(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=c(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function Xa(e,t){if(e.mimeType!=t.mimeType)return!1;if(e=e.codecs.split(",").map(function(e){return Ri(e)}),t=t.codecs.split(",").map(function(e){return Ri(e)}),e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Ya(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;for(var n=(e=c(e)).next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function Ja(){}function Qa(){this.g=Za,this.i=(new Map).set(Za,2).set($a,1),this.h=0}qa.prototype.add=function(e,t){var n,i=this.h;if(t=void 0===t||t,!(n=!!i.audio!=!!e.audio||!!i.video!=!!e.video||i.language!=e.language)&&(n=i.audio&&e.audio)){n=i.audio;var r=e.audio;n=!(!((!n.channelsCount||!r.channelsCount||2<n.channelsCount||2<r.channelsCount)&&n.channelsCount!=r.channelsCount||n.spatialAudio!==r.spatialAudio||t&&!Xa(n,r))&&Ya(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||Xa(i,n))&&Ya(i.roles,n.roles))),!n&&(this.g.add(e),!0)},qa.prototype.values=function(){return this.g.values()},H("shaka.media.AdaptationSet",qa),H("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),Ja.prototype.create=function(){},Ja.prototype.configure=function(){},Ja.prototype.getConfiguration=function(){},H("shaka.media.AdaptationSetCriteria",Ja);var $a=0,Za=1;function eo(e,t,n){this.g=e,this.i=t,this.h=n}function to(e,t){return D(function(n){if(1==n.g)return S(n,Zi(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||Qi(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(pr))throw new Ce(2,4,4032);return n.return(io(e,t))})}function no(e,t){var n=e.g.restrictions;e=e.i;for(var i=!1,r=(t=c(t.variants)).next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=$i(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function io(e,t){var n=no(e,t);if(t){var i=e.h?e.h.g:null;if(i&&e.h.B){for(var r=new Set,a=c(t.variants),o=a.next();!o.done;o=a.next())(o=o.value).audio&&r.add(o.audio),o.video&&r.add(o.video);for(a=(r=c(r)).next();!a.done;
1a=r.next())ro(e,i.keySystem,a.value)}ao(e,t)}return n}function ro(e,t,n){for(var i=(n=c(n.drmInfos)).next();!i.done;i=n.next())if((i=i.value).keySystem==t)for(var r=(i=c(i.initData||[])).next();!r.done;r=i.next())r=r.value,Ma(e.h,r.initDataType,r.initData)}function ao(e,t){e=e.h?e.h.nf():{};var n=Object.keys(e);n=n.length&&"00"==n[0];for(var i=!1,r=!1,a=new Set,o=new Set,s=new Set,u=(t=c(t.variants)).next();!u.done;u=t.next())(u=u.value).audio&&s.add(u.audio),u.video&&s.add(u.video),u.allowedByApplication?u.allowedByKeySystem&&(i=!0):r=!0;for(t=(s=c(s)).next();!t.done;t=s.next())if((t=t.value).keyIds.size)for(u=(t=c(t.keyIds)).next();!u.done;u=t.next()){u=u.value;var l=e[n?"00":u];l?oo.includes(l)&&o.add(l):a.add(u)}if(!i)throw new Ce(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var oo=["output-restricted","internal-error"];function so(){}function uo(e,t){co.set(e,t)}function lo(e,t){if(t){var n=co.get(t.toLowerCase());if(n)return n}throw new Ce(2,4,4e3,e,t)}H("shaka.media.ManifestParser",so),so.unregisterParserByMime=function(e){co.delete(e)},so.registerParserByMime=uo,so.registerParserByExtension=function(){Mt("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},so.AccessibilityPurpose={En:"visually impaired",Om:"hard of hearing",nn:"spoken subtitles"};var co=new Map;function ho(e,t){var n=null,i=null,r=null,a=null,o=e.W();return 1&t&&(r=e.Ld()),2&t&&(a=e.W()),8&t&&(n=e.W()),16&t&&(i=e.W()),{trackId:o,Yd:n,Zd:i,fk:r,wj:a}}function po(e,t){return 1==t?(t=e.W(),e=e.W(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.W()}}function fo(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.W(),e.skip(4),e=e.Fa(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function go(e,t,n){var i=e.W(),r=[],a=null;1&n&&(a=e.Jh()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={Rh:null,sampleSize:null,Xf:null};256&n&&(s.Rh=e.W()),512&n&&(s.sampleSize=e.W()),1024&n&&e.skip(4),2048&n&&(s.Xf=0==t?e.W():e.Jh()),r.push(s)}return{Jn:i,Qh:r,Ng:a}}function mo(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Fa();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.Fa()+e.Fa()/65536}}function vo(e){return{codec:ya(e=e.W())}}function yo(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function bo(e){return(10>e?"0":"")+e}function To(e){if(!Po){Po=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);zo=Ro("ftyp",t,i,t,n),t=Ro("dref",Ko),Wo=Ro("dinf",t)}this.g=e}function So(e){for(var t=[],n=c(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=Ro;var s=o.id+1,u=o.stream.width||0,l=o.stream.height||0;"audio"==o.type&&(l=u=0);var h=o.duration*o.timescale,p=Math.floor(h/(Do+1));switch(h=Math.floor(h%(Do+1)),s=Ro("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(d(Co(s,4)),[0,0,0,0],d(Co(p,4)),d(Co(h,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],d(Co(u,2)),[0,0],d(Co(l,2)),[0,0]))),u=Ro,p=o.duration*o.timescale,l=Math.floor(p/(Do+1)),p=Math.floor(p%(Do+1)),h=(h=o.stream.language).charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96,l=Ro("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(d(Co(o.timescale,4)),d(Co(l,4)),d(Co(p,4)),d(Co(h,2)),[0,0]))),p=o,h=new Uint8Array([]),p.type){case"video":h=_o;break;case"audio":h=Oo}p=Ro("hdlr",h);e:{switch(o.type){case"video":o=Ro("minf",Ro("vmhd",Vo),Wo,wo(o));break e;case"audio":o=Ro("minf",Ro("smhd",Go),Wo,wo(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,p,o)),a.call(r,i)}for(t=Je.apply(ze,d(t)),n=Ro,i=(a=e.g[0]).duration*a.timescale,r=Math.floor(i/(Do+1)),i=Math.floor(i%(Do+1)),r=Ro("mvhd",r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(d(Co(a.timescale,4)),d(Co(r,4)),d(Co(i,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,255]))),i=[],u=(e=c(e.g)).next();!u.done;u=e.next())s=(o=i).push,u=Ro("trex",u=new Uint8Array([0,0,0,0].concat(d(Co(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),s.call(o,u);if(e=Ro("mvex",e=Je.apply(ze,d(i))),i=[],a.encrypted){for(o=(a=c(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=c(o.initData)).next();!s.done;s=o.next())i.push(s.value.initData);a=Je.apply(ze,d(i))}else a=new Uint8Array([]);return e=n("moov",r,t,e,a),(t=new Uint8Array(zo.byteLength+e.byteLength)).set(zo),t.set(e,zo.byteLength),t}function wo(e){var t=Ro,n="aac";
1e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=Re().we()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,0<e.Wa.byteLength)var r=Ro("avcC",e.Wa);else{r=Ro;for(var a=7,o=[],s=[],u=0,l=0,c=0,h=0;h<e.Eb.length;h++){var p=Mo(e.Eb[h]);switch(31&p[0]){case 7:o.push(p),a+=p.length+2;break;case 8:s.push(p),a+=p.length+2}}for(0<o.length&&(u=o[0][1],c=o[0][2],l=o[0][3]),h=0,(a=new Uint8Array(a))[h++]=1,a[h++]=u,a[h++]=c,a[h++]=l,a[h++]=255,a[h++]=224|o.length,u=0;u<o.length;u++)a[h++]=(65280&o[u].length)>>8,a[h++]=255&o[u].length,a.set(o[u],h),h+=o[u].length;for(a[h++]=s.length,o=0;o<s.length;o++)a[h++]=(65280&s[o].length)>>8,a[h++]=255&s[o].length,a.set(s[o],h),h+=s[o].length;r=r("avcC",a)}n=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(d(Co(n,2)),d(Co(i,2)),[0,72,0,0,0,72,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])),i="avc1",s=Ao(e),o=new Uint8Array([]),e.encrypted&&(o=xo(0,e.stream,e.codecs),i="encv"),i=Ro(i,n,r,s,o)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.Wa.byteLength&&(n=Ro("hvcC",e.Wa)),i=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(d(Co(i,2)),d(Co(r,2)),[0,72,0,0,0,72,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])),r="hvc1",s=Ao(e),o=new Uint8Array([]),e.encrypted&&(o=xo(0,e.stream,e.codecs),r="encv"),i=Ro(r,i,n,s,o));break;case"audio":"mp3"==n?e=Ro(".mp3",Eo(e)):"ac-3"==n?(n=Ro("dac3",e.Ma),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=xo(0,e.stream,e.codecs),i="enca"),e=Ro(i,Eo(e),n,r)):"ec-3"==n?(n=Ro("dec3",e.Ma),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=xo(0,e.stream,e.codecs),i="enca"),e=Ro(i,Eo(e),n,r)):"opus"==n?(n=Ro("dOps",e.Ma),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=xo(0,e.stream,e.codecs),i="enca"),e=Ro(i,Eo(e),n,r)):(0<e.Ma.byteLength?n=Ro("esds",e.Ma):(n=Ro,i=e.id+1,r=e.stream.channelsCount||2,o=e.stream.audioSamplingRate||44100,u=et("audio",e.codecs.split(",")),s=(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})[o],"mp4a.40.5"!==u&&"mp4a.40.29"!==u||(s=l[2*o]),o=parseInt(u.split(".").pop(),10),n=n("esds",i=new Uint8Array([0,0,0,0,3,25].concat(d(Co(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,o<<3|s>>>1,s<<7|r<<3,6,1,2])))),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=xo(0,e.stream,e.codecs),i="enca"),e=Ro(i,Eo(e),n,r)),i=e}return t("stbl",e=Ro("stsd",Ho,i),Ro("stts",Uo),Ro("stsc",jo),Ro("stsz",Fo),Ro("stco",Bo))}function Ao(e){if(!e.bb&&!e.eb)return new Uint8Array([]);var t=e.eb;return Ro("pasp",e=new Uint8Array([].concat(d(Co(e.bb,4)),d(Co(t,4)))))}function Eo(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(d(Co(e.stream.audioSamplingRate||44100,2)),[0,0]))}function xo(e,t,n){e=Ro,n=Ro("frma",n=new Uint8Array([].concat(d(Co(Lo(n.split(".")[0]),4)))));var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=Ro("schm",i=new Uint8Array([0,0,0,0].concat(d(Co(Lo(i),4)),[0,1,0,0]))),r=Ro;for(var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=(t=c(t.drmInfos)).next();!o.done;o=t.next())if((o=o.value)&&o.keyIds&&o.keyIds.size)for(var s=(o=c(o.keyIds)).next();!s.done;s=o.next())a=Mo(s.value);return e("sinf",n,i,r("schi",t=Ro("tenc",t=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function ko(e){for(var t=[],n=(e=c(e.g)).next();!n.done;n=e.next()){n=n.value;var i,r=t.push,a=r.apply,o=Ro,s=new Uint8Array([0,0,0,0].concat(d(Co(n.data?n.data.Yb:0,4))));s=Ro("mfhd",s);var u=n.data?n.data.Cb:[],l=new Uint8Array(4+u.length);for(i=0;i<u.length;i++){var h=u[i].flags;l[i+4]=h.pb<<4|h.sb<<2|h.rb}var p=(u=Ro("sdtp",l)).length+92;l=Ro,i=Ro("tfhd",i=new Uint8Array([0,0,0,58].concat(d(Co(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),h=n.data?n.data.baseMediaDecodeTime:0;var f=Math.floor(h%(Do+1));h=Ro("tfdt",h=new Uint8Array([1,0,0,0].concat(d(Co(Math.floor(h/(Do+1)),4)),d(Co(f,4)))));var g=p,m=12+16*(f=(p=n.data?n.data.Cb:[]).length),v=new Uint8Array(m);for(g+=8+m,v.set(["video"===n.type?1:0,0,15,1].concat(d(Co(f,4)),d(Co(g,4))),0),g=0;g<f;g++){var y=p[g];m=Co(y.duration,4);var b=Co(y.size,4),T=y.flags;
1y=Co(y.xb,4),v.set([].concat(d(m),d(b),[T.zb<<2|T.pb,T.sb<<6|T.rb<<4|T.Ab,61440&T.ob,15&T.ob],d(y)),12+16*g)}o=o("moof",s,u=l("traf",i,h,p=Ro("trun",v),u)),a.call(r,t,[o,Io(n)])}return Je.apply(ze,d(t))}function Io(e){return e=(e.data?e.data.Cb:[]).map(function(e){return e.data}),Ro("mdat",e=Je.apply(ze,d(e)))}function Co(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function Mo(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function Lo(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function Ro(e){var t=N.apply(1,arguments),n=No.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],No.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var Po=!1,Do=Math.pow(2,32)-1,No=new Map,_o=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]),Oo=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]),Uo=new Uint8Array([0,0,0,0,0,0,0,0]),jo=new Uint8Array([0,0,0,0,0,0,0,0]),Bo=new Uint8Array([0,0,0,0,0,0,0,0]),Fo=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Vo=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Go=new Uint8Array([0,0,0,0,0,0,0,0]),Ho=new Uint8Array([0,0,0,0,0,0,0,1]),zo=new Uint8Array([]),Ko=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Wo=new Uint8Array([]);function qo(e){function t(e){o.push(e),ha(e)}var n,i,r,a,o=[];if((new da).box("moof",t).box("traf",t).V("tfhd",function(e){n=e,r=ho(e.reader,e.flags)}).V("trun",function(e){i=e,a=go(e.reader,e.version,e.flags)}).parse(e),r&&2!==r.wj){var s=n.start+ba(n)+4+(null!==r.fk?8:0),u=ke(e);if(null!==r.wj)u.setUint32(s,2);else{Yo(e,n.start,n.size+4);var l=u.getUint32(n.start+8);u.setUint32(n.start+8,2|l),a&&null!==a.Ng&&u.setInt32(i.start+ba(i)+4,a.Ng+4),l=e.subarray(0,s),u=e.subarray(s),(e=new Uint8Array(e.byteLength+4)).set(l),l=[];for(var d=3;0<=d;d--)l.push(2>>8*d&255);for(e.set(new Uint8Array(l),s),e.set(u,s+4),u=(s=c(o)).next();!u.done;u=s.next())Yo(e,(u=u.value).start,u.size+4)}}return e}function Xo(e,t,n,i,r,a){var o=xo(new To([]),e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),ke(e).setUint32(4,a),e.set(o,i.size),Yo(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=Re().wf()?i.start:i.start+i.size,o=t.subarray(i),a.set(t.subarray(0,i)),a.set(e,i),a.set(o,i+e.byteLength),r=(t=c(r)).next();!r.done;r=t.next())Yo(a,(r=r.value).start,r.size+e.byteLength);return e=ke(a,n.start),n=ba(n),t=e.getUint32(n),e.setUint32(n,t+1),a}function Yo(e,t,n){0!=(t=(e=ke(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}function Jo(e,t,n,i,r,a,o,s){this.S=e,this.startByte=t,this.endByte=n,this.Ed=void 0===i?null:i,this.timescale=void 0===r?null:r,this.h=void 0===a?null:a,this.aesKey=void 0===o?null:o,this.g=this.mimeType=this.codecs=null,this.encrypted=void 0!==s&&s}function Qo(e,t){return e===t||(e&&t?e.Hc()==t.Hc()&&e.Fc()==t.Fc()&&tn(e.S().sort(),t.S().sort())&&we(e.cc(),t.cc()):e==t)}function $o(e,t,n,i,r,a,o,s,u,l,d,h,p,f,g,m){for(l=void 0===l?[]:l,f=void 0===f?es:f,this.startTime=e,this.j=this.endTime=t,this.D=n,this.startByte=i,this.endByte=r,this.ea=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===d?"":d,this.C=void 0===h?null:h,this.h=void 0===p?null:p,this.status=f,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=void 0===g?null:g,this.thumbnailSprite=null,this.i=-1,this.B=void 0!==m&&m,this.F=this.s=!1,t=(e=c(this.g)).next();!t.done;t=e.next())t.value.ej();this.B&&this.g.length&&this.g[this.g.length-1].dj(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}function Zo(e,t){e.ea=t;for(var n=(e=c(e.g)).next();!n.done;n=e.next())Zo(n.value,t)}Jo.prototype.Hc=function(){return this.startByte},Jo.prototype.Fc=function(){return this.endByte},Jo.prototype.ze=function(e){this.h=e},Jo.prototype.cc=function(){return this.h},H("shaka.media.InitSegmentReference",Jo),Jo.prototype.getEndByte=Jo.prototype.Fc,Jo.prototype.getStartByte=Jo.prototype.Hc,(r=$o.prototype).S=function(){return this.D()},r.getStartTime=function(){return this.startTime},r.Fk=function(){return this.endTime},r.Hc=function(){return this.startByte},r.Fc=function(){return this.endByte},r.fl=function(){return this.tilesLayout},r.cl=function(){return this.C},r.Ic=function(){return this.status},r.Hl=function(){this.status=ts},r.Bh=function(){this.preload=!0},r.isPreload=function(){return this.preload},r.Dd=function(){this.l=!1},r.xl=function(){return this.l},r.ej=function(){this.s=!0},r.zl=function(){return this.s},r.dj=function(){this.F=!0},r.yl=function(){return this.F},r.cj=function(){this.m=!0},r.rl=function(){return this.m},r.dg=function(e){this.thumbnailSprite=e},r.al=function(){return this.thumbnailSprite},r.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=c(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.j+=e},r.gi=function(e){null==this.h?X("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},r.ze=function(e,t){this.u=e,this.G=void 0!==t&&t},r.cc=function(e){var t=this.u;return(void 0===e||e)&&this.G&&(this.u=null),t},H("shaka.media.SegmentReference",$o),$o.prototype.getSegmentData=$o.prototype.cc,$o.prototype.setSegmentData=$o.prototype.ze,$o.prototype.syncAgainst=$o.prototype.gi,$o.prototype.offset=$o.prototype.offset,$o.prototype.getThumbnailSprite=$o.prototype.al,$o.prototype.setThumbnailSprite=$o.prototype.dg,$o.prototype.hasByterangeOptimization=$o.prototype.rl,$o.prototype.markAsByterangeOptimization=$o.prototype.cj,$o.prototype.isLastParti
1al=$o.prototype.yl,$o.prototype.markAsLastPartial=$o.prototype.dj,$o.prototype.isPartial=$o.prototype.zl,$o.prototype.markAsPartial=$o.prototype.ej,$o.prototype.isIndependent=$o.prototype.xl,$o.prototype.markAsNonIndependent=$o.prototype.Dd,$o.prototype.isPreload=$o.prototype.isPreload,$o.prototype.markAsPreload=$o.prototype.Bh,$o.prototype.markAsUnavailable=$o.prototype.Hl,$o.prototype.getStatus=$o.prototype.Ic,$o.prototype.getTileDuration=$o.prototype.cl,$o.prototype.getTilesLayout=$o.prototype.fl,$o.prototype.getEndByte=$o.prototype.Fc,$o.prototype.getStartByte=$o.prototype.Hc,$o.prototype.getEndTime=$o.prototype.Fk,$o.prototype.getStartTime=$o.prototype.getStartTime,$o.prototype.getUris=$o.prototype.S;var es=0,ts=1;function ns(e){return 1==e.length&&1e-4>e.end(0)-e.start(0)}function is(e){return!e||ns(e)?null:e.length?e.end(e.length-1):null}function rs(e,t){return!(!e||!e.length||ns(e)||t>e.end(e.length-1))&&t>=e.start(0)}function as(e,t){if(!e||!e.length||ns(e))return 0;for(var n=0,i=(e=c(os(e))).next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function os(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function ss(){}function us(e){return document.createElement(e)}function ls(){var e=document.createElement("button");return e.setAttribute("type","button"),e}function cs(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function ds(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;0<=i;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function hs(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ps(){return gs||(fs||(fs=new Ki(function(){gs=null})),(gs=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(gs=document.createElement("video")),fs.X(1),gs)}$o.Status={vm:es,Cn:ts,Ym:2},H("shaka.util.Dom",ss),ss.removeAllChildren=hs,ss.clearSourceFromVideo=ds;var fs=null,gs=null;function ms(){}function vs(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function ys(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function bs(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function Ts(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(2>e.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=Oe(Ee(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=Oe(Ee(e.data,3+n,a));return o="--\x3e"===i?Oe(Ee(e.data,4+n+a)):Ae(e.data.subarray(4+n+a)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=Oe(Ee(e.data,1,i)),e=Oe(Ee(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(n=e.data.indexOf(0))?null:(n=Oe(Ee(e.data,0,n)),t.description=n,"com.apple.streaming.transportStreamTimestamp"==n?(n=e.data.subarray(n.length+1),e=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=Ae(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(e=Oe(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=Oe(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Ae(e.data),t):null}function Ss(e){for(var t=0,n=[];vs(e,t);){var i=bs(e,t+6);for(e[t+5]>>6&1&&(t+=10),i=(t+=10)+i;t+10<i;){var r=e.subarray(t),a=bs(r,4);(a=Ts(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:a,data:r.subarray(10,10+a)}))&&n.push(a),t+=r.size+10}ys(e,t)&&(t+=10)}return n}function ws(e,t){for(var n=t=void 0===t?0:t,i=0;vs(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=bs(e,t+6),ys(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}function As(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}
1function Es(e,t){if(this.j=e,void 0!==t&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=Ee(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function xs(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);0!==i&&(n.set(e.j.subarray(t,t+i)),e.h=new ua(n,0).W(),e.g=8*i,e.i-=i)}function ks(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,xs(e)}e.h<<=t,e.g-=t}function Is(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&xs(e),0<(n=t-n)?i<<n|Is(e,n):i}function Cs(e){var t;for(t=0;t<e.g;++t)if(e.h&2147483648>>>t)return e.h<<=t,e.g-=t,t;return xs(e),t+Cs(e)}function Ms(e){ks(e,1+Cs(e))}function Ls(e){return Is(e,Cs(e)+1)-1}function Rs(e){return 1&(e=Ls(e))?1+e>>>1:-1*(e>>>1)}function Ps(e){return 1===Is(e,1)}function Ds(e){return Is(e,8)}function Ns(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=Rs(e))+256)%256),n=0===i?n:i}function _s(e){return Ds(e),Ls(e),Ls(e)}function Os(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.B=this.C=null,this.i=[],this.h=[],this.D=null,this.l=[],this.F=this.s=this.u=null}function Us(e,t){if(1!=(t[0]<<16|t[1]<<8|t[2]))return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(192&i){var r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2;null==e.u&&(e.u=r),n.pts=Bs(r,e.u),e.u=n.pts,n.dts=n.pts,64&i&&(i=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.s&&(e.s=i),n.dts=n.pts!=r?Bs(i,e.s):i),e.s=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}function js(e){var t=e.cd();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function Bs(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Fs(e){return!(0>Vs(e))}function Vs(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;n++}return-1}H("shaka.util.Id3Utils",ms),ms.getID3Data=ws,ms.getID3Frames=Ss,H("shaka.util.ExpGolomb",Es),(r=Os.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},r.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Vs(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71==e[r]){var a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2];if(1<(48&e[r+3])>>4){var s=r+5+e[r+4];if(s==r+188)continue}else s=r+4;switch(o){case 0:a&&(s+=e[s]+1),this.G=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.G:a&&(s+=e[s]+1),o={audio:-1,video:-1,uf:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<u;
1){var l=(31&a[s+1])<<8|a[s+2],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(0<c)for(var d=s+5,h=c;2<h;){var p=a[d+1]+2;switch(a[d]){case 5:var f=Ve(a.subarray(d+2,d+p));-1==o.audio&&"Opus"===f?(o.audio=l,o.audioCodec="opus"):-1==o.video&&"AV01"===f&&(o.video=l,o.videoCodec="av1");break;case 106:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 122:-1==o.audio&&(o.audio=l,o.audioCodec="ec3");break;case 124:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 127:"opus"==o.audioCodec&&(f=null,128===a[d+2]&&(f=a[d+3]),null!=f&&(this.F={channelCount:15&f?15&f:2,gk:f,sampleRate:48e3}))}d+=p,h-=p}break;case 15:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 17:-1==o.audio&&(o.audio=l,o.audioCodec="aac-loas");break;case 21:-1==o.uf&&(o.uf=l);break;case 27:-1==o.video&&(o.video=l,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=l,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=l,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=l,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.I=a.video,this.m=a.videoCodec),-1!=a.audio&&(this.C=a.audio,this.B=a.audioCodec),-1!=a.uf&&(this.D=a.uf),i&&!this.H&&(i=!1,r=t-188),this.H=!0;break;case this.I:s=e.subarray(s,r+188),a?this.j.push([s]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(s);break;case this.C:s=e.subarray(s,r+188),a?this.i.push([s]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(s);break;case this.D:s=e.subarray(s,r+188),a?this.l.push([s]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(s);break;default:i=!0}}return this},r.Ol=function(e){return Mt("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Gh(e,{qe:null,state:null})},r.Gh=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.m&&(r=2);var a=t.state||0,o=a,s=0,u=[],l=-1,c=0;for(-1==a&&(l=0,c="hvc"==this.m?e[0]>>1&63:31&e[0],a=0,s=1);s<i;){var d=e[s++];a?1===a?a=d?0:2:d?1==d?(d=s-a-1,0<=l?u.push({data:e.subarray(l+r,d),fullData:e.subarray(l,d),type:c,time:n,state:null}):(a=u.length?u[u.length-1]:t.qe)&&(o&&s<=4-o&&a.state&&(a.data=a.data.subarray(0,a.data.byteLength-o),a.fullData=a.fullData.subarray(0,a.fullData.byteLength-o)),0<d&&(d=e.subarray(0,d),a.data=Je(a.data,d),a.fullData=Je(a.fullData,d),a.state=0)),s<i?(c="hvc"==this.m?e[s]>>1&63:31&e[s],l=s,a=0):a=-1):a=0:a=3:a=d?0:1}return 0<=l&&0<=a&&u.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:a}),!u.length&&t.qe&&(n=u.length?u[u.length-1]:t.qe)&&(n.data=Je(n.data,e),n.fullData=Je(n.fullData,e)),t.state=a,u},r.getMetadata=function(){for(var e=[],t=c(this.l),n=t.next();!n.done;n=t.next())(n=Us(this,n=Je.apply(ze,d(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Ss(n.data),dts:n.dts,pts:n.pts});return e},r.yb=function(){if(this.i.length&&!this.h.length)for(var e=c(this.i),t=e.next();!t.done;t=e.next()){var n=Je.apply(ze,d(t.value)),i=Us(this,n);t=this.h.length?this.h[this.h.length-1]:null,i&&null!=i.pts&&null!=i.dts&&(!t||t.pts!=i.pts&&t.dts!=i.dts)?this.h.push(i):this.h.length&&(n=i?i.data:n)&&((t=this.h.pop()).data=Je(t.data,n),this.h.push(t))}return this.h},r.cd=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=c(this.j),n=t.next();!n.done;n=t.next()){var i=Je.apply(ze,d(n.value)),r=Us(this,i);n=this.g.length?this.g[this.g.length-1]:null,r&&null!=r.pts&&null!=r.dts&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?this.g.push(r):this.g.length&&(i=r?r.data:i)&&((n=this.g.pop()).data=Je(n.data,i),this.g.push(n))}if(e){for(t={qe:null,state:null},n=[],r=(i=c(this.g)).next();!r.done;r=i.next())(r=r.value).nalus=this.Gh(r,t),r.nalus.length&&(n.push(r),t.qe=r.nalus[r.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},r.getStartTime=function(e){if("audio"==e){e=null;var t=this.yb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.cd(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},r.ae=function(){return{audio:this.B,video:this.m}},r.tf=function(){for(var e=[],t=c(this.cd()),n=t.next();!n.done;n=t.next())e.push.apply(e,d(n.value.nalus));return e},r.ll=function(){Mt("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.nh();return{height:e.height,width:e.width}},r.nh=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.tf();if(!n.length)return t;if(!(n=n.find(function(e){return 33==e.type})))return t;var i=new Es(n.fullData,!0);Ds(i),Ds(i),Is(i,4);var r=Is(i,3);Ps(i);var a=Is(i,2),o=Is(i,1),s=Is(i,5),u=Is(i,32);n=Ds(i);for(var l=Ds(i),c=Ds(i),d=Ds(i),h=Ds(i),p=Ds(i),f=Ds(i),g=[],m=[],v=0;v<r;v++)g.push(Ps(i)),m.push(Ps(i));if(0<r)for(v=r;8>v;v++)Is(i,2);for(v=0;v<r;v++)g[v]&&Is(i,88),m[v]&&Ds(i);Ls(i),3==(r=Ls(i))&&Is(i,1),g=Ls(i),m=Ls(i);var y=v=0,b=0,T=0;return Ps(i)&&(v+=Ls(i),y+=Ls(i),b+=Ls(i),T+=Ls(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b
1+T)*(1===r?2:1)),i=function(e){for(var t=0,n=0;32>n;n++)t|=(e>>n&1)<<31-n;return t>>>0}(u),o=1==o?"H":"L",a="hvc1."+["","A","B","C"][a]+s,a+="."+i.toString(16).toUpperCase(),a+="."+o+f,p&&(a+="."+p.toString(16).toUpperCase()),h&&(a+="."+h.toString(16).toUpperCase()),d&&(a+="."+d.toString(16).toUpperCase()),c&&(a+="."+c.toString(16).toUpperCase()),l&&(a+="."+l.toString(16).toUpperCase()),n&&(a+="."+n.toString(16).toUpperCase()),t.codec=a,t.frameRate=js(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.tf();if(!n.length)return t;if(!(n=n.find(function(e){return 7==e.type})))return t;var i=Ds(n=new Es(n.data)),r=Ds(n),a=Ds(n);if(Ms(n),Gs.includes(i)){var o=Ls(n);if(3===o&&ks(n,1),Ms(n),Ms(n),ks(n,1),Ps(n)){o=3!==o?8:12;for(var s=0;s<o;s++)Ps(n)&&Ns(n,6>s?16:64)}}if(Ms(n),0===(o=Ls(n)))Ls(n);else if(1===o)for(ks(n,1),Ms(n),Ms(n),o=Ls(n),s=0;s<o;s++)Ms(n);Ms(n),ks(n,1),o=Ls(n),s=Ls(n);var u=Is(n,1);0===u&&ks(n,1),ks(n,1);var l=0,c=0,d=0,h=0;return Ps(n)&&(l=Ls(n),c=Ls(n),d=Ls(n),h=Ls(n)),t.height=String((2-u)*(s+1)*16-2*d-2*h),t.width=String(16*(o+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+a.toString(16).toUpperCase()).slice(-2),t.frameRate=js(e),t}(this)},H("shaka.util.TsParser",Os),Os.syncOffset=Vs,Os.probe=Fs,Os.prototype.getVideoInfo=Os.prototype.nh,Os.prototype.getVideoResolution=Os.prototype.ll,Os.prototype.getVideoNalus=Os.prototype.tf,Os.prototype.getCodecs=Os.prototype.ae,Os.prototype.getStartTime=Os.prototype.getStartTime,Os.prototype.getVideoData=Os.prototype.cd,Os.prototype.getAudioData=Os.prototype.yb,Os.prototype.getMetadata=Os.prototype.getMetadata,Os.prototype.parseNalus=Os.prototype.Gh,Os.prototype.parseAvcNalus=Os.prototype.Ol,Os.prototype.parse=Os.prototype.parse,Os.prototype.clearData=Os.prototype.clearData,Os.Timescale=9e4;var Gs=[100,110,122,244,44,83,86,118,128,138,139,134];function Hs(e,t,n,i,r){var a=this;this.g=e,this.N=n,this.B=i,this.Z=t,this.l=new Map,this.D=new Map,this.fb=new Map,this.h=null,this.Ha=!1,this.L=r||null,this.s=new Map,this.u=new xt,this.j=new Map,this.I=null,this.J=new jr,this.sa="",this.cb=!1,this.ra=!0,this.K=!1,this.C=this.O=null,this.i=zs(this,this.J),this.La=this.F=!1,this.H=new ra(function(){return function(e){var t,n,i,r,a,o,s,u,l,d,h,p,f;return D(function(g){if(1==g.g){for(t=[],n=c(e.s),i=n.next();!i.done;i=n.next())for(r=i.value,a=c(r),o=a.next().value,s=a.next().value,u=s[0],l=o,e.s.set(l,s.slice(0,1)),u&&t.push(u.p.catch(qi)),d=c(s.slice(1)),h=d.next();!h.done;h=d.next())h.value.p.reject(new Ce(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),S(g,Promise.all(t),2)}for(p=c(e.j.values()),f=p.next();!f.done;f=p.next())f.value.destroy();e.u&&(e.u.release(),e.u=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.O&&(e.g.removeChild(e.O),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.O=null,e.C=null,e.B=null,e.i=null,e.h=null,e.Z=null,e.l.clear(),e.fb.clear(),e.j.clear(),e.I=null,e.s.clear(),e.L=null,e.Y.clear(),e.N=null,w(g)})}(a)}),this.G=!1,this.P="UNKNOWN",this.Ta=this.Ya=!1,this.Na=new jr,this.m=!1,this.oa=null,this.Y=new Map,this.ba=this.R=this.na=this.U=null,this.$=new jr,this.g.remote&&(this.K="disconnected"!=this.g.remote.state,this.u.o(this.g.remote,"connect",function(){a.K="disconnected"!=a.g.remote.state}),this.u.o(this.g.remote,"connecting",function(){a.K="disconnected"!=a.g.remote.state}),this.u.o(this.g.remote,"disconnect",function(){a.K="disconnected"!=a.g.remote.state}))}function zs(t,n){if(t.ra=!0,e.ManagedMediaSource){t.C||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.u.o(i,"startstreaming",function(){t.ra=!0}),t.u.o(i,"endstreaming",function(){t.ra=!1})}else i=new MediaSource;return t.u.qa(i,"sourceopen",function(){URL.revokeObjectURL(t.sa),n.resolve()}),t.u.qa(t.g,"playing",function(){t.cb=!0}),t.sa=gu(i),t.B.useSourceElements?(t.g.removeAttribute("src"),t.O&&t.g.removeChild(t.O),t.C&&t.g.removeChild(t.C),t.O=cs(t.sa),t.g.appendChild(t.O),t.C&&t.g.appendChild(t.C),t.g.load()):t.g.src=t.sa,i}function Ks(e,t,n,i){"audio"==t&&i&&(i=ar(i,n.mimeType));
1var r=ki(n.mimeType,i);if(t==it)qs(e,r,e.G,n.external);else{var a=e.B.forceTransmux;(!Ut(r)||!e.G&&Oi.includes(r))&&(a=!0);var o=Ii(n.mimeType,i);if(a){if(a=tt("audio",(i||"").split(",")),i=tt("video",(i||"").split(",")),a&&i)return e.m=!0,Ks(e,"audio",n,a),void Ks(e,"video",n,i);(i=bi(o))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,o))}o=r+e.B.addExtraFeaturesToSourceBuffer(r),aa(e.H);try{var s=e.i.addSourceBuffer(o)}catch(t){throw new Ce(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.G&&(s.mode=mu),e.u.o(s,"error",function(){var n=e.s.get(t)[0];n.p.reject(new Ce(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.u.o(s,"updateend",function(){return su(e,t)}),e.l.set(t,s),e.D.set(t,r),e.fb.set(t,!!n.drmInfos.length)}}function Ws(e){return e.ra&&!e.K&&!e.F}function qs(e,t,n,i){e.h||(e.h=new Ui(e.Z),e.h&&(e.h.B=e.B.modifyCueCallback));var r=e.h;i=i||e.Ha,e=e.P,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=Hi.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):Mt("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):Mt("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.C=i)}function Xs(e){return!e.F&&(!e.i||"ended"==e.i.readyState)}function Ys(e){return!e.F&&(!e.i||"closed"==e.i.readyState)}function Js(e,t){return e.l.size?t==it?e=e.h.g:e=!(e=$s(e,t))||ns(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null:e=null,e}function Qs(e,t){return e.l.size?t==it?e.h.h:is($s(e,t)):null}function $s(e,t){if(e.F||e.K)return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function Zs(e,t,n,i,r,a,o,s,u,l,h){var p,f,g,m,v,y,b,T,A,E,x,k,I,C,M,L;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,D(function(R){switch(R.g){case 1:if(t!=(p=rt).gb){R.A(2);break}if("HLS"!=e.P){R.A(3);break}return S(R,e.Na,4);case 4:f=R.h,e.h.u=f;case 3:return S(R,function(e,t,n,i,r){var a,o,s,u,l,d,h;return D(function(p){if(1==p.g)return S(p,Promise.resolve(),2);if(!e.i||!e.j)return p.return();if(null==n||null==i)return e.i.parseInit(Ee(t)),p.return();for(a=e.C?n:e.u,o={periodStart:e.u,segmentStart:n,segmentEnd:i,vttOffset:a},s=e.i.parseMedia(Ee(t),o,r,[]),u=c(s),l=u.next();!l.done;l=u.next())d=l.value,e.B(d,r||null,o);h=s.filter(function(t){return t.startTime>=e.l&&t.startTime<e.m}),e.j.append(h),null==e.g&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),w(p)})}(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.S()[0]:null),5);case 5:return R.return();case 2:if(l||!e.m){R.A(6);break}return S(R,Zs(e,p.ma,n,i,r,a,o,s,u,!0),7);case 7:return S(R,Zs(e,p.Ea,n,i,r,a,o,s,u,!0),8);case 8:return R.return();case 6:if(!e.l.has(t))return R.return();if(g=e.l.get(t).timestampOffset,m=e.D.get(t),e.j.has(t)&&(m=e.j.get(t).getOriginalMimeType()),i&&(v=function(e,t,n,i,r,a){var o=null,s=[],u=Ee(n);if(Oi.includes(a))(t=Ss(u)).length&&i&&((n=t.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&"number"==typeof n.data&&(o=Math.round(n.data)/1e3),e.N.onMetadata([{cueTime:i.startTime,data:u,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.ea&&i.ea.timescale){var l=i.ea.timescale;if(!isNaN(l)){var c=null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.B.dispatchAllEmsgBoxes,d=0,h=!1;u=new da,c&&u.V("emsg",function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.hd(),o=t.reader.hd(),s=t.reader.W(),u=t.reader.W(),l=t.reader.W(),c=t.reader.W(),d=i.startTime+u/s;else s=t.reader.W(),u=(d=t.reader.Ld()/s+i.timestampOffset)-i.startTime,l=t.reader.W(),c=t.reader.W(),a=t.reader.hd(),o=t.reader.hd();t=t.reader.Xb(t.reader.getLength()-t.reader.Ua()),(n&&n.includes(a)||e.B.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.N.Nl():(s={startTime:d,endTime:n=d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t},new z("emsg",c=(new Map).set("detail",s)).cancelable=!0,e.N.Ll(s),("https://aomedia.org/emsg/ID3"==a||"https://developer.apple.com/streaming/emsg-id3"==a)&&(a=Ss(t)).length&&e.N.onMetadata([{cueTime:d,data:t,frames:a,dts:d,pts:d}],0,n)))}),u.V("prft",function(t){var n=t.reader,i=t.version;n.W(),t=1e3*(t=n.W())+n.W()/Math.pow(2,32)*1e3,0===i?n=n.W():(i=n.W(),n=n.W(),n=i*Math.pow(2,32)+n),t=As(t),n=new z("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/l*1e3)})),e.N.onEvent(n)}).box("moof",ha).box("traf",ha).V("tfdt",function(e){h||(d=po(e.reader,e.version).baseMediaDecodeTime/l,h=!0,c||e.parser.stop())}).parse(n,!0),h&&0==i.timestampOffset&&(o=d)}}else a.includes("/mp4")||a.includes("/webm")||!Fs(u)||(e.Y.has(t)?e.Y.get(t).clearData():e.Y.set(t,new Os),null!=(u=(s=e.Y.get(t).parse(u)).getStartTime(t))&&(o=u),s=s.getMetadata());return{timestamp:o,metadata:s}}(e,t,n,i,r,m),y=v.timestamp,b=v.metadata,null!=y&&(null==e.U&&t==p.Ea&&(e.U=y,e.na=i.startTime,null!=e.R&&(T=0,e.na==e.ba&&(T=e.U-e.R),e.$.resolve(T))),null==e.R&&t==p.ma&&(e.R=y,e.ba=i.startTime,null!=e.U&&(A=0,e.na==e.ba&&(A=e.U-e.R),e.$.resolve(A))),E=y,x=Oi,!e.G&&x.includes(e.D.get(t))&&(E=0),k=i.startTime-E,(.001<=Math.abs(g-k)||o||s)&&(!u||0<k||!g)&&(g=k,e.Ta&&(uu(e,t,function(){return ru(e,t)},null),uu(e,t,function(){return au(e,t,g)},null))),(t==p.Ea||!e.l.has(p.Ea))&&e.Na.resolve(g)),b.length)&&e.N.onMetadata(b,g,i?i.endTime:null),a&&t==p.Ea&&(e.h||qs(e,"application/cea-608",e.G,!1),e.I||(I=m.split(";",1)[0],e.I=new zt(I)),i?(C=e.I.Of(n)).length&&function(e,t,n,i,r){for(var a=n+" "+i,o=new Map,s=(t=c(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),Gi(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.D&&e.j.append([u]))}for(a=(r=c(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.s.has(a)||e.s.set(a,new Map),s=(t=c(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.s.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}(e.h,C,i.startTime,i.endTime,g):e.I.init(n,s,h)),!e.j.has(t)){R.A(9);break}return S(R,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=R.h;case 9:if(n=function(e,t,n,i,r){if("mp4"!=Mi(e.D.get(r)))return n;var a=null===i,o=e.fb.get(r),s=e.N.Jk(),u=!1;i&&i.ea&&(u=i.ea.encrypted),i=i?i.S()[0]:null;var l=Re();return e.B.correctEc3Enca&&a&&"audio"===r&&(n=function(e){e=Ee(e);var t=null;return(new da).box("moov",ha).box("trak",ha).box("mdia",ha).box("minf",ha).box("stbl",ha).V("stsd",pa).box("enca",function(e){return t=e.reader.h,ga(e)}).box("sinf",ha).box("frma",function(e){e.parser.stop(),"ec-3"===vo(e.reader).codec&&t&&2!==t.getUint16(16)&&t.setUint16(16,2)}).parse(e),e}(n)),e.B.insertFakeEncryptionInInit&&o&&l.xe(s,r)&&(a?n=function(e,t,n){function i(e){h.push({box:e,ij:1701733217})}function r(e){h.push({box:e,ij:1701733238})}function a(e){l=!0,e.parser.stop()}function o(e){d.push(e),ha(e)}var s,u=t=Ee(t),l=!1,d=[],h=[];if((new da).box("moov",o).box("trak",o).box("mdia",o).box("minf",o).box("stbl",o).V("stsd",function(e){s=e,d.push(e),pa(e)}).V("encv",a).V("enca",a).V("dvav",r).V("dva1",r).V("dvh1",r).V("dvhe",r).V("dvc1",r).V("dvi1",r).V("hev1",r).V("hvc1",r).V("avc1",r).V("avc3",r).V("ac-3",i).V("ec-3",i).V("ac-4",i).V("Opus",i).V("fLaC",i).V("mp4a",i).parse(t),l)return t;if(0==h.length||!s)throw Ye(t),new Ce(2,3,3019,n);h.reverse();for(var p=(n=c(h)).next();!p.done;p=n.next())p=p.value,u=Xo(e,u,s,p.box,d,p.ij);
1return Re().rj()?((e=new Uint8Array(t.byteLength+u.byteLength)).set(u),e.set(t,u.byteLength),e):u}(t,n,i):!u&&l.sj(r)&&(n=function(e){e=Ee(e);var t=[];(new da).box("mdat",function(e){t.push(e)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],a=t[i];n.push(qo(e.subarray(r?r.start+r.size:0,a.start+a.size)))}return Je.apply(ze,d(n))}(n))),a&&l.we()&&(n=function(e){function t(e){i.push({start:e.start,size:e.size}),ha(e)}var n=Ee(e),i=[];return(new da).box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(e){i.push({start:e.start,size:e.size});for(var t=ke(n,e.start),r=0;r<e.size-3;r++){var a=t.getUint32(r);1633889587==a?t.setUint32(r,1700998451):1684103987==a&&t.setUint32(r,1684366131)}}).parse(n),n}(n)),n}(e,r,n,i,t),!i||!e.G||t==p.gb){R.A(11);break}if(!o&&!s){R.A(11);break}if(M=i.startTime,"HLS"!=e.P||e.m||t!=p.ma||!e.l.has(p.Ea)){R.A(13);break}return S(R,e.$,14);case 14:L=R.h,.15<Math.abs(L)&&(M-=L);case 13:uu(e,t,function(){return ru(e,t)},null),uu(e,t,function(){return au(e,t,M)},null);case 11:return S(R,uu(e,t,function(){var i=n;e.L&&Nt(e.L,i,g,r),e.l.get(t).appendBuffer(i)},i?i.S()[0]:null),15);case 15:w(R)}})}function eu(e,t){var n;return D(function(i){return 1==i.g?t==(n=rt).gb?e.h?S(i,e.h.remove(0,1/0),0):i.return():S(i,uu(e,t,function(){return iu(e,t,0,e.i.duration)},null),4):e.m?S(i,uu(e,n.ma,function(){return iu(e,n.ma,0,e.i.duration)},null),0):i.A(0)})}function tu(e,t,n,i,r,a,o,s,u){var l,c;return D(function(d){return 1==d.g?t==(l=rt).gb?(a||(e.h.u=n),function(e,t,n){e.l=t,e.m=n}(e.h,i,r),d.return()):(c=[],S(d,function(e,t,n,i,r){var a,o,s,u,l,c;return D(function(d){return 1==d.g?(a=rt,o=fu(e,t,n,i,r),s=o.type,u=o.kc,l=o.If,(c=r.get(a.ma))&&(e.m=c.isAudioMuxedInVideo),s==vu?(e.j.has(t)&&!u?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&u?e.j.set(t,u):u&&(e.j.has(t)&&e.j.get(t).transmux!==u.transmux?(e.j.get(t).destroy(),e.j.set(t,u)):u.destroy()),d.return(!1)):s==bu?S(d,function(e,t,n,i){return uu(e,t,function(){if(t!==it){if(e.D.get(t),jt()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.B.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.D.set(t,n)}su(e,t)}},null)}(e,t,l,u),3):s!=yu?d.A(3):(u&&u.destroy(),S(d,hu(e,r),3))):d.return(!0)})}(e,t,o,s,u),2)):(d.h||(c.push(uu(e,t,function(){return ru(e,t)},null)),e.m&&c.push(uu(e,l.ma,function(){return ru(e,l.ma)},null))),a||(c.push(uu(e,t,function(){return au(e,t,n)},null)),e.m&&c.push(uu(e,l.ma,function(){return au(e,l.ma,n)},null))),0==i&&1/0==r||(c.push(uu(e,t,function(){return ou(e,t,i,r)},null)),e.m&&c.push(uu(e,l.ma,function(){return ou(e,l.ma,i,r)},null))),c.length?S(d,Promise.all(c),0):d.A(0))})}function nu(e){D(function(t){return e.H.g||e.g.error||e.K||e.F||Xs(e)||Ys(e)?t.return():S(t,lu(e,function(){Xs(e)||Ys(e)||e.i.clearLiveSeekableRange()}),0)})}function iu(e,t,n,i){i<=n?su(e,t):e.l.get(t).remove(n,i)}function ru(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,su(e,t)}function au(e,t,n){0>n&&(n+=.001);var i=!0;"HLS"==e.P&&(i=!(i=Qs(e,t))||.15<Math.abs(i-n)),i&&(e.l.get(t).timestampOffset=n),su(e,t)}function ou(e,t,n,i){var r=e.l.get(t);r.appendWindowEnd===i&&r.appendWindowStart===n||(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),su(e,t)}function su(e,t){if(e.F||e.H.g){var n=e.s.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.s.set(t,[]))}else(n=e.s.get(t)[0])&&(n.p.resolve(),cu(e,t))}function uu(e,t,n,i){return aa(e.H),n={start:n,p:new jr,uri:i},e.s.get(t).push(n),1==e.s.get(t).length&&du(e,t),n.p}function lu(e,t){var n,i,r,a,o,s,u,l,d,h,p;return D(function(f){switch(f.g){case 1:for(aa(e.H),n=[],i=Array.from(e.l.keys()),r=c(i),a=r.next(),o={};!a.done;o={ready:void 0},a=r.next())s=a.value,o.ready=new jr,u={start:function(e){return function(){return e.ready.resolve()}}(o),p:o.ready,uri:null},(l=e.s.get(s)).push(u),n.push(o.ready),1==l.length&&u.start();return A(f,2),S(f,Promise.all(n),4);case 4:x(f,3);break;case 2:throw k(f);case 3:return A(f,5,6),S(f,t(),6);case 6:for(I(f),d=c(i),h=d.next();!h.done;h=d.next())p=h.value,cu(e,p);C(f,0);break;case 5:throw new Ce(2,3,3015,k(f),e.g.error||"No error in the media element",null)}})}function cu(e,t){e.s.get(t).shift(),du(e,t)}function du(e,t){var n=e.s.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new Ce(2,3,3017,t)):Ws(e)?n.p.reject(new Ce(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new Ce(2,3,3024,t)),cu(e,t)}}function hu(e,t){return lu(e,function(){return function(e,t){var n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w;return D(function(A){if(1==A.g){if(e.F||e.K)return A.return();for(n=rt,e.F=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.La=!0),e.cb&&(e.g.autoplay=!1),E(A,2),e.u.Sa(),a=c(e.j.values()),o=a.next();!o.done;o=a.next())o.value.destroy();for(s=c(e.l.values()),u=s.next();!u.done;u=s.next()){l=u.value;try{e.i.removeSourceBuffer(l)}catch(e){}}return e.j.clear(),e.l.clear(),d=e.i.duration,e.J=new jr,e.i=zs(e,e.J),S(A,e.J,4)}if(2!=A.g){for(!isNaN(d)&&d?e.i.duration=d:!isNaN(e.oa)&&e.oa&&(e.i.duration=e.oa),h=new jr,p=e.i.sourceBuffers,f=t.size,g=0,m=function(){++g===f&&(h.resolve(),e.u.Da(p,"addsourcebuffer",m))},e.u.o(p,"addsourcebuffer",m),v=c(t.keys()),y=v.next();!y.done;y=v.next())b=y.value,T=t.get(b),Ks(e,b,T,T.codecs);return(w=t.get(n.ma))&&w.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.s.has(n.ma)&&e.s.set(n.ma,[]),e.g.currentTime=i,S(A,h,2)}return I(A),e.F=!1,aa(e.H),e.u.qa(e.g,"canplaythrough",function(){e.H.g||(e.g.autoplay=r,e.La&&
1(e.La=!1,e.g.play()))}),C(A,0)})}(e,t)})}function pu(e,t,n,i){var r=!1,a=tt("audio",(i||"").split(",")),o=tt("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i),i=ki(n,s);var u=Pi(e.D.get(t)),l=e.B.forceTransmux;if(!Ut(i)||!e.G&&Oi.includes(i)?l=!0:l||n==u||(l="WEBKIT"===Re().Ia()&&Oi.includes(n)),l&&(n=bi(e=Ii(n,s)))){var c=n();a&&o&&(r=!0),i=c.convertCodecs(t,e)}return t=Li(Di(i)),{kc:c,nm:r,Ai:Pi(i),codec:t,mimeType:i}}function fu(e,t,n,i,r){if(t==it)return{type:vu,If:n,kc:null};var a=Li(Di(e.D.get(t))),o=Pi(e.D.get(t)),s=pu(e,t,n,i),u=s.kc,l=s.nm,c=s.Ai,d=s.codec;s=s.mimeType;var h=!0;return l&&e.D.has("audio")&&(n=pu(e,"audio",n,i),i=Li(Di(e.D.get("audio"))),h=Pi(e.D.get("audio")),h=i==n.codec&&h==n.Ai,n.kc&&n.kc.destroy()),a===d&&o===c&&h?{type:vu,If:s,kc:u}:(a=!0,(e.m&&!r.has("audio")||l&&u&&!e.j.has(t))&&(a=!1),a&&"smooth"===e.B.codecSwitchingStrategy&&jt()?{type:bu,If:s,kc:u}:(u&&u.destroy(),{type:yu,If:s,kc:null}))}(r=Hs.prototype).destroy=function(){return this.H.destroy()},r.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,u,l,d=this;return D(function(h){if(1==h.g)return r=rt,S(h,d.J,2);if(3!=h.g)return Xs(d)||Ys(d)?(X("Expected MediaSource to be open during init(); reopening the media source."),d.J=new jr,d.i=zs(d,d.J),S(h,d.J,3)):h.A(3);for(d.G=t,d.P=n,d.Ya=i,d.Ta=!d.G&&"HLS"==d.P&&!d.Ya,d.Y.clear(),d.U=null,d.na=null,d.R=null,d.ba=null,d.$=new jr,a=c(e.keys()),o=a.next();!o.done;o=a.next())s=o.value,u=e.get(s),Ks(d,s,u,u.codecs),d.m?(d.s.set(r.ma,[]),d.s.set(r.Ea,[])):d.s.set(s,[]);(l=e.get(r.ma))&&l.isAudioMuxedInVideo&&(d.m=!0),w(h)})},r.configure=function(e){this.B=e,this.h&&(this.h.B=e.modifyCueCallback)},r.Qb=function(){var e={total:this.F?[]:os(this.g.buffered),audio:os($s(this,"audio")),video:os($s(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},r.remove=function(e,t,n,i){var r,a=this;return D(function(o){return 1==o.g?(e==(r=rt).Ea&&a.I&&a.I.remove(i),e==r.gb?S(o,a.h.remove(t,n),0):n>t?S(o,uu(a,e,function(){return iu(a,e,t,n)},null),5):o.A(0)):a.m?S(o,uu(a,r.ma,function(){return iu(a,r.ma,t,n)},null),0):o.A(0)})},r.flush=function(e){var t,n=this;return D(function(i){return 1==i.g?e==(t=rt).gb?i.return():S(i,uu(n,e,function(){n.g.currentTime-=.001,su(n,e)},null),2):n.m?S(i,uu(n,t.ma,function(){var e=t.ma;n.g.currentTime-=.001,su(n,e)},null),0):i.A(0)})},r.endOfStream=function(e){var t=this;return D(function(n){return S(n,lu(t,function(){Xs(t)||Ys(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},r.vb=function(e){var t=this;return D(function(n){return S(n,lu(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var n=c(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:new jr,uri:null};t.s.get(i).unshift(r)}t.i.duration=e,t.oa=e}),0)})},r.getDuration=function(){return this.i.duration};var gu=e.URL.createObjectURL,mu="sequence",vu="none",yu="reset",bu="changeType";function Tu(e,t,n){this.i=e,this.D=t,this.u=this.l=1/0,this.h=1,this.g=this.j=null,this.B=0,this.C=!0,this.I=!1,this.H=0,this.F=void 0===n||n,this.G=0,this.s=!1,this.m=e}function Su(e,t,n,i){var r=this;this.u=i,this.g=e,this.C=t,this.h=n,this.s=new xt,this.l=!1,this.F=e.readyState,this.G=this.D=this.j=0,this.m=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new Au(new Eu(e.g),t,function(){return D(function(t){if(1==t.g)return os(e.g.buffered).length?n?(e.g.currentTime+=n,t.A(2)):S(t,e.g.play(),3):t.return();if(2!=t.g){if(!e.g)return t.return();e.g.pause(),e.g.play()}e.G++,e.u(new z("stalldetected")),w(t)})})}(this),this.B=!1,this.s.o(e,"waiting",function(){return wu(r)}),this.i=new Ki(function(){wu(r)}).ya(this.h.gapJumpTimerTime)}function wu(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){var t;if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(t=!e.m)){var n=(t=e.m).h,i=xu(n),r=n.g.currentTime,a=Date.now()/1e3;t.g==r&&t.m==i||(t.l=a,t.g=r,t.m=i,t.i=!1),(i=(r=a-t.l)>=t.s&&i&&!t.i)&&(t.j&&t.j(t.g,r),t.i=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,i=function(e,t,n){return e&&e.length&&!ns(e)&&0<=(e=os(e).findIndex(function(e,i,r){return e.start>t&&(0==i||r[i-1].end-t<=n)}))?e:null}(n=e.g.buffered,t,e.h.gapDetectionThreshold),null==i||0==i&&!e.B||(r=n.start(i),(a=e.h.gapPadding)&&(r=Math.ceil(100*(r+a))/100),r>=e.C.Jb()||.001>r-t||(0!=i&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.D++,e.u(new z("gapjumped")))))}}}function Au(e,t,n){this.h=e,this.m=xu(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.s=t,this.j=n}function Eu(e){var t=this;this.g=e,this.h=new xt,this.i=!1,this.h.o(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.o(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.o(this.g,"audiofocuslost",function(){t.i=!0})}function xu(e){if(e.g.paused||0==e.g.playbackRate||e.i||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=c(os(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function ku(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=Iu.value().get(t),n.qa(e,t,i))}(r=Tu.prototype).getDuration=function(){return this.l},r.Pk=function(){return this.h},r.Gj=function(e){this.i=e},r.vb=function(e){this.l=e},r.Vk=function(){return this.i},r.Dj=function(e){this.B=e},r.md=function(e){e&&!this.C&&(this.I=!0),this.C=e},r.ag=function(e){this.u=e},r.rf=function(){return this.u},r.Uh=function(e){this.D=e},r.Ek=function(){return this.D},r.lj=function(e,t){if(0!=e.length){var n=(Date.now()+this.B)/1e3;if(0!=(e=e.filter(function(e){return e.start+t<n}
1)).length){var i=e[e.length-1].end+t;this.Jf(e[0].start+t),this.h=e.reduce(function(e,t){return Math.max(e,t.end-t.start)},this.h),this.g=Math.max(this.g,i),null!=this.i&&this.F&&!this.s&&(this.i=n-this.g-this.h)}}},r.re=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.B)/1e3,r=(e=c(e)).next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.Jf(t),this.g=Math.max(this.g,n),null!=this.i&&this.F&&!this.s&&(this.i=i-this.g-this.h)}},r.kj=function(e,t){this.Jf(e),1/0==t||this.T()||(this.g=Math.max(this.g,t))},r.Qk=function(){return this.g},r.Df=function(){this.s=!0},r.Bl=function(){return this.s},r.Wh=function(e){this.m=e},r.Ik=function(){return this.m},r.Jf=function(e){null==this.j?this.j=e:this.I||(this.j=Math.min(this.j,e))},r.Ch=function(e){this.h=Math.max(this.h,e)},r.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},r.T=function(){return 1/0==this.l&&!this.C},r.ed=function(){return 1/0!=this.l&&!this.C},r.Kb=function(){return Math.max(this.H,this.Gc()-this.u)},r.Ij=function(e){this.H=e},r.Gc=function(){return this.T()||this.ed()?Math.min(Math.max(0,(Date.now()+this.B)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},r.ce=function(e){var t=Math.max(this.j,this.H);return 1/0==this.u?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Gc()-this.u+e,this.Jb()))},r.bc=function(){return this.ce(0)},r.Jb=function(){return Math.max(0,this.Gc()-(this.T()||this.ed()?this.D:0))},r.Vj=function(){return!(null==this.i||null!=this.g&&this.F)},r.Cj=function(e){this.G=e},r.tk=function(){return this.G},H("shaka.media.PresentationTimeline",Tu),Tu.prototype.getAvailabilityTimeOffset=Tu.prototype.tk,Tu.prototype.setAvailabilityTimeOffset=Tu.prototype.Cj,Tu.prototype.usingPresentationStartTime=Tu.prototype.Vj,Tu.prototype.getSeekRangeEnd=Tu.prototype.Jb,Tu.prototype.getSeekRangeStart=Tu.prototype.bc,Tu.prototype.getSafeSeekRangeStart=Tu.prototype.ce,Tu.prototype.getSegmentAvailabilityEnd=Tu.prototype.Gc,Tu.prototype.setUserSeekStart=Tu.prototype.Ij,Tu.prototype.getSegmentAvailabilityStart=Tu.prototype.Kb,Tu.prototype.isInProgress=Tu.prototype.ed,Tu.prototype.isLive=Tu.prototype.T,Tu.prototype.offset=Tu.prototype.offset,Tu.prototype.notifyMaxSegmentDuration=Tu.prototype.Ch,Tu.prototype.notifyMinSegmentStartTime=Tu.prototype.Jf,Tu.prototype.getInitialProgramDateTime=Tu.prototype.Ik,Tu.prototype.setInitialProgramDateTime=Tu.prototype.Wh,Tu.prototype.isStartTimeLocked=Tu.prototype.Bl,Tu.prototype.lockStartTime=Tu.prototype.Df,Tu.prototype.getMaxSegmentEndTime=Tu.prototype.Qk,Tu.prototype.notifyPeriodDuration=Tu.prototype.kj,Tu.prototype.notifySegments=Tu.prototype.re,Tu.prototype.notifyTimeRange=Tu.prototype.lj,Tu.prototype.getDelay=Tu.prototype.Ek,Tu.prototype.setDelay=Tu.prototype.Uh,Tu.prototype.getSegmentAvailabilityDuration=Tu.prototype.rf,Tu.prototype.setSegmentAvailabilityDuration=Tu.prototype.ag,Tu.prototype.setStatic=Tu.prototype.md,Tu.prototype.setClockOffset=Tu.prototype.Dj,Tu.prototype.getPresentationStartTime=Tu.prototype.Vk,Tu.prototype.setDuration=Tu.prototype.vb,Tu.prototype.setPresentationStartTime=Tu.prototype.Gj,Tu.prototype.getMaxSegmentDuration=Tu.prototype.Pk,Tu.prototype.getDuration=Tu.prototype.getDuration,Su.prototype.release=function(){this.s&&(this.s.release(),this.s=null),null!=this.i&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.C=this.u=null},Su.prototype.Mf=function(){this.B=!0,this.i&&this.i.ya(this.h.gapJumpTimerTime),wu(this)},Au.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null},Eu.prototype.release=function(){this.h&&this.h.release(),this.h=null};var Iu=new Le(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Cu(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return null==r.l&&(r.l=i()),r.l},this.s=!1,this.h=new xt,this.i=new Du(e),ku(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ru(r,r.j())})}function Mu(e){return e.s?e.g.currentTime:e.j()}function Lu(e,t){0<e.g.readyState?Nu(e.i,t):ku(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){Ru(e,e.j())})}function Ru(e,t){.001>Math.abs(e.g.currentTime-t)?Pu(e):(e.h.qa(e.g,"seeking",function(){Pu(e)}),Nu(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function Pu(e){e.s=!0,e.h.o(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function Du(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new Ki(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}function Nu(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ya(.1)}function _u(e){this.g=e,this.i=!1,this.h=null,this.j=new xt}function Ou(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Uu(e,t){return 0<(e=e.g.seekable).length&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function ju(e,t,n,i,r,a){var o=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.s=null,this.j=new Su(e,t.presentationTimeline,n,a),this.i=new Cu(e,function(){e:{var e=o.j;e.l=!0,e.B=!1,e.i&&e.i.ya(e.h.gapJumpTimerTime),wu(e);var t=Mu(o.i);if(e=Vu(o,t),!Bt()&&.001<Math.abs(e-t)){t=!1;var n=Re().xj();if(n){var i=Date.now()/1e3;(!o.s||o.s<i-n)&&(o.s=i,t=!0)}else t=!0;if(t){Lu(o.i,e),e=void 0;break e}}o.u(),e=void 0}return e},function(e){var t=o.j;t.g.seeking&&!t.l&&(t.l=!0,t.j=e),t.i&&t.i.ya(t.h.gapJumpTimerTime),wu(t)},function(){return Bu(o,i)}),this.m=new Ki(function(){if(0!=o.h.readyState&&!o.h.paused){var e=Mu(o.i),t=o.g.bc(),n=o.g.Jb();3>
1n-t&&(t=n-3),e<t&&(e=Vu(o,e),o.h.currentTime=e)}})}function Bu(e,t){return null==t?t=1/0>e.g.getDuration()?e.g.bc():e.g.Jb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):0>t&&(t=e.g.Jb()+t),Fu(e,Gu(e,t))}function Fu(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Vu(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.bc(),a=e.g.Jb(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.ce(n),u=e.g.ce(i);return n=e.g.ce(n+i),t>=o?Fu(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?e.g.T()&&e.l.returnToEndOfLiveWindowWhenOutside?a-e.l.safeSeekEndOffset:rs(e.h.buffered,u)?u:n:t>=s||rs(e.h.buffered,t)?t:n}function Gu(e,t){var n=e.g.bc();return t<n?n:t>(e=e.g.Jb())?e:t}function Hu(e){this.g=e,this.m=null,this.i=0,this.s=!1}function zu(e){return e.g[0]||null}function Ku(e,t,n){return new Hu([e=new $o(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function Wu(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function qu(){Hu.call(this,[]),this.h=[]}function Xu(e){var t=this;this.g=e,this.j=!1,this.i=this.g.qf(),this.h=new Ki(function(){t.g.hj(.25*t.i)})}function Yu(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.qf()!=t&&e.g.Xh(t))}catch(e){}e.h.ya(.25),0!=e.g.qf()&&e.g.Xh(0)}function Ju(e){var t=this;this.j=e,this.h=new xt,this.g=new Set,this.i=new Ki(function(){Qu(t,!1)}).Ka(),e.paused||this.i.ya(.25),this.h.o(e,"playing",function(){t.i.Ka().ya(.25)}),this.h.o(e,"pause",function(){t.i.stop()})}function Qu(e,t){for(var n=e.j.currentTime,i=(e=c(e.g)).next();!i.done;i=e.next())i.value.j(n,t)}function $u(e){ee.call(this),this.g=new Map,this.h=e}function Zu(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function el(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return"video"==e.type&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),"audio"==e.type&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function tl(e){ee.call(this),this.h=new Map,this.i=e,this.g=null}function nl(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1);e.h.has(n)||(e.h.set(n,t),t=new z("regionadd",new Map([["region",t]])),e.dispatchEvent(t),function(e){e.g||(e.g=new Ki(function(){for(var t=e.i(),n=c(e.h),i=n.next();!i.done;i=n.next()){var r=c(i.value);i=r.next().value,(r=r.next().value).endTime<t.start&&(e.h.delete(i),i=new z("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).ya(2))}(e))}function il(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.s=i}function rl(e,t){e.l=t;for(var n=(e=c(e.h.values())).next();!n.done;n=e.next())n.value.g=t}function al(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex)return Promise.resolve();if(e.g||(e.g=e.i.segmentIndex.ac(t,!0,e.s)),!e.g)return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value);){var i=!0;n.isPreload()&&null!=n.endByte&&(i=!1),2==n.Ic()&&(i=!1),n.cc(!1)&&(i=!1),i&&n.ea&&t.push(ol(e,n.ea)),i&&!e.h.has(n)&&(i=new hl(e.l),t.push(pl(i,n,e.i)),e.h.set(n,i))}return ll(e),Promise.all(t)}function ol(e,t){if(!e.i.segmentIndex||t.cc()||Array.from(e.j.keys()).some(function(e){return Qo(e,t)}))return Promise.resolve();var n=new hl(e.l),i=pl(n,t,e.i);return e.j.set(t,n),i}function sl(e,t){for(var n=(t=c(t.keys())).next();!n.done;n=t.next())(n=n.value)&&dl(e,n)}function ul(e){sl(e,e.h),sl(e,e.j),e.g=null}function ll(e){for(var t=Array.from(e.h.keys()),n=c(e.j.keys()),i=n.next(),r={};!i.done;r={uh:void 0},i=n.next())r.uh=i.value,t.some(function(e){return function(t){return Qo(t.ea,e.uh)}}(r))||dl(e,r.uh)}function cl(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&dl(e,i)}ll(e)}function dl(e,t){var n=e.h;t instanceof Jo&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function hl(e){this.g=e,this.se=this.ci=null}function pl(e,t,n){var i=new Uint8Array(0);return e.se=e.g(t,n,function(t){return D(function(n){if(1==n.g)return i=0<i.byteLength?Je(i,t):t,e.ci?S(n,e.ci(i),3):n.A(0);i=new Uint8Array(0),w(n)})}),e.se.promise.catch(function(e){return e instanceof Ce&&7001==e.code?Promise.resolve():Promise.reject(e)})}function fl(e){var t=Pi(e);return{type:t.split("/")[0],mimeType:t,codecs:e=Di(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Ge:null,colorGamut:null,frameRate:null}}function gl(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.Fa(),i=t.Fa();t.skip(50),f=String(n),p=String(i),e.reader.Oa()&&ha(e)}function r(e){var t=mo(e.reader);
1g=t.channelCount,m=t.sampleRate,a(e.name)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":u.push(e+".42E01E"),d=!0;break;case"hev1":case"hvc1":u.push(e+".1.6.L93.90"),d=!0;break;case"dvh1":case"dvhe":u.push(e+".05.04"),d=!0;break;case"vp09":u.push(e+".00.10.08"),d=!0;break;case"av01":u.push(e+".0.01M.08"),d=!0;break;case"mp4a":s.push("mp4a.40.2"),l=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(e),l=!0;break;case"apac":s.push("apac.31.00"),l=!0}}var o,s=[],u=[],l=!1,d=!1,h=null,p=null,f=null,g=null,m=null,v=null,y=null;if((new da).box("moov",ha).box("trak",ha).box("mdia",ha).V("mdhd",function(e){h=fo(e.reader,e.version).language}).box("minf",ha).box("stbl",ha).V("stsd",pa).box("mp4a",function(e){var t=mo(e.reader);g=t.channelCount,m=t.sampleRate,e.reader.Oa()?ha(e):a(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.Oa();){t=e.aa();for(var r=e.aa();128&r;)r=e.aa();if(3==t)e.Fa(),128&(r=e.aa())&&e.Fa(),64&r&&e.skip(e.aa()),32&r&&e.Fa();else if(4==t)n=e.aa(),e.skip(12);else if(5==t)break}n&&(i+="."+yo(n),5==t&&e.Oa()&&(31===(n=(248&(t=e.aa()))>>3)&&e.Oa()&&(n=32+((7&t)<<3)+((224&e.aa())>>5)),i+="."+n)),s.push(i),l=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(e){var t=o||"";switch(o){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+yo(e.aa())+yo(e.aa())+yo(e.aa()),u.push(e),d=!0}).box("hvcC",function(e){var t=o||"";switch(o){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var i=["","A","B","C"][(e=n.aa())>>6],r=31&e,a=n.W(),s=(32&e)>>5?"H":"L";e=[n.aa(),n.aa(),n.aa(),n.aa(),n.aa(),n.aa()],n=n.aa();for(var l=0,c=0;32>c&&(l|=1&a,31!=c);c++)l<<=1,a>>=1;for(t=t+"."+i+r+"."+yo(l,!0),t+="."+s+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,u.push(t),d=!0}).box("dvcC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.aa(),n=n.aa(),u.push(t+"."+bo(e>>1&127)+"."+bo(e<<5&32|n>>3&31)),d=!0}).box("dvvC",function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.aa(),n=n.aa(),u.push(t+"."+bo(e>>1&127)+"."+bo(e<<5&32|n>>3&31)),d=!0}).V("vpcC",function(e){var t=o||"",n=e.reader;e=n.aa();var i=n.aa();n=n.aa()>>4&15,u.push(t+"."+bo(e)+"."+bo(i)+"."+bo(n)),d=!0}).box("av1C",function(e){var t=o||"";if("dav1"===o)t="av01";var n=e.reader;n.skip(1);var i=(e=n.aa())>>>5,r=(64&(n=n.aa()))>>6;u.push(t+"."+i+"."+bo(31&e)+(n>>>7?"H":"M")+"."+bo(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+bo(1)+"."+bo(1)+"."+bo(1)+".0"),d=!0}).box("enca",ga).box("encv",fa).box("sinf",ha).box("frma",function(e){a(e=vo(e.reader).codec)}).box("colr",function(e){u=u.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.Ua(),r=n.Xb(4),a=String.fromCharCode(r[0]);if(a+=String.fromCharCode(r[1]),a+=String.fromCharCode(r[2]),"nclx"===(a+=String.fromCharCode(r[3]))){r=n.Fa(),a=n.Fa();var o=n.Fa(),s=n.aa()>>7,u=t.split(".");10==u.length&&(u[6]=bo(r),u[7]=bo(a),u[8]=bo(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.Xb(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){switch(e.Fa()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.Fa(),e.Fa(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Ge:n}}(e.reader),n=t.colorGamut;v=t.Ge,y=n}).parse(e||t,!0),!s.length&&!u.length)return null;var b=l&&!d,T=new Map;if(d&&!n){n=new zt("video/mp4"),e&&n.init(e);try{n.Of(t);for(var S=c(n.rg()),w=S.next();!w.done;w=S.next()){var A=w.value;T.set(A,A)}}catch(e){}n.Sd()}return{type:b?"audio":"video",mimeType:b?"audio/mp4":"video/mp4",codecs:ml(s.concat(u)).join(", "),language:h,height:p,width:f,channelCount:g,sampleRate:m,closedCaptions:T,Ge:v,colorGamut:y,frameRate:null}}function ml(e){for(var t=new Set,n=[],i=(e=c(e)).next();!i.done;i=e.next()){var r=Ri(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=nt("audio",n),i=nt("video",n),e=nt(it,n),i=function(e){if(1>=e.length)return e;var t=e.find(function(e){return e.startsWith("dvav.")||e.startsWith("dva1.")||e.startsWith("dvh1.")||e.startsWith("dvhe.")||e.startsWith("dav1.")||e.startsWith("dvc1.")||e.startsWith("dv
1i1.")});return t?Ut('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(e){return e!=t}):e}(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function vl(t,n,i){var r,a,o,s,u;return D(function(l){if(1==l.g)return(r=n).cryptoKey?l.A(2):S(l,r.fetchKey(),3);if(!(a=r.iv))for(a=Ee(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+i,s=a.byteLength-1;0<=s;s--)a[s]=255&o,o>>=8;return u="CBC"==n.blockCipherMode?{name:"AES-CBC",iv:a}:{name:"AES-CTR",counter:a,length:64},l.return(e.crypto.subtle.decrypt(u,r.cryptoKey,t))})}function yl(e,t,n,i,r){return e=Jr(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function bl(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.J=new Map,this.D=1,this.B=this.s=null,this.O=0,this.h=new Map,this.I=!1,this.P=null,this.C=!1,this.l=new ra(function(){return function(e){var t,n,i,r,a,o;return D(function(s){if(1==s.g){for(e.u&&e.u.stop(),e.u=null,e.H&&e.H.stop(),e.H=null,t=[],n=c(e.h.values()),i=n.next();!i.done;i=n.next())jl(r=i.value),t.push(Bl(r)),r.ia&&(ul(r.ia),r.ia=null);for(a=c(e.m.values()),o=a.next();!o.done;o=a.next())ul(o.value);return S(s,Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.G=null,w(s)})}(n)}),this.L=Date.now()/1e3,this.m=new Map,this.N={projection:null,hfov:null},this.U=0,this.R=1/0,this.F=null,this.K=[],this.u=new Ki(function(){if(n.j&&n.g)if(n.j.presentationTimeline.T()){var e=n.j.presentationTimeline.bc(),t=n.j.presentationTimeline.Jb();1<t-e?function(e,t,n){D(function(i){return e.H.g||e.g.error||e.K||e.F||Xs(e)||Ys(e)?i.return():S(i,lu(e,function(){Xs(e)||Ys(e)||e.i.setLiveSeekableRange(t,n)}),0)})}(n.g.ha,e,t):nu(n.g.ha)}else nu(n.g.ha),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.G=null,this.H=new Ki(function(){var e=n.g.video;!e.ended&&n.G&&(e.currentTime=n.G,n.G=null)})}function Tl(e,t){for(var n=0>e.g.Xa(),i=c(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).Aa&&r.Aa.Pd(n),r.ia&&r.ia.Pd(n);for(r=(i=c(e.m.values())).next();!r.done;r=i.next())r.value.Pd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Oc&&(Al(e,t,!1,0,!1),n.Oc=i):(t=n.Oc)&&(n.Oc=null,Al(e,t,!0,0,!1)))}function Sl(e,t,n,i,r,a){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,a=void 0!==a&&a,e.s=t,e.I&&(t.video&&Al(e,t.video,n,i,r,a),t.audio&&Al(e,t.audio,n,i,r,a))}function wl(e,t){D(function(n){if(1==n.g)return e.F=null,e.B=t,e.I?t.segmentIndex?n.A(2):S(n,t.createSegmentIndex(),2):n.return();Al(e,t,!0,0,!1),w(n)})}function Al(e,t,n,i,r,a){var o=e.h.get(t.type);o||t.type!=it?o&&(o.Oc&&(t.trickModeVideo?(o.Oc=t,t=t.trickModeVideo):o.Oc=null),o.stream!=t||r)&&(e.m.has(t)?o.ia=e.m.get(t):o.ia&&function(e,t){t&&t!==e.i&&(ul(e),e.i=t)}(o.ia,t),t.type==it&&(r=ki(t.mimeType,t.codecs),qs(e.g.ha,r,e.j.sequenceMode,t.external)),!e.m.has(o.stream)&&o.stream.closeSegmentIndex&&(o.Za?(r="("+o.type+":"+o.stream.id+")",e.J.has(r)||e.J.set(r,o.stream.closeSegmentIndex)):o.stream.closeSegmentIndex()),r=o.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,o.stream=t,o.Aa=null,o.zg=!!a,t.dependencyStream?o.$d=kl(e,t.dependencyStream):o.$d=null,r&&(o.Bb=null,o.tc=null,o.sc=null,t.isAudioMuxedInVideo&&(t=null,"video"===o.type?t=e.h.get("audio"):"audio"===o.type&&(t=e.h.get("video")),t&&(Bl(t).catch(function(){}),t.Bb=null,t.tc=null,t.sc=null,xl(e,t),El(e,t).catch(function(t){e.g&&e.g.onError(t)})))),n?o.Vc?o.pg=!0:o.Za?(o.Tc=!0,o.gf=i,o.pg=!0):(jl(o),Ol(e,o,!0,i).catch(function(t){e.g&&e.g.onError(t)})):o.Za||o.Db||Ul(e,o,0),El(e,o).catch(function(t){e.g&&e.g.onError(t)})):function(e,t){var n,i,r,a,o;D(function(s){switch(s.g){case 1:return n=rt,e.O++,i=e.O,A(s,2),S(s,eu(e.g.ha,n.gb),4);case 4:x(s,3);break;case 2:r=k(s),e.g&&e.g.onError(r);case 3:a=ki(t.mimeType,t.codecs),qs(e.g.ha,a,e.j.sequenceMode,t.external),(e.g.ha.Z.isTextVisible()||e.i.alwaysStreamText)&&e.O==i&&(o=kl(e,t),e.h.set(n.gb,o),Ul(e,o,0)),w(s)}})}(e,t)}function El(e,t){var n,i;return D(function(r){if(1==r.g)return t.Mb?(n=t.stream,i=t.Mb,n.segmentIndex?r.A(2):S(r,n.createSegmentIndex(),2)):r.return();if(t.Mb!=i||t.stream!=n)return r.return();var a=e.g.bd(),o=Qs(e.g.ha,t.type),s=t.stream.segmentIndex.find(t.Ra?t.Ra.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.endByte?u.endByte-u.startByte:null,u&&!s&&(s=(u.endTime-u.getStartTime())*(t.stream.bandwidth||0)/8),s?((u=u.ea)&&(s+=(u.endByte?u.endByte-u.startByte:null)||0),a=8*s/(u=e.g.getBandwidthEstimate())<(o||0)-a-e.i.rebufferingGoal||t.Mb.h.g>s):a=!1,a&&t.Mb.abort(),w(r)})}function xl(e,t){t.Vc||t.Tc||(t.Za?(t.Tc=!0,t.gf=0):null==Js(e.g.ha,t.type)?null==t.Db&&Ul(e,t,0):(jl(t),Ol(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function kl(e,t){var n={stream:t,type:t.type,Aa:null,ia:Il(e,t),Ra:null,Bb:null,Cf:null,tc:null,sc:null,Af:null,Bf:null,Oc:null,endOfStream
1:!1,Za:!1,Db:null,Tc:!1,gf:0,pg:!1,Vc:!1,ld:!0,zg:!1,Kh:!1,fe:!1,Mb:null,$d:null};return t.dependencyStream&&(n.$d=kl(e,t.dependencyStream)),n}function Il(e,t){if("video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===it&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===it&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.ia)&&t===n.i?n:0<e.i.segmentPrefetchLimit?new il(e.i.segmentPrefetchLimit,t,function(t,n,i){return _l(t,n,i||null,e.i.retryParameters,e.g.xc)},0>e.g.Xa()):null}function Cl(t,n){var i,r,a,o,s,u;return D(function(l){switch(l.g){case 1:if(aa(t.l),n.Za||null==n.Db||n.Vc)return l.return();if(n.Db=null,!n.Tc){l.A(2);break}return S(l,Ol(t,n,n.pg,n.gf),3);case 3:return l.return();case 2:if(function(e,t){for(var n=c(e.J.entries()),i=n.next();!i.done;i=n.next()){var r=c(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.J.delete(i))}}(t,n),n.stream.segmentIndex){l.A(4);break}return i=n.stream,A(l,5),S(l,n.stream.createSegmentIndex(),7);case 7:x(l,6);break;case 5:return r=k(l),S(l,Fl(t,n,r),8);case 8:return l.return();case 6:if(i!=n.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),n.Za||n.Db||Ul(t,n,0),l.return();case 4:A(l,9),a=function(t,n){if(Dl(n))return function(e,t){var n=Qs(e,"video")||0;Vi(e.h,t,n)}(t.g.ha,n.stream.originalId||""),null;if(n.type==it&&function(e){e.h&&Vi(e.h,"",0)}(t.g.ha),n.stream.isAudioMuxedInVideo)return null;var i=t.i.updateIntervalSeconds/Math.max(1,Math.abs(t.g.Xa()));if(!Ws(t.g.ha)&&n.type!=it)return i/2;var r=t.g.bd();if("audio"===n.type)for(var a=c(t.m.keys()),o=a.next();!o.done;o=a.next())(o=t.m.get(o.value)).hb(r,!0),al(o,r);a=n.Ra?n.Ra.endTime:r;var s=function(e,t,n){return t==it?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):as(e=$s(e,t),n)}(t.g.ha,n.type,r);o=Math.max(1,Math.max(t.i.rebufferingGoal,t.i.bufferingGoal)*t.D);var u=t.j.presentationTimeline.getDuration()-a,l=Qs(t.g.ha,n.type);if(1e-6>u&&l)return n.endOfStream=!0,"video"==n.type&&(t=t.h.get(it))&&Dl(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,s>=o)return i/2;if(u=!n.Aa,l=function(e,t,n,i){if(t.Aa)return(n=t.Aa.current())&&t.Ra&&.001>Math.abs(t.Ra.startTime-n.startTime)&&(n=t.Aa.next().value),n;if(t.Ra||i)return n=t.Ra?t.Ra.endTime:i,e=0>e.g.Xa(),t.stream.segmentIndex&&(t.Aa=t.stream.segmentIndex.ac(n,!1,e)),t.Aa&&t.Aa.next().value;i=e.j.sequenceMode?0:e.i.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.Xa();var a=null;return i&&(t.stream.segmentIndex&&(t.Aa=t.stream.segmentIndex.ac(r,!1,e)),a=t.Aa&&t.Aa.next().value),a||(t.stream.segmentIndex&&(t.Aa=t.stream.segmentIndex.ac(n,!1,e)),a=t.Aa&&t.Aa.next().value),a}(t,n,r,l),!l)return i;s=!1,u&&n.zg&&(s=!0,n.zg=!1),u=1/0;for(var d=Array.from(t.h.values()),h=(d=c(d)).next();!h.done;h=d.next())Dl(h=h.value)||h.Aa&&!h.Aa.current()||(u=Math.min(u,h.Ra?h.Ra.endTime:r));return a>=u+t.j.presentationTimeline.h?i:("keep"!==t.i.crossBoundaryStrategy&&function(e,t,n){if(t.type===it)return!1;var i=t.Bb;if(!i)return!1;var r=n.ea;if(n=i.g!==r.g,"reset_to_encrypted"===e.i.crossBoundaryStrategy&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.i.crossBoundaryStrategy&&i.encrypted==r.encrypted&&(n=!1),n&&t.ld){var a=e.g.video,o=a.paused;Vl(e,!0).then(function(){var t=(new Map).set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new z("boundarycrossed",t)),o||a.play()})}return n}(t,n,l)||(n.ia&&n.Aa&&!t.m.has(n.stream)&&(n.ia.hb(l.startTime+.001),al(n.ia,l.startTime).catch(function(){})),function(t,n,i,r,a){var o,s,u,l,d,h,p,f,g,m,v,y,b,T,E,I;return D(function(C){switch(C.g){case 1:if(o=rt,s=n.stream,u=n.Aa,n.Za=!0,A(C,2),2==r.Ic())throw new Ce(1,1,1011);return S(C,function(e,t,n,i){var r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T;return D(function(w){switch(w.g){case 1:if(r=rt,a=null==t.Ra,o=[],s=Math.max(0,Math.max(n.appendWindowStart,e.U)-.1),u=Math.min(n.appendWindowEnd,e.R)+.1,l=n.codecs||t.stream.codecs,d=Ri(l),h=Pi(n.mimeType||t.stream.mimeType),(p=n.timestampOffset)==t.Cf&&s==t.tc&&u==t.sc&&d==t.Af&&h==t.Bf){w.A(2);break}if(f=t.Af&&t.Bf&&function(e,t,n,i,r){return(e=fu(e,t,n,i,r)).kc&&e.kc.destroy(),e.type==yu}(e.g.ha,t.type,h,l,Hl(e)),!f){w.A(3);break}if(g=null,t.type===r.Ea?g=e.h.get(r.ma):t.type===r.ma&&(g=e.h.get(r.Ea)),!g){w.A(3);break}return S(w,Bl(g).catch(function(){}),5);case 5:g.Bb=null,g.tc=null,g.sc=null,xl(e,g);case 3:return S(w,Ll(e,t,p,s,u,n,d,h),2);case 2:return Qo(n.ea,t.Bb)||(t.Bb=n.ea,n.l&&n.ea&&(m=Nl(e,t,n.ea),v=function(){var a,o,s,u,l,d,h,p,f;return D(function(g){switch(g.g){case 1:return A(g,2),S(g,m,4);case 4:return a=g.h,aa(e.l),o=null,s=new Map,u={projection:null,hfov:null},(l=new da).box("moov",ha).box("trak",ha).box("mdia",ha).V("mdhd",function(e){o=fo(e.reader,e.version).timescale}).box("hdlr",function(e){switch((e=e.reader).skip(8),e.hd()){case"soun":s.set(r.ma,o);break;case"vide":s.set(r.Ea,o)}o=null}),t.type===r.Ea&&l.box("minf",ha).box("stbl",ha).V("stsd",pa).box("encv",fa).box("avc1",fa).box("avc3",fa).box("hev1",fa).box("hvc1",fa).box("dvav",fa).box("dva1",fa).box("dvh1",fa).box("dvhe",fa).box("dvc1",fa).box("dvi1",fa).box("vexu",ha).box("proj",ha).V("prji",function(e){e=e.reader.hd(),u.projection=e}).box("hfov",function(e){e=e.reader.W()/1e3,u.hfov=e}),l.parse(a),t.type===r.Ea&&function(e,t){if(e.N.projection!=t.projection||e.N.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new z("spatialvideoinfo",n)}else n=new z("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.N=t}}(e,u),s.has(t.type)?n.ea.timescale=s.get(t.type):null!=o&&(n.ea.timescale=o),(d=t.stream.segmentIndex)instanceof qu&&(h=function(e,t){for(var n=(e=c(e.h)).next();!n.done;n=e.next())if(null!=(n=n.value).find(t))return n.hf();return-1}(d,n.startTime)),p=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,S(g,e.g.Bi(t.type,a),5);case 5:return S(g,Zs(e.g.ha,t.type,a,null,t.stream,p,t.ld,i,!1,!1,h),6);case 6:x(g,0);break;
1case 2:throw f=k(g),t.Bb=null,f}})},y=n.startTime,a&&(null!=(b=Qs(e.g.ha,t.type))&&(y=b)),e.g.Ml(y,n.ea),o.push(v()))),T=t.Ra?t.Ra.i:-1,n.i!=T&&o.push(function(e,t,n){var i,r;return D(function(a){return 1==a.g?t==(i=rt).gb?a.return():(t==i.Ea&&(e.Na=new jr),!e.G||(r=Qs(e,t))&&.1>Math.abs(r-n)?a.return():(uu(e,t,function(){return ru(e,t)},null),e.m&&uu(e,i.ma,function(){return ru(e,i.ma)},null),S(a,uu(e,t,function(){return au(e,t,n)},null),2))):e.m?S(a,uu(e,i.ma,function(){return au(e,i.ma,n)},null),0):a.A(0)})}(e.g.ha,t.type,n.startTime)),S(w,Promise.all(o),0)}})}(t,n,r,a),4);case 4:return aa(t.l),t.C?C.return():(l="video/mp4"==s.mimeType||"audio/mp4"==s.mimeType,d=e.ReadableStream,t.i.lowLatencyMode&&t.j.isLowLatency&&d&&l&&("HLS"!=t.j.type||r.m)?(p=new Uint8Array(0),g=f=!1,v=function(e){var o,u,l;return D(function(c){switch(c.g){case 1:if(f)return c.return();if(g=!0,aa(t.l),t.C)return c.return();if(A(c,2),p=Je(p,e),o=!1,u=0,(new da).box("mdat",function(e){u=e.size+e.start,o=!0}).parse(p,!1,!0),!o){c.A(4);break}return l=p.subarray(0,u),p=p.subarray(u),S(c,Rl(t,n,i,s,r,l,!0,a),5);case 5:n.ia&&n.Aa&&al(n.ia,r.startTime,!0);case 4:x(c,0);break;case 2:m=k(c),w(c)}})},S(C,Nl(t,n,r,v),9)):S(C,Nl(t,n,r),7));case 7:return h=C.h,aa(t.l),t.C?C.return():(aa(t.l),n.Tc?(n.Za=!1,Ul(t,n,0),C.return()):S(C,Rl(t,n,i,s,r,h,!1,a),6));case 9:if(y=C.h,m)throw m;if(g){C.A(10);break}return f=!0,aa(t.l),t.C?C.return():n.Tc?(n.Za=!1,Ul(t,n,0),C.return()):S(C,Rl(t,n,i,s,r,y,!1,a),10);case 10:n.ia&&n.Aa&&al(n.ia,r.startTime,!0);case 6:if(aa(t.l),t.C)return C.return();n.Ra=r,u.next(),n.Za=!1,n.Kh=!1,b=t.g.ha.Qb(),T=b[n.type],JSON.stringify(T),n.Tc||(E=null,n.type===o.Ea?E=t.h.get(o.ma):n.type===o.ma&&(E=t.h.get(o.Ea)),E&&E.type==o.ma?t.g.Mf(r,n.stream,E.stream.isAudioMuxedInVideo):t.g.Mf(r,n.stream,n.stream.codecs.includes(","))),Ul(t,n,0),x(C,0);break;case 2:if(I=k(C),aa(t.l,I),t.C)return C.return();if(n.Za=!1,7001==I.code)n.Za=!1,jl(n),Ul(t,n,0),C.A(0);else{if(n.type!=o.gb||!t.i.ignoreTextStreamFailures)return 3017==I.code?S(C,function(e,t,n){var i,r,a,o;return D(function(s){if(1==s.g){if(i=Array.from(e.h.values()),i.some(function(e){return e!=t&&e.Kh}))return s.A(2);if(r=0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime,e.g.disableStream(t.stream,r))return s.return();if(e.i.avoidEvictionOnQuotaExceededError)return Ul(e,t,4),s.return();if(20<(a=Math.round(100*e.D)))e.D-=.2;else{if(!(4<a))return t.fe=!0,e.C=!0,e.g.onError(n),s.return();e.D-=.04}return t.Kh=!0,o=e.g.bd(),S(s,Pl(e,t,o),2)}Ul(e,t,4),w(s)})}
1(t,n,I),0):(n.fe=!0,1==I.category&&n.ia&&dl(n.ia,r),I.severity=2,S(C,Fl(t,n,I),0));t.h.delete(o.gb),C.A(0)}}})}(t,n,r,l,s).catch(function(){}),n.$d&&Ml(t,n.$d,r,o)),null)}(t,n),null!=a&&(Ul(t,n,a),n.fe=!1),x(l,10);break;case 9:return o=k(l),S(l,Fl(t,n,o),11);case 11:return l.return();case 10:if(s=Array.from(t.h.values()),!t.I||!s.every(function(e){return e.endOfStream})){l.A(0);break}return S(l,t.g.ha.endOfStream(),13);case 13:aa(t.l),0!=(u=t.g.ha.getDuration())&&u<t.j.presentationTimeline.getDuration()&&t.j.presentationTimeline.vb(u),w(l)}})}function Ml(e,t,n,i){var r,a,o,s,u,l,c,h,p,f;return D(function(g){switch(g.g){case 1:for(r=t.stream,s=(o=(a=r.segmentIndex)&&a.ac(n))&&o.next().value;s&&e.K.includes(s.startTime);)s=o&&o.next().value;if(!s){g.A(0);break}if(!(u=s.ea)||Qo(u,t.Bb)){g.A(3);break}return t.Bb=u,A(g,4),S(g,Nl(e,t,u),6);case 6:l=g.h;var m=e.g.ha;m.L&&Nt(m.L,l,0,r),e.K=[],x(g,3);break;case 4:throw c=k(g),t.Bb=null,c;case 3:if(t.Ra&&t.Ra==s){g.A(0);break}return t.Ra=s,A(g,8),S(g,Nl(e,t,s),10);case 10:h=g.h,(m=e.g.ha).L&&Nt(m.L,h,0,r),e.K.push(s.startTime),x(g,9);break;case 8:throw p=k(g),t.Ra=null,p;case 9:if(f=Math.max.apply(Math,[0].concat(d(e.K))),e.g.bd()+i>f)return S(g,Ml(e,t,s.startTime,i),0);g.A(0)}})}function Ll(e,t,n,i,r,a,o,s){var u,l,c,d,h;return D(function(p){switch(p.g){case 1:if(u=rt,l=Hl(e),A(p,2),t.tc=i,t.sc=r,o&&(t.Af=o),s&&(t.Bf=s),t.Cf=n,c=e.j.sequenceMode||"HLS"==e.j.type,d=null,t.type===u.Ea?d=e.h.get(u.ma):t.type===u.ma&&(d=e.h.get(u.Ea)),!(d&&d.stream&&d.stream.isAudioMuxedInVideo)){p.A(4);break}return S(p,tu(e.g.ha,d.type,n,i,r,c,d.stream.mimeType,d.stream.codecs,l),4);case 4:return S(p,tu(e.g.ha,t.type,n,i,r,c,a.mimeType||t.stream.mimeType,a.codecs||t.stream.codecs,l),6);case 6:x(p,0);break;case 2:throw h=k(p),t.tc=null,t.sc=null,t.Af=null,t.Bf=null,t.Cf=null,h}})}function Rl(e,t,n,i,r,a,o,s){var u,l,c,d;return o=void 0!==o&&o,s=void 0!==s&&s,D(function(h){switch(h.g){case 1:return u=i.closedCaptions&&0<i.closedCaptions.size,e.i.shouldFixTimestampOffset&&(l="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,c=null,r.ea&&(c=r.ea.timescale),l&&c&&"video"===i.type&&"DASH"==e.j.type&&(new da).box("moof",ha).box("traf",ha).V("tfdt",function(n){var i,a,o,s,u;return D(function(l){return i=po(n.reader,n.version),(a=i.baseMediaDecodeTime)?(o=-a/c,(Number(t.Cf)||0)<o?(s=t.tc,u=t.sc,S(l,Ll(e,t,o,s,u,r),0)):l.A(0)):l.return()})}).parse(a,!1,o)),S(h,Pl(e,t,n),2);case 2:return aa(e.l),d=t.ld,t.ld=!1,S(h,e.g.Bi(t.type,a),3);case 3:return S(h,Zs(e.g.ha,t.type,a,r,i,u,d,s,o),4);case 4:aa(e.l),w(h)}})}function Pl(e,t,n){var i,r,a,o,s,u,l,d,h;return D(function(p){return 1==p.g?((i=t.stream.segmentIndex)instanceof qu&&(i.hb(e.j.presentationTimeline.Kb()),r=[],function(e,t){for(var n=(e=c(e.h)).next();!n.done;n=e.next())t(n.value)}(i,function(e){r.push(e.hf())})),a=Math.max(e.i.bufferBehind*e.D,e.j.presentationTimeline.h),null==(o=Js(e.g.ha,t.type))?(e.F==t&&(e.F=null),p.return()):(s=n-o,u=e.i.evictionGoal,l=e.j.presentationTimeline.bc(),d=e.j.presentationTimeline.Jb(),h=s-a,d-l>u&&(h=Math.max(s-a,l-u-o)),h<=u?p.return():S(p,e.g.ha.remove(t.type,o,o+h,r),2))):4!=p.g?(aa(e.l),e.F?S(p,Pl(e,e.F,n),4):p.A(0)):(aa(e.l),void w(p))})}function Dl(e){return e&&e.type==it&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Nl(e,t,n,i){var r,a,o,s,u;return D(function(l){switch(l.g){case 1:if(r=n.cc())return l.return(r);if(a=null,t.ia){var c=t.ia,d=c.h;n instanceof Jo&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.ci=i),a=c.se):a=null}return a||(a=_l(n,t.stream,i||null,e.i.retryParameters,e.g.xc)),o=0,t.Aa&&(o=t.Aa.h),t.Mb=a,S(l,a.promise,2);case 2:if(s=l.h,t.Mb=null,u=s.data,!n.aesKey){l.A(3);break}return S(l,vl(u,n.aesKey,o),4);case 4:u=l.h;case 3:return l.return(u)}})}function _l(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof $o?e:void 0,s=o?1:0;return(e=yl(e.S(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(ta,e,{type:s,stream:t,segment:o,isPreload:a})}function Ol(e,t,n,i){var r,a;return D(function(o){return 1==o.g?(t.Tc=!1,t.pg=!1,t.gf=0,t.Vc=!0,t.Ra=null,t.Aa=null,t.ia&&!e.m.has(t.stream)&&ul(t.ia),i?(r=e.g.bd(),a=e.g.ha.getDuration(),S(o,e.g.ha.remove(t.type,r+i,a),3)):S(o,eu(e.g.ha,t.type),4)):3!=o.g?(aa(e.l),n?S(o,e.g.ha.flush(t.type),3):o.A(3)):(aa(e.l),t.Vc=!1,t.endOfStream=!1,t.Za||t.Db||Ul(e,t,0),void w(o))})}function Ul(e,t,n){var i=t.type;(i!=it||e.h.has(i))&&(t.Db=new zi(function(){var n;return D(function(i){return 1==i.g?(A(i,2),S(i,Cl(e,t),4)):2!=i.g?x(i,0):(n=k(i),e.g&&e.g.onError(n),void w(i))})}).X(n))}function jl(e){null!=e.Db&&(e.Db.stop(),e.Db=null)}function Bl(e){return D(function(t){return e.Mb?S(t,e.Mb.abort(),0):t.A(0)})}function Fl(e,t,n){var i;return D(function(r){if(1==r.g)return 3024==n.code?(t.Za=!1,jl(t),Ul(e,t,0),r.return()):S(r,Or(e.P),2);if(aa(e.l),1===n.category&&1003!=n.code){if(t.Oc)return Tl(e,!1),r.return();i=0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}n.handled&&1011==n.code||e.g.onError(n),n.handled||e.i.failureCallback(n),w(r)})}function Vl(e,t){t=void 0!==t&&t;var n,i,r,a,o,s=void 0===s||s;return D(function(u){if(1==u.g){if(n=Date.now()/1e3,i=e.i.minTimeBetweenRecoveries,!t){if(!e.i.allowMediaSourceRecoveries||n-e.L<i)return u.return(!1);e.L=n}return r=rt,(a=e.h.get(r.ma))&&(a.Bb=null,a.tc=null,a.sc=null,s&&xl(e,a),Bl(a).catch(function(){}),a.Aa&&a.Aa.Nh(),jl(a)),(o=e.h.get(r.Ea))&&(o.Bb=null,o.tc=null,o.sc=null,s&&xl(e,o),Bl(o).catch(function(){}),o.Aa&&o.Aa.Nh(),jl(o)),S(u,hu(e.g.ha,Hl(e)),2)}return!o||o.Vc||o.Za||o.Db||Ul(e,o,0),!a||a.Vc||a.Za||a.Db||Ul(e,a,0),u.return(!0)})}function Gl(e){if("keep"!==e.i.crossBoundaryStrategy){e.H.stop();var t=e.g.bd(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.Bb)&&null!==n.g&&(0>(t=n.g-t)||1<t||(e.G=n.g+.1,e.H.X(t)))}}function Hl(e,t){t=void 0!==t&&t;var n=new Map;return e.s.audio&&n.set("audio",e.s.audio),e.s.video&&n.set("video",e.s.video),t&&e.B&&n.set(it,e.B),n}function zl(){}function Kl(e,t,n,i,r){var a,o=r in i,s=o?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=o||s,l=!0;for(a in t){var c=r+"."+a,d=o?i[r]:n[a];u||a in n?void 0===t[a]?void 0===d||u?delete e[a]:e[a]=cn(d):s?e[a]=t[a]:d.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=cn(d)),c=Kl(e[a],t[a],d,i,c),l=l&&c):typeof t[a]!=typeof d||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=d.constructor?(X("Invalid config, wrong type for "+c),l=!1):"function"==typeof n[a]&&n[a].length!=t[a].length?(Y("Unexpected number of arguments for "+c),e[a]=t[a]):e[a]=Array.isArray(e[a])?t[a].slice():t[a]:(X("Invalid config, unrecognized key "+c),l=!1)}return l}function Wl(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)0!=r&&"\\"==e[r-1]||(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function ql(e,t){return e&&t}function Xl(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return e=function e(t,i){return Object.keys(t).reduce(function(r,a){var o=t[a];return i.hasOwnProperty(a)?o instanceof HTMLElement&&i[a]instanceof HTMLElement?o.isEqualNode(i[a])||(r[a]=o):n(o)&&n(i[a])?(o=e(o,i[a]),(0<Object.keys(o).length||!n(o))&&(r[a]=o)):Array.isArray(o)&&Array.isArray(i[a])?en(o,i[a])||(r[a]=o):Number.isNaN(o)&&Number.isNaN(i[a])||o!==i[a]&&(r[a]=o):r[a]=o,r},{})}(e,t),function e(t){for(var i=c(Object.keys(t)),r=i.next();!r.done;r=i.next())if(!(t[r=r.value]instanceof HTMLElement))if(n(t[r])&&0===Object.keys(t[r]).length)delete t[r];else{var a=t[r];Array.isArray(a)&&0===a.length||"function"==typeof t[r]?delete t[r]:n(t[r])&&(e(t[r]),0===Object.keys(t[r]).length&&delete t[r])}}(e),e}function Yl(){}function Jl(e){return new ae(e=je(e)).Gb}function Ql(e,t,n){function i(e){ke(a).setUint32(o,e.byteLength,!0),o+=4,a.set(Ee(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new Ce(2,6,6015);var r;r="string"==typeof t?Fe(t,!0):t,e=Fe(e=je(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function $l(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Ql(e,n=je(e).split("skd://").pop(),t))}function Zl(e,t){2===e&&(e=t.drmInfo)&&Rr(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function ec(){this.g=null}function tc(e,t){return e.filter(function(e){return!(e.audio&&e.audio.channelsCount&&e.audio.channelsCount>t)}).sort(function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0})}function nc(e,t){return e.filter(function(e){return!e.audio||e.audio.codecs==t})}function ic(){}function rc(){var t=1/0,n=Re();navigator.connection&&navigator.connection.saveData&&(t=360);var i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,t=Ql(t,i=Jl(t),n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},r="reload",a=!1;jt()&&n.od()&&(r="smooth",a=!0);var o={trackSelectionCallback:function(e){return D(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return D(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?S(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){return ql([e,t])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:i,manifest:a={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,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","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:sc,manifestPreprocessorTXml:uc,sequenceMode:!1,multiTypeVariantsAllowed:a,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0}
1,hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:n.nd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:sc,manifestPreprocessorTXml:uc,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},streaming:{retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return ql([e])},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,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,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:r,addExtraFeaturesToSourceBuffer:function(e){return ql([e],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(e,t){return ql([e,t])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new Er},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(ec,[null].concat(d(N.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,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,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};return o.trackSelectionCallback=function(e){return D(function(t){return t.return(function(e,t,n){var i=n;"AUTO"==i&&(n=e.some(function(e){return!(!e.hdr||"HLG"!=e.hdr)}),i=wv(n));var r=e.filter(function(e){return!("variant"!=e.type||e.hdr&&e.hdr!=i)});n=[];var a=mt(t,r.map(function(e){return e.language}));a&&(n=r.filter(function(e){return dt(e.language)==a})),0==n.length&&(n=r.filter(function(e){return e.primary})),0==n.length&&(r.map(function(e){return e.language}),n=r);var o=n.filter(function(e){return e.height&&480>
1=e.height});for(o.length&&(o.sort(function(e,t){return t.height-e.height}),n=o.filter(function(e){return e.height==o[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(e,t){return e.bandwidth-t.bandwidth}),t.push(n[r])),e=c(e),n=e.next();!n.done;n=e.next())(n=n.value).type!=it&&"image"!=n.type||t.push(n);return t}(e,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},n.$a(s)}function ac(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function oc(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Kl(e,t,n||rc(),i,"")}function sc(e){return ql([e],e)}function uc(e){return ql([e],e)}function lc(){this.g=null,this.h=[]}function cc(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=(e=c(e.h)).next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function dc(){this.i=this.h=null,this.g=[]}function hc(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function pc(){this.C=this.U=NaN,this.l="",this.j=this.bj=this.u=this.B=this.J=this.D=this.s=this.m=this.I=this.F=this.i=this.P=this.R=this.L=this.N=this.O=NaN,this.K=0,this.G=this.H=NaN,this.g=new lc,this.h=new dc}function fc(e,t,n){e.U=t,e.C=n}function gc(e,t){e.j=isNaN(e.j)?t:e.j+t}function mc(e){for(var t=e.U,n=e.C,i=e.l,r=e.B,a=e.N,o=e.O,s=e.L,u=e.R,l=e.P,d=e.u,h=e.i,p=e.F,f=e.I,g=e.m,m=cc(e.g,"playing"),v=cc(e.g,"paused"),y=cc(e.g,"buffering"),b=e.s,T=e.D,S=e.J,w=e.bj,A=e.j,E=e.K,x=e.H,k=e.G,I=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=c(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(e.g),C=[],M=(e=c(e.h.g)).next();!M.done;M=e.next())M=M.value,C.push({timestamp:M.timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:a,droppedFrames:o,corruptedFrames:s,stallsDetected:u,gapsJumped:l,estimatedBandwidth:d,completionPercent:h,loadLatency:p,manifestTimeSeconds:f,drmTimeSeconds:g,playTime:m,pauseTime:v,bufferingTime:y,licenseTime:b,liveLatency:T,maxSegmentDuration:S,manifestSizeBytes:w,bytesDownloaded:A,nonFatalErrorCount:E,manifestPeriodCount:x,manifestGapCount:k,stateHistory:I,switchHistory:C}}function vc(e,t,n,i){ee.call(this),this.N=e,this.U=t,this.La=i.networkingEngine,this.m=n,this.B=null,this.Ha=0,this.Ya=i.ud,this.F=i.Fl,this.cb=i.Gl,this.g=i.config,this.l=this.G=this.h=null,this.oa=!1,this.H=i.Rl,this.ra=!1,this.i=null,this.ba=!1,this.j=this.D=null,this.Z=!1,this.L=new Map,this.sa=!1,this.Na=i.Ql,this.Y=new pc,this.na=new jr,this.u=new jr,this.O=null,this.s=!1,this.$=i.ek,this.R=this.J=null,this.Ta=i.dk,this.P=!1,this.K=[],this.I=[],this.C=!0}function yc(e,t,n){(e=t?e.I:e.K)?e.push(n):n()}function bc(e,t){if(e.O=t,e.P=!0,e.K)for(var n=(t=c(e.K)).next();!n.done;n=t.next())(n=n.value)();e.K=null}function Tc(e){if(e.s)throw new Ce(2,7,7003)}function Sc(e,t){e.dispatchEvent(new z("onstatechange",(new Map).set("state",t)))}function wc(e,t){var n,i,r,a;return D(function(o){switch(o.g){case 1:if(!e.h||e.i)return o.return();if(Sc(e,"drm-engine"),e.Ha=Date.now()/1e3,e.i=e.Ya(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.C}),!no(e.F,e.h)){o.A(2);break}return n=new z("trackschanged",void 0),S(o,Promise.resolve(),3);case 3:Tc(e),e.dispatchEvent(n);case 2:return i=fr(e.h.variants),r=!0,e.h&&e.h.presentationTimeline&&"HLS"!=e.h.type&&(r=e.h.presentationTimeline.T()),S(o,xa(e.i,i,e.h.offlineSessionIds,r),4);case 4:if(Tc(e),!t){o.A(5);break}return S(o,e.i.$b(t),6);case 6:Tc(e);case 5:return S(o,to(e.F,e.h),7);case 7:if(!o.h){o.A(0);break}return a=new z("trackschanged",void 0),S(o,Promise.resolve(),9);case 9:e.dispatchEvent(a),w(o)}})}function Ac(e,t,n){var i,r,a,o,s;return D(function(u){return 1==u.g?(i=e.g.streaming.segmentPrefetchLimit||2,r=new il(i,t,function(t,n,i){return _l(t,n,i||null,e.g.streaming.retryParameters,e.La,e.C)},!1),e.L.set(t.id,r),t.segmentIndex?u.A(2):S(u,t.createSegmentIndex(),2)):(a="number"==typeof e.m?e.m:0,o=t.segmentIndex.ac(a),s=null,o&&((s=o.current())||(s=o.next().value)),s||(s=zu(t.segmentIndex)),s?n?s.ea?S(u,ol(r,s.ea),0):u.A(0):S(u,al(r,s.startTime),0):u.A(0))})}function Ec(e,t){ee.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{sd:null,rd:Ic,dd:function(e,t){return xc(n,"enter",e,t)}},{sd:kc,rd:Ic,dd:function(e,t){return xc(n,"enter",e,t)}},{sd:Cc,rd:Ic,dd:function(e,t){return xc(n,"enter",e,t)}},{sd:Ic,rd:kc,dd:function(e,t){return xc(n,"exit",e,t)}},{sd:Ic,rd:Cc,dd:function(e,t){return xc(n,"exit",e,t)}},{sd:kc,rd:Cc,dd:function(e,t){t?xc(n,"skip",e,t):(xc(n,"enter",e,t),xc(n,"exit",e,t))}},{sd:Cc,rd:kc,dd:function(e,t){return xc(n,"skip",e,t)}}],this.h=new xt,this.h.o(this.i,"regionremove",function(e){n.g.delete(e.region)})}function xc(e,t,n,i){t=new z(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}Cu.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},Du.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(r=_u.prototype).ready=function(){var e=this;ku(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){!function(){if(null==e.h||0==e.h&&1/0!=e.g.duration)e.i=!0;else{var t=e.g.currentTime,n=null;if("number"==typeof e.h)n=e.h;else if(e.h instanceof Date){var i=Ou(e);null!==i&&(n=e.h.getTime()/1e3-i,n=Uu(e,n))}null==n?e.i=!0:(0>n&&(n=Math.max(0,t+n)),t!=n?(e.j.qa(e.g,"seeking",function(){e.i=!0}),e.g.currentTime=n):e.i=!0)}}()})},r.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},r.sg=function(e){this.h=this.i?this.h:e},r.Ue=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=Uu(this,e=e.getTime()/1e3-(Ou(this)||0))),e||0},r.ri=function(){return 0},r.pi=function(){return 0},r.jj=function(){},r.Xi=function(){var e=is(this.g.buffered);return null!=e&&e>=this.g.duration-1},(r=ju.prototype).ready=function(){this.m.ya(.25)},r.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.u=function(){}},r.sg=function(e){Lu(this.i,Bu(this,e))},r.Ue=function(){var e=Mu(this.i);return 0<this.h.readyState&&!this.h.paused?Gu(this,e):e},r.ri=function(){return this.j.G},r.pi=function(){return this.j.D},r.jj=function(){this.j.Mf()},r.Xi=function(){if(this.g.T()){var e=this.g.Gc(),t=is(this.h.buffered);if(null!=t&&t>=e)return!0}return!1},(r=Hu.prototype).getNumReferences=function(){return this.g.length},r.getNumEvicted=function(){return this.i},r.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)},r.Il=function(){this.s=!0},r.Hb=function(e){for(var t=c(this.g),n=t.next();!n.done;n=t.next())e(n.value)},r.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},r.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},r.offset=function(e){if(!this.s)for(var t=c(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},r.Ff=function(e){if(!this.s&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(e){return Math.round(1e3*e.startTime)/1e3<t}),this.g.push.apply(this.g,d(e))}},r.pe=function(e,t){var n=this;e=e.filter(function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)}),this.Ff(e),this.hb(t)}
1,r.hb=function(e){if(!this.s){var t=this.g.length;this.g=this.g.filter(function(t){return t.endTime>e}),this.i+=t-this.g.length}},r.xd=function(e,t,n){if(n=void 0!==n&&n,!this.s){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;0!=this.g.length&&((t=new $o((e=this.g[this.g.length-1]).startTime,t,e.D,e.startByte,e.endByte,e.ea,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.C,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},r.ig=function(e,t){var n=this;this.s||(this.m&&this.m.stop(),this.m=new Ki(function(){var e=t();e?n.g.push.apply(n.g,d(e)):(n.m.stop(),n.m=null)}),this.m.ya(e))},Hu.prototype[Symbol.iterator]=function(){return this.ac(0)},Hu.prototype.ac=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var i=this.find(e);if(null==i)return null;var r=this.get(i);n?i++:i--;var a=-1;if(r&&0<r.g.length)for(var o=r.g.length-1;0<=o;--o){var s=r.g[o];if(e>=s.startTime&&e<s.endTime){if(!t){for(;o&&!s.l;)o--,s=r.g[o];if(!s.l)return X("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new Wu(this,i,a,n)},Hu.prototype.hf=function(){return-1},H("shaka.media.SegmentIndex",Hu),Hu.forSingleSegment=Ku,Hu.prototype.getIteratorForTime=Hu.prototype.ac,Hu.prototype.updateEvery=Hu.prototype.ig,Hu.prototype.fit=Hu.prototype.xd,Hu.prototype.evict=Hu.prototype.hb,Hu.prototype.mergeAndEvict=Hu.prototype.pe,Hu.prototype.offset=Hu.prototype.offset,Hu.prototype.get=Hu.prototype.get,Hu.prototype.find=Hu.prototype.find,Hu.prototype.markImmutable=Hu.prototype.Il,Hu.prototype.release=Hu.prototype.release,Hu.prototype.getNumEvicted=Hu.prototype.getNumEvicted,Hu.prototype.getNumReferences=Hu.prototype.getNumReferences,(r=Wu.prototype).Pd=function(e){this.reverse=e},r.lk=function(){return this.h},r.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.B&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},r.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.B&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},r.Nh=function(){var e=this.current();if(e.s&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},H("shaka.media.SegmentIterator",Wu),Wu.prototype.resetToLastIndependent=Wu.prototype.Nh,Wu.prototype.next=Wu.prototype.next,Wu.prototype.current=Wu.prototype.current,Wu.prototype.currentPosition=Wu.prototype.lk,Wu.prototype.setReverse=Wu.prototype.Pd,v(qu,Hu),(r=qu.prototype).clone=function(){var e=new qu;return e.h=this.h.slice(),e.i=this.i,e},r.release=function(){for(var e=c(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},r.Hb=function(e){for(var t=c(this.h),n=t.next();!n.done;n=t.next())n.value.Hb(e)},r.find=function(e){for(var t=this.i,n=c(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},r.get=function(e){for(var t=this.i,n=c(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},r.offset=function(){},r.Ff=function(){},r.hb=function(e){for(var t=c(this.h),n=t.next();!n.done;n=t.next())n.value.hb(e);for(;1<this.h.length&&0==this.h[0].getNumReferences();)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},r.pe=function(){},r.xd=function(){},r.ig=function(){},H("shaka.media.MetaSegmentIndex",qu),qu.prototype.updateEvery=qu.prototype.ig,qu.prototype.fit=qu.prototype.xd,qu.prototype.mergeAndEvict=qu.prototype.pe,qu.prototype.evict=qu.prototype.hb,qu.prototype.merge=qu.prototype.Ff,qu.prototype.offset=qu.prototype.offset,qu.prototype.get=qu.prototype.get,qu.prototype.find=qu.prototype.find,qu.prototype.forEachTopLevelReference=qu.prototype.Hb,qu.prototype.release=qu.prototype.release,Xu.prototype.release=function(){this.set(this.$c()),this.h&&(this.h.stop(),this.h=null),this.g=null},Xu.prototype.set=function(e){this.i=e,Yu(this)},Xu.prototype.$c=function(){return this.g.$c()},Ju.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=c(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},v($u,ee),$u.prototype.release=function(){this.g.clear(),ee.prototype.release.call(this)},$u.prototype.j=function(e){for(var t=c(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).Mg;e:{for(var r=n.ve,a=r.length-1;0<=a;a--){var o=r[a];if(o.position<=e){r=o.Ed;break e}}r=null}a=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),o=r&&i&&r.label&&i.label&&i.label!==r.label;var s=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!tn(i.roles,r.roles),(o||s||i)&&Zu(this,e,r.contentType)&&(n.Mg=r,i=new z("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&Zu(this,e,r.contentType)&&(n.Mg=r,JSON.stringify(r),n=new z("qual
1itychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},v(tl,ee),tl.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),ee.prototype.release.call(this)},il.prototype.hb=function(e,t){t=void 0!==t&&t;for(var n=c(this.h.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&dl(this,i);t&&ll(this)},il.prototype.Pd=function(e){this.s=e,this.g&&this.g.Pd(e)},hl.prototype.abort=function(){this.se&&this.se.abort()},(r=bl.prototype).destroy=function(){return this.l.destroy()},r.configure=function(e){if(this.i=e,this.P=new _r({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.ia&&(ul(t.ia),t.ia=null);for(var n=(t=c(this.m.keys())).next();!n.done;n=t.next())n=n.value,ul(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(it))&&t.ia&&(ul(t.ia),t.ia=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.ia&&(ul(t.ia),t.ia=null),n=(t=c(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).ia?(cl(n.ia,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(ul(n.ia),n.ia=null)):0<e.segmentPrefetchLimit&&(n.ia=Il(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=c(e.j.variants),r=i.next(),a={};!r.done;a={Pb:void 0},r=i.next())if(a.Pb=r.value,a.Pb.audio)if(e.m.has(a.Pb.audio)){if(cl(r=e.m.get(a.Pb.audio),t),!(0<t&&n.some(function(e){return function(t){return ut(e.Pb.audio.language,t)}}(a)))){var o=e.h.get(a.Pb.audio.type);r!==(o&&o.ia)&&ul(r),e.m.delete(a.Pb.audio)}}else 0>=t||!n.some(function(e){return function(t){return ut(e.Pb.audio.language,t)}}(a))||!(r=Il(e,a.Pb.audio))||(a.Pb.audio.segmentIndex||a.Pb.audio.createSegmentIndex(),e.m.set(a.Pb.audio,r))}(this)},r.start=function(e){var t=this;return D(function(n){if(1==n.g)return S(n,function(e,t){var n,i,r,a,o,s,u;return D(function(l){if(1==l.g){if(!e.s)throw new Ce(2,5,5006);return n=Hl(e,!0),S(l,e.g.ha.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(aa(e.l),e.updateDuration(),i=c(n.keys()),r=i.next();!r.done;r=i.next())a=r.value,o=n.get(a),e.h.has(a)||(s=kl(e,o),t.has(o.id)&&(rl(u=t.get(o.id),function(t,n,i){return _l(t,n,i||null,e.i.retryParameters,e.g.xc)}),s.ia=u),e.h.set(a,s),Ul(e,s,0));w(l)})}(t,e||new Map),2);aa(t.l),t.I=!0,w(n)})},r.ld=function(){if(this.g){for(var e=this.g.bd(),t=c(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.ha;if(i==it?r=null!=(r=r.h).g&&null!=r.h&&(e>=r.g&&e<r.h):r=rs(r=$s(r,i),e),!r){if(this.L=0,n.ia&&(n.ia.g=null),"audio"===n.type)for(var a=(r=c(this.m.values())
1).next();!a.done;a=r.next())a.value.g=null;n.Aa=null,(null!=Qs(this.g.ha,i)||n.Za)&&xl(this,n),n.Mb&&(n.Mb.abort(),n.Mb=null),i===it&&((i=this.g.ha).I&&i.I.Sd()),n.ld=!0}}"keep"!==this.i.crossBoundaryStrategy&&Gl(this)}},r.updateDuration=function(){var e=Bt(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.u&&this.u.stop(),nu(this.g.ha)),this.g.ha.vb(t)):e?(this.u&&this.u.ya(.5),this.g.ha.vb(1/0)):this.g.ha.vb(Math.pow(2,32))},H("shaka.util.ConfigUtils",zl),zl.getDifferenceFromConfigObjects=Xl,zl.convertToConfigObject=Wl,zl.mergeConfigObjects=Kl,H("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2}),H("shaka.drm.FairPlay",Yl),Yl.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&Rr(e.keySystem)){try{var n=Oe(t.data)}catch(e){return}if(e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch(e){}e&&(t.data=Ae(qe(n)))}},Yl.muxFairPlayRequest=function(e,t){Zl(e,t)},Yl.expressplayFairPlayRequest=function(e,t){if(2===e){var n=t.drmInfo;n&&Rr(n.keySystem)&&Zl(e,t)}},Yl.conaxFairPlayRequest=function(e,t){Zl(e,t)},Yl.ezdrmFairPlayRequest=function(e,t){Zl(e,t)},Yl.verimatrixFairPlayRequest=function(e,t){2===e&&(e=t.drmInfo)&&Rr(e.keySystem)&&(e=We(e=Ee(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Be("spc="+e))},Yl.muxInitDataTransform=function(e,t,n){return $l(e,t,n)},Yl.expressplayInitDataTransform=function(e,t,n){return $l(e,t,n)},Yl.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=je(t).split("skd://").pop().split("?").shift(),i=e.atob(i);var r=new ArrayBuffer(2*i.length);r=xe(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return Ql(t,r,n)},Yl.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,Ql(e,n=je(e).split(";").pop(),t))},Yl.verimatrixInitDataTransform=function(e,t,n){return $l(e,t,n)},Yl.initDataTransform=Ql,Yl.defaultGetContentId=Jl,Yl.isFairPlaySupported=function(){var e;return D(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},A(t,2),S(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(k(t),t.return(!1))})},ec.prototype.configure=function(e){this.g=e},ec.prototype.getConfiguration=function(){return this.g},ec.prototype.create=function(e){var t;if(this.g.language){var n=function(e,t){t=dt(t);var n=mt(t,e.map(function(e){return gt(e)}));return n?e.filter(function(e){return n==gt(e)}):[]}(e,this.g.language);n.length&&(t=n)}t||(t=(t=e.filter(function(e){return e.primary})).length?t:e),e=function(e,t){return e.filter(function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)})}(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=function(e,t){return e.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==t})}(t,this.g.videoLayout),e.length&&(t=e)),this.g.Kc&&(e=function(e,t){if("AUTO"==t){var n=e.some(function(e){return!(!e.video||!e.video.hdr||"HLG"!=e.video.hdr)});t=wv(n)}return e.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==t})}(t,this.g.Kc),e.length&&(t=e));var i=[this.g.channelCount,this.g.preferredAudioChannelCount];if((e=i.filter(function(e,t){return e&&i.indexOf(e)===t})).length)for(n=(e=c(e)).next();!n.done;n=e.next())if((n=tc(t,n.value)).length){t=n;break}this.g.Uc&&(e=function(e,t){return e.filter(function(e){return!(!e.audio||!e.audio.label)&&e.audio.label.toLowerCase()==t.toLowerCase()})}(t,this.g.Uc),e.length&&(t=e)),this.g.Rd&&(e=function(e,t){return e.filter(function(e){return!(!e.video||!e.video.label)&&e.video.label.toLowerCase()==t.toLowerCase()})}(t,this.g.Rd),e.length&&(t=e)),e=function(e,t){return e.filter(function(e){return!e.audio||e.audio.spatialAudio==t})}(t,this.g.spatialAudio),e.length&&(t=e);var r=[this.g.audioCodec,this.g.Td].concat(d(this.g.preferredAudioCodecs));if((e=r.filter(function(e,t){return e&&r.indexOf(e)===t})).length)for(n=(e=c(e)).next();!n.done;n=e.next())if((n=nc(t,n.value)).length){t=n;break}return new qa(t[0],t,!("smooth"==this.g.codecSwitchingStrategy&&jt()))},H("shaka.util.PlayerConfiguration",ic),ic.mergeConfigObjects=oc,ic.createDefaultForLL=ac,ic.createDefault=rc,v(vc,ee),(r=vc.prototype).getStartTime=function(){return this.m},r.zd=function(){return this.N},r.ih=function(){return this.h},r.getStats=function(){return this.Y},r.Uk=function(){return this.J?sr(this.J):null},r.Tk=function(){return this.R?ur(this.R):null},r.start=function(){var t,n=this;D(function(i){switch(i.g){case 1:return S(i,Promise.resolve(),2);case 2:return A(i,3),S(i,function(e){var t,n,i,r,a,o,s,u,l;return D(function(d){switch(d.g){case 1:if(Sc(e,"manifest-parser"),e.l||(e.G=lo(e.N,e.U),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.C}
1)),t=Date.now()/1e3,Sc(e,"manifest"),e.h){d.A(2);break}return S(d,e.l.start(e.N,e.cb),3);case 3:if(e.h=d.h,1!=e.h.variants.length){d.A(2);break}for(n=[],i=e.h.variants[0],r=c([i.video,i.audio]),a=r.next();!a.done;a=r.next())(o=a.value)&&!o.segmentIndex&&n.push(o.createSegmentIndex());if(!(0<n.length)){d.A(2);break}return S(d,Promise.all(n),2);case 2:return e.na.resolve(),s=new z("manifestparsed",void 0),S(d,Promise.resolve(),7);case 7:if(e.dispatchEvent(s),0==e.h.variants.length)throw new Ce(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.h),u=Date.now()/1e3,l=u-t,e.Y.I=l,w(d)}})}(n),5);case 5:if(Tc(n),"webkit"===e.shakaMediaKeysPolyfill){i.A(6);break}return S(i,wc(n),7);case 7:Tc(n);case 6:return S(i,function(e){var t,n,i,r,a,o,s;return D(function(u){return e.B||(e.B=e.g.adaptationSetCriteriaFactory(),e.B.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Kc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Uc:e.g.preferredAudioLabel,Rd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Td:"",We:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.Ta&&(t=e.g.abrFactory,e.D=t,e.j=t(),e.j.configure(e.g.abr)),e.$?(n=e.h.presentationTimeline.T(),i=fr(e.h.variants),r=e.B.create(i),e.j.configure(e.g.abr),e.j.setVariants(Array.from(r.values())
1),(a=e.j.chooseVariant())?(o=[],e.J=a,a.video&&o.push(Ac(e,a.video,n)),a.audio&&o.push(Ac(e,a.audio,n)),(s=gr(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&br(a.audio,s,e.g)&&(o.push(Ac(e,s,n)),e.R=s),S(u,Promise.all(o),0)):u.A(0)):u.A(0)})}(n),8);case 8:if(Tc(n),!n.$||!n.i){i.A(9);break}return S(i,function(e){return D(function(t){return 1==t.g?e.J?S(t,e.m,3):t.A(0):S(t,Promise.all(e.P.map(function(e){return e.promise})),0)})}(n.i),10);case 10:Tc(n);case 9:n.u.resolve(),x(i,0);break;case 3:(t=k(i))instanceof Ce&&(7001==t.code||7003==t.code)||n.u.reject(t),w(i)}})},r.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):ee.prototype.dispatchEvent.call(this,e)},r.onError=function(e){2===e.severity&&(this.u.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new z("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},r.configure=function(e,t){e=Wl(e,t),oc(this.g,e)},r.getConfiguration=function(){return cn(this.g)},r.tm=function(){return this.u},r.destroy=function(){var e,t,n=this;return D(function(i){switch(i.g){case 1:if(n.s=!0,!n.l||n.oa){i.A(2);break}return S(i,n.l.stop(),2);case 2:if(!n.j||n.Z){i.A(4);break}return S(i,n.j.stop(),4);case 4:if(n.H&&!n.ra&&n.H.release(),!n.i||n.ba){i.A(6);break}return S(i,n.i.destroy(),6);case 6:if(0<n.L.size&&!n.sa)for(e=c(n.L.values()),t=e.next();!t.done;t=e.next())ul(t.value);w(i)}})},H("shaka.media.PreloadManager",vc),vc.prototype.destroy=vc.prototype.destroy,vc.prototype.waitForFinish=vc.prototype.tm,vc.prototype.getPrefetchedTextTrack=vc.prototype.Tk,vc.prototype.getPrefetchedVariantTrack=vc.prototype.Uk,v(Ec,ee),Ec.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,ee.prototype.release.call(this)},Ec.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=c(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?kc:e>i.endTime?Cc:Ic;this.g.set(i,a);for(var o=c(this.m),s=o.next();!s.done;s=o.next())(s=s.value).sd==r&&s.rd==a&&s.dd(i,t)}}};var kc=1,Ic=2,Cc=3;function Mc(e,t,n){var i,r,a,o,s,u,l;return D(function(c){switch(c.g){case 1:var d=new ae(e).ub.split("/").pop().split(".");return i=1==d.length?"":d.pop().toLowerCase(),(r=Lc.get(i))?c.return(r):(a=0,o=Jr([e],n),A(c,2),o.method="HEAD",S(c,t.request(a,o).promise,4));case 4:s=c.h,r=s.headers["content-type"],x(c,3);break;case 2:if(!(u=k(c))||1002!=u.code&&1001!=u.code){c.A(3);break}return o.method="GET",S(c,t.request(a,o).promise,6);case 6:l=c.h,r=l.headers["content-type"];case 3:return c.return(r?r.toLowerCase().split(";").shift():"")}})}for(var Lc=(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","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"),Rc={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canad
1a)","en-IE":"English (Ireland)","en-IN":"English (India)","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ñol","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA":"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},Pc=c(Object.keys(Rc)),Dc=Pc.next();!Dc.done;Dc=Pc.next()){var Nc=Dc.value;Rc[Nc.toLowerCase()]=Rc[Nc]}function _c(e,t){if(e.lineBreak)return"\n";if(e.nestedCues.length)return e.nestedCues.map(function(t){return _c(t,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=di,r=e.fontStyle==pi,a=e.textDecoration.includes(gi);return i&&n.push(["b"]),r&&n.push(["i"]),a&&n.push(["u"]),""==(r=e.color)&&t&&(r=t.color),i="",(r=Oc(r))&&(i+="."+r),""==(r=e.backgroundColor)&&t&&(r=t.backgroundColor),(t=Oc(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(e,t){var n=c(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"},e.payload)}function Oc(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff"
1: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";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 Uc(e,t){for(var n=[],i=(e=c(jc(e))).next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,d(Uc(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=_c(i,t),n.push(r)}return n}function jc(e){for(var t=[],n=(e=c(e)).next(),i={};!n.done;i={Jg:void 0},n=e.next())i.Jg=n.value,t.some(function(e){return function(t){return qn(e.Jg,t)}}(i))||t.push(i.Jg);return t}function Bc(e){function t(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=n.align&&(n.align="middle"),"vertical-lr"==e.writingMode?n.vertical="lr":"vertical-rl"==e.writingMode&&(n.vertical="rl"),1==e.lineInterpretation&&(n.snapToLines=!1),null!=e.line&&(n.line=e.line),null!=e.position&&(n.position=e.position),n}function Fc(e,t){var n=Uc(t),i=[];t=e.cues?Array.from(e.cues):[];for(var r=(n=c(n)).next(),a={};!r.done;a={Bd:void 0},r=n.next())a.Bd=r.value,!t.some(function(e){return function(t){return t.startTime==e.Bd.startTime&&t.endTime==e.Bd.endTime&&t.text==e.Bd.payload}}
1(a))&&a.Bd.payload&&(r=Bc(a.Bd))&&i.push(r);for(n=(t=c(t=i.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)}))).next();!n.done;n=t.next())e.addCue(n.value)}function Vc(e,t){var n=!1;"disabled"===e.mode&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function Gc(e){var t=this;this.i=e,this.l=new xt,this.j=null,this.h=new Map,this.g=-1,this.u=!1,this.s=null,this.C=function(){t.l.Da(t.i,"textchanged",t.m),t.l.Da(t.j.textTracks,"change",t.B);for(var e=c(t.h.values()),n=e.next();!n.done;n=e.next())n.value.remove();t.h.clear(),t.g=-1,t.j=null},this.m=function(){for(var e=new Map,n=t.i.rc(),i=(n=c(n)).next();!i.done;i=n.next()){if(i=i.value,t.h.has(i.id)){var r=t.h.get(i.id);i.active||"disabled"===r.track.mode||(r.track.mode="disabled"),t.h.delete(i.id)}else{(r=t.j.ownerDocument.createElement("track")).kind=Hc(i);var a=r,o=void 0;if(i.label)o=i.label;else if(i.language)if(i.language in Rc)o=Rc[i.language];else{var s=ft(i.language);s in Rc&&(o=Rc[s]+" ("+i.language+")")}o||(o=i.originalTextId,i.language&&i.language!==i.originalTextId&&(o+=" ("+i.language+")")),a.label=o,i.language in Rc&&(r.srclang=i.language),"CHROMIUM"===Re().Ia()&&(r.src="data:,WEBVTT"),r.track.mode="disabled",t.j.appendChild(r)}e.set(i.id,r),i.active&&(t.g=i.id)}for(i=(n=c(t.h.values())).next();!i.done;i=n.next())i.value.remove();-1<t.g&&(e.has(t.g)?"disabled"===(n=e.get(t.g).track).mode&&(n.mode=t.u?"showing":"hidden"):t.g=-1),t.h=e},this.B=function(){if(!t.s){var e=t.j;t.s=new Ki(function(){if(t.s=null,t.j===e){var n=-1,i=!1;if(t.h.has(t.g)){var r=t.h.get(t.g);"showing"===r.track.mode?(n=t.g,i=!0):"hidden"===r.track.mode&&(n=t.g)}if(!i)for(r=(i=c(t.h)).next();!r.done;r=i.next()){var a=c(r.value);if(r=a.next().value,"showing"===(a=a.next().value).track.mode){n=r;break}0>n&&"hidden"===a.track.mode&&(n=r)}for(r=(i=c(t.h)).next();!r.done;r=i.next())r=(a=c(r.value)).next().value,a=a.next().value,r!==n&&"disabled"!==a.track.mode&&(a.track.mode="disabled");t.g!==n&&(t.g=n,-1<n&&t.i.$f({id:n})),t.i.Ae(-1<n&&"showing"===t.h.get(n).track.mode)}}).X(0)}},this.l.o(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}function Hc(e){var t=Re();return e.forced&&"WEBKIT"===t.Ia()?"forced":"caption"===e.kind||e.roles&&e.roles.some(function(e){return e.includes("transcribes-spoken-dialog")})&&e.roles.some(function(e){return e.includes("describes-music-and-sound")})?"captions":"subtitles"}function zc(e,t){for(Mt("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,t=(e=c(Array.from(this.h.textTracks))).next();!t.done;t=e.next())"metadata"!==(t=t.value).kind&&"chapters"!==t.kind&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}function Kc(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function Wc(){}function qc(t,n){var i=this;this.m=!1,this.h=[],this.j=t,this.s=n,this.C=this.u=null,this.g=us("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.B=new Ki(function(){i.j.paused||Qc(i)}),Xc(this),this.l=new Map,this.i=new xt,this.i.o(document,"fullscreenchange",function(){Qc(i,!0)}),this.i.o(this.j,"seeking",function(){Qc(i,!0)}),this.i.o(this.j,"ratechange",function(){Xc(i)}),this.i.o(this.j,"resize",function(){var e=i.j,t=e.videoWidth;e=e.videoHeight,i.u=t&&e?t/e:null}),this.D=null,"ResizeObserver"in e&&(this.D=new ResizeObserver(function(){Qc(i,!0)}),this.D.observe(this.g)),this.F=new Map}function Xc(e){e.B&&(e.h.length?e.B.ya((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.B.stop())}function Yc(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function Jc(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=c(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var l=e.l.get(u),d=u.startTime<=i&&u.endTime>i,h=l?l.Zj:null;l&&(o.push(l.Lg),l.kd&&o.push(l.kd),d||(a=!0,e.l.delete(u),l=null)),d&&(s.push(u),l?Yc(e,h)||(a=!0):($c(e,u,r),h=(l=e.l.get(u)).Zj,a=!0)),0<u.nestedCues.length&&h&&Jc(e,u.nestedCues,h,i,r),r.pop()}if(a){for(r=(i=c(o)).next();!r.done;r=i.next())(r=r.value).parentElement&&r.parentElement.removeChild(r);for(s.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),i=(s=c(s)).next();!i.done;i=s.next())(i=e.l.get(i.value)).kd?(i.kd.contains(n)&&i.kd.removeChild(n),n.appendChild(i.kd),i.kd.appendChild(i.Lg)):n.appendChild(i.Lg)}}function Qc(e,t){if(e.g){var n=e.j.currentTime;
1if(!e.m||void 0!==t&&t){for(var i=(t=c(e.F.values())).next();!i.done;i=t.next())hs(i.value);hs(e.g),e.l.clear(),e.F.clear()}e.m&&Jc(e,e.h,e.g,n,[])}}function $c(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var a=us(r);if("br"!=r&&function(e,t,n,i,r){var a=t.style,o=0==n.nestedCues.length,s=1<i.length;a.whiteSpace="pre-wrap";var u=n.payload.replace(/\s+$/g,function(e){return" ".repeat(e.length)});if(a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=Zc(n.linePadding,n,e.s),a.paddingRight=Zc(n.linePadding,n,e.s),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",n.backgroundColor&&(a.backgroundColor=n.backgroundColor),a.width="100%",a.height="100%";else{if(n.nestedCues.length)var l=t;else l=us("span"),t.appendChild(l);n.border&&(l.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,function(e){return e.backgroundColor}))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.setAttribute("translate","no"),l.textContent=u)}s&&!i[i.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(a.width="100%",a.alignItems="start"):"right"!=n.textAlign&&"end"!=n.textAlign||(a.width="100%",a.alignItems="end"),a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end");o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=Zc(n.fontSize,n,e.s,e.C?e.C.fontScaleFactor:1),i=n.line,null!=i&&(o=n.lineInterpretation,o==ai&&(o=1,s=16,e.u&&1>e.u&&(s=32),i=0>i?100+i/s*100:i/s*100),1==o&&(a.position="absolute",n.writingMode==ri?(a.width="100%",n.lineAlign==oi?a.top=i+"%":"end"==n.lineAlign&&(a.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==oi?a.left=i+"%":"end"==n.lineAlign&&(a.right=100-i+"%")):(a.height="100%",n.lineAlign==oi?a.right=i+"%":"end"==n.lineAlign&&(a.left=100-i+"%")))),a.lineHeight=n.lineHeight,e=function(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==$n?n:"left"===e||"start"===e&&t===ii||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===ii?"line-right":"center"}(n),"line-left"==e?(a.cssFloat="left",null!==n.position&&(a.position="absolute",n.writingMode==ri?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%")):"line-right"==e?(a.cssFloat="right",null!==n.position&&(a.position="absolute",n.writingMode==ri?(a.right=100-n.position+"%",a.width="auto"):a.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(a.position="absolute",n.writingMode==ri?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==ri?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){var o=t.region,s=e.u===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==Jt?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==Jt?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=us("span");var u=o.heightUnits==Jt?"%":"px",l=o.widthUnits==Jt?"%":"px",c=o.viewportAnchorUnits==Jt?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=o.height,h=o.width;2===o.heightUnits&&(d=5.33*o.height,u="%"),2===o.widthUnits&&(h=o.width*s,l="%"),r.style.height=d+u,r.style.width=h+l,2===o.viewportAnchorUnits?(s=o.viewportAnchorY/75*100,u=o.viewportAnchorX/(e.u===4/3?160:210)*100,s-=o.regionAnchorY*d/100,u-=o.regionAnchorX*h/100,r.style.top=s+"%",r.style.left=u+"%"):(r.style.top=o.viewportAnchorY-o.regionAnchorY*d/100+c,r.style.left=o.viewportAnchorX-o.regionAnchorX*h/100+c),0!==o.heightUnits&&0!==o.widthUnits&&0!==o.viewportAnchorUnits&&(o=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=o+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.F.set(n,r),n=r}}r=a,i&&((r=us("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.l.set(t,{Lg:a,Zj:r,kd:n})}function Zc(e,t,n,i){i=void 0===i?1:i;
1var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function ed(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.C=!1,this.s=this.m=void 0,this.B=0,this.G=!1,this.D=new xt,this.j=null}function td(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:t.g.version,sf:t.i,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function nd(e,t,n){n=void 0===n?{}:n;var r=void 0===r?e.g.useHeaders:r;if(e.g.enabled)if(e=function(e,t){t=void 0===t?{}:t,i(t,td(e)),t.pr=e.h.Xa();var n=t.ot===ud||t.ot===ld;return e.C&&n&&(t.bs=!0,t.su=!0,e.C=!1),null==t.su&&(t.su=e.F),t.v===pd&&(e.h.T()&&(t.ltc=e.h.pf()),n=!e.G&&e.s&&e.m?e.s-(e.B||e.m):void 0,null!=n&&(t.msd=n,e.G=!0)),function(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(e,i){return n.includes(i)&&(e[i]=t[i]),e},{}):t}(e,t)}(e,n),r)r=function(e){for(var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={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},o=(t=c(t)).next();!o.done;o=t.next())o=o.value,r[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=rd(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(e),Object.keys(r).length&&i(t.headers,r);else{var a=rd(e);a&&(t.uris=t.uris.map(function(e){return ad(e,a)}))}}function id(e,t){if(!(t=e.h.Qb()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?1e3*(e.end-n):0}function rd(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}function i(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e}for(var r=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},o=Object.keys(e||{}).sort(),s=(o=c(o)).next();!s.done;s=o.next()){var u=e[s=s.value];if(i(u)&&("v"!==s||1!==u)&&("pr"!=s||1!==u)){var l=a[s];l&&(u=l(u));var d;d="string"===(l=typeof u)&&"ot"!==s&&"sf"!==s&&"st"!==s?s+"="+JSON.stringify(u):"boolean"===l?s:"symbol"===l?s+"="+u.description:s+"="+u,r.push(d)}}return r.join(",")}function ad(e,t){return!t||e.includes("offline:")?e:((e=new ae(e)).g.set("CMCD",t),e.toString())}(r=Gc.prototype).configure=function(){},r.remove=function(e,t){return!!this.i&&(this.h.has(this.g)&&Vc(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e}),!0)},r.append=function(e){this.h.has(this.g)&&Fc(this.h.get(this.g).track,e)},r.destroy=function(){return this.i&&(this.j&&this.C(),this.i=null),this.l&&(this.l.release(),this.l=null),Promise.resolve()},r.isTextVisible=function(){return this.u},r.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;"disabled"!==t.mode&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&3===this.i.m)if(t=Array.from(this.i.h.textTracks).filter(function(e){return["captions","subtitles","forced"].includes(e.kind)}),e){e=null;for(var n=(t=c(t)).next();!n.done;n=t.next()){if("showing"===(n=n.value).mode){e=null;break}e||"hidden"!==n.mode||(e=n)}e&&(e.mode="showing")}else for(t=(e=c(t)).next();!t.done;t=e.next())"showing"===(t=t.value).mode&&(t.mode="hidden")},r.setTextLanguage=function(){},r.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.m&&(this.j=this.i.h,this.l.qa(this.i,"unloading",this.C),this.l.o(this.i,"textchanged",this.m),this.l.o(this.j.textTracks,"change",this.B),this.m())},H("shaka.text.NativeTextDisplayer",Gc),Gc.prototype.enableTextDisplayer=Gc.prototype.enableTextDisplayer,Gc.prototype.setTextLanguage=Gc.prototype.setTextLanguage,Gc.prototype.setTextVisibility=Gc.prototype.setTextVisibility,Gc.prototype.isTextVisible=Gc.prototype.isTextVisible,Gc.prototype.destroy=Gc.prototype.destroy,Gc.prototype.append=Gc.prototype.append,Gc.prototype.remove=Gc.prototype.remove,Gc.prototype.configure=Gc.prototype.configure,(r=zc.prototype).configure=function(){},r.remove=function(e,t){return!!this.g&&(Vc(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},r.append=function(e){this.g&&Fc(this.g,e)},r.destroy=function(){return this.g&&(Vc(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},r.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},r.setTextVisibility=function(e){e&&!this.g&&Kc(this),this.g&&(this.g.mode=e?"showing":"hidden")},r.setTextLanguage=function(){},r.enableTextDisplayer=function(){Kc(this)},H("shaka.text.SimpleTextDisplayer",zc),zc.prototype.enableTextDisplayer=zc.prototype.enableTextDisplayer,zc.prototype.setTextLanguage=zc.prototype.setTextLanguage,zc.prototype.setTextVisibility=zc.prototype.setTextVisibility,zc.prototype.isTextVisible=zc.prototype.isTextVisible,zc.prototype.destroy=zc.prototype.destroy,zc.prototype.append=zc.prototype.append,zc.prototype.remove=zc.prototype.remove,zc.prototype.configure=zc.prototype.configure,(r=Wc.prototype).configure=function(){},r.remove=function(){},r.append=function(){},r.destroy=function(){},r.isTextVisible=function(){return!1},r.setTextVisibility=function(){},r.setTextLanguage=function(){},r.enableTextDisplayer=function(){},H("shaka.text.StubTextDisplayer",Wc),Wc.prototype.enableTextDisplayer=Wc.prototype.enableTextDisplayer,Wc.prototype.setTextLanguage=Wc.prototype.setTextLanguage,Wc.prototype.setTextVisibility=Wc.prototype.setTextVisibility,Wc.prototype.isTextVisible=Wc.prototype.isTextVisible,Wc.prototype.destroy=Wc.prototype.destroy,Wc.prototype.append=Wc.prototype.append,Wc.prototype.remove=Wc.prototype.remove,Wc.prototype.configure=Wc.prototype.configure,(r=qc.prototype).configure=function(e){this.C=e,Xc(this),Qc(this,!0)},r.append=function(e){for(var t=[].concat(d(this.h)),n=(e=c(jc(e))).next(),i={};!n.done;i={Kg:void 0},n=e.next())i.Kg=n.value,t.some(function(e){return function(t){return qn(t,e.Kg)}}(i))||this.h.push(i.Kg);this.h.length&&Xc(this),Qc(this)},r.destroy=function(){return this.g?(this.g.parentElement&&this.s.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null),Promise.resolve()):Promise.resolve()},r.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(n){return n.startTime<e||n.endTime>=t}),Qc(this,n>this.h.length),this.h.length||Xc(this),!0},r.isTextVisible=function(){return this.m},r.setTextVisibility=function(e){(this.m=e)?(this.g.parentElement||this.s.appendChild(this.g),Qc(this,!0)):this.g.parentElement&&this.s.removeChild(this.g)},r.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},r.enableTextDisplayer=function(){},H("shaka.text.UITextDisplayer",qc),qc.prototype.enableTextDisplayer=qc.prototype.enableTextDisplayer,qc.prototype.setTextLanguage=qc.prototype.setTextLanguage,qc.prototype.setTextVisibility=qc.prototype.setTextVisibility,qc.prototype.isTextVisible=qc.prototype.isTextVisible,qc.prototype.remove=qc.prototype.remove,qc.prototype.destroy=qc.prototype.destroy,qc.prototype.append=qc.prototype.append,qc.prototype.configure=qc.prototype.configure,H("shaka.text.WebVttGenerator",function(){}),ed.prototype.setMediaElement=function(e){this.j=e,function(e){e.D.qa(e.j,"play",function(){e.m||(e.m=Date.now())}),e.D.qa(e.j,"playing",function(){e.s||(e.s=Date.now())})}(this)},ed.prototype.configure=function(e){this.g=e};var od="m",sd="a",ud="v",ld="av",cd="i",dd="c",hd="tt",pd=2,fd="d",gd="ld",md="h",vd="lh";function yd(e){this.h=e,this.g=null}
1function bd(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}H("shaka.util.CmcdManager.StreamingFormat",{DASH:fd,Um:gd,HLS:md,Vm:vd,mn:"s",OTHER:"o"}),(r=yd.prototype).configure=function(e){this.h=e},r.Qi=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Sd)?1e3*this.g.get(Sd):null},r.Pi=function(){return this.h.enabled&&this.g&&this.g.has(Td)?1e3*this.g.get(Td):null},r.Wk=function(){return this.h.enabled&&this.g&&this.g.has(wd)?this.g.get(wd):null},r.Xk=function(){return this.h.enabled&&this.g&&this.g.has(Ad)?this.g.get(Ad):null},r.getBandwidthEstimate=function(e){var t=this.Pi();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},H("shaka.util.CmsdManager",yd),yd.prototype.getBandwidthEstimate=yd.prototype.getBandwidthEstimate,yd.prototype.getRoundTripTime=yd.prototype.Xk,yd.prototype.getResponseDelay=yd.prototype.Wk,yd.prototype.getEstimatedThroughput=yd.prototype.Pi,yd.prototype.getMaxBitrate=yd.prototype.Qi;var Td="etp",Sd="mb",wd="rd",Ad="rtt";function Ed(){this.g=null,this.h=[]}function xd(e,t){return D(function(n){if(1==n.g)return e.g?S(n,new Promise(function(t){return e.h.push(t)}),2):n.A(2);e.g=t,w(n)})}function kd(t,n,i){n=void 0===n?null:n,ee.call(this);var r=this;this.m=Lh,this.h=null,this.Ne=n,this.na=!1,this.Se=new xt,this.He=new xt,this.j=new xt,this.dc=new xt,this.Jd=new xt,this.F=this.I=this.D=this.H=null,this.Te=0,this.Z=new Ed,this.N=this.wc=this.U=this.i=this.yc=this.G=this.l=this.Ee=this.P=this.ti=this.ba=this.K=this.Ta=this.sa=this.Fe=this.O=this.Ha=this.J=this.cb=null,this.Y=!1,this.Na=this.u=null,this.Me=1e9,this.Re=[],this.Ya=[],this.ug=-1,this.g=th(this),this.wg={streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}},this.R=null,this.Ve=-1,this.Lb=null,this.oa={width:1/0,height:1/0},this.Le=new eo(this.g,this.oa,null),this.Pe=[],this.B=null,this.L=this.g.adaptationSetCriteriaFactory(),this.L.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Kc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Uc:this.g.preferredAudioLabel,Rd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Td:"",We:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Kd=this.g.preferredTextLanguage,this.Ke=this.g.preferredTextRole,this.Je=this.g.preferForcedSubs,this.Ie=[],i&&i(this),this.K=function(e){return new ed({getBandwidthEstimate:function(){return e.u?e.u.getBandwidthEstimate():NaN},Qb:function(){return e.Qb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},Xa:function(){return e.Xa()},Ib:function(){return e.Ib()},qb:function(){return e.qb()},T:function(){return e.T()},pf:function(){return e.pf()}},e.g.cmcd)}(this),this.ba=new yd(this.g.cmsd),this.H=Gd(this),this.Md=this.$=this.ra=this.C=null,this.yg=!1,this.vg=[],this.xg=new Ki(function(){return D(function(e){return 1==e.g?r.$?S(e,r.$b(r.Md,!0),3):e.A(0):4!=e.g?S(e,r.load(r.$),4):(r.yg?r.Md.pause():r.Md.play(),r.$=null,r.yg=!1,void w(e))})}),_h&&(this.C=_h(),this.C.configure(this.g.ads),this.Jd.o(this.C,"ad-content-pause-requested",function(e){var t;return D(function(n){if(1==n.g)return r.xg.stop(),r.$?n.A(0):(r.Md=r.h,r.yg=r.isEnded(),t=e.saveLivePosition||!1,S(n,r.Ki(!0,t),3));r.$=n.h,w(n)})}),this.Jd.o(this.C,"ad-content-resume-requested",function(e){if(e=e.offset||0,r.$){var t=r.$;t.m&&e&&("number"==typeof t.m?t.m+=e:t.m.setTime(t.m.getTime()+1e3*e))}r.xg.X(.1)}),this.Jd.o(this.C,"ad-content-attach-requested",function(){return D(function(e){return r.h||!r.Md?e.A(0):S(e,r.$b(r.Md,!0),0)})})),Oh&&(this.ra=Oh(this),this.ra.configure(this.g.queue)),this.Se.o(e,"online",function(){Th(r),r.Oh()}),this.Oe=new Ki(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=c(r.i.variants),a=i.next();!a.done;a=i.next())0<(a=a.value).disabledUntilTime&&a.disabledUntilTime<=e&&(a.disabledUntilTime=0,t=!0),0<a.disabledUntilTime&&(n=!1);n&&r.Oe.stop(),t&&uh(r,!1,void 0,!1,!1)}),this.La=null,t&&(Mt("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.$b(t,!0)),this.s=null}function Id(e){null!=e.P&&(_t(e.P),e.P.release(),e.P=null)}function Cd(e,t){return new z(e,t)}function Md(e,t){Nh.set(e,t)}function Ld(){return e.Promise||Y("A Promise implementation or polyfill is required"),!(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))&&(Re(),!!Sv()||""!=ps().canPlayType("application/x-mpegurl"))}function Rd(e,t){e.dispatchEvent(Cd("onstatechange",(new Map).set("state",t)))}function Pd(e,t){var n;return D(function(i){return 1==i.g?(n=++e.Te,S(i,xd(e.Z,t),2)):n!=e.Te?(e.Z.release(),i.return(!0)):i.return(!1)})}function Dd(e,t){var n,i;return t=void 0!==t&&t,D(function(r){if(1==r.g)return n=null,e.i&&e.G&&e.yc&&e.U&&e.g?(i=e.h.currentTime,e.T()&&!t&&(i=null),S(r,_d(e,e.U,i,e.wc,e.g,!0,!1,!1),3)):r.A(2);if(2!=r.g){n=r.h,e.Pe.push(n),e.G&&e.G.setMediaElement&&e.G.setMediaElement(null);var a=n,o=e.G,s=e.yc;a.h=e.i,a.l=o,a.G=s,a=n,o=e.Na,a.j=e.u,a.D=o,n.B=e.L,n.start(),e.i=null,e.G=null,e.yc=null,e.u=null,e.Na=null}return r.return(n)})}function Nd(e,t,n,i,r,a){var o,s,u,l;return r=void 0!==r&&r,D(function(c){return 1==c.g?i?c.A(2):S(c,Od(e,t),3):(2!=c.g&&(i=c.h),function(e,t){if(!Sv(Re()))return!0;
1if(t){if(""==(e.h||ps()).canPlayType(t))return!1;if(!Sv(Re())||!co.has(t))return!0;if(Ni(t))return"WEBKIT"===Re().Ia()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i)?c.return(null):(o=a||e.g,s=!1,u=!0,r&&(e.u&&e.Na==o.abrFactory&&(u=!1),e.h&&"AUDIO"===e.h.nodeName&&(s=!0)),l=_d(e,t,n,i||null,o,!r,s,u),l=r?l.then(function(e){return e.C=!1,e}):l.then(function(t){return e.Pe.push(t),t}),c.return(l)))})}function _d(e,t,n,i,r,a,o,s){var u,l,d,h,p,f,g,m,v,y,b,T;return a=void 0===a||a,o=void 0!==o&&o,s=void 0===s||s,D(function(A){return 1==A.g?(u=null,l=cn(r),o&&(l.manifest.disableVideo=!0),d=function(){return u.P&&u.s?null:u},h=function(){return d()?d().getConfiguration():e.g},1/0!=e.oa.width||1/0!=e.oa.height||e.g.ignoreHardwareResolution?A.A(2):S(A,Re().nc(),3)):(2!=A.g&&(p=A.h,e.oa.width=p.width,e.oa.height=p.height),f=new eo(l,e.oa,null),g={networkingEngine:e.H,filter:function(e){var t;return D(function(n){return 1==n.g?S(n,to(f,e),2):4!=n.g?n.h?(t=Cd("trackschanged"),S(n,Promise.resolve(),4)):n.A(0):(u.dispatchEvent(t),void w(n))})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=c(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(i=c(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var a=c(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new qu,l=r.closedCaptions.get(o);s={id:e.Me++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:it,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ki(s,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(e){nl(u.H,e)},onEvent:function(e){return u.dispatchEvent(e)},onError:function(e){return u.onError(e)},isLowLatencyMode:function(){return h().streaming.lowLatencyMode},updateDuration:function(){e.l&&u.P&&e.l.updateDuration()},newDrmInfo:function(e){var t=u.i,n=t?t.g:null;n&&t.B&&ro(f,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.T());u.dispatchEvent(Cd("manifestupdated",t)),yc(u,!1,function(){e.C&&e.C.onManifestUpdated(e.T())})},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},onMetadata:function(t,n,i,r){var a=t;"com.apple.hls.interstitial"==t&&(a="com.apple.quicktime.HLS",t={startTime:n,endTime:i,values:r},e.C)&&e.C.onHLSInterstitialMetadata(e,e.h,t),t=(r=c(r)).next();for(var o={};!t.done;o={Ih:void 0},t=r.next())o.Ih=t.value,"ID"!=o.Ih.name&&yc(u,!1,function(t){return function(){Vd(e,n,i,a,t.Ih)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(m=new tl(function(){return e.xa()})).addEventListener("regionadd",function(t){var n=t.region;wh(e,"timelineregionadded",n,u),yc(u,!1,function(){e.C&&(e.C.onDashTimedMetadata(n),e.C.onDASHInterstitialMetadata(e,e.h,n))})}),v=null,l.streaming.observeQualityChanges&&((v=new $u(function(){return e.Qb()})).addEventListener("qualitychange",function(t){Ah(e,t.quality,t.position)}),v.addEventListener("audiotrackchange",function(t){Ah(e,t.quality,t.position,!0)})),y=!0,b={xc:e.H,onError:function(e){return u.onError(e)},Lf:function(t){yc(u,!0,function(){if(e.D){var n=t,i=Cd("keystatuschanged");e.dispatchEvent(i);var r=Object.keys(n);1==r.length&&""==r[0]&&(r=["00"],n={"00":n[""]}),i=1==r.length&&"00"==r[0];var a=!1;if(r.length){r=e.keySystem();for(var o=oa(e.g.drm.clearKeys),s=c(e.i.variants),u=s.next();!u.done;u=s.next()){var l=[];(u=u.value).audio&&l.push(u.audio),u.video&&l.push(u.video);for(var d=(l=c(l)).next();!d.done;d=l.next()){var h=d.value;if(d=u.allowedByKeySystem,h.keyIds.size)if(h.drmInfos.length&&!o.size){for(var p=(h=c(h.drmInfos)).next();!p.done;p=h.next())if((p=p.value).keyIds.size&&p.keySystem==r){u.allowedByKeySystem=!0;for(var f=(p=c(p.keyIds)).next();!f.done;f=p.next())f=f.value,((f=n[i?"00":f])||e.D.F)&&(u.allowedByKeySystem=u.allowedByKeySystem&&!!f&&!oo.includes(f))}}else for(u.allowedByKeySystem=!0,p=(h=c(h.keyIds)).next();!p.done;p=h.next())p=p.value,((p=n[i?"00":p])||e.D.F)&&(u.allowedByKeySystem=u.allowedByKeySystem&&!!p&&!oo.includes(p));
1d!=u.allowedByKeySystem&&(a=!0)}}}a&&(hh(e),!sh(e))||(n=e.l.s)&&!n.allowedByKeySystem&&uh(e)}})},onExpirationUpdated:function(e,t){var n=Cd("expirationupdated");u.dispatchEvent(n),(n=u.l)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){u.dispatchEvent(t),"drmsessionupdate"==t.type&&y&&(y=!1,t=Date.now()/1e3-u.Ha,(e.B||u.getStats()).m=t,e.P&&_t(e.P))}},T=Gd(e,d),Yr(e.H,T),u=new vc(t,i,n,{config:l,Gl:g,Rl:m,Ql:v,ud:function(){return e.ud(b)},Fl:f,networkingEngine:T,ek:a,dk:s}),A.return(u))})}function Od(e,t){var n,i;return D(function(r){return 1==r.g?(n=e.g.manifest.retryParameters,S(r,Mc(t,e.H,n),2)):("application/x-mpegurl"==(i=r.h)&&("WEBKIT"===Re().Ia()&&(i="application/vnd.apple.mpegurl")),r.return(i))})}function Ud(e){var t=e.g.textDisplayFactory;if(e.si!==t){var n=e.s;e.s=t(),e.s.configure?e.s.configure(e.g.textDisplayer):Mt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.s.setTextLanguage||Mt("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),n?(e.s.setTextVisibility(n.isTextVisible()),n.destroy().catch(function(){})):e.s.setTextVisibility(e.na),e.I&&function(e,t){e.Z=t,e.h&&(e.h.j=t)}(e.I,e.s),e.si=t,e.l&&function(e){var t=e.h.get(it);t&&Al(e,t.stream,!0,0,!0)}(e.l)}else e.s&&e.s.configure&&e.s.configure(e.g.textDisplayer)}function jd(e){var t,n,i;return D(function(r){if(1==r.g)return Re(),Rd(e,"media-source"),e.g.mediaSource.useSourceElements&&ds(e.h),Ud(e),t=function(e,t,n,i,r){return new Hs(e,t,n,r,i)}(e.h,e.s,{Jk:function(){return e.keySystem()},onMetadata:function(t,n,i){for(var r=(t=c(t)).next();!r.done;r=t.next())if((r=r.value).data&&"number"==typeof r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=c(r.frames),u=s.next();!u.done;u=s.next())Vd(e,a,o,"org.id3",u.value);e.C&&e.C.onHlsTimedMetadata(r,a)}},Ll:function(t){e.Ta&&nl(e.Ta,{schemeIdUri:t.schemeIdUri,startTime:t.startTime,endTime:t.endTime,id:String(t.id),emsg:t})},onEvent:function(t){return e.dispatchEvent(t)},Nl:function(){e.G&&e.G.update&&e.G.update()}},e.P,e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ha=i,S(r,t.J,2);e.I=t,w(r)})}function Bd(e,t,n){function i(){return rh(e)}if(e.j.o(t,"playing",i),e.j.o(t,"pause",i),e.j.o(t,"ended",i),e.j.o(t,"ratechange",function(){var t=e.h.playbackRate;0!=t&&(e.J&&(e.J.set(t),e.m==Rh&&e.u.playbackRateChanged(t),ih(e,t)),t=Cd("ratechange"),e.dispatchEvent(t))}),t.remote&&(e.j.o(t.remote,"connect",function(){e.l&&"connected"==t.remote.state&&mh(e),hh(e)}),e.j.o(t.remote,"connecting",function(){return hh(e)}),e.j.o(t.remote,"disconnect",function(){return D(function(n){if(1==n.g)return e.l&&"disconnected"==t.remote.state?S(n,Vl(e.l),3):n.A(2);2!=n.g&&mh(e),hh(e),w(n)})})),t.audioTracks&&(e.j.o(t.audioTracks,"addtrack",function(){return hh(e)}),e.j.o(t.audioTracks,"removetrack",function(){return hh(e)}),e.j.o(t.audioTracks,"change",function(){return hh(e)})),t.videoTracks&&(e.j.o(t.videoTracks,"addtrack",function(){return hh(e)}),e.j.o(t.videoTracks,"removetrack",function(){return hh(e)}),e.j.o(t.videoTracks,"change",function(){return hh(e)})),t.textTracks){var r=function(){e.m===Ph&&e.s instanceof Gc&&mh(e),hh(e)};e.j.o(t.textTracks,"addtrack",function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){if("metadata"==t.kind){t.mode="hidden",e.j.o(t,"cuechange",function(){if(t.activeCues)for(var n=c(t.activeCues),i=n.next();!i.done;i=n.next())i=i.value,Vd(e,i.startTime,i.endTime,i.type,i.value),e.C&&e.C.onCueMetadataChange(i.value);if(t.cues){n=[];for(var r=(i=c(t.cues)).next(),a={};!r.done;a={Ec:void 0},r=i.next())a.Ec=r.value,"com.apple.quicktime.HLS"==a.Ec.type&&null!=a.Ec.startTime&&(r=n.find(function(e){return function(t){return t.startTime==e.Ec.startTime&&t.endTime==e.Ec.endTime}}(a)),r||(r={startTime:a.Ec.startTime,endTime:a.Ec.endTime,values:[]},n.push(r)),r.values.push(a.Ec.value));for(i=(n=c(n)).next();!i.done;i=n.next())(i=i.value).values.some(function(e){return"X-ASSET-URI"==e.key||"X-ASSET-LIST"==e.key})&&e.C&&(i.values.push({key:"CUE",description:"",data:0!=i.startTime||e.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.C.onHLSInterstitialMetadata(e,e.h,i))}});var n=new Ki(function(){for(var t=function(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"==e.kind})}(e),n=(t=c(t)).next();!n.done;n=t.next())n.value.mode="hidden"}).Ka().X(.5);e.Ie.push(function(){n.stop()})}}(e,t);break;case"chapters":!function(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new Ki(function(){t.mode="hidden"}).Ka().X(.5);e.Ie.push(function(){n.stop()})}}(e,t);break;default:r()}}),e.j.o(t.textTracks,"removetrack",r),e.j.o(t.textTracks,"change",r),"keep"!==e.g.streaming.crossBoundaryStrategy&&(e.j.o(t,"waiting",function(){e.l&&Gl(e.l)}),e.j.o(t,"timeupdate",function(){e.l&&Gl(e.l)}))}"none"!=t.preload&&e.j.qa(t,"loadedmetadata",function(){e.B.F=Date.now()/1e3-n})}
1function Fd(e,t,n){t=(new Map).set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(Cd(n,t))}function Vd(e,t,n,i,r){e.sa&&((t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r}).id=JSON.stringify(t),nl(e.sa,t))}function Gd(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?yc(t(),!0,e):e()}t||(t=function(){return null});var r=new qr(function(n,i,r,a,o){var s=t()?t().j:e.u;s&&s.segmentDownloaded(n,i,r,a,o)},function(t,r,a){n(Cd("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.ba){var n=e.ba;if(n.h.enabled){var i=t["cmsd-static"];if(i)try{var r=new Map,a=i.split(",");for(i=0;i<a.length;i++){var o=a[i].split("=");r.set(o[0],bd(o[1]))}}catch(e){}if(r=t["cmsd-dynamic"]){try{var s=new Map,u=r.split(";");for(r=1;r<u.length;r++){var l=u[r].split("=");s.set(l[0],bd(l[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}})},function(e,t){n(Cd("downloadcompleted",e=(new Map).set("request",e).set("response",t)))},function(e,t,i,r){n(Cd("downloadfailed",e=(new Map).set("request",e).set("error",t).set("httpResponseCode",i).set("aborted",r)))},function(t,n,r){i(function(){var i=e.K,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)nd(i,n);else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.l?gd:fd;break e;case 3:case 2:o=i.l?vd:md;break e;case 5:o="s";break e}o=void 0}i.i=o}nd(i,n,{ot:od,su:!i.u})}}catch(e){J("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case ta:try{if(i.g.enabled){var s=n.uris[0],u=a.segment;o=0,u&&(o=u.endTime-u.startTime);var l={d:1e3*o,st:i.h.T()?"l":"v"};l.ot=function(e){if(0===e.type)return cd;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?ld:ud;if("audio"==t)return sd;if("text"==t)return"application/mp4"===e.mimeType?hd:dd}}(a);var d=l.ot===ud||l.ot===sd||l.ot===ld||l.ot===hd,h=a.stream;if(h){var p=i.h.Xa();if(d&&(l.bl=function(e,t){if(!(t=e.h.Qb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?1e3*(e.end-n):NaN}(i,h.type),l.ot!==hd)){var f=id(i,h.type);l.dl=p?f/Math.abs(p):f}if(h.bandwidth&&(l.br=h.bandwidth/1e3),h.segmentIndex&&u){var g=h.segmentIndex.ac(u.endTime,!0,0>p);if(g){var m=g.next().value;if(m&&m!=u){if(s&&!tn(u.S(),m.S())){var v=m.S()[0],y=new URL(v),b=new URL(s);if(y.origin!==b.origin)var T=v;else{for(var S=y.pathname.split("/").slice(1),w=b.pathname.split("/").slice(1,-1);S[0]===w[0];)S.shift(),w.shift();for(;w.length;)w.shift(),S.unshift("..");T=S.join("/")}l.nor=T}if((m.startByte||m.endByte)&&(u.startByte!=m.startByte||u.endByte!=m.endByte)){var A=m.startByte+"-";m.endByte&&(A+=m.endByte),l.nrr=A}}}var E=i.h.Xa()||1,x=id(i,h.type)||500,k=h.bandwidth,I=k?k*(u.endTime-u.startTime)/1e3/(x/E/1e3)*i.g.rtpSafetyFactor:NaN;isNaN(I)||(l.rtp=I)}}d&&l.ot!==hd&&(l.tb=function(e,t){var n=e.h.qb();if(!n.length)return NaN;e=n[0];for(var i=(n=c(n)).next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case ud:return e.videoBandwidth||NaN;case sd:return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,l.ot)/1e3),nd(i,n,l)}}catch(e){J("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:nd(i,n,{ot:"k"});break;case 4:nd(i,n,{ot:"o"})}})},function(n,i,r,a){(n=t()?t().l:e.G)&&n.banLocation&&n.banLocation(a)},function(n,i){if(i.data){i=i.data.byteLength;var r=t()?t().getStats():e.B;r&&(gc(r,i),0===n&&(r.bj=i))}});return r.configure(e.g.networking),r}function Hd(e,t,n){e.O=new Qa,e.O.g=$a,zd(e),nh(e),e.Ha=new Ki(function(){Kd(e)}),e.g.streaming.rebufferingGoal&&e.Ha.ya(.25),e.j.o(t,"waiting",function(){return Kd(e)}),e.j.o(t,"canplaythrough",function(){return Kd(e)}),e.j.o(t,"playing",function(){return Kd(e)}),e.j.o(t,"seeked",function(){return Kd(e)}),n&&(e.j.o(t,"stalled",function(){return Kd(e)}),e.j.o(t,"progress",function(){return Kd(e)}),e.j.o(t,"timeupdate",function(){return Kd(e)}))}function zd(e){var t=e.g.streaming.rebufferingGoal;e.O.i.set(Za,Math.min(.5,t/2)).set($a,t)}function Kd(e){var t=e.isEnded()||e.F.Xi(),n=as(e.h.buffered,e.h.currentTime),i=e.O,r=i.i.get(i.g),a=i.g;t=t||n>=r&&0<n?Za:$a,i.g=t,(a=a!=t)&&t===Za&&(i.h=Date.now()),a&&nh(e)}function Wd(e){if(e.Le=new eo(e.g,e.oa,e.D),e.G){var t=cn(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.G.configure(t)}if(e.D&&e.D.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=Mh&&io(e.Le,e.i)&&hh(e)}catch(t){Sh(e,t)}e.u&&sh(e),!(t=e.l.s)||t.allowedByApplication&&t.allowedByKeySystem||uh(e)}e.H&&e.H.configure(e.g.networking),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ha=e.g.manifest.segmentRelativeVttTiming),e.s&&Ud(e),e.u&&(e.u.configure(e.g.abr),e.g.abr.enabled?e.u.enable():e.u.disable(),yh(e)),e.O&&zd(e),e.Ha&&(e.g.streaming.rebufferingGoal?e.Ha.ya(.25):e.Ha.stop()),e.i&&xh(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.K&&e.K.configure(e.g.cmcd),e.ba&&e.ba.configure(e.g.cmsd),e.ra&&e.ra.configure(e.g.queue)}function qd(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{Wc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function Xd(e,t){var n,i;return D(function(r){return 1==r.g?e.m!=Rh&&e.m!=Ph?r.return(null):(n=e.Re,e.i&&(n=e.i.imageStreams),(i=n[0])?(null!=t&&(i=n.find(function(e){return e.id==t})),i?i.segmentIndex?r.A(2):S(r,i.createSegmentIndex(),2):r.return(null)):r.return(null)):r.return(i)})}function Yd(e,t,n,i){var r=t.width||0,a=t.height||0,o=r/i.Wc,s=a/i.rows,u=i.Wc*i.rows,l=e.j-e.startTime;l=e.C||l/u;var c=e.startTime,d=0,h=0;return 1<u&&(h=Math.floor((n-e.startTime)/l),c=e.startTime+h*l,d=h%i.Wc*o,h=Math.floor(h/i.Wc)*s),i=!1,(n=e.thumbnailSprite)&&(i=!0,s=n.height,d=n.positionX,h=n.positionY,o=n.width),{segment:e,imageHeight:a,imageWidth:r,height:s,positionX:d,positionY:h,startTime:c,duration:l,uris:e.S(),startByte:e.Hc(),endByte:e.Fc(),width:o,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}function Jd(e,t){e.j.o(t,"cuechange",function(){e.s.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));for(var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]),a=(r=c(r)).next();!a.done;a=r.next()){if(1/0===(a=a.value).endTime||a.endTime<a.startTime)a=null;else{var o=new Kn(a.startTime,a.endTime,a.text);o.line="number"==typeof a.line?a.line:null,a.lineAlign&&(o.lineAlign=a.lineAlign),o.lineInterpretation=a.snapToLines?ai:1,o.position="number"==typeof a.position?a.position:null,a.positionAlign&&(o.positionAlign=a.positionAlign),o.size=a.size,o.textAlign=a.align,"lr"===a.vertical?o.writingMode="vertical-lr":"rl"===a.vertical&&(o.writingMode="vertical-rl"),a.region&&(o.region.id=a.region.id,o.region.height=a.region.lines,o.region.heightUnits=2,o.region.regionAnchorX=a.region.regionAnchorX,o.region.regionAnchorY=a.region.regionAnchorY,o.region.scroll=a.region.scroll,o.region.viewportAnchorX=a.region.viewportAnchorX,o.region.viewportAnchorY=a.region.viewportAnchorY,o.region.viewportAnchorUnits=Jt,o.region.width=a.region.width,o.region.widthUnits=Jt),Xn(o),a=o}a&&((o=e.g.mediaSource.modifyCueCallback)&&o(a,null,n),i.push(a))}e.s.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function Qd(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function $d(e,t){var n;return D(function(i){switch(i.g){case 1:return A(i,2),S(i,Mc(t,e.H,e.g.streaming.retryParameters),4);case 4:n=i.h,x(i,3);break;case 2:k(i);case 3:if(n)return i.return(n);throw new Ce(1,2,2011,t)}})}function Zd(e,t,n,i){var r,a,o;return D(function(s){if(1==s.g){r=ta,(a=Jr([t],i)).method="GET";var u=e.K;try{u.g.enabled&&nd(u,a,{ot:dd,su:!0})}catch(e){J("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return S(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function eh(e,t,n,i){var r=Bi(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Ee(t),function(e,t){function n(e){for(var n=e,i=c(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(i=Math.floor(n/60%60))?"0":"")+i+":"+(10>(r=Math.floor(n%60))?"0":"")+r+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var i=Uc(e);e="WEBVTT\n\n";for(var r=(i=c(i)).next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(e){var t=[];
1switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case Zn:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n",e+=r.payload+"\n\n";return e}(t=n.parseMedia(t,e,null,[]),i);throw new Ce(2,2,2014,n)}function th(e){var t=rc();return t.streaming.failureCallback=function(t){if(e.T()){var n=null;1001==t.code||1002==t.code?(n=1,e.g.streaming.lowLatencyMode&&(n=.1)):1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.Oh(n))}},t.textDisplayFactory=function(){var t=Re();return e.Ne&&(document.fullscreenEnabled||"WEBKIT"!==t.Ia())?new qc(e.h,e.Ne):"track"in document.createElement("track")?new Gc(e):new Wc},t}function nh(e){var t=e.xf();if(e.B&&e.O&&e.F){if(0==e.g.streaming.rebufferingGoal){var n=e.J;n.j=!1,Yu(n)}else(n=e.J).j=t,Yu(n);if(e.K&&(n=e.K,t||n.u||(n.u=!0),n.u&&t&&(n.C=!0),n.F=t),rh(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ve<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.R&&(e.R=Math.min(e.R+ ++e.Ve*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(Cd("buffering",t))}function ih(e,t){e.dc.Sa(),e.dc.o(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.xa(),r=e.T()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.td():Math.floor(n)<=Math.floor(i.start+r)&&e.td()})}function rh(e){if(e.B&&e.O){var t=e.B.g,n="playing";e.O.g==$a?n="buffering":e.isEnded()?n="ended":e.h.paused&&(n="paused");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(Cd("statechanged",n)))}}function ah(e){var t=e.h.playbackRate,n=e.T();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Oi();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Sc(i,!1):1==r&&t!==e.J.$c()&&e.td()}if(n&&(n=e.xa(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var a=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var o=e.g.streaming.liveSync.targetLatency,s=o+i,u=Math.max(0,o-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(o=e.i.serviceDescription.targetLatency,null!=e.i.serviceDescription.targetLatency?s=e.i.serviceDescription.targetLatency+i:null!=e.i.serviceDescription.maxLatency&&(s=e.i.serviceDescription.maxLatency),null!=e.i.serviceDescription.targetLatency?u=Math.max(0,e.i.serviceDescription.targetLatency-i):null!=e.i.serviceDescription.minLatency&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.R||"number"!=typeof o||(e.R=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Lb&&null!==e.R&&"number"==typeof o&&e.Ve<d&&Date.now()-e.Lb>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.R=Math.max(e.R-(o-a)/2,a+i),e.Lb=Date.now()),r&&null!==e.R&&(s=e.R+i,u=e.R-i),o=n.end-e.h.currentTime,i=0,e.m==Ph&&(0<(r=e.h.buffered).length&&(i=r.end(r.length-1),i=Math.max(l,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.O.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.Sc(c,!1):null!=s&&l&&o-i>s?(t!=l&&e.Sc(l,!1),e.Lb=null):null!=u&&c&&o-i<u?(t!=c&&e.Sc(c,!1),e.Lb=null):t!==e.J.$c()&&(e.td(),e.Lb=Date.now())}}function oh(e){if(e.h){var t=function(t,n){var i=void 0===i?Number.EPSILON:i;if(t===n)i=!0;else{var r=Math.abs(t-n);i=r<=i||i!==Number.EPSILON&&Math.abs(r-i)<=Number.EPSILON}return!!((i||n>t)&&e.ug<t)&&(e.ug=t,!0)},n=e.xa();if(n=0<(n=n.end-n.start)?e.h.currentTime/n:0,!isNaN(n)){if(t(0,n*=100))var i=Cd("started");else t(25,n)?i=Cd("firstquartile"):t(50,n)?i=Cd("midpoint"):t(75,n)?i=Cd("thirdquartile"):((t(100,n)||100<n)&&(i=Cd("complete")),e.g&&1/0!=e.g.playRangeEnd&&e.isEnded()&&e.h.pause());i&&e.dispatchEvent(i)}}}function sh(e){try{ao(e.Le,e.i)}catch(t){return Sh(e,t),!1}var t=fr(e.i.variants);
1return t=e.L.create(t),e.u.setVariants(Array.from(t.values())),!0}function uh(e,t,n,i,r){var a;t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r,(a=sh(e)?e.u.chooseVariant():null)&&lh(e,a,r,t,n,i)}function lh(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.l.s;if(t==o)i&&Sl(e.l,t,i,r,!0);else{var s=e.B.h;if(s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Sl(e.l,t,i,r,a,n),i=null,o&&(i=sr(o)),(o=sr(t)).active=!0,e.P&&(r=e.P,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),a=0,s=-1,t.mimeType){case"video/webm":a=1;break;case"video/mp4":a=2}switch(e.jh()){case"DASH":s=1;break;case"HLS":s=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(a),r.j||r.g.setStreamingFormat(s))}n?kh(e,n=Cd("adaptation",n=(new Map).set("oldTrack",i).set("newTrack",o))):ph(e,i,o),fh(e,i,o)}}function ch(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=dh(e);ph(e,n=hr(n,i),t=hr(t,i)),fh(e,n,t)}}function dh(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(e){return e.selected}):null}function hh(e){kh(e,Cd("trackschanged")),gh(e)}function ph(e,t,n){kh(e,t=Cd("variantchanged",t=(new Map).set("oldTrack",t).set("newTrack",n)))}function fh(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&gh(e)}function gh(e){kh(e,Cd("audiotrackschanged"))}function mh(e){kh(e,Cd("textchanged"))}function vh(e){kh(e,Cd("texttrackvisibility"))}function yh(e){e.g.abr.enabled||Th(e),kh(e,Cd("abrstatuschanged",(new Map).set("newStatus",e.g.abr.enabled)))}function bh(e){var t=e.rc().find(function(e){return e.active});t&&e.s&&e.s.setTextLanguage&&e.s.setTextLanguage(t.language)}function Th(e,t){if(t=void 0===t||t,e.m==Rh){e.Oe.stop();for(var n=c(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&sh(e)}}function Sh(e,t){var n,i,r,a;return D(function(o){switch(o.g){case 1:if(e.m==Mh)return o.return();if(1===t.severity&&e.B.K++,n=!0,!(e.Y&&e.i&&e.l)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3024!=t.code&&3018!=t.code){o.A(2);break}return"WEBKIT"===Re().Ia()&&3016==t.code?o.return():(A(o,3),S(o,Vl(e.l),5));case 5:i=o.h,n=!i,i&&(r=Cd("mediasourcerecovered"),e.dispatchEvent(r)),x(o,2);break;case 3:k(o),n=!0;case 2:if(!n)return o.return();2===t.severity&&Th(e,!1),a=Cd("error",(new Map).set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),w(o)}})}function wh(e,t,n,i){i=void 0===i?e:i,e=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(Cd(t,e))}function Ah(e,t,n,i){i=void 0!==i&&i,t=(new Map).set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(Cd(i?"audiotrackchanged":"mediaqualitychanged",t))}function Eh(e,t){if(t=void 0===t||t,!e.h.error)return t?new Ce(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new Ce(2,3,3016,n,t,e.h.error.message)):null}function xh(e,t,n){0<t&&(e.T()||e.Ij(t)),n<(t=e.getDuration())&&(e.T()||e.vb(n))}function kh(e,t){D(function(n){if(1==n.g)return S(n,Promise.resolve(),2);e.m!=Mh&&e.dispatchEvent(t),w(n)})}function Ih(e){for(var t=new Set,n=(e=c(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(dt(n.language)):t.add("und");return t}function Ch(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],a="und",o=[];r.language&&(a=dt(r.language)),(o="variant"==r.type?r.audioRoles:r.roles)&&o.length||(o=[""]),t.has(a)||t.set(a,new Set);for(var s=(o=c(o)).next();!s.done;s=o.next())s=s.value,t.get(a).add(s),r.label&&(n.has(a)||n.set(a,new Map),n.get(a).set(s,r.label))}var u=[];return t.forEach(function(e,t){for(var i=(e=c(e)).next();!i.done;i=e.next()){i=i.value;var r=null;n.has(t)&&n.get(t).has(i)&&(r=n.get(t).get(i)),u.push({language:t,role:i,label:r})}}),u}Ed.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},v(kd,ee),(r=kd.prototype).destroy=function(){var e,t=this;return D(function(n){switch(n.g){case 1:return t.m==Mh?n.return():(Id(t),e=t.detach(),t.m=Mh,S(n,e,2));case 2:return S(n,t.Og(),3);case 3:if(t.Se&&(t.Se.release(),t.Se=null),t.He&&(t.He.release(),t.He=null),t.j&&(t.j.release(),t.j=null),t.dc&&(t.dc.release(),t.dc=null),t.Jd&&(t.Jd.release(),t.Jd=null),t.Na=null,t.g=null,t.B=null,t.Ne=null,t.K=null,t.ba=null,!t.H){n.A(4);break}return S(n,t.H.destroy(),5);case 5:t.H=null;case 4:t.u&&(t.u.release(),t.u=null),t.ra&&(t.ra.destroy(),t.ra=null),ee.prototype.release.call(t),w(n)}})},r.$b=function(e,t){t=void 0===t||t;var n,i,r,a=this;return D(function(o){switch(o.g){case 1:if(a.m==Mh)throw new Ce(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.A(2);break}return S(o,a.detach(),2);case 2:return S(o,Pd(a,"attach"),4);case 4:if(o.h)return o.return();if(A(o,5,6),n||(Rd(a,"attach"),i=function(){var e=Eh(a,!1);e&&Sh(a,e)},a.He.o(e,"error",i),a.h=e,a.K&&a.K.setMediaElement(e)),Re(),!t||!Sv()||a.I){o.A(6);break}return S(o,jd(a),6);case 6:I(o),a.Z.release(),C(o,0);break;case 5:return r=k(o),S(o,a.detach(),10);case 10:throw r}})},r.xi=function(e){this.ti=e},r.detach=function(e){e=void 0!==e&&e;var t=this;return D(function(n){if(1==n.g){if(t.m==Mh)throw new Ce(2,7,7e3);return S(n,t.lc(!1,e),2)}if(3!=n.g)return S(n,Pd(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.He.Sa(),t.h=null),Rd(t,"detach"),t.C&&!e&&t.C.release()}finally{t.Z.release()}w(n)})},r.lc=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,u,l,d,h,p,f,g,m,v=this;return D(function(y){switch(y.g){case 1:return v.m!=Mh&&(v.m=Lh),S(y,Pd(v,"unload"),2);case 2:return y.h?y.return():(E(y,3),v.Y=!1,Rd(v,"unload"),Id(v),i=v.Ie.map(function(e){return e()}),v.Ie=[],S(y,Promise.all(i),5));
1case 5:if(v.dispatchEvent(Cd("unloading")),v.Fe&&(v.Fe.release(),v.Fe=null),v.sa&&(v.sa.release(),v.sa=null),v.Ta&&(v.Ta.release(),v.Ta=null),v.h&&(v.j.Sa(),v.dc.Sa()),v.Oe.stop(),v.cb&&(v.cb.release(),v.cb=null),v.Ha&&(v.Ha.stop(),v.Ha=null),!v.G){y.A(6);break}return S(y,v.G.stop(),7);case 7:v.G=null,v.yc=null;case 6:if(!v.u){y.A(8);break}return S(y,v.u.stop(),8);case 8:if(!v.l){y.A(10);break}return S(y,v.l.destroy(),11);case 11:v.l=null;case 10:if(v.J&&(v.J.release(),v.J=null),v.F&&(v.F.release(),v.F=null),"webkit"!==e.shakaMediaKeysPolyfill||!v.D){y.A(12);break}return S(y,v.D.destroy(),13);case 13:v.D=null;case 12:if(!v.I){y.A(14);break}return S(y,v.I.destroy(),15);case 15:v.I=null;case 14:if(v.C&&!n&&v.C.onAssetUnload(),v.$&&!n&&(v.$.destroy(),v.$=null),n||v.xg.stop(),v.K&&function(e){e.u=!1,e.F=!0,e.C=!1,e.l=!1,e.m=0,e.s=0,e.B=0,e.G=!1,e.j=null,e.D.Sa()}(v.K),v.ba&&(v.ba.g=null),!v.s){y.A(16);break}return S(y,v.s.destroy(),17);case 17:v.s=null;case 16:if(v.h){for(r=c(v.vg),a=r.next();!a.done;a=r.next())(o=a.value).src.startsWith("blob:")&&URL.revokeObjectURL(o.src),o.remove();v.vg=[],ds(v.h)&&v.h.load()}if(!v.D){y.A(18);break}return S(y,v.D.destroy(),19);case 19:v.D=null;case 18:if(v.La&&v.U!=v.La.zd()&&(v.La.s||v.La.destroy(),v.La=null),v.U=null,v.wc=null,v.O=null,v.i){for(s=c(v.i.variants),u=s.next();!u.done;u=s.next())for(l=u.value,d=c([l.audio,l.video]),h=d.next();!h.done;h=d.next())(p=h.value)&&p.segmentIndex&&p.segmentIndex.release();for(f=c(v.i.textStreams),g=f.next();!g.done;g=f.next())(m=g.value).segmentIndex&&m.segmentIndex.release()}v.g&&v.g.streaming.clearDecodingCache&&(Tr.clear(),Nr.clear()),v.i=null,v.B=new pc,v.si=null,v.Lb=null,v.R=null,v.Ve=-1,v.Re=[],v.Ya=[],v.ug=-1,v.H&&v.H.Fi(),nh(v);case 3:I(y),v.Z.release(),C(y,4);break;case 4:if(Re(),t&&Sv()&&!v.I&&v.h)return S(y,jd(v),0);y.A(0)}})},r.sm=function(e){this.N=e},r.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,u,l,d,h,p,f,g,m,v,y,b=this;return D(function(T){switch(T.g){case 1:if(b.m==Mh)throw new Ce(2,7,7e3);if(r=null,a="",t instanceof vc){if(t.s)throw new Ce(2,7,7006);a=(r=t).zd()||""}else a=t||"";return S(T,xd(b.Z,"load"),2);case 2:if(b.Z.release(),!b.h)throw new Ce(2,7,7002);if(!b.U){T.A(3);break}return b.U=a,S(T,b.lc(!1),3);case 3:if(o=++b.Te,s=function(){return D(function(e){if(1==e.g)return b.Te==o?e.A(0):r?S(e,r.destroy(),3):e.A(3);throw new Ce(2,7,7e3)})},u=function(e,t){return D(function(n){switch(n.g){case 1:return E(n,2),S(n,xd(b.Z,t),4);case 4:return S(n,s(),5);case 5:return S(n,e(),6);case 6:return S(n,s(),7);case 7:r&&b.g&&(r.g=b.g);case 2:I(n),b.Z.release(),C(n,0)}})},A(T,5,6),null==n&&r&&(n=r.getStartTime()),b.N=n,b.Y=!1,b.dispatchEvent(Cd("loading")),r){i=r.U,T.A(8);break}if(i){T.A(8);break}return S(T,u(function(){return D(function(e){if(1==e.g)return S(e,Od(b,a),2);i=e.h,w(e)})},"guessMimeType_"),8);case 8:if(l=!!r,r){bc(r,b),b.B=r.getStats(),T.A(11);break}return S(T,Nd(b,a,n,i,!0,b.g),12);case 12:(r=T.h)?(r.C=!1,bc(r,b),b.B=r.getStats(),r.start(),r.u.catch(function(){})):b.B=new pc;case 11:return d=!r,h=Date.now()/1e3,b.B=r?r.getStats():new pc,b.U=a,b.wc=i||null,nh(b),p=function(){var e=b.Qb(),t={start:0,end:0};if(e.total.length){t.start=1/0;for(var n=(e=c(e.total)).next();!n.done;n=e.next())(n=n.value).start<t.start&&(t.start=n.start),n.end>t.end&&(t.end=n.end)}return t},b.sa=new tl(p),b.sa.addEventListener("regionadd",function(e){Fd(b,e.region,"metadataadded")}),d?S(T,u(function(){return D(function(e){return S(e,function(e,t){var n,i,r,a,o;return D(function(s){return 1==s.g?(n=rt,i=Date.now()/1e3,r=!0,e.D=e.ud({xc:e.H,onError:function(t){Sh(e,t)},Lf:function(){},onExpirationUpdated:function(){var t=Cd("expirationupdated");e.dispatchEvent(t)},onEvent:function(t){e.dispatchEvent(t),"drmsessionupdate"==t.type&&r&&(r=!1,e.B.m=Date.now()/1e3-i)}}),e.D.configure(e.g.drm),a={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},(o={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?Pi(t):"",codecs:t?Di(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Ea,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,baseOriginalId:null}).fullMimeTypes.add(ki(o.mimeType,o.codecs)),t.startsWith("audio/")?(o.type=n.ma,a.audio=o):a.video=o,e.D.Y=!0,S(s,xa(e.D,[a],[]),2)):S(s,e.D.$b(e.h),0)})}(b,i),0)})}
1,"initializeSrcEqualsDrmInner_"),23):(b.Ta=new tl(p),S(T,u(function(){return D(function(e){if(1==e.g)return S(e,Promise.race([r.na,r.u]),2);b.yc=r.G;var t=r;t.oa=!0,b.G=t.l,b.i=r.ih(),w(e)})},"waitForFinish"),15));case 15:if(b.I){T.A(16);break}return S(T,u(function(){return D(function(e){return S(e,jd(b),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return b.i&&b.i.textStreams.length&&(b.s.enableTextDisplayer?b.s.enableTextDisplayer():Mt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),S(T,u(function(){return D(function(e){return S(e,r.u,0)})},"waitForFinish"),18);case 18:if(b.g=r.getConfiguration(),b.Le=r.F,b.G&&b.G.setMediaElement&&b.h&&b.G.setMediaElement(b.h),b.Fe=function(e){return e.ra=!0,e.H}(r),b.Ee=r.Na,(f=r.B)&&(b.L=f),l&&b.h&&"AUDIO"===b.h.nodeName&&(function(e){for(var t=c(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(e){return e.audio})}(b),b.configure("manifest.disableVideo",!0)),r.i){T.A(19);break}return S(T,u(function(){return D(function(e){return S(e,wc(r,b.h),0)})},"drmEngine_.init"),19);case 19:return b.D=function(e){return e.ba=!0,e.i}(r),S(T,u(function(){return D(function(e){return S(e,b.D.$b(b.h),0)})},"drmEngine_.attach"),21);case 21:return!(g=r.D)||b.Na&&b.Na==g||(b.u=function(e){return e.Z=!0,e.j}(r),b.Na=r.D,"function"!=typeof b.u.setMediaElement&&(Mt("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),b.u.setMediaElement=function(){}),"function"!=typeof b.u.setCmsdManager&&(Mt("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),b.u.setCmsdManager=function(){}),"function"!=typeof b.u.trySuggestStreams&&(Mt("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),b.u.trySuggestStreams=function(){})),m=function(e){return e.sa=!0,e.L}(r),v=r.J,S(T,u(function(){return D(function(t){return S(t,function(t,n,i,r){var a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,A,E,x,k,I,C,M,L,R,P,N,_;return D(function(O){switch(O.g){case 1:Rd(t,"load"),a=t.h,t.J=new Xu({qf:function(){return a.playbackRate},$c:function(){return a.defaultPlaybackRate},Xh:function(e){a.playbackRate=e},hj:function(e){a.currentTime+=e}}),Bd(t,a,n),"onchange"in e.screen&&t.j.o(e.screen,"change",function(){if(t.L.getConfiguration){var e=t.L.getConfiguration();"AUTO"==e.Kc?sh(t):"AUTO"==t.g.preferredVideoHdrLevel&&t.g.abr.enabled&&(e.Kc="AUTO",t.L.configure(e),sh(t))}}),o=!1,s=c(t.i.variants);for(u=s.next();!u.done;u=s.next())l=u.value,(d=l.video&&l.video.dependencyStream)&&(o=Ot(d));!function(e,t,n){n||t.lcevc.enabled?(Id(e),null==e.P&&(e.P=new Dt(e.h,e.ti,t.lcevc,n),e.I&&(e.I.L=e.P))):Id(e)}(t,t.g,o),t.Kd=t.g.preferredTextLanguage,t.Ke=t.g.preferredTextRole,t.Je=t.g.preferForcedSubs,xh(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.u.init(function(e,n,i){t.i&&t.l&&e!=t.l.s&&lh(t,e,!0,void 0!==n&&n,void 0===i?0:i)}
1),t.u.setMediaElement(a),t.u.setCmsdManager(t.ba),t.l=function(e){return new bl(e.i,{bd:function(){return e.F?e.F.Ue():0},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},Xa:function(){return e.Xa()},video:e.h,ha:e.I,xc:e.H,onError:function(t){return Sh(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Mf:function(t,n,i){var r=t.startTime;if(t=t.endTime,(n=n.type)!=it){if(e.F){e.F.jj();var a=Js(e.I,n);!e.T()&&e.h.paused&&!e.h.seeking&&null!=a&&0<a&&e.F.Ue()<a&&e.F.sg(a)}Kd(e)}i=(new Map).set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(Cd("segmentappended",i))},Ml:function(t,n){(n=n.Ed)&&e.Ee&&function(e,t,n){var i=function(e,t){var n=e.g.get(t);return n||(n={ve:[],Mg:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.ve;t.ve=r.filter(function(e,t){return!(e.position<=n&&t+1<r.length&&r[t+1].position<=n||e.position>=i)})}else t.ve=[]}(e,i),e={Ed:t,position:n},0<=(t=(i=i.ve).findIndex(function(e){return e.position>=n}))?i.splice(t,i[t].position==n?1:0,e):i.push(e)}(e.Ee,n,t)},Bi:function(t,n){var i=e.D;if(i.h.parseInbandPsshEnabled&&!i.F&&["audio","video"].includes(t)){t=new wa(Ee(n)),n=0;for(var r=c(t.data),a=r.next();!a.done;a=r.next())n+=a.value.length;if(0==n)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,a=(t=c(t.data)).next();!a.done;a=t.next())a=a.value,n.set(a,r),r+=a.length;Ma(i,"cenc",n),i=i.m}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}(t),t.l.configure(t.g.streaming),t.m=Rh,t.dispatchEvent(Cd("streaming")),h=i;case 2:for((f=t.l.s)||h||(h=sh(t)?t.u.chooseVariant():null),g=[],m=c([(p=f||h).video,p.audio]),v=m.next();!v.done;v=m.next())(y=v.value)&&!y.segmentIndex&&(g.push(y.createSegmentIndex()),y.dependencyStream&&g.push(y.dependencyStream.createSegmentIndex()));if(!(0<g.length)){O.A(4);break}return S(O,Promise.all(g),4);case 4:if(!p||0!=p.disabledUntilTime){O.A(2);break}if(t.G&&t.G.onInitialVariantChosen&&t.G.onInitialVariantChosen(p),t.i.isLowLatency&&(t.g.streaming.lowLatencyMode?t.configure(t.wg):Y("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.")),t.K&&(function(e,t){e.l=t,e.l?e.i==fd?e.i=gd:e.i==md&&(e.i=vd):e.i==gd?e.i=fd:e.i==vd&&(e.i=md)}(t.K,t.i.isLowLatency&&t.g.streaming.lowLatencyMode),function(e,t){if(e.g&&e.g.enabled&&e.g.version==pd&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.B=t}).catch(function(){e.B=0})}}(t.K,1e3*n)),xh(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),function(e,t,n){e.j.presentationTimeline.T()||(e.U=t,e.R=n)}(t.l,t.g.playRangeStart,t.g.playRangeEnd),t.Y=!0,t.dispatchEvent(Cd("canupdatestarttime")),b=function(e){t.F=function(e,t){return new ju(e.h,e.i,e.g.streaming,t,function(){e.cb&&Qu(e.cb,!0),e.l&&e.l.ld(),e.O&&Kd(e)},function(t){return e.dispatchEvent(t)})}(t,e),t.cb=function(e,t){var n=e.T()||"number"==typeof t&&0<t;t=new Ec(e.Fe,n),t.addEventListener("enter",function(t){wh(e,"timelineregionenter",t.region)}),t.addEventListener("exit",function(t){wh(e,"timelineregionexit",t.region)}),t.addEventListener("skip",function(t){var n=t.region;t.seeking||(wh(e,"timelineregionenter",n),wh(e,"timelineregionexit",n))});var i=new Ec(e.sa,n);i.addEventListener("enter",function(t){Fd(e,t.region,"metadata")}),n=new Ec(e.Ta,n),n.addEventListener("enter",function(t){t=(new Map).set("detail",t.region.emsg),e.dispatchEvent(Cd("emsg",t))});var r=new Ju(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.Ee&&r.g.add(e.Ee),r}(t,e),Hd(t,a,!1)},t.g.streaming.startAtSegmentBoundary||(null==(T=t.N)&&t.i.startTime&&(T=t.i.startTime),b(T)),f){O.A(7);break}if(!t.g.streaming.startAtSegmentBoundary){O.A(8);break}return A=t.i.presentationTimeline,t.N instanceof Date&&(x=A.m||A.i,null!=(k=t.N.getTime()/1e3-x)&&(E=k)),null==E&&(E="number"==typeof t.N?t.N:t.h.currentTime),null==t.N&&t.i.startTime&&(E=t.i.startTime),I=A.bc(),C=A.Jb(),E<I?E=I:E>C&&(E=C),S(O,function(e,t){var n,i,r,a,o;return D(function(s){return 1==s.g?(n=e.audio,i=e.video,r=function(e,t){var n,i,r;return D(function(a){return 1==a.g?e?e.segmentIndex?a.A(2):S(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.ac(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},S(s,r(n,t),2)):3!=s.g?(a=s.h,S(s,r(i,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)})}(h,E),9);case 9:M=O.h,b(M);case 8:lh(t,h,!0,!1,0);case 7:return t.F.ready(),t.rc().find(function(e){return e.active})||((L=gr(t.i.textStreams,t.Kd,t.Ke,t.Je)[0]||null)&&hc(t.B.h,L,!0),h&&(L?(br(h.audio,L,t.g)&&(t.na=!0),t.na&&t.s.setTextVisibility(!0)):(t.na=!1,t.s.setTextVisibility(!1)),vh(t)),L&&(t.g.streaming.alwaysStreamText||t.fd())&&(wl(t.l,L),bh(t))),S(O,t.l.start(r),10);case 10:t.g.abr.enabled&&(t.u.enable(),yh(t)),hh(t),sh(t),t.i.variants.some(function(e){return e.primary}),((R=t.T())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.i.serviceDescription||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(P=function(){return ah(t)},t.j.o(a,"timeupdate",P)),R||(N=function(){return oh(t)},t.j.o(a,"timeupdate",N),oh(t),t.i.nextUrl&&(0<t.g.streaming.preloadNextUrlWindow&&(_=function(){var e;return D(function(n){if(1==n.g)return e=t.xa().end-t.h.currentTime,!isNaN(e)&&e<=t.g.streaming.preloadNextUrlWindow?(t.
1j.Da(a,"timeupdate",_),S(n,t.preload(t.i.nextUrl),4)):n.A(0);t.La=n.h,w(n)})},t.j.o(a,"timeupdate",_)),t.j.o(a,"ended",function(){t.load(t.La||t.i.nextUrl)}))),t.C&&t.C.onManifestUpdated(R),w(O)}})}(b,h,v,m),0)})},"loadInner_"),22);case 22:!function(e){if(e.I)for(var t=c(e.I),n=t.next();!n.done;n=t.next())(n=n.value)();e.I=null}(r),b.wc&&Re().eg()&&Ni(b.wc)&&function(t,n,i){t.g&&e.ManagedMediaSource&&t.i&&t.B.useSourceElements&&(t.C&&t.g.removeChild(t.C),t.C=cs(n,i),t.g.appendChild(t.C),t.g.disableRemotePlayback=!1)}(b.I,b.U,b.wc),T.A(14);break;case 23:return S(T,u(function(){return D(function(e){return S(e,function(e,t,n){var i,r,a,o,s,u,l,d,h,p,f,g;return D(function(m){switch(m.g){case 1:if(Rd(e,"src-equals"),i=e.h,e.F=new _u(i),r=!1,e.Ie.push(function(){r=!0}),e.dispatchEvent(Cd("canupdatestarttime")),null!=e.N&&e.F.sg(e.N),e.cb=function(e,t){t=new Ec(e.sa,t instanceof Date||0<t),t.addEventListener("enter",function(t){Fd(e,t.region,"metadata")});var n=new Ju(e.h);return n.g.add(t),n}(e,e.N||0),e.J=new Xu({qf:function(){return i.playbackRate},$c:function(){return i.defaultPlaybackRate},Xh:function(e){i.playbackRate=e},hj:function(e){i.currentTime+=e}}),Hd(e,i,!0),i.textTracks&&(Ud(e),a=function(t){if(!(e.s instanceof Gc)){var n=Qd(e).find(function(e){return"disabled"!==e.mode});n&&(n.mode=t?"showing":"hidden"),e.s instanceof zc&&(n=function(e){return Array.from(e.h.textTracks).find(function(e){return"Shaka Player TextTrack"==e.label})}(e))&&(n.mode=!t&&e.s.isTextVisible()?"showing":"hidden")}},e.j.o(i,"enterpictureinpicture",function(){return a(!0)}),e.j.o(i,"leavepictureinpicture",function(){return a(!1)}),i.remote?(e.j.o(i.remote,"connect",function(){return a(!1)}),e.j.o(i.remote,"connecting",function(){return a(!1)}),e.j.o(i.remote,"disconnect",function(){return a(!1)})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.j.o(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return a(!1)}),(o=i).webkitSupportsFullscreen&&e.j.o(o,"webkitpresentationmodechanged",function(){return a("inline"!==o.webkitPresentationMode)})),Bd(e,i,t),s=function(e,t,n){try{if(!e.g.enabled)return t;var i=td(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=sd;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=ld;break e;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":r=od;break e}r=void 0}return i.ot=r,i.su=!0,ad(t,rd(i))}catch(e){return J("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.K,e.U,n),!s.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(s+="#t=",0<e.g.playRangeStart&&(s+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(s+=","+e.g.playRangeEnd)),!e.I){m.A(2);break}return S(m,e.I.destroy(),3);case 3:e.I=null;case 2:return ds(i),i.src=s,"TV"==(u=Re()).Ja()&&i.load(),"none"!=i.preload&&!i.autoplay&&Ni(n)&&"WEBKIT"===u.Ia()&&i.load(),e.m=Ph,e.dispatchEvent(Cd("streaming")),l=new jr,ku(i,HTMLMediaElement.HAVE_METADATA,e.j,function(){e.F.ready(),l.resolve()}),d=function(){return new Promise(function(t){var n=new Ki(t);e.j.o(i.textTracks,"change",function(){return n.X(.5)}),n.X(.5)})},ku(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var t,n,i,a,o;return D(function(s){if(1==s.g)return S(s,d(),2);if(r)return s.return();if(function(e){var t=e.g.preferredAudioLanguage;""!=t&&e.yj(t,e.g.preferredVariantRole)}(e),(t=Qd(e)).some(function(e){return"showing"===e.mode})&&(e.na=!0,e.s.setTextVisibility(!0)),!(e.s instanceof Gc))for(t.length&&(e.s.enableTextDisplayer?e.s.enableTextDisplayer():Mt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),n=!1,i=c(t),a=i.next();!a.done;a=i.next())"disabled"!==(o=a.value).mode&&(n?(o.mode="disabled",Y("Found more than one enabled text track, disabling it",o)):(Jd(e,o),n=!0));!function(e){var t=e.g.preferredTextLanguage;""!=t&&e.Sh(t,e.g.preferredTextRole,e.g.preferForcedSubs)}(e),w(s)})}),i.error?l.reject(Eh(e)):"none"==i.preload&&(Y('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.'),l.resolve()),e.j.qa(i,"error",function(){l.reject(Eh(e))}),S(m,Yi(e.g.streaming.loadTimeout,l),4);case 4:((h=e.T())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(p=function(){return ah(e)},e.j.o(i,"timeupdate",p)),h||(f=function(){return oh(e)},e.j.o(i,"timeupdate",f),oh(e)),e.C&&(e.C.onManifestUpdated(h),h&&(g=e.xa().end,e.j.o(i,"progress",function(){var t=e.xa().end;g!=t&&(e.C.onManifestUpdated(e.T()),g=t)}))),e.Y=!0,w(m)}})}(b,h,i),0)})},"srcEqualsInner_"),14);case 14:b.dispatchEvent(Cd("loaded"));case 6:if(I(T),!r){T.A(25);break}return S(T,r.destroy(),25);case 25:b.La=null,C(T,0);break;case 5:if(!(y=k(T))||7e3==y.code){T.A(27);break}return S(T,b.lc(!1),27);case 27:throw y}})},r.om=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,i=this;return D(function(r){return 1==r.g?S(r,Dd(i),2):3!=r.g?(n=r.h,S(r,i.lc(e,t),3)):r.return(n)})},r.Ki=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return D(function(r){return 1==r.g?S(r,Dd(i,t),2):3!=r.g?(n=r.h,S(r,i.detach(e),3)):r.return(n)})},r.preload=function(e,t,n,i){t=void 0===t?null:t;var r,a,o=this;return D(function(s){return 1==s.g?(oc(r=th(o),i||o.g,th(o)),S(s,Nd(o,e,t,n,!1,r),2)):((a=s.h)?a.start():Sh(o,new Ce(2,7,7005)),s.return(a))})},r.Og=function(){var e,t,n,i,r=this;return D(function(a){for(e=[],t=c(r.Pe),n=t.next();!n.done;n=t.next())(i=n.value).s||e.push(i.destroy());return r.Pe=[],S(a,Promise.all(e),0)})},r.Vl=function(){for(var e=this.Z;e.g;)e.release()},r.ud=function(e){return new Ea(e)},r.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=Wl(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Mt("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Mt("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){Mt("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var n=Re();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&"WEBKIT"===n.Ia(),delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&"boolean"==typeof e.streaming.liveSync&&(Mt("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),n=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=n),e.streaming&&(!e.streaming.liveSync||!("targetLatency"in e.
1streaming.liveSync))&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(Mt("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(Mt("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(Mt("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(Mt("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(Mt("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(Mt("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(Mt("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(Mt("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){Mt("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(Mt("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(Mt("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Mt("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(Mt("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Mt("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(Mt("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(Mt("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(Mt("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(Mt("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(Mt("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){for(var a in n=!1,e.drm.advanced){var o=e.drm.advanced[a];i=o.videoRobustness,o=o.audioRobustness,"videoRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].videoRobustness)&&(e.drm.advanced[a].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[a]&&!Array.isArray(e.drm.advanced[a].audioRobustness)&&(e.drm.advanced[a].audioRobustness=[o],n=!0)}n&&Mt("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of str
1ings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(Mt("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(Mt("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(Mt("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),e.streaming&&"crossBoundaryStrategy"in e.streaming&&"keep"!=e.streaming.crossBoundaryStrategy&&(e.streaming.inaccurateManifestTolerance=0),a=oc(this.g,e,th(this)),Wd(this),a},r.kk=function(e){this.wg=e},r.getConfiguration=function(){var e=th(this);return oc(e,this.g,th(this)),e},r.Ak=function(){return this.wg},r.Ri=function(){return oc(th(this),this.g,th(this)),Xl(this.g,th(this))},r.Oi=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.h.currentTime+t,this.xa().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},r.tj=function(){for(var e in this.g)delete this.g[e];oc(this.g,th(this),th(this)),Wd(this)},r.Kk=function(){return this.m},r.jh=function(){return this.i?this.i.type:null},r.Rk=function(){return this.h},r.Ib=function(){return this.H},r.zd=function(){return this.U},r.mf=function(){return this.C?this.C:null},r.lh=function(){return this.ra?this.ra:null},r.T=function(){return this.i&&!this.Ca()?this.i.presentationTimeline.T():!(!this.h||!this.h.src&&!this.Ca())&&1/0==this.h.duration},r.ed=function(){return!!this.i&&this.i.presentationTimeline.ed()},r.Cd=function(){if(this.i&&!this.Ca()){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.h||!this.h.src&&!this.Ca())&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},r.xh=function(){if(this.i&&!this.Ca()){var e=this.i.variants;return!!e.length&&(!((e=e[0]).audio||!e.video)&&!e.video.codecs.includes(","))}return!(!this.h||!this.h.src&&!this.Ca()||!this.h.audioTracks)&&0==this.h.audioTracks.length},r.xa=function(){if(this.i&&!this.Ca()){if(!this.Y&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.bc(),end:e.Jb()}}if(this.h&&(this.h.src||this.Ca())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return{start:t,end:e=Math.min(e.end(e.length-1),n)}}return{start:0,end:0}},r.ol=function(){this.T()&&(this.h.currentTime=this.xa().end)},r.vl=function(){return this.Y},r.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},r.drmInfo=function(){return this.D?this.D.g:null},r.be=function(){return this.D?this.D.be():1/0},r.eh=function(){return this.D?this.D.eh():[]},r.nf=function(){return this.D?this.D.nf():{}},r.xf=function(){return this.O?this.O.g==$a:!!this.U},r.Xa=function(){return this.h?this.J?this.J.i:1:0},r.oi=function(e){this.m==Rh&&this.l&&Tl(this.l,e)},r.Sc=function(e,t){t=void 0===t||t,0==e?Y("A trick play rate of 0 is unsupported!"):(this.J.set(e),this.m==Rh&&(this.u.playbackRateChanged(e),this.oi(t&&1!=e)),ih(this,e))},r.td=function(){var e=this.J.$c();this.m==Ph&&this.J.set(e),this.m==Rh&&(this.J.set(e),this.u.playbackRateChanged(e),this.oi(!1)),this.dc.Sa()},r.qb=function(){if(this.i&&!this.Ca()){for(var e=this.l?this.l.s:null,t=[],n=0,i=c(this.i.variants),r=i.next();!r.done;r=i.next())if(pr(r=r.value)){var a=sr(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}if(this.h&&this.h.audioTracks){var o=dh(this);return(e=Array.from(this.h.audioTracks)).length?e.map(function(e){return hr(e,o)}):o?[hr(null,o)]:[]}return[]},r.rc=function(){if(this.i){if(this.Ca())return[];for(var e=this.l?this.l.B:null,t=[],n=c(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=ur(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Qd(this).map(function(e){return dr(e)}):[]},r.hh=function(){var e=this.Re;return this.i&&(e=this.i.imageStreams),e.map(function(e){return lr(e)})},r.pk=function(e){var t,n,i=this;return D(function(r){return 1==r.g?S(r,Xd(i,e),2):(t=r.h)?(n=[],t.segmentIndex.Hb(function(e){var i=qd(e.tilesLayout||t.tilesLayout);if(i)for(var r=i.rows*i.Wc,a=e.j-e.startTime,o=0;o<r;o++){var s=Yd(e,t,e.startTime+a*o/r,i);n.push(s)}}),t.closeSegmentIndex&&t.closeSegmentIndex(),r.return(n)):r.return(null)})},r.Si=function(e,t){var n,i,r,a,o=this;return D(function(s){return 1==s.g?S(s,Xd(o,e),2):(n=s.h)?null==(i=n.segmentIndex.find(t))?s.return(null):(r=n.segmentIndex.get(i),(a=qd(r.tilesLayout||n.tilesLayout))?s.return(Yd(r,n,t,a)):s.return(null)):s.return(null)})},r.$f=function(e){var t,n=this;this.i&&this.F&&((t=n.i.textStreams.find(function(t){return t.id==e.id}))&&t!=n.l.B&&(hc(n.B.h,t,!1),wl(n.l,t),mh(n),bh(n),n.Kd=t.language),!this.Ca())||function(){if(n.h&&n.h.textTracks){var t=Qd(n),i=t.find(function(t){return cr(t)===e.id});if(i){if(n.s instanceof Gc)for(var r=(t=c(t)).next();!r.done;
1r=t.next()){var a=(r=r.value)===i?n.na?"showing":"hidden":"disabled";r.mode!==a&&(r.mode=a)}else(t=t.find(function(e){return"disabled"!==e.mode}))!==i&&(t&&(t.mode="disabled",n.j.Da(t,"cuechange"),n.s.remove(0,1/0)),i&&Jd(n,i));mh(n),bh(n)}}}()},r.ye=function(e,t,n){var i=this;t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.F&&(function(){var r=i.i.variants.find(function(t){return t.id==e.id});if(r&&pr(r)){var a=i.l.s;i.g.abr.enabled&&(a.video!=r.video||a.audio&&r.audio&&a.audio.language==r.audio.language&&a.audio.channelsCount==r.audio.channelsCount&&a.audio.label==r.audio.label)&&Y("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.Ca()?lh(i,r,!1,!1,0):lh(i,r,!1,t||!1,n||0),i.L.configure({language:r.language,role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",channelCount:r.audio&&r.audio.channelsCount?r.audio.channelsCount:0,Kc:r.video&&r.video.hdr?r.video.hdr:"",spatialAudio:!(!r.audio||!r.audio.spatialAudio)&&r.audio.spatialAudio,videoLayout:r.video&&r.video.videoLayout?r.video.videoLayout:"",Uc:r.audio&&r.audio.label?r.audio.label:"",Rd:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:"",Td:a.audio&&a.audio.codecs?a.audio.codecs:"",We:a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),sh(i)}}(),!this.Ca())||function(){if(e.originalAudioId&&i.h&&i.h.audioTracks)for(var t=Array.from(i.h.audioTracks),n=(t=c(t)).next();!n.done;n=t.next())if(cr(n=n.value)==e.id){ch(i,n);break}}()},r.zj=function(e,t){var n,i=this;(t=void 0===t?0:t,this.i&&this.F&&((n=i.L.getConfiguration()).audioCodec=e.codecs||"",n.Uc=e.label||"",n.channelCount=e.channelsCount||0,n.language=e.language,n.role=e.roles[0]||"",n.spatialAudio=e.spatialAudio,i.L.configure(n),uh(i,!0,t,!1,!1),!this.Ca()))||function(){if(i.h&&i.h.audioTracks){for(var t=Array.from(i.h.audioTracks),n=null,r=(t=c(t)).next();!r.done;r=t.next())if((r=r.value).label==e.label&&r.language==e.language&&r.kind==e.roles[0]){n=r;break}n&&ch(i,n)}}()},r.getAudioTracks=function(){if(this.i&&!this.Ca()){var e=this.qb();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e;if(this.m!=Rh||this.Ca()||(n=e.filter(function(e){return e.originalVideoId===t.originalVideoId&&e.audioCodec})),!n.length)return[];e=new Map;for(var i=(n=c(n)).next();!i.done;i=n.next()){var r=(i=i.value).originalAudioId;r||null==i.audioId||(r=String(i.audioId)),r&&e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){var t=e.language;return t={active:e.enabled,language:dt(t||"und"),label:e.label,mimeType:null,codecs:null,primary:"main"==e.kind,roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:t},e.kind&&t.roles.push(e.kind),e.configuration&&(e.configuration.codec&&(t.codecs=e.configuration.codec),e.configuration.sampleRate&&(t.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(t.channelsCount=e.configuration.numberOfChannels)),t}):[]},r.Aj=function(e,t,n){t=void 0!==t&&t,n=void 0===n?0:n;var i=this.qb();if(i.length){var r=i.find(function(e){return e.active});r&&(i=i.find(function(t){return t.audioId===r.audioId&&(t.videoBandwidth||t.bandwidth)==e.bandwidth&&t.width==e.width&&t.height==e.height&&t.frameRate==e.frameRate&&t.pixelAspectRatio==e.pixelAspectRatio&&t.hdr==e.hdr&&t.colorGamut==e.colorGamut&&t.videoLayout==e.videoLayout&&t.videoMimeType==e.mimeType&&t.videoCodec==e.codecs}))&&!i.active&&this.ye(i,t,n)}},r.getVideoTracks=function(){if(this.m==Ph||this.Ca())return[];var e=this.qb();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e.filter(function(e){return e.originalAudioId===t.originalAudioId&&e.audioId===t.audioId&&e.audioGroupId===t.audioGroupId&&e.videoCodec});if(!n.length)return[];e=new Map;for(var i=(n=c(n)).next();!i.done;i=n.next()){var r=(i=i.value).originalVideoId;r||null==i.videoId||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec})}return Array.from(e.values())},r.rk=function(){return Ch(this.qb())},r.$k=function(){return Ch(this.rc())},r.qk=function(){return Array.from(Ih(this.qb()))},r.Zk=function(){return Array.from(Ih(this.rc()))},r.yj=function(e,t,n,i,r,a,o){var s=this;n=void 0===n?0:n,i=void 0===i?0:i,r=void 0===r?"":r,a=void 0!==a&&a,o=void 0===o?"":o,this.i&&this.F&&(function(){function u(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0}var l=s.l.s;s.L=s.g.adaptationSetCriteriaFactory(),s.L.configure({language:e,role:t||"",channelCount:n||0,Kc:"",spatialAudio:a||!1,videoLayout:"",Uc:o||"",Rd:"",codecSwitchingStrategy:s.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",Td:l.audio&&l.audio.codecs?l.audio.codecs:"",We:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,preferredAudioCodecs:s.g.preferredAudioCodecs,preferredAudioChannelCount:s.g.preferredAudioChannelCount});
1for(var d=s.L.create(s.i.variants),h=null,p=(d=c(d.values())).next();!p.done;p=d.next())pr(p=p.value)&&(!h||u(h,l)>u(p,l))&&(h=p);h!=l&&(h?(l=sr(h),s.ye(l,!0,i||0)):uh(s))}(),!this.Ca())||function(){if(s.h&&s.h.audioTracks){var n=gr(s.qb(),e,t||"",!1)[0];n&&s.ye(n)}}()},r.Sh=function(e,t,n){var i,r=this;(n=void 0!==n&&n,this.i&&this.F&&(function(){r.Kd=e,r.Ke=t||"",r.Je=n||!1;var i=gr(r.i.textStreams,r.Kd,r.Ke,r.Je)[0]||null;i&&i!=r.l.B&&(hc(r.B.h,i,!1),r.g.streaming.alwaysStreamText||r.fd())&&(wl(r.l,i),mh(r),bh(r))}(),!this.Ca()))||(i=gr(r.rc(),e,t||"",n||!1)[0])&&r.$f(i)},r.dm=function(e,t,n){var i=this;t=void 0===t||t,n=void 0===n?0:n,this.i&&this.F&&(function(){for(var r=null,a=c(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.L=i.g.adaptationSetCriteriaFactory(),i.L.configure({language:r.language,role:"",channelCount:0,Kc:"",spatialAudio:!1,videoLayout:"",Rd:"",Uc:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Td:"",We:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),uh(i,t,n))}(),!this.Ca())||function(){if(i.h&&i.h.audioTracks){for(var t=Array.from(i.h.audioTracks),n=null,r=(t=c(t)).next();!r.done;r=t.next())(r=r.value).label==e&&(n=r);n&&ch(i,n)}}()},r.fd=function(){var e=this.na;return this.s?this.s.isTextVisible():e},r.xk=function(){return this.Ya.map(function(e){return ur(e)})},r.wk=function(e){if(Mt("getChapters","Please use an getChaptersAsync."),!this.Ya.length)return[];var t=dt(e);if(!(e=this.Ya.filter(function(e){return dt(e.language)==t})).length)return[];for(var n=[],i=new Set,r=(e=c(e)).next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.Hb(function(e){var t=e.S()[0],r=e.startTime+"-"+e.endTime+"-"+t;e={id:r,title:t,startTime:e.startTime,endTime:e.endTime},i.has(r)||(n.push(e),i.add(r))});return n},r.fh=function(e){var t,n,i,r,a,o,s,u=this;return D(function(l){switch(l.g){case 1:if(!u.Ya.length)return l.return([]);if(t=dt(e),!(n=u.Ya.filter(function(e){return dt(e.language)==t})).length)return l.return([]);i=[],r=new Set,a=c(n),o=a.next();case 2:if(o.done){l.A(4);break}if((s=o.value).segmentIndex){l.A(5);break}return S(l,s.createSegmentIndex(),5);case 5:s.segmentIndex.Hb(function(e){var t=e.S()[0],n=e.startTime+"-"+e.endTime+"-"+t;e={id:n,title:t,startTime:e.startTime,endTime:e.endTime},r.has(n)||(i.push(e),r.add(n))}),o=a.next(),l.A(2);break;case 4:return l.return(i)}})},r.Ae=function(e){e=!!e,this.na!=e&&(this.na=e,this.m==Rh?(this.s.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.B||0<(e=gr(this.i.textStreams,this.Kd,this.Ke,this.Je)).length&&(wl(this.l,e[0]),mh(this),bh(this)):function(e){var t=e.h.get(it);t&&(jl(t),Bl(t).catch(function(){}),e.F=e.h.get(it),e.h.delete(it)),e.B=null}(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.s.setTextVisibility(e),vh(this))},r.Sk=function(){if(this.F)var e=this.F.Ue();else{if(null==this.N)return new Date;if(this.N instanceof Date)return this.N;e=this.N}if(this.i&&!this.Ca()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},r.kh=function(){if(this.i&&!this.Ca()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},r.rf=function(){return this.T()&&this.i?this.i.presentationTimeline.rf():null},r.Qb=function(){if(this.m==Rh)return this.I.Qb();var e={total:[],audio:[],video:[],text:[]};return this.m==Ph&&(e.total=os(this.h.buffered)),e},r.pf=function(){if(!this.h||!this.h.currentTime)return null;var e=this.kh().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},r.getStats=function(){if(this.m!=Rh&&this.m!=Ph)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,switchHistory:[],stateHistory:[]};rh(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.T()||function(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}(this.B,Math.round(100*t)),this.F&&(this.B.P=this.F.pi(),this.B.R=this.F.ri()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),function(e,t,n){e.O=t,e.N=n}(this.B,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.B.L=Number(t.corruptedVideoFrames)),this.B.s=this.D?function(e){return e.H?e.H:NaN}(this.D):NaN,fc(this.B,e.videoWidth||NaN,e.videoHeight||NaN),this.B.l="",this.T()&&null!=this.kh()&&(e=this.pf()||0,this.B.D=e/1e3),t=this.qb().find(function(e){return e.active}),e=this.rc().find(function(e){return e.active}
1),t){if(t.bandwidth){var n=this.J?this.J.i:1,i=n*t.bandwidth;e&&e.bandwidth&&(i+=n*e.bandwidth),this.B.B=i}t.width&&t.height&&fc(this.B,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.B.l=t)}return this.m!=Rh||this.Ca()||(this.i&&(this.B.H=this.i.periodCount,this.B.G=this.i.gapCount,this.i.presentationTimeline&&(this.B.J=this.i.presentationTimeline.h)),e=this.u.getBandwidthEstimate(),this.B.u=e),this.m==Ph&&gc(this.B,NaN),mc(this.B)},r.Ud=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,p,f,g,m,v,y=this;return D(function(b){switch(b.g){case 1:if(y.m!=Rh&&y.m!=Ph)throw new Ce(1,7,7004);if("subtitles"!=n&&"captions"!=n&&Y("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){b.A(2);break}return S(b,$d(y,e),3);case 3:i=b.h;case 2:if(s=[],y.C&&(s=y.C.getCuePoints()),y.m!=Ph){b.A(4);break}return u=Re(),o&&"WEBKIT"===u.Ia()&&(n="forced"),S(b,function(e,t,n,i,r,a,o){var s,u,l,c;return D(function(d){if(1==d.g)return"text/vtt"!=r||o.length?S(d,Zd(e,t,e.H,e.g.streaming.retryParameters),3):d.A(2);2!=d.g&&(s=d.h,u=eh(e,s,r,o),l=new Blob([u],{type:"text/vtt"}),t=gu(l),r="text/vtt"),c=document.createElement("track");var h=e.K,p=t;try{if(h.g.enabled){var f=td(h);f.ot=dd,f.su=!0;var g=ad(p,rd(f))}else g=p}catch(e){J("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),g=p}return c.src=g,c.label=a,c.kind=i,c.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(c),e.vg.push(c),d.return(c)})}(y,e,t,n,i,a||"",s),5);case 5:if((l=b.h).track)return hh(y),b.return(dr(l.track));throw new Ce(1,2,2012);case 4:if(c=rt,d=y.xa(),h=d.end-d.start,y.i&&(h=y.i.presentationTimeline.getDuration()),1/0==h)throw new Ce(1,4,4033);if(!s.length){b.A(6);break}return S(b,Zd(y,e,y.H,y.g.streaming.retryParameters),7);case 7:p=b.h,f=eh(y,p,i,s),g=new Blob([f],{type:"text/vtt"}),e=gu(g),i="text/vtt";case 6:if(m={id:y.Me++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ku(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.gb,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ki(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},v=ki(m.mimeType,m.codecs),!Fi(v))throw new Ce(2,2,2014,i);return y.i.textStreams.push(m),hh(y),b.return(ur(m))}})},r.Ye=function(e,t){var n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w=this;return D(function(A){switch(A.g){case 1:if(w.m!=Rh&&w.m!=Ph)throw new Ce(1,7,7004);if(t){A.A(2);break}return S(A,$d(w,e),3);case 3:t=A.h;case 2:if("text/vtt"!=t)throw new Ce(1,2,2017,e);if(n=rt,i=w.xa(),r=i.end-i.start,w.i&&(r=w.i.presentationTimeline.getDuration()),1/0==r)throw new Ce(1,4,4045);return S(A,Zd(w,e,w.H,w.g.streaming.retryParameters),4);case 4:if(a=A.h,!(o=Bi(t)))throw new Ce(2,2,2014,t);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=Ee(a),d=s.parseMedia(l,u,e,[]),h=[],p=c(d),f=p.next(),g={};!f.done;g={ng:void 0,vd:void 0},f=p.next())g.vd=f.value,g.ng=null,m=function(t){return function(){return null==t.ng&&(t.ng=Qe([e],[t.vd.payload])),t.ng||[]}}(g),v=new $o(g.vd.startTime,g.vd.endTime,m,0,null,null,0,0,1/0),g.vd.payload.includes("#xywh")&&(4===(y=g.vd.payload.split("#xywh=")[1].split(",")).length&&v.dg({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),h.push(v);if(b=t,!h.length){A.A(5);break}return S(A,Mc(h[0].S()[0],w.H,w.g.manifest.retryParameters),6);case 6:b=A.h;case 5:return T={id:w.Me++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hu(h),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.qg,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([ki(b||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},w.m==Ph?w.Re.push(T):w.i.imageStreams.push(T),hh(w),A.return(lr(T))}})},r.Xe=function(e,t,n){var i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b=this;return D(function(T){switch(T.g){case 1:if(b.m!=Rh&&b.m!=Ph)throw new Ce(1,7,7004);if(n){T.A(2);break}return S(T,$d(b,e),3);case 3:n=T.h;case 2:if(i=rt,r=b.xa(),a=r.end-r.start,b.i&&(a=b.i.presentationTimeline.getDuration()),1/0==a)throw new Ce(1,4,4054);return S(T,Zd(b,e,b.H,b.g.streaming.retryParameters),4);case 4:if(o=T.h,!(s=Bi(n)))throw new Ce(2,2,2014,n);for(u=s(),l={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},d=Ee(o),h=u.parseMedia(d,l,e,[]),p=[],f=c(h),g=f.next(),m={};!g.done;m={jf:void 0},g=f.next())m.jf=g.value,v=new $o(m.jf.startTime,m.jf.endTime,function(e){return function(){return[e.jf.payload]}}(m),0,null,null,0,0,1/0),p.push(v);return y={id:b.Me++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hu(p),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.gb,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ki("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},b.Ya.push(y),hh(b),T.return(ur(y))}})},r.jm=function(e,t){this.oa.width=e,this.oa.height=t},r.Oh=function(e){if(this.m==Rh){var t=this.l;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.C)t=!1;else{for(var n=c(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).fe||i.Za||i.Db||(i.fe=!1,Ul(t,i,e));t=!0}}else t=!1;return t},r.ih=function(){return Y("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."),this.i},r.Ok=function(){return this.yc},r.Gk=function(){var e={video:null,audio:null,text:null};if(this.m!=Rh)return e;for(var t=this.l.s,n=this.h.currentTime,i=(t=c([t.video,t.audio,this.l.B])).next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r={codecs:(r=i.segmentIndex.get(r)).codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},"video"==i.type?(r.width=i.width,r.height=i.height,e.video=r):"audio"==i.type?e.audio=r:i.type==it&&(e.text=r)}return e},r.Zh=function(e){this.Ne=e},r.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===Mh||!navigator.onLine||0==t||!this.i)return!1;if(this.i.variants.some(function(t){var n=t[e.type];return!(!n||n.id===e.id||t.disabledUntilTime)&&("audio"!=e.type||e.language===n.language)})){for(var n=!1,i=!1,r=c(this.i.variants),a=r.next();!a.done;a=r.next()){var o=(a=a.value)[e.type];o&&(o.id===e.id?(a.disabledUntilTime=Date.now()/1e3+t,n=!0):o.trickModeVideo&&o.trickModeVideo.id==e.id&&(i=!0))}return!(!n&&i)&&(this.Oe.ya(1),t=this.Qb().video.reduce(function(e,t){return e+t.end-t.start}
1,0),uh(this,!1,t,!0,!1),!0)}return!1},r.addFont=function(t,n){return function(t,n){var i,r,a,o,s;return D(function(u){if(1==u.g)return"fonts"in document&&"FontFace"in e?S(u,document.fonts.ready,2):u.return();if(!("entries"in document.fonts))return u.return();for(i=function(e){for(var t=[],n=(e=e.entries()).next();!1===n.done;)t.push(n.value),n=e.next();return t},r=c(i(document.fonts)),a=r.next();!a.done;a=r.next())if((o=a.value).family===t&&"swap"===o.display)return u.return();s=new FontFace(t,"url("+n+")",{display:"swap"}),document.fonts.add(s),w(u)})}(t,n)},r.Ca=function(){return!(!this.h||!this.h.remote)&&"disconnected"!=this.h.remote.state},r.isEnded=function(){return!(this.h&&!this.h.ended)||this.Y&&!this.T()&&this.h.currentTime>=this.xa().end},H("shaka.Player",kd),kd.prototype.isEnded=kd.prototype.isEnded,kd.prototype.isRemotePlayback=kd.prototype.Ca,kd.prototype.addFont=kd.prototype.addFont,kd.prototype.setVideoContainer=kd.prototype.Zh,kd.prototype.getFetchedPlaybackInfo=kd.prototype.Gk,kd.prototype.getManifestParserFactory=kd.prototype.Ok,kd.prototype.getManifest=kd.prototype.ih,kd.prototype.retryStreaming=kd.prototype.Oh,kd.prototype.setMaxHardwareResolution=kd.prototype.jm,kd.prototype.addChaptersTrack=kd.prototype.Xe,kd.prototype.addThumbnailsTrack=kd.prototype.Ye,kd.prototype.addTextTrackAsync=kd.prototype.Ud,kd.prototype.getStats=kd.prototype.getStats,kd.prototype.getBufferedInfo=kd.prototype.Qb,kd.prototype.getSegmentAvailabilityDuration=kd.prototype.rf,kd.prototype.getPresentationStartTimeAsDate=kd.prototype.kh,kd.prototype.getPlayheadTimeAsDate=kd.prototype.Sk,kd.prototype.setTextTrackVisibility=kd.prototype.Ae,kd.prototype.getChaptersAsync=kd.prototype.fh,kd.prototype.getChapters=kd.prototype.wk,kd.prototype.getChaptersTracks=kd.prototype.xk,kd.prototype.isTextTrackVisible=kd.prototype.fd,kd.prototype.selectVariantsByLabel=kd.prototype.dm,kd.prototype.selectTextLanguage=kd.prototype.Sh,kd.prototype.selectAudioLanguage=kd.prototype.yj,kd.prototype.getTextLanguages=kd.prototype.Zk,kd.prototype.getAudioLanguages=kd.prototype.qk,kd.prototype.getTextLanguagesAndRoles=kd.prototype.$k,kd.prototype.getAudioLanguagesAndRoles=kd.prototype.rk,kd.prototype.getVideoTracks=kd.prototype.getVideoTracks,kd.prototype.selectVideoTrack=kd.prototype.Aj,kd.prototype.getAudioTracks=kd.prototype.getAudioTracks,kd.prototype.selectAudioTrack=kd.prototype.zj,kd.prototype.selectVariantTrack=kd.prototype.ye,kd.prototype.selectTextTrack=kd.prototype.$f,kd.prototype.getThumbnails=kd.prototype.Si,kd.prototype.getAllThumbnails=kd.prototype.pk,kd.prototype.getImageTracks=kd.prototype.hh,kd.prototype.getTextTracks=kd.prototype.rc,kd.prototype.getVariantTracks=kd.prototype.qb,kd.prototype.cancelTrickPlay=kd.prototype.td,kd.prototype.trickPlay=kd.prototype.Sc,kd.prototype.useTrickPlayTrackIfAvailable=kd.prototype.oi,kd.prototype.getPlaybackRate=kd.prototype.Xa,kd.prototype.isBuffering=kd.prototype.xf,kd.prototype.getKeyStatuses=kd.prototype.nf,kd.prototype.getActiveSessionsMetadata=kd.prototype.eh,kd.prototype.getExpiration=kd.prototype.be,kd.prototype.drmInfo=kd.prototype.drmInfo,kd.prototype.keySystem=kd.prototype.keySystem,kd.prototype.isFullyLoaded=kd.prototype.vl,kd.prototype.goToLive=kd.prototype.ol,kd.prototype.seekRange=kd.prototype.xa,kd.prototype.isVideoOnly=kd.prototype.xh,kd.prototype.isAudioOnly=kd.prototype.Cd,kd.prototype.isInProgress=kd.prototype.ed,kd.prototype.isLive=kd.prototype.T,kd.prototype.getQueueManager=kd.prototype.lh,kd.prototype.getAdManager=kd.prototype.mf,kd.prototype.getAssetUri=kd.prototype.zd,kd.prototype.getNetworkingEngine=kd.prototype.Ib,kd.prototype.getMediaElement=kd.prototype.Rk,kd.prototype.getManifestType=kd.prototype.jh,kd.prototype.getLoadMode=kd.prototype.Kk,kd.prototype.resetConfiguration=kd.prototype.tj,kd.prototype.getBufferFullness=kd.prototype.Oi,kd.prototype.getNonDefaultConfiguration=kd.prototype.Ri,kd.prototype.getConfigurationForLowLatency=kd.prototype.Ak,kd.prototype.getConfiguration=kd.prototype.getConfiguration,kd.prototype.configurationForLowLatency=kd.prototype.kk,kd.prototype.configure=kd.prototype.configure,kd.prototype.releaseAllMutexes=kd.prototype.Vl,kd.prototype.destroyAllPreloads=kd.prototype.Og,kd.prototype.preload=kd.prototype.preload,kd.prototype.detachAndSavePreload=kd.prototype.Ki,kd.prototype.unloadAndSavePreload=kd.prototype.om,kd.prototype.load=kd.prototype.load,kd.prototype.updateStartTime=kd.prototype.sm,kd.prototype.unload=kd.prototype.lc,kd.prototype.detach=kd.prototype.detach,kd.prototype.attachCanvas=kd.prototype.xi,kd.prototype.attach=kd.prototype.$b,kd.probeSupport=function(t){var n,i,r,a,o;return t=void 0===t||t,D(function(s){switch(s.g){case 1:if(n={},!t){s.A(2);break}return S(s,function(){var t,n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V;return D(function(G){if(1==G.g){if(t="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(" "),!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)){for(n={},i=c(t),r=i.next();!r.done;r=i.next())a=r.value,n[a]=null;return G.return(n)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),u={"com.widevine.alpha":s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":["150","2000","3000"]},h={videoCapabilities:l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:d=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},p=[null,"cenc","cbcs","cbcs-1-9"],f=new Map,g=Re(),m=function(e,t){var n,i,r,a,s,u,l,d,h,p,m,v,y;return D(function(b){switch(b.g){case 1:return A(b,2),S(b,t.createMediaKeys(),5);case 5:n=b.h;case 4:x(b,3);break;case 2:return k(b),b.return();case 3:if(r=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),g.gj()&&(r=!1),a=t.getConfiguration().videoCapabilities,s=t.getConfiguration().audioCapabilities,u={persistentState:r,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},f.has(e)&&f.get(e)?u=f.get(e):f.set(e,u),(l=a[0].encryptionScheme)&&!u.encryptionSchemes.includes(l)&&u.encryptionSchemes.push(l),(d=a[0].robustness)&&!u.videoRobustnessLevels.includes(d)&&u.videoRobustnessLevels.push(d),(h=s[0].robustness)&&!u.audioRobustnessLevels.includes(h)&&u.audioRobustnessLevels.push(h),"getStatusForPolicy"in n){for(p=[],m=c(o),v=m.next(),y={};!v.done;y={ge:void 0},v=m.next())y.ge=v.value,u.minHdcpVersions.includes(y.ge)||p.push(n.getStatusForPolicy({minHdcpVersion:y.ge}).then(function(e){return function(t){"usable"!=t||u.minHdcpVersions.includes(e.ge)||u.minHdcpVersions.push(e.ge)}}(y)));return S(b,Promise.all(p),0)}b.A(0)}})},v=function(e,t,n,i){var r,a,o,s,u,l,d,p,f,g;return D(function(v){switch(v.g){case 1:for(A(v,2),r=cn(h),a=c(r.videoCapabilities),o=a.next();!o.done;o=a.next())(s=o.value).encryptionScheme=t,s.robustness=n;for(u=c(r.audioCapabilities),l=u.next();!l.done;l=u.next())(d=l.value).encryptionScheme=t,d.robustness=i;return(p=cn(r)).persistentState="required",p.sessionTypes=["persistent-license"],f=[p,r],"MOBILE"==Re().Ja()?S(v,Yi(5,navigator.requestMediaKeySystemAccess(e,f)),7):S(v,navigator.requestMediaKeySystemAccess(e,f),6);case 6:g=v.h,v.A(5);break;case 7:g=v.h;case 5:return S(v,m(e,g),8);case 8:x(v,0);break;case 2:k(v),w(v)}})},y=function(e,t,n,i){var r,a,o;return D(function(s){switch(s.g){case 1:return A(s,2),r={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:d[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:e,video:{encryptionScheme:t,robustness:n},audio:{encryptionScheme:t,robustness:i}}},"MOBILE"==Re().Ja()?S(s,Yi(5,navigator.mediaCapabilities.decodingInfo(r)),7):S(s,navigator.mediaCapabilities.decodingInfo(r),6);case 6:a=s.h,s.A(5);break;case 7:a=s.h;case 5:return o=a.keySystemAccess,S(s,m(e,o),8);case 8:x(s,0);break;case 2:k(s),w(s)}})},b=c(t),T=b.next();!T.done;T=b.next())E=T.value,f.set(E,null);for(I=function(e){return"WEBKIT"!==Re().Ia()||"org.w3.clearkey"!==e},C=[],M=c(p),L=M.next();!L.done;L=M.next())for(R=L.value,P=c(t),N=P.next();!N.done;N=P.next())_=N.value,I(_)&&(C.push(v(_,R,"","")),C.push(y(_,R,"","")));for(O=c(t),U=O.next();!U.done;U=O.next())for(j=U.value,B=c(u[j]||[]),F=B.next();!F.done;F=B.next())V=F.value,I(j)&&(C.push(v(j,null,V,"")),C.push(v(j,null,"",V)),C.push(y(j,null,V,"")),C.push(y(j,null,"",V)));return S(G,Promise.all(C),2)}return G.return(sa(f))})}(),3);case 3:n=s.h;case 2:return i=function(){var e={};if(Re(),Sv())for(var t=c(co.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=c(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=t.next())e[n=n.value]=Sv()?co.has(n):""!=ps().canPlayType(n);return e}(),r=function(){var e='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(d(Oi)),t={};Re();for(var n=(e=c(e)).next();!n.done;n=e.next()){Fi(n=n.value)?t[n]=!0:t[n]=Sv()?Ut(n)||!!bi(n):""!=ps().canPlayType(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}(),S(s,Re().nc(),4);case 4:return a=s.h,o={manifest:i,media:r,drm:n,hardwareResolution:a}
1,Nh.forEach(function(e,t){o[t]=e()}),s.return(o)}})},kd.isBrowserSupported=Ld,kd.setQueueManagerFactory=function(e){Oh=e},kd.setAdManagerFactory=function(e){_h=e},kd.registerSupportPlugin=Md,kd.prototype.destroy=kd.prototype.destroy;var Mh=0,Lh=1,Rh=2,Ph=3;kd.LoadMode={DESTROYED:Mh,NOT_LOADED:Lh,MEDIA_SOURCE:Rh,SRC_EQUALS:Ph},kd.version="v4.15.3";var Dh=["4","15"];Pt=new function(e){this.g=e,this.i=Lt,this.h=Rt}(new Ct(Number(Dh[0]),Number(Dh[1])));var Nh=new Map,_h=null,Oh=null;function Uh(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function jh(e){return e.g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0}function Bh(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new xt,this.l.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function Fh(){}function Vh(e,t){for(var n=[],i=(e=c(yn(e,"Ad"))).next();!i.done;i=e.next())if((i=wn(i.value,"InLine"))&&(i=wn(i,"Creatives")))for(var r=(i=c(yn(i,"Creative"))).next();!r.done;r=i.next()){var a=wn(r=r.value,"Linear");if(a&&Gh(n,t,a),r=wn(r,"NonLinearAds"))for(var o=(r=c(r=yn(r,"NonLinear"))).next();!o.done;o=r.next())e:{a=n;var s=t,u=o.value,l=wn(u,"StaticResource");if(l)o=l.attributes.creativeType;else{if(!(l=wn(u,"HTMLResource")))break e;o="text/html"}if(l=Tn(l)){"text/html"===o&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var d=En(u,"width",Rn)||En(u,"expandedWidth",Rn),h=En(u,"height",Rn)||En(u,"expandedHeight",Rn);if(d||h){var p=null;(u=u.attributes.minSuggestedDuration)&&(p=un(u)),u=0,null!=s&&(u=s),a.push({id:null,groupId:null,startTime:u,endTime:null,uri:l,mimeType:o,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:p,once:!0,pre:null==s,post:1/0==s,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:d||0,y:h||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}return n}function Gh(e,t,n){var i=0;null!=t&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=un(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=wn(n,"MediaFiles")){var a=yn(n,"MediaFile");for(n=a,(a=a.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(n=a),n=n.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}),a=(n=c(n)).next();!a.done;a=n.next())if(!(a=a.value).attributes.apiFramework){var o=Tn(a);if(o){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:o,mimeType:a.attributes.type||null,isSkippable:null!=r,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:1/0==t,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}function Hh(t,n,i,r,a){var o=this;this.u=t,this.i=n,this.F=!1,this.B=this.s=null,this.G=NaN,this.l=a,this.j=null,this.h=new xt,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.15.3"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.o(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){!function(t,n){if(t.l(new z("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),t.s.customPlayheadTracker){var i={currentTime:t.i.currentTime};t.g=n.getAdsManager(i,t.C),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.o(t.i,"timeupdate",function(){t.i.duration&&(i.currentTime=t.i.currentTime)}),t.h.o(t.i,"volumechange",function(){t.j&&(t.j.setVolume(t.i.volume),t.i.muted&&t.j.setMuted(!0))})}else t.g=n.getAdsManager(t.i,t.C);t.l(new z("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[];for(var a=(r=c(r)).next();!a.done;a=r.next())n.push({start:a.value,end:null});t.l(new z("ad-cue-points-changed",(new Map).set("cuepoints",n)))}!function(e){function t(t,n){t=(new Map).set("originalEvent",t),e.l(new z(n,t))}e.h.o(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(t){zh(e,t)}),e.h.o(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(t){Kh(e,t)}),e.h.o(e.g,google.ima.AdEvent.Type.STARTED,function(t){Kh(e,t)}),e.h.o(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){t(e,"ad-first-quartile")}),e.h.o(e.g,google.ima.AdEvent.Type.MIDPOINT,function(e){t(e,"ad-midpoint")}),e.h.o(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){t(e,"ad-third-quartile")}),e.h.o(e.g,google.ima.AdEvent.Type.COMPLETE,function(e){t(e,"ad-complete")}
1),e.h.o(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(t){Wh(e,t)}),e.h.o(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(t){Wh(e,t)}),e.h.o(e.g,google.ima.AdEvent.Type.SKIPPED,function(e){t(e,"ad-skipped")}),e.h.o(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){t(e,"ad-volume-changed")}),e.h.o(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){t(e,"ad-muted")}),e.h.o(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.o(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.o(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.o(e.g,google.ima.AdEvent.Type.CLICK,function(e){t(e,"ad-clicked")}),e.h.o(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){t(e,"ad-progress")}),e.h.o(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){t(e,"ad-buffering")}),e.h.o(e.g,google.ima.AdEvent.Type.IMPRESSION,function(e){t(e,"ad-impression")}),e.h.o(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){t(e,"ad-duration-changed")}),e.h.o(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){t(e,"ad-closed")}),e.h.o(e.g,google.ima.AdEvent.Type.LOADED,function(e){t(e,"ad-loaded")}),e.h.o(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){t(e,"all-ads-completed")}),e.h.o(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){t(e,"ad-linear-changed")}),e.h.o(e.g,google.ima.AdEvent.Type.AD_METADATA,function(e){t(e,"ad-metadata")}),e.h.o(e.g,google.ima.AdEvent.Type.LOG,function(e){t(e,"ad-recoverable-error")}),e.h.o(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){t(e,"ad-break-ready")}),e.h.o(e.g,google.ima.AdEvent.Type.INTERACTION,function(e){t(e,"ad-interaction")})}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight),t.h.o(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),"ResizeObserver"in e?(t.B=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.B.observe(t.i)):t.h.o(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.F||t.s.skipPlayDetection?t.g.start():t.h.qa(t.i,"play",function(){t.F=!0,t.g.start()})}catch(e){Wh(t,null)}}(o,t)}),this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){zh(o,e)}),this.h.o(this.i,"ended",function(){o.m.contentComplete()}),this.h.qa(this.i,"play",function(){o.F=!0})}function zh(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new z("ad-error",t)),Wh(e,null),e.l(new z("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Kh(e,t){var n=t.getAd();n?(e.j=new Bh(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.s.supportsMultipleMediaElements||e.l(new z("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new z("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.s.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Y("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Wh(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.s.supportsMultipleMediaElements&&e.l(new z("ad-content-resume-requested")),e.l(new z("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.s.customPlayheadTracker||e.i.ended||e.i.play())}function qh(e,t,n,i,r,a){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.s=i,this.m=r,this.u=a,this.C=t.overlay}function Xh(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function Yh(e,t,n,i){var r=this;this.L=null,this.C=e,this.D=t,this.g=n,this.G=null,this.B=!0,this.h=this.g,this.i=i,this.R=new Set,this.H=new Set,this.F=new Map,this.K=new Map,this.j=new kd,ap(this),this.I=new xt,this.l=new xt,this.J=!1,this.Z=this.s=this.u=this.m=null,this.$=!1,this.O=-1,this.Y=function(){if(!r.J&&r.m&&!r.D.Ca()){r.m=r.g.currentTime;var e=ep(r);e&&tp(r,e,1,1,Date.now())}},this.U=function(){if(!(r.J||r.m||r.D.Ca())){r.m=r.g.currentTime;var e=ep(r,!0);e&&tp(r,e,1,1,Date.now())}},this.ba=function(){if(!r.J&&r.m&&!r.D.Ca()){var e=r.g.currentTime;r.u&&!r.u.pre&&!r.u.post&&e<(r.u.endTime||r.u.startTime)&&(r.u=null)}},this.P=new Ki(this.Y),this.N=new Ki(function(){var e,t,n,i,a,o,s,u,l,d,h;return D(function(p){switch(p.g){case 1:if(!r.H.size||null==r.m){p.A(0);break}if((e=r.D.m)==Mh||e==Lh)return p.return();t=!1,n=Array.from(r.H),i=r.D.xa(),a=c(n),o=a.next();case 3:if(o.done){p.A(5);break}if((s=o.value)==r.u){p.A(4);break}if(u=s.endTime||s.startTime,!(1<=i.start-u)){0<(l=s.startTime-r.m)&&
110>=l&&(!r.F.has(s)&&sp(s)&&r.F.set(s,r.j.preload(s.uri,null,s.mimeType||void 0)),lp(r,s)),p.A(4);break}if(!r.F.has(s)){p.A(7);break}return S(p,r.F.get(s),8);case 8:(d=p.h)&&d.destroy(),r.F.delete(s);case 7:cp(r,s),h=JSON.stringify(s),r.R.has(h)&&r.R.delete(h),r.H.delete(s),Jh(r),s.overlay||(t=!0);case 4:o=a.next(),p.A(3);break;case 5:t&&rp(r),w(p)}})}),this.configure(this.D.getConfiguration().ads)}function Jh(e){e.$&&!e.H.size&&(e.I.Da(e.g,"playing",e.U),e.I.Da(e.g,"timeupdate",e.U),e.I.Da(e.g,"seeked",e.ba),e.I.Da(e.g,"ended",e.Y),-1!=e.O&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.N&&e.N.stop(),e.$=!1)}function Qh(e){if(e.C&&e.L&&!e.J){var t=e.L.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.G&&(e.G.parentElement&&e.C.removeChild(e.G),e.G=null)):(e.G||((t=document.createElement(e.g.tagName)).autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.G=t),e.h=e.G))}else e.B=!0}function $h(e,t){var n;D(function(i){if(1==i.g)return ap(e),S(i,function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,T,w,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,z,K,W,q;return D(function(D){switch(D.g){case 1:if(n=[],!t)return D.return(n);if(i=t.values.find(function(e){return"X-ASSET-URI"==e.key}),r=t.values.find(function(e){return"X-ASSET-LIST"==e.key}),!i&&!r)return D.return(n);if(a=null,(o=t.values.find(function(e){return"ID"==e.key}))&&(a=o.data),s=null==a?Math.floor(10*t.startTime)/10:t.startTime,(u=t.endTime)&&1/0!=t.endTime&&"number"==typeof t.endTime&&(u=null==a?Math.floor(10*t.endTime)/10:t.endTime),l=t.values.find(function(e){return"X-RESTRICT"==e.key}),d=c=!0,l&&l.data&&(h=l.data,c=!h.includes("SKIP"),d=!h.includes("JUMP")),p=c?0:null,(f=t.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&(g=f.data,p=parseFloat(g),isNaN(p)&&(p=c?0:null)),m=null,(v=t.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(y=v.data,m=parseFloat(y),isNaN(p)&&(m=null)),b=null,(T=t.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&(w=T.data,b=parseFloat(w),isNaN(b)&&(b=null)),E=null,(I=t.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&(C=I.data,E=parseFloat(C),isNaN(E)&&(E=null)),R=L=M=!1,(P=t.values.find(function(e){return"CUE"==e.key}))&&(N=P.data,M=N.includes("ONCE"),L=N.includes("PRE"),R=N.includes("POST")),_=!1,(O=t.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?(U=O.data,_=U.includes("RANGE")):!T&&e.D.T()&&(_=!L&&!R),i){if(!(j=i.data))return D.return(n);n.push({id:a,groupId:null,startTime:s,endTime:u,uri:j,mimeType:null,isSkippable:c,skipOffset:p,skipFor:m,canJump:d,resumeOffset:b,playoutLimit:E,once:M,pre:L,post:R,timelineRange:_,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),D.A(2);break}if(!r){D.A(2);break}return(B=r.data)?(A(D,4),S(D,op(e,B,{type:11}),6)):D.return(n);case 6:for(F=D.h,V=Oe(F),G=JSON.parse(V),(H=G["SKIP-CONTROL"])&&("number"==typeof(z=H["ENABLE-SKIP-AFTER"])&&(p=parseFloat(z),isNaN(z)&&(p=c?0:null)),"number"==typeof(K=H["ENABLE-SKIP-FOR"])&&(m=parseFloat(K),isNaN(K)&&(m=null))),W=0;W<G.ASSETS.length;W++)(q=G.ASSETS[W]).URI&&n.push({id:a+"_shaka_asset_"+W,groupId:a,startTime:s,endTime:u,uri:q.URI,mimeType:null,isSkippable:c,skipOffset:p,skipFor:m,canJump:d,resumeOffset:b,playoutLimit:E,once:M,pre:L,post:R,timelineRange:_,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});x(D,2);break;case 4:k(D);case 2:return D.return(n)}})}(e,t),2);(n=i.h).length?Zh(e,n):Y("Unsupported HLS interstitial",t),w(i)})}function Zh(e,t){var n,i,r,a,o,s,u,l;D(function(d){switch(d.g){case 1:n=!1,i=c(t),r=i.next();case 2:if(r.done){d.A(4);break}if(!(a=r.value).uri){Y("Missing URL in interstitial",a),d.A(3);break}if(a.mimeType){d.A(5);break}return A(d,6),o=e.j.Ib(),S(d,Mc(a.uri,o,e.D.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=d.h,x(d,5);break;case 6:k(d);case 5:if(s=a.id||JSON.stringify(a),e.R.has(s)){d.A(3);break}a.loop&&!a.overlay&&Y("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.R.add(s),e.H.add(a),u=!1,a.pre&&null==e.m?u=!0:0!=a.startTime||a.canJump?null!=e.m&&(0<(l=a.startTime-e.m)&&10>=l&&(u=!0)):u=!0,u&&(!e.F.has(a)&&sp(a)&&e.F.set(a,e.j.preload(a.uri,null,a.mimeType||void 0)),lp(e,a));case 3:r=i.next(),d.A(2);break;case 4:n&&rp(e),function(e){if(!e.$&&e.H.size){if(e.I.o(e.g,"playing",e.U),e.I.o(e.g,"timeupdate",e.U),e.I.o(e.g,"seeked",e.ba),e.I.o(e.g,"ended",e.Y),"requestVideoFrameCallback"in e.g&&!up()){var t=e.g,n=function(){-1!=e.O&&(e.Y(),-1!=e.O&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ya(.025);e.N&&e.N.ya(1),e.$=!0}}(e),w(d)}})}function ep(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.H.size&&null!=e.m){var a=e.g.ended,o=Array.from(e.H).sort(function(e,t){return t.startTime-e.startTime}),s=o;for(s=t?o.filter(function(e){return e.pre}):a?o.filter(function(e){return e.post}):o.filter(function(e){return!e.pre&&!e.post}),s=(o=c(s)).next();!s.done;s=o.next()){s=s.value;var u=!1;if(t)u=s.pre;else if(a)u=s.post;else if(!s.pre&&!s.post){var l=e.m-Math.round(1e3*s.startTime)/1e3,d=1;
1e.L.allowStartInMiddleOfInterstitial&&s.endTime&&1/0!=s.endTime&&(d=s.endTime-s.startTime),0<l&&(l<=d||!s.canJump)&&(u=!(null==n&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=s.startTime))}u&&(!e.u||s.startTime>=e.u.startTime)&&(i==(n||0)?r=s:r&&!s.canJump&&.001<Math.round(1e3*s.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=s,i=0),i++)}}return r}function tp(e,t,n,i,r,a){a=void 0===a?0:a,e.u=t,Qh(e),e.B||!e.C||e.h.parentElement||e.C.appendChild(e.h),1==i&&1==n&&(n=Array.from(e.H).filter(function(e){return t.pre?e.pre==t.pre:t.post?e.post==t.post:.001>Math.abs(e.startTime-t.startTime)}).length),t.once&&(a++,e.H.delete(t),Jh(e),t.overlay||rp(e)),t.mimeType&&(t.mimeType.startsWith("image/")||"text/html"===t.mimeType)?t.overlay?function(e,t,n,i,r){function a(){e.s&&(e.s.stop(),e.s=null),e.C.removeChild(u),ip(e,t),e.i(new z("ad-stopped")),e.l.Sa();var a=ep(e,t.pre,i-r);a?tp(e,a,n,++i,Date.now(),r):e.J=!1}e.J=!0;var o=t.overlay,s="text/html"==t.mimeType?"iframe":"img",u=document.createElement(s);u.style.objectFit="contain",u.style.position="absolute",u.style.border="none",np(e,t),e.i(new z("ad-started",(new Map).set("ad",new Xh(t,n,i)))),"iframe"==s?u.src=t.uri:(u.src=t.uri,u.onerror=function(t){e.i(new z("ad-error",(new Map).set("originalEvent",t))),a()});var l=o.viewport,c=o.topLeft;o=o.size,0==l.x&&0==l.y?(u.width=t.overlay.size.x,u.height=t.overlay.size.y,u.style.bottom="10%",u.style.left="0",u.style.right="0",u.style.width="100%",t.overlay.size.y||"iframe"!=s||(u.style.height="auto")):(u.style.height=o.y/l.y*100+"%",u.style.left=c.x/l.x*100+"%",u.style.top=c.y/l.y*100+"%",u.style.width=o.x/l.x*100+"%"),e.C.appendChild(u);var d=Date.now();e.s&&e.s.stop(),e.s=new Ki(function(){t.playoutLimit&&(Date.now()-d)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(e.i(new z("ad-complete")),a()):e.g.currentTime<t.startTime&&(e.i(new z("ad-skipped")),a())}),t.playoutLimit&&!t.endTime?e.s.X(t.playoutLimit):t.endTime&&e.s.ya(.025),e.l.o(e.g,"seeked",function(){var n=e.g.currentTime;(n<t.startTime||t.endTime&&n>t.endTime)&&(e.s&&e.s.stop(),e.i(new z("ad-skipped")),a())})}(e,t,n,i,a):Y("Unsupported interstitial",t):e.B&&t.overlay?Y("Unsupported interstitial",t):function(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,b,T,E,I,C,M,L;D(function(R){switch(R.g){case 1:if(o=Date.now(),e.J=!0,!e.B||1!=i){R.A(2);break}return e.i(new z("ad-content-pause-requested",(new Map).set("saveLivePosition",!0))),s=new jr,u=function(t){return D(function(n){if(1==n.g)return"detach"!=t.state?n.A(0):up()?S(n,new Promise(function(e){return new Ki(e).X(.1)}),3):n.A(3);s.resolve(),e.l.Da(e.D,"onstatechange",u),w(n)})},e.l.o(e.D,"onstatechange",u),S(R,s,2);case 2:return np(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,l=t.overlay.viewport,c=t.overlay.topLeft,d=t.overlay.size,e.h.style.height=d.y/l.y*100+"%",e.h.style.left=c.x/l.x*100+"%",e.h.style.top=c.y/l.y*100+"%",e.h.style.width=d.x/l.x*100+"%"):(e.g.pause(),null!=t.resumeOffset&&0!=t.resumeOffset&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),h=!1,p=function(){if(!e.B&&!t.overlay&&null==t.resumeOffset)if(t.timelineRange&&t.endTime&&1/0!=t.endTime)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var n=Date.now();e.g.currentTime+=(n-r)/1e3,r=n}},f=function(o){var s,u;return D(function(l){if(1==l.g){if(p(),s=ep(e,t.pre,i-a),o&&t.groupId)for(;s&&s.groupId==t.groupId;)i++,s=ep(e,t.pre,i-a);return e.s&&(!t.groupId||s&&s.groupId!=t.groupId)&&(e.s.stop(),e.s=null),ip(e,t),s&&!s.overlay?l.A(2):(t.post&&(e.m=null,e.u=null),e.B?S(l,e.j.detach(),4):S(l,e.j.lc(),4))}2!=l.g&&(e.B&&(null==(u=t.resumeOffset)&&(u=t.timelineRange&&t.endTime&&1/0!=t.endTime?t.endTime-(e.m||0):(Date.now()-r)/1e3),e.i(new z("ad-content-resume-requested",(new Map).set("offset",u)))),e.i(new z("ad-stopped")),e.l.Sa(),e.J=!1,e.B?rp(e):(e.h.style.display="none",p(),e.g.ended||e.g.play())),Qh(e),s&&(e.i(new z("ad-stopped")),e.l.Sa(),tp(e,s,n,++i,r,a)),w(l)})},g=function(t){return D(function(n){return h?n.return():(h=!0,e.i(new z("ad-error",(new Map).set("originalEvent",t))),S(n,f(!1),0))})},m=function(){return D(function(t){if(1==t.g)return h?t.return():(h=!0,S(t,f(!1),2));e.i(new z("ad-complete")),w(t)})},e.Z=function(){return D(function(t){return h?t.return():(h=!0,e.i(new z("ad-skipped")),S(t,f(!0),0))})},v=new qh(e.h,t,e.Z,n,i,!e.B),e.B||(v.setMuted(e.g.muted),v.setVolume(e.g.volume)),e.i(new z("ad-started",(new Map).set("ad",v))),(y=v.canSkipNow())&&e.i(new z("ad-skip-state-changed")),e.l.qa(e.j,"error",g),e.l.o(e.h,"timeupdate",function(){if(e.h.duration){var t=v.canSkipNow();y!=t&&0<v.getRemainingTime()&&0<v.getDuration()&&e.i(new z("ad-skip-state-changed")),y=t}}),e.l.qa(e.j,"firstquartile",function(){p(),e.i(new z("ad-first-quartile"))}),e.l.qa(e.j,"midpoint",function(){p(),e.i(new z("ad-midpoint"))}),e.l.qa(e.j,"thirdquartile",function(){p(),e.i(new z("ad-third-quartile"))}),e.l.qa(e.j,"complete",m),e.l.o(e.h,"play",function(){e.i(new z("ad-resumed"))}),e.l.o(e.h,"pause",function(){var t=e.j.getConfiguration();e.h.currentTime>=t.playRangeEnd?m():e.i(new z("ad-paused"))}),e.l.o(e.h,"volumechange",function(){e.h.muted?e.i(new z("ad-muted")):e.i(new z("ad-volume-changed"))}),A(R,4),ap(e),t.startTime&&t.endTime&&1/0!=t.endTime&&t.startTime!=t.endTime&&(0<(b=t.endTime-t.startTime)&&e.j.configure("playRangeEnd",b)),t.playoutLimit&&!e.s&&(e.s=new Ki(function(){e.Z()}).X(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),S(R,e.j.$b(e.h),6);case 6:return T=null,e.L.allowStartInMiddleOfInterstitial&&null!=e.m&&(E=e.m-t.startTime,.25<Math.abs(E)&&(T=E)),e.F.has(t)?S(R,e.F.get(t),10):S(R,e.j.load(t.uri,T,t.mimeType||void 0),8);case 10:return I=R.h,e.F.delete(t),S(R,I?e.j.load(I):e.j.load(t.uri,T,t.mimeType||void 0),8);case 8:e.h.play(),C=(Date.now()-o)/1e3,e.i(new z("ads-loaded",(new Map).set("loadTime",C))),e.B&&e.g.play(),t.overlay&&(M=function(){var n=e.g.currentTime-t.startTime;.1<Math.abs(n-e.h.currentTime)&&(e.h.currentTime=n)},e.l.qa(e.h,"playing",M),e.l.o(e.g,"seeking",M),e.l.o(e.g,"seeked",function(){var n=e.g.currentTime;(n<t.startTime||t.endTime&&n>t.endTime)&&e.Z()})),x(R,0);break;case 4:if(L=k(R),!e.J)return R.return();g(L),w(R)}})}(e,t,n,i,r,a)}
1function np(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),null!=t.currentVideo){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],a=n.topLeft.x/n.viewport.x*100;0<a&&100>=a&&(r.push("translateX("+a+"%)"),i=!1),0<(a=n.topLeft.y/n.viewport.y*100)&&100>=a&&(r.push("translateY("+a+"%)"),i=!1),1>(a=n.size.x/n.viewport.x)&&r.push("scaleX("+a+")"),n=n.size.y/n.viewport.y,1>a&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.C&&(e.C.style.pointerEvents="none",t.background&&(e.C.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function ip(e,t){t&&!t.displayOnBackground||(e.g.style.zIndex=""),t&&null==t.currentVideo||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.C&&(e.C.style.pointerEvents="",!t||t.background)&&(e.C.style.background=""),e.G&&(e.G.style.background="")}function rp(e){for(var t=[],n=c(e.H),i=n.next(),r={};!i.done;r={Bc:void 0},i=n.next())(i=i.value).overlay||(r.Bc={start:i.startTime,end:null},i.pre?(r.Bc.start=0,r.Bc.end=null):i.post?(r.Bc.start=-1,r.Bc.end=null):i.timelineRange&&(r.Bc.end=i.endTime),t.find(function(e){return function(t){return e.Bc.start==t.start&&e.Bc.end==t.end}}(r))||t.push(r.Bc));e.i(new z("ad-cue-points-changed",(new Map).set("cuepoints",t)))}function ap(e){e.j.configure(e.D.Ri()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),Yr(e.D.Ib(),e.j.Ib())}function op(e,t,n){var i,r;return D(function(a){return 1==a.g?(i=Jr([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),S(a,e.D.Ib().request(7,i,n).promise,2)):(r=a.h,a.return(r.data))})}function sp(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function up(){var e=Re().Ja();return"TV"==e||"CONSOLE"==e||"CAST"==e}function lp(e,t){if(!(e.K.has(t)||e.L&&!e.L.allowPreloadOnDomElements)){var n=function(e){var t=document.createElement("link");return t.rel="preload",t.href=e,t.as="image",document.head.appendChild(t),t},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.K.set(t,i)}}function cp(e,t){if(e.K.has(t)){for(var n=e.K.get(t),i=(n=c(n)).next();!i.done;i=n.next())(i=i.value).parentNode.removeChild(i);e.K.delete(t)}}function dp(e,t,n,i,r){this.h=e,this.j=un(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.s=i,this.m=!1}function hp(e,t,n,i){this.C=e,this.J=t,this.h=n,this.l=null,this.O=NaN,this.i=i,this.I=!1,this.B=null,this.j=[],this.L=[],this.K=this.D=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.N=!0,this.H="",this.s=new xt}function pp(e,t){var n,i,r,a,o,s,u,l;D(function(c){return 1==c.g?t.staticResource?(n=fp(t),e.F.get(n)?c.return():(i={type:9},r=Jr([t.staticResource],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),a=e.J.request(7,r,i),A(c,2),e.F.set(n,[]),S(c,a.promise,4))):c.return():2!=c.g?(o=c.h,s=Oe(o.data),u=JSON.parse(s),l=u.apps,e.F.set(n,l),x(c,0)):(k(c),e.F.delete(n),void w(c))})}function fp(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function gp(e){var t=e.h.currentTime;if(0!=t&&null==e.B){for(var n,i,r=c(e.j),a=r.next();!a.done;a=r.next())for(var o=c((a=a.value).ads),s=o.next();!s.done;s=o.next())if(s=s.value,i){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=s,n=a;break}}else s.startTimeInSeconds<t&&(i=s,n=a);n&&i&&!e.L.includes(i.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function mp(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.D,r=i.startTimeInSeconds+.5*i.durationInSeconds,a=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),bp(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),bp(e,"midpoint")):t>=a&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),bp(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&bp(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&vp(e)}if(!e.g||!e.g.isLinear()){e:for(i=c(e.j),r=i.next();!r.done&&(r=r.value,!e.g||!e.g.isLinear());r=i.next())for(a=0;a<r.ads.length;a++){var o=r.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.L.includes(o.adId)){if(e.h.ended)continue;e.h.currentTime=s;break e}vp(e),e.K=r,e.g=new dp(o,a+1,r.ads.length,!0,e.h),e.D=o,0===a&&bp(e,"breakStart"),yp(e);break}}if(!e.g)for(r=(i=c(e.j)).next();!r.done&&(r=r.value,!e.g);r=i.next())for(a=0;a<r.nonLinearAdsList.length;a++)if((o=r.nonLinearAdsList[a]).nonLinearAdList.length){s=r.startTimeInSeconds;var u=e.F.get(fp(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){vp(e),s=e;for(var l=(u=c(u)).next();!l.done;l=u.next())if((l=l.value).data.source.length){var d=document.createElement("img");d.src=l.data.source[0].url,d.style.top=(l.placeholder.top||0)+"%",d.style.height=100-(l.placeholder.top||0)+"%",d.style.left=(l.placeholder.left||0)+"%",d.style.maxWidth=100-(l.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.C.appendChild(d)}e.K=r,e.g=new dp(o,a+1,r.ads.length,!1,e.h),e.D=o,0===a&&bp(e,"breakStart"),yp(e);break}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function vp(e){if(e.g){for(;e.C.lastChild;)e.C.removeChild(e.C.firstChild);e.I||e.L.push(e.D.adId);var t=e.g.m;bp(e,void 0!==t&&t?"skip":"complete");for(var n=(t=c(e.m)).next();!n.done;n=t.next())n=n.value,e.s.Da(n.target,n.type,n.listener);e.m=[],e.u=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&bp(e,"breakEnd"),e.g=null,e.D=null,e.K=null}}function yp(e){var t=!1;e.h.paused?t=!0:(bp(e,"impression"),bp(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&bp(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||bp(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(bp(e,"impression"),bp(e,"start"),t=!1):bp(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){bp(e,"pause")}});for(var n=c(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.s.o(i.target,i.type,i.listener)}function bp(e,t){var n=e.D.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.K.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n)for(var i={type:10},r=(n=c(n.beaconUrls)).next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=Jr([r],Ur())).method="POST",e.J.request(7,r,i));switch(t){case"impression":e.i(new z("ad-impression"));break;case"start":e.i(new z("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new z("ad-muted"));break;case"unmute":e.i(new z("ad-volume-changed"));break;case"resume":e.i(new z("ad-resumed"));break;case"pause":e.i(new z("ad-paused"));break;case"firstQuartile":e.i(new z("ad-first-quartile"));break;case"midpoint":e.i(new z("ad-midpoint"));break;case"thirdQuartile":e.i(new z("ad-third-quartile"));break;case"complete":e.i(new z("ad-complete")),e.i(new z("ad-stopped"));break;case"skip":e.i(new z("ad-skipped")),e.i(new z("ad-stopped"));break;case"breakStart":e.C.setAttribute("ad-active","true");break;case"breakEnd":e.C.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new z("ad-skip-state-changed"))}}function Tp(e,t){this.g=e,this.i=null,this.h=t}function Sp(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.B=this.m=this.s=null,this.C="",this.D=[],this.h=new xt,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new z("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){!function(e,t){e.i(new z("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.o(e.l,"seeked",function(){var t=e.l.currentTime;if(0!=t){e.g.streamTimeForContentTime(t);var n=e.g.previousCuePointForStreamTime(t);n&&!n.played&&(e.s=t,e.l.currentTime=n.start)}})}(r,e)}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.C.length?r.j.resolve(r.C):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){e=e.getAd(),r.m=new Tp(e,r.l),r.B&&(r.m.i=r.B),r.i(new z("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var e=r.l.currentTime;r.s&&r.s>e&&(r.l.currentTime=r.s,r.s=null)}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.B=e.getStreamData().adProgressData,r.m&&(r.m.i=r.B)}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new z("ad-first-quartile"))}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new z("ad-midpoint"))}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new z("ad-third-quartile"))}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new z("ad-complete")),r.i(new z("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new z("ad-skipped")),r.i(new z("ad-stopped"))}),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[];for(var n=(t=c(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.D=e,r.i(new z("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function wp(){ee.call(this),this.h=this.i=this.j=this.g=null,this.m=new Uh,this.s=navigator.language,this.l=null}function Ap(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}function Ep(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof z){var n={};for(i in t)(e=t[i])&&"object"==typeof e?"detail"==i&&(n[i]=e):i in Event||(n[i]=e);return n}if(t instanceof Error){var i=new Set(["name","message","stack"]);for(n in t)i.add(n);for(e=(n=c(Object.getOwnPropertyNames(t))).next();!e.done;e=n.next())i.add(e.value);for(n={},e=(i=c(i)).next();!e.done;e=i.next())n[e=e.value]=t[e];t={__type__:"Error",contents:n}}else if(t instanceof TimeRanges){for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=c(os(t))).next();!n.done;n=t.next())e=(n=n.value).end,i.start.push(n.start),i.end.push(e);t=i}else t=ArrayBuffer.isView(t)&&1===t.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}})}function xp(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(n in e=t.contents,t=Error(e.message),e)t[n]=e[n];n=t}else n=t;return n})}(r=Bh.prototype).needsSkipUI=function(){return!1},r.isClientRendering=function(){return!0},r.hasCustomClick=function(){return!0},r.isUsingAnotherMediaElement=function(){return!0},r.getDuration=function(){return this.g.getDuration()},r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},r.getRemainingTime=function(){return this.h.getRemainingTime()},r.isPaused=function(){return this.i},r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},r.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return this.h.getAdSkippableState()},r.skip=function(){return this.h.skip()},r.pause=function(){return this.h.pause()},r.play=function(){return this.h.resume()},r.getVolume=function(){return this.h.getVolume()},r.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},r.isMuted=function(){return 0==this.h.getVolume()},r.isLinear=function(){return this.g.isLinear()},r.resize=function(e,t){this.h.resize(e,t)},r.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},r.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.g.getTitle()},r.getDescription=function(){return this.g.getDescription()},r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},r.getVastAdId=function(){return""},r.getAdId=function(){return this.g.getAdId()},r.getCreativeAdId=function(){return this.g.getCreativeAdId()},r.getAdvertiserName=function(){return this.g.getAdvertiserName()},r.getMediaUrl=function(){return this.g.getMediaUrl()},r.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},r.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},r.release=function(){this.h=this.g=null},H("shaka.ads.ClientSideAd",Bh),Bh.prototype.release=Bh.prototype.release,Bh.prototype.getPodIndex=Bh.prototype.getPodIndex,Bh.prototype.getTimeOffset=Bh.prototype.getTimeOffset,Bh.prototype.getMediaUrl=Bh.prototype.getMediaUrl,Bh.prototype.getAdvertiserName=Bh.prototype.getAdvertiserName,Bh.prototype.getCreativeAdId=Bh.prototype.getCreativeAdId,Bh.prototype.getAdId=Bh.prototype.getAdId,Bh.prototype.getVastAdId=Bh.prototype.getVastAdId,Bh.prototype.getVastMediaWidth=Bh.prototype.getVastMediaWidth,Bh.prototype.getVastMediaHeight=Bh.prototype.getVastMediaHeight,Bh.prototype.getVastMediaBitrate=Bh.prototype.getVastMediaBitrate,Bh.prototype.getDescription=Bh.prototype.getDescription,Bh.prototype.getTitle=Bh.prototype.getTitle,Bh.prototype.getPositionInSequence=Bh.prototype.getPositionInSequence,Bh.prototype.getSequenceLength=Bh.prototype.getSequenceLength,Bh.prototype.setMuted=Bh.prototype.setMuted,Bh.prototype.resize=Bh.prototype.resize,Bh.prototype.isLinear=Bh.prototype.isLinear,Bh.prototype.isMuted=Bh.prototype.isMuted,Bh.prototype.setVolume=Bh.prototype.setVolume,Bh.prototype.getVolume=Bh.prototype.getVolume,Bh.prototype.play=Bh.prototype.play,Bh.prototype.pause=Bh.prototype.pause,Bh.prototype.skip=Bh.prototype.skip,Bh.prototype.canSkipNow=Bh.prototype.canSkipNow,Bh.prototype.getTimeUntilSkippable=Bh.prototype.getTimeUntilSkippable,Bh.prototype.isSkippable=Bh.prototype.isSkippable,Bh.prototype.isPaused=Bh.prototype.isPaused,Bh.prototype.getRemainingTime=Bh.prototype.getRemainingTime,Bh.prototype.getMinSuggestedDuration=Bh.prototype.getMinSuggestedDuration,Bh.prototype.getDuration=Bh.prototype.getDuration,Bh.prototype.isUsingAnotherMediaElement=Bh.prototype.isUsingAnotherMediaElement,Bh.prototype.hasCu
1stomClick=Bh.prototype.hasCustomClick,Bh.prototype.isClientRendering=Bh.prototype.isClientRendering,Bh.prototype.needsSkipUI=Bh.prototype.needsSkipUI,H("shaka.ads.Utils",Fh),Fh.ADS_LOADED="ads-loaded",Fh.AD_STARTED="ad-started",Fh.AD_FIRST_QUARTILE="ad-first-quartile",Fh.AD_MIDPOINT="ad-midpoint",Fh.AD_THIRD_QUARTILE="ad-third-quartile",Fh.AD_COMPLETE="ad-complete",Fh.AD_STOPPED="ad-stopped",Fh.AD_SKIPPED="ad-skipped",Fh.AD_VOLUME_CHANGED="ad-volume-changed",Fh.AD_MUTED="ad-muted",Fh.AD_PAUSED="ad-paused",Fh.AD_RESUMED="ad-resumed",Fh.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Fh.CUEPOINTS_CHANGED="ad-cue-points-changed",Fh.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Fh.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Fh.AD_CLICKED="ad-clicked",Fh.AD_PROGRESS="ad-progress",Fh.AD_BUFFERING="ad-buffering",Fh.AD_IMPRESSION="ad-impression",Fh.AD_DURATION_CHANGED="ad-duration-changed",Fh.AD_CLOSED="ad-closed",Fh.AD_LOADED="ad-loaded",Fh.ALL_ADS_COMPLETED="all-ads-completed",Fh.AD_LINEAR_CHANGED="ad-linear-changed",Fh.AD_METADATA="ad-metadata",Fh.AD_RECOVERABLE_ERROR="ad-recoverable-error",Fh.AD_ERROR="ad-error",Fh.AD_BREAK_READY="ad-break-ready",Fh.AD_INTERACTION="ad-interaction",Fh.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Fh.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Fh.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Hh.prototype.configure=function(e){this.s=e},Hh.prototype.stop=function(){this.g&&this.g.stop(),this.u&&hs(this.u)},Hh.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()},(r=qh.prototype).needsSkipUI=function(){return!0},r.isClientRendering=function(){return!0},r.hasCustomClick=function(){return!1},r.isUsingAnotherMediaElement=function(){return this.u},r.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},r.isPaused=function(){return this.g.paused},r.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},r.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},r.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()},r.skip=function(){this.canSkipNow()&&this.B()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.play()},r.getVolume=function(){return this.g.volume},r.setVolume=function(e){this.g.volume=e},r.isMuted=function(){return this.g.muted},r.isLinear=function(){return null==this.C},r.resize=function(){},r.setMuted=function(e){this.g.muted=e},r.getSequenceLength=function(){return this.s},r.getPositionInSequence=function(){return this.m},r.getTitle=function(){return""},r.getDescription=function(){return""},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return 0},r.getVastMediaWidth=function(){return 0},r.getVastAdId=function(){return""},r.getAdId=function(){return this.i.id||""},r.getCreativeAdId=function(){return""},r.getAdvertiserName=function(){return""},r.getMediaUrl=function(){return this.i.uri},r.getTimeOffset=function(){return 0},r.getPodIndex=function(){return 0},r.release=function(){this.g=null},H("shaka.ads.InterstitialAd",qh),qh.prototype.release=qh.prototype.release,qh.prototype.getPodIndex=qh.prototype.getPodIndex,qh.prototype.getTimeOffset=qh.prototype.getTimeOffset,qh.prototype.getMediaUrl=qh.prototype.getMediaUrl,qh.prototype.getAdvertiserName=qh.prototype.getAdvertiserName,qh.prototype.getCreativeAdId=qh.prototype.getCreativeAdId,qh.prototype.getAdId=qh.prototype.getAdId,qh.prototype.getVastAdId=qh.prototype.getVastAdId,qh.prototype.getVastMediaWidth=qh.prototype.getVastMediaWidth,qh.prototype.getVastMediaHeight=qh.prototype.getVastMediaHeight,qh.prototype.getVastMediaBitrate=qh.prototype.getVastMediaBitrate,qh.prototype.getDescription=qh.prototype.getDescription,qh.prototype.getTitle=qh.prototype.getTitle,qh.prototype.getPositionInSequence=qh.prototype.getPositionInSequence,qh.prototype.getSequenceLength=qh.prototype.getSequenceLength,qh.prototype.setMuted=qh.prototype.setMuted,qh.prototype.resize=qh.prototype.resize,qh.prototype.isLinear=qh.prototype.isLinear,qh.prototype.isMuted=qh.prototype.isMuted,qh.prototype.setVolume=qh.prototype.setVolume,qh.prototype.getVolume=qh.prototype.getVolume,qh.prototype.play=qh.prototype.play,qh.prototype.pause=qh.prototype.pause,qh.prototype.skip=qh.prototype.skip,qh.prototype.canSkipNow=qh.prototype.canSkipNow,qh.prototype.getTimeUntilSkippable=qh.prototype.getTimeUntilSkippable,qh.prototype.isSkippable=qh.prototype.isSkippable,qh.prototype.isPaused=qh.prototype.isPaused,qh.prototype.getRemainingTime=qh.prototype.getRemainingTime,qh.prototype.getMinSuggestedDuration=qh.prototype.getMinSuggestedDuration,qh.prototype.getDuration=qh.prototype.getDuration,qh.prototype.isUsingAnotherMediaElement=qh.prototype.isUsingAnotherMediaElement,qh.prototype.hasCu
1stomClick=qh.prototype.hasCustomClick,qh.prototype.isClientRendering=qh.prototype.isClientRendering,qh.prototype.needsSkipUI=qh.prototype.needsSkipUI,(r=Xh.prototype).needsSkipUI=function(){return!0},r.isClientRendering=function(){return!0},r.hasCustomClick=function(){return!1},r.isUsingAnotherMediaElement=function(){return!1},r.getDuration=function(){return-1},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return-1},r.isPaused=function(){return!1},r.isSkippable=function(){return!1},r.getTimeUntilSkippable=function(){return 0},r.canSkipNow=function(){return!1},r.skip=function(){},r.pause=function(){},r.play=function(){},r.getVolume=function(){return 1},r.setVolume=function(){},r.isMuted=function(){return!1},r.isLinear=function(){return this.i},r.resize=function(){},r.setMuted=function(){},r.getSequenceLength=function(){return this.j},r.getPositionInSequence=function(){return this.h},r.getTitle=function(){return""},r.getDescription=function(){return""},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return 0},r.getVastMediaWidth=function(){return 0},r.getVastAdId=function(){return""},r.getAdId=function(){return this.g.id||""},r.getCreativeAdId=function(){return""},r.getAdvertiserName=function(){return""},r.getMediaUrl=function(){return this.g.uri},r.getTimeOffset=function(){return 0},r.getPodIndex=function(){return 0},r.release=function(){},H("shaka.ads.InterstitialStaticAd",Xh),Xh.prototype.release=Xh.prototype.release,Xh.prototype.getPodIndex=Xh.prototype.getPodIndex,Xh.prototype.getTimeOffset=Xh.prototype.getTimeOffset,Xh.prototype.getMediaUrl=Xh.prototype.getMediaUrl,Xh.prototype.getAdvertiserName=Xh.prototype.getAdvertiserName,Xh.prototype.getCreativeAdId=Xh.prototype.getCreativeAdId,Xh.prototype.getAdId=Xh.prototype.getAdId,Xh.prototype.getVastAdId=Xh.prototype.getVastAdId,Xh.prototype.getVastMediaWidth=Xh.prototype.getVastMediaWidth,Xh.prototype.getVastMediaHeight=Xh.prototype.getVastMediaHeight,Xh.prototype.getVastMediaBitrate=Xh.prototype.getVastMediaBitrate,Xh.prototype.getDescription=Xh.prototype.getDescription,Xh.prototype.getTitle=Xh.prototype.getTitle,Xh.prototype.getPositionInSequence=Xh.prototype.getPositionInSequence,Xh.prototype.getSequenceLength=Xh.prototype.getSequenceLength,Xh.prototype.setMuted=Xh.prototype.setMuted,Xh.prototype.resize=Xh.prototype.resize,Xh.prototype.isLinear=Xh.prototype.isLinear,Xh.prototype.isMuted=Xh.prototype.isMuted,Xh.prototype.setVolume=Xh.prototype.setVolume,Xh.prototype.getVolume=Xh.prototype.getVolume,Xh.prototype.play=Xh.prototype.play,Xh.prototype.pause=Xh.prototype.pause,Xh.prototype.skip=Xh.prototype.skip,Xh.prototype.canSkipNow=Xh.prototype.canSkipNow,Xh.prototype.getTimeUntilSkippable=Xh.prototype.getTimeUntilSkippable,Xh.prototype.isSkippable=Xh.prototype.isSkippable,Xh.prototype.isPaused=Xh.prototype.isPaused,Xh.prototype.getRemainingTime=Xh.prototype.getRemainingTime,Xh.prototype.getMinSuggestedDuration=Xh.prototype.getMinSuggestedDuration,Xh.prototype.getDuration=Xh.prototype.getDuration,Xh.prototype.isUsingAnotherMediaElement=Xh.prototype.isUsingAnotherMediaElement,Xh.prototype.hasCustomClick=Xh.prototype.hasCustomClick,Xh.prototype.isClientRendering=Xh.prototype.isClientRendering,Xh.prototype.needsSkipUI=Xh.prototype.needsSkipUI,(r=Yh.prototype).configure=function(e){this.L=e,Qh(this)},r.stop=function(){if(this.l&&this.l.Sa(),this.R.clear(),this.H.clear(),this.j.Og(),this.F.size)for(var e=Array.from(this.F.values()),t=(e=c(e)).next();!t.done;t=e.next())(t=t.value)&&t.then(function(e){e&&e.destroy()});if(this.F.clear(),this.K.size)for(t=(e=c(e=Array.from(this.K.keys()))).next();!t.done;t=e.next())cp(this,t.value);this.K.clear(),this.j.detach(),this.J=!1,this.u=this.m=null,this.B=!0,this.h=this.g,this.G=null,ip(this),Jh(this),this.C&&hs(this.C),this.s&&(this.s.stop(),this.s=null)},r.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.N&&(this.N.stop(),this.N=null),this.j.destroy()},r.Sb=function(){return this.j},r.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,u,l,h=this;return D(function(p){switch(p.g){case 1:return S(p,op(h,e,t={type:12}),2);case 2:if(n=p.h,!(i=pn(n,"VAST,vmap:VMAP")))throw new Ce(2,10,10007);if(r=[],"VAST"==i.tagName){r=Vh(i,h.m),p.A(3);break}if("vmap:VMAP"!=i.tagName){p.A(3);break}for(var f=[],g=c(yn(i,"vmap:AdBreak")),m=g.next();!m.done;m=g.next()){var v=m.value,y=v.attributes.timeOffset;y&&(m=null,m="start"==y?0:"end"==y?1/0:un(y),(v=wn(v,"vmap:AdSource"))&&(v=wn(v,"vmap:AdTagURI"))&&(v=bn(v))&&f.push({time:m,uri:v}))}a=c(f),o=a.next();case 5:if(o.done){p.A(3);break}return s=o.value,S(p,op(h,s.uri,t),8);case 8:if(u=p.h,!(l=pn(u,"VAST")))throw new Ce(2,10,10007);r.push.apply(r,d(Vh(l,s.time))),o=a.next(),p.A(5);break;case 3:Zh(h,r),w(p)}})},(r=dp.prototype).needsSkipUI=function(){return!0},r.isClientRendering=function(){return!1},r.hasCustomClick=function(){return!1},r.isUsingAnotherMediaElement=function(){return!1},r.getDuration=function(){return this.h.durationInSeconds},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},r.isPaused=function(){return this.g.paused},r.isSkippable=function(){return"number"==typeof this.j},r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.play()},r.getVolume=function(){return this.g.volume},r.setVolume=function(e){this.g.volume=e},r.isMuted=function(){return this.g.muted},r.isLinear=function(){return this.s},r.resize=function(){},r.setMuted=function(e){this.g.muted=e},r.getSequenceLength=function(){return this.l?this.l:1},r.getPositionInSequence=function(){return this.i?this.i:1},r.getTitle=function(){return this.h.adTitle},r.getDescription=function(){return""},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return 0},r.getVastMediaWidth=function(){return 0},r.getVastAdId=function(){return this.h.vastAdId||""},r.getAdId=function(){return this.h.adId},r.getCreativeAdId=function(){return this.h.creativeId},r.getAdvertiserName=function(){return""},r.getMediaUrl=function(){return null},r.getTimeOffset=function(){return 0},r.getPodIndex=function(){return 0},r.release=function(){this.l=this.i=this.g=this.h=null},H("shaka.ads.MediaTailorAd",dp),dp.prototype.release=dp.prototype.release,dp.prototype.getPodIndex=dp.prototype.getPodIndex,dp.prototype.getTimeOffset=dp.prototype.getTimeOffset,dp.prototype.getMediaUrl=dp.prototype.getMediaUrl,dp.prototype.getAdvertiserName=dp.prototype.getAdvertiserName,dp.prototype.getCreativeAdId=dp.prototype.getCreativeAdId,dp.prototype.getAdId=dp.prototype.getAdId,dp.prototype.getVastAdId=dp.prototype.getVastAdId,dp.prototype.getVastMediaWidth=dp.prototype.getVastMediaWidth,dp.prototype.getVastMediaHeight=dp.prototype.getVastMediaHeight,dp.prototype.getVastMediaBitrate=dp.prototype.getVastMediaBitrate,dp.prototype.getDescription=dp.prototype.getDescription,dp.prototype.getTitle=dp.prototype.getTitle,dp.prototype.getPositionInSequence=dp.prototype.getPositionInSequence,dp.prototype.getSequenceLength=dp.prototype.getSequenceLength,dp.prototype.setMuted=dp.prototype.setMuted,dp.prototype.resize=dp.prototype.resize,dp.prototype.isLinear=dp.prototype.isLinear,dp.prototype.isMuted=dp.prototype.isMuted,dp.prototype.setVolume=dp.prototype.setVolume,dp.prototype.getVolume=dp.prototype.getVolume,dp.prototype.play=dp.prototype.play,dp.prototype.pause=dp.prototype.pause,dp.prototype.skip=dp.prototype.skip,dp.prototype.canSkipNow=dp.prototype.canSkipNow,dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable,dp.prototype.isSkippable=dp.prototype.isSkippable,dp.prototype.isPaused=dp.prototype.isPaused,dp.prototype.getRemainingTime=dp.prototype.getRemainingTime,dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration,dp.prototype.getDuration=dp.prototype.getDuration,dp.prototype.isUsingAnotherMediaElement=dp.prototype.isUsingAnotherMediaElement,dp.prototype.hasCu
1stomClick=dp.prototype.hasCustomClick,dp.prototype.isClientRendering=dp.prototype.isClientRendering,dp.prototype.needsSkipUI=dp.prototype.needsSkipUI,hp.prototype.stop=function(){for(var e=c(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.s.Da(t.target,t.type,t.listener);vp(this),this.m=[],this.u=[],this.G="",this.N=!0,this.H="",this.B=null,this.j=[],this.L=[],this.F.clear()},hp.prototype.release=function(){this.stop(),this.s&&this.s.release()},hp.prototype.onManifestUpdated=function(e){this.I=e,""!=this.G&&(function(e,t,n){var i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b;D(function(T){if(1==T.g)return i={type:8},r=Jr([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),a=e.J.request(7,r,i),A(T,2),S(T,a.promise,4);if(2!=T.g){if(o=T.h,s=[],u=Oe(o.data),0<(l=JSON.parse(u)).avails.length){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,d=c(e.j),h=d.next();!h.done;h=d.next())for(p=h.value,f=c(p.nonLinearAdsList),g=f.next();!g.done;g=f.next())for(m=g.value,v=c(m.nonLinearAdList),y=v.next();!y.done;y=v.next())b=y.value,pp(e,b);s=e.getCuePoints(),e.i(new z("ad-cue-points-changed",(new Map).set("cuepoints",s)))}}else e.j.length&&e.i(new z("ad-cue-points-changed",(new Map).set("cuepoints",s))),vp(e),e.j=[];return n&&(e.I||0<s.length)&&function(e){mp(e),e.I||(gp(e),e.s.o(e.h,"seeked",function(){gp(e)}),e.s.o(e.h,"ended",function(){vp(e)})),e.s.o(e.h,"timeupdate",function(){mp(e)})}(e),x(T,0)}k(T),w(T)})}(this,this.G,this.N),this.N=!1)},hp.prototype.getCuePoints=function(){for(var e=[],t=c(this.j),n=t.next();!n.done;n=t.next())for(var i=(n=c(n.value.ads)).next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds});return e},(r=Tp.prototype).needsSkipUI=function(){return!0},r.isClientRendering=function(){return!1},r.hasCustomClick=function(){return!0},r.isUsingAnotherMediaElement=function(){return!1},r.getDuration=function(){return this.i?this.i.duration:-1},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},r.isPaused=function(){return this.h.paused},r.isSkippable=function(){return this.g.isSkippable()},r.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.h.currentTime+=this.getRemainingTime()},r.pause=function(){return this.h.pause()},r.play=function(){return this.h.play()},r.getVolume=function(){return this.h.volume},r.setVolume=function(e){this.h.volume=e},r.isMuted=function(){return this.h.muted},r.isLinear=function(){return!0},r.resize=function(){},r.setMuted=function(e){this.h.muted=e},r.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.g.getTitle()},r.getDescription=function(){return this.g.getDescription()},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},r.getVastAdId=function(){return""},r.getAdId=function(){return this.g.getAdId()},r.getCreativeAdId=function(){return this.g.getCreativeAdId()},r.getAdvertiserName=function(){return this.g.getAdvertiserName()},r.getMediaUrl=function(){return null},r.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},r.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},r.release=function(){this.h=this.i=this.g=null},H("shaka.ads.ServerSideAd",Tp),Tp.prototype.release=Tp.prototype.release,Tp.prototype.getPodIndex=Tp.prototype.getPodIndex,Tp.prototype.getTimeOffset=Tp.prototype.getTimeOffset,Tp.prototype.getMediaUrl=Tp.prototype.getMediaUrl,Tp.prototype.getAdvertiserName=Tp.prototype.getAdvertiserName,Tp.prototype.getCreativeAdId=Tp.prototype.getCreativeAdId,Tp.prototype.getAdId=Tp.prototype.getAdId,Tp.prototype.getVastAdId=Tp.prototype.getVastAdId,Tp.prototype.getVastMediaWidth=Tp.prototype.getVastMediaWidth,Tp.prototype.getVastMediaHeight=Tp.prototype.getVastMediaHeight,Tp.prototype.getVastMediaBitrate=Tp.prototype.getVastMediaBitrate,Tp.prototype.getDescription=Tp.prototype.getDescription,Tp.prototype.getTitle=Tp.prototype.getTitle,Tp.prototype.getPositionInSequence=Tp.prototype.getPositionInSequence,Tp.prototype.getSequenceLength=Tp.prototype.getSequenceLength,Tp.prototype.setMuted=Tp.prototype.setMuted,Tp.prototype.resize=Tp.prototype.resize,Tp.prototype.isLinear=Tp.prototype.isLinear,Tp.prototype.isMuted=Tp.prototype.isMuted,Tp.prototype.setVolume=Tp.prototype.setVolume,Tp.prototype.getVolume=Tp.prototype.getVolume,Tp.prototype.play=Tp.prototype.play,Tp.prototype.pause=Tp.prototype.pause,Tp.prototype.skip=Tp.prototype.skip,Tp.prototype.canSkipNow=Tp.prototype.canSkipNow,Tp.prototype.getTimeUntilSkippable=Tp.prototype.getTimeUntilSkippable,Tp.prototype.isSkippable=Tp.prototype.isSkippable,Tp.prototype.isPaused=Tp.prototype.isPaused,Tp.prototype.getRemainingTime=Tp.prototype.getRemainingTime,Tp.prototype.getMinSuggestedDuration=Tp.prototype.getMinSuggestedDuration,Tp.prototype.getDuration=Tp.prototype.getDuration,Tp.prototype.isUsingAnotherMediaElement=Tp.prototype.isUsingAnotherMediaElement,Tp.prototype.hasCu
1stomClick=Tp.prototype.hasCustomClick,Tp.prototype.isClientRendering=Tp.prototype.isClientRendering,Tp.prototype.needsSkipUI=Tp.prototype.needsSkipUI,(r=Sp.prototype).configure=function(){},r.stop=function(){this.C="",this.s=null,this.D=[]},r.release=function(){this.stop(),this.h&&this.h.release()},r.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},r.getCuePoints=function(){return this.D},v(wp,ee),(r=wp.prototype).setLocale=function(e){this.s=e},r.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},r.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new Yh(e,t,n,function(e){return Ap(i,e)}),this.g.configure(this.l)},r.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new Ce(2,10,1e4);this.j&&this.j.release(),this.j=new Hh(t,n,this.s,i,function(e){return Ap(r,e)}),this.j.configure(this.l)},r.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),ee.prototype.release.call(this)},r.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 z("ad-stopped")),this.dispatchEvent(new z("ad-content-attach-requested")),this.m=new Uh},r.requestClientSideAds=function(e){if(!this.j)throw new Ce(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},r.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new Ce(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},r.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new hp(e,t,n,function(e){return Ap(i,e)})},r.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new Ce(1,10,10005);var i=this.i;return n=void 0===n?"":n,i.l?e=Promise.reject(new Ce(1,10,10004)):(i.l=new jr,function(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f;D(function(g){if(1==g.g)return i={type:7},(r=Jr([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",n&&(a=JSON.stringify(n),r.body=Be(a)),o=e.J.request(7,r,i),A(g,2),S(g,o.promise,4);if(2!=g.g){if(s=g.h,u=Oe(s.data),!(l=JSON.parse(u)).manifestUrl||!l.trackingUrl)throw Error("Insufficient data from MediaTailor.");return c=new ae(t),d=new ae(l.trackingUrl),e.G=c.resolve(d).toString(),h=Date.now()/1e3,p=h-e.O,e.i(new z("ads-loaded",(new Map).set("loadTime",p))),f=new ae(l.manifestUrl),e.l.resolve(c.resolve(f).toString()),e.l=null,x(g,0)}if(k(g),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,g.return();e.l.resolve(e.H),e.l=null,w(g)})}(i,e,t),i.H=n||"",i.O=Date.now()/1e3,e=i.l),e},r.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new Ce(1,10,10005);var t=this.i;t.G=e,t.i(new z("ads-loaded",(new Map).set("loadTime",0)))},r.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new Ce(2,10,10002);this.h&&this.h.release(),this.h=new Sp(t,n,this.s,function(e){return Ap(i,e)}),this.h.configure(this.l)},r.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new Ce(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Y('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.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.15.3",(n=this.h).j?e=Promise.reject(new Ce(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new jr,n.g.requestStream(e),n.C=t||"",n.F=Date.now()/1e3,e=n.j),e},r.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new Ce(1,10,10003);(e.mpt||e.mpv)&&Y('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.'),e.mpt="Shaka Player",e.mpv="v4.15.3",this.h.g.replaceAdTagParameters(e)},r.getServerSideCuePoints=function(){return Mt("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},r.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},r.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:jh(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},r.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},r.onDashTimedMetadata=function(e){this.h&&"urn:google:dai:2018"==e.schemeIdUri&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},r.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},r.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},r.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&$h(this.g,n))},r.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==i||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==i){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t="urn:mpeg:dash:event:alternativeMPD:replace:2025"==n.schemeIdUri,i="urn:mpeg:dash:event:alternativeMPD:insert:2025"==n.schemeIdUri,t||i)){for(var r,a=n.startTime,o=n.endTime,s=null,u=0,l=c(n.eventNode.children),d=l.next();!d.done;d=l.next())if("AlternativeMPD"==(d=d.value).tagName){if(d=d.attributes.uri){r=d;break}}else if("InsertPresentation"==d.tagName||"ReplacePresentation"==d.tagName){var h=d.attributes.url;if(h){r=h,(l=En(d,"maxDuration",Rn))&&(s=l/n.timescale),(l=En(d,"returnOffset",Rn))&&(u=l/n.timescale),t&&u&&(o=a+u);break}}
1r&&Zh(e,[{id:n.id,groupId:null,startTime:a,endTime:o,uri:r,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==i||"urn:scte:dash:scte214-events"==i)&&n.eventNode&&wn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function(e,t){var n=wn(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,a="true"==n.attributes.loop,o=En(n,"z",Rn);if(i&&0!=o){var s=null,u=wn(n,"Background");if(u){var l=u.attributes.uri;s=l?"center / contain no-repeat url('"+l+"')":Tn(u)}u=1920,l=1080;var c=wn(n,"Viewport");if(c){if(null==(u=En(c,"x",Rn)))return;if(null==(l=En(c,"y",Rn)))return}var d={viewport:{x:u,y:l},topLeft:{x:0,y:0},size:{x:u,y:l}},h=wn(n,"Overlay");if(c&&h){var p=wn(h,"TopLeft"),f=wn(h,"Size");if(p&&f){if(null==(h=En(p,"x",Rn)))return;if(null==(p=En(p,"y",Rn)))return;var g=En(f,"x",Rn);if(null==g)return;if(null==(f=En(f,"y",Rn)))return;d.topLeft.x=h,d.topLeft.y=p,d.size.x=g,d.size.y=f}}if(h=null,n=wn(n,"Squeeze"),c&&n&&(f=wn(n,"TopLeft"),n=wn(n,"Size"),f&&n)){if(null==(c=En(f,"x",Rn)))return;if(null==(h=En(f,"y",Rn)))return;if(null==(f=En(n,"x",Rn)))return;if(null==(n=En(n,"y",Rn)))return;h={viewport:{x:u,y:l},topLeft:{x:c,y:h},size:{x:f,y:n}}}Zh(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:a,overlay:d,displayOnBackground:-1==o,currentVideo:h,background:s}])}}(this.g,n))}},r.addCustomInterstitial=function(e){if(!this.g)throw new Ce(1,10,10006);Zh(this.g,[e])},r.addAdUrlInterstitial=function(e){if(!this.g)throw new Ce(1,10,10006);return this.g.addAdUrlInterstitial(e)},r.getInterstitialPlayer=function(){if(!this.g)throw new Ce(1,10,10006);return this.g.Sb()},H("shaka.ads.AdManager",wp),wp.prototype.getInterstitialPlayer=wp.prototype.getInterstitialPlayer,wp.prototype.addAdUrlInterstitial=wp.prototype.addAdUrlInterstitial,wp.prototype.addCustomInterstitial=wp.prototype.addCustomInterstitial,wp.prototype.onDASHInterstitialMetadata=wp.prototype.onDASHInterstitialMetadata,wp.prototype.onHLSInterstitialMetadata=wp.prototype.onHLSInterstitialMetadata,wp.prototype.onCueMetadataChange=wp.prototype.onCueMetadataChange,wp.prototype.onHlsTimedMetadata=wp.prototype.onHlsTimedMetadata,wp.prototype.onDashTimedMetadata=wp.prototype.onDashTimedMetadata,wp.prototype.onManifestUpdated=wp.prototype.onManifestUpdated,wp.prototype.getStats=wp.prototype.getStats,wp.prototype.getCuePoints=wp.prototype.getCuePoints,wp.prototype.getServerSideCuePoints=wp.prototype.getServerSideCuePoints,wp.prototype.replaceServerSideAdTagParameters=wp.prototype.replaceServerSideAdTagParameters,wp.prototype.requestServerSideStream=wp.prototype.requestServerSideStream,wp.prototype.initServerSide=wp.prototype.initServerSide,wp.prototype.addMediaTailorTrackingUrl=wp.prototype.addMediaTailorTrackingUrl,wp.prototype.requestMediaTailorStream=wp.prototype.requestMediaTailorStream,wp.prototype.initMediaTailor=wp.prototype.initMediaTailor,
1wp.prototype.updateClientSideAdsRenderingSettings=wp.prototype.updateClientSideAdsRenderingSettings,wp.prototype.requestClientSideAds=wp.prototype.requestClientSideAds,wp.prototype.onAssetUnload=wp.prototype.onAssetUnload,wp.prototype.release=wp.prototype.release,wp.prototype.initClientSide=wp.prototype.initClientSide,wp.prototype.initInterstitial=wp.prototype.initInterstitial,wp.prototype.configure=wp.prototype.configure,wp.prototype.setLocale=wp.prototype.setLocale,wp.ADS_LOADED="ads-loaded",wp.AD_STARTED="ad-started",wp.AD_FIRST_QUARTILE="ad-first-quartile",wp.AD_MIDPOINT="ad-midpoint",wp.AD_THIRD_QUARTILE="ad-third-quartile",wp.AD_COMPLETE="ad-complete",wp.AD_STOPPED="ad-stopped",wp.AD_SKIPPED="ad-skipped",wp.AD_VOLUME_CHANGED="ad-volume-changed",wp.AD_MUTED="ad-muted",wp.AD_PAUSED="ad-paused",wp.AD_RESUMED="ad-resumed",wp.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",wp.CUEPOINTS_CHANGED="ad-cue-points-changed",wp.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",wp.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",wp.AD_CLICKED="ad-clicked",wp.AD_PROGRESS="ad-progress",wp.AD_BUFFERING="ad-buffering",wp.AD_IMPRESSION="ad-impression",wp.AD_DURATION_CHANGED="ad-duration-changed",wp.AD_CLOSED="ad-closed",wp.AD_LOADED="ad-loaded",wp.ALL_ADS_COMPLETED="all-ads-completed",wp.AD_LINEAR_CHANGED="ad-linear-changed",wp.AD_METADATA="ad-metadata",wp.AD_RECOVERABLE_ERROR="ad-recoverable-error",wp.AD_ERROR="ad-error",wp.AD_BREAK_READY="ad-break-ready",wp.AD_INTERACTION="ad-interaction",wp.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",wp.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",wp.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",_h=function(){return new wp};var kp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ip="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Cp=["loop","playbackRate"],Mp=["pause","play"],Lp=(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",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),Rp=(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",2).set("getVariantTracks",2),Pp=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Dp=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Np=[["isTextTrackVisible","setTextTrackVisibility"]],_p="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),Op="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function Up(e,t,n,i,r,a,o){var s=this;this.G=e,this.J=o,this.l=new Ki(t),this.K=n,this.u=!1,this.B=i,this.F=r,this.L=a,this.i=this.m=!1,this.I="",this.s=null,this.C=function(){return Vp(s)},this.D=function(e,t){switch((e=xp(t)).type){case"event":var n=e.targetName,i=K(e.event);s.B(n,i);break;case"update":for(i in n=e.update)for(var r in e=s.g[i]||{},n[i])e[r]=n[i][r];s.u&&(s.K(),s.u=!1);break;case"asyncComplete":if(r=e.id,i=e.error,t=e.res,e=s.h.get(r),s.h.delete(r),e)if(i){for(n in r=new Ce(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve(t)}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,Xp.add(this)}function jp(e,t){var n=e.L();Wp=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),Vp(e),Hp(e,{type:"init",initState:n,appData:e.s}),e.j.resolve()}function Bp(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;
1case"receiver_unavailable":n=8006}e.j.reject(new Ce(2,8,n,t))}function Fp(e){var t=Wp;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function Vp(e){var t=!!Wp&&"connected"==Wp.status;if(e.i&&!t){for(var n in e.F(),e.g)e.g[n]={};Gp(e)}e.i=t,e.I=t?Wp.receiver.friendlyName:"",e.l.Ka()}function Gp(e){if(e.h)for(var t=c(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new Ce(1,7,7e3))}}function Hp(e,t){t=Ep(t);var n=Wp;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Q)}catch(i){throw t=new Ce(2,8,8005,i),n=new z("error",(new Map).set("detail",t)),e.B("player",n),e.yd(),t}}(r=Up.prototype).destroy=function(){return Xp.delete(this),Gp(this),Wp&&Fp(this),this.l&&(this.l.stop(),this.l=null),this.F=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.s=null,Promise.resolve()},r.Pa=function(){return this.i},r.Tf=function(){return this.I},r.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Ka();var t=new chrome.cast.SessionRequest(this.G,[],null,this.J,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=c(Xp),n=t.next();!n.done;n=t.next()){var i=e;(n=n.value).j=new jr,n.u=!0,jp(n,i)}},function(e){for(var t=c(Xp),n=t.next();!n.done;n=t.next())n=n.value,Kp="available"==e,n.l.Ka()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),Kp&&this.l.X(zp),(t=Wp)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new jr,this.u=!0,jp(this,t)):Wp=null}else e.__onGCastApiAvailable!==Yp&&(qp=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=Yp)},r.Th=function(e){this.s=e,this.i&&Hp(this,{type:"appData",appData:this.s})},r.cast=function(){var e=this;return D(function(t){if(!e.m)throw new Ce(1,8,8e3);if(!Kp)throw new Ce(1,8,8001);if(e.i)throw new Ce(1,8,8002);return e.j=new jr,chrome.cast.requestSession(function(t){return jp(e,t)},function(t){return Bp(e,t)}),S(t,e.j,0)})},r.yd=function(){if(this.i){if(Gp(this),Wp){Fp(this);try{Wp.stop(function(){},function(){})}catch(e){}Wp=null}Vp(this)}},r.get=function(e,t){var n=this;if("video"==e){if(Mp.includes(t))return function(){return n.qj.apply(n,[e,t].concat(d(N.apply(0,arguments))))}}else if("player"==e){if(Pp.has(t)&&!this.get("player","isLive")())return function(){};if(_p.includes(t))return function(){return n.qj.apply(n,[e,t].concat(d(N.apply(0,arguments))))};if(Op.includes(t))return function(){return n.Wl.apply(n,[e,t].concat(d(N.apply(0,arguments))))};if(Lp.has(t)||Rp.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},r.set=function(e,t,n){this.g[e][t]=n,Hp(this,{type:"set",targetName:e,property:t,value:n})},r.qj=function(e,t){Hp(this,{type:"call",targetName:e,methodName:t,args:N.apply(2,arguments)})},r.Wl=function(e,t){var n=N.apply(2,arguments),i=new jr,r=this.H.toString();this.H++,this.h.set(r,i);try{Hp(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var zp=.02,Kp=!1,Wp=null,qp=null,Xp=new Set;function Yp(t){if(qp?e.__onGCastApiAvailable=qp:delete e.__onGCastApiAvailable,qp=null,t)for(var n=c(Xp),i=n.next();!i.done;i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function Jp(t,n,i,r){r=void 0!==r&&r,ee.call(this);var a=this;this.i=t,this.h=n,this.l=this.s=this.m=this.u=this.j=null,this.H=i,this.G=r,this.D=[],this.C=[],this.B=[],this.F=new Map,this.g=null,e.chrome?(this.g=new Up(i,function(){return Zp(a)},function(){return ef(a)},function(e,t){return af(a,e,t)},function(){return tf(a)},function(){return $p(a)},r),function(e){e.g.init(),e.l=new xt;for(var t=c(kp),n=t.next();!n.done;n=t.next())e.l.o(e.i,n.value,function(t){e.g.Pa()||(t=K(t),e.m.dispatchEvent(t))});for(var i in W)e.l.o(e.h,W[i],function(t){e.g.Pa()||e.s.dispatchEvent(t)});for(var r in e.j={},t={},e.i)(t={me:t.me}).me=r,Object.defineProperty(e.j,t.me,{configurable:!1,enumerable:!0,get:function(t){return function(){return nf(e,t.me)}}(t),set:function(t){return function(n){var i=t.me;e.g.Pa()?e.g.set("video",i,n):e.i[i]=n}}(t)});e.u={},Qp(e,function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return rf(e,t)}})}),function(e){var t=new Map;Qp(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.F.set(n,i):e.F.set(i,n)):t.set(i,n)})}(e),e.m=new ee,e.m.Qe=e.j,e.s=new ee,e.s.Qe=e.u,e.l.o(e.h,"unloading",function(){e.g&&e.g.Pa()||of(e)})}(this)):(this.j=this.i,this.u=this.h)}function Qp(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!a.has(e)}var i,r=e.h,a=new Set;for(i in r)n(i)&&(a.add(i),t(i,r[i]));for(e=Object.getPrototypeOf(r),i=Object.getPrototypeOf({});e&&e!=i;){for(var o=c(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,r[s]));e=Object.getPrototypeOf(e)}}function $p(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.zd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChapter
1sTrackCalls:e.B};e.i.pause();for(var n=c(Cp),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=c(Dp)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=c(Np)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function Zp(e){var t=new z("caststatuschanged");e.dispatchEvent(t)}function ef(e){var t=new z(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function tf(e){for(var t=c(Dp),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.D,a=e.C,o=e.B;of(e);var s=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var u,l=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime")),(i=e.g.get("player","getTextTracks")())&&i.length&&(u=i.find(function(e){return e.active}));var h=e.g.get("player","isTextTrackVisible")();s&&(e.i.autoplay=!1,t=e.h.load(s,n));var p={};for(i=(n=c(Cp)).next();!i.done;i=n.next())i=i.value,p[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var t=c(r),n=t.next();!n.done;n=t.next()){var i;n=n.value,(i=e.Sb()).Ye.apply(i,d(n))}for(i=(t=c(a)).next();!i.done;i=t.next()){var f;i=i.value,(f=e.Sb()).Ud.apply(f,d(i))}for(t=(f=c(o)).next();!t.done;t=f.next()){var g;t=t.value,(g=e.Sb()).Xe.apply(g,d(t))}for(f=(g=c(Cp)).next();!f.done;f=g.next())f=f.value,e.i[f]=p[f];for(f=(g=c(Np)).next();!f.done;f=g.next())f=(t=f.value)[1],t=e.g.get("player",t[0])(),e.h[f](t);e.h.Ae(h),u&&e.h.Sh(u.language,u.roles,u.forced),e.i.autoplay=l,s&&e.i.play()}},function(t){t=new z("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}function nf(e,t){if("addEventListener"==t)return function(t,n,i){return e.m.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.m.removeEventListener(t,n,i)};if(e.g.Pa()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.Pa()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}function rf(e,t,n){if(n=void 0!==n&&n,e.F.has(t)&&(t=e.F.get(t)),"addEventListener"==t)return function(t,n,i){return e.s.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.s.removeEventListener(t,n,i)};if("getMediaElement"==t)return function(){return e.j};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Ib()};if("getDrmEngine"==t)return function(){return e.h.D};if("getAdManager"==t)return function(){return e.h.mf()};if("getQueueManager"==t)return function(){return e.h.lh()};if("setVideoContainer"==t)return function(t){return e.h.Zh(t)};if(!n){if("addThumbnailsTrack"==t)return function(){var n=N.apply(0,arguments);return e.D.push(n),rf(e,t,!0).apply(null,d(n))};if("addTextTrackAsync"==t)return function(){var n=N.apply(0,arguments);return e.C.push(n),rf(e,t,!0).apply(null,d(n))};if("addChaptersTrack"==t)return function(){var n=N.apply(0,arguments);return e.B.push(n),rf(e,t,!0).apply(null,d(n))}}if(e.g.Pa()){if("getManifest"==t||"drmInfo"==t)return function(){return Y(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return Y(t+"() does not work while casting!"),Promise.resolve()};if("getChapters"==t)return function(){return Y(t+"() does not work while casting!"),[]}}return e.g.Pa()&&0==Object.keys(e.g.g.video).length&&(Lp.has(t)||Rp.has(t))||!e.g.Pa()?e.h[t].bind(e.h):e.g.get("player",t)}function af(e,t,n){e.g.Pa()&&("video"==t?e.m.dispatchEvent(n):"player"==t&&("unloading"==n.type&&of(e),e.s.dispatchEvent(n)))}function of(e){e.D=[],e.C=[],e.B=[]}function sf(e,t,n,i){ee.call(this);var r=this;this.h=e,this.g=t,this.j=new xt,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(e){return e},this.i=null,this.G=!1,this.s=!0,this.m=0,this.C=!1,this.B=!0,this.u=this.l=null,this.D=new Ki(function(){df(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return uf(e)},t.onSenderDisconnected=function(){return uf(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&gf(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),gf(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(t){return function(e,t){var n=xp(t.data);switch(n.type){case"PLAY":e.h.play(),mf(e);break;case"PAUSE":e.h.pause(),mf(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;null!=t&&(e.h.currentTime=Number(t)),i&&"PLAYBACK_START"==i?(e.h.play(),mf(e)):i&&"P
1LAYBACK_PAUSE"==i&&(e.h.pause(),mf(e));break;case"STOP":e.g.lc().then(function(){e.g&&mf(e)});break;case"GET_STATUS":pf(e,Number(n.requestId));break;case"VOLUME":t=(i=n.volume).level,i=i.muted;var r=e.h.volume,a=e.h.muted;null!=t&&(e.h.volume=Number(t)),null!=i&&(e.h.muted=i),r==e.h.volume&&a==e.h.muted||mf(e);break;case"LOAD":e.m=0,e.C=!1,e.B=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),a=n.autoplay||!0,e.F(t.customData),a&&(e.h.autoplay=!0),e.g.load(r,i).then(function(){e.g&&pf(e)}).catch(function(t){var i="LOAD_FAILED";7==t.category&&7e3==t.code&&(i="LOAD_CANCELLED"),gf(e,{requestId:Number(n.requestId),type:i},e.u)});break;default:gf(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=xp(t.data);switch(n.type){case"init":e.m=0,e.C=!1,e.B=!0,function(e,t,n){var i,r,a,o,s,u,l,h,p,f,g,m,v,y,b,T,E,I,C;D(function(M){switch(M.g){case 1:for(i in t.player)r=t.player[i],e.g[i](r);return e.F(n),a=e.h.autoplay,t.manifest?(e.h.autoplay=!1,A(M,5),S(M,e.g.load(t.manifest,t.startTime),7)):S(M,Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(o=c(t.addThumbnailsTrackCalls),s=o.next();!s.done;s=o.next())u=s.value,e.g.Ye.apply(e.g,d(u));if(t.addTextTrackAsyncCalls)for(l=c(t.addTextTrackAsyncCalls),h=l.next();!h.done;h=l.next())p=h.value,e.g.Ud.apply(e.g,d(p));if(t.addChaptersTrackCalls)for(f=c(t.addChaptersTrackCalls),g=f.next();!g.done;g=f.next())m=g.value,e.g.Xe.apply(e.g,d(m));x(M,3);break;case 5:return v=k(M),y=(new Map).set("detail",v),b=new z("error",y),e.g&&e.g.dispatchEvent(b),M.return();case 3:if(!e.g)return M.return();for(T in t.video)E=t.video[T],e.h[T]=E;for(I in t.playerAfterLoad)C=t.playerAfterLoad[I],e.g[I](C);e.h.autoplay=a,t.manifest&&(e.h.play(),mf(e)),w(M)}})}(e,n.initState,n.appData),df(e);break;case"appData":e.F(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,"video"==i){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==r){t.setSystemVolumeLevel(n);break}if("muted"==r){t.setSystemVolumeMuted(n);break}}e.H[i][r]=n;break;case"call":(i=e.H[n.targetName])[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,"player"==i&&"load"==r&&(e.m=0,e.C=!1);var a=n.id,o=t.senderId;n=(t=e.H[i])[r].apply(t,n.args),"player"==i&&"load"==r&&(n=n.then(function(){e.B=!0})),n.then(function(t){return ff(e,o,a,null,t)},function(t){return ff(e,o,a,t,null)})}}(e,t)},t.start();for(var n=(t=c(kp)).next();!n.done;n=t.next())e.j.o(e.h,n.value,function(t){return cf(e,"video",t)});for(var i in W)e.j.o(e.g,W[i],function(t){return cf(e,"player",t)});e.j.o(e.h,"loadeddata",function(){e.C=!0}),e.j.o(e.g,"loading",function(){e.s=!1,lf(e)}),e.j.o(e.h,"playing",function(){e.s=!1,lf(e)}),e.j.o(e.h,"pause",function(){lf(e)}),e.j.o(e.g,"unloading",function(){e.s=!0,lf(e)}),e.j.o(e.h,"ended",function(){new Ki(function(){e.h&&e.h.ended&&(e.s=!0,lf(e))}).X(yf)})}(this)}function uf(e){e.m=0,e.B=!0,e.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,lf(e)}function lf(e){var t;D(function(n){return 1==n.g?S(n,Promise.resolve(),2):e.g?(t=new z("caststatuschanged"),e.dispatchEvent(t),hf(e)||mf(e),void w(n)):n.return()})}function cf(e,t,n){e.g&&(df(e),gf(e,{type:"event",targetName:t,event:n},e.l))}function df(e){e.D.X(vf);for(var t={video:{},player:{}},n=c(Ip),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.h[i];e.g.T()&&Pp.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.g[i]())}
1),Lp.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.g[i]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),gf(e,{type:"update",update:t},e.l),Rp.forEach(function(t,n){0==e.m%t&&((t={player:{}}).player[n]=e.g[n](),gf(e,{type:"update",update:t},e.l))}),e.C&&(e.m+=1),hf(e)}function hf(e){return!(!e.B||!e.h.duration&&!e.g.T())&&(pf(e),e.B=!1,!0)}function pf(e,t){var n={contentId:e.g.zd(),streamType:e.g.T()?"LIVE":"BUFFERED",contentType:""};e.g.T()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),mf(e,void 0===t?0:t,n)}function ff(e,t,n,i,r){e.g&&gf(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function gf(e,t,n,i){e.G&&(e=Ep(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function mf(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.s?bf:e.g.xf()?Sf:e.h.paused?wf:Tf,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),gf(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}v(Jp,ee),(r=Jp.prototype).destroy=function(e){return this.g&&void 0!==e&&e&&this.g.yd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,ee.prototype.release.call(this),Promise.all(e)},r.Jc=function(){return this.j},r.Sb=function(){return this.u},r.Dg=function(){return!!this.g&&(this.g.m&&Kp)},r.Pa=function(){return!!this.g&&this.g.Pa()},r.Tf=function(){return this.g?this.g.Tf():""},r.cast=function(){var e=this;return D(function(t){return 1==t.g?e.g?S(t,e.g.cast(),2):t.return():e.h?S(t,e.h.lc(),0):t.return()})},r.Th=function(e){this.g&&this.g.Th(e)},r.Oj=function(){var e;this.g&&((e=this.g).i&&chrome.cast.requestSession(function(t){return jp(e,t)},function(t){return Bp(e,t)}))},r.yd=function(){this.g&&this.g.yd()},r.Ei=function(e,t){t=void 0!==t&&t;var n=this;return D(function(i){if(1==i.g)return e==n.H&&t==n.G?i.return():(n.H=e,n.G=t,n.g?(n.g.yd(),S(i,n.g.destroy(),2)):i.return());n.g=null,n.g=new Up(e,function(){return Zp(n)},function(){return ef(n)},function(e,t){return af(n,e,t)},function(){return tf(n)},function(){return $p(n)},t),n.g.init(),w(i)})},H("shaka.cast.CastProxy",Jp),Jp.prototype.changeReceiverId=Jp.prototype.Ei,Jp.prototype.forceDisconnect=Jp.prototype.yd,Jp.prototype.suggestDisconnect=Jp.prototype.Oj,Jp.prototype.setAppData=Jp.prototype.Th,Jp.prototype.cast=Jp.prototype.cast,Jp.prototype.receiverName=Jp.prototype.Tf,Jp.prototype.isCasting=Jp.prototype.Pa,Jp.prototype.canCast=Jp.prototype.Dg,Jp.prototype.getPlayer=Jp.prototype.Sb,Jp.prototype.getVideo=Jp.prototype.Jc,Jp.prototype.destroy=Jp.prototype.destroy,v(sf,ee),(r=sf.prototype).isConnected=function(){return this.G},r.wl=function(){return this.s},r.gm=function(e){this.i=e},r.jk=function(){this.i=null},r.hm=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},r.fm=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},r.em=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},r.destroy=function(){var e,t=this;return D(function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.g&&(e.push(t.g.destroy()),t.g=null),t.D&&(t.D.stop(),t.D=null),t.h=null,t.H=null,t.F=null,t.G=!1,t.s=!0,t.l=null,t.u=null,ee.prototype.release.call(t),S(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),w(n)})},H("shaka.cast.CastReceiver",sf),sf.prototype.destroy=sf.prototype.destroy,sf.prototype.setContentArtist=sf.prototype.em,sf.prototype.setContentImage=sf.prototype.fm,sf.prototype.setContentTitle=sf.prototype.hm,sf.prototype.clearContentMetadata=sf.prototype.jk,sf.prototype.setContentMetadata=sf.prototype.gm,sf.prototype.isIdle=sf.prototype.wl,sf.prototype.isConnected=sf.prototype.isConnected;var vf=.5,yf=5,bf="IDLE",Tf="PLAYING",Sf="BUFFERING",wf="PAUSED";function Af(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some(function(e){return null!=e&&""!=e.g.trim()})){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=Ef(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],p=-1,f=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}for(g=h.length-1;0<=g;g--)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}if(-1===p||-1===f)h=xf(i,r),e.nestedCues.push(h);else{for(;p<=f;p++)if(g=h[p]){var m=g.l,v=g.i,y=g.j,b=g.h;m==s&&v==u&&y==l&&b==c||(d.payload&&e.nestedCues.push(d),d=Ef(i,r,m,v,y,b),s=m,u=v,l=y,c=b),d.payload+=g.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=xf(i,r),e.nestedCues.push(d)),d=Ef(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Ef(e,t,n,i,r,a){return e=new Kn(e,t,""),n&&e.textDecoration.push(gi),i&&(e.fontStyle=pi),e.color=r,e.backgroundColor=a,e}function xf(e,t){return(e=new Kn(e,t,"")).lineBreak=!0,e}function kf(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function If(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.s="black",this.u=this.B=null,Mf(this)}function Cf(e,t,n){var i="CC"+(1+(e.D<<1|e.C)),r=new Kn(t,n,"");r.lineInterpretation=1;var a=Uf.get(e.g);return a&&(r.line=a),null!=e.u&&null!=e.B&&(r.position=10+Math.min(70,10*e.u)+2.5*e.B),(t=Af(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(a=Uf.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function Mf(e){Pf(e,0,15),e.g=1}function Lf(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=Df.has(n)?Df.get(n):String.fromCharCode(n);break;case 1:i=Nf.get(n);break;case 2:e.i[e.g].pop(),i=_f.get(n);break;case 3:e.i[e.g].pop(),i=Of.get(n)}i&&e.i[e.g].push(new kf(i,e.m,e.j,e.s,e.l))}}function Rf(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(e){return e});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(e){return e})}function Pf(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var Df=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),Nf=new Map([[48,"Â
1®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),_f=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),Of=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"Â¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"Ã¥"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),Uf=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 jf(e,t){this.h=0,this.s=new If(e,t),this.i=new If(e,t),this.g=this.j=new If(e,t),this.l=0,this.m=null}function Bf(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=Cf(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,Pf(n,0,15),(n=e.j).g=0<n.h?n.h:0,Pf(n,0,15),i.g=15),e.h=3,i.h=t,r}function Ff(e){e.h=1,e.g=e.j,e.g.h=0}function Vf(e){J("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.s,e.h=4}var Gf="black green blue cyan red yellow magenta black".split(" "),Hf="white green blue cyan red yellow magenta white_italics".split(" ");function zf(e,t){this.I=t,this.L=e,this.J=this.l=!1,this.m=this.s=this.G=this.K=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",Kf(this)}function Kf(e){e.i=[];for(var t=0;16>t;t++)e.i.push(Wf())}function Wf(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function qf(e,t){Xf(e)&&(e.i[e.h][e.g]=new kf(t,e.D,e.B,e.u,e.C),e.g++)}function Xf(e){var t=e.g<e.m&&0<=e.g;return e.h<e.s&&0<=e.h&&t}function Yf(e,t,n){var i=new Kn(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":Zn;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.L,r.height=e.s,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.K,r.viewportAnchorUnits=e.J?Jt:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Af(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function Jf(){this.i=[],this.h=null,this.g=0}function Qf(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new $f(e.h)),e.h=null,e.g=0))}function $f(e){this.g=0,this.h=e}function Zf(e){if(!e.Oa())throw new Ce(2,2,3e3);return e.h[e.g++]}function eg(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function tg(e,t,n,i){if(!e.g)return[];if(24==n)return n=Zf(t).value,i=Zf(t).value,n=[n,i].map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join(""),qf(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!Xf(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=Yf(t,i,e.i)),t.h+1>=t.s?function(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=Wf()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=Yf(t,i,e.i)),t.i[t.h]=Wf(),t.g=0;break;case 12:t.isVisible()&&(r=Yf(t,i,e.i)),Kf(t),t.h=0,t.g=0}return r?[r]:[]}function ng(e,t,n,i){if(128<=n&&135>=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=Zf(t).value,t=[];for(var r=(n=c(ig(e,n))).next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=Yf(r,i,e.i);a&&t.push(a)}Kf(r)}return t}if(137===n)for(n=(t=c(ig(e,t=Zf(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.display();else{if(138===n){for(n=Zf(t).value,t=null,r=(n=c(ig(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Yf(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=Zf(t).value,t=null,r=(n=c(ig(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=Yf(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return rg(e,t=Zf(t).value,i);if(143===n)return i=rg(e,255,i),ag(e),i;if(144===n)t.skip(1),i=Zf(t).value,e.g&&(e.g.B=0<(128&i),e.g.D=0<(64&i));
1else if(145===n)i=Zf(t).value,n=Zf(t).value,t.skip(1),e.g&&(t=og((48&n)>>4,(12&n)>>2,3&n),e.g.C=og((48&i)>>4,(12&i)>>2,3&i),e.g.u=t);else if(146===n)i=Zf(t).value,t=Zf(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=Zf(t).value,t.skip(1),e.g&&(e.g.F=3&i);else if(152<=n&&159>=n){n=(15&n)-8,(r=null!==e.h[n])||((a=new zf(n,e.i)).j=i,e.h[n]=a),i=Zf(t).value,a=Zf(t).value;var o=Zf(t).value,s=Zf(t).value,u=Zf(t).value;t=Zf(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),(t=e.h[n]).l=0<(32&i),t.K=127&a,t.H=o,t.G=(240&s)>>4,t.J=0<(128&a),t.s=1+(15&s),t.m=1+(63&u),e.g=e.h[n]}}}return[]}function ig(e,t){for(var n=[],i=0;8>i;i++)!(1&~t)&&e.h[i]&&n.push(i),t>>=1;return n}function rg(e,t,n){for(var i=[],r=(t=c(ig(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=Yf(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function ag(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function og(e,t,n){var i={0:0,1:0,2:1,3:1};return ug[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}zf.prototype.isVisible=function(){return this.l},zf.prototype.display=function(){this.l=!0},$f.prototype.Oa=function(){return this.g<this.h.length},$f.prototype.Ua=function(){return this.g},$f.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Ce(2,2,3e3);this.g+=e},$f.prototype.vj=function(e){if(0>this.g-e)throw new Ce(2,2,3e3);this.g-=e};var sg=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),ug="black blue green cyan red magenta yellow white".split(" ");function lg(){this.h=[],this.g=[],this.i=new Jf,this.l=0,this.m=new Map([["CC1",new jf(0,0)],["CC2",new jf(0,1)],["CC3",new jf(1,0)],["CC4",new jf(1,1)]]),this.u=this.s=0,this.j=new Map,this.C=!0,this.B=new Set,cg(this)}function cg(e){e.s=0,e.u=0;for(var t=c(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,Mf(n.i),Mf(n.j),Mf(n.s);e.C=!0}function dg(e,t){var n=t.type;if(16==(112&t.Fb)){var i=t.Fb>>3&1;0===n?e.s=i:e.u=i}if(i="CC"+(1+(n<<1|(n?e.u:e.s))),n=e.m.get(i),255===t.Fb&&255===t.mc||!t.Fb&&!t.mc||!pg(t.Fb)||!pg(t.mc))return 45<=++e.l&&cg(e),null;e.l=0,t.Fb&=127,t.mc&=127;var r=t.Fb;if(1<=r&&15>=r||!t.Fb&&!t.mc)return null;if(r=null,16==(112&t.Fb))e:{if(e.B.add(i),i=t.Fb,e=t.mc,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,16==(240&i)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1],i="white",r=!1;var a=null,o=95<e?e-96:e-64;13>=o?i=Hf[Math.floor(o/2)]:15>=o?r=!0:a=Math.floor((o-16)/2),e=!(1&~e),4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(Rf(o,n=1+t-o.h,1+o.g-o.h,o.h),Pf(o,0,n-1),Pf(o,t+1,15-t)),o.g=t,o.m=e,o.j=r,o.l=i,o.u=a,o.s="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",Lf(n.g,0,32),i=!1,"white_italics"===(t=Hf[(14&e)>>1])&&(t="white",i=!0),n.g.m=!(1&~e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",!(7&i)&&(t=Gf[(14&e)>>1]),n.g.s=t;else if(17==(247&i)&&48==(240&e))Lf(n.g,1,e);else if(18==(246&i)&&32==(224&e))Lf(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.mc){case 32:Ff(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=Bf(n,2,e);break;case 38:i=Bf(n,3,e);break;case 39:i=Bf(n,4,e);break;case 40:Lf(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Mf(n.s),Vf(n);break;case 43:Vf(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=Cf(t,n.l,e)),Pf(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=Cf(t,n.l,e),Rf(t,(r=t.g-t.h+1)-1,r,t.h),Pf(t,0,r-1),Pf(t,t.g,15-t.g),n.l=e);break;case 46:Pf(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=Cf(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,Ff(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&33<=e&&35>=e&&(n.g.B=e-32)}r=null}else e=t.mc,Lf(n.g,0,t.Fb),Lf(n.g,0,e);return r}function hg(e,t){var n=[];try{for(;t.Oa();){var i=Zf(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&Zf(t).value),0!=r){e.B.add("svc"+r),e.j.has(r)||e.j.set(r,new eg(r));for(var o=e.j.get(r),s=t.Ua();t.Ua()-s<a;){r=o;var u=t,l=Zf(u),c=l.value,h=l.pts;if(16===c)c=c<<16|Zf(u).value;if(0<=c&&31>=c)var p=tg(r,u,c,h);else if(128<=c&&159>=c)p=ng(r,u,c,h);else{if(4096<=c&&4127>=c)r=u,8<=(u=255&c)&&15>=u?r.skip(1):16<=u&&23>=u?r.skip(2):24<=u&&31>=u&&r.skip(3);else if(4224<=c&&4255>=c)r=u,128<=(u=255&c)&&135>=u?r.skip(4):136<=u&&143>=u&&r.skip(5);else if(32<=c&&127>=c)u=c,r.g&&qf(r.g,127===u?"♪":String.fromCharCode(u));else if(160<=c&&255>=c)r.g&&qf(r.g,String.fromCharCode(c));else if(4128<=c&&4223>=c){if(u=255&c,r.g)if(sg.has(u)){var f=sg.get(u);qf(r.g,f)}else qf(r.g,"_")}else 4256<=c&&4351>=c&&r.g&&qf(r.g,160!=(255&c)?"_":"[CC]");p=[]}n.push.apply(n,d(p))}}}}catch(e){if(!(e instanceof Ce&&3e3===e.code))throw e;
1J("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function pg(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function fg(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(d(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function gg(){this.j=new Map,this.i=this.h=0,this.g=vg}function mg(e,t,n,i,r,a,o,s,u){var l=0,h=a,p=s.map(function(e){return e.Qh});for((p=[].concat.apply([],d(p))).length&&(h=p[0].sampleSize||a),t.skip(o+s[0].Ng);t.Oa();){o=t.W();var f=t.aa(),g=null;switch(g=!1,s=1,e.g){case yg:g=6==(g=31&f);break;case bg:s=2,t.skip(1),g=39==(g=f>>1&63)||40==g;break;case Tg:s=2,t.skip(1),g=23==(g=f>>1&63)||24==g;break;default:return}if(g)for(f=0,l<p.length&&(f=p[l].Xf||0),f=(n+f)/i,g=(s=c(fg(t.Xb(o-s)))).next();!g.done;g=s.next())u.push({packet:g.value,pts:f});else try{t.skip(o-s)}catch(e){break}0==(h-=o+4)&&(n=l<p.length?n+(p[l].Rh||r):n+r,h=++l<p.length&&p[l].sampleSize||a)}}lg.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,cg(this);for(var t=(e=c(this.j.values())).next();!t.done;t=e.next())ag(t.value)},lg.prototype.extract=function(e,t){if(this.C){for(var n=c(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.C=!1}if(!(8>(e=new ua(e,0)).getLength())&&181===e.aa()&&49===e.Fa()&&1195456820===e.W()&&3===e.aa()&&64&(n=e.aa()))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.aa(),a=(4&r)>>2,o=e.aa(),s=e.aa();a&&(0===(r&=3)||1===r?this.h.push({pts:t,type:r,Fb:o,mc:s,order:this.h.length}):(this.g.push({pts:t,type:r,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},lg.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=c(this.h),i=n.next();!i.done;i=n.next())(i=dg(this,i.value))&&t.push(i);for(i=(n=c(this.g)).next();!i.done;i=n.next())Qf(this.i,i.value);for(i=(n=c(this.i.i)).next();!i.done;i=n.next())i=hg(this,i.value),t.push.apply(t,d(i));return this.i.i=[],this.h=[],this.g=[],t},lg.prototype.getStreams=function(){return Array.from(this.B)},H("shaka.cea.CeaDecoder",lg),Xt=function(){return new lg},gg.prototype.init=function(e){function t(e){e=e.name,Sg.has(e)&&(n.g=Sg.get(e))}var n=this,i=[],r=[];if((new da).box("moov",ha).box("mvex",ha).V("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.W(),t=t.W(),n.h=e,n.i=t}).box("trak",ha).V("tkhd",function(e){var t=e.reader;1==(e=e.version)?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4));var n=t.W();1==e?t.skip(8):t.skip(4),t.skip(4),t.skip(8),t.skip(2),t.skip(2),t.skip(2),t.skip(2),t.skip(36),t.Fa(),t.Fa(),t.Fa(),t.Fa(),i.push(n)}).box("mdia",ha).V("mdhd",function(e){e=fo(e.reader,e.version),r.push(e.timescale)}).box("minf",ha).box("stbl",ha).V("stsd",pa).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",fa).box("sinf",ha).box("frma",function(e){e=vo(e.reader).codec,Sg.has(e)&&(n.g=Sg.get(e))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new Ce(2,2,2010);this.g==vg&&Y("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},gg.prototype.parse=function(e){var t=this;if(this.g==vg)return[];var n=[],i=0,r=[];return(new da).box("moof",function(e){i=e.start,r=[],ha(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,Yd:t.h,Zd:t.i,mj:[],timescale:9e4}),ha(e)}).V("trun",function(e){var t=r[r.length-1];e=go(e.reader,e.version,e.flags),t.mj.push(e)}).V("tfhd",function(e){var n=r[r.length-1];e=ho(e.reader,e.flags),n.Yd=e.Yd||t.h,n.Zd=e.Zd||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).V("tfdt",function(e){var t=r[r.length-1];e=po(e.reader,e.version),t.baseMediaDecodeTime=e.baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.Ua(),s=c(r),u=s.next();!u.done;u=s.next())null===(u=u.value).baseMediaDecodeTime?Y("Unable to find base media decode time for CEA captions!"):(e.reader.seek(o),mg(t,e.reader,u.baseMediaDecodeTime,u.timescale,u.Yd,u.Zd,a,u.mj,n))}).parse(e,!1),n},H("shaka.cea.Mp4CeaParser",gg);var vg=0,yg=1,bg=2,Tg=3,Sg=(new Map).set("avc1",yg).set("avc3",yg).set("dvav",yg).set("dva1",yg).set("hev1",bg).set("hvc1",bg).set("dvh1",bg).set("dvhe",bg).set("vvc1",Tg).set("vvi1",Tg).set("dvc1",Tg).set("dvi1",Tg);function wg(){this.g=null}function Ag(e){return(e=function(e){var t=0,n=ke(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,1&r||r+e>n.byteLength){n=[];break e}var a=Ee(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e=qe(bn(e))).filter(function(e){return e.type===xg})[0])&&(e=fn(e=Ue(e.value,!0),"WRMHEADER"))?e:null}function Eg(e){try{var t=Ag(e);if(t)e:{for(var n=c(Sn(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=c(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var u=bn(s);break e}}}u=""}else u="";return u}catch(e){return""}}Kt("video/mp4",function(){return new gg}),wg.prototype.init=function(){},wg.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Os;var t=[];if(!Fs(e=Ee(e)))return t;var n=(e=this.g.parse(e)).ae(),i=e.tf();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=c(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=c(fg(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},H("shaka.cea.TsCeaParser",wg),Kt("video/mp2t",function(){return new wg});var xg=1;function kg(t,n,i){var r=function(e){for(var t=[],n=(e=c(e)).next();!n.done;n=e.next())(n=Cg(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,u=new Set(r.map(function(e){return e.keyId}));u.delete(null);var l="cenc";if(1<u.size)throw new Ce(2,4,4010);
1if(!n){if(1<(o=r.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.Nd})).length)throw new Ce(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Ce(2,4,4042);var n=An(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n)throw new Ce(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri)throw new Ce(2,4,4051);if(n=An(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!n)throw new Ce(2,4,4051);if(t=n.attributes.IV,n=Ge(n.attributes.keyUriTemplate),!t||!n)throw new Ce(2,4,4051);if(t=Xe(t.substr(2)),16!=t.byteLength)throw new Ce(2,4,4048);return{Cl:n,iv:t}}(o[0])),(o=r.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Nd}))&&o.encryptionScheme&&(l=o.encryptionScheme),(o=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Nd?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.Nd})).length&&(t=function(e,t,n,i,r){for(var a=[],o=(n=c(n)).next();!o.done;o=n.next()){var s=i[(o=o.value).Nd];if(s){var u;if((u=An(o.node,"urn:microsoft:playready","pro"))&&bn(u)){u=qe(u=bn(u));var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);u=[{initData:Aa(u,l,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else u=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.Nd){l=o;var d=r;if(0==d.size)l=null;else{var h=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);l=[{initData:Aa(new Uint8Array([]),h,d,1),initDataType:"cenc",keyId:l.keyId}]}}u=$e(s,t,o.init||e||u||l),(s=Mg.get(s))&&(u.licenseServerUri=s(o)),a.push(u)}}return a}(a,l,o,i,u),0==t.length&&(t=[$e("",l,a)]))}if(r.length&&!s&&(n||!o.length))for(t=[],i=(n=c(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&t.push($e(i,l,a));if(u=Array.from(u)[0]||null)for(n=(l=c(t)).next();!n.done;n=l.next())for(i=(n=c(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=u;return{Ii:u,Gn:a,drmInfos:t,Ag:s,Ni:!0}}function Ig(e){var t=An(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=bn(t)))return t;if((t=An(e.node,"urn:microsoft:playready","pro"))&&bn(t))return Eg(t);if((e=An(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=bn(e))){t=qe(e),e=8;var n=(t=ke(t)).getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),Eg(e=fn("<pro>"+(e=Ke(e=Ee(t,e+4)))+"</pro>"))}return""}function Cg(e){var t=e.attributes.schemeIdUri,n=xn(e,"urn:mpeg:cenc:2013","default_KID"),i=kn(e,"urn:mpeg:cenc:2013","pssh").map(Tn),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new Ce(2,4,4009);var a=[];try{a=i.map(function(e){return{initDataType:"cenc",initData:qe(e),keyId:null}})}catch(e){throw new Ce(2,4,4007)}return{node:e,Nd:t,keyId:n,init:0<a.length?a:null,encryptionScheme:r}}var Mg=(new Map).set("com.apple.fps",function(t){if("apple"===e.shakaMediaKeysPolyfill)throw new Ce(2,4,4054);return(t=An(t.node,"https://dashif.org/CPS","Laurl"))&&(t=bn(t))?t:""}).set("com.widevine.alpha",function(e){var t=An(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=bn(t))?t:(e=An(e.node,"urn:microsoft","laurl"))&&Ge(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",Ig).set("com.microsoft.playready.recommendation",Ig).set("com.microsoft.playready.software",Ig).set("com.microsoft.playready.hardware",Ig).set("org.w3.clearkey",function(e){var t=An(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=bn(t))?t:(e=An(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=bn(e))?e:""});function Lg(t,n,i,r,a,o){var s=(new Map).set("RepresentationID",n).set("Number",i).set("SubNumber",r).set("Bandwidth",a).set("Time",o);return t.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(t,n,i,r){if("$$"==t)return"$";var a=s.get(n);if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&"bigint"!=typeof a&&(.2<=Math.abs(a-Math.round(a))&&Y("Calculated $Time$ values must be close to integers"),a=Math.round(a)),r){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return i=e.parseInt(i,10)||1,Array(Math.max(0,i-t.length)+1).join("0")+t})}function Rg(e,t){var n=Dg(e,t,"timescale"),i=1;n&&(i=Pn(n)||1);var r=(n=Pn((n=Dg(e,t,"duration"))||""))?n/i:null,a=Dg(e,t,"startNumber"),o=Number(Dg(e,t,"presentationTimeOffset"))||0,s=Dn(a||"");if(null!=a&&null!=s||(s=1),a=null,t=Ng(e,t,"SegmentTimeline")){t=yn(t,"S"),a=i,e=e.va.duration||1/0;for(var u=s,l=[],c=-o,d=0;d<t.length;++d){var h=t[d],p=t[d+1],f=En(h,"t",Dn),g=En(h,"d",Dn),m=En(h,"r",Rn);if(h=En(h,"k",Rn)||0,null!=f&&(f-=o),g){if(f=null!=f?f:c,0>
1(m=m||0))if(p){if(null==(p=En(p,"t",Dn)))break;if(f>=p)break;m=Math.ceil((p-f)/g)-1}else{if(1/0==e)break;if(f/a>=e)break;m=Math.ceil((e*a-f)/g)-1}for(0<l.length&&f!=c&&(l[l.length-1].end=f/a),p=0;p<=m;++p)c=f+g,l.push({start:f/a,end:c/a,ni:f,ec:h,cm:l.length+u}),f=c}}a=l}return{timescale:i,hg:n,mb:r,Be:s,fc:o/i||0,mi:o,timeline:a}}function Pg(e,t){return[t(e.M),t(e.ua),t(e.za)].filter(Xi)}function Dg(e,t,n){t=Pg(e,t),e=null;for(var i=(t=c(t)).next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function Ng(e,t,n){t=Pg(e,t),e=null;for(var i=(t=c(t)).next();!i.done&&!(e=wn(i.value,n));i=t.next());return e}function _g(e,t,n,i,r,a){if(a=void 0===a?0:a,xn(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=xn(e,"http://www.w3.org/1999/xlink","href"),s=xn(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=c(Object.keys(e.attributes)),l=u.next();!l.done;l=u.next()){var d=(l=l.value).split(":"),h=gn("http://www.w3.org/1999/xlink");d[0]==h&&delete e.attributes[l]}if(5<=a)return Fr(new Ce(2,4,4028));if("onLoad"!=s)return Fr(new Ce(2,4,4027));var p=Qe([i],[o]);return r.request(0,Jr(p,t)).ab(function(i){if(!(i=pn(i.data,e.tagName)))return Fr(new Ce(2,4,4001,o));for(e.children=[];i.children.length;){var s=i.children.shift();e.children.push(s)}for(var u=(s=c(Object.keys(i.attributes))).next();!u.done;u=s.next())u=u.value,e.attributes[u]=i.attributes[u];return _g(e,t,n,p[0],r,a+1)})}(e,t,n,i,r,a);return n&&(o=o.ab(void 0,function(){return _g(e,t,n,i,r,a)})),o}o=[];for(var s=c(vn(e)),u=s.next(),l={};!u.done;l={Vd:void 0},u=s.next())l.Vd=u.value,"urn:mpeg:dash:resolve-to-zero:2013"==xn(l.Vd,"http://www.w3.org/1999/xlink","href")?e.children=e.children.filter(function(e){return function(t){return t!==e.Vd}}(l)):"SegmentTimeline"!=l.Vd.tagName&&o.push(_g(l.Vd,t,n,i,r,a));return zr(o).ab(function(){return e})}function Og(e,t,n,i,r,a,o){var s,u=(new da).V("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.W();if(0==u)throw new Ce(2,3,3005);if(0==o.version)var l=o.reader.W(),c=o.reader.W();else l=o.reader.Ld(),c=o.reader.Ld();o.reader.skip(2);var d=o.reader.Fa();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.W(),p=(2147483648&h)>>>31;h&=2147483647;var f=o.reader.W();if(o.reader.skip(4),1==p)throw new Ce(2,3,3006);s.push(new $o(l/u+n,(l+f)/u+n,function(){return a},e,e+h-1,t,n,i,r)),l+=f,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)});if(e&&u.parse(e),s)return s;throw new Ce(2,3,3004)}function Ug(e){this.h=ke(e),this.g=new ua(this.h,0)}function jg(e){var t=Bg(e);if(7<t.length)throw new Ce(2,3,3002);for(var n=0,i=(t=c(t)).next();!i.done;i=t.next())n=256*n+i.value;t=Bg(e);e:{for(var r=(i=c(Fg)).next();!r.done;r=i.next())if(we(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ua();else{if(8==t.length&&224&t[1])throw new Ce(2,3,3001);for(r=i=0;r<t.length;r++){var a=t[r];i=0==r?a&(1<<8-t.length)-1:256*i+a}t=i}return t=e.g.Ua()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ua(),i=ke(e.h,e.g.Ua(),t),e.g.skip(t),new Vg(n,i)}function Bg(e){var t=e.g.Ua(),n=e.g.aa();if(0==n)throw new Ce(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Ee(e.h,t,n)}Ug.prototype.Oa=function(){return this.g.Oa()};var Fg=[[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 Vg(e,t){this.id=e,this.g=t}function Gg(e){if(8<e.g.byteLength)throw new Ce(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new Ce(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){t=256*t+e.g.getUint8(n)}return t}function Hg(e){var t=new Ug(e.g);if(179!=(e=jg(t)).id)throw new Ce(2,3,3013);if(e=Gg(e),183!=(t=jg(t)).id)throw new Ce(2,3,3012);t=new Ug(t.g);for(var n=0;t.Oa();){var i=jg(t);if(241==i.id){n=Gg(i);break}}return{rm:e,Ul:n}}function zg(e,t,n){if(!(t=Ng(e,t,"Initialization")))return null;var i=e.M.jb(),r=t.attributes.sourceURL;r&&(i=Qe(i,[Ge(r)],e.Ob())),r=0;var a=null;return(t=En(t,"range",Ln))&&(r=t.start,a=t.end),(n=new Jo(function(){return i},r,a,Jg(e),null,null,n,e.ua.encrypted)).codecs=e.M.codecs,n.mimeType=e.M.mimeType,e.va&&(n.g=e.va.start+e.va.duration),n}function Kg(e,t,n){var i=Number(Dg(e,qg,"presentationTimeOffset"))||0,r=Dg(e,qg,"timescale"),a=1;r&&(a=Pn(r)||1);var o=i/a||0,s=zg(e,qg,n);!function(e,t){if(Yg(e,t),!Xg(e))throw new Ce(2,4,4002)}
1(e,s);var u=dn(e);return{endTime:-1,timeline:-1,Zc:function(){var e=Ng(u,qg,"RepresentationIndex"),n=u.M.jb();return e&&(e=Ge(e.attributes.sourceURL))&&(n=Qe(n,[e],u.Ob())),e=Xg(u),Wg(u,t,s,n,e.start,e.end,o)},timescale:a}}function Wg(e,t,n,i,r,a,o){var s,u,l,d,h,p,f,g,m,v,y,b,T,w,A,E,x,k;return D(function(I){if(1==I.g)return s=e.presentationTimeline,u=!e.qc||!e.va.Zi,l=e.va.start,d=e.va.duration,h=e.M.mimeType.split("/")[1],f=null,g=[(p=t)(i,r,a,!1),"webm"==h?p(n.S(),n.startByte,n.endByte,!0):null],p=null,S(I,Promise.all(g),2);if(m=I.h,v=m[0],y=m[1]||null,null,T=l-o,w=l,A=d?l+d:1/0,"mp4"==h)var C=Og(v,r,i,n,T,w,A);else{C=v;var M=new Ug(y);if(440786851!=jg(M).id)throw new Ce(2,3,3008);var L=jg(M);if(408125543!=L.id)throw new Ce(2,3,3009);M=L.g.byteOffset,L=new Ug(L.g);for(var R=null;L.Oa();){var P=jg(L);if(357149030==P.id){R=P;break}}if(!R)throw new Ce(2,3,3010);for(R=new Ug(R.g),P=1e6,L=null;R.Oa();){var D=jg(R);if(2807729==D.id)P=Gg(D);else if(17545==D.id)if(4==D.g.byteLength)L=D.g.getFloat32(0);else{if(8!=D.g.byteLength)throw new Ce(2,3,3003);L=D.g.getFloat64(0)}}if(null==L)throw new Ce(2,3,3011);if(L*=R=P/1e9,475249515!=(C=jg(new Ug(C))).id)throw new Ce(2,3,3007);C=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new Ug(e.g);for(var d=null,h=null;e.Oa();){var p=jg(e);if(187==p.id){var f=Hg(p);f&&(p=n*f.rm,f=t+f.Ul,null!=d&&c.push(new $o(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}}return null!=d&&c.push(new $o(d+o,i+o,l,h,null,a,o,s,u)),c}(C,M,R,L,i,n,T,w,A)}for(E=c(b=C),x=E.next();!x.done;x=E.next())(k=x.value).codecs=e.M.codecs,k.mimeType=e.M.mimeType,k.bandwidth=e.bandwidth;return s.re(b),f=new Hu(b),u&&f.xd(w,A,!0),I.return(f)})}function qg(e){return e.Od}function Xg(e){var t=Ng(e,qg,"RepresentationIndex");return e=Ln((e=Dg(e,qg,"indexRange"))||""),t&&(e=En(t,"range",Ln,e)),e}function Yg(e,t){var n=e.M.mimeType.split("/")[1];if(e.M.contentType!=it&&"mp4"!=n&&"webm"!=n)throw new Ce(2,4,4006);if("webm"==n&&!t)throw new Ce(2,4,4005)}function Jg(e){var t=e.M;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.Kf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ua.label||null,roles:e.roles||null,language:e.ua.language||null}}function Qg(e,t,n){var i=zg(e,$g,n),r=function(e){var t=function(e){return[e.M.Ac,e.ua.Ac,e.za.Ac].filter(Xi).map(function(e){return yn(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(t){return t.attributes.indexRange&&!e.rh&&(e.rh=!0),{Jl:Ge(t.attributes.media),start:(t=En(t,"mediaRange",Ln,{start:0,end:null})).start,end:t.end}})}(e);e=Rg(e,$g);var n=e.Be;0==n&&(n=1);var i=0;return e.mb?i=e.mb*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{mb:e.mb,startTime:i,Be:n,fc:e.fc,timescale:e.timescale,timeline:e.timeline,Fd:t}}(e);if(!r.mb&&!r.timeline&&1<r.Fd.length)throw new Ce(2,4,4002);if(!r.mb&&!e.va.duration&&!r.timeline&&1==r.Fd.length)throw new Ce(2,4,4002);if(r.timeline&&0==r.timeline.length)throw new Ce(2,4,4002);var a=null,o=null;e.za.id&&e.M.id&&(o=t.get(e.za.id+","+e.M.id))&&(a=o.segmentIndex);var s=function(e,t,n,i,r,a,o,s,u,l){var c=i.Fd.length;i.timeline&&i.timeline.length!=i.Fd.length&&(c=Math.min(i.timeline.length,i.Fd.length));for(var d=e-i.fc,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<c;g={jg:void 0,Yf:void 0},m++){g.Yf=i.Fd[m];var v=f;f=void 0,f=null!=i.mb?v+i.mb:i.timeline?i.timeline[m].end:v+t,g.jg=null,(g=new $o(e+v,e+f,function(e){return function(){return null==e.jg&&(e.jg=Qe(n(),[e.Yf.Jl],l())),e.jg}}(g),g.Yf.start,g.Yf.end,r,d,e,h,[],"",null,null,es,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.va.start,e.va.duration,e.M.jb,r,i,n,e.M.mimeType,e.M.codecs,e.bandwidth,e.Ob);return t=!a,a?a.pe(s,e.presentationTimeline.Kb()):a=new Hu(s),e.presentationTimeline.re(s),e.qc&&e.va.Zi||a.xd(e.va.start,e.va.duration?e.va.start+e.va.duration:1/0,t),o&&(o.segmentIndex=a),{endTime:-1,timeline:-1,Zc:function(){return a&&0!=a.getNumReferences()||a.Ff(s),Promise.resolve(a)}
1,timescale:r.timescale}}function $g(e){return e.Ac}function Zg(t,n,i,r,a,o,s,u,l,d){l||t.M.vf||(t.M.vf=Dg(t,em,"initialization"));var h=t.M.vf?function(e,t){var n=e.M.vf;if(n||(n=Dg(e,em,"initialization")),!n)return null;n=Ge(n);var i=e.M.originalId,r=e.bandwidth||null,a=e.M.jb,o=e.Ob;return t=new Jo(function(){var e=Lg(n,i,null,null,r,null);return Qe(a(),[e],o())},0,null,Jg(e),null,null,t,e.ua.encrypted),t.codecs=e.M.codecs,t.mimeType=e.M.mimeType,e.va&&(t.g=e.va.start+e.va.duration),t}(t,s):null,p=function(e){var t=Rg(e,em),n=Dg(e,em,"media"),i=Dg(e,em,"index"),r=Dg(e,em,"k"),a=0;return r&&(a=parseInt(r,10)),{hg:t.hg,mb:t.mb,timescale:t.timescale,Be:t.Be,fc:t.fc,mi:t.mi,timeline:t.timeline,Nc:n&&Ge(n),je:i,mimeType:e.M.mimeType,codecs:e.M.codecs,bandwidth:e.bandwidth,Kl:a}}(t);!function(e){var t=e.je?1:0;if(t+=e.timeline?1:0,t+=e.mb?1:0,0==t)throw new Ce(2,4,4002);if(1!=t&&(e.je&&(e.timeline=null),e.hg=null,e.mb=null),!e.je&&!e.Nc)throw new Ce(2,4,4002)}(p);var f=dn(t);if(p.je)return Yg(t,h),{endTime:-1,timeline:-1,Zc:function(){var e=Lg(p.je,f.M.originalId,null,null,f.bandwidth||null,null);return e=Qe(f.M.jb(),[e]),Wg(f,n,h,e,0,null,p.fc)},timescale:p.timescale};if(p.mb)return r||"image"===t.ua.contentType||"text"===t.ua.contentType||(r=t.va.start,d=t.za.id,i=t.va.duration,d=(d=null!=d&&o.get(d)||i)?r+d:1/0,t.presentationTimeline.Ch(p.mb),t.presentationTimeline.kj(r,d)),{endTime:-1,timeline:-1,Zc:function(){return function(t,n,i,r,a,o,s,u){function l(i){var a=i-y,s=a*v,l=n.hg,c=a*l;"BigInt"in e&&c>Number.MAX_SAFE_INTEGER&&(c=BigInt(a)*BigInt(l)),a=(s+=f)+v,l=Math.min(a,h());var d=[],p=n.Kl;if(p)for(var g=(l-s)/p,m={},x=0;x<p;m={Mj:void 0},x++){var k=s+g*x,I=k+g;m.Mj=x+1,(m=new $o(k,I,function(e){return function(){var t=Lg(b,S,i,e.Mj,T,c);return Qe(w(),[t],A())}}(m),0,null,r,E,f,h(),[],"",null,null,es,o)).codecs=t.M.codecs,m.mimeType=t.M.mimeType,0==u?0<x&&m.Dd():0!=x%u&&m.Dd(),d.push(m)}return(s=new $o(s,l,function(){if(p)return[];var e=Lg(b,S,i,null,T,c);return Qe(w(),[e],A())},0,null,r,E,f,h(),d,"",null,null,es,o,0<d.length)).codecs=t.M.codecs,s.mimeType=t.M.mimeType,s.bandwidth=t.bandwidth,s.j=a,s}function d(){var e=[Math.max(p.Kb(),f),Math.min(p.Gc(),h())].map(function(e){return e-f});return e=[Math.ceil(e[0]/v),Math.ceil(e[1]/v)-1],t.M.wb&&e[1]++,e.map(function(e){return e+y})}function h(){var e=null!=g&&a.get(g)||m;return e?f+e:1/0}var p=t.presentationTimeline,f=t.va.start,g=t.za.id,m=t.va.duration,v=n.mb,y=n.Be,b=n.Nc,T=t.bandwidth||null,S=t.M.id,w=t.M.jb,A=t.Ob,E=f-n.fc,x=d();i=t.qc?Math.max(x[0],x[1]-i+1):x[0],s=s||x[1],x=[];for(var k=i;k<=s;++k){var I=l(k);x.push(I)}var C=new Hu(x);if(x=p.Gc()<h(),k=p.T(),x||k){var M=Math.max(i,s+1);i=v,t.M.wb&&(i=.1),C.ig(i,function(){var e=p.Kb();C.hb(e);var t=c(d());t.next(),t=t.next().value;for(var n=[];M<=t;){var i=l(M);n.push(i),M++}return e>h()&&!n.length?null:n})}return Promise.resolve(C)}(f,p,a,h,o,s,u,t.M.Zf)},timescale:p.timescale};var g=null;r=r=null,t.za.id&&t.M.id&&(r=t.za.id+","+t.M.id,r=i.get(r))&&(g=r.segmentIndex);var m=t.va.start,v=t.va.duration?m+t.va.duration:1/0;if(g)nm(d=g,p,m,v,h),d.hb(t.presentationTimeline.Kb());else{if(i=0,l=-1,null!=t.za.id&&null!=t.M.id){var y=d.get(t.za.id);if(y)l=y.timeline;else for(y=(d=c(d.values())).next();!y.done;y=d.next()){if(y=y.value,Math.abs(p.fc-y.endTime)<=at&&y.Lh.includes(t.M.id)){l=y.timeline;break}y.timeline>=i&&(i=y.timeline+1)}}-1==l&&(l=i),g=new tm(p,t.M.originalId,t.bandwidth,t.M.jb,t.Ob,m,v,h,s,t.M.Zf,l)}return p.timeline&&"image"!==t.ua.contentType&&"text"!==t.ua.contentType&&t.presentationTimeline.lj(g.h?g.h.timeline:[],m),r&&t.qc&&(r.segmentIndex=g),r=(r=(r=p.timeline)&&r[r.length-1])?r.end+p.fc:-1,d=-1,g instanceof tm&&(d=g.hf()),{endTime:r,timeline:d,Zc:function(){return g instanceof tm&&0==g.getNumReferences()&&nm(g,p,m,v,h),Promise.resolve(g)},timescale:p.timescale}}function em(e){return e.Pc}function tm(e,t,n,i,r,a,o,s,u,l,c){Hu.call(this,[]),this.h=e,this.F=t,this.C=n,this.D=i,this.H=r,this.j=a,this.l=o,this.u=s,this.B=u,this.G=l,this.I=c,im(this)}function nm(e,t,n,i,r){if(function(e,t){if(e.u!==t){e.u=t;for(var n=(e=c(e.g)).next();!n.done;n=e.next())(n=n.value)&&Zo(n,t)}}(e,r),e.h){if(n=e.h.timeline,e.h.Nc!==t.Nc&&(e.h.Nc=t.Nc),n.length){var a=n[n.length-1];t=t.timeline.filter(function(e){return e.end>a.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,d(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;im(e)}function im(e){if(e.h&&!e.s){for(var t=[],n=c(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||0>
1=i.end||t.push(i);e.h.timeline=t,e.hb(e.j)}}function rm(e,t,n,i,r,a,o,s){return e=Lg(e,t,n,a,i||null,r),Qe(o(),[e],s()).map(function(e){return e.toString()})}function am(e){this.s=null,this.B=e,this.G=new Kr,this.i=[],this.h=null,this.m=[],this.C=null,this.F=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}function om(e,t){var n,i,r,a,o,s,u;return D(function(l){return 1==l.g?(n=Qe(e.i,[sm(e,t)]),i=Jr(n,e.s.retryParameters),r=e.B.networkingEngine.request(8,i),Wr(e.G,r),A(l,2),S(l,r.promise,4)):2!=l.g?(a=l.h,o=Oe(a.data),1==(s=JSON.parse(o)).VERSION&&function(e,t,n){null!=e.g&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new Ki(function(){om(e,i)}),(n=t.TTL)&&(e.D=n);e.g.X(e.D),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}(e,s,a.uri),x(l,0)):(u=k(l))&&7001==u.code?l.return():(null!=e.g&&(e.g.stop(),e.g=null),e.g=new Ki(function(){om(e,t)}),e.g.X(e.D),void w(l))})}function sm(e,t){if(!e.m.length)return t;t=new ae(t);var n=e.C||e.m[0],i=Math.round(e.B.getBandwidthEstimate()),r=t.g;return"DASH"==e.u?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.u&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),Te(r)&&le(t,r),t.toString()}function um(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function lm(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=c(e.m),a=r.next(),o={};!a.done;o={Hd:void 0},a=r.next())if(o.Hd=a.value,a=t.get(o.Hd))i.push({Hh:o.Hd,location:a});else if(a=e.F.find(function(e){return function(t){return t.Pm==e.Hd}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].$j?(se(s=new ae(s),a["URI-REPLACEMENT"].$j),i.push({Hh:o.Hd,location:s.toString()})):i.push({Hh:o.Hd,location:s}))}for(r=Date.now(),a=(o=c(e.j.keys())).next();!a.done;a=o.next())a=a.value,r>(s=e.j.get(a))&&e.j.delete(a);if(i=i.filter(function(t){for(var n=c(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new ae(t.location).Gb))return!1;return!0}),i.length&&(e.C=i[0].Hh),i=i.map(function(e){return e.location}),!i.length&&e.h)for(o=(r=c(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.C=e.h,i.push(o));
1if(!i.length)for(r=(t=c(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:Qe(e.i,i)}function cm(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.s=!1,this.m=new Set}function dm(e,t){for(var n=[],i=[],r=[],a=[],o=(e=c(e)).next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[Um(e),e]}));var u=new Map(s.videoStreams.map(function(e){return[Om(e),e]})),l=new Map(s.textStreams.map(function(e){return[jm(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[Bm(e),e]})),t){var d=Pm(it);l.set(jm(d),d),d=Pm("image"),s.set(Bm(d),d)}n.push(o),i.push(u),r.push(l),a.push(s)}return{zi:n,Xj:i,Sj:r,Wi:a}}function hm(e){var t,n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w,A,E,x,k,I,C,M,L,R;return D(function(P){switch(P.g){case 1:if(t=rt,1==e.length)return P.return(e[0]);for(n=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.ma}).map(function(e){return[Um(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Ea}).map(function(e){return[Om(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.gb}).map(function(e){return[jm(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.qg}).map(function(e){return[Bm(e),e]}))}),o=c(r),s=o.next();!s.done;s=o.next())u=s.value,l=Rm(t.gb),u.set(jm(l),l);for(d=c(a),h=d.next();!h.done;h=d.next())p=h.value,f=Rm(t.qg),p.set(Bm(f),f);return S(P,pm(g=new cm,[],n,0,ym,Tm,0),2);case 2:return m=P.h,S(P,pm(g,[],i,0,ym,Tm,0),3);case 3:return v=P.h,S(P,pm(g,[],r,0,ym,Tm,0),4);case 4:return y=P.h,S(P,pm(g,[],a,0,ym,Tm,0),5);case 5:if(b=P.h,T=0,v.length&&m.length)for(x=c(m),k=x.next();!k.done;k=x.next())for(I=k.value,C=c(v),M=C.next();!M.done;M=C.next())L=M.value,R=T++,L.variantIds.push(R),I.variantIds.push(R);else for(w=v.concat(m),A=c(w),E=A.next();!E.done;E=A.next())E.value.variantIds=[T++];return P.return(v.concat(m).concat(y).concat(b))}})}function pm(e,t,n,i,r,a,o){var s,u,l,d,h,p,f,g,m,v,y,b,T,w,A,E,x,k;return D(function(I){switch(I.g){case 1:for(s=[],u=0;u<n.length;u++)u>=i?s.push(new Set(n[u].values())):s.push(new Set);l=c(t),d=l.next();case 2:if(d.done){I.A(4);break}return h=d.value,S(I,function(e,t,n,i,r,a,o){return D(function(s){return 1==s.g?(Sm(e,n,t,0<o),t.matchedStreams?t.segmentIndex?S(s,fm(t,i+o),2):s.A(2):s.return(!1)):(mm(t,i,r,a,o),s.return(!0))})}(e,h,n,i,a,s,o),5);case 5:if(!I.h)throw new Ce(2,4,4037);d=l.next(),I.A(2);break;case 4:for(p=c(s),f=p.next();!f.done;f=p.next())for(g=f.value,m=c(g),v=m.next();!v.done;v=m.next())y=v.value,(b=gm(e,y,n,r,a,s))&&t.push(b);for(T=c(s),w=T.next();!w.done;w=T.next())for(A=w.value,E=c(A),x=E.next(),k={};!x.done;k={ai:void 0},x=E.next())if(k.ai=x.value,!_m(k.ai)&&t.some(function(t){return function(n){return Em(e,t.ai,n)}}(k)))throw new Ce(2,4,4037);return I.return(t)}})}function fm(e,t){var n,i,r,a,o,s;return D(function(u){if(1==u.g){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)a=i[r],n.push(a.createSegmentIndex()),a.trickModeVideo&&!a.trickModeVideo.segmentIndex&&n.push(a.trickModeVideo.createSegmentIndex()),a.dependencyStream&&!a.dependencyStream.segmentIndex&&n.push(a.dependencyStream.createSegmentIndex());return S(u,Promise.all(n),2)}if(e.segmentIndex instanceof qu)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);w(u)})}function gm(e,t,n,i,r,a){if(_m(t))return null;var o=i(t);return Sm(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return D(function(e){return o.segmentIndex?e.A(0):(o.segmentIndex=new qu,S(e,fm(o,0),0))})}),o.matchedStreams&&o.matchedStreams.length?(mm(o,0,r,a,0),o):null}function mm(e,t,n,i,r){var a=e.matchedStreams;for(t+=r;t<a.length;t++){var o=a[t];n(e,o);var s=!0;if("audio"==e.type&&0==pt(e.language,o.language)&&(s=!1),s&&(i[t-r].delete(o),o.fullMimeTypes))for(s=(o=c(o.fullMimeTypes.values())).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function vm(e){var t=i({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=c(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream
1=null,t}function ym(e){var t=i({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function bm(e,t){function n(e,t){e||(e=[]);for(var n=(t=c(t)).next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=c(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=Mr(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new Ce(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=c(t.closedCaptions)).next();!r.done;r=i.next()){var a=c(r.value);r=a.next().value,a=a.next().value,e.closedCaptions.set(r,a)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=vm(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new qu,n=c(e.trickModeVideo.matchedStreams),i=n.next();!i.done;i=n.next())t.h.push(i.value.segmentIndex);return e.trickModeVideo.segmentIndex=t,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),bm(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),bm(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=vm(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var t=new qu,n=c(e.dependencyStream.matchedStreams),i=n.next();!i.done;i=n.next())t.h.push(i.value.segmentIndex);return e.dependencyStream.segmentIndex=t,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),bm(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),bm(e.dependencyStream,t))}function Tm(e,t){var n=e.roles;n||(n=[]);for(var i=c(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,i=(n=c(t.keyIds)).next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,d(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=c(t.closedCaptions)).next();!n.done;n=t.next())n=(i=c(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function Sm(e,t,n,i){i=void 0!==i&&i?n.matchedStreams:[];for(var r=(t=c(t)).next();!r.done;r=t.next()){if(!(r=wm(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function wm(e,t,n){var i={audio:Um,video:Om,text:jm,image:Bm}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a={audio:function(t,n){return Em(e,t,n)},video:function(t,n){return Em(e,t,n)},text:xm,image:km}[n.type];for(var o={audio:Im,video:Cm,text:Mm,image:Lm}[n.type],s=c(t.values()),u=s.next();!u.done;u=s.next())!a(n,u=u.value)||n.fastSwitching!=u.fastSwitching||r&&!o(n,r,u)||(r=u)}return e.u&&!_m(r)&&t.delete(i(r)),r}function Am(e,t){return e.mimeType==t.mimeType&&Fm(e.codecs)===Fm(t.codecs)}function Em(e,t,n){return!(!Am(t,n)&&!e.s||t.drmInfos&&!Cr(t.drmInfos,n.drmInfos))}function xm(e,t){return!t.language||e.forced===t.forced&&0!=pt(e.language,t.language)&&t.kind==e.kind}function km(){return!0}function Im(e,t,n){var i=Am(e,t),r=Am(e,n);if(i&&!r)return!1;if(!i&&r)return!0;if(i=pt(e.language,t.language),(r=pt(e.language,n.language))>i)return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;
1if(n.roles.length&&!t.roles.length)return!1}return!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&((i=Dm(e.channelsCount,t.channelsCount,n.channelsCount))==Vm||i!=Hm&&((i=Dm(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Vm||i!=Hm&&!(!e.bandwidth||Nm(e.bandwidth,t.bandwidth,n.bandwidth)!=Vm)))}function Cm(e,t,n){var i=Am(e,t),r=Am(e,n);if(i&&!r)return!1;if(!i&&r)return!0;if((i=Dm(e.width*e.height,t.width*t.height,n.width*n.height))==Vm)return!0;if(i==Hm)return!1;if(e.frameRate){if((i=Dm(e.frameRate,t.frameRate,n.frameRate))==Vm)return!0;if(i==Hm)return!1}return!(!e.bandwidth||Nm(e.bandwidth,t.bandwidth,n.bandwidth)!=Vm)}function Mm(e,t,n){var i=pt(e.language,t.language),r=pt(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(t){return e.roles.includes(t)}),(r=n.roles.filter(function(t){return e.roles.includes(t)})).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function Lm(e,t,n){return Dm(e.width*e.height,t.width*t.height,n.width*n.height)==Vm}function Rm(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,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}}function Pm(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hu([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,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,baseOriginalId:null}}function Dm(e,t,n){if(t==e&&e!=n)return Hm;if(n==e&&e!=t)return Vm;if(t>e){if(n<=e||n-e<t-e)return Vm;if(n-e>t-e)return Hm}else{if(n>e)return Hm;if(e-n<e-t)return Vm;if(e-n>e-t)return Hm}return Gm}function Nm(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Vm:t<e?Hm:Gm}function _m(e){switch(e.type){case it:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function Om(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,Fm(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Um(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,Fm(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function jm(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Bm(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function Fm(e){if(!zm.has(e)){var t=Li(e);zm.set(e,t)}return zm.get(e)}v(tm,Hu),(r=tm.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},r.release=function(){Hu.prototype.release.call(this),this.h=null},r.hb=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,0===this.getNumReferences()&&this.release())}},r.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],a=r.start+this.j;if(r=i<n?t[i+1].start+this.j:1/0===this.l?r.end+this.j:this.l,e>=a&&e<r)return i+this.i}return null},r.get=function(e){var t=this;if(0>(e-=this.i)||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=this.h.timeline[e],r=i.cm,a=i.ni+this.h.mi;n=this.j-this.h.fc;var o=this.j+i.end,s=o;e===this.getNumReferences()-1&&1/0!==this.l&&(s=.1<Math.abs(s-this.l)?Math.min(s,this.l):this.l);for(var u=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],h=(i.end-i.start)/i.ec,p={},f=0;f<i.ec;p={kg:void 0,Nj:void 0},f++){var g=i.start+h*f,m=g+h;p.Nj=f+1,p.kg=null,(p=new $o(this.j+g,this.j+m,function(e){return function(){return t.h?(null==e.kg&&(e.kg=rm(t.h.Nc,t.F,r,t.C,a,e.Nj,t.D,t.H)),e.kg):[]}}(p),0,null,this.u,n,this.j,this.l,[],"",null,null,es,this.B)).codecs=u,p.mimeType=l,p.bandwidth=c,0==this.G?0<f&&p.Dd():0!=f%this.G&&p.Dd(),d.push(p)}(n=new $o(this.j+i.start,s,function(){return 0<i.ec||!t.h?[]:rm(t.h.Nc,t.F,r,t.C,a,null,t.D,t.H)},0,null,this.u,n,this.j,this.l,d,"",null,null,es,this.B,0<i.ec)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=c,this.g[e]=n}return n},r.Hb=function(e){im(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},r.hf=function(){return this.I},am.prototype.configure=function(e){this.s=e},am.prototype.destroy=function(){return this.B=this.s=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},am.prototype.setManifestType=function(e){this.u=e},am.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(r=cm.prototype).release=function(){for(var e=c(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.s=!1,this.m.clear()},r.jl=function(){return this.l},r.mh=function(){return this.j.slice()},r.Hk=function(){return this.i},r.Ji=function(e,t){if(e){if("audio"==e.type)for(var n=c(this.h),i=n.next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("video"==e.type)for(i=(n=c(this.g)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(t){return t!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(t){return t!==e}));else if(e.type==it)for(i=(n=c(this.j)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});else if("image"==e.type)for(i=(n=c(this.i)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(t){return t!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}},r.Hg=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,A,E,x,k,I,C,M,L,R,P,N,_,O,U,j,B=this;return D(function(D){if(1==D.g){if(i=rt,!t&&1==e.length)return r=dm(e,!1),a=r.zi,o=r.Xj,s=r.Sj,u=r.Wi,B.h=Array.from(a[0].values()),B.g=Array.from(o[0].values()),B.j=Array.from(s[0].values()),B.i=Array.from(u[0].values()),D.A(2);for(l=n?B.m.size:0,d=-1,h=0;h<e.length;h++)p=e[h],B.m.has(p.id)||(B.m.add(p.id),-1==d&&(d=h));return-1==d?D.return():(f=dm(e,!0),g=f.zi,m=f.Xj,v=f.Sj,y=f.Wi,S(D,Promise.all([pm(B,B.h,g,d,vm,bm,l),pm(B,B.g,m,d,vm,bm,l),pm(B,B.j,v,d,vm,bm,l),pm(B,B.i,y,d,vm,bm,l)]),2))}if(b=0,T=[],B.g.length&&B.h.length)for(M=c(B.h),L=M.next();!L.done;L=M.next())for(R=L.value,P=c(B.g),N=P.next();!N.done;N=P.next())_=N.value,O=Mr(R.drmInfos,_.drmInfos),R.drmInfos.length&&_.drmInfos.length&&!O.length||(U=(R.bandwidth||0)+(_.bandwidth||0),R.dependencyStream&&(U+=R.dependencyStream.bandwidth||0),_.dependencyStream&&(U+=_.dependencyStream.bandwidth||0),j=b++,T.push({id:j,language:R.language,disabledUntilTime:0,primary:R.primary,audio:R,video:_,bandwidth:U,drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=B.g.length?B.g:B.h,E=c(A),x=E.next();!x.done;x=E.next())k=x.value,I=b++,C=k.bandwidth||0,k.dependencyStream&&(C+=k.dependencyStream.bandwidth||0),T.push({id:I,language:k.language,disabledUntilTime:0,primary:k.primary,audio:k.type==i.ma?k:null,video:k.type==i.Ea?k:null,bandwidth:C,drmInfos:k.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});B.l=T,w(D)})},r.Bj=function(e){this.s=e},r.Hj=function(e){this.u=e},H("shaka.util.PeriodCombiner",cm),cm.prototype.setUseStreamOnce=cm.prototype.Hj,cm.prototype.setAllowMultiT
1ypeVariants=cm.prototype.Bj,cm.prototype.combinePeriods=cm.prototype.Hg,cm.prototype.deleteStream=cm.prototype.Ji,cm.prototype.getImageStreams=cm.prototype.Hk,cm.prototype.getTextStreams=cm.prototype.mh,cm.prototype.getVariants=cm.prototype.jl;var Vm=1,Gm=0,Hm=-1,zm=new Map;function Km(e,t){try{return function(e,t){var n=new DOMParser,i=Wm.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch(e){return null}if(!(n=e.documentElement)||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}(je(e),t)}catch(e){return null}}var Wm=new Le(function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function qm(){var e=this;this.j=this.g=null,this.B=[],this.i=null,this.sa=1,this.G=[],this.l={Hf:"",type:"",profiles:[],vc:null,wb:0,jb:null,ue:0},this.u=new Map,this.C=new Map,this.s=new Map,this.D=new Map,this.oa=new Map,this.m=new cm,this.J=0,this.ra=new wt(5),this.K=new Ki(function(){e.I&&!e.g.continueLoadingWhenPaused&&(e.H.Da(e.I,"timeupdate"),e.I.paused)?e.H.qa(e.I,"timeupdate",function(){return uv(e)}):uv(e)}),this.O=new Kr,this.N=null,this.F=[],this.Z=1/0,this.na=!1,this.h=null,this.L=0,this.P=!1,this.H=new xt,this.I=null,this.R=!1,this.Y="",this.ba=function(){return!1},this.U=[],this.$=new Set}function Xm(e){var t,n,i,r,a,o,s,u,l,h,p;return D(function(f){return 1==f.g?(t=4,n="MPD",i=function(e){var t=e.l.ue;if(!e.l.Hf||!t||!e.G.length)return[];var n=Date.now()/1e3,i=e.G.filter(function(e){return!(e=Dn(e.attributes.ttl))||t+e>n}).map(Tn).filter(Xi);return i.length?Qe(e.B,i):[]}(e),r=e.B,i.length?(r=i,n="Patch",t=6):1<e.B.length&&e.h&&((a=lm(e.h,"Location",!0)).length&&(r=a)),o=Jr(r,e.g.retryParameters),s=Date.now(),S(f,gv(e,o,0,{type:t}),2)):3!=f.g?(u=f.h,e.j?(u.uri&&u.uri!=u.originalUri&&!e.B.includes(u.uri)&&e.B.unshift(u.uri),l=new ae(u.uri),e.Y=l.g.toString(),S(f,function(e,t,n,i){var r,a,o,s,u,l,h,p;return D(function(f){if(1==f.g){if(r=t,(a=e.g.dash.manifestPreprocessor)!=sc){if(Mt("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(o=Km(r,i)))throw new Ce(2,4,4001,n);a(o),r=Be(o.outerHTML)}if(!(s=pn(r,i)))throw new Ce(2,4,4001,n);return(u=e.g.dash.manifestPreprocessorTXml)!=uc&&u(s),"Patch"===i?f.return(function(e,t){var n,i,r,a,o,s,u,l,h,p,f,g,m,v,y,b,T,A,E,x,k,I,C,M;return D(function(L){if(1==L.g){if(n=t.attributes.mpdId,i=En(t,"originalPublishTime",Cn),!n||n!==e.l.Hf||i!==e.l.ue)throw e.G=[],new Ce(1,4,4052);for(r=[],a=[],o=new Set,s=c(vn(t)),u=s.next();!u.done;u=s.next())if(l=u.value,h=Un(l.attributes.sel||""),p=h[h.length-1],f=Tn(l)||"","MPD"===p.name)if("mediaPresentationDuration"===p.Dc){var R=Mn(Tn(l)||"");if(null!=R){e.l.vc=R;for(var P=c(e.u.values()),D=P.next();!D.done;D=P.next())D.value.vc=R}}else if("type"===p.Dc){for(e.i.presentationTimeline.md("static"==f),e.l.type=f,P=(R=c(e.u.values())).next();!P.done;P=R.next())P.value.qc="dynamic"==f;"static"==f&&(e.J=-1)}else"publishTime"===p.Dc?e.l.ue=Cn(f)||0:null===p.Dc&&"add"===l.tagName&&a.push(l);else if("PatchLocation"===p.name)jn(e.G,l);else if("Period"===p.name)"add"===l.tagName?a.push(l):"remove"===l.tagName&&p.id&&$m(e,p.id);else if("SegmentTemplate"===p.name){if((R=(P=Un(l.attributes.sel||""))[P.length-1]).Dc){P=Zm(e,P),D=Tn(l)||"";for(var N=c(P),_=N.next();!_.done;_=N.next())Fn((_=e.u.get(_.value)).M.Pc,l.tagName,R.Dc,D);R=P}else R=[];for(g=c(R),m=g.next();!m.done;m=g.next())v=m.value,o.add(v)}else if("SegmentTimeline"===p.name||"S"===p.name){for(R=Un(l.attributes.sel||""),D=(P=c(R=Zm(e,R))).next();!D.done;D=P.next())jn(N=yn(D=Ng(D=e.u.get(D.value),em,"SegmentTimeline"),"S"),l),D.children=N;for(y=c(R),b=y.next();!b.done;b=y.next())T=b.value,o.add(T)}for(A=c(o),E=A.next();!E.done;E=A.next())x=E.value,ev(e,x);for(k=c(a),I=k.next();!I.done;I=k.next())C=I.value,r.push.apply(r,d(Qm(e,C)));return r.length?(e.i.periodCount+=r.length,e.i.gapCount=e.L,S(L,Jm(e,r,!0),2)):L.A(2)}"static"==e.l.type&&(M=e.l.vc,e.i.presentationTimeline.vb(M||1/0)),w(L)})}(e,s)):e.g.dash.disableXlinkProcessing?f.return(Ym(e,s,n)):(l=e.g.dash.xlinkFailGracefully,h=_g(s,e.g.retryParameters,l,n,e.j.networkingEngine),Wr(e.O,h),S(f,h.promise,2))}return p=f.h,f.return(Ym(e,p,n))})}(e,u.data,u.uri,n),3)):f.return(0)):(h=Date.now(),p=(h-s)/1e3,e.ra.sample(1,p),e.$.clear(),f.return(p))})}function Ym(e,t,n){var i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,z,K,W,q,X,J,Q,$,Z,ee,te,ne,ie,re,ae,oe,se,ue;return D(function(le){switch(le.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],a=new Map,o=yn(t,"Location"),s=c(o),u=s.next();!u.done;u=s.next())l=u.value,d=l.attributes.serviceLocation,(h=Tn(l))&&(p=Qe(i,[h])[0],d&&(e.h?um(e.h,"Location",d,p):a.set(d,p)),r.push(p));if(e.h?0<(f=lm(e.h,"Location",!0)).length&&(i=e.B=f):r.length&&(i=e.B=r),e.l.Hf=t.attributes.id||"",e.l.ue=En(t,"publishTime",Cn)||0,e.G=yn(t,"PatchLocation"),g=Promise.resolve(),(m=wn(t,"ContentSteering"))&&e.j)for(v=m.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=v):(e.h=new am(e.j
1),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=v,(y=Tn(m))&&(En(m,"queryBeforeStart",_n,!1)?g=om(e.h,y):om(e.h,y))),b=c(a.keys()),T=b.next();!T.done;T=b.next())E=T.value,I=a.get(E),um(e.h,"Location",E,I);if(C=yn(t,"BaseURL"),M=!1,e.h)for(L=c(C),R=L.next();!R.done;R=L.next())P=R.value,N=P.attributes.serviceLocation,_=Tn(P),N&&_&&(um(e.h,"BaseURL",N,_),M=!0);if(e.U=null,M&&e.h||(O=C.map(Tn),e.U=Qe(i,O)),U=function(){return e.h&&M?lm(e.h,"BaseURL"):e.U?e.U:[]},e.l.jb=U,j=0,C&&C.length&&(j=En(C[0],"availabilityTimeOffset",Nn)||0),e.l.wb=j,e.J=En(t,"minimumUpdatePeriod",Mn,-1),B=En(t,"availabilityStartTime",Cn),F=En(t,"timeShiftBufferDepth",Mn),V=e.g.dash.ignoreSuggestedPresentationDelay,G=null,V||(G=En(t,"suggestedPresentationDelay",Mn)),H=e.g.dash.ignoreMaxSegmentDuration,z=null,H||(z=En(t,"maxSegmentDuration",Mn)),K=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.R=e.i.presentationTimeline.T()&&"static"==K),e.l.type=K,e.i)for(W=e.i.presentationTimeline,q=W.Kb(),X=c(e.s.values()),J=X.next();!J.done;J=X.next())(Q=J.value).segmentIndex&&Q.segmentIndex.hb(q);else $=e.g.dash.ignoreMinBufferTime,Z=0,$||(Z=En(t,"minBufferTime",Mn)||0),0,ee=null!=G?Math.min(G,F||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*Z,F||1/0),W=new Tu(B,ee,e.g.dash.autoCorrectDrift);return W.md("static"==K),W.T()&&!isNaN(e.g.availabilityWindowOverride)&&(F=e.g.availabilityWindowOverride),null==F&&(F=1/0),W.ag(F),te=t.attributes.profiles||"",e.l.profiles=te.split(","),ne={qc:"static"!=K,presentationTimeline:W,za:null,va:null,ua:null,M:null,bandwidth:0,rh:!1,wb:j,vc:null,profiles:te.split(","),roles:null,Ob:function(){return""}},S(le,g,2);case 2:return e.L=0,ie=iv(e,ne,U,t,!1),re=ie.duration,ae=ie.periods,("static"!=K||e.R)&&ie.Li||W.vb(re||1/0),e.P&&e.na&&W.Cj(e.Z),W.Ch(z||1),e.P&&e.na&&(oe=null!=G?G:e.g.defaultPresentationDelay,W.Uh(oe)),e.i?(e.i.periodCount=ae.length,e.i.gapCount=e.L,S(le,Jm(e,ae,!1),4)):S(le,e.m.Hg(ae,ne.qc),6);case 6:if(e.i={presentationTimeline:W,variants:e.m.l,textStreams:e.m.mh(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:tv(t),nextUrl:nv(t),periodCount:ae.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!W.Vj()){le.A(7);break}return se=yn(t,"UTCTiming"),S(le,function(e,t,n){var i,r,a,o,s,u,l,d;return D(function(h){switch(h.g){case 1:i=n.map(function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),a=c(i),o=a.next();case 2:if(o.done){h.A(4);break}switch(s=o.value,A(h,5),u=s.scheme,l=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return h.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return h.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(l),h.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Y("NTP UTCTiming scheme is not supported");break;default:Y("Unrecognized scheme in UTCTiming element",u)}h.A(9);break;case 7:return S(h,dv(e,t,l,"HEAD"),10);case 10:return h.return(h.h);case 8:return S(h,dv(e,t,l,"GET"),11);case 11:return h.return(h.h);case 9:x(h,3);break;case 5:k(h);case 3:o=a.next(),h.A(2);break;case 4:return Y("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),h.return(0)}})}(e,U,se),8);case 8:if(ue=le.h,!e.j)return le.return();W.Dj(ue);case 7:W.Df(),e.m&&!e.i.presentationTimeline.T()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),function(e){for(var t=Array.from(e.D.keys()).filter(function(t){return!e.F.includes(t)}),n=(t=c(t)).next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=c(e.D.get(n)),a=r.next();!a.done;a=r.next()){a=a.value;var o=e.s.get(a);o&&(o.segmentIndex&&0!=o.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.Ji(o,n),e.s.delete(a)))}i&&e.D.delete(n)}}(e),function(e,t){t=new Set(t.map(function(e){return e.id}));for(var n=c(e.C.keys()),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.C.delete(i)}(e,ae),w(le)}})}function Jm(e,t,n){var i;return D(function(r){if(1==r.g)return S(r,e.m.Hg(t,!0,n),2);e.i.variants=e.m.l,0<(i=e.m.mh()).length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),w(r)})}function Qm(e,t){return iv(e,{qc:"dynamic"==e.l.type,presentationTimeline:e.i.presentationTimeline,za:null,va:null,ua:null,M:null,bandwidth:0,rh:!1,wb:e.l.wb,profiles:e.l.profiles,vc:e.l.vc,roles:null,Ob:function(){return""}},e.l.jb,t,!0).periods}function $m(e,t){e.i.periodCount--;for(var n=c(e.u.keys()),i=n.next();!i.done;i=n.next())if((i=i.value).startsWith(t)){Ng(e.u.get(i),em,"SegmentTimeline").children=[],ev(e,i),e.u.delete(i)}e.F=e.F.filter(function(e){return e!==t})}function Zm(e,t){for(var n="",i="",r=-1,a="",o=(t=c(t)).next();!o.done;o=t.next())"Period"===(o=o.value).name?n=o.id:"AdaptationSet"===o.name?(i=o.id,null!==o.position&&(r=o.position)):"Representation"===o.name&&(a=o.id);if(t=[],a)t.push(n+","+a);else if(i)for(r=c(e.u.values()),e=r.next();!e.done;
1e=r.next())(e=e.value).za.id===n&&e.ua.id===i&&e.M.id&&t.push(n+","+e.M.id);else if(-1<r)for(i=c(e.u.values()),e=i.next();!e.done;e=i.next())(e=e.value).za.id===n&&e.ua.position===r&&e.M.id&&t.push(n+","+e.M.id);return t}function ev(e,t){var n=e.u.get(t),i=e.s.get(t);i.segmentIndex&&i.segmentIndex.hb(e.i.presentationTimeline.Kb());try{var r=Zg(n,function(t,n,i,r){return pv(e,t,n,i,r)},e.s,!0,e.g.dash.initialSegmentLimit,e.oa,n.M.aesKey,null,!0,e.C);i.createSegmentIndex=function(){return D(function(e){if(1==e.g)return i.segmentIndex?e.A(0):S(e,r.Zc(),3);i.segmentIndex=e.h,w(e)})}}catch(e){if((t=n.M.contentType)!=it&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function tv(e){var t=wn(e,"ServiceDescription");if(!t)return null;if(e=wn(t,"Latency"),t=wn(t,"PlaybackRate"),!e&&!t)return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function nv(e){if(!(e=yn(e,"SupplementalProperty")).length)return null;for(var t=(e=c(e)).next();!t.done;t=e.next())if("urn:mpeg:dash:chaining:2016"==(t=t.value).attributes.schemeIdUri)return t.attributes.value;return null}function iv(e,t,n,i,r){var a=t.vc;a||(a=En(i,"mediaPresentationDuration",Mn),e.l.vc=a);var o=0;e.i&&e.i.presentationTimeline&&e.R&&(o=e.i.presentationTimeline.bc());var s=[],u=o;i=yn(i,"Period");for(var l=0;l<i.length;l++){var d=i[l],h=i[l+1],p=En(d,"start",Mn,u),f=d.attributes.id,g=En(d,"duration",Mn);p=0==l&&0==p&&e.R?o:p;var m=null;if(h){var v=En(h,"start",Mn);null!=v&&(m=v-p+o)}else null!=a&&(m=a-p+o);if(v=at,m&&g&&Math.abs(m-g)>v&&m>g&&e.L++,null==m&&(m=g),!(null!==e.N&&null!==f&&null!==p&&p<e.N)||e.F.includes(f)||l+1==i.length){if(null!==p&&(null===e.N||p>e.N)&&(e.N=p),u=rv(e,t,n,{start:p,duration:m,node:d,Zi:null==m||!h}),s.push(u),t.za.id&&m&&e.oa.set(t.za.id,m),null==m){u=null;break}u=p+m}}if(r)for(n=(t=c(s)).next();!n.done;n=t.next())n=n.value.id,e.F.includes(n)||e.F.push(n);else e.F=s.map(function(e){return e.id});return null!=a?{periods:s,duration:a+o,Li:!1}:{periods:s,duration:u,Li:!0}}function rv(e,t,n,i){t.za=cv(e,i.node,null,n),t.va=i,t.za.wb=t.wb,t.za.id||(t.za.id="__shaka_period_"+i.start);var r=yn(i.node,"EventStream");n=t.presentationTimeline.Kb();for(var a=(r=c(r)).next();!a.done;a=r.next())hv(e,i.start,i.duration,a.value,n);for(r=(n=c(n=yn(i.node,"SupplementalProperty"))).next();!r.done;r=n.next())"urn:mpeg:dash:urlparam:2014"==(r=r.value).attributes.schemeIdUri&&(r=sv(e,r))&&(t.Ob=r);if(n=yn(i.node,"AdaptationSet").map(function(n,i){return ov(e,t,i,n)}).filter(Xi),t.qc){r=[];for(var o=(a=c(n)).next();!o.done;o=a.next())for(var s=(o=c(o.value.Yl)).next();!s.done;s=o.next())r.push(s.value);if(r.length!=new Set(r).size)throw new Ce(2,4,4018)}for(r=new Map,o=(a=c(n)).next();!o.done;o=a.next())for(s=(o=c(o.value.nk)).next();!s.done;s=o.next()){var u=c(s.value);s=u.next().value,u=u.next().value,r.set(s,u)}if(r.size)for(a=null,s=(o=c(n)).next();!s.done;s=o.next()){u=[];for(var l=c((s=s.value).streams),h=l.next(),p={};!h.done;p={bi:void 0},h=l.next())if(p.bi=h.value,r.has(p.bi.originalId)){a||(a=yn(i.node,"AdaptationSet").map(function(n,i){return ov(e,t,i,n)}).filter(Xi));for(var f=(h=c(a)).next();!f.done;f=h.next())(f=f.value.streams.find(function(e){return function(t){return t.originalId==e.bi.originalId}}(p)))&&(f.dependencyStream=r.get(f.originalId),f.originalId+=f.dependencyStream.originalId,u.push(f))}u.length&&s.streams.push.apply(s.streams,d(u))}if(i=n.filter(function(e){return!e.li}),n=n.filter(function(e){return e.li}),!e.g.disableIFrames)for(r=(n=c(n)).next();!r.done;r=n.next())for(a=(r=r.value).li.split(" "),s=(o=c(i)).next();!s.done;s=o.next())if(s=s.value,a.includes(s.id))for(u=(s=c(s.streams)).next();!u.done;u=s.next())vr(u.value,r.streams);if(n=av(e.g.disableAudio,i,"audio"),r=av(e.g.disableVideo,i,"video"),a=av(e.g.disableText,i,it),i=av(e.g.disableThumbnails,i,"image"),0===r.length&&0===n.length)throw new Ce(2,4,4004);return{id:t.za.id,audioStreams:n,videoStreams:r,textStreams:a,imageStreams:i}}function av(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,d(t.streams)),e},[])}function ov(t,n,i,r){function a(e){var i=e.attributes["dvb:fontFamily"];e=e.attributes["dvb:url"],i&&e&&(e=Qe(n.ua.jb(),[e],n.Ob()),t.j.addFont(i,e[0]))}
1function o(e){switch(e){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.ua=cv(t,r,n.za,null),n.ua.position=i;var u=!1,l=(i=yn(r,"Role")).map(function(e){return e.attributes.value}).filter(Xi),h=void 0,p=n.ua.contentType==it;p&&(h="subtitle");for(var f=(i=c(i)).next();!f.done;f=i.next()){var g=(f=f.value).attributes.schemeIdUri;if(null==g||"urn:mpeg:dash:role:2011"==g)switch(f=f.attributes.value,f){case"main":u=!0;break;case"caption":case"subtitle":h=f}}var m=yn(r,"EssentialProperty");i=null;var v=!1;f=null,g=!1;for(var y=(m=c(m)).next();!y.done;y=m.next()){var b=(y=y.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==b)i=y.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==b)var T=s(parseInt(y.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==b)var A=o(parseInt(y.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=b&&("urn:mpeg:dash:ssr:2023"==b&&t.g.dash.enableFastSwitching?v=!0:"urn:dvb:dash:fontdownload:2014"==b?a(y):"urn:mpeg:dash:urlparam:2014"==b&&(f=sv(t,y))||(g=!0))}if(g)return null;var E=null;for(m=(g=c(g=yn(r,"SupplementalProperty"))).next();!m.done;m=g.next())"http://dashif.org/guidelines/last-segment-number"==(y=(m=m.value).attributes.schemeIdUri)?E=parseInt(m.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==y?T=s(parseInt(m.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==y?A=o(parseInt(m.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==y?a(m):"urn:mpeg:dash:urlparam:2014"==y&&(f=sv(t,m));f&&(n.Ob=f),f=yn(r,"Accessibility");var x,k=new Map;for(g=(f=c(f)).next();!g.done;g=f.next())if(g=(m=g.value).attributes.schemeIdUri,m=m.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=g||t.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=g||t.g.disableText)"urn:mpeg:dash:role:2011"==g?null!=m&&(l.push(m),"captions"==m&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==g&&("1"==m?x="visually impaired":"2"==m?x="hard of hearing":"9"==m&&(x="spoken subtitles"));else if(g=1,null!=m)for(y=(m=c(m.split(";"))).next();!y.done;y=m.next()){b=y.value;var I=y=void 0;b.includes("=")?(y="svc"+(b=b.split("="))[0],I=b[1].split(",")[0].split(":").pop()):(y="svc"+g,g++,I=b),k.set(y,dt(I))}else k.set("svc1","und");else if(g=1,null!=m)for(b=(y=c(m=m.split(";"))).next();!b.done;b=y.next()){I=b.value;var C=b=void 0;I.includes("=")?(b=(I=I.split("="))[0].startsWith("CC")?I[0]:"CC"+I[0],C=I[1]||"und"):(b="CC"+g,2==m.length?g+=2:g++,C=I),k.set(b,dt(C))}else k.set("CC1","und");var M=kg(f=yn(r,"ContentProtection"),t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI);n.ua.encrypted=0<f.length;var L=dt(n.ua.language||"und"),R=n.ua.label,P=new Map;if(r=yn(r,"Representation"),!t.g.ignoreSupplementalCodecs){for(f=[],m=(g=c(r)).next();!m.done;m=g.next())(m=xn(y=m.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((y=cn(y)).attributes.codecs=m.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),f.push(y));r.push.apply(r,d(f))}if(f=r.map(function(i){var r=function(t,n,i,r,a,o,s,u,l,c,d,h){n.M=cv(t,c,n.ua,null);var p=n.M.id;if(t.Z=Math.min(t.Z,n.M.wb),t.P=0<t.Z,!function(e){var t=e.Od?1:0;return t+=e.Ac?1:0,t+=e.Pc?1:0,0==t?e.contentType==it||"application"==e.contentType:(1!=t&&(e.Od&&(e.Ac=null),e.Pc=null),!0)}(n.M))return null;var f=n.va.start;n.bandwidth=En(c,"bandwidth",Pn)||0,n.roles=u;var g=yn(c,"SupplementalProperty"),m=yn(c,"EssentialProperty"),v=yn(c,"ContentProtection");c=null;var y,b,T=m.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});(T||(T=g.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri})))&&(c=sv(t,T)),c&&(n.Ob=c),T=n.M.contentType,c=T==it||"application"==T,T="image"==T,v.length&&(n.ua.encrypted=!0);try{var A=void 0;if(i.Ag){var E=n.M.jb,x=n.Ob,k=Jr(Qe(E(),[i.Ag.Cl],x()),t.g.retryParameters);A={bitsKey:128,blockCipherMode:"CBC",iv:i.Ag.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;
1return D(function(a){if(1==a.g)return S(a,gv(t,k,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new Ce(2,4,4049);return i={name:"AES-CBC"},r=A,S(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,A.fetchKey=void 0,w(a)})}}}if(n.M.aesKey=A,E=function(e,n,i,r){return pv(t,e,n,i,r)},n.M.Od)var I=Kg(n,E,A);else if(n.M.Ac)I=Qg(n,t.s,A);else if(n.M.Pc)I=Zg(n,E,t.s,!!t.i,t.g.dash.initialSegmentLimit,t.oa,A,h,!1,t.C);else{var C=n.va.duration||0,M=n.M.jb,L=n.M.mimeType,R=n.M.codecs;I={endTime:-1,timeline:-1,Zc:function(){var e=Ku(f,C,M());return e.Hb(function(e){e.mimeType=L,e.codecs=R}),Promise.resolve(e)},timescale:1}}}catch(e){if((c||T)&&4002==e.code)return null;throw e}if(h=function(e,t,n,i){var r=kg(e,n,i);if(t.Ni)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==r.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=r.drmInfos),t.Ni=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(e){return r.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==t.drmInfos.length))throw new Ce(2,4,4008);return r.Ii||t.Ii}(v,i,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI),h=new Set(h?[h]:[]),v=!1,g.some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value})&&(v=!0),g=!1,c&&(g=u.includes("forced_subtitle")||u.includes("forced-subtitle")),T&&((m=m.find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.attributes.schemeIdUri)}))&&(y=m.attributes.value),!y))return null;c=n.M.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(c.includes("hvc1.2.4.L153.B0")||c.includes("hev1.2.4.L153.B0"))&&(b="PQ"),m=n.M.id?n.za.id+","+n.M.id:"",t.G.length&&p&&t.u.set(n.za.id+","+p,function(e){function t(e){return e?((e=dn(e)).Od=null,e.Ac=null,e.Pc=Gn(e.Pc),e.Rf=null,e):null}return e=dn(e),e.za=t(e.za),e.ua=t(e.ua),e.M=t(e.M),e.va&&(e.va=dn(e.va),e.va.node=null),e}(n)),n.M.Rf&&function(e,t,n,i){if(!e.$.has(t)){e.$.add(t);var r,a=En(t,"presentationTime",Dn)||0,o=wn(t,"UTCTiming");(r=o&&o.attributes.schemeIdUri)&&(r=!("urn:mpeg:dash:utc:http-ntp:2014"===(o=o.attributes.schemeIdUri)||"urn:mpeg:dash:utc:ntp:2014"===o||"urn:mpeg:dash:utc:sntp:2014"===o)),r?t=1e3*(En(t,"wallClockTime",Cn)||0):t=As(t=En(t,"wallClockTime",Dn)||0),a=(n=new Date(t-a/n.timescale*1e3)).getTime()/1e3,isNaN(a)||(i.s||i.Wh(a),i=new z("prft",i=(new Map).set("detail",{wallClockTime:t,programStartDate:n})),e.j.onEvent(i))}}(t,n.M.Rf,I,n.presentationTimeline),-1!=I.endTime&&null!=n.za.id&&null!=n.M.id&&((p=t.C.get(n.za.id))?(p.endTime=I.endTime,p.Lh.includes(n.M.id)||p.Lh.push(n.M.id),t.C.set(n.za.id,p)):t.C.set(n.za.id,{endTime:I.endTime,timeline:I.timeline,Lh:[n.M.id]}));var P=m&&t.s.has(m)?t.s.get(m):{id:t.sa++,originalId:n.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){P.segmentIndex&&(P.segmentIndex.release(),P.segmentIndex=null)},segmentIndex:null,mimeType:n.M.mimeType,codecs:c,frameRate:n.M.frameRate,pixelAspectRatio:n.M.pixelAspectRatio,bandwidth:n.bandwidth,width:n.M.width,height:n.M.height,kind:r,encrypted:0<i.drmInfos.length,drmInfos:i.drmInfos,keyIds:h,language:a,originalLanguage:n.ua.language,label:o,type:n.ua.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:n.M.emsgSchemeIdUris,roles:u,forced:g,channelsCount:n.M.Kf,audioSamplingRate:n.M.audioSamplingRate,spatialAudio:v,closedCaptions:l,hdr:b,colorGamut:void 0,videoLayout:void 0,tilesLayout:y,accessibilityPurpose:d,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ki(n.M.mimeType,n.M.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return P.createSegmentIndex=function(){var e;return D(function(t){if(1==t.g)return P.segmentIndex?t.A(0):(e=P,S(t,I.Zc(),3));e.segmentIndex=t.h,w(t)})},m&&n.qc&&!t.s.has(m)&&(n=n.za.id||"",t.D.has(n)||t.D.set(n,[]),t.s.set(m,P),t.D.get(n).push(m)),P}(t,n,M,h,L,R,u,l,k,i,x,E);return r&&(r.hdr=r.hdr||T,r.colorGamut=r.colorGamut||A,r.fastSwitching=v,i=i.attributes.dependencyId)?(r.baseOriginalId=i,P.set(i,r),null):r}).filter(function(e){return!!e}),0==f.length&&0==P.size){if(i="image"==n.ua.contentType,t.g.dash.ignoreEmptyAdaptationSet||p||i)return null;throw new Ce(2,4,4003)}if(!n.ua.contentType||"application"==n.ua.contentType)for(n.ua.contentType=fv(f[0].mimeType,f[0].codecs),g=(p=c(f)).next();!g.done;g=p.next())g.value.type=n.ua.contentType;for(p=n.ua.id||"__fake__"+t.sa++,m=(g=c(f)).next();!m.done;m=g.next()){for(m=m.value,b=(y=c(M.drmInfos)).next();!b.done;b=y.next())(b=b.value).keyIds=b.keyIds&&m.keyIds?new Set([].concat(d(b.keyIds),d(m.ke
1yIds))):b.keyIds||m.keyIds;m.groupId=p}return r=r.map(function(e){return e.attributes.supplementalId||e.attributes.id}).filter(Xi),{id:p,contentType:n.ua.contentType,language:L,Hn:u,streams:f,drmInfos:M.drmInfos,li:i,Yl:r,nk:P}}function sv(e,t){if((t=An(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&En(t,"useMPDUrlQuery",_n,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.Y:n.split("&").map(function(t){if("$querypart$"==t)return e.Y;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new ye(e.Y).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function uv(e){var t,n;return D(function(i){switch(i.g){case 1:return t=0,A(i,2),S(i,Xm(e),4);case 4:t=i.h,x(i,3);break;case 2:if(n=k(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),lv(e,t),w(i)}})}function lv(e,t){if(!(0>e.J)){var n=e.J;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.X(Math.max(n-t,At(e.ra)))}}function cv(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Kf:null,audioSamplingRate:null,wb:0,Zf:0,encrypted:!1},i=i||n.jb;var r,a=t.attributes.id,o=t.attributes.supplementalId,s=yn(t,"BaseURL"),u=!1;if(e.h)for(var l=c(s),d=l.next();!d.done;d=l.next()){var h=d.value;d=h.attributes.serviceLocation,h=Tn(h),d&&h&&(um(e.h,a,d,h),u=!0)}u&&e.h||(r=s.map(Tn)),l=t.attributes.contentType||n.contentType,d=t.attributes.mimeType||n.mimeType,h=ml([t.attributes.codecs||n.c
1odecs]).join(",");var p=En(t,"frameRate",On)||n.frameRate,f=t.attributes.sar||n.pixelAspectRatio,g=function(e,t){t=t.slice();for(var n=(e=c(e)).next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(yn(t,"InbandEventStream"),n.emsgSchemeIdUris),m=yn(t,"AudioChannelConfiguration");m=function(e){for(var t=(e=c(e)).next();!t.done;t=e.next()){var n=(t=t.value).attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(t,10)))continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],!(t=parseInt(t,16)))continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),!(t=parseInt(t,16)))continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}(m)||n.Kf;var v=En(t,"audioSamplingRate",Dn)||n.audioSamplingRate;l||(l=fv(d,h));var y=wn(t,"SegmentBase"),b=wn(t,"SegmentTemplate"),T=y&&En(y,"availabilityTimeOffset",Nn)||0,S=b&&En(b,"availabilityTimeOffset",Nn)||0,w=s&&s.length&&En(s[0],"availabilityTimeOffset",Nn)||0;T=n.wb+w+T+S,S=null,(w=wn(t,"SegmentSequenceProperties"))&&(w=wn(w,"SAP"))&&(S=En(w,"cadence",Rn)),w=t.attributes.label;var A=yn(t,"Label");return A&&A.length&&(bn(A=A[0])&&(w=bn(A))),{jb:function(){return Qe(i(),s.length?e.h&&u?lm(e.h,a):r||[]:[])},Od:y||n.Od,Ac:wn(t,"SegmentList")||n.Ac,Pc:b||n.Pc,Rf:wn(t,"ProducerReferenceTime")||n.Rf,width:En(t,"width",Dn)||n.width,height:En(t,"height",Dn)||n.height,contentType:l,mimeType:d,codecs:h,frameRate:p,pixelAspectRatio:f,emsgSchemeIdUris:g,id:o||a,originalId:a,language:t.attributes.lang,Kf:m,audioSamplingRate:v,wb:T,vf:null,Zf:S||n.Zf,label:w||null,encrypted:!1}}function dv(e,t,n,i){var r,a,o,s,u,l,c;return D(function(d){if(1==d.g)return r=[Ge(n)],a=Qe(t(),r),(o=Jr(a,e.g.retryParameters)).method=i,s=e.j.networkingEngine.request(4,o,{isPreload:e.ba()}),Wr(e.O,s),S(d,s.promise,2);if(u=d.h,"HEAD"==i){if(!u.headers||!u.headers.date)return d.return(0);l=u.headers.date}else l=Oe(u.data);return c=Date.parse(l),isNaN(c)?d.return(0):d.return(c-Date.now())})}function hv(e,t,n,i,r){for(var a=i.attributes.schemeIdUri||"",o=i.attributes.value||"",s=En(i,"timescale",Dn)||1,u=En(i,"presentationTimeOffset",Dn)||0,l=(i=c(yn(i,"Event"))).next();!l.done;l=i.next()){var d=En(l=l.value,"presentationTime",Dn)||0,h=En(l,"duration",Dn)||0;h=(d=Math.max((d-u)/s+t,t))+h/s,null!=n&&(d=Math.min(d,t+n),h=Math.min(h,t+n)),h<r||(l={schemeIdUri:a,value:o,startTime:d,endTime:h,id:l.attributes.id||"",timescale:s,eventElement:Vn(l),eventNode:Gn(l)},e.j.onTimelineRegionAdded(l))}}function pv(e,t,n,i,r){var a,o,s,u;return D(function(l){return 1==l.g?(a=ta,o=r?0:1,s=yl(t,n,i,e.g.retryParameters),S(l,gv(e,s,a,{type:o}),2)):(u=l.h,l.return(u.data))})}function fv(e,t){return Fi(t=ki(e,t))?it:e.split("/")[0]}function gv(e,t,n,i){return i||(i={}),i.isPreload=e.ba(),t=e.j.networkingEngine.request(n,t,i),Wr(e.O,t),t.promise}function mv(){}(r=qm.prototype).configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ba=t),n&&this.i&&this.i.presentationTimeline.T()&&this.K.Ka(),this.h&&this.h.configure(this.g),this.m&&(this.m.Bj(this.g.dash.multiTypeVariantsAllowed&&jt()),this.m.Hj(this.g.dash.useStreamOnceInPeriodFlattening))},r.start=function(e,t){var n,i=this;return D(function(r){if(1==r.g)return i.na=t.isLowLatencyMode(),i.B=[e],i.j=t,S(r,Xm(i),2);if(n=r.h,i.j&&lv(i,n),!i.j)throw new Ce(2,7,7001);return r.return(i.i)})},r.stop=function(){for(var e=c(this.s.values()),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.i=null,this.s.clear(),this.D.clear(),this.u.clear(),this.C.clear(),this.l={Hf:"",type:"",profiles:[],vc:null,wb:0,jb:null,ue:0},this.m=null,null!=this.K&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.H&&(this.H.release(),this.H=null),this.$.clear(),this.O.destroy()},r.update=function(){var e,t=this;return D(function(n){return 1==n.g?(A(n,2),S(n,Xm(t),4)):2!=n.g?x(n,0):(e=k(n),t.j&&e?(t.j.onError(e),void w(n)):n.return())})},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.T()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.Gc();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.J=t.endTime-e,lv(this,0))}}},r.banLocation=function(e){this.h&&this.h.banLocation(e)},r.setMediaElement=function(e){this.I=e},H("shaka.dash.DashParser",qm),uo("application/dash+xml",function(){return new qm}),uo("video/vnd.mpeg.dash.mpd",function(){return new qm}),H("shaka.dependencies",mv),mv.has=function(e){return bv.has(e)},mv.add=function(e,t){if(!yv[e])throw Error(e+" is not supported");e==vv?Mt("mux.js","mux.js is no longer used in Shaka Player."):bv.set(e,function(){return t})};var vv="muxjs",yv={In:vv,ISOBoxer:"ISOBoxer"};mv.Allowed=yv;var bv=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function Tv(){this.j=new Le(function(){return 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")?"MOBILE":"DESKTOP"}),this.l=new Le(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 Sv(){var t=e.ManagedMediaSource||e.MediaSource;return!(!t||!t.isTypeSupported)}function wv(t){return Re(),void 0!==e.matchMedia&&e.matchMedia("(color-gamut: p3)").matches?t?"HLG":"PQ":"SDR"}function Av(){Tv.call(this),this.g=new Le(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new Le(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints?"xr"in navigator?"VR":"MOBILE":"xr"in navigator?"VR":"DESKTOP"})}function Ev(){if(!xv())throw Error("Not a Chromecast device!");Tv.call(this),this.h=new Le(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new Le(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return(e=e.toLowerCase()).includes("android")?kv:e.includes("fuchsia")?Iv:Cv})}function xv(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}(r=Tv.prototype).ic=function(){return!!navigator.mediaCapabilities},r.Ja=function(){return this.j.value()},r.Ia=function(){return this.l.value()},r.xe=function(){return!1},r.rj=function(){return!1},r.wf=function(){return!1},r.sj=function(){return!1},r.we=function(){return!1},r.nd=function(){return!0},r.od=function(){return!0},r.Ce=function(){return!0},r.xj=function(){return 0},r.nc=function(){return Promise.resolve({width:1/0,height:1/0})},r.Jj=function(){return!1},r.$h=function(){return!1},r.$a=function(e){var t=this.Ja();return"TV"!==t&&"CONSOLE"!==t&&"CAST"!==t||(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},r.ei=function(){return!!e.indexedDB},r.pj=function(){return[]},r.eg=function(){return!1},r.fj=function(){return!1},r.Ph=function(){return!1},r.di=function(){return!0},r.gj=function(){return!1},r.Rj=function(){return!0},r.toString=function(){return"Device: "+this.Rb()+" v"+this.Ga()+"; Type: "+this.Ja()},v(Av,Tv),(r=Av.prototype).Ga=function(){return this.g.value()},r.Rb=function(){return"Apple Browser"},r.Ja=function(){return this.h.value()},r.Ia=function(){return"WEBKIT"},r.ic=function(){return!1},r.xe=function(e,t){return"audio"===t},r.wf=function(){return!0},r.sj=function(e){return"audio"===e},r.$a=function(e){return Tv.prototype.$a.call(this,e),e.abr.minTimeToSwitch=.5,e},r.eg=function(){return!0},(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"))&&(Pe=function(){return new Av}),v(Ev,Tv),(r=Ev.prototype).Ga=function(){return this.h.value()},r.Rb=function(){return"Chromecast with "+this.g.value()},r.Ja=function(){return"CAST"},r.Ia=function(){return"CHROMIUM"},r.ic=function(){return Tv.prototype.ic.call(this)&&this.g.value()!==Cv},r.od=function(){return this.g.value()!==Cv},r.xj=function(){switch(this.g.value()){case kv:return 0;case Iv:return 3;default:return 1}},r.nc=function(){var t,n,i,r;return D(function(a){switch(a.g){case 1:if(t=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,n={width:1280,height:720},A(a,2),!(i=t)){a.A(4);break}return S(a,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:i=a.h;case 4:if(i){n.width=3840,n.height=2160,a.A(6);break}if(!(r=t)){a.A(7);break}return S(a,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=a.h;case 7:r&&(n.width=1920,n.height=1080);case 6:x(a,3);break;case 2:X("Failed to check canDisplayType:",k(a));case 3:return a.return(n)}})},r.$a=function(e){return Tv.prototype.$a.call(this,e),e.streaming.stallSkip=0,e},r.ei=function(){return!1};var kv="Android",Iv="Fuchsia",Cv="Linux";function Mv(){Tv.call(this);var e=this;this.i=new Le(function(){var e=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return e?parseInt(e[2],10):null}),this.g=new Le(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new Le(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}),this.s=new Le(function(){return!navigator.userAgent.match(/Edge?\//)||!e.h.value()}),this.m=new Le(function(){return navigator.userAgent.includes("sony.hbbtv.tv.G5")})}function Lv(){Tv.apply(this,arguments)}function Rv(){Tv.call(this),this.g=new Le(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}function Pv(){Tv.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}function Dv(){Tv.apply(this,arguments)}function Nv(){Tv.call(this),this.h=new Le(function(){return navigator.userAgent.includes("DT_STB_BCM")}),this.g=new Le(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}function _v(){Tv.call(this),this.g=function(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){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}}()}function Ov(){Tv.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}function Uv(){var e=null;try{e="undefined"!=typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}return e}function jv(e,t,n){this.type=e,this.ka=t,this.segments=n||null}function Bv(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function Fv(e,t){return t?e.toString():(t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Vv(e,t){return(e=e.attributes.filter(function(e){return e.name==t})).length?e[0]:null}function Gv(e,t,n){return(e=Vv(e,t))?e.value:n||null}function Hv(e,t){if(!(e=Vv(e,t)))throw new Ce(2,4,4023,t);return e.value}function zv(e,t,n){n=void 0===n?[]:n,this.ka=t,this.g=e,this.ec=n}function Kv(e,t){this.name=e,this.value=t}function Wv(e,t){return e.filter(function(e){return e.name==t})}function qv(e,t){return e.filter(function(e){return Hv(e,"TYPE")==t})}function Xv(e,t){for(var n=(e=c(e)).next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function Yv(e,t,n){return n=void 0===n?0:n,(e=Xv(e,t))?Number(e.value):n}function Jv(e,t,n){return t?Qv(e,[t],n):[]}function Qv(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(e){return $v(e,n)})),Qe(e,i)}function $v(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n)for(var i=(n=c(n)).next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(!a)throw new Ce(2,4,4039,r);e=e.replace(i,a)}return e}function Zv(){this.g=0}function ey(e,t){var n=(t=(t=Oe(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new Ce(2,4,4015);t=0;for(var i=!0,r=c(n),a=r.next();!a.done;a=r.next())if(a=a.value,/^#(?!EXT)/m.test(a)||i)i=!1;else{if(a=ty(e,a),--e.g,ny.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(i=!0)}for(r=[],i=!0,a=0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||i)i=!1;else{if(o=ty(e,o),iy.includes(o.name)){if(1!=t)throw new Ce(2,4,4017);o=n.splice(a,n.length-a),n=[],i=[],a=[],s=null;for(var u=(o=c(o)).next();!u.done;u=o.next())u=u.value,/^(#EXT)/.test(u)?(u=ty(e,u),ny.includes(u.name)?r.push(u):"EXT-X-MAP"==u.name?s=u:"EXT-X-PART"==u.name?a.push(u):"EXT-X-PRELOAD-HINT"
1==u.name?"PART"==Gv(u,"TYPE")?a.push(u):"MAP"==Gv(u,"TYPE")&&(u.name="EXT-X-MAP",s=u):i.push(u)):/^#(?!EXT)/m.test(u)||(u=u.trim(),s&&i.push(s),n.push(new zv(u,i,a)),i=[],a=[]);return a.length&&(s&&i.push(s),n.push(new zv("",i,a))),new jv(t,r,n)}r.push(o),"EXT-X-STREAM-INF"==o.name&&(o.attributes.push(new Kv("URI",s)),i=!0)}}return new jv(t,r)}function ty(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Ce(2,4,4016,t);t=n[1];var i,r=n[2];if(n=[],r){var a;(a=an(r=new nn(r),/^([^,=]+)(?:,|$)/g))&&(i=a[1]);for(var o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=an(r,o);)n.push(new Kv(a[1],a[2]||a[3])),rn(r)}return new Bv(e,t,n,i)}xv()&&(Pe=function(){return new Ev}),v(Mv,Tv),(r=Mv.prototype).Ga=function(){return this.i.value()},r.Rb=function(){return this.g.value()},r.xe=function(e){return!!Lr(e)&&("Edge"===this.g.value()&&this.h.value())},r.rj=function(){return"Edge"===this.g.value()&&this.h.value()},r.wf=function(){return"Edge"===this.g.value()&&this.h.value()},r.od=function(){return this.s.value()},r.$a=function(e){if(Tv.prototype.$a.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return e},r.Ph=function(){return"Edge"===this.g.value()||this.m.value()},De=function(){return new Mv},v(Lv,Tv),(r=Lv.prototype).Ga=function(){return null},r.Rb=function(){return"Hisense"},r.Ja=function(){return"TV"},r.ic=function(){return!1},r.nc=function(){var t={width:1920,height:1080},n=null;if(e.Hisense_Get4KSupportState)try{n=e.Hisense_Get4KSupportState()}catch(e){}return null==n&&(n=navigator.userAgent.includes("UHD")),n&&(t.width=3840,t.height=2160),Promise.resolve(t)},r.$a=function(e){return Tv.prototype.$a.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Pe=function(){return new Lv}),v(Rv,Tv),(r=Rv.prototype).Rb=function(){return"PlayStation"},r.Ja=function(){return"CONSOLE"},r.Ia=function(){return"WEBKIT"},r.Ga=function(){return this.g.value()},r.ic=function(){return!1},r.nd=function(){return!1},r.od=function(){return!1},r.$h=function(){return 4===this.Ga()},r.nc=function(){var t,n,i,r;return D(function(a){switch(a.g){case 1:return t={width:1920,height:1080},n=!1,A(a,2),S(a,e.msdk.device.getDisplayInfo(),4);case 4:i=a.h,n="4K"===i.resolution,x(a,3);break;case 2:return k(a),A(a,5),S(a,e.msdk.device.getDisplayInfoImmediate(),7);case 7:r=a.h,n="4K"===r.resolution,x(a,3);break;case 5:Y("PlayStation: Failed to get the display info:",k(a));case 3:return n&&(t.width=3840,t.height=2160),a.return(t)}})},r.$a=function(e){return Tv.prototype.$a.call(this,e),4===this.Ga()&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},r.Ph=function(){return 4===this.Ga()},r.di=function(){return 4!==this.Ga()},navigator.userAgent.includes("PlayStation")&&(Pe=function(){return new Rv}),v(Pv,Tv),(r=Pv.prototype).Ga=function(){return this.g},r.Rb=function(){return"Tizen"},r.Ia=function(){return"CHROMIUM"},r.Ja=function(){return"TV"},r.xe=function(){return!0},r.we=function(){return 3===this.Ga()},r.ic=function(){return!1},r.nd=function(){var e=this.Ga();return null!==e?4<=e:Tv.prototype.nd.call(this)},r.od=function(){return!1},r.Ce=function(){return this.g&&this.h?5===this.g?5<=this.h:5<this.g:Tv.prototype.Ce.call(this)},r.nc=function(){var e={width:1920,height:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch(e){Y("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},r.$a=function(e){return Tv.prototype.$a.call(this,e),e.drm.ignoreDuplicateInitData=2!==this.Ga(),3===this.Ga()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},r.pj=function(){var e=[];return null!==this.g&&5>this.g&&e.push("opus"),e},r.fj=function(){return!0},r.gj=function(){return 3===this.Ga()},navigator.userAgent.includes("Tizen")&&(Pe=function(){return new Pv}),v(Dv,Tv),Dv.prototype.Ga=function(){return null},Dv.prototype.Rb=function(){return"Vizio"},Dv.prototype.Ja=function(){return"TV"},Dv.prototype.ic=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Pe=function(){return new Dv}),v(Nv,Tv),(r=Nv.prototype).Ga=function(){return this.g.value()},r.Rb=function(){return"WebKit STB"},r.Ja=function(){return"TV"},r.Ia=function(){return"WEBKIT"},r.ic=function(){return!1},r.nd=function(){var e=this.g.value();return null===e||15<=e},r.nc=function(){return Promise.resolve({width:e.screen.width*e.devicePixelRatio,height:e.screen.height*e.devicePixelRatio})},r.di=function(){return!this.h.value()},(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")))&&(Pe=function(){return new Nv}),v(_v,Tv),(r=_v.prototype).Ga=function(){return this.g},r.Rb=function(){return"WebOS"},r.Ja=function(){return"TV"},r.Ia=function(){return"CHROMIUM"},r.ic=function(){return!1},r.nd=function(){var e=this.Ga();return null!==e?3<e:Tv.prototype.nd.call(this)},r.od=function(){var e=this.Ga();return null!==e?6<e:Tv.prototype.od.call(this)},r.Ce=function(){var e=this.Ga();return null!==e?3<e:Tv.prototype.Ce.call(this)},r.nc=function(){var t={width:1920,height:1080};try{var n=JSON.parse(e.PalmSystem.deviceInfo);t.width=Math.max(1920,n.screenWidth),t.height=Math.max(1080,n.screenHeight)}catch(e){Y("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},r.$a=function(e){return Tv.prototype.$a.call(this,e),3===this.Ga()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},r.Rj=function(){return!1},navigator.userAgent.includes("Web0S")&&(Pe=function(){return new _v}),v(Ov,Tv),(r=Ov.prototype).Ga=function(){return this.h},r.Rb=function(){return"Xbox"},r.Ja=function(){return"CONSOLE"},r.Ia=function(){return this.g?"EDGE":"CHROMIUM"},r.xe=function(){return!0},r.wf=function(){return!0},r.Jj=function(){return this.g}
1,r.nc=function(){var e={width:1920,height:1080},t=Uv();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do{t=n.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(t===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch(e){Y("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},r.$a=function(e){return Tv.prototype.$a.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},r.ei=function(){return!1},(navigator.userAgent.includes("Xbox One")||null!==Uv())&&(Pe=function(){return new Ov}),Bv.prototype.toString=function(e){var t="#"+this.name,n=this.attributes?this.attributes.filter(function(t){return!e||!e.has(t.name)}).map(function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t};var ny="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(" "),iy="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 ry(){}function ay(e,t){try{var n=oy(e);return Gr({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return Fr(e)}}function oy(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new Ce(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new Ce(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=i.split(";"),i=n[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?qe(t):Be(t),contentType:i}}function sy(){var t=this;this.g=this.h=null,this.F=1,this.B=new Map,this.I=new Map,this.L=new Map,this.L.set("video",new Map),this.L.set("audio",new Map),this.L.set(it,new Map),this.L.set("image",new Map),this.dc=(new Map).set("com.apple.streamingkeydelivery",function(n,i,r){return function(t,n,i,r){var a,o,s,u,l;return D(function(c){if(1==c.g){if("video/mp2t"==i)throw new Ce(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new Ce(2,4,4041);if(a=Hv(n,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return c.return(null);o="cenc","SAMPLE-AES"==a&&(o="cbcs"),s=Hv(n,"URI"),u=$e("com.apple.fps",o,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],s);var d=new ae(s).Gb.replace(/-/g,"").toLowerCase();return(l=32===d.length&&/^[0-9a-f]+$/.test(d)?d:null)||!r?c.A(2):S(c,Jy(t,r),3)}return 2!=c.g&&(l=c.h),l&&u.keyIds.add(l),c.return(u)})}(t,n,i,r)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(e){var t=Hv(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),n=$e("com.widevine.alpha",n,[{initDataType:"cenc",initData:t=Ee((t=oy((t=Hv(e,"URI")).split("?")[0])).data)}]),(e=Gv(e,"KEYID"))&&n.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(n)}else e=Promise.resolve(null);return e}).set("com.microsoft.playready",function(e){var t=Hv(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),n=$e("com.microsoft.playready",n,[{initDataType:"cenc",initData:t=Aa(e=Ee((e=oy((e=Hv(e,"URI")).split("?")[0])).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]),(e=fn(["<PLAYREADY>",We(e),"</PLAYREADY>"].join("\n")))&&(n.licenseServerUri=Eg(e)),n=Promise.resolve(n)}else n=Promise.resolve(null);return n}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(e){var t=Hv(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),n=$e("com.huawei.wiseplay",n,[{initDataType:"cenc",initData:t=Ee((t=oy((t=Hv(e,"URI")).split("?")[0])).data)}]),(e=Gv(e,"KEYID"))&&n.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(n)}else e=Promise.resolve(null);return e}),this.Ya=new Set,this.i=new Map,this.l=null,this.D="",this.La=new Zv,this.J=-1,this.Z=1/0,this.Y=this.yc=this.Ta=!1,this.C=new Ki(function(){t.R&&!t.g.continueLoadingWhenPaused&&(t.P.Da(t.R,"timeupdate"),t.R.paused)?t.P.qa(t.R,"timeupdate",function(){return zy(t)}):zy(t)}),this.sa=rb,this.m=null,this.Na=0,this.s=1/0,this.fb=this.Ha=this.O=0,this.U=new Kr,this.G=new Map,this.H=new Map,this.ra=new Map,this.ba=new Map,this.K=new Map,this.na=new Map,this.oa=new Map,this.wc=this.$=!1,this.cb=new wt(5),this.j=null,this.N=!0,this.P=new xt,this.u=this.R=null,this.Lb=function(){return!1}}function uy(e,t){return Ky(e)?e.L.get(t.type):t.Ef}function ly(e,t){var n,i,r,a,o,s,u,l,h,p,f,g,m,v,y,b,T,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,z;return D(function(D){switch(D.g){case 1:if(t.stream.isAudioMuxedInVideo)return D.return();for(n=[],i=c(t.S()),r=i.next();!r.done;r=i.next())a=r.value,o=new ae(a),s=o.g,t.df&&(0<=t.Vb&&s.add("_HLS_msn",String(t.Vb)),0<=t.Wb&&s.add("_HLS_part",String(t.Wb))),t.ef&&s.add("_HLS_skip","YES"),Te(s)&&le(o,ce(s.toString())),n.push(o.toString());return A(D,2),S(D,Hy(e,n,!0).promise,4);case 4:u=D.h,x(D,3);break;case 2:throw l=k(D),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return D.return();if(1!=(h=ey(e.La,u.data)).type)throw new Ce(2,4,4017);return(p=u.uri)==u.originalUri||t.S().includes(p)||t.Uf.push(p),f=Wv(h.ka,"EXT-X-DEFINE"),g=fy(e,f,p),m=t.stream,v=uy(e,t),S(D,My(e,h,m.mimeType,t.S,g),5);case 5:for(y=D.h,b=y.keyIds,T=y.drmInfos,E=y.encrypted,I=y.wi,m.encrypted||!E||I||(m.encrypted=!0),function(e,t){return e.size===t.size&&[].concat(d(e)).every(function(e){return t.has(e)})}(m.keyIds,b)||(m.keyIds=b,m.drmInfos=T,e.h.newDrmInfo(m)),C=jy(e,h,v,g,t.S,t.type),M=C.segments,(L=C.bandwidth)&&(m.bandwidth=L),R=el(m),P=c(M),N=P.next();!N.done;N=P.next())(_=N.value).ea&&(_.ea.Ed=R);
1m.segmentIndex.pe(M,e.l.Kb()),M.length&&(O=Yv(h.ka,"EXT-X-MEDIA-SEQUENCE",0),j=(U=Xv(h.ka,"EXT-X-SKIP"))?Number(Gv(U,"SKIPPED-SEGMENTS")):0,B=Iy(O,M),F=B.Vb,V=B.Wb,t.Vb=F+j,t.Wb=V,G=v.get(O),m.segmentIndex.hb(G)),(H=zu(m.segmentIndex))&&(t.gd=H.startTime,z=M[M.length-1],t.uc=z.endTime),Xv(h.ka,"EXT-X-ENDLIST")&&(t.ee=!0),Py(e,h),Uy(e,h.ka,m.type,g,t.S),w(D)}})}function cy(e,t,n){n=void 0!==n&&n;for(var i=-1==e.J,r=c(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=uy(e,a);if(o=zu(o))for(var u=(s=c(s)).next();!u.done;u=s.next()){var l=(u=c(u.value)).next().value;if(u.next().value==o.startTime){i&&(e.J=Math.max(e.J,l)),a.Pg=l;break}}}if(!(0>e.J))for(i=(t=c(t)).next();!i.done;i=t.next())(xy(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&(0<(a=e.J-i.Pg)&&(r.g.splice(0,a),r=zu(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),dy(e,i,r)))}function dy(e,t,n){if(!(.001>Math.abs(n))){t.gd+=n,t.uc+=n;for(var i=c(e=uy(e,t)),r=i.next();!r.done;r=i.next()){var a=c(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.S()}}function hy(e,t,n){var i,r,a,o,s;return D(function(u){switch(u.g){case 1:return t?(i=ta,r=yl(t.S(),t.Hc(),t.Fc(),e.g.retryParameters),S(u,qy(e,r,i,{type:t instanceof $o?1:0}).promise,2)):u.return({mimeType:null,data:null});case 2:if(a=u.h,o=a.data,!t.aesKey){u.A(3);break}return S(u,vl(o,t.aesKey,n),4);case 4:o=u.h;case 3:return t instanceof $o?t.ze(o,!0):t.ze(o),(s=a.headers["content-type"])&&(s=s.split(";")[0].toLowerCase()),u.return({mimeType:s,data:o})}})}function py(e){if(Ky(e)){if(e.sa==ob){for(var t=1/0,n=1/0,i=c(e.i.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.uc),n=Math.min(n,r.gd));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.ag(t)}}else e.l.vb(wy(e));if(!e.l.s)for(n=(t=c(e.i.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=zu(n.stream.segmentIndex))&&n.h&&e.l.Wh(n.h);e.l.Df()}function fy(e,t,n){n=new ae(n).g;for(var i=new Map,r=(t=c(t)).next();!r.done;r=t.next()){var a=r.value,o=Gv(a,"NAME"),s=Gv(a,"VALUE");r=Gv(a,"QUERYPARAM"),a=Gv(a,"IMPORT"),o&&s&&(i.has(o)||i.set(o,s)),r&&(o=n.get(r)[0])&&!i.has(o)&&i.set(r,o),a&&(r=e.B.get(a))&&i.set(a,r)}return i}function gy(e){var t=new Set([ki(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Hb(function(n){n.mimeType&&t.add(ki(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function my(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,u=c(t),l=u.next();!l.done;l=u.next()){var h=l.value;l=Gv(h,"AUDIO");var p=Gv(h,"VIDEO"),f=l||p;f&&(a.includes(f)||a.push(f),(h=Gv(h,"PATHWAY-ID"))&&r.set(f,h),l?o=!0:p&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=Gv(e,"URI")||"";return"SUBTITLES"!=(e=Gv(e,"TYPE"))&&(""!=t||"AUDIO"==e)});for(var i={},r=(t=c(t)).next();!r.done;r=t.next()){var a=Fv(r=r.value,!e.j);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)by(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(Hv(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.I.has(r)?e.I.get(r):[],o?i.audio.push.apply(i.audio,d(n)):s&&i.video.push.apply(i.video,d(n)),o=!1;var g=t.map(function(e){return Hv(e,"URI")});return l=i.audio.find(function(e){return e&&e.S().find(function(e){return g.includes(e)})}),n=tt("video",s=vy(e,t[0])),(u=tt("audio",s))&&!n?(l="audio",o=0<i.audio.length):!i.audio.length&&!i.video.length&&u&&n?(l="video",s=[[n,u].join()]):i.audio.length&&l?(l="audio",o=!0):l=i.video.length&&!i.audio.length?"audio":"video",o||(e=function(e,t,n,i){for(var r=e.F++,a=[],o=c(t),s=o.next();!s.done;s=o.next()){var u=s.value;s=Hv(u,"URI"),u=Gv(u,"PATHWAY-ID"),e.j&&u&&um(e.j,r,u,s),a.push(s)}if(o=a.sort().join(",")+n.sort().join(","),e.i.has(o))return e.i.get(o);s=a.join(",");e:{if(t=Gv(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.N=!1,t=null;break e}if(t){if("NONE"!=t){t=e.G.get(t);break e}e.N=!1}else if(!t&&e.G.size)for(t=c(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return n=et(i,n),i=Sy(e,r,a,n,i,null,!1,s,null,t,null,!1,null,!1),e.i.set(o,i),i}(e,t,s,l),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function vy(e,t){return t=Gv(t,"CODECS")||"",e.Y=0<t.length,e.Y||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),ml(t.split(/\s*,\s*/))}function yy(e,t,n,i,r,a,o,s,u,l,d,h){for(var p=c(n),f=p.next();!f.done;f=p.next())Gy(f.value.stream,r,a,o,s,u,null);for(r=e.g.disableAudio,t.length&&!r||(t=[null]),r=e.g.disableVideo,n.length&&!r||(n=[null]),r=[],a=(t=c(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=c(n)).next();!s.done;s=o.next()){var g=s.value;(s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=d),(u=g?g.stream:null)&&(u.drmInfos=l,u.keyIds=d,e.g.disableIFrames||vr(u,h)),u&&!s&&(u.bandwidth=i),!u&&s&&(s.bandwidth=i),p=a?a.stream.drmInfos:null,f=g?g.stream.drmInfos:null,g=g?g.S().sort().join(","):"";var m=a?a.S().sort().join(","):"",v=[];s&&s.codecs&&v.push(s.codecs),u&&u.codecs&&v.push(u.codecs),g=[g,m,v.sort()].join("-"),s&&u&&!Cr(p,f)||e.Ya.has(g)||(s={id:e.F++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Ya.add(g))}return r}function by(e,t,n,i){i=void 0===i||i;for(var r=[],a=[],o=new Map,s=c(t),u=s.next();!u.done;u=s.next()){var l=u.value;u=i?Hv(l,"URI"):Gv(l,"URI")||"shaka://hls-muxed",l=Hv(l,"GROUP-ID"),r.push(u),a.push(l),o.set(l,u)}if(i=a.sort().join(","),u=t[0],t="","subtitles"==(s=Hv(u,"TYPE").toLowerCase())&&(s=it),s==it)t=Gv(u,"CODECS")||"";else for(l=(a=c(a)).next();!l.done;l=a.next())if(l=l.value,e.H.has(l)){t=e.H.get(l);break}if(a=r.sort().join(","),e.i.has(a))return e.i.get(a);if(l=e.F++,e.j)for(var d=(o=c(o)).next();!d.done;d=o.next()){var h=c(d.value);d=h.next().value,h=h.next().value,(d=n.get(d))&&um(e.j,l,d,h)}var p;return n=Gv(u,"LANGUAGE"),o=Gv(u,"NAME"),d="YES"==Gv(u,"DEFAULT"),h="audio"==s&&(h=Gv(u,"CHANNELS"))?parseInt(h.split("/")[0],10):null,"audio"==s&&(p=Gv(u,"CHANNELS"))?p=2==(p=p.split("/")).length&&("JOC"===p[1]||p[1].includes("ATMOS")):p=!1,(r=Sy(e,l,r,t,s,n,d,o,h,null,Gv(u,"CHARACTERISTICS"),"YES"==Gv(u,"FORCED"),u="audio"==s&&(u=Gv(u,"SAMPLE-RATE"))?parseInt(u,10):null,p)).stream&&(r.stream.groupId=i),e.I.has(i)?e.I.get(i).push(r):e.I.set(i,[r]),e.i.set(a,r),r}function Ty(e,t){var n="video",i=Hv(t,"URI"),r=Gv(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.i.has(i))return e.i.get(i);var a=Gv(t,"LANGUAGE"),o=Gv(t,"NAME"),s=Gv(t,"CHARACTERISTICS");
1return n=Sy(e,e.F++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),a=c((r=Gv(t,"RESOLUTION"))?r.split("x"):[null,null]),r=a.next().value,a=a.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(a)||void 0,(t=Gv(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function Sy(e,t,n,i,r,a,o,s,u,l,d,h,p,f){function g(t){var n,g,y,T,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H;return D(function(D){switch(D.g){case 1:return n=rt,A(D,2),S(D,t.promise,4);case 4:if(g=D.h,t.aborted)return D.return();if((y=g.uri)!=g.originalUri&&(b.S().includes(y)||b.Uf.push(y)),1!=(T=ey(e.La,g.data)).type)throw new Ce(2,4,4017);return E=Wv(T.ka,"EXT-X-DEFINE"),I=fy(e,E,y),C=!1,(!e.Y&&e.g.hls.disableCodecGuessing||e.N&&r==n.Ea&&!e.g.hls.disableClosedCaptionsDetection)&&0<T.segments.length&&(e.N=!1,C=!0),M=!e.Y&&e.g.hls.disableCodecGuessing,L=Ky(e),S(D,ky(e,0,I,T,m,i,r,a,o,s,u,l,d,h,p,f,void 0,C,M),5);case 5:if(R=D.h,t.aborted)return D.return();if(P=R.stream,Ry(e,T),Ky(e)&&!L&&Dy(e,T),b.gd=R.gd,b.uc=R.uc,b.ef=R.ef,b.df=R.df,b.ee=R.ee,b.Ef=R.Ef,b.Vb=R.Vb,b.Wb=R.Wb,b.Ah=!0,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||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,gy(v),v.drmInfos.length&&e.h.newDrmInfo(v),N=!1,(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)&&(N=!0),e.m&&N&&e.h.makeTextStreamsForClosedCaptions(e.m),r==n.Ea||r==n.ma)for(_=c(e.i.values()),O=_.next();!O.done;O=_.next())(U=O.value).Ah||U.type!=r||U.stream.isAudioMuxedInVideo||(U.stream.mimeType=P.mimeType,gy(U.stream));r==n.gb&&(j=zu(P.segmentIndex))&&j.ea&&(v.mimeType="application/mp4",gy(v)),B=el(v),v.segmentIndex.Hb(function(e){e.ea&&(e.ea.Ed=B)}),function(e){if(!e.m)return!1;
1for(var t=[],n=[],i=(e=c(e.m.variants)).next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return!(0<t.length&&!t.some(function(e){return e.segmentIndex})||0<n.length&&!n.some(function(e){return e.segmentIndex}))}(e)&&(e.yc?Ey(e,[b]):(e.yc=!0,F=Array.from(e.i.values()),V=F.filter(function(e){return e.stream.segmentIndex}),Ey(e,V),py(e),0<(G=e.s)&&e.C.X(G))),Uy(e,T.ka,v.type,I,m),e.m&&(e.m.startTime=e.u),x(D,0);break;case 2:if(H=k(D),v.closeSegmentIndex(),7001===H.code)return D.return();if(!e.h.disableStream(v))throw H;w(D)}})}function m(){return e.j&&1<n.length?lm(e.j,t):b.Uf.concat(Qv([e.D],n,e.B))}var v=Cy(e,i,r,a,o,s,u,l,d,h,p,f);n.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",gy(v));var y,b={stream:v,type:r,Uf:[],gd:0,uc:0,Ef:new Map,ef:!1,df:!1,ee:!1,Pg:-1,Vb:-1,Wb:-1,Ah:!1,S:m},T=null;return v.createSegmentIndex=function(){return T||(v.isAudioMuxedInVideo?(v.segmentIndex=new Hu([]),Promise.resolve()):(y=Hy(e,b.S(),!0),T=new Promise(function(e){e(g(y))})))},v.closeSegmentIndex=function(){T&&!v.segmentIndex&&y.abort(),v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null),T=null},b}function wy(e){for(var t=1/0,n=(e=c(e.i.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.uc));return t}function Ay(e,t){for(var n=[],i=(t=c(t)).next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.Hb(function(e){n.push(e)});e.l.re(n)}function Ey(e,t){if(!Ky(e))for(var n=wy(e),i=c(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.xd(0,n);Ay(e,t.map(function(e){return e.stream})),n=(i=Array.from(e.i.values()).filter(function(e){return e.stream.segmentIndex})).some(function(e){return"audio"==e.stream.type}),r=i.some(function(e){return"video"==e.stream.type}),i=Ky(e)&&!e.Ta,n=!Ky(e)&&e.Ta&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?cy(e,t,i):(function(e,t){if(1/0==e.Z)for(var n=(t=c(t)).next();!n.done;n=t.next())null!=(n=zu(n.value.stream.segmentIndex))&&null!=n.h&&(e.Z=Math.min(e.Z,n.h));if(1/0!=(t=e.Z))for(var i=(n=c(e.i.values())).next();!i.done;i=n.next())if(!xy(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=zu(r);if(a)if(null==a.h)X("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.S(),"Expect AV sync issues!");else for(dy(e,i,a.h-t-a.startTime),r=(i=c(r)).next();!r.done;r=i.next())r.value.gi(t)}}}(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&cy(e,t))}function xy(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function ky(e,t,n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b){var T,w,E,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,z,K,W,q,X,Y,J,Q,$,Z;return y=void 0===y||y,b=void 0===b||b,D(function(t){switch(t.g){case 1:if(T=i.segments||[],w=T.every(function(e){return!!Xv(e.ka,"EXT-X-GAP")}),!T.length||w)throw new Ce(2,4,4053);if(function(e,t){var n=Xv(t.ka,"EXT-X-PLAYLIST-TYPE");t=Xv(t.ka,"EXT-X-ENDLIST"),t=n&&"VOD"==n.value||t,n=n&&"EVENT"==n.value&&!t,n=!t&&!n,Wy(e,t?rb:n?ob:ab)}(e,i),Ky(e)&&Py(e,i),E=Ky(e)?e.L.get(o):new Map,I=jy(e,i,E,n,r,o),C=I.segments,M=I.bandwidth,_=N=P=R=L=null,!(0<C.length&&y)){t.A(2);break}return S(t,function(e,t){var n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T;return D(function(w){if(1==w.g)return n=fl(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=Vy(e,t),r=i.segment,a=i.segmentIndex,o=r.S(),s=o[0],u=new ae(s),l=u.ub.split(".").pop(),(d=Qy.get(l))?w.return(fl(d)):S(w,Promise.all([hy(e,r.ea,0),hy(e,r,a)]),2)):w.return(n);if(h=w.h,p=h[1].mimeType,f=h[0].data,g=h[1].data,m="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),v=["audio/mp4","video/mp4","video/iso.segment"],!(y=r.ea||v.includes(p))&&Fs(Ee(g))){var A=g,E=e.g.disableAudio,x=e.g.disableVideo,k=e.g.disableText,I=Ee(A),C=(new Os).parse(I),M=C.ae();I=C.nh();var L=[],R=!1,P=!1;if(!E)switch(M.audio){case"aac":case"aac-loas":C.yb().length&&(L.push("mp4a.40.2"),R=!0);break;case"mp3":C.yb().length&&(L.push("mp4a.40.34"),R=!0);break;case"ac3":C.yb().length&&(L.push("ac-3"),R=!0);break;case"ec3":C.yb().length&&(L.push("ec-3"),R=!0);break;case"opus":C.yb().length&&(L.push("opus"),R=!0)}if(!x)switch(M.video){case"avc":I.codec?L.push(I.codec):L.push("avc1.42E01E"),P=!0;break;case"hvc":I.codec?L.push(I.codec):L.push("hvc1.1.6.L93.90"),P=!0;break;case"av1":L.push("av01.0.01M.08"),P=!0}if(L.length){if(E=R&&!P,x=new Map,P&&!k){for((k=new zt("video/mp2t")).Of(A),P=(A=c(k.rg())).next();!P.done;P=A.next())P=P.value,x.set(P,P);k.Sd()}I={type:E?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:x,Ge:null,colorGamut:null,frameRate:I.frameRate}}else I=null;if(b=I)return w.return(b)}
1else if((y||m.includes(l))&&(T=gl(f,g,e.g.disableText)))return w.return(T);return p?w.return(fl(p)):w.return(n)})}(e,C),3);case 3:O=t.h,o=O.type,s=O.language,d=O.channelCount,g=O.sampleRate,e.g.disableText||(h=O.closedCaptions),R=O.height,L=O.width,P=O.Ge,N=O.colorGamut,_=O.frameRate,b&&(v=O.mimeType,a=O.codecs);case 2:if(v){t.A(4);break}return S(t,function(e,t,n,i){var r,a,o,s,u,l,c,d,h,p,f,g,m;return D(function(v){switch(v.g){case 1:return r=ta,a=Vy(e,i),2==(o=a.segment).status?v.return(Fy(t)):(s=o.S(),u=new ae(s[0]),l=u.ub.split(".").pop(),c=nb.get(t),(d=c.get(l))||(d=Qy.get(l))||(d=By(t,n))?v.return(d):(p=1,f=Jr(s,e.g.retryParameters),A(v,2),f.method="HEAD",S(v,qy(e,f,r,{type:p}).promise,4)));case 4:g=v.h,h=g.headers["content-type"],x(v,3);break;case 2:if(!(m=k(v))||1002!=m.code&&1001!=m.code){v.A(3);break}return f.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(f.headers.Range="bytes=0-0"),S(v,qy(e,f,r,{type:p}).promise,6);case 6:g=v.h,h=g.headers["content-type"];case 3:if(!h){v.A(7);break}if("application/octet-stream"!=(d=h.toLowerCase().split(";")[0])){v.A(8);break}if(g.data.byteLength){v.A(9);break}return f.method="GET",S(v,qy(e,f,r,{type:p}).promise,10);case 10:g=v.h;case 9:Fs(Ee(g.data))&&(d="video/mp2t");case 8:if("application/octet-stream"!=d)return v.return(d);case 7:return v.return(Fy(t))}})}(e,o,a,C),5);case 5:v=t.h,o!=it||a||"application/mp4"!=v||!C[0]||C[0].ea||(v="text/vtt");case 4:return S(t,My(e,i,v,r,n),6);case 6:if(U=t.h,j=U.drmInfos,B=U.keyIds,F=U.encrypted,V=U.wi,F&&!j.length&&!V)throw new Ce(2,4,4026);return(G=Cy(e,a,o,s,u,l,d,h,p,f,g,m)).encrypted=F&&!V,G.drmInfos=j,G.keyIds=B,G.mimeType=v,M&&(G.bandwidth=M),gy(G),"video"==o&&(L||R||P||N)&&Gy(G,L,R,_,P,null,N),Ky(e)&&Py(e,i),H=C[0].startTime,z=C[C.length-1],K=z.endTime,W=new Hu(C),G.segmentIndex=W,X=!!(q=Xv(i.ka,"EXT-X-SERVER-CONTROL"))&&null!=Vv(q,"CAN-SKIP-UNTIL"),Y=!!q&&null!=Vv(q,"CAN-BLOCK-RELOAD"),J=Yv(i.ka,"EXT-X-MEDIA-SEQUENCE",0),Q=Iy(J,C),$=Q.Vb,Z=Q.Wb,t.return({stream:G,type:o,Uf:[],S:r,gd:H,uc:K,ef:X,df:Y,ee:!1,Pg:-1,Vb:$,Wb:Z,Ef:E,Ah:!1})}})}function Iy(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Vb:++e,Wb:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Vb:e,Wb:n}):(e++,t.m&&(n=0),{Vb:e,Wb:n})}function Cy(e,t,n,i,r,a,o,s,u,l,d,h){var p=By(n,t)||Fy(n),f=[];if(u)for(var g=(u=c(u.split(","))).next();!g.done;g=u.next())f.push(g.value);return u=void 0,g=null,n==it?u=f.includes("public.accessibility.transcribes-spoken-dialog")&&f.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":f.includes("public.accessibility.describes-video")&&(g="visually impaired"),f.length||"subtitle"!==u||f.push("subtitle"),gy(e={id:e.F++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==it?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:dt(i||"und"),originalLanguage:i,label:a,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:f,forced:l,channelsCount:o,audioSamplingRate:d,spatialAudio:h,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:g,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}),e}function My(e,t,n,i,r){var a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,w,A,E,x,k,I,C,M,L,R,P,N,_,O;return D(function(D){switch(D.g){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments)for(o=c(t.segments),s=o.next();!s.done;s=o.next())if(u=s.value,l=Wv(u.ka,"EXT-X-KEY"),d=null,l.length)for(d=Ny(e,t,u.ka,i,r),h=c(l),p=h.next();!p.done;p=h.next())f=p.value,a.set(f,d);m=g=!1,v=[],y=new Set,b=c(a),T=b.next();case 2:if(T.done){D.A(4);break}if(w=T.value,A=c(w),E=A.next().value,x=A.next().value,I=x,"NONE"==(C=Hv(k=E,"METHOD"))){D.A(3);break}if(g=!0,M=Gv(k,"KEYFORMAT")||"identity",L=null,Xy(C)){m=!0,D.A(3);break}if("identity"==M)return S(D,Yy(e,k,n,i,I,r),11);if(!(R=e.dc.get(M))){P=null,D.A(9);break}return S(D,R(k,n,I),10);case 10:P=D.h;case 9:L=P,D.A(6);break;case 11:L=D.h;case 6:if(L){if(L.keyIds)for(N=c(L.keyIds),_=N.next();!_.done;_=N.next())O=_.value,y.add(O);v.push(L)}case 3:T=b.next(),D.A(2);break;case 4:return D.return({drmInfos:v,keyIds:y,encrypted:g,wi:m})}})}function Ly(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw Y("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Ce(2,4,4042);var o=0,s=Gv(n,"IV","");if(s){var u=Xe(s.substr(2));if(16!=u.byteLength)throw new Ce(2,4,4048)}else o=Yv(i.ka,"EXT-X-MEDIA-SEQUENCE",0);var l=Jv(r(),Hv(n,"URI"),a),c=l.sort().join("");if(i=n.toString()+"-"+o+"-"+c,!t.ba.has(i)){var d={bitsKey:128,blockCipherMode:"CBC",iv:u,f
1irstMediaSequenceNumber:o};switch(Hv(n,"METHOD")){case"AES-256":d.bitsKey=256;break;case"AES-256-CTR":d.bitsKey=256,d.blockCipherMode="CTR"}d.fetchKey=function(){var n,i,r,a;return D(function(o){if(1==o.g)return t.K.has(c)||(n=Jr(l,t.g.retryParameters),i=qy(t,n,6).promise,t.K.set(c,i)),S(o,t.K.get(c),2);if(3!=o.g){if(!(r=o.h).data||r.data.byteLength!=d.bitsKey/8)throw new Ce(2,4,4049);return a={name:"CTR"==d.blockCipherMode?"AES-CTR":"AES-CBC",length:d.bitsKey},S(o,e.crypto.subtle.importKey("raw",r.data,a,!0,["decrypt"]),3)}d.cryptoKey=o.h,d.fetchKey=void 0,w(o)})},t.ba.set(i,d)}return t.ba.get(i)}function Ry(e,t){null==e.u&&(t=Xv(t.ka,"EXT-X-START"))&&(e.u=Number(Hv(t,"TIME-OFFSET")))}function Py(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=Xv(i[r].ka,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=Xv(t.ka,"EXT-X-TARGETDURATION")))throw new Ce(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Xv(t.ka,"EXT-X-PART-INF"))&&(e.O=Number(Hv(r,"PART-TARGET"))),t=Xv(t.ka,"EXT-X-SERVER-CONTROL"),e.$&&e.O?(e.s=e.wc?5*e.O<=n?Math.min(e.O,e.s):Math.min(n,e.s):Math.min(e.O,e.s),e.fb=t?Number(Hv(t,"PART-HOLD-BACK")):0):(e.s=Math.min(n,e.s),n=t?Vv(t,"HOLD-BACK"):null,e.Ha=n?Number(n.value):0),e.Na=Math.max(i,e.Na)}function Dy(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.fb)n=e.fb;else if(e.Ha)n=e.Ha;else{var i=t.segments.length,r=e.g.hls.liveSegmentsDelay;for(r>i-2&&(r=Math.max(1,i-2)),r=i-r;r<i;r++){var a=Xv(t.segments[r].ka,"EXTINF");n=a?n+Math.ceil(Number(a.value.split(",")[0])):n+e.Na}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.Gj(0),e.l.Uh(n),e.l.md(!1)}function Ny(e,t,n,i,r){var a=Xv(n,"EXT-X-MAP");if(!a)return null;var o=Hv(a,"URI"),s=Jv(i(),o,r);if(o=[s.toString(),Gv(a,"BYTERANGE","")].join("-"),!e.ra.has(o)){for(var u=void 0,l=null,d=!1,h=(n=c(n)).next();!h.done;h=n.next())"EXT-X-KEY"==(h=h.value).name?Xy(d=Hv(h,"METHOD"))&&h.id<a.id?(d=!1,u=Ly(e,h,t,i,r)):d="NONE"!=d:"EXT-X-BYTERANGE"==h.name&&h.id<a.id&&(l=h);t=function(e,t,n,i,r){var a=0,o=null;return t=Gv(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(a=t.split("@"),o=Number(a[0]),a=Number(a[1]),o=a+o-1,i&&(n=o+1-a,n%16&&(o+=16-n%16))),new Jo(function(){return e},a,o,null,null,null,i,r)}(s,a,l,u,d),e.ra.set(o,t)}return e.ra.get(o)}function _y(t,n,i,r,a,o,s,u,l){function d(e){e=new ae(e).ub.split(".").pop();var t=nb.get(s).get(e);return t||(t=Qy.get(e)),t}var h=r.ka,p=Xv(h,"EXTINF"),f=0,g=0,m=null;r.ec.length&&(t.m.isLowLatency=!0);var v=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=Xv(h,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Cn(y.value),t.Ta=!0)}var b=es;if(Xv(h,"EXT-X-GAP")&&(t.m.gapCount++,b=2),!p){if(0==r.ec.length)throw new Ce(2,4,4024,"EXTINF");if(!t.$)return null}var T=[];y=!1;var S=null,w=!1,A=!1;if(t.$&&r.ec.length){f=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var E=v,x={},k=0;k<r.ec.length;x={lg:void 0,Nf:void 0},k++){var I=r.ec[k],C=0==k?i:T[T.length-1],M=0==k?a:C.endTime,L=Number(Gv(I,"DURATION"))||t.O;if(L){var R=M+L,P=0,D=null;if("EXT-X-PRELOAD-HINT"==I.name?(P=(P=Gv(I,"BYTERANGE-START"))?Number(P):0,(C=Gv(I,"BYTERANGE-LENGTH"))?D=P+Number(C)-1:P&&(D=Number.MAX_SAFE_INTEGER)):(P=(D=c(Oy(C,P=Gv(I,"BYTERANGE")))).next().value,D=D.next().value),x.Nf=Gv(I,"URI"),x.Nf){C=es,"YES"==Gv(I,"GAP")&&(t.m.gapCount++,C=2,w=!0),x.lg=null;var N=function(e){return function(){return null==e.lg&&(e.lg=Jv(u(),e.Nf,o)),e.lg}}(x);f&&0<=P&&null!=D&&(S=N,y=!0),M=new $o(M,R,N,P,D,n,0,0,1/0,[],"",null,E,C,l),"EXT-X-PRELOAD-HINT"==I.name&&(M.Bh(),A=!0),"YES"!=Gv(I,"INDEPENDENT")&&0<k&&M.Dd(),(x=d(x.Nf))&&(M.mimeType=x,ib.has(x)&&(M.ea=null)),T.push(M),E&&(E+=L)}}}}if(p){if(0==(p=Number(p.value.split(",")[0])))return null;f=a+p}else{if(!T.length)return null;f=T[T.length-1].endTime}y&&(w||0!=T[0].startByte?(y=!1,S=null):T=[]),(p=Xv(h,"EXT-X-BYTERANGE"))?(g=(m=c(Oy(i,p.value))).next().value,m=m.next().value):T.length&&(g=T[0].startByte,m=T[T.length-1].endByte),i="",p=null,"image"==s&&(i="1x1",h=Xv(h,"EXT-X-TILES"))&&(i=Hv(h,"LAYOUT"),(h=Gv(h,"DURATION"))&&(p=Number(h)));var _=null;return n=new $o(a,f,function(){return S?S():(null==_&&(_=Jv(u(),r.g,o)),_||[])},g,m,n,0,0,1/0,T,i,p,v,b,l,0<T.length&&!!r.g),(a=d(r.g))&&(n.mimeType=a,ib.has(a)&&(n.ea=null)),y&&(t.wc=!0,n.cj(),A&&n.Bh()),n}function Oy(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function Uy(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.l.m;if(a&&!xy(e,n))for(t=(t=Wv(t,"EXT-X-DATERANGE")).filter(function(e){return null!=Vv(e,"START-DATE")}).sort(function(e,t){return(e=Hv(e,"START-DATE"))<(t=Hv(t,"START-DATE"))?-1:e>t?1:0}),n=0;n<t.length;n++){var o=t[n];try{var s=Cn(Hv(o,"START-DATE"));if(!isNaN(s)){var u=Math.max(0,s-a),l=null,d=Gv(o,"END-DATE");if(d){var h=Cn(d);if(!isNaN(h)&&0>(l=h-a))continue}if(null==l){var p=Gv(o,"DURATION")||Gv(o,"PLANNED-DURATION");if(p){var f=parseFloat(p);if(isNaN(f)||(l=u+f),0>s-a+f)continue}}var g=Gv(o,"CLASS")||"com.apple.quicktime.HLS",m="YES"==Gv(o,"END-ON-NEXT");if(null==l&&m){for(var v=n+1;v<t.length;v++){if(g==(Gv(t[v],"CLASS")||"com.apple.quicktime.HLS")){var y=Cn(Hv(t[v],"START-DATE"));if(!isNaN(y)&&y&&y>s){l=Math.max(0,y-a);break}}}if(null==l)continue}v=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var b=[],T=c(o.attributes),S=T.next();!S.done;S=T.next()){var w=S.value;if(!v.includes(w.name)){var A=$v(w.value,i);"X-ASSET-URI"!=w.name&&"X-ASSET-LIST"!=w.name||(A=Jv(r(),w.value,i)[0]),b.push({key:w.name,description:"",data:A,mimeType:null,pictureType:null})}}1<b.length&&e.h.onMetadata(g,u,l,b)}}catch(e){}}}}
1function jy(e,t,n,i,r,a){var o=t.segments,s=void 0,u=Yv(t.ka,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Yv(t.ka,"EXT-X-MEDIA-SEQUENCE",0),d=Xv(t.ka,"EXT-X-SKIP"),h=d?Number(Gv(d,"SKIPPED-SEGMENTS")):0,p=l+h,f=0;Ky(e)&&n.has(p)&&(f=n.get(p)),0===f&&e.sa==ob&&0<n.size&&!n.has(p)&&null!=e.l.i&&(f=e.l.Kb());var g=[],m=null;d=[];for(var v=0;v<o.length;v++){var y=o[v],b=0==v?f:m.endTime;p=l+h+v,Xv(y.ka,"EXT-X-DISCONTINUITY")&&(u++,m&&m.ea&&(m.ea.g=b));for(var T=c(y.ka),S=T.next();!S.done;S=T.next())"EXT-X-KEY"==(S=S.value).name&&(s=Xy(Hv(S,"METHOD"))?Ly(e,S,t,r,i):void 0);n.set(p,b),(b=_y(e,T=Ny(e,t,y.ka,r,i),m,y,b,i,a,r,s))&&((m=Yv(y.ka,"EXT-X-BITRATE"))?d.push({bitrate:m,duration:b.endTime-b.startTime}):d.length&&((m=d.pop()).duration+=b.endTime-b.startTime,d.push(m)),m=b,b.i=u,xy(e,a)&&null!=e.J&&p<e.J||g.push(b))}if(t=void 0,d.length&&(t=d.reduce(function(e,t){return e+t.duration},0),t=Math.round(d.reduce(function(e,t){return e+t.bitrate*t.duration},0)/t*1e3)),d=g.some(function(e){return null!=e.h}))for(n={},i=0;i<g.length;n={lf:void 0,kf:void 0,$e:void 0,jd:void 0,Ze:void 0},i++)if(n.jd=g[i],null==n.jd.h)for(n.kf=0,n.lf=i,r=function(e){return function(){var t=g[e.lf];if(t){if(null!=t.h)return t.h+e.kf;e.kf-=t.endTime-t.startTime,e.lf+=1}return null}}(n),n.Ze=0,n.$e=i,o=function(e){return function(){var t=g[e.$e];if(t){if(t!=e.jd&&(e.Ze+=t.endTime-t.startTime),null!=t.h)return t.h+e.Ze;--e.$e}return null}}(n);null==n.jd.h;)n.jd.h=o(),null==n.jd.h&&(n.jd.h=r());if(d)for(i=(n=c(g)).next();!i.done;i=n.next())for(i=(r=i.value).h,o=(r=c(r.g)).next();!o.done;o=r.next())(o=o.value).h=i,i+=o.endTime-o.startTime;if(n=e.Z,d&&1/0!=n&&!xy(e,a))for(a=(e=c(g)).next();!a.done;a=e.next())a.value.gi(n);return{segments:g,bandwidth:t}}function By(e,t){if(e==it){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function Fy(e){return e==it?"text/vtt":nb.get(e).get("mp4")}function Vy(e,t){for(var n=t[e=Ky(e)?Math.trunc((t.length-1)/2):0];2==n.Ic()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function Gy(e,t,n,i,r,a,o){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=a||void 0,e.colorGamut=o||void 0)}function Hy(e,t,n){return qy(e,Jr(t,e.g.retryParameters),0,{type:n?2:3})}function zy(e){var t,n,i,r,a,o;return D(function(s){switch(s.g){case 1:return e.h?(A(s,2),t=Date.now(),S(s,e.update(),4)):s.return();case 4:n=Date.now(),Ky(e)&&(i=(n-t)/1e3,e.cb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.s,a=Math.max(0,r-At(e.cb)),e.C.X(a)),x(s,3);break;case 2:if(o=k(s),!e.h)return s.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(o),s.return();o.severity=1,e.h.onError(o),e.C.X(.1);case 3:if(!e.h)return s.return();e.h.onManifestUpdated(),w(s)}})}function Ky(e){return e.sa!=rb}function Wy(e,t){e.sa=t,e.l&&e.l.md(!Ky(e)),Ky(e)||e.C.stop()}function qy(e,t,n,i){if(!e.U)throw new Ce(2,7,7001);return i||(i={}),i.isPreload=e.Lb(),t=e.h.networkingEngine.request(n,t,i),Wr(e.U,t),t}function Xy(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function Yy(t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v;return D(function(y){switch(y.g){case 1:if("video/mp2t"==i)throw new Ce(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new Ce(2,4,4041);if(s=Hv(n,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s))return y.return(null);if((u=Jv(r(),Hv(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=Ye(qe(u[0].split("data:text/plain;base64,").pop())),y.A(2);break}return c=u.sort().join(""),t.na.has(c)||(d=Jr(u,t.g.retryParameters),h=qy(t,d,6).promise,t.na.set(c,h)),S(y,t.na.get(c),3);case 3:p=y.h,l=Ye(p.data);case 2:if(f="00000000000000000000000000000000",!a){y.A(4);break}return S(y,Jy(t,a),5);case 5:(g=y.h)&&(f=g);case 4:return(m=new Map).set(f,l),v="cenc","SAMPLE-AES"==s&&(v="cbcs"),y.return(Ze(m,v))}})}function Jy(e,t){var n,i,r;return D(function(a){return 1==a.g?(n=null,e.oa.has(t)?(n=e.oa.get(t),a.A(2)):(i=yl(t.S(),t.Hc(),t.Fc(),e.g.retryParameters),S(a,qy(e,i,ta,{type:0}).promise,3))):(2!=a.g&&(r=a.h,t.ze(r.data),n=function(e){var t=null;return(new da).box("moov",ha).box("trak",ha).box("mdia",ha).box("minf",ha).box("stbl",ha).V("stsd",pa).box("encv",fa).box("enca",ga).box("sinf",ha).box("schi",ha).V("tenc",function(e){(e=e.reader).aa(),e.aa(),e.aa(),e.aa(),t=Ye(e.Xb(16))}).parse(e,!0),t}(r.data),e.oa.set(t,n)),a.return(n))})}H("shaka.net.DataUriPlugin",ry),ry.parse=ay,Xr("data",ay),(r=sy.prototype).configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Lb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.T()&&this.C.Ka()},r.start=function(e,t){var n,i=this;
1return D(function(r){return 1==r.g?(i.h=t,i.$=t.isLowLatencyMode(),S(r,Hy(i,[e]).promise,2)):3!=r.g?(n=r.h,i.D=n.uri,S(r,function(e,t){var n,i,r,a,o,s,u,l,h,p,f,g,m,v,y,b,T,E,x,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,K,W,q,X,Y,J,Q,$;return D(function(Z){switch(Z.g){case 1:return n=rt,i=ey(e.La,t),r=Wv(i.ka,"EXT-X-DEFINE"),a=[],o=[],s=[],e.l=new Tu(null,0),e.l.md(!0),u=function(){return[e.D]},l=null,h=new Map,1==i.type?(e.N=!1,F=Wv(i.ka,"EXT-X-DEFINE"),h=fy(e,F,e.D),l=n.Ea,V="",G=new Map,S(Z,ky(e,e.F++,h,i,u,"",l,V,!0,"Media Playlist",null,G,null,!1,null,!1),7)):(function(e,t){for(var n=new ae(e.D).g,i=(t=c(t)).next();!i.done;i=t.next()){var r=i.value;i=Gv(r,"NAME");var a=Gv(r,"VALUE");r=Gv(r,"QUERYPARAM"),i&&a&&(e.B.has(i)||e.B.set(i,a)),r&&(i=n.get(r)[0])&&!e.B.has(i)&&e.B.set(r,i)}}(e,r),p=Wv(i.ka,"EXT-X-MEDIA"),f=Wv(i.ka,"EXT-X-STREAM-INF"),g=Wv(i.ka,"EXT-X-IMAGE-STREAM-INF"),m=Wv(i.ka,"EXT-X-I-FRAME-STREAM-INF"),v=Wv(i.ka,"EXT-X-SESSION-KEY"),y=Wv(i.ka,"EXT-X-SESSION-DATA"),b=Wv(i.ka,"EXT-X-CONTENT-STEERING"),function(e,t){for(var n=(t=c(t)).next();!n.done;n=t.next()){var i=n.value,r=Gv(i,"DATA-ID");n=Gv(i,"URI");var a=Gv(i,"LANGUAGE");i=Gv(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",Jv([e.D],n,e.B)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new z("sessiondata",r),e.h&&e.h.onEvent(n)}}(e,y),S(Z,function(e,t){var n,i,r,a,o,s;return D(function(u){if(!e.h||!e.g)return u.return();for(i=c(t),r=i.next();!r.done;r=i.next())if(a=r.value,o=Gv(a,"PATHWAY-ID"),s=Gv(a,"SERVER-URI"),o&&s){e.j=new am(e.h),e.j.configure(e.g),e.j.i=[e.D],e.j.setManifestType("HLS"),e.j.h=o,n=om(e.j,s);break}return S(u,n,0)})}(e,b),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(T=[],E=c(f),x=E.next(),I={};!x.done;I={Pj:void 0},x=E.next())C=x.value,(M=Gv(C,"SUPPLEMENTAL-CODECS"))&&(I.Pj=M.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),L=C.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.Pj.join(","),1<(t=t.value.split(",")).length&&(t=tt("audio",t))&&(i+=","+t)),new Kv(n,i)}}(I)),T.push(new Bv(C.id,C.name,L,null)));for(f.push.apply(f,d(T)),R=[],P=c(m),N=P.next(),_={};!N.done;_={Qj:void 0},N=P.next())O=N.value,(U=Gv(O,"SUPPLEMENTAL-CODECS"))&&(_.Qj=U.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),j=O.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.Qj.join(",")),new Kv(n,t)}}(_)),R.push(new Bv(O.id,O.name,j,null)));m.push.apply(m,d(R))}return function(e,t){for(var n=(t=c(t)).next();!n.done;n=t.next()){var i=n.value,r=Gv(i,"AUDIO");n=Gv(i,"VIDEO");var a=Gv(i,"SUBTITLES");if(i=vy(e,i),a){var o=tt(it,i);e.H.set(a,o),Zt(i,o)}r&&((a=tt("audio",i))||(a=e.g.hls.defaultAudioCodec),e.H.set(r,a)),n&&((r=tt("video",i))||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}(e,f),function(e,t){t=qv(t,"CLOSED-CAPTIONS"),e.N=0==t.length;for(var n=(t=c(t)).next();!n.done;n=t.next()){var i=n.value,r=Gv(i,"LANGUAGE");n=dt(r||"und"),r||(r=Gv(i,"NAME"))&&(n=r),r=Hv(i,"GROUP-ID"),i=Hv(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}(e,p),B=function(e,t){return t.map(function(t){return"video"!==(t=Ty(e,t)).stream.type?null:t.stream}).filter(function(e){return e})}(e,m),S(Z,function(e,t,n,i,r,a,o){var s,u,l,h,p,f,g,m,v,y,b,T,w,A,E,x,k,I,C,M,L,R,P,N,_,O,U,j,B,F,V,G,H,z,K,W;return D(function(D){switch(D.g){case 1:if(s=[],u=new Set,e.g.ignoreDrmInfo||!(0<n.length)){D.A(2);break}l=c(n),h=l.next();case 3:if(h.done){D.A(2);break}if(p=h.value,f=Hv(p,"METHOD"),g=Gv(p,"KEYFORMAT")||"identity",m=null,"NONE"==f){D.A(4);break}if(Xy(f)){v=Jv(r(),Hv(p,"URI"),a),y=v.sort().join(""),e.K.has(y)||(b=Jr(v,e.g.retryParameters),T=qy(e,b,6).promise,e.K.set(y,T)),D.A(4);break}if("identity"==g)return S(D,Yy(e,p,"",r,null,a),12);if(!(w=e.dc.get(g))){A=null,D.A(10);break}return S(D,w(p,"",null),11);case 11:A=D.h;case 10:m=A,D.A(6);break;case 12:m=D.h;case 6:if(m){if(m.keyIds)for(E=c(m.keyIds),x=E.next();!x.done;x=E.next())k=x.value,u.add(k);s.push(m)}case 4:h=l.next(),D.A(3);break;case 2:for(I={},C=c(t),M=C.next();!M.done;M=C.next())L=M.value,R=Fv(L,!e.j),I[R]?I[R].push(L):I[R]=[L];for(N in P=[],I)_=I[N],O=_[0],U=Gv(O,"FRAME-RATE"),j=Number(Gv(O,"AVERAGE-BANDWIDTH"))||Number(Hv(O,"BANDWIDTH")),B=Gv(O,"RESOLUTION"),F=c(B?B.split("x"):[null,null]),V=F.next().value,G=F.next().value,H=Gv(O,"VIDEO-RANGE"),(z=Gv(O,"REQ-VIDEO-LAYOUT"))&&z.includes(",")&&(K=z.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e}),z=K[0]),z=z||"CH-MONO",W=my(e,_,i),P.push.apply(P,d(yy(e,W.audio,W.video,j,V,G,U,H,z,s,u,o)));return D.return(P.filter(function(e){return null!=e}))}})}(e,f,v,p,u,e.B,B),5);case 5:return a=Z.h,o=function(e,t){var n=qv(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return by(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}});for(var i=(n=c(n)).next();!i.done;i=n.next()){var r=Hv(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r)))for(var a=(r=c(r)).next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=By(it,i)||Fy(it),gy(a.stream)}return t.filter(function(e){return e})}(e,p),S(Z,function(e,t,n){var i,r;return D(function(a){return 1==a.g?(i=t.map(function(t){var n,i;return D(function(r){if(1==r.g)return e.g.disableThumbnails?r.return(null):(A(r,2),S(r,function(e,t){var n,i,r,a,o,s,u,l,c,d;return D(function(h){return 1==h.g?(n=Hv(t,"URI"),i=Gv(t,"CODECS","jpeg")||"",e.i.has(n)?h.return(e.i.get(n)):(r=Gv(t,"LANGUAGE"),a=Gv(t,"NAME"),o=Gv(t,"CHARACTERISTICS"),s=Sy(e,e.F++,[n],i,"image",r,!1,a,null,
1null,o,!1,null,!1),(u=Gv(t,"RESOLUTION"))?S(h,s.stream.createSegmentIndex(),3):h.A(2))):(2!=h.g&&(l=zu(s.stream.segmentIndex),c=l.tilesLayout)&&(s.stream.width=Number(u.split("x")[0])*Number(c.split("x")[0]),s.stream.height=Number(u.split("x")[1])*Number(c.split("x")[1])),(d=Gv(t,"BANDWIDTH"))&&(s.stream.bandwidth=Number(d)),e.i.set(n,s),h.return(s))})}(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=k(r),e.g.hls.ignoreImageStreamFailures)return r.return(null);throw i})}).concat(n.map(function(t){if(e.g.disableThumbnails)return null;try{var n=Ty(e,t);return"image"!==n.stream.type?null:n.stream}catch(t){if(e.g.hls.ignoreImageStreamFailures)return null;throw t}})),S(a,Promise.all(i),2)):(r=a.h,a.return(r.filter(function(e){return e})))})}(e,g,m),6);case 6:s=Z.h,Z.A(3);break;case 7:H=Z.h,e.i.set(e.D,H),H.stream&&(K=el(H.stream),H.stream.segmentIndex.Hb(function(e){e.ea&&(e.ea.Ed=K)})),l=H.stream.type,W=!0,(e.g.disableAudio&&"audio"==H.type||e.g.disableVideo&&"video"==H.type&&!H.stream.codecs.includes(","))&&(W=!1),W&&a.push({id:0,language:dt(V||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==H.type?H.stream:null,video:"video"==H.type?H.stream:null,bandwidth:H.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new Ce(2,7,7001);if(Ry(e,i),1==i.type&&(Ky(e)&&(Dy(e,i),q=e.s,e.C.X(q)),X=Array.from(e.i.values()),Ey(e,X),py(e),Uy(e,i.ka,l,h,u)),e.m={presentationTimeline:e.l,variants:a,textStreams:o,imageStreams:s,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.u},e.Y||!e.g.hls.disableCodecGuessing){Z.A(8);break}for(Y=[],J=c(e.m.variants),Q=J.next();!Q.done;Q=J.next())($=Q.value).audio&&""===$.audio.codecs&&Y.push($.audio.createSegmentIndex()),$.video&&""===$.video.codecs&&Y.push($.video.createSegmentIndex());return S(Z,Promise.all(Y),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),w(Z)}})}(i,n.data),3)):r.return(i.m)})},r.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.U&&(e.push(this.U.destroy()),this.U=null),this.g=this.h=null,this.Ya.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.B.clear(),this.ra.clear(),this.ba.clear(),this.K.clear(),this.na.clear(),this.oa.clear(),this.j&&this.j.destroy(),this.P&&(this.P.release(),this.P=null),Promise.all(e)},r.update=function(){var e,t,n,i,r,a,o,s,u,l,h,p=this;return D(function(f){if(1==f.g){if(!Ky(p))return f.return();for(e=[],t=Array.from(p.i.values()),p.s=1/0,p.m.gapCount=0,n=t.filter(function(e){return e.stream.segmentIndex}),i=c(n),r=i.next();!r.done;r=i.next())a=r.value,e.push(ly(p,a));return S(f,Promise.all(e),2)}for(Ay(p,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.ee}),n.length&&!o&&(Wy(p,sb.bk),s=n.map(function(e){return e.uc}),p.l.vb(Math.min.apply(Math,d(s))),p.h.updateDuration()),o&&py(p),u=c(n),l=u.next();!l.done;l=u.next())(h=l.value).stream.isAudioMuxedInVideo||!h.stream.segmentIndex||zu(h.stream.segmentIndex)||p.h.disableStream(h.stream);w(f)})},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(){},r.banLocation=function(e){this.j&&this.j.banLocation(e)},r.setMediaElement=function(e){this.R=e},H("shaka.hls.HlsParser",sy);var Qy=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),$y=(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"),Zy=(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","video/mp2t").set("tsv","video/mp2t"),eb=(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"),tb=(new Map).set("jpg","
1image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),nb=(new Map).set("audio",$y).set("video",Zy).set("text",eb).set("image",tb),ib=new Set(["video/mp2t"].concat(d(Oi))),rb="VOD",ab="EVENT",ob="LIVE",sb={bk:rb,Jm:ab,Tm:ob};function ub(e){return Eg(e)}uo("application/x-mpegurl",function(){return new sy}),uo("application/vnd.apple.mpegurl",function(){return new sy});var lb=(new Map).set("com.microsoft.playready",ub).set("com.microsoft.playready.recommendation",ub).set("com.microsoft.playready.software",ub).set("com.microsoft.playready.hardware",ub);function cb(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new wt(5),this.s=new Ki(function(){!function(e){var t;D(function(n){switch(n.g){case 1:return A(n,2),S(n,db(e),4);case 4:x(n,3);break;case 2:t=k(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();w(n)}})}(e)}),this.C=new Kr,this.m=new Map,this.B=function(){return!1}}function db(e){var t,n,i,r,a,o,s;return D(function(u){if(1==u.g)return t=Jr(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.B()}),Wr(e.C,r),S(u,r.promise,2);if(a=u.h,!e.h)return u.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var l=a.uri,h=a.data,p=e.g.mss.manifestPreprocessor;if(p!=sc){if(Mt("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(h=Km(h,"SmoothStreamingMedia")))throw new Ce(2,4,4046,l);p(h),h=Be(h.outerHTML)}var f=pn(h,"SmoothStreamingMedia");if(!f)throw new Ce(2,4,4046,l);if((l=e.g.mss.manifestPreprocessorTXml)!=uc&&l(f),e.i||(e.i=new Tu(null,0)),l=En(f,"IsLive",_n,!1))throw new Ce(2,4,4047);e.i.md(!l),p=En(f,"TimeScale",Dn,1e7),h=En(f,"DVRWindowLength",Dn),l&&(0===h||isNaN(h))&&(h=1/0);var g,m=En(f,"CanSeek",_n,!1);for(0===h&&m&&(h=1/0),m=null,h&&0<h&&(m=h/p),l&&!isNaN(e.g.availabilityWindowOverride)&&(m=e.g.availabilityWindowOverride),null==m&&(m=1/0),e.i.ag(m),h=En(f,"Duration",Dn,1/0),l||e.i.vb(h/p),l={variants:[],textStreams:[],timescale:p,duration:h/p},m=yn(f,"Protection"),p=e.g.mss.keySystemsBySystemId,h=[],g=(m=c(m)).next();!g.done;g=m.next())h=h.concat(yn(g.value,"ProtectionHeader"));if(h.length){for(m=[],g=0;g<h.length;g++){var v=h[g],y=v.attributes.SystemID.toLowerCase(),b=p[y];if(b){var T;e:{if(T=Ag(v))for(var A=(T=c(Sn(T,"DATA"))).next();!A.done;A=T.next())if(A=wn(A.value,"KID")){T=qe(bn(A)),T=Ye(T=new Uint8Array([T[3],T[2],T[1],T[0],T[5],T[4],T[7],T[6]].concat(d(T.slice(8)))));break e}T=null}y=$e(b,"cenc",y=[{initData:Aa(A=qe(bn(v)),y=Xe(y.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:T}]),T&&y.keyIds.add(T),(b=lb.get(b))&&(y.licenseServerUri=b(v)),m.push(y)}}p=m}else p=[];for(g=p,m=[],p=[],h=[],v=(f=c(f=yn(f,"StreamIndex"))).next();!v.done;v=f.next()){b=yn(v=v.value,"QualityLevel"),y=l.timescale,T=l.duration,A=yn(v,"c");for(var E=[],x=0,k=0;k<A.length;++k){var I=A[k],C=A[k+1],M=En(I,"t",Dn),L=En(I,"d",Dn);if(I=En(I,"r",Rn),!L)break;if(M=null!=M?M:x,(I=I||0)&&I--,0>I)if(C){if(null==(C=En(C,"t",Dn)))break;if(M>=C)break;I=Math.ceil((C-M)/L)-1}else{if(1/0==T)break;if(M/y>=T)break;I=Math.ceil((T*y-M)/L)-1}for(C=0;C<=I;++C)x=M+L,E.push({start:M/y,end:x/y,ni:M}),M=x}for(y=E,T=(b=c(b)).next();!T.done;T=b.next())(T=hb(e,v,T.value,y,g,l))&&("audio"!=T.type||e.g.disableAudio?"video"!=T.type||e.g.disableVideo?T.type!=it||e.g.disableText||h.push(T):p.push(T):m.push(T))}for(f=[],g=(m=c(0<m.length?m:[null])).next();!g.done;g=m.next())for(g=g.value,E=(v=c(0<p.length?p:[null])).next();!E.done;E=v.next())y=(b=f).push,T=e,A=g,E=E.value,k=0,A&&A.bandwidth&&0<A.bandwidth&&(k+=A.bandwidth),E&&E.bandwidth&&0<E.bandwidth&&(k+=E.bandwidth),T={id:T.u++,language:A?A.language:"und",disabledUntilTime:0,primary:!!A&&A.primary||!!E&&E.primary,audio:A,video:E,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(b,T);l.variants=f,l.textStreams=h,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.Df()),Promise.resolve(),o=Date.now(),s=(o-i)/1e3,e.D.sample(1,s),w(u)})}function hb(e,t,n,i,r,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return Y("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,u=e.u++,l=En(n,"Bitrate",Pn),d=En(n,"MaxWidth",Pn),h=En(n,"MaxHeight",Pn),p=En(n,"Channels",Pn),f=En(n,"SamplingRate",Pn),g=a.duration;i.length&&(g=i[i.length-1].end-i[0].start);var m=e.i.getDuration();e.i.vb(Math.min(g,m));var v={id:u,originalId:t.attributes.Name||String(u),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:d||void 0,height:h||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:dt(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:f,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:g,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=fb.get(r))&&v.roles.push(r),"main"===r&&(v.primary=!0)),null!==(r=n.attributes.FourCC)&&""!==r||(r=t.attributes.FourCC),!r)if("audio"===o)r="AAC";else if("video"===o)return Y('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!pb.includes(r.toUpperCase()))return Y("Codec not supported:",r),null;
1switch(n=function(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;var r={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};return i=r[e],"AACH"===n?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|i>>1,n[1]=i<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,r,v),v.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(r,n);break;case"video":if(!n)return Y("Quality unsupported without CodecPrivateData",o),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":v.type=it,v.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(v.codecs="stpp")}return v.fullMimeTypes.add(ki(v.mimeType,v.codecs)),v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var n=e.m.get(v.id);else n=[],"video"==v.type&&(n=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=So(new To([n={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Eb:n,Ma:new Uint8Array([]),Wa:new Uint8Array([]),bb:0,eb:0,data:null,stream:v}])),e.m.set(v.id,n);return n=function(e,t,n,i,r){var a=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[];for(var o=(r=c(r)).next(),s={};!o.done;s={fg:void 0},o=r.next())s.fg=o.value,i.push(new $o(s.fg.start,s.fg.end,function(t){return function(){return Qe(e.l,[a.replace("{start time}",String(t.fg.ni))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new Jo(function(){return[]},0,null,el(v),v.mssPrivateData.timescale,n,null,v.encrypted),v,t,i),v.segmentIndex=new Hu(n),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}(r=cb.prototype).configure=function(e,t){this.g=e,t&&(this.B=t)},r.start=function(e,t){var n=this;return D(function(i){if(1==i.g)return n.l=[e],n.h=t,S(i,db(n),2);if(!n.h)throw new Ce(2,7,7001);return i.return(n.j)})},r.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.s&&(this.s.stop(),this.s=null),this.m.clear(),this.C.destroy()},r.update=function(){var e,t=this;return D(function(n){return 1==n.g?(A(n,2),S(n,db(t),4)):2!=n.g?x(n,0):(e=k(n),t.h&&e?(t.h.onError(e),void w(n)):n.return())})},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(){},r.banLocation=function(){},r.setMediaElement=function(){},H("shaka.mss.MssParser",cb);var pb="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fb=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");function gb(e,t,n,i,r,a,o){if(200<=n&&299>=n&&202!=n||304==n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:a};a=null;try{a=je(t)}catch(e){}throw new Ce(401==n||403==n?2:1,1,1001,i,n,a,e,o,r||i)}function mb(){}function vb(e,t,n,i,r,a){var o=new wb;oa(t.headers).forEach(function(e,t){o.append(t,e)});var s=new Tb,u={Ci:!1,Uj:!1};if(e=function(e,t,n,i,r,a,o,s,u){var l,c,d,h,p,f,g,m,v,y,b,T,E,I;return D(function(C){switch(C.g){case 1:return l=bb,c=Sb,h=new ArrayBuffer(0),f=p=0,g={},m=Date.now(),A(C,2),S(C,l(e,i),4);case 4:if(d=C.h,g=function(e){var t={};return e.forEach(function(e,n){t[n.trim()]=e}),t}(d.headers),o(g),"HEAD"==i.method){C.A(5);break}return y=(v=d.headers.get("Content-Length"))?parseInt(v,10):0,d.body?(b=d.clone().body.getReader(),new c({start:function(e){function t(){var n,i,r,o;return D(function(l){switch(l.g){case 1:return A(l,2),S(l,b.read(),4);case 4:n=l.h,x(l,3);break;case 2:return k(l),l.return();case 3:if(n.done){l.A(5);break}if(p+=n.value.byteLength,!s){l.A(5);break}return S(l,s(n.value),5);case 5:i=Date.now(),r=p-f,(100<i-m&&r>=u||n.done)&&(o=n.done?0:y-p,a(i-m,r,o),f=p,m=i),n.done?e.close():(e.enqueue(n.value),t()),w(l)}})}t()}}),S(C,d.arrayBuffer(),8)):S(C,d.arrayBuffer(),9);case 8:h=C.h,C.A(5);break;case 9:h=C.h,T=Date.now(),a(T-m,h.byteLength,0);case 5:t.headers.Range&&(2==(E=t.headers.Range.replace("bytes=","").split("-").filter(function(e){return e}).map(function(e){return parseInt(e,10)})).length&&h.byteLength!=E[1]-E[0]+1&&Y("Payload length does not match range requested bytes",t,d)),x(C,3);break;
1case 2:if(I=k(C),r.Ci)throw new Ce(1,1,7001,e,n);if(r.Uj)throw new Ce(1,1,1003,e,n);throw new Ce(1,1,1002,e,I,n);case 3:return C.return(gb(g,h,d.status,e,d.url,t,n))}})}(e,t,n,{body:t.body||void 0,headers:o,method:t.method,signal:s.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u,i,r,t.streamDataCallback,a.minBytesForProgressEvents||0),e=new Br(e,function(){return u.Ci=!0,s.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new Ki(function(){u.Uj=!0,s.abort()});l.X(t/1e3),e.finally(function(){l.stop()})}return e}function yb(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&(!!new Response("").body&&!(!e.fetch||"polyfill"in e.fetch||!e.AbortController))}uo("application/vnd.ms-sstr+xml",function(){return new cb}),H("shaka.net.HttpFetchPlugin",mb),mb.isSupported=yb,mb.parse=vb;var bb=e.fetch,Tb=e.AbortController,Sb=e.ReadableStream,wb=e.Headers;function Ab(){}function Eb(e,t,n,i,r,a){var o=new xb,s=Date.now(),u=0;return new Br(new Promise(function(l,d){o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials;var h={};for(var p in o.onabort=function(){d(new Ce(1,1,7001,e,n))},o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.HEADERS_RECEIVED){for(var e=o.getAllResponseHeaders().trim().split("\r\n"),t={},n=(e=c(e)).next();!n.done;n=e.next())t[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");r(h=t)}},o.onload=function(r){var a=o.response;try{i(Date.now()-s,r.loaded-u,0);var c=gb(h,a,o.status,e,o.responseURL,t,n);l(c)}catch(e){d(e)}},o.onerror=function(t){d(new Ce(1,1,1002,e,t,n))},o.ontimeout=function(){d(new Ce(1,1,1003,e,n))},o.onprogress=function(e){var t=Date.now(),n=a.minBytesForProgressEvents||0,r=e.loaded-u;(100<t-s&&r>=n||e.lengthComputable&&e.loaded==e.total)&&(i(t-s,r,4==o.readyState?0:e.total-e.loaded),u=e.loaded,s=t)},t.headers)o.setRequestHeader(p.toLowerCase(),t.headers[p]);o.send(t.body)}),function(){return o.abort(),Promise.resolve()})}yb()&&(Xr("http",vb,2,!0),Xr("https",vb,2,!0),Xr("blob",vb,2,!0)),H("shaka.net.HttpXHRPlugin",Ab),Ab.parse=Eb;var xb=e.XMLHttpRequest;function kb(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function Ib(e){var t=e.cc(!1);return t?We(t):e.S().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function Cb(e,t){return yl(e.g.S(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function Mb(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function Lb(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function Rb(e){return 0==e.i?0:e.j/e.i}function Pb(e){var t=this;this.u=e,this.i=new Map,this.h=new ra(function(){return Db(t).catch(function(){})}),this.j=[],this.s=function(){},this.m=function(){},this.g=new Mb,this.l=!1}function Db(e){e.l=!0;var t=e.j.map(function(e){return e()});return e.j=[],Promise.all(t)}function Nb(e,t,n,i,r,a){aa(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new Ce(2,9,7001);if(r){var t=Ee(n);for(var o in(t=new wa(t)).data){var s=Number(o);e.m(t.data[s],t.g[s])}}return e.g.close(i,n.byteLength),e.s(Rb(e.g),e.g.g),a(n)});e.i.set(t,o)}function _b(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new jr,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function Ob(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return D(function(i){if(1==i.g)return null==r.result?(n(),i.return()):(e=r.result,S(i,t(e.key,e.value,e),2));e.continue(),w(i)})}})}function Ub(e){this.h=e,this.g=[]}function jb(e,t){return Bb(e,t,"readwrite")}function Bb(e,t,n){var i=new _b(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){Zt(e.g,i)},function(){Zt(e.g,i)}),i}function Fb(e,t,n){this.h=new Ub(e),this.i=t,this.g=n}function Vb(e){return Promise.reject(new Ce(2,9,9011,"Cannot add new value to "+e))}function Gb(e,t,n,i){t=(e=jb(e.h,t)).store();for(var r=(n=c(n)).next(),a={};!r.done;a={yh:void 0},r=n.next())a.yh=r.value,t.delete(a.yh).onsuccess=function(e){return function(){return i(e.yh)}}(a);return e.promise()}function Hb(e,t,n){var i,r,a,o,s,u,l;return D(function(d){if(1==d.g){for(i=Bb(e.h,t,"readonly"),r=i.store(
1),a={},o=[],s=c(n),u=s.next(),l={};!u.done;l={Wf:void 0,zf:void 0},u=s.next())l.zf=u.value,l.Wf=r.get(l.zf),l.Wf.onsuccess=function(e){return function(){null==e.Wf.result&&o.push(e.zf),a[e.zf]=e.Wf.result}}(l);return S(d,i.promise(),2)}if(o.length)throw new Ce(2,9,9012,"Could not find values for "+o);return d.return(n.map(function(e){return a[e]}))})}function zb(e){this.g=new Ub(e)}function Kb(){this.g=new Map}function Wb(e){var t=null;if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ub:n,ib:i},ib:e})})}),t)return t;throw new Ce(2,9,9013,"Could not find a cell that supports add-operations")}function qb(e,t,n){if(!(e=e.g.get(t)))throw new Ce(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new Ce(2,9,9013,"Could not find cell with name "+n);return t}function Xb(e,t){Yb.set(e,t)}Xr("http",Eb,1,!0),Xr("https",Eb,1,!0),Xr("blob",Eb,1,!0),Mb.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}},Pb.prototype.destroy=function(){return this.h.destroy()},Pb.prototype.queue=function(e,t,n,i,r){var a=this;aa(this.h);var o=(this.i.get(e)||Promise.resolve()).then(function(){var e,o,s,u,l,c,d;return D(function(h){if(1==h.g)return S(h,function(e,t){var n,i,r,a;return D(function(o){return 1==o.g?(n=ta,i=e.u.request(n,t),r=function(){return i.abort()},e.j.push(r),S(o,i.promise,2)):(a=o.h,Zt(e.j,r),o.return(a.data))})}(a,t),2);if(e=h.h,a.h.g)throw new Ce(2,9,7001);if(i)for(u in o=Ee(e),(s=new wa(o)).data)l=Number(u),c=s.data[l],d=s.g[l],a.m(c,d);return a.g.close(n,e.byteLength),a.s(Rb(a.g),a.g.g),h.return(r(e))})});return this.i.set(e,o),o},_b.prototype.abort=function(){var e=this;return D(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return A(t,2),S(t,e.g,4)}if(2!=t.g)return x(t,0);k(t),w(t)})},_b.prototype.store=function(){return this.h},_b.prototype.promise=function(){return this.g},Ub.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(r=Fb.prototype).destroy=function(){return this.h.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return Vb(this.i)},r.removeSegments=function(e,t){return Gb(this,this.i,e,t)},r.getSegments=function(e){var t,n=this;return D(function(i){return 1==i.g?S(i,Hb(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.Hi(e)})))})},r.addManifests=function(){return Vb(this.g)},r.updateManifest=function(){return Promise.reject(new Ce(2,9,9016,"Cannot modify values in "+this.g))},r.updateManifestExpiration=function(e,t){var n=jb(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},r.removeManifests=function(e,t){return Gb(this,this.g,e,t)},r.getManifests=function(e){var t,n=this;return D(function(i){return 1==i.g?S(i,Hb(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.Wd(e)}))))})},r.getAllManifests=function(){var e,t,n=this;return D(function(i){return 1==i.g?(e=Bb(n.h,n.g,"readonly"),t=new Map,S(i,Ob(e,function(e,i){var r;return D(function(a){if(1==a.g)return S(a,n.Wd(i),2);r=a.h,t.set(e,r),w(a)})}),2)):3!=i.g?S(i,e.promise(),3):i.return(t)})},r.Hi=function(e){return e},r.Wd=function(e){return Promise.resolve(e)},r.add=function(e,t){var n,i,r,a,o,s,u,l=this;return D(function(d){if(1==d.g){for(n=jb(l.h,e),i=n.store(),r=[],a=c(t),o=a.next(),s={};!o.done;s={Mh:void 0},o=a.next())u=o.value,s.Mh=i.add(u),s.Mh.onsuccess=function(e){return function(){r.push(e.Mh.result)}}(s);return S(d,n.promise(),2)}return d.return(r)})},zb.prototype.destroy=function(){return this.g.destroy()},zb.prototype.getAll=function(){var e,t,n=this;return D(function(i){return 1==i.g?(e=Bb(n.g,"session-ids","readonly"),t=[],S(i,Ob(e,function(e,n){t.push(n)}),2)):3!=i.g?S(i,e.promise(),3):i.return(t)})},zb.prototype.add=function(e){for(var t=jb(this.g,"session-ids"),n=t.store(),i=(e=c(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},zb.prototype.remove=function(e){var t,n=this;return D(function(i){return 1==i.g?S(i,Ob(t=jb(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):S(i,t.promise(),0)})},Kb.prototype.destroy=function(){for(var e=[],t=c(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Kb.prototype.init=function(){var e=this;Yb.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=c(this.g.values()),i=n.next();!i.done;
1i=n.next())t.push(i.value.init());return Promise.all(t)},H("shaka.offline.StorageMuxer",Kb),Kb.unregister=function(e){Yb.delete(e)},Kb.register=Xb,Kb.prototype.destroy=Kb.prototype.destroy;var Yb=new Map;function Jb(){Fb.apply(this,arguments)}function Qb(e,t){!function(e){var t=e.streams.filter(function(e){return"audio"==e.contentType});if(e=e.streams.filter(function(e){return"video"==e.contentType}),!t.every(function(e){return e.variantIds})||!e.every(function(e){return e.variantIds})){for(var n=c(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=c(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=c(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=c(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=c(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=c(e)).next();!a.done;a=r.next()){a=a.value;var o=n++;i.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=c(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(n){return function(e,t,n){var i=e.initSegmentUri?$b(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(e){var n=$b(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}(n,e.startTime,t)})}function $b(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new Ce(2,9,9004,"Could not parse uri "+e)}function Zb(){Fb.apply(this,arguments)}function eT(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function tT(){Fb.apply(this,arguments)}function nT(){this.m=this.j=this.i=this.h=this.g=this.l=null}v(Jb,Fb),Jb.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return D(function(o){return n=jb(a.h,a.g),i=n.store(),r=new jr,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new Ce(2,9,9012,"Could not find values for "+e))},S(o,Promise.all([n.promise(),r]),0)})},Jb.prototype.Wd=function(e){var t,n,i,r,a,o;return D(function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,a=Qb(e.periods[n],r),t.push(a);return S(s,hm(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},Jb.prototype.Hi=function(e){return{data:e.data}},v(Zb,Fb),Zb.prototype.Wd=function(e){var t,n,i,r,a,o;return D(function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var u=e.periods[n],l=[],d=c(u.streams),h=d.next();!h.done;h=d.next())0!=(h=h.value).variantIds.length&&l.push(eT(h,u.startTime,u.startTime+r));a=l,t.push(a)}return S(s,hm(t),2)}return o=s.h,s.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:o,sequenceMode:!1})})},v(tT,Fb),(r=tT.prototype).hasFixedKeySpace=function(){return!1},r.addSegments=function(e){return this.add(this.i,e)},r.addManifests=function(e){return this.add(this.g,e)},r.updateManifest=function(e,t){return function(e,t,n){var i=(e=jb(e.h,e.g)).store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}(this,e,t)},r.Wd=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(r=nT.prototype).init=function(){var t=this,n=new jr,i=!1,r=new Ki(function(){i=!0,n.reject(new Ce(2,9,9017))});"number"==typeof iT&&0<iT&&r.X(iT);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!i){r.stop();var e=a.result;t.l=e;var o=e.objectStoreNames;o=o.contains("manifest")&&o.contains("segment")?new Jb(e,"segment","manifest"):null,t.g=o,o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new Zb(e,"segment-v2","manifest-v2"):null,t.h=o,o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new Zb(e,"segment-v3","manifest-v3"):null,t.i=o,o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new tT(e,"segment-v5","manifest-v5"):null,t.j=o,e=e.objectStoreNames.contains("session-ids")?new zb(e):null,t.m=e,n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=c(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(r.stop(),n.reject(new Ce(2,9,9001,a.error)),e.preventDefault())},n},r.destroy=function(){var e=this;return D(function(t){switch(t.g){case 1:if(!e.g){t.A(2);break}return S(t,e.g.destroy(),2);
1case 2:if(!e.h){t.A(4);break}return S(t,e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return S(t,e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return S(t,e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return S(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),w(t)}})},r.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},r.getEmeSessionCell=function(){return this.m},r.erase=function(){var t=this;return D(function(n){switch(n.g){case 1:if(!t.g){n.A(2);break}return S(n,t.g.destroy(),2);case 2:if(!t.h){n.A(4);break}return S(n,t.h.destroy(),4);case 4:if(!t.i){n.A(6);break}return S(n,t.i.destroy(),6);case 6:if(!t.j){n.A(8);break}return S(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),S(n,function(){var t=new jr,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new Ce(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,S(n,t.init(),0)}})};var iT=5;function rT(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function aT(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var i=e[3];return i&&null!=t?new rT(t,n,i,Number(e[4])):null}function oT(e,t){this.h=e,this.g=t}function sT(e,t){var n=new Tu(null,0);n.vb(t.duration);var i=t.streams.filter(function(e){return"audio"==e.type}),r=t.streams.filter(function(e){return"video"==e.type});i=function(e,t,n,i){for(var r=new Set,a=c(t),o=a.next();!o.done;o=a.next())for(var s=(o=c(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=c(n),o=a.next();!o.done;o=a.next())for(o=c(o.value.variantIds),s=o.next();!s.done;s=o.next())r.add(s.value);for(a=new Map,r=c(r),o=r.next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=c(t),r=t.next();!r.done;r=t.next())for(o=r.value,r=uT(e,o,i),o=c(o.variantIds),s=o.next();!s.done;s=o.next())(s=a.get(s.value)).language=r.language,s.primary=s.primary||r.primary,s.audio=r;for(n=c(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=uT(e,r,i),r=c(r.variantIds),o=r.next();!o.done;o=r.next())(o=a.get(o.value)).primary=o.primary||t.primary,o.video=t;return a}(e,i,r,n),r=t.streams.filter(function(e){return e.type==it}).map(function(t){return uT(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return uT(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=c(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function uT(e,t,n){var i=t.segments.map(function(n){return function(e,t,n){var i=new rT("segment",e.h,e.g,t.dataKey);return e=new $o(t.startTime,t.endTime,function(){return[i.toString()]},0,null,null!=t.initSegmentKey?function(e,t){var n=new rT("segment",e.h,e.g,t);return new Jo(function(){return[n.toString()]},0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.dg(t.thumbnailSprite),e}(e,n,t)});return n.re(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hu(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([ki(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function lT(){this.g=null}function cT(){}function dT(e,t){var n=aT(e);return n&&"manifest"==n.g?e=Gr(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t}):e=n&&"segment"==n.g?function(e,t,n){var i=new Kb;return Gr(void 0).ab(function(){return i.init()}).ab(function(){return qb(i,t.Ub(),t.ib())}).ab(function(e){return e.getSegments([t.key()])}).ab(function(e){return{uri:t,data:e[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}(n.key(),n,t):Fr(new Ce(2,1,9004,e)),e}function hT(e,t,n){var i,r,a,o,s,u;return D(function(l){switch(l.g){case 1:i=[];for(var d=[],h=c(n),p=h.next();!p.done;p=h.next()){p=p.value;for(var f=!1,g=c(d),m=g.next();!m.done;m=g.next())if(pT((m=m.value).info,p)){m.sessionIds.push(p.sessionId),f=!0;break}f||d.push({info:p,sessionIds:[p.sessionId]})}r=c(d),a=r.next();case 2:if(a.done){l.A(4);break}return o=a.value,s=function(e,t,n){var i,r;return D(function(a){switch(a.g){case 1:return i=new Ea({xc:t,onError:function(){},Lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}
1),A(a,2),i.configure(e),S(a,function(e,t,n,i,r,a){var o=new Map;return(r={audioCapabilities:r,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:i,serverCertificateUri:"",initData:null,keyIds:null}],o.set(t,r),Ra(e,o,[])}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:x(a,3);break;case 2:return k(a),S(a,i.destroy(),5);case 5:return a.return([]);case 3:return r=[],S(a,Promise.all(n.sessionIds.map(function(e){return D(function(t){return 1==t.g?(A(t,2),S(t,function(e,t){var n,i,r;return D(function(a){return 1==a.g?S(a,Na(e,t,{initData:null,initDataType:null}),2):3!=a.g?(n=a.h)?(i=[],(r=e.i.get(n))&&(r.Nb=new jr,i.push(r.Nb)),i.push(n.remove()),S(a,Promise.all(i),3)):a.return():(e.i.delete(n),void w(a))})}(i,e),4)):2!=t.g?(r.push(e),x(t,0)):(k(t),void w(t))})})),6);case 6:return S(a,i.destroy(),7);case 7:return a.return(r)}})}(e,t,o),S(l,s,5);case 5:u=l.h,i=i.concat(u),a=r.next(),l.A(2);break;case 4:return l.return(i)}})}function pT(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&en(e.audioCapabilities,t.audioCapabilities,n)&&en(e.videoCapabilities,t.videoCapabilities,n)}function fT(e,t){var n=sT(new oT(e.Ub(),e.ib()),t),i=t.appMetadata||{};return n=gT(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function gT(e){for(var t=[],n=fr(e.variants),i=(n=c(n)).next();!i.done;i=n.next())t.push(sr(i.value));for(n=(e=c(e.textStreams)).next();!n.done;n=e.next())t.push(ur(n.value));return t}function mT(){this.g=new Map}function vT(e,t){var n=t.audio,i=t.video;
1if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,a)}}function yT(e,t){e.g.set(t.id,t.bandwidth||2048)}function bT(e,t){return null==(e=e.g.get(t))&&(e=0),e}function TT(e){var t=this;if(e&&e.constructor!=kd)throw new Ce(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Ib()):(this.h=rc(),this.g=new qr,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new ra(function(){var e,i,r,a,o;return D(function(s){switch(s.g){case 1:return S(s,Promise.all(t.l.map(function(e){return Db(e)})),2);case 2:for(e=function(){},i=[],r=c(t.i),a=r.next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return S(s,Promise.all(i),3);case 3:if(!n){s.A(4);break}return S(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,w(s)}})}),this.m=1e9}function ST(){if(Sv(Re()))e:{for(var e=c(Yb.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function wT(e){var t,n,i;return D(function(r){switch(r.g){case 1:return S(r,(t=new Kb).init(),2);case 2:return S(r,Wb(t),3);case 3:return n=r.h,i=new rT("manifest",n.path.Ub,n.path.ib,e),S(r,t.destroy(),4);case 4:return S(r,(new TT).remove(i.toString()),0)}})}function AT(e,t,n,i,r,a){var o,s,u,l,d,h,p,f,g,m,v;return D(function(y){switch(y.g){case 1:for(o=!1,A(y,2),s=!0,u=c(n.streams),l=u.next();!l.done;l=u.next())for(d=l.value,h=c(d.segments),p=h.next();!p.done;p=h.next())f=p.value,null!=(g=f.pendingSegmentRefId?i[f.pendingSegmentRefId]:null)&&(f.dataKey=g,f.pendingSegmentRefId=void 0),null!=(g=f.pendingInitSegmentRefId?i[f.pendingInitSegmentRefId]:null)&&(f.initSegmentKey=g,f.pendingInitSegmentRefId=void 0),f.pendingSegmentRefId&&(s=!1),f.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),S(y,e.updateManifest(t,n),4);case 4:o=!0,a(),x(y,0);break;case 2:return m=k(y),S(y,wT(t),5);case 5:if(o){y.A(6);break}return v=Object.values(i),S(y,e.removeSegments(v,function(){}),6);case 6:throw m}})}function ET(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function xT(e){return e.variants.some(function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some(function(e){return e.initData&&e.initData.length})})}function kT(e,t,n,i){if(t.expiration=n.be(),n=La(n),t.sessionIds=i?n:[],ET(e)&&i&&!n.length)throw new Ce(2,9,9007)}function IT(e,t){for(var n=[],i=c(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:ki(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:ki(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function CT(e,t,n){return D(function(i){return S(i,function(e,t,n,i){var r,a,o;return D(function(s){return 1==s.g?i.drmInfo?(r=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new Ce(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=i.sessionIds.map(function(e){return{sessionId:e,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:IT(i,!1),videoCapabilities:IT(i,!0)}}),S(s,hT(t,e,a),2)):s.return():3!=s.g?(o=s.h,S(s,r.remove(o),3)):S(s,r.add(a.filter(function(e){return!o.includes(e.sessionId)})),0)})}(e.g,e.h.drm,n,t),0)})}function MT(e,t,n){function i(){}var r=function(e){for(var t=new Set,n=(e=c(e.streams)).next();!n.done;n=e.next())for(var i=(n=c(n.value.segments)).next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey);return Array.from(t)}(n);return fT(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}function LT(e,t){var n;return D(function(i){switch(i.g){case 1:return A(i,2),S(i,Mc(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,x(i,3);break;case 2:k(i);case 3:if(n)return i.return(n);throw new Ce(1,2,2011,t)}})}function RT(e,t,n,i,r,a){var o={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},s=r.offline.numberOfParallelDownloads,u=0===s?i.id:0;return function(e,t,n){if(t=e.segmentIndex.find(t),null!=t)for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.Kb(),function(n,r){var l=Ib(n),c=void 0;if(!a.has(l)){var d=n.endTime-n.startTime;d=bT(t,i.id)*d,d=Lb(e.g,d),a.set(l,new kb(n,d,u,!1,r))}n.ea&&(c=Ib(n.ea),a.has(c)||(d=.5*bT(t,i.id),d=Lb(e.g,d),a.set(c,new kb(n.ea,d,u,!0,r)))),o.segments.push({pendingInitSegmentRefId:c,initSegmentKey:c?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:l,dataKey:0,mimeType:n.mimeType,codecs:n.co
1decs,thumbnailSprite:n.thumbnailSprite}),0!==s&&(u=(u+1)%s)}),o}function PT(e){if(e.j.g)throw new Ce(2,9,7001)}function DT(){if(!ST())throw new Ce(2,9,9e3)}function NT(e,t){return D(function(n){return 1==n.g?(e.i.push(t),E(n,2),S(n,t,4)):2!=n.g?n.return(n.h):(I(n),Zt(e.i,t),C(n,0))})}function _T(e){for(var t=new Set,n=c(e.variants),i=n.next();!i.done;i=n.next())(i=i.value).audio&&t.add(i.audio),i.video&&t.add(i.video);for(i=(n=c(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=c(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}H("shaka.offline.indexeddb.StorageMechanismOpenTimeout",iT),Xb("idb",function(){return Re().ei()?new nT:null}),rT.prototype.Ub=function(){return this.i},rT.prototype.ib=function(){return this.h},rT.prototype.key=function(){return this.l},rT.prototype.toString=function(){return this.j},(r=lT.prototype).configure=function(){},r.start=function(e,t){var n,i,r,a,o,s,u=this;return D(function(l){switch(l.g){case 1:if(n=aT(e),u.g=n,null==n||"manifest"!=n.g)throw new Ce(2,1,9004,e);return i=new Kb,E(l,2),S(l,i.init(),4);case 4:return S(l,qb(i,n.Ub(),n.ib()),5);case 5:return S(l,l.h.getManifests([n.key()]),6);case 6:return r=l.h,a=r[0],o=new oT(n.Ub(),n.ib()),s=sT(o,a),t.makeTextStreamsForClosedCaptions(s),l.return(s);case 2:return I(l),S(l,i.destroy(),7);case 7:C(l,0)}})},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u,l=this;return D(function(c){switch(c.g){case 1:return n=l.g,i=new Kb,A(c,2,3),S(c,i.init(),5);case 5:return S(c,qb(i,n.Ub(),n.ib()),6);case 6:return S(c,(r=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),u=null==o.expiration||o.expiration>t,!s||!u){c.A(3);break}return S(c,r.updateManifestExpiration(n.key(),t),3);case 3:return I(c),S(c,i.destroy(),10);case 10:C(c,0);break;case 2:k(c),c.A(3)}})},r.onInitialVariantChosen=function(){},r.banLocation=function(){},r.setMediaElement=function(){},uo("application/x-offline-manifest",function(){return new lT}),H("shaka.offline.OfflineScheme",cT),cT.plugin=dT,Xr("offline",dT),(r=TT.prototype).destroy=function(){return this.j.destroy()},r.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=Wl(e,t)),oc(this.h,e)},r.getConfiguration=function(){var e=rc();return oc(e,this.h,rc()),e},r.Ib=function(){return this.g},r.store=function(e,t,n,i,r){var a=this,o=this.getConfiguration(),s=new Pb(this.g);return this.l.push(s),t=function(e,t,n,i,r,a,o,s){var u,l,d,h,p,f,g,m,v,y,b,T,E,M,L,R,P,N,_,O,U,j,B;return D(function(F){switch(F.g){case 1:return DT(),l=u=null,d=new Kb,f=p=h=null,A(F,2,3),S(F,a(),5);case 5:return u=F.h,S(F,function(e,t,n,i){var r,a,o,s,u;return D(function(l){if(1==l.g)return r=null,a=e.g,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){r=e},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),PT(e),S(l,n.start(t,o),2);if(3!=l.g)return s=l.h,PT(e),u=_T(s),S(l,Promise.all(te(u,function(e){return e.createSegmentIndex()})),3);if(PT(e),r)throw r;return l.return(s)})}(e,t,u,o),6);case 6:if(g=F.h,PT(e),!(!g.presentationTimeline.T()&&!g.presentationTimeline.ed()))throw new Ce(2,9,9005,t);m=c(i),v=m.next();case 7:if(v.done){F.A(9);break}return y=v.value,S(F,function(e,t,n){var i,r,a,o,s,u,l,d,h,p,f,g,m,v,y;return D(function(b){switch(b.g){case 1:return S(b,LT(e,t),2);case 2:if("text/vtt"!=(i=b.h))throw new Ce(1,2,2017,t);return S(b,function(e,t,n){var i,r,a;return D(function(o){return 1==o.g?(i=ta,(r=Jr([e],n)).method="GET",S(o,t.request(i,r).promise,2)):(a=o.h,o.return(a.data))})}(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=b.h,!(a=Bi(i)))throw new Ce(2,2,2014,i);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},u=Ee(r),l=o.parseMedia(u,s,t,[]),d=[],h=c(l),p=h.next(),f={};!p.done;f={mg:void 0,wd:void 0},p=h.next())f.wd=p.value,f.mg=null,g=function(e){return function(){return null==e.mg&&(e.mg=Qe([t],[e.wd.payload])),e.mg||[]}}(f),m=new $o(f.wd.startTime,f.wd.endTime,g,0,null,null,0,0,1/0),f.wd.payload.includes("#xywh")&&(4===(v=f.wd.payload.split("#xywh=")[1].split(",")).length&&m.dg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),d.push(m);if(y=i,!d.length){b.A(4);break}return S(b,Mc(d[0].S()[0],e.g,e.h.manifest.retryParameters),5);case 5:y=b.h;case 4:return b.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hu(d),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([ki(y||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}(e,y,g),10);case 10:b=F.h,g.imageStreams.push(b),PT(e),v=m.next(),F.A(7);break;case 9:T=c(r),E=T.next();case 11:return E.done?(Ha(o.drm.clearKeys,g.variants),R=g.variants.some(function(e){if(e.audio)for(var t=c(e.audio.drmInfos),n=t.next();!n.done;n=t.next())if(n.value.licenseServerUri.startsWith("data:"))return!0;
1if(e.video)for(t=(e=c(e.video.drmInfos)).next();!t.done;t=e.next())if(t.value.licenseServerUri.startsWith("data:"))return!0;return!1}),P=o.offline.usePersistentLicense,R&&(P=!1),S(F,e.ud(g,function(e){f=f||e},o,P),15)):(M=E.value,S(F,function(e,t,n,i,r,a,o){var s,u;return D(function(l){if(1==l.g)return a?l.A(2):S(l,LT(e,n),3);if(2!=l.g&&(a=l.h),s={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ku(0,t.presentationTimeline.getDuration(),[n]),mimeType:a||"",codecs:o||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:it,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ki(a||"",o||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},u=ki(s.mimeType,s.codecs),!Fi(u))throw new Ce(2,2,2014,a);return l.return(s)})}(e,g,M.uri,M.language,M.kind,M.mime,M.codecs),14));case 14:L=F.h,g.textStreams.push(L),PT(e),E=T.next(),F.A(11);break;case 15:if(l=F.h,PT(e),f)throw f;return S(F,function(e,t,n,i){var r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,E,I,C,M,L,R,P,N,_,O,U,j,B;return D(function(D){switch(D.g){case 1:return r={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter(function(e){return $i(e,t,n)})}(e,n.restrictions,r),S(D,er(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(a=[],o=n.preferredDecodingAttributes,s=n.preferredVideoCodecs,u=n.preferredAudioCodecs,l=n.preferredTextFormats,Qi(e,s,u,o,l),d=c(e.variants),h=d.next();!h.done;h=d.next())p=h.value,a.push(sr(p));for(f=c(e.textStreams),g=f.next();!g.done;g=f.next())m=g.value,a.push(ur(m));for(v=c(e.imageStreams),y=v.next();!y.done;y=v.next())b=y.value,a.push(lr(b));return S(D,n.offline.trackSelectionCallback(a),3);case 3:for(T=D.h,E=e.presentationTimeline.getDuration(),I=0,C=c(T),M=C.next();!M.done;M=C.next())L=M.value,R=L.bandwidth*E/8,I+=R;return A(D,4),S(D,n.offline.downloadSizeCallback(I),6);case 6:if(!D.h)throw new Ce(2,9,9014);x(D,5);break;case 4:if((P=k(D))instanceof Ce)throw P;throw new Ce(2,9,9015);case 5:for(N=new Set,_=new Set,O=new Set,U=c(T),j=U.next();!j.done;j=U.next())"variant"==(B=j.value).type&&N.add(B.id),"text"==B.type&&_.add(B.id),"image"==B.type&&O.add(B.id);e.variants=e.variants.filter(function(e){return N.has(e.id)}),e.textStreams=e.textStreams.filter(function(e){return _.has(e.id)}),e.imageStreams=e.imageStreams.filter(function(e){return O.has(e.id)}),function(e){e.variants.map(function(e){return e.video});var t=new Set(e.variants.map(function(e){return e.audio}));e=e.textStreams;for(var n=c(t),i=n.next();!i.done;i=n.next())for(var r=(i=c(t)).next();!r.done;r=i.next());for(t=c(e),n=t.next();!n.done;n=t.next())for(n=c(e),i=n.next();!i.done;i=n.next());}(e),w(D)}})}(g,l,o,P),16);case 16:return S(F,d.init(),17);case 17:return PT(e),S(F,Wb(d),18);case 18:return h=F.h,PT(e),N=function(e,t,n,i,r,a,o){var s=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=gT(t),appMetadata:n,isIncomplete:!1}}(n,t,i),u=r.offline.progressCallback;!function(e,t,n){e.s=t,e.m=n}(a,function(e,t){s.size=t,u(s,e)},function(t,n){l&&o&&d==n&&Ma(e,"cenc",t)});var l=ET(t)&&!xT(t),d=null;l&&(d=OT.get(e.g.keySystem));for(var h=new mT,p=c(t.textStreams),f=p.next();!f.done;f=p.next())h.g.set(f.value.id,52);for(p=c(t.imageStreams),f=p.next();!f.done;f=p.next())yT(h,f.value);for(p=c(t.variants),f=p.next();!f.done;f=p.next())vT(h,f.value);return a=function(e,t,n,i){for(var r=new Map,a=_T(n),o=new Map,s=(a=c(a)).next();!s.done;s=a.next()){var u=RT(e,t,n,s=s.value,i,r);o.set(s.id,u)}for(e=c(n.variants),t=e.next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),ki:Array.from(r.values())}}(a,h,t,r),r=a.streams,a=a.ki,(h=e.g)&&o&&(h.initData=[]),{El:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.be(),streams:r,sessionIds:o?La(e):[],drmInfo:h,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},ki:a}}(l,g,t,n,o,s,P),_=N.El,O=N.ki,S(F,h.ib.addManifests([_]),19);case 19:if(U=F.h,PT(e),p=U[0],PT(e),f)throw f;return S(F,function(e,t,n,i,r,a,o,s,u,l){var d,h,p,f,g,m,v,y,b,T,E;return D(function(I){switch(I.g){case 1:if(d={},h=0,p=function(){if(e.j.g||r.l)throw new Ce(2,9,7001)},f=function(e,t){var f,g,m,v,y,b,T,A,E;return D(function(x){if(1==x.g){for(f=c(e),g=f.next(),m={};!g.done;m={pc:void 0},g=f.next())m.pc=g.value,p(),v=Cb(m.pc,a),y=m.pc.i,b=m.pc.h,T=function(e){return function(t){var n,i,r,a;return D(function(s){switch(s.g){case 1:if(n=e.pc.g,i=n.cc(!1),!n.aesKey||i){s.A(2);break}return S(s,vl(t,n.aesKey,e.pc.j),3);case 3:t=s.h;case 2:return r=Ib(n),S(s,o.addSegments([{data:t}]),4);case 4:a=s.h,p(),d[r]=a[0],h+=t.byteLength,w(s)}})}}(m),A=m.pc.g,(E=A.cc(!1))?Nb(r,m.pc.groupId,E,y,b,T):r.queue(m.pc.groupId,v,y,b,T);return S(x,function(e){return D(function(t){return 1==t.g?S(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}(r),2)}return p(),!t||r.l?x.A(0):(kT(s,i,u,l),S(x,o.updateManifest(n,i),0))})},g=!1,A(I,2),!ET(s)||!g||xT(s)){I.A(4);break}return S(I,f(t.filter(function(e){return e.h}),!0),5);case 5:return p(),t=t.filter(function(e){return!e.h}),m=d,v=h,d={},h=0,S(I,AT(o,n,i,m,v,function(){return PT(e)}),6);case 6:p();case 4:if(g){I.A(7);break}return S(I,f(t,!1),8);case 8:return p(),y=d,b=h,d={},h=0,S(I,AT(o,n,i,y,b,function(){return p()}),9);case 9:p();case 7:x(I,0);break;case 2:return T=k(I),E=Object.values(d),S(I,o.removeSegments(E,function(){}),10);case 10:throw T}})}(e,O,p,_,s,o,h.ib,g,l,P),20);case 20:return PT(e),kT(g,_,l,P),S(F,h.ib.updateManifest(p,_),21);case 21:return PT(e),j=new rT("manifest",h.path.Ub,h.path.ib,p),F.return(fT(j,_));case 3:return I(F),S(F,d.destroy(),22);case 22:if(!u){F.A(23);break}return S(F,u.stop(),23);case 23:if(!l){F.A(25);break}return S(F,l.destroy(),25);case 25:C(F,0);break;case 2:if(B=k(F),null==p){F.A(27);break}return S(F,wT(p),27);case 27:throw f||B}})}(this,e,t||{},i||[],r||[],function(){var t;return D(function(i){return 1==i.g?n?i.A(2):S(i,Mc(e,a.g,o.manifest.retryParameters),3):(2!=i.g&&(n=i.h),t=lo(e,n||null),i.return(t()))})},o,s),(t=new Br(t,function(){return Db(s)})).finally(function(){Zt(a.l,s)}),function(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Zt(e.i,n)})}(this,t)},r.remove=function(e){return NT(this,function(e,t){var n,i,r,a,o,s;return D(function(u){switch(u.g){case 1:if(DT(),null==(n=aT(t))||"manifest"!=n.g)throw new Ce(2,9,9004,t);return i=n,r=new Kb,E(u,2),S(u,r.init(),4);case 4:return S(u,qb(r,i.Ub(),i.ib()),5);case 5:return S(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],S(u,Promise.all([CT(e,s,r),MT(a,i,s)]),2);case 2:return I(u),S(u,r.destroy(),8);case 8:C(u,0)}})}(this,e))},r.Xl=function(){return NT(this,function(e){var t,n,i,r,a,o,s,u,l,d;return D(function(h){switch(h.g){case 1:return DT(),t=e.g,n=e.h.drm,i=new Kb,r=!1,E(h,2),S(h,i.init(),4);case 4:a=[],function(e,t){e.g.forEach(function(e){t(e.getEmeSessionCell())})}(i,function(e){return a.push(e)}),o=c(a),s=o.next();case 5:if(s.done){h.A(2);break}return S(h,(u=s.value).getAll(),8);case 8:return l=h.h,S(h,hT(n,t,l),9);case 9:return d=h.h,S(h,u.remove(d),10);case 10:d.length!=l.length&&(r=!0),s=o.next(),h.A(5);break;case 2:return I(h),S(h,i.destroy(),11);case 11:C(h,3);break;case 3:return h.return(!r)}})}(this))},r.list=function(){return NT(this,D(function(i){switch(i.g){case 1:return DT(),e=[],t=new Kb,E(i,2),S(i,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach(function(e,n){e.getCells().forEac
1h(function(e,i){t({Ub:n,ib:i},e)})})}(t,function(t,i){n=n.then(function(){return D(function(n){if(1==n.g)return S(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=fT(new rT("manifest",t.Ub,t.ib,i),n),e.push(n)}),w(n)})})}),S(i,n,2);case 2:return I(i),S(i,t.destroy(),6);case 6:C(i,3);break;case 3:return i.return(e)}}));var e,t,n},r.ud=function(e,t,n,i){var r,a=this;return D(function(o){return 1==o.g?((r=new Ea({xc:a.g,onError:t,Lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),S(o,function(e,t,n){return e.ba=!0,e.C=new Map,e.N=n,ka(e,t,!1)}(r,e.variants,i),2)):3!=o.g?S(o,Ca(r),3):o.return(r)})},H("shaka.offline.Storage",TT),TT.deleteAll=function(){var e;return D(function(t){return 1==t.g?(e=new Kb,E(t,2),S(t,function(e){var t,n;return D(function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0<t.length)||Yb.forEach(function(e){(e=e())&&t.push(e)}),S(i,Promise.all(t.map(function(e){return e.erase()})),2)):n?i.A(0):S(i,Promise.all(t.map(function(e){return e.destroy()})),0)})}(e),2)):5!=t.g?(I(t),S(t,e.destroy(),5)):C(t,0)})},TT.prototype.list=TT.prototype.list,TT.prototype.removeEmeSessions=TT.prototype.Xl,TT.prototype.remove=TT.prototype.remove,TT.prototype.store=TT.prototype.store,TT.prototype.getNetworkingEngine=TT.prototype.Ib,TT.prototype.getConfiguration=TT.prototype.getConfiguration,TT.prototype.configure=TT.prototype.configure,TT.prototype.destroy=TT.prototype.destroy,TT.support=ST;var OT=(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");function UT(){}function jT(){for(var e=c(FT),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){Y("Error installing polyfill!",e)}}}function BT(e,t){for(e={priority:t||0,callback:e},t=0;t<FT.length;t++)if(FT[t].priority<e.priority)return void FT.splice(t,0,e);FT.push(e)}Md("offline",ST),H("shaka.polyfill",UT),UT.register=BT,UT.installAll=jT;var FT=[];function VT(){}function GT(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=c(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())HT(t.value)}function HT(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||null==e?this.removeAttribute(t):this.setAttribute(t,e)}})}function zT(){}function KT(){Re().di()&&nE()}function WT(){}function qT(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",XT),document.addEventListener("webkitfullscreenerror",XT),document.addEventListener("mozfullscreenchange",XT),document.addEventListener("mozfullscreenerror",XT),document.addEventListener("MSFullscreenChange",XT),document.addEventListener("MSFullscreenError",XT)}}function XT(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function YT(){}function JT(){Re().ic()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),YT.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=QT)}function QT(t){var n,i,r,a,o,s,u;return D(function(l){switch(l.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},Re(),i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type)return l.return(n);if(i&&(a=i.contentType,!(""!=ps().canPlayType(a)))||r&&(o=r.contentType,!(""!=ps().canPlayType(o))))return l.return(n);l.A(2);break}if(!Sv())return l.return(n);if(!i){l.A(3);break}return S(l,function(t){var n,i;
1return D(function(r){return 1==r.g?(n=Re(),"CAST"!==n.Ja()?r.A(2):S(r,function(t){var n,i,r,a;return D(function(o){if(1==o.g){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return o.return(Ut(t.contentType));switch(n=t.contentType,t.width&&t.height&&1280<t.width&&720<t.height&&(n+="; width="+t.width+"; height="+t.height),t.framerate&&(24>(i=Math.round(t.framerate))||30<i)&&(n+="; framerate="+t.framerate),t.transferFunction||""){case"":case"srgb":break;case"pq":n+="; eotf=smpte2084";break;case"hlg":n+="; eotf=arib-std-b67";break;default:return o.return(!1)}return r=!1,(a=rS).has(n)?(r=a.get(n),o.A(2)):S(o,cast.__platform__.canDisplayType(n),3)}return 2!=o.g&&(r=o.h,a.set(n,r)),o.return(r)})}(t),3)):2!=r.g?(i=r.h,r.return(i)):r.return(Ut(t.contentType))})}(i),4);case 4:if(!l.h)return l.return(n);case 3:if(r){var c=Re().Ja(),d=r.contentType;if("CAST"===c&&r.spatialRendering&&(d+="; spatialRendering=true"),!Ut(d))return l.return(n)}case 2:return t.keySystemConfiguration?(s=t.keySystemConfiguration,S(l,function(e,t,n){var i,r,a,o,s,u,l,c,d,h,p;return D(function(f){switch(f.g){case 1:if(i=[],r=[],n.audio&&(a={robustness:n.audio.robustness||"",contentType:t.contentType},Re().fj()&&t.contentType.includes('codecs="ac-3"')&&(a.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(a.encryptionScheme=n.audio.encryptionScheme),i.push(a)),n.video&&(o={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(o.encryptionScheme=n.video.encryptionScheme),r.push(o)),s={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(s.audioCapabilities=i),r.length&&(s.videoCapabilities=r),u=e?e.contentType:"",l=t?t.contentType:"",c=Pi(u)+";"+Ri(u),d=Pi(l)+";"+Ri(l),h=n.keySystem,p=null,A(f,2),Nr.has(c+"#"+d+"#"+h)){p=Nr.get(c+"#"+d+"#"+h)||null,f.A(4);break}return S(f,navigator.requestMediaKeySystemAccess(n.keySystem,[s]),5);case 5:p=f.h,Nr.set(c+"#"+d+"#"+h,p);case 4:x(f,3);break;case 2:k(f);case 3:return f.return(p)}})}(i,r,s),6)):(n.supported=!0,l.return(n));case 6:(u=l.h)&&(n.supported=!0,n.keySystemAccess=u);case 5:return l.return(n)}})}UT.Aria=VT,VT.install=GT,BT(GT),UT.EncryptionScheme=zT,zT.install=KT,BT(KT,-2),UT.Fullscreen=WT,WT.install=qT,BT(qT),UT.MediaCapabilities=YT,YT.install=JT,YT.originalMcap=null;var $T,ZT,eS,tS,nS,iS,rS=new Map;function aS(){}function oS(){var t=Re(),n="WEBKIT"===t.Ia()?t.Ga():null;for((e.MediaSource||e.ManagedMediaSource)&&n&&e.MediaSource&&(12>=n?(sS(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):15>=n&&sS()),n=(t=c(t.pj())).next();!n.done;n=t.next())uS(n.value);(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=Mi(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=Mi(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;Re().Rj()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(e){return e.startsWith("codecs=")});if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex(function(e){return e.startsWith("vp09")});return 0<=a&&(r[a]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}()}function sS(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,N.apply(0,arguments));return t.abort=function(){},t}}function uS(t){var n=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return Ri(e)!=t&&n(e)},e.ManagedMediaSource){var i=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return Ri(e)!=t&&i(e)}}}function lS(){}function cS(){screen.orientation&&screen.orientation.unlock||(null!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new dS;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new z("change");n.dispatchEvent(e)})}())}function dS(){ee.call(this),this.type="",this.angle=0}function hS(){}function pS(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&e.shakaMediaKeysPolyfill!=AS&&(void 0!==t&&t&&($T=!0,ZT=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),eS=HTMLMediaElement.prototype.setMediaKeys,tS=e.MediaKeys,nS=e.MediaKeySystemAccess,iS=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gS,e.MediaKeys=yS,e.MediaKeySystemAccess=vS,navigator.requestMediaKeySystemAccess=fS,e.shakaMediaKeysPolyfill=AS,Tr.clear(),Nr.clear())}function fS(e,t){try{var n=new vS(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function gS(e){var t=this.mediaKeys;return t&&t!=e&&bS(t,null),delete this.mediaKeys,(this.mediaKeys=e)?bS(e,this):Promise.resolve()}function mS(e){if(ke(e=Ee(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Be(e=Ue(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Ae(e),this.dispatchEvent(t)}function vS(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=c(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=c(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupp
1orted(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(a=(n=c(n.videoCapabilities)).next();!a.done;a=n.next())(a=a.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function yS(e){this.h=new WebKitMediaKeys(e),this.g=new xt}function bS(e,t){if(e.g.Sa(),!t)return Promise.resolve();e.g.o(t,"webkitneedkey",mS);try{return ku(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function TS(e){ee.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new xt,this.sessionId="",this.expiration=NaN,this.closed=new jr,this.keyStatuses=new wS}function SS(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new z("keystatuseschange"),e.dispatchEvent(t)}function wS(){this.size=0,this.g=void 0}BT(JT,-1),UT.MediaSource=aS,aS.install=oS,BT(oS),UT.Orientation=lS,lS.install=cS,v(dS,ee),dS.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},dS.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},BT(cS),UT.PatchedMediaKeysApple=hS,hS.uninstall=function(){e.shakaMediaKeysPolyfill==AS&&$T&&($T=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",ZT),HTMLMediaElement.prototype.setMediaKeys=eS,e.MediaKeys=tS,e.MediaKeySystemAccess=nS,navigator.requestMediaKeySystemAccess=iS,ZT=iS=eS=nS=tS=null,e.shakaMediaKeysPolyfill="",Tr.clear(),Nr.clear())},hS.install=pS,vS.prototype.createMediaKeys=function(){var e=new yS(this.keySystem);return Promise.resolve(e)},vS.prototype.getConfiguration=function(){return this.g},yS.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new TS(this.h,e)},yS.prototype.setServerCertificate=function(){return Promise.resolve(!1)},yS.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},v(TS,ee),(r=TS.prototype).generateRequest=function(e,t){var n=this;this.h=new jr;try{var i=this.l.createSession("video/mp4",Ee(t));this.i=i,this.sessionId=i.sessionId||"",this.j.o(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=new z("message",e=(new Map).set("messageType",null==n.keyStatuses.Ic()?"license-request":"license-renewal").set("message",Ae(e.message))),n.dispatchEvent(e)}),this.j.o(i,"webkitkeyadded",function(){n.g&&(SS(n,"usable"),n.g.resolve(),n.g=null)}),this.j.o(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:SS(n,"output-not-allowed");break;default:SS(n,"internal-error")}}),SS(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.g=new jr;try{this.i.update(Ee(e))}catch(e){this.g.reject(e)}return this.g},r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(r=wS.prototype).Ic=function(){return this.g},r.forEach=function(e){this.g&&e(this.g,Dr.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=Dr.value();return!(!this.g||!we(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){};var AS="apple";function ES(){}function xS(){if(e.MediaKeys){var t=Re();
1MediaKeys.prototype.setServerCertificate&&t.Ce()||(MediaKeys.prototype.setServerCertificate=kS)}}function kS(){return Promise.resolve(!1)}function IS(){}function CS(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)VS="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=LS,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=RS,e.MediaKeys=DS,e.MediaKeySystemAccess=PS,e.shakaMediaKeysPolyfill=GS}}function MS(e){return VS?VS+e.charAt(0).toUpperCase()+e.slice(1):e}function LS(e,t){try{var n=new PS(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function RS(e){var t=this.mediaKeys;return t&&t!=e&&NS(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&NS(e,this),Promise.resolve()}function PS(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var a=(t=c(t)).next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=c(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=c(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=o)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function DS(e){this.l=e,this.h=null,this.g=new xt,this.i=[],this.j=new Map}function NS(e,t){e.h=t,e.g.Sa();var n=VS;t&&(e.g.o(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=Ae(t.initData),e.h.dispatchEvent(n)}),e.g.o(t,n+"keymessage",function(t){var n=_S(e,t.sessionId);n&&(t=new z("message",t=(new Map).set("messageType",null==n.keyStatuses.Ic()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.o(t,n+"keyadded",function(t){(t=_S(e,t.sessionId))&&t.ready()}),e.g.o(t,n+"keyerror",function(t){var n=_S(e,t.sessionId);if(n){var i=Error("EME v0.1b key error"),r=t.errorCode;r.systemCode=t.systemCode,i.errorCode=r,!t.sessionId&&n.h?(45==t.systemCode&&(i.message="Unsupported session type."),n.h.reject(i),n.h=null):t.sessionId&&n.g?(n.g.reject(i),n.g=null):(i=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?BS(n,"output-restricted"):BS(n,1==i?"expired":"internal-error"))}}))}function _S(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function OS(e,t,n){ee.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new jr,this.keyStatuses=new FS}function US(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var i=Ee(Be("LOAD_SESSION|"+n));else{var r=Be("PERSISTENT|");i=Je(r,t)}else i=Ee(t)}catch(e){return Promise.reject(e)}e.h=new jr;var a=MS("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Ki(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).X(.01)}return e.h}function jS(e,t,n){if(e.g)e.g.then(function(){return jS(e,t,n)}).catch(function(){return jS(e,t,n)});else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=Oe(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=qe(r.keys[0].k),r=qe(r.keys[0].kid)}else i=Ee(n),r=null;var a=MS("addKey");try{e.j[a](e.i,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function BS(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new z("keystatuseschange"),e.dispatchEvent(t)}function FS(){this.size=0,this.g=void 0}BT(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||pS())}),UT.PatchedMediaKeysCert=ES,ES.install=xS,BT(xS),UT.PatchedMediaKeysWebkit=IS,IS.install=CS,PS.prototype.createMediaKeys=function(){var e=new DS(this.g);return Promise.resolve(e)},PS.prototype.getConfiguration=function(){return this.h},DS.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new OS(t,this.l,e),this.i.push(e),e},DS.prototype.setServerCertificate=function(){return Promise.resolve(!1)},DS.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},v(OS,ee),(r=OS.prototype).ready=function(){BS(this,"usable"),this.g&&this.g.resolve(),this.g=null},r.generateRequest=function(e,t){return US(this,t,null)},r.load=function(e){return"persistent-license"==this.l?US(this,null,e):Prom
1ise.reject(Error("Not a persistent session."))},r.update=function(e){var t=new jr;return jS(this,t,e),t},r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=MS("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(r=FS.prototype).Ic=function(){return this.g},r.forEach=function(e){this.g&&e(this.g,Dr.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=Dr.value();return!(!this.g||!we(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){};var VS="",GS="webkit";function HS(){}function zS(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=WS,Object.defineProperty(t,"disablePictureInPicture",{get:XS,set:YS,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qS,document.addEventListener("webkitpresentationmodechanged",KS,!0))}}function KS(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function WS(){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 qS(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function XS(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function YS(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function JS(){}function QS(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=$S))}function $S(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function ZS(){}function ew(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:tw})}function tw(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function nw(){}function iw(){for(var e=c([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())(t=t.value).prototype.indexOf||(t.prototype.indexOf=rw),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=aw),t.prototype.includes||(t.prototype.includes=ow)}function rw(e,t){return Array.prototype.indexOf.call(this,e,t)}function aw(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function ow(e,t){return-1!==this.indexOf(e,t)}function sw(){}function uw(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function lw(){}function cw(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||"number"==typeof ps().webkitDroppedFrameCount)&&(t.getVideoPlaybackQuality=dw)}}function dw(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function hw(){}function pw(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=fw;else if(6==n)t=gw;else{try{var i=!!fw(1,2,"")}catch(e){i=!1}i&&(t=fw)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function fw(t,n,i){return new e.TextTrackCue(t,n,i)}function gw(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function mw(e){ee.call(this),this.h=e,this.l=null,this.g=[],this.i=-1,this.j=null,this.m=new xt}function vw(){}BT(CS),UT.PiPWebkit=HS,HS.install=zS,BT(zS),UT.RandomUUID=JS,JS.install=QS,BT(QS),UT.Symbol=ZS,ZS.install=ew,BT(ew),UT.TypedArray=nw,nw.install=iw,BT(iw),UT.VideoPlayPromise=sw,sw.install=uw,BT(uw),UT.VideoPlaybackQuality=lw,lw.install=cw,BT(cw),UT.VTTCue=hw,hw.install=pw,BT(pw),v(mw,ee),(r=mw.prototype).destroy=function(){var e=this;return D(function(t){if(1==t.g)return S(t,e.removeAllItems(),2);e.h=null,e.m&&(e.m.release(),e.m=null),ee.prototype.release.call(e),w(t)})},r.configure=function(e){this.l=e},r.getConfiguration=function(){return this.l},r.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i<this.g.length?this.g[this.i]:null},r.getCurrentItemIndex=function(){return this.i},r.getItems=function(){return this.g.slice()},r.insertItems=function(e){this.g.push.apply(this.g,d(e)),this.dispatchEvent(new z("itemsinserted"))},r.removeAllItems=function(){var e=this;return D(function(t){switch(t.g){case 1:if(e.m.Sa(),!(e.g.length&&0<=e.i)){t.A(2);break}return S(t,e.h.lc(),2);case 2:if(!e.j){t.A(4);break}if(e.j.Qf.s){t.A(5);break}return S(t,e.j.Qf.destroy(),5);case 5:e.j=null;case 4:e.g=[],e.i=-1,e.dispatchEvent(new z("itemsremoved")),w(t)}})},r.playItem=function(e){var t,n,i,r,a,o,s,u,l,d,h,p,f,g,m=this;return D(function(v){if(1==v.g){if(m.m.Sa(),!m.g.length||e>=m.g.length)throw new Ce(2,7,7007);return t=m.g[e],m.i!=e&&(m.i=e,m.dispatchEvent(new z("currentitemchanged"))),n=m.h.h,0<(i=m.l?m.l.preloadNextUrlWindow:0)&&(r=!1,m.m.o(n,"timeupdate",function(){var e,t,a,o;return D(function(s){switch(s.g){case 1:if(m.j||1>=m.g.length||r||m.h.T()||!n.duration)return s.return();if(e=m.h.xa().end-n.currentTime,isNaN(e)){s.A(0);break}if(!(e<=i)){s.A(0);break}if(t=m.l&&m.l.repeatMode,a=null,m.i+1<m.g.length?a=m.g[m.i+1]:1==t&&(a=m.g[0]),!a){s.A(0);break}return r=!0,o=null,A(s,5),S(s,m.h.preload(a.manifestUri,a.startTime,a.mimeType,a.
1config),7);case 7:o=s.h,x(s,6);break;case 5:k(s),o=null;case 6:m.j={item:a,Qf:o},r=!1,w(s)}})})),m.m.o(m.h,"complete",function(){var e=m.l&&m.l.repeatMode,t=!1;if(2==e)t=!0;else{var i=m.i+1;i<m.g.length?m.playItem(i):1==e&&(1==m.g.length?t=!0:m.playItem(0))}t&&(n.paused?(n.currentTime=m.h.xa().start,n.play()):m.m.o(n,"paused",function(){n.currentTime=m.h.xa().start,n.play()}))}),t.config&&(m.h.tj(),m.h.configure(t.config)),a=t.manifestUri,m.j&&m.j.item==t&&m.j.Qf&&(a=m.j.Qf),S(v,m.h.load(a,t.startTime,t.mimeType),2)}if(m.j=null,t.extraText)for(o=c(t.extraText),s=o.next();!s.done;s=o.next())(u=s.value).mime?m.h.Ud(u.uri,u.language,u.kind,u.mime,u.codecs):m.h.Ud(u.uri,u.language,u.kind);if(t.extraThumbnail)for(l=c(t.extraThumbnail),d=l.next();!d.done;d=l.next())h=d.value,m.h.Ye(h);if(t.extraChapter)for(p=c(t.extraChapter),f=p.next();!f.done;f=p.next())g=f.value,m.h.Xe(g.uri,g.language,g.mime);w(v)})},H("shaka.queue.QueueManager",mw),mw.prototype.playItem=mw.prototype.playItem,mw.prototype.removeAllItems=mw.prototype.removeAllItems,mw.prototype.insertItems=mw.prototype.insertItems,mw.prototype.getItems=mw.prototype.getItems,mw.prototype.getCurrentItemIndex=mw.prototype.getCurrentItemIndex,mw.prototype.getCurrentItem=mw.prototype.getCurrentItem,mw.prototype.getConfiguration=mw.prototype.getConfiguration,mw.prototype.configure=mw.prototype.configure,mw.prototype.destroy=mw.prototype.destroy,Oh=function(e){return new mw(e)},vw.prototype.parseInit=function(){},vw.prototype.setSequenceMode=function(){},vw.prototype.setManifestType=function(){},vw.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=(e=c(e=Oe(e).split(/\r?\n/))).next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=yw.exec(r))){var a=bw.exec(r[1]);r=new Kn(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,r[2]),n&&(n.endTime=a,i.push(n)),n=r}return n&&i.push(n),i},H("shaka.text.LrcTextParser",vw),vw.prototype.parseMedia=vw.prototype.parseMedia,vw.prototype.setManifestType=vw.prototype.setManifestType,vw.prototype.setSequenceMode=vw.prototype.setSequenceMode,vw.prototype.parseInit=vw.prototype.parseInit;var yw=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,bw=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function Tw(){}function Sw(e,t,n,i,r,a,o,s,u,l,d,h,p){var f=l;if(mn(e)){if(!d)return null;var g={tagName:"span",children:[bn(e)],attributes:{},parent:null}}else g=e;for(var m=null,v=c(Yw),y=v.next();!y.done&&!(m=Mw(g,"backgroundImage",i,"#",y.value)[0]);y=v.next());v=null;var b=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((y=In(g,Yw,"backgroundImage"))&&b.test(y)){if((v=parseInt(y.split(":").pop(),10)-1)>=p.length)return null;v=p[v]}else h&&y&&!y.startsWith("#")&&(b=new ae(h),y=new ae(y),(y=b.resolve(y).toString())&&(v=y));if(("p"==e.tagName||m||v)&&(d=!0),e=d,y="default"==(g.attributes["xml:space"]||(s?"default":"preserve")),s=[],!(b=g.children.every(mn)))for(var T=c(g.children),S=T.next();!S.done;S=T.next())(S=Sw(S.value,t,n,i,r,a,o,y,u,g,d,h,p))&&s.push(S);if(i=null!=l,h=bn(g),h=g.children.length&&h&&/\S/.test(h),!((T=g.attributes.begin||g.attributes.end||g.attributes.dur)||h||"br"==g.tagName||0!=s.length||i&&!y))return null;for(h=(p=Rw(g,n)).start,p=p.end;f&&f.tagName&&"tt"!=f.tagName;)h=(p=Lw(f,n,h,p)).start,p=p.end,f=f.parent;if(null==h&&(h=0),h+=t.periodStart,p=null==p?1/0:p+t.periodStart,h=Math.max(h,t.segmentStart),p=Math.min(p,t.segmentEnd),!T&&0<s.length)for(h=1/0,p=0,n=(t=c(s)).next();!n.done;n=t.next())n=n.value,h=Math.min(h,n.startTime),p=Math.max(p,n.endTime);if("br"==g.tagName)return(r=new Kn(h,p,"")).lineBreak=!0,r;if(t="",b&&(t=Ge(bn(g)||""),y&&(t=t.replace(/\s+/g," "))),(t=new Kn(h,p,t)).nestedCues=s,d||(t.isContainer=!0),u&&(t.cellResolution=u),u=Mw(g,"region",a,"")[0],g.attributes.region&&u&&u.attributes["xml:id"]){var w=u.attributes["xml:id"];t.region=o.filter(function(e){return e.id==w})[0]}return o=u,l&&i&&!g.attributes.region&&!g.attributes.style&&(o=Mw(l,"region",a,"")[0]),function(e,t,n,i,r,a,o,s){o=o||s,"rtl"==xw(t,n,a,"direction",o)&&(e.direction="rtl"),s=xw(t,n,a,"writingMode",o),"tb"==s||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=ii),(s=xw(t,n,a,"textAlign",!0))?(e.positionAlign=Ww.get(s),e.lineAlign=Kw.get(s),e.textAlign=ei[s.toUpperCase()]):e.textAlign=Zn,(s=xw(t,n,a,"displayAlign",!0))&&(e.displayAlign=ni[s.toUpperCase()]);(s=xw(t,n,a,"color",o))&&(e.color=Aw(s));(s=xw(t,n,a,"backgroundColor",o))&&(e.backgroundColor=Aw(s));(s=xw(t,n,a,"border",o))&&(e.border=s);if(s=xw(t,n,a,"fontFamily",o))switch(s){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=s.split(",").filter(function(e){return"default"!=e}).join(",")}(s=xw(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=di),s=xw(t,n,a,"wrapOption",o),e.wrapLine=!s||"noWrap"!=s,(s=xw(t,n,a,"lineHeight",o))&&s.match(Uw)&&(e.lineHeight=s),(s=xw(t,n,a,"fontSize",o))&&(s.match(Uw)||s.match(Ow))&&(e.fontSize=s),(s=xw(t,n,a,"fontStyle",o))&&(e.fontStyle=fi[s.toUpperCase()]);i?(r=i.attributes.imageType||i.attributes.imagetype,s=i.attributes.encoding,i=bn(i).trim(),"PNG"==r&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=xw(t,n,a,"textOutline",o))&&(i=i.split(" "),i[0].match(Uw)?e.textStrokeColor=e.color:(e.textStrokeColor=Aw(i[0]),i.shift()),i[0]&&i[0].match(Uw)?e.textStrokeWidth=i[0]:e.textStrokeColor="");(i=xw(t,n,a,"letterSpacing",o))&&i.match(Uw)&&(e.letterSpacing=i),(i=xw(t,n,a,"linePadding",o))&&i.match(Uw)&&(e.linePadding=i),(i=xw(t,n,a,"opacity",o))&&(e.opacity=parseFloat(i));(i=kw(n,a,"textDecoration"))&&Ew(e,i),(i=Iw(t,a,"textDecoration"))&&Ew(e,i),(i=xw(t,n,a,"textCombine",o))&&(e.textCombineUpright=i);switch(xw(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(t,g,o,m,v,r,e,0==s.length),t}function ww(e,t,n){var i=new Yt,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=_w.exec(n)||jw.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var a,o=kw(e,t,"extent");
1if(o){var s=(a=_w.exec(o))||jw.exec(o);null!=s&&(i.width=Number(s[1]),i.height=Number(s[2]),a||(null!=n&&(i.width=100*i.width/n),null!=r&&(i.height=100*i.height/r)),i.widthUnits=a||null!=n?Jt:0,i.heightUnits=a||null!=r?Jt:0)}return(e=kw(e,t,"origin"))&&(null!=(s=(a=_w.exec(e))||jw.exec(e))&&(i.viewportAnchorX=Number(s[1]),i.viewportAnchorY=Number(s[2]),a?o||(i.width=100-i.viewportAnchorX,i.widthUnits=Jt,i.height=100-i.viewportAnchorY,i.heightUnits=Jt):(null!=r&&(i.viewportAnchorY=100*i.viewportAnchorY/r),null!=n&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=a||null!=n?Jt:0)),i}function Aw(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&4==(t=t[1].split(",")).length?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function Ew(e,t){for(var n=(t=c(t.split(" "))).next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(gi)||e.textDecoration.push(gi);break;case"noUnderline":e.textDecoration.includes(gi)&&Zt(e.textDecoration,gi);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Zt(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Zt(e.textDecoration,"overline")}}function xw(e,t,n,i,r){return r=void 0===r||r,(e=Iw(e,n,i))?e:r?kw(t,n,i):null}function kw(e,t,n){if(!e)return null;var i=In(e,Xw,n);return i||Cw(e,t,n)}function Iw(e,t,n){var i=In(e,Xw,n);return i||Cw(e,t,n)}function Cw(e,t,n){e=Mw(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=xn(e[r],"urn:ebu:tt:style",n);a||(a=In(e[r],Xw,n)),a||(a=Iw(e[r],t,n)),a&&(i=a)}return i}function Mw(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;!e&&!(e=r?xn(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e)for(r=(t=c(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=c(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}return a}function Lw(e,t,n,i){return e=Rw(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function Rw(e,t){var n=Pw(e.attributes.begin,t),i=Pw(e.attributes.end,t);return e=Pw(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function Pw(e,t){var n=null;if(Bw.test(e)){e=Bw.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);n=(r+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*i+3600*n}else if(Fw.test(e))n=Dw(Fw,e);else if(Vw.test(e))n=Dw(Vw,e);else if(Gw.test(e))e=Gw.exec(e),n=Number(e[1])/t.frameRate;else if(Hw.test(e))e=Hw.exec(e),n=Number(e[1])/t.g;else if(zw.test(e))n=Dw(zw,e);else if(e)throw new Ce(2,2,2001,"Could not parse cue time range in TTML");return n}function Dw(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function Nw(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}ji("application/x-subtitle-lrc",function(){return new vw}),Tw.prototype.parseInit=function(){},Tw.prototype.setSequenceMode=function(){},Tw.prototype.setManifestType=function(){},Tw.prototype.parseMedia=function(e,t,n,i){var r=Oe(e);if(e=[],""==r)return e;var a=fn(r,"tt",!0);if(!a)throw new Ce(2,2,2005,"Failed to parse TTML.");if(!(r=Sn(a,"body")[0]))return[];var o=In(a,qw,"frameRate"),s=In(a,qw,"subFrameRate"),u=In(a,qw,"frameRateMultiplier"),l=In(a,qw,"tickRate"),d=In(a,qw,"cellResolution"),h=a.attributes["xml:space"]||"default",p=In(a,Xw,"extent");if("default"!=h&&"preserve"!=h)throw new Ce(2,2,2005,"Invalid xml:space value: "+h);h="default"==h,o=new Nw(o,s,u,l),d=function(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{Wc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}(d),s=((s=Sn(a,"metadata")[0])?s.children:[]).filter(function(e){return"\n"!=e}),u=Sn(a,"style"),l=[];for(var f=c(a=Sn(a,"region")),g=f.next();!g.done;g=f.next())(g=ww(g.value,u,p))&&l.push(g);
1if(yn(r,"p").length)throw new Ce(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(p=c(yn(r,"div"))).next();!f.done;f=p.next())if(yn(f.value,"span").length)throw new Ce(2,2,2001,"<span> can only be inside <p> in TTML");return(t=Sw(r,t,o,s,u,a,l,h,d,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},H("shaka.text.TtmlTextParser",Tw),Tw.prototype.parseMedia=Tw.prototype.parseMedia,Tw.prototype.setManifestType=Tw.prototype.setManifestType,Tw.prototype.setSequenceMode=Tw.prototype.setSequenceMode,Tw.prototype.parseInit=Tw.prototype.parseInit;var _w=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Ow=/^(\d{1,4}(?:\.\d+)?|100)%$/,Uw=/^(\d+px|\d+em|\d*\.?\d+c)$/,jw=/^(\d+)px (\d+)px$/,Bw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Fw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,Gw=/^(\d*(?:\.\d*)?)f$/,Hw=/^(\d*(?:\.\d*)?)t$/,zw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Kw=(new Map).set("left",oi).set("center","center").set("right","end").set("start",oi).set("end","end"),Ww=(new Map).set("left","line-left").set("center","center").set("right","line-right"),qw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xw=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Jw(){this.g=new Tw}function Qw(){this.g="UNKNOWN"}function $w(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],e.textAlign="middle"==t?Zn:ei[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":$n)):(i=/^region:(.*)$/.exec(t))?(t=function(e,t){return e=e.filter(function(e){return e.id==t}),e.length?e[0]:null}(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=si[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ai,e.line=Number(n[1]),n[2]&&(e.lineAlign=si[n[2].toUpperCase()]))}function Zw(){this.g=null}function eA(e,t,n){var i,r,a;return(new da).box("payl",ma(function(e){i=Oe(e)})).box("iden",ma(function(e){r=Oe(e)})).box("sttg",ma(function(e){a=Oe(e)})).parse(e),i?function(e,t,n,i,r){if(e=new Kn(i,r,e),Xn(e),t&&(e.id=t),n)for(t=new nn(n),n=on(t);n;)$w(e,n,[]),rn(t),n=on(t);return e}(i,r,a,t,n):null}function tA(){}function nA(){this.g=new Qw}function iA(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=c((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.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 t}function rA(){}function aA(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=oA(n))&&(e.color=n),(n=t.BackColour)&&(n=oA(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=di),t.Italic&&(e.fontStyle=pi),t.Underline&&e.textDecoration.push(gi),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=ti,e.textAlign="start";break;case 2:e.displayAlign=ti,e.textAlign=Zn;break;case 3:e.displayAlign=ti,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Zn;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Zn;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function oA(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function sA(e){return 3600*((e=dA.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}ji("application/ttml+xml",function(){return new Tw}),Jw.prototype.parseInit=function(e){var t=!1;if((new da).box("moov",ha).box("trak",ha).box("mdia",ha).box("minf",ha).box("stbl",ha).V("stsd",pa).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new Ce(2,2,2007)},Jw.prototype.setSequenceMode=function(){},Jw.prototype.setManifestType=function(){},Jw.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if((new da).box("moof",ha).box("traf",ha).V("tfhd",function(e){r=ho(e.reader,e.flags).Zd}).V("trun",function(e){for(var t=(e=c((e=go(e.reader,e.version,e.flags)).Qh)).next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)}).V("subs",function(e){for(var t=e.reader,n=t.W(),i=-1,r=0;r<n;r++){var a=t.W();i+=a,a=t.Fa();for(var s=[],u=0;u<a;
1u++)1==e.version?s.push(t.W()):s.push(t.Fa()),t.aa(),t.aa(),t.W();o.set(i,s)}}).box("mdat",ma(function(e){a.push(e)})).parse(e,!1),0==a.length)throw new Ce(2,2,2007);for(var u=Je.apply(ze,d(a)),l=0,h=0;h<s.length;h++){var p=Ee(u,l,s[h]);l+=s[h];var f=o.get(h);if(f&&f.length){p=Ee(p,0,f[0]);for(var g=[],m=f[0],v=1;v<f.length;v++){var y=Ee(e,m,f[v]);y=Ke(y),g.push("data:image/png;base64,"+y),m+=f[v]}i=i.concat(this.g.parseMedia(p,t,n,g))}else i=i.concat(this.g.parseMedia(p,t,n,[]))}return i},H("shaka.text.Mp4TtmlParser",Jw),Jw.prototype.parseMedia=Jw.prototype.parseMedia,Jw.prototype.setManifestType=Jw.prototype.setManifestType,Jw.prototype.setSequenceMode=Jw.prototype.setSequenceMode,Jw.prototype.parseInit=Jw.prototype.parseInit,ji('application/mp4; codecs="stpp"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Jw}),ji('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Jw}),ji('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Jw}),Qw.prototype.parseInit=function(){},Qw.prototype.setSequenceMode=function(){},Qw.prototype.setManifestType=function(e){this.g=e},Qw.prototype.parseMedia=function(e,t){var n=(e=(e=Oe(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new Ce(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g)if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new Ce(2,2,2e3);if(null==(e=un(e[1])))throw new Ce(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=(i=c(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new nn(r);var a=new Yt;on(r),rn(r);for(var o=on(r);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),rn(r),o=on(r)}t.push(a)}for(Yn(i=new Map),r=[],a=(n=c(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(s=[],o=-1,u=1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=c(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=i.get(o))||(l=new Kn(0,0,""));for(var d=!1,h=0;h<u.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(u[h]);if(p){var f=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":case"background":d=!0,l.backgroundColor=f;break;case"color":d=!0,l.color=f;break;case"font-family":d=!0,l.fontFamily=f;break;case"font-size":d=!0,l.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(d=!0,l.fontWeight=di);break;case"font-style":switch(f){case"normal":d=!0,l.fontStyle=hi;break;case"italic":d=!0,l.fontStyle=pi;break;case"oblique":d=!0,l.fontStyle="oblique"}break;case"opacity":d=!0,l.opacity=parseFloat(f);break;case"text-combine-upright":d=!0,l.textCombineUpright=f;break;case"text-shadow":d=!0,l.textShadow=f;break;case"white-space":d=!0,l.wrapLine="noWrap"!=f}}}d&&i.set(o,l)}}if(d=e,1==(l=a).length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])a=null;else if(a=null,l[0].includes("--\x3e")||(a=l[0],l.splice(0,1)),o=sn(s=new nn(l[0])),h=an(s,/[ \t]+--\x3e[ \t]+/g),u=sn(s),null==o||null==h||null==u)Y("Failed to parse VTT time code. Cue skipped:",a,l),a=null;else{for(o+=d,u+=d,d=l.slice(1).join("\n").trim(),i.has("global")?((l=i.get("global").clone()).startTime=o,l.endTime=u,l.payload=d):l=new Kn(o,u,d),rn(s),o=on(s);o;)$w(l,o,t),rn(s),o=on(s);Xn(l,i),null!=a&&(l.id=a),a=l}a&&r.push(a)}return r},H("shaka.text.VttTextParser",Qw),Qw.prototype.parseMedia=Qw.prototype.parseMedia,Qw.prototype.setManifestType=Qw.prototype.setManifestType,Qw.prototype.setSequenceMode=Qw.prototype.setSequenceMode,Qw.prototype.parseInit=Qw.prototype.parseInit,ji("text/vtt",function(){return new Qw}),ji('text/vtt; codecs="vtt"',function(){return new Qw}),ji('text/vtt; codecs="wvtt"',function(){return new Qw}),Zw.prototype.parseInit=function(e){var t=this,n=!1;if((new da).box("moov",ha).box("trak",ha).box("mdia",ha).V("mdhd",function(e){e=fo(e.reader,e.version),t.g=e.timescale}).box("minf",ha).box("stbl",ha).V("stsd",pa).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new Ce(2,2,2008);if(!n)throw new Ce(2,2,2008)},Zw.prototype.setSequenceMode=function(){},Zw.prototype.setManifestType=function(){},Zw.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new Ce(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new da).box("moof",ha).box("traf",ha).V("tfdt",function(e){o=!0,i=po(e.reader,e.version).baseMediaDecodeTime}).V("tfhd",function(e){l=ho(e.reader,e.flags).Yd}).V("trun",function(e){s=!0,r=go(e.reader,e.version,e.flags).Qh}).box("mdat",ma(function(e){u=!0,n=e}
1)).parse(e,!1),!u&&!o&&!s)throw new Ce(2,2,2008);e=i;for(var d=new ua(n,0),h=c(r),p=h.next();!p.done;p=h.next()){var f=(p=p.value).Rh||l,g=p.Xf?i+p.Xf:e;e=g+(f||0);var m=0;do{var v=d.W();m+=v;var y=null;"vttc"==ya(d.W())?8<v&&(y=d.Xb(v-8)):d.skip(v-8),f&&y&&(v=eA(y,t.periodStart+g/this.g,t.periodStart+e/this.g),a.push(v))}while(p.sampleSize&&m<p.sampleSize)}return a.filter(Xi)},H("shaka.text.Mp4VttParser",Zw),Zw.prototype.parseMedia=Zw.prototype.parseMedia,Zw.prototype.setManifestType=Zw.prototype.setManifestType,Zw.prototype.setSequenceMode=Zw.prototype.setSequenceMode,Zw.prototype.parseInit=Zw.prototype.parseInit,ji('application/mp4; codecs="wvtt"',function(){return new Zw}),tA.prototype.parseInit=function(){},tA.prototype.setSequenceMode=function(){},tA.prototype.setManifestType=function(){},tA.prototype.parseMedia=function(e){var t=Oe(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=c(t.split("\n\n"))).next();!n.done;n=t.next()){var i=new nn((n=n.value.split("\n"))[0]),r=sn(i),a=an(i,/,/g);if(i=sn(i),null==r||null==a||null==i)throw new Ce(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Kn(r,i,n.slice(1).join("\n").trim()))}return e},H("shaka.text.SbvTextParser",tA),tA.prototype.parseMedia=tA.prototype.parseMedia,tA.prototype.setManifestType=tA.prototype.setManifestType,tA.prototype.setSequenceMode=tA.prototype.setSequenceMode,tA.prototype.parseInit=tA.prototype.parseInit,ji("text/x-subviewer",function(){return new tA}),nA.prototype.parseInit=function(){},nA.prototype.setSequenceMode=function(){},nA.prototype.setManifestType=function(){},nA.prototype.parseMedia=function(e,t,n){return e=Ee(Be(e=iA(e=Oe(e)))),this.g.parseMedia(e,t,n,[])},H("shaka.text.SrtTextParser",nA),nA.srt2webvtt=iA,nA.prototype.parseMedia=nA.prototype.parseMedia,nA.prototype.setManifestType=nA.prototype.setManifestType,nA.prototype.setSequenceMode=nA.prototype.setSequenceMode,nA.prototype.parseInit=nA.prototype.parseInit,ji("text/srt",function(){return new nA}),rA.prototype.parseInit=function(){},rA.prototype.setSequenceMode=function(){},rA.prototype.setManifestType=function(){},rA.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=c(r=Oe(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;r=a,(a=uA.exec(a))&&(i=a[1],r=a[2]),"V4 Styles"==i||"V4+ Styles"==i?(t=r,t=n?t+"\n"+r:r):"Events"==i&&(n=n?n+"\n"+r:r)}for(i=[],r=null,e=(t=c(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=lA.exec(e)))if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(cA);else if("Style"==e){e=a.split(cA),a={};for(var o=0;o<r.length&&o<e.length;o++)a[r[o]]=e[o];i.push(a)}for(r=[],t=null,a=(n=c(n.split(/\r?\n/))).next(),e={};!a.done;e={Lj:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=lA.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(cA);else if("Dialogue"==a){o=o.split(cA),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new Kn(s=sA(a.Start),sA(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.Lj=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.Lj}}(e)))&&aA(o,e),r.push(o)}return r},H("shaka.text.SsaTextParser",rA),rA.prototype.parseMedia=rA.prototype.parseMedia,rA.prototype.setManifestType=rA.prototype.setManifestType,rA.prototype.setSequenceMode=rA.prototype.setSequenceMode,rA.prototype.parseInit=rA.prototype.parseInit;var uA=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,lA=/^\s*([^:]+):\s*(.*)/,cA=/\s*,\s*/,dA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function hA(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&0<(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)?{ie:n,wa:e}:null}function pA(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var r=((192&e[t+2])>>>6)+1,a=(1&e[t+2])<<2;return a|=(192&e[t+3])>>>6,{sampleRate:n[i],channelCount:a,codec:"mp4a.40."+r}}function fA(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}function gA(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function mA(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(3<=n)return null;var i=63&e[t+4],r=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,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>
13<<1|s>>2,(3&s)<<6|a<<3|o<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,Ma:e,wa:r}}function vA(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=a;0<a;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=4278190080>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(16>r)return!0}return!1}function yA(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function bA(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]))return null;var n=new Es(e.subarray(t+2));ks(n,2),ks(n,3);var i=Is(n,11)+1<<1,r=Is(n,2);if(3==r){r=[24e3,22060,16e3][r=Is(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=Is(n,2);var o=Is(n,3),s=Is(n,1);return n=Is(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][a])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,r<<6|n<<1,o<<1|s,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,Ma:e,wa:i})}function TA(e){this.j=e,this.h=0,this.g=new Map,this.i=null}ji("text/x-ssa",function(){return new rA}),(r=gA.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&Ut(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Di(t)||"mp4a.40.2")+'"':t},r.getOriginalMimeType=function(){return this.j},r.transmux=function(e,t,n,i){for(var r=Ee(e),a=ws(r),o=a.length;o<r.length&&!fA(r,o);o++);if(e=1e3*n.endTime,(a=Ss(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=pA(r,o)))return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=hA(r,o);if(!u)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));var l=u.ie+u.wa;o+l<=r.length&&s.push({data:r.subarray(o+u.ie,o+l),size:u.wa,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),o+=l}return r=a.sampleRate,e=Math.floor(e*r/1e3),i=new To([i={id:t.id,type:"audio",codecs:a.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.h,baseMediaDecodeTime:e,Cb:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=So(i),this.g.set(n,t)),n=this.i!==t,i=ko(i),this.i=t,this.h++,n?(t=Je(t,i),Promise.resolve(t)):Promise.resolve(i)},H("shaka.transmuxer.AacTransmuxer",gA),gA.prototype.transmux=gA.prototype.transmux,gA.prototype.getOriginalMimeType=gA.prototype.getOriginalMimeType,gA.prototype.convertCodecs=gA.prototype.convertCodecs,gA.prototype.isSupported=gA.prototype.isSupported,gA.prototype.destroy=gA.prototype.destroy,yi("audio/aac",function(){return new gA("audio/aac")},Si),(r=yA.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&Ut(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?Re().we()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},r.getOriginalMimeType=function(){return this.j},r.transmux=function(e,t,n,i){for(var r=ws(e=Ee(e)),a=r.length;a<e.length&&!vA(e,a);a++);var o=1e3*n.endTime;(r=Ss(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=mA(e,a);if(!l)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Ma,u.push({data:e.subarray(a,a+l.wa),size:l.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),a+=l.wa}return e=Math.floor(o*r/1e3),i=new To([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Eb:[],Ma:s,Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.h,baseMediaDecodeTime:e,Cb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=So(i),this.g.set(n,t)),n=this.i!==t,i=ko(i),this.i=t,this.h++,n?(t=Je(t,i),Promise.resolve(t)):Promise.resolve(i)},H("shaka.transmuxer.Ac3Transmuxer",yA),yA.prototype.transmux=yA.prototype.transmux,yA.prototype.getOriginalMimeType=yA.prototype.getOriginalMimeType,yA.prototype.convertCodecs=yA.prototype.convertCodecs,yA.prototype.isSupported=yA.prototype.isSupported,yA.prototype.destroy=yA.prototype.destroy,yi("audio/ac3",function(){return new yA("audio/ac3")},Si),(r=TA.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&Ut(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},r.getOriginalMimeType=function(){return this.j},r.transmux=function(e,t,n,i){for(var r=ws(e=Ee(e)),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]);a++);var o=1e3*n.endTime;(r=Ss(r)).length&&n&&(r=r.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=bA(e,a);if(!l)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Ma,u.push({data:e.subarray(a,a+l.wa),size:l.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),a+=l.wa}return e=Math.floor(o*r/1e3),i=new To([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,Eb:[],Ma:s,Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.h,baseMediaDecodeTime:e,Cb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=So(i),this.g.set(n,t)),n=this.i!==t,i=ko(i),this.i=t,this.h++,n?(t=Je(t,i),Promise.resolve(t)):Promise.resolve(i)},H("shaka.transmuxer.Ec3Transmuxer",TA),TA.prototype.transmux=TA.prototype.transmux,TA.prototype.getOriginalMimeType=TA.prototype.getOriginalMimeType,TA.prototype.convertCodecs=TA.prototype.convertCodecs,TA.prototype.isSupported=TA.prototype.isSupported,TA.prototype.destroy=TA.prototype.destroy,yi("audio/ec3",function(){return new TA("audio/ec3")},Si);var SA=[100,110,122,244,44,83,86,118,128,138,139,134];function wA(e){if(!e.length)return null;var t=e.find(function(e){return 32==e.type}),n=e.find(function(e){return 33==e.type}),i=e.find(function(e){return 34==e.type});if(!t||!n||!i)return null;var r=function(e){var t=new Es(e,!0);return Ds(t),Ds(t),Is(t,4),Is(t,2),Is(t,6),e=Is(t,3),t=Ps(t),{Dh:e+1,ii:t}}(t.fullData);e=function(e){e=new Es(e,!0),Ds(e),Ds(e);var t=0,n=0,i=0,r=0;Is(e,4);var a=Is(e,3);Ps(e);for(var o=Is(e,2),s=Is(e,1),u=Is(e,5),l=Ds(e),c=Ds(e),d=Ds(e),h=Ds(e),p=Ds(e),f=Ds(e),g=Ds(e),m=Ds(e),v=Ds(e),y=Ds(e),b=Ds(e),T=[],S=[],w=0;w<a;w++)T.push(Ps(e)),S.push(Ps(e));if(0<a)for(w=a;8>w;w++)Is(e,2);for(w=0;w<a;w++)T[w]&&Is(e,88),S[w]&&Ds(e);Ls(e),T=Ls(e),3==T&&Is(e,1),S=Ls(e),w=Ls(e),Ps(e)&&(t+=Ls(e),n+=Ls(e),i+=Ls(e),r+=Ls(e));var A=Ls(e),E=Ls(e),x=Ls(e);if(Ps(e))for(var k=0;k<=a;k++)Ls(e),Ls(e),Ls(e);else Ls(e),Ls(e),Ls(e);if(Ls(e),Ls(e),Ls(e),Ls(e),Ls(e),Ls(e),Ps(e)&&Ps(e))for(k=0;4>k;k++)for(var I=0;I<(3===k?2:6);I++)if(Ps(e)){var C=Math.min(64,1<<4+(k<<1));1<k&&Rs(e);for(var M=0;M<C;M++)Rs(e)}else Ls(e);for(Ps(e),Ps(e),Ps(e)&&(Ds(e),Ls(e),Ls(e),Ps(e)),k=Ls(e),C=I=0;C<k;C++)if(M=!1,0!==C&&(M=Ps(e)),M){C===k&&Ls(e),Ps(e),Ls(e);for(var L=M=0;L<=I;L++){var R=Ps(e),P=!1;R||(P=Ps(e)),(R||P)&&M++}I=M}else{for(I=(L=Ls(e))+(M=Ls(e)),R=0;R<L;R++)Ls(e),Ps(e);for(L=0;L<M;L++)Ls(e),Ps(e)}if(Ps(e))for(k=Ls(e),I=0;I<k;I++){for(C=0;C<x+4;C++)Is(e,1);Is(e,1)}if(k=x=1,I=0,Ps(e),Ps(e),Ps(e)){if(Ps(e)&&(M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<(C=Ds(e))&&16>=C?(x=M[C-1],k=L[C-1]):255===C&&(x=Is(e,16),k=Is(e,16))),Ps(e)&&Ps(e),Ps(e)&&(Is(e,3),Ps(e),Ps(e)&&(Ds(e),Ds(e),Ds(e))),Ps(e)&&(Ls(e),Ls(e)),Ps(e),Ps(e),Ps(e),(C=Ps(e))&&(Ls(e),Ls(e),Ls(e),Ls(e)),Ps(e)&&(Is(e,32),Is(e,32),Ps(e)&&Ls(e),Ps(e)))for(L=!1,C=Ps(e),M=Ps(e),(C||M)&&((L=Ps(e))&&(Ds(e),Is(e,5),Ps(e),Is(e,5)),Is(e,4),Is(e,4),L&&Is(e,4),Is(e,5),Is(e,5),Is(e,5)),R=0;R<=a;R++){var D=!0;P=1,Ps(e)||(D=Ps(e));var N=!1;if(D?Ls(e):N=Ps(e),N||(P=Ls(e)+1),C){for(D=0;D<P;D++)Ls(e),Ls(e),L&&(Ls(e),Ls(e));Ps(e)}if(M){for(D=0;D<P;D++)Ls(e),Ls(e),L&&(Ls(e),Ls(e));Ps(e)}}Ps(e)&&(Ps(e),Ps(e),Ps(e),I=Ls(e),Ls(e),Ls(e),Ls(e),Ls(e))}return{Wg:b,bh:o,dh:s,ah:u,Xg:l,Yg:c,Zg:d,$g:h,Qg:p,Rg:f,Sg:g,Tg:m,Ug:v,Vg:y,Gf:I,Ig:0,Gg:T,Cg:A,Bg:E,width:S-(t+n)*(1===T||2===T?2:1),height:w-(i+r)*(1===T?2:1),bm:x,am:k}}(n.fullData);var a=function(e){var t=new Es(e,!0);Ds(t),Ds(t),Ls(t),Ls(t),Ps(t),Ps(t),Is(t,3),Ps(t),Ps(t),Ls(t),Ls(t),Rs(t),Ps(t),Ps(t),Ps(t)&&Ls(t),Rs(t),Rs(t),Ps(t),Ps(t),Ps(t),Ps(t),e=Ps(t),t=Ps(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Fh:n}}(i.fullData);return t=function(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(3&i.bh)<<6|(i.dh?1:0)<<5|31&i.ah,r[2]=i.Xg,r[3]=i.Yg,r[4]=i.Zg,r[5]=i.$g,r[6]=i.Qg,r[7]=i.Rg,r[8]=i.Sg,r[9]=i.Tg,r[10]=i.Ug,r[11]=i.Vg,r[12]=i.Wg,r[13]=240|(3840&i.Gf)>>8,r[14]=255&i.Gf,r[15]=252|3&i.Fh,r[16]=252|3&i.Gg,r[17]=248|7&i.Cg,r[18]=248|7&i.Bg,r[19]=0,r[20]=0,r[21]=(3&i.Ig)<<6|(7&i.Dh)<<3|(i.ii?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(65280&e.byteLength)>>8,r[27]=255&e.byteLength,r.set(e,28),r[23+(5+e.byteLength)]=161,r[e.byteLength+29]=0,r[e.byteLength+30]=1,r[e.byteLength+31]=(65280&t.byteLength)>>8,r[e.byteLength+32]=255&t.byteLength,r.set(t,e.byteLength+33),r[23+(e.byteLength+10+t.byteLength)]=162,r[e.byteLength+10+t.byteLength+24]=0,r[e.byteLength+10+t.byteLength+25]=1,r[e.byteLength+10+t.byteLength+26]=(65280&n.byteLength)>>
18,r[e.byteLength+10+t.byteLength+27]=255&n.byteLength,r.set(n,e.byteLength+10+t.byteLength+28),r}(t.fullData,n.fullData,i.fullData,{Dh:r.Dh,ii:r.ii,bh:e.bh,dh:e.dh,Wg:e.Wg,ah:e.ah,Xg:e.Xg,Yg:e.Yg,Zg:e.Zg,$g:e.$g,Qg:e.Qg,Rg:e.Rg,Sg:e.Sg,Tg:e.Tg,Ug:e.Ug,Vg:e.Vg,Ig:e.Ig,Gf:e.Gf,Gg:e.Gg,Cg:e.Cg,Bg:e.Bg,Fh:a.Fh}),{height:e.height,width:e.width,Wa:t,bb:e.bm,eb:e.am}}function AA(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==a){var o=e[t+3]>>6;r=1e3*kA[14*(3===n?3-i:3===i?3:4)+r-1],a=IA[3*(3===n?0:2===n?1:2)+a],n=CA[n][i];var s=MA[i],u=Math.floor(n*r/a+(e[t+2]>>1&1))*s,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&87>=l&&2===i&&224e3<=r&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,wa:u,$l:8*n*s}}return null}function EA(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function xA(e,t){if(t+1<e.length&&EA(e,t)){var n=AA(e,t),i=4;return n&&n.wa&&(i=n.wa),(t+=i)===e.length||t+1<e.length&&EA(e,t)}return!1}var kA=[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],IA=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],CA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],MA=[0,1,1,4];function LA(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function RA(e){this.h=e,this.g=null}function PA(e){this.h=e,(this.g=bv.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(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(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),1&this.flags&&(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)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","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)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var e=!0,n=0;16>n;n++)this.usertype[n]!==NA[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function DA(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}(r=LA.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&Ut(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},r.getOriginalMimeType=function(){return this.j},r.transmux=function(e,t,n,i){for(var r=Ee(e),a=ws(r).length;a<r.length&&!xA(r,a);a++);var o;for(e=[];a<r.length;){var s=AA(r,a);if(!s)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));o||(o=s),a+s.wa<=r.length&&e.push({data:r.subarray(a,a+s.wa),size:s.wa,duration:1152,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),a+=s.wa}return o?(r=9e4*o.$l/o.sampleRate*this.h,i=new To([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:o.sampleRate,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.h,baseMediaDecodeTime:r,Cb:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=So(i),this.g.set(n,t)),n=this.i!==t,i=ko(i),this.i=t,this.h++,n?(t=Je(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null))},H("shaka.transmuxer.Mp3Transmuxer",LA),LA.prototype.transmux=LA.prototype.transmux,LA.prototype.getOriginalMimeType=LA.prototype.getOriginalMimeType,LA.prototype.convertCodecs=LA.prototype.convertCodecs,LA.prototype.isSupported=LA.prototype.isSupported,LA.prototype.destroy=LA.prototype.destroy,yi("audio/mpeg",function(){return new LA("audio/mpeg")},Si),(r=RA.prototype).destroy=function(){},r.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=Di(e).split(","),n=tt("audio",t);return t=tt("video",t),!(!n||t||"mp3"!=Li(n))&&Ut(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},r.getOriginalMimeType=function(){return this.h},r.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Os,e=Ee(e),"mp3"!=(e=this.g.parse(e)).ae().audio||"audio"!=r)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));for(n=new Uint8Array([]),r=c(e.yb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=AA(e,t))?(t+i.wa<=e.length&&(n=Je(n,e.subarray(t,t+i.wa))),t+=i.wa):t++;return Promise.resolve(n)},H("shaka.transmuxer.MpegTsTransmuxer",RA),RA.prototype.transmux=RA.prototype.transmux,RA.prototype.getOriginalMimeType=RA.prototype.getOriginalMimeType,RA.prototype.convertCodecs=RA.prototype.convertCodecs,RA.prototype.isSupported=RA.prototype.isSupported,RA.prototype.destroy=RA.prototype.destroy,yi("video/mp2t",function(){return new RA("video/mp2t")},wi),(r=PA.prototype).destroy=function(){},r.isSupported=function(e,t){var n=e.startsWith("mss/");return!(!this.g||!n)&&(t?Ut(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ut(t)||Ut(e)))},r.convertCodecs=function(e,t){return t.replace("mss/","")},r.getOriginalMimeType=function(){return this.h},r.transmux=function(e,t,n){if(!n)return Promise.resolve(Ee(e));if(!t.mssPrivateData)return Promise.reject(new Ce(2,3,3020,n?n.S()[0]:null));try{var i,r=this.g.parseBuffer(e),a=r.fetch("tfhd");a.track_ID=t.id+1;var o=r.fetch("tfdt"),s=r.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=r.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var h=r.fetch("saio");if(null===h){(h=this.g.createFullBox("saio",s)).version=0,h.flags=0,h.entry_count=1,h.offset=[0];var p=this.g.createFullBox("saiz",s);if(p.version=0,p.flags=0,p.sample_count=d.sample_count,p.default_sample_info_size=0,p.sample_info_size=[],2&d.flags)for(i=0;i<d.sample_count;i+=1)p.sample_info_size[i]=10+6*d.entry[i].NumberOfEntries;else p.default_sample_info_size=8}}a.flags&=16777214,a.flags|=131072,u.flags|=1;var f=r.fetch("moof");u.data_offset=f.getLength()+8;var g=r.fetch("saio");null!==g&&(g.offset[0]=DA(f,"traf")+DA(s,"senc")+16);var m=Ee(r.write());return Promise.resolve(m)}catch(e){return e instanceof Ce?Promise.reject(e):Promise.reject(new Ce(2,3,3022,n?n.S()[0]:null))}},H("shaka.transmuxer.MssTransmuxer",PA),PA.prototype.transmux=PA.prototype.transmux,PA.prototype.getOriginalMimeType=PA.prototype.getOriginalMimeType,PA.prototype.convertCodecs=PA.prototype.convertCodecs,PA.prototype.isSupported=PA.prototype.isSupported,PA.prototype.destroy=PA.prototype.destroy;var NA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function _A(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}yi("mss/audio/mp4",function(){return new PA("mss/audio/mp4")},Si),yi("mss/video/mp4",function(){return new PA("mss/video/mp4")},Si),(r=_A.prototype).destroy=function(){this.i.clear(),this.h&&this.h.destroy()},r.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=Di(n).split(",");return n=tt("audio",i),i=tt("video",i),!(n&&(n=Li(n),!jA.includes(n))||i&&(n=Li(i),!BA.includes(n)))&&(t?Ut(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ut(t)||Ut(e)))},r.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=Di(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return ar(e,"audio/mp4")}).map(or).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},r.getOriginalMimeType=function(){return this.m},r.transmux=function(e,t,n,i,r){var a=Ee(e);if("audio"==r&&!Fs(a)){for(var o=ws(a),s=o.length;s<a.length;s++)if(xA(a,s))return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));for(s=o.length;s<a.length;s++)if(fA(a,s))return this.h||(this.h=new gA("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null))}this.j?this.j.clearData():this.j=new Os;var u=this.j.parse(a),l=[],h=u.ae();try{var p=null;if("video"==r){switch(h.video){case"avc":var f=[],g=null,m=u.cd(),v=function(e){function t(e){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:e.pts,dts:e.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var e=[],t=c(r.nalus),n=t.next();!n.done;n=t.next()){var a=(n=n.value).fullData.byteLength,o=new Uint8Array(4);o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=255&a,e.push(o),e.push(n.fullData)}r.data=Je.apply(ze,d(e)),i.push(r)}}for(var i=[],r=null,a=!1,o=0;o<e.length;o++){var s=e[o],u=s.nalus,l=!1;r&&u.length&&!a&&(n(),t(s));for(var h=(u=c(s.nalus)).next();!h.done;h=u.next()){var p=!1;switch((h=h.value).type){case 1:var f=!1;p=!0;var g=h.data;l&&4<g.length&&(2===(g=_s(new Es(g)))||4===g||7===g||9===g)&&(f=!0),f&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=f;break;case 5:p=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:p=!0;break;case 7:l=p=!0;break;case 9:a=p=!0,r&&r.frame&&(n(),r=null),r||t(s);break;default:p=!1}r&&p&&r.nalus.push(h)}}return n(),i}(m);if(!v.length)throw new Ce(2,3,3023,n?n.S()[0]:null);for(var y=0;y<v.length;y++){var b=v[y];null==g&&(g=b.dts);var T;T=y+1<v.length?(v[y+1].dts||0)-(b.dts||0):1<v.length?(b.dts||0)-(v[y-1].dts||0):9e4*(n.endTime-n.startTime),f.push({data:b.data,size:b.data.byteLength,duration:T,xb:Math.round((b.pts||0)-(b.dts||0)),flags:{zb:0,sb:0,rb:0,ob:0,pb:b.isKeyframe?2:1,Ab:b.isKeyframe?0:1}})}for(var S=[],w=c(m),A=w.next();!A.done;A=w.next())S.push.apply(S,d(A.value.nalus));var E=function(e){if(!e.length)return null;var t=e.find(function(e){return 7==e.type});if(e=e.find(function(e){return 8==e.type}),!t||!e)return null;var n=new Es(t.data),i=Ds(n);if(Ds(n),Ds(n),Ms(n),SA.includes(i)&&(3===(i=Ls(n))&&ks(n,1),Ms(n),Ms(n),ks(n,1),Ps(n))){i=3!==i?8:12;for(var r=0;r<i;r++)Ps(n)&&Ns(n,6>r?16:64)}if(Ms(n),0===(i=Ls(n)))Ls(n);else if(1===i)for(ks(n,1),Ms(n),Ms(n),i=Ls(n),r=0;r<i;r++)Ms(n);Ms(n),ks(n,1);var a=Ls(n),o=Ls(n),s=Is(n,1);0===s&&ks(n,1),ks(n,1);var u=0,l=0,c=0,h=0;if(Ps(n)&&(u=Ls(n),l=Ls(n),c=Ls(n),h=Ls(n)),r=i=1,Ps(n)&&Ps(n)){var p=Ds(n);0<p&&16>=p?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][p-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][p-1]):255===p&&(i=Is(n,16),r=Is(n,16))}return n=(2-s)*(o+1)*16-2*c-2*h,a=16*(a+1)-2*u-2*l,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(255&t.byteLength),u=u.concat.apply(u,d(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,d(e)),{height:n,width:a,Wa:e=new 
1Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),bb:i,eb:r}}(S);if(!E||null==g)throw new Ce(2,3,3018,n?n.S()[0]:null);t.height=E.height,t.width=E.width,p={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:E.Wa,bb:E.bb,eb:E.eb,data:{Yb:this.g,baseMediaDecodeTime:g,Cb:f},stream:t};break;case"hvc":var x=[],k=null,I=[],C=u.cd();if(!C.length)throw new Ce(2,3,3023,n?n.S()[0]:null);for(var M=0;M<C.length;M++){var L=C[M],R=L.nalus;I.push.apply(I,d(R));for(var P=!1,D=[],N=!1,_=c(R),O=_.next();!O.done;O=_.next()){var U=O.value;switch(U.type){case 1:case 0:var j=N=!0;break;case 19:case 20:case 21:P=j=N=!0;break;case 32:case 33:case 34:case 39:case 40:j=!0;break;case 35:N=j=!0;break;default:j=!1}if(N&&j){var B=U.fullData.byteLength,F=new Uint8Array(4);F[0]=B>>24&255,F[1]=B>>16&255,F[2]=B>>8&255,F[3]=255&B,D.push(F),D.push(U.fullData)}}var V=D.length?{data:Je.apply(ze,d(D)),isKeyframe:P}:null;if(V){null==k&&null!=L.dts&&(k=L.dts);var G;G=M+1<C.length?(C[M+1].dts||0)-(L.dts||0):1<C.length?(L.dts||0)-(C[M-1].dts||0):9e4*(n.endTime-n.startTime),x.push({data:V.data,size:V.data.byteLength,duration:G,xb:Math.round((L.pts||0)-(L.dts||0)),flags:{zb:0,sb:0,rb:0,ob:0,pb:V.isKeyframe?2:1,Ab:V.isKeyframe?0:1}})}}var H=wA(I);if(!H||null==k)throw new Ce(2,3,3018,n?n.S()[0]:null);t.height=H.height,t.width=H.width,p={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:H.Wa,bb:H.bb,eb:H.eb,data:{Yb:this.g,baseMediaDecodeTime:k,Cb:x},stream:t}}p&&(l.push(p),p=null)}if("audio"==r){switch(h.audio){case"aac":for(var z,K=[],W=null,q=null,X=null,Y=c(u.yb()),J=Y.next();!J.done;J=Y.next()){var Q=J.value,$=Q.data;if($){var Z=0;if(-1==q&&X)$=Je(X,Q.data),q=null;else if(null!=q&&X){Z=Math.max(0,q);var ee=Je(X,$.subarray(0,Z));K.push({data:ee,size:ee.byteLength,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),q=X=null}if(!(z=pA($,Z)))throw new Ce(2,3,3018,n?n.S()[0]:null);for(t.audioSamplingRate=z.sampleRate,t.channelsCount=z.channelCount,null==W&&null!==Q.pts&&(W=Q.pts);Z<$.length;){var te=hA($,Z);if(!te){X=$.subarray(Z,$.length),q=-1;break}var ne=te.ie+te.wa;0!=(q=Math.max(0,Z+ne-$.length))?X=$.subarray(Z+te.ie,Z+ne):Z+ne<=$.length&&K.push({data:$.subarray(Z+te.ie,Z+ne),size:te.wa,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),Z+=ne}}}if(!z||null==W){if(!u.cd().length)throw new Ce(2,3,3018,n?n.S()[0]:null);W=9e4*n.startTime;var ie=tt("audio",t.codecs.split(","));if(!ie||!t.channelsCount||!t.audioSamplingRate)throw new Ce(2,3,3018,n?n.S()[0]:null);z={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:ie};var re=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)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===t||3===t)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}(ie,t.channelsCount);if(!re)throw new Ce(2,3,3018,n?n.S()[0]:null);for(var ae=W+9e4*(n.endTime-n.startTime),oe=W;oe<ae;)K.push({data:re,size:re.byteLength,duration:1024,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),oe+=1024/z.sampleRate*9e4}var se=z.sampleRate,ue=W/9e4*se;p={id:t.id,type:"audio",codecs:z.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:se,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.g,baseMediaDecodeTime:ue,Cb:K},stream:t};break;case"ac3":for(var le=[],ce=0,de=new Uint8Array([]),he=null,pe=c(u.yb()),fe=pe.next();!fe.done;fe=pe.next()){var ge=fe.value,me=ge.data;null==he&&null!==ge.pts&&(he=ge.pts);for(var ve=0;ve<me.length;
1){var ye=mA(me,ve);ye?(t.audioSamplingRate=ye.sampleRate,t.channelsCount=ye.channelCount,ce=ye.sampleRate,de=ye.Ma,le.push({data:me.subarray(ve,ve+ye.wa),size:ye.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),ve+=ye.wa):ve++}}if(0==ce||0==de.byteLength||null==he)throw new Ce(2,3,3018,n?n.S()[0]:null);var be=he/9e4*ce;p={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ce,duration:i,Eb:[],Ma:de,Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.g,baseMediaDecodeTime:be,Cb:le},stream:t};break;case"ec3":for(var Te=[],Se=0,we=new Uint8Array([]),Ae=null,xe=c(u.yb()),ke=xe.next();!ke.done;ke=xe.next()){var Ie=ke.value,Me=Ie.data;null==Ae&&null!==Ie.pts&&(Ae=Ie.pts);for(var Le=0;Le<Me.length;){var Re=bA(Me,Le);Re?(t.audioSamplingRate=Re.sampleRate,t.channelsCount=Re.channelCount,Se=Re.sampleRate,we=Re.Ma,Te.push({data:Me.subarray(Le,Le+Re.wa),size:Re.wa,duration:1536,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),Le+=Re.wa):Le++}}if(0==Se||0==we.byteLength||null==Ae)throw new Ce(2,3,3018,n?n.S()[0]:null);var Pe=Ae/9e4*Se;p={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Se,duration:i,Eb:[],Ma:we,Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.g,baseMediaDecodeTime:Pe,Cb:Te},stream:t};break;case"mp3":for(var De,Ne=[],_e=null,Oe=c(u.yb()),Ue=Oe.next();!Ue.done;Ue=Oe.next()){var je=Ue.value,Be=je.data;if(Be){null==_e&&null!==je.pts&&(_e=je.pts);for(var Fe=0;Fe<Be.length;){var Ve=AA(Be,Fe);Ve?(De||(De=Ve),Fe+Ve.wa<=Be.length&&Ne.push({data:Be.subarray(Fe,Fe+Ve.wa),size:Ve.wa,duration:1152,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),Fe+=Ve.wa):Fe++}}}if(!De||null==_e)throw new Ce(2,3,3018,n?n.S()[0]:null);var Ge=De.sampleRate,He=_e/9e4*Ge;p={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Ge,duration:i,Eb:[],Ma:new Uint8Array([]),Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.g,baseMediaDecodeTime:He,Cb:Ne},stream:t};break;case"opus":var Ke=[],We=null,qe=u.F;if(!qe)throw new Ce(2,3,3018,n?n.S()[0]:null);var Xe=[];switch(qe.gk){case 1:case 2:Xe=[0];break;case 0:Xe=[255,1,1,0,1];break;case 128:Xe=[255,2,0,0,1];break;case 3:Xe=[1,2,1,0,2,1];break;case 4:Xe=[1,2,2,0,1,2,3];break;case 5:Xe=[1,3,2,0,4,1,2,3];break;case 6:Xe=[1,4,2,0,4,1,2,3,5];break;case 7:Xe=[1,4,2,0,4,1,2,3,5,6];break;case 8:Xe=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Xe=[1,1,2,0,1];break;case 131:Xe=[1,1,3,0,1,2];break;case 132:Xe=[1,1,4,0,1,2,3];break;case 133:Xe=[1,1,5,0,1,2,3,4];break;case 134:Xe=[1,1,6,0,1,2,3,4,5];break;case 135:Xe=[1,1,7,0,1,2,3,4,5,6];break;case 136:Xe=[1,1,8,0,1,2,3,4,5,6,7]}for(var Ye=new Uint8Array([0,qe.channelCount,0,0,qe.sampleRate>>>24&255,qe.sampleRate>>>17&255,qe.sampleRate>>>8&255,qe.sampleRate>>>0&255,0,0].concat(d(Xe))),Qe=qe.sampleRate,$e=c(u.yb()),Ze=$e.next();!Ze.done;Ze=$e.next()){var et=Ze.value,nt=et.data;null==We&&null!==et.pts&&(We=et.pts);for(var it=0;
1it<nt.length;){for(var rt=!!(16&nt[it+1]),at=!!(8&nt[it+1]),ot=it+2,st=0;255===nt[ot];)st+=255,ot+=1;st+=nt[ot],ot+=1,ot+=rt?2:0,ot+=at?2:0;var ut=nt.slice(ot,ot+st);Ke.push({data:ut,size:ut.byteLength,duration:960,xb:0,flags:{zb:0,sb:0,rb:0,ob:0,pb:2,Ab:0}}),it=ot+st}}if(0==Ye.byteLength||null==We)throw new Ce(2,3,3018,n?n.S()[0]:null);t.audioSamplingRate=qe.sampleRate,t.channelsCount=qe.channelCount;var lt=We/9e4*Qe;p={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Qe,duration:i,Eb:[],Ma:Ye,Wa:new Uint8Array([]),bb:0,eb:0,data:{Yb:this.g,baseMediaDecodeTime:lt,Cb:Ke},stream:t}}p&&(l.push(p),p=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!l.length)return Promise.reject(new Ce(2,3,3018,n?n.S()[0]:null));var ct=new To(l),dt=t.id+"_"+n.i;if(this.i.has(dt))var ht=this.i.get(dt);else ht=So(ct),this.i.set(dt,ht);var pt=this.l!==ht,ft=ko(ct);if(this.l=ht,this.g++,pt){var gt=Je(ht,ft);return Promise.resolve(gt)}return Promise.resolve(ft)},H("shaka.transmuxer.TsTransmuxer",_A),_A.prototype.transmux=_A.prototype.transmux,_A.prototype.getOriginalMimeType=_A.prototype.getOriginalMimeType,_A.prototype.convertCodecs=_A.prototype.convertCodecs,_A.prototype.isSupported=_A.prototype.isSupported,_A.prototype.destroy=_A.prototype.destroy;var OA,UA,jA=["aac","ac-3","ec-3","mp3","opus"],BA=["avc","hevc"];function FA(){}function VA(){}function GA(){OA||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OA=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=HA,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function HA(e,t){var n,i=this;return D(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),S(r,OA.call(i,e,t),2)):ZA(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OA,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=zA,r.return(zA.call(i,e,t)))})}function zA(e,t){var n,r,a,o,s,u,l,d,h,p,f,g,m=this;return D(function(v){if(1==v.g){for(console.assert(m==navigator,'bad "this" for requestMediaKeySystemAccess'),n=$A(e),r=[],a=c(t),o=a.next();!o.done;o=a.next())s=o.value,u=KA(s.videoCapabilities,n),l=KA(s.audioCapabilities,n),s.videoCapabilities&&s.videoCapabilities.length&&!u.length||s.audioCapabilities&&s.audioCapabilities.length&&!l.length||((d=i({},s)).videoCapabilities=u,d.audioCapabilities=l,r.push(d));if(!r.length)throw(h=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",h.code=DOMException.NOT_SUPPORTED_ERR,h;return S(v,OA.call(m,e,r),2)}return p=v.h,g=f=null,r[0]&&(r[0].videoCapabilities&&(f=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(g=r[0].audioCapabilities[0].encryptionScheme)),v.return(new QA(p,f,g))})}function KA(e,t){return e?e.filter(function(e){return eE(e.encryptionScheme,t)}):e}function WA(){}function qA(){UA||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(UA=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=XA,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function XA(e){var t,n,i=this;return D(function(r){switch(r.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),S(r,UA.call(i,e),2);case 2:if(!(t=r.h).supported||!e.keySystemConfiguration)return r.return(t);if((n=t.keySystemAccess)&&ZA(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=UA,r.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=YA,n){r.A(3);break}return S(r,JA(e),4);case 4:return t.keySystemAccess=r.h,r.return(t);case 3:return r.return(YA.call(i,e))}})}function YA(e){var t,n,i,r,a,o,s,u=this;return D(function(l){switch(l.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=t=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,r=i.keySystem,
1n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=$A(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},eE(n,a)&&eE(t,a))?S(l,UA.call(u,e),2):l.return(o);case 2:if((s=l.h).keySystemAccess){s.keySystemAccess=new QA(s.keySystemAccess,t,n),l.A(3);break}if(!e.keySystemConfiguration){l.A(3);break}return S(l,JA(e),5);case 5:s.keySystemAccess=l.h;case 3:return l.return(s)}})}function JA(e){var t,n;return D(function(i){if(1==i.g){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},a.length&&(r.audioCapabilities=a),o.length&&(r.videoCapabilities=o),t=r,S(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function QA(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function $A(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function ZA(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function eE(e,t){return!e||e==t||!("cbcs"!=e&&"cbcs-1-9"!=e||!(aE||uE||rE))}function tE(){}function nE(){GA(),qA()}yi("video/mp2t",function(){return new _A("video/mp2t")},Ai),v(FA,Yl),H("shaka.util.FairPlayUtils",FA),H("EmeEncryptionSchemePolyfill",VA),VA.install=GA,H("McEncryptionSchemePolyfill",WA),WA.install=qA,QA.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=c(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=c(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},QA.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},H("EncryptionSchemePolyfills",tE),tE.install=nE;var iE,rE=navigator.userAgent.includes("CrKey"),aE=100<=parseInt(navigator.userAgent.
1split("Firefox/").pop(),10),oE=navigator.userAgent||"";if(oE.includes("Web0S")){var sE=oE.match(/Chrome\/(\d+)/);iE=!!sE&&79<=parseInt(sE[1],10)}else iE=!1;var uE=iE;function lE(e,t){var n=this;this.parent=e,this.controls=t,this.eventManager=new xt,this.localization=this.controls.ra,this.player=this.controls.Sb(),this.video=this.controls.Jc(),this.adManager=this.player.mf(),this.ad=t.getAd(),this.eventManager.o(this.adManager,"ad-started",function(e){n.ad=e.ad}),this.eventManager.o(this.adManager,"ad-stopped",function(){n.ad=null})}function cE(e){return dE(e,"shaka-back-to-overflow-button")}function dE(e,t){return(e=e.getElementsByClassName(t)).length?e[0]:null}function hE(e){e&&(e=dE(e,"shaka-chosen-item"))&&e.parentElement.focus()}function pE(){var e=us("i");return e.classList.add("material-icons-round"),e.classList.add("shaka-chosen-item"),e.textContent="done",e.ariaHidden="true",e}function fE(e,t){e&&(t?e.classList.remove("shaka-hidden"):e.classList.add("shaka-hidden"))}function gE(e,t){var n=Math.floor(e/86400),i=Math.floor(e%86400/3600),r=Math.floor(e/60%60);return 10>(e=Math.floor(e%60))&&(e="0"+e),e=r+":"+e,t&&(10>r&&(e="0"+e),e=i+":"+e,0<n&&(10>i&&(e="0"+e),e=n+":"+e)),e}function mE(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-ad-info"),this.g.disabled=!0,this.parent.appendChild(this.g),this.h=new Ki(function(){if(n.ad.isLinear()){var e="",t=n.ad.getSequenceLength();1<t&&(e=n.ad.getPositionInSequence(),e=n.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(e)).replace("[NUM_ADS]",String(t)));var i=Math.round(n.ad.getRemainingTime()),r=n.ad.getDuration();-1==i||-1==r?(n.g.textContent=e,fE(n.g,""!=e)):0<i?(i=gE(r-i,!1)+" / "+gE(r,!1),e=1<t?e+"  "+i:n.localization.resolve("AD_TIME").replace("[AD_TIME]",i),n.g.textContent=e,fE(n.g,""!=e)):(n.h.stop(),n.g.textContent="")}}),this.eventManager.o(this.localization,"locale-updated",function(){}),this.eventManager.o(this.localization,"locale-changed",function(){}),this.eventManager.o(this.adManager,"ad-started",function(){n.h.Ka(),n.h.ya(.5)}),this.eventManager.o(this.adManager,"ad-stopped",function(){n.h.stop(),n.g.textContent=""}),this.ad&&(this.h.Ka(),this.h.ya(.5))}function vE(t,n){lE.call(this,t,n);var i=this;this.j=this.controls.g,this.h=this.controls.h,this.i=[],this.g=us("div"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("shaka-context-menu"),this.g.classList.add("shaka-hidden"),this.h.appendChild(this.g),this.eventManager.o(this.h,"contextmenu",function(e){if(i.g.classList.contains("shaka-hidden")){e.preventDefault();var t=i.h.getBoundingClientRect();i.g.style.left=e.clientX-t.left+"px",i.g.style.top=e.clientY-t.top+"px",fE(i.g,!0)}else fE(i.g,!1)}),this.eventManager.o(e,"click",function(){fE(i.g,!1)}),this.eventManager.o(this.g,"click",function(){fE(i.g,!1)}),function(e){for(var t=c(e.j.contextMenuElements),n=t.next();!n.done;n=t.next()){n=n.value;var i=bE.get(n);i?e.i.push(i.create(e.g,e.controls)):Y("Unrecognized context menu element:",n)}}(this)}function yE(e,t){bE.set(e,t)}void 0!==n&&n.exports&&(n.exports=tE),lE.prototype.release=function(){this.eventManager.release(),this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null},H("shaka.ui.Element",lE),lE.prototype.release=lE.prototype.release,v(mE,lE),mE.prototype.release=function(){this.h.stop(),this.h=null,lE.prototype.release.call(this)},H("shaka.ui.AdInfo",mE),v(vE,lE),vE.prototype.release=function(){this.h=null;for(var e=c(this.i),t=e.next();!t.done;t=e.next())t.value.release();this.i=[],lE.prototype.release.call(this)},vE.prototype.Gi=function(){fE(this.g,!1)},H("shaka.ui.ContextMenu",vE),vE.registerElement=yE,vE.prototype.closeMenu=vE.prototype.Gi;var bE=new Map;function TE(e,t){lE.call(this,e,t);var n=this;this.button=ls(),this.parent.appendChild(this.button),this.eventManager.o(this.localization,"locale-updated",function(){SE(n)}),this.eventManager.o(this.localization,"locale-changed",function(){SE(n)}),this.eventManager.o(this.video,"play",function(){SE(n),n.g()}),this.eventManager.o(this.video,"pause",function(){SE(n),n.g()}),this.eventManager.o(this.video,"seeking",function(){SE(n),n.g()}),this.eventManager.o(this.player,"loaded",function(){SE(n),n.g()}),this.eventManager.o(this.adManager,"ad-paused",function(){SE(n),n.g()}),this.eventManager.o(this.adManager,"ad-resumed",function(){SE(n),n.g()}),this.eventManager.o(this.adManager,"ad-started",function(){SE(n),n.g()}),this.eventManager.o(this.adManager,"ad-stopped",function(){SE(n),n.g()}),this.eventManager.o(this.button,"click",function(){n.controls.Ba()&&mx(n.controls)}),SE(this),this.g()}function SE(e){if(e.isEnded()&&e.video.duration)e.button.ariaLabel=e.localization.resolve("REPLAY");else{var t=e.isPaused()?"PLAY":"PAUSE";e.button.ariaLabel=e.localization.resolve(t)}}function wE(e,t){TE.call(this,e,t),this.button.classList.add("shaka-play-button"),this.button.classList.add("shaka-no-propagation")}function AE(e,t){lE.call(this,e,t);var n=this;this.s=null,this.j=this.C=!1,this.B=this.u=null,this.l=new Ki(function(){0===parseInt(n.h.textContent,10)&&Tx(n.controls,!0);var e=parseInt(n.h.textContent,10);0!==e&&(n.video.currentTime=n.controls.gh()+e),n.g.style.opacity="0",n.C=!1,n.h.textContent="0s"}),this.g=us("div"),this.g.classList.add("shaka-no-propagation"),this.parent.appendChild(this.g),this.h=us("span"),this.h.textContent="0s",this.g.appendChild(this.h),this.i=us("span"),this.i.classList.add("shaka-forward-rewind-container-icon"),this.g.appendChild(this.i),this.m=!1,this.eventManager.o(this.g,"touchstart",function(e){n.controls.Ba()&&(0<e.touches.length&&(n.u=e.touches[0].clientX,n.B=e.touches[0].clientY),n.j=!1)}),this.eventManager.o(this.g,"touchmove",function(e){if(0<e.touches.length&&null!=n.u&&null!=n.B){var t=e.touches[0].clientX-n.u;e=e.touches[0].clientY-n.B,10<Math.sqrt(t*t+e*e)&&(n.j=!0)}}),this.eventManager.o(this.g,"touchend",function(e){if(n.controls.Ba()&&!n.j)if(n.controls.Cc())e.preventDefault(),n.controls.Lc();else if(0<n.controls.g.tapSeekDistance)if(e.preventDefault(),e=n.controls.g.tapSeekDistance,n.C){if(n.s+500>Date.now()){n.l.stop(),n.s=Date.now();var t=parseInt(n.h.textContent,10);t=n.m?t-e:t+e,n.h.textContent=t.toString()+"s",n.g.style.opacity="1",n.l.X(.5)}}else n.C=!0,n.s=Date.now(),n.l.X(.5)})}function EE(e,t){AE.call(this,e,t),this.g.classList.add("shaka-fast-forward-container"),this.i.textContent="fast_forward",this.m=!1}function xE(e,t){AE.call(this,e,t),this.g.classList.add("shaka-rewind-container"),this.i.textContent="fast_rewind",this.m=!0}function kE(e,t,n,i){lE.call(this,e,t);var r=this;this.container=us("div"),this.container.classList.add("shaka-range-container"),this.container.classList.add.apply(this.container.classList,d(n)),this.i=!1,this.bar=document.createElement("input"),this.F=new Ki(function(){r.onChangeEnd(),r.i=!1}),this.bar.classList.add("shaka-range-element"),this.bar.classList.add.apply(this.bar.classList,d(i)),this.bar.type="range",this.bar.step="any",this.bar.min="0",this.bar.max="1",this.bar.value="0",this.bar.disabled=!this.controls.Ba(),this.container.appendChild(this.bar),this.parent.appendChild(this.container),this.K=new Ki(function(){r.bar.disabled=!1}),this.eventManager.o(this.controls,"showingui",function(){r.K.X(0)}),this.eventManager.o(this.controls,"hidingui",function(){r.K.stop(),r.bar.disabled=!0}),this.eventManager.o(this.bar,"mousedown",function(e){r.bar.disabled||(r.i=!0,r.onCh
1angeStart(),e.stopPropagation())}),this.eventManager.o(this.bar,"touchstart",function(e){r.bar.disabled||(r.i=!0,IE(r,e),r.onChangeStart(),e.stopPropagation())}),this.eventManager.o(this.bar,"input",function(){r.onChange()}),this.eventManager.o(this.bar,"touchmove",function(e){r.i&&(IE(r,e),r.onChange(),e.stopPropagation())}),this.eventManager.o(this.bar,"touchend",function(e){r.i&&(r.i=!1,IE(r,e),r.onChangeEnd(),e.stopPropagation())}),this.eventManager.o(this.bar,"touchcancel",function(e){r.i&&(r.i=!1,IE(r,e),r.onChangeEnd(),e.stopPropagation())}),this.eventManager.o(this.bar,"mouseup",function(e){r.i&&(r.i=!1,r.onChangeEnd(),e.stopPropagation())}),this.eventManager.o(this.bar,"blur",function(){r.i&&(r.i=!1,r.onChangeEnd())}),this.eventManager.o(this.bar,"contextmenu",function(e){e.preventDefault(),e.stopPropagation()})}function IE(e,t){t.preventDefault();var n=t.changedTouches[0],i=e.bar.getBoundingClientRect();t=parseFloat(e.bar.min);var r=parseFloat(e.bar.max);(n=t+(r-t)/i.width*(n.clientX-i.left))<t?n=t:n>r&&(n=r),e.bar.value=n}function CE(e,t){kE.call(this,e,t,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var n=this;this.D=us("div"),this.D.classList.add("shaka-ad-markers"),this.container.insertBefore(this.D,this.container.childNodes[0]),this.H=this.controls.g,this.u=new Ki(function(){var e=n.getValue();n.player.T()||e==n.video.duration&&(e-=.001),n.video.currentTime=e}),this.B=new Ki(function(){ME(n)}),this.L=!1,this.h=us("div"),this.h.id="shaka-player-ui-thumbnail-container",this.g=us("img"),this.g.id="shaka-player-ui-thumbnail-image",this.g.draggable=!1,this.J=us("div"),this.J.id="shaka-player-ui-thumbnail-time-container",this.G=us("div"),this.G.id="shaka-player-ui-thumbnail-time",this.J.appendChild(this.G),this.h.appendChild(this.g),this.h.appendChild(this.J),this.container.appendChild(this.h),this.j=us("div"),this.j.id="shaka-player-ui-time-container",this.container.appendChild(this.j),this.l=this.m=null,this.I=!1,this.s=new Ki(function(){_E(n)}),this.C=[],this.eventManager.o(this.bar,"input",function(){n.controls.Lc()}),this.eventManager.o(this.localization,"locale-updated",function(){return PE(n)}),this.eventManager.o(this.localization,"locale-changed",function(){return PE(n)}),this.eventManager.o(this.adManager,"ad-started",function(){RE(n)||fE(n.container,!1)}),this.eventManager.o(this.adManager,"ad-stopped",function(){RE(n)&&fE(n.container,!0)}),this.eventManager.o(this.adManager,"ad-cue-points-changed",function(e){n.C=e.cuepoints,LE(n)}),this.eventManager.o(this.player,"unloading",function(){n.C=[],LE(n),n.l&&(n.l.abort(),n.l=null),n.m=null,_E(n),OE(n)}),this.eventManager.o(this.bar,"mousemove",function(e){if(n.controls.Cc())OE(n),_E(n);else{var t=n.bar.getBoundingClientRect(),i=parseFloat(n.bar.min),r=parseFloat(n.bar.max);e=Math.max(0,e.clientX-t.left),t=Math.min(r,Math.round(i+(r-i)/t.width*e)),n.player.hh().length?(OE(n),NE(n,e,t)):(_E(n),DE(n,e,t))}}),this.eventManager.o(this.container,"mouseleave",function(){OE(n),n.s.stop(),n.s.X(.25)}),this.setValue(this.video.currentTime),this.update(),PE(this),this.ad&&fE(this.container,!1)}function ME(e){if(e.C.length){for(var t=e.player.xa(),n=t.end-t.start,i=["to right"],r=[],a=e.H.seekBarColors.adBreaks,o=!1,s=c(e.C),u=s.next();!u.done;u=s.next())if(-1!=(u=u.value).start||u.end){if(!u.end&&u.start>=t.start||"number"==typeof u.end&&u.end>t.start){var l=(Math.max(u.start,t.start)-t.start)/n||0,d=l+.01;u.end&&(d=(u.end-t.start)/n||0),r.push({start:l,end:d})}}else o=!0;for(n=(t=c(r=r.sort(function(e,t){return e.start-t.start}))).next();!n.done;n=t.next())n=n.value,i.push("transparent "+100*n.start+"%"),i.push(a+" "+100*n.start+"%"),i.push(a+" "+100*n.end+"%"),i.push("transparent "+100*n.end+"%");o&&(i.push("transparent 99%"),i.push(a+" 99%")),e.D.style.background="linear-gradient("+i.join(",")+")"}else e.D.style.background="transparent",e.B.stop()}function LE(e){function t(){ME(e);var t=e.player.xa();t=t.end-t.start,e.player.T()&&5<t&&e.B.ya(.25)}e.player.Y?t():e.eventManager.qa(e.player,"loaded",t)}function RE(e){var t=e.player.xa();return t=t.end-t.start,!(e.player.T()&&(5>t||!isFinite(t)))&&(null==e.ad||!e.ad.isLinear())}function PE(e){e.bar.ariaLabel=e.localization.resolve("SEEK")}function DE(e,t,n){var i=e.j.clientWidth;e.j.style.width="auto",e.j.style.height="20px",e.j.style.top="-30px",e.j.style.left=Math.min(e.bar.offsetWidth-i,Math.max(0,t-i/2))+"px",e.j.style.right="",e.j.style.visibility="visible",t=e.player.xa(),e.player.T()?1>(n=t.end-n)?(e.j.textContent=e.localization.resolve("LIVE"),e.j.style.left="",e.j.style.right="0px"):e.j.textContent="-"+UE(n):e.j.textContent=UE(n-t.start)}function NE(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y;D(function(b){switch(b.g){case 1:return 0>n&&(n=0),i=e.player.xa(),r=Math.max(Math.ceil(i.start),Math.min(Math.floor(i.end),n)),e.player.T()?(a=i.end-n,e.G.textContent=1>a?e.localization.resolve("LIVE"):"-"+UE(a)):e.G.textContent=UE(n),S(b,e.player.Si(null,r),2);case 2:if(!(o=b.h)||!o.uris||!o.uris.length)return _E(e),DE(e,t,n),b.return();if(o.width<o.height?e.h.classList.add("portrait-thumbnail"):e.h.classList.remove("portrait-thumbnail"),s=-10,u=e.h.clientWidth,l=Math.floor(9*u/16),e.h.style.height=l+"px",e.h.style.top=-(l-s)+"px",c=Math.min(e.bar.offsetWidth-u,Math.max(0,t-u/2)),e.h.style.left=c+"px",e.h.style.visibility="visible",d=o.uris[0].split("#xywh=")[0],e.m&&d===e.m.uris[0].split("#xywh=")[0]&&o.startByte==e.m.
1startByte&&o.endByte==e.m.endByte){b.A(3);break}if(e.m=o,e.l&&(e.l.abort(),e.l=null),"mjpg"!=o.codecs&&!d.startsWith("offline:")){b.A(4);break}return e.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',A(b,5),h=ta,p=yl(o.uris,o.startByte,o.endByte,e.player.getConfiguration().streaming.retryParameters),e.l=e.player.Ib().request(h,p,{type:1}),S(b,e.l.promise,7);case 7:f=b.h,e.l=null,"mjpg"==o.codecs?(new da).box("mdat",ma(function(e){d=URL.createObjectURL(new Blob([e],{type:"image/jpeg"}))})).parse(f.data,!1):(g=o.mimeType||"image/jpeg",m=new Blob([f.data],{type:g}),d=URL.createObjectURL(m)),x(b,4);break;case 5:if(7001==(v=k(b)).code)return b.return();throw v;case 4:try{e.h.removeChild(e.g)}catch(e){}e.g=us("img"),e.g.id="shaka-player-ui-thumbnail-image",e.g.draggable=!1,e.g.src=d,e.g.onload=function(){d.startsWith("blob:")&&URL.revokeObjectURL(d)},e.h.insertBefore(e.g,e.h.firstChild);case 3:y=u/o.width,o.imageHeight?e.g.height=o.imageHeight:o.sprite||(e.g.style.height="100%",e.g.style.objectFit="contain"),o.imageWidth?e.g.width=o.imageWidth:o.sprite||(e.g.style.width="100%",e.g.style.objectFit="contain"),e.g.style.left="-"+y*o.positionX+"px",e.g.style.top="-"+y*o.positionY+"px",e.g.style.transform="scale("+y+")",e.g.style.transformOrigin="left top",l=Math.floor(u*o.height/o.width),e.h.style.height=l+"px",e.h.style.top=-(l-s)+"px",w(b)}})}function _E(e){e.h.style.visibility="hidden"}function OE(e){e.j.style.visibility="hidden"}function UE(e){var t=Math.round(e);e=Math.floor(t/3600);var n=Math.floor((t-3600*e)/60);return 10>(t=t-3600*e-60*n)&&(t="0"+t),0<e?(10>n&&(n="0"+n),e+":"+n+":"+t):n+":"+t}function jE(){}function BE(e,t){lE.call(this,e,t);var n=this;this.j=us("div"),this.j.classList.add("shaka-skip-ad-container"),this.parent.appendChild(this.j),this.h=us("div"),this.h.classList.add("shaka-skip-ad-counter"),fE(this.h,!1),this.j.appendChild(this.h),this.g=ls(),this.g.classList.add("shaka-skip-ad-button"),this.g.disabled=!0,fE(this.g,!1),this.g.classList.add("shaka-no-propagation"),this.j.appendChild(this.g),FE(this),this.i=new Ki(function(){if(n.ad.isSkippable()){var e=Math.round(n.ad.getTimeUntilSkippable());0<e?n.h.textContent=e:(n.i.stop(),fE(n.h,!1))}else GE(n)}),this.eventManager.o(this.localization,"locale-updated",function(){FE(n)}),this.eventManager.o(this.localization,"locale-changed",function(){FE(n)}),this.eventManager.o(this.adManager,"ad-started",function(){VE(n)}),this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){n.ad.isSkippable()?n.ad.canSkipNow()&&(n.g.disabled=!1,n.i.stop(),fE(n.h,!1)):GE(n)}),this.eventManager.o(this.adManager,"ad-stopped",function(){GE(n)}),this.eventManager.o(this.g,"click",function(){n.ad.skip()}),this.ad&&VE(this)}function FE(e){e.g.textContent=e.localization.resolve("SKIP_AD")}function VE(e){e.ad.isSkippable()&&e.ad.needsSkipUI()&&(fE(e.g,!0),fE(e.h,!0),e.h.textContent="",e.i.Ka(),e.i.ya(.5))}function GE(e){e.i.stop(),e.g.disabled=!0,fE(e.g,!1),fE(e.h,!1)}function HE(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function zE(e,t,n){t=1/Math.tan(t/2),e[0]=t/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n=1/-99.9,e[10]=100.1*n,e[14]=20*n}function KE(e,t,n){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],c=t[7],d=t[8],h=t[9],p=t[10],f=t[11],g=t[12],m=t[13],v=t[14];t=t[15];var y=n[0],b=n[1],T=n[2],S=n[3];e[0]=y*i+b*s+T*d+S*g,e[1]=y*r+b*u+T*h+S*m,e[2]=y*a+b*l+T*p+S*v,e[3]=y*o+b*c+T*f+S*t,y=n[4],b=n[5],T=n[6],S=n[7],e[4]=y*i+b*s+T*d+S*g,e[5]=y*r+b*u+T*h+S*m,e[6]=y*a+b*l+T*p+S*v,e[7]=y*o+b*c+T*f+S*t,y=n[8],b=n[9],T=n[10],S=n[11],e[8]=y*i+b*s+T*d+S*g,e[9]=y*r+b*u+T*h+S*m,e[10]=y*a+b*l+T*p+S*v,e[11]=y*o+b*c+T*f+S*t,y=n[12],b=n[13],T=n[14],S=n[15],e[12]=y*i+b*s+T*d+S*g,e[13]=y*r+b*u+T*h+S*m,e[14]=y*a+b*l+T*p+S*v,e[15]=y*o+b*c+T*f+S*t}function WE(e,t){var n=new Float32Array(3),i=t[0],r=t[1],a=t[2],o=t[4],s=t[5],u=t[6],l=t[8],c=t[9],d=t[10];n[0]=Math.sqrt(i*i+r*r+a*a),n[1]=Math.sqrt(o*o+s*s+u*u),n[2]=Math.sqrt(l*l+c*c+d*d),u=1/n[0],l=1/n[1],c=1/n[2],o=t[0]*u,n=t[1]*l,i=t[2]*c,r=t[4]*u,s=t[5]*l,a=t[6]*c,u*=t[8],l*=t[9],0<(c=o+s+(t=t[10]*c))?(t=2*Math.sqrt(c+1),e[3]=.25*t,e[0]=(a-l)/t,e[1]=(u-i)/t,e[2]=(n-r)/t):o>s&&o>t?(t=2*Math.sqrt(1+o-s-t),e[3]=(a-l)/t,e[0]=.25*t,e[1]=(n+r)/t,e[2]=(u+i)/t):s>t?(t=2*Math.sqrt(1+s-o-t),e[3]=(u-i)/t,e[0]=(n+r)/t,e[1]=.25*t,e[2]=(a+l)/t):(t=2*Math.sqrt(1+t-o-s),e[3]=(n-r)/t,e[0]=(u+i)/t,e[1]=(a+l)/t,e[2]=.25*t)}function qE(e,t){var n=t[0],i=t[1],r=t[2],a=n+n,o=i+i,s=r+r;n*=a;var u=i*a;i*=o;var l=r*a,c=r*o;r*=s,a*=t=t[3],o*=t,t*=s,e[0]=1-i-r,e[1]=u+t,e[2]=l-o,e[3]=0,e[4]=u-t,e[5]=1-n-r,e[6]=c+a,e[7]=0,e[8]=l+o,e[9]=c-a,e[10]=1-n-i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1}function XE(){var e=new Float32Array(4);return e[3]=1,e}function YE(e){var t=[],n=[],i=[],r=Math.PI;e=void 0!==e&&e?r/2:r;
1for(var a=0;100>=a;a++){var o=a*r/100,s=Math.sin(o);o=Math.cos(o);for(var u=0;100>=u;u++){var l=2*u*e/100;t.push(Math.sin(l)*s,o,Math.cos(l)*s),n.push(u/100,a/100)}}for(r=0;100>r;r++)for(e=0;100>e;e++)s=(a=101*r+e)+101,i.push(a,s,a+1),i.push(s,s+1,a+1);return{Wj:t,Tj:n,indices:i}}function JE(e,t,n,i,r){this.i=e,this.oa=t,this.s=n,this.g=i,this.u=new xt,this.L=XE(),this.h=XE(),this.ba=this.na=this.$=this.l=null,this.D=HE(),this.I=HE(),this.N=HE(),this.Y=HE(),this.C=null,this.O=!1,this.J=this.B=null,this.ra=this.sa=0,this.Z=this.P=this.R=this.K=null,this.H=this.G=0,this.j=75,this.U=0,this.m=r,this.F=-1,function(e){(function(e){var t=e.D,n=[0,0,0],i=[1,0,0],r=[0,1,0],a=n[0],o=n[1];n=n[2];var s=r[0],u=r[1],l=r[2],c=i[0];r=i[1];var d=i[2];if(1e-6>Math.abs(a-c)&&1e-6>Math.abs(o-r)&&1e-6>Math.abs(n-d))for(a=0;16>a;a++)t[a]=0==a%5?1:0;else{i=a-c,r=o-r,c=n-d;var h=1/Math.sqrt(i*i+r*r+c*c);d=u*(c*=h)-l*(r*=h),l=l*(i*=h)-s*c,s=s*r-u*i,(h=Math.sqrt(d*d+l*l+s*s))?(d*=h=1/h,l*=h,s*=h):s=l=d=0,u=r*s-c*l;var p=c*d-i*s,f=i*l-r*d;(h=Math.sqrt(u*u+p*p+f*f))?(u*=h=1/h,p*=h,f*=h):f=p=u=0,t[0]=d,t[1]=u,t[2]=i,t[3]=0,t[4]=l,t[5]=p,t[6]=r,t[7]=0,t[8]=s,t[9]=f,t[10]=c,t[11]=0,t[12]=-(d*a+l*o+s*n),t[13]=-(u*a+p*o+f*n),t[14]=-(i*a+r*o+c*n),t[15]=1}WE(e.L,e.D),e=t=e.Y,n=[4,4,4],a=n[0],o=n[1],n=n[2],t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]})(e),function(e){ZE(e),e.g.viewport(0,0,e.g.drawingBufferWidth,e.g.drawingBufferHeight),e.g.clearColor(0,0,0,1),e.g.enable(e.g.CULL_FACE),e.g.cullFace(e.g.FRONT),e.g.clear(e.g.COLOR_BUFFER_BIT)}(e),function(e){var t=QE(e,e.g.VERTEX_SHADER),n=QE(e,e.g.FRAGMENT_SHADER);e.l=e.g.createProgram(),e.g.attachShader(e.l,t),e.g.attachShader(e.l,n),e.g.linkProgram(e.l),"cubemap"==e.m?(e.R=e.g.getAttribLocation(e.l,"aVertexPosition"),e.P=e.g.getAttribLocation(e.l,"aTextureCoord")):(e.R=e.g.getAttribLocation(e.l,"a_vPosition"),e.g.enableVertexAttribArray(e.R),e.P=e.g.getAttribLocation(e.l,"a_TexCoordinate"),e.g.enableVertexAttribArray(e.P))}(e),function(e){e.K="cubemap"==e.m?{Wj:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Tj:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:"halfequirectangular"==e.m?YE(!0):YE(),e.$=e.g.createBuffer(),e.g.bindBuffer(e.g.ARRAY_BUFFER,e.$),e.g.bufferData(e.g.ARRAY_BUFFER,new Float32Array(e.K.Wj),e.g.STATIC_DRAW),e.na=e.g.createBuffer(),e.g.bindBuffer(e.g.ARRAY_BUFFER,e.na),e.g.bufferData(e.g.ARRAY_BUFFER,new Float32Array(e.K.Tj),e.g.STATIC_DRAW),e.ba=e.g.createBuffer(),e.g.bindBuffer(e.g.ELEMENT_ARRAY_BUFFER,e.ba),e.g.bufferData(e.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(e.K.indices),e.g.STATIC_DRAW)}(e),function(e){e.Z=e.g.createTexture(),e.g.bindTexture(e.g.TEXTURE_2D,e.Z),e.g.texParameteri(e.g.TEXTURE_2D,e.g.TEXTURE_WRAP_S,e.g.CLAMP_TO_EDGE),e.g.texParameteri(e.g.TEXTURE_2D,e.g.TEXTURE_WRAP_T,e.g.CLAMP_TO_EDGE),e.g.texParameteri(e.g.TEXTURE_2D,e.g.TEXTURE_MIN_FILTER,e.g.NEAREST),e.g.texParameteri(e.g.TEXTURE_2D,e.g.TEXTURE_MAG_FILTER,e.g.NEAREST)}(e),ku(e.i,HTMLMediaElement.HAVE_CURRENT_DATA,e.u,function(){if(e.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&$E(e),"requestVideoFrameCallback"in e.i){var t=function(){-1!=e.F&&($E(e),-1!=e.F&&(e.F=e.i.requestVideoFrameCallback(t)))};e.F=e.i.requestVideoFrameCallback(t)}else{var n;e.u.o(e.i,"canplaythrough",function(){$E(e)}),e.u.o(e.i,"playing",function(){if(e.B&&e.B.stop(),!n)for(var t=e.oa.qb(),i=(t=c(t)).next();!i.done;i=t.next())(i=i.value.frameRate)&&(!n||n<i)&&(n=i);n||(n=60),$E(e),e.B=new Ki(function(){$E(e)}).Ka().ya(1/n)}),e.u.o(e.i,"pause",function(){e.B&&e.B.stop(),e.B=null,$E(e)}),e.u.o(e.i,"seeked",function(){$E(e)}),e.u.o(document,"visibilitychange",function(){$E(e)})}})}(this)}function QE(e,t){switch(t){case e.g.VERTEX_SHADER:var n="cubemap"==e.m?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n  gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n  vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";break;case e.g.FRAGMENT_SHADER:n="cubemap"==e.m?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;
1\nvoid main(void) {\n  highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n  gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n      (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n      texture2D(uSampler, tc);\n  gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";break;default:return null}return t=e.g.createShader(t),e.g.shaderSource(t,n),e.g.compileShader(t),t}function $E(e,t){t=void 0===t||t;var n=e.oa.m==Rh;!e.i||2>e.i.readyState||!n&&0==e.i.playbackRate||(zE(e.I,e.j*Math.PI/180,1.5625),"cubemap"==e.m?zE(e.I,e.j*Math.PI/180,2.5):zE(e.I,e.j*Math.PI/180,1.5625),e.g.useProgram(e.l),e.g.clear(e.g.COLOR_BUFFER_BIT),ZE(e),t&&(e.g.activeTexture(e.g.TEXTURE0),e.g.bindTexture(e.g.TEXTURE_2D,e.Z),e.g.pixelStorei(e.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),e.g.texImage2D(e.g.TEXTURE_2D,0,e.g.RGBA,e.g.RGBA,e.g.UNSIGNED_BYTE,e.i)),"equirectangular"!=e.m&&"halfequirectangular"!=e.m||(KE(e.N,e.D,e.Y),KE(e.N,e.I,e.N)),e.g.bindBuffer(e.g.ARRAY_BUFFER,e.$),e.g.vertexAttribPointer(e.R,3,e.g.FLOAT,!1,0,0),e.g.enableVertexAttribArray(e.R),e.g.bindBuffer(e.g.ARRAY_BUFFER,e.na),e.g.vertexAttribPointer(e.P,2,e.g.FLOAT,!1,0,0),e.g.enableVertexAttribArray(e.P),e.g.bindBuffer(e.g.ELEMENT_ARRAY_BUFFER,e.ba),"cubemap"==e.m?(e.g.uniformMatrix4fv(e.g.getUniformLocation(e.l,"uProjectionMatrix"),!1,e.I),e.g.uniformMatrix4fv(e.g.getUniformLocation(e.l,"uModelViewMatrix"),!1,e.N)):e.g.uniformMatrix4fv(e.g.getUniformLocation(e.l,"u_VPMatrix"),!1,e.N),e.g.uniform1i(e.g.getUniformLocation(e.l,"uSampler"),0),e.O&&e.g.viewport(0,0,e.s.width/2,e.s.height),e.g.drawElements(e.g.TRIANGLES,e.K.indices.length,e.g.UNSIGNED_SHORT,0),e.O&&(e.g.viewport(e.s.width/2,0,e.s.width/2,e.s.height),e.g.drawElements(e.g.TRIANGLES,e.K.indices.length,e.g.UNSIGNED_SHORT,0)))}function ZE(e){var t=e.i.videoWidth;t||(t=e.s.scrollWidth);var n=e.i.videoHeight;if(n||(n=e.s.scrollHeight),e.sa!==t||e.ra!==n){e.s.width=t,e.s.height=n,e.sa=t,e.ra=n;var i=t/n,r=e.I,a=-i,o=1/(i-a);r[0]=0*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=0,r[6]=0,r[7]=0,r[8]=(i+a)*o,r[9]=0,r[10]=-1,r[11]=-1,r[12]=0,r[13]=0,r[14]=-0,r[15]=0,e.I=r,e.g.viewport(0,0,t,n)}}function ex(e,t,n,i){var r=1/0,a=90*Math.PI/180;"halfequirectangular"==e.m&&(r=90*Math.PI/180,a/=2);var o="cubemap"==e.m?e.N:e.D;if(e.G+=t,e.H+=n,e.G<r&&e.G>-r){r=Math.sin(t),t=Math.cos(t);var s=o[0],u=o[1],l=o[2],c=o[3],d=o[8],h=o[9],p=o[10],f=o[11];o!=o&&(o[4]=o[4],o[5]=o[5],o[6]=o[6],o[7]=o[7],o[12]=o[12],o[13]=o[13],o[14]=o[14],o[15]=o[15]),o[0]=s*t-d*r,o[1]=u*t-h*r,o[2]=l*t-p*r,o[3]=c*t-f*r,o[8]=s*r+d*t,o[9]=u*r+h*t,o[10]=l*r+p*t,o[11]=c*r+f*t}else e.G-=t;e.H<a&&e.H>-a?(a=HE(),r=HE(),t=-1*n,n=Math.sin(t),t=Math.cos(t),s=r[4],u=r[5],l=r[6],c=r[7],d=r[8],h=r[9],p=r[10],f=r[11],r!==a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3],a[12]=r[12],a[13]=r[13],a[14]=r[14],a[15]=r[15]),a[4]=s*t+d*n,a[5]=u*t+h*n,a[6]=l*t+p*n,a[7]=c*t+f*n,a[8]=d*t-s*n,a[9]=h*t-u*n,a[10]=p*t-l*n,a[11]=f*t-c*n,KE(o,a,o)):e.H-=n,n=HE(),a=HE(),r=Math.sin(i),i=Math.cos(i),t=a[0],s=a[1],u=a[2],l=a[3],c=a[4],d=a[5],h=a[6],p=a[7],a!==n&&(n[8]=a[8],n[9]=a[9],n[10]=a[10],n[11]=a[11],n[12]=a[12],n[13]=a[13],n[14]=a[14],n[15]=a[15]),n[0]=t*i+c*r,n[1]=s*i+d*r,n[2]=u*i+h*r,n[3]=l*i+p*r,n[4]=c*i-t*r,n[5]=d*i-s*r,n[6]=h*i-u*r,n[7]=p*i-l*r,KE(o,n,o),$E(e,!1)}function tx(e,t){(void 0===t||t)&&(WE(e.h,e.D),e.U=0,e.C=XE(),e.C[0]=(e.h[0]-e.L[0])/20,e.C[1]=(e.h[1]-e.L[1])/20,e.C[2]=(e.h[2]-e.L[2])/20,e.C[3]=(e.h[3]-e.L[3])/20),e.h[0]-=e.C[0],e.h[1]-=e.C[1],e.h[2]-=e.C[2],e.h[3]-=e.C[3],t=HE(),function(e,t){var n=t[0],i=t[1],r=t[2],a=n*n+i*i+r*r+(t=t[3])*t;0<a&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=i*a,e[2]=r*a,e[3]=t*a}(e.h,e.h),qE(t,e.h),e.D=t,e.J&&(e.J.stop(),e.J=null),20>e.U?e.J=new Ki(function(){tx(e,!1),e.G=0,e.H=0,e.U++,$E(e,!1)}).X(.025):(qE(t,e.L),e.D=t)}function nx(e,t,n,i,r){ee.call(this);var a=this;this.i=e,this.l=t,this.F=n,this.J=i,this.u=r,this.s=new xt,this.h=new xt,this.B=ax(this.l),this.g=null,this.m=!1,this.I=this.H=this.G=this.D=this.C=0,this.j=null,this.s.o(i,"loading",function(){a.g&&tx(a.g),ix(a)}),this.s.o(i,"spatialvideoinfo",function(e){switch((e=e.detail).projection){case"re
1ct":default:a.j=null;break;case"equi":a.j="equirectangular";break;case"hequ":switch(e.hfov){case 360:a.j="equirectangular";break;case 180:a.j="halfequirectangular";break;default:null==e.hfov?a.j="halfequirectangular":a.j=null}break;case"fish":a.j="halfequirectangular"}ix(a)}),this.s.o(i,"nospatialvideoinfo",function(){a.j=null,ix(a)}),this.s.o(i,"unloading",function(){a.j=null,ix(a)}),ix(this)}function ix(e){if(e.u.displayInVrMode||e.j){e.l||(e.l=document.createElement("canvas"),e.l.classList.add("shaka-vr-canvas-container"),e.F.parentElement.insertBefore(e.l,e.F.nextElementSibling),e.B=ax(e.l));var t=e.j||e.u.defaultVrProjectionMode;e.g?e.g.m!=t&&(e.h.Sa(),e.g.release(),rx(e,t)):(e.l.style.display="",rx(e,t),e.dispatchEvent(new z("vrstatuschanged",(new Map).set("newStatus",e.Tb()))))}else!e.u.displayInVrMode&&!e.j&&e.l&&e.g&&(e.l.style.display="none",e.h.Sa(),e.g.release(),e.g=null,e.dispatchEvent(new z("vrstatuschanged",(new Map).set("newStatus",e.Tb()))))}function rx(t,n){t.B&&t.l&&(t.g=new JE(t.F,t.J,t.l,t.B,n),function(t){t.h.o(t.i,"mousedown",function(e){if(!t.m){var n=e.clientX;e=e.clientY,t.m=!0,t.C=n,t.D=e}}),0<navigator.maxTouchPoints&&t.h.o(t.i,"touchstart",function(e){if(!t.m){var n=e.touches[0].clientX;e=e.touches[0].clientY,t.m=!0,t.C=n,t.D=e}}),t.h.o(t.i,"wheel",function(e){if(!t.m){var n=t.g,i=e.deltaY;i/=50,20<=n.j&&100>=n.j&&(n.j+=i),20>n.j?n.j=20:100<n.j&&(n.j=100),$E(n,!1),e.preventDefault(),e.stopPropagation()}}),t.h.o(t.i,"mousemove",function(e){t.m&&sx(t,e.clientX,e.clientY)}),0<navigator.maxTouchPoints&&t.h.o(t.i,"touchmove",function(e){t.m&&sx(t,e.touches[0].clientX,e.touches[0].clientY),e.preventDefault()}),t.h.o(t.i,"mouseleave",function(){t.m=!1}),t.h.o(t.i,"mouseup",function(){t.m=!1}),0<navigator.maxTouchPoints&&t.h.o(t.i,"touchend",function(){t.m=!1});var n=!1;if(e.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var i=function(){DeviceMotionEvent.requestPermission().then(function(e){"granted"!==e||n||(n=!0,ox(t))})};DeviceMotionEvent.requestPermission().then(function(e){t.h.Da(t.i,"click",i),t.h.Da(t.i,"mouseup",i),0<navigator.maxTouchPoints&&t.h.Da(t.i,"touchend",i),"granted"!==e?(t.h.qa(t.i,"click",i),t.h.qa(t.i,"mouseup",i),0<navigator.maxTouchPoints&&t.h.qa(t.i,"touchend",i)):(n=!0,ox(t))}).catch(function(){t.h.Da(t.i,"click",i),t.h.Da(t.i,"mouseup",i),0<navigator.maxTouchPoints&&t.h.Da(t.i,"touchend",i),t.h.qa(t.i,"click",i),t.h.qa(t.i,"mouseup",i),0<navigator.maxTouchPoints&&t.h.qa(t.i,"touchend",i)})}else n=!0,ox(t)}(t))}function ax(e){if(!e)return null;var t=Re().Ja();if("TV"==t||"CONSOLE"==t||"CAST"==t)return null;for(var n=(t=c(["webgl2","webgl"])).next();!n.done;n=t.next())if(n=e.getContext(n.value))return n;return null}function ox(t){t.h.o(e,"deviceorientation",function(e){if(t.g){var n=(e.alpha||0)-t.G,i=(e.beta||0)-t.H,r=(e.gamma||0)-t.I;(10<Math.abs(n)||10<Math.abs(i)||5<Math.abs(r))&&(i=r=n=0),t.G=e.alpha||0,t.H=e.beta||0,t.I=e.gamma||0,e=screen.orientation.angle,ex(t.g,n*ux*-1,90==e||-90==e?r*ux*-1:i*ux,0)}})}function sx(e,t,n){var i=-.6*Math.PI/180;ex(e.g,(t-e.C)*i,-1*(n-e.D)*i,0),e.C=t,e.D=n}v(TE,lE),TE.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var e=this.ad.isPaused();else e=(e=this.controls).B.paused&&!e.R;return e},TE.prototype.isEnded=function(){return(!this.ad||!this.ad.isLinear())&&(!this.player||this.player.isEnded())},TE.prototype.g=function(){this.isEnded()&&this.video.duration?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"},H("shaka.ui.PlayButton",TE),v(wE,TE),wE.prototype.g=function(){this.isEnded()?this.button.setAttribute("icon","replay"):this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")},H("shaka.ui.BigPlayButton",wE),v(AE,lE),H("shaka.ui.HiddenSeekButton",AE),v(EE,AE),H("shaka.ui.HiddenFastForwardButton",EE),v(xE,AE),H("shaka.ui.HiddenRewindButton",xE),v(kE,lE),(r=kE.prototype).release=function(){this.F&&(this.F.stop(),this.F=null),lE.prototype.release.call(this)},r.setRange=function(e,t){this.bar.min=e,this.bar.max=t}
1,r.onChangeStart=function(){},r.onChange=function(){},r.onChangeEnd=function(){},r.changeTo=function(e){this.i||(this.i=!0,this.onChangeStart());var t=parseFloat(this.bar.min),n=parseFloat(this.bar.max);this.bar.value=e>n?n:e<t?t:e,this.onChange(),this.F.X(.5)},r.getValue=function(){return parseFloat(this.bar.value)},r.setValue=function(e){this.i||(this.bar.value=e)},H("shaka.ui.RangeElement",kE),kE.prototype.setValue=kE.prototype.setValue,kE.prototype.getValue=kE.prototype.getValue,kE.prototype.changeTo=kE.prototype.changeTo,kE.prototype.onChangeEnd=kE.prototype.onChangeEnd,kE.prototype.onChange=kE.prototype.onChange,kE.prototype.onChangeStart=kE.prototype.onChangeStart,kE.prototype.setRange=kE.prototype.setRange,v(CE,kE),(r=CE.prototype).release=function(){this.u&&(this.u.stop(),this.u=null,this.B.stop(),this.B=null),kE.prototype.release.call(this)},r.onChangeStart=function(){this.L=!this.video.paused,this.controls.Yh(!0),this.video.pause(),this.s.stop(),this.I=!0},r.onChange=function(){if(this.video.duration)if(this.update(),this.u.X(.125),this.player.hh().length&&!this.controls.Cc()){var e=parseFloat(this.bar.min),t=parseFloat(this.bar.max),n=this.bar.getBoundingClientRect(),i=Math.round(this.getValue());NE(this,(i-e)/((t-e)/n.width),i)}else _E(this)},r.onChangeEnd=function(){this.u.Ka(),this.controls.Yh(!1),this.L&&this.video.play(),this.I&&(this.I=!1,this.s.stop(),this.s.X(.25))},r.isShowing=function(){return!this.container.classList.contains("shaka-hidden")},r.update=function(){var e=this.H.seekBarColors,t=this.getValue(),n=this.video.buffered.length,i=n?this.video.buffered.start(0):0,r=n?this.video.buffered.end(n-1):0,a=(n=this.player.xa()).end-n.start;this.setRange(n.start,n.end),RE(this)?(fE(this.container,!0),i=(Math.max(i,n.start)-n.start)/a||0,r=(Math.min(r,n.end)-n.start)/a||0,t=(Math.min(Math.max(t,n.start),n.end)-n.start)/a||0,this.container.style.background="linear-gradient("+["to right",(this.H.showUnbufferedStart?e.base:e.played)+" "+100*i+"%",e.played+" "+100*i+"%",e.played+" "+100*t+"%",e.buffered+" "+100*t+"%",e.buffered+" "+100*r+"%",e.base+" "+100*r+"%"].join()+")"):fE(this.container,!1)},H("shaka.ui.SeekBar",CE),jE.prototype.create=function(e,t){return new CE(e,t)},CE.Factory=jE,v(BE,lE),BE.prototype.release=function(){this.i.stop(),this.i=null,lE.prototype.release.call(this)},H("shaka.ui.SkipAdButton",BE),JE.prototype.release=function(){-1!=this.F&&(this.i.cancelVideoFrameCallback(this.F),this.F=-1),this.u&&(this.u.release(),this.u=null),this.B&&(this.B.stop(),this.B=null),this.J&&(this.J.stop(),this.J=null)},JE.prototype.Qd=function(){(this.O=!this.O)||this.g.viewport(0,0,this.s.width,this.s.height),$E(this,!1)},v(nx,ee),(r=nx.prototype).release=function(){this.s&&(this.s.release(),this.s=null),this.h&&(this.h.release(),this.h=null),this.g&&(this.g.release(),this.g=null),ee.prototype.release.call(this)},r.configure=function(e){this.u=e,ix(this)},r.Eg=function(){return this.l?!!this.B:!!ax(document.createElement("canvas"))},r.Tb=function(){return!!this.g},r.Qd=function(){this.g?this.g.Qd():Y("Not playing VR content")},r.qh=function(e){this.g?ex(this.g,e*ux,0,0):Y("Not playing VR content")},r.oh=function(e){this.g?ex(this.g,0,e*ux,0):Y("Not playing VR content")},r.ph=function(e){this.g?ex(this.g,0,0,e*ux):Y("Not playing VR content")};var ux=Math.PI/180;function lx(t,n,i,r,a){ee.call(this);var o=this;this.Y=!0,this.g=a,this.D=new Jp(i,t,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible),this.oa=!0,this.B=this.D.Jc(),this.m=i,this.u=this.D.Sb(),this.Z=t,this.l=n,this.Lb=r,this.na=this.u.mf(),this.s=this.j=null,this.R=!1,this.I=[],this.Ta=[],this.Na=!1,this.J=new Ki(function(){o.l.classList.add("no-cursor"),o.Na=!1,bx(o)}),this.$=new Ki(function(){o.h.removeAttribute("shown"),Ax(o),yx(o),o.U&&o.U.Gi(),o.N.X(o.g.closeMenusDelay)}),this.N=new Ki(function(){for(var e=c(o.I),t=e.next();!t.done;t=e.next())fE(t.value,!1);o.g.enableTooltips&&o.F.classList.add("shaka-tooltips-on")}),this.sa=new Ki(function(){o.Ba()&&xx(o)}),this.O=null,this.H=[],this.ra=function(){var e=new yt("en");return e.Va("ar",new Map([["AD_DURATION","مدة الإعلان"],["AD_PROGRESS","الإعلان [AD_ON] من [NUM_ADS]"],["AD_STATISTICS","إحصاءات الإعلانات"],["AD_TIME","الإعلان: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","تلقائي"],["BACK","رجوع"],["CAPTIONS","الترجمة والشرح"],["CAST","إرØ
1³Ø§Ù„..."],["CHAPTERS","الفصول"],["DOWNLOAD_VIDEO_FRAME","حفظ إطار الفيديو"],["ENTER_LOOP_MODE","تكرار الفيديو الحالي"],["ENTER_PICTURE_IN_PICTURE",'الدخول في وضع "نافذة ضمن نافذة"'],["EXIT_FULL_SCREEN","إنهاء وضع ملء الشاشة"],["EXIT_LOOP_MODE","إيقاف تكرار الفيديو الحالي"],["EXIT_PICTURE_IN_PICTURE",'الخروج من وضع "نافذة ضمن نافذة"'],["FAST_FORWARD","تقديم سريع"],["FULL_SCREEN","ملء الشاشة"],["LANGUAGE","اللغة"],["LIVE","مباشر"],["LOOP","تكرار"],["MORE_SETTINGS","مزيد من الإعدادات"],["MULTIPLE_LANGUAGES","لغات متعددة"],["MUTE","كتم الصوت"],["NOT_APPLICABLE","غير سارٍ"],["OFF","إيقاف"],["ON","تشغيل"],["PAUSE","إيقاف مؤقت"],["PICTURE_IN_PICTURE","نافذة ضمن النافذة"],["PLAY","التشغيل"],["PLAYBACK_RATE","سرعة التشغيل"],["QUALITY","الجودة"],["RECENTER_VR","إعادة التوسيط"],["REPLAY","إعادة التشغيل"],["RESOLUTION","درجة الدقة"],["REWIND","ترجيع"],["SEEK","البحث بالتمرير"],["SKIP_AD","تخطّي الإعلان"],["SKIP_TO_LIVE","الانتقال إلى بث مباشر"],["STATISTICS","الإحصاءات"],["SUBTITLE_FORCED","عرض إجباري"],["SURROUND","صوت محيطي"],["TOGGLE_STEREOSCOPIC","إيقاف العرض المجسّم أو تفعيله"],["UNDETERMINED_LANGUAGE","غير محدد"],["UNMUTE","إعادة الصوت"],["UNRECOGNIZED_LANGUAGE","غير معروف"],["VOLUME","مستوى الصوت"]])),e.Va("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung [AD_ON] von [NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zurück"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME","Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Sc
1hleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE","Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualität"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Auflösung"],["REWIND","Zurückspulen"],["SEEK","Suche"],["SKIP_AD","Überspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Einstellung „stereoskopisch“ ein‑/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautstärke"]])),e.Va("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_NEXT","Next"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]])),e.Va("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognised"],["VOLUME","volume"]])),e.Va("es",new Map([["AD_DURATION","Duración del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estadísticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automático"],["BACK","Atrás"],["CAPTIONS","Subtítulos"],["CAST","Enviar..."],["CHAPTERS","Capítulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el vídeo actual"],["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el vídeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar rápidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","Más ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducción"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resolución"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_NEXT","Siguiente"],["SKIP_TO_LIVE","Ir al vídeo en directo"],["STATISTICS","Estadísticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC","Activar/Desactivar estereoscópica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]])),e.Va("es-419",new Map([["AD_DURATION","Duración del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estadísticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automático"],["BACK","Atrás"],["CAPTIONS","Subtítulos"],["CAST","Transmitir..."],["CHAPTERS","Capítulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetición indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","Más opciones de configuración"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducción"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resolución"],["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisión en vivo"],["STATISTICS","Estadísticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereoscópico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]])),e.Va("fr",new Map([["AD_DURATION","Durée de l'annonce"],["AD_PROGRESS","Annonce [AD_ON] sur
1 [NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce : [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster…"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","Télécharger l'image de la vidéo"],["ENTER_LOOP_MODE","Lire en boucle la vidéo en cours"],["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein écran"],["EXIT_LOOP_MODE","Arrêter la lecture en boucle de la vidéo en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein écran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","Répéter"],["MORE_SETTINGS","Plus de paramètres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","Désactivée"],["ON","Activée"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualité"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","Résolution"],["REWIND","Retour arrière"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_NEXT","Suivante"],["SKIP_TO_LIVE","Accéder à la partie la plus récente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forcé"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/Désactiver le mode stéréoscopique"],["UNDETERMINED_LANGUAGE","Langue indéterminée"],["UNMUTE","Réactiver le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]])),e.Va("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS","Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME","Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE","Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES","Più lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocità di riproduzione"],["QUALITY","Qualità"],["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS","Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]])),e.Va("ja",new Map([["AD_DURATION","広告再生時間"],["AD_PROGRESS","[AD_ON] 番目の広告(全 [NUM_ADS] 個)"],["AD_STATISTICS","広告の統計情報"],["AD_TIME","広告: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","自動"],["BACK","戻る"],["CAPTIONS","字幕"],["CAST","キャスト..."],["CHAPTERS","ç« "],["DOWNLOAD_VIDEO_FRAME","動画フレームを保存"],["ENTER_LOOP_MODE","現在の動画をループ再生"],["ENTER_PICTURE_IN_PICTURE","ピクチャー イン ピクチャーを開始"],["EXIT_FULL_SCREEN","全画面表示を終了"],["EXIT_LOOP_MODE","現在の動画のループ再生を停止"],["EXIT_PICTURE_IN_PICTURE","ピクチャー イン ピクチャーを終了"],["FAST_FORWARD","早送り"],["FULL_SCREEN","全画面表示"],["LANGUAGE","言語"],["LIVE","ライブ"],["LOOP","ループ"],["MORE_SETTINGS","詳細設定"],["MULTIPLE_LANGUAGES","多言語"],["MUTE","ミュート"],["NOT_APPLICABLE","該当なし"],["OFF","オフ"],["ON","オン"],["PAUSE","一時停止"],["PICTURE_IN_PICTURE","ピクチャー イン ピクチャー"],["PLAY","再生"],["PLAYBACK_RATE","再生速度"],["QUALITY","品質"],["RECENTER_VR","中心を再設定"],["REPLAY","もう一度再生"],["RESOLUTION","解像度"],["REWIND","巻き戻し"],["SEEK","シーク再生"],["SKIP_AD","広告をスキップ"],["SKIP_TO_LIVE","ライブ配信までスキップ"],["STATISTICS","統計情報"],["SUBTITLE_FORCED","強制"],["SURROUND","サラウンド"],["TOGGLE_STEREOSCOPIC","立体画像を切り替える"],["UNDETERMINED_LANGUAGE","不明"],["UNMUTE","ミュートを解除"],["UNRECOGNIZED_LANGUAGE","不明"],["VOLUME","音量"]])),e.Va("ko",new Map([["AD_DURATION","광고 기간"],["AD_PROGRESS","광고 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","광고 통계"],["AD_TIME","광고: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","자동"],["BACK","뒤로"],["CAPTIONS","자막"],["CAST","전송..."],["CHAPTERS","장"],["DOWNLOAD_VIDEO_FRAME","동영상 프레임 저장"],["ENTER_LOOP_MODE","현재 동영상 반복 재생"],["ENTER_PICTURE_IN_PICTURE","PIP 모드 시작"],["EXIT_FULL_SCREEN","전체화면 닫기"],["EXIT_LOOP_MODE","현재 동영상 반복 재생 중지"],["EXIT_PICTURE_IN_PICTURE","PIP 모드 종료"],["FAST_FORWARD","빨리 감기"],["FULL_SCREEN","전체화면"],["LANGUAGE","언어"],["LIVE","실시간"],["LOOP","반복 재생"],["MORE_SETTINGS","설정 더보기"],["MULTIPLE_LANGUAGES","여러 언어"],["MUTE","음소거"],["NOT_APPLICABLE","해당 사항 없음"],["OFF","사용 안함"],["ON","사용"],["PAUSE","일시중지"],["PICTURE_IN_PICTURE","PIP 모드"],["PLAY","재생"],["PLAYBACK_RATE","재생 속ë
1„"],["QUALITY","품질"],["RECENTER_VR","중심 재설정"],["REPLAY","다시보기"],["RESOLUTION","해상도"],["REWIND","되감기"],["SEEK","찾기"],["SKIP_AD","광고 건너뛰기"],["SKIP_TO_LIVE","라이브 동영상으로 건너뛰기"],["STATISTICS","통계"],["SUBTITLE_FORCED","강제"],["SURROUND","서라운드"],["TOGGLE_STEREOSCOPIC","입체 보기 전환"],["UNDETERMINED_LANGUAGE","미정"],["UNMUTE","음소거 해제"],["UNRECOGNIZED_LANGUAGE","알 수 없음"],["VOLUME","볼륨"]])),e.Va("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME","Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN","Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]])),e.Va("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama [AD_ON] z [NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesyłaj..."],["CHAPTERS","Rozdziały"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatkę filmu"],["ENTER_LOOP_MODE","Odtwarzaj bieżący film w pętli"],["ENTER_PICTURE_IN_PICTURE","Włącz tryb obrazu w obrazie"],["EXIT_FULL_SCREEN","Zamknij pełny ekran"],["EXIT_LOOP_MODE","Wyłącz odtwarzanie bieżącego filmu w pętli"],["EXIT_PICTURE_IN_PICTURE","Wyłącz tryb obrazu w obrazie"],["FAST_FORWARD","Przewiń do przodu"],["FULL_SCREEN","Pełny ekran"],["LANGUAGE","Język"],["LIVE","Na żywo"],["LOOP","Odtwarzaj w pętli"],["MORE_SETTINGS","Więcej ustawień"],["MULTIPLE_LANGUAGES","Wiele języków"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wyłączone"],["ON","Włączone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w obrazie"],["PLAY","Odtwórz"],["PLAYBACK_RATE","Szybkość odtwarzania"],["QUALITY","Jakość"],["RECENTER_VR","Wyśrodkuj"],["REPLAY","Odtwórz ponownie"],["RESOLUTION","Rozdzielczość"],["REWIND","Przewiń do tyłu"],["SEEK","Szukaj"],["SKIP_AD","Pomiń reklamę"],["SKIP_NEXT","Dalej"],["SKIP_TO_LIVE","Przejdź do transmisji na żywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],["TOGGLE_STEREOSCOPIC","Przełącz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie określono"],["UNMUTE","Wyłącz wyciszenie"],["UNRECOGNIZED_LANGUAGE","Nierozpoznany"],["VOLUME","Głośność"]])),e.Va("pt-BR",new Map([["AD_DURATION","Duração do anúncio"],["AD_PROGRESS","Anúncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estatísticas de anúncios"],["AD_TIME","Anúncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automática"],["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Capítulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do vídeo"],["ENTER_LOOP_MODE","Repetir o vídeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repetição do vídeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avançar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE","Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais definições"],["MULTIPLE_LANGUAGES","Vários idiomas"],["MUTE","Desativar som"],["NOT_APPLICABLE","Não relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodução"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolução"],["REWIND","Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular anúncio"],["SKIP_TO_LIVE","Pular para transmissão ao vivo"],["STATISTICS","Estatísticas"],["SUBTITLE_FORCED","Exibição forçada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereoscópica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","Não reconhecido"],["VOLUME","Volume"]])),e.Va("ru",new Map([["AD_DURATION","Продолжительность рекламы"],["AD_PROGRESS","Реклама [AD_ON] из [NUM_ADS]"],["AD_STATISTICS","Статистика объявлений"],["AD_TIME","Реклама: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Авто"],["BACK","Назад"],["CAPTIONS","Субтитры"],["CAST","Транслировать..."],["CHAPTERS","Эпизоды"],["DOWNLOAD_VIDEO_FRAME","Сохранить кадр видео"],["ENTER_LOOP_MODE","Зациклить текущее видео"],["ENTER_PICTURE_IN_PICTURE",'Перейти в режим "Картинка в картинке"'],["EXIT_FULL_SCREEN","Обычный режим"],["EXIT_LOOP_MODE","Отменить зацикливание текущего видео"],["EXIT_PICTURE_IN_PICTURE",'Выйти из режима "Картинка в картинке"'],["FAST_FORWARD","Перемотка вперед"],["FULL_SCREEN","Полноэкранный режим"],["LANGUAGE","Язык"],["LIVE","Прямой эфир"],["LOOP","Зациклить"],["MORE_SETTINGS","Дополнительные настройки"],["MULTIPLE_LANGUAGES","Несколько языков"],["MUTE","Отключить звук"],["NOT_APPLICABLE","Неприменимо"],["OFF","Выкл."],["ON","Вкл."],["PAUSE","Пауза"],["PICTURE_IN_PICTURE","Картинка в картинке"],["PLAY","Воспроизвести"],["PLAYBACK_RATE","Скорость воспроизведения"],["QUALITY","Качество"],["RECENTER_VR","Центрировать заново"],["REPLAY","Повторить"],["RESOLUTION","Разрешение"],["REWIND","Перемотать назад"],["SEEK","Перемотка"],["SKIP_AD","Пропустить"],["SKIP_TO_LIVE","Пропустить и перейти Ð
1º прямой трансляции"],["STATISTICS","Статистика"],["SUBTITLE_FORCED","Субтитры принудительно"],["SURROUND","Объемный звук"],["TOGGLE_STEREOSCOPIC","Включить или отключить стереоскопический режим"],["UNDETERMINED_LANGUAGE","Не указано"],["UNMUTE","Включить звук"],["UNRECOGNIZED_LANGUAGE","Не распознано"],["VOLUME","Громкость"]])),e.Va("th",new Map([["AD_DURATION","ระยะเวลาโฆษณา"],["AD_PROGRESS","โฆษณา [AD_ON] จาก [NUM_ADS] รายการ"],["AD_STATISTICS","สถิติโฆษณา"],["AD_TIME","โฆษณา: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","อัตโนมัติ"],["BACK","กลับ"],["CAPTIONS","คำบรรยายแทนเสียง"],["CAST","แคสต์..."],["CHAPTERS","บท"],["DOWNLOAD_VIDEO_FRAME","บันทึกเฟรมวิดีโอ"],["ENTER_LOOP_MODE","วนซ้ำวิดีโอปัจจุบัน"],["ENTER_PICTURE_IN_PICTURE","เข้าสู่การแสดงภาพซ้อนภาพ"],["EXIT_FULL_SCREEN","ออกจากการแสดงแบบเต็มหน้าจอ"],["EXIT_LOOP_MODE","หยุดวนซ้ำวิดีโอปัจจุบัน"],["EXIT_PICTURE_IN_PICTURE","ออกจากการแสดงภาพซ้อนภาพ"],["FAST_FORWARD","กรอไปข้างหน้า"],["FULL_SCREEN","เต็มหน้าจอ"],["LANGUAGE","ภาษา"],["LIVE","สด"],["LOOP","ลูป"],["MORE_SETTINGS","การตั้งค่าเพิ่มเติม"],["MULTIPLE_LANGUAGES","หลายภาษา"],["MUTE","ปิดเสียง"],["NOT_APPLICABLE","ไม่เกี่ยวข้อง"],["OFF","ปิด"],["ON","เปิด"],["PAUSE","หยุดชั่วคราว"],["PICTURE_IN_PICTURE","การแสดงภาพซ้อนภาพ"],["PLAY","เล่น"],["PLAYBACK_RATE","ความเร็วในการเล่น"],["QUALITY","คุณภาพ"],["RECENTER_VR","จัดกึ่งกลางใหม่"],["REPLAY","เล่นซ้ำ"],["RESOLUTION","ความละเอียด"],["REWIND","กรอกลับ"],["SEEK","ค้นหา"],["SKIP_AD","ข้ามโฆษณา"],["SKIP_TO_LIVE","ข้ามไปที่การถ่ายทอดสด"],["STATISTICS","สถิติ"],["SUBTITLE_FORCED","บังคับ"],["SURROUND","เซอร์ราวด์"],["TOGGLE_STEREOSCOPIC","เปิด/ปิดฟีเจอร์สามมิติ"],["UNDETERMINED_LANGUAGE","ไม่กำหนด"],["UNMUTE","เปิดเสียง"],["UNRECOGNIZED_LANGUAGE","ที่ไม่รู้จัก"],["VOLUME","ระดับเสียง"]])),e.Va("tr",new Map([["AD_DURATION","Reklam süresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyazılar"],["CAST","Yayınla..."],["CHAPTERS","Bölümler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu döngüye al"],["ENTER_PICTURE_IN_PICTURE","Pencere içinde Pencere moduna gir"],["EXIT_FULL_SCREEN","Tam ekrandan çık"],["EXIT_LOOP_MODE","Mevcut videonun döngüsünü durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere İçinde Pencereden Çık"],["FAST_FORWARD","İleri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canlı"],["LOOP","Döngü"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden çok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Geçerli değil"],["OFF","Kapalı"],["ON","Açık"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere İçinde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","Çalma hızı"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","Çözünürlük"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklamı Atla"],["SKIP_TO_LIVE","Canlı yayına atla"],["STATISTICS","İstatistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Stereoskopik modu aç/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi aç"],["UNRECOGNIZED_LANGUAGE","Tanınmayan"],["VOLUME","Ses"]])),e.Va("zh",new Map([["AD_DURATION","广告持续时间"],["AD_PROGRESS","广告 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","广告统计信息"],["AD_TIME","广告:[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","自动"],["BACK","返回"],["CAPTIONS","字幕"],["CAST","投放…"],["CHAPTERS","章节"],["DOWNLOAD_VIDEO_FRAME","保存视频帧"],["ENTER_LOOP_MODE","循环播放当前视频"],["ENTER_PICTURE_IN_PICTURE","进入“画中画”模式"],["EXIT_FULL_SCREEN","退出全屏模式"],["EXIT_LOOP_MODE","停止循环播放当前视频"],["EXIT_PICTURE_IN_PICTURE","退出“画中画”模式"],["FAST_FORWARD","快进"],["FULL_SCREEN","全屏"],["LANGUAGE","语言"],["LIVE","直播"],["LOOP","循环播放"],["MORE_SETTINGS","更多设置"],["MULTIPLE_LANGUAGES","多种语言"],["MUTE","静音"],["NOT_APPLICABLE","不适用"],["OFF","关闭"],["ON","开启"],["PAUSE","暂
1停"],["PICTURE_IN_PICTURE","画中画"],["PLAY","播放"],["PLAYBACK_RATE","播放速度"],["QUALITY","画质"],["RECENTER_VR","重新置中"],["REPLAY","重放"],["RESOLUTION","分辨率"],["REWIND","快退"],["SEEK","进度"],["SKIP_AD","跳过广告"],["SKIP_TO_LIVE","跳至当前直播"],["STATISTICS","统计信息"],["SUBTITLE_FORCED","已强制显示"],["SURROUND","环绕声"],["TOGGLE_STEREOSCOPIC","切换立体声"],["UNDETERMINED_LANGUAGE","未确定"],["UNMUTE","取消静音"],["UNRECOGNIZED_LANGUAGE","无法识别"],["VOLUME","音量"]])),e.Va("zh-TW",new Map([["AD_DURATION","廣告長度"],["AD_PROGRESS","廣告 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","廣告統計資料"],["AD_TIME","廣告:[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","自動"],["BACK","返回"],["CAPTIONS","字幕"],["CAST","投放..."],["CHAPTERS","章節"],["DOWNLOAD_VIDEO_FRAME","儲存影片影格"],["ENTER_LOOP_MODE","循環播放目前的影片"],["ENTER_PICTURE_IN_PICTURE","進入子母畫面"],["EXIT_FULL_SCREEN","退出全螢幕模式"],["EXIT_LOOP_MODE","停止循環播放目前的影片"],["EXIT_PICTURE_IN_PICTURE","離開子母畫面"],["FAST_FORWARD","快轉"],["FULL_SCREEN","全螢幕"],["LANGUAGE","語言"],["LIVE","直播"],["LOOP","循環播放"],["MORE_SETTINGS","顯示更多設定"],["MULTIPLE_LANGUAGES","多種語言"],["MUTE","靜音"],["NOT_APPLICABLE","不適用"],["OFF","關閉"],["ON","開啟"],["PAUSE","暫停"],["PICTURE_IN_PICTURE","子母畫面"],["PLAY","播放"],["PLAYBACK_RATE","播放速度"],["QUALITY","音質"],["RECENTER_VR","重新置中"],["REPLAY","重播"],["RESOLUTION","解析度"],["REWIND","倒轉"],["SEEK","搜尋"],["SKIP_AD","略過廣告"],["SKIP_TO_LIVE","跳至当前直播"],["STATISTICS","統計資料"],["SUBTITLE_FORCED","強制顯示"],["SURROUND","環場音效"],["TOGGLE_STEREOSCOPIC","切換立體影像"],["UNDETERMINED_LANGUAGE","不明"],["UNMUTE","取消靜音"],["UNRECOGNIZED_LANGUAGE","無法辨識"],["VOLUME","音量"]])),e.Di(navigator.languages||[]),e}(),this.i=new xt,this.C=null,this.configure(this.g),function(t){t.i.o(t.u,"buffering",function(){wx(t)}),wx(t),t.i.o(e,"keydown",function(n){!function(t,n){t.ba.add(n.key);var i=t.Cc();"Tab"==n.key&&(t.h.classList.add("shaka-keyboard-navigation"),bx(t),t.i.o(e,"mousedown",function(){t.i.Da(e,"mousedown")})),"Escape"==n.key&&t.N.Ka(),i&&t.ba.has("Tab")&&function(e,t){var n=e.I.filter(function(e){return!e.classList.contains("shaka-hidden")});if(n.length){var i=n[0];if(i.childNodes.length){for(n=i.firstElementChild;n&&n.classList.contains("shaka-hidden");)n=n.nextElementSibling;for(i=i.lastElementChild;i&&i.classList.contains("shaka-hidden");)i=i.previousElementSibling;var r=document.activeElement;e.ba.has("Shift")?r==n&&(t.preventDefault(),i.focus()):r==i&&(t.preventDefault(),n.focus())}}}(t,n)}(t,n)}),t.i.o(e,"click",function(){return t.Lc()}),t.i.o(t,"submenuopen",function(){t.Lc()}),t.i.o(t.B,"play",function(){bx(t)}),t.i.o(t.B,"pause",function(){bx(t)}),t.i.o(t.l,"mousemove",function(e){vx(t,e)}),t.i.o(t.l,"touchmove",function(e){vx(t,e)},{passive:!0}),t.i.o(t.l,"touchend",function(e){vx(t,e)},{passive:!0}),t.i.o(t.l,"mouseleave",function(){t.O||t.J.Ka()}),t.i.o(t.l,"wheel",function(e){vx(t,e)},{passive:!0}),t.i.o(t.D,"caststatuschanged",function(){Sx(t)}),t.i.o(t.C,"vrstatuschanged",function(){t.dispatchEvent(new z("vrstatuschanged"))}),t.i.o(t.l,"keydown",function(e){var n=document.activeElement,i=!(!n||!n.classList)&&n.classList.contains("shaka-volume-bar"),r=n&&n.classList&&n.classList.contains("shaka-seek-bar");if(t.h.contains(n)&&vx(t,e),t.g.enableKeyboardPlaybackControls){n=t.g.keyboardSeekDistance;var a=t.g.keyboardLargeSeekDistance;switch(e.key){case"ArrowLeft":t.s&&r&&!i&&0<n&&(e.preventDefault(),Ex(t,t.s.getValue()-n));break;case"ArrowRight":t.s&&r&&!i&&0<n&&(e.preventDefault(),Ex(t,t.s.getValue()+n));break;case"PageDown":t.s&&r&&0<n&&(e.preventDefault(),Ex(t,t.s.getValue()-a));break;case"PageUp":t.s&&r&&0<n&&(e.preventDefault(),Ex(t,t.s.getValue()+a));break;case"Home":t.s&&Ex(t,t.u.xa().start);break;case"End":t.s&&Ex(t,t.u.xa().end);break;case"f":t.ke()&&t.gg();break;case"m":t.j&&t.j.isLinear()?t.j.setMuted(!t.j.isMuted()):t.m.muted=!t.m.muted;break;case"p":t.yf()&&t.pd();break;case" ":r&&mx(t)}}}),t.i.o(t.l,"keyup",function(e){t.ba.delete(e.key)}),t.i.o(t.na,"ad-started",function(e){t.j=e.ad,t.Kj(),wx(t)}),t.i.o(t.na,"ad-stopped",function(){t.j=null,t.Ti(),wx(t)}),screen.orientation&&t.i.o(screen.orientation,"change",function(){return D(function(e){return S(e,function(e){return D(function(t){return e.B&&0!=e.B.readyState&&!e.D.Pa()&&e.g.enableFullscreenOnRotation&&e.ke()?screen.orientation.type.includes("landscape")&&!e.Mc()?S(t,fx(e),0):screen.orientation.type.includes("portrait")&&e.Mc()?S(t,gx(e),0):t.A(0):t.return()})}(t),0)})})}(this),function(t){if(t.g.setupMediaSession&&navigator.mediaSession){var n=function(e,t){try{navigator.mediaSession.setActionHandler(e,function(e){t(e)})}catch(e){}},i=function(){if(t.j&&t.j.isLinear())r();else{var e=t.u.xa(),n=e.end-e.start;e=parseFloat((t.B.currentTime-e.start).toFixed(2)),t.u.T()&&1>Math.abs(n-e)&&(n=1/0);try{navigator.mediaSession.setPositionState({duration:Math.max(0,n),playbackRate:t.B.playbackRate,position:Math.max(0,e)})}catch(e){}}},r=function(){try{navigator.mediaSession.setPositionState()}catch(e){}},a=function(e){var n=t.g.keyboardSeekDistance;switch(e.action){case"pause":case"play":mx(t);break;case"seekbackward":if(e.seekOffset&&!isFinite(e.seekOffset))break;t.j&&t.j.isLinear()||Ex(t,t.s.getValue()-(e.seekOffset||n));break;case"seekforward":if(e.seekOffset&&!isFinite(e.seekOffset))break;t.j&&t.j.isLinear()||Ex(t,t.s.getValue()+(e.seekOffset||n));break;case"seekto":if(e.seekTime&&!isFinite(e.seekTime))break;t.j&&t.j.isLinear()||Ex(t,t.u.xa().start+e.seekTime);break;case"stop":t.u.lc();break;case"enterpictureinpicture":t.j&&t.j.isLinear()||t.pd()}};n("pause",a),n("play",a),n("seekbackward",a),n("seekforward",a),n("seekto",a),n("stop",a),("documentPictureInPicture"in e||document.pictureInPictureEnabled)&&n("enterpictureinpicture",a),n=function(){t.u.T()||0!=t.u.xa().start?(i(),t.i.o(t.B,"timeupdate",i)):r()},t.u.Y&&n(),t.i.o(t.u,"loaded",n),t.i.o(t.u,"unloading",function(){t.i.Da(t.B,"timeupdate",i)}),t.i.o(t.u,"metadata",function(e){var n,i;(e=e.payload)&&("TIT2"==e.key&&e.data&&(n=e.data),"APIC"==e.key&&"--\x3e"==e.mimeType&&(i=e.data),n&&(e={title:n,artwork:[]},navigator.mediaSession.metadata&&((e=navigator.mediaSession.metadata).title=n),navigator.mediaSession.metadata=new Media
1Metadata(e)),i&&(i!=(n=t.m).poster&&(n.poster=i),n={title:"",artwork:[{src:i}]},navigator.mediaSession.metadata&&((n=navigator.mediaSession.metadata).artwork=[{src:i}]),navigator.mediaSession.metadata=new MediaMetadata(n)))})}}(this),this.ba=new Set,Sx(this),this.sa.ya(this.g.refreshTickInSeconds),this.i.o(this.ra,"locale-changed",function(e){e=e.locales[0],o.na.setLocale(e),o.l.setAttribute("lang",e)}),this.na.initInterstitial(this.G,this.Z,this.m),this.i.o(this.u,"texttrackvisibility",function(){yx(o)})}function cx(e){for(var t=c(e.H),n=t.next();!n.done;n=t.next())n.value.release();e.H=[]}function dx(e,t){kx.set(e,t)}function hx(e){return!(!document.fullscreenEnabled||e.m.webkitSupportsFullscreen&&e.g.preferVideoFullScreenInVisionOS&&"VR"==Re().Ja())}function px(t){return"documentPictureInPicture"in e&&t.g.preferDocumentPictureInPicture}function fx(e){var t,n;return D(function(i){switch(i.g){case 1:if(A(i,2),!hx(e)){(t=e.m).webkitSupportsFullscreen&&t.webkitEnterFullscreen(),i.A(4);break}if(!e.le()){i.A(5);break}return S(i,e.pd(),6);case 6:if(!px(e)){i.A(5);break}return S(i,new Promise(function(e){new Ki(e).X(.05)}),5);case 5:return S(i,e.g.fullScreenElement.requestFullscreen({navigationUI:"hide"}),9);case 9:if(!e.g.forceLandscapeOnFullscreen||!screen.orientation){i.A(4);break}return A(i,11),S(i,screen.orientation.lock("landscape"),13);case 13:x(i,4,2);break;case 11:k(i,2);case 4:x(i,0);break;case 2:n=k(i),e.dispatchEvent(new z("error",(new Map).set("detail",n))),w(i)}})}function gx(e){var t;return D(function(n){return hx(e)?(screen.orientation&&screen.orientation.unlock(),S(n,document.exitFullscreen(),0)):((t=e.m).webkitSupportsFullscreen&&t.webkitExitFullscreen(),n.A(0))})}function mx(e){if(e.Y){if(e.j&&(e.j&&e.j.isPaused()?e.j.play():e.j&&e.j.pause(),e.j.isLinear()))return;e.B.duration&&(e.B.paused&&!e.R?(e.u.isEnded()&&(e.B.currentTime=e.u.xa().start),e.B.play()):e.B.pause())}}function vx(e,t){"mousemove"==t.type&&(e.h.classList.remove("shaka-keyboard-navigation"),bx(e)),"touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"keyup"==t.type?e.O=Date.now():e.O+1e3<Date.now()&&(e.O=null),e.O&&"mousemove"==t.type||(e.l.classList.remove("no-cursor"),e.Na=!0,e.N.stop(),e.Ba()||(xx(e),bx(e)),e.J.stop(),"touchend"!=t.type&&"wheel"!=t.type&&"keyup"!=t.type&&e.O||e.J.X(3))}function yx(e){var t=e.l.getElementsByClassName("shaka-text-container")[0];t&&(e.Ba()?t.style.bottom=e.L.clientHeight+"px":t.style.bottom="0px")}function bx(t){var n=!!t.j&&t.j.isPaused(),i=t.B.paused&&!t.R,r=t.h.classList.contains("shaka-keyboard-navigation");n||(!t.j||!t.j.isLinear())&&i||t.Na||r||function(t){return!!e.matchMedia("hover: hover").matches&&t.Ta.some(function(e){return e.matches(":hover")})}(t)?(xx(t),null==t.h.getAttribute("shown")&&(t.h.setAttribute("shown","true"),Ax(t)),yx(t),t.$.stop()):t.$.X(t.g.fadeDelay),t.Cc()&&t.F.classList.remove("shaka-tooltips-on")}function Tx(e,t){t=void 0!==t&&t,e.Y&&!e.Tb()&&(e.Cc()?e.N.Ka():e.g.singleClickForPlayAndPause?mx(e):t&&e.Ba()&&e.Ui())}function Sx(e){var t=e.D.Pa();e.dispatchEvent(new z("caststatuschanged",(new Map).set("newStatus",t))),t?null==e.h.getAttribute("casting")&&(e.h.setAttribute("casting","true"),Ax(e)):null!=e.h.getAttribute("casting")&&(e.h.removeAttribute("casting"),Ax(e))}function wx(e){e.Y&&(e.j&&e.j.isClientRendering()&&e.j.isLinear()?fE(e.K,!1):fE(e.K,e.u.xf()))}function Ax(e){e.Ba()?e.dispatchEvent(new z("showingui")):e.dispatchEvent(new z("hidingui"))}function Ex(e,t){e.B.currentTime=t,xx(e)}function xx(e){if(e.s)if(e.s.setValue(e.B.currentTime),e.s.update(),e.s.isShowing()){for(var t=c(e.I),n=t.next();!n.done;n=t.next())n.value.classList.remove("shaka-low-position");(t=e.F).classList.contains("shaka-tooltips-on")&&t.classList.remove("shaka-tooltips-low-position")}else{for(n=(t=c(e.I)).next();!n.done;n=t.next())n.value.classList.add("shaka-low-position");(t=e.F).classList.contains("shaka-tooltips-on")&&t.classList.add("shaka-tooltips-low-position")}e.dispatchEvent(new z("timeandseekrangeupdated"))}v(lx,ee),(r=lx.prototype).destroy=function(e){e=void 0!==e&&e;var t=this;return D(function(n){switch(n.g){case 1:if(document.pictureInPictureElement!=t.m){n.A(2);break}return S(n,document.exitPictureInPicture(),2);
1case 2:if(t.i&&(t.i.release(),t.i=null),t.J&&(t.J.stop(),t.J=null),t.$&&(t.$.stop(),t.$=null),t.N&&(t.N.stop(),t.N=null),t.sa&&(t.sa.stop(),t.sa=null),t.C&&(t.C.release(),t.C=null),cx(t),t.h&&(t.l.removeChild(t.h),t.h=null),!t.D){n.A(4);break}return S(n,t.D.destroy(e),5);case 5:t.D=null;case 4:if(t.K&&(t.l.removeChild(t.K),t.K=null),t.G&&(t.l.removeChild(t.G),t.G=null),!t.Z){n.A(6);break}return S(n,t.Z.destroy(),7);case 7:t.Z=null;case 6:t.u=null,t.m=null,t.B=null,t.ra=null,t.ba.clear(),function(e){if(e.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(e){}e=function(e){try{navigator.mediaSession.setActionHandler(e,null)}catch(e){}},e("pause"),e("play"),e("seekbackward"),e("seekforward"),e("seekto"),e("stop"),e("enterpictureinpicture")}}(t),ee.prototype.release.call(t),w(n)}})},r.ck=function(e){this.oa=e,Sx(this)},r.Dl=function(){bx(this)},r.configure=function(e){var t=this;this.g=e,this.D.Ei(e.castReceiverAppId,e.castAndroidReceiverCompatible),this.s&&(this.s=null),this.La&&(this.La=null),this.U&&(this.U=null),this.C&&this.C.configure(e),this.h?(hs(this.h),cx(this)):(function(e){e.h=us("div"),e.h.classList.add("shaka-controls-container"),e.l.appendChild(e.h),e.l.setAttribute("shaka-controls","true"),e.i.o(e.h,"touchend",function(t){e.B.duration&&(e.Ba()?(e.O=Date.now(),Tx(e,!0)):vx(e,t),t.cancelable&&t.preventDefault())}),e.i.o(e.h,"click",function(){Tx(e)}),e.i.o(e.h,"dblclick",function(){e.g.doubleClickForFullscreen&&e.ke()&&e.gg()})}(this),function(e){e.G=us("div"),e.G.classList.add("shaka-client-side-ad-container"),fE(e.G,!1),e.i.o(e.G,"click",function(){Tx(e)}),e.l.appendChild(e.G)}(this),this.C=new nx(this.h,this.Lb,this.m,this.u,this.g)),this.l.classList.add("shaka-video-container"),this.m.classList.add("shaka-video"),function(e){var t=us("div");t.classList.add("shaka-scrim-container"),e.h.appendChild(t)}(this),this.g.addBigPlayButton&&function(e){var t=us("div");t.classList.add("shaka-play-button-container"),e.h.appendChild(t),e.La=new wE(t,e),e.H.push(e.La)}(this),this.g.customContextMenu&&(this.U=new vE(this.F,this),this.H.push(this.U)),this.K||function(e){e.K=us("div"),e.K.classList.add("shaka-spinner-container"),e.l.appendChild(e.K);var t=us("div");t.classList.add("shaka-spinner"),e.K.appendChild(t),t.insertAdjacentHTML("beforeend",'<svg focusable="false" stroke="currentColor"\n         viewB
1ox="0 0 38 38" xmlns="http://www.w3.org/2000/svg"\n         width="50px" height="50px" class="q-spinner text-grey-9">\n      <g transform="translate(1 1)" stroke-width="6" fill="none"\n        fill-rule="evenodd">\n        <circle stroke-opacity=".5" cx="18" cy="18" r="16"></circle>\n        <path d="M34 18c0-9.94-8.06-16-16-16">\n          <animateTransform attributeName="transform" type="rotate"\n            from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite">\n          </animateTransform>\n        </path>\n      </g>\n    </svg>')}(this),this.g.seekOnTaps&&(function(e){var t=us("div");t.classList.add("shaka-hidden-fast-forward-container"),e.h.appendChild(t),e.Ya=new EE(t,e),e.H.push(e.Ya)}(this),function(e){var t=us("div");t.classList.add("shaka-hidden-rewind-container"),e.h.appendChild(t),e.cb=new xE(t,e),e.H.push(e.cb)}(this)),this.Ha=us("div"),this.Ha.classList.add("shaka-server-side-ad-container"),this.h.appendChild(this.Ha),function(e){e.L=us("div"),e.L.classList.add("shaka-bottom-controls"),e.L.classList.add("shaka-no-propagation"),e.h.appendChild(e.L),e.i.o(e.L,"click",function(t){t.target.closest(".shaka-overflow-button")||e.Lc()}),function(e){e.P=us("div"),e.P.classList.add("shaka-ad-controls");var t=null!=e.j&&e.j.isLinear();fE(e.P,t),e.L.appendChild(e.P),t=new BE(e.P,e),e.H.push(t)}(e),function(e){if(e.g.addSeekBar)e.s=Ix.create(e.L,e),e.H.push(e.s);else{for(var t=c(e.I),n=t.next();!n.done;n=t.next())n.value.classList.add("shaka-low-position");(e=e.F).classList.contains("shaka-tooltips-on")&&e.classList.add("shaka-tooltips-low-position")}}(e),e.F=us("div"),e.F.classList.add("shaka-controls-button-panel"),e.F.classList.add("shaka-show-controls-on-mouse-over"),e.g.enableTooltips&&e.F.classList.add("shaka-tooltips-on"),e.L.appendChild(e.F);for(var t=c(e.g.controlPanelElements),n=t.next();!n.done;n=t.next())if(n=n.value,kx.get(n)){var i=kx.get(n).create(e.F,e);e.H.push(i),"time_and_duration"==n&&(n=new mE(e.F,e),e.H.push(n))}else Y("Unrecognized control panel element requested:",n)}(this),this.I=Array.from(this.l.getElementsByClassName("shaka-settings-menu")),this.I.push.apply(this.I,d(Array.from(this.l.getElementsByClassName("shaka-overflow-menu")))),this.Ta=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over")),bx(this);for(var n=(e=c(this.l.getElementsByClassName("shaka-no-propagation"))).next();!n.done;n=e.next()){n=n.value;var i=function(e){return e.stopPropagation()};this.i.o(n,"click",i),this.i.o(n,"dblclick",i),0<navigator.maxTouchPoints&&this.i.o(n,"touchend",function(e){t.Ba()&&e.stopPropagation()})}},r.Vh=function(e){(this.Y=e)?(this.l.setAttribute("shaka-controls","true"),this.m.tabIndex=-1,this.m.controls=!1):this.l.removeAttribute("shaka-controls"),bx(this)},r.Ej=function(e){this.m.controls=e,this.m.tabIndex=e?0:-1,e&&this.Vh(!1)},r.getAd=function(){return this.j},r.vk=function(){return this.D},r.Nk=function(){return this.ra},r.kl=function(){return this.l},r.Jc=function(){return this.B},r.Mk=function(){return this.m},r.Sb=function(){return this.u},r.Lk=function(){return this.Z},r.Ck=function(){return this.h},r.Yk=function(){return this.Ha},r.yk=function(){return this.G},r.zk=function(){return this.g},r.Al=function(){return this.R},r.Yh=function(e){(this.R=e)?this.J.stop():this.J.X(3)},r.ul=function(){return this.oa},r.gh=function(){return this.s?this.s.getValue():this.B.currentTime},r.Fj=function(e){this.O=e},r.Cc=function(){return this.I.some(function(e){return!e.classList.contains("shaka-hidden")})},r.Lc=function(){this.N.Ka()},r.ke=function(){return!this.D.Pa()&&!(!hx(this)&&(this.j&&this.j.isUsingAnotherMediaElement()||!this.m.webkitSupportsFullscreen))},r.Mc=function(){if(hx(this))return!!document.fullscreenElement;var e=this.m;return!!e.webkitSupportsFullscreen&&e.webkitDisplayingFullscreen},r.gg=function(){var e=this;return D(function(t){return e.Mc()?S(t,gx(e),0):S(t,fx(e),0)})},r.yf=function(){return!this.D.Pa()&&(!(!document.pictureInPictureEnabled&&!px(this))&&!this.m.disablePictureInPicture)},r.le=function(){return!!(e.documentPictureInPicture&&e.documentPictureInPicture.window||document.pictureInPictureElement)},r.pd=function(){var t,n=this;return D(function(i){switch(i.g){case 1:if(A(i,2),px(n)){if(!n.Mc()){i.A(10);break}return S(i,gx(n),10)}return document.pictureInPictureElement?S(i,document.exitPictureInPicture(),5):(n.Mc()&&gx(n),S(i,n.m.requestPictureInPicture(),5));case 10:return S(i,function(t){var n,i,r,a,o,s;return D(function(u){if(1==u.g)return e.documentPictureInPicture.window?(e.documentPictureInPicture.window.close(),u.return()):(n=t.l,i=n.getBoundingClientRect(),S(u,e.documentPictureInPicture.requestWindow({width:i.width,height:i.height}),2));(function(e){var t=[].concat(d(document.styleSheets)).map(function(t){try{return[].concat(d(t.cssRules)).map(function(e){return e.cssText}).join("")}catch(i){var n=document.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media,n.href=t.href,e.document.head.appendChild(n)}return""}
1).filter(Boolean).join("\n"),n=document.createElement("style");n.textContent=t,e.document.head.appendChild(n)})(r=u.h),a=n.parentNode||document.body,(o=t.l.cloneNode(!0)).style.visibility="hidden",o.style.height=getComputedStyle(n).height,a.appendChild(o),(s=document.createElement("style")).append("[data-shaka-player-container] {\n      width: 100% !important; max-height: 100%}"),r.document.head.append(s),r.document.body.append(n),t.i.qa(r,"pagehide",function(){o.replaceWith(n)}),w(u)})}(n),5);case 5:x(i,0);break;case 2:t=k(i),n.dispatchEvent(new z("error",(new Map).set("detail",t))),w(i)}})},r.Kj=function(){fE(this.P,!0),fE(this.G,!0),this.j.hasCustomClick()?this.h.setAttribute("ad-active","true"):this.h.removeAttribute("ad-active")},r.Ti=function(){fE(this.P,!1),fE(this.G,!1),this.h.removeAttribute("ad-active")},r.Ba=function(){return!!this.Y&&(null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"))},r.mm=function(){vx(this,new Event("mousemove",{bubbles:!1,cancelable:!1}))},r.Ui=function(){this.J.Ka()},r.Eg=function(){return this.C.Eg()},r.Tb=function(){return this.C.Tb()},r.il=function(){var e=this.C;if(e.g){WE((e=e.g).h,e.D);var t=e.h;e=t[0];var n=t[1],i=t[2],r=i*i,a=(t=t[3])*t,o=e*e+n*n+r+a,s=e*t-n*i;s>.499995*o?(o=Math.PI/2,e=2*Math.atan2(n,e)):s<-.499995*o?(o=-Math.PI/2,e=2*Math.atan2(n,e)):(o=Math.asin(2*(e*i-t*n)),e=Math.atan2(2*(e*t+n*i),1-2*(r+a))),e=180*Math.acos(Math.cos(e)*Math.cos(o))/Math.PI}else Y("Not playing VR content"),e=null;return e},r.hl=function(){var e=this.C;return e.g?e=e.g.j:(Y("Not playing VR content"),e=null),e},r.lm=function(e){var t=this.C;t.g?(0>e?(Y("Field of view should be greater than 0"),e=0):100<e&&(Y("Field of view should be less than 100"),e=100),(t=t.g).j=e,$E(t,!1)):Y("Not playing VR content")},r.Qd=function(){this.C.Qd()},r.qh=function(e){this.C.qh(e)},r.oh=function(e){this.C.oh(e)},r.ph=function(e){this.C.ph(e)},H("shaka.ui.Controls",lx),lx.prototype.incrementRoll=lx.prototype.ph,lx.prototype.incrementPitch=lx.prototype.oh,lx.prototype.incrementYaw=lx.prototype.qh,lx.prototype.toggleStereoscopicMode=lx.prototype.Qd,lx.prototype.setVRFieldOfView=lx.prototype.lm,lx.prototype.getVRFieldOfView=lx.prototype.hl,lx.prototype.getVRNorth=lx.prototype.il,lx.prototype.isPlayingVR=lx.prototype.Tb,lx.prototype.canPlayVR=lx.prototype.Eg,lx.prototype.hideUI=lx.prototype.Ui,lx.prototype.showUI=lx.prototype.mm,lx.prototype.isOpaque=lx.prototype.Ba,lx.prototype.hideAdUI=lx.prototype.Ti,lx.prototype.showAdUI=lx.prototype.Kj,lx.prototype.togglePiP=lx.prototype.pd,lx.prototype.isPiPEnabled=lx.prototype.le,lx.prototype.isPiPAllowed=lx.prototype.yf,lx.prototype.toggleFullScreen=lx.prototype.gg,lx.prototype.isFullScreenEnabled=lx.prototype.Mc,lx.prototype.isFullScreenSupported=lx.prototype.ke,lx.prototype.hideSettingsMenus=lx.prototype.Lc,lx.prototype.anySettingsMenusAreOpen=lx.prototype.Cc,lx.prototype.setLastTouchEventTime=lx.prototype.Fj,lx.prototype.getDisplayTime=lx.prototype.gh,lx.prototype.isCastAllowed=lx.prototype.ul,lx.prototype.setSeeking=lx.prototype.Yh,lx.prototype.isSeeking=lx.prototype.Al,lx.prototype.getConfig=lx.prototype.zk,lx.prototype.getClientSideAdContainer=lx.prototype.yk,lx.prototype.getServerSideAdContainer=lx.prototype.Yk,lx.prototype.getControlsContainer=lx.prototype.Ck,lx.prototype.getLocalPlayer=lx.prototype.Lk,lx.prototype.getPlayer=lx.prototype.Sb,lx.prototype.getLocalVideo=lx.prototype.Mk,lx.prototype.getVideo=lx.prototype.Jc,lx.prototype.getVideoContainer=lx.prototype.kl,lx.prototype.getLocalization=lx.prototype.Nk,lx.prototype.getCastProxy=lx.prototype.vk,lx.prototype.getAd=lx.prototype.getAd,lx.prototype.setEnabledNativeControls=lx.prototype.Ej,lx.prototype.setEnabledShakaControls=lx.prototype.Vh,lx.prototype.configure=lx.prototype.configure,lx.prototype.loadComplete=lx.prototype.Dl,lx.prototype.allowCast=lx.prototype.ck,lx.registerSeekBar=function(e){Ix=e},lx.registerElement=dx,lx.prototype.destroy=lx.prototype.destroy;var kx=new Map,Ix=new jE;function Cx(t,n){function i(){return Rx(r)}lE.call(this,t,n);var r=this;this.m=this.controls.g,this.l=this.controls.h,this.s=this.controls.l,this.j=[],function(e){e.h=ls(),e.h.classList.add("shaka-overflow-menu-button"),e.h.classList.add("shaka-no-propagation"),e.h.classList.add("material-icons-round"),e.h.classList.add("shaka-tooltip"),e.h.textContent="settings";var t=us("span");t.classList.add("shaka-overflow-quality-mark"),t.style.display="none",e.h.appendChild(t),e.parent.appendChild(e.h)}(this),this.g=us("div"),this.g.classList.add("shaka-overflow-menu"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("shaka-show-controls-on-mouse-over"),this.g.classList.add("shaka-hidden"),this.l.appendChild(this.g),function(e){for(var t=c(e.m.overflowMenuButtons),n=t.next();!n.done;n=t.next())n=n.value,Dx.get(n)?(n=Dx.get(n),e.j.push(n.create(e.g,e.controls))):Y("Unrecognized overflow menu element requested:",n)}(this),this.eventManager.o(this.localization,"locale-updated",function(){Lx(r)}),this.eventManager.o(this.localization,"locale-changed",function(){Lx(r)}),this.eventManager.o(this.adManager,"ad-started",function(){r.ad&&r.ad.isLinear()&&fE(r.h,!1)}),this.eventManager.o(this.adManager,"ad-stopped",function(){fE(r.h,!0)}),this.eventManager.o(this.controls,"submenuopen",function(){fE(r.g,!1)}),this.eventManager.o(this.g,"touchstart",function(e){r.controls.Fj(Date.now()),e.stopPropagation()}),this.eventManager.o(this.h,"click",function(){r.controls.Ba()&&function(e){if(e.controls.Cc())e.controls.Lc();else{fE(e.g,!0),bx(e.controls);var t=function(e){return 0==e.classList.contains("shaka-hidden")};ne(e.g.childNodes,t)&&ie(e.g.childNodes,t)[0].focus(),Rx(e)}}(r)}),Lx(this),this.ad&&this.ad.isLinear()&&fE(this.h,!1),this.i=null,e.ResizeObserver?(this.i=new ResizeObserver(i),this.i.observe(this.controls.l)):this.eventManager.o(e,"resize",i)}function Mx(e,t){Dx.set(e,t)}function Lx(e){e.h.ariaLabel=e.localization.resolve("MORE_SETTINGS")}function Rx(t){var n=t.g.getBoundingClientRect(),i=e.getComputedStyle(t.g),r=parseFloat(i.paddingTop);i=parseFloat(i.paddingBottom);var a=t.s.getBoundingClientRect();t.g.style.maxHeight=n.bottom-a.top-r-i+"px"}function Px(){}v(Cx,lE),Cx.prototype.release=function(){this.l=null;for(var e=c(this.j),t=e.next();!t.done;t=e.next())t.value.release();this.j=[],this.i&&(this.i.disconnect(),this.i=null),lE.prototype.release.call(this)},H("shaka.ui.OverflowMenu",Cx),Cx.registerElement=Mx,Px.prototype.create=function(e,t){return new Cx(e,t)},dx("overflow_menu",new Px);var Dx=new Map;function Nx(e,t){function n(e){return i.i[e]}lE.call(this,e,t);var i=this;this.h=ls(),this.h.classList.add("shaka-ad-statistics-button"),this.j=us("i"),this.j.classList.add("material-icons-round"),this.j.textContent="insert_chart_outlined",this.h.appendChild(this.j),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-simple-overflow-button-label-inline"),this.u=us("span"),e.appendChild(this.u),this.m=us("span"),this.m.classList.add("shaka-current-selection-span"),e.appendChild(this.m),this.h.appendChild(e),this.parent.appendChild(this.h),this.g=us("div"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("shaka-show-controls-on-mouse-over"),this.g.classList.add("shaka-ad-statistics-container"),this.g.classList.add("shaka-hidden"),this.controls.h.appendChild(this.g),this.C=[],this.i=this.adManager.getStats(),fE(this.h,0<this.i.started),this.s=new Map,this.B=(new Map).set("loadTimes",function(e){for(var t=0,n=(e=c(i.i[e])).next();!n.done;n=e.next())t+=parseFloat(n.value);return t}).set("averageLoadTime",n).set("started",n).set("overlayAds",n).set("playedCompletely",n).set("skipped",n).set("errors",n),this.l=new Ki(function(){i.i=i.adManager.getStats();for(var e=c(i.C),t=e.next();!t.done;t=e.next())t=t.value,i.s.get(t).textContent=i.B.get(t)(t)}),Ox(this),function(e){var t=us("div");t.classList.add("shaka-no-propagation"),t.classList.add("shaka-statistics-close");var n=us("i");for(n.classList.add("material-icons"),n.classList.add("notranslate"),n.classList.add("material-icons-round"),n.textContent="close",t.appendChild(n),e.g.appendChild(t),e.eventManager.o(n,"click",function(){_x(e)}),t=c(e.controls.g.adStatisticsList),n=t.next();!n.done;n=t.next())(n=n.value)in e.i?(e.g.appendChild(Ux(e,n)),e.C.push(n)):Y("Unrecognized ad statistic element:",n)}(this),this.eventManager.o(this.localization,"locale-updated",function(){Ox(i)}),this.eventManager.o(this.localization,"locale-changed",function(){Ox(i)}),this.eventManager.o(this.h,"click",function(){i.controls.Ba()&&(_x(i),Ox(i))}),this.eventManager.o(this.player,"loading",function(){fE(i.h,!1)}),this.eventManager.o(this.adManager,"ad-started",function(){fE(i.h,!0)})}function _x(e){e.g.classList.contains("shaka-hidden")?(e.j.textContent="insert_chart",e.l.ya(.1),fE(e.g,!0)):(e.j.textContent="insert_chart_outlined",e.l.stop(),fE(e.g,!1))}function Ox(e){e.u.textContent=e.localization.resolve("AD_STATISTICS"),e.h.ariaLabel=e.localization.resolve("AD_STATISTICS"),e.m.textContent=e.localization.resolve(e.g.classList.contains("shaka-hidden")?"OFF":"ON")}function Ux(e,t){var n=us("div"),i=us("label");return i.textContent=t+":",n.appendChild(i),(i=us("span")).textContent=e.B.get(t)(t),n.appendChild(i),e.s.set(t,i),n}function jx(){}function Bx(t,n){lE.call(this,t,n);var i=this;this.g=ls(),this.g.classList.add("shaka-airplay-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.h=us("i"),this.h.classList.add("material-icons-round"),this.h.textContent="airplay",this.g.appendChild(this.h),e.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden"),(t=us("label")).classList.add("shaka-overflow-button-label"),t.classList.add("shaka-overflow-menu-only"),this.j=us("span"),t.appendChild(this.j),this.i=us("span"),this.i.classList.add("shaka-current-selection-span"),t.appendChild(this.i),this.g.appendChild(t),this.parent.appendChild(this.g),Vx(this),Fx(this),this.eventManager.o(this.localization,"locale-updated",function(){Vx(i)}),this.eventManager.o(this.localization,"locale-changed",function(){Vx(i)}),this.eventManager.o(this.g,"click",function(){i.controls.Ba()&&i.controls.Jc().webkitShowPlaybackTargetPicker()}),t=this.controls.Jc(),this.eventManager.o(t,"webkitplaybacktargetavailabilitychanged",function(e){var t=i.player.m==Ph;fE(i.g,"available"==e.availability&&t)}),this.eventManager.o(t,"webkitcurrentplaybacktargetiswirelesschanged",function(){Fx(i)})}function Fx(e){var t=e.controls.Jc();e.g.ariaPressed=t&&t.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Vx(e){e.g.ariaLabel=e.localization.resolve("AIRPLAY"),e.j.textContent=e.localization.resolve("AIRPLAY")}function Gx(){}function Hx(t,n){lE.call(this,t,n);var i=this;this.g=document.createElement("canvas"),this.g.style.position="absolute",this.g.style.top="0",this.g.style.left="0",this.g.style.pointerEvents="none",this.parent.appendChild(this.g),Kx(this),this.i=this.h=null,e.ResizeObserver?(this.i=new ResizeObserver(function(){return Kx(i)}),this.i.observe(this.parent)):e.addEventListener("resize",function(){return Kx(i)})}function zx(e){return(e=e.g.getContext("2d"))?e:null}function Kx(e){e.g.width=e.parent.offsetWidth,e.g.height=e.parent.offsetHeight}function Wx(e,t,n,i){i=void 0===i?null:i,this.j=e,this.l=t,this.h=qx(this);var r="",a=!1;t.dataset&&t.dataset.shakaPlayerCastReceiverId?(r=(a=t.dataset).shakaPlayerCastReceiverId,a="true"===a.shakaPlayerCastAndroidReceiverCompatible):n.dataset&&n.dataset.shakaPlayerCastReceiverId&&(r=(a=n.dataset).shakaPlayerCastReceiverId,a="true"===a.shakaPlayerCastAndroidReceiverCompatible),r.length&&(this.h.castReceiverAppId=r,this.h.castAndroidReceiverCompatible=a),t.dataset.shakaPlayerContainer="",t.ui=this,this.vh()&&t.classList.add("shaka-mobile"),this.g=new lx(e,t,n,i,this.h),n.controls||e.Zh(t),t.ui=this,n.ui=this,this.i=null}function qx(t){var n="play_pause skip_next mute volume time_and_duration spacer overflow_menu".split(" ");if(e.chrome&&n.push("cast"),"remote"in HTMLMediaElement.prototype?n.push("remote"):e.WebKitPlaybackTargetAvailabilityEvent&&n.push("airplay"),n.push("fullscreen"),n={controlPanelElements:n,overflowMenuButtons:"captions quality language chapter picture_in_picture playback_rate recenter_vr toggle_stereoscopic save_video_frame".split(" "),statisticsList:"width height currentCodecs corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started overlayAds playedCompletely skipped errors".split(" "),contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},qualityMarks:{720:"",1080:"HD",1440:"2K",2160:"4K",4320:"8K"},trackLabelFormat:$x,textTrackLabelFormat:$x,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!1,forceLandscapeOnFullscreen:!1,enableTooltips:!0,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:t.l,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!1,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,defaultVrProjectionMode:"equirectangular",setupMediaSession:!0,preferVideoFullScreenInVisionOS:!1,showAudioCodec:!0,showVideoCodec:!0,castSenderUrl:"https://www.gstatic.
1com/cv/js/sender/v1/cast_sender.js"},t.vh()){n.addBigPlayButton=!0,n.singleClickForPlayAndPause=!1,n.seekOnTaps=!0,n.enableTooltips=!1,n.doubleClickForFullscreen=!1,n.enableFullscreenOnRotation=!0,n.forceLandscapeOnFullscreen=!0;var i=["play_pause","skip_next","volume"];n.controlPanelElements=n.controlPanelElements.filter(function(e){return!i.includes(e)}),n.overflowMenuButtons=n.overflowMenuButtons.filter(function(e){return!i.includes(e)}),n.contextMenuElements=n.contextMenuElements.filter(function(e){return!i.includes(e)})}else if(t.wh()){n.addBigPlayButton=!0,n.singleClickForPlayAndPause=!1,n.enableTooltips=!1,n.doubleClickForFullscreen=!1;var r="play_pause cast remote airplay volume save_video_frame".split(" ");n.controlPanelElements=n.controlPanelElements.filter(function(e){return!r.includes(e)}),n.overflowMenuButtons=n.overflowMenuButtons.filter(function(e){return!r.includes(e)}),n.contextMenuElements=n.contextMenuElements.filter(function(e){return!r.includes(e)})}return n}function Xx(){var e,t,n,i,r,a,o,s,u,l,d,h,p,f,g,m,v,y,b,T,E;return D(function(I){switch(I.g){case 1:if(jT(),!Ld())return Yx("shaka-ui-load-failed",Zx),I.return();if(e=document.querySelectorAll("[data-shaka-player-container]"),t=document.querySelectorAll("[data-shaka-player]"),n=document.querySelectorAll("[data-shaka-player-canvas]"),i=document.querySelectorAll("[data-shaka-player-vr-canvas]"),!t.length&&!e.length){I.A(2);break}if(t.length&&!e.length){for(r=c(t),a=r.next();!a.done;a=r.next())(o=a.value).ui||(s=document.createElement("div"),o.parentElement.replaceChild(s,o),s.appendChild(o),u=Qx(s,n,i),l=u.aj,d=u.Yj,Jx(s,o,l,d));I.A(2);break}h=c(e),p=h.next();case 4:if(p.done){I.A(2);break}if((f=p.value).ui){I.A(5);break}for(g=null,m=c(t),v=m.next();!v.done;v=m.next())if((y=v.value).parentElement==f){g=y;break}return g||((g=document.createElement("video")).setAttribute("playsinline",""),f.appendChild(g)),b=Qx(f,n,i),T=b.aj,E=b.Yj,A(I,7),S(I,Jx(f,g,T,E),9);case 9:x(I,5);break;case 7:return k(I),Yx("shaka-ui-load-failed",ek),I.return();case 5:p=h.next(),I.A(4);break;case 2:Yx("shaka-ui-loaded"),w(I)}})}function Yx(e,t){var n=null;null!=t&&(n={reasonCode:t}),e=new CustomEvent(e,{detail:n}),document.dispatchEvent(e)}function Jx(e,t,n,i){var r,a,o,s,u,l,d,h,p,f;return D(function(g){switch(g.g){case 1:for(r=new kd,a=new Wx(r,e,t,i||null),r.xi(n),t.controls&&a.g.Ej(!0),o=[],(s=t.getAttribute("src"))&&(o.push(s),t.removeAttribute("src")),u=c(t.getElementsByTagName("source")),l=u.next();!l.done;l=u.next())d=l.value,o.push(d.src),t.removeChild(d);return S(g,r.$b(t),2);case 2:h=c(o),p=h.next();case 3:if(p.done){g.A(0);break}return f=p.value,A(g,6),S(g,a.g.Sb().load(f),8);case 8:g.A(0);break;case 6:k(g);case 4:p=h.next(),g.A(3)}})}function Qx(e,t,n){for(var i=null,r=(t=c(t)).next();!r.done;r=t.next())if((r=r.value).parentElement==e){i=r;break}for(i||((i=document.createElement("canvas")).classList.add("shaka-canvas-container"),e.appendChild(i)),t=null,r=(n=c(n)).next();!r.done;r=n.next())if((r=r.value).parentElement==e){t=r;break}return{aj:i,Yj:t}}v(Nx,lE),Nx.prototype.release=function(){this.l.stop(),this.l=null,lE.prototype.release.call(this)},H("shaka.ui.AdStatisticsButton",Nx),jx.prototype.create=function(e,t){return new Nx(e,t)},Mx("ad_statistics",new jx),yE("ad_statistics",new jx),v(Bx,lE),H("shaka.ui.AirPlayButton",Bx),Gx.prototype.create=function(e,t){return new Bx(e,t)},Mx("airplay",new Gx),dx("airplay",new Gx),v(Hx,lE),Hx.prototype.cg=function(e,t){if("static"===(t=i({},e={type:"static",text:e,position:"top-right",color:"rgba(255, 255, 255, 0.7)",size:20,alpha:.7,interval:2e3,skip:500,displayDuration:2e3,transitionDuration:.5},t||e)).type){if(e=zx(this)){e.clearRect(0,0,this.g.width,this.g.height),e.globalAlpha=t.alpha,e.fillStyle=t.color,e.font=t.size+"px Arial";var n=e.measureText(t.text);switch(t.position){case"top-left":n=20;var r=t.size+20;break;case"top-right":n=this.g.width-n.width-20,r=t.size+20;break;case"bottom-left":n=20,r=this.g.height-20;break;case"bottom-right":n=this.g.width-n.width-20,r=this.g.height-20;break;default:n=(this.g.width-n.width)/2,r=(this.g.height+t.size)/2}e.fillText(t.text,n,r)}}else"dynamic"===t.type&&function(e,t){function n(){if(e.h){switch(r.clearRect(0,0,e.g.width,e.g.height),s){case"fadeIn":(o=Math.min(t.alpha,o+l))>=t.alpha&&(s="display");break;case"display":0>=--u&&(s="fadeOut");break;case"fadeOut":0>
1=(o=Math.max(0,o-l))&&(s="transition",a=i(),u=Math.round(60*t.displayDuration),s="fadeIn")}0<o&&(r.globalAlpha=o,r.fillStyle=t.color,r.font=t.size+"px Arial",r.fillText(t.text,a.left,a.top)),e.h&&(e.h=requestAnimationFrame(n))}}function i(){r.font=t.size+"px Arial";var n=r.measureText(t.text).width,i=t.size;return i=(n=[{left:20,top:i+20},{left:e.g.width-n-20,top:i+20},{left:20,top:e.g.height-20},{left:e.g.width-n-20,top:e.g.height-20},{left:(e.g.width-n)/2,top:(e.g.height+i)/2}])[c],c=(c+1)%n.length,i}var r=e.g.getContext("2d"),a={left:0,top:0},o=0,s="fadeIn",u=Math.round(60*t.displayDuration),l=1/(Math.round(60*t.transitionDuration)/2),c=0;a=i(),e.h=requestAnimationFrame(n)}(this,t)},Hx.prototype.Vf=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var e=zx(this);e&&e.clearRect(0,0,this.g.width,this.g.height)},Hx.prototype.release=function(){var t=this;this.g&&this.g.parentNode&&this.g.parentNode.removeChild(this.g),this.i?(this.i.disconnect(),this.i=null):e.removeEventListener("resize",function(){return Kx(t)}),lE.prototype.release.call(this)},H("shaka.ui.Watermark",Hx),Hx.prototype.removeWatermark=Hx.prototype.Vf,Hx.prototype.setTextWatermark=Hx.prototype.cg,(r=Wx.prototype).destroy=function(e){e=void 0!==e&&e;var t=this;return D(function(n){return 1==n.g?t.g?S(n,t.g.destroy(e),2):n.A(2):4!=n.g?(t.g=null,t.j?S(n,t.j.destroy(),4):n.A(4)):(t.j=null,t.i=null,void w(n))})},r.vh=function(){return"MOBILE"==Re().Ja()},r.wh=function(){return"TV"==Re().Ja()},r.getConfiguration=function(){var e=qx(this);return Kl(e,this.h,qx(this),{},""),e},r.configure=function(t,n){2==arguments.length&&"string"==typeof t&&(t=Wl(t,n));var r=i({},this.h);Kl(r,t,qx(this),{},"");var a=Xl(r,this.h);if(Object.keys(a).length&&(this.h=r,this.g.configure(this.h),this.g.dispatchEvent(new z("uiupdated")),(r=this.h.castSenderUrl)&&this.h.castReceiverAppId&&e.chrome&&!chrome.cast&&!this.wh())){a=!1;for(var o=c(document.getElementsByTagName("script")),s=o.next();!s.done;s=o.next())if(s.value.src===r){a=!0;break}a||((a=document.createElement("script")).src=r,a.defer=!0,document.head.appendChild(a))}},r.Bk=function(){return this.g},r.im=function(e){this.g.Vh(e)},r.cg=function(e,t){e&&!this.i&&this.l&&this.g&&(this.i=new Hx(this.l,this.g)),this.i&&this.i.cg(e,t)},r.Vf=function(){this.i&&this.i.Vf()},H("shaka.ui.Overlay",Wx),Wx.prototype.removeWatermark=Wx.prototype.Vf,Wx.prototype.setTextWatermark=Wx.prototype.cg,Wx.prototype.setEnabled=Wx.prototype.im,Wx.prototype.getControls=Wx.prototype.Bk,Wx.prototype.configure=Wx.prototype.configure,Wx.prototype.getConfiguration=Wx.prototype.getConfiguration,Wx.prototype.isSmartTV=Wx.prototype.wh,Wx.prototype.isMobile=Wx.prototype.vh,Wx.prototype.destroy=Wx.prototype.destroy;var $x=0;Wx.TrackLabelFormat={LANGUAGE:$x,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Zx=0,ek=1;function tk(e,t){if(!e&&!t)return"";switch(e){case"mul":return t.resolve("MULTIPLE_LANGUAGES");case"und":return t.resolve("UNDETERMINED_LANGUAGE");case"zxx":return t.resolve("NOT_APPLICABLE")}var n=ft(e);return e in Rc?Rc[e]:n in Rc?Rc[n]+" ("+e+")":t.resolve("UNRECOGNIZED_LANGUAGE")+" ("+e+")"}function nk(t,n,i){function r(){return ik(a)}lE.call(this,t,n);var a=this;this.m=this.controls.l,function(e,t){e.button=ls(),e.button.classList.add("shaka-overflow-button"),e.icon=us("i"),e.icon.classList.add("material-icons-round"),e.icon.textContent=t,e.button.appendChild(e.icon),t=us("label"),t.classList.add("shaka-overflow-button-label"),t.classList.add("shaka-overflow-menu-only"),t.classList.add("shaka-overflow-button-label-inline"),e.nameSpan=us("span"),t.appendChild(e.nameSpan),e.currentSelection=us("span"),e.currentSelection.classList.add("shaka-current-selection-span"),t.appendChild(e.currentSelection),e.button.appendChild(t),e.parent.appendChild(e.button)}(this,i),function(e){e.menu=us("div"),e.menu.classList.add("shaka-no-propagation"),e.menu.classList.add("shaka-show-controls-on-mouse-over"),e.menu.classList.add("shaka-settings-menu"),e.menu.classList.add("shaka-hidden"),e.backButton=ls(),e.backButton.classList.add("shaka-back-to-overflow-button"),e.menu.appendChild(e.backButton),e.eventManager.o(e.backButton,"click",function(){e.controls.Lc()});var t=us("i");t.classList.add("material-icons-round"),t.textContent="close",e.backButton.appendChild(t),e.backSpan=us("span"),e.backButton.appendChild(e.backS
1pan),e.controls.h.appendChild(e.menu)}(this),function(e){e.parent.classList.contains("shaka-overflow-menu")&&(e.backButton.firstChild.textContent="navigate_before",e.eventManager.o(e.menu,"click",function(){function t(e){return 0==e.classList.contains("shaka-hidden")}fE(e.menu,!1),fE(e.parent,!0),ne(e.parent.childNodes,t)&&ie(e.parent.childNodes,t)[0].focus(),bx(e.controls),ik(e)}))}(this),this.eventManager.o(this.button,"click",function(){a.controls.Ba()&&(a.menu.classList.contains("shaka-hidden")?(a.controls.dispatchEvent(new z("submenuopen")),fE(a.menu,!0),hE(a.menu),ik(a)):fE(a.menu,!1))}),this.j=null,e.ResizeObserver?(this.j=new ResizeObserver(r),this.j.observe(this.controls.l)):this.eventManager.o(e,"resize",r)}function ik(t){var n=t.menu.getBoundingClientRect(),i=e.getComputedStyle(t.menu),r=parseFloat(i.paddingTop);i=parseFloat(i.paddingBottom);var a=t.m.getBoundingClientRect();t.menu.style.maxHeight=n.bottom-a.top-r-i+"px"}function rk(e,t){nk.call(this,e,t,"language");var n=this;this.button.classList.add("shaka-language-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-audio-languages"),this.eventManager.o(this.localization,"locale-updated",function(){ok(n)}),this.eventManager.o(this.localization,"locale-changed",function(){ok(n)}),this.eventManager.o(this.player,"loading",function(){ak(n)}),this.eventManager.o(this.player,"loaded",function(){ak(n)}),this.eventManager.o(this.player,"unloading",function(){ak(n)}),this.eventManager.o(this.player,"audiotrackschanged",function(){ak(n)}),ok(this),ak(this)}function ak(e){!function(e,t,n,i,r,a,o,s){function u(e){var t="";return"aac"==e?t="AAC":"ac-3"===e?t="Dolby":"ec-3"===e?t="DD+":"ac-4"===e?t="Dolby AC-4":"opus"===e?t="Opus":"flac"===e&&(t="fLaC"),t?" "+t:t}function l(e){var t="";return 5<=e&&(t=" "+r.resolve("SURROUND")),t}function d(e,t,n,i,r,u){return t=[e,t,u],o&&null!=i&&t.push(i),s&&h(e)&&r&&t.push(r),n&&3==a&&t.push(n),t.join(": ")}function h(e){return f.has(e)&&1<f.get(e).size}for(var p=e.find(function(e){return 1==e.active}),f=new Map,g=c(e),m=g.next();!m.done;m=g.next())(m=m.value).codecs&&(f.has(m.language)||f.set(m.language,new Set),f.get(m.language).add(Li(m.codecs)));g=cE(t),hs(t),t.appendChild(g),g=new Set,p=p?d(p.language,p.roles.join(", "),p.label,p.channelsCount,p.codecs&&Li(p.codecs),p.spatialAudio):"";var v=(e=c(e)).next();for(m={};!v.done;m={Zb:void 0},v=e.next()){m.Zb=v.value,v=m.Zb.language;var y=m.Zb.roles.join(", "),b=m.Zb.label,T=m.Zb.channelsCount,S=m.Zb.codecs&&Li(m.Zb.codecs),w=m.Zb.spatialAudio,A=d(v,y,b,T,S,w);if(!g.has(A)){g.add(A);var E=ls();E.addEventListener("click",function(e){return function(){n(e.Zb)}}(m));var x=us("span");E.appendChild(x),x.textContent=tk(v,r);var k="";switch(s&&o&&w&&("ec-3"==S||"ac-4"==S)?k+=" Dolby Atmos":(s&&h(v)&&(k+=u(S)),o&&(k+=l(T))),a){case $x:x.textContent+=k;break;case 1:x.textContent+=k,y?x.textContent=y:(Y("Track #"+JSON.stringify(m.Zb)+" does not have a role, but the UI is configured to only show role."),x.textContent="?");break;case 2:x.textContent+=k,y&&(x.textContent+=": "+y);break;case 3:b?x.textContent=b:(Y("Track #"+JSON.stringify(m.Zb)+" does not have a label, but the UI is configured to only show labels."),x.textContent="?")}A==p&&(E.appendChild(pE()),x.classList.add("shaka-chosen-item"),E.ariaSelected="true",i.textContent=x.textContent),t.appendChild(E)}}}(e.player.getAudioTracks()||[],e.menu,function(t){e.player.zj(t),e.player.configure("preferredAudioLanguage",t.language),t.label&&e.player.configure("preferredAudioLabel",t.label),t.channelsCount&&e.player.configure("preferredAudioChannelCount",t.channelsCount),e.player.configure("preferSpatialAudio",t.spatialAudio)},e.currentSelection,e.localization,e.controls.g.trackLabelFormat,e.controls.g.showAudioChannelCountVariants,e.controls.g.showAudioCodec),hE(e.menu),e.controls.dispatchEvent(new z("languageselectionupdated")),e.button.setAttribute("shaka-status",e.currentSelection.innerText),fE(e.button,2<e.menu.getElementsByTagName("button").length)}function ok(e){e.backButton.ariaLabel=e.localization.resolve("BACK"),e.button.ariaLabel=e.localization.resolve("LANGUAGE"),e.nameSpan.textContent=e.localization.resolve("LANGUAGE"),e.backSpan.textContent=e.localization.resolve("LANGUAGE")}function sk(){}function uk(e,t){lE.call(this,e,t);var n=this;this.h=this.controls.D,this.g=ls(),this.g.classList.add("shaka-cast-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.i=us("i"),this.i.classList.add("material-icons-round"),this.i.textContent="cast",this.g.appendChild(this.i),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),e.classList.add("shaka-simple-overflow-button-label-inline"),this.l=us("span"),e.appendChild(this.l),this.j=us("span"),this.j.classList.add("shaka-current-selection-span"),e.appendChild(this.j),this.g.appendChild(e),this.parent.appendChild(this.g),dk(this),lk(this),this.eventManager.o(this.localization,"locale-updated",function(){dk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){dk(n)}),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&function(e){var t;D(function(n){return 1==n.g?e.h.Pa()?(e.h.Oj(),n.A(0)):(A(n,3),e.g.disabled=!0,S(n,e.h.cast(),5)):3!=n.g?(e.g.disabled=!1,x(n,0)):(t=k(n),e.g.disabled=!1,8004!=t.code&&e.controls.dispatchEvent(new z("error",(new Map).set("detail",t))),void w(n))})}(n)}),this.eventManager.o(this.controls,"caststatuschanged",function(){lk(n)})}
1function lk(e){var t=e.h.Dg()&&e.controls.oa,n=e.h.Pa();fE(e.g,t),e.i.textContent=n?"cast_connected":"cast",t&&(e.g.ariaPressed=n?"true":"false"),ck(e)}function ck(e){e.j.textContent=e.h.Pa()?e.h.Tf():e.localization.resolve("OFF")}function dk(e){e.g.ariaLabel=e.localization.resolve("CAST"),e.l.textContent=e.localization.resolve("CAST"),ck(e)}function hk(){}function pk(e,t){nk.call(this,e,t,"bookmarks");var n=this;this.button.classList.add("shaka-chapter-button"),this.menu.classList.add("shaka-chapters"),this.button.classList.add("shaka-tooltip-status"),this.g=[],this.h="und",this.eventManager.o(this.localization,"locale-updated",function(){fk(n),mk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){fk(n),mk(n)}),this.eventManager.o(this.player,"unloading",function(){gk(n),n.h="und",n.g=[]}),this.eventManager.o(this.player,"trackschanged",function(){mk(n)}),fk(this),mk(this)}function fk(e){e.backButton.ariaLabel=e.localization.resolve("BACK"),e.button.ariaLabel=e.localization.resolve("CHAPTERS"),e.nameSpan.textContent=e.localization.resolve("CHAPTERS"),e.backSpan.textContent=e.localization.resolve("CHAPTERS")}function gk(e){var t=cE(e.menu);hs(e.menu),e.menu.appendChild(t),fE(e.button,!1)}function mk(e){var t,n,i,r,a,o,s,u,l,d,h,p,f;D(function(g){switch(g.g){case 1:t=function(e,t){return!e&&!t||e.id===t.id&&e.title===t.title&&e.startTime===t.startTime&&e.endTime===t.endTime},n="und",i=[],r=e.localization.g,a=c(Array.from(r)),o=a.next();case 2:if(o.done){g.A(4);break}if(n=o.value,!e.player){g.A(5);break}return S(g,e.player.fh(n),6);case 6:i=g.h||[];case 5:if(i.length){g.A(4);break}o=a.next(),g.A(2);break;case 4:if(i.length){g.A(7);break}if(n="und",!e.player){g.A(7);break}return S(g,e.player.fh(n),9);case 9:i=g.h||[];case 7:if(s=n!==e.h,u=e.g.length!==i.length||!e.g.some(function(e,n){return n=i.at(n),t(e,n)||i.some(function(n){return t(e,n)})}),e.h=n,e.g=i,i.length){if(s||u){for(l=c(e.g),d=l.next(),h={};!d.done;h={Fg:void 0},d=l.next())h.Fg=d.value,p=ls(),(f=us("span")).classList.add("shaka-chapter"),f.textContent=h.Fg.title,p.appendChild(f),e.eventManager.o(p,"click",function(t){return function(){e.controls.Ba()&&(e.video.currentTime=t.Fg.startTime)}}(h)),e.menu.appendChild(p);fE(e.button,!0),hE(e.menu)}}else gk(e);w(g)}})}function vk(){}function yk(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-fast-forward-button"),this.g.classList.add("shaka-tooltip-status"),this.g.setAttribute("shaka-status","1x"),this.g.textContent="fast_forward",this.parent.appendChild(this.g),bk(this),this.h=this.controls.g.fastForwardRates,this.eventManager.o(this.localization,"locale-updated",function(){bk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){bk(n)}),this.eventManager.o(this.g,"click",function(){if(n.controls.Ba()&&n.video.duration){var e=n.h.indexOf(n.player.Xa())+1;e=e!=n.h.length?n.h[e]:n.h[0],n.video.paused&&n.video.play(),n.player.Sc(e),n.g.setAttribute("shaka-status",e+"x")}}),this.eventManager.o(this.player,"ratechange",function(){n.g.setAttribute("shaka-status",n.player.Xa()+"x")})}function bk(e){e.g.ariaLabel=e.localization.resolve("FAST_FORWARD")}function Tk(){}function Sk(e,t){lE.call(this,e,t);var n=this;this.h=this.controls.m,this.g=ls(),this.g.classList.add("shaka-fullscreen-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),wk(this),this.g.textContent="fullscreen",this.parent.appendChild(this.g),Ak(this),this.eventManager.o(this.localization,"locale-updated",function(){Ak(n)}),this.eventManager.o(this.localization,"locale-changed",function(){Ak(n)}),this.eventManager.o(this.g,"click",function(){return D(function(e){return n.controls.Ba()?S(e,n.controls.gg(),0):e.return()})}),this.eventManager.o(document,"fullscreenchange",function(){n.g.textContent=n.controls.Mc()?"fullscreen_exit":"fullscreen",Ak(n)}),this.eventManager.o(this.h,"loadedmetadata",function(){wk(n)}),this.eventManager.o(this.h,"loadeddata",function(){wk(n)}),this.eventManager.o(this.adManager,"ad-started",function(){wk(n)}),this.eventManager.o(this.adManager,"ad-stopped",function(){wk(n)})}function wk(e){e.controls.ke()?e.g.classList.remove("shaka-hidden"):e.g.classList.add("shaka-hidden")}function Ak(e){var t=e.controls.Mc()?"EXIT_FULL_SCREEN":"FULL_SCREEN";e.g.ariaLabel=e.localization.resolve(t)}function Ek(){}function xk(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-loop-button"),this.g.classList.add("shaka-tooltip"),this.i=us("i"),this.i.classList.add("material-icons-round"),this.i.textContent="repeat",this.g.appendChild(this.i),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),e.classList.add("shaka-simple-overflow-button-label-inline"),this.l=us("span"),this.l.textContent=this.localization.resolve("LOOP"),e.appendChild(this.l),this.j=us("span"),this.j.classList.add("shaka-current-selection-span"),e.appendChild(this.j),this.g.appendChild(e),kk(this),this.parent.appendChild(this.g),this.eventManager.o(this.localization,"locale-updated",function(){kk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){kk(n)}),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&(n.video.loop=!n.video.loop,n.h.Ka(),n.h.ya(1))}),this.m=this.video.loop,this.h=new Ki(function(){n.m!=n.video.loop&&(kk(n),n.m=n.video.loop)}),this.h.ya(1),this.eventManager.o(this.player,"unloading",function(){Ik(n)}),this.eventManager.o(this.player,"loaded",function(){Ik(n)}),this.eventManager.o(this.player,"manifestupdated",function(){Ik(n)}),this.eventManager.o(this.video,"durationchange",function(){Ik(n)})}function kk(e){e.l.textContent=e.localization.resolve("LOOP"),e.j.textContent=e.localization.resolve(e.video.loop?"ON":"OFF"),e.i.textContent=e.video.loop?"repeat_on":"repeat",e.g.ariaLabel=e.localization.resolve(e.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}function Ik(e){fE(e.g,!e.player.T())}function Ck(){}function Mk(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-mute-button"),this.g.classList.add("shaka-tooltip"),this.h=us("i"),this.h.classList.add("material-icons-round"),this.h.textContent="volume_up",this.g.appendChild(this.h),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),this.i=us("span"),this.i.textContent=this.localization.resolve("MUTE"),e.appendChild(this.i),this.j=us("span"),this.j.classList.add("shaka-current-selection-span"),e.appendChild(this.j),this.g.appendChild(e),this.parent.appendChild(this.g),Lk(this),Rk(this),this.eventManager.o(this.localization,"locale-updated",function(){Lk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){Lk(n)}),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&(n.ad&&n.ad.isLinear()?n.ad.setMuted(!n.ad.isMuted()):n.video.muted||0!=n.video.volume?n.video.muted=!n.video.muted:n.video.volume=1)}),this.eventManager.o(this.video,"volumechange",function(){Lk(n),Rk(n)}),this.eventManager.o(this.player,"loading",function(){Lk(n),Rk(n)}),this.eventManager.o(this.player,"loaded",function(){Pk(n)}),this.eventManager.o(this.player,"unloading",function(){Pk(n)}),this.eventManager.o(this.player,"trackschanged",function(){Pk(n)}),this.eventManager.o(this.controls,"caststatuschanged",function(){Lk(n),Rk(n)}),this.eventManager.o(this.adManager,"ad-volume-changed",function(){Lk(n),Rk(n)}),this.eventManager.o(this.adManager,"ad-muted",function(){Lk(n),Rk(n)}),this.eventManager.o(this.adManager,"ad-started",function(){Pk(n)}),this.eventManager.o(this.adManager,"ad-stopped",function(){n.ad=null,Lk(n),Rk(n),Pk(n)}),Pk(this)}
1function Lk(e){var t=e.ad?e.ad.isMuted()?"UNMUTE":"MUTE":e.video.muted||0==e.video.volume?"UNMUTE":"MUTE";e.g.ariaLabel=e.localization.resolve(t),e.i.textContent=e.localization.resolve(t)}function Rk(e){var t=e.ad?e.ad.isMuted()?"volume_off":"volume_up":e.video.muted||0==e.video.volume?"volume_off":"volume_up";e.h.textContent=t}function Pk(e){var t=!0;e.ad&&e.ad.isLinear()?t=!0:e.player.xh()&&(t=!1),fE(e.g,t)}function Dk(){}function Nk(t,n){lE.call(this,t,n);var i=this;this.l=this.controls.m,this.g=ls(),this.g.classList.add("shaka-pip-button"),this.g.classList.add("shaka-tooltip"),this.i=us("i"),this.i.classList.add("material-icons-round"),this.i.textContent="picture_in_picture_alt",this.g.appendChild(this.i),(t=us("label")).classList.add("shaka-overflow-button-label"),t.classList.add("shaka-overflow-menu-only"),t.classList.add("shaka-simple-overflow-button-label-inline"),this.j=us("span"),this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE"),t.appendChild(this.j),this.h=us("span"),this.h.classList.add("shaka-current-selection-span"),t.appendChild(this.h),this.g.appendChild(t),Uk(this),this.parent.appendChild(this.g),this.controls.yf()||fE(this.g,!1),this.eventManager.o(this.localization,"locale-updated",function(){Uk(i)}),this.eventManager.o(this.localization,"locale-changed",function(){Uk(i)}),this.eventManager.o(this.g,"click",function(){i.controls.Ba()&&i.controls.pd()}),this.eventManager.o(this.l,"enterpictureinpicture",function(){_k(i)}),this.eventManager.o(this.l,"leavepictureinpicture",function(){Ok(i)}),this.eventManager.o(this.controls,"caststatuschanged",function(){jk(i)}),this.eventManager.o(this.player,"trackschanged",function(){jk(i)}),"documentPictureInPicture"in e&&this.eventManager.o(e.documentPictureInPicture,"enter",function(e){_k(i),i.eventManager.qa(e.window,"pagehide",function(){Ok(i)})})}function _k(e){e.i.textContent="branding_watermark",e.g.ariaLabel=e.localization.resolve("EXIT_PICTURE_IN_PICTURE"),e.h.textContent=e.localization.resolve("ON")}function Ok(e){e.i.textContent="picture_in_picture_alt",e.g.ariaLabel=e.localization.resolve("ENTER_PICTURE_IN_PICTURE"),e.h.textContent=e.localization.resolve("OFF")}function Uk(e){e.j.textContent=e.localization.resolve("PICTURE_IN_PICTURE");var t=e.controls.le();e.g.ariaLabel=e.localization.resolve(t?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"),e.h.textContent=e.localization.resolve(t?"ON":"OFF")}function jk(e){D(function(t){return e.controls.yf()?e.player&&e.player.Cd()?(fE(e.g,!1),e.controls.le()?S(t,e.controls.pd(),0):t.A(0)):(fE(e.g,!0),t.A(0)):(fE(e.g,!1),e.controls.le()?S(t,e.controls.pd(),0):t.A(0))})}function Bk(){}function Fk(e,t){nk.call(this,e,t,"slow_motion_video");var n=this;this.button.classList.add("shaka-playbackrate-button"),this.menu.classList.add("shaka-playback-rates"),this.button.classList.add("shaka-tooltip-status"),Array.from(e.classList).includes("shaka-overflow-menu")||(this.g=us("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),this.button.appendChild(this.g)),this.eventManager.o(this.localization,"locale-updated",function(){Vk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){Vk(n)}),this.eventManager.o(this.player,"loaded",function(){Gk(n)}),this.eventManager.o(this.player,"ratechange",function(){Gk(n)}),Vk(this),function(e){for(var t=c(e.controls.g.playbackRates),n=t.next(),i={};!n.done;i={Sf:void 0},n=t.next()){i.Sf=n.value,n=ls();var r=us("span");r.textContent=i.Sf+"x",n.appendChild(r),e.eventManager.o(n,"click",function(t){return function(){t.Sf==e.video.defaultPlaybackRate?e.player.td():e.player.Sc(t.Sf,!1)}}(i)),e.menu.appendChild(n)}hE(e.menu)}(this),Gk(this)}function Vk(e){e.backButton.ariaLabel=e.localization.resolve("BACK"),e.button.ariaLabel=e.localization.resolve("PLAYBACK_RATE"),e.nameSpan.textContent=e.localization.resolve("PLAYBACK_RATE"),e.backSpan.textContent=e.localization.resolve("PLAYBACK_RATE")}function Gk(e){var t=e.player.Xa(),n=dE(e.menu,"material-icons-round shaka-chosen-item");if(n){var i=n.parentElement;i.removeAttribute("aria-selected"),i.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item"),i.removeChild(n)}(n=Array.from(e.menu.querySelectorAll("span")).find(function(e){return e.textContent==t+"x"}))&&((i=n.parentElement).appendChild(pE()),i.ariaSelected="true",n.classList.add("shaka-chosen-item")),e.currentSelection.textContent=t+"x",e.button.setAttribute("shaka-status",t+"x"),e.g&&(e.g.textContent=t+"x")}function Hk(){}function zk(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-current-time"),Kk(this,"0:00"),this.parent.appendChild(this.g),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&n.player.T()&&(n.video.currentTime=n.player.xa().end)}),this.eventManager.o(this.player,"loading",function(){fE(n.g,!0)}),this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var e=n.controls.R,t=n.controls.gh(),i=n.player.xa(),r=i.end-i.start;isFinite(r)?n.player.T()?(r=3600<=r,1<=(t=Math.max(0,Math.floor(i.end-t)))||e?(Kk(n,"- "+gE(t,r)),n.g.disabled=!1):(Kk(n,n.localization.resolve("LIVE")),n.g.disabled=!0)):(e=3600<=r,t=gE(Math.max(0,t-i.start),e),r&&(t+=" / "+gE(r,e)),Kk(n,t),n.g.disabled=!0):(Kk(n,n.localization.resolve("LIVE")),n.g.disabled=!0)}),this.eventManager.o(this.player,"trackschanged",function(){n.player.T()&&(n.g.ariaLabel=n.localization.resolve("SKIP_TO_LIVE"))}),this.eventManager.o(this.adManager,"ad-started",function(){fE(n.g,!n.ad.isLinear())}),this.eventManager.o(this.adManager,"ad-stopped",function(){fE(n.g,!0)})}function Kk(e,t){t!=e.g.textContent&&(e.g.textContent=t)}function Wk(){}function qk(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-recenter-vr-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.h=us("i"),this.h.classList.add("material-icons-round"),this.h.textContent="control_camera",this.g.appendChild(this.h),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),this.j=us("span"),e.appendChild(this.j),this.i=us("span"),this.i.classList.add("shaka-current-selection-span"),e.appendChild(this.i),this.g.appendChild(e),this.parent.appendChild(this.g),Xk(this),this.eventManager.o(this.localization,"locale-updated",function(){Xk(n)}),this.eventManager.o(this.localization,"locale-changed",function(){Xk(n)});var i=this.controls.C;this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&(i.g?tx(i.g):Y("Not playing VR content"))}),this.eventManager.o(i,"vrstatuschanged",function(){fE(n.g,n.controls.Tb())}),fE(this.g,this.controls.Tb())}function Xk(e){e.g.ariaLabel=e.localization.resolve("RECENTER_VR"),e.j.textContent=e.localization.resolve("RECENTER_VR")}function Yk(){}function Jk(e,t){lE.call(this,e,t);var n=this;this.j=Re().eg(),this.g=ls(),this.g.classList.add("shaka-remote-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.i=us("i"),this.i.classList.add("material-icons-round"),this.i.textContent=this.j?"airplay":"cast",this.g.appendChild(this.i),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),this.m=us("span"),e.appendChild(this.m),this.l=us("span"),this.l.classList.add("shaka-current-selection-span"),e.appendChild(this.l),this.g.appendChild(e),this.parent.appendChild(this.g),this.h=-1,$k(this),fE(this.g,!1),this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){$k(n)}),this.eventManager.o(this.localization,"locale-changed",function(){$k(n)}),this.eventManager.o(this.controls,"caststatuschanged",function(){Qk(n)}),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&n.video.remote.prompt()}),this.eventManager.o(this.video.remote,"connect",function(){Qk(n),Zk(n)}),this.eventManager.o(this.video.remote,"connecting",function(){Qk(n),Zk(n)}),this.eventManager.o(this.video.remote,"disconnect",function(){Qk(n),Zk(n)}),this.eventManager.o(this.player,"loaded",function(){Qk(n)}),Qk(this,!0),Zk(this)):this.g.classList.add("shaka-hidden")}function Qk(e,t){var n,i;
1t=void 0!==t&&t,D(function(r){switch(r.g){case 1:if(e.controls.D.Dg()&&e.controls.oa||!e.video.remote){fE(e.g,!1),-1!=e.h&&(e.video.remote.cancelWatchAvailability(e.h),e.h=-1),r.A(0);break}if("disconnected"==e.video.remote.state||t){if(n=function(t){if(e.player){var n=e.video.disableRemotePlayback,i=!0;Re().eg()&&e.player.m==Rh&&"HLS"!=e.player.jh()&&(i=!1),fE(e.g,i&&t&&!n)}else fE(e.g,!1)},A(r,7),-1==e.h){r.A(9);break}return S(r,e.video.remote.cancelWatchAvailability(e.h),10)}if(fE(e.g,!0),-1==e.h){r.A(0);break}return S(r,e.video.remote.cancelWatchAvailability(e.h),6);case 6:e.h=-1,r.A(0);break;case 10:e.h=-1;case 9:x(r,8);break;case 7:k(r);case 8:return A(r,11),S(r,e.video.remote.watchAvailability(n),13);case 13:i=r.h,e.h=i,x(r,0);break;case 11:k(r),n(!0),w(r)}})}function $k(e){var t=e.j?e.localization.resolve("AIRPLAY"):e.localization.resolve("CAST");e.g.ariaLabel=t,e.m.textContent=t}function Zk(e){e.j||(e.i.textContent="disconnected"==e.video.remote.state?"cast":"cast_connected")}function eI(){}function tI(e,t){nk.call(this,e,t,"tune");var n=this;this.button.classList.add("shaka-resolution-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-resolutions"),this.h=us("span"),this.h.classList.add("shaka-current-auto-quality"),this.h.style.display="none",this.i=us("sup"),this.i.classList.add("shaka-current-quality-mark"),this.i.style.display="none",Array.from(e.classList).includes("shaka-overflow-menu")?this.parent.parentElement&&(this.g=function(e){return(e=e.getElementsByClassName("shaka-overflow-quality-mark")).length?e[0]:null}(this.parent.parentElement)):(this.g=us("span"),this.g.classList.add("shaka-overflow-playback-rate-mark"),this.button.appendChild(this.g)),e=us("span"),this.button.childNodes[1].appendChild(e),e.appendChild(this.currentSelection),e.appendChild(this.h),e.appendChild(this.i),this.eventManager.o(this.localization,"locale-updated",function(){sI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){sI(n)}),this.eventManager.o(this.player,"loading",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"loaded",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"unloading",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"variantchanged",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"trackschanged",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"abrstatuschanged",function(){rI(n),nI(n)}),this.eventManager.o(this.player,"adaptation",function(){rI(n),nI(n)}),rI(this)}function nI(e){var t=e.player.getConfiguration().abr.enabled;if(e.player.Cd()){e.i.textContent="",e.i.style.display="none",e.g&&(e.g.textContent="",e.g.style.display="none");var n=e.player.qb()||[],i=n.find(function(e){return e.active});i&&(t?(e.h.textContent=i.bandwidth?oI(e,i,n):"Unknown",e.h.style.display=""):e.h.style.display="none")}else(i=(n=e.player.getVideoTracks()||[]).find(function(e){return e.active}))?(t?(e.h.textContent=i.height&&i.width?aI(e,i,n):i.bandwidth?Math.round(i.bandwidth/1e3)+" kbits/s":"Unknown",e.h.style.display=""):e.h.style.display="none",t=iI(e,i.width,i.height),e.i.textContent=t,e.i.style.display=""!==t?"":"none",e.g&&(e.g.textContent=t,e.g.style.display=""!==t?"":"none")):e.g&&(t=e.player.getStats(),t=iI(e,t.width,t.height),e.g.textContent=t,e.g.style.display=""!==t?"":"none")}function iI(e,t,n){return t&&n?(n>t&&(t=(n=c([n,t])).next().value,n=n.next().value),t/n>16/9&&(n=Math.round(9*t/16)),e=e.controls.g.qualityMarks,8640<=n?n+"p":4320<=n?e[4320]:2160<=n?e[2160]:1440<=n?e[1440]:1080<=n?e[1080]:720<=n?e[720]:""):""}function rI(e){var t=cE(e.menu);hs(e.menu),e.menu.appendChild(t),t=0,t=e.player.Cd()?function(e){var t=[];e.player.m==Ph||e.player.Ca()||(t=e.player.qb()||[]);var n=t.find(function(e){return e.active});n&&(t=t.filter(function(t){if(t.language!=n.language||e.controls.g.showAudioChannelCountVariants&&t.channelsCount&&n.channelsCount&&t.channelsCount!=n.channelsCount)return!1;var i=e.controls.g.trackLabelFormat;return!((1==i||2==i)&&JSON.stringify(t.audioRoles)!=JSON.stringify(n.audioRoles)||3==i&&t.label!=n.label||!t.bandwidth)})),t=t.filter(function(e,n){return t.findIndex(function(t){return t.bandwidth==e.bandwidth})==n}),t.sort(function(e,t){return t.bandwidth-e.bandwidth});for(var i=e.player.getConfiguration().abr.enabled,r=c(t),a=r.next(),o={};!a.done;o={De:void 0},a=r.next()){o.De=a.value,(a=ls()).classList.add("explicit-resolution"),e.eventManager.o(a,"click",function(t){return function(){var n=t.De;e.player.configure({abr:{enabled:!1}}),e.player.ye(n,e.controls.g.clearBufferOnQualityChange)}}(o));var s=us("span");s.textContent=o.De.bandwidth?oI(e,o.De,t):"Unknown",a.appendChild(s),i||o.De!=n||(a.ariaSelected="true",a.appendChild(pE()),s.classList.add("shaka-chosen-item"),e.currentSelection.textContent=s.textContent),e.menu.appendChild(a)}return t.length}(e):function(e){var t=e.player.getVideoTracks()||[],n=t.find(function(e){return e.active});t=t.filter(function(n,i){return t.findIndex(function(t){var i=t.height==n.height&&t.bandwidth==n.bandwidth&&t.frameRate==n.frameRate&&t.hdr==n.hdr&&t.videoLayout==n.videoLayout;return i&&e.controls.g.showVideoCodec&&t.codecs&&n.codecs&&(i=Li(t.codecs)==Li(n.codecs)),i})==i}),t.sort(function(e,t){return t.height==e.height||null==e.height||null==t.height?t.bandwidth-e.bandwidth:t.height-e.height});for(var i=e.player.getConfiguration().abr.enabled,r=c(t),a=r.next(),o={};!a.done;o={jc:void 0},a=r.next()){o.jc=a.value,(a=ls()).classList.add("explicit-resolution"),e.eventManager.o(a,"click",function(t){return function(){var n=t.jc;e.player.configure({abr:{enabled:!1}}),e.player.Aj(n,e.controls.g.clearBufferOnQualityChange)}}(o));var s=us("span");s.textContent=o.jc.height&&o.jc.width?aI(e,o.jc,t):o.jc.bandwidth?Math.round(o.jc.bandwidth/1e3)+" kbits/s":"Unknown",a.appendChild(s);var u=iI(e,o.jc.width,o.jc.height);if(""!==u){var l=us("sup");l.classList.add("shaka-quality-mark"),l.textContent=u,a.appendChild(l)}i||o.jc!=n||(a.ariaSelected="true",a.appendChild(pE()),s.classList.add("shaka-chosen-item"),e.currentSelection.textContent=s.textContent),e.menu.appendChild(a)}return t.length}(e);var n=ls();n.classList.add("shaka-enable-abr-button"),e.eventManager.o(n,"click",function(){e.player.configure({abr:{enabled:!0}}),rI(e)}),e.l=us("span"),e.l.textContent=e.localization.resolve("AUTO_QUALITY"),n.appendChild(e.l),e.player.getConfiguration().abr.enabled&&(n.ariaSelected="true",n.appendChild(pE()),e.l.classList.add("shaka-chosen-item"),e.currentSelection.textContent=e.localization.resolve("AUTO_QUALITY")),e.button.setAttribute("shaka-status",e.currentSelection.textContent),e.menu.appendChild(n),hE(e.menu),e.controls.dispatchEvent(new z("resolutionselectionupdated")),sI(e),fE(e.button,0<t)}
1function aI(e,t,n){function i(e,t){return e!=t&&e.height==t.height&&e.hdr==t.hdr&&Math.round(e.frameRate||0)==Math.round(t.frameRate||0)}var r=t.height||0,a=t.width||0;r>a&&(a=(r=c([r,a])).next().value,r=r.next().value);var o=r;a/r>16/9&&(o=Math.round(9*a/16)),a=o+"p",r=new Set;for(var s=(o=c(n)).next();!s.done;s=o.next())(s=s.value).frameRate&&r.add(Math.round(s.frameRate));if(1<r.size&&(r=t.frameRate)&&(50<=r||20>=r)&&(a+=Math.round(t.frameRate)),"PQ"!=t.hdr&&"HLG"!=t.hdr||(a+=" HDR"),(t.videoLayout||"").includes("CH-STEREO")&&(a+=" 3D"),n.some(function(e){return i(t,e)})&&(n.some(function(e){return i(t,e)&&e.bandwidth==t.bandwidth})||(a+=" ("+Math.round(t.bandwidth/1e3)+" kbits/s)"),e.controls.g.showVideoCodec)){var u=function(e){var t="";return e&&(t=(e=Li(e)).startsWith("dovi-")?"Dolby Vision":e.toUpperCase()),t?" "+t:t};n.some(function(e){return i(t,e)&&u(e.codecs)!=u(t.codecs)})&&(a+=u(t.codecs))}return a}function oI(e,t,n){var i=Math.round(t.bandwidth/1e3)+" kbits/s";if(e.controls.g.showAudioCodec){var r=function(e){var t="";return e&&(t=Li(e).toUpperCase()),t?" "+t:t};n.some(function(e){return r(e.codecs)!=r(t.codecs)})&&(i+=r(t.codecs))}return i}function sI(e){var t=e.player.Cd()?"QUALITY":"RESOLUTION";e.button.ariaLabel=e.localization.resolve(t),e.backButton.ariaLabel=e.localization.resolve(t),e.backSpan.textContent=e.localization.resolve(t),e.nameSpan.textContent=e.localization.resolve(t),e.l.textContent=e.localization.resolve("AUTO_QUALITY"),e.player.getConfiguration().abr.enabled&&(e.currentSelection.textContent=e.localization.resolve("AUTO_QUALITY"))}function uI(){}function lI(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-rewind-button"),this.g.classList.add("shaka-tooltip-status"),this.g.setAttribute("shaka-status",this.localization.resolve("OFF")),this.g.textContent="fast_rewind",this.parent.appendChild(this.g),cI(this),this.h=this.controls.g.rewindRates,this.eventManager.o(this.localization,"locale-updated",function(){cI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){cI(n)}),this.eventManager.o(this.g,"click",function(){if(n.controls.Ba()&&n.video.duration){var e=n.h.indexOf(n.player.Xa())+1;e=e!=n.h.length?n.h[e]:n.h[0],n.video.paused&&n.video.play(),n.player.Sc(e),n.g.setAttribute("shaka-status",e+"x")}}),this.eventManager.o(this.player,"ratechange",function(){n.g.setAttribute("shaka-status",n.player.Xa()+"x")})}function cI(e){e.g.ariaLabel=e.localization.resolve("REWIND")}function dI(){}function hI(e,t){lE.call(this,e,t);var n=this;this.l=this.controls.D,this.g=ls(),this.g.classList.add("shaka-save.video-frame-button"),this.g.classList.add("shaka-tooltip"),this.h=us("i"),this.h.classList.add("material-icons-round"),this.h.textContent="download",this.g.appendChild(this.h),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),this.i=us("span"),this.i.textContent=this.localization.resolve("DOW
1NLOAD_VIDEO_FRAME"),e.appendChild(this.i),this.j=us("span"),this.j.classList.add("shaka-current-selection-span"),e.appendChild(this.j),this.g.appendChild(e),fI(this),this.parent.appendChild(this.g),this.eventManager.o(this.localization,"locale-updated",function(){fI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){fI(n)}),this.eventManager.o(this.g,"click",function(){var e=document.createElement("canvas"),t=e.getContext("2d"),i=n.controls.m;e.width=i.videoWidth,e.height=i.videoHeight,t.drawImage(i,0,0,e.width,e.height),e=e.toDataURL("image/png"),(t=document.createElement("a")).href=e,t.download="videoframe_"+i.currentTime.toFixed(3)+".png",t.click()}),this.eventManager.o(this.controls.C,"vrstatuschanged",function(){pI(n)}),this.eventManager.o(this.adManager,"ad-started",function(){pI(n)}),this.eventManager.o(this.adManager,"ad-stopped",function(){pI(n)}),this.eventManager.o(this.player,"unloading",function(){pI(n)}),this.eventManager.o(this.player,"loaded",function(){pI(n)}),this.eventManager.o(this.video,"play",function(){pI(n)}),this.eventManager.o(this.video,"pause",function(){pI(n)}),this.eventManager.o(this.video,"seeking",function(){pI(n)}),this.eventManager.o(this.controls,"caststatuschanged",function(){pI(n)}),pI(this)}function pI(e){var t=!0;e.controls.Tb()&&(t=!1),t&&e.l.Pa()&&(t=!1),t&&(e.player.drmInfo()||e.player.Cd())&&(t=!1),t&&e.ad&&(t=!1),t&&e.video.remote&&"disconnected"!=e.video.remote.state&&(t=!1),fE(e.g,t)}
1function fI(e){e.g.ariaLabel=e.localization.resolve("DOWNLOAD_VIDEO_FRAME"),e.i.textContent=e.localization.resolve("DOWNLOAD_VIDEO_FRAME")}function gI(){}function mI(e,t){lE.call(this,e,t);var n=this;(this.h=this.player.lh())&&(this.g=ls(),this.g.classList.add("shaka-skip-next-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.g.textContent="skip_next",this.parent.appendChild(this.g),vI(this),yI(this),this.eventManager.o(this.localization,"locale-updated",function(){vI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){vI(n)}),this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&n.h.playItem(n.h.getCurrentItemIndex()+1)}),this.eventManager.o(this.h,"currentitemchanged",function(){yI(n)}),this.eventManager.o(this.h,"itemsinserted",function(){yI(n)}),this.eventManager.o(this.h,"itemsremoved",function(){yI(n)}),this.eventManager.o(this.player,"loading",function(){yI(n)}))}function vI(e){e.g.ariaLabel=e.localization.resolve("SKIP_NEXT")}function yI(e){var t=e.h.getItems().length;t=1<t&&e.h.getCurrentItemIndex()+1<t,fE(e.g,t)}function bI(){}function TI(e,t){TE.call(this,e,t),this.button.classList.add("shaka-small-play-button"),this.button.classList.add("material-icons-round"),this.button.classList.add("shaka-tooltip")}function SI(){}function wI(e,t){lE.call(this,e,t),(e=us("div")).classList.add("shaka-spacer"),e.ariaHidden="true",this.parent.appendChild(e)}function AI(){}function EI(e,t){function n(e){return 2e9<(e=parseInt(l.g[e],10))?(e/1e9).toFixed(2)+"GB":1e6<e?(e/1e6).toFixed(2)+"MB":1e3<e?(e/1e3).toFixed(2)+"KB":e+"B"}function i(e){return l.g[e]+" (gaps)"}function r(e){return gE(l.g[e],!1)+" (m)"}function a(e){return Math.round(l.g[e]/1e3)+" (kbits/s)"}function o(e){return l.g[e].toFixed(2)+" (s)"}function s(e){return l.g[e]+" (frames)"}function u(e){return l.g[e]+" (px)"}lE.call(this,e,t);var l=this;this.i=ls(),this.i.classList.add("shaka-statistics-button"),this.j=us("i"),this.j.classList.add("material-icons-round"),this.j.textContent="insert_chart_outlined",this.i.appendChild(this.j),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-simple-overflow-button-label-inline"),this.u=us("span"),e.appendChild(this.u),this.m=us("span"),this.m.classList.add("shaka-current-selection-span"),e.appendChild(this.m),this.i.appendChild(e),this.parent.appendChild(this.i),this.h=us("div"),this.h.classList.add("shaka-no-propagation"),this.h.classList.add("shaka-show-controls-on-mouse-over"),this.h.classList.add("shaka-statistics-container"),this.h.classList.add("shaka-hidden"),this.controls.h.appendChild(this.h),this.C=[],this.D=["stateHistory","switchHistory"],this.g=this.player.getStats(),this.s=new Map,this.B=(new Map).set("width",u).set("height",u).set("currentCodecs",function(e){return l.g[e]}).set("completionPercent",function(e){return l.g[e]+" (%)"}).set("bufferingTime",o).set("drmTimeSeconds",o).set("licenseTime",o).set("liveLatency",o).set("loadLatency",o).set("manifestTimeSeconds",o).set("estimatedBandwidth",a).set("streamBandwidth",a).set("maxSegmentDuration",o).set("pauseTime",r).set("playTime",r).set("corruptedFrames",s).set("decodedFrames",s).set("droppedFrames",s).set("stallsDetected",function(e){return l.g[e]+" (stalls)"}).set("gapsJumped",i).set("manifestSizeBytes",n).set("bytesDownloaded",n).set("nonFatalErrorCount",function(e){return l.g[e]+" (errors)"}).set("manifestPeriodCount",function(e){return l.g[e]+" (periods)"}).set("manifestGapCount",i),this.l=new Ki(function(){l.g=l.player.getStats();for(var e=c(l.C),t=e.next();!t.done;t=e.next()){var n=t.value;(t=l.s.get(n)).textContent=l.B.get(n)(n),t&&t.parentElement&&(n=l.g[n],fE(t.parentElement,"string"==typeof n?""!=n:!isNaN(n)))}}),kI(this),function(e){var t=us("div");t.classList.add("shaka-no-propagation"),t.classList.add("shaka-statistics-close");var n=us("i");for(n.classList.add("material-icons"),n.classList.add("notranslate"),n.classList.add("material-icons-round"),n.textContent="close",t.appendChild(n),e.h.appendChild(t),e.eventManager.o(n,"click",function(){xI(e)}),t=c(e.controls.g.statisticsList),n=t.next();!n.done;n=t.next())if((n=n.value)in e.g&&!e.D.includes(n)){var i=II(e,n);e.h.appendChild(i),e.C.push(n)}else Y("Unrecognized statistic element:",n)}(this),this.eventManager.o(this.localization,"locale-updated",function(){kI(l)}),this.eventManager.o(this.localization,"locale-changed",function(){kI(l)}),this.eventManager.o(this.i,"click",function(){xI(l),kI(l)})}function xI(e){e.h.classList.contains("shaka-hidden")?(e.j.textContent="insert_chart",e.l.ya(.1),fE(e.h,!0)):(e.j.textContent="insert_chart_outlined",e.l.stop(),fE(e.h,!1))}function kI(e){e.u.textContent=e.localization.resolve("STATISTICS"),e.i.ariaLabel=e.localization.resolve("STATISTICS"),e.m.textContent=e.localization.resolve(e.h.classList.contains("shaka-hidden")?"OFF":"ON")}function II(e,t){var n=us("div"),i=us("label");return i.textContent=t+":",n.appendChild(i),(i=us("span")).textContent=e.B.get(t)(t),n.appendChild(i),e.s.set(t,i),n}function CI(){}function MI(e,t){nk.call(this,e,t,"closed_caption");var n=this;this.button.classList.add("shaka-caption-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-text-languages"),this.player&&this.player.fd()?this.button.ariaPressed="true":this.button.ariaPressed="false",function(e){var t=ls();t.ariaSelected="true",e.menu.appendChild(t),t.appendChild(pE()),e.g=us("span"),t.appendChild(e.g)}(this),this.eventManager.o(this.localization,"locale-updated",function(){PI(n),RI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){PI(n),RI(n)}),this.eventManager.o(this.player,"loading",function(){LI(n),RI(n)}),this.eventManager.o(this.player,"loaded",function(){LI(n),RI(n)}),this.eventManager.o(this.player,"unloading",function(){LI(n),RI(n)}),this.eventManager.o(this.player,"texttrackvisibility",function(){LI(n),RI(n)}),this.eventManager.o(this.player,"textchanged",function(){RI(n)}),this.eventManager.o(this.player,"trackschanged",function(){RI(n)}),LI(this),PI(this),RI(this)}function LI(e){e.player.fd()?(e.icon.textContent="closed_caption",e.button.ariaPressed="true"):(e.icon.textContent="closed_caption_disabled",e.button.ariaPressed="false"),e.controls.dispatchEvent(new z("captionselectionupdated"))}function RI(e){var t=e.player.rc()||[];!function(e,t,n,i,r,a,o){function s(e,t,n){return e=[e,t],n&&3==o&&e.push(n),e.join(": ")}var u=e.find(function(e){return 1==e.active}),l=cE(t);hs(t),t.appendChild(l),l=new Set,u=u?s(u.language,u.roles.join(", "),u.label):"";for(var d=(e=c(e)).next(),h={};!d.done;h={Rc:void 0},d=e.next()){h.Rc=d.value,d=h.Rc.language;
1var p=h.Rc.forced,f=a.resolve("SUBTITLE_FORCED"),g=h.Rc.roles.join(", "),m=h.Rc.label,v=s(d,g,m);if(!l.has(v)){l.add(v);var y=ls();y.addEventListener("click",function(e){return function(){n(e.Rc)}}(h));var b=us("span");switch(y.appendChild(b),b.textContent=tk(d,a),o){case $x:p&&(b.textContent+=" ("+f+")");break;case 1:g?b.textContent=g:(Y("Track #"+h.Rc.id+" does not have a role, but the UI is configured to only show role."),b.textContent="?"),p&&(b.textContent+=" ("+f+")");break;case 2:g&&(b.textContent+=": "+g),p&&(b.textContent+=" ("+f+")");break;case 3:m?b.textContent=m:(Y("Track #"+h.Rc.id+" does not have a label, but the UI is configured to only show labels."),b.textContent="?")}i&&v==u&&(y.appendChild(pE()),b.classList.add("shaka-chosen-item"),y.ariaSelected="true",r.textContent=b.textContent),t.appendChild(y)}}}(t,e.menu,function(t){return function(e,t){return D(function(n){if(1==n.g)return e.player.$f(t),S(n,e.player.Ae(!0),2);e.player.configure("preferredTextLanguage",t.language),e.player.configure("preferForcedSubs",t.forced),w(n)})}(e,t)},e.player.fd(),e.currentSelection,e.localization,e.controls.g.textTrackLabelFormat);var n=ls();n.classList.add("shaka-turn-captions-off-button"),e.eventManager.o(n,"click",function(){e.player.Ae(!1),RI(e)}),n.appendChild(e.g),e.menu.appendChild(n),e.player.fd()?e.g.classList.remove("shaka-chosen-item"):(n.ariaSelected="true",n.appendChild(pE()),e.g.classList.add("shaka-chosen-item"),e.currentSelection.textContent=e.localization.resolve("OFF")),e.button.setAttribute("shaka-status",e.currentSelection.textContent),hE(e.menu),e.controls.dispatchEvent(new z("captionselectionupdated")),fE(e.button,0<t.length)}function PI(e){e.button.ariaLabel=e.localization.resolve("CAPTIONS"),e.backButton.ariaLabel=e.localization.resolve("BACK"),e.nameSpan.textContent=e.localization.resolve("CAPTIONS"),e.backSpan.textContent=e.localization.resolve("CAPTIONS"),e.g.textContent=e.localization.resolve("OFF")}function DI(){}function NI(e,t){lE.call(this,e,t);var n=this;this.g=ls(),this.g.classList.add("shaka-toggle-stereoscopic-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.h=us("i"),this.h.classList.add("material-icons-round"),this.h.textContent="3d_rotation",this.g.appendChild(this.h),(e=us("label")).classList.add("shaka-overflow-button-label"),e.classList.add("shaka-overflow-menu-only"),this.j=us("span"),e.appendChild(this.j),this.i=us("span"),this.i.classList.add("shaka-current-selection-span"),e.appendChild(this.i),this.g.appendChild(e),this.parent.appendChild(this.g),_I(this),this.eventManager.o(this.localization,"locale-updated",function(){_I(n)}),this.eventManager.o(this.localization,"locale-changed",function(){_I(n)});var i=this.controls.C;this.eventManager.o(this.g,"click",function(){n.controls.Ba()&&i.Qd()}),this.eventManager.o(i,"vrstatuschanged",function(){fE(n.g,n.controls.Tb())}),fE(this.g,this.controls.Tb())}function _I(e){e.g.ariaLabel=e.localization.resolve("TOGGLE_STEREOSCOPIC"),e.j.textContent=e.localization.resolve("TOGGLE_STEREOSCOPIC")}function OI(){}function UI(e,t){kE.call(this,e,t,["shaka-volume-bar-container"],["shaka-volume-bar"]);var n=this;this.g=this.controls.g,this.setRange(0,100),this.eventManager.o(this.video,"volumechange",function(){return jI(n)}),this.eventManager.o(this.player,"loading",function(){return jI(n)}),this.eventManager.o(this.player,"loaded",function(){return GI(n)}),this.eventManager.o(this.player,"unloading",function(){return GI(n)}),this.eventManager.o(this.player,"trackschanged",function(){return GI(n)}),this.eventManager.o(this.controls,"caststatuschanged",function(){return jI(n)}),this.eventManager.o(this.adManager,"ad-volume-changed",function(){return BI(n)}),this.eventManager.o(this.adManager,"ad-muted",function(){return BI(n)}),this.eventManager.o(this.adManager,"ad-started",function(){return GI(n)}),this.eventManager.o(this.adManager,"ad-stopped",function(){GI(n),jI(n)}),this.eventManager.o(this.localization,"locale-updated",function(){return VI(n)}),this.eventManager.o(this.localization,"locale-changed",function(){return VI(n)}),jI(this),VI(this),this.ad&&this.onChange(),GI(this)}function jI(e){e.video.muted?e.setValue(0):e.setValue(100*e.video.volume),FI(e)}function BI(e){var t=e.ad.getVolume();e.setValue(100*t),FI(e)}function FI(e){var t=e.g.volumeBarColors,n=["to right"];
1n.push(t.level+e.getValue()+"%"),n.push(t.base+e.getValue()+"%"),n.push(t.base+"100%"),e.container.style.background="linear-gradient("+n.join(",")+")"}function VI(e){e.bar.ariaLabel=e.localization.resolve("VOLUME")}function GI(e){var t=!0;e.ad&&e.ad.isLinear()?t=!0:e.player.xh()&&(t=!1),fE(e.container,t)}function HI(){}Wx.FailReasonCode={NO_BROWSER_SUPPORT:Zx,PLAYER_FAILED_TO_LOAD:ek},"complete"==document.readyState?D(function(e){if(1==e.g)return S(e,Promise.resolve(),2);Xx(),w(e)}):e.addEventListener("load",Xx),v(nk,lE),nk.prototype.release=function(){this.j&&(this.j.disconnect(),this.j=null),lE.prototype.release.call(this)},H("shaka.ui.SettingsMenu",nk),v(rk,nk),H("shaka.ui.AudioLanguageSelection",rk),sk.prototype.create=function(e,t){return new rk(e,t)},Mx("language",new sk),dx("language",new sk),v(uk,lE),H("shaka.ui.CastButton",uk),hk.prototype.create=function(e,t){return new uk(e,t)},Mx("cast",new hk),dx("cast",new hk),v(pk,nk),H("shaka.ui.ChapterSelection",pk),vk.prototype.create=function(e,t){return new pk(e,t)},Mx("chapter",new vk),dx("chapter",new vk),v(yk,lE),H("shaka.ui.FastForwardButton",yk),Tk.prototype.create=function(e,t){return new yk(e,t)},dx("fast_forward",new Tk),v(Sk,lE),H("shaka.ui.FullscreenButton",Sk),Ek.prototype.create=function(e,t){return new Sk(e,t)},dx("fullscreen",new Ek),v(xk,lE),xk.prototype.release=function(){this.h.stop(),this.h=null,lE.prototype.release.call(this)},H("shaka.ui.LoopButton",xk),Ck.prototype.create=function(e,t){return new xk(e,t)},Mx("loop",new Ck),dx("loop",new Ck),yE("loop",new Ck),v(Mk,lE),H("shaka.ui.MuteButton",Mk),Dk.prototype.create=function(e,t){return new Mk(e,t)},Mx("mute",new Dk),dx("mute",new Dk),yE("mute",new Dk),v(Nk,lE),H("shaka.ui.PipButton",Nk),Bk.prototype.create=function(e,t){return new Nk(e,t)},Mx("picture_in_picture",new Bk),dx("picture_in_picture",new Bk),yE("picture_in_picture",new Bk),v(Fk,nk),H("shaka.ui.PlaybackRateSelection",Fk),Hk.prototype.create=function(e,t){return new Fk(e,t)},Mx("playback_rate",new Hk),dx("playback_rate",new Hk),v(zk,lE),H("shaka.ui.PresentationTimeTracker",zk),Wk.prototype.create=function(e,t){return new zk(e,t)},dx("time_and_duration",new Wk),v(qk,lE),H("shaka.ui.RecenterVRButton",qk),Yk.prototype.create=function(e,t){return new qk(e,t)},Mx("recenter_vr",new Yk),dx("recenter_vr",new Yk),v(Jk,lE),Jk.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){}),lE.prototype.release.call(this)},H("shaka.ui.RemoteButton",Jk),eI.prototype.create=function(e,t){return new Jk(e,t)},Mx("remote",new eI),dx("remote",new eI),v(tI,nk),H("shaka.ui.ResolutionSelection",tI),uI.prototype.create=function(e,t){return new tI(e,t)},Mx("quality",new uI),dx("quality",new uI),v(lI,lE),H("shaka.ui.RewindButton",lI),dI.prototype.create=function(e,t){return new lI(e,t)},dx("rewind",new dI),v(hI,lE),H("shaka.ui.SaveVideoFrameButton",hI),gI.prototype.create=function(e,t){return new hI(e,t)},Mx("save_video_frame",new gI),yE("save_video_frame",new gI),v(mI,lE),H("shaka.ui.SkipNextButton",mI),bI.prototype.create=function(e,t){return new mI(e,t)},dx("skip_next",new bI),v(TI,TE),H("shaka.ui.SmallPlayButton",TI),SI.prototype.create=function(e,t){return new TI(e,t)},dx("play_pause",new SI),v(wI,lE),H("shaka.ui.Spacer",wI),AI.prototype.create=function(e,t){return new wI(e,t)},dx("spacer",new AI),v(EI,lE),EI.prototype.release=function(){this.l.stop(),this.l=null,lE.prototype.release.call(this)},H("shaka.ui.StatisticsButton",EI),CI.prototype.create=function(e,t){return new EI(e,t)},Mx("statistics",new CI),yE("statistics",new CI),v(MI,nk),H("shaka.ui.TextSelection",MI),DI.prototype.create=function(e,t){return new MI(e,t)},Mx("captions",new DI),dx("captions",new DI),v(NI,lE),H("shaka.ui.ToggleStereoscopicButton",NI),OI.prototype.create=function(e,t){return new NI(e,t)},Mx("toggle_stereoscopic",new OI),dx("toggle_stereoscopic",new OI),v(UI,kE),UI.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,0<this.video.volume&&(this.video.muted=!1))},H("shaka.ui.VolumeBar",UI),HI.prototype.create=function(e,t){return new UI(e,t)},dx("volume",new HI)}.call(r,e,e,void 0),r.shaka)t[a]=r.shaka[a]}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.