PageSourceSearch

https://fptplay.vn/_next/static/chunks/05c3166f.8a0e353d4f0d67dd.js

js fptplay.vn collected 2026-09-24 09:33:50 UTC 766,056 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{85351:(e,t,n)=>{!function(){var e="undefined"!=typeof window?window:n.g,i={};for(var r in(function(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t},g="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},m=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 v(e,t){if(t)e:{var n=m;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&g(n,e,{configurable:!0,writable:!0,value:t})}}if("function"==typeof Object.setPrototypeOf)i=Object.setPrototypeOf;else{e:{var y={};try{y.__proto__={a:!0},r=y.a;break e}catch(e){}r=!1}i=r?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+" is not extensible");return e}:null}var b=i;function w(e,t){if(e.prototype=f(t.prototype),e.prototype.constructor=e,b)b(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.Im=t.prototype}function T(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function x(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:T(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function S(e){if(!(e instanceof Array)){e=x(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function A(e){if(!(e instanceof Object))throw TypeError("Iterator result "+e+" is not an object")}function k(){this.J=!1,this.H=null,this.i=void 0,this.h=1,this.G=this.I=0,this.M=this.C=null}function I(e){if(e.J)throw TypeError("Generator is already running");e.J=!0}function E(e,t){e.C={Zh:t,oi:!0},e.h=e.I||e.G}function C(e){for(var t in this.i=e,this.g=[],e)this.g.push(t);this.g.reverse()}function M(e){this.g=new k,this.h=e}function D(e,t,n,i){try{var r=t.call(e.g.H,n);if(A(r),!r.done)return e.g.J=!1,r;var a=r.value}catch(t){return e.g.H=null,E(e.g,t),R(e)}return e.g.H=null,i.call(e.g,a),R(e)}function R(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.J=!1,{value:t.value,done:!1}}catch(t){e.g.i=void 0,E(e.g,t)}if(e.g.J=!1,e.g.C){if(t=e.g.C,e.g.C=null,t.oi)throw t.Zh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function L(e){this.next=function(t){return I(e.g),e.g.H?t=D(e,e.g.H.next,t,e.g.K):(e.g.K(t),t=R(e)),t},this.throw=function(t){return I(e.g),e.g.H?t=D(e,e.g.H.throw,t,e.g.K):(E(e.g,t),t=R(e)),t},this.return=function(t){var n;return I(e.g),(n=e.g.H)?D(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),R(e))},this[Symbol.iterator]=function(){return this}}function P(e){var t=new L(new M(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 N(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function j(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(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{ki:r,v:a}}return{ki:-1,v:void 0}}function _(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 B(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+""}k.prototype.K=function(e){this.i=e},k.prototype.getNextAddressJsc=function(){return this.h},k.prototype.getYieldResultJsc=function(){return this.i},k.prototype.return=function(e){this.C={return:e},this.h=this.G},k.prototype.return=k.prototype.return,k.prototype.O=function(e){this.C={A:e},this.h=this.G},k.prototype.jumpThroughFinallyBlocks=k.prototype.O,k.prototype.g=function(e,t){return this.h=t,{value:e}},k.prototype.yield=k.prototype.g,k.prototype.P=function(e,t){var n=(e=x(e)).next();if(A(n),!n.done)return this.H=e,this.g(n.value,t);this.i=n.value,this.h=t},k.prototype.yieldAll=k.prototype.P,k.prototype.A=function(e){this.h=e},k.prototype.jumpTo=k.prototype.A,k.prototype.j=function(){this.h=0},k.prototype.jumpToEnd=k.prototype.j,k.prototype.m=function(e,t){this.I=e,void 0!=t&&(this.G=t)},k.prototype.setCatchFinallyBlocks=k.prototype.m,k.prototype.D=function(e){this.I=0,this.G=e||0},k.prototype.setFinallyBlock=k.prototype.D,k.prototype.o=function(e,t){this.h=e,this.I=t||0},k.prototype.leaveTryBlock=k.prototype.o,k.prototype.l=function(e){return this.I=e||0,e=this.C.Zh,this.C=null,e},k.prototype.enterCatchBlock=k.prototype.l,k.prototype.u=function(e,t,n){n?this.M[n]=this.C:this.M=[this.C],this.I=e||0,this.G=t||0},k.prototype.enterFinallyBlock=k.prototype.u,k.prototype.B=function(e,t){t=this.M.splice(t||0)[0],(t=this.C=this.C||t)?t.oi?this.h=this.I||this.G:void 0!=t.A&&this.G<t.A?(this.h=t.A,this.C=null):this.h=this.G:this.h=e},k.prototype.leaveFinallyBlock=k.prototype.B,k.prototype.N=function(e){return new C(e)},k.prototype.forIn=k.prototype.N,C.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},C.prototype.getNext=C.prototype.h,v("Symbol",function(e){function t(e,t){this.g=e,g(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)}}),v("Symbol.iterator",function(e){return e||g(Array.prototype,e=Symbol("Symbol.iterator"),{configurable:!0,writable:!0,value:function(){return j(T(this))}}),e}),v("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=m.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.G),reject:e(this.l)}},t.prototype.G=function(e){if(e===this)this.l(TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.I(e);else{switch(typeof e){case"object":var n=null!=e;break;case"function":n=!0;break;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){this.l(e);return}"function"==typeof t?this.J(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.H(),this.B()},t.prototype.H=function(){var e=this;r(function(){if(e.C()){var t=m.console;void 0!==t&&t.error(e.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var e=m.CustomEvent,t=m.Event,n=m.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=m.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.B=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.I=function(e){var t=this.j();e.Ne(t.resolve,t.reject)},t.prototype.J=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.Ne(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Ne=function(e,t){function n(){switch(i.h){case 1:e(i.i);break;case 2:t(i.i);break;default:throw Error("Unexpected state: "+i.h)}}var i=this;null==this.g?a.h(n):this.g.push(n),this.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=x(e),a=r.next();!a.done;a=r.next())i(a.value).Ne(t,n)})},t.all=function(e){var n=x(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).Ne(function(t){return function(n){a[t]=n,0==--o&&e(a)}}(a.length-1),t),r=n.next();while(!r.done)})},t}),v("WeakMap",function(e){function t(e){if(this.g=(s+=Math.random()+1).toString(),e){e=x(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){O(e,o)||g(e,o,{value:new n})}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}
1),n=Object.seal({}),i=new e([[t,2],[n,3]]);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 o="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var s=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!O(e,o))throw Error("WeakMap key fail: "+e);return e[o][this.g]=t,this},t.prototype.get=function(e){return i(e)&&O(e,o)?e[o][this.g]:void 0},t.prototype.has=function(e){return i(e)&&O(e,o)&&O(e[o],this.g)},t.prototype.delete=function(e){return!!(i(e)&&O(e,o)&&O(e[o],this.g))&&delete e[o][this.g]},t}),v("Map",function(e){function t(){var e={};return e.tc=e.next=e.head=e}function n(e,t){var n=e[1];return j(function(){if(n){for(;n.head!=e[1];)n=n.tc;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&&O(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=x(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(x([[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],tc:this[1].tc,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].tc.next=n.entry,this[1].tc=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.tc.next=e.entry.next,e.entry.next.tc=e.entry.tc,e.entry.head=null,this.size--,!0)},r.prototype.clear=function(){this[0]={},this[1]=this[1].tc=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}),v("Set",function(e){function t(e){if(this.g=new Map,e){e=x(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(x([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}),v("Array.prototype.findIndex",function(e){return e||function(e,t){return U(this,e,t).ki}}),v("Array.prototype.values",function(e){return e||function(){return _(this,function(e,t){return t})}}),v("Array.from",function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}}),v("Array.prototype.keys",function(e){return e||function(){return _(this,function(e){return e})}}),v("String.prototype.startsWith",function(e){return e||function(e,t){var n=B(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}}),v("Object.is",function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}}),v("Array.prototype.includes",function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for((t=t||0)<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}}),v("String.prototype.includes",function(e){return e||function(e,t){return -1!==B(this,e,"includes").indexOf(e,t||0)}}),v("String.fromCodePoint",function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var i=Number(arguments[n]);if(i<0||i>1114111||i!==Math.floor(i))throw RangeError("invalid_code_point "+i);i<=65535?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(i>>>10&1023|55296),t+=String.fromCharCode(1023&i|56320))}return t}}),v("WeakSet",function(e){function t(e){if(this.g=new WeakMap,e){e=x(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}),v("Array.prototype.find",function(e){return e||function(e,t){return U(this,e,t).v}}),v("Object.entries",function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push([t,e[t]]);return n}});var F="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)O(i,r)&&(e[r]=i[r])}return e};v("Object.assign",function(e){return e||F}),v("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})})}}),v("Array.prototype.entries",function(e){return e||function(){return _(this,function(e,t){return[e,t]})}}),v("Number.EPSILON",function(){return 2220446049250313e-31}),v("Number.MAX_SAFE_INTEGER",function(){return 0x1fffffffffffff}),v("Math.clz32",function(e){return e||function(e){if(0==(e=Number(e)>>>0))return 32;var t=0;return(0xffff0000&e)==0&&(e<<=16,t+=16),(0xff000000&e)==0&&(e<<=8,t+=8),(0xf0000000&e)==0&&(e<<=4,t+=4),(0xc0000000&e)==0&&(e<<=2,t+=2),(0x80000000&e)==0&&t++,t}}),v("Number.isNaN",function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}}),v("String.prototype.repeat",function(e){return e||function(e){var t=B(this,null,"repeat");if(e<0||e>0x4fffffff)throw RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}}),v("Number.isFinite",function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&e!==1/0&&e!==-1/0}}),v("Object.values",function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push(e[t]);return n}}),v("Math.log2",function(e){return e||function(e){return Math.log(e)/Math.LN2}}),v("String.prototype.endsWith",function(e){return e||function(e,t){var n=B(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var i=e.length;i>0&&t>0;)if(n[--t]!=e[--i])return!1;return i<=0}}),v("Math.trunc",function(e){return e||function(e){if(isNaN(e=Number(e))||e===1/0||e===-1/0||0===e)return e;var t=Math.floor(Math.abs(e));return e<0?-t:t}});var V=this||self;function H(e,t){e=e.split(".");var n,i=V;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 G(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}function K(e){return e.h/(1-Math.pow(e.g,e.j))}function q(){this.h=new G(2),this.j=new G(5),this.g=0,this.i=128e3,this.l=16e3}function z(){}function W(){}function X(){}function Y(e){var t=N.apply(1,arguments);$.has(e)||($.add(e),X.apply(z,S(t)))}function J(){}G.prototype.sample=function(e,t){var n=Math.pow(this.g,e);isNaN(t=t*(1-n)+n*this.h)||(this.h=t,this.j+=e)},q.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),(t=this.j).g=Math.exp(t.i/e.slowHalfLife)},q.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)}},q.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(K(this.h),K(this.j))};var $=new Set;function Q(e,t){return!!("number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t))||e===t}function Z(e,t){(t=e.indexOf(t))>-1&&e.splice(t,1)}function ee(e,t,n){if(n||(n=Q),e.length!=t.length)return!1;t=t.slice(),e=x(e);for(var i=e.next(),r={};!i.done;r={ri:void 0},i=e.next()){if(r.ri=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.ri,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function et(e,t){for(var n=0,i=e.length;n<i;){var r=n+i>>>1;t(e[r])?n=r+1:i=r}return n}function en(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Q),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 ei(){this.g=new Map}function er(){this.g=new ei}function ea(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=eo;
1if(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}eo=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,S(N.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,S(N.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,S(N.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,S(N.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,S(N.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,S(N.apply(0,arguments)))}),X=function(){return console.warn.apply(console,S(N.apply(0,arguments)))},W=function(){console.error.apply(console,S(N.apply(0,arguments)))}),(p=ei.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},p.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},p.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)}},p.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},p.size=function(){return this.g.size},p.keys=function(){return Array.from(this.g.keys())},(p=er.prototype).release=function(){this.Sa(),this.g=null},p.F=function(e,t,n,i){this.g&&(e=new ea(e,t,n,i),this.g.push(t,e))},p.Ba=function(e,t,n,i){var r=this;this.F(e,t,function i(a){r.Oa(e,t,i),n(a)},i)},p.Oa=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=x(i);for(var r=i.next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Oa(),this.g.remove(t,r))}},p.Sa=function(){if(this.g){for(var e=[],t=x(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,S(n.value));for(t=(e=x(e)).next();!t.done;t=e.next())t.value.Oa();this.g.g.clear()}},H("shaka.util.EventManager",er),er.prototype.removeAll=er.prototype.Sa,er.prototype.unlisten=er.prototype.Oa,er.prototype.listenOnce=er.prototype.Ba,er.prototype.listen=er.prototype.F,er.prototype.release=er.prototype.release,ea.prototype.Oa=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var eo=void 0;function es(e){this.h=e,this.g=void 0}function eu(){return ed.value()}H("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),es.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var el=null,ec=null,ed=new es(function(){var e=void 0;return el&&(e=el()),!e&&ec&&(e=ec()),e});function eh(e,t){this.g=e,this.h=t}function ep(e,t){var n=new eh(5,0),i=em,r=i.g,a=n.h-r.h;((n.g-r.g||a)>0?i.i:i.h)(i.g,n,e,t)}function ef(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 eg(e,t,n,i){W([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}eh.prototype.toString=function(){return"v"+this.g+"."+this.h};var em=null,ev=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function ey(e){var t;e instanceof ey?(eb(this,e.cc),this.$c=e.$c,ew(this,e.Bb),eT(this,e.xd),this.ac=e.ac,ex(this,e.g.clone()),this.Mc=e.Mc):e&&(t=String(e).match(ev))?(eb(this,t[1]||"",!0),this.$c=eS(t[2]||""),ew(this,t[3]||"",!0),eT(this,t[4]),this.ac=eS(t[5]||"",!0),ex(this,t[6]||"",!0),this.Mc=eS(t[7]||"")):this.g=new eR(null)}function eb(e,t,n){e.cc=n?eS(t,!0):t,e.cc&&(e.cc=e.cc.replace(/:$/,""))}function ew(e,t,n){e.Bb=n?eS(t,!0):t}function eT(e,t){if(t){if(isNaN(t=Number(t))||t<0)throw Error("Bad port number "+t);e.xd=t}else e.xd=null}function ex(e,t,n){t instanceof eR?e.g=t:(n||(t=eA(t,eM)),e.g=new eR(t))}function eS(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function eA(e,t,n){return null!=e?(e=encodeURI(e).replace(t,ek),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ek(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(p=ey.prototype).cc="",p.$c="",p.Bb="",p.xd=null,p.ac="",p.Mc="",p.toString=function(){var e=[],t=this.cc;if(t&&e.push(eA(t,eI,!0),":"),t=this.Bb){e.push("//");var n=this.$c;n&&e.push(eA(n,eI,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.xd)&&e.push(":",String(t))}return(t=this.ac)&&(this.Bb&&"/"!=t.charAt(0)&&e.push("/"),e.push(eA(t,"/"==t.charAt(0)?eC:eE,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Mc)&&e.push("#",eA(t,eD)),e.join("")},p.resolve=function(e){var t=this.clone();"data"===t.cc&&(t=new ey);var n=!!e.cc;n?eb(t,e.cc):n=!!e.$c,n?t.$c=e.$c:n=!!e.Bb,n?ew(t,e.Bb):n=null!=e.xd;var i=e.ac;if(n)eT(t,e.xd);else if(n=!!e.ac){if("/"!=i.charAt(0))if(this.Bb&&!this.ac)i="/"+i;else{var r=t.ac.lastIndexOf("/");-1!=r&&(i=t.ac.substr(0,r+1)+i)}if(".."==(r=i)||"."==r)i="";else if(-1==r.indexOf("./")&&-1==r.indexOf("/."))i=r;else{i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((a.length>1||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}i=a.join("/")}}return n?t.ac=i:n=""!==e.g.toString(),n?ex(t,e.g.clone()):n=!!e.Mc,n&&(t.Mc=e.Mc),t},p.clone=function(){return new ey(this)};var eI=/[#\/\?@]/g,eE=/[#\?:]/g,eC=/[#\?]/g,eM=/[#\?@]/g,eD=/#/g;function eR(e){this.g=e||null}function eL(e){if(!e.fb&&(e.fb=new Map,e.Qd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(i>=0){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a),r=r||"",e.add(a,decodeURIComponent(r))}}function eP(){}function eN(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=eO(e);t=eO(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ej(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function eO(e,t,n){return eB(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function eU(e,t,n){return eB(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function e_(e,t,n){return eB(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function eB(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 eF(e,t){if(e===t||!e.length||!t.length)return!0;e=x(e);for(var n=e.next();!n.done;n=e.next()){if(ez(n=n.value))return!0;for(var i=x(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||ez(r))return!0}return!1}function eV(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=x(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=x(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=x((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(S(i.keyIds),S(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}else ez(i)?n.push(i):ez(a)&&n.push(a)}return n}function eH(e){return"org.w3.clearkey"===e}function eG(e){return!!e&&!!e.match(/^com\.widevine\.alpha/)}function eK(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function eq(e){return!!e&&!!e.match(/^com\.apple\.fps/)}function ez(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}function eW(e,t,n,i){return e+"#"+t+"#"+n+"#"+(i=[].concat(S(new Set(i))).sort().join("#"))}(p=eR.prototype).fb=null,p.Qd=null,p.add=function(e,t){eL(this),this.g=null;var n=this.fb.has(e)?this.fb.get(e):null;return n||this.fb.set(e,n=[]),n.push(t),this.Qd++,this},p.set=function(e,t){return eL(this),this.g=null,this.fb.has(e)?this.fb.set(e,[t]):this.add(e,t),this},p.get=function(e){return eL(this),this.fb.get(e)||[]},p.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var e=[],t=x(this.fb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.fb.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("&")},p.clone=function(){var e=new eR;if(e.g=this.g,this.fb){for(var t=new Map,n=x(this.fb),i=n.next();!i.done;i=n.next()){var r=x(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.fb=t,e.Qd=this.Qd}return e},H("shaka.util.BufferUtils",eP),eP.toDataView=e_,eP.toUint16=eU,eP.toUint8=eO,eP.toArrayBuffer=ej,eP.equal=eN;var eX=new es(function(){return ej(new Uint8Array([0]))}),eY=new Map;function eJ(e,t,n){var i=N.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,e$)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}eJ.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},H("shaka.util.Error",eJ);var e$=!0;function eQ(){}function eZ(t){if(!t)return"";if(239==(t=eO(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!eu().uh())return(t=(new TextDecoder).decode(t)).includes("�")&&W('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if((128&t[i])==0?r=t[i]:t.length>=i+2&&(224&t[i])==192&&(192&t[i+1])==128?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&(240&t[i])==224&&(192&t[i+1])==128&&(192&t[i+2])==128?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&(241&t[i])==240&&(192&t[i+1])==128&&(192&t[i+2])==128&&(192&t[i+3])==128&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3),r<=65535)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+a)}}return n}function e0(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new eJ(2,2,2004);var i=new Uint16Array(n=Math.floor(e.byteLength/2));e=e_(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return e5.value()(i)}function e1(e){function t(e){return n.byteLength<=e||n[e]>=9&&n[e]<=126}if(!e)return"";var n=eO(e);if(239==n[0]&&187==n[1]&&191==n[2])return eZ(n);if(254==n[0]&&255==n[1])return e0(n.subarray(2),!1);if(255==n[0]&&254==n[1])return e0(n.subarray(2),!0);if(0==n[0]&&0==n[2])return e0(e,!1);if(0==n[1]&&0==n[3])return e0(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return eZ(e);throw new eJ(2,2,2003)}function e2(t){if(e.TextEncoder&&!eu().uh()){var n=new TextEncoder;return ej(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 ej(n)}function e4(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 e3(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\xa0","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10))>=0&&e<=1114111?String.fromCodePoint(e):"":t[e]||"'"}):e||""}eJ.Severity={RECOVERABLE:1,CRITICAL:2},eJ.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},eJ.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_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,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:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OP
1ERATION_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},H("shaka.util.StringUtils",eQ),eQ.resetFromCharCode=function(){e5.g=void 0},eQ.toUTF16=e4,eQ.toUTF8=e2,eQ.fromBytesAutoDetect=e1,eQ.fromUTF16=e0,eQ.fromUTF8=eZ;var e5=new es(function(){for(var e={Kc:65536};e.Kc>0;e={Kc:e.Kc},e.Kc/=2)if(function(e){try{var t=new Uint8Array(e);return String.fromCharCode.apply(null,t).length>0}catch(e){return!1}}(e.Kc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Kc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Kc));return n}}(e);return null});function e6(){}function e8(e){return e=eO(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):btoa(e=e5.value()(e))}function e9(e,t){return t=void 0==t||t,Uint8Array.prototype.toBase64?eO(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=e8(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function e7(t){if(!("fromBase64"in Uint8Array)){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}return t=t.replace(/\s+/g,""),Uint8Array.fromBase64(t,{alphabet:/[-_]/.test(t)?"base64url":"base64"})}function te(t){if(!("fromHex"in Uint8Array)){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}return Uint8Array.fromHex(t)}function tt(e){var t=eO(e);if(!Uint8Array.prototype.toHex){e="",t=x(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}return t.toHex()}function tn(){var e=N.apply(0,arguments);return ti(e,0,e.length)}function ti(e,t,n){t=void 0===t?0:t,n=void 0===n?e.length:n;for(var i=0,r=t;r<n;++r)i+=e[r].byteLength;for(r=0,i=new Uint8Array(i);t<n;++t){var a=e[t];ArrayBuffer.isView(a)&&1===a.BYTES_PER_ELEMENT?i.set(a,r):i.set(eO(a),r),r+=a.byteLength}return i}function tr(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new ey(e[0]);return t=new ey(t[0]),t=i.resolve(t),n&&ex(t,n),[t.toString()]}t=t.map(function(e){return new ey(e)}),i=[],e=x(e);for(var r=e.next();!r.done;r=e.next()){r=new ey(r.value);for(var a=x(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&ex(o,n),i.push(o.toString())}return i}function ta(e,t,n,i,r){return t={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:r},i&&(t.keySystemUris=new Set([i])),!n&&eq(e)&&t.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null}),t}function to(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach(function(e,t){var n=t;22!=n.length&&(n=e9(te(t),!1));var o=e;22!=o.length&&(o=e9(te(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:eO(e2(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 ts(e,t){if(1==t.length)return t[0];if(null!=(e=tu(e,t)))return e;throw new eJ(2,4,4025,t)}function tu(e,t){var n=tp.get(e);n=x(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=x(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==tc?"":null}function tl(e,t){var n=[];e=x(e=tp.get(e));for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=x(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}H("shaka.util.Uint8ArrayUtils",e6),e6.concat=tn,e6.toHex=tt,e6.fromHex=te,e6.fromBase64=e7,e6.toBase64=e9,e6.toStandardBase64=e8;var tc="text",td={ua:"video",Z:"audio",Pa:tc,Uf:"image",ul:"application"},th=1/15,tp=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av0[12]/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function tf(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if("undefined"==typeof libDPIModule&&X("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!=typeof LcevcDil)this.h=LcevcDil,this.j=!0,ep("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&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function tg(e,t,n,i){"video"!==i.type||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function tm(e){e.g&&e.i.classList.add("shaka-hidden")}function tv(e){return!!e&&"undefined"!=typeof LCEVCdec&&"lvc1"==e.codecs}function ty(){}function tb(e,t){tT.set(e,t)}function tw(e,t){if(t){var n=tT.get(t);if(n)return n}throw new eJ(2,4,4e3,e,t)}tf.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},H("shaka.lcevc.Dec",tf),tf.prototype.release=tf.prototype.release,H("shaka.media.ManifestParser",ty),ty.unregisterParserByMime=function(e){tT.delete(e)},ty.registerParserByMime=tb,ty.registerParserByExtension=function(){ep("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},ty.AccessibilityPurpose={Cm:"visually impaired",Nl:"hard of hearing",jm:"spoken subtitles"};var tT=new Map;function tx(){}function tS(){}function tA(e){this.h=new Map,this.i=0,this.j=new tS,(e=tE(e.toLowerCase()))&&
1(this.j=e()),this.g=new tx,(e=tM)&&(this.g=e(),this.h.set(this.i,this.g))}function tk(e,t){t=x(t=e.j.parse(t));for(var n=t.next();!n.done;n=t.next()){var i=eO((n=n.value).packet);i.length>0&&e.g.extract(i,n.pts)}return e.g.decode()}function tI(e,t){tC.set(e,t)}function tE(e){return tC.get(e)}tx.prototype.extract=function(){},tx.prototype.decode=function(){return[]},tx.prototype.clear=function(){},tx.prototype.getStreams=function(){return[]},tS.prototype.init=function(){},tS.prototype.parse=function(){return[]},tA.prototype.init=function(e,t,n){if(t=void 0!==t&&t,-1!=(n=void 0===n?-1:n)&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=tM)&&(this.g=i()),this.h.set(t,this.g))}else t||this.g.clear();this.j.init(e),-1!=n&&(this.i=n)},tA.prototype.remove=function(e){e=new Set(e=void 0===e?[]:e);for(var t=x(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},H("shaka.media.ClosedCaptionParser",tA),tA.findDecoder=function(){return tM},tA.unregisterDecoder=function(){tM=null},tA.registerDecoder=function(e){tM=e},tA.findParser=tE,tA.unregisterParser=function(e){tC.delete(e)},tA.registerParser=tI;var tC=new Map,tM=null;function tD(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=tR,this.scroll=tL}H("shaka.text.CueRegion",tD);var tR=1;tD.units={PX:0,PERCENTAGE:1,LINES:2};var tL="";function tP(e){this.h=e||"",this.g=0}function tN(e){tj(e,/[ \t]+/gm)}function tj(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 tO(e){return e.g==e.h.length?null:(e=tj(e,/[^ \t\n]*/gm))?e[0]:null}function tU(e){if(null==(e=tj(e,tB)))return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function t_(e){return e?tU(new tP(e)):null}tD.scrollMode={NONE:tL,UP:"up"};var tB=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function tF(){}function tV(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||ArrayBuffer.isView(n))return n;if(t.has(n))return null;var i=Array.isArray(n);if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function tH(e){var t,n={};for(t in e)n[t]=e[t];return n}function tG(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];void 0!==r&&(r=tG(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if("function"==typeof e)e="";else if(e instanceof Object){for((n=Object.keys(e)).sort(),t=[],i=(n=x(n)).next();!i.done;i=n.next())i=JSON.stringify(r=i.value),void 0!==(r=e[r])&&(r=tG(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function tK(e,t){var n=void 0!==n&&n;return tq(e=e1(e),t,n)}function tq(e,t,n){if(e=function(e,t){function n(){for(var t=i;-1==="\r\n	>/= ".indexOf(e[i])&&e[i];)i++;return(" "+e.slice(t,i)).slice(1)}var i=0,r=0;return function a(o,s){s=void 0!==s&&s;for(var u=[];e[i];)if(60==e.charCodeAt(i)){if(47===e.charCodeAt(i+1)){s=i+2,i=e.indexOf(">",i);var l=(s=e.substring(s,i)).indexOf(o);if(-1==l){var c=o.indexOf(".");c>0&&(l=s.indexOf(o.substring(0,c)))}if(-1==l)throw Error("Unexpected close tag\nLine: "+((o=e.substring(0,i).split("\n")).length-1)+"\nColumn: "+(o[o.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==(l=e.indexOf("]]>",i))?(u.push(e.substr(i+9)),i=e.length):(u.push(e.substring(i+9,l)),i=l+3);continue}i++;continue}if(r>512)throw Error("XML is too deeply nested");r++;e:{c=s,i++;var d=n(),h={};for(l=[];62!==e.charCodeAt(i)&&e[i];){var p=e.charCodeAt(i);if(p>64&&p<91||p>96&&p<123){p=n();for(var f=e.charCodeAt(i);f&&39!==f&&34!==f&&!(f>64&&f<91||f>96&&f<123)&&62!==f;)i++,f=e.charCodeAt(i);var g=i+1;if(i=e.indexOf(e[i],g),g=(" "+e.slice(g,i)).slice(1),39===f||34===f){if(-1===i){if(c={tagName:d,attributes:h,children:l,parent:null},t)for(d=0;d<l.length;d++)"string"!=typeof l[d]&&(l[d].parent=c);l=c;break e}}else g=null,i--;if(p.startsWith("xmlns:")){f=g;var m=p.split(":")[1];nl.set(f,m),nc.set(m,f)}"tt"===d&&"xml:space"===p&&"preserve"===g&&(c=!0),h[p]=g}i++}for(47!==e.charCodeAt(i-1)?(i++,l=a(d,c)):i++,c={tagName:d,attributes:h,children:l,parent:null},d=l.length,h=0;h<d;h++)"string"!=typeof(p=l[h])?t&&(p.parent=c):h==d-1&&"\n"==p&&l.pop();l=c}if(r--,u.push(l),"string"==typeof l)break;"?"===l.tagName[0]&&l.children&&(u.push.apply(u,S(l.children)),l.children=[])}else l=i,-2==(i=e.indexOf("<",i)-1)&&(i=e.length),l=(" "+e.slice(l,i+1)).slice(1),s?l.length>0&&u.push(l):u.length&&1==l.length&&"\n"==l[0]?u.push(l):l.trim().length>0&&u.push(l),i++;return u}("")}(e,void 0!==n&&n),!t&&e.length)return e[0];var i=t.split(",");return(t=e.find(function(e){return i.includes(e.tagName)}))?t:null}function tz(e){return nl.has(e)?nl.get(e):""}function tW(e){return"string"==typeof e}function tX(e){var t=[];if(!e.children)return[];e=x(e.children);for(var n=e.next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function tY(e,t){var n=[];if(!e.children)return[];e=x(e.children);for(var i=e.next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function tJ(e){if("string"==typeof e)return e3(e);var t=[];e=x(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)&&t.push(n);return""===(t=t.join(""))?null:e3(t)}function t$(e){for(var t=x(e.children),n=t.next();!n.done;n=t.next())if("string"!=typeof n.value)return null;return(e=tJ(e))&&(e=e.trim()),e}function tQ(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children){e=x(e.children);for(var i=e.next();!i.done;i=e.next())tQ(i.value,t,n)}return n}function tZ(e,t){return 1!=(e=tY(e,t)).length?null:e[0]}function t0(e,t,n){return 1!=(e=t4(e,t,n)).length?null:e[0]}function t1(e,t,n,i){i=void 0===i?null:i;var r=null;return null==(e=e.attributes[t])||""===e&&null!==i||(r=n(e)),null==r?i:r}function t2(e,t,n){return t=tz(t),e.attributes[t+":"+n]||null}function t4(e,t,n){var i=tz(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=x(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function t3(e,t,n){t=x(t);for(var i=t.next();!i.done;i=t.next())if(i=t2(e,i.value,n))return i;return null}function t5(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 t6(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 t8(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 t9(e){return(e=Number(e))%1==0?e:null}function t7(e){return(e=Number(e))%1==0&&e>0?e:null}function ne(e){return(e=Number(e))%1==0&&e>=0?e:null}function nt(e){return isNaN(e=Number(e))?null:e}function nn(e){return!!e&&"true"===e.toLowerCase()}function ni(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function nr(e){var t=[];e=x(e=e3(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,zc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].zc=n.slice(1))}return t}function na(e,t){var n=nr(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=no(e,"t",i.t)),null!==i.n&&(n=no(e,"n",
1i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.zc)&&e[n]?ns(e[n],r,i,t$(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(S(t.children))))}}function no(e,t,n){var i=0;e=x(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function ns(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function nu(e){if(!e)return null;var t={tagName:e.tagName,attributes:tH(e.attributes),children:[],parent:null};e=x(e.children);for(var n=e.next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=nu(n)).parent=t),t.children.push(n);return t}H("shaka.util.ObjectUtils",tF),tF.alphabeticalKeyOrderStringify=tG,tF.shallowCloneObject=tH,tF.cloneObject=tV;var nl=new Map,nc=new Map;function nd(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new tD,this.position=null,this.positionAlign=nv,this.size=0,this.textAlign=ny,this.direction=nx,this.writingMode=nS,this.lineInterpretation=nA,this.line=null,this.lineHeight="",this.lineAlign=nk,this.displayAlign=nw,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=nM,this.fontStyle=nR,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={columns:32,rows:15}}function nh(e,t){return(e=new nd(e,t,"")).lineBreak=!0,e}function np(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(!en(e.nestedCues,t.nestedCues,np))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!en(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function nf(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&ng(t);var i,r,a,o,s=n;n=[];for(var u=-1,l=0;l<s.length;l++)"<"===s[l]?u=l+1:">"===s[l]&&u>0&&((u=s.substr(u,l-u)).match(nj)&&n.push(u),u=-1);for(l=(n=x(n)).next();!l.done;l=n.next())l=l.value,s=s.replace("<"+l+">",'<div time="'+l+'">')+"</div>";e:{l=s,u=[];var c=-1;n="",s=!1;for(var d=0;d<l.length;d++)if("/"===l[d]){var h=l.indexOf(">",d);if(-1===h){n=l;break e}if((h=l.substring(d+1,h))&&"v"==h){s=!0;var p=null;if(u.length&&(p=u[u.length-1]),p){if(p===h)n+="/"+h+">";else{if(!p.startsWith("v")){n+=l[d];continue}n+="/"+p+">"}d+=h.length+1}else n+=l[d]}else n+=l[d]}else"<"===l[d]?"v"!=l[c=d+1]&&(c=-1):">"===l[d]&&c>0&&(u.push(l.substr(c,d-c)),c=-1),n+=l[d];for(u=(l=x(u)).next();!u.done;u=l.next())c=(u=u.value).replace(" ",".voice-"),n=(n=n.replace("<"+u+">","<"+c+">")).replace("</"+u+">","</"+c+">"),s||(n+="</"+c+">")}i=n,r={"< ":""," >":" &gt;"},o=RegExp((a=/(< +>|<\s|\s>)/g).source),n=i&&o.test(i)?i.replace(a,function(e){return r[e]||""}):i||"",e.payload="",s="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var f=tq(s,"span")}catch(e){}if(f)if(1!=(f=f.children).length||f[0].tagName)for(n=(f=x(f)).next();!n.done;n=f.next())!function e(t,n,i){var r=n.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new tD,r.position=null,r.size=0,r.textAlign=ny,t.tagName)for(var a=x(t.tagName.split(/(?=[ .])+/g)),o=a.next();!o.done;o=a.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',i.has(s)||(s="v[voice="+u+"]")}switch(i.has(s)&&(u=r,s=i.get(s))&&(u.backgroundColor=nm(s.backgroundColor,u.backgroundColor),u.color=nm(s.color,u.color),u.fontFamily=nm(s.fontFamily,u.fontFamily),u.fontSize=nm(s.fontSize,u.fontSize),u.textShadow=nm(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":r=nh(r.startTime,r.endTime),n.nestedCues.push(r);return;case"b":r.fontWeight=nD;break;case"i":r.fontStyle=nL;break;case"u":r.textDecoration.push(nN);break;case"font":(o=t.attributes.color)&&(r.color=o);break;case"div":if(!(o=t.attributes.time))break;(o=t_(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}
1if(a=t.children,tW(t)||1==a.length&&tW(a[0]))for(i=tJ(t).split("\n"),t=!0,a=(i=x(i)).next();!a.done;a=i.next())a=a.value,t||(t=nh(r.startTime,r.endTime),n.nestedCues.push(t)),a.length>0&&((t=r.clone()).payload=e3(a),n.nestedCues.push(t)),t=!1;else for(n.nestedCues.push(r),t=(n=x(a)).next();!t.done;t=n.next())e(t.value,r,i)}(n.value,e,t);else e.payload=e3(n);else e.payload=e3(n)}else e.payload=e3(n)}function ng(e){for(var t=x(Object.entries(nE)),n=t.next();!n.done;n=t.next()){var i=x(n.value);n=i.next().value,i=i.next().value;var r=new nd(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=x(Object.entries(nC))).next();!n.done;n=t.next())n=(i=x(n.value)).next().value,i=i.next().value,(r=new nd(0,0,"")).backgroundColor=i,e.set("."+n,r)}function nm(e,t){return e&&e.length>0?e:t}nd.prototype.clone=function(){var e,t=new nd(0,0,"");for(e in this)t[e]=this[e],Array.isArray(t[e])&&(t[e]=t[e].slice());return t},H("shaka.text.Cue",nd),nd.parseCuePayload=nf,nd.equal=np,nd.prototype.clone=nd.prototype.clone;var nv="auto";nd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nv};var ny="center",nb={LEFT:"left",RIGHT:"right",CENTER:ny,START:"start",END:"end"};nd.textAlign=nb;var nw="after",nT={BEFORE:"before",CENTER:"center",AFTER:nw};nd.displayAlign=nT;var nx="ltr";nd.direction={HORIZONTAL_LEFT_TO_RIGHT:nx,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nS="horizontal-tb";nd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nS,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nA=0;nd.lineInterpretation={LINE_NUMBER:0,PERCENTAGE:1};var nk="start",nI={CENTER:"center",START:nk,END:"end"};nd.lineAlign=nI;var nE={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};nd.defaultTextColor=nE;var nC={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};nd.defaultTextBackgroundColor=nC;var nM=400,nD=700;nd.fontWeight={NORMAL:400,BOLD:700};var nR="normal",nL="italic",nP={NORMAL:nR,ITALIC:nL,OBLIQUE:"oblique"};nd.fontStyle=nP;var nN="underline";nd.textDecoration={UNDERLINE:nN,LINE_THROUGH:"line-through",OVERLINE:"overline"};var nj=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function nO(){}function nU(e,t,n){nB.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,xf:t})}function n_(e,t){for(var n=e.toLowerCase().split(";")[0],i=x([nG,nH,nV,nF]),r=i.next();!r.done;r=i.next())if(r=nB.get(n+"-"+r.value)){var a=r.xf(),o=a.isSupported(e,t);if(a.destroy(),o)return r.xf}return null}nO.prototype.destroy=function(){},H("shaka.transmuxer.TransmuxerEngine",nO),nO.findTransmuxer=n_,nO.unregisterTransmuxer=function(e,t){nB.delete(e.toLowerCase().split(";")[0]+"-"+t)},nO.registerTransmuxer=nU,nO.prototype.destroy=nO.prototype.destroy;var nB=new Map,nF=1,nV=2,nH=3,nG=4;function nK(){}function nq(e,t){var n=e;return t&&!n1.includes(e)&&(n+='; codecs="'+t+'"'),n}function nz(e,t){return t&&(e+='; codecs="'+t+'"'),e}function nW(e,t,n){var i=nq(e,t);return n_(t=nz(e,t))?(e=n_(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function nX(e){return e.split(";")[0].split("/")[1]}function nY(e){var t=n0(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";
1case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc";case"lvc1"===e:return"lcevc"}return e}function nJ(e){var t=[];e=x(e.split(","));for(var n=e.next();!n.done;n=e.next())t.push((n=n0(n.value))[0]);return t.sort().join(",")}function n$(e){return e.split(";")[0]}function nQ(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(e){return e.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function nZ(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e||"audio/x-mpegurl"===e}function n0(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}nO.PluginPriority={FALLBACK:1,PREFERRED_SECONDARY:2,PREFERRED:3,APPLICATION:4},H("shaka.util.MimeUtils",nK),nK.getFullTypeWithAllCodecs=nz,nK.getFullType=nq,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var n1=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function n2(e){this.i=null,this.l=e,this.B=this.G=!1,this.m=this.u=0,this.o=1/0,this.h=this.g=null,this.D="",this.C=function(){},this.j=new Map}function n4(e,t){n9.set(e,t)}function n3(e){return n9.get(e)}function n5(e){return!!n9.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!tM}function n6(e,t,n){e.D=t,(t=e.j.get(t))&&(t=t.filter(function(e){return e.endTime<=n})).length&&e.l.append(t)}function n8(e){for(var t=1/0,n=-1/0,i=x(e.j.values()),r=i.next();!r.done;r=i.next()){r=x(r.value);for(var a=r.next();!a.done;a=r.next())t=Math.min(t,(a=a.value).startTime),n=Math.max(n,a.endTime)}t!==1/0&&n!==-1/0&&(e.g=null==e.g?Math.max(t,e.m):Math.min(e.g,Math.max(t,e.m)),e.h=Math.max(e.h,Math.min(n,e.o)))}n2.prototype.destroy=function(){return this.l=this.i=null,this.j.clear(),Promise.resolve()},n2.prototype.remove=function(e,t,n){n=void 0!==n&&n;var i=this;return P(function(r){return 1==r.h?r.g(Promise.resolve(),2):e>=t||n&&(function(e,t,n){for(var i=x(e.j.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var a=e.j.get(r);a=a.filter(function(e){return e.startTime<t||e.endTime>=n}),e.j.set(r,a)}}(i,e,t),""===i.D)?r.return():void(i.l&&i.l.remove(e,t)&&null!=i.g&&(t<=i.g||e>=i.h||(e<=i.g&&t>=i.h?i.g=i.h=null:e<=i.g&&t<i.h?i.g=t:e>i.g&&t>=i.h&&(i.h=e)),n8(i)),r.j())})},H("shaka.text.TextEngine",n2),n2.prototype.destroy=n2.prototype.destroy,n2.findParser=n3,n2.unregisterParser=function(e){n9.delete(e)},n2.registerParser=n4;var n9=new Map;function n7(e){this.g=e,this.h=null}function ie(e,t,n){var i=!0,r=null;e.h=function(){clearTimeout(r),i=!1},r=setTimeout(function(){i&&t()},1e3*n)}function it(e,t){return e.concat(t)}function ii(){}function ir(e){return null!=e}function ia(e,t){return Promise.race([t,new Promise(function(t,n){new n7(n).na(e)})])}function io(){}function is(e,t){return e=ic(e),t=ic(t),e.split("-")[0]==t.split("-")[0]}function iu(e,t){return e=ic(e),t=ic(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function il(e,t){return e=ic(e),t=ic(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function ic(e){var t=(e=x(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=x(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=im.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function id(e,t){return e=ic(e),(t=ic(t))==e?4:iu(t,e)?3:il(t,e)?2:+!!iu(e,t)}function ih(e){var t=e.indexOf("-");return e=(e=t>=0?e.substring(0,t):e).toLowerCase(),im.get(e)||e}function ip(e){return e.language?ic(e.language):e.audio&&e.audio.language?ic(e.audio.language):e.video&&e.video.language?ic(e.video.language):"und"}function ig(e,t){e=ic(e);var n=new Set;t=x(t);for(var i=t.next();!i.done;i=t.next())n.add(ic(i.value));for(i=(t=x(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=x(n)).next();!i.done;i=t.next())if(iu(i=i.value,e))return i;for(i=(t=x(n)).next();!i.done;i=t.next())if(il(i=i.value,e))return i;for(t=(n=x(n)).next();!t.done;t=n.next())if(iu(e,t=t.value))return t;return null}n7.prototype.yb=function(){return this.stop(),this.g(),this},n7.prototype.na=function(e){var t=this;return this.stop(),ie(this,function(){t.g()},e),this},n7.prototype.Fa=function(e){return this.stop(),function e(t,n){ie(t,function(){e(t,n),t.g()},n)}(this,e),this},n7.prototype.stop=function(){var e;null==(e=this.h)||e.call(this),this.h=null},H("shaka.util.Timer",n7),n7.prototype.stop=n7.prototype.stop,n7.prototype.tickEvery=n7.prototype.Fa,n7.prototype.tickAfter=n7.prototype.na,n7.prototype.tickNow=n7.prototype.yb,H("shaka.util.LanguageUtils",io),io.findClosestLocale=ig,io.getLocaleForVariant=ip,io.getLocaleForText=function(e){return ic(e.language||"und")},io.getBase=ih,io.relatedness=id,io.areSiblings=function(e,t){var n=ih(e),i=ih(t);return e!=n&&t!=i&&n==i},io.normalize=ic,io.isSiblingOf=il,io.isParentOf=iu,io.areLanguageCompatible=is,io.areLocaleCompatible=function(e,t){return(e=ic(e))==(t=ic(t))};var im=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"],["
1ibo","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 iv(){}function iy(e,t,n,i,r){if(r.length){var a=e.textStreams;r=x(r);for(var o=r.next(),s={};!o.done;s={Dh:void 0},o=r.next())if(s.Dh=o.value,(o=a.filter(function(e){return function(t){return!!(t.codecs.startsWith(e.Dh)||t.mimeType.startsWith(e.Dh))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){t=x(t);for(var i=t.next(),r={};!i.done;r={jj:void 0},i=t.next())if(r.jj=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.jj)}}(r))).length){e=i;break}for(t=(n=x(n)).next(),i={};!t.done;i={Oh:void 0},t=n.next())if(i.Oh=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Oh)}}(i))).length){e=t;break}return e}(a,t,n)),i.length){for(t=new ei,n=(a=x(a)).next();!n.done;n=a.next())n=n.value,t.push(String(n.video.width||0),n);var u=[];t.forEach(function(e,t){e=0;var n=[];t=x(t);for(var r=t.next(),a={};!r.done;a={Tf:void 0},r=t.next())a.Tf=r.value,(r=i.filter(function(e){return function(t){return e.Tf.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Tf]):r==e&&n.push(a.Tf);u.push.apply(u,S(n))}),a=u}for(t=new Set,r=(n=x(a)).next();!r.done;r=n.next())(r=r.value).video&&t.add(r.video);if(t.size){var l={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};r=Array.from(t).sort(function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:e.width!=t.width?e.width-t.width:e.codecs&&t.codecs?(e=nY(e.codecs),t=nY(t.codecs),(l[e]||1)-(l[t]||1)):0});var c=[];for(t=new Map,n=function(e){var t=[String(e.width||""),String(e.height||""),String(Math.round(e.frameRate||0)),e.hdr||"",e.fastSwitching];return e.dependencyStream&&t.push(e.dependencyStream.baseOriginalId||""),e.roles&&t.push(e.roles.sort().join("_")),t.join(";")},o=(r=x(r)).next();!o.done;o=r.next()){s=n(o=o.value);var d=t.get(s)||[];d.length?nY(d[d.length-1].codecs)==nY(o.codecs)&&(d.push(o),c.push(o.id)):(d.push(o),c.push(o.id)),t.set(s,d)}e.variants=a.filter(function(e){return!(e=e.video)||!!c.includes(e.id)})}else e.variants=a}function ib(e,t,n){if(e&&e.video&&e.video.width&&e.video.height){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T=e.video.width,S=e.video.height;if(S>T&&(T=(S=x([S,T])).next().value,S=S.next().value),h=T,p=t.minWidth,f=Math.min(t.maxWidth,n.width),!(h>=p)||!(h<=f)||(g=S,m=t.minHeight,v=Math.min(t.maxHeight,n.height),!(g>=m)||!(g<=v))||(y=T*S,b=t.minPixels,w=t.maxPixels,!(y>=b)||!(y<=w)))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,u=t.maxChannelsCount,o>=s&&o<=u))&&(l=e.bandwidth,c=t.minBandwidth,d=t.maxBandwidth,l>=c&&l<=d)}function iw(e,t,n,i,r){var a,o;return P(function(s){if(1==s.h)return eu().Xi()&&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=x(e);for(var i=e.next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=x(n)).next();!e.done;e=n.next()){e=e.value,i=x(t);for(var r=i.next();!r.done;r=i.next()){var a=x(r.value);if(r=a.next().value,a=a.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,a);break}}}}(t.variants),s.g(ix(t.variants,n,!1,i),2);a=null,e&&(o=e.g)&&(a=o.keySystem),t.variants=t.variants.filter(function(e){var t=function(e,t,n){if(!e.decodingInfos.some(function(e){return!!e.supported&&(!t||!(e=e.keySystemAccess)||(n[e.keySystem]||e.keySystem)==t)}))return!1;var i=eu(),r="Xbox"===i.Jb();i="MOBILE"===i.Qa()&&"GECKO"===i.Ia();var a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(r&&a&&(o>1920||s>1080)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3.")))&&(!(r=a&&a.dependencyStream)||!!tv(r))&&(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))&&(!e||!e.depen
1dencyStream))}(e,a,r);if(!t){var n=[];e.audio&&n.push(iU(e.audio)),e.video&&n.push(iU(e.video))}return t}),s.j()})}function iT(e,t){var n,i,r,a,o,s,u;return P(function(l){if(1==l.h){for(n=function(e,t){if(e){var n=tH(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=x(t)).next(),s={};!o.done;s={cache:void 0,Me:void 0},o=a.next())u=o.value,s.Me=tG(u),s.cache=iF,s.cache.has(s.Me)?i=n(i,s.cache.get(s.Me)):r.push((function(e){var t=[""];e.video&&(t=nQ(e.video.contentType).split(","));var n=[""];e.audio&&(n=nQ(e.audio.contentType).split(","));var i=[];t=x(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var a=x(n),o=a.next(),s={};!o.done;s={Lc:void 0},o=a.next())o=o.value,s.Lc=tV(e),e.video&&(s.Lc.video.contentType=nq(n$(s.Lc.video.contentType),r)),e.audio&&(s.Lc.audio.contentType=nq(n$(s.Lc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){("MOBILE"==eu().Qa()?ia(5,navigator.mediaCapabilities.decodingInfo(e.Lc)):navigator.mediaCapabilities.decodingInfo(e.Lc)).then(function(e){t(e)}).catch(n)}}(s)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})})(u).then(function(e){return function(t){var r=null;t=x(t||[]);for(var a=t.next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.Me,r),i=n(i,r))}}(s)));return l.g(Promise.all(r),2)}i&&e.decodingInfos.push(i),l.j()})}function ix(e,t,n,i){var r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b;return P(function(w){switch(w.h){case 1:if(e.some(function(e){return e.decodingInfos.length}))return w.return();a=(r=x(i)).next(),o={};case 2:if(a.done){w.A(4);break}o.Fi=a.value,s=!1,l=(u=x(e)).next();case 5:var T;if(l.done){w.A(7);break}h=(d=x(iS(c=l.value,t,n).filter((T=o,function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||e===T.Fi})))).next();case 8:if(h.done){w.A(10);break}return p=h.value,w.g(iT(c,p),9);case 9:h=d.next(),w.A(8);break;case 10:c.decodingInfos.some(function(e){return e.supported})&&(s=!0),l=u.next(),w.A(5);break;case 7:if(s)return w.return();o={Fi:void 0},a=r.next(),w.A(2);break;case 4:g=(f=x(e)).next();case 12:if(g.done){w.A(0);break}y=(v=x(iS(m=g.value,t,n).filter(function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)}))).next();case 15:if(y.done){g=f.next(),w.A(12);break}return b=y.value,w.g(iT(m,b),16);case 16:y=v.next(),w.A(15)}})}function iS(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=x(r.fullMimeTypes),u=s.next();!u.done;u=s.next()){var l=nQ(u=u.value);if(l.includes(",")&&!i){var c=l.split(","),d=n$(u);l=ts("video",c),c=iA(c=ts("audio",c),d),d=nW(d,c,"audio"),o.push({contentType:d,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=ik(l),u={contentType:nW(n$(u),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}r.colorGamut&&(u.colorGamut=r.colorGamut),a.push(u)}if(i)for(u=(s=x(i.fullMimeTypes)).next();!u.done;u=s.next())u=n$(l=u.value),l=iA(nQ(l),u),u=nW(u,l,"audio"),o.push({contentType:u,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),u=(a=x(a)).next();!u.done;u=a.next())for(u=u.value,d=(l=x(o)).next();!d.done;d=l.next())d=d.value,c={type:n?"file":"media-source"},u&&(c.video=u),d&&(c.audio=d),s.push(c);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=x(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"],u=(a=x(n.keys())).next();!u.done;u=a.next()){for(u=u.value,d=n.get(u),l=new Map,c=(d=x(d)).next();!c.done;
1c=d.next()){var h=(c=c.value).videoRobustness+","+c.audioRobustness;l.get(h)||l.set(h,[]),l.get(h).push(c)}for(d=(l=x(l.values())).next();!d.done;d=l.next()){d=d.value,c=[],h=x(s);for(var p=h.next();!p.done;p=h.next()){p=Object.assign({},p.value);for(var f={keySystem:u,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},g=x(d),m=g.next();!m.done;m=g.next()){if((m=m.value).initData&&m.initData.length){for(var v=new Set,y=x(m.initData),b=y.next();!b.done;b=y.next())v.add(b.value.initDataType);f.initDataType=m.initData[0].initDataType}m.distinctiveIdentifierRequired&&(f.distinctiveIdentifier="required"),m.persistentStateRequired&&(f.persistentState="required"),m.sessionType&&(f.sessionTypes=[m.sessionType]),i&&(f.audio?(m.encryptionScheme&&(f.audio.encryptionScheme=f.audio.encryptionScheme||m.encryptionScheme),f.audio.robustness=f.audio.robustness||m.audioRobustness):(f.audio={robustness:m.audioRobustness},m.encryptionScheme&&(f.audio.encryptionScheme=m.encryptionScheme)),""==f.audio.robustness&&delete f.audio.robustness),r&&(f.video?(m.encryptionScheme&&(f.video.encryptionScheme=f.video.encryptionScheme||m.encryptionScheme),f.video.robustness=f.video.robustness||m.videoRobustness):(f.video={robustness:m.videoRobustness},m.encryptionScheme&&(f.video.encryptionScheme=m.encryptionScheme)),""==f.video.robustness&&delete f.video.robustness)}p.keySystemConfiguration=f,c.push(p)}e.push(c)}}return e}function iA(e,t){var n=eu();return"flac"==e.toLowerCase()?"WEBKIT"!=n.Ia()?"flac":"fLaC":"opus"===e.toLowerCase()?"WEBKIT"!=n.Ia()?"opus":"mp4"==nX(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&n.le()?"ec-3":e}function ik(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 iI(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=x(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=x(n.roles)).next();!h.done;h=d.next())c.add(h.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,videoLabel:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(c),audioRoles:null,videoRoles: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,e.videoRoles=n.roles,e.videoLabel=n.label,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec,e.pixelAspectRatio=i.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&i.bandwidth&&(e.videoBandwidth+=i.bandwidth)),o.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,r=o.split(",");try{e.videoCodec=ts("video",r),e.audioCodec=ts("audio",r)}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,r=t.dependencyStream)&&(e.audioCodec=r.codecs||e.audioCodec,e.audioBandwidth&&r.bandwidth&&(e.audioBandwidth+=r.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function iE(e){return{id:e.id,active:!1,type:tc,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function iC(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=e.segmentIndex.Cb());var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function iM(e){return e.__shaka_id||(e.__shaka_id=iV++),e.__shaka_id}function iD(e){var t={id:iM(e),active:"disabled"!=e.mode,type:tc,bandwidth:0,language:ic(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==e.kind,originalTextId:e.id,originalLanguage:e.language};return"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function iR(e,t){var n=e?e.language:null;if(n={id:iM(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:ic(n||"und"),label:e?e.label:null,videoLabel:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!!e&&"main"==e.kind,roles:[],forced:!1,audioR
1oles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+","+n.videoCodec:n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function iL(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function iP(e){return e.filter(function(e){return iL(e)})}function iN(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=ig(ic(t),e.map(function(e){return e.language}));s&&(r=e.filter(function(e){return ic(e.language)==s}))}if(r=r.filter(function(e){return e.forced==i}),n){if((e=ij(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(it,[])).length?ij(r,e[0]):r}function ij(e,t){return e.filter(function(e){return e.roles.includes(t)})}function iO(e,t){t.length&&(t=t.filter(function(t){return nY(e.codecs)==nY(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],t.length>1&&(t=t.find(function(t){return e.width==t.width&&e.height==t.height})))&&(e.trickModeVideo=t)}function iU(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 i_(e,t,n){if(0==n.autoShowText)return!1;if(1==n.autoShowText)return!0;var i=ic(n.preferredTextLanguage);return(t=ic(t.language),2==n.autoShowText)?is(t,i):3==n.autoShowText?!!e&&(e=ic(e.language),is(t,i)&&!is(e,t)):(X("Invalid autoShowText setting!"),!1)}function iB(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=x(e);for(var n=e.next();!n.done;n=e.next()){var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:(n=n.value)?n$(n):"",codecs:n?nQ(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",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};i.fullMimeTypes.add(nq(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}H("shaka.util.StreamUtils",iv),iv.meetsRestrictions=ib;var iF=new Map,iV=0,iH=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),iG=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
1FDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function iK(){var t=this;this.G=null,this.H=!1,this.u=new q,this.j=new er,navigator.connection&&navigator.connection.addEventListener&&this.j.F(navigator.connection,"change",function(){t.g.useNetworkInformation&&navigator.onLine&&(t.u=new q,t.g&&t.u.configure(t.g.advanced),t.trySuggestStreams())}),this.l=[],this.I=1,this.J=!1,this.h=this.o=this.g=this.B=null,this.m=new n7(function(){if(t.H&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.G&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}}),this.C=e,"documentPictureInPicture"in e&&this.j.F(e.documentPictureInPicture,"enter",function(){t.C=e.documentPictureInPicture.window,t.m&&t.m.yb(),t.j.Ba(t.C,"pagehide",function(){t.C=e,t.m&&t.m.yb()})}),this.D=this.i=null}function iq(e,t){if(void 0===t||!t){if(!e.J){if(!((t=e.u).g>=t.i))return;e.J=!0,e.B-=(e.g.switchInterval-e.g.minTimeToSwitch)*1e3}if(Date.now()-e.B<1e3*e.g.switchInterval)return}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}function iz(e,t,n,i,r){if(e.D){var a=e.D.ei();a&&(n=n.filter(function(e){return!e.bandwidth||!a||e.bandwidth<=a}))}return t&&(n=n.filter(function(e){return ib(e,t,{width:r,height:i})})),n.sort(function(e,t){return e.bandwidth-t.bandwidth})}(p=iK.prototype).stop=function(){this.G=null,this.H=!1,this.l=[],this.I=1,this.o=this.B=null,this.h&&(this.h.disconnect(),this.h=null),this.m&&this.m.stop(),this.D=this.i=null},p.release=function(){this.stop(),this.j.release(),this.m=null},p.init=function(e){this.G=e},p.chooseVariant=function(e){e=void 0!==e&&e;var t=1/0,n=1/0;if(this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,t=this.C.screen.height*n,n*=this.C.screen.width),this.h&&this.g.restrictToElementSize){var i=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,r=this.o.clientHeight,a=this.o.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.o&&(r=this.i.height,a=this.i.width),t=Math.min(t,r*i),n=Math.min(n,a*i)}if((r=this.l.filter(function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)})).length||(r=this.l),i=r,e&&r.length!=this.l.length&&(i=this.l.filter(function(e){return e&&(!!e.audio&&!!e.audio.fastSwitching||!!e.video&&!!e.video.fastSwitching)})),e=iz(this,this.g.restrictions,i,1/0,1/0),t!=1/0||n!=1/0){for(r=(e=x(e=function(e){var t=[];e=x(e);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(e,t){return e.width-t.width})}(e))).next();!r.done;r=e.next())if((r=r.value).height>=t&&r.width>=n){t=r.height,n=r.width;break}e=iz(this,this.g.restrictions,i,t,n)}for(t=this.getBandwidthEstimate(),i.length&&!e.length&&(e=[(e=iz(this,null,i,1/0,1/0))[0]]),n=e[0]||null,i=0;i<e.length;i++){r=e[i];var o=isNaN(this.I)?1:Math.abs(this.I);a=o*r.bandwidth/this.g.bandwidthDowngradeTarget;for(var s={bandwidth:1/0},u=i+1;u<e.length;u++)if(r.bandwidth!=e[u].bandwidth){s=e[u];break}o=o*s.bandwidth/this.g.bandwidthUpgradeTarget,n&&r&&t>=a&&t<=o&&(n.bandwidth!=r.bandwidth||n.bandwidth==r.bandwidth&&n.video&&r.video&&(n.video.width<r.video.width||n.video.height<r.video.height))&&(n=r)}return this.B=Date.now(),n},p.enable=function(){this.H=!0,this.l.length&&this.trySuggestStreams()},p.disable=function(){this.H=!1},p.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&1===i.packetNumber&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r>=this.g.cacheLoadThreshold&&this.u.sample(r,t),n&&null!=this.B&&this.H&&iq(this)},p.trySuggestStreams=function(){this.H&&(this.B=Date.now(),iq(this,!0))},p.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.u.getBandwidthEstimate(e),this.D?this.D.getBandwidthEstimate(e):e)},p.setVariants=function(e){return!ee(e,this.l)&&(this.l=e,!0)},p.playbackRateChanged=function(e){this.I=e},p.setMediaElement=function(t){function n(){i.m.na(iW)}var i=this;this.o=t,this.h&&(this.h.disconnect(),this.h=null),this.o&&"ResizeObserver"in e&&(this.h=new ResizeObserver(n),this.h.observe(this.o)),this.j.F(t,"enterpictureinpicture",function(e){e.pictureInPictureWindow&&(i.i=e.pictureInPictureWindow,i.j.F(i.i,"resize",n))}),this.j.F(t,"leavepictureinpicture",function(){i.i&&i.j.Oa(i.i,"resize",n),i.i=null})},p.setCmsdManager=function(e){this.D=e},p.configure=function(e){this.g=e,this.u&&this.g&&this.u.configure(this.g.advanced)},H("shaka.abr.SimpleAbrManager",iK),iK.prototype.configure=iK.prototype.configure,iK.prototype.setCmsdManager=iK.prototype.setCmsdManager,iK.prototype.setMediaElement=iK.prototype.setMediaElement,iK.prototype.playbackRateChanged=iK.prototype.playbackRateChanged,iK.prototype.setVariants=iK.prototype.setVariants,iK.prototype.getBandwidthEstimate=iK.prototype.getBandwidthEstimate,iK.prototype.trySuggestStreams=iK.prototype.trySuggestStreams,iK.prototype.segmentDownloaded=iK.prototype.segmentDownloaded,iK.prototype.disable=iK.prototype.disable,iK.prototype.enable=iK.prototype.enable,iK.prototype.chooseVariant=iK.prototype.chooseVariant,iK.prototype.init=iK.prototype.init,iK.prototype.release=iK.prototype.release,iK.prototype.stop=iK.prototype.stop;var iW=1;function iX(e,t){var n=iJ();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 iY(e){var t,n;return P(function(i){if(1==i.h){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new eJ(2,7,1010);return(t=e.g,e.g++,0==t)?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),i.g(new Promise(function(e){new n7(e).na(n/1e3)}),2))}e.h*=e.m,i.j()})}function iJ(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function i$(){var e,t,n=new Promise(function(n,i){e=n,t=i});return n.resolve=e,n.reject=t,n}function iQ(e,t){this.promise=e,this.i=t,this.g=null}function iZ(e){return new iQ(Promise.reject(e),function(){return Promise.resolve()})}function i0(){var e=Promise.reject(new eJ(2,7,7001));return e.catch(function(){}),new iQ(e,function(){return Promise.resolve()})}function i1(e){return new iQ(Promise.resolve(e),function(){return Promise.resolve()})}function i2(e){return new iQ(e,function(){return e.catch(function(){})})}function i4(e){return new iQ(Promise.all(e.map(function(e){return e.promise})),function(){return Promise.all(e.map(function(e){return e.abort()}))})}function i3(t,n){if(n)if(n instanceof Map)for(var i=x(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 i5(e){var t,n=new i3(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}i$.prototype.resolve=function(){},i$.prototype.reject=function(){},iQ.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},iQ.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},iQ.prototype.Ya=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 i$;
1a.catch(function(){});var o=new eJ(2,7,7001);return this.promise.then(n(!0),n(!1)),new iQ(a,function(){return i()})},m.Object.defineProperties(iQ.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),H("shaka.util.AbortableOperation",iQ),iQ.prototype.chain=iQ.prototype.Ya,iQ.prototype.finally=iQ.prototype.finally,iQ.all=i4,iQ.prototype.abort=iQ.prototype.abort,iQ.notAbortable=i2,iQ.completed=i1,iQ.aborted=i0,iQ.failed=iZ,i3.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},i3.prototype.stopImmediatePropagation=function(){this.g=!0},i3.prototype.stopPropagation=function(){},H("shaka.util.FakeEvent",i3);var i6={wl:"abrstatuschanged",xl:"adaptation",yl:"audiotrackchanged",zl:"audiotrackschanged",Al:"boundarycrossed",Bl:"buffering",Cl:"canupdatestarttime",Dl:"complete",El:"currentitemchanged",Fl:"downloadcompleted",Gl:"downloadfailed",Hl:"downloadheadersreceived",Il:"drmsessionupdate",Jl:"emsg",Pl:"itemsinserted",Ql:"itemsremoved",gm:"prft",Error:"error",Kl:"expirationupdated",Ll:"firstquartile",Ml:"gapjumped",Rl:"keystatuschanged",Ul:"loaded",Vl:"loading",Xl:"manifestparsed",Yl:"manifestupdated",Zl:"mediaqualitychanged",$l:"mediasourcerecovered",am:"metadataadded",Metadata:"metadata",bm:"midpoint",dm:"nospatialvideoinfo",fm:"onstatechange",hm:"ratechange",lm:"segmentappended",nm:"sessiondata",om:"spatialvideoinfo",pm:"stalldetected",qm:"started",rm:"statechanged",sm:"streaming",tm:"textchanged",um:"texttrackvisibility",vm:"thirdquartile",wm:"timelineregionadded",xm:"timelineregionenter",ym:"timelineregionexit",zm:"trackschanged",Bm:"unloading",Dm:"variantchanged"};function i8(){this.ab=new ei,this.De=this}function i9(){this.g=[]}function i7(e,t){e.g.push(t.finally(function(){Z(e.g,t)}))}function re(e,t,n,i,r,a,o){i8.call(this),this.i=null,this.j=!1,this.u=new i9,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=i||null,this.D=r||null,this.H=a||null,this.G=o||null,this.l=new Map}function rt(e,t,n,i){i=void 0!==i&&i,n=n||ru;var r=rl.get(e);(!r||n>=r.priority)&&rl.set(e,{priority:n,xf:t,Ik:i})}function rn(e,t){for(var n=x(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=x(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function ri(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 rr(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.Rc)return!1}return!0}function ra(){this.g=0}function ro(e,t,n){iQ.call(this,e,t),this.h=n}i8.prototype.addEventListener=function(e,t){this.ab&&this.ab.push(e,t)},i8.prototype.removeEventListener=function(e,t){this.ab&&this.ab.remove(e,t)},i8.prototype.dispatchEvent=function(e){if(!this.ab)return!0;var t=this.ab.get(e.type)||[],n=this.ab.get("All");for(n&&(t=t.concat(n)),n=(t=x(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.De,e.currentTarget=this.De;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},i8.prototype.release=function(){this.ab=null},i9.prototype.destroy=function(){for(var e=[],t=x(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)},w(re,i8),(p=re.prototype).configure=function(e){this.i=e},p.Lk=function(e){this.g.add(e)},p.kl=function(e){this.g.delete(e)},p.tj=function(){this.g.clear()},p.Mk=function(e){this.h.add(e)},p.ll=function(e){this.h.delete(e)},p.uj=function(){this.h.clear()},p.Th=function(){this.l.clear()},p.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),i8.prototype.release.call(this),this.u.destroy()},p.request=function(e,t,n){var i=this,r=new ra;if(this.j){var a=Promise.reject(new eJ(2,7,7001));return a.catch(function(){}),new ro(a,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?tV(t.retryParameters):iJ(),t.uris=tV(t.uris);var o=(a=function(e,t,n,i){function r(e){a=a.Ya(function(){return n.body&&(n.body=ej(n.body)),e(t,n,i)})}var a=i1(void 0);e.D&&r(e.D),e=x(e.g);for(var o=e.next();!o.done;o=e.next())r(o.value);return a.Ya(void 0,function(e){if(e instanceof eJ&&7001==e.code)throw e;throw new eJ(2,1,1006,e)})}(this,e,t,n)).Ya(function(){return function e(t,n,i,r,a,o,s,u){t.i.forceHTTP&&(i.uris[o]=i.uris[o].replace("https://","http://")),t.i.forceHTTPS&&(i.uris[o]=i.uris[o].replace("http://","https://")),o>0&&t.H&&t.H(n,r,i.uris[o],i.uris[o-1]);var l=new ey(i.uris[o]),c=l.cc,d=!1;c||(eb(l,c=(c=location.protocol).slice(0,-1)),i.uris[o]=l.toString()),c=c.toLowerCase();var h=(c=rl.get(c))?c.xf:null;if(!h)return iZ(new eJ(2,1,1e3,l));var p=c.Ik;(l=t.l.get(l.Bb))&&(i.headers["common-access-token"]=l);var f,g=null,m=null,v=!1,y=!1;return i2(iY(a)).Ya(function(){if(t.j)return i0();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.na(l/1e3),t.o&&n==rs&&(i.packetNumber=++e,t.o(a,o,rr(r),i,r),d=!0,u.g=s)},function(e){y=!0,i.timeToFirstByte=Date.now()-i.requestStartTime,t.m&&t.m(e,i,n)},{minBytesForProgressEvents:t.i.minBytesForProgressEvents});if(!p)return a;var s=i.retryParameters.connectionTimeout;s&&(g=new n7(function(){v=!0,a.abort()})).na(s/1e3);var l=i.retryParameters.stallTimeout;return l&&(m=new n7(function(){v=!0,a.abort()})),a}).Ya(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 ey(e.uri);t.l.set(a.Bb,r)}return r={response:e,hk:d},!y&&t.m&&t.m(e.headers,i,n),t.B&&t.B(i,e),r},function(l){if(g&&g.stop(),m&&m.stop(),t.C){var c=null,d=0;l instanceof eJ&&(c=l,1001==l.code&&(d=l.data[1])),t.C(i,c,d,v)}if(t.j)return i0();if(v&&(l=new eJ(1,1,1003,i.uris[o],n)),l instanceof eJ){if(7001==l.code)throw l;if(1010==l.code)throw s;if(1==l.severity){if((c=new i3("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 iX(t.retryParameters,!1),0,null,r)}),s=o.Ya(function(t){var r=i,a=e,o=t,s=n,u=i1(void 0);r=x(r.h);for(var l=r.next(),c={};!l.done;c={Li:void 0},l=r.next())c.Li=l.value,u=u.Ya(function(e){return function(){var t=o.response;return t.data&&(t.data=ej(t.data)),(0,e.Li)(a,t,s)}}(c));return u.Ya(function(){return o},function(e){var t=2;if(e instanceof eJ){if(7001==e.code)throw e;t=e.severity}throw new eJ(t,1,1007,e)})}),u=Date.now(),l=0;a.promise.then(function(){l=Date.now()-u},function(){});var c=0;o.promise.then(function(){c=Date.now()},function(){});var d=s.Ya(function(r){var a=Date.now()-c,o=r.response;return o.timeMs+=l,o.timeMs+=a,r.hk||!i.o||o.fromCache||"HEAD"==t.method||e!=rs||i.o(o.timeMs,o.data.byteLength,rr(n),t,n),i.G&&i.G(e,o,n),o},function(e){throw e&&(e.severity=2),e});return a=new ro(d.promise,function(){return d.abort()},r),i7(this.u,a),a},H("shaka.net.NetworkingEngine",re),re.prototype.request=re.prototype.request,re.prototype.destroy=re.prototype.destroy,re.makeRequest=ri,re.defaultRetryParameters=function(){return iJ()},re.prototype.clearCommonAccessTokenMap=re.prototype.Th,re.prototype.clearAllResponseFilters=re.prototype.uj,re.prototype.unregisterResponseFilter=re.prototype.ll,re.prototype.registerResponseFilter=re.prototype.Mk,re.prototype.clearAllRequestFilters=re.prototype.tj,re.prototype.unregisterRequestFilter=re.prototype.kl,re.prototype.registerRequestFilter=re.prototype.Lk,re.unregisterScheme=function(e){rl.delete(e)},re.registerScheme=rt,re.prototype.configure=re.prototype.configure,re.NumBytesRemainingClass=ra,w(ro,iQ),re.PendingRequest=ro;var rs=1;re.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9},re.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 ru=3;re.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var rl=new Map;function rc(e){this.g=!1,this.h=new i$,this.i=e}function rd(e,t){if(e.g){if(t instanceof eJ&&7003==t.code)throw t;throw new eJ(2,7,7003,t)}}function rh(e,t){var n=[];e=x(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rp(e){for(var t=new Map,n=x(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function rf(e){var t={};return e.forEach(function(e,n){t[n]=e}),t}function rg(e,t){this.h=e_(e),this.i=t==rv,this.g=0}function rm(){return new eJ(2,3,3e3)}rc.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()}))},(p=rg.prototype).La=function(){return this.g<this.h.byteLength},p.Ra=function(){return this.g},p.getLength=function(){return this.h.byteLength},p.Y=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}
1catch(e){throw rm()}},p.Ea=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw rm()}},p.V=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw rm()}},p.ah=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw rm()}},p.zd=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 rm()}if(t>2097151)throw new eJ(2,3,3001);return this.g+=8,0x100000000*t+e},p.Nb=function(e,t){if(this.g+e>this.h.byteLength)throw rm();var n=eO(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},p.skip=function(e){if(e<0||this.g+e>this.h.byteLength)throw rm();this.g+=e},p.Mi=function(e){if(e<0||this.g<e)throw rm();this.g-=e},p.seek=function(e){if(e<0||e>this.h.byteLength)throw rm();this.g=e},p.yd=function(){for(var e=this.g;this.La()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=eO(this.h,e,this.g-e),this.g+=1,eZ(e)},H("shaka.util.DataViewReader",rg),rg.prototype.readTerminatedString=rg.prototype.yd,rg.prototype.seek=rg.prototype.seek,rg.prototype.rewind=rg.prototype.Mi,rg.prototype.skip=rg.prototype.skip,rg.prototype.readBytes=rg.prototype.Nb,rg.prototype.readUint64=rg.prototype.zd,rg.prototype.readInt32=rg.prototype.ah,rg.prototype.readUint32=rg.prototype.V,rg.prototype.readUint16=rg.prototype.Ea,rg.prototype.readUint8=rg.prototype.Y,rg.prototype.getLength=rg.prototype.getLength,rg.prototype.getPosition=rg.prototype.Ra,rg.prototype.hasMoreData=rg.prototype.La;var rv=1;function ry(){this.i=new Map,this.h=new Map,this.g=!1}function rb(e){for(var t=rI(e);e.reader.La()&&!e.parser.g;)e.parser.vd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rw(e){for(var t=rI(e),n=e.reader.V(),i=0;i<n&&(e.parser.vd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function rT(e){var t=rI(e);for(e.reader.skip(78);e.reader.La()&&!e.parser.g;)e.parser.vd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rx(e){var t=rI(e);e.reader.skip(8);var n=e.reader.Ea();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.La()&&!e.parser.g;)e.parser.vd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function rS(e,t){return function(n){e(n.reader.Nb(n.reader.getLength()-n.reader.Ra(),t))}}function rA(e){var t=0;e=x(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function rk(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function rI(e){return 8+8*!!e.has64BitSize+4*(null!=e.flags)}rg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(p=ry.prototype).box=function(e,t){return e=rA(e),this.i.set(e,rE),this.h.set(e,t),this},p.boxes=function(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())this.box(n.value,t);return this},p.ma=function(e,t){return e=rA(e),this.i.set(e,rC),this.h.set(e,t),this},p.stop=function(){this.g=!0},p.parse=function(e,t,n){for(e=new rg(e,0),this.g=!1;e.La()&&!this.g;)this.vd(0,e,t,n)},p.vd=function(e,t,n,i){var r=t.Ra();if(i&&r+8>t.getLength())this.g=!0;else{var a=t.V(),o=t.V(),s=rk(o),u=!1;switch(a){case 0:a=t.getLength()-r;break;case 1:if(i&&t.Ra()+8>t.getLength()){this.g=!0;return}a=t.zd(),u=!0}var l=this.h.get(o);if(l){var c=null,d=null;if(this.i.get(o)==rC){if(i&&t.Ra()+4>t.getLength()){this.g=!0;return}c=(d=t.V())>>>24,d&=0xffffff}o=r+a,n&&o>t.getLength()&&(o=t.getLength()),i&&o>t.getLength()?this.g=!0:(o-=t.Ra(),l({name:s,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:c,flags:d,reader:t=new rg(t=o>0?t.Nb(o,!1):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u}))}else t.skip(Math.max(0,Math.min(r+a-t.Ra(),t.getLength()-t.Ra())))}},H("shaka.util.Mp4Parser",ry),ry.headerSize=rI,ry.typeToString=rk,ry.allData=rS,ry.audioSampleEntry=rx,ry.visualSampleEntry=rT,ry.sampleDescription=rw,ry.children=rb,ry.prototype.parseNext=ry.prototype.vd,ry.prototype.parse=ry.prototype.parse,ry.prototype.stop=ry.prototype.stop,ry.prototype.fullBox=ry.prototype.ma,ry.prototype.boxes=ry.prototype.boxes,ry.prototype.box=ry.prototype.box;var rE=0,rC=1;function rM(e){var t=this;this.g=[],this.data=[],(new ry).boxes(["moov","moof"],rb).ma("pssh",function(e){if(!(e.version>1)){var n=eO(e.reader.h,-12,e.size);t.data.push(n),e=e.reader.Nb(16,!1),t.g.push(tt(e))}}).parse(e)}function rD(e,t,n,i){var r=e.length,a=12+t.length+4+r;i>0&&(a+=4+16*n.size);var o=new Uint8Array(a),s=e_(o),u=0;if(s.setUint32(u,a),u+=4,s.setUint32(u,0x70737368),u+=4,i<1?s.setUint32(u,0):s.setUint32(u,0x1000000),u+=4,o.set(t,u),u+=t.length,i>0)for(s.setUint32(u,n.size),u+=4,n=(t=x(n)).next();!n.done;n=t.next())n=te(n.value),o.set(n,u),u+=n.length;return s.setUint32(u,r),o.set(e,u+4),o}function rR(e){var t=this;this.D=e,this.l=this.B=null,this.$=this.S=!1,this.J=0,this.g=null,this.o=new er,this.i=new Map,this.X=[],this.C=new Map,this.K=!1,this.m=new i$,this.h=null,this.u=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.aa=new Map,this.ia=new Map,this.M=new n7(function(){var e,n,i;
1return n=(e=t).aa,void((i=e.ia).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 eJ(2,6,6014)),e.D.wf(rf(i)))}),this.P=!1,this.N=[],this.qa=!1,this.G=new n7(function(){var e;(e=t).i.forEach(function(t,n){var i=t.Wg,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.Wg=r)})}),this.m.catch(function(){}),this.j=new rc(function(){var e,n;return e=t,P(function(t){switch(t.h){case 1:return e.o.release(),e.o=null,e.m.reject(),e.G.stop(),e.G=null,e.M.stop(),e.M=null,t.g(rz(e),2);case 2:if(!e.l){t.A(3);break}return t.m(4),t.g(e.l.setMediaKeys(null),6);case 6:t.o(5);break;case 4:n=t.l(),X("DrmEngine.destroyNow_ exception",n);case 5:e.l=null;case 3:e.g=null,e.B=null,e.C=new Map,e.h=null,e.u=function(){},e.D=null,e.O=!1,e.I=null,t.j()}})}),this.O=!1,this.H=this.I=null,this.T=function(){return!1}}function rL(e,t,n,i){i=void 0===i||i,e.C=new Map,n=x(n);for(var r=n.next();!r.done;r=n.next())e.C.set(r.value,{initData:null,initDataType:null});for(r=(n=x(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.C.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.P=e.C.size>0,rP(e,t,i)}function rP(t,n,i){var r,a,o,s,u,l,c,d,h,p,f,g,m,v,y;return P(function(b){if(1==b.h){for(rJ(t.h.clearKeys,n),r=n.some(function(e){return!!e.video&&!!e.video.drmInfos.length||!!e.audio&&!!e.audio.drmInfos.length}),a=rp(t.h.servers),o=rp(t.h.advanced||{}),!r&&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=x(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,a),s=new WeakSet,l=(u=x(n)).next();!l.done;l=u.next())for(d=(c=x(rW(l.value))).next();!d.done;d=c.next())h=d.value,s.has(h)||(s.add(h),function(t,n,i,r){var a=t.keySystem;a&&(!eH(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"))}(h,a,o,t.h.keySystemsMapping));for(p=function(e,n){var i=[];e=x(e);for(var r=e.next();!r.done;r=e.next()){var a=(r=r.value)[n]||o.has(r.keySystem)&&o.get(r.keySystem)[n]||"";if(""==a&&eG(r.keySystem)&&("audioRobustness"==n?a=[t.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(a=[t.h.defaultVideoRobustnessForWidevine])),"string"==typeof a)i.push(r);else if(Array.isArray(a)){0===a.length&&(a=[""]),a=x(a);for(var s=a.next();!s.done;s=a.next()){var u={};i.push(Object.assign({},r,(u[n]=s.value,u)))}}}return i},f=new WeakSet,m=(g=x(n)).next();!m.done;m=g.next())(v=m.value).video&&!f.has(v.video)&&(v.video.drmInfos=p(v.video.drmInfos,"videoRobustness"),v.video.drmInfos=p(v.video.drmInfos,"audioRobustness"),f.add(v.video)),v.audio&&!f.has(v.audio)&&(v.audio.drmInfos=p(v.audio.drmInfos,"videoRobustness"),v.audio.drmInfos=p(v.audio.drmInfos,"audioRobustness"),f.add(v.audio));return b.g(ix(n,t.P,t.O,t.h.preferredKeySystems),2)}return(rd(t.j),r||a.size>0)?(y=r_(t,n),b.return(r?y:y.catch(function(){}))):(t.S=!0,b.return(Promise.resolve()))})}function rN(e){var t;return P(function(n){switch(n.h){case 1:if(e.l.mediaKeys)return n.return();if(!e.I){n.A(2);break}return n.g(e.I,3);case 3:return rd(e.j),n.return();case 2:return n.m(4),e.I=e.l.setMediaKeys(e.B),n.g(e.I,6);case 6:n.o(5);break;case 4:t=n.l(),e.u(new eJ(2,6,6003,t.message));case 5:rd(e.j),n.j()}})}function rj(e){var t,n,i;
1return P(function(r){if(1==r.h)return e.C.size?(e.C.forEach(function(t,n){rV(e,n,t)}),r.g(e.m,3)):r.A(2);if(2!=r.h){if((e.g&&e.g.keyIds||new Set([])).size>0&&function(e){for(var t=x(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.aa.get(n.value))return!1;return!0}(e))return r.return(e.m);e.K=!1,e.m=new i$,e.m.catch(function(){})}for(n=(t=x((e.g?e.g.initData:[])||[])).next();!n.done;n=t.next())rO(e,(i=n.value).initDataType,i.initData);return rX(e)&&e.m.resolve(),r.return(e.m)})}function rO(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(n){t=n,n instanceof eJ||(t=new eJ(2,6,6016,n)),e.u(t);return}if(e.h.ignoreDuplicateInitData){var i=e.i.values();i=x(i);for(var r=i.next();!r.done;r=i.next())if(eN(n,r.value.initData))return;var a=!1;if(e.C.forEach(function(e){!a&&eN(n,e.initData)&&(a=!0)}),a)return}e.K=!0,e.i.size>0&&rX(e)&&(e.m.resolve(),e.K=!1,e.m=new i$,e.m.catch(function(){})),function(e,t,n,i){try{var r=e.B.createSession(i)}catch(t){e.u(new eJ(2,6,6005,t.message));return}e.o.F(r,"message",function(t){rH(e)?e.N.push(t):rG(e,t)}),e.o.F(r,"keystatuseschange",function(t){return rK(e,t)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Wg:1/0,Gb:null,type:i}),e.h.logLicenseExchange&&e9(n),r.generateRequest(t,n).catch(function(t){if(!e.j.g){e.i.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;i<0&&(i+=0x100000000),i="0x"+i.toString(16)}e.u(new eJ(2,6,6006,t.message,t,i))}})}(e,t,n,e.g.sessionType)}}function rU(e){return Array.from(e=rh(e=e.i.keys(),function(e){return e.sessionId}))}function r_(e,t){var n,i,r,a,o,s;return P(function(u){switch(u.h){case 1:if(!(i=function(e,t,n){for(var i=x(t),r=i.next();!r.done;r=i.next()){r=x(rW(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 eJ(2,6,6e3);(i=e.h.preferredKeySystems).length||1==(r=rp(e.h.servers)).size&&(i=Array.from(r.keys()));var o=(r=x(i)).next();for(a={};!o.done;a={Gi:void 0},o=r.next()){a.Gi=o.value,o=x(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.Gi}}(a)))return s.keySystemAccess}for(a=(r=x([!0,!1])).next();!a.done;a=r.next())for(a=a.value,s=(o=x(t)).next();!s.done;s=o.next()){s=x(s.value.decodingInfos);for(var u=s.next();!u.done;u=s.next())if((u=u.value).supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!i.includes(l)){var c=n.get(l);for(!c&&e.h.keySystemsMapping[l]&&(c=n.get(e.h.keySystemsMapping[l])),c=(l=x(c)).next();!c.done;c=l.next())if(!!c.value.licenseServerUri==a)return u.keySystemAccess}}}return null}(e,t,n=new Map))){if(!navigator.requestMediaKeySystemAccess)throw new eJ(2,6,6020);throw new eJ(2,6,6001)}if(rd(e.j),u.m(2),i.getConfiguration(),r=e.h.keySystemsMapping[i.keySystem]||i.keySystem,e.g=rY(e,r,n.get(r)),!e.g.licenseServerUri)throw new eJ(2,6,6012,e.g.keySystem);return u.g(i.createMediaKeys(),4);case 4:if(a=u.i,rd(e.j),e.B=a,!(""!=e.h.minHdcpVersion&&"getStatusForPolicy"in e.B)){u.A(5);break}return u.m(6),u.g(e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if("usable"!=u.i)throw new eJ(2,6,6018);rd(e.j),u.o(5,2);break;case 6:if((o=u.l(2))instanceof eJ)throw o;throw new eJ(2,6,6019,o.message);case 5:var l,c,d;return e.S=!0,e.G.Fa(e.h.updateExpirationTime),u.g(P(function(t){switch(t.h){case 1:if(!e.B||!e.g)return t.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){t.A(2);break}return l=ri([e.g.serverCertificateUri],e.h.retryParameters),t.m(3),c=e.D.qc.request(5,l,{isPreload:e.T()}),t.g(c.promise,5);case 5:d=t.i,e.g.serverCertificate=eO(d.data),t.o(4);break;case 3:throw new eJ(2,6,6017,t.l());case 4:if(e.j.g)return t.return();case 2:if(!e.g.serverCertificate||!e.g.serverCertificate.length)return t.return();return t.m(6),t.g(e.B.setServerCertificate(e.g.serverCertificate),8);case 8:t.o(0);break;case 6:throw new eJ(2,6,6004,t.l().message)}}),9);case 9:rd(e.j),u.o(0);break;case 2:if(s=u.l(),rd(e.j,s),e.g=null,s instanceof eJ)throw s;throw new eJ(2,6,6002,s.message)}})}function rB(e){rX(e)&&e.m.resolve()}function rF(e,t){new n7(function(){t.loaded=!0,rB(e)}).na(rQ)}
1function rV(e,t,n){var i,r,a,o,s,u,l;return P(function(c){switch(c.h){case 1:try{i=e.B.createSession("persistent-license")}catch(t){return r=new eJ(2,6,6005,t.message),e.u(r),c.return(Promise.reject(r))}return e.o.F(i,"message",function(t){rH(e)?e.N.push(t):rG(e,t)}),e.o.F(i,"keystatuseschange",function(t){return rK(e,t)}),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Wg:1/0,Gb:null,type:"persistent-license"},e.i.set(i,a),c.m(2),c.g(i.load(t),4);case 4:return o=c.i,rd(e.j),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.u(new eJ(s,6,6013)),a.loaded=!0),rF(e,a),rB(e),c.return(i);case 2:u=c.l(),rd(e.j,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.u(new eJ(l,6,6005,u.message)),a.loaded=!0,rB(e);case 3:return c.return(Promise.resolve())}})}function rH(e){return e.l?e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.qa:!e.$&&e.h.delayLicenseRequestUntilPlayed}function rG(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g;P(function(m){switch(m.h){case 1:if(n=t.target,e.h.logLicenseExchange&&e9(t.message),i=e.i.get(n),r=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=ri([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if(eH(e.g.keySystem)){var v=o,y=e.g;try{var b=e1(v.body);if(b){var w=JSON.parse(b);w.type||(w.type=y.sessionType,v.body=e2(JSON.stringify(w)))}}catch(e){}}if(eK(e.g.keySystem))if((v=e0(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(b=(y=x(y=tQ(v=tq(v,"PlayReadyKeyMessage"),"HttpHeader"))).next();!b.done;b=y.next())b=tQ(w=b.value,"name")[0],w=tQ(w,"value")[0],o.headers[tJ(b)]=tJ(w);o.body=e7(tJ(v=tQ(v,"Challenge")[0]))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),m.m(2),c=e.D.qc.request(2,o,{isPreload:e.T()}),e.X.push(c),m.g(c.promise,4);case 4:l=m.i,Z(e.X,c),m.o(3);break;case 2:if(d=m.l(),e.j.g)return m.return();return h=new eJ(2,6,6007,d,{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}),1==e.i.size?(e.u(h),i&&i.Gb&&i.Gb.reject(h)):(i&&i.Gb&&i.Gb.reject(h),e.i.delete(n),rX(e)&&(e.m.resolve(),e.M.na(.1))),m.return();case 3:if(e.j.g)return m.return();return e.J+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&e9(l.data),m.m(5),m.g(n.update(l.data),7);case 7:m.o(6);break;case 5:return f=new eJ(2,6,6008,(p=m.l())&&p.message||String(p)),e.u(f),i&&i.Gb&&i.Gb.reject(f),m.return();case 6:if(e.j.g)return m.return();g=new i3("drmsessionupdate"),e.D.onEvent(g),i&&(i.Gb&&i.Gb.resolve(),rF(e,i)),m.j()}})}function rK(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(a=eu(),eK(e.g.keySystem)&&16==r.byteLength&&a.Bf()){var o=(a=e_(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=tt(r).slice(0,32),e.aa.set(r,t)});var r=t.expiration-Date.now();(r<0||i&&r<1e3)&&n&&!n.Gb&&(e.i.delete(t),rq(t)),rX(e)&&(e.m.resolve(),e.M.na(rZ))}function rq(e){return P(function(t){return 1==t.h?(t.m(2),t.g(ia(r$,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.h?t.o(0):void(t.l(),t.j())})}function rz(e){var t;return P(function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map(function(t){var n=(t=x(t)).next().value,i=t.next().value;return P(function(t){return 1==t.h?(t.m(2),e.$||e.C.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?t.g(rq(n),5):t.g(n.remove(),5)):2!=t.h?t.o(0):void(t.l(),t.j())})})),0)})}function rW(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function rX(e){var t=e=e.i.values();t=x(t);for(var n=t.next();!n.done;n=t.next())if(!n.value.loaded)return!1;return!0}function rY(t,n,i){var r=[],a=[],o=[],s=[],u=[],l=new Set,c=new Set;for(function(t,n,i,r,a,o,s,u){var l=[];t=x(t);for(var c=t.next(),d={};!c.done;d={Ma:void 0}
1,c=t.next()){if(d.Ma=c.value,n.includes(d.Ma.encryptionScheme)||n.push(d.Ma.encryptionScheme),eH(d.Ma.keySystem)&&d.Ma.licenseServerUri.startsWith("data:application/json;base64,")?l.includes(d.Ma.licenseServerUri)||l.push(d.Ma.licenseServerUri):i.includes(d.Ma.licenseServerUri)||i.push(d.Ma.licenseServerUri),a.includes(d.Ma.serverCertificateUri)||a.push(d.Ma.serverCertificateUri),d.Ma.serverCertificate&&(r.some(function(e){return function(t){return eN(t,e.Ma.serverCertificate)}}(d))||r.push(d.Ma.serverCertificate)),d.Ma.initData){c=x(d.Ma.initData);for(var h=c.next(),p={};!h.done;p={Lg:void 0},h=c.next())p.Lg=h.value,o.some(function(e){return function(t){var n=e.Lg;return!!t.keyId&&t.keyId==n.keyId||t.initDataType==n.initDataType&&eN(t.initData,n.initData)}}(p))||o.push(p.Lg)}if(d.Ma.keyIds)for(h=(c=x(d.Ma.keyIds)).next();!h.done;h=c.next())s.add(h.value);if(d.Ma.keySystemUris&&u)for(c=(d=x(d.Ma.keySystemUris)).next();!c.done;c=d.next())u.add(c.value)}if(1==l.length)i.push(l[0]);else if(l.length>0){for(n=[],r=(l=x(l)).next();!r.done;r=l.next())r=JSON.parse(r=e.atob(r.value.split("data:application/json;base64,").pop())),n.push.apply(n,S(r.keys));l=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(l))}}(i,r,a,s,o,u,l,c),t=t.P?"persistent-license":"temporary",n={keySystem:n,encryptionScheme:r[0],licenseServerUri:a[0],distinctiveIdentifierRequired:i[0].distinctiveIdentifierRequired,persistentStateRequired:i[0].persistentStateRequired,sessionType:i[0].sessionType||t,audioRobustness:i[0].audioRobustness||"",videoRobustness:i[0].videoRobustness||"",serverCertificate:s[0],serverCertificateUri:o[0],initData:u,keyIds:l,mediaTypes:i[0].mediaTypes},c.size>0&&(n.keySystemUris=c),c=(i=x(i)).next();!c.done;c=i.next())(c=c.value).distinctiveIdentifierRequired&&(n.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),c.persistentStateRequired&&(n.persistentStateRequired=c.persistentStateRequired);return n}function rJ(e,t){if(0!=(e=rp(e)).size){e=to(e),t=x(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])}}(p=rR.prototype).destroy=function(){return this.j.destroy()},p.configure=function(e,t){this.h=e,t&&(this.T=t),this.G&&this.S&&this.g&&this.G.Fa(this.h.updateExpirationTime)},p.Pb=function(e){var t,n,i=this;return P(function(r){if(1==r.h)return i.l===e?r.return():i.B?(i.l=e,i.h.delayLicenseRequestUntilPlayed&&i.o.Ba(i.l,"play",function(){for(var e=x(i.N),t=e.next();!t.done;t=e.next())rG(i,t.value);i.qa=!0,i.N=[]}),i.l.remote?(i.o.F(i.l.remote,"connect",function(){return rz(i)}),i.o.F(i.l.remote,"connecting",function(){return rz(i)}),i.o.F(i.l.remote,"disconnect",function(){return rz(i)})):"webkitCurrentPlaybackTargetIsWireless"in i.l&&i.o.F(i.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rz(i)}),i.H=i.g&&i.g.initData.find(function(e){return e.initData.length>0})||null,t=i.g.keySystem,(n=eu().Tg(t))||!i.H&&"com.apple.fps"===i.g.keySystem&&!i.C.size?r.A(2):r.g(rN(i),2)):(i.o.Ba(e,"encrypted",function(){i.u(new eJ(2,6,6010))}),r.return());rj(i).catch(function(){}),!n&&(i.H||i.C.size||i.h.parseInbandPsshEnabled)||i.o.F(i.l,"encrypted",function(e){return P(function(t){if(1==t.h)return t.g(rN(i),2);rO(i,e.initDataType,eO(e.initData)),t.j()})}),r.j()})},p.Fg=function(){var e=this,t=this.i.keys();return Array.from(t=rh(t,function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}}))},p.Ud=function(){var e=1/0,t=this.i.keys();t=x(t);for(var n=t.next();!n.done;n=t.next())isNaN((n=n.value).expiration)||(e=Math.min(e,n.expiration));return e},p.We=function(){return rf(this.ia)};var r$=1,rQ=5,rZ=.5;function r0(){this.g=r4,this.j=(new Map).set(r4,2).set(r2,1),this.i=0,this.h=-1}function r1(e,t){var n=e.g!==t;return e.g=t,n&&t===r4&&(e.i=Date.now()),n}var r2=0,r4=1;function r3(e,t,n){this.h=e,this.i=t,this.g=n}function r5(e,t){return P(function(n){if(1==n.h){var i,r,a;return n.g((i=e.g,r=e.h.drm.preferredKeySystems,a=e.h.drm.keySystemsMapping,r=void 0===r?[]:r,a=void 0===a?{}:a,P(function(e){var n,o,s,u,l,c,d,h,p;return 1==e.h?e.g(iw(i,t,t.offlineSessionIds.length>0,r,a),2):((n=t).textStreams=n.textStreams.filter(function(e){return n5(e=nq(e.mimeType,e.codecs))}),e.g((o=t,P(function(e){switch(e.h){case 1:s=[],l=(u=x(o.imageStreams)).next();case 2:var t;if(l.done){e.A(4);break}if("application/mp4"==(d=(c=l.value).mimeType)&&"mjpg"==c.codecs&&(d="image/jpg"),iH.has(d)){e.A(5);break}if(!(h=iG.get(d))){iH.set(d,!1),e.A(5);break}return e.g((t=h,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:p=e.i,iH.set(d,p);case 5:iH.get(d)&&s.push(c),l=u.next(),e.A(2);break;case 4:o.imageStreams=s,e.j()}})),0))})),2)}if(e.h.streaming.dontChooseCodecs||iy(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes,e.h.preferredTextFormats),!t.variants.some(iL))throw new eJ(2,4,4032);return n.return(r8(e,t))})}function r6(e,t){var n=e.h.restrictions;e=e.i;var i=!1;t=x(t.variants);for(var r=t.next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=ib(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function r8(e,t){var n=r6(e,t);if(t){var i=e.g?e.g.g:null;if(i&&e.g.B){for(var r=new Set,a=x(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=x(r)).next();!a.done;a=r.next())r9(e,i.keySystem,a.value)}r7(e,t)}return n}function r9(e,t,n){n=x(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if((i=i.value).keySystem==t){for(var r=x(i.initData||[]),a=r.next();!a.done;a=r.next())a=a.value,rO(e.g,a.initDataType,a.initData);(r=e.g).g&&(r.g.mediaTypes!==i.mediaTypes&&(r.g.mediaTypes=i.mediaTypes),ez(i)&&(r.g=rY(r,r.g.keySystem,[r.g,i])))}}function r7(e,t){function n(e){if(e&&!s.has(e)&&(s.add(e),e.keyIds.size)){e=x(e.ke
1yIds);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=i[r?"00":t];n?ae.includes(n)&&o.add(n):a.add(t)}}}var i=e.g?e.g.We():{},r=(e=Object.keys(i)).length&&"00"==e[0];e=!1;var a=new Set,o=new Set,s=new WeakSet;t=x(t.variants);for(var u=t.next();!u.done;u=t.next()){if((u=u.value).allowedByApplication){if(u.allowedByKeySystem)return}else e=!0;n(u.audio),n(u.video)}throw new eJ(2,4,4012,e={hasAppRestrictions:e,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}var ae=["output-restricted","internal-error"];function at(t){if(ai.has(t))return ai.get(t);var n=e.ManagedMediaSource||e.MediaSource;return!!n&&(n=n.isTypeSupported(t),ai.set(t,n),n)}function an(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.prototype&&!!t.prototype.setLiveSeekableRange&&!!t.prototype.clearLiveSeekableRange}H("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});var ai=new Map;function ar(e,t){var n=null,i=null,r=null,a=null,o=e.V();return 1&t&&(r=e.zd()),2&t&&(a=e.V()),8&t&&(n=e.V()),16&t&&(i=e.V()),{trackId:o,Rd:n,Sd:i,pj:r,Ni:a}}function aa(e,t){return 1==t?{baseMediaDecodeTime:0x100000000*(t=e.V())+(e=e.V())}:{baseMediaDecodeTime:e.V()}}function ao(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.V(),e.skip(4),{timescale:t,language:String.fromCharCode(((e=e.Ea())>>10)+96)+String.fromCharCode(((960&e)>>5)+96)+String.fromCharCode((31&e)+96)}}function as(e,t,n){var i=e.V(),r=[],a=null;1&n&&(a=e.ah()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={mh:null,sampleSize:null,Cf:null};256&n&&(s.mh=e.V()),512&n&&(s.sampleSize=e.V()),1024&n&&e.skip(4),2048&n&&(s.Cf=0==t?e.V():e.ah()),r.push(s)}return{Hm:i,kh:r,lg:a}}function au(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Ea();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.Ea()+e.Ea()/65536}}function al(e){return{codec:rk(e=e.V())}}function ac(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function ad(e){return(e<10?"0":"")+e}function ah(e){this.g=void 0===e?[]:e}function ap(e){if(0===e.g.length)throw Error("StreamInfos must have elements");for(var t=[],n=x(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=aS;var s=o.id+1,u=o.stream.width||0,l=o.stream.height||0;"audio"==o.type&&(l=u=0);var c=o.duration*o.timescale,d=Math.floor(c/(ak+1));switch(c=Math.floor(c%(ak+1)),s=aS("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(S(aw(s,4)),[0,0,0,0],S(aw(d,4)),S(aw(c,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],S(aw(u,2)),[0,0],S(aw(l,2)),[0,0]))),u=aS,l=Math.floor((d=o.duration*o.timescale)/(ak+1)),d=Math.floor(d%(ak+1)),c=(c=o.stream.language).charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=aS("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(S(aw(o.timescale,4)),S(aw(l,4)),S(aw(d,4)),S(aw(c,2)),[0,0]))),d=o,c=new Uint8Array([]),d.type){case"video":c=aE.value();break;case"audio":c=aC.value()}d=aS("hdlr",c);e:{switch(o.type){case"video":o=aS("minf",aS("vmhd",aP.value()),aU.value(),af(o));break e;case"audio":o=aS("minf",aS("smhd",aN.value()),aU.value(),af(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,d,o)),a.call(r,i)}for(n=e.g[0],a=(r=aS).apply,i=Math.floor((o=n.duration*n.timescale)/(ak+1)),o=Math.floor(o%(ak+1)),o=(i=["moov",aS("mvhd",i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(S(aw(n.timescale,4)),S(aw(i,4)),S(aw(o,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])))]).concat,t=S(t),s=[],d=(e=x(e.g)).next();!d.done;d=e.next())l=(u=s).push,d=aS("trex",d=new Uint8Array([0,0,0,0].concat(S(aw(d.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),l.call(u,d);return e=aS.apply(ah,["mvex"].concat(S(s))),e=a.call(r,ah,o.call(i,t,[e,av(n.stream)])),(n=new Uint8Array((t=aO.value()).byteLength+e.byteLength)).set(t),n.set(e,t.byteLength),n}function af(e){var t="aac";e.codecs.includes("mp3")?t="mp3":e.codecs.includes("ac-3")?t=eu().le()?"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,e.Ta.byteLength>0)var i=aS("avcC",e.Ta);else{i=aS;for(var r=7,a=[],o=[],s=0,u=0,l=0,c=0;c<e.zb.length;c++){var d=aT(e.zb[c]);switch(31&d[0]){case 7:a.push(d),r+=d.length+2;break;case 8:o.push(d),r+=d.length+2}}for(a.length>
10&&(s=a[0][1],l=a[0][2],u=a[0][3]),r=new Uint8Array(r),c=0,r[c++]=1,r[c++]=s,r[c++]=l,r[c++]=u,r[c++]=255,r[c++]=224|a.length,s=0;s<a.length;s++)r[c++]=(65280&a[s].length)>>8,r[c++]=255&a[s].length,r.set(a[s],c),c+=a[s].length;for(a=0,r[c++]=o.length;a<o.length;a++)r[c++]=(65280&o[a].length)>>8,r[c++]=255&o[a].length,r.set(o[a],c),c+=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(S(aw(t,2)),S(aw(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=ag(e),a=new Uint8Array([]),aA(e.stream)&&(a=ay(e.stream,e.codecs),n="encv"),n=aS(n,t,i,o,a)}else e.codecs.includes("hvc1")&&(n=e.stream.width||0,i=e.stream.height||0,t=new Uint8Array([]),e.Ta.byteLength>0&&(t=aS("hvcC",e.Ta)),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(S(aw(n,2)),S(aw(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=ag(e),a=new Uint8Array([]),aA(e.stream)&&(a=ay(e.stream,e.codecs),i="encv"),n=aS(i,n,t,o,a));break;case"audio":"mp3"==t?e=aS(".mp3",am(e)):("ac-3"==t?(t=aS("dac3",e.Aa),n="ac-3"):"ec-3"==t?(t=aS("dec3",e.Aa),n="ec-3"):"opus"==t?(t=aS("dOps",e.Aa),n="Opus"):(e.Aa.byteLength>0?t=aS("esds",e.Aa):(t=aS,n=e.id+1,i=e.stream.channelsCount||2,a=e.stream.audioSamplingRate||44100,s=ts("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(S(aw(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([]),aA(e.stream)&&(i=ay(e.stream,e.codecs),n="enca"),e=aS(n,am(e),t,i)),n=e}return e=aS("stsd",aj.value(),n),aS("stbl",e,aS("stts",aM.value()),aS("stsc",aD.value()),aS("stsz",aL.value()),aS("stco",aR.value()))}function ag(e){if(!e.Za&&!e.$a)return new Uint8Array([]);var t=e.$a;return aS("pasp",e=new Uint8Array([].concat(S(aw(e.Za,4)),S(aw(t,4)))))}function am(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(S(aw(e.stream.audioSamplingRate||44100,2)),[0,0]))}function av(e){var t=[];if(!aA(e))return new Uint8Array([]);e=x(e.drmInfos);for(var n=e.next();!n.done;n=e.next())if((n=n.value).initData){n=x(n.initData);for(var i=n.next();!i.done;i=n.next())t.push(i.value.initData)}return tn.apply(e6,S(t))}function ay(e,t){t=aS("frma",t=new Uint8Array([].concat(S(aw(ax(t.split(".")[0]),4)))));var n="cenc",i=e.drmInfos[0];i&&i.encryptionScheme&&(n=i.encryptionScheme),n=aS("schm",n=new Uint8Array([0,0,0,0].concat(S(aw(ax(n),4)),[0,1,0,0]))),i=aS;var r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=x(e.drmInfos);for(var a=e.next();!a.done;a=e.next())if((a=a.value)&&a.keyIds&&a.keyIds.size){a=x(a.keyIds);for(var o=a.next();!o.done;o=a.next())r=aT(o.value)}return r=aS("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),r),aS("sinf",t,n,i("schi",r))}function ab(e){var t=[];e=x(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i,r,a=t.push,o=aS,s=new Uint8Array([0,0,0,0].concat(S(aw(n.data?n.data.sequenceNumber:0,4))));s=aS("mfhd",s);var u=n.data?n.data.ub:[],l=new Uint8Array(4+u.length);for(r=0;r<u.length;r++){var c=u[r].flags;l[r+4]=c.Te<<4|c.ef<<2|c.$e}var d=(u=aS("sdtp",l)).length+32+20+8+16+8+8;l=aS,r=aS("tfhd",r=new Uint8Array([0,0,0,58].concat(S(aw(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])));var h=Math.floor((c=n.data?n.data.baseMediaDecodeTime:0)%(ak+1));c=aS("tfdt",c=new Uint8Array([1,0,0,0].concat(S(aw(Math.floor(c/(ak+1)),4)),S(aw(h,4)))));var p=d,f=12+16*(h=(d=n.data?n.data.ub:[]).length),g=new Uint8Array(f);for(p+=8+f,g.set([+("video"===n.type),0,15,1].concat(S(aw(h,4)),S(aw(p,4))),0),p=0;p<h;p++){var m=d[p];f=aw(m.duration,4);var v=aw(m.size,4),y=m.flags;m=aw(m.ob,4),g.set([].concat(S(f),S(v),[y.Og<<2|y.Te,y.ef<<6|y.$e<<4|y.Pg,61440&y.Se,15&y.Se],S(m)),12+16*p)}o=o("moof",s,u=l("traf",r,c,d=aS("trun",g),u)),a.call(t,o,(i=((i=n).data?i.data.ub:[]).map(function(e){return e.data}),aS.apply(ah,["mdat"].concat(S(i)))))}return tn.apply(e6,S(t))}function aw(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function aT(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 ax(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<(e.length-n-1)*8;return t}function aS(e){var t=N.apply(1,arguments),n=aI.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],aI.set(e,n));for(var i=8,r=t.length-1;r>=0;r--)i+=t[r].byteLength;
1for((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}function aA(e){return e.encrypted&&e.drmInfos.length>0}var ak=0xffffffff,aI=new Map,aE=new es(function(){return 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])}),aC=new es(function(){return 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])}),aM=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aD=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aR=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aL=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),aP=new es(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),aN=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),aj=new es(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),aO=new es(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]);return aS("ftyp",e,new Uint8Array([0,0,0,1]),e,t)}),aU=new es(function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=aS("dref",e),aS("dinf",e)});function a_(e,t,n){0!=(t=(e=e_(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,0|n)):e.setUint32(0,n))}function aB(e,t,n,i,r,a,o,s){this.R=e,this.startByte=t,this.endByte=n,this.sd=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 aF(e,t){return e===t||(e&&t?e.Fc()==t.Fc()&&e.Dc()==t.Dc()&&en(e.R().sort(),t.R().sort())&&eN(e.Vb(),t.Vb()):e==t)}function aV(e,t,n,i,r,a,o,s,u,l,c,d,h,p,f,g){for(l=void 0===l?[]:l,p=void 0===p?aG:p,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=i,this.endByte=r,this.ba=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===c?"":c,this.B=void 0===d?null:d,this.h=void 0===h?null:h,this.status=p,this.preload=!1,this.l=!0,this.o=!1,this.aesKey=void 0===f?null:f,this.thumbnailSprite=null,this.i=-1,this.m=void 0!==g&&g,this.be=this.Rc=!1,t=(e=x(this.g)).next();!t.done;t=e.next())t.value.wi();this.m&&this.g.length&&this.g[this.g.length-1].ui(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.D=!1}function aH(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.g.length>0&&e.m)for(e=(e=x(e.g)).next();!e.done;e=e.next()){aH(e.value);break}return null}aB.prototype.Fc=function(){return this.startByte},aB.prototype.Dc=function(){return this.endByte},aB.prototype.me=function(e){this.h=e},aB.prototype.Vb=function(){return this.h},H("shaka.media.InitSegmentReference",aB),aB.prototype.getEndByte=aB.prototype.Dc,aB.prototype.getStartByte=aB.prototype.Fc,(p=aV.prototype).R=function(){return this.C()},p.getStartTime=function(){return this.startTime},p.Ij=function(){return this.endTime},p.Fc=function(){return this.startByte},p.Dc=function(){return this.endByte},p.ck=function(){return this.tilesLayout},p.bk=function(){return this.B},p.Wb=function(){return this.status},p.yk=function(){this.status=aK},p.Sg=function(){this.preload=!0},p.isPreload=function(){return this.preload},p.rd=function(){this.l=!1},p.nk=function(){return this.l},p.wi=function(){this.Rc=!0},p.qk=function(){return this.Rc},p.ui=function(){this.be=!0},p.pk=function(){return this.be},p.ti=function(){this.o=!0},p.ik=function(){return this.o},p.If=function(e){this.thumbnailSprite=e},p.Zj=function(){return this.thumbnailSprite},p.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=x(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},p.Bh=function(e){null==this.h?W("Sync attempted without sync time!"):Math.abs(e=this.h-e-this.startTime)>=.001&&this.offset(e)},p.me=function(e,t){this.u=e,this.D=void 0!==t&&t},p.Vb=function(e){var t=this.u;return(void 0===e||e)&&this.D&&(this.u=null),t},H("shaka.media.SegmentReference",aV),aV.prototype.getSegmentData=aV.prototype.Vb,aV.prototype.setSegmentData=aV.prototype.me,aV.prototype.syncAgainst=aV.prototype.Bh,aV.prototype.offset=aV.prototype.offset,aV.prototype.getThumbnailSprite=aV.prototype.Zj,aV.prototype.setThumbnailSprite=aV.prototype.If,aV.prototype.hasByterangeOptimization=aV.prototype.ik,aV.prototype.markAsByterangeOptimization=aV.prototype.ti,aV.prototype.isLastParti
1al=aV.prototype.pk,aV.prototype.markAsLastPartial=aV.prototype.ui,aV.prototype.isPartial=aV.prototype.qk,aV.prototype.markAsPartial=aV.prototype.wi,aV.prototype.isIndependent=aV.prototype.nk,aV.prototype.markAsNonIndependent=aV.prototype.rd,aV.prototype.isPreload=aV.prototype.isPreload,aV.prototype.markAsPreload=aV.prototype.Sg,aV.prototype.markAsUnavailable=aV.prototype.yk,aV.prototype.getStatus=aV.prototype.Wb,aV.prototype.getTileDuration=aV.prototype.bk,aV.prototype.getTilesLayout=aV.prototype.ck,aV.prototype.getEndByte=aV.prototype.Dc,aV.prototype.getStartByte=aV.prototype.Fc,aV.prototype.getEndTime=aV.prototype.Ij,aV.prototype.getStartTime=aV.prototype.getStartTime,aV.prototype.getUris=aV.prototype.R;var aG=0,aK=1;function aq(e){return 1==e.length&&e.end(0)-e.start(0)<1e-4}function az(e){return!e||aq(e)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null}function aW(e){return!e||aq(e)?null:e.length?e.end(e.length-1):null}function aX(e,t){return!(!e||!e.length||aq(e)||t>e.end(e.length-1))&&t>=e.start(0)}function aY(e,t){if(!e||!e.length||aq(e))return 0;var n=0;e=x(aJ(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 aJ(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 a$(){}function aQ(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function aZ(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;i>=0;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function a0(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function a1(){return a4||(a2||(a2=new n7(function(){a4=null})),(a4=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(a4=document.createElement("video")),a2.na(1)),a4}aV.Status={vl:0,Am:1,Wl:2},H("shaka.util.Dom",a$),a$.removeAllChildren=a0,a$.clearSourceFromVideo=aZ;var a2=null,a4=null;function a3(){}function a5(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128||!1}function a6(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128||!1}function a8(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 a9(e){for(var t=0,n=[];a5(e,t);){var i=a8(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=a8(r,4);(a=function(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(e.size<2||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=eZ(eO(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=eZ(eO(e.data,3+n,a));return o="--\x3e"===i?eZ(eO(e.data,4+n+a)):ej(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?e.size<2||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=eZ(eO(e.data,1,i)),e=eZ(eO(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?e.size<2||-1===(n=e.data.indexOf(0))?null:(t.description=n=eZ(eO(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=ej(e.data.subarray(n.length+1)),t):"T"===e.type[0]?e.size<2||3!==e.data[0]?null:(t.data=e=eZ(e.data.subarray(1)).replace(/\0*$/,""),t):"W"===e.type[0]?(t.data=e=eZ(e.data).replace(/\0*$/,""),t):e.data?(t.data=ej(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}a6(e,t)&&(t+=10)}return n}function a7(e,t){for(var n=t=void 0===t?0:t,i=0;a5(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=a8(e,t+6),a6(e,t+10)&&(i+=10),t+=i;return i>0?e.subarray(n,n+i):new Uint8Array([])}function oe(e,t,n){return n=void 0===n?Number.EPSILON:n,e===t||(e=Math.abs(e-t))<=n||n!==Number.EPSILON&&Math.abs(e-n)<=Number.EPSILON}function ot(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}
1function on(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++)i>=2&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=eO(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function oi(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(0!==n){for(var i=0,r=0;r<n;r++)i=i<<8|e.j[t+r];e.h=i<<(4-n)*8,e.g=8*n,e.i-=n}}function or(e,t){if(e.g<=t){var n=Math.floor((t-=e.g)/8);t-=8*n,e.g-=n,oi(e)}e.h<<=t,e.g-=t}function oa(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&oi(e),(n=t-n)>0?i<<n|oa(e,n):i}function oo(e){for(var t=0;0===e.g;){if(0===e.i)return t;oi(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||0===e.i)break;oi(e)}return t}function os(e){or(e,1+oo(e))}function ou(e){var t=oo(e);return oa(e,t+1)-1}function ol(e){return 1&(e=ou(e))?1+e>>>1:-1*(e>>>1)}function oc(e){return 1===oa(e,1)}function od(e){return oa(e,8)}function oh(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=ol(e))+256)%256),n=0===i?n:i}function op(){this.K=null,this.M=!1,this.C=this.N=null,this.m=[],this.j=[],this.g=[],this.G=this.H=null,this.l=[],this.i=[],this.h=[],this.I=null,this.u=[],this.o=[],this.D=this.J=this.B=null}function of(e,t,n){return ti(e,t[n],n+1<t.length?t[n+1]:e.length)}function og(e,t,n){if(t.byteLength<9||(t[0]<<16|t[1]<<8|t[2])!=1)return null;var i=t[4]<<8|t[5];if(i&&i>n-6)return null;var r=null,a=null,o=t[7];if(t.byteLength<ov(t))return null;if(192&o){r=(14&t[9])*0x20000000+(255&t[10])*4194304+(254&t[11])*16384+(255&t[12])*128+(254&t[13])/2;var s=null;64&o&&(r=ow(r,s=(14&t[14])*0x20000000+(255&t[15])*4194304+(254&t[16])*16384+(255&t[17])*128+(254&t[18])/2)),null==e.B&&(e.B=r),r=ow(r,e.B),a=e.B=r,null!=s&&(a=ow(s,r))}return n<=(e=t[8]+9)?null:{packetLength:i,Hk:e,pts:r,dts:a}}function om(e,t){return(e=og(e,t,t.byteLength))?{data:t.subarray(e.Hk),packetLength:e.packetLength,pts:e.pts,dts:e.dts,nalus:[]}:null}function ov(e){return 64&(e=e[7])?19:192&e?14:9}function oy(e){return null==e.pts||null==e.dts?null:Math.min(e.dts,e.pts)/9e4}function ob(e){var t=e.od();return t.length>1&&(e=t[0].pts,!isNaN((t=t[1].pts)-e))?String(Math.abs(1/(t-e)*9e4)):null}function ow(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>0x100000000;)e+=0x200000000*n;return e}function oT(e){return!(0>ox(e))}function ox(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;var i=e.indexOf(71,n+1);n=i>=0&&i<t?i:n+1}return -1}H("shaka.util.Id3Utils",a3),a3.getID3Data=a7,a3.getID3Frames=a9,H("shaka.util.ExpGolomb",on),(p=op.prototype).clearData=function(){this.m=[],this.j=[],this.g=[],this.l=[],this.i=[],this.h=[],this.u=[],this.o=[]},p.Gf=function(e){null!=this.D&&this.D!=e&&(this.B=null),this.D=e},p.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,ox(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((48&e[r+3])>>4>1){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.K=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.K:a&&(s+=e[s]+1),o={audio:-1,video:-1,bf:-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(c>0)for(var d=s+5,h=c;h>2;){var p=a[d+1]+2;switch(a[d]){case 5:var f=d+2;f=a[f]<<24|a[f+1]<<16|a[f+2]<<8|a[f+3],-1==o.audio&&0x4f707573===f?(o.audio=l,o.audioCodec="opus"):-1==o.video&&0x41563031===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.J={channelCount:(15&f)==0?2:15&f,sj: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.bf&&(o.bf=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.N=a.video,this.C=a.videoCodec),-1!=a.audio&&(this.H=a.audio,this.G=a.audioCodec),-1!=a.bf&&(this.I=a.bf),i&&!this.M&&(i=!1,r=t-188),this.M=!0;break;case this.N:s=e.subarray(s,r+188),a?(this.j.push(this.m.length),this.m.push(s)):this.j.length&&this.m.push(s);break;case this.H:s=e.subarray(s,r+188),a?(this.i.push(this.l.length),this.l.push(s)):this.i.length&&this.l.push(s);break;case this.I:s=e.subarray(s,r+188),a?(this.o.push(this.u.length),this.u.push(s)):this.o.length&&this.u.push(s);break;default:i=!0}}return this},p.Gk=function(e){return ep("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Yg(e,{ee:null,state:null})},p.Yg=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.C&&(r=2);var a=t.state||0,o=a,s=0,u=[],l=-1,c=0,d="hvc"===this.C;for(-1==a&&(l=0,c=d?e[0]>>1&63:31&e[0],a=0,s=1);s<i;){var h=e[s++];a?1===a?a=2*!h:h?1==h?(h=s-a-1,l>=0?u.push({data:e.subarray(l+r,h),fullData:e.subarray(l,h),type:c,time:n,state:null}):(a=u.length?u[u.length-1]:t.ee)&&(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)),h>0&&(h=e.subarray(0,h),a.data=tn(a.data,h),a.fullData=tn(a.fullData,h),a.state=0)),s<i?(c=d?e[s]>>1&63:31&e[s],l=s,a=0):a=-1):a=0:a=3:a=+!h}return l>=0&&a>=0&&u.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:a}),!u.length&&t.ee&&(n=u.length?u[u.length-1]:t.ee)&&(n.data=tn(n.data,e),n.fullData=tn(n.fullData,e)),t.state=a,u},p.getMetadata=function(){for(var e=[],t=0;t<this.o.length;t++){var n=of(this.u,this.o,t);(n=om(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:a9(n.data),dts:n.dts,pts:n.pts})}return e},p.rb=function(){if(this.i.length&&!this.h.length)for(var e=0;e<this.i.length;e++){var t=of(this.l,this.i,e),n=om(this,t),i=this.h.length?this.h[this.h.length-1]:null;n&&null!=n.pts&&null!=n.dts&&(!i||i.pts!=n.pts&&i.dts!=n.dts)?this.h.push(n):this.h.length&&(t=n?n.data:t)&&((i=this.h[this.h.length-1]).data=tn(i.data,t))}return this.h},p.od=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=0;t<this.j.length;t++){var n=of(this.m,this.j,t),i=om(this,n),r=this.g.length?this.g[this.g.length-1]:null;i&&null!=i.pts&&null!=i.dts&&(!r||r.pts!=i.pts&&r.dts!=i.dts)?this.g.push(i):this.g.length&&(n=i?i.data:n)&&((r=this.g[this.g.length-1]).data=tn(r.data,n))}if(e){for(t={ee:null,state:null},r=[],i=(n=x(this.g)).next();!i.done;i=n.next())(i=i.value).nalus=this.Yg(i,t),i.nalus.length&&(r.push(i),t.ee=i.nalus[i.nalus.length-1]);this.g=r}}return e?this.g:(e=this.g,this.g=[],e)},p.getStartTime=function(e){if("audio"==e)e=this.rb();else{if("video"!=e)return null;e=this.od(!1)}return e.length?oy(e[0]):null},p.Td=function(){return{audio:this.G,video:this.C}},p.Ze=function(){for(var e=[],t=x(this.od()),n=t.next();!n.done;n=t.next())e.push.apply(e,S(n.value.nalus));return e},p.fk=function(){ep("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Jg();return{height:e.height,width:e.width}},p.Jg=function(){return"hvc"==this.C?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ze();if(!n.length||!(n=n.find(function(e){return 33==e.type})))return t;var i=new on(n.fullData,!0);od(i),od(i),oa(i,4);var r=oa(i,3);oc(i);var a=oa(i,2),o=oa(i,1),s=oa(i,5),u=oa(i,32);n=od(i);for(var l=od(i),c=od(i),d=od(i),h=od(i),p=od(i),f=od(i),g=[],m=[],v=0;v<r;v++)g.push(oc(i)),m.push(oc(i));if(r>0)for(v=r;v<8;v++)oa(i,2);for(v=0;v<r;v++)g[v]&&oa(i,88),m[v]&&od(i);ou(i),3==(r=ou(i))&&oa(i,1),g=ou(i),m=ou(i);var y=v=0,b=0,w=0;return oc(i)&&(v+=ou(i),y+=ou(i),b+=ou(i),w+=ou(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;n<32;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=ob(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ze();if(!n.length||!(n=n.find(function(e){return 7==e.type})))return t;var i=od(n=new on(n.data)),r=od(n),a=od(n);if(os(n),oS.includes(i)){var o=ou(n);if(3===o&&or(n,1),os(n),os(n),or(n,1),oc(n)){o=3!==o?8:12;for(var s=0;s<o;s++)oc(n)&&(s<6?oh(n,16):oh(n,64))}}if(os(n),0===(o=ou(n)))ou(n);else if(1===o)for(or(n,1),os(n),os(n),o=ou(n),s=0;s<o;s++)os(n);os(n),or(n,1),o=ou(n),s=ou(n);var u=oa(n,1);0===u&&or(n,1),or(n,1);var l=0,c=0,d=0,h=0;return oc(n)&&(l=ou(n),c=ou(n),d=ou(n),h=ou(n)),t.height=String((2-u)*(s+1)*16-2*d-2*h),t.width=String((o+1)*16-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=ob(e),t}(this)},H("shaka.util.TsParser",op),op.syncOffset=ox,op.probe=oT,op.prototype.getVideoInfo=op.prototype.Jg,op.prototype.getVideoResolution=op.prototype.fk,op.prototype.getVideoNalus=op.prototype.Ze,op.prototype.getCodecs=op.prototype.Td,op.prototype.getStartTime=op.prototype.getStartTime,op.prototype.getVideoData=op.prototype.od,op.prototype.getAudioData=op.prototype.rb,op.prototype.getMetadata=op.prototype.getMetadata,op.prototype.parseNalus=op.prototype.Yg,op.prototype.parseAvcNalus=op.prototype.Gk,op.prototype.parse=op.prototype.parse,op.prototype.setDiscontinuitySequence=op.prototype.Gf,op.prototype.clearData=op.prototype.clearData,op.Timescale=9e4;var oS=[100,110,122,244,44,83,86,118,128,138,139,134];function oA(e,t,n,i,r){var a=this;this.g=e,this.O=n,this.B=i,this.aa=t,this.l=new Map,this.D=new Map,this.Ka=new Map,this.h=null,this.Ha=!1,this.C=r||null,this.m=new Map,this.u=new er,this.j=new Map,this.J=null,this.M=new i$,this.Ca="",this.ib=!1,this.za=!0,this.N=!1,this.K=this.X=null,this.i=ok(this,this.M),this.Ua=this.H=!1,this.G=new rc(function(){var e,t,n,i,r,o,s,u,l,c,d,h,p;return e=a,P(function(a){if(1==a.h){for(t=[],i=(n=x(e.m)).next();!i.done;i=n.next())for(o=(r=x(i.value)).next().value,u=(s=r.next().value)[0],l=o,e.m.set(l,s.slice(0,1)),u&&t.push(u.p.catch(ii)),d=(c=x(s.slice(1))).next();!d.done;d=c.next())d.value.p.reject(new eJ(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),a.g(Promise.all(t),2)}for(p=(h=x(e.j.values())).next();!p.done;p=h.next())p.value.destroy();e.u&&(e.u.release(),e.u=null),e.g&&(oI(e),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.X=null,e.K=null,e.B=null,e.i=null,e.h=null,e.aa=null,e.l.clear(),e.Ka.clear(),e.j.clear(),e.J=null,e.m.clear(),e.C=null,e.$.clear(),e.O=null,a.j()})}),this.I=!1,this.P="UNKNOWN",this.eb=this.hb=!1,this.ab=new i$,this.o=!1,this.ya=null,this.$=new Map,this.qa=this.S=this.va=this.T=null,this.ia=new i$,this.g.remote&&(this.N="disconnected"!=this.g.remote.state,this.u.F(this.g.remote,"connect",function(){a.N="disconnected"!=a.g.remote.state}),this.u.F(this.g.remote,"connecting",function(){a.N="disconnected"!=a.g.remote.state}),this.u.F(this.g.remote,"disconnect",function(){a.N="disconnected"!=a.g.remote.state}))}function ok(t,n){if(t.za=!0,e.ManagedMediaSource){t.K||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.u.F(i,"startstreaming",function(){t.za=!0}),t.u.F(i,"endstreaming",function(){t.za=!1})}else i=new MediaSource;return t.u.Ba(i,"sourceopen",function(){URL.revokeObjectURL(t.Ca),n.resolve()}),t.u.Ba(t.g,"playing",function(){t.ib=!0}),t.Ca=oZ(i),oI(t),t.B.useSourceElements?(t.X=aQ(t.Ca),t.g.appendChild(t.X),t.K&&t.g.appendChild(t.K),t.g.load()):t.g.src=t.Ca,i}function oI(e){if(e.g){var t,n;e.g.removeAttribute("src"),(null==(t=e.X)?void 0:t.parentElement)===e.g&&e.g.removeChild(e.X),(null==(n=e.K)?void 0:n.parentElement)===e.g&&e.g.removeChild(e.K)}}function oE(e,t,n,i){"audio"==t&&i&&(i=iA(i,n.mimeType)),"video"==t&&i&&"video/mp4"==n.mimeType&&(i=ik(i));
1var r=nq(n.mimeType,i);if(t==tc)oM(e,r,e.I,n.external);else{var a=e.B.forceTransmux;(!at(r)||!e.I&&n1.includes(r))&&(a=!0);var o=nz(n.mimeType,i);if(a){if(a=tu("audio",(i||"").split(",")),i=tu("video",(i||"").split(",")),a&&i){e.o=!0,oE(e,"audio",n,a),oE(e,"video",n,i);return}(i=n_(o))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,o))}o=r+e.B.addExtraFeaturesToSourceBuffer(r),rd(e.G);try{var s=e.i.addSourceBuffer(o)}catch(t){throw new eJ(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.I&&(s.mode=o0),e.u.F(s,"error",function(){var n=e.m.get(t)[0];n.p.reject(new eJ(2,3,3014,e.g.error?e.g.error.code:0,n.uri))}),e.u.F(s,"updateend",function(){return oq(e,t)}),e.l.set(t,s),e.D.set(t,r),e.Ka.set(t,!!n.drmInfos.length)}}function oC(e){return e.za&&!e.N&&!e.H}function oM(e,t,n,i){e.h||(e.h=new n2(e.aa),e.h&&(e.h.C=e.B.modifyCueCallback));var r=e.h,a=e.Ha;e=e.P,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=n9.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):ep("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):ep("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.G=a,r.B=i)}function oD(e){return!e.H&&(!e.i||"ended"==e.i.readyState)}function oR(e){return!e.H&&(!e.i||"closed"==e.i.readyState)}function oL(e,t){return e.l.size?t==tc?e.h.g:az(oj(e,t)):null}function oP(e,t){return e.l.size?t==tc?e.h.h:aW(oj(e,t)):null}function oN(e,t,n){return t==tc?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):aY(e=oj(e,t),n)}function oj(e,t){if(e.H||e.N||oR(e))return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function oO(e,t,n,i,r,a,o,s,u,l,c){var d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M,D;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,P(function(R){switch(R.h){case 1:if(t!=(d=td).Pa){R.A(2);break}if("HLS"!=e.P){R.A(3);break}return R.g(e.ab,4);case 4:h=R.i,e.h.u=h;case 3:var L,N,j,O,U,_,B,F,V,H,G,K,q;return R.g((L=e.h,N=n,j=i?i.startTime:null,O=i?i.endTime:null,U=i?i.R()[0]:null,P(function(e){if(1==e.h)return e.g(Promise.resolve(),2);if(!L.i||!L.l)return e.return();if(null==j||null==O)return L.i.parseInit(eO(N)),e.return();for(_=L.B?0:L.u,B=L.G||L.B?j:L.u,F={periodStart:_,segmentStart:j,segmentEnd:O,vttOffset:B},G=(H=x(V=L.i.parseMedia(eO(N),F,U,[]))).next();!G.done;G=H.next())K=G.value,L.C(K,U||null,F);q=V.filter(function(e){return e.startTime>=L.m&&e.startTime<L.o}),L.l.append(q),null==L.g&&(L.g=Math.max(j,L.m)),L.h=Math.min(O,L.o),e.j()})),5);case 5:case 8:return R.return();case 2:if(l||!e.o){R.A(6);break}return R.g(oO(e,d.Z,n,i,r,a,o,s,u,!0),7);case 7:return R.g(oO(e,d.ua,n,i,r,a,o,s,u,!0),8);case 6:if(!e.l.has(t))return R.return();if(p=e.l.get(t).timestampOffset,f=e.D.get(t),e.j.has(t)&&(f=e.j.get(t).getOriginalMimeType()),i&&(m=(g=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s=null,u=[],l=eO(n);if(n1.includes(a))(n=a9(l)).length&&i&&((o=n.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&"number"==typeof o.data&&(s=Math.round(o.data)/1e3),e.O.onMetadata([{cueTime:i.startTime,data:l,frames:n,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.ba){l=new ry;var c=null!=r.emsgSchemeIdUris&&r.emsgSchemeIdUris.length>0||e.B.dispatchAllEmsgBoxes,d=[];c&&l.ma("emsg",function(t){e:{var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.yd(),o=t.reader.yd(),s=t.reader.V(),u=t.reader.V(),l=t.reader.V(),c=t.reader.V(),h=i.startTime+u/s;else s=t.reader.V(),u=(h=t.reader.zd()/s+i.timestampOffset)-i.startTime,l=t.reader.V(),c=t.reader.V(),a=t.reader.yd(),o=t.reader.yd();if(t=t.reader.Nb(t.reader.getLength()-t.reader.Ra(),!0),n&&n.includes(a)||e.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==a)e.O.Fk();else{n=h,("https://aomedia.org/emsg/ID3"!==a||0xffffffff!==l)&&(n+=l/s),s={startTime:h,endTime:n,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t};break e}s=null}s&&d.push(s)});var h=i.ba.timescale;t=h&&!isNaN(h);var p=0,f=!1;for(t&&l.ma("prft",function(t){var n=t.reader,i=t.version;n.V(),t=1e3*(t=n.V())+n.V()/0x100000000*1e3,n=0===i?n.V():0x100000000*(i=n.V())+(n=n.V()),t=ot(t),n=new i3("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/h*1e3)})),e.O.onEvent(n)}).boxes(["moof","traf"],rb).ma("tfdt",function(e){f||(p=aa(e.reader,e.version).baseMediaDecodeTime/h,f=!0,c||e.parser.stop())}),(c||t)&&l.parse(n,!1,o),f&&0==i.timestampOffset&&(s=p),n=(l=x(d)).next();!n.done;n=l.next())!function(e,t,n,i){var r=oe(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);i&&"HLS"==e.P&&!r&&(n=-i+n.startTime,t.startTime+=n,t.endTime+=n),e.O.Dk(t),!t.messageData||"https://aomedia.org/emsg/ID3"!=t.schemeIdUri&&"https://developer.apple.com/streaming/emsg-id3"!=t.schemeIdUri||(n=a9(t.messageData)).length&&(i=t.startTime,e.O.onMetadata([{cueTime:i,data:t.messageData,frames:n,dts:i,pts:i}],0,t.endTime))}(e,n.value,i,s)}else a.includes("/mp4")||a.includes("/webm")||!oT(l)||(e.$.has(t)||e.$.set(t,new op),(u=e.$.get(t)).clearData(),u.Gf(i.i),u.parse(l),null!=(l=function(e,t){if("audio"==t){t=e.l;var n=e.i}else{if("video"!=t)return null;t=e.m,n=e.j}for(var i=0;i<n.length;i++){var r=n[i],a=i+1<n.length?n[i+1]:t.length,o=t[r];if(o){for(var s=0,u=r;u<a;u++)s+=t[u].byteLength;if((s=og(e,r=o.byteLength>=9&&o.byteLength>
1=ov(o)?o:ti(t,r,a),s))&&null!=(s=oy(s)))return s}}return null}(u,t))&&(s=l),u=u.getMetadata());return{timestamp:s,metadata:u}}(e,t,n,i,r,f,u)).timestamp,v=g.metadata,null!=m&&(null==e.T&&t==d.ua&&(e.T=m,e.va=i.startTime,null!=e.S&&(y=0,e.va==e.qa&&(y=e.T-e.S),e.ia.resolve(y))),null==e.S&&t==d.Z&&(e.S=m,e.qa=i.startTime,null!=e.T&&(b=0,e.va==e.qa&&(b=e.T-e.S),e.ia.resolve(b))),w=m,T=n1,!e.I&&T.includes(e.D.get(t))&&(w=0),A=i.startTime-w,(Math.abs(p-A)>=.001||o||s)&&(!u||A>0||!p)&&(p=A,e.eb&&(oz(e,t,function(){return oH(e,t)},null),oz(e,t,function(){return oG(e,t,p)},null))),t!=d.ua&&e.l.has(d.ua)||e.ab.resolve(p)),v.length)&&e.O.onMetadata(v,p,i?i.endTime:null),a&&t==d.ua&&(e.h||oM(e,"application/cea-608",e.I,!1),e.J||(e.J=new tA(f.split(";",1)[0])),i?(k=tk(e.J,n)).length&&function(e,t,n){var i=new Map;t=x(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value;r=a.stream,a=a.cue,i.has(r)||i.set(r,[]),function e(t,n,i){n.startTime+=i,n.endTime+=i,n=x(n.nestedCues);for(var r=n.next();!r.done;r=n.next())e(t,r.value,i)}(e,a,n),a.startTime>=e.m&&a.startTime<e.o&&(i.get(r).push(a),r==e.D&&e.l.append([a]))}for(t=(n=x(i.keys())).next();!t.done;t=n.next())for(t=t.value,e.j.has(t)||e.j.set(t,[]),a=(r=x(i.get(t))).next();!a.done;a=r.next())a=a.value,e.j.get(t).push(a);n8(e)}(e.h,k,p):e.J.init(n,s,c)),!e.j.has(t)){R.A(9);break}return R.g(e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:ArrayBuffer.isView(I=R.i)?n=I:(null!=(E=I).init&&(C=E.init,oz(e,t,function(){e.C&&tg(e.C,C,p,r),e.l.get(t).appendBuffer(C)},i?i.R()[0]:null)),n=E.data);case 9:if(n=function(e,t,n,i,r){if("mp4"!=nX(e.D.get(r)))return n;var a,o,s,u,l=null===i,c=e.Ka.get(r),d=e.O.Nj(),h=!1;i&&i.ba&&(h=i.ba.encrypted),i=i?i.R()[0]:null;var p=eu();return e.B.correctEc3Enca&&l&&"audio"===r&&(a=eO(a=n),o=null,(new ry).boxes(["moov","trak","mdia","minf","stbl"],rb).ma("stsd",rw).box("enca",function(e){return o=e.reader.h,rx(e)}).box("sinf",rb).box("frma",function(e){e.parser.stop(),"ec-3"===al(e.reader).codec&&o&&2!==o.getUint16(16)&&o.setUint16(16,2)}).parse(a),n=a),e.B.insertFakeEncryptionInInit&&c&&p.Bd(d,r)&&(l?n=function(e,t,n){var i,r=t=eO(t),a=!1,o=[],s=[];if((new ry).boxes(["moov","trak","mdia","minf","stbl"],function(e){o.push(e),rb(e)}).ma("stsd",function(e){i=e,o.push(e),rw(e)}).boxes(["encv","enca"],function(e){a=!0,e.parser.stop()}).boxes("dvav dva1 dvh1 dvhe dvc1 dvi1 hev1 hvc1 avc1 avc3".split(" "),function(e){s.push({box:e,Ai:0x656e6376})}).boxes("ac-3 ec-3 ac-4 Opus fLaC mp4a".split(" "),function(e){s.push({box:e,Ai:0x656e6361})}).parse(t),a)return t;if(0==s.length||!i)throw tt(t),new eJ(2,3,3019,n);s.reverse(),n=x(s);for(var u=n.next();!u.done;u=n.next())u=u.value,r=function(e,t,n,i,r,a){var o=ay(e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),e_(e).setUint32(4,a),e.set(o,i.size),a_(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=eu().df()?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=x(r)).next();!r.done;r=t.next())a_(a,(r=r.value).start,r.size+e.byteLength);return e=e_(a,n.start),n=rI(n),t=e.getUint32(n),e.setUint32(n,t+1),a}(e,r,i,u.box,o,u.Ai);return r=function(e,t){if(0===(e=av(e)).byteLength)return t;var n=0,i=0;(new ry).box("moov",function(e){n=e.start,i=e.size,e.parser.stop()}).parse(t);var r=n+i;a_(t,n,i+e.byteLength);var a=new Uint8Array(t.byteLength+e.byteLength),o=t.subarray(r);return a.set(t.subarray(0,r)),a.set(e,r),a.set(o,r+e.byteLength),a}(e,r),eu().hh()?((e=new Uint8Array(t.byteLength+r.byteLength)).set(r),e.set(t,r.byteLength),e):r}(t,n,i):!h&&p.Ji(r)&&(n=function(e){e=eO(e);var t=[];(new ry).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){var t,n,i,r,a=[];if((new ry).boxes(["moof","traf"],function(e){a.push(e),rb(e)}).ma("tfhd",function(e){t=e,i=ar(e.reader,e.flags)}).ma("trun",function(e){n=e,r=as(e.reader,e.version,e.flags)}).parse(e),i&&2!==i.Ni){var o=t.start+rI(t)+4+8*(null!==i.pj),s=e_(e);if(null!==i.Ni)s.setUint32(o,2);else{a_(e,t.start,t.size+4);var u=s.getUint32(t.start+8);s.setUint32(t.start+8,2|u),r&&null!==r.lg&&s.setInt32(n.start+rI(n)+4,r.lg+4),u=e.subarray(0,o),s=e.subarray(o),(e=new Uint8Array(e.byteLength+4)).set(u),u=[];for(var l=3;l>=0;l--)u.push(2>>8*l&255);for(e.set(new Uint8Array(u),o),e.set(s,o+4),s=(o=x(a)).next();!s.done;s=o.next())a_(e,(s=s.value).start,s.size+4)}}return e}(e.subarray(r?r.start+r.size:0,a.start+a.size)))}return tn.apply(e6,S(n))}(n))),l&&p.le()&&(s=eO(n),u=[],(new ry).boxes(["moov","trak","mdia","minf","stbl"],function(e){u.push({start:e.start,size:e.size}),rb(e)}).box("stsd",function(e){u.push({start:e.start,size:e.size});for(var t=e_(s,e.start),n=0;n<e.size-3;n++){var i=t.getUint32(n);0x61632d33==i?t.setUint32(n,0x65632d33):0x64616333==i&&t.setUint32(n,0x64656333)}}).parse(s),n=s),n}(e,r,n,i,t),!i||!e.I||t==d.Pa||!o&&!s){R.A(11);break}if(M=i.startTime,"HLS"!=e.P||e.o||t!=d.Z||!e.l.has(d.ua)){R.A(13);break}return R.g(e.ia,14);case 14:Math.abs(D=R.i)>.15&&(M-=D);case 13:oz(e,t,function(){return oH(e,t)},null),oz(e,t,function(){return oG(e,t,M)},null);case 11:return R.g(oz(e,t,function(){var i=n;e.C&&tg(e.C,i,p,r),e.l.get(t).appendBuffer(i)},i?i.R()[0]:null),15);case 15:R.j()}})}function oU(e,t){var n;return P(function(i){return 1==i.h?t==(n=td).Pa?e.h?i.g(e.h.remove(0,1/0),0):i.return():t===n.ua&&e.J&&e.h?i.g(e.h.remove(0,1/0,!0),4):i.A(4):6!=i.h?i.g(oz(e,t,function(){return oV(e,t,0,e.i.duration)},null),6):e.o?i.g(oz(e,n.Z,function(){return oV(e,n.Z,0,e.i.duration)},null),0):i.A(0)})}function o_(e,t,n,i,r,a,o,s,u){var l,c;return P(function(d){if(1==d.h){var h,p,f,g,m,v,y,b,w,T,x,S;if(t==(l=td).Pa){return a||(e.h.u=n),h=e.h,h.m=i,h.o=r,d.return()}return c=[],d.g((p=e,f=t,g=o,m=s,v=u,P(function(e){if(1==e.h){if(y=td,w=(b=oQ(p,f,g,m,v)).type,T=b.ec,x=b.tf,(S=v.get(y.Z))&&(p.o=S.isAudioMuxedInVideo),w==o1)return p.j.has(f)&&!T?(p.j.get(f).destroy(),p.j.delete(f)):!p.j.has(f)&&T?p.j.set(f,T):T&&(p.j.has(f)&&p.j.get(f).transmux!==T.transmux?(p.j.get(f).destroy(),p.j.set(f,T)):T.destroy()),e.return(!1);if(w==o4)return e.g(oz(p,f,function(){if(f!==tc){if(p.D.get(f),eu().xb()){p.j.has(f)&&(p.j.get(f).destroy(),p.j.delete(f)),T&&p.j.set(f,T);var e=x+p.B.addExtraFeaturesToSourceBuffer(x);p.l.get(f).changeType(e),p.D.set(f,x)}oq(p,f)}},null),3);return w!=o2?e.A(3):(T&&T.destroy(),e.g(oJ(p,v),3))}return e.return(!0)})),2)}return d.i||(c.push(oz(e,t,function(){return oH(e,t)},null)),e.o&&c.push(oz(e,l.Z,function(){return oH(e,l.Z)},null))),a||(c.push(oz(e,t,function(){return oG(e,t,n)},null)),e.o&&c.push(oz(e,l.Z,function(){return oG(e,l.Z,n)},null))),(0!=i||r!=1/0)&&(c.push(oz(e,t,function(){return oK(e,t,i,r)},null)),e.o&&c.push(oz(e,l.Z,function(){return oK(e,l.Z,i,r)},null))),c.length?d.g(Promise.all(c),0):d.A(0)})}
1function oB(e,t,n){var i,r;return P(function(a){return 1==a.h?t==(i=td).Pa||(t==i.ua&&(e.ab=new i$),!e.I||(r=oP(e,t))&&.15>Math.abs(r-n))?a.return():(oz(e,t,function(){return oH(e,t)},null),e.o&&oz(e,i.Z,function(){return oH(e,i.Z)},null),a.g(oz(e,t,function(){return oG(e,t,n)},null),2)):e.o?a.g(oz(e,i.Z,function(){return oG(e,i.Z,n)},null),0):a.A(0)})}function oF(e){P(function(t){return e.G.g||e.g.error||e.N||e.H||oD(e)||oR(e)?t.return():t.g(oW(e,function(){oD(e)||oR(e)||e.i.clearLiveSeekableRange()}),0)})}function oV(e,t,n,i){if(i<=n)oq(e,t);else{if(e.C){var r=e.C;"video"===t&&r.g&&r.g.flushBuffer(n,i)}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,oq(e,t)}function oG(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,oq(e,t)}function oK(e,t,n,i){var r=e.l.get(t);(r.appendWindowEnd!==i||r.appendWindowStart!==n)&&(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),oq(e,t)}function oq(e,t){if(e.H||e.G.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),oX(e,t))}function oz(e,t,n,i){return rd(e.G),n={start:n,p:new i$,uri:i},e.m.get(t).push(n),1==e.m.get(t).length&&oY(e,t),n.p}function oW(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v;return P(function(y){switch(y.h){case 1:for(rd(e.G),n=[],i=Array.from(e.l.keys()),r=new Map,o=(a=x(i)).next(),s={};!o.done;s={ready:void 0},o=a.next())u=o.value,s.ready=new i$,l={start:function(e){return function(){return e.ready.resolve()}}(s),p:s.ready,uri:null},(c=e.m.get(u)).push(l),n.push(s.ready),r.set(u,l),1==c.length&&l.start();return y.m(2),y.g(Promise.all(n),4);case 4:y.o(3);break;case 2:if(d=y.l(),e.G.g){for(p=(h=x(i)).next();!p.done;p=h.next())f=p.value,g=e.m.get(f),r.has(f)&&Z(g,r.get(f));return y.return()}throw d;case 3:return y.m(5,6),y.g(t(),6);case 6:for(y.u(),v=(m=x(i)).next();!v.done;v=m.next())oX(e,v.value);y.B(0);break;case 5:throw new eJ(2,3,3015,y.l(),e.g.error||"No error in the media element",null)}})}function oX(e,t){e.m.get(t).shift(),oY(e,t)}function oY(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new eJ(2,3,3017,t)):oC(e)?n.p.reject(new eJ(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new eJ(2,3,3024,t)),oX(e,t)}}function oJ(e,t){return oW(e,function(){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w;return P(function(T){if(1==T.h){if(e.H||e.N)return T.return();for(n=td,e.H=!0,e.o=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.Ua=!0),e.ib&&(e.g.autoplay=!1),T.D(2),e.u.Sa(),o=(a=x(e.j.values())).next();!o.done;o=a.next())o.value.destroy();for(u=(s=x(e.l.values())).next();!u.done;u=s.next()){l=u.value;try{e.i.removeSourceBuffer(l)}catch(e){}}return e.j.clear(),e.l.clear(),c=e.i.duration,e.M=new i$,e.i=ok(e,e.M),T.g(e.M,4)}if(2!=T.h){for(!isNaN(c)&&c?e.i.duration=c:!isNaN(e.ya)&&e.ya&&(e.i.duration=e.
1ya),d=new i$,h=e.i.sourceBuffers,p=t.size,f=0,g=function(){++f===p&&(d.resolve(),e.u.Oa(h,"addsourcebuffer",g))},e.u.F(h,"addsourcebuffer",g),v=(m=x(t.keys())).next();!v.done;v=m.next())y=v.value,b=t.get(y),oE(e,y,b,b.codecs);return(w=t.get(n.Z))&&w.isAudioMuxedInVideo&&(e.o=!0),e.o&&!e.m.has(n.Z)&&e.m.set(n.Z,[]),T.g(d,2)}return T.u(),e.H=!1,rd(e.G),e.u.Ba(e.g,"loadedmetadata",function(){e.G.g||(e.g.currentTime=i)}),e.u.Ba(e.g,"canplaythrough",function(){e.G.g||(e.g.autoplay=r,e.Ua&&(e.Ua=!1,e.g.play()))}),T.B(0)})})}function o$(e,t,n,i){var r=!1,a=tu("audio",(i||"").split(",")),o=tu("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i);var u=nq(n,s),l=n$(e.D.get(t)),c=e.B.forceTransmux;if(!at(u)||!e.I&&n1.includes(u)?c=!0:c||n==l||(c=!eu().Jf()&&n1.includes(n)),c&&(s=n_(e=nz(n,s)))){var d=s();a&&o&&(r=!0),u=d.convertCodecs(t,e)}return!d&&"video"===t&&a&&(u=nq(n,i)),t=nY(nQ(u)),{ec:d,jl:r,Qh:n$(u),codec:t,mimeType:u}}function oQ(e,t,n,i,r){if(t==tc)return{type:o1,tf:n,ec:null};var a=nY(nQ(e.D.get(t))),o=n$(e.D.get(t)),s=o$(e,t,n,i),u=s.ec,l=s.jl,c=s.Qh,d=s.codec;s=s.mimeType;var h=!0;return(l&&e.D.has("audio")&&(n=o$(e,"audio",n,i),i=nY(nQ(e.D.get("audio"))),h=n$(e.D.get("audio")),h=i==n.codec&&h==n.Qh,n.ec&&n.ec.destroy()),a===d&&o===c&&h)?{type:o1,tf:s,ec:u}:(a=!0,(e.o&&!r.has("audio")||l&&u&&!e.j.has(t))&&(a=!1),t=eu(),a&&"smooth"===e.B.codecSwitchingStrategy&&t.xb())?{type:o4,tf:s,ec:u}:(u&&u.destroy(),{type:o2,tf:s,ec:null})}(p=oA.prototype).destroy=function(){return this.G.destroy()},p.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,u,l,c=this;return P(function(d){if(1==d.h)return r=td,d.g(c.M,2);if(3!=d.h)return oD(c)||oR(c)?(W("Expected MediaSource to be open during init(); reopening the media source."),c.M=new i$,c.i=ok(c,c.M),d.g(c.M,3)):d.A(3);for(c.I=t,c.P=n,c.hb=i,c.eb=!c.I&&"HLS"==c.P&&!c.hb,c.$.clear(),c.T=null,c.va=null,c.S=null,c.qa=null,c.ia=new i$,o=(a=x(e.keys())).next();!o.done;o=a.next())s=o.value,u=e.get(s),oE(c,s,u,u.codecs),c.o?(c.m.set(r.Z,[]),c.m.set(r.ua,[])):c.m.set(s,[]);(l=e.get(r.Z))&&l.isAudioMuxedInVideo&&(c.o=!0),d.j()})},p.configure=function(e){this.B=e,this.h&&(this.h.C=e.modifyCueCallback)},p.Cc=function(){var e={total:this.H?[]:aJ(this.g.buffered),audio:aJ(oj(this,"audio")),video:aJ(oj(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},p.remove=function(e,t,n,i){var r,a,o=this;return P(function(s){return 1==s.h?(e==(r=td).ua&&o.J&&(o.J.remove(i),a=o.h.g||0,o.h.remove(a,n,!0)),e==r.Pa?s.g(o.h.remove(t,n),0):n>t?s.g(oz(o,e,function(){return oV(o,e,t,n)},null),5):s.A(0)):o.o?s.g(oz(o,r.Z,function(){return oV(o,r.Z,t,n)},null),0):s.A(0)})},p.flush=function(e){var t,n=this;return P(function(i){return 1==i.h?e==(t=td).Pa?i.return():i.g(oz(n,e,function(){n.g.currentTime-=.001,oq(n,e)},null),2):n.o?i.g(oz(n,t.Z,function(){var e=t.Z;n.g.currentTime-=.001,oq(n,e)},null),0):i.A(0)})},p.endOfStream=function(e){var t=this;return P(function(n){return n.g(oW(t,function(){oD(t)||oR(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},p.wb=function(e){var t=this;return P(function(n){return n.g(oW(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var n=x(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:new i$,uri:null};t.m.get(i).unshift(r)}t.i.duration=e,t.ya=e}),0)})},p.getDuration=function(){return this.i.duration};var oZ=e.URL.createObjectURL,o0="sequence",o1="none",o2="reset",o4="changeType";function o3(e,t,n){this.i=e,this.D=t,this.u=this.l=1/0,this.h=1,this.g=this.j=null,this.B=0,this.C=!0,this.J=!1,this.I=0,this.G=void 0===n||n,this.H=0,this.o=!1,this.m=e}function o5(e,t,n,i){var r=this;this.u=i,this.g=e,this.D=t,this.h=n,this.l=new er,this.o=!1,this.m=0,this.C=!1,this.H=this.G=0,this.j=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new o8(new o7(e.g),t,function(t,i,r){return P(function(t){if(1==t.h)return aJ(e.g.buffered).length?n?(e.g.currentTime+=n,t.A(2)):t.g(e.g.play(),3):t.return();if(2!=t.h){if(!e.g)return t.return();e.g.pause(),e.g.play()}0==r&&(e.H++,e.u(new i3("stalldetected"))),t.j()})})}(this),this.B=!1,this.l.F(e,"waiting",function(){return o6(r)}),this.i=new n7(function(){o6(r)}).Fa(this.h.gapJumpTimerTime)}function o6(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.o)return}else e.o=!1;if((!e.g.paused||e.g.currentTime==e.m&&(e.g.autoplay||e.g.currentTime!=e.m))&&(!e.j||!o9(e.j
1))){var t,n,i,r,a=e.g.currentTime,o=e.g.buffered,s=(i=o,r=e.h.gapDetectionThreshold,!i||!i.length||aq(i)?null:(i=aJ(i).findIndex(function(e,t,n){return e.start>a&&(0==t||n[t-1].end-a<=r)}))>=0?i:null);if(null==s&&e.j&&!o9(e.j)){for(var u=aJ(o),l=0;l<u.length-1;l++)if(.1>Math.abs(a-u[l].end)&&u[l+1].start>u[l].end){s=l+1;break}}null==s||0==s&&!e.B||(u=o.start(s),(l=e.h.gapPadding)&&(u=Math.ceil((u+l)*100)/100),u>=e.D.Eb()||u-a<.001||(0!=s&&o.end(s-1),t=e,n=u,t.C=!0,t.l.Ba(t.g,"seeked",function(){t.C=!1}),t.g.currentTime=n,a==e.m&&(e.m=u),e.G++,e.u(new i3("gapjumped"))))}}}function o8(e,t,n){this.i=e,this.u=se(e),this.h=e.g.currentTime,this.m=Date.now()/1e3,this.l=this.g=0,this.o=t,this.j=n}function o9(e){var t=e.i,n=se(t),i=t.g.currentTime,r=Date.now()/1e3;return(e.h!=i||e.u!=n)&&(e.m=r,e.h=i,e.u=n,e.g=0),(n=(i=r-e.m)>=e.o&&n&&e.g<3&&(0==e.g||r-e.l>=e.o))&&(e.j&&e.j(e.h,i,e.g),e.g++,e.l=r,e.h=t.g.currentTime),n}function o7(e){var t=this;this.g=e,this.h=new er,this.i=!1,this.h.F(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.F(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.F(this.g,"audiofocuslost",function(){t.i=!0})}function se(e){if(e.g.paused||0==e.g.playbackRate||e.i||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime,e=x(aJ(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 st(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=sn.value().get(t),n.Ba(e,t,i))}(p=o3.prototype).getDuration=function(){return this.l},p.Pj=function(){return this.h},p.Si=function(e){this.i=e},p.wb=function(e){this.l=e},p.Uj=function(){return this.i},p.Ri=function(e){this.B=e},p.Vc=function(e){e&&!this.C&&(this.J=!0),this.C=e},p.Hf=function(e){this.u=e},p.Ye=function(){return this.u},p.qh=function(e){this.D=e},p.Hj=function(){return this.D},p.Di=function(e,t){if(0!=e.length){var n=(Date.now()+this.B)/1e3;if(0!=(e=e.filter(function(e){return e.start+t<n})).length){var i=e[e.length-1].end+t;this.uf(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.G&&!this.o&&(this.i=n-this.g-this.h)}}},p.fe=function(e){if(0!=e.length){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.B)/1e3;e=x(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.uf(t),this.g=Math.max(this.g,n),null!=this.i&&this.G&&!this.o&&(this.i=i-this.g-this.h)}},p.Ci=function(e,t){this.uf(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},p.Qj=function(){return this.g},p.mf=function(){this.o=!0},p.rk=function(){return this.o},p.rh=function(e){this.m=e},p.Mj=function(){return this.m},p.uf=function(e){null==this.j?this.j=e:this.J||(this.j=Math.min(this.j,e))},p.Ug=function(e){this.h=Math.max(this.h,e)},p.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},p.U=function(){return this.l==1/0&&!this.C},p.Pc=function(){return this.l!=1/0&&!this.C},p.Fb=function(){return Math.max(this.I,this.Ec()-this.u)},p.Vi=function(e){this.I=e},p.Ec=function(){return this.U()||this.Pc()?Math.min(Math.max(0,(Date.now()+this.B)/1e3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l},p.Wd=function(e){var t=Math.max(this.j,this.I);return this.u==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Ec()-this.u+e,this.Eb()))},p.Ub=function(){return this.Wd(0)},p.Eb=function(){return Math.max(0,this.Ec()-(this.U()||this.Pc()?this.D:0))},p.ij=function(){return null!=this.i&&(null==this.g||!this.G)},p.Qi=function(e){this.H=e},p.Cj=function(){return this.H},H("shaka.media.PresentationTimeline",o3),o3.prototype.getAvailabilityTimeOffset=o3.prototype.Cj,o3.prototype.setAvailabilityTimeOffset=o3.prototype.Qi,o3.prototype.usingPresentationStartTime=o3.prototype.ij,o3.prototype.getSeekRangeEnd=o3.prototype.Eb,o3.prototype.getSeekRangeStart=o3.prototype.Ub,o3.prototype.getSafeSeekRangeStart=o3.prototype.Wd,o3.prototype.getSegmentAvailabilityEnd=o3.prototype.Ec,o3.prototype.setUserSeekStart=o3.prototype.Vi,o3.prototype.getSegmentAvailabilityStart=
1o3.prototype.Fb,o3.prototype.isInProgress=o3.prototype.Pc,o3.prototype.isLive=o3.prototype.U,o3.prototype.offset=o3.prototype.offset,o3.prototype.notifyMaxSegmentDuration=o3.prototype.Ug,o3.prototype.notifyMinSegmentStartTime=o3.prototype.uf,o3.prototype.getInitialProgramDateTime=o3.prototype.Mj,o3.prototype.setInitialProgramDateTime=o3.prototype.rh,o3.prototype.isStartTimeLocked=o3.prototype.rk,o3.prototype.lockStartTime=o3.prototype.mf,o3.prototype.getMaxSegmentEndTime=o3.prototype.Qj,o3.prototype.notifyPeriodDuration=o3.prototype.Ci,o3.prototype.notifySegments=o3.prototype.fe,o3.prototype.notifyTimeRange=o3.prototype.Di,o3.prototype.getDelay=o3.prototype.Hj,o3.prototype.setDelay=o3.prototype.qh,o3.prototype.getSegmentAvailabilityDuration=o3.prototype.Ye,o3.prototype.setSegmentAvailabilityDuration=o3.prototype.Hf,o3.prototype.setStatic=o3.prototype.Vc,o3.prototype.setClockOffset=o3.prototype.Ri,o3.prototype.getPresentationStartTime=o3.prototype.Uj,o3.prototype.setDuration=o3.prototype.wb,o3.prototype.setPresentationStartTime=o3.prototype.Si,o3.prototype.getMaxSegmentDuration=o3.prototype.Pj,o3.prototype.getDuration=o3.prototype.getDuration,o5.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.i&&(this.i.stop(),this.i=null),this.j&&(this.j.release(),this.j=null),this.g=this.D=this.u=null},o5.prototype.ud=function(){this.B=!0,this.i&&this.i.Fa(this.h.gapJumpTimerTime),o6(this)},o8.prototype.release=function(){this.i&&this.i.release(),this.j=this.i=null},o7.prototype.release=function(){this.h&&this.h.release(),this.h=null};var sn=new es(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function si(e,t,n,i){var r=this;this.g=e,this.o=t,this.B=n,this.m=null,this.l=function(){return null==r.m&&(r.m=i()),r.m},this.j=this.u=!1,this.h=new er,this.i=new su(e),st(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){so(r,r.l())})}function sr(e){return e.u?e.g.currentTime:e.l()}function sa(e,t){e.g.readyState>0?sl(e.i,t):st(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){so(e,e.l())})}function so(e,t){.001>Math.abs(e.g.currentTime-t)?ss(e):(e.h.Ba(e.g,"seeking",function(){ss(e)}),sl(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function ss(e){e.u=!0,e.h.F(e.g,"seeking",function(){(e.j||e.g.ended)&&e.g.paused&&e.g.pause(),e.j=!1,e.o()}),e.h.F(e.g,"ended",function(){e.j=!0}),e.h.F(e.g,"play",function(){e.j=!1}),e.B(e.g.currentTime)}function su(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new n7(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}function sl(e,t){var n=e.g.ended,i=e.g.paused;e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,n&&i&&e.g.pause(),e.h.Fa(.1)}function sc(e){this.g=e,this.i=!1,this.h=null,this.j=new er}function sd(e){return e.g.getStartDate&&!isNaN(e=e.g.getStartDate().getTime())?e/1e3:null}function sh(e,t){return(e=e.g.seekable).length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function sp(e,t,n,i,r,a){var o=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.i=new o5(e,t.presentationTimeline,n,a),this.j=new si(e,function(){e:{var e=o.i;e.o=!0,e.B=!1,e.i&&e.i.Fa(e.h.gapJumpTimerTime),o6(e);var t=sr(o.j);if(e=sm(o,t),!an()&&Math.abs(e-t)>.001){t=!1;var n=eu().Oi();if(n){var i=Date.now()/1e3;(!o.o||o.o<i-n)&&(o.o=i,t=!0)}else t=!0;if(t){sa(o.j,e),e=void 0;break e}}o.u(),e=void 0}return e},function(e){var t=o.i;t.g.seeking&&!t.o&&(t.o=!0,t.m=e),t.i&&t.i.Fa(t.h.gapJumpTimerTime),o6(t)},function(){return sf(o,i)}),this.m=new n7(function(){if(0!=o.h.readyState&&!o.h.paused){var e=sr(o.j),t=o.g.Ub(),n=o.g.Eb();n-t<3&&(t=n-3),e<t&&(e=sm(o,e),o.h.currentTime=e)}})}function sf(e,t){return null==t?t=e.g.getDuration()<1/0?e.g.Ub():e.g.Eb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):t<0&&(t=e.g.Eb()+t),sg(e,sv(e,t))}function sg(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function sm(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Ub
1(),a=e.g.Eb(),o=e.g.getDuration();a-r<3&&(r=a-3);var s=e.g.Wd(n),u=e.g.Wd(i);return n=e.g.Wd(n+i),t>=o?sg(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?e.g.U()&&e.l.returnToEndOfLiveWindowWhenOutside?a-e.l.safeSeekEndOffset:aX(e.h.buffered,u)?u:n:t>=s||aX(e.h.buffered,t)?t:n}function sv(e,t){var n=e.g.Ub();return t<n?n:t>(e=e.g.Eb())?e:t}function sy(e){this.g=e,this.m=null,this.i=0,this.o=!1}function sb(e,t,n){return new sy([e=new aV(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function sw(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function sT(){sy.call(this,[]),this.h=[]}function sx(e){var t=this;this.g=e,this.j=!1,this.h=this.g.Hg(),this.i=new n7(function(){t.g.isPaused()||t.g.Bk(.25*t.h)})}function sS(e){e.i.stop();var t=e.j?0:e.h;if(t>=0&&t<=16)try{e.g.Hg()!=t&&e.g.Ti(t);return}catch(e){}e.i.Fa(.25),0!=e.g.Hg()&&e.g.Ti(0)}function sA(e){var t=this;this.j=e,this.h=new er,this.g=new Set,this.i=new n7(function(){sk(t,!1)}).yb(),e.paused||this.i.Fa(.25),this.h.F(e,"playing",function(){t.i.yb().Fa(.25)}),this.h.F(e,"pause",function(){t.i.stop()}),this.h.F(e,"seeked",function(){t.i.yb(),e.paused||t.i.Fa(.25)})}function sk(e,t){var n=e.j.currentTime;e=x(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function sI(e){i8.call(this),this.g=new Map,this.h=e}function sE(e,t,n){return!!(e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n)}function sC(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 sM(e){i8.call(this),this.h=new Map,this.i=e,this.g=null}function sD(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 i3("regionadd",new Map([["region",t]])),e.dispatchEvent(t),(n=e).g||(n.g=new n7(function(){for(var e=n.i(),t=x(n.h),i=t.next();!i.done;i=t.next()){var r=x(i.value);i=r.next().value,(r=r.next().value).endTime<e.start&&(n.h.delete(i),i=new i3("regionremove",new Map([["region",r]])),n.dispatchEvent(i))}!n.h.size&&n.g&&(n.g.stop(),n.g=null)}).Fa(2)))}function sR(e,t,n,i,r){this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=i,this.u=r||function(e,t){return!t.fastSwitching||!e.Rc||!e.be}}function sL(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.h||(e.h=e.i.segmentIndex.Rb(t,!0,e.o)),!e.h))return Promise.resolve();for(n&&e.h.next(),t=[];e.g.size<e.m&&(n=e.h.next().value);){var i=!0;if(n.isPreload()&&null!=n.endByte&&(i=!1),2==n.Wb()&&(i=!1),n.Vb(!1)&&(i=!1),i&&n.ba&&t.push(sP(e,n.ba)),i&&!e.g.has(n)&&(i=new sB(e.l),t.push(sF(i,n,e.i)),e.g.set(n,i)),!e.u(n,e.i))break}return sO(e),Promise.all(t)}function sP(e,t){if(!e.i.segmentIndex||t.Vb()||Array.from(e.j.keys()).some(function(e){return aF(e,t)}))return Promise.resolve();var n=new sB(e.l),i=sF(n,t,e.i);return e.j.set(t,n),i}function sN(e,t){t=x(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&s_(e,n)}function sj(e,t){t=void 0===t||t,sN(e,e.g),t&&sN(e,e.j),e.h=null}function sO(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=x(e.j.keys()),i=n.next(),r={};!i.done;r={Mg:void 0},i=n.next())r.Mg=i.value,t.some(function(e){return function(t){return aF(t.ba,e.Mg)}}(r))||s_(e,r.Mg)}function sU(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var i=n.pop();i&&s_(e,i)}sO(e)}function s_(e,t){var n=e.g;t instanceof aB&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function sB(e){this.g=e,this.ge=this.yh=null}function sF(e,t,n){var i=[];return e.ge=e.g(t,n,function(t){var n;return P(function(r){return e.yh?(n=t,i.length>0&&(i.push(t),n=ti(i),i=[]),r.g(e.yh(n),0)):(i.push(t),r.return())})}),e.ge.promise.catch(function(e){return e instanceof eJ&&7001==e.code?Promise.resolve():Promise.reject(e)})}function sV(e){var t=n$(e);return{type:t.split("/")[0],mimeType:t,codecs:e=nQ(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,se:null,colorGamut:null,frameRate:null,timescale:null}}function sH(e){var t=new Set,n=[];e=x(e);for(var i=e.next();!i.done;i=e.next()){var r=nJ(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=tl("audio",n),i=tl("video",n),e=tl(tc,n),i=function(e){if(e.length<=1)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?at('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 sG(t,n,i){var r,a,o,s,u;return P(function(l){if(1==l.h)return(r=n).cryptoKey?l.A(2):l.g(r.fetchKey(),3);if(!(a=r.iv))for(a=eO(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+i,s=a.byteLength-1;s>=0;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 sK(e,t,n){var i,r,a,o,s;return P(function(u){switch(u.h){case 1:if(i=sq(e),r=sW.get(i))return u.return(r);return a=0,o=ri([e],n),u.m(2),o.method="HEAD",u.g(t.request(a,o).promise,4);case 4:r=u.i.headers["content-type"],u.o(3);break;case 2:if(!(s=u.l())||1002!=s.code&&1001!=s.code){u.A(3);break}return o.method="GET",u.g(t.request(a,o).promise,6);case 6:r=u.i.headers["content-type"];case 3:return u.return(r?r.toLowerCase().split(";").shift():"")}})}function sq(e){for(var t=e.length,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(63===i||35===i){t=n;break}}for(n=t-1;n>=0;n--){if(46===(i=e.charCodeAt(n))){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(47===i)break}return""}function sz(e,t,n,i,r){return e=ri(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}si.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.o=function(){},this.g=null},su.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(p=sc.prototype).ready=function(){var e=this;st(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){if(null==e.h||0==e.h&&e.g.duration!=1/0)e.i=!0;else{var t=e.g.currentTime,n=null;if("number"==typeof e.h)n=e.h;else if(e.h instanceof Date){var i=sd(e);null!==i&&(n=e.h.getTime()/1e3-i,n=sh(e,n))}null==n?e.i=!0:(n<0&&(n=Math.max(0,t+n)),t!=n?(e.j.Ba(e.g,"seeking",function(){e.i=!0}),e.g.currentTime=n):e.i=!0)}})},p.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},p.Vf=function(e){this.h=this.i?this.h:e},p.Ld=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=sh(this,e=e.getTime()/1e3-(sd(this)||0))),e||0},p.Kh=function(){return 0},p.Ih=function(){return 0},p.Jh=function(){return!1},p.Bi=function(){},p.ni=function(){var e=aW(this.g.buffered);return null!=e&&e>=this.g.duration-1},(p=sp.prototype).ready=function(){this.m.Fa(.25)},p.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.u=function(){}},p.Vf=function(e){sa(this.j,sf(this,e))},p.Ld=function(){var e=sr(this.j);return this.h.readyState>0&&!this.h.paused?sv(this,e):e},p.Kh=function(){return this.i.H},p.Ih=function(){return this.i.G},p.Jh=function(){return this.i.C},p.Bi=function(){this.i.ud()},p.ni=function(){if(this.g.U()){var e=this.g.Ec(),t=aW(this.h.buffered);if(null!=t&&t>=e)return!0}return!1},(p=sy.prototype).getNumReferences=function(){return this.g.length},p.getNumEvicted=function(){return this.i},p.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},p.zk=function(){this.o=!0},p.qb=function(e){for(var t=x(this.g),n=t.next();!n.done;n=t.next())e(n.value)},p.Cb=function(){return this.g[0]||null},p.find=function(e){var t=this.g.length-1;if(t<0)return null;if(e<this.g[0].startTime)return this.i;var n=et(this.g,function(t){return t.startTime<=e})-1;if(n<0)return null;var i=this.g[n];return t=n<t?this.g[n+1].startTime:i.endTime,e>=i.startTime&&e<t?n+this.i:null},p.get=function(e){return 0==this.g.length||(e-=this.i)<0||e>=this.g.length?null:this.g[e]},p.offset=function(e){if(!this.o)for(var t=x(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},p.pf=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3,n=et(this.g,function(e){return Math.round(1e3*e.startTime)/1e3<t});this.g.length=n,this.g.push.apply(this.g,S(e))}},p.ce=function(e,t){for(var n=Math.max(t,this.g.length>0?this.g[0].startTime:-1/0),i=0;i<e.length&&e[i].endTime<=n;)i++;i>0&&(e=e.slice(i)),this.pf(e),this.Va(t)},p.Va=function(e){if(!this.o){var t=et(this.g,function(t){return t.endTime<=e});t>0&&(this.i+=t,this.g=this.g.slice(t))}},p.hd=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;var i=et(this.g,function(t){return t.endTime<=e});i>0&&(n||(this.i+=i),this.g=this.g.slice(i)),0!=this.g.length&&((t=new aV((n=this.g[this.g.length-1]).startTime,t,n.C,n.startByte,n.endByte,n.ba,n.timestampOffset,n.appendWindowStart,n.appendWindowEnd,n.g,n.tilesLayout,n.B,n.h,n.status,n.aesKey)).mimeType=n.mimeType,t.codecs=n.co
1decs,t.i=n.i,this.g[this.g.length-1]=t)}},p.Nf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new n7(function(){var e=t();e?n.g.push.apply(n.g,S(e)):(n.m.stop(),n.m=null)}),this.m.Fa(e))},sy.prototype[Symbol.iterator]=function(){return this.Rb(0)},sy.prototype.Rb=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&&r.g.length>0)for(var o=r.g.length-1;o>=0;--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 W("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new sw(this,i,a,n)},sy.prototype.Qe=function(){return -1},H("shaka.media.SegmentIndex",sy),sy.forSingleSegment=sb,sy.prototype.getIteratorForTime=sy.prototype.Rb,sy.prototype.updateEvery=sy.prototype.Nf,sy.prototype.fit=sy.prototype.hd,sy.prototype.evict=sy.prototype.Va,sy.prototype.mergeAndEvict=sy.prototype.ce,sy.prototype.offset=sy.prototype.offset,sy.prototype.get=sy.prototype.get,sy.prototype.find=sy.prototype.find,sy.prototype.markImmutable=sy.prototype.zk,sy.prototype.release=sy.prototype.release,sy.prototype.getNumEvicted=sy.prototype.getNumEvicted,sy.prototype.getNumReferences=sy.prototype.getNumReferences,(p=sw.prototype).Fd=function(e){this.reverse=e},p.xj=function(){return this.h},p.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.m&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.g.length>0?e.g[this.g]:e},p.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.g.length>0?e.g.length-1:0)):(this.h--,this.g=0):e&&e.g.length>0?(this.g++,e.m&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},p.ih=function(){var e=this.current();if(e&&e.Rc&&!e.l&&(e=this.i.get(this.h))&&e.g.length>0)for(var t=e.g[this.g];t.l&&!(this.g<=0);)this.g--,t=e.g[this.g]},H("shaka.media.SegmentIterator",sw),sw.prototype.resetToLastIndependent=sw.prototype.ih,sw.prototype.next=sw.prototype.next,sw.prototype.current=sw.prototype.current,sw.prototype.currentPosition=sw.prototype.xj,sw.prototype.setReverse=sw.prototype.Fd,w(sT,sy),(p=sT.prototype).clone=function(){var e=new sT;return e.h=this.h.slice(),e.i=this.i,e},p.release=function(){this.h=[]},p.qb=function(e){for(var t=x(this.h),n=t.next();!n.done;n=t.next())n.value.qb(e)},p.find=function(e){for(var t=this.i,n=x(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},p.get=function(e){for(var t=this.i,n=x(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},p.offset=function(){},p.pf=function(){},p.Va=function(e){if(this.h.length){var t=this.h[0];t.Va(e),0==t.getNumReferences()&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Va(e))}},p.ce=function(){},p.hd=function(){},p.Nf=function(){},H("shaka.media.MetaSegmentIndex",sT),sT.prototype.updateEvery=sT.prototype.Nf,sT.prototype.fit=sT.prototype.hd,sT.prototype.mergeAndEvict=sT.prototype.ce,sT.prototype.evict=sT.prototype.Va,sT.prototype.merge=sT.prototype.pf,sT.prototype.offset=sT.prototype.offset,sT.prototype.get=sT.prototype.get,sT.prototype.find=sT.prototype.find,sT.prototype.forEachTopLevelReference=sT.prototype.qb,sT.prototype.release=sT.prototype.release,sx.prototype.release=function(){this.set(this.ld()),this.i&&(this.i.stop(),this.i=null),this.g=null},sx.prototype.set=function(e){this.h=e,sS(this)},sx.prototype.ld=function(){return this.g.ld()},sA.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=x(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},w(sI,i8),sI.prototype.release=function(){this.g.clear(),i8.prototype.release.call(this)},sI.prototype.j=function(e){for(var t=x(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).kg;e:{for(var r=n.ke,a=r.length-1;a>=0;a--){var o=r[a];if(o.position<=e){r=o.sd;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&&!en(i.roles,r.roles),(o||s||i)&&sE(this,e,r.contentType)&&(n.kg=r,i=new i3("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&sE(this,e,r.contentType)&&(n.kg=r,JSON.stringify(r),n=new i3("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},w(sM,i8),sM.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),i8.prototype.release.call(this)},sR.prototype.Va=function(e,t){t=void 0!==t&&t;for(var n=x(this.g.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&s_(this,i);t&&sO(this)},sR.prototype.Fd=function(e){this.o=e,this.h&&this.h.Fd(e)},sB.prototype.abort=function(){this.ge&&this.ge.abort()},H("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});var sW=(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/d
1ash+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 sX(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.K=new Map,this.C=1,this.B=this.o=null,this.X=0,this.h=new Map,this.M=!1,this.$=null,this.D=!1,this.l=new rc(function(){var e,t,i,r,a,o,s;return e=n,P(function(n){if(1==n.h){for(e.u&&e.u.stop(),e.u=null,e.J&&e.J.stop(),e.J=null,e.H&&(e.H.release(),e.H=null),t=[],r=(i=x(e.h.values())).next();!r.done;r=i.next())un(a=r.value),t.push(ui(a)),a.ha&&(sj(a.ha),a.ha=null);for(s=(o=x(e.m.values())).next();!s.done;s=o.next())sj(s.value);return n.g(Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.G=null,n.j()})}),this.S=Date.now()/1e3,this.m=new Map,this.T={projection:null,hfov:null},this.ia=0,this.aa=1/0,this.I=null,this.P=[],this.u=new n7(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var e,t=n.j.presentationTimeline.Ub(),i=n.j.presentationTimeline.Eb();i-t>1?(e=n.g.W,P(function(n){return e.G.g||e.g.error||e.N||e.H||oD(e)||oR(e)?n.return():n.g(oW(e,function(){oD(e)||oR(e)||e.i.setLiveSeekableRange(t,i)}),0)})):oF(n.g.W)}else oF(n.g.W),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.O=this.G=null,this.N=!1,this.J=new n7(function(){var e=n.g.video;!e.ended&&n.G&&(n.O=n.G,n.N=!0,e.currentTime=n.G,n.G=null)}),this.H=new er}function sY(e,t){for(var n=0>e.g.Db(),i=x(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).sa&&r.sa.Fd(n),r.ha&&r.ha.Fd(n);for(r=(i=x(e.m.values())).next();!r.done;r=i.next())r.value.Fd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Ic&&(sQ(e,t,!1,0,!1),n.Ic=i):(t=n.Ic)&&(n.Ic=null,sQ(e,t,!0,0,!1)))}function sJ(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.o=t,e.M&&(t.video&&sQ(e,t.video,n,i,r,a),t.audio&&sQ(e,t.audio,n,i,r,a))}function s$(e,t){P(function(n){if(1==n.h)return e.I=null,e.B=t,e.M?t.segmentIndex?n.A(2):n.g(t.createSegmentIndex(),2):n.return();sQ(e,t,!0,0,!1),n.j()})}function sQ(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f=e.h.get(t.type);f||t.type!=tc?f&&(f.Ic&&(t.trickModeVideo?(f.Ic=t,t=t.trickModeVideo):f.Ic=null),f.stream!=t||r)&&(e.m.has(t)?f.ha=e.m.get(t):f.ha&&(o=f.ha,(s=t)&&s!==o.i&&(sj(o),o.i=s)),t.type==tc&&f.stream!=t&&(r=nq(t.mimeType,t.codecs),oM(e.g.W,r,e.j.sequenceMode,t.external)),!e.m.has(f.stream)&&f.stream.closeSegmentIndex&&(f.Ja?(r="("+f.type+":"+f.stream.id+")",e.K.has(r)||e.K.set(r,f.stream.closeSegmentIndex)):f.stream.closeSegmentIndex()),r=f.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,f.stream=t,f.sa=null,f.ag=!!a,t.dependencyStream?f.Bc=s1(e,t.dependencyStream):f.Bc=null,uu(e),r&&(f.jb=null,f.mc=null,f.lc=null,t.isAudioMuxedInVideo&&(t=null,"video"===f.type?t=e.h.get("audio"):"audio"===f.type&&(t=e.h.get("video")),t&&(ui(t).catch(function(){}),t.jb=null,t.mc=null,t.lc=null,s0(e,t),sZ(e,t).catch(function(t){e.g&&e.g.onError(t)})))),n?f.Qb?f.Id=!0:f.Ja?(f.Ob=!0,f.dd=i,f.Id=!0):(un(f),ue(e,f,!0,i).catch(function(t){e.g&&e.g.onError(t)})):f.Ja||f.kb||ut(e,f,0),sZ(e,f).catch(function(t){e.g&&e.g.onError(t)})):(u=t,P(function(t){switch(t.h){case 1:return l=td,e.X++,c=e.X,t.m(2),t.g(oU(e.g.W,l.Pa),4);case 4:t.o(3);break;case 2:d=t.l(),e.g&&e.g.onError(d);case 3:h=nq(u.mimeType,u.codecs),oM(e.g.W,h,e.j.sequenceMode,u.external),(e.g.W.aa.isTextVisible()||e.i.alwaysStreamText)&&e.X==c&&(p=s1(e,u),e.h.set(l.Pa,p),ut(e,p,0)),t.j()}}))}function sZ(e,t){var n,i,r;return P(function(a){if(1==a.h)return t.Wa?(n=t.stream,i=t.Wa,n.segmentIndex?a.A(2):a.g(n.createSegmentIndex(),2)):a.return();if(4!=a.h)return(r=n.dependencyStream)&&!r.segmentIndex?a.g(r.createSegmentIndex(),4):a.A(4);if(t.Wa!=i||t.stream!=n)return a.return();var o=e.g.Tb(),s=oP(e.g.W,t.type),u=t.stream.segmentIndex.find(t.Ga?t.Ga.endTime:o),l=null==u?null:t.stream.segmentIndex.get(u);u=l?aH(l):null,l&&!u&&(u=(l.endTime-l.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),u?((l=l.ba)&&(u+=(l.endByte?l.endByte+1-l.startByte:null)||0),o=8*u/(l=e.g.getBandwidthEstimate())<(s||0)-o-e.i.rebufferingGoal||t.Wa.h.g>u):o=!0,o&&t.Wa.abort(),a.j()})}function s0(e,t){t.Qb||t.Ob||(t.Ja?(t.Ob=!0,t.dd=0):null==oL(e.g.W,t.type)?null==t.kb&&ut(e,t,0):(un(t),ue(e,t,!1,0).catch(function(t){e.g&&e.g.onError(t)})))}function s1(e,t){var n={stream:t,type:t.type,sa:null,ha:s2(e,t),Ga:null,jb:null,lf:null,mc:null,lc:null,jf:null,kf:null,Ic:null,endOfStream
1:!1,Ja:!1,kb:null,Ob:!1,dd:0,Id:!1,Qb:!1,Uc:!0,ag:!1,dh:!1,pd:!1,Wa:null,Bc:null};return t.dependencyStream&&(n.Bc=s1(e,t.dependencyStream)),n}function s2(e,t){if("video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===tc&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===tc&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.ha)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new sR(e.i.segmentPrefetchLimit,t,function(t,n,i){return s7(t,n,i||null,e.i.retryParameters,e.g.qc)},0>e.g.Db(),e.g.hl):null}function s4(e,t,n,i){if(t.sa){var r=t.sa.current();return r&&t.Ga&&(n=t.Ga.endTime,oe(t.Ga.startTime,r.startTime,.002)&&oe(n,r.endTime,.002)&&(r=t.sa.next().value)),r}if(t.Ga||i)return r=t.Ga?t.Ga.endTime:i,n=0>e.g.Db(),t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(r,!1,n)),t.sa&&t.sa.next().value;var a=Math.max(n-(i=e.j.sequenceMode||us(e)?0:e.i.inaccurateManifestTolerance),0),o=e.g.W.getDuration();for(1>Math.abs(a-o)&&(a=Math.max(n-(i=1),0)),o=0>e.g.Db(),e=null,i&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(a,!1,o)),e=t.sa&&t.sa.next().value),e||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Rb(n,!1,o)),e=t.sa&&t.sa.next().value);(null==(r=e)?void 0:r.Wb())===2;)i=n=void 0,e=null!=(i=null==(n=t.sa)?void 0:n.next().value)?i:null;return e}function s3(e,t,n,i,r,a,o,s){var u,l,c,d,h;return P(function(p){switch(p.h){case 1:if(u=td,l=uc(e),p.m(2),t.mc=i,t.lc=r,o&&(t.jf=o),s&&(t.kf=s),t.lf=n,c=e.j.sequenceMode||"HLS"==e.j.type,d=null,t.type===u.ua?d=e.h.get(u.Z):t.type===u.Z&&(d=e.h.get(u.ua)),!(d&&d.stream&&d.stream.isAudioMuxedInVideo)){p.A(4);break}return p.g(o_(e.g.W,d.type,n,i,r,c,d.stream.mimeType,d.stream.codecs,l),4);case 4:return p.g(o_(e.g.W,t.type,n,i,r,c,a.mimeType||t.stream.mimeType,a.codecs||t.stream.codecs,l),6);case 6:p.o(0);break;case 2:throw h=p.l(),t.mc=null,t.lc=null,t.jf=null,t.kf=null,t.lf=null,h}})}function s5(e,t,n,i,r,a,o,s){var u,l,c,d;return o=void 0!==o&&o,s=void 0!==s&&s,P(function(h){switch(h.h){case 1:return u=i.closedCaptions&&i.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(l="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,c=null,r.ba&&(c=r.ba.timescale),l&&c&&"video"===i.type&&"DASH"==e.j.type&&(new ry).box("moof",rb).box("traf",rb).ma("tfdt",function(n){var i,a,o,s;return P(function(u){return(i=aa(n.reader,n.version).baseMediaDecodeTime)?(a=-i/c,(Number(t.lf)||0)<a)?(o=t.mc,s=t.lc,u.g(s3(e,t,a,o,s,r),0)):u.A(0):u.return()})}).parse(a,!1,o)),h.g(s6(e,t,n),2);case 2:return rd(e.l),d=t.Uc,t.Uc=!1,h.g(e.g.Rh(t.type,a),3);case 3:return h.g(oO(e.g.W,t.type,a,r,i,u,d,s,o),4);case 4:rd(e.l),h.j()}})}function s6(e,t,n){var i,r,a,o,s,u,l,c,d;return P(function(h){return 1==h.h?(e.I==t&&(e.I=null),(i=t.stream.segmentIndex)instanceof sT&&(i.Va(e.j.presentationTimeline.Fb()),r=[],function(e,t){e=x(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}(i,function(e){r.push(e.Qe())})),a=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),null==(o=oL(e.g.W,t.type)))?h.return():(s=n-o,u=e.i.evictionGoal,l=e.j.presentationTimeline.Ub(),c=e.j.presentationTimeline.Eb(),d=s-a,c-l>u&&(d=Math.max(s-a,l-u-o)),d<=u?h.return():h.g(e.g.W.remove(t.type,o,o+d,r),2)):4!=h.h?(rd(e.l),e.I?h.g(s6(e,e.I,n),4):h.A(0)):void(rd(e.l),h.j())})}function s8(e){return e&&e.type==tc&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function s9(e,t,n,i){var r,a,o,s,u;return P(function(l){switch(l.h){case 1:if(r=n.Vb())return l.return(r);if(a=null,t.ha){var c=t.ha,d=c.g;n instanceof aB&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.yh=i),a=c.ge):a=null}return a||(a=s7(n,t.stream,i||null,e.i.retryParameters,e.g.qc)),o=0,t.sa&&(o=t.sa.h),t.Wa=a,l.g(a.promise,2);case 2:if(s=l.i,t.Wa=null,u=s.data,!n.aesKey){l.A(3);break}return l.g(sG(u,n.aesKey,o),4);case 4:u=l.i;case 3:return l.return(u)}})}function s7(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof aV?e:void 0;return(e=sz(e.R(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(rs,e,{type:+!!o,stream:t,segment:o,isPreload:a})}function ue(e,t,n,i){var r,a;return P(function(o){return 1==o.h?(t.Ob=!1,t.Id=!1,t.dd=0,t.Qb=!0,t.Ga=null,t.sa=null,t.ha&&!e.m.has(t.stream)&&sj(t.ha,!1),i?(r=e.g.Tb(),a=e.g.W.getDuration(),o.g(e.g.W.remove(t.type,r+i,a),3)):o.g(oU(e.g.W,t.type),4)):3!=o.h?(rd(e.l),n?o.g(e.g.W.flush(t.type),3):o.A(3)):void(rd(e.l),t.Qb=!1,t.endOfStream=!1,t.Ja||t.kb||ut(e,t,0),o.j())})}function ut(t,n,i){var r=n.type;
1(r!=tc||t.h.has(r))&&(n.kb=new n7(function(){var i;return P(function(r){if(1==r.h){var a,o,s,u,l,c,d,h,p;return r.m(2),r.g(P(function(i){switch(i.h){case 1:if(rd(t.l),a=td,n.Ja||null==n.kb||n.Qb)return i.return();if(n.kb=null,!n.Ob){i.A(2);break}return i.g(ue(t,n,n.Id,n.dd),3);case 3:case 8:return i.return();case 2:for(var r=x(t.K.entries()),f=r.next();!f.done;f=r.next()){var g=x(f.value);f=g.next().value,g=g.next().value,f.includes(n.type)&&(g(),t.K.delete(f))}if(n.stream.segmentIndex){i.A(4);break}return o=n.stream,i.m(5),i.g(n.stream.createSegmentIndex(),7);case 7:i.o(6);break;case 5:return s=i.l(),i.g(ur(t,n,s),8);case 6:if(o!=n.stream)return o.closeSegmentIndex&&o.closeSegmentIndex(),n.Ja||n.kb||ut(t,n,0),i.return();case 4:if(!n.Bc||n.Bc.stream.segmentIndex){i.A(9);break}return i.m(11),i.g(n.Bc.stream.createSegmentIndex(),13);case 13:i.o(9);break;case 11:i.l();case 9:i.m(14),null!=(u=function(t,n){if(s8(n))return k=t.g.W,I=n.stream.originalId||"",E=oP(k,"video")||0,n6(k.h,I,E),null;if(n.type==tc&&(C=t.g.W).h&&n6(C.h,"",0),n.stream.isAudioMuxedInVideo&&"audio"==n.type)return null;if(n.type!=tc&&oR(t.g.W))return uo(t,!0),null;var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M=t.i.updateIntervalSeconds/Math.max(1,Math.abs(t.g.Db()));if(!oC(t.g.W)&&n.type!=tc)return M/2;var D=t.g.Tb();if("audio"===n.type)for(var R=x(t.m.keys()),L=R.next();!L.done;L=R.next())(L=t.m.get(L.value)).Va(D,!0),sL(L,D);R=n.Ga?n.Ga.endTime:D;var N=oN(t.g.W,n.type,D);"video"==n.type&&!t.h.has("audio")&&t.g.W.l.has("audio")&&(N=Math.min(N,L=oN(t.g.W,"audio",D))),L=Math.max(1,Math.max(t.i.rebufferingGoal,t.i.bufferingGoal)*t.C);var j=t.j.presentationTimeline.getDuration()-R,O=oP(t.g.W,n.type);if(j<1e-6&&O)return n.endOfStream=!0,"video"==n.type&&((M=t.h.get(tc))&&s8(M)&&(M.endOfStream=!0),(M=t.h.get("audio"))&&M.stream.isAudioMuxedInVideo&&(M.endOfStream=!0)),null;if(n.endOfStream=!1,N>=L)return M/2;if(j=!n.sa,!(N=s4(t,n,D,O)))return t=1/0,(n=n.Ga)&&(t=n.endTime-n.startTime),Math.min(t/2,M);O=n.jb;var U=N.ba;O&&U&&aF(U,O)&&(O.g=U.g),O=!1,j&&n.ag&&(O=!0,n.ag=!1),j=1/0,U=x(t.h.values());for(var _=U.next();!_.done;_=U.next())s8(_=_.value)||_.stream.isAudioMuxedInVideo||_.sa&&!_.sa.current()||(j=Math.min(j,_.Ga?_.Ga.endTime:D));return R>=j+t.j.presentationTimeline.h?M:(n.ha&&n.sa&&!t.m.has(n.stream)&&(n.ha.Va(N.startTime+.001),sL(n.ha,N.startTime).catch(function(){})),us(t)&&function(e,t,n){if(t.type===tc)return!1;var i=t.jb;if(!i)return!1;var r=n.ba,a=i.g!==r.g;if(n=a,"reset_to_encrypted"===e.i.crossBoundaryStrategy&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.i.crossBoundaryStrategy&&i.encrypted==r.encrypted&&(n=!1),"keep"===e.i.crossBoundaryStrategy&&i.mimeType&&r.mimeType){var o=nY(nQ(i.mimeType)),s=nY(nQ(r.mimeType));i.mimeType==r.mimeType&&o==s&&(n=!1)}return(a=(o=(e.h.get("video")||e.h.get("audio"))===t)&&a&&e.N)&&(e.N=!1),o&&n&&(a||t.Uc)&&uo(e,!0).then(function(){var t=(new Map).set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new i3("boundarycrossed",t))}),n}(t,n,N)||((i=t,r=n,a=D,o=N,s=O,P(function(t){var n,S,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V,H,G,K,q,z,W,X,Y,J,$,Q,Z,ee;switch(t.h){case 1:if(u=td,l=r.stream,c=r.sa,r.Ja=!0,t.m(2),2==o.Wb())throw new eJ(1,1,1011);return t.g((n=i,S=r,k=o,I=s,P(function(e){switch(e.h){case 1:var t;if(E=td,C=null==S.Ga,M=[],D=Math.max(0,Math.max(k.appendWindowStart,n.ia)-.1),R=Math.min(k.appendWindowEnd,n.aa)+.1,N=nJ(L=k.codecs||S.stream.codecs),j=n$(k.mimeType||S.stream.mimeType),(O=k.timestampOffset)==S.lf&&D==S.mc&&R==S.lc&&N==S.jf&&j==S.kf){e.A(2);break}if(!(S.jf&&S.kf&&(t=n.g.W,(t=oQ(t,S.type,j,L,uc(n))).ec&&t.ec.destroy(),t.type==o2))||(U=null,S.type===E.ua?U=n.h.get(E.Z):S.type===E.Z&&(U=n.h.get(E.ua)),!U)){e.A(3);break}return e.g(ui(U).catch(function(){}),5);case 5:U.jb=null,U.mc=null,U.lc=null,s0(n,U);case 3:return e.g(s3(n,S,O,D,R,k,N,j),2);case 2:return aF(k.ba,S.jb)||(S.jb=k.ba,k.l&&k.ba&&(_=s9(n,S,k.ba),B=function(){var e,t,i,r,a,o,s,u,l,c,d;return P(function(h){switch(h.h){case 1:return h.m(2),h.g(_,4);case 4:return e=h.i,rd(n.l),t=null,i=new Map,r={projection:null,hfov:null},S.stream&&(a=S.stream.videoLayout)&&((o=a.split("/")).includes("PROJ-RECT")?r.projection="rect":o.includes("PROJ-EQUI")?r.projection="equi":o.includes("PROJ-HEQU")?r.projection="hequ":o.includes("PROJ-PRIM")?r.projection="prim":o.includes("PROJ-AIV")&&(r.projection="hequ")),(s=new ry).box("moov",rb).box("trak",rb).box("mdia",rb).ma("mdhd",function(e){t=ao(e.reader,e.version).timescale}
1).ma("hdlr",function(e){switch((e=e.reader).skip(4),String.fromCharCode((e=e.Nb(4,!1))[0],e[1],e[2],e[3])){case"soun":i.set(E.Z,t);break;case"vide":i.set(E.ua,t)}t=null}),S.type!==E.ua||r.projection||s.box("minf",rb).box("stbl",rb).ma("stsd",rw).boxes("encv avc1 avc3 hev1 hvc1 dvav dva1 dvh1 dvhe dvc1 dvi1".split(" "),rT).box("vexu",rb).box("proj",rb).ma("prji",function(e){r.projection=e.reader.yd()}).box("hfov",function(e){r.hfov=e.reader.V()/1e3}),s.parse(e,!0,!0),S.type===E.ua&&function(e,t){if(e.T.projection!=t.projection||e.T.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new i3("spatialvideoinfo",n)}else n=new i3("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.T=t}}(n,r),i.has(S.type)?k.ba.timescale=i.get(S.type):null!=t&&(k.ba.timescale=t),(u=S.stream.segmentIndex)instanceof sT&&(l=function(e,t){e=x(e.h);for(var n=e.next();!n.done;n=e.next())if(null!=(n=n.value).find(t))return n.Qe();return -1}(u,k.startTime)),c=S.stream.closedCaptions&&S.stream.closedCaptions.size>0,h.g(n.g.Rh(S.type,e),5);case 5:return h.g(oO(n.g.W,S.type,e,null,S.stream,c,S.Uc,I,!1,!1,l),6);case 6:h.o(0);break;case 2:throw d=h.l(),S.jb=null,d}})},F=k.startTime,C&&null!=(V=oP(n.g.W,S.type))&&(F=V),n.g.Ek(F,k.ba),M.push(B()))),H=S.Ga?S.Ga.i:-1,k.i!=H&&M.push(oB(n.g.W,S.type,k.startTime)),e.g(Promise.all(M),0)}})),4);case 4:if(rd(i.l),i.D)return t.return();if(d="video/mp4"==l.mimeType||"audio/mp4"==l.mimeType,h=e.ReadableStream,i.i.lowLatencyMode&&i.j.isLowLatency&&h&&d&&("HLS"!=i.j.type||o.o))return g=new Uint8Array(0),v=m=!1,b=function(e){var t,n,u;return P(function(c){switch(c.h){case 1:if(m||(v=!0,rd(i.l),i.D))return c.return();if(c.m(2),g=tn(g,e),t=!1,n=0,(new ry).box("mdat",function(e){n=e.size+e.start,t=!0}).parse(g,!1,!0),!t){c.A(4);break}return u=g.subarray(0,n),g=g.subarray(n),c.g(s5(i,r,a,l,o,u,!0,s),5);case 5:r.ha&&r.sa&&sL(r.ha,o.startTime,!0);case 4:c.o(0);break;case 2:y=c.l(),c.j()}})},t.g(s9(i,r,o,b),9);return p=s9(i,r,o),t.g(p,7);case 7:if(f=t.i,rd(i.l),i.D)return t.return();return rd(i.l),r.Ob?(r.Ja=!1,ut(i,r,0),t.return()):t.g(s5(i,r,a,l,o,f,!1,s),6);case 9:if(w=t.i,y)throw y;if(v){t.A(10);break}return m=!0,rd(i.l),i.D?t.return():r.Ob?(r.Ja=!1,ut(i,r,0),t.return()):t.g(s5(i,r,a,l,o,w,!1,s),10);case 10:r.ha&&r.sa&&sL(r.ha,o.startTime,!0);case 6:if(rd(i.l),i.D)return t.return();r.Ga=o,c.next(),r.Ja=!1,r.dh=!1,JSON.stringify(i.g.W.Cc()[r.type]),r.Ob||(T=null,r.type===u.ua?T=i.h.get(u.Z):r.type===u.Z&&(T=i.h.get(u.ua)),T&&T.type==u.Z?
1i.g.ud(o,r.stream,T.stream.isAudioMuxedInVideo,!1):i.g.ud(o,r.stream,r.stream.codecs.includes(","),!1)),un(r),ut(i,r,0),t.o(0);break;case 2:if(A=t.l(),rd(i.l,A),i.D)return t.return();if(r.Ja=!1,7001==A.code)r.Ja=!1,un(r),ut(i,r,0),t.A(0);else if(r.type==u.Pa&&i.i.ignoreTextStreamFailures)i.h.delete(u.Pa),t.A(0);else{if(3017==A.code){return t.g((G=i,K=r,q=A,P(function(e){switch(e.h){case 1:for(z=!1,X=(W=x(G.h.values())).next();!X.done;X=W.next())if((Y=X.value)!=K&&Y.dh){z=!0;break}if(z){e.A(2);break}if(G.i.avoidEvictionOnQuotaExceededError){if(J=ua(G,q),G.g.disableStream(K.stream,J))return e.return();return ut(G,K,4),e.return()}if(($=Math.round(100*G.C))>20){G.C-=.2,e.A(3);break}if($>4){G.C-=.04,e.A(3);break}if(Q=ua(G,q),!G.g.disableStream(K.stream,Q)){K.pd=!0,G.D=!0,G.g.onError(q),e.A(5);break}return G.C=1,Z=G.g.Tb(),e.g(s6(G,K,Z),5);case 5:return e.return();case 3:return K.dh=!0,ee=G.g.Tb(),e.g(s6(G,K,ee),2);case 2:ut(G,K,4),e.j()}})),0)}return r.pd=!0,1==A.category&&r.ha&&s_(r.ha,o),A.severity=2,t.g(ur(i,r,A),0)}}})).catch(function(){}),n.Bc&&function e(t,n,i,r){var a,o,s,u,l,c,d,h,p,f,g,m;return P(function(v){switch(v.h){case 1:for(a=td,l=(u=(s=(o=n.stream).segmentIndex)&&s.Rb(i))&&u.next().value;l&&t.P.includes(l.startTime);)l=u&&u.next().value;if(!l){v.A(0);break}if(!(c=l.ba)||aF(c,n.jb)){v.A(3);break}return n.jb=c,v.m(4),v.g(s9(t,n,c),6);case 6:if(d=v.i,!t.g)return v.return();var y=t.g.W;y.C&&tg(y.C,d,0,o),t.P=[],v.o(3);break;case 4:throw h=v.l(),n.jb=null,h;case 3:if(n.Ga&&n.Ga==l){v.A(0);break}return n.Ga=l,v.m(8),v.g(s9(t,n,l),10);case 10:if(p=v.i,!t.g)return v.return();(y=t.g.W).C&&tg(y.C,p,0,o),t.P.push(l.startTime),v.o(9);break;case 8:throw f=v.l(),n.Ga=null,f;case 9:if(!t.g)return v.return();if(n.Ob||(g=null,n.type===a.ua?g=t.h.get(a.Z):n.type===a.Z&&(g=t.h.get(a.ua)),g&&g.type==a.Z?t.g.ud(l,n.stream,g.stream.isAudioMuxedInVideo,!0):t.g.ud(l,n.stream,n.stream.codecs.includes(","),!0)),m=Math.max.apply(Math,[0].concat(S(t.P))),t.g.Tb()+r>m)return v.g(e(t,n,l.startTime,r),0);v.A(0)}})}(t,n.Bc,D,L)),null)}(t,n))&&(ut(t,n,u),n.pd=!1),i.o(15);break;case 14:return l=i.l(),i.g(ur(t,n,l),16);case 16:return i.return();case 15:if(n.type===a.Pa)return i.return();if(c=[],n.stream&&!n.stream.isAudioMuxedInVideo&&c.push(n),d=n.type===a.Z?a.ua:a.Z,(h=t.h.get(d))&&h.stream&&!h.stream.isAudioMuxedInVideo&&c.push(h),!t.M||!c.every(function(e){return e.endOfStream})){i.A(0);break}return i.g(t.g.W.endOfStream(),18);case 18:rd(t.l),0!=(p=t.g.W.getDuration())&&p<t.j.presentationTimeline.getDuration()&&t.j.presentationTimeline.wb(p),i.j()}}),4)}if(2!=r.h)return r.o(0);i=r.l(),t.g&&t.g.onError(i),r.j()})}).na(i))}function un(e){null!=e.kb&&(e.kb.stop(),e.kb=null)}function ui(e){return P(function(t){return e.Wa?t.g(e.Wa.abort(),0):t.A(0)})}function ur(e,t,n){var i,r,a,o,s;return P(function(u){switch(u.h){case 1:return 3024==n.code?(t.Ja=!1,un(t),ut(e,t,0),u.return()):u.g(iY(e.$),2);case 2:if(rd(e.l),1===n.category&&1003!=n.code){if(t.Ic)return sY(e,!1),u.return();i=ua(e,n),n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}if(n.handled||1011!=n.code){u.A(3);break}for(r=e.g.Tb(),a=oP(e.g.W,t.type),o=s4(e,t,r,a);(null==(s=o)?void 0:s.Wb())===2;)t.Ga=o,o=s4(e,t,r,a);if(!o){u.A(3);break}return u.g(oB(e.g.W,t.type,o.startTime),5);case 5:return t.Ja=!1,t.pd=!1,un(t),ut(e,t,0),u.return();case 3:n.handled&&1011==n.code||e.g.onError(n),n.handled||e.i.failureCallback(n),u.j()}})}function ua(e,t){return 0===e.i.maxDisabledTime&&1011==t.code?1:e.i.maxDisabledTime}function uo(e,t){var n,i,r,a,o,s;return t=void 0!==t&&t,P(function(u){return 1==u.h?(n=Date.now()/1e3,i=e.i.minTimeBetweenRecoveries,t||e.i.allowMediaSourceRecoveries&&!(n-e.S<i))?(e.S=n,r=td,(a=e.h.get(r.Z))&&(un(a),a.Wa&&(a.Wa.abort(),a.Wa=null),a.jb=null,a.mc=null,a.lc=null,a.Ja=!1,a.Ob=!1,a.dd=0,a.Id=!1,a.Qb=!1,a.sa&&a.sa.ih()),(o=e.h.get(r.ua))&&(un(o),o.Wa&&(o.Wa.abort(),o.Wa=null),o.jb=null,o.mc=null,o.lc=null,o.Ja=!1,o.Ob=!1,o.dd=0,o.Id=!1,o.Qb=!1,o.sa&&o.sa.ih()),s=e.g.video.paused,u.g(oJ(e.g.W,uc(e)),2)):u.return(!1):(!o||o.Qb||o.Ja||o.kb||ut(e,o,0),!a||a.Qb||a.Ja||a.kb||ut(e,a,0),s||e.g.video.play(),u.return(!0))})}function us(e){if("keep"!==e.i.crossBoundaryStrategy)return!0;var t=eu();if(t.xb()){if(!t.Jf()){for(n=(t=x(e.h.keys())).next();!n.done;n=t.next())if((n=e.h.get(n.value)).type!==td.Pa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1){for(e=new Set,n=(t=x(n.fullMimeTypes)).next();!n.done;n=t.next())e.add(nX(n.value));return e.size>1}}}else{t=x(e.h.keys());for(var n=t.next();!n.done;n=t.next())if((n=e.h.get(n.value)).type!==td.Pa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1)return!0}return!1}function uu(e){e.H.Sa(),us(e)&&(e.H.F(e.g.video,"waiting",function(){return ul(e)}),e.H.F(e.g.video,"timeupdate",function(){return ul(e)}))}function ul(e){if(us(e)){e.J.stop();var t=e.g.Tb(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.jb)&&null!==n.g&&((t=n.g-t)<0||t>1||(e.G=n.g+.1,e.J.na(t)))}}function uc(e,t){function n(t){if(t.fullMimeTypes&&t.fullMimeTypes.size>1&&e.h.has(t.type)){var n=e.h.get(t.type),i=oP(e.g.W,n.type),r=e.g.Tb();
1(n=s4(e,n,r,i))&&n.codecs&&n.mimeType&&(t.codecs=n.codecs,t.mimeType=n.mimeType)}}t=void 0!==t&&t;var i=new Map,r=e.o.audio;return r&&(n(r),i.set("audio",r)),(r=e.o.video)&&(n(r),i.set("video",r)),t&&e.B&&i.set(tc,e.B),i}function ud(){}function uh(e,t,n,i,r){for(var a=(r in i),o=new Set(["__proto__","constructor","prototype"]),s=a?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=a||s,l=!0,c=x(Object.keys(t)),d=c.next();!d.done;d=c.next()){var h=r+"."+(d=d.value),p=a?i[r]:n[d];o.has(d)?(W("Invalid config, dangerous key "+h),l=!1):u||d in n?void 0===t[d]?void 0===p||u?delete e[d]:e[d]=tV(p):s?e[d]=t[d]:p.constructor==Object&&t[d]&&t[d].constructor==Object?(e[d]||(e[d]=tV(p)),d=uh(e[d],t[d],p,i,h),l=l&&d):typeof t[d]!=typeof p||null==t[d]||"function"!=typeof t[d]&&t[d].constructor!=p.constructor?(W("Invalid config, wrong type for "+h),l=!1):"function"==typeof n[d]&&n[d].length!=t[d].length?(X("Unexpected number of arguments for "+h),e[d]=t[d]):e[d]=Array.isArray(e[d])?t[d].slice():t[d]:(W("Invalid config, unrecognized key "+h),l=!1)}return l}function up(e,t){for(var n={},i=n,r=0,a=0;!((r=e.indexOf(".",r))<0);)(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}(p=sX.prototype).destroy=function(){return this.l.destroy()},p.configure=function(e){if(this.i=e,this.$=new iX({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.ha&&(sj(t.ha),t.ha=null),t=x(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,sj(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(tc))&&t.ha&&(sj(t.ha),t.ha=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.ha&&(sj(t.ha),t.ha=null),n=(t=x(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).ha?(sU(n.ha,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(sj(n.ha),n.ha=null)):e.segmentPrefetchLimit>0&&(n.ha=s2(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=x(e.j.variants),r=i.next(),a={};!r.done;a={Ib:void 0},r=i.next())if(a.Ib=r.value,a.Ib.audio)if(e.m.has(a.Ib.audio)){if(sU(r=e.m.get(a.Ib.audio),t),!(t>0&&n.some(function(e){return function(t){return is(e.Ib.audio.language,t)}}(a)))){var o=e.h.get(a.Ib.audio.type);r!==(o&&o.ha)&&sj(r),e.m.delete(a.Ib.audio)}}else!(t<=0)&&n.some(function(e){return function(t){return is(e.Ib.audio.language,t)}}(a))&&(r=s2(e,a.Ib.audio))&&(a.Ib.audio.segmentIndex||a.Ib.audio.createSegmentIndex(),e.m.set(a.Ib.audio,r))}(this)},p.start=function(e){var t=this;return P(function(n){if(1==n.h){var i,r,a,o,s,u,l,c,d,h;return n.g((i=t,r=e||new Map,P(function(e){if(1==e.h){if(!i.o)throw new eJ(2,5,5006);return a=uc(i,!0),o=i.g.W,e.g(o.init(a,i.j.sequenceMode,i.j.type,i.j.ignoreManifestTimestampsInSegmentsMode),2)}for(rd(i.l),i.updateDuration(),u=(s=x(a.keys())).next();!u.done;u=s.next())l=u.value,c=a.get(l),i.h.has(l)||(d=s1(i,c),r.has(c.id)&&(function(e,t){e.l=t,e=x(e.g.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}(h=r.get(c.id),function(e,t,n){return s7(e,t,n||null,i.i.retryParameters,i.g.qc)}),d.ha=h),i.h.set(l,d),ut(i,d,0));uu(i),e.j()})),2)}rd(t.l),t.M=!0,n.j()})},p.Uc=function(){if(this.g){var e=this.g.Tb(),t=null!=this.O&&oe(e,this.O,.1);this.O=null,t||(this.N=!1);for(var n=x(this.h.keys()),i=n.next();!i.done;i=n.next()){var r,a=i.value;if(i=this.h.get(a),(r=!t)&&(r=this.g.W,r=!(r=a==tc?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:aX(r=oj(r,a),e))),r){if(this.S=0,i.ha&&(i.ha.h=null),"audio"===i.type){r=x(this.m.values());for(var o=r.next();!o.done;o=r.next())o.value.h=null}i.sa=null,(null!=oP(this.g.W,a)||i.Ja)&&s0(this,i),i.Wa&&(i.Wa.abort(),i.Wa=null),a===tc&&(a=this.g.W).J&&a.J.g.clear(),i.Uc=!0}!t||i.Qb||i.Ja||i.kb||ut(this,i,0)}us(this)&&ul(this)}},p.updateDuration=function(){var e=an(),t=this.j.presentationTimeline.getDuration();t<1/0?(e&&(this.u&&this.u.stop(),oF(this.g.W)),this.g.W.wb(t)):e?(this.u&&this.u.Fa(.5),this.g.W.wb(1/0)):this.g.W.wb(0x100000000)};function uf(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return!function e(t){for(var i=x(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])?(Object.keys(o=e(o,i[a])).length>0||!n(o))&&(r[a]=o):Array.isArray(o)&&Array.isArray(i[a])?ee(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 ug(){}function um(e){return new ey(e=e1(e)).Bb}function uv(e,t,n){function i(e){e_(a).setUint32(o,e.byteLength,!0),o+=4,a.set(eO(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new eJ(2,6,6015);
1var r="string"==typeof t?e4(t,!0):t,a=new Uint8Array(12+(e=e4(e=e1(e),!0)).byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function uy(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=e1(e).split("skd://").pop(),uv(e,n,t))}function ub(e,t){2===e&&(e=t.drmInfo)&&eq(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function uw(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=x(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function uT(e,t){return e.mimeType==t.mimeType&&ee(e=e.codecs.split(",").map(function(e){return nJ(e)}),t=t.codecs.split(",").map(function(e){return nJ(e)}))}function ux(){this.h=this.g=null}function uS(){}function uA(){var t=1/0,n=eu();navigator.connection&&navigator.connection.saveData&&(t=360);var i={retryParameters:iJ(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,i=um(t),t=uv(t,i,n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},r="reload";n.xb()&&(r="smooth");var a={retryParameters:iJ(),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,enableAudioGroups:!0,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:uE,manifestPreprocessorTXml:uC,sequenceMode:!1,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:n.Yc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:uE,manifestPreprocessorTXml:uC,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},o={trackSelectionCallback:function(e){return P(function(t){return t.return(e)})},downloadSizeCallback:function(e){var t;return P(function(n){return 1==n.h?navigator.storage&&navigator.storage.estimate?n.g(navigator.storage.estimate(),3):n.return(!0):(t=n.i,n.return(t.usage+e<.95*t.quota))})},progressCallback:function(e,t){},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:i,manifest:a,streaming:{retryParameters:iJ(),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:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(e){return""},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(e,t,n){},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new iK},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(ux,[null].concat(S(N.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",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,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:1/0,preloadPrevItem:!0,repeatMode:0}};return o.trackSelectionCallback=function(e){return P(function(t){return t.return(function(e,t,n){var i=n;"AUTO"==i&&(n=e.some(function(e){return!!e.hdr&&"HLG"==e.hdr}),i=eu().md(n));var r=e.filter(function(e){return"variant"==e.type&&(!e.hdr||e.hdr==i)});n=[];var a=ig(t,r.map(function(e){return e.language}));a&&(n=r.filter(function(e){return ic(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&&e.height<=480});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=x(e)).next();!n.done;n=e.next())(n=n.value).type!=tc&&"image"!=n.type||t.push(n);return t}(e,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},n.Xa(s)}function uk(){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 uI(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioR
1obustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return uh(e,t,n||uA(),i,"")}function uE(e){var t;return t=[e],t&&e}function uC(e){var t;return t=[e],t&&e}function uM(){this.g=null,this.h=[]}function uD(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=x(e.h);for(var i=e.next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function uR(){this.i=this.h=null,this.g=[]}function uL(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 uP(){this.C=this.X=NaN,this.l="",this.j=this.si=this.u=this.B=this.K=this.D=this.o=this.m=this.J=this.G=this.i=this.S=this.T=this.N=this.O=this.P=NaN,this.M=0,this.H=this.I=NaN,this.g=new uM,this.h=new uR}H("shaka.util.ConfigUtils",ud),ud.getDifferenceFromConfigObjects=uf,ud.convertToConfigObject=up,ud.mergeConfigObjects=uh,H("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2}),H("shaka.drm.FairPlay",ug),ug.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&eq(e.keySystem)){try{var n=eZ(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=ej(e7(n)))}},ug.muxFairPlayRequest=function(e,t){ub(e,t)},ug.expressplayFairPlayRequest=function(e,t){if(2===e){var n=t.drmInfo;n&&eq(n.keySystem)&&ub(e,t)}},ug.conaxFairPlayRequest=function(e,t){ub(e,t)},ug.ezdrmFairPlayRequest=function(e,t){ub(e,t)},ug.verimatrixFairPlayRequest=function(e,t){2===e&&(e=t.drmInfo)&&eq(e.keySystem)&&(e=e9(e=eO(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=e2("spc="+e))},ug.muxInitDataTransform=function(e,t,n){return uy(e,t,n)},ug.expressplayInitDataTransform=function(e,t,n){return uy(e,t,n)},ug.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=e1(t).split("skd://").pop().split("?").shift();var r=new ArrayBuffer(2*(i=e.atob(i)).length);r=eU(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return uv(t,r,n)},ug.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,n=e1(e).split(";").pop(),uv(e,n,t))},ug.verimatrixInitDataTransform=function(e,t,n){return uy(e,t,n)},ug.initDataTransform=uv,ug.defaultGetContentId=um,ug.isFairPlaySupported=function(){var e;return P(function(t){return 1==t.h?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.h?t.return(!0):(t.l(),t.return(!1))})},uw.prototype.add=function(e,t){var n,i=this.h;if(t=void 0===t||t,!(n=!!i.audio!=!!e.audio||!!i.video!=!!e.video||i.language!=e.language)&&(n=i.audio&&e.audio)){n=i.audio;var r=e.audio;n=!(!((!n.channelsCount||!r.channelsCount||n.channelsCount>2||r.channelsCount>2)&&n.channelsCount!=r.channelsCount||n.spatialAudio!==r.spatialAudio||t&&!uT(n,r))&&ee(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||uT(i,n))&&ee(i.roles,n.roles))),!n&&(this.g.add(e),!0)},uw.prototype.values=function(){return this.g.values()},H("shaka.media.AdaptationSet",uw),ux.prototype.configure=function(e){this.g=e},ux.prototype.getConfiguration=function(){return this.g},ux.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=(p=e,(g=ig(f=ic(f=this.g.language),p.map(function(e){return ip(e)})))?p.filter(function(e){return g==ip(e)}):[]);v.length&&(m=v)}m||(m=(m=e.filter(function(e){return e.primary})).length?m:e),(t=m,n=this.g.role,e=t.filter(function(e){return!!e.audio&&(n?e.audio.roles.includes(n):0==e.audio.roles.length)})).length&&(m=e),(i=m,r=this.g.videoRole,e=i.filter(function(e){return!!e.video&&(r?e.video.roles.includes(r):0==e.video.roles.length)})).length&&(m=e),this.g.videoLayout&&(a=m,o=this.g.videoLayout,e=a.filter(function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==o})).length&&(m=e),this.g.hdrLevel&&(e=function(e,t){if("AUTO"==t){var n=e.some(function(e){return!!e.video&&!!e.video.hdr&&"HLG"==e.video.hdr});t=eu().md(n)}return e.filter(function(e){return!e.video||!e.video.hdr||e.video.hdr==t})}(m,this.g.hdrLevel)).length&&(m=e);var y=[this.g.channelCount,this.g.preferredAudioChannelCount];
1if((e=y.filter(function(e,t){return e&&y.indexOf(e)===t})).length){for(v=(e=x(e)).next();!v.done;v=e.next())if((v=function(e,t){return e.filter(function(e){return!e.audio||!e.audio.channelsCount||!(e.audio.channelsCount>t)}).sort(function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0})}(m,v.value)).length){m=v;break}}this.g.audioLabel&&(s=m,u=this.g.audioLabel,e=s.filter(function(e){return!!e.audio&&!!e.audio.label&&e.audio.label.toLowerCase()==u.toLowerCase()})).length&&(m=e),this.g.videoLabel&&(l=m,c=this.g.videoLabel,e=l.filter(function(e){return!!e.video&&!!e.video.label&&e.video.label.toLowerCase()==c.toLowerCase()})).length&&(m=e),(d=m,h=this.g.spatialAudio,e=d.filter(function(e){return!e.audio||e.audio.spatialAudio==h})).length&&(m=e);var b=[this.g.audioCodec,this.g.activeAudioCodec].concat(S(this.g.preferredAudioCodecs));if((e=b.filter(function(e,t){return e&&b.indexOf(e)===t})).length){for(v=(e=x(e)).next();!v.done;v=e.next())if((v=function(e,t){return e.filter(function(e){return!e.audio||e.audio.codecs==t})}(m,v.value)).length){m=v;break}}return e=eu(),e="smooth"==this.g.codecSwitchingStrategy&&e.xb(),this.h=new uw(m[0],m,!e)},ux.prototype.getLastAdaptationSet=function(){return this.h},H("shaka.util.PlayerConfiguration",uS),uS.mergeConfigObjects=uI,uS.createDefaultForLL=uk,uS.createDefault=uA;function uN(e,t){e.j=isNaN(e.j)?t:e.j+t}function uj(e,t,n,i){i8.call(this),this.N=e,this.T=t,this.Ca=i.networkingEngine,this.o=n,this.C=null,this.za=0,this.Ka=i.ed,this.G=i.wk,this.Ua=i.xk,this.g=i.config,this.m=this.H=this.h=null,this.qa=!1,this.I=i.Kk,this.va=!1,this.j=null,this.aa=!1,this.u=null,this.M=new Map,this.ya=!1,this.Ha=i.Jk,this.X=new uP,this.ia=new i$,this.B=new i$,this.O=null,this.l=!1,this.$=i.nj,this.S=this.i=null,this.P=!1,this.K=[],this.J=[],this.D=!0}function uO(e,t,n){(e=t?e.J:e.K)?e.push(n):n()}function uU(e,t){if(e.O=t,e.P=!0,e.K){t=x(e.K);for(var n=t.next();!n.done;n=t.next())(n=n.value)()}e.K=null}function u_(e){if(e.l)throw new eJ(2,7,7003)}function uB(e,t){e.dispatchEvent(new i3("onstatechange",(new Map).set("state",t)))}function uF(e,t){var n,i,r;return P(function(a){switch(a.h){case 1:if(!e.h||e.j)return a.return();return uB(e,"drm-engine"),e.za=Date.now()/1e3,e.j=e.Ka(),e.G.g=e.j,e.j.configure(e.g.drm,function(){return e.D}),n=iP(e.h.variants),i=!0,e.h&&e.h.presentationTimeline&&(i=e.h.presentationTimeline.U()),a.g(rL(e.j,n,e.h.offlineSessionIds,i),2);case 2:if(u_(e),!t){a.A(3);break}return a.g(e.j.Pb(t),4);case 4:u_(e);case 3:return a.g(r5(e.G,e.h),5);case 5:if(!a.i){a.A(0);break}return r=new i3("trackschanged",void 0),a.g(Promise.resolve(),7);case 7:e.dispatchEvent(r),a.j()}})}function uV(e){if(!e.u){var t=e.g.abrFactory;e.u=t(),e.u.configure(e.g.abr)}return t=iP(e.h.variants),t=e.C.create(t),e.u.setVariants(Array.from(t.values())),e.u.chooseVariant(!0)}function uH(e,t,n){var i,r,a,o;return P(function(s){return 1==s.h?(i=new sR(e.g.streaming.segmentPrefetchLimit||2,t,function(t,n,i){return s7(t,n,i||null,e.g.streaming.retryParameters,e.Ca,e.D)},!1),e.M.set(t.id,i),t.segmentIndex?s.A(2):s.g(t.createSegmentIndex(),2)):(r="number"==typeof e.o?e.o:0,a=t.segmentIndex.Rb(r),o=null,a&&((o=a.current())||(o=a.next().value)),o||(o=t.segmentIndex.Cb()),o?n?o.ba?s.g(sP(i,o.ba),0):s.A(0):s.g(sL(i,o.startTime),0):s.A(0))})}function uG(e){var t,n,i,r;return P(function(a){for(t=[],i=(n=x([e.video,e.audio])).next();!i.done;i=n.next())(r=i.value)&&!r.segmentIndex&&t.push(r.createSegmentIndex());return t.length>0?a.g(Promise.all(t),0):a.A(0)})}function uK(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))}function uq(e,t){i8.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{cd:null,bd:uX,Oc:function(e,t){return uz(n,"enter",e,t)}},{cd:uW,bd:uX,Oc:function(e,t){return uz(n,"enter",e,t)}},{cd:uY,bd:uX,Oc:function(e,t){return uz(n,"enter",e,t)}},{cd:uX,bd:uW,Oc:function(e,t){return uz(n,"exit",e,t)}},{cd:uX,bd:uY,Oc:function(e,t){return uz(n,"exit",e,t)}},{cd:uW,bd:uY,Oc:function(e,t){t?uz(n,"skip",e,t):(uz(n,"enter",e,t),uz(n,"exit",e,t))}},{cd:uY,bd:uW,Oc:function(e,t){return uz(n,"skip",e,t)}}],this.h=new er,this.h.F(this.i,"regionremove",function(e){n.g.delete(e.region)})}function uz(e,t,n,i){t=new i3(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}w(uj,i8),(p=uj.prototype).getStartTime=function(){return this.o},p.kd=function(){return this.N},p.Gg=function(){return this.h}
1,p.getStats=function(){return this.X},p.Tj=function(){return this.i?iI(this.i):null},p.Sj=function(){return this.S?iE(this.S):null},p.start=function(){var t,n=this;P(function(i){var r,a,o,s,u,l,c,d,h,p,f,g,m;switch(i.h){case 1:return i.g(Promise.resolve(),2);case 2:return i.m(3),i.g((r=n,P(function(e){switch(e.h){case 1:if(uB(r,"manifest-parser"),r.m||(r.H=tw(r.N,r.T),r.m=r.H(),r.m.configure(r.g.manifest,function(){return r.D})),a=Date.now()/1e3,uB(r,"manifest"),r.h){e.A(2);break}return e.g(r.m.start(r.N,r.Ua),3);case 3:var t;return r.h=e.i,uK(r.h),e.g((t=r,P(function(e){return(t.C||(t.C=t.g.adaptationSetCriteriaFactory(),t.C.configure({language:t.g.preferredAudioLanguage,role:t.g.preferredAudioRole,videoRole:t.g.preferredVideoRole,channelCount:0,hdrLevel:t.g.preferredVideoHdrLevel,spatialAudio:t.g.preferSpatialAudio,videoLayout:t.g.preferredVideoLayout,audioLabel:t.g.preferredAudioLabel,videoLabel:t.g.preferredVideoLabel,codecSwitchingStrategy:t.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:t.g.preferredAudioCodecs,preferredAudioChannelCount:t.g.preferredAudioChannelCount})),t.i||!t.h.variants.length||1!=t.h.variants.length&&"HLS"!=t.h.type)?e.A(0):(t.i=uV(t),t.i?e.g(uG(t.i),0):e.A(0))})),2);case 2:return r.ia.resolve(),o=new i3("manifestparsed",void 0),e.g(Promise.resolve(),5);case 5:if(r.dispatchEvent(o),0==r.h.variants.length)throw new eJ(2,4,4036);if(uK(r.h),!r6(r.G,r.h)){e.A(6);break}return s=new i3("trackschanged",void 0),e.g(Promise.resolve(),7);case 7:u_(r),r.dispatchEvent(s);case 6:(u=Date.now()/1e3-a)>=0&&(r.X.J=u),e.j()}})),5);case 5:if(u_(n),"webkit"===e.shakaMediaKeysPolyfill){i.A(6);break}return i.g(uF(n),7);case 7:u_(n);case 6:return i.g((l=n,P(function(e){var t,n,i,r,a;return 1==e.h?!l.i||l.h.variants.includes(l.i)?e.A(0):e.g((t=l.i,P(function(e){for(n=[],r=(i=x([t.video,t.audio])).next();!r.done;r=i.next())(a=r.value)&&a.segmentIndex&&a.closeSegmentIndex&&n.push(a.closeSegmentIndex());return n.length>0?e.g(Promise.all(n),0):e.A(0)})),3):(l.i=uV(l),l.i?e.g(uG(l.i),0):e.A(0))})),8);case 8:if(u_(n),!n.$){i.A(9);break}return i.g((c=n,P(function(e){return(!c.i&&(d=uV(c))&&(c.i=d),c.i)?(h=c.h.presentationTimeline.U(),p=[],(f=c.i).video&&p.push(uH(c,f.video,h)),f.audio&&p.push(uH(c,f.audio,h)),(g=iN(c.h.textStreams,c.g.preferredTextLanguage,c.g.preferredTextRole,c.g.preferForcedSubs)[0]||null)&&i_(f.audio,g,c.g)&&(p.push(uH(c,g,h)),c.S=g),e.g(Promise.all(p),0)):e.A(0)})),10);case 10:u_(n);case 9:if(!n.$||!n.j){i.A(11);break}return i.g((m=n.j,P(function(e){return 1==e.h?!m.K||rH(m)?e.A(0):e.g(m.m,3):e.g(Promise.all(m.X.map(function(e){return e.promise})),0)})),12);case 12:u_(n);case 11:n.B.resolve(),i.o(0);break;case 3:(t=i.l())instanceof eJ&&(7001==t.code||7003==t.code)||n.B.reject(t),i.j()}})},p.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):i8.prototype.dispatchEvent.call(this,e)},p.onError=function(e){2===e.severity&&(this.B.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new i3("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},p.configure=function(e,t){e=up(e,t),uI(this.g,e)},p.getConfiguration=function(){return tV(this.g)},p.rl=function(){return this.B},p.destroy=function(){var e,t,n=this;return P(function(i){if(1==i.h)return n.l=!0,!n.m||n.qa?i.A(2):i.g(n.m.stop(),2);if(4!=i.h)return n.u&&n.u.release(),n.I&&!n.va&&n.I.release(),!n.j||n.aa?i.A(4):i.g(n.j.destroy(),4);if(n.M.size>0&&!n.ya)for(t=(e=x(n.M.values())).next();!t.done;t=e.next())sj(t.value);i.j()})},H("shaka.media.PreloadManager",uj),uj.prototype.destroy=uj.prototype.destroy,uj.prototype.waitForFinish=uj.prototype.rl,uj.prototype.getPrefetchedTextTrack=uj.prototype.Sj,uj.prototype.getPrefetchedVariantTrack=uj.prototype.Tj,w(uq,i8),uq.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,i8.prototype.release.call(this)},uq.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=x(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?uW:e>i.endTime?uY:uX;this.g.set(i,a);for(var o=x(this.m),s=o.next();!s.done;s=o.next())(s=s.value).cd==r&&s.bd==a&&s.Oc(i,t)}}};for(var uW=1,uX=2,uY=3,uJ={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(
1বাংলাদেশ)","bs-BA":"Bosanski",ca:"Catal\xe0","ca-ES":"Catal\xe0",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\xd6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Espa\xf1ol","es-AR":"Espa\xf1ol (Argentine)","es-419":"Espa\xf1ol (Latinoam\xe9rica)","es-CL":"Espa\xf1ol (Chile)","es-CO":"Espa\xf1ol (Colombia)","es-EC":"Espa\xf1ol (Ecuador)","es-ES":"Espa\xf1ol (Espa\xf1a)","es-LA":"Espa\xf1ol (Latinoam\xe9rica)","es-NI":"Espa\xf1ol (Nicaragua)","es-MX":"Espa\xf1ol (M\xe9xico)","es-US":"Espa\xf1ol (Estados Unidos)","es-VE":"Espa\xf1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\xf8royskt",fr:"Fran\xe7ais","fr-CA":"Fran\xe7ais (Canada)","fr-FR":"Fran\xe7ais (France)","fr-BE":"Fran\xe7ais (Belgique)","fr-CH":"Fran\xe7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\xf1e'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Krey\xf2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\xcdslenska","is-IS":"\xcdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurd\xee","ku-TR":"Kurd\xee",la:"Latin","la-VA":"Latin",lb:"L\xebtzebuergesch","li-NL":"L\xe8mb\xf6rgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokm\xe5l)","nb-NO":"Norsk (bokm\xe5l)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (Belgi\xeb)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Portugu\xeas","pt-BR":"Portugu\xeas (Brasil)","pt-PT":"Portugu\xeas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\xe2nă","ro-RO":"Rom\xe2nă",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvis\xe1megiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"T\xfcrk\xe7e","tr-TR":"T\xfcrk\xe7e","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},u$=x(Object.keys(uJ)),uQ=u$.next();!uQ.done;uQ=u$.next()){var uZ=uQ.value;uJ[uZ.toLowerCase()]=uJ[uZ]}function u0(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("#")&&e.length>
17&&(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 u1(e,t){var n=[];e=x(u2(e));for(var i=e.next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,S(u1(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>=nD,a=t.fontStyle==nL,o=t.textDecoration.includes(nN);return r&&i.push(["b"]),a&&i.push(["i"]),o&&i.push(["u"]),""==(a=t.color)&&n&&(a=n.color),r="",(a=u0(a))&&(r+="."+a),""==(a=t.backgroundColor)&&n&&(a=n.backgroundColor),(n=u0(a))&&(r+=".bg_"+n),r&&i.push(["c",r]),i.reduceRight(function(e,t){var n=x(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 u2(e){var t=[];e=x(e);for(var n=e.next(),i={};!n.done;i={hg:void 0},n=e.next())i.hg=n.value,t.some(function(e){return function(t){return np(e.hg,t)}}(i))||t.push(i.hg);return t}function u4(e,t){var n=u1(t),i=[];t=e.cues?Array.from(e.cues):[],n=x(n);for(var r=n.next(),a={};!r.done;a={qd:void 0},r=n.next())a.qd=r.value,!t.some(function(e){return function(t){return t.startTime==e.qd.startTime&&t.endTime==e.qd.endTime&&t.text==e.qd.payload}}(a))&&a.qd.payload&&(r=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}(a.qd))&&i.push(r);for(n=(t=x(t=i.slice().sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)}))).next();!n.done;n=t.next())e.addCue(n.value)}function u3(e,t){var n=!1;"disabled"===e.mode&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function u5(e){var t=this;this.i=e,this.l=new er,this.j=null,this.h=new Map,this.g=-1,this.u=!1,this.m=null,this.C=function(){var e;null==(e=t.m)||e.stop(),t.m=null,t.l.Oa(t.i,"textchanged",t.o),t.l.Oa(t.j.textTracks,"change",t.B),e=x(t.h.values());for(var n=e.next();!n.done;n=e.next())n.value.remove();t.h.clear(),t.g=-1,t.j=null},this.o=function(){var e=new Map,n=t.i.Gc();n=x(n);for(var i=n.next();!i.done;i=n.next()){if(i=i.value,t.h.has(i.id)){var r=t.h.get(i.id);i.active||"disabled"===r.track.mode||(r.track.mode="disabled"),t.h.delete(i.id)}else{var a=r=t.j.ownerDocument.createElement("track"),o=eu();if(o=i.forced&&"WEBKIT"===o.Ia()?"forced":"caption"===i.kind?"captions":"subtitles",a.kind=o,a=r,o=void 0,i.label)o=i.label;else if(i.language)if(i.language in uJ)o=uJ[i.language];else{var s=ih(i.language);s in uJ&&(o=uJ[s]+" ("+i.language+")")}o||(o=i.originalTextId,i.language&&i.language!==i.originalTextId&&(o+=" ("+i.language+")")),a.label=o,i.language?i.language in uJ?r.srclang=i.language:(a=ih(i.language),o=void 0,r.srclang=null!=(o=a)?o:"und"):r.srclang="und",r.src="data:,WEBVTT",r.track.mode="disabled",t.j.appendChild(r)}e.set(i.id,r),i.active&&(t.g=i.id)}for(i=(n=x(t.h.values())).next();!i.done;i=n.next())i.value.remove();t.g>-1&&(e.has(t.g)?"disabled"===(n=e.get(t.g).track).mode&&(n.mode=t.u?"showing":"hidden"):t.g=-1),t.h=e},this.B=function(){if(!t.m){var e=t.j;t.m=new n7(function(){if(t.m=null,t.j===e){var n=-1,i=!1;if(t.h.has(t.g)){var r=t.h.get(t.g);"showing"===r.track.mode?(n=t.g,i=!0):"hidden"===r.track.mode&&(n=t.g)}if(!i)for(r=(i=x(t.h)).next();!r.done;r=i.next()){var a=x(r.value);if(r=a.next().value,"showing"===(a=a.next().value).track.mode){n=r;break}n<0&&"hidden"===a.track.mode&&(n=r)}for(r=(i=x(t.h)).next();!r.done;r=i.next())r=(a=x(r.value)).next().value,a=a.next().value,r!==n&&"disabled"!==a.track.mode&&(a.track.mode="disabled");t.g!==n&&(t.g=n,n>-1&&t.i.oh({id:n})),t.i.sh(n>-1&&"showing"===t.h.get(n).track.mode)}}).na(0)}},this.l.F(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}function u6(e,t){for(ep("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,t=(e=x(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 u8(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function u9(){}function u7(t,n){var i=this;this.j=!1,this.h=[],this.m=t,this.l=n,this.C=this.u=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.B=new n7(function(){i.m.paused||lt(i)}),le(this),this.o=new Map,this.i=new er,this.i.F(document,"fullscreenchange",function(){lt(i,!0)}),this.i.F(this.m,"seeking",function(){lt(i,!0)}),this.i.F(this.m,"ratechange",function(){le(i)}),this.i.F(this.m,"resize",function(){var e=i.m,t=e.videoWidth;e=e.videoHeight,t&&e?i.u=t/e:i.u=null}),this.H=!1,this.D=null,"ResizeObserver"in e&&(this.D=new ResizeObserver(function(){i.H||(i.H=!0,requestAnimationFrame(function(){i.H=!1,i.g&&i.g.parentElement&&i.j&&lt(i,!0)}))}),this.D.observe(this.l)),this.G=new Map}function le(e){e.B&&(e.h.length?e.B.Fa((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.m.playbackRate))):e.B.stop())}function lt(e,t){if(e.g){var n=e.m.currentTime;if(!e.j||(void 0===t?0:t)){t=x(e.G.values());for(var i=t.next();!i.done;i=t.next())a0(i.value);a0(e.g),e.o.clear(),e.G.clear()}e.j&&function e(t,n,i,r,a){var o=!1,s=[],u=[];n=x(n);for(var l=n.next();!l.done;l=n.next()){l=l.value,a.push(l);var c=t.o.get(l),d=l.startTime<=r&&l.endTime>r,h=c?c.lj:null;c&&(s.push(c.jg),c.Tc&&s.push(c.Tc),d||(o=!0,t.o.delete(l),c=null)),d&&(u.pu
1sh(l),c?function(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}(t,h)||(o=!0):(function(e,t,n){var i=n.length>1,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&t.nestedCues.length>0;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=i.length>1;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=ln(n.linePadding,n,e.l),u.paddingRight=ln(n.linePadding,n,e.l),u.textCombineUpright=n.textCombineUpright,u.textShadow=n.textShadow,n.backgroundImage)u.backgroundImage="url('"+n.backgroundImage.replace(/['"()\\]/g,"")+"')",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;n>=0;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.setAttribute("translate","no"),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="flex-start"):("right"==n.textAlign||"end"==n.textAlign)&&(u.width="100%",u.alignItems="flex-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,(1!==(i=e.C?e.C.fontScaleFactor:1)||n.fontSize)&&(u.fontSize=ln(n.fontSize||"1em",n,e.l,i)),null!=(i=n.line)&&((l=n.lineInterpretation)==nA&&(l=1,c=16,e.u&&e.u<1&&(c=32),i=i<0?100+i/c*100:i/c*100),1==l&&(u.position="absolute",n.writingMode==nS?(u.width="100%",n.lineAlign==nk?u.top=i+"%":"end"==n.lineAlign&&(u.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(u.height="100%",n.lineAlign==nk?u.left=i+"%":"end"==n.lineAlign&&(u.right=100-i+"%")):(u.height="100%",n.lineAlign==nk?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!==nv?s:"left"===a||"start"===a&&o===nx||"end"===a&&"rtl"===o?"line-left":"right"===a||"start"===a&&"rtl"===o||"end"===a&&o===nx?"line-right":"center")?(u.cssFloat="left",null!==n.position&&(u.position="absolute",n.writingMode==nS?(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==nS?(u.right=100-n.position+"%",u.width="auto"):u.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(u.position="absolute",n.writingMode==nS?(u.left=n.position+"%",u.width="auto"):u.top=n.position+"%",n.size&&(u.transform="translateX(-50%)")),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==nS?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.u===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==tR?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==tR?"%":"px")+"-"+o.regionAnchorX+"x"+o.regionAnchorY,e.G.has(n))n=e.G.get(n);else{r=document.createElement("span");var u=o.heightUnits==tR?"%":"px",l=o.widthUnits==tR?"%":"px",c=o.viewportAnchorUnits==tR?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=o.height,h=o.width;2===o.heightUnits&&(d=5.33*o.height,u="%"),2===o.widthUnits&&(h=o.width*s,l="%"),r.style.height=d+u,r.style.width=h+l,2===o.viewportAnchorUnits?(s=o.viewportAnchorY/75*100,u=o.viewportAnchorX/(e.u===4/3?160:210)*100,s-=o.regionAnchorY*d/100,u-=o.regionAnchorX*h/100,r.style.top=s+"%",r.style.left=u+"%"):(r.style.top=o.viewportAnchorY-o.regionAnchorY*d/100+c,r.style.left=o.viewportAnchorX-o.regionAnchorX*h/100+c),0!==o.heightUnits&&0!==o.widthUnits&&0!==o.viewportAnchorUnits&&(o=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=o+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.G.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.o.set(t,{jg:a,lj:r,Tc:n})}(t,l,a),h=(c=t.o.get(l)).lj,o=!0)),l.nestedCues.length>0&&h&&e(t,l.nestedCues,h,r,a),a.pop()}if(o){for(a=(r=x(s)).next();!a.done;a=r.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(u.sort(function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime}),r=(u=x(u)).next();!r.done;r=u.next())(r=t.o.get(r.value)).Tc?(r.Tc.contains(i)&&r.Tc.removeChild(i),i.appendChild(r.Tc),r.Tc.appendChild(r.jg)):i.appendChild(r.jg)}}(e,e.h,e.g,n,[])}}function ln(e,t,n,i){i=void 0===i?1:i;
1var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function li(e,t){this.g=t,this.j=e,this.m=new Map,this.l=void 0,this.D=!1,this.J=!0,this.u=this.I=!1,this.C=this.B=void 0,this.H=0,this.K={request:!1,response:!1,event:!1},this.o={},this.i=new er,this.G=[],this.h=null}function lr(e){if(e.G)for(var t=x(e.G),n=t.next();!n.done;n=t.next())n.value.stop();e.G=[]}function la(e){return(e=e.g.targets)?e.filter(function(e){return e.mode===lV&&e.enabled}):[]}function lo(e){return(e=e.g.targets)?e.filter(function(e){return e.mode===lF&&!0===e.enabled}):[]}function ls(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:t.g.version,sf:t.l,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.j.getBandwidthEstimate()/1e3}}function lu(e,t,n){if(n=void 0===n?{}:n,t=lm(e,t=Object.assign({e:t,ts:Date.now()},n),lV),n=e.g.targets,!(e.g.version<lI)&&n){var i=la(e);n=Array.from(new Set([].concat(S(lD),S(lP)))),i=x(i);for(var r=i.next();!r.done;r=i.next()){var a=ld((r=r.value).includeKeys||[],n);a.includes(lU)||a.push(lU),a=lh(t,a);var o=r.events||[],s=a.e,u=a.sta;s&&(!lN.includes(s)||!("ps"!==s||u&&lj.includes(u))||o&&o.length>0&&!o.includes(s))||lc(e,a,r)}}}function ll(e,t,n){if(e.g.enabled){n=lm(e,n,lB);var i=lp({mode:lB,useHeaders:e.g.useHeaders,includeKeys:e.g.includeKeys||[]});e.o[i]||(e.o[i]={request:1,response:1}),n.sn=e.o[i].request++,n=lh(n,i=ld(i=e.g.includeKeys||[],e.g.version==lI?Array.from(new Set([].concat(S(lD),S(lR)))):lM)),function(e,t,n,i){if(i){if(!Object.keys(t=ly(t)).length)return;Object.assign(n.headers,t)}else{var r=lv(t);if(!r)return;n.uris=n.uris.map(function(e){return lb(e,r)})}lo(e).length>0||!e.m.has(n)||e.m.delete(n)}(e,n,t,e.g.useHeaders)}}function lc(e,t,n,i){var r=iJ(),a=n.url;if(n.useHeaders){if(!Object.keys(t=ly(t)).length)return;i&&Object.assign(i.headers,t),Object.assign((i=ri([a],r)).headers,t)}else{if(!(t=lv(t)))return;a=lb(a,t),i&&(i.uri=a),i=ri([a],r)}e.j.Sb().request(9,i)}function ld(e,t){if(!e||0===e.length)return t;for(var n=x(e),i=n.next();!i.done;i=n.next())t.includes(i.value);return e.filter(function(e){return t.includes(e)})}function lh(e,t){return Object.keys(e).reduce(function(n,i){return t.includes(i)&&(n[i]=e[i]),n},{})}function lp(e){return JSON.stringify(Object.keys(e).sort().reduce(function(t,n){return"enabled"!==n&&(t[n]=e[n]),t},{}))}function lf(e,t){if(!(t=e.j.Cc()[t]).length)return 0;var n=e.h?e.h.currentTime:0;return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?(e.end-n)*1e3:0}function lg(e,t,n){var i=t.segment,r=0;i&&(r=i.endTime-i.startTime),(r={d:1e3*r,st:e.j.U()?lC:lE}).ot=function(e){if(0===e.type)return lS;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?lx:lT;if("audio"==t)return lw;if("text"==t)return"application/mp4"===e.mimeType?lk:lA}}(t);var a=r.ot===lT||r.ot===lw||r.ot===lx||r.ot===lk;if(t=t.stream){var o=e.j.Db();if(a&&(r.bl=function(e,t){if(!(t=e.j.Cc()[t]).length)return NaN;var n=e.h?e.h.currentTime:0;return(e=t.find(function(e){return e.start<=n&&e.end>=n}))?(e.end-n)*1e3:NaN}(e,t.type),r.ot!==lk)){var s=lf(e,t.type);r.dl=o?s/Math.abs(o):s}if(t.bandwidth&&(r.br=t.bandwidth/1e3),t.segmentIndex&&i){if((o=t.segmentIndex.Rb(i.endTime,!0,o<0))&&(o=o.next().value)&&o!=i){if(n&&!en(i.R(),o.R())){var u=o.R()[0];s=new URL(u);var l=new URL(n);if(s.origin!==l.origin)n=u;else{n=s.pathname.split("/").slice(1),u=l.pathname.split("/").slice(1,-1),l=Math.min(n.length,u.length);for(var c=0;c<l&&n[c]===u[c];c++)n.shift(),u.shift();for(;u.length;)u.shift(),n.unshift("..");n=n.join("/")+s.search+s.hash}r.nor=n}(o.startByte||o.endByte)&&(i.startByte!=o.startByte||i.endByte!=o.endByte)&&(n=o.startByte+"-",o.endByte&&(n+=o.endByte),r.nrr=n)}o=e.j.Db()||1,n=lf(e,t.type)||500,isNaN(i=(t=t.bandwidth)?t*(i.endTime-i.startTime)/1e3/(n/o/1e3)*e.g.rtpSafetyFactor:NaN)||(r.rtp=i)}}return a&&r.ot!==lk&&(r.tb=function(e,t){var n=e.j.kc();if(!n.length)return NaN;e=n[0],n=x(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 lT:return e.videoBandwidth||NaN;
1case lw:return e.audioBandwidth||NaN;default:return e.bandwidth}}(e,r.ot)/1e3),r}function lm(e,t,n){Object.assign(t,ls(e)),t.pr=e.j.Db();var i=t.ot===lT||t.ot===lx;return e.I&&i&&(t.bs=!0,t.su=!0,e.I=!1),null==t.su&&(t.su=e.J),e.j.U()&&(t.ltc=(i=ch(e.j))||void 0),document.hidden&&(t.bg=!0),void 0==(i=e.C&&e.B?e.C-(e.H||e.B):void 0)||e.K[n]||(t.msd=i,e.K[n]=!0),t}function lv(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,ttfb:n,ttlb:n},a=Object.keys(e||{}).sort();a=x(a);for(var o=a.next();!o.done;o=a.next()){var s,u=e[o=o.value];if(!Number.isNaN(s=u)&&null!=s&&""!==s&&!1!==s&&("v"!==o||1!==u)&&("pr"!=o||1!==u)){var l=r[o];l&&(u=l(u));var c=void 0;c="string"==(l=typeof u)&&"ot"!==o&&"sf"!==o&&"st"!==o?o+"="+JSON.stringify(u):"boolean"===l?o:"symbol"===l?o+"="+u.description:o+"="+u,i.push(c)}}return i.join(",")}function ly(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};t=x(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=lv(r[e]))&&(n["CMCD-"+i[e]]=a);return n}function lb(e,t){return!t||e.includes("offline:")?e:((e=new ey(e)).g.set("CMCD",t),e.toString())}(p=u5.prototype).configure=function(){},p.remove=function(e,t){return!!this.i&&(this.h.has(this.g)&&u3(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e}),!0)},p.append=function(e){this.h.has(this.g)&&u4(this.h.get(this.g).track,e)},p.destroy=function(){var e,t;return this.i&&(this.j&&this.C(),this.i=null),null==(e=this.m)||e.stop(),this.m=null,null==(t=this.l)||t.release(),this.l=null,Promise.resolve()},p.isTextVisible=function(){return this.u},p.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;"disabled"!==t.mode&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&3===this.i.Vd())if(t=Array.from(this.i.Xe().textTracks).filter(function(e){return["captions","subtitles","forced"].includes(e.kind)}),e){e=null,t=x(t);for(var n=t.next();!n.done;n=t.next())if("showing"===(n=n.value).mode){e=null;break}else e||"hidden"!==n.mode||(e=n);e&&(e.mode="showing")}else for(t=(e=x(t)).next();!t.done;t=e.next())"showing"===(t=t.value).mode&&(t.mode="hidden")},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.Vd()&&(this.j=this.i.Xe(),this.l.Ba(this.i,"unloading",this.C),this.l.F(this.i,"textchanged",this.o),this.l.F(this.j.textTracks,"change",this.B),this.o())},H("shaka.text.NativeTextDisplayer",u5),u5.prototype.enableTextDisplayer=u5.prototype.enableTextDisplayer,u5.prototype.setTextLanguage=u5.prototype.setTextLanguage,u5.prototype.setTextVisibility=u5.prototype.setTextVisibility,u5.prototype.isTextVisible=u5.prototype.isTextVisible,u5.prototype.destroy=u5.prototype.destroy,u5.prototype.append=u5.prototype.append,u5.prototype.remove=u5.prototype.remove,u5.prototype.configure=u5.prototype.configure,(p=u6.prototype).configure=function(){},p.remove=function(e,t){return!!this.g&&(u3(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},p.append=function(e){this.g&&u4(this.g,e)},p.destroy=function(){return this.g&&(u3(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},p.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},p.setTextVisibility=function(e){e&&!this.g&&u8(this),this.g&&(this.g.mode=e?"showing":"hidden")},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){u8(this)},H("shaka.text.SimpleTextDisplayer",u6),u6.prototype.enableTextDisplayer=u6.prototype.enableTextDisplayer,u6.prototype.setTextLanguage=u6.prototype.setTextLanguage,u6.prototype.setTextVisibility=u6.prototype.setTextVisibility,u6.prototype.isTextVisible=u6.prototype.isTextVisible,u6.prototype.destroy=u6.prototype.destroy,u6.prototype.append=u6.prototype.append,u6.prototype.remove=u6.prototype.remove,u6.prototype.configure=u6.prototype.configure,(p=u9.prototype).configure=function(){},p.remove=function(){},p.append=function(){},p.destroy=function(){},p.isTextVisible=function(){return!1},p.setTextVisibility=function(){},p.setTextLanguage=function(){},p.enableTextDisplayer=function(){},H("shaka.text.StubTextDisplayer",u9),u9.prototype.enableTextDisplayer=u9.prototype.enableTextDisplayer,u9.prototype.setTextLanguage=u9.prototype.setTextLanguage,u9.prototype.setTextVisibility=u9.prototype.setTextVisibility,u9.prototype.isTextVisible=u9.prototype.isTextVisible,u9.prototype.destroy=u9.prototype.destroy,u9.prototype.append=u9.prototype.append,u9.prototype.remove=u9.prototype.remove,u9.prototype.configure=u9.prototype.configure,(p=u7.prototype).configure=function(e){this.C=e,le(this),lt(this,!0)},p.append=function(e){var t=[].concat(S(this.h));e=x(u2(e));for(var n=e.next(),i={};!n.done;i={ig:void 0},n=e.next())i.ig=n.value,t.some(function(e){return function(t){return np(t,e.ig)}}(i))||this.h.push(i.ig);this.h.length&&le(this),lt(this)},p.destroy=function(){return this.g&&(this.g.parentElement&&this.l.removeChild(this.g),this.g=null,this.j=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.o.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null)),Promise.resolve()},p.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}),lt(this,n>this.h.length),this.h.length||le(this),!0},p.isTextVisible=function(){return this.j},p.setTextVisibility=function(e){(this.j=e)?(this.g.parentElement||this.l.appendChild(this.g),lt(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)},p.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},p.enableTextDisplayer=function(){},H("shaka.text.UITextDisplayer",u7),u7.prototype.enableTextDisplayer=u7.prototype.enableTextDisplayer,u7.prototype.setTextLanguage=u7.prototype.setTextLanguage,u7.prototype.setTextVisibility=u7.prototype.setTextVisibility,u7.prototype.isTextVisible=u7.prototype.isTextVisible,u7.prototype.remove=u7.prototype.remove,u7.prototype.destroy=u7.prototype.destroy,u7.prototype.append=u7.prototype.append,u7.prototype.configure=u7.prototype.configure,H("shaka.text.WebVttGenerator",function(){}),li.prototype.setMediaElement=function(t){var n,i;this.h=t,n=this,n.i.F(n.h,"playing",function(){n.C||(n.C=Date.now()),lu(n,"ps",{Wc:"p"})}),n.i.F(n.h,"volumechange",function(){lu(n,n.h.muted?"m":"um")}),n.i.F(n.h,"play",function(){n.B||(n.B=Date.now(),lu(n,"ps",{Wc:"s"}))}),n.i.F(n.h,"pause",function(){lu(n,"ps",{Wc:"a"})}),n.i.F(n.j,"buffering",function(){lu(n,"ps",{Wc:"w"})}),n.i.F(n.h,"seeking",function(){return lu(n,"ps",{Wc:"k"})}),n.i.F(document,"fullscreenchange",function(){lu(n,document.fullscreenElement?"pe":"pc")}),((i=n.h).webkitPresentationMode||i.webkitSupportsFullscreen)&&n.i.F(i,"webkitpresentationmodechanged",function(){i.webkitPresentationMode?lu(n,"inline"!==i.webkitPresentationMode?"pe":"pc"):i.webkitSupportsFullscreen&&lu(n,i.webkitDisplayingFullscreen?"pe":"pc")}),n.i.F(n.h,"enterpictureinpicture",function(){lu(n,"pe")}),n.i.F(n.h,"leavepictureinpicture",function(){lu(n,"pc")}),"documentPictureInPicture"in e&&n.i.F(e.documentPictureInPicture,"enter",function(e){lu(n,"pe"),n.i.Ba(e.window,"pagehide",function(){lu(n,"pc")})}),n.i.F(document,"visibilitychange",function(){document.hidden?lu(n,"b",{bg:!0}):lu(n,"b")}),n.i.F(n.j,"complete",function(){lu(n,"ps",{Wc:"e"})})},li.prototype.configure=function(e){this.g=e,function(e){lr(e);var t=la(e);t=x(t);for(var n=t.next();!n.done;n=t.next())if(void 0===(n=n.value.timeInterval)&&(n=lO),n>=1){var i=new n7(function(){return lu(e,l_)});i.Fa(n),e.G.push(i)}}(this)};var lw="a",lT="v",lx="av",lS="i",lA="c",lk="tt",lI=2,lE="v",lC="l";H("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",Sl:"ld",HLS:"h",Tl:"lh",im:"s",OTHER:"o"});var lM="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),lD="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),lR="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),lL="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),lP=["e","sta"],lN="ps e t c b m um pe pc".split(" "),lj="spawkrfeqd".split(""),lO=10,lU="ts",l_="t",lB="request",lF="response",lV="event";function lH(e){this.h=e,this.g=null}
1function lG(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}(p=lH.prototype).configure=function(e){this.h=e},p.ei=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(lq)?1e3*this.g.get(lq):null},p.ci=function(){return this.h.enabled&&this.g&&this.g.has(lK)?1e3*this.g.get(lK):null},p.Vj=function(){return this.h.enabled&&this.g&&this.g.has(lz)?this.g.get(lz):null},p.Wj=function(){return this.h.enabled&&this.g&&this.g.has(lW)?this.g.get(lW):null},p.getBandwidthEstimate=function(e){var t=this.ci();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e},H("shaka.util.CmsdManager",lH),lH.prototype.getBandwidthEstimate=lH.prototype.getBandwidthEstimate,lH.prototype.getRoundTripTime=lH.prototype.Wj,lH.prototype.getResponseDelay=lH.prototype.Vj,lH.prototype.getEstimatedThroughput=lH.prototype.ci,lH.prototype.getMaxBitrate=lH.prototype.ei;var lK="etp",lq="mb",lz="rd",lW="rtt";function lX(){this.g=null,this.h=[]}function lY(e,t){return P(function(n){if(1==n.h)return e.g?n.g(new Promise(function(t){return e.h.push(t)}),2):n.A(2);e.g=t,n.j()})}function lJ(t,n,i){n=void 0===n?null:n,i8.call(this);var r=this;this.m=cX,this.h=null,this.ve=n,this.$=!1,this.Fe=new er,this.we=new er,this.j=new er,this.$b=new er,this.Cd=new er,this.G=this.H=this.D=this.N=null,this.Ge=0,this.aa=new lX,this.O=this.Ha=this.X=this.i=this.vc=this.I=this.l=this.re=this.S=this.Mh=this.va=this.K=this.hb=this.za=this.ue=this.P=this.Ka=this.M=this.Xb=null,this.Ua=!1,this.Ae=this.o=null,this.ze=1e9,this.Ee=[],this.uc=new Map,this.ib=[],this.Wf=-1,this.g=cm(this),this.Yf=uk(),this.T=null,this.He=-1,this.Zb=null,this.ya={width:1/0,height:1/0},this.ye=new r3(this.g,this.ya,null),this.Ce=[],this.B=null,this.J=this.g.adaptationSetCriteriaFactory(),this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Gd=this.g.preferredTextLanguage,this.Kd=this.g.preferredTextRole,this.Jd=this.g.preferForcedSubs,this.xe=[],i&&i(this),this.K=new li(this,this.g.cmcd),this.va=new lH(this.g.cmsd),this.N=cn(this),this.ia=this.qa=this.Ca=this.C=null,this.$f=!1,this.Xf=[],this.Zf=new n7(function(){return P(function(e){return 1==e.h?r.qa?e.g(r.Pb(r.ia,!0),3):e.A(0):4!=e.h?e.g(r.load(r.qa),4):void(r.$f?r.ia.pause():r.ia.play(),r.qa=null,r.$f=!1,e.j())})}),cQ&&(this.C=cQ(),this.C.configure(this.g.ads),this.Cd.F(this.C,"ad-content-pause-requested",function(e){var t,n;return P(function(i){if(1==i.h)return(r.Zf.stop(),r.qa)?i.A(0):(r.ia=r.h,r.$f=r.$d(),t=e.saveLivePosition||!1,n=!0,r.U()&&(n=t),i.g(r.Xh(!0,n),3));r.qa=i.i,i.j()})}),this.Cd.F(this.C,"ad-content-resume-requested",function(e){if(e=e.offset||0,r.qa){var t=r.qa;t.o&&e&&("number"==typeof t.o?t.o+=e:t.o.setTime(t.o.getTime()+1e3*e))}r.Zf.na(.1)}),this.Cd.F(this.C,"ad-content-attach-requested",function(){return P(function(e){if(1==e.h)return r.h||!r.ia?e.A(0):e.g(r.Pb(r.ia,!0),3);r.ia=null,e.j()})})),cZ&&(this.Ca=cZ(this),this.Ca.configure(this.g.queue)),this.Fe.F(e,"online",function(){c_(r),r.jh()}),this.Be=new n7(function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=x(r.i.variants),a=i.next();!a.done;a=i.next())(a=a.value).disabledUntilTime>0&&a.disabledUntilTime<=e&&(a.disabledUntilTime=0,t=!0),a.disabledUntilTime>0&&(n=!1);n&&r.Be.stop(),t&&cI(r,!1,void 0,!1,!1)}),this.eb=null,t&&(ep("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Pb(t,!0)),this.u=null}function l$(e){null!=e.S&&(tm(e.S),e.S.release(),e.S=null)}function lQ(e,t){return new i3(e,t)}function lZ(e,t){c$.set(e,t)}function l0(e,t){e.dispatchEvent(lQ("onstatechange",(new Map).set("state",t)))}function l1(e,t){var n;return P(function(i){return 1==i.h?(n=++e.Ge,i.g(lY(e.aa,t),2)):n!=e.Ge?(e.aa.release(),i.return(!0)):i.return(!1)})}function l2(e,t){var n,i,r;
1return t=void 0!==t&&t,P(function(a){if(1==a.h)return(n=null,e.i&&e.I&&e.vc&&e.X&&e.g)?(i=e.h.currentTime,t||(i=null),a.g(l3(e,e.X,i,e.Ha,e.g,!0,!1),3)):a.A(2);if(2!=a.h){n=a.i,e.Ce.push(n),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(r=e.l?e.l.o:null)&&(n.i=r);var o=n,s=e.I,u=e.vc;o.h=e.i,o.m=s,o.H=u,n.C=e.J,n.start(),e.i=null,e.I=null,e.vc=null,e.o=null,e.Ae=null}return a.return(n)})}function l4(e,t,n,i,r,a){var o,s,u;return r=void 0!==r&&r,P(function(l){return 1==l.h?i?l.A(2):l.g(l5(e,t),3):(2!=l.h&&(i=l.i),function(e,t){if(!fP(eu()))return!0;if(t){if(""==(e.h||a1()).canPlayType(t))return!1;if(!fP(eu())||!tT.has(t))return!0;if(nZ(t))return"WEBKIT"===eu().Ia()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i))?l.return(null):(o=a||e.g,s=!1,r&&e.h&&"AUDIO"===e.h.nodeName&&(s=!0),u=l3(e,t,n,i||null,o,!r,s),u=r?u.then(function(e){return e.D=!1,e}):u.then(function(t){return e.Ce.push(t),t}),l.return(u))})}function l3(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v,y,b;return a=void 0===a||a,o=void 0!==o&&o,P(function(w){return 1==w.h?(s=null,u=tV(r),o&&(u.manifest.disableVideo=!0),l=function(){return s.P&&s.l?null:s},c=function(){return l()?l().getConfiguration():e.g},e.ya.width!=1/0||e.ya.height!=1/0||e.g.ignoreHardwareResolution)?w.A(2):(d=eu(),w.g(d.hc(),3)):(2!=w.h&&(h=w.i,e.ya.width=h.width,e.ya.height=h.height),p=new r3(u,e.ya,null),f={networkingEngine:e.N,filter:function(e){var t;return P(function(n){return 1==n.h?n.g(r5(p,e),2):4!=n.h?n.i?(t=lQ("trackschanged"),n.g(Promise.resolve(),4)):n.A(0):void(s.dispatchEvent(t),n.j())})},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=x(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(r=(i=x(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var a=x(r.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new sT,l=r.closedCaptions.get(o);s={id:e.ze++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:tc,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([nq(s,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(s),n.add(o)}}}(e,t)},onTimelineRegionAdded:function(e){sD(s.I,e)},onEvent:function(e){return s.dispatchEvent(e)},onError:function(e){return s.onError(e)},isLowLatencyMode:function(){return c().streaming.lowLatencyMode},updateDuration:function(){e.l&&s.P&&e.l.updateDuration()},newDrmInfo:function(e){var t=s.j,n=t?t.g:null;n&&t.B&&r9(p,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.U());s.dispatchEvent(lQ("manifestupdated",t)),uO(s,!1,function(){e.C&&e.C.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(t,n,i,r){var a=t;("com.apple.hls.interstitial"==t||"com.apple.hls.overlay"==t)&&(a="com.apple.quicktime.HLS",t={startTime:n,endTime:i,values:r},e.C)&&e.C.onHLSInterstitialMetadata(e,e.h,t),t=(r=x(r)).next();for(var o={};!t.done;o={$g:void 0},t=r.next())o.$g=t.value,"ID"!=o.$g.name&&uO(s,!1,function(t){return function(){ct(e,n,i,a,t.$g)}}(o))},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)}},(g=new sM(function(){return e.Na()})).addEventListener("regionadd",function(t){var n=t.region;cF(e,"timelineregionadded",n,s),uO(s,!1,function(){e.C&&(e.C.onDashTimedMetadata(n),e.C.onDASHInterstitialMetadata(e,e.h,n))})}),m=null,u.streaming.observeQualityChanges&&((m=new sI(function(){return e.Cc()})).addEventListener("qualitychange",function(t){cV(e,t.quality,t.position)}),m.addEventListener("audiotrackchange",function(t){cV(e,t.quality,t.position,!0)})),v=!0,y={qc:e.N,onError:function(e){return s.onError(e)},wf:function(t){uO(s,!0,function(){e.D&&function(e,t){if(e.l){var n=lQ("keystatuschanged");e.dispatchEvent(n);var i=Object.keys(t);1==i.length&&""==i[0]&&(i=["00"],t={"00":t[""]});var r=1==i.length&&"00"==i[0];if(n=!1,i.length){i=e.keySystem();for(var a=rp(e.g.drm.clearKeys),o=function(n,i){n.allowedByKeySystem=!0,i=x(i);for(var a=i.next();!a.done;a=i.next())a=a.value,((a=t[r?"00":a])||e.D.H)&&(n.allowedByKeySystem=n.allowedByKeySystem&&!!a&&!ae.includes(a))},s=x(e.i.variants),u=s.next();!u.done;u=s.next()){var l=function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}(u=u.value);l=x(l);for(var c=l.next();!c.done;c=l.next()){c=c.value;var d=u.allowedByKeySystem;if(c.keyIds.size)if(c.drmInfos.length&&!a.size&&"HLS"==e.i.type)for(var h=x(c.drmInfos),p=h.next();!p.done;p=h.next())(p=p.value).keySystem==i&&(p.keyIds.size?o(u,p.keyIds):o(u,c.keyIds));else o(u,c.keyIds);d!=u.allowedByKeySystem&&(n=!0)}}}n&&(cD(e),(n=e.l.o)&&!n.allowedByKeySystem?cI(e):cA(e))}}(e,t)})},onExpirationUpdated:function(e,t){var n=lQ("expirationupdated");s.dispatchEvent(n),(n=s.m)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){if(s.dispatchEvent(t),"drmsessionupdate"==t.type&&v){v=!1,t=Date.now()/1e3-s.za;var n=e.B||s.getStats();t>=0&&(n.m=t),e.S&&tm(e.S)}}},b=cn(e,l),rn(e.N,b),s=new uj(t,i,n,{config:u,xk:f,Kk:g,Jk:m,ed:function(){return e.ed(y)},wk:p,networkingEngine:b,nj:a}),w.return(s))})}function l5(e,t){var n,i;return P(function(r){return 1==r.h?(n=e.g.manifest.retryParameters,r.g(sK(t,e.N,n),2)):(nZ(i=r.i)?"WEBKIT"===eu().Ia()&&(i="application/vnd.apple.mpegurl"):"video/quicktime"===i&&"CHROMIUM"===eu().Ia()&&(i="video/mp4"),r.return(i))})}function l6(e,t){var n,i,r,a,o=e.g.textDisplayFactory;e.Lh!==o||(void 0===t?0:t)?(t=e.u,e.u=o(),e.u.configure?e.u.configure(e.g.textDisplayer):ep("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||ep("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),t?(e.u.setTextVisibility(t.isTextVisible()),t.destroy().catch(function(){})):e.u.setTextVisibility(e.$),e.H&&((n=e.H).aa=i=e.u,n.h&&(n.h.l=i)),e.Lh=o,e.l&&(a=(r=e.l).h.get(tc))&&sQ(r,a.stream,!0,0,!0)):e.u&&e.u.configure&&e.u.configure(e.g.textDisplayer)}function l8(e){var t,n;return P(function(i){if(1==i.h){var r,a,o,s;return eu(),l0(e,"media-source"),e.g.mediaSource.useSourceElements&&aZ(e.h),l6(e),r=e.h,a=e.u,o={Nj:function(){return e.keySystem()},onMetadata:function(t,n,i){t=x(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=x(r.frames),u=s.next();!u.done;u=s.next())ct(e,a,o,"org.id3",u.value);e.C&&e.C.onHlsTimedMetadata(r,a)}},Dk:function(t){e.hb&&sD(e.hb,{schemeIdUri:t.schemeIdUri,startTime:t.startTime,endTime:t.endTime,id:String(t.id),emsg:t})},onEvent:function(t){return e.dispatchEvent(t)},Fk:function(){e.I&&e.I.update&&e.I.update()}},s=e.S,t=new oA(r,a,o,e.g.mediaSource,s),n=e.g.manifest.segmentRelativeVttTiming,t.Ha=n,i.g(t.M,2)}e.H=t,i.j()})}function l9(e,t){e.M=new sx({Hg:function(){return t.playbackRate},ld:function(){return t.defaultPlaybackRate},Ti:function(e){t.playbackRate=e},Bk:function(n){var i=t.currentTime;if(aX(t.buffered,i)&&!(t.readyState<=HTMLMediaElement.HAVE_CURRENT_DATA)){n=i+n;var r=e.Na();n<r.start?i!==r.start&&(t.currentTime=r.start):n>r.end?i!==r.end&&(t.currentTime=r.end):t.currentTime=n}},isPaused:function(){return t.paused}})}function l7(e,t,n){function i(){return cw(e)}if(e.j.F(t,"playing",i),e.j.F(t,"pause",i),e.j.F(t,"ended",i),e.j.F(t,"ratechange",function(){return cy(e)}),t.remote&&(e.j.F(t.remote,"connect",function(){e.l&&"connected"==t.remote.state&&cN(e),cD(e)}),e.j.F(t.remote,"connecting",function(){return cD(e)}),e.j.F(t.remote,"disconnect",function(){return P(function(n){if(1==n.h)return e.l&&"disconnected"==t.remote.state?n.g(uo(e.l),3):n.A(2);2!=n.h&&cN(e),cD(e),n.j()})})),t.audioTracks&&(e.j.F(t.audioTracks,"addtrack",function(){return cD(e)}),e.j.F(t.audioTracks,"removetrack",function(){return cD(e)}),e.j.F(t.audioTracks,"change",function(){return cD(e)})),t.videoTracks&&(e.j.F(t.videoTracks,"addtrack",function(){return cD(e)}),e.j.F(t.videoTracks,"removetrack",function(){return cD(e)}),e.j.F(t.videoTracks,"change",function(){return cD(e)})),(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.j.F(t,"webkitpresentationmodechanged",function(){e.ve&&l6(e,!0)}),t.textTracks){var r=function(){e.m===cJ&&e.u instanceof u5&&cN(e),cD(e)};e.j.F(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.j.F(i,"cuechange",function(){if(i.activeCues)for(var e=x(i.activeCues),t=e.next();!t.done;t=e.next())ct(n,(t=t.value).startTime,t.endTime,t.type,t.value),n.C&&n.C.onCueMetadataChange(t.value);if(i.cues){e=[],t=x(i.cues);for(var r=t.next(),a={};!r.done;a={Ac:void 0},r=t.next())a.Ac=r.value,"com.apple.quicktime.HLS"==a.Ac.type&&null!=a.Ac.startTime&&((r=e.find(function(e){return function(t){return t.startTime==e.Ac.startTime&&t.endTime==e.Ac.endTime}}(a)))||(r={startTime:a.Ac.startTime,endTime:a.Ac.endTime,values:[]},e.push(r)),r.values.push(a.Ac.value));for(t=(e=x(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.C&&(t.values.push({key:"CUE",description:"",data:0!=t.startTime||n.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),n.C.onHLSInterstitialMetadata(n,n.h,t))}});var a=new n7(function(){var e=Array.from(n.h.textTracks).filter(function(e){return"metadata"==e.kind});e=x(e);for(var t=e.next();!t.done;t=e.next())t.value.mode="hidden"}).yb().na(.5);n.xe.push(function(){a.stop()})}break;case"chapters":var o=e,s=t;if(s&&"chapters"==s.kind){s.mode="hidden";var u=new n7(function(){s.mode="hidden"}).yb().na(.5);o.xe.push(function(){u.stop()})}break;default:r()}}),e.j.F(t.textTracks,"removetrack",r),e.j.F(t.textTracks,"change",r)}"none"!=t.preload&&e.j.Ba(t,"loadedmetadata",function(){var t=e.B,i=Date.now()/1e3-n;i>=0&&(t.G=i)})}function ce(e,t,n){t=(new Map).set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(lQ(n,t))}function ct(e,t,n,i,r){e.za&&((t={schemeIdUri:i,startTime:t,endTime:n||
11/0,id:"",payload:r}).id=JSON.stringify(t),sD(e.za,t))}function cn(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?uO(t(),!0,e):e()}t||(t=function(){return null});var r=new re(function(t,n,r,a,o){i(function(){e.o&&e.o.segmentDownloaded(t,n,r,a,o)})},function(t,r,a){n(lQ("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i(function(){if(e.va){var n=e.va;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],lG(o[1]))}}catch(e){}if(r=t["cmsd-dynamic"]){e:try{var s=new Map,u=r.split(";");for(r=1;r<u.length;r++){var l=u[r].split("=");s.set(l[0],lG(l[1]))}var c=s;break e}catch(e){c=null;break e}c&&(n.g=c)}}}})},function(e,t){n(lQ("downloadcompleted",e=(new Map).set("request",e).set("response",t)))},function(e,t,i,r){n(lQ("downloadfailed",e=(new Map).set("request",e).set("error",t).set("httpResponseCode",i).set("aborted",r)))},function(t,n,r){i(function(){if(e.K){var i=e.K,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)ll(i,n,{});else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.u?"ld":"d";break e;case 3:case 2:o=i.u?"lh":"h";break e;case 5:o="s";break e}o=void 0}i.l=o}ll(i,n,{ot:"m",su:!i.D})}}catch(e){Y("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case rs:try{if(i.g.enabled){var s=lg(i,a,n.uris[0]);s.ts=Date.now(),i.m.has(n)&&i.m.delete(n),i.m.set(n,s.ts),ll(i,n,s)}}catch(e){Y("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:ll(i,n,{ot:"k"});break;case 4:ll(i,n,{ot:"o"})}}})},function(n,i,r,a){(n=t()?t().m:e.I)&&n.banLocation&&n.banLocation(a)},function(n,i,r){if(i.data){var a=i.data.byteLength,o=t()?t().getStats():e.B;if(o&&(uN(o,a),0===n&&(o.si=a)),a=e.K,r=void 0===r?{}:r,0!==lo(a).length&&n===rs)try{var s=lg(a,r,i.uri);i.originalRequest&&null!=i.originalRequest.timeToFirstByte&&(s.ttfb=i.originalRequest.timeToFirstByte),null!=i.timeMs&&(s.ttlb=i.timeMs);var u=i.originalUri||i.uri;if(u.includes("CMCD="))try{var l=new URL(u);l.searchParams.delete("CMCD");var c=l.toString()}catch(e){c=u}else c=u;s.url=c,a.m.has(i.originalRequest)?(s.ts=a.m.get(i.originalRequest),a.m.delete(i.originalRequest)):s.ts||(s.ts=Date.now());var d=lo(a);if(0!==d.length){var h=a.g.version==lI?Array.from(new Set([].concat(S(lD),S(lL)))):lM;s.rc=i.status||0;var p=lm(a,s,lF);i.headers&&i.headers["CMSD-Static"]&&(p.cmsds=btoa(i.headers["CMSD-Static"])),i.headers&&i.headers["CMSD-Dynamic"]&&(p.cmsdd=btoa(i.headers["CMSD-Dynamic"]));for(var f=x(d),g=f.next();!g.done;g=f.next()){var m=g.value,v=ld(m.includeKeys||[],h),y=lp(m);a.o[y]||(a.o[y]={request:1,response:1}),p.sn=a.o[y].response++;var b=lh(p,v);lc(a,b,m,i)}}}catch(e){Y("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",e)}}});return r.configure(e.g.networking),r}function ci(e,t,n){e.P=new r0,r1(e.P,r2),cr(e),cv(e),e.Ka=new n7(function(){ca(e)}),e.g.streaming.rebufferingGoal&&e.Ka.Fa(.25),e.j.F(t,"waiting",function(){return ca(e,"waiting")}),e.j.F(t,"canplaythrough",function(){return ca(e,"canplaythrough")}),e.j.F(t,"playing",function(){return ca(e,"playing")}),e.j.F(t,"seeked",function(){return ca(e,"seeked")}),e.j.F(t,"timeupdate",function(){return ca(e,"timeupdate")}),n&&(e.j.F(t,"progress",function(){return ca(e,"progress")}),e.j.F(t,"stalled",function(){return ca(e,"stalled")}))}function cr(e){var t=e.g.streaming.rebufferingGoal;e.P.j.set(r4,Math.min(.5,t/2)).set(r2,t)}function ca(e,t){if(e.g.streaming.rebufferingGoal){t=!!e.H&&oD(e.H),t=e.$d()||t||e.G.ni();var n=aY(e.h.buffered,e.h.currentTime),i=e.P,r=i.j.get(i.g);r1(i,t||n>=r&&n>0?r4:r2)&&cv(e)}else if(t){n=e.P,i=e.h.currentTime,r=n.h,n.h=i;var a=void 0;switch(t){case"seeking":case"waiting":n.h=-1,a=r2;break;case"canplaythrough":case"playing":case"seeked":a=r4;break;case"timeupdate":r>=0&&i-r>.01&&(a=r4)}void 0!==a&&r1(n,a)&&cv(e)}}function co(e,t){if(e.ye=new r3(e.g,e.ya,e.D),e.I){var n=tV(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(n.disableVideo=!0),e.I.configure(n)}if(e.D&&e.D.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=cW&&r8(e.ye,e.i)&&cD(e)}catch(t){cB(e,t)}e.o&&cA(e),(n=e.l.o)&&(!n.allowedByApplication||!n.allowedByKeySystem)&&cI(e)}if(e.N&&e.N.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Ha=e.g.manifest.segmentRelativeVttTiming),e.u&&l6(e),e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),cO(e)),e.P&&cr(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Fa(.25):e.Ka.stop()),e.i&&cG(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.K&&e.K.configure(e.g.cmcd),e.va&&e.va.configure(e.g.cmsd),e.Ca&&e.Ca.configure(e.g.queue),e.m==cY&&e.J.getConfiguration){n=e.J.getConfiguration();var i=!1;t.preferredVideoHdrLevel!=e.g.preferredVideoHdrLevel&&n.hdrLevel!=e.g.preferredVideoHdrLevel&&(n.hdrLevel=e.g.preferredVideoHdrLevel,i=!0),t.preferredVideoLayout!=e.g.preferredVideoLayout&&n.videoLayout!=e.g.preferredVideoLayout&&(n.videoLayout=e.g.preferredVideoLayout,i=!0),t.preferSpatialAudio!=e.g.preferSpatialAudio&&n.spatialAudio!=e.g.preferSpatialAudio&&(n.spatialAudio=e.g.preferSpatialAudio,i=!0),t.preferredVideoRole!=e.g.preferredVideoRole&&n.videoRole!=e.g.preferredVideoRole&&(n.videoRole=e.g.preferredVideoRole,i=!0),i&&(e.J.configure(n),cI(e))}}function cs(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function cu(e,t){var n,i,r;return P(function(a){return 1==a.h?e.m!=cY&&e.m!=cJ?a.return(null):(n=e.Ee,e.i&&
1(n=e.i.imageStreams),i=n[0])?(null!=t&&(i=n.find(function(e){return e.id==t})),i?i.segmentIndex?a.A(2):a.g(i.createSegmentIndex(),2):a.return(null)):a.return(null):(i.closeSegmentIndex&&(e.uc.has(i)||(r=new n7(function(){i&&(i.closeSegmentIndex(),e.uc.delete(i))}),e.uc.set(i,r)),e.uc.get(i).na(5)),a.return(i))})}function cl(e,t,n,i){var r=t.width||0,a=t.height||0,o=r/i.columns,s=a/i.rows,u=i.columns*i.rows,l=e.j-e.startTime;l=e.B||l/u;var c=e.startTime,d=0,h=0;return(u>1&&(h=Math.floor((n-e.startTime)/l+1e-4),c=e.startTime+h*l,d=h%i.columns*o,h=Math.floor(h/i.columns)*s),c>=e.endTime||oe(c,e.endTime,1e-4))?null:(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.R(),startByte:e.Fc(),endByte:e.Dc(),width:o,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}function cc(e,t){e.j.F(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=x(r);for(var a=r.next();!a.done;a=r.next()){if((a=a.value).endTime===1/0||a.endTime<a.startTime)a=null;else{var o=new nd(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?nA: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=tR,o.region.width=a.region.width,o.region.widthUnits=tR),nf(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 cd(e){return Array.from(e.h.textTracks).filter(function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label})}function ch(e){if(!e.h||!e.h.currentTime)return null;var t=e.ii();return t?Math.floor(Date.now()-(t.getTime()+1e3*e.h.currentTime)):null}function cp(e,t){var n;return P(function(i){switch(i.h){case 1:return i.m(2),i.g(sK(t,e.N,e.g.streaming.retryParameters),4);case 4:n=i.i,i.o(3);break;case 2:i.l();case 3:if(n)return i.return(n);throw new eJ(1,2,2011,t)}})}function cf(e,t){var n,i,r;return P(function(a){if(1==a.h){n=rs,(i=ri([t],e.g.streaming.retryParameters)).method="GET";var o=e.K;try{o.g.enabled&&ll(o,i,{ot:lA,su:!0})}catch(e){Y("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return a.g(e.N.request(n,i).promise,2)}return r=a.i,a.return(r.data)})}function cg(e,t,n,i){var r=n3(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=eO(t),function(e,t){function n(e){for(var n=e,i=x(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return((e=Math.floor(n/3600))<10?"0":"")+e+":"+((i=Math.floor(n/60%60))<10?"0":"")+i+":"+((r=Math.floor(n%60))<10?"0":"")+r+"."+((n=Math.floor(1e3*n%1e3))<100?n<10?"00":"0":"")+n}var i=u1(e);e="WEBVTT\n\n",i=x(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 ny: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 eJ(2,2,2014,n)}function cm(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.jh(n))}},t.textDisplayFactory=function(){if(e.ve){var t=e.h;t=!t.webkitDisplayingFullscreen&&(!t.webkitPresentationMode||"inline"==t.webkitPresentationMode)}else t=!1;return t?new u7(e.h,e.ve):"track"in document.createElement("track")?new u5(e):new u9},t}function cv(e){var t=e.Ng();if(e.B&&e.P&&e.G){if(0==e.g.streaming.rebufferingGoal){var n=e.M;n.j=!1,sS(n)}else(n=e.M).j=t,sS(n);if(e.K&&(n=e.K,t||n.D||(n.D=!0),n.D&&t&&(n.I=!0,lu(n,"ps",{Wc:"r"})),n.J=t),cw(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.He<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.T&&(e.T=Math.min(e.T+ ++e.He*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(lQ("buffering",t))}function cy(e){var t=e.h.playbackRate;0==t?0!==(t=e.Db())&&1!==t&&(t=lQ("ratechange"),e.dispatchEvent(t)):(e.M&&(e.M.set(t),e.m==cY&&e.o.playbackRateChanged(t),cb(e,t)),t=lQ("ratechange"),e.dispatchEvent(t))}function cb(e,t){e.$b.Sa(),e.$b.F(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Na(),r=e.U(),a=r?e.g.streaming.safeSeekOffset:0;t>0?r&&t>1&&Math.floor(n)>=Math.floor(i.end)&&e.Nd():Math.floor(n)<=Math.floor(i.start+a)&&e.Nd()})}function cw(e){if(e.B&&e.P){var t=e.B.g,n="playing";e.P.g==r2?n="buffering":e.$d()?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(lQ("statechanged",n)))}}function cT(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.bi();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.qe(i,!1):1==r&&t!==e.M.ld()&&e.Nd()}if(n&&Number.isFinite((n=e.Na()).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.T||"number"!=typeof o||(e.T=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Zb&&null!==e.T&&"number"==typeof o&&e.He<d&&Date.now()-e.Zb>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.T=Math.max(e.T-(o-a)/2,a+i),e.Zb=Date.now()),r&&null!==e.T&&(s=e.T+i,u=e.T-i),o=n.end-e.h.currentTime,i=0,e.m==cJ&&(r=e.h.buffered).length>0&&(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.P.i,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.qe(c,!1):void 0!=s&&l&&o-i>s?(t!=l&&e.qe(l,!1),e.Zb=null):void 0!=u&&c&&o-i<u?(t!=c&&e.qe(c,!1),e.Zb=null):t!==e.M.ld()&&(e.Nd(),e.Zb=Date.now())}}function cx(e,t,n){return(!!oe(t,n,.01)||n>t)&&e.Wf<t&&(e.Wf=t,!0)}function cS(e){if(e.h){var t=e.Na();if(!isNaN(t=(t=t.end-t.start)>0?e.h.currentTime/t:0)){if(cx(e,0,t*=100))var n=lQ("started");else cx(e,25,t)?n=lQ("firstquartile"):cx(e,50,t)?n=lQ("midpoint"):cx(e,75,t)?n=lQ("thirdquartile"):((cx(e,100,t)||t>100)&&(n=lQ("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.$d()&&e.h.pause());n&&e.dispatchEvent(n)}}}function cA(e){try{r7(e.ye,e.i)}catch(t){return cB(e,t),!1}var t=iP(e.i.variants);return t=e.J.create(t),"boolean"!=typeof(e=e.o.setVariants(Array.from(t.values())))||e}function ck(e,t){if(t=void 0!==t&&t,cA(e)){if(!e.g.abr.enabled){var n=e.J;if("function"!=typeof n.getLastAdaptationSet&&(ep("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),n.getLastAdaptationSet=function(){return null}),(n=n.getLastAdaptationSet())&&(n=Array.from(n.values())).length){var i=e.l.o;if(i&&i.video&&(n=n.find(function(e){return e.video==i.video})))return n}}return e.o.chooseVariant(t)}return null}function cI(e,t,n,i,r){t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r;var a=ck(e);a&&cE(e,a,r,t,n,i)}function cE(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.l.o;if(t==o)i&&sJ(e.l,t,i,r,!0);else{var s=e.B.h;if(s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),sJ(e.l,t,i,r,a,n),i=null,o&&(i=iI(o)),(o=iI(t)).active=!0,e.S&&(r=e.S,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.di()){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?cK(e,n=lQ("adaptation",n=(new Map).set("oldTrack",i).set("newTrack",o))):cR(e,i,o),cL(e,i,o)}}function cC(e,t){var n=Array.from(e.h.audioTracks).find(function(e){return e.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=cM(e);cR(e,n=iR(n,i),t=iR(t,i)),cL(e,n,t)}}function cM(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(e){return e.selected}):null}function cD(e){cK(e,lQ("trackschanged")),cP(e)}function cR(e,t,n){cK(e,t=lQ("variantchanged",t=(new Map).set("oldTrack",t).set("newTrack",
1n)))}function cL(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&cP(e)}function cP(e){cK(e,lQ("audiotrackschanged"))}function cN(e){cK(e,lQ("textchanged"))}function cj(e){cK(e,lQ("texttrackvisibility"))}function cO(e){e.g.abr.enabled||c_(e);var t=(new Map).set("newStatus",e.g.abr.enabled);cK(e,lQ("abrstatuschanged",t))}function cU(e){var t=e.Gc().find(function(e){return e.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function c_(e,t){if(t=void 0===t||t,e.m==cY){e.Be.stop();for(var n=x(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&cA(e)}}function cB(e,t){var n,i,r,a;return P(function(o){switch(o.h){case 1:if(e.m==cW)return o.return();if(1===t.severity&&e.B.M++,n=!0,!(e.Ua&&e.i&&e.l)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3024!=t.code&&3018!=t.code){o.A(2);break}if("WEBKIT"===eu().Ia()&&3016==t.code)return o.return();return o.m(3),o.g(uo(e.l),5);case 5:n=!(i=o.i),i&&(r=lQ("mediasourcerecovered"),e.dispatchEvent(r)),o.o(2);break;case 3:o.l(),n=!0;case 2:if(!n)return o.return();2===t.severity&&c_(e,!1),a=lQ("error",(new Map).set("detail",t)),e.dispatchEvent(a),a.defaultPrevented&&(t.handled=!0),o.j()}})}function cF(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(lQ(t,e))}function cV(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(lQ(i?"audiotrackchanged":"mediaqualitychanged",t))}function cH(e,t){if(t=void 0===t||t,!e.h.error)return t?new eJ(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(t<0&&(t+=0x100000000),t=t.toString(16)),new eJ(2,3,3016,n,t,e.h.error.message)):null}function cG(e,t,n){t>0&&(e.U()||e.Vi(t)),n<(t=e.getDuration())&&(e.U()||e.wb(n))}function cK(e,t){P(function(n){if(1==n.h)return n.g(Promise.resolve(),2);e.m!=cW&&e.dispatchEvent(t),n.j()})}function cq(e){var t=new Set;e=x(e);for(var n=e.next();!n.done;n=e.next())(n=n.value).language?t.add(ic(n.language)):t.add("und");return t}function cz(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],a="und",o=[];r.language&&(a=ic(r.language)),(o="variant"==r.type?r.audioRoles:r.roles)&&o.length||(o=[""]),t.has(a)||t.set(a,new Set),o=x(o);for(var s=o.next();!s.done;s=o.next())s=s.value,t.get(a).add(s),r.label&&(n.has(a)||n.set(a,new Map),n.get(a).set(s,r.label))}var u=[];return t.forEach(function(e,t){e=x(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)),u.push({language:t,role:i,label:r})}}),u}lX.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null},w(lJ,i8),(p=lJ.prototype).destroy=function(){var e,t=this;return P(function(n){switch(n.h){case 1:if(t.m==cW)return n.return();return l$(t),e=t.detach(),t.m=cW,n.g(e,2);case 2:return n.g(t.mg(),3);case 3:if(t.Fe&&(t.Fe.release(),t.Fe=null),t.we&&(t.we.release(),t.we=null),t.j&&(t.j.release(),t.j=null),t.$b&&(t.$b.release(),t.$b=null),t.Cd&&(t.Cd.release(),t.Cd=null),t.Ae=null,t.g=null,t.B=null,t.ve=null,t.K=null,t.va=null,!t.N){n.A(4);break}return n.g(t.N.destroy(),5);case 5:t.N=null;case 4:t.o&&(t.o.release(),t.o=null),t.Ca&&(t.Ca.destroy(),t.Ca=null),i8.prototype.release.call(t),n.j()}})},p.Pb=function(e,t){t=void 0===t||t;var n,i,r,a=this;return P(function(o){switch(o.h){case 1:if(a.m==cW)throw new eJ(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.A(2);break}return o.g(a.detach(),2);case 2:return o.g(l1(a,"attach"),4);case 4:if(o.i)return o.return();if(o.m(5,6),n||(l0(a,"attach"),i=function(){var e=cH(a,!1);e&&cB(a,e)},a.we.F(e,"error",i),a.h=e,a.K&&a.K.setMediaElement(e)),eu(),!t||!fP()||a.H){o.A(6);break}return o.g(l8(a),6);case 6:o.u(),a.aa.release(),o.B(0);break;case 5:return r=o.l(),o.g(a.detach(),10);case 10:throw r}})},p.oj=function(e){this.Mh=e},p.detach=function(e){e=void 0!==e&&e;var t=this;return P(function(n){if(1==n.h){if(t.m==cW)throw new eJ(2,7,7e3);return n.g(t.yc(!1,e),2)}if(3!=n.h)return n.g(l1(t,"detach"),3);if(n.i)return n.return();try{t.h&&(t.we.Sa(),t.h=null),l0(t,"detach"),t.C&&!e&&t.C.release()}finally{t.aa.release()}n.j()})},p.yc=function(t,n){t=void 0===t||t,n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y=this;return P(function(b){switch(b.h){case 1:return y.m!=cW&&(y.m=cX),b.g(l1(y,"unload"),2);case 2:if(b.i)return b.return();return b.D(3),y.Ua=!1,l0(y,"unload"),l$(y),i=y.xe.map(function(e){return e()}),y.xe=[],b.g(Promise.all(i),5);case 5:if(y.dispatchEvent(lQ("unloading")),y.ue&&(y.ue.release(),y.ue=null),y.za&&(y.za.release(),y.za=null),y.hb&&(y.hb.release(),y.hb=null),y.h&&(y.j.Sa(),y.$b.Sa()),y.Be.stop(),y.Xb&&(y.Xb.release(),y.Xb=null),y.Ka&&(y.Ka.stop(),y.Ka=null),!y.I){b.A(6);break}return b.g(y.I.stop(),7);case 7:y.I=null,y.vc=null;case 6:if(y.o&&y.o.stop(),!y.l){b.A(8);break}return b.g(y.l.destroy(),9);case 9:y.l=null;case 8:if(y.M&&(y.M.release(),y.M=null),y.G&&(y.G.release(),y.G=null),"webkit"!==e.shakaMediaKeysPolyfill||!y.D){b.A(10);break}return b.g(y.D.destroy(),11);case 11:y.D=null;case 10:if(!y.H){b.A(12);break}return b.g(y.H.destroy(),13);case 13:y.H=null;case 12:var w;if(y.C&&!n&&y.C.onAssetUnload(),y.qa&&!n&&(y.qa.destroy(),y.qa=null),n||y.Zf.stop(),y.K&&((w=y.K).m.clear(),w.D=!1,w.J=!0,w.I=!1,w.u=!1,w.B=0,w.C=0,w.H=0,w.K={request:!1,response:!1,event:!1},lr(w),w.o={},w.h=null,w.i.Sa()),y.va&&(y.va.g=null),!y.u){b.A(14);break}return b.g(y.u.destroy(),15);case 15:y.u=null;case 14:if(y.$=!1,y.h){for(a=(r=x(y.Xf)).next();!a.done;a=r.next())(o=a.value).src.startsWith("blob:")&&URL.revokeObjectURL(o.src),o.remove();y.Xf=[],aZ(y.h)&&y.h.load()}if(!y.D){b.A(16);break}return b.g(y.D.destroy(),17);case 17:y.D=null;case 16:if(y.eb&&y.X!=y.eb.kd()&&(y.eb.l||y.eb.destroy(),y.eb=null),y.X=null,y.Ha=null,y.P=null,y.i){for(u=(s=x(y.i.variants)
1).next();!u.done;u=s.next())for(d=(c=x([(l=u.value).audio,l.video])).next();!d.done;d=c.next())(h=d.value)&&h.segmentIndex&&h.segmentIndex.release();for(f=(p=x(y.i.textStreams)).next();!f.done;f=p.next())(g=f.value).segmentIndex&&g.segmentIndex.release()}for(y.g&&y.g.streaming.clearDecodingCache&&(iF.clear(),eY.clear()),y.i=null,y.B=new uP,y.Lh=null,y.Zb=null,y.T=null,y.He=-1,y.Ee=[],v=(m=x(y.uc.values())).next();!v.done;v=m.next())v.value.stop();y.uc.clear(),y.ib=[],y.Wf=-1,y.N&&y.N.Th(),cv(y);case 3:b.u(),y.aa.release(),b.B(4);break;case 4:if(eu(),t&&fP()&&!y.H&&y.h)return b.g(l8(y),0);b.A(0)}})},p.ql=function(e){this.O=e},p.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b=this;return P(function(w){switch(w.h){case 1:if(b.m==cW)throw new eJ(2,7,7e3);if(b.h||!b.ia){w.A(2);break}return w.g(b.Pb(b.ia,!0),3);case 3:b.ia=null;case 2:if(r=null,a="",i=null==(o=i)?void 0:o.toLowerCase(),t instanceof uj){if(t.l)throw new eJ(2,7,7006);a=(r=t).kd()||""}else a=t||"";return w.g(lY(b.aa,"load"),4);case 4:if(b.aa.release(),!b.h)throw new eJ(2,7,7002);if(!b.X){w.A(5);break}return b.X=a,w.g(b.yc(!1),5);case 5:if(s=++b.Ge,u=function(){return P(function(e){if(1==e.h)return b.Ge==s?e.A(0):r?e.g(r.destroy(),3):e.A(3);throw new eJ(2,7,7e3)})},l=function(e,t){return P(function(n){switch(n.h){case 1:return n.D(2),n.g(lY(b.aa,t),4);case 4:return n.g(u(),5);case 5:return n.g(e(),6);case 6:return n.g(u(),7);case 7:r&&b.g&&(r.g=b.g);case 2:n.u(),b.aa.release(),n.B(0)}})},w.m(7,8),null==n&&r&&(n=r.getStartTime()),b.O=n,b.Ua=!1,b.dispatchEvent(lQ("loading")),r){i=r.T,w.A(10);break}if(i){w.A(10);break}return w.g(l(function(){return P(function(e){if(1==e.h)return e.g(l5(b,a),2);i=e.i,e.j()})},"guessMimeType_"),10);case 10:if(c=!!r,r){uU(r,b),b.B=r.getStats(),w.A(13);break}return w.g(l4(b,a,n,i,!0,b.g),14);case 14:(r=w.i)?(r.D=!1,uU(r,b),b.B=r.getStats(),r.start(),r.B.catch(function(){})):b.B=new uP;case 13:if(d=!r,h=Date.now()/1e3,b.B=r?r.getStats():new uP,b.X=a,b.Ha=i||null,cv(b),p=function(){var e=b.h?b.h.buffered:null;return{start:az(e)||0,end:aW(e)||0}},b.za=new sM(p),b.za.addEventListener("regionadd",function(e){ce(b,e.region,"metadataadded")}),d)return w.g(l(function(){return P(function(e){var t,n,r,a,o;return e.g((t=b,n=i,P(function(e){return 1==e.h?(r=Date.now()/1e3,a=!0,t.D=t.ed({qc:t.N,onError:function(e){cB(t,e)},wf:function(){},onExpirationUpdated:function(){var e=lQ("expirationupdated");t.dispatchEvent(e)},onEvent:function(e){if(t.dispatchEvent(e),"drmsessionupdate"==e.type&&a){a=!1,e=t.B;var n=Date.now()/1e3-r;n>=0&&(e.m=n)}}}),t.D.configure(t.g.drm),o=iB([n]),t.D.O=!0,e.g(rL(t.D,[o],[]),2)):e.g(t.D.Pb(t.h),0)})),0)})},"initializeSrcEqualsDrmInner_"),25);return b.hb=new sM(p),w.g(l(function(){return P(function(e){if(1==e.h)return e.g(Promise.race([r.ia,r.B]),2);b.vc=r.H;var t=r;t.qa=!0,b.I=t.m,b.i=r.Gg(),e.j()})},"waitForFinish"),17);case 17:if(b.H){w.A(18);break}return w.g(l(function(){return P(function(e){return e.g(l8(b),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return b.i&&b.i.textStreams.length&&(b.u.enableTextDisplayer?b.u.enableTextDisplayer():ep("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),w.g(l(function(){return P(function(e){return e.g(r.B,0)})},"waitForFinish"),20);case 20:if(b.g=r.getConfiguration(),b.ye=r.G,b.I&&b.I.setMediaElement&&b.h&&b.I.setMediaElement(b.h),(T=r).va=!0,b.ue=T.I,b.re=r.Ha,(f=r.C)&&(b.J=f),c&&b.h&&"AUDIO"===b.h.nodeName&&(function(e){for(var t=x(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(e){return e.audio})}(b),b.configure("manifest.disableVideo",!0)),r.j){w.A(21);break}return w.g(l(function(){return P(function(e){return e.g(uF(r,b.h),0)})},"drmEngine_.init"),21);case 21:return(S=r).aa=!0,b.D=S.j,w.g(l(function(){return P(function(e){return e.g(b.D.Pb(b.h),0)})},"drmEngine_.attach"),23);case 23:return g=b.g.abrFactory,b.o&&b.Ae==g||(b.Ae=g,b.o&&b.o.release(),b.o=g(),"function"!=typeof b.o.setMediaElement&&(ep("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),b.o.setMediaElement=function(){}),"function"!=typeof b.o.setCmsdManager&&(ep("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),b.o.setCmsdManager=function(){}),"function"!=typeof b.o.trySuggestStreams&&(ep("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),b.o.trySuggestStreams=function(){}),b.o.configure(b.g.abr)),(A=r).ya=!0,m=A.M,v=r.i,w.g(l(function(){return P(function(t){var n,i,r,a,o,s,u,l,c,d,p,f,g,y,w,T,S,A,k,I,E,C,M,D,R,L,N,j,O,U,_;return t.g((n=b,i=h,r=v,a=m,P(function(t){var h,m,v,b,B,F,V,H,G,K,q,z,W,Y;switch(t.h){case 1:for(l0(n,"load"),o=n.h,l9(n,o),l7(n,o,i),("onchange"in e.screen)&&n.j.F(e.screen,"change",function(){if(n.J.getConfiguration){var e=n.J.getConfiguration();"AUTO"==e.hdrLevel?cA(n):"AUTO"==n.g.preferredVideoHdrLevel&&n.g.abr.enabled&&(e.hdrLevel="AUTO",n.J.configure(e),cA(n))}}
1),s=!1,l=(u=x(n.i.variants)).next();!l.done;l=u.next())(d=(c=l.value).video&&c.video.dependencyStream)&&(s=tv(d));h=n.g,(m=s)||h.lcevc.enabled?(l$(n),null==n.S&&(n.S=new tf(n.h,n.Mh,h.lcevc,m),n.H&&(n.H.C=n.S))):l$(n),n.Gd=n.g.preferredTextLanguage,n.Kd=n.g.preferredTextRole,n.Jd=n.g.preferForcedSubs,cG(n.i.presentationTimeline,n.g.playRangeStart,n.g.playRangeEnd),n.o.init(function(e,t,i){n.i&&n.l&&e!=n.l.o&&cE(n,e,!0,void 0!==t&&t,void 0===i?0:i)}),n.o.setMediaElement(o),n.o.setCmsdManager(n.va),n.l=new sX((V=n).i,{Tb:function(){return V.G?V.G.Ld():0},getBandwidthEstimate:function(){return V.o.getBandwidthEstimate()},Db:function(){return V.Db()},video:V.h,W:V.H,qc:V.N,onError:function(e){return cB(V,e)},onEvent:function(e){return V.dispatchEvent(e)},ud:function(e,t,n,i){var r=e.startTime,a=e.endTime,o=t.type;if(o!=tc){if(V.G){V.G.Bi();var s=oL(V.H,o);!V.U()&&V.h.paused&&!V.h.seeking&&null!=s&&s>0&&V.G.Ld()<s&&!oe(V.G.Ld(),s,.001)&&V.G.Vf(s)}ca(V)}n=(new Map).set("start",r).set("end",a).set("contentType",o).set("isMuxed",n).set("isDependency",i),V.dispatchEvent(lQ("segmentappended",n)),V.o&&t.fastSwitching&&e.Rc&&e.be&&V.o.trySuggestStreams()},Ek:function(e,t){var n,i,r,a,o,s;(t=t.sd)&&V.re&&(n=V.re,i=t,r=n,a=i.contentType,(o=r.g.get(a))||(o={ke:[],kg:null,contentType:a},r.g.set(a,o)),function(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,i=e[e.length-1].end,r=t.ke;t.ke=r.filter(function(e,t){return(!(e.position<=n)||!(t+1<r.length)||!(r[t+1].position<=n))&&!(e.position>=i)})}else t.ke=[]}(n,s=o),n={sd:i,position:e},(i=(s=s.ke).findIndex(function(t){return t.position>=e}))>=0?s.splice(i,+(s[i].position==e),n):s.push(n))},Rh:function(e,t){var n=V.D;if(n.h.parseInbandPsshEnabled&&!n.H&&["audio","video"].includes(e)){e=new rM(eO(t)),t=0;for(var i=x(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=x(e.data)).next();!r.done;r=e.next())r=r.value,t.set(r,i),i+=r.length;rO(n,"cenc",t),n=n.m}}else n=Promise.resolve();return n},disableStream:function(e,t){return V.disableStream(e,t)},hl:function(e,t){return!V.g.abr.enabled||!t.fastSwitching||!e.Rc||!e.be}}),n.l.configure(n.g.streaming),n.m=cY,n.dispatchEvent(lQ("streaming")),p=r;case 2:for((g=n.l.o)||(y=ck(n,!0),r||(p=y)),w=[],S=(T=x([(f=g||p).video,f.audio])).next();!S.done;S=T.next())(A=S.value)&&!A.segmentIndex&&(w.push(A.createSegmentIndex()),A.dependencyStream&&w.push(A.dependencyStream.createSegmentIndex()));if(!(w.length>0)){t.A(4);break}return t.g(Promise.all(w),4);case 4:if(!f||0!=f.disabledUntilTime){t.A(2);break}if(cA(n),n.I&&n.I.onInitialVariantChosen&&n.I.onInitialVariantChosen(f),n.i.isLowLatency&&(n.g.streaming.lowLatencyMode?n.configure(n.Yf):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.")),n.K&&((v=n.K).u=n.i.isLowLatency&&n.g.streaming.lowLatencyMode,v.u?"d"==v.l?v.l="ld":"h"==v.l&&(v.l="lh"):"ld"==v.l?v.l="d":"lh"==v.l&&(v.l="h"),function(e,t){if(e.g&&e.g.enabled&&(lu(e,"ps",{Wc:"d"}),e.h&&e.h.autoplay)){var n=e.h.play();n&&n.then(function(){e.H=t}).catch(function(){e.H=0})}}(n.K,1e3*i)),cG(n.i.presentationTimeline,n.g.playRangeStart,n.g.playRangeEnd),b=n.l,B=n.g.playRangeStart,F=n.g.playRangeEnd,b.j.presentationTimeline.U()||(b.ia=B,b.aa=F),n.Ua=!0,n.dispatchEvent(lQ("canupdatestarttime")),k=function(e){var t,i,r,a,s,u,l;t=n,i=e,n.G=new sp(t.h,t.i,t.g.streaming,i,function(){t.Xb&&sk(t.Xb,!t.G.Jh()),t.l&&t.l.Uc(),t.P&&ca(t,"seeking")},function(e){return t.dispatchEvent(e)}),r=n,a=e,s=r.U()||"number"==typeof a&&a>0,(a=new uq(r.ue,s)).addEventListener("enter",function(e){cF(r,"timelineregionenter",e.region)}),a.addEventListener("exit",function(e){cF(r,"timelineregionexit",e.region)}),a.addEventListener("skip",function(e){var t=e.region;e.seeking||(cF(r,"timelineregionenter",t),cF(r,"timelineregionexit",t))}),(u=new uq(r.za,s)).addEventListener("enter",function(e){ce(r,e.region,"metadata")}),(s=new uq(r.hb,s)).addEventListener("enter",function(e){e=(new Map).set("detail",e.region.emsg),r.dispatchEvent(lQ("emsg",e))}),(l=new sA(r.h)).g.add(a),l.g.add(u),l.g.add(s),r.re&&l.g.add(r.re),n.Xb=l,ci(n,o,!1)},n.g.streaming.startAtSegmentBoundary||(null==(I=n.O)&&n.i.startTime&&(I=n.i.startTime),k(I)),g){t.A(7);break}if(!n.g.streaming.startAtSegmentBoundary){t.A(8);break}return E=n.i.presentationTimeline,n.O instanceof Date&&(M=E.m||E.i,C=n.O.getTime()/1e3-M),null==C&&(C="number"==typeof n.O?n.O:n.U()?1/0:n.h.currentTime),null==n.O&&n.i.startTime&&(C=n.i.startTime),D=E.Ub(),R=E.Eb(),C<D?C=D:C>R&&(C=R),t.g((H=p,G=C,P(function(e){return 1==e.h?(K=H.audio,q=H.video,z=function(e,t){var n,i,r;return P(function(a){return 1==a.h?e?e.segmentIndex?a.A(2):a.g(e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Rb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)})},e.g(z(K,G),2)):3!=e.h?(W=e.i,e.g(z(q,G),3)):null!=(Y=e.i)&&null!=W?e.return(Math.max(Y,W)):null!=Y?e.return(Y):null!=W?e.return(W):e.return(G)})),9);case 9:L=t.i,k(L);case 8:cE(n,p,!0,!1,0);case 7:return n.G.ready(),n.Gc().find(function(e){return e.active})||((N=iN(n.i.textStreams,n.Gd,n.Kd,n.Jd)[0]||null)&&uL(n.B.h,N,!0),p&&(N?(i_(p.audio,N,n.g)&&(n.$=!0),n.$&&n.u.setTextVisibility(!0)):(n.$=!1,n.u.setTextVisibility(!1)),cj(n)),N&&(n.g.streaming.alwaysStreamText||n.Qg())&&(s$(n.l,N),cU(n))),t.g(n.l.start(a),10);case 10:n.g.abr.enabled&&(n.o.enable(),cO(n)),cD(n),n.i.variants.some(function(e){return e.primary}),((j=n.U())&&(n.g.streaming.liveSync&&n.g.streaming.liveSync.enabled||n.i.serviceDescription||n.g.streaming.liveSync.panicMode)||n.g.streaming.vodDynamicPlaybackRate)&&(O=function(){return cT(n)},n.j.F(o,"timeupdate",O)),j||(U=function(){return cS(n)},n.j.F(o,"timeupdate",U),cS(n),n.i.nextUrl&&(n.g.streaming.preloadNextUrlWindow>0&&(_=function(){var e;return P(function(t){if(1==t.h)return isNaN(e=n.Na().end-n.h.currentTime)||!(e<=n.g.streaming.preloadNextUrlWindow)?t.A(0):(n.j.Oa(o,"timeupdate",_),t.g(n.preload(n.i.nextUrl),4));n.eb=t.i,t.j()})},n.j.F(o,"timeupdate",_)),n.j.F(o,"ended",function(){n.load(n.eb||n.i.nextUrl)}))),n.C&&n.C.onManifestUpdated(j),t.j()}})),0)})},"loadInner_"),24);case 24:var T,S,A,k=r;if(k.J)for(var I=x(k.J),E=I.next();!E.done;E=I.next())(E=E.value)();k.J=null,b.Ha&&eu().dj()&&nZ(b.Ha)&&function(t,n,i){if(t.g&&e.ManagedMediaSource&&t.i&&t.B.useSourceElements){var r;(null==(r=t.K)?void 0:r.parentElement)===t.g&&t.g.removeChild(t.K),t.K=aQ(n,i),t.g.appendChild(t.K),t.g.disableRemotePlayback=!1}}(b.H,b.X,b.Ha),w.A(16);break;case 25:return w.g(l(function(){return P(function(e){var t,n,r,a,o,s,u,l,c,d,p,f,g,m,v;return e.g((t=b,n=h,r=i,P(function(e){switch(e.h){case 1:var i,h,y;if(l0(t,"src-equals"),a=t.h,t.G=new sc(a),o=!1,t.xe.push(function(){o=!0}
1),t.dispatchEvent(lQ("canupdatestarttime")),null!=t.O&&t.G.Vf(t.O),i=t,h=t.O||0,(h=new uq(i.za,h instanceof Date||h>0)).addEventListener("enter",function(e){ce(i,e.region,"metadata")}),(y=new sA(i.h)).g.add(h),t.Xb=y,l9(t,a),ci(t,a,!0),a.textTracks&&(l6(t),s=function(e){if(!(t.u instanceof u5)){var n=cd(t).find(function(e){return"disabled"!==e.mode});n&&(n.mode=e?"showing":"hidden"),t.u instanceof u6&&(n=Array.from(t.h.textTracks).find(function(e){return"Shaka Player TextTrack"==e.label}))&&(n.mode=!e&&t.u.isTextVisible()?"showing":"hidden")}},t.j.F(a,"enterpictureinpicture",function(){return s(!0)}),t.j.F(a,"leavepictureinpicture",function(){return s(!1)}),a.remote?(t.j.F(a.remote,"connect",function(){return s(!1)}),t.j.F(a.remote,"connecting",function(){return s(!1)}),t.j.F(a.remote,"disconnect",function(){return s(!1)})):"webkitCurrentPlaybackTargetIsWireless"in a&&t.j.F(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return s(!1)}),((u=a).webkitPresentationMode||u.webkitSupportsFullscreen)&&t.j.F(u,"webkitpresentationmodechanged",function(){u.webkitPresentationMode?s("inline"!==u.webkitPresentationMode):u.webkitSupportsFullscreen&&s(u.webkitDisplayingFullscreen)})),l7(t,a,n),!(l=function(e,t,n){try{if(!e.g.enabled)return t;var i=ls(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=lw;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=lx;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/x-mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r="m";break e}r=void 0}i.ot=r,i.su=!0;var a=lv(i);return lb(t,a)}catch(e){return Y("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(t.K,t.X,r)).includes("#t=")&&(t.g.playRangeStart>0||isFinite(t.g.playRangeEnd))&&(l+="#t=",t.g.playRangeStart>0&&(l+=t.g.playRangeStart),isFinite(t.g.playRangeEnd)&&(l+=","+t.g.playRangeEnd)),!t.H){e.A(2);break}return e.g(t.H.destroy(),3);case 3:t.H=null;case 2:return aZ(a),a.src=l,"TV"==(c=eu()).Qa()&&a.load(),"none"!=a.preload&&!a.autoplay&&nZ(r)&&"WEBKIT"===c.Ia()&&a.load(),t.m=cJ,t.dispatchEvent(lQ("streaming")),d=function(){return new Promise(function(e){var n=new n7(e);t.j.F(a.textTracks,"change",function(){return n.na(.5)}),n.na(.5)})},p=new i$,st(a,HTMLMediaElement.HAVE_METADATA,t.j,function(){return P(function(e){if(1==e.h)return t.G.ready(),t.Ha&&nZ(t.Ha)?e.g(d(),3):(p.resolve(),e.A(0));p.resolve(),e.j()})}),st(a,HTMLMediaElement.HAVE_CURRENT_DATA,t.j,function(){var e,n,i,r,a;return P(function(s){var u,l,c,h;if(1==s.h)return s.g(d(),2);if(o)return s.return();if(""!=(l=(u=t).g.preferredAudioLanguage)&&u.Pi(l,u.g.preferredAudioRole),(e=cd(t)).some(function(e){return"showing"===e.mode})&&(t.$=!0,t.u.setTextVisibility(!0)),!(t.u instanceof u5))for(e.length&&(t.u.enableTextDisplayer?t.u.enableTextDisplayer():ep("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),n=!1,r=(i=x(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)):(cc(t,a),n=!0));""!=(h=(c=t).g.preferredTextLanguage)&&c.nh(h,c.g.preferredTextRole,c.g.preferForcedSubs),s.j()})}),a.error?p.reject(cH(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.j.Ba(a,"error",function(){p.reject(cH(t))}),e.g(ia(t.g.streaming.loadTimeout,p),4);case 4:((f=t.U())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(g=function(){return cT(t)},t.j.F(a,"timeupdate",g)),f||(m=function(){return cS(t)},t.j.F(a,"timeupdate",m),cS(t)),t.C&&(t.C.onManifestUpdated(f),f&&(v=t.Na().end,t.j.F(a,"progress",function(){var e=t.Na().end;v!=e&&(t.C.onManifestUpdated(t.U()),v=e)}))),t.Ua=!0,e.j()}})),0)})},"srcEqualsInner_"),16);case 16:b.dispatchEvent(lQ("loaded"));case 8:if(w.u(),!r){w.A(27);break}return w.g(r.destroy(),27);case 27:b.eb=null,w.B(0);break;case 7:if(!(y=w.l())||7e3==y.code){w.A(29);break}return w.g(b.yc(!1),29);case 29:throw y}})},p.hj=function(e,t,n){e=void 0===e||e,t=void 0!==t&&t,n=void 0!==n&&n;var i,r=this;return P(function(a){return 1==a.h?a.g(l2(r,n),2):3!=a.h?(i=a.i,a.g(r.yc(e,t),3)):a.return(i)})},p.Xh=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n,i=this;return P(function(r){return 1==r.h?r.g(l2(i,t),2):3!=r.h?(n=r.i,r.g(i.detach(e),3)):r.return(n)})},p.preload=function(e,t,n,i){t=void 0===t?null:t;var r,a,o,s=this;return P(function(u){return 1==u.h?(n=null==(r=n)?void 0:r.toLowerCase(),uI(a=cm(s),i||s.g,cm(s)),u.g(l4(s,e,t,n,!1,a),2)):((o=u.i)?o.start():cB(s,new eJ(2,7,7005)),u.return(o))})},p.mg=function(){var e,t,n,i,r=this;return P(function(a){for(e=[],n=(t=x(r.Ce)).next();!n.done;n=t.next())(i=n.value).l||e.push(i.destroy());return r.Ce=[],a.g(Promise.all(e),0)})},p.Ok=function(){for(var e=this.aa;e.g;)e.release()},p.ed=function(e){return new rR(e)},p.configure=function(e,t){var n=this.getConfiguration();if(2==arguments.length&&"string"==typeof e&&(e=up(e,t)),"preferredVariantRole"in e&&(ep("preferredVariantRole configuration","Please Use preferredAudioRole instead."),e.preferredAudioRole=e.preferredVariantRole,delete e.preferredVariantRole),e.streaming&&"forceTransmuxTS"in e.streaming&&(ep("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(ep("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){ep("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var i=eu();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&"WEBKIT"===i.Ia(),delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&"boolean"==typeof e.streaming.liveSync&&(ep("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),i=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=i),e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.
1streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){i=e.streaming.liveSyncMinLatency||0;var r=Math.abs((e.streaming.liveSyncMaxLatency||1)-i)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=i+r,e.streaming.liveSync.targetLatencyTolerance=r}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(ep("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(ep("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&&(ep("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&&(ep("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&&(ep("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&&(ep("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&&(ep("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&&(ep("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){ep("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var a=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return a},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(ep("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&&(ep("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(ep("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),e.manifest.enableAudioGroups=e.manifest.dash.enableAudioGroups,delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(ep("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(ep("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&&(ep("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&&(ep("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&&(ep("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&&(ep("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&&(ep("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 o in i=!1,e.drm.advanced){var s=e.drm.advanced[o];
1r=s.videoRobustness,s=s.audioRobustness,"videoRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].videoRobustness)&&(e.drm.advanced[o].videoRobustness=[r],i=!0),"audioRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].audioRobustness)&&(e.drm.advanced[o].audioRobustness=[s],i=!0)}i&&ep("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(ep("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(ep("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(ep("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),o=uI(this.g,e,cm(this)),co(this,n),o},p.wj=function(e){this.Yf=e},p.getConfiguration=function(){var e=cm(this);return uI(e,this.g,cm(this)),e},p.Gj=function(){return this.Yf},p.gi=function(){return uI(cm(this),this.g,cm(this)),uf(this.g,cm(this))},p.bi=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=Math.min(this.h.currentTime+this.g.streaming.bufferingGoal,this.Na().end);if(e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},p.Ki=function(){var e,t=this.getConfiguration();for(e in this.g)delete this.g[e];uI(this.g,cm(this),cm(this)),co(this,t)},p.Vd=function(){return this.m},p.di=function(){return this.i?this.i.type:null},p.Xe=function(){return this.h},p.Sb=function(){return this.N},p.kd=function(){return this.X},p.ai=function(){return this.C?this.C:null},p.ji=function(){return this.Ca?this.Ca:null},p.U=function(){return this.i&&!this.xa()?this.i.presentationTimeline.U():!!(this.h&&(this.h.src||this.xa()))&&this.h.duration==1/0},p.Pc=function(){return!!this.i&&this.i.presentationTimeline.Pc()},p.jk=function(){if(this.i&&!this.xa()){var e=this.i.variants;return!!e.length&&!e[0].video}return!!(this.h&&(this.h.src||this.xa()))&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},p.pi=function(){if(this.i&&!this.xa()){var e=this.i.variants;return!!e.length&&!(e=e[0]).audio&&!!e.video&&!e.video.codecs.includes(",")}return!!(this.h&&(this.h.src||this.xa()))&&!!this.h.audioTracks&&0==this.h.audioTracks.length},p.Na=function(){if(this.i&&!this.xa()){if(!this.Ua&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Ub(),end:e.Eb()}}if(this.h&&(this.h.src||this.xa())&&(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}},p.gk=function(){this.U()&&(this.h.currentTime=this.Na().end)},p.kk=function(){return this.Ua},p.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},p.drmInfo=function(){return this.D?this.D.g:null},p.Ud=function(){return this.D?this.D.Ud():1/0},p.Fg=function(){return this.D?this.D.Fg():[]},p.We=function(){return this.D?this.D.We():{}},p.Ng=function(){return this.P?this.P.g==r2:!!this.X},p.Db=function(){return this.h?this.M?this.M.h:1:0},p.Hh=function(e){this.m==cY&&this.l&&sY(this.l,e)},p.qe=function(e,t){if(t=void 0===t||t,0==e)X("A trick play rate of 0 is unsupported!");else{var n=this.h.playbackRate,i=this.M.h;this.M.set(e),this.m==cY&&(this.o.playbackRateChanged(e),this.Hh(t&&1!=e)),cb(this,e),0===n&&0===this.h.playbackRate&&e!=i&&cy(this)}},p.Nd=function(){var e=this.M.ld();this.m==cJ&&this.M.set(e),this.m==cY&&(this.M.set(e),this.o.playbackRateChanged(e),this.Hh(!1)),this.$b.Sa()},p.kc=function(){if(this.i&&!this.xa()){for(var e=this.l?this.l.o:null,t=[],n=0,i=x(this.i.variants),r=i.next();!r.done;r=i.next())if(iL(r=r.value)){var a=iI(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}if(this.h&&this.h.audioTracks){var o=cM(this);return(e=Array.from(this.h.audioTracks)).length?e.map(function(e){return iR(e,o)}):o?[iR(null,o)]:[]}return[]},p.Gc=function(){if(this.i){if(this.xa())return[];for(var e=this.l?this.l.B:null,t=[],n=x(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=iE(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?cd(this).map(function(e){return iD(e)}):[]},p.Lj=function(){var e=this.Ee;return this.i&&(e=this.i.imageStreams),e.map(function(e){return iC(e)})},p.zj=function(e){var t,n,i=this;return P(function(r){return 1==r.h?r.g(cu(i,e),2):(t=r.i)?(n=[],t.segmentIndex.qb(function(e){var i=cs(e.tilesLayout||t.tilesLayout);if(i)for(var r=i.rows*i.columns,a=(e.j-e.startTime)/r,o=0;o<r;o++){var s=cl(e,t,e.startTime+o*a,i);if(!s)break;n.push(s)}}),r.return(n)):r.return(null)})},p.$j=function(e,t){var n,i,r,a,o=this;return P(function(s){return 1==s.h?s.g(cu(o,e),2):(n=s.i)&&null!=(i=n.segmentIndex.find(t))&&(a=cs((r=n.segmentIndex.get(i)).tilesLayout||n.tilesLayout))?s.return(cl(r,n,t,a)):s.return(null)})},p.oh=function(e){var t;if((!this.i||!this.G||((t=this.i.textStreams.find(function(t){return t.id==e.id}
1))&&t!=this.l.B&&(uL(this.B.h,t,!1),s$(this.l,t),cN(this),cU(this),this.Gd=t.language),this.xa()))&&this.h&&this.h.textTracks){var n=cd(this),i=n.find(function(t){return iM(t)===e.id});if(i){if(this.u instanceof u5){n=x(n);for(var r=n.next();!r.done;r=n.next()){var a=(r=r.value)===i?this.$?"showing":"hidden":"disabled";r.mode!==a&&(r.mode=a)}}else(n=n.find(function(e){return"disabled"!==e.mode}))!==i&&(n&&(n.mode="disabled",this.j.Oa(n,"cuechange"),this.u.remove(0,1/0)),i&&cc(this,i));cN(this),cU(this)}}},p.Ff=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&&iL(r)){var a=i.l.o;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.xa()?cE(i,r,!1,!1,0):cE(i,r,!1,t||!1,n||0),i.J.configure({language:r.language,role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",videoRole:r.video&&r.video.roles&&r.video.roles[0]||"",channelCount:r.audio&&r.audio.channelsCount?r.audio.channelsCount:0,hdrLevel: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:"",audioLabel:r.audio&&r.audio.label?r.audio.label:"",videoLabel:r.video&&r.video.label?r.video.label:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:"",activeAudioCodec:a.audio&&a.audio.codecs?a.audio.codecs:"",activeAudioChannelCount:a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),cA(i)}}(),this.xa()))&&e.originalAudioId&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks);r=x(r);for(var a=r.next();!a.done;a=r.next())if(iM(a=a.value)==e.id){cC(i,a);break}}},p.Wk=function(e,t){var n,i,r=this;t=void 0===t?0:t,(!this.i||!this.G||((n=r.J.getConfiguration()).audioCodec=e.codecs||"",n.audioLabel=e.label||"",n.channelCount=e.channelsCount||0,n.language=e.language,n.role=e.roles[0]||"",n.spatialAudio=e.spatialAudio,(i=(i=r.l.o)&&i.audio)&&(n.activeAudioCodec=i.codecs||"",n.activeAudioChannelCount=i.channelsCount||0),r.J.configure(n),cI(r,!0,t,!1,!1),this.xa()))&&function(){if(r.h&&r.h.audioTracks){var t=ic(e.language),n=Array.from(r.h.audioTracks),i=null;n=x(n);for(var a=n.next();!a.done;a=n.next()){var o=(a=a.value).language||"und";if(a.label==e.label&&ic(o)==t&&a.kind==e.roles[0]){i=a;break}}i&&cC(r,i)}}()},p.getAudioTracks=function(){if(this.i&&!this.xa()){var e=this.kc();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e;if(this.m!=cY||this.xa()||(n=e.filter(function(e){return e.originalVideoId===t.originalVideoId&&(e.audioCodec||n1.includes(e.audioMimeType||""))})),!n.length)return[];e=new Map,n=x(n);for(var i=n.next();!i.done;i=n.next()){var r=i.value;i=[r.language,r.originalLanguage,r.label||"",(r.audioRoles||[]).join(","),r.channelsCount,r.spatialAudio,r.audioCodec||"",r.accessibilityPurpose||""].join("_"),r={active:r.active,language:r.language,label:r.label,mimeType:r.audioMimeType,codecs:r.audioCodec,primary:r.primary,roles:r.audioRoles||[],accessibilityPurpose:r.accessibilityPurpose,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,originalLanguage:r.originalLanguage},e.has(i)?!e.get(i).active&&r.active&&e.set(i,r):e.set(i,r)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(e){var t=e.language;return t={active:e.enabled,language:ic(t||"und"),label:e.label,mimeType:null,codecs:null,primary:"main"==e.kind,roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:t},e.kind&&("description"==e.kind&&(t.accessibilityPurpose="visually impaired"),t.roles.push(e.kind)),e.configuration&&(e.configuration.codec&&(t.codecs=e.configuration.codec),e.configuration.sampleRate&&(t.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(t.channelsCount=e.configuration.numberOfChannels)),t}):[]},p.Yk=function(e,t,n){t=void 0!==t&&t,n=void 0===n?0:n;var i=this.kc();if(i.length){var r,a=i.find(function(e){return e.active});a&&((r=1==(i=i.filter(function(t){return(t.videoBandwidth||t.bandwidth)==e.bandwidth&&t.width==e.width&&t.height==e.height&&t.frameRate==e.frameRate&&t.pixelAspectRatio==e.pixelAspectRatio&&t.hdr==e.hdr&&t.colorGamut==e.colorGamut&&t.videoLayout==e.videoLayout&&t.videoMimeType==e.mimeType&&t.videoCodec==e.codecs&&en(t.videoRoles,e.roles)&&t.videoLabel==e.label})).length?i[0]:i.find(function(e){return e.audioId===a.audioId}))||(r=i.find(function(e){return e.language==a.language&&e.label===a.label&&e.channelsCount===a.channelsCount&&e.spatialAudio===a.spatialAudio&&e.audioMimeType===a.audioMimeType&&nY(e.audioCodec||"")===nY(a.audioCodec||"")&&en(e.audioRoles,a.audioR
1oles)})),r&&!r.active&&this.Ff(r,t,n))}},p.getVideoTracks=function(){if(this.m==cJ||this.xa())return[];var e=this.kc();if(!e.length)return[];var t=e.find(function(e){return e.active});if(!t)return[];var n=e;if(this.pi()||(n=e.filter(function(e){return!!e.videoCodec&&e.audioGroupId===t.audioGroupId&&e.originalAudioId===t.originalAudioId&&(e.audioId===t.audioId||e.language===t.language&&e.label===t.label&&e.channelsCount===t.channelsCount&&e.spatialAudio===t.spatialAudio&&e.audioMimeType===t.audioMimeType&&nY(e.audioCodec||"")===nY(t.audioCodec||"")&&en(e.audioRoles,t.audioRoles))})),!n.length)return[];e=new Map,n=x(n);for(var i=n.next();!i.done;i=n.next()){var r=(i=i.value).originalVideoId;r||null==i.videoId||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec,roles:i.videoRoles||[],label:i.videoLabel})}return Array.from(e.values())},p.Bj=function(){return cz(this.kc())},p.Yj=function(){return cz(this.Gc())},p.Aj=function(){return Array.from(cq(this.kc()))},p.Xj=function(){return Array.from(cq(this.Gc()))},p.Pi=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 u(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0}var l=s.l.o;s.J=s.g.adaptationSetCriteriaFactory(),s.J.configure({language:e,role:t||"",videoRole:l.video&&l.video.roles&&l.video.roles[0]||"",channelCount:n||0,hdrLevel:"",spatialAudio:a||!1,videoLayout:"",audioLabel:o||"",videoLabel:"",codecSwitchingStrategy:s.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",activeAudioCodec:l.audio&&l.audio.codecs?l.audio.codecs:"",activeAudioChannelCount:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,preferredAudioCodecs:s.g.preferredAudioCodecs,preferredAudioChannelCount:s.g.preferredAudioChannelCount});var c=s.J.create(s.i.variants),d=null;c=x(c.values());for(var h=c.next();!h.done;h=c.next())iL(h=h.value)&&(!d||u(d,l)>u(h,l))&&(d=h);d!=l&&(d?(l=iI(d),s.Ff(l,!0,i||0)):cI(s))}(),this.xa()))&&s.h&&s.h.audioTracks){var u=iN(s.kc(),e,t||"",!1)[0];u&&s.Ff(u)}},p.nh=function(e,t,n){var i,r;n=void 0!==n&&n,(!this.i||!this.G||(this.Gd=e,this.Kd=t||"",this.Jd=n||!1,(i=iN(this.i.textStreams,this.Gd,this.Kd,this.Jd)[0]||null)&&i!=this.l.B&&(uL(this.B.h,i,!1),this.g.streaming.alwaysStreamText||this.Qg())&&(s$(this.l,i),cN(this),cU(this)),this.xa()))&&(r=iN(this.Gc(),e,t||"",n||!1)[0])&&this.oh(r)},p.Xk=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=x(i.i.variants),o=a.next();!o.done;o=a.next())if((o=o.value).audio.label==e){r=o;break}null!=r&&(i.J=i.g.adaptationSetCriteriaFactory(),i.J.configure({language:r.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),cI(i,t,n))}(),this.xa()))&&i.h&&i.h.audioTracks){var r=Array.from(i.h.audioTracks),a=null;r=x(r);for(var o=r.next();!o.done;o=r.next())(o=o.value).label==e&&(a=o);a&&cC(i,a)}},p.Qg=function(){var e=this.$;return this.u?this.u.isTextVisible():e},p.Fj=function(){return this.ib.map(function(e){return iE(e)})},p.Dj=function(e){if(ep("getChapters","Please use an getChaptersAsync."),!this.ib.length)return[];var t=ic(e);if(!(e=this.ib.filter(function(e){return ic(e.language)==t})).length)return[];var n=[],i=new Set;e=x(e);for(var r=e.next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.qb(function(e){var t=e.R()[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},p.Ej=function(e){var t,n,i,r,a,o,s,u=this;return P(function(l){switch(l.h){case 1:if(!u.ib.length||(t=ic(e),!(n=u.ib.filter(function(e){return ic(e.language)==t})).length))return l.return([]);i=[],r=new Set,o=(a=x(n)).next();case 2:if(o.done){l.A(4);break}if((s=o.value).segmentIndex){l.A(5);break}return l.g(s.createSegmentIndex(),5);case 5:s.segmentIndex.qb(function(e){var t=e.R()[0],n=e.startTime+"-"+e.endTime+"-"+t;e={id:n,title:t,startTime:e.startTime,endTime:e.endTime},r.has(n)||(i.push(e),r.add(n))}),o=a.next(),l.A(2);break;case 4:return l.return(i)}})},p.sh=function(e){var t,n;e=!!e,this.$!=e&&(this.$=e,this.m==cY?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.B||(e=iN(this.i.textStreams,this.Gd,this.Kd,this.Jd)).length>0&&(s$(this.l,e[0]),cN(this),cU(this)):((n=(t=this.l).h.get(tc))&&(un(n),ui(n).catch(function(){}),t.I=t.h.get(tc),t.h.delete(tc),n.stream&&n.stream.closeSegmentIndex&&n.stream.closeSegmentIndex()),t.B=null))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),cj(this))},p.Rj=function(){if(this.G)var e=this.G.Ld();else{if(null==this.O)return new Date;if(this.O instanceof Date)return this.O;e=this.O}if(this.i&&!this.xa()){var t=this.i.presentationTimeline;return new Date(((t.m||t.i)+e)*1e3)}return this.h&&this.h.getStartDate&&(t=this.h.getStartDate())instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+1e3*e):null},p.ii=function(){if(this.i&&!this.xa()){var e=this.i.presentationTimeline;return null===(e=e.m||e.i)?null:new Date(1e3*e)}return this.h&&this.h.getStartDate&&(e=this.h.getStartDate())instanceof Date&&!isNaN(e.getTime())?e:null},p.Ye=function(){return this.U()&&this.i?this.i.presentationTimeline.Ye():null},p.Cc=function(){if(this.m==cY)return this.H.Cc();var e={total:[],audio:[],video:[],text:[]};return this.m==cJ&&(e.total=aJ(this.h.buffered)),e},p.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN}
1,p.getStats=function(){if(this.m!=cY&&this.m!=cJ)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};cw(this);var e,t,n=this.h,i=n.currentTime/n.duration;if(isNaN(i)||this.U()||(r=this.B,a=Math.round(100*i),r.i=isNaN(r.i)?a:Math.max(r.i,a)),this.G&&(this.B.S=this.G.Ih(),this.B.T=this.G.Kh()),n.getVideoPlaybackQuality&&(i=n.getVideoPlaybackQuality(),o=this.B,s=Number(i.droppedVideoFrames),u=Number(i.totalVideoFrames),o.P=s,o.O=u,this.B.N=Number(i.corruptedVideoFrames)),c=this.B,(d=this.D&&(l=this.D).J?l.J:NaN)>=0&&(c.o=d),h=this.B,p=n.videoWidth||NaN,f=n.videoHeight||NaN,h.X=p,h.C=f,this.B.l="",this.U()&&null!=(n=ch(this))&&(g=this.B,(m=n/1e3)>=0&&(g.D=m)),i=this.kc().find(function(e){return e.active}),n=this.Gc().find(function(e){return e.active}),i){if(i.bandwidth){var r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w=this.M?this.M.h:1,T=w*i.bandwidth;n&&n.bandwidth&&(T+=w*n.bandwidth),this.B.B=T}i.width&&i.height&&(v=this.B,y=i.width||NaN,b=i.height||NaN,v.X=y,v.C=b),i=i.codecs,n&&(i+=","+(n.codecs||n.mimeType)),i&&(this.B.l=i)}return this.m!=cY||this.xa()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(e=this.B,(t=this.i.presentationTimeline.h)>=0&&(e.K=t))),n=this.o.getBandwidthEstimate(),this.B.u=n),this.m==cJ&&uN(this.B,NaN),function(e){var t=e.X,n=e.C,i=e.l,r=e.B,a=e.O,o=e.P,s=e.N,u=e.T,l=e.S,c=e.u,d=e.i,h=e.G,p=e.J,f=e.m,g=uD(e.g,"playing"),m=uD(e.g,"paused"),v=uD(e.g,"buffering"),y=e.o,b=e.D,w=e.K,T=e.si,S=e.j,A=e.M,k=e.I,I=e.H,E=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=x(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(e.g),C=[];e=x(e.h.g);for(var M=e.next();!M.done;M=e.next())C.push({timestamp:(M=M.value).timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:a,droppedFrames:o,corruptedFrames:s,stallsDetected:u,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:h,manifestTimeSeconds:p,drmTimeSeconds:f,playTime:g,pauseTime:m,bufferingTime:v,licenseTime:y,liveLatency:b,maxSegmentDuration:w,manifestSizeBytes:T,bytesDownloaded:S,nonFatalErrorCount:A,manifestPeriodCount:k,manifestGapCount:I,stateHistory:E,switchHistory:C}}(this.B)},p.Md=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,p,f=this;return P(function(g){switch(g.h){case 1:if(f.m!=cY&&f.m!=cJ)throw new eJ(1,7,7004);if("subtitles"!=n&&"captions"!=n&&X("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){g.A(2);break}return g.g(cp(f,e),3);case 3:i=g.i;case 2:var m,v,y,b,w,T,x,S;if(s=[],f.C&&(s=f.C.getCuePoints()),f.m!=cJ){g.A(4);break}return u=eu(),o&&"WEBKIT"===u.Ia()&&(n="forced"),g.g((m=f,v=e,y=t,b=n,w=i,T=a||"",x=s,P(function(e){if(1==e.h)return"text/vtt"!=w||x.length?e.g(cf(m,v),3):e.A(2);2!=e.h&&(v=oZ(new Blob([cg(m,e.i,w,x)],{type:"text/vtt"})),w="text/vtt"),S=document.createElement("track");e:{var t=m.K,n=v;try{if(!t.g.enabled){var i=n;break e}var r=ls(t);r.ot=lA,r.su=!0;var a=lv(r);i=lb(n,a);break e}catch(e){Y("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),i=n;break e}}return S.src=i,S.label=T,S.kind=b,S.srclang=y,m.h.getAttribute("crossorigin")||m.h.setAttribute("crossorigin","anonymous"),m.h.appendChild(S),m.Xf.push(S),e.return(S)})),5);case 5:if((l=g.i).track)return cD(f),cN(f),g.return(iD(l.track));throw new eJ(1,2,2012);case 4:if(c=td,h=(d=f.Na()).end-d.start,f.i&&(h=f.i.presentationTimeline.getDuration()),h==1/0)throw new eJ(1,4,4033);if(!s.length){g.A(6);break}return g.g(cf(f,e),7);case 7:e=oZ(new Blob([cg(f,g.i,i,s)],{type:"text/vtt"})),i="text/vtt";case 6:if(p={id:f.ze++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sb(0,h,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.Pa,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([nq(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!n5(nq(p.mimeType,p.codecs)))throw new eJ(2,2,2014,i);return f.i.textStreams.push(p),cD(f),cN(f),g.return(iE(p))}})},p.Je=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w=this;return P(function(T){switch(T.h){case 1:if(w.m!=cY&&w.m!=cJ)throw new eJ(1,7,7004);if(t){T.A(2);break}return T.g(cp(w,e),3);case 3:t=T.i;case 2:if("text/vtt"!=t)throw new eJ(1,2,2017,e);if(n=td,r=(i=w.Na()).end-i.start,w.i&&(r=w.i.presentationTimeline.getDuration()),r==1/0)throw new eJ(1,4,4045);return T.g(cf(w,e),4);case 4:if(a=T.i,!(o=n3(t)))throw new eJ(2,2,2014,t);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=eO(a),c=s.parseMedia(l,u,e,[]),d=[],p=(h=x(c)).next(),f={};!p.done;f={Sf:void 0,fd:void 0},p=h.next())f.fd=p.value,f.Sf=null,g=function(t){return function(){return null==t.Sf&&(t.Sf=tr([e],[t.fd.payload])),t.Sf||[]}}(f),m=new aV(f.fd.startTime,f.fd.endTime,g,0,null,null,0,0,1/0),f.fd.payload.includes("#xywh")&&4===(v=f.fd.payload.split("#xywh=")[1].split(",")).length&&m.If({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)}),d.push(m);if(y=t,!d.length){T.A(5);break}return T.g(cp(w,d[0].R()[0]),6);case 6:y=T.i;case 5:return b={id:w.ze++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sy(d),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Uf,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([nq(y||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},w.m==cJ?w.Ee.push(b):w.i.imageStreams.push(b),cD(w),T.return(iC(b))}})},p.Ie=function(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y=this;return P(function(b){switch(b.h){case 1:if(y.m!=cY&&y.m!=cJ)throw new eJ(1,7,7004);if(n){b.A(2);break}return b.g(cp(y,e),3);
1case 3:n=b.i;case 2:if(i=td,a=(r=y.Na()).end-r.start,y.i&&(a=y.i.presentationTimeline.getDuration()),a==1/0)throw new eJ(1,4,4055);if(!(o=n3(n)))throw new eJ(2,2,2014,n);return b.g(cf(y,e),4);case 4:for(s=b.i,u=o(),l={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},c=eO(s),d=u.parseMedia(c,l,e,[]),h=[],f=(p=x(d)).next(),g={};!f.done;g={Re:void 0},f=p.next())g.Re=f.value,m=new aV(g.Re.startTime,g.Re.endTime,function(e){return function(){return[e.Re.payload]}}(g),0,null,null,0,0,1/0),h.push(m);return v={id:y.ze++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sy(h),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Pa,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([nq("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},y.ib.push(v),cD(y),b.return(iE(v))}})},p.fl=function(e,t){this.ya.width=e,this.ya.height=t},p.jh=function(e){if(this.m==cY){var t=this.l;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=x(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).pd||i.Ja||i.kb||(i.pd=!1,ut(t,i,e));t=!0}}else t=!1;return t},p.Gg=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},p.Oj=function(){return this.vc},p.Jj=function(){var e={video:null,audio:null,text:null};if(this.m!=cY)return e;var t=this.l.o,n=this.h.currentTime;t=x([t.video,t.audio,this.l.B]);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==tc&&(e.text=r)}return e},p.Wi=function(e){this.ve=e},p.disableStream=function(e,t){if(!(this.g.abr.enabled&&this.m!==cW&&navigator.onLine&&0!=t&&this.i&&this.o))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=x(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.Be.Fa(1),cI(this,!1,t=this.Cc().video.reduce(function(e,t){return e+t.end-t.start},0),!0,!1),!0)}return!1},p.addFont=function(t,n){var i,r,a,o;return P(function(s){if(1==s.h)return"fonts"in document&&"FontFace"in e?s.g(document.fonts.ready,2):s.return();if(!("entries"in document.fonts))return s.return();for(r=(i=x(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),s.j()})},p.xa=function(){return!!this.h&&!!this.h.remote&&"disconnected"!=this.h.remote.state},p.$d=function(){return!this.h||!!this.h.ended||this.Ua&&!this.U()&&this.h.currentTime>=this.Na().end},H("shaka.Player",lJ),lJ.prototype.isEnded=lJ.prototype.$d,lJ.prototype.isRemotePlayback=lJ.prototype.xa,lJ.prototype.addFont=lJ.prototype.addFont,lJ.prototype.setVideoContainer=lJ.prototype.Wi,lJ.prototype.getFetchedPlaybackInfo=lJ.prototype.Jj,lJ.prototype.getManifestParserFactory=lJ.prototype.Oj,lJ.prototype.getManifest=lJ.prototype.Gg,lJ.prototype.retryStreaming=lJ.prototype.jh,lJ.prototype.setMaxHardwareResolution=lJ.prototype.fl,lJ.prototype.addChaptersTrack=lJ.prototype.Ie,lJ.prototype.addThumbnailsTrack=lJ.prototype.Je,lJ.prototype.addTextTrackAsync=lJ.prototype.Md,lJ.prototype.getStats=lJ.prototype.getStats,lJ.prototype.getBufferedInfo=lJ.prototype.Cc,lJ.prototype.getSegmentAvailabilityDuration=lJ.prototype.Ye,lJ.prototype.getPresentationStartTimeAsDate=lJ.prototype.ii,lJ.prototype.getPlayheadTimeAsDate=lJ.prototype.Rj,lJ.prototype.setTextTrackVisibility=lJ.prototype.sh,lJ.prototype.getChaptersAsync=lJ.prototype.Ej,lJ.prototype.getChapters=lJ.prototype.Dj,lJ.prototype.getChaptersTracks=lJ.prototype.Fj,lJ.prototype.isTextTrackVisible=lJ.prototype.Qg,lJ.prototype.selectVariantsByLabel=lJ.prototype.Xk,lJ.prototype.selectTextLanguage=lJ.prototype.nh,lJ.prototype.selectAudioLanguage=lJ.prototype.Pi,lJ.prototype.getTextLanguages=lJ.prototype.Xj,lJ.prototype.getAudioLanguages=lJ.prototype.Aj,lJ.prototype.getTextLanguagesAndRoles=lJ.prototype.Yj,lJ.prototype.getAudioLanguagesAndRoles=lJ.prototype.Bj,lJ.prototype.getVideoTracks=lJ.prototype.getVideoTracks,lJ.prototype.selectVideoTrack=lJ.prototype.Yk,lJ.prototype.getAudioTracks=lJ.prototype.getAudioTracks,lJ.prototype.selectAudioTrack=lJ.prototype.Wk,lJ.prototype.selectVariantTrack=lJ.prototype.Ff,lJ.prototype.selectTextTrack=lJ.prototype.oh,lJ.prototype.getThumbnails=lJ.prototype.$j,lJ.prototype.getAllThumbnails=lJ.prototype.zj,lJ.prototype.getImageTracks=lJ.prototype.Lj,lJ.prototype.getTextTracks=lJ.prototype.Gc,lJ.prototype.getVariantTracks=lJ.prototype.kc,lJ.prototype.cancelTrickPlay=lJ.prototype.Nd,lJ.prototype.trickPlay=lJ.prototype.qe,lJ.prototype.useTrickPlayTrackIfAvailable=lJ.prototype.Hh,lJ.prototype.getPlaybackRate=lJ.prototype.Db,lJ.prototype.isBuffering=lJ.prototype.Ng,lJ.prototype.getKeyStatuses=lJ.prototype.We,lJ.prototype.getActiveSessionsMetadata=lJ.prototype.Fg,lJ.prototype.getExpiration=lJ.prototype.Ud,lJ.prototype.drmInfo=lJ.prototype.drmInfo,lJ.prototype.keySystem=lJ.prototype.keySystem,lJ.prototype.isFullyLoaded=lJ.prototype.kk,lJ.prototype.goToLive=lJ.prototype.gk,lJ.prototype.seekRange=lJ.prototype.Na,lJ.prototype.isVideoOnly=lJ.prototype.pi,lJ.prototype.isAudioOnly=lJ.prototype.jk,lJ.prototype.isInProgress=lJ.prototype.Pc,lJ.prototype.isLive=lJ.prototype.U,lJ.prototype.getQueueManager=lJ.prototype.ji,lJ.prototype.getAdManager=lJ.prototype.ai,lJ.prototype.getAssetUri=lJ.prototype.kd,lJ.prototype.getNetworkingEngine=lJ.prototype.Sb,lJ.prototype.getMediaElement=lJ.prototype.Xe,lJ.prototype.getManifestType=lJ.prototype.di,lJ.prototype.getLoadMode=lJ.prototype.Vd,lJ.prototype.resetConfiguration=lJ.prototype.Ki,lJ.prototype.getBufferFullness=lJ.prototype.bi,lJ.prototype.getNonDefaultConfiguration=lJ.prototype.gi,lJ.prototype.getConfigurationForLowLatency=lJ.prototype.Gj,lJ.prototype.getConfiguration=lJ.prototype.getConfiguration,lJ.prototype.configurationForLowLatency=lJ.prototype.wj,lJ.prototype.configure=lJ.prototype.configure,lJ.prototype.releaseAllMutexes=lJ.prototype.Ok,lJ.prototype.destroyAllPreloads=lJ.prototype.mg,lJ.prototype.preload=lJ.prototype.preload,lJ.prototype.detachAndSavePreload=lJ.prototype.Xh,lJ.prototype.unloadAndSavePreload=lJ.prototype.hj,lJ.prototype.load=lJ.prototype.load,lJ.prototype.updateStartTime=lJ.prototype.ql,lJ.prototype.unload=lJ.prototype.yc,lJ.prototype.detach=lJ.prototype.detach,lJ.prototype.attachCanvas=lJ.prototype.oj,lJ.prototype.attach=lJ.prototype.Pb,lJ.probeSupport=function(t){var n,i,r,a,o,s;return t=void 0===t||t,P(function(u){switch(u.h){case 1:var l,c,d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M,D,R,L,N,j;if(n={},!t){u.A(2);break}return u.g(P(function(t){if(1==t.h){if(l="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(c={},h=(d=x(l)).next();!h.done;h=d.next())c[h.value]=null;return t.return(c)}for(p="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),g={"com.widevine.alpha":f=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":f,"com.microsoft.playready.recommendation":["150","2000","3000"]},m={videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},v=[null,"cenc","cbcs"],y=new Map,b=eu(),w=function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,g;return P(function(m){switch(m.h){case 1:return m.m(2),m.g(t.createMediaKeys(),5);case 5:i=m.i;case 4:m.o(3);break;case 2:return m.l(),m.return();case 3:if(a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),b.zi()&&(a=!1),o=t.getConfiguration().videoCapabilities,s=t.getConfiguration().audioCapabilities,u={persistentState:a,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},y.get(e)?u=y.get(e):y.set(e,u),(l=o[0].encryptionScheme)&&!u.encryptionSchemes.includes(l)&&u.encryptionSchemes.push(l),(c=o[0].robustness)&&!u.videoRobustnessLevels.includes(c)&&u.videoRobustnessLevels.push(c),(d=s[0].robustness)&&!u.audioRobustnessLevels.includes(d)&&u.audioRobustnessLevels.push(d),!(n&&"getStatusForPolicy"in i)){m.A(0);break}f=(h=x(p)).next();case 7:if(f.done){m.A(0);break}if(g=f.value,u.minHdcpVersions.includes(g)){m.A(8);break}return m.g(i.getStatusForPolicy({minHdcpVersion:g}),10);case 10:if("usable"==m.i)u.minHdcpVersions.includes(g)||u.minHdcpVersions.push(g);else{m.A(0);break}case 8:f=h.next(),m.A(7)}})},T=function(e,t,n,i,r){var a,o,s,u,l,c,d,h,p,f;return r=void 0!==r&&r,P(function(g){switch(g.h){case 1:for(g.m(2),s=(o=x((a=tV(m)).videoCapabilities)).next();!s.done;s=o.next())(u=s.value).encryptionScheme=t,u.robustness=n;for(c=(l=x(a.audioCapabilities)).next();!c.done;c=l.next())(d=c.value).encryptionScheme=t,d.robustness=i;return(h=tV(a)).persistentState="required",h.sessionTypes=["persistent-license"],p=[h,a],"MOBILE"==eu().Qa()?g.g(ia(5,navigator.requestMediaKeySystemAccess(e,p)),7):g.g(navigator.requestMediaKeySystemAccess(e,p),6);case 6:f=g.i,g.A(5);break;case 7:f=g.i;case 5:return g.g(w(e,f,r),8);case 8:g.o(0);break;case 2:g.l(),g.j()}})},A=[],I=(k=x(l)).next();!I.done;I=k.next())if(E=I.value,y.set(E,null),!("WEBKIT"===eu().Ia()&&eH(E))){for(C=!0,D=(M=x(v)).next();!D.done;D=M.next())R=D.value,A.push(T(E,R,"","",C)),C=!1;for(N=(L=x(g[E]||[])).next();!N.done;N=L.next())j=N.value,A.push(T(E,null,j,"")),A.push(T(E,null,"",j))}return t.g(Promise.all(A),2)}return t.return(rf(y))}),3);case 3:n=u.i;case 2:return i=function(){var e={};if(eu(),fP())for(var t=x(tT.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=x(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","audio/x-mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=t.next())e[n=n.value]=fP()?tT.has(n):""!=a1().canPlayType(n);return e}(),r=function(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.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.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(S(n1)),t={};eu(),e=x(e);for(var n=e.next();!n.done;n=e.next()){if(n5(n=n.value))t[n]=!0;else if(fP()){var i=n$(n),r=iA(nQ(n),i);i=nq(i,r),t[n]=at(i)||!!n_(i)}else t[n]=""!=a1().canPlayType(n);t[i=n.split(";")[0]]=t[i]||t[n]}return t}(),a=eu(),u.g(a.hc(),4);case 4:return o=u.i,s={manifest:i,media:r,drm:n,hardwareResolution:o},c$.forEach(function(e,t){s[t]=e()}),u.return(s)}})},lJ.isBrowserSupported=function(){return e.Promise||X("A Promise implementation or polyfill is required"),!(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/"))&&(eu(),!!fP()||""!=a1().canPlayType("application/x-mpegurl"))},lJ.setQueueManagerFactory=function(e){cZ=e},lJ.setAdManagerFactory=function(e){cQ=e},lJ.registerSupportPlugin=lZ,lJ.prototype.destroy=lJ.prototype.destroy;var cW=0,cX=1,cY=2,cJ=3;lJ.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3},lJ.version="v4.16.50";em=new function(e){this.g=e,this.i=ef,this.h=eg}(new eh(Number("4"),Number("16")));var c$=new Map,cQ=null,cZ=null;function c0(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function c1(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new er,this.l.F(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function c2(){}function c4(e,t){var n=[];
1e=x(tY(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=tZ(i.value,"InLine"))&&(i=tZ(i,"Creatives"))){i=x(tY(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){var a=tZ(r=r.value,"Linear");if(a&&function(e,t,n){var i=0;null!=t&&(i=t);var r=null;n.attributes.skipoffset&&isNaN(r=t_(n.attributes.skipoffset))&&(r=null);var a=tZ(n,"MediaFiles");if(a){var o=null;for((n=tZ(n,"VideoClicks"))&&(n=tZ(n,"ClickThrough"))&&(n=t$(n))&&(o=n),a=n=tY(a,"MediaFile"),(n=n.filter(function(e){return"streaming"==e.attributes.delivery})).length&&(a=n),n=(a=x(a=a.sort(function(e,t){return(parseInt(t.attributes.height,10)||0)-(parseInt(e.attributes.height,10)||0)}))).next();!n.done;n=a.next())if(!(n=n.value).attributes.apiFramework){var s=t$(n);if(s){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:s,mimeType:n.attributes.type||null,isSkippable:null!=r,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:o});break}}}}(n,t,a),r=tZ(r,"NonLinearAds")){r=x(r=tY(r,"NonLinear"));for(var o=r.next();!o.done;o=r.next())e:{a=n;var s=o.value,u=tZ(s,"StaticResource");if(u)o=u.attributes.creativeType;else{if(!(u=tZ(s,"HTMLResource")))break e;o="text/html"}if(u=t$(u)){"text/html"===o&&(u="data:text/html;charset=UTF-8,"+encodeURIComponent(u));var l=t1(s,"width",t9)||t1(s,"expandedWidth",t9),c=t1(s,"height",t9)||t1(s,"expandedHeight",t9);if(l||c){var d=null,h=tZ(s,"NonLinearClickThrough");h&&(h=t$(h))&&(d=h),h=null,(s=s.attributes.minSuggestedDuration)&&(h=t_(s)),s=0,null!=t&&(s=t),a.push({id:null,groupId:null,startTime:s,endTime:null,uri:u,mimeType:o,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:h,once:!0,pre:null==t,post:t==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:l||0,y:c||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:d})}}}}}}return n}function c3(t,n,i,r,a){var o=this;this.u=t,this.i=n,this.G=!1,this.B=this.o=null,this.H=NaN,this.l=a,this.j=null,this.h=new er,google.ima.settings.setLocale(i),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.16.50"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.F(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){!function(t,n){if(t.l(new i3("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.H))),t.o.customPlayheadTracker){var i={currentTime:t.i.currentTime};t.g=n.getAdsManager(i,t.C),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.F(t.i,"timeupdate",function(){t.i.duration&&(i.currentTime=t.i.currentTime)}),t.h.F(t.i,"volumechange",function(){t.j&&(t.j.setVolume(t.i.volume),t.i.muted&&t.j.setMuted(!0))})}else t.g=n.getAdsManager(t.i,t.C);t.l(new i3("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var r=t.g.getCuePoints();if(r.length){n=[],r=x(r);for(var a=r.next();!a.done;a=r.next())n.push({start:a.value,end:null});t.l(new i3("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 i3(t,e))}o.h.F(o.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){c5(o,e)}),o.h.F(o.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(e){c6(o,e)}),o.h.F(o.g,google.ima.AdEvent.Type.STARTED,function(e){c6(o,e)}),o.h.F(o.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(e){s(e,"ad-first-quartile")}),o.h.F(o.g,google.ima.AdEvent.Type.MIDPOINT,function(e){s(e,"ad-midpoint")}),o.h.F(o.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(e){s(e,"ad-third-quartile")}),o.h.F(o.g,google.ima.AdEvent.Type.COMPLETE,function(e){s(e,"ad-complete")}
1),o.h.F(o.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(e){c8(o,e)}),o.h.F(o.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(e){s(e,"all-ads-completed"),c8(o,e)}),o.h.F(o.g,google.ima.AdEvent.Type.SKIPPED,function(e){s(e,"ad-skipped")}),o.h.F(o.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(e){s(e,"ad-volume-changed")}),o.h.F(o.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(e){s(e,"ad-muted")}),o.h.F(o.g,google.ima.AdEvent.Type.PAUSED,function(e){o.j&&(o.j.i=!0,s(e,"ad-paused"))}),o.h.F(o.g,google.ima.AdEvent.Type.RESUMED,function(e){o.j&&(o.j.i=!1,s(e,"ad-resumed"))}),o.h.F(o.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(e){o.j&&s(e,"ad-skip-state-changed")}),o.h.F(o.g,google.ima.AdEvent.Type.CLICK,function(e){s(e,"ad-clicked")}),o.h.F(o.g,google.ima.AdEvent.Type.AD_PROGRESS,function(e){s(e,"ad-progress")}),o.h.F(o.g,google.ima.AdEvent.Type.AD_BUFFERING,function(e){s(e,"ad-buffering")}),o.h.F(o.g,google.ima.AdEvent.Type.IMPRESSION,function(e){s(e,"ad-impression")}),o.h.F(o.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(e){s(e,"ad-duration-changed")}),o.h.F(o.g,google.ima.AdEvent.Type.USER_CLOSE,function(e){s(e,"ad-closed")}),o.h.F(o.g,google.ima.AdEvent.Type.LOADED,function(e){s(e,"ad-loaded")}),o.h.F(o.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(e){s(e,"ad-linear-changed")}),o.h.F(o.g,google.ima.AdEvent.Type.AD_METADATA,function(e){s(e,"ad-metadata")}),o.h.F(o.g,google.ima.AdEvent.Type.LOG,function(e){s(e,"ad-recoverable-error")}),o.h.F(o.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(e){s(e,"ad-break-ready")}),o.h.F(o.g,google.ima.AdEvent.Type.INTERACTION,function(e){s(e,"ad-interaction")});try{t.g.init(t.i.offsetWidth,t.i.offsetHeight),t.h.F(t.i,"loadeddata",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),"ResizeObserver"in e?(t.B=new ResizeObserver(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.B.observe(t.i)):t.h.F(document,"fullscreenchange",function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight)}),t.G||t.o.skipPlayDetection?t.g.start():t.h.Ba(t.i,"play",function(){t.G=!0,t.g.start()})}catch(e){c8(t,null)}}(o,t)}),this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(e){c5(o,e)}),this.h.F(this.i,"ended",function(){o.m.contentComplete()}),this.h.Ba(this.i,"play",function(){o.G=!0})}function c5(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new i3("ad-error",t)),c8(e,null),e.l(new i3("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function c6(e,t){var n=t.getAd();n?(e.j=new c1(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new i3("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new i3("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).j=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 c8(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new i3("ad-content-resume-requested")),e.l(new i3("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 c9(e,t,n,i,r,a){this.g=e,this.h=t,this.j=(this.i=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.o=i,this.m=r,this.u=a,this.C=t.overlay}function c7(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function de(e,t,n,i){function r(e){return!!e&&(!!e.overlay||(a.g.ended?e.post:!a.g.paused))}var a=this;this.M=null,this.m=e,this.C=t,this.g=n,this.G=null,this.u=!0,this.h=this.g,this.va=i,this.ia=new Set,this.S=new Set,this.H=new Set,this.D=new Map,this.K=new Map,this.i=new lJ,dc(this),this.I=new er,this.j=new er,this.J=!1,this.$=this.o=this.B=this.l=null,this.aa=!1,this.O=-1,this.X=function(){if(!a.J&&a.l&&!a.C.xa()){a.l=a.g.currentTime;var e=dr(a);e&&r(e)&&da(a,e,1,1,Date.now())}},this.T=function(){if(!(a.J||a.l||a.C.xa())){var e;a.g.paused||(a.l=a.g.currentTime),a.B||(e=dr(a,!0)),e||(e=dr(a)),e&&r(e)&&da(a,e,1,1,Date.now())}},this.qa=function(){if(!a.J&&a.l&&!a.C.xa()){var e=a.g.currentTime;a.B&&!a.B.pre&&!a.B.post&&e<(a.B.endTime||a.B.startTime)&&(a.B=null)}},this.P=new n7(this.X),this.N=new n7(function(){var e,t,n,i,r,o,s,u,l,c,d;return P(function(h){switch(h.h){case 1:if(!a.H.size||null==a.l){h.A(0);break}if((e=a.C.Vd())==cW||e==cX)return h.return();t=!1,n=Array.from(a.H),i=a.C.Na(),o=(r=x(n)).next();case 3:if(o.done){h.A(5);break}if((s=o.value)==a.B){h.A(4);break}if(u=s.endTime||s.startTime,!(i.start-u>=1)){(l=s.startTime-a.l)>0&&l<=10&&(!a.D.has(s)&&dh(s)&&a.D.set(s,a.i.preload(s.uri,null,s.mimeType||void 0)),df(a,s)),h.A(4);break}if(!a.D.has(s)){h.A(7);break}return h.g(a.D.get(s),8);case 8:(c=h.i)&&c.destroy(),a.D.delete(s);case 7:dg(a,s),d=s.id||JSON.stringify(s),a.S.has(d)&&a.S.delete(
1d),a.H.delete(s),dt(a),s.overlay||(t=!0);case 4:o=r.next(),h.A(3);break;case 5:t&&dl(a),h.j()}})}),this.configure(this.C.getConfiguration().ads)}function dt(e){e.aa&&!e.H.size&&(e.I.Oa(e.g,"playing",e.T),e.I.Oa(e.g,"timeupdate",e.T),e.I.Oa(e.g,"seeked",e.qa),e.I.Oa(e.g,"ended",e.X),-1!=e.O&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.N&&e.N.stop(),e.aa=!1)}function dn(e){if(e.m&&e.M){var t=e.M.supportsMultipleMediaElements,n=e.g;n.controls||n.webkitPresentationMode&&"inline"!==n.webkitPresentationMode?t=!1:n.webkitDisplayingFullscreen&&(t=!1),e.u==t&&(e.u=!t,e.u?(e.h=e.g,e.G&&(e.G.parentElement&&e.m.removeChild(e.G),e.G=null)):(e.G||((t=document.createElement(e.g.tagName)).autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.G=t),e.h=e.G))}else e.u=!0}function di(e,t){var n,i,r,a,o,s,u,l;P(function(c){switch(c.h){case 1:n=!1,r=(i=x(t)).next();case 2:if(r.done){c.A(4);break}if(!(a=r.value).uri){X("Missing URL in interstitial",a),c.A(3);break}if(a.mimeType){c.A(5);break}return c.m(6),o=e.i.Sb(),c.g(sK(a.uri,o,e.C.getConfiguration().streaming.retryParameters),8);case 8:a.mimeType=c.i,c.o(5);break;case 6:c.l();case 5:if(s=a.id||JSON.stringify(a),e.S.has(s)){c.A(3);break}a.loop&&!a.overlay&&X("Loop is only supported in overlay interstitials",a),a.overlay||(n=!0),e.S.add(s),e.H.add(a),u=!1,a.pre&&null==e.l?u=!0:0!=a.startTime||a.canJump?null!=e.l&&(l=a.startTime-e.l)>0&&l<=10&&(u=!0):u=!0,u&&(!e.D.has(a)&&dh(a)&&e.D.set(a,e.i.preload(a.uri,null,a.mimeType||void 0)),df(e,a));case 3:r=i.next(),c.A(2);break;case 4:n&&dl(e),function(e){if(!e.aa&&e.H.size){if(e.I.F(e.g,"playing",e.T),e.I.F(e.g,"timeupdate",e.T),e.I.F(e.g,"seeked",e.qa),e.I.F(e.g,"ended",e.X),"requestVideoFrameCallback"in e.g&&!dp()){var t=e.g,n=function(){-1!=e.O&&(e.X(),-1!=e.O&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.Fa(.025);e.N&&e.N.Fa(1),e.aa=!0}}(e),c.j()}})}function dr(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.H.size&&null!=e.l){var a=e.g.ended,o=Array.from(e.H).sort(function(e,t){return t.startTime-e.startTime}),s=o;for(s=(o=x(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 u=!1;if(t)u=s.pre;else if(a)u=s.post;else if(!s.pre&&!s.post){var l=e.l-Math.round(1e3*s.startTime)/1e3,c=1;e.M.allowStartInMiddleOfInterstitial&&s.endTime&&s.endTime!=1/0&&(c=s.endTime-s.startTime),(l>0||0==l&&0==e.l)&&(l<=c||!s.canJump)&&(u=null!=n||!e.B||!!e.B.pre||!!e.B.post||!(e.B.startTime>=s.startTime))}u&&(!e.B||s.startTime>=e.B.startTime)&&(i==(n||0)?r=s:r&&!s.canJump&&Math.round(1e3*s.startTime)/1e3-Math.round(1e3*r.startTime)/1e3>.001&&(r=s,i=0),i++)}}return r}function da(t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,x,S,A,k,I,E,C,M,D,R,L,N;o=void 0===o?0:o,t.B=n,dn(t),t.u||!t.m||t.h.parentElement||t.m.appendChild(t.h),1==r&&1==i&&(i=Array.from(t.H).filter(function(e){return n.pre?e.pre==n.pre:n.post?e.post==n.post:.001>Math.abs(e.startTime-n.startTime)}).length),n.once&&(o++,t.H.delete(n),dt(t),n.overlay||dl(t)),n.mimeType&&(n.mimeType.startsWith("image/")||"text/html"===n.mimeType)?n.overlay?function(t,n,i,r,a){function o(){t.o&&(t.o.stop(),t.o=null),t.m.removeChild(l),du(t,n),dm(t,"ad-stopped"),t.j.Sa();var e=dr(t,n.pre,r-a);e?da(t,e,i,++r,Date.now(),a):t.J=!1}t.J=!0;var s=n.overlay,u="text/html"==n.mimeType?"iframe":"img",l=document.createElement(u);l.style.objectFit="contain",l.style.position="absolute",l.style.border="none",ds(t,n);var c=new c7(n,i,r);dm(t,"ad-impression"),dm(t,"ad-started",(new Map).set("ad",c)),"iframe"==u?l.src=n.uri:(l.src=n.uri,l.onerror=function(e){dm(t,"ad-error",(new Map).set("originalEvent",e)),o()}),c=s.viewport;var d=s.topLeft;s=s.size,0==c.x&&0==c.y?(l.width=n.overlay.size.x,l.height=n.overlay.size.y,l.style.bottom="10%",l.style.left="0",l.style.right="0",l.style.width="100%",n.overlay.size.y||"iframe"!=u||(l.style.height="auto")):(l.style.height=s.y/c.y*100+"%",l.style.left=d.x/c.x*100+"%",l.style.top=d.y/c.y*100+"%",l.style.width=s.x/c.x*100+"%"),t.m.appendChild(l);var h=Date.now();t.o&&t.o.stop(),t.o=new n7(function(){n.playoutLimit&&(Date.now()-h)/1e3>n.playoutLimit||n.endTime&&t.g.currentTime>n.endTime?(dm(t,"ad-complete"),o()):t.g.currentTime<n.startTime&&(dm(t,"ad-skipped"),o())}),n.playoutLimit&&!n.endTime?t.o.na(n.playoutLimit):n.endTime&&t.o.Fa(.025),t.j.F(t.g,"seeked",function(){var e=t.g.currentTime;(e<n.startTime||n.endTime&&e>n.endTime)&&(t.o&&t.o.stop(),dm(t,"ad-skipped"),o())}),n.clickThroughUrl&&t.j.F(l,"click",function(){n.clickThroughUrl&&(dm(t,"ad-clicked"),dv(n.clickThroughUrl)&&e.open(n.clickThroughUrl,"_blank"))})}
1(t,n,i,r,o):X("Unsupported interstitial",n):t.u&&n.overlay?X("Unsupported interstitial",n):(s=t,u=n,l=i,c=r,d=a,h=o,P(function(t){switch(t.h){case 1:if(p=Date.now(),s.J=!0,f=!1,g=function(){if(!s.u&&!u.overlay&&null==u.resumeOffset)if(u.timelineRange&&u.endTime&&u.endTime!=1/0)s.g.currentTime!=u.endTime&&(s.g.currentTime=u.endTime);else{var e=Date.now();s.g.currentTime+=(e-d)/1e3,d=e}},m=function(e){var t,n;return P(function(i){if(1==i.h){if(g(),t=dr(s,u.pre,c-h),e&&u.groupId)for(;t&&t.groupId==u.groupId;)c++,t=dr(s,u.pre,c-h);return(s.o&&(!u.groupId||t&&t.groupId!=u.groupId)&&(s.o.stop(),s.o=null),du(s,u),t&&!t.overlay)?i.A(2):(u.post&&(s.l=null,s.B=null),s.u?i.g(s.i.detach(),4):i.g(s.i.yc(),4))}2!=i.h&&(s.u&&(null==(n=u.resumeOffset)&&(n=u.timelineRange&&u.endTime&&u.endTime!=1/0?u.endTime-(s.l||0):(Date.now()-d)/1e3),dm(s,"ad-content-resume-requested",(new Map).set("offset",n))),dm(s,"ad-stopped"),s.j.Sa(),s.J=!1,s.u?dl(s):(s.h.style.display="none",g(),s.g.ended||s.g.play())),dn(s),t&&(dm(s,"ad-stopped"),s.j.Sa(),da(s,t,l,++c,d,h)),i.j()})},v=function(e){return P(function(t){return f?t.return():(f=!0,dm(s,"ad-error",(new Map).set("originalEvent",e)),t.g(m(!1),0))})},y=function(){return P(function(e){if(1==e.h)return f?e.return():(f=!0,e.g(m(!1),2));dm(s,"ad-complete"),e.j()})},s.$=function(){return P(function(e){return f?e.return():(f=!0,dm(s,"ad-skipped"),e.g(m(!0),0))})},b=new c9(s.h,u,s.$,l,c,!s.u),s.u||(b.setMuted(s.g.muted),b.setVolume(s.g.volume)),dm(s,"ad-started",(new Map).set("ad",b)),(w=b.canSkipNow())&&dm(s,"ad-skip-state-changed"),s.j.Ba(s.i,"error",v),s.j.F(s.h,"timeupdate",function(){if(s.h.duration){var e=b.canSkipNow();w!=e&&b.getRemainingTime()>0&&b.getDuration()>0&&dm(s,"ad-skip-state-changed"),w=e,!s.u&&!u.overlay&&null==u.resumeOffset&&u.timelineRange&&u.endTime&&u.endTime!=1/0&&s.g.currentTime!=u.endTime&&s.C.Na().end>=u.endTime&&(s.g.currentTime=u.endTime)}}),s.j.Ba(s.i,"firstquartile",function(){g(),dm(s,"ad-first-quartile")}),s.j.Ba(s.i,"midpoint",function(){g(),dm(s,"ad-midpoint")}),s.j.Ba(s.i,"thirdquartile",function(){g(),dm(s,"ad-third-quartile")}),s.j.Ba(s.i,"complete",y),s.j.F(s.h,"play",function(){dm(s,"ad-resumed")}),s.j.F(s.h,"pause",function(){var e=s.i.getConfiguration();s.h.currentTime>=e.playRangeEnd?y():dm(s,"ad-paused")}),s.j.F(s.h,"volumechange",function(){s.h.muted?dm(s,"ad-muted"):dm(s,"ad-volume-changed"),s.u||(s.g.volume=s.h.volume,s.g.muted=s.h.muted)}),u.clickThroughUrl&&(T=s.m||s.h,s.j.F(T,"click",function(){u.clickThroughUrl&&(b.isPaused()||b.pause(),dv(u.clickThroughUrl)&&e.open(u.clickThroughUrl,"_blank"))})),!s.u||1!=c){t.A(2);break}return dm(s,"ad-content-pause-requested",(new Map).set("saveLivePosition",!0)),x=new i$,S=function(e){return P(function(t){if(1==t.h)return"detach"!=e.state?t.A(0):dp()?t.g(new Promise(function(e){return new n7(e).na(.1)}),3):t.A(3);x.resolve(),s.j.Oa(s.C,"onstatechange",S),t.j()})},s.j.F(s.C,"onstatechange",S),t.g(x,2);case 2:return ds(s,u),s.u||(s.h.style.display="",u.overlay?(s.h.loop=u.loop,A=u.overlay.viewport,k=u.overlay.topLeft,I=u.overlay.size,s.h.style.height=I.y/A.y*100+"%",s.h.style.left=k.x/A.x*100+"%",s.h.style.top=k.y/A.y*100+"%",s.h.style.width=I.x/A.x*100+"%"):(s.g.pause(),null!=u.resumeOffset&&0!=u.resumeOffset&&(s.g.currentTime+=u.resumeOffset),s.h.loop=!1,s.h.style.height="100%",s.h.style.left="0",s.h.style.top="0",s.h.style.width="100%")),t.m(4),dc(s),u.startTime&&u.endTime&&u.endTime!=1/0&&u.startTime!=u.endTime&&(E=u.endTime-u.startTime)>0&&s.i.configure("playRangeEnd",E),u.playoutLimit&&!s.o&&(s.o=new n7(function(){s.$()}).na(u.playoutLimit),s.i.configure("playRangeEnd",u.playoutLimit)),t.g(s.i.Pb(s.h),6);case 6:return C=null,u.pre||u.post||!s.M.allowStartInMiddleOfInterstitial||null==s.l||Math.abs(M=s.l-u.startTime)>.25&&(C=M),s.D.has(u)?t.g(s.D.get(u),10):t.g(s.i.load(u.uri,C,u.mimeType||void 0),8);case 10:return D=t.i,s.D.delete(u),D?t.g(s.i.load(D),8):t.g(s.i.load(u.uri,C,u.mimeType||void 0),8);case 8:u.overlay&&s.g.paused?s.h.pause():s.h.play(),R=(Date.now()-p)/1e3,dm(s,"ads-loaded",(new Map).set("loadTime",R)),s.u&&s.g.play(),u.overlay&&(u.pre||u.post||s.C.U()&&!(u.startTime>0)||(L=function(){var e=s.g.currentTime-u.startTime;Math.abs(e-s.h.currentTime)>.1&&(s.h.currentTime=e)},s.j.Ba(s.h,"playing",L),s.j.F(s.g,"seeking",L)),s.j.F(s.g,"seeked",function(){var e=s.g.currentTime;(e<u.startTime||u.endTime&&e>u.endTime)&&s.$()})),t.o(0);break;case 4:if(N=t.l(),!s.J)return t.return();v(N),t.j()}}))}
1function ds(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;a>0&&a<=100&&(r.push("translateX("+a+"%)"),i=!1),(a=n.topLeft.y/n.viewport.y*100)>0&&a<=100&&(r.push("translateY("+a+"%)"),i=!1),(a=n.size.x/n.viewport.x)<1&&r.push("scaleX("+a+")"),n=n.size.y/n.viewport.y,a<1&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.m&&(t.clickThroughUrl?(e.m.setAttribute("ad-active","true"),e.m.style.pointerEvents=""):e.m.style.pointerEvents="none",t.background&&(e.m.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function du(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.m&&(e.m.removeAttribute("ad-active"),e.m.style.pointerEvents="",!t||t.background)&&(e.m.style.background=""),e.G&&(e.G.style.background="")}function dl(e){for(var t=[],n=x(e.H),i=n.next(),r={};!i.done;r={xc:void 0},i=n.next())(i=i.value).overlay||(r.xc={start:i.startTime,end:null},i.pre?(r.xc.start=0,r.xc.end=null):i.post?(r.xc.start=-1,r.xc.end=null):i.timelineRange&&(r.xc.end=i.endTime),t.find(function(e){return function(t){return e.xc.start==t.start&&e.xc.end==t.end}}(r))||t.push(r.xc));dm(e,"ad-cue-points-changed",(new Map).set("cuepoints",t))}function dc(e){e.i.configure(e.C.gi()),e.i.configure("ads.disableHLSInterstitial",!0),e.i.configure("ads.disableDASHInterstitial",!0),e.i.configure("playRangeEnd",1/0),rn(e.C.Sb(),e.i.Sb())}function dd(e,t,n){var i,r,a;return P(function(o){return 1==o.h?(i=ri([t],iJ()),r=e.C.Sb().request(7,i,n),o.g(r.promise,2)):(a=o.i,o.return(a.data))})}function dh(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function dp(){var e=eu().Qa();return"TV"==e||"CONSOLE"==e||"CAST"==e}function df(e,t){if(!(e.K.has(t)||e.M&&!e.M.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&&t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.K.set(t,i)}}function dg(e,t){if(e.K.has(t)){var n=e.K.get(t);n=x(n);for(var i=n.next();!i.done;i=n.next())(i=i.value).parentNode.removeChild(i);e.K.delete(t)}}function dm(e,t,n){e.va(new i3(t,n))}function dv(e){return!(e=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(e.replace(/[\u0000-\u0020]+/g,"")))||"http"==(e=e[1].toLowerCase())||"https"==e}function dy(e,t,n,i,r){this.h=e,this.j=t_(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function db(e,t,n,i){this.C=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.J=!1,this.B=null,this.j=[],this.N=[],this.M=this.D=this.g=null,this.G=new Map,this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.o=new er}function dw(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function dT(e){var t=e.h.currentTime;
1if(0!=t&&null==e.B){for(var n,i,r=x(e.j),a=r.next();!a.done;a=r.next()){a=a.value;for(var o=x(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.N.includes(i.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function dx(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.D,r=i.startTimeInSeconds+.5*i.durationInSeconds,a=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),dk(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),dk(e,"midpoint")):t>=a&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),dk(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&i>0&&r>0&&dk(e,"skipStateChanged"),r>0&&(i<=0||i>r)&&dS(e)}if(!e.g||!e.g.isLinear()){e:for(r=(i=x(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.N.includes(o.adId)){if(e.h.ended)continue;e.h.currentTime=s;break e}dS(e),e.M=r,e.g=new dy(o,a+1,r.ads.length,!0,e.h),e.D=o,0===a&&dk(e,"breakStart"),dA(e);break}}if(!e.g){for(r=(i=x(e.j)).next();!r.done&&(r=r.value,!e.g);r=i.next())for(a=0;a<r.nonLinearAdsList.length;a++)if((o=r.nonLinearAdsList[a]).nonLinearAdList.length){s=r.startTimeInSeconds;var u=e.G.get(dw(o.nonLinearAdList[0]));if(s<=t&&u&&u.length){dS(e),s=e,u=x(u);for(var l=u.next();!l.done;l=u.next())if((l=l.value).data.source.length){var c=document.createElement("img");c.src=l.data.source[0].url,c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",s.C.appendChild(c)}e.M=r,e.g=new dy(o,a+1,r.ads.length,!1,e.h),e.D=o,0===a&&dk(e,"breakStart"),dA(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function dS(e){if(e.g){for(;e.C.lastChild;)e.C.removeChild(e.C.firstChild);e.J||e.N.push(e.D.adId);var t=e.g.m;(void 0===t?0:t)?dk(e,"skip"):dk(e,"complete"),t=x(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Oa(n.target,n.type,n.listener);e.m=[],e.u=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&dk(e,"breakEnd"),e.g=null,e.D=null,e.M=null}}function dA(e){var t=!1;e.h.paused?t=!0:(dk(e,"impression"),dk(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&dk(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||dk(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(dk(e,"impression"),dk(e,"start"),t=!1):dk(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){dk(e,"pause")}});for(var n=x(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.F(i.target,i.type,i.listener)}function dk(e,t){var n=e.D.trackingEvents.find(function(e){return e.eventType==t});if(n||(n=e.M.adBreakTrackingEvents.find(function(e){return e.eventType==t})),n){var i={type:10};n=x(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=ri([r],iJ())).method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new i3("ad-impression"));break;case"start":e.i(new i3("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new i3("ad-muted"));break;case"unmute":e.i(new i3("ad-volume-changed"));break;case"resume":e.i(new i3("ad-resumed"));break;case"pause":e.i(new i3("ad-paused"));break;case"firstQuartile":e.i(new i3("ad-first-quartile"));break;case"midpoint":e.i(new i3("ad-midpoint"));break;case"thirdQuartile":e.i(new i3("ad-third-quartile"));break;case"complete":e.i(new i3("ad-complete")),e.i(new i3("ad-stopped"));break;case"skip":e.i(new i3("ad-skipped")),e.i(new i3("ad-stopped"));break;case"breakStart":e.C.setAttribute("ad-active","true");break;case"breakEnd":e.C.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new i3("ad-skip-state-changed"))}}function dI(e,t){this.g=e,this.i=null,this.h=t}function dE(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.G=NaN,this.i=i,this.H=!1,this.B=this.m=this.o=null,this.C="",this.D=[],this.h=new er,(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 i3("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(e){var t,n;t=r,n=e,t.i(new i3("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.G))),n=n.getStreamData().url,t.j.resolve(n),t.j=null,t.H||t.h.F(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.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.C.length?r.j.resolve(r.C):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(e){r.m=new dI(e=e.getAd(),r.l),r.B&&(r.m.i=r.B),r.i(new i3("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.F(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.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(e){r.B=e.getStreamData().adProgressData,r.m&&(r.m.i=r.B)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new i3("ad-first-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new i3("ad-midpoint"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new i3("ad-third-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new i3("ad-complete")),r.i(new i3("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new i3("ad-skipped")),r.i(new i3("ad-stopped"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(e){var t=e.getStreamData();e=[],t=x(t.cuepoints);for(var n=t.next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.D=e,r.i(new i3("ad-cue-points-changed",(new Map).set("cuepoints",e)))})}function dC(){i8.call(this),this.h=this.i=this.j=this.g=null,this.m=new c0,this.o=navigator.language,this.l=null}function dM(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 dD(e){return JSON.stringify(e,function(e,t){if("function"!=typeof t){if(e=t instanceof i3,t instanceof Event||e){var n={};for(r in t){var i=t[r];
1i&&"object"==typeof i?"detail"==r?n[r]=i:i instanceof Event||i instanceof i3?n[r]={__type__:"Event",event:dD(i)}:e&&Array.isArray(i)&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(e=x(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())r.add(n.value);for(e={},n=(r=x(r)).next();!n.done;n=r.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},e=(t=x(aJ(t))).next();!e.done;e=t.next())n=(e=e.value).end,r.start.push(e.start),r.end.push(n);t=r}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:t<0?"-Infinity":"Infinity":t;return t}})}function dR(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&&"object"==typeof t&&"Event"==t.__type__?dR(t.event):t;return i})}(p=c1.prototype).needsSkipUI=function(){return!1},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return!0},p.isUsingAnotherMediaElement=function(){return!0},p.getDuration=function(){return this.g.getDuration()},p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},p.getRemainingTime=function(){return this.h.getRemainingTime()},p.isPaused=function(){return this.i},p.isSkippable=function(){return this.g.getSkipTimeOffset()>=0},p.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},p.canSkipNow=function(){return this.h.getAdSkippableState()},p.skip=function(){return this.h.skip()},p.pause=function(){return this.h.pause()},p.play=function(){return this.h.resume()},p.getVolume=function(){return this.h.getVolume()},p.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},p.isMuted=function(){return 0==this.h.getVolume()},p.isLinear=function(){return this.g.isLinear()},p.resize=function(e,t){this.h.resize(e,t)},p.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},p.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},p.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},p.getTitle=function(){return this.g.getTitle()},p.getDescription=function(){return this.g.getDescription()},p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.getAdId()},p.getCreativeAdId=function(){return this.g.getCreativeAdId()},p.getAdvertiserName=function(){return this.g.getAdvertiserName()},p.getMediaUrl=function(){return this.g.getMediaUrl()},p.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},p.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},p.release=function(){this.h=this.g=null},H("shaka.ads.ClientSideAd",c1),c1.prototype.release=c1.prototype.release,c1.prototype.getPodIndex=c1.prototype.getPodIndex,c1.prototype.getTimeOffset=c1.prototype.getTimeOffset,c1.prototype.getMediaUrl=c1.prototype.getMediaUrl,c1.prototype.getAdvertiserName=c1.prototype.getAdvertiserName,c1.prototype.getCreativeAdId=c1.prototype.getCreativeAdId,c1.prototype.getAdId=c1.prototype.getAdId,c1.prototype.getVastAdId=c1.prototype.getVastAdId,c1.prototype.getVastMediaWidth=c1.prototype.getVastMediaWidth,c1.prototype.getVastMediaHeight=c1.prototype.getVastMediaHeight,c1.prototype.getVastMediaBitrate=c1.prototype.getVastMediaBitrate,c1.prototype.getDescription=c1.prototype.getDescription,c1.prototype.getTitle=c1.prototype.getTitle,c1.prototype.getPositionInSequence=c1.prototype.getPositionInSequence,c1.prototype.getSequenceLength=c1.prototype.getSequenceLength,
1c1.prototype.setMuted=c1.prototype.setMuted,c1.prototype.resize=c1.prototype.resize,c1.prototype.isLinear=c1.prototype.isLinear,c1.prototype.isMuted=c1.prototype.isMuted,c1.prototype.setVolume=c1.prototype.setVolume,c1.prototype.getVolume=c1.prototype.getVolume,c1.prototype.play=c1.prototype.play,c1.prototype.pause=c1.prototype.pause,c1.prototype.skip=c1.prototype.skip,c1.prototype.canSkipNow=c1.prototype.canSkipNow,c1.prototype.getTimeUntilSkippable=c1.prototype.getTimeUntilSkippable,c1.prototype.isSkippable=c1.prototype.isSkippable,c1.prototype.isPaused=c1.prototype.isPaused,c1.prototype.getRemainingTime=c1.prototype.getRemainingTime,c1.prototype.getMinSuggestedDuration=c1.prototype.getMinSuggestedDuration,c1.prototype.getDuration=c1.prototype.getDuration,c1.prototype.isUsingAnotherMediaElement=c1.prototype.isUsingAnotherMediaElement,c1.prototype.hasCustomClick=c1.prototype.hasCustomClick,c1.prototype.isClientRendering=c1.prototype.isClientRendering,c1.prototype.needsSkipUI=c1.prototype.needsSkipUI,H("shaka.ads.Utils",c2),c2.ADS_LOADED="ads-loaded",c2.AD_STARTED="ad-started",c2.AD_FIRST_QUARTILE="ad-first-quartile",c2.AD_MIDPOINT="ad-midpoint",c2.AD_THIRD_QUARTILE="ad-third-quartile",c2.AD_COMPLETE="ad-complete",c2.AD_STOPPED="ad-stopped",c2.AD_SKIPPED="ad-skipped",c2.AD_VOLUME_CHANGED="ad-volume-changed",c2.AD_MUTED="ad-muted",c2.AD_PAUSED="ad-paused",c2.AD_RESUMED="ad-resumed",c2.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",c2.CUEPOINTS_CHANGED="ad-cue-points-changed",c2.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",c2.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",c2.AD_CLICKED="ad-clicked",c2.AD_PROGRESS="ad-progress",c2.AD_BUFFERING="ad-buffering",c2.AD_IMPRESSION="ad-impression",c2.AD_DURATION_CHANGED="ad-duration-changed",c2.AD_CLOSED="ad-closed",c2.AD_LOADED="ad-loaded",c2.ALL_ADS_COMPLETED="all-ads-completed",c2.AD_LINEAR_CHANGED="ad-linear-changed",c2.AD_METADATA="ad-metadata",c2.AD_RECOVERABLE_ERROR="ad-recoverable-error",c2.AD_ERROR="ad-error",c2.AD_BREAK_READY="ad-break-ready",c2.AD_INTERACTION="ad-interaction",c2.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",c2.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",c2.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",c3.prototype.configure=function(e){this.o=e},c3.prototype.stop=function(){this.g&&this.g.stop(),this.u&&a0(this.u)},c3.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()},(p=c9.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return null!=this.h.clickThroughUrl},p.isUsingAnotherMediaElement=function(){return this.u},p.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},p.isPaused=function(){return this.g.paused},p.isSkippable=function(){return this.i&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i},p.getTimeUntilSkippable=function(){return this.isSkippable()?Math.max(this.getRemainingTime()+this.j-this.getDuration(),0):Math.max(this.getRemainingTime(),0)},p.canSkipNow=function(){return this.i&&0==this.getTimeUntilSkippable()},p.skip=function(){this.canSkipNow()&&this.B()},p.pause=function(){return this.g.pause()},p.play=function(){return this.g.play()},p.getVolume=function(){return this.g.volume},p.setVolume=function(e){this.g.volume=e},p.isMuted=function(){return this.g.muted},p.isLinear=function(){return null==this.C},p.resize=function(){},p.setMuted=function(e){this.g.muted=e},p.getSequenceLength=function(){return this.o},p.getPositionInSequence=function(){return this.m},p.getTitle=function(){return""},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return""},p.getAdId=function(){return this.h.id||""},p.getCreativeAdId=function(){return""},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return this.h.uri},p.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime},p.getPodIndex=function(){return 0},p.release=function(){this.g=null},H("shaka.ads.InterstitialAd",c9),c9.prototype.release=c9.prototype.release,c9.prototype.getPodIndex=c9.prototype.getPodIndex,c9.prototype.getTimeOffset=c9.prototype.getTimeOffset,c9.prototype.getMediaUrl=c9.prototype.getMediaUrl,c9.prototype.getAdvertiserName=c9.prototype.getAdvertiserName,c9.prototype.getCreativeAdId=c9.prototype.getCreativeAdId,c9.prototype.getAdId=c9.prototype.getAdId,c9.prototype.getVastAdId=c9.prototype.getVastAdId,c9.prototype.getVastMediaWidth=c9.prototype.getVastMediaWidth,c9.prototype.getVastMediaHeight=c9.prototype.getVastMediaHeight,c9.prototype.getVastMediaBitrate=c9.prototype.getVastMediaBitrate,c9.prototype.getDescription=c9.prototype.getDescription,c9.prototype.getTitle=c9.prototype.getTitle,c9.prototype.getPositionInSequence=c9.prototype.getPositionInSequence,c9.prototype.getSequenceLength=c9.prototype.getSequenceLength,
1c9.prototype.setMuted=c9.prototype.setMuted,c9.prototype.resize=c9.prototype.resize,c9.prototype.isLinear=c9.prototype.isLinear,c9.prototype.isMuted=c9.prototype.isMuted,c9.prototype.setVolume=c9.prototype.setVolume,c9.prototype.getVolume=c9.prototype.getVolume,c9.prototype.play=c9.prototype.play,c9.prototype.pause=c9.prototype.pause,c9.prototype.skip=c9.prototype.skip,c9.prototype.canSkipNow=c9.prototype.canSkipNow,c9.prototype.getTimeUntilSkippable=c9.prototype.getTimeUntilSkippable,c9.prototype.isSkippable=c9.prototype.isSkippable,c9.prototype.isPaused=c9.prototype.isPaused,c9.prototype.getRemainingTime=c9.prototype.getRemainingTime,c9.prototype.getMinSuggestedDuration=c9.prototype.getMinSuggestedDuration,c9.prototype.getDuration=c9.prototype.getDuration,c9.prototype.isUsingAnotherMediaElement=c9.prototype.isUsingAnotherMediaElement,c9.prototype.hasCustomClick=c9.prototype.hasCustomClick,c9.prototype.isClientRendering=c9.prototype.isClientRendering,c9.prototype.needsSkipUI=c9.prototype.needsSkipUI,(p=c7.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!0},p.hasCustomClick=function(){return null!=this.g.clickThroughUrl},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return -1},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return -1},p.isPaused=function(){return!1},p.isSkippable=function(){return!1},p.getTimeUntilSkippable=function(){return 0},p.canSkipNow=function(){return!1},p.skip=function(){},p.pause=function(){},p.play=function(){},p.getVolume=function(){return 1},p.setVolume=function(){},p.isMuted=function(){return!1},p.isLinear=function(){return this.i},p.resize=function(){},p.setMuted=function(){},p.getSequenceLength=function(){return this.j},p.getPositionInSequence=function(){return this.h},p.getTitle=function(){return""},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.id||""},p.getCreativeAdId=function(){return""},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return this.g.uri},p.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},p.getPodIndex=function(){return 0},p.release=function(){},H("shaka.ads.InterstitialStaticAd",c7),c7.prototype.release=c7.prototype.release,c7.prototype.getPodIndex=c7.prototype.getPodIndex,c7.prototype.getTimeOffset=c7.prototype.getTimeOffset,c7.prototype.getMediaUrl=c7.prototype.getMediaUrl,c7.prototype.getAdvertiserName=c7.prototype.getAdvertiserName,c7.prototype.getCreativeAdId=c7.prototype.getCreativeAdId,c7.prototype.getAdId=c7.prototype.getAdId,c7.prototype.getVastAdId=c7.prototype.getVastAdId,c7.prototype.getVastMediaWidth=c7.prototype.getVastMediaWidth,c7.prototype.getVastMediaHeight=c7.prototype.getVastMediaHeight,c7.prototype.getVastMediaBitrate=c7.prototype.getVastMediaBitrate,c7.prototype.getDescription=c7.prototype.getDescription,c7.prototype.getTitle=c7.prototype.getTitle,c7.prototype.getPositionInSequence=c7.prototype.getPositionInSequence,c7.prototype.getSequenceLength=c7.prototype.getSequenceLength,c7.prototype.setMuted=c7.prototype.setMuted,c7.prototype.resize=c7.prototype.resize,c7.prototype.isLinear=c7.prototype.isLinear,c7.prototype.isMuted=c7.prototype.isMuted,c7.prototype.setVolume=c7.prototype.setVolume,c7.prototype.getVolume=c7.prototype.getVolume,c7.prototype.play=c7.prototype.play,c7.prototype.pause=c7.prototype.pause,c7.prototype.skip=c7.prototype.skip,c7.prototype.canSkipNow=c7.prototype.canSkipNow,c7.prototype.getTimeUntilSkippable=c7.prototype.getTimeUntilSkippable,c7.prototype.isSkippable=c7.prototype.isSkippable,c7.prototype.isPaused=c7.prototype.isPaused,c7.prototype.getRemainingTime=c7.prototype.getRemainingTime,c7.prototype.getMinSuggestedDuration=c7.prototype.getMinSuggestedDuration,c7.prototype.getDuration=c7.prototype.getDuration,c7.prototype.isUsingAnotherMediaElement=c7.prototype.isUsingAnotherMediaElement,c7.prototype.hasCu
1stomClick=c7.prototype.hasCustomClick,c7.prototype.isClientRendering=c7.prototype.isClientRendering,c7.prototype.needsSkipUI=c7.prototype.needsSkipUI,(p=de.prototype).configure=function(e){this.M=e,this.J||dn(this)},p.stop=function(){if(this.j&&this.j.Sa(),this.ia.clear(),this.S.clear(),this.H.clear(),this.i.mg(),this.D.size){var e=Array.from(this.D.values());e=x(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(e){e&&e.destroy()})}if(this.D.clear(),this.K.size)for(t=(e=x(e=Array.from(this.K.keys()))).next();!t.done;t=e.next())dg(this,t.value);this.K.clear(),this.i.detach(),this.J=!1,this.B=this.l=null,this.u=!0,this.h=this.g,this.G=null,du(this),dt(this),this.m&&a0(this.m),this.o&&(this.o.stop(),this.o=null)},p.release=function(){this.stop(),this.I&&this.I.release(),this.j&&this.j.release(),this.P&&(this.P.stop(),this.P=null),this.N&&(this.N.stop(),this.N=null),this.i.destroy()},p.nd=function(){return this.i},p.addAdUrlInterstitial=function(e){var t,n,i,r,a,o,s,u,l=this;return P(function(c){if(1==c.h)return t={type:12},c.g(dd(l,e,t),2);if(3!=c.h){if(!(n=tK(c.i,"VAST,vmap:VMAP")))throw new eJ(2,10,10007);if(i=[],"VAST"==n.tagName)return i=c4(n,l.l),c.A(3);if("vmap:VMAP"!=n.tagName)return c.A(3);for(r=function(e){var n;return P(function(r){if(1==r.h)return r.g(dd(l,e.uri,t),2);if(!(n=tK(r.i,"VAST")))throw new eJ(2,10,10007);i.push.apply(i,S(c4(n,e.time))),r.j()})},a=[],s=(o=x(function(e){var t=[];
1e=x(tY(e,"vmap:AdBreak"));for(var n=e.next();!n.done;n=e.next()){var i=n.value,r=i.attributes.timeOffset;r&&(n=null,n="start"==r?null:"end"==r?1/0:t_(r),(i=tZ(i,"vmap:AdSource"))&&(i=tZ(i,"vmap:AdTagURI"))&&(i=tJ(i))&&t.push({time:n,uri:i}))}return t}(n))).next();!s.done;s=o.next())u=s.value,a.push(r(u));return a.length?c.g(Promise.all(a),3):c.A(3)}di(l,i),c.j()})},(p=dy.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!1},p.hasCustomClick=function(){return!1},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return this.h.durationInSeconds},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},p.isPaused=function(){return this.g.paused},p.isSkippable=function(){return"number"==typeof this.j},p.getTimeUntilSkippable=function(){return"number"!=typeof this.j?this.getRemainingTime():Math.max(this.getRemainingTime()+this.j-this.getDuration(),0)},p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},p.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},p.pause=function(){return this.g.pause()},p.play=function(){return this.g.play()},p.getVolume=function(){return this.g.volume},p.setVolume=function(e){this.g.volume=e},p.isMuted=function(){return this.g.muted},p.isLinear=function(){return this.o},p.resize=function(){},p.setMuted=function(e){this.g.muted=e},p.getSequenceLength=function(){return this.l?this.l:1},p.getPositionInSequence=function(){return this.i?this.i:1},p.getTitle=function(){return this.h.adTitle},p.getDescription=function(){return""},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return 0},p.getVastMediaWidth=function(){return 0},p.getVastAdId=function(){return this.h.vastAdId||""},p.getAdId=function(){return this.h.adId},p.getCreativeAdId=function(){return this.h.creativeId},p.getAdvertiserName=function(){return""},p.getMediaUrl=function(){return null},p.getTimeOffset=function(){return 0},p.getPodIndex=function(){return 0},p.release=function(){this.l=this.i=this.g=this.h=null},H("shaka.ads.MediaTailorAd",dy),dy.prototype.release=dy.prototype.release,dy.prototype.getPodIndex=dy.prototype.getPodIndex,dy.prototype.getTimeOffset=dy.prototype.getTimeOffset,dy.prototype.getMediaUrl=dy.prototype.getMediaUrl,dy.prototype.getAdvertiserName=dy.prototype.getAdvertiserName,dy.prototype.getCreativeAdId=dy.prototype.getCreativeAdId,dy.prototype.getAdId=dy.prototype.getAdId,dy.prototype.getVastAdId=dy.prototype.getVastAdId,dy.prototype.getVastMediaWidth=dy.prototype.getVastMediaWidth,dy.prototype.getVastMediaHeight=dy.prototype.getVastMediaHeight,dy.prototype.getVastMediaBitrate=dy.prototype.getVastMediaBitrate,dy.prototype.getDescription=dy.prototype.getDescription,dy.prototype.getTitle=dy.prototype.getTitle,dy.prototype.getPositionInSequence=dy.prototype.getPositionInSequence,dy.prototype.getSequenceLength=dy.prototype.getSequenceLength,dy.prototype.setMuted=dy.prototype.setMuted,dy.prototype.resize=dy.prototype.resize,dy.prototype.isLinear=dy.prototype.isLinear,dy.prototype.isMuted=dy.prototype.isMuted,dy.prototype.setVolume=dy.prototype.setVolume,dy.prototype.getVolume=dy.prototype.getVolume,dy.prototype.play=dy.prototype.play,dy.prototype.pause=dy.prototype.pause,dy.prototype.skip=dy.prototype.skip,dy.prototype.canSkipNow=dy.prototype.canSkipNow,dy.prototype.getTimeUntilSkippable=dy.prototype.getTimeUntilSkippable,dy.prototype.isSkippable=dy.prototype.isSkippable,dy.prototype.isPaused=dy.prototype.isPaused,dy.prototype.getRemainingTime=dy.prototype.getRemainingTime,dy.prototype.getMinSuggestedDuration=dy.prototype.getMinSuggestedDuration,dy.prototype.getDuration=dy.prototype.getDuration,dy.prototype.isUsingAnotherMediaElement=dy.prototype.isUsingAnotherMediaElement,dy.prototype.hasCustomClick=dy.prototype.hasCustomClick,dy.prototype.isClientRendering=dy.prototype.isClientRendering,dy.prototype.needsSkipUI=dy.prototype.needsSkipUI,db.prototype.stop=function(){for(var e=x(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Oa(t.target,t.type,t.listener);dS(this),this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.B=null,this.j=[],this.N=[],this.G.clear()},db.prototype.release=function(){this.stop(),this.o&&this.o.release()},db.prototype.onManifestUpdated=function(e){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g;this.J=e,""!=this.H&&(t=this,n=this.H,i=this.O,P(function(e){if(1==e.h)return r={type:8},a=ri([n],iJ()),o=t.K.request(7,a,r),e.m(2),e.g(o.promise,4);if(2!=e.h){var m;if(s=e.i,u=[],(l=JSON.parse(eZ(s.data))).avails.length>0){if(JSON.stringify(t.j)!=JSON.stringify(l.avails)){for(t.j=l.avails,d=(c=x(t.j)).next();!d.done;d=c.next())for(p=(h=x(d.value.nonLinearAdsList)).next();!p.done;p=h.next())for(g=(f=x(p.value.nonLinearAdList)).next();!g.done;g=f.next())!function(e,t){var n,i,r,a,o;P(function(s){return 1==s.h?t.staticResource?(n=dw(t),e.G.get(n))?s.return():(i={type:9},r=ri([t.staticResource],iJ()),a=e.K.request(7,r,i),s.m(2),e.G.set(n,[]),s.g(a.promise,4)):s.return():2!=s.h?(o=JSON.parse(eZ(s.i.data)).apps,e.G.set(n,o),s.o(0)):void(s.l(),e.G.delete(n),s.j())})}(t,g.value);u=t.getCuePoints(),t.i(new i3("ad-cue-points-changed",(new Map).set("cuepoints",u)))}}else t.j.length&&t.i(new i3("ad-cue-points-changed",(new Map).set("cuepoints",u))),dS(t),t.j=[];return i&&(t.J||u.length>0)&&(dx(m=t),m.J||(dT(m),m.o.F(m.h,"seeked",function(){dT(m)}
1),m.o.F(m.h,"ended",function(){dS(m)})),m.o.F(m.h,"timeupdate",function(){dx(m)})),e.o(0)}e.l(),e.j()}),this.O=!1)},db.prototype.getCuePoints=function(){for(var e=[],t=x(this.j),n=t.next();!n.done;n=t.next()){n=x(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},(p=dI.prototype).needsSkipUI=function(){return!0},p.isClientRendering=function(){return!1},p.hasCustomClick=function(){return!0},p.isUsingAnotherMediaElement=function(){return!1},p.getDuration=function(){return this.i?this.i.duration:-1},p.getMinSuggestedDuration=function(){return this.getDuration()},p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},p.isPaused=function(){return this.h.paused},p.isSkippable=function(){return this.g.isSkippable()},p.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return Math.max(e=this.getRemainingTime()-e,0)},p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},p.skip=function(){this.h.currentTime+=this.getRemainingTime()},p.pause=function(){return this.h.pause()},p.play=function(){return this.h.play()},p.getVolume=function(){return this.h.volume},p.setVolume=function(e){this.h.volume=e},p.isMuted=function(){return this.h.muted},p.isLinear=function(){return!0},p.resize=function(){},p.setMuted=function(e){this.h.muted=e},p.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},p.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},p.getTitle=function(){return this.g.getTitle()},p.getDescription=function(){return this.g.getDescription()},p.getVastMediaBitrate=function(){return 0},p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},p.getVastAdId=function(){return""},p.getAdId=function(){return this.g.getAdId()},p.getCreativeAdId=function(){return this.g.getCreativeAdId()},p.getAdvertiserName=function(){return this.g.getAdvertiserName()},p.getMediaUrl=function(){return null},p.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},p.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},p.release=function(){this.h=this.i=this.g=null},H("shaka.ads.ServerSideAd",dI),dI.prototype.release=dI.prototype.release,dI.prototype.getPodIndex=dI.prototype.getPodIndex,dI.prototype.getTimeOffset=dI.prototype.getTimeOffset,dI.prototype.getMediaUrl=dI.prototype.getMediaUrl,dI.prototype.getAdvertiserName=dI.prototype.getAdvertiserName,dI.prototype.getCreativeAdId=dI.prototype.getCreativeAdId,dI.prototype.getAdId=dI.prototype.getAdId,dI.prototype.getVastAdId=dI.prototype.getVastAdId,dI.prototype.getVastMediaWidth=dI.prototype.getVastMediaWidth,dI.prototype.getVastMediaHeight=dI.prototype.getVastMediaHeight,dI.prototype.getVastMediaBitrate=dI.prototype.getVastMediaBitrate,dI.prototype.getDescription=dI.prototype.getDescription,dI.prototype.getTitle=dI.prototype.getTitle,dI.prototype.getPositionInSequence=dI.prototype.getPositionInSequence,dI.prototype.getSequenceLength=dI.prototype.getSequenceLength,dI.prototype.setMuted=dI.prototype.setMuted,dI.prototype.resize=dI.prototype.resize,dI.prototype.isLinear=dI.prototype.isLinear,dI.prototype.isMuted=dI.prototype.isMuted,dI.prototype.setVolume=dI.prototype.setVolume,dI.prototype.getVolume=dI.prototype.getVolume,dI.prototype.play=dI.prototype.play,dI.prototype.pause=dI.prototype.pause,dI.prototype.skip=dI.prototype.skip,dI.prototype.canSkipNow=dI.prototype.canSkipNow,dI.prototype.getTimeUntilSkippable=dI.prototype.getTimeUntilSkippable,dI.prototype.isSkippable=dI.prototype.isSkippable,dI.prototype.isPaused=dI.prototype.isPaused,dI.prototype.getRemainingTime=dI.prototype.getRemainingTime,dI.prototype.getMinSuggestedDuration=dI.prototype.getMinSuggestedDuration,dI.prototype.getDuration=dI.prototype.getDuration,dI.prototype.isUsingAnotherMediaElement=dI.prototype.isUsingAnotherMediaElement,dI.prototype.hasCustomClick=dI.prototype.hasCu
1stomClick,dI.prototype.isClientRendering=dI.prototype.isClientRendering,dI.prototype.needsSkipUI=dI.prototype.needsSkipUI,(p=dE.prototype).configure=function(){},p.stop=function(){this.C="",this.o=null,this.D=[]},p.release=function(){this.stop(),this.h&&this.h.release()},p.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},p.getCuePoints=function(){return this.D},w(dC,i8),(p=dC.prototype).setLocale=function(e){this.o=e},p.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)},p.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new de(e,t,n,function(e){return dM(i,e)}),this.g.configure(this.l)},p.initClientSide=function(t,n,i){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new eJ(2,10,1e4);this.j&&this.j.release(),this.j=new c3(t,n,this.o,i,function(e){return dM(r,e)}),this.j.configure(this.l)},p.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),i8.prototype.release.call(this)},p.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new i3("ad-stopped")),this.dispatchEvent(new i3("ad-content-attach-requested")),this.m=new c0},p.requestClientSideAds=function(e){if(!this.j)throw new eJ(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.H=Date.now()/1e3,t.m.requestAds(e)},p.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new eJ(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},p.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new db(e,t,n,function(e){return dM(i,e)})},p.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new eJ(1,10,10005);var i,r,a,o,s,u,l,c,d,h=this.i;return n=void 0===n?"":n,h.l?e=Promise.reject(new eJ(1,10,10004)):(h.l=new i$,i=e,P(function(e){if(1==e.h)return r={type:7},(a=ri([i],iJ())).method="POST",t&&(a.body=e2(JSON.stringify(t))),o=h.K.request(7,a,r),e.m(2),e.g(o.promise,4);if(2!=e.h){if((s=JSON.parse(eZ(e.i.data))).manifestUrl&&s.trackingUrl)u=new ey(i),l=new ey(s.trackingUrl),h.H=u.resolve(l).toString(),c=Date.now()/1e3-h.P,h.i(new i3("ads-loaded",(new Map).set("loadTime",c))),d=new ey(s.manifestUrl),h.l.resolve(u.resolve(d).toString()),h.l=null;else throw Error("Insufficient data from MediaTailor.");return e.o(0)}if(e.l(),!h.I.length)return h.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),h.l=null,e.return();h.l.resolve(h.I),h.l=null,e.j()}),h.I=n||"",h.P=Date.now()/1e3,e=h.l),e},p.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new eJ(1,10,10005);var t=this.i;t.H=e,t.i(new i3("ads-loaded",(new Map).set("loadTime",0)))},p.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new eJ(2,10,10002);this.h&&this.h.release(),this.h=new dE(t,n,this.o,function(e){return dM(i,e)}),this.h.configure(this.l)},p.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new eJ(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.16.50",(n=this.h).j?e=Promise.reject(new eJ(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new i$,n.g.requestStream(e),n.C=t||"",n.G=Date.now()/1e3,e=n.j),e},p.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new eJ(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.16.50",this.h.g.replaceAdTagParameters(e)},p.getServerSideCuePoints=function(){return ep("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},p.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},p.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:e.g.length?e.g.reduce(function(e,t){return e+t},0)/e.g.length:0,started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},p.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},p.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)},p.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},p.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},p.onHLSInterstitialMetadata=function(e,t,n){var i,r,a,o;this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&(i=this.g,P(function(e){if(1==e.h){var t,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,x,S,A,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V,H,G;if(r=null,(a=n.values.find(function(e){return"ID"==e.key}))&&(r=a.data),r){if(i.ia.has(r))return e.return();i.ia.add(r)}return dc(i),o=[],n&&n.values.find(function(e){return"X-OVERLAY-ID"==e.key})?(o=function(e){var t=[];if(!e)return t;var n=e.values.find(function(e){return"X-ASSET-URI"==e.key});if(!n||!(n=n.data))return t;var i=null,r=e.values.find(function(e){return"X-OVERLAY-ID"==e.key});r&&(i=r.data),r=null==i?Math.floor(10*e.startTime)/10:e.startTime;var a=e.endTime;e.endTime&&e.endTime!=1/0&&"number"==typeof e.endTime&&(a=null==i?Math.floor(10*e.endTime)/10:e.endTime);var o=!1,s=!1,u=!1,l=e.values.find(function(e){return"CUE"==e.key});l&&(o=(u=l.data).includes("ONCE"),s=u.includes("PRE"),u=u.includes("POST")),l=null;var c=e.values.find(function(e){return"X-ASSET-MIMETYPE"==e.key});c&&(l=c.data),c=!1;var d=e.values.find(function(e){return"X-LOOP"==e.key});d&&(c="YES"==d.data),d=1;var h=e.values.find(function(e){return"X-DEPTH"==e.key});h&&isNaN(d=parseFloat(h.data))&&(d=1),h=null;var p=e.values.find(function(e){return"X-BACKGROUND"==e.key});p&&(h=p.data),p=1920;var f=1080,g=e.values.find(function(e){return"X-VIEWPORT"==e.key});if(g){if(2!=(f=g.data.split("x")).length)return t;p=parseFloat(f[0]),f=parseFloat(f[1])}if(p={viewport:{x:p,y:f},topLeft:{x:0,y:0},size:{x:p,y:f}},f=e.values.find(function(e){return"X-OVERLAY-POSITION"==e.key})){if(2!=(f=f.data.split("x")).length)return t;p.topLeft.x=parseFloat(f[0]),p.topLeft.y=parseFloat(f[1])}if(f=e.values.find(function(e){return"X-OVERLAY-SIZE"==e.key})){if(2!=(f=f.data.split("x")).length)return t;p.size.x=parseFloat(f[0]),p.size.y=parseFloat(f[1])}if(f=null,(g=e.values.find(function(e){return"X-SQUEEZECURRENT"==e.key}))&&(isNaN(f=parseFloat(g.data))&&(f=1),f={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*f,y:1080*f}},e=e.values.find(function(e){return"X-SQUEEZECURRENT-POSITION"==e.key}))){if(2!=(e=e.data.split("x")).length)return t;f.topLeft.x=parseFloat(e[0]),f.topLeft.y=parseFloat(e[1])}
1return t.push({id:i,groupId:null,startTime:r,endTime:a,uri:n,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:o,pre:s,post:u,timelineRange:!0,loop:c,overlay:p,displayOnBackground:-1==d,currentVideo:f,background:h,clickThroughUrl:null}),t}(n),e.A(2)):e.g((t=i,s=n,P(function(e){switch(e.h){case 1:if(u=[],!s||(l=s.values.find(function(e){return"X-ASSET-URI"==e.key}),c=s.values.find(function(e){return"X-ASSET-LIST"==e.key}),!l&&!c))return e.return(u);if(d=null,(h=s.values.find(function(e){return"ID"==e.key}))&&(d=h.data),p=null==d?Math.floor(10*s.startTime)/10:s.startTime,(f=s.endTime)&&s.endTime!=1/0&&"number"==typeof s.endTime&&(f=null==d?Math.floor(10*s.endTime)/10:s.endTime),g=s.values.find(function(e){return"X-RESTRICT"==e.key}),v=m=!0,g&&g.data&&(m=!(y=g.data).includes("SKIP"),v=!y.includes("JUMP")),b=m?0:null,(w=s.values.find(function(e){return"X-ENABLE-SKIP-AFTER"==e.key}))&&isNaN(b=parseFloat(w.data))&&(b=m?0:null),T=null,(x=s.values.find(function(e){return"X-ENABLE-SKIP-FOR"==e.key}))&&(T=parseFloat(x.data),isNaN(b)&&(T=null)),S=null,(A=s.values.find(function(e){return"X-RESUME-OFFSET"==e.key}))&&isNaN(S=parseFloat(A.data))&&(S=null),k=null,(I=s.values.find(function(e){return"X-PLAYOUT-LIMIT"==e.key}))&&isNaN(k=parseFloat(I.data))&&(k=null),M=C=E=!1,(D=s.values.find(function(e){return"CUE"==e.key}))&&(E=(R=D.data).includes("ONCE"),C=R.includes("PRE"),M=R.includes("POST")),L=!1,(N=s.values.find(function(e){return"X-TIMELINE-OCCUPIES"==e.key}))?L=N.data.includes("RANGE"):!A&&t.C.U()&&(L=!C&&!M),l){if(!(j=l.data))return e.return(u);u.push({id:d,groupId:null,startTime:p,endTime:f,uri:j,mimeType:null,isSkippable:m,skipOffset:b,skipFor:T,canJump:v,resumeOffset:S,playoutLimit:k,once:E,pre:C,post:M,timelineRange:L,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}),e.A(2);break}if(!c){e.A(2);break}if(!(O=c.data))return e.return(u);return e.m(4),U={type:11},e.g(dd(t,O,U),6);case 6:for((B=(_=JSON.parse(eZ(e.i)))["SKIP-CONTROL"])&&("number"==typeof(F=B["ENABLE-SKIP-AFTER"])&&(b=parseFloat(F),isNaN(F)&&(b=m?0:null)),"number"==typeof(V=B["ENABLE-SKIP-FOR"])&&(T=parseFloat(V),isNaN(V)&&(T=null))),H=0;H<_.ASSETS.length;H++)(G=_.ASSETS[H]).URI&&u.push({id:d+"_shaka_asset_"+H,groupId:d,startTime:p,endTime:f,uri:G.URI,mimeType:null,isSkippable:m,skipOffset:b,skipFor:T,canJump:v,resumeOffset:S,playoutLimit:k,once:E,pre:C,post:M,timelineRange:L,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});e.o(2);break;case 4:e.l();case 2:return e.return(u)}})),3)}2!=e.h&&(o=e.i),o.length?di(i,o):X("Unsupported HLS interstitial",n),e.j()})))},p.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==i||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==i){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t="urn:mpeg:dash:event:alternativeMPD:replace:2025"==n.schemeIdUri,i="urn:mpeg:dash:event:alternativeMPD:insert:2025"==n.schemeIdUri,t||i)){for(var r,a=n.startTime,o=n.endTime,s=null,u=0,l=x(n.eventNode.children),c=l.next();!c.done;c=l.next())if("AlternativeMPD"==(c=c.value).tagName){if(c=c.attributes.uri){r=c;break}}else if("InsertPresentation"==c.tagName||"ReplacePresentation"==c.tagName){var d=c.attributes.uri||c.attributes.url;if(d){r=e3(d),(l=t1(c,"maxDuration",t9))&&(s=l/n.timescale),(l=t1(c,"returnOffset",t9))&&(u=l/n.timescale),t&&u&&(o=a+u);break}}r&&di(e,[{id:n.id,groupId:null,startTime:a,endTime:o,uri:r,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else("urn:mpeg:dash:event:2012"==i||"urn:scte:dash:scte214-events"==i)&&n.eventNode&&tZ(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function(e,t){var n=tZ(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,a="true"==n.attributes.loop,o=t1(n,"z",t9);
1if(i&&0!=o){var s=null,u=tZ(n,"Background");if(u){var l=u.attributes.uri;s=l?"center / contain no-repeat url('"+l+"')":t$(u)}u=1920,l=1080;var c=tZ(n,"Viewport");if(c&&(null==(u=t1(c,"x",t9))||null==(l=t1(c,"y",t9))))return;var d={viewport:{x:u,y:l},topLeft:{x:0,y:0},size:{x:u,y:l}},h=tZ(n,"Overlay");if(c&&h){var p=tZ(h,"TopLeft"),f=tZ(h,"Size");if(p&&f){if(null==(h=t1(p,"x",t9))||null==(p=t1(p,"y",t9)))return;var g=t1(f,"x",t9);if(null==g||null==(f=t1(f,"y",t9)))return;d.topLeft.x=h,d.topLeft.y=p,d.size.x=g,d.size.y=f}}if(h=null,n=tZ(n,"Squeeze"),c&&n&&(f=tZ(n,"TopLeft"),n=tZ(n,"Size"),f&&n)){if(null==(c=t1(f,"x",t9))||null==(h=t1(f,"y",t9))||null==(f=t1(n,"x",t9))||null==(n=t1(n,"y",t9)))return;h={viewport:{x:u,y:l},topLeft:{x:c,y:h},size:{x:f,y:n}}}di(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:a,overlay:d,displayOnBackground:-1==o,currentVideo:h,background:s,clickThroughUrl:null}])}}(this.g,n))}},p.addCustomInterstitial=function(e){if(!this.g)throw new eJ(1,10,10006);di(this.g,[e])},p.addAdUrlInterstitial=function(e){if(!this.g)throw new eJ(1,10,10006);return this.g.addAdUrlInterstitial(e)},p.getInterstitialPlayer=function(){if(!this.g)throw new eJ(1,10,10006);return this.g.nd()},H("shaka.ads.AdManager",dC),dC.prototype.getInterstitialPlayer=dC.prototype.getInterstitialPlayer,dC.prototype.addAdUrlInterstitial=dC.prototype.addAdUrlInterstitial,dC.prototype.addCustomInterstitial=dC.prototype.addCustomInterstitial,dC.prototype.onDASHInterstitialMetadata=dC.prototype.onDASHInterstitialMetadata,dC.prototype.onHLSInterstitialMetadata=dC.prototype.onHLSInterstitialMetadata,dC.prototype.onCueMetadataChange=dC.prototype.onCueMetadataChange,dC.prototype.onHlsTimedMetadata=dC.prototype.onHlsTimedMetadata,dC.prototype.onDashTimedMetadata=dC.prototype.onDashTimedMetadata,dC.prototype.onManifestUpdated=dC.prototype.onManifestUpdated,dC.prototype.getStats=dC.prototype.getStats,dC.prototype.getCuePoints=dC.prototype.getCuePoints,dC.prototype.getServerSideCuePoints=dC.prototype.getServerSideCuePoints,dC.prototype.replaceServerSideAdTagParameters=dC.prototype.replaceServerSideAdTagParameters,dC.prototype.requestServerSideStream=dC.prototype.requestServerSideStream,dC.prototype.initServerSide=dC.prototype.initServerSide,dC.prototype.addMediaTailorTrackingUrl=dC.prototype.addMediaTailorTrackingUrl,dC.prototype.requestMediaTailorStream=dC.prototype.requestMediaTailorStream,dC.prototype.initMediaTailor=dC.prototype.initMediaTailor,dC.prototype.updateClientSideAdsRenderingSettings=dC.prototype.updateClientSideAdsRenderingSettings,dC.prototype.requestClientSideAds=dC.prototype.requestClientSideAds,dC.prototype.onAssetUnload=dC.prototype.onAssetUnload,dC.prototype.release=dC.prototype.release,dC.prototype.initClientSide=dC.prototype.initClientSide,dC.prototype.initInterstitial=dC.prototype.initInterstitial,dC.prototype.configure=dC.prototype.configure,dC.prototype.setLocale=dC.prototype.setLocale,dC.ADS_LOADED="ads-loaded",dC.AD_STARTED="ad-started",dC.AD_FIRST_QUARTILE="ad-first-quartile",dC.AD_MIDPOINT="ad-midpoint",dC.AD_THIRD_QUARTILE="ad-third-quartile",dC.AD_COMPLETE="ad-complete",dC.AD_STOPPED="ad-stopped",dC.AD_SKIPPED="ad-skipped",dC.AD_VOLUME_CHANGED="ad-volume-changed",dC.AD_MUTED="ad-muted",dC.AD_PAUSED="ad-paused",dC.AD_RESUMED="ad-resumed",dC.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",dC.CUEPOINTS_CHANGED="ad-cue-points-changed",dC.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",dC.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",dC.AD_CLICKED="ad-clicked",dC.AD_PROGRESS="ad-progress",dC.AD_BUFFERING="ad-buffering",dC.AD_IMPRESSION="ad-impression",dC.AD_DURATION_CHANGED="ad-duration-changed",dC.AD_CLOSED="ad-closed",dC.AD_LOADED="ad-loaded",dC.ALL_ADS_COMPLETED="all-ads-completed",dC.AD_LINEAR_CHANGED="ad-linear-changed",dC.AD_METADATA="ad-metadata",dC.AD_RECOVERABLE_ERROR="ad-recoverable-error",dC.AD_ERROR="ad-error",dC.AD_BREAK_READY="ad-break-ready",dC.AD_INTERACTION="ad-interaction",dC.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",dC.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",dC.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",cQ=function(){return new dC};var dL="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),dP="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),dN=["loop","playbackRate"],dj=["pause","play"],dO=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),dU=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
1Stats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),d_=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),dB=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],dF=[["isTextTrackVisible","setTextTrackVisibility"]],dV="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),dH="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function dG(e,t,n,i,r,a,o){var s=this;this.H=e,this.K=o,this.l=new n7(t),this.M=n,this.u=!1,this.B=i,this.G=r,this.N=a,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return dW(s)},this.D=function(e,t){switch((e=dR(t)).type){case"event":var n=e.targetName,i=i5(e.event);s.B(n,i);break;case"update":for(i in n=e.update)for(var r in e=s.g[i]||{},n[i])e[r]=n[i][r];s.u&&(s.M(),s.u=!1);break;case"asyncComplete":if(r=e.id,i=e.error,t=e.res,e=s.h.get(r),s.h.delete(r),e)if(i){for(n in r=new eJ(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve(t)}},this.g={video:{},player:{}},this.I=0,this.h=new Map,this.j=null,d0.add(this)}function dK(e,t){var n=e.N();dQ=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),dW(e),dY(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function dq(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 eJ(2,8,n,t))}function dz(e){var t=dQ;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function dW(e){var t=!!dQ&&"connected"==dQ.status;if(e.i&&!t){for(var n in e.G(),e.g)e.g[n]={};dX(e)}e.i=t,e.J=t?dQ.receiver.friendlyName:"",e.l.yb()}function dX(e){if(e.h)for(var t=x(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 eJ(1,7,7e3))}}function dY(e,t){t=dD(t);var n=dQ;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},J)}catch(i){throw t=new eJ(2,8,8005,i),n=new i3("error",(new Map).set("detail",t)),e.B("player",n),e.jd(),t}}(p=dG.prototype).destroy=function(){return d0.delete(this),dX(this),dQ&&dz(this),this.l&&(this.l.stop(),this.l=null),this.G=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.o=null,Promise.resolve()},p.sb=function(){return this.i},p.bh=function(){return this.J},p.init=function(){if(this.H.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.yb();var t=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,function(e){for(var t=x(d0),n=t.next();!n.done;n=t.next())(n=n.value).j=new i$,n.u=!0,dK(n,e)},function(e){for(var t=x(d0),n=t.next();!n.done;n=t.next())n=n.value,d$="available"==e,n.l.yb()},"origin_scoped"),chrome.cast.initialize(t,function(){},function(){}),d$&&this.l.na(dJ),(t=dQ)&&t.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new i$,this.u=!0,dK(this,t)):dQ=null}else e.__onGCastApiAvailable!==d1&&(dZ=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=d1)},p.ph=function(e){this.o=e,this.i&&dY(this,{type:"appData",appData:this.o})},p.cast=function(){var e=this;return P(function(t){if(!e.m)throw new eJ(1,8,8e3);if(!d$)throw new eJ(1,8,8001);if(e.i)throw new eJ(1,8,8002);return e.j=new i$,chrome.cast.requestSession(function(t){return dK(e,t)},function(t){return dq(e,t)}),t.g(e.j,0)})},p.jd=function(){if(this.i){if(dX(this),dQ){dz(this);try{dQ.stop(function(){},function(){})}catch(e){}dQ=null}dW(this)}},p.get=function(e,t){var n=this;if("video"==e){if(dj.includes(t))return function(){return n.Ii.apply(n,[e,t].concat(S(N.apply(0,arguments))))}}else if("player"==e){if(d_.has(t)&&!this.get("player","isLive")())return function(){};if(dV.includes(t))return function(){return n.Ii.apply(n,[e,t].concat(S(N.apply(0,arguments))))};if(dH.includes(t))return function(){return n.Pk.apply(n,[e,t].concat(S(N.apply(0,arguments))))};if(dO.has(t)||dU.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},p.set=function(e,t,n){this.g[e][t]=n,dY(this,{type:"set",targetName:e,property:t,value:n})},p.Ii=function(e,t){dY(this,{type:"call",targetName:e,methodName:t,args:N.apply(2,arguments)})},p.Pk=function(e,t){var n=N.apply(2,arguments),i=new i$,r=this.I.toString();this.I++,this.h.set(r,i);try{dY(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};
1var dJ=.02,d$=!1,dQ=null,dZ=null,d0=new Set;function d1(t){if(dZ?e.__onGCastApiAvailable=dZ:delete e.__onGCastApiAvailable,dZ=null,t)for(var n=x(d0),i=n.next();!i.done;i=n.next())i.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function d2(t,n,i,r){r=void 0!==r&&r,i8.call(this);var a=this;this.i=t,this.h=n,this.l=this.o=this.m=this.u=this.j=null,this.I=i,this.H=r,this.D=[],this.C=[],this.B=[],this.G=new Map,this.g=null,e.chrome&&"CAST"!=eu().Qa()?(this.g=new dG(i,function(){return d5(a)},function(){return d6(a)},function(e,t){return d9(a,e,t)},function(){return d8(a)},function(){return d3(a)},r),function(e){e.g.init(),e.l=new er;for(var t,n,i=x(dL),r=i.next();!r.done;r=i.next())e.l.F(e.i,r.value,function(t){e.g.sb()||(t=i5(t),e.m.dispatchEvent(t))});for(var a in i6)e.l.F(e.h,i6[a],function(t){e.g.sb()||e.o.dispatchEvent(t)});for(var o in e.j={},i={},e.i)(i={ae:i.ae}).ae=o,Object.defineProperty(e.j,i.ae,{configurable:!1,enumerable:!0,get:function(t){return function(){return function(e,t){if("addEventListener"==t)return function(t,n,i){return e.m.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.m.removeEventListener(t,n,i)};if(e.g.sb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.sb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}(e,t.ae)}}(i),set:function(t){return function(n){var i=t.ae;e.g.sb()?e.g.set("video",i,n):e.i[i]=n}}(i)});e.u={},d4(e,function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return function e(t,n,i){if(i=void 0!==i&&i,t.G.has(n)&&(n=t.G.get(n)),"addEventListener"==n)return function(e,n,i){return t.o.addEventListener(e,n,i)};if("removeEventListener"==n)return function(e,n,i){return t.o.removeEventListener(e,n,i)};if("getMediaElement"==n)return function(){return t.j};if("getSharedConfiguration"==n)return t.g.get("player","getConfiguration");if("getNetworkingEngine"==n)return function(){return t.h.Sb()};if("getDrmEngine"==n)return function(){return t.h.D};if("getAdManager"==n)return function(){return t.h.ai()};if("getQueueManager"==n)return function(){return t.h.ji()};if("setVideoContainer"==n)return function(e){return t.h.Wi(e)};if(!i){if("addThumbnailsTrack"==n)return function(){var i=N.apply(0,arguments);return t.D.push(i),e(t,n,!0).apply(null,S(i))};if("addTextTrackAsync"==n)return function(){var i=N.apply(0,arguments);return t.C.push(i),e(t,n,!0).apply(null,S(i))};if("addChaptersTrack"==n)return function(){var i=N.apply(0,arguments);return t.B.push(i),e(t,n,!0).apply(null,S(i))}}if(t.g.sb()){if("getManifest"==n||"drmInfo"==n)return function(){return X(n+"() does not work while casting!"),null};if("attach"==n||"detach"==n)return function(){return X(n+"() does not work while casting!"),Promise.resolve()};if("getChapters"==n)return function(){return X(n+"() does not work while casting!"),[]}}return t.g.sb()&&0==Object.keys(t.g.g.video).length&&(dO.has(n)||dU.has(n))||!t.g.sb()?t.h[n].bind(t.h):t.g.get("player",n)}(e,t)}})}),t=e,n=new Map,d4(t,function(e,i){n.has(i)?(i=n.get(i),e.length<i.length?t.G.set(e,i):t.G.set(i,e)):n.set(i,e)}),e.m=new i8,e.m.De=e.j,e.o=new i8,e.o.De=e.u,e.l.F(e.h,"unloading",function(){e.g&&e.g.sb()||d7(e)})}(this)):(this.j=this.i,this.u=this.h)}function d4(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=x(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 d3(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.kd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChaptersTrackCalls:e.B};e.i.pause();for(var n=x(dN),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=x(dB)).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=x(dF)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function d5(e){var t=new i3("caststatuschanged");e.dispatchEvent(t)}function d6(e){var t=new i3(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function d8(e){for(var t,n=x(dB),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.D,o=e.C,s=e.B;d7(e);var u=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),n=Promise.resolve();var l=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 c=e.g.get("player","isTextTrackVisible")();u&&(e.i.autoplay=!1,n=e.h.load(u,i));var d={};for(r=(i=x(dN)).next();!r.done;r=i.next())d[r=r.value]=e.g.get("video",r);n.then(function(){if(e.i){for(var n,i,r,h=x(a),p=h.next();!p.done;p=h.next())p=p.value,(n=e.nd()).Je.apply(n,S(p));for(n=(h=x(o)).next();!n.done;n=h.next())n=n.value,(i=e.nd()).Md.apply(i,S(n));for(h=(i=x(s)).next();!h.done;h=i.next())h=h.value,(r=e.nd()).Ie.apply(r,S(h));for(i=(r=x(dN)).next();!i.done;i=r.next())i=i.value,e.i[i]=d[i];for(i=(r=x(dF)).next();!i.done;i=r.next())i=(h=i.value)[1],h=e.g.get("player",h[0])(),e.h[i](h);e.h.sh(c),t&&e.h.nh(t.language,t.roles,t.forced),e.i.autoplay=l,u&&e.
1i.play()}},function(t){t=new i3("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)})}function d9(e,t,n){e.g.sb()&&("video"==t?e.m.dispatchEvent(n):"player"==t&&("unloading"==n.type&&d7(e),e.o.dispatchEvent(n)))}function d7(e){e.D=[],e.C=[],e.B=[]}function he(e,t,n,i){i8.call(this);var r=this;this.h=e,this.g=t,this.j=new er,this.I={video:e,player:t},this.G=n||function(){},this.J=i||function(e){return e},this.i=null,this.H=!1,this.o=!0,this.m=0,this.C=!1,this.B=!0,this.u=this.l=null,this.D=new n7(function(){hr(r)}),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return ht(e)},t.onSenderDisconnected=function(){return ht(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&hu(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),hu(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=dR(i.data);switch(r.type){case"PLAY":n.h.play(),hl(n);break;case"PAUSE":n.h.pause(),hl(n);break;case"SEEK":i=r.currentTime;var a=r.resumeState;null!=i&&(n.h.currentTime=Number(i)),a&&"PLAYBACK_START"==a?(n.h.play(),hl(n)):a&&"PLAYBACK_PAUSE"==a&&(n.h.pause(),hl(n));break;case"STOP":n.g.yc().then(function(){n.g&&hl(n)});break;case"GET_STATUS":ho(n,Number(r.requestId));break;case"VOLUME":i=(a=r.volume).level,a=a.muted;var o=n.h.volume,s=n.h.muted;null!=i&&(n.h.volume=Number(i)),null!=a&&(n.h.muted=a),o==n.h.volume&&s==n.h.muted||hl(n);break;case"LOAD":n.m=0,n.C=!1,n.B=!1,i=r.media,a=r.currentTime,o=n.J(i.contentId),s=r.auto
1play||!0,n.G(i.customData),s&&(n.h.autoplay=!0),n.g.load(o,a).then(function(){n.g&&ho(n)}).catch(function(e){var t="LOAD_FAILED";7==e.category&&7e3==e.code&&(t="LOAD_CANCELLED"),hu(n,{requestId:Number(r.requestId),type:t},n.u)});break;default:hu(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,g,m,v,y,b,w,T,A=dR(t.data);switch(A.type){case"init":e.m=0,e.C=!1,e.B=!0,n=A.initState,i=A.appData,P(function(t){switch(t.h){case 1:for(r in n.player)a=n.player[r],e.g[r](a);return e.G(i),o=e.h.autoplay,n.manifest?(e.h.autoplay=!1,t.m(5),t.g(e.g.load(n.manifest,n.startTime),7)):t.g(Promise.resolve(),3);case 7:if(n.addThumbnailsTrackCalls)for(u=(s=x(n.addThumbnailsTrackCalls)).next();!u.done;u=s.next())l=u.value,e.g.Je.apply(e.g,S(l));if(n.addTextTrackAsyncCalls)for(d=(c=x(n.addTextTrackAsyncCalls)).next();!d.done;d=c.next())h=d.value,e.g.Md.apply(e.g,S(h));if(n.addChaptersTrackCalls)for(f=(p=x(n.addChaptersTrackCalls)).next();!f.done;f=p.next())g=f.value,e.g.Ie.apply(e.g,S(g));t.o(3);break;case 5:return m=t.l(),v=new i3("error",(new Map).set("detail",m)),e.g&&e.g.dispatchEvent(v),t.return();case 3:if(!e.g)return t.return();for(y in n.video)b=n.video[y],e.h[y]=b;for(w in n.playerAfterLoad)T=n.playerAfterLoad[w],e.g[w](T);e.h.autoplay=o,n.manifest&&(e.h.play(),hl(e)),t.j()}}),hr(e);break;case"appData":e.G(A.appData);break;case"set":var k=A.targetName,I=A.property;if(A=A.value,"video"==k){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==I){t.setSystemVolumeLevel(A);break}else if("muted"==I){t.setSystemVolumeMuted(A);break}}e.I[k][I]=A;break;case"call":(k=e.I[A.targetName])[A.methodName].apply(k,A.args);break;case"asyncCall":k=A.targetName,I=A.methodName,"player"==k&&"load"==I&&(e.m=0,e.C=!1);var E=A.id,C=t.senderId;A=(t=e.I[k])[I].apply(t,A.args),"player"==k&&"load"==I&&(A=A.then(function(){e.B=!0})),A.then(function(t){return hs(e,C,E,null,t)},function(t){return hs(e,C,E,t,null)})}}(e,t)},t.start(),t=x(dL);for(var n=t.next();!n.done;n=t.next())e.j.F(e.h,n.value,function(t){return hi(e,"video",t)});for(var i in i6)e.j.F(e.g,i6[i],function(t){return hi(e,"player",t)});e.j.F(e.h,"loadeddata",function(){e.C=!0}),e.j.F(e.g,"loading",function(){e.o=!1,hn(e)}),e.j.F(e.h,"playing",function(){e.o=!1,hn(e)}),e.j.F(e.h,"pause",function(){hn(e)}),e.j.F(e.g,"unloading",function(){e.o=!0,hn(e)}),e.j.F(e.h,"ended",function(){new n7(function(){e.h&&e.h.ended&&(e.o=!0,hn(e))}).na(hd)})}(this)}function ht(e){e.m=0,e.B=!0,e.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,hn(e)}function hn(e){var t;P(function(n){return 1==n.h?n.g(Promise.resolve(),2):e.g?void(t=new i3("caststatuschanged"),e.dispatchEvent(t),ha(e)||hl(e),n.j()):n.return()})}function hi(e,t,n){e.g&&(hr(e),hu(e,{type:"event",targetName:t,event:n},e.l))}function hr(e){e.D.na(hc);for(var t={video:{},player:{}},n=x(dP),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.h[i];e.g.U()&&d_.forEach(function(n,i){e.m%n==0&&(t.player[i]=e.g[i]())}),dO.forEach(function(n,i){e.m%n==0&&(t.player[i]=e.g[i]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),hu(e,{type:"update",update:t},e.l),dU.forEach(function(t,n){e.m%t==0&&((t={player:{}}).player[n]=e.g[n](),hu(e,{type:"update",update:t},e.l))}),e.C&&(e.m+=1),ha(e)}function ha(e){return!!(e.B&&(e.h.duration||e.g.U()))&&(ho(e),e.B=!1,!0)}function ho(e,t){var n={contentId:e.g.kd(),streamType:e.g.U()?"LIVE":"BUFFERED",contentType:""};e.g.U()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),hl(e,void 0===t?0:t,n)}function hs(e,t,n,i,r){e.g&&hu(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function hu(e,t,n,i){e.H&&(e=dD(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function hl(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?hh:e.g.Ng()?hf:e.h.paused?hg:hp,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),hu(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}
1w(d2,i8),(p=d2.prototype).destroy=function(e){return this.g&&(void 0===e?0:e)&&this.g.jd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,i8.prototype.release.call(this),Promise.all(e)},p.ek=function(){return this.j},p.nd=function(){return this.u},p.qj=function(){return!!this.g&&this.g.m&&d$},p.sb=function(){return!!this.g&&this.g.sb()},p.bh=function(){return this.g?this.g.bh():""},p.cast=function(){var e=this;return P(function(t){return 1==t.h?e.g?t.g(e.g.cast(),2):t.return():e.h?t.g(e.h.yc(),0):t.return()})},p.ph=function(e){this.g&&this.g.ph(e)},p.il=function(){var e;this.g&&(e=this.g).i&&chrome.cast.requestSession(function(t){return dK(e,t)},function(t){return dq(e,t)})},p.jd=function(){this.g&&this.g.jd()},p.rj=function(e,t){t=void 0!==t&&t;var n=this;return P(function(i){if(1==i.h)return e==n.I&&t==n.H?i.return():(n.I=e,n.H=t,n.g)?(n.g.jd(),i.g(n.g.destroy(),2)):i.return();n.g=null,n.g=new dG(e,function(){return d5(n)},function(){return d6(n)},function(e,t){return d9(n,e,t)},function(){return d8(n)},function(){return d3(n)},t),n.g.init(),i.j()})},H("shaka.cast.CastProxy",d2),d2.prototype.changeReceiverId=d2.prototype.rj,d2.prototype.forceDisconnect=d2.prototype.jd,d2.prototype.suggestDisconnect=d2.prototype.il,d2.prototype.setAppData=d2.prototype.ph,d2.prototype.cast=d2.prototype.cast,d2.prototype.receiverName=d2.prototype.bh,d2.prototype.isCasting=d2.prototype.sb,d2.prototype.canCast=d2.prototype.qj,d2.prototype.getPlayer=d2.prototype.nd,d2.prototype.getVideo=d2.prototype.ek,d2.prototype.destroy=d2.prototype.destroy,w(he,i8),(p=he.prototype).isConnected=function(){return this.H},p.lk=function(){return this.o},p.al=function(e){this.i=e},p.vj=function(){this.i=null},p.cl=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},p.$k=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},p.Zk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},p.destroy=function(){var e,t=this;return P(function(n){if(1==n.h)return t.j&&(t.j.release(),t.j=null),e=[],t.g&&(e.push(t.g.destroy()),t.g=null),t.D&&(t.D.stop(),t.D=null),t.h=null,t.I=null,t.G=null,t.H=!1,t.o=!0,t.l=null,t.u=null,i8.prototype.release.call(t),n.g(Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),n.j()})},H("shaka.cast.CastReceiver",he),he.prototype.destroy=he.prototype.destroy,he.prototype.setContentArtist=he.prototype.Zk,he.prototype.setContentImage=he.prototype.$k,he.prototype.setContentTitle=he.prototype.cl,he.prototype.clearContentMetadata=he.prototype.vj,he.prototype.setContentMetadata=he.prototype.al,he.prototype.isIdle=he.prototype.lk,he.prototype.isConnected=he.prototype.isConnected;var hc=.5,hd=5,hh="IDLE",hp="PLAYING",hf="BUFFERING",hg="PAUSED";function hm(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;s>=0;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=hv(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;g>=0;g--)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}if(-1===p||-1===f)h=hy(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=hv(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=hy(i,r),e.nestedCues.push(d)),d=hv(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function hv(e,t,n,i,r,a){return e=new nd(e,t,""),n&&e.textDecoration.push(nN),i&&(e.fontStyle=nL),e.color=r,e.backgroundColor=a,e}function hy(e,t){return(e=new nd(e,t,"")).lineBreak=!0,e}function hb(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function hw(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.B=null,hx(this)}function hT(e,t,n){var i="CC"+((e.D<<1|e.C)+1),r=new nd(t,n,"");r.lineInterpretation=1;var a=hD.get(e.g);return a&&(r.line=a),null!=e.u&&null!=e.B&&(r.position=10+Math.min(70,10*e.u)+2.5*e.B),(t=hm(r,i,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(a=hD.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function hx(e){hk(e,0,15),e.g=1}function hS(e,t,n){if(!(n<32||n>127)){var i="";switch(t){case 0:i=hI.has(n)?hI.get(n):String.fromCharCode(n);break;case 1:i=hE.get(n);break;case 2:e.i[e.g].pop(),i=hC.get(n);break;case 3:e.i[e.g].pop(),i=hM.get(n)}i&&e.i[e.g].push(new hb(i,e.m,e.j,e.o,e.l))}}function hA(e,t,n,i){if(!(n<0||t<0))if(t>=n)for(--i;i>=0;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 hk(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var hI=new Map([[39,"’"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"█"]]),hE=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"]]),hC=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"]]),hM=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,"┘"]]),hD=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 hR(e,t){this.h=0,this.o=new hw(e,t),this.i=new hw(e,t),this.g=this.j=new hw(e,t),this.l=0,this.m=null}
1function hL(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=hT(i,e.l,n),(n=e.i).g=n.h>0?n.h:0,hk(n,0,15),(n=e.j).g=n.h>0?n.h:0,hk(n,0,15),i.g=15),e.h=3,i.h=t,r}function hP(e){e.h=1,e.g=e.j,e.g.h=0}function hN(e){Y("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var hj="black green blue cyan red yellow magenta black".split(" "),hO="white green blue cyan red yellow magenta white_italics".split(" ");function hU(e,t){this.J=t,this.N=e,this.K=this.l=!1,this.m=this.o=this.H=this.M=this.I=0,this.G=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",h_(this)}function h_(e){e.i=[];for(var t=0;t<16;t++)e.i.push(hB())}function hB(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function hF(e,t){hV(e)&&(e.i[e.h][e.g]=new hb(t,e.D,e.B,e.u,e.C),e.g++)}function hV(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}function hH(e,t,n){var i=new nd(e.j,t,"");i.textAlign=0===e.G?"left":1===e.G?"right":ny;var r=i.region;switch(e.J&&(r.id+="svc"+e.J),r.id+="win"+e.N,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.I,r.viewportAnchorY=e.M,r.viewportAnchorUnits=e.K?tR:2,e.H){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=hm(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function hG(){this.i=[],this.h=null,this.g=0}function hK(e){this.g=0,this.h=e}function hq(e){if(!e.La())throw new eJ(2,2,3e3);return e.h[e.g++]}function hz(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function hW(e,t){for(var n=[],i=0;i<8;i++)(1&t)==1&&e.h[i]&&n.push(i),t>>=1;return n}function hX(e,t,n){var i=[];t=x(hW(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=hH(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function hY(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function hJ(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],hQ[e<<2|(t=i[t])<<1|(n=i[n])]}hU.prototype.isVisible=function(){return this.l},hU.prototype.display=function(){this.l=!0},hK.prototype.La=function(){return this.g<this.h.length},hK.prototype.Ra=function(){return this.g},hK.prototype.skip=function(e){if(this.g+e>this.h.length)throw new eJ(2,2,3e3);this.g+=e},hK.prototype.Mi=function(e){if(this.g-e<0)throw new eJ(2,2,3e3);this.g-=e};var h$=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,"┌"]]),hQ="black blue green cyan red magenta yellow white".split(" ");function hZ(){this.h=[],this.g=[],this.i=new hG,this.l=0,this.m=new Map([["CC1",new hR(0,0)],["CC2",new hR(0,1)],["CC3",new hR(1,0)],["CC4",new hR(1,1)]]),this.u=this.o=0,this.j=new Map,this.C=!0,this.B=new Set,h0(this)}function h0(e){e.o=0,e.u=0;for(var t=x(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,hx(n.i),hx(n.j),hx(n.o);e.C=!0}function h1(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function h2(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(S(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(i=0,e=n;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 h4(){this.j=new Map,this.i=this.h=0,this.g=h3}hZ.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,h0(this),e=x(this.j.values());for(var t=e.next();!t.done;t=e.next())hY(t.value)},hZ.prototype.extract=function(e,t){if(this.C){for(var n=x(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.C=!1}if(!(8>(e=new rg(e,0)).getLength())&&181===e.Y()&&49===e.Ea()&&0x47413934===e.V()&&3===e.Y()&&(64&(n=e.Y()))!=0)for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.Y(),a=(4&r)>>2,o=e.Y(),s=e.Y();a&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,Ab:o,fc: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})))}},hZ.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=x(this.h),a=r.next();!a.done;a=r.next())(a=function(e,t){var n=t.type;if((112&t.Ab)==16){var i=t.Ab>>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.Ab&&255===t.fc||!t.Ab&&!t.fc||!h1(t.Ab)||!h1(t.fc))return++e.l>=45&&h0(e),null;e.l=0,t.Ab&=127,t.fc&=127;var r=t.Ab;if(r>=1&&r<=15||!t.Ab&&!t.fc)return null;
1if(r=null,(112&t.Ab)==16)e:{if(e.B.add(i),i=t.Ab,e=t.fc,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(240&i)==16&&(192&e)==64){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=e>95?e-96:e-64;o<=13?i=hO[Math.floor(o/2)]:o<=15?r=!0:a=Math.floor((o-16)/2),e=(1&e)==1,4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(n=1+t-o.h,hA(o,n,1+o.g-o.h,o.h),hk(o,0,n-1),hk(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((247&i)==17&&(240&e)==32)n.g.m=!1,n.g.j=!1,n.g.l="white",hS(n.g,0,32),i=!1,"white_italics"===(t=hO[(14&e)>>1])&&(t="white",i=!0),n.g.m=(1&e)==1,n.g.j=i,n.g.l=t;else if((247&i)==16&&(240&e)==32||(247&i)==23&&(255&e)==45)t="black",(7&i)==0&&(t=hj[(14&e)>>1]),n.g.o=t;else if((247&i)==17&&(240&e)==48)hS(n.g,1,e);else if((246&i)==18&&(224&e)==32)hS(n.g,1&i?3:2,e);else{if((246&i)==20&&(240&e)==32){switch(e=t.pts,i=null,t.fc){case 32:hP(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=hL(n,2,e);break;case 38:i=hL(n,3,e);break;case 39:i=hL(n,4,e);break;case 40:hS(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:hx(n.o),hN(n);break;case 43:hN(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=hT(t,n.l,e)),hk(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=hT(t,n.l,e),r=t.g-t.h+1,hA(t,r-1,r,t.h),hk(t,0,r-1),hk(t,t.g,15-t.g),n.l=e);break;case 46:hk(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=hT(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,hP(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&e>=33&&e<=35&&(n.g.B=e-32)}r=null}else e=t.fc,hS(n.g,0,t.Ab),hS(n.g,0,e);return r}(this,a.value))&&i.push(a);for(a=(r=x(this.g)).next();!a.done;a=r.next())t=this.i,3===(n=a.value).type?(t.g=(63&n.value)*2-1,t.h=[]):t.h&&(t.g>0&&(t.h.push(n),t.g--),0===t.g&&(t.i.push(new hK(t.h)),t.h=null,t.g=0));for(a=(r=x(this.i.i)).next();!a.done;a=r.next())a=function(e,t){var n=[];try{for(;t.La();){var i=hq(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&hq(t).value),0!=r){e.B.add("svc"+r),e.j.has(r)||e.j.set(r,new hz(r));for(var o=e.j.get(r),s=t.Ra();t.Ra()-s<a;){r=o;var u=t,l=hq(u),c=l.value,d=l.pts;if(16===c){var h=hq(u);c=c<<16|h.value}if(c>=0&&c<=31)var p=function(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=hq(t).value,i=hq(t).value].map(function(e){return("0"+(255&e).toString(16)).slice(-2)}).join(""),hF(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!hV(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=hH(t,i,e.i)),t.h+1>=t.o?function(e){for(var t=0,n=1;n<16;n++,t++)e.i[t]=e.i[n];for(n=0;n<1;n++,t++)e.i[t]=hB()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=hH(t,i,e.i)),t.i[t.h]=hB(),t.g=0;break;case 12:t.isVisible()&&(r=hH(t,i,e.i)),h_(t),t.h=0,t.g=0}return r?[r]:[]}(r,u,c,d);else if(c>=128&&c<=159)p=function(e,t,n,i){if(n>=128&&n<=135)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=hq(t).value,t=[],n=x(hW(e,n));for(var r=n.next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=hH(r,i,e.i);a&&t.push(a)}h_(r)}return t}
1if(137===n)for(n=(t=x(hW(e,t=hq(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=hq(t).value,t=null,r=(n=x(hW(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=hH(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=hq(t).value,t=null,r=(n=x(hW(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=hH(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return hX(e,t=hq(t).value,i);if(143===n)return i=hX(e,255,i),hY(e),i;if(144===n)t.skip(1),i=hq(t).value,e.g&&(e.g.B=(128&i)>0,e.g.D=(64&i)>0);else if(145===n)i=hq(t).value,n=hq(t).value,t.skip(1),e.g&&(t=hJ((48&n)>>4,(12&n)>>2,3&n),e.g.C=hJ((48&i)>>4,(12&i)>>2,3&i),e.g.u=t);else if(146===n)i=hq(t).value,t=hq(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=hq(t).value,t.skip(1),e.g&&(e.g.G=3&i);else if(n>=152&&n<=159){n=(15&n)-8,(r=null!==e.h[n])||((a=new hU(n,e.i)).j=i,e.h[n]=a),i=hq(t).value,a=hq(t).value;var o=hq(t).value,s=hq(t).value,u=hq(t).value;t=hq(t).value,r&&(7&t)==0||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),(t=e.h[n]).l=(32&i)>0,t.M=127&a,t.I=o,t.H=(240&s)>>4,t.K=(128&a)>0,t.o=(15&s)+1,t.m=(63&u)+1,e.g=e.h[n]}}}return[]}(r,u,c,d);else{if(c>=4096&&c<=4127)r=u,(u=255&c)>=8&&u<=15?r.skip(1):u>=16&&u<=23?r.skip(2):u>=24&&u<=31&&r.skip(3);else if(c>=4224&&c<=4255)r=u,(u=255&c)>=128&&u<=135?r.skip(4):u>=136&&u<=143&&r.skip(5);else if(c>=32&&c<=127)u=c,r.g&&(127===u?hF(r.g,"♪"):hF(r.g,String.fromCharCode(u)));else if(c>=160&&c<=255)r.g&&hF(r.g,String.fromCharCode(c));else if(c>=4128&&c<=4223){if(u=255&c,r.g)if(h$.has(u)){var f=h$.get(u);hF(r.g,f)}else hF(r.g,"_")}else c>=4256&&c<=4351&&r.g&&((255&c)!=160?hF(r.g,"_"):hF(r.g,"[CC]"));p=[]}n.push.apply(n,S(p))}}}}catch(e){if(e instanceof eJ&&3e3===e.code)Y("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw e}return n}(this,a.value),i.push.apply(i,S(a));return this.i.i=[],this.h=[],this.g=[],i},hZ.prototype.getStreams=function(){return Array.from(this.B)},H("shaka.cea.CeaDecoder",hZ),tM=function(){return new hZ},h4.prototype.init=function(e){var t=this,n=[],i=[];if((new ry).boxes("moov trak mdia minf stbl mvex".split(" "),rb).ma("trex",function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.V(),n=n.V(),t.h=e,t.i=n}).ma("tkhd",function(e){var t=e.reader;1==(e=e.version)?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4));var i=t.V();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.Ea(),t.Ea(),t.Ea(),t.Ea(),n.push(i)}).ma("mdhd",function(e){e=ao(e.reader,e.version),i.push(e.timescale)}).ma("stsd",rw).boxes("avc1 avc3 dvav dva1 hev1 hvc1 dvh1 dvhe vvc1 vvi1 dvc1 dvi1".split(" "),function(e){e=e.name,h9.has(e)&&(t.g=h9.get(e))}).box("encv",rT).box("sinf",rb).box("frma",function(e){e=al(e.reader).codec,h9.has(e)&&(t.g=h9.get(e))}).parse(e,!0,!0),!n.length||!i.length||n.length!=i.length)throw new eJ(2,2,2010);this.g==h3&&X("Unable to determine bitstream format for CEA parsing!"),n.forEach(function(e,n){t.j.set(e,i[n])})},h4.prototype.parse=function(e){var t=this;if(this.g==h3)return[];var n=[],i=0,r=[];
1return(new ry).box("moof",function(e){i=e.start,r=[],rb(e)}).box("traf",function(e){r.push({baseMediaDecodeTime:null,Rd:t.h,Sd:t.i,Ei:[],timescale:9e4}),rb(e)}).ma("trun",function(e){var t=r[r.length-1];e=as(e.reader,e.version,e.flags),t.Ei.push(e)}).ma("tfhd",function(e){var n=r[r.length-1];n.Rd=(e=ar(e.reader,e.flags)).Rd||t.h,n.Sd=e.Sd||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))}).ma("tfdt",function(e){r[r.length-1].baseMediaDecodeTime=(e=aa(e.reader,e.version)).baseMediaDecodeTime}).box("mdat",function(e){for(var a=i-e.start-8,o=e.reader.Ra(),s=x(r),u=s.next();!u.done;u=s.next())null===(u=u.value).baseMediaDecodeTime?X("Unable to find base media decode time for CEA captions!"):(e.reader.seek(o),function(e,t,n,i,r,a,o,s,u){var l=0,c=a,d=s.map(function(e){return e.kh});for((d=[].concat.apply([],S(d))).length&&(c=d[0].sampleSize||a),t.skip(o+s[0].lg);t.La();){o=t.V();var h=t.Y(),p=null;switch(p=!1,s=1,e.g){case h5:p=6==(p=31&h);break;case h6:s=2,t.skip(1),p=39==(p=h>>1&63)||40==p;break;case h8:s=2,t.skip(1),p=23==(p=h>>1&63)||24==p;break;default:return}if(p)for(h=0,l<d.length&&(h=d[l].Cf||0),h=(n+h)/i,p=(s=x(h2(s=t.Nb(o-s,!1)))).next();!p.done;p=s.next())u.push({packet:p.value,pts:h});else try{t.skip(o-s)}catch(e){break}0==(c-=o+4)&&(n=l<d.length?n+(d[l].mh||r):n+r,c=++l<d.length&&d[l].sampleSize||a)}}(t,e.reader,u.baseMediaDecodeTime,u.timescale,u.Rd,u.Sd,a,u.Ei,n))}).parse(e,!1,!0),n},H("shaka.cea.Mp4CeaParser",h4);var h3=0,h5=1,h6=2,h8=3,h9=(new Map).set("avc1",h5).set("avc3",h5).set("dvav",h5).set("dva1",h5).set("hev1",h6).set("hvc1",h6).set("dvh1",h6).set("dvhe",h6).set("vvc1",h8).set("vvi1",h8).set("dvc1",h8).set("dvi1",h8);function h7(){this.g=null}function pe(e){return(e=(function(e){var t=0,n=e_(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,(1&r)!=0||r+e>n.byteLength){n=[];break e}var a=eO(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n})(e=e7(tJ(e))).filter(function(e){return e.type===pn})[0])&&(e=tq(e=e0(e.value,!0),"WRMHEADER"))?e:null}function pt(e){try{var t=pe(e);if(t)e:{for(var n=x(tQ(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=x(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var u=tJ(s);break e}}}u=""}else u="";return u}catch(e){return""}}tI("video/mp4",function(){return new h4}),h7.prototype.init=function(){},h7.prototype.parse=function(e){this.g?this.g.clearData():this.g=new op;var t=[];if(!oT(e=eO(e)))return t;var n=(e=this.g.parse(e)).Td(),i=e.Ze();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=x(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=x(h2(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time});return t},H("shaka.cea.TsCeaParser",h7),tI("video/mp2t",function(){return new h7});var pn=1;function pi(){this.g=new Map}function pr(t,n,i,r){var a=function(e,t){var n=[];t=x(t);for(var i=t.next();!i.done;i=t.next())(i=function(e,t){var n=t.attributes.schemeIdUri,i=t2(t,"urn:mpeg:cenc:2013","default_KID"),r=t4(t,"urn:mpeg:cenc:2013","pssh").map(t$),a=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),i&&(i=i.replace(/-/g,"").toLowerCase()).includes(" "))throw new eJ(2,4,4009);var o=[];try{o=r.map(function(t){if(!e.g.has(t)){var n=e7(t);e.g.set(t,n)}return{initDataType:"cenc",initData:e.g.get(t),keyId:null}})}catch(e){throw new eJ(2,4,4007)}return{node:t,Dd:n,keyId:i,init:o.length>0?o:null,encryptionScheme:a}}(e,i.value))&&n.push(i);return n}(t,n),o=null;t=[];var s=[];n=null;var u=new Set(a.map(function(e){return e.keyId}));u.delete(null);var l="cenc";if(u.size>1)throw new eJ(2,4,4010);if(!i){if((s=a.filter(function(e){return"urn:mpeg:dash:sea:2012"==e.Dd})).length>1)throw new eJ(2,4,4050);s.length&&(n=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 eJ(2,4,4042);var n=t0(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n||"urn:mpeg:dash:sea:aes128-cbc:2013"!=n.attributes.schemeIdUri||!(n=t0(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"))||(t=n.attributes.IV,n=e3(n.attributes.keyUriTemplate),!t||!n))throw new eJ(2,4,4051);if(16!=(t=te(t.substr(2))).byteLength)throw new eJ(2,4,4048);return{tk:n,iv:t}}(s[0])),(s=a.find(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Dd}))&&s.encryptionScheme&&(l=s.encryptionScheme),(s=a.filter(function(e){return"urn:mpeg:dash:mp4protection:2011"==e.Dd?(o=e.init||o,!1):"urn:mpeg:dash:sea:2012"!=e.Dd})).length&&0==(t=function(e,t,n,i,r){var a=[];n=x(n);for(var o=n.next();!o.done;o=n.next()){var s,u=i[(o=o.value).Dd];if(u){if((s=t0(o.node,"urn:microsoft:playready","pro"))&&tJ(s)){s=e7(s=tJ(s));var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:rD(s,l,new Set,0),initDataType:"cenc",keyId:o.keyId}]}else s=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===o.Dd)if(l=o,0==r.size)l=null;else{var c=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);l=[{initData:rD(new Uint8Array([]),c,r,1),initDataType:"cenc",keyId:l.keyId}]}s=ta(u,t,o.init||e||s||l),(u=po.get(u))&&(s.licenseServerUri=u(o)),(o=t0(o.node,"https://dashif.org/CPS","Certurl"))&&(o=tJ(o))||(o=""),s.serverCertificateUri=o,a.push(s)}}return a}(o,l,s,r,u)).length&&(t=[ta("",l,o)])}if(a.length&&!n&&(i||!s.length))for(t=[],r=(i=x(Object.values(r))).next();!r.done;r=i.next())eH(r=r.value)||(r=ta(r,l,o),t.push(r));if(u=Array.from(u)[0]||null)for(i=(l=x(t)).next();!i.done;i=l.next())for(r=(i=x(i.value.initData)).next();!r.done;r=i.next())r.value.keyId=u;return{Vh:u,Em:o,drmInfos:t,cg:n,$h:!0}}
1function pa(e){var t=t0(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=tJ(t)))return t;if((t=t0(e.node,"urn:microsoft:playready","pro"))&&tJ(t))return pt(t);if((e=t0(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=tJ(e))){t=e7(e),e=8;var n=(t=e_(t)).getUint8(e);return e+=20,n>0&&(e+=4+16*t.getUint32(e)),pt(e=tq("<pro>"+(e=e8(e=eO(t,e+4)))+"</pro>"))}return""}pi.prototype.release=function(){this.g.clear()};var po=(new Map).set("com.apple.fps",function(t){if("apple"===e.shakaMediaKeysPolyfill)throw new eJ(2,4,4054);return(t=t0(t.node,"https://dashif.org/CPS","Laurl"))&&(t=tJ(t))?t:""}).set("com.widevine.alpha",function(e){var t=t0(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tJ(t))?t:(e=t0(e.node,"urn:microsoft","laurl"))&&e3(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",pa).set("com.microsoft.playready.recommendation",pa).set("com.microsoft.playready.software",pa).set("com.microsoft.playready.hardware",pa).set("org.w3.clearkey",function(e){var t=t0(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=tJ(t))?t:(e=t0(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=tJ(e))?e:""});function ps(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&&(Math.abs(a-Math.round(a))>=.2&&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 pu(e,t){var n=pc(e,t,"timescale"),i=1;n&&(i=t7(n)||1);var r=(n=t7((n=pc(e,t,"duration"))||""))?n/i:null,a=pc(e,t,"startNumber"),o=Number(pc(e,t,"presentationTimeOffset"))||0,s=ne(a||"");if((null==a||null==s)&&(s=1),a=null,t=pd(e,t,"SegmentTimeline")){t=tY(t,"S"),a=i,e=e.oa.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=t1(h,"t",ne),g=t1(h,"d",ne),m=t1(h,"r",t9);if(h=t1(h,"k",t9)||0,null!=f&&(f-=o),g){if(f=null!=f?f:c,(m=m||0)<0)if(p){if(null==(p=t1(p,"t",ne))||f>=p)break;m=Math.ceil((p-f)/g)-1}else{if(e==1/0||f/a>=e)break;m=Math.ceil((e*a-f)/g)-1}for(l.length>0&&f!=c&&(l[l.length-1].end=f/a),p=0;p<=m;++p)c=f+g,l.push({start:f/a,Hd:f,end:c/a,Gh:c,sc:h,Vk:l.length+u}),f=c}}a=l}return{timescale:i,Mf:n,gb:r,oe:s,bc:o/i||0,Zc:o,timeline:a}}function pl(e,t){return[t(e.L),t(e.ra),t(e.wa)].filter(ir)}function pc(e,t,n){t=pl(e,t),e=null,t=x(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function pd(e,t,n){t=pl(e,t),e=null,t=x(t);for(var i=t.next();!i.done&&!(e=tZ(i.value,n));i=t.next());return e}function ph(e){this.h=e_(e),this.g=new rg(this.h,0)}function pp(e){var t=pf(e);if(t.length>7)throw new eJ(2,3,3002);var n=0;t=x(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=pf(e);e:{i=x(pg);for(var r=i.next();!r.done;r=i.next())if(eN(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ra();else{if(8==t.length&&224&t[1])throw new eJ(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.Ra()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ra(),i=e_(e.h,e.g.Ra(),t),e.g.skip(t),new pm(n,i)}function pf(e){var t=e.g.Ra(),n=e.g.Y();if(0==n)throw new eJ(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),eO(e.h,t,n)}ph.prototype.La=function(){return this.g.La()};var pg=[[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 pm(e,t){this.id=e,this.g=t}function pv(e){if(e.g.byteLength>8)throw new eJ(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new eJ(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function py(e,t,n){if(!(t=pd(e,t,"Initialization")))return null;var i=e.L.bb(),r=t.attributes.sourceURL;r&&(i=tr(i,[e3(r)],e.Hb())),r=0;var a=null;return(t=t1(t,"range",t8))&&(r=t.start,a=t.end),(n=new aB(function(){return i},r,a,pS(e),null,null,n,e.ra.encrypted)).codecs=e.L.codecs,n.mimeType=e.L.mimeType,e.oa&&!e.oa.gf&&(n.g=e.oa.start+e.oa.duration),n}function pb(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,S,A,k,I,E;return P(function(C){if(1==C.h)return s=e.presentationTimeline,u=!e.pb||!e.oa.gf,l=e.oa.start,c=e.oa.duration,d=e.L.mimeType.split("/")[1],p=null,f=[(h=t)(i,r,a,!1),"webm"==d?h(n.R(),n.startByte,n.endByte,!0):null],h=null,C.g(Promise.all(f),2);for(m=(g=C.i)[0],v=g[1]||null,y=null,b=l-o,w=l,T=c?l+c:1/0,A=(S=e.L.bb()).length!=i.length||S.some(function(e,t){return e!=i[t]}),I=(k=x(y="mp4"==d?function(e,t,n,i,r,a,o,s){var u,l=(new ry).ma("sidx",function(e){u=function(e,t,n,i,r,a,o,s){s=void 0!==s&&s;var u=[];o.reader.skip(4);var l=o.reader.V();if(0==l)throw new eJ(2,3,3005);if(0==o.version)var c=o.reader.V(),d=o.reader.V();else c=o.reader.zd(),d=o.reader.zd();o.reader.skip(2);var h=o.reader.Ea();for(e=(s?-o.size:e)+o.size+d,s=0;s<h;s++){var p=o.reader.V();d=(0x80000000&p)>>>31,p&=0x7fffffff;var f=o.reader.V();if(o.reader.skip(4),1==d)throw new eJ(2,3,3006);u.push(new aV(c/l+n,(c+f)/l+n,function(){return a},e,e+p-1,t,n,i,r)),c+=f,e+=p}return o.parser.stop(),u}(t,i,r,a,o,n,e,s)});if(e&&l.parse(e),u)return u;throw new eJ(2,3,3004)}(m,r,S,n,b,w,T,A):function(e,t,n,i,r,a,o){if(0x1a45dfa3!=pp(t=new ph(t)).id)throw new eJ(2,3,3008);var s=pp(t);
1if(0x18538067!=s.id)throw new eJ(2,3,3009);t=s.g.byteOffset,s=new ph(s.g);for(var u=null;s.La();){var l=pp(s);if(0x1549a966==l.id){u=l;break}}if(!u)throw new eJ(2,3,3010);for(s=null,u=new ph(u.g),l=1e6;u.La();){var c=pp(u);if(2807729==c.id)l=pv(c);else if(17545==c.id)if(4==c.g.byteLength)s=c.g.getFloat32(0);else if(8==c.g.byteLength)s=c.g.getFloat64(0);else throw new eJ(2,3,3003)}if(null==s)throw new eJ(2,3,3011);if(s*=u=l/1e9,0x1c53bb6b!=(e=pp(new ph(e))).id)throw new eJ(2,3,3007);return function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new ph(e.g);for(var d=null,h=null;e.La();){var p=pp(e);if(187==p.id){var f=function(e){var t=new ph(e.g);if(179!=(e=pp(t)).id)throw new eJ(2,3,3013);if(e=pv(e),183!=(t=pp(t)).id)throw new eJ(2,3,3012);t=new ph(t.g);for(var n=0;t.La();){var i=pp(t);if(241==i.id){n=pv(i);break}}return{ol:e,Nk:n}}(p);f&&(p=n*f.ol,f=t+f.Nk,null!=d&&c.push(new aV(d+o,p+o,l,h,f-1,a,o,s,u)),d=p,h=f)}}return null!=d&&c.push(new aV(d+o,i+o,l,h,null,a,o,s,u)),c}(e,t,u,s,n,i,r,a,o)}(m,v,S,n,b,w,T))).next();!I.done;I=k.next())(E=I.value).codecs=e.L.codecs,E.mimeType=e.L.mimeType,E.bandwidth=e.bandwidth;return s.fe(y),p=new sy(y),u&&p.hd(w,T,!0),C.return(p)})}function pw(e){return e.Ed}function pT(e){var t=pd(e,pw,"RepresentationIndex");return e=t8((e=pc(e,pw,"indexRange"))||""),t&&(e=t1(t,"range",t8,e)),e}function px(e,t){var n=e.L.mimeType.split("/")[1];if(e.L.contentType!=tc&&"mp4"!=n&&"webm"!=n)throw new eJ(2,4,4006);if("webm"==n&&!t)throw new eJ(2,4,4005)}function pS(e){var t=e.L;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.vf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ra.label||null,roles:e.roles||null,language:e.ra.language||null}}function pA(e){return e.wc}function pk(t,n,i,r,a,o,s,u,l,c){l||t.L.cf||(t.L.cf=pc(t,pI,"initialization"));var d,h,p,f,g,m,v=t.L.cf?function(e,t){var n=e.L.cf;if(n||(n=pc(e,pI,"initialization")),!n)return null;n=e3(n);var i=e.L.originalId,r=e.bandwidth||null,a=e.L.bb,o=e.Hb;return(t=new aB(function(){var e=ps(n,i,null,null,r,null);return tr(a(),[e],o())},0,null,pS(e),null,null,t,e.ra.encrypted)).codecs=e.L.codecs,t.mimeType=e.L.mimeType,e.oa&&!e.oa.gf&&(t.g=e.oa.start+e.oa.duration),t}(t,s):null,y=(h=pu(d=t,pI),p=pc(d,pI,"media"),f=pc(d,pI,"index"),g=pc(d,pI,"k"),m=0,g&&(m=parseInt(g,10)),{Mf:h.Mf,gb:h.gb,timescale:h.timescale,oe:h.oe,bc:h.bc,Zc:h.Zc,timeline:h.timeline,Yb:p&&e3(p),Zd:f,mimeType:d.L.mimeType,codecs:d.L.codecs,bandwidth:d.bandwidth,Ck:m}),b=y,w=+!!b.Zd;if(0==(w+=+!!b.timeline+ +!!b.gb)||(1!=w&&(b.Zd&&(b.timeline=null),b.Mf=null,b.gb=null),!b.Zd&&!b.Yb))throw new eJ(2,4,4002);var T=tH(t);if(y.Zd)return px(t,v),{endTime:-1,timeline:-1,Nc:function(){var e=ps(y.Zd,T.L.originalId,null,null,T.bandwidth||null,null);return e=tr(T.L.bb(),[e]),pb(T,n,v,e,0,null,y.bc)},timescale:y.timescale};if(y.gb)return r||"image"===t.ra.contentType||"text"===t.ra.contentType||(r=t.oa.start,c=t.wa.id,i=t.oa.duration,c=(c=null!=c&&o.get(c)||i)?r+c:1/0,t.presentationTimeline.Ug(y.gb),t.presentationTimeline.Ci(r,c)),{endTime:-1,timeline:-1,Nc:function(){return function(t,n,i,r,a,o,s,u){function l(i){var a=i-v,s=a*m,l=n.Mf,c=a*l;"BigInt"in e&&c>Number.MAX_SAFE_INTEGER&&(c=BigInt(a)*BigInt(l)),s+=p,l=Math.min(a=s+m,d());var h=[],f=n.Ck;if(f)for(var g=(l-s)/f,x={},k=0;k<f;x={Zi:void 0},k++){var I=s+g*k,E=I+g;x.Zi=k,(x=new aV(I,E,function(e){return function(){var t=ps(y,w,i,e.Zi,b,c);return tr(T(),[t],S())}}(x),0,null,r,A,p,d(),[],"",null,null,aG,o)).codecs=t.L.codecs,x.mimeType=t.L.mimeType,0==u?k>0&&x.rd():k%u!=0&&x.rd(),h.push(x)}return(s=new aV(s,l,function(){if(f)return[];var e=ps(y,w,i,null,b,c);return tr(T(),[e],S())},0,null,r,A,p,d(),h,"",null,null,aG,o,h.length>0)).codecs=t.L.codecs,s.mimeType=t.L.mimeType,s.bandwidth=t.bandwidth,s.j=a,s}function c(){var e=[Math.max(h.Fb(),p),Math.min(h.Ec(),d())].map(function(e){return e-p});return e=[Math.ceil(e[0]/m),Math.ceil(e[1]/m)-1],t.L.mb&&e[1]++,e.map(function(e){return e+v})}function d(){var e=null!=f&&a.get(f)||g;return e?p+e:1/0}var h=t.presentationTimeline,p=t.oa.start,f=t.wa.id,g=t.oa.duration,m=n.gb,v=n.oe,y=n.Yb,b=t.bandwidth||null,w=t.L.originalId,T=t.L.bb,S=t.Hb,A=p-n.bc,k=c(),I=new pE(i=t.pb?Math.max(k[0],k[1]-i+1):k[0],s=s||k[1],v,p,m,l);k=h.Ec()<d();var E=h.U();if(k||E){var C=Math.max(i,s+1);i=m,t.L.mb&&(i=.1),I.Nf(i,function(){var e=h.Fb();I.Va(e);var t=x(c());t.next(),t=t.next().value;for(var n=[];C<=t;){var i=l(C);n.push(i),C++}return e>d()&&!n.length?null:n})}return Promise.resolve(I)}(T,y,a,v,o,s,u,t.L.Ef)},timescale:y.timescale};var S=null;r=r=null,t.wa.id&&t.L.id&&(r=t.wa.id+","+t.L.id,r=i.get(r))&&(S=r.segmentIndex);var A=t.oa.start,k=t.oa.duration?A+t.oa.duration:1/0;
1if(S)pM(c=S,y,A,k,v,t.pb),c.Va(t.presentationTimeline.Fb());else{if(i=0,l=-1,null!=t.wa.id&&null!=t.L.id){var I=c.get(t.wa.id);if(I)l=I.timeline;else for(I=(c=x(c.values())).next();!I.done;I=c.next())if(I=I.value,Math.abs(y.bc-I.endTime)<=th&&I.fh.includes(t.L.id)){l=I.timeline;break}else I.timeline>=i&&(i=I.timeline+1)}-1==l&&(l=i),S=new pC(t.pb,y,t.L.originalId,t.bandwidth,t.L.bb,t.Hb,A,k,v,s,t.L.Ef,l)}return y.timeline&&"image"!==t.ra.contentType&&"text"!==t.ra.contentType&&t.presentationTimeline.Di(S.h?S.h.timeline:[],A),r&&t.pb&&(r.segmentIndex=S),r=(r=(r=y.timeline)&&r[r.length-1])?r.end+y.bc:-1,c=-1,S instanceof pC&&(c=S.Qe()),{endTime:r,timeline:c,Nc:function(){return S instanceof pC&&0==S.getNumReferences()&&pM(S,y,A,k,v,t.pb),Promise.resolve(S)},timescale:y.timescale}}function pI(e){return e.Jc}function pE(e,t,n,i,r,a){sy.call(this,Array(Math.max(0,t-e+1))),this.h=e,this.u=n,this.j=i,this.l=r,this.B=a}function pC(e,t,n,i,r,a,o,s,u,l,c,d){sy.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=i,this.G=r,this.J=a,this.j=o,this.l=s,this.u=u,this.B=l,this.I=c,this.K=d,pD(this)}function pM(e,t,n,i,r,a){if(function(e,t){if(e.u!==t){e.u=t,e=x(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&function e(t,n){t.ba=n,t=x(t.g);for(var i=t.next();!i.done;i=t.next())e(i.value,n)}(n,t)}}(e,r),e.D=a,e.h){if(e.h.Zc!==t.Zc)for(n=t.Zc-e.h.Zc,r=0;r<t.timeline.length;r++)a=t.timeline[r],a.Hd+=n,a.Gh+=n,a.start=(a.Hd+n)/t.timescale,a.end=(a.Gh+n)/t.timescale;if(e.h.Yb!==t.Yb&&(e.h.Yb=t.Yb),(n=e.h.timeline).length){var o=n[n.length-1];t=t.timeline.filter(function(e){return e.end>o.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,S(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;pD(e)}function pD(e){if(e.h&&!e.o){for(var t=[],n=x(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||i.end<=0||t.push(i);e.h.timeline=t,e.Va(e.j)}}function pR(e,t,n,i,r,a,o,s){return e=ps(e,t,n,a,i||null,r),tr(o(),[e],s()).map(function(e){return e.toString()})}function pL(e){this.o=null,this.B=e,this.H=new i9,this.i=[],this.h=null,this.m=[],this.C=null,this.G=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}function pP(e,t){var n,i,r,a,o;return P(function(s){var u,l,c,d;return 1==s.h?(n=ri(tr(e.i,[function(e,t){if(!e.m.length)return t;t=new ey(t);var n=e.C||e.m[0],i=Math.round(e.B.getBandwidthEstimate()),r=t.g;return"DASH"==e.u?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.u&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),eL(r),r.Qd&&ex(t,r),t.toString()}(e,t)]),e.o.retryParameters),i=e.B.networkingEngine.request(8,n),i7(e.H,i),s.m(2),s.g(i.promise,4)):2!=s.h?(1==(a=JSON.parse(eZ((r=s.i).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 n7(function(){pP(u,d)}),(c=l.TTL)&&(u.D=c),u.g.na(u.D),u.m=l["PATHWAY-PRIORITY"]||[],u.G=l["PATHWAY-CLONES"]||[]),s.o(0)):(o=s.l())&&7001==o.code?s.return():void(null!=e.g&&(e.g.stop(),e.g=null),e.g=new n7(function(){pP(e,t)}),e.g.na(e.D),s.j())})}function pN(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function pj(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=x(e.m),a=r.next(),o={};!a.done;o={wd:void 0},a=r.next())if(o.wd=a.value,a=t.get(o.wd))i.push({Zg:o.wd,location:a});else if(a=e.G.find(function(e){return function(t){return t.Ol==e.wd}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].mj?(ew(s=new ey(s),a["URI-REPLACEMENT"].mj),i.push({Zg:o.wd,location:s.toString()})):i.push({Zg:o.wd,location:s}))}for(r=Date.now(),a=(o=x(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=x(e.j.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new ey(t.location).Bb))return!1;return!0})).length&&(e.C=i[0].Zg),!(i=i.map(function(e){return e.location})).length&&e.h)for(o=(r=x(e.h.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.C=e.h,i.push(o));
1if(!i.length)for(r=(t=x(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:tr(e.i,i)}function pO(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.o=!1,this.m=new Set}function pU(e,t){var n=[],i=[],r=[],a=[];e=x(e);for(var o=e.next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map(function(e){return[p9(e),e]}));var u=new Map(s.videoStreams.map(function(e){return[p8(e),e]})),l=new Map(s.textStreams.map(function(e){return[p7(e),e]}));if(s=new Map(s.imageStreams.map(function(e){return[fe(e),e]})),t){var c=p2(tc);l.set(p7(c),c),c=p2("image"),s.set(fe(c),c)}n.push(o),i.push(u),r.push(l),a.push(s)}return{Ph:n,kj:i,ej:r,mi:a}}function p_(e){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,S,A,k,I,E,C,M;return P(function(D){switch(D.h){case 1:if(t=td,1==e.length)return D.return(e[0]);for(n=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Z}).map(function(e){return[p9(e),e]}))}),i=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.ua}).map(function(e){return[p8(e),e]}))}),r=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Pa}).map(function(e){return[p7(e),e]}))}),a=e.map(function(e){return new Map(e.filter(function(e){return e.type===t.Uf}).map(function(e){return[fe(e),e]}))}),s=(o=x(r)).next();!s.done;s=o.next())u=s.value,l=p1(t.Pa),u.set(p7(l),l);for(d=(c=x(a)).next();!d.done;d=c.next())h=d.value,p=p1(t.Uf),h.set(fe(p),p);return f=new pO,D.g(pB(f,[],n,0,pG,pq,0),2);case 2:return g=D.i,D.g(pB(f,[],i,0,pG,pq,0),3);case 3:return m=D.i,D.g(pB(f,[],r,0,pG,pq,0),4);case 4:return v=D.i,D.g(pB(f,[],a,0,pG,pq,0),5);case 5:if(y=D.i,b=0,m.length&&g.length)for(A=(S=x(g)).next();!A.done;A=S.next())for(k=A.value,E=(I=x(m)).next();!E.done;E=I.next())C=E.value,M=b++,C.variantIds.push(M),k.variantIds.push(M);else for(T=(w=x(m.concat(g))).next();!T.done;T=w.next())T.value.variantIds=[b++];return D.return(m.concat(g).concat(v).concat(y))}})}function pB(e,t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m,v,y,b,w,T;return P(function(S){switch(S.h){case 1:for(u=0,s=[];u<n.length;u++)u>=i?s.push(new Set(n[u].values())):s.push(new Set);c=(l=x(t)).next();case 2:var A,k,I,E,C,M,D;if(c.done){S.A(4);break}return d=c.value,S.g((A=e,k=d,I=n,E=i,C=a,M=s,D=o,P(function(e){return 1==e.h?(pz(A,I,k,D>0),k.matchedStreams?k.segmentIndex?e.g(pF(k,E+D),2):e.A(2):e.return(!1)):(pV(k,E,C,M,D),e.return(!0))})),5);case 5:if(!S.i)throw new eJ(2,4,4037);c=l.next(),S.A(2);break;case 4:for(p=(h=x(s)).next();!p.done;p=h.next())for(g=(f=x(p.value)).next();!g.done;g=f.next())(m=function(e,t,n,i,r,a,o){if(p6(n))return null;var s=r(n);return(pz(e,i,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return P(function(e){return s.segmentIndex?e.A(0):(s.segmentIndex=new sT,e.g(pF(s,0),0))})},s.closeSegmentIndex=function(){if(s.segmentIndex&&(s.segmentIndex.release(),s.segmentIndex=null),s.matchedStreams)for(var e=x(s.matchedStreams),n=e.next();!n.done;n=e.next()){if(i=(n=n.value).segmentIndex){e:{i=x(t);for(var i,r=i.next();!r.done;r=i.next())if((r=r.value)!==s&&r.segmentIndex&&r.matchedStreams&&r.matchedStreams.includes(n)){i=!0;break e}i=!1}i=!i}i&&(n.segmentIndex.release(),n.segmentIndex=null)}}),s.matchedStreams&&s.matchedStreams.length)?(pV(s,0,a,o,0),s):null}(e,t,g.value,n,r,a,s))&&t.push(m);for(y=(v=x(s)).next();!y.done;y=v.next())for(w=(b=x(y.value)).next(),T={};!w.done;T={wh:void 0},w=b.next())if(T.wh=w.value,!p6(T.wh)&&t.some(function(e){return function(t){return pX(e.wh,t)}}(T)))throw new eJ(2,4,4037);return S.return(t)}})}function pF(e,t){var n,i,r,a,o,s;return P(function(u){if(1==u.h){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 u.g(Promise.all(n),2)}if(e.segmentIndex instanceof sT)for(o=t;o<i.length;o++)(s=i[o]).segmentIndex&&e.segmentIndex.h.push(s.segmentIndex);u.j()})}function pV(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==id(e.language,o.language)&&(s=!1),s&&((s=i[t-r])&&s.delete(o),o.fullMimeTypes))for(s=(o=x(o.fullMimeTypes.values())
1).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function pH(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},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 pG(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 pK(e,t){function n(e,t){e||(e=[]),t=x(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=x(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=eV(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new eJ(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=x(t.closedCaptions)).next();!r.done;r=i.next()){var a=x(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=pH(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var t=new sT,n=x(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),pK(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),pK(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=pH(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var t=new sT,n=x(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),pK(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),pK(e.dependencyStream,t))}function pq(e,t){var n=e.roles;n||(n=[]);for(var i=x(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=x(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,S(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=x(t.closedCaptions)).next();!n.done;n=t.next())n=(i=x(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function pz(e,t,n,i){i=(void 0===i?0:i)?n.matchedStreams:[],t=x(t);for(var r=t.next();!r.done;r=t.next()){if(!(r=function(e,t,n){var i={audio:p9,video:p8,text:p7,image:fe}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a=({audio:function(e,t){return pX(e,t)},video:function(e,t){return pX(e,t)},text:pY,image:pJ})[n.type];for(var o={audio:p$,video:pQ,text:pZ,image:p0}[n.type],s=x(t.values()),u=s.next();!u.done;u=s.next())a(n,u=u.value)&&n.fastSwitching==u.fastSwitching&&(!r||o(n,r,u))&&(r=u)}return e.o&&!p6(r)&&t.delete(i(r)),r}(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function pW(e,t){return e.mimeType==t.mimeType&&fn(e.codecs)===fn(t.codecs)}function pX(e,t){return!e.drmInfos||!!eF(e.drmInfos,t.drmInfos)}function pY(e,t){return!t.language||e.forced===t.forced&&0!=id(e.language,t.language)}function pJ(){return!0}function p$(e,t,n){var i=p3(e,t,n);if(i===fi)return!0;if(i===fa)return!1;i=id(e.language,t.language);var r=id(e.language,n.language);if(r>i)return!0;
1if(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=p4(e.channelsCount,t.channelsCount,n.channelsCount))==fi||i!=fa&&((i=p4(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==fi||i!=fa&&!!e.bandwidth&&p5(e.bandwidth,t.bandwidth,n.bandwidth)==fi))}function pQ(e,t,n){var i=p3(e,t,n);if(i===fi)return!0;if(i===fa)return!1;if((i=p4(e.width*e.height,t.width*t.height,n.width*n.height))==fi)return!0;if(i==fa)return!1;if(e.frameRate){if((i=p4(e.frameRate,t.frameRate,n.frameRate))==fi)return!0;if(i==fa)return!1}return!!e.bandwidth&&p5(e.bandwidth,t.bandwidth,n.bandwidth)==fi}function pZ(e,t,n){var i=id(e.language,t.language),r=id(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(i=t.kind==e.kind,(r=n.kind==e.kind)&&!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 p0(e,t,n){return p4(e.width*e.height,t.width*t.height,n.width*n.height)==fi}function p1(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 p2(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sy([]),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 p4(e,t,n){if(t==e&&e!=n)return fa;if(n==e&&e!=t)return fi;if(t>e){if(n<=e||n-e<t-e)return fi;if(n-e>t-e)return fa}else{if(n>e)return fa;if(e-n<e-t)return fi;if(e-n>e-t)return fa}return fr}function p3(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?fa:!i&&r?fi:(t=pW(e,t),e=pW(e,n),t&&!e?fa:!t&&e?fi:fr)}function p5(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?fi:t<e?fa:fr}function p6(e){switch(e.type){case tc:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function p8(e){return ft([e.fastSwitching,e.width,e.frameRate,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 p9(e){return ft([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function p7(e){return ft([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function fe(e){return ft([e.width,e.codecs,e.mimeType])}function ft(e){return JSON.stringify(e)}function fn(e){if(!fo.has(e)){var t=nY(e);fo.set(e,t)}return fo.get(e)}w(pE,sy),(p=pE.prototype).find=function(e){var t=this.g.length-1;if(t<0)return null;var n=this.get(this.i);if(!n)return null;if(e<n.startTime)return this.i;if((n=Math.floor((e-this.j)/this.l)+this.u-this.h)<this.i)return null;var i=this.get(n);return i?(t=(t=n-this.i<t?this.get(n+1):null)?t.startTime:i.endTime,e>=i.startTime&&e<t?n:null):null},p.get=function(e){var t=e-this.i;if(t<0||t>=this.g.length)return null;var n=this.g[t];return n||(n=this.B(this.h+e),this.g[t]=n),n},p.Cb=function(){return this.get(this.i)},p.qb=function(e){for(var t=0;t<this.g.length;t++){var n=this.get(t+this.i);n&&e(n)}},p.Va=function(e){if(!this.o){var t=this.g.length-1;if(!(t<0)){var n=this.get(this.i);!n||n.endTime>e||(e=(t=this.get(this.i+t))&&t.endTime<=e?this.g.length:Math.max(0,Math.min(this.g.length,Math.floor((e-this.j)/this.l+this.u-1)-(this.h+this.i)+1)))>0&&(this.i+=e,this.g=this.g.slice(e))}}},w(pC,sy),(p=pC.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},p.release=function(){sy.prototype.release.call(this),this.h=null},p.Va=function(e){if(this.h){var t=this.h.timeline;if(t){for(var n=0;n<t.length&&t[n].end+this.j<=e;)n++;n>0&&(this.h.timeline=t.slice(n),this.g.length>=n&&(this.g=this.g.slice(n)),this.i+=n,0===this.getNumReferences()&&this.release()
1)}}},p.find=function(e){var t=this;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 n=this.h.timeline;if(e<this.j||e>=this.l)return null;var i=n.length-1,r=et(n,function(n){return n.start+t.j<=e})-1;if(r<0)return null;var a=n[r],o=a.start+this.j;return n=r<i?n[r+1].start+this.j:this.l===1/0?a.end+this.j:this.l,e>=o&&e<n?r+this.i:null},p.get=function(e){var t=this;if((e-=this.i)<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=(n=this.h.timeline[e]).Vk,r=n.Hd+this.h.Zc,a=this.j-this.h.bc,o=this.j+n.end,s=o;e===this.getNumReferences()-1&&this.l!==1/0&&(s=this.D&&Math.abs(s-this.l)>.1?Math.min(s,this.l):this.l);var u=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],h=!1;if(n.sc&&this.h&&this.h.Yb&&(h=this.h.Yb.includes("$SubNumber$")),h){h=(n.end-n.start)/n.sc;for(var p={},f=0;f<n.sc;p={Pf:void 0,$i:void 0},f++){var g=n.start+h*f,m=g+h;p.$i=f,p.Pf=null,(p=new aV(this.j+g,this.j+m,function(e){return function(){return t.h?(null==e.Pf&&(e.Pf=pR(t.h.Yb,t.H,i,t.C,r,e.$i,t.G,t.J)),e.Pf):[]}}(p),0,null,this.u,a,this.j,this.l,[],"",null,null,aG,this.B)).codecs=u,p.mimeType=l,p.bandwidth=c,0==this.I?f>0&&p.rd():f%this.I!=0&&p.rd(),d.push(p)}}(n=new aV(this.j+n.start,s,function(){return d.length>0||!t.h?[]:pR(t.h.Yb,t.H,i,t.C,r,null,t.G,t.J)},0,null,this.u,a,this.j,this.l,d,"",null,null,aG,this.B,d.length>0)).codecs=u,n.mimeType=l,n.j=o,n.bandwidth=c,this.g[e]=n}return n},p.qb=function(e){pD(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},p.Qe=function(){return this.K},pL.prototype.configure=function(e){this.o=e},pL.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.G=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.H.destroy()},pL.prototype.setManifestType=function(e){this.u=e},pL.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(p=pO.prototype).release=function(){for(var e=x(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.o=!1,this.m.clear()},p.dk=function(){return this.l},p.Ig=function(){return this.j.slice()},p.Kj=function(){return this.i},p.Wh=function(e,t){if(e){if("audio"==e.type)for(var n=x(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=x(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==tc)for(i=(n=x(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=x(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)}},p.gg=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,S,A,k,I,E,C,M,D,R,L,N,j,O=this;return P(function(P){if(1==P.h){if(i=td,!t&&1==e.length)return a=(r=pU(e,!1)).Ph,o=r.kj,s=r.ej,u=r.mi,O.h=Array.from(a[0].values()),O.g=Array.from(o[0].values()),O.j=Array.from(s[0].values()),O.i=Array.from(u[0].values()),P.A(2);for(d=0,l=n?O.m.size:0,c=-1;d<e.length;d++)h=e[d],O.m.has(h.id)||(O.m.add(h.id),-1==c&&(c=d));return -1==c?P.return():(f=(p=pU(e,!0)).Ph,g=p.kj,m=p.ej,v=p.mi,P.g(Promise.all([pB(O,O.h,f,c,pH,pK,l),pB(O,O.g,g,c,pH,pK,l),pB(O,O.j,m,c,pH,pK,l),pB(O,O.i,v,c,pH,pK,l)]),2))}if(y=0,b=[],O.g.length&&O.h.length)for(E=(I=x(O.h)).next();!E.done;E=I.next())for(C=E.value,D=(M=x(O.g)).next();!D.done;D=M.next())R=D.value,L=eV(C.drmInfos,R.drmInfos),C.drmInfos.length&&R.drmInfos.length&&!L.length||(N=(C.bandwidth||0)+(R.bandwidth||0),C.dependencyStream&&(N+=C.dependencyStream.bandwidth||0),R.dependencyStream&&(N+=R.dependencyStream.bandwidth||0),j=y++,b.push({id:j,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C,video:R,bandwidth:N,drmInfos:L,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(T=(w=x(O.g.length?O.g:O.h)).next();!T.done;T=w.next())S=T.value,A=y++,k=S.bandwidth||0,S.dependencyStream&&(k+=S.dependencyStream.bandwidth||0),b.pu
1sh({id:A,language:S.language,disabledUntilTime:0,primary:S.primary,audio:S.type==i.Z?S:null,video:S.type==i.ua?S:null,bandwidth:k,drmInfos:S.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});O.l=b,P.j()})},p.Ui=function(e){this.o=e},H("shaka.util.PeriodCombiner",pO),pO.prototype.setUseStreamOnce=pO.prototype.Ui,pO.prototype.combinePeriods=pO.prototype.gg,pO.prototype.deleteStream=pO.prototype.Wh,pO.prototype.getImageStreams=pO.prototype.Kj,pO.prototype.getTextStreams=pO.prototype.Ig,pO.prototype.getVariants=pO.prototype.dk;var fi=1,fr=0,fa=-1,fo=new Map;function fs(e,t){try{var n=e1(e),i=t,r=new DOMParser,a=fu.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 fu=new es(function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}});function fl(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Ka=1,this.I=[],this.l={rf:"",type:"",profiles:[],nc:null,mb:0,bb:null,je:0},this.u=new Map,this.C=new Map,this.H=new Map,this.o=new Map,this.G=new Map,this.Ca=new Map,this.m=new pO,this.M=0,this.Ha=new G(5),this.N=new n7(function(){if(e.K&&!e.g.continueLoadingWhenPaused&&(e.J.Oa(e.K,"timeupdate"),e.K.paused))return void e.J.Ba(e.K,"timeupdate",function(){return fb(e)});fb(e)}),this.T=new i9,this.S=null,this.D=[],this.ia=1/0,this.ya=!1,this.i=null,this.O=0,this.X=!1,this.J=new er,this.K=null,this.P=!1,this.aa="",this.va=function(){return!1},this.$=[],this.qa=new Set,this.za=new pi}function fc(e){var t,n,i,r,a,o,s,u,l;return P(function(c){if(1==c.h)return t=4,n="MPD",i=function(e){var t=e.l.je;if(!e.l.rf||!t||!e.I.length)return[];var n=Date.now()/1e3,i=e.I.filter(function(e){return!(e=ne(e.attributes.ttl))||t+e>n}).map(t$).filter(ir);return i.length?tr(e.B,i):[]}(e),r=e.B,i.length?(r=i,n="Patch",t=6):e.B.length>1&&e.i&&(a=pj(e.i,"Location",!0)).length&&(r=a),o=ri(r,e.g.retryParameters),s=Date.now(),c.g(fk(e,o,0,{type:t}),2);if(3!=c.h){var d,h,p,f,g,m,v,y,b,w,T,A;return(u=c.i,e.j)?(u.uri&&u.uri!=u.originalUri&&!e.B.includes(u.uri)&&e.B.unshift(u.uri),e.aa=new ey(u.uri).g.toString(),c.g((d=e,h=u.data,p=u.uri,f=n,P(function(e){if(1==e.h){var t,n,i,r,a,o,s,u,l,c,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F;if(g=h,(m=d.g.dash.manifestPreprocessor)!=uE){if(ep("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(v=fs(g,f)))throw new eJ(2,4,4001,p);m(v),g=e2(v.outerHTML)}if(!(y=tK(g,f)))throw new eJ(2,4,4001,p);return((b=d.g.dash.manifestPreprocessorTXml)!=uC&&b(y),"Patch"===f)?e.return((t=d,n=y,P(function(e){if(1==e.h){if(i=n.attributes.mpdId,r=t1(n,"originalPublishTime",t5),!i||i!==t.l.rf||r!==t.l.je)throw t.I=[],new eJ(1,4,4052);for(a=[],o=[],s=new Set,l=(u=x(tX(n))).next();!l.done;l=u.next())if(I=(k=nr((c=l.value).attributes.sel||""))[k.length-1],E=t$(c)||"","MPD"===I.name)if("mediaPresentationDuration"===I.zc){var d=t6(t$(c)||"");if(null!=d){t.l.nc=d;for(var h=x(t.u.values()),p=h.next();!p.done;p=h.next())p.value.nc=d}}else if("type"===I.zc){for(t.h.presentationTimeline.Vc("static"==E),t.l.type=E,h=(d=x(t.u.values())).next();!h.done;h=d.next())h.value.pb="dynamic"==E;"static"==E&&(t.M=-1)}else"publishTime"===I.zc?t.l.je=t5(E)||0:null===I.zc&&"add"===c.tagName&&o.push(c);else if("PatchLocation"===I.name)na(t.I,c);else if("Period"===I.name)"add"===c.tagName?o.push(c):"remove"===c.tagName&&I.id&&function(e,t){e.h.periodCount--;for(var n=x(e.u.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(pd(e.u.get(i),pI,"SegmentTimeline").children=[],ff(e,i),e.u.delete(i));e.D=e.D.filter(function(e){return e!==t}),e.H.delete(t)}(t,I.id);else if("SegmentTemplate"===I.name){if((d=(h=nr(c.attributes.sel||""))[h.length-1]).zc){h=fp(t,h),p=t$(c)||"";for(var f=x(h),g=f.next();!g.done;g=f.next())ns((g=t.u.get(g.value)).L.Jc,c.tagName,d.zc,p);d=h}else d=[];for(M=(C=x(d)).next();!M.done;M=C.next())D=M.value,s.add(D)}else if("SegmentTimeline"===I.name||"S"===I.name){for(p=(h=x(d=fp(t,d=nr(c.attributes.sel||"")))).next();!p.done;p=h.next())na(f=tY(p=pd(p=t.u.get(p.value),pI,"SegmentTimeline"),"S"),c),p.children=f;for(L=(R=x(d)).next();!L.done;L=R.next())N=L.value,s.add(N)}for(O=(j=x(s)).next();!O.done;O=j.next())ff(t,O.value);for(_=(U=x(o)).next();!_.done;_=U.next())B=_.value,a.push.apply(a,S(fg(t,{pb:"dynamic"==t.l.type,presentationTimeline:t.h.presentationTimeline,wa:null,oa:null,ra:null,L:null,bandwidth:0,Kg:!1,mb:t.l.mb,profiles:t.l.profiles,nc:t.l.nc,roles:null,Hb:fI},t.l.bb,B,!0).periods));return a.length?(t.h.periodCount+=a.length,t.h.gapCount=t.O,e.g(fh(t,a,!0),2)):e.A(2)}"static"==t.l.type&&(F=t.l.nc,t.h.presentationTimeline.wb(F||1/0)),e.j()}))):d.g.dash.disableXlinkProcessing?e.return(fd(d,y,p)):(w=d.g.dash.xlinkFailGracefully,T=function e(t,n,i,r,a,o){if(o=void 0===o?0:o,t2(t,"http://www.w3.org/1999/xlink","href")){var s=function(t,n,i,r,a,o){for(var s=t2(t,"http://www.w3.org/1999/xlink","href"),u=t2(t,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=x(Object.keys(t.attributes)),c=l.next();!c.done;c=l.next()){var d=(c=c.value).split(":"),h=tz("http://www.w3.org/1999/xlink");d[0]==h&&delete t.attributes[c]}if(o>=5)return iZ(new eJ(2,4,4028));if("onLoad"!=u)return iZ(new eJ(2,4,4027));var p=tr([r],[s]);return a.request(0,ri(p,n)).Ya(function(r){if(!(r=tK(r.data,t.tagName)))return iZ(new eJ(2,4,4001,s));for(t.children=[];r.children.length;){var u=r.children.shift();t.children.push(u)}u=x(Object.keys(r.attributes));for(var l=u.next();!l.done;l=u.next())l=l.value,t.attributes[l]=r.attributes[l];return e(t,n,i,p[0],a,o+1)})}
1(t,n,i,r,a,o);return i&&(s=s.Ya(void 0,function(){return e(t,n,i,r,a,o)})),s}s=[];for(var u=x(tX(t)),l=u.next(),c={};!l.done;c={Od:void 0},l=u.next())c.Od=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==t2(c.Od,"http://www.w3.org/1999/xlink","href")?t.children=t.children.filter(function(e){return function(t){return t!==e.Od}}(c)):"SegmentTimeline"!=c.Od.tagName&&s.push(e(c.Od,n,i,r,a,o));return i4(s).Ya(function(){return t})}(y,d.g.retryParameters,w,p,d.j.networkingEngine),i7(d.T,T),e.g(T.promise,2))}return A=e.i,e.return(fd(d,A,p))})),3)):c.return(0)}return l=(Date.now()-s)/1e3,e.Ha.sample(1,l),e.qa.clear(),c.return(l)})}function fd(e,t,n){var i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V,H,G,K,q,z,W,Y,J,$,Q,Z,ee,et,en,ei,er;return P(function(ea){switch(ea.h){case 1:for(e.i&&e.i.l.clear(),i=[n],r=[],a=new Map,s=(o=x(tY(t,"Location"))).next();!s.done;s=o.next())l=(u=s.value).attributes.serviceLocation,(c=t$(u))&&(d=tr(i,[c])[0],l&&(e.i?pN(e.i,"Location",l,d):a.set(l,d)),r.push(d));if(e.i?(h=pj(e.i,"Location",!0)).length>0&&(i=e.B=h):r.length&&(i=e.B=r),e.l.rf=t.attributes.id||"",e.l.je=t1(t,"publishTime",t5)||0,e.I=tY(t,"PatchLocation"),p=Promise.resolve(),(f=tZ(t,"ContentSteering"))&&e.j)for(g=f.attributes.defaultServiceLocation,e.i?(e.i.i=i,e.i.h=g):(e.i=new pL(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=i,e.i.h=g,(m=t$(f))&&(t1(f,"queryBeforeStart",nn,!1)?p=pP(e.i,m):pP(e.i,m))),y=(v=x(a.keys())).next();!y.done;y=v.next())b=y.value,w=a.get(b),pN(e.i,"Location",b,w);if(T=tY(t,"BaseURL"),A=!1,e.i)for(I=(k=x(T)).next();!I.done;I=k.next())C=(E=I.value).attributes.serviceLocation,M=t$(E),C&&M&&(pN(e.i,"BaseURL",C,M),A=!0);if(e.$.splice(0),A&&e.i||(D=T.map(t$),e.$.push.apply(e.$,S(tr(i,D)))),R=e.i,L=e.$,N=fE.call(fl,R,A,L),e.l.bb=N,j=0,T&&T.length&&(j=t1(T[0],"availabilityTimeOffset",nt)||0),e.l.mb=j,e.M=t1(t,"minimumUpdatePeriod",t6,-1),O=t1(t,"availabilityStartTime",t5),U=t1(t,"timeShiftBufferDepth",t6),_=e.g.dash.ignoreSuggestedPresentationDelay,B=null,_||(B=t1(t,"suggestedPresentationDelay",t6)),F=e.g.dash.ignoreMaxSegmentDuration,V=null,F||(V=t1(t,"maxSegmentDuration",t6)),H=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.P=e.h.presentationTimeline.U()&&"static"==H),e.l.type=H,e.h)for(K=(G=e.h.presentationTimeline).Fb(),z=(q=x(e.o.values())).next();!z.done;z=q.next())(W=z.value).segmentIndex&&W.segmentIndex.Va(K);else Y=e.g.dash.ignoreMinBufferTime,J=0,Y||(J=t1(t,"minBufferTime",t6)||0),G=new o3(O,null!=B?Math.min(B,U||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(1.5*J,U||1/0),e.g.dash.autoCorrectDrift);return G.Vc("static"==H),G.U()&&!isNaN(e.g.availabilityWindowOverride)&&(U=e.g.availabilityWindowOverride),null==U&&(U=1/0),G.Hf(U),$=t.attributes.profiles||"",e.l.profiles=$.split(","),Q={pb:"static"!=H,presentationTimeline:G,wa:null,oa:null,ra:null,L:null,bandwidth:0,Kg:!1,mb:j,nc:null,profiles:$.split(","),roles:null,Hb:fI},ea.g(p,2);case 2:if(e.O=0,ee=(Z=fg(e,Q,N,t,!1)).duration,et=Z.periods,("static"!=H||e.P)&&Z.Yh||G.wb(ee||1/0),e.X&&e.ya&&G.Qi(e.ia),G.Ug(V||1),e.X&&e.ya&&(en=null!=B?B:e.g.defaultPresentationDelay,G.qh(en)),!e.h)return ea.g(e.m.gg(et,Q.pb),6);return e.h.periodCount=et.length,e.h.gapCount=e.O,ea.g(fh(e,et,!1),4);case 6:var eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev=G,ey=e.m.l,eb=e.m.Ig(),ew=e.m.i,eT=e.g.dash.sequenceMode,ex=tZ(t,"ServiceDescription");if(ex){var eS=tZ(ex,"Latency");if(ex=tZ(ex,"PlaybackRate"),eS||ex){var eA={};eS&&("target"in eS.attributes&&(eA.targetLatency=parseInt(eS.attributes.target,10)/1e3),"max"in eS.attributes&&(eA.maxLatency=parseInt(eS.attributes.max,10)/1e3),"min"in eS.attributes&&(eA.minLatency=parseInt(eS.attributes.min,10)/1e3)),ex&&("max"in ex.attributes&&(eA.maxPlaybackRate=parseFloat(ex.attributes.max)),"min"in ex.attributes&&(eA.minPlaybackRate=parseFloat(ex.attributes.min))),eS=eA}else eS=null}else eS=null;e:{if((ex=tY(t,"SupplementalProperty")).length){for(eA=(ex=x(ex)).next();!eA.done;eA=ex.next())if("urn:mpeg:dash:chaining:2016"==(eA=eA.value).attributes.schemeIdUri){ex=eA.attributes.value;break e}}ex=null}if(e.h={presentationTimeline:ev,variants:ey,textStreams:eb,imageStreams:ew,offlineSessionIds:[],sequenceMode:eT,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:eS,nextUrl:ex,peri
1odCount:et.length,gapCount:e.O,isLowLatency:e.X,startTime:null},!G.ij()){ea.A(7);break}return ei=tY(t,"UTCTiming"),ea.g((eo=e,es=N,eu=ei,P(function(e){switch(e.h){case 1:el=eu.map(function(e){return{scheme:e.attributes.schemeIdUri,value:e.attributes.value}}),ec=eo.g.dash.clockSyncUri,!el.length&&ec&&el.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:ec}),eh=(ed=x(el)).next();case 2:if(eh.done){e.A(4);break}switch(ep=eh.value,e.m(5),ef=ep.scheme,eg=ep.value,ef){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return e.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return e.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return em=Date.parse(eg),e.return(isNaN(em)?0:em-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",ef)}e.A(9);break;case 7:return e.g(fx(eo,es,eg,"HEAD"),10);case 10:case 11:return e.return(e.i);case 8:return e.g(fx(eo,es,eg,"GET"),11);case 9:e.o(3);break;case 5:e.l();case 3:eh=ed.next(),e.A(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(er=ea.i,!e.j)return ea.return();G.Ri(er);case 7:G.mf(),e.m&&!e.h.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),function(e){var t=Array.from(e.G.keys()).filter(function(t){return!e.D.includes(t)});t=x(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=x(e.G.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.Wh(o,n),e.o.delete(a)))}i&&e.G.delete(n)}}(e),function(e,t){t=new Set(t.map(function(e){return e.id}));for(var n=x(e.C.keys()),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.C.delete(i)}(e,et),ea.j()}})}function fh(e,t,n){var i;return P(function(r){if(1==r.h)return r.g(e.m.gg(t,!0,n),2);e.h.variants=e.m.l,(i=e.m.Ig()).length>0&&(e.h.textStreams=i),e.h.imageStreams=e.m.i,e.j.filter(e.h),r.j()})}function fp(e,t){var n="",i="",r=-1,a="";t=x(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);else if(i)for(e=(r=x(e.u.values())).next();!e.done;e=r.next())(e=e.value).wa.id===n&&e.ra.id===i&&e.L.id&&t.push(n+","+e.L.id);else if(r>-1)for(e=(i=x(e.u.values())).next();!e.done;e=i.next())(e=e.value).wa.id===n&&e.ra.position===r&&e.L.id&&t.push(n+","+e.L.id);return t}function ff(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Va(e.h.presentationTimeline.Fb());try{var r=pk(n,function(t,n,i,r){return fS(e,t,n,i,r)},e.o,!0,e.g.dash.initialSegmentLimit,e.Ca,n.L.aesKey,null,!0,e.C);i.createSegmentIndex=function(){return P(function(e){if(1==e.h)return i.segmentIndex?e.A(0):e.g(r.Nc(),3);i.segmentIndex=e.i,e.j()})}}catch(e){if((t=n.L.contentType)!=tc&&"application"!=t&&"image"!=t||4002!=e.code)throw e}}function fg(e,t,n,i,r){var a=t.nc;a||(a=t1(i,"mediaPresentationDuration",t6),e.l.nc=a);var o=0;e.h&&e.h.presentationTimeline&&e.P&&(o=e.h.presentationTimeline.Ub());var s=[],u=o;i=tY(i,"Period");var l=t.pb;l||e.H.clear();for(var c=0,d=l&&!r?new Set(e.D.slice(1,-1)):null,h=0;h<i.length;h++){var p=i[h],f=i[h+1],g=t1(p,"start",t6,null),m=p.attributes.id,v=t1(p,"duration",t6);0==h&&e.P&&(c=o-(g||0)),null==g?g=u:e.P&&(g+=c);var y=null;if(f){var b=t1(f,"start",t6);null!=b&&(y=b-g+o)}else null!=a&&(y=a-g+o);if(b=th,y&&v&&Math.abs(y-v)>b&&y>v&&e.O++,null==y&&(y=v),!(null!==e.S&&null!=m&&null!==g&&g<e.S)||e.D.includes(m)||h+1==i.length){if(null!==g&&(null===e.S||g>e.S)&&(e.S=g),u={start:g,duration:y,node:p,gf:null==y||!f},p=null,f=h>0&&h<i.length-1,l&&d&&f&&!r&&(null!=m||(m="__shaka_period_"+g),d.has(m)&&(m=e.H.get(m))&&(p=m)),p||(p=function(e,t,n,i){t.wa=fT(e,i.node,null,n),t.oa=i,t.wa.mb=t.mb,t.wa.id||(t.wa.id="__shaka_period_"+i.start);var r=tY(i.node,"EventStream");n=t.presentationTimeline.Fb(),r=x(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=t1(i,"timescale",ne)||1,u=t1(i,"presentationTimeOffset",ne)||0;i=x(tY(i,"Event"));for(var l=i.next();!l.done;l=i.next()){var c=t1(l=l.value,"presentationTime",ne)||0,d=t1(l,"duration",ne)||0;d=(c=Math.max((c-u)/s+t,t))+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(l={schemeIdUri:a,value:o,startTime:c,endTime:d,id:l.attributes.id||"",timescale:s,eventElement:function e(t){var n="",i=t.tagName.split(":");for(var r in i.length>0&&(n=i[0],n=nc.has(n)?nc.get(n):""),n=document.createElementNS(n,t.tagName),t.attributes)n.setAttribute(r,t.attributes[r]);for(r=(t=x(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}(l),eventNode:nu(l)},e.j.onTimelineRegionAdded(l))}}
1(e,i.start,i.duration,a.value,n);for(r=(n=x(n=tY(i.node,"SupplementalProperty"))).next();!r.done;r=n.next())"urn:mpeg:dash:urlparam:2014"==(r=r.value).attributes.schemeIdUri&&(r=fy(e,r))&&(t.Hb=r);if(n=tY(i.node,"AdaptationSet").map(function(n,i){return fv(e,t,i,n)}).filter(ir),t.pb){r=[],a=x(n);for(var o=a.next();!o.done;o=a.next()){o=x(o.value.Rk);for(var s=o.next();!s.done;s=o.next())r.push(s.value)}if(r.length!=new Set(r).size)throw new eJ(2,4,4018)}for(r=new Map,o=(a=x(n)).next();!o.done;o=a.next())for(s=(o=x(o.value.yj)).next();!s.done;s=o.next()){var u=x(s.value);s=u.next().value,u=u.next().value,r.set(s,u)}if(r.size)for(a=null,s=(o=x(n)).next();!s.done;s=o.next()){s=s.value,u=[];for(var l=x(s.streams),c=l.next(),d={};!c.done;d={xh:void 0},c=l.next())if(d.xh=c.value,r.has(d.xh.originalId)){a||(a=tY(i.node,"AdaptationSet").map(function(n,i){return fv(e,t,i,n)}).filter(ir)),c=x(a);for(var h=c.next();!h.done;h=c.next())(h=h.value.streams.find(function(e){return function(t){return t.originalId==e.xh.originalId}}
1(d)))&&(h.dependencyStream=r.get(h.originalId),h.originalId+=h.dependencyStream.originalId,u.push(h))}u.length&&s.streams.push.apply(s.streams,S(u))}if(n=(i=x(function(e,t){var n=[],i=[];e=x(e);for(var r=e.next();!r.done;r=e.next())t(r=r.value)?n.push(r):i.push(r);return[n,i]}(n,function(e){return!!e.gj}))).next().value,i=i.next().value,!e.g.disableIFrames){for(r=(n=x(n)).next();!r.done;r=n.next())for(a=(r=r.value).gj.split(" "),s=(o=x(i)).next();!s.done;s=o.next())if(s=s.value,a.includes(s.id))for(u=(s=x(s.streams)).next();!u.done;u=s.next())iO(u.value,r.streams)}if(n=fm(e.g.disableAudio,i,"audio"),r=fm(e.g.disableVideo,i,"video"),a=fm(e.g.disableText,i,tc),i=fm(e.g.disableThumbnails,i,"image"),0===r.length&&0===n.length)throw new eJ(2,4,4004);return{id:t.wa.id,audioStreams:n,videoStreams:r,textStreams:a,imageStreams:i}}(e,t,n,u),l&&p.id&&e.H.set(p.id,p)),s.push(p),p.id&&y&&e.Ca.set(p.id,y),null==y){u=null;break}u=g+y}}if(l&&!r&&function(e,t){t=new Set(t.map(function(e){return e.id}));for(var n=x(Array.from(e.H.keys())),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.H.delete(i)}(e,s),r)for(n=(t=x(s)).next();!n.done;n=t.next())n=n.value.id,e.D.includes(n)||e.D.push(n);else e.D=s.map(function(e){return e.id});return null!=a?{periods:s,duration:a+o,Yh:!1}:{periods:s,duration:u,Yh:!0}}function fm(e,t,n){return e||!t.length?[]:t.reduce(function(e,t){return t.contentType!=n||e.push.apply(e,S(t.streams)),e},[])}function fv(t,n,i,r){function a(e){var i=e.attributes["dvb:fontFamily"];e=e.attributes["dvb:url"],i&&e&&(e=tr(n.ra.bb(),[e],n.Hb()),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.ra=fT(t,r,n.wa,null),n.ra.position=i;var u=!1,l=(i=tY(r,"Role")).map(function(e){return e.attributes.value}).filter(ir),c=void 0,d=n.ra.contentType==tc;d&&(c="subtitle"),i=x(i);for(var h=i.next();!h.done;h=i.next()){var p=(h=h.value).attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(h=h.attributes.value){case"main":u=!0;break;case"caption":case"subtitle":c=h}}var f=tY(r,"EssentialProperty");i=null;var g=!1;h=null,p=!1,f=x(f);for(var m=f.next();!m.done;m=f.next()){var v=(m=m.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)i=m.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==v)var y=s(parseInt(m.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var b=o(parseInt(m.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&t.g.dash.enableFastSwitching?g=!0:"urn:dvb:dash:fontdownload:2014"==v?a(m):"urn:mpeg:dash:urlparam:2014"==v&&(h=fy(t,m))||(p=!0))}if(p)return null;var w=null;for(f=(p=x(p=tY(r,"SupplementalProperty"))).next();!f.done;f=p.next())"http://dashif.org/guidelines/last-segment-number"==(m=(f=f.value).attributes.schemeIdUri)?w=parseInt(f.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==m?y=s(parseInt(f.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==m?b=o(parseInt(f.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==m?a(f):"urn:mpeg:dash:urlparam:2014"==m&&(h=fy(t,f));h&&(n.Hb=h),h=tY(r,"Accessibility");var T,A=new Map;for(p=(h=x(h)).next();!p.done;p=h.next())if(p=(f=p.value).attributes.schemeIdUri,f=f.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||t.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=p||t.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=f&&(l.push(f),"captions"==f&&(c="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==f?T="visually impaired":"2"==f?T="hard of hearing":"9"==f&&(T="spoken subtitles"));else if(p=1,null!=f)for(m=(f=x(f.split(";"))).next();!m.done;m=f.next()){v=m.value;var k=m=void 0;
1v.includes("=")?(m="svc"+(v=v.split("="))[0],k=v[1].split(",")[0].split(":").pop()):(m="svc"+p,p++,k=v),A.set(m,ic(k))}else A.set("svc1","und");else if(p=1,null!=f)for(v=(m=x(f=f.split(";"))).next();!v.done;v=m.next()){k=v.value;var I=v=void 0;k.includes("=")?(v=(k=k.split("="))[0].startsWith("CC")?k[0]:"CC"+k[0],I=k[1]||"und"):(v="CC"+p,2==f.length?p+=2:p++,I=k),A.set(v,ic(I))}else A.set("CC1","und");h=tY(r,"ContentProtection");var E=pr(t.za,h,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI);n.ra.encrypted=h.length>0;var C=ic(n.ra.language||"und"),M=n.ra.label,D=new Map;if(r=tY(r,"Representation"),!t.g.ignoreSupplementalCodecs){for(h=[],f=(p=x(r)).next();!f.done;f=p.next())(f=t2(m=f.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((m=tV(m)).attributes.codecs=f.split(" ").join(","),m.attributes.id&&(m.attributes.supplementalId=m.attributes.id+"_supplementalCodecs"),h.push(m));r.push.apply(r,S(h))}if(0==(h=r.map(function(i){var r=function(t,n,i,r,a,o,s,u,l,c,d,h){n.L=fT(t,c,n.ra,null);var p,f,g=n.L.id;if(t.ia=Math.min(t.ia,n.L.mb),t.X=t.ia>0,!(0==(E=+!!(I=n.L).Ed+(+!!I.wc+ +!!I.Jc))?I.contentType==tc||"application"==I.contentType:(1!=E&&(I.Ed&&(I.wc=null),I.Jc=null),!0)))return null;var m=n.oa.start;n.bandwidth=t1(c,"bandwidth",t7)||0,n.roles=u;var v=tY(c,"SupplementalProperty"),y=tY(c,"EssentialProperty"),b=tY(c,"ContentProtection");c=null;var w=y.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri});w?c=fy(t,w):(w=v.find(function(e){return"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri}))&&(c=fy(t,w)),c&&(n.Hb=c),c=(w=n.L.contentType)==tc||"application"==w,w="image"==w,b.length&&(n.ra.encrypted=!0);try{var T=void 0;if(i.cg){var x=n.L.bb,S=n.Hb,A=tr(x(),[i.cg.tk],S()),k=ri(A,t.g.retryParameters);T={bitsKey:128,blockCipherMode:"CBC",iv:i.cg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,i,r;return P(function(a){if(1==a.h)return a.g(fk(t,k,6),2);if(3!=a.h){if(!(n=a.i).data||16!=n.data.byteLength)throw new eJ(2,4,4049);return i={name:"AES-CBC"},r=T,a.g(e.crypto.subtle.importKey("raw",n.data,i,!0,["decrypt"]),3)}r.cryptoKey=a.i,T.fetchKey=void 0,a.j()})}}}if(n.L.aesKey=T,x=function(e,n,i,r){return fS(t,e,n,i,r)},n.L.Ed)var I,E,C,M,D,R,L,N,j,O,U,_=(C=n,M=x,D=T,R=Number(pc(C,pw,"presentationTimeOffset"))||0,L=pc(C,pw,"timescale"),N=1,L&&(N=t7(L)||1),j=R/N||0,O=py(C,pw,D),function(e,t){if(px(e,t),!pT(e))throw new eJ(2,4,4002)}(C,O),U=tH(C),{endTime:-1,timeline:-1,Nc:function(){var e=pd(U,pw,"RepresentationIndex"),t=U.L.bb();return e&&(e=e3(e.attributes.sourceURL))&&(t=tr(t,[e],U.Hb())),e=pT(U),pb(U,M,O,t,e.start,e.end,j)},timescale:N});else if(n.L.wc)_=function(e,t,n){var i,r,a,o,s,u=py(e,pA,n),l=(a=[(r=i=e).L.wc,r.ra.wc,r.wa.wc].filter(ir).map(function(e){return tY(e,"SegmentURL")}).reduce(function(e,t){return e.length>0?e:t}).map(function(e){return e.attributes.indexRange&&!r.Kg&&(r.Kg=!0),{Ak:e3(e.attributes.media),start:(e=t1(e,"mediaRange",t8,{start:0,end:null})).start,end:e.end}}),o=(i=pu(i,pA)).oe,0==o&&(o=1),s=0,i.gb?s=i.gb*(o-1):i.timeline&&i.timeline.length>0&&(s=i.timeline[0].start),{gb:i.gb,startTime:s,oe:o,bc:i.bc,timescale:i.timescale,timeline:i.timeline,td:a});if(!l.gb&&!l.timeline&&l.td.length>1||!l.gb&&!e.oa.duration&&!l.timeline&&1==l.td.length||l.timeline&&0==l.timeline.length)throw new eJ(2,4,4002);var c=null,d=null;e.wa.id&&e.L.id&&(d=t.get(e.wa.id+","+e.L.id))&&(c=d.segmentIndex);var h=function(e,t,n,i,r,a,o,s,u,l){var c=i.td.length;i.timeline&&i.timeline.length!=i.td.length&&(c=Math.min(i.timeline.length,i.td.length));for(var d=e-i.bc,h=t?e+t:1/0,p=[],f=i.startTime,g={},m=0;m<c;g={Of:void 0,Df:void 0},m++){g.Df=i.td[m];var v=f;f=void 0,f=null!=i.gb?v+i.gb:i.timeline?i.timeline[m].end:v+t,g.Of=null,(g=new aV(e+v,e+f,function(e){return function(){return null==e.Of&&(e.Of=tr(n(),[e.Df.Ak],l())),e.Of}}(g),g.Df.start,g.Df.end,r,d,e,h,[],"",null,null,aG,a)).codecs=s,g.mimeType=o,g.bandwidth=u,p.push(g)}return p}(e.oa.start,e.oa.duration,e.L.bb,l,u,n,e.L.mimeType,e.L.codecs,e.bandwidth,e.Hb);return t=!c,c?c.ce(h,e.presentationTimeline.Fb()):c=new sy(h),e.presentationTimeline.fe(h),e.pb&&e.oa.gf||c.hd(e.oa.start,e.oa.duration?e.oa.start+e.oa.duration:1/0,t),d&&(d.segmentIndex=c),{endTime:-1,timeline:-1,Nc:function(){return c&&0!=c.getNumReferences()||c.pf(h),Promise.resolve(c)},timescale:l.timescale}}(n,t.o,T);else if(n.L.Jc)_=pk(n,x,t.o,!!t.h,t.g.dash.initialSegmentLimit,t.Ca,T,h,!1,t.C);else{var B=n.oa.duration||0,F=n.L.bb,V=n.L.mimeType,H=n.L.codecs;_={endTime:-1,timeline:-1,Nc:function(){var e=sb(m,B,F());return e.qb(function(e){e.mimeType=V,e.codecs=H}),Promise.resolve(e)},timescale:1}}}catch(e){if((c||w)&&4002==e.code)return null;throw e}if(h=new Set((h=function(e,t,n,i,r){var a=pr(e,t,i,r);if(n.$h)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==a.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=a.drmInfos),n.$h=!1;else if(a.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(e){return a.drmInfos.some(function(t){return t.keySystem==e.keySystem})}),0==n.drmInfos.length))throw new eJ(2,4,4008);return a.Vh||n.Vh}(t.za,b,i,t.g.ignoreDrmInfo,t.g.dash.keySystemsByURI))?[h]:[]),b=v.some(function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.attributes.schemeIdUri&&"JOC"==e.attributes.value}),v=v.some(function(e){return"tag:dolby.com,2016:dash:virtualized_content:2016"==e.attributes.schemeIdUri&&"1"==e.attributes.value}),v=b||v,b=!1,c&&(b=u.includes("forced_subtitle")||u.includes("forced-subtitle")),w&&((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;
1c=n.L.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.L.id?n.wa.id+","+n.L.id:"",t.I.length&&g&&t.u.set(n.wa.id+","+g,function(e){function t(e){return e?((e=tH(e)).Ed=null,e.wc=null,e.Jc=nu(e.Jc),e.yf=null,e):null}return(e=tH(e)).wa=t(e.wa),e.ra=t(e.ra),e.L=t(e.L),e.oa&&(e.oa=tH(e.oa),e.oa.node=null),e}(n)),n.L.yf&&function(e,t,n,i){if(!e.qa.has(t)){e.qa.add(t);var r,a=t1(t,"presentationTime",ne)||0,o=tZ(t,"UTCTiming");(r=o&&o.attributes.schemeIdUri)&&(r="urn:mpeg:dash:utc:http-ntp:2014"!==(o=o.attributes.schemeIdUri)&&"urn:mpeg:dash:utc:ntp:2014"!==o&&"urn:mpeg:dash:utc:sntp:2014"!==o),isNaN(a=(n=new Date((t=r?1e3*(t1(t,"wallClockTime",t5)||0):ot(t=t1(t,"wallClockTime",ne)||0))-a/n.timescale*1e3)).getTime()/1e3)||(i.o||i.rh(a),i=new i3("prft",i=(new Map).set("detail",{wallClockTime:t,programStartDate:n})),e.j.onEvent(i))}}(t,n.L.yf,_,n.presentationTimeline),-1!=_.endTime&&null!=n.wa.id&&null!=n.L.id&&((g=t.C.get(n.wa.id))?(g.endTime=_.endTime,g.fh.includes(n.L.id)||g.fh.push(n.L.id),t.C.set(n.wa.id,g)):t.C.set(n.wa.id,{endTime:_.endTime,timeline:_.timeline,fh:[n.L.id]}));var G=y&&t.o.has(y)?t.o.get(y):{id:t.Ka++,originalId:n.L.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:n.L.mimeType,codecs:c,frameRate:n.L.frameRate,pixelAspectRatio:n.L.pixelAspectRatio,bandwidth:n.bandwidth,width:n.L.width,height:n.L.height,kind:r,encrypted:i.drmInfos.length>0,drmInfos:i.drmInfos,keyIds:h,language:a,originalLanguage:n.ra.language,label:o,type:n.ra.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:n.L.emsgSchemeIdUris,roles:u,forced:b,channelsCount:n.L.vf,audioSamplingRate:n.L.audioSamplingRate,spatialAudio:v,closedCaptions:l,hdr:f,colorGamut:void 0,videoLayout:void 0,tilesLayout:p,accessibilityPurpose:d,external:!1,fastSwitching:!1,fullMimeTypes:new Set([nq(n.L.mimeType,n.L.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return G.createSegmentIndex=function(){var e;return P(function(t){if(1==t.h)return G.segmentIndex?t.A(0):(e=G,t.g(_.Nc(),3));e.segmentIndex=t.i,t.j()})},y&&n.pb&&!t.o.has(y)&&(n=n.wa.id||"",t.G.has(n)||t.G.set(n,[]),t.o.set(y,G),t.G.get(n).push(y)),G}(t,n,E,c,C,M,u,l,A,i,T,w);return r&&(r.hdr=r.hdr||y,r.colorGamut=r.colorGamut||b,r.fastSwitching=g,i=i.attributes.dependencyId)?(r.baseOriginalId=i,D.set(i,r),null):r}).filter(function(e){return!!e})).length&&0==D.size){if(i="image"==n.ra.contentType,t.g.dash.ignoreEmptyAdaptationSet||d||i)return null;throw new eJ(2,4,4003)}if(!n.ra.contentType||"application"==n.ra.contentType)for(n.ra.contentType=fA(h[0].mimeType,h[0].codecs),p=(d=x(h)).next();!p.done;p=d.next())p.value.type=n.ra.contentType;for(d=n.ra.id||"__fake__"+t.Ka++,f=(p=x(h)).next();!f.done;f=p.next()){for(f=f.value,v=(m=x(E.drmInfos)).next();!v.done;v=m.next())(v=v.value).keyIds=v.keyIds&&f.keyIds?new Set([].concat(S(v.keyIds),S(f.keyIds))):v.keyIds||f.keyIds;t.g.enableAudioGroups&&(f.groupId=d)}return r=r.map(function(e){return e.attributes.supplementalId||e.attributes.id}).filter(ir),{id:d,contentType:n.ra.contentType,language:C,Fm:u,streams:h,drmInfos:E.drmInfos,gj:i,Rk:r,yj:D}}function fy(e,t){if((t=t0(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&t1(t,"useMPDUrlQuery",nn,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.aa:n.split("&").map(function(t){if("$querypart$"==t)return e.aa;var n=/\$query:(.*?)\$/g.exec(t);if(n&&2==n.length){n=n[1];var i=new eR(e.aa).get(n);if(i.length)return n+"="+i[0]}return t}).join("&")}}return null}function fb(e){var t,n;return P(function(i){switch(i.h){case 1:return t=0,i.m(2),i.g(fc(e),4);case 4:t=i.i,i.o(3);break;case 2:if(n=i.l(),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(),fw(e,t),i.j()}})}function fw(e,t){if(!(e.M<0)){var n=e.M;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.N.na(Math.max(n-t,K(e.Ha)))}}function fT(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,vf:null,audioSamplingRate:null,mb:0,Ef:1,encrypted:!1},i=i||n.bb;var r,a=t.attributes.id,o=t.attributes.supplementalId,s=tY(t,"BaseURL"),u=!1;if(e.i)for(var l=x(s),c=l.next();!c.done;c=l.next()){var d=c.value;c=d.attributes.serviceLocation,d=t$(d),c&&d&&(pN(e.i,a,c,d),u=!0)}u&&e.i||(r=s.map(t$));var h=e.i;e=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,c=sH([t.attributes.codecs||n.c
1odecs]).join(","),d=t1(t,"frameRate",ni)||n.frameRate;var p=t.attributes.sar||n.pixelAspectRatio,f=function(e,t){t=t.slice(),e=x(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}(tY(t,"InbandEventStream"),n.emsgSchemeIdUris),g=tY(t,"AudioChannelConfiguration");g=function(e){e=x(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))&&t>0&&t<n.length)return n[t]}}return null}(g)||n.vf;var m=t1(t,"audioSamplingRate",ne)||n.audioSamplingRate;e||(e=fA(l,c));var v=tZ(t,"SegmentBase"),y=tZ(t,"SegmentTemplate"),b=v&&t1(v,"availabilityTimeOffset",nt)||0,w=y&&t1(y,"availabilityTimeOffset",nt)||0,T=s&&s.length&&t1(s[0],"availabilityTimeOffset",nt)||0;b=n.mb+T+b+w,w=null,(T=tZ(t,"SegmentSequenceProperties"))&&(T=t1(T,"cadence",t7))&&(w=T),T=t.attributes.label;var S=tY(t,"Label");return S&&S.length&&tJ(S=S[0])&&(T=tJ(S)),{bb:function(){return tr(i(),s.length?h&&u?pj(h,a):r||[]:[])},Ed:v||n.Ed,wc:tZ(t,"SegmentList")||n.wc,Jc:y||n.Jc,yf:tZ(t,"ProducerReferenceTime")||n.yf,width:t1(t,"width",ne)||n.width,height:t1(t,"height",ne)||n.height,contentType:e,mimeType:l,codecs:c,frameRate:d,pixelAspectRatio:p,emsgSchemeIdUris:f,id:o||a,originalId:a,language:t.attributes.lang,vf:g,audioSamplingRate:m,mb:b,cf:null,Ef:w||n.Ef,label:T||null,encrypted:!1}}function fx(e,t,n,i){var r,a,o,s,u,l;return P(function(c){if(1==c.h)return r=[e3(n)],(a=ri(tr(t(),r),e.g.retryParameters)).method=i,o=e.j.networkingEngine.request(4,a,{isPreload:e.va()}),i7(e.T,o),c.g(o.promise,2);if(s=c.i,"HEAD"==i){if(!s.headers||!s.headers.date)return c.return(0);u=s.headers.date}else u=eZ(s.data);return isNaN(l=Date.parse(u))?c.return(0):c.return(l-Date.now())})}function fS(e,t,n,i,r){var a,o,s,u;return P(function(l){return 1==l.h?(a=rs,o=+!r,s=sz(t,n,i,e.g.retryParameters),l.g(fk(e,s,a,{type:o}),2)):(u=l.i,l.return(u.data))})}function fA(e,t){return n5(t=nq(e,t))?tc:e.split("/")[0]}function fk(e,t,n,i){return i||(i={}),i.isPreload=e.va(),t=e.j.networkingEngine.request(n,t,i),i7(e.T,t),t.promise}function fI(){return""}function fE(e,t,n){return function(){return e&&t?pj(e,"BaseURL"):n.slice()}}function fC(){}(p=fl.prototype).configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.va=t),n&&this.h&&this.h.presentationTimeline.U()&&this.N.yb(),this.i&&this.i.configure(this.g),this.m&&this.m.Ui(this.g.dash.useStreamOnceInPeriodFlattening)},p.start=function(e,t){var n,i=this;return P(function(r){if(1==r.h)return i.ya=t.isLowLatencyMode(),i.B=[e],i.j=t,r.g(fc(i),2);if(n=r.i,i.j&&fw(i,n),!i.j)throw new eJ(2,7,7001);return r.return(i.h)})},p.stop=function(){for(var e=x(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.B=[],this.h=null,this.o.clear(),this.G.clear(),this.u.clear(),this.C.clear(),this.H.clear(),this.l={rf:"",type:"",profiles:[],nc:null,mb:0,bb:null,je:0},this.m=null,null!=this.N&&(this.N.stop(),this.N=null),this.i&&this.i.destroy(),this.J&&(this.J.release(),this.J=null),this.qa.clear(),this.za.release(),this.T.destroy()},p.update=function(){var e,t=this;return P(function(n){return 1==n.h?(n.m(2),n.g(fc(t),4)):2!=n.h?n.o(0):(e=n.l(),t.j&&e)?void(t.j.onError(e),n.j()):n.return()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Ec();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.M=t.endTime-e,fw(this,0))}}},p.banLocation=function(e){this.i&&this.i.banLocation(e)},p.setMediaElement=function(e){this.K=e},H("shaka.dash.DashParser",fl),tb("application/dash+xml",function(){return new fl}),tb("video/vnd.mpeg.dash.mpd",function(){return new fl}),H("shaka.dependencies",fC),fC.has=function(e){return fR.has(e)},fC.add=function(e,t){if(!fD[e])throw Error(e+" is not supported");e==fM?ep("mux.js","mux.js is no longer used in Shaka Player."):fR.set(e,function(){return t})};var fM="muxjs",fD={Gm:fM,ISOBoxer:"ISOBoxer"};fC.Allowed=fD;var fR=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function fL(){this.j=new es(function(){for(var e,t=navigator.userAgent.toLowerCase(),n=x([{type:"VR",eh:/oculus|quest/},{type:"TV",eh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",eh:/iphone|ipad|ipod|android/}]),i=n.next();!i.done;i=n.next())if((i=i.value).eh.test(t))return i.type;if(n=(null==(t=navigator.userAgentData)||null==(e=t.platform)?void 0:e.toLowerCase())||"",t){if(t.mobile)return"MOBILE";if(n.includes("android"))return"TV"}return"DESKTOP"}),this.l=new es(function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"})}function fP(){var t=e.ManagedMediaSource||e.MediaSource;return!!t&&!!t.isTypeSupported}function fN(){fL.call(this),this.g=new es(function(){var e=navigator.userAgent.match(/Version\/(\d+)(?:\.(\d+))?/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_(\d+))?/)),e?[parseInt(e[1],10),parseInt(e[2]||"0",10)]:[0,0]}),this.h=new es(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}function fj(e){return(e=e.g.value())[0]>=27||26===e[0]&&e[1]>=4}function fO(){if(!fU())throw Error("Not a Chromecast device!");fL.call(this),this.h=new es(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new es(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return(e=e.toLowerCase()).includes("android")?f_:e.includes("fuchsia")?fB:fF})}function fU(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}(p=fL.prototype).dc=function(){return!!navigator.mediaCapabilities},p.Qa=function(){return this.j.value()},p.Ia=function(){return this.l.value()},p.Bd=function(){return!1},p.hh=function(){return!1},p.df=function(){return!1},p.Ji=function(){return!1},p.le=function(){return!1},p.Yc=function(){return!0},p.xb=function(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType},p.pe=function(){return!0},p.Oi=function(){return 0},p.hc=function(){return Promise.resolve({width:1/0,height:1/0})},p.Xi=function(){return!1},p.uh=function(){return!1},p.Xa=function(e){var t=this.Qa();return("TV"===t||"CONSOLE"===t||"CAST"===t)&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},p.Ah=function(){return!!e.indexedDB},p.Hi=function(){return[]},p.md=function(t){return void 0!==e.matchMedia&&(e.matchMedia("(color-gamut: p3)").matches||e.matchMedia("(dynamic-range: high)").matches)?t?"HLG":"PQ":"SDR"},p.dj=function(){return!1},p.xi=function(){return!1},p.Bf=function(){return!1},p.Kf=function(){return!0},p.zi=function(){return!1},p.cj=function(){return!0},p.Xc=function(){return!1},p.Tg=function(e){return"com.apple.fps"===e},p.Jf=function(){return!0},p.toString=function(){return"Device: "+this.Jb()+" v"+this.Da()+"; Type: "+this.Qa()},w(fN,fL),(p=fN.prototype).Da=function(){return this.g.value()[0]},p.Jb=function(){return"Apple Browser"},p.Qa=function(){return this.h.value()},p.Ia=function(){return"WEBKIT"},p.dc=function(){return!1},p.Bd=function(e,t){return!fj(this)&&"audio"===t},p.df=function(){return!fj(this)},p.Ji=function(e){return!fj(this)&&"audio"===e},p.Xa=function(e){return fL.prototype.Xa.call(this,e),e.abr.minTimeToSwitch=.5,e},p.dj=function(){return!0},p.Jf=function(){return!1},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(el=function(){return new fN}),w(fO,fL),(p=fO.prototype).Da=function(){return this.h.value()},p.Jb=function(){return"Chromecast with "+this.g.value()},p.Qa=function(){return"CAST"},p.Ia=function(){return"CHROMIUM"},p.dc=function(){return fL.prototype.dc.call(this)&&this.g.value()!==fF},p.xb=function(){return fL.prototype.xb.call(this)&&this.g.value()!==fF},p.Oi=function(){switch(this.g.value()){case f_:return 0;case fB:return 3;default:return 1}},p.hc=function(){var t,n,i,r,a;return P(function(o){switch(o.h){case 1:if(t=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,n={width:1280,height:720},o.m(2),!(i=t)){o.A(4);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:i=o.i;case 4:if(i){n.width=3840,n.height=2160,o.A(6);break}if(!(r=t)){o.A(7);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=o.i;case 7:r&&(n.width=1920,n.height=1080);case 6:o.o(3);break;case 2:a=o.l(),W("Failed to check canDisplayType:",a);case 3:return o.return(n)}})},p.Xa=function(e){return fL.prototype.Xa.call(this,e),e.streaming.stallSkip=0,e},p.Ah=function(){return!1},p.Xc=function(){return!0};var f_="Android",fB="Fuchsia",fF="Linux";function fV(){fL.call(this);var e=this;this.i=new es(function(){var e=navigator.userAgent.match(/Edge?\/(\d+)/);return e?parseInt(e[1],10):(e=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/))?parseInt(e[2],10):null}),this.g=new es(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new es(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}),this.u=new es(function(){return!!fL.prototype.xb.call(e)&&(!navigator.userAgent.match(/Edge?\//)||!e.h.value())}),this.o=new es(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new es(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():!!navigator.userAgent.includes("Android")})}function fH(){fL.apply(this,arguments)}function fG(){fL.call(this),this.g=new es(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}function fK(){fL.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}function fq(){fL.apply(this,arguments)}function fz(){fL.call(this),this.i=new es(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")}),this.h=new es(function(){return navigator.userAgent.includes("SOPOpenBrowser")}),this.g=new es(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}function fW(){fL.call(this);var e=this;this.h=function(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;case 132:return 26;default:return null}}(),this.g=null;try{var t=new PalmServiceBridge;t.onservicecallback=function(t){var n,i,r,a;t=JSON.parse(t),e.g=null!=(a=null!=(r=null==(n=t.configs)?void 0:n["tv.model.supp
1ortHDR"])?r:null==(i=t.configs)?void 0:i["tv.config.supportDolbyHDRContents"])&&a},t.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(e){X("WebOS: getConfigs call failed",e)}}if(fU()&&(el=function(){return new fO}),w(fV,fL),(p=fV.prototype).Da=function(){return this.i.value()},p.Jb=function(){return this.g.value()},p.Bd=function(e){return!!eK(e)&&"Edge"===this.g.value()&&this.h.value()},p.hh=function(){return"Edge"===this.g.value()&&this.h.value()},p.df=function(){return"Edge"===this.g.value()&&this.h.value()},p.xb=function(){return this.u.value()},p.Xa=function(e){if(fL.prototype.Xa.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="SW_SECURE_CRYPTO",e.drm.defaultVideoRobustnessForWidevine="SW_SECURE_CRYPTO"),e},p.Bf=function(){return"Edge"===this.g.value()||this.o.value()},p.Xc=function(){if("GECKO"===this.Ia()){var e=this.Da();return null!==e?e>=100:fL.prototype.Xc.call(this)}return fL.prototype.Xc.call(this)},p.Tg=function(e){return"GECKO"===this.Ia()?e.startsWith("com.microsoft.playready.recommendation"):fL.prototype.Tg.call(this,e)},ec=function(){return new fV},w(fH,fL),(p=fH.prototype).Da=function(){return null},p.Jb=function(){return"Hisense"},p.Qa=function(){return"TV"},p.dc=function(){return!1},p.xb=function(){return!1},p.hc=function(){var t={width:1920,height:1080},n=null;if(e.Hisense_Get4KSupportState)try{n=e.Hisense_Get4KSupportState()}catch(e){}return null==n&&(n=navigator.userAgent.includes("UHD")),n&&(t.width=3840,t.height=2160),Promise.resolve(t)},p.Xa=function(e){return fL.prototype.Xa.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(el=function(){return new fH}),w(fG,fL),(p=fG.prototype).Jb=function(){return"PlayStation"},p.Qa=function(){return"CONSOLE"},p.Ia=function(){return"WEBKIT"},p.Da=function(){return this.g.value()},p.dc=function(){return!1},p.Yc=function(){return!1},p.xb=function(){return!1},p.uh=function(){return 4===this.Da()},p.hc=function(){var t,n,i;return P(function(r){switch(r.h){case 1:return t={width:1920,height:1080},n=!1,r.m(2),r.g(e.msdk.device.getDisplayInfo(),4);case 4:case 7:n="4K"===r.i.resolution,r.o(3);break;case 2:return r.l(),r.m(5),r.g(e.msdk.device.getDisplayInfoImmediate(),7);case 5:i=r.l(),X("PlayStation: Failed to get the display info:",i);case 3:return n&&(t.width=3840,t.height=2160),r.return(t)}})},p.Xa=function(e){return fL.prototype.Xa.call(this,e),4===this.Da()&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},p.Bf=function(){return 4===this.Da()},p.Kf=function(){return 4!==this.Da()},navigator.userAgent.includes("PlayStation")&&(el=function(){return new fG}),w(fK,fL),(p=fK.prototype).Da=function(){return this.g},p.Jb=function(){return"Tizen"},p.Ia=function(){return"CHROMIUM"},p.Qa=function(){return"TV"},p.Bd=function(){return!0},p.le=function(){return 3===this.Da()},p.dc=function(){return!1},p.Yc=function(){var e=this.Da();return null!==e?e>=4:fL.prototype.Yc.call(this)},p.xb=function(){return!1},p.pe=function(){return this.g&&this.h?5===this.g?this.h>=5:this.g>5:fL.prototype.pe.call(this)},p.hc=function(){var t=e.devicePixelRatio;t={width:e.screen.width*t>1920?3840:1920,height:e.screen.height*t>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var n=webapis.systeminfo.getMaxVideoResolution();t.width=n.width,t.height=n.height}else 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.")}return Promise.resolve(t)},p.Xa=function(e){return fL.prototype.Xa.call(this,e),e.drm.ignoreDuplicateInitData=2!==this.Da(),3===this.Da()&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},p.Hi=function(){var e=[];return null!==this.g&&this.g<5&&e.push("opus"),e},p.md=function(e){try{if(webapis.avinfo.isHdrTvSupport())return e?"HLG":"PQ"}catch(t){return fL.prototype.md.call(this,e)}return"SDR"},p.xi=function(){return!0},p.zi=function(){return 3===this.Da()},navigator.userAgent.includes("Tizen")&&(el=function(){return new fK}),w(fq,fL),fq.prototype.Da=function(){return null},fq.prototype.Jb=function(){return"Vizio"},fq.prototype.Qa=function(){return"TV"},fq.prototype.dc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(el=function(){return new fq}),w(fz,fL),(p=fz.prototype).Da=function(){return this.g.value()},p.Jb=function(){return"WebKit STB"},p.Qa=function(){return"TV"},p.Ia=function(){return"WEBKIT"},p.dc=function(){return!1}
1,p.Yc=function(){var e=this.g.value();return null===e||e>=15},p.Bd=function(){return this.h.value()},p.hc=function(){return Promise.resolve({width:e.screen.width*e.devicePixelRatio,height:e.screen.height*e.devicePixelRatio})},p.Kf=function(){return!this.i.value()},p.Jf=function(){return!1},(navigator.userAgent.includes("PlayStation")?0:navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(el=function(){return new fz}),w(fW,fL),(p=fW.prototype).Da=function(){return this.h},p.Jb=function(){return"WebOS"},p.Qa=function(){return"TV"},p.Ia=function(){return"CHROMIUM"},p.dc=function(){return!1},p.Yc=function(){var e=this.Da();return null!==e?e>3:fL.prototype.Yc.call(this)},p.xb=function(){return!1},p.pe=function(){var e=this.Da();return null!==e?e>3:fL.prototype.pe.call(this)},p.hc=function(){var t={width:1920,height:1080};try{var n=JSON.parse(e.PalmSystem.deviceInfo);t.width=Math.max(1920,n.screenWidth),t.height=Math.max(1080,n.screenHeight)}catch(e){X("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},p.Xa=function(e){return fL.prototype.Xa.call(this,e),3===this.Da()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},p.md=function(e){return null==this.g?(X("WebOS: getConfigs call haven't finished"),fL.prototype.md.call(this,e)):this.g?e?"HLG":"PQ":"SDR"},p.cj=function(){return!1},p.Xc=function(){var e=this.Da();return null!==e?e>=6:fL.prototype.Xc.call(this)},navigator.userAgent.includes("Web0S")){var fX=new fW;el=function(){return fX}}function fY(){fL.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}function fJ(){var e=null;try{e="undefined"!=typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}return e}function f$(e,t,n){this.type=e,this.ea=t,this.segments=n||null}function fQ(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function fZ(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 f0(e,t){return e.attributes.find(function(e){return e.name===t})||null}function f1(e,t,n){return(e=f0(e,t))?e.value:n||null}function f2(e,t){if(!(e=f0(e,t)))throw new eJ(2,4,4023,t);return e.value}function f4(e,t,n){n=void 0===n?[]:n,this.ea=t,this.g=e,this.sc=n}function f3(e,t){this.name=e,this.value=t}function f5(e,t){return e.filter(function(e){return e.name==t})}function f6(e,t){return e.filter(function(e){return f2(e,"TYPE")==t})}function f8(e,t){e=x(e);for(var n=e.next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function f9(e,t,n){return n=void 0===n?0:n,(e=f8(e,t))?Number(e.value):n}function f7(e,t,n){return t?ge(e,[t],n):[]}function ge(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(e){return gt(e,n)})),tr(e,i)}function gt(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=x(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 eJ(2,4,4039,r)}}return e}function gn(e){var t=(e=e.value).indexOf(",");return Number(-1===t?e:e.substring(0,t))}function gi(){this.g=0}function gr(e,t){var n=eZ(t).trim().split(/[\r\n]+/);if(!n[0].startsWith("#EXTM3U"))throw new eJ(2,4,4015);t=0;for(var i=!1,r=[],a=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(s.startsWith("#")&&!s.startsWith("#EXT")||a)a=!1;else{if(s=ga(e,s),i||(go.has(s.name)?(t=1,i=!0):"EXT-X-STREAM-INF"==s.name||"EXT-X-MEDIA"==s.name?i=!0:gs.has(s.name)&&(t=1,i=!0)),gs.has(s.name)){if(1!=t)throw new eJ(2,4,4017);a=e,e=Array(Math.max(100,Math.floor((n.length-o)/2))),i=0,s=[];var l=[];for(u=null;o<n.length;o++){var c=n[o];c.startsWith("#EXT")?(c=ga(a,c),go.has(c.name)?r.push(c):"EXT-X-MAP"==c.name?u=c:"EXT-X-PART"==c.name?l.push(c):"EXT-X-PRELOAD-HINT"
1==c.name?"PART"==f1(c,"TYPE")?l.push(c):"MAP"==f1(c,"TYPE")&&(c.name="EXT-X-MAP",u=c):s.push(c)):(!c.startsWith("#")||c.startsWith("#EXT"))&&(c=c.trim(),u&&s.push(u),s=new f4(c,s,l),i<e.length?e[i++]=s:(e.push(s),i++),s=[],l=[])}return l.length&&(u&&s.push(u),n=new f4("",s,l),i<e.length?e[i++]=n:(e.push(n),i++)),new f$(t,r,i<e.length?e.slice(0,i):e)}r.push(s),"EXT-X-STREAM-INF"==s.name&&(s.attributes.push(new f3("URI",u)),a=!0)}}return new f$(t,r)}function ga(e,t){e=e.g++;var n=t.indexOf(":"),i=-1===n?t.substring(1):t.substring(1,n);if(!i.startsWith("EXT"))throw new eJ(2,4,4016,t);if(null===(t=-1===n?null:t.substring(n+1)))e=new fQ(e,i,[]);else if(-1===t.indexOf("="))e=new fQ(e,i,[],t);else{n=[];var r=null,a=0,o=t.indexOf(","),s=t.indexOf("=");for(-1!==o&&o<s&&(r=t.substring(0,o),a=o+1);a<t.length;){for(;" "===t[a];)a++;if(-1===(s=t.indexOf("=",a)))break;if(o=t.substring(a,s),'"'===t[a=s+1]){a++;var u=t.indexOf('"',a);s=-1===u?t.substring(a):t.substring(a,u),a=-1===u?t.length:u+1}else s=-1===(u=t.indexOf(",",a))?t.substring(a):t.substring(a,u),a=-1===u?t.length:u;a<t.length&&","===t[a]&&a++,n.push(new f3(o,s))}e=new fQ(e,i,n,r)}return e}w(fY,fL),(p=fY.prototype).Da=function(){return this.h},p.Jb=function(){return"Xbox"},p.Qa=function(){return"CONSOLE"},p.Ia=function(){return this.g?"EDGE":"CHROMIUM"},p.Bd=function(){return!0},p.hh=function(){return!0},p.df=function(){return!0},p.Xi=function(){return this.g},p.hc=function(){var e={width:1920,height:1080},t=fJ();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch(e){X("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},p.Xa=function(e){return fL.prototype.Xa.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},p.Bf=function(){return!0},p.Ah=function(){return!1},(navigator.userAgent.includes("Xbox One")||null!==fJ())&&(el=function(){return new fY}),fQ.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),n.length>0&&(t+=":"+n.join(",")),t};var go=new Set("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(" ")),gs=new Set("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 gu(){}function gl(e,t){try{var n=gc(e);return i1({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return iZ(e)}}function gc(e){if(!e.startsWith("data:"))throw new eJ(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new eJ(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),e=(n=e.split(";"))[0];var i=!1;return n.length>1&&"base64"==n[n.length-1].toLowerCase()&&(i=!0,n.pop()),{data:i?e7(t):e2(t),contentType:e,Fh:n}}function gd(){var t=this;this.g=this.i=null,this.G=1,this.D=new Map,this.M=new Map,this.o=new Map,this.o.set("video",new Map),this.o.set("audio",new Map),this.o.set(tc,new Map),this.o.set("image",new Map),this.$b=(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,P(function(t){if(1==t.h){if("video/mp2t"==s)throw new eJ(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eJ(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(l=f2(o,"METHOD")))return t.return(null);c="cenc","SAMPLE-AES"==l&&(c="cbcs"),d=f2(o,"URI"),h=ta("com.apple.fps",c,null,d);var n=new ey(d).Bb.replace(/-/g,"").toLowerCase();return(p=32===n.length&&/^[0-9a-f]+$/.test(n)?n:null)||!u?t.A(2):t.g(gJ(a,u),3)}
1return 2!=t.h&&(p=t.i),p&&h.keyIds.add(p),t.return(h)})}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(e){var n=f2(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=f2(e,"URI");if(n=gc(r.split("?")[0]),r=r.split("?")[0],!t.I.has(r)){var a=eO(n.data);t.I.set(r,a)}i=ta("com.widevine.alpha",i,[{initDataType:"cenc",initData:t.I.get(r)}],void 0,n.Fh),(e=f1(e,"KEYID"))&&i.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(i)}else e=Promise.resolve(null);return e}).set("com.microsoft.playready",function(e){var t=f2(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),e=eO((t=gc((e=f2(e,"URI")).split("?")[0])).data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);n=ta("com.microsoft.playready",n,[{initDataType:"cenc",initData:i=rD(e,i,new Set,0)}],void 0,t.Fh),(e=tq(["<PLAYREADY>",e9(e),"</PLAYREADY>"].join("\n")))&&(n.licenseServerUri=pt(e)),n=Promise.resolve(n)}else n=Promise.resolve(null);return n}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(e){var n=f2(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=f2(e,"URI");if(n=gc(r.split("?")[0]),r=r.split("?")[0],!t.I.has(r)){var a=eO(n.data);t.I.set(r,a)}i=ta("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:t.I.get(r)}],void 0,n.Fh),(e=f1(e,"KEYID"))&&i.keyIds.add(e.toLowerCase().substr(2)),e=Promise.resolve(i)}else e=Promise.resolve(null);return e}),this.ib=new Set,this.j=new Map,this.m=null,this.H="",this.ab=new gi,this.N=-1,this.ia=1/0,this.P=this.vc=this.hb=!1,this.C=new n7(function(){if(t.$&&!t.g.continueLoadingWhenPaused&&(t.X.Oa(t.$,"timeupdate"),t.$.paused))return void t.X.Ba(t.$,"timeupdate",function(){return gK(t)});gK(t)}),this.Ha=g5,this.h=null,this.eb=0,this.B=1/0,this.Ua=this.Ka=this.T=0,this.aa=new i9,this.J=new Map,this.K=new Map,this.Ca=new Map,this.va=new Map,this.O=new Map,this.ya=new Map,this.za=new Map,this.uc=this.qa=!1,this.Xb=new G(5),this.l=null,this.S=!0,this.X=new er,this.u=this.$=null,this.Zb=function(){return!1},this.I=new Map}function gh(e,t){return gq(e)?e.o.get(t.type):t.nf}function gp(e,t,n){n=void 0!==n&&n;for(var i=-1==e.N,r=x(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=gh(e,a);if(o=o.Cb()){s=x(s);for(var u=s.next();!u.done;u=s.next()){var l=(u=x(u.value)).next().value;if(u.next().value==o.startTime){i&&(e.N=Math.max(e.N,l)),a.ng=l;break}}}}if(!(e.N<0))for(i=(t=x(t)).next();!i.done;i=t.next())(gI(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&(a=e.N-i.ng)>0&&(r.g.splice(0,a),r=r.Cb())&&(r=-r.startTime,i.stream.segmentIndex.offset(r),gf(e,i,r))}function gf(e,t,n){if(!(.001>Math.abs(n))){t.Qc+=n,t.Hc+=n,e=gh(e,t);for(var i=x(e),r=i.next();!r.done;r=i.next()){var a=x(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.R()}}function gg(e,t,n){var i,r,a,o,s,u;return P(function(l){switch(l.h){case 1:if(!t)return l.return({mimeType:null,data:null});return i=rs,r=sz(t.R(),t.Fc(),t.Dc(),e.g.retryParameters),a=+(t instanceof aV),l.g(gW(e,r,i,{type:a}).promise,2);case 2:if(s=(o=l.i).data,!t.aesKey){l.A(3);break}return l.g(sG(s,t.aesKey,n),4);case 4:s=l.i;case 3:return t instanceof aV?t.me(s,!0):t.me(s),(u=o.headers["content-type"])&&(u=u.split(";")[0].toLowerCase()),l.return({mimeType:u,data:s})}})}function gm(e){if(gq(e)){if(e.Ha==g8){for(var t=1/0,n=1/0,i=x(e.j.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.Hc),n=Math.min(n,r.Qc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.m.Hf(t)}}else e.m.wb(gS(e));if(!e.m.o)for(n=(t=x(e.j.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=n.stream.segmentIndex.Cb())&&null!=n.h&&e.m.rh(n.h);e.m.mf()}function gv(e,t,n){n=new ey(n).g;var i=new Map;t=x(t);for(var r=t.next();!r.done;r=t.next()){var a=r.value,o=f1(a,"NAME"),s=f1(a,"VALUE");r=f1(a,"QUERYPARAM"),a=f1(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.D.get(a))&&i.set(a,r)}return i}function gy(e){var t=new Set([nq(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.qb(function(n){n.mimeType&&t.add(nq(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function gb(e,t){return e.P=(t=f1(t,"CODECS")||"").length>0,e.P||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(",")),sH(t.split(/\s*,\s*/))}function gw(e,t,n,i){i=void 0===i||i;for(var r,a,o,s,u=[],l=[],c=new Map,d=x(t),h=d.next(),p={};!h.done;p={li:void 0},h=d.next()){h=h.value,p.li=++e.G,p=function(e){return function(){return"shaka://hls-muxed"+e.li}}(p);var f=i?f2(h,"URI"):f1(h,"URI")||p();p=f2(h,"GROUP-ID"),u.push(f),l.push(p),c.set(p,f),(h=f1(h,"PATHWAY-ID"))&&n.set(p,h)}if(i=l.sort().join(","),h=t[0],t="","subtitles"==(r=f2(r=h,"TYPE").toLowerCase())&&(r=tc),(d=r)==tc)t=f1(h,"CODECS")||"";else for(p=(l=x(l)).next();!p.done;p=l.next())if(p=p.value,e.K.has(p)){t=e.K.get(p);break}if(l=u.sort().join(","),"audio"==d&&i&&(l+=i),e.j.has(l))return e.j.get(l);if(p=e.G++,e.l)for(f=(c=x(c)).next();!f.done;f=c.next()){var g=x(f.value);f=g.next().value,g=g.next().value,(f=n.get(f))&&pN(e.l,p,f,g)}n=f1(h,"LANGUAGE"),c=f1(h,"NAME"),f="YES"==f1(h,"DEFAULT"),g="audio"==d&&(a=f1(a=h,"CHANNELS"))?parseInt(a.split("/")[0],10):null;var m="audio"==d&&!!(o=f1(o=h,"CHANNELS"))&&2==(o=o.split("/")).length&&("JOC"===o[1]||o[1].includes("ATMOS")||o[1].includes("IMSA")),v=f1(h,"CHARACTERISTICS"),y="YES"==f1(h,"FORCED");return h="audio"==d&&(s=f1(s=h,"SAMPLE-RATE"))?parseInt(s,10):null,(u=gx(e,p,u,t,d,n,f,c,g,null,v,y,h,m)).stream&&e.g.enableAudioGroups&&(u.stream.groupId=i),e.M.has(i)?e.M.get(i).push(u):e.M.set(i,[u]),e.j.set(l,u),u}function gT(e,t){var n="video",i=f2(t,"URI"),r=f1(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.j.has(i))return e.j.get(i);var a=f1(t,"LANGUAGE"),o=f1(t,"NAME"),s=f1(t,"CHARACTERISTICS");
1return n=gx(e,e.G++,[i],r,n,a,!1,o,null,null,s,!1,null,!1),r=(a=x((r=f1(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=f1(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(i,n),n}function gx(e,t,n,i,r,a,o,s,u,l,c,d,h,p){function f(){return e.l&&n.length>1?pj(e.l,t):v.zf.concat(ge([e.H],n,e.D))}var g=gM(e,i,r,a,o,s,u,l,c,d,h,p);n.some(function(e){return e.startsWith("shaka://hls-muxed")})&&(g.isAudioMuxedInVideo=!0,g.mimeType="video/mp2t",gy(g));var m,v={stream:g,type:r,zf:[],Qc:0,Hc:0,nf:new Map,Pe:!1,Oe:!1,Xd:!1,ng:-1,Lb:-1,Mb:-1,R:f},y=null;return g.createSegmentIndex=function(){return y||(g.isAudioMuxedInVideo?(g.segmentIndex=new sy([]),Promise.resolve()):(m=gG(e,v.R(),!0),y=new Promise(function(t){var n,y,b,w,T,S,A,k,I,E,C,M,D,R,L,N,j;t((n=m,P(function(t){switch(t.h){case 1:return y=td,t.m(2),t.g(n.promise,4);case 4:if(b=t.i,n.aborted)return t.return();if((w=b.uri)!=b.originalUri&&(v.R().includes(w)||v.zf.push(w)),1!=(T=gr(e.ab,b.data)).type)throw new eJ(2,4,4017);return S=gv(e,f5(T.ea,"EXT-X-DEFINE"),w),A=!1,(!e.P&&e.g.hls.disableCodecGuessing||e.S&&r==y.ua&&!e.g.hls.disableClosedCaptionsDetection)&&T.segments.length>0&&(e.S=!1,A=!0),k=!e.P&&e.g.hls.disableCodecGuessing,I=gq(e),t.g(gE(e,0,S,T,f,i,r,a,o,s,u,l,c,d,h,p,void 0,A,k),5);case 5:if(E=t.i,n.aborted)return t.return();C=E.stream,gL(e,T),gq(e)&&!I&&gN(e,T),v.Qc=E.Qc,v.Hc=E.Hc,v.Pe=E.Pe,v.Oe=E.Oe,v.Xd=E.Xd,v.nf=E.nf,v.Lb=E.Lb,v.Mb=E.Mb,g.segmentIndex=C.segmentIndex,g.encrypted=C.encrypted,g.drmInfos=C.drmInfos,g.keyIds=C.keyIds,g.mimeType=C.mimeType,g.bandwidth=g.bandwidth||C.bandwidth,g.codecs=g.codecs||C.codecs,g.closedCaptions=g.closedCaptions||C.closedCaptions,g.width=g.width||C.width,g.height=g.height||C.height,g.hdr=g.hdr||C.hdr,g.colorGamut=g.colorGamut||C.colorGamut,g.frameRate=g.frameRate||C.frameRate,"und"==g.language&&"und"!=C.language&&(g.language=C.language),g.language=g.language||C.language,g.channelsCount=g.channelsCount||C.channelsCount,g.audioSamplingRate=g.audioSamplingRate||C.audioSamplingRate,gy(g),v.type!=y.ua||E.type!=y.Z||e.P&&!n1.includes(g.mimeType)||function(e,t,n){var i=t.stream,r=n.type,a=t.type;if(gq(e)&&(e.o.set(r,e.o.get(a)),e.o.set(a,new Map)),t.type=r,i.type=r,i.codecs=tu(r,n.codecs.split(/\s*,\s*/))||"",gy(i),e.h){for(n=(t=x(e.h.variants)).next();!n.done;n=t.next())n=n.value,"audio"==r&&n.video==i&&(n.video=null,n.audio||(n.audio=i,n.language=i.language));e.h.variants=e.h.variants.filter(function(e){return e.audio||e.video})}}(e,v,C),g.drmInfos.length&&e.i.newDrmInfo(g),M=!1,(!l&&g.closedCaptions||l&&g.closedCaptions&&l.size!=g.closedCaptions.size)&&(M=!0),e.h&&M&&e.i.makeTextStreamsForClosedCaptions(e.h),r==y.Pa&&(D=C.segmentIndex.Cb())&&D.ba&&(g.mimeType="application/mp4",gy(g)),R=sC(g),g.segmentIndex.qb(function(e){e.ba&&(e.ba.sd=R)}),function(e){if(!e.h||!e.h.variants.length)return!1;var t=[],n=[];e=x(e.h.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(!(t.length>0)||!!t.some(function(e){return e.segmentIndex}))&&(!(n.length>0)||!!n.some(function(e){return e.segmentIndex}))}(e)&&(e.vc?gk(e,[v]):(e.vc=!0,L=Array.from(e.j.values()).filter(function(e){return e.stream.segmentIndex}),gk(e,L),gm(e),(N=e.B)>0&&e.C.na(N))),gU(e,T.ea,g.type,S,f),e.h&&(e.h.startTime=e.u),t.o(0);break;case 2:if(j=t.l(),g.closeSegmentIndex(),7001===j.code)return t.return();if(!e.i.disableStream(g))throw j;t.j()}})))})))},g.closeSegmentIndex=function(){y&&!g.segmentIndex&&m.abort(),g.segmentIndex&&(g.segmentIndex.release(),g.segmentIndex=null),y=null},v}function gS(e){var t=1/0;e=x(e.j.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.Hc));return t}function gA(e,t){var n=[];t=x(t);for(var i=t.next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.qb(function(e){n.push(e)});e.m.fe(n)}function gk(e,t){if(!gq(e))for(var n=gS(e),i=x(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.hd(0,n);gA(e,t.map(function(e){return e.stream})),n=(i=Array.from(e.j.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=gq(e)&&!e.hb,n=!gq(e)&&e.hb&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?gp(e,t,i):(function(e,t){if(e.ia==1/0){t=x(t);for(var n=t.next();!n.done;n=t.next())null!=(n=n.value.stream.segmentIndex.Cb())&&null!=n.h&&(e.ia=Math.min(e.ia,n.h))}if((t=e.ia)!=1/0){n=x(e.j.values());for(var i=n.next();!i.done;i=n.next())if(!gI(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=r.Cb();if(a)if(null==a.h)W("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.R(),"Expect AV sync issues!");else for(gf(e,i,a.h-t-a.startTime),r=(i=x(r)).next();!r.done;r=i.next())r.value.Bh(t)}}}}(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&gp(e,t))}function gI(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function gE(e,t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y){var b,w,T,S,A,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V,H,G,K,q,z,W;return v=void 0===v||v,y=void 0===y||y,P(function(t){var X,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,eT,ex,eS,eA,ek,eI,eE;switch(t.h){case 1:if(b=o,T=(w=i.segments||[]).every(function(e){return!!f8(e.ea,"EXT-X-GAP")}),!w.length||T)throw new eJ(2,4,4053);if(ec=e,eh=f8((ed=i).ea,"EXT-X-PLAYLIST-TYPE"),ed=f8(ed.ea,"EXT-X-ENDLIST"),ed=eh&&"VOD"==eh.value||ed,eh=eh&&"EVENT"==eh.value&&!ed,eh=!ed&&!eh,ed?gz(ec,g5):eh?gz(ec,g8):gz(ec,g6),gq(e)&&gP(e,i),S=gq(e)?e.o.get(o):new Map,k=(A=g_(e,i,S,n,r,o)).segments,I=A.bandwidth,R=D=M=C=E=null,!(k.length>
10&&v)){t.A(2);break}return t.g((X=k,P(function(t){if(1==t.h)return(Y=sV(e.g.hls.mediaPlaylistFullMimeType),X.length)?($=(J=gV(e,X)).segment,Q=J.segmentIndex,(Z=sq($.R()[0]))&&(ee=g$.get(Z)))?t.return(sV(ee)):t.g(Promise.all([gg(e,$.ba,0),gg(e,$,Q)]),2):t.return(Y);if(en=(et=t.i)[1].mimeType,ei=et[0].data,er=et[1].data,ea="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),eo=["audio/mp4","video/mp4","video/iso.segment"],!(es=$.ba||eo.includes(en))&&oT(eO(er))){var n=er,i=e.g.disableAudio,r=e.g.disableVideo,a=e.g.disableText,o=eO(n),s=(new op).parse(o),u=s.Td();o=s.Jg();var l=[],c=!1,d=!1;if(!i)switch(u.audio){case"aac":case"aac-loas":s.rb().length&&(l.push("mp4a.40.2"),c=!0);break;case"mp3":s.rb().length&&(l.push("mp4a.40.34"),c=!0);break;case"ac3":s.rb().length&&(l.push("ac-3"),c=!0);break;case"ec3":s.rb().length&&(l.push("ec-3"),c=!0);break;case"opus":s.rb().length&&(l.push("opus"),c=!0)}if(!r)switch(u.video){case"avc":o.codec?l.push(o.codec):l.push("avc1.42E01E"),d=!0;break;case"hvc":o.codec?l.push(o.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(i=c&&!d,r=new Map,d&&!a){for(tk(a=new tA("video/mp2t"),n),d=(n=x(a.g.getStreams())).next();!d.done;d=n.next())d=d.value,r.set(d,d);a.g.clear()}o={type:i?"audio":"video",mimeType:"video/mp2t",codecs:l.join(", "),language:null,height:o.height,width:o.width,channelCount:null,sampleRate:null,closedCaptions:r,se:null,colorGamut:null,frameRate:o.frameRate,timescale:null}}else o=null;if(eu=o)return t.return(eu)}else if((es||ea.includes(Z))&&(el=function(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.Ea(),i=t.Ea();t.skip(50),p=String(n),h=String(i),e.reader.La()&&rb(e)}function r(e){var t=au(e.reader);f=t.channelCount,g=t.sampleRate,a(e.name)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":u.push(e+".42E01E"),c=!0;break;case"hev1":case"hvc1":u.push(e+".1.6.L93.90"),c=!0;break;case"dvh1":case"dvhe":u.push(e+".05.04"),c=!0;break;case"vp09":u.push(e+".00.10.08"),c=!0;break;case"av01":u.push(e+".0.01M.08"),c=!0;break;case"mp4a":s.push("mp4a.40.2"),l=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(e),l=!0;break;case"apac":s.push("apac.31.00"),l=!0}}var o,s=[],u=[],l=!1,c=!1,d=null,h=null,p=null,f=null,g=null,m=null,v=null,y=null;if((new ry).box("moov",rb).box("trak",rb).box("mdia",rb).ma("mdhd",function(e){d=(e=ao(e.reader,e.version)).language,y=e.timescale}).box("minf",rb).box("stbl",rb).ma("stsd",rw).box("mp4a",function(e){var t=au(e.reader);f=t.channelCount,g=t.sampleRate,e.reader.La()?rb(e):a(e.name)}).box("esds",function(e){e=e.reader;for(var t,n,i="mp4a";e.La();){t=e.Y();for(var r=e.Y();128&r;)r=e.Y();if(3==t)e.Ea(),128&(r=e.Y())&&e.Ea(),64&r&&e.skip(e.Y()),32&r&&e.Ea();else if(4==t)n=e.Y(),e.skip(12);else if(5==t)break}n&&(i+="."+ac(n),5==t&&e.La()&&(31==(n=(248&(t=e.Y()))>>3)&&e.La()&&(n=32+((7&t)<<3)+((224&e.Y())>>5)),i+="."+n)),s.push(i),l=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(e){var t=o||"";switch(o){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+ac(e.Y())+ac(e.Y())+ac(e.Y()),u.push(e),c=!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.Y())>>6],r=31&e,a=n.V(),s=(32&e)>>5?"H":"L";e=[n.Y(),n.Y(),n.Y(),n.Y(),n.Y(),n.Y()],n=n.Y();for(var l=0,d=0;d<32&&(l|=1&a,31!=d);d++)l<<=1,a>>=1;for(t=t+"."+i+r+"."+ac(l,!0)+("."+s)+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,u.push(t),c=!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.Y(),n=n.Y(),u.push(t+"."+ad(e>>1&127)+"."+ad(e<<5&32|n>>3&31)),c=!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.Y(),n=n.Y(),u.push(t+"."+ad(e>>1&127)+"."+ad(e<<5&32|n>>3&31)),c=!0}).ma("vpcC",function(e){var t=o||"",n=e.reader;e=n.Y();var i=n.Y();n=n.Y()>>4&15,u.push(t+"."+ad(e)+"."+ad(i)+"."+ad(n)),c=!0}).box("av1C",function(e){var t=o||"";"dav1"===o&&(t="av01");var n=e.reader;n.skip(1),e=n.Y(),n=n.Y();var i=e>>>5,r=(64&n)>>6;u.push(t+"."+i+"."+ad(31&e)+(n>>>7?"H":"M")+"."+ad(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+ad(1)+"."+ad(1)+"."+ad(1)+".0"),c=!0}).box("enca",rx).box("encv",rT).box("sinf",rb).box("frma",function(e){a(e=al(e.reader).codec)}).box("colr",function(e){u=u.map(function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.Ra(),r=n.Nb(4,!1),a=String.fromCharCode(r[0]);if(a+=String.fromCharCode(r[1]),a+=String.fromCharCode(r[2]),"nclx"===(a+=String.fromCharCode(r[3]))){r=n.Ea(),a=n.Ea();var o=n.Ea(),s=n.Y()>>7,u=t.split(".");10==u.length&&(u[6]=ad(r),u[7]=ad(a),u[8]=ad(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t});var t=function(e){var t=null,n=null,i=e.Nb(4,!1),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){switch(e.Ea()){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.Ea(),e.Ea(),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,se:n}}(e.reader),n=t.colorGamut;m=t.se,v=n}).parse(e||t,!0,!0),!s.length&&!u.length)return null;var b=l&&!c,w=new Map;if(c&&!n){n=new tA("video/mp4"),e&&n.init(e);try{tk(n,t);for(var T=x(n.g.getStreams()),S=T.next();!S.done;S=T.next()){var A=S.value;w.set(A,A)}}catch(e){}n.g.clear()}return{type:b?"audio":"video",mimeType:b?"audio/mp4":"video/mp4",codecs:sH(s.concat(u)).join(", "),language:d,height:h,width:p,channelCount:f,sampleRate:g,closedCaptions:w,se:m,colorGamut:v,frameRate:null,timescale:y}}(ei,er,e.g.disableText)))return t.return(el);return en?t.return(sV(en)):t.return(Y)})),3);case 3:L=t.i,o!=L.type&&gq(e)&&(e.o.set(L.type,e.o.get(o)),e.o.set(o,new Map)),o=L.type,s=L.language,c=L.channelCount,f=L.sampleRate,e.g.disableText||(d=L.closedCaptions),C=L.height,E=L.width,M=L.se,D=L.colorGamut,R=L.frameRate,y&&(m=L.mimeType,a=L.codecs);case 2:if(m){t.A(4);break}return t.g((ep=e,ef=o,eg=a,em=k,P(function(e){switch(e.h){case 1:if(ev=rs,2==(ey=gV(ep,em).segment).status)return e.return(gF(ef));if((eT=sq((ew=ey.R())[0]))&&((ex=g2.get(ef).get(eT))||(ex=g$.get(eT))))return e.return(ex);if(eb=gB(ef,eg))return e.return(eb);return eA=1,ek=ri(ew,ep.g.retryParameters),e.m(2),ek.method="HEAD",e.g(gW(ep,ek,ev,{type:eA}).promise,4);case 4:eS=(eI=e.i).headers["content-type"],e.o(3);break;case 2:if(!(eE=e.l())||1002!=eE.code&&1001!=eE.code){e.A(3);break}return ek.method="GET",ep.g.hls.allowRangeRequestsToGuessMimeType&&(ek.headers.Range="bytes=0-0"),e.g(gW(ep,ek,ev,{type:eA}).promise,6);case 6:eS=(eI=e.i).headers["content-type"];case 3:if(!eS){e.A(7);break}if(!g3.includes(eb=eS.toLowerCase().split(";")[0])){e.A(8);break}if(eI.data.byteLength){e.A(9);break}return ek.method="GET",e.g(gW(ep,ek,ev,{type:eA}).promise,10);case 10:eI=e.i;case 9:oT(eO(eI.data))&&(eb="video/mp2t");case 8:if(!g3.includes(eb))return e.return(eb);case 7:return e.return(gF(ef))}})),5);case 5:m=t.i,o!=tc||a||"application/mp4"!=m||!k[0]||k[0].ba||(m="text/vtt");case 4:return"video"==b&&n1.includes(m)&&(o="audio"),t.g(gD(e,i,m,r,n),6);case 6:if(j=(N=t.i).drmInfos,O=N.keyIds,U=N.encrypted,_=N.Nh,U&&!j.length&&!_)throw new eJ(2,4,4026);return(B=gM(e,a,o,s,u,l,c,d,h,p,f,g)).encrypted=U&&!_,B.drmInfos=j,B.keyIds=O,B.mimeType=m,I&&(B.bandwidth=I),gy(B),"video"==o&&(E||C||M||D)&&gH(B,E,C,R,M,null,D),gq(e)&&gP(e,i),F=k[0].startTime,V=k[k.length-1].endTime,B.segmentIndex=new sy(k),G=!!(H=f8(i.ea,"EXT-X-SERVER-CONTROL"))&&null!=f0(H,"CAN-SKIP-UNTIL"),K=!!H&&null!=f0(H,"CAN-BLOCK-RELOAD"),z=(q=gC(f9(i.ea,"EXT-X-MEDIA-SEQUENCE",0),k)).Lb,W=q.Mb,t.return({stream:B,type:o,zf:[],R:r,Qc:F,Hc:V,Pe:G,Oe:K,Xd:!1,ng:-1,Lb:z,Mb:W,nf:S})}})}function gC(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Lb:++e,Mb: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.o&&(n=0)),{Lb:e,Mb:n}}function gM(e,t,n,i,r,a,o,s,u,l,c,d){var h=gB(n,t)||gF(n),p=[];if(u){u=x(u.split(","));for(var f=u.next();!f.done;f=u.next())p.push(f.value)}return f=void 0,u=null,n==tc?f=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired"),p.length||"subtitle"!==f||p.push("subtitle"),f=null,"video"!=n&&(f=a),gy(e={id:e.G++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==tc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ic(i||"und"),originalLanguage:i,label:f,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:p,forced:l,channelsCount:o,audioSamplingRate:c,spatialAudio:d,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}),e}function gD(e,t,n,i,r){var a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,S,A,k,I,E,C,M,D,R,L,N;return P(function(P){switch(P.h){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=(o=x(t.segments)).next();!s.done;s=o.next())if(l=f5((u=s.value).ea,"EXT-X-KEY"),c=null,l.length)for(c=gj(e,t,u.ea,i,r),h=(d=x(l)).next();!h.done;h=d.next())p=h.value,a.set(p,c)}g=f=!1,m=[],v=new Set,b=(y=x(a)).next();case 2:if(b.done){P.A(4);break}if(T=(w=x(b.value)).next().value,S=w.next().value,A=T,k=S,"NONE"==(I=f2(A,"METHOD"))){P.A(3);break}
1if(f=!0,E=f1(A,"KEYFORMAT")||"identity",C=null,gX(I)){g=!0,P.A(3);break}if("identity"==E)return P.g(gY(e,A,n,i,k,r),11);if(!(M=e.$b.get(E))){D=null,P.A(9);break}return P.g(M(A,n,k),10);case 10:D=P.i;case 9:C=D,P.A(6);break;case 11:C=P.i;case 6:if(C){if(C.keyIds)for(L=(R=x(C.keyIds)).next();!L.done;L=R.next())N=L.value,v.add(N);m.push(C)}case 3:b=y.next(),P.A(2);break;case 4:return P.return({drmInfos:m,keyIds:v,encrypted:f,Nh:g})}})}function gR(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 eJ(2,4,4042);var o=0,s=f1(n,"IV","");if(s){var u=te(s.substr(2));if(16!=u.byteLength)throw new eJ(2,4,4048)}else o=f9(i.ea,"EXT-X-MEDIA-SEQUENCE",0);var l=f7(r(),f2(n,"URI"),a),c=l.sort().join("");if(i=n.toString()+"-"+o+"-"+c,!t.va.has(i)){var d={bitsKey:128,blockCipherMode:"CBC",iv:u,firstMediaSequenceNumber:o};switch(f2(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 P(function(o){if(1==o.h)return t.O.has(c)||(n=ri(l,t.g.retryParameters),i=gW(t,n,6).promise,t.O.set(c,i)),o.g(t.O.get(c),2);if(3!=o.h){if(!(r=o.i).data||r.data.byteLength!=d.bitsKey/8)throw new eJ(2,4,4049);return a={name:"CTR"==d.blockCipherMode?"AES-CTR":"AES-CBC",length:d.bitsKey},o.g(e.crypto.subtle.importKey("raw",r.data,a,!0,["decrypt"]),3)}d.cryptoKey=o.i,d.fetchKey=void 0,o.j()})},t.va.set(i,d)}return t.va.get(i)}function gL(e,t){null==e.u&&(t=f8(t.ea,"EXT-X-START"))&&(e.u=Number(f2(t,"TIME-OFFSET")))}function gP(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;r>=0;){var a=f8(i[r].ea,"EXTINF");if(a){n=gn(a);break}r--}if(!(i=f8(t.ea,"EXT-X-TARGETDURATION")))throw new eJ(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=f8(t.ea,"EXT-X-PART-INF"))&&(e.T=Number(f2(r,"PART-TARGET"))),t=f8(t.ea,"EXT-X-SERVER-CONTROL"),e.qa&&e.T?(e.B=e.uc?5*e.T<=n?Math.min(e.T,e.B):Math.min(n,e.B):Math.min(e.T,e.B),e.Ua=t?Number(f2(t,"PART-HOLD-BACK")):0):(e.B=Math.min(n,e.B),e.Ka=(n=t?f0(t,"HOLD-BACK"):null)?Number(n.value):0),e.eb=Math.max(i,e.eb)}function gN(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ua)n=e.Ua;else if(e.Ka)n=e.Ka;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var a=f8(t.segments[r].ea,"EXTINF");n=a?n+gn(a):n+e.eb}e.u&&e.u<0&&(n=Math.min(-e.u,n),e.u+=n),e.m.Si(0),e.m.qh(n),e.m.Vc(!1)}function gj(e,t,n,i,r){var a=f8(n,"EXT-X-MAP");if(!a)return null;var o=f2(a,"URI"),s=f7(i(),o,r);if(o=[s.toString(),f1(a,"BYTERANGE","")].join("-"),!e.Ca.has(o)){var u,l,c,d,h,p,f,g=void 0,m=null,v=!1;n=x(n);for(var y=n.next();!y.done;y=n.next())"EXT-X-KEY"==(y=y.value).name?gX(v=f2(y,"METHOD"))&&y.id<a.id?(v=!1,g=gR(e,y,t,i,r)):v="NONE"!=v:"EXT-X-BYTERANGE"==y.name&&y.id<a.id&&(m=y);u=s,l=a,c=m,d=g,h=v,p=0,f=null,(l=f1(l,"BYTERANGE"))||!c||(l=c.value),l&&(f=Number((p=l.split("@"))[0]),f=(p=Number(p[1]))+f-1,d&&(c=f+1-p)%16&&(f+=16-c%16)),t=new aB(function(){return u},p,f,null,null,null,d,h),e.Ca.set(o,t)}return e.Ca.get(o)}function gO(e,t){var n=0,i=null;return t&&(t=Number((n=t.split("@"))[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function gU(e,t,n,i,r){if("video"==n||"audio"==n){var a=e.m.m;if(null!=a&&!gI(e,n))for(t=(t=f5(t,"EXT-X-DATERANGE")).filter(function(e){return null!=f0(e,"START-DATE")}).sort(function(e,t){return(e=f2(e,"START-DATE"))<(t=f2(t,"START-DATE"))?-1:+(e>t)}),n=0;n<t.length;n++){var o=t[n];try{var s=f2(o,"START-DATE"),u=t5(s);if(!isNaN(u)){var l=Math.max(0,u-a),c=null,d=f1(o,"END-DATE");if(d){var h=t5(d);if(!isNaN(h)&&(c=h-a)<0)continue}if(null==c){var p=f1(o,"DURATION")||f1(o,"PLANNED-DURATION");if(p){var f=parseFloat(p);if(isNaN(f)||(c=l+f),u-a+f<0)continue}}var g=f1(o,"CLASS")||"com.apple.quicktime.HLS",m="YES"==f1(o,"END-ON-NEXT");if(null==c&&m){for(var v=n+1;v<t.length;v++){var y=f1(t[v],"CLASS")||"com.apple.quicktime.HLS";if(g==y){var b=f2(t[v],"START-DATE"),w=t5(b);if(!isNaN(w)&&w&&w>u){c=Math.max(0,w-a);break}}}if(null==c)continue}v=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var T=[],S=x(o.attributes),A=S.next();!A.done;A=S.next()){var k=A.value;if(!v.includes(k.name)){var I=gt(k.value,i);("X-ASSET-URI"==k.name||"X-ASSET-LIST"==k.name)&&(I=f7(r(),k.value,i)[0]),T.push({key:k.name,description:"",data:I,mimeType:null,pictureType:null})}}T.length>1&&e.i.onMetadata(g,l,c,T)}}catch(e){}}}}function g_(t,n,i,r,a,o){var s=n.segments,u=null,l=null,c=null,d=null,h=void 0,p=f9(n.ea,"EXT-X-DISCONTINUITY-SEQUENCE",-1),f=f9(n.ea,"EXT-X-MEDIA-SEQUENCE",0),g=f8(n.ea,"EXT-X-SKIP"),m=g?Number(f1(g,"SKIPPED-SEGMENTS")):0,v=f+m,y=0;gq(t)&&i.has(v)&&(y=i.get(v)),0===y&&t.Ha==g8&&i.size>0&&!i.has(v)&&null!=t.m.i&&(y=t.m.Fb());var b=[],w=null;g=[];for(var T=0;T<s.length;T++){var S=s[T];(v=f8(S.ea,"EXT-X-MAP"))&&v.id!==l&&(u=gj(t,n,S.ea,a,r),l=v.id);var A="";(v=S.g)&&(A=sq(v)),A!==d&&(c=function(e){if(!(e=sq(e)))return null;var t=g2.get(o).get(e);return t||(t=g$.get(e)),t}(v),d=A),A=0==T?y:w.endTime,v=f+m+T,f8(S.ea,"EXT-X-DISCONTINUITY")&&(p++,w&&w.ba&&(w.ba.g=A));for(var k=x(S.ea),I=k.next();!I.done;I=k.next())"EXT-X-KEY"==(I=I.value).name&&(h=gX(f2(I,"METHOD"))?gR(t,I,n,a,r):void 0);if(i.set(v,A),A=function(t,n,i,r,a,o,s,u,l,c){var d=r.ea,h=f8(d,"EXTINF"),p=0,f=0,g=null;r.sc.length&&(t.h.isLowLatency=!0);var m=null;if(!t.g.hls.ignoreManifestProgramDateTime){var v=f8(d,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(m=t5(v.value),t.hb=!0)}var y=aG;if(f8(d,"EXT-X-GAP")&&(t.h.gapCount++,y=2),!h){if(0==r.sc.length)throw new eJ(2,4,4024,"EXTINF");if(!t.qa)return null}var b=[];v=!1;var w=null,T=!1,S=!1;if(t.qa&&r.sc.length){p=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var A=m,k={},I=0;I<r.sc.length;k={Qf:void 0,ie:void 0},I++){var E=r.sc[I],C=0==I?i:b[b.length-1],M=0==I?a:C.endTime,D=Number(f1(E,"DURATION"))||t.T;if(D){var R=M+D,L=0,P=null;
1if("EXT-X-PRELOAD-HINT"==E.name?(L=(L=f1(E,"BYTERANGE-START"))?Number(L):0,(C=f1(E,"BYTERANGE-LENGTH"))?P=L+Number(C)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=(P=x(gO(C,L=f1(E,"BYTERANGE")))).next().value,P=P.next().value),k.ie=f1(E,"URI"),k.ie){C=aG,"YES"==f1(E,"GAP")&&(t.h.gapCount++,C=2,T=!0),k.Qf=null;var N=function(e){return function(){return null==e.Qf&&(e.Qf=f7(u(),e.ie,o)),e.Qf}}(k);p&&L>=0&&null!=P&&(w=N,v=!0),M=new aV(M,R,N,L,P,n,0,0,1/0,[],"",null,A,C,c),"EXT-X-PRELOAD-HINT"==E.name&&(M.Sg(),S=!0),"YES"!=f1(E,"INDEPENDENT")&&I>0&&M.rd(),(E=l)||(b.length&&b[0].mimeType?E=b[0].mimeType:k.ie&&(k=sq(k.ie),E=g2.get(s).get(k)||null)),E&&(M.mimeType=E,g4.has(E)&&(M.ba=null)),b.push(M),A&&(A+=D)}}}}if(h){if(0==(h=gn(h)))return null;p=a+h}else{if(!b.length)return null;p=b[b.length-1].endTime}v&&(T||0!=b[0].startByte?(v=!1,w=null):b=[]),(h=f8(d,"EXT-X-BYTERANGE"))?(f=(g=x(gO(i,h.value))).next().value,g=g.next().value):b.length&&(f=b[0].startByte,g=b[b.length-1].endByte),i="",h=null,"image"==s&&(i="1x1",s=f8(d,"EXT-X-TILES"))&&(i=f2(s,"LAYOUT"),(s=f1(s,"DURATION"))&&(h=Number(s)));var j=null;return n=new aV(a,p,function(){return w?w():(null==j&&(j=f7(u(),r.g,o)),j||[])},f,g,n,0,0,1/0,b,i,h,m,y,c,b.length>0&&!!r.g),l&&(n.mimeType=l,g4.has(l)&&(n.ba=null)),v&&(t.uc=!0,n.ti(),S&&n.Sg()),n}(t,u,w,S,A,r,o,a,c,h)){if((w=f9(S.ea,"EXT-X-BITRATE"))?(g.push({bitrate:w,duration:A.endTime-A.startTime}),A.bandwidth=w):A.endByte?(S=aH(A))&&(S=8*S/(w=A.endTime-A.startTime)/1e3,g.push({bitrate:S,duration:w}),A.bandwidth=S):g.length&&(w=g[g.length-1],w.duration+=A.endTime-A.startTime,A.bandwidth=w.bitrate),A.bandwidth)for(S=(w=x(A.g)).next();!S.done;S=w.next())S.value.bandwidth=A.bandwidth;w=A,A.i=p,gI(t,o)&&null!=t.N&&v<t.N||b.push(A)}}if(n=void 0,g.length&&(n=g.reduce(function(e,t){return e+t.duration},0),n=Math.round(g.reduce(function(e,t){return e+t.bitrate*t.duration},0)/n*1e3)),g=b.some(function(e){return null!=e.h})){for(i={},r=0;r<b.length;i={Ve:void 0,Ue:void 0,Le:void 0,Sc:void 0,Ke:void 0},r++)if(i.Sc=b[r],null==i.Sc.h)for(i.Ue=0,i.Ve=r,a=function(e){return function(){var t=b[e.Ve];if(t){if(null!=t.h)return t.h+e.Ue;e.Ue-=t.endTime-t.startTime,e.Ve+=1}return null}}(i),i.Ke=0,i.Le=r,s=function(e){return function(){var t=b[e.Le];if(t){if(t!=e.Sc&&(e.Ke+=t.endTime-t.startTime),null!=t.h)return t.h+e.Ke;--e.Le}return null}}(i);null==i.Sc.h;)i.Sc.h=s(),null==i.Sc.h&&(i.Sc.h=a())}if(g)for(r=(i=x(b)).next();!r.done;r=i.next())for(r=(a=r.value).h,s=(a=x(a.g)).next();!s.done;s=a.next())(s=s.value).h=r,r+=s.endTime-s.startTime;if(i=t.ia,g&&i!=1/0&&!gI(t,o))for(g=(t=x(b)).next();!g.done;g=t.next())g.value.Bh(i);return{segments:b,bandwidth:n}}function gB(e,t){if(e==tc){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 gF(e){return e==tc?"text/vtt":g2.get(e).get("mp4")}function gV(e,t){e=gq(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];2==n.Wb()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function gH(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 gG(e,t,n){return gW(e,ri(t,e.g.retryParameters),0,{type:n?2:3})}function gK(e){var t,n,i,r,a;return P(function(o){switch(o.h){case 1:if(!e.i)return o.return();return o.m(2),t=Date.now(),o.g(e.update(),4);case 4:n=Date.now(),gq(e)&&(i=(n-t)/1e3,e.Xb.sample(1,i),isFinite(r=Math.max(0,(e.g.updatePeriod>0?e.g.updatePeriod:e.B)-K(e.Xb)))?e.C.na(r):e.C.na(1)),o.o(3);break;case 2:if(a=o.l(),!e.i)return o.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(a),o.return();a.severity=1,e.i.onError(a),e.C.na(.1);case 3:if(!e.i)return o.return();e.i.onManifestUpdated(),o.j()}})}function gq(e){return e.Ha!=g5}function gz(e,t){e.Ha=t,e.m&&e.m.Vc(!gq(e)),gq(e)||e.C.stop()}function gW(e,t,n,i){if(!e.aa)throw new eJ(2,7,7001);return i||(i={}),i.isPreload=e.Zb(),t=e.i.networkingEngine.request(n,t,i),i7(e.aa,t),t}function gX(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function gY(t,n,i,r,a,o){var s,u,l,c,d,h,p,f,g,m;return P(function(v){switch(v.h){case 1:if("video/mp2t"==i)throw new eJ(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new eJ(2,4,4041);if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s=f2(n,"METHOD")))return v.return(null);if((u=f7(r(),f2(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=tt(e7(u[0].split("data:text/plain;base64,").pop())),v.A(2);break}
1return c=u.sort().join(""),t.ya.has(c)||(d=ri(u,t.g.retryParameters),h=gW(t,d,6).promise,t.ya.set(c,h)),v.g(t.ya.get(c),3);case 3:l=tt(v.i.data);case 2:if(p="00000000000000000000000000000000",!a){v.A(4);break}return v.g(gJ(t,a),5);case 5:(f=v.i)&&(p=f);case 4:return(g=new Map).set(p,l),m="cenc","SAMPLE-AES"==s&&(m="cbcs"),v.return(to(g,m))}})}function gJ(e,t){var n,i,r,a;return P(function(o){var s,u;return 1==o.h?(n=null,e.za.has(t))?(n=e.za.get(t),o.A(2)):(i=sz(t.R(),t.Fc(),t.Dc(),e.g.retryParameters),r=rs,o.g(gW(e,i,r,{type:0}).promise,3)):(2!=o.h&&(a=o.i,t.me(a.data),s=a.data,u=null,(new ry).box("moov",rb).box("trak",rb).box("mdia",rb).box("minf",rb).box("stbl",rb).ma("stsd",rw).box("encv",rT).box("enca",rx).box("sinf",rb).box("schi",rb).ma("tenc",function(e){(e=e.reader).Y(),e.Y(),e.Y(),e.Y(),u=tt(e=e.Nb(16,!1))}).parse(s,!0),n=u,e.za.set(t,n)),o.return(n))})}H("shaka.net.DataUriPlugin",gu),gu.parse=gl,rt("data",gl),(p=gd.prototype).configure=function(e,t){var n=this.i&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.Zb=t),this.l&&this.l.configure(this.g),n&&this.h&&this.h.presentationTimeline.U()&&this.C.yb()},p.start=function(e,t){var n,i=this;return P(function(r){var a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V,H,G,K,q,z,W,X,Y,J,$;return 1==r.h?(i.i=t,i.qa=t.isLowLatencyMode(),r.g(gG(i,[e]).promise,2)):3!=r.h?(i.H=(n=r.i).uri,r.g((a=i,o=n.data,P(function(e){var t,n,i,r,Q,ee,et,en,ei,er,ea,eo,es,eu,el,ec,ed,eh,ep,ef,eg,em,ev,eb,ew,eT,ex,eS,eA,ek,eI,eE,eC,eM,eD,eR,eL,eP,eN,ej,eO,eU,e_,eB,eV,eH,eG,eK,eq,ez,eW,eX,eY,e$,eQ,eZ;switch(e.h){case 1:if(s=td,l=f5((u=gr(a.ab,o)).ea,"EXT-X-DEFINE"),c=[],d=[],h=[],a.m=new o3(null,0),a.m.Vc(!0),p=function(){return[a.H]},f=null,g=new Map,a.h={presentationTimeline:a.m,variants:c,textStreams:d,imageStreams:h,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},1==u.type)return a.S=!1,g=gv(a,f5(u.ea,"EXT-X-DEFINE"),a.H),f=s.ua,V="",H=new Map,e.g(gE(a,a.G++,g,u,p,"",f,V,!0,"Media Playlist",null,H,null,!1,null,!1),7);return function(e,t){var n=new ey(e.H).g;t=x(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=f1(r,"NAME");var a=f1(r,"VALUE");r=f1(r,"QUERYPARAM"),i&&a&&(e.D.has(i)||e.D.set(i,a)),r&&(i=n.get(r)[0])&&!e.D.has(i)&&e.D.set(r,i)}}(a,l),m=f5(u.ea,"EXT-X-MEDIA"),v=f5(u.ea,"EXT-X-STREAM-INF"),y=f5(u.ea,"EXT-X-IMAGE-STREAM-INF"),b=f5(u.ea,"EXT-X-I-FRAME-STREAM-INF"),w=f5(u.ea,"EXT-X-SESSION-KEY"),T=f5(u.ea,"EXT-X-SESSION-DATA"),A=f5(u.ea,"EXT-X-CONTENT-STEERING"),function(e,t){t=x(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f1(i,"DATA-ID");n=f1(i,"URI");var a=f1(i,"LANGUAGE");i=f1(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",f7([e.H],n,e.D)[0]),a&&r.set("language",a),i&&r.set("value",i),n=new i3("sessiondata",r),e.i&&e.i.onEvent(n)}}(a,T),e.g((t=a,n=A,P(function(e){if(!t.i||!t.g)return e.return();for(Q=(r=x(n)).next();!Q.done;Q=r.next())if(et=f1(ee=Q.value,"PATHWAY-ID"),en=f1(ee,"SERVER-URI"),et&&en){t.l=new pL(t.i),t.l.configure(t.g),t.l.i=[t.H],t.l.setManifestType("HLS"),t.l.h=et,i=pP(t.l,en);break}return e.g(i,0)})),4);case 4:if(!a.g.ignoreSupplementalCodecs){for(k=[],E=(I=x(v)).next(),C={};!E.done;C={aj:void 0},E=I.next())(D=f1(M=E.value,"SUPPLEMENTAL-CODECS"))&&(C.aj=D.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),R=M.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.aj.join(","),(t=t.value.split(",")).length>1&&(t=tu("audio",t))&&(i+=","+t)),new f3(n,i)}}(C)),k.push(new fQ(M.id,M.name,R,null)));for(v.push.apply(v,S(k)),L=[],j=(N=x(b)).next(),O={};!j.done;O={bj:void 0},j=N.next())(_=f1(U=j.value,"SUPPLEMENTAL-CODECS"))&&(O.bj=_.split(/\s*,\s*/).map(function(e){return e.split("/")[0]}),B=U.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.bj.join(",")),new f3(n,t)}}(O)),L.push(new fQ(U.id,U.name,B,null)));b.push.apply(b,S(L))}return function(e,t){t=x(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f1(i,"AUDIO");n=f1(i,"VIDEO");var a=f1(i,"SUBTITLES");if(i=gb(e,i),a){var o=tu(tc,i);e.K.set(a,o),Z(i,o)}r&&((a=tu("audio",i))||(a=e.g.hls.defaultAudioCodec),e.K.set(r,a)),n&&((r=tu("video",i))||(r=e.g.hls.defaultVideoCodec),e.K.set(n,r))}}(a,v),function(e,t){e.S=0==(t=f6(t,"CLOSED-CAPTIONS")).length,t=x(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=f1(i,"LANGUAGE");n=ic(r||"und"),r||(r=f1(i,"NAME"))&&(n=r),r=f2(i,"GROUP-ID"),i=f2(i,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(r)||e.J.set(r,new Map),e.J.get(r).set(i,n)}}(a,m),ei=a,F=b.map(function(e){return"video"!==(e=gT(ei,e)).stream.type?null:e.stream}).filter(function(e){return e}),e.g((er=a,ea=v,eo=w,es=m,eu=p,el=a.D,ec=F,P(function(e){switch(e.h){case 1:if(ed=[],eh=new Set,er.g.ignoreDrmInfo||!(eo.length>0)){e.A(2);break}ef=(ep=x(eo)).next();case 3:if(ef.done){e.A(2);break}if(em=f2(eg=ef.value,"METHOD"),ev=f1(eg,"KEYFORMAT")||"identity",eb=null,"NONE"==em){e.A(4);break}if(gX(em)){eT=(ew=f7(eu(),f2(eg,"URI"),el)).sort().join(""),er.O.has(eT)||(ex=ri(ew,er.g.retryParameters),eS=gW(er,ex,6).promise,er.O.set(eT,eS)),e.A(4);break}if("identity"==ev)return e.g(gY(er,eg,"",eu,null,el),12);if(!(eA=er.$b.get(ev))){ek=null,e.A(10);break}return e.g(eA(eg,"",null),11);case 11:ek=e.i;case 10:eb=ek,e.A(6);break;case 12:eb=e.i;
1case 6:if(eb){if(eb.keyIds)for(eE=(eI=x(eb.keyIds)).next();!eE.done;eE=eI.next())eC=eE.value,eh.add(eC);ed.push(eb)}case 4:ef=ep.next(),e.A(3);break;case 2:for(eM={},eR=(eD=x(ea)).next();!eR.done;eR=eD.next())eM[eP=fZ(eL=eR.value,!er.l)]?eM[eP].push(eL):eM[eP]=[eL];for(ej in eN=[],eM)e_=f1(eU=(eO=eM[ej])[0],"FRAME-RATE"),eB=Number(f2(eU,"BANDWIDTH"))||Number(f1(eU,"AVERAGE-BANDWIDTH")),eG=(eH=x((eV=f1(eU,"RESOLUTION"))?eV.split("x"):[null,null])).next().value,eK=eH.next().value,eq=f1(eU,"VIDEO-RANGE"),(ez=f1(eU,"REQ-VIDEO-LAYOUT"))&&ez.includes(",")&&(ez=ez.split(",").filter(function(e){return"CH-STEREO"==e||"CH-MONO"==e})[0]),ez=ez||"CH-MONO",eW=function(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,u=x(t),l=u.next();!l.done;l=u.next()){var c=l.value;l=f1(c,"AUDIO");var d=f1(c,"VIDEO"),h=l||d;h&&(a.includes(h)||a.push(h),(c=f1(c,"PATHWAY-ID"))&&r.set(h,c),l?o=!0:d&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter(function(e){var t=f1(e,"URI")||"";return"SUBTITLES"!=(e=f1(e,"TYPE"))&&(""!=t||"AUDIO"==e)});var i={};t=x(t);for(var r=t.next();!r.done;r=t.next()){var a=fZ(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)gw(e,i[o],n,!1)}(e,n=n.filter(function(e){return a.includes(f2(e,"GROUP-ID"))}),r),n=(r=a.sort().join(","))&&e.M.has(r)?e.M.get(r):[],o?i.audio.push.apply(i.audio,S(n)):s&&i.video.push.apply(i.video,S(n)),s=!1;var p=t.map(function(e){return f2(e,"URI")});return o=i.audio.find(function(e){return e&&e.R().find(function(e){return p.includes(e)})}),u=tu("video",n=gb(e,t[0])),(l=tu("audio",n))&&!u?(o="audio",s=i.audio.length>0&&!i.audio.some(function(e){return e.stream.isAudioMuxedInVideo})):!i.audio.length&&!i.video.length&&l&&u?(o="video",n=[[u,l].join()]):i.audio.length&&o?(o="audio",s=!0):o=i.video.length&&!i.audio.length?"audio":"video",s||(t=function(e,t,n,i){for(var r=e.G++,a=[],o=x(t),s=o.next();!s.done;s=o.next()){var u=s.value;s=f2(u,"URI"),u=f1(u,"PATHWAY-ID"),e.l&&u&&pN(e.l,r,u,s),a.push(s)}if(o=a.sort().join(",")+n.sort().join(","),e.j.has(o))return e.j.get(o);s=a.join(",");e:{if(t=f1(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.S=!1,t=null;break e}if(t){if("NONE"!=t){t=e.J.get(t);break e}e.S=!1}else if(!t&&e.J.size)for(t=(t=x(e.J.keys())).next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return i=gx(e,r,a,n=ts(i,n),i,null,!1,s,null,t,null,!1,null,!1),e.j.set(o,i),i}(e,t,n,o),r&&e.g.enableAudioGroups&&(t.stream.groupId=r),"audio"==t.stream.type&&"audio"===o&&i.audio.some(function(e){return e.stream.isAudioMuxedInVideo})&&(e=i.audio[0].stream,t.stream.language=e.language,t.stream.channelsCount=e.channelsCount,t.stream.label=e.label,t.stream.audioSamplingRate=e.audioSamplingRate,t.stream.originalId=e.originalId,t.stream.originalLanguage=e.originalLanguage),i[t.stream.type]=[t]),i}(er,eO,es),eN.push.apply(eN,S(function(e,t,n,i,r,a,o,s,u,l,c,d){for(var h=x(n),p=h.next();!p.done;p=h.next())gH(p.value.stream,r,a,o,s,u,null);for(r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r&&(t=t.filter(function(e){return!e.stream.isAudioMuxedInVideo})),r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=[],a=(t=x(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=x(n)).next();!s.done;s=o.next()){var f=s.value;(s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=c),(u=f?f.stream:null)&&(u.drmInfos=l,u.keyIds=c,e.g.disableIFrames||iO(u,d)),u&&!s&&(u.bandwidth=i),!u&&s&&(s.bandwidth=i),h=a?a.stream.drmInfos:null,p=f?f.stream.drmInfos:null,f=f?f.R().sort().join(","):"";var g=a?a.R().sort().join(","):"",m=[];s&&s.codecs&&m.push(s.codecs),u&&u.codecs&&m.push(u.codecs),f=[f,g,m.sort()].join("-"),s&&u&&!eF(h,p)||e.ib.has(f)||(s={id:e.G++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.ib.add(f))}return r}(er,eW.audio,eW.video,eB,eG,eK,e_,eq,ez,ed,eh,ec)));return e.return(eN.filter(function(e){return null!=e}))}})),5);case 5:return c=e.i,d=function(e,t){var n=f6(t,"SUBTITLES"),i={};t=x(n);for(var r=t.next();!r.done;r=t.next()){var a=fZ(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}if(t=[],!e.g.disableText)for(var o in i)try{t.push(gw(e,i[o],new Map).stream)}catch(t){if(!e.g.hls.ignoreTextStreamFailures)throw t}for(n=(o=x(n)).next();!n.done;n=o.next())if(i=f2(n.value,"GROUP-ID"),(n=e.K.get(i))&&(i=e.M.get(i)))for(r=(i=x(i)).next();!r.done;r=i.next())(r=r.value).stream.codecs=n,r.stream.mimeType=gB(tc,n)||gF(tc),gy(r.stream);return t.filter(function(e){return e})}(a,m),e.g((eX=a,eY=y,e$=b,P(function(e){return 1==e.h?(eQ=eY.map(function(e){var t,n;return P(function(i){if(1==i.h){var r,a,o,s,u,l,c,d,h,p,f;return eX.g.disableThumbnails?i.return(null):(i.m(2),i.g((r=eX,a=e,P(function(e){return 1==e.h?(o=f2(a,"URI"),s=f1(a,"CODECS","jpeg")||"",r.j.has(o))?e.return(r.j.get(o)):(u=f1(a,"LANGUAGE"),l=f1(a,"NAME"),c=f1(a,"CHARACTERISTICS"),d=gx(r,r.G++,[o],s,"image",u,!1,l,null,null,c,!1,null,!1),(h=f1(a,"RESOLUTION"))?e.g(d.stream.createSegmentIndex(),3):e.A(2)):(2!=e.h&&((p=d.stream.segmentIndex.Cb().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])),d.stream.closeSegmentIndex()),(f=f1(a,"BANDWIDTH"))&&(d.stream.bandwidth=Number(f)),r.j.set(o,d),e.return(d))})),4))}if(2!=i.h)return t=i.i,i.return(t.stream);if(n=i.l(),eX.g.hls.ignoreImageStreamFailures)return i.return(null);throw n})}).concat(e$.map(function(e){if(eX.g.disableThumbnails)return null;try{var t=gT(eX,e);return"image"!==t.stream.type?null:t.stream}catch(e){if(eX.g.hls.ignoreImageStreamFailures)return null;throw e}})),e.g(Promise.all(eQ),2)):(eZ=e.i,e.return(eZ.filter(function(e){return e})))})),6);case 6:h=e.i,e.A(3);break;case 7:G=e.i,a.j.set(a.H,G),G.stream&&(K=sC(G.stream),G.stream.segmentIndex.qb(function(e){e.ba&&(e.ba.sd=K)})),f=G.stream.type,q=!0,a.g.disableAudio&&"audio"==G.type?q=!1:a.g.disableVideo&&"video"==G.type&&!G.stream.codecs.includes(",")&&(q=!1),q&&c.push({id:0,language:ic(V||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==G.type?G.stream:null,video:"video"==G.type?G.stream:null,bandwidth:G.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new eJ(2,7,7001);if(gL(a,u),1==u.type&&(gq(a)&&(gN(a,u),z=a.B,a.C.na(z)),W=Array.from(a.j.values()),gk(a,W),gm(a),gU(a,u.ea,f,g,p)),a.h.variants=c,a.h.textStreams=d,a.h.imageStreams=h,a.h.startTime=a.u,a.P||!a.g.hls.disableCodecGuessing){e.A(8);break}
1for(X=[],J=(Y=x(a.h.variants)).next();!J.done;J=Y.next())($=J.value).audio&&""===$.audio.codecs&&X.push($.audio.createSegmentIndex()),$.video&&""===$.video.codecs&&X.push($.video.createSegmentIndex());return e.g(Promise.all(X),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.h),e.j()}})),3)):r.return(i.h)})},p.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.aa&&(e.push(this.aa.destroy()),this.aa=null),this.g=this.i=null,this.ib.clear(),this.h=null,this.j.clear(),this.M.clear(),this.K.clear(),this.D.clear(),this.Ca.clear(),this.va.clear(),this.O.clear(),this.ya.clear(),this.za.clear(),this.I.clear(),this.l&&this.l.destroy(),this.X&&(this.X.release(),this.X=null),Promise.all(e)},p.update=function(){var e,t,n,i,r,a,o,s,u,l=this;return P(function(c){if(1==c.h){if(!gq(l)||(e=[],0===(t=Array.from(l.j.values()).filter(function(e){return!e.stream.isAudioMuxedInVideo&&e.stream.segmentIndex})).length))return c.return();for(l.B=1/0,l.h.gapCount=0,i=(n=x(t)).next();!i.done;i=n.next())r=i.value,e.push(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,A,k,I,E,C,M,D,R,L,N,j,O;return P(function(P){switch(P.h){case 1:if(t.stream.isAudioMuxedInVideo)return P.return();for(n=[],r=(i=x(t.R())).next();!r.done;r=i.next())o=(a=new ey(r.value)).g,t.Oe&&(t.Lb>=0&&o.add("_HLS_msn",String(t.Lb)),t.Mb>=0&&o.add("_HLS_part",String(t.Mb))),t.Pe&&o.add("_HLS_skip","YES"),n.push(a.toString());return P.m(2),P.g(gG(e,n,!0).promise,4);case 4:s=P.i,P.o(3);break;case 2:throw u=P.l(),e.i&&e.i.disableStream(t.stream),u;case 3:if(!t.stream.segmentIndex)return P.return();if(1!=(l=gr(e.ab,s.data)).type)throw new eJ(2,4,4017);return(c=s.uri)==s.originalUri||t.R().includes(c)||t.zf.push(c),d=gv(e,f5(l.ea,"EXT-X-DEFINE"),c),h=t.stream,p=gh(e,t),P.g(gD(e,l,h.mimeType,t.R,d),5);case 5:var U;for(g=(f=P.i).keyIds,m=f.drmInfos,v=f.encrypted,y=f.Nh,h.encrypted||!v||y||(h.encrypted=!0),U=h.keyIds,U.size===g.size&&[].concat(S(U)).every(function(e){return g.has(e)})||(h.keyIds=g,h.drmInfos=m,e.i.newDrmInfo(h)),w=(b=g_(e,l,p,d,t.R,t.type)).segments,(T=b.bandwidth)&&(h.bandwidth=T),A=sC(h),I=(k=x(w)).next();!I.done;I=k.next())(E=I.value).ba&&(E.ba.sd=A);h.segmentIndex.ce(w,e.m.Fb()),w.length&&(C=f9(l.ea,"EXT-X-MEDIA-SEQUENCE",0),D=(M=f8(l.ea,"EXT-X-SKIP"))?Number(f1(M,"SKIPPED-SEGMENTS")):0,L=(R=gC(C,w)).Lb,N=R.Mb,t.Lb=L+D,t.Mb=N,j=p.get(C),h.segmentIndex.Va(j)),(O=h.segmentIndex.Cb())&&(t.Qc=O.startTime,t.Hc=w[w.length-1].endTime),f8(l.ea,"EXT-X-ENDLIST")&&(t.Xd=!0),gP(e,l),gU(e,l.ea,h.type,d,t.R),P.j()}})}(l,r));return c.g(Promise.all(e),2)}for(gA(l,t.map(function(e){return e.stream})),a=t.some(function(e){return 0==e.Xd}),t.length&&!a&&(gz(l,g5),gm(l)),a&&gm(l),s=(o=x(t)).next();!s.done;s=o.next())(u=s.value).stream.isAudioMuxedInVideo||!u.stream.segmentIndex||u.stream.segmentIndex.Cb()||l.i.disableStream(u.stream);c.j()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(){},p.banLocation=function(e){this.l&&this.l.banLocation(e)},p.setMediaElement=function(e){this.$=e},H("shaka.hls.HlsParser",gd);var g$=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),gQ=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),gZ=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),g0=(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"),g1=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),g2=(new Map).set("audio",gQ).set("video",gZ).set("text",g0).set("image",g1),g4=new Set(["video/mp2t"].concat(S(n1))),g3=["application/octet-stream","binary/octet-stream"],g5="VOD",g6="EVENT",g8="LIVE";function g9(e){return pt(e)}tb("application/x-mpegurl",function(){return new gd}),tb("application/vnd.apple.mpegurl",function(){return new gd}),tb("audio/x-mpegurl",function(){return new gd});var g7=(new Map).set("com.microsoft.playready",g9).set("com.microsoft.playready.recommendation",g9).set("com.microsoft.playready.softw
1are",g9).set("com.microsoft.playready.hardware",g9);function me(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new G(5),this.o=new n7(function(){var t,n;t=e,P(function(e){switch(e.h){case 1:return e.m(2),e.g(mt(t),4);case 4:e.o(3);break;case 2:n=e.l(),t.h&&(n.severity=1,t.h.onError(n));case 3:if(!t.h)return e.return();e.j()}})}),this.C=new i9,this.m=new Map,this.B=function(){return!1}}function mt(e){var t,n,i,r,a,o;return P(function(s){if(1==s.h)return t=ri(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.B()}),i7(e.C,r),s.g(r.promise,2);if(a=s.i,!e.h)return s.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var u=a.uri,l=a.data,c=e.g.mss.manifestPreprocessor;if(c!=uE){if(ep("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(l=fs(l,"SmoothStreamingMedia")))throw new eJ(2,4,4046,u);c(l),l=e2(l.outerHTML)}var d=tK(l,"SmoothStreamingMedia");if(!d)throw new eJ(2,4,4046,u);if((u=e.g.mss.manifestPreprocessorTXml)!=uC&&u(d),e.i||(e.i=new o3(null,0)),u=t1(d,"IsLive",nn,!1))throw new eJ(2,4,4047);e.i.Vc(!u),c=t1(d,"TimeScale",ne,1e7),l=t1(d,"DVRWindowLength",ne),u&&(0===l||isNaN(l))&&(l=1/0);var h=t1(d,"CanSeek",nn,!1);for(0===l&&h&&(l=1/0),h=null,l&&l>0&&(h=l/c),u&&!isNaN(e.g.availabilityWindowOverride)&&(h=e.g.availabilityWindowOverride),null==h&&(h=1/0),e.i.Hf(h),l=t1(d,"Duration",ne,1/0),u||e.i.wb(l/c),u={variants:[],textStreams:[],timescale:c,duration:l/c},h=tY(d,"Protection"),c=e.g.mss.keySystemsBySystemId,l=[],p=(h=x(h)).next();!p.done;p=h.next())l=l.concat(tY(p.value,"ProtectionHeader"));if(l.length){for(p=0,h=[];p<l.length;p++){var p,f,g=l[p],m=g.attributes.SystemID.toLowerCase(),v=c[m];if(v){e:{if(f=pe(g)){f=x(tQ(f,"DATA"));for(var y=f.next();!y.done;y=f.next())if(y=tZ(y.value,"KID")){f=tt(f=new Uint8Array([(f=e7(tJ(y)))[3],f[2],f[1],f[0],f[5],f[4],f[7],f[6]].concat(S(f.slice(8)))));break e}}f=null}m=ta(v,"cenc",m=[{initData:rD(y=e7(tJ(g)),m=te(m.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:f}]),f&&m.keyIds.add(f),(v=g7.get(v))&&(m.licenseServerUri=v(g)),h.push(m)}}c=h}else c=[];for(p=c,h=[],c=[],l=[],g=(d=x(d=tY(d,"StreamIndex"))).next();!g.done;g=d.next()){v=tY(g=g.value,"QualityLevel"),m=u.timescale,f=u.duration,y=tY(g,"c");for(var b=[],w=0,T=0;T<y.length;++T){var A=y[T],k=y[T+1],I=t1(A,"t",ne),E=t1(A,"d",ne);if(A=t1(A,"r",t9),!E)break;if(I=null!=I?I:w,(A=A||0)&&A--,A<0)if(k){if(null==(k=t1(k,"t",ne))||I>=k)break;A=Math.ceil((k-I)/E)-1}else{if(f==1/0||I/m>=f)break;A=Math.ceil((f*m-I)/E)-1}for(k=0;k<=A;++k)w=I+E,b.push({start:I/m,end:w/m,Hd:I}),I=w}for(m=b,f=(v=x(v)).next();!f.done;f=v.next())(f=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,u=e.u++,l=t1(n,"Bitrate",t7),c=t1(n,"MaxWidth",t7),d=t1(n,"MaxHeight",t7),h=t1(n,"Channels",t7),p=t1(n,"SamplingRate",t7),f=a.duration;i.length&&(f=i[i.length-1].end-i[0].start);var g=e.i.getDuration();e.i.wb(Math.min(f,g)),(g=t.attributes.Name)&&(g+=n.attributes.Index),g||(g=String(u));var m={id:u,originalId:g,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:c||void 0,height:d||void 0,kind:"",encrypted:r.length>0,drmInfos:r,keyIds:new Set,language:ic(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:h,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:f,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=mi.get(r))&&m.roles.push(r),"main"===r&&(m.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(!mn.includes(r.toUpperCase()))return X("Codec not supported:",r),null;
1switch(n=function(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2;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,m),m.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return X("Quality unsupported without CodecPrivateData",o),null;m.type="audio",m.mimeType="mss/audio/mp4",m.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;m.type="video",m.mimeType="mss/video/mp4",m.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":m.type=tc,m.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(m.codecs="stpp")}return m.fullMimeTypes.add(nq(m.mimeType,m.codecs)),m.createSegmentIndex=function(){if(m.segmentIndex)return Promise.resolve();if(e.m.has(m.id))var n=e.m.get(m.id);else n=[],"video"==m.type&&(n=m.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=ap(new ah([n={id:m.id,type:m.type,codecs:m.codecs,encrypted:m.encrypted,timescale:m.mssPrivateData.timescale,duration:m.mssPrivateData.duration,zb:n,Aa:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:null,stream:m}])),e.m.set(m.id,n);return n=function(e,t,n,i,r){var a=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=x(r);for(var o=r.next(),s={};!o.done;s={Lf:void 0},o=r.next())s.Lf=o.value,i.push(new aV(s.Lf.start,s.Lf.end,function(t){return function(){return tr(e.l,[a.replace("{start time}",String(t.Lf.Hd))])}}(s),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new aB(function(){return[]},0,null,sC(m),m.mssPrivateData.timescale,n,null,m.encrypted),m,t,i),m.segmentIndex=new sy(n),Promise.resolve()},m.closeSegmentIndex=function(){m.segmentIndex&&(m.segmentIndex.release(),m.segmentIndex=null)},m}(e,g,f.value,m,p,u))&&("audio"!=f.type||e.g.disableAudio?"video"!=f.type||e.g.disableVideo?f.type!=tc||e.g.disableText||l.push(f):c.push(f):h.push(f))}for(d=[],p=(h=x(h.length>0?h:[null])).next();!p.done;p=h.next())for(p=p.value,b=(g=x(c.length>0?c:[null])).next();!b.done;b=g.next())m=(v=d).push,f=e,y=p,b=b.value,T=0,y&&y.bandwidth&&y.bandwidth>0&&(T+=y.bandwidth),b&&b.bandwidth&&b.bandwidth>0&&(T+=b.bandwidth),f={id:f.u++,language:y?y.language:"und",disabledUntilTime:0,primary:!!y&&y.primary||!!b&&b.primary,audio:y,video:b,bandwidth:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},m.call(v,f);u.variants=d,u.textStreams=l,e.j?(e.j.variants=u.variants,e.j.textStreams=u.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:u.variants,textStreams:u.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.mf()),Promise.resolve(),o=(Date.now()-i)/1e3,e.D.sample(1,o),s.j()})}(p=me.prototype).configure=function(e,t){this.g=e,t&&(this.B=t)},p.start=function(e,t){var n=this;return P(function(i){if(1==i.h)return n.l=[e],n.h=t,i.g(mt(n),2);if(!n.h)throw new eJ(2,7,7001);return i.return(n.j)})},p.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.C.destroy()},p.update=function(){var e,t=this;return P(function(n){return 1==n.h?(n.m(2),n.g(mt(t),4)):2!=n.h?n.o(0):(e=n.l(),t.h&&e)?void(t.h.onError(e),n.j()):n.return()})},p.onExpirationUpdated=function(){},p.onInitialVariantChosen=function(){},p.banLocation=function(){},p.setMediaElement=function(){},H("shaka.mss.MssParser",me);var mn="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),mi=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");function mr(e,t,n,i,r,a,o){if(n>=200&&n<=299&&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=e1(t)}catch(e){}throw new eJ(401==n||403==n?2:1,1,1001,i,n,a,e,o,r||i)}function ma(){}function mo(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,x,S,A,k,I,E,C=new md;
1try{rp(t.headers).forEach(function(e,t){C.append(t,e)})}catch(t){return iZ(new eJ(1,1,1002,e,t,n))}var M=new ml,D={Sh:!1,fj:!1};if(e=new iQ((o=e,s=t,u=n,l={body:t.body||void 0,headers:C,method:t.method,signal:M.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},c=D,d=i,h=r,p=t.streamDataCallback,f=a.minBytesForProgressEvents||0,e=P(function(e){switch(e.h){case 1:return g=mu,m=mc,y=new ArrayBuffer(0),w=b=0,T={},x=Date.now(),e.m(2),e.g(g(o,l),4);case 4:var t,n;if(h((t=(v=e.i).headers,n={},t.forEach(function(e,t){n[t.trim()]=e}),T=n)),"HEAD"==l.method){e.A(5);break}if(A=(S=v.headers.get("Content-Length"))?parseInt(S,10):0,!v.body)return e.g(v.arrayBuffer(),9);return k=v.clone().body.getReader(),new m({start:function(e){!function t(){var n,i,r,a;return P(function(o){switch(o.h){case 1:return o.m(2),o.g(k.read(),4);case 4:n=o.i,o.o(3);break;case 2:return o.l(),o.return();case 3:if(n.done||(b+=n.value.byteLength,!p)){o.A(5);break}return o.g(p(n.value),5);case 5:i=Date.now(),r=b-w,(i-x>100&&r>=f||n.done)&&(a=n.done?0:A-b,d(i-x,r,a),w=b,x=i),n.done?e.close():(e.enqueue(n.value),t()),o.j()}})}()}}),e.g(v.arrayBuffer(),8);case 8:y=e.i,e.A(5);break;case 9:y=e.i,d(Date.now()-x,y.byteLength,0);case 5:s.headers.Range&&2==(I=s.headers.Range.replace("bytes=","").split("-").filter(function(e){return e}).map(function(e){return parseInt(e,10)})).length&&y.byteLength!=I[1]-I[0]+1&&X("Payload length does not match range requested bytes",s,v),e.o(3);break;case 2:if(E=e.l(),c.Sh)throw new eJ(1,1,7001,o,u);if(c.fj)throw new eJ(1,1,1003,o,u);throw new eJ(1,1,1002,o,E,u);case 3:return e.return(mr(T,y,v.status,o,v.url,s,u))}})),function(){return D.Sh=!0,M.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var R=new n7(function(){D.fj=!0,M.abort()});R.na(t/1e3),e.finally(function(){R.stop()})}return e}function ms(){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)}tb("application/vnd.ms-sstr+xml",function(){return new me}),H("shaka.net.HttpFetchPlugin",ma),ma.isSupported=ms,ma.parse=mo;var mu=e.fetch,ml=e.AbortController,mc=e.ReadableStream,md=e.Headers;function mh(){}function mp(e,t,n,i,r,a){var o=new mf,s=Date.now(),u=0;return new iQ(new Promise(function(l,c){function d(){o.onload=null,o.onerror=null,o.ontimeout=null,o.onabort=null,o.onreadystatechange=null,o.onprogress=null}o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials;var h={};for(var p in o.onabort=function(){c(new eJ(1,1,7001,e,n)),d()},o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.HEADERS_RECEIVED){var e=o.getAllResponseHeaders().trim().split("\r\n"),t={};e=x(e);for(var n=e.next();!n.done;n=e.next()){var i=(n=n.value).indexOf(": ");-1!==i&&(t[n.slice(0,i).toLowerCase()]=n.slice(i+2))}r(h=t)}},o.onload=function(){var i=o.response;try{var r=mr(h,i,o.status,e,o.responseURL,t,n);l(r)}catch(e){c(e)}d()},o.onerror=function(t){c(new eJ(1,1,1002,e,t,n)),d()},o.ontimeout=function(){c(new eJ(1,1,1003,e,n)),d()},o.onprogress=function(e){var t=Date.now(),n=a.minBytesForProgressEvents||0,r=e.loaded-u;(t-s>100&&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)try{o.setRequestHeader(p.toLowerCase(),t.headers[p])}catch(t){throw new eJ(1,1,1002,e,t,n)}o.send(t.body)}),function(){return o.abort(),Promise.resolve()})}ms()&&(rt("http",mo,2,!0),rt("https",mo,2,!0),rt("blob",mo,2,!0)),H("shaka.net.HttpXHRPlugin",mh),mh.parse=mp;var mf=e.XMLHttpRequest;function mg(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function mm(e){var t=e.Vb(!1);return t?e9(t):e.R().map(function(e){return"{"+encodeURI(e.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function mv(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function my(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function mb(e){return 0==e.i?0:e.j/e.i}function mw(e){var t=this;this.u=e,this.i=new Map,this.h=new rc(function(){return mT(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new mv,this.l=!1}function mT(e){e.l=!0;var t=e.j.map(function(e){return e()});return e.j=[],Promise.all(t)}function mx(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new i$,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 mS(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return P(function(i){if(1==i.h)return null==r.result?(n(),i.return()):(e=r.result,i.g(t(e.key,e.value,e),2));e.continue(),i.j()})}})}function mA(e){this.h=e,this.g=[]}function mk(e,t){return mI(e,t,"readwrite")}function mI(e,t,n){var i=new mx(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){Z(e.g,i)},function(){Z(e.g,i)}),i}
1function mE(e,t,n){this.h=new mA(e),this.i=t,this.g=n}function mC(e){return Promise.reject(new eJ(2,9,9011,"Cannot add new value to "+e))}function mM(e,t,n,i){t=(e=mk(e.h,t)).store(),n=x(n);for(var r=n.next(),a={};!r.done;a={Rg:void 0},r=n.next())a.Rg=r.value,t.delete(a.Rg).onsuccess=function(e){return function(){return i(e.Rg)}}(a);return e.promise()}function mD(e,t,n){var i,r,a,o,s,u,l;return P(function(c){if(1==c.h){for(r=(i=mI(e.h,t,"readonly")).store(),a={},o=[],u=(s=x(n)).next(),l={};!u.done;l={Af:void 0,hf:void 0},u=s.next())l.hf=u.value,l.Af=r.get(l.hf),l.Af.onsuccess=function(e){return function(){void 0==e.Af.result&&o.push(e.hf),a[e.hf]=e.Af.result}}(l);return c.g(i.promise(),2)}if(o.length)throw new eJ(2,9,9012,"Could not find values for "+o);return c.return(n.map(function(e){return a[e]}))})}function mR(e){this.g=new mA(e)}function mL(){this.g=new Map}function mP(e){var t=null;if(e.g.forEach(function(e,n){e.getCells().forEach(function(e,i){e.hasFixedKeySpace()||t||(t={path:{Kb:n,cb:i},cb:e})})}),t)return t;throw new eJ(2,9,9013,"Could not find a cell that supports add-operations")}function mN(e,t,n){if(!(e=e.g.get(t)))throw new eJ(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new eJ(2,9,9013,"Could not find cell with name "+n);return t}function mj(e,t){mO.set(e,t)}rt("http",mp,1,!0),rt("https",mp,1,!0),rt("blob",mp,1,!0),mv.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}},mw.prototype.destroy=function(){return this.h.destroy()},mw.prototype.queue=function(e,t,n,i,r){var a=this;rd(this.h);var o=(this.i.get(e)||Promise.resolve()).then(function(){var e,o,s,u,l,c;return P(function(d){if(1==d.h){var h,p,f,g,m,v;return d.g((h=a,p=t,P(function(e){return 1==e.h?(f=rs,g=h.u.request(f,p),m=function(){return g.abort()},h.j.push(m),e.g(g.promise,2)):(v=e.i,Z(h.j,m),e.return(v.data))})),2)}if(e=d.i,a.h.g)throw new eJ(2,9,7001);if(i)for(s in(o=new rM(eO(e))).data)u=Number(s),l=o.data[u],c=o.g[u],a.m(l,c);return a.g.close(n,e.byteLength),a.o(mb(a.g),a.g.g),d.return(r(e))})});return this.i.set(e,o),o},mx.prototype.abort=function(){var e=this;return P(function(t){if(1==t.h){try{e.i.abort()}catch(e){}return t.m(2),t.g(e.g,4)}if(2!=t.h)return t.o(0);t.l(),t.j()})},mx.prototype.store=function(){return this.h},mx.prototype.promise=function(){return this.g},mA.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(p=mE.prototype).destroy=function(){return this.h.destroy()},p.hasFixedKeySpace=function(){return!0},p.addSegments=function(){return mC(this.i)},p.removeSegments=function(e,t){return mM(this,this.i,e,t)}
1,p.getSegments=function(e){var t,n=this;return P(function(i){return 1==i.h?i.g(mD(n,n.i,e),2):(t=i.i,i.return(t.map(function(e){return n.Uh(e)})))})},p.addManifests=function(){return mC(this.g)},p.updateManifest=function(){return Promise.reject(new eJ(2,9,9016,"Cannot modify values in "+this.g))},p.updateManifestExpiration=function(e,t){var n=mk(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()},p.removeManifests=function(e,t){return mM(this,this.g,e,t)},p.getManifests=function(e){var t,n=this;return P(function(i){return 1==i.h?i.g(mD(n,n.g,e),2):(t=i.i,i.return(Promise.all(t.map(function(e){return n.Pd(e)}))))})},p.getAllManifests=function(){var e,t,n=this;return P(function(i){return 1==i.h?(e=mI(n.h,n.g,"readonly"),t=new Map,i.g(mS(e,function(e,i){var r;return P(function(a){if(1==a.h)return a.g(n.Pd(i),2);r=a.i,t.set(e,r),a.j()})}),2)):3!=i.h?i.g(e.promise(),3):i.return(t)})},p.Uh=function(e){return e},p.Pd=function(e){return Promise.resolve(e)},p.add=function(e,t){var n,i,r,a,o,s,u,l=this;return P(function(c){if(1==c.h){for(i=(n=mk(l.h,e)).store(),r=[],o=(a=x(t)).next(),s={};!o.done;s={gh:void 0},o=a.next())u=o.value,s.gh=i.add(u),s.gh.onsuccess=function(e){return function(){r.push(e.gh.result)}}(s);return c.g(n.promise(),2)}return c.return(r)})},mR.prototype.destroy=function(){return this.g.destroy()},mR.prototype.getAll=function(){var e,t,n=this;return P(function(i){return 1==i.h?(e=mI(n.g,"session-ids","readonly"),t=[],i.g(mS(e,function(e,n){t.push(n)}),2)):3!=i.h?i.g(e.promise(),3):i.return(t)})},mR.prototype.add=function(e){var t=mk(this.g,"session-ids"),n=t.store();e=x(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},mR.prototype.remove=function(e){var t,n=this;return P(function(i){return 1==i.h?(t=mk(n.g,"session-ids"),i.g(mS(t,function(t,n,i){e.includes(n.sessionId)&&i.delete()}),2)):i.g(t.promise(),0)})},mL.prototype.destroy=function(){for(var e=[],t=x(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},mL.prototype.init=function(){var e=this;mO.forEach(function(t,n){(t=t())&&e.g.set(n,t)});for(var t=[],n=x(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},H("shaka.offline.StorageMuxer",mL),mL.unregister=function(e){mO.delete(e)},mL.register=mj,mL.prototype.destroy=mL.prototype.destroy;var mO=new Map;function mU(){mE.apply(this,arguments)}function m_(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 eJ(2,9,9004,"Could not parse uri "+e)}function mB(){mE.apply(this,arguments)}function mF(){mE.apply(this,arguments)}function mV(){this.l=null,this.o=!1,this.m=this.j=this.i=this.h=this.g=null}w(mU,mE),mU.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return P(function(o){return i=(n=mk(a.h,a.g)).store(),r=new i$,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new eJ(2,9,9012,"Could not find values for "+e))},o.g(Promise.all([n.promise(),r]),0)})},mU.prototype.Pd=function(e){var t,n,i,r,a;return P(function(o){if(1==o.h){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=x(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=x(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=x(e),a=r.next();!a.done;a=r.next())a.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=(r=x(t)).next();!a.done;a=r.next())a.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=x(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=x(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=x(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?m_(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=m_(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 o.g(p_(t),2)}return a=o.i,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})})},mU.prototype.Uh=function(e){return{data:e.data}},w(mB,mE),mB.prototype.Pd=function(e){var t,n,i,r,a;
1return P(function(o){if(1==o.h){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],u=[],l=x(s.streams),c=l.next();!c.done;c=l.next())0!=(c=c.value).variantIds.length&&u.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}}(c,s.startTime,s.startTime+i));r=u,t.push(r)}return o.g(p_(t),2)}return a=o.i,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})})},w(mF,mE),(p=mF.prototype).hasFixedKeySpace=function(){return!1},p.addSegments=function(e){return this.add(this.i,e)},p.addManifests=function(e){return this.add(this.g,e)},p.updateManifest=function(e,t){var n,i;return n=this,(i=(n=mk(n.h,n.g)).store()).get(e).onsuccess=function(){i.put(t,e)},n.promise()},p.Pd=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(p=mV.prototype).init=function(){var t=this,n=new i$,i=!1,r=new n7(function(){i=!0,n.reject(new eJ(2,9,9017))});"number"==typeof mH&&mH>0&&r.na(mH);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){r.stop();var e,o,s,u,l,c,d,h,p=a.result;i||t.o?p.close():(t.l=p,p.onversionchange=function(){p.close()},t.g=(o=(e=p).objectStoreNames).contains("manifest")&&o.contains("segment")?new mU(e,"segment","manifest"):null,t.h=(u=(s=p).objectStoreNames).contains("manifest-v2")&&u.contains("segment-v2")?new mB(s,"segment-v2","manifest-v2"):null,t.i=(c=(l=p).objectStoreNames).contains("manifest-v3")&&c.contains("segment-v3")?new mB(l,"segment-v3","manifest-v3"):null,t.j=(h=(d=p).objectStoreNames).contains("manifest-v5")&&h.contains("segment-v5")?new mF(d,"segment-v5","manifest-v5"):null,t.m=p.objectStoreNames.contains("session-ids")?new mR(p):null),n.resolve()},a.onupgradeneeded=function(){for(var e=a.result,t=x(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){i||(r.stop(),n.reject(new eJ(2,9,9001,a.error)),e.preventDefault())},n},p.destroy=function(){var e=this;return P(function(t){switch(t.h){case 1:if(e.o=!0,!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return t.g(e.m.destroy(),10);case 10:e.l&&e.l.close(),t.j()}})},p.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},p.getEmeSessionCell=function(){return this.m},p.erase=function(){var t=this;return P(function(n){switch(n.h){case 1:if(!t.g){n.A(2);break}return n.g(t.g.destroy(),2);case 2:if(!t.h){n.A(4);break}return n.g(t.h.destroy(),4);case 4:if(!t.i){n.A(6);break}return n.g(t.i.destroy(),6);case 6:if(!t.j){n.A(8);break}return n.g(t.j.destroy(),8);case 8:var i,r;return t.l&&t.l.close(),n.g((i=new i$,(r=e.indexedDB.deleteDatabase("shaka_offline_db")).onblocked=function(){},r.onsuccess=function(){i.resolve()},r.onerror=function(e){i.reject(new eJ(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,n.g(t.init(),0)}})};var mH=5;function mG(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j="offline:"+e+"/"+t+"/"+n+"/"+i}function mK(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 mG(t,n,i,Number(e[4])):null}function mq(e,t){this.h=e,this.g=t}function mz(e,t){var n=new o3(null,0);n.wb(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=x(t),o=a.next();!o.done;o=a.next()){o=x(o.value.variantIds);for(var s=o.next();!s.done;s=o.next())r.add(s.value)}for(o=(a=x(n)).next();!o.done;o=a.next())for(s=(o=x(o.value.variantIds)).next();!s.done;s=o.next())r.add(s.value);for(a=new Map,o=(r=x(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=x(t)).next();!r.done;r=t.next())for(r=mW(e,o=r.value,i),s=(o=x(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=x(n)).next();!t.done;t=n.next())for(t=mW(e,r=t.value,i),o=(r=x(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==tc}).map(function(t){return mW(e,t,n)});var a=t.streams.filter(function(e){return"image"==e.type}).map(function(t){return mW(e,t,n)}),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=x(i.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function mW(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 mG("segment",i.h,i.g,r.dataKey),(i=new aV(r.startTime,r.endTime,function(){return[o.toString()]},0,null,null!=r.initSegmentKey?(s=i,u=r.initSegmentKey,l=new mG("segment",s.h,s.g,u),new aB(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.If(r.thumbnailSprite),i});return n.fe(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sy(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([nq(t.mimeType,t.codecs)]),isAudioMuxedInVideo:t.isAudioMuxedInVideo||!1,baseOriginalId:null}}function mX(){this.g=null}function mY(){}function mJ(e,t){var n,i,r,a,o=mK(e);return o&&"manifest"==o.g?i1(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 mL,i1(void 0).Ya(function(){return a.init()}).Ya(function(){return mN(a,i.Kb(),i.cb())}).Ya(function(e){return e.getSegments([i.key()])}).Ya(function(e){return{uri:i,data:e[0].data,headers:{},originalRequest:r}}).finally(function(){return a.destroy()})):iZ(new eJ(2,1,9004,e))}function m$(e,t,n){var i,r,a,o,s;return P(function(u){switch(u.h){case 1:i=[];for(var l,c,d,h,p,f=[],g=x(n),m=g.next();!m.done;m=g.next()){m=m.value;for(var v=!1,y=x(f),b=y.next();!b.done;b=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&&ee(e.audioCapabilities,t.audioCapabilities,n)&&ee(e.videoCapabilities,t.videoCapabilities,n)}((b=b.value).info,m)){b.sessionIds.push(m.sessionId),v=!0;break}v||f.push({info:m,sessionIds:[m.sessionId]})}a=(r=x(f)).next();case 2:if(a.done){u.A(4);break}return l=e,c=t,d=a.value,o=P(function(e){switch(e.h){case 1:var t,n,i,r,a,o,s,u,f,g,m,v,y;return h=new rR({qc:c,onError:function(){},wf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.m(2),h.configure(l),e.g((t=h,n=d.info.keySystem,i=d.info.licenseUri,r=d.info.serverCertificate,a=d.info.audioCapabilities,o=d.info.videoCapabilities,P(function(e){return 1==e.h?(s=[],o.length&&s.push(o[0].contentType),a.length&&s.push(a[0].contentType),u=a.length&&a[0].robustness||"",f=o.length&&o[0].robustness||"",g=function(e){return(e=ta(n,e,null)).licenseServerUri=i,e.serverCertificate=r,e.persistentStateRequired=!0,e.sessionType="persistent-license",e.audioRobustness=u,e.videoRobustness=f,e},(m=iB(s)).video&&(v=g(o[0].encryptionScheme||""),m.video.drmInfos.push(v)),m.audio&&(y=g(a[0].encryptionScheme||""),m.audio.drmInfos.push(y)),e.g(ix([m],!0,t.O,[]),2)):(rd(t.j),e.return(r_(t,[m])))})),4);case 4:e.o(3);break;case 2:return e.l(),e.g(h.destroy(),5);case 5:return e.return([]);case 3:return p=[],e.g(Promise.all(d.sessionIds.map(function(e){return P(function(t){if(1==t.h){var n,i,r,a;return t.m(2),t.g((n=h,P(function(t){if(1==t.h)return t.g(rV(n,e,{initData:null,initDataType:null}),2);if(3!=t.h){if(!(i=t.i))throw new eJ(2,6,6005,"Failed to load session for removal: "+e);
1return r=[],(a=n.i.get(i))&&(a.Gb=new i$,r.push(a.Gb)),r.push(i.remove()),t.g(Promise.all(r),3)}n.i.delete(i),t.j()})),4)}if(2!=t.h)return p.push(e),t.o(0);t.l(),t.j()})})),6);case 6:return e.g(h.destroy(),7);case 7:return e.return(p)}}),u.g(o,5);case 5:s=u.i,i=i.concat(s),a=r.next(),u.A(2);break;case 4:return u.return(i)}})}function mQ(e,t){var n=mz(new mq(e.Kb(),e.cb()),t),i=t.appMetadata||{};return n=mZ(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 mZ(e){var t=[],n=iP(e.variants);n=x(n);for(var i=n.next();!i.done;i=n.next())t.push(iI(i.value));for(n=(e=x(e.textStreams)).next();!n.done;n=e.next())t.push(iE(n.value));return t}function m0(){this.g=new Map}function m1(e,t){return null==(e=e.g.get(t))&&(e=0),e}function m2(e){var t=this;if(e&&e.constructor!=lJ)throw new eJ(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Sb()):(this.h=uA(),this.g=new re,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new rc(function(){var e,i,r,a,o;return P(function(s){switch(s.h){case 1:return s.g(Promise.all(t.l.map(function(e){return mT(e)})),2);case 2:for(e=function(){},i=[],a=(r=x(t.i)).next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return s.g(Promise.all(i),3);case 3:if(!n){s.A(4);break}return s.g(t.g.destroy(),4);case 4:t.h=null,t.g=null,s.j()}})}),this.m=1e9}function m4(){if(fP(eu()))e:{for(var e=x(mO.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 m3(e){var t,n,i,r;return P(function(a){switch(a.h){case 1:return t=new mL,a.g(t.init(),2);case 2:return a.g(mP(t),3);case 3:return i=new mG("manifest",(n=a.i).path.Kb,n.path.cb,e),a.g(t.destroy(),4);case 4:return r=new m2,a.g(r.remove(i.toString()),0)}})}function m5(e,t,n,i,r,a){var o,s,u,l,c,d,h,p,f,g;return P(function(m){switch(m.h){case 1:for(o=!1,m.m(2),s=!0,l=(u=x(n.streams)).next();!l.done;l=u.next())for(d=(c=x(l.value.segments)).next();!d.done;d=c.next())null!=(p=(h=d.value).pendingSegmentRefId?i[h.pendingSegmentRefId]:null)&&(h.dataKey=p,h.pendingSegmentRefId=void 0),null!=(p=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null)&&(h.initSegmentKey=p,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(s=!1),h.pendingInitSegmentRefId&&(s=!1);return n.size+=r,s&&(n.isIncomplete=!1),m.g(e.updateManifest(t,n),4);case 4:o=!0,a(),m.o(0);break;case 2:return f=m.l(),m.g(m3(t),5);case 5:if(o){m.A(6);break}return g=Object.values(i),m.g(e.removeSegments(g,function(){}),6);case 6:throw f}})}function m6(e){return e.variants.some(function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})}function m8(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 m9(e,t,n,i){if(t.expiration=n.Ud(),n=rU(n),t.sessionIds=i?n:[],m6(e)&&i&&!n.length)throw new eJ(2,9,9007)}function m7(e,t){for(var n=[],i=x(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:nq(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:nq(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function ve(e,t){var n;return P(function(i){switch(i.h){case 1:return i.m(2),i.g(sK(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.i,i.o(3);break;case 2:i.l();case 3:if(n)return i.return(n);throw new eJ(1,2,2011,t)}})}function vt(e){if(e.j.g)throw new eJ(2,9,7001)}function vn(){if(!m4())throw new eJ(2,9,9e3)}function vi(e,t){return P(function(n){return 1==n.h?(e.i.push(t),n.D(2),n.g(t,4)):2!=n.h?n.return(n.i):(n.u(),Z(e.i,t),n.B(0))})}function vr(e){for(var t=new Set,n=x(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=x(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=x(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}H("shaka.offline.indexeddb.StorageMechanismOpenTimeout",5),mj("idb",function(){return eu().Ah()?new mV:null}),mG.prototype.Kb=function(){return this.i},mG.prototype.cb=function(){return this.h},mG.prototype.key=function(){return this.l},mG.prototype.toString=function(){return this.j},(p=mX.prototype).configure=function(){},p.start=function(e,t){var n,i,r,a,o,s=this;return P(function(u){switch(u.h){case 1:if(s.g=n=mK(e),null==n||"manifest"!=n.g)throw new eJ(2,1,9004,e);return i=new mL,u.D(2),u.g(i.init(),4);case 4:return u.g(mN(i,n.Kb(),n.cb()),5);case 5:return r=u.i,u.g(r.getManifests([n.key()]),6);case 6:return a=u.i[0],o=mz(new mq(n.Kb(),n.cb()),a),t.makeTextStreamsForClosedCaptions(o),u.return(o);case 2:return u.u(),u.g(i.destroy(),7);case 7:u.B(0)}})},p.stop=function(){return Promise.resolve()},p.update=function(){},p.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u=this;return P(function(l){switch(l.h){case 1:return n=u.g,i=new mL,l.m(2,3),l.g(i.init(),5);
1case 5:return l.g(mN(i,n.Kb(),n.cb()),6);case 6:return r=l.i,l.g(r.getManifests([n.key()]),7);case 7:if(o=(a=l.i[0]).sessionIds.includes(e),s=void 0==a.expiration||a.expiration>t,!o||!s){l.A(3);break}return l.g(r.updateManifestExpiration(n.key(),t),3);case 3:return l.u(),l.g(i.destroy(),10);case 10:l.B(0);break;case 2:l.l(),l.A(3)}})},p.onInitialVariantChosen=function(){},p.banLocation=function(){},p.setMediaElement=function(){},tb("application/x-offline-manifest",function(){return new mX}),H("shaka.offline.OfflineScheme",mY),mY.plugin=mJ,rt("offline",mJ),(p=m2.prototype).destroy=function(){return this.j.destroy()},p.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=up(e,t)),uI(this.h,e)},p.getConfiguration=function(){var e=uA();return uI(e,this.h,uA()),e},p.Sb=function(){return this.g},p.store=function(e,t,n,i,r){var a,o,s,u,l,c,d,h,p,f,g,m,v,y,b,w,T,S,A,k,I,E,C,M,D,R,L,N,j,O,U,_,B,F,V=this,H=this.getConfiguration(),G=new mw(this.g);return this.l.push(G),(t=new iQ((a=this,o=e,s=t||{},u=i||[],l=r||[],c=function(){var t;return P(function(i){return 1==i.h?n?i.A(2):i.g(sK(e,V.g,H.manifest.retryParameters),3):(2!=i.h&&(n=i.i),t=tw(e,n||null),i.return(t()))})},d=H,h=G,t=P(function(e){var t,n,i,r,_,B,F,V,H,G,K,q,z,W,X,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,eT,ex,eS,eA,ek,eI,eE,eC,eM,eD,eR,eL,eP,eN,ej,eU,e_,eB,eF,eV,eH,eG,eK,eq,ez,eW,eX,eY,e$,eQ,eZ,e0,e1,e2,e4,e3,e5,e6,e8,e9,e7,te,tt,tn;switch(e.h){case 1:return vn(),f=p=null,g=new mL,y=v=m=null,e.m(2,3),e.g(c(),5);case 5:return p=e.i,e.g((t=a,n=o,i=p,r=d,P(function(e){if(1==e.h)return _=null,B={networkingEngine:t.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){_=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),vt(t),e.g(i.start(n,B),2);if(3!=e.h)return F=e.i,vt(t),V=vr(F),e.g(Promise.all(rh(V,function(e){return e.createSegmentIndex()})),3);if(vt(t),_)throw _;return e.return(F)})),6);case 6:if(b=e.i,vt(a),!(!b.presentationTimeline.U()&&!b.presentationTimeline.Pc()))throw new eJ(2,9,9005,o);T=(w=x(u)).next();case 7:if(T.done){e.A(9);break}return S=T.value,e.g((H=a,G=S,K=b,P(function(e){switch(e.h){case 1:return e.g(ve(H,G),2);case 2:var t,n,i,r,a,o;if("text/vtt"!=(q=e.i))throw new eJ(1,2,2017,G);return e.g((t=G,n=H.g,i=H.h.streaming.retryParameters,P(function(e){return 1==e.h?(r=rs,(a=ri([t],i)).method="GET",e.g(n.request(r,a).promise,2)):(o=e.i,e.return(o.data))})),3);case 3:if(z=e.i,!(W=n3(q)))throw new eJ(2,2,2014,q);for(X=W(),Y={periodStart:0,segmentStart:0,segmentEnd:K.presentationTimeline.getDuration(),vttOffset:0},J=eO(z),$=X.parseMedia(J,Y,G,[]),Q=[],ee=(Z=x($)).next(),et={};!ee.done;et={Rf:void 0,gd:void 0},ee=Z.next())et.gd=ee.value,et.Rf=null,en=function(e){return function(){return null==e.Rf&&(e.Rf=tr([G],[e.gd.payload])),e.Rf||[]}}(et),ei=new aV(et.gd.startTime,et.gd.endTime,en,0,null,null,0,0,1/0),et.gd.payload.includes("#xywh")&&4===(er=et.gd.payload.split("#xywh=")[1].split(",")).length&&ei.If({height:parseInt(er[3],10),positionX:parseInt(er[0],10),positionY:parseInt(er[1],10),width:parseInt(er[2],10)}),Q.push(ei);if(ea=q,!Q.length){e.A(4);break}return e.g(sK(Q[0].R()[0],H.g,H.h.manifest.retryParameters),5);case 5:ea=e.i;case 4:return e.return({id:H.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new sy(Q),mimeType:ea||"",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([nq(ea||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})),10);case 10:A=e.i,b.imageStreams.push(A),vt(a),T=w.next(),e.A(7);break;case 9:I=(k=x(l)).next();case 11:if(I.done)return rJ(d.drm.clearKeys,b.variants),M=b.variants.some(function(e){if(e.audio){for(var t=x(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=x(e.video.drmInfos)).next();!t.done;t=e.next())if(t.value.licenseServerUri.startsWith("data:"))return!0}return!1}),D=d.offline.usePersistentLicense,M&&(D=!1),e.g(a.ed(b,function(e){y=y||e},d,D),15);return E=I.value,e.g((eo=a,es=b,eu=E.uri,el=E.language,ec=E.kind,ed=E.mime,eh=E.codecs,P(function(e){if(1==e.h)return ed?e.A(2):e.g(ve(eo,eu),3);if(2!=e.h&&(ed=e.i),ep={id:eo.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sb(0,es.presentationTimeline.getDuration(),[eu]),mimeType:ed||"",codecs:eh||"",kind:ec,encrypted:!1,drmInfos:[],keyIds:new Set,language:el,originalLanguage:el,label:null,type:tc,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([nq(ed||"",eh||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!n5(nq(ep.mimeType,ep.codecs)))throw new eJ(2,2,2014,ed);return e.return(ep)})),14);case 14:C=e.i,b.textStreams.push(C),vt(a),I=k.next(),e.A(11);break;case 15:if(f=e.i,vt(a),y)throw y;return e.g((ef=b,eg=f,em=d,ev=D,P(function(e){switch(e.h){case 1:var t;return ey={width:1/0,height:1/0},t=em.restrictions,ef.variants=ef.variants.filter(function(e){return ib(e,t,ey)}),e.g(iw(eg,ef,ev,em.drm.preferredKeySystems,em.drm.keySystemsMapping),2);case 2:for(eb=[],ew=em.preferredDecodingAttributes,eT=em.preferredVideoCodecs,iy(ef,eT,em.preferredAudioCodecs,ew,em.preferredTextFormats),eS=(ex=x(ef.variants)
1).next();!eS.done;eS=ex.next())eA=eS.value,eb.push(iI(eA));for(eI=(ek=x(ef.textStreams)).next();!eI.done;eI=ek.next())eE=eI.value,eb.push(iE(eE));for(eM=(eC=x(ef.imageStreams)).next();!eM.done;eM=eC.next())eD=eM.value,eb.push(iC(eD));return e.g(em.offline.trackSelectionCallback(eb),3);case 3:for(eR=e.i,eL=ef.presentationTimeline.getDuration(),eP=0,ej=(eN=x(eR)).next();!ej.done;ej=eN.next())eU=ej.value.bandwidth*eL/8,eP+=eU;return e.m(4),e.g(em.offline.downloadSizeCallback(eP),6);case 6:if(!e.i)throw new eJ(2,9,9014);e.o(5);break;case 4:if((e_=e.l())instanceof eJ)throw e_;throw new eJ(2,9,9015);case 5:for(eB=new Set,eF=new Set,eV=new Set,eG=(eH=x(eR)).next();!eG.done;eG=eH.next())"variant"==(eK=eG.value).type&&eB.add(eK.id),"text"==eK.type&&eF.add(eK.id),"image"==eK.type&&eV.add(eK.id);ef.variants=ef.variants.filter(function(e){return eB.has(e.id)}),ef.textStreams=ef.textStreams.filter(function(e){return eF.has(e.id)}),ef.imageStreams=ef.imageStreams.filter(function(e){return eV.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=x(t),i=n.next();!i.done;i=n.next()){i=x(t);for(var r=i.next();!r.done;r=i.next());}for(n=(t=x(e)).next();!n.done;n=t.next())for(i=(n=x(e)).next();!i.done;i=n.next());}(ef),e.j()}})),16);case 16:return e.g(g.init(),17);case 17:return vt(a),e.g(mP(g),18);case 18:return m=e.i,vt(a),L=(R=function(e,t,n,i,r,a,o){var s,u,l,c,d={offlineUri:null,originalManifestUri:n,duration:(s=t).presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:s=mZ(s),appMetadata:i,isIncomplete:!1},h=r.offline.progressCallback;u=a,u.o=function(e,t){d.size=t,h(d,e)},u.m=function(t,n){p&&o&&f==n&&rO(e,"cenc",t)};var p=m6(t)&&!m8(t),f=null;p&&(f=va.get(e.g.keySystem));for(var g=new m0,m=x(t.textStreams),v=m.next();!v.done;v=m.next())g.g.set(v.value.id,52);for(v=(m=x(t.imageStreams)).next();!v.done;v=m.next())l=g,c=v.value,l.g.set(c.id,c.bandwidth||2048);for(v=(m=x(t.variants)).next();!v.done;v=m.next())!function(e,t){var n=t.audio,i=t.video;
1if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;a<=0&&(a=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,a)}}(g,v.value);return r=(a=function(e,t,n,i){var r=new Map,a=vr(n),o=new Map;a=x(a);for(var s=a.next();!s.done;s=a.next()){var u=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.Fb(),function(n,r){var l=mm(n),c=void 0;if(!a.has(l)){var d=n.endTime-n.startTime;d=m1(t,i.id)*d,d=my(e.g,d),a.set(l,new mg(n,d,u,!1,r))}n.ba&&(c=mm(n.ba),a.has(c)||(d=.5*m1(t,i.id),d=my(e.g,d),a.set(c,new mg(n.ba,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,u)}for(t=(e=x(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()),Eh:Array.from(r.values())}}(a,g,t,r)).streams,a=a.Eh,(g=e.g)&&o&&(g.initData=[]),{vk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Ud(),streams:r,sessionIds:o?rU(e):[],drmInfo:g,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Eh:a}}(f,b,o,s,d,h,D)).vk,N=R.Eh,e.g(m.cb.addManifests([L]),19);case 19:if(j=e.i,vt(a),v=j[0],vt(a),y)throw y;return e.g((eq=a,ez=N,eW=v,eX=L,eY=h,e$=d,eQ=m.cb,eZ=b,e0=f,e1=D,P(function(e){switch(e.h){case 1:if(e2={},e4=0,e3=function(){if(eq.j.g||eY.l)throw new eJ(2,9,7001)},e5=function(e,t){var n,i,r,a,o,s,u,l;return P(function(c){if(1==c.h){var d;for(i=(n=x(e)).next(),r={};!i.done;r={jc:void 0},i=n.next())r.jc=i.value,e3(),d=r.jc,a=sz(d.g.R(),d.g.startByte,d.g.endByte,e$.streaming.retryParameters),o=r.jc.i,s=r.jc.h,u=function(e){return function(t){var n,i,r,a;return P(function(o){switch(o.h){case 1:if(i=(n=e.jc.g).Vb(!1),!n.aesKey||i){o.A(2);break}return o.g(sG(t,n.aesKey,e.jc.j),3);case 3:t=o.i;case 2:return r=mm(n),o.g(eQ.addSegments([{data:t}]),4);case 4:a=o.i,e3(),e2[r]=a[0],e4+=t.byteLength,o.j()}})}}(r),(l=r.jc.g.Vb(!1))?function(e,t,n,i,r,a){rd(e.h);var o=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new eJ(2,9,7001);if(r){var t=eO(n);for(var o in(t=new rM(t)).data){var s=Number(o);e.m(t.data[s],t.g[s])}}return e.g.close(i,n.byteLength),e.o(mb(e.g),e.g.g),a(n)});e.i.set(t,o)}(eY,r.jc.groupId,l,o,s,u):eY.queue(r.jc.groupId,a,o,s,u);return c.g(P(function(e){return 1==e.h?e.g(Promise.all(eY.i.values()),2):e.return(eY.g.g)}),2)}return(e3(),!t||eY.l)?c.A(0):(m9(eZ,eX,e0,e1),c.g(eQ.updateManifest(eW,eX),0))})},e6=!1,e.m(2),!m6(eZ)||!e6||m8(eZ)){e.A(4);break}return e.g(e5(ez.filter(function(e){return e.h}),!0),5);case 5:return e3(),ez=ez.filter(function(e){return!e.h}),e8=e2,e9=e4,e2={}
1,e4=0,e.g(m5(eQ,eW,eX,e8,e9,function(){return vt(eq)}),6);case 6:e3();case 4:if(e6){e.A(7);break}return e.g(e5(ez,!1),8);case 8:return e3(),e7=e2,te=e4,e2={},e4=0,e.g(m5(eQ,eW,eX,e7,te,function(){return e3()}),9);case 9:e3();case 7:e.o(0);break;case 2:return tt=e.l(),tn=Object.values(e2),e.g(eQ.removeSegments(tn,function(){}),10);case 10:throw tt}})),20);case 20:return vt(a),m9(b,L,f,D),e.g(m.cb.updateManifest(v,L),21);case 21:return vt(a),O=new mG("manifest",m.path.Kb,m.path.cb,v),e.return(mQ(O,L));case 3:return e.u(),e.g(g.destroy(),22);case 22:if(!p){e.A(23);break}return e.g(p.stop(),23);case 23:if(!f){e.A(25);break}return e.g(f.destroy(),25);case 25:e.B(0);break;case 2:if(U=e.l(),null==v){e.A(27);break}return e.g(m3(v),27);case 27:throw y||U}})),function(){return mT(G)})).finally(function(){Z(V.l,G)}),_=this,F=(B=t).promise,_.i.push(F),B.finally(function(){Z(_.i,F)})},p.remove=function(e){var t,n,i,r,a,o,s;return vi(this,(t=this,n=e,P(function(e){switch(e.h){case 1:if(vn(),null==(i=mK(n))||"manifest"!=i.g)throw new eJ(2,9,9004,n);return r=i,a=new mL,e.D(2),e.g(a.init(),4);case 4:return e.g(mN(a,r.Kb(),r.cb()),5);case 5:return o=e.i,e.g(o.getManifests([r.key()]),6);case 6:var u,l,c;return s=e.i[0],e.g(Promise.all([(u=t,l=s,c=a,P(function(e){var t,n,i,r,a,o,s;return e.g((t=u.g,n=u.h.drm,i=c,r=l,P(function(e){return 1==e.h?r.drmInfo?(a=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new eJ(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(i),o=r.sessionIds.map(function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:m7(r,!1),videoCapabilities:m7(r,!0)}}),e.g(m$(n,t,o),2)):e.return():3!=e.h?(s=e.i,e.g(a.remove(s),3)):e.g(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=x(e.streams);for(var n=e.next();!n.done;n=e.next()){n=x(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 mQ(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}(o,r,s)]),2);case 2:return e.u(),e.g(a.destroy(),8);case 8:e.B(0)}})))},p.Qk=function(){var e,t,n,i,r,a,o,s,u,l,c;return vi(this,(e=this,P(function(d){switch(d.h){case 1:return vn(),t=e.g,n=e.h.drm,i=new mL,r=!1,d.D(2),d.g(i.init(),4);case 4:var h;a=[],h=i,h.g.forEach(function(e){(function(e){a.push(e)})(e.getEmeSessionCell())}),s=(o=x(a)).next();case 5:if(s.done){d.A(2);break}return u=s.value,d.g(u.getAll(),8);case 8:return l=d.i,d.g(m$(n,t,l),9);case 9:return c=d.i,d.g(u.remove(c),10);case 10:c.length!=l.length&&(r=!0),s=o.next(),d.A(5);break;case 2:return d.u(),d.g(i.destroy(),11);case 11:d.B(3);break;case 3:return d.return(!r)}})))},p.list=function(){var e,t,n;return vi(this,P(function(i){switch(i.h){case 1:return vn(),e=[],t=new mL,i.D(2),i.g(t.init(),4);case 4:var r,a;return n=Promise.resolve(),r=t,a=function(t,i){n=n.then(function(){return P(function(n){if(1==n.h)return n.g(i.getAllManifests(),2);n.i.forEach(function(n,i){n=mQ(new mG("manifest",t.Kb,t.cb,i),n),e.push(n)}),n.j()})})}
1,r.g.forEach(function(e,t){e.getCells().forEach(function(e,n){a({Kb:t,cb:n},e)})}),i.g(n,2);case 2:return i.u(),i.g(t.destroy(),6);case 6:i.B(3);break;case 3:return i.return(e)}}))},p.ed=function(e,t,n,i){var r,a=this;return P(function(o){var s,u;return 1==o.h?((r=new rR({qc:a.g,onError:t,wf:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),o.g((s=r,u=e.variants,s.$=!0,s.C=new Map,s.P=i,rP(s,u,!1)),2)):3!=o.h?i?o.g(rj(r),3):o.A(3):o.return(r)})},H("shaka.offline.Storage",m2),m2.deleteAll=function(){var e;return P(function(t){var n,i,r;return 1==t.h?(e=new mL,t.D(2),t.g((n=e,P(function(e){return 1==e.h?((r=(i=Array.from(n.g.values())).length>0)||mO.forEach(function(e){(e=e())&&i.push(e)}),e.g(Promise.all(i.map(function(e){return e.erase()})),2)):r?e.A(0):e.g(Promise.all(i.map(function(e){return e.destroy()})),0)})),2)):5!=t.h?(t.u(),t.g(e.destroy(),5)):t.B(0)})},m2.prototype.list=m2.prototype.list,m2.prototype.removeEmeSessions=m2.prototype.Qk,m2.prototype.remove=m2.prototype.remove,m2.prototype.store=m2.prototype.store,m2.prototype.getNetworkingEngine=m2.prototype.Sb,m2.prototype.getConfiguration=m2.prototype.getConfiguration,m2.prototype.configure=m2.prototype.configure,m2.prototype.destroy=m2.prototype.destroy,m2.support=m4;var va=(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 vo(){}function vs(e,t){for(e={priority:t||0,callback:e},t=0;t<vu.length;t++)if(vu[t].priority<e.priority)return void vu.splice(t,0,e);vu.push(e)}lZ("offline",m4),H("shaka.polyfill",vo),vo.register=vs,vo.installAll=function(){for(var e=x(vu),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){X("Error installing polyfill!",e)}}};var vu=[];function vl(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function vc(e){return eq(e)?"cbcs":eG(e)||eK(e)||eH(e)||"com.huawei.wiseplay"===e?"cenc":(X("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function vd(e){if(!e)return!1;var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&void 0!==e.encryptionScheme}function vh(e,t){return!!(!e||e==t||("cbcs"==e||"cbcs-1-9"==e)&&eu().Xc())}function vp(){}function vf(){eu().Kf()&&!a&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(a=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=vg,navigator.emeEncryptionSchemePolyfilled=!0)}function vg(e,t){var n,i=this;return P(function(r){return 1==r.h?r.g(a.call(i,e,t),2):vd(n=r.i)?(navigator.requestMediaKeySystemAccess=a,r.return(n)):(navigator.requestMediaKeySystemAccess=vm,r.return(vm.call(i,e,t)))})}function vm(e,t){var n,i,r,o,s,u,l,c,d,h,p,f,g=this;return P(function(m){if(1==m.h){for(n=vc(e),i=[],o=(r=x(t)).next();!o.done;o=r.next())u=vv((s=o.value).videoCapabilities,n),l=vv(s.audioCapabilities,n),s.videoCapabilities&&s.videoCapabilities.length&&!u.length||s.audioCapabilities&&s.audioCapabilities.length&&!l.length||((c=Object.assign({},s)).videoCapabilities=u,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 m.g(a.call(g,e,i),2)}return h=m.i,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 vl(h,p,f))})}function vv(e,t){return e?e.filter(function(e){return vh(e.encryptionScheme,t)}):e}function vy(){}function vb(){eu().Kf()&&!o&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(o=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=vw,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function vw(e){var t,n,i=this;return P(function(r){switch(r.h){case 1:return r.g(o.call(i,e),2);case 2:if(!(t=r.i).supported||!e.keySystemConfiguration)return r.return(t);if(vd(n=t.keySystemAccess))return navigator.mediaCapabilities.decodingInfo=o,r.return(t);if(navigator.mediaCapabilities.decodingInfo=vT,n){r.A(3);break}return r.g(vx(e),4);case 4:return t.keySystemAccess=r.i,r.return(t);case 3:return r.return(vT.call(i,e))}})}function vT(e){var t,n,i,r,a,s,u,l=this;return P(function(c){switch(c.h){case 1:return n=t=null,!e.keySystemConfiguration||(r=(i=e.ke
1ySystemConfiguration).keySystem,n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=vc(r),s={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},vh(n,a)&&vh(t,a))?c.g(o.call(l,e),2):c.return(s);case 2:if((u=c.i).keySystemAccess){u.keySystemAccess=new vl(u.keySystemAccess,t,n),c.A(3);break}if(!e.keySystemConfiguration){c.A(3);break}return c.g(vx(e),5);case 5:u.keySystemAccess=c.i;case 3:return c.return(u)}})}function vx(e){var t,n;return P(function(i){if(1==i.h){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,i.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.i,i.return(n)})}function vS(){}function vA(){eu().dc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),vS.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=vk)}function vk(t){var n,i,r,a,o,s,u;return P(function(l){var c,d,h,p,f,g,m,v,y,b,w,T,x,S,A,k,I,E,C,M,D,R;switch(l.h){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},eu(),i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type||i&&(a=i.contentType,""==a1().canPlayType(a))||r&&(o=r.contentType,""==a1().canPlayType(o)))return l.return(n);l.A(2);break}if(!fP())return l.return(n);if(!i){l.A(3);break}return l.g((c=i,P(function(t){var n,i,r,a,o;return 1==t.h?"CAST"!==eu().Qa()?t.A(2):t.g((n=c,P(function(t){if(1==t.h){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return t.return(at(n.contentType));switch(i=n.contentType,n.width&&n.height&&n.width>1280&&n.height>720&&(i+="; width="+n.width+"; height="+n.height),n.framerate&&((r=Math.round(n.framerate))<24||r>30)&&(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=vI).has(i)?(a=o.get(i),t.A(2)):t.g(cast.__platform__.canDisplayType(i),3)}return 2!=t.h&&(a=t.i,o.set(i,a)),t.return(a)})),3):2!=t.h?(d=t.i,t.return(d)):t.return(at(c.contentType))})),4);case 4:if(!l.i)return l.return(n);case 3:if(!r){l.A(2);break}return l.g((h=r,P(function(t){switch(t.h){case 1:if(p=eu().Qa(),f=h.contentType,"CAST"!==p||!h.spatialRendering||(f+="; spatialRendering=true",!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))){t.A(2);break}if(g=!1,(m=vI).has(f)){g=m.get(f),t.A(4);break}return t.g(cast.__platform__.canDisplayType(f),5);case 5:g=t.i,m.set(f,g);case 4:return t.return(g);case 2:return t.return(at(f))}})),6);case 6:if(!l.i)return l.return(n);case 2:if(!t.keySystemConfiguration)return n.supported=!0,l.return(n);return s=t.keySystemConfiguration,l.g((v=i,y=r,b=s,P(function(e){switch(e.h){case 1:w=[],T=[],x=[],b.audio&&(S={robustness:b.audio.robustness||"",contentType:y.contentType},eu().xi()&&y.contentType.includes('codecs="ac-3"')&&(S.contentType='audio/mp4; codecs="ec-3"'),b.audio.encryptionScheme&&(S.encryptionScheme=b.audio.encryptionScheme,x.push(b.audio.encryptionScheme)),w.push(S)),b.video&&(A={robustness:b.video.robustness||"",contentType:v.contentType},b.video.encryptionScheme&&(A.encryptionScheme=b.video.encryptionScheme,x.push(b.video.encryptionScheme)),T.push(A)),k={initDataTypes:[b.initDataType],distinctiveIdentifier:b.distinctiveIdentifier,persistentState:b.persistentState,sessionTypes:b.sessionTypes},w.length&&(k.audioCapabilities=w),T.length&&(k.videoCapabilities=T),I=v?v.contentType:"",E=y?y.contentType:"",C=n$(I)+";"+nJ(I),M=n$(E)+";"+nJ(E),D=b.keySystem,R=null,e.m(2);var t=eW(C,M,D,x);if(eY.has(t)){t=eW(C,M,D,x),R=eY.get(t)||null,e.A(4);break}return e.g(navigator.requestMediaKeySystemAccess(b.keySystem,[k]),5);case 5:t=R=e.i;var n=eW(C,M,D,x);eY.set(n,t);case 4:e.o(3);break;case 2:e.l();case 3:return e.return(R)}})),8);case 8:(u=l.i)&&(n.supported=!0,n.keySystemAccess=u);case 7:return l.return(n)}})}vl.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=x(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=x(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},vl.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},vo.EmeEncryptionScheme=vp,vp.install=vf,vs(vf),vo.MCapEncryptionScheme=vy,vy.install=vb,vs(vb,-2),vo.MediaCapabilities=vS,vS.install=vA,vS.originalMcap=null;var vI=new Map;function vE(){}function vC(){var t,n,i=eu(),r="WEBKIT"===i.Ia()?i.Da():null;for((e.MediaSource||e.ManagedMediaSource)&&r&&e.MediaSource&&(r<=12?(vM(),t=SourceBuffer.prototype.remove,SourceBuffer.prototype.remove=function(e,n){return t.call(this,e,n-.001)}):r<=15&&vM()),r=(i=x(i.Hi())).next();!r.done;
1r=i.next())!function(t){var n=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return nJ(e)!=t&&n(e)},e.ManagedMediaSource){var i=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return nJ(e)!=t&&i(e)}}}(r.value);(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=nX(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=nX(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&(n=MediaSource.isTypeSupported,eu().cj()&&(MediaSource.isTypeSupported=function(e){var t=e.split(/ *; */),i=t.findIndex(function(e){return e.startsWith("codecs=")});if(i<0)return n(e);var r=t[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex(function(e){return e.startsWith("vp09")});return a>=0&&(r[a]="vp9",t[i]='codecs="'+r.join(",")+'"',e=t.join("; ")),n(e)}))}function vM(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,N.apply(0,arguments));return t.abort=function(){},t}}function vD(){}function vR(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&e.shakaMediaKeysPolyfill!=vV&&((void 0===t?0:t)&&(s=!0,u=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),l=HTMLMediaElement.prototype.setMediaKeys,c=e.MediaKeys,d=e.MediaKeySystemAccess,h=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vP,e.MediaKeys=vO,e.MediaKeySystemAccess=vj,navigator.requestMediaKeySystemAccess=vL,e.shakaMediaKeysPolyfill=vV,iF.clear(),eY.clear())}function vL(e,t){try{var n=new vj(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function vP(e){var t=this.mediaKeys;return t&&t!=e&&vU(t,null),delete this.mediaKeys,(this.mediaKeys=e)?vU(e,this):Promise.resolve()}function vN(e){if(e_(e=eO(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw RangeError("Malformed FairPlay init data");e=e2(e=e0(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=ej(e),this.dispatchEvent(t)}function vj(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=x(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=x(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=x(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 vO(e){this.h=new WebKitMediaKeys(e),this.g=new er}function vU(e,t){if(e.g.Sa(),!t)return Promise.resolve();e.g.F(t,"webkitneedkey",vN);try{return st(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(e){return Promise.reject(e)}}function v_(e){i8.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new er,this.sessionId="",this.expiration=NaN,this.closed=new i$,this.keyStatuses=new vF,this.onkeystatuseschange=null}function vB(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i3("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function vF(){this.size=0,this.g=void 0}vs(vA,-1),vo.MediaSource=vE,vE.install=vC,vs(vC),vo.PatchedMediaKeysApple=vD,vD.uninstall=function(){e.shakaMediaKeysPolyfill==vV&&s&&(s=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",u),HTMLMediaElement.prototype.setMediaKeys=l,e.MediaKeys=c,e.MediaKeySystemAccess=d,navigator.requestMediaKeySystemAccess=h,u=h=l=d=c=null,e.shakaMediaKeysPolyfill="",iF.clear(),eY.clear())},vD.install=vR,vj.prototype.createMediaKeys=function(){return Promise.resolve(new vO(this.keySystem))},vj.prototype.getConfiguration=function(){return this.g},vO.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw TypeError("Session type "+e+" is unsupported on this platform.");return new v_(this.h,e)},vO.prototype.setServerCertificate=function(){return Promise.resolve(!1)},vO.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},w(v_,i8),(p=v_.prototype).generateRequest=function(e,t){var n=this;this.h=new i$;try{var i=this.l.createSession("video/mp4",eO(t));this.i=i,this.sessionId=i.sessionId||"",this.j.F(this.i,"webkitkeymessage",function(e){n.h&&(n.h.resolve(),n.h=null),e=(new Map).set("messageType",void 0==n.keyStatuses.Wb()?"license-request":"license-renewal").set("message",ej(e.message)),e=new i3("message",e),n.dispatchEvent(e)}),this.j.F(i,"webkitkeyadded",function(){n.g&&(vB(n,"usable"),n.g.resolve(),n.g=null)}),this.j.F(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:vB(n,"output-not-allowed");break;default:vB(n,"internal-error")}}),vB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},p.update=function(e){this.g=new i$;try{this.i.update(eO(e))}catch(e){this.g.reject(e)}return this.g},p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(e){this.closed.reject(e)}return this.closed},p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(p=vF.prototype).Wb=function(){return this.g},p.forEach=function(e){this.g&&e(this.g,eX.value())},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=eX.value();return!!(this.g&&eN(e,t))},p.entries=function(){},p.keys=function(){},p.values=function(){};var vV="apple";function vH(){}function vG(){if(e.MediaKeys){var t=eu();MediaKeys.prototype.setServerCertificate&&t.pe()||(MediaKeys.prototype.setServerCertificate=vK)}}function vK(){return Promise.resolve(!1)}function vq(){}function vz(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)v3="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=vX,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vY,e.MediaKeys=v$,e.MediaKeySystemAccess=vJ,e.shakaMediaKeysPolyfill=v5}}function vW(e){var t=v3;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function vX(e,t){try{var n=new vJ(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function vY(e){var t=this.mediaKeys;return t&&t!=e&&vQ(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&vQ(e,this),Promise.resolve()}function vJ(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=x(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 u=x(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=x(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i){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 v$(e){this.l=e,this.h=null,this.g=new er,this.i=[],this.j=new Map}function vQ(e,t){e.h=t,e.g.Sa();var n=v3;t&&(e.g.F(t,n+"needkey",function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ej(t.initData),e.h.dispatchEvent(n)}),e.g.F(t,n+"keymessage",function(t){var n=vZ(e,t.sessionId);n&&(t=new i3("message",t=(new Map).set("messageType",void 0==n.keyStatuses.Wb()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))}),e.g.F(t,n+"keyadded",function(t){(t=vZ(e,t.sessionId))&&t.ready()}),e.g.F(t,n+"keyerror",function(t){var n=vZ(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?v2(n,"output-restricted"):1==i?v2(n,"expired"):v2(n,"internal-error"))}}))}function vZ(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function v0(e,t,n){i8.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 i$,this.keyStatuses=new v4,this.onkeystatuseschange=null}function v1(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=eO(e2("LOAD_SESSION|"+n));else{var r=e2("PERSISTENT|");i=tn(r,t)}else i=eO(t)}catch(e){return Promise.reject(e)}e.h=new i$;var a=vW("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new n7(function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}}).na(.01)}return e.h}function v2(e,t){var n=e.keyStatuses;n.size=+(void 0!=t),n.g=t,t=new i3("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}
1function v4(){this.size=0,this.g=void 0}vs(function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||vR())}),vo.PatchedMediaKeysCert=vH,vH.install=vG,vs(vG),vo.PatchedMediaKeysWebkit=vq,vq.install=vz,vJ.prototype.createMediaKeys=function(){return Promise.resolve(new v$(this.g))},vJ.prototype.getConfiguration=function(){return this.h},v$.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 v0(t,this.l,e),this.i.push(e),e},v$.prototype.setServerCertificate=function(){return Promise.resolve(!1)},v$.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},w(v0,i8),(p=v0.prototype).ready=function(){v2(this,"usable"),this.g&&this.g.resolve(),this.g=null},p.generateRequest=function(e,t){return v1(this,t,null)},p.load=function(e){return"persistent-license"==this.l?v1(this,null,e):Promise.reject(Error("Not a persistent session."))},p.update=function(e){var t=new i$;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=eZ(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=e7(a.keys[0].k),a=e7(a.keys[0].kid)}else r=eO(i),a=null;var o=vW("addKey");try{t.j[o](t.i,r,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=vW("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(p=v4.prototype).Wb=function(){return this.g},p.forEach=function(e){this.g&&e(this.g,eX.value())},p.get=function(e){if(this.has(e))return this.g},p.has=function(e){var t=eX.value();return!!(this.g&&eN(e,t))},p.entries=function(){},p.keys=function(){},p.values=function(){};var v3="",v5="webkit";function v6(){}function v8(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=v9))}function v9(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function v7(){}function ye(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:yt})}function yt(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function yn(){}function yi(){for(var e=x([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next()){t=t.value;var n=void 0;null!=(n=t.prototype).indexOf||(n.indexOf=Array.prototype.indexOf),n=void 0,null!=(n=t.prototype).lastIndexOf||(n.lastIndexOf=Array.prototype.lastIndexOf),n=void 0,null!=(n=t.prototype).includes||(n.includes=Array.prototype.includes)}}function yr(){}function ya(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch(function(){}),e}}}function yo(){}function ys(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||"number"==typeof a1().webkitDroppedFrameCount)&&(t.getVideoPlaybackQuality=yu)}}function yu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function yl(){}function yc(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=yd;else if(6==n)t=yh;else{try{var i=!!yd(1,2,"")}catch(e){i=!1}i&&(t=yd)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function yd(t,n,i){return new e.TextTrackCue(t,n,i)}function yh(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function yp(e){i8.call(this),this.g=e,this.m=null,this.h=[],this.j=-1,this.i=this.l=null,this.o=new er}function yf(){}vs(vz),vo.RandomUUID=v6,v6.install=v8,vs(v8),vo.Symbol=v7,v7.install=ye,vs(ye),vo.TypedArray=yn,yn.install=yi,vs(yi),vo.VideoPlayPromise=yr,yr.install=ya,vs(ya),vo.VideoPlaybackQuality=yo,yo.install=ys,vs(ys),vo.VTTCue=yl,yl.install=yc,vs(yc),w(yp,i8),(p=yp.prototype).destroy=function(){var e=this;return P(function(t){if(1==t.h)return t.g(e.removeAllItems(),2);e.g=null,e.o&&(e.o.release(),e.o=null),i8.prototype.release.call(e),t.j()})},p.configure=function(e){this.m=e},p.getConfiguration=function(){return this.m},p.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null},p.getCurrentItemIndex=function(){return this.j},p.getItems=function(){return this.h.slice()},p.insertItems=function(e){this.h.push.apply(this.h,S(e)),this.dispatchEvent(new i3("itemsinserted"))},p.removeAllItems=function(){var e,t,n,i,r=this;
1return P(function(a){if(1==a.h)return r.o.Sa(),r.h.length&&r.j>=0?a.g(r.g.yc(),2):a.A(2);if(4!=a.h){for(e=[],r.i&&(r.i.preloadManager.l||e.push(r.i.preloadManager.destroy()),r.i=null),r.l&&(r.l.preloadManager.l||e.push(r.l.preloadManager.destroy()),r.l=null),n=(t=x(r.h)).next();!n.done;n=t.next())(i=n.value).preloadManager&&!i.preloadManager.l&&e.push(i.preloadManager.destroy());return e.length?a.g(Promise.all(e),4):a.A(4)}r.h=[],r.j=-1,r.dispatchEvent(new i3("itemsremoved")),a.j()})},p.playItem=function(e){var t,n,i,r,a,o,s,u,l,c,d,h,p,f,g,m,v,y=this;return P(function(b){switch(b.h){case 1:if(y.o.Sa(),!y.h.length||e>=y.h.length)throw new eJ(2,7,7007);if(t=y.getCurrentItem(),n=y.h[e],y.j!=e&&(y.j=e,y.dispatchEvent(new i3("currentitemchanged"))),i=y.g.Xe(),(r=y.m?y.m.preloadNextUrlWindow:0)>0&&(a=!1,y.o.F(i,"timeupdate",function(){var e,t,n,o;return P(function(s){switch(s.h){case 1:if(y.l||y.h.length<=1||a||y.g.U()||!i.duration)return s.return();if(isNaN(e=y.g.Na().end-i.currentTime)||!(e<=r)||(t=y.m&&y.m.repeatMode,n=null,y.j+1<y.h.length?n=y.h[y.j+1]:1==t&&(n=y.h[0]),!n||n.preloadManager&&!n.preloadManager.l)){s.A(0);break}return a=!0,o=null,s.m(5),s.g(y.g.preload(n.manifestUri,n.startTime,n.mimeType,n.config),7);case 7:o=s.i,s.o(6);break;case 5:s.l(),o=null;
1case 6:y.l={item:n,preloadManager:o},a=!1,s.j()}})})),y.o.F(y.g,"complete",function(){var e=y.m&&y.m.repeatMode,t=!1;if(2==e)t=!0;else{var n=y.j+1;n<y.h.length?y.playItem(n):1==e&&(1==y.h.length?t=!0:y.playItem(0))}t&&(i.paused?(i.currentTime=y.g.Na().start,i.play()):y.o.F(i,"paused",function(){i.currentTime=y.g.Na().start,i.play()}))}),o=n.manifestUri,n.preloadManager&&!n.preloadManager.l&&(o=n.preloadManager),s=!1,y.l&&y.l.item==n&&y.l.preloadManager?o=y.l.preloadManager:y.i&&y.i.item==n&&y.i.preloadManager&&(o=y.i.preloadManager,s=!0),!y.i){b.A(2);break}if(s||y.i.preloadManager.l){b.A(3);break}return b.g(y.i.preloadManager.destroy(),3);case 3:y.i=null;case 2:if(!(y.m&&y.m.preloadPrevItem&&t&&y.g.Vd()===cY)){b.A(5);break}return u=null,b.m(6),b.g(y.g.hj(),8);case 8:u=b.i,b.o(7);break;case 6:b.l(),u=null;case 7:y.i={item:t,preloadManager:u};case 5:return n.config&&(y.g.Ki(),y.g.configure(n.config)),b.g(y.g.load(o,n.startTime,n.mimeType),9);case 9:if(y.l=null,n.extraText)for(c=(l=x(n.extraText)).next();!c.done;c=l.next())(d=c.value).mime?y.g.Md(d.uri,d.language,d.kind,d.mime,d.codecs):y.g.Md(d.uri,d.language,d.kind);if(n.extraThumbnail)for(p=(h=x(n.extraThumbnail)).next();!p.done;p=h.next())f=p.value,y.g.Je(f);if(n.extraChapter)for(m=(g=x(n.extraChapter)).next();!m.done;m=g.next())v=m.value,y.g.Ie(v.uri,v.language,v.mime);b.j()}})},H("shaka.queue.QueueManager",yp),yp.prototype.playItem=yp.prototype.playItem,yp.prototype.removeAllItems=yp.prototype.removeAllItems,yp.prototype.insertItems=yp.prototype.insertItems,yp.prototype.getItems=yp.prototype.getItems,yp.prototype.getCurrentItemIndex=yp.prototype.getCurrentItemIndex,yp.prototype.getCurrentItem=yp.prototype.getCurrentItem,yp.prototype.getConfiguration=yp.prototype.getConfiguration,yp.prototype.configure=yp.prototype.configure,yp.prototype.destroy=yp.prototype.destroy,cZ=function(e){return new yp(e)},yf.prototype.parseInit=function(){},yf.prototype.setSequenceMode=function(){},yf.prototype.setManifestType=function(){},yf.prototype.parseMedia=function(e,t){var n=null,i=[];e=x(e=eZ(e).split(/\r?\n/));for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=yg.exec(r))){var a=ym.exec(r[1]);r=new nd(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,r[2]),n&&(n.endTime=a,i.push(n)),n=r}return n&&i.push(n),i},H("shaka.text.LrcTextParser",yf),yf.prototype.parseMedia=yf.prototype.parseMedia,yf.prototype.setManifestType=yf.prototype.setManifestType,yf.prototype.setSequenceMode=yf.prototype.setSequenceMode,yf.prototype.parseInit=yf.prototype.parseInit;var yg=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,ym=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function yv(){this.g="UNKNOWN"}function yy(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 yb(e,t){t=x(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(nN)||e.textDecoration.push(nN);break;case"noUnderline":e.textDecoration.includes(nN)&&Z(e.textDecoration,nN);break;case"lineThrough":e.textDecoration.includes("line-through")||e.textDecoration.push("line-through");break;case"noLineThrough":e.textDecoration.includes("line-through")&&Z(e.textDecoration,"line-through");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Z(e.textDecoration,"overline")}}function yw(e,t,n,i,r,a){return a=void 0===a||a,(t=yx(e,t,i,r))?t:a?yT(e,n,i,r):null}function yT(e,t,n,i){return t?t3(t,yH,i)||yS(e,t,n,i):null}function yx(e,t,n,i){return t3(t,yH,i)||yS(e,t,n,i)}function yS(e,t,n,i){t=yA(t,"style",n,"");for(var r=null,a=0;a<t.length;a++){var o=t2(t[a],"urn:ebu:tt:style",i);o||(o=t3(t[a],yH,i)),o||(o=yx(e,t[a],n,i)),o&&(r=o)}return r}function yA(e,t,n,i,r){var a=[];if(!e||n.length<1)return a;var o=e;for(e=null;!e&&!(e=r?t2(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e){for(r=(t=x(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=x(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}}return a}function yk(e,t){var n=yI(e.attributes.begin,t),i=yI(e.attributes.end,t);return e=yI(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function yI(e,t){var n=null;if(yP.test(e)){n=Number((e=yP.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(yN.test(e))n=yE(yN,e);else if(yj.test(e))n=yE(yj,e);else if(yO.test(e))n=Number((e=yO.exec(e))[1])/t.frameRate;else if(yU.test(e))n=Number((e=yU.exec(e))[1])/t.g;else if(y_.test(e))n=yE(y_,e);else if(e)throw new eJ(2,2,2001,"Could not parse cue time range in TTML");return n}function yE(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 yC(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]))}n4("application/x-subtitle-lrc",function(){return new yf}),yv.prototype.parseInit=function(){},yv.prototype.setSequenceMode=function(){},yv.prototype.setManifestType=function(e){this.g=e},yv.prototype.parseMedia=function(e,t,n,i){var r,a=eZ(e);if(e=[],""==a)return e;var o=tq(a,"tt",!0);if(!o)throw new eJ(2,2,2005,"Failed to parse TTML.");if(!(a=tQ(o,"body")[0]))return[];var s=t3(o,yV,"frameRate"),u=t3(o,yV,"subFrameRate"),l=t3(o,yV,"frameRateMultiplier"),c=t3(o,yV,"tickRate"),d=t3(o,yV,"cellResolution"),h=o.attributes["xml:space"]||"default",p=t3(o,yH,"extent");
1if("default"!=h&&"preserve"!=h)throw new eJ(2,2,2005,"Invalid xml:space value: "+h);h="default"==h,s=new yC(s,u,l,c),d=(r=d)&&(r=/^(\d+) (\d+)$/.exec(r))?{columns:parseInt(r[1],10),rows:parseInt(r[2],10)}:null,u=((u=tQ(o,"metadata")[0])?u.children:[]).filter(function(e){return"\n"!=e}),l=tQ(o,"style"),o=tQ(o,"region"),c=[];for(var f=x(o),g=f.next();!g.done;g=f.next())(g=function(e,t,n,i){var r=new tD,a=t.attributes["xml:id"];if(!a)return null;r.id=a,a=null,i&&(a=yM.exec(i)||yL.exec(i)),i=a?Number(a[1]):null,a=a?Number(a[2]):null;var o,s=yT(e,t,n,"extent");if(s){var u=(o=yM.exec(s))||yL.exec(s);null!=u&&(r.width=Number(u[1]),r.height=Number(u[2]),o||(null!=i&&(r.width=100*r.width/i),null!=a&&(r.height=100*r.height/a)),r.widthUnits=o||null!=i?tR:0,r.heightUnits=o||null!=a?tR:0)}return(e=yT(e,t,n,"origin"))&&null!=(u=(o=yM.exec(e))||yL.exec(e))&&(r.viewportAnchorX=Number(u[1]),r.viewportAnchorY=Number(u[2]),o?s||(r.width=100-r.viewportAnchorX,r.widthUnits=tR,r.height=100-r.viewportAnchorY,r.heightUnits=tR):(null!=a&&(r.viewportAnchorY=100*r.viewportAnchorY/a),null!=i&&(r.viewportAnchorX=100*r.viewportAnchorX/i)),r.viewportAnchorUnits=o||null!=i?tR:0),r}(this,g.value,l,p))&&c.push(g);if(tY(a,"p").length)throw new eJ(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(p=x(tY(a,"div"))).next();!f.done;f=p.next())if(tY(f.value,"span").length)throw new eJ(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,i,r,a,o,s,u,l,c,d,h,p,f){var g,m,v,y,b=d;if(tW(n)){if(!h)return null;var w={tagName:"span",children:[tJ(n)],attributes:{},parent:null}}else w=n;for(var T=null,S=x(yG),A=S.next();!A.done&&!(T=yA(w,"backgroundImage",a,"#",A.value)[0]);A=S.next());S=null;var k=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((A=t3(w,yG,"backgroundImage"))&&k.test(A)){if((S=parseInt(A.split(":").pop(),10)-1)>=f.length)return null;S=f[S]}else p&&A&&!A.startsWith("#")&&(k=new ey(p),A=new ey(A),(A=k.resolve(A).toString())&&(S=A));if(("p"==n.tagName||T||S)&&(h=!0),n=h,A="default"==(w.attributes["xml:space"]||(l?"default":"preserve")),k=w.children.every(tW),l=[],!k)for(var I=x(w.children),E=I.next();!E.done;E=I.next())(E=e(t,E.value,i,r,a,o,s,u,A,c,w,h,p,f))&&l.push(E);if(a=null!=d,p=tJ(w),p=w.children.length&&p&&/\S/.test(p),!((I=w.attributes.begin||w.attributes.end||w.attributes.dur)||p||"br"==w.tagName||0!=l.length||a&&!A))return null;for(p=(f=yk(w,r)).start,f=f.end;b&&b.tagName&&"tt"!=b.tagName;){p=(g=b,m=r,v=p,y=f,g=yk(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+=i.periodStart,f=null==f?1/0:f+i.periodStart,"HLS"!==t.g&&(p=Math.max(p,i.segmentStart),f=Math.min(f,i.segmentEnd)),!I&&l.length>0)for(p=1/0,f=0,r=(i=x(l)).next();!r.done;r=i.next())p=Math.min(p,(r=r.value).startTime),f=Math.max(f,r.endTime);if("br"==w.tagName)return(t=new nd(p,f,"")).lineBreak=!0,t;if(i="",k&&(i=e3(tJ(w)||""),A&&(i=i.replace(/\s+/g," "))),(i=new nd(p,f,i)).nestedCues=l,h||(i.isContainer=!0),c&&(i.cellResolution=c),c=yA(w,"region",s,"")[0],w.attributes.region&&c&&c.attributes["xml:id"]){var C=c.attributes["xml:id"];i.region=u.filter(function(e){return e.id==C})[0]}return u=c,d&&a&&!w.attributes.region&&!w.attributes.style&&(u=yA(d,"region",s,"")[0]),function(e,t,n,i,r,a,o,s,u){if("rtl"==yw(e,n,i,o,"direction",s=s||u)&&(t.direction="rtl"),"tb"==(u=yw(e,n,i,o,"writingMode",s))||"tblr"==u?t.writingMode="vertical-lr":"tbrl"==u?t.writingMode="vertical-rl":"rltb"==u||"rl"==u?t.direction="rtl":u&&(t.direction=nx),(u=yw(e,n,i,o,"textAlign",!0))?(t.positionAlign=yF.get(u),t.lineAlign=yB.get(u),t.textAlign=nb[u.toUpperCase()]):t.textAlign=ny,(u=yw(e,n,i,o,"displayAlign",!0))&&(t.displayAlign=nT[u.toUpperCase()]),(u=yw(e,n,i,o,"color",s))&&(t.color=yy(u)),(u=yw(e,n,i,o,"backgroundColor",s))&&(t.backgroundColor=yy(u)),(u=yw(e,n,i,o,"border",s))&&(t.border=u),u=yw(e,n,i,o,"fontFamily",s))switch(u){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=u.split(",").filter(function(e){return"default"!=e}).join(",")}switch((u=yw(e,n,i,o,"fontWeight",s))&&"bold"==u&&(t.fontWeight=nD),t.wrapLine=!(u=yw(e,n,i,o,"wrapOption",s))||"noWrap"!=u,(u=yw(e,n,i,o,"lineHeight",s))&&u.match(yR)&&(t.lineHeight=u),(u=yw(e,n,i,o,"fontSize",s))&&(u.match(yR)||u.match(yD))&&(t.fontSize=u),(u=yw(e,n,i,o,"fontStyle",s))&&(t.fontStyle=nP[u.toUpperCase()]),r?
1(a=r.attributes.imageType||r.attributes.imagetype,u=r.attributes.encoding,r=tJ(r).trim(),"PNG"==a&&"Base64"==u&&r&&(t.backgroundImage="data:image/png;base64,"+r)):a&&(t.backgroundImage=a),(r=yw(e,n,i,o,"textOutline",s))&&((r=r.split(" "))[0].match(yR)?t.textStrokeColor=t.color:(t.textStrokeColor=yy(r[0]),r.shift()),r[0]&&r[0].match(yR)?t.textStrokeWidth=r[0]:t.textStrokeColor=""),(r=yw(e,n,i,o,"letterSpacing",s))&&r.match(yR)&&(t.letterSpacing=r),(r=yw(e,n,i,o,"linePadding",s))&&r.match(yR)&&(t.linePadding=r),(r=yw(e,n,i,o,"opacity",s))&&(t.opacity=parseFloat(r)),(r=yT(e,i,o,"textDecoration"))&&yb(t,r),(r=yx(e,n,o,"textDecoration"))&&yb(t,r),(r=yw(e,n,i,o,"textCombine",s))&&(t.textCombineUpright=r),yw(e,n,i,o,"ruby",s)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}(t,i,w,u,T,S,o,n,0==l.length),i}(this,a,t,s,u,l,o,c,h,d,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},H("shaka.text.TtmlTextParser",yv),yv.prototype.parseMedia=yv.prototype.parseMedia,yv.prototype.setManifestType=yv.prototype.setManifestType,yv.prototype.setSequenceMode=yv.prototype.setSequenceMode,yv.prototype.parseInit=yv.prototype.parseInit;var yM=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,yD=/^(\d{1,4}(?:\.\d+)?|100)%$/,yR=/^(\d+px|\d+em|\d*\.?\d+c)$/,yL=/^(\d+)px (\d+)px$/,yP=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,yN=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yj=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,yO=/^(\d*(?:\.\d*)?)f$/,yU=/^(\d*(?:\.\d*)?)t$/,y_=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),yB=(new Map).set("left",nk).set("center","center").set("right","end").set("start",nk).set("end","end"),yF=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),yV=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],yH=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],yG=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function yK(){this.g=new yv}function yq(){this.g="UNKNOWN"}function yz(e,t,n){var i,r,a;(i=yX.exec(t))?"middle"==(t=i[1])?e.textAlign=ny:e.textAlign=nb[t.toUpperCase()]:(i=yY.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=yJ.exec(t))?e.size=Number(i[1]):(i=y$.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":nv)):(i=yQ.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=yZ.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=nI[n[2].toUpperCase()])):(n=y0.exec(t))&&(e.lineInterpretation=nA,e.line=Number(n[1]),n[2]&&(e.lineAlign=nI[n[2].toUpperCase()]))}n4("application/ttml+xml",function(){return new yv}),yK.prototype.parseInit=function(e){var t=!1;if((new ry).boxes(["moov","trak","mdia","minf","stbl"],rb).ma("stsd",rw).box("stpp",function(e){t=!0,e.parser.stop()}).parse(e),!t)throw new eJ(2,2,2007)},yK.prototype.setSequenceMode=function(e){this.g.setSequenceMode(e)},yK.prototype.setManifestType=function(e){this.g.setManifestType(e)},yK.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if((new ry).boxes(["moof","traf"],rb).ma("tfhd",function(e){r=ar(e.reader,e.flags).Sd}).ma("trun",function(e){e=x((e=as(e.reader,e.version,e.flags)).kh);for(var t=e.next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)}).ma("subs",function(e){for(var t=e.reader,n=t.V(),i=-1,r=0;r<n;r++){var a=t.V();i+=a,a=t.Ea();for(var s=[],u=0;u<a;u++)1==e.version?s.push(t.V()):s.push(t.Ea()),t.Y(),t.Y(),t.V();o.set(i,s)}}).box("mdat",rS(function(e){a.push(e)},!1)).parse(e,!1),0==a.length)throw new eJ(2,2,2007);e=tn.apply(e6,S(a));for(var u=0,l=0;l<s.length;l++){var c=eO(e,u,s[l]);u+=s[l];var d=o.get(l);if(d&&d.length){for(var h=eO(c,0,d[0]),p=[],f=d[0],g=1;g<d.length;g++){var m=eO(c,f,d[g]);m=e8(m),p.push("data:image/png;base64,"+m),f+=d[g]}i=i.concat(this.g.parseMedia(h,t,n,p))}else i=i.concat(this.g.parseMedia(c,t,n,[]))}return i},H("shaka.text.Mp4TtmlParser",yK),yK.prototype.parseMedia=yK.prototype.parseMedia,yK.prototype.setManifestType=yK.prototype.setManifestType,yK.prototype.setSequenceMode=yK.prototype.setSequenceMode,yK.prototype.parseInit=yK.prototype.parseInit,n4('application/mp4; codecs="stpp"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.im1i"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.im1t"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.im2i"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.im2t"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.etd1"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new yK}),n4('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new yK}),n4('application/mp4; codecs="stpp.TTML.im1t"',function(){return new yK}),yq.prototype.parseInit=function(){},yq.prototype.setSequenceMode=function(){},yq.prototype.setManifestType=function(e){this.g=e},yq.prototype.parseMedia=function(e,t){var n=(e=(e=eZ(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);
1if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new eJ(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g&&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=t_(e[1])))throw new eJ(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;r>=95443.7176888889;)r-=95443.7176888889,i+=0x200000000;e=t.periodStart+i/9e4-e}for(t=[],r=(i=x(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new tP(r);var a=new tD;tO(r),tN(r);for(var o=tO(r);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),tN(r),o=tO(r)}t.push(a)}for(ng(i=new Map),r=[],a=(n=x(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!yW.test(a[0])&&"STYLE"==a[0]){for(u=1,s=[],o=-1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=x(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=i.get(o))||(l=new nd(0,0,""));for(var c=!1,d=0;d<u.length;d++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[d]);if(h){var p=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=p;break;case"color":c=!0,l.color=p;break;case"font-family":c=!0,l.fontFamily=p;break;case"font-size":c=!0,l.fontSize=p;break;case"font-weight":(parseInt(p,10)>=700||"bold"==p)&&(c=!0,l.fontWeight=nD);break;case"font-style":switch(p){case"normal":c=!0,l.fontStyle=nR;break;case"italic":c=!0,l.fontStyle=nL;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(p);break;case"text-combine-upright":c=!0,l.textCombineUpright=p;break;case"text-shadow":c=!0,l.textShadow=p;break;case"white-space":c=!0,l.wrapLine="noWrap"!=p}}}c&&i.set(o,l)}}if(l=a,d=e,1==l.length&&!l[0]||yW.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])a=null;else if(a=null,c=0,l[0].includes("--\x3e")||(a=l[0],c=1),o=tU(s=new tP(l[c])),h=tj(s,/[ \t]+--\x3e[ \t]+/g),u=tU(s),null==o||null==h||null==u)X("Failed to parse VTT time code. Cue skipped:",a,l),a=null;else{for(o+=d,u+=d,o<0&&(o=0),d="",h=c+1;h<l.length;h++)h>c+1&&(d+="\n"),d+=l[h];for(d=d.trim(),i.has("global")?((l=i.get("global").clone()).startTime=o,l.endTime=u,l.payload=d):l=new nd(o,u,d),tN(s),o=tO(s);o;)yz(l,o,t),tN(s),o=tO(s);nf(l,i),null!=a&&(l.id=a),a=l}a&&r.push(a)}return r},H("shaka.text.VttTextParser",yq),yq.prototype.parseMedia=yq.prototype.parseMedia,yq.prototype.setManifestType=yq.prototype.setManifestType,yq.prototype.setSequenceMode=yq.prototype.setSequenceMode,yq.prototype.parseInit=yq.prototype.parseInit;var yW=/^NOTE($|[ \t])/,yX=/^align:(start|middle|center|end|left|right)$/,yY=/^vertical:(lr|rl)$/,yJ=/^size:([\d.]+)%$/,y$=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,yQ=/^region:(.*)$/,yZ=/^line:([\d.]+)%(?:,(start|end|center))?$/,y0=/^line:(-?\d+)(?:,(start|end|center))?$/;function y1(){this.g=null}function y2(){}function y4(){this.g=new yq}function y3(){}function y5(e){return(e=parseInt(e.replace("&H",""),16))>=0?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function y6(e){return((e=be.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)*3600+60*parseInt(e[2],10)+parseFloat(e[3])}n4("text/vtt",function(){return new yq}),n4('text/vtt; codecs="vtt"',function(){return new yq}),n4('text/vtt; codecs="wvtt"',function(){return new yq}),y1.prototype.parseInit=function(e){var t=this,n=!1;if((new ry).boxes(["moov","trak","mdia","minf","stbl"],rb).ma("mdhd",function(e){t.g=(e=ao(e.reader,e.version)).timescale}).ma("stsd",rw).box("wvtt",function(){n=!0}).parse(e),!this.g||!n)throw new eJ(2,2,2008)},y1.prototype.setSequenceMode=function(){},y1.prototype.setManifestType=function(){},y1.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new eJ(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;
1if((new ry).boxes(["moof","traf"],rb).ma("tfdt",function(e){o=!0,i=aa(e.reader,e.version).baseMediaDecodeTime}).ma("tfhd",function(e){l=ar(e.reader,e.flags).Rd}).ma("trun",function(e){s=!0,r=as(e.reader,e.version,e.flags).kh}).box("mdat",rS(function(e){u=!0,n=e},!1)).parse(e,!1),!u&&!o&&!s)throw new eJ(2,2,2008);e=i;for(var c=new rg(n,0),d=x(r),h=d.next();!h.done;h=d.next()){var p=(h=h.value).mh||l,f=h.Cf?i+h.Cf:e;e=f+(p||0);var g=0;do{var m=c.V();if(m<8)throw new eJ(2,2,2008);g+=m;var v=c.V(),y=null;"vttc"==rk(v)?m>8&&(y=c.Nb(m-8,!1)):c.skip(m-8),p&&y&&(m=function(e,t,n){var i,r,a;return(new ry).box("payl",rS(function(e){i=eZ(e)},!1)).box("iden",rS(function(e){r=eZ(e)},!1)).box("sttg",rS(function(e){a=eZ(e)},!1)).parse(e),i?function(e,t,n,i,r){if(nf(e=new nd(i,r,e)),t&&(e.id=t),n)for(n=tO(t=new tP(n));n;)yz(e,n,[]),tN(t),n=tO(t);return e}(i,r,a,t,n):null}(y,t.periodStart+f/this.g,t.periodStart+e/this.g),a.push(m))}while(h.sampleSize&&g<h.sampleSize)}return a.filter(ir)},H("shaka.text.Mp4VttParser",y1),y1.prototype.parseMedia=y1.prototype.parseMedia,y1.prototype.setManifestType=y1.prototype.setManifestType,y1.prototype.setSequenceMode=y1.prototype.setSequenceMode,y1.prototype.parseInit=y1.prototype.parseInit,n4('application/mp4; codecs="wvtt"',function(){return new y1}),y2.prototype.parseInit=function(){},y2.prototype.setSequenceMode=function(){},y2.prototype.setManifestType=function(){},y2.prototype.parseMedia=function(e){var t=eZ(e).replace(/\r+/g,"");if(t=t.trim(),e=[],""==t)return e;t=x(t.split("\n\n"));for(var n=t.next();!n.done;n=t.next()){var i=new tP((n=n.value.split("\n"))[0]),r=tU(i),a=tj(i,/,/g);if(i=tU(i),null==r||null==a||null==i)throw new eJ(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new nd(r,i,n.slice(1).join("\n").trim()))}return e},H("shaka.text.SbvTextParser",y2),y2.prototype.parseMedia=y2.prototype.parseMedia,y2.prototype.setManifestType=y2.prototype.setManifestType,y2.prototype.setSequenceMode=y2.prototype.setSequenceMode,y2.prototype.parseInit=y2.prototype.parseInit,n4("text/x-subviewer",function(){return new y2}),y4.prototype.parseInit=function(){},y4.prototype.setSequenceMode=function(){},y4.prototype.setManifestType=function(){},y4.prototype.parseMedia=function(e,t,n){var i=eZ(e);if(e="WEBVTT\n\n",""!=i){i=x((i=(i=i.replace(/\r+/g,"")).trim()).split("\n\n"));for(var r=i.next();!r.done;r=i.next())(r=r.value.split(/\n/))[0].match(/\d+/)&&r.shift(),r[0]=r[0].replace(/,/g,"."),e+=r.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 e=eO(e2(e)),this.g.parseMedia(e,t,n,[])},H("shaka.text.SrtTextParser",y4),y4.prototype.parseMedia=y4.prototype.parseMedia,y4.prototype.setManifestType=y4.prototype.setManifestType,y4.prototype.setSequenceMode=y4.prototype.setSequenceMode,y4.prototype.parseInit=y4.prototype.parseInit,n4("text/srt",function(){return new y4}),y3.prototype.parseInit=function(){},y3.prototype.setSequenceMode=function(){},y3.prototype.setManifestType=function(){},y3.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=x(r=eZ(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var a=r.value;r=a,(a=y8.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=x(t.split(/\r?\n/))).next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(a=y9.exec(e))){if(e=a[1].trim(),a=a[2].trim(),"Format"==e)r=a.split(y7);else if("Style"==e){e=a.split(y7),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=x(n.split(/\r?\n/))).next(),e={};!a.done;e={Yi:void 0},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=y9.exec(a))){if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(y7);else if("Dialogue"==a){o=o.split(y7),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new nd(s=y6(a.Start),y6(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.Yi=a.Style,(e=i.find(function(e){return function(t){return t.Name==e.Yi}}(e)))&&function(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=y5(n))&&(e.color=n),(n=t.BackColour)&&(n=y5(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=nD),t.Italic&&(e.fontStyle=nL),t.Underline&&e.textDecoration.push(nN),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=nw,e.textAlign="start";break;
1case 2:e.displayAlign=nw,e.textAlign=ny;break;case 3:e.displayAlign=nw,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=ny;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=ny;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}(o,e),r.push(o)}}return r},H("shaka.text.SsaTextParser",y3),y3.prototype.parseMedia=y3.prototype.parseMedia,y3.prototype.setManifestType=y3.prototype.setManifestType,y3.prototype.setSequenceMode=y3.prototype.setSequenceMode,y3.prototype.parseInit=y3.prototype.parseInit;var y8=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,y9=/^\s*([^:]+):\s*(.*)/,y7=/\s*,\s*/,be=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function bt(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)>0?{Yd:n,ka:e}:null}function bn(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 bi(e,t){if(t+1<e.length&&255===e[t]&&(246&e[t+1])==240){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]&&(246&e[t+1])==240)}return!1}n4("text/x-ssa",function(){return new y3});var br=Object.freeze({Og:0,ef:0,$e:0,Se:0,Te:2,Pg:0}),ba=Object.freeze({Og:0,ef:0,$e:0,Se:0,Te:2,Pg:0}),bo=Object.freeze({Og:0,ef:0,$e:0,Se:0,Te:1,Pg:1});function bs(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function bu(e,t,n){if(t+8>e.length||11!==e[t]||119!==e[t+1])return!1;var i=e[t+4]>>6;if(i>=3)return!1;var r=63&e[t+4],a=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*r+i];if(t+a>e.length)return!1;var o=e[t+6]>>5,s=0;2===o?s+=2:(1&o&&1!==o&&(s+=2),4&o&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var u=7&e[t+5];return e=new Uint8Array([i<<6|e[t+5]>>3<<1|u>>2,(3&u)<<6|o<<3|s<<2|r>>4,r<<4&224]),n.sampleRate=[48e3,44100,32e3][i],n.channelCount=[2,1,2,3,3,4,4,5][o]+s,n.Aa=e,n.ka=a,!0}function bl(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function bc(e,t,n){if(t+8>e.length||(e[t]<<8|(0|e[t+1]))!=2935)return!1;var i=new on(e.subarray(t+2));or(i,2),or(i,3);var r=oa(i,11)+1<<1,a=oa(i,2);if(3==a){a=[24e3,22060,16e3][a=oa(i,2)];var o=3}else a=[48e3,44100,32e3][a],o=oa(i,2);var s=oa(i,3),u=oa(i,1);return i=oa(i,5),!(t+r>e.byteLength)&&(e=new Uint8Array([(8160&(e=Math.floor(r*a/(16*[1,2,3,6][o]))))>>5,(31&e)<<3,a<<6|i<<1,0|u|s<<1,0]),n.sampleRate=a,n.channelCount=[2,1,2,3,3,4,4,5][s]+u,n.Aa=e,n.ka=r,!0)}function bd(e){this.j=e,this.h=0,this.g=new Map,this.i=null}(p=bs.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&at(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(nQ(t)||"mp4a.40.2")+'"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){for(var r=eO(e),a=a7(r),o=a.length;o<r.length&&!bi(r,o);o++);if(e=1e3*n.endTime,(a=a9(a)).length&&n&&(a=a.find(function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description}))&&(e=a.data),!(a=bn(r,o)))return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=bt(r,o);if(!u)return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));var l=u.Yd+u.ka;o+l<=r.length&&s.push({data:r.subarray(o+u.Yd,o+l),size:u.ka,duration:1024,ob:0,flags:br}),o+=l}return e=Math.floor(e*(r=a.sampleRate)/1e3),i=new ah([i={id:t.id,type:"audio",codecs:a.codec,timescale:r,duration:i,zb:[],Aa:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,ub:s},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ap(i),this.g.set(n,t)),n=this.i!==t,i=ab(i),this.i=t,this.h++,Promise.resolve({data:i,init:n?t:null})},H("shaka.transmuxer.AacTransmuxer",bs),bs.prototype.transmux=bs.prototype.transmux,bs.prototype.getOriginalMimeType=bs.prototype.getOriginalMimeType,bs.prototype.convertCodecs=bs.prototype.convertCodecs,bs.prototype.isSupported=bs.prototype.isSupported,bs.prototype.destroy=bs.prototype.destroy,nU("audio/aac",function(){return new bs("audio/aac")},nF),(p=bl.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&at(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?eu().le()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){e=eO(e);for(var r=a7(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;a>0;){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(r<16)return!0}return!1}(e,a);a++);var o=1e3*n.endTime;(r=a9(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=[],l={sampleRate:0,channelCount:0,Aa:new Uint8Array(0),ka:0};a<e.length;){if(!bu(e,a,l))return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Aa,u.push({data:e.subarray(a,a+l.ka),size:l.ka,duration:1536,ob:0,flags:br}),a+=l.ka}return e=Math.floor(o*r/1e3),i=new ah([i={id:t.id,type:"audio",codecs:"ac-3",timescale:r,duration:i,zb:[],Aa:s,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,ub:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ap(i),this.g.set(n,t)),n=this.i!==t,i=ab(i),this.i=t,this.h++,Promise.resolve({data:i,init:n?t:null})},H("shaka.transmuxer.Ac3Transmuxer",bl),bl.prototype.transmux=bl.prototype.transmux,bl.prototype.getOriginalMimeType=bl.prototype.getOriginalMimeType,bl.prototype.convertCodecs=bl.prototype.convertCodecs,bl.prototype.isSupported=bl.prototype.isSupported,bl.prototype.destroy=bl.prototype.destroy,nU("audio/ac3",function(){return new bl("audio/ac3")},nF),(p=bd.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&at(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){e=eO(e);for(var r=a7(e),a=r.length;a<e.length&&(e[a]<<8|(0|e[a+1]))!=2935;a++);var o=1e3*n.endTime;(r=a9(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=[],l={sampleRate:0,channelCount:0,Aa:new Uint8Array(0),ka:0};a<e.length;){if(!bc(e,a,l))return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Aa,u.push({data:e.subarray(a,a+l.ka),size:l.ka,duration:1536,ob:0,flags:br}),a+=l.ka}return e=Math.floor(o*r/1e3),i=new ah([i={id:t.id,type:"audio",codecs:"ec-3",timescale:r,duration:i,zb:[],Aa:s,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,ub:u},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ap(i),this.g.set(n,t)),n=this.i!==t,i=ab(i),this.i=t,this.h++,Promise.resolve({data:i,init:n?t:null})},H("shaka.transmuxer.Ec3Transmuxer",bd),bd.prototype.transmux=bd.prototype.transmux,bd.prototype.getOriginalMimeType=bd.prototype.getOriginalMimeType,bd.prototype.convertCodecs=bd.prototype.convertCodecs,bd.prototype.isSupported=bd.prototype.isSupported,bd.prototype.destroy=bd.prototype.destroy,nU("audio/ec3",function(){return new bd("audio/ec3")},nF);var bh=[100,110,122,244,44,83,86,118,128,138,139,134];function bp(e,t){if(!(t+1<e.length&&bf(e,t)))return null;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*bm[(3===n?3-i:3===i?3:4)*14+r-1],a=bv[(3===n?0:2===n?1:2)*3+a];var s=by[n][i],u=bb[i];return(n=8*s*u,(s=Math.floor(s*r/a+(e[t+2]>>1&1))*u)&&n&&a)?((u=(u=(navigator.userAgent||"").match(/Chrome\/(\d+)/i))?parseInt(u[1],10):0)&&u<=87&&2===i&&r>=224e3&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,ka:s,Sk:n}):null}return null}function bf(e,t){return 255===e[t]&&(224&e[t+1])==224&&(6&e[t+1])!=0}function bg(e,t){if(t+1<e.length&&bf(e,t)){var n=bp(e,t),i=4;return n&&n.ka&&(i=n.ka),(t+=i)===e.length||t+1<e.length&&bf(e,t)}return!1}var bm=[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],bv=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],by=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],bb=[0,1,1,4];function bw(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function bT(e){this.h=e,this.g=null}function bx(e){this.h=e,(this.g=fR.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;n<16;n++)this.usertype[n]!==bA[n]&&(e=!1);
1e&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function bS(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}(p=bw.prototype).destroy=function(){this.g.clear()},p.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&at(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},p.getOriginalMimeType=function(){return this.j},p.transmux=function(e,t,n,i){for(var r,a=eO(e),o=a7(a).length;o<a.length&&!bg(a,o);o++);for(e=[];o<a.length;){var s=bp(a,o);s?(r||(r=s),o+s.ka<=a.length&&e.push({data:a.subarray(o,o+s.ka),size:s.ka,duration:1152,ob:0,flags:br}),o+=s.ka):o++}return r?(a=9e4*r.Sk/r.sampleRate*this.h,i=new ah([i={id:t.id,type:"audio",codecs:"mp3",timescale:r.sampleRate,duration:i,zb:[],Aa:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:a,ub:e},stream:t}]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ap(i),this.g.set(n,t)),n=this.i!==t,i=ab(i),this.i=t,this.h++,Promise.resolve({data:i,init:n?t:null})):Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null))},H("shaka.transmuxer.Mp3Transmuxer",bw),bw.prototype.transmux=bw.prototype.transmux,bw.prototype.getOriginalMimeType=bw.prototype.getOriginalMimeType,bw.prototype.convertCodecs=bw.prototype.convertCodecs,bw.prototype.isSupported=bw.prototype.isSupported,bw.prototype.destroy=bw.prototype.destroy,nU("audio/mpeg",function(){return new bw("audio/mpeg")},nF),(p=bT.prototype).destroy=function(){},p.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=nQ(e).split(","),n=tu("audio",t);return t=tu("video",t),!!n&&!t&&"mp3"==nY(n)&&at(this.convertCodecs("audio",e))},p.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},p.getOriginalMimeType=function(){return this.h},p.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new op,this.g.Gf(n.i),e=eO(e),"mp3"!=(e=this.g.parse(e)).Td().audio||"audio"!=r)return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));for(n=[],e=(r=x(e.rb())).next();!e.done;e=r.next())(e=e.value).data&&n.push(e.data);for(e=0,n=ti(n),r=[];e<n.length;)(t=bp(n,e))?(e+t.ka<=n.length&&r.push(n.subarray(e,e+t.ka)),e+=t.ka):e++;return Promise.resolve(ti(r))},H("shaka.transmuxer.MpegTsTransmuxer",bT),bT.prototype.transmux=bT.prototype.transmux,bT.prototype.getOriginalMimeType=bT.prototype.getOriginalMimeType,bT.prototype.convertCodecs=bT.prototype.convertCodecs,bT.prototype.isSupported=bT.prototype.isSupported,bT.prototype.destroy=bT.prototype.destroy,nU("video/mp2t",function(){return new bT("video/mp2t")},nV),(p=bx.prototype).destroy=function(){},p.isSupported=function(e,t){var n=e.startsWith("mss/");return!!this.g&&!!n&&(t?at(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),at(t)||at(e)))},p.convertCodecs=function(e,t){return t.replace("mss/","")},p.getOriginalMimeType=function(){return this.h},p.transmux=function(e,t,n){if(!n)return Promise.resolve(eO(e));if(!t.mssPrivateData)return Promise.reject(new eJ(2,3,3020,n?n.R()[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]=bS(f,"traf")+bS(s,"senc")+16);var m=eO(r.write());return Promise.resolve(m)}catch(e){return e instanceof eJ?Promise.reject(e):Promise.reject(new eJ(2,3,3022,n?n.R()[0]:null))}},H("shaka.transmuxer.MssTransmuxer",bx),bx.prototype.transmux=bx.prototype.transmux,bx.prototype.getOriginalMimeType=bx.prototype.getOriginalMimeType,bx.prototype.convertCodecs=bx.prototype.convertCodecs,bx.prototype.isSupported=bx.prototype.isSupported,bx.prototype.destroy=bx.prototype.destroy;var bA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);nU("mss/audio/mp4",function(){return new bx("mss/audio/mp4")},nF),nU("mss/video/mp4",function(){return new bx("mss/video/mp4")},nF);var bk=[480,960,1920,2880,480,960,1920,2880,480,960,1920,2880,480,960,480,960,120,240,480,960,120,240,480,960,120,240,480,960,120,240,480,960];function bI(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}function bE(e){return"video/mp2t"==(e=e.toLowerCase().split(";")[0])||"audio/mp2t"==e}(p=bI.prototype).destroy=function(){this.j.clear(),this.i&&this.i.destroy()},p.isSupported=function(e,t){if(!bE(e))return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=nQ(n).split(",");return n=tu("audio",i),i=tu("video",i),(!n||!!bC.includes(n=nY(n)))&&(!i||!!bM.includes(n=nY(i)))&&(t?at(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),at(t)||at(e)))},p.convertCodecs=function(e,t){return bE(t)?(t=nQ(t).replace("mp4a.40.34","mp3").split(",").map(function(e){return iA(e,"audio/mp4")}).map(ik).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},p.getOriginalMimeType=function(){return this.m},p.transmux=function(e,t,n,i,r){var a=eO(e);if("audio"==r&&!oT(a)){for(var o=a7(a),s=o.length;s<a.length;s++)if(bg(a,s))return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));for(s=o.length;s<a.length;
1s++)if(bi(a,s))return this.i||(this.i=new bs("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null))}this.h?this.h.clearData():this.h=new op,this.h.Gf(n.i);var u=this.h.parse(a),l=[],c=u.Td();try{var d=null;if("video"==r){switch(c.video){case"avc":var h=[],p=null,f=u.od(),g=function(e){function t(e){r={data:o,frame:!1,isKeyframe:!1,pts:e.pts,dts:e.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var e=4*r.nalus.length,t=x(r.nalus),n=t.next();!n.done;n=t.next())e+=n.value.fullData.byteLength;e=new Uint8Array(e),t=0,n=x(r.nalus);for(var a=n.next();!a.done;a=n.next()){var o=(a=a.value).fullData.byteLength;e[t]=o>>24&255,e[t+1]=o>>16&255,e[t+2]=o>>8&255,e[t+3]=255&o,e.set(a.fullData,t+4),t+=4+o}r.data=e,i.push(r)}}for(var i=[],r=null,a=!1,o=new Uint8Array(0),s=0;s<e.length;s++){var u=e[s],l=u.nalus,c=!1;r&&l.length&&!a&&(n(),t(u)),l=x(u.nalus);for(var d=l.next();!d.done;d=l.next()){d=d.value;var h=!1;switch(d.type){case 1:var p,f=!1;h=!0;var g=d.data;c&&g.length>4&&(ou(p=new on(g)),2===(g=ou(p))||4===g||7===g||9===g)&&(f=!0),f&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=f;break;case 5:h=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:h=!0;break;case 7:c=h=!0;break;case 9:a=h=!0,r&&r.frame&&(n(),r=null),r||t(u);break;default:h=!1}r&&h&&r.nalus.push(d)}}return n(),i}(f);if(!g.length)throw new eJ(2,3,3023,n?n.R()[0]:null);for(var m=0;m<g.length;m++){var v=g[m];null==p&&(p=v.dts);var y=void 0;y=m+1<g.length?(g[m+1].dts||0)-(v.dts||0):g.length>1?(v.dts||0)-(g[m-1].dts||0):(n.endTime-n.startTime)*9e4,h.push({data:v.data,size:v.data.byteLength,duration:y,ob:Math.round((v.pts||0)-(v.dts||0)),flags:v.isKeyframe?ba:bo})}for(var b=[],w=x(f),T=w.next();!T.done;T=w.next())b.push.apply(b,S(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 on(t.data),i=od(n);if(od(n),od(n),os(n),bh.includes(i)&&(3===(i=ou(n))&&or(n,1),os(n),os(n),or(n,1),oc(n))){i=3!==i?8:12;for(var r=0;r<i;r++)oc(n)&&(r<6?oh(n,16):oh(n,64))}if(os(n),0===(i=ou(n)))ou(n);else if(1===i)for(or(n,1),os(n),os(n),i=ou(n),r=0;r<i;r++)os(n);os(n),or(n,1);var a=ou(n),o=ou(n),s=oa(n,1);0===s&&or(n,1),or(n,1);var u=0,l=0,c=0,d=0;if(oc(n)&&(u=ou(n),l=ou(n),c=ou(n),d=ou(n)),r=i=1,oc(n)&&oc(n)){var h=od(n);h>0&&h<=16?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][h-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][h-1]):255===h&&(i=oa(n,16),r=oa(n,16))}return n=(2-s)*(o+1)*16-2*c-2*d,a=(a+1)*16-2*u-2*l,u=(t=t.fullData).byteLength,l=(e=e.fullData).byteLength,o=0,(s=new Uint8Array(11+u+l))[o++]=1,s[o++]=t[1],s[o++]=t[2],s[o++]=t[3],s[o++]=255,s[o++]=225,s[o++]=u>>>8&255,s[o++]=255&u,s.set(t,o),o+=u,s[o++]=1,s[o++]=l>>>8&255,s[o++]=255&l,s.set(e,o),{height:n,width:a,Ta:s,Za:i,$a:r}}(b);if(!A||null==p)throw new eJ(2,3,3018,n?n.R()[0]:null);t.height=t.height||A.height,t.width=t.width||A.width,d={id:t.id,type:"video",codecs:"avc1",timescale:9e4,duration:i,zb:[],Aa:new Uint8Array([]),Ta:A.Ta,Za:A.Za,$a:A.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:p,ub:h},stream:t};break;case"hvc":var k=[],I=null,E=[],C=u.od(),M=new Uint8Array(0),D=!1;if(!C.length)throw new eJ(2,3,3023,n?n.R()[0]:null);for(var R=0;R<C.length;R++){var L=C[R],P=L.nalus;E.push.apply(E,S(P));for(var N=!1,j=[],O=0,U=!1,_=x(P),B=_.next();!B.done;B=_.next()){var F=B.value;switch(F.type){case 1:case 0:var V=U=!0;break;case 19:case 20:case 21:N=V=U=!0;break;case 32:case 33:case 34:case 39:case 40:V=!0;break;case 35:U=V=!0;break;default:V=!1}U&&V&&(j.push(F.fullData),O+=F.fullData.byteLength)}if(j.length){O+=4*j.length;for(var H=new Uint8Array(O),G=0,K=x(j),q=K.next();!q.done;q=K.next()){var z=q.value,W=z.byteLength;H[G]=W>>24&255,H[G+1]=W>>16&255,H[G+2]=W>>8&255,H[G+3]=255&W,H.set(z,G+4),G+=W+4}M=H,D=N;var X=!0}else X=!1;if(X){null==I&&null!=L.dts&&(I=L.dts);var Y=void 0;Y=R+1<C.length?(C[R+1].dts||0)-(L.dts||0):C.length>1?(L.dts||0)-(C[R-1].dts||0):(n.endTime-n.startTime)*9e4,k.push({data:M,size:M.byteLength,duration:Y,ob:Math.round((L.pts||0)-(L.dts||0)),flags:D?ba:bo})}}var J=function(e){if(!e.length)return null;var t,n,i,r,a,o=e.find(function(e){return 32==e.type}),s=e.find(function(e){return 33==e.type}),u=e.find(function(e){return 34==e.type});if(!o||!s||!u)return null;var l=(t=o.fullData,n=new on(t,!0),od(n),od(n),oa(n,4),oa(n,2),oa(n,6),{Vg:(t=oa(n,3))+1,Ch:n=oc(n)});e=function(e){od(e=new on(e,!0)),od(e);var t=0,n=0,i=0,r=0;oa(e,4);var a=oa(e,3);oc(e);for(var o=oa(e,2),s=oa(e,1),u=oa(e,5),l=od(e),c=od(e),d=od(e),h=od(e),p=od(e),f=od(e),g=od(e),m=od(e),v=od(e),y=od(e),b=od(e),w=[],T=[],x=0;x<a;x++)w.push(oc(e)),T.push(oc(e));if(a>0)for(x=a;x<8;x++)oa(e,2);for(x=0;x<a;x++)w[x]&&oa(e,88),T[x]&&od(e);ou(e),3==(w=ou(e))&&oa(e,1),T=ou(e),x=ou(e),oc(e)&&(t+=ou(e),n+=ou(e),i+=ou(e),r+=ou(e));var S=ou(e),A=ou(e),k=ou(e);if(oc(e))for(var I=0;I<=a;I++)ou(e),ou(e),ou(e);else ou(e),ou(e),ou(e);if(ou(e),ou(e),ou(e),ou(e),ou(e),ou(e),oc(e)&&oc(e))for(I=0;I<4;I++)for(var E=0;E<(3===I?2:6);E++)if(oc(e)){var C=Math.min(64,1<<4+(I<<1));I>1&&ol(e);for(var M=0;M<C;M++)ol(e)}else ou(e);for(oc(e),oc(e),oc(e)&&(od(e),ou(e),ou(e),oc(e)),I=ou(e),C=E=0;C<I;C++)if(M=!1,0!==C&&(M=oc(e)),M){C===I&&ou(e),oc(e),ou(e);for(var D=M=0;D<=E;D++){var R=oc(e),L=!1;R||(L=oc(e)),(R||L)&&M++}E=M}else{for(R=0,E=(D=ou(e))+(M=ou(e));R<D;R++)ou(e),oc(e);for(D=0;D<M;D++)ou(e),oc(e)}if(oc(e))for(I=ou(e),E=0;E<I;E++){for(C=0;C<k+4;C++)oa(e,1);oa(e,1)}if(I=k=1,E=!0,C=1,D=M=0,oc(e),oc(e),oc(e)){if(oc(e)){R=od(e),L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var P=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];R>0&&R<=16?(k=L[R-1],I=P[R-1]):255===R&&(k=oa(e,16),I=oa(e,16))}if(oc(e)&&oc(e),oc(e)&&(oa(e,3),oc(e),oc(e)&&(od(e),od(e),od(e))),oc(e)&&(ou(e),ou(e)),oc(e),oc(e),oc(e),(R=oc(e))&&(os(e),os(e),os(e),os(e)),oc(e)&&(C=oa(e,32),M=oa(e,32),oc(e)&&ou(e),oc(e))){P=!1,R=oc(e),L=oc(e),(R||L)&&((P=oc(e))&&(od(e),oa(e,5),oc(e),oa(e,5)),oa(e,4),oa(e,4),P&&oa(e,4),oa(e,5),oa(e,5),oa(e,5));for(var N=0;N<=a;
1N++){E=oc(e);var j=!0,O=1;E||(j=oc(e));var U=!1;if(j?ou(e):U=oc(e),U||(O=ou(e)+1),R){for(j=0;j<O;j++)ou(e),ou(e),P&&(ou(e),ou(e));oc(e)}if(L){for(j=0;j<O;j++)ou(e),ou(e),P&&(ou(e),ou(e));oc(e)}}}oc(e)&&(oc(e),oc(e),oc(e),D=ou(e),ou(e),ou(e),ou(e),ou(e))}return{xg:b,Dg:o,Eg:s,Cg:u,yg:l,zg:c,Ag:d,Bg:h,qg:p,rg:f,sg:g,ug:m,vg:v,wg:y,qf:D,fg:w,eg:S,dg:A,width:T-(t+n)*(1===w||2===w?2:1),height:x-(i+r)*(1===w?2:1),Uk:k,Tk:I,pg:M/C,og:E}}(s.fullData);var c=(i=u.fullData,r=new on(i,!0),od(r),od(r),ou(r),ou(r),oc(r),oc(r),oa(r,3),oc(r),oc(r),ou(r),ou(r),ol(r),oc(r),oc(r),oc(r)&&ou(r),ol(r),ol(r),oc(r),oc(r),oc(r),oc(r),i=oc(r),r=oc(r),a=1,r&&i?a=0:r?a=3:i&&(a=2),{Xg:a});return o=function(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));for(r[0]=1,r[1]=(3&i.Dg)<<6|!!i.Eg<<5|31&i.Cg,r[2]=i.yg,r[3]=i.zg,r[4]=i.Ag,r[5]=i.Bg,r[6]=i.qg,r[7]=i.rg,r[8]=i.sg,r[9]=i.ug,r[10]=i.vg,r[11]=i.wg,r[12]=i.xg,r[13]=240|(3840&i.qf)>>8,r[14]=255&i.qf,r[15]=252|3&i.Xg,r[16]=252|3&i.fg,r[17]=248|7&i.eg,r[18]=248|7&i.dg,r[19]=0,r[20]=parseInt(i.pg,10),r[21]=(3&!!i.og)<<6|(7&i.Vg)<<3|!!i.Ch<<2|3,r[22]=3,e=[e,t,n],t=23,n=e.length-1,i=0;i<e.length;i+=1)r.set(new Uint8Array([32+i|128*(i===n),0,1,e[i].byteLength>>8,255&e[i].byteLength]),t),t+=5,r.set(e[i],t),t+=e[i].byteLength;return r}(o.fullData,s.fullData,u.fullData,{Vg:l.Vg,Ch:l.Ch,Dg:e.Dg,Eg:e.Eg,xg:e.xg,Cg:e.Cg,yg:e.yg,zg:e.zg,Ag:e.Ag,Bg:e.Bg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,wg:e.wg,qf:e.qf,fg:e.fg,eg:e.eg,dg:e.dg,Xg:c.Xg,pg:e.pg,og:e.og}),{height:e.height,width:e.width,Ta:o,Za:e.Uk,$a:e.Tk}}(E);if(!J||null==I)throw new eJ(2,3,3018,n?n.R()[0]:null);t.height=t.height||J.height,t.width=t.width||J.width,d={id:t.id,type:"video",codecs:"hvc1",timescale:9e4,duration:i,zb:[],Aa:new Uint8Array([]),Ta:J.Ta,Za:J.Za,$a:J.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:I,ub:k},stream:t}}d&&(l.push(d),d=null)}if("audio"==r){switch(c.audio){case"aac":for(var $,Q=[],Z=null,ee=null,et=null,en=x(u.rb()),ei=en.next();!ei.done;ei=en.next()){var er=ei.value,ea=er.data;if(ea){var eo=0;if(-1==ee&&et)ea=tn(et,er.data),ee=null;else if(null!=ee&&et){eo=Math.max(0,ee);var es=tn(et,ea.subarray(0,eo));Q.push({data:es,size:es.byteLength,duration:1024,ob:0,flags:br}),ee=et=null}if(!($=bn(ea,eo)))throw new eJ(2,3,3018,n?n.R()[0]:null);for(t.audioSamplingRate=$.sampleRate,t.channelsCount=$.channelCount,null==Z&&null!==er.pts&&(Z=er.pts);eo<ea.length;){var eu=bt(ea,eo);if(!eu){et=ea.subarray(eo,ea.length),ee=-1;break}var el=eu.Yd+eu.ka;ee=Math.max(0,eo+el-ea.length),0!=ee?et=ea.subarray(eo+eu.Yd,eo+el):eo+el<=ea.length&&Q.push({data:ea.subarray(eo+eu.Yd,eo+el),size:eu.ka,duration:1024,ob:0,flags:br}),eo+=el}}}if(!$||null==Z){Z=9e4*n.startTime;var ec=tu("audio",t.codecs.split(","));if(!ec||!t.channelsCount||!t.audioSamplingRate)throw new eJ(2,3,3018,n?n.R()[0]:null);$={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:ec};var ed=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}(ec,t.channelsCount);if(!ed)throw new eJ(2,3,3018,n?n.R()[0]:null);for(var eh=Z+(n.endTime-n.startTime)*9e4,ep=Z;ep<eh;)Q.push({data:ed,size:ed.byteLength,duration:1024,ob:0,flags:br}),ep+=1024/$.sampleRate*9e4}var ef=$.sampleRate,eg=Z/9e4*ef;d={id:t.id,type:"audio",codecs:$.codec,timescale:ef,duration:i,zb:[],Aa:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:eg,ub:Q},stream:t};break;case"ac3":for(var em=[],ev=0,ey=new Uint8Array([]),eb=null,ew={sampleRate:0,channelCount:0,Aa:new Uint8Array(0),ka:0},eT=x(u.rb()),ex=eT.next();!ex.done;ex=eT.next()){var eS=ex.value,eA=eS.data;null==eb&&null!==eS.pts&&(eb=eS.pts);for(var ek=0;ek<eA.length;)bu(eA,ek,ew)?(t.audioSamplingRate=ew.sampleRate,t.channelsCount=ew.channelCount,ev=ew.sampleRate,ey=ew.Aa,em.push({data:eA.subarray(ek,ek+ew.ka),size:ew.ka,duration:1536,ob:0,flags:br}),ek+=ew.ka):ek++}
1if(0==ev||0==ey.byteLength||null==eb)throw new eJ(2,3,3018,n?n.R()[0]:null);var eI=eb/9e4*ev;d={id:t.id,type:"audio",codecs:"ac-3",timescale:ev,duration:i,zb:[],Aa:ey,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:eI,ub:em},stream:t};break;case"ec3":for(var eE=[],eC=0,eM=new Uint8Array([]),eD=null,eR={sampleRate:0,channelCount:0,Aa:new Uint8Array(0),ka:0},eL=x(u.rb()),eP=eL.next();!eP.done;eP=eL.next()){var eN=eP.value,ej=eN.data;null==eD&&null!==eN.pts&&(eD=eN.pts);for(var eU=0;eU<ej.length;)bc(ej,eU,eR)?(t.audioSamplingRate=eR.sampleRate,t.channelsCount=eR.channelCount,eC=eR.sampleRate,eM=eR.Aa,eE.push({data:ej.subarray(eU,eU+eR.ka),size:eR.ka,duration:1536,ob:0,flags:br}),eU+=eR.ka):eU++}if(0==eC||0==eM.byteLength||null==eD)throw new eJ(2,3,3018,n?n.R()[0]:null);var e_=eD/9e4*eC;d={id:t.id,type:"audio",codecs:"ec-3",timescale:eC,duration:i,zb:[],Aa:eM,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:e_,ub:eE},stream:t};break;case"mp3":for(var eB,eF=[],eV=null,eH=[],eG=x(u.rb()),eK=eG.next();!eK.done;eK=eG.next()){var eq=eK.value;eq.data&&(null==eV&&null!==eq.pts&&(eV=eq.pts),eH.push(eq.data))}for(var ez=ti(eH),eW=0;eW<ez.length;){var eX=bp(ez,eW);eX?(eB||(eB=eX),eW+eX.ka<=ez.length&&eF.push({data:ez.subarray(eW,eW+eX.ka),size:eX.ka,duration:1152,ob:0,flags:br}),eW+=eX.ka):eW++}if(!eB||null==eV)throw new eJ(2,3,3018,n?n.R()[0]:null);var eY=eB.sampleRate,e$=eV/9e4*eY;d={id:t.id,type:"audio",codecs:"mp3",timescale:eY,duration:i,zb:[],Aa:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:e$,ub:eF},stream:t};break;case"opus":var eQ=[],eZ=null,e0=u.J;if(!e0)throw new eJ(2,3,3018,n?n.R()[0]:null);var e1=[];switch(e0.sj){case 1:case 2:e1=[0];break;case 0:e1=[255,1,1,0,1];break;case 128:e1=[255,2,0,0,1];break;case 3:e1=[1,2,1,0,2,1];break;case 4:e1=[1,2,2,0,1,2,3];break;case 5:e1=[1,3,2,0,4,1,2,3];break;case 6:e1=[1,4,2,0,4,1,2,3,5];break;case 7:e1=[1,4,2,0,4,1,2,3,5,6];break;case 8:e1=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:e1=[1,1,2,0,1];break;case 131:e1=[1,1,3,0,1,2];break;case 132:e1=[1,1,4,0,1,2,3];break;case 133:e1=[1,1,5,0,1,2,3,4];break;case 134:e1=[1,1,6,0,1,2,3,4,5];break;case 135:e1=[1,1,7,0,1,2,3,4,5,6];break;case 136:e1=[1,1,8,0,1,2,3,4,5,6,7]}for(var e2=new Uint8Array([0,e0.channelCount,0,0,e0.sampleRate>>>24&255,e0.sampleRate>>>17&255,e0.sampleRate>>>8&255,e0.sampleRate>>>0&255,0,0].concat(S(e1))),e4=e0.sampleRate,e3=x(u.rb()),e5=e3.next();!e5.done;e5=e3.next()){var e6=e5.value,e8=e6.data;null==eZ&&null!==e6.pts&&(eZ=e6.pts);for(var e9=0;e9<e8.length;){for(var e7=(16&e8[e9+1])!=0,te=(8&e8[e9+1])!=0,tt=e9+2,tr=0;255===e8[tt];)tr+=255,tt+=1;tr+=e8[tt],tt+=1,tt+=2*!!e7,tt+=2*!!te;var ta=e8.slice(tt,tt+tr);eQ.push({data:ta,size:ta.byteLength,duration:function(e){if(e.length<1)return 960;var t=e[0],n=3&t;if(t=bk[t>>3&31],0===n)e=1;else if(1===n||2===n)e=2;else if(e.length<2||0==(e=63&e[1]))return t;return t*e}(ta),ob:0,flags:br}),e9=tt+tr}}if(0==e2.byteLength||null==eZ)throw new eJ(2,3,3018,n?n.R()[0]:null);t.audioSamplingRate=e0.sampleRate,t.channelsCount=e0.channelCount;var to=eZ/9e4*e4;d={id:t.id,type:"audio",codecs:"opus",timescale:e4,duration:i,zb:[],Aa:e2,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:to,ub:eQ},stream:t}}d&&(l.push(d),d=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!l.length)return Promise.reject(new eJ(2,3,3018,n?n.R()[0]:null));var ts=new ah(l),tl=t.id+"_"+n.i;if(this.j.has(tl))var tc=this.j.get(tl);else tc=ap(ts),this.j.set(tl,tc);var td=this.l!==tc,th=ab(ts);return this.l=tc,this.g++,Promise.resolve({data:th,init:td?tc:null})},H("shaka.transmuxer.TsTransmuxer",bI),bI.prototype.transmux=bI.prototype.transmux,bI.prototype.getOriginalMimeType=bI.prototype.getOriginalMimeType,bI.prototype.convertCodecs=bI.prototype.convertCodecs,bI.prototype.isSupported=bI.prototype.isSupported,bI.prototype.destroy=bI.prototype.destroy;var bC=["aac","ac-3","ec-3","mp3","opus"],bM=["avc","hevc"];function bD(){}nU("video/mp2t",function(){return new bI("video/mp2t")},nH),nU("audio/mp2t",function(){return new bI("audio/mp2t")},nH),w(bD,ug),H("shaka.util.FairPlayUtils",bD)}).call(i,e,e,void 0),i.shaka)t[r]=i.shaka[r]}()}}]);

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.