1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[284],{62234:(e,t,n)=>{var i="u">typeof window?window:n.g,r={};for(var a in(function(e,t,n){function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},a=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 o(e,t){if(t)e:{var n=a;e=e.split(".");for(var i=0;i<e.length-1;i++){var o=e[i];if(!(o in n))break e;n=n[o]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&r(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function u(e){var t="u">typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:i(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function l(e){if(!(e instanceof Array)){e=u(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}o("Symbol",function(e){function t(e,t){this.g=e,r(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 TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}}),o("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 o=a[t[n]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&r(o.prototype,e,{configurable:!0,writable:!0,value:function(){return s(i(this))}})}return e});var c,d,h="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{e:{var p={};try{p.__proto__={a:!0},yb=p.a;break e}catch(e){}yb=!1}d=yb?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var f=d;function g(e,t){if(e.prototype=h(t.prototype),e.prototype.constructor=e,f)f(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.Vk=t.prototype}function m(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function v(e){if(e.o)throw TypeError("Generator is already running");e.o=!0}function y(e,t){e.i={Pg:t,$g:!0},e.g=e.m||e.j}function b(e,t,n){return e.g=n,{value:t}}function w(e){e.g=0}function x(e,t,n){e.m=t,void 0!=n&&(e.j=n)}function S(e,t){e.m=0,e.j=t||0}function T(e,t,n){e.g=t,e.m=n||0}function A(e,t){return e.m=t||0,t=e.i.Pg,e.i=null,t}function k(e){e.A=[e.i],e.m=0,e.j=0}function E(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.$g?e.g=e.m||e.j:void 0!=n.s&&e.j<n.s?(e.g=n.s,e.i=null):e.g=e.j:e.g=t}function I(e){this.g=new m,this.h=e}function M(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var a=r.value}catch(t){return e.g.l=null,y(e.g,t),C(e)}
1return e.g.l=null,i.call(e.g,a),C(e)}function C(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,y(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.$g)throw t.Pg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return v(e.g),e.g.l?t=M(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=C(e)),t},this.throw=function(t){return v(e.g),e.g.l?t=M(e,e.g.l.throw,t,e.g.u):(y(e.g,t),t=C(e)),t},this.return=function(t){var n,i,r;return n=e,i=t,v(n.g),(r=n.g.l)?M(n,"return"in r?r.return:function(e){return{value:e,done:!0}},i,n.g.return):(n.g.return(i),C(n))},this[Symbol.iterator]=function(){return this}}function R(e){var t=new D(new I(e));function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(e,r){!function t(a){a.done?e(a.value):Promise.resolve(a.value).then(n,i).then(t,r)}(t.next())})}function P(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(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 j(e,t,n){if(null==e)throw TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function O(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{Yg:r,v:a}}return{Yg:-1,v:void 0}}m.prototype.u=function(e){this.h=e},m.prototype.return=function(e){this.i={return:e},this.g=this.j},m.prototype.s=function(e){this.g=e},o("Promise",function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!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=a.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(TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{switch(typeof e){case"object":var n=null!=e;break;case"function":n=!0;break;default:n=!1}n?this.C(e):this.m(e)}},t.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"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.A()},t.prototype.G=function(){var e=this;r(function(){if(e.B()){var t=a.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var e=a.CustomEvent,t=a.Event,n=a.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=a.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.A=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)o.h(this.g[e]);this.g=null}};var o=new n;return t.prototype.H=function(e){var t=this.j();e.Vd(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.Vd(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Vd=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?o.h(n):this.g.push(n),this.o=!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=u(e),a=r.next();!a.done;a=r.next())i(a.value).Vd(t,n)})},t.all=function(e){var n=u(e),r=n.next();return r.done?i([]):new t(function(e,t){var a=[],o=0;do a.push(void 0),o++,i(r.value).Vd(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),o("WeakMap",function(e){function t(e){if(this.g=(l+=Math.random()+1).toString(),e){e=u(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 a(e){L(e,s)||r(e,s,{value:new n})}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&a(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]]);if(2!=i.get(t)||3!=i.get(n))return!1;return 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();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(a(e),!L(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&L(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&L(e,s)&&L(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&L(e,s)&&L(e[s],this.g))&&delete e[s][this.g]},t}),o("Map",function(e){function t(){var e={};return e.Yb=e.next=e.head=e}function n(e,t){var n=e[1];return s(function(){if(n){for(;n.head!=e[1];)n=n.Yb;for(;n.next!=n.head;)return{done:!1,value:t(n=n.next)};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&&L(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=u(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(u([[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();if(r.done||r.value[0]!=t||"s"!=r.value[1])return!1;return!(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],Yb:this[1].Yb,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].Yb.next=n.entry,this[1].Yb=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.Yb.next=e.entry.next,e.entry.next.Yb=e.entry.Yb,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].Yb=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}),o("Set",function(e){function t(e){if(this.g=new Map,e){e=u(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(u([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();if(r.done||r.value[0]!=t||r.value[1]!=t)return!1;return!(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}}()?(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):e}),o("Array.prototype.values",function(e){return e||function(){return N(this,function(e,t){return t})}}),o("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="u">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}}),o("Array.prototype.keys",function(e){return e||function(){return N(this,function(e){return e})}}),o("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),o("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}}),o("String.prototype.includes",function(e){return e||function(e,t){return -1!==j(this,e,"includes").indexOf(e,t||0)}}),o("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 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}}),o("Array.prototype.findIndex",function(e){return e||function(e,t){return O(this,e,t).Yg}}),o("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=u(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]);if(!i.has(t)||i.has(n))return!1;return i.delete(t),i.add(n),!i.has(t)&&i.has(n)}catch(e){return!1}}()?(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):e}),o("Array.prototype.find",function(e){return e||function(e,t){return O(this,e,t).v}}),o("String.prototype.startsWith",function(e){return e||function(e,t){var n=j(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}}),o("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push([t,e[t]]);return n}});var U="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)L(i,r)&&(e[r]=i[r])}return e};o("Object.assign",function(e){return e||U}),o("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})})}}),o("Array.prototype.entries",function(e){return e||function(){return N(this,function(e,t){return[e,t]})}}),o("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),o("String.prototype.repeat",function(e){return e||function(e){var t=j(this,null,"repeat");if(0>e||0x4fffffff<e)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),o("Number.EPSILON",function(){return 2220446049250313e-31}),o("Number.MAX_SAFE_INTEGER",function(){return 0x1fffffffffffff}),o("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&1/0!==e&&-1/0!==e}}),o("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push(e[t]);return n}}),o("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),o("String.prototype.endsWith",function(e){return e||function(e,t){var n=j(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}}),o("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}});var _=this||self;function B(e,t){e=e.split(".");var n,i=_;for((e[0]in i)||void 0===i.execScript||i.execScript("var "+e[0]);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 F(){}function V(){}function H(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function G(e){return e.h/(1-Math.pow(e.g,e.i))}function K(){this.h=new H(2),this.j=new H(5),this.g=0,this.i=128e3,this.l=16e3}function q(){}function z(){}function X(){}function W(e){var t=P.apply(1,arguments);J.has(e)||(J.add(e),X.apply(q,l(t)))}function Y(){}H.prototype.sample=function(e,t){var n=Math.pow(this.g,e);isNaN(t=t*(1-n)+n*this.h)||(this.h=t,this.i+=e)},K.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)},K.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)}},K.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(G(this.h),G(this.j))};var J=new Set;function $(){this.g=new Map}function Q(){this.g=new $}function Z(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(void 0==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=ee;if(void 0==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}ee=t}return t||!1}(e)?t.capture||!1:t}(e,i),this.target.addEventListener(t,n,this.g)}e.console&&((new Map).set(1,function(){return console.error.apply(console,l(P.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,l(P.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,l(P.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,l(P.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,l(P.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,l(P.apply(0,arguments)))}),X=function(){return console.warn.apply(console,l(P.apply(0,arguments)))},z=function(){console.error.apply(console,l(P.apply(0,arguments)))}),(c=$.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},c.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},c.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)}}
1,c.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},c.size=function(){return this.g.size},c.keys=function(){return Array.from(this.g.keys())},(c=Q.prototype).release=function(){this.Ra(),this.g=null},c.D=function(e,t,n,i){this.g&&(e=new Z(e,t,n,i),this.g.push(t,e))},c.qa=function(e,t,n,i){var r=this;this.D(e,t,function i(a){r.Ka(e,t,i),n(a)},i)},c.Ka=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=u(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Ka(),this.g.remove(t,r))}},c.Ra=function(){if(this.g){for(var e=[],t=u(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,l(n.value));for(t=(e=u(e)).next();!t.done;t=e.next())t.value.Ka();this.g.g.clear()}},B("shaka.util.EventManager",Q),Q.prototype.removeAll=Q.prototype.Ra,Q.prototype.unlisten=Q.prototype.Ka,Q.prototype.listenOnce=Q.prototype.qa,Q.prototype.listen=Q.prototype.D,Q.prototype.release=Q.prototype.release,Z.prototype.Ka=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var ee=void 0;function et(e,t){this.g=e,this.h=t}function en(e,t){var n=new et(5,0),i=ea,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function ei(e,t,n,i){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function er(e,t,n,i){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}B("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),et.prototype.toString=function(){return"v"+this.g+"."+this.h};var ea=null,eo=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function es(e){var t;e instanceof es?(eu(this,e.Kb),this.Hc=e.Hc,el(this,e.nb),ec(this,e.$c),this.ab=e.ab,ed(this,e.g.clone()),this.qc=e.qc):e&&(t=String(e).match(eo))?(eu(this,t[1]||"",!0),this.Hc=eh(t[2]||""),el(this,t[3]||"",!0),ec(this,t[4]),this.ab=eh(t[5]||"",!0),ed(this,t[6]||"",!0),this.qc=eh(t[7]||"")):this.g=new ew(null)}function eu(e,t,n){e.Kb=n?eh(t,!0):t,e.Kb&&(e.Kb=e.Kb.replace(/:$/,""))}function el(e,t,n){e.nb=n?eh(t,!0):t}function ec(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.$c=t}else e.$c=null}function ed(e,t,n){t instanceof ew?e.g=t:(n||(t=ep(t,ey)),e.g=new ew(t))}function eh(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ep(e,t,n){return null!=e?(e=encodeURI(e).replace(t,ef),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ef(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(c=es.prototype).Kb="",c.Hc="",c.nb="",c.$c=null,c.ab="",c.qc="",c.toString=function(){var e=[],t=this.Kb;if(t&&e.push(ep(t,eg,!0),":"),t=this.nb){e.push("//");var n=this.Hc;n&&e.push(ep(n,eg,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.$c)&&e.push(":",String(t))}return(t=this.ab)&&(this.nb&&"/"!=t.charAt(0)&&e.push("/"),e.push(ep(t,"/"==t.charAt(0)?ev:em,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.qc)&&e.push("#",ep(t,eb)),e.join("")},c.resolve=function(e){var t=this.clone();"data"===t.Kb&&(t=new es);var n=!!e.Kb;n?eu(t,e.Kb):n=!!e.Hc,n?t.Hc=e.Hc:n=!!e.nb,n?el(t,e.nb):n=null!=e.$c;var i=e.ab;if(n)ec(t,e.$c);else if(n=!!e.ab){if("/"!=i.charAt(0))if(this.nb&&!this.ab)i="/"+i;else{var r=t.ab.lastIndexOf("/");-1!=r&&(i=t.ab.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.ab=i:n=""!==e.g.toString(),n?ed(t,e.g.clone()):n=!!e.qc,n&&(t.qc=e.qc),t},c.clone=function(){return new es(this)};var eg=/[#\/\?@]/g,em=/[#\?:]/g,ev=/[#\?]/g,ey=/[#\?@]/g,eb=/#/g;function ew(e){this.g=e||null}function ex(e){if(!e.Va&&(e.Va=new Map,e.kd=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 eS(){}function eT(e,t){if(!e&&!t)return!0;
1if(!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=ek(e);t=ek(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function eA(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function ek(e,t,n){return eM(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function eE(e,t,n){return eM(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function eI(e,t,n){return eM(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eM(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 eC(e,t,n){var i=P.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,eD)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(c=ew.prototype).Va=null,c.kd=null,c.add=function(e,t){ex(this),this.g=null;var n=this.Va.has(e)?this.Va.get(e):null;return n||this.Va.set(e,n=[]),n.push(t),this.kd++,this},c.set=function(e,t){return ex(this),this.g=null,this.Va.has(e)?this.Va.set(e,[t]):this.add(e,t),this},c.get=function(e){return ex(this),this.Va.get(e)||[]},c.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var e=[],t=u(this.Va.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Va.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("&")},c.clone=function(){var e=new ew;if(e.g=this.g,this.Va){for(var t=new Map,n=u(this.Va),i=n.next();!i.done;i=n.next()){var r=u(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Va=t,e.kd=this.kd}return e},B("shaka.util.BufferUtils",eS),eS.toDataView=eI,eS.toUint16=eE,eS.toUint8=ek,eS.toArrayBuffer=eA,eS.equal=eT,eC.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},B("shaka.util.Error",eC);var eD=!0;function eR(e){this.h=e,this.g=void 0}function eP(e,t){return!e.length||!t.length||e===t||0<eL(e,t).length}function eL(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=u(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=u((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(l(i.keyIds),l(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,audioRobustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}}return n}function eN(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function ej(e){return!!e&&!!e.match(/^com\.apple\.fps/)}eC.Severity={RECOVERABLE:1,CRITICAL:2},eC.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},eC.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,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},eR.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var eO=new eR(function(){return eA(new Uint8Array([0]))}),eU=new Map;function e_(e){this.h=e,this.g=null}function eB(e){this.h=e,this.g=null}function eF(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.isTypeSupported}function eV(e){return""!=e8().canPlayType(e)}function eH(){return!!navigator.userAgent.match(/Edge?\//)}function eG(){return e5("Xbox One")}function eK(){return e5("Tizen")}function eq(){return e5("Tizen 3")}function ez(){return e5("Web0S")}function eX(){return ez()&&38===eY()}function eW(){return e5("CrKey")&&!e5("VIZIO SmartCast")}function eY(){if(!e5("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function eJ(){return e6()&&((navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("mac"))||!!/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||e6()&&1<navigator.maxTouchPoints)}function e$(){return e5("PlayStation 5")}function eQ(){return e5("PlayStation 4")}function eZ(){return e5("Hisense")||e5("VIDAA")}function e0(){if(!eJ()&&(!e6()||eJ()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function e1(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}function e2(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():e5("Android")}function e3(){return navigator.userAgentData&&navigator.userAgentData.platform?"fuchsia"==navigator.userAgentData.platform.toLowerCase():e5("Fuchsia")}function e4(){return!!(eK()||ez()||eG()||eQ()||e$()||eW()||eZ()||e5("VIZIO SmartCast")||e6()&&!eJ())}function e5(e){return(navigator.userAgent||"").includes(e)}function e6(){return(navigator.vendor||"").includes("Apple")}function e8(){return tt||(te||(te=new eB(function(){tt=null})),(tt=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(tt=document.createElement("video")),te.da(1)),tt}function e9(){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g;return R(function(m){switch(m.g){case 1:if(t={width:1/0,height:1/0},eW()){if(h=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t.width=1280,t.height=720,x(m,14),!(p=h)){m.s(16);break}return b(m,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840;
1 height=2160'),17)}if(eK()){n=e.devicePixelRatio,t.width=1920<e.screen.width*n?3840:1920,t.height=1080<e.screen.height*n?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(i=webapis.systeminfo.getMaxVideoResolution(),t.width=i.width,t.height=i.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(t.width=7680,t.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(t.width=3840,t.height=2160)}catch(e){X("Tizen: Error detecting screen size, default screen size 1920x1080.")}m.s(3);break}if(ez()){try{r=JSON.parse(e.PalmSystem.deviceInfo),t.width=Math.max(1920,r.screenWidth),t.height=Math.max(1080,r.screenHeight)}catch(e){X("WebOS: Error detecting screen size, default screen size 1920x1080."),t.width=1920,t.height=1080}m.s(3);break}if(eZ()){if(a=null,e.Hisense_Get4KSupportState)try{a=e.Hisense_Get4KSupportState()}catch(e){}null==a&&(a=e5("UHD")),a?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),m.s(3);break}if(!eQ()&&!e$()){o=void 0;try{o="u">typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}if(o){t.width=1920,t.height=1080;try{s=new o.Media.Protection.ProtectionCapabilities,u=o.Media.Protection.ProtectionCapabilityResult,l=null;do l=s.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(l===u.maybe);l===u.probably&&(t.width=3840,t.height=2160)}catch(e){X("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else eG()&&(t.width=1920,t.height=1080,X("Xbox: Error detecting screen size, default screen size 1920x1080."));m.s(3);break}return c=!1,x(m,8),b(m,e.msdk.device.getDisplayInfo(),10);case 10:case 13:c="4K"===m.h.resolution,T(m,9);break;case 8:return A(m),x(m,11),b(m,e.msdk.device.getDisplayInfoImmediate(),13);case 11:d=A(m),X("PlayStation: Failed to get the display info:",d);case 9:c?(t.width=3840,t.height=2160):(t.width=1920,t.height=1080),m.s(3);break;case 17:p=m.h;case 16:if(p){t.width=3840,t.height=2160,m.s(18);break}if(!(f=h)){m.s(19);break}return b(m,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:f=m.h;case 19:f&&(t.width=1920,t.height=1080);case 18:T(m,3);break;case 14:g=A(m),z("Failed to check canDisplayType:",g);case 3:return m.return(t)}})}function e7(t){return void 0!==e.matchMedia&&e.matchMedia("(color-gamut: p3)").matches?t?"HLG":"PQ":"SDR"}e_.prototype.da=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},e_.prototype.stop=function(){this.g&&(this.g(),this.g=null)},eB.prototype.sb=function(){return this.stop(),this.h(),this},eB.prototype.da=function(e){var t=this;return this.stop(),this.g=new e_(function(){t.h()}).da(e),this},eB.prototype.ua=function(e){var t=this;return this.stop(),this.g=new e_(function(){t.g.da(e),t.h()}).da(e),this},eB.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},B("shaka.util.Timer",eB),eB.prototype.stop=eB.prototype.stop,eB.prototype.tickEvery=eB.prototype.ua,eB.prototype.tickAfter=eB.prototype.da,eB.prototype.tickNow=eB.prototype.sb;var te=null,tt=null;function tn(){}function ti(t){if(!t)return"";if(239==(t=ek(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!eQ())return(t=(new TextDecoder).decode(t)).includes("�")&&z('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(0==(128&t[i])?r=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),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 tr(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new eC(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=eI(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return tu(i)}function ta(e){function t(e){return n.byteLength<=e||9<=n[e]&&126>=n[e]}if(!e)return"";var n=ek(e);if(239==n[0]&&187==n[1]&&191==n[2])return ti(n);if(254==n[0]&&255==n[1])return tr(n.subarray(2),!1);if(255==n[0]&&254==n[1])return tr(n.subarray(2),!0);if(0==n[0]&&0==n[2])return tr(e,!1);if(0==n[1]&&0==n[3])return tr(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return ti(e);throw new eC(2,2,2003)}function to(t){if(e.TextEncoder&&!eQ()){var n=new TextEncoder;return eA(n.encode(t))}n=new Uint8Array((t=unescape(t=encodeURIComponent(t))).length);for(var i=0;i<t.length;
1i++)n[i]=t[i].charCodeAt(0);return eA(n)}function ts(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 tu(e){return tc.value()(e)}function tl(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\xa0","‎":"â","‏":"â"},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||""}B("shaka.util.StringUtils",tn),tn.resetFromCharCode=function(){tc.g=void 0},tn.toUTF16=ts,tn.toUTF8=to,tn.fromBytesAutoDetect=ta,tn.fromUTF16=tr,tn.fromUTF8=ti;var tc=new eR(function(){for(var e={jc:65536};0<e.jc;e={jc:e.jc},e.jc/=2)if(function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}(e.jc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.jc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.jc));return n}}(e);return null});function td(){}function th(e){return btoa(e=tu(ek(e)))}function tp(e,t){return t=void 0==t||t,e=th(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function tf(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 tg(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 tm(e){var t=ek(e);e="",t=u(t);for(var n=t.next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function tv(){for(var e=P.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(ek(r),n),n+=r.byteLength}return t}function ty(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new es(e[0]);return t=new es(t[0]),t=i.resolve(t),n&&ed(t,n),[t.toString()]}t=t.map(function(e){return new es(e)}),i=[],e=u(e);for(var r=e.next();!r.done;r=e.next()){r=new es(r.value);for(var a=u(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&ed(o,n),i.push(o.toString())}return i}function tb(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 tw(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=tp(tg(t),!1));var o=e;22!=o.length&&(o=tp(tg(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:ek(to(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 tx(e,t){if(1==t.length)return t[0];if(null!=(e=tS(e,t)))return e;throw new eC(2,4,4025,t)}function tS(e,t){var n=tI.get(e);n=u(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==tA?"":null}function tT(e,t){var n=[];e=u(e=tI.get(e));for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=u(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}B("shaka.util.Uint8ArrayUtils",td),td.concat=tv,td.toHex=tm,td.fromHex=tg,td.fromBase64=tf,td.toBase64=tp,td.toStandardBase64=th;var tA="text",tk={la:"video",V:"audio",va:tA,bf:"image",Oj:"application"},tE=1/15,tI=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function tM(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if("u"<typeof libDPIModule&&X("Could not find LCEVC Library dependencies on this page"),"u">typeof LCEVCdec)this.h=LCEVCdec;else if("u">typeof LcevcDil)this.h=LcevcDil,this.j=!0,en("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{X("Could not find LCEVC Library on this page"),e=!1;break e}void 0===this.h.SupportObject?(X("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||X(this.h.SupportObject.SupportError),e=void 0!==this.h&&"u">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 tC(e,t,n,i){"video"!==i.type||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function tD(e){e.g&&e.i.classList.add("shaka-hidden")}function tR(e){return!!e&&"u">typeof LCEVCdec&&"lvc1"==e.codecs}function tP(t){if(tj.has(t))return tj.get(t);var n=e.ManagedMediaSource||e.MediaSource;
1return!!n&&(n=n.isTypeSupported(t),tj.set(t,n),n)}function tL(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType}function tN(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.prototype&&!!t.prototype.setLiveSeekableRange&&!!t.prototype.clearLiveSeekableRange}tM.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},B("shaka.lcevc.Dec",tM),tM.prototype.release=tM.prototype.release;var tj=new Map;function tO(){}function tU(){}function t_(){}function tB(e){this.l=new tU,(e=tV(e.toLowerCase()))&&(this.l=e()),this.h=new tO,(e=tG)&&(this.h=e())}function tF(e,t){tH.set(e,t)}function tV(e){return tH.get(e)}tO.prototype.extract=function(){},tO.prototype.decode=function(){return[]},tO.prototype.clear=function(){},tO.prototype.getStreams=function(){return[]},tU.prototype.init=function(){},tU.prototype.parse=function(){return[]},t_.prototype.init=function(){},t_.prototype.i=function(){},t_.prototype.g=function(){},t_.prototype.j=function(){},B("shaka.media.IClosedCaptionParser",t_),tB.prototype.init=function(e,t){(void 0===t?0:t)||this.g(),this.l.init(e)},tB.prototype.i=function(e){e=u(e=this.l.parse(e));for(var t=e.next();!t.done;t=e.next()){var n=ek((t=t.value).packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},tB.prototype.g=function(){this.h.clear()},tB.prototype.j=function(){return this.h.getStreams()},B("shaka.media.ClosedCaptionParser",tB),tB.findDecoder=function(){return tG},tB.unregisterDecoder=function(){tG=null},tB.registerDecoder=function(e){tG=e},tB.findParser=tV,tB.unregisterParser=function(e){tH.delete(e)},tB.registerParser=tF;var tH=new Map,tG=null;function tK(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=tq,this.scroll=tz}B("shaka.text.CueRegion",tK);var tq=1;tK.units={PX:0,PERCENTAGE:1,LINES:2};var tz="";function tX(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function tW(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function tY(e,t,n){if(n||(n=tX),e.length!=t.length)return!1;t=t.slice(),e=u(e);for(var i=e.next(),r={};!i.done;r={bh:void 0},i=e.next()){if(r.bh=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.bh,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function tJ(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=tX),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 t$(e){this.h=e||"",this.g=0}function tQ(e){tZ(e,/[ \t]+/gm)}function tZ(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 t0(e){return e.g==e.h.length?null:(e=tZ(e,/[^ \t\n]*/gm))?e[0]:null}function t1(e){if(null==(e=tZ(e,t3)))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 t2(e){return e?t1(new t$(e)):null}tK.scrollMode={NONE:tz,UP:"up"};var t3=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function t4(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=n.constructor==Array;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 t5(e){var t,n={};for(t in e)n[t]=e[t];return n}function t6(e,t){var n=void 0!==n&&n;return t8(e=ta(e),t,n)}function t8(e,t,n){return e=function(e,t){function n(){for(var t=i;-1==="\r\n >/= ".indexOf(e[i])&&e[i];)i++;return e.slice(t,i)}var i=0;return function r(a,o){o=void 0!==o&&o;for(var s=[];e[i];)if(60==e.charCodeAt(i)){if(47===e.charCodeAt(i+1)){o=i+2,i=e.indexOf(">",i);var u=(o=e.substring(o,i)).indexOf(a);if(-1==u){var c=a.indexOf(".");0<c&&(u=o.indexOf(a.substring(0,c)))}if(-1==u)throw Error("Unexpected close tag\nLine: "+((a=e.substring(0,i).split("\n")).length-1)+"\nColumn: "+(a[a.length-1].length+1)+"\nChar: "+e[i]);i+1&&(i+=1);break}
1if(33===e.charCodeAt(i+1)){if(45==e.charCodeAt(i+2)){for(;-1!==i&&(62!==e.charCodeAt(i)||45!=e.charCodeAt(i-1)||45!=e.charCodeAt(i-2)||-1==i);)i=e.indexOf(">",i+1);-1===i&&(i=e.length)}else if(91===e.charCodeAt(i+2)&&91===e.charCodeAt(i+8)&&"cdata"===e.substr(i+3,5).toLowerCase()){-1==(u=e.indexOf("]]>",i))?(s.push(e.substr(i+9)),i=e.length):(s.push(e.substring(i+9,u)),i=u+3);continue}i++;continue}e:{c=o,i++;var d=n(),h={};for(u=[];62!==e.charCodeAt(i)&&e[i];){var p=e.charCodeAt(i);if(64<p&&91>p||96<p&&123>p){p=n();for(var f=e.charCodeAt(i);f&&39!==f&&34!==f&&!(64<f&&91>f||96<f&&123>f)&&62!==f;)i++,f=e.charCodeAt(i);var g=i+1;if(i=e.indexOf(e[i],g),g=e.slice(g,i),39===f||34===f){if(-1===i){if(c={tagName:d,attributes:h,children:u,parent:null},t)for(d=0;d<u.length;d++)"string"!=typeof u[d]&&(u[d].parent=c);u=c;break e}}else g=null,i--;if(p.startsWith("xmlns:")){f=g;var m=p.split(":")[1];nk.set(f,m),nE.set(m,f)}"tt"===d&&"xml:space"===p&&"preserve"===g&&(c=!0),h[p]=g}i++}for(47!==e.charCodeAt(i-1)?(i++,u=r(d,c)):i++,c={tagName:d,attributes:h,children:u,parent:null},d=u.length,h=0;h<d;h++)"string"!=typeof(p=u[h])?t&&(p.parent=c):h==d-1&&"\n"==p&&u.pop();u=c}if(s.push(u),"string"==typeof u)break;"?"===u.tagName[0]&&u.children&&(s.push.apply(s,l(u.children)),u.children=[])}else u=i,-2==(i=e.indexOf("<",i)-1)&&(i=e.length),u=e.slice(u,i+1),o?0<u.length&&s.push(u):s.length&&1==u.length&&"\n"==u[0]?s.push(u):0<u.trim().length&&s.push(u),i++;return s}("")}(e,void 0!==n&&n),!t&&e.length?e[0]:(e=e.find(function(e){return t.split(",").includes(e.tagName)}))?e:null}function t9(e){return nk.has(e)?nk.get(e):""}function t7(e){return"string"==typeof e}function ne(e){var t=[];if(!e.children)return[];e=u(e.children);for(var n=e.next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function nt(e,t){var n=[];if(!e.children)return[];e=u(e.children);for(var i=e.next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function nn(e){return"string"==typeof e?tl(e):""===(e=e.children.reduce(function(e,t){return"string"==typeof t?e+t:e},""))?null:tl(e)}function ni(e){return Array.from(e.children).every(function(e){return"string"==typeof e})?((e=nn(e))&&(e=e.trim()),e):null}function nr(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children){e=u(e.children);for(var i=e.next();!i.done;i=e.next())nr(i.value,t,n)}return n}function na(e,t){return 1!=(e=nt(e,t)).length?null:e[0]}function no(e,t,n){return 1!=(e=nl(e,t,n)).length?null:e[0]}function ns(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 nu(e,t,n){return t=t9(t),e.attributes[t+":"+n]||null}function nl(e,t,n){var i=t9(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=u(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function nc(e,t,n){t=u(t);for(var i=t.next();!i.done;i=t.next())if(i=nu(e,i.value,n))return i;return null}function nd(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),isNaN(e=Date.parse(e))?null:e/1e3):null}function nh(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))&&isFinite(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))?e:null}function np(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t&&isFinite(e=Number(t[1]))&&isFinite(t=Number(t[2]))?{start:e,end:t}:null}function nf(e){return 0==(e=Number(e))%1?e:null}function ng(e){return 0==(e=Number(e))%1&&0<e?e:null}function nm(e){return 0==(e=Number(e))%1&&0<=e?e:null}function nv(e){return isNaN(e=Number(e))?null:e}function ny(e){return!!e&&"true"===e.toLowerCase()}function nb(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function nw(e){var t=[];e=u(e=tl(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/));for(var n=e.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,ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].ac=n.slice(1))}return t}function nx(e,t){var n=nw(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=nS(e,"t",i.t)),null!==i.n&&(n=nS(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.ac)&&e[n]?nT(e[n],r,i,ni(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(l(t.children))))}}function nS(e,t,n){var i=0;e=u(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function nT(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function nA(e){if(!e)return null;var t={tagName:e.tagName,attributes:t5(e.attributes),children:[],parent:null};e=u(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=nA(n)).parent=t),t.children.push(n);return t}var nk=new Map,nE=new Map;function nI(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new tK,this.position=null,this.positionAlign=nL,this.size=0,this.textAlign=nN,this.direction=n_,this.writingMode=nB,this.lineInterpretation=nF,this.line=null,this.lineHeight="",this.lineAlign=nV,this.displayAlign=nO,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=nq,this.fontStyle=nX,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={oc:32,rows:15}}function nM(e,t){return(e=new nI(e,t,"")).lineBreak=!0,e}function nC(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(!tJ(e.nestedCues,t.nestedCues,nC))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(!tJ(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function nD(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&nR(t);var i,r,a,o,s=n;n=[];for(var l=-1,c=0;c<s.length;c++)"<"===s[c]?l=c+1:">"===s[c]&&0<l&&((l=s.substr(l,c-l)).match(n$)&&n.push(l),l=-1);for(c=(n=u(n)).next();!c.done;c=n.next())c=c.value,s=s.replace("<"+c+">",'<div time="'+c+'">')+"</div>";e:{c=s,l=[];var d=-1;n="",s=!1;for(var h=0;h<c.length;h++)if("/"===c[h]){var p=c.indexOf(">",h);if(-1===p){n=c;break e}if((p=c.substring(h+1,p))&&"v"==p){s=!0;var f=null;if(l.length&&(f=l[l.length-1]),f){if(f===p)n+="/"+p+">";else{if(!f.startsWith("v")){n+=c[h];continue}n+="/"+f+">"}h+=p.length+1}else n+=c[h]}else n+=c[h]}else"<"===c[h]?"v"!=c[d=h+1]&&(d=-1):">"===c[h]&&0<d&&(l.push(c.substr(d,h-d)),d=-1),n+=c[h];for(l=(c=u(l)).next();!l.done;l=c.next())d=(l=l.value).replace(" ",".voice-"),n=(n=n.replace("<"+l+">","<"+d+">")).replace("</"+l+">","</"+d+">"),s||(n+="</"+d+">")}i=n,r={"< ":""," >":" >"},o=RegExp((a=/(< +>|<\s|\s>)/g).source),n=i&&o.test(i)?i.replace(a,function(e){return r[e]||""}):i||"",e.payload="";try{var g=t8("<span>"+n+"</span>","span")}catch(e){}if(g)if(1!=(g=g.children).length||g[0].tagName)for(n=(g=u(g)).next();!n.done;n=g.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new tK,r.position=null,r.size=0,r.textAlign=nN,t.tagName)for(var a=u(t.tagName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var l=s.split("-").pop();s='v[voice="'+l+'"]',i.has(s)||(s="v[voice="+l+"]")}switch(i.has(s)&&(l=r,s=i.get(s))&&(l.backgroundColor=nP(s.backgroundColor,l.backgroundColor),l.color=nP(s.color,l.color),l.fontFamily=nP(s.fontFamily,l.fontFamily),l.fontSize=nP(s.fontSize,l.fontSize),l.textShadow=nP(s.textShadow,l.textShadow),l.fontWeight=s.fontWeight,l.fontStyle=s.fontStyle,l.opacity=s.opacity,l.rubyTag=s.rubyTag,l.textCombineUpright=s.textCombineUpright,l.wrapLine=s.wrapLine),o){case"br":r=nM(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=nz;break;case"i":r.fontStyle=nW;break;case"u":r.textDecoration.push(nJ);break;case"font":(o=t.attributes.color)&&(r.color=o);break;case"div":if(!(o=t.attributes.time))break;(o=t2(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(a=t.children,t7(t)||1==a.length&&t7(a[0]))for(i=nn(t).split("\n"),t=!0,a=(i=u(i)).next();!a.done;a=i.next())a=a.value,t||(t=nM(r.startTime,r.endTime),n.nestedCues.push(t)),0<a.length&&((t=r.clone()).payload=tl(a),n.nestedCues.push(t)),t=!1;else for(n.nestedCues.push(r),t=(n=u(a)).next();!t.done;t=n.next())e(t.value,r,i)}(n.value,e,t);else e.payload=tl(n);else e.payload=tl(n)}else e.payload=tl(n)}function nR(e){for(var t=u(Object.entries(nG)),n=t.next();!n.done;n=t.next()){var i=u(n.value);n=i.next().value,i=i.next().value;var r=new nI(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=u(Object.entries(nK))).next();!n.done;n=t.next())n=(i=u(n.value)).next().value,i=i.next().value,(r=new nI(0,0,"")).backgroundColor=i,e.set("."+n,r)}function nP(e,t){return e&&0<e.length?e:t}nI.prototype.clone=function(){var e,t=new nI(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},B("shaka.text.Cue",nI),nI.parseCuePayload=nD,nI.equal=nC,nI.prototype.clone=nI.prototype.clone;var nL="auto";nI.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nL};var nN="center",nj={LEFT:"left",RIGHT:"right",CENTER:nN,START:"start",END:"end"};nI.textAlign=nj;var nO="after",nU={BEFORE:"before",CENTER:"center",AFTER:nO};nI.displayAlign=nU;var n_="ltr";nI.direction={HORIZONTAL_LEFT_TO_RIGHT:n_,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nB="horizontal-tb";nI.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nB,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nF=0;nI.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var nV="start",nH={CENTER:"center",START:nV,END:"end"};nI.lineAlign=nH;var nG={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};nI.defaultTextColor=nG;var nK={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};
vendor: 1,060 bytes, line 1
1nI.defaultTextBackgroundColor=nK;var nq=400,nz=700;nI.fontWeight={NORMAL:400,BOLD:700};var nX="normal",nW="italic",nY={NORMAL:nX,ITALIC:nW,OBLIQUE:"oblique"};nI.fontStyle=nY;var nJ="underline";nI.textDecoration={UNDERLINE:nJ,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var n$=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function nQ(){}function nZ(e,t,n){n1.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,we:t})}function n0(e,t){for(var n=e.toLowerCase().split(";")[0],i=u([n5,n4,n3,n2]),r=i.next();!r.done;r=i.next())if(r=n1.get(n+"-"+r.value)){var a=r.we(),o=a.isSupported(e,t);if(a.destroy(),o)return r.we}return null}nQ.prototype.destroy=function(){},B("shaka.transmuxer.TransmuxerEngine",nQ),nQ.findTransmuxer=n0,nQ.unregisterTransmuxer=function(e,t){n1.delete(e.toLowerCase().split(";")[0]+"-"+t)},nQ.registerTransmuxer=nZ,nQ.prototype.destroy=nQ.prototype.destroy;var n1=new Map,n2=1,n3=2,n4=3,n5=4;function n6(){}function n8(e,t){var n=e;return t&&!il.includes(e)&&(n+='; codecs="'+t+'"'),n}function n9(e,t){return t&&(e+='; codecs="'+t+'"'),e}
1function n7(e,t,n){var i=n8(e,t);return n0(t=n9(e,t))?(e=n0(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function ie(e){return e.split(";")[0].split("/")[1]}function it(e){var t=is(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";case"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 ii(e){var t=[];e=u(e.split(","));for(var n=e.next();!n.done;n=e.next())t.push((n=is(n.value))[0]);return t.sort().join(",")}function ir(e){return e.split(";")[0]}function ia(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function io(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function is(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}nQ.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4},B("shaka.util.MimeUtils",n6),n6.getFullTypeWithAllCodecs=n9,n6.getFullType=n8;var iu=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),il=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ic(e){this.i=null,this.j=e,this.B=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function id(e,t){im.set(e,t)}function ih(e){return im.get(e)}function ip(e){return!!im.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!tG}function ig(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=u(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)}ic.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},ic.prototype.remove=function(e,t){var n=this;return R(function(i){if(1==i.g)return b(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)})},B("shaka.text.TextEngine",ic),ic.prototype.destroy=ic.prototype.destroy,ic.findParser=ih,ic.unregisterParser=function(e){im.delete(e)},ic.registerParser=id;var im=new Map;function iv(e,t){return e.concat(t)}function iy(){}function ib(e){return null!=e}function iw(e,t){return Promise.race([t,new Promise(function(t,n){new eB(n).da(e)})])}function ix(){}function iS(e,t){return e=ik(e),t=ik(t),e.split("-")[0]==t.split("-")[0]}function iT(e,t){return e=ik(e),t=ik(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function iA(e,t){return e=ik(e),t=ik(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function ik(e){var t=(e=u(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=u(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=iD.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function iE(e,t){return e=ik(e),(t=ik(t))==e?4:iT(t,e)?3:iA(t,e)?2:+!!iT(e,t)}function iI(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),iD.get(e)||e}function iM(e){return e.language?ik(e.language):e.audio&&e.audio.language?ik(e.audio.language):e.video&&e.video.language?ik(e.video.language):"und"}function iC(e,t){e=ik(e);var n=new Set;t=u(t);for(var i=t.next();!i.done;i=t.next())n.add(ik(i.value));for(i=(t=u(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=u(n)).next();!i.done;i=t.next())if(iT(i=i.value,e))return i;for(i=(t=u(n)).next();!i.done;i=t.next())if(iA(i=i.value,e))return i;for(t=(n=u(n)).next();!t.done;t=n.next())if(iT(e,t=t.value))return t;return null}
1B("shaka.util.LanguageUtils",ix),ix.findClosestLocale=iC,ix.getLocaleForVariant=iM,ix.getLocaleForText=function(e){return ik(e.language||"und")},ix.getBase=iI,ix.relatedness=iE,ix.areSiblings=function(e,t){var n=iI(e),i=iI(t);return e!=n&&t!=i&&n==i},ix.normalize=ik,ix.isSiblingOf=iA,ix.isParentOf=iT,ix.areLanguageCompatible=iS,ix.areLocaleCompatible=function(e,t){return(e=ik(e))==(t=ik(t))};var iD=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 iR(){}function iP(e,t,n,i,r){if(r.length){var a=e.textStreams;r=u(r);for(var o=r.next(),s={};!o.done;s={ug:void 0},o=r.next())if(s.ug=o.value,(o=a.filter(function(e){return function(t){return!!(t.codecs.startsWith(e.ug)||t.mimeType.startsWith(e.ug))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){t=u(t);for(var i=t.next(),r={};!i.done;r={Mh:void 0},i=t.next())if(r.Mh=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.Mh)}}(r))).length){e=i;break}for(t=(n=u(n)).next(),i={};!t.done;i={Eg:void 0},t=n.next())if(i.Eg=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Eg)}}(i))).length){e=t;break}return e}(a,t,n)),i.length){for(t=new $,a=(n=u(a)).next();!a.done;a=n.next())a=a.value,t.push(String(a.video.width||0),a);var c=[];t.forEach(function(e,t){e=0;var n=[];t=u(t);for(var r=t.next(),a={};!r.done;a={Se:void 0},r=t.next())a.Se=r.value,(r=i.filter(function(e){return function(t){return e.Se.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Se]):r==e&&n.push(a.Se);c.push.apply(c,l(n))}),a=c}for(n=new Set,t=new Set,r=(a=u(a)).next();!r.done;r=a.next())(r=r.value).audio&&n.add(r.audio),r.video&&t.add(r.video);a=Array.from(n).sort(function(e,t){return e.bandwidth-t.bandwidth});var d=[];for(n=new Map,r=(a=u(a)).next();!r.done;r=a.next()){if(o=function(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}(r=r.value),(s=n.get(o)||[]).length){var h=s[s.length-1],p=it(h.c
1odecs),f=it(r.codecs);p!=f||r.bandwidth&&h.bandwidth&&!(r.bandwidth>h.bandwidth)||(s.push(r),d.push(r.id))}else s.push(r),d.push(r.id);n.set(o,s)}var g={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};a=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=it(e.codecs),i=it(t.codecs);if(n!=i)return(g[n]||1)-(g[i]||1)}return e.width-t.width}return e.bandwidth-t.bandwidth}),t=tL();var m=[];for(n=new Map,r=(a=u(a)).next();!r.done;r=a.next()){if(o=function(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}(r=r.value),(s=n.get(o)||[]).length){if(h=s[s.length-1],!t&&(p=it(h.codecs))!==(f=it(r.codecs)))continue;(p=it(h.codecs))!=(f=it(r.codecs))||r.bandwidth&&h.bandwidth&&!(r.bandwidth>h.bandwidth)||(s.push(r),m.push(r.id))}else s.push(r),m.push(r.id);n.set(o,s)}e.variants=e.variants.filter(function(e){var t=e.audio;return e=e.video,(!t||!!d.includes(t.id))&&(!e||!!m.includes(e.id))})}function iL(e,t,n){var i,r,a,o,s,l,c,d,h,p=e.video;if(p&&p.width&&p.height){var f,g,m,v,y,b,w,x,S,T=p.width,A=p.height;if(A>T&&(T=(A=u([A,T])).next().value,A=A.next().value),f=T,g=t.minWidth,m=Math.min(t.maxWidth,n.width),!(f>=g)||!(f<=m)||(v=A,y=t.minHeight,b=Math.min(t.maxHeight,n.height),!(v>=y)||!(v<=b))||(w=p.width*p.height,x=t.minPixels,S=t.maxPixels,!(w>=x)||!(w<=S)))return!1}return(!e||!e.video||!e.video.frameRate||(i=e.video.frameRate,r=t.minFrameRate,a=t.maxFrameRate,i>=r&&i<=a))&&(!e||!e.audio||!e.audio.channelsCount||(o=e.audio.channelsCount,s=t.minChannelsCount,l=t.maxChannelsCount,o>=s&&o<=l))&&(c=e.bandwidth,d=t.minBandwidth,h=t.maxBandwidth,c>=d&&c<=h)}function iN(e,t,n,i,r){var a,o;return R(function(s){if(1==s.g)return eG()&&function(e){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;e=u(e);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=u(n)).next();!e.done;e=n.next()){e=e.value,i=u(t);for(var r=i.next();!r.done;r=i.next()){var a=u(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),b(s,iO(t.variants,n,!1,i),2);a=null,e&&(o=e.h)&&(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=eG(),r=e5("Firefox")&&e2(),a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(i&&a&&(1920<o||1080<s)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3.")))&&(!(i=a&&a.dependencyStream)||!!tR(i))&&(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))&&(!e||!e.dependencyStream))}(e,a,r);if(!t){var n=[];e.audio&&n.push(i$(e.audio)),e.video&&n.push(i$(e.video))}return t}),w(s)})}function ij(e,t){var n,i,r,a,o,s,l;return R(function(c){if(1==c.g){for(n=function(e,t){if(e){var n=t5(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=[],o=(a=u(t)).next(),s={};!o.done;s={cache:void 0,Ud:void 0},o=a.next())l=o.value,s.Ud=function e(t){if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++){var r=i.toString(),a=t[i];void 0!==a&&(a=e(a))&&n.push(r+":"+a)}t="["+n.join(",")+"]"}else if("function"==typeof t)t="";else if(t instanceof Object){for((i=Object.keys(t)).sort(),n=[],r=(i=u(i)).next();!r.done;r=i.next())r=JSON.stringify(a=r.value),void 0!==(a=t[a])&&(a=e(a))&&n.push(r+":"+a);t="{"+n.join(",")+"}"}else t=JSON.stringify(t);return t}(l),s.cache=iZ,s.cache.has(s.Ud)?i=n(i,s.cache.get(s.Ud)):r.push((function(e){var t=[""];e.video&&(t=ia(e.video.contentType).split(","));var n=[""];e.audio&&(n=ia(e.audio.contentType).split(","));var i=[];t=u(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var a=u(n),o=a.next(),s={};!o.done;s={pc:void 0},o=a.next())o=o.value,s.pc=t4(e),e.video&&(s.pc.video.contentType=n8(ir(s.pc.video.contentType),r)),e.audio&&(s.pc.audio.contentType=n8(ir(s.pc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){(e2()?iw(5,navigator.mediaCapabilities.decodingInfo(e.pc)):navigator.mediaCapabilities.decodingInfo(e.pc)).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})})(l).then(function(e){return function(t){var r=null;t=u(t||[]);for(var a=t.next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.Ud,r),i=n(i,r))}}(s)));return b(c,Promise.all(r),2)}i&&e.decodingInfos.push(i),w(c)})}function iO(e,t,n,i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x;return R(function(S){switch(S.g){case 1:if(e.some(function(e){return e.decodingInfos.length}))return S.return();a=(r=u(i)).next(),o={};case 2:if(a.done){S.s(4);break}o.nh=a.value,s=!1,c=(l=u(e)).next();case 5:var T;if(c.done){S.s(7);break}p=(h=u(iU(d=c.value,t,n).filter((T=o,function(e){return((e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)===T.nh})))).next();case 8:if(p.done){S.s(10);break}return f=p.value,b(S,ij(d,f),9);case 9:p=h.next(),S.s(8);break;case 10:d.decodingInfos.length&&(s=!0),c=l.next(),S.s(5);break;case 7:if(s)return S.return();o={nh:void 0},a=r.next(),S.s(2);break;case 4:m=(g=u(e)).next();case 12:if(m.done){S.s(0);break}w=(y=u(iU(v=m.value,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(w.done){m=g.next(),S.s(12);break}return x=w.value,b(S,ij(v,x),16);case 16:w=y.next(),S.s(15)}})}function iU(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=u(r.fullMimeTypes),l=s.next();!l.done;l=s.next()){var c=ia(l=l.value);if(c.includes(",")&&!i){var d=c.split(","),h=ir(l);
1c=tx("video",d),d=i_(d=tx("audio",d),h),h=n7(h,d,"audio"),o.push({contentType:h,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(c=iB(c),l={contentType:n7(ir(l),c,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":l.transferFunction="srgb";break;case"PQ":l.transferFunction="pq";break;case"HLG":l.transferFunction="hlg"}r.colorGamut&&(l.colorGamut=r.colorGamut),a.push(l)}if(i)for(l=(s=u(i.fullMimeTypes)).next();!l.done;l=s.next())l=ir(c=l.value),c=i_(ia(c),l),l=n7(l,c,"audio"),o.push({contentType:l,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(s=[],0==a.length&&a.push(null),0==o.length&&o.push(null),l=(a=u(a)).next();!l.done;l=a.next())for(l=l.value,h=(c=u(o)).next();!h.done;h=c.next())h=h.value,d={type:n?"file":"media-source"},l&&(d.video=l),h&&(d.audio=h),s.push(d);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=u(o)).next();!a.done;a=o.next())a=a.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],l=(a=u(n.keys())).next();!l.done;l=a.next()){for(l=l.value,h=n.get(l),c=new Map,d=(h=u(h)).next();!d.done;d=h.next()){var p=(d=d.value).videoRobustness+","+d.audioRobustness;c.get(p)||c.set(p,[]),c.get(p).push(d)}for(h=(c=u(c.values())).next();!h.done;h=c.next()){h=h.value,d=[],p=u(s);for(var f=p.next();!f.done;f=p.next()){f=Object.assign({},f.value);for(var g={keySystem:l,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},m=u(h),v=m.next();!v.done;v=m.next()){if((v=v.value).initData&&v.initData.length){for(var y=new Set,b=u(v.initData),w=b.next();!w.done;w=b.next())y.add(w.value.initDataType);g.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(g.distinctiveIdentifier="required"),v.persistentStateRequired&&(g.persistentState="required"),v.sessionType&&(g.sessionTypes=[v.sessionType]),i&&(g.audio?(v.encryptionScheme&&(g.audio.encryptionScheme=g.audio.encryptionScheme||v.encryptionScheme),g.audio.robustness=g.audio.robustness||v.audioRobustness):(g.audio={robustness:v.audioRobustness},v.encryptionScheme&&(g.audio.encryptionScheme=v.encryptionScheme)),""==g.audio.robustness&&delete g.audio.robustness),r&&(g.video?(v.encryptionScheme&&(g.video.encryptionScheme=g.video.encryptionScheme||v.encryptionScheme),g.video.robustness=g.video.robustness||v.videoRobustness):(g.video={robustness:v.videoRobustness},v.encryptionScheme&&(g.video.encryptionScheme=v.encryptionScheme)),""==g.video.robustness&&delete g.video.robustness)}f.keySystemConfiguration=g,d.push(f)}e.push(d)}}return e}function i_(e,t){return"flac"==e.toLowerCase()?eJ()?"fLaC":"flac":"opus"===e.toLowerCase()?eJ()&&"mp4"==ie(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&eq()?"ec-3":e}function iB(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return t.shift()+"."+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 iF(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,l=[];n&&l.push(n.mimeType),t&&l.push(t.mimeType),l=l[0]||null;var c=[];t&&c.push(t.kind),n&&c.push(n.kind),c=c[0]||null;var d=new Set;if(t)for(var h=u(t.roles),p=h.next();!p.done;p=h.next())d.add(p.value);if(n)for(p=(h=u(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:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:l,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=tx("video",n),e.audioCodec=tx("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 iV(e){return{id:e.id,active:!1,type:tA,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function iH(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=sc(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,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function iG(e){return e.__shaka_id||(e.__shaka_id=i0++),e.__shaka_id}function iK(e){var t=iq(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function iq(e){var t=e.language;return{id:iG(e),active:!1,type:"",bandwidth:0,language:ik(t||"und"),label:e.label,kind:e.kind,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:!1,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:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function iz(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function iX(e){return e.filter(function(e){return iz(e)})}function iW(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=iC(ik(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return ik(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=iY(r,n)).length)return e}else if((e=r.filter(function(e){return 0==e.roles.length})).length)return e;return(e=r.map(function(e){return e.roles}).reduce(iv,[])).length?iY(r,e[0]):r}function iY(e,t){return e.filter(function(e){return e.roles.includes(t)})}function iJ(e,t){t.length&&(t=t.filter(function(t){return it(e.codecs)==it(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 i$(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 iQ(e,t,n){if(0==n.autoShowText)return!1;if(1==n.autoShowText)return!0;var i=ik(n.preferredTextLanguage);return(t=ik(t.language),2==n.autoShowText)?iS(t,i):3==n.autoShowText?!!e&&(e=ik(e.language),iS(t,i)&&!iS(e,t)):(X("Invalid autoShowText setting!"),!1)}B("shaka.util.StreamUtils",iR),iR.meetsRestrictions=iL;var iZ=new Map,i0=0,i1=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),i2=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function i3(){var t=this;this.G=null,this.o=!1,this.m=new K,this.j=new Q,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(t.o&&t.g.useNetworkInformation){t.m=new K,t.g&&t.m.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.l=this.g=this.u=null,this.A=new eB(function(){if(t.o&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.B=e,"documentPictureInPicture"in e&&this.j.D(e.documentPictureInPicture,"enter",function(){t.B=e.documentPictureInPicture.window,t.A&&t.A.sb(),t.j.qa(t.B,"pagehide",function(){t.B=e,t.A&&t.A.sb()})}),this.C=this.i=null}function i4(e){if(!e.I){var t=e.m;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 i5(e,t,n,i,r){if(e.C){var a=e.C.Vg();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return iL(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(c=i3.prototype).stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},c.release=function(){this.j.release(),this.A=null},c.init=function(e){this.G=e},c.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(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=i5(this,this.g.restrictions,i,1/0,1/0),1/0!=e||1/0!=t){for(r=(n=u(n=function(e){var t=[];e=u(e);for(var n=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))).next();!r.done;r=n.next())if((r=r.value).height>=e&&r.width>=t){e=r.height,t=r.width;break}n=i5(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=[(n=i5(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},l=i+1;l<n.length;l++)if(r.bandwidth!=n[l].bandwidth){s=n[l];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},c.enable=function(){this.o=!0},c.disable=function(){this.o=!1},c.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&null!=this.u&&this.o&&i4(this))},c.trySuggestStreams=function(){null!=this.u&&this.o&&i4(this)},c.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.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},c.setVariants=function(e){this.F=e},c.playbackRateChanged=function(e){this.H=e},c.setMediaElement=function(t){function n(){i.A.da(i6)}var i=this;this.l=t,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in e&&(this.h=new ResizeObserver(n),this.h.observe(this.l)),this.j.D(t,"enterpictureinpicture",function(e){e.pictureInPictureWindow&&(i.i=e.pictureInPictureWindow,i.j.D(i.i,"resize",n))}),this.j.D(t,"leavepictureinpicture",function(){i.i&&i.j.Ka(i.i,"resize",n),i.i=null})},c.setCmsdManager=function(e){this.C=e},c.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)},B("shaka.abr.SimpleAbrManager",i3),i3.prototype.configure=i3.prototype.configure,i3.prototype.setCmsdManager=i3.prototype.setCmsdManager,i3.prototype.setMediaElement=i3.prototype.setMediaElement,i3.prototype.playbackRateChanged=i3.prototype.playbackRateChanged,i3.prototype.setVariants=i3.prototype.setVariants,i3.prototype.getBandwidthEstimate=i3.prototype.getBandwidthEstimate,i3.prototype.trySuggestStreams=i3.prototype.trySuggestStreams,i3.prototype.segmentDownloaded=i3.prototype.segmentDownloaded,i3.prototype.disable=i3.prototype.disable,i3.prototype.enable=i3.prototype.enable,i3.prototype.chooseVariant=i3.prototype.chooseVariant,i3.prototype.init=i3.prototype.init,i3.prototype.release=i3.prototype.release,i3.prototype.stop=i3.prototype.stop;var i6=1;function i8(e,t){var n=i7();this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=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 i9(e){var t,n;return R(function(i){if(1==i.g){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new eC(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),b(i,new Promise(function(e){new eB(e).da(n/1e3)}),2))}e.h*=e.m,w(i)})}function i7(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function re(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function rt(e,t){this.promise=e,this.i=t,this.g=null}function rn(e){return new rt(Promise.reject(e),function(){return Promise.resolve()})}function ri(){var e=Promise.reject(new eC(2,7,7001));return e.catch(function(){}),new rt(e,function(){return Promise.resolve()})}function rr(e){return new rt(Promise.resolve(e),function(){return Promise.resolve()})}function ra(e){return new rt(e,function(){return e.catch(function(){})})}function ro(e){return new rt(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function rs(t,n){if(n)if(n instanceof Map)for(var i=u(n.keys()),r=i.next();!r.done;r=i.next())Object.defineProperty(this,r=r.value,{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 ru(e){var t,n=new rs(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}B("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"}),re.prototype.resolve=function(){},re.prototype.reject=function(){},rt.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},rt.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},rt.prototype.Ha=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);if(i&&i.promise&&i.abort)return n.resolve(i.promise),function(){return i.abort()};return 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 re;
1a.catch(function(){});var o=new eC(2,7,7001);return this.promise.then(n(!0),n(!1)),new rt(a,function(){return i()})},a.Object.defineProperties(rt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),B("shaka.util.AbortableOperation",rt),rt.prototype.chain=rt.prototype.Ha,rt.prototype.finally=rt.prototype.finally,rt.all=ro,rt.prototype.abort=rt.prototype.abort,rt.notAbortable=ra,rt.completed=rr,rt.aborted=ri,rt.failed=rn,rs.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},rs.prototype.stopImmediatePropagation=function(){this.g=!0},rs.prototype.stopPropagation=function(){},B("shaka.util.FakeEvent",rs);var rl={Qj:"abrstatuschanged",Rj:"adaptation",Sj:"audiotrackchanged",Tj:"audiotrackschanged",Uj:"boundarycrossed",Vj:"buffering",Wj:"complete",Xj:"downloadcompleted",Yj:"downloadfailed",Zj:"downloadheadersreceived",$j:"drmsessionupdate",bk:"emsg",wk:"prft",Error:"error",ck:"expirationupdated",dk:"firstquartile",ek:"gapjumped",hk:"keystatuschanged",lk:"loaded",mk:"loading",pk:"manifestparsed",qk:"manifestupdated",rk:"mediaqualitychanged",sk:"mediasourcerecovered",Metadata:"metadata",tk:"midpoint",uk:"nospatialvideoinfo",vk:"onstatechange",xk:"ratechange",zk:"segmentappended",Ak:"sessiondata",Bk:"spatialvideoinfo",Ck:"stalldetected",Dk:"started",Ek:"statechanged",Fk:"streaming",Gk:"textchanged",Hk:"texttrackvisibility",Ik:"thirdquartile",Jk:"timelineregionadded",Kk:"timelineregionenter",Lk:"timelineregionexit",Mk:"trackschanged",Ok:"unloading",Qk:"variantchanged"};function rc(){this.Ea=new $,this.Te=this}function rd(){this.g=[]}function rh(e,t){e.g.push(t.finally(function(){tW(e.g,t)}))}function rp(e,t,n,i,r,a,o){rc.call(this),this.i=!1,this.u=new rd,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=i||null,this.G=r||null,this.I=a||null,this.H=o||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}function rf(e,t,n,i){i=void 0!==i&&i,n=n||rx;var r=rS.get(e);(!r||n>=r.priority)&&rS.set(e,{priority:n,we:t,kj:i})}function rg(e,t){for(var n=u(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=u(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function rm(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 rv(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}function ry(){this.g=0}function rb(e,t,n){rt.call(this,e,t),this.h=n}rc.prototype.addEventListener=function(e,t){this.Ea&&this.Ea.push(e,t)},rc.prototype.removeEventListener=function(e,t){this.Ea&&this.Ea.remove(e,t)},rc.prototype.dispatchEvent=function(e){if(!this.Ea)return!0;var t=this.Ea.get(e.type)||[],n=this.Ea.get("All");for(n&&(t=t.concat(n)),n=(t=u(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Te,e.currentTarget=this.Te;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},rc.prototype.release=function(){this.Ea=null},rd.prototype.destroy=function(){for(var e=[],t=u(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)},g(rp,rc),(c=rp.prototype).mg=function(e){this.B=e},c.ng=function(e){this.A=e},c.nj=function(e){this.g.add(e)},c.Jj=function(e){this.g.delete(e)},c.ai=function(){this.g.clear()},c.oj=function(e){this.h.add(e)},c.Kj=function(e){this.h.delete(e)},c.bi=function(){this.h.clear()},c.Jg=function(){this.j.clear()},c.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),rc.prototype.release.call(this),this.u.destroy()},c.request=function(e,t,n){var i=this,r=new ry;if(this.i){var a=Promise.reject(new eC(2,7,7001));return a.catch(function(){}),new rb(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?t4(t.retryParameters):i7(),t.uris=t4(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.Ha(function(){return n.body&&(n.body=eA(n.body)),e(t,n,i)})}var a=rr(void 0);e.G&&r(e.G),e=u(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.Ha(void 0,function(e){if(e instanceof eC&&7001==e.code)throw e;throw new eC(2,1,1006,e)})}(this,e,t,n)).Ha(function(){return function e(t,n,i,r,a,o,s,u){t.B&&(i.uris[o]=i.uris[o].replace("https://","http://")),t.A&&(i.uris[o]=i.uris[o].replace("http://","https://")),0<o&&t.I&&t.I(n,r,i.uris[o],i.uris[o-1]);var l=new es(i.uris[o]),c=l.Kb,d=!1;c||(eu(l,c=(c=location.protocol).slice(0,-1)),i.uris[o]=l.toString()),c=c.toLowerCase();var h=(c=rS.get(c))?c.we:null;if(!h)return rn(new eC(2,1,1e3,l));var p=c.kj;(l=t.j.get(l.nb))&&(i.headers["common-access-token"]=l);var f,g=null,m=null,v=!1,y=!1;return ra(i9(a)).Ha(function(){if(t.i)return ri();f=Date.now();var e=0;i.requestStartTime=Date.now();var a=h(i.uris[o],i,n,function(a,o,s){g&&g.stop(),m&&m.da(l/1e3),t.m&&n==rw&&(i.packetNumber=++e,t.m(a,o,rv(r),i),d=!0,u.g=s)},function(e){y=!0,i.timeToFirstByte=Date.now()-i.requestStartTime,t.l&&t.l(e,i,n)},{minBytesForProgressEvents:t.o});if(!p)return a;var s=i.retryParameters.connectionTimeout;s&&(g=new eB(function(){v=!0,a.abort()})).da(s/1e3);var l=i.retryParameters.stallTimeout;return l&&(m=new eB(function(){v=!0,a.abort()})),a}).Ha(function(e){g&&g.stop(),m&&m.stop(),void 0==e.timeMs&&(e.timeMs=Date.now()-f);var r=e.headers["common-access-token"];if(r){var a=new es(e.uri);t.j.set(a.nb,r)}return r={response:e,Qi:d},!y&&t.l&&t.l(e.headers,i,n),t.C&&t.C(i,e),r},function(l){if(g&&g.stop(),m&&m.stop(),t.F){var c=null,d=0;l instanceof eC&&(c=l,1001==l.code&&(d=l.data[1])),t.F(i,c,d,v)}if(t.i)return ri();if(v&&(l=new eC(1,1,1003,i.uris[o],n)),l instanceof eC){if(7001==l.code)throw l;if(1010==l.code)throw s;if(1==l.severity){if((c=new rs("retry",c=(new Map).set("error",l))).cancelable=!0,t.dispatchEvent(c),c.defaultPrevented)throw l;return o=(o+1)%i.uris.length,e(t,n,i,r,a,o,l,u)}}throw l})}(i,e,t,n,new i8(t.retryParameters,!1),0,null,r)}),s=o.Ha(function(t){var r=i,a=e,o=t,s=n,l=rr(void 0);r=u(r.h);for(var c=r.next(),d={};!c.done;d={qh:void 0},c=r.next())d.qh=c.value,l=l.Ha(function(e){return function(){var t=o.response;return t.data&&(t.data=eA(t.data)),(0,e.qh)(a,t,s)}}(d));return l.Ha(function(){return o},function(e){var t=2;if(e instanceof eC){if(7001==e.code)throw e;t=e.severity}throw new eC(t,1,1007,e)})}),l=Date.now(),c=0;a.promise.then(function(){c=Date.now()-l},function(){});var d=0;o.promise.then(function(){d=Date.now()},function(){});var h=s.Ha(function(r){var a=Date.now()-d,o=r.response;return o.timeMs+=c,o.timeMs+=a,r.Qi||!i.m||o.fromCache||"HEAD"==t.method||e!=rw||i.m(o.timeMs,o.data.byteLength,rv(n)),i.H&&i.H(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new rb(h.promise,function(){return h.abort()},r),rh(this.u,a),a},B("shaka.net.NetworkingEngine",rp),rp.prototype.request=rp.prototype.request,rp.prototype.destroy=rp.prototype.destroy,rp.makeRequest=rm,rp.defaultRetryParameters=function(){return i7()},rp.prototype.clearCommonAccessTokenMap=rp.prototype.Jg,rp.prototype.clearAllResponseFilters=rp.prototype.bi,rp.prototype.unregisterResponseFilter=rp.prototype.Kj,rp.prototype.registerResponseFilter=rp.prototype.oj,rp.prototype.clearAllRequestFilters=rp.prototype.ai,rp.prototype.unregisterRequestFilter=rp.prototype.Jj,rp.prototype.registerRequestFilter=rp.prototype.nj,rp.unregisterScheme=function(e){rS.delete(e)},rp.registerScheme=rf,rp.prototype.setForceHTTPS=rp.prototype.ng,rp.prototype.setForceHTTP=rp.prototype.mg,rp.NumBytesRemainingClass=ry,g(rb,rt),rp.PendingRequest=rb;var rw=1;rp.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},rp.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 rx=3;rp.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var rS=new Map;function rT(e){this.g=!1,this.h=new re,this.i=e}function rA(e,t){if(e.g){if(t instanceof eC&&7003==t.code)throw t;throw new eC(2,7,7003,t)}}function rk(e,t){var n=[];e=u(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rE(e){for(var t=new Map,n=u(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function rI(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function rM(e,t){this.h=eI(e),this.i=t==rD,this.g=0}function rC(){return new eC(2,3,3e3)}rT.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()}))},(c=rM.prototype).ta=function(){return this.g<this.h.byteLength},c.Ba=function(){return this.g},c.getLength=function(){return this.h.byteLength},c.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw rC()}},c.ma=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw rC()}},c.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw rC()}},c.bg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw rC()}},c.bd=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 rC()}if(2097151<t)throw new eC(2,3,3001);return this.g+=8,0x100000000*t+e},c.Db=function(e){if(this.g+e>this.h.byteLength)throw rC();var t=ek(this.h,this.g,e);return this.g+=e,t},c.skip=function(e){if(this.g+e>this.h.byteLength)throw rC();this.g+=e},c.rh=function(e){if(this.g<e)throw rC();this.g-=e},c.seek=function(e){if(0>e||e>this.h.byteLength)throw rC();this.g=e},c.Cc=function(){for(var e=this.g;this.ta()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=ek(this.h,e,this.g-e),this.g+=1,ti(e)},B("shaka.util.DataViewReader",rM),rM.prototype.readTerminatedString=rM.prototype.Cc,rM.prototype.seek=rM.prototype.seek,rM.prototype.rewind=rM.prototype.rh,rM.prototype.skip=rM.prototype.skip,rM.prototype.readBytes=rM.prototype.Db,rM.prototype.readUint64=rM.prototype.bd,rM.prototype.readInt32=rM.prototype.bg,rM.prototype.readUint32=rM.prototype.S,rM.prototype.readUint16=rM.prototype.ma,rM.prototype.readUint8=rM.prototype.X,rM.prototype.getLength=rM.prototype.getLength,rM.prototype.getPosition=rM.prototype.Ba,rM.prototype.hasMoreData=rM.prototype.ta;var rD=1;function rR(){this.i=new Map,this.h=new Map,this.g=!1}function rP(e){for(var t=rB(e);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function rL(e){for(var t=rB(e),n=e.reader.S(),i=0;i<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function rN(e){var t=rB(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function rj(e){var t=rB(e);e.reader.skip(8);var n=e.reader.ma();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function rO(e){return function(t){e(t.reader.Db(t.reader.getLength()-t.reader.Ba()))}}function rU(e){var t=0;e=u(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function r_(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function rB(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}rM.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(c=rR.prototype).box=function(e,t){return e=rU(e),this.i.set(e,rF),this.h.set(e,t),this},c.R=function(e,t){return e=rU(e),this.i.set(e,rV),this.h.set(e,t),this},c.stop=function(){this.g=!0},c.parse=function(e,t,n){for(e=new rM(e,0),this.g=!1;e.ta()&&!this.g;)this.Yc(0,e,t,n)},c.Yc=function(e,t,n,i){var r=t.Ba();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.S(),o=t.S(),s=r_(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.Ba()+8>t.getLength()){this.g=!0;return}a=t.bd(),u=!0}var l=this.h.get(o);if(l){var c=null,d=null;if(this.i.get(o)==rV){if(i&&t.Ba()+4>t.getLength()){this.g=!0;return}c=(d=t.S())>>>24,d&=0xffffff}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:l({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new rM(t=0<(i=o-t.Ba())?t.Db(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u})}else t.skip(Math.min(r+a-t.Ba(),t.getLength()-t.Ba()))}},B("shaka.util.Mp4Parser",rR),rR.headerSize=rB,rR.typeToString=r_,rR.allData=rO,rR.audioSampleEntry=rj,rR.visualSampleEntry=rN,rR.sampleDescription=rL,rR.children=rP,rR.prototype.parseNext=rR.prototype.Yc,rR.prototype.parse=rR.prototype.parse,rR.prototype.stop=rR.prototype.stop,rR.prototype.fullBox=rR.prototype.R,rR.prototype.box=rR.prototype.box;var rF=0,rV=1;function rH(e){var t=this;this.g=[],this.h=[],this.data=[],(new rR).box("moov",rP).box("moof",rP).R("pssh",function(e){if(!(1<e.version)){var n=ek(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(tm(e.reader.Db(16))),0<e.version){n=e.reader.S();for(var i=0;i<n;i++){var r=tm(e.reader.Db(16));t.h.push(r)}}}}).parse(e)}function rG(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=eI(o),l=0;if(s.setUint32(l,a),l+=4,s.setUint32(l,0x70737368),l+=4,1>i?s.setUint32(l,0):s.setUint32(l,0x1000000),l+=4,o.set(t,l),l+=t.length,0<i)for(s.setUint32(l,n.size),l+=4,n=(t=u(n)).next();!n.done;n=t.next())n=tg(n.value),o.set(n,l),l+=n.length;return s.setUint32(l,r),o.set(e,l+4),o}function rK(e){var t=this;this.C=e,this.j=this.A=null,this.ka=this.ea=!1,this.H=0,this.h=null,this.o=new Q,this.i=new Map,this.T=[],this.B=new Map,this.K=!1,this.m=new re,this.g=null,this.u=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.Z=new Map,this.fa=new Map,this.L=new eB(function(){var e,n,i;
1return n=(e=t).Z,void((i=e.fa).clear(),n.forEach(function(e,t){return i.set(t,e)}),(n=Array.from(i.values())).length&&n.every(function(e){return"expired"==e})&&e.u(new eC(2,6,6014)),e.C.te(rI(i)))}),this.O=!1,this.M=[],this.W=!1,this.I=new eB(function(){var e;(e=t).i.forEach(function(t,n){var i=t.Xf,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Xf=r)})}),this.m.catch(function(){}),this.l=new rT(function(){var e;return e=t,R(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,b(t,r4(e),2);case 2:if(!e.j){t.s(3);break}return x(t,4),b(t,e.j.setMediaKeys(null),6);case 6:T(t,5);break;case 4:A(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.u=function(){},e.C=null,e.$=!1,e.G=null,w(t)}})}),this.$=!1,this.F=this.G=null,this.P=function(){return!1}}function rq(e,t,n,i){i=void 0===i||i,e.B=new Map,n=u(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(r=(n=u(e.g.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,rz(e,t,i)}function rz(t,n,i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,w;return R(function(x){if(1==x.g){for(r9(t.g.clearKeys,n),(r=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}))||!i||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})}),t=(e=u(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,rE(t.g.servers)),a=new Set,s=(o=u(n)).next();!s.done;s=o.next())for(c=(l=u(r5(s.value))).next();!c.done;c=l.next())d=c.value,a.add(d);
1for(p=(h=u(a)).next();!p.done;p=h.next())!function(t,n,i,r){var a=t.keySystem;a&&("org.w3.clearkey"!=a||!t.licenseServerUri)&&(n.size&&n.get(a)&&(t.licenseServerUri=n=n.get(a)),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"))}(p.value,rE(t.g.servers),rE(t.g.advanced||{}),t.g.keySystemsMapping);for(f=function(e,n){var i=[];e=u(e);for(var r=e.next();!r.done;r=e.next()){var a,o=(r=r.value)[n]||t.g.advanced&&t.g.advanced[r.keySystem]&&t.g.advanced[r.keySystem][n]||"";if((a=""==o)&&(a=!!(a=r.keySystem)&&!!a.match(/^com\.widevine\.alpha/)),a&&("audioRobustness"==n?o=[t.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(o=[t.g.defaultVideoRobustnessForWidevine])),"string"==typeof o)i.push(r);else if(Array.isArray(o))for(0===o.length&&(o=[""]),a=(o=u(o)).next();!a.done;a=o.next()){var s={};i.push(Object.assign({},r,(s[n]=a.value,s)))}}return i},g=new Set,v=(m=u(n)).next();!v.done;v=m.next())(y=v.value).video&&!g.has(y.video)&&(y.video.drmInfos=f(y.video.drmInfos,"videoRobustness"),y.video.drmInfos=f(y.video.drmInfos,"audioRobustness"),g.add(y.video)),y.audio&&!g.has(y.audio)&&(y.audio.drmInfos=f(y.audio.drmInfos,"videoRobustness"),y.audio.drmInfos=f(y.audio.drmInfos,"audioRobustness"),g.add(y.audio));return g.clear(),b(x,iO(n,t.O,t.$,t.g.preferredKeySystems),2)}return(rA(t.l),r||Object.keys(t.g.servers).length)?(w=r$(t,void 0,n),x.return(r?w:w.catch(function(){}))):(t.ea=!0,x.return(Promise.resolve()))})}function rX(e){var t;return R(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.s(2);break}return b(n,e.G,3);case 3:return rA(e.l),n.return();case 2:return x(n,4),e.G=e.j.setMediaKeys(e.A),b(n,e.G,6);case 6:T(n,5);break;case 4:t=A(n),e.u(new eC(2,6,6003,t.message));case 5:rA(e.l),w(n)}})}function rW(e){var t,n,i;return R(function(r){if(1==r.g)return e.B.size?(e.B.forEach(function(t,n){r0(e,n,t)}),b(r,e.m,3)):r.s(2);if(2!=r.g){if(0<(e.h&&e.h.keyIds||new Set([])).size&&function(e){for(var t=u(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.Z.get(n.value))return!1;return!0}(e))return r.return(e.m);e.K=!1,e.m=new re,e.m.catch(function(){})}for(n=(t=u((e.h?e.h.initData:[])||[])).next();!n.done;n=t.next())rY(e,(i=n.value).initDataType,i.initData);return r6(e)&&e.m.resolve(),r.return(e.m)})}function rY(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var i=e.i.values();i=u(i);for(var r=i.next();!r.done;r=i.next())if(eT(n,r.value.initData))return;var a=!1;if(e.B.forEach(function(e){!a&&eT(n,e.initData)&&(a=!0)}),a)return}e.K=!0,0<e.i.size&&r6(e)&&(e.m.resolve(),e.K=!1,e.m=new re,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.A.createSession(i)}catch(t){e.u(new eC(2,6,6005,t.message));return}e.o.D(r,"message",function(t){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(t):r1(e,t)}),e.o.D(r,"keystatuseschange",function(t){return r2(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Xf:1/0,ub:null,type:i});try{n=e.g.initDataTransform(n,t,e.h)}catch(n){t=n,n instanceof eC||(t=new eC(2,6,6016,n)),e.u(t);return}e.g.logLicenseExchange&&tp(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+=0x100000000),i="0x"+i.toString(16)}e.u(new eC(2,6,6006,t.message,t,i))}})}(e,t,n,e.h.sessionType)}}function rJ(e){return Array.from(e=rk(e=e.i.keys(),function(e){return e.sessionId}))}function r$(e,t,n){var i,r,a,o,s,l,c;return R(function(d){switch(d.g){case 1:var h,p,f,g,m,v,y,w,S,k,E,I,M,C,D,P,L;if(i=new Map,n.length){r=function(e,t,n){for(var i=u(t),r=i.next();!r.done;r=i.next()){r=u(r5(r.value));for(var a=r.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 eC(2,6,6e3);(i=e.g.preferredKeySystems).length||1==(r=rE(e.g.servers)).size&&(i=Array.from(r.keys()));var o=(r=u(i)).next();for(a={};!o.done;a={oh:void 0},o=r.next()){a.oh=o.value,o=u(t);for(var s=o.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.oh}}(a)))return s.keySystemAccess}for(a=(r=u([!0,!1])).next();!a.done;a=r.next())for(a=a.value,s=(o=u(t)).next();!s.done;s=o.next()){s=u(s.value.decodingInfos);for(var l=s.next();!l.done;l=s.next())if((l=l.value).supported&&l.keySystemAccess){var c=l.keySystemAccess.keySystem;if(!i.includes(c)){var d=n.get(c);for(!d&&e.g.keySystemsMapping[c]&&(d=n.get(e.g.keySystemsMapping[c])),d=(c=u(d)).next();!d.done;d=c.next())if(!!d.value.licenseServerUri==a)return l.keySystemAccess}}}return null}(e,n,i),d.s(2);break}return b(d,(h=e,p=t,R(function(e){switch(e.g){case 1:if(1==p.size&&p.has(""))throw new eC(2,6,6e3);
1for(m=(g=u(p.values())).next();!m.done;m=g.next())0==(v=m.value).audioCapabilities.length&&delete v.audioCapabilities,0==v.videoCapabilities.length&&delete v.videoCapabilities;w=(y=u(h.g.preferredKeySystems)).next();case 2:if(w.done){e.s(4);break}if(S=w.value,!p.has(S)){e.s(3);break}return k=p.get(S),x(e,6),b(e,navigator.requestMediaKeySystemAccess(S,[k]),8);case 8:return f=e.h,e.return(f);case 6:A(e);case 7:rA(h.l);case 3:w=y.next(),e.s(2);break;case 4:I=(E=u([!0,!1])).next();case 9:if(I.done){e.s(11);break}M=I.value,D=(C=u(p.keys())).next();case 12:if(D.done){I=E.next(),e.s(9);break}if(P=D.value,(L=p.get(P)).drmInfos.some(function(e){return!!e.licenseServerUri})!=M){e.s(13);break}return x(e,15),b(e,navigator.requestMediaKeySystemAccess(P,[L]),17);case 17:return f=e.h,e.return(f);case 15:A(e);case 16:rA(h.l);case 13:D=C.next(),e.s(12);break;case 11:return e.return(f)}})),3);case 3:r=d.h;case 2:if(!(a=r)){if(!navigator.requestMediaKeySystemAccess)throw new eC(2,6,6020);throw new eC(2,6,6001)}if(rA(e.l),x(d,4),a.getConfiguration(),o=e.g.keySystemsMapping[a.keySystem]||a.keySystem,n.length){var N,j,O,U=o,_=i.get(o),B=[],F=[],V=[],H=[],G=[],K=new Set,q=new Set;r8(_,B,F,H,V,G,K,q);var z=e.O?"persistent-license":"temporary";for(U={keySystem:U,encryptionScheme:B[0],licenseServerUri:F[0],distinctiveIdentifierRequired:_[0].distinctiveIdentifierRequired,persistentStateRequired:_[0].persistentStateRequired,sessionType:_[0].sessionType||z,audioRobustness:_[0].audioRobustness||"",videoRobustness:_[0].videoRobustness||"",serverCertificate:H[0],serverCertificateUri:V[0],initData:G,keyIds:K},0<q.size&&(U.keySystemUris=q),q=(_=u(_)).next();!q.done;q=_.next())(q=q.value).distinctiveIdentifierRequired&&(U.distinctiveIdentifierRequired=q.distinctiveIdentifierRequired),q.persistentStateRequired&&(U.persistentStateRequired=q.persistentStateRequired);_=U}else _=o,q=t.get(o),U=[],B=[],F=[],V=[],H=[],G=new Set,r8(q.drmInfos,U,B,V,F,H,G),_={keySystem:_,encryptionScheme:U[0],licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==q.distinctiveIdentifier,persistentStateRequired:"required"==q.persistentState,sessionType:q.sessionTypes[0]||"temporary",audioRobustness:(q.audioCapabilities?q.audioCapabilities[0].robustness:"")||"",videoRobustness:(q.videoCapabilities?q.videoCapabilities[0].robustness:"")||"",serverCertificate:V[0],serverCertificateUri:F[0],initData:H,keyIds:G};if(e.h=_,!e.h.licenseServerUri)throw new eC(2,6,6012,e.h.keySystem);return b(d,a.createMediaKeys(),6);case 6:if(s=d.h,rA(e.l),e.A=s,!(""!=e.g.minHdcpVersion&&"getStatusForPolicy"in e.A)){d.s(7);break}return x(d,8),b(d,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if("usable"!=d.h)throw new eC(2,6,6018);rA(e.l),T(d,7,4);break;case 8:if((l=A(d,4))instanceof eC)throw l;throw new eC(2,6,6019,l.message);case 7:return e.ea=!0,b(d,(N=e,R(function(e){switch(e.g){case 1:if(!N.A||!N.h)return e.return();if(!N.h.serverCertificateUri||N.h.serverCertificate&&N.h.serverCertificate.length){e.s(2);break}return j=rm([N.h.serverCertificateUri],N.g.retryParameters),x(e,3),b(e,N.C.Xb.request(5,j,{isPreload:N.P()}).promise,5);case 5:O=e.h,N.h.serverCertificate=ek(O.data),T(e,4);break;case 3:throw new eC(2,6,6017,A(e));case 4:if(N.l.g)return e.return();case 2:if(!N.h.serverCertificate||!N.h.serverCertificate.length)return e.return();return x(e,6),b(e,N.A.setServerCertificate(N.h.serverCertificate),8);case 8:T(e,0);break;case 6:throw new eC(2,6,6004,A(e).message)}})),11);case 11:rA(e.l),T(d,0);break;case 4:if(c=A(d),rA(e.l,c),e.h=null,c instanceof eC)throw c;throw new eC(2,6,6002,c.message)}})}function rQ(e){r6(e)&&e.m.resolve()}function rZ(e,t){new eB(function(){t.loaded=!0,rQ(e)}).da(ae)}function r0(e,t,n){var i,r,a,o,s,u,l;return R(function(c){switch(c.g){case 1:try{i=e.A.createSession("persistent-license")}catch(t){return r=new eC(2,6,6005,t.message),e.u(r),c.return(Promise.reject(r))}return e.o.D(i,"message",function(t){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(t):r1(e,t)}),e.o.D(i,"keystatuseschange",function(t){return r2(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Xf:1/0,ub:null,type:"persistent-license"},e.i.set(i,a),x(c,2),b(c,i.load(t),4);case 4:return o=c.h,rA(e.l),o||(e.i.delete(i),s=e.g.persistentSessionOnlinePlayback?1:2,e.u(new eC(s,6,6013)),a.loaded=!0),rZ(e,a),rQ(e),c.return(i);case 2:u=A(c),rA(e.l,u),e.i.delete(i),l=e.g.persistentSessionOnlinePlayback?1:2,e.u(new eC(l,6,6005,u.message)),a.loaded=!0,rQ(e);case 3:return c.return(Promise.resolve())}})}function r1(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g;R(function(m){switch(m.g){case 1:if(n=t.target,e.g.logLicenseExchange&&tp(t.message),i=e.i.get(n),r=e.h.licenseServerUri,a=e.g.advanced[e.h.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=rm([r],e.g.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.h,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.h.keySystem){var v=o,y=e.h;try{var S=ta(v.body);if(S){var k=JSON.parse(S);k.type||(k.type=y.sessionType,v.body=to(JSON.stringify(k)))}}catch(e){}}if(eN(e.h.keySystem))if((v=tr(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(S=(y=u(y=nr(v=t8(v,"PlayReadyKeyMessage"),"HttpHeader"))).next();!S.done;S=y.next())S=nr(k=S.value,"name")[0],k=nr(k,"value")[0],o.headers[nn(S)]=nn(k);o.body=tf(nn(v=nr(v,"Challenge")[0]))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return l=Date.now(),x(m,2),d=e.C.Xb.request(2,o,{isPreload:e.P()}),e.T.push(d),b(m,d.promise,4);case 4:c=m.h,tW(e.T,d),T(m,3);break;case 2:if(h=A(m),e.l.g)return m.return();return p=new eC(2,6,6007,h),1==e.i.size?(e.u(p),i&&i.ub&&i.ub.reject(p)):(i&&i.ub&&i.ub.reject(p),e.i.delete(n),r6(e)&&(e.m.resolve(),e.L.da(.1))),m.return();case 3:if(e.l.g)return m.return();return e.H+=(Date.now()-l)/1e3,e.g.logLicenseExchange&&tp(c.data),x(m,5),b(m,n.update(c.data),7);case 7:T(m,6);break;case 5:return f=new eC(2,6,6008,A(m).message),e.u(f),i&&i.ub&&i.ub.reject(f),m.return();case 6:if(e.l.g)return m.return();g=new rs("drmsessionupdate"),e.C.onEvent(g),i&&(i.ub&&i.ub.resolve(),rZ(e,i)),w(m)}})}function r2(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(eN(e.h.keySystem)&&16==r.byteLength&&(eH()||eQ())){var o=(a=eI(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=tm(r).slice(0,32),e.Z.set(r,t)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.ub&&(e.i.delete(t),r3(t)),r6(e)&&(e.m.resolve(),e.L.da(at))}function r3(e){return R(function(t){return 1==t.g?(x(t,2),b(t,iw(r7,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.g?T(t,0):void(A(t),w(t))})}function r4(e){var t;return R(function(n){return t=Array.from(e.i.entries()),e.i.clear(),b(n,Promise.all(t.map(function(t){var n=(t=u(t)).next().value,i=t.next().value;return R(function(t){return 1==t.g?(x(t,2),e.ka||e.B.has(n.sessionId)||"persistent-license"!==i.type||e.g.persistentSessionOnlinePlayback?b(t,r3(n),5):b(t,n.remove(),5)):2!=t.g?T(t,0):void(A(t),w(t))})})),0)})}function r5(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function r6(e){var t,n=e=e.i.values();n=u(n);for(var i=n.next();!i.done;i=n.next()){if(!(t=i.value).loaded)return!1}return!0}function r8(t,n,i,r,a,o,s,c){var d=[];t=u(t);for(var h=t.next(),p={};!h.done;p={wa:void 0},h=t.next()){if(p.wa=h.value,n.includes(p.wa.encryptionScheme)||n.push(p.wa.encryptionScheme),"org.w3.clearkey"==p.wa.keySystem&&p.wa.licenseServerUri.startsWith("data:application/json;base64,")?d.includes(p.wa.licenseServerUri)||d.push(p.wa.licenseServerUri):i.includes(p.wa.licenseServerUri)||i.push(p.wa.licenseServerUri),a.includes(p.wa.serverCertificateUri)||a.push(p.wa.serverCertificateUri),p.wa.serverCertificate&&(r.some(function(e){return function(t){return eT(t,e.wa.serverCertificate)}}(p))||r.push(p.wa.serverCertificate)),p.wa.initData){h=u(p.wa.initData);for(var f=h.next(),g={};!f.done;g={Of:void 0},f=h.next())g.Of=f.value,o.some(function(e){return function(t){var n=e.Of;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&eT(t.initData,n.initData)}}(g))||o.push(g.Of)}if(p.wa.keyIds)for(f=(h=u(p.wa.keyIds)).next();!f.done;f=h.next())s.add(f.value);if(p.wa.keySystemUris&&c)for(h=(p=u(p.wa.keySystemUris)).next();!h.done;h=p.next())c.add(h.value)}if(1==d.length)i.push(d[0]);else if(0<d.length){for(n=[],r=(d=u(d)).next();!r.done;r=d.next())r=JSON.parse(r=e.atob(r.value.split("data:application/json;base64,").pop())),n.push.apply(n,l(r.keys));d=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(d))}}function r9(e,t){if(0!=(e=rE(e)).size){e=tw(e),t=u(t);for(var n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(c=rK.prototype).destroy=function(){return this.l.destroy()},c.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)},c.Lb=function(e){var t,n=this;return R(function(i){if(1==i.g)return n.j===e?i.return():n.A?(n.j=e,n.o.qa(n.j,"play",function(){for(var e=u(n.M),t=e.next();!t.done;t=e.next())r1(n,t.value);n.W=!0,n.M=[]}),n.j.remote?(n.o.D(n.j.remote,"connect",function(){return r4(n)}),n.o.D(n.j.remote,"connecting",function(){return r4(n)}),n.o.D(n.j.remote,"disconnect",function(){return r4(n)})):"webkitCurrentPlaybackTargetIsWireless"in n.j&&n.o.D(n.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return r4(n)}),n.F=n.h&&n.h.initData.find(function(e){return 0<e.initData.length})||null,(t=n.h.keySystem).startsWith("com.microsoft.playready.recommendation")||"com.apple.fps"==t||!(n.F||n.B.size||n.g.parseInbandPsshEnabled)?(n.o.D(n.j,"encrypted",function(e){var t,i;return t=n,i=e,R(function(e){if(1==e.g)return b(e,rX(t),2);rY(t,i.initDataType,ek(i.initData)),w(e)})}),i.s(2)):b(i,rX(n),2)):(n.o.qa(e,"encrypted",function(){n.u(new eC(2,6,6010))}),i.return());rW(n).catch(function(){}),w(i)})},c.If=function(){var e=this,t=this.i.keys();return Array.from(t=rk(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},c.pd=function(){var e=1/0,t=this.i.keys();t=u(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},c.be=function(){return rI(this.fa)};var r7=1,ae=5,at=.5;function an(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=u(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function ai(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(e){return ii(e)}),t=t.codecs.split(",").map(function(e){return ii(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 ar(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=u(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function aa(){}function ao(){this.g=au,this.i=(new Map).set(au,2).set(as,1),this.h=0}an.prototype.add=function(e,t){var n,i=this.h;
1if(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&&!ai(n,r))&&ar(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||ai(i,n))&&ar(i.roles,n.roles))),!n&&(this.g.add(e),!0)},an.prototype.values=function(){return this.g.values()},B("shaka.media.AdaptationSet",an),B("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),aa.prototype.create=function(){},aa.prototype.configure=function(){},B("shaka.media.AdaptationSetCriteria",aa);var as=0,au=1;function al(e,t,n){this.g=e,this.i=t,this.h=n}function ac(e,t){return R(function(n){if(1==n.g){var i,r,a,o;return b(n,(i=e.h,r=t,a=e.g.drm.preferredKeySystems,o=e.g.drm.keySystemsMapping,a=void 0===a?[]:a,o=void 0===o?{}:o,R(function(e){var t,n,s,l,c,d,h,p,f;return 1==e.g?b(e,iN(i,r,0<r.offlineSessionIds.length,a,o),2):((t=r).textStreams=t.textStreams.filter(function(e){return ip(e=n8(e.mimeType,e.codecs))}),b(e,(n=r,R(function(e){switch(e.g){case 1:s=[],c=(l=u(n.imageStreams)).next();case 2:var t;if(c.done){e.s(4);break}if("application/mp4"==(h=(d=c.value).mimeType)&&"mjpg"==d.codecs&&(h="image/jpg"),i1.has(h)){e.s(5);break}if(!(p=i2.get(h))){i1.set(h,!1),e.s(5);break}return b(e,(t=p,new Promise(function(e){var n=new Image;n.src=t,"decode"in n?n.decode().then(function(){e(!0)}).catch(function(){e(!1)}):n.onload=n.onerror=function(){e(2===n.height)}})),7);case 7:f=e.h,i1.set(h,f);case 5:i1.get(h)&&s.push(d),c=l.next(),e.s(2);break;case 4:n.imageStreams=s,w(e)}})),0))})),2)}if(e.g.streaming.dontChooseCodecs||iP(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(iz))throw new eC(2,4,4032);return n.return(ah(e,t))})}function ad(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=u(t.variants);for(var r=t.next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=iL(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function ah(e,t){var n=ad(e,t);if(t){var i=e.h?e.h.h:null;if(i&&e.h.A){for(var r=new Set,a=u(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=u(r)).next();!a.done;a=r.next())ap(e,i.keySystem,a.value)}af(e,t)}return n}function ap(e,t,n){n=u(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){i=u(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,rY(e.h,r.initDataType,r.initData)}}function af(e,t){var n=Object.keys(e=e.h?e.h.be():{});n=n.length&&"00"==n[0];var i=!1,r=!1,a=new Set,o=new Set,s=new Set;t=u(t.variants);for(var l=t.next();!l.done;l=t.next())(l=l.value).audio&&s.add(l.audio),l.video&&s.add(l.video),l.allowedByApplication?l.allowedByKeySystem&&(i=!0):r=!0;for(t=(s=u(s)).next();!t.done;t=s.next())if((t=t.value).keyIds.size)for(l=(t=u(t.keyIds)).next();!l.done;l=t.next()){l=l.value;var c=e[n?"00":l];c?ag.includes(c)&&o.add(c):a.add(l)}if(!i)throw new eC(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var ag=["output-restricted","internal-error"];function am(){}function av(e,t){ab.set(e,t)}function ay(e,t){if(t){var n=ab.get(t.toLowerCase());if(n)return n}throw new eC(2,4,4e3,e,t)}B("shaka.media.ManifestParser",am),am.unregisterParserByMime=function(e){ab.delete(e)},am.registerParserByMime=av,am.registerParserByExtension=function(){en("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},am.AccessibilityPurpose={Pk:"visually impaired",fk:"hard of hearing"};var ab=new Map;function aw(e,t){var n=null,i=null,r=null,a=null,o=e.S();return 1&t&&(r=e.bd()),2&t&&(a=e.S()),8&t&&(n=e.S()),16&t&&(i=e.S()),{trackId:o,ld:n,md:i,Xh:r,sh:a}}function ax(e,t){return 1==t?{baseMediaDecodeTime:0x100000000*(t=e.S())+(e=e.S())}:{baseMediaDecodeTime:e.S()}}
1function aS(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.ma())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function aT(e,t,n){var i=e.S(),r=[],a=null;1&n&&(a=e.bg()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={ig:null,sampleSize:null,Be:null};256&n&&(s.ig=e.S()),512&n&&(s.sampleSize=e.S()),1024&n&&e.skip(4),2048&n&&(s.Be=0==t?e.S():e.bg()),r.push(s)}return{Uk:i,hg:r,qf:a}}function aA(e){e.skip(6),e.skip(2),e.skip(8);var t=e.ma();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.ma()+e.ma()/65536}}function ak(e){return{codec:r_(e=e.S())}}function aE(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function aI(e){return(10>e?"0":"")+e}function aM(e){if(!aB){aB=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]);a$=a_("ftyp",t,new Uint8Array([0,0,0,1]),t,n),t=a_("dref",aQ),aZ=a_("dinf",t)}this.g=e}function aC(e){for(var t=[],n=u(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=a_;var s=o.id+1,c=o.stream.width||0,d=o.stream.height||0;"audio"==o.type&&(d=c=0);var h=o.duration*o.timescale,p=Math.floor(h/(aF+1));switch(h=Math.floor(h%(aF+1)),s=a_("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(l(aj(s,4)),[0,0,0,0],l(aj(p,4)),l(aj(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],l(aj(c,2)),[0,0],l(aj(d,2)),[0,0]))),c=a_,d=Math.floor((p=o.duration*o.timescale)/(aF+1)),p=Math.floor(p%(aF+1)),h=(h=o.stream.language).charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96,d=a_("mdhd",d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(l(aj(o.timescale,4)),l(aj(d,4)),l(aj(p,4)),l(aj(h,2)),[0,0]))),p=o,h=new Uint8Array([]),p.type){case"video":h=aH;break;case"audio":h=aG}p=a_("hdlr",h);e:{switch(o.type){case"video":o=a_("minf",a_("vmhd",aW),aZ,aD(o));break e;case"audio":o=a_("minf",a_("smhd",aY),aZ,aD(o));break e}o=new Uint8Array([])}i=i("trak",s,o=c("mdia",d,p,o)),a.call(r,i)}for(t=tv.apply(td,l(t)),a=e.g[0],n=a_,r=Math.floor((i=a.duration*a.timescale)/(aF+1)),i=Math.floor(i%(aF+1)),r=a_("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(l(aj(a.timescale,4)),l(aj(r,4)),l(aj(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=[],c=(e=u(e.g)).next();!c.done;c=e.next())s=(o=i).push,c=a_("trex",c=new Uint8Array([0,0,0,0].concat(l(aj(c.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),s.call(o,c);if(e=a_("mvex",e=tv.apply(td,l(i))),i=[],a.encrypted){for(o=(a=u(a.stream.drmInfos)).next();!o.done;o=a.next())if((o=o.value).initData)for(s=(o=u(o.initData)).next();!s.done;s=o.next())i.push(s.value.initData);a=tv.apply(td,l(i))}else a=new Uint8Array([]);return e=n("moov",r,t,e,a),(t=new Uint8Array(a$.byteLength+e.byteLength)).set(a$),t.set(e,a$.byteLength),t}function aD(e){var t="aac";e.codecs.includes("mp3")?t="mp3":e.codecs.includes("ac-3")?t=eq()?"ec-3":"ac-3":e.codecs.includes("ec-3")?t="ec-3":e.codecs.includes("opus")&&(t="opus");var n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(t=e.stream.width||0,n=e.stream.height||0,0<e.Ca.byteLength)var i=a_("avcC",e.Ca);else{i=a_;for(var r=7,a=[],o=[],s=0,u=0,c=0,d=0;d<e.lb.length;d++){var h=aO(e.lb[d]);switch(31&h[0]){case 7:a.push(h),r+=h.length+2;break;case 8:o.push(h),r+=h.length+2}}for(0<a.length&&(s=a[0][1],c=a[0][2],u=a[0][3]),r=new Uint8Array(r),d=0,r[d++]=1,r[d++]=s,r[d++]=c,r[d++]=u,r[d++]=255,r[d++]=224|a.length,s=0;s<a.length;s++)r[d++]=(65280&a[s].length)>>8,r[d++]=255&a[s].length,r.set(a[s],d),d+=a[s].length;for(r[d++]=o.length,a=0;a<o.length;a++)r[d++]=(65280&o[a].length)>>8,r[d++]=255&o[a].length,r.set(o[a],d),d+=o[a].length;i=i("avcC",r)}t=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(l(aj(t,2)),l(aj(n,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])),n="avc1",o=aR(e),a=new Uint8Array([]),e.encrypted&&(a=aL(0,e.stream,e.codecs),n="encv"),n=a_(n,t,i,o,a)}else e.codecs.includes("hvc1")&&(n=e.stream.width||0,i=e.stream.height||0,t=new Uint8Array([]),0<e.Ca.byteLength&&(t=a_("hvcC",e.Ca)),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(l(aj(n,2)),l(aj(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="hvc1",o=aR(e),a=new Uint8Array([]),e.encrypted&&(a=aL(0,e.stream,e.codecs),i="encv"),n=a_(i,n,t,o,a));break;case"audio":"mp3"==t?e=a_(".mp3",aP(e)):("ac-3"==t?(t=a_("dac3",e.ra),n="ac-3"):"ec-3"==t?(t=a_("dec3",e.ra),n="ec-3"):"opus"==t?(t=a_("dOps",e.ra),n="Opus"):(0<e.ra.byteLength?t=a_("esds",e.ra):(t=a_,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=tx("audio",e.codecs.split(",")),o=(u={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})[a],("mp4a.40.5"===s||"mp4a.40.29"===s)&&(o=u[2*a]),a=parseInt(s.split(".").pop(),10),t=t("esds",n=new Uint8Array([0,0,0,0,3,25].concat(l(aj(n,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,a<<3|o>>>1,o<<7|i<<3,6,1,2])))),n="mp4a"),i=new Uint8Array([]),e.encrypted&&(i=aL(0,e.stream,e.codecs),n="enca"),e=a_(n,aP(e),t,i)),n=e}return e=a_("stsd",aJ,n),a_("stbl",e,a_("stts",aK),a_("stsc",aq),a_("stsz",aX),a_("stco",az))}function aR(e){if(!e.Ia&&!e.La)return new Uint8Array([]);var t=e.La;
1return a_("pasp",e=new Uint8Array([].concat(l(aj(e.Ia,4)),l(aj(t,4)))))}function aP(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(l(aj(e.stream.audioSamplingRate||44100,2)),[0,0]))}function aL(e,t,n){e=a_,n=a_("frma",n=new Uint8Array([].concat(l(aj(aU(n.split(".")[0]),4)))));var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=a_("schm",i=new Uint8Array([0,0,0,0].concat(l(aj(aU(i),4)),[0,1,0,0]))),r=a_;var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=u(t.drmInfos);for(var o=t.next();!o.done;o=t.next())if((o=o.value)&&o.keyIds&&o.keyIds.size){o=u(o.keyIds);for(var s=o.next();!s.done;s=o.next())a=aO(s.value)}return e("sinf",n,i,r("schi",t=a_("tenc",t=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function aN(e){var t=[];e=u(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i,r,a=t.push,o=a.apply,s=a_,c=new Uint8Array([0,0,0,0].concat(l(aj(n.data?n.data.Eb:0,4))));c=a_("mfhd",c);var d=n.data?n.data.jb:[],h=new Uint8Array(4+d.length);for(r=0;r<d.length;r++){var p=d[r].flags;h[r+4]=p.Ya<<4|p.$a<<2|p.Za}var f=(d=a_("sdtp",h)).length+92;h=a_,r=a_("tfhd",r=new Uint8Array([0,0,0,58].concat(l(aj(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var g=Math.floor((p=n.data?n.data.baseMediaDecodeTime:0)%(aF+1));p=a_("tfdt",p=new Uint8Array([1,0,0,0].concat(l(aj(Math.floor(p/(aF+1)),4)),l(aj(g,4)))));var m=f,v=12+16*(g=(f=n.data?n.data.jb:[]).length),y=new Uint8Array(v);for(m+=8+v,y.set([+("video"===n.type),0,15,1].concat(l(aj(g,4)),l(aj(m,4))),0),m=0;m<g;m++){var b=f[m];v=aj(b.duration,4);var w=aj(b.size,4),x=b.flags;b=aj(b.eb,4),y.set([].concat(l(v),l(w),[x.hb<<2|x.Ya,x.$a<<6|x.Za<<4|x.ib,61440&x.Xa,15&x.Xa],l(b)),12+16*m)}s=s("moof",c,d=h("traf",r,p,f=a_("trun",y),d)),o.call(a,t,[s,(i=((i=n).data?i.data.jb:[]).map(function(e){return e.data}),a_("mdat",i=tv.apply(td,l(i))))])}return tv.apply(td,l(t))}function aj(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function aO(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 aU(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function a_(e){var t=P.apply(1,arguments),n=aV.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],aV.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 aB=!1,aF=0xffffffff,aV=new Map,aH=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]),aG=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]),aK=new Uint8Array([0,0,0,0,0,0,0,0]),aq=new Uint8Array([0,0,0,0,0,0,0,0]),az=new Uint8Array([0,0,0,0,0,0,0,0]),aX=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),aW=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),aY=new Uint8Array([0,0,0,0,0,0,0,0]),aJ=new Uint8Array([0,0,0,0,0,0,0,1]),a$=new Uint8Array([]),aQ=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),aZ=new Uint8Array([]);function a0(e,t,n){0!=(t=(e=eI(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}function a1(e,t,n,i,r,a,o,s){this.N=e,this.Sa=t,this.xa=n,this.Wc=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 a2(e,t){return e===t||(e&&t?e.uc()==t.uc()&&e.tc()==t.tc()&&tJ(e.N().sort(),t.N().sort())&&eT(e.Ib(),t.Ib()):e==t)}function a3(e,t,n,i,r,a,o,s,l,c,d,h,p,f,g,m){for(c=void 0===c?[]:c,f=void 0===f?a4:f,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Sa=i,this.xa=r,this.Y=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=l,this.g=c,this.tilesLayout=void 0===d?"":d,this.B=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.A=void 0!==m&&m,this.F=this.o=!1,t=(e=u(this.g)).next();!t.done;t=e.next())t.value.gh();this.A&&this.g.length&&this.g[this.g.length-1].fh(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}a1.prototype.uc=function(){return this.Sa},a1.prototype.tc=function(){return this.xa},a1.prototype.Ld=function(e){this.h=e},a1.prototype.Ib=function(){return this.h},B("shaka.media.InitSegmentReference",a1),a1.prototype.getEndByte=a1.prototype.tc,a1.prototype.getStartByte=a1.prototype.uc,(c=a3.prototype).N=function(){return this.C()},c.getStartTime=function(){return this.startTime},c.oi=function(){return this.endTime},c.uc=function(){return this.Sa},c.tc=function(){return this.xa},c.Li=function(){return this.tilesLayout},c.Ki=function(){return this.B},c.dc=function(){return this.status},c.cj=function(){this.status=a5},c.Uf=function(){this.preload=!0},c.isPreload=function(){return this.preload},c.Vc=function(){this.l=!1},c.Vi=function(){return this.l},c.gh=function(){this.o=!0},c.Xi=function(){return this.o},c.fh=function(){this.F=!0},c.Wi=function(){return this.F},c.eh=function(){this.m=!0},c.Ri=function(){return this.m},c.Ge=function(e){this.thumbnailSprite=e},c.Ii=function(){return this.thumbnailSprite},c.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=u(this.g),n=t.next();!n.done;
1n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},c.sg=function(e){null==this.h?z("Sync attempted without sync time!"):.001<=Math.abs(e=this.h-e-this.startTime)&&this.offset(e)},c.Ld=function(e,t){this.u=e,this.G=void 0!==t&&t},c.Ib=function(e){var t=this.u;return(void 0===e||e)&&this.G&&(this.u=null),t},B("shaka.media.SegmentReference",a3),a3.prototype.getSegmentData=a3.prototype.Ib,a3.prototype.setSegmentData=a3.prototype.Ld,a3.prototype.syncAgainst=a3.prototype.sg,a3.prototype.offset=a3.prototype.offset,a3.prototype.getThumbnailSprite=a3.prototype.Ii,a3.prototype.setThumbnailSprite=a3.prototype.Ge,a3.prototype.hasByterangeOptimization=a3.prototype.Ri,a3.prototype.markAsByterangeOptimization=a3.prototype.eh,a3.prototype.isLastPartial=a3.prototype.Wi,a3.prototype.markAsLastPartial=a3.prototype.fh,a3.prototype.isPartial=a3.prototype.Xi,a3.prototype.markAsPartial=a3.prototype.gh,a3.prototype.isIndependent=a3.prototype.Vi,a3.prototype.markAsNonIndependent=a3.prototype.Vc,a3.prototype.isPreload=a3.prototype.isPreload,a3.prototype.markAsPreload=a3.prototype.Uf,a3.prototype.markAsUnavailable=a3.prototype.cj,a3.prototype.getStatus=a3.prototype.dc,a3.prototype.getTileDuration=a3.prototype.Ki,a3.prototype.getTilesLayout=a3.prototype.Li,a3.prototype.getEndByte=a3.prototype.tc,a3.prototype.getStartByte=a3.prototype.uc,a3.prototype.getEndTime=a3.prototype.oi,a3.prototype.getStartTime=a3.prototype.getStartTime,a3.prototype.getUris=a3.prototype.N;var a4=0,a5=1;function a6(e){return 1==e.length&&1e-4>e.end(0)-e.start(0)}function a8(e){return!e||a6(e)?null:e.length?e.end(e.length-1):null}function a9(e,t){return!(!e||!e.length||a6(e)||t>e.end(e.length-1))&&t>=e.start(0)}function a7(e,t){if(!e||!e.length||a6(e))return 0;var n=0;e=u(oe(e));for(var i=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 oe(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 ot(){}function on(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function oi(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function or(){}function oa(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]||!1}function oo(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]||!1}function os(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 ou(e){for(var t=0,n=[];oa(e,t);){var i=os(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),a=os(r,4);(a=function(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=ti(ek(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=ti(ek(e.data,3+n,a));return o="--\x3e"===i?ti(ek(e.data,4+n+a)):eA(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=ti(ek(e.data,1,i)),e=ti(ek(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:(t.description=n=ti(ek(e.data,0,n)),"com.apple.streaming.transportStreamTimestamp"==n?(e=1&(n=e.data.subarray(n.length+1))[3],n=((n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7])/45,e&&(n+=47721858.84),t.data=n):t.data=e=eA(e.data.subarray(n.length+1)),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(t.data=e=ti(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=ti(e.data).replace(/\0*$/,""),t):e.data?(t.data=eA(e.data),t):null}(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}oo(e,t)&&(t+=10)}return n}function ol(e,t){for(var n=t=void 0===t?0:t,i=0;oa(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=os(e,t+6),oo(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}
1function oc(e,t){if(this.j=e,void 0===t?0: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=ek(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function od(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 rM(n,0).S(),e.g=8*i,e.i-=i)}function oh(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,od(e)}e.h<<=t,e.g-=t}function op(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&&od(e),0<(n=t-n)?i<<n|op(e,n):i}function of(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&0x80000000>>>t))return e.h<<=t,e.g-=t,t;return od(e),t+of(e)}function og(e){oh(e,1+of(e))}function om(e){var t=of(e);return op(e,t+1)-1}function ov(e){return 1&(e=om(e))?1+e>>>1:-1*(e>>>1)}function oy(e){return 1===op(e,1)}function ob(e){return op(e,8)}function ow(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=ov(e))+256)%256),n=0===i?n:i}function ox(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.u=null}function oS(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=0x20000000*(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=oA(r,e.u),e.u=n.pts,n.dts=n.pts,64&i&&(i=0x20000000*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.o&&(e.o=i),n.dts=oA(i,e.o)),e.o=n.dts}return(e=t[8]+9,t.byteLength<=e)?null:(n.data=t.subarray(e),n)}function oT(e){var t=e.wc();return 1<t.length&&(e=t[0].pts,!isNaN((t=t[1].pts)-e))?String(1/(t-e)*9e4):null}function oA(e,t){var n=1;for(e>t&&(n=-1);0x100000000<Math.abs(t-e);)e+=0x200000000*n;return e}function ok(e){return!(0>oE(e))}function oE(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}a3.Status={Pj:0,Nk:1,nk:2},B("shaka.util.Dom",ot),ot.removeAllChildren=oi,B("shaka.util.Id3Utils",or),or.getID3Data=ol,or.getID3Frames=ou,B("shaka.util.ExpGolomb",oc),(c=ox.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},c.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,oE(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,ge:-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=tu(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:0==(15&f)?2:15&f,$h: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.ge&&(o.ge=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.B=a.audio,this.A=a.audioCodec),-1!=a.ge&&(this.C=a.ge),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.B: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.C: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},c.jj=function(e){return en("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Zf(e,{Dd:null,state:null})},c.Zf=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=2*!d: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.Dd)&&(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=tv(a.data,d),a.fullData=tv(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}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.Dd&&(n=u.length?u[u.length-1]:t.Dd)&&(n.data=tv(n.data,e),n.fullData=tv(n.fullData,e)),t.state=a,u},c.getMetadata=function(){for(var e=[],t=u(this.l),n=t.next();!n.done;n=t.next())(n=oS(this,n=tv.apply(td,l(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:ou(n.data),dts:n.dts,pts:n.pts});return e},c.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=u(this.i),n=t.next();!n.done;n=t.next()){var i=tv.apply(td,l(n.value)),r=oS(this,i);n=this.h.length?this.h[this.h.length-1]:null,r&&null!=r.pts&&null!=r.dts&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&((n=this.h.pop()).data=tv(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return this.h},c.wc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=!1,n=u(this.j),i=n.next();!i.done;i=n.next()){var r=tv.apply(td,l(i.value)),a=oS(this,r);i=this.g.length?this.g[this.g.length-1]:null,a&&null!=a.pts&&null!=a.dts&&(!i||i.pts!=a.pts&&i.dts!=a.dts)?(this.g.length&&a.dts<(i.dts||0)&&(t=!0),this.g.push(a)):this.g.length&&(r=a?a.data:r)&&((i=this.g.pop()).data=tv(i.data,r),this.g.push(i))}if(e){for(n={Dd:null,state:null},i=[],a=(r=u(this.g)).next();!a.done;a=r.next())(a=a.value).nalus=this.Zf(a,n),a.nalus.length&&(i.push(a),n.Dd=a.nalus[a.nalus.length-1]);this.g=i}t&&(this.g=this.g.sort(function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n}))}return e?this.g:(e=this.g,this.g=[],e)},c.getStartTime=function(e){if("audio"==e){e=null;var t=this.fb();return t.length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.wc(!1)).length&&(e=Math.min((e=t[0]).dts,e.pts)/9e4),e):null},c.od=function(){return{audio:this.A,video:this.m}},c.fe=function(){for(var e=[],t=u(this.wc()),n=t.next();!n.done;n=t.next())e.push.apply(e,l(n.value.nalus));return e},c.Oi=function(){en("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Mf();return{height:e.height,width:e.width}},c.Mf=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length||!(n=n.find(function(e){return 33==e.type})))return t;var i=new oc(n.fullData,!0);ob(i),ob(i),op(i,4);var r=op(i,3);oy(i);var a=op(i,2),o=op(i,1),s=op(i,5),u=op(i,32);n=ob(i);for(var l=ob(i),c=ob(i),d=ob(i),h=ob(i),p=ob(i),f=ob(i),g=[],m=[],v=0;v<r;v++)g.push(oy(i)),m.push(oy(i));if(0<r)for(v=r;8>v;v++)op(i,2);for(v=0;v<r;v++)g[v]&&op(i,88),m[v]&&ob(i);om(i),3==(r=om(i))&&op(i,1),g=om(i),m=om(i);var y=v=0,b=0,w=0;return oy(i)&&(v+=om(i),y+=om(i),b+=om(i),w+=om(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b
1+w)*(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+"."+i.toString(16).toUpperCase()+("."+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=oT(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length||!(n=n.find(function(e){return 7==e.type})))return t;var i=ob(n=new oc(n.data)),r=ob(n),a=ob(n);if(og(n),oI.includes(i)){var o=om(n);if(3===o&&oh(n,1),og(n),og(n),oh(n,1),oy(n)){o=3!==o?8:12;for(var s=0;s<o;s++)oy(n)&&(6>s?ow(n,16):ow(n,64))}}if(og(n),0===(o=om(n)))om(n);else if(1===o)for(oh(n,1),og(n),og(n),o=om(n),s=0;s<o;s++)og(n);og(n),oh(n,1),o=om(n),s=om(n);var u=op(n,1);0===u&&oh(n,1),oh(n,1);var l=0,c=0,d=0,h=0;return oy(n)&&(l=om(n),c=om(n),d=om(n),h=om(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=oT(e),t}(this)},B("shaka.util.TsParser",ox),ox.syncOffset=oE,ox.probe=ok,ox.prototype.getVideoInfo=ox.prototype.Mf,ox.prototype.getVideoResolution=ox.prototype.Oi,ox.prototype.getVideoNalus=ox.prototype.fe,ox.prototype.getCodecs=ox.prototype.od,ox.prototype.getStartTime=ox.prototype.getStartTime,ox.prototype.getVideoData=ox.prototype.wc,ox.prototype.getAudioData=ox.prototype.fb,ox.prototype.getMetadata=ox.prototype.getMetadata,ox.prototype.parseNalus=ox.prototype.Zf,ox.prototype.parseAvcNalus=ox.prototype.jj,ox.prototype.parse=ox.prototype.parse,ox.prototype.clearData=ox.prototype.clearData,ox.Timescale=9e4;var oI=[100,110,122,244,44,83,86,118,128,138,139,134];function oM(e,t,n,i){var r=this;this.g=e,this.L=n,this.A=null,this.ea=t,this.l=new Map,this.B=new Map,this.Aa=new Map,this.h=null,this.Ea=!1,this.K=i||null,this.u=new Map,this.o=new Q,this.j=new Map,this.O=null,this.H=new re,this.Ga="",this.Oa=!1,this.sa=!0,this.M=!1,this.C=this.P=null,this.i=oC(this,this.H),this.za=this.G=!1,this.I=new rT(function(){var e,t,n,i,a,o,s,l,c,d,h,p,f;return e=r,R(function(r){if(1==r.g){for(t=[],i=(n=u(e.u)).next();!i.done;i=n.next())for(o=(a=u(i.value)).next().value,l=(s=a.next().value)[0],c=o,e.u.set(c,s.slice(0,1)),l&&t.push(l.p.catch(iy)),h=(d=u(s.slice(1))).next();!h.done;h=d.next())h.value.p.reject(new eC(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),b(r,Promise.all(t),2)}for(f=(p=u(e.j.values())).next();!f.done;f=p.next())f.value.destroy();e.o&&(e.o.release(),e.o=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.P&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Aa.clear(),e.j.clear(),e.O=null,e.u.clear(),e.K=null,e.$.clear(),e.L=null,w(r)})}),this.F=!1,this.T="UNKNOWN",this.Ma=this.Na=!1,this.Fa=new re,this.m=!1,this.oa=null,this.$=new Map,this.ka=this.W=this.na=this.Z=null,this.fa=new re,this.g.remote&&(this.M="disconnected"!=this.g.remote.state,this.o.D(this.g.remote,"connect",function(){r.M="disconnected"!=r.g.remote.state}),this.o.D(this.g.remote,"connecting",function(){r.M="disconnected"!=r.g.remote.state}),this.o.D(this.g.remote,"disconnect",function(){r.M="disconnected"!=r.g.remote.state}))}function oC(t,n){if(t.sa=!0,e.ManagedMediaSource){t.C||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.o.D(i,"startstreaming",function(){t.sa=!0}),t.o.D(i,"endstreaming",function(){t.sa=!1})}else i=new MediaSource;return t.o.qa(i,"sourceopen",function(){URL.revokeObjectURL(t.Ga),n.resolve()}),t.o.qa(t.g,"playing",function(){t.Oa=!0}),t.Ga=o$(i),t.g.removeAttribute("src"),t.P&&t.g.removeChild(t.P),t.C&&t.g.removeChild(t.C),t.P=on(t.Ga),t.g.appendChild(t.P),t.C&&t.g.appendChild(t.C),t.g.load(),i}function oD(e,t,n,i){var r,a,o,s,l,c,d,h,p,f,g,m;return R(function(v){switch(v.g){case 1:var y,x,S,T,A,k,E,I,M,C,D,P;return r=tk,a=F,o=V,b(v,(y=n,x=t,R(function(e){if(1==e.g)return y.createSegmentIndex?b(e,y.createSegmentIndex(),2):e.s(2);if(!y.segmentIndex)return e.return(!1);if(0==y.segmentIndex.getNumReferences())return e.return(!0);for(S=tk,T=new Set,k=(A=u(y.segmentIndex)).next();!k.done;
1k=A.next())if(I=(E=k.value).mimeType||y.mimeType||"",M=E.codecs||y.codecs||"",(I!=y.mimeType||M!=y.codecs)&&(C=I+":"+M,!T.has(C))){if(T.add(C),x==S.va){if(!ip(n8(I,M)))return e.return(!1)}else if(x==S.la?M=iB(M):x==S.V&&(M=i_(M,I)),D=function(e,t,n){var i=[t];return iu.forEach(function(t,r){var a=e[r];"codecs"==r?il.includes(e.mimeType)||i.push('codecs="'+n+'"'):a&&i.push(t+'="'+a+'"')}),"PQ"==e.hdr&&i.push('eotf="smpte2084"'),i.join(";")}(y,I,M),P=n9(I,M),!tP(D)&&!n0(P))return e.return(!1)}return e.return(!0)})),2);case 2:if(o.call(a,v.h,"Type negotiation should happen before MediaSourceEngine.init!"),t==r.V&&i&&(i=i_(i,n.mimeType)),s=n8(n.mimeType,i),t==r.va){oP(e,s,e.F,n.external),v.s(0);break}if(l=e.A.forceTransmux,(!tP(s)||!e.F&&il.includes(s))&&(l=!0),c=n9(n.mimeType,i),!l){v.s(4);break}if(d=tS(r.V,(i||"").split(",")),h=tS(r.la,(i||"").split(",")),!d||!h){v.s(5);break}return e.m=!0,b(v,oD(e,r.V,n,d),6);case 6:return b(v,oD(e,r.la,n,h),7);case 7:return v.return();case 5:(p=n0(c))&&(f=p(),e.j.set(t,f),s=f.convertCodecs(t,c));case 4:g=s+e.A.addExtraFeaturesToSourceBuffer(s),rA(e.I);try{m=e.i.addSourceBuffer(g)}catch(t){throw new eC(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(m.mode=oQ),e.o.D(m,"error",function(){var n=e.u.get(t)[0];n.p.reject(new eC(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.o.D(m,"updateend",function(){return oK(e,t)}),e.l.set(t,m),e.B.set(t,s),e.Aa.set(t,!!n.drmInfos.length),w(v)}})}function oR(e){return e.sa&&!e.M&&!e.G}function oP(e,t,n,i){e.h||(e.h=new ic(e.ea),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ea,e=e.T,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=im.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):en("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):en("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function oL(e){return!e.G&&(!e.i||"ended"==e.i.readyState)}function oN(e){return!e.G&&(!e.i||"closed"==e.i.readyState)}function oj(e,t){return e=e.l.size?t==tA?e.h.g:!(e=oU(e,t))||a6(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null:null}function oO(e,t){return e.l.size?t==tA?e.h.h:a8(oU(e,t)):null}function oU(e,t){if(e.G||e.M)return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function o_(e,t,n,i,r,a,o,s,c,d){var h,p,f,g,m,v,y,x,S,T,A,k,E,I,M;return o=void 0!==o&&o,s=void 0!==s&&s,c=void 0!==c&&c,d=void 0!==d&&d,R(function(C){switch(C.g){case 1:if(t!=(h=tk).va){C.s(2);break}if("HLS"!=e.T){C.s(3);break}return b(C,e.Fa,4);case 4:p=C.h,e.h.u=p;case 3:var D,P,L,N,j,O,U,_,B,F,V,H;return b(C,(D=e.h,P=n,L=i?i.startTime:null,N=i?i.endTime:null,j=i?i.N()[0]:null,R(function(e){if(1==e.g)return b(e,Promise.resolve(),2);if(!D.i||!D.j)return e.return();if(null==L||null==N)return D.i.parseInit(ek(P)),e.return();for(O=D.B?L:D.u,U={periodStart:D.u,segmentStart:L,segmentEnd:N,vttOffset:O},F=(B=u(_=D.i.parseMedia(ek(P),U,j,[]))).next();!F.done;F=B.next())V=F.value,D.A(V,j||null,U);H=_.filter(function(e){return e.startTime>=D.l&&e.startTime<D.m}),D.j.append(H),null==D.g&&(D.g=Math.max(L,D.l)),D.h=Math.min(N,D.m),w(e)})),5);case 5:case 8:return C.return();case 2:if(d||!e.m){C.s(6);break}return b(C,o_(e,h.V,n,i,r,a,o,s,c,!0),7);case 7:return b(C,o_(e,h.la,n,i,r,a,o,s,c,!0),8);case 6:if(!e.l.has(t))return C.return();if(f=e.l.get(t).timestampOffset,g=e.B.get(t),e.j.has(t)&&(g=e.j.get(t).getOriginalMimeType()),i&&(v=(m=function(e,t,n,i,r,a){var o=null,s=[],u=ek(n);if(il.includes(a))(t=ou(u)).length&&i&&((n=t.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(o=Math.round(n.data)/1e3),e.L.onMetadata([{cueTime:i.startTime,data:u,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var l=i.Y.timescale;if(!isNaN(l)){var c=null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,d=0,h=!1;u=new rR,c&&u.R("emsg",function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.Cc(),o=t.reader.Cc(),s=t.reader.S(),u=t.reader.S(),l=t.reader.S(),c=t.reader.S(),d=i.startTime+u/s;else s=t.reader.S(),u=(d=t.reader.bd()/s+i.timestampOffset)-i.startTime,l=t.reader.S(),c=t.reader.S(),a=t.reader.Cc(),o=t.reader.Cc();t=t.reader.Db(t.reader.getLength()-t.reader.Ba()),(n&&n.includes(a)||e.A.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.L.ij():(n=d+l/s,s={startTime:d,endTime:n,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t},new rs("emsg",c=(new Map).set("detail",s)).cancelable=!0,e.L.gj(s),("https://aomedia.org/emsg/ID3"==a||"https://developer.apple.com/streaming/emsg-id3"==a)&&(a=ou(t)).length&&e.L.onMetadata([{cueTime:d,data:t,frames:a,dts:d,pts:d}],0,n)))}),u.R("prft",function(t){var n=t.reader,i=t.version;n.S(),t=1e3*(t=n.S())+n.S()/0x100000000*1e3,n=0===i?n.S():0x100000000*(i=n.S())+(n=n.S()),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=new rs("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/l*1e3)})),e.L.onEvent(n)}).box("moof",rP).box("traf",rP).R("tfdt",function(e){h||(d=ax(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")||!ok(u)||(e.$.has(t)?e.$.get(t).clearData():e.$.set(t,new ox),null!=(u=(s=e.$.get(t).parse(u)).getStartTime(t))&&(o=u),s=s.getMetadata());return{timestamp:o,metadata:s}}(e,t,n,i,r,g)).timestamp,y=m.metadata,null!=v&&(null==e.Z&&t==h.la&&(e.Z=v,e.na=i.startTime,null!=e.W&&(x=0,e.na==e.ka&&(x=e.Z-e.W),e.fa.resolve(x))),null==e.W&&t==h.V&&(e.W=v,e.ka=i.startTime,null!=e.Z&&(S=0,e.na==e.ka&&(S=e.Z-e.W),e.fa.resolve(S))),T=v,A=il,!e.F&&A.includes(e.B.get(t))&&(T=0),k=i.startTime-T,(.001<=Math.abs(f-k)||o||s)&&(!c||0<k||!f)&&(f=k,e.Ma&&(oq(e,t,function(){return oH(e,t)},null),oq(e,t,function(){return oG(e,t,f)},null))),t!=h.la&&e.l.has(h.la)||e.Fa.resolve(f)),y.length)&&e.L.onMetadata(y,f,i?i.endTime:null),a&&t==h.la&&(e.h||oP(e,"application/cea-608",e.F,!1),e.O||(e.O=new tB(g.split(";",1)[0])),i?(E=e.O.i(n)).length&&function(e,t,n,i,r){var a=n+" "+i,o=new Map;t=u(t);for(var s=t.next();!s.done;s=t.next()){var l=s.value;s=l.stream,l=l.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=u(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,l,r),l.startTime>=e.l&&l.startTime<e.m&&(o.get(s).get(a).push(l),s==e.C&&e.j.append([l]))}for(a=(r=u(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=u(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,l=o.get(a).get(s),e.o.get(a).set(s,l);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,E,i.startTime,i.endTime,f):e.O.init(n,s)),!e.j.has(t)){C.s(9);break}return b(C,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=C.h;case 9:if(n=function(e,t,n,i,r){if("mp4"!=ie(e.B.get(r)))return n;var a,o,s=null===i,c=e.Aa.get(r),d=e.L.ui(),h=!1;return i&&i.Y&&(h=i.Y.encrypted),i=i?i.N()[0]:null,e.A.correctEc3Enca&&s&&"audio"===r&&(a=ek(a=n),o=null,(new rR).box("moov",rP).box("trak",rP).box("mdia",rP).box("minf",rP).box("stbl",rP).R("stsd",rL).box("enca",function(e){return o=e.reader.h,rj(e)}).box("sinf",rP).box("frma",function(e){e.parser.stop(),"ec-3"===ak(e.reader).codec&&o&&2!==o.getUint16(16)&&o.setUint16(16,2)}).parse(a),n=a),(e=e.A.insertFakeEncryptionInInit&&c)&&(d=eN(d),e=eJ()&&"audio"===r||eK()||eG()||e5("SOPOpenBrowser")||eH()&&e1()&&d),e&&(s?n=function(e,t,n){function i(e){h.push({box:e,ih:0x656e6361}
1)}function r(e){h.push({box:e,ih:0x656e6376})}function a(e){c=!0,e.parser.stop()}function o(e){d.push(e),rP(e)}var s,l=t=ek(t),c=!1,d=[],h=[];if((new rR).box("moov",o).box("trak",o).box("mdia",o).box("minf",o).box("stbl",o).R("stsd",function(e){s=e,d.push(e),rL(e)}).R("encv",a).R("enca",a).R("dvav",r).R("dva1",r).R("dvh1",r).R("dvhe",r).R("dvc1",r).R("dvi1",r).R("hev1",r).R("hvc1",r).R("avc1",r).R("avc3",r).R("ac-3",i).R("ec-3",i).R("ac-4",i).R("Opus",i).R("fLaC",i).R("mp4a",i).parse(t),c)return t;if(0==h.length||!s)throw tm(t),new eC(2,3,3019,n);h.reverse(),n=u(h);for(var p=n.next();!p.done;p=n.next())p=p.value,l=function(e,t,n,i,r,a){var o=aL(new aM([]),e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),eI(e).setUint32(4,a),e.set(o,i.size),a0(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=eJ()||eG()||eH()?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=u(r)).next();!r.done;r=t.next())a0(a,(r=r.value).start,r.size+e.byteLength);return e=eI(a,n.start),n=rB(n),t=e.getUint32(n),e.setUint32(n,t+1),a}(e,l,s,p.box,d,p.ih);return eH()&&e1()&&!eG()?((e=new Uint8Array(t.byteLength+l.byteLength)).set(l),e.set(t,l.byteLength),e):l}(t,n,i):((t=!h)&&(t=eJ()&&"audio"===r),t&&(n=function(e){e=ek(e);var t=[];(new rR).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(function(e){function t(e){o.push(e),rP(e)}var n,i,r,a,o=[];if((new rR).box("moof",t).box("traf",t).R("tfhd",function(e){n=e,r=aw(e.reader,e.flags)}).R("trun",function(e){i=e,a=aT(e.reader,e.version,e.flags)}).parse(e),r&&2!==r.sh){var s=n.start+rB(n)+4+8*(null!==r.Xh),l=eI(e);if(null!==r.sh)l.setUint32(s,2);else{a0(e,n.start,n.size+4);var c=l.getUint32(n.start+8);l.setUint32(n.start+8,2|c),a&&null!==a.qf&&l.setInt32(i.start+rB(i)+4,a.qf+4),c=e.subarray(0,s),l=e.subarray(s),(e=new Uint8Array(e.byteLength+4)).set(c),c=[];for(var d=3;0<=d;d--)c.push(2>>8*d&255);for(e.set(new Uint8Array(c),s),e.set(l,s+4),l=(s=u(o)).next();!l.done;l=s.next())a0(e,(l=l.value).start,l.size+4)}}return e}(e.subarray(r?r.start+r.size:0,a.start+a.size)))}return tv.apply(td,l(n))}(n)))),s&&eq()&&(n=function(e){function t(e){i.push({start:e.start,size:e.size}),rP(e)}var n=ek(e),i=[];return(new rR).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=eI(n,e.start),r=0;r<e.size-3;r++){var a=t.getUint32(r);0x61632d33==a?t.setUint32(r,0x65632d33):0x64616333==a&&t.setUint32(r,0x64656333)}}).parse(n),n}(n)),n}(e,r,n,i,t),!i||!e.F||t==h.va||!o&&!s){C.s(11);break}if(I=i.startTime,"HLS"!=e.T||e.m||t!=h.V||!e.l.has(h.la)){C.s(13);break}return b(C,e.fa,14);case 14:.15<Math.abs(M=C.h)&&(I-=M);case 13:oq(e,t,function(){return oH(e,t)},null),oq(e,t,function(){return oG(e,t,I)},null);case 11:return b(C,oq(e,t,function(){var i=n;e.K&&tC(e.K,i,f,r),e.l.get(t).appendBuffer(i)},i?i.N()[0]:null),15);case 15:w(C)}})}function oB(e,t){var n;return R(function(i){return 1==i.g?t==(n=tk).va?e.h?b(i,e.h.remove(0,1/0),0):i.return():b(i,oq(e,t,function(){return oV(e,t,0,e.i.duration)},null),4):e.m?b(i,oq(e,n.V,function(){return oV(e,n.V,0,e.i.duration)},null),0):i.s(0)})}function oF(e){R(function(t){return e.I.g||e.M||e.G||oL(e)||oN(e)?t.return():b(t,oz(e,function(){oL(e)||oN(e)||e.i.clearLiveSeekableRange()}),0)})}function oV(e,t,n,i){i<=n?oK(e,t):e.l.get(t).remove(n,i)}function oH(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,oK(e,t)}function oG(e,t,n){0>n&&(n+=.001);var i=!0;"HLS"==e.T&&(i=!!(!(i=oO(e,t))||.15<Math.abs(i-n))),i&&(e.l.get(t).timestampOffset=n),oK(e,t)}function oK(e,t){if(!e.G){var n=e.u.get(t)[0];n&&(n.p.resolve(),oX(e,t))}}function oq(e,t,n,i){return rA(e.I),n={start:n,p:new re,uri:i},e.u.get(t).push(n),1==e.u.get(t).length&&oW(e,t),n.p}function oz(e,t){var n,i,r,a,o,s,l,c,d,h;return R(function(p){switch(p.g){case 1:for(rA(e.I),n=[],a=(r=u(i=Array.from(e.l.keys()))).next(),o={};!a.done;o={ready:void 0},a=r.next())s=a.value,o.ready=new re,l={start:function(e){return function(){return e.ready.resolve()}}(o),p:o.ready,uri:null},(c=e.u.get(s)).push(l),n.push(o.ready),1==c.length&&l.start();return x(p,2),b(p,Promise.all(n),4);case 4:T(p,3);break;case 2:throw A(p);case 3:return x(p,5,6),b(p,t(),6);case 6:for(k(p),h=(d=u(i)).next();!h.done;h=d.next())oX(e,h.value);
1E(p,0);break;case 5:throw new eC(2,3,3015,A(p),e.g.error||"No error in the media element",null)}})}function oX(e,t){e.u.get(t).shift(),oW(e,t)}function oW(e,t){var n=e.u.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new eC(2,3,3017,t)):oR(e)?n.p.reject(new eC(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new eC(2,3,3024,t)),oX(e,t)}}function oY(e,t){return oz(e,function(){var n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,T,A,I;return n=e,i=t,R(function(e){switch(e.g){case 1:if(n.G)return e.return();for(r=tk,n.G=!0,n.m=!1,a=n.g.currentTime,o=n.g.autoplay,n.g.paused||(n.za=!0),n.Oa&&(n.g.autoplay=!1),S(e,2),n.o.Ra(),l=(s=u(n.j.values())).next();!l.done;l=s.next())l.value.destroy();for(d=(c=u(n.l.values())).next();!d.done;d=c.next()){h=d.value;try{n.i.removeSourceBuffer(h)}catch(e){}}return n.j.clear(),n.l.clear(),p=n.i.duration,n.H=new re,n.i=oC(n,n.H),b(e,n.H,4);case 4:!isNaN(p)&&p?n.i.duration=p:!isNaN(n.oa)&&n.oa&&(n.i.duration=n.oa),f=new re,g=n.i.sourceBuffers,m=i.size,v=0,y=function(){++v===m&&(f.resolve(),n.o.Ka(g,"addsourcebuffer",y))},n.o.D(g,"addsourcebuffer",y),x=(w=u(i.keys())).next();case 5:if(x.done)return(I=i.get(r.V))&&I.isAudioMuxedInVideo&&(n.m=!0),n.m&&!n.u.has(r.V)&&n.u.set(r.V,[]),n.g.currentTime=a,b(e,f,2);return T=x.value,A=i.get(T),b(e,oD(n,T,A,A.codecs),6);case 6:x=w.next(),e.s(5);break;case 2:k(e),n.G=!1,rA(n.I),n.o.qa(n.g,"canplaythrough",function(){n.I.g||(n.g.autoplay=o,n.za&&(n.za=!1,n.g.play()))}),E(e,0)}})})}function oJ(e,t,n,i){var r=!1,a=tS("audio",(i||"").split(",")),o=tS("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i),i=n8(n,s);var u=e.A.forceTransmux;if((!tP(i)||!e.F&&il.includes(i))&&(u=!0),u&&(n=n0(e=n9(n,s)))){var l=n();a&&o&&(r=!0),i=l.convertCodecs(t,e)}return t=it(ia(i)),{wg:l,Hj:r,Gg:ir(i),codec:t,mimeType:i}}(c=oM.prototype).destroy=function(){return this.I.destroy()},c.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,l,c,d=this;return R(function(h){switch(h.g){case 1:return r=tk,b(h,d.H,2);case 2:if(!oL(d)&&!oN(d)){h.s(3);break}return z("Expected MediaSource to be open during init(); reopening the media source."),d.H=new re,d.i=oC(d,d.H),b(h,d.H,3);case 3:d.F=t,d.T=n,d.Na=i,d.Ma=!d.F&&"HLS"==d.T&&!d.Na,d.$.clear(),d.Z=null,d.na=null,d.W=null,d.ka=null,d.fa=new re,o=(a=u(e.keys())).next();case 5:if(o.done){h.s(7);break}return s=o.value,l=e.get(s),b(h,oD(d,s,l,l.codecs),8);case 8:d.m?(d.u.set(r.V,[]),d.u.set(r.la,[])):d.u.set(s,[]),o=a.next(),h.s(5);break;case 7:(c=e.get(r.V))&&c.isAudioMuxedInVideo&&(d.m=!0),w(h)}})},c.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)},c.Fb=function(){var e={total:this.G?[]:oe(this.g.buffered),audio:oe(oU(this,"audio")),video:oe(oU(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},c.remove=function(e,t,n){var i,r=this;return R(function(a){return 1==a.g?e==(i=tk).va?b(a,r.h.remove(t,n),0):n>t?b(a,oq(r,e,function(){return oV(r,e,t,n)},null),5):a.s(0):r.m?b(a,oq(r,i.V,function(){return oV(r,i.V,t,n)},null),0):a.s(0)})},c.flush=function(e){var t,n=this;return R(function(i){return 1==i.g?e==(t=tk).va?i.return():b(i,oq(n,e,function(){n.g.currentTime-=.001,oK(n,e)},null),2):n.m?b(i,oq(n,t.V,function(){var e=t.V;n.g.currentTime-=.001,oK(n,e)},null),0):i.s(0)})},c.endOfStream=function(e){var t=this;return R(function(n){return b(n,oz(t,function(){oL(t)||oN(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},c.bb=function(e){var t=this;return R(function(n){return b(n,oz(t,function(){if(e<t.i.duration)for(var n=u(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:new re,uri:null};t.u.get(i).unshift(r)}t.i.duration=e,t.oa=e}),0)})},c.getDuration=function(){return this.i.duration};var o$=e.URL.createObjectURL,oQ="sequence";function oZ(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=void 0===n||n,this.G=0,this.u=!1,this.m=e}function o0(e,t,n,i){var r=this;this.u=i,this.g=e,this.B=t,this.h=n,this.o=new Q,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new o2(new o3(e.g),e.h.stallThreshold,function(){return R(function(n){if(1==n.g)return oe(e.g.buffered).length?t?(e.g.currentTime+=t,n.s(2)):b(n,e.g.play(),3):n.return();if(2!=n.g){if(!e.g)return n.return();e.g.pause(),e.g.play()}e.G++,e.u(new rs("stalldetected")),w(n)})})}(this),this.A=!1,this.o.D(e,"waiting",function(){return o1(r)}),this.i=new eB(function(){o1(r)}).ua(this.h.gapJumpTimerTime)}function o1(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)){if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(r=!e.m)){var t,n,i,r=e.m,a=r.j,o=o4(a),s=a.g.currentTime,u=Date.now()/1e3;
1(r.g!=s||r.m!=o)&&(r.l=u,r.g=s,r.m=o,r.h=!1),(o=(s=u-r.l)>=r.o&&o&&!r.h)&&(r.i&&r.i(r.g,s),r.h=!0,r.g=a.g.currentTime),r=!o}r&&(r=e.g.currentTime,t=a=e.g.buffered,n=r,i=e.h.gapDetectionThreshold,null==(o=!t||!t.length||a6(t)?null:0<=(t=oe(t).findIndex(function(e,t,r){return e.start>n&&(0==t||r[t-1].end-n<=i)}))?t:null)||0==o&&!e.A||(s=a.start(o),(u=e.h.gapPadding)&&(s=Math.ceil(100*(s+u))/100),s>=e.B.ob()||.001>s-r||(0!=o&&a.end(o-1),e.g.currentTime=s,r==e.j&&(e.j=s),e.C++,e.u(new rs("gapjumped")))))}}}function o2(e,t,n){this.j=e,this.m=o4(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}function o3(e){this.g=e}function o4(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=u(oe(e.g.buffered));for(var n=e.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 o5(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=o6.value().get(t),n.qa(e,t,i))}(c=oZ.prototype).getDuration=function(){return this.l},c.xi=function(){return this.h},c.zh=function(e){this.i=e},c.bb=function(e){this.l=e},c.Di=function(){return this.i},c.xh=function(e){this.A=e},c.Gc=function(e){e&&!this.B&&(this.I=!0),this.B=e},c.Fe=function(e){this.o=e},c.ee=function(){return this.o},c.lg=function(e){this.C=e},c.ni=function(){return this.C},c.lh=function(e,t){if(0!=e.length){var n=(Date.now()+this.A)/1e3;if(0!=(e=e.filter(function(e){return e.start+t<n})).length){var i=e[e.length-1].end+t;this.re(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.u&&(this.i=n-this.g-this.h)}}},c.Ed=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=u(e);for(var r=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.re(t),this.g=Math.max(this.g,n),null!=this.i&&this.F&&!this.u&&(this.i=i-this.g-this.h)}},c.kh=function(e,t){this.re(e),1/0==t||this.U()||(this.g=Math.max(this.g,t))},c.yi=function(){return this.g},c.me=function(){this.u=!0},c.Yi=function(){return this.u},c.yh=function(e){this.m=e},c.ti=function(){return this.m},c.re=function(e){null==this.j?this.j=e:this.I||(this.j=Math.min(this.j,e))},c.Vf=function(e){this.h=Math.max(this.h,e)},c.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},c.U=function(){return 1/0==this.l&&!this.B},c.yc=function(){return 1/0!=this.l&&!this.B},c.pb=function(){return Math.max(this.H,this.cc()-this.o)},c.Ch=function(e){this.H=e},c.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},c.qd=function(e){var t=Math.max(this.j,this.H);return 1/0==this.o?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.cc()-this.o+e,this.ob()))},c.Hb=function(){return this.qd(0)},c.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))},c.Lh=function(){return null!=this.i&&(null==this.g||!this.F)},c.wh=function(e){this.G=e},c.ji=function(){return this.G},B("shaka.media.PresentationTimeline",oZ),oZ.prototype.getAvailabilityTimeOffset=oZ.prototype.ji,oZ.prototype.setAvailabilityTimeOffset=oZ.prototype.wh,oZ.prototype.usingPresentationStartTime=oZ.prototype.Lh,oZ.prototype.getSeekRangeEnd=oZ.prototype.ob,oZ.prototype.getSeekRangeStart=oZ.prototype.Hb,oZ.prototype.getSafeSeekRangeStart=oZ.prototype.qd,oZ.prototype.getSegmentAvailabilityEnd=oZ.prototype.cc,oZ.prototype.setUserSeekStart=oZ.prototype.Ch,oZ.prototype.getSegmentAvailabilityStart=oZ.prototype.pb,oZ.prototype.isInProgress=oZ.prototype.yc,oZ.prototype.isLive=oZ.prototype.U,oZ.prototype.offset=oZ.prototype.offset,oZ.prototype.notifyMaxSegmentDuration=oZ.prototype.Vf,oZ.prototype.notifyMinSegmentStartTime=oZ.prototype.re,oZ.prototype.getInitialProgramDateTime=oZ.prototype.ti,oZ.prototype.setInitialProgramDateTime=oZ.prototype.yh,oZ.prototype.isStartTimeLocked=oZ.prototype.Yi,oZ.prototype.lockStartTime=oZ.prototype.me,oZ.prototype.getMaxSegmentEndTime=oZ.prototype.yi,oZ.prototype.notifyPeriodDuration=oZ.prototype.kh,oZ.prototype.notifySegments=oZ.prototype.Ed,oZ.prototype.notifyTimeRange=oZ.prototype.lh,oZ.prototype.getDelay=oZ.prototype.ni,oZ.prototype.setDelay=oZ.prototype.lg,oZ.prototype.getSegmentAvailabilityDuration=oZ.prototype.ee,oZ.prototype.setSegmentAvailabilityDuration=oZ.prototype.Fe,oZ.prototype.setStatic=oZ.prototype.Gc,oZ.prototype.setClockOffset=oZ.prototype.xh,oZ.prototype.getPresentationStartTime=oZ.prototype.Di,oZ.prototype.setDuration=oZ.prototype.bb,oZ.prototype.setPresentationStartTime=oZ.prototype.zh,oZ.prototype.getMaxSegmentDuration=oZ.prototype.xi,oZ.prototype.getDuration=oZ.prototype.getDuration,o0.prototype.release=function(){this.o&&(this.o.release(),this.o=null),null!=this.i&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.u=null},o0.prototype.ue=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),o1(this)},o2.prototype.release=function(){this.i=this.j=null};var o6=new eR(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function o8(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.o=!1,this.h=new Q,this.i=new sn(e),o5(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){se(r,r.j())})}function o9(e){return e.o?e.g.currentTime:e.j()}function o7(e,t){0<e.g.readyState?si(e.i,t):o5(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){se(e,e.j())})}function se(e,t){.001>Math.abs(e.g.currentTime-t)?st(e):(e.h.qa(e.g,"seeking",function(){st(e)}),si(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function st(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function sn(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new eB(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 si(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function sr(e){this.h=e,this.j=!1,this.g=null,this.i=new Q}function sa(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.j=new o0(e,t.presentationTimeline,n,a),this.h=new o8(e,function(){e:{var e=o.j;e.l=!0,e.A=!1,e.i&&e.i.ua(e.h.gapJumpTimerTime),o1(e);var t=o9(o.h);if(e=ss(o,t),!tN()&&.001<Math.abs(e-t)){if(t=!1,!eW()||eW()&&e2())t=!0;else{var n=Date.now()/1e3,i=eW()&&e3()?3:1;(!o.o||o.o<n-i)&&(o.o=n,t=!0)}if(t){o7(o.h,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.ua(t.h.gapJumpTimerTime),o1(t)},function(){var e=i;return null==e?e=1/0>o.g.getDuration()?o.g.Hb():o.g.ob():0>e&&(e=o.g.ob()+e),so(o,su(o,e))}),this.m=new eB(function(){if(0!=o.i.readyState&&!o.i.paused){var e=o9(o.h),t=o.g.Hb(),n=o.g.ob();3>n-t&&(t=n-3),e<t&&(e=ss(o,e),o.i.currentTime=e)}})}function so(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function ss(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Hb(
1),a=e.g.ob(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.qd(n),u=e.g.qd(i);return n=e.g.qd(n+i),t>=o?so(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?a9(e.i.buffered,u)?u:n:t>=s||a9(e.i.buffered,t)?t:n}function su(e,t){var n=e.g.Hb();return t<n?n:t>(e=e.g.ob())?e:t}function sl(e){this.g=e,this.m=null,this.i=0,this.o=!1}function sc(e){return e.g[0]||null}function sd(e,t,n){return new sl([e=new a3(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function sh(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function sp(){sl.call(this,[]),this.h=[]}function sf(e){var t=this;this.g=e,this.j=!1,this.i=this.g.de(),this.h=new eB(function(){t.g.hh(.25*t.i)})}function sg(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.de()!=t&&e.g.og(t);return}catch(e){}e.h.ua(.25),0!=e.g.de()&&e.g.og(0)}function sm(e){var t=this;this.j=e,this.h=new Q,this.g=new Set,this.i=new eB(function(){sv(t,!1)}).sb(),e.paused||this.i.ua(.25),this.h.D(e,"playing",function(){t.i.sb().ua(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}function sv(e,t){var n=e.j.currentTime;e=u(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function sy(e){rc.call(this),this.g=new Map,this.h=e}function sb(e,t,n){return!!(e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n)}function sw(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 sx(e){rc.call(this),this.h=new Map,this.i=e,this.g=null}function sS(e,t){var n,i=t.schemeIdUri+"_"+t.id+"_"+t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1);e.h.has(i)||(e.h.set(i,t),t=new rs("regionadd",new Map([["region",t]])),e.dispatchEvent(t),(n=e).g||(n.g=new eB(function(){for(var e=n.i(),t=u(n.h),i=t.next();!i.done;i=t.next()){var r=u(i.value);i=r.next().value,(r=r.next().value).endTime<e.start&&(n.h.delete(i),i=new rs("regionremove",new Map([["region",r]])),n.dispatchEvent(i))}!n.h.size&&n.g&&(n.g.stop(),n.g=null)}).ua(2)))}function sT(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.o=i}function sA(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Gb(t,!0,e.o)),!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.xa&&(i=!1),2==n.dc()&&(i=!1),n.Ib(!1)&&(i=!1),i&&n.Y&&t.push(sk(e,n.Y)),i&&!e.h.has(n)&&(i=new sR(e.l),t.push(sP(i,n,e.i)),e.h.set(n,i))}return sM(e),Promise.all(t)}function sk(e,t){if(!e.i.segmentIndex||t.Ib()||Array.from(e.j.keys()).some(function(e){return a2(e,t)}))return Promise.resolve();var n=new sR(e.l),i=sP(n,t,e.i);return e.j.set(t,n),i}function sE(e,t){t=u(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&sD(e,n)}function sI(e){sE(e,e.h),sE(e,e.j),e.g=null}function sM(e){for(var t=Array.from(e.h.keys()),n=u(e.j.keys()),i=n.next(),r={};!i.done;r={Pf:void 0},i=n.next())r.Pf=i.value,t.some(function(e){return function(t){return a2(t.Y,e.Pf)}}(r))||sD(e,r.Pf)}function sC(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&sD(e,i)}sM(e)}function sD(e,t){var n=e.h;t instanceof a1&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function sR(e){this.g=e,this.Gd=this.rg=null}function sP(e,t,n){var i=new Uint8Array(0);return e.Gd=e.g(t,n,function(t){return R(function(n){if(1==n.g)return i=0<i.byteLength?tv(i,t):t,e.rg?b(n,e.rg(i),3):n.s(0);i=new Uint8Array(0),w(n)})}),e.Gd.promise.catch(function(e){return e instanceof eC&&7001==e.code?Promise.resolve():Promise.reject(e)})}function sL(e){var t=ir(e),n=t.split("/")[0];return{type:n,mimeType:t,codecs:e=ia(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Od:null,colorGamut:null,frameRate:null}}function sN(e){var t=new Set,n=[];e=u(e);for(var i=e.next();!i.done;i=e.next()){var r=ii(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=tT("audio",n),i=tT("video",n),e=tT(tA,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?tP('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 sj(t,n,i){var r,a,o,s,u;return R(function(l){if(1==l.g)return(r=n).cryptoKey?l.s(2):b(l,r.fetchKey(),3);if(!(a=r.iv))for(a=ek(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 sO(e,t,n,i,r){return e=rm(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function sU(e,t){var n=this;this.g=t,this.j=e,this.h=null,this.K=new Map,this.C=1,this.u=this.l=null,this.O=0,this.i=new Map,this.I=!1,this.P=null,this.B=!1,this.m=new rT(function(){var e,t,i,r,a,o,s;return e=n,R(function(n){if(1==n.g){for(t=[],r=(i=u(e.i.values())).next();!r.done;r=i.next())sZ(a=r.value),t.push(s0(a)),a.ba&&(sI(a.ba),a.ba=null);for(s=(o=u(e.o.values())).next();!s.done;s=o.next())sI(s.value);return b(n,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.j=null,e.h=null,e.A&&e.A.stop(),e.A=null,e.H&&e.H.stop(),e.H=null,e.G=null,w(n)})}),this.L=Date.now()/1e3,this.o=new Map,this.M={projection:null,hfov:null},this.W=0,this.T=1/0,this.F=null,this.A=new eB(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var e,t,i,r=n.j.presentationTimeline.Hb(),a=n.j.presentationTimeline.ob();1<a-r?(e=n.g.aa,t=r,i=a,R(function(n){return e.I.g||e.M||e.G||oL(e)||oN(e)?n.return():b(n,oz(e,function(){oL(e)||oN(e)||e.i.setLiveSeekableRange(t,i)}),0)})):oF(n.g.aa)}else oF(n.g.aa),n.A&&n.A.stop()}),this.G=null,this.H=new eB(function(){var e=n.g.video;!e.ended&&n.G&&(e.currentTime=n.G,n.G=null)})}function s_(e,t){for(var n=0>e.g.gb(),i=u(e.i.values()),r=i.next();!r.done;r=i.next())(r=r.value).ja&&r.ja.ed(n),r.ba&&r.ba.ed(n);for(r=(i=u(e.o.values())).next();!r.done;r=i.next())r.value.ed(n);(n=e.i.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.fc&&(sV(e,t,!1,0,!1),n.fc=i):(t=n.fc)&&(n.fc=null,sV(e,t,!0,0,!1)))}function sB(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.l=t,e.I&&(t.video&&sV(e,t.video,n,i,r,a),t.audio&&sV(e,t.audio,n,i,r,a))}function sF(e,t){R(function(n){if(1==n.g)return e.F=null,e.u=t,e.I?t.segmentIndex?n.s(2):b(n,t.createSegmentIndex(),2):n.return();sV(e,t,!0,0,!1),w(n)})}function sV(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,S=e.i.get(t.type);S||t.type!=tA?S&&(S.fc&&(t.trickModeVideo?(S.fc=t,t=t.trickModeVideo):S.fc=null),S.stream!=t||r)&&(e.o.has(t)?S.ba=e.o.get(t):S.ba&&(c=S.ba,(d=t)&&d!==c.i&&(sI(c),c.i=d)),t.type==tA&&(r=n8(t.mimeType,t.codecs),oP(e.g.aa,r,e.j.sequenceMode,t.external)),!e.o.has(S.stream)&&S.stream.closeSegmentIndex&&(S.Da?(r="("+S.type+":"+S.stream.id+")",e.K.has(r)||e.K.set(r,S.stream.closeSegmentIndex)):S.stream.closeSegmentIndex()),r=S.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,S.stream=t,S.ja=null,S.df=!!a,t.dependencyStream?S.nd=sG(e,t.dependencyStream):S.nd=null,r?s2(e,!0,!1):(n?S.nc?S.Ue=!0:S.Da?(S.lc=!0,S.Yd=i,S.Ue=!0):(sZ(S),s$(e,S,!0,i).catch(function(t){e.g&&e.g.onError(t)})):S.Da||S.kb||sQ(e,S,0),(o=e,s=S,R(function(e){if(1==e.g)return s.rb?(u=s.stream,l=s.rb,u.segmentIndex?e.s(2):b(e,u.createSegmentIndex(),2)):e.return();if(s.rb!=l||s.stream!=u)return e.return();var t=o.g.Rc(),n=oO(o.g.aa,s.type),i=s.stream.segmentIndex.find(s.ya?s.ya.endTime:t),r=null==i?null:s.stream.segmentIndex.get(i);i=r&&r.xa?r.xa-r.Sa:null,r&&!i&&(i=(r.endTime-r.getStartTime())*(s.stream.bandwidth||0)/8),i?((r=r.Y)&&(i+=(r.xa?r.xa-r.Sa:null)||0),t=8*i/(r=o.g.getBandwidthEstimate())<(n||0)-t-o.h.rebufferingGoal||s.rb.h.g>i):t=!1,t&&s.rb.abort(),w(e)})).catch(function(t){e.g&&e.g.onError(t)}))):(h=e,p=t,R(function(e){switch(e.g){case 1:return f=tk,h.O++,g=h.O,x(e,2),b(e,oB(h.g.aa,f.va),4);case 4:T(e,3);break;case 2:m=A(e),h.g&&h.g.onError(m);case 3:v=n8(p.mimeType,p.codecs),oP(h.g.aa,v,h.j.sequenceMode,p.external),(h.g.aa.ea.isTextVisible()||h.h.alwaysStreamText)&&h.O==g&&(y=sG(h,p),h.i.set(f.va,y),sQ(h,y,0)),w(e)}}))}function sH(e,t){t.nc||t.lc||(t.Da?(t.lc=!0,t.Yd=0):null==oj(e.g.aa,t.type)?null==t.kb&&sQ(e,t,0):(sZ(t),s$(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function sG(e,t){var n={stream:t,type:t.type,ja:null,ba:sK(e,t),ya:null,zb:null,le:null,Ac:null,zc:null,je:null,ke:null,fc:null,endOfStream
1:!1,Da:!1,kb:null,lc:!1,Yd:0,Ue:!1,nc:!1,Fc:!0,df:!1,dg:!1,sd:!1,rb:null,nd:null};return t.dependencyStream&&(n.nd=sG(e,t.dependencyStream)),n}function sK(e,t){if("video"===t.type&&e.h.disableVideoPrefetch||"audio"===t.type&&e.h.disableAudioPrefetch||t.type===tA&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===tA&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.ba)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new sT(e.h.segmentPrefetchLimit,t,function(t,n,i){return sJ(t,n,i||null,e.h.retryParameters,e.g.Xb)},0>e.g.gb()):null}function sq(e,t,n,i,r,a,o,s){var u,l,c,d;return R(function(h){if(1==h.g){var p,f,g,m,v,y,w,S,k,E,I;return u=tk,l=new Map,e.l.audio&&l.set(u.V,e.l.audio),e.l.video&&l.set(u.la,e.l.video),x(h,2),t.Ac=i,t.zc=r,o&&(t.je=o),s&&(t.ke=s),t.le=n,c=e.j.sequenceMode||"HLS"==e.j.type,b(h,(p=e.g.aa,f=t.type,g=n,m=i,v=r,y=c,w=a.mimeType||t.stream.mimeType,S=a.codecs||t.stream.codecs,k=l,R(function(e){if(1==e.g){var t,n,i,r,a,o,s,u,l,c,d,h,x,T,A,M,C,D,P,L,N,j;if(f==(E=tk).va){return y||(p.h.u=g),t=p.h,n=m,i=v,t.l=n,t.m=i,e.return()}return I=[],b(e,(r=p,a=f,o=w,s=S,u=k,R(function(e){if(1==e.g){if(a==(l=tk).va)return e.return(!1);if(c=it(ia(r.B.get(a))),d=ir(r.B.get(a)),x=(h=oJ(r,a,o,s)).wg,T=h.Hj,A=h.Gg,M=h.codec,C=h.mimeType,D=!0,T&&r.B.has(l.V)&&(P=oJ(r,l.V,o,s),L=it(ia(r.B.get(l.V))),N=ir(r.B.get(l.V)),D=L==P.codec&&N==P.Gg,P.wg&&P.wg.destroy()),c===M&&d===A&&D)return r.j.has(a)&&!x?(r.j.get(a).destroy(),r.j.delete(a)):!r.j.has(a)&&x?r.j.set(a,x):x&&(r.j.has(a)&&r.j.get(a).transmux!=x.transmux?(r.j.get(a).destroy(),r.j.delete(a),r.j.set(a,x)):x.destroy()),e.return(!1);if(j=!0,(r.m||T&&x&&!r.j.has(a))&&(j=!1),j&&"smooth"===r.A.codecSwitchingStrategy&&tL()){var t,n,i,p;return b(e,(t=r,n=a,i=C,p=x,oq(t,n,function(){if(n!==tA){if(t.B.get(n),tL()){t.j.has(n)&&(t.j.get(n).destroy(),t.j.delete(n)),p&&t.j.set(n,p);var e=i+t.A.addExtraFeaturesToSourceBuffer(i);t.l.get(n).changeType(e),t.B.set(n,i)}oK(t,n)}},null)),3)}return x&&x.destroy(),b(e,oY(r,u),3)}return e.return(!0)})),2)}return e.h||(I.push(oq(p,f,function(){return oH(p,f)},null)),p.m&&I.push(oq(p,E.V,function(){return oH(p,E.V)},null))),y||(I.push(oq(p,f,function(){return oG(p,f,g)},null)),p.m&&I.push(oq(p,E.V,function(){return oG(p,E.V,g)},null))),(0!=m||1/0!=v)&&(I.push(oq(p,f,function(){var e=p.l.get(f);e.appendWindowStart=0,e.appendWindowEnd=v,e.appendWindowStart=m,oK(p,f)},null)),p.m&&I.push(oq(p,E.V,function(){var e=E.V,t=p.l.get(e);t.appendWindowStart=0,t.appendWindowEnd=v,t.appendWindowStart=m,oK(p,e)},null))),I.length?b(e,Promise.all(I),0):e.s(0)})),4)}if(2!=h.g)return T(h,0);throw d=A(h),t.Ac=null,t.zc=null,t.je=null,t.ke=null,t.le=null,d})}function sz(e,t,n,i,r,a,o,s){var u,l,c,d,h,p;return o=void 0!==o&&o,s=void 0!==s&&s,R(function(f){switch(f.g){case 1:return u=i.closedCaptions&&0<i.closedCaptions.size,e.h.shouldFixTimestampOffset&&(c="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,d=null,r.Y&&(d=r.Y.timescale),(h=c&&d&&"video"===i.type&&"DASH"==e.j.type)&&(l=new rR),h&&l.box("moof",rP).box("traf",rP).R("tfdt",function(n){var i,a,o,s;return R(function(u){return(i=ax(n.reader,n.version).baseMediaDecodeTime)?(a=-i/d,(Number(t.le)||0)<a)?(o=t.Ac,s=t.zc,b(u,sq(e,t,a,o,s,r),0)):u.s(0):u.return()})}),h&&l.parse(a,!1,o)),b(f,sX(e,t,n),2);case 2:return rA(e.m),p=t.Fc,t.Fc=!1,b(f,e.g.Hg(t.type,a),3);case 3:return b(f,o_(e.g.aa,t.type,a,r,i,u,p,s,o),4);case 4:rA(e.m),w(f)}})}function sX(e,t,n){var i,r,a,o,s,u,l,c;return R(function(d){return 1==d.g?((i=t.stream.segmentIndex)instanceof sp&&i.Pa(e.j.presentationTimeline.pb()),r=Math.max(e.h.bufferBehind*e.C,e.j.presentationTimeline.h),null==(a=oj(e.g.aa,t.type)))?(e.F==t&&(e.F=null),d.return()):(o=n-a,s=e.h.evictionGoal,u=e.j.presentationTimeline.Hb(),l=e.j.presentationTimeline.ob(),c=o-r,l-u>s&&(c=Math.max(o-r,u-s-a)),c<=s?d.return():b(d,e.g.aa.remove(t.type,a,a+c),2)):4!=d.g?(rA(e.m),e.F?b(d,sX(e,e.F,n),4):d.s(0)):void(rA(e.m),w(d))})}function sW(e){return e&&e.type==tA&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function sY(e,t,n,i){var r,a,o,s,u;return R(function(l){switch(l.g){case 1:if(r=n.Ib())return l.return(r);if(a=null,t.ba){var c=t.ba,d=c.h;n instanceof a1&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.rg=i),a=c.Gd):a=null}return a||(a=sJ(n,t.stream,i||null,e.h.retryParameters,e.g.Xb)),o=0,t.ja&&(o=t.ja.h),t.rb=a,b(l,a.promise,2);case 2:if(s=l.h,t.rb=null,u=s.data,!n.aesKey){l.s(3);break}return b(l,sj(u,n.aesKey,o),4);case 4:u=l.h;case 3:return l.return(u)}})}function sJ(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof a3?e:void 0;
1return(e=sO(e.N(),e.Sa,e.xa,i,n)).contentType=t.type,r.request(rw,e,{type:+!!o,stream:t,segment:o,isPreload:a})}function s$(e,t,n,i){var r,a;return R(function(o){return 1==o.g?(t.lc=!1,t.Ue=!1,t.Yd=0,t.nc=!0,t.ya=null,t.ja=null,t.ba&&!e.o.has(t.stream)&&sI(t.ba),i?(r=e.g.Rc(),a=e.g.aa.getDuration(),b(o,e.g.aa.remove(t.type,r+i,a),3)):b(o,oB(e.g.aa,t.type),4)):3!=o.g?(rA(e.m),n?b(o,e.g.aa.flush(t.type),3):o.s(3)):void(rA(e.m),t.nc=!1,t.endOfStream=!1,t.Da||t.kb||sQ(e,t,0),w(o))})}function sQ(t,n,i){var r=n.type;(r!=tA||t.i.has(r))&&(n.kb=new e_(function(){var i;return R(function(r){if(1==r.g){var a,o,s,l,c,d,h,p;return x(r,2),b(r,(a=t,o=n,R(function(t){switch(t.g){case 1:if(rA(a.m),o.Da||null==o.kb||o.nc)return t.return();if(o.kb=null,!o.lc){t.s(2);break}return b(t,s$(a,o,o.Ue,o.Yd),3);case 3:case 8:return t.return();case 2:for(var n=a,i=o,r=u(n.K.entries()),f=r.next();!f.done;f=r.next()){var g=u(f.value);f=g.next().value,g=g.next().value,f.includes(i.type)&&(g(),n.K.delete(f))}if(o.stream.segmentIndex){t.s(4);break}return s=o.stream,x(t,5),b(t,o.stream.createSegmentIndex(),7);case 7:T(t,6);break;case 5:return l=A(t),b(t,s1(a,o,l),8);case 6:if(s!=o.stream)return s.closeSegmentIndex&&s.closeSegmentIndex(),o.Da||o.kb||sQ(a,o,0),t.return();case 4:x(t,9),null!=(c=function(t,n){if(sW(n))return F=t.g.aa,V=n.stream.originalId||"",H=oO(F,"video")||0,ig(F.h,V,H),null;if(n.type==tA&&(G=t.g.aa).h&&ig(G.h,"",0),n.stream.isAudioMuxedInVideo)return null;var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X=t.h.updateIntervalSeconds/Math.max(1,Math.abs(t.g.gb()));if(!oR(t.g.aa)&&n.type!=tA)return X/2;var W=t.g.Rc();if("audio"===n.type)for(var Y=u(t.o.keys()),J=Y.next();!J.done;J=Y.next())(J=t.o.get(J.value)).Pa(W,!0),sA(J,W);Y=n.ya?n.ya.endTime:W;var $=(K=t.g.aa,q=n.type,z=W,q==tA?null==(K=K.h).h||K.h<z?0:K.h-Math.max(z,K.g):a7(K=oU(K,q),z)),Q=Math.max(1,Math.max(t.h.rebufferingGoal,t.h.bufferingGoal)*t.C),Z=t.j.presentationTimeline.getDuration()-Y;if(J=oO(t.g.aa,n.type),1e-6>Z&&J)return n.endOfStream=!0,"video"==n.type&&(t=t.i.get(tA))&&sW(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,$>=Q)return X/2;if(Q=!n.ja,!(J=function(e,t,n,i){if(t.ja)return(n=t.ja.current())&&t.ya&&.001>Math.abs(t.ya.startTime-n.startTime)&&(n=t.ja.next().value),n;if(t.ya||i)return n=t.ya?t.ya.endTime:i,e=0>e.g.gb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),t.ja&&t.ja.next().value;var r=Math.max(n-(i=e.j.sequenceMode?0:e.h.inaccurateManifestTolerance),0);e=0>e.g.gb();var a=null;return i&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(r,!1,e)),a=t.ja&&t.ja.next().value),a||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),a=t.ja&&t.ja.next().value),a}(t,n,W,J)))return X;$=!1,Q&&n.df&&($=!0,n.df=!1),Q=1/0,Z=u(Z=Array.from(t.i.values()));for(var ee=Z.next();!ee.done;ee=Z.next())sW(ee=ee.value)||ee.ja&&!ee.ja.current()||(Q=Math.min(Q,ee.ya?ee.ya.endTime:W));return Y>=Q+t.j.presentationTimeline.h?X:("keep"!==t.h.crossBoundaryStrategy&&function(e,t,n){if(t.type===tA)return!1;var i=t.zb;if(!i)return!1;n=n.Y;var r=i.g!==n.g;if("reset_to_encrypted"===e.h.crossBoundaryStrategy&&(i.encrypted||n.encrypted||(r=!1),i.encrypted&&(e.h.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.h.crossBoundaryStrategy&&i.encrypted==n.encrypted&&(r=!1),r&&t.Fc){var a=e.g.video,o=a.paused;s2(e,!0).then(function(){e.g.onEvent(new rs("boundarycrossed")),o||a.play()})}return r}(t,n,J)||(n.ba&&n.ja&&!t.o.has(n.stream)&&(n.ba.Pa(J.startTime+.001),sA(n.ba,J.startTime).catch(function(){})),(i=t,r=n,a=W,o=J,s=$,R(function(t){var n,u,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X,W,Y,J,$;switch(t.g){case 1:if(l=tk,c=r.stream,d=r.ja,r.Da=!0,x(t,2),2==o.dc())throw new eC(1,1,1011);return b(t,(n=i,u=r,M=o,C=s,R(function(e){switch(e.g){case 1:if(D=tk,P=null==u.ya,L=[],N=Math.max(0,Math.max(M.appendWindowStart,n.W)-.1),j=Math.min(M.appendWindowEnd,n.T)+.01,U=ii(O=M.codecs||u.stream.codecs),_=ir(M.mimeType||u.stream.mimeType),(B=M.timestampOffset)==u.le&&N==u.Ac&&j==u.zc&&U==u.je&&_==u.ke){e.s(2);break}if(!(u.je&&u.ke&&function(e,t,n,i){if(t==tA)var r=!1;else{r=it(ia(e.B.get(t)));var a=ir(e.B.get(t)),o=n8(n,i),s=e.A.forceTransmux;(!tP(o)||!e.F&&il.includes(o))&&(s=!0),n=n9(n,i),s&&(s=n0(n))&&(o=(s=s()).convertCodecs(t,n),s.destroy()),t=it(ia(o)),o=ir(o),r=r!==t||a!==o}return!!r&&("smooth"!==e.A.codecSwitchingStrategy||!tL()||e.m)}(n.g.aa,u.type,_,O))||(F=null,u.type===D.la?F=n.i.get(D.V):u.type===D.V&&(F=n.i.get(D.la)),!F)){e.s(3);break}
1return b(e,s0(F).catch(function(){}),5);case 5:F.zb=null,F.Ac=null,F.zc=null,sH(n,F);case 3:return b(e,sq(n,u,B,N,j,M,U,_),2);case 2:var t,i,r,a,o;return a2(M.Y,u.zb)||(u.zb=M.Y,M.l&&M.Y&&(V=sY(n,u,M.Y),H=function(){var e,t,i,r,a,o;return R(function(s){switch(s.g){case 1:return x(s,2),b(s,V,4);case 4:return e=s.h,rA(n.m),t=null,i=new Map,r={projection:null,hfov:null},(new rR).box("moov",rP).box("trak",rP).box("mdia",rP).R("mdhd",function(e){t=aS(e.reader,e.version).timescale}).box("hdlr",function(e){switch((e=e.reader).skip(8),e.Cc()){case"soun":i.set(D.V,t);break;case"vide":i.set(D.la,t)}t=null}).box("minf",rP).box("stbl",rP).R("stsd",rL).box("encv",rN).box("avc1",rN).box("avc3",rN).box("hev1",rN).box("hvc1",rN).box("dvav",rN).box("dva1",rN).box("dvh1",rN).box("dvhe",rN).box("dvc1",rN).box("dvi1",rN).box("vexu",rP).box("proj",rP).R("prji",function(e){r.projection=e.reader.Cc()}).box("hfov",function(e){r.hfov=e.reader.S()/1e3}).parse(e),u.type===D.la&&function(e,t){if(e.M.projection!=t.projection||e.M.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new rs("spatialvideoinfo",n)}else n=new rs("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.M=t}}(n,r),i.has(u.type)?M.Y.timescale=i.get(u.type):null!=t&&(M.Y.timescale=t),a=u.stream.closedCaptions&&0<u.stream.closedCaptions.size,b(s,n.g.Hg(u.type,e),5);case 5:return b(s,o_(n.g.aa,u.type,e,null,u.stream,a,u.Fc,C),6);case 6:T(s,0);break;case 2:throw o=A(s),u.zb=null,o}})},G=M.startTime,P&&null!=(K=oO(n.g.aa,u.type))&&(G=K),n.g.hj(G,M.Y),L.push(H()))),q=u.ya?u.ya.i:-1,M.i!=q&&L.push((t=n.g.aa,i=u.type,r=M.startTime,R(function(e){return 1==e.g?i==(a=tk).va||(i==a.la&&(t.Fa=new re),!t.F||(o=oO(t,i))&&.1>Math.abs(o-r))?e.return():(oq(t,i,function(){return oH(t,i)},null),t.m&&oq(t,a.V,function(){return oH(t,a.V)},null),b(e,oq(t,i,function(){return oG(t,i,r)},null),2)):t.m?b(e,oq(t,a.V,function(){return oG(t,a.V,r)},null),0):e.s(0)}))),b(e,Promise.all(L),0)}})),4);case 4:if(rA(i.m),i.B)return t.return();if(h="video/mp4"==c.mimeType||"audio/mp4"==c.mimeType,p=e.ReadableStream,i.h.lowLatencyMode&&i.j.isLowLatency&&p&&h&&("HLS"!=i.j.type||o.m))return g=new Uint8Array(0),v=m=!1,S=function(e){var t,n,u;return R(function(l){switch(l.g){case 1:var d,h,p;if(m||(v=!0,rA(i.m),i.B))return l.return();if(x(l,2),d=g,h=e,(p=new Uint8Array(d.length+h.length)).set(d),p.set(h,d.length),g=p,t=!1,n=0,(new rR).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(g,!1,!0),!t){l.s(4);break}return u=g.subarray(0,n),g=g.subarray(n),b(l,sz(i,r,a,c,o,u,!0,s),5);case 5:r.ba&&r.ja&&sA(r.ba,o.startTime,!0);case 4:T(l,0);break;case 2:y=A(l),w(l)}})},b(t,sY(i,r,o,S),9);return b(t,sY(i,r,o),7);case 7:if(f=t.h,rA(i.m),i.B)return t.return();return rA(i.m),r.lc?(r.Da=!1,sQ(i,r,0),t.return()):b(t,sz(i,r,a,c,o,f,!1,s),6);case 9:if(k=t.h,y)throw y;if(v){t.s(10);break}return m=!0,rA(i.m),i.B?t.return():r.lc?(r.Da=!1,sQ(i,r,0),t.return()):b(t,sz(i,r,a,c,o,k,!1,s),10);case 10:r.ba&&r.ja&&sA(r.ba,o.startTime,!0);case 6:if(rA(i.m),i.B)return t.return();r.ya=o,d.next(),r.Da=!1,r.dg=!1,JSON.stringify(i.g.aa.Fb()[r.type]),r.lc||(E=null,r.type===l.la?E=i.i.get(l.V):r.type===l.V&&(E=i.i.get(l.la)),E&&E.type==l.V?i.g.ue(o,r.stream,E.stream.isAudioMuxedInVideo):i.g.ue(o,r.stream,r.stream.codecs.includes(","))),sQ(i,r,0),T(t,0);break;case 2:if(I=A(t),rA(i.m,I),i.B)return t.return();if(r.Da=!1,7001==I.code)r.Da=!1,sZ(r),sQ(i,r,0),t.s(0);else if(r.type==l.va&&i.h.ignoreTextStreamFailures)i.i.delete(l.va),t.s(0);else{if(3017==I.code){return b(t,(z=i,X=r,W=I,R(function(e){if(1==e.g){if(Array.from(z.i.values()).some(function(e){return e!=X&&e.dg}))return e.s(2);if(Y=0===z.h.maxDisabledTime&&1011==W.code?1:z.h.maxDisabledTime,z.g.disableStream(X.stream,Y))return e.return();if(z.h.avoidEvictionOnQuotaExceededError)return sQ(z,X,4),e.return();if(20<(J=Math.round(100*z.C)))z.C-=.2;else{if(!(4<J))return X.sd=!0,z.B=!0,z.g.onError(W),e.return();z.C-=.04}return X.dg=!0,$=z.g.Rc(),b(e,sX(z,X,$),2)}sQ(z,X,4),w(e)})),0)}return r.sd=!0,1==I.category&&r.ba&&sD(r.ba,o),I.severity=2,b(t,s1(i,r,I),0)}}})).catch(function(){}),n.nd&&(M=t,C=n.nd,D=W,R(function(e){switch(e.g){case 1:if(!(N=(L=(P=C.stream).segmentIndex.Gb(D))&&L.next().value)){e.s(0);break}if(!(j=N.Y)||a2(j,C.zb)){e.s(3);break}
1return C.zb=j,x(e,4),b(e,sY(M,C,j),6);case 6:O=e.h;var t=M.g.aa;t.K&&tC(t.K,O,0,P),T(e,3);break;case 4:throw U=A(e),C.zb=null,U;case 3:if(C.ya&&C.ya==N){e.s(0);break}return C.ya=N,x(e,8),b(e,sY(M,C,N),10);case 10:_=e.h,(t=M.g.aa).K&&tC(t.K,_,0,P),T(e,0);break;case 8:throw B=A(e),C.ya=null,B}}))),null)}(a,o))&&(sQ(a,o,c),o.sd=!1),T(t,10);break;case 9:return d=A(t),b(t,s1(a,o,d),11);case 11:return t.return();case 10:if(h=Array.from(a.i.values()),!a.I||!h.every(function(e){return e.endOfStream})){t.s(0);break}return b(t,a.g.aa.endOfStream(),13);case 13:rA(a.m),0!=(p=a.g.aa.getDuration())&&p<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.bb(p),w(t)}})),4)}if(2!=r.g)return T(r,0);i=A(r),t.g&&t.g.onError(i),w(r)})}).da(i))}function sZ(e){null!=e.kb&&(e.kb.stop(),e.kb=null)}function s0(e){return R(function(t){return e.rb?b(t,e.rb.abort(),0):t.s(0)})}function s1(e,t,n){var i;return R(function(r){if(1==r.g)return 3024==n.code?(t.Da=!1,sZ(t),sQ(e,t,0),r.return()):b(r,i9(e.P),2);if(rA(e.m),1===n.category&&1003!=n.code){if(t.fc)return s_(e,!1),r.return();i=0===e.h.maxDisabledTime&&1011==n.code?1:e.h.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.h.failureCallback(n),w(r)})}function s2(e,t,n){var i,r,a,o,s,u;return t=void 0!==t&&t,n=void 0===n||n,R(function(l){if(1==l.g){if(i=Date.now()/1e3,r=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||i-e.L<r)return l.return(!1);e.L=i}return a=tk,(o=e.i.get(a.V))&&(o.zb=null,o.Ac=null,o.zc=null,n&&sH(e,o),s0(o).catch(function(){}),o.ja&&o.ja.fg()),(s=e.i.get(a.la))&&(s.zb=null,s.Ac=null,s.zc=null,n&&sH(e,s),s0(s).catch(function(){}),s.ja&&s.ja.fg()),u=new Map,e.l.audio&&u.set(a.V,e.l.audio),e.l.video&&u.set(a.la,e.l.video),b(l,oY(e.g.aa,u),2)}return!s||s.nc||s.Da||s.kb||sQ(e,s,0),!o||o.nc||o.Da||o.kb||sQ(e,o,0),l.return(!0)})}function s3(e){if("keep"!==e.h.crossBoundaryStrategy){e.H.stop();var t=e.g.Rc(),n=e.i.get("video")||e.i.get("audio");n&&(n=n.zb)&&null!==n.g&&(0>(t=n.g-t)||1<t||(e.G=n.g+.01,e.H.da(t)))}}function s4(){}function s5(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]=t4(d):s?e[a]=t[a]:d.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=t4(d)),c=s5(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?(z("Invalid config, wrong type for "+c),l=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+c),e[a]=t[a]):(z("Invalid config, unrecognized key "+c),l=!1)}return l}function s6(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}o8.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},sn.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(c=sr.prototype).ready=function(){var e=this;o5(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){if(null==e.g||0==e.g&&1/0!=e.h.duration)e.j=!0;else{var t=e.h.currentTime,n=e.g;0>e.g&&(n=Math.max(0,t+e.g)),t!=n?(e.i.qa(e.h,"seeking",function(){e.j=!0}),e.h.currentTime=n):e.j=!0}})},c.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},c.cf=function(e){this.g=this.j?this.g:e},c.Rd=function(){return(this.j?this.h.currentTime:this.g)||0},c.Cg=function(){return 0},c.Bg=function(){return 0},c.jh=function(){},(c=sa.prototype).ready=function(){this.m.ua(.25)},c.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},c.cf=function(e){o7(this.h,e)},c.Rd=function(){var e=o9(this.h);return 0<this.i.readyState&&!this.i.paused?su(this,e):e}
1,c.Cg=function(){return this.j.G},c.Bg=function(){return this.j.C},c.jh=function(){this.j.ue()},(c=sl.prototype).getNumReferences=function(){return this.g.length},c.getNumEvicted=function(){return this.i},c.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},c.dj=function(){this.o=!0},c.xb=function(e){for(var t=u(this.g),n=t.next();!n.done;n=t.next())e(n.value)},c.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},c.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},c.offset=function(e){if(!this.o)for(var t=u(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},c.oe=function(e){if(!this.o&&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,l(e))}},c.Bd=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.oe(e),this.Pa(t)},c.Pa=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(t){return t.endTime>e}),this.i+=t-this.g.length}},c.Oc=function(e,t,n){if(n=void 0!==n&&n,!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=t)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=e)this.g.shift(),n||this.i++;else break;0!=this.g.length&&((t=new a3((e=this.g[this.g.length-1]).startTime,t,e.C,e.Sa,e.xa,e.Y,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},c.Le=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new eB(function(){var e=t();e?n.g.push.apply(n.g,l(e)):(n.m.stop(),n.m=null)}),this.m.ua(e))},sl.prototype[Symbol.iterator]=function(){return this.Gb(0)},sl.prototype.Gb=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 z("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new sh(this,i,a,n)},B("shaka.media.SegmentIndex",sl),sl.forSingleSegment=sd,sl.prototype.getIteratorForTime=sl.prototype.Gb,sl.prototype.updateEvery=sl.prototype.Le,sl.prototype.fit=sl.prototype.Oc,sl.prototype.evict=sl.prototype.Pa,sl.prototype.mergeAndEvict=sl.prototype.Bd,sl.prototype.offset=sl.prototype.offset,sl.prototype.get=sl.prototype.get,sl.prototype.find=sl.prototype.find,sl.prototype.markImmutable=sl.prototype.dj,sl.prototype.release=sl.prototype.release,sl.prototype.getNumEvicted=sl.prototype.getNumEvicted,sl.prototype.getNumReferences=sl.prototype.getNumReferences,(c=sh.prototype).ed=function(e){this.reverse=e},c.ei=function(){return this.h},c.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&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},c.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.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},c.fg=function(){var e=this.current();if(e.o&&!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]},B("shaka.media.SegmentIterator",sh),sh.prototype.resetToLastIndependent=sh.prototype.fg,sh.prototype.next=sh.prototype.next,sh.prototype.current=sh.prototype.current,sh.prototype.currentPosition=sh.prototype.ei,sh.prototype.setReverse=sh.prototype.ed,g(sp,sl),(c=sp.prototype).clone=function(){var e=new sp;return e.h=this.h.slice(),e.i=this.i,e},c.release=function(){for(var e=u(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},c.xb=function(e){for(var t=u(this.h),n=t.next();!n.done;n=t.next())n.value.xb(e)},c.find=function(e){for(var t=this.i,n=u(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},c.get=function(e){for(var t=this.i,n=u(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},c.offset=function(){},c.oe=function(){},c.Pa=function(e){for(var t=u(this.h),n=t.next();!n.done;n=t.next())n.value.Pa(e);for(;1<this.h.length&&0==this.h[0].getNumReferences();)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},c.Bd=function(){},c.Oc=function(){},c.Le=function(){},B("shaka.media.MetaSegmentIndex",sp),sp.prototype.updateEvery=sp.prototype.Le,sp.prototype.fit=sp.prototype.Oc,sp.prototype.mergeAndEvict=sp.prototype.Bd,sp.prototype.evict=sp.prototype.Pa,sp.prototype.merge=sp.prototype.oe,sp.prototype.offset=sp.prototype.offset,sp.prototype.get=sp.prototype.get,sp.prototype.find=sp.prototype.find,sp.prototype.forEachTopLevelReference=sp.prototype.xb,sp.prototype.release=sp.prototype.release,sf.prototype.release=function(){this.set(this.sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},sf.prototype.set=function(e){this.i=e,sg(this)},sf.prototype.sc=function(){return this.g.sc()},sm.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=u(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},g(sy,rc),sy.prototype.release=function(){this.g.clear(),rc.prototype.release.call(this)},sy.prototype.j=function(e){for(var t=u(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).pf;e:{for(var r=n.Kd,a=r.length-1;0<=a;a--){var o=r[a];if(o.position<=e){r=o.Wc;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&&!tJ(i.roles,r.roles),(o||s||i)&&sb(this,e,r.contentType)&&(n.pf=r,i=new rs("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&sb(this,e,r.contentType)&&(n.pf=r,JSON.stringify(r),n=new rs("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},g(sx,rc),sx.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),rc.prototype.release.call(this)},sT.prototype.Pa=function(e,t){t=void 0!==t&&t;for(var n=u(this.h.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&sD(this,i);t&&sM(this)},sT.prototype.ed=function(e){this.o=e,this.g&&this.g.ed(e)},sR.prototype.abort=function(){this.Gd&&this.Gd.abort()},(c=sU.prototype).destroy=function(){return this.m.destroy()},c.configure=function(e){if(this.h=e,this.P=new i8({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.i.get("audio");t&&t.ba&&(sI(t.ba),t.ba=null),t=u(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,sI(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(tA))&&t.ba&&(sI(t.ba),t.ba=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.ba&&(sI(t.ba),t.ba=null),n=(t=u(this.i.keys())).next();!n.done;n=t.next())(n=this.i.get(n.value)).ba?(sC(n.ba,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(sI(n.ba),n.ba=null)):0<e.segmentPrefetchLimit&&(n.ba=sK(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,i=u(e.j.variants),r=i.next(),a={};!r.done;a={wb:void 0},r=i.next())if(a.wb=r.value,a.wb.audio)if(e.o.has(a.wb.audio)){if(sC(r=e.o.get(a.wb.audio),t),!(0<t&&n.some(function(e){return function(t){return iS(e.wb.audio.language,t)}}(a)))){var o=e.i.get(a.wb.audio.type);r!==(o&&o.ba)&&sI(r),e.o.delete(a.wb.audio)}}else!(0>=t)&&n.some(function(e){return function(t){return iS(e.wb.audio.language,t)}}(a))&&(r=sK(e,a.wb.audio))&&(a.wb.audio.segmentIndex||a.wb.audio.createSegmentIndex(),e.o.set(a.wb.audio,r))}(this)},c.start=function(e){var t=this;return R(function(n){if(1==n.g){var i,r,a,o,s,l,c,d,h,p,f;return b(n,(i=t,r=e||new Map,R(function(e){if(1==e.g){if(a=tk,!i.l)throw new eC(2,5,5006);return o=new Map,s=new Set,i.l.audio&&(o.set(a.V,i.l.audio),s.add(i.l.audio)),i.l.video&&(o.set(a.la,i.l.video),s.add(i.l.video)),i.u&&(o.set(a.va,i.u),s.add(i.u)),b(e,i.g.aa.init(o,i.j.sequenceMode,i.j.type,i.j.ignoreManifestTimestampsInSegmentsMode),2)}for(rA(i.m),i.updateDuration(),c=(l=u(o.keys())).next();!c.done;c=l.next())d=c.value,h=o.get(d),i.i.has(d)||(p=sG(i,h),r.has(h.id)&&(function(e,t){e.l=t,e=u(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}(f=r.get(h.id),function(e,t,n){return sJ(e,t,n||null,i.h.retryParameters,i.g.Xb)}),p.ba=f),i.i.set(d,p),sQ(i,p,0));w(e)})),2)}rA(t.m),t.I=!0,w(n)})},c.Fc=function(){if(this.g){for(var e=this.g.Rc(),t=u(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.i.get(i);var r=this.g.aa;if(!(r=i==tA?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:a9(r=oU(r,i),e))){if(this.L=0,n.ba&&(n.ba.g=null),"audio"===n.type){r=u(this.o.values());for(var a=r.next();!a.done;a=r.next())a.value.g=null}n.ja=null,(null!=oO(this.g.aa,i)||n.Da)&&sH(this,n),n.rb&&(n.rb.abort(),n.rb=null),i===tA&&(i=this.g.aa).O&&i.O.g(),n.Fc=!0}}"keep"!==this.h.crossBoundaryStrategy&&s3(this)}},c.updateDuration=function(){var e=tN(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),oF(this.g.aa)),this.g.aa.bb(t)):e?(this.A&&this.A.ua(.5),this.g.aa.bb(1/0)):this.g.aa.bb(0x100000000)};function s8(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return!function e(t){for(var i=u(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=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])?(0<Object.keys(o=e(o,i[a])).length||!n(o))&&(r[a]=o):Array.isArray(o)&&Array.isArray(i[a])?tY(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)),e}function s9(){}function s7(e){return new es(e=ta(e)).nb}function ue(e,t,n){function i(e){eI(a).setUint32(o,e.byteLength,!0),o+=4,a.set(ek(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new eC(2,6,6015);
1var r="string"==typeof t?ts(t,!0):t,a=new Uint8Array(12+(e=ts(e=ta(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function ut(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ta(e).split("skd://").pop(),ue(e,n,t))}function un(e,t){2===e&&(e=t.drmInfo)&&ej(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function ui(){this.g=null}function ur(){}function ua(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:i7(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=s7(t),t=ue(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:eG(),minHdcpVersion:"",ignoreDuplicateInitData:!e5("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(eG()||eQ())&&n.preferredKeySystems.push("com.microsoft.playready"),e1()&&!eH()&&(n.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"});var i="reload",r=!1;!tL()||eK()||eQ()||e$()||ez()&&79===eY()||eW()&&!e2()&&!e3()||e1()&&eH()||(i="smooth",r=!0),r={retryParameters:i7(),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:uu,manifestPreprocessorTXml:ul,sequenceMode:!1,multiTypeVariantsAllowed:r,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},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:function(){if(eq()||e5("Tizen 2")||eX()||eQ()||e$())return!1;var e=e0();return!e6()||!!eJ()||null==e||!(15>e)}(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:uu,manifestPreprocessorTXml:ul,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var a={retryParameters:i7(),failureCallback:function(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,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,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:eQ()||e$(),dontChooseCodecs:!1,shouldFixTimestampOffset:ez()||eK(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};(ez()||eK()||eW()||eZ())&&(a.stallSkip=0),(navigator.userAgent.match(/Edge\//)||eG())&&(a.gapPadding=.01),eK()&&(a.gapPadding=2),eX()&&(a.crossBoundaryStrategy="reset"),eq()&&(a.crossBoundaryStrategy="reset_to_encrypted");var o={trackSelectionCallback:function(e){return R(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return R(function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?b(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5};t={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:.5*!!eJ(),preferNetworkInformationBandwidth:!1},i={codecSwitchingStrategy:i,addExtraFeaturesToSourceBuffer:function(e){return""},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(e,t){},dispatchAllEmsgBoxes:!1};var s=!1,c=!1,d=!0;e4()&&(c=s=!0,d=!1);var h={drm:n,manifest:r,streaming:a,mediaSource:i,offline:o,abrFactory:function(){return new i3},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(ui,[null].concat(l(P.apply(0,arguments)))))},abr:t,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:s,skipPlayDetection:c,supportsMultipleMediaElements:d,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};return o.trackSelectionCallback=function(e){return R(function(t){return t.return(function(e,t,n){var i=n;"AUTO"==i&&(i=e7(n=e.some(function(e){return!!e.hdr&&"HLG"==e.hdr})));var r=e.filter(function(e){return"variant"==e.type&&(!e.hdr||e.hdr==i)});n=[];var a=iC(t,r.map(function(e){return e.language}));a&&(n=r.filter(function(e){return ik(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])),n=(e=u(e)).next();!n.done;n=e.next())(n=n.value).type!=tA&&"image"!=n.type||t.push(n);return t}(e,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})},h}function uo(){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 us(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 s5(e,t,n||ua(),i,"")}function uu(e){var t,n;return t=[e],n=e,t&&n}function ul(e){var t,n;return t=[e],n=e,t&&n}function uc(){this.g=null,this.h=[]}function ud(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=u(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function uh(){this.i=this.h=null,this.g=[]}function up(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 uf(){this.mc=this.dh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new uc,this.h=new uh}function ug(e,t,n,i){rc.call(this),this.O=e,this.Z=t,this.Fa=i.networkingEngine,this.B=n,this.o=null,this.za=0,this.Na=i.Lc,this.F=i.aj,this.Oa=i.bj,this.g=i.config,this.l=this.G=this.h=null,this.oa=!1,this.H=i.mj,this.sa=!1,this.i=null,this.ka=!1,this.j=this.C=null,this.ea=!1,this.M=new Map,this.Aa=!1,this.Ga=i.lj,this.$=new uf,this.na=new re,this.m=new re,this.P=null,this.u=!1,this.fa=i.Vh,this.W=this.K=null,this.Ma=i.Uh,this.T=!1,this.L=[],this.I=[],this.A=!0}function um(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function uv(e,t){if(e.P=t,e.T=!0,e.L){t=u(e.L);for(var n=t.next();!n.done;n=t.next())(n=n.value)()}e.L=null}function uy(e){if(e.u)throw new eC(2,7,7003)}function ub(e,t){e.dispatchEvent(new rs("onstatechange",(new Map).set("state",t)))}function uw(e,t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(!e.h||e.i)return o.return();if(ub(e,"drm-engine"),e.za=Date.now()/1e3,e.i=e.Na(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),!ad(e.F,e.h)){o.s(2);break}return n=new rs("trackschanged",void 0),b(o,Promise.resolve(),3);case 3:uy(e),e.dispatchEvent(n);case 2:return i=iX(e.h.variants),r=!0,e.h&&e.h.presentationTimeline&&"HLS"!=e.h.type&&(r=e.h.presentationTimeline.U()),b(o,rq(e.i,i,e.h.offlineSessionIds,r),4);
1case 4:if(uy(e),!t){o.s(5);break}return b(o,e.i.Lb(t),6);case 6:uy(e);case 5:return b(o,ac(e.F,e.h),7);case 7:if(!o.h){o.s(0);break}return a=new rs("trackschanged",void 0),b(o,Promise.resolve(),9);case 9:e.dispatchEvent(a),w(o)}})}function ux(e,t,n){var i,r,a,o;return R(function(s){return 1==s.g?(i=new sT(e.g.streaming.segmentPrefetchLimit||2,t,function(t,n,i){return sJ(t,n,i||null,e.g.streaming.retryParameters,e.Fa,e.A)},!1),e.M.set(t.id,i),t.segmentIndex?s.s(2):b(s,t.createSegmentIndex(),2)):(r=e.B||0,a=t.segmentIndex.Gb(r),o=null,a&&((o=a.current())||(o=a.next().value)),o||(o=sc(t.segmentIndex)),o?n?o.Y?b(s,sk(i,o.Y),0):s.s(0):b(s,sA(i,o.startTime),0):s.s(0))})}function uS(e,t){rc.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Jc:null,Ic:uk,xc:function(e,t){return uT(n,"enter",e,t)}},{Jc:uA,Ic:uk,xc:function(e,t){return uT(n,"enter",e,t)}},{Jc:uE,Ic:uk,xc:function(e,t){return uT(n,"enter",e,t)}},{Jc:uk,Ic:uA,xc:function(e,t){return uT(n,"exit",e,t)}},{Jc:uk,Ic:uE,xc:function(e,t){return uT(n,"exit",e,t)}},{Jc:uA,Ic:uE,xc:function(e,t){t?uT(n,"skip",e,t):(uT(n,"enter",e,t),uT(n,"exit",e,t))}},{Jc:uE,Ic:uA,xc:function(e,t){return uT(n,"skip",e,t)}}],this.h=new Q,this.h.D(this.i,"regionremove",function(e){n.g.delete(e.region)})}function uT(e,t,n,i){t=new rs(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}B("shaka.util.ConfigUtils",s4),s4.getDifferenceFromConfigObjects=s8,s4.convertToConfigObject=s6,s4.mergeConfigObjects=s5,B("shaka.drm.FairPlay",s9),s9.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&ej(e.keySystem)){try{var n=ti(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=eA(tf(n)))}},s9.muxFairPlayRequest=function(e,t){un(e,t)},s9.expressplayFairPlayRequest=function(e,t){if(2===e){var n=t.drmInfo;n&&ej(n.keySystem)&&un(e,t)}},s9.conaxFairPlayRequest=function(e,t){un(e,t)},s9.ezdrmFairPlayRequest=function(e,t){un(e,t)},s9.verimatrixFairPlayRequest=function(e,t){2===e&&(e=t.drmInfo)&&ej(e.keySystem)&&(e=tp(e=ek(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=to("spc="+e))},s9.muxInitDataTransform=function(e,t,n){return ut(e,t,n)},s9.expressplayInitDataTransform=function(e,t,n){return ut(e,t,n)},s9.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=ta(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=eE(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return ue(t,r,n)},s9.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=ta(e).split(";").pop(),ue(e,n,t))},s9.verimatrixInitDataTransform=function(e,t,n){return ut(e,t,n)},s9.initDataTransform=ue,s9.defaultGetContentId=s7,s9.isFairPlaySupported=function(){var e;return R(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},x(t,2),b(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(A(t),t.return(!1))})},ui.prototype.configure=function(e){this.g=e},ui.prototype.create=function(e){if(this.g.language){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,x=(y=e,b=this.g.language,(w=iC(b=ik(b),y.map(function(e){return iM(e)})))?y.filter(function(e){return w==iM(e)}):[]);x.length&&(v=x)}return v||(v=(v=e.filter(function(e){return e.primary})).length?v:e),(t=v,n=this.g.role,e=t.filter(function(e){return!!e.audio&&(n?e.audio.roles.includes(n):0==e.audio.roles.length)})).length&&(v=e),this.g.videoLayout&&(i=v,r=this.g.videoLayout,e=i.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==r})).length&&(v=e),this.g.Sc&&(a=v,"AUTO"==(o=this.g.Sc)&&(o=e7(a.some(function(e){return!!e.video&&!!e.video.hdr&&"HLG"==e.video.hdr}))),e=a.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==o})).length&&(v=e),this.g.channelCount&&(s=v,u=this.g.channelCount,e=s.filter(function(e){return!e.audio||!e.audio.channelsCount||!(e.audio.channelsCount>u)}).sort(function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0})).length&&(v=e),this.g.Kc&&(l=v,c=this.g.Kc,e=l.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==c.toLowerCase()})).length&&(v=e),this.g.fd&&(d=v,h=this.g.fd,e=d.filter(function(e){return!!e.video&&!!e.video.label&&e.video.label.toLowerCase()==h.toLowerCase()})).length&&(v=e),(p=v,f=this.g.spatialAudio,e=p.filter(function(e){return!e.audio||e.audio.spatialAudio==f})).length&&(v=e),this.g.audioCodec&&(g=v,m=this.g.audioCodec,e=g.filter(function(e){return!e.audio||e.audio.codecs==m})).length&&(v=e),new an(v[0],v,!("smooth"==this.g.codecSwitchingStrategy&&tL()))},B("shaka.util.PlayerConfiguration",ur),ur.mergeConfigObjects=us,ur.createDefaultForLL=uo,ur.createDefault=ua,g(ug,rc),(c=ug.prototype).getStartTime=function(){return this.B},c.Qc=function(){return this.O},c.Jf=function(){return this.h},c.getStats=function(){return this.$},c.Ci=function(){return this.K?iF(this.K):null},c.Bi=function(){return this.W?iV(this.W):null},c.start=function(){var t,n=this;R(function(i){var r,a,o,s,l,c,d,h,p,f,g,m,v,y,S,k,E,I;switch(i.g){case 1:return b(i,Promise.resolve(),2);case 2:return x(i,3),b(i,(r=n,R(function(e){switch(e.g){case 1:if(ub(r,"manifest-parser"),r.l||(r.G=ay(r.O,r.Z),r.l=r.G(),r.l.configure(r.g.manifest,function(){return r.A})),a=Date.now()/1e3,ub(r,"manifest"),r.h){e.s(2);break}return b(e,r.l.start(r.O,r.Oa),3);case 3:if(r.h=e.h,1!=r.h.variants.length){e.s(2);break}for(o=[],c=(l=u([(s=r.h.variants[0]).video,s.audio])).next();!c.done;c=l.next())(d=c.value)&&!d.segmentIndex&&o.push(d.createSegmentIndex());if(!(0<o.length)){e.s(2);break}return b(e,Promise.all(o),2);case 2:return r.na.resolve(),h=new rs("manifestparsed",void 0),b(e,Promise.resolve(),7);case 7:if(r.dispatchEvent(h),0==r.h.variants.length)throw new eC(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))})(r.h),p=Date.now()/1e3-a,r.$.H=p,w(e)}})),5);case 5:if(uy(n),"webkit"===e.shakaMediaKeysPolyfill){i.s(6);break}return b(i,uw(n),7);case 7:uy(n);case 6:return b(i,(f=n,R(function(e){return(f.o||(f.o=f.g.adaptationSetCriteriaFactory(),f.o.configure({language:f.g.preferredAudioLanguage,role:f.g.preferredVariantRole,channelCount:f.g.preferredAudioChannelCount,Sc:f.g.preferredVideoHdrLevel,spatialAudio:f.g.preferSpatialAudio,videoLayout:f.g.preferredVideoLayout,Kc:f.g.preferredAudioLabel,fd:f.g.preferredVideoLabel,codecSwitchingStrategy:f.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),f.Ma&&(g=f.g.abrFactory,f.C=g,f.j=g(),f.j.configure(f.g.abr)),f.fa&&(m=f.h.presentationTimeline.U(),v=iX(f.h.variants),y=f.o.create(v),f.j.configure(f.g.abr),f.j.setVariants(Array.from(y.values())
1),S=f.j.chooseVariant()))?(k=[],f.K=S,S.video&&k.push(ux(f,S.video,m)),S.audio&&k.push(ux(f,S.audio,m)),(E=iW(f.h.textStreams,f.g.preferredTextLanguage,f.g.preferredTextRole,f.g.preferForcedSubs)[0]||null)&&iQ(S.audio,E,f.g)&&(k.push(ux(f,E,m)),f.W=E),b(e,Promise.all(k),0)):e.s(0)})),8);case 8:if(uy(n),!n.fa||!n.i){i.s(9);break}return b(i,(I=n.i,R(function(e){return 1==e.g?I.K?b(e,I.m,3):e.s(0):b(e,Promise.all(I.T.map(function(e){return e.promise})),0)})),10);case 10:uy(n);case 9:n.m.resolve(),T(i,0);break;case 3:(t=A(i))instanceof eC&&(7001==t.code||7003==t.code)||n.m.reject(t),w(i)}})},c.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):rc.prototype.dispatchEvent.call(this,e)},c.onError=function(e){2===e.severity&&(this.m.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new rs("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},c.configure=function(e,t){e=s6(e,t),us(this.g,e)},c.getConfiguration=function(){return t4(this.g)},c.Nj=function(){return this.m},c.destroy=function(){var e,t,n=this;return R(function(i){switch(i.g){case 1:if(n.u=!0,!n.l||n.oa){i.s(2);break}return b(i,n.l.stop(),2);case 2:if(!n.j||n.ea){i.s(4);break}return b(i,n.j.stop(),4);case 4:if(n.H&&!n.sa&&n.H.release(),!n.i||n.ka){i.s(6);break}return b(i,n.i.destroy(),6);case 6:if(0<n.M.size&&!n.Aa)for(t=(e=u(n.M.values())).next();!t.done;t=e.next())sI(t.value);w(i)}})},B("shaka.media.PreloadManager",ug),ug.prototype.destroy=ug.prototype.destroy,ug.prototype.waitForFinish=ug.prototype.Nj,ug.prototype.getPrefetchedTextTrack=ug.prototype.Bi,ug.prototype.getPrefetchedVariantTrack=ug.prototype.Ci,g(uS,rc),uS.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,rc.prototype.release.call(this)},uS.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=u(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?uA:e>i.endTime?uE:uk;this.g.set(i,a);for(var o=u(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Jc==r&&s.Ic==a&&s.xc(i,t)}}};var uA=1,uk=2,uE=3;function uI(e,t,n){var i,r,a,o,s;return R(function(u){switch(u.g){case 1:var l=new es(e).ab.split("/").pop().split(".");if(i=1==l.length?"":l.pop().toLowerCase(),r=uM.get(i))return u.return(r);return a=0,o=rm([e],n),x(u,2),o.method="HEAD",b(u,t.request(a,o).promise,4);case 4:r=u.h.headers["content-type"],T(u,3);break;case 2:if(!(s=A(u))||1002!=s.code&&1001!=s.code){u.s(3);break}return o.method="GET",b(u,t.request(a,o).promise,6);case 6:r=u.h.headers["content-type"];case 3:return u.return(r?r.toLowerCase().split(";").shift():"")}})}var uM=(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");function uC(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":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 uD(e,t){var n=[];e=u(uR(e));for(var i=e.next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,l(uD(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=function e(t,n){if(t.lineBreak)return"\n";if(t.nestedCues.length)return t.nestedCues.map(function(n){return e(n,t)}).join("");if(!t.payload)return t.payload;var i=[],r=t.fontWeight>=nz,a=t.fontStyle==nW,o=t.textDecoration.includes(nJ);return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),""==(a=t.color)&&n&&(a=n.
1color),r="",(a=uC(a))&&(r+="."+a),""==(a=t.backgroundColor)&&n&&(a=n.backgroundColor),(n=uC(a))&&(r+=".bg_"+n),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=u(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"},t.payload)}(i,t),n.push(r)}return n}function uR(e){var t=[];e=u(e);for(var n=e.next(),i={};!n.done;i={lf:void 0},n=e.next())i.lf=n.value,t.some(function(e){return function(t){return nC(e.lf,t)}}(i))||t.push(i.lf);return t}function uP(e,t){for(this.h=e,this.i=t,this.g=null,t=(e=u(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 uL(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function uN(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=u(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function uj(){}function uO(t,n){var i=this;document.fullscreenEnabled||X("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.A=!1,this.h=[],this.j=t,this.C=n,this.u=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C.appendChild(this.g),this.o=new eB(function(){i.j.paused||u_(i)}),uU(this),this.l=new Map,this.i=new Q,this.i.D(document,"fullscreenchange",function(){u_(i,!0)}),this.i.D(this.j,"seeking",function(){u_(i,!0)}),this.i.D(this.j,"ratechange",function(){uU(i)}),this.i.D(this.j,"resize",function(){var e=i.j,t=e.videoWidth;e=e.videoHeight,t&&e?i.m=t/e:i.m=null}),this.B=null,"ResizeObserver"in e&&(this.B=new ResizeObserver(function(){u_(i,!0)}),this.B.observe(this.g)),this.F=new Map}function uU(e){e.o&&(e.h.length?e.o.ua((e.u?e.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function u_(e,t){if(e.g){var n=e.j.currentTime;if(!e.A||(void 0===t?0:t)){t=u(e.F.values());for(var i=t.next();!i.done;i=t.next())oi(i.value);oi(e.g),e.l.clear(),e.F.clear()}e.A&&function e(t,n,i,r,a){var o=!1,s=[],l=[];n=u(n);for(var c=n.next();!c.done;c=n.next()){c=c.value,a.push(c);var d=t.l.get(c),h=c.startTime<=r&&c.endTime>r,p=d?d.Oh:null;d&&(s.push(d.nf),d.Ec&&s.push(d.Ec),h||(o=!0,t.l.delete(c),d=null)),h&&(l.push(c),d?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,p)||(o=!0):(function(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=document.createElement(r);if("br"!=r&&function(e,t,n,i,r){var a,o,s,u=t.style,l=0==n.nestedCues.length,c=1<i.length;u.whiteSpace="pre-wrap";var d=n.payload.replace(/\s+$/g,function(e){return"\xa0".repeat(e.length)});if(u.webkitTextStrokeColor=n.textStrokeColor,u.webkitTextStrokeWidth=n.textStrokeWidth,u.color=n.color,u.direction=n.direction,u.opacity=n.opacity,u.paddingLeft=uB(n.linePadding,n,e.C),u.paddingRight=uB(n.linePadding,n,e.C),u.textCombineUpright=n.textCombineUpright,u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage+"')",u.backgroundRepeat="no-repeat",u.backgroundSize="contain",u.backgroundPosition="center",n.backgroundColor&&(u.backgroundColor=n.backgroundColor),u.width="100%",u.height="100%";else{if(n.nestedCues.length)var h=t;else h=document.createElement("span"),t.appendChild(h);n.border&&(h.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}))?h.style.backgroundColor=t:d&&(h.style.backgroundColor="rgba(0, 0, 0, 0.8)")),d&&(h.textContent=d)}c&&!i[i.length-1].isContainer?u.display="inline":(u.display="flex",u.flexDirection="column",u.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(u.width="100%",u.alignItems="start"):("right"==n.textAlign||"end"==n.textAlign)&&(u.width="100%",u.alignItems="end"),u.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),l||(u.margin="0"),u.fontFamily=n.fontFamily,u.fontWeight=n.fontWeight.toString(),u.fontStyle=n.fontStyle,u.letterSpacing=n.letterSpacing,u.fontSize=uB(n.fontSize,n,e.C,e.u?e.u.fontScaleFactor:1),null!=(i=n.line)&&((l=n.lineInterpretation)==nF&&(l=1,c=16,e.m&&1>e.m&&(c=32),i=0>i?100+i/c*100:i/c*100),1==l&&(u.position="absolute",n.writingMode==nB?(u.width="100%",n.lineAlign==nV?u.top=i+"%":"end"==n.lineAlign&&(u.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(u.height="100%",
1n.lineAlign==nV?u.left=i+"%":"end"==n.lineAlign&&(u.right=100-i+"%")):(u.height="100%",n.lineAlign==nV?u.right=i+"%":"end"==n.lineAlign&&(u.left=100-i+"%")))),u.lineHeight=n.lineHeight,o=(a=n).direction,s=a.positionAlign,a=a.textAlign,"line-left"==(e=s!==nL?s:"left"===a||"start"===a&&o===n_||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===n_?"line-right":"center")?(u.cssFloat="left",null!==n.position&&(u.position="absolute",n.writingMode==nB?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%")):"line-right"==e?(u.cssFloat="right",null!==n.position&&(u.position="absolute",n.writingMode==nB?(u.right=100-n.position+"%",u.width="auto"):u.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(u.position="absolute",n.writingMode==nB?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%"),u.textAlign=n.textAlign,u.textDecoration=n.textDecoration.join(" "),u.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&u.writingMode==n.writingMode||(u.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==nB?u.width=n.size+"%":u.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){var o=t.region,s=e.m===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==tq?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==tq?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var u=o.heightUnits==tq?"%":"px",l=o.widthUnits==tq?"%":"px",c=o.viewportAnchorUnits==tq?"%":"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.m===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=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.l.set(t,{nf:a,Oh:r,Ec:n})}(t,c,a),p=(d=t.l.get(c)).Oh,o=!0)),0<c.nestedCues.length&&p&&e(t,c.nestedCues,p,r,a),a.pop()}if(o){for(a=(r=u(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(l.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),r=(l=u(l)).next();!r.done;r=l.next())(r=t.l.get(r.value)).Ec?(r.Ec.contains(i)&&r.Ec.removeChild(i),i.appendChild(r.Ec),r.Ec.appendChild(r.nf)):i.appendChild(r.nf)}}(e,e.h,e.g,n,[])}}function uB(e,t,n,i){i=void 0===i?1:i;var 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 uF(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new Q,this.j=null}function uV(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 uH(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,uV(e)),n.pr=e.h.gb();var r,a,o,s=n.ot===uW||n.ot===uY;if(e.B&&s&&(n.bs=!0,n.su=!0,e.B=!1),null==n.su&&(n.su=e.F),n.v===uZ&&(e.h.U()&&(n.ltc=e.h.ce()),void 0!=(s=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0)&&(n.msd=s,e.G=!0)),r=e,a=n,e=(o=r.g.includeKeys).length?Object.keys(a).reduce(function(e,t){return o.includes(t)&&(e[t]=a[t]),e},{}):a,i)Object.keys(i=function(e){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};t=u(t);for(var o=t.next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=uK(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(e)).length&&Object.assign(t.headers,i);else{var l=uK(e);l&&(t.uris=t.uris.map(function(e){return uq(e,l)}))}}}function uG(e,t){if(!(t=e.h.Fb()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(e){return e.start<=n&&e.end>=n}
1))?1e3*(e.end-n):0}function uK(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}var i=[],r={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},a=Object.keys(e||{}).sort();a=u(a);for(var o=a.next();!o.done;o=a.next()){var s,l=e[o=o.value];if(!Number.isNaN(s=l)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==l)&&("pr"!=o||1!==l)){var c=r[o];c&&(l=c(l));var d=void 0;d="string"==(c=typeof l)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(l):"boolean"===c?o:"symbol"===c?o+"="+l.description:o+"="+l,i.push(d)}}return i.join(",")}function uq(e,t){return!t||e.includes("offline:")?e:((e=new es(e)).g.set("CMCD",t),e.toString())}(c=uP.prototype).configure=function(){},c.remove=function(e,t){return!!this.g&&(uN(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},c.append=function(e){if(this.g){var t=uD(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=u(t);for(var i=t.next(),r={};!i.done;r={Tc:void 0},i=t.next())r.Tc=i.value,!e.some(function(e){return function(t){return t.startTime==e.Tc.startTime&&t.endTime==e.Tc.endTime&&t.text==e.Tc.payload}}(r))&&r.Tc.payload&&(i=function(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}(r.Tc))&&n.push(i);for(t=(e=u(e=n.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?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)}))).next();!t.done;t=e.next())this.g.addCue(t.value)}},c.destroy=function(){return this.g&&(uN(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},c.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},c.setTextVisibility=function(e){e&&!this.g&&uL(this),this.g&&(this.g.mode=e?"showing":"hidden")},c.setTextLanguage=function(){},c.enableTextDisplayer=function(){uL(this)},B("shaka.text.SimpleTextDisplayer",uP),uP.prototype.enableTextDisplayer=uP.prototype.enableTextDisplayer,uP.prototype.setTextLanguage=uP.prototype.setTextLanguage,uP.prototype.setTextVisibility=uP.prototype.setTextVisibility,uP.prototype.isTextVisible=uP.prototype.isTextVisible,uP.prototype.destroy=uP.prototype.destroy,uP.prototype.append=uP.prototype.append,uP.prototype.remove=uP.prototype.remove,uP.prototype.configure=uP.prototype.configure,(c=uj.prototype).configure=function(){},c.remove=function(){},c.append=function(){},c.destroy=function(){},c.isTextVisible=function(){return!1},c.setTextVisibility=function(){},c.setTextLanguage=function(){},c.enableTextDisplayer=function(){},B("shaka.text.StubTextDisplayer",uj),uj.prototype.enableTextDisplayer=uj.prototype.enableTextDisplayer,uj.prototype.setTextLanguage=uj.prototype.setTextLanguage,uj.prototype.setTextVisibility=uj.prototype.setTextVisibility,uj.prototype.isTextVisible=uj.prototype.isTextVisible,uj.prototype.destroy=uj.prototype.destroy,uj.prototype.append=uj.prototype.append,uj.prototype.remove=uj.prototype.remove,uj.prototype.configure=uj.prototype.configure,(c=uO.prototype).configure=function(e){this.u=e,uU(this),u_(this,!0)},c.append=function(e){var t=[].concat(l(this.h));e=u(uR(e));for(var n=e.next(),i={};!n.done;i={mf:void 0},n=e.next())i.mf=n.value,t.some(function(e){return function(t){return nC(t,e.mf)}}(i))||this.h.push(i.mf);this.h.length&&uU(this),u_(this)},c.destroy=function(){return this.g&&(this.C.removeChild(this.g),this.g=null,this.A=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.B&&(this.B.disconnect(),this.B=null)),Promise.resolve()},c.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}),u_(this,n>this.h.length),this.h.length||uU(this),!0},c.isTextVisible=function(){return this.A},c.setTextVisibility=function(e){this.A=e,u_(this,!0)},c.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},c.enableTextDisplayer=function(){},B("shaka.text.UITextDisplayer",uO),uO.prototype.enableTextDisplayer=uO.prototype.enableTextDisplayer,uO.prototype.setTextLanguage=uO.prototype.setTextLanguage,uO.prototype.setTextVisibility=uO.prototype.setTextVisibility,uO.prototype.isTextVisible=uO.prototype.isTextVisible,uO.prototype.remove=uO.prototype.remove,uO.prototype.destroy=uO.prototype.destroy,uO.prototype.append=uO.prototype.append,uO.prototype.configure=uO.prototype.configure,B("shaka.text.WebVttGenerator",function(){}),uF.prototype.setMediaElement=function(e){var t;this.j=e,t=this,t.C.qa(t.j,"play",function(){t.m||(t.m=Date.now())}),t.C.qa(t.j,"playing",function(){t.o||(t.o=Date.now())})},uF.prototype.configure=function(e){this.g=e};var uz="m",uX="a",uW="v",uY="av",uJ="i",u$="c",uQ="tt",uZ=2,u0="d",u1="ld",u2="h",u3="lh";function u4(e){this.h=e,this.g=null}
1function u5(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}B("shaka.util.CmcdManager.StreamingFormat",{DASH:u0,jk:u1,HLS:u2,kk:u3,yk:"s",OTHER:"o"}),(c=u4.prototype).configure=function(e){this.h=e},c.Vg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(u8)?1e3*this.g.get(u8):null},c.Tg=function(){return this.h.enabled&&this.g&&this.g.has(u6)?1e3*this.g.get(u6):null},c.Ei=function(){return this.h.enabled&&this.g&&this.g.has(u9)?this.g.get(u9):null},c.Fi=function(){return this.h.enabled&&this.g&&this.g.has(u7)?this.g.get(u7):null},c.getBandwidthEstimate=function(e){var t=this.Tg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},B("shaka.util.CmsdManager",u4),u4.prototype.getBandwidthEstimate=u4.prototype.getBandwidthEstimate,u4.prototype.getRoundTripTime=u4.prototype.Fi,u4.prototype.getResponseDelay=u4.prototype.Ei,u4.prototype.getEstimatedThroughput=u4.prototype.Tg,u4.prototype.getMaxBitrate=u4.prototype.Vg;var u6="etp",u8="mb",u9="rd",u7="rtt";function le(){this.g=null,this.h=[]}function lt(e,t){return R(function(n){if(1==n.g)return e.g?b(n,new Promise(function(t){return e.h.push(t)}),2):n.s(2);e.g=t,w(n)})}function ln(t,n,i){n=void 0===n?null:n,rc.call(this);var r,a=this;this.m=l5,this.h=null,this.He=n,this.na=!1,this.We=new Q,this.zd=new Q,this.l=new Q,this.Oa=new Q,this.Sb=new Q,this.G=this.I=this.C=this.F=null,this.Pd=0,this.$=new le,this.Z=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.Ag=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.oa=this.K=this.Ma=null,this.sa=!1,this.Fa=this.o=null,this.Ae=1e9,this.Ve=[],this.Jd=[],this.Ye=-1,this.g=lR(this),this.Ze=uo(),this.P=null,this.Qd=-1,this.Na=null,this.ka={width:1/0,height:1/0},this.xe=new al(this.g,this.ka,null),this.Re=[],this.A=null,this.W=this.g.adaptationSetCriteriaFactory(),this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Tb=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Fd=this.g.preferForcedSubs,this.Cd=[],i&&i(this),this.L=(r=this,new uF({getBandwidthEstimate:function(){return r.o?r.o.getBandwidthEstimate():NaN},Fb:function(){return r.Fb()},getCurrentTime:function(){return r.h?r.h.currentTime:0},gb:function(){return r.gb()},yb:function(){return r.yb()},Rb:function(){return r.Rb()},U:function(){return r.U()},ce:function(){return r.ce()}},r.g.cmcd)),this.fa=new u4(this.g.cmsd),this.F=lv(this),this.F.mg(this.g.streaming.forceHTTP),this.F.ng(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Ub=this.ea=this.B=null,this.af=!1,this.$e=new eB(function(){return R(function(e){return 1==e.g?a.ea?b(e,a.Lb(a.Ub,!0),3):e.s(0):4!=e.g?b(e,a.load(a.ea),4):void(a.af?a.Ub.pause():a.Ub.play(),a.ea=null,a.af=!1,w(e))})}),l7&&(this.B=l7(),this.B.configure(this.g.ads),this.Sb.D(this.B,"ad-content-pause-requested",function(e){var t;return R(function(n){if(1==n.g)return(a.$e.stop(),a.ea)?n.s(0):(a.Ub=a.h,a.af=a.Uc(),t=e.saveLivePosition||!1,b(n,a.Ng(!0,t),3));a.ea=n.h,w(n)})}),this.Sb.D(this.B,"ad-content-resume-requested",function(e){if(e=e.offset||0,a.ea){var t=a.ea;t.B&&e&&(t.B+=e)}a.$e.da(.1)}),this.Sb.D(this.B,"ad-content-attach-requested",function(){return R(function(e){return a.h||!a.Ub?e.s(0):b(e,a.Lb(a.Ub,!0),0)})})),this.We.D(e,"online",function(){lY(a),a.gg()}),this.Je=new eB(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=u(a.i.variants),r=i.next();!r.done;r=i.next())0<(r=r.value).disabledUntilTime&&r.disabledUntilTime<=e&&(r.disabledUntilTime=0,t=!0),0<r.disabledUntilTime&&(n=!1);n&&a.Je.stop(),t&&l_(a,!1,void 0,!1,!1)}),this.za=null,t&&(en("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(t,!0)),this.u=null}function li(e){null!=e.O&&(tD(e.O),e.O.release(),e.O=null)}function lr(e,t){return new rs(e,t)}function la(e,t){l9.set(e,t)}function lo(e,t){e.dispatchEvent(lr("onstatechange",(new Map).set("state",t)))}function ls(e,t){var n;return R(function(i){return 1==i.g?(n=++e.Pd,b(i,lt(e.$,t),2)):n!=e.Pd?(e.$.release(),i.return(!0)):i.return(!1)})}function lu(e,t){var n,i;return t=void 0!==t&&t,R(function(r){if(1==r.g)return(n=null,e.i&&e.H&&e.Qb&&e.T)?(i=e.h.currentTime,e.U()&&!t&&(i=null),b(r,lc(e,e.T,i,e.Pb,!0,!1,!1),3)):r.s(2);if(2!=r.g){n=r.h,e.Re.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var a=n,o=e.H,s=e.Qb;a.h=e.i,a.l=o,a.G=s,a=n,o=e.Fa,a.j=e.o,a.C=o,n.o=e.W,n.start(),e.i=null,e.H=null,e.Qb=null,e.o=null,e.Fa=null}return r.return(n)})}function ll(e,t,n,i,r){var a,o,s;return r=void 0!==r&&r,R(function(u){return 1==u.g?i?u.s(2):b(u,ld(e,t),3):(2!=u.g&&(i=u.h),function(e,t){if(!eF())return!0;
1if(t){if(""==(e.h||e8()).canPlayType(t))return!1;if(!eF()||!ab.has(t))return!0;if(io(t))return eJ()&&(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))?u.return(null):(a=!1,o=!0,r&&(e.o&&e.Fa==e.g.abrFactory&&(o=!1),e.h&&"AUDIO"===e.h.nodeName&&(a=!0)),s=lc(e,t,n,i||null,!r,a,o),s=r?s.then(function(e){return e.A=!1,e}):s.then(function(t){return e.Re.push(t),t}),u.return(s))})}function lc(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,x;return r=void 0===r||r,a=void 0!==a&&a,o=void 0===o||o,R(function(S){return 1==S.g?(s=null,l=t4(e.g),a&&(l.manifest.disableVideo=!0),c=function(){return s.T&&s.u?null:s},d=function(){return c()?c().getConfiguration():e.g},1/0!=e.ka.width||1/0!=e.ka.height||e.g.ignoreHardwareResolution?S.s(2):b(S,e9(),3)):(2!=S.g&&(h=S.h,e.ka.width=h.width,e.ka.height=h.height),p=new al(l,e.ka,null),f={networkingEngine:e.F,filter:function(e){var t;return R(function(n){return 1==n.g?b(n,ac(p,e),2):4!=n.g?n.h?(t=lr("trackschanged"),b(n,Promise.resolve(),4)):n.s(0):void(s.dispatchEvent(t),w(n))})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=u(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);
1for(r=(i=u(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=u(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",l=new sp,c=r.closedCaptions.get(o);s={id:e.Ae++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:l,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:c,originalLanguage:c,label:null,type:tA,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([n8(s,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(s),n.add(o)}}}(e,t)},onTimelineRegionAdded:function(e){sS(s.H,e)},onEvent:function(e){return s.dispatchEvent(e)},onError:function(e){return s.onError(e)},isLowLatencyMode:function(){return d().streaming.lowLatencyMode},updateDuration:function(){e.j&&s.T&&e.j.updateDuration()},newDrmInfo:function(e){var t=s.i,n=t?t.h:null;n&&t.A&&ap(p,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.U());s.dispatchEvent(lr("manifestupdated",t)),um(s,!1,function(){e.B&&e.B.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.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.B)&&e.B.onHLSInterstitialMetadata(e,e.h,t),t=(r=u(r)).next();for(var o={};!t.done;o={ag:void 0},t=r.next())o.ag=t.value,"ID"!=o.ag.name&&um(s,!1,function(t){return function(){lm(e,n,i,a,t.ag)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(g=new sx(function(){return e.Ja()})).addEventListener("regionadd",function(t){var n=t.region;l$(e,"timelineregionadded",n,s),um(s,!1,function(){e.B&&(e.B.onDashTimedMetadata(n),e.B.onDASHInterstitialMetadata(e,e.h,n))})}),m=null,l.streaming.observeQualityChanges&&((m=new sy(function(){return e.Fb()})).addEventListener("qualitychange",function(t){lQ(e,t.quality,t.position)}),m.addEventListener("audiotrackchange",function(t){lQ(e,t.quality,t.position,!0)})),v=!0,y={Xb:e.F,onError:function(e){return s.onError(e)},te:function(t){um(s,!0,function(){e:{var n=t,i=lr("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=rE(e.g.drm.clearKeys),s=u(e.i.variants),l=s.next();!l.done;l=s.next()){l=l.value;var c=[];l.audio&&c.push(l.audio),l.video&&c.push(l.video),c=u(c);for(var d=c.next();!d.done;d=c.next()){var h=d.value;if(d=l.allowedByKeySystem,h.keyIds.size)if(h.drmInfos.length&&!o.size){h=u(h.drmInfos);for(var p=h.next();!p.done;p=h.next())if((p=p.value).keyIds.size&&p.keySystem==r){l.allowedByKeySystem=!0,p=u(p.keyIds);for(var f=p.next();!f.done;f=p.next())f=f.value,((f=n[i?"00":f])||e.C.F)&&(l.allowedByKeySystem=l.allowedByKeySystem&&!!f&&!ag.includes(f))}}else for(l.allowedByKeySystem=!0,p=(h=u(h.keyIds)).next();!p.done;p=h.next())p=p.value,((p=n[i?"00":p])||e.C.F)&&(l.allowedByKeySystem=l.allowedByKeySystem&&!!p&&!ag.includes(p));
1d!=l.allowedByKeySystem&&(a=!0)}}}if(a&&(lV(e),!lU(e)))break e;(n=e.j.l)&&!n.allowedByKeySystem&&l_(e)}})},onExpirationUpdated:function(e,t){var n=lr("expirationupdated");s.dispatchEvent(n),(n=s.l)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){s.dispatchEvent(t),"drmsessionupdate"==t.type&&v&&(v=!1,t=Date.now()/1e3-s.za,(e.A||s.getStats()).j=t,e.O&&tD(e.O))}},x=lv(e,c),rg(e.F,x),s=new ug(t,i,n,{config:l,bj:f,mj:g,lj:m,Lc:function(){return e.Lc(y)},aj:p,networkingEngine:x,Vh:r,Uh:o}),S.return(s))})}function ld(e,t){var n,i;return R(function(r){return 1==r.g?(n=e.g.manifest.retryParameters,b(r,uI(t,e.F,n),2)):("application/x-mpegurl"==(i=r.h)&&eJ()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function lh(e){var t=e.g.textDisplayFactory;t!==e.Xe&&(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):en("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Xe=t,e.u.setTextVisibility(e.na))}function lp(e){var t,n;return R(function(i){if(1==i.g){var r,a,o,s;return lo(e,"media-source"),e.h.removeAttribute("src"),oi(e.h),lh(e),(r=e.h,a=e.u,o={ui:function(){return e.keySystem()},onMetadata:function(t,n,i){t=u(t);for(var r=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=u(r.frames),l=s.next();!l.done;l=s.next())lm(e,a,o,"org.id3",l.value);e.B&&e.B.onHlsTimedMetadata(r,a)}},gj:function(t){e.Ga&&sS(e.Ga,{schemeIdUri:t.schemeIdUri,startTime:t.startTime,endTime:t.endTime,id:String(t.id),emsg:t})},onEvent:function(t){return e.dispatchEvent(t)},ij:function(){e.H&&e.H.update&&e.H.update()}},s=e.O,t=new oM(r,a,o,s)).configure(e.g.mediaSource),n=e.g.manifest.segmentRelativeVttTiming,t.Ea=n,b(i,t.H,2)}e.I=t,w(i)})}function lf(e,t,n){function i(){return lN(e)}e.l.D(t,"playing",i),e.l.D(t,"pause",i),e.l.D(t,"ended",i),e.l.D(t,"ratechange",function(){var t=e.h.playbackRate;0!=t&&(e.K&&(e.K.set(t),e.m==l6&&e.o.playbackRateChanged(t),lL(e,t)),t=lr("ratechange"),e.dispatchEvent(t))}),t.remote&&(e.l.D(t.remote,"connect",function(){return lV(e)}),e.l.D(t.remote,"connecting",function(){return lV(e)}),e.l.D(t.remote,"disconnect",function(){return R(function(n){if(1==n.g)return e.j&&"disconnected"==t.remote.state?b(n,s2(e.j),2):n.s(2);lV(e),w(n)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return lV(e)}),e.l.D(t.audioTracks,"removetrack",function(){return lV(e)}),e.l.D(t.audioTracks,"change",function(){return lV(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(t){if(t.track)switch((t=t.track).kind){case"metadata":var n=e,i=t;if("metadata"==i.kind){i.mode="hidden",n.l.D(i,"cuechange",function(){if(i.activeCues)for(var e=u(i.activeCues),t=e.next();!t.done;t=e.next())lm(n,(t=t.value).startTime,t.endTime,t.type,t.value),n.B&&n.B.onCueMetadataChange(t.value);if(i.cues){e=[],t=u(i.cues);for(var r=t.next(),a={};!r.done;a={bc:void 0},r=t.next())a.bc=r.value,"com.apple.quicktime.HLS"==a.bc.type&&null!=a.bc.startTime&&((r=e.find(function(e){return function(t){return t.startTime==e.bc.startTime&&t.endTime==e.bc.endTime}}(a)))||(r={startTime:a.bc.startTime,endTime:a.bc.endTime,values:[]},e.push(r)),r.values.push(a.bc.value));for(t=(e=u(e)).next();!t.done;t=e.next())(t=t.value).values.some(function(e){return"X-ASSET-URI"==e.key||"X-ASSET-LIST"==e.key})&&n.B&&(t.values.push({key:"CUE",description:"",data:0!=t.startTime||n.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),n.B.onHLSInterstitialMetadata(n,n.h,t))}});var r=new eB(function(){var e=Array.from(n.h.textTracks).filter(function(e){return"metadata"==e.kind});e=u(e);for(var t=e.next();!t.done;t=e.next())t.value.mode="hidden"}).sb().da(.5);n.Cd.push(function(){r.stop()})}break;case"chapters":var a=e,o=t;if(o&&"chapters"==o.kind){o.mode="hidden";var s=new eB(function(){o.mode="hidden"}).sb().da(.5);a.Cd.push(function(){s.stop()})}break;default:lV(e)}}),e.l.D(t.textTracks,"removetrack",function(){return lV(e)}),e.l.D(t.textTracks,"change",function(){return lV(e)}),"keep"!==e.g.streaming.crossBoundaryStrategy&&(e.l.D(t,"waiting",function(){e.j&&s3(e.j)}),e.l.D(t,"timeupdate",function(){e.j&&s3(e.j)}))),"none"!=t.preload&&e.l.qa(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function lg(e,t){t=(new Map).set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(lr("metadata",t))}function lm(e,t,n,i,r){e.Aa&&((t={schemeIdUri:i,startTime:t,endTime:n||
11/0,id:"",payload:r}).id=JSON.stringify(t),sS(e.Aa,t))}function lv(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?um(t(),!0,e):e()}return t||(t=function(){return null}),new rp(function(n,i,r,a){var o=t()?t().j:e.o;o&&o.segmentDownloaded(n,i,r,a)},function(t,r,a){n(lr("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.fa){var n=e.fa;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],u5(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],u5(l[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}})},function(e,t){n(lr("downloadcompleted",e=(new Map).set("request",e).set("response",t)))},function(e,t,i,r){n(lr("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.L,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)uH(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?u1:u0;break e;case 3:case 2:o=i.l?u3:u2;break e;case 5:o="s";break e}o=void 0}i.i=o}uH(i,n,{ot:uz,su:!i.u})}}catch(e){W("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case rw:try{if(i.g.enabled){var s=a.segment;o=0,s&&(o=s.endTime-s.startTime);var l={d:1e3*o,st:i.h.U()?"l":"v"};l.ot=function(e){if(0===e.type)return uJ;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?uY:uW;if("audio"==t)return uX;if("text"==t)return"application/mp4"===e.mimeType?uQ:u$}}(a);var c=l.ot===uW||l.ot===uX||l.ot===uY||l.ot===uQ,d=a.stream;if(d){var h=i.h.gb();if(c&&(l.bl=function(e,t){if(!(t=e.h.Fb()[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,d.type),l.ot!==uQ)){var p=uG(i,d.type);l.dl=h?p/Math.abs(h):p}if(d.bandwidth&&(l.br=d.bandwidth/1e3),d.segmentIndex&&s){var f=d.segmentIndex.Gb(s.endTime,!0,0>h);if(f){var g=f.next().value;if(g&&g!=s){if(!tJ(s.N(),g.N())){var m=g.N()[0],v=n.uris[0],y=new URL(m),b=new URL(v);if(y.origin!==b.origin)var w=m;else{for(var x=y.pathname.split("/").slice(1),S=b.pathname.split("/").slice(1,-1);x[0]===S[0];)x.shift(),S.shift();for(;S.length;)S.shift(),x.unshift("..");w=x.join("/")}l.nor=w}if((g.Sa||g.xa)&&(s.Sa!=g.Sa||s.xa!=g.xa)){var T=g.Sa+"-";g.xa&&(T+=g.xa),l.nrr=T}}}var A=i.h.gb()||1,k=uG(i,d.type)||500,E=d.bandwidth,I=E?E*(s.endTime-s.startTime)/1e3/(k/A/1e3)*i.g.rtpSafetyFactor:NaN;isNaN(I)||(l.rtp=I)}}c&&l.ot!==uQ&&(l.tb=function(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0],n=u(n);for(var i=n.next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case uW:return e.videoBandwidth||NaN;case uX:return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,l.ot)/1e3),uH(i,n,l)}}catch(e){W("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:uH(i,n,{ot:"k"});break;case 4:uH(i,n,{ot:"o"})}})},function(n,i,r,a){(n=t()?t().l:e.H)&&n.banLocation&&n.banLocation(a)},function(n,i){if(i.data){i=i.data.byteLength;var r=t()?t().getStats():e.A;r&&(r.mc=isNaN(r.mc)?i:r.mc+i,0===n&&(r.dh=i))}})}function ly(e,t,n){e.M=new ao,e.M.g=as,lb(e),lP(e),e.oa=new eB(function(){lw(e)}),e.g.streaming.rebufferingGoal&&e.oa.ua(.25),e.l.D(t,"waiting",function(){return lw(e)}),e.l.D(t,"canplaythrough",function(){return lw(e)}),e.l.D(t,"playing",function(){return lw(e)}),e.l.D(t,"seeked",function(){return lw(e)}),n&&(e.l.D(t,"stalled",function(){return lw(e)}),e.l.D(t,"progress",function(){return lw(e)}),e.l.D(t,"timeupdate",function(){return lw(e)}))}function lb(e){var t=e.g.streaming.rebufferingGoal;e.M.i.set(au,Math.min(.5,t/2)).set(as,t)}function lw(e){switch(e.m){case l8:if(e.Uc())var t=!0;else{var n=a8(e.h.buffered);t=null!=n&&n>=e.h.duration-1}break;case l6:e:if(e.Uc()||oL(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.cc();var i=a8(e.h.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=a7(e.h.buffered,e.h.currentTime),n=e.M;var r=t,a=n.i.get(n.g);t=n.g,i=r||i>=a&&0<i?au:as,n.g=i,(t=t!=i)&&i===au&&(n.h=Date.now()),t&&lP(e)}function lx(e){if(e.xe=new al(e.g,e.ka,e.C),e.H){var t=t4(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=l4&&ah(e.xe,e.i)&&lV(e)}catch(t){lJ(e,t)}e.o&&lU(e),(t=e.j.l)&&(!t.allowedByApplication||!t.allowedByKeySystem)&&l_(e)}if(e.F&&(e.F.mg(e.g.streaming.forceHTTP),e.F.ng(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ea=e.g.manifest.segmentRelativeVttTiming),e.u)if(t=e.g.textDisplayFactory,e.Xe!=t){var n=e.u;if(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):en("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||en("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.u.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.u;n.ea=i,n.h&&(n.h.j=i)}e.Xe=t,e.j&&(n=(t=e.j).i.get(tA))&&sV(t,n.stream,!0,0,!0)}else e.u.configure&&e.u.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),lX(e)),e.M&&lb(e),e.oa&&(e.g.streaming.rebufferingGoal?e.oa.ua(.25):e.oa.stop()),e.i&&l0(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.B&&e.B.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}function lS(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function lT(e,t){var n,i;return R(function(r){return 1==r.g?e.m!=l6&&e.m!=l8?r.return(null):(n=e.Ve,e.i&&
1(n=e.i.imageStreams),i=n[0])?(null!=t&&(i=n.find(function(e){return e.id==t})),i?i.segmentIndex?r.s(2):b(r,i.createSegmentIndex(),2):r.return(null)):r.return(null):r.return(i)})}function lA(e,t,n,i){var r=t.width||0,a=t.height||0,o=r/i.oc,s=a/i.rows,u=i.oc*i.rows,l=e.j-e.startTime;l=e.B||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.oc*o,h=Math.floor(h/i.oc)*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.N(),width:o,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}function lk(e,t){e.l.D(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=u(r);for(var a=r.next();!a.done;a=r.next()){if(1/0===(a=a.value).endTime||a.endTime<a.startTime)a=null;else{var o=new nI(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?nF: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=tq,o.region.width=a.region.width,o.region.widthUnits=tq),nD(o),a=o}a&&((o=e.g.mediaSource.modifyCueCallback)&&o(a,null,n),i.push(a))}e.u.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function lE(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function lI(e){return Array.from(e.h.textTracks).find(function(e){return"Shaka Player TextTrack"==e.label})}function lM(e,t){var n;return R(function(i){switch(i.g){case 1:return x(i,2),b(i,uI(t,e.F,e.g.streaming.retryParameters),4);case 4:n=i.h,T(i,3);break;case 2:A(i);case 3:if(n)return i.return(n);throw new eC(1,2,2011,t)}})}function lC(e,t,n,i){var r,a,o;return R(function(s){if(1==s.g){r=rw,(a=rm([t],i)).method="GET";var u=e.L;try{u.g.enabled&&uH(u,a,{ot:u$,su:!0})}catch(e){W("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return b(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)})}function lD(e,t,n,i){var r=ih(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=ek(t),function(e,t){function n(e){for(var n=e,i=u(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=uD(e);e="WEBVTT\n\n",i=u(i);for(var r=i.next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case nN: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 eC(2,2,2014,n)}function lR(e){var t=ua();return t.streaming.failureCallback=function(t){if(e.U()){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.gg(n))}},t.textDisplayFactory=function(){return!e.He||eJ()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new uP(e.h,"Shaka Player TextTrack"):new uj:new uO(e.h,e.He)},t}function lP(e){var t=e.Qf();if(e.A&&e.M&&e.G){if(0==e.g.streaming.rebufferingGoal){var n=e.K;n.j=!1,sg(n)}else(n=e.K).j=t,sg(n);if(e.L&&(n=e.L,t||n.u||(n.u=!0),n.u&&t&&(n.B=!0),n.F=t),lN(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Qd<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Qd*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(lr("buffering",t))}function lL(e,t){e.Oa.Ra(),e.Oa.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ja(),r=e.U()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.gd():Math.floor(n)<=Math.floor(i.start+r)&&e.gd()})}function lN(e){if(e.A&&e.M){var t=e.A.g,n="playing";e.M.g==as?n="buffering":e.Uc()?n="ended":e.h.paused&&(n="paused");var i=n;
1if(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(lr("statechanged",n)))}}function lj(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Sg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Nd(i,!1):1==r&&t!==e.K.sc()&&e.gd()}if(n&&Number.isFinite((n=e.Ja()).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.P||"number"!=typeof o||(e.P=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Na&&null!==e.P&&"number"==typeof o&&e.Qd<d&&Date.now()-e.Na>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(o-a)/2,a+i),e.Na=Date.now()),r&&null!==e.P&&(s=e.P+i,u=e.P-i),o=n.end-e.h.currentTime,i=0,e.m==l8&&0<(r=e.h.buffered).length&&(i=Math.max(l,(i=r.end(r.length-1))-n.end)),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.M.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.Nd(c,!1):void 0!=s&&l&&o-i>s?(t!=l&&e.Nd(l,!1),e.Na=null):void 0!=u&&c&&o-i<u?(t!=c&&e.Nd(c,!1),e.Na=null):t!==e.K.sc()&&(e.gd(),e.Na=Date.now())}}function lO(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.Ye<t&&(e.Ye=t,!0)},n=e.Ja();if(!isNaN(n=0<(n=n.end-n.start)?e.h.currentTime/n:0)){if(t(0,n*=100))var i=lr("started");else t(25,n)?i=lr("firstquartile"):t(50,n)?i=lr("midpoint"):t(75,n)?i=lr("thirdquartile"):(t(100,n)&&(i=lr("complete")),e.g&&1/0!=e.g.playRangeEnd&&e.Uc()&&e.h.pause());i&&e.dispatchEvent(i)}}}function lU(e){try{af(e.xe,e.i)}catch(t){return lJ(e,t),!1}var t=iX(e.i.variants);return t=e.W.create(t),e.o.setVariants(Array.from(t.values())),!0}function l_(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=lU(e)?e.o.chooseVariant():null)&&lB(e,a,r,t,n,i)}function lB(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.l;if(t==o)i&&sB(e.j,t,i,r,!0);else{var s=e.A.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})),sB(e.j,t,i,r,a,n),i=null,o&&(i=iF(o)),(o=iF(t)).active=!0,e.O&&(r=e.O,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.Ug()){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?l1(e,n=lr("adaptation",n=(new Map).set("oldTrack",i).set("newTrack",o))):lH(e,i,o),lG(e,i,o)}}function lF(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=iK(n),lH(e,n,t=iK(t)),lG(e,n,t))}function lV(e){l1(e,lr("trackschanged")),lK(e)}function lH(e,t,n){l1(e,t=lr("variantchanged",t=(new Map).set("oldTrack",t).set("newTrack",n)))}function lG(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&lK(e)}function lK(e){l1(e,lr("audiotrackschanged"))}function lq(e){l1(e,lr("textchanged"))}function lz(e){l1(e,lr("texttrackvisibility"))}function lX(e){e.g.abr.enabled||lY(e);var t=(new Map).set("newStatus",e.g.abr.enabled);l1(e,lr("abrstatuschanged",t))}function lW(e){var t=e.vc().find(function(e){return e.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function lY(e,t){if(t=void 0===t||t,e.m==l6){e.Je.stop();for(var n=u(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&lU(e)}}function lJ(e,t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(e.m==l4)return o.return();if(1===t.severity&&e.A.K++,n=!0,!(e.sa&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3018!=t.code){o.s(2);break}if(eJ()&&3016==t.code)return o.return();return x(o,3),b(o,s2(e.j),5);case 5:n=!(i=o.h),i&&(r=lr("mediasourcerecovered"),e.dispatchEvent(r)),T(o,2);break;case 3:A(o),n=!0;case 2:if(!n)return o.return();2===t.severity&&lY(e,!1),a=lr("error",(new Map).set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),w(o)}})}function l$(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(lr(t,e))}function lQ(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(lr(i?"audiotrackchanged":"mediaqualitychanged",t))}function lZ(e,t){if(t=void 0===t||t,!e.h.error)return t?new eC(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(0>t&&(t+=0x100000000),t=t.toString(16)),new eC(2,3,3016,n,t,e.h.error.message)):null}function l0(e,t,n){0<t&&(e.U()||e.Ch(t)),n<(t=e.getDuration())&&(e.U()||e.bb(n))}function l1(e,t){R(function(n){if(1==n.g)return b(n,Promise.resolve(),2);e.m!=l4&&e.dispatchEvent(t),w(n)})}function l2(e){var t=new Set;e=u(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(ik(n.language)):t.add("und");return t}function l3(e){var t=new Map,n=new Map;e=u(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",a=[];i.language&&(r=ik(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set),a=u(a);for(var o=a.next();!o.done;o=a.next())o=o.value,t.get(r).add(o),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(o,i.label))}var s=[];return t.forEach(function(e,t){e=u(e);for(var i=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)),s.push({language:t,role:i,label:r})}}),s}le.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},g(ln,rc),(c=ln.prototype).destroy=function(){var e,t=this;return R(function(n){switch(n.g){case 1:if(t.m==l4)return n.return();return li(t),e=t.detach(),t.m=l4,b(n,e,2);case 2:return b(n,t.rf(),3);case 3:if(t.We&&(t.We.release(),t.We=null),t.zd&&(t.zd.release(),t.zd=null),t.l&&(t.l.release(),t.l=null),t.Oa&&(t.Oa.release(),t.Oa=null),t.Sb&&(t.Sb.release(),t.Sb=null),t.Fa=null,t.g=null,t.A=null,t.He=null,t.L=null,t.fa=null,!t.F){n.s(4);break}return b(n,t.F.destroy(),5);case 5:t.F=null;case 4:t.o&&(t.o.release(),t.o=null),rc.prototype.release.call(t),w(n)}})},c.Lb=function(e,t){t=void 0===t||t;var n,i,r,a=this;return R(function(o){switch(o.g){case 1:if(a.m==l4)throw new eC(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.s(2);break}return b(o,a.detach(),2);case 2:return b(o,ls(a,"attach"),4);case 4:if(o.h)return o.return();if(x(o,5,6),n||(lo(a,"attach"),i=function(){var e=lZ(a,!1);e&&lJ(a,e)},a.zd.D(e,"error",i),a.h=e,a.L&&a.L.setMediaElement(e)),!t||!eF()||a.I){o.s(6);break}return b(o,lp(a),6);case 6:k(o),a.$.release(),E(o,0);break;case 5:return r=A(o),b(o,a.detach(),10);case 10:throw r}})},c.Wh=function(e){this.Ag=e},c.detach=function(e){e=void 0!==e&&e;var t=this;return R(function(n){if(1==n.g){if(t.m==l4)throw new eC(2,7,7e3);return b(n,t.kc(!1,e),2)}if(3!=n.g)return b(n,ls(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.zd.Ra(),t.h=null),lo(t,"detach"),t.B&&!e&&t.B.release()}finally{t.$.release()}w(n)})},c.kc=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,l,c,d,h,p,f=this;return R(function(g){switch(g.g){case 1:return f.m!=l4&&(f.m=l5),b(g,ls(f,"unload"),2);case 2:if(g.h)return g.return();return S(g,3),f.sa=!1,lo(f,"unload"),li(f),i=f.Cd.map(function(e){return e()}),f.Cd=[],b(g,Promise.all(i),5);case 5:if(f.dispatchEvent(lr("unloading")),f.yd&&(f.yd.release(),f.yd=null),f.Aa&&(f.Aa.release(),f.Aa=null),f.Ga&&(f.Ga.release(),f.Ga=null),f.h&&(f.l.Ra(),f.Oa.Ra()),f.Je.stop(),f.Ma&&(f.Ma.release(),f.Ma=null),f.oa&&(f.oa.stop(),f.oa=null),!f.H){g.s(6);break}return b(g,f.H.stop(),7);case 7:f.H=null,f.Qb=null;case 6:if(!f.o){g.s(8);break}return b(g,f.o.stop(),8);case 8:if(!f.j){g.s(10);break}return b(g,f.j.destroy(),11);case 11:f.j=null;case 10:if(f.K&&(f.K.release(),f.K=null),f.G&&(f.G.release(),f.G=null),"webkit"!==e.shakaMediaKeysPolyfill||!f.C){g.s(12);break}return b(g,f.C.destroy(),13);case 13:f.C=null;case 12:if(!f.I){g.s(14);break}return b(g,f.I.destroy(),15);case 15:f.I=null;case 14:var m;if(f.B&&!n&&f.B.onAssetUnload(),f.ea&&!n&&(f.ea.destroy(),f.ea=null),n||f.$e.stop(),f.L&&((m=f.L).u=!1,m.F=!0,m.B=!1,m.l=!1,m.m=0,m.o=0,m.A=0,m.G=!1,m.j=null,m.C.Ra()),f.fa&&(f.fa.g=null),!f.u){g.s(16);break}return b(g,f.u.destroy(),17);case 17:f.u=null;case 16:if(f.h&&(oi(f.h),f.h.src&&(f.h.removeAttribute("src"),f.h.load())),!f.C){g.s(18);break}return b(g,f.C.destroy(),19);case 19:f.C=null;case 18:if(f.za&&f.T!=f.za.Qc()&&(f.za.u||f.za.destroy(),f.za=null),f.T=null,f.Pb=null,f.M=null,f.i){for(a=(r=u(f.i.variants)
1).next();!a.done;a=r.next())for(l=(s=u([(o=a.value).audio,o.video])).next();!l.done;l=s.next())(c=l.value)&&c.segmentIndex&&c.segmentIndex.release();for(h=(d=u(f.i.textStreams)).next();!h.done;h=d.next())(p=h.value).segmentIndex&&p.segmentIndex.release()}f.g&&f.g.streaming.clearDecodingCache&&(iZ.clear(),eU.clear()),f.i=null,f.A=new uf,f.Xe=null,f.Na=null,f.P=null,f.Qd=-1,f.Ve=[],f.Jd=[],f.Ye=-1,f.F&&f.F.Jg(),lP(f);case 3:k(g),f.$.release(),E(g,4);break;case 4:if(t&&eF()&&!f.I&&f.h)return b(g,lp(f),0);g.s(0)}})},c.Mj=function(e){this.Z=e},c.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,l,c,d,h,p,f,g,m,v,y=this;return R(function(T){switch(T.g){case 1:if(y.m==l4)throw new eC(2,7,7e3);if(r=null,a="",t instanceof ug){if(t.u)throw new eC(2,7,7006);a=(r=t).Qc()||""}else a=t||"";return b(T,lt(y.$,"load"),2);case 2:if(y.$.release(),!y.h)throw new eC(2,7,7002);if(!y.T){T.s(3);break}return y.T=a,b(T,y.kc(!1),3);case 3:if(o=++y.Pd,s=function(){return R(function(e){if(1==e.g)return y.Pd==o?e.s(0):r?b(e,r.destroy(),3):e.s(3);throw new eC(2,7,7e3)})},l=function(e,t){return R(function(n){switch(n.g){case 1:return S(n,2),b(n,lt(y.$,t),4);case 4:return b(n,s(),5);case 5:return b(n,e(),6);case 6:return b(n,s(),7);case 7:r&&y.g&&(r.g=y.g);case 2:k(n),y.$.release(),E(n,0)}})},x(T,5,6),null==n&&r&&(n=r.getStartTime()),y.Z=n,y.sa=!1,y.dispatchEvent(lr("loading")),r){i=r.Z,T.s(8);break}if(i){T.s(8);break}return b(T,l(function(){return R(function(e){if(1==e.g)return b(e,ld(y,a),2);i=e.h,w(e)})},"guessMimeType_"),8);case 8:if(c=!!r,r){uv(r,y),y.A=r.getStats(),T.s(11);break}return b(T,ll(y,a,n,i,!0),12);case 12:(r=T.h)?(r.A=!1,uv(r,y),y.A=r.getStats(),r.start(),r.m.catch(function(){})):y.A=new uf;case 11:if(d=!r,h=Date.now()/1e3,y.A=r?r.getStats():new uf,y.T=a,y.Pb=i||null,lP(y),y.Aa=new sx(function(){return y.Ja()}),d)return b(T,l(function(){return R(function(e){var t,n,r,a,o,s,u;return b(e,(t=y,n=i,R(function(e){return 1==e.g?(r=tk,a=Date.now()/1e3,o=!0,t.C=t.Lc({Xb:t.F,onError:function(e){lJ(t,e)},te:function(){},onExpirationUpdated:function(){var e=lr("expirationupdated");t.dispatchEvent(e)},onEvent:function(e){t.dispatchEvent(e),"drmsessionupdate"==e.type&&o&&(o=!1,t.A.j=Date.now()/1e3-a)}}),t.C.configure(t.g.drm),s={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},(u={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?ir(n):"",codecs:n?ia(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.la,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(n8(u.mimeType,u.codecs)),n.startsWith("audio/")?(u.type=r.V,s.audio=u):s.video=u,t.C.$=!0,b(e,rq(t.C,[s],[]),2)):b(e,t.C.Lb(t.h),0)})),0)})},"initializeSrcEqualsDrmInner_"),23);return y.Ga=new sx(function(){return y.Ja()}),b(T,l(function(){return R(function(e){if(1==e.g)return b(e,Promise.race([r.na,r.m]),2);y.Qb=r.G;var t=r;t.oa=!0,y.H=t.l,y.i=r.Jf(),w(e)})},"waitForFinish"),15);case 15:if(y.I){T.s(16);break}return b(T,l(function(){return R(function(e){return b(e,lp(y),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return y.i&&y.i.textStreams.length&&(y.u.enableTextDisplayer?y.u.enableTextDisplayer():en("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),b(T,l(function(){return R(function(e){return b(e,r.m,0)})},"waitForFinish"),18);case 18:if(y.g=r.getConfiguration(),y.xe=r.F,y.H&&y.H.setMediaElement&&y.h&&y.H.setMediaElement(y.h),(I=r).sa=!0,y.yd=I.H,y.xd=r.Ga,(p=r.o)&&(y.W=p),c&&y.h&&"AUDIO"===y.h.nodeName&&(function(e){for(var t=u(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})}(y),y.configure("manifest.disableVideo",!0)),r.i){T.s(19);break}return b(T,l(function(){return R(function(e){return b(e,uw(r,y.h),0)})},"drmEngine_.init"),19);case 19:return(M=r).ka=!0,y.C=M.i,b(T,l(function(){return R(function(e){return b(e,y.C.Lb(y.h),0)})},"drmEngine_.attach"),21);case 21:return(f=r.C)&&(!y.Fa||y.Fa!=f)&&((C=r).ea=!0,y.o=C.j,y.Fa=r.C,"function"!=typeof y.o.setMediaElement&&(en("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),y.o.setMediaElement=function(){}),"function"!=typeof y.o.setCmsdManager&&(en("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),y.o.setCmsdManager=function(){}),"function"!=typeof y.o.trySuggestStreams&&(en("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),y.o.trySuggestStreams=function(){})),(D=r).Aa=!0,g=D.M,m=r.K,b(T,l(function(){return R(function(e){var t,n,i,r,a,o,s,l,c,d,p,f,v,x,S,T,A,k,E,I,M,C,D,P,L,N,j,O,U;return b(e,(t=y,n=h,i=m,r=g,R(function(e){var h,g,m,y,_,B,F,V,H,G,K,q,z,W,Y;switch(e.g){case 1:for(lo(t,"load"),a=t.h,t.K=new sf({de:function(){return a.playbackRate},sc:function(){return a.defaultPlaybackRate},og:function(e){a.playbackRate=e},hh:function(e){a.currentTime+=e}}
1),lf(t,a,n),o=!1,l=(s=u(t.i.variants)).next();!l.done;l=s.next())(d=(c=l.value).video&&c.video.dependencyStream)&&(o=tR(d));h=t,g=t.g,(m=o)||g.lcevc.enabled?(li(h),null==h.O&&(h.O=new tM(h.h,h.Ag,g.lcevc,m),h.I&&(h.I.K=h.O))):li(h),t.Tb=t.g.preferredTextLanguage,t.Hd=t.g.preferredTextRole,t.Fd=t.g.preferForcedSubs,l0(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.o.init(function(e,n,i){t.i&&t.j&&e!=t.j.l&&lB(t,e,!0,void 0!==n&&n,void 0===i?0:i)}),t.o.setMediaElement(a),t.o.setCmsdManager(t.fa),t.j=new sU((V=t).i,{Rc:function(){return V.G?V.G.Rd():0},getBandwidthEstimate:function(){return V.o.getBandwidthEstimate()},gb:function(){return V.gb()},video:V.h,aa:V.I,Xb:V.F,onError:function(e){return lJ(V,e)},onEvent:function(e){return V.dispatchEvent(e)},ue:function(e,t,n){var i=e.startTime;if(e=e.endTime,(t=t.type)!=tA){if(V.G){V.G.jh();var r=oj(V.I,t);!V.U()&&V.h.paused&&!V.h.seeking&&null!=r&&0<r&&V.G.Rd()<r&&V.G.cf(r)}lw(V)}n=(new Map).set("start",i).set("end",e).set("contentType",t).set("isMuxed",n),V.dispatchEvent(lr("segmentappended",n))},hj:function(e,t){var n,i,r,a,o,s,u;(t=t.Wc)&&V.xd&&(n=V.xd,i=t,r=e,a=n,o=i.contentType,(s=a.g.get(o))||(s={Kd:[],pf:null,contentType:o},a.g.set(o,s)),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.Kd;t.Kd=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.Kd=[]}(n,u=s),n={Wc:i,position:r},0<=(i=(u=u.Kd).findIndex(function(e){return e.position>=r}))?u.splice(i,+(u[i].position==r),n):u.push(n))},Hg:function(e,t){var n=V.C;if(n.g.parseInbandPsshEnabled&&!n.F&&["audio","video"].includes(e)){e=new rH(ek(t)),t=0;for(var i=u(e.data),r=i.next();!r.done;r=i.next())t+=r.value.length;if(0==t)n=Promise.resolve();else{for(t=new Uint8Array(t),i=0,r=(e=u(e.data)).next();!r.done;r=e.next())r=r.value,t.set(r,i),i+=r.length;rY(n,"cenc",t),n=n.m}}else n=Promise.resolve();return n},disableStream:function(e,t){return V.disableStream(e,t)}}),t.j.configure(t.g.streaming),t.m=l6,t.dispatchEvent(lr("streaming")),p=i;case 2:for((v=t.j.l)||p||(p=lU(t)?t.o.chooseVariant():null),x=[],T=(S=u([(f=v||p).video,f.audio])).next();!T.done;T=S.next())(A=T.value)&&!A.segmentIndex&&(x.push(A.createSegmentIndex()),A.dependencyStream&&x.push(A.dependencyStream.createSegmentIndex()));if(!(0<x.length)){e.s(4);break}return b(e,Promise.all(x),4);case 4:if(!f||0!=f.disabledUntilTime){e.s(2);break}if(t.H&&t.H.onInitialVariantChosen&&t.H.onInitialVariantChosen(f),t.i.isLowLatency&&(t.g.streaming.lowLatencyMode?t.configure(t.Ze):X("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.L&&((y=t.L).l=t.i.isLowLatency&&t.g.streaming.lowLatencyMode,y.l?y.i==u0?y.i=u1:y.i==u2&&(y.i=u3):y.i==u1?y.i=u0:y.i==u3&&(y.i=u2),function(e,t){if(e.g&&e.g.enabled&&e.g.version==uZ&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}(t.L,1e3*n)),l0(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),_=t.j,B=t.g.playRangeStart,F=t.g.playRangeEnd,_.j.presentationTimeline.U()||(_.W=B,_.T=F),k=function(e){var n,i,r,o,s,u,l;n=t,i=e,t.G=new sa(n.h,n.i,n.g.streaming,i,function(){n.Ma&&sv(n.Ma,!0),n.j&&n.j.Fc(),n.M&&lw(n)},function(e){return n.dispatchEvent(e)}),r=t,o=e,s=r.U()||0<o,(o=new uS(r.yd,s)).addEventListener("enter",function(e){l$(r,"timelineregionenter",e.region)}),o.addEventListener("exit",function(e){l$(r,"timelineregionexit",e.region)}),o.addEventListener("skip",function(e){var t=e.region;e.seeking||(l$(r,"timelineregionenter",t),l$(r,"timelineregionexit",t))}),(u=new uS(r.Aa,s)).addEventListener("enter",function(e){lg(r,e.region)}),(s=new uS(r.Ga,s)).addEventListener("enter",function(e){e=(new Map).set("detail",e.region.emsg),r.dispatchEvent(lr("emsg",e))}),(l=new sm(r.h)).g.add(o),l.g.add(u),l.g.add(s),r.xd&&l.g.add(r.xd),t.Ma=l,ly(t,a,!1)},t.g.streaming.startAtSegmentBoundary||(null==(E=t.Z)&&t.i.startTime&&(E=t.i.startTime),k(E)),v){e.s(7);break}if(!t.g.streaming.startAtSegmentBoundary){e.s(8);break}return I=t.i.presentationTimeline,M=t.Z||t.h.currentTime,null==t.Z&&t.i.startTime&&(M=t.i.startTime),C=I.Hb(),D=I.ob(),M<C?M=C:M>
1D&&(M=D),b(e,(H=p,G=M,R(function(e){return 1==e.g?(K=H.audio,q=H.video,z=function(e,t){var n,i,r;return R(function(a){return 1==a.g?e?e.segmentIndex?a.s(2):b(a,e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Gb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},b(e,z(K,G),2)):3!=e.g?(W=e.h,b(e,z(q,G),3)):null!=(Y=e.h)&&null!=W?e.return(Math.max(Y,W)):null!=Y?e.return(Y):null!=W?e.return(W):e.return(G)})),9);case 9:P=e.h,k(P);case 8:lB(t,p,!0,!1,0);case 7:return t.G.ready(),t.vc().find(function(e){return e.active})||((L=iW(t.i.textStreams,t.Tb,t.Hd,t.Fd)[0]||null)&&up(t.A.h,L,!0),p&&(L?(iQ(p.audio,L,t.g)&&(t.na=!0),t.na&&t.u.setTextVisibility(!0),lz(t)):t.na=!1),L&&(t.g.streaming.alwaysStreamText||t.Rf())&&(sF(t.j,L),lW(t))),b(e,t.j.start(r),10);case 10:t.g.abr.enabled&&(t.o.enable(),lX(t)),lV(t),lU(t),t.i.variants.some(function(e){return e.primary}),((N=t.U())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.i.serviceDescription||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(j=function(){return lj(t)},t.l.D(a,"timeupdate",j)),N||(O=function(){return lO(t)},t.l.D(a,"timeupdate",O),lO(t),t.i.nextUrl&&(0<t.g.streaming.preloadNextUrlWindow&&(U=function(){var e;return R(function(n){if(1==n.g)return isNaN(e=t.Ja().end-t.h.currentTime)||!(e<=t.g.streaming.preloadNextUrlWindow)?n.s(0):(t.l.Ka(a,"timeupdate",U),b(n,t.preload(t.i.nextUrl),4));t.za=n.h,w(n)})},t.l.D(a,"timeupdate",U)),t.l.D(a,"ended",function(){t.load(t.za||t.i.nextUrl)}))),t.B&&t.B.onManifestUpdated(N),t.sa=!0,w(e)}})),0)})},"loadInner_"),22);case 22:var I,M,C,D,P,L,N,j=r;if(j.I)for(var O=u(j.I),U=O.next();!U.done;U=O.next())(U=U.value)();j.I=null,y.Pb&&eJ()&&io(y.Pb)&&(P=y.I,L=y.T,N=y.Pb,P.g&&e.ManagedMediaSource&&P.i&&(P.C&&P.g.removeChild(P.C),P.C=on(L,N),P.g.appendChild(P.C),P.g.disableRemotePlayback=!1)),T.s(14);break;case 23:return b(T,l(function(){return R(function(e){var t,n,r,a,o,s,l,c,d,p,f,g,m,v,x;return b(e,(t=y,n=h,r=i,R(function(e){switch(e.g){case 1:var i,h,y;if(lo(t,"src-equals"),a=t.h,t.G=new sr(a),o=!1,t.Cd.push(function(){o=!0}),null!=t.Z&&t.G.cf(t.Z),i=t,h=t.Z||0,(h=new uS(i.Aa,0<h)).addEventListener("enter",function(e){lg(i,e.region)}),(y=new sm(i.h)).g.add(h),t.Ma=y,t.K=new sf({de:function(){return a.playbackRate},sc:function(){return a.defaultPlaybackRate},og:function(e){a.playbackRate=e},hh:function(e){a.currentTime+=e}}),ly(t,a,!0),a.textTracks&&(lh(t),s=function(){var e=lE(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="showing"),(e=lI(t))&&(e.mode="hidden")},l=function(){var e=lE(t).find(function(e){return"disabled"!==e.mode});e&&(e.mode="hidden"),e=lI(t);var n=t.u.isTextVisible();e&&n&&(e.mode="showing")},t.l.D(a,"enterpictureinpicture",function(){return s()}),t.l.D(a,"leavepictureinpicture",function(){return l()}),a.remote?(t.l.D(a.remote,"connect",function(){return l()}),t.l.D(a.remote,"connecting",function(){return l()}),t.l.D(a.remote,"disconnect",function(){return l()})):"webkitCurrentPlaybackTargetIsWireless"in a&&t.l.D(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return l()}),(c=a).webkitSupportsFullscreen&&t.l.D(c,"webkitpresentationmodechanged",function(){"inline"!=c.webkitPresentationMode?s():l()})),lf(t,a,n),!(d=function(e,t,n){try{if(!e.g.enabled)return t;var i=uV(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=uX;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=uY;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=uz;break e}r=void 0}i.ot=r,i.su=!0;var a=uK(i);return uq(t,a)}catch(e){return W("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(t.L,t.T,r)).includes("#t=")&&(0<t.g.playRangeStart||isFinite(t.g.playRangeEnd))&&(d+="#t=",0<t.g.playRangeStart&&(d+=t.g.playRangeStart),isFinite(t.g.playRangeEnd)&&(d+=","+t.g.playRangeEnd)),!t.I){e.s(2);break}return b(e,t.I.destroy(),3);case 3:t.I=null;case 2:return oi(a),a.src=d,(eK()||ez())&&a.load(),"none"!=a.preload&&!a.autoplay&&io(r)&&eJ()&&a.load(),t.m=l8,t.dispatchEvent(lr("streaming")),p=new re,o5(a,HTMLMediaElement.HAVE_METADATA,t.l,function(){t.G.ready(),p.resolve()}),f=function(){return new Promise(function(e){var n=new eB(e);t.l.D(a.textTracks,"change",function(){return n.da(.5)}),n.da(.5)})},o5(a,HTMLMediaElement.HAVE_CURRENT_DATA,t.l,function(){var e,n,i,r,a;return R(function(s){var l,c,d,h;if(1==s.g)return b(s,f(),2);
1if(o)return s.return();for(""!=(c=(l=t).g.preferredAudioLanguage)&&l.th(c,l.g.preferredVariantRole),(e=lE(t)).some(function(e){return"showing"===e.mode})&&(t.na=!0,t.u.setTextVisibility(!0)),e.length&&(t.u.enableTextDisplayer?t.u.enableTextDisplayer():en("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),n=!1,r=(i=u(e)).next();!r.done;r=i.next())"disabled"!==(a=r.value).mode&&(n?(a.mode="disabled",X("Found more than one enabled text track, disabling it",a)):(lk(t,a),n=!0));""!=(h=(d=t).g.preferredTextLanguage)&&d.jg(h,d.g.preferredTextRole,d.g.preferForcedSubs),w(s)})}),a.error?p.reject(lZ(t)):"none"==a.preload&&(X('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.'),p.resolve()),t.l.qa(a,"error",function(){p.reject(lZ(t))}),b(e,iw(t.g.streaming.loadTimeout,p),4);case 4:((g=t.U())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(m=function(){return lj(t)},t.l.D(a,"timeupdate",m)),g||(v=function(){return lO(t)},t.l.D(a,"timeupdate",v),lO(t)),t.B&&(t.B.onManifestUpdated(g),g&&(x=t.Ja().end,t.l.D(a,"progress",function(){var e=t.Ja().end;x!=e&&(t.B.onManifestUpdated(t.U()),x=e)}))),t.sa=!0,w(e)}})),0)})},"srcEqualsInner_"),14);case 14:y.dispatchEvent(lr("loaded"));case 6:if(k(T),!r){T.s(25);break}return b(T,r.destroy(),25);case 25:y.za=null,E(T,0);break;case 5:if(!(v=A(T))||7e3==v.code){T.s(27);break}return b(T,y.kc(!1),27);case 27:throw v}})},c.Ij=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,i=this;return R(function(r){return 1==r.g?b(r,lu(i),2):3!=r.g?(n=r.h,b(r,i.kc(e,t),3)):r.return(n)})},c.Ng=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return R(function(r){return 1==r.g?b(r,lu(i,t),2):3!=r.g?(n=r.h,b(r,i.detach(e),3)):r.return(n)})},c.preload=function(e,t,n){t=void 0===t?null:t;var i,r=this;return R(function(a){return 1==a.g?b(a,ll(r,e,t,n),2):((i=a.h)?i.start():lJ(r,new eC(2,7,7005)),a.return(i))})},c.rf=function(){var e,t,n,i,r=this;return R(function(a){for(e=[],n=(t=u(r.Re)).next();!n.done;n=t.next())(i=n.value).u||e.push(i.destroy());return r.Re=[],b(a,Promise.all(e),0)})},c.qj=function(){for(var e=this.$;e.g;)e.release()},c.Lc=function(e){return new rK(e)},c.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=s6(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(en("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(en("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(en("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&eJ(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&"boolean"==typeof e.streaming.liveSync){en("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.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&&(en("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.
1streaming&&(en("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&&(en("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&&(en("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&&(en("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&&(en("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&&(en("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&&(en("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){en("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&&(en("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&&(en("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(en("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&&(en("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(en("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&&(en("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&&(en("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&&(en("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&&(en("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&&(en("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&&en("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&&"crossBoundaryStrategy"in e.streaming&&"keep"!=e.streaming.crossBoundaryStrategy&&(e.streaming.inaccurateManifestTolerance=0),a=us(this.g,e,lR(this)),lx(this),a},c.di=function(e){this.Ze=e},c.getConfiguration=function(){var e=lR(this);return us(e,this.g,lR(this)),e},c.mi=function(){return this.Ze},c.Wg=function(){return us(lR(this),this.g,lR(this)),s8(this.g,lR(this))},c.Sg=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.Ja().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},c.uj=function(){for(var e in this.g)delete this.g[e];us(this.g,lR(this),lR(this)),lx(this)},c.vi=function(){return this.m},c.Ug=function(){return this.i?this.i.type:null},c.zi=function(){return this.h},c.yb=function(){return this.F},c.Qc=function(){return this.T},c.Rg=function(){return this.B?this.B:null},c.U=function(){return this.i&&!this.Qa()?this.i.presentationTimeline.U():!!this.h&&!!this.h.src&&1/0==this.h.duration},c.yc=function(){return!!this.i&&this.i.presentationTimeline.yc()},c.Si=function(){if(this.i&&!this.Qa()){var e=this.i.variants;return!!e.length&&!e[0].video}return!!this.h&&!!this.h.src&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},c.Ja=function(){if(this.i&&!this.Qa()){if(!this.sa&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Hb(),end:e.ob()}}if(this.h&&this.h.src&&(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}},c.Pi=function(){this.U()&&(this.h.currentTime=this.Ja().end)},c.Ti=function(){return this.sa},c.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},c.drmInfo=function(){return this.C?this.C.h:null},c.pd=function(){return this.C?this.C.pd():1/0},c.If=function(){return this.C?this.C.If():[]},c.be=function(){return this.C?this.C.be():{}},c.Qf=function(){return this.M?this.M.g==as:!!this.T},c.gb=function(){return this.h?this.K?this.K.i:1:0},c.Nd=function(e,t){t=void 0===t||t,0==e?X("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==l6&&(this.o.playbackRateChanged(e),s_(this.j,t&&1<Math.abs(e))),lL(this,e))},c.gd=function(){var e=this.K.sc();this.m==l8&&this.K.set(e),this.m==l6&&(this.K.set(e),this.o.playbackRateChanged(e),s_(this.j,!1)),this.Oa.Ra()},c.Rb=function(){if(this.i&&!this.Qa()){for(var e=this.j?this.j.l:null,t=[],n=0,i=u(this.i.variants),r=i.next();!r.done;r=i.next())if(iz(r=r.value)){var a=iF(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}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){return iK(e)}):[]},c.vc=function(){if(this.i&&!this.Qa()){for(var e=this.j?this.j.u:null,t=[],n=u(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=iV(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?lE(this).map(function(e){var t=iq(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}):[]},c.si=function(){var e=this.Ve;return this.i&&(e=this.i.imageStreams),e.map(function(e){return iH(e)})},c.gi=function(e){var t,n,i=this;return R(function(r){return 1==r.g?b(r,lT(i,e),2):(t=r.h)?(n=[],t.segmentIndex.xb(function(e){var i=lS(e.tilesLayout||t.tilesLayout);if(i)for(var r=i.rows*i.oc,a=e.j-e.startTime,o=0;o<r;o++){var s=lA(e,t,e.startTime+a*o/r,i);n.push(s)}}),t.closeSegmentIndex&&t.closeSegmentIndex(),r.return(n)):r.return(null)})},c.Ji=function(e,t){var n,i,r,a,o=this;return R(function(s){return 1==s.g?b(s,lT(o,e),2):(n=s.h)&&null!=(i=n.segmentIndex.find(t))&&(a=lS((r=n.segmentIndex.get(i)).tilesLayout||n.tilesLayout))?s.return(lA(r,n,t,a)):s.return(null)})},c.uh=function(e){var t,n=this;if((!this.i||!this.G||((t=n.i.textStreams.find(function(t){return t.id==e.id}))&&t!=n.j.u&&(up(n.A.h,t,!1),sF(n.j,t),lq(n),lW(n),n.Tb=t.language),this.Qa()))&&n.h&&n.h.textTracks){var i=lE(n),r=i.find(function(e){return"disabled"!==e.mode});(i=i.find(function(t){return iG(t)===e.id}))&&(r!==i&&(r&&(r.mode="disabled",n.l.Ka(r,"cuechange"),n.u.remove(0,1/0)),i&&lk(n,i)),lq(n),lW(n))}},c.Ee=function(e,t,n){var i=this;if(t=void 0!==t&&t,n=void 0===n?0:n,(!this.i||!this.G||(function(){var r=i.i.variants.find(function(t){return t.id==e.id});if(r&&iz(r)){var a=i.j.l;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)&&X("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.Qa()?lB(i,r,!1,!1,0):lB(i,r,!1,t||!1,n||0),i.W.configure({language:r.language,role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",channelCount:r.audio&&r.audio.channelsCount?r.audio.channelsCount:0,Sc: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:"",Kc:r.audio&&r.audio.label?r.audio.label:"",fd:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:""}),lU(i)}}(),this.Qa()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks);r=u(r);for(var a=r.next();!a.done;a=r.next())if(iG(a=a.value)==e.id){lF(i,a);break}}},c.zj=function(e,t){t=void 0===t?0:t;var n=this.Rb();if(n.length){var i=n.find(function(e){return e.active});i&&(n=n.find(function(t){return t.videoId===i.videoId&&t.language==e.language&&t.label==e.label&&t.audioMimeType==e.mimeType&&t.audioCodec==e.codecs&&t.primary==e.primary&&tJ(t.audioRoles,e.roles)&&t.accessibilityPurpose==e.accessibilityPurpose&&t.channelsCount==e.channelsCount&&t.audioSamplingRate==e.audioSamplingRate&&t.spatialAudio==e.spatialAudio}))&&!n.active&&this.Ee(n,!0,t)}},c.getAudioTracks=function(){var e=this.Rb();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e;if(this.m==l6&&(n=e.filter(function(e){return e.originalVideoId===t.originalVideoId&&e.audioCodec})),!n.length)return[];e=new Map,n=u(n);for(var i=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.audioR
1oles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())},c.ii=function(){return l3(this.Rb())},c.Hi=function(){return l3(this.vc())},c.hi=function(){return Array.from(l2(this.Rb()))},c.Gi=function(){return Array.from(l2(this.vc()))},c.th=function(e,t,n,i,r,a,o){var s=this;if(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.G||(function(){function l(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}s.W=s.g.adaptationSetCriteriaFactory(),s.W.configure({language:e,role:t||"",channelCount:n||0,Sc:"",spatialAudio:a||!1,videoLayout:"",Kc:o||"",fd:"",codecSwitchingStrategy:s.g.mediaSource.codecSwitchingStrategy,audioCodec:r||""});var c=s.j.l,d=s.W.create(s.i.variants),h=null;d=u(d.values());for(var p=d.next();!p.done;p=d.next())iz(p=p.value)&&(!h||l(h,c)>l(p,c))&&(h=p);h!=c&&(h?(c=iF(h),s.Ee(c,!0,i||0)):l_(s))}(),this.Qa()))&&s.h&&s.h.audioTracks){var l=iW(s.Rb(),e,t||"",!1)[0];l&&s.Ee(l)}},c.jg=function(e,t,n){var i,r,a=this;n=void 0!==n&&n,(!this.i||!this.G||(a.Tb=e,a.Hd=t||"",a.Fd=n||!1,(i=iW(a.i.textStreams,a.Tb,a.Hd,a.Fd)[0]||null)&&i!=a.j.u&&(up(a.A.h,i,!1),a.g.streaming.alwaysStreamText||a.Rf())&&(sF(a.j,i),lq(a),lW(a)),this.Qa()))&&(r=iW(a.vc(),e,t||"",n||!1)[0])&&a.uh(r)},c.Aj=function(e,t,n){var i=this;if(t=void 0===t||t,n=void 0===n?0:n,(!this.i||!this.G||(function(){for(var r=null,a=u(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.W=i.g.adaptationSetCriteriaFactory(),i.W.configure({language:r.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),l_(i,t,n))}(),this.Qa()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks),a=null;r=u(r);for(var o=r.next();!o.done;o=r.next())(o=o.value).label==e&&(a=o);a&&lF(i,a)}},c.Rf=function(){var e=this.na;return this.u?this.u.isTextVisible():e},c.li=function(){return this.Jd.map(function(e){return iV(e)})},c.ki=function(e){if(!this.Jd.length)return[];var t=ik(e);if(!(e=this.Jd.filter(function(e){return ik(e.language)==t})).length)return[];var n=[],i=new Set;e=u(e);for(var r=e.next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.xb(function(e){var t=e.N()[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},c.Ah=function(e){var t,n;e=!!e,this.na!=e&&(this.na=e,this.m==l6?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.u||0<(e=iW(this.i.textStreams,this.Tb,this.Hd,this.Fd)).length&&(sF(this.j,e[0]),lq(this),lW(this)):((n=(t=this.j).i.get(tA))&&(sZ(n),s0(n).catch(function(){}),t.F=t.i.get(tA),t.i.delete(tA)),t.u=null))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),lz(this))},c.Ai=function(){if(this.G)var e=this.G.Rd();else{if(null==this.Z)return new Date;e=this.Z}if(this.i&&!this.Qa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?isNaN((t=this.h.getStartDate()).getTime())?null:new Date(t.getTime()+1e3*e):null},c.Xg=function(){if(this.i&&!this.Qa()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?isNaN((e=this.h.getStartDate()).getTime())?null:e:null},c.ee=function(){return this.U()&&this.i?this.i.presentationTimeline.ee():null},c.Fb=function(){if(this.m==l6)return this.I.Fb();var e={total:[],audio:[],video:[],text:[]};return this.m==l8&&(e.total=oe(this.h.buffered)),e},c.ce=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Xg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},c.getStats=function(){if(this.m!=l6&&this.m!=l8)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};lN(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.A;
1t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.A.P=this.G.Bg(),this.A.T=this.G.Cg()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.A;var i=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=i,this.A.L=Number(n.corruptedVideoFrames)}if(n=this.C&&(n=this.C).H?n.H:NaN,this.A.o=n,this.m==l6){if(n=this.j.l,t=this.j.u,n){var r=(i=this.K?this.K.i:1)*n.bandwidth;t&&t.bandwidth&&(r+=i*t.bandwidth),this.A.A=r}n&&n.video&&(t=this.A,i=n.video.height||NaN,t.m=n.video.width||NaN,t.l=i),this.U()&&(n=this.ce()||0,this.A.B=n/1e3),this.i&&(this.A.G=this.i.periodCount,this.A.F=this.i.gapCount,this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.A.u=n}this.m==l8&&((n=this.A).mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.A,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var a=this.A;e=a.m,n=a.l,t=a.A,i=a.M,r=a.O;var o=a.L,s=a.T,l=a.P,c=a.u,d=a.i,h=a.C,p=a.H,f=a.j,g=ud(a.g,"playing"),m=ud(a.g,"paused"),v=ud(a.g,"buffering"),y=a.o,b=a.B,w=a.I,x=a.dh,S=a.mc,T=a.K,A=a.G,k=a.F,E=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=u(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(a.g),I=[];a=u(a.h.g);for(var M=a.next();!M.done;M=a.next())I.push({timestamp:(M=M.value).timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:r,corruptedFrames:o,stallsDetected:s,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:h,manifestTimeSeconds:p,drmTimeSeconds:f,playTime:g,pauseTime:m,bufferingTime:v,licenseTime:y,liveLatency:b,maxSegmentDuration:w,manifestSizeBytes:x,bytesDownloaded:S,nonFatalErrorCount:T,manifestPeriodCount:A,manifestGapCount:k,stateHistory:E,switchHistory:I}},c.Sh=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,p,f=this;return R(function(g){switch(g.g){case 1:if(f.m!=l6&&f.m!=l8)throw new eC(1,7,7004);if("subtitles"!=n&&"captions"!=n&&X("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){g.s(2);break}return b(g,lM(f,e),3);case 3:i=g.h;case 2:var m,v,y,w,x,S,T,A;if(s=[],f.B&&(s=f.B.getCuePoints()),f.m!=l8){g.s(4);break}return o&&(n="forced"),b(g,(m=f,v=e,y=t,w=n,x=i,S=a||"",T=s,R(function(e){if(1==e.g)return"text/vtt"!=x||T.length?b(e,lC(m,v,m.F,m.g.streaming.retryParameters),3):e.s(2);2!=e.g&&(v=o$(new Blob([lD(m,e.h,x,T)],{type:"text/vtt"})),x="text/vtt"),A=document.createElement("track");var t=m.L,n=v;try{if(t.g.enabled){var i=uV(t);i.ot=u$,i.su=!0;var r=uK(i),a=uq(n,r)}else a=n}catch(e){W("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),a=n}return A.src=a,A.label=S,A.kind=w,A.srclang=y,m.h.getAttribute("crossorigin")||m.h.setAttribute("crossorigin","anonymous"),m.h.appendChild(A),e.return(A)})),5);case 5:if(u=ik(t),l=f.vc().find(function(e){return ik(e.language)==u&&e.label==(a||"")&&e.kind==n}))return lV(f),g.return(l);throw new eC(1,2,2012);case 4:if(c=tk,h=(d=f.Ja()).end-d.start,f.i&&(h=f.i.presentationTimeline.getDuration()),1/0==h)throw new eC(1,4,4033);if(!s.length){g.s(6);break}return b(g,lC(f,e,f.F,f.g.streaming.retryParameters),7);case 7:e=o$(new Blob([lD(f,g.h,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(p={id:f.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sd(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.va,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([n8(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!ip(n8(p.mimeType,p.codecs)))throw new eC(2,2,2014,i);return f.i.textStreams.push(p),lV(f),g.return(iV(p))}})},c.Th=function(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,S=this;return R(function(T){switch(T.g){case 1:if(S.m!=l6&&S.m!=l8)throw new eC(1,7,7004);if(t){T.s(2);break}return b(T,lM(S,e),3);case 3:t=T.h;case 2:if("text/vtt"!=t)throw new eC(1,2,2017,e);if(n=tk,r=(i=S.Ja()).end-i.start,S.i&&(r=S.i.presentationTimeline.getDuration()),1/0==r)throw new eC(1,4,4045);return b(T,lC(S,e,S.F,S.g.streaming.retryParameters),4);case 4:if(a=T.h,!(o=ih(t)))throw new eC(2,2,2014,t);for(s=o(),l={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},c=ek(a),d=s.parseMedia(c,l,e,[]),h=[],f=(p=u(d)).next(),g={};!f.done;g={Qe:void 0,Mc:void 0},f=p.next())g.Mc=f.value,g.Qe=null,m=function(t){return function(){return null==t.Qe&&(t.Qe=ty([e],[t.Mc.payload])),t.Qe||[]}}(g),v=new a3(g.Mc.startTime,g.Mc.endTime,m,0,null,null,0,0,1/0),g.Mc.payload.includes("#xywh")&&4===(y=g.Mc.payload.split("#xywh=")[1].split(",")).length&&v.Ge({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)}),h.push(v);if(w=t,!h.length){T.s(5);break}return b(T,uI(h[0].N()[0],S.F,S.g.manifest.retryParameters),6);case 6:w=T.h;case 5:return x={id:S.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sl(h),mimeType:w||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.bf,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([n8(w||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},S.m==l8?S.Ve.push(x):S.i.imageStreams.push(x),lV(S),T.return(iH(x))}})},c.Rh=function(e,t,n){var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w=this;return R(function(x){switch(x.g){case 1:if(w.m!=l6&&w.m!=l8)throw new eC(1,7,7004);if(n){x.s(2);break}return b(x,lM(w,e),3);case 3:n=x.h;case 2:if(i=tk,a=(r=w.Ja()).end-r.start,w.i&&(a=w.i.presentationTimeline.getDuration()),1/0==a)throw new eC(1,4,4054);return b(x,lC(w,e,w.F,w.g.streaming.retryParameters),4);case 4:if(o=x.h,!(s=ih(n)))throw new eC(2,2,2014,n);for(l=s(),c={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},d=ek(o),h=l.parseMedia(d,c,e,[]),p=[],g=(f=u(h)).next(),m={};!g.done;m={Zd:void 0},g=f.next())m.Zd=g.value,v=new a3(m.Zd.startTime,m.Zd.endTime,function(e){return function(){return[e.Zd.payload]}}(m),0,null,null,0,0,1/0),p.push(v);return y={id:w.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sl(p),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.va,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([n8("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},w.Jd.push(y),lV(w),x.return(iV(y))}})},c.Fj=function(e,t){this.ka.width=e,this.ka.height=t},c.gg=function(e){if(this.m==l6){var t=this.j;if(e=void 0===e?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=u(t.i.values()),i=n.next();!i.done;i=n.next())!(i=i.value).sd||i.Da||i.kb||(i.sd=!1,sQ(t,i,e));t=!0}}else t=!1;return t},c.Jf=function(){return X("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},c.wi=function(){return this.Qb},c.pi=function(){var e={video:null,audio:null,text:null};if(this.m!=l6)return e;var t=this.j.l,n=this.h.currentTime;t=u([t.video,t.audio,this.j.u]);for(var i=t.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==tA&&(e.text=r)}return e},c.Dh=function(e){this.He=e},c.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===l4||!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=u(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.Je.ua(1),l_(this,!1,t=this.Fb().video.reduce(function(e,t){return e+t.end-t.start}
1,0),!0,!1),!0)}return!1},c.addFont=function(t,n){var i,r,a,o;return R(function(s){if(1==s.g)return"fonts"in document&&"FontFace"in e?b(s,document.fonts.ready,3):s.s(0);if(!("entries"in document.fonts))return s.return();for(r=(i=u(function(e){e=e.entries();for(var t=[],n=e.next();!1===n.done;)t.push(n.value),n=e.next();return t}(document.fonts))).next();!r.done;r=i.next())if((a=r.value).family==t&&"swap"==a.display)return s.return();o=new FontFace(t,"url("+n+")",{display:"swap"}),document.fonts.add(o),w(s)})},c.Qa=function(){return!!this.h&&!!this.h.remote&&"disconnected"!=this.h.remote.state},c.Uc=function(){return!this.h||!!this.h.ended||this.sa&&!this.U()&&this.h.currentTime>=this.Ja().end},B("shaka.Player",ln),ln.prototype.isEnded=ln.prototype.Uc,ln.prototype.isRemotePlayback=ln.prototype.Qa,ln.prototype.addFont=ln.prototype.addFont,ln.prototype.setVideoContainer=ln.prototype.Dh,ln.prototype.getFetchedPlaybackInfo=ln.prototype.pi,ln.prototype.getManifestParserFactory=ln.prototype.wi,ln.prototype.getManifest=ln.prototype.Jf,ln.prototype.retryStreaming=ln.prototype.gg,ln.prototype.setMaxHardwareResolution=ln.prototype.Fj,ln.prototype.addChaptersTrack=ln.prototype.Rh,ln.prototype.addThumbnailsTrack=ln.prototype.Th,ln.prototype.addTextTrackAsync=ln.prototype.Sh,ln.prototype.getStats=ln.prototype.getStats,ln.prototype.getBufferedInfo=ln.prototype.Fb,ln.prototype.getSegmentAvailabilityDuration=ln.prototype.ee,ln.prototype.getPresentationStartTimeAsDate=ln.prototype.Xg,ln.prototype.getPlayheadTimeAsDate=ln.prototype.Ai,ln.prototype.setTextTrackVisibility=ln.prototype.Ah,ln.prototype.getChapters=ln.prototype.ki,ln.prototype.getChaptersTracks=ln.prototype.li,ln.prototype.isTextTrackVisible=ln.prototype.Rf,ln.prototype.selectVariantsByLabel=ln.prototype.Aj,ln.prototype.selectTextLanguage=ln.prototype.jg,ln.prototype.selectAudioLanguage=ln.prototype.th,ln.prototype.getTextLanguages=ln.prototype.Gi,ln.prototype.getAudioLanguages=ln.prototype.hi,ln.prototype.getTextLanguagesAndRoles=ln.prototype.Hi,ln.prototype.getAudioLanguagesAndRoles=ln.prototype.ii,ln.prototype.getAudioTracks=ln.prototype.getAudioTracks,ln.prototype.selectAudioTrack=ln.prototype.zj,ln.prototype.selectVariantTrack=ln.prototype.Ee,ln.prototype.selectTextTrack=ln.prototype.uh,ln.prototype.getThumbnails=ln.prototype.Ji,ln.prototype.getAllThumbnails=ln.prototype.gi,ln.prototype.getImageTracks=ln.prototype.si,ln.prototype.getTextTracks=ln.prototype.vc,ln.prototype.getVariantTracks=ln.prototype.Rb,ln.prototype.cancelTrickPlay=ln.prototype.gd,ln.prototype.trickPlay=ln.prototype.Nd,ln.prototype.getPlaybackRate=ln.prototype.gb,ln.prototype.isBuffering=ln.prototype.Qf,ln.prototype.getKeyStatuses=ln.prototype.be,ln.prototype.getActiveSessionsMetadata=ln.prototype.If,ln.prototype.getExpiration=ln.prototype.pd,ln.prototype.drmInfo=ln.prototype.drmInfo,ln.prototype.keySystem=ln.prototype.keySystem,ln.prototype.isFullyLoaded=ln.prototype.Ti,ln.prototype.goToLive=ln.prototype.Pi,ln.prototype.seekRange=ln.prototype.Ja,ln.prototype.isAudioOnly=ln.prototype.Si,ln.prototype.isInProgress=ln.prototype.yc,ln.prototype.isLive=ln.prototype.U,ln.prototype.getAdManager=ln.prototype.Rg,ln.prototype.getAssetUri=ln.prototype.Qc,ln.prototype.getNetworkingEngine=ln.prototype.yb,ln.prototype.getMediaElement=ln.prototype.zi,ln.prototype.getManifestType=ln.prototype.Ug,ln.prototype.getLoadMode=ln.prototype.vi,ln.prototype.resetConfiguration=ln.prototype.uj,ln.prototype.getBufferFullness=ln.prototype.Sg,ln.prototype.getNonDefaultConfiguration=ln.prototype.Wg,ln.prototype.getConfigurationForLowLatency=ln.prototype.mi,ln.prototype.getConfiguration=ln.prototype.getConfiguration,ln.prototype.configurationForLowLatency=ln.prototype.di,ln.prototype.configure=ln.prototype.configure,ln.prototype.releaseAllMutexes=ln.prototype.qj,ln.prototype.destroyAllPreloads=ln.prototype.rf,ln.prototype.preload=ln.prototype.preload,ln.prototype.detachAndSavePreload=ln.prototype.Ng,ln.prototype.unloadAndSavePreload=ln.prototype.Ij,ln.prototype.load=ln.prototype.load,ln.prototype.updateStartTime=ln.prototype.Mj,ln.prototype.unload=ln.prototype.kc,ln.prototype.detach=ln.prototype.detach,ln.prototype.attachCanvas=ln.prototype.Wh,ln.prototype.attach=ln.prototype.Lb,ln.probeSupport=function(t){var n,i,r,a,o;return t=void 0===t||t,R(function(s){switch(s.g){case 1:var c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X;if(n={},!t){s.s(2);break}return b(s,R(function(t){if(1==t.g){if(c="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(d={},p=(h=u(c)).next();!p.done;p=h.next())d[p.value]=null;return t.return(d)}for(f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),m={"com.widevine.alpha":g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":["150","2000","3000"]},S={videoCapabilities:v=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:y=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},k=[null,"cenc","cbcs","cbcs-1-9"],E=new Map,I=function(e,t){var n,i,r,a,o,s,l,c,d,h,p,g,m;return R(function(v){switch(v.g){case 1:return x(v,2),b(v,t.createMediaKeys(),5);case 5:n=v.h;case 4:T(v,3);break;case 2:return A(v),v.return();case 3:if(r=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),eq()&&(r=!1),a=t.getConfiguration().videoCapabilities,o=t.getConfiguration().audioCapabilities,s={persistentState:r,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},E.has(e)&&E.get(e)?s=E.get(e):E.set(e,s),(l=a[0].encryptionScheme)&&!s.encryptionSchemes.includes(l)&&s.encryptionSchemes.push(l),(c=a[0].robustness)&&!s.videoRobustnessLevels.includes(c)&&s.videoRobustnessLevels.push(c),(d=o[0].robustness)&&!s.audioRobustnessLevels.includes(d)&&s.audioRobustnessLevels.push(d),"getStatusForPolicy"in n){for(h=[],g=(p=u(f)).next(),m={};!g.done;m={td:void 0},g=p.next())m.td=g.value,s.minHdcpVersions.includes(m.td)||h.push(n.getStatusForPolicy({minHdcpVersion:m.td}).then(function(e){return function(t){"usable"!=t||s.minHdcpVersions.includes(e.td)||s.minHdcpVersions.push(e.td)}}(m)));return b(v,Promise.all(h),0)}v.s(0)}})},M=function(e,t,n,i){var r,a,o,s,l,c,d,h,p,f;return R(function(g){switch(g.g){case 1:for(x(g,2),o=(a=u((r=t4(S)).videoCapabilities)).next();!o.done;o=a.next())(s=o.value).encryptionScheme=t,s.robustness=n;for(c=(l=u(r.audioCapabilities)).next();!c.done;c=l.next())(d=c.value).encryptionScheme=t,d.robustness=i;return(h=t4(r)).persistentState="required",h.sessionTypes=["persistent-license"],p=[h,r],e2()?b(g,iw(5,navigator.requestMediaKeySystemAccess(e,p)),7):b(g,navigator.requestMediaKeySystemAccess(e,p),6);case 6:f=g.h,g.s(5);break;case 7:f=g.h;case 5:return b(g,I(e,f),8);case 8:T(g,0);break;case 2:A(g),w(g)}})},C=function(e,t,n,i){var r,a;return R(function(o){switch(o.g){case 1:return x(o,2),r={type:"media-source",video:{contentType:v[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:y[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:e,video:{encryptionScheme:t,robustness:n},audio:{encryptionScheme:t,robustness:i}}},e2()?b(o,iw(5,navigator.mediaCapabilities.decodingInfo(r)),7):b(o,navigator.mediaCapabilities.decodingInfo(r),6);case 6:a=o.h,o.s(5);break;case 7:a=o.h;case 5:return b(o,I(e,a.keySystemAccess),8);case 8:T(o,0);break;case 2:A(o),w(o)}})},P=(D=u(c)).next();!P.done;P=D.next())L=P.value,E.set(L,null);for(N=function(e){return!("org.w3.clearkey"===e&&eJ())},j=[],U=(O=u(k)).next();!U.done;U=O.next())for(_=U.value,F=(B=u(c)).next();!F.done;F=B.next())N(V=F.value)&&(j.push(M(V,_,"","")),j.push(C(V,_,"","")));for(G=(H=u(c)).next();!G.done;G=H.next())for(z=(q=u(m[K=G.value]||[])).next();!z.done;z=q.next())X=z.value,N(K)&&(j.push(M(K,null,X,"")),j.push(M(K,null,"",X)),j.push(C(K,null,X,"")),j.push(C(K,null,"",X)));return b(t,Promise.all(j),2)}return t.return(rI(E))}),3);case 3:n=s.h;case 2:return i=function(){var e={};if(eF())for(var t=u(ab.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=u(["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]=eF()?ab.has(n):eV(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",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(l(il)),t={};e=u(e);for(var n=e.next();!n.done;n=e.next()){ip(n=n.value)?t[n]=!0:t[n]=eF()?tP(n)||!!n0(n):eV(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}(),b(s,e9(),4);case 4:return a=s.h,o={manifest:i,media:r,drm:n,hardwareResolution:a},l9.forEach(function(e,t){o[t]=e()}),s.return(o)}})},ln.isBrowserSupported=function(){return e.Promise||X("A Promise implementation or polyfill is required"),!(!e.Promise||!e.Uint8Array||!Array.prototype.forEach||e5("Trident/"))&&(!!eF()||eV("application/x-mpegurl"))},ln.setAdManagerFactory=function(e){l7=e},ln.registerSupportPlugin=la,ln.prototype.destroy=ln.prototype.destroy;var l4=0,l5=1,l6=2,l8=3;ln.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},ln.version="v4.14.10";ea=new function(e){this.g=e,this.i=ei,this.h=er}(new et(Number("4"),Number("14")));var l9=new Map,l7=null;function ce(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function ct(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new Q,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function cn(){}function ci(e,t){var n=[];e=u(nt(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=na(i.value,"InLine"))&&(i=na(i,"Creatives"))){i=u(nt(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){var a=na(r=r.value,"Linear");
1if(a&&function(e,t,n){var i=0;null!=t&&(i=t);var r=null;if(n.attributes.skipoffset&&isNaN(r=t2(n.attributes.skipoffset))&&(r=null),n=na(n,"MediaFiles")){var a=nt(n,"MediaFile");for(n=a,(a=a.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(n=a),a=(n=u(n=n.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}))).next();!a.done;a=n.next())if(!(a=a.value).attributes.apiFramework){var o=ni(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}}}}(n,t,a),r=na(r,"NonLinearAds")){r=u(r=nt(r,"NonLinear"));for(var o=r.next();!o.done;o=r.next())e:{a=n;var s=o.value,l=na(s,"StaticResource");if(l)o=l.attributes.creativeType;else{if(!(l=na(s,"HTMLResource")))break e;o="text/html"}if(l=ni(l)){"text/html"===o&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var c=ns(s,"width",nf)||ns(s,"expandedWidth",nf),d=ns(s,"height",nf)||ns(s,"expandedHeight",nf);if(c||d){var h=null;(s=s.attributes.minSuggestedDuration)&&(h=t2(s)),s=0,null!=t&&(s=t),a.push({id:null,groupId:null,startTime:s,endTime:null,uri:l,mimeType:o,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:h,once:!0,pre:null==t,post:1/0==t,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:c||0,y:d||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function cr(t,n,i,r,a){var o=this;this.u=t,this.i=n,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=a,this.j=null,this.h=new Q,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.u,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.14.10"),this.g=null,this.B=r||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){!function(t,n){if(t.l(new rs("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),t.o.customPlayheadTracker){var i={currentTime:t.i.currentTime};t.g=n.getAdsManager(i,t.B),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.D(t.i,"timeupdate",function(){t.i.duration&&(i.currentTime=t.i.currentTime)}),t.h.D(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.B);t.l(new rs("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[],r=u(r);for(var a=r.next();!a.done;a=r.next())n.push({start:a.value,end:null});t.l(new rs("ad-cue-points-changed",(new Map).set("cuepoints",n)))}var o=t;function s(e,t){e=(new Map).set("originalEvent",e),o.l(new rs(t,e))}o.h.D(o.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){ca(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){cs(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.STARTED,function(e){cs(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){s(e,"ad-first-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.MIDPOINT,function(e){s(e,"ad-midpoint")}),o.h.D(o.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){s(e,"ad-third-quartile")}),o.h.D(o.g,google.ima.AdEvent.Type.COMPLETE,function(e){s(e,"ad-complete")}
1),o.h.D(o.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){cu(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){cu(o,e)}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPED,function(e){s(e,"ad-skipped")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){s(e,"ad-volume-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){s(e,"ad-muted")}),o.h.D(o.g,google.ima.AdEvent.Type.PAUSED,function(e){o.j&&(o.j.i=!0,s(e,"ad-paused"))}),o.h.D(o.g,google.ima.AdEvent.Type.RESUMED,function(e){o.j&&(o.j.i=!1,s(e,"ad-resumed"))}),o.h.D(o.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){o.j&&s(e,"ad-skip-state-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.CLICK,function(e){s(e,"ad-clicked")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){s(e,"ad-progress")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){s(e,"ad-buffering")}),o.h.D(o.g,google.ima.AdEvent.Type.IMPRESSION,function(e){s(e,"ad-impression")}),o.h.D(o.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){s(e,"ad-duration-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){s(e,"ad-closed")}),o.h.D(o.g,google.ima.AdEvent.Type.LOADED,function(e){s(e,"ad-loaded")}),o.h.D(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){s(e,"all-ads-completed")}),o.h.D(o.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){s(e,"ad-linear-changed")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_METADATA,function(e){s(e,"ad-metadata")}),o.h.D(o.g,google.ima.AdEvent.Type.LOG,function(e){s(e,"ad-recoverable-error")}),o.h.D(o.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){s(e,"ad-break-ready")}),o.h.D(o.g,google.ima.AdEvent.Type.INTERACTION,function(e){s(e,"ad-interaction")});try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,co(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.D(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,co(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in e?(t.A=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,co(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.A.observe(t.i)):t.h.D(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,co(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),t.F||t.o.skipPlayDetection?t.g.start():t.h.qa(t.i,"play",function(){t.F=!0,t.g.start()})}catch(e){cu(t,null)}}(o,t)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){ca(o,e)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.qa(this.i,"play",function(){o.F=!0})}function ca(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new rs("ad-error",t)),cu(e,null),e.l(new rs("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function co(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function cs(e,t){var n=t.getAd();n?(e.j=new ct(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new rs("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new rs("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):X("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function cu(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new rs("ad-content-resume-requested")),e.l(new rs("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function cl(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.A=n,this.o=i,this.m=r,this.u=a,this.B=t.overlay}function cc(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function cd(e,t,n,i){var r=this;this.T=null,this.A=e,this.H=t,this.g=n,this.F=null,this.B=!0,this.h=this.g,this.i=i,this.W=new Set,this.G=new Set,this.C=new Map,this.L=new Map,this.j=new ln,cw(this),this.I=new Q,this.l=new Q,this.K=!1,this.ea=this.m=this.u=this.o=null,this.fa=!1,this.O=-1,this.$=function(){if(!r.K&&r.o&&!r.H.Qa()){r.o=r.g.currentTime,r.u&&!r.u.pre&&!r.u.post&&r.o<r.u.startTime&&(r.u=null);var e=cg(r);e&&cm(r,e,1,1,Date.now())}}
1,this.Z=function(){if(!(r.K||r.o||r.H.Qa())){r.o=r.g.currentTime;var e=cg(r,!0);e&&cm(r,e,1,1,Date.now())}},this.P=new eB(this.$),this.M=new eB(function(){var e,t,n,i,a,o,s,l,c,d,h;return R(function(p){switch(p.g){case 1:if(!r.G.size||null==r.o){p.s(0);break}if((e=r.H.m)==l4||e==l5)return p.return();t=!1,n=Array.from(r.G),i=r.H.Ja(),o=(a=u(n)).next();case 3:if(o.done){p.s(5);break}if((s=o.value)==r.u){p.s(4);break}if(l=s.endTime||s.startTime,!(1<=i.start-l)){0<(c=s.startTime-r.o)&&10>=c&&(!r.C.has(s)&&cS(s)&&r.C.set(s,r.j.preload(s.uri,null,s.mimeType||void 0)),cT(r,s)),p.s(4);break}if(!r.C.has(s)){p.s(7);break}return b(p,r.C.get(s),8);case 8:(d=p.h)&&d.destroy(),r.C.delete(s);case 7:cA(r,s),h=JSON.stringify(s),r.W.has(h)&&r.W.delete(h),r.G.delete(s),ch(r),s.overlay||(t=!0);case 4:o=a.next(),p.s(3);break;case 5:t&&cb(r),w(p)}})})}function ch(e){e.fa&&!e.G.size&&(e.I.Ka(e.g,"playing",e.Z),e.I.Ka(e.g,"timeupdate",e.Z),e.I.Ka(e.g,"ended",e.$),-1!=e.O&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.M&&e.M.stop(),e.fa=!1)}function cp(e){if(e.A&&e.T&&!e.K){var t=e.T.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.F&&(e.F.parentElement&&e.A.removeChild(e.F),e.F=null)):(e.F||((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.F=t),e.h=e.F))}}function cf(e,t){var n,i,r,a,o,s,l,c;R(function(d){switch(d.g){case 1:n=!1,r=(i=u(t)).next();case 2:if(r.done){d.s(4);break}if(!(a=r.value).uri){X("Missing URL in interstitial",a),d.s(3);break}if(a.mimeType){d.s(5);break}return x(d,6),o=e.j.yb(),b(d,uI(a.uri,o,e.H.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=d.h,T(d,5);break;case 6:A(d);case 5:if(s=a.id||JSON.stringify(a),e.W.has(s)){d.s(3);break}a.loop&&!a.overlay&&X("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.W.add(s),e.G.add(a),l=!1,a.pre&&null==e.o?l=!0:0!=a.startTime||a.canJump?null!=e.o&&0<(c=a.startTime-e.o)&&10>=c&&(l=!0):l=!0,l&&(!e.C.has(a)&&cS(a)&&e.C.set(a,e.j.preload(a.uri,null,a.mimeType||void 0)),cT(e,a));case 3:r=i.next(),d.s(2);break;case 4:n&&cb(e),function(e){if(!e.fa&&e.G.size){if(e.I.D(e.g,"playing",e.Z),e.I.D(e.g,"timeupdate",e.Z),e.I.D(e.g,"ended",e.$),"requestVideoFrameCallback"in e.g&&!e4()){var t=e.g,n=function(){-1!=e.O&&(e.$(),-1!=e.O&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ua(.025);e.M&&e.M.ua(1),e.fa=!0}}(e),w(d)}})}function cg(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.G.size&&null!=e.o){var a=e.g.ended,o=Array.from(e.G).sort(function(e,t){return t.startTime-e.startTime}),s=o;for(s=(o=u(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}))).next();!s.done;s=o.next()){s=s.value;var l=!1;if(t)l=s.pre;else if(a)l=s.post;else if(!s.pre&&!s.post){var c=e.o-Math.round(1e3*s.startTime)/1e3;0<c&&(1>=c||!s.canJump)&&(l=null!=n||!e.u||!!e.u.pre||!!e.u.post||!(e.u.startTime>=s.startTime))}l&&(!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 cm(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N;a=void 0===a?0:a,e.u=t,cp(e),!e.h.parentElement&&e.A&&e.A.appendChild(e.h),1==i&&1==n&&(n=Array.from(e.G).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.G.delete(t),ch(e),t.overlay||cb(e)),t.mimeType&&(t.mimeType.startsWith("image/")||"text/html"===t.mimeType)?t.overlay?function(e,t,n,i,r){function a(){e.m&&(e.m.stop(),e.m=null),e.A.removeChild(u),cy(e,t),e.i(new rs("ad-stopped"));var a=cg(e,t.pre,i-r);a?(e.l.Ra(),cm(e,a,n,++i,Date.now(),r)):e.K=!1}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",cv(e,t),e.i(new rs("ad-started",(new Map).set("ad",new cc(t,n,i)))),"iframe"==s?u.src=t.uri:(u.src=t.uri,u.onerror=function(t){e.i(new rs("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.A.appendChild(u);var d=Date.now();e.m&&e.m.stop(),e.m=new eB(function(){t.playoutLimit&&(Date.now()-d)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(e.i(new rs("ad-complete")),a()):e.g.currentTime<t.startTime&&(e.i(new rs("ad-skipped")),a())}),t.playoutLimit&&!t.endTime?e.m.da(t.playoutLimit):t.endTime&&e.m.ua(.025),e.l.D(e.g,"seeked",function(){var n=e.g.currentTime;(n<t.startTime||t.endTime&&n>t.endTime)&&(e.m&&e.m.stop(),e.i(new rs("ad-skipped")),a())})}(e,t,n,i,a):X("Unsupported interstitial",t):e.B&&t.overlay?X("Unsupported interstitial",t):(o=e,s=t,u=n,l=i,c=r,d=a,R(function(e){switch(e.g){case 1:if(h=Date.now(),o.K=!0,!o.B||1!=l){e.s(2);break}return o.i(new rs("ad-content-pause-requested",(new Map).set("saveLivePosition",!0))),p=new re,f=function(e){return R(function(t){if(1==t.g)return"detach"!=e.state?t.s(0):e4()?b(t,new Promise(function(e){return new eB(e).da(.1)}),3):t.s(3);p.resolve(),o.l.Ka(o.H,"onstatechange",f),w(t)})},o.l.D(o.H,"onstatechange",f),b(e,p,2);case 2:return cv(o,s),o.B||(o.h.style.display="",s.overlay?(o.h.loop=s.loop,g=s.overlay.viewport,m=s.overlay.topLeft,v=s.overlay.size,o.h.style.height=v.y/g.y*100+"%",o.h.style.left=m.x/g.x*100+"%",o.h.style.top=m.y/g.y*100+"%",o.h.style.width=v.x/g.x*100+"%"):(o.g.pause(),null!=s.resumeOffset&&0!=s.resumeOffset&&(o.g.currentTime+=s.resumeOffset),o.h.loop=!1,o.h.style.height="100%",o.h.style.left="0",o.h.style.top="0",o.h.style.width="100%")),y=!1,S=function(){if(!o.B&&!s.overlay&&null==s.resumeOffset)if(s.timelineRange&&s.endTime&&1/0!=s.endTime)o.g.currentTime!=s.endTime&&(o.g.currentTime=s.endTime);else{var e=Date.now();o.g.currentTime+=(e-c)/1e3,c=e}},k=function(e){var t,n;return R(function(i){if(1==i.g){if(S(),t=cg(o,s.pre,l-d),e&&s.groupId)for(;t&&t.groupId==s.groupId;)l++,t=cg(o,s.pre,l-d);return(o.m&&(!s.groupId||t&&t.groupId!=s.groupId)&&(o.m.stop(),o.m=null),cy(o,s),t&&!t.overlay)?i.s(2):(s.post&&(o.o=null,o.u=null),o.B?b(i,o.j.detach(),4):b(i,o.j.kc(),4))}2!=i.g&&(o.B&&(null==(n=s.resumeOffset)&&(n=s.timelineRange&&s.endTime&&1/0!=s.endTime?s.endTime-(o.o||0):(Date.now()-c)/1e3),o.i(new rs("ad-content-resume-requested",(new Map).set("offset",n)))),o.i(new rs("ad-stopped")),o.l.Ra(),o.K=!1,o.B?cb(o):(o.h.style.display="none",S(),o.g.ended||o.g.play())),cp(o),t&&(o.i(new rs("ad-stopped")),o.l.Ra(),cm(o,t,u,++l,c,d)),w(i)})},E=function(e){return R(function(t){return y?t.return():(y=!0,o.i(new rs("ad-error",(new Map).set("originalEvent",e))),b(t,k(!1),0))})},I=function(){return R(function(e){if(1==e.g)return y?e.return():(y=!0,b(e,k(!1),2));o.i(new rs("ad-complete")),w(e)})},o.ea=function(){return R(function(e){return y?e.return():(y=!0,o.i(new rs("ad-skipped")),b(e,k(!0),0))})},M=new cl(o.h,s,o.ea,u,l,!o.B),o.B||(M.setMuted(o.g.muted),M.setVolume(o.g.volume)),o.i(new rs("ad-started",(new Map).set("ad",M))),(C=M.canSkipNow())&&o.i(new rs("ad-skip-state-changed")),o.l.qa(o.j,"error",E
1),o.l.D(o.h,"timeupdate",function(){if(o.h.duration){var e=M.canSkipNow();C!=e&&0<M.getRemainingTime()&&0<M.getDuration()&&o.i(new rs("ad-skip-state-changed")),C=e}}),o.l.qa(o.j,"firstquartile",function(){S(),o.i(new rs("ad-first-quartile"))}),o.l.qa(o.j,"midpoint",function(){S(),o.i(new rs("ad-midpoint"))}),o.l.qa(o.j,"thirdquartile",function(){S(),o.i(new rs("ad-third-quartile"))}),o.l.qa(o.j,"complete",I),o.l.D(o.h,"play",function(){o.i(new rs("ad-resumed"))}),o.l.D(o.h,"pause",function(){var e=o.j.getConfiguration();o.h.currentTime>=e.playRangeEnd?I():o.i(new rs("ad-paused"))}),o.l.D(o.h,"volumechange",function(){o.h.muted?o.i(new rs("ad-muted")):o.i(new rs("ad-volume-changed"))}),x(e,4),cw(o),s.startTime&&s.endTime&&1/0!=s.endTime&&s.startTime!=s.endTime&&0<(D=s.endTime-s.startTime)&&o.j.configure("playRangeEnd",D),s.playoutLimit&&!o.m&&(o.m=new eB(function(){o.ea()}).da(s.playoutLimit),o.j.configure("playRangeEnd",s.playoutLimit)),b(e,o.j.Lb(o.h),6);case 6:return o.C.has(s)?b(e,o.C.get(s),10):b(e,o.j.load(s.uri,null,s.mimeType||void 0),8);case 10:return P=e.h,o.C.delete(s),P?b(e,o.j.load(P),8):b(e,o.j.load(s.uri,null,s.mimeType||void 0),8);case 8:o.h.play(),L=(Date.now()-h)/1e3,o.i(new rs("ads-loaded",(new Map).set("loadTime",L))),o.B&&o.g.play(),s.overlay&&(o.l.D(o.g,"seeking",function(){var e=o.g.currentTime-s.startTime;.1<Math.abs(e-o.h.currentTime)&&(o.h.currentTime=e)}),o.l.D(o.g,"seeked",function(){var e=o.g.currentTime;(e<s.startTime||s.endTime&&e>s.endTime)&&o.ea()})),T(e,0);break;case 4:if(N=A(e),!o.K)return e.return();E(N),w(e)}}))}function cv(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.A&&(e.A.style.pointerEvents="none",t.background&&(e.A.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function cy(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.A&&(e.A.style.pointerEvents="",!t||t.background)&&(e.A.style.background=""),e.F&&(e.F.style.background="")}function cb(e){for(var t=[],n=u(e.G),i=n.next(),r={};!i.done;r={$b:void 0},i=n.next())(i=i.value).overlay||(r.$b={start:i.startTime,end:null},i.pre?(r.$b.start=0,r.$b.end=null):i.post?(r.$b.start=-1,r.$b.end=null):i.timelineRange&&(r.$b.end=i.endTime),t.find(function(e){return function(t){return e.$b.start==t.start&&e.$b.end==t.end}}(r))||t.push(r.$b));e.i(new rs("ad-cue-points-changed",(new Map).set("cuepoints",t)))}function cw(e){e.j.configure(e.H.Wg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),rg(e.H.yb(),e.j.yb())}function cx(e,t,n){var i,r;return R(function(a){return 1==a.g?(i=rm([t],i7()),b(a,e.H.yb().request(7,i,n).promise,2)):(r=a.h,a.return(r.data))})}function cS(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function cT(e,t){if(!(e.L.has(t)||e.T&&!e.T.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.L.set(t,i)}}function cA(e,t){if(e.L.has(t)){var n=e.L.get(t);n=u(n);for(var i=n.next();!i.done;i=n.next())(i=i.value).parentNode.removeChild(i);e.L.delete(t)}}function ck(e,t,n,i,r){this.h=e,this.j=t2(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function cE(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.o=new Q}function cI(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function cM(e){var t=e.h.currentTime;
1if(0!=t&&null==e.A){for(var n,i,r=u(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=u(a.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.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function cC(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.C,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"),cP(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),cP(e,"midpoint")):t>=a&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),cP(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&cP(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&cD(e)}if(!e.g||!e.g.isLinear()){e:for(r=(i=u(e.j)).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.M.includes(o.adId)){if(e.h.ended)continue;e.h.currentTime=s;break e}cD(e),e.L=r,e.g=new ck(o,a+1,r.ads.length,!0,e.h),e.C=o,0===a&&cP(e,"breakStart"),cR(e);break}}if(!e.g){for(r=(i=u(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 l=e.F.get(cI(o.nonLinearAdList[0]));if(s<=t&&l&&l.length){cD(e),s=e,l=u(l);for(var c=l.next();!c.done;c=l.next())if((c=c.value).data.source.length){var d=document.createElement("img");d.src=c.data.source[0].url,d.style.top=(c.placeholder.top||0)+"%",d.style.height=100-(c.placeholder.top||0)+"%",d.style.left=(c.placeholder.left||0)+"%",d.style.maxWidth=100-(c.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.B.appendChild(d)}e.L=r,e.g=new ck(o,a+1,r.ads.length,!1,e.h),e.C=o,0===a&&cP(e,"breakStart"),cR(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function cD(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;(void 0===t?0:t)?cP(e,"skip"):cP(e,"complete"),t=u(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ka(n.target,n.type,n.listener);e.m=[],e.u=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&cP(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function cR(e){var t=!1;e.h.paused?t=!0:(cP(e,"impression"),cP(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&cP(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||cP(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(cP(e,"impression"),cP(e,"start"),t=!1):cP(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){cP(e,"pause")}});for(var n=u(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function cP(e,t){var n=e.C.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n){var i={type:10};n=u(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=rm([r],i7())).method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new rs("ad-impression"));break;case"start":e.i(new rs("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new rs("ad-muted"));break;case"unmute":e.i(new rs("ad-volume-changed"));break;case"resume":e.i(new rs("ad-resumed"));break;case"pause":e.i(new rs("ad-paused"));break;case"firstQuartile":e.i(new rs("ad-first-quartile"));break;case"midpoint":e.i(new rs("ad-midpoint"));break;case"thirdQuartile":e.i(new rs("ad-third-quartile"));break;case"complete":e.i(new rs("ad-complete")),e.i(new rs("ad-stopped"));break;case"skip":e.i(new rs("ad-skipped")),e.i(new rs("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new rs("ad-skip-state-changed"))}}function cL(e,t){this.g=e,this.i=null,this.h=t}function cN(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.A=this.m=this.o=null,this.B="",this.C=[],this.h=new Q,(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 rs("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t,n;t=r,n=e,t.i(new rs("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.F))),n=n.getStreamData().url,t.j.resolve(n),t.j=null,t.G||t.h.D(t.l,"seeked",function(){var e=t.l.currentTime;if(0!=e){t.g.streamTimeForContentTime(e);var n=t.g.previousCuePointForStreamTime(e);n&&!n.played&&(t.o=e,t.l.currentTime=n.start)}})}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){r.m=new cL(e=e.getAd(),r.l),r.A&&(r.m.i=r.A),r.i(new rs("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var e=r.l.currentTime;r.o&&r.o>e&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.A=e.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new rs("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new rs("ad-mi
1dpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new rs("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new rs("ad-complete")),r.i(new rs("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new rs("ad-skipped")),r.i(new rs("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=u(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.C=e,r.i(new rs("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function cj(){rc.call(this),this.h=this.i=this.j=this.g=null,this.m=new ce,this.o=navigator.language,this.l=null}function cO(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 cU(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof rs){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=u(Object.getOwnPropertyNames(t))).next();!e.done;e=n.next())i.add(e.value);for(n={},e=(i=u(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=u(oe(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 c_(e){return JSON.parse(e,function(e,t){if("NaN"==t)var n,i=NaN;else if("-Infinity"==t)i=-1/0;else if("Infinity"==t)i=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__){i={length:(n=t).length,start:function(e){return n.start[e]},end:function(e){return n.end[e]}}}else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)i=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(i in t=Error((e=t.contents).message),e)t[i]=e[i];i=t}else i=t;return i})}(c=ct.prototype).needsSkipUI=function(){return!1},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!0},c.isUsingAnotherMediaElement=function(){return!0},c.getDuration=function(){return this.g.getDuration()},c.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},c.getRemainingTime=function(){return this.h.getRemainingTime()},c.isPaused=function(){return this.i},c.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},c.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},c.canSkipNow=function(){return this.h.getAdSkippableState()},c.skip=function(){return this.h.skip()},c.pause=function(){return this.h.pause()},c.play=function(){return this.h.resume()},c.getVolume=function(){return this.h.getVolume()},c.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},c.isMuted=function(){return 0==this.h.getVolume()},c.isLinear=function(){return this.g.isLinear()},c.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},c.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},c.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},c.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},c.getTitle=function(){return this.g.getTitle()},c.getDescription=function(){return this.g.getDescription()},c.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},c.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},c.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},c.getAdId=function(){return this.g.getAdId()},c.getCreativeAdId=function(){return this.g.getCreativeAdId()},c.getAdvertiserName=function(){return this.g.getAdvertiserName()},c.getMediaUrl=function(){return this.g.getMediaUrl()},c.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},c.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},c.release=function(){this.h=this.g=null},B("shaka.ads.ClientSideAd",ct),ct.prototype.release=ct.prototype.release,ct.prototype.getPodIndex=ct.prototype.getPodIndex,ct.prototype.getTimeOffset=ct.prototype.getTimeOffset,ct.prototype.getMediaUrl=ct.prototype.getMediaUrl,ct.prototype.getAdvertiserName=ct.prototype.getAdvertiserName,ct.prototype.getCreativeAdId=ct.prototype.getCreativeAdId,ct.prototype.getAdId=ct.prototype.getAdId,ct.prototype.getVastMediaWidth=ct.prototype.getVastMediaWidth,ct.prototype.getVastMediaHeight=ct.prototype.getVastMediaHeight,ct.prototype.getVastMediaBitrate=ct.prototype.getVastMediaBitrate,ct.prototype.getDescription=ct.prototype.getDescription,ct.prototype.getTitle=ct.prototype.getTitle,ct.prototype.getPositionInSequence=ct.prototype.getPositionInSequence,ct.prototype.getSequenceLength=ct.prototype.getSequenceLength,
1ct.prototype.setMuted=ct.prototype.setMuted,ct.prototype.resize=ct.prototype.resize,ct.prototype.isLinear=ct.prototype.isLinear,ct.prototype.isMuted=ct.prototype.isMuted,ct.prototype.setVolume=ct.prototype.setVolume,ct.prototype.getVolume=ct.prototype.getVolume,ct.prototype.play=ct.prototype.play,ct.prototype.pause=ct.prototype.pause,ct.prototype.skip=ct.prototype.skip,ct.prototype.canSkipNow=ct.prototype.canSkipNow,ct.prototype.getTimeUntilSkippable=ct.prototype.getTimeUntilSkippable,ct.prototype.isSkippable=ct.prototype.isSkippable,ct.prototype.isPaused=ct.prototype.isPaused,ct.prototype.getRemainingTime=ct.prototype.getRemainingTime,ct.prototype.getMinSuggestedDuration=ct.prototype.getMinSuggestedDuration,ct.prototype.getDuration=ct.prototype.getDuration,ct.prototype.isUsingAnotherMediaElement=ct.prototype.isUsingAnotherMediaElement,ct.prototype.hasCustomClick=ct.prototype.hasCustomClick,ct.prototype.isClientRendering=ct.prototype.isClientRendering,ct.prototype.needsSkipUI=ct.prototype.needsSkipUI,B("shaka.ads.Utils",cn),cn.ADS_LOADED="ads-loaded",cn.AD_STARTED="ad-started",cn.AD_FIRST_QUARTILE="ad-first-quartile",cn.AD_MIDPOINT="ad-midpoint",cn.AD_THIRD_QUARTILE="ad-third-quartile",cn.AD_COMPLETE="ad-complete",cn.AD_STOPPED="ad-stopped",cn.AD_SKIPPED="ad-skipped",cn.AD_VOLUME_CHANGED="ad-volume-changed",cn.AD_MUTED="ad-muted",cn.AD_PAUSED="ad-paused",cn.AD_RESUMED="ad-resumed",cn.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",cn.CUEPOINTS_CHANGED="ad-cue-points-changed",cn.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",cn.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",cn.AD_CLICKED="ad-clicked",cn.AD_PROGRESS="ad-progress",cn.AD_BUFFERING="ad-buffering",cn.AD_IMPRESSION="ad-impression",cn.AD_DURATION_CHANGED="ad-duration-changed",cn.AD_CLOSED="ad-closed",cn.AD_LOADED="ad-loaded",cn.ALL_ADS_COMPLETED="all-ads-completed",cn.AD_LINEAR_CHANGED="ad-linear-changed",cn.AD_METADATA="ad-metadata",cn.AD_RECOVERABLE_ERROR="ad-recoverable-error",cn.AD_ERROR="ad-error",cn.AD_BREAK_READY="ad-break-ready",cn.AD_INTERACTION="ad-interaction",cn.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",cn.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",cn.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",cr.prototype.configure=function(e){this.o=e},cr.prototype.stop=function(){this.g&&this.g.stop(),this.u&&oi(this.u)},cr.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()},(c=cl.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return this.u},c.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},c.isPaused=function(){return this.g.paused},c.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},c.getTimeUntilSkippable=function(){return this.isSkippable()?Math.max(this.getRemainingTime()+this.j-this.getDuration(),0):Math.max(this.getRemainingTime(),0)},c.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()},c.skip=function(){this.canSkipNow()&&this.A()},c.pause=function(){return this.g.pause()},c.play=function(){return this.g.play()},c.getVolume=function(){return this.g.volume},c.setVolume=function(e){this.g.volume=e},c.isMuted=function(){return this.g.muted},c.isLinear=function(){return null==this.B},c.resize=function(){},c.setMuted=function(e){this.g.muted=e},c.getSequenceLength=function(){return this.o},c.getPositionInSequence=function(){return this.m},c.getTitle=function(){return""},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.i.id||""},c.getCreativeAdId=function(){return""},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return this.i.uri},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){this.g=null},B("shaka.ads.InterstitialAd",cl),cl.prototype.release=cl.prototype.release,cl.prototype.getPodIndex=cl.prototype.getPodIndex,cl.prototype.getTimeOffset=cl.prototype.getTimeOffset,cl.prototype.getMediaUrl=cl.prototype.getMediaUrl,cl.prototype.getAdvertiserName=cl.prototype.getAdvertiserName,cl.prototype.getCreativeAdId=cl.prototype.getCreativeAdId,cl.prototype.getAdId=cl.prototype.getAdId,cl.prototype.getVastMediaWidth=cl.prototype.getVastMediaWidth,cl.prototype.getVastMediaHeight=cl.prototype.getVastMediaHeight,cl.prototype.getVastMediaBitrate=cl.prototype.getVastMediaBitrate,cl.prototype.getDescription=cl.prototype.getDescription,cl.prototype.getTitle=cl.prototype.getTitle,cl.prototype.getPositionInSequence=cl.prototype.getPositionInSequence,cl.prototype.getSequenceLength=cl.prototype.getSequenceLength,
1cl.prototype.setMuted=cl.prototype.setMuted,cl.prototype.resize=cl.prototype.resize,cl.prototype.isLinear=cl.prototype.isLinear,cl.prototype.isMuted=cl.prototype.isMuted,cl.prototype.setVolume=cl.prototype.setVolume,cl.prototype.getVolume=cl.prototype.getVolume,cl.prototype.play=cl.prototype.play,cl.prototype.pause=cl.prototype.pause,cl.prototype.skip=cl.prototype.skip,cl.prototype.canSkipNow=cl.prototype.canSkipNow,cl.prototype.getTimeUntilSkippable=cl.prototype.getTimeUntilSkippable,cl.prototype.isSkippable=cl.prototype.isSkippable,cl.prototype.isPaused=cl.prototype.isPaused,cl.prototype.getRemainingTime=cl.prototype.getRemainingTime,cl.prototype.getMinSuggestedDuration=cl.prototype.getMinSuggestedDuration,cl.prototype.getDuration=cl.prototype.getDuration,cl.prototype.isUsingAnotherMediaElement=cl.prototype.isUsingAnotherMediaElement,cl.prototype.hasCustomClick=cl.prototype.hasCustomClick,cl.prototype.isClientRendering=cl.prototype.isClientRendering,cl.prototype.needsSkipUI=cl.prototype.needsSkipUI,(c=cc.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!0},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return -1},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return -1},c.isPaused=function(){return!1},c.isSkippable=function(){return!1},c.getTimeUntilSkippable=function(){return 0},c.canSkipNow=function(){return!1},c.skip=function(){},c.pause=function(){},c.play=function(){},c.getVolume=function(){return 1},c.setVolume=function(){},c.isMuted=function(){return!1},c.isLinear=function(){return this.i},c.resize=function(){},c.setMuted=function(){},c.getSequenceLength=function(){return this.j},c.getPositionInSequence=function(){return this.h},c.getTitle=function(){return""},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.g.id||""},c.getCreativeAdId=function(){return""},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return this.g.uri},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){},B("shaka.ads.InterstitialStaticAd",cc),cc.prototype.release=cc.prototype.release,cc.prototype.getPodIndex=cc.prototype.getPodIndex,cc.prototype.getTimeOffset=cc.prototype.getTimeOffset,cc.prototype.getMediaUrl=cc.prototype.getMediaUrl,cc.prototype.getAdvertiserName=cc.prototype.getAdvertiserName,cc.prototype.getCreativeAdId=cc.prototype.getCreativeAdId,cc.prototype.getAdId=cc.prototype.getAdId,cc.prototype.getVastMediaWidth=cc.prototype.getVastMediaWidth,cc.prototype.getVastMediaHeight=cc.prototype.getVastMediaHeight,cc.prototype.getVastMediaBitrate=cc.prototype.getVastMediaBitrate,cc.prototype.getDescription=cc.prototype.getDescription,cc.prototype.getTitle=cc.prototype.getTitle,cc.prototype.getPositionInSequence=cc.prototype.getPositionInSequence,cc.prototype.getSequenceLength=cc.prototype.getSequenceLength,cc.prototype.setMuted=cc.prototype.setMuted,cc.prototype.resize=cc.prototype.resize,cc.prototype.isLinear=cc.prototype.isLinear,cc.prototype.isMuted=cc.prototype.isMuted,cc.prototype.setVolume=cc.prototype.setVolume,cc.prototype.getVolume=cc.prototype.getVolume,cc.prototype.play=cc.prototype.play,cc.prototype.pause=cc.prototype.pause,cc.prototype.skip=cc.prototype.skip,cc.prototype.canSkipNow=cc.prototype.canSkipNow,cc.prototype.getTimeUntilSkippable=cc.prototype.getTimeUntilSkippable,cc.prototype.isSkippable=cc.prototype.isSkippable,cc.prototype.isPaused=cc.prototype.isPaused,cc.prototype.getRemainingTime=cc.prototype.getRemainingTime,cc.prototype.getMinSuggestedDuration=cc.prototype.getMinSuggestedDuration,cc.prototype.getDuration=cc.prototype.getDuration,cc.prototype.isUsingAnotherMediaElement=cc.prototype.isUsingAnotherMediaElement,cc.prototype.hasCustomClick=cc.prototype.hasCustomClick,cc.prototype.isClientRendering=cc.prototype.isClientRendering,cc.prototype.needsSkipUI=cc.prototype.needsSkipUI,(c=cd.prototype).configure=function(e){this.T=e,cp(this)},c.stop=function(){if(this.l&&this.l.Ra(),this.W.clear(),this.G.clear(),this.j.rf(),this.C.size){var e=Array.from(this.C.values());e=u(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(e){e&&e.destroy()})}if(this.C.clear(),this.L.size)for(t=(e=u(e=Array.from(this.L.keys()))).next();!t.done;t=e.next())cA(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.u=this.o=null,this.B=!0,this.h=this.g,this.F=null,cy(this),ch(this),this.A&&oi(this.A),this.m&&(this.m.stop(),this.m=null)},c.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.M&&(this.M.stop(),this.M=null),this.j.destroy()},c.Kf=function(){return this.j},c.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,c=this;return R(function(d){switch(d.g){case 1:return b(d,cx(c,e,t={type:12}),2);case 2:if(!(n=t6(d.h,"VAST,vmap:VMAP")))throw new eC(2,10,10007);if(i=[],"VAST"==n.tagName){i=ci(n,c.o),d.s(3);break}if("vmap:VMAP"!=n.tagName){d.s(3);break}for(var h=[],p=u(nt(n,"vmap:AdBreak")),f=p.next();!f.done;f=p.next()){var g=f.value,m=g.attributes.timeOffset;m&&(f=null,f="start"==m?0:"end"==m?1/0:t2(m),(g=na(g,"vmap:AdSource"))&&(g=na(g,"vmap:AdTagURI"))&&(g=nn(g))&&h.push({time:f,uri:g}))}a=(r=u(h)).next();case 5:if(a.done){d.s(3);break}return b(d,cx(c,(o=a.value).uri,t),8);case 8:if(!(s=t6(d.h,"VAST")))throw new eC(2,10,10007);i.push.apply(i,l(ci(s,o.time))),a=r.next(),d.s(5);break;case 3:cf(c,i),w(d)}})},(c=ck.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!1},c.hasCustomClick=function(){return!1},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return this.h.durationInSeconds},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},c.isPaused=function(){return this.g.paused},c.isSkippable=function(){return"number"==typeof this.j},c.getTimeUntilSkippable=function(){return"number"!=typeof this.j?this.getRemainingTime():Math.max(this.getRemainingTime()+this.j-this.getDuration(),0)},c.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},c.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},c.pause=function(){return this.g.pause()},c.play=function(){return this.g.play()},c.getVolume=function(){return this.g.volume},c.setVolume=function(e){this.g.volume=e},c.isMuted=function(){return this.g.muted},c.isLinear=function(){return this.o},c.resize=function(){},c.setMuted=function(e){this.g.muted=e},c.getSequenceLength=function(){return this.l?this.l:1},c.getPositionInSequence=function(){return this.i?this.i:1},c.getTitle=function(){return this.h.adTitle},c.getDescription=function(){return""},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return 0},c.getVastMediaWidth=function(){return 0},c.getAdId=function(){return this.h.adId},c.getCreativeAdId=function(){return this.h.creativeId},c.getAdvertiserName=function(){return""},c.getMediaUrl=function(){return null},c.getTimeOffset=function(){return 0},c.getPodIndex=function(){return 0},c.release=function(){this.l=this.i=this.g=this.h=null},B("shaka.ads.MediaTailorAd",ck),ck.prototype.release=ck.prototype.release,ck.prototype.getPodIndex=ck.prototype.getPodIndex,ck.prototype.getTimeOffset=ck.prototype.getTimeOffset,ck.prototype.getMediaUrl=ck.prototype.getMediaUrl,ck.prototype.getAdvertiserName=ck.prototype.getAdvertiserName,ck.prototype.getCreativeAdId=ck.prototype.getCreativeAdId,ck.prototype.getAdId=ck.prototype.getAdId,ck.prototype.getVastMediaWidth=ck.prototype.getVastMediaWidth,ck.prototype.getVastMediaHeight=ck.prototype.getVastMediaHeight,ck.prototype.getVastMediaBitrate=ck.prototype.getVastMediaBitrate,ck.prototype.getDescription=ck.prototype.getDescription,ck.prototype.getTitle=ck.prototype.getTitle,ck.prototype.getPositionInSequence=ck.prototype.getPositionInSequence,ck.prototype.getSequenceLength=ck.prototype.getSequenceLength,
1ck.prototype.setMuted=ck.prototype.setMuted,ck.prototype.resize=ck.prototype.resize,ck.prototype.isLinear=ck.prototype.isLinear,ck.prototype.isMuted=ck.prototype.isMuted,ck.prototype.setVolume=ck.prototype.setVolume,ck.prototype.getVolume=ck.prototype.getVolume,ck.prototype.play=ck.prototype.play,ck.prototype.pause=ck.prototype.pause,ck.prototype.skip=ck.prototype.skip,ck.prototype.canSkipNow=ck.prototype.canSkipNow,ck.prototype.getTimeUntilSkippable=ck.prototype.getTimeUntilSkippable,ck.prototype.isSkippable=ck.prototype.isSkippable,ck.prototype.isPaused=ck.prototype.isPaused,ck.prototype.getRemainingTime=ck.prototype.getRemainingTime,ck.prototype.getMinSuggestedDuration=ck.prototype.getMinSuggestedDuration,ck.prototype.getDuration=ck.prototype.getDuration,ck.prototype.isUsingAnotherMediaElement=ck.prototype.isUsingAnotherMediaElement,ck.prototype.hasCustomClick=ck.prototype.hasCustomClick,ck.prototype.isClientRendering=ck.prototype.isClientRendering,ck.prototype.needsSkipUI=ck.prototype.needsSkipUI,cE.prototype.stop=function(){for(var e=u(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ka(t.target,t.type,t.listener);cD(this),this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},cE.prototype.release=function(){this.stop(),this.o&&this.o.release()},cE.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,l,c,d,h,p,f,g,m;this.I=e,""!=this.G&&(t=this,n=this.G,i=this.O,R(function(e){if(1==e.g)return r={type:8},a=rm([n],i7()),o=t.K.request(7,a,r),x(e,2),b(e,o.promise,4);if(2!=e.g){var v;if(s=e.h,l=[],0<(c=JSON.parse(ti(s.data))).avails.length){if(JSON.stringify(t.j)!=JSON.stringify(c.avails)){for(t.j=c.avails,h=(d=u(t.j)).next();!h.done;h=d.next())for(f=(p=u(h.value.nonLinearAdsList)).next();!f.done;f=p.next())for(m=(g=u(f.value.nonLinearAdList)).next();!m.done;m=g.next())!function(e,t){var n,i,r,a,o;R(function(s){return 1==s.g?t.staticResource?(n=cI(t),e.F.get(n))?s.return():(i={type:9},r=rm([t.staticResource],i7()),a=e.K.request(7,r,i),x(s,2),e.F.set(n,[]),b(s,a.promise,4)):s.return():2!=s.g?(o=JSON.parse(ti(s.h.data)).apps,e.F.set(n,o),T(s,0)):void(A(s),e.F.delete(n),w(s))})}(t,m.value);l=t.getCuePoints(),t.i(new rs("ad-cue-points-changed",(new Map).set("cuepoints",l)))}}else t.j.length&&t.i(new rs("ad-cue-points-changed",(new Map).set("cuepoints",l))),cD(t),t.j=[];return i&&(t.I||0<l.length)&&(cC(v=t),v.I||(cM(v),v.o.D(v.h,"seeked",function(){cM(v)}),v.o.D(v.h,"ended",function(){cD(v)})),v.o.D(v.h,"timeupdate",function(){cC(v)})),T(e,0)}A(e),w(e)}),this.O=!1)},cE.prototype.getCuePoints=function(){for(var e=[],t=u(this.j),n=t.next();!n.done;n=t.next()){n=u(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e},(c=cL.prototype).needsSkipUI=function(){return!0},c.isClientRendering=function(){return!1},c.hasCustomClick=function(){return!0},c.isUsingAnotherMediaElement=function(){return!1},c.getDuration=function(){return this.i?this.i.duration:-1},c.getMinSuggestedDuration=function(){return this.getDuration()},c.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},c.isPaused=function(){return this.h.paused},c.isSkippable=function(){return this.g.isSkippable()},c.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},c.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},c.skip=function(){this.h.currentTime+=this.getRemainingTime()},c.pause=function(){return this.h.pause()},c.play=function(){return this.h.play()},c.getVolume=function(){return this.h.volume},c.setVolume=function(e){this.h.volume=e},c.isMuted=function(){return this.h.muted},c.isLinear=function(){return!0},c.resize=function(){},c.setMuted=function(e){this.h.muted=e},c.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},c.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},c.getTitle=function(){return this.g.getTitle()},c.getDescription=function(){return this.g.getDescription()},c.getVastMediaBitrate=function(){return 0},c.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},c.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},c.getAdId=function(){return this.g.getAdId()},c.getCreativeAdId=function(){return this.g.getCreativeAdId()},c.getAdvertiserName=function(){return this.g.getAdvertiserName()},c.getMediaUrl=function(){return null},c.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},c.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},c.release=function(){this.h=this.i=this.g=null},B("shaka.ads.ServerSideAd",cL),cL.prototype.release=cL.prototype.release,cL.prototype.getPodIndex=cL.prototype.getPodIndex,cL.prototype.getTimeOffset=cL.prototype.getTimeOffset,cL.prototype.getMediaUrl=cL.prototype.getMediaUrl,cL.prototype.getAdvertiserName=cL.prototype.getAdvertiserName,cL.prototype.getCreativeAdId=cL.prototype.getCreativeAdId,cL.prototype.getAdId=cL.prototype.getAdId,cL.prototype.getVastMediaWidth=cL.prototype.getVastMediaWidth,cL.prototype.getVastMediaHeight=cL.prototype.getVastMediaHeight,cL.prototype.getVastMediaBitrate=cL.prototype.getVastMediaBitrate,cL.prototype.getDescription=cL.prototype.getDescription,cL.prototype.getTitle=cL.prototype.getTitle,cL.prototype.getPositionInSequence=cL.prototype.getPositionInSequence,cL.prototype.getSequenceLength=cL.prototype.getSequenceLength,
1cL.prototype.setMuted=cL.prototype.setMuted,cL.prototype.resize=cL.prototype.resize,cL.prototype.isLinear=cL.prototype.isLinear,cL.prototype.isMuted=cL.prototype.isMuted,cL.prototype.setVolume=cL.prototype.setVolume,cL.prototype.getVolume=cL.prototype.getVolume,cL.prototype.play=cL.prototype.play,cL.prototype.pause=cL.prototype.pause,cL.prototype.skip=cL.prototype.skip,cL.prototype.canSkipNow=cL.prototype.canSkipNow,cL.prototype.getTimeUntilSkippable=cL.prototype.getTimeUntilSkippable,cL.prototype.isSkippable=cL.prototype.isSkippable,cL.prototype.isPaused=cL.prototype.isPaused,cL.prototype.getRemainingTime=cL.prototype.getRemainingTime,cL.prototype.getMinSuggestedDuration=cL.prototype.getMinSuggestedDuration,cL.prototype.getDuration=cL.prototype.getDuration,cL.prototype.isUsingAnotherMediaElement=cL.prototype.isUsingAnotherMediaElement,cL.prototype.hasCustomClick=cL.prototype.hasCustomClick,cL.prototype.isClientRendering=cL.prototype.isClientRendering,cL.prototype.needsSkipUI=cL.prototype.needsSkipUI,(c=cN.prototype).configure=function(){},c.stop=function(){this.B="",this.o=null,this.C=[]},c.release=function(){this.stop(),this.h&&this.h.release()},c.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},c.getCuePoints=function(){return this.C},g(cj,rc),(c=cj.prototype).setLocale=function(e){this.o=e},c.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)},c.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new cd(e,t,n,function(e){return cO(i,e)}),this.g.configure(this.l)},c.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new eC(2,10,1e4);this.j&&this.j.release(),this.j=new cr(t,n,this.o,i,function(e){return cO(r,e)}),this.j.configure(this.l)},c.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),rc.prototype.release.call(this)},c.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 rs("ad-stopped")),this.dispatchEvent(new rs("ad-content-attach-requested")),this.m=new ce},c.requestClientSideAds=function(e){if(!this.j)throw new eC(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)},c.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new eC(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},c.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new cE(e,t,n,function(e){return cO(i,e)})},c.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new eC(1,10,10005);var i,r,a,o,s,u,l,c,d,h,p,f=this.i;return n=void 0===n?"":n,f.l?e=Promise.reject(new eC(1,10,10004)):(f.l=new re,i=f,r=e,a=t,R(function(e){if(1==e.g)return o={type:7},(s=rm([r],i7())).method="POST",a&&(s.body=to(JSON.stringify(a))),u=i.K.request(7,s,o),x(e,2),b(e,u.promise,4);if(2!=e.g){if((l=JSON.parse(ti(e.h.data))).manifestUrl&&l.trackingUrl)c=new es(r),d=new es(l.trackingUrl),i.G=c.resolve(d).toString(),h=Date.now()/1e3-i.P,i.i(new rs("ads-loaded",(new Map).set("loadTime",h))),p=new es(l.manifestUrl),i.l.resolve(c.resolve(p).toString()),i.l=null;else throw Error("Insufficient data from MediaTailor.");return T(e,0)}if(A(e),!i.H.length)return i.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),i.l=null,e.return();i.l.resolve(i.H),i.l=null,w(e)}),f.H=n||"",f.P=Date.now()/1e3,e=f.l),e},c.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new eC(1,10,10005);var t=this.i;t.G=e,t.i(new rs("ads-loaded",(new Map).set("loadTime",0)))},c.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new eC(2,10,10002);this.h&&this.h.release(),this.h=new cN(t,n,this.o,function(e){return cO(i,e)}),this.h.configure(this.l)},c.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new eC(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&X('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.14.10",(n=this.h).j?e=Promise.reject(new eC(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new re,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},c.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new eC(1,10,10003);(e.mpt||e.mpv)&&X('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.14.10",this.h.g.replaceAdTagParameters(e)},c.getServerSideCuePoints=function(){return en("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},c.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},c.getStats=function(){var e,t=this.m;return{loadTimes:t.g,averageLoadTime:(e=t).g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0,started:t.h,overlayAds:t.j,playedCompletely:t.l,skipped:t.m,errors:t.i}},c.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},c.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)},c.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},c.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},c.onHLSInterstitialMetadata=function(e,t,n){var i,r,a;this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&(i=this.g,r=n,R(function(e){if(1==e.g){var t,n,o,s,u,l,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q;return cw(i),b(e,(t=i,n=r,R(function(e){switch(e.g){case 1:if(o=[],!n||(s=n.values.find(function(e){return"X-ASSET-URI"==e.key}),u=n.values.find(function(e){return"X-ASSET-LIST"==e.key}),!s&&!u))return e.return(o);if(l=null,(c=n.values.find(function(e){return"ID"==e.key}))&&(l=c.data),d=null==l?Math.floor(10*n.startTime)/10:n.startTime,(h=n.endTime)&&1/0!=n.endTime&&"number"==typeof n.endTime&&(h=null==l?Math.floor(10*n.endTime)/10:n.endTime),p=n.values.find(function(e){return"X-RESTRICT"==e.key}),g=f=!0,p&&p.data&&(f=!(m=p.data).includes("SKIP"),g=!m.includes("JUMP")),v=f?0:null,(y=n.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&isNaN(v=parseFloat(y.data))&&(v=f?0:null),S=null,(k=n.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(S=parseFloat(k.data),isNaN(v)&&(S=null)),E=null,(I=n.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&isNaN(E=parseFloat(I.data))&&(E=null),M=null,(C=n.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&isNaN(M=parseFloat(C.data))&&(M=null),L=P=D=!1,(N=n.values.find(function(e){return"CUE"==e.key}))&&(D=(j=N.data).includes("ONCE"),P=j.includes("PRE"),L=j.includes("POST")),O=!1,(U=n.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?O=U.data.includes("RANGE"):!I&&t.H.U()&&(O=!P&&!L),s){if(!(_=s.data))return e.return(o);
1o.push({id:l,groupId:null,startTime:d,endTime:h,uri:_,mimeType:null,isSkippable:f,skipOffset:v,skipFor:S,canJump:g,resumeOffset:E,playoutLimit:M,once:D,pre:P,post:L,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),e.s(2);break}if(!u){e.s(2);break}if(!(B=u.data))return e.return(o);return x(e,4),b(e,cx(t,B,{type:11}),6);case 6:for((V=(F=JSON.parse(ti(e.h)))["SKIP-CONTROL"])&&("number"==typeof(H=V["ENABLE-SKIP-AFTER"])&&(v=parseFloat(H),isNaN(H)&&(v=f?0:null)),"number"==typeof(G=V["ENABLE-SKIP-FOR"])&&(S=parseFloat(G),isNaN(G)&&(S=null))),K=0;K<F.ASSETS.length;K++)(q=F.ASSETS[K]).URI&&o.push({id:l+"_shaka_asset_"+K,groupId:l,startTime:d,endTime:h,uri:q.URI,mimeType:null,isSkippable:f,skipOffset:v,skipFor:S,canJump:g,resumeOffset:E,playoutLimit:M,once:D,pre:P,post:L,timelineRange:O,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});T(e,2);break;case 4:A(e);case 2:return e.return(o)}})),2)}(a=e.h).length?cf(i,a):X("Unsupported HLS interstitial",r),w(e)})))},c.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,l=0,c=u(n.eventNode.children),d=c.next();!d.done;d=c.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,(c=ns(d,"maxDuration",nf))&&(s=c/n.timescale),(c=ns(d,"returnOffset",nf))&&(l=c/n.timescale),t&&l&&(o=a+l);break}}r&&cf(e,[{id:n.id,groupId:null,startTime:a,endTime:o,uri:r,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?l: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&&na(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function(e,t){var n=na(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,a="true"==n.attributes.loop,o=ns(n,"z",nf);if(i&&0!=o){var s={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},u=na(n,"Viewport"),l=na(n,"TopLeft"),c=na(n,"Size");if(u&&l&&c){if(null==(s=ns(u,"x",nf))||null==(u=ns(u,"y",nf)))return;var d=ns(l,"x",nf);if(null==d||null==(l=ns(l,"y",nf)))return;var h=ns(c,"x",nf);if(null==h||null==(c=ns(c,"y",nf)))return;s={viewport:{x:s,y:u},topLeft:{x:d,y:l},size:{x:h,y:c}}}c=na(n,"SqueezeCurrent"),n=null,c&&(c=ns(c,"percentage",nv))&&(n={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*c,y:1080*c}}),cf(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:s,displayOnBackground:-1==o,currentVideo:n,background:null}])}}(this.g,n))}},c.addCustomInterstitial=function(e){if(!this.g)throw new eC(1,10,10006);cf(this.g,[e])},c.addAdUrlInterstitial=function(e){if(!this.g)throw new eC(1,10,10006);return this.g.addAdUrlInterstitial(e)},c.getInterstitialPlayer=function(){if(!this.g)throw new eC(1,10,10006);return this.g.Kf()},B("shaka.ads.AdManager",cj),cj.prototype.getInterstitialPlayer=cj.prototype.getInterstitialPlayer,cj.prototype.addAdUrlInterstitial=cj.prototype.addAdUrlInterstitial,cj.prototype.addCustomInterstitial=cj.prototype.addCustomInterstitial,cj.prototype.onDASHInterstitialMetadata=cj.prototype.onDASHInterstitialMetadata,cj.prototype.onHLSInterstitialMetadata=cj.prototype.onHLSInterstitialMetadata,cj.prototype.onCueMetadataChange=cj.prototype.onCueMetadataChange,cj.prototype.onHlsTimedMetadata=cj.prototype.onHlsTimedMetadata,cj.prototype.onDashTimedMetadata=cj.prototype.onDashTimedMetadata,cj.prototype.onManifestUpdated=cj.prototype.onManifestUpdated,cj.prototype.getStats=cj.prototype.getStats,cj.prototype.getCuePoints=cj.prototype.getCuePoints,cj.prototype.getServerSideCuePoints=cj.prototype.getServerSideCuePoints,cj.prototype.replaceServerSideAdTagParameters=cj.prototype.replaceServerSideAdTagParameters,cj.prototype.requestServerSideStream=cj.prototype.requestServerSideStream,cj.prototype.initServerSide=cj.prototype.initServerSide,cj.prototype.addMediaTailorTrackingUrl=cj.prototype.addMediaTailorTrackingUrl,cj.prototype.requestMediaTailorStream=cj.prototype.requestMediaTailorStream,cj.prototype.initMediaTailor=cj.prototype.initMediaTailor,cj.prototype.updateClientSideAdsRenderingSettings=cj.prototype.updateClientSideAdsRenderingSettings,cj.prototype.requestClientSideAds=cj.prototype.requestClientSideAds,cj.prototype.onAssetUnload=cj.prototype.onAssetUnload,cj.prototype.release=cj.prototype.release,cj.prototype.initClientSide=cj.prototype.initClientSide,cj.prototype.initInterstitial=cj.prototype.initInterstitial,cj.prototype.configure=cj.prototype.configure,cj.prototype.setLocale=cj.prototype.setLocale,cj.ADS_LOADED="ads-loaded",cj.AD_STARTED="ad-started",cj.AD_FIRST_QUARTILE="ad-first-quartile",cj.AD_MIDPOINT="ad-midpoint",cj.AD_THIRD_QUARTILE="ad-third-quartile",cj.AD_COMPLETE="ad-complete",cj.AD_STOPPED="ad-stopped",cj.AD_SKIPPED="ad-skipped",cj.AD_VOLUME_CHANGED="ad-volume-changed",cj.AD_MUTED="ad-muted",cj.AD_PAUSED="ad-paused",cj.AD_RESUMED="ad-resumed",cj.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",cj.CUEPOINTS_CHANGED="ad-cue-points-changed",cj.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",cj.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",cj.AD_CLICKED="ad-clicked",cj.AD_PROGRESS="ad-progress",cj.AD_BUFFERING="ad-buffering",cj.AD_IMPRESSION="ad-impression",cj.AD_DURATION_CHANGED="ad-duration-changed",cj.AD_CLOSED="ad-closed",cj.AD_LOADED="ad-loaded",cj.ALL_ADS_COMPLETED="all-ads-completed",cj.AD_LINEAR_CHANGED="ad-linear-changed",cj.AD_METADATA="ad-metadata",cj.AD_RECOVERABLE_ERROR="ad-recoverable-error",cj.AD_ERROR="ad-error",cj.AD_BREAK_READY="ad-break-ready",cj.AD_INTERACTION="ad-interaction",cj.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",cj.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",cj.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",l7=function(){return new cj};var cB="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cF="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),cV=["loop","playbackRate"],cH=["pause","play"],cG=(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("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),cK=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
1Stats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),cq=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),cz=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],cX=[["isTextTrackVisible","setTextTrackVisibility"]],cW="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),cY=["attach","attachCanvas","detach","load","unload"];function cJ(e,t,n,i,r,a,o){var s=this;this.G=e,this.K=o,this.l=new eB(t),this.L=n,this.u=!1,this.A=i,this.F=r,this.M=a,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return c0(s)},this.C=function(e,t){switch((e=c_(t)).type){case"event":var n=e.targetName,i=ru(e.event);s.A(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.L(),s.u=!1);break;case"asyncComplete":if(i=e.id,r=e.error,e=s.h.get(i),s.h.delete(i),e)if(r){for(n in i=new eC(r.severity,r.category,r.code),r)i[n]=r[n];e.reject(i)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,c8.add(this)}function c$(e,t){var n=e.M();c5=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),c0(e),c2(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function cQ(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new eC(2,8,n,t))}function cZ(e){var t=c5;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function c0(e){var t=!!c5&&"connected"==c5.status;if(e.i&&!t){for(var n in e.F(),e.g)e.g[n]={};c1(e)}e.i=t,e.I=t?c5.receiver.friendlyName:"",e.l.sb()}function c1(e){if(e.h)for(var t=u(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 eC(1,7,7e3))}}function c2(e,t){t=cU(t);var n=c5;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Y)}catch(i){throw t=new eC(2,8,8005,i),n=new rs("error",(new Map).set("detail",t)),e.A("player",n),e.Pc(),t}}(c=cJ.prototype).destroy=function(){return c8.delete(this),c1(this),c5&&cZ(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},c.qb=function(){return this.i},c.cg=function(){return this.I},c.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.sb();var t=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=u(c8),n=t.next();!n.done;n=t.next())(n=n.value).j=new re,n.u=!0,c$(n,e)},function(e){for(var t=u(c8),n=t.next();!n.done;n=t.next())n=n.value,c4="available"==e,n.l.sb()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),c4&&this.l.da(c3),(t=c5)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new re,this.u=!0,c$(this,t)):c5=null}else e.__onGCastApiAvailable!==c9&&(c6=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=c9)},c.kg=function(e){this.o=e,this.i&&c2(this,{type:"appData",appData:this.o})},c.cast=function(){var e=this;return R(function(t){if(!e.m)throw new eC(1,8,8e3);if(!c4)throw new eC(1,8,8001);if(e.i)throw new eC(1,8,8002);return e.j=new re,chrome.cast.requestSession(function(t){return c$(e,t)},function(t){return cQ(e,t)}),b(t,e.j,0)})},c.Pc=function(){if(this.i){if(c1(this),c5){cZ(this);try{c5.stop(function(){},function(){})}catch(e){}c5=null}c0(this)}},c.get=function(e,t){var n=this;if("video"==e){if(cH.includes(t))return function(){return n.ph.apply(n,[e,t].concat(l(P.apply(0,arguments))))}}else if("player"==e){if(cq.has(t)&&!this.get("player","isLive")())return function(){};if(cW.includes(t))return function(){return n.ph.apply(n,[e,t].concat(l(P.apply(0,arguments))))};if(cY.includes(t))return function(){return n.rj.apply(n,[e,t].concat(l(P.apply(0,arguments))))};if(cG.has(t)||cK.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},c.set=function(e,t,n){this.g[e][t]=n,c2(this,{type:"set",targetName:e,property:t,value:n})}
1,c.ph=function(e,t){c2(this,{type:"call",targetName:e,methodName:t,args:P.apply(2,arguments)})},c.rj=function(e,t){var n=P.apply(2,arguments),i=new re,r=this.H.toString();this.H++,this.h.set(r,i);try{c2(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var c3=.02,c4=!1,c5=null,c6=null,c8=new Set;function c9(t){if(c6?e.__onGCastApiAvailable=c6:delete e.__onGCastApiAvailable,c6=null,t)for(var n=u(c8),i=n.next();!i.done;i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function c7(t,n,i,r){r=void 0!==r&&r,rc.call(this);var a=this;this.i=t,this.h=n,this.m=this.o=this.l=this.u=this.j=null,this.C=i,this.B=r,this.A=new Map,this.g=null,e.chrome?(this.g=new cJ(i,function(){return dn(a)},function(){return di(a)},function(e,t){return da(a,e,t)},function(){return dr(a)},function(){return dt(a)},r),function(e){e.g.init(),e.m=new Q;for(var t,n,i=u(cB),r=i.next();!r.done;r=i.next())e.m.D(e.i,r.value,function(t){e.g.qb()||(t=ru(t),e.l.dispatchEvent(t))});for(var a in rl)e.m.D(e.h,rl[a],function(t){e.g.qb()||e.o.dispatchEvent(t)});for(var o in e.j={},i={},e.i)(i={wd:i.wd}).wd=o,Object.defineProperty(e.j,i.wd,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.l.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.l.removeEventListener(t,n,i)};if(e.g.qb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.qb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.wd)}}(i),set:function(t){return function(n){var i=t.wd;e.g.qb()?e.g.set("video",i,n):e.i[i]=n}}(i)});e.u={},de(e,function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){var n=e,i=t;if(n.A.has(i)&&(i=n.A.get(i)),"addEventListener"==i)return function(e,t,i){return n.o.addEventListener(e,t,i)};if("removeEventListener"==i)return function(e,t,i){return n.o.removeEventListener(e,t,i)};if("getMediaElement"==i)return function(){return n.j};if("getSharedConfiguration"==i)return n.g.get("player","getConfiguration");if("getNetworkingEngine"==i)return function(){return n.h.yb()};if("getDrmEngine"==i)return function(){return n.h.C};if("getAdManager"==i)return function(){return n.h.Rg()};if("setVideoContainer"==i)return function(e){return n.h.Dh(e)};if(n.g.qb()){if("getManifest"==i||"drmInfo"==i)return function(){return X(i+"() does not work while casting!"),null};if("attach"==i||"detach"==i)return function(){return X(i+"() does not work while casting!"),Promise.resolve()};if("getChapters"==i)return function(){return X(i+"() does not work while casting!"),[]}}return n.g.qb()&&0==Object.keys(n.g.g.video).length&&(cG.has(i)||cK.has(i))||!n.g.qb()?n.h[i].bind(n.h):n.g.get("player",i)}})}),t=e,n=new Map,de(t,function(e,i){n.has(i)?(i=n.get(i),e.length<i.length?t.A.set(e,i):t.A.set(i,e)):n.set(i,e)}),e.l=new rc,e.l.Te=e.j,e.o=new rc,e.o.Te=e.u}(this)):(this.j=this.i,this.u=this.h)}function de(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=u(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 dt(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Qc(),startTime:null};e.i.pause();for(var n=u(cV),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=u(cz)).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=u(cX)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function dn(e){var t=new rs("caststatuschanged");e.dispatchEvent(t)}function di(e){var t=new rs(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function dr(e){for(var t,n=u(cz),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.g.get("player",r[0])(),e.h[i](r)}var a=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),n=Promise.resolve();var o=e.i.autoplay;i=null,r||(i=e.g.get("video","currentTime")),(r=e.g.get("player","getTextTracks")())&&r.length&&(t=r.find(function(e){return e.active}));var s=e.g.get("player","isTextTrackVisible")();a&&(e.i.autoplay=!1,n=e.h.load(a,i));var l={};for(r=(i=u(cV)).next();!r.done;r=i.next())l[r=r.value]=e.g.get("video",r);n.then(function(){if(e.i){for(var n=u(cV),i=n.next();!i.done;i=n.next())i=i.value,e.i[i]=l[i];for(i=(n=u(cX)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.g.get("player",r[0])(),e.h[i](r)}e.h.Ah(s),t&&e.h.jg(t.language,t.roles,t.forced),e.i.autoplay=o,a&&e.i.play()}},function(t){t=new rs("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}
1function da(e,t,n){e.g.qb()&&("video"==t?e.l.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function ds(e,t,n,i){rc.call(this);var r=this;this.g=e,this.h=t,this.j=new Q,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(e){return e},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.u=this.l=null,this.C=new eB(function(){dd(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return du(e)},t.onSenderDisconnected=function(){return du(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&dg(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),dg(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){var n=e,i=t,r=c_(i.data);switch(r.type){case"PLAY":n.g.play(),dm(n);break;case"PAUSE":n.g.pause(),dm(n);break;case"SEEK":i=r.currentTime;var a=r.resumeState;null!=i&&(n.g.currentTime=Number(i)),a&&"PLAYBACK_START"==a?(n.g.play(),dm(n)):a&&"PLAYBACK_PAUSE"==a&&(n.g.pause(),dm(n));break;case"STOP":n.h.kc().then(function(){n.h&&dm(n)});break;case"GET_STATUS":dp(n,Number(r.requestId));break;case"VOLUME":i=(a=r.volume).level,a=a.muted;var o=n.g.volume,s=n.g.muted;null!=i&&(n.g.volume=Number(i)),null!=a&&(n.g.muted=a),o==n.g.volume&&s==n.g.muted||dm(n);break;case"LOAD":n.m=0,n.B=!1,n.A=!1,i=r.media,a=r.currentTime,o=n.I(i.contentId),s=r.auto
1play||!0,n.F(i.customData),s&&(n.g.autoplay=!0),n.h.load(o,a).then(function(){n.h&&dp(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),dg(n,{requestId:Number(r.requestId),type:t},n.u)});break;default:dg(n,{requestId:Number(r.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},n.u)}},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f=c_(t.data);switch(f.type){case"init":e.m=0,e.B=!1,e.A=!0,n=e,i=f.initState,r=f.appData,R(function(e){switch(e.g){case 1:for(a in i.player)o=i.player[a],n.h[a](o);return n.F(r),s=n.g.autoplay,i.manifest?(n.g.autoplay=!1,x(e,5),b(e,n.h.load(i.manifest,i.startTime),7)):b(e,Promise.resolve(),3);case 7:T(e,3);break;case 5:return u=A(e),l=new rs("error",(new Map).set("detail",u)),n.h&&n.h.dispatchEvent(l),e.return();case 3:if(!n.h)return e.return();for(c in i.video)d=i.video[c],n.g[c]=d;for(h in i.playerAfterLoad)p=i.playerAfterLoad[h],n.h[h](p);n.g.autoplay=s,i.manifest&&(n.g.play(),dm(n)),w(e)}}),dd(e);break;case"appData":e.F(f.appData);break;case"set":var g=f.targetName,m=f.property;if(f=f.value,"video"==g){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==m){t.setSystemVolumeLevel(f);break}else if("muted"==m){t.setSystemVolumeMuted(f);break}}e.H[g][m]=f;break;case"call":(g=e.H[f.targetName])[f.methodName].apply(g,f.args);break;case"asyncCall":g=f.targetName,m=f.methodName,"player"==g&&"load"==m&&(e.m=0,e.B=!1);var v=f.id,y=t.senderId;f=(t=e.H[g])[m].apply(t,f.args),"player"==g&&"load"==m&&(f=f.then(function(){e.A=!0})),f.then(function(){return df(e,y,v,null)},function(t){return df(e,y,v,t)})}}(e,t)},t.start(),t=u(cB);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(t){return dc(e,"video",t)});for(var i in rl)e.j.D(e.h,rl[i],function(t){return dc(e,"player",t)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,dl(e)}),e.j.D(e.g,"playing",function(){e.o=!1,dl(e)}),e.j.D(e.g,"pause",function(){dl(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,dl(e)}),e.j.D(e.g,"ended",function(){new eB(function(){e.g&&e.g.ended&&(e.o=!0,dl(e))}).da(dy)})}(this)}function du(e){e.m=0,e.A=!0,e.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,dl(e)}function dl(e){var t;R(function(n){return 1==n.g?b(n,Promise.resolve(),2):e.h?void(t=new rs("caststatuschanged"),e.dispatchEvent(t),dh(e)||dm(e),w(n)):n.return()})}function dc(e,t,n){e.h&&(dd(e),dg(e,{type:"event",targetName:t,event:n},e.l))}function dd(e){e.C.da(dv);for(var t={video:{},player:{}},n=u(cF),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];e.h.U()&&cq.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.h[i]())}),cG.forEach(function(n,i){0==e.m%n&&(t.player[i]=e.h[i]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),dg(e,{type:"update",update:t},e.l),cK.forEach(function(t,n){0==e.m%t&&((t={player:{}}).player[n]=e.h[n](),dg(e,{type:"update",update:t},e.l))}),e.B&&(e.m+=1),dh(e)}function dh(e){return!!(e.A&&(e.g.duration||e.h.U()))&&(dp(e),e.A=!1,!0)}function dp(e,t){var n={contentId:e.h.Qc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),dm(e,void 0===t?0:t,n)}function df(e,t,n,i){e.h&&dg(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function dg(e,t,n,i){e.G&&(e=cU(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function dm(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?db:e.h.Qf()?dx:e.g.paused?dS:dw,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),dg(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}g(c7,rc),(c=c7.prototype).destroy=function(e){return this.g&&e&&this.g.Pc(),this.m&&(this.m.release(),this.m=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,rc.prototype.release.call(this),Promise.all(e)},c.Ni=function(){return this.j},c.Kf=function(){return this.u},c.Yh=function(){return!!this.g&&this.g.m&&c4},c.qb=function(){return!!this.g&&this.g.qb()},c.cg=function(){return this.g?this.g.cg():""},c.cast=function(){var e=this;return R(function(t){return 1==t.g?e.g?b(t,e.g.cast(),2):t.return():e.h?b(t,e.h.kc(),0):t.return()})},c.kg=function(e){this.g&&this.g.kg(e)},c.Gj=function(){var e;this.g&&(e=this.g).i&&chrome.cast.requestSession(function(t){return c$(e,t)},function(t){return cQ(e,t)})},c.Pc=function(){this.g&&this.g.Pc()},c.Zh=function(e,t){t=void 0!==t&&t;var n=this;return R(function(i){if(1==i.g)return e==n.C&&t==n.B?i.return():(n.C=e,n.B=t,n.g)?(n.g.Pc(),b(i,n.g.destroy(),2)):i.return();n.g=null,n.g=new cJ(e,function(){return dn(n)},function(){return di(n)},function(e,t){return da(n,e,t)},function(){return dr(n)},function(){return dt(n)},t),n.g.init(),w(i)})},B("shaka.cast.CastProxy",c7),c7.prototype.changeReceiverId=c7.prototype.Zh,c7.prototype.forceDisconnect=c7.prototype.Pc,c7.prototype.suggestDisconnect=c7.prototype.Gj,c7.prototype.setAppData=c7.prototype.kg,c7.prototype.cast=c7.prototype.cast,c7.prototype.receiverName=c7.prototype.cg,c7.prototype.isCasting=c7.prototype.qb,c7.prototype.canCast=c7.prototype.Yh,c7.prototype.getPlayer=c7.prototype.Kf,c7.prototype.getVideo=c7.prototype.Ni,c7.prototype.destroy=c7.prototype.destroy,g(ds,rc),(c=ds.prototype).isConnected=function(){return this.G},c.Ui=function(){return this.o},c.Dj=function(e){this.i=e},c.ci=function(){this.i=null},c.Ej=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},c.Cj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},c.Bj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},c.destroy=function(){var e,t=this;return R(function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.C&&(t.C.stop(),t.C=null),t.g=null,t.H=null,t.F=null,t.G=!1,t.o=!0,t.l=null,t.u=null,rc.prototype.release.call(t),b(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),w(n)})},B("shaka.cast.CastReceiver",ds),ds.prototype.destroy=ds.prototype.destroy,ds.prototype.setContentArtist=ds.prototype.Bj,ds.prototype.setContentImage=ds.prototype.Cj,ds.prototype.setContentTitle=ds.prototype.Ej,ds.prototype.clearContentMetadata=ds.prototype.ci,ds.prototype.setContentMetadata=ds.prototype.Dj,ds.prototype.isIdle=ds.prototype.Ui,ds.prototype.isConnected=ds.prototype.isConnected;var dv=.5,dy=5,db="IDLE",dw="PLAYING",dx="BUFFERING",dS="PAUSED";function dT(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=dA(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=dk(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=dA(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=dk(i,r),e.nestedCues.push(d)),d=dA(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function dA(e,t,n,i,r,a){return e=new nI(e,t,""),n&&e.textDecoration.push(nJ),i&&(e.fontStyle=nW),e.color=r,e.backgroundColor=a,e}function dk(e,t){return(e=new nI(e,t,"")).lineBreak=!0,e}function dE(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function dI(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.A=null,dC(this)}
1function dM(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new nI(t,n,"");r.lineInterpretation=1;var a=dU.get(e.g);return a&&(r.line=a),null!=e.u&&null!=e.A&&(r.position=10+Math.min(70,10*e.u)+2.5*e.A),(t=dT(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(a=dU.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function dC(e){dP(e,0,15),e.g=1}function dD(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=dL.has(n)?dL.get(n):String.fromCharCode(n);break;case 1:i=dN.get(n);break;case 2:e.i[e.g].pop(),i=dj.get(n);break;case 3:e.i[e.g].pop(),i=dO.get(n)}i&&e.i[e.g].push(new dE(i,e.m,e.j,e.o,e.l))}}function dR(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 dP(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var dL=new Map([[39,"â"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"â"]]),dN=new Map([[48,"\xae"],[49,"\xb0"],[50,"\xbd"],[51,"\xbf"],[52,"â¢"],[53,"\xa2"],[54,"\xa3"],[55,"âª"],[56,"\xe0"],[57," "],[58,"\xe8"],[59,"\xe2"],[60,"\xea"],[61,"\xee"],[62,"\xf4"],[63,"\xfb"]]),dj=new Map([[32,"\xc1"],[33,"\xc9"],[34,"\xd3"],[35,"\xda"],[36,"\xdc"],[37,"\xfc"],[38,"â"],[39,"\xa1"],[40,"*"],[41,"'"],[42,"â"],[43,"\xa9"],[44,"â "],[45,"\xb7"],[46,"â"],[47,"â"],[48,"\xc0"],[49,"\xc2"],[50,"\xc7"],[51,"\xc8"],[52,"\xca"],[53,"\xcb"],[54,"\xeb"],[55,"\xce"],[56,"\xcf"],[57,"\xef"],[58,"\xd4"],[59,"\xd9"],[60,"\xf9"],[61,"\xdb"],[62,"\xab"],[63,"\xbb"]]),dO=new Map([[32,"\xc3"],[33,"\xe3"],[34,"\xcd"],[35,"\xcc"],[36,"\xec"],[37,"\xd2"],[38,"\xf2"],[39,"\xd5"],[40,"\xf5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xc4"],[49,"\xe4"],[50,"\xd6"],[51,"\xf6"],[52,"\xdf"],[53,"\xa5"],[54,"\xa4"],[55,"â"],[56,"\xc5"],[57,"\xe5"],[58,"\xd8"],[59,"\xf8"],[60,"â"],[61,"â"],[62,"â"],[63,"â"]]),dU=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 d_(e,t){this.h=0,this.o=new dI(e,t),this.i=new dI(e,t),this.g=this.j=new dI(e,t),this.l=0,this.m=null}function dB(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=dM(i,e.l,n),(n=e.i).g=0<n.h?n.h:0,dP(n,0,15),(n=e.j).g=0<n.h?n.h:0,dP(n,0,15),i.g=15),e.h=3,i.h=t,r}function dF(e){e.h=1,e.g=e.j,e.g.h=0}function dV(e){W("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var dH="black green blue cyan red yellow magenta black".split(" "),dG="white green blue cyan red yellow magenta white_italics".split(" ");function dK(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.u="black",dq(this)}function dq(e){e.i=[];for(var t=0;16>t;t++)e.i.push(dz())}function dz(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function dX(e,t){dW(e)&&(e.i[e.h][e.g]=new dE(t,e.C,e.A,e.u,e.B),e.g++)}function dW(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function dY(e,t,n){var i=new nI(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":nN;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?tq: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=dT(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function dJ(){this.i=[],this.h=null,this.g=0}function d$(e){this.g=0,this.h=e}function dQ(e){if(!e.ta())throw new eC(2,2,3e3);return e.h[e.g++]}function dZ(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function d0(e,t){for(var n=[],i=0;8>i;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function d1(e,t,n){var i=[];t=u(d0(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=dY(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function d2(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function d3(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],d5[e<<2|t<<1|(n=i[n])]}dK.prototype.isVisible=function(){return this.l},dK.prototype.display=function(){this.l=!0},d$.prototype.ta=function(){return this.g<this.h.length},d$.prototype.Ba=function(){return this.g},d$.prototype.skip=function(e){if(this.g+e>this.h.length)throw new eC(2,2,3e3);this.g+=e},d$.prototype.rh=function(e){if(0>this.g-e)throw new eC(2,2,3e3);this.g-=e};var d4=new Map([[32," "],[33,"\xa0"],[37,"â¦"],[42,"Å "],[44,"Å"],[48,"â"],[49,"â"],[50,"â"],[51,"â"],[52,"â"],[53,"â¢"],[57,"â¢"],[58,"Å¡"],[60,"Å"],[61,"â "],[63,"Ÿ"],[118,"â
"],[119,"â
"],[120,"â
"],[121,"â
"],[122,"â"],[123,"â"],[124,"â"],[125,"â"],[126,"â"],[127,"â"]]),d5="black blue green cyan red magenta yellow white".split(" ");function d6(){this.h=[],this.g=[],this.i=new dJ,this.l=0,this.m=new Map([["CC1",new d_(0,0)],["CC2",new d_(0,1)],["CC3",new d_(1,0)],["CC4",new d_(1,1)]]),this.u=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,d8(this)}function d8(e){e.o=0,e.u=0;for(var t=u(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,dC(n.i),dC(n.j),dC(n.o);e.B=!0}function d9(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function d7(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(l(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 he(){this.j=new Map,this.i=this.h=0,this.g=ht}d6.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,d8(this),e=u(this.j.values());for(var t=e.next();!t.done;t=e.next())d2(t.value)},d6.prototype.extract=function(e,t){if(this.B){for(var n=u(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(!(8>(e=new rM(e,0)).getLength())&&181===e.X()&&49===e.ma()&&0x47413934===e.S()&&3===e.X()&&0!=(64&(n=e.X())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.X(),a=(4&r)>>2,o=e.X(),s=e.X();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,mb:o,Mb: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})))}},d6.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t,n,i=[];this.h.sort(e),this.g.sort(e);for(var r=u(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if(16==(112&t.mb)){var i=t.mb>>3&1;0===n?e.o=i:e.u=i}if(i="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(i),255===t.mb&&255===t.Mb||!t.mb&&!t.Mb||!d9(t.mb)||!d9(t.Mb))return 45<=++e.l&&d8(e),null;e.l=0,t.mb&=127,t.Mb&=127;var r=t.mb;if(1<=r&&15>=r||!t.mb&&!t.Mb)return null;if(r=null,16==(112&t.mb))e:{if(e.A.add(i),i=t.mb,e=t.Mb,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=dG[Math.floor(o/2)]:15>=o?r=!0:a=Math.floor((o-16)/2),e=1==(1&e),4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(n=1+t-o.h,dR(o,n,1+o.g-o.h,o.h),dP(o,0,n-1),dP(o,t+1,15-t)),o.g=t,o.m=e,o.j=r,o.l=i,o.u=a,o.o="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",dD(n.g,0,32),i=!1,"white_italics"===(t=dG[(14&e)>>
11])&&(t="white",i=!0),n.g.m=1==(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",0==(7&i)&&(t=dH[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))dD(n.g,1,e);else if(18==(246&i)&&32==(224&e))dD(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.Mb){case 32:dF(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=dB(n,2,e);break;case 38:i=dB(n,3,e);break;case 39:i=dB(n,4,e);break;case 40:dD(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:dC(n.o),dV(n);break;case 43:dV(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=dM(t,n.l,e)),dP(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=dM(t,n.l,e),r=t.g-t.h+1,dR(t,r-1,r,t.h),dP(t,0,r-1),dP(t,t.g,15-t.g),n.l=e);break;case 46:dP(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=dM(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,dF(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.Mb,dD(n.g,0,t.mb),dD(n.g,0,e);return r}(this,a.value))&&i.push(a);for(a=(r=u(this.g)).next();!a.done;a=r.next())t=this.i,3===(n=a.value).type?(t.g=2*(63&n.value)-1,t.h=[]):t.h&&(0<t.g&&(t.h.push(n),t.g--),0===t.g&&(t.i.push(new d$(t.h)),t.h=null,t.g=0));for(a=(r=u(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.ta();){var i=dQ(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&dQ(t).value),0!=r){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new dZ(r));for(var o=e.j.get(r),s=t.Ba();t.Ba()-s<a;){r=o;var c=t,d=dQ(c),h=d.value,p=d.pts;if(16===h){var f=dQ(c);h=h<<16|f.value}if(0<=h&&31>=h)var g=function(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=dQ(t).value,i=dQ(t).value].map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join(""),dX(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!dW(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=dY(t,i,e.i)),t.h+1>=t.o?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]=dz()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=dY(t,i,e.i)),t.i[t.h]=dz(),t.g=0;break;case 12:t.isVisible()&&(r=dY(t,i,e.i)),dq(t),t.h=0,t.g=0}return r?[r]:[]}(r,c,h,p);else if(128<=h&&159>=h)g=function(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=dQ(t).value,t=[],n=u(d0(e,n));for(var r=n.next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=dY(r,i,e.i);a&&t.push(a)}dq(r)}return t}if(137===n)for(n=(t=u(d0(e,t=dQ(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=dQ(t).value,t=null,r=(n=u(d0(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=dY(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=dQ(t).value,t=null,r=(n=u(d0(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=dY(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return d1(e,t=dQ(t).value,i);if(143===n)return i=d1(e,255,i),d2(e),i;if(144===n)t.skip(1),i=dQ(t).value,e.g&&(e.g.A=0<(128&i),e.g.C=0<(64&i));
1else if(145===n)i=dQ(t).value,n=dQ(t).value,t.skip(1),e.g&&(t=d3((48&n)>>4,(12&n)>>2,3&n),e.g.B=d3((48&i)>>4,(12&i)>>2,3&i),e.g.u=t);else if(146===n)i=dQ(t).value,t=dQ(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=dQ(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 dK(n,e.i)).j=i,e.h[n]=a),i=dQ(t).value,a=dQ(t).value;var o=dQ(t).value,s=dQ(t).value,l=dQ(t).value;t=dQ(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.u="black"),(t=e.h[n]).l=0<(32&i),t.L=127&a,t.H=o,t.G=(240&s)>>4,t.K=0<(128&a),t.o=(15&s)+1,t.m=(63&l)+1,e.g=e.h[n]}}}return[]}(r,c,h,p);else{if(4096<=h&&4127>=h)r=c,c=255&h,8<=c&&15>=c?r.skip(1):16<=c&&23>=c?r.skip(2):24<=c&&31>=c&&r.skip(3);else if(4224<=h&&4255>=h)r=c,c=255&h,128<=c&&135>=c?r.skip(4):136<=c&&143>=c&&r.skip(5);else if(32<=h&&127>=h)c=h,r.g&&(127===c?dX(r.g,"âª"):dX(r.g,String.fromCharCode(c)));else if(160<=h&&255>=h)r.g&&dX(r.g,String.fromCharCode(h));else if(4128<=h&&4223>=h){if(c=255&h,r.g)if(d4.has(c)){var m=d4.get(c);dX(r.g,m)}else dX(r.g,"_")}else 4256<=h&&4351>=h&&r.g&&(160!=(255&h)?dX(r.g,"_"):dX(r.g,"[CC]"));g=[]}n.push.apply(n,l(g))}}}}catch(e){if(e instanceof eC&&3e3===e.code)W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,l(a));return this.i.i=[],this.h=[],this.g=[],i},d6.prototype.getStreams=function(){return Array.from(this.A)},B("shaka.cea.CeaDecoder",d6),tG=function(){return new d6},he.prototype.init=function(e){function t(e){e=e.name,ha.has(e)&&(n.g=ha.get(e))}var n=this,i=[],r=[];if((new rR).box("moov",rP).box("mvex",rP).R("trex",function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.S(),t=t.S(),n.h=e,n.i=t}).box("trak",rP).R("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.S();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.ma(),t.ma(),t.ma(),t.ma(),i.push(n)}).box("mdia",rP).R("mdhd",function(e){e=aS(e.reader,e.version),r.push(e.timescale)}).box("minf",rP).box("stbl",rP).R("stsd",rL).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",rN).box("sinf",rP).box("frma",function(e){e=ak(e.reader).codec,ha.has(e)&&(n.g=ha.get(e))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new eC(2,2,2010);this.g==ht&&X("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(e,t){n.j.set(e,r[t])})},he.prototype.parse=function(e){var t=this;if(this.g==ht)return[];var n=[],i=0,r=[];return(new rR).box("moof",function(e){i=e.start,r=[],rP(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,ld:t.h,md:t.i,mh:[],timescale:9e4}),rP(e)}).R("trun",function(e){var t=r[r.length-1];e=aT(e.reader,e.version,e.flags),t.mh.push(e)}).R("tfhd",function(e){var n=r[r.length-1];n.ld=(e=aw(e.reader,e.flags)).ld||t.h,n.md=e.md||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).R("tfdt",function(e){var t=r[r.length-1];t.baseMediaDecodeTime=(e=ax(e.reader,e.version)).baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.Ba(),s=u(r),c=s.next();!c.done;c=s.next()){if(null===(c=c.value).baseMediaDecodeTime)throw X("Unable to find base media decode time for CEA captions!"),new eC(2,2,2010);e.reader.seek(o),function(e,t,n,i,r,a,o,s,c){var d=0,h=a,p=s.map(function(e){return e.hg});for((p=[].concat.apply([],l(p))).length&&(h=p[0].sampleSize||a),t.skip(o+s[0].qf);t.ta();){o=t.S();var f=t.X(),g=null;switch(g=!1,s=1,e.g){case hn:g=6==(g=31&f);break;case hi:s=2,t.skip(1),g=39==(g=f>>1&63)||40==g;break;case hr:s=2,t.skip(1),g=23==(g=f>>1&63)||24==g;break;default:return}if(g)for(f=0,d<p.length&&(f=p[d].Be||0),f=(n+f)/i,g=(s=u(d7(t.Db(o-s)))).next();!g.done;g=s.next())c.push({packet:g.value,pts:f});else try{t.skip(o-s)}catch(e){break}0==(h-=o+4)&&(n=d<p.length?n+(p[d].ig||r):n+r,h=++d<p.length&&p[d].sampleSize||a)}}(t,e.reader,c.baseMediaDecodeTime,c.timescale,c.ld,c.md,a,c.mh,n)}}).parse(e,!1),n},B("shaka.cea.Mp4CeaParser",he);var ht=0,hn=1,hi=2,hr=3,ha=(new Map).set("avc1",hn).set("avc3",hn).set("dvav",hn).set("dva1",hn).set("hev1",hi).set("hvc1",hi).set("dvh1",hi).set("dvhe",hi).set("vvc1",hr).set("vvi1",hr).set("dvc1",hr).set("dvi1",hr);function ho(){this.g=null}function hs(e){return(e=(function(e){var t=0,n=eI(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,0!=(1&r)||r+e>n.byteLength){n=[];break e}var a=ek(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=tf(nn(e))).filter(function(e){return e.type===hl})[0])&&(e=t8(e=tr(e.value,!0),"WRMHEADER"))?e:null}function hu(e){try{var t=hs(e);if(t)e:{for(var n=u(nr(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=u(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var l=nn(s);break e}}}l=""}else l="";return l}catch(e){return""}}tF("video/mp4",function(){return new he}),ho.prototype.init=function(){},ho.prototype.parse=function(e){this.g?this.g.clearData():this.g=new ox;var t=[];if(!ok(e=ek(e)))return t;var n=(e=this.g.parse(e)).od(),i=e.fe();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=u(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=u(d7(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},B("shaka.cea.TsCeaParser",ho),tF("video/mp2t",function(){return new ho});
1var hl=1;function hc(t,n,i){var r=function(e){var t=[];e=u(e);for(var n=e.next();!n.done;n=e.next())(n=function(e){var t=e.attributes.schemeIdUri,n=nu(e,"urn:mpeg:cenc:2013","default_KID"),i=nl(e,"urn:mpeg:cenc:2013","pssh").map(ni),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new eC(2,4,4009);var a=[];try{a=i.map(function(e){return{initDataType:"cenc",initData:tf(e),keyId:null}})}catch(e){throw new eC(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<a.length?a:null,encryptionScheme:r}}(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,l=new Set(r.map(function(e){return e.keyId}));l.delete(null);var c="cenc";if(1<l.size)throw new eC(2,4,4010);if(!n){if(1<(o=r.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.cd})).length)throw new eC(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw X("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new eC(2,4,4042);var n=no(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri||!(n=no(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.attributes.IV,n=tl(n.attributes.keyUriTemplate),!t||!n))throw new eC(2,4,4051);if(16!=(t=tg(t.substr(2))).byteLength)throw new eC(2,4,4048);return{Zi:n,iv:t}}(o[0])),(o=r.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.cd}))&&o.encryptionScheme&&(c=o.encryptionScheme),(o=r.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.cd?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.cd})).length&&0==(t=function(e,t,n,i,r){var a=[];n=u(n);for(var o=n.next();!o.done;o=n.next()){var s,l=i[(o=o.value).cd];if(l){if((s=no(o.node,"urn:microsoft:playready","pro"))&&nn(s)){s=tf(s=nn(s));var c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:rG(s,c,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else s=null;if(c=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.cd)if(c=o,0==r.size)c=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);c=[{initData:rG(new Uint8Array([]),d,r,1),initDataType:"cenc",keyId:c.keyId}]}s=tb(l,t,o.init||e||s||c),(l=hh.get(l))&&(s.licenseServerUri=l(o)),a.push(s)}}return a}(a,c,o,i,l)).length&&(t=[tb("",c,a)])}if(r.length&&!s&&(n||!o.length))for(t=[],i=(n=u(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&t.push(tb(i,c,a));if(l=Array.from(l)[0]||null)for(n=(c=u(t)).next();!n.done;n=c.next())for(i=(n=u(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=l;return{Lg:l,Rk:a,drmInfos:t,ef:s,Qg:!0}}function hd(e){var t=no(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=nn(t)))return t;if((t=no(e.node,"urn:microsoft:playready","pro"))&&nn(t))return hu(t);if((e=no(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=nn(e))){t=tf(e),e=8;var n=(t=eI(t)).getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),hu(e=t8("<pro>"+(e=th(e=ek(t,e+4)))+"</pro>"))}return""}var hh=(new Map).set("com.apple.fps",function(t){if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4054);return(t=no(t.node,"https://dashif.org/CPS","Laurl"))&&(t=nn(t))?t:""}).set("com.widevine.alpha",function(e){var t=no(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=nn(t))?t:(e=no(e.node,"urn:microsoft","laurl"))&&tl(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",hd).set("com.microsoft.playready.recommendation",hd).set("com.microsoft.playready.software",hd).set("com.microsoft.playready.hardware",hd).set("org.w3.clearkey",function(e){var t=no(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=nn(t))?t:(e=no(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=nn(e))?e:""});function hp(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))&&X("Calculated $Time$ values must be close to integers"),a=Math.round(a)),r){case void 0:case"d":case"i":case"u":default: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()}return Array(Math.max(0,(i=e.parseInt(i,10)||1)-t.length)+1).join("0")+t})}function hf(e,t){var n=hm(e,t,"timescale"),i=1;n&&(i=ng(n)||1);var r=(n=ng((n=hm(e,t,"duration"))||""))?n/i:null,a=hm(e,t,"startNumber"),o=Number(hm(e,t,"presentationTimeOffset"))||0,s=nm(a||"");if((null==a||null==s)&&(s=1),a=null,t=hv(e,t,"SegmentTimeline")){t=nt(t,"S"),a=i,e=e.ha.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=ns(h,"t",nm),g=ns(h,"d",nm),m=ns(h,"r",nf);if(h=ns(h,"k",nf)||0,null!=f&&(f-=o),g){if(f=null!=f?f:c,0>
1(m=m||0))if(p){if(null==(p=ns(p,"t",nm))||f>=p)break;m=Math.ceil((p-f)/g)-1}else{if(1/0==e||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,zg:f,Jb:h,yj:l.length+u}),f=c}}a=l}return{timescale:i,Ke:n,Wa:r,Md:s,hc:o/i||0,yg:o,timeline:a}}function hg(e,t){return[t(e.J),t(e.ga),t(e.pa)].filter(ib)}function hm(e,t,n){t=hg(e,t),e=null,t=u(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function hv(e,t,n){t=hg(e,t),e=null,t=u(t);for(var i=t.next();!i.done&&!(e=na(i.value,n));i=t.next());return e}function hy(e,t,n,i,r,a){if(a=void 0===a?0:a,nu(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=nu(e,"http://www.w3.org/1999/xlink","href"),s=nu(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=u(Object.keys(e.attributes)),c=l.next();!c.done;c=l.next()){var d=(c=c.value).split(":"),h=t9("http://www.w3.org/1999/xlink");d[0]==h&&delete e.attributes[c]}if(5<=a)return rn(new eC(2,4,4028));if("onLoad"!=s)return rn(new eC(2,4,4027));var p=ty([i],[o]);return r.request(0,rm(p,t)).Ha(function(i){if(!(i=t6(i.data,e.tagName)))return rn(new eC(2,4,4001,o));for(e.children=[];i.children.length;){var s=i.children.shift();e.children.push(s)}s=u(Object.keys(i.attributes));for(var l=s.next();!l.done;l=s.next())l=l.value,e.attributes[l]=i.attributes[l];return hy(e,t,n,p[0],r,a+1)})}(e,t,n,i,r,a);return n&&(o=o.Ha(void 0,function(){return hy(e,t,n,i,r,a)})),o}o=[];for(var s=u(ne(e)),l=s.next(),c={};!l.done;c={hd:void 0},l=s.next())c.hd=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==nu(c.hd,"http://www.w3.org/1999/xlink","href")?e.children=e.children.filter(function(e){return function(t){return t!==e.hd}}(c)):"SegmentTimeline"!=c.hd.tagName&&o.push(hy(c.hd,t,n,i,r,a));return ro(o).Ha(function(){return e})}function hb(e){this.h=eI(e),this.g=new rM(this.h,0)}function hw(e){var t=hx(e);if(7<t.length)throw new eC(2,3,3002);var n=0;t=u(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=hx(e);e:{i=u(hS);for(var r=i.next();!r.done;r=i.next())if(eT(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ba();else{if(8==t.length&&224&t[1])throw new eC(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.Ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ba(),i=eI(e.h,e.g.Ba(),t),e.g.skip(t),new hT(n,i)}function hx(e){var t=e.g.Ba(),n=e.g.X();if(0==n)throw new eC(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),ek(e.h,t,n)}hb.prototype.ta=function(){return this.g.ta()};var hS=[[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 hT(e,t){this.id=e,this.g=t}function hA(e){if(8<e.g.byteLength)throw new eC(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new eC(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function hk(e,t,n){if(!(t=hv(e,t,"Initialization")))return null;var i=e.J.Ua(),r=t.attributes.sourceURL;r&&(i=ty(i,[tl(r)],e.vb())),r=0;var a=null;return(t=ns(t,"range",np))&&(r=t.start,a=t.end),(n=new a1(function(){return i},r,a,hD(e),null,null,n,e.ga.encrypted)).codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ha&&(n.g=e.ha.start+e.ha.duration),n}function hE(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,w,x,S,T,A,k,E;return R(function(I){if(1==I.g)return s=e.presentationTimeline,l=!e.Ob||!e.ha.ah,c=e.ha.start,d=e.ha.duration,h=e.J.mimeType.split("/")[1],f=null,g=[(p=t)(i,r,a,!1),"webm"==h?p(n.N(),n.Sa,n.xa,!0):null],p=null,b(I,Promise.all(g),2);if(v=(m=I.h)[0],y=m[1]||null,w=null,x=c-o,S=c,T=d?c+d:1/0,"mp4"==h)var M=function(e,t,n,i,r,a,o){var s,u=(new rR).R("sidx",function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.S();if(0==u)throw new eC(2,3,3005);if(0==o.version)var l=o.reader.S(),c=o.reader.S();else l=o.reader.bd(),c=o.reader.bd();o.reader.skip(2);var d=o.reader.ma();for(e=e+o.size+c,c=0;c<d;c++){var h=o.reader.S(),p=(0x80000000&h)>>>31;h&=0x7fffffff;var f=o.reader.S();if(o.reader.skip(4),1==p)throw new eC(2,3,3006);s.push(new a3(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 eC(2,3,3004)}(v,r,i,n,x,S,T);else{M=v;var C=new hb(y);if(0x1a45dfa3!=hw(C).id)throw new eC(2,3,3008);var D=hw(C);if(0x18538067!=D.id)throw new eC(2,3,3009);C=D.g.byteOffset,D=new hb(D.g);for(var R=null;D.ta();){var P=hw(D);if(0x1549a966==P.id){R=P;break}}if(!R)throw new eC(2,3,3010);for(R=new hb(R.g),P=1e6,D=null;R.ta();){var L=hw(R);if(2807729==L.id)P=hA(L);
1else if(17545==L.id)if(4==L.g.byteLength)D=L.g.getFloat32(0);else if(8==L.g.byteLength)D=L.g.getFloat64(0);else throw new eC(2,3,3003)}if(null==D)throw new eC(2,3,3011);if(D*=R=P/1e9,0x1c53bb6b!=(M=hw(new hb(M))).id)throw new eC(2,3,3007);M=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new hb(e.g);for(var d=null,h=null;e.ta();){var p=hw(e);if(187==p.id){var f=function(e){var t=new hb(e.g);if(179!=(e=hw(t)).id)throw new eC(2,3,3013);if(e=hA(e),183!=(t=hw(t)).id)throw new eC(2,3,3012);t=new hb(t.g);for(var n=0;t.ta();){var i=hw(t);if(241==i.id){n=hA(i);break}}return{Lj:e,pj:n}}(p);f&&(p=n*f.Lj,f=t+f.pj,null!=d&&c.push(new a3(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}}return null!=d&&c.push(new a3(d+o,i+o,l,h,null,a,o,s,u)),c}(M,C,R,D,i,n,x,S,T)}for(k=(A=u(w=M)).next();!k.done;k=A.next())(E=k.value).codecs=e.J.codecs,E.mimeType=e.J.mimeType,E.bandwidth=e.bandwidth;return s.Ed(w),f=new sl(w),l&&f.Oc(S,T,!0),I.return(f)})}function hI(e){return e.dd}function hM(e){var t=hv(e,hI,"RepresentationIndex");return e=np((e=hm(e,hI,"indexRange"))||""),t&&(e=ns(t,"range",np,e)),e}function hC(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=tA&&"mp4"!=n&&"webm"!=n)throw new eC(2,4,4006);if("webm"==n&&!t)throw new eC(2,4,4005)}function hD(e){var t=e.J;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.se,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function hR(e){return e.Zb}function hP(t,n,i,r,a,o,s,l,c){c||t.J.he||(t.J.he=hm(t,hL,"initialization"));var d,h,p,f,g,m,v=t.J.he?function(e,t){var n=e.J.he;if(n||(n=hm(e,hL,"initialization")),!n)return null;n=tl(n);var i=e.J.originalId,r=e.bandwidth||null,a=e.J.Ua,o=e.vb;return(t=new a1(function(){var e=hp(n,i,null,null,r,null);return ty(a(),[e],o())},0,null,hD(e),null,null,t,e.ga.encrypted)).codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ha&&(t.g=e.ha.start+e.ha.duration),t}(t,s):null,y=(h=hf(d=t,hL),p=hm(d,hL,"media"),f=hm(d,hL,"index"),g=hm(d,hL,"k"),m=0,g&&(m=parseInt(g,10)),{Ke:h.Ke,Wa:h.Wa,timescale:h.timescale,Md:h.Md,hc:h.hc,yg:h.yg,timeline:h.timeline,ec:p&&tl(p),vd:f,mimeType:d.J.mimeType,codecs:d.J.codecs,bandwidth:d.bandwidth,fj:m}),b=y,w=+!!b.vd;if(0==(w+=+!!b.timeline+ +!!b.Wa)||(1!=w&&(b.vd&&(b.timeline=null),b.Ke=null,b.Wa=null),!b.vd&&!b.ec))throw new eC(2,4,4002);var x=t5(t);if(y.vd)return hC(t,v),{rc:function(){var e=hp(y.vd,x.J.originalId,null,null,x.bandwidth||null,null);return e=ty(x.J.Ua(),[e]),hE(x,n,v,e,0,null,y.hc)}};if(y.Wa)return r||"image"===t.ga.contentType||"text"===t.ga.contentType||(i=t.ha.start,r=t.pa.id,c=t.ha.duration,r=(r=null!=r&&o.get(r)||c)?i+r:1/0,t.presentationTimeline.Vf(y.Wa),t.presentationTimeline.kh(i,r)),{rc:function(){return function(t,n,i,r,a,o,s,l){function c(i){var a=i-y,s=a*v,u=n.Ke,c=a*u;"BigInt"in e&&c>Number.MAX_SAFE_INTEGER&&(c=BigInt(a)*BigInt(u)),s+=f,u=Math.min(a=s+v,h());var d=[],p=n.fj;if(p)for(var g=(u-s)/p,m={},k=0;k<p;m={Fh:void 0},k++){var E=s+g*k,I=E+g;m.Fh=k+1,(m=new a3(E,I,function(e){return function(){var t=hp(b,x,i,e.Fh,w,c);return ty(S(),[t],T())}}(m),0,null,r,A,f,h(),[],"",null,null,a4,o)).codecs=t.J.codecs,m.mimeType=t.J.mimeType,0==l?0<k&&m.Vc():0!=k%l&&m.Vc(),d.push(m)}return(s=new a3(s,u,function(){if(p)return[];var e=hp(b,x,i,null,w,c);return ty(S(),[e],T())},0,null,r,A,f,h(),d,"",null,null,a4,o,0<d.length)).codecs=t.J.codecs,s.mimeType=t.J.mimeType,s.bandwidth=t.bandwidth,s.j=a,s}function d(){var e=[Math.max(p.pb(),f),Math.min(p.cc(),h())].map(function(e){return e-f});return e=[Math.ceil(e[0]/v),Math.ceil(e[1]/v)-1],t.J.cb&&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.ha.start,g=t.pa.id,m=t.ha.duration,v=n.Wa,y=n.Md,b=n.ec,w=t.bandwidth||null,x=t.J.id,S=t.J.Ua,T=t.vb,A=f-n.hc,k=d();i=t.Ob?Math.max(k[0],k[1]-i+1):k[0],s=s||k[1],k=[];for(var E=i;E<=s;++E){var I=c(E);k.push(I)}var M=new sl(k);if(k=p.cc()<h(),E=p.U(),k||E){var C=Math.max(i,s+1);i=v,t.J.cb&&(i=.1),M.Le(i,function(){var e=p.pb();M.Pa(e);var t=u(d());t.next(),t=t.next().value;for(var n=[];C<=t;){var i=c(C);n.push(i),C++}return e>h()&&!n.length?null:n})}return Promise.resolve(M)}(x,y,a,v,o,s,l,t.J.De)}};var S=null;r=r=null,t.pa.id&&t.J.id&&(r=t.pa.id+","+t.J.id,r=i.get(r))&&(S=r.segmentIndex);var T=t.ha.start,A=t.ha.duration?T+t.ha.duration:1/0;return S?(hj(i=S,y,T,A,v),i.Pa(t.presentationTimeline.pb())):S=new hN(y,t.J.originalId,t.bandwidth,t.J.Ua,t.vb,T,A,v,s,t.J.De),y.timeline&&"image"!==t.ga.contentType&&"text"!==t.ga.contentType&&t.presentationTimeline.lh(S.h?S.h.timeline:[],T),r&&t.Ob&&(r.segmentIndex=S),{rc:function(){return S instanceof hN&&0==S.getNumReferences()&&hj(S,y,T,A,v),Promise.resolve(S)}}}function hL(e){return e.ic}function hN(e,t,n,i,r,a,o,s,u,l){sl.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=i,this.H=r,this.j=a,this.l=o,this.u=s,this.A=u,this.G=l,hO(this)}function hj(e,t,n,i,r){if(function(e,t){if(e.u!==t){e.u=t,e=u(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&function e(t,n){t.Y=n,t=u(t.g);for(var i=t.next();!i.done;
1i=t.next())e(i.value,n)}(n,t)}}(e,r),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),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,l(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;hO(e)}function hO(e){if(e.h&&!e.o){for(var t=[],n=u(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.Pa(e.j)}}function hU(e,t,n,i,r,a,o,s){return e=hp(e,t,n,a,i||null,r),ty(o(),[e],s()).map(function(e){return e.toString()})}function h_(e){this.o=null,this.A=e,this.G=new rd,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}function hB(e,t){var n,i,r,a,o;return R(function(s){var u,l,c,d;return 1==s.g?(n=rm(ty(e.i,[function(e,t){if(!e.m.length)return t;t=new es(t);var n,i=e.B||e.m[0],r=Math.round(e.A.getBandwidthEstimate()),a=t.g;return"DASH"==e.u?(a.add("_DASH_pathway",i),a.add("_DASH_throughput",String(r))):"HLS"==e.u&&(a.add("_HLS_pathway",i),a.add("_HLS_throughput",String(r))),ex(n=a),n.kd&&ed(t,a),t.toString()}(e,t)]),e.o.retryParameters),i=e.A.networkingEngine.request(8,n),rh(e.G,i),x(s,2),b(s,i.promise,4)):2!=s.g?(1==(a=JSON.parse(ti((r=s.h).data))).VERSION&&(u=e,l=a,c=r.uri,null!=u.g&&(u.g.stop(),u.g=null),d=l["RELOAD-URI"]||c,u.g=new eB(function(){hB(u,d)}),(c=l.TTL)&&(u.C=c),u.g.da(u.C),u.m=l["PATHWAY-PRIORITY"]||[],u.F=l["PATHWAY-CLONES"]||[]),T(s,0)):(o=A(s))&&7001==o.code?s.return():void(null!=e.g&&(e.g.stop(),e.g=null),e.g=new eB(function(){hB(e,t)}),e.g.da(e.C),w(s))})}function hF(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function hV(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=u(e.m),a=r.next(),o={};!a.done;o={Zc:void 0},a=r.next())if(o.Zc=a.value,a=t.get(o.Zc))i.push({$f:o.Zc,location:a});else if(a=e.F.find(function(e){return function(t){return t.gk==e.Zc}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].Ph?(el(s=new es(s),a["URI-REPLACEMENT"].Ph),i.push({$f:o.Zc,location:s.toString()})):i.push({$f:o.Zc,location:s}))}for(r=Date.now(),a=(o=u(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=u(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new es(t.location).nb))return!1;return!0})).length&&(e.B=i[0].$f),!(i=i.map(function(e){return e.location})).length&&e.h)for(o=(r=u(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.B=e.h,i.push(o));if(!i.length)for(r=(t=u(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:ty(e.i,i)}function hH(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}function hG(e,t){var n=[],i=[],r=[],a=[];e=u(e);for(var o=e.next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[pi(e),e]}));var l=new Map(s.videoStreams.map(function(e){return[pn(e),e]})),c=new Map(s.textStreams.map(function(e){return[pr(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[pa(e),e]})),t){var d=h9(tA);c.set(pr(d),d),d=h9("image"),s.set(pa(d),d)}n.push(o),i.push(l),r.push(c),a.push(s)}return{Fg:n,Nh:i,Jh:r,Zg:a}}function hK(e){var t,n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,S,T,A,k,E,I,M,C,D;return R(function(R){switch(R.g){case 1:if(t=tk,1==e.length)return R.return(e[0]);for(n=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.V}).map(function(e){return[pi(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.la}).map(function(e){return[pn(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.va}).map(function(e){return[pr(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.bf}).map(function(e){return[pa(e),e]}))}),s=(o=u(r)).next();!s.done;s=o.next())l=s.value,c=h8(t.va),l.set(pr(c),c);for(h=(d=u(a)).next();!h.done;h=d.next())p=h.value,f=h8(t.bf),p.set(pa(f),f);return b(R,hq(g=new hH,[],n,0,hY,h$,0),2);case 2:return m=R.h,b(R,hq(g,[],i,0,hY,h$,0),3);case 3:return v=R.h,b(R,hq(g,[],r,0,hY,h$,0),4);case 4:return y=R.h,b(R,hq(g,[],a,0,hY,h$,0),5);case 5:if(w=R.h,x=0,v.length&&m.length)for(k=(A=u(m)).next();!k.done;k=A.next())for(E=k.value,M=(I=u(v)).next();!M.done;M=I.next())C=M.value,D=x++,C.variantIds.push(D),E.variantIds.push(D);else for(T=(S=u(v.concat(m))).next();!T.done;T=S.next())T.value.variantIds=[x++];return R.return(v.concat(m).concat(y).concat(w))}})}function hq(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m,v,y,w,x,S;return R(function(T){switch(T.g){case 1:for(l=0,s=[];l<n.length;l++)l>
1=i?s.push(new Set(n[l].values())):s.push(new Set);d=(c=u(t)).next();case 2:var A,k,E,I,M,C,D;if(d.done){T.s(4);break}return b(T,(A=e,k=d.value,E=n,I=i,M=a,C=s,D=o,R(function(e){return 1==e.g?(hQ(A,E,k,0<D),k.matchedStreams?k.segmentIndex?b(e,hz(k,I+D),2):e.s(2):e.return(!1)):(hX(k,I,M,C,D),e.return(!0))})),5);case 5:if(!T.h)throw new eC(2,4,4037);d=c.next(),T.s(2);break;case 4:for(p=(h=u(s)).next();!p.done;p=h.next())for(g=(f=u(p.value)).next();!g.done;g=f.next())(m=function(e,t,n,i,r,a){if(pt(t))return null;var o=i(t);return(hQ(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return R(function(e){return o.segmentIndex?e.s(0):(o.segmentIndex=new sp,b(e,hz(o,0),0))})}),o.matchedStreams&&o.matchedStreams.length)?(hX(o,0,r,a,0),o):null}(e,g.value,n,r,a,s))&&t.push(m);for(y=(v=u(s)).next();!y.done;y=v.next())for(x=(w=u(y.value)).next(),S={};!x.done;S={pg:void 0},x=w.next())if(S.pg=x.value,!pt(S.pg)&&t.some(function(t){return function(n){return h0(e,t.pg,n)}}(S)))throw new eC(2,4,4037);return T.return(t)}})}function hz(e,t){var n,i,r,a,o,s;return R(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 b(u,Promise.all(n),2)}if(e.segmentIndex instanceof sp)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);w(u)})}function hX(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==iE(e.language,o.language)&&(s=!1),s&&(i[t-r].delete(o),o.fullMimeTypes))for(s=(o=u(o.fullMimeTypes.values())).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function hW(e){var t=Object.assign({},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=u(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=null,t}function hY(e){var t=Object.assign({},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 hJ(e,t){function n(e,t){e||(e=[]),t=u(t);for(var n=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=u(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=eL(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new eC(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=u(t.closedCaptions)).next();!r.done;r=i.next()){var a=u(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=hW(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new sp,n=u(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),hJ(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),hJ(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=hW(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.depen
1dencyStream.segmentIndex)return Promise.resolve();for(var t=new sp,n=u(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),hJ(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),hJ(e.dependencyStream,t))}function h$(e,t){var n=e.roles;n||(n=[]);for(var i=u(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=u(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,l(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=u(t.closedCaptions)).next();!n.done;n=t.next())n=(i=u(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function hQ(e,t,n,i){i=(void 0===i?0:i)?n.matchedStreams:[],t=u(t);for(var r=t.next();!r.done;r=t.next()){if(!(r=function(e,t,n){var i={audio:pi,video:pn,text:pr,image:pa}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a=({audio:function(t,n){return h0(e,t,n)},video:function(t,n){return h0(e,t,n)},text:h1,image:h2})[n.type];for(var o={audio:h3,video:h4,text:h5,image:h6}[n.type],s=u(t.values()),l=s.next();!l.done;l=s.next())a(n,l=l.value)&&n.fastSwitching==l.fastSwitching&&(!r||o(n,r,l))&&(r=l)}return e.u&&!pt(r)&&t.delete(i(r)),r}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function hZ(e,t){return e.mimeType==t.mimeType&&po(e.codecs)===po(t.codecs)}function h0(e,t,n){return(!!hZ(t,n)||!!e.o)&&(!t.drmInfos||!!eP(t.drmInfos,n.drmInfos))}function h1(e,t){return!t.language||e.forced===t.forced&&0!=iE(e.language,t.language)&&t.kind==e.kind}function h2(){return!0}function h3(e,t,n){var i=hZ(e,t),r=hZ(e,n);if(i&&!r)return!1;if(!i&&r||(i=iE(e.language,t.language),(r=iE(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;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&!!n.primary||(!t.primary||!!n.primary)&&((i=h7(e.channelsCount,t.channelsCount,n.channelsCount))==ps||i!=pl&&((i=h7(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==ps||i!=pl&&!!e.bandwidth&&pe(e.bandwidth,t.bandwidth,n.bandwidth)==ps))}function h4(e,t,n){var i=hZ(e,t),r=hZ(e,n);if(i&&!r)return!1;if(!i&&r||(i=h7(e.width*e.height,t.width*t.height,n.width*n.height))==ps)return!0;if(i==pl)return!1;if(e.frameRate){if((i=h7(e.frameRate,t.frameRate,n.frameRate))==ps)return!0;if(i==pl)return!1}return!!e.bandwidth&&pe(e.bandwidth,t.bandwidth,n.bandwidth)==ps}function h5(e,t,n){var i=iE(e.language,t.language),r=iE(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 h6(e,t,n){return h7(e.width*e.height,t.width*t.height,n.width*n.height)==ps}function h8(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 h9(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sl([]),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 h7(e,t,n){if(t==e&&e!=n)return pl;if(n==e&&e!=t)return ps;if(t>e){if(n<=e||n-e<t-e)return ps;if(n-e>t-e)return pl}else{if(n>e)return pl;if(e-n<e-t)return ps;if(e-n>e-t)return pl}return pu}function pe(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?ps:t<e?pl:pu}function pt(e){switch(e.type){case tA:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function pn(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,po(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 pi(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,po(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function pr(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function pa(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function po(e){if(!pc.has(e)){var t=it(e);pc.set(e,t)}return pc.get(e)}g(hN,sl),(c=hN.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},c.release=function(){sl.prototype.release.call(this),this.h=null},c.Pa=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length;i+=1)if(n[i].end+this.j<=e)t+=1;else break;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()
1)}},c.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},c.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.yj,a=i.zg+this.h.yg;n=this.j-this.h.hc;var o=this.j+i.end,s=o;e===this.getNumReferences()-1&&1/0!==this.l&&(s=Math.min(s,this.l));for(var u=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],h=(i.end-i.start)/i.Jb,p={},f=0;f<i.Jb;p={Ne:void 0,Gh:void 0},f++){var g=i.start+h*f,m=g+h;p.Gh=f+1,p.Ne=null,(p=new a3(this.j+g,this.j+m,function(e){return function(){return t.h?(null==e.Ne&&(e.Ne=hU(t.h.ec,t.F,r,t.B,a,e.Gh,t.C,t.H)),e.Ne):[]}}(p),0,null,this.u,n,this.j,this.l,[],"",null,null,a4,this.A)).codecs=u,p.mimeType=l,p.bandwidth=c,0==this.G?0<f&&p.Vc():0!=f%this.G&&p.Vc(),d.push(p)}(n=new a3(this.j+i.start,s,function(){return 0<i.Jb||!t.h?[]:hU(t.h.ec,t.F,r,t.B,a,null,t.C,t.H)},0,null,this.u,n,this.j,this.l,d,"",null,null,a4,this.A,0<i.Jb)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=c,this.g[e]=n}return n},c.xb=function(e){hO(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},h_.prototype.configure=function(e){this.o=e},h_.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},h_.prototype.setManifestType=function(e){this.u=e},h_.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(c=hH.prototype).release=function(){for(var e=u(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.o=!1,this.m.clear()},c.Mi=function(){return this.l},c.Lf=function(){return this.j.slice()},c.ri=function(){return this.i},c.Mg=function(e,t){if(e){if("audio"==e.type)for(var n=u(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=u(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==tA)for(i=(n=u(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=u(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)}},c.jf=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,x,S,T,A,k,E,I,M,C,D,P,L,N,j,O,U,_=this;return R(function(R){if(1==R.g){if(i=tk,!t&&1==e.length)return a=(r=hG(e,!1)).Fg,o=r.Nh,s=r.Jh,l=r.Zg,_.h=Array.from(a[0].values()),_.g=Array.from(o[0].values()),_.j=Array.from(s[0].values()),_.i=Array.from(l[0].values()),R.s(2);for(c=n?_.m.size:0,d=-1,h=0;h<e.length;h++)p=e[h],_.m.has(p.id)||(_.m.add(p.id),-1==d&&(d=h));return -1==d?R.return():(g=(f=hG(e,!0)).Fg,m=f.Nh,v=f.Jh,y=f.Zg,b(R,Promise.all([hq(_,_.h,g,d,hW,hJ,c),hq(_,_.g,m,d,hW,hJ,c),hq(_,_.j,v,d,hW,hJ,c),hq(_,_.i,y,d,hW,hJ,c)]),2))}if(x=0,S=[],_.g.length&&_.h.length)for(C=(M=u(_.h)).next();!C.done;C=M.next())for(D=C.value,L=(P=u(_.g)).next();!L.done;L=P.next())N=L.value,j=eL(D.drmInfos,N.drmInfos),D.drmInfos.length&&N.drmInfos.length&&!j.length||(O=(D.bandwidth||0)+(N.bandwidth||0),D.dependencyStream&&(O+=D.dependencyStream.bandwidth||0),N.dependencyStream&&(O+=N.dependencyStream.bandwidth||0),U=x++,S.push({id:U,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D,video:N,bandwidth:O,drmInfos:j,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=(T=u(_.g.length?_.g:_.h)).next();!A.done;A=T.next())k=A.value,E=x++,I=k.bandwidth||0,k.dependencyStream&&(I+=k.dependencyStream.bandwidth||0),S.push({id:E,language:k.language,disabledUntilTime:0,primary:k.primary,audio:k.type==i.V?k:null,video:k.type==i.la?k:null,bandwidth:I,drmInfos:k.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});_.l=S,w(R)})},c.vh=function(e){this.o=e},c.Bh=function(e){this.u=e},B("shaka.util.PeriodCombiner",hH),hH.prototype.setUseStreamOnce=hH.prototype.Bh,hH.prototype.setAllowMultiT
1ypeVariants=hH.prototype.vh,hH.prototype.combinePeriods=hH.prototype.jf,hH.prototype.deleteStream=hH.prototype.Mg,hH.prototype.getImageStreams=hH.prototype.ri,hH.prototype.getTextStreams=hH.prototype.Lf,hH.prototype.getVariants=hH.prototype.Mi;var ps=1,pu=0,pl=-1,pc=new Map;function pd(e,t){try{var n=ta(e),i=t,r=new DOMParser,a=ph.value()(n);n=null;try{n=r.parseFromString(a,"text/xml")}catch(e){return null}if(!(r=n.documentElement)||r.getElementsByTagName("parsererror").length||r.tagName!=i)return null;if(!("createNodeIterator"in document))return r;for(i=document.createNodeIterator(n,NodeFilter.SHOW_ALL);n=i.nextNode();)if(n instanceof HTMLElement||n instanceof SVGElement)return null;return r}catch(e){return null}}var ph=new eR(function(){if("u">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 pp(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.oa=1,this.F=[],this.l={qe:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.u=new Map,this.o=new Map,this.B=new Map,this.ka=new Map,this.m=new hH,this.I=0,this.na=new H(5),this.K=new eB(function(){e.H&&!e.g.continueLoadingWhenPaused&&(e.G.Ka(e.H,"timeupdate"),e.H.paused)?e.G.qa(e.H,"timeupdate",function(){return pT(e)}):pT(e)}),this.O=new rd,this.M=null,this.C=[],this.$=1/0,this.fa=!1,this.h=null,this.L=0,this.P=!1,this.G=new Q,this.H=null,this.T=!1,this.Z="",this.ea=function(){return!1},this.W=[]}function pf(e){var t,n,i,r,a,o,s,c,d;return R(function(h){if(1==h.g)return t=4,n="MPD",i=function(e){var t=e.l.Id;if(!e.l.qe||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(e){return!(e=nm(e.attributes.ttl))||t+e>n}).map(ni).filter(ib);return i.length?ty(e.A,i):[]}(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(a=hV(e.h,"Location",!0)).length&&(r=a),o=rm(r,e.g.retryParameters),s=Date.now(),b(h,pC(e,o,0,{type:t}),2);if(3!=h.g){var p,f,g,m,v,y,x,S,T,A,k,E;return(c=h.h,e.j)?(c.uri&&c.uri!=c.originalUri&&!e.A.includes(c.uri)&&e.A.unshift(c.uri),e.Z=new es(c.uri).g.toString(),b(h,(p=e,f=c.data,g=c.uri,m=n,R(function(e){if(1==e.g){var t,n,i,r,a,o,s,c,d,h,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H;if(v=f,(y=p.g.dash.manifestPreprocessor)!=uu){if(en("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(x=pd(v,m)))throw new eC(2,4,4001,g);y(x),v=to(x.outerHTML)}if(!(S=t6(v,m)))throw new eC(2,4,4001,g);return((T=p.g.dash.manifestPreprocessorTXml)!=ul&&T(S),"Patch"===m)?e.return((t=p,n=S,R(function(e){if(1==e.g){if(i=n.attributes.mpdId,r=ns(n,"originalPublishTime",nd),!i||i!==t.l.qe||r!==t.l.Id)throw t.F=[],new eC(1,4,4052);for(a=[],o=[],s=new Set,d=(c=u(ne(n))).next();!d.done;d=c.next())if(M=(I=nw((h=d.value).attributes.sel||""))[I.length-1],C=ni(h)||"","MPD"===M.name)if("mediaPresentationDuration"===M.ac){var p,f,g=nh(ni(h)||"");if(null!=g){t.l.Wb=g;for(var m=u(t.u.values()),v=m.next();!v.done;v=m.next())v.value.Wb=g}}else if("type"===M.ac){for(t.i.presentationTimeline.Gc("static"==C),t.l.type=C,m=(g=u(t.u.values())).next();!m.done;m=g.next())m.value.Ob="dynamic"==C;"static"==C&&(t.I=-1)}else"publishTime"===M.ac?t.l.Id=nd(C)||0:null===M.ac&&"add"===h.tagName&&o.push(h);else if("PatchLocation"===M.name)nx(t.F,h);else if("Period"===M.name)"add"===h.tagName?o.push(h):"remove"===h.tagName&&M.id&&function(e,t){e.i.periodCount--;for(var n=u(e.u.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(hv(e.u.get(i),hL,"SegmentTimeline").children=[],py(e,i),e.u.delete(i));e.C=e.C.filter(function(e){return e!==t})}(t,M.id);else if("SegmentTemplate"===M.name){if((g=(m=nw(h.attributes.sel||""))[m.length-1]).ac){m=pv(t,m),v=ni(h)||"";for(var y=u(m),x=y.next();!x.done;x=y.next())nT((x=t.u.get(x.value)).J.ic,h.tagName,g.ac,v);g=m}else g=[];for(P=(D=u(g)).next();!P.done;P=D.next())L=P.value,s.add(L)}else if("SegmentTimeline"===M.name||"S"===M.name){for(v=(m=u(g=pv(t,g=nw(h.attributes.sel||"")))).next();!v.done;v=m.next())nx(y=nt(v=hv(v=t.u.get(v.value),hL,"SegmentTimeline"),"S"),h),v.children=y;for(j=(N=u(g)).next();!j.done;j=N.next())O=j.value,s.add(O)}for(_=(U=u(s)).next();!_.done;_=U.next())py(t,_.value);for(F=(B=u(o)).next();!F.done;
1F=B.next()){V=F.value,a.push.apply(a,l((p=t,f=V,pb(p,{Ob:"dynamic"==p.l.type,presentationTimeline:p.i.presentationTimeline,pa:null,ha:null,ga:null,J:null,bandwidth:0,Nf:!1,cb:p.l.cb,profiles:p.l.profiles,Wb:p.l.Wb,roles:null,vb:function(){return""}},p.l.Ua,f,!0).periods)))}return a.length?(t.i.periodCount+=a.length,t.i.gapCount=t.L,b(e,pm(t,a,!0),2)):e.s(2)}"static"==t.l.type&&(H=t.l.Wb,t.i.presentationTimeline.bb(H||1/0)),w(e)}))):p.g.dash.disableXlinkProcessing?e.return(pg(p,S,g)):(A=p.g.dash.xlinkFailGracefully,k=hy(S,p.g.retryParameters,A,g,p.j.networkingEngine),rh(p.O,k),b(e,k.promise,2))}return E=e.h,e.return(pg(p,E,g))})),3)):h.return(0)}return d=(Date.now()-s)/1e3,e.na.sample(1,d),h.return(d)})}function pg(e,t,n){var i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,W,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo;return R(function(es){switch(es.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],a=new Map,s=(o=u(nt(t,"Location"))).next();!s.done;s=o.next())c=(l=s.value).attributes.serviceLocation,(d=ni(l))&&(h=ty(i,[d])[0],c&&(e.h?hF(e.h,"Location",c,h):a.set(c,h)),r.push(h));if(e.h?0<(p=hV(e.h,"Location",!0)).length&&(i=e.A=p):r.length&&(i=e.A=r),e.l.qe=t.attributes.id||"",e.l.Id=ns(t,"publishTime",nd)||0,e.F=nt(t,"PatchLocation"),f=Promise.resolve(),(g=na(t,"ContentSteering"))&&e.j)for(m=g.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=m):(e.h=new h_(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=m,(v=ni(g))&&(ns(g,"queryBeforeStart",ny,!1)?f=hB(e.h,v):hB(e.h,v))),S=(y=u(a.keys())).next();!S.done;S=y.next())k=S.value,E=a.get(k),hF(e.h,"Location",k,E);if(I=nt(t,"BaseURL"),M=!1,e.h)for(D=(C=u(I)).next();!D.done;D=C.next())L=(P=D.value).attributes.serviceLocation,N=ni(P),L&&N&&(hF(e.h,"BaseURL",L,N),M=!0);if(e.W=null,M&&e.h||(j=I.map(ni),e.W=ty(i,j)),O=function(){return e.h&&M?hV(e.h,"BaseURL"):e.W?e.W:[]},e.l.Ua=O,U=0,I&&I.length&&(U=ns(I[0],"availabilityTimeOffset",nv)||0),e.l.cb=U,e.I=ns(t,"minimumUpdatePeriod",nh,-1),_=ns(t,"availabilityStartTime",nd),B=ns(t,"timeShiftBufferDepth",nh),F=e.g.dash.ignoreSuggestedPresentationDelay,V=null,F||(V=ns(t,"suggestedPresentationDelay",nh)),H=e.g.dash.ignoreMaxSegmentDuration,G=null,H||(G=ns(t,"maxSegmentDuration",nh)),K=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.T=e.i.presentationTimeline.U()&&"static"==K),e.l.type=K,e.i)for(z=(q=e.i.presentationTimeline).pb(),Y=(W=u(e.o.values())).next();!Y.done;Y=W.next())(J=Y.value).segmentIndex&&J.segmentIndex.Pa(z);else $=e.g.dash.ignoreMinBufferTime,Q=0,$||(Q=ns(t,"minBufferTime",nh)||0),q=new oZ(_,null!=V?Math.min(V,B||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*Q,B||1/0),e.g.dash.autoCorrectDrift);return q.Gc("static"==K),q.U()&&!isNaN(e.g.availabilityWindowOverride)&&(B=e.g.availabilityWindowOverride),null==B&&(B=1/0),q.Fe(B),Z=t.attributes.profiles||"",e.l.profiles=Z.split(","),ee={Ob:"static"!=K,presentationTimeline:q,pa:null,ha:null,ga:null,J:null,bandwidth:0,Nf:!1,cb:U,Wb:null,profiles:Z.split(","),roles:null,vb:function(){return""}},b(es,f,2);case 2:if(e.L=0,en=(et=pb(e,ee,O,t,!1)).duration,ei=et.periods,("static"!=K||e.T)&&et.Og||q.bb(en||1/0),e.P&&e.fa&&q.wh(e.$),q.Vf(G||1),e.P&&e.fa&&(er=null!=V?V:e.g.defaultPresentationDelay,q.lg(er)),!e.i)return b(es,e.m.jf(ei,ee.Ob),6);return e.i.periodCount=ei.length,e.i.gapCount=e.L,b(es,pm(e,ei,!1),4);case 6:var eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey;if(e.i={presentationTimeline:q,variants:e.m.l,textStreams:e.m.Lf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:function(e){var t=na(e,"ServiceDescription");if(!t||(e=na(t,"Latency"),t=na(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}(t),nextUrl:function(e){if(!(e=nt(e,"SupplementalProperty")).length)return null;e=u(e);for(var t=e.next();!t.done;t=e.next())if("urn:mpeg:dash:chaining:2016"==(t=t.value).attributes.schemeIdUri)return t.attributes.value;return null}(t),periodCount:ei.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!q.Lh()){es.s(7);break}return ea=nt(t,"UTCTiming"),b(es,(eu=e,el=O,ec=ea,R(function(e){switch(e.g){case 1:ed=ec.map(function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}}),eh=eu.g.dash.clockSyncUri,!ed.length&&eh&&ed.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:eh}),ef=(ep=u(ed)).next();case 2:if(ef.done){e.s(4);break}switch(eg=ef.value,x(e,5),em=eg.scheme,ev=eg.value,em){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return e.s(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 e.s(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return ey=Date.parse(ev),e.return(isNaN(ey)?0:ey-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",em)}e.s(9);break;case 7:return b(e,pE(eu,el,ev,"HEAD"),10);case 10:case 11:return e.return(e.h);case 8:return b(e,pE(eu,el,ev,"GET"),11);case 9:T(e,3);break;case 5:A(e);case 3:ef=ep.next(),e.s(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),e.return(0)}})),8);case 8:if(eo=es.h,!e.j)return es.return();q.xh(eo);case 7:q.me(),e.m&&!e.i.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),function(e){var t=Array.from(e.B.keys()).filter(function(t){return!e.C.includes(t)});t=u(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=u(e.B.get(n)),a=r.next();!a.done;a=r.next()){a=a.value;var o=e.o.get(a);o&&(o.segmentIndex&&0!=o.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.Mg(o,n),e.o.delete(a)))}i&&e.B.delete(n)}}(e),w(es)}})}function pm(e,t,n){var i;return R(function(r){if(1==r.g)return b(r,e.m.jf(t,!0,n),2);e.i.variants=e.m.l,0<(i=e.m.Lf()).length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),w(r)})}function pv(e,t){var n="",i="",r=-1,a="";t=u(t);for(var o=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);
1else if(i)for(e=(r=u(e.u.values())).next();!e.done;e=r.next())(e=e.value).pa.id===n&&e.ga.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(e=(i=u(e.u.values())).next();!e.done;e=i.next())(e=e.value).pa.id===n&&e.ga.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function py(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Pa(e.i.presentationTimeline.pb());try{var r=hP(n,function(t,n,i,r){return pI(e,t,n,i,r)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return R(function(e){if(1==e.g)return i.segmentIndex?e.s(0):b(e,r.rc(),3);i.segmentIndex=e.h,w(e)})}}catch(e){if((t=n.J.contentType)!=tA&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function pb(e,t,n,i,r){var a=t.Wb;a||(a=ns(i,"mediaPresentationDuration",nh),e.l.Wb=a);var o=0;e.i&&e.i.presentationTimeline&&e.T&&(o=e.i.presentationTimeline.Hb());var s=[],c=o;i=nt(i,"Period");for(var d=0;d<i.length;d++){var h=i[d],p=i[d+1],f=ns(h,"start",nh,c),g=h.attributes.id,m=ns(h,"duration",nh);f=0==d&&0==f&&e.T?o:f;var v=null;if(p){var y=ns(p,"start",nh);null!=y&&(v=y-f+o)}else null!=a&&(v=a-f+o);if(y=tE,v&&m&&Math.abs(v-m)>y&&v>m&&e.L++,null==v&&(v=m),!(null!==e.M&&null!==g&&null!==f&&f<e.M)||e.C.includes(g)||d+1==i.length){if(null!==f&&(null===e.M||f>e.M)&&(e.M=f),c=function(e,t,n,i){t.pa=pk(e,i.node,null,n),t.ha=i,t.pa.cb=t.cb,t.pa.id||(t.pa.id="__shaka_period_"+i.start);var r=nt(i.node,"EventStream");n=t.presentationTimeline.pb(),r=u(r);for(var a=r.next();!a.done;a=r.next())!function(e,t,n,i,r){var a=i.attributes.schemeIdUri||"",o=i.attributes.value||"",s=ns(i,"timescale",nm)||1,l=ns(i,"presentationTimeOffset",nm)||0;i=u(nt(i,"Event"));for(var c=i.next();!c.done;c=i.next()){var d=ns(c=c.value,"presentationTime",nm)||0,h=ns(c,"duration",nm)||0;h=(d=Math.max((d-l)/s+t,t))+h/s,null!=n&&(d=Math.min(d,t+n),h=Math.min(h,t+n)),h<r||(c={schemeIdUri:a,value:o,startTime:d,endTime:h,id:c.attributes.id||"",timescale:s,eventElement:function e(t){var n="",i=t.tagName.split(":");for(var r in 0<i.length&&(n=i[0],n=nE.has(n)?nE.get(n):""),n=document.createElementNS(n,t.tagName),t.attributes)n.setAttribute(r,t.attributes[r]);for(r=(t=u(t.children)).next();!r.done;r=t.next())r=r.value,i=void 0,i="string"==typeof r?new Text(r):e(r),n.appendChild(i);return n}(c),eventNode:nA(c)},e.j.onTimelineRegionAdded(c))}}(e,i.start,i.duration,a.value,n);for(r=(n=u(n=nt(i.node,"SupplementalProperty"))).next();!r.done;r=n.next())"urn:mpeg:dash:urlparam:2014"==(r=r.value).attributes.schemeIdUri&&(r=pS(e,r))&&(t.vb=r);if(n=nt(i.node,"AdaptationSet").map(function(n,i){return px(e,t,i,n)}).filter(ib),t.Ob){r=[],a=u(n);for(var o=a.next();!o.done;o=a.next()){o=u(o.value.tj);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new eC(2,4,4018)}for(r=new Map,o=(a=u(n)).next();!o.done;o=a.next())for(s=(o=u(o.value.fi)).next();!s.done;s=o.next()){var c=u(s.value);s=c.next().value,c=c.next().value,r.set(s,c)}if(r.size)for(a=null,s=(o=u(n)).next();!s.done;s=o.next()){s=s.value,c=[];for(var d=u(s.streams),h=d.next(),p={};!h.done;p={qg:void 0},h=d.next())if(p.qg=h.value,r.has(p.qg.originalId)){a||(a=nt(i.node,"AdaptationSet").map(function(n,i){return px(e,t,i,n)}).filter(ib)),h=u(a);for(var f=h.next();!f.done;f=h.next())(f=f.value.streams.find(function(e){return function(t){return t.originalId==e.qg.originalId}}(p)))&&(f.dependencyStream=r.get(f.originalId),c.push(f))}c.length&&s.streams.push.apply(s.streams,l(c))}if(i=n.filter(function(e){return!e.xg}),n=n.filter(function(e){return e.xg}),!e.g.disableIFrames){for(r=(n=u(n)).next();!r.done;r=n.next())for(a=(r=r.value).xg.split(" "),s=(o=u(i)).next();!s.done;s=o.next())if(s=s.value,a.includes(s.id))for(c=(s=u(s.streams)).next();!c.done;c=s.next())iJ(c.value,r.streams)}if(n=pw(e.g.disableAudio,i,"audio"),r=pw(e.g.disableVideo,i,"video"),a=pw(e.g.disableText,i,tA),i=pw(e.g.disableThumbnails,i,"image"),0===r.length&&0===n.length)throw new eC(2,4,4004);return{id:t.pa.id,audioStreams:n,videoStreams:r,textStreams:a,imageStreams:i}}(e,t,n,{start:f,duration:v,node:h,ah:null==v||!p}),s.push(c),t.pa.id&&v&&e.ka.set(t.pa.id,v),null==v){c=null;break}c=f+v}}if(r)for(n=(t=u(s)).next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=s.map(function(e){return e.id});return null!=a?{periods:s,duration:a+o,Og:!1}:{periods:s,duration:c,Og:!0}}function pw(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,l(t.streams)),e},[])}
1function px(t,n,i,r){function a(e){var i=e.attributes["dvb:fontFamily"];e=e.attributes["dvb:url"],i&&e&&(e=ty(n.ga.Ua(),[e],n.vb()),t.j.addFont(i,e[0]))}function 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.ga=pk(t,r,n.pa,null),n.ga.position=i;var c=!1,d=(i=nt(r,"Role")).map(function(e){return e.attributes.value}).filter(ib),h=void 0,p=n.ga.contentType==tA;p&&(h="subtitle"),i=u(i);for(var f=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){case"main":c=!0;break;case"caption":case"subtitle":h=f}}var m=nt(r,"EssentialProperty");i=null;var v=!1;f=null,g=!1,m=u(m);for(var y=m.next();!y.done;y=m.next()){var x=(y=y.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==x)i=y.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==x)var S=s(parseInt(y.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==x)var T=o(parseInt(y.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=x&&("urn:mpeg:dash:ssr:2023"==x&&t.g.dash.enableFastSwitching?v=!0:"urn:dvb:dash:fontdownload:2014"==x?a(y):"urn:mpeg:dash:urlparam:2014"==x&&(f=pS(t,y))||(g=!0))}if(g)return null;var A=null;for(m=(g=u(g=nt(r,"SupplementalProperty"))).next();!m.done;m=g.next())"http://dashif.org/guidelines/last-segment-number"==(y=(m=m.value).attributes.schemeIdUri)?A=parseInt(m.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==y?S=s(parseInt(m.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==y?T=o(parseInt(m.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==y?a(m):"urn:mpeg:dash:urlparam:2014"==y&&(f=pS(t,m));f&&(n.vb=f),f=nt(r,"Accessibility");var k,E=new Map;for(g=(f=u(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&&(d.push(m),"captions"==m&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==g&&("1"==m?k="visually impaired":"2"==m&&(k="hard of hearing"));else if(g=1,null!=m)for(y=(m=u(m.split(";"))).next();!y.done;y=m.next()){x=y.value;var I=y=void 0;x.includes("=")?(y="svc"+(x=x.split("="))[0],I=x[1].split(",")[0].split(":").pop()):(y="svc"+g,g++,I=x),E.set(y,ik(I))}else E.set("svc1","und");else if(g=1,null!=m)for(x=(y=u(m=m.split(";"))).next();!x.done;x=y.next()){I=x.value;var M=x=void 0;I.includes("=")?(x=(I=I.split("="))[0].startsWith("CC")?I[0]:"CC"+I[0],M=I[1]||"und"):(x="CC"+g,2==m.length?g+=2:g++,M=I),E.set(x,ik(M))}else E.set("CC1","und");var C=hc(f=nt(r,"ContentProtection"),t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI);n.ga.encrypted=0<f.length;var D=ik(n.ga.language||"und"),P=n.ga.label,L=new Map;if(r=nt(r,"Representation"),!t.g.ignoreSupplementalCodecs){for(f=[],m=(g=u(r)).next();!m.done;m=g.next())(m=nu(y=m.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((y=t4(y)).attributes.codecs=m.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),f.push(y));r.push.apply(r,l(f))}if(0==(f=r.map(function(i){var r=function(t,n,i,r,a,o,s,u,l,c,d,h){n.J=pk(t,c,n.ga,null);var p,f,g=n.J.id;if(t.$=Math.min(t.$,n.J.cb),t.P=0<t.$,!(0==(C=+!!(M=n.J).dd+(+!!M.Zb+ +!!M.ic))?M.contentType==tA||"application"==M.contentType:(1!=C&&(M.dd&&(M.Zb=null),M.ic=null),!0)))return null;var m=n.ha.start;n.bandwidth=ns(c,"bandwidth",ng)||0,n.roles=u;var v=nt(c,"SupplementalProperty"),y=nt(c,"EssentialProperty"),x=nt(c,"ContentProtection");c=null;var S=y.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});S?c=pS(t,S):(S=v.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri}))&&(c=pS(t,S)),c&&(n.vb=c),c=(S=n.J.contentType)==tA||"application"==S,S="image"==S,x.length&&(n.ga.encrypted=!0);try{var T=void 0;if(i.ef){var A=n.J.Ua,k=n.vb,E=ty(A(),[i.ef.Zi],k()),I=rm(E,t.g.retryParameters);T={bitsKey:128,blockCipherMode:"CBC",iv:i.ef.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;
1return R(function(a){if(1==a.g)return b(a,pC(t,I,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new eC(2,4,4049);return i={name:"AES-CBC"},r=T,b(a,e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.h,T.fetchKey=void 0,w(a)})}}}if(n.J.aesKey=T,A=function(e,n,i,r){return pI(t,e,n,i,r)},n.J.dd)var M,C,D,P,L,N,j,O,U,_,B,F=(D=n,P=A,L=T,N=Number(hm(D,hI,"presentationTimeOffset"))||0,j=hm(D,hI,"timescale"),O=1,j&&(O=ng(j)||1),U=N/O||0,_=hk(D,hI,L),function(e,t){if(hC(e,t),!hM(e))throw new eC(2,4,4002)}(D,_),B=t5(D),{rc:function(){var e=hv(B,hI,"RepresentationIndex"),t=B.J.Ua();return e&&(e=tl(e.attributes.sourceURL))&&(t=ty(t,[e],B.vb())),e=hM(B),hE(B,P,_,t,e.start,e.end,U)}});else if(n.J.Zb)F=function(e,t,n){var i,r,a,o,s,u=hk(e,hR,n),l=(a=[(r=i=e).J.Zb,r.ga.Zb,r.pa.Zb].filter(ib).map(function(e){return nt(e,"SegmentURL")}).reduce(function(e,t){return 0<e.length?e:t}).map(function(e){e.attributes.indexRange&&!r.Nf&&(r.Nf=!0);var t=tl(e.attributes.media);return{ej:t,start:(e=ns(e,"mediaRange",np,{start:0,end:null})).start,end:e.end}}),o=(i=hf(i,hR)).Md,0==o&&(o=1),s=0,i.Wa?s=i.Wa*(o-1):i.timeline&&0<i.timeline.length&&(s=i.timeline[0].start),{Wa:i.Wa,startTime:s,Md:o,hc:i.hc,timeline:i.timeline,Xc:a});if(!l.Wa&&!l.timeline&&1<l.Xc.length||!l.Wa&&!e.ha.duration&&!l.timeline&&1==l.Xc.length||l.timeline&&0==l.timeline.length)throw new eC(2,4,4002);var c=null,d=null;e.pa.id&&e.J.id&&(d=t.get(e.pa.id+","+e.J.id))&&(c=d.segmentIndex);var h=function(e,t,n,i,r,a,o,s,u,l){var c=i.Xc.length;i.timeline&&i.timeline.length!=i.Xc.length&&(c=Math.min(i.timeline.length,i.Xc.length));for(var d=e-i.hc,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<c;g={Me:void 0,Ce:void 0},m++){g.Ce=i.Xc[m];var v=f;f=void 0,f=null!=i.Wa?v+i.Wa:i.timeline?i.timeline[m].end:v+t,g.Me=null,(g=new a3(e+v,e+f,function(e){return function(){return null==e.Me&&(e.Me=ty(n(),[e.Ce.ej],l())),e.Me}}(g),g.Ce.start,g.Ce.end,r,d,e,h,[],"",null,null,a4,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.ha.start,e.ha.duration,e.J.Ua,l,u,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.vb);return t=!c,c?c.Bd(h,e.presentationTimeline.pb()):c=new sl(h),e.presentationTimeline.Ed(h),e.Ob&&e.ha.ah||c.Oc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),d&&(d.segmentIndex=c),{rc:function(){return c&&0!=c.getNumReferences()||c.oe(h),Promise.resolve(c)}}}(n,t.o,T);else if(n.J.ic)F=hP(n,A,t.o,!!t.i,t.g.dash.initialSegmentLimit,t.ka,T,h,!1);else{var V=n.ha.duration||0,H=n.J.Ua,G=n.J.mimeType,K=n.J.codecs;F={rc:function(){var e=sd(m,V,H());return e.xb(function(e){e.mimeType=G,e.codecs=K}),Promise.resolve(e)}}}}catch(e){if((c||S)&&4002==e.code)return null;throw e}if(h=new Set((h=function(e,t,n,i){var r=hc(e,n,i);
1if(t.Qg)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.Qg=!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 eC(2,4,4008);return r.Lg||t.Lg}(x,i,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI))?[h]:[]),x=!1,v.some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value})&&(x=!0),v=!1,c&&(v=u.includes("forced_subtitle")||u.includes("forced-subtitle")),S&&((y=y.find(function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.attributes.schemeIdUri)}))&&(p=y.attributes.value),!p))return null;c=n.J.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"))&&(f="PQ"),y=n.J.id?n.pa.id+","+n.J.id:"",t.F.length&&g&&t.u.set(n.pa.id+","+g,function(e){function t(e){return e?((e=t5(e)).dd=null,e.Zb=null,e.ic=nA(e.ic),e):null}return(e=t5(e)).pa=t(e.pa),e.ga=t(e.ga),e.J=t(e.J),e.ha&&(e.ha=t5(e.ha),e.ha.node=null),e}(n));var q=y&&t.o.has(y)?t.o.get(y):{id:t.oa++,originalId:n.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){q.segmentIndex&&(q.segmentIndex.release(),q.segmentIndex=null)},segmentIndex:null,mimeType:n.J.mimeType,codecs:c,frameRate:n.J.frameRate,pixelAspectRatio:n.J.pixelAspectRatio,bandwidth:n.bandwidth,width:n.J.width,height:n.J.height,kind:r,encrypted:0<i.drmInfos.length,drmInfos:i.drmInfos,keyIds:h,language:a,originalLanguage:n.ga.language,label:o,type:n.ga.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:n.J.emsgSchemeIdUris,roles:u,forced:v,channelsCount:n.J.se,audioSamplingRate:n.J.audioSamplingRate,spatialAudio:x,closedCaptions:l,hdr:f,colorGamut:void 0,videoLayout:void 0,tilesLayout:p,accessibilityPurpose:d,external:!1,fastSwitching:!1,fullMimeTypes:new Set([n8(n.J.mimeType,n.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return q.createSegmentIndex=function(){var e;return R(function(t){if(1==t.g)return q.segmentIndex?t.s(0):(e=q,b(t,F.rc(),3));e.segmentIndex=t.h,w(t)})},y&&n.Ob&&!t.o.has(y)&&(n=n.pa.id||"",t.B.has(n)||t.B.set(n,[]),t.o.set(y,q),t.B.get(n).push(y)),q}(t,n,C,h,D,P,c,d,E,i,k,A);return r&&(r.hdr=r.hdr||S,r.colorGamut=r.colorGamut||T,r.fastSwitching=v,i=i.attributes.dependencyId)?(r.baseOriginalId=i,L.set(i,r),null):r}).filter(function(e){return!!e})).length&&0==L.size){if(i="image"==n.ga.contentType,t.g.dash.ignoreEmptyAdaptationSet||p||i)return null;throw new eC(2,4,4003)}if(!n.ga.contentType||"application"==n.ga.contentType)for(n.ga.contentType=pM(f[0].mimeType,f[0].codecs),g=(p=u(f)).next();!g.done;g=p.next())g.value.type=n.ga.contentType;for(p=n.ga.id||"__fake__"+t.oa++,m=(g=u(f)).next();!m.done;m=g.next()){for(m=m.value,x=(y=u(C.drmInfos)).next();!x.done;x=y.next())(x=x.value).keyIds=x.keyIds&&m.keyIds?new Set([].concat(l(x.keyIds),l(m.keyIds))):x.keyIds||m.keyIds;m.groupId=p}return r=r.map(function(e){return e.attributes.supplementalId||e.attributes.id}).filter(ib),{id:p,contentType:n.ga.contentType,language:D,Sk:c,streams:f,drmInfos:C.drmInfos,xg:i,tj:r,fi:L}}function pS(e,t){if((t=no(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ns(t,"useMPDUrlQuery",ny,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.Z:n.split("&").map(function(t){if("$querypart$"==t)return e.Z;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new ew(e.Z).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function pT(e){var t,n;return R(function(i){switch(i.g){case 1:return t=0,x(i,2),b(i,pf(e),4);case 4:t=i.h,T(i,3);break;case 2:if(n=A(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(),pA(e,t),w(i)}})}function pA(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.da(Math.max(n-t,G(e.na)))}}function pk(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,se:null,audioSamplingRate:null,cb:0,De:0,encrypted:!1},i=i||n.Ua;var r,a=t.attributes.id,o=t.attributes.supplementalId,s=nt(t,"BaseURL"),l=!1;if(e.h)for(var c=u(s),d=c.next();!d.done;d=c.next()){var h=d.value;d=h.attributes.serviceLocation,h=ni(h),d&&h&&(hF(e.h,a,d,h),l=!0)}l&&e.h||(r=s.map(ni)),c=t.attributes.contentType||n.contentType,d=t.attributes.mimeType||n.mimeType,h=sN([t.attributes.codecs||n.c
1odecs]).join(",");var p=ns(t,"frameRate",nb)||n.frameRate,f=t.attributes.sar||n.pixelAspectRatio,g=function(e,t){t=t.slice(),e=u(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(nt(t,"InbandEventStream"),n.emsgSchemeIdUris),m=nt(t,"AudioChannelConfiguration");m=function(e){e=u(e);for(var t=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.se;var v=ns(t,"audioSamplingRate",nm)||n.audioSamplingRate;c||(c=pM(d,h));var y=na(t,"SegmentBase"),b=na(t,"SegmentTemplate"),w=y&&ns(y,"availabilityTimeOffset",nv)||0,x=b&&ns(b,"availabilityTimeOffset",nv)||0,S=s&&s.length&&ns(s[0],"availabilityTimeOffset",nv)||0;w=n.cb+S+w+x,x=null,(S=na(t,"SegmentSequenceProperties"))&&(S=na(S,"SAP"))&&(x=ns(S,"cadence",nf)),S=t.attributes.label;var T=nt(t,"Label");return T&&T.length&&nn(T=T[0])&&(S=nn(T)),{Ua:function(){return ty(i(),s.length?e.h&&l?hV(e.h,a):r||[]:[])},dd:y||n.dd,Zb:na(t,"SegmentList")||n.Zb,ic:b||n.ic,width:ns(t,"width",nm)||n.width,height:ns(t,"height",nm)||n.height,contentType:c,mimeType:d,codecs:h,frameRate:p,pixelAspectRatio:f,emsgSchemeIdUris:g,id:o||a,originalId:a,language:t.attributes.lang,se:m,audioSamplingRate:v,cb:w,he:null,De:x||n.De,label:S||null,encrypted:!1}}function pE(e,t,n,i){var r,a,o,s,u,l;return R(function(c){if(1==c.g)return r=[tl(n)],(a=rm(ty(t(),r),e.g.retryParameters)).method=i,o=e.j.networkingEngine.request(4,a,{isPreload:e.ea()}),rh(e.O,o),b(c,o.promise,2);if(s=c.h,"HEAD"==i){if(!s.headers||!s.headers.date)return c.return(0);u=s.headers.date}else u=ti(s.data);return isNaN(l=Date.parse(u))?c.return(0):c.return(l-Date.now())})}function pI(e,t,n,i,r){var a,o,s,u;return R(function(l){return 1==l.g?(a=rw,o=+!r,s=sO(t,n,i,e.g.retryParameters),b(l,pC(e,s,a,{type:o}),2)):(u=l.h,l.return(u.data))})}function pM(e,t){return ip(t=n8(e,t))?tA:e.split("/")[0]}function pC(e,t,n,i){return i||(i={}),i.isPreload=e.ea(),t=e.j.networkingEngine.request(n,t,i),rh(e.O,t),t.promise}function pD(){}(c=pp.prototype).configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ea=t),n&&this.i&&this.i.presentationTimeline.U()&&this.K.sb(),this.h&&this.h.configure(this.g),this.m&&(this.m.vh(this.g.dash.multiTypeVariantsAllowed&&tL()),this.m.Bh(this.g.dash.useStreamOnceInPeriodFlattening))},c.start=function(e,t){var n,i=this;return R(function(r){if(1==r.g)return i.fa=t.isLowLatencyMode(),i.A=[e],i.j=t,b(r,pf(i),2);if(n=r.h,i.j&&pA(i,n),!i.j)throw new eC(2,7,7001);return r.return(i.i)})},c.stop=function(){for(var e=u(this.o.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.A=[],this.i=null,this.o.clear(),this.B.clear(),this.u.clear(),this.l={qe:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.m=null,null!=this.K&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},c.update=function(){var e,t=this;return R(function(n){return 1==n.g?(x(n,2),b(n,pf(t),4)):2!=n.g?T(n,0):(e=A(n),t.j&&e)?void(t.j.onError(e),w(n)):n.return()})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(e){if(!this.A.some(function(e){return/\/(?:pl|pt)\//i.test(e)})&&this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.cc();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,pA(this,0))}}},c.banLocation=function(e){this.h&&this.h.banLocation(e)},c.setMediaElement=function(e){this.H=e},B("shaka.dash.DashParser",pp),av("application/dash+xml",function(){return new pp}),av("video/vnd.mpeg.dash.mpd",function(){return new pp}),B("shaka.dependencies",pD),pD.has=function(e){return pL.has(e)},pD.add=function(e,t){if(!pP[e])throw Error(e+" is not supported");e==pR?en("mux.js","mux.js is no longer used in Shaka Player."):pL.set(e,function(){return t})};var pR="muxjs",pP={Tk:pR,ISOBoxer:"ISOBoxer"};pD.Allowed=pP;var pL=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function pN(e,t,n){this.type=e,this.ca=t,this.segments=n||null}function pj(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function pO(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 pU(e,t){return(e=e.attributes.filter(function(e){return e.name==t})).length?e[0]:null}function p_(e,t,n){return(e=pU(e,t))?e.value:n||null}function pB(e,t){if(!(e=pU(e,t)))throw new eC(2,4,4023,t);return e.value}function pF(e,t,n){n=void 0===n?[]:n,this.ca=t,this.g=e,this.Jb=n}function pV(e,t){this.name=e,this.value=t}function pH(e,t){return e.filter(function(e){return e.name==t})}function pG(e,t){return e.filter(function(e){return pB(e,"TYPE")==t})}function pK(e,t){e=u(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function pq(e,t,n){return n=void 0===n?0:n,(e=pK(e,t))?Number(e.value):n}function pz(e,t,n){return t?pX(e,[t],n):[]}function pX(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(e){return pW(e,n)})),ty(e,i)}function pW(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n){n=u(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(a)e=e.replace(i,a);else throw new eC(2,4,4039,r)}}return e}function pY(){this.g=0}function pJ(e,t){var n=(t=(t=ti(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new eC(2,4,4015);t=0;for(var i=!0,r=u(n),a=r.next();!a.done;a=r.next())if(a=a.value,/^#(?!EXT)/m.test(a)||i)i=!1;else if(a=p$(e,a),--e.g,pQ.includes(a.name)){t=1;break}else"EXT-X-STREAM-INF"==a.name&&(i=!0);for(a=0,r=[],i=!0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||i)i=!1;else{if(o=p$(e,o),pZ.includes(o.name)){if(1!=t)throw new eC(2,4,4017);o=n.splice(a,n.length-a),n=[],i=[],a=[],s=null,o=u(o);for(var l=o.next();!l.done;l=o.next())l=l.value,/^(#EXT)/.test(l)?(l=p$(e,l),pQ.includes(l.name)?r.push(l):"EXT-X-MAP"==l.name?s=l:"EXT-X-PART"==l.name?a.push(l):"EXT-X-PRELOAD-HINT"==l.name?"PART"==p_(l,"TYPE")?a.push(l):"MAP"==p_(l,"TYPE")&&(l.name="EXT-X-MAP",s=l):i.push(l)):/^#(?!EXT)/m.test(l)||(l=l.trim(),s&&i.push(s),n.push(new pF(l,i,a)),i=[],a=[]);return a.length&&(s&&i.push(s),n.push(new pF("",i,a))),new pN(t,r,n)}r.push(o),"EXT-X-STREAM-INF"==o.name&&(o.attributes.push(new pV("URI",s)),i=!0)}}return new pN(t,r)}function p$(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new eC(2,4,4016,t);t=n[1];var i=n[2];if(n=[],i){(a=tZ(i=new t$(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var r,a,o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=tZ(i,o);)n.push(new pV(a[1],a[2]||a[3])),tQ(i)}return new pj(e,t,n,r)}pj.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 pQ="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(" "),pZ="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 p0(){}function p1(e,t){try{var n=p2(e);return rr({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return rn(e)}}function p2(t){var n=t.split(":");if(2>n.length||"data"!=n[0]||2>(n=n.slice(1).join(":").split(",")).length)throw new eC(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),i=(n=i.split(";"))[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?tf(t):to(t),contentType:i}}function p3(){var t=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(tA,new Map),this.M.set("image",new Map),this.Sb=(new Map).set("com.apple.streamingkeydelivery",function(n,i,r){var a,o,s,u,l,c,d,h,p;return a=t,o=n,s=i,u=r,R(function(t){if(1==t.g){if("video/mp2t"==s)throw new eC(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(l=pB(o,"METHOD")))return t.return(null);
1c="cenc","SAMPLE-AES"==l&&(c="cbcs"),d=pB(o,"URI"),h=tb("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],d);var n=new es(d).nb.replace(/-/g,"").toLowerCase();return(p=32===n.length&&/^[0-9a-f]+$/.test(n)?n:null)||!u?t.s(2):b(t,fP(a,u),3)}return 2!=t.g&&(p=t.h),p&&h.keyIds.add(p),t.return(h)})}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(e){var t=pB(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),n=tb("com.widevine.alpha",n,[{initDataType:"cenc",initData:t=ek((t=p2((t=pB(e,"URI")).split("?")[0])).data)}]),(e=p_(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=pB(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),e=ek((e=p2((e=pB(e,"URI")).split("?")[0])).data),n=tb("com.microsoft.playready",n,[{initDataType:"cenc",initData:t=rG(e,t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]),(e=t8(["<PLAYREADY>",tp(e),"</PLAYREADY>"].join("\n")))&&(n.licenseServerUri=hu(e)),n=Promise.resolve(n)}else n=Promise.resolve(null);return n}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(e){var t=pB(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),n=tb("com.huawei.wiseplay",n,[{initDataType:"cenc",initData:t=ek((t=p2((t=pB(e,"URI")).split("?")[0])).data)}]),(e=p_(e,"KEYID"))&&n.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(n)}else e=Promise.resolve(null);return e}),this.Oa=new Set,this.i=new Map,this.l=null,this.C="",this.Ga=new pY,this.K=-1,this.ea=1/0,this.$=this.Ub=this.Na=!1,this.B=new eB(function(){t.W&&!t.g.continueLoadingWhenPaused&&(t.T.Ka(t.W,"timeupdate"),t.W.paused)?t.T.qa(t.W,"timeupdate",function(){return fE(t)}):fE(t)}),this.Ea=fF,this.m=null,this.Ma=0,this.o=1/0,this.Fa=this.Aa=this.P=0,this.Z=new rd,this.G=new Map,this.H=new Map,this.sa=new Map,this.ka=new Map,this.L=new Map,this.na=new Map,this.oa=new Map,this.Tb=this.fa=!1,this.Pb=new H(5),this.j=null,this.O=!0,this.za=new Set,this.T=new Q,this.u=this.W=null,this.Qb=function(){return!1}}function p4(e,t){return fI(e)?e.M.get(t.type):t.ne}function p5(e,t,n){n=void 0!==n&&n;for(var i=-1==e.K,r=u(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=p4(e,a);if(o=sc(o)){s=u(s);for(var l=s.next();!l.done;l=s.next()){var c=(l=u(l.value)).next().value;if(l.next().value==o.startTime){i&&(e.K=Math.max(e.K,c)),a.tf=c;break}}}}if(!(0>e.K))for(i=(t=u(t)).next();!i.done;i=t.next())(fu(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&0<(a=e.K-i.tf)&&(r.g.splice(0,a),r=sc(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),p6(e,i,r))}function p6(e,t,n){if(!(.001>Math.abs(n))){t.Bc+=n,t.Vb+=n,e=p4(e,t);for(var i=u(e),r=i.next();!r.done;r=i.next()){var a=u(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.N()}}function p8(e,t,n){var i,r,a,o,s;return R(function(u){switch(u.g){case 1:if(!t)return u.return({mimeType:null,data:null});return i=rw,r=sO(t.N(),t.uc(),t.tc(),e.g.retryParameters),b(u,fC(e,r,i,{type:+(t instanceof a3)}).promise,2);case 2:if(o=(a=u.h).data,!t.aesKey){u.s(3);break}return b(u,sj(o,t.aesKey,n),4);case 4:o=u.h;case 3:return t instanceof a3?t.Ld(o,!0):t.Ld(o),(s=a.headers["content-type"])&&(s=s.split(";")[0].toLowerCase()),u.return({mimeType:s,data:o})}})}function p9(e){if(fI(e)){if(e.Ea==fH){for(var t=1/0,n=1/0,i=u(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.Vb),n=Math.min(n,r.Bc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Fe(t)}}else e.l.bb(fa(e));if(!e.l.u)for(n=(t=u(e.i.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=sc(n.stream.segmentIndex))&&n.h&&e.l.yh(n.h);e.l.me()}function p7(e,t,n){n=new es(n).g;var i=new Map;t=u(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value,o=p_(a,"NAME"),s=p_(a,"VALUE");r=p_(a,"QUERYPARAM"),a=p_(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.A.get(a))&&i.set(a,r)}return i}function fe(e){var t=new Set([n8(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.xb(function(n){n.mimeType&&t.add(n8(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function ft(e,t){return e.$=0<(t=p_(t,"CODECS")||"").length,e.$||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(",")),sN(t.split(/\s*,\s*/))}function fn(e,t,n,i){i=void 0===i||i;for(var r,a=[],o=[],s=new Map,l=u(t),c=l.next();!c.done;c=l.next()){var d=c.value;c=i?pB(d,"URI"):p_(d,"URI")||"shaka://hls-muxed",d=pB(d,"GROUP-ID"),a.push(c),o.push(d),s.set(d,c)}if(i=o.sort().join(","),c=t[0],t="","subtitles"==(l=pB(c,"TYPE").toLowerCase())&&(l=tA),l==tA)t=p_(c,"CODECS")||"";else for(d=(o=u(o)).next();!d.done;d=o.next())if(d=d.value,e.H.has(d)){t=e.H.get(d);break}if(o=a.sort().join(","),e.i.has(o))return e.i.get(o);if(d=e.F++,e.j){s=u(s);for(var h=s.next();!h.done;h=s.next()){var p=u(h.value);h=p.next().value,p=p.next().value,(h=n.get(h))&&hF(e.j,d,h,p)}}n=p_(c,"LANGUAGE"),s=p_(c,"NAME"),h="YES"==p_(c,"DEFAULT"),p="audio"==l&&(p=p_(c,"CHANNELS"))?parseInt(p.split("/")[0],10):null,r="audio"==l&&!!(r=p_(c,"CHANNELS"))&&2==(r=r.split("/")).length&&("JOC"===r[1]||r[1].includes("ATMOS"));var f=p_(c,"CHARACTERISTICS"),g="YES"==p_(c,"FORCED");return c="audio"==l&&(c=p_(c,"SAMPLE-RATE"))?parseInt(c,10):null,(a=fr(e,d,a,t,l,n,h,s,p,null,f,g,c,r)).stream&&(a.stream.groupId=i),e.I.has(i)?e.I.get(i).push(a):e.I.set(i,[a]),e.i.set(o,a),a}function fi(e,t){var n="video",i=pB(t,"URI"),r=p_(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.i.has(i))return e.i.get(i);var a=p_(t,"LANGUAGE"),o=p_(t,"NAME"),s=p_(t,"CHARACTERISTICS");
1return n=fr(e,e.F++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),r=(a=u((r=p_(t,"RESOLUTION"))?r.split("x"):[null,null])).next().value,a=a.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(a)||void 0,(t=p_(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function fr(e,t,n,i,r,a,o,s,l,c,d,h,p,f){function g(){return e.j&&1<n.length?hV(e.j,t):y.ye.concat(pX([e.C],n,e.A))}var m=fd(e,i,r,a,o,s,l,c,d,h,p,f);n.includes("shaka://hls-muxed")&&(m.isAudioMuxedInVideo=!0,m.mimeType="video/mp2t",fe(m));var v,y={stream:m,type:r,ye:[],Bc:0,Vb:0,ne:new Map,Xd:!1,Wd:!1,rd:!1,tf:-1,Bb:-1,Cb:-1,Tf:!1,N:g},S=null;return m.createSegmentIndex=function(){return S||(m.isAudioMuxedInVideo?(m.segmentIndex=new sl([]),Promise.resolve()):(v=fk(e,y.N(),!0),S=new Promise(function(t){var n,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G;t((n=v,R(function(t){switch(t.g){case 1:return S=tk,x(t,2),b(t,n.promise,4);case 4:if(k=t.h,n.aborted)return t.return();if((E=k.uri)!=k.originalUri&&(y.N().includes(E)||y.ye.push(E)),1!=(I=pJ(e.Ga,k.data)).type)throw new eC(2,4,4017);return M=p7(e,pH(I.ca,"EXT-X-DEFINE"),E),C=!1,(!e.$&&e.g.hls.disableCodecGuessing||e.O&&r==S.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<I.segments.length&&(e.O=!1,C=!0),D=!e.$&&e.g.hls.disableCodecGuessing,P=fI(e),b(t,fl(e,0,M,I,g,i,r,a,o,s,l,c,d,h,p,f,void 0,C,D),5);case 5:if(L=t.h,n.aborted)return t.return();if(N=L.stream,ff(e,I),fI(e)&&!P&&fm(e,I),y.Bc=L.Bc,y.Vb=L.Vb,y.Xd=L.Xd,y.Wd=L.Wd,y.rd=L.rd,y.ne=L.ne,y.Bb=L.Bb,y.Cb=L.Cb,y.Tf=!0,m.segmentIndex=N.segmentIndex,m.encrypted=N.encrypted,m.drmInfos=N.drmInfos,m.keyIds=N.keyIds,m.mimeType=N.mimeType,m.bandwidth=m.bandwidth||N.bandwidth,m.codecs=m.codecs||N.codecs,m.closedCaptions=m.closedCaptions||N.closedCaptions,m.width=m.width||N.width,m.height=m.height||N.height,m.hdr=m.hdr||N.hdr,m.colorGamut=m.colorGamut||N.colorGamut,m.frameRate=m.frameRate||N.frameRate,"und"==m.language&&"und"!=N.language&&(m.language=N.language),m.language=m.language||N.language,m.channelsCount=m.channelsCount||N.channelsCount,m.audioSamplingRate=m.audioSamplingRate||N.audioSamplingRate,fe(m),m.drmInfos.length&&e.h.newDrmInfo(m),j=!1,(!c&&m.closedCaptions||c&&m.closedCaptions&&c.size!=m.closedCaptions.size)&&(j=!0),e.m&&j&&e.h.makeTextStreamsForClosedCaptions(e.m),r==S.la||r==S.V)for(U=(O=u(e.i.values())).next();!U.done;U=O.next())(_=U.value).Tf||_.type!=r||(_.stream.mimeType=N.mimeType,fe(_.stream));r==S.va&&(B=sc(N.segmentIndex))&&B.Y&&(m.mimeType="application/mp4",fe(m)),F=sw(m),m.segmentIndex.xb(function(e){e.Y&&(e.Y.Wc=F)}),function(e){if(!e.m)return!1;var t=[],n=[];e=u(e.m.variants);for(var i=e.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.Ub?fs(e,[y]):(e.Ub=!0,V=Array.from(e.i.values()).filter(function(e){return e.stream.segmentIndex}),fs(e,V),p9(e),0<(H=e.o)&&e.B.da(H))),fb(e,I.ca,m.type,M,g),e.m&&(e.m.startTime=e.u),T(t,0);break;case 2:if(G=A(t),m.closeSegmentIndex(),7001===G.code)return t.return();if(!e.h.disableStream(m))throw G;w(t)}})))})))},m.closeSegmentIndex=function(){S&&!m.segmentIndex&&v.abort(),m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null),S=null},y}function fa(e){var t=1/0;e=u(e.i.values());for(var n=e.next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Vb));return t}function fo(e,t){var n=[];t=u(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.xb(function(e){n.push(e)});e.l.Ed(n)}function fs(e,t){if(!fI(e))for(var n=fa(e),i=u(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Oc(0,n);fo(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=fI(e)&&!e.Na,n=!fI(e)&&e.Na&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?p5(e,t,i):(function(e,t){if(1/0==e.ea){t=u(t);for(var n=t.next();!n.done;n=t.next())null!=(n=sc(n.value.stream.segmentIndex))&&null!=n.h&&(e.ea=Math.min(e.ea,n.h))}if(1/0!=(t=e.ea)){n=u(e.i.values());for(var i=n.next();!i.done;i=n.next())if(!fu(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=sc(r);if(a)if(null==a.h)z("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(p6(e,i,a.h-t-a.startTime),r=(i=u(r)).next();!r.done;r=i.next())r.value.sg(t)}}}}(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&p5(e,t))}function fu(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function fl(e,t,n,i,r,a,o,s,l,c,d,h,p,f,g,m,v,y,w){var S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X,W,Y,J;return y=void 0===y||y,w=void 0===w||w,R(function(t){var $,Q,Z,ee,et,en,ei,er,ea,eo,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,ex,eS,eT,eA,eE,eI,eM,eD,eR,eP;switch(t.g){case 1:if(k=(S=i.segments||[]).every(function(e){return!!pK(e.ca,"EXT-X-GAP")}),!S.length||k)throw new eC(2,4,4053);if(ef=e,em=pK((eg=i).ca,"EXT-X-PLAYLIST-TYPE"),eg=pK(eg.ca,"EXT-X-ENDLIST"),eg=em&&"VOD"==em.value||eg,em=em&&"EVENT"==em.value&&!eg,em=!eg&&!em,eg?fM(ef,fF):em?fM(ef,fH):fM(ef,fV),fI(e)&&fg(e,i
1),E=fI(e)?e.M.get(o):new Map,M=(I=fw(e,i,E,n,r,o)).segments,C=I.bandwidth,j=N=L=P=D=null,!(0<M.length&&y)){t.s(2);break}return b(t,($=e,Q=M,R(function(e){if(1==e.g)return(Z=sL($.g.hls.mediaPlaylistFullMimeType),Q.length)?(et=(ee=fT($,Q)).segment,en=ee.segmentIndex,ei=new es(et.N()[0]).ab.split(".").pop(),(er=fL.get(ei))?e.return(sL(er)):b(e,Promise.all([p8($,et.Y,0),p8($,et,en)]),2)):e.return(Z);if(eo=(ea=e.h)[1].mimeType,eu=ea[0].data,el=ea[1].data,ec="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),ed=["audio/mp4","video/mp4","video/iso.segment"],ok(ek(el))){var t=el,n=$.g.disableAudio,i=$.g.disableVideo,r=$.g.disableText,a=ek(t),o=(new ox).parse(a),s=o.od();a=o.Mf();var l=[],c=!1,d=!1;if(!n)switch(s.audio){case"aac":case"aac-loas":o.fb().length&&(l.push("mp4a.40.2"),c=!0);break;case"mp3":o.fb().length&&(l.push("mp4a.40.34"),c=!0);break;case"ac3":o.fb().length&&(l.push("ac-3"),c=!0);break;case"ec3":o.fb().length&&(l.push("ec-3"),c=!0);break;case"opus":o.fb().length&&(l.push("opus"),c=!0)}if(!i)switch(s.video){case"avc":a.codec?l.push(a.codec):l.push("avc1.42E01E"),d=!0;break;case"hvc":a.codec?l.push(a.codec):l.push("hvc1.1.6.L93.90"),d=!0;break;case"av1":l.push("av01.0.01M.08"),d=!0}if(l.length){if(n=c&&!d,i=new Map,d&&!r){for((r=new tB("video/mp2t")).i(t),d=(t=u(r.j())).next();!d.done;d=t.next())d=d.value,i.set(d,d);r.g()}a={type:n?"audio":"video",mimeType:"video/mp2t",codecs:l.join(", "),language:null,height:a.height,width:a.width,channelCount:null,sampleRate:null,closedCaptions:i,Od:null,colorGamut:null,frameRate:a.frameRate}}else a=null;if(eh=a)return e.return(eh)}else if((et.Y||ec.includes(ei)||ed.includes(eo))&&(ep=function(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.ma(),i=t.ma();t.skip(50),f=String(n),p=String(i),e.reader.ta()&&rP(e)}function r(e){var t=aA(e.reader);g=t.channelCount,m=t.sampleRate,a(e.name)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":l.push(e+".42E01E"),d=!0;break;case"hev1":case"hvc1":l.push(e+".1.6.L93.90"),d=!0;break;case"dvh1":case"dvhe":l.push(e+".05.04"),d=!0;break;case"vp09":l.push(e+".00.10.08"),d=!0;break;case"av01":l.push(e+".0.01M.08"),d=!0;break;case"mp4a":s.push("mp4a.40.2"),c=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(e),c=!0}}var o,s=[],l=[],c=!1,d=!1,h=null,p=null,f=null,g=null,m=null,v=null,y=null;if((new rR).box("moov",rP).box("trak",rP).box("mdia",rP).R("mdhd",function(e){h=aS(e.reader,e.version).language}).box("minf",rP).box("stbl",rP).R("stsd",rL).box("mp4a",function(e){var t=aA(e.reader);g=t.channelCount,m=t.sampleRate,e.reader.ta()?rP(e):a(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.ta();){t=e.X();for(var r=e.X();128&r;)r=e.X();if(3==t)e.ma(),128&(r=e.X())&&e.ma(),64&r&&e.skip(e.X()),32&r&&e.ma();else if(4==t)n=e.X(),e.skip(12);else if(5==t)break}n&&(i+="."+aE(n),5==t&&e.ta()&&(31==(n=(248&(t=e.X()))>>3)&&e.ta()&&(n=32+((7&t)<<3)+((224&e.X())>>5)),i+="."+n)),s.push(i),c=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",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+"."+aE(e.X())+aE(e.X())+aE(e.X()),l.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.X())>>6],r=31&e,a=n.S(),s=(32&e)>>5?"H":"L";e=[n.X(),n.X(),n.X(),n.X(),n.X(),n.X()],n=n.X();for(var u=0,c=0;32>c&&(u|=1&a,31!=c);c++)u<<=1,a>>=1;for(t=t+"."+i+r+"."+aE(u,!0)+("."+s)+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,l.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.X(),n=n.X(),l.push(t+"."+aI(e>>1&127)+"."+aI(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.X(),n=n.X(),l.push(t+"."+aI(e>>1&127)+"."+aI(e<<5&32|n>>3&31)),d=!0}).R("vpcC",function(e){var t=o||"",n=e.reader;e=n.X();var i=n.X();n=n.X()>>4&15,l.push(t+"."+aI(e)+"."+aI(i)+"."+aI(n)),d=!0}).box("av1C",function(e){var t=o||"";"dav1"===o&&(t="av01");var n=e.reader;n.skip(1),e=n.X(),n=n.X();var i=e>>>5,r=(64&n)>>6;l.push(t+"."+i+"."+aI(31&e)+(n>>>7?"H":"M")+"."+aI(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+aI(1)+"."+aI(1)+"."+aI(1)+".0"),d=!0}).box("enca",rj).box("encv",rN).box("sinf",rP).box("frma",function(e){a(e=ak(e.reader).codec)}).box("colr",function(e){l=l.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.Ba(),r=n.Db(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.ma(),a=n.ma();var o=n.ma(),s=n.X()>>7,u=t.split(".");10==u.length&&(u[6]=aI(r),u[7]=aI(a),u[8]=aI(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.Db(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.ma()){case 1:case 5:case
16:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.ma(),e.ma(),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,Od:n}}(e.reader),n=t.colorGamut;v=t.Od,y=n}).parse(e||t,!0),!s.length&&!l.length)return null;var b=c&&!d,w=new Map;if(d&&!n){n=new tB("video/mp4"),e&&n.init(e);try{n.i(t);for(var x=u(n.j()),S=x.next();!S.done;S=x.next()){var T=S.value;w.set(T,T)}}catch(e){}n.g()}return{type:b?"audio":"video",mimeType:b?"audio/mp4":"video/mp4",codecs:sN(s.concat(l)).join(", "),language:h,height:p,width:f,channelCount:g,sampleRate:m,closedCaptions:w,Od:v,colorGamut:y,frameRate:null}}(eu,el,$.g.disableText)))return e.return(ep);return eo?e.return(sL(eo)):e.return(Z)})),3);case 3:o=(O=t.h).type,s=O.language,d=O.channelCount,g=O.sampleRate,e.g.disableText||(h=O.closedCaptions),P=O.height,D=O.width,L=O.Od,N=O.colorGamut,j=O.frameRate,w&&(v=O.mimeType,a=O.codecs);case 2:if(v){t.s(4);break}return b(t,(ev=e,ey=o,eb=a,ew=M,R(function(e){switch(e.g){case 1:if(ex=rw,2==(eS=fT(ev,ew).segment).status)return e.return(fS(ey));if(eA=new es((eT=eS.N())[0]).ab.split(".").pop(),(eE=f_.get(ey).get(eA))||(eE=fL.get(eA))||(eE=fx(ey,eb)))return e.return(eE);return eM=1,eD=rm(eT,ev.g.retryParameters),x(e,2),eD.method="HEAD",b(e,fC(ev,eD,ex,{type:eM}).promise,4);case 4:eI=(eR=e.h).headers["content-type"],T(e,3);break;case 2:if(!(eP=A(e))||1002!=eP.code&&1001!=eP.code){e.s(3);break}return eD.method="GET",ev.g.hls.allowRangeRequestsToGuessMimeType&&(eD.headers.Range="bytes=0-0"),b(e,fC(ev,eD,ex,{type:eM}).promise,6);case 6:eI=(eR=e.h).headers["content-type"];case 3:if(!eI){e.s(7);break}if("application/octet-stream"!=(eE=eI.toLowerCase().split(";")[0])){e.s(8);break}if(eR.data.byteLength){e.s(9);break}return eD.method="GET",b(e,fC(ev,eD,ex,{type:eM}).promise,10);case 10:eR=e.h;case 9:ok(ek(eR.data))&&(eE="video/mp2t");case 8:if("application/octet-stream"!=eE)return e.return(eE);case 7:return e.return(fS(ey))}})),5);case 5:v=t.h,o!=tA||a||"application/mp4"!=v||!M[0]||M[0].Y||(v="text/vtt");case 4:return b(t,fh(e,i,v,r,n),6);case 6:if(_=(U=t.h).drmInfos,B=U.keyIds,F=U.encrypted,V=U.Dg,F&&!_.length&&!V)throw new eC(2,4,4026);return(H=fd(e,a,o,s,l,c,d,h,p,f,g,m)).encrypted=F&&!V,H.drmInfos=_,H.keyIds=B,H.mimeType=v,C&&(H.bandwidth=C),fe(H),"video"==o&&(D||P||L||N)&&fA(H,D,P,j,L,null,N),fI(e)&&fg(e,i),G=M[0].startTime,K=M[M.length-1].endTime,H.segmentIndex=new sl(M),z=!!(q=pK(i.ca,"EXT-X-SERVER-CONTROL"))&&null!=pU(q,"CAN-SKIP-UNTIL"),X=!!q&&null!=pU(q,"CAN-BLOCK-RELOAD"),Y=(W=fc(pq(i.ca,"EXT-X-MEDIA-SEQUENCE",0),M)).Bb,J=W.Cb,t.return({stream:H,type:o,ye:[],N:r,Bc:G,Vb:K,Xd:z,Wd:X,rd:!1,tf:-1,Bb:Y,Cb:J,ne:E,Tf:!1})}})}function fc(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Bb:++e,Cb: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)):(e++,t.m&&(n=0)),{Bb:e,Cb:n}}function fd(e,t,n,i,r,a,o,s,l,c,d,h){var p=fx(n,t)||fS(n),f=[];if(l){l=u(l.split(","));for(var g=l.next();!g.done;g=l.next())f.push(g.value)}return l=void 0,g=null,n==tA?l=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"!==l||f.push("subtitle"),fe(e={id:e.F++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==tA?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ik(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:c,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 fh(e,t,n,i,r){var a,o,s,l,c,d,h,p,f,g,m,v,y,w,x,S,T,A,k,E,I,M,C,D,P,L,N,j;return R(function(R){switch(R.g){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=(o=u(t.segments)).next();!s.done;s=o.next())if(c=pH((l=s.value).ca,"EXT-X-KEY"),d=null,c.length)for(d=fv(e,t,l.ca,i,r),p=(h=u(c)).next();!p.done;p=h.next())f=p.value,a.set(f,d)}m=g=!1,v=[],y=new Set,x=(w=u(a)).next();case 2:if(x.done){R.s(4);break}if(T=(S=u(x.value)).next().value,A=S.next().value,k=T,E=A,"NONE"==(I=pB(k,"METHOD"))){R.s(3);break}if(g=!0,M=p_(k,"KEYFORMAT")||"identity",C=null,fD(I)){m=!0,R.s(3);break}if("identity"==M)return b(R,fR(e,k,n,i,E,r),11);if(!(D=e.Sb.get(M))){P=null,R.s(9);break}return b(R,D(k,n,E),10);case 10:P=R.h;case 9:C=P,R.s(6);break;case 11:C=R.h;case 6:if(C){if(C.keyIds)for(N=(L=u(C.keyIds)).next();!N.done;N=L.next())j=N.value,y.add(j);v.push(C)}case 3:x=w.next(),R.s(2);break;case 4:return R.return({drmInfos:v,keyIds:y,encrypted:g,Dg:m})}})}function fp(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw X("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new eC(2,4,4042);var o=0,s=p_(n,"IV","");if(s){var u=tg(s.substr(2));if(16!=u.byteLength)throw new eC(2,4,4048)}else o=pq(i.ca,"EXT-X-MEDIA-SEQUENCE",0);var l=pz(r(),pB(n,"URI"),a),c=l.sort().join("");if(i=n.toString()+"-"+o+"-"+c,!t.ka.has(i)){var d={bitsKey:128,blockCipherMode:"CBC",iv:u,f
1irstMediaSequenceNumber:o};switch(pB(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 R(function(o){if(1==o.g)return t.L.has(c)||(n=rm(l,t.g.retryParameters),i=fC(t,n,6).promise,t.L.set(c,i)),b(o,t.L.get(c),2);if(3!=o.g){if(!(r=o.h).data||r.data.byteLength!=d.bitsKey/8)throw new eC(2,4,4049);return a={name:"CTR"==d.blockCipherMode?"AES-CTR":"AES-CBC",length:d.bitsKey},b(o,e.crypto.subtle.importKey("raw",r.data,a,!0,["decrypt"]),3)}d.cryptoKey=o.h,d.fetchKey=void 0,w(o)})},t.ka.set(i,d)}return t.ka.get(i)}function ff(e,t){null==e.u&&(t=pK(t.ca,"EXT-X-START"))&&(e.u=Number(pB(t,"TIME-OFFSET")))}function fg(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var a=pK(i[r].ca,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}r--}if(!(i=pK(t.ca,"EXT-X-TARGETDURATION")))throw new eC(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=pK(t.ca,"EXT-X-PART-INF"))&&(e.P=Number(pB(r,"PART-TARGET"))),t=pK(t.ca,"EXT-X-SERVER-CONTROL"),e.fa&&e.P?(e.o=e.Tb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Fa=t?Number(pB(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),e.Aa=(n=t?pU(t,"HOLD-BACK"):null)?Number(n.value):0),e.Ma=Math.max(i,e.Ma)}function fm(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.Aa)n=e.Aa;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=pK(t.segments[r].ca,"EXTINF");n=a?n+Math.ceil(Number(a.value.split(",")[0])):n+e.Ma}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.zh(0),e.l.lg(n),e.l.Gc(!1)}function fv(e,t,n,i,r){var a=pK(n,"EXT-X-MAP");if(!a)return null;var o=pB(a,"URI"),s=pz(i(),o,r);if(o=[s.toString(),p_(a,"BYTERANGE","")].join("-"),!e.sa.has(o)){var l,c,d,h,p,f,g,m=void 0,v=null,y=!1;n=u(n);for(var b=n.next();!b.done;b=n.next())"EXT-X-KEY"==(b=b.value).name?fD(y=pB(b,"METHOD"))&&b.id<a.id?(y=!1,m=fp(e,b,t,i,r)):y="NONE"!=y:"EXT-X-BYTERANGE"==b.name&&b.id<a.id&&(v=b);l=s,c=a,d=v,h=m,p=y,f=0,g=null,(c=p_(c,"BYTERANGE"))||!d||(c=d.value),c&&(g=Number((f=c.split("@"))[0]),g=(f=Number(f[1]))+g-1,h&&(d=g+1-f)%16&&(g+=16-d%16)),t=new a1(function(){return l},f,g,null,null,null,h,p),e.sa.set(o,t)}return e.sa.get(o)}function fy(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.xa+1)+t-1),[n,i]}function fb(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.l.m;if(a&&!fu(e,n))for(t=(t=pH(t,"EXT-X-DATERANGE")).filter(function(e){return null!=pU(e,"START-DATE")}).sort(function(e,t){return(e=pB(e,"START-DATE"))<(t=pB(t,"START-DATE"))?-1:+(e>t)}),n=0;n<t.length;n++){var o=t[n];try{var s=pB(o,"ID");if(!e.za.has(s)){var l=pB(o,"START-DATE"),c=nd(l);if(!isNaN(c)){var d=Math.max(0,c-a),h=null,p=p_(o,"END-DATE");if(p){var f=nd(p);if(!isNaN(f)&&(h=f-a,0>h))continue}if(null==h){var g=p_(o,"DURATION")||p_(o,"PLANNED-DURATION");if(g){var m=parseFloat(g);if(isNaN(m)||(h=d+m),0>c-a+m)continue}}var v=p_(o,"CLASS")||"com.apple.quicktime.HLS",y="YES"==p_(o,"END-ON-NEXT");if(null==h&&y){for(var b=n+1;b<t.length;b++){var w=p_(t[b],"CLASS")||"com.apple.quicktime.HLS";if(v==w){var x=pB(t[b],"START-DATE"),S=nd(x);if(!isNaN(S)&&S&&S>c){h=Math.max(0,S-a);break}}}if(null==h)continue}b=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var T=[],A=u(o.attributes),k=A.next();!k.done;k=A.next()){var E=k.value;if(!b.includes(E.name)){var I=pW(E.value,i);("X-ASSET-URI"==E.name||"X-ASSET-LIST"==E.name)&&(I=pz(r(),E.value,i)[0]),T.push({key:E.name,description:"",data:I,mimeType:null,pictureType:null})}}1<T.length&&e.h.onMetadata(v,d,h,T),e.za.add(s)}}}catch(e){}}}}function fw(t,n,i,r,a,o){var s=n.segments,l=void 0,c=pq(n.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),d=pq(n.ca,"EXT-X-MEDIA-SEQUENCE",0),h=pK(n.ca,"EXT-X-SKIP"),p=h?Number(p_(h,"SKIPPED-SEGMENTS")):0,f=d+p,g=0;fI(t)&&i.has(f)&&(g=i.get(f)),0===g&&t.Ea==fH&&0<i.size&&!i.has(f)&&null!=t.l.i&&(g=t.l.pb());var m=[],v=null;h=[];for(var y=0;y<s.length;y++){var b=s[y],w=0==y?g:v.endTime;f=d+p+y,pK(b.ca,"EXT-X-DISCONTINUITY")&&(c++,v&&v.Y&&(v.Y.g=w));for(var x=u(b.ca),S=x.next();!S.done;S=x.next())"EXT-X-KEY"==(S=S.value).name&&(l=fD(pB(S,"METHOD"))?fp(t,S,n,a,r):void 0);i.set(f,w),x=fv(t,n,b.ca,a,r),(w=function(t,n,i,r,a,o,s,l,c){function d(e){e=new es(e).ab.split(".").pop();var t=f_.get(s).get(e);return t||(t=fL.get(e)),t}var h=r.ca,p=pK(h,"EXTINF"),f=0,g=0,m=null;r.Jb.length&&(t.m.isLowLatency=!0);var v=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=pK(h,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=nd(y.value),t.Na=!0)}var b=a4;if(pK(h,"EXT-X-GAP")&&(t.m.gapCount++,b=2),!p){if(0==r.Jb.length)throw new eC(2,4,4024,"EXTINF");if(!t.fa)return null}var w=[];y=!1;var x=null,S=!1,T=!1;if(t.fa&&r.Jb.length){f=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var A=v,k={},E=0;E<r.Jb.length;k={Oe:void 0,ve:void 0},E++){var I=r.Jb[E],M=0==E?i:w[w.length-1],C=0==E?a:M.endTime,D=Number(p_(I,"DURATION"))||t.P;if(D){var R=C+D,P=0,L=null;
1if("EXT-X-PRELOAD-HINT"==I.name?(P=(P=p_(I,"BYTERANGE-START"))?Number(P):0,(M=p_(I,"BYTERANGE-LENGTH"))?L=P+Number(M)-1:P&&(L=Number.MAX_SAFE_INTEGER)):(P=(L=u(fy(M,P=p_(I,"BYTERANGE")))).next().value,L=L.next().value),k.ve=p_(I,"URI"),k.ve){M=a4,"YES"==p_(I,"GAP")&&(t.m.gapCount++,M=2,S=!0),k.Oe=null;var N=function(e){return function(){return null==e.Oe&&(e.Oe=pz(l(),e.ve,o)),e.Oe}}(k);f&&0<=P&&null!=L&&(x=N,y=!0),C=new a3(C,R,N,P,L,n,0,0,1/0,[],"",null,A,M,c),"EXT-X-PRELOAD-HINT"==I.name&&(C.Uf(),T=!0),"YES"!=p_(I,"INDEPENDENT")&&0<E&&C.Vc(),(k=d(k.ve))&&(C.mimeType=k,fB.has(k)&&(C.Y=null)),w.push(C),A&&(A+=D)}}}}if(p){if(0==(p=Number(p.value.split(",")[0])))return null;f=a+p}else{if(!w.length)return null;f=w[w.length-1].endTime}y&&(S||0!=w[0].Sa?(y=!1,x=null):w=[]),(p=pK(h,"EXT-X-BYTERANGE"))?(g=(m=u(fy(i,p.value))).next().value,m=m.next().value):w.length&&(g=w[0].Sa,m=w[w.length-1].xa),i="",p=null,"image"==s&&(i="1x1",h=pK(h,"EXT-X-TILES"))&&(i=pB(h,"LAYOUT"),(h=p_(h,"DURATION"))&&(p=Number(h)));var j=null;return n=new a3(a,f,function(){return x?x():(null==j&&(j=pz(l(),r.g,o)),j||[])},g,m,n,0,0,1/0,w,i,p,v,b,c,0<w.length&&!!r.g),(a=d(r.g))&&(n.mimeType=a,fB.has(a)&&(n.Y=null)),y&&(t.Tb=!0,n.eh(),T&&n.Uf()),n}(t,x,v,b,w,r,o,a,l))&&((v=pq(b.ca,"EXT-X-BITRATE"))?h.push({bitrate:v,duration:w.endTime-w.startTime}):h.length&&(v=h.pop(),v.duration+=w.endTime-w.startTime,h.push(v)),v=w,w.i=c,fu(t,o)&&null!=t.K&&f<t.K||m.push(w))}if(n=void 0,h.length&&(n=h.reduce(function(e,t){return e+t.duration},0),n=Math.round(h.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),h=m.some(function(e){return null!=e.h})){for(i={},r=0;r<m.length;i={ae:void 0,$d:void 0,Td:void 0,Dc:void 0,Sd:void 0},r++)if(i.Dc=m[r],null==i.Dc.h)for(i.$d=0,i.ae=r,a=function(e){return function(){var t=m[e.ae];if(t){if(null!=t.h)return t.h+e.$d;e.$d-=t.endTime-t.startTime,e.ae+=1}return null}}(i),i.Sd=0,i.Td=r,s=function(e){return function(){var t=m[e.Td];if(t){if(t!=e.Dc&&(e.Sd+=t.endTime-t.startTime),null!=t.h)return t.h+e.Sd;--e.Td}return null}}(i);null==i.Dc.h;)i.Dc.h=s(),null==i.Dc.h&&(i.Dc.h=a())}if(h)for(r=(i=u(m)).next();!r.done;r=i.next())for(r=(a=r.value).h,s=(a=u(a.g)).next();!s.done;s=a.next())(s=s.value).h=r,r+=s.endTime-s.startTime;if(i=t.ea,h&&1/0!=i&&!fu(t,o))for(o=(t=u(m)).next();!o.done;o=t.next())o.value.sg(i);return{segments:m,bandwidth:n}}function fx(e,t){if(e==tA){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 fS(e){return e==tA?"text/vtt":f_.get(e).get("mp4")}function fT(e,t){e=fI(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];2==n.dc()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function fA(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 fk(e,t,n){return fC(e,rm(t,e.g.retryParameters),0,{type:n?2:3})}function fE(e){var t,n,i,r,a;return R(function(o){switch(o.g){case 1:if(!e.h)return o.return();return x(o,2),t=Date.now(),b(o,e.update(),4);case 4:n=Date.now(),fI(e)&&(i=(n-t)/1e3,e.Pb.sample(1,i),r=Math.max(0,(0<e.g.updatePeriod?e.g.updatePeriod:e.o)-G(e.Pb)),e.B.da(r)),T(o,3);break;case 2:if(a=A(o),!e.h)return o.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(a),o.return();a.severity=1,e.h.onError(a),e.B.da(.1);case 3:if(!e.h)return o.return();e.h.onManifestUpdated(),w(o)}})}function fI(e){return e.Ea!=fF}function fM(e,t){e.Ea=t,e.l&&e.l.Gc(!fI(e)),fI(e)||e.B.stop()}function fC(e,t,n,i){if(!e.Z)throw new eC(2,7,7001);return i||(i={}),i.isPreload=e.Qb(),t=e.h.networkingEngine.request(n,t,i),rh(e.Z,t),t}function fD(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function fR(t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m;return R(function(v){switch(v.g){case 1:if("video/mp2t"==i)throw new eC(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eC(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s=pB(n,"METHOD")))return v.return(null);if((u=pz(r(),pB(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=tm(tf(u[0].split("data:text/plain;base64,").pop())),v.s(2);break}
1return c=u.sort().join(""),t.na.has(c)||(d=rm(u,t.g.retryParameters),h=fC(t,d,6).promise,t.na.set(c,h)),b(v,t.na.get(c),3);case 3:l=tm(v.h.data);case 2:if(p="00000000000000000000000000000000",!a){v.s(4);break}return b(v,fP(t,a),5);case 5:(f=v.h)&&(p=f);case 4:return(g=new Map).set(p,l),m="cenc","SAMPLE-AES"==s&&(m="cbcs"),v.return(tw(g,m))}})}function fP(e,t){var n,i,r;return R(function(a){var o,s;return 1==a.g?(n=null,e.oa.has(t))?(n=e.oa.get(t),a.s(2)):(i=sO(t.N(),t.uc(),t.tc(),e.g.retryParameters),b(a,fC(e,i,rw,{type:0}).promise,3)):(2!=a.g&&(r=a.h,t.Ld(r.data),o=r.data,s=null,(new rR).box("moov",rP).box("trak",rP).box("mdia",rP).box("minf",rP).box("stbl",rP).R("stsd",rL).box("encv",rN).box("enca",rj).box("sinf",rP).box("schi",rP).R("tenc",function(e){(e=e.reader).X(),e.X(),e.X(),e.X(),s=tm(e.Db(16))}).parse(o,!0),n=s,e.oa.set(t,n)),a.return(n))})}B("shaka.net.DataUriPlugin",p0),p0.parse=p1,rf("data",p1),(c=p3.prototype).configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Qb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()},c.start=function(e,t){var n,i=this;return R(function(r){var a,o,s,c,d,h,p,f,g,m,v,y,S,T,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X,W,Y,J,$,Q,Z,ee;return 1==r.g?(i.h=t,i.fa=t.isLowLatencyMode(),b(r,fk(i,[e]).promise,2)):3!=r.g?(i.C=(n=r.h).uri,b(r,(a=i,o=n.data,R(function(e){var t,n,i,r,et,en,ei,er,ea,eo,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,ex,eS,eT,eA,ek,eE,eI,eM,eD,eR,eL,eN,ej,eO,eU,e_,eB,eF,eV,eH,eG,eK,eq,ez,eX,eW,eY,eJ,e$,eQ,eZ,e0,e1,e2;switch(e.g){case 1:if(s=tk,d=pH((c=pJ(a.Ga,o)).ca,"EXT-X-DEFINE"),h=[],p=[],f=[],a.l=new oZ(null,0),a.l.Gc(!0),g=function(){return[a.C]},m=null,v=new Map,1==c.type)return a.O=!1,v=p7(a,pH(c.ca,"EXT-X-DEFINE"),a.C),m=s.la,q="",z=new Map,b(e,fl(a,a.F++,v,c,g,"",m,q,!0,"Media Playlist",null,z,null,!1,null,!1),7);return function(e,t){var n=new es(e.C).g;t=u(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=p_(r,"NAME");var a=p_(r,"VALUE");r=p_(r,"QUERYPARAM"),i&&a&&(e.A.has(i)||e.A.set(i,a)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}(a,d),y=pH(c.ca,"EXT-X-MEDIA"),S=pH(c.ca,"EXT-X-STREAM-INF"),T=pH(c.ca,"EXT-X-IMAGE-STREAM-INF"),k=pH(c.ca,"EXT-X-I-FRAME-STREAM-INF"),E=pH(c.ca,"EXT-X-SESSION-KEY"),I=pH(c.ca,"EXT-X-SESSION-DATA"),M=pH(c.ca,"EXT-X-CONTENT-STEERING"),function(e,t){t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=p_(i,"DATA-ID");n=p_(i,"URI");var a=p_(i,"LANGUAGE");i=p_(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",pz([e.C],n,e.A)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new rs("sessiondata",r),e.h&&e.h.onEvent(n)}}(a,I),b(e,(t=a,n=M,R(function(e){if(!t.h||!t.g)return e.return();for(et=(r=u(n)).next();!et.done;et=r.next())if(ei=p_(en=et.value,"PATHWAY-ID"),er=p_(en,"SERVER-URI"),ei&&er){t.j=new h_(t.h),t.j.configure(t.g),t.j.i=[t.C],t.j.setManifestType("HLS"),t.j.h=ei,i=hB(t.j,er);break}return b(e,i,0)})),4);case 4:if(!a.g.ignoreSupplementalCodecs){for(C=[],P=(D=u(S)).next(),L={};!P.done;L={Hh:void 0},P=D.next())(j=p_(N=P.value,"SUPPLEMENTAL-CODECS"))&&(L.Hh=j.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),O=N.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.Hh.join(","),1<(t=t.value.split(",")).length&&(t=tS("audio",t))&&(i+=","+t)),new pV(n,i)}}(L)),C.push(new pj(N.id,N.name,O,null)));for(S.push.apply(S,l(C)),U=[],B=(_=u(k)).next(),F={};!B.done;F={Ih:void 0},B=_.next())(H=p_(V=B.value,"SUPPLEMENTAL-CODECS"))&&(F.Ih=H.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),G=V.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.Ih.join(",")),new pV(n,t)}}(F)),U.push(new pj(V.id,V.name,G,null)));k.push.apply(k,l(U))}return function(e,t){t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=p_(i,"AUDIO");n=p_(i,"VIDEO");var a=p_(i,"SUBTITLES");if(i=ft(e,i),a){var o=tS(tA,i);e.H.set(a,o),tW(i,o)}r&&((a=tS("audio",i))||(a=e.g.hls.defaultAudioCodec),e.H.set(r,a)),n&&((r=tS("video",i))||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}(a,S),function(e,t){e.O=0==(t=pG(t,"CLOSED-CAPTIONS")).length,t=u(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=p_(i,"LANGUAGE");n=ik(r||"und"),r||(r=p_(i,"NAME"))&&(n=r),r=pB(i,"GROUP-ID"),i=pB(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}(a,y),ea=a,K=(eo=k).map(function(e){return"video"!==(e=fi(ea,e)).stream.type?null:e.stream}).filter(function(e){return e}),b(e,(eu=a,el=S,ec=E,ed=y,eh=g,ep=a.A,ef=K,R(function(e){switch(e.g){case 1:if(eg=[],em=new Set,eu.g.ignoreDrmInfo||!(0<ec.length)){e.s(2);break}ey=(ev=u(ec)).next();case 3:if(ey.done){e.s(2);break}if(ew=pB(eb=ey.value,"METHOD"),ex=p_(eb,"KEYFORMAT")||"identity",eS=null,"NONE"==ew){e.s(4);break}if(fD(ew)){eA=(eT=pz(eh(),pB(eb,"URI"),ep)).sort().join(""),eu.L.has(eA)||(ek=rm(eT,eu.g.retryParameters),eE=fC(eu,ek,6).promise,eu.L.set(eA,eE)),e.s(4);break}if("identity"==ex)return b(e,fR(eu,eb,"",eh,null,ep),12);if(!(eI=eu.Sb.get(ex))){eM=null,e.s(10);break}return b(e,eI(eb,"",null),11);case 11:eM=e.h;case 10:eS=eM,e.s(6);break;case 12:eS=e.h;case 6:if(eS){if(eS.keyIds)for(eR=(eD=u(eS.keyIds)).next();!eR.done;eR=eD.next())eL=eR.value,em.add(eL);eg.push(eS)}case 4:ey=ev.next(),e.s(3);break;case 2:for(eN={},eO=(ej=u(el)).next();!eO.done;eO=ej.next())eN[e_=pO(eU=eO.value,!eu.j)]?eN[e_].push(eU):eN[e_]=[eU];for(eF in eB=[],eN)eG=p_(eH=(eV=eN[eF])[0],"FRAME-RATE"),eK=Number(p_(eH,"AVERAGE-BANDWIDTH"))||Number(pB(eH,"BANDWIDTH")),eX=(ez=u((eq=p_(eH,"RESOLUTION"))?eq.
1split("x"):[null,null])).next().value,eW=ez.next().value,eY=p_(eH,"VIDEO-RANGE"),(eJ=p_(eH,"REQ-VIDEO-LAYOUT"))&&eJ.includes(",")&&(eJ=eJ.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]),eJ=eJ||"CH-MONO",e$=function(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,c=u(t),d=c.next();!d.done;d=c.next()){var h=d.value;d=p_(h,"AUDIO");var p=p_(h,"VIDEO"),f=d||p;f&&(a.includes(f)||a.push(f),(h=p_(h,"PATHWAY-ID"))&&r.set(f,h),d?o=!0:p&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=p_(e,"URI")||"";return"SUBTITLES"!=(e=p_(e,"TYPE"))&&(""!=t||"AUDIO"==e)});var i={};t=u(t);for(var r=t.next();!r.done;r=t.next()){var a=pO(r=r.value,!e.j);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)fn(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(pB(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.I.has(r)?e.I.get(r):[],o?i.audio.push.apply(i.audio,l(n)):s&&i.video.push.apply(i.video,l(n)),o=!1;var g=t.map(function(e){return pB(e,"URI")});return d=i.audio.find(function(e){return e&&e.N().find(function(e){return g.includes(e)})}),n=tS("video",s=ft(e,t[0])),(c=tS("audio",s))&&!n?(d="audio",o=0<i.audio.length):!i.audio.length&&!i.video.length&&c&&n?(d="video",s=[[n,c].join()]):i.audio.length&&d?(d="audio",o=!0):d=i.video.length&&!i.audio.length?"audio":"video",o||(e=function(e,t,n,i){for(var r=e.F++,a=[],o=u(t),s=o.next();!s.done;s=o.next()){var l=s.value;s=pB(l,"URI"),l=p_(l,"PATHWAY-ID"),e.j&&l&&hF(e.j,r,l,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=p_(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if("NONE"!=t){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=u(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return i=fr(e,r,a,n=tx(i,n),i,null,!1,s,null,t,null,!1,null,!1),e.i.set(o,i),i}(e,t,s,d),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}(eu,eV,ed),eB.push.apply(eB,l(function(e,t,n,i,r,a,o,s,l,c,d,h){for(var p=u(n),f=p.next();!f.done;f=p.next())fA(f.value.stream,r,a,o,s,l,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],a=(t=u(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=u(n)).next();!s.done;s=o.next()){var g=s.value;(s=a?a.stream:null)&&(s.drmInfos=c,s.keyIds=d),(l=g?g.stream:null)&&(l.drmInfos=c,l.keyIds=d,e.g.disableIFrames||iJ(l,h)),l&&!s&&(l.bandwidth=i),!l&&s&&(s.bandwidth=i),p=a?a.stream.drmInfos:null,f=g?g.stream.drmInfos:null,g=g?g.N().sort().join(","):"";var m=a?a.N().sort().join(","):"",v=[];s&&s.codecs&&v.push(s.codecs),l&&l.codecs&&v.push(l.codecs),g=[g,m,v.sort()].join("-"),s&&l&&!eP(p,f)||e.Oa.has(g)||(s={id:e.F++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!l&&l.primary,audio:s,video:l,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Oa.add(g))}return r}(eu,e$.audio,e$.video,eK,eX,eW,eG,eY,eJ,eg,em,ef)));return e.return(eB.filter(function(e){return null!=e}))}})),5);case 5:return h=e.h,p=function(e,t){var n=pG(t,"SUBTITLES");t=n.map(function(t){if(e.g.disableText)return null;try{return fn(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}),n=u(n);for(var i=n.next();!i.done;i=n.next()){var r=pB(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r))){r=u(r);for(var a=r.next();!a.done;a=r.next())(a=a.value).stream.codecs=i,a.stream.mimeType=fx(tA,i)||fS(tA),fe(a.stream)}}return t.filter(function(e){return e})}(a,y),b(e,(eQ=a,eZ=T,e0=k,R(function(e){return 1==e.g?(e1=eZ.map(function(e){var t,n;return R(function(i){if(1==i.g){var r,a,o,s,u,l,c,d,h,p,f;return eQ.g.disableThumbnails?i.return(null):(x(i,2),b(i,(r=eQ,a=e,R(function(e){return 1==e.g?(o=pB(a,"URI"),s=p_(a,"CODECS","jpeg")||"",r.i.has(o))?e.return(r.i.get(o)):(u=p_(a,"LANGUAGE"),l=p_(a,"NAME"),c=p_(a,"CHARACTERISTICS"),d=fr(r,r.F++,[o],s,"image",u,!1,l,null,null,c,!1,null,!1),(h=p_(a,"RESOLUTION"))?b(e,d.stream.createSegmentIndex(),3):e.s(2)):(2!=e.g&&(p=sc(d.stream.segmentIndex).tilesLayout)&&(d.stream.width=Number(h.split("x")[0])*Number(p.split("x")[0]),d.stream.height=Number(h.split("x")[1])*Number(p.split("x")[1])),(f=p_(a,"BANDWIDTH"))&&(d.stream.bandwidth=Number(f)),r.i.set(o,d),e.return(d))})),4))}if(2!=i.g)return t=i.h,i.return(t.stream);if(n=A(i),eQ.g.hls.ignoreImageStreamFailures)return i.return(null);throw n})}).concat(e0.map(function(e){if(eQ.g.disableThumbnails)return null;try{var t=fi(eQ,e);return"image"!==t.stream.type?null:t.stream}catch(e){if(eQ.g.hls.ignoreImageStreamFailures)return null;throw e}})),b(e,Promise.all(e1),2)):(e2=e.h,e.return(e2.filter(function(e){return e})))})),6);case 6:f=e.h,e.s(3);break;case 7:X=e.h,a.i.set(a.C,X),X.stream&&(W=sw(X.stream),X.stream.segmentIndex.xb(function(e){e.Y&&(e.Y.Wc=W)})),m=X.stream.type,h.push({id:0,language:ik(q||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==m?X.stream:null,video:"video"==m?X.stream:null,bandwidth:X.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new eC(2,7,7001);if(ff(a,c),1==c.type&&(fI(a)&&(fm(a,c),Y=a.o,a.B.da(Y)),J=Array.from(a.i.values()),fs(a,J),p9(a),fb(a,c.ca,m,v,g)),a.m={presentationTimeline:a.l,variants:h,textStreams:p,imageStreams:f,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u},a.$||!a.g.hls.disableCodecGuessing){e.s(8);break}
1for($=[],Z=(Q=u(a.m.variants)).next();!Z.done;Z=Q.next())(ee=Z.value).audio&&""===ee.audio.codecs&&$.push(ee.audio.createSegmentIndex()),ee.video&&""===ee.video.codecs&&$.push(ee.video.createSegmentIndex());return b(e,Promise.all($),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),w(e)}})),3)):r.return(i.m)})},c.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.Z&&(e.push(this.Z.destroy()),this.Z=null),this.g=this.h=null,this.Oa.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ka.clear(),this.L.clear(),this.na.clear(),this.oa.clear(),this.za.clear(),this.j&&this.j.destroy(),this.T&&(this.T.release(),this.T=null),Promise.all(e)},c.update=function(){var e,t,n,i,r,a,o,s,c,d,h,p=this;return R(function(f){if(1==f.g){if(!fI(p))return f.return();for(e=[],t=Array.from(p.i.values()),p.o=1/0,p.m.gapCount=0,r=(i=u(n=t.filter(function(e){return e.stream.segmentIndex}))).next();!r.done;r=i.next())a=r.value,e.push(function(e,t){var n,i,r,a,o,s,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L,N,j,O,U,_,B,F,V;return R(function(R){var H,G,K;switch(R.g){case 1:if(t.stream.isAudioMuxedInVideo)return R.return();for(n=[],r=(i=u(t.N())).next();!r.done;r=i.next())o=(a=new es(r.value)).g,t.Wd&&(0<=t.Bb&&o.add("_HLS_msn",String(t.Bb)),0<=t.Cb&&o.add("_HLS_part",String(t.Cb))),t.Xd&&o.add("_HLS_skip","YES"),ex(H=o),H.kd&&ed(a,eh(o.toString())),n.push(a.toString());return x(R,2),b(R,fk(e,n,!0).promise,4);case 4:s=R.h,T(R,3);break;case 2:throw c=A(R),e.h&&e.h.disableStream(t.stream),c;case 3:if(!t.stream.segmentIndex)return R.return();if(1!=(d=pJ(e.Ga,s.data)).type)throw new eC(2,4,4017);
1return(h=s.uri)==s.originalUri||t.N().includes(h)||t.ye.push(h),p=p7(e,pH(d.ca,"EXT-X-DEFINE"),h),f=t.stream,g=p4(e,t),b(R,fh(e,d,f.mimeType,t.N,p),5);case 5:for(v=(m=R.h).keyIds,y=m.drmInfos,S=m.encrypted,k=m.Dg,f.encrypted||!S||k||(f.encrypted=!0),G=f.keyIds,K=v,G.size===K.size&&[].concat(l(G)).every(function(e){return K.has(e)})||(f.keyIds=v,f.drmInfos=y,e.h.newDrmInfo(f)),I=(E=fw(e,d,g,p,t.N,t.type)).segments,(M=E.bandwidth)&&(f.bandwidth=M),C=sw(f),P=(D=u(I)).next();!P.done;P=D.next())(L=P.value).Y&&(L.Y.Wc=C);f.segmentIndex.Bd(I,e.l.pb()),I.length&&(N=pq(d.ca,"EXT-X-MEDIA-SEQUENCE",0),O=(j=pK(d.ca,"EXT-X-SKIP"))?Number(p_(j,"SKIPPED-SEGMENTS")):0,_=(U=fc(N,I)).Bb,B=U.Cb,t.Bb=_+O,t.Cb=B,F=g.get(N),f.segmentIndex.Pa(F)),(V=sc(f.segmentIndex))&&(t.Bc=V.startTime,t.Vb=I[I.length-1].endTime),pK(d.ca,"EXT-X-ENDLIST")&&(t.rd=!0),fg(e,d),fb(e,d.ca,f.type,p,t.N),w(R)}})}(p,a));return b(f,Promise.all(e),2)}for(fo(p,n.map(function(e){return e.stream})),o=n.some(function(e){return 0==e.rd}),n.length&&!o&&(fM(p,fG.Qh),s=n.map(function(e){return e.Vb}),p.l.bb(Math.min.apply(Math,l(s))),p.h.updateDuration()),o&&p9(p),d=(c=u(n)).next();!d.done;d=c.next())(h=d.value).stream.isAudioMuxedInVideo||!h.stream.segmentIndex||sc(h.stream.segmentIndex)||p.h.disableStream(h.stream);w(f)})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(){},c.banLocation=function(e){this.j&&this.j.banLocation(e)},c.setMediaElement=function(e){this.W=e},B("shaka.hls.HlsParser",p3);var fL=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),fN=(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"),fj=(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"),fO=(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"),fU=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),f_=(new Map).set("audio",fN).set("video",fj).set("text",fO).set("image",fU),fB=new Set(["video/mp2t"].concat(l(il))),fF="VOD",fV="EVENT",fH="LIVE",fG={Qh:fF};function fK(e){return hu(e)}av("application/x-mpegurl",function(){return new p3}),av("application/vnd.apple.mpegurl",function(){return new p3});var fq=(new Map).set("com.microsoft.playready",fK).set("com.microsoft.playready.recommendation",fK).set("com.microsoft.playready.software",fK).set("com.microsoft.playready.hardware",fK);function fz(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.C=new H(5),this.o=new eB(function(){var t,n;t=e,R(function(e){switch(e.g){case 1:return x(e,2),b(e,fX(t),4);case 4:T(e,3);break;case 2:n=A(e),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();w(e)}})}),this.B=new rd,this.m=new Map,this.A=function(){return!1}}function fX(e){var t,n,i,r,a,o;return R(function(s){if(1==s.g)return t=rm(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),rh(e.B,r),b(s,r.promise,2);if(a=s.h,!e.h)return s.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var c=a.uri,d=a.data,h=e.g.mss.manifestPreprocessor;if(h!=uu){if(en("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(d=pd(d,"SmoothStreamingMedia")))throw new eC(2,4,4046,c);h(d),d=to(d.outerHTML)}var p=t6(d,"SmoothStreamingMedia");if(!p)throw new eC(2,4,4046,c);if((c=e.g.mss.manifestPreprocessorTXml)!=ul&&c(p),e.i||(e.i=new oZ(null,0)),c=ns(p,"IsLive",ny,!1))throw new eC(2,4,4047);e.i.Gc(!c),h=ns(p,"TimeScale",nm,1e7),d=ns(p,"DVRWindowLength",nm),c&&(0===d||isNaN(d))&&(d=1/0);var f=ns(p,"CanSeek",ny,!1);for(0===d&&f&&(d=1/0),f=null,d&&0<d&&(f=d/h),c&&!isNaN(e.g.availabilityWindowOverride)&&(f=e.g.availabilityWindowOverride),null==f&&(f=1/0),e.i.Fe(f),d=ns(p,"Duration",nm,1/0),c||e.i.bb(d/h),c={variants:[],textStreams:[],timescale:h,duration:d/h},f=nt(p,"Protection"),h=e.g.mss.keySystemsBySystemId,d=[],g=(f=u(f)).next();!g.done;g=f.next())d=d.concat(nt(g.value,"ProtectionHeader"));if(d.length){for(g=0,f=[];g<d.length;g++){var g,m,v=d[g],y=v.attributes.SystemID.toLowerCase(),x=h[y];if(x){e:{if(m=hs(v)){m=u(nr(m,"DATA"));for(var S=m.next();!S.done;S=m.next())if(S=na(S.value,"KID")){m=tm(m=new Uint8Array([(m=tf(nn(S)))[3],m[2],m[1],m[0],m[5],m[4],m[7],m[6]].concat(l(m.slice(8)))));break e}}m=null}S=tf(nn(v)),y=tb(x,"cenc",y=[{initData:rG(S,y=tg(y.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:m}]),m&&y.keyIds.add(m),(x=fq.get(x))&&(y.licenseServerUri=x(v)),f.push(y)}}h=f}else h=[];for(g=h,f=[],h=[],d=[],v=(p=u(p=nt(p,"StreamIndex"))).next();!v.done;v=p.next()){x=nt(v=v.value,"QualityLevel"),y=c.timescale,m=c.duration,S=nt(v,"c");for(var T=[],A=0,k=0;k<S.length;++k){var E=S[k],I=S[k+1],M=ns(E,"t",nm),C=ns(E,"d",nm);if(E=ns(E,"r",nf),!C)break;if(M=null!=M?M:A,(E=E||0)&&E--,0>E)if(I){if(null==(I=ns(I,"t",nm))||M>=I)break;E=Math.ceil((I-M)/C)-1}else{if(1/0==m||M/y>=m)break;E=Math.ceil((m*y-M)/C)-1}for(I=0;I<=E;++I)A=M+C,T.push({start:M/y,end:A/y,zg:M}),M=A}
1for(y=T,m=(x=u(x)).next();!m.done;m=x.next())(m=function(e,t,n,i,r,a){var o=t.attributes.Type;if("audio"!==o&&"video"!==o&&"text"!==o)return X("Ignoring unrecognized type:",o),null;var s=t.attributes.Language,l=e.u++,c=ns(n,"Bitrate",ng),d=ns(n,"MaxWidth",ng),h=ns(n,"MaxHeight",ng),p=ns(n,"Channels",ng),f=ns(n,"SamplingRate",ng),g=a.duration;i.length&&(g=i[i.length-1].end-i[0].start);var m=e.i.getDuration();e.i.bb(Math.min(g,m));var v={id:l,originalId:t.attributes.Name||String(l),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:c||0,width:d||void 0,height:h||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:ik(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=fY.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 X('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!fW.includes(r.toUpperCase()))return X("Codec not supported:",r),null;switch(n=function(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2;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=i.audioSamplingRate||44100],"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))[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))[0]=16|i>>1,n[1]=i<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,r,v),v.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return X("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 X("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=tA,v.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(v.codecs="stpp")}return v.fullMimeTypes.add(n8(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=aC(new aM([n={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,lb:n,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La: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=[],r=u(r);for(var o=r.next(),s={};!o.done;s={Ie:void 0},o=r.next())s.Ie=o.value,i.push(new a3(s.Ie.start,s.Ie.end,function(t){return function(){return ty(e.l,[a.replace("{start time}",String(t.Ie.zg))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new a1(function(){return[]},0,null,sw(v),v.mssPrivateData.timescale,n,null,v.encrypted),v,t,i),v.segmentIndex=new sl(n),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}(e,v,m.value,y,g,c))&&("audio"!=m.type||e.g.disableAudio?"video"!=m.type||e.g.disableVideo?m.type!=tA||e.g.disableText||d.push(m):h.push(m):f.push(m))}for(p=[],g=(f=u(0<f.length?f:[null])).next();!g.done;g=f.next())for(g=g.value,T=(v=u(0<h.length?h:[null])).next();!T.done;T=v.next())y=(x=p).push,m=e,S=g,T=T.value,k=0,S&&S.bandwidth&&0<S.bandwidth&&(k+=S.bandwidth),T&&T.bandwidth&&0<T.bandwidth&&(k+=T.bandwidth),m={id:m.u++,language:S?S.language:"und",disabledUntilTime:0,primary:!!S&&S.primary||!!T&&T.primary,audio:S,video:T,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(x,m);c.variants=p,c.textStreams=d,e.j?(e.j.variants=c.variants,e.j.textStreams=c.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:c.variants,textStreams:c.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.me()),Promise.resolve(),o=(Date.now()-i)/1e3,e.C.sample(1,o),w(s)})}(c=fz.prototype).configure=function(e,t){this.g=e,t&&(this.A=t)},c.start=function(e,t){var n=this;return R(function(i){if(1==i.g)return n.l=[e],n.h=t,b(i,fX(n),2);if(!n.h)throw new eC(2,7,7001);return i.return(n.j)})},c.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},c.update=function(){var e,t=this;return R(function(n){return 1==n.g?(x(n,2),b(n,fX(t),4)):2!=n.g?T(n,0):(e=A(n),t.h&&e)?void(t.h.onError(e),w(n)):n.return()})},c.onExpirationUpdated=function(){},c.onInitialVariantChosen=function(){},c.banLocation=function(){},c.setMediaElement=function(){},B("shaka.mss.MssParser",fz);var fW="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fY=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");function fJ(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=ta(t)}catch(e){}throw new eC(401==n||403==n?2:1,1,1001,i,n,a,e,o,r||i)}function f$(){}function fQ(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,S,k,E,I,M,C,D,P,L=new f4;
1rE(t.headers).forEach(function(e,t){L.append(t,e)});var N=new f2,j={Ig:!1,Kh:!1};if(e=new rt((o=e,s=t,u=n,l={body:t.body||void 0,headers:L,method:t.method,signal:N.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},c=j,d=i,h=r,p=t.streamDataCallback,f=a.minBytesForProgressEvents||0,e=R(function(e){switch(e.g){case 1:return g=f1,m=f3,y=new ArrayBuffer(0),k=S=0,E=Date.now(),x(e,2),b(e,g(o,l),4);case 4:if(h(fZ((v=e.h).headers)),"HEAD"==l.method){e.s(5);break}if(M=(I=v.headers.get("Content-Length"))?parseInt(I,10):0,!v.body)return b(e,v.arrayBuffer(),9);return C=v.clone().body.getReader(),new m({start:function(e){!function t(){var n,i,r,a;return R(function(o){switch(o.g){case 1:return x(o,2),b(o,C.read(),4);case 4:n=o.h,T(o,3);break;case 2:return A(o),o.return();case 3:if(n.done||(S+=n.value.byteLength,!p)){o.s(5);break}return b(o,p(n.value),5);case 5:i=Date.now(),r=S-k,(100<i-E&&r>=f||n.done)&&(a=n.done?0:M-S,d(i-E,r,a),k=S,E=i),n.done?e.close():(e.enqueue(n.value),t()),w(o)}})}()}}),b(e,v.arrayBuffer(),8);case 8:y=e.h,e.s(5);break;case 9:y=e.h,d(Date.now()-E,y.byteLength,0);case 5:T(e,3);break;case 2:if(D=A(e),c.Ig)throw new eC(1,1,7001,o,u);if(c.Kh)throw new eC(1,1,1003,o,u);throw new eC(1,1,1002,o,D,u);case 3:return P=fZ(v.headers),e.return(fJ(P,y,v.status,o,v.url,s,u))}})),function(){return j.Ig=!0,N.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var O=new eB(function(){j.Kh=!0,N.abort()});O.da(t/1e3),e.finally(function(){O.stop()})}return e}function fZ(e){var t={};return e.forEach(function(e,n){t[n.trim()]=e}),t}function f0(){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)}av("application/vnd.ms-sstr+xml",function(){return new fz}),B("shaka.net.HttpFetchPlugin",f$),f$.isSupported=f0,f$.parse=fQ;var f1=e.fetch,f2=e.AbortController,f3=e.ReadableStream,f4=e.Headers;function f5(){}function f6(e,t,n,i,r,a){var o=new f9,s=Date.now(),u=0;return new rt(new Promise(function(l,c){o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials,o.onabort=function(){c(new eC(1,1,7001,e,n))};var d=!1;for(var h in o.onreadystatechange=function(){2!=o.readyState||d||(r(f8(o)),d=!0)},o.onload=function(r){var a=f8(o),d=o.response;try{i(Date.now()-s,r.loaded-u,0);var h=fJ(a,d,o.status,e,o.responseURL,t,n);l(h)}catch(e){c(e)}},o.onerror=function(t){c(new eC(1,1,1002,e,t,n))},o.ontimeout=function(){c(new eC(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(h.toLowerCase(),t.headers[h]);o.send(t.body)}),function(){return o.abort(),Promise.resolve()})}function f8(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={},t=u(t);for(var n=t.next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}f0()&&(rf("http",fQ,2,!0),rf("https",fQ,2,!0),rf("blob",fQ,2,!0)),B("shaka.net.HttpXHRPlugin",f5),f5.parse=f6;var f9=e.XMLHttpRequest;function f7(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function ge(e){var t=e.Ib(!1);return t?tp(t):e.N().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.Sa+":"+e.xa}function gt(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function gn(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function gi(e){return 0==e.i?0:e.j/e.i}function gr(e){var t=this;this.u=e,this.i=new Map,this.h=new rT(function(){return ga(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new gt,this.l=!1}function ga(e){e.l=!0;var t=e.j.map(function(e){return e()});return e.j=[],Promise.all(t)}function go(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new re,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 gs(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return R(function(i){if(1==i.g)return null==r.result?(n(),i.return()):b(i,t((e=r.result).key,e.value,e),2);e.continue(),w(i)})}})}function gu(e){this.h=e,this.g=[]}function gl(e,t){return gc(e,t,"readwrite")}
1function gc(e,t,n){var i=new go(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){tW(e.g,i)},function(){tW(e.g,i)}),i}function gd(e,t,n){this.h=new gu(e),this.i=t,this.g=n}function gh(e){return Promise.reject(new eC(2,9,9011,"Cannot add new value to "+e))}function gp(e,t,n,i){t=(e=gl(e.h,t)).store(),n=u(n);for(var r=n.next(),a={};!r.done;a={Sf:void 0},r=n.next())a.Sf=r.value,t.delete(a.Sf).onsuccess=function(e){return function(){return i(e.Sf)}}(a);return e.promise()}function gf(e,t,n){var i,r,a,o,s,l,c;return R(function(d){if(1==d.g){for(r=(i=gc(e.h,t,"readonly")).store(),a={},o=[],l=(s=u(n)).next(),c={};!l.done;c={ze:void 0,ie:void 0},l=s.next())c.ie=l.value,c.ze=r.get(c.ie),c.ze.onsuccess=function(e){return function(){void 0==e.ze.result&&o.push(e.ie),a[e.ie]=e.ze.result}}(c);return b(d,i.promise(),2)}if(o.length)throw new eC(2,9,9012,"Could not find values for "+o);return d.return(n.map(function(e){return a[e]}))})}function gg(e){this.g=new gu(e)}function gm(){this.g=new Map}function gv(e){var t=null;
1if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ab:n,Ta:i},Ta:e})})}),t)return t;throw new eC(2,9,9013,"Could not find a cell that supports add-operations")}function gy(e,t,n){if(!(e=e.g.get(t)))throw new eC(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new eC(2,9,9013,"Could not find cell with name "+n);return t}function gb(e,t){gw.set(e,t)}rf("http",f6,1,!0),rf("https",f6,1,!0),rf("blob",f6,1,!0),gt.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}},gr.prototype.destroy=function(){return this.h.destroy()},go.prototype.abort=function(){var e=this;return R(function(t){if(1==t.g){try{e.i.abort()}catch(e){}return x(t,2),b(t,e.g,4)}if(2!=t.g)return T(t,0);A(t),w(t)})},go.prototype.store=function(){return this.h},go.prototype.promise=function(){return this.g},gu.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(c=gd.prototype).destroy=function(){return this.h.destroy()},c.hasFixedKeySpace=function(){return!0},c.addSegments=function(){return gh(this.i)},c.removeSegments=function(e,t){return gp(this,this.i,e,t)},c.getSegments=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,gf(n,n.i,e),2):(t=i.h,i.return(t.map(function(e){return n.Kg(e)})))})},c.addManifests=function(){return gh(this.g)},c.updateManifest=function(){return Promise.reject(new eC(2,9,9016,"Cannot modify values in "+this.g))},c.updateManifestExpiration=function(e,t){var n=gl(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()},c.removeManifests=function(e,t){return gp(this,this.g,e,t)},c.getManifests=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,gf(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map(function(e){return n.jd(e)}))))})},c.getAllManifests=function(){var e,t,n=this;return R(function(i){return 1==i.g?(e=gc(n.h,n.g,"readonly"),t=new Map,b(i,gs(e,function(e,i){var r;return R(function(a){if(1==a.g)return b(a,n.jd(i),2);r=a.h,t.set(e,r),w(a)})}),2)):3!=i.g?b(i,e.promise(),3):i.return(t)})},c.Kg=function(e){return e},c.jd=function(e){return Promise.resolve(e)},c.add=function(e,t){var n,i,r,a,o,s,l,c=this;return R(function(d){if(1==d.g){for(i=(n=gl(c.h,e)).store(),r=[],o=(a=u(t)).next(),s={};!o.done;s={eg:void 0},o=a.next())l=o.value,s.eg=i.add(l),s.eg.onsuccess=function(e){return function(){r.push(e.eg.result)}}(s);return b(d,n.promise(),2)}return d.return(r)})},gg.prototype.destroy=function(){return this.g.destroy()},gg.prototype.getAll=function(){var e,t,n=this;return R(function(i){return 1==i.g?(e=gc(n.g,"session-ids","readonly"),t=[],b(i,gs(e,function(e,n){t.push(n)}),2)):3!=i.g?b(i,e.promise(),3):i.return(t)})},gg.prototype.add=function(e){var t=gl(this.g,"session-ids"),n=t.store();e=u(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},gg.prototype.remove=function(e){var t,n=this;return R(function(i){return 1==i.g?b(i,gs(t=gl(n.g,"session-ids"),function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2):b(i,t.promise(),0)})},gm.prototype.destroy=function(){for(var e=[],t=u(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},gm.prototype.init=function(){var e=this;gw.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=u(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},B("shaka.offline.StorageMuxer",gm),gm.unregister=function(e){gw.delete(e)},gm.register=gb,gm.prototype.destroy=gm.prototype.destroy;var gw=new Map;function gx(){gd.apply(this,arguments)}function gS(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 eC(2,9,9004,"Could not parse uri "+e)}function gT(){gd.apply(this,arguments)}function gA(){gd.apply(this,arguments)}function gk(){this.m=this.j=this.i=this.h=this.g=this.l=null}function gE(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 gI(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 gE(t,n,i,Number(e[4])):null}function gM(e,t){this.h=e,this.g=t}function gC(e,t){var n=new oZ(null,0);n.bb(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=u(t),o=a.next();!o.done;o=a.next()){o=u(o.value.variantIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}for(o=(a=u(n)).next();!o.done;o=a.next())for(s=(o=u(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=new Map,o=(r=u(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(r=(t=u(t)).next();!r.done;r=t.next())for(r=gD(e,o=r.value,i),s=(o=u(o.variantIds)).next();!s.done;s=o.next())(s=a.get(s.value)).language=r.language,s.primary=s.primary||r.primary,s.audio=r;for(t=(n=u(n)).next();!t.done;t=n.next())for(t=gD(e,r=t.value,i),o=(r=u(r.variantIds)).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==tA}).map(function(t){return gD(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return gD(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=u(i.values()),l=s.next();!l.done;l=s.next())(l=l.value).audio&&l.audio.encrypted&&(l.audio.drmInfos=o),l.video&&l.video.encrypted&&(l.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 gD(e,t,n){var i=t.segments.map(function(n){var i,r,a,o,s,u,l;return i=e,r=n,a=t,o=new gE("segment",i.h,i.g,r.dataKey),(i=new a3(r.startTime,r.endTime,function(){return[o.toString()]},0,null,null!=r.initSegmentKey?(s=i,u=r.initSegmentKey,l=new gE("segment",s.h,s.g,u),new a1(function(){return[l.toString()]},0,null)):null,r.timestampOffset,r.appendWindowStart,r.appendWindowEnd,[],r.tilesLayout||"")).mimeType=r.mimeType||a.mimeType||"",i.codecs=r.codecs||a.codecs||"",r.thumbnailSprite&&i.Ge(r.thumbnailSprite),i});return n.Ed(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sl(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([n8(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function gR(){this.g=null}function gP(){}function gL(e,t){var n,i,r,a,o=gI(e);return e=o&&"manifest"==o.g?rr(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t}):o&&"segment"==o.g?(n=o.key(),i=o,r=t,a=new gm,rr(void 0).Ha(function(){return a.init()}).Ha(function(){return gy(a,i.Ab(),i.Ta())}).Ha(function(e){return e.getSegments([i.key()])}).Ha(function(e){return{uri:i,data:e[0].data,headers:{},originalRequest:r}}).finally(function(){return a.destroy()})):rn(new eC(2,1,9004,e))}function gN(e,t,n){var i,r,a,o;return R(function(s){switch(s.g){case 1:i=[];for(var l,c,d,h,p,f=[],g=u(n),m=g.next();!m.done;m=g.next()){m=m.value;for(var v=!1,y=u(f),S=y.next();!S.done;S=y.next())if(function(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&tY(e.audioCapabilities,t.audioCapabilities,n)&&tY(e.videoCapabilities,t.videoCapabilities,n)}((S=S.value).info,m)){S.sessionIds.push(m.sessionId),v=!0;break}v||f.push({info:m,sessionIds:[m.sessionId]})}a=(r=u(f)).next();case 2:if(a.done){s.s(4);break}return b(s,(l=e,c=t,d=a.value,R(function(e){switch(e.g){case 1:var t,n,i,r,a,o,s;return h=new rK({Xb:c,onError:function(){},te:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(e,2),h.configure(l),b(e,(t=h,n=d.info.keySystem,i=d.info.licenseUri,r=d.info.serverCertificate,a=d.info.audioCapabilities,o=d.info.videoCapabilities,s=new Map,(a={audioCapabilities:a,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:n}).drmInfos=[{keySystem:n,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioR
1obustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],s.set(n,a),r$(t,s,[])),4);case 4:T(e,3);break;case 2:return A(e),b(e,h.destroy(),5);case 5:return e.return([]);case 3:return p=[],b(e,Promise.all(d.sessionIds.map(function(e){return R(function(t){if(1==t.g){var n,i,r,a,o;return x(t,2),b(t,(n=h,i=e,R(function(e){return 1==e.g?b(e,r0(n,i,{initData:null,initDataType:null}),2):3!=e.g?(r=e.h)?(a=[],(o=n.i.get(r))&&(o.ub=new re,a.push(o.ub)),a.push(r.remove()),b(e,Promise.all(a),3)):e.return():void(n.i.delete(r),w(e))})),4)}if(2!=t.g)return p.push(e),T(t,0);A(t),w(t)})})),6);case 6:return b(e,h.destroy(),7);case 7:return e.return(p)}})),5);case 5:o=s.h,i=i.concat(o),a=r.next(),s.s(2);break;case 4:return s.return(i)}})}function gj(e,t){var n=gC(new gM(e.Ab(),e.Ta()),t),i=t.appMetadata||{};return n=gO(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 gO(e){var t=[],n=iX(e.variants);n=u(n);for(var i=n.next();!i.done;i=n.next())t.push(iF(i.value));for(n=(e=u(e.textStreams)).next();!n.done;n=e.next())t.push(iV(n.value));return t}function gU(){this.g=new Map}function g_(e,t){return null==(e=e.g.get(t))&&(e=0),e}function gB(e){var t=this;if(e&&e.constructor!=ln)throw new eC(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.yb()):(this.h=ua(),this.g=new rp),this.i=[],this.l=[];var n=!e;this.j=new rT(function(){var e,i,r,a,o;return R(function(s){switch(s.g){case 1:return b(s,Promise.all(t.l.map(function(e){return ga(e)})),2);case 2:for(e=function(){},i=[],a=(r=u(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return b(s,Promise.all(i),3);case 3:if(!n){s.s(4);break}return b(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,w(s)}})}),this.m=1e9}function gF(){if(eF())e:{for(var e=u(gw.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 gV(e){var t,n,i;return R(function(r){switch(r.g){case 1:return b(r,(t=new gm).init(),2);case 2:return b(r,gv(t),3);case 3:return i=new gE("manifest",(n=r.h).path.Ab,n.path.Ta,e),b(r,t.destroy(),4);case 4:return b(r,(new gB).remove(i.toString()),0)}})}function gH(e,t,n,i,r,a){var o,s,l,c,d,h,p,f,g,m;return R(function(v){switch(v.g){case 1:for(o=!1,x(v,2),s=!0,c=(l=u(n.streams)).next();!c.done;c=l.next())for(h=(d=u(c.value.segments)).next();!h.done;h=d.next())null!=(f=(p=h.value).pendingSegmentRefId?i[p.pendingSegmentRefId]:null)&&(p.dataKey=f,p.pendingSegmentRefId=void 0),null!=(f=p.pendingInitSegmentRefId?i[p.pendingInitSegmentRefId]:null)&&(p.initSegmentKey=f,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(s=!1),p.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),b(v,e.updateManifest(t,n),4);case 4:o=!0,a(),T(v,0);break;case 2:return g=A(v),b(v,gV(t),5);case 5:if(o){v.s(6);break}return m=Object.values(i),b(v,e.removeSegments(m,function(){}),6);case 6:throw g}})}function gG(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function gK(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 gq(e,t,n,i){if(t.expiration=n.pd(),n=rJ(n),t.sessionIds=i?n:[],gG(e)&&i&&!n.length)throw new eC(2,9,9007)}function gz(e,t){for(var n=[],i=u(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:n8(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:n8(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function gX(e,t){var n;return R(function(i){switch(i.g){case 1:return x(i,2),b(i,uI(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,T(i,3);break;case 2:A(i);case 3:if(n)return i.return(n);throw new eC(1,2,2011,t)}})}function gW(e){if(e.j.g)throw new eC(2,9,7001)}function gY(){if(!gF())throw new eC(2,9,9e3)}function gJ(e,t){return R(function(n){return 1==n.g?(e.i.push(t),S(n,2),b(n,t,4)):2!=n.g?n.return(n.h):(k(n),tW(e.i,t),E(n,0))})}function g$(e){for(var t=new Set,n=u(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=u(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=u(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}g(gx,gd),gx.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return R(function(o){return i=(n=gl(a.h,a.g)).store(),r=new re,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new eC(2,9,9012,"Could not find values for "+e))},b(o,Promise.all([n.promise(),r]),0)})},gx.prototype.jd=function(e){var t,n,i,r,a;
1return R(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n)i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime,r=function(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=u(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=u(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=u(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=u(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=u(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=u(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=u(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?gS(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=gS(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)})}(e.periods[n],i),t.push(r);return b(o,hK(t),2)}return a=o.h,o.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:a,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},gx.prototype.Kg=function(e){return{data:e.data}},g(gT,gd),gT.prototype.jd=function(e){var t,n,i,r,a;return R(function(o){if(1==o.g){for(n=0,t=[];n<e.periods.length;++n){i=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var s=e.periods[n],l=[],c=u(s.streams),d=c.next();!d.done;d=c.next())0!=(d=d.value).variantIds.length&&l.push(function(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}}(d,s.startTime,s.startTime+i));r=l,t.push(r)}return b(o,hK(t),2)}return a=o.h,o.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:a,sequenceMode:!1})})},g(gA,gd),(c=gA.prototype).hasFixedKeySpace=function(){return!1},c.addSegments=function(e){return this.add(this.i,e)},c.addManifests=function(e){return this.add(this.g,e)},c.updateManifest=function(e,t){var n,i,r,a;return n=this,i=e,r=t,(a=(n=gl(n.h,n.g)).store()).get(i).onsuccess=function(){a.put(r,i)},n.promise()},c.jd=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(c=gk.prototype).init=function(){var t=this,n=new re,i=!1,r=new eB(function(){i=!0,n.reject(new eC(2,9,9017))});r.da(5);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!i){var e=a.result;t.l=e;var o=e.objectStoreNames;
1t.g=o=o.contains("manifest")&&o.contains("segment")?new gx(e,"segment","manifest"):null,t.h=o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new gT(e,"segment-v2","manifest-v2"):null,t.i=o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new gT(e,"segment-v3","manifest-v3"):null,t.j=o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new gA(e,"segment-v5","manifest-v5"):null,t.m=e=e.objectStoreNames.contains("session-ids")?new gg(e):null,r.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=u(["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||(n.reject(new eC(2,9,9001,a.error)),r.stop(),e.preventDefault())},n},c.destroy=function(){var e=this;return R(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return b(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return b(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return b(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return b(t,e.j.destroy(),8);case 8:if(!e.m){t.s(10);break}
1return b(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),w(t)}})},c.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},c.getEmeSessionCell=function(){return this.m},c.erase=function(){var t=this;return R(function(n){switch(n.g){case 1:if(!t.g){n.s(2);break}return b(n,t.g.destroy(),2);case 2:if(!t.h){n.s(4);break}return b(n,t.h.destroy(),4);case 4:if(!t.i){n.s(6);break}return b(n,t.i.destroy(),6);case 6:if(!t.j){n.s(8);break}return b(n,t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),b(n,(i=new re,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new eC(2,9,9001,r.error)),e.preventDefault()},i),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,b(n,t.init(),0)}})},gb("idb",function(){return(!eW()||eW()&&e2())&&!eG()&&e.indexedDB?new gk:null}),gE.prototype.Ab=function(){return this.i},gE.prototype.Ta=function(){return this.h},gE.prototype.key=function(){return this.l},gE.prototype.toString=function(){return this.j},(c=gR.prototype).configure=function(){},c.start=function(e,t){var n,i,r,a,o,s=this;return R(function(u){switch(u.g){case 1:if(s.g=n=gI(e),null==n||"manifest"!=n.g)throw new eC(2,1,9004,e);return i=new gm,S(u,2),b(u,i.init(),4);case 4:return b(u,gy(i,n.Ab(),n.Ta()),5);case 5:return r=u.h,b(u,r.getManifests([n.key()]),6);case 6:return a=u.h[0],o=gC(new gM(n.Ab(),n.Ta()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return k(u),b(u,i.destroy(),7);case 7:E(u,0)}})},c.stop=function(){return Promise.resolve()},c.update=function(){},c.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return R(function(l){switch(l.g){case 1:return n=u.g,i=new gm,x(l,2,3),b(l,i.init(),5);case 5:return b(l,gy(i,n.Ab(),n.Ta()),6);case 6:return r=l.h,b(l,r.getManifests([n.key()]),7);case 7:if(o=(a=l.h[0]).sessionIds.includes(e),s=void 0==a.expiration||a.expiration>t,!o||!s){l.s(3);break}return b(l,r.updateManifestExpiration(n.key(),t),3);case 3:return k(l),b(l,i.destroy(),10);case 10:E(l,0);break;case 2:A(l),l.s(3)}})},c.onInitialVariantChosen=function(){},c.banLocation=function(){},c.setMediaElement=function(){},av("application/x-offline-manifest",function(){return new gR}),B("shaka.offline.OfflineScheme",gP),gP.plugin=gL,rf("offline",gL),(c=gB.prototype).destroy=function(){return this.j.destroy()},c.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=s6(e,t)),us(this.h,e)},c.getConfiguration=function(){var e=ua();return us(e,this.h,ua()),e},c.yb=function(){return this.g},c.store=function(e,t,n,i,r){var a,o,s,l,c,d,h,p,f,g,m,v,y,S,I,M,C,D,P,L,N,j,O,U,_,B,F,V,H,G,K,q,z,X=this,W=this.getConfiguration(),Y=new gr(this.g);return this.l.push(Y),(t=new rt((a=this,o=e,s=t||{},l=i||[],c=r||[],d=function(){var t;return R(function(i){return 1==i.g?n?i.s(2):b(i,uI(e,X.g,W.manifest.retryParameters),3):(2!=i.g&&(n=i.h),t=ay(e,n||null),i.return(t()))})},h=W,p=Y,t=R(function(e){var t,n,i,r,K,q,z,X,W,Y,J,$,Q,Z,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,ey,eb,ew,ex,eS,eT,eA,eE,eI,eM,eD,eR,eP,eL,eN,ej,eO,eU,e_,eB,eF,eV,eH,eG,eK,eq,ez,eX,eW,eY,eJ,e$,eQ,eZ,e0,e1,e2,e3,e4,e5,e6,e8,e9,e7,te,tt,tn,ti,tr,ta,to,ts,tu;switch(e.g){case 1:return gY(),g=f=null,m=new gm,S=y=v=null,x(e,2,3),b(e,d(),5);case 5:return f=e.h,b(e,(t=a,n=o,i=f,r=h,R(function(e){if(1==e.g)return K=null,q={networkingEngine:t.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){K=e},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},i.configure(r.manifest),gW(t),b(e,i.start(n,q),2);if(3!=e.g)return z=e.h,gW(t),b(e,Promise.all(rk(g$(z),function(e){return e.createSegmentIndex()})),3);if(gW(t),K)throw K;return e.return(z)})),6);case 6:if(I=e.h,gW(a),!(!I.presentationTimeline.U()&&!I.presentationTimeline.yc()))throw new eC(2,9,9005,o);C=(M=u(l)).next();case 7:if(C.done){e.s(9);break}
1return b(e,(X=a,W=C.value,Y=I,R(function(e){switch(e.g){case 1:return b(e,gX(X,W),2);case 2:var t,n,i,r,a,o;if("text/vtt"!=(J=e.h))throw new eC(1,2,2017,W);return b(e,(t=W,n=X.g,i=X.h.streaming.retryParameters,R(function(e){return 1==e.g?(r=rw,(a=rm([t],i)).method="GET",b(e,n.request(r,a).promise,2)):(o=e.h,e.return(o.data))})),3);case 3:if($=e.h,!(Q=ih(J)))throw new eC(2,2,2014,J);for(Z=Q(),ee={periodStart:0,segmentStart:0,segmentEnd:Y.presentationTimeline.getDuration(),vttOffset:0},et=ek($),en=Z.parseMedia(et,ee,W,[]),ei=[],ea=(er=u(en)).next(),eo={};!ea.done;eo={Pe:void 0,Nc:void 0},ea=er.next())eo.Nc=ea.value,eo.Pe=null,es=function(e){return function(){return null==e.Pe&&(e.Pe=ty([W],[e.Nc.payload])),e.Pe||[]}}(eo),eu=new a3(eo.Nc.startTime,eo.Nc.endTime,es,0,null,null,0,0,1/0),eo.Nc.payload.includes("#xywh")&&4===(el=eo.Nc.payload.split("#xywh=")[1].split(",")).length&&eu.Ge({height:parseInt(el[3],10),positionX:parseInt(el[0],10),positionY:parseInt(el[1],10),width:parseInt(el[2],10)}),ei.push(eu);if(ec=J,!ei.length){e.s(4);break}return b(e,uI(ei[0].N()[0],X.g,X.h.manifest.retryParameters),5);case 5:ec=e.h;case 4:return e.return({id:X.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sl(ei),mimeType:ec||"",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([n8(ec||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})),10);case 10:D=e.h,I.imageStreams.push(D),gW(a),C=M.next(),e.s(7);break;case 9:L=(P=u(c)).next();case 11:if(L.done)return r9(h.drm.clearKeys,I.variants),O=I.variants.some(function(e){if(e.audio){for(var t=u(e.audio.drmInfos),n=t.next();!n.done;n=t.next())if(n.value.licenseServerUri.startsWith("data:"))return!0}if(e.video){for(t=(e=u(e.video.drmInfos)).next();!t.done;t=e.next())if(t.value.licenseServerUri.startsWith("data:"))return!0}return!1}),U=h.offline.usePersistentLicense,O&&(U=!1),b(e,a.Lc(I,function(e){S=S||e},h,U),15);return N=L.value,b(e,(ed=a,eh=I,ep=N.uri,ef=N.language,eg=N.kind,em=N.mime,ev=N.codecs,R(function(e){if(1==e.g)return em?e.s(2):b(e,gX(ed,ep),3);if(2!=e.g&&(em=e.h),ey={id:ed.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sd(0,eh.presentationTimeline.getDuration(),[ep]),mimeType:em||"",codecs:ev||"",kind:eg,encrypted:!1,drmInfos:[],keyIds:new Set,language:ef,originalLanguage:ef,label:null,type:tA,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([n8(em||"",ev||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!ip(n8(ey.mimeType,ey.codecs)))throw new eC(2,2,2014,em);return e.return(ey)})),14);case 14:j=e.h,I.textStreams.push(j),gW(a),L=P.next(),e.s(11);break;case 15:if(g=e.h,gW(a),S)throw S;return b(e,(eb=I,ew=g,ex=h,eS=U,R(function(e){switch(e.g){case 1:var t,n,i;return eT={width:1/0,height:1/0},t=eb,n=ex.restrictions,i=eT,t.variants=t.variants.filter(function(e){return iL(e,n,i)}),b(e,iN(ew,eb,eS,ex.drm.preferredKeySystems,ex.drm.keySystemsMapping),2);case 2:for(eA=[],eE=ex.preferredDecodingAttributes,eI=ex.preferredVideoCodecs,eM=ex.preferredAudioCodecs,iP(eb,eI,eM,eE,ex.preferredTextFormats),eR=(eD=u(eb.variants)).next();!eR.done;eR=eD.next())eP=eR.value,eA.push(iF(eP));for(eN=(eL=u(eb.textStreams)).next();!eN.done;eN=eL.next())ej=eN.value,eA.push(iV(ej));for(eU=(eO=u(eb.imageStreams)).next();!eU.done;eU=eO.next())e_=eU.value,eA.push(iH(e_));return b(e,ex.offline.trackSelectionCallback(eA),3);case 3:for(eB=e.h,eF=eb.presentationTimeline.getDuration(),eV=0,eG=(eH=u(eB)).next();!eG.done;eG=eH.next())eK=eG.value.bandwidth*eF/8,eV+=eK;return x(e,4),b(e,ex.offline.downloadSizeCallback(eV),6);case 6:if(!e.h)throw new eC(2,9,9014);T(e,5);break;case 4:if((eq=A(e))instanceof eC)throw eq;throw new eC(2,9,9015);case 5:for(ez=new Set,eX=new Set,eW=new Set,eJ=(eY=u(eB)).next();!eJ.done;eJ=eY.next())"variant"==(e$=eJ.value).type&&ez.add(e$.id),"text"==e$.type&&eX.add(e$.id),"image"==e$.type&&eW.add(e$.id);eb.variants=eb.variants.filter(function(e){return ez.has(e.id)}),eb.textStreams=eb.textStreams.filter(function(e){return eX.has(e.id)}),eb.imageStreams=eb.imageStreams.filter(function(e){return eW.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=u(t),i=n.next();!i.done;i=n.next()){i=u(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=u(e)).next();!n.done;n=t.next())for(i=(n=u(e)).next();!i.done;i=n.next());}(eb),w(e)}})),16);case 16:return b(e,m.init(),17);case 17:return gW(a),b(e,gv(m),18);case 18:return v=e.h,gW(a),B=(_=function(e,t,n,i,r,a,o){var s,l,c,d,h,p,f,g,m=(s=n,l=t,c=i,{offlineUri:null,originalManifestUri:s,duration:l.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:l=gO(l),appMetadata:c,isIncomplete:!1}),v=r.offline.progressCallback;d=a,h=function(e,t){m.size=t,v(m,e)},p=function(t,n){y&&o&&b==n&&rY(e,"cenc",t)},d.o=h,d.m=p;var y=gG(t)&&!gK(t),b=null;y&&(b=gQ.get(e.h.keySystem));for(var w=new gU,x=u(t.textStreams),S=x.next();!S.done;S=x.next())w.g.set(S.value.id,52);for(S=(x=u(t.imageStreams)).next();!S.done;S=x.next())f=w,g=S.value,f.g.set(g.id,g.bandwidth||2048);
1for(S=(x=u(t.variants)).next();!S.done;S=x.next())!function(e,t){var n=t.audio,i=t.video;if(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)}}(w,S.value);return r=(a=function(e,t,n,i){var r=new Map,a=g$(n),o=new Map;a=u(a);for(var s=a.next();!s.done;s=a.next()){var l=function(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(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.pb(),function(n,r){var l=ge(n),c=void 0;if(!a.has(l)){var d=n.endTime-n.startTime;d=g_(t,i.id)*d,d=gn(e.g,d),a.set(l,new f7(n,d,u,!1,r))}n.Y&&(c=ge(n.Y),a.has(c)||(d=.5*g_(t,i.id),d=gn(e.g,d),a.set(c,new f7(n.Y,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.codecs,thumbnailSprite:n.thumbnailSprite}),0!==s&&(u=(u+1)%s)}),o}(e,t,n,s=s.value,i,r);o.set(s.id,l)}for(t=(e=u(n.variants)).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()),vg:Array.from(r.values())}}(a,w,t,r)).streams,a=a.vg,(w=e.h)&&o&&(w.initData=[]),{$i:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.pd(),streams:r,sessionIds:o?rJ(e):[],drmInfo:w,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},vg:a}}(g,I,o,s,h,p,U)).$i,F=_.vg,b(e,v.Ta.addManifests([B]),19);case 19:if(V=e.h,gW(a),y=V[0],gW(a),S)throw S;return b(e,(eQ=a,eZ=F,e0=y,e1=B,e2=p,e3=h,e4=v.Ta,e5=I,e6=g,e8=U,R(function(e){switch(e.g){case 1:if(e9={},e7=0,te=function(){if(eQ.j.g||e2.l)throw new eC(2,9,7001)},tt=function(e,t){var n,i,r,a,o,s,l,c;return R(function(d){if(1==d.g){var h,p,f;for(i=(n=u(e)).next(),r={};!i.done;r={Nb:void 0},i=n.next())r.Nb=i.value,te(),h=r.Nb,p=e3,a=sO(h.g.N(),h.g.Sa,h.g.xa,p.streaming.retryParameters),o=r.Nb.i,s=r.Nb.h,l=function(e){return function(t){var n,i,r,a;return R(function(o){switch(o.g){case 1:if(i=(n=e.Nb.g).Ib(!1),!n.aesKey||i){o.s(2);break}return b(o,sj(t,n.aesKey,e.Nb.j),3);case 3:t=o.h;case 2:return r=ge(n),b(o,e4.addSegments([{data:t}]),4);case 4:a=o.h,te(),e9[r]=a[0],e7+=t.byteLength,w(o)}})}}(r),(c=r.Nb.g.Ib(!1))?function(e,t,n,i,r,a){rA(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new eC(2,9,7001);if(r){var t=ek(n);for(var o in(t=new rH(t)).data){var s=Number(o);e.m(t.data[s],t.g[s])}}return e.g.close(i,n.byteLength),e.o(gi(e.g),e.g.g),a(n)});e.i.set(t,o)}(e2,r.Nb.groupId,c,o,s,l):function(e,t,n,i,r,a){rA(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){var t,o,s,u,l,c;return R(function(d){if(1==d.g)return b(d,function(e,t){var n,i,r,a;return R(function(o){return 1==o.g?(n=rw,i=e.u.request(n,t),r=function(){return i.abort()},e.j.push(r),b(o,i.promise,2)):(a=o.h,tW(e.j,r),o.return(a.data))})}(e,n),2);if(t=d.h,e.h.g)throw new eC(2,9,7001);if(r)for(s in(o=new rH(ek(t))).data)u=Number(s),l=o.data[u],c=o.g[u],e.m(l,c);return e.g.close(i,t.byteLength),e.o(gi(e.g),e.g.g),d.return(a(t))})});e.i.set(t,o)}(e2,r.Nb.groupId,a,o,s,l);return b(d,(f=e2,R(function(e){return 1==e.g?b(e,Promise.all(f.i.values()),2):e.return(f.g.g)})),2)}return(te(),!t||e2.l)?d.s(0):(gq(e5,e1,e6,e8),b(d,e4.updateManifest(e0,e1),0))})},tn=!1,x(e,2),!gG(e5)||!tn||gK(e5)){e.s(4);break}return b(e,tt(eZ.filter(function(e){return e.h}),!0),5);case 5:return te(),eZ=eZ.filter(function(e){return!e.h}),ti=e9,tr=e7,e9={},e7=0,b(e,gH(e4,e0,e1,ti,tr,function(){return gW(eQ)}),6);case 6:te();case 4:if(tn){e.s(7);break}return b(e,tt(eZ,!1),8);case 8:return te(),ta=e9,to=e7,e9={},e7=0,b(e,gH(e4,e0,e1,ta,to,function(){return te()}),9);case 9:te();case 7:T(e,0);break;case 2:return ts=A(e),tu=Object.values(e9),b(e,e4.removeSegments(tu,function(){}),10);case 10:throw ts}})),20);case 20:return gW(a),gq(I,B,g,U),b(e,v.Ta.updateManifest(y,B),21);case 21:return gW(a),H=new gE("manifest",v.path.Ab,v.path.Ta,y),e.return(gj(H,B));case 3:return k(e),b(e,m.destroy(),22);case 22:if(!f){e.s(23);break}return b(e,f.stop(),23);case 23:if(!g){e.s(25);break}return b(e,g.destroy(),25);case 25:E(e,0);break;case 2:if(G=A(e),null==y){e.s(27);break}return b(e,gV(y),27);case 27:throw S||G}})),function(){return ga(Y)})).finally(function(){tW(X.l,Y)}),K=this,z=(q=t).promise,K.i.push(z),q.finally(function(){tW(K.i,z)})},c.remove=function(e){var t,n,i,r,a,o,s;return gJ(this,(t=this,n=e,R(function(e){switch(e.g){case 1:if(gY(),null==(i=gI(n))||"manifest"!=i.g)throw new eC(2,9,9004,n);return r=i,a=new gm,S(e,2),b(e,a.init(),4);case 4:return b(e,gy(a,r.Ab(),r.Ta()),5);
1case 5:return o=e.h,b(e,o.getManifests([r.key()]),6);case 6:var l,c,d;return s=e.h[0],b(e,Promise.all([(l=t,c=s,d=a,R(function(e){var t,n,i,r,a,o,s;return b(e,(t=l.g,n=l.h.drm,i=d,r=c,R(function(e){return 1==e.g?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new eC(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),b(e,gN(n,t,o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:gz(r,!1),videoCapabilities:gz(r,!0)}})),2)):e.return():3!=e.g?(s=e.h,b(e,a.remove(s),3)):b(e,a.add(o.filter(function(e){return!s.includes(e.sessionId)})),0)})),0)})),function(e,t,n){function i(){}var r=function(e){var t=new Set;e=u(e.streams);for(var n=e.next();!n.done;n=e.next()){n=u(n.value.segments);for(var i=n.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 gj(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return k(e),b(e,a.destroy(),8);case 8:E(e,0)}})))},c.sj=function(){var e,t,n,i,r,a,o,s,l,c,d;return gJ(this,(e=this,R(function(h){switch(h.g){case 1:return gY(),t=e.g,n=e.h.drm,i=new gm,r=!1,S(h,2),b(h,i.init(),4);case 4:var p,f;a=[],p=i,f=function(e){return a.push(e)},p.g.forEach(function(e){f(e.getEmeSessionCell())}),s=(o=u(a)).next();case 5:if(s.done){h.s(2);break}return b(h,(l=s.value).getAll(),8);case 8:return c=h.h,b(h,gN(n,t,c),9);case 9:return d=h.h,b(h,l.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),h.s(5);break;case 2:return k(h),b(h,i.destroy(),11);case 11:E(h,3);break;case 3:return h.return(!r)}})))},c.list=function(){var e,t,n;return gJ(this,R(function(i){switch(i.g){case 1:return gY(),e=[],t=new gm,S(i,2),b(i,t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return R(function(n){if(1==n.g)return b(n,i.getAllManifests(),2);n.h.forEach(function(n,i){n=gj(new gE("manifest",t.Ab,t.Ta,i),n),e.push(n)}),w(n)})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({Ab:t,Ta:n},e)})}),b(i,n,2);case 2:return k(i),b(i,t.destroy(),6);case 6:E(i,3);break;case 3:return i.return(e)}}))},c.Lc=function(e,t,n,i){var r,a=this;return R(function(o){var s,u,l;return 1==o.g?((r=new rK({Xb:a.g,onError:t,te:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),b(o,(s=r,u=e.variants,l=i,s.ka=!0,s.B=new Map,s.O=l,rz(s,u,!1)),2)):3!=o.g?b(o,rW(r),3):o.return(r)})},B("shaka.offline.Storage",gB),gB.deleteAll=function(){var e;return R(function(t){var n,i,r;return 1==t.g?(e=new gm,S(t,2),b(t,(n=e,R(function(e){return 1==e.g?((r=0<(i=Array.from(n.g.values())).length)||gw.forEach(function(e){(e=e())&&i.push(e)}),b(e,Promise.all(i.map(function(e){return e.erase()})),2)):r?e.s(0):b(e,Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.g?(k(t),b(t,e.destroy(),5)):E(t,0)})},gB.prototype.list=gB.prototype.list,gB.prototype.removeEmeSessions=gB.prototype.sj,gB.prototype.remove=gB.prototype.remove,gB.prototype.store=gB.prototype.store,gB.prototype.getNetworkingEngine=gB.prototype.yb,gB.prototype.getConfiguration=gB.prototype.getConfiguration,gB.prototype.configure=gB.prototype.configure,gB.prototype.destroy=gB.prototype.destroy,gB.support=gF;var gQ=(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 gZ(){}function g0(e,t){for(e={priority:t||0,callback:e},t=0;t<g1.length;t++)if(g1[t].priority<e.priority)return void g1.splice(t,0,e);g1.push(e)}la("offline",gF),B("shaka.polyfill",gZ),gZ.register=g0,gZ.installAll=function(){for(var e=u(g1),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){X("Error installing polyfill!",e)}}};var g1=[];function g2(){}function g3(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())!function(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||void 0==e?this.removeAttribute(t):this.setAttribute(t,e)}})}(t.value)}function g4(){}function g5(){eQ()||e5("Sky_STB")||yy()}function g6(){}function g8(){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",g9),document.addEventListener("webkitfullscreenerror",g9),document.addEventListener("mozfullscreenchange",g9),document.addEventListener("mozfullscreenerror",g9),document.addEventListener("MSFullscreenChange",g9),document.addEventListener("MSFullscreenError",g9)}}function g9(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 g7(){}function me(){var e=!0;(eW()&&!e2()&&!e3()||eJ()||e$()||eQ()||ez()||eK()||eZ()||e6()&&!eJ())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=mt)}function mt(t){var n,i,r,a,o;return R(function(s){switch(s.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type||i&&!eV(i.contentType)||r&&!eV(r.contentType))return s.return(n);s.s(2);break}if(!eF())return s.return(n);if(!i){s.s(3);break}return b(s,(u=i,R(function(t){var n,i,r,a,o;return 1==t.g?eW()?b(t,(n=u,R(function(t){if(1==t.g){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return t.return(tP(n.contentType));switch(i=n.contentType,n.width&&n.height&&1280<n.width&&720<n.height&&(i+="; width="+n.width+"; height="+n.height),n.framerate&&(24>(r=Math.round(n.framerate))||30<r)&&(i+="; framerate="+n.framerate),n.transferFunction||""){case"":case"srgb":break;case"pq":i+="; eotf=smpte2084";break;case"hlg":i+="; eotf=arib-std-b67";break;default:return t.return(!1)}return a=!1,(o=mn).has(i)?(a=o.get(i),t.s(2)):b(t,cast.__platform__.canDisplayType(i),3)}return 2!=t.g&&(a=t.h,o.set(i,a)),t.return(a)})),3):t.s(2):2!=t.g?(l=t.h,t.return(l)):t.return(tP(u.contentType))})),4);case 4:if(!s.h)return s.return(n);case 3:if(r){var u,l,c,d,h,p,f,g,m,v,y,w,S,k,E,I,M=r.contentType;if(eW()&&r.spatialRendering&&(M+="; spatialRendering=true"),!tP(M))return s.return(n)}case 2:if(!t.keySystemConfiguration)return n.supported=!0,s.return(n);return a=t.keySystemConfiguration,b(s,(c=i,d=r,h=a,R(function(e){switch(e.g){case 1:if(p=[],f=[],h.audio&&(g={robustness:h.audio.robustness||"",contentType:d.contentType},eK()&&d.contentType.includes('codecs="ac-3"')&&(g.contentType='audio/mp4; codecs="ec-3"'),h.audio.encryptionScheme&&(g.encryptionScheme=h.audio.encryptionScheme),p.push(g)),h.video&&(m={robustness:h.video.robustness||"",contentType:c.contentType},h.video.encryptionScheme&&(m.encryptionScheme=h.video.encryptionScheme),f.push(m)),v={initDataTypes:[h.initDataType],distinctiveIdentifier:h.distinctiveIdentifier,persistentState:h.persistentState,sessionTypes:h.sessionTypes},p.length&&(v.audioCapabilities=p),f.length&&(v.videoCapabilities=f),y=c?c.contentType:"",w=d?d.contentType:"",S=ir(y)+";"+ii(y),k=ir(w)+";"+ii(w),E=h.keySystem,I=null,x(e,2),eU.has(S+"#"+k+"#"+E)){I=eU.get(S+"#"+k+"#"+E)||null,e.s(4);break}return b(e,navigator.requestMediaKeySystemAccess(h.keySystem,[v]),5);case 5:I=e.h,eU.set(S+"#"+k+"#"+E,I);case 4:T(e,3);break;case 2:A(e);case 3:return e.return(I)}})),6);case 6:(o=s.h)&&(n.supported=!0,n.keySystemAccess=o);case 5:return s.return(n)}})}gZ.Aria=g2,g2.install=g3,g0(g3),gZ.EncryptionScheme=g4,g4.install=g5,g0(g5,-2),gZ.Fullscreen=g6,g6.install=g8,g0(g8),gZ.MediaCapabilities=g7,g7.install=me;g7.originalMcap=null;var mn=new Map;function mi(){}function mr(){var t,n=e0();(e.MediaSource||e.ManagedMediaSource)&&(n&&e.MediaSource?12>=n?(ma(),mo()):15>=n&&ma():e5("DT_STB_BCM")?(ma(),mo()):(e5("Tizen 2")||eq()||e5("Tizen 4"))&&function(){var t=MediaSource.isTypeSupp
1orted.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return"opus"!=ii(e)&&t(e)},e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"opus"!=ii(e)&&n(e)}}}()),(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=ie(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=ie(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(t=MediaSource.isTypeSupported,ez()||(MediaSource.isTypeSupported=function(e){var n=e.split(/ *; */),i=n.findIndex(function(e){return e.startsWith("codecs=")});if(0>i)return t(e);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(",")+'"',e=n.join("; ")),t(e)}))}function ma(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,P.apply(0,arguments));return t.abort=function(){},t}}function mo(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function ms(){}function mu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):void 0!=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 ml;screen.orientation=n,t(),e.addEventListener("orientationchange",function(){t();var e=new rs("change");n.dispatchEvent(e)})}())}function ml(){rc.call(this),this.type="",this.angle=0}function mc(){}function md(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&((void 0===t?0:t)&&(yw=!0,yx=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),yS=HTMLMediaElement.prototype.setMediaKeys,yT=e.MediaKeys,yA=e.MediaKeySystemAccess,yk=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mp,e.MediaKeys=mm,e.MediaKeySystemAccess=mg,navigator.requestMediaKeySystemAccess=mh,e.shakaMediaKeysPolyfill=mx,iZ.clear(),eU.clear())}function mh(e,t){try{var n=new mg(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function mp(e){var t=this.mediaKeys;return t&&t!=e&&mv(t,null),delete this.mediaKeys,(this.mediaKeys=e)?mv(e,this):Promise.resolve()}function mf(e){if(eI(e=ek(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=to(e=tr(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=eA(e),this.dispatchEvent(t)}function mg(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=u(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=u(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(a=(n=u(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){this.g=t;return}}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function mm(e){this.h=new WebKitMediaKeys(e),this.g=new Q}function mv(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",mf);try{return o5(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function my(e){rc.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Q,this.sessionId="",this.expiration=NaN,this.closed=new re,this.keyStatuses=new mw}function mb(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new rs("keystatuseschange"),e.dispatchEvent(t)}function mw(){this.size=0,this.g=void 0}g0(me,-1),gZ.MediaSource=mi,mi.install=mr,g0(mr),gZ.Orientation=ms,ms.install=mu,g(ml,rc),ml.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))},ml.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},g0(mu),gZ.PatchedMediaKeysApple=mc,mc.uninstall=function(){yw&&(yw=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",yx),HTMLMediaElement.prototype.setMediaKeys=yS,e.MediaKeys=yT,e.MediaKeySystemAccess=yA,navigator.requestMediaKeySystemAccess=yk,yx=yk=yS=yA=yT=null,e.shakaMediaKeysPolyfill="",iZ.clear(),eU.clear())},mc.install=md,mg.prototype.createMediaKeys=function(){return Promise.resolve(new mm(this.keySystem))},mg.prototype.getConfiguration=function(){return this.g},mm.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new my(this.h,e)},mm.prototype.setServerCertificate=function(){return Promise.resolve(!1)},mm.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},g(my,rc),(c=my.prototype).generateRequest=function(e,t){var n=this;this.h=new re;try{var i=this.l.createSession("video/mp4",ek(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=(new Map).set("messageType",void 0==n.keyStatuses.dc()?"license-request":"license-renewal").set("message",eA(e.message)),e=new rs("message",e),n.dispatchEvent(e)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(mb(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
1if(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:mb(n,"output-not-allowed");break;default:mb(n,"internal-error")}}),mb(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},c.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},c.update=function(e){this.g=new re;try{this.i.update(ek(e))}catch(e){this.g.reject(e)}return this.g},c.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},c.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(c=mw.prototype).dc=function(){return this.g},c.forEach=function(e){this.g&&e(this.g,eO.value())},c.get=function(e){if(this.has(e))return this.g},c.has=function(e){var t=eO.value();return!!(this.g&&eT(e,t))},c.entries=function(){},c.keys=function(){},c.values=function(){};var mx="apple";function mS(){}function mT(){e.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||eq()||e5("Tizen 4")||e5("Tizen 5.0")||eX())&&(MediaKeys.prototype.setServerCertificate=mA)}function mA(){return Promise.resolve(!1)}function mk(){}function mE(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)m_="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=mM,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mC,e.MediaKeys=mR,e.MediaKeySystemAccess=mD,e.shakaMediaKeysPolyfill=mB}}function mI(e){var t=m_;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function mM(e,t){try{var n=new mD(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function mC(e){var t=this.mediaKeys;return t&&t!=e&&mP(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&mP(e,this),Promise.resolve()}function mD(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"),t=u(t);for(var a=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 l=u(a.audioCapabilities),c=l.next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,r.canPlayType(c.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(c),i=!0));if(a.videoCapabilities)for(c=(l=u(a.videoCapabilities)).next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,r.canPlayType(c.contentType,this.g)&&(o.videoCapabilities.push(c),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){this.h=o;return}}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 mR(e){this.l=e,this.h=null,this.g=new Q,this.i=[],this.j=new Map}function mP(e,t){e.h=t,e.g.Ra();var n=m_;t&&(e.g.D(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=eA(t.initData),e.h.dispatchEvent(n)}),e.g.D(t,n+"keymessage",function(t){var n=mL(e,t.sessionId);n&&(t=new rs("message",t=(new Map).set("messageType",void 0==n.keyStatuses.dc()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.D(t,n+"keyadded",function(t){(t=mL(e,t.sessionId))&&t.ready()}),e.g.D(t,n+"keyerror",function(t){var n=mL(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?mO(n,"output-restricted"):1==i?mO(n,"expired"):mO(n,"internal-error"))}}))}function mL(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}
1function mN(e,t,n){rc.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 re,this.keyStatuses=new mU}function mj(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=ek(to("LOAD_SESSION|"+n));else{var r=to("PERSISTENT|");i=tv(r,t)}else i=ek(t)}catch(e){return Promise.reject(e)}e.h=new re;var a=mI("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new eB(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).da(.01)}return e.h}function mO(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new rs("keystatuseschange"),e.dispatchEvent(t)}function mU(){this.size=0,this.g=void 0}g0(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||md())}),gZ.PatchedMediaKeysCert=mS,mS.install=mT,g0(mT),gZ.PatchedMediaKeysWebkit=mk,mk.install=mE,mD.prototype.createMediaKeys=function(){return Promise.resolve(new mR(this.g))},mD.prototype.getConfiguration=function(){return this.h},mR.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw 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 mN(t,this.l,e),this.i.push(e),e},mR.prototype.setServerCertificate=function(){return Promise.resolve(!1)},mR.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},g(mN,rc),(c=mN.prototype).ready=function(){mO(this,"usable"),this.g&&this.g.resolve(),this.g=null},c.generateRequest=function(e,t){return mj(this,t,null)},c.load=function(e){return"persistent-license"==this.l?mj(this,null,e):Promise.reject(Error("Not a persistent session."))},c.update=function(e){var t=new re;return!function e(t,n,i){if(t.g)t.g.then(function(){return e(t,n,i)}).catch(function(){return e(t,n,i)});else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var r=ti(i),a=JSON.parse(r);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),r=tf(a.keys[0].k),a=tf(a.keys[0].kid)}else r=ek(i),a=null;var o=mI("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},c.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=mI("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},c.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(c=mU.prototype).dc=function(){return this.g},c.forEach=function(e){this.g&&e(this.g,eO.value())},c.get=function(e){if(this.has(e))return this.g},c.has=function(e){var t=eO.value();return!!(this.g&&eT(e,t))},c.entries=function(){},c.keys=function(){},c.values=function(){};var m_="",mB="webkit";function mF(){}function mV(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=mG,Object.defineProperty(t,"disablePictureInPicture",{get:mq,set:mz,enumerable:!0,configurable:!0}),document.exitPictureInPicture=mK,document.addEventListener("webkitpresentationmodechanged",mH,!0))}}function mH(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 mG(){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 mK(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function mq(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function mz(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function mX(){}function mW(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=mY))}function mY(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function mJ(){}function m$(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:mQ})}function mQ(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function mZ(){}function m0(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function m1(){}
1function m2(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||eX())&&(t.getVideoPlaybackQuality=m3)}}function m3(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function m4(){}function m5(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=m6;else if(6==n)t=m8;else{try{var i=!!m6(1,2,"")}catch(e){i=!1}i&&(t=m6)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function m6(t,n,i){return new e.TextTrackCue(t,n,i)}function m8(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function m9(){}g0(mE),gZ.PiPWebkit=mF,mF.install=mV,g0(mV),gZ.RandomUUID=mX,mX.install=mW,g0(mW),gZ.Symbol=mJ,mJ.install=m$,g0(m$),gZ.VideoPlayPromise=mZ,mZ.install=m0,g0(m0),gZ.VideoPlaybackQuality=m1,m1.install=m2,g0(m2),gZ.VTTCue=m4,m4.install=m5,g0(m5),m9.prototype.parseInit=function(){},m9.prototype.setSequenceMode=function(){},m9.prototype.setManifestType=function(){},m9.prototype.parseMedia=function(e,t){var n=null,i=[];e=u(e=ti(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=m7.exec(r))){var a=ve.exec(r[1]);r=new nI(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},B("shaka.text.LrcTextParser",m9),m9.prototype.parseMedia=m9.prototype.parseMedia,m9.prototype.setManifestType=m9.prototype.setManifestType,m9.prototype.setSequenceMode=m9.prototype.setSequenceMode,m9.prototype.parseInit=m9.prototype.parseInit;var m7=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ve=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function vt(){}function vn(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 vi(e,t){t=u(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(nJ)||e.textDecoration.push(nJ);break;case"noUnderline":e.textDecoration.includes(nJ)&&tW(e.textDecoration,nJ);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&tW(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&tW(e.textDecoration,"overline")}}function vr(e,t,n,i,r){return r=void 0===r||r,(e=vo(e,n,i))?e:r?va(t,n,i):null}function va(e,t,n){if(!e)return null;var i=nc(e,vE,n);return i||vs(e,t,n)}function vo(e,t,n){var i=nc(e,vE,n);return i||vs(e,t,n)}function vs(e,t,n){e=vu(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=nu(e[r],"urn:ebu:tt:style",n);a||(a=nc(e[r],vE,n)),a||(a=vo(e[r],t,n)),a&&(i=a)}return i}function vu(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;!e&&!(e=r?nu(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e){for(r=(t=u(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=u(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}}return a}function vl(e,t){var n=vc(e.attributes.begin,t),i=vc(e.attributes.end,t);return e=vc(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function vc(e,t){var n=null;if(vv.test(e)){n=Number((e=vv.exec(e))[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);a+=(Number(e[5])||0)/t.h,r+=a/t.frameRate,n=r+60*i+3600*n}else if(vy.test(e))n=vd(vy,e);else if(vb.test(e))n=vd(vb,e);else if(vw.test(e))n=Number((e=vw.exec(e))[1])/t.frameRate;else if(vx.test(e))n=Number((e=vx.exec(e))[1])/t.g;else if(vS.test(e))n=vd(vS,e);else if(e)throw new eC(2,2,2001,"Could not parse cue time range in TTML");return n}function vd(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 vh(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]))}id("application/x-subtitle-lrc",function(){return new m9}),vt.prototype.parseInit=function(){},vt.prototype.setSequenceMode=function(){},vt.prototype.setManifestType=function(){},vt.prototype.parseMedia=function(e,t,n,i){var r,a=ti(e);if(e=[],""==a)return e;var o=t8(a,"tt",!0);if(!o)throw new eC(2,2,2005,"Failed to parse TTML.");if(!(a=nr(o,"body")[0]))return[];var s=nc(o,vk,"frameRate"),l=nc(o,vk,"subFrameRate"),c=nc(o,vk,"frameRateMultiplier"),d=nc(o,vk,"tickRate"),h=nc(o,vk,"cellResolution"),p=o.attributes["xml:space"]||"default",f=nc(o,vE,"extent");
1if("default"!=p&&"preserve"!=p)throw new eC(2,2,2005,"Invalid xml:space value: "+p);p="default"==p,s=new vh(s,l,c,d),h=(r=h)&&(r=/^(\d+) (\d+)$/.exec(r))?{oc:parseInt(r[1],10),rows:parseInt(r[2],10)}:null,l=((l=nr(o,"metadata")[0])?l.children:[]).filter(function(e){return"\n"!=e}),c=nr(o,"style"),o=nr(o,"region"),d=[];for(var g=u(o),m=g.next();!m.done;m=g.next())(m=function(e,t,n){var i=new tK,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=vp.exec(n)||vm.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var a,o=va(e,t,"extent");if(o){var s=(a=vp.exec(o))||vm.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?tq:0,i.heightUnits=a||null!=r?tq:0)}return(e=va(e,t,"origin"))&&null!=(s=(a=vp.exec(e))||vm.exec(e))&&(i.viewportAnchorX=Number(s[1]),i.viewportAnchorY=Number(s[2]),a?o||(i.width=100-i.viewportAnchorX,i.widthUnits=tq,i.height=100-i.viewportAnchorY,i.heightUnits=tq):(null!=r&&(i.viewportAnchorY=100*i.viewportAnchorY/r),null!=n&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=a||null!=n?tq:0),i}(m.value,c,f))&&d.push(m);if(nt(a,"p").length)throw new eC(2,2,2001,"<p> can only be inside <div> in TTML");for(g=(f=u(nt(a,"div"))).next();!g.done;g=f.next())if(nt(g.value,"span").length)throw new eC(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,l,c,d,h,p,f){var g,m,v,y,b=d;if(t7(t)){if(!h)return null;var w={tagName:"span",children:[nn(t)],attributes:{},parent:null}}else w=t;for(var x=null,S=u(vI),T=S.next();!T.done&&!(x=vu(w,"backgroundImage",r,"#",T.value)[0]);T=S.next());S=null;var A=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((T=nc(w,vI,"backgroundImage"))&&A.test(T)){if((S=parseInt(T.split(":").pop(),10)-1)>=f.length)return null;S=f[S]}else p&&T&&!T.startsWith("#")&&(A=new es(p),T=new es(T),(T=A.resolve(T).toString())&&(S=T));if(("p"==t.tagName||x||S)&&(h=!0),t=h,T="default"==(w.attributes["xml:space"]||(l?"default":"preserve")),A=w.children.every(t7),l=[],!A)for(var k=u(w.children),E=k.next();!E.done;E=k.next())(E=e(E.value,n,i,r,a,o,s,T,c,w,h,p,f))&&l.push(E);if(r=null!=d,p=nn(w),p=w.children.length&&p&&/\S/.test(p),!((k=w.attributes.begin||w.attributes.end||w.attributes.dur)||p||"br"==w.tagName||0!=l.length||r&&!T))return null;for(p=(f=vl(w,i)).start,f=f.end;b&&b.tagName&&"tt"!=b.tagName;){p=(g=b,m=i,v=p,y=f,g=vl(g,m),null==v?v=g.start:null!=g.start&&(v+=g.start),null==y?y=g.end:null!=g.start&&(y+=g.start),f={start:v,end:y}).start,f=f.end,b=b.parent}if(null==p&&(p=0),p+=n.periodStart,f=null==f?1/0:f+n.periodStart,p=Math.max(p,n.segmentStart),!k&&0<l.length)for(p=1/0,f=0,i=(n=u(l)).next();!i.done;i=n.next())p=Math.min(p,(i=i.value).startTime),f=Math.max(f,i.endTime);if("br"==w.tagName)return(a=new nI(p,f,"")).lineBreak=!0,a;if(n="",A&&(n=tl(nn(w)||""),T&&(n=n.replace(/\s+/g," "))),(n=new nI(p,f,n)).nestedCues=l,h||(n.isContainer=!0),c&&(n.cellResolution=c),c=vu(w,"region",o,"")[0],w.attributes.region&&c&&c.attributes["xml:id"]){var I=c.attributes["xml:id"];n.region=s.filter(function(e){return e.id==I})[0]}return s=c,d&&r&&!w.attributes.region&&!w.attributes.style&&(s=vu(d,"region",o,"")[0]),function(e,t,n,i,r,a,o,s){if("rtl"==vr(t,n,a,"direction",o=o||s)&&(e.direction="rtl"),"tb"==(s=vr(t,n,a,"writingMode",o))||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=n_),(s=vr(t,n,a,"textAlign",!0))?(e.positionAlign=vA.get(s),e.lineAlign=vT.get(s),e.textAlign=nj[s.toUpperCase()]):e.textAlign=nN,(s=vr(t,n,a,"displayAlign",!0))&&(e.displayAlign=nU[s.toUpperCase()]),(s=vr(t,n,a,"color",o))&&(e.color=vn(s)),(s=vr(t,n,a,"backgroundColor",o))&&(e.backgroundColor=vn(s)),(s=vr(t,n,a,"border",o))&&(e.border=s),s=vr(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(",")}switch((s=vr(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=nz),e.wrapLine=!(s=vr(t,n,a,"wrapOption",o))||"noWrap"!=s,(s=vr(t,n,a,"lineHeight",o))&&s.match(vg)&&(e.lineHeight=s),(s=vr(t,n,a,"fontSize",o))&&(s.match(vg)||s.match(vf))&&(e.fontSize=s),(s=vr(t,n,a,"fontStyle",o))&&(e.fontStyle=nY[s.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,s=i.attributes.encoding,i=nn(i).trim(),"PNG"==r&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=vr(t,n,a,"textOutline",o))&&((i=i.split(" "))[0].match(vg)?e.textStrokeColor=e.color:(e.textStrokeColor=vn(i[0]),i.shift()),i[0]&&i[0].match(vg)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=vr(t,n,a,"letterSpacing",o))&&i.match(vg)&&(e.letterSpacing=i),(i=vr(t,n,a,"linePadding",o))&&i.match(vg)&&(e.linePadding=i),(i=vr(t,n,a,"opacity",o))&&(e.opacity=parseFloat(i)),(i=va(n,a,"textDecoration"))&&vi(e,i),(i=vo(t,a,"textDecoration"))&&vi(e,i),(i=vr(t,n,a,"textCombine",o))&&(e.textCombineUpright=i),vr(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(n,w,s,x,S,a,t,0==l.length),n}(a,t,s,l,c,o,d,p,h,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},B("shaka.text.TtmlTextParser",vt),vt.prototype.parseMedia=vt.prototype.parseMedia,vt.prototype.setManifestType=vt.prototype.setManifestType,vt.prototype.setSequenceMode=vt.prototype.setSequenceMode,vt.prototype.parseInit=vt.prototype.parseInit;var vp=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vf=/^(\d{1,4}(?:\.\d+)?|100)%$/,vg=/^(\d+px|\d+em|\d*\.?\d+c)$/,vm=/^(\d+)px (\d+)px$/,vv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,vy=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,vb=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,vw=/^(\d*(?:\.\d*)?)f$/,vx=/^(\d*(?:\.\d*)?)t$/,vS=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),vT=(new Map).set("left",nV).set("center","center").set("right","end").set("start",nV).set("end","end"),vA=(new Map).set("left","line-left").set("center","center").set("right","line-right"),vk=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],vE=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],vI=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function vM(){this.g=new vt}function vC(){this.g="UNKNOWN"}function vD(e,t,n){var i,r,a;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?"middle"==(t=i[1])?e.textAlign=nN:e.textAlign=nj[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]&&(e.positionAlign="line-left"==(t=i[2])||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":nL)):(i=/^regi
1on:(.*)$/.exec(t))?(r=n,a=i[1],(t=(r=r.filter(function(e){return e.id==a})).length?r[0]:null)&&(e.region=t)):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=nH[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=nF,e.line=Number(n[1]),n[2]&&(e.lineAlign=nH[n[2].toUpperCase()]))}function vR(){this.g=null}function vP(){}function vL(){this.g=new vC}function vN(e){var t="WEBVTT\n\n";if(""==e)return t;e=u((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"));for(var n=e.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 vj(){}function vO(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 vU(e){return 3600*((e=vV.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}id("application/ttml+xml",function(){return new vt}),vM.prototype.parseInit=function(e){var t=!1;if((new rR).box("moov",rP).box("trak",rP).box("mdia",rP).box("minf",rP).box("stbl",rP).R("stsd",rL).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new eC(2,2,2007)},vM.prototype.setSequenceMode=function(){},vM.prototype.setManifestType=function(){},vM.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if((new rR).box("moof",rP).box("traf",rP).R("tfhd",function(e){r=aw(e.reader,e.flags).md}).R("trun",function(e){e=u((e=aT(e.reader,e.version,e.flags)).hg);for(var t=e.next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)}).R("subs",function(e){for(var t=e.reader,n=t.S(),i=-1,r=0;r<n;r++){var a=t.S();i+=a,a=t.ma();for(var s=[],u=0;u<a;u++)1==e.version?s.push(t.S()):s.push(t.ma()),t.X(),t.X(),t.S();o.set(i,s)}}).box("mdat",rO(function(e){a.push(e)})).parse(e,!1),0==a.length)throw new eC(2,2,2007);for(var c=tv.apply(td,l(a)),d=0,h=0;h<s.length;h++){var p=ek(c,d,s[h]);d+=s[h];var f=o.get(h);if(f&&f.length){p=ek(p,0,f[0]);for(var g=[],m=f[0],v=1;v<f.length;v++){var y=ek(e,m,f[v]);y=th(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},B("shaka.text.Mp4TtmlParser",vM),vM.prototype.parseMedia=vM.prototype.parseMedia,vM.prototype.setManifestType=vM.prototype.setManifestType,vM.prototype.setSequenceMode=vM.prototype.setSequenceMode,vM.prototype.parseInit=vM.prototype.parseInit,id('application/mp4; codecs="stpp"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.im1i"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.im1t"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.im2i"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.im2t"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.etd1"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new vM}),id('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new vM}),id('application/mp4; codecs="stpp.TTML.im1t"',function(){return new vM}),vC.prototype.parseInit=function(){},vC.prototype.setSequenceMode=function(){},vC.prototype.setManifestType=function(e){this.g=e},vC.prototype.parseMedia=function(e,t){var n=(e=(e=ti(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new eC(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||null==(e=t2(e[1])))throw new eC(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=0x200000000;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=(i=u(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new t$(r);var a=new tK;t0(r),tQ(r);for(var o=t0(r);o;){var s=a,l=o;(o=/^id=(.*)$/.exec(l))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(l))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(l))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(l)&&(s.scroll="up"),tQ(r),o=t0(r)}t.push(a)}for(nR(i=new Map),r=[],a=(n=u(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(l=1,s=[],o=-1;l<a.length;l++)a[l].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[l]),a[l].includes("}")&&(o=-1));for(o=(s=u(s)).next();!o.done;o=s.next()){var c=o.value;o="global",(l=c[0].match(/\((.*)\)/))&&(o=l.pop()),l=c.slice(1,-1),c[0].includes("}")&&(c=/\{(.*?)\}/.exec(c[0]))&&(l=c[1].split(";")),(c=i.get(o))||(c=new nI(0,0,""));for(var d=!1,h=0;h<l.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(l[h]);if(p){var f=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":case"background":d=!0,c.backgroundColor=f;break;case"color":d=!0,c.color=f;break;case"font-family":d=!0,c.fontFamily=f;break;case"font-size":d=!0,c.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(d=!0,c.fontWeight=nz);break;case"font-style":switch(f){case"normal":d=!0,c.fontStyle=nX;break;case"italic":d=!0,c.fontStyle=nW;break;case"oblique":d=!0,c.fontStyle="oblique"}break;case"opacity":d=!0,c.opacity=parseFloat(f);break;case"text-combine-upright":d=!0,c.textCombineUpright=f;break;case"text-shadow":d=!0,c.textShadow=f;break;case"white-space":d=!0,c.wrapLine="noWrap"!=f}}}d&&i.set(o,c)}}if(c=a,d=e,1==c.length&&!c[0]||/^NOTE($|[ \t])/.test(c[0])||"STYLE"==c[0]||"REGION"==c[0])a=null;else if(a=null,c[0].includes("--\x3e")||(a=c[0],c.splice(0,1)),o=t1(s=new t$(c[0])),h=tZ(s,/[ \t]+--\x3e[ \t]+/g),l=t1(s),null==o||null==h||null==l)X("Failed to parse VTT time code. Cue skipped:",a,c),a=null;else{for(o+=d,l+=d,d=c.slice(1).join("\n").trim(),i.has("global")?((c=i.get("global").clone()).startTime=o,c.endTime=l,c.payload=d):c=new nI(o,l,d),tQ(s),o=t0(s);o;)vD(c,o,t),tQ(s),o=t0(s);nD(c,i),null!=a&&(c.id=a),a=c}a&&r.push(a)}return r},B("shaka.text.VttTextParser",vC),vC.prototype.parseMedia=vC.prototype.parseMedia,vC.prototype.setManifestType=vC.prototype.setManifestType,vC.prototype.setSequenceMode=vC.prototype.setSequenceMode,vC.prototype.parseInit=vC.prototype.parseInit,id("text/vtt",function(){return new vC}),id('text/vtt; codecs="vtt"',function(){return new vC}),id('text/vtt; codecs="wvtt"',function(){return new vC}),vR.prototype.parseInit=function(e){var t=this,n=!1;if((new rR).box("moov",rP).box("trak",rP).box("mdia",rP).R("mdhd",function(e){t.g=(e=aS(e.reader,e.version)).timescale}).box("minf",rP).box("stbl",rP).R("stsd",rL).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new eC(2,2,2008)},vR.prototype.setSequenceMode=function(){},vR.prototype.setManifestType=function(){},vR.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new eC(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,l=!1,c=null;if((new rR).box("moof",rP).box("traf",rP).R("tfdt",function(e){o=!0,i=ax(e.reader,e.version).baseMediaDecodeTime}).R("tfhd",function(e){c=aw(e.reader,e.flags).ld}).R("trun",function(e){s=!0,r=aT(e.reader,e.version,e.flags).hg}).box("mdat",rO(function(e){l=!0,n=e})).parse(e,!1),!l&&!o&&!s)throw new eC(2,2,2008);e=i;for(var d=new rM(n,0),h=u(r),p=h.next();!p.done;p=h.next()){var f=(p=p.value).ig||c,g=p.Be?i+p.Be:e;e=g+(f||0);var m=0;do{var v=d.S();m+=v;var y=d.S(),b=null;"vttc"==r_(y)?8<v&&(b=d.Db(v-8)):d.skip(v-8),f&&b&&(v=function(e,t,n){var i,r,a;return(new rR).box("payl",rO(function(e){i=ti(e)})).box("iden",rO(function(e){r=ti(e)})).box("sttg",rO(function(e){a=ti(e)})).parse(e),i?function(e,t,n,i,r){if(nD(e=new nI(i,r,e)),t&&(e.id=t),n)for(n=t0(t=new t$(n));n;)vD(e,n,[]),tQ(t),n=t0(t);return e}(i,r,a,t,n):null}(b,t.periodStart+g/this.g,t.periodStart+e/this.g),a.push(v))}while(p.sampleSize&&m<p.sampleSize)}return a.filter(ib)},B("shaka.text.Mp4VttParser",vR),vR.prototype.parseMedia=vR.prototype.parseMedia,vR.prototype.setManifestType=vR.prototype.setManifestType,vR.prototype.setSequenceMode=vR.prototype.setSequenceMode,vR.prototype.parseInit=vR.prototype.parseInit,id('application/mp4; codecs="wvtt"',function(){return new vR}),vP.prototype.parseInit=function(){},vP.prototype.setSequenceMode=function(){},vP.prototype.setManifestType=function(){},vP.prototype.parseMedia=function(e){var t=ti(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=u(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new t$((n=n.value.split("\n"))[0]),r=t1(i),a=tZ(i,/,/g);if(i=t1(i),null==r||null==a||null==i)throw new eC(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new nI(r,i,n.slice(1).join("\n").trim()))}return e},B("shaka.text.SbvTextParser",vP),vP.prototype.parseMedia=vP.prototype.parseMedia,vP.prototype.setManifestType=vP.prototype.setManifestType,vP.prototype.setSequenceMode=vP.prototype.setSequenceMode,vP.prototype.parseInit=vP.prototype.parseInit,id("text/x-subviewer",function(){return new vP}),vL.prototype.parseInit=function(){},vL.prototype.setSequenceMode=function(){},vL.prototype.setManifestType=function(){},vL.prototype.parseMedia=function(e,t,n){return e=ek(to(e=vN(e=ti(e)))),this.g.parseMedia(e,t,n,[])},B("shaka.text.SrtTextParser",vL),vL.srt2webvtt=vN,vL.prototype.parseMedia=vL.prototype.parseMedia,vL.prototype.setManifestType=vL.prototype.setManifestType,vL.prototype.setSequenceMode=vL.prototype.setSequenceMode,vL.prototype.parseInit=vL.prototype.parseInit,id("text/srt",function(){return new vL}),vj.prototype.parseInit=function(){},vj.prototype.setSequenceMode=function(){},vj.prototype.setManifestType=function(){},vj.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=u(r=ti(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;
1r=a,(a=v_.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=u(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=vB.exec(e))){if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(vF);else if("Style"==e){e=a.split(vF),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=u(n.split(/\r?\n/))).next(),e={};!a.done;e={Eh:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=vB.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(vF);else if("Dialogue"==a){o=o.split(vF),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new nI(s=vU(a.Start),vU(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.Eh=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.Eh}}(e)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=vO(n))&&(e.color=n),(n=t.BackColour)&&(n=vO(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=nz),t.Italic&&(e.fontStyle=nW),t.Underline&&e.textDecoration.push(nJ),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=nO,e.textAlign="start";break;case 2:e.displayAlign=nO,e.textAlign=nN;break;case 3:e.displayAlign=nO,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=nN;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=nN;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,e),r.push(o)}}return r},B("shaka.text.SsaTextParser",vj),vj.prototype.parseMedia=vj.prototype.parseMedia,vj.prototype.setManifestType=vj.prototype.setManifestType,vj.prototype.setSequenceMode=vj.prototype.setSequenceMode,vj.prototype.parseInit=vj.prototype.parseInit;var v_=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vB=/^\s*([^:]+):\s*(.*)/,vF=/\s*,\s*/,vV=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function vH(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)?{ud:n,ia:e}:null}function vG(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{sampleRate:n[i],channelCount:a|=(192&e[t+3])>>>6,codec:"mp4a.40."+r}}function vK(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 vq(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function vz(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]>>3<<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,ra:e,ia:r}}function vX(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function vW(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]))return null;var n=new oc(e.subarray(t+2));oh(n,2),oh(n,3);var i=op(n,11)+1<<1,r=op(n,2);if(3==r){r=[24e3,22060,16e3][r=op(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=op(n,2);var o=op(n,3),s=op(n,1);return(n=op(n,5),t+i>e.byteLength)?null:(e=new Uint8Array([(8160&(e=Math.floor(i*r/(16*[1,2,3,6][a]))))>>
15,(31&e)<<3,r<<6|n<<1,s|o<<1,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,ra:e,ia:i})}function vY(e){this.j=e,this.h=0,this.g=new Map,this.i=null}id("text/x-ssa",function(){return new vj}),(c=vq.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&tP(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ia(t)||"mp4a.40.2")+'"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){for(var r=ek(e),a=ol(r),o=a.length;o<r.length&&!vK(r,o);o++);if(e=1e3*n.endTime,(a=ou(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=vG(r,o)))return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=vH(r,o);if(!u)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));var l=u.ud+u.ia;o+l<=r.length&&s.push({data:r.subarray(o+u.ud,o+l),size:u.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),o+=l}return e=Math.floor(e*(r=a.sampleRate)/1e3),i=new aM([i={id:t.id,type:"audio",codecs:a.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=aC(i),this.g.set(n,t)),n=this.i!==t,i=aN(i),this.i=t,this.h++,n?Promise.resolve(t=tv(t,i)):Promise.resolve(i)},B("shaka.transmuxer.AacTransmuxer",vq),vq.prototype.transmux=vq.prototype.transmux,vq.prototype.getOriginalMimeType=vq.prototype.getOriginalMimeType,vq.prototype.convertCodecs=vq.prototype.convertCodecs,vq.prototype.isSupported=vq.prototype.isSupported,vq.prototype.destroy=vq.prototype.destroy,nZ("audio/aac",function(){return new vq("audio/aac")},n2),(c=vX.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&tP(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?eq()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){e=ek(e);for(var r=ol(e),a=r.length;a<e.length&&!function(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=5;0<a;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=0xff000000>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(16>r)return!0}return!1}(e,a);a++);var o=1e3*n.endTime;(r=ou(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=vz(e,a);if(!l)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.ra,u.push({data:e.subarray(a,a+l.ia),size:l.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),a+=l.ia}return e=Math.floor(o*r/1e3),i=new aM([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:s,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=aC(i),this.g.set(n,t)),n=this.i!==t,i=aN(i),this.i=t,this.h++,n?Promise.resolve(t=tv(t,i)):Promise.resolve(i)},B("shaka.transmuxer.Ac3Transmuxer",vX),vX.prototype.transmux=vX.prototype.transmux,vX.prototype.getOriginalMimeType=vX.prototype.getOriginalMimeType,vX.prototype.convertCodecs=vX.prototype.convertCodecs,vX.prototype.isSupported=vX.prototype.isSupported,vX.prototype.destroy=vX.prototype.destroy,nZ("audio/ac3",function(){return new vX("audio/ac3")},n2),(c=vY.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&tP(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){e=ek(e);for(var r=ol(e),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]);a++);var o=1e3*n.endTime;(r=ou(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=vW(e,a);if(!l)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.ra,u.push({data:e.subarray(a,a+l.ia),size:l.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),a+=l.ia}return e=Math.floor(o*r/1e3),i=new aM([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:s,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=aC(i),this.g.set(n,t)),n=this.i!==t,i=aN(i),this.i=t,this.h++,n?Promise.resolve(t=tv(t,i)):Promise.resolve(i)},B("shaka.transmuxer.Ec3Transmuxer",vY),vY.prototype.transmux=vY.prototype.transmux,vY.prototype.getOriginalMimeType=vY.prototype.getOriginalMimeType,vY.prototype.convertCodecs=vY.prototype.convertCodecs,vY.prototype.isSupported=vY.prototype.isSupported,vY.prototype.destroy=vY.prototype.destroy,nZ("audio/ec3",function(){return new vY("audio/ec3")},n2);var vJ=[100,110,122,244,44,83,86,118,128,138,139,134];function v$(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*v0[14*(3===n?3-i:3===i?3:4)+r-1],a=v1[3*(3===n?0:2===n?1:2)+a],n=v2[n][i];var s=v3[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,ia:u,vj:8*n*s}}return null}function vQ(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function vZ(e,t){if(t+1<e.length&&vQ(e,t)){var n=v$(e,t),i=4;return n&&n.ia&&(i=n.ia),(t+=i)===e.length||t+1<e.length&&vQ(e,t)}return!1}var v0=[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],v1=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],v2=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],v3=[0,1,1,4];function v4(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function v5(e){this.h=e,this.g=null}function v6(e){this.h=e,(this.g=pL.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]!==v9[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function v8(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}(c=v4.prototype).destroy=function(){this.g.clear()},c.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&tP(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},c.getOriginalMimeType=function(){return this.j},c.transmux=function(e,t,n,i){for(var r,a=ek(e),o=ol(a).length;o<a.length&&!vZ(a,o);o++);for(e=[];o<a.length;){var s=v$(a,o);if(!s)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));r||(r=s),o+s.ia<=a.length&&e.push({data:a.subarray(o,o+s.ia),size:s.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),o+=s.ia}return r?(a=9e4*r.vj/r.sampleRate*this.h,i=new aM([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r.sampleRate,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:a,jb:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=aC(i),this.g.set(n,t)),n=this.i!==t,i=aN(i),this.i=t,this.h++,n?Promise.resolve(t=tv(t,i)):Promise.resolve(i)):Promise.reject(new eC(2,3,3018,n?n.N()[0]:null))},B("shaka.transmuxer.Mp3Transmuxer",v4),v4.prototype.transmux=v4.prototype.transmux,v4.prototype.getOriginalMimeType=v4.prototype.getOriginalMimeType,v4.prototype.convertCodecs=v4.prototype.convertCodecs,v4.prototype.isSupported=v4.prototype.isSupported,v4.prototype.destroy=v4.prototype.destroy,nZ("audio/mpeg",function(){return new v4("audio/mpeg")},n2),(c=v5.prototype).destroy=function(){},c.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=ia(e).split(","),n=tS("audio",t);return t=tS("video",t),!!n&&!t&&"mp3"==it(n)&&tP(this.convertCodecs("audio",e))},c.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},c.getOriginalMimeType=function(){return this.h},c.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new ox,e=ek(e),"mp3"!=(e=this.g.parse(e)).od().audio||"audio"!=r)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));
1for(n=new Uint8Array([]),e=(r=u(e.fb())).next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=v$(e,t))?(t+i.ia<=e.length&&(n=tv(n,e.subarray(t,t+i.ia))),t+=i.ia):t++;return Promise.resolve(n)},B("shaka.transmuxer.MpegTsTransmuxer",v5),v5.prototype.transmux=v5.prototype.transmux,v5.prototype.getOriginalMimeType=v5.prototype.getOriginalMimeType,v5.prototype.convertCodecs=v5.prototype.convertCodecs,v5.prototype.isSupported=v5.prototype.isSupported,v5.prototype.destroy=v5.prototype.destroy,nZ("video/mp2t",function(){return new v5("video/mp2t")},n3),(c=v6.prototype).destroy=function(){},c.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?tP(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),tP(t)||tP(e)))},c.convertCodecs=function(e,t){return t.replace("mss/","")},c.getOriginalMimeType=function(){return this.h},c.transmux=function(e,t,n){if(!n)return Promise.resolve(ek(e));if(!t.mssPrivateData)return Promise.reject(new eC(2,3,3020,n?n.N()[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&=0xfffffe,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]=v8(f,"traf")+v8(s,"senc")+16);var m=ek(r.write());return Promise.resolve(m)}catch(e){return e instanceof eC?Promise.reject(e):Promise.reject(new eC(2,3,3022,n?n.N()[0]:null))}},B("shaka.transmuxer.MssTransmuxer",v6),v6.prototype.transmux=v6.prototype.transmux,v6.prototype.getOriginalMimeType=v6.prototype.getOriginalMimeType,v6.prototype.convertCodecs=v6.prototype.convertCodecs,v6.prototype.isSupported=v6.prototype.isSupported,v6.prototype.destroy=v6.prototype.destroy;var v9=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function v7(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}nZ("mss/audio/mp4",function(){return new v6("mss/audio/mp4")},n2),nZ("mss/video/mp4",function(){return new v6("mss/video/mp4")},n2),(c=v7.prototype).destroy=function(){this.i.clear(),this.h&&this.h.destroy()},c.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=ia(n).split(",");return n=tS("audio",i),i=tS("video",i),(!n||!!ye.includes(n=it(n)))&&(!i||!!yt.includes(n=it(i)))&&(t?tP(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),tP(t)||tP(e)))},c.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=ia(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return i_(e,"audio/mp4")}).map(iB).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},c.getOriginalMimeType=function(){return this.m},c.transmux=function(e,t,n,i,r){var a=ek(e);if("audio"==r&&!ok(a)){for(var o=ol(a),s=o.length;s<a.length;s++)if(vZ(a,s))return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));for(s=o.length;s<a.length;s++)if(vK(a,s))return this.h||(this.h=new vq("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new ox;var c=this.j.parse(a),d=[],h=c.od();try{var p=null;if("video"==r){switch(h.video){case"avc":var f=[],g=null,m=c.wc(),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=u(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=tv.apply(td,l(e)),i.push(r)}}for(var i=[],r=null,a=!1,o=0;o<e.length;o++){var s=e[o],c=s.nalus,d=!1;r&&c.length&&!a&&(n(),t(s)),c=u(s.nalus);for(var h=c.next();!h.done;h=c.next()){h=h.value;var p=!1;switch(h.type){case 1:var f,g=!1;p=!0;var m=h.data;d&&4<m.length&&(ob(f=new oc(m)),om(f),2===(m=om(f))||4===m||7===m||9===m)&&(g=!0),g&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=g;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:d=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 eC(2,3,3023,n?n.N()[0]:null);for(var y=0;y<v.length;y++){var b=v[y];null==g&&(g=b.dts);var w=void 0;w=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:w,eb:Math.round((b.pts||0)-(b.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:b.isKeyframe?2:1,ib:+!b.isKeyframe}})}for(var x=[],S=u(m),T=S.next();!T.done;T=S.next())x.push.apply(x,l(T.value.nalus));var A=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 oc(t.data),i=ob(n);if(ob(n),ob(n),og(n),vJ.includes(i)&&(3===(i=om(n))&&oh(n,1),og(n),og(n),oh(n,1),oy(n))){i=3!==i?8:12;for(var r=0;r<i;r++)oy(n)&&(6>
1r?ow(n,16):ow(n,64))}if(og(n),0===(i=om(n)))om(n);else if(1===i)for(oh(n,1),og(n),og(n),i=om(n),r=0;r<i;r++)og(n);og(n),oh(n,1);var a=om(n),o=om(n),s=op(n,1);0===s&&oh(n,1),oh(n,1);var u=0,c=0,d=0,h=0;if(oy(n)&&(u=om(n),c=om(n),d=om(n),h=om(n)),r=i=1,oy(n)&&oy(n)){var p=ob(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=op(n,16),r=op(n,16))}return n=(2-s)*(o+1)*16-2*d-2*h,a=16*(a+1)-2*u-2*c,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(255&t.byteLength),u=u.concat.apply(u,l(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,l(e)),{height:n,width:a,Ca:e=new Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),Ia:i,La:r}}(x);if(!A||null==g)throw new eC(2,3,3018,n?n.N()[0]:null);t.height=A.height,t.width=A.width,p={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:A.Ca,Ia:A.Ia,La:A.La,data:{Eb:this.g,baseMediaDecodeTime:g,jb:f},stream:t};break;case"hvc":var k=[],E=null,I=[],M=c.wc();if(!M.length)throw new eC(2,3,3023,n?n.N()[0]:null);for(var C=0;C<M.length;C++){var D=M[C],R=D.nalus;I.push.apply(I,l(R));for(var P=!1,L=[],N=!1,j=u(R),O=j.next();!O.done;O=j.next()){var U=O.value;switch(U.type){case 1:case 0:var _=N=!0;break;case 19:case 20:case 21:P=_=N=!0;break;case 32:case 33:case 34:case 39:case 40:_=!0;break;case 35:N=_=!0;break;default:_=!1}if(N&&_){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,L.push(F),L.push(U.fullData)}}var V=L.length?{data:tv.apply(td,l(L)),isKeyframe:P}:null;if(V){null==E&&null!=D.dts&&(E=D.dts);var H=void 0;H=C+1<M.length?(M[C+1].dts||0)-(D.dts||0):1<M.length?(D.dts||0)-(M[C-1].dts||0):9e4*(n.endTime-n.startTime),k.push({data:V.data,size:V.data.byteLength,duration:H,eb:Math.round((D.pts||0)-(D.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:V.isKeyframe?2:1,ib:+!V.isKeyframe}})}}var G=function(e){if(!e.length)return null;var t,n,i,r,a,o,s,u,l,c,d=e.find(function(e){return 32==e.type}),h=e.find(function(e){return 33==e.type}),p=e.find(function(e){return 34==e.type});if(!d||!h||!p)return null;var f=(t=d.fullData,n=new oc(t,!0),ob(n),ob(n),op(n,4),op(n,2),op(n,6),{Wf:(t=op(n,3))+1,tg:n=oy(n)});e=function(e){ob(e=new oc(e,!0)),ob(e);var t=0,n=0,i=0,r=0;op(e,4);var a=op(e,3);oy(e);for(var o=op(e,2),s=op(e,1),u=op(e,5),l=ob(e),c=ob(e),d=ob(e),h=ob(e),p=ob(e),f=ob(e),g=ob(e),m=ob(e),v=ob(e),y=ob(e),b=ob(e),w=[],x=[],S=0;S<a;S++)w.push(oy(e)),x.push(oy(e));if(0<a)for(S=a;8>S;S++)op(e,2);for(S=0;S<a;S++)w[S]&&op(e,88),x[S]&&ob(e);om(e),3==(w=om(e))&&op(e,1),x=om(e),S=om(e),oy(e)&&(t+=om(e),n+=om(e),i+=om(e),r+=om(e));var T=om(e),A=om(e),k=om(e);if(oy(e))for(var E=0;E<=a;E++)om(e),om(e),om(e);else om(e),om(e),om(e);if(om(e),om(e),om(e),om(e),om(e),om(e),oy(e)&&oy(e))for(E=0;4>E;E++)for(var I=0;I<(3===E?2:6);I++)if(oy(e)){var M=Math.min(64,1<<4+(E<<1));1<E&&ov(e);for(var C=0;C<M;C++)ov(e)}else om(e);for(oy(e),oy(e),oy(e)&&(ob(e),om(e),om(e),oy(e)),E=om(e),M=I=0;M<E;M++)if(C=!1,0!==M&&(C=oy(e)),C){M===E&&om(e),oy(e),om(e);for(var D=C=0;D<=I;D++){var R=oy(e),P=!1;R||(P=oy(e)),(R||P)&&C++}I=C}else{for(I=(D=om(e))+(C=om(e)),R=0;R<D;R++)om(e),oy(e);for(D=0;D<C;D++)om(e),oy(e)}if(oy(e))for(E=om(e),I=0;I<E;I++){for(M=0;M<k+4;M++)op(e,1);op(e,1)}if(E=k=1,I=0,oy(e),oy(e),oy(e)){if(oy(e)&&(M=ob(e),C=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],D=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(k=C[M-1],E=D[M-1]):255===M&&(k=op(e,16),E=op(e,16))),oy(e)&&oy(e),oy(e)&&(op(e,3),oy(e),oy(e)&&(ob(e),ob(e),ob(e))),oy(e)&&(om(e),om(e)),oy(e),oy(e),oy(e),(M=oy(e))&&(om(e),om(e),om(e),om(e)),oy(e)&&(op(e,32),op(e,32),oy(e)&&om(e),oy(e)))for(D=!1,M=oy(e),C=oy(e),(M||C)&&((D=oy(e))&&(ob(e),op(e,5),oy(e),op(e,5)),op(e,4),op(e,4),D&&op(e,4),op(e,5),op(e,5),op(e,5)),R=0;R<=a;R++){var L=!0;P=1,oy(e)||(L=oy(e));var N=!1;if(L?om(e):N=oy(e),N||(P=om(e)+1),M){for(L=0;L<P;L++)om(e),om(e),D&&(om(e),om(e));oy(e)}if(C){for(L=0;L<P;L++)om(e),om(e),D&&(om(e),om(e));oy(e)}}oy(e)&&(oy(e),oy(e),oy(e),I=om(e),om(e),om(e),om(e),om(e))}
1return{Af:b,Gf:o,Hf:s,Ff:u,Bf:l,Cf:c,Df:d,Ef:h,uf:p,vf:f,wf:g,xf:m,yf:v,zf:y,pe:I,kf:0,hf:w,gf:T,ff:A,width:x-(t+n)*(1===w||2===w?2:1),height:S-(i+r)*(1===w?2:1),xj:k,wj:E}}(h.fullData);var g=(i=p.fullData,r=new oc(i,!0),ob(r),ob(r),om(r),om(r),oy(r),oy(r),op(r,3),oy(r),oy(r),om(r),om(r),ov(r),oy(r),oy(r),oy(r)&&om(r),ov(r),ov(r),oy(r),oy(r),oy(r),oy(r),i=oy(r),r=oy(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{Yf:a});return o=d.fullData,s=h.fullData,u=p.fullData,l={Wf:f.Wf,tg:f.tg,Gf:e.Gf,Hf:e.Hf,Af:e.Af,Ff:e.Ff,Bf:e.Bf,Cf:e.Cf,Df:e.Df,Ef:e.Ef,uf:e.uf,vf:e.vf,wf:e.wf,xf:e.xf,yf:e.yf,zf:e.zf,kf:e.kf,pe:e.pe,hf:e.hf,gf:e.gf,ff:e.ff,Yf:g.Yf},(c=new Uint8Array(23+(5+o.byteLength)+(5+s.byteLength)+(5+u.byteLength)))[0]=1,c[1]=(3&l.Gf)<<6|!!l.Hf<<5|31&l.Ff,c[2]=l.Bf,c[3]=l.Cf,c[4]=l.Df,c[5]=l.Ef,c[6]=l.uf,c[7]=l.vf,c[8]=l.wf,c[9]=l.xf,c[10]=l.yf,c[11]=l.zf,c[12]=l.Af,c[13]=240|(3840&l.pe)>>8,c[14]=255&l.pe,c[15]=252|3&l.Yf,c[16]=252|3&l.hf,c[17]=248|7&l.gf,c[18]=248|7&l.ff,c[19]=0,c[20]=0,c[21]=(3&l.kf)<<6|(7&l.Wf)<<3|!!l.tg<<2|3,c[22]=3,c[23]=160,c[24]=0,c[25]=1,c[26]=(65280&o.byteLength)>>8,c[27]=255&o.byteLength,c.set(o,28),c[23+(5+o.byteLength)]=161,c[o.byteLength+29]=0,c[o.byteLength+30]=1,c[o.byteLength+31]=(65280&s.byteLength)>>8,c[o.byteLength+32]=255&s.byteLength,c.set(s,o.byteLength+33),c[23+(o.byteLength+10+s.byteLength)]=162,c[o.byteLength+10+s.byteLength+24]=0,c[o.byteLength+10+s.byteLength+25]=1,c[o.byteLength+10+s.byteLength+26]=(65280&u.byteLength)>>8,c[o.byteLength+10+s.byteLength+27]=255&u.byteLength,c.set(u,o.byteLength+10+s.byteLength+28),d=c,{height:e.height,width:e.width,Ca:d,Ia:e.xj,La:e.wj}}(I);if(!G||null==E)throw new eC(2,3,3018,n?n.N()[0]:null);t.height=G.height,t.width=G.width,p={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:G.Ca,Ia:G.Ia,La:G.La,data:{Eb:this.g,baseMediaDecodeTime:E,jb:k},stream:t}}p&&(d.push(p),p=null)}if("audio"==r){switch(h.audio){case"aac":for(var K,q=[],z=null,X=null,W=null,Y=u(c.fb()),J=Y.next();!J.done;J=Y.next()){var $=J.value,Q=$.data;if(Q){var Z=0;if(-1==X&&W)Q=tv(W,$.data),X=null;else if(null!=X&&W){Z=Math.max(0,X);var ee=tv(W,Q.subarray(0,Z));q.push({data:ee,size:ee.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),X=W=null}if(!(K=vG(Q,Z)))throw new eC(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=K.sampleRate,t.channelsCount=K.channelCount,null==z&&null!==$.pts&&(z=$.pts);Z<Q.length;){var et=vH(Q,Z);if(!et){W=Q.subarray(Z,Q.length),X=-1;break}var en=et.ud+et.ia;X=Math.max(0,Z+en-Q.length),0!=X?W=Q.subarray(Z+et.ud,Z+en):Z+en<=Q.length&&q.push({data:Q.subarray(Z+et.ud,Z+en),size:et.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Z+=en}}}if(!K||null==z){if(!c.wc().length)throw new eC(2,3,3018,n?n.N()[0]:null);z=9e4*n.startTime;var ei=tS("audio",t.codecs.split(","));if(!ei||!t.channelsCount||!t.audioSamplingRate)throw new eC(2,3,3018,n?n.N()[0]:null);K={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:ei};var er=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}(ei,t.channelsCount);if(!er)throw new eC(2,3,3018,n?n.N()[0]:null);for(var ea=z+9e4*(n.endTime-n.startTime),eo=z;eo<ea;)q.push({data:er,size:er.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),eo+=1024/K.sampleRate*9e4}var es=K.sampleRate,eu=z/9e4*es;p={id:t.id,type:"audio",codecs:K.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:es,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:eu,jb:q},stream:t};break;case"ac3":for(var el=[],ec=0,ed=new Uint8Array([]),eh=null,ep=u(c.fb()),ef=ep.next();!ef.done;ef=ep.next()){var eg=ef.value,em=eg.data;null==eh&&null!==eg.pts&&(eh=eg.pts);for(var ev=0;ev<em.length;){var ey=vz(em,ev);ey?(t.audioSamplingRate=ey.sampleRate,t.channelsCount=ey.channelCount,ec=ey.sampleRate,ed=ey.ra,el.push({data:em.subarray(ev,ev+ey.ia),size:ey.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),ev+=ey.ia):ev++}}if(0==ec||0==ed.byteLength||null==eh)throw new eC(2,3,3018,n?n.N()[0]:null);var eb=eh/9e4*ec;p={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ec,duration:i,lb:[],ra:ed,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:eb,jb:el},stream:t};break;case"ec3":for(var ew=[],ex=0,eS=new Uint8Array([]),eT=null,eA=u(c.fb()),eE=eA.next();!eE.done;eE=eA.next()){var eI=eE.value,eM=eI.data;null==eT&&null!==eI.pts&&(eT=eI.pts);for(var eD=0;eD<eM.length;){var eR=vW(eM,eD);eR?(t.audioSamplingRate=eR.sampleRate,t.channelsCount=eR.channelCount,ex=eR.sampleRate,eS=eR.ra,ew.push({data:eM.subarray(eD,eD+eR.ia),size:eR.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),eD+=eR.ia):eD++}}if(0==ex||0==eS.byteLength||null==eT)throw new eC(2,3,3018,n?n.N()[0]:null);var eP=eT/9e4*ex;p={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:ex,duration:i,lb:[],ra:eS,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:eP,jb:ew},stream:t};break;case"mp3":for(var eL,eN=[],ej=null,eO=u(c.fb()),eU=eO.next();!eU.done;eU=eO.next()){var e_=eU.value,eB=e_.data;if(eB){null==ej&&null!==e_.pts&&(ej=e_.pts);for(var eF=0;eF<eB.length;){var eV=v$(eB,eF);
1eV?(eL||(eL=eV),eF+eV.ia<=eB.length&&eN.push({data:eB.subarray(eF,eF+eV.ia),size:eV.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),eF+=eV.ia):eF++}}}if(!eL||null==ej)throw new eC(2,3,3018,n?n.N()[0]:null);var eH=eL.sampleRate,eG=ej/9e4*eH;p={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eH,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:eG,jb:eN},stream:t};break;case"opus":var eK=[],eq=null,ez=c.F;if(!ez)throw new eC(2,3,3018,n?n.N()[0]:null);var eX=[];switch(ez.$h){case 1:case 2:eX=[0];break;case 0:eX=[255,1,1,0,1];break;case 128:eX=[255,2,0,0,1];break;case 3:eX=[1,2,1,0,2,1];break;case 4:eX=[1,2,2,0,1,2,3];break;case 5:eX=[1,3,2,0,4,1,2,3];break;case 6:eX=[1,4,2,0,4,1,2,3,5];break;case 7:eX=[1,4,2,0,4,1,2,3,5,6];break;case 8:eX=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:eX=[1,1,2,0,1];break;case 131:eX=[1,1,3,0,1,2];break;case 132:eX=[1,1,4,0,1,2,3];break;case 133:eX=[1,1,5,0,1,2,3,4];break;case 134:eX=[1,1,6,0,1,2,3,4,5];break;case 135:eX=[1,1,7,0,1,2,3,4,5,6];break;case 136:eX=[1,1,8,0,1,2,3,4,5,6,7]}for(var eW=new Uint8Array([0,ez.channelCount,0,0,ez.sampleRate>>>24&255,ez.sampleRate>>>17&255,ez.sampleRate>>>8&255,ez.sampleRate>>>0&255,0,0].concat(l(eX))),eY=ez.sampleRate,eJ=u(c.fb()),e$=eJ.next();!e$.done;e$=eJ.next()){var eQ=e$.value,eZ=eQ.data;null==eq&&null!==eQ.pts&&(eq=eQ.pts);for(var e0=0;e0<eZ.length;){for(var e1=0!=(16&eZ[e0+1]),e2=0!=(8&eZ[e0+1]),e3=e0+2,e4=0;255===eZ[e3];)e4+=255,e3+=1;e4+=eZ[e3],e3+=1,e3+=2*!!e1,e3+=2*!!e2;var e5=eZ.slice(e3,e3+e4);eK.push({data:e5,size:e5.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),e0=e3+e4}}if(0==eW.byteLength||null==eq)throw new eC(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=ez.sampleRate,t.channelsCount=ez.channelCount;var e6=eq/9e4*eY;p={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:eY,duration:i,lb:[],ra:eW,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:e6,jb:eK},stream:t}}p&&(d.push(p),p=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!d.length)return Promise.reject(new eC(2,3,3018,n?n.N()[0]:null));var e8=new aM(d),e9=t.id+"_"+n.i;if(this.i.has(e9))var e7=this.i.get(e9);else e7=aC(e8),this.i.set(e9,e7);var te=this.l!==e7,tt=aN(e8);return(this.l=e7,this.g++,te)?Promise.resolve(tv(e7,tt)):Promise.resolve(tt)},B("shaka.transmuxer.TsTransmuxer",v7),v7.prototype.transmux=v7.prototype.transmux,v7.prototype.getOriginalMimeType=v7.prototype.getOriginalMimeType,v7.prototype.convertCodecs=v7.prototype.convertCodecs,v7.prototype.isSupported=v7.prototype.isSupported,v7.prototype.destroy=v7.prototype.destroy;var ye=["aac","ac-3","ec-3","mp3","opus"],yt=["avc","hevc"];function yn(){}function yi(){}function yr(){yE||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yE=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ya,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function ya(e,t){var n,i=this;return R(function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),b(r,yE.call(i,e,t),2)):yg(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yE,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=yo,r.return(yo.call(i,e,t)))})}function yo(e,t){var n,i,r,a,o,s,l,c,d,h,p,f,g=this;return R(function(m){if(1==m.g){for(console.assert(g==navigator,'bad "this" for requestMediaKeySystemAccess'),n=yf(e),i=[],a=(r=u(t)).next();!a.done;a=r.next())s=ys((o=a.value).videoCapabilities,n),l=ys(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=l,i.push(c));if(!i.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return b(m,yE.call(g,e,i),2)}
1return h=m.h,f=p=null,i[0]&&(i[0].videoCapabilities&&(p=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(f=i[0].audioCapabilities[0].encryptionScheme)),m.return(new yp(h,p,f))})}function ys(e,t){return e?e.filter(function(e){return ym(e.encryptionScheme,t)}):e}function yu(){}function yl(){yI||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(yI=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=yc,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function yc(e){var t,n,i=this;return R(function(r){switch(r.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),b(r,yI.call(i,e),2);case 2:if(!(t=r.h).supported||!e.keySystemConfiguration)return r.return(t);if((n=t.keySystemAccess)&&yg(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=yI,r.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=yd,n){r.s(3);break}return b(r,yh(e),4);case 4:return t.keySystemAccess=r.h,r.return(t);case 3:return r.return(yd.call(i,e))}})}function yd(e){var t,n,i,r,a,o,s,u=this;return R(function(l){switch(l.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),n=t=null,!e.keySystemConfiguration||(r=(i=e.keySystemConfiguration).keySystem,
1n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=yf(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},ym(n,a)&&ym(t,a))?b(l,yI.call(u,e),2):l.return(o);case 2:if((s=l.h).keySystemAccess){s.keySystemAccess=new yp(s.keySystemAccess,t,n),l.s(3);break}if(!e.keySystemConfiguration){l.s(3);break}return b(l,yh(e),5);case 5:s.keySystemAccess=l.h;case 3:return l.return(s)}})}function yh(e){var t,n;return R(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,b(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}function yp(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function yf(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 yg(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function ym(e,t){return!e||e==t||("cbcs"==e||"cbcs-1-9"==e)&&(!!yD||!!yL||!!yC)}function yv(){}function yy(){yr(),yl()}nZ("video/mp2t",function(){return new v7("video/mp2t")},n4),g(yn,s9),B("shaka.util.FairPlayUtils",yn),B("EmeEncryptionSchemePolyfill",yi),yi.install=yr,B("McEncryptionSchemePolyfill",yu),yu.install=yl,yp.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=u(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=u(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},yp.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},B("EncryptionSchemePolyfills",yv),yv.install=yy;var yb,yw,yx,yS,yT,yA,yk,yE,yI,yM,yC=navigator.userAgent.includes("CrKey"),yD=100<=parseInt(navigator.userAgent.
1split("Firefox/").pop(),10),yR=navigator.userAgent||"";if(yR.includes("Web0S")){var yP=yR.match(/Chrome\/(\d+)/);yM=!!yP&&79<=parseInt(yP[1],10)}else yM=!1;var yL=yM;void 0!==n&&n.exports&&(n.exports=yv)}).call(r,i,i,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.