PageSourceSearch

https://www.allango.net/scripts/shaka-player.ui.js

js allango.net collected 2026-10-06 08:50:32 UTC 503,071 bytes, 2 lines download raw bytes

1/*! For license information please see shaka-player.ui.js.LICENSE.txt */
2!function(){var e="undefined"!=typeof window?window:global,t={};if(function(e,t,n){var i;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var o=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 s(e,t){if(t)e:{for(var n=o,i=e.split("."),r=0;r<i.length-1;r++){var s=i[r];if(!(s in n))break e;n=n[s]}(s=t(r=n[i=i[i.length-1]]))!=r&&null!=s&&a(n,i,{configurable:!0,writable:!0,value:s})}}function u(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function c(e){if(!(e instanceof Array)){e=l(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",(function(e){function t(e,t){this.g=e,a(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=o[t[n]];"function"==typeof i&&"function"!=typeof i.prototype[e]&&a(i.prototype,e,{configurable:!0,writable:!0,value:function(){return u(r(this))}})}return e}));var d,h="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{var f;e:{var p={};try{p.__proto__={a:!0},f=p.a;break e}catch(e){}f=!1}d=f?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var g=d;function m(e,t){if(e.prototype=h(t.prototype),e.prototype.constructor=e,g)g(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.Oi=t.prototype}function v(){this.A=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.C=this.i=null}function y(e){if(e.A)throw new TypeError("Generator is already running");e.A=!0}function b(e,t){e.i={Ze:t,kf:!0},e.g=e.m||e.j}function E(e,t,n){return e.g=n,{value:t}}function T(e){e.g=0}function A(e,t,n){e.m=t,null!=n&&(e.j=n)}function w(e){e.m=0,e.j=2}function S(e,t,n){e.g=t,e.m=n||0}function x(e,t){e.m=t||0;var n=e.i.Ze;return e.i=null,n}function I(e){e.C=[e.i],e.m=0,e.j=0}function k(e,t){var n=e.C.splice(0)[0];(n=e.i=e.i||n)?n.kf?e.g=e.m||e.j:null!=n.D&&e.j<n.D?(e.g=n.D,e.i=null):e.g=e.j:e.g=t}function C(e){this.g=new v,this.h=e}function M(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.A=!1,r;var a=r.value}catch(t){return e.g.l=null,b(e.g,t),L(e)}
2return e.g.l=null,i.call(e.g,a),L(e)}function L(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.A=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.A=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.kf)throw t.Ze;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function N(e){this.next=function(t){return y(e.g),e.g.l?t=M(e,e.g.l.next,t,e.g.B):(e.g.B(t),t=L(e)),t},this.throw=function(t){return y(e.g),e.g.l?t=M(e,e.g.l.throw,t,e.g.B):(b(e.g,t),t=L(e)),t},this.return=function(t){return function(e,t){y(e.g);var n=e.g.l;return n?M(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),L(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function R(e,t){var n=new N(new C(t));return g&&e.prototype&&g(n,e.prototype),n}function _(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(i,r){!function e(a){a.done?i(a.value):Promise.resolve(a.value).then(t,n).then(e,r)}(e.next())}))}(new N(new C(e)))}function P(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function D(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function O(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function U(e,t,n){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{ra:r,v:a}}return{ra:-1,v:void 0}}function j(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}v.prototype.B=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.D=function(e){this.g=e},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.A=!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=o.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.H),reject:e(this.l)}},t.prototype.H=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.K(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.G(e):this.m(e)}},t.prototype.G=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.M(t,e):this.m(e)},t.prototype.l=function(e){this.B(2,e)},t.prototype.m=function(e){this.B(1,e)},t.prototype.B=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.J(),this.C()},t.prototype.J=function(){var e=this;r((function(){if(e.F()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.F=function(){if(this.A)return!1;var e=o.CustomEvent,t=o.Event,n=o.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=o.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.C=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.K=function(e){var t=this.j();e.Zc(t.resolve,t.reject)},t.prototype.M=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.Zc(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Zc=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.A=!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=l(e),a=r.next();!a.done;a=r.next())i(a.value).Zc(t,n)}))},t.all=function(e){var n=l(e),r=n.next();return r.done?i([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,i(r.value).Zc(a(o.length-1),t),r=n.next()}while(!r.done)}))},t})),s("WeakMap",(function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=l(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function i(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function r(e){if(!D(e,s)){var t=new n;a(e,s,{value:t})}}function o(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({}
2),n=Object.seal({}),i=new e([[t,2],[n,3]]);return 2==i.get(t)&&3==i.get(n)&&(i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!D(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&D(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&D(e,s)&&D(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&D(e,s)&&D(e[s],this.g))&&delete e[s][this.g]},t})),s("Map",(function(e){function t(){var e={};return e.sb=e.next=e.head=e}function n(e,t){var n=e.g;return u((function(){if(n){for(;n.head!=e.g;)n=n.sb;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e.h[n];if(i&&D(e.h,n))for(var r=0;r<i.length;r++){var s=i[r];if(t!=t&&s.key!=s.key||t===s.key)return{id:n,list:i,index:r,ya:s}}return{id:n,list:i,index:-1,ya:void 0}}function r(e){if(this.h={},this.g=t(),this.size=0,e){e=l(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(l([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&"s"==r.value[1]&&!((r=i.next()).done||4!=r.value[0].x||"t"!=r.value[1]||!i.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.ya?n.ya.value=t:(n.ya={next:this.g,sb:this.g.sb,head:this.g,key:e,value:t},n.list.push(n.ya),this.g.sb.next=n.ya,this.g.sb=n.ya,this.size++),this},r.prototype.delete=function(e){return!(!(e=i(this,e)).ya||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.ya.sb.next=e.ya.next,e.ya.next.sb=e.ya.sb,e.ya.head=null,this.size--,!0)},r.prototype.clear=function(){this.h={},this.g=this.g.sb=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).ya},r.prototype.get=function(e){return(e=i(this,e).ya)&&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})),s("Array.prototype.keys",(function(e){return e||function(){return O(this,(function(e){return e}))}})),s("Set",(function(e){function t(e){if(this.g=new Map,e){e=l(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(l([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&r.value[1]==t&&(!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach((function(i){return e.call(t,i,i,n)}))},t)})),s("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}})),s("Array.prototype.findIndex",(function(e){return e||function(e,t){return U(this,e,t).ra}})),s("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),s("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length,r=t||0;for(0>r&&(r=Math.max(r+i,0));r<i;r++){var a=n[r];if(a===e||Object.is(a,e))return!0}return!1}}
2)),s("String.prototype.includes",(function(e){return e||function(e,t){return-1!==j(this,e,"includes").indexOf(e,t||0)}})),s("Array.prototype.find",(function(e){return e||function(e,t){return U(this,e,t).v}})),s("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=j(this,e,"startsWith"),i=n.length,r=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<r&&a<i;)if(n[a++]!=e[o++])return!1;return o>=r}}));var B="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)D(i,r)&&(e[r]=i[r])}return e};s("Object.assign",(function(e){return e||B})),s("Array.prototype.values",(function(e){return e||function(){return O(this,(function(e,t){return t}))}})),s("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}))}))}})),s("Array.prototype.entries",(function(e){return e||function(){return O(this,(function(e,t){return[e,t]}))}})),s("String.prototype.repeat",(function(e){return e||function(e){var t=j(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),s("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)D(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)D(e,t)&&n.push([t,e[t]]);return n}}));var F=this||self;function G(e,t){var n,i=e.split("."),r=F;i[0]in r||void 0===r.execScript||r.execScript("var "+i[0]);for(;i.length&&(n=i.shift());)i.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function K(t,n){if(n)if(n instanceof Map)for(var i=l(n.keys()),r=i.next();!r.done;r=i.next())r=r.value,Object.defineProperty(this,r,{value:n.get(r),writable:!0,enumerable:!0});else for(i in n)Object.defineProperty(this,i,{value:n[i],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function V(e){var t,n=new K(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}function z(){}function H(){}function q(){}function X(e){var t=P.apply(1,arguments);Y.has(e)||(Y.add(e),q.apply(z,c(t)))}function W(){}K.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},K.prototype.stopImmediatePropagation=function(){this.g=!0},K.prototype.stopPropagation=function(){},G("shaka.util.FakeEvent",K);var Y=new Set;if(e.console&&e.console.log.bind){var J={},$=(J[1]=console.error.bind(console),J[2]=console.warn.bind(console),J[3]=console.info.bind(console),J[4]=console.log.bind(console),J[5]=console.debug.bind(console),J[6]=console.debug.bind(console),J);q=$[2],H=$[1]}function Q(){this.g={}}function Z(e,t){for(var n in e.g)t(n,e.g[n])}function ee(){this.xa=new Q,this.jd=this}function te(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next())n.push(t(r.value));return n}function ne(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next())t(r=r.value)&&n.push(r);return n}(i=Q.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},i.get=function(e){return(e=this.g[e])?e.slice():null},i.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter((function(e){return e!=t})),0==this.g[e].length&&delete this.g[e])},i.size=function(){return Object.keys(this.g).length},i.keys=function(){return Object.keys(this.g)},ee.prototype.addEventListener=function(e,t){this.xa&&this.xa.push(e,t)},ee.prototype.removeEventListener=function(e,t){this.xa&&this.xa.remove(e,t)},ee.prototype.dispatchEvent=function(e){if(!this.xa)return!0;var t=this.xa.get(e.type)||[],n=this.xa.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.jd,e.currentTarget=this.jd;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},ee.prototype.release=function(){this.xa=null};var ie=function e(t){var n;return R(e,(function(e){return 1==e.g&&(n=0),3!=e.g?n<t?E(e,n,3):e.D(0):(n++,e.D(2))}))},re=function e(t){var n,i,r,a,o,s;return R(e,(function(e){return 1==e.g&&(n=-1,r=i=void 0,a=l(t),o=a.next()),5!=e.g?o.done?-1==n?e.D(0):E(e,{ra:n,Qg:i,item:r,next:void 0},0):(s=o.value,0<=n?E(e,{ra:n,item:r,Qg:i,next:s},5):e.D(5)):(n++,i=r,r=s,o=a.next(),e.D(2))}))},ae=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function oe(e){var t;e instanceof oe?(se(this,e.Xa),this.Ub=e.Ub,this.$a=e.$a,ue(this,e.mc),this.Ka=e.Ka,le(this,e.g.clone()),this.Jb=e.Jb):e&&(t=String(e).match(ae))?(se(this,t[1]||"",!0),this.Ub=ce(t[2]||""),this.$a=ce(t[3]||"",!0),ue(this,t[4]),this.Ka=ce(t[5]||"",!0),le(this,t[6]||"",!0),this.Jb=ce(t[7]||"")):this.g=new ye(null)}function se(e,t,n){e.Xa=n?ce(t,!0):t,e.Xa&&(e.Xa=e.Xa.replace(/:$/,""))}function ue(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.mc=t}else e.mc=null}function le(e,t,n){t instanceof ye?e.g=t:(n||(t=de(t,me)),e.g=new ye(t))}function ce(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function de(e,t,n){return null!=e?(e=encodeURI(e).replace(t,he),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function he(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(i=oe.prototype).Xa="",i.Ub="",i.$a="",i.mc=null,i.Ka="",i.Jb="",i.toString=function(){var e=[],t=this.Xa;if(t&&e.push(de(t,fe,!0),":"),t=this.$a){e.push("//");var n=this.Ub;n&&e.push(de(n,fe,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.mc)&&e.push(":",String(t))}return(t=this.Ka)&&(this.$a&&"/"!=t.charAt(0)&&e.push("/"),e.push(de(t,"/"==t.charAt(0)?ge:pe,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Jb)&&e.push("#",de(t,ve)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Xa&&(t=new oe);var n=!!e.Xa;n?se(t,e.Xa):n=!!e.Ub,n?t.Ub=e.Ub:n=!!e.$a,n?t.$a=e.$a:n=null!=e.mc;var i=e.Ka;if(n)ue(t,e.mc);else if(n=!!e.Ka){if("/"!=i.charAt(0))if(this.$a&&!this.Ka)i="/"+i;else{var r=t.Ka.lastIndexOf("/");-1!=r&&(i=t.Ka.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.Ka=i:n=""!==e.g.toString(),n?le(t,e.g.clone()):n=!!e.Jb,n&&(t.Jb=e.Jb),t},i.clone=function(){return new oe(this)};var fe=/[#\/\?@]/g,pe=/[#\?:]/g,ge=/[#\?]/g,me=/[#\?@]/g,ve=/#/g;function ye(e){this.g=e||null}
2function be(e){if(!e.Ea&&(e.Ea={},e.bd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),r=r||"",e.add(a,decodeURIComponent(r.replace(/\+/g," ")))}}function Ee(e,t,n){var i=P.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}function Te(e,t){this.g=e,this.h=t}function Ae(e,t){var n=new Te(4,0),i=xe,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function we(e,t,n,i){q([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Se(e,t,n,i){H([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(""))}(i=ye.prototype).Ea=null,i.bd=null,i.add=function(e,t){be(this),this.g=null;var n=this.Ea.hasOwnProperty(e)&&this.Ea[e];return n||(this.Ea[e]=n=[]),n.push(t),this.bd++,this},i.set=function(e,t){return be(this),this.g=null,this.Ea.hasOwnProperty(e)?this.Ea[e]=[t]:this.add(e,t),this},i.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var e,t=[];for(e in this.Ea)for(var n=encodeURIComponent(e),i=this.Ea[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},i.clone=function(){var e=new ye;if(e.g=this.g,this.Ea){var t,n={};for(t in this.Ea)n[t]=this.Ea[t].concat();e.Ea=n,e.bd=this.bd}return e},Ee.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},G("shaka.util.Error",Ee),Ee.Severity={RECOVERABLE:1,CRITICAL:2},Ee.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Ee.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,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,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,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_MASTER_PLAYLIST_NOT_PROVIDED:4022,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,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,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,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_
2KEY_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,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,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},Te.prototype.toString=function(){return"v"+this.g+"."+this.h};var xe=null;function Ie(e,t){return e.concat(t)}function ke(){}function Ce(e){return null!=e}function Me(e){var t=Object.create(e.prototype||Object.prototype);try{var n=e.call(t);n||(Ae("Factories requiring new","Factories should be plain functions"),n=t)}catch(t){Ae("Factories requiring new","Factories should be plain functions"),n=new e}return n}function Le(e,t){if(0==t.length)return e;var n=t.map((function(e){return new oe(e)}));return e.map((function(e){return new oe(e)})).map((function(e){return n.map((function(t){return e.resolve(t)}))})).reduce(Ie,[]).map((function(e){return e.toString()}))}function Ne(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function Re(e,t){if(1==t.length)return t[0];var n=_e(e,t);if(null!=n)return n;throw new Ee(2,4,4025,t)}function _e(e,t){for(var n=l(Oe[e]),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=l(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==Pe?"":null}var Pe="text",De={ib:"video",Gb:"audio",ma:Pe,xc:"image",qh:"application"},Oe={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ue(){}function je(e,t){return e=Ge(e),t=Ge(t),e.split("-")[0]==t.split("-")[0]}function Be(e,t){e=Ge(e),t=Ge(t);var n=e.split("-"),i=t.split("-");return n[0]==i[0]&&1==n.length&&2==i.length}function Fe(e,t){e=Ge(e),t=Ge(t);var n=e.split("-"),i=t.split("-");return 2==n.length&&2==i.length&&n[0]==i[0]}function Ge(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Xe.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Ke(e,t){var n=ze(e),i=ze(t);return e!=n&&t!=i&&n==i}function Ve(e,t){return e=Ge(e),(t=Ge(t))==e?4:Be(t,e)?3:Fe(t,e)?2:Be(e,t)?1:0}function ze(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),Xe.get(e)||e}function He(e){return e.language?Ge(e.language):e.audio&&e.audio.language?Ge(e.audio.language):e.video&&e.video.language?Ge(e.video.language):"und"}function qe(e,t){for(var n=Ge(e),i=new Set,r=l(t),a=r.next();!a.done;a=r.next())i.add(Ge(a.value));for(a=(r=l(i)).next();!a.done;a=r.next())if((a=a.value)==n)return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(Be(a=a.value,n))return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(Fe(a=a.value,n))return a;for(a=(i=l(i)).next();!a.done;a=i.next())if(Be(n,a=a.value))return a;return null}G("shaka.util.LanguageUtils",Ue),Ue.findClosestLocale=qe,Ue.getLocaleForVariant=He,Ue.getLocaleForText=function(e){return Ge(e.language||"und")},Ue.getBase=ze,Ue.relatedness=Ve,Ue.areSiblings=Ke,Ue.normalize=Ge,Ue.isSiblingOf=Fe,Ue.isParentOf=Be,Ue.areLanguageCompatible=je,Ue.areLocaleCompatible=function(e,t){return(e=Ge(e))==(t=Ge(t))};var Xe=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"],["
2ibo","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 We(e){ee.call(this),this.j=Ge(e),this.i=new Map,this.g=new Set,this.h=new Map}function Ye(e){for(var t=e.h,n=e.j,i=e.g,r=new Set,a={},o=l(i),s=o.next();!s.done;a={Zb:a.Zb},s=o.next()){a.Zb=s.value,r.add(a.Zb),r.add(ze(a.Zb)),(s=ne(t.keys(),function(e){return function(t){return Ke(t,e.Zb)}}(a))).sort();var u=l(s);for(s=u.next();!s.done;s=u.next())r.add(s.value);for((s=ne(t.keys(),function(e){return function(t){return ze(t)==e.Zb}}(a))).sort(),s=(u=l(s)).next();!s.done;s=u.next())r.add(s.value)}for(r.add(n),n=[],s=(r=l(r)).next();!s.done;s=r.next())(s=t.get(s.value))&&n.push(s);for(n.reverse(),e.i.clear(),s=(t=l(n)).next();!s.done;s=t.next())s.value.forEach((function(t,n){e.i.set(n,t)}));for(t=e.i.keys(),r=new Set,s=(n=l(e.g)).next();!s.done;s=n.next())Je(s=e.h.get(s.value)||new Map,t,r);0<r.size&&(i=(new Map).set("locales",Array.from(i)).set("missing",Array.from(r)),e.dispatchEvent(new K("missing-localizations",i)))}function Je(e,t,n){for(var i=(t=l(t)).next();!i.done;i=t.next())i=i.value,e.get(i)||n.add(i)}m(We,ee),(i=We.prototype).release=function(){ee.prototype.release.call(this)},i.Re=function(e){var t=this;this.g.clear();for(var n=(e=l(e)).next();!n.done;n=e.next())this.g.add(Ge(n.value));Ye(this),(e=ne(this.g,(function(e){return!t.h.has(e)}))).length&&this.dispatchEvent(new K("unknown-locales",(new Map).set("locales",e))),e=ne(this.g,(function(e){return t.h.has(e)})),e=(new Map).set("locales",e.length?e:[this.j]),this.dispatchEvent(new K("locale-changed",e))},i.ia=function(e,t,n){e=Ge(e),void 0===n&&(n=$e);var i=this.h.get(e)||new Map;return t.forEach((function(e,t){i.has(t)&&n!=$e||i.set(t,e)})),this.h.set(e,i),Ye(this),this.dispatchEvent(new K("locale-updated")),this},i.Zg=function(e){for(var t=l(e.keys()),n=t.next();!n.done;n=t.next())n=n.value,e.set(n,this.resolve(n))},i.resolve=function(e){var t=this.i.get(e);return t||(e=(new Map).set("locales",Array.from(this.g)).set("missing",e),this.dispatchEvent(new K("unknown-localization",e)),"")},G("shaka.ui.Localization",We),We.prototype.resolve=We.prototype.resolve,We.prototype.resolveDictionary=We.prototype.Zg,We.prototype.insert=We.prototype.ia,We.prototype.changeLocale=We.prototype.Re,We.prototype.release=We.prototype.release;var $e=1;We.ConflictResolution={USE_OLD:0,USE_NEW:$e},We.UNKNOWN_LOCALES="unknown-locales",We.UNKNOWN_LOCALIZATION="unknown-localization",We.MISSING_LOCALIZATIONS="missing-localizations",We.LOCALE_CHANGED="locale-changed",We.LOCALE_UPDATED="locale-updated";var Qe={AD_PROGRESS:"AD_PROGRESS",Eh:"ENTER_PICTURE_IN_PICTURE",Uh:"MULTIPLE_LANGUAGES",BACK:"BACK",Ii:"VOLUME",di:"PAUSE",Gh:"EXIT_FULL_SCREEN",Yh:"NOT_APPLICABLE",ni:"SEEK",nh:"AD_DURATION",Oh:"LANGUAGE",pi:"SKIP_TO_LIVE",Mh:"FULL_SCREEN",xh:"CAST",Me:"LIVE",Gi:"UNRECOGNIZED_LANGUAGE",Gf:"SUBTITLE_FORCED",ki:"RESOLUTION",ei:"PICTURE_IN_PICTURE",gi:"PLAY",Hh:"EXIT_LOOP_MODE",Zh:"OFF",Vh:"MUTE",ph:"AIRPLAY",Ei:"UNDETERMINED_LANGUAGE",wh:"CAPTIONS",oh:"AD_TIME",rh:"AUTO_QUALITY",$h:"ON",si:"STATISTICS",ii:"PLAYBACK_RATE",Th:"MORE_SETTINGS",Ih:"EXIT_PICTURE_IN_PICTURE",Dh:"ENTER_LOOP_MODE",Fi:"UNMUTE",ji:"REPLAY",Lh:"FAST_FORWARD",li:"REWIND",oi:"SKIP_AD",Ph:"LOOP"};function Ze(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function et(e){return e.h/(1-Math.pow(e.g,e.i))}function tt(){this.h=new Ze(2),this.j=new Ze(5),this.g=0,this.i=128e3,this.l=16e3}function nt(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function it(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function rt(e,t,n){if(n||(n=nt),e.length!=t.length)return!1;t=t.slice();for(var i={},r=(e=l(e)).next();!r.done;i={Dd:i.Dd},r=e.next()){if(i.Dd=r.value,-1==(r=t.findIndex(function(e){return function(t){return n(e.Dd,t)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function at(e,t,n){if(n||(n=nt),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 ot(e,t,n){this.startTime=e,this.direction=ft,this.endTime=t,this.payload=n,this.region=new wt,this.position=null,this.positionAlign=ut,this.size=0,this.textAlign=lt,this.writingMode=pt,this.lineInterpretation=gt,this.line=null,this.lineHeight="",this.lineAlign=mt,this.displayAlign=dt,this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Et,this.fontStyle=Tt,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=this.lineBreak=this.isContainer=!1,this.cellResolution={columns:32,rows:15}}function st(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!at(e.nestedCues,t.nestedCues,st))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[
2n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!at(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}Ze.prototype.sample=function(e,t){var n=Math.pow(this.g,e);n=t*(1-n)+n*this.h,isNaN(n)||(this.h=n,this.i+=e)},tt.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},tt.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e,i=e/1e3;this.g+=t,this.h.sample(i,n),this.j.sample(i,n)}},tt.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(et(this.h),et(this.j))},ot.prototype.clone=function(){var e,t=new ot(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},G("shaka.text.Cue",ot);var ut="auto";ot.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ut};var lt="center",ct={LEFT:"left",RIGHT:"right",CENTER:lt,START:"start",END:"end"};ot.textAlign=ct;var dt="after",ht={BEFORE:"before",CENTER:"center",AFTER:dt};ot.displayAlign=ht;var ft="ltr";ot.direction={HORIZONTAL_LEFT_TO_RIGHT:ft,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var pt="horizontal-tb";ot.writingMode={HORIZONTAL_TOP_TO_BOTTOM:pt,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var gt=0;ot.lineInterpretation={LINE_NUMBER:gt,PERCENTAGE:1};var mt="start",vt={CENTER:"center",START:mt,END:"end"};ot.lineAlign=vt;var yt={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ot.defaultTextColor=yt;var bt={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ot.defaultTextBackgroundColor=bt;var Et=400;ot.fontWeight={NORMAL:Et,BOLD:700};var Tt="normal",At={NORMAL:Tt,ITALIC:"italic",OBLIQUE:"oblique"};function wt(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=St,this.scroll=xt}ot.fontStyle=At,ot.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},G("shaka.text.CueRegion",wt);var St=1;wt.units={PX:0,PERCENTAGE:St,LINES:2};var xt="";function It(){}function kt(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(Ct(e)==Ct(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;for(var n=Lt(e),i=Lt(t),r=l(ie(e.byteLength)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function Ct(e){return e instanceof ArrayBuffer?e:e.buffer}function Mt(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function Lt(e,t,n){return Rt(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function Nt(e,t,n){return Rt(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function Rt(e,t,n,i){var r=(e.byteOffset||0)+e.byteLength;return t=Math.max(0,Math.min((e.byteOffset||0)+t,r)),new i(Ct(e),t,Math.min(t+Math.max(n,0),r)-t)}function _t(){}wt.scrollMode={NONE:xt,UP:"up"},G("shaka.util.BufferUtils",It),It.toDataView=Nt,It.toUint8=Lt,It.toArrayBuffer=Mt,It.equal=kt,G("shaka.dependencies",_t),_t.has=function(e){return Dt.has(e)},_t.add=function(e,t){if(!Pt[e])throw Error(e+" is not supported");Dt.set(e,(function(){return t}))};var Pt={muxjs:"muxjs"};_t.Allowed=Pt;var Dt=new Map([["muxjs",function(){return e.muxjs}]]);function Ot(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function Ut(e){this.h=e,this.g=void 0}function jt(){}function Bt(e){return e?(239==(e=Lt(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),(e=(new TextDecoder).decode(e)).includes("�")&&H('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),e):""}function Ft(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new Ee(2,2,2004);var i=Math.floor(e.byteLength/2);n=new Uint16Array(i),e=Nt(e);for(var r=(i=l(ie(i))).next();!r.done;r=i.next())n[r=r.value]=e.getUint16(2*r,t);return zt.value()(n)}function Gt(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=Lt(e);if(239==n[0]&&187==n[1]&&191==n[2])return Bt(n);if(254==n[0]&&255==n[1])return Ft(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Ft(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Ft(e,!1);if(0==n[1]&&0==n[3])return Ft(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Bt(e);throw new Ee(2,2,2003)}function Kt(e){return Mt((new TextEncoder).encode(e))}function Vt(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=l(re(e)),a=r.next();!a.done;a=r.next())a=a.value,i.setUint16(2*a.ra,a.item.charCodeAt(0),t);return n}Ot.prototype.resolve=function(){},Ot.prototype.reject=function(){},Ut.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},G("shaka.util.StringUtils",jt),jt.resetFromCharCode=function(){zt.g=void 0},jt.toUTF16=Vt,jt.toUTF8=Kt,jt.fromBytesAutoDetect=Gt,jt.fromUTF16=Ft,jt.fromUTF8=Bt;
2var zt=new Ut((function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={xb:65536};0<t.xb;(t={xb:t.xb}).xb/=2)if(e(t.xb))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.xb)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.xb));return n}}(t);return null}));function Ht(){}function qt(e){return e=Lt(e),e=zt.value()(e),btoa(e)}function Xt(e,t){t=null==t||t;var n=qt(e).replace(/\+/g,"-").replace(/\//g,"_");return t?n:n.replace(/[=]*$/,"")}function Wt(t){var n=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));t=new Uint8Array(n.length);for(var i=(n=l(re(n))).next();!i.done;i=n.next())t[(i=i.value).ra]=i.item.charCodeAt(0);return t}function Yt(t){for(var n=t.length/2,i=new Uint8Array(n),r=(n=l(ie(n))).next();!r.done;r=n.next())i[r=r.value]=e.parseInt(t.substr(2*r,2),16);return i}function Jt(e){var t=Lt(e);e="";for(var n=(t=l(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function $t(){for(var e=P.apply(0,arguments),t=0,n=l(e),i=n.next();!i.done;i=n.next())t+=i.value.byteLength;for(t=new Uint8Array(t),n=0,i=(e=l(e)).next();!i.done;i=e.next())i=i.value,t.set(Lt(i),n),n+=i.byteLength;return t}function Qt(){var e=this;this.A=Dt.get("muxjs")(),this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.m=[],this.j=[],this.i=[],this.l=!1,this.g.on("data",(function(t){e.j=t.captions,e.i=t.metadata,e.m.push($t(t.initSegment,t.data))})),this.g.on("done",(function(){var t={data:$t.apply(Ht,c(e.m)),captions:e.j,metadata:e.i};e.h.resolve(t),e.l=!1}))}function Zt(e,t){if(!Dt.get("muxjs")()||!en(e))return!1;if(t)return MediaSource.isTypeSupported(tn(t,e));var n=tn("audio",e),i=tn("video",e);return MediaSource.isTypeSupported(n)||MediaSource.isTypeSupported(i)}function en(e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]}function tn(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var i=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(i){var r="avc1.",a=i[1],o=Number(i[2]);r=("66"==a?r+"4200":"77"==a?r+"4d00":r+"6400")+(o>>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function nn(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function rn(e,t,n){return e=nn(e,t),Dt.get("muxjs")()&&en(e)?tn(n,e):e}function an(e){var t=(e=e.split("."))[0];return e.pop(),t}function on(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function sn(e){this.j=null,this.i=e,this.l=this.C=0,this.m=1/0,this.h=this.g=null,this.B="",this.A=new Map}function un(e){return!(!hn[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}
2function ln(e,t,n){if(e.B=t,t=e.A.get(t))for(var i=l(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter((function(e){return e.endTime<=n})))&&e.i.append(r)}function cn(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=l(t.nestedCues)).next();!i.done;i=t.next())cn(e,i.value,n)}function dn(e,t,n,i,r){for(var a=n+" "+i,o=new Map,s=(t=l(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),cn(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.B&&e.i.append([u]))}for(a=(r=l(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.A.has(a)||e.A.set(a,new Map),s=(t=l(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.A.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}G("shaka.util.Uint8ArrayUtils",Ht),Ht.concat=$t,Ht.toHex=Jt,Ht.fromHex=Yt,Ht.fromBase64=Wt,Ht.toBase64=Xt,Ht.toStandardBase64=qt,Ht.equal=function(e,t){return Ae("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead."),kt(e,t)},Qt.prototype.destroy=function(){return this.g.dispose(),this.g=null,Promise.resolve()},(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),sn.prototype.destroy=function(){return this.i=this.j=null,this.A.clear(),Promise.resolve()},sn.prototype.remove=function(e,t){var n=this;return _((function(i){if(1==i.g)return E(i,Promise.resolve(),2);!n.i||!n.i.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),T(i)}))},G("shaka.text.TextEngine",sn),sn.prototype.destroy=sn.prototype.destroy,sn.findParser=function(e){return hn[e]},sn.unregisterParser=function(e){delete hn[e]},sn.registerParser=function(e,t){hn[e]=t};var hn={};function fn(e){this.h=e,this.g=null}function pn(e){this.h=e,this.g=null}function gn(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function mn(e){return""!=Tn().canPlayType(e)}function vn(){return En("Tizen")}function yn(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!vn()}function bn(){if(!yn())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function En(e){return(navigator.userAgent||"").includes(e)}function Tn(){return wn||(An||(An=new pn((function(){wn=null}))),(wn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(wn=document.createElement("video")),An.R(1),wn)}fn.prototype.R=function(t){var n=this;this.stop();var i=!0,r=null;return this.g=function(){e.clearTimeout(r),i=!1},r=e.setTimeout((function(){i&&n.h()}),1e3*t),this},fn.prototype.stop=function(){this.g&&(this.g(),this.g=null)},pn.prototype.Aa=function(){return this.stop(),this.h(),this},pn.prototype.R=function(e){var t=this;return this.stop(),this.g=new fn((function(){t.h()})).R(e),this},pn.prototype.ka=function(e){var t=this;return this.stop(),this.g=new fn((function(){t.g.R(e),t.h()})).R(e),this},pn.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},G("shaka.util.Timer",pn),pn.prototype.stop=pn.prototype.stop,pn.prototype.tickEvery=pn.prototype.ka,pn.prototype.tickAfter=pn.prototype.R,pn.prototype.tickNow=pn.prototype.Aa;var An=null,wn=null;function Sn(e,t,n,i,r){var a=e.variants;(t.length||n.length)&&(a=function(e,t,n){for(var i={},r=(t=l(t)).next();!r.done;i={Od:i.Od},r=t.next())if(i.Od=r.value,r=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.Od)}}(i)),r.length){e=r;break}for(i={},n=l(n),t=n.next();!t.done;i={zd:i.zd},t=n.next())if(i.zd=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.zd)}}(i)),t.length){e=t;break}return e}(a,t,n)),t=function(e){for(var t=new Q,n=(e=l(e)).next();!n.done;n=e.next()){var i=In(n=n.value);t.push(i,n)}return t}(a=zn(a,i)),t=function(e){var t=0,n=new Map,i=e.size();return Z(e,(function(e,r){for(var a=l(r),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;
2if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new Q);var u=n.get(s);u.push(e,o),u.size()===i&&(t=Math.max(t,s))}}})),t?n.get(t):e}(t);var o=function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next())if((i=i.value)==Jn||i==$n){if(1==(e=xn(e,i)).size())return e.keys()[0]}else if(i==Qn)break;return function(e){var t="",n=1/0;return Z(e,(function(e,i){for(var r=0,a=0,o=l(i),s=o.next();!s.done;s=o.next())r+=s.value.bandwidth||0,++a;(r/=a)<n&&(t=e,n=r)})),t}(e)}(t,r);e.variants=e.variants.filter((function(e){return In(e)==o}))}function xn(e,t){var n=0,i=new Q;return Z(e,(function(e,r){for(var a=0,o=0,s=l(r),u=s.next();!u.done;u=s.next())(u=u.value).decodingInfos.length&&(a+=u.decodingInfos[0][t]?1:0,o++);(a/=o)>n?(i.g={},i.push(e,r),n=a):a==n&&i.push(e,r)})),i}function In(e){var t="";e.video&&(t=an(e.video.codecs));var n="";return e.audio&&(n=an(e.audio.codecs)),t+"-"+n}function kn(e,t,n){function i(e,t,n){return e>=t&&e<=n}var r=e.video;return!(r&&r.width&&r.height&&(!i(r.width,t.minWidth,Math.min(t.maxWidth,n.width))||!i(r.height,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Cn(e,t){return _((function(n){return 1==n.g?E(n,Mn(t,0<t.offlineSessionIds.length),2):(Pn(e,t),function(e){e.textStreams=e.textStreams.filter((function(e){return un(nn(e.mimeType,e.codecs))}))}(t),E(n,function(e){var t,n,i,r,a,o,s;return _((function(u){switch(u.g){case 1:t=[],n=l(e.imageStreams),i=n.next();case 2:if(i.done){u.D(4);break}if(r=i.value,a=r.mimeType,Zn.has(a)){u.D(5);break}if(!(o=ei.get(a))){Zn.set(a,!1),u.D(5);break}return E(u,function(e){return new Promise((function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then((function(){t(!0)})).catch((function(){t(!1)})):n.onload=n.onerror=function(){t(2===n.height)}}))}(o),7);case 7:s=u.h,Zn.set(a,s);case 5:Zn.get(a)&&t.push(r),i=n.next(),u.D(2);break;case 4:e.imageStreams=t,T(u)}}))}(t),0))}))}function Mn(e,t){return _((function(n){if(1==n.g)return E(n,Ln(e.variants,t,!1),2);e.variants=e.variants.filter((function(e){var t=e.video;if(t){var n=_n(t.codecs);if(t.codecs.includes(",")){var i=t.codecs.split(",");if(n=Re("video",i),i=Re("audio",i),i=rn(t.mimeType,i,"audio"),!MediaSource.isTypeSupported(i))return!1}if(n=rn(t.mimeType,n,"video"),!MediaSource.isTypeSupported(n))return!1}return!((n=e.audio)&&(i=Rn(n.codecs),n=rn(n.mimeType,i,"audio"),!MediaSource.isTypeSupported(n)))&&(En("Xbox One")&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&t.codecs.includes("avc1.")?(Xn(e),!1):((t=e.decodingInfos.some((function(e){return e.supported})))||Xn(e),t))})),T(n)}))}function Ln(e,t,n){var i,r,a,o,s,u,c,d,h,f;return _((function(p){if(e.some((function(e){return e.decodingInfos.length})))return p.return();for(i=navigator.mediaCapabilities,r=[],a=function(e,t){var n;return _((function(r){return 1==r.g?(A(r,2),E(r,i.decodingInfo(t),4)):2!=r.g?(n=r.h,e.decodingInfos.push(n),S(r,0)):(x(r),JSON.stringify(t),void T(r))}))},o=l(e),s=o.next();!s.done;s=o.next())for(u=s.value,c=Nn(u,t,n),d=l(c),h=d.next();!h.done;h=d.next())f=h.value,r.push(a(u,f));return E(p,Promise.all(r),0)}))}function Nn(e,t,n){var i=e.audio,r=e.video;if(n={type:n?"file":"media-source"},r){var a=r.codecs;if(r.codecs.includes(",")){var o=r.codecs.split(",");a=_n(a=Re("video",o)),o=Re("audio",o),o=rn(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=_n(a),a=rn(r.mimeType,a,"video"),n.video={contentType:a,width:r.width||1,height:r.height||1,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":n.video.transferFunction="srgb";break;case"PQ":n.video.transferFunction="pq";break;case"HLG":n.video.transferFunction="hlg"}}if(i&&(a=Rn(i.codecs),a=rn(i.mimeType,a,"audio"),n.audio={contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio}),!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[n];e=[],a=new Map;for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;a.get(u.keySystem)||a.set(u.keySystem,[]),a.get(u.keySystem).push(u)}o=t?"required":"optional",t=t?["persistent-license"]:["temporary"];for(var c=(u=l(a.keys())).next();!c.done;c=u.next()){var d=c.value;c=Object.assign({},n);var h=a.get(d);for(d={keySystem:d,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(h=l(h)).next();!s.done;s=h.next()){if((s=s.value).initData&&s.initData.length){for(var f=new Set,p=l(s.initData),g=p.next();!g.done;g=p.next())f.add(g.value.initDataType);d.initDataType=s.initData[0].initDataType}s.distinctiveIdentifierRequired&&(d.distinctiveIdentifier="required"),s.persistentStateRequired&&(d.persistentState="required"),s.sessionType&&(d.sessionTypes=[s.sessionType]),i&&(d.audio?d.audio.robustness=d.audio.robustness||s.audioRobustness:d.audio={robustness:s.audioR
2obustness}),r&&(d.video?d.video.robustness=d.video.robustness||s.videoRobustness:d.video={robustness:s.videoRobustness})}c.keySystemConfiguration=d,e.push(c)}return e}function Rn(e){return vn()&&"ac-3"==e.toLowerCase()?"ec-3":e}function _n(e){return"vp9"==e?"vp09.00.10.08":e}function Pn(e,t){t.variants=t.variants.filter((function(t){var n=t.audio;return t=t.video,!(n&&e&&e.audio&&!Dn(n,e.audio)||t&&e&&e.video&&!Dn(t,e.video))}))}function Dn(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function On(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=[];o&&s.push(o),a&&s.push(a);var u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var c=[];t&&c.push(t.kind),n&&c.push(n.kind),c=c[0]||null;var d=new Set;if(t)for(var h=l(t.roles),f=h.next();!f.done;f=h.next())d.add(f.value);if(n)for(f=(h=l(n.roles)).next();!f.done;f=h.next())d.add(f.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null},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),t&&(e.audioId=t.
2id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e}function Un(e){return{id:e.id,active:!1,type:Pe,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null}}function jn(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=e.segmentIndex.get(0));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId}}function Bn(e){return e.__shaka_id||(e.__shaka_id=Yn++),e.__shaka_id}function Fn(e){var t=Kn(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function Gn(e){var t=Kn(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function Kn(e){return{id:Bn(e),active:!1,type:"",bandwidth:0,language:Ge(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioR
2oles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}function Vn(e){return e.allowedByApplication&&e.allowedByKeySystem}function zn(e,t){for(var n=e.filter((function(e){return e.audio&&e.audio.channelsCount})),i=new Map,r=(n=l(n)).next();!r.done;r=n.next()){var a=(r=r.value).audio.channelsCount;i.has(a)||i.set(a,[]),i.get(a).push(r)}return 0==(n=Array.from(i.keys())).length?e:(r=n.filter((function(e){return e<=t}))).length?i.get(Math.max.apply(Math,c(r))):i.get(Math.min.apply(Math,c(n)))}function Hn(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=qe(Ge(t),e.map((function(e){return e.language})));s&&(r=e.filter((function(e){return Ge(e.language)==s})))}if(r=r.filter((function(e){return e.forced==i})),n){if((e=qn(r,n)).length)return e}else if(e=r.filter((function(e){return 0==e.roles.length})),e.length)return e;return e=r.map((function(e){return e.roles})).reduce(Ie,[]),e.length?qn(r,e[0]):r}function qn(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function Xn(e){var t=[];return e.audio&&t.push(Wn(e.audio)),e.video&&t.push(Wn(e.video)),t.join(", ")}function Wn(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"}var Yn=0,Jn="smooth",$n="powerEfficient",Qn="bandwidth",Zn=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ei=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ti(){var e=this;this.l=null,this.i=!1,this.h=new tt,navigator.connection&&navigator.connection.addEventListener("change",(function(){if(e.g.useNetworkInformation&&e.i){e.h=new tt,e.g&&e.h.configure(e.g.advanced);var t=e.chooseVariant();t&&e.l(t)}})),this.j=[],this.A=1,this.B=!1,this.g=this.m=null}function ni(e){var t=e.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.g.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function ii(e,t){return e&&(t=t.filter((function(t){return kn(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function ri(e,t){this.h=e,this.g=new Set([e]);for(var n=l(t=t||[]),i=n.next();!i.done;i=n.next())this.add(i.value)}function ai(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var i=t.audio;n=!((!(!n.channelsCount||!i.channelsCount||2<n.channelsCount||2<i.channelsCount)||n.channelsCount==i.channelsCount)&&oi(n,i)&&si(n.roles,i.roles))}return!n&&(n=e.video&&t.video)&&(n=!(oi(n=e.video,i=t.video)&&si(n.roles,i.roles))),!n}function oi(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return an(e)})),i=t.codecs.split(",").map((function(e){return an(e)}));if(n.length!=i.length)return!1;n.sort(),i.sort();for(var r=l(ie(n.length)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function si(e,t){var n=new Set(e),i=new Set(t);if(n.delete("main"),i.delete("main"),n.size!=i.size)return!1;for(var r=(n=l(n)).next();!r.done;r=n.next())if(!i.has(r.value))return!1;return!0}function ui(e){this.g=e,this.h=new li(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function li(e,t,n,i){this.i=e,this.j=t,this.g=n,this.h=void 0===i?"":i}
2function ci(){this.g=fi,this.h=(new Map).set(fi,2).set(hi,1)}function di(e,t,n){e.h.set(fi,n).set(hi,t)}(i=ti.prototype).stop=function(){this.l=null,this.i=!1,this.j=[],this.A=1,this.m=null},i.init=function(e){this.l=e},i.chooseVariant=function(){var e=ii(this.g.restrictions,this.j),t=this.h.getBandwidthEstimate(ni(this));this.j.length&&!e.length&&(e=[(e=ii(null,this.j))[0]]);for(var n=e[0]||null,i=0;i<e.length;i++){for(var r=e[i],a=isNaN(this.A)?1:Math.abs(this.A),o=a*r.bandwidth/this.g.bandwidthDowngradeTarget,s={bandwidth:1/0},u=i+1;u<e.length;u++)if(r.bandwidth!=e[u].bandwidth){s=e[u];break}a=a*s.bandwidth/this.g.bandwidthUpgradeTarget,t>=o&&t<=a&&n.bandwidth!=r.bandwidth&&(n=r)}return this.m=Date.now(),n},i.enable=function(){this.i=!0},i.disable=function(){this.i=!1},i.segmentDownloaded=function(e,t){if(this.h.sample(e,t),null!=this.m&&this.i)e:{if(this.B){if(Date.now()-this.m<1e3*this.g.switchInterval)break e}else{var n=this.h;if(!(n.g>=n.i))break e;this.B=!0}n=this.chooseVariant(),this.h.getBandwidthEstimate(ni(this)),n&&this.l(n)}},i.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)},i.setVariants=function(e){this.j=e},i.playbackRateChanged=function(e){this.A=e},i.configure=function(e){this.g=e,this.h&&this.g&&this.h.configure(this.g.advanced)},G("shaka.abr.SimpleAbrManager",ti),ti.prototype.configure=ti.prototype.configure,ti.prototype.playbackRateChanged=ti.prototype.playbackRateChanged,ti.prototype.setVariants=ti.prototype.setVariants,ti.prototype.getBandwidthEstimate=ti.prototype.getBandwidthEstimate,ti.prototype.segmentDownloaded=ti.prototype.segmentDownloaded,ti.prototype.disable=ti.prototype.disable,ti.prototype.enable=ti.prototype.enable,ti.prototype.chooseVariant=ti.prototype.chooseVariant,ti.prototype.init=ti.prototype.init,ti.prototype.stop=ti.prototype.stop,ri.prototype.add=function(e){return!!ai(this.h,e)&&(this.g.add(e),!0)},ri.prototype.values=function(){return this.g.values()},ui.prototype.create=function(e){var t=this,n=e.filter((function(e){return ai(t.g,e)}));return n.length?new ri(n[0],n):this.h.create(e)},li.prototype.create=function(e){var t=[];t=function(e,t){var n=Ge(t),i=qe(n,e.map((function(e){return He(e)})));return i?e.filter((function(e){return i==He(e)})):[]}(e,this.i);var n=e.filter((function(e){return e.primary}));for(e=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j),e.length&&(t=e),this.g&&((e=zn(t,this.g)).length&&(t=e)),this.h&&(e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length&&(t=e)),e=new ri(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,ai(e.h,n)&&e.add(n);return e};var hi=0,fi=1;function pi(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.A=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 gi(e){var t,n;return _((function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new Ee(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?i.return():(n=e.h*(1+(2*Math.random()-1)*e.A),E(i,new Promise((function(e){new pn(e).R(n/1e3)})),2))}e.h*=e.m,T(i)}))}function mi(e,t){this.promise=e,this.i=t,this.g=!1}function vi(e){return new mi(Promise.reject(e),(function(){return Promise.resolve()}))}function yi(){var e=Promise.reject(new Ee(2,7,7001));return e.catch((function(){})),new mi(e,(function(){return Promise.resolve()}))}function bi(e){return new mi(Promise.resolve(e),(function(){return Promise.resolve()}))}function Ei(e){return new mi(e,(function(){return e.catch((function(){}))}))}function Ti(e){return new mi(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function Ai(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function wi(e){var t,n={};for(t in e)n[t]=e[t];return n}function Si(){this.g=[]}function xi(e,t){e.g.push(t.finally((function(){it(e.g,t)})))}function Ii(e,t,n){ee.call(this),this.i=!1,this.m=new Si,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.B=n||null,this.A=!1}function ki(e,t,n,i){n=n||_i;var r=Pi[e];(!r||n>=r.priority)&&(Pi[e]={priority:n,Pg:t,Rg:void 0!==i&&i})}function Ci(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,
2streamDataCallback:void 0===n?null:n}}function Mi(e,t,n,i,r,a,o){e.A&&(n.uris[r]=n.uris[r].replace("http://","https://"));var s=new oe(n.uris[r]),u=s.Xa,l=!1;u||(se(s,u=(u=location.protocol).slice(0,-1)),n.uris[r]=s.toString()),u=u.toLowerCase();var c=(u=Pi[u])?u.Pg:null;if(!c)return vi(new Ee(2,1,1e3,s));var d,h=u.Rg,f=null,p=null,g=!1,m=!1;return Ei(gi(i)).oa((function(){if(e.i)return yi();d=Date.now();var i=c(n.uris[r],n,t,(function(n,i,r){f&&f.stop(),p&&p.R(s/1e3),e.l&&t==Ri&&(e.l(n,i),l=!0,o.g=r)}),(function(i){e.j&&e.j(i,n,t),m=!0}));if(!h)return i;var a=n.retryParameters.connectionTimeout;a&&(f=new pn((function(){g=!0,i.abort()}))).R(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new pn((function(){g=!0,i.abort()}))),i})).oa((function(i){f&&f.stop(),p&&p.stop(),null==i.timeMs&&(i.timeMs=Date.now()-d);var r={response:i,Cg:l};return!m&&e.j&&e.j(i.headers,n,t),r}),(function(s){if(f&&f.stop(),p&&p.stop(),e.B){var u=null,l=0;s instanceof Ee&&(u=s,1001==s.code&&(l=s.data[1])),e.B(n,u,l,g)}if(e.i)return yi();if(g&&(s=new Ee(1,1,1003,n.uris[r],t)),s instanceof Ee){if(7001==s.code)throw s;if(1010==s.code)throw a;if(1==s.severity)return u=new K("retry",u=(new Map).set("error",s)),e.dispatchEvent(u),r=(r+1)%n.uris.length,Mi(e,t,n,i,r,s,o)}throw s}))}function Li(){this.g=0}function Ni(e,t,n){mi.call(this,e,t),this.h=n}mi.prototype.abort=function(){return this.g=!0,this.i()},mi.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},mi.prototype.oa=function(e,t){function n(n){return function(s){if(r.g&&n)a.reject(o);else{var u=n?e:t;u?i=function(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function i(){return a.reject(o),r.abort()}var r=this,a=new Ot,o=new Ee(2,7,7001);return this.promise.then(n(!0),n(!1)),new mi(a,(function(){return i()}))},G("shaka.util.AbortableOperation",mi),mi.prototype.chain=mi.prototype.oa,mi.prototype.finally=mi.prototype.finally,mi.all=Ti,mi.prototype.abort=mi.prototype.abort,mi.notAbortable=Ei,mi.completed=bi,mi.aborted=yi,mi.failed=vi,Si.prototype.destroy=function(){for(var e=[],t=l(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)},m(Ii,ee),(i=Ii.prototype).ue=function(e){this.A=e},i.Sg=function(e){this.g.add(e)},i.ih=function(e){this.g.delete(e)},i.Of=function(){this.g.clear()},i.Tg=function(e){this.h.add(e)},i.jh=function(e){this.h.delete(e)},i.Pf=function(){this.h.clear()},i.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),ee.prototype.release.call(this),this.m.destroy()},i.request=function(e,t){var n=this,i=new Li;if(this.i){var r=Promise.reject(new Ee(2,7,7001));return r.catch((function(){})),new Ni(r,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ai(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=Ai(t.uris),r=function(e,t,n){for(var i=bi(void 0),r={},a=(e=l(e.g)).next();!a.done;r={Jd:r.Jd},a=e.next())r.Jd=a.value,i=i.oa(function(e){return function(){return n.body&&(n.body=Mt(n.body)),e.Jd(t,n)}}(r));return i.oa(void 0,(function(e){if(e instanceof Ee&&7001==e.code)throw e;throw new Ee(2,1,1006,e)}))}(this,e,t);var a=r.oa((function(){return Mi(n,e,t,new pi(t.retryParameters,!1),0,null,i)})),o=a.oa((function(t){return function(e,t,n){for(var i=bi(void 0),r={},a=(e=l(e.h)).next();!a.done;r={Kd:r.Kd},a=e.next())r.Kd=a.value,i=i.oa(function(e){return function(){var i=n.response;return i.data&&(i.data=Mt(i.data)),e.Kd(t,i)}}(r));return i.oa((function(){return n}),(function(e){var t=2;if(e instanceof Ee){if(7001==e.code)throw e;t=e.severity}throw new Ee(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),u=0;r.promise.then((function(){u=Date.now()-s}),(function(){}));var c=0;a.promise.then((function(){c=Date.now()}),(function(){}));var d=o.oa((function(t){var i=Date.now()-c,r=t.response;return r.timeMs+=u,r.timeMs+=i,t.Cg||!n.l||r.fromCache||e!=Ri||n.l(r.timeMs,r.data.byteLength),r}),(function(e){throw e&&(e.severity=2),e}));return r=new Ni(d.promise,(function(){return d.abort()}),i),xi(this.m,r),r},G("shaka.net.NetworkingEngine",Ii),Ii.prototype.request=Ii.prototype.request,Ii.prototype.destroy=Ii.prototype.destroy,Ii.makeRequest=Ci,Ii.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},Ii.prototype.clearAllResponseFilters=Ii.prototype.Pf,Ii.prototype.unregisterResponseFilter=Ii.prototype.jh,Ii.prototype.registerResponseFilter=Ii.prototype.Tg,Ii.prototype.clearAllRequestFilters=Ii.prototype.Of,Ii.prototype.unregisterRequestFilter=Ii.prototype.ih,Ii.prototype.registerRequestFilter=Ii.prototype.Sg,Ii.unregisterScheme=function(e){delete Pi[e]},Ii.registerScheme=ki,Ii.prototype.setForceHTTPS=Ii.prototype.ue,Ii.NumBytesRemainingClass=Li,m(Ni,mi),Ii.PendingRequest=Ni;var Ri=1;Ii.RequestType={MANIFEST:0,SEGMENT:Ri,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var _i=3;Ii.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:_i};var Pi={};function Di(e){this.g=!1,this.h=new Ot,this.i=e}function Oi(e,t){if(e.g){if(t instanceof Ee&&7003==t.code)throw t;throw new Ee(2,7,7003,t)}}function Ui(){this.g=new Q}function ji(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Bi;if(null==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch(e){t=!1}Bi=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}Di.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()})))},(i=Ui.prototype).release=function(){this.Sb(),this.g=null},i.o=function(e,t,n,i){this.g&&(e=new ji(e,t,n,i),this.g.push(t,e))},i.Ia=function(e,t,n,i){var r=this;this.o(e,t,(function i(a){r.La(e,t,i),n(a)}),i)},i.La=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=l(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.La(),this.g.remove(t,r))},i.Sb=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=l(n)).next();!n.done;n=t.next())n.value.La();this.g.g={}}},G("shaka.util.EventManager",Ui),Ui.prototype.removeAll=Ui.prototype.Sb,Ui.prototype.unlisten=Ui.prototype.La,Ui.prototype.listenOnce=Ui.prototype.Ia,Ui.prototype.listen=Ui.prototype.o,Ui.prototype.release=Ui.prototype.release,ji.prototype.La=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Bi=void 0;function Fi(){}function Gi(e){return new oe(e=Gt(e)).$a}function Ki(e,t,n){function i(e){Nt(a).setUint32(o,e.byteLength,!0),o+=4,a.set(Lt(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new Ee(2,6,6015);var r;r="string"==typeof t?Vt(t,!0):t,e=Vt(e=Gt(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function Vi(e){for(var t=new Map,n=l(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function zi(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Hi(e,t){if(!e&&!t)return!0;
2if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=l(e),i=n.next();!i.done;i=n.next()){var r=l(i.value);if(i=r.next().value,r=r.next().value,!t.has(i))return!1;if((i=t.get(i))!=r||null==i)return!1}return!0}function qi(e,t){var n=this;t=void 0===t?1:t,this.G=e,this.J=new Set,this.j=this.B=null,this.ea=this.$=!1,this.K=0,this.g=null,this.A=new Ui,this.i=new Map,this.F=[],this.C=new Ot,this.h=null,this.m=function(t){n.C.reject(t),e.onError(t)},this.ha=new Map,this.xa=new Map,this.W=new pn((function(){return function(e){var t=e.ha,n=e.xa;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),t=Array.from(n.values()),t.length&&t.every((function(e){return"expired"==e}))&&e.m(new Ee(2,6,6014)),e.G.pd(zi(n))}(n)})),this.N=!1,this.M=[],this.S=!1,this.aa=new pn((function(){!function(e){e.i.forEach((function(t,n){var i=t.ce,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.G.onExpirationUpdated(n.sessionId,r),t.ce=r)}))}(n)})).ka(t),this.C.catch((function(){})),this.l=new Di((function(){return function(e){return _((function(t){switch(t.g){case 1:return e.A.release(),e.A=null,e.C.reject(),e.aa.stop(),e.aa=null,e.W.stop(),e.W=null,E(t,or(e),2);case 2:if(!e.j){t.D(3);break}return A(t,4),E(t,e.j.setMediaKeys(null),6);case 6:S(t,5);break;case 4:x(t);case 5:e.j=null;case 3:e.g=null,e.J.clear(),e.B=null,e.F=[],e.h=null,e.m=function(){},e.G=null,e.X=!1,e.H=null,T(t)}}))}(n)})),this.X=!1,this.H=null}function Xi(e,t,n){return e.F=n,e.N=0<n.length,Wi(e,t)}function Wi(t,n){var i,r,a,o,s,u,c,d,h,f,p,g;return _((function(m){if(1==m.g){if(i=function(t){if(t=Vi(t.h.clearKeys),0==t.size)return null;var n=[],i=[];t.forEach((function(e,t){var r=Yt(t),a=Yt(e);r={kty:"oct",kid:Xt(r,!1),k:Xt(a,!1)},n.push(r),i.push(r.kid)})),t=JSON.stringify({keys:n});var r=JSON.stringify({kids:i});return r=[{initData:Lt(Kt(r)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:r,keyIds:new Set(i)}}(t))for(r=l(n),a=r.next();!a.done;a=r.next())(o=a.value).video&&(o.video.drmInfos=[i]),o.audio&&(o.audio.drmInfos=[i]);for((s=n.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})))||(u=Vi(t.h.servers),function(e,t){var n=[];t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}));for(var i=l(e),r=i.next();!r.done;r=i.next())(r=r.value).video&&(r.video.drmInfos=n),r.audio&&(r.audio.drmInfos=n)}(n,u)),c=l(n),a=c.next();!a.done;a=c.next())for(d=a.value,h=ur(d),f=l(h),p=f.next();!p.done;p=f.next())dr(p.value,Vi(t.h.servers),Vi(t.h.advanced||{}));return E(m,Ln(n,t.N,t.X),2)}return s||Object.keys(t.h.servers).length?(g=tr(t,void 0,n),m.return(s?g:g.catch((function(){})))):(t.$=!0,m.return(Promise.resolve()))}))}function Yi(e){var t;return _((function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.H){n.D(2);break}return E(n,e.H,3);case 3:return n.return();case 2:return A(n,4),e.H=e.j.setMediaKeys(e.B),E(n,e.H,6);case 6:S(n,5);break;case 4:t=x(n),e.m(new Ee(2,6,6003,t.message));case 5:Oi(e.l),T(n)}}))}function Ji(e){var t,n;return _((function(i){switch(i.g){case 1:if(!e.B||!e.g)return i.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){i.D(2);break}return t=Ci([e.g.serverCertificateUri],e.h.retryParameters),A(i,3),E(i,e.G.Qb.request(5,t).promise,5);case 5:n=i.h,e.g.serverCertificate=Lt(n.data),S(i,4);break;case 3:throw new Ee(2,6,6017,x(i));case 4:if(e.l.g)return i.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(A(i,6),E(i,e.B.setServerCertificate(e.g.serverCertificate),8)):i.return();case 8:S(i,0);break;case 6:throw new Ee(2,6,6004,x(i).message)}}))}function $i(e){for(var t=(e.g?e.g.initData:[])||[],n=l(t),i=n.next();!i.done;i=n.next())Qi(e,(i=i.value).initDataType,i.initData);for(i=(n=l(e.F)).next();!i.done;i=n.next())nr(e,i.value);return t.length||e.F.length||e.C.resolve(),e.C}function Qi(t,n,i){if(i.length){for(var r=t.i.values(),a=(r=l(r)).next();!a.done;a=r.next())if(kt(i,a.value.initData)&&!En("Tizen 2"))return;!function(t,n,i,r){try{var a=t.B.createSession(r)}catch(e){return void t.m(new Ee(2,6,6005,e.message))}if(t.A.o(a,"message",(function(e){t.j&&t.h.delayLicenseRequestUntilPlayed&&t.j.paused&&!t.S?t.M.push(e):rr(t,e)})),t.A.o(a,"keystatuseschange",(function(e){return ar(t,e)})),t.i.set(a,{initData:i,loaded:!1,ce:1/0,fb:null,type:r}),e.shakaMediaKeysPolyfill)try{i=t.h.initDataTransform(i,n,t.g)}catch(e){return n=e,e instanceof Ee||(n=new Ee(2,6,6016,e)),void t.m(n)}t.h.logLicenseExchange&&Xt(i),a.generateRequest(n,i).catch((function(e){if(!t.l.g){t.i.delete(a);var n=e.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=Math.pow(2,32)),i="0x"+i.toString(16)}t.m(new Ee(2,6,6006,e.message,e,i))}}))}(t,n,i,t.g.sessionType)}}function Zi(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}
2function er(e){return e=te(e=e.i.keys(),(function(e){return e.sessionId})),Array.from(e)}function tr(e,t,n){var i,r,a,o,s,u,c,d,h,f,p,g,m;return _((function(v){switch(v.g){case 1:if(i=new Map,n.length){r=function(e,t,n){for(var i=l(t),r=i.next();!r.done;r=i.next()){var a=l(ur(r.value));for(r=a.next();!r.done;r=a.next())r=r.value,n.has(r.keySystem)||n.set(r.keySystem,[]),n.get(r.keySystem).push(r)}if(1==n.size&&n.has(""))throw new Ee(2,6,6e3);for(i={},e=l(e.h.preferredKeySystems),r=e.next();!r.done;i={Hd:i.Hd},r=e.next())for(i.Hd=r.value,a=l(t),r=a.next();!r.done;r=a.next())if(r=r.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.Hd}}(i)))return r.keySystemAccess;for(e=l([!0,!1]),r=e.next();!r.done;r=e.next())for(i=r.value,a=l(t),r=a.next();!r.done;r=a.next()){var o=l(r.value.decodingInfos);for(r=o.next();!r.done;r=o.next()){var s=r.value;if(s.supported&&s.keySystemAccess){var u=l(r=n.get(s.keySystemAccess.keySystem));for(r=u.next();!r.done;r=u.next())if(!!r.value.licenseServerUri==i)return s.keySystemAccess}}}return null}(e,n,i),v.D(2);break}return E(v,function(e,t){var n,i,r,a,o,s,u,c,d,h,f,p,g,m,v;return _((function(y){switch(y.g){case 1:if(1==t.size&&t.has(""))throw new Ee(2,6,6e3);for(i=l(t.values()),r=i.next();!r.done;r=i.next())0==(a=r.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=l(e.h.preferredKeySystems),s=o.next();case 2:if(s.done){y.D(4);break}if(u=s.value,!t.has(u)){y.D(3);break}return c=t.get(u),A(y,6),E(y,navigator.requestMediaKeySystemAccess(u,[c]),8);case 8:return n=y.h,y.return(n);case 6:x(y);case 7:Oi(e.l);case 3:s=o.next(),y.D(2);break;case 4:d=l([!0,!1]),h=d.next();case 9:if(h.done){y.D(11);break}f=h.value,p=l(t.keys()),s=p.next();case 12:if(s.done){h=d.next(),y.D(9);break}if(g=s.value,m=t.get(g),v=m.drmInfos.some((function(e){return!!e.licenseServerUri})),v!=f){y.D(13);break}return A(y,15),E(y,navigator.requestMediaKeySystemAccess(g,[m]),17);case 17:return n=y.h,y.return(n);case 15:x(y);case 16:Oi(e.l);case 13:s=p.next(),y.D(12);break;case 11:return y.return(n)}}))}(e,t),3);case 3:r=v.h;case 2:if(!(a=r))throw new Ee(2,6,6001);for(Oi(e.l),A(v,4),e.J.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],u=o.videoCapabilities||[],c=l(s),d=c.next();!d.done;d=c.next())h=d.value,e.J.add(h.contentType.toLowerCase());for(f=l(u),d=f.next();!d.done;d=f.next())p=d.value,e.J.add(p.contentType.toLowerCase());if(n.length){var y=a.keySystem,b=i.get(a.keySystem),T=[],w=[],I=[],k=[],C=new Set;cr(b,T,I,w,k,C);var M=e.N?"persistent-license":"temporary";for(y={keySystem:y,licenseServerUri:T[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||M,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:I[0],serverCertificateUri:w[0],initData:k,keyIds:C},T=(b=l(b)).next();!T.done;T=b.next())(T=T.value).distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=T.distinctiveIdentifierRequired),T.persistentStateRequired&&(y.persistentStateRequired=T.persistentStateRequired);b=y}else b=a.keySystem,y=t.get(a.keySystem),T=[],w=[],I=[],k=[],C=new Set,cr(y.drmInfos,T,I,w,k,C),b={keySystem:b,licenseServerUri:T[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:I[0],serverCertificateUri:w[0],initData:k,keyIds:C};if(e.g=b,!e.g.licenseServerUri)throw new Ee(2,6,6012,e.g.keySystem);return E(v,a.createMediaKeys(),6);case 6:return g=v.h,Oi(e.l),e.B=g,e.$=!0,E(v,Ji(e),7);case 7:Oi(e.l),S(v,0);break;case 4:if(m=x(v),Oi(e.l,m),e.g=null,e.J.clear(),m instanceof Ee)throw m;throw new Ee(2,6,6002,m.message)}}))}function nr(e,t){var n,i,r,a,o;return _((function(s){switch(s.g){case 1:try{n=e.B.createSession("persistent-license")}catch(t){return i=new Ee(2,6,6005,t.message),e.m(i),s.return(Promise.reject(i))}return e.A.o(n,"message",(function(t){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.S?e.M.push(t):rr(e,t)})),e.A.o(n,"keystatuseschange",(function(t){return ar(e,t)})),r={initData:null,loaded:!1,ce:1/0,fb:null,type:"persistent-license"},e.i.set(n,r),A(s,2),E(s,n.load(t),4);case 4:return a=s.h,Oi(e.l),a?(r.loaded=!0,lr(e)&&e.C.resolve(),s.return(n)):(e.i.delete(n),e.m(new Ee(2,6,6013)),s.return(Promise.resolve()));case 2:o=x(s),Oi(e.l,o),e.i.delete(n),e.m(new Ee(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function ir(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=Ki(e,n=Gi(e),t)),e}function rr(e,t){var n,i,r,a,o,s,u,c,d,h,f,p;_((function(g){switch(g.g){case 1:return n=t.target,e.h.logLicenseExchange&&Xt(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=Ci([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Zi(e.g.keySystem)&&function(e){var t=Ft(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=l((t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader")),i=n.next();!i.done;i=n.next())i=i.value,e.headers[i.getElementsByTagName("name")[0].textContent]=i.getElementsByTagName("value")[0].textContent;e.body=Wt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),A(g,2),E(g,e.G.Qb.request(2,o).promise,4);case 4:u=g.h,S(g,3);break;case 2:return c=x(g),d=new Ee(2,6,6007,c),e.m(d),i&&i.fb&&i.fb.reject(d),g.return();case 3:return e.l.g?g.return():(e.K+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&Xt(u.data),A(g,5),E(g,n.update(u.data),7));case 7:S(g,6);break;case 5:return h=x(g),f=new Ee(2,6,6008,h.message),e.m(f),i&&i.fb&&i.fb.reject(f),g.return();case 6:p=new K("drmsessionupdate"),e.G.onEvent(p),i&&(i.fb&&i.fb.resolve(),new pn((function(){i.loaded=!0,lr(e)&&e.C.resolve()})).R(fr)),T(g)}}))}function ar(e,t){var n=t.target,i=e.i.get(n),r=!1;
2n.keyStatuses.forEach((function(t,n){if("string"==typeof n){var a=n;n=t,t=a}if(Zi(e.g.keySystem)&&16==n.byteLength&&navigator.userAgent.match(/Edge?\//)){var o=(a=Nt(n)).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&&(i.loaded=!0),"expired"==t&&(r=!0),a=Jt(n),e.ha.set(a,t)}));var a=n.expiration-Date.now();(0>a||r&&1e3>a)&&i&&!i.fb&&(e.i.delete(n),n.close().catch((function(){}))),lr(e)&&(e.C.resolve(),e.W.R(pr))}function or(e){var t;return _((function(n){return t=Array.from(e.i.entries()),e.i.clear(),E(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,i=t.next().value;return _((function(t){return 1==t.g?(A(t,2),e.ea||e.F.includes(n.sessionId)||"persistent-license"!==i.type?E(t,function(e){var t;return _((function(n){return 1==n.g?(t=new Promise((function(e,t){new pn(t).R(hr)})),A(n,2),E(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?S(n,0):(x(n),void T(n))}))}(n),5):E(t,n.remove(),5)):2!=t.g?S(t,0):(x(t),void T(t))}))}))),0)}))}function sr(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){r=r.value;for(var a={},o=l(t),s=o.next();!s.done;a={Va:a.Va},s=o.next())if(s=s.value,r.keySystem==s.keySystem){a.Va=[],a.Va=a.Va.concat(r.initData||[]),a.Va=a.Va.concat(s.initData||[]),a.Va=a.Va.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Va.findIndex((function(e){return e.keyId===t.keyId}))}}(a)),o=r.keyIds&&s.keyIds?new Set([].concat(c(r.keyIds),c(s.keyIds))):r.keyIds||s.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||s.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||s.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||s.persistentStateRequired,videoRobustness:r.videoRobustness||s.videoRobustness,audioRobustness:r.audioRobustness||s.audioRobustness,serverCertificate:r.serverCertificate||s.serverCertificate,serverCertificateUri:r.serverCertificateUri||s.serverCertificateUri,initData:a.Va,keyIds:o});break}}return n}function ur(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function lr(e){return function(e,t){for(var n=l(e),i=n.next();!i.done;i=n.next())if(!t(i.value))return!1;return!0}(e=e.i.values(),(function(e){return e.loaded}))}function cr(e,t,n,i,r,a){for(var o={},s=(e=l(e)).next();!s.done;o={Fa:o.Fa},s=e.next()){if(o.Fa=s.value,t.includes(o.Fa.licenseServerUri)||t.push(o.Fa.licenseServerUri),i.includes(o.Fa.serverCertificateUri)||i.push(o.Fa.serverCertificateUri),o.Fa.serverCertificate&&(n.some(function(e){return function(t){return kt(t,e.Fa.serverCertificate)}}(o))||n.push(o.Fa.serverCertificate)),o.Fa.initData){s={};for(var u=l(o.Fa.initData),c=u.next();!c.done;s={Tc:s.Tc},c=u.next())s.Tc=c.value,r.some(function(e){return function(t){var n=e.Tc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&kt(t.initData,n.initData)}}(s))||r.push(s.Tc)}if(o.Fa.keyIds)for(u=(s=l(o.Fa.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}function dr(t,n,i){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.videoRobustness||(t.videoRobustness=i.videoRobustness),t.audioRobustness||(t.audioRobustness=i.audioRobustness),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}G("shaka.util.FairPlayUtils",Fi),Fi.initDataTransform=Ki,Fi.defaultGetContentId=Gi,(i=qi.prototype).destroy=function(){return this.l.destroy()},i.configure=function(e){this.h=e},i.yc=function(t){var n,i=this;return _((function(r){if(1==r.g)return i.B?(i.j=t,i.A.Ia(i.j,"play",(function(){for(var e=l(i.M),t=e.next();!t.done;t=e.next())rr(i,t.value);i.S=!0,i.M=[]})),"webkitCurrentPlaybackTargetIsWireless"in i.j&&i.A.o(i.j,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return or(i)})),(n=i.g.initData.find((function(e){return 0<e.initData.length})))||e.shakaMediaKeysPolyfill||i.F.length?E(r,Yi(i),2):r.D(2)):(i.A.Ia(t,"encrypted",(function(){i.m(new Ee(2,6,6010))})),r.return());$i(i),n||i.F.length||i.A.o(i.j,"encrypted",(function(e){return function(e,t){return _((function(n){if(1==n.g)return E(n,Yi(e),2);Qi(e,t.initDataType,Lt(t.initData)),T(n)}))}(i,e)})),T(r)}))},i.Cc=function(){for(var e=1/0,t=this.i.keys(),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},i.fd=function(){return zi(this.xa)};var hr=1,fr=5,pr=.5,gr=new Ut((function(){return Mt(new Uint8Array([0]))}));function mr(){}function vr(e,t,n,i){var r,a,o,s;return _((function(u){if(1==u.g)return i&&(r=Er[i.toLowerCase()])?u.return(r):(a=br(e))&&(o=Tr[a])?u.return(o):i?u.D(2):E(u,yr(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=Er[i]))return u.return(s);throw new Ee(2,4,4e3,e)}))}function yr(e,t,n){var i,r,a;return _((function(o){return 1==o.g?((i=Ci([e],n)).method="HEAD",E(o,t.request(0,i).promise,2)):(r=o.h,a=r.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function br(e){return 1==(e=new oe(e).Ka.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}G("shaka.media.ManifestParser",mr),mr.unregisterParserByMime=function(e){delete Er[e]},mr.registerParserByMime=function(e,t){Er[e]=t},mr.registerParserByExtension=function(e,t){Tr[e]=t};var Er={},Tr={};function Ar(e,t){this.V=Nt(e),this.h=t==Sr,this.g=0}function wr(){return new Ee(2,3,3e3)}(i=Ar.prototype).Da=function(){return this.g<this.V.byteLength},i.qa=function(){return this.g},i.gg=function(){return this.V.byteLength},i.ub=function(){try{var e=this.V.getUint8(this.g);return this.g+=1,e}catch(e){throw wr()}},i.ie=function(){try{var e=this.V.getUint16(this.g,this.h);return this.g+=2,e}catch(e){throw wr()}},i.P=function(){try{var e=this.V.getUint32(this.g,this.h);return this.g+=4,e}catch(e){throw wr()}},i.rf=function(){try{var e=this.V.getInt32(this.g,this.h);return this.g+=4,e}catch(e){throw wr()}},i.nc=function(){try{if(this.h)var e=this.V.getUint32(this.g,!0),t=this.V.getUint32(this.g+4,!0);else t=this.V.getUint32(this.g,!1),e=this.V.getUint32(this.g+4,!1)}catch(e){throw wr()}if(2097151<t)throw new Ee(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},i.Eb=function(e){if(this.g+e>this.V.byteLength)throw wr();var t=Lt(this.V,this.g,e);return this.g+=e,t},i.skip=function(e){if(this.g+e>this.V.byteLength)throw wr();this.g+=e},i.$g=function(e){if(this.g<e)throw wr();this.g-=e},i.seek=function(e){if(0>e||e>this.V.byteLength)throw wr();this.g=e},i.Lc=function(){for(var e=this.g;this.Da()&&0!=this.V.getUint8(this.g);)this.g+=1;return e=Lt(this.V,e,this.g-e),this.g+=1,Bt(e)},G("shaka.util.DataViewReader",Ar),Ar.prototype.readTerminatedString=Ar.prototype.Lc,Ar.prototype.seek=Ar.prototype.seek,Ar.prototype.rewind=Ar.prototype.$g,Ar.prototype.skip=Ar.prototype.skip,Ar.prototype.readBytes=Ar.prototype.Eb,Ar.prototype.readUint64=Ar.prototype.nc,Ar.prototype.readInt32=Ar.prototype.rf,Ar.prototype.readUint32=Ar.prototype.P,Ar.prototype.readUint16=Ar.prototype.ie,Ar.prototype.readUint8=Ar.prototype.ub,Ar.prototype.getLength=Ar.prototype.gg,Ar.prototype.getPosition=Ar.prototype.qa,Ar.prototype.hasMoreData=Ar.prototype.Da;var Sr=1;function xr(){this.i=[],this.h=[],this.g=!1}function Ir(e){for(var t=Nr(e);e.reader.Da()&&!e.parser.g;)e.parser.rd(e.start+t,e.reader,e.partialOkay)}function kr(e){for(var t=Nr(e),n=e.reader.P(),i=(n=l(ie(n))).next();!i.done&&(e.parser.rd(e.start+t,e.reader,e.partialOkay),!e.parser.g);i=n.next());}function Cr(e){return function(t){e(t.reader.Eb(t.reader.V.byteLength-t.reader.qa()))}}function Mr(e){for(var t=0,n=(e=l(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Lr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Nr(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}Ar.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Sr},(i=xr.prototype).box=function(e,t){var n=Mr(e);return this.i[n]=Rr,this.h[n]=t,this},i.Y=function(e,t){var n=Mr(e);return this.i[n]=_r,this.h[n]=t,this},i.stop=function(){this.g=!0},i.parse=function(e,t,n){for(e=new Ar(e,0),this.g=!1;e.Da()&&!this.g;)this.rd(0,e,t,n)},i.rd=function(e,t,n,i){var r=t.qa();if(i&&r+8>t.V.byteLength)this.g=!0;else{var a=t.P(),o=t.P(),s=!1;switch(a){case 0:a=t.V.byteLength-r;break;case 1:if(i&&t.qa()+8>t.V.byteLength)return void(this.g=!0);a=t.nc(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==_r){if(i&&t.qa()+4>t.V.byteLength)return void(this.g=!0);l=(c=t.P())>>>24,c&=16777215}o=r+a,n&&o>t.V.byteLength&&(o=t.V.byteLength),i&&o>t.V.byteLength?this.g=!0:(i=o-t.qa(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new Ar(t=0<i?t.Eb(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:s}))}else t.skip(Math.min(r+a-t.qa(),t.V.byteLength-t.qa()))}},G("shaka.util.Mp4Parser",xr),xr.headerSize=Nr,xr.typeToString=Lr,xr.allData=Cr,xr.sampleDescription=kr,xr.children=Ir,xr.prototype.parseNext=xr.prototype.rd,xr.prototype.parse=xr.prototype.parse,xr.prototype.stop=xr.prototype.stop,xr.prototype.fullBox=xr.prototype.Y,xr.prototype.box=xr.prototype.box;var Rr=0,_r=1;function Pr(e,t,n,i,r){var a=Or.value(),o=e.subarray(n.start,n.start+n.size),s=Nt(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=Nt(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),Dr(u,0,u.byteLength),r=new 
2Uint8Array(e.byteLength+u.byteLength),n=En("Xbox One")?n.start:n.start+n.size,a=e.subarray(n),r.set(e.subarray(0,n)),r.set(u,n),r.set(a,n+u.byteLength),i=(e=l(i)).next();!i.done;i=e.next())Dr(r,(i=i.value).start,i.size+u.byteLength);return u=Nt(r,t.start),t=Nr(t),e=u.getUint32(t),u.setUint32(t,e+1),r}function Dr(e,t,n){0!=(t=(e=Nt(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Or=new Ut((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function Ur(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=jr(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],f=-1,p=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}for(g=h.length-1;0<=g;g--)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}if(-1===f||-1===p)h=Br(i,r),e.nestedCues.push(h);else{for(;f<=p;f++)if(g=h[f]){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=jr(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=Br(i,r),e.nestedCues.push(d)),d=jr(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function jr(e,t,n,i,r,a){return e=new ot(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function Br(e,t){var n=new ot(e,t,"");return n.lineBreak=!0,n}function Fr(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function Gr(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.A="black",Vr(this)}function Kr(e,t,n){return Ur(new ot(t,n,""),"CC"+(e.C<<1|e.B+1),e.i,t,n)}function Vr(e){qr(e,0,15),e.g=1}function zr(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case Xr:i=$r.has(n)?$r.get(n):String.fromCharCode(n);break;case Wr:i=Qr.get(n);break;case Yr:e.i[e.g].pop(),i=Zr.get(n);break;case Jr:e.i[e.g].pop(),i=ea.get(n)}i&&e.i[e.g].push(new Fr(i,e.m,e.j,e.A,e.l))}}function Hr(e,t,n,i){if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map((function(e){return e}));else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map((function(e){return e}))}function qr(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var Xr=0,Wr=1,Yr=2,Jr=3,$r=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),Qr=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57,"⠀"],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),Zr=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),ea=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]);function ta(e,t){this.h=aa,this.A=new Gr(e,t),this.i=new Gr(e,t),this.l=new Gr(e,t),this.g=this.i,this.j=0,this.m=null}function na(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==sa&&e.h!==ua&&(r=Kr(i,e.j,n),(n=e.i).g=0<n.h?n.h:0,qr(n,0,15),(n=e.l).g=0<n.h?n.h:0,qr(n,0,15),i.g=15),e.h=sa,i.h=t,r}function ia(e){e.h=oa,e.g=e.l,e.g.h=0}function ra(e){X("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.A,e.h=ua}var aa=0,oa=1,sa=3,ua=4,la="black green blue cyan red yellow magenta black".split(" "),ca="white green blue cyan red yellow magenta white_italics".split(" ");function da(){this.l=!1,this.F=this.H=0,this.G=ba,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.m="black",ha(this)}function ha(e){e.i=[];for(var t=0;15>t;t++)e.i.push(fa())}function fa(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function pa(e,t){ga(e)&&(e.i[e.h][e.g]=new Fr(t,e.C,e.A,e.m,e.B),e.g++)}function ga(e){var t=e.g<e.F&&0<=e.g;return e.h<e.H&&0<=e.h&&t}function ma(e,t,n){var i=new ot(e.j,t,"");return i.textAlign=e.G===va?"left":e.G===ya?"right":lt,(n=Ur(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}da.prototype.isVisible=function(){return this.l};var va=0,ya=1,ba=2;function Ea(){this.i=[],this.h=null,this.g=0}function Ta(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new Aa(e.h)),e.h=null,e.g=0))}function Aa(e){this.g=0,this.h=e}function wa(e){if(!e.Da())throw new Ee(2,2,3e3);return e.h[e.g++]}function Sa(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function xa(e,t,n,i){if(128<=n&&135>=n)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=wa(t).value,t=null;for(var r=(n=l(Ia(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=ma(r,i,e.i)),ha(r);return t}
2if(137===n)for(t=wa(t).value,n=(t=l(Ia(e,t))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=wa(t).value,t=null,r=(n=l(Ia(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=ma(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=wa(t).value,t=null,r=(n=l(Ia(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=ma(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return ka(e,t=wa(t).value,i);if(143===n)return i=ka(e,255,i),Ca(e),i;if(144===n)t.skip(1),i=wa(t).value,e.g&&(e.g.A=0<(128&i),e.g.C=0<(64&i));else if(145===n)i=wa(t).value,n=wa(t).value,t.skip(1),e.g&&(t=Ma((48&n)>>4,(12&n)>>2,3&n),e.g.B=Ma((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=wa(t).value,t=wa(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=wa(t).value,t.skip(1),e.g&&(e.g.G=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new da;a.j=i,e.h[n]=a}i=wa(t).value,wa(t),wa(t),a=wa(t).value;var o=wa(t).value;t=wa(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.H=1+(15&a),t.F=1+(63&o),e.g=e.h[n]}}}return null}Aa.prototype.Da=function(){return this.g<this.h.length},Aa.prototype.qa=function(){return this.g},Aa.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Ee(2,2,3e3);this.g+=e};var Ia=function e(t,n){var i;return R(e,(function(e){return 1==e.g&&(i=0),5!=e.g?8>i?!(1&~n)&&t.h[i]?E(e,i,5):e.D(5):e.D(0):(n>>=1,i++,e.D(2))}))};function ka(e,t,n){for(var i=null,r=(t=l(Ia(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=ma(a,n,e.i)),e.h[r]=null}return i}function Ca(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Ma(e,t,n){var i={0:0,1:0,2:1,3:1};return Na[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}var La=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),Na="black blue green cyan red magenta yellow white".split(" ");function Ra(){this.h=[],this.g=[],this.i=new Ea,this.l=0,this.B=new Map([["CC1",new ta(0,0)],["CC2",new ta(0,1)],["CC3",new ta(1,0)],["CC4",new ta(1,1)]]),this.A=this.m=0,this.j=new Map,_a(this)}function _a(e){e.m=0,e.A=0;for(var t=(e=l(e.B.values())).next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,Vr(t.i),Vr(t.l),Vr(t.A)}function Pa(e,t){var n=t.type;if(16==(112&t.Qa)){var i=t.Qa>>3&1;0===n?e.m=i:e.A=i}if(n=e.B.get("CC"+(n<<1|(n?e.A:e.m)+1)),255===t.Qa&&255===t.ob||!t.Qa&&!t.ob||!Oa(t.Qa)||!Oa(t.ob))return 45<=++e.l&&_a(e),null;if(e.l=0,t.Qa&=127,t.ob&=127,!t.Qa&&!t.ob)return null;if(i=null,16==(112&t.Qa))e:{var r=t.Qa;if(i=t.ob,n.m===(r<<8|i))n.m=null;else if(n.m=r<<8|i,16==(240&r)&&64==(192&i)){r=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|i>>5&1];var a=(30&i)>>1,o="white",s=!1;if(7>a?o=ca[a]:7===a&&(s=!0),i=!(1&~i),n.h!==ua){if(a=n.g,n.h===sa&&r!==a.g){var u=1+r-a.h;Hr(a,u,1+a.g-a.h,a.h),qr(a,0,u-1),qr(a,r+1,15-r)}a.g=r,n.g.m=i,n.g.j=s,n.g.l=o,n.g.A="black"}}else if(17==(247&r)&&32==(240&i))n.g.m=!1,n.g.j=!1,n.g.l="white",zr(n.g,Xr,32),o=!1,"white_italics"===(r=ca[(14&i)>>1])&&(r="white",o=!0),n.g.m=!(1&~i),n.g.j=o,n.g.l=r;else if(16==(247&r)&&32==(240&i)||23==(247&r)&&45==(255&i))o="black",!(7&r)&&(o=la[(14&i)>>1]),n.g.A=o;else if(17==(247&r)&&48==(240&i))zr(n.g,Wr,i);else if(18==(246&r)&&32==(224&i))zr(n.g,1&r?Jr:Yr,i);else if(20==(246&r)&&32==(240&i)){switch(i=t.pts,r=null,t.ob){case 32:ia(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=na(n,2,i);break;case 38:r=na(n,3,i);break;case 39:r=na(n,4,i);break;case 40:zr(n.g,Xr,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=i;break;case 42:Vr(n.A),ra(n);break;case 43:ra(n);break;case 44:r=n.i,o=null,n.h!==ua&&(o=Kr(r,n.j,i)),qr(r,0,15),r=o;break;case 45:r=n.g,n.h!==sa?r=null:(o=Kr(r,n.j,i),Hr(r,(s=r.g-r.h+1)-1,s,r.h),qr(r,0,s-1),qr(r,r.g,15-r.g),n.j=i,r=o);break;case 46:qr(n.l,0,15);break;case 47:r=null,n.h!==ua&&(r=Kr(n.i,n.j,i)),o=n.l,n.l=n.i,n.i=o,ia(n),n.j=i}i=r;break e}i=null}else r=t.ob,zr(n.g,Xr,t.Qa),zr(n.g,Xr,r);return i}function Da(e,t){var n=[];try{for(;t.Da();){var i=wa(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&wa(t).value),0!=r){e.j.has(r)||e.j.set(r,new Sa(r));for(var o=e.j.get(r),s=t.qa();t.qa()-s<a;){var u=wa(r=t),l=u.value,c=u.pts;if(16===l)l=l<<16|wa(r).value;if(0<=l&&31>=l){var d=c;if(o.g){var h=o.g;switch(r=null,l){case 8:!ga(h)||0>=h.g&&0>=h.h||(0>=h.g?(h.g=h.F-1,h.h--):h.g--,h.i[h.h][h.g]=null);break;case 13:if(h.isVisible()&&(r=ma(h,d,o.i)),h.h+1>=h.H){d=h;for(var f=0,p=1;15>p;p++,f++)d.i[f]=d.i[p];for(p=0;1>p;p++,f++)d.i[f]=fa()}else h.h++;h.g=0;break;case 14:h.isVisible()&&(r=ma(h,d,o.i)),h.i[h.h]=fa(),h.g=0;break;case 12:h.isVisible()&&(r=ma(h,d,o.i)),ha(h),(d=h).h=0,d.g=0}var g=r}else g=null}else if(128<=l&&159>=l)g=xa(o,r,l,c);else{if(4096<=l&&4127>=l)8<=(d=255&l)&&15>=d?r.skip(1):16<=d&&23>=d?r.skip(2):24<=d&&31>=d&&r.skip(3);else if(4224<=l&&4255>=l)128<=(d=255&l)&&135>=d?r.skip(4):136<=d&&143>=d&&r.skip(5);else if(32<=l&&127>=l)r=l,o.g&&pa(o.g,127===r?"♪":String.fromCharCode(r));else if(160<=l&&255>=l)o.g&&pa(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g)if(La.has(r)){var m=La.get(r);pa(o.g,m)}else pa(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&pa(o.g,160!=(255&l)?"_":"[CC]");g=null}(r=g)&&n.push(r)}}}}catch(e){if(!(e instanceof Ee&&3e3===e.code))throw e;
2X("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Oa(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function Ua(){}var ja=function e(t,n){var i,r,a,o;return R(e,(function(e){if(1==e.g){for(var t=n,s=0,u=0;u<t.length;)2==s&&3==t[u]?(s=0,(t=[].concat(c(t))).splice(u,1),t=new Uint8Array(t)):0==t[u]?s++:s=0,u++;i=t,r=0}if(4!=e.g){if(!(r<i.length))return e.D(0);for(a=0;255==i[r];)a+=255,r++;for(a+=i[r++],o=0;255==i[r];)o+=255,r++;return o+=i[r++],4!=a?e.D(4):E(e,i.subarray(r,r+o),4)}return r+=o,e.D(2)}))};function Ba(e,t){var n=null,i=null,r=e.P();return 1&t&&e.skip(8),2&t&&e.skip(4),8&t&&(n=e.P()),16&t&&(i=e.P()),{trackId:r,Xe:n,Rf:i}}function Fa(e,t){return{Ne:1==t?e.nc():e.P()}}function Ga(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.P()}}function Ka(e,t,n){var i=e.P(),r=[];1&n&&e.skip(4),4&n&&e.skip(4);for(var a=l(ie(i)),o=a.next();!o.done;o=a.next())o={me:null,sampleSize:null,ud:null},256&n&&(o.me=e.P()),512&n&&(o.sampleSize=e.P()),1024&n&&e.skip(4),2048&n&&(o.ud=0==t?e.P():e.rf()),r.push(o);return{Ni:i,uf:r}}function Va(){this.j=new Ua,this.i=new Map,this.h=this.g=0}function za(){this.h=new Va,this.g=new Ra}function Ha(e,t){for(var n=e.h.parse(t),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value,a=Lt(r.Og);if(0<a.length&&(i=e.g,r=r.pts,181===(a=new Ar(a,0)).ub()&&49===a.ie()&&1195456820===a.P()&&3===a.ub())){var o=a.ub();if(64&o){o&=31,a.skip(1);for(var s=0;s<o;s++){var u=a.ub(),d=(4&u)>>2,h=a.ub(),f=a.ub();d&&(0===(u&=3)||1===u?i.h.push({pts:r,type:u,Qa:h,ob:f,order:i.h.length}):(i.g.push({pts:r,type:u,value:h,order:i.g.length}),i.g.push({pts:r,type:2,value:f,order:i.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n=[];e.h.sort(t),e.g.sort(t);for(var i=l(e.h),r=i.next();!r.done;r=i.next())(r=Pa(e,r.value))&&n.push(r);for(r=(i=l(e.g)).next();!r.done;r=i.next())Ta(e.i,r.value);for(r=(i=l(e.i.i)).next();!r.done;r=i.next())r=Da(e,r.value),n.push.apply(n,c(r));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function qa(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Xa(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function Wa(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,i=l(Ya(e)),r=i.next();!r.done;r=i.next()){var a=r.value;r=a.start,(a=a.end)>t&&(n+=a-Math.max(r,t))}return n}function Ya(e){if(!e)return[];for(var t=[],n=l(ie(e.length)),i=n.next();!i.done;i=n.next())i=i.value,t.push({start:e.start(i),end:e.end(i)});return t}function Ja(e,t,n,i){var r=this;this.j=e,this.l=n,this.h={},this.J={},this.g=null,this.K=i||function(){},this.i={},this.A=new Ui,this.B={},this.C=t,this.G=new Ot,this.m=function(e,t){var n=new MediaSource;return e.A.Ia(n,"sourceopen",(function(){URL.revokeObjectURL(e.H),t.resolve()})),e.H=co(n),e.j.src=e.H,n}(this,this.G),this.F=new Di((function(){return function(e){var t,n,i,r,a,o,s;return _((function(u){if(1==u.g){for(n in t=[],e.i)for(i=e.i[n],r=i[0],e.i[n]=i.slice(0,1),r&&t.push(r.p.catch(ke)),a=l(i.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new Ee(2,7,7003,void 0));
2for(s in e.g&&t.push(e.g.destroy()),e.l&&t.push(e.l.destroy()),e.B)t.push(e.B[s].destroy());return E(u,Promise.all(t),2)}e.A&&(e.A.release(),e.A=null),e.j&&(e.j.removeAttribute("src"),e.j.load(),e.j=null),e.m=null,e.g=null,e.l=null,e.h={},e.B={},e.C=null,e.i={},T(u)}))}(r)})),this.H=""}function $a(e,t,n){e.g||(e.g=new sn(e.l)),e=e.g,"application/cea-608"!=t&&"application/cea-708"!=t&&(e.j=Me(hn[t]),e.j.setSequenceMode?e.j.setSequenceMode(n):q('Text parsers should have a "setSequenceMode" method!'))}function Qa(e){return!e.m||"ended"==e.m.readyState}function Za(e,t){if(t==Pe)var n=e.g.g;else n=!(n=to(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function eo(e,t){return t==Pe?e.g.h:qa(to(e,t))}function to(e,t){try{return e.h[t].buffered}catch(e){return null}}function no(e,t,n,i,r,a,o,s){var u,c,d,h,f,p,g,m,v;return _((function(y){return 1==y.g?(u=De,null!=i&&s&&t!=u.ma&&o&&(c=i,ao(e,t,(function(){var n=c;0>n&&(n+=.001),e.h[t].timestampOffset=n,ro(e,t)}))),t==u.ma?E(y,function(e,t,n,i){var r,a,o;return _((function(s){return 1==s.g?E(s,Promise.resolve(),2):e.j&&e.i?null==n||null==i?(e.j.parseInit(Lt(t)),s.return()):(r={periodStart:e.C,segmentStart:n,segmentEnd:i},a=e.j.parseMedia(Lt(t),r),o=a.filter((function(t){return t.startTime>=e.l&&t.startTime<e.m})),e.i.append(o),null==e.g&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),void T(s)):s.return()}))}(e.g,n,i,r),0):e.B[t]?E(y,function(e,t){e.l=!0,e.h=new Ot,e.m=[],e.j=[],e.i=[];var n=Lt(t);return e.g.push(n),e.g.flush(),e.l&&e.h.reject(new Ee(2,3,3018)),e.h}(e.B[t],n),10):a?(e.g||$a(e,"text/vtt",s||!1),null==i&&null==r?e.C.init(n):(d=Ha(e.C,n)).length&&(h=e.h[u.ib].timestampOffset,dn(e.g,d,i,r,h)),n=lo(e,n,i,t),E(y,ao(e,t,(function(){e.h[t].appendBuffer(n)})),0)):(n=lo(e,n,i,t),E(y,ao(e,t,(function(){e.h[t].appendBuffer(n)})),0))):(f=y.h,e.g||$a(e,"text/vtt",s||!1),f.metadata&&(p=e.h[t].timestampOffset,e.K(f.metadata,p,r)),f.captions&&f.captions.length&&(g=e.h[u.ib].timestampOffset,m=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push({stream:n.stream,cue:new ot(n.startTime,n.endTime,n.text)});return t}(f.captions),dn(e.g,m,i,r,g)),v=f.data,v=lo(e,v,i,t),E(y,ao(e,t,(function(){e.h[t].appendBuffer(v)})),0))}))}function io(e,t){return _((function(n){return t==De.ma?e.g?E(n,e.g.remove(0,1/0),0):n.return():E(n,ao(e,t,(function(){var n=e.m.duration;0>=n?ro(e,t):e.h[t].remove(0,n)})),0)}))}function ro(e,t){var n=e.i[t][0];n&&(n.p.resolve(),so(e,t))}function ao(e,t,n){return Oi(e.F),n={start:n,p:new Ot},e.i[t].push(n),1==e.i[t].length&&uo(e,t),n.p}function oo(e,t){var n,i,r,a,o;return _((function(s){switch(s.g){case 1:for(r in Oi(e.F),n=[],i={},e.h)i.uc=new Ot,a={start:function(e){return function(){return e.uc.resolve()}}(i),p:i.uc},e.i[r].push(a),n.push(i.uc),1==e.i[r].length&&a.start(),i={uc:i.uc};return A(s,2),E(s,Promise.all(n),4);case 4:S(s,3);break;case 2:throw x(s);case 3:try{t()}catch(e){throw new Ee(2,3,3015,e)}finally{for(o in e.h)so(e,o)}T(s)}}))}function so(e,t){e.i[t].shift(),uo(e,t)}function uo(e,t){var n=e.i[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new Ee(2,3,3017,t)):n.p.reject(new Ee(2,3,3015,i)),so(e,t)}}function lo(e,t,n,i){var r=e.j.mediaKeys;return null==n&&r&&(vn()||En("Xbox One"))&&"mp4"==e.J[i].split(";")[0].split("/")[1]&&(t=function(e){function t(){r=!0}function n(e){a.push(e),Ir(e)}e=Lt(e);var i,r=!1,a=[],o=[];if((new xr).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).Y("stsd",(function(e){i=e,a.push(e),kr(e)})).Y("encv",t).Y("enca",t).Y("avc1",(function(e){o.push({box:e,Jc:1701733238})})).Y("avc3",(function(e){o.push({box:e,Jc:1701733238})})).Y("ac-3",(function(e){o.push({box:e,Jc:1701733217})})).Y("ec-3",(function(e){o.push({box:e,Jc:1701733217})})).Y("mp4a",(function(e){o.push({box:e,Jc:1701733217})})).parse(e),r)return e;if(0==o.length||!i)throw Jt(e),new Ee(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=Pr(e,i,u.box,a,u.Jc);return e}(t)),t}Va.prototype.init=function(e){var t=this,n=[],i=[];if((new xr).box("moov",Ir).box("mvex",Ir).Y("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.P(),n=n.P(),t.g=e,t.h=n})).box("trak",Ir).Y("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.P(),n.push(e)})).box("mdia",Ir).Y("mdhd",(function(e){e=Ga(e.reader,e.version),i.push(e.timescale)})).parse(e,!0),!n.length||!i.length||n.length!=i.length)throw new Ee(2,2,2010);
2n.forEach((function(e,n){t.i.set(e,i[n])}))},Va.prototype.parse=function(e){var t=this,n=[],i=this.g,r=this.h,a=[],o=null,s=9e4;return(new xr).box("moof",Ir).box("traf",Ir).Y("trun",(function(e){a=Ka(e.reader,e.version,e.flags).uf})).Y("tfhd",(function(e){e=Ba(e.reader,e.flags),i=e.Xe||t.g,r=e.Rf||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).Y("tfdt",(function(e){o=Fa(e.reader,e.version).Ne})).box("mdat",(function(e){if(null===o)throw new Ee(2,2,2010);e=e.reader;var u=o,c=s,d=i,h=r,f=a,p=0,g=h;for(f.length&&(g=f[0].sampleSize||h);e.Da();){var m=e.P();if(6==(31&e.ub())){var v=0;f.length>p&&(v=f[p].ud||0),v=(u+v)/c;for(var y=l(ja(t.j,e.Eb(m-1))),b=y.next();!b.done;b=y.next())n.push({Og:b.value,pts:v})}else try{e.skip(m-1)}catch(e){break}0==(g-=m+4)&&(u=f.length>p?u+(f[p].me||d):u+d,p++,g=f.length>p&&f[p].sampleSize||h)}})).parse(e,!1),n},za.prototype.init=function(e){this.h.init(e)},(i=Ja.prototype).destroy=function(){return this.F.destroy()},i.init=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,c,d=this;return _((function(h){if(1==h.g)return i=De,E(h,d.G,2);for(r={},a=l(e.keys()),o=a.next();!o.done;r={Ha:r.Ha},o=a.next())r.Ha=o.value,s=e.get(r.Ha),u=nn(s.mimeType,s.codecs),r.Ha==i.ma?$a(d,u,n):(!t&&MediaSource.isTypeSupported(u)||!Zt(u,r.Ha)||(d.B[r.Ha]=new Qt,u=tn(r.Ha,u)),c=d.m.addSourceBuffer(u),n&&(c.mode=ho),d.A.o(c,"error",function(e){return function(){d.i[e.Ha][0].p.reject(new Ee(2,3,3014,d.j.error?d.j.error.code:0))}}(r)),d.A.o(c,"updateend",function(e){return function(){return ro(d,e.Ha)}}(r)),d.h[r.Ha]=c,d.J[r.Ha]=u,d.i[r.Ha]=[]);T(h)}))},i.Bb=function(){var e={total:Ya(this.j.buffered),audio:Ya(to(this,"audio")),video:Ya(to(this,"video")),text:[]};if(this.g){var t=this.g.g,n=this.g.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},i.remove=function(e,t,n){var i=this;return _((function(r){return e==De.ma?E(r,i.g.remove(t,n),0):E(r,ao(i,e,(function(){n<=t?ro(i,e):i.h[e].remove(t,n)})),0)}))},i.flush=function(e){var t=this;return _((function(n){return e==De.ma?n.return():E(n,ao(t,e,(function(){t.j.currentTime-=.001,ro(t,e)})),0)}))},i.endOfStream=function(e){var t=this;return _((function(n){return E(n,oo(t,(function(){Qa(t)||(e?t.m.endOfStream(e):t.m.endOfStream())})),0)}))},i.eb=function(e){var t=this;return _((function(n){return E(n,oo(t,(function(){t.m.duration=e})),0)}))},i.getDuration=function(){return this.m.duration};var co=e.URL.createObjectURL,ho="sequence",fo=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function po(e,t,n,i){this.Ra=e,this.Ua=t,this.Ca=n,this.Xd=void 0===i?null:i}function go(e,t,n,i,r,a,o,s,u,l,c,d){l=void 0===l?[]:l,this.startTime=e,this.l=this.endTime=t,this.j=n,this.Ua=i,this.Ca=r,this.g=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.h=l,this.tilesLayout=void 0===c?"":c,this.i=void 0===d?null:d}function mo(e,t,n){this.j=e,this.sd=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.A=0,this.B=!0,this.C=0,this.F=void 0===n||n,this.G=0}function vo(e,t){this.j=e,this.m=bo(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.A=t,this.i=function(){}}function yo(e){this.g=e}function bo(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=l(Ya(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function Eo(e,t,n,i,r){var a=this;this.g=e,this.F=t,this.l=n,this.C=r,this.i=new Ui,this.B=!1,this.G=e.readyState,this.j=!1,this.h=i,this.A=!1,this.i.o(e,"waiting",(function(){return To(a)})),this.m=new pn((function(){To(a)})).ka(.25)}function To(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.B)return}else e.B=!1;if(!e.g.paused||0==e.g.currentTime&&(e.g.autoplay||0!=e.g.currentTime)){var t;if(e.g.readyState!=e.G&&(e.j=!1,e.G=e.g.readyState),!(t=!e.h)){var n=(t=e.h).j,i=bo(n),r=n.g.currentTime,a=Date.now()/1e3;t.g==r&&t.m==i||(t.l=a,t.g=r,t.m=i,t.h=!1),(i=(r=a-t.l)>=t.A&&i&&!t.h)&&(t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}if(t){r=e.l.smallGapLimit;var o=e.g.currentTime;if(n=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=Ya(e).findIndex((function(e,i,r){return e.start>t&&(0==i||r[i-1].end-t<=n)})))?e:null}(t=e.g.buffered,o,e.l.gapDetectionThreshold),!(null==n||0==n&&!e.A||(i=t.start(n),i>=e.F.pb()))){var s=i-o;r=s<=r,a=!1,.001>s||(r||e.j||(e.j=!0,(o=new K("largegap",o=(new Map).set("currentTime",o).set("gapSize",s))).c
2ancelable=!0,e.C(o),e.l.jumpLargeGaps&&!o.defaultPrevented&&(a=!0)),!r&&!a)||(0!=n&&t.end(n-1),e.g.currentTime=i)}}}}}function Ao(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=wo.value().get(t),n.Ia(e,t,i))}po.prototype.Fc=function(){return this.Ua},po.prototype.Bc=function(){return this.Ca},G("shaka.media.InitSegmentReference",po),po.prototype.getEndByte=po.prototype.Bc,po.prototype.getStartByte=po.prototype.Fc,(i=go.prototype).Ra=function(){return this.j()},i.sg=function(){return this.startTime},i.eg=function(){return this.endTime},i.Fc=function(){return this.Ua},i.Bc=function(){return this.Ca},i.zg=function(){return this.tilesLayout},i.yg=function(){return this.i},G("shaka.media.SegmentReference",go),go.prototype.getTileDuration=go.prototype.yg,go.prototype.getTilesLayout=go.prototype.zg,go.prototype.getEndByte=go.prototype.Bc,go.prototype.getStartByte=go.prototype.Fc,go.prototype.getEndTime=go.prototype.eg,go.prototype.getStartTime=go.prototype.sg,go.prototype.getUris=go.prototype.Ra,(i=mo.prototype).getDuration=function(){return this.l},i.mg=function(){return this.g},i.eb=function(e){this.l=e},i.qg=function(){return this.j},i.xf=function(e){this.A=e},i.Pc=function(e){this.B=e},i.ye=function(e){this.m=e},i.gh=function(e){this.sd=e},i.dg=function(){return this.sd},i.kc=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.ae(e[0].startTime),this.g=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,t),null!=this.j&&this.F&&(this.j=(Date.now()+this.A)/1e3-this.h-this.g)}},i.ae=function(e){this.i=null==this.i?e:Math.min(this.i,e)},i.$d=function(e){this.g=Math.max(this.g,e)},i.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},i.T=function(){return 1/0==this.l&&!this.B},i.Nb=function(){return 1/0!=this.l&&!this.B},i.qb=function(){return Math.max(this.C,this.Kb()-this.m)},i.Af=function(e){this.C=e},i.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.g-this.j)+this.G,this.l):this.h||this.l},i.Ec=function(e){var t=Math.max(this.i,this.C);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Kb()-this.m+e,this.pb()))},i.ec=function(){return this.Ec(0)},i.pb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.sd:0))},i.Ef=function(){return!(null==this.j||null!=this.h&&this.F)},i.wf=function(e){this.G=e},G("shaka.media.PresentationTimeline",mo),mo.prototype.setAvailabilityTimeOffset=mo.prototype.wf,mo.prototype.usingPresentationStartTime=mo.prototype.Ef,mo.prototype.getSeekRangeEnd=mo.prototype.pb,mo.prototype.getSeekRangeStart=mo.prototype.ec,mo.prototype.getSafeSeekRangeStart=mo.prototype.Ec,mo.prototype.getSegmentAvailabilityEnd=mo.prototype.Kb,mo.prototype.setUserSeekStart=mo.prototype.Af,mo.prototype.getSegmentAvailabilityStart=mo.prototype.qb,mo.prototype.isInProgress=mo.prototype.Nb,mo.prototype.isLive=mo.prototype.T,mo.prototype.offset=mo.prototype.offset,mo.prototype.notifyMaxSegmentDuration=mo.prototype.$d,mo.prototype.notifyMinSegmentStartTime=mo.prototype.ae,mo.prototype.notifySegments=mo.prototype.kc,mo.prototype.getDelay=mo.prototype.dg,mo.prototype.setDelay=mo.prototype.gh,mo.prototype.setSegmentAvailabilityDuration=mo.prototype.ye,mo.prototype.setStatic=mo.prototype.Pc,mo.prototype.setClockOffset=mo.prototype.xf,mo.prototype.getPresentationStartTime=mo.prototype.qg,mo.prototype.setDuration=mo.prototype.eb,mo.prototype.getMaxSegmentDuration=mo.prototype.mg,mo.prototype.getDuration=mo.prototype.getDuration,vo.prototype.release=function(){this.j=null,this.i=function(){}},Eo.prototype.release=function(){this.i&&(this.i.release(),this.i=null),null!=this.m&&(this.m.stop(),this.m=null),this.h&&(this.h.release(),this.h=null),this.g=this.F=this.C=null},Eo.prototype.ee=function(){this.A=!0,To(this)};var wo=new Ut((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function So(e,t,n){var i=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new Ui,this.i=new Mo(e),Ao(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){ko(i,i.j)}))}function xo(e){return e.m?e.g.currentTime:e.j}function Io(e,t){0<e.g.readyState?Lo(e.i,t):Ao(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){ko(e,e.j)}))}function ko(e,t){.001>Math.abs(e.g.currentTime-t)?Co(e):(e.h.Ia(e.g,"seeking",(function(){Co(e)})),Lo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function Co(e){e.m=!0,e.h.o(e.g,"seeking",(function(){return e.l()}))}function Mo(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new pn((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function Lo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.ka(.1)}function No(e){var t=this;this.g=e,this.j=!1,this.h=null,this.i=new Ui,Ao(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,(function(){null==t.h||0==t.h?t.j=!0:(t.i.Ia(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.h))}))}function Ro(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.H=t.minBufferTime||0,this.l=n,this.F=r,this.C=null,this.j=new Eo(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,i=new vo(new yo(e),t.stallThreshold);return function(e,t){e.i=t}
2(i,(function(){n?e.currentTime+=n:(e.pause(),e.play())})),i}(e,n),a),this.h=new So(e,(function(){var e=o.j;e.B=!0,e.A=!1,e.j=!1;var t=xo(o.h);return e=Po(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.C||o.C<t-1)?(o.C=t,Io(o.h,e),e=void 0):(o.F(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.g.getDuration()?e.g.ec():e.g.pb():0>t&&(t=e.g.pb()+t),_o(e,Do(e,t))}(this,i)),this.B=new pn((function(){if(0!=o.i.readyState&&!o.i.paused){var e=xo(o.h),t=o.g.ec(),n=o.g.pb();3>n-t&&(t=n-3),e<t&&(e=Po(o,e),o.i.currentTime=e)}})).ka(.25)}function _o(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Po(e,t){var n=Math.max(e.H,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.ec(),a=e.g.pb(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.Ec(n),u=e.g.Ec(i);return n=e.g.Ec(n+i),t>=o?_o(e,t):t>a?a:t<r?Xa(e.i.buffered,u)?u:n:t>=s||Xa(e.i.buffered,t)?t:n}function Do(e,t){var n=e.g.ec();return t<n||t>(n=e.g.pb())?n:t}function Oo(e){this.O=e,this.g=null,this.h=0,this.i=!1}function Uo(e,t,n){return new Oo([new go(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function jo(e,t,n){this.i=e,this.h=t,this.g=n}function Bo(){Oo.call(this,[]),this.j=[]}function Fo(e){var t=this;this.g=e,this.j=!1,this.i=this.g.hd(),this.h=new pn((function(){t.g.pf(.25*t.i)}))}function Go(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.hd()!=t&&e.g.we(t))}catch(e){}e.h.ka(.25),0!=e.g.hd()&&e.g.we(0)}function Ko(e){var t=this;this.h=e,this.g=new Set,this.i=new pn((function(){Vo(t,!1)})).ka(.25)}function Vo(e,t){for(var n=l(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function zo(e){ee.call(this),this.g=new Map,this.h=e}function Ho(e){ee.call(this);var t=this;this.g=new Set,this.i=e,this.h=new pn((function(){for(var e=t.i(),n=l(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime<e.start&&(t.g.delete(i),i=new K("regionremove",new Map([["region",i]])),t.dispatchEvent(i))})).ka(2)}function qo(e){ee.call(this);var t=this;this.i=e,this.g=new Map,this.l=[{Xb:null,Wb:Yo,Mb:function(e,n){return Xo(t,"enter",e,n)}},{Xb:Wo,Wb:Yo,Mb:function(e,n){return Xo(t,"enter",e,n)}},{Xb:Jo,Wb:Yo,Mb:function(e,n){return Xo(t,"enter",e,n)}},{Xb:Yo,Wb:Wo,Mb:function(e,n){return Xo(t,"exit",e,n)}},{Xb:Yo,Wb:Jo,Mb:function(e,n){return Xo(t,"exit",e,n)}},{Xb:Wo,Wb:Jo,Mb:function(e,n){return Xo(t,"skip",e,n)}},{Xb:Jo,Wb:Wo,Mb:function(e,n){return Xo(t,"skip",e,n)}}],this.h=new Ui,this.h.o(this.i,"regionremove",(function(e){t.g.delete(e.region)}))}function Xo(e,t,n,i){t=new K(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}So.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},Mo.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},No.prototype.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},No.prototype.A=function(e){this.h=this.j?this.h:e},No.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0},No.prototype.G=function(){},Ro.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.B&&(this.B.stop(),this.B=null),this.i=this.h=this.g=this.l=null,this.F=function(){}},Ro.prototype.A=function(e){Io(this.h,e)},Ro.prototype.m=function(){var e=xo(this.h);return 0<this.i.readyState&&!this.i.paused?Do(this,e):e},Ro.prototype.G=function(){this.j.ee()},(i=Oo.prototype).destroy=function(){return Ae("shaka.media.SegmentIndex","Please use release() instead of destroy()."),this.release(),Promise.resolve()},i.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)},i.Ig=function(){this.i=!0},i.find=function(e){for(var t=this.O.length-1,n=t;0<=n;--n){var i=this.O[n],r=n<t?this.O[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.h}return this.O.length&&e<this.O[0].startTime?this.h:null},i.get=function(e){return 0==this.O.length||0>(e-=this.h)||e>=this.O.length?null:this.O[e]},i.offset=function(e){if(!this.i)for(var t=l(this.O),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},i.ic=function(e){!this.i&&e.length&&(this.O=this.O.filter((function(t){return t.startTime<e[0].startTime})),this.O.push.apply(this.O,c(e)))},i.jc=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.O.length||e.endTime>n.O[0].startTime)})),this.ic(e),this.Ib(t)},i.Ib=function(e){if(!this.i){var t=this.O.length;this.O=this.O.filter((function(t){return t.endTime>e})),this.h+=t-this.O.length}},i.Ab=function(e,t,n){if(n=void 0!==n&&n,!this.i){for(;this.O.length&&this.O[this.O.length-1].startTime>=t;)this.O.pop();for(;this.O.length&&this.O[0].endTime<=e;)this.O.shift(),n||this.h++;0!=this.O.length&&(e=this.O[this.O.length-1],this.O[this.O.length-1]=new go(e.startTime,t,e.j,e.U
2a,e.Ca,e.g,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.h,e.tilesLayout,e.i))}},i.wd=function(e,t){var n=this;this.i||(this.g&&this.g.stop(),this.g=new pn((function(){var e=t();e?n.O.push.apply(n.O,c(e)):(n.g.stop(),n.g=null)})),this.g.ka(e))},Oo.prototype[Symbol.iterator]=function(){return this.cc(0)},Oo.prototype.cc=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),i=-1;if(n&&0<n.h.length)for(var r=n.h.length-1;0<=r;--r){var a=n.h[r];if(e>=a.startTime&&e<a.endTime){t++,i=r-1;break}}return new jo(this,t,i)},G("shaka.media.SegmentIndex",Oo),Oo.forSingleSegment=Uo,Oo.prototype.getIteratorForTime=Oo.prototype.cc,Oo.prototype.updateEvery=Oo.prototype.wd,Oo.prototype.fit=Oo.prototype.Ab,Oo.prototype.evict=Oo.prototype.Ib,Oo.prototype.mergeAndEvict=Oo.prototype.jc,Oo.prototype.merge=Oo.prototype.ic,Oo.prototype.offset=Oo.prototype.offset,Oo.prototype.get=Oo.prototype.get,Oo.prototype.find=Oo.prototype.find,Oo.prototype.markImmutable=Oo.prototype.Ig,Oo.prototype.release=Oo.prototype.release,Oo.prototype.destroy=Oo.prototype.destroy,jo.prototype.seek=function(e){return Ae("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek()."),(e=this.i.cc(e))?(this.h=e.h,this.g=e.g):(this.h=Number.MAX_VALUE,this.g=0),this.next().value},jo.prototype.current=function(){var e=this.i.get(this.h);return e&&0<e.h.length&&e.Ra().length&&this.g>=e.h.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.h.length?e.h[this.g]:e},jo.prototype.next=function(){var e=this.i.get(this.h);return e&&0<e.h.length?(this.g++,e.Ra().length&&this.g==e.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},G("shaka.media.SegmentIterator",jo),jo.prototype.next=jo.prototype.next,jo.prototype.current=jo.prototype.current,jo.prototype.seek=jo.prototype.seek,m(Bo,Oo),(i=Bo.prototype).clone=function(){var e=new Bo;return e.j=this.j.slice(),e},i.release=function(){for(var e=l(this.j),t=e.next();!t.done;t=e.next())t.value.release();this.j=[]},i.find=function(e){for(var t=0,n=l(this.j),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.h+i.O.length}return null},i.get=function(e){for(var t=0,n=l(this.j),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;t+=i.h+i.O.length}return null},i.offset=function(){},i.ic=function(){},i.Ib=function(){},i.jc=function(){},i.Ab=function(){},i.wd=function(){},G("shaka.media.MetaSegmentIndex",Bo),Bo.prototype.updateEvery=Bo.prototype.wd,Bo.prototype.fit=Bo.prototype.Ab,Bo.prototype.mergeAndEvict=Bo.prototype.jc,Bo.prototype.evict=Bo.prototype.Ib,Bo.prototype.merge=Bo.prototype.ic,Bo.prototype.offset=Bo.prototype.offset,Bo.prototype.get=Bo.prototype.get,Bo.prototype.find=Bo.prototype.find,Bo.prototype.release=Bo.prototype.release,Fo.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},Fo.prototype.set=function(e){this.i=e,Go(this)},Fo.prototype.ed=function(){return this.g.ed()},Ko.prototype.release=function(){this.i.stop();for(var e=l(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},m(zo,ee),zo.prototype.release=function(){this.g.clear(),ee.prototype.release.call(this)},zo.prototype.j=function(e){for(var t=l(this.g.values()),n=t.next();!n.done;n=t.next()){e:{for(var i=(n=n.value).Kc,r=i.length-1;0<=r;r--){var a=i[r];if(a.position<=e){i=a.Xd;break e}}i=null}if((r=i)&&(r=!((r=n.Ve)===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width)),r)e:{if(r=e,a=i.contentType,(a=this.h()[a])&&0<a.length){var o=a[a.length-1].end;if(r>=a[0].start&&r<o){r=!0;break e}}r=!1}r&&(n.Ve=i,JSON.stringify(i),n=new K("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}},m(Ho,ee),Ho.prototype.release=function(){this.g.clear(),this.h.stop(),ee.prototype.release.call(this)},m(qo,ee),qo.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,ee.prototype.release.call(this)},qo.prototype.j=function(e,t){for(var n=l(this.i.g),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?Wo:e>i.endTime?Jo:Yo;this.g.set(i,a);for(var o=l(this.l),s=o.next();!s.done;s=o.next())(s=s.value).Xb==r&&s.Wb==a&&s.Mb(i,t)}};var Wo=1,Yo=2,Jo=3;function $o(e,t,n,i,r){return e=Ci(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Qo(e,t){var n=this;this.g=t,this.m=e,this.h=null,this.C=1,this.A=this.l=null,this.i=new Map,this.F=!1,this.G=null,this.B=!1,this.j=new Di((function(){return function(e){var t,n,i,r;
2return _((function(a){if(1==a.g){for(t=[],n=l(e.i.values()),i=n.next();!i.done;i=n.next())ds(r=i.value),t.push(hs(r));return E(a,Promise.all(t),2)}e.i.clear(),e.g=null,e.m=null,e.h=null,T(a)}))}(n)}))}function Zo(e,t){var n=e.i.get("video");if(n){var i=n.stream;if(i)if(t){var r=i.trickModeVideo;r&&!n.Tb&&(ns(e,r,!1,0,!1),n.Tb=i)}else(i=n.Tb)&&(n.Tb=null,ns(e,i,!0,0,!1))}}function es(e,t,n,i,r){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,e.l=t,e.F&&(t.video&&ns(e,t.video,n,i,r),t.audio&&ns(e,t.audio,n,i,r))}function ts(e,t){e.A=t,e.F&&ns(e,t,!0,0,!1)}function ns(e,t,n,i,r){var a=e.i.get(t.type);a||t.type!=Pe?a&&(a.Tb&&(t.trickModeVideo?(a.Tb=t,t=t.trickModeVideo):a.Tb=null),a.stream!=t||r)&&(t.type==Pe&&$a(e.g.U,nn(t.mimeType,t.codecs),e.m.sequenceMode),a.stream.closeSegmentIndex&&a.stream.closeSegmentIndex(),a.stream=t,a.va=null,n&&(a.zc?a.yd=!0:a.cb?(a.Vb=!0,a.$c=i,a.yd=!0):(ds(a),ls(e,a,!0,i).catch((function(t){e.g&&e.g.onError(t)})))),function(e,t){var n,i;return _((function(r){if(1==r.g)return t.Ja?(n=t.stream,i=t.Ja,n.segmentIndex?r.D(2):E(r,n.createSegmentIndex(),2)):r.return();if(t.Ja!=i||t.stream!=n)return r.return();var a=e.g.gd(),o=eo(e.g.U,t.type),s=t.stream.segmentIndex.find(t.Sa?t.Sa.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.Ca?u.Ca-u.Ua:null,u&&!s&&(s=(u.endTime-u.startTime)*(t.stream.bandwidth||0)/8),s?((u=u.g)&&(s+=(u.Ca?u.Ca-u.Ua:null)||0),a=8*s/(u=e.g.getBandwidthEstimate())<(o||0)-a-Math.max(e.m.minBufferTime||0,e.h.rebufferingGoal)||t.Ja.h.g>s):a=!1,a&&t.Ja.abort(),T(r)}))}(e,a).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,i,r,a;_((function(o){switch(o.g){case 1:return n=De,A(o,2),E(o,io(e.g.U,n.ma),4);case 4:S(o,3);break;case 2:i=x(o),e.g&&e.g.onError(i);case 3:r=nn(t.mimeType,t.codecs),$a(e.g.U,r,e.m.sequenceMode),(e.g.U.l.isTextVisible()||e.h.alwaysStreamText)&&(a=rs(t),e.i.set(n.ma,a),cs(e,a,0)),T(o)}}))}(e,t)}function is(e,t){t.zc||t.Vb||(t.cb?(t.Vb=!0,t.$c=0):null==Za(e.g.U,t.type)?null==t.gb&&cs(e,t,0):(ds(t),ls(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function rs(e){return{stream:e,type:e.type,va:null,Sa:null,md:null,Vd:null,Ud:null,Td:null,Tb:null,endOfStream:!1,cb:!1,gb:null,Vb:!1,$c:0,yd:!1,zc:!1,Mc:!0,je:!1,Gc:!1,Ja:null}}function as(t,n){var i,r,a,o,s;return _((function(u){switch(u.g){case 1:if(Oi(t.j),n.cb||null==n.gb||n.zc)return u.return();if(n.gb=null,!n.Vb){u.D(2);break}return E(u,ls(t,n,n.yd,n.$c),3);case 3:return u.return();case 2:if(n.stream.segmentIndex){u.D(4);break}return i=n.stream,E(u,n.stream.createSegmentIndex(),5);case 5:if(i!=n.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),null==n.gb&&cs(t,n,0),u.return();case 4:A(u,6),r=function(t,n){if(ss(n))return function(e,t){var n=eo(e,"video")||0;ln(e.g,t,n)}(t.g.U,n.stream.originalId||""),null;n.type==Pe&&function(e){e.g&&ln(e.g,"",0)}(t.g.U);var i=t.g.gd(),r=n.Sa?n.Sa.endTime:i,a=function(e,t,n){return t==Pe?null==(e=e.g).h||e.h<n?0:e.h-Math.max(n,e.g):Wa(e=to(e,t),n)}(t.g.U,n.type,i),o=Math.max(t.m.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.C;if(1e-6>t.m.presentationTimeline.getDuration()-r)return n.endOfStream=!0,"video"==n.type&&(i=t.i.get(Pe))&&ss(i)&&(i.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.h.updateIntervalSeconds/2;if(a=eo(t.g.U,n.type),a=function(e,t,n,i){if(t.va)return t.va.current();if(t.Sa||i)return t.va=t.stream.segmentIndex.cc(t.Sa?t.Sa.endTime:i),t.va&&t.va.next().value;e=e.h.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.va=t.stream.segmentIndex.cc(i),r=t.va&&t.va.next().value),r||(t.va=t.stream.segmentIndex.cc(n),r=t.va&&t.va.next().value),r}(t,n,i,a),!a)return t.h.updateIntervalSeconds;o=1/0;for(var s=Array.from(t.i.values()),u=(s=l(s)).next();!u.done;u=s.next())ss(u=u.value)||u.va&&!u.va.current()||(o=Math.min(o,u.Sa?u.Sa.endTime:i));return r>=o+t.m.presentationTimeline.g?t.h.updateIntervalSeconds:(function(t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g;return _((function(m){switch(m.g){case 1:return a=De,o=n.stream,s=n.va,n.cb=!0,A(m,2),E(m,function(e,t,n){var i,r,a,o,s,u,l;return _((function(c){return i=[],r=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.Vd&&r==t.Ud&&a==t.Td||(s=function(){var n;return _((function(i){if(1==i.g)return A(i,2),t.Ud=r,t.Td=a,t.Vd=o,E(i,function(e,t,n,i,r,a){return _((function(o){return t==De.ma?(a||(e.g.C=n),function(e,t,n){e.l=t,e.m=n}(e.g,i,r),o.return()):E(o,Promise.all([ao(e,t,(function(){var n=e.h[t].appendWindowStart,i=e.h[t].appendWindowEnd;e.h[t].abort(),e.h[t].appendWindowStart=n,e.h[t].appendWindowEnd=i,ro(e,t)})),a?Promise.resolve():ao(e,t,(function(){var i=n;0>i&&(i+=.001),e.h[t].timestampOffset=i,ro(e,t)})),ao(e,t,(function(){e.h[t].appendWindowStart=0,e.h[t].appendWindowEnd=r,e.h[t].appendWindowStart=i,ro(e,t)}))]),0)}))}(e.g.U,t.type,o,r,a,e.m.sequenceMode),4);if(2!=i.g)return S(i,0);throw n=x(i),t.Ud=null,t.Td=null,t.Vd=null,n}))},i.push(s())),!function(e,t){return e&&t?e.Fc()==t.Fc()&&e.Bc()==t.Bc()&&at(e.Ra(),t.Ra()):e==t}(n.g,t.md)&&(t.md=n.g)&&(u=us(e,t,n.g),l=function(){var n,i,r;return _((function(a){switch(a.g){case 1:return A(a,2),E(a,u,4);case 4:return n=a.h,Oi(e.j),i=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,E(a,no(e.g.U,t.type,n,null,null,i),5);case 5:S(a,0);break;case 2:throw r=x(a),t.md=null,r}}))}
2,e.g.Mg(n.startTime,n.g),i.push(l())),E(c,Promise.all(i),0)}))}(t,n,r),4);case 4:return Oi(t.j),t.B?m.return():(u="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,l=e.ReadableStream,t.h.lowLatencyMode&&l&&u?(d=new Uint8Array(0),h=function(e){var a,s,u;return _((function(l){return Oi(t.j),t.B?l.return():(d=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),a=!1,s=0,(new xr).box("mdat",(function(e){s=e.size+e.start,a=!0})).parse(d,!1,!0),a?(u=d.subarray(0,s),d=d.subarray(s),E(l,os(t,n,i,o,r,u),0)):l.D(0))}))},E(m,us(t,n,r,h),6)):E(m,us(t,n,r),7));case 7:return c=m.h,Oi(t.j),t.B?m.return():n.Vb?(n.cb=!1,cs(t,n,0),m.return()):E(m,os(t,n,i,o,r,c),6);case 6:if(Oi(t.j),t.B)return m.return();n.Sa=r,s.next(),n.cb=!1,n.je=!1,f=t.g.U.Bb(),p=f[n.type],JSON.stringify(p),n.Vb||t.g.ee(),cs(t,n,0),S(m,0);break;case 2:if(g=x(m),Oi(t.j,g),t.B)return m.return();if(n.cb=!1,7001==g.code)n.cb=!1,n.gb=null,cs(t,n,0),m.D(0);else if(n.type==a.ma&&t.h.ignoreTextStreamFailures)t.i.delete(a.ma),m.D(0);else if(3017==g.code)(function(e,t,n){if(!Array.from(e.i.values()).some((function(e){return e!=t&&e.je}))){var i=Math.round(100*e.C);if(20<i)e.C-=.2;else{if(!(4<i))return t.Gc=!0,e.B=!0,void e.g.onError(n);e.C-=.04}t.je=!0}cs(e,t,4)})(t,n,g),m.D(0);else{if(1001!=g.code||!g.data||404!=g.data[1])return n.Gc=!0,g.severity=2,E(m,fs(t,g),0);n.cb=!1,n.gb=null,cs(t,n,1),m.D(0)}}}))}(t,n,i,a).catch((function(){})),null)}(t,n),null!=r&&(cs(t,n,r),n.Gc=!1),S(u,7);break;case 6:return a=x(u),E(u,fs(t,a),8);case 8:return u.return();case 7:if(o=Array.from(t.i.values()),!t.F||!o.every((function(e){return e.endOfStream}))){u.D(0);break}return E(u,t.g.U.endOfStream(),10);case 10:Oi(t.j),0!=(s=t.g.U.getDuration())&&s<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.eb(s),T(u)}}))}function os(e,t,n,i,r,a){var o,s;return _((function(u){return 1==u.g?(o=i.closedCaptions&&0<i.closedCaptions.size,(null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length||e.h.dispatchAllEmsgBoxes)&&(new xr).Y("emsg",(function(t){var n=i.emsgSchemeIdUris;if(0===t.version)var a=t.reader.Lc(),o=t.reader.Lc(),s=t.reader.P(),u=t.reader.P(),l=t.reader.P(),c=t.reader.P(),d=r.startTime+u/s;else s=t.reader.P(),u=(d=t.reader.nc()/s+r.timestampOffset)-r.startTime,l=t.reader.P(),c=t.reader.P(),a=t.reader.Lc(),o=t.reader.Lc();t=t.reader.Eb(t.reader.V.byteLength-t.reader.qa()),(n&&n.includes(a)||e.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.Ng():(n=(new Map).set("detail",{startTime:d,endTime:d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}),n=new K(nl,n),e.g.onEvent(n)))})).parse(a),E(u,function(e,t,n){var i,r,a;return _((function(o){if(1==o.g)return i=Math.max(e.h.bufferBehind,e.m.presentationTimeline.g),null==(r=Za(e.g.U,t.type))||.01>=(a=n-r-i)?o.return():E(o,e.g.U.remove(t.type,r,r+a),2);Oi(e.j),T(o)}))}(e,t,n),2)):3!=u.g?(Oi(e.j),s=t.Mc,t.Mc=!1,E(u,no(e.g.U,t.type,a,r.startTime,r.endTime,o,s,e.m.sequenceMode),3)):(Oi(e.j),void T(u))}))}function ss(e){return e&&e.type==Pe&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function us(e,t,n,i){var r,a,o,s,u;return _((function(l){return 1==l.g?(r=Ri,a=$o(n.Ra(),n.Ua,n.Ca,e.h.retryParameters,i),o=t.stream,e.g.modifySegmentRequest(a,{type:o.type,init:n instanceof po,duration:n.endTime-n.startTime,mimeType:o.mimeType,codecs:o.codecs,bandwidth:o.bandwidth}),s=e.g.Qb.request(r,a),t.Ja=s,E(l,s.promise,2)):(u=l.h,t.Ja=null,l.return(u.data))}))}function ls(e,t,n,i){var r,a;return _((function(o){return 1==o.g?(t.Vb=!1,t.yd=!1,t.$c=0,t.zc=!0,t.Sa=null,t.md=null,t.va=null,i?(r=e.g.gd(),a=e.g.U.getDuration(),E(o,e.g.U.remove(t.type,r+i,a),3)):E(o,io(e.g.U,t.type),4)):3!=o.g?(Oi(e.j),n?E(o,e.g.U.flush(t.type),3):o.D(3)):(Oi(e.j),t.zc=!1,t.endOfStream=!1,cs(e,t,0),void T(o))}))}function cs(e,t,n){var i=t.type;(i!=Pe||e.i.has(i))&&(t.gb=new fn((function(){var n;return _((function(i){return 1==i.g?(A(i,2),E(i,as(e,t),4)):2!=i.g?S(i,0):(n=x(i),e.g&&e.g.onError(n),void T(i))}))})).R(n))}
2function ds(e){null!=e.gb&&(e.gb.stop(),e.gb=null)}function hs(e){return _((function(t){return e.Ja?E(t,e.Ja.abort(),0):t.D(0)}))}function fs(e,t){return _((function(n){if(1==n.g)return E(n,gi(e.G),2);Oi(e.j),e.g.onError(t),t.handled||e.h.failureCallback(t),T(n)}))}function ps(e,t){var n=Wu(),i=this;this.j=t,this.i=e,this.l=n,this.A=null,this.m=[],this.h=this.g=null,this.C=Promise.resolve().then((function(){return function(e){return _((function(t){if(e.B.g)t=t.D(0);else{if(0==e.m.length||e.g&&!e.g.Lb)var n=!1;else{e.g&&(e.g.bb.Rb(),e.g=null);var i=(n=e.m.shift()).create(e.l);i?(n.bb.lc(),e.g={node:i.node,payload:i.payload,Lb:i.Lb,bb:n.bb}):n.bb.qd(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return _((function(i){switch(i.g){case 1:return e.i=e.j.og(e.i,e.l,e.g.node,e.g.payload),A(i,2),e.h=e.j.Sf(e.i,e.l,e.g.payload),E(i,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.bb.od(),e.g=null),S(i,0);break;case 2:return 7001==(t=x(i)).code?e.g.bb.Rb():e.g.bb.onError(t),e.g=null,e.h=null,n=e,E(i,e.j.handleError(e.l,t),5);case 5:n.i=i.h,T(i)}}))}(e):(e.j.Lg(e.i),e.A=new Ot,n=e.A),t=E(t,n,1)}return t}))}(i)})),this.B=new Di((function(){return function(e){var t,n;return _((function(i){if(1==i.g)return e.h&&e.h.abort(),ms(e),E(i,e.C,2);for(e.g&&e.g.bb.Rb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.bb.Rb();e.g=null,e.m=[],e.j=null,T(i)}))}(i)}))}function gs(e,t){var n={lc:function(){},od:function(){},Rb:function(){},onError:function(){},qd:function(){},Mi:function(){}};return e.m.push({create:t,bb:n}),e.h&&e.h.abort(),ms(e),n}function ms(e){e.A&&(e.A.resolve(),e.A=null)}function vs(e){this.g=null;for(var t=l(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function ys(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function bs(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=l(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function Es(){}function Ts(e){return document.createElement(e)}function As(){return document.createElement("button")}function ws(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ss(t,n){var i=this;this.j=!1,this.i=[],this.C=t,this.m=n,this.g=Ts("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.m.appendChild(this.g),this.B=new pn((function(){Is(i)})).ka(.25),this.h=new Map,this.A=new Ui,this.A.o(document,"fullscreenchange",(function(){Is(i,!0)})),this.l=null,"ResizeObserver"in e&&(this.l=new ResizeObserver((function(){Is(i,!0)})),this.l.observe(this.g))}function xs(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=l(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var c=e.h.get(u),d=u.startTime<=i&&u.endTime>i,h=c?c.Ff:null;c&&(o.push(c.Ue),d||(a=!0,e.h.delete(u),c=null)),d&&(s.push(u),c||(ks(e,u,r),h=(c=e.h.get(u)).Ff,a=!0)),0<u.nestedCues.length&&h&&xs(e,u.nestedCues,h,i,r),r.pop()}if(a){for(r=(i=l(o)).next();!r.done;r=i.next())n.removeChild(r.value);for(s.sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),u=(s=l(s)).next();!u.done;u=s.next())i=e.h.get(u.value),n.appendChild(i.Ue)}}function Is(e,t){if(e.g){var n=e.C.currentTime;if((!e.j||void 0!==t&&t)&&0<e.h.size&&(ws(e.g),e.h.clear()),e.j){for(var i=new Map,r=l(e.h.keys()),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,e.h.get(a));xs(e,e.i,e.g,n,[])}}}function ks(e,t,n){var i=1<n.length,r=i?"span":"div";(t.lineBreak||t.spacer)&&(t.spacer&&Ae("shaka.extern.Cue","Please use lineBreak instead of spacer."),r="br"),i=!i&&0<t.nestedCues.length;var a=Ts(r);"br"!=r&&function(e,t,n,i,r){var a=t.style,o=0==n.nestedCues.length,s=1<i.length;a.whiteSpace="pre-wrap";var u=n.payload.replace(/\s+$/g,(function(e){return" ".repeat(e.length)}));if(a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=Cs(n.linePadding,n,e.m),a.paddingRight=Cs(n.linePadding,n,e.m),n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center";else{if(n.nestedCues.length)var l=t;else l=Ts("span"),t.appendChild(l);n.border&&(l.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,(function(e){return e.backgroundColor})))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.textContent=u)}s&&!i[i.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=Cs(n.fontSize,n,e.m),n.line?1==n.lineInterpretation&&(a.position="absolute",a.left="0",a.top="0",n.writingMode==pt?(a.width="100%",n.lineAlign==mt?a.top=n.line+"%":"end"==n.lineAlign&&(a.bottom=n.line+"%")):"vertical-lr"==n.writingMode?(a.height="100%",
2n.lineAlign==mt?a.left=n.line+"%":"end"==n.lineAlign&&(a.right=n.line+"%")):(a.height="100%",n.lineAlign==mt?a.right=n.line+"%":"end"==n.lineAlign&&(a.left=n.line+"%"))):n.region&&n.region.id&&(e=n.region.widthUnits==St?"%":"px",i=n.region.viewportAnchorUnits==St?"%":"px",a.height=n.region.height+(n.region.heightUnits==St?"%":"px"),a.width=n.region.width+e,a.position="absolute",a.top=n.region.viewportAnchorY+i,a.left=n.region.viewportAnchorX+i),a.lineHeight=n.lineHeight,n.position&&(n.writingMode==pt?a.paddingLeft=n.position:a.paddingTop=n.position),"line-left"==n.positionAlign?a.cssFloat="left":"line-right"==n.positionAlign&&(a.cssFloat="right"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==pt?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,i),n=a,i&&((n=Ts("span")).classList.add("shaka-text-wrapper"),n.style.backgroundColor=t.backgroundColor,a.appendChild(n)),e.h.set(t,{Ue:a,Ff:n})}function Cs(e,t,n){var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;var r=i.value;switch(i.unit){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return e}}function Ms(e,t){this.h=e,this.g=t,this.j="",this.A=void 0,this.i=!1,this.m=!0,this.l=!1}function Ls(e,t,n){try{if(e.g.enabled){var i={d:1e3*n.duration,st:e.h.T()?zs:Vs};i.ot=function(e){var t=e.type;if(e.init)return Fs;if("video"==t)return e.codecs.includes(",")?Bs:js;if("audio"==t)return Us;if("text"==t)return"application/mp4"===e.mimeType?Ks:Gs}(n);var r=i.ot===js||i.ot===Us||i.ot===Bs||i.ot===Ks;r&&(i.bl=function(e,t){var n=e.h.Bb()[t];if(!n.length)return NaN;var i=e.h.cg();return(n=n.find((function(e){return e.start<=i&&e.end>=i})))?1e3*(n.end-i):NaN}(e,n.type)),n.bandwidth&&(i.br=n.bandwidth/1e3),r&&i.ot!==Ks&&(i.tb=function(e,t){var n=e.h.ab();if(!n.length)return NaN;for(var i=n[0],r=(n=l(n)).next();!r.done;r=n.next())"variant"===(r=r.value).type&&r.bandwidth>i.bandwidth&&(i=r);switch(t){case js:return i.videoBandwidth||NaN;case Us:return i.audioBandwidth||NaN;default:return i.bandwidth}}(e,i.ot)/1e3),_s(e,t,i)}}catch(e){X("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}}function Ns(e,t){try{if(!e.g.enabled)return t;var n=Rs(e);return n.ot=Gs,n.su=!0,Ds(t,Ps(n))}catch(e){return X("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),t}}function Rs(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.A,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}
2function _s(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,Rs(e)),n.pr=e.h.Cb();var r=n.ot===js||n.ot===Bs;if(e.l&&r&&(n.bs=!0,n.su=!0,e.l=!1),null==n.su&&(n.su=e.m),i)e=function(e){for(var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=(t=l(t)).next();!o.done;o=t.next())o=o.value,r[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=Ps(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(n),Object.keys(e).length&&Object.assign(t.headers,e);else{var a=Ps(n);a&&(t.uris=t.uris.map((function(e){return Ds(e,a)})))}}}function Ps(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}for(var i,r=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},o=Object.keys(e||{}).sort(),s=(o=l(o)).next();!s.done;s=o.next()){var u=e[s=s.value];if(!(i=u,Number.isNaN(i)||null==i||""===i||!1===i||"v"===s&&1===u||"pr"==s&&1===u)){var c=a[s];c&&(u=c(u));var d;d="string"===(c=typeof u)&&"ot"!==s&&"sf"!==s&&"st"!==s?s+"="+JSON.stringify(u):"boolean"===c?s:"symbol"===c?s+"="+u.description:s+"="+u,r.push(d)}}return r.join(",")}function Ds(e,t){if(!t||e.includes("offline:"))return e;var n=new oe(e);return n.g.set("CMCD",t),n.toString()}Qo.prototype.destroy=function(){return this.j.destroy()},Qo.prototype.configure=function(e){this.h=e,this.G=new pi({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)},Qo.prototype.start=function(){var e=this;return _((function(t){if(1==t.g)return E(t,function(e){var t,n,i,r,a,o,s,u,c,d;return _((function(h){if(1==h.g){if(t=De,!e.l)throw new Ee(2,5,5006);return n=new Map,i=new Set,e.l.audio&&(n.set(t.Gb,e.l.audio),i.add(e.l.audio)),e.l.video&&(n.set(t.ib,e.l.video),i.add(e.l.video)),e.A&&(n.set(t.ma,e.A),i.add(e.A)),r=e.g.U,a=e.h.forceTransmuxTS,E(h,r.init(n,a,e.m.sequenceMode),2)}Oi(e.j);var f=e.m.presentationTimeline.getDuration();for(1/0>f?e.g.U.eb(f):e.g.U.eb(Math.pow(2,32)),o=l(n.keys()),s=o.next();!s.done;s=o.next())u=s.value,c=n.get(u),e.i.has(u)||(d=rs(c),e.i.set(u,d),cs(e,d,0));T(h)}))}(e),2);Oi(e.j),e.F=!0,T(t)}))},Qo.prototype.Mc=function(){for(var e=this.g.gd(),t=this.h.smallGapLimit,n=l(this.i.keys()),i=n.next();!i.done;i=n.next()){var r=i.value;(i=this.i.get(r)).va=null;var a=this.g.U;if(r==Pe?a=null!=(a=a.g).g&&null!=a.h&&(e>=a.g&&e<a.h):a=Xa(a=to(a,r),e,t),!a){if((null!=eo(this.g.U,r)||i.cb)&&is(this,i),i.Ja&&(i.Ja.abort(),i.Ja=null),r===Pe)for((r=this.g.U.C.g).l=0,r.h=[],r.g=[],(a=r.i).i=[],a.h=[],a.g=0,_a(r),a=(r=l(r.j.values())).next();!a.done;a=r.next())Ca(a.value);i.Mc=!0}}},ps.prototype.destroy=function(){return this.B.destroy()},(i=vs.prototype).remove=function(e,t){return!!this.g&&(bs(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},i.append=function(e){function t(e){var n=[],i=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&Ae("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):i+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e})),i=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},a=(n=l(n)).next();!a.done;r={Yb:r.Yb},a=n.next())r.Yb=a.value,e.some(function(e){return function(t){return t.startTime==e.Yb.startTime&&t.endTime==e.Yb.endTime&&t.text==e.Yb.payload}}(r))||(a=ys(r.Yb))&&i.push(a);for(r=(e=l(e=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();!r.done;r=e.next())this.g.addCue(r.value)},i.destroy=function(){return this.g&&(bs(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},i.isTextVisible=function(){return"showing"==this.g.mode},i.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},G("shaka.text.SimpleTextDisplayer",vs),vs.prototype.setTextVisibility=vs.prototype.setTextVisibility,vs.prototype.isTextVisible=vs.prototype.isTextVisible,vs.prototype.destroy=vs.prototype.destroy,vs.prototype.append=vs.prototype.append,vs.prototype.remove=vs.prototype.remove,G("shaka.util.Dom",Es),Es.removeAllChildren=ws,(i=Ss.prototype).append=function(e){for(var t=[].concat(c(this.i)),n={},i=(e=l(e)).next();!i.done;n={Qc:n.Qc},i=e.next())n.Qc=i.value,t.some(function(e){return function(t){return st(t,e.Qc)}}(n))||this.i.push(n.Qc);Is(this)},i.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.B&&this.B.stop(),this.h.clear(),this.A&&(this.A.release(),this.A=null),this.l&&(this.l.disconnect(),this.l=null)},i.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter((function(n){return n.startTime<e||n.endTime>=t})),Is(this,n>this.i.length),!0},i.isTextVisible=function(){return this.j},i.setTextVisibility=function(e){this.j=e},G("shaka.text.UITextDisplayer",Ss),Ss.prototype.setTextVisibility=Ss.prototype.setTextVisibility,Ss.prototype.isTextVisible=Ss.prototype.isTextVisible,Ss.prototype.remove=Ss.prototype.remove,Ss.prototype.destroy=Ss.prototype.destroy,Ss.prototype.append=Ss.prototype.append,G("shaka.text.WebVttGenerator",(function(){}));var Os="m",Us="a",js="v",Bs="av",Fs="i",Gs="c",Ks="tt",Vs="v",zs="l";function Hs(){}function qs(e,t,n,i,r){var a,o=r in i,s=!0;for(a in t){var u=r+"."+a,l=o?i[r]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=Ai(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Ai(l)),u=qs(e[a],t[a],l,i,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(H("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&q("Unexpected number of arguments for "+u),e[a]=t[a]):(H("Invalid config, unrecognized key "+u),s=!1)}return s}function Xs(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)0!=r&&"\\"==e[r-1]||(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function Ws(){}function Ys(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:ir,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,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:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){return e}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};(navigator.userAgent.match(/Edge\//)||vn()||En("CrKey"))&&(i.gapDetectionThreshold=.5),(En("Web0S")||vn()||En("CrKey"))&&(i.stallSkip=0);var r={trackSelectionCallback:function(e){return _((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return _((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?E(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:t,manifest:n,streaming:i,offline:r,abrFactory:function(){return new ti},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!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},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};return r.trackSelectionCallback=function(e){return _((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),i=[],r=qe(t,n.map((function(e){return e.language})));r&&(i=n.filter((function(e){return Ge(e.language)==r}))),0==i.length&&(i=n.filter((function(e){return e.primary}))),0==i.length&&(n.map((function(e){return e.language})),i=n);var a=i.filter((function(e){return e.height&&480>
2=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),i=a.filter((function(e){return e.height==a[0].height}))),n=[],i.length){var o=Math.floor(i.length/2);i.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(i[o])}for(i=l(e),o=i.next();!o.done;o=i.next())(o=o.value).type!=Pe&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function Js(e,t,n){var i={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return qs(e,t,n||Ys(),i,"")}function $s(){this.g=null,this.h=[]}function Qs(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function Zs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=l(e.h),r=i.next();!r.done;r=i.next())n+=(r=r.value).state==t?r.duration:0;return n}function eu(){this.i=this.h=null,this.g=[]}function tu(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 nu(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.J=this.K=this.M=this.C=this.N=NaN,this.g=new $s,this.h=new eu}function iu(t,n){ee.call(this);var i=this;this.l=Sl,this.Hb=this.g=null,this.ea=!1,this.m=new Ui,this.Wd=this.B=this.jb=this.i=this.kd=this.K=this.j=this.ha=this.W=this.ld=this.M=this.cd=this.J=this.Ya=this.G=this.N=this.A=this.H=null,this.Ge=1e9,this.h=bu(this),this.le={width:1/0,height:1/0},this.C=null,this.Ma=new li(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.Na=this.h.preferredTextLanguage,this.hb=this.h.preferredTextRole,this.kb=this.h.preferForcedSubs,this.Zd=[],this.mb=null,n&&n(this),this.H=function(e){return new Ii((function(t,n){e.B&&e.B.segmentDownloaded(t,n)}),(function(t,n,i){t=(new Map).set("headers",t).set("request",n).set("requestType",i),e.dispatchEvent(ru(el,t))}),(function(t,n,i,r){t=(new Map).set("request",t).set("error",n).set("httpResponseCode",i).set("aborted",r),e.dispatchEvent(ru(Zu,t))}))}(this),this.H.ue(this.h.streaming.forceHTTPS),this.F=null,Ll&&(this.F=Me(Ll)),this.m.o(e,"online",(function(){i.ke()})),this.S={name:"detach"},this.X={name:"attach"},this.aa={name:"unload"},this.Je={name:"manifest-parser"},this.ge={name:"manifest"},this.Oa={name:"media-source"},this.be={name:"drm-engine"},this.$={name:"load"},this.Le={name:"src-equals-drm-engine"},this.Za={name:"src-equals"};var r=new Map;r.set(this.X,(function(e,t){return Ei(function(e,t,n){return null==t.I&&(t.I=n.I,e.m.o(t.I,"error",(function(){var t=Uu(e);t&&Du(e,t)}))),e.g=t.I,Promise.resolve()}(i,e,t))})),r.set(this.S,(function(e){return e.I&&(i.m.La(e.I,"error"),e.I=null),i.F&&i.F.release(),i.g=null,Ei(e=Promise.resolve())})),r.set(this.aa,(function(e){return Ei(ou(i,e))})),r.set(this.Oa,(function(e){return e=function(e,t){var n,i,r,a;return _((function(o){if(1==o.g)return n=new za,i=e.h.textDisplayFactory,r=Me(i),e.fe=i,a=function(e,t,n,i){return new Ja(e,t,n,i)}(t.I,n,r,(function(t,n,i){for(var r=(t=l(t)).next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){for(var a=r.cueTime+n,o=i,s=l(r.frames),u=s.next();!u.done;u=s.next())su(e,a,o,"ID3",u.value);e.F&&e.F.onHlsTimedMetadata(r,a)}})),E(o,a.G,2);e.N=a,T(o)}))}(i,e),Ei(e)})),r.set(this.Je,(function(e,t){var n=function(e,t,n){var i,r,a,o;return _((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,r=e.H,e.jb=i,a=e,E(s,vr(i,r,e.h.manifest.retryParameters,t.mimeType),2);a.kd=s.h,e.K=Me(e.kd),o=Ai(e.h.manifest),n.I&&"AUDIO"===n.I.nodeName&&(o.disableVideo=!0),e.K.configure(o),T(s)}))}(i,e,t);return Ei(n)})),r.set(this.ge,(function(e){return function(e,t){var n=t.uri,i=e.H;e.ld=new Ho((function(){return e.Ga()})),e.ld.addEventListener("regionadd",(function(t){t=t.region,Ou(e,ml,t),e.F&&e.F.onDashTimedMetadata(t)})),e.ha=null,e.h.streaming.observeQualityChanges&&(e.ha=new zo((function(){return e.Bb()})),e.ha.addEventListener("qualitychange",(function(t){var n=t.quality;t=t.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.co
2decs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",t),e.dispatchEvent(ru(ul,n))})));var r={networkingEngine:i,modifyManifestRequest:function(t,n){var i=e.W;try{i.g.enabled&&(i.A=n.format,_s(i,t,{ot:Os,su:!i.i}))}catch(e){X("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}},modifySegmentRequest:function(t,n){Ls(e.W,t,n)},filter:function(t){return Eu(e,t)},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=l(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(i=l(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var a=l(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 Bo;s={id:e.Ge++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:r.closedCaptions.get(o),label:null,type:Pe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.ld;e:{for(var i=l(n.g),r=i.next();!r.done;r=i.next())if((r=r.value).schemeIdUri==t.schemeIdUri&&r.id==t.id&&r.startTime==t.startTime&&r.endTime==t.endTime){i=r;break e}i=null}null==i&&(n.g.add(t),t=new K("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Du(e,t)},isLowLatencyMode:function(){return e.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)}},a=Date.now()/1e3;return new mi(function(){var t,i,o,s;return _((function(u){if(1==u.g)return t=e,E(u,e.K.start(n,r),2);if(t.i=u.h,i=ru(sl),e.dispatchEvent(i),0==e.i.variants.length)throw new Ee(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.i),o=Date.now()/1e3,s=o-a,e.C.G=s,T(u)}))}(),(function(){return e.K.stop()}))}(i,e)})),r.set(this.be,(function(e){return e=function(e,t){var n,i;return _((function(r){return 1==r.g?(n=Date.now()/1e3,i=!0,e.A=lu(e,{Qb:e.H,onError:function(t){Du(e,t)},pd:function(t){ju(e,t)},onExpirationUpdated:function(t,n){Bu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==tl&&i&&(i=!1,e.C.j=Date.now()/1e3-n)}}),e.A.configure(e.h.drm),E(r,Xi(e.A,e.i.variants,e.i.offlineSessionIds),2)):3!=r.g?E(r,e.A.yc(t.I),3):E(r,Eu(e,e.i),0)}))}(i,e),Ei(e)})),r.set(this.$,(function(e,t){return Ei(function(e,t,n){var i,r,a,o,s,u,l,c,d,h;return _((function(f){switch(f.g){case 1:if(t.startTime=n.startTime,null!=e.mb&&(t.startTime=e.mb,e.mb=null),i=t.I,r=t.uri,e.jb=r,e.J=new Fo({hd:function(){return t.I.playbackRate},ed:function(){return t.I.defaultPlaybackRate},we:function(e){t.I.playbackRate=e},pf:function(e){t.I.currentTime+=e}}),a=function(){return Su(e)},o=function(){return wu(e)},e.m.o(i,"playing",a),e.m.o(i,"pause",a),e.m.o(i,"ended",a),e.m.o(i,"ratechange",o),s=e.h.abrFactory,e.B&&e.Wd==s||(e.Wd=s,e.B=Me(s),"function"!=typeof e.B.playbackRateChanged&&(Ae("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.B.playbackRateChanged=function(){}),e.B.configure(e.h.abr)),e.Ma=new li(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.Na=e.h.preferredTextLanguage,e.hb=e.h.preferredTextRole,e.kb=e.h.preferForcedSubs,Fu(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.B.init((function(t,n,i){e.j&&t!=e.j.l&&ku(e,t,!0,void 0!==n&&n,void 0===i?0:i)})),e.G=function(e,t){return new Ro(e.g,e.i,e.h.streaming,t,(function(){e.Ya&&Vo(e.Ya,!0),e.j&&e.j.Mc(),e.M&&du(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.Ya=function(e){var t=new qo(e.ld);t.addEventListener("enter",(function(t){Ou(e,vl,t.region)})),t.addEventListener("exit",(function(t){Ou(e,yl,t.region)}
2)),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(Ou(e,vl,n),Ou(e,yl,n))}));var n=new Ko(e.g);return n.g.add(t),e.ha&&n.g.add(e.ha),n}(e),u=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),cu(e,u),Sn(e.i,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredAudioChannelCount,e.h.preferredDecodingAttributes),e.j=function(e){return new Qo(e.i,{gd:function(){return e.G.m()},getBandwidthEstimate:function(){return e.B.getBandwidthEstimate()},modifySegmentRequest:function(t,n){Ls(e.W,t,n)},U:e.N,Qb:e.H,onError:function(t){return Du(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Ng:function(){e.K&&e.K.update&&e.K.update()},ee:function(){e.G&&e.G.G(),du(e)},Mg:function(t,n){var i=n.Xd;i&&e.ha&&function(e,t,n){var i=function(e,t){var n=e.g.get(t);return n||(n={Kc:[],Ve:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){var n=e.h()[t.contentType];if(n&&0<n.length){var i=n[0].start,r=n[n.length-1].end,a=t.Kc;t.Kc=a.filter((function(e,t){return!(e.position<=i&&t+1<a.length&&a[t+1].position<=i||e.position>=r)}))}else t.Kc=[]}(e,i),e={Xd:t,position:n},0<=(t=(i=i.Kc).findIndex((function(e){return e.position>=n})))?i.splice(t,i[t].position==n?1:0,e):i.push(e)}(e.ha,i,t)}})}(e),e.j.configure(e.h.streaming),e.l=xl,e.dispatchEvent(ru(fl)),l=null,e.ab().find((function(e){return e.active}))){f.D(2);break}if(l=xu(e)?e.B.chooseVariant():null,ku(e,l,!0,!1,0),!e.h.streaming.startAtSegmentBoundary){f.D(3);break}return c=e.G.m(),E(f,function(e,t){var n,i,r,a,o;return _((function(s){return 1==s.g?(n=e.audio,i=e.video,r=function(e,t){var n,i;return _((function(r){return 1==r.g?e?E(r,e.createSegmentIndex(),2):r.return(null):(n=e.segmentIndex[Symbol.iterator]().seek(t))?(i=n.startTime,r.return(i)):r.return(null)}))},E(s,r(n,t),2)):3!=s.g?(a=s.h,E(s,r(i,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(l,c),4);case 4:d=f.h,e.G.A(d);case 3:Mu(e,null,On(l));case 2:return e.rb().find((function(e){return e.active}))||((h=Hn(e.i.textStreams,e.Na,e.hb,e.kb)[0]||null)&&tu(e.C.h,h,!0),l&&(h?(l.audio&&function(e,t,n){return e=Ge(e.h.preferredTextLanguage),t=Ge(t.language),n=Ge(n.language),je(n,e)&&!je(t,n)}(e,l.audio,h)&&(e.ea=!0),e.ea&&e.N.l.setTextVisibility(!0),_u(e)):e.ea=!1),h&&(e.h.streaming.alwaysStreamText||e.Pb())&&ts(e.j,h)),E(f,e.j.start(),5);case 5:e.h.abr.enabled&&(e.B.enable(),Pu(e)),Pn(e.j?e.j.l:null,e.i),Ku(e.i),Lu(e),xu(e),e.i.variants.some((function(e){return e.primary})),e.m.Ia(i,"loadedmetadata",(function(){e.C.l=Date.now()/1e3-n.Be})),T(f)}}))}(i,e,t))})),r.set(this.Le,(function(e,t){var n=function(e,t,n){var i,r,a,o,s,u,l;return _((function(c){return 1==c.g?(i=De,r=Date.now()/1e3,a=!0,e.A=lu(e,{Qb:e.H,onError:function(t){Du(e,t)},pd:function(t){ju(e,t)},onExpirationUpdated:function(t,n){Bu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==tl&&a&&(a=!1,e.C.j=Date.now()/1e3-r)}}),e.A.configure(e.h.drm),o=n.uri||"",s=br(o),"application/x-mpegurl"==(u=Nl[s])&&yn()&&(u="application/vnd.apple.mpegurl"),u||(u="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n.mimeType?n.mimeType.split(";")[0]:u,codecs:n.mimeType?on(n.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:i.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.A.X=!0,E(c,Xi(e.A,[l],[]),2)):E(c,e.A.yc(t.I),0)}))}(i,e,t);return Ei(n)})),r.set(this.Za,(function(e,t){return function(e,t,n){function i(){return Su(e)}t.uri=n.uri,t.startTime=n.startTime,e.jb=t.uri,e.G=new No(t.I),null!=t.startTime&&e.G.A(t.startTime),e.J=new Fo({hd:function(){return t.I.playbackRate},ed:function(){return t.I.defaultPlaybackRate},we:function(e){t.I.playbackRate=e},pf:function(e){t.I.currentTime+=e}}),cu(e,e.h.streaming.rebufferingGoal),e.m.o(t.I,"playing",i),e.m.o(t.I,"pause",i),e.m.o(t.I,"ended",i),e.m.o(t.I,"ratechange",(function(){return wu(e)})),"none"!=e.g.preload&&e.m.Ia(e.g,"loadedmetadata",(function(){e.C.l=Date.now()/1e3-n.Be})),e.g.audioTracks&&(e.m.o(e.g.audioTracks,"addtrack",(function(){return Lu(e)})),e.m.o(e.g.audioTracks,"removetrack",(function(){return Lu(e)})),e.m.o(e.g.audioTracks,"change",(function(){return Lu(e)}))),e.g.textTracks&&(e.m.o(e.g.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){"metadata"==t.kind&&(t.mode="hidden",e.m.o(t,"cuechange",(function(){if(t.activeCues)for(var n=l(t.activeCues),i=n.next();!i.done;i=n.next())i=i.value,su(e,i.startTime,i.endTime,i.type,i.value),e.F&&e.F.onCueMetadataChange(i.value)})),new pn((function(){for(var t=function(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Aa().R(.5))}(e,t);break;case"chapters":uu(e,t);break;default:Lu(e)}})),e.m.o(e.g.textTracks,"removetrack",(function(){return Lu(e)})),e.m.o(e.g.textTracks,"change",(function(){return Lu(e)})));var r=br(t.uri);t.I.src=function(e,t,n){try{if(!e.g.enabled)return t;var i=Rs(e);e:{switch(n){case"video/webm":case"video/mp4":var r=Bs;break e;case"application/x-mpegurl":r=Os;break e}r=void 0}return i.ot=r,i.su=!0,Ds(t,Ps(i))}catch(e){return X("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.W,t.uri,Nl[r]),(vn()||En("Web0S"))&&t.I.load(),e.l=Il,e.dispatchEvent(ru(fl));var a=new Ot;Ao(e.g,HTMLMediaElement.HAVE_METADATA,e.m,(function(){a.resolve()}));var o=!1;return e.Zd.push((function(){o=!0})),Ao(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,(function(){return _((function(t){return 1==t.g?o?t.return():(function(e){var t=e.h.preferredAudioLanguage;if(""!=t){e.vd(t);var n=e.h.preferredVariantRole;""!=n&&e.vd(t,n)}}(e),fu(e).find((function(e){return"disabled"!=e.mode}))?t.D(2):E(t,new Promise((function(t){e.m.Ia(e.g.textTracks,"change",t),new pn(t).R(1)})),2)):o?t.return():(function(e){var t=e.h.preferredTextLanguage,n=e.h.preferForcedSubs;if(""!=t){e.oe(t,"",n);var i=e.h.preferredTextRole;""!=i&&e.oe(t,i,n)}}(e),void T(t))}))})),e.g.error?a.reject(Uu(e)):"none"==e.g.preload&&(q('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.'),a.resolve()),e.m.Ia(e.g,"error",(function(){a.reject(Uu(e))})),new mi(a,(function(){return a.reject(new Ee(2,7,7001)),Promise.resolve()}))}(i,e,t)})),this.wa=new ps(this.S,{og:function(e,t,n,r){var a=null;return e==i.S&&(a=n==i.S?i.S:i.X),e==i.X&&(a=n==i.S||t.I!=r.I?i.S:n==i.X?i.X:n==i.Oa||n==i.$?i.Oa:n==i.Za?i.Le:null),e==i.Oa&&(a=n==i.$&&t.I==r.I?i.Je:i.aa),e==i.Je&&(a=Xu(i.$,i.ge,i.aa,n,t,r)),e==i.ge&&(a=Xu(i.$,i.be,i.aa,n,t,r)),e==i.be&&(a=Xu(i.$,i.$,i.aa,n,t,r)),e==i.Le&&(a=n==i.Za&&t.I==r.I?i.Za:i.aa),e!=i.$&&e!=i.Za||(a=i.aa),e==i.aa&&(a=r.I&&t.I==r.I?i.X:i.S),a}
2,Sf:function(e,t,n){return i.dispatchEvent(ru(cl,(new Map).set("state",e.name))),r.get(e)(t,n)},handleError:function(e){return _((function(t){return 1==t.g?E(t,ou(i,e),2):t.return(e.I?i.X:i.S)}))},Lg:function(e){i.dispatchEvent(ru(dl,(new Map).set("state",e.name)))}}),t&&this.yc(t,!0)}function ru(e,t){return new K(e,t)}function au(){if(e.Promise||q("A Promise implementation or polyfill is required"),e.TextDecoder&&e.TextEncoder||q("A TextDecoder/TextEncoder implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&e.TextDecoder&&e.TextEncoder&&Array.prototype.forEach)||En("Trident/"))return!1;var t=bn();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!gn()||mn("application/x-mpegurl"))}function ou(e,t){var n,i,r,a,o,s,u,c,d;return _((function(h){switch(h.g){case 1:return e.l!=wl&&(e.l=Sl),n=e.Zd.map((function(e){return e()})),e.Zd=[],E(h,Promise.all(n),2);case 2:if(e.dispatchEvent(ru(El)),t.mimeType=null,t.startTime=null,t.uri=null,t.I&&(e.m.La(t.I,"loadedmetadata"),e.m.La(t.I,"playing"),e.m.La(t.I,"pause"),e.m.La(t.I,"ended"),e.m.La(t.I,"ratechange")),e.Ya&&(e.Ya.release(),e.Ya=null),e.cd&&(e.cd.stop(),e.cd=null),!e.K){h.D(3);break}return E(h,e.K.stop(),4);case 4:e.K=null,e.kd=null;case 3:if(!e.B){h.D(5);break}return E(h,e.B.stop(),5);case 5:if(!e.j){h.D(7);break}return E(h,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.J&&(e.J.release(),e.J=null),e.G&&(e.G.release(),e.G=null),!e.N){h.D(9);break}return E(h,e.N.destroy(),10);case 10:e.N=null;case 9:if(e.F&&e.F.onAssetUnload(),!t.I||!t.I.src){h.D(11);break}return E(h,new Promise((function(e){return new pn(e).R(.1)})),12);case 12:for(t.I.removeAttribute("src"),t.I.load();t.I.lastChild;)t.I.removeChild(t.I.firstChild);case 11:if(!e.A){h.D(13);break}
2return E(h,e.A.destroy(),14);case 14:e.A=null;case 13:if(e.jb=null,e.M=null,e.i){for(i=l(e.i.variants),r=i.next();!r.done;r=i.next())for(a=r.value,o=l([a.audio,a.video]),s=o.next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(e.i.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}e.i=null,e.C=new nu,e.fe=null,Au(e),T(h)}}))}function su(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(ru(ll,t))}function uu(e,t){t&&"chapters"==t.kind&&(t.mode="hidden",new pn((function(){for(var t=pu(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Aa().R(.5))}function lu(e,t){return new qi(t,e.h.drm.updateExpirationTime)}function cu(e,t){e.M=new ci,e.M.g=hi,di(e.M,t,Math.min(.5,t/2)),Au(e),e.cd=new pn((function(){du(e)})).ka(.25)}function du(e){switch(e.l){case Il:if(e.g.ended)var t=!0;else{var n=qa(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case xl:e:if(e.g.ended||Qa(e.N))t=!0;else{if(e.i.presentationTimeline.T()){n=e.i.presentationTimeline.Kb();var i=qa(e.g.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Wa(e.g.buffered,e.g.currentTime);var r=t,a=(n=e.M).h.get(n.g);t=n.g,i=r||i>=a?fi:hi,n.g=i,t!=i&&Au(e)}function hu(e){if(e.K){var t=Ai(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.K.configure(t)}if(e.A&&e.A.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{Tu(e,e.i)}catch(t){Du(e,t)}e.B&&xu(e),!(t=e.j.l)||t.allowedByApplication&&t.allowedByKeySystem||Iu(e)}if(e.H&&e.H.ue(e.h.streaming.forceHTTPS),e.N&&(t=e.h.textDisplayFactory,e.fe!=t)){var n=Me(t),i=e.N,r=i.l;i.l=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.g&&(i.g.i=n),e.fe=t,e.j&&((n=(t=e.j).i.get(Pe))&&ns(t,n.stream,!0,0,!0))}e.B&&(e.B.configure(e.h.abr),e.h.abr.enabled?e.B.enable():e.B.disable(),Pu(e)),e.M&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),di(e.M,t,Math.min(.5,t/2))),e.i&&Fu(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd)}function fu(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function pu(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function gu(e,t){var n,i;return _((function(r){switch(r.g){case 1:return n=br(t),(i=Rl[n])?r.return(i):(A(r,2),E(r,yr(t,e.H,e.h.streaming.retryParameters),4));case 4:i=r.h,S(r,3);break;case 2:x(r);case 3:if(i)return r.return(i);throw new Ee(1,2,2011,n)}}))}function mu(e,t,n,i,r,a,o){var s,u,l,c;return _((function(d){if(1==d.g)return"text/vtt"!=r||o.length?E(d,vu(e,t,e.H,e.h.streaming.retryParameters),3):d.D(2);2!=d.g&&(s=d.h,u=yu(e,s,r,o),l=new Blob([u],{type:"text/vtt"}),t=co(l),r="text/vtt"),(c=document.createElement("track")).src=Ns(e.W,t),c.label=a,c.kind=i,c.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(c),T(d)}))}function vu(e,t,n,i){var r,a,o;return _((function(s){if(1==s.g){r=Ri,(a=Ci([t],i)).method="GET";var u=e.W;try{u.g.enabled&&_s(u,a,{ot:Gs,su:!0})}catch(e){X("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return E(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)}))}function yu(e,t,n,i){var r=hn[n];if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration},t=Lt(t),function(e,t){function n(e){for(var n=e,i=l(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(i=Math.floor(n/60%60))?"0":"")+i+":"+(10>(r=Math.floor(n%60))?"0":"")+r+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}function i(e){var t=[],n=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return n&&t.push("b"),r&&t.push("i"),a&&t.push("u"),n=t.reduce((function(e,t){return e+"<"+t+">"}),""),t=t.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&Ae("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(i).join(""):n+e.payload+t}for(var r=e.map((function(e){if(e.nestedCues.length){var t=e.clone();return t.nestedCues=[],t.payload=i(e),t}return e})),a="WEBVTT\n\n",o=(r=l(r)).next();!o.done;o=r.next())a+=n((o=o.value).startTime)+" --\x3e "+n(o.endTime)+function(e){var t=[];
2switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case lt: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(" "):""}(o)+"\n",a+=o.payload+"\n\n";return a}(t=n.parseMedia(t,e),i);throw new Ee(2,2,2014,n)}function bu(e){var t=Ys();return t.streaming.failureCallback=function(t){e.T()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.ke())},t.textDisplayFactory=function(){return e.Hb?new Ss(e.g,e.Hb):new vs(e.g)},t}function Eu(e,t){return _((function(n){if(1==n.g)return E(n,function(e,t){return _((function(n){if(1==n.g)return E(n,Cn(e.j?e.j.l:null,t),2);Ku(t),T(n)}))}(e,t),2);Tu(e,t),T(n)}))}function Tu(e,t){if(e.l!=wl){for(var n=e.h.restrictions,i=e.le,r=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=kn(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.j&&Lu(e),(n=e.A?e.A.g:null)&&e.A.B)for(r=(i=l(t.variants)
2).next();!r.done;r=i.next())for(a=(r=l(((r=r.value).video?r.video.drmInfos:[]).concat(r.audio?r.audio.drmInfos:[]))).next();!a.done;a=r.next())if((a=a.value).keySystem==n.keySystem)for(o=(a=l(a.initData||[])).next();!o.done;o=a.next())o=o.value,Qi(e.A,o.initDataType,o.initData);Gu(e,t)}}function Au(e){var t=e.Ic();if(e.C&&e.M&&e.G){var n=e.J;n.j=t,Go(n),e.W&&(n=e.W,t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t),Su(e)}t=(new Map).set("buffering",t),e.dispatchEvent(ru(Qu,t))}function wu(e){var t=e.g.playbackRate;0!=t&&(e.J&&e.J.set(t),t=ru(hl),e.dispatchEvent(t))}function Su(e){if(e.C&&e.M){var t=e.C.g;e.M.g==hi?Qs(t,"buffering"):e.g.paused?Qs(t,"paused"):e.g.ended?Qs(t,"ended"):Qs(t,"playing")}}function xu(e){try{Gu(e,e.i)}catch(t){return Du(e,t),!1}var t=e.i.variants.filter((function(e){return Vn(e)}));return t=e.Ma.create(t),e.B.setVariants(Array.from(t.values())),!0}function Iu(e){var t;(t=xu(e)?e.B.chooseVariant():null)&&ku(e,t,!0,!0,0)}function ku(e,t,n,i,r){var a=e.j.l;if(t==a)i&&es(e.j,t,i,r,!0);else{var o=e.C.h;o.h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),es(e.j,t,i,r),i=null,a&&(i=On(a)),t=On(t),n?Mu(e,i,t):Nu(e,i,t)}}function Cu(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),Nu(e,n=Gn(n),Gn(t))}function Mu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),Vu(e,t=ru($u,t))}function Lu(e){Vu(e,ru(bl))}function Nu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),Vu(e,t=ru(Tl,t))}function Ru(e){Vu(e,ru(pl))}function _u(e){Vu(e,ru(gl))}function Pu(e){var t=(new Map).set("newStatus",e.h.abr.enabled);Vu(e,ru(Ju,t))}function Du(e,t){if(e.l!=wl){var n=ru(il,(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function Ou(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(ru(t,n))}function Uu(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new Ee(2,3,3016,t,n,e.g.error.message)}function ju(e,t){if(e.j){var n=Object.keys(t),i=1==n.length&&"00"==n[0],r=!1;if(n.length)for(var a=(n=l(e.i.variants)).next();!a.done;a=n.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0;for(var c=(u=l(u.keyIds)).next();!c.done;c=u.next())c=c.value,c=t[i?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Cl.includes(c)}s!=a.allowedByKeySystem&&(r=!0)}}r&&xu(e),(i=e.j.l)&&!i.allowedByKeySystem&&Iu(e),r&&Lu(e)}}function Bu(e,t,n){e.K&&e.K.onExpirationUpdated&&e.K.onExpirationUpdated(t,n),t=ru(rl),e.dispatchEvent(t)}function Fu(e,t,n){0<t&&(e.T()||e.Af(t)),n<(t=e.getDuration())&&(e.T()||e.eb(n))}function Gu(e,t){var n=e.A?e.A.fd():{},i=Object.keys(n);i=i.length&&"00"==i[0];for(var r=!1,a=!1,o=new Set,s=new Set,u=l(t.variants),c=u.next();!c.done;c=u.next()){var d=[];(c=c.value).audio&&d.push(c.audio),c.video&&d.push(c.video);for(var h=(d=l(d)).next();!h.done;h=d.next())if((h=h.value).keyIds.size)for(var f=(h=l(h.keyIds)).next();!f.done;f=h.next()){f=f.value;var p=n[i?"00":f];p?Cl.includes(p)&&s.add(p):o.add(f)}c.allowedByApplication?c.allowedByKeySystem&&(r=!0):a=!0}if(!r)throw new Ee(2,4,4012,n={hasAppRestrictions:a,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)})}function Ku(e){if(!e.variants.some(Vn))throw new Ee(2,4,4032)}function Vu(e,t){_((function(n){if(1==n.g)return E(n,Promise.resolve(),2);e.l!=wl&&e.dispatchEvent(t),T(n)}))}function zu(e){for(var t=new Set,n=(e=l(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(Ge(n.language)):t.add("und");return t}function Hu(e){for(var t=new Map,n=new Map,i=(e=l(e)).next();!i.done;i=e.next()){var r="und",a=[];(i=i.value).language&&(r=Ge(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set);for(var o=(a=l(a)).next();!o.done;o=a.next())o=o.value,t.get(r).add(o),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(o,i.label))}var s=[];return t.forEach((function(e,t){for(var i=l(e),r=i.next();!r.done;r=i.next()){r=r.value;var a=null;n.has(t)&&n.get(t).has(r)&&(a=n.get(t).get(r)),s.push({language:t,role:r,label:a})}})),s}function qu(){return new Ee(2,7,7e3)}
2function Xu(e,t,n,i,r,a){return i==e&&r.I==a.I&&r.uri==a.uri&&r.mimeType==a.mimeType?t:n}function Wu(){return{I:null,mimeType:null,startTime:null,Be:NaN,uri:null}}function Yu(e){return new Promise((function(t,n){e.Rb=function(){return n(qu())},e.od=function(){return t()},e.onError=function(e){return n(e)},e.qd=function(){return n(qu())}}))}G("shaka.util.CmcdManager.StreamingFormat",{yh:"d",Nh:"h",ri:"s",ai:"o"}),G("shaka.util.ConfigUtils",Hs),Hs.convertToConfigObject=Xs,Hs.mergeConfigObjects=qs,G("shaka.util.PlayerConfiguration",Ws),Ws.mergeConfigObjects=Js,m(iu,ee),(i=iu.prototype).destroy=function(){var e,t=this;return _((function(n){switch(n.g){case 1:return t.l==wl?n.return():(t.l=wl,e=gs(t.wa,(function(){return{node:t.S,payload:Wu(),Lb:!1}})),E(n,new Promise((function(t){e.lc=function(){},e.od=function(){t()},e.Rb=function(){t()},e.onError=function(){t()},e.qd=function(){t()}})),2));case 2:return E(n,t.wa.destroy(),3);case 3:if(t.m&&(t.m.release(),t.m=null),t.Wd=null,t.B=null,t.h=null,t.C=null,t.Hb=null,t.W=null,!t.H){n.D(4);break}return E(n,t.H.destroy(),5);case 5:t.H=null;case 4:ee.prototype.release.call(t),T(n)}}))},i.yc=function(e,t){if(t=void 0===t||t,this.l==wl)return Promise.reject(qu());var n=Wu();n.I=e,gn()||(t=!1);var i=t?this.Oa:this.X,r=gs(this.wa,(function(){return{node:i,payload:n,Lb:!1}}));return r.lc=function(){},Yu(r)},i.detach=function(){var e=this;if(this.l==wl)return Promise.reject(qu());var t=gs(this.wa,(function(){return{node:e.S,payload:Wu(),Lb:!1}}));return t.lc=function(){},Yu(t)},i.He=function(e){var t=this;if(e=void 0===e||e,this.l==wl)return Promise.reject(qu());gn()||(e=!1);var n=Wu(),i=gs(this.wa,(function(i){var r=i.I&&e?t.Oa:i.I?t.X:t.S;return n.I=i.I,{node:r,payload:n,Lb:!1}}));return i.lc=function(){},Yu(i)},i.mh=function(e){this.mb=e},i.load=function(e,t,n){var i=this;if(this.mb=null,this.l==wl)return Promise.reject(qu());this.dispatchEvent(ru(ol));var r=Wu();r.uri=e,r.Be=Date.now()/1e3,n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var a=function(e,t){if(!gn())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n=br(i),n=Nl[n]),n){if(""==(t.I||Tn()).canPlayType(n))return!1;if(!gn()||!(n in Er)&&!(br(i)in Tr)||e.h.streaming.preferNativeHls)return!0;if(yn())return e.h.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.Za:this.$,o=gs(this.wa,(function(e){return null==e.I?null:(r.I=e.I,{node:a,payload:r,Lb:!0})}));return this.C=new nu,this.W=function(e){return new Ms({getBandwidthEstimate:function(){return e.B?e.B.getBandwidthEstimate():NaN},Bb:function(){return e.Bb()},cg:function(){return e.g?e.g.currentTime:0},ab:function(){return e.ab()},Cb:function(){return e.Cb()},T:function(){return e.T()}},e.h.cmcd)}(this),o.lc=function(){},new Promise((function(e,t){o.qd=function(){return t(new Ee(2,7,7002))},o.od=function(){e(),i.dispatchEvent(ru(al))},o.Rb=function(){return t(qu())},o.onError=function(e){return t(e)}}))},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Xs(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Ae("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01));var n=Js(this.h,e,bu(this));return hu(this),n},i.getConfiguration=function(){var e=bu(this);return Js(e,this.h,bu(this)),e},i.Vf=function(){if(this.g){var e=this.g.buffered.length;e=e?this.g.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.g.currentTime+t,this.Ga().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},i.Yg=function(){for(var e in this.h)delete this.h[e];Js(this.h,bu(this),bu(this)),hu(this)},i.df=function(){return this.l},i.ng=function(){return this.g},i.Dc=function(){return this.H},i.Pd=function(){return this.jb},i.dd=function(){return this.F?this.F:null},i.T=function(){return this.i?this.i.presentationTimeline.T():!(!this.g||!this.g.src)&&1/0==this.g.duration},i.Nb=function(){return!!this.i&&this.i.presentationTimeline.Nb()},i.jf=function(){if(this.i){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},i.Ga=function(){if(this.i){var e=this.i.presentationTimeline;return{start:e.ec(),end:e.pb()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},i.Bg=function(){this.T()&&(this.g.currentTime=this.Ga().end)},i.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},i.drmInfo=function(){return this.A?this.A.g:null},i.Cc=function(){return this.A?this.A.Cc():1/0},i.fd=function(){return this.A?this.A.fd():{}}
2,i.Ic=function(){return!!this.M&&this.M.g==hi},i.Cb=function(){return this.g?this.J?this.J.i:1:0},i.Fe=function(e){0==e?q("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(e),this.l==xl&&(this.B.playbackRateChanged(e),Zo(this.j,1<Math.abs(e))))},i.Pe=function(){var e=this.J.ed();this.l==Il&&this.J.set(e),this.l==xl&&(this.J.set(e),this.B.playbackRateChanged(e),Zo(this.j,!1))},i.ab=function(){if(this.i){for(var e=this.j?this.j.l:null,t=[],n=0,i=l(this.i.variants),r=i.next();!r.done;r=i.next())if(Vn(r=r.value)){var a=On(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map((function(e){return Gn(e)})):[]},i.rb=function(){if(this.i){for(var e=this.j?this.j.A:null,t=[],n=l(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=Un(i=i.value);r.active=i==e,t.push(r)}return t}return this.g&&this.g.src&&this.g.textTracks?fu(this).map((function(e){return Fn(e)})):[]},i.fg=function(){return this.i?this.i.imageStreams.map((function(e){return jn(e)})):[]},i.xg=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p,g,m,v,y,b,T=this;
2return _((function(A){return 1==A.g?T.i?(n=T.i.imageStreams.find((function(t){return t.id==e})))?n.segmentIndex?A.D(3):E(A,n.createSegmentIndex(),3):A.return(null):A.D(2):2!=A.g?null==(i=n.segmentIndex.find(t))?A.return(null):(r=n.segmentIndex.get(i),a=r.tilesLayout||n.tilesLayout,(o=/(\d+)x(\d+)/.exec(a))?(s=n.width||0,u=n.height||0,l=parseInt(o[1],10),c=parseInt(o[2],10),d=s/l,h=u/c,f=l*c,p=r.l-r.startTime,g=r.i||p/f,m=r.startTime,y=v=0,1<f&&(b=Math.floor((t-r.startTime)/g),m=r.startTime+b*g,v=b%l*d,y=Math.floor(b/l)*h),A.return({imageHeight:u,imageWidth:s,height:h,positionX:v,positionY:y,startTime:m,duration:g,uris:r.Ra(),width:d})):A.return(null)):A.return(null)}))},i.pe=function(e){if(this.i&&this.j){var t=this.i.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.j.A&&(tu(this.C.h,t,!1),ts(this.j,t),Ru(this),this.Na=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=l(t=fu(this))).next();!n.done;n=t.next())Bn(n=n.value)==e.id?n.mode=this.ea?"showing":"hidden":n.mode="disabled";Ru(this)}},i.qe=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.h.abr.enabled&&q("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=this.i.variants.find((function(t){return t.id==e.id}));i&&Vn(i)&&(ku(this,i,!1,t,n),this.Ma=new ui(i),xu(this))}else if(this.g&&this.g.audioTracks)for(n=(t=l(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(Bn(n=n.value)==e.id){Cu(this,n);break}},i.Uf=function(){return Hu(this.ab())},i.wg=function(){return Hu(this.rb())},i.Tf=function(){return Array.from(zu(this.ab()))},i.vg=function(){return Array.from(zu(this.rb()))},i.vd=function(e,t){if(this.i&&this.G){this.Ma=new li(e,t||"",0,"");for(var n=function(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},i=this.j.l,r=this.Ma.create(this.i.variants),a=null,o=(r=l(r.values())
2).next();!o.done;o=r.next())o=o.value,(!a||n(a,i)>n(o,i))&&(a=o);a?(n=On(a),this.qe(n,!0)):Iu(this)}else if(this.g&&this.g.audioTracks){for(r=Array.from(this.g.audioTracks),n=Ge(e),a=i=null,o=(r=l(r)).next();!o.done;o=r.next()){var s=Gn(o=o.value);Ge(s.language)==n&&(i=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?Cu(this,a):i&&Cu(this,i)}},i.oe=function(e,t,n){if(n=void 0!==n&&n,this.i&&this.G)this.Na=e,this.hb=t||"",this.kb=n,(e=Hn(this.i.textStreams,this.Na,this.hb,this.kb)[0]||null)&&e!=this.j.A&&(tu(this.C.h,e,!1),this.h.streaming.alwaysStreamText||this.Pb())&&(ts(this.j,e),Ru(this));else{var i=Ge(e);(e=this.rb().find((function(e){return Ge(e.language)==i&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.pe(e)}},i.ah=function(e){if(this.i&&this.G){for(var t=null,n=l(this.i.variants),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){t=i;break}null!=t&&(this.Ma=new li(t.language,"",0,e),Iu(this))}},i.Pb=function(){var e=this.ea;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?fu(this).some((function(e){return"showing"==e.mode})):e},i.bf=function(){return this.g&&this.g.src&&this.g.textTracks?pu(this).map((function(e){return Fn(e)})):[]},i.Xf=function(e){var t=Ge(e),n=pu(this).filter((function(e){return Ge(e.language)==t}));if(!n||!n.length)return[];e=[];for(var i=(n=l(n)).next();!i.done;i=n.next())if((i=i.value)&&i.cues)for(var r=(i=l(i.cues)).next();!r.done;r=i.next())r=r.value,e.push({title:r.text,startTime:r.startTime,endTime:r.endTime});return e},i.ze=function(e){if(e=!!e,this.ea!=e){if(this.ea=e,this.l==xl)this.N.l.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.A||0<(e=Hn(this.i.textStreams,this.Na,this.hb,this.kb)).length&&(ts(this.j,e[0]),Ru(this)):function(e){var t=e.i.get(Pe);t&&(ds(t),hs(t).catch((function(){})),e.i.delete(Pe)),e.A=null}(this.j));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=fu(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");_u(this)}},i.pg=function(){if(!this.T())return null;var e=this.wa.l,t=0;if(this.G)t=this.G.m();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.j+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},i.ef=function(){if(!this.T())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},i.Bb=function(){if(this.l==xl)return this.N.Bb();var e={total:[],audio:[],video:[],text:[]};return this.l==Il&&(e.total=Ya(this.g.buffered)),e},i.getStats=function(){if(this.l!=xl&&this.l!=Il)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Su(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.C;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),n=this.C,t=Number(e.totalVideoFrames),n.M=Number(e.droppedVideoFrames),n.K=t,this.C.J=Number(e.corruptedVideoFrames)),this.A?e=(e=this.A).K?e.K:NaN:e=NaN,this.C.m=e,this.l==xl&&((e=this.j.l)&&(this.C.B=(this.J?this.J.i:1)*e.bandwidth),e&&e.video&&(n=this.C,t=e.video.height||NaN,n.N=e.video.width||NaN,n.C=t),this.T()&&(e=this.ef().valueOf()+1e3*this.Ga().end,this.C.F=(Date.now()-e)/1e3),this.i&&this.i.presentationTimeline&&(this.C.H=this.i.presentationTimeline.g),e=this.B.getBandwidthEstimate(),this.C.A=e);var i=this.C;e=i.N,n=i.C,t=i.B;for(var r=i.K,a=i.M,o=i.J,s=i.A,u=i.i,c=i.l,d=i.G,h=i.j,f=Zs(i.g,"playing"),p=Zs(i.g,"paused"),g=Zs(i.g,"buffering"),m=i.m,v=i.F,y=i.H,b=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=l(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(i.g),E=[],T=(i=l(i.h.g)).next();!T.done;T=i.next())T=T.value,E.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,completionPercent:u,loadLatency:c,manifestTimeSeconds:d,drmTimeSeconds:h,playTime:f,pauseTime:p,bufferingTime:g,licenseTime:m,liveLatency:v,maxSegmentDuration:y,stateHistory:b,switchHistory:E}},i.addTextTrack=function(e,t,n,i,r,a,o){if(o=void 0!==o&&o,Ae("addTextTrack","Please use an addTextTrackAsync."),this.l!=xl&&this.l!=Il)throw new Ee(1,7,7004);if(!i){var s=br(e);if(!(i=Rl[s]))throw new Ee(1,2,2011,s)}if(this.l==Il){if("text/vtt"!=i)throw new Ee(1,2,2013,i);if(o&&(n="forced"),(i=document.createElement("track")).src=Ns(this.W,e),i.label=a||"",i.kind=n,i.srclang=t,this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous"),this.g.appendChild(i),e=this.rb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Lu(this),e;throw new Ee(1,2,2012)}if(1/0==(s=this.i.presentationTimeline.getDuration()))throw new Ee(1,4,4033);if(!un(nn((e={id:this.Ge++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Uo(0,s,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:Pe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}).mimeType,e.codecs)))throw new Ee(2,2,2014,i);return this.i.textStreams.push(e),Lu(this),Un(e)},i.Kf=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,f,p,g,m,v=this;return _((function(y){switch(y.g){case 1:if(v.l!=xl&&v.l!=Il)throw new Ee(1,7,7004);if(i){y.D(2);break}return E(y,gu(v,e),3);case 3:i=y.h;case 2:if(s=[],v.F)try{s=v.F.getServerSideCuePoints()}catch(e){}if(v.l!=Il){y.D(4);break}return o&&(n="forced"),E(y,mu(v,e,t,n,i,a||"",s),5);case 5:if(u=v.rb(),l=u.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Lu(v),y.return(l);throw new Ee(1,2,2012);case 4:if(c=De,1/0==(d=v.i.presentationTimeline.getDuration()))throw new Ee(1,4,4033);if(!s.length){y.D(6);break}return E(y,vu(v,e,v.H,v.h.streaming.retryParameters),7);case 7:h=y.h,f=yu(v,h,i,s),p=new Blob([f],{type:"text/vtt"}),e=co(p),i="text/vtt";case 6:if(g={id:v.Ge++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Uo(0,d,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:c.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},m=nn(g.mimeType,g.codecs),!un(m))throw new Ee(2,2,2014,i);return v.i.textStreams.push(g),Lu(v),y.return(Un(g))}}))},i.Jf=function(e,t,n){var i,r,a,o,s,u,c,d=this;return _((function(h){switch(h.g){case 1:if(d.l!=xl&&d.l!=Il)throw new Ee(1,7,7004);if(n){h.D(2);break}return E(h,gu(d,e),3);case 3:n=h.h;case 2:if(i=[],d.F)try{i=d.F.getServerSideCuePoints()}catch(e){}return E(h,mu(d,e,t,"chapters",n,"",i),4);case 4:if(r=d.bf(),a=r.find((function(e){return e.language==t}
2))){for(o=pu(d),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,uu(d,c);return h.return(a)}throw new Ee(1,2,2012)}}))},i.ve=function(e,t){this.le.width=e,this.le.height=t},i.ke=function(){if(this.l==xl){var e=this.j;if(e.j.g)e=!1;else if(e.B)e=!1;else{for(var t=l(e.i.values()),n=t.next();!n.done;n=t.next())(n=n.value).Gc&&(n.Gc=!1,cs(e,n,.1));e=!0}}else e=!1;return e},i.kg=function(){return q("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},i.lg=function(){return this.kd},i.Ae=function(e){this.Hb=e},G("shaka.Player",iu),iu.prototype.setVideoContainer=iu.prototype.Ae,iu.prototype.getManifestParserFactory=iu.prototype.lg,iu.prototype.getManifest=iu.prototype.kg,iu.prototype.retryStreaming=iu.prototype.ke,iu.prototype.setMaxHardwareResolution=iu.prototype.ve,iu.prototype.addChaptersTrack=iu.prototype.Jf,iu.prototype.addTextTrackAsync=iu.prototype.Kf,iu.prototype.addTextTrack=iu.prototype.addTextTrack,iu.prototype.getStats=iu.prototype.getStats,iu.prototype.getBufferedInfo=iu.prototype.Bb,iu.prototype.getPresentationStartTimeAsDate=iu.prototype.ef,iu.prototype.getPlayheadTimeAsDate=iu.prototype.pg,iu.prototype.setTextTrackVisibility=iu.prototype.ze,iu.prototype.getChapters=iu.prototype.Xf,iu.prototype.getChaptersTracks=iu.prototype.bf,iu.prototype.isTextTrackVisible=iu.prototype.Pb,iu.prototype.selectVariantsByLabel=iu.prototype.ah,iu.prototype.selectTextLanguage=iu.prototype.oe,iu.prototype.selectAudioLanguage=iu.prototype.vd,iu.prototype.getTextLanguages=iu.prototype.vg,iu.prototype.getAudioLanguages=iu.prototype.Tf,iu.prototype.getTextLanguagesAndRoles=iu.prototype.wg,iu.prototype.getAudioLanguagesAndRoles=iu.prototype.Uf,iu.prototype.selectVariantTrack=iu.prototype.qe,iu.prototype.selectTextTrack=iu.prototype.pe,iu.prototype.getThumbnails=iu.prototype.xg,iu.prototype.getImageTracks=iu.prototype.fg,iu.prototype.getTextTracks=iu.prototype.rb,iu.prototype.getVariantTracks=iu.prototype.ab,iu.prototype.cancelTrickPlay=iu.prototype.Pe,iu.prototype.trickPlay=iu.prototype.Fe,iu.prototype.getPlaybackRate=iu.prototype.Cb,iu.prototype.isBuffering=iu.prototype.Ic,iu.prototype.getKeyStatuses=iu.prototype.fd,iu.prototype.getExpiration=iu.prototype.Cc,iu.prototype.drmInfo=iu.prototype.drmInfo,iu.prototype.keySystem=iu.prototype.keySystem,iu.prototype.goToLive=iu.prototype.Bg,iu.prototype.seekRange=iu.prototype.Ga,iu.prototype.isAudioOnly=iu.prototype.jf,iu.prototype.isInProgress=iu.prototype.Nb,iu.prototype.isLive=iu.prototype.T,iu.prototype.getAdManager=iu.prototype.dd,iu.prototype.getAssetUri=iu.prototype.Pd,iu.prototype.getNetworkingEngine=iu.prototype.Dc,iu.prototype.getMediaElement=iu.prototype.ng,iu.prototype.getLoadMode=iu.prototype.df,iu.prototype.resetConfiguration=iu.prototype.Yg,iu.prototype.getBufferFullness=iu.prototype.Vf,iu.prototype.getConfiguration=iu.prototype.getConfiguration,iu.prototype.configure=iu.prototype.configure,iu.prototype.load=iu.prototype.load,iu.prototype.updateStartTime=iu.prototype.mh,iu.prototype.unload=iu.prototype.He,iu.prototype.detach=iu.prototype.detach,iu.prototype.attach=iu.prototype.yc,iu.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,_((function(o){if(1==o.g)return t={},e?E(o,function(){var e,t,n,i,r,a;return _((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],i=new Map,r=function(e){var t,r,a;return _((function(o){switch(o.g){case 1:if(A(o,2),"org.w3.clearkey"===e&&bn())throw Error("Unsupported keySystem");return E(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),En("Tizen 3")&&(a=!1),i.set(e,{persistentState:a}),E(o,t.createMediaKeys(),5);case 5:S(o,0);break;case 2:x(o),i.set(e,null),T(o)}}))},a=e.map((function(e){return r(e)})),E(o,Promise.all(a),2)):o.return(zi(i))}))}(),3):o.D(2);2!=o.g&&(t=o.h);var s={};if(gn()){for(var u in Er)s[u]=!0;for(var d in Tr)s[d]=!0}
2u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var h=(d=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!h.done;h=d.next())s[h=h.value]=gn()?!!Er[h]:mn(h);for(var f in u)s[f]=gn()?!!Tr[f]:mn(u[f]);for(n=s,s={},u=(f=l(f='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(c(fo)))).next();!u.done;u=f.next())s[u=u.value]=gn()?!!un(u)||(MediaSource.isTypeSupported(u)||Zt(u)):mn(u),s[d=u.split(";")[0]]=s[d]||s[u];for(a in i={manifest:n,media:s,drm:t},r=Ml)i[a]=r[a]();return o.return(i)}))},iu.isBrowserSupported=au,iu.setAdManagerFactory=function(e){Ll=e},iu.registerSupportPlugin=function(e,t){Ml[e]=t},iu.prototype.destroy=iu.prototype.destroy;var Ju="abrstatuschanged",$u="adaptation",Qu="buffering",Zu="downloadfailed",el="downloadheadersreceived",tl="drmsessionupdate",nl="emsg",il="error",rl="expirationupdated",al="loaded",ol="loading",sl="manifestparsed",ul="mediaqualitychanged",ll="metadata",cl="onstatechange",dl="onstateidle",hl="ratechange",fl="streaming",pl="textchanged",gl="texttrackvisibility",ml="timelineregionadded",vl="timelineregionenter",yl="timelineregionexit",bl="trackschanged",El="unloading",Tl="variantchanged",Al={sh:Ju,uh:$u,vh:Qu,Ah:Zu,Bh:el,Ch:tl,Jh:nl,Error:il,Kh:rl,Qh:"largegap",Rh:al,Sh:ol,Wh:sl,Xh:ul,Metadata:ll,bi:cl,ci:dl,mi:hl,ti:"sessiondata",wi:fl,xi:pl,zi:gl,Ai:ml,Bi:vl,Ci:yl,Di:bl,Hi:El,Ji:Tl},wl=0,Sl=1,xl=2,Il=3;iu.LoadMode={DESTROYED:wl,NOT_LOADED:Sl,MEDIA_SOURCE:xl,SRC_EQUALS:Il},iu.version="v3.1.6-master-18-gd6bdf9a4";var kl=["3","1"];xe=new function(e){this.g=e,this.i=we,this.h=Se}(new Te(Number(kl[0]),Number(kl[1])));var Cl=["output-restricted","internal-error"],Ml={},Ll=null,Nl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Rl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function _l(){this.h=[],this.j=this.i=this.g=0}function Pl(e,t,n){var i=this;this.h=e,this.g=t,this.m=n,this.i=!1,this.l=this.g.getVolume(),this.j=new Ui,this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,(function(){i.i=!0})),this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,(function(){i.i=!1}))}function Dl(t,n,i,r){var a=this;this.A=t,this.i=n,this.B=null,this.C=NaN,this.j=r,this.m=null,this.h=new Ui,google.ima.settings.setLocale(i),(t=new google.ima.AdDisplayContainer(this.A,this.i)).initialize(),this.l=new google.ima.AdsLoader(t),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v3.1.6-master-18-gd6bdf9a4"),this.g=null,this.h.Ia(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){t.j(new K("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.C))),t.g=n.getAdsManager(t.i),t.j(new K("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var i=t.g.getCuePoints();if(i.length){for(var r=[],a=(i=l(i)).next();!a.done;a=i.next())r.push({start:a.value,end:null});t.j(new K("ad-cue-points-changed",(new Map).set("cuepoints",r)))}!function(e){function t(t,n){var i=(new Map).set("originalEvent",t);e.j(new K(n,i))}e.h.o(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Ol(e,t)})),e.h.o(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){jl(e,t)})),e.h.o(e.g,google.ima.AdEvent.Type.STARTED,(function(t){jl(e,t)})),e.h.o(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.o(e.g,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.o(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.o(e.g,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")}
2)),e.h.o(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Bl(e,t)})),e.h.o(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Bl(e,t)})),e.h.o(e.g,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.o(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.o(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.o(e.g,google.ima.AdEvent.Type.PAUSED,(function(n){e.m.i=!0,t(n,"ad-paused")})),e.h.o(e.g,google.ima.AdEvent.Type.RESUMED,(function(n){e.m.i=!1,t(n,"ad-resumed")})),e.h.o(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(e){t(e,"ad-skip-state-changed")})),e.h.o(e.g,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.o(e.g,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.o(e.g,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.o(e.g,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.o(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.o(e.g,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.o(e.g,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.o(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.o(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.o(e.g,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.o(e.g,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.o(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.o(e.g,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,Ul(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.o(t.i,"loadeddata",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Ul(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e&&(t.B=new ResizeObserver((function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Ul(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.B.observe(t.i)),t.g.start()}catch(e){Bl(t,null)}}(a,t)})),this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Ol(a,e)})),this.i.onended=function(){a.l.contentComplete()}}function Ol(e,t){t.getError(),Bl(e,null),e.j(new K("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Ul(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function jl(e,t){var n=t.getAd();e.m=new Pl(n,e.g,e.i),n=(new Map).set("ad",e.m).set("sdkAdObject",n).set("originalEvent",t),e.j(new K("ad-started",n)),e.m.isLinear()&&(e.A.setAttribute("ad-active","true"),e.i.pause())}function Bl(e,t){e.j(new K("ad-stopped",(new Map).set("originalEvent",t))),e.m.isLinear()&&(e.A.removeAttribute("ad-active"),e.i.play())}function Fl(e,t){this.i=e,this.h=null,this.g=t}function Gl(e,t,n,i){var r=this;this.B=e,this.l=t,this.j=null,this.J=NaN,this.i=i,this.H=!1,this.C=this.m=this.A=null,this.F="",this.G=[],this.h=new Ui,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.B,e),this.i(new K("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.i(new K("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.J)));var n=t.getStreamData().url;e.j.resolve(n),e.j=null,e.H||e.h.o(e.l,"seeked",(function(){var t=e.l.currentTime;if(0!=t){e.g.streamTimeForContentTime(t);var n=e.g.previousCuePointForStreamTime(t);n&&!n.played&&(e.A=t,e.l.currentTime=n.start)}}))}(r,e)})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){r.F.length?r.j.resolve(r.F):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),r.m=new Fl(e,r.l),r.C&&(r.m.h=r.C),r.i(new K("ad-started",(new Map).set("ad",r.m))),r.B.setAttribute("ad-active","true")})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){r.B.removeAttribute("ad-active");var e=r.l.currentTime;r.A&&r.A>e&&(r.l.currentTime=r.A,r.A=null)})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){r.C=e.getStreamData().adProgressData,r.m&&(r.m.h=r.C)})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){r.i(new K("ad-first-quartile"))})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){r.i(new K("ad-mi
2dpoint"))})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){r.i(new K("ad-third-quartile"))})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){r.i(new K("ad-complete")),r.i(new K("ad-stopped")),r.B.removeAttribute("ad-active"),r.m=null})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){r.i(new K("ad-skipped")),r.i(new K("ad-stopped"))})),this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=l(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});r.G=e,r.i(new K("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function Kl(){ee.call(this),this.g=this.i=null,this.h=new _l,this.j=navigator.language}function Vl(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof K){var n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r&&(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=(i=l(Object.getOwnPropertyNames(t))).next();!n.done;n=i.next())r.add(n.value);for(i={},n=(r=l(r)).next();!n.done;n=r.next())i[n=n.value]=t[n];r={__type__:"Error",contents:i}}else if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},i=(n=l(Ya(t))).next();!i.done;i=n.next()){var a=(i=i.value).end;r.start.push(i.start),r.end.push(a)}else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}}))}function zl(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){n=t.contents;var i,r=Error(n.message);for(i in n)r[i]=n[i];n=r}else n=t;return n}))}(i=Pl.prototype).getDuration=function(){return this.h.getDuration()},i.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()},i.getRemainingTime=function(){return this.g.getRemainingTime()},i.isPaused=function(){return this.i},i.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()},i.getTimeUntilSkippable=function(){var e=this.h.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return this.g.getAdSkippableState()},i.skip=function(){return this.g.skip()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.resume()},i.getVolume=function(){return this.g.getVolume()},i.setVolume=function(e){return this.g.setVolume(e)},i.isMuted=function(){return 0==this.g.getVolume()},i.isLinear=function(){return this.h.isLinear()},i.resize=function(e,t){var n=!1,i=this.m;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.g.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},i.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},i.getSequenceLength=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.h.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.h=null},G("shaka.ads.ClientSideAd",Pl),Pl.prototype.release=Pl.prototype.release,Pl.prototype.getPositionInSequence=Pl.prototype.getPositionInSequence,Pl.prototype.getSequenceLength=Pl.prototype.getSequenceLength,Pl.prototype.setMuted=Pl.prototype.setMuted,Pl.prototype.resize=Pl.prototype.resize,Pl.prototype.isLinear=Pl.prototype.isLinear,Pl.prototype.isMuted=Pl.prototype.isMuted,Pl.prototype.setVolume=Pl.prototype.setVolume,Pl.prototype.getVolume=Pl.prototype.getVolume,Pl.prototype.play=Pl.prototype.play,Pl.prototype.pause=Pl.prototype.pause,Pl.prototype.skip=Pl.prototype.skip,Pl.prototype.canSkipNow=Pl.prototype.canSkipNow,Pl.prototype.getTimeUntilSkippable=Pl.prototype.getTimeUntilSkippable,Pl.prototype.isSkippable=Pl.prototype.isSkippable,Pl.prototype.isPaused=Pl.prototype.isPaused,Pl.prototype.getRemainingTime=Pl.prototype.getRemainingTime,Pl.prototype.getMinSuggestedDuration=Pl.prototype.getMinSuggestedDuration,Pl.prototype.getDuration=Pl.prototype.getDuration,Dl.prototype.stop=function(){this.g&&this.g.stop(),this.A&&ws(this.A)},Dl.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy()},(i=Fl.prototype).getDuration=function(){return this.h?this.h.duration:-1},i.getMinSuggestedDuration=function(){return this.getDuration()},i.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},i.isPaused=function(){return this.g.paused},i.isSkippable=function(){return this.i.isSkippable()},i.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},i.skip=function(){this.g.currentTime+=this.getRemainingTime()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.play()},i.getVolume=function(){return this.g.volume},i.setVolume=function(e){this.g.volume=e},i.isMuted=function(){return this.g.muted},i.isLinear=function(){return!0},i.resize=function(){},i.setMuted=function(e){this.g.muted=e},i.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.h=this.i=null},G("shaka.ads.ServerSideAd",Fl),Fl.prototype.release=Fl.prototype.release,Fl.prototype.getPositionInSequence=Fl.prototype.getPositionInSequence,Fl.prototype.getSequenceLength=Fl.prototype.getSequenceLength,Fl.prototype.setMuted=Fl.prototype.setMuted,Fl.prototype.resize=Fl.prototype.resize,Fl.prototype.isLinear=Fl.prototype.isLinear,Fl.prototype.isMuted=Fl.prototype.isMuted,Fl.prototype.setVolume=Fl.prototype.setVolume,Fl.prototype.getVolume=Fl.prototype.getVolume,Fl.prototype.play=Fl.prototype.play,Fl.prototype.pause=Fl.prototype.pause,Fl.prototype.skip=Fl.prototype.skip,Fl.prototype.canSkipNow=Fl.prototype.canSkipNow,Fl.prototype.getTimeUntilSkippable=Fl.prototype.getTimeUntilSkippable,Fl.prototype.isSkippable=Fl.prototype.isSkippable,Fl.prototype.isPaused=Fl.prototype.isPaused,Fl.prototype.getRemainingTime=Fl.prototype.getRemainingTime,Fl.prototype.getMinSuggestedDuration=Fl.prototype.getMinSuggestedDuration,Fl.prototype.getDuration=Fl.prototype.getDuration,Gl.prototype.stop=function(){this.F="",this.A=null,this.G=[]},Gl.prototype.release=function(){this.stop(),this.h&&this.h.release()},Gl.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},m(Kl,ee),(i=Kl.prototype).setLocale=function(e){this.j=e},i.initClientSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new Ee(2,10,1e4);this.i&&this.i.release(),this.i=new Dl(t,n,this.j,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.h.h.push(e.loadTime);break;case"ad-started":i.h.g++;break;case"ad-complete":i.h.i++;break;case"ad-skipped":i.h.j++}i.dispatchEvent(e)}))},i.release=function(){this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),ee.prototype.release.call(this)},i.onAssetUnload=function(){this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new K("ad-stopped")),this.h=new _l},i.requestClientSideAds=function(e){if(!this.i)throw new Ee(1,10,10001);var t=this.i;t.C=Date.now()/1e3,t.l.requestAds(e)},i.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new Ee(2,10,10002);this.g&&this.g.release(),this.g=new Gl(t,n,this.j,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.h.h.push(e.loadTime);break;case"ad-started":i.h.g++;break;case"ad-complete":i.h.i++;break;case"ad-skipped":i.h.j++}i.dispatchEvent(e)}))},i.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new Ee(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;(n.mpt||n.mpv)&&q('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v3.1.6-master-18-gd6bdf9a4";var i=t;return(n=this.g).j?n=Promise.reject(new Ee(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new Ot,n.g.requestStream(e),n.F=i||"",n.J=Date.now()/1e3,n=n.j),n},i.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new Ee(1,10,10003);(e.mpt||e.mpv)&&q('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v3.1.6-master-18-gd6bdf9a4",this.g.g.replaceAdTagParameters(e)},i.getServerSideCuePoints=function(){if(!this.g)throw new Ee(1,10,10003);return this.g.G},i.getStats=function(){var e=this.h;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},i.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(t,n,e.startTime)}},i.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},i.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},G("shaka.ads.AdManager",Kl),Kl.prototype.onCueMetadataChange=Kl.prototype.onCueMetadataChange,Kl.prototype.onHlsTimedMetadata=Kl.prototype.onHlsTimedMetadata,Kl.prototype.onDashTimedMetadata=Kl.prototype.onDashTimedMetadata,Kl.prototype.getStats=Kl.prototype.getStats,Kl.prototype.getServerSideCuePoints=Kl.prototype.getServerSideCuePoints,Kl.prototype.replaceServerSideAdTagParameters=Kl.prototype.replaceServerSideAdTagParameters,Kl.prototype.requestServerSideStream=Kl.prototype.requestServerSideStream,
2Kl.prototype.initServerSide=Kl.prototype.initServerSide,Kl.prototype.requestClientSideAds=Kl.prototype.requestClientSideAds,Kl.prototype.onAssetUnload=Kl.prototype.onAssetUnload,Kl.prototype.release=Kl.prototype.release,Kl.prototype.initClientSide=Kl.prototype.initClientSide,Kl.prototype.setLocale=Kl.prototype.setLocale,Kl.ADS_LOADED="ads-loaded",Kl.AD_STARTED="ad-started",Kl.AD_FIRST_QUARTILE="ad-first-quartile",Kl.AD_MIDPOINT="ad-midpoint",Kl.AD_THIRD_QUARTILE="ad-third-quartile",Kl.AD_COMPLETE="ad-complete",Kl.AD_STOPPED="ad-stopped",Kl.AD_SKIPPED="ad-skipped",Kl.AD_VOLUME_CHANGED="ad-volume-changed",Kl.AD_MUTED="ad-muted",Kl.AD_PAUSED="ad-paused",Kl.AD_RESUMED="ad-resumed",Kl.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Kl.CUEPOINTS_CHANGED="ad-cue-points-changed",Kl.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Kl.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Kl.AD_CLICKED="ad-clicked",Kl.AD_PROGRESS="ad-progress",Kl.AD_BUFFERING="ad-buffering",Kl.AD_IMPRESSION="ad-impression",Kl.AD_DURATION_CHANGED="ad-duration-changed",Kl.AD_CLOSED="ad-closed",Kl.AD_LOADED="ad-loaded",Kl.ALL_ADS_COMPLETED="all-ads-completed",Kl.AD_LINEAR_CHANGED="ad-linear-changed",Kl.AD_METADATA="ad-metadata",Kl.AD_RECOVERABLE_ERROR="ad-recoverable-error",Kl.AD_BREAK_READY="ad-break-ready",Kl.AD_INTERACTION="ad-interaction",Ll=function(){return new Kl};var Hl="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ql="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Xl=["loop","playbackRate"],Wl=["pause","play"],Yl={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Jl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},$l=[["getConfiguration","configure"]],Ql=[["isTextTrackVisible","setTextTrackVisibility"]],Zl="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),ec=["attach","detach","load","unload"];function tc(e,t,n,i,r,a){var o=this;this.J=e,this.j=new pn(t),this.S=n,this.C=!1,this.B=i,this.H=r,this.M=a,this.h=this.m=!1,this.N="",this.A=null,this.F=function(){return oc(o)},this.G=function(e,t){var n=zl(t);switch(n.type){case"event":var i=n.targetName;n=V(n.event),o.B(i,n);break;case"update":for(var r in i=n.update)for(var a in n=o.g[r]||{},i[r])n[a]=i[r][a];o.C&&(o.S(),o.C=!1);break;case"asyncComplete":if(r=n.id,n=n.error,a=o.i[r],delete o.i[r],a)if(n){for(i in r=new Ee(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},this.g={video:{},player:{}},this.K=0,this.i={},this.l=null,hc.add(this)}function nc(e,t,n){dc=n,n.addUpdateListener(e.F),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.G),oc(e),uc(e,{type:"init",initState:t,appData:e.A}),e.l.resolve()}function ic(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new Ee(2,8,n,t))}function rc(e,t){var n=e.M();e.l=new Ot,e.C=!0,nc(e,n,t)}function ac(e){var t=dc;t.removeUpdateListener(e.F),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.G)}function oc(e){var t=!!dc&&"connected"==dc.status;if(e.h&&!t){for(var n in e.H(),e.g)e.g[n]={};sc(e)}e.h=t,e.N=t?dc.receiver.friendlyName:"",e.j.Aa()}function sc(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new Ee(1,7,7e3))}}function uc(e,t){var n=Vl(t),i=dc;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),W)}catch(t){throw n=new Ee(2,8,8005,t),i=new K("error",(new Map).set("detail",n)),e.B("player",i),e.ac(),n}}(i=tc.prototype).destroy=function(){return hc.delete(this),sc(this),dc&&ac(this),this.j&&(this.j.stop(),this.j=null),this.H=this.B=null,this.h=this.m=!1,this.G=this.F=this.l=this.i=this.g=this.A=null,Promise.resolve()},i.sa=function(){return this.h},i.td=function(){return this.N},i.init=function(){if(this.J.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Aa();var t=new chrome.cast.SessionRequest(this.J);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(hc),n=t.next();!n.done;n=t.next())rc(n.value,e)}),(function(e){for(var t=l(hc),n=t.next();!n.done;n=t.next())n=n.value,cc="available"==e,n.j.Aa()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),cc&&this.j.R(lc),(t=dc)&&t.status!=chrome.cast.SessionStatus.STOPPED?rc(this,t):dc=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=fc),e.__onGCastApiAvailable!=fc&&q("A global Cast SDK hook is already installed! Shaka Player will be unable to re
2ceive a notification when the Cast SDK is ready.")},i.re=function(e){this.A=e,this.h&&uc(this,{type:"appData",appData:this.A})},i.cast=function(e){var t=this;return _((function(n){if(!t.m)throw new Ee(1,8,8e3);if(!cc)throw new Ee(1,8,8001);if(t.h)throw new Ee(1,8,8002);return t.l=new Ot,chrome.cast.requestSession((function(n){return nc(t,e,n)}),(function(e){return ic(t,e)})),E(n,t.l,0)}))},i.ac=function(){if(this.h){if(sc(this),dc){ac(this);try{dc.stop((function(){}),(function(){}))}catch(e){}dc=null}oc(this)}},i.get=function(e,t){var n=this;if("video"==e){if(Wl.includes(t))return function(){return n.tf.apply(n,[e,t].concat(c(P.apply(0,arguments))))}}else if("player"==e){if(Jl[t]&&!this.get("player","isLive")())return function(){};if(Zl.includes(t))return function(){return n.tf.apply(n,[e,t].concat(c(P.apply(0,arguments))))};if(ec.includes(t))return function(){return n.Vg.apply(n,[e,t].concat(c(P.apply(0,arguments))))};if(Yl[t])return function(){return n.g[e][t]}}return this.g[e][t]},i.set=function(e,t,n){this.g[e][t]=n,uc(this,{type:"set",targetName:e,property:t,value:n})},i.tf=function(e,t){uc(this,{type:"call",targetName:e,methodName:t,args:P.apply(2,arguments)})},i.Vg=function(e,t){var n=P.apply(2,arguments),i=new Ot,r=this.K.toString();this.K++,this.i[r]=i;try{uc(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var lc=.02,cc=!1,dc=null,hc=new Set;function fc(e){if(e)for(var t=(e=l(hc)).next();!t.done;t=e.next())t.value.init()}function pc(e,t,n){ee.call(this);var i=this;this.i=e,this.h=t,this.m=this.A=this.j=this.B=this.l=null,this.F=n,this.C=new Map,this.g=new tc(n,(function(){return vc(i)}),(function(){return yc(i)}),(function(e,t){return Tc(i,e,t)}),(function(){return bc(i)}),(function(){return mc(i)})),function(e){e.g.init(),e.m=new Ui;for(var t=l(Hl),n=t.next();!n.done;n=t.next())e.m.o(e.i,n.value,(function(t){e.g.sa()||(t=V(t),e.j.dispatchEvent(t))}));for(var i in Al)e.m.o(e.h,Al[i],(function(t){e.g.sa()||e.A.dispatchEvent(t)}));for(var r in e.l={},t={},e.i)t.qc=r,Object.defineProperty(e.l,t.qc,{configurable:!1,enumerable:!0,get:function(t){return function(){return Ec(e,t.qc)}}(t),set:function(t){return function(n){var i=t.qc;e.g.sa()?e.g.set("video",i,n):e.i[i]=n}}(t)}),t={qc:t.qc};e.B={},gc(e,(function(t){Object.defineProperty(e.B,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.C.has(t)&&(t=e.C.get(t)),"addEventListener"==t)return function(t,n,i){return e.A.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.A.removeEventListener(t,n,i)};if("getMediaElement"==t)return function(){return e.l};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Dc()};if("getDrmEngine"==t)return function(){return e.h.A};if("getAdManager"==t)return function(){return e.h.dd()};if("setVideoContainer"==t)return function(t){return e.h.Ae(t)};if(e.g.sa()){if("getManifest"==t||"drmInfo"==t)return function(){return q(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return q(t+"() does not work while casting!"),Promise.resolve()}}return e.g.sa()&&0==Object.keys(e.g.g.video).length&&Yl[t]||!e.g.sa()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;gc(e,(function(n,i){if(t.has(i)){var r=t.get(i);n.length<r.length?e.C.set(n,r):e.C.set(r,n)}else t.set(i,n)}))}(e),e.j=new ee,e.j.jd=e.l,e.A=new ee,e.A.jd=e.B}(this)}function gc(e,t){function n(e){return"constructor"!=e&&"function"==typeof i[e]&&!r.has(e)}var i=e.h,r=new Set;for(a in i)n(a)&&(r.add(a),t(a,i[a]));for(var a=Object.getPrototypeOf(i),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=l(Object.getOwnPropertyNames(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(r.add(u),t(u,i[u]));a=Object.getPrototypeOf(a)}}function mc(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Pd(),startTime:null};e.i.pause();for(var n=l(Xl),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=l($l)).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=l(Ql)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function vc(e){var t=new K("caststatuschanged");e.dispatchEvent(t)}function yc(e){var t=new K(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function bc(e){for(var t=l($l),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}
2var r=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;i=null,n||(i=e.g.get("video","currentTime")),r&&(e.i.autoplay=!1,t=e.h.load(r,i));var o={};for(i=(n=l(Xl)).next();!i.done;i=n.next())i=i.value,o[i]=e.g.get("video",i);t.then((function(){if(e.i){for(var t=l(Xl),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=o[n];for(n=(t=l(Ql)).next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}e.i.autoplay=a,r&&e.i.play()}}),(function(t){t=(new Map).set("detail",t),t=new K(il,t),e.h.dispatchEvent(t)}))}function Ec(e,t){if("addEventListener"==t)return function(t,n,i){return e.j.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.j.removeEventListener(t,n,i)};if(e.g.sa()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.sa()?e.g.get("video",t):("function"==typeof(n=e.i[t])&&(n=n.bind(e.i)),n)}function Tc(e,t,n){e.g.sa()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.A.dispatchEvent(n))}function Ac(e,t,n,i){ee.call(this);var r=this;this.g=e,this.h=t,this.j=new Ui,this.K={video:e,player:t},this.G=n||function(){},this.M=i||function(e){return e},this.i=null,this.H=!1,this.A=!0,this.m=0,this.F=!1,this.C=!0,this.B=this.l=null,this.J=new pn((function(){Ic(r)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return wc(e)},t.onSenderDisconnected=function(){return wc(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Lc(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),Lc(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.B=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.B.onMessage=function(t){return function(e,t){var n=zl(t.data);switch(n.type){case"PLAY":e.g.play(),Nc(e);break;case"PAUSE":e.g.pause(),Nc(e);break;case"SEEK":var i=n.currentTime,r=n.resumeState;null!=i&&(e.g.currentTime=Number(i)),r&&"PLAYBACK_START"==r?(e.g.play(),Nc(e)):r&&"PLAYBACK_PAUSE"==r&&(e.g.pause(),Nc(e));break;case"STOP":e.h.He().then((function(){e.h&&Nc(e)}));break;case"GET_STATUS":Cc(e,Number(n.requestId));break;case"VOLUME":i=(r=n.volume).level,r=r.muted;var a=e.g.volume,o=e.g.muted;null!=i&&(e.g.volume=Number(i)),null!=r&&(e.g.muted=r),a==e.g.volume&&o==e.g.muted||Nc(e);break;case"LOAD":e.m=0,e.F=!1,e.C=!1,i=n.media,r=n.currentTime,a=e.M(i.contentId),o=n.autoplay||!0,e.G(i.customData),o&&(e.g.autoplay=!0),e.h.load(a,r).then((function(){e.h&&Cc(e)})).catch((function(t){var i="LOAD_FAILED";7==t.category&&7e3==t.code&&(i="LOAD_CANCELLED"),Lc(e,{requestId:Number(n.requestId),type:i},e.B)}));break;default:Lc(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.B)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=zl(t.data);switch(n.type){case"init":e.m=0,e.F=!1,e.C=!0,function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f;_((function(p){switch(p.g){case 1:for(i in t.player)r=t.player[i],e.h[i](r);return e.G(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,A(p,5),E(p,e.h.load(t.manifest,t.startTime),7)):E(p,Promise.resolve(),3);case 7:S(p,3);break;case 5:return o=x(p),s=il,u=(new Map).set("detail",o),l=new K(s,u),e.h&&e.h.dispatchEvent(l),p.return();case 3:if(!e.h)return p.return();for(c in t.video)d=t.video[c],e.g[c]=d;for(h in t.playerAfterLoad)f=t.playerAfterLoad[h],e.h[h](f);e.g.autoplay=a,t.manifest&&(e.g.play(),Nc(e)),T(p)}}))}(e,n.initState,n.appData),Ic(e);break;case"appData":e.G(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,"video"==i){var a=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){a.setSystemVolumeLevel(n);break}if("muted"==r){a.setSystemVolumeMuted(n);break}}e.K[i][r]=n;break;case"call":(i=e.K[n.targetName])[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,"player"==i&&"load"==r&&(e.m=0,e.F=!1);var o=n.id,s=t.senderId;n=(a=e.K[i])[r].apply(a,n.args),"player"==i&&"load"==r&&(n=n.then((function(){e.C=!0}))),n.then((function(){return Mc(e,s,o,null)}),(function(t){return Mc(e,s,o,t)}))}}(e,t)},t.start();for(var n=(t=l(Hl)).next();!n.done;n=t.next())e.j.o(e.g,n.value,(function(t){return xc(e,"video",t)}));for(var i in Al)e.j.o(e.h,Al[i],(function(t){return xc(e,"player",t)}));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.ve(3840,2160):e.h.ve(1920,1080),e.j.o(e.g,"loadeddata",(function(){e.F=!0})),e.j.o(e.h,"loading",(function(){e.A=!1,Sc(e)})),e.j.o(e.g,"playing",(function(){e.A=!1,Sc(e)})),e.j.o(e.g,"pause",(function(){Sc(e)})),e.j.o(e.h,"unloading",(function(){e.A=!0,Sc(e)})),e.j.o(e.g,"ended",(function(){new pn((function(){e.g&&e.g.ended&&(e.A=!0,Sc(e))})).R(_c)}))}(this)}function wc(e){e.m=0,e.C=!0,e.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Sc(e)}function Sc(e){var t;_((function(n){return 1==n.g?E(n,Promise.resolve(),2):e.h?(t=new K("caststatuschanged"),e.dispatchEvent(t),kc(e)||Nc(e),void T(n)):n.return()}))}function xc(e,t,n){e.h&&(Ic(e),Lc(e,{type:"event",targetName:t,event:n},e.l))}function Ic(e){e.J.R(Rc);for(var t={video:{},player:{}},n=l(ql),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];if(e.h.T())for(var r in Jl)0==e.m%Jl[r]&&(t.player[r]=e.h[r]());for(var a in Yl)0==e.m%Yl[a]&&(t.player[a]=e.h[a]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.F&&(e.m+=1),Lc(e,{type:"update",update:t},e.l),kc(e)}function kc(e){return!(!e.C||!e.g.duration&&!e.h.T())&&(Cc(e),e.C=!1,!0)}function Cc(e,t){var n={contentId:e.h.Pd(),streamType:e.h.T()?"LIVE":"BUFFERED",contentType:""};e.h.T()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Nc(e,void 0===t?0:t,n)}function Mc(e,t,n,i){e.h&&Lc(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function Lc(e,t,n,i){e.H&&(e=Vl(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Nc(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.A?Pc:e.h.Ic()?Oc:e.g.paused?Uc:Dc,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),Lc(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.B)}m(pc,ee),(i=pc.prototype).destroy=function(e){return e&&this.g.ac(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.B=this.l=this.i=null,ee.prototype.release.call(this),Promise.all(e)},i.Db=function(){return this.l},i.dc=function(){return this.B},i.Oe=function(){return this.g.m&&cc},i.sa=function(){return this.g.sa()},i.td=function(){return this.g.td()},i.cast=function(){var e,t=this;return _((function(n){return 1==n.g?(e=mc(t),E(n,t.g.cast(e),2)):t.h?E(n,t.h.He(),0):n.return()}))},i.re=function(e){this.g.re(e)},i.Cf=function(){!function(e){if(e.h){var t=e.M();chrome.cast.requestSession((function(n){return nc(e,t,n)}),(function(t){return ic(e,t)}))}}(this.g)},i.ac=function(){this.g.ac()},i.Se=function(e){var t=this;return _((function(n){if(1==n.g)return e==t.F?n.return():(t.F=e,t.g.ac(),E(n,t.g.destroy(),2));
2t.g=null,t.g=new tc(e,(function(){return vc(t)}),(function(){return yc(t)}),(function(e,n){return Tc(t,e,n)}),(function(){return bc(t)}),(function(){return mc(t)})),t.g.init(),T(n)}))},G("shaka.cast.CastProxy",pc),pc.prototype.changeReceiverId=pc.prototype.Se,pc.prototype.forceDisconnect=pc.prototype.ac,pc.prototype.suggestDisconnect=pc.prototype.Cf,pc.prototype.setAppData=pc.prototype.re,pc.prototype.cast=pc.prototype.cast,pc.prototype.receiverName=pc.prototype.td,pc.prototype.isCasting=pc.prototype.sa,pc.prototype.canCast=pc.prototype.Oe,pc.prototype.getPlayer=pc.prototype.dc,pc.prototype.getVideo=pc.prototype.Db,pc.prototype.destroy=pc.prototype.destroy,m(Ac,ee),(i=Ac.prototype).isConnected=function(){return this.H},i.Eg=function(){return this.A},i.eh=function(e){this.i=e},i.Qf=function(){this.i=null},i.fh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},i.dh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},i.bh=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},i.destroy=function(){var e,t=this;return _((function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.J&&(t.J.stop(),t.J=null),t.g=null,t.K=null,t.G=null,t.H=!1,t.A=!0,t.l=null,t.B=null,ee.prototype.release.call(t),E(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),T(n)}))},G("shaka.cast.CastReceiver",Ac),Ac.prototype.destroy=Ac.prototype.destroy,Ac.prototype.setContentArtist=Ac.prototype.bh,Ac.prototype.setContentImage=Ac.prototype.dh,Ac.prototype.setContentTitle=Ac.prototype.fh,Ac.prototype.clearContentMetadata=Ac.prototype.Qf,Ac.prototype.setContentMetadata=Ac.prototype.eh,Ac.prototype.isIdle=Ac.prototype.Eg,Ac.prototype.isConnected=Ac.prototype.isConnected;var Rc=.5,_c=5,Pc="IDLE",Dc="PLAYING",Oc="BUFFERING",Uc="PAUSED";function jc(e){var t=this;this.g=[],this.h=[],this.data=[],(new xr).box("moov",Ir).Y("pssh",(function(e){if(!(1<e.version)){var n=Lt(e.reader.V,-12,e.size);if(t.data.push(n),t.g.push(Jt(e.reader.Eb(16))),0<e.version){n=e.reader.P();for(var i=(n=l(ie(n))).next();!i.done;i=n.next())i=Jt(e.reader.Eb(16)),t.h.push(i)}}})).parse(e)}function Bc(e,t){var n=e.length,i=t.length+16+n,r=new Uint8Array(i),a=Nt(r),o=0;return a.setUint32(o,i),o+=4,a.setUint32(o,1886614376),o+=4,a.setUint32(o,0),o+=4,r.set(t,o),o+=t.length,a.setUint32(o,n),r.set(e,o+4),r}function Fc(e,t){var n=Kc(e,t);return 1!=n.length?null:n[0]}function Gc(e,t,n){return 1!=(e=Vc(e,t,n)).length?null:e[0]}function Kc(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName==t}))}function Vc(e,t,n){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))}function zc(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Hc(e,t,n){for(var i=(t=l(t)).next();!i.done;i=t.next())if(i=i.value,e.hasAttributeNS(i,n))return e.getAttributeNS(i,n);return null}function qc(e){return Array.from(e.childNodes).every(Xc)?e.textContent.trim():null}function Xc(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function Wc(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.getAttribute(t))&&(r=n(e)),null==r?i:r}function Yc(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null}function Jc(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)?)?$").exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function $c(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function Qc(e){return 0==(e=Number(e))%1?e:null}function Zc(e){return 0==(e=Number(e))%1&&0<e?e:null}function ed(e){return 0==(e=Number(e))%1&&0<=e?e:null}function td(e){return e=Number(e),isNaN(e)?null:e}
2function nd(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function id(e,t){var n=new DOMParser,i=null;try{i=n.parseFromString(e,"text/xml")}catch(e){return null}return!(n=i.documentElement)||n.getElementsByTagName("parsererror").length||i.documentElement.tagName!=t?null:n}function rd(e,t){try{return id(Bt(e),t)}catch(e){return null}}function ad(e,t,n){var i=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=sd(n.value))&&t.push(n);return t}(e),r=null;e=[];var a=[],o=new Set(i.map((function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new Ee(2,4,4010);if(t||(a=i.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.vf||(r=e.init||r,!1)}))).length&&(e=function(e,t,n){for(var i=[],r=(t=l(t)).next();!r.done;r=t.next()){var a=n[(r=r.value).vf];if(a){var o;if(o=Gc(r.node,"urn:microsoft:playready","pro"))o=[{initData:Bc(o=Wt(o.textContent),new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149])),initDataType:"cenc",keyId:r.keyId}];else o=null;o=Ne(a,r.init||e||o),(a=ld.get(a))&&(o.licenseServerUri=a(r)),i.push(o)}}return i}(r,a,n),0==e.length&&(e=[Ne("",r)])),i.length&&(t||!a.length))for(e=[],n=(t=l(Object.values(n))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(Ne(n,r));if(o=Array.from(o)[0]||null)for(n=(t=l(e)).next();!n.done;n=t.next())for(i=(n=l(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=o;return{We:o,Ki:r,drmInfos:e,$e:!0}}function od(e){return(e=Gc(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=Nt(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,1&r||r+e>n.byteLength){n=[];break e}var a=Lt(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e=Wt(e.textContent)).filter((function(e){return e.type===ud}))[0])&&(e=id(e=Ft(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=l(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=l(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function sd(e){var t=e.getAttribute("schemeIdUri"),n=zc(e,"urn:mpeg:cenc:2013","default_KID"),i=Vc(e,"urn:mpeg:cenc:2013","pssh").map(qc);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new Ee(2,4,4009);var r=[];try{r=i.map((function(e){return{initDataType:"cenc",initData:Wt(e),keyId:null}}))}catch(e){throw new Ee(2,4,4007)}return{node:e,vf:t,keyId:n,init:0<r.length?r:null}}var ud=1,ld=(new Map).set("com.widevine.alpha",(function(e){return(e=Gc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",od).set("com.microsoft.playready.recommendation",od).set("com.microsoft.playready.software",od).set("com.microsoft.playready.hardware",od);function cd(t,n,i,r,a){var o={RepresentationID:n,Number:i,Bandwidth:r,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,i,r){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&(a=Math.round(a)),r){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return i=e.parseInt(i,10)||1,Array(Math.max(0,i-t.length)+1).join("0")+t}))}function dd(e,t){var n=hd(e,t,"timescale"),i=1;n&&(i=Zc(n)||1);var r=hd(e,t,"duration");n=Zc(r||""),"image"==e.L.contentType&&(n=td(r||"")),n&&(n/=i);var a=hd(e,t,"startNumber");r=Number(hd(e,t,"presentationTimeOffset"))||0;var o=ed(a||"");null!=a&&null!=o||(o=1);var s=fd(e,t,"SegmentTimeline");if(a=null,s){a=i;var u=e.Z.duration||1/0,c=Kc(s,"S");s=[];for(var d=-r,h=(c=l(re(c))).next();!h.done;h=c.next()){var f=(h=h.value).item,p=h.next,g=Wc(f,"t",ed);h=Wc(f,"d",ed);var m=Wc(f,"r",Qc);if(null!=g&&(g-=r),!h)break;if(f=null!=g?g:d,0>(g=m||0))if(p){if(null==(p=Wc(p,"t",ed)))break;if(f>=p)break;g=Math.ceil((p-f)/h)-1}else{if(1/0==u)break;if(f/a>=u)break;
2g=Math.ceil((u*a-f)/h)-1}for(0<s.length&&f!=d&&(s[s.length-1].end=f/a),g=(p=l(ie(g+1))).next();!g.done;g=p.next())d=f+h,s.push({start:f/a,end:d/a,kh:f}),f=d}a=s}return{timescale:i,za:n,pc:o,vb:r/i||0,Ie:r,timeline:a}}function hd(e,t,n){return[t(e.L),t(e.Ba),t(e.ua)].filter(Ce).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function fd(e,t,n){return[t(e.L),t(e.Ba),t(e.ua)].filter(Ce).map((function(e){return Fc(e,n)})).reduce((function(e,t){return e||t}))}function pd(e,t,n,i,r,a){if(a=void 0===a?0:a,zc(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=zc(e,"http://www.w3.org/1999/xlink","href"),s=zc(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=l(Array.from(e.attributes)),c=u.next();!c.done;c=u.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&e.removeAttributeNS(c.namespaceURI,c.localName);if(5<=a)return vi(new Ee(2,4,4028));if("onLoad"!=s)return vi(new Ee(2,4,4027));var d=Le([i],[o]);return r.request(0,Ci(d,t)).oa((function(i){if(!(i=rd(i.data,e.tagName)))return vi(new Ee(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;i.childNodes.length;){var s=i.childNodes[0];i.removeChild(s),e.appendChild(s)}for(s=(i=l(Array.from(i.attributes))).next();!s.done;s=i.next())e.setAttributeNode(s.value.cloneNode(!1));return pd(e,t,n,d[0],r,a+1)}))}(e,t,n,i,r,a);return n&&(o=o.oa(void 0,(function(){return pd(e,t,n,i,r,a)}))),o}o=[];for(var s=l(Array.from(e.childNodes)),u=s.next();!u.done;u=s.next())(u=u.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==zc(u,"http://www.w3.org/1999/xlink","href")?e.removeChild(u):"SegmentTimeline"!=u.tagName&&o.push(pd(u,t,n,i,r,a)));return Ti(o).oa((function(){return e}))}function gd(e,t,n,i,r,a,o){var s,u=(new xr).Y("sidx",(function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.P();if(0==u)throw new Ee(2,3,3005);if(0==o.version)var c=o.reader.P(),d=o.reader.P();else c=o.reader.nc(),d=o.reader.nc();o.reader.skip(2);var h=o.reader.ie();for(e=e+o.size+d,h=l(ie(h)),d=h.next();!d.done;d=h.next()){var f=o.reader.P();d=(2147483648&f)>>>31,f&=2147483647;var p=o.reader.P();if(o.reader.skip(4),1==d)throw new Ee(2,3,3006);s.push(new go(c/u+n,(c+p)/u+n,(function(){return a}),e,e+f-1,t,n,i,r)),c+=p,e+=f}return o.parser.stop(),s}(t,i,r,a,o,n,e)}));if(e&&u.parse(e),s)return s;throw new Ee(2,3,3004)}function md(e){this.h=Nt(e),this.g=new Ar(this.h,0)}function vd(e){var t=yd(e);if(7<t.length)throw new Ee(2,3,3002);for(var n=0,i=(t=l(t)).next();!i.done;i=t.next())n=256*n+i.value;t=yd(e);e:{for(var r=(i=l(bd)).next();!r.done;r=i.next())if(kt(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.qa();else{if(8==t.length&&224&t[1])throw new Ee(2,3,3001);i=0;for(var a=(r=l(re(t))).next();!a.done;a=r.next()){var o=(a=a.value).item;i=0==a.ra?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.qa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.qa(),i=Nt(e.h,e.g.qa(),t),e.g.skip(t),new Ed(n,i)}function yd(e){var t=e.g.qa(),n=e.g.ub();if(0==n)throw new Ee(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Lt(e.h,t,n)}md.prototype.Da=function(){return this.g.Da()};var bd=[[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 Ed(e,t){this.id=e,this.g=t}function Td(e){if(8<e.g.byteLength)throw new Ee(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new Ee(2,3,3001);for(var t=0,n=l(ie(e.g.byteLength)),i=n.next();!i.done;i=n.next())t=256*t+(i=e.g.getUint8(i.value));return t}function Ad(e){var t=new md(e.g);if(179!=(e=vd(t)).id)throw new Ee(2,3,3013);if(e=Td(e),183!=(t=vd(t)).id)throw new Ee(2,3,3012);t=new md(t.g);for(var n=0;t.Da();){var i=vd(t);if(241==i.id){n=Td(i);break}}return{lh:e,Ug:n}}function wd(e,t){var n=fd(e,t,"Initialization");if(!n)return null;var i=e.L.Pa,r=n.getAttribute("sourceURL");r&&(i=Le(e.L.Pa,[r])),r=0;var a=null;return(n=Wc(n,"range",$c))&&(r=n.start,a=n.end),new po((function(){return i}),r,a,Md(e))}function Sd(e,t){var n=Number(hd(e,Id,"presentationTimeOffset"))||0,i=hd(e,Id,"timescale"),r=1;i&&(r=Zc(i)||1);var a=n/r||0,o=wd(e,Id);!function(e,t){if(Cd(e,t),!kd(e))throw new Ee(2,4,4002)}(e,o);var s=wi(e);return{bc:function(){var e=fd(s,Id,"RepresentationIndex"),n=s.L.Pa;return e&&(e=e.getAttribute("sourceURL"))&&(n=Le(s.L.Pa,[e])),e=kd(s),xd(s,t,o,n,e.start,e.end,a)}}}function xd(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,v,y,b,T,A;return _((function(w){if(1==w.g)return s=e.presentationTimeline,u=!e.zb||!e.Z.lf,l=e.Z.start,c=e.Z.duration,d=e.L.mimeType.split("/")[1],f=null,p=[(h=t)(i,r,a),"webm"==d?h(n.Ra(),n.Ua,n.Ca):null],h=null,E(w,Promise.all(p),2);
2if(g=w.h,m=g[0],v=g[1]||null,null,b=l-o,T=l,A=c?l+c:1/0,"mp4"==d)var S=gd(m,r,i,n,b,T,A);else{if(440786851!=vd(S=new md(v)).id)throw new Ee(2,3,3008);var x=vd(S);if(408125543!=x.id)throw new Ee(2,3,3009);S=x.g.byteOffset,x=new md(x.g);for(var I=null;x.Da();){var k=vd(x);if(357149030==k.id){I=k;break}}if(!I)throw new Ee(2,3,3010);for(I=new md(I.g),k=1e6,x=null;I.Da();){var C=vd(I);if(2807729==C.id)k=Td(C);else if(17545==C.id)if(4==C.g.byteLength)x=C.g.getFloat32(0);else{if(8!=C.g.byteLength)throw new Ee(2,3,3003);x=C.g.getFloat64(0)}}if(null==x)throw new Ee(2,3,3011);if(x*=I=k/1e9,475249515!=(k=vd(new md(m))).id)throw new Ee(2,3,3007);S=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new md(e.g);for(var d=null,h=null;e.Da();){var f=vd(e);if(187==f.id){var p=Ad(f);p&&(f=n*p.lh,p=t+p.Ug,null!=d&&c.push(new go(d+o,f+o,l,h,p-1,a,o,s,u)),d=f,h=p)}}return null!=d&&c.push(new go(d+o,i+o,l,h,null,a,o,s,u)),c}(k,S,I,x,i,n,b,T,A)}return y=S,s.kc(y),f=new Oo(y),u&&f.Ab(T,A,!0),w.return(f)}))}function Id(e){return e.Nc}function kd(e){var t=fd(e,Id,"RepresentationIndex");return e=$c((e=hd(e,Id,"indexRange"))||""),t&&(e=Wc(t,"range",$c,e)),e}function Cd(e,t){var n=e.L.mimeType.split("/")[1];if(e.L.contentType!=Pe&&"mp4"!=n&&"webm"!=n)throw new Ee(2,4,4006);if("webm"==n&&!t)throw new Ee(2,4,4005)}function Md(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.nd,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function Ld(e,t){var n=wd(e,Nd),i=function(e){var t=function(e){return[e.L.Fb,e.Ba.Fb,e.ua.Fb].filter(Ce).map((function(e){return Kc(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.hf&&(e.hf=!0),{Kg:t.getAttribute("media"),start:(t=Wc(t,"mediaRange",$c,{start:0,end:null})).start,end:t.end}}))}(e);e=dd(e,Nd);var n=e.pc;0==n&&(n=1);var i=0;return e.za?i=e.za*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{za:e.za,startTime:i,pc:n,vb:e.vb,timeline:e.timeline,hc:t}}(e);if(!i.za&&!i.timeline&&1<i.hc.length)throw new Ee(2,4,4002);if(!i.za&&!e.Z.duration&&!i.timeline&&1==i.hc.length)throw new Ee(2,4,4002);if(i.timeline&&0==i.timeline.length)throw new Ee(2,4,4002);var r=null,a=null;e.ua.id&&e.L.id&&(a=t[e.ua.id+","+e.L.id])&&(r=a.segmentIndex);var o=function(e,t,n,i,r){var a=i.hc.length;i.timeline&&i.timeline.length!=i.hc.length&&(a=Math.min(i.timeline.length,i.hc.length));for(var o=e-i.vb,s=t?e+t:1/0,u=[],c=i.startTime,d={},h=(a=l(ie(a))).next();!h.done;d={Fd:d.Fd},h=a.next()){h=h.value;var f=i.hc[h];d.Fd=Le(n,[f.Kg]);var p=void 0;p=null!=i.za?c+i.za:i.timeline?i.timeline[h].end:c+t,u.push(new go(e+c,e+p,function(e){return function(){return e.Fd}}(d),f.start,f.end,r,o,e,s)),c=p}return u}(e.Z.start,e.Z.duration,e.L.Pa,i,n);return n=!r,r?r.jc(o,e.presentationTimeline.qb()):r=new Oo(o),e.presentationTimeline.kc(o),e.zb&&e.Z.lf||r.Ab(e.Z.start,e.Z.duration?e.Z.start+e.Z.duration:1/0,n),a&&(a.segmentIndex=r),{bc:function(){return r&&0!=r.O.length||r.ic(o),Promise.resolve(r)}}}function Nd(e){return e.Fb}function Rd(e,t,n,i,r,a){var o=function(e){var t=hd(e,_d,"initialization");if(!t)return null;var n=e.L.id,i=e.bandwidth||null,r=e.L.Pa;return new po((function(){var e=cd(t,n,null,i,null);return Le(r,[e])}),0,null,Md(e))}(e),s=function(e){var t=dd(e,_d),n=hd(e,_d,"media");return e=hd(e,_d,"index"),{za:t.za,timescale:t.timescale,pc:t.pc,vb:t.vb,Ie:t.Ie,timeline:t.timeline,Yd:n,Hc:e}}(e);!function(e){var t=e.Hc?1:0;if(t+=e.timeline?1:0,t+=e.za?1:0,0==t)throw new Ee(2,4,4002);if(1!=t&&(e.Hc&&(e.timeline=null),e.za=null),!e.Hc&&!e.Yd)throw new Ee(2,4,4002)}(s);var u=wi(e);if(s.Hc)return Cd(e,o),{bc:function(){var e=cd(s.Hc,u.L.id,null,u.bandwidth||null,null);return e=Le(u.L.Pa,[e]),xd(u,t,o,e,0,null,s.vb)}};if(s.za)return i||(e.presentationTimeline.$d(s.za),e.presentationTimeline.ae(e.Z.start)),{bc:function(){return function(e,t,n,i,r){function a(e){var n=(e-p)*f,r=n+t.vb,a=n+c;return n=a+f,(a=new go(a,Math.min(n,s()),(function(){var t=cd(m,y,e,v,r*g);return Le(b,[t])}),0,null,i,E,c,s())).l=n,a}
2function o(){var e=[Math.max(u.qb(),c),Math.min(u.Kb(),s())].map((function(e){return e-c}));return[Math.ceil(e[0]/f),Math.ceil(e[1]/f)-1].map((function(e){return e+p}))}function s(){var e=null!=d&&r[d]||h;return e?c+e:1/0}var u=e.presentationTimeline,c=e.Z.start,d=e.ua.id,h=e.Z.duration,f=t.za,p=t.pc,g=t.timescale,m=t.Yd,v=e.bandwidth||null,y=e.L.id,b=e.L.Pa,E=c-t.vb,T=o();e=e.zb?Math.max(T[0],T[1]-n+1):T[0],T=T[1],n=[];for(var A=e;A<=T;++A){var w=a(A);n.push(w)}var S=new Oo(n);if(n=u.Kb()<s(),A=u.T(),n||A){var x=Math.max(e,T+1);S.wd(f,(function(){var e=u.qb();S.Ib(e);var t=l(o());t.next(),t=t.next().value;for(var n=[];x<=t;){var i=a(x);n.push(i),x++}return e>s()&&!n.length?null:n}))}return Promise.resolve(S)}(u,s,r,o,a)}};var c=null;i=i=null,e.ua.id&&e.L.id&&(i=n[i=e.ua.id+","+e.L.id])&&(c=i.segmentIndex);var d=function(e,t,n){var i=e.Z.start,r=e.Z.duration,a=i-t.vb;r=r?i+r:1/0;for(var o=[],s={},u=l(re(t.timeline)),c=u.next();!c.done;s={Ed:s.Ed,Id:s.Id,Ld:s.Ld,Bd:s.Bd,Nd:s.Nd,Cd:s.Cd},c=u.next()){var d=(c=c.value).item,h=d.start,f=d.kh;d=d.end,s.Ld=c.ra+t.pc,s.Nd=f+t.Ie,s.Id=e.L.id,s.Bd=e.bandwidth||null,s.Ed=t.Yd,s.Cd=e.L.Pa,o.push(new go(i+h,i+d,function(e){return function(){var t=cd(e.Ed,e.Id,e.Ld,e.Bd||null,e.Nd);return Le(e.Cd,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,i,r))}return o}(u,s,o);n=e.Z.start;var h=e.Z.duration?e.Z.start+e.Z.duration:1/0,f=1/0!=h;return c?(f&&new Oo(d).Ab(n,h,!0),c.jc(d,e.presentationTimeline.qb())):c=new Oo(d),e.presentationTimeline.kc(d),f&&c.Ab(n,h),i&&e.zb&&(i.segmentIndex=c),{bc:function(){return c&&0!=c.O.length||c.ic(d),Promise.resolve(c)}}}function _d(e){return e.Oc}function Pd(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function Dd(e,t,n){var i,r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,A,w,S,x,I,k,C,M,L,N,R,P,D,O,U;return _((function(_){switch(_.g){case 1:if(i=De,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).Yc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.channelsCount==s.channelsCount&&r.language==s.language&&r.bandwidth==s.bandwidth&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&rt(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.Yc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).xd),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&rt(r.roles,s.roles)&&Hi(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.xd=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).textStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.language==s.language&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&rt(r.roles,s.roles)&&(a=!0);a||n.push(r)}t.textStreams=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).imageStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&(a=!0);a||n.push(r)}t.imageStreams=n}}(t),!n&&1==t.length){r=t[0],e.g=r.Yc,e.h=r.xd,e.j=r.textStreams,e.i=r.imageStreams,_.D(2);break}for(a=-1,o=l(re(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ra,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return _.return();for(h=t.map((function(e){return e.Yc})),f=t.map((function(e){return e.xd})),p=t.map((function(e){return e.textStreams})),g=t.map((function(e){return e.imageStreams})),m=l(p),v=m.next();!v.done;v=m.next())v.value.push(eh(i.ma));for(y=l(g),b=y.next();!b.done;b=y.next())b.value.push(eh(i.xc));return E(_,Ud(e.g,h,a,Gd,Vd),3);case 3:return E(_,Ud(e.h,f,a,Gd,Vd),4);case 4:return E(_,Ud(e.j,p,a,Gd,Vd),5);case 5:return E(_,Ud(e.i,g,a,Gd,Vd),2);case 2:if(A=0,w=[],e.h.length&&e.g.length)for(M=l(e.g),L=M.next();!L.done;L=M.next())for(N=L.value,R=l(e.h),P=R.next();!P.done;P=R.next())D=P.value,O=sr(N.drmInfos,D.drmInfos),N.drmInfos.length&&D.drmInfos.length&&!O.length||(U=A++,w.push({id:U,language:N.language,primary:N.primary,audio:N,video:D,bandwidth:(N.bandwidth||0)+(D.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(S=e.h.concat(e.g),x=l(S),I=x.next();!I.done;I=x.next())k=I.value,C=A++,w.push({id:C,language:k.language,primary:k.primary,audio:k.type==i.Gb?k:null,video:k.type==i.ib?k:null,bandwidth:k.bandwidth||0,drmInfos:k.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=w,T(_)}}))}function Od(e){var t,n,i,r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,T,A,w,S,x,I;return _((function(k){switch(k.g){case 1:if(t=De,1==e.length)return k.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.Gb}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.ib}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.ma}))}
2)),a=e.map((function(e){return e.filter((function(e){return e.type==t.xc}))})),o=l(r),s=o.next();!s.done;s=o.next())s.value.push(Zd(t.ma));for(u=l(a),c=u.next();!c.done;c=u.next())c.value.push(Zd(t.xc));return E(k,Ud([],n,0,Kd,zd),2);case 2:return d=k.h,E(k,Ud([],i,0,Kd,zd),3);case 3:return h=k.h,E(k,Ud([],r,0,Kd,zd),4);case 4:return f=k.h,E(k,Ud([],a,0,Kd,zd),5);case 5:if(p=k.h,g=0,h.length&&d.length)for(b=l(d),T=b.next();!T.done;T=b.next())for(A=T.value,w=l(h),S=w.next();!S.done;S=w.next())x=S.value,I=g++,x.variantIds.push(I),A.variantIds.push(I);else for(m=h.concat(d),v=l(m),y=v.next();!y.done;y=v.next())y.value.variantIds=[g++];return k.return(h.concat(d).concat(f).concat(p))}}))}function Ud(e,t,n,i,r){var a,o,s,u,c,d,h,f,p,g,m,v,y,b,T,A,w,S,x,I,k,C;return _((function(M){switch(M.g){case 1:for(a=De,o=[],s=l(re(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ra,h=c.item,d>=n?o.push(new Set(h)):o.push(new Set);f=l(e),p=f.next();case 2:if(p.done){M.D(4);break}return E(M,function(e,t,n,i,r){return _((function(a){return 1==a.g?(Hd(t,e),e.matchedStreams?e.segmentIndex?E(a,jd(e,n),2):a.D(2):a.return(!1)):(Fd(e,n,i,r),a.return(!0))}))}(p.value,t,n,r,o),5);case 5:if(!M.h)throw new Ee(2,4,4037);p=f.next(),M.D(2);break;case 4:for(g=l(o),m=g.next();!m.done;m=g.next())for(v=m.value,y=l(v),b=y.next();!b.done;b=y.next())T=b.value,(A=Bd(T,t,i,r,o))&&e.push(A);for(w=l(o),m=w.next();!m.done;m=w.next())for(S=m.value,x={},I=l(S),b=I.next();!b.done;x={yb:x.yb},b=I.next())if(x.yb=b.value,k=x.yb.type==a.ma&&!x.yb.language,C=x.yb.type==a.xc&&!x.yb.tilesLayout,!k&&!C&&e.some(function(e){return function(t){return t.mimeType==e.yb.mimeType&&an(t.codecs)==an(e.yb.codecs)}}(x)))throw new Ee(2,4,4037);return M.return(e)}}))}function jd(e,t){var n,i,r,a,o,s,u,c,d,h;return _((function(f){if(1==f.g){for(n=[],i=e.matchedStreams,r=l(i),a=r.next();!a.done;a=r.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return E(f,Promise.all(n),2)}if(e.segmentIndex instanceof Bo)for(s=l(re(i)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ra,(h=c.item).segmentIndex&&d>=t&&e.segmentIndex.j.push(h.segmentIndex);T(f)}))}function Bd(e,t,n,i,r){var a=n(e);return Hd(t,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return _((function(e){return a.segmentIndex?e.D(0):(a.segmentIndex=new Bo,E(e,jd(a,0),0))}))}),a.matchedStreams?(Fd(a,0,i,r),a):null}function Fd(e,t,n,i){for(var r=l(re(e.matchedStreams)),a=r.next();!a.done;a=r.next()){var o=a.value;if(a=o.ra,o=o.item,a>=t){n(e,o);var s=!0;"audio"==e.type&&0==Ve(e.language,o.language)&&(s=!1),s&&i[a].delete(o)}}}function Gd(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=l(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function Kd(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Vd(e,t){var n,i;e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris)))),e.keyIds=(n=e.keyIds,i=t.keyIds,new Set([].concat(c(n),c(i)))),null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||"");var r=sr(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new Ee(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var a=(r=l(t.closedCaptions)).next();!a.done;a=r.next()){var o=l(a.value);a=o.next().value,o=o.next().value,e.closedCaptions.set(a,o)}}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Gd(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),Vd(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Vd(e.trickModeVideo,t)}function zd(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var i=(n=l(t.closedCaptions)).next();!i.done;i=n.next()){var r=l(i.value);i=r.next().value,r=r.next().value,e.closedCaptions.set(i,r)}}}function Hd(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){for(var a=t,o={audio:qd,video:qd,text:Xd,image:Wd}[a.type],s={audio:Yd,video:Jd,text:$d,image:Qd}[a.type],u=null,c=(r=l(r.value)).next();!c.done;c=r.next())!o(a,c=c.value)||u&&!s(a,u,c)||(u=c);if(!(a=u))return;n.push(a)}t.matchedStreams=n}function qd(e,t){var n;if(!(n=t.mimeType!=e.mimeType||an(t.codecs)!=an(e.codecs))&&(n=e.drmInfos)){n=e.drmInfos;var i=t.drmInfos;n=!(!n.length||!i.length||0<sr(n,i).length)}return!n}function Xd(e,t){return!!e.language&&(!t.language||0!=Ve(e.language,t.language)&&t.kind==e.kind)}function Wd(e){return!!e.tilesLayout}function Yd(e,t,n){if(e.id==n.id)return!0;var i=Ve(e.language,t.language),r=Ve(e.language,n.language);return r>i||!(r<i)&&(!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&(e.roles.length?(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||!(r.length<i.length)&&n.roles.length<t.roles.length):!(n.roles.length||!t.roles.length)||!(n.roles.length&&!t.roles.length)&&((i=th(e.channelsCount,t.channelsCount,n.channelsCount))==ih||i!=ah&&((i=th(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==ih||i!=ah&&!(!e.bandwidth||nh(e.bandwidth,t.bandwidth,n.bandwidth)!=ih)))))}function Jd(e,t,n){if(e.id==n.id)return!0;var i=th(e.width*e.height,t.width*t.height,n.width*n.height);if(i==ih)return!0;
2if(i==ah)return!1;if(e.frameRate){if((i=th(e.frameRate,t.frameRate,n.frameRate))==ih)return!0;if(i==ah)return!1}return!(!e.bandwidth||nh(e.bandwidth,t.bandwidth,n.bandwidth)!=ih)}function $d(e,t,n){if(e.id==n.id)return!0;var i=Ve(e.language,t.language),r=Ve(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(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 Qd(e,t,n){return e.id==n.id||th(e.width*e.height,t.width*t.height,n.width*n.height)==ih}function Zd(e){return{id:0,originalId:"",primary:!1,type:e,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function eh(e){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oo([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function th(e,t,n){if(t==e&&e!=n)return ah;if(n==e&&e!=t)return ih;if(t>e){if(n<=e||n-e<t-e)return ih;if(n-e>t-e)return ah}else{if(n>e)return ah;if(e-n<e-t)return ih;if(e-n>e-t)return ah}return rh}function nh(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?ih:t<e?ah:rh}Pd.prototype.release=function(){for(var e=l(this.g.concat(this.h,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.g=[],this.h=[],this.j=[],this.i=[],this.l=[]};var ih=1,rh=0,ah=-1;function oh(){var e=this;this.h=this.g=null,this.m=[],this.i=null,this.J=1,this.l={},this.N={},this.j=new Pd,this.H=0,this.K=new Ze(5),this.G=new pn((function(){!function(e){var t,n;_((function(i){switch(i.g){case 1:return t=0,A(i,2),E(i,sh(e),4);case 4:t=i.h,S(i,3);break;case 2:n=x(i),e.h&&(n.severity=1,e.h.onError(n));case 3:if(!e.h)return i.return();dh(e,t),T(i)}}))}(e)})),this.A=new Si,this.B=null,this.M=[],this.C=1/0,this.F=!1}function sh(e){var t,n,i,r,a,o,s;return _((function(u){return 1==u.g?(t=Ci(e.m,e.g.retryParameters),n=e.h.networkingEngine,e.h.modifyManifestRequest(t,{format:"d"}),i=Date.now(),r=n.request(0,t),xi(e.A,r),E(u,r.promise,2)):3!=u.g?(a=u.h,e.h?(a.uri&&!e.m.includes(a.uri)&&e.m.unshift(a.uri),E(u,function(e,t,n){var i,r,a,o;return _((function(s){if(1==s.g){if(!(i=rd(t,"MPD")))throw new Ee(2,4,4001,n);return e.g.dash.disableXlinkProcessing?s.return(uh(e,i,n)):(r=e.g.dash.xlinkFailGracefully,a=pd(i,e.g.retryParameters,r,n,e.h.networkingEngine),xi(e.A,a),E(s,a.promise,2))}return o=s.h,s.return(uh(e,o,n))}))}(e,a.data,a.uri),3)):u.return(0)):(o=Date.now(),s=(o-i)/1e3,e.K.sample(1,s),u.return(s))}))}function uh(e,t,n){var i,r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,w,I,k,C,M,L,N,R,P,D,O,U,j;return _((function(B){switch(B.g){case 1:if((i=e.g.dash.manifestPreprocessor)&&i(t),r=[n],0<(a=Kc(t,"Location").map(qc).filter(Ce)).length&&(o=Le(r,a),r=e.m=o),s=Kc(t,"BaseURL"),u=s.map(qc),c=Le(r,u),d=0,s&&s.length&&(d=Wc(s[0],"availabilityTimeOffset",td)||0),h=e.g.dash.ignoreMinBufferTime,f=0,h||(f=Wc(t,"minBufferTime",Jc)||0),e.H=Wc(t,"minimumUpdatePeriod",Jc,-1),p=Wc(t,"availabilityStartTime",Yc),g=Wc(t,"timeShiftBufferDepth",Jc),m=e.g.dash.ignoreSuggestedPresentationDelay,v=null,m||(v=Wc(t,"
2suggestedPresentationDelay",Jc)),y=e.g.dash.ignoreMaxSegmentDuration,b=null,y||(b=Wc(t,"maxSegmentDuration",Jc)),w=t.getAttribute("type")||"static",e.i)for(I=e.i.presentationTimeline,k=l(Object.values(e.l)),C=k.next();!C.done;C=k.next())(M=C.value).segmentIndex&&M.segmentIndex.Ib(I.qb());else L=e.g.defaultPresentationDelay||1.5*f,I=new mo(p,null!=v?v:L,e.g.dash.autoCorrectDrift);return I.Pc("static"==w),I.T()&&!isNaN(e.g.availabilityWindowOverride)&&(g=e.g.availabilityWindowOverride),null==g&&(g=1/0),I.ye(g),N=t.getAttribute("profiles")||"",R={zb:"static"!=w,presentationTimeline:I,ua:null,Z:null,Ba:null,L:null,bandwidth:0,hf:!1,$b:d,profiles:N.split(",")},P=function(e,t,n,i){var r=Wc(i,"mediaPresentationDuration",Jc),a=[],o=0;i=Kc(i,"Period");for(var s=l(re(i)),u=s.next();!u.done;u=s.next()){var c=u.value;u=c.ra;var d=c.item,h=c.next;c=Wc(d,"start",Jc,o);var f=d.id,p=Wc(d,"duration",Jc),g=null;if(h){var m=Wc(h,"start",Jc);null!=m&&(g=m-c)}else null!=r&&(g=r-c);if(null==g&&(g=p),!(null!==e.B&&null!==f&&null!==c&&c<e.B)||e.M.includes(f)||u+1==i.length){if(null!==c&&(null===e.B||c>e.B)&&(e.B=c),o=lh(e,t,n,{start:c,duration:g,node:d,lf:null==g||!h}),a.push(o),t.ua.id&&g&&(e.N[t.ua.id]=g),null==g){o=null;break}o=c+g}}return e.M=a.map((function(e){return e.id})),null!=r?{periods:a,duration:r,Ye:!1}:{periods:a,duration:o,Ye:!0}}(e,R,c,t),D=P.duration,O=P.periods,"static"!=w&&P.Ye||I.eb(D||1/0),e.C&&!e.F&&e.h.isAutoLowLatencyMode()&&(e.h.enableLowLatencyMode(),e.F=e.h.isLowLatencyMode()),e.F?I.wf(e.C):e.C&&q("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),I.$d(b||1),E(B,Dd(e.j,O,R.zb),2);case 2:if(e.i){e.i.variants=e.j.l,e.i.textStreams=e.j.j.slice(),e.i.imageStreams=e.j.i,e.h.filter(e.i),B.D(3);break}if(e.i={presentationTimeline:I,variants:e.j.l,textStreams:e.j.j.slice(),imageStreams:e.j.i,offlineSessionIds:[],minBufferTime:f||0,sequenceMode:!1},!I.Ef()){B.D(3);break}return U=Kc(t,"UTCTiming"),E(B,function(e,t,n){var i,r,a,o,s,u,c,d;return _((function(h){switch(h.g){case 1:i=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),a=l(i),o=a.next();case 2:if(o.done){h.D(4);break}switch(s=o.value,A(h,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return h.D(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return h.D(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),h.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":q("NTP UTCTiming scheme is not supported");break;default:q("Unrecognized scheme in UTCTiming element",u)}h.D(9);break;case 7:return E(h,fh(e,t,c,"HEAD"),10);case 10:return h.return(h.h);case 8:return E(h,fh(e,t,c,"GET"),11);case 11:return h.return(h.h);case 9:S(h,3);break;case 5:x(h);case 3:o=a.next(),h.D(2);break;case 4:return q("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),h.return(0)}}))}(e,c,U),5);case 5:if(j=B.h,!e.h)return B.return();I.xf(j);case 3:e.h.makeTextStreamsForClosedCaptions(e.i),T(B)}}))}function lh(e,t,n,i){t.ua=hh(i.node,null,n),t.Z=i,t.ua.$b=t.$b,t.ua.id||(t.ua.id="__shaka_period_"+i.start);var r=Kc(i.node,"EventStream");n=t.presentationTimeline.qb();for(var a=(r=l(r)).next();!a.done;a=r.next())ph(e,i.start,i.duration,a.value,n);if(n=Kc(i.node,"AdaptationSet").map((function(n){return function(e,t,n){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.Ba=hh(n,t.ua,null);var r,a=!1,o=Kc(n,"Role"),s=o.map((function(e){return e.getAttribute("value")})).filter(Ce),u=void 0,d=t.Ba.contentType==Pe;d&&(u="subtitle");for(var h=(o=l(o)).next();!h.done;h=o.next()){var f=(h=h.value).getAttribute("schemeIdUri");if(null==f||"urn:mpeg:dash:role:2011"==f)switch(h=h.getAttribute("value"),h){case"main":a=!0;break;case"caption":case"subtitle":u=h}}f=Kc(n,"EssentialProperty"),o=null,h=!1;for(var p=(f=l(f)).next();!p.done;p=f.next()){var g=(p=p.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==g?o=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==g?r=i(parseInt(p.getAttribute("value"),10)):h=!0}for(f=l(f=Kc(n,"SupplementalProperty")),p=f.next();!p.done;p=f.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(p=p.value).getAttribute("schemeIdUri")&&(r=i(parseInt(p.getAttribute("value"),10)));f=Kc(n,"Accessibility");var m=new Map;for(f=l(f),p=f.next();!p.done;p=f.next())if(g=p.value,p=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608:2
2015"==p)if(p=1,null!=g)for(var v=l(g=g.split(";")),y=v.next();!y.done;y=v.next()){var b=y.value,A=y=void 0;b.includes("=")?(y=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],A=b[1]||"und"):(y="CC"+p,2==g.length?p+=2:p++,A=b),m.set(y,Ge(A))}else m.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=g)for(g=l(g.split(";")),y=g.next();!y.done;y=g.next())y=y.value,b=v=void 0,y.includes("=")?(y=y.split("="),v="svc"+y[0],b=y[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,b=y),m.set(v,Ge(b));else m.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=g&&(s.push(g),"captions"==g&&(u="caption"));if(h)return null;h=Kc(n,"ContentProtection");var w=ad(h,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),S=Ge(n.getAttribute("lang")||"und"),x=n.getAttribute("label");if((h=Kc(n,"Label"))&&h.length&&(h=h[0],h.textContent&&(x=h.textContent)),h=Kc(n,"Representation"),n=h.map((function(n){return(n=function(e,t,n,i,r,a,o,s,u,l){if(t.L=hh(l,t.Ba,null),e.C=Math.min(e.C,t.L.$b),!function(e){var t=e.Nc?1:0;return t+=e.Fb?1:0,t+=e.Oc?1:0,0==t?e.contentType==Pe||"application"==e.contentType:(1!=t&&(e.Nc&&(e.Fb=null),e.Oc=null),!0)}(t.L))return null;var c=t.Z.start;t.bandwidth=Wc(l,"bandwidth",Zc)||0;var d=t.L.contentType,h=d==Pe||"application"==d;d="image"==d;try{var f=function(t,n,i){return function(e,t,n,i){var r,a,o,s,u;return _((function(l){return 1==l.g?(r=Ri,a=$o(t,n,i,e.g.retryParameters),o=e.h.networkingEngine,s=o.request(r,a),xi(e.A,s),E(l,s.promise,2)):(u=l.h,l.return(u.data))}))}(e,t,n,i)};if(t.L.Nc)var p=Sd(t,f);else if(t.L.Fb)p=Ld(t,e.l);else if(t.L.Oc)p=Rd(t,f,e.l,!!e.i,e.g.dash.initialSegmentLimit,e.N);else{var g=t.L.Pa,m=t.Z.duration||0;p={bc:function(){return Promise.resolve(Uo(c,m,g))}}}}catch(e){if((h||d)&&4002==e.code)return null;throw e}f=Kc(l,"ContentProtection"),f=function(e,t,n,i){var r=ad(e,n,i);
2if(t.$e)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==r.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=r.drmInfos),t.$e=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter((function(e){return r.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==t.drmInfos.length))throw new Ee(2,4,4008);return r.We||t.We}(f,n,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),f=new Set(f?[f]:[]);var v=!1;Kc(l,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")}))&&(t.L.mimeType="audio/eac3-joc",v=!0);var y,b,A=!1;if(h&&(A=s.includes("forced_subtitle")||s.includes("forced-subtitle")),d&&((l=Kc(l,"EssentialProperty").find((function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))})))&&(y=l.getAttribute("value")),!y))return null;l=t.L.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(b="PQ");var w=t.L.id?t.ua.id+","+t.L.id:"",S={id:e.J++,originalId:t.L.id,createSegmentIndex:function(){var n,i;return _((function(r){if(1==r.g)return(n=w&&t.zb&&e.l[w]?e.l[w]:S).segmentIndex?r.D(0):(i=n,E(r,p.bc(),3));i.segmentIndex=r.h,T(r)}))},closeSegmentIndex:function(){S.segmentIndex&&(S.segmentIndex.release(),S.segmentIndex=null)},segmentIndex:null,mimeType:t.L.mimeType,codecs:t.L.codecs,frameRate:t.L.frameRate,pixelAspectRatio:t.L.pixelAspectRatio,bandwidth:t.bandwidth,width:t.L.width,height:t.L.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:f,language:r,label:a,type:t.Ba.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:t.L.emsgSchemeIdUris,roles:s,forced:A,channelsCount:t.L.nd,audioSamplingRate:t.L.audioSamplingRate,spatialAudio:v,closedCaptions:u,hdr:b,tilesLayout:y,matchedStreams:[]};return w&&t.zb&&!e.l[w]&&(e.l[w]=S),S}(e,t,w,u,S,x,a,s,m,n))&&(n.hdr=n.hdr||r),n})).filter((function(e){return!!e})),0==n.length){if(o="image"==t.Ba.contentType,e.g.dash.ignoreEmptyAdaptationSet||d||o)return null;throw new Ee(2,4,4003)}if(!t.Ba.contentType||"application"==t.Ba.contentType)for(t.Ba.contentType=gh(n[0].mimeType,n[0].codecs),d=l(n),f=d.next();!f.done;f=d.next())f.value.type=t.Ba.contentType;for(d=l(n),f=d.next();!f.done;f=d.next())for(f=f.value,p=l(w.drmInfos),g=p.next();!g.done;g=p.next())(g=g.value).keyIds=g.keyIds&&f.keyIds?new Set([].concat(c(g.keyIds),c(f.keyIds))):g.keyIds||f.keyIds;return d=h.map((function(e){return e.getAttribute("id")})).filter(Ce),{id:t.Ba.id||"__fake__"+e.J++,contentType:t.Ba.contentType,language:S,Li:a,streams:n,drmInfos:w.drmInfos,Ee:o,Xg:d}}(e,t,n)})).filter(Ce),t.zb){for(i=[],a=(r=l(n)).next();!a.done;a=r.next())for(var o=(a=l(a.value.Xg)).next();!o.done;o=a.next())i.push(o.value);if(i.length!=new Set(i).size)throw new Ee(2,4,4018)}for(i=n.filter((function(e){return!e.Ee})),r=(n=l(n=n.filter((function(e){return e.Ee})))).next();!r.done;r=n.next()){a=(r=r.value).Ee.split(" ");for(var s=(o=l(i)).next();!s.done;s=o.next()){var u=s.value;if(a.includes(u.id)){s={};for(var d=(u=l(u.streams)).next();!d.done;s={Wc:s.Wc},d=u.next())s.Wc=d.value,s.Wc.trickModeVideo=r.streams.find(function(e){return function(t){return an(e.Wc.codecs)==an(t.codecs)}}(s))}}}if(r=e.g.disableAudio?[]:ch(i,"audio"),o=e.g.disableVideo?[]:ch(i,"video"),a=e.g.disableText?[]:ch(i,Pe),n=e.g.disableThumbnails?[]:ch(i,"image"),!o.length&&!r.length)throw new Ee(2,4,4004);for(i=[],s=(r=l(r)).next();!s.done;s=r.next())i.push.apply(i,c(s.value.streams));for(r=[],s=(o=l(o)).next();!s.done;s=o.next())r.push.apply(r,c(s.value.streams));for(o=[],s=(a=l(a)).next();!s.done;s=a.next())o.push.apply(o,c(s.value.streams));for(a=[],s=(n=l(n)).next();!s.done;s=n.next())a.push.apply(a,c(s.value.streams));return{id:t.ua.id,Yc:i,xd:r,textStreams:o,imageStreams:a}}function ch(e,t){return e.filter((function(e){return e.contentType==t}))}function dh(e,t){0>e.H||e.G.R(Math.max(3,e.H-t,et(e.K)))}function hh(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,nd:null,audioSamplingRate:null,$b:0},n=n||t.Pa;for(var i=Kc(e,"BaseURL"),r=i.map(qc),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=Wc(e,"frameRate",nd)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,d=Kc(e,"InbandEventStream"),h=t.emsgSchemeIdUris.slice(),f=(d=l(d)).next();!f.done;f=d.next())f=f.value.getAttribute("schemeIdUri"),h.includes(f)||h.push(f);d=function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;
2case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(d=Kc(e,"AudioChannelConfiguration"))||t.nd,f=Wc(e,"audioSamplingRate",ed)||t.audioSamplingRate,a||(a=gh(o,s));var p=Fc(e,"SegmentBase"),g=Fc(e,"SegmentTemplate"),m=p&&Wc(p,"availabilityTimeOffset",td)||0,v=g&&Wc(g,"availabilityTimeOffset",td)||0;return i=i&&i.length&&Wc(i[0],"availabilityTimeOffset",td)||0,i=t.$b+i+m+v,{Pa:Le(n,r),Nc:p||t.Nc,Fb:Fc(e,"SegmentList")||t.Fb,Oc:g||t.Oc,width:Wc(e,"width",ed)||t.width,height:Wc(e,"height",ed)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:c,emsgSchemeIdUris:h,id:e.getAttribute("id"),nd:d,audioSamplingRate:f,$b:i}}function fh(e,t,n,i){var r,a,o,s,u,l;return _((function(c){if(1==c.g)return r=Le(t,[n]),(a=Ci(r,e.g.retryParameters)).method=i,o=e.h.networkingEngine.request(4,a),xi(e.A,o),E(c,o.promise,2);if(s=c.h,"HEAD"==i){if(!s.headers||!s.headers.date)return c.return(0);u=s.headers.date}else u=Bt(s.data);return l=Date.parse(u),isNaN(l)?c.return(0):c.return(l-Date.now())}))}function ph(e,t,n,i,r){for(var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=Wc(i,"timescale",ed)||1,u=(i=l(Kc(i,"Event"))).next();!u.done;u=i.next()){var c=Wc(u=u.value,"presentationTime",ed)||0,d=Wc(u,"duration",ed)||0;d=(c=c/s+t)+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(u={schemeIdUri:a,value:o,startTime:c,endTime:d,id:u.getAttribute("id")||"",eventElement:u},e.h.onTimelineRegionAdded(u))}}function gh(e,t){return un(nn(e,t))?Pe:e.split("/")[0]}function mh(e,t,n,i){this.g=e,this.type=t,this.ba=n,this.segments=i||null}function vh(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function yh(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function bh(e,t){var n=e.getAttribute(t);if(!n)throw new Ee(2,4,4023,t);return n.value}function Eh(e,t,n){n=void 0===n?[]:n,this.ba=t,this.g=e,this.h=n}function Th(e,t){this.name=e,this.value=t}function Ah(e,t){return e.filter((function(e){return e.name==t}))}function wh(e,t){return e.filter((function(e){return bh(e,"TYPE")==t}))}function Sh(e,t){var n=Ah(e,t);return n.length?n[0]:null}function xh(e){var t=0;return t=void 0===t?0:t,(e=Sh(e,"EXT-X-MEDIA-SEQUENCE"))?Number(e.value):t}function Ih(e){this.h=e,this.g=0}function kh(e){Ch(e,/[ \t]+/gm)}function Ch(e,t){t.lastIndex=e.g;var n=t.exec(e.h);return n=null==n?null:{position:n.index,length:n[0].length,results:n},e.g==e.h.length||null==n||n.position!=e.g?null:(e.g+=n.length,n.results)}function Mh(e){return e.g==e.h.length?null:(e=Ch(e,/[^ \t\n]*/gm))?e[0]:null}function Lh(){this.g=0}function Nh(e,t,n){var i=(t=(t=Bt(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new Ee(2,4,4015);t=0;for(var r=!0,a=l(i),o=a.next();!o.done;o=a.next())if(o=o.value,/^#(?!EXT)/m.test(o)||r)r=!1;else{if(o=Rh(e.g++,o),--e.g,_h.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(r=!0)}a=[],r=!0;for(var s=(o=l(re(i))).next();!s.done;s=o.next()){var u=s.value;s=u.ra;var c=u.item;if(u=u.next,/^#(?!EXT)/m.test(c)||r)r=!1;else{if(c=Rh(e.g++,c),Ph.includes(c.name)){if(1!=t)throw new Ee(2,4,4017);u=i.splice(s,i.length-s),i=n,r=[],o=[],s=[],c=null;for(var d=(u=l(u)).next();!d.done;d=u.next())d=d.value,/^(#EXT)/.test(d)?(d=Rh(e.g++,d),_h.includes(d.name)?a.push(d):"EXT-X-MAP"==d.name?c=d:"EXT-X-PART"==d.name?s.push(d):"EXT-X-PRELOAD-HINT"==d.name?"PART"==yh(d,"TYPE")?s.push(d):"MAP"==yh(d,"TYPE")&&(d.name="EXT-X-MAP",c=d):o.push(d)):/^#(?!EXT)/m.test(d)||(d=Le([i],[d.trim()])[0],c&&o.push(c),r.push(new Eh(d,o,s)),o=[],s=[]);return s.length&&(c&&o.push(c),r.push(new Eh("",o,s))),new mh(n,t,a,r)}a.push(c),"EXT-X-STREAM-INF"==c.name&&(c.g.push(new Th("URI",u)),r=!0)}}return new mh(n,t,a)}function Rh(e,t){var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Ee(2,4,4016,t);var i,r=n[1],a=n[2];if(n=[],a){var o;(o=Ch(a=new Ih(a),/^([^,=]+)(?:,|$)/g))&&(i=o[1]);
2for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=Ch(a,s);)n.push(new Th(o[1],o[2]||o[3])),kh(a)}return new vh(e,r,n,i)}(i=oh.prototype).configure=function(e){this.g=e},i.start=function(e,t){var n,i=this;return _((function(r){if(1==r.g)return i.F=t.isLowLatencyMode(),i.m=[e],i.h=t,E(r,sh(i),2);if(n=r.h,i.h&&dh(i,n),!i.h)throw new Ee(2,7,7001);return r.return(i.i)}))},i.stop=function(){for(var e=l(Object.values(this.l)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.j&&this.j.release(),this.g=this.h=null,this.m=[],this.i=null,this.l={},this.j=null,null!=this.G&&(this.G.stop(),this.G=null),this.A.destroy()},i.update=function(){var e,t=this;return _((function(n){return 1==n.g?(A(n,2),E(n,sh(t),4)):2!=n.g?S(n,0):(e=x(n),t.h&&e?(t.h.onError(e),void T(n)):n.return())}))},i.onExpirationUpdated=function(){},G("shaka.dash.DashParser",oh),Tr.mpd=function(){return new oh},Er["application/dash+xml"]=function(){return new oh},Er["video/vnd.mpeg.dash.mpd"]=function(){return new oh},vh.prototype.toString=function(){var e="#"+this.name,t=this.g?this.g.map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},vh.prototype.getAttribute=function(e){var t=this.g.filter((function(t){return t.name==e}));return t.length?t[0]:null};var _h="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Ph="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Dh(){}function Oh(e){try{var t=Uh(e);return bi({uri:e,qf:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return vi(e)}}function Uh(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new Ee(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new Ee(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=i.split(";"),i=n[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?Wt(t):Kt(t),contentType:i}}function jh(){var e=this;this.h=this.j=null,this.ea=1,this.A=new Map,this.C=new Map,this.aa=new Set,this.g=new Map,this.i=null,this.M="",this.W=new Lh,this.xa=0,this.F=new pn((function(){!function(e){var t,n;_((function(i){return 1==i.g?e.j?(A(i,2),E(i,e.update(),4)):i.return():2!=i.g?(t=e.xa,e.F.R(t),S(i,0)):(n=x(i),e.j?(n.severity=1,e.j.onError(n),e.F.R(.1),void T(i)):i.return())}))}(e)})),this.l=nf,this.J=null,this.$=0,this.H=1/0,this.S=this.wa=0,this.G=new Si,this.N=[],this.K=new Map,this.ha=!1,this.B=new Map,this.X=new Map,this.m=!1}function Bh(e,t){var n,i,r,a,o,s,u,l,c,d,h,f;return _((function(p){if(1==p.g)return n=of,i=t.If,r=new oe(i),e.m&&t.Nf&&le(r,new ye("_HLS_skip=YES")),E(p,$h(e,r.toString()),2);if(a=p.h,1!=(o=Nh(e.W,a.data,a.uri)).type)throw new Ee(2,4,4017);s=Ah(o.ba,"EXT-X-DEFINE"),u=Fh(e,s),l=t.stream,c=Yh(e,o,l.type,t.mf,u),l.segmentIndex.jc(c,e.i.qb()),c.length&&(d=xh(o.ba),h=t.mf.get(d),l.segmentIndex.Ib(h)),f=c[c.length-1],Sh(o.ba,"EXT-X-ENDLIST")&&(Qh(e,n.Hf),e.i.eb(f.endTime)),T(p)}))}function Fh(e,t){for(var n=new Map,i=l(t),r=i.next();!r.done;r=i.next()){var a=r.value;r=yh(a,"NAME");var o=yh(a,"VALUE");a=yh(a,"IMPORT"),r&&o&&n.set(r,o),a&&(r=e.A.get(a))&&n.set(a,r)}return n}function Gh(e,t){var n=[];e.h.disableVideo||n.push(e.h.hls.defaultVideoCodec),e.h.disableAudio||n.push(e.h.hls.defaultAudioCodec);var i=yh(t,"CODECS",n.join(",")).split(/\s*,\s*/);n=new Set;for(var r=[],a=(i=l(i)).next();!a.done;a=i.next()){var o=an(a=a.value);
2n.has(o)||(r.push(a),n.add(o))}return r}function Kh(e){return Ge(e=yh(e,"LANGUAGE")||"und")}function Vh(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,p;return _((function(g){if(1==g.g){n=bh(t,"GROUP-ID"),i="";var m=bh(t,"TYPE").toLowerCase();return"subtitles"==m&&(m=Pe),(r=m)!=Pe&&n&&e.B.has(n)&&(i=e.B.get(n)),a=Jh(bh(t,"URI"),e.A),e.g.has(a)?g.return(e.g.get(a)):(o=Kh(t),s=yh(t,"NAME"),u=yh(t,"DEFAULT"),l="YES"==u,m="audio"==r&&(m=yh(t,"CHANNELS"))?parseInt(m.split("/")[0],10):null,c=m,m="audio"==r&&(!!(m=yh(t,"CHANNELS"))&&m.includes("/JOC")),d=m,h=yh(t,"CHARACTERISTICS"),f=yh(t,"FORCED"),E(g,zh(e,a,i,r,o,l,s,c,null,h,"YES"==f,d),2))}return p=g.h,e.C.has(n)?e.C.get(n).push(p):e.C.set(n,[p]),null==p?g.return(null):e.g.has(a)?g.return(e.g.get(a)):(e.g.set(a,p),g.return(p))}))}function zh(e,t,n,i,r,a,o,s,u,d,h,f){var p,g,m,v,y,b,T,A,w,S,x,I,k,C,M,L,N,R,P,D,O,U,j,B,F,G,K,V,z,H,X,W,Y,J,$,Q,Z;return _((function(ee){if(1==ee.g)return p=Le([e.M],[t])[0],E(ee,$h(e,p),2);if(3!=ee.g){if(g=ee.h,p=g.uri,1!=(m=Nh(e.W,g.data,p)).type)throw new Ee(2,4,4017);return v=Ah(m.ba,"EXT-X-DEFINE"),y=Fh(e,v),function(e,t){var n=Sh(t.ba,"EXT-X-PLAYLIST-TYPE"),i=Sh(t.ba,"EXT-X-ENDLIST");if(i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i)Qh(e,nf);else{if(Qh(e,n?af:rf),!(i=Sh(t.ba,"EXT-X-TARGETDURATION")))throw new Ee(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),n=Sh(t.ba,"EXT-X-PART-INF"),e.m&&n?(e.wa=Number(bh(n,"PART-TARGET")),e.H=Math.min(e.wa,e.H),n=Sh(t.ba,"EXT-X-SERVER-CONTROL"),e.S=n?Number(bh(n,"PART-HOLD-BACK")):0):e.H=Math.min(i,e.H),e.$=Math.max(i,e.$)}}(e,m),E(ee,function(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,p,g;return _((function(m){return 1==m.g?(a=De,o=Ri,s=Jh(i.segments[0].g,r),u=new oe(s),l=u.Ka.split(".").pop(),c=ef[t],(d=c[l])?m.return(d):t==a.ma?n&&"vtt"!=n&&"wvtt"!=n?m.return("application/mp4"):m.return("text/vtt"):t!=a.xc||n&&"jpeg"!=n?((h=Ci([s],e.h.retryParameters)).method="HEAD",E(m,Zh(e,h,o),2)):m.return("image/jpeg")):(f=m.h,(p=f.headers["content-type"])?m.return(p.split(";")[0]):(g=c.mp4,m.return(g)))}))}(e,i,n,m,y),3)}if(b=ee.h,T=[],m.segments)for(A=l(m.segments),w=A.next();!w.done;w=A.next())S=w.value,x=Ah(S.ba,"EXT-X-KEY"),T.push.apply(T,c(x));for(I=!1,k=[],C=new Set,M=l(T),L=M.next();!L.done;L=M.next())if(N=L.value,"NONE"!=(R=bh(N,"METHOD"))){if(I=!0,"AES-128"==R)return e.ha=!0,ee.return(null);if(P=bh(N,"KEYFORMAT"),O=(D=tf[P])?D(N,b):null){if(O.keyIds)for(U=l(O.keyIds),j=U.next();!j.done;j=U.next())B=j.value,C.add(B);k.push(O)}}if(I&&!k.length)throw new Ee(2,4,4026);fo.includes(b)&&(n=""),F=new Map;try{G=Yh(e,m,i,F,y)}catch(e){if(4035==e.code)return q("Skipping unsupported HLS stream",b,t),ee.return(null);throw e}if(K=G[0].startTime,V=G[G.length-1].endTime,z=new Oo(G),H=i==Pe?"subtitle":void 0,X=[],d)for(W=l(d.split(",")),Y=W.next();!Y.done;Y=W.next())J=Y.value,X.push(J);return Q=!!($=Sh(m.ba,"EXT-X-SERVER-CONTROL"))&&null!=$.getAttribute("CAN-SKIP-UNTIL"),Z={id:e.ea++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:z,mimeType:b,codecs:n,kind:H,encrypted:I,drmInfos:k,keyIds:C,language:r,label:o,type:i,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:X,forced:h,channelsCount:s,audioSamplingRate:null,spatialAudio:f,closedCaptions:u,hdr:void 0,tilesLayout:void 0},ee.return({stream:Z,Ke:t,If:p,nf:K,Jg:V,mf:F,Nf:Q})}))}function Hh(e,t){var n=0,i=null,r=yh(t,"BYTERANGE");return r&&(n=r.split("@"),i=Number(n[0]),i=(n=Number(n[1]))+i-1),new po((function(){return[e]}),n,i)}function qh(e,t,n,i,r,a,o,s){var u=i.ba,c=Jh(i.g,a),d=Sh(u,"EXTINF"),h=a=0,f=null;i.h.length&&!e.m&&q("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var p=[];if(e.m&&i.h.length){e={};for(var g=(i=l(re(i.h))).next();!g.done;e={Gd:e.Gd},g=i.next()){var m=(g=g.value).ra;g=g.item;var v=0==m?n:p[p.length-1];m=0==m?r:v.endTime;var y=Number(yh(g,"DURATION"));y=m+y;var b=0,E=null;
2"EXT-X-PRELOAD-HINT"==g.name?b=(v=yh(g,"BYTERANGE-START"))?Number(v):0:(b=(v=l(Xh(v,b=yh(g,"BYTERANGE")))).next().value,E=v.next().value),g=yh(g,"URI"),e.Gd=Le([o],[g])[0],p.push(new go(m,y,function(e){return function(){return[e.Gd]}}(e),b,E,t,0,0,1/0))}}else if(!d)throw new Ee(2,4,4024,"EXTINF");return a=d?r+Number(d.value.split(",")[0]):p[p.length-1].endTime,(o=Sh(u,"EXT-X-BYTERANGE"))?(h=(f=l(Xh(n,o.value))).next().value,f=f.next().value):p.length&&(h=p[0].Ua,f=p[p.length-1].Ca),n="",o=null,"image"==s&&(n="1x1",s=Sh(u,"EXT-X-TILES"))&&(n=bh(s,"LAYOUT"),(s=yh(s,"DURATION"))&&(o=Number(s))),new go(r,a,(function(){return c.length?[c]:[]}),h,f,t,0,0,1/0,p,n,o)}function Xh(e,t){var n=0,i=null;return t&&(n=t.split("@"),i=Number(n[0]),i=(n=n[1]?Number(n[1]):e.Ca+1)+i-1),[n,i]}function Wh(e){if(e.i){for(var t=l(e.N),n=t.next();!n.done;n=t.next())e.i.kc(n.value);e.N=[]}}function Yh(e,t,n,i,r){var a=t.segments,o=xh(t.ba),s=Sh(t.ba,"EXT-X-SKIP"),u=o+(s=s?Number(yh(s,"SKIPPED-SEGMENTS")):0),c=0;e.l!=nf&&i.has(u)&&(c=i.get(u)),a[0].g.split("/").pop();for(var d=[],h=(a=l(re(a))).next();!h.done;h=a.next()){u=(h=h.value).ra,h=h.item;var f=d[d.length-1],p=0==u?c:f.endTime;u=o+s+u,i.set(u,p),u=e;var g=t.g,m=r,v=Sh(h.ba,"EXT-X-MAP");if(v)g=[m=Jh(Le([g],[bh(v,"URI")])[0],m),yh(v,"BYTERANGE","")].join("-"),u.X.has(g)||(v=Hh(m,v),u.X.set(g,v)),u=u.X.get(g);else u=null;!e.m&&e.j.isAutoLowLatencyMode()&&(e.j.enableLowLatencyMode(),e.m=e.j.isLowLatencyMode()),h=qh(e,u,f,h,p,r,t.g,n),d.push(h)}return d}function Jh(e,t){var n=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}"),i=n.match(/{\$\w*}/g);if(i)for(var r=(i=l(i)).next();!r.done;r=i.next()){var a=(r=r.value).slice(2,r.length-1),o=t.get(a);if(!o)throw new Ee(2,4,4039,a);n=n.replace(r,o)}return n}function $h(e,t){var n=Ci([t],e.h.retryParameters);return e.j.modifyManifestRequest(n,{format:"h"}),Zh(e,n,0)}function Qh(e,t){e.l=t,e.i&&e.i.Pc(e.l==nf),e.l!=nf||e.F.stop()}function Zh(e,t,n){if(!e.G)throw new Ee(2,7,7001);return t=e.j.networkingEngine.request(n,t),xi(e.G,t),t.promise}G("shaka.net.DataUriPlugin",Dh),Dh.parse=Oh,ki("data",Oh),(i=jh.prototype).configure=function(e){this.h=e},i.start=function(e,t){var n,i,r=this;return _((function(a){return 1==a.g?(r.j=t,r.m=t.isLowLatencyMode(),E(a,$h(r,e),2)):3!=a.g?(n=a.h,r.M=n.uri,E(a,function(e,t){var n,i,r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,w,S,I,k,C,M,L,N,R,P,D,O,U,j,B,F,G,V,z;return _((function(H){switch(H.g){case 1:if(0!=(n=Nh(e.W,t,e.M)).type)throw new Ee(2,4,4022);for(i=Ah(n.ba,"EXT-X-DEFINE"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;i=yh(r,"NAME"),r=yh(r,"VALUE"),i&&r&&(e.A.has(i)||e.A.set(i,r))}}(e,i),r=Ah(n.ba,"EXT-X-MEDIA"),a=Ah(n.ba,"EXT-X-STREAM-INF"),o=Ah(n.ba,"EXT-X-IMAGE-STREAM-INF"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value,a=yh(r,"AUDIO");i=yh(r,"VIDEO");var o=yh(r,"SUBTITLES");if(r=Gh(e,r),o){var s=_e(Pe,r);e.B.set(o,s),it(r,s)}a&&(o=Re("audio",r),e.B.set(a,o)),i&&(a=Re("video",r),e.B.set(i,a))}}(e,a),s=Ah(n.ba,"EXT-X-SESSION-DATA"),u=l(s),c=u.next();!c.done;c=u.next())d=c.value,h=yh(d,"DATA-ID"),f=yh(d,"URI"),p=yh(d,"LANGUAGE"),g=yh(d,"VALUE"),m=(new Map).set("id",h),f&&m.set("uri",Le([e.M],[f])[0]),p&&m.set("language",p),g&&m.set("value",g),v=new K("sessiondata",m),e.j&&e.j.onEvent(v);return E(H,function(e,t){var n;return _((function(i){return 1==i.g?(t=t.filter((function(e){var t=yh(e,"URI")||"";return"SUBTITLES"!=yh(e,"TYPE")&&""!=t})),t.length?E(i,Vh(e,t[0]),2):i.D(2)):(n=t.slice(1).map((function(t){return Vh(e,t)})),E(i,Promise.all(n),0))}))}(e,r),2);case 2:return function(e,t){for(var n=wh(t,"CLOSED-CAPTIONS"),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value;i=Kh(r);var a=bh(r,"GROUP-ID");r=bh(r,"INSTREAM-ID"),e.K.get(a)||e.K.set(a,new Map),e.K.get(a).set(r,i)}}(e,r),E(H,function(e,t){var n,i,r;return _((function(a){return 1==a.g?(n=t.map((function(t){var n,i,r,a,o,s,u,c;return _((function(d){if(1==d.g)return n=yh(t,"FRAME-RATE"),i=Number(yh(t,"AVERAGE-BANDWIDTH"))||Number(bh(t,"BANDWIDTH")),r=yh(t,"RESOLUTION"),a=l(r?r.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=yh(t,"VIDEO-RANGE"),E(d,function(e,t){var n,i,r,a,o,s,u,c,d,h,f,p,g,m;return _((function(v){if(1==v.g)return n=De,i=Gh(e,t),r=yh(t,"AUDIO"),a=yh(t,"VIDEO"),s=(o=r||a)&&e.C.has(o)?e.C.get(o):[],u={audio:r?s:[],video:a?s:[]},d=!1,h=bh(t,"URI"),f=u.audio.find((function(e){return e&&e.Ke==h})),p=_e(n.ib,i),(g=_e(n.Gb,i))&&!p?c=n.Gb:!s.length&&g&&p?(c=n.ib,i=[[p,g].join()]):u.audio.length&&f?(c=n.Gb,d=!0):c=u.video.length?n.Gb:n.ib,d?v.D(2):E(v,function(e,t,n,i){var r,a,o,s;return _((function(u){if(1==u.g){if(r=Jh(bh(t,"URI"),e.A),e.g.has(r))return u.return(e.g.get(r));var l=yh(t,"CLOSED-CAPTIONS");return a="video"==i&&l&&"NONE"!=l?e.K.get(l):null,o=Re(i,n),E(u,zh(e,r,o,i,"und",!1,null,null,a,null,!1,!1),2)}return null==(s=u.h)?u.return(null):e.g.has(r)?u.return(e.g.get(r)):(e.g.set(r,s),u.return(s))}))}(e,t,i,c),3);if(2!=v.g&&(m=v.h),m)u[m.stream.type]=[m];else if(null===m)return v.return(null);return function(e){for(var t=(e=l(e.audio.concat(e.video))).next();!t.done;t=e.next())if(t=t.value){var n=t.stream.codecs.split(",");n=n.filter((function(e){return"mp4a.40.34"!=e})),t.stream.codecs=n.join(",")}}(u),v.return(u)}))}(e,t),2);if(c=d.h){for(var h=d.return,f=c.audio,p=c.video,g=l(p),m=g.next();!m.done;m=g.next())(m=m.value.stream)&&(m.width=Number(o)||void 0,m.height=Number(s)||void 0,m.frameRate=Number(n)||void 0,m.hdr=u||void 0);for(g=e.h.disableAudio,f.length&&!g||(f=[null]),g=e.h.disableVideo,p.length&&!g||(p=[null]),g=[],m=(f=l(f)).next();!m.done;m=f.next()){m=m.value;for(var v=l(p),y=v.next();!y.done;y=v.next()){var b=y.value;
2y=m?m.stream:null;var T=b?b.stream:null,A=m?m.stream.drmInfos:null,w=b?b.stream.drmInfos:null;b=(b?b.Ke:"")+" - "+(m?m.Ke:""),y&&T&&A.length&&w.length&&!(0<sr(A,w).length)||e.aa.has(b)||(y={id:e.ea++,language:y?y.language:"und",primary:!!y&&y.primary||!!T&&T.primary,audio:y,video:T,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},g.push(y),e.aa.add(b))}}d=h.call(d,g)}else d=d.return([]);return d}))})),E(a,Promise.all(n),2)):(i=a.h,r=(r=i.reduce(Ie,[])).filter((function(e){return null!=e})),a.return(r))}))}(e,a),3);case 3:return y=H.h,E(H,function(e,t){var n,i,r,a,o,s,u,c,d,h,f;return _((function(p){if(1==p.g)return n=wh(t,"SUBTITLES"),i=n.map((function(t){var n,i;return _((function(r){if(1==r.g)return e.h.disableText?r.return(null):(A(r,2),E(r,Vh(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=x(r),e.h.hls.ignoreTextStreamFailures)return r.return(null);throw i}))})),E(p,Promise.all(i),2);for(r=p.h,a=l(n),o=a.next();!o.done;o=a.next())if(s=o.value,u=bh(s,"GROUP-ID"),(c=e.B.get(u))&&(d=e.C.get(u)))for(h=l(d),f=h.next();!f.done;f=h.next())f.value.stream.codecs=c;return p.return(r.filter((function(e){return e})))}))}(e,r),4);case 4:return b=H.h,E(H,function(e,t){var n,i;return _((function(r){return 1==r.g?(n=t.map((function(t){var n,i;return _((function(r){if(1==r.g)return e.h.disableThumbnails?r.return(null):(A(r,2),E(r,function(e,t){var n,i,r,a,o,s,u,l,c,d;return _((function(h){return 1==h.g?(n=Jh(bh(t,"URI"),e.A),i=yh(t,"CODECS","jpeg")||"",e.g.has(n)?h.return(e.g.get(n)):(r=Kh(t),a=yh(t,"NAME"),o=yh(t,"CHARACTERISTICS"),E(h,zh(e,n,i,"image",r,!1,a,null,
2null,o,!1,!1),2))):null==(s=h.h)?h.return(null):e.g.has(n)?h.return(e.g.get(n)):((u=yh(t,"RESOLUTION"))&&(l=s.stream.segmentIndex.get(0),(c=l.tilesLayout)&&(s.stream.width=Number(u.split("x")[0])*Number(c.split("x")[0]),s.stream.height=Number(u.split("x")[1])*Number(c.split("x")[1]))),(d=yh(t,"BANDWIDTH"))&&(s.stream.bandwidth=Number(d)),e.g.set(n,s),h.return(s))}))}(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=x(r),e.h.hls.ignoreImageStreamFailures)return r.return(null);throw i}))})),E(r,Promise.all(n),2)):(i=r.h,r.return(i.filter((function(e){return e}))))}))}(e,o),5);case 5:if(w=H.h,!e.j)throw new Ee(2,7,7001);if(e.ha&&0==y.length)throw new Ee(2,4,4034);for(I=S=1/0,k=l(e.g.values()),C=k.next();!C.done;C=k.next())M=C.value,S=Math.min(S,M.nf),"text"!=M.stream.type&&(I=Math.min(I,M.Jg-M.nf));if(e.l!=nf?(e.i=new mo(0,e.h.defaultPresentationDelay?e.h.defaultPresentationDelay:e.S?e.S:3*e.$),e.i.Pc(!1)):(e.i=new mo(null,0),e.i.Pc(!0)),Wh(e),e.l!=nf)e.xa=e.H,L=of,e.l==L.Me&&(N=e.i.sd,isNaN(e.h.availabilityWindowOverride)||(N=e.h.availabilityWindowOverride),e.i.ye(N));else for(e.i.eb(I),e.i.offset(-S),R=l(e.g.values()),C=R.next();!C.done;C=R.next())(P=C.value).stream.segmentIndex.offset(-S),P.stream.segmentIndex.Ab(0,I);for(e.N=[],D=[],O=l(y),U=O.next();!U.done;U=O.next())for(j=U.value,B=l([j.video,j.audio]),F=B.next();!F.done;F=B.next())(G=F.value)&&D.push(G);return E(H,Promise.all(D.map((function(e){return _((function(t){return E(t,e.createSegmentIndex(),0)}))}))),6);case 6:for(V=l(D),F=V.next();!F.done;F=V.next())z=F.value,e.N.push(z.segmentIndex.O);Wh(e),e.J={presentationTimeline:e.i,variants:y,textStreams:b,imageStreams:w,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0},e.j.makeTextStreamsForClosedCaptions(e.J),T(H)}}))}(r,n.data),3)):(0<(i=r.xa)&&r.F.R(i),a.return(r.J))}))},i.stop=function(){this.F&&(this.F.stop(),this.F=null);var e=[];return this.G&&(e.push(this.G.destroy()),this.G=null),this.h=this.j=null,this.aa.clear(),this.J=null,this.g.clear(),this.C.clear(),this.B.clear(),this.A.clear(),Promise.all(e)},i.update=function(){var e,t,n,i=this;return _((function(r){if(1==r.g)return i.l==nf?r.return():(e=[],(t=Array.from(i.g.values())).length?E(r,Bh(i,t[0]),2):r.D(2));for(n=1;n<t.length;n++)e.push(Bh(i,t[n]));return E(r,Promise.all(e),0)}))},i.onExpirationUpdated=function(){},G("shaka.hls.HlsParser",jh);var ef={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},tf={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new Ee(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new Ee(2,4,4041);return Ne("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=bh(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=Ne("com.widevine.alpha",[{initDataType:"cenc",initData:t=Lt((t=Uh(t=bh(e,"URI"))).data)}]),(e=yh(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=bh(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?Ne("com.microsoft.playready",[{initDataType:"cenc",initData:e=Bc(e=Lt((e=Uh(e=bh(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]))}]):null}},nf="VOD",rf="EVENT",af="LIVE",of={Hf:nf,Fh:rf,Me:af};function sf(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,qf:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=Gt(t)}catch(e){}throw new Ee(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function uf(){}function lf(e,t,n,i,r){var a=new gf;
2Vi(t.headers).forEach((function(e,t){a.append(t,e)}));var o=new ff,s={Qe:!1,Df:!1};if(e=function(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g,m,v,y;return _((function(b){switch(b.g){case 1:return s=hf,u=pf,h=d=0,f=Date.now(),A(b,2),E(b,s(e,n),4);case 4:return l=b.h,a(cf(l.headers)),p=l.clone().body.getReader(),m=(g=l.headers.get("Content-Length"))?parseInt(g,10):0,new u({start:function(e){function t(){var n,i;return _((function(a){switch(a.g){case 1:return A(a,2),E(a,p.read(),4);case 4:n=a.h,S(a,3);break;case 2:return x(a),a.return();case 3:if(n.done){a.D(5);break}if(d+=n.value.byteLength,!o){a.D(5);break}return E(a,o(n.value),5);case 5:(100<(i=Date.now())-f||n.done)&&(r(i-f,d-h,m-d),h=d,f=i),n.done?e.close():(e.enqueue(n.value),t()),T(a)}}))}t()}}),E(b,l.arrayBuffer(),5);case 5:c=b.h,S(b,3);break;case 2:if(v=x(b),i.Qe)throw new Ee(1,1,7001,e,t);if(i.Df)throw new Ee(1,1,1003,e,t);throw new Ee(1,1,1002,e,v,t);case 3:return y=cf(l.headers),b.return(sf(y,c,l.status,e,l.url,t))}}))}(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,i,r,t.streamDataCallback),e=new mi(e,(function(){return s.Qe=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var u=new pn((function(){s.Df=!0,o.abort()}));u.R(t/1e3),e.finally((function(){u.stop()}))}return e}function cf(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}function df(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}En("Tizen 3")||En("Tizen 2")||En("Web0S")&&En("Chrome/38.0.2125.122 Safari/537.36")||(Tr.m3u8=function(){return new jh},Er["application/x-mpegurl"]=function(){return new jh},Er["application/vnd.apple.mpegurl"]=function(){return new jh}),G("shaka.net.HttpFetchPlugin",uf),uf.isSupported=df,uf.parse=lf;var hf=e.fetch,ff=e.AbortController,pf=e.ReadableStream,gf=e.Headers;function mf(){}function vf(e,t,n,i,r){var a=new bf,o=Date.now(),s=0;return new mi(new Promise((function(u,l){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){l(new Ee(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){if(2==a.readyState&&!c){var e=yf(a);r(e),c=!0}},a.onload=function(){var t=yf(a),i=a.response;try{var r=sf(t,i,a.status,e,a.responseURL,n);u(r)}catch(e){l(e)}},a.onerror=function(t){l(new Ee(1,1,1002,e,t,n))},a.ontimeout=function(){l(new Ee(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(i(t-o,e.loaded-s,e.total-e.loaded),s=e.loaded,o=t)},t.headers)a.setRequestHeader(d.toLowerCase(),t.headers[d]);a.send(t.body)})),(function(){return a.abort(),Promise.resolve()}))}function yf(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={};for(var n=(t=l(t)).next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}df()&&(ki("http",lf,2,!0),ki("https",lf,2,!0),ki("blob",lf,2,!0)),G("shaka.net.HttpXHRPlugin",mf),mf.parse=vf;var bf=e.XMLHttpRequest;function Ef(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function Tf(e){return e.Ra().map((function(e){return"{"+encodeURI(e)+"}"})).join("")+":"+e.Ua+":"+e.Ca}function Af(e,t){return $o(e.g.Ra(),e.g.Ua,e.g.Ca,t.streaming.retryParameters)}function wf(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function Sf(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function xf(e){var t=this;this.A=e,this.h=new Map,this.i=new Di((function(){return If(t).catch((function(){}))})),this.j=[],this.m=function(){},this.l=function(){},this.g=new wf}function If(e){var t=e.j.map((function(e){return e()}));return e.j=[],Promise.all(t)}function kf(e,t,n,i,r,a){Oi(e.i);var o=(e.h.get(t)||Promise.resolve()).then((function(){var t,o,s,u,l,c,d;return _((function(h){if(1==h.g)return E(h,function(e,t){var n,i,r,a;return _((function(o){return 1==o.g?(n=Ri,i=e.A.request(n,t),r=function(){return i.abort()},e.j.push(r),E(o,i.promise,2)):(a=o.h,it(e.j,r),o.return(a.data))}))}(e,n),2);if(t=h.h,e.i.g)throw new Ee(2,9,7001);if(r)for(u in o=Lt(t),(s=new jc(o)).data)l=Number(u),c=s.data[l],d=s.g[l],e.l(c,d);e.g.close(i,t.byteLength);var f=e.g;return e.m(0==f.i?0:f.j/f.i,e.g.h),h.return(a(t))}))}));e.h.set(t,o)}function Cf(e,t,n){Oi(e.i);var i=(e.h.get(t)||Promise.resolve()).then((function(){return _((function(e){return E(e,n(),0)}))}));e.h.set(t,i)}function Mf(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new Ot,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 Lf(e,t){return new Promise((function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return _((function(i){if(1==i.g)return null==r.result?(n(),i.return()):(e=r.result,E(i,t(e.key,e.value,e),2));e.continue(),T(i)}))}}))}function Nf(e){this.h=e,this.g=[]}function Rf(e,t){return _f(e,t,"readwrite")}function _f(e,t,n){var i=new Mf(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then((function(){it(e.g,i)}),(function(){it(e.g,i)})),i}function Pf(e,t,n){this.h=new Nf(e),this.i=t,this.g=n}function Df(e){return Promise.reject(new Ee(2,9,9011,"Cannot add new value to "+e))}function Of(e,t,n,i){t=(e=Rf(e.h,t)).store();for(var r={},a=(n=l(n)).next();!a.done;r={Uc:r.Uc},a=n.next())r.Uc=a.value,t.delete(r.Uc).onsuccess=function(e){return function(){return i(e.Uc)}}(r);return e.promise()}function Uf(e,t,n){var i,r,a,o,s,u,c;return _((function(d){if(1==d.g){for(i=_f(e.h,t,"readonly"),r=i.store(
2),a={},o=[],s={},u=l(n),c=u.next();!c.done;s={vc:s.vc,rc:s.rc},c=u.next())s.rc=c.value,s.vc=r.get(s.rc),s.vc.onsuccess=function(e){return function(){null==e.vc.result&&o.push(e.rc),a[e.rc]=e.vc.result}}(s);return E(d,i.promise(),2)}if(o.length)throw new Ee(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function jf(e){this.g=new Nf(e)}function Bf(){this.g=new Map}function Ff(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ta:n,na:i},na:e})}))})),t)return t;throw new Ee(2,9,9013,"Could not find a cell that supports add-operations")}function Gf(e,t,n){if(!(e=e.g.get(t)))throw new Ee(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new Ee(2,9,9013,"Could not find cell with name "+n);return t}function Kf(e,t){Vf.set(e,t)}ki("http",vf,1,!0),ki("https",vf,1,!0),ki("blob",vf,1,!0),wf.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},xf.prototype.destroy=function(){return this.i.destroy()},Mf.prototype.abort=function(){var e=this;return _((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return A(t,2),E(t,e.g,4)}if(2!=t.g)return S(t,0);x(t),T(t)}))},Mf.prototype.store=function(){return this.h},Mf.prototype.promise=function(){return this.g},Nf.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(i=Pf.prototype).destroy=function(){return this.h.destroy()},i.hasFixedKeySpace=function(){return!0},i.addSegments=function(){return Df(this.i)},i.removeSegments=function(e,t){return Of(this,this.i,e,t)},i.getSegments=function(e){var t,n=this;return _((function(i){return 1==i.g?E(i,Uf(n,n.i,e),2):(t=i.h,i.return(t.map((function(e){return n.Te(e)}))))}))},i.addManifests=function(){return Df(this.g)},i.updateManifest=function(){return Promise.reject(new Ee(2,9,9016,"Cannot modify values in "+this.g))},i.updateManifestExpiration=function(e,t){var n=Rf(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()},i.removeManifests=function(e,t){return Of(this,this.g,e,t)},i.getManifests=function(e){var t,n=this;return _((function(i){return 1==i.g?E(i,Uf(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map((function(e){return n.Ac(e)})))))}))},i.getAllManifests=function(){var e,t,n=this;return _((function(i){return 1==i.g?(e=_f(n.h,n.g,"readonly"),t=new Map,E(i,Lf(e,(function(e,i){var r;return _((function(a){if(1==a.g)return E(a,n.Ac(i),2);r=a.h,t.set(e,r),T(a)}))})),2)):3!=i.g?E(i,e.promise(),3):i.return(t)}))},i.Te=function(e){return e},i.Ac=function(e){return Promise.resolve(e)},i.add=function(e,t){var n,i,r,a,o,s,u,c=this;return _((function(d){if(1==d.g){for(n=Rf(c.h,e),i=n.store(),r=[],a={},o=l(t),s=o.next();!s.done;a={Vc:a.Vc},s=o.next())u=s.value,a.Vc=i.add(u),a.Vc.onsuccess=function(e){return function(){r.push(e.Vc.result)}}(a);return E(d,n.promise(),2)}return d.return(r)}))},jf.prototype.destroy=function(){return this.g.destroy()},jf.prototype.getAll=function(){var e,t,n=this;return _((function(i){return 1==i.g?(e=_f(n.g,"session-ids","readonly"),t=[],E(i,Lf(e,(function(e,n){t.push(n)})),2)):3!=i.g?E(i,e.promise(),3):i.return(t)}))},jf.prototype.add=function(e){for(var t=Rf(this.g,"session-ids"),n=t.store(),i=(e=l(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},jf.prototype.remove=function(e){var t,n=this;return _((function(i){return 1==i.g?E(i,Lf(t=Rf(n.g,"session-ids"),(function(t,n,i){e.includes(n.sessionId)&&i.delete()})),2):E(i,t.promise(),0)}))},Bf.prototype.destroy=function(){for(var e=[],t=l(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Bf.prototype.init=function(){var e=this;Vf.forEach((function(t,n){var i=t();i&&e.g.set(n,i)}));for(var t=[],n=l(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},G("shaka.offline.StorageMuxer",Bf),Bf.unregister=function(e){Vf.delete(e)},Bf.register=Kf,Bf.prototype.destroy=Bf.prototype.destroy;
2var Vf=new Map;function zf(){Pf.apply(this,arguments)}function Hf(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=l(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=l(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){var r=n++,a=l(e);for(i=a.next();!i.done;i=a.next())i.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=(a=l(t)).next();!i.done;i=a.next())i.value.variantIds.push(r);if(e.length&&t.length)for(i=(t=l(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=l(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=l(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?qf(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:e.kind,language:e.language,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=qf(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r,tilesLayout:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}(n,e.startTime,t)}))}function qf(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 Ee(2,9,9004,"Could not parse uri "+e)}function Xf(){Pf.apply(this,arguments)}function Wf(e,t,n){return{id:e.id,originalId:e.originalId,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,kind:e.kind,language:e.language,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:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}function Yf(){Pf.apply(this,arguments)}function Jf(){this.m=this.j=this.i=this.h=this.g=this.l=null}function $f(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function Qf(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 $f(t,n,i,Number(e[4])):null}function Zf(e,t){this.h=e,this.g=t}function ep(e,t){var n=new mo(null,0);n.eb(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=l(t),o=a.next();!o.done;o=a.next()){var s=l(o.value.variantIds);for(o=s.next();!o.done;o=s.next())r.add(o.value)}for(a=l(n),o=a.next();!o.done;o=a.next())for(s=l(o.value.variantIds),o=s.next();!o.done;o=s.next())r.add(o.value);for(a=new Map,r=l(r),o=r.next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=l(t),r=t.next();!r.done;r=t.next())for(r=r.value,o=tp(e,r,i),s=l(r.variantIds),r=s.next();!r.done;r=s.next())(r=a.get(r.value)).language=o.language,r.primary=r.primary||o.primary,r.audio=o;for(n=l(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=tp(e,r,i),o=l(r.variantIds),r=o.next();!r.done;r=o.next())(r=a.get(r.value)).primary=r.primary||t.primary,r.video=t;return a}(e,i,r,n),r=t.streams.filter((function(e){return e.type==Pe})).map((function(t){return tp(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return tp(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=l(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,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:a,sequenceMode:t.sequenceMode||!1}}function tp(e,t,n){var i=t.segments.map((function(t){return function(e,t){var n=new $f("segment",e.h,e.g,t.dataKey);return new go(t.startTime,t.endTime,(function(){return[n.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new $f("segment",e.h,e.g,t);return new po((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||"")}(e,t)}));return n.kc(i),{id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oo(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,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout}}function np(){this.g=null}function ip(){}function rp(e){var t=Qf(e);return t&&"manifest"==t.g?e=bi(e={uri:e,qf:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Bf;return bi(void 0).oa((function(){return n.init()})).oa((function(){return Gf(n,t.Ta(),t.na())})).oa((function(e){return e.getSegments([t.key()])})).oa((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}(t.key(),t):vi(new Ee(2,1,9004,e)),e}function ap(e,t,n){var i,r,a,o,s,u;return _((function(c){switch(c.g){case 1:i=[];for(var d=[],h=l(n),f=h.next();!f.done;f=h.next()){f=f.value;for(var p=!1,g=l(d),m=g.next();!m.done;m=g.next())if(op((m=m.value).info,f)){m.sessionIds.push(f.sessionId),p=!0;break}p||d.push({info:f,sessionIds:[f.sessionId]})}
2r=l(d),a=r.next();case 2:if(a.done){c.D(4);break}return o=a.value,s=function(e,t,n){var i,r;return _((function(a){switch(a.g){case 1:return i=new qi({Qb:t,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(a,2),i.configure(e),E(a,function(e,t,n,i,r,a){var o=new Map;return(r={audioCapabilities:r,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:i,serverCertificateUri:"",initData:null,keyIds:null}],o.set(t,r),tr(e,o,[])}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:S(a,3);break;case 2:return x(a),E(a,i.destroy(),5);case 5:case 9:return a.return([]);case 3:return A(a,6),E(a,Ji(i),8);case 8:S(a,7);break;case 6:return x(a),E(a,i.destroy(),9);case 7:return r=[],E(a,Promise.all(n.sessionIds.map((function(e){return _((function(t){return 1==t.g?(A(t,2),E(t,function(e,t){var n,i,r;return _((function(a){return 1==a.g?E(a,nr(e,t),2):3!=a.g?(n=a.h)?(i=[],(r=e.i.get(n))&&(r.fb=new Ot,i.push(r.fb)),i.push(n.remove()),E(a,Promise.all(i),3)):a.return():(e.i.delete(n),void T(a))}))}(i,e),4)):2!=t.g?(r.push(e),S(t,0)):(x(t),void T(t))}))}))),10);case 10:return E(a,i.destroy(),11);case 11:return a.return(r)}}))}(e,t,o),E(c,s,5);case 5:u=c.h,i=i.concat(u),a=r.next(),c.D(2);break;case 4:return c.return(i)}}))}function op(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&rt(e.audioCapabilities,t.audioCapabilities,n)&&rt(e.videoCapabilities,t.videoCapabilities,n)}function sp(e,t){var n=ep(new Zf(e.Ta(),e.na()),t),i=t.appMetadata||{};return n=up(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 up(e){for(var t=[],n=function(e){return e.filter((function(e){return Vn(e)}))}(e.variants),i=(n=l(n)).next();!i.done;i=n.next())t.push(On(i.value));for(n=(e=l(e.textStreams)).next();!n.done;n=e.next())t.push(Un(n.value));return t}function lp(){this.g={}}function cp(e,t){var n=t.audio,i=t.video;
2if(n&&!i&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&i&&(e.g[i.id]=i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,a=i.bandwidth||t.bandwidth-r;0>=a&&(a=t.bandwidth),e.g[n.id]=r,e.g[i.id]=a}}function dp(e,t){e.g[t.id]=t.bandwidth||2048}function hp(e,t){var n=e.g[t];return null==n&&(n=0),n}function fp(){this.h=[],this.g=this.i=0}function pp(e){var t=this;if(e&&e.constructor!=iu)throw new Ee(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.Dc()):(this.h=Ys(),this.g=new Ii),this.i=[],this.j=[];var n=!e;this.l=new Di((function(){var e,i,r,a,o;return _((function(s){switch(s.g){case 1:return E(s,Promise.all(t.j.map((function(e){return If(e)}))),2);case 2:for(e=function(){},i=[],r=l(t.i),a=r.next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return E(s,Promise.all(i),3);case 3:if(!n){s.D(4);break}return E(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,T(s)}}))}))}function gp(){if(gn())e:{for(var e=l(Vf.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 mp(e){var t,n,i;return _((function(r){switch(r.g){case 1:return E(r,(t=new Bf).init(),2);case 2:return E(r,Ff(t),3);case 3:return n=r.h,i=new $f("manifest",n.path.Ta,n.path.na,e),E(r,t.destroy(),4);case 4:return E(r,(new pp).remove(i.toString()),0)}}))}function vp(e,t,n,i){var r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,T,w;return _((function(S){switch(S.g){case 1:return r=new Bf,a=Tf(t),o=!1,d=0,A(S,2,3),E(S,r.init(),5);case 5:return E(S,Ff(r),6);case 6:return E(S,(u=S.h).na.addSegments([n]),7);case 7:return h=S.h,s=h[0],i(),E(S,function(){var e,t=Cp;return _((function(n){return 1==n.g?(e=++t.i,t.g?E(n,new Promise((function(n){t.h.push((function(){t.g=e,n()}))})),2):(t.g=e,n.D(2))):n.return(e)}))}(),8);case 8:return d=S.h,i(),E(S,u.na.getManifests([e]),9);case 9:for(f=S.h,i(),c=f[0],p=!0,g=l(c.streams),m=g.next();!m.done;m=g.next())for(v=m.value,y=l(v.segments),b=y.next();!b.done;b=y.next())(T=b.value).pendingSegmentRefId==a&&(T.dataKey=s,T.pendingSegmentRefId=void 0),T.pendingInitSegmentRefId==a&&(T.initSegmentKey=s,T.pendingInitSegmentRefId=void 0),T.pendingSegmentRefId&&(p=!1),T.pendingInitSegmentRefId&&(p=!1);return c.size+=n.data.byteLength,p&&(c.isIncomplete=!1),E(S,u.na.updateManifest(e,c),10);case 10:o=!0,i();case 3:return I(S),E(S,r.destroy(),11);case 11:Cp.release(d),k(S,4);break;case 2:return w=x(S),E(S,mp(e),12);case 12:if(!u||o||!s){S.D(13);break}return E(S,u.na.removeSegments([s],(function(){})),13);case 13:throw w;case 4:return S.return(c)}}))}function yp(e){return e.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t}))}function bp(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 Ep(e,t){for(var n=[],i=l(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:nn(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:nn(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function Tp(e,t,n){return _((function(i){return E(i,function(e,t,n,i){var r,a,o;return _((function(s){return 1==s.g?i.drmInfo?(r=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new Ee(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=i.sessionIds.map((function(e){return{sessionId:e,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:Ep(i,!1),videoCapabilities:Ep(i,!0)}})),E(s,ap(t,e,a),2)):s.return():3!=s.g?(o=s.h,E(s,r.remove(o),3)):E(s,r.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.g,e.h.drm,n,t),0)}))}function Ap(e,t,n){function i(){}var r=function(e){for(var t=new Set,n=(e=l(e.streams)).next();!n.done;n=e.next())for(var i=(n=l(n.value.segments)).next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey);return Array.from(t)}(n);return sp(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}function wp(e,t,n,i,r){var a={id:i.id,originalId:i.originalId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,kind:i.kind,language:i.language,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};return function(e,t,n){if(t=e.segmentIndex.find(t),null!=t)for(var i=e.segmentIndex.get(t);i;)n(i),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.qb(),(function(n){var o=Tf(n),s=void 0;if(!r.has(o)){var u=n.endTime-n.startTime;u=hp(t,i.id)*u,u=Sf(e.g,u),r.set(o,new Ef(n,u,i.id,!1))}n.g&&(s=Tf(n.g),r.has(s)||(u=.5*hp(t,i.id),u=Sf(e.g,u),r.set(s,new Ef(n.g,u,
2i.id,!0)))),a.segments.push({pendingInitSegmentRefId:s,initSegmentKey:s?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:o,dataKey:0})})),a}function Sp(e){if(e.l.g)throw new Ee(2,9,7001)}function xp(){if(!gp())throw new Ee(2,9,9e3)}function Ip(e,t){return _((function(n){return 1==n.g?(e.i.push(t),w(n),E(n,t,4)):2!=n.g?n.return(n.h):(I(n),it(e.i,t),k(n,0))}))}function kp(e){for(var t=new Set,n=l(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(i=(n=l(e.imageStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=l(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}m(zf,Pf),zf.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return _((function(o){return n=Rf(a.h,a.g),i=n.store(),r=new Ot,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new Ee(2,9,9012,"Could not find values for "+e))},E(o,Promise.all([n.promise(),r]),0)}))},zf.prototype.Ac=function(e){var t,n,i,r,a,o;return _((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,a=Hf(e.periods[n],r),t.push(a);return E(s,Od(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})}))},zf.prototype.Te=function(e){return{data:e.data}},m(Xf,Pf),Xf.prototype.Ac=function(e){var t,n,i,r,a,o;return _((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var u=e.periods[n],c=[],d=l(u.streams),h=d.next();!h.done;h=d.next())0!=(h=h.value).variantIds.length&&c.push(Wf(h,u.startTime,u.startTime+r));a=c,t.push(a)}return E(s,Od(t),2)}return o=s.h,s.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:o,sequenceMode:!1})}))},m(Yf,Pf),(i=Yf.prototype).hasFixedKeySpace=function(){return!1},i.addSegments=function(e){return this.add(this.i,e)},i.addManifests=function(e){return this.add(this.g,e)},i.updateManifest=function(e,t){return function(e,t,n){var i=(e=Rf(e.h,e.g)).store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}(this,e,t)},i.Ac=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(i=Jf.prototype).init=function(){var t=this,n=new Ot,i=e.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){var e=i.result;t.l=e;var r=e.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new zf(e,"segment","manifest"):null,t.g=r,r=(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new Xf(e,"segment-v2","manifest-v2"):null,t.h=r,r=(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new Xf(e,"segment-v3","manifest-v3"):null,t.i=r,r=(r=e.objectStoreNames).contains("manifest-v5")&&r.contains("segment-v5")?new Yf(e,"segment-v5","manifest-v5"):null,t.j=r,e=e.objectStoreNames.contains("session-ids")?new jf(e):null,t.m=e,n.resolve()},i.onupgradeneeded=function(){for(var e=i.result,t=l(["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})},i.onerror=function(e){n.reject(new Ee(2,9,9001,i.error)),e.preventDefault()},n},i.destroy=function(){var e=this;return _((function(t){switch(t.g){case 1:if(!e.g){t.D(2);break}return E(t,e.g.destroy(),2);case 2:if(!e.h){t.D(4);break}return E(t,e.h.destroy(),4);case 4:if(!e.i){t.D(6);break}return E(t,e.i.destroy(),6);case 6:if(!e.j){t.D(8);break}return E(t,e.j.destroy(),8);case 8:if(!e.m){t.D(10);break}return E(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),T(t)}}))},i.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},i.getEmeSessionCell=function(){return this.m},i.erase=function(){var t=this;return _((function(n){switch(n.g){case 1:if(!t.g){n.D(2);break}return E(n,t.g.destroy(),2);case 2:if(!t.h){n.D(4);break}return E(n,t.h.destroy(),4);case 4:if(!t.i){n.D(6);break}return E(n,t.i.destroy(),6);case 6:if(!t.j){n.D(8);break}return E(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),E(n,function(){var t=new Ot,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new Ee(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,E(n,t.init(),0)}}))},Kf("idb",(function(){return En("CrKey")||!e.indexedDB?null:new Jf})),$f.prototype.Ta=function(){return this.i},$f.prototype.na=function(){return this.h},$f.prototype.key=function(){return this.l},$f.prototype.toString=function(){return this.j},(i=np.prototype).configure=function(){},i.start=function(e,t){var n,i,r,a,o,s,u=this;return _((function(l){switch(l.g){case 1:if(n=Qf(e),u.g=n,null==n||"manifest"!=n.g)throw new Ee(2,1,9004,e);return i=new Bf,w(l),E(l,i.init(),4);case 4:return E(l,Gf(i,n.Ta(),n.na()),5);case 5:return E(l,l.h.getManifests([n.key()]),6);case 6:return r=l.h,a=r[0],o=new Zf(n.Ta(),n.na()),s=ep(o,a),t.makeTextStreamsForClosedCaptions(s),l.return(s);case 2:return I(l),E(l,i.destroy(),7);case 7:k(l,0)}}))},i.stop=function(){return Promise.resolve()},i.update=function(){},i.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u,l=this;return _((function(c){switch(c.g){case 1:return n=l.g,i=new Bf,A(c,2,3),E(c,i.init(),5);case 5:return E(c,Gf(i,n.Ta(),n.na()),6);case 6:return E(c,(r=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),u=null==o.expiration||o.expiration>t,!s||!u){c.D(3);break}return E(c,r.updateManifestExpiration(n.key(),t),3);case 3:return I(c),E(c,i.destroy(),10);case 10:k(c,0);break;case 2:x(c),c.D(3)}}))},Er["application/x-offline-manifest"]=function(){return new np},G("shaka.offline.OfflineScheme",ip),ip.plugin=rp,ki("offline",rp),fp.prototype.release=function(e){e==this.g&&(this.g=0,0<this.h.length&&this.h.shift()())},(i=pp.prototype).destroy=function(){return this.l.destroy()},i.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=Xs(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Ae("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),Js(this.h,e)},i.getConfiguration=function(){var e=Ys();return Js(e,this.h,Ys()),e},i.Dc=function(){return this.g},i.store=function(e,t,n){var i=this,r=this.getConfiguration(),a=new xf(this.g);this.j.push(a),t=function(e,t,n,i,r,a){var o,s,u,c,d,h,f,p,g,m,v,y,b;return _((function(w){switch(w.g){case 1:return xp(),s=o=null,u=new Bf,h=d=c=null,A(w,2,3),E(w,i(),5);case 5:return o=w.h,E(w,function(e,t,n,i){var r,a,o,s,u;return _((function(l){if(1==l.g)return r=null,a=e.g,o={networkingEngine:a,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){r=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},n.configure(i.manifest),Sp(e),E(l,n.start(t,o),2);if(3!=l.g)return s=l.h,Sp(e),u=kp(s),E(l,Promise.all(te(u,(function(e){return e.createSegmentIndex()}))),3);if(Sp(e),r)throw r;return l.return(s)}))}(e,t,o,r),6);case 6:if(f=w.h,Sp(e),!(!f.presentationTimeline.T()&&!f.presentationTimeline.Nb()))throw new Ee(2,9,9005,t);return E(w,function(e,t,n,i){var r;
2return _((function(a){switch(a.g){case 1:return(r=new qi({Qb:e.g,onError:n,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(i.drm),E(a,function(e,t,n){return e.ea=!0,e.F=[],e.N=n,Wi(e,t)}(r,t.variants,i.offline.usePersistentLicense),2);case 2:return E(a,Ji(r),3);case 3:return E(a,$i(r),4);case 4:return a.return(r)}}))}(e,f,(function(e){h=h||e}),r),7);case 7:if(s=w.h,Sp(e),h)throw h;return E(w,function(e,t){var n,i,r,a,o,s,u,c,d,h,f,p,g,m,v,y,b,w,I,k,C,M,L,N,R,P,D,O;return _((function(_){switch(_.g){case 1:return n={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return kn(e,t,n)}))}(e,t.restrictions,n),E(_,Mn(e,t.offline.usePersistentLicense),2);case 2:for(i=[],r=t.preferredAudioChannelCount,a=t.preferredDecodingAttributes,o=t.preferredVideoCodecs,s=t.preferredAudioCodecs,Sn(e,o,s,r,a),u=l(e.variants),c=u.next();!c.done;c=u.next())d=c.value,i.push(On(d));for(h=l(e.textStreams),f=h.next();!f.done;f=h.next())p=f.value,i.push(Un(p));for(g=l(e.imageStreams),m=g.next();!m.done;m=g.next())v=m.value,i.push(jn(v));return E(_,t.offline.trackSelectionCallback(i),3);case 3:for(y=_.h,b=e.presentationTimeline.getDuration(),w=0,I=l(y),k=I.next();!k.done;k=I.next())C=k.value,M=C.bandwidth*b/8,w+=M;return A(_,4),E(_,t.offline.downloadSizeCallback(w),6);case 6:if(!_.h)throw new Ee(2,9,9014);S(_,5);break;case 4:if((L=x(_))instanceof Ee)throw L;throw new Ee(2,9,9015);case 5:for(N=new Set,R=new Set,P=new Set,D=l(y),k=D.next();!k.done;k=D.next())"variant"==(O=k.value).type&&N.add(O.id),"text"==O.type&&R.add(O.id),"image"==O.type&&P.add(O.id);e.variants=e.variants.filter((function(e){return N.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return R.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return P.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=l(t),i=n.next();!i.done;i=n.next())for(var r=(i=l(t)).next();!r.done;r=i.next());for(t=l(e),n=t.next();!n.done;n=t.next())for(n=l(e),i=n.next();!i.done;i=n.next());}(e),T(_)}}))}(f,r),8);case 8:return E(w,u.init(),9);case 9:return Sp(e),E(w,Ff(u),10);case 10:return c=w.h,Sp(e),p=function(e,t,n,i,r,a){var o=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=up(t),appMetadata:n,isIncomplete:!1}}(n,t,i),s=r.offline.progressCallback;!function(e,t,n){e.m=t,e.l=n}(a,(function(e,t){o.size=t,s(o,e)}),(function(t,n){u&&r.offline.usePersistentLicense&&c==n&&Qi(e,"cenc",t)}));var u=yp(t)&&!bp(t),c=null;u&&(c=Mp.get(e.g.keySystem));for(var d=new lp,h=l(t.textStreams),f=h.next();!f.done;f=h.next())d.g[f.value.id]=52;for(h=l(t.imageStreams),f=h.next();!f.done;f=h.next())dp(d,f.value);for(f=l(t.variants),h=f.next();!h.done;h=f.next())cp(d,h.value);return d=function(e,t,n){for(var i=new Map,r=kp(n),a=new Map,o=(r=l(r)).next();!o.done;o=r.next()){var s=wp(e,t,n,o=o.value,i);a.set(o.id,s)}for(e=l(n.variants),t=e.next();!t.done;t=e.next())(t=t.value).audio&&a.get(t.audio.id).variantIds.push(t.id),t.video&&a.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(a.values()),Ce:Array.from(i.values())}}(a,d,t),a=d.streams,d=d.Ce,f=e.g,h=r.offline.usePersistentLicense,f&&h&&(f.initData=[]),{Hg:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Cc(),streams:a,sessionIds:h?er(e):[],drmInfo:f,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode},Ce:d}}(s,f,t,n,r,a),g=p.Hg,m=p.Ce,E(w,c.na.addManifests([g]),11);case 11:if(v=w.h,Sp(e),d=v[0],Sp(e),h)throw h;return E(w,function(e,t,n,i,r,a,o,s,u){var c,d;return _((function(h){switch(h.g){case 1:if(c=function(t,c){var d,h,f,p,g,m,v,y;return _((function(b){if(1==b.g){for(d=function(){Sp(e)},h={},f=l(t),p=f.next();!p.done;h={Rc:h.Rc,wb:h.wb},p=f.next())h.wb=p.value,h.Rc=void 0,g=Af(h.wb,a),m=h.wb.i,v=h.wb.h,y=function(e){return function(t){return e.Rc=t,Promise.resolve()}}(h),kf(r,h.wb.groupId,g,m,v,y),Cf(r,h.wb.groupId,function(e){return function(){var t;return _((function(r){if(1==r.g)return t=e.wb.g,E(r,vp(n,t,{data:e.Rc},d),2);i=r.h||i,T(r)}))}}(h));return E(b,function(e){return _((function(t){return 1==t.g?E(t,Promise.all(e.h.values()),2):t.return(e.g.h)}))}(r),2)}return c?(Sp(e),function(e,t,n,i){if(t.expiration=n.Cc(),n=er(n),t.sessionIds=i.offline.usePersistentLicense?n:[],yp(e)&&i.offline.usePersistentLicense&&!n.length)throw new Ee(2,9,9007)}(s,i,u,a),E(b,o.updateManifest(n,i),0)):b.D(0)}))},d=!1,!yp(s)||!d||bp(s)){h.D(2);break}return E(h,c(t.filter((function(e){return e.h})),!0),3);case 3:Sp(e),t=t.filter((function(e){return!e.h}));case 2:if(d){h.D(0);break}return E(h,c(t,!1),5);case 5:Sp(e),T(h)}}))}(e,m,d,g,a,r,c.na,f,s),12);case 12:return Sp(e),y=new $f("manifest",c.path.Ta,c.path.na,d),w.return(sp(y,g));case 3:return I(w),E(w,u.destroy(),13);case 13:if(!o){w.D(14);break}return E(w,o.stop(),14);case 14:if(!s){w.D(16);break}return E(w,s.destroy(),16);case 16:k(w,0);break;case 2:if(b=x(w),null==d){w.D(18);break}return E(w,mp(d),18);case 18:throw h||b}}
2))}(this,e,t||{},(function(){var t;return _((function(a){return 1==a.g?E(a,vr(e,i.g,r.manifest.retryParameters,n||null),2):(t=a.h,a.return(Me(t)))}))}),r,a);var o=new mi(t,(function(){return If(a)}));return o.finally((function(){it(i.j,a)})),o.then=function(e){return Ae("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise.  Please update to conform to this new API; you can use the |chain| method instead."),o.promise.then(e)},function(e,t){var n=t.promise;return e.i.push(n),t.finally((function(){it(e.i,n)}))}(this,o)},i.ug=function(){return Ae("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},i.remove=function(e){return Ip(this,function(e,t){var n,i,r,a,o,s;return _((function(u){switch(u.g){case 1:if(xp(),null==(n=Qf(t))||"manifest"!=n.g)throw new Ee(2,9,9004,t);return i=n,r=new Bf,w(u),E(u,r.init(),4);case 4:return E(u,Gf(r,i.Ta(),i.na()),5);case 5:return E(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],E(u,Promise.all([Tp(e,s,r),Ap(a,i,s)]),2);case 2:return I(u),E(u,r.destroy(),8);case 8:k(u,0)}}))}(this,e))},i.Wg=function(){return Ip(this,function(e){var t,n,i,r,a,o,s,u,c,d;return _((function(h){switch(h.g){case 1:return xp(),t=e.g,n=e.h.drm,i=new Bf,r=!1,w(h),E(h,i.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),o=l(a),s=o.next();case 5:if(s.done){h.D(2);break}return E(h,(u=s.value).getAll(),8);case 8:return c=h.h,E(h,ap(n,t,c),9);case 9:return d=h.h,E(h,u.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),h.D(5);break;case 2:return I(h),E(h,i.destroy(),11);case 11:k(h,3);break;case 3:return h.return(!r)}}))}(this))},i.list=function(){return Ip(this,_((function(i){switch(i.g){case 1:return xp(),e=[],t=new Bf,w(i),E(i,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEac
2h((function(e,i){t({Ta:n,na:i},e)}))}))}(t,(function(t,i){n=n.then((function(){return _((function(n){if(1==n.g)return E(n,i.getAllManifests(),2);n.h.forEach((function(n,i){var r=sp(new $f("manifest",t.Ta,t.na,i),n);e.push(r)})),T(n)}))}))})),E(i,n,2);case 2:return I(i),E(i,t.destroy(),6);case 6:k(i,3);break;case 3:return i.return(e)}})));var e,t,n},G("shaka.offline.Storage",pp),pp.deleteAll=function(){var e;return _((function(t){return 1==t.g?(e=new Bf,w(t),E(t,function(e){var t,n;return _((function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0<t.length)||Vf.forEach((function(e){(e=e())&&t.push(e)})),E(i,Promise.all(t.map((function(e){return e.erase()}))),2)):n?i.D(0):E(i,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(I(t),E(t,e.destroy(),5)):k(t,0)}))},pp.prototype.list=pp.prototype.list,pp.prototype.removeEmeSessions=pp.prototype.Wg,pp.prototype.remove=pp.prototype.remove,pp.prototype.getStoreInProgress=pp.prototype.ug,pp.prototype.store=pp.prototype.store,pp.prototype.getNetworkingEngine=pp.prototype.Dc,pp.prototype.getConfiguration=pp.prototype.getConfiguration,pp.prototype.configure=pp.prototype.configure,pp.prototype.destroy=pp.prototype.destroy,pp.support=gp;var Cp=new fp,Mp=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function Lp(){}function Np(){for(var e=l(_p),t=e.next();!t.done;t=e.next()){t=t.value;try{t.Mf()}catch(e){q("Error installing polyfill!",e)}}}function Rp(e,t){for(var n={priority:t||0,Mf:e},i=l(re(_p)),r=i.next();!r.done;r=i.next()){var a=(r=r.value).ra;if(r.item.priority<n.priority)return void _p.splice(a,0,n)}_p.push(n)}Ml.offline=gp,G("shaka.polyfill",Lp),Lp.register=Rp,Lp.installAll=Np;var _p=[];function Pp(){}function Dp(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=l(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Op(t.value)}function Op(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||null==e?this.removeAttribute(t):this.setAttribute(t,e)}})}function Up(){}function jp(){xv()}function Bp(){}function Fp(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Gp),document.addEventListener("webkitfullscreenerror",Gp),document.addEventListener("mozfullscreenchange",Gp),document.addEventListener("mozfullscreenerror",Gp),document.addEventListener("MSFullscreenChange",Gp),document.addEventListener("MSFullscreenError",Gp)}}function Gp(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function Kp(){}function Vp(){}function zp(){}function Hp(){(En("CrKey")||yn()||En("PlayStation 5")||!navigator.mediaCapabilities)&&(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Xp=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=qp)}function qp(e){var t,n,i,r,a,o,s,u,l,c,d,h;return _((function(f){switch(f.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},!e)return f.return(t);if("media-source"==e.type){if(!gn()||e.video&&(n=e.video.contentType,!MediaSource.isTypeSupp
2orted(n))||e.audio&&(i=e.audio.contentType,!MediaSource.isTypeSupported(i)))return f.return(t)}else{if("file"!=e.type)return f.return(t);if(e.video&&(r=e.video.contentType,!mn(r))||e.audio&&(a=e.audio.contentType,!mn(a)))return f.return(t)}return e.keySystemConfiguration?(o=e.keySystemConfiguration,s=[],u=[],o.audio&&(l={robustness:o.audio.robustness||"",contentType:e.audio.contentType},s.push(l)),o.video&&(c={robustness:o.video.robustness||"",contentType:e.video.contentType},u.push(c)),d={initDataTypes:[o.initDataType],distinctiveIdentifier:o.distinctiveIdentifier,persistentState:o.persistentState,sessionTypes:o.sessionTypes},s.length&&(d.audioCapabilities=s),u.length&&(d.videoCapabilities=u),A(f,3),E(f,navigator.requestMediaKeySystemAccess(o.keySystem,[d]),5)):(t.supported=!0,f.return(Promise.resolve(t)));case 5:h=f.h,S(f,4);break;case 3:x(f);case 4:h&&(t.supported=!0,t.keySystemAccess=h);case 2:return f.return(t)}}))}Lp.Aria=Pp,Pp.install=Dp,Rp(Dp),Lp.EncryptionScheme=Up,Up.install=jp,Rp(jp,-2),Lp.Fullscreen=Bp,Bp.install=Fp,Rp(Fp),Lp.MathRound=Kp,Kp.install=Vp,Rp(Vp),Lp.MediaCapabilities=zp,zp.install=Hp;var Xp=null;function Wp(){}function Yp(){var t=bn();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),n.some((function(e){return e.startsWith("codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(Jp(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Jp()):(En("Tizen 2")||En("Tizen 3")||En("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=an(t)&&e(t)}}()),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;En("Web0S")||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex((function(e){return e.startsWith("vp09")}));return 0<=a&&(r[a]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}()}function Jp(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,P.apply(0,arguments));return t.abort=function(){},t}}function $p(){}function Qp(){screen.orientation||null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new Zp;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new K("change");n.dispatchEvent(e)}))}()}function Zp(){ee.call(this),this.type="",this.angle=0}function eg(){}function tg(){if(e.HTMLVideoElement&&e.WebKitMediaKeys){var t=bn();navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&t&&14<=t||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ig,e.MediaKeys=og,e.MediaKeySystemAccess=ag,navigator.requestMediaKeySystemAccess=ng,e.shakaMediaKeysPolyfill=!0)}}function ng(e,t){try{var n=new ag(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function ig(e){var t=this.mediaKeys;return t&&t!=e&&sg(t,null),delete this.mediaKeys,(this.mediaKeys=e)?sg(e,this):Promise.resolve()}function rg(e){if(Nt(e=Lt(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Kt(e=Ft(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Mt(e),this.dispatchEvent(t)}function ag(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;if("required"==r.persistentState)i=null;else{i={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:r.initDataTypes,sessionTypes:["temporary"],label:r.label};var a=!1,o=!1;if(r.audioCapabilities)for(var s=l(r.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupp
2orted(this.keySystem,u.contentType.split(";")[0])&&(i.audioCapabilities.push(u),o=!0));if(r.videoCapabilities)for(u=(r=l(r.videoCapabilities)).next();!u.done;u=r.next())(s=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(i.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),i=o?i:null}if(i)return void(this.g=i)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function og(e){this.h=new WebKitMediaKeys(e),this.g=new Ui}function sg(e,t){if(e.g.Sb(),!t)return Promise.resolve();e.g.o(t,"webkitneedkey",rg);try{return Ao(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function ug(e){ee.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new Ui,this.sessionId="",this.expiration=NaN,this.closed=new Ot,this.keyStatuses=new cg}function lg(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new K("keystatuseschange"),e.dispatchEvent(n)}function cg(){this.size=0,this.g=void 0}function dg(){}function hg(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,e.MediaKeys=vg,e.MediaKeySystemAccess=gg,navigator.requestMediaKeySystemAccess=fg,HTMLMediaElement.prototype.setMediaKeys=mg,e.shakaMediaKeysPolyfill=!0)}function fg(e,t){try{var n=new gg(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function pg(e){if(e.initData){var t=new CustomEvent("encrypted");t.initDataType="cenc",t.initData=Mt(function(e){if(!e)return e;var t=new jc(e);if(1>=t.data.length)return e;e=[];for(var n={},i=(t=l(t.data)).next();!i.done;n={Sc:n.Sc},i=t.next())n.Sc=i.value,e.some(function(e){return function(t){return kt(t,e.Sc)}}(n))||e.push(n.Sc);return $t.apply(Ht,c(e))}(e.initData)),this.dispatchEvent(t)}}function gg(e,t){this.keySystem=e;for(var n=!1,i=l(t),r=i.next();!r.done;r=i.next()){var a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(r=r.value).initDataTypes,sessionTypes:["temporary"],label:r.label},o=!1;if(r.audioCapabilities)for(var s=l(r.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.audioCapabilities.push(u),n=!0));if(r.videoCapabilities)for(u=(s=l(r.videoCapabilities)).next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==r.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function mg(e){var t=this.mediaKeys;return t&&t!=e&&yg(t,null),delete this.mediaKeys,(this.mediaKeys=e)?yg(e,this):Promise.resolve()}function vg(e){this.h=new MSMediaKeys(e),this.g=new Ui}function yg(e,t){if(e.g.Sb(),!t)return Promise.resolve();e.g.o(t,"msneedkey",pg);try{return Ao(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.msSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function bg(e){ee.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new Ui,this.sessionId="",this.expiration=NaN,this.closed=new Ot,this.keyStatuses=new Tg}function Eg(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new K("keystatuseschange"),e.dispatchEvent(n)}function Tg(){this.size=0,this.g=void 0}function Ag(){}function wg(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Sg,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xg,e.MediaKeys=Ig,e.MediaKeySystemAccess=kg,e.shakaMediaKeysPolyfill=!0)}function Sg(){return Promise.reject(Error("The key system specified is not supported."))}function xg(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Ig(){throw new TypeError("Illegal constructor.")}function kg(){throw this.keySystem="",new TypeError("Illegal constructor.")}function Cg(){}function Mg(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
2(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Kg="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ng,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Rg,e.MediaKeys=Pg,e.MediaKeySystemAccess=_g,e.shakaMediaKeysPolyfill=!0}}function Lg(e){return Kg?Kg+e.charAt(0).toUpperCase()+e.slice(1):e}function Ng(e,t){try{var n=new _g(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Rg(e){var t=this.mediaKeys;return t&&t!=e&&Dg(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Dg(e,this),Promise.resolve()}function _g(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var a=l(t),o=a.next();!o.done;o=a.next()){var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(o=o.value).initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=l(o.audioCapabilities),d=c.next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(d),i=!0));if(o.videoCapabilities)for(d=(c=l(o.videoCapabilities)).next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType,this.g)&&(s.videoCapabilities.push(d),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Pg(e){this.l=e,this.h=null,this.g=new Ui,this.i=[],this.j=new Map}function Dg(e,t){e.h=t,e.g.Sb();var n=Kg;t&&(e.g.o(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=Mt(t.initData),e.h.dispatchEvent(n)})),e.g.o(t,n+"keymessage",(function(t){var n=Og(e,t.sessionId);n&&(t=new K("message",t=(new Map).set("messageType",null==n.keyStatuses.g?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.g.o(t,n+"keyadded",(function(t){(t=Og(e,t.sessionId))&&(Fg(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.g.o(t,n+"keyerror",(function(t){var n=Og(e,t.sessionId);n&&n.handleError(t)})))}function Og(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 Ug(e,t,n){ee.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new Ot,this.keyStatuses=new Gg}function jg(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=Lt(Kt("LOAD_SESSION|"+n));else{var r=Kt("PERSISTENT|");i=$t(r,t)}else i=Lt(t)}catch(e){return Promise.reject(e)}e.h=new Ot;var a=Lg("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new pn((function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}})).R(.01)}return e.h}function Bg(e,t,n){if(e.g)e.g.then((function(){return Bg(e,t,n)})).catch((function(){return Bg(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=Bt(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=Wt(r.keys[0].k),r=Wt(r.keys[0].kid)}else i=Lt(n),r=null;var a=Lg("addKey");try{e.j[a](e.i,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function Fg(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new K("keystatuseschange"),e.dispatchEvent(n)}function Gg(){this.size=0,this.g=void 0}zp.originalMcap=Xp,Rp(Hp,-1),Lp.MediaSource=Wp,Wp.install=Yp,Rp(Yp),Lp.Orientation=$p,$p.install=Qp,m(Zp,ee),Zp.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Zp.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Rp(Qp),Lp.PatchedMediaKeysApple=eg,eg.install=tg,ag.prototype.createMediaKeys=function(){var e=new og(this.keySystem);return Promise.resolve(e)},ag.prototype.getConfiguration=function(){return this.g},og.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new ug(this.h,e)},og.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(ug,ee),(i=ug.prototype).generateRequest=function(e,t){var n=this;this.g=new Ot;try{var i=this.l.createSession("video/mp4",Lt(t));this.i=i,this.sessionId=i.sessionId||"",this.j.o(this.i,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new K("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",Mt(e.message))),n.dispatchEvent(e)})),this.j.o(i,"webkitkeyadded",(function(){n.h&&(lg(n,"usable"),n.h.resolve(),n.h=null)})),this.j.o(i,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");
2if(e.errorCode=n.i.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.h)n.h.reject(e),n.h=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:lg(n,"output-not-allowed");break;default:lg(n,"internal-error")}})),lg(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.h=new Ot;try{this.i.update(Lt(e))}catch(e){this.h.reject(e)}return this.h},i.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=cg.prototype).forEach=function(e){this.g&&e(this.g,gr.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=gr.value();return!(!this.g||!kt(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},Rp(tg),Lp.PatchedMediaKeysMs=dg,dg.install=hg,gg.prototype.createMediaKeys=function(){var e=new vg(this.keySystem);return Promise.resolve(e)},gg.prototype.getConfiguration=function(){return this.g},vg.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new bg(this.h,e)},vg.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(bg,ee),(i=bg.prototype).generateRequest=function(e,t){var n=this;this.g=new Ot;try{this.i=this.l.createSession("video/mp4",Lt(t),null),this.j.o(this.i,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new K("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",Mt(e.message))),n.dispatchEvent(e)})),this.j.o(this.i,"mskeyadded",(function(){n.g?(Eg(n,"usable"),n.g.resolve(),n.g=null):n.h&&(Eg(n,"usable"),n.h.resolve(),n.h=null)})),this.j.o(this.i,"mskeyerror",(function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=n.i.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.h)n.h.reject(e),n.h=null;else switch(n.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Eg(n,"output-not-allowed");break;default:Eg(n,"internal-error")}})),Eg(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.h=new Ot;try{this.i.update(Lt(e))}catch(e){this.h.reject(e)}return this.h},i.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=Tg.prototype).forEach=function(e){this.g&&e(this.g,gr.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=gr.value();return!(!this.g||!kt(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},Rp(hg),Lp.PatchedMediaKeysNop=Ag,Ag.install=wg,Ig.prototype.createSession=function(){},Ig.prototype.setServerCertificate=function(){},kg.prototype.getConfiguration=function(){},kg.prototype.createMediaKeys=function(){},Rp(wg,-10),Lp.PatchedMediaKeysWebkit=Cg,Cg.install=Mg,_g.prototype.createMediaKeys=function(){var e=new Pg(this.g);return Promise.resolve(e)},_g.prototype.getConfiguration=function(){return this.h},Pg.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Ug(t,this.l,e),this.i.push(e),e},Pg.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Ug,ee),(i=Ug.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Fg(this,"output-restricted"):Fg(this,1==t?"expired":"internal-error"))},i.generateRequest=function(e,t){return jg(this,t,null)},i.load=function(e){return"persistent-license"==this.l?jg(this,null,e):Prom
2ise.reject(Error("Not a persistent session."))},i.update=function(e){var t=new Ot;return Bg(this,t,e),t},i.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Lg("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},i.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(i=Gg.prototype).forEach=function(e){this.g&&e(this.g,gr.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=gr.value();return!(!this.g||!kt(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var Kg="";function Vg(){}function zg(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=qg,Object.defineProperty(t,"disablePictureInPicture",{get:Wg,set:Yg,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Xg,document.addEventListener("webkitpresentationmodechanged",Hg,!0))}}function Hg(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function qg(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Xg(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Wg(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Yg(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Jg(){}function $g(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=Qg))}function Qg(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function Zg(){}function em(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=tm)}function tm(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function nm(){}function im(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function rm(){}function am(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=om)}}function om(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function sm(){}function um(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=lm;else if(6==n)t=cm;else{try{var i=!!lm(1,2,"")}catch(e){i=!1}i&&(t=lm)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function lm(t,n,i){return new e.TextTrackCue(t,n,i)}function cm(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function dm(){}Rp(Mg),Lp.PiPWebkit=Vg,Vg.install=zg,Rp(zg),Lp.RandomUUID=Jg,Jg.install=$g,Rp($g),Lp.StorageEstimate=Zg,Zg.install=em,Rp(em),Lp.VideoPlayPromise=nm,nm.install=im,Rp(im),Lp.VideoPlaybackQuality=rm,rm.install=am,Rp(am),Lp.VTTCue=sm,sm.install=um,Rp(um),dm.prototype.parseInit=function(){},dm.prototype.setSequenceMode=function(){},dm.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=Bt(e).split(/\r?\n/),a=(r=l(r)).next();!a.done;a=r.next())if((a=a.value)&&!/^\s+$/.test(a)&&(a=hm.exec(a))){var o=fm.exec(a[1]);a=new ot(o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),t.segmentEnd?t.segmentEnd:o+2,a[2]),n&&(n.endTime=o,i.push(n)),n=a}return n&&i.push(n),i},G("shaka.text.LrcTextParser",dm),dm.prototype.parseMedia=dm.prototype.parseMedia,dm.prototype.setSequenceMode=dm.prototype.setSequenceMode,dm.prototype.parseInit=dm.prototype.parseInit;var hm=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,fm=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function pm(){}function gm(e,t,n,i,r,a,o,s,u,c,d){var h=e.parentNode;if(e.nodeType==Node.COMMENT_NODE)return null;if(e.nodeType==Node.TEXT_NODE){if(!d)return null;var f=document.createElement("span");f.textContent=e.textContent}else f=e;for(var p=null,g=l(Gm),m=g.next();!m.done&&!(p=Tm(f,"backgroundImage",i,"#",m.value)[0]);m=g.next());if(g=d,("p"==e.nodeName||p)&&(d=!0),s="default"==(f.getAttribute("xml:space")||(s?"default":"preserve")),e=[],!(m=Array.from(f.childNodes).every((function(e){return e.no
2deType==Node.TEXT_NODE}))))for(var v=l(f.childNodes),y=v.next();!y.done;y=v.next())(y=gm(y.value,t,n,i,r,a,o,s,u,f,d))&&e.push(y);i=null!=c,v=/\S/.test(f.textContent);var b=f.hasAttribute("begin")||f.hasAttribute("end")||f.hasAttribute("dur");if(!(b||v||"br"==f.tagName||0!=e.length||i&&!s))return null;for(v=(y=wm(f,n)).start,y=y.end;h&&h.nodeType==Node.ELEMENT_NODE&&"tt"!=h.tagName;)v=(y=Am(h,n,v,y)).start,y=y.end,h=h.parentNode;if(null==v&&(v=0),v+=t,y=null==y?1/0:y+t,!b&&0<e.length)for(v=1/0,y=0,n=(t=l(e)).next();!n.done;n=t.next())n=n.value,v=Math.min(v,n.startTime),y=Math.max(y,n.endTime);if("br"==f.tagName)return(r=new ot(v,y,"")).lineBreak=!0,r;if(t="",m&&(t=f.textContent,s&&(t=(t=t.trim()).replace(/\s+/g," "))),(t=new ot(v,y,t)).nestedCues=e,d||(t.isContainer=!0),u&&(t.cellResolution=u),u=Tm(f,"region",a,"")[0],f.hasAttribute("region")&&u&&u.getAttribute("xml:id")){var E=u.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==E}))[0]}return o=u,c&&i&&!f.getAttribute("region")&&!f.getAttribute("style")&&(o=Tm(c,"region",a,"")[0]),function(e,t,n,i,r,a,o){a=a||o,"rtl"==vm(t,n,r,"direction",a)&&(e.direction="rtl"),o=vm(t,n,r,"writingMode",a),"tb"==o||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=ft),(o=vm(t,n,r,"textAlign",!0))?(e.positionAlign=jm[o],e.lineAlign=Um[o],e.textAlign=ct[o.toUpperCase()]):e.textAlign="start",(o=vm(t,n,r,"displayAlign",!0))&&(e.displayAlign=ht[o.toUpperCase()]);(o=vm(t,n,r,"color",a))&&(e.color=o);(o=vm(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o);(o=vm(t,n,r,"border",a))&&(e.border=o);(o=vm(t,n,r,"fontFamily",a))&&(e.fontFamily=o);(o=vm(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=vm(t,n,r,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=vm(t,n,r,"lineHeight",a))&&o.match(Mm)&&(e.lineHeight=o),(o=vm(t,n,r,"fontSize",a))&&(o.match(Mm)||o.match(Cm))&&(e.fontSize=o),(o=vm(t,n,r,"fontStyle",a))&&(e.fontStyle=At[o.toUpperCase()]);if(i){o=i.getAttribute("imageType")||i.getAttribute("imagetype");var s=i.getAttribute("encoding");i=i.textContent.trim(),"PNG"==o&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)}(i=vm(t,n,r,"textOutline",a))&&(i=i.split(" "),i[0].match(Mm)?e.textStrokeColor=e.color:(e.textStrokeColor=i[0],i.shift()),i[0]&&i[0].match(Mm)?e.textStrokeWidth=i[0]:e.textStrokeColor="");(i=vm(t,n,r,"letterSpacing",a))&&i.match(Mm)&&(e.letterSpacing=i),(i=vm(t,n,r,"linePadding",a))&&i.match(Mm)&&(e.linePadding=i),(a=vm(t,n,r,"opacity",a))&&(e.opacity=parseFloat(a));(n=ym(n,r,"textDecoration"))&&mm(e,n),(t=bm(t,r,"textDecoration"))&&mm(e,t)}(t,f,o,p,r,g,0==e.length),t}function mm(e,t){for(var n=l(t.split(" ")),i=n.next();!i.done;i=n.next())switch(i.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&it(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&it(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&it(e.textDecoration,"overline")}}function vm(e,t,n,i,r){return r=void 0===r||r,(e=bm(e,n,i))?e:r?ym(t,n,i):null}function ym(e,t,n){if(!e)return null;var i=Hc(e,Fm,n);return i||Em(e,t,n)}function bm(e,t,n){var i=Hc(e,Fm,n);return i||Em(e,t,n)}function Em(e,t,n){e=Tm(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=zc(e[r],"urn:ebu:tt:style",n);a||(a=Hc(e[r],Fm,n)),a||(a=bm(e[r],t,n)),a&&(i=a)}return i}function Tm(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=r?zc(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(r=(t=l(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=l(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}return a}function Am(e,t,n,i){return e=wm(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function wm(e,t){var n=Sm(e.getAttribute("begin"),t),i=Sm(e.getAttribute("end"),t),r=Sm(e.getAttribute("dur"),t);return null==i&&null!=r&&(i=n+r),{start:n,end:i}}function Sm(e,t){var n=null;if(Nm.test(e)){n=Nm.exec(e);var i=Number(n[1]),r=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*r+3600*i}else if(Rm.test(e))n=xm(Rm,e);else if(_m.test(e))n=xm(_m,e);else if(Pm.test(e))n=Pm.exec(e),n=Number(n[1])/t.frameRate;else if(Dm.test(e))n=Dm.exec(e),n=Number(n[1])/t.g;else if(Om.test(e))n=xm(Om,e);else if(e)throw new Ee(2,2,2001,"Could not parse cue time range in TTML");return n}function xm(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function Im(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]))}hn["application/x-subtitle-lrc"]=function(){return new dm},pm.prototype.parseInit=function(){},pm.prototype.setSequenceMode=function(){},pm.prototype.parseMedia=function(e,t){var n=Bt(e),i=[],r=new DOMParser,a=null;if(""==n)return i;try{a=r.parseFromString(n,"text/xml")}catch(e){throw new Ee(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new Ee(2,2,2005,n.textContent);var o=a.getElementsByTagName("tt")[0];if(!o)throw new Ee(2,2,2005,"TTML does not contain <tt> tag.");if(!(a=o.getElementsByTagName("body")[0]))return[];var s=Hc(o,Bm,"frameRate"),u=Hc(o,Bm,"subFrameRate"),c=Hc(o,Bm,"frameRateMultiplier"),d=Hc(o,Bm,"tickRate"),h=Hc(o,Bm,"cellResolution");if(n=o.getAttribute("xml:space")||"default",r=Hc(o,Fm,"extent"),"default"!=n&&"preserve"!=n)throw new Ee(2,2,2005,"Invalid xml:space value: "+n);n="default"==n,s=new Im(s,u,c,d),h=h&&(h=/^(\d+) (\d+)$/.exec(h))?{columns:parseInt(h[1],10),rows:parseInt(h[2],10)}:null,u=(u=o.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(u):[],c=Array.from(o.getElementsByTagName("style")),d=[];for(var f=l(o=Array.from(o.getElementsByTagName("region"))),p=f.next();!p.done;p=f.next()){var g=p.value;p=new wt;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;r&&(b=km.exec(r)||Lm.exec(r)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=ym(g,c,"extent"))&&(null!=(v=(y=km.exec(v))||Lm.exec(v))&&(p.width=Number(v[1]),p.height=Number(v[2]),y||(null!=m&&(p.width=100*p.width/m),null!=b&&(p.height=100*p.height/b)),p.widthUnits=y||null!=m?St:0,p.heightUnits=y||null!=b?St:0)),(g=ym(g,c,"origin"))&&(null!=(v=(y=km.exec(g))||Lm.exec(g))&&(p.viewportAnchorX=Number(v[1]),p.viewportAnchorY=Number(v[2]),y||(null!=b&&(p.viewportAnchorY=100*p.viewportAnchorY/b),null!=m&&(p.viewportAnchorX=100*p.viewportAnchorX/m)),p.viewportAnchorUnits=y||null!=m?St:0))}else p=null;p&&d.push(p)}if(Kc(a,"p").length)throw new Ee(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(r=l(Kc(a,"div"))).next();!f.done;f=r.next())if(Kc(f.value,"span").length)throw new Ee(2,2,2001,"<span> can only be inside <p> in TTML");(a=gm(a,t.periodStart,s,u,c,o,d,n,h,null,!1))&&i.push(a)}return i},G("shaka.text.TtmlTextParser",pm),pm.prototype.parseMedia=pm.prototype.parseMedia,pm.prototype.setSequenceMode=pm.prototype.setSequenceMode,pm.prototype.parseInit=pm.prototype.parseInit;var km=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Cm=/^(\d{1,2}(?:\.\d+)?|100)%$/,Mm=/^(\d+px|\d+em|\d*\.?\d+c)$/,Lm=/^(\d+)px (\d+)px$/,Nm=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Rm=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,_m=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Pm=/^(\d*(?:\.\d*)?)f$/,Dm=/^(\d*(?:\.\d*)?)t$/,Om=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Um={left:mt,center:"center",right:"end",start:mt,end:"end"},jm={left:"line-left",center:"center",right:"line-right"},Bm=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Fm=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Gm=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Km(){this.g=new pm}function Vm(){this.g=!1}function zm(e){for(var t=l(Object.entries(yt)),n=t.next();!n.done;n=t.next()){var i=l(n.value);n=i.next().value,i=i.next().value;var r=new ot(0,0,"");r.color=i,e.set(n,r)}for(n=(t=l(Object.entries(bt))).next();!n.done;n=t.next())n=(i=l(n.value)).next().value,i=i.next().value,(r=new ot(0,0,"")).backgroundColor=i,e.set(n,r)}function Hm(e,t,n){0===n.size&&zm(n),e=function(e){for(var t=[],n=-1,i="",r=0;r<e.length;r++)if("/"===e[r]){var a=e.indexOf(">",r);if(a<=r)return e;a=e.substring(r+1,a);var o=t.pop();if(!a||!o)return e;if(o===a)i+="/"+a+">";else{if(!o.startsWith("c.")||"c"!==a)return e;i+="/"+o+">"}r+=a.length+1}else"<"===e[r]?n=r+1:">"===e[r]&&0<n&&(t.push(e.substr(n,r-n)),n=-1),i+=e[r];return i}(e);var i=id("<span>"+e+"</span>","span");if(i){var r=[];if(1==(i=i.childNodes).length){var a=i[0];if(a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE)return void(t.payload=e)}for(i=(e=l(i)).next();!i.done;i=e.next())Xm(i.value,t,r,n);t.nestedCues=r}else t.payload=e}function qm(e,t){return e&&0<e.length?e:t}function Xm(e,t,n,i){var r=t.clone();if(e.nodeType===Node.ELEMENT_NODE&&e.nodeName)for(var a=l(e.nodeName.split(/[ .]+/)),o=a.next();!o.done;o=a.next()){if(o=o.value,i.has(o)){var s=i.get(o);s&&(r.backgroundColor=qm(s.backgroundColor,r.backgroundColor),r.color=qm(s.color,r.color),r.fontFamily=qm(s.fontFamily,r.fontFamily),r.fontSize=qm(s.fontSize,r.fontSize),r.fontWeight=s.fontWeight,r.fontStyle=s.fontStyle,r.opacity=s.opacity,r.wrapLine=s.wrapLine)}switch(o){case"b":r.fontWeight=700;break;case"i":r.fontStyle="italic";break;case"u":r.textDecoration.push("underline")}}if(Xc(e))for(a=!0,i=l(e.textContent.split("\n")),e=i.next();!e.done;e=i.next())e=e.value,a||((a=t.clone()).lineBreak=!0,n.push(a)),0<e.length&&((a=r.clone()).payload=e,n.push(a)),a=!1;else for(e=(t=l(e.childNodes)).next();!e.done;e=t.next())Xm(e.value,r,n,i)}function Wm(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],e.textAlign="middle"==t?lt:ct[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(i=/^regi
2on:(.*)$/.exec(t))?(t=function(e,t){var n=e.filter((function(e){return e.id==t}));return n.length?n[0]:null}(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=vt[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=gt,e.line=Number(n[1]),n[2]&&(e.lineAlign=vt[n[2].toUpperCase()]))}function Ym(e){if(null==(e=Ch(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Jm(){this.g=null}function $m(e,t,n){var i,r,a;return(new xr).box("payl",Cr((function(e){i=Bt(e)}))).box("iden",Cr((function(e){r=Bt(e)}))).box("sttg",Cr((function(e){a=Bt(e)}))).parse(e),i?function(e,t,n,i,r){if(i=new ot(i,r,""),Hm(e,i,new Map),t&&(i.id=t),n)for(e=new Ih(n),t=Mh(e);t;)Wm(i,t,[]),kh(e),t=Mh(e);return i}(i,r,a,t,n):null}function Qm(){}function Zm(e){if(null==(e=Ch(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function ev(){this.g=new Vm}function tv(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=l((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n")+"\n\n";return t}function nv(){}function iv(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=rv(n))&&(e.color=n),(n=t.BackColour)&&(n=rv(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=dt,e.textAlign="start";break;case 2:e.displayAlign=dt,e.textAlign=lt;break;case 3:e.displayAlign=dt,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=lt;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=lt;break;case 11:e.displayAlign="center",e.textAlign="end"}(n=t.AlphaLevel)&&(e.opacity=parseFloat(n))}function rv(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function av(e){return 3600*((e=dv.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}hn["application/ttml+xml"]=function(){return new pm},Km.prototype.parseInit=function(e){var t=!1;if((new xr).box("moov",Ir).box("trak",Ir).box("mdia",Ir).box("minf",Ir).box("stbl",Ir).Y("stsd",kr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new Ee(2,2,2007)},Km.prototype.setSequenceMode=function(){},Km.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new xr).box("mdat",Cr((function(e){i=!0,r=r.concat(n.g.parseMedia(e,t))}))).parse(e,!1),!i)throw new Ee(2,2,2007);return r},G("shaka.text.Mp4TtmlParser",Km),Km.prototype.parseMedia=Km.prototype.parseMedia,Km.prototype.setSequenceMode=Km.prototype.setSequenceMode,Km.prototype.parseInit=Km.prototype.parseInit,hn['application/mp4; codecs="stpp"']=function(){return new Km},hn['application/mp4; codecs="stpp.ttml"']=function(){return new Km},hn['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Km},hn['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Km},Vm.prototype.parseInit=function(){},Vm.prototype.setSequenceMode=function(e){this.g=e},Vm.prototype.parseMedia=function(e,t){var n=Bt(e),i=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(i[0]))throw new Ee(2,2,2e3);if(n=t.periodStart,i[0].includes("X-TIMESTAMP-MAP")&&!this.g){var r=i[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=i[0].match(/MPEGTS:(\d+)/m);if(r&&a){if(null==(n=Ym(new Ih(r[1]))))throw new Ee(2,2,2e3);for(a=Number(a[1]),r=t.segmentStart;95443.7176888889<=r;)r-=95443.7176888889,a+=8589934592;n=t.periodStart+a/9e4-n}}a=[];for(var o=(r=l(i[0].split("\n"))).next();!o.done;o=r.next())if(o=o.value,/^Region:/.test(o)){o=new Ih(o);var s=new wt;Mh(o),kh(o);for(var u=Mh(o);u;){var c=s,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),kh(o),u=Mh(o)}a.push(s)}for(zm(r=new Map),o=[],s=(i=l(i.slice(1))).next();!s.done;s=i.next()){if((1!=(s=s.value.split("\n")).length||s[0])&&!/^NOTE($|[ \t])/.test(s[0])&&"STYLE"==s[0]&&s[1].includes("::cue")){c="global",(u=s[1].match(/\((.*)\)/))&&(c=u.pop()),u=s.slice(2,-1),s[1].includes("}
2")&&(d=/\{(.*?)\}/.exec(s[1]))&&(u=d[1].split(";")),d=new ot(0,0,"");for(var h=!1,f=0;f<u.length;f++){var p=/^\s*([^:]+):\s*(.*)/.exec(u[f]);if(p){var g=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":h=!0,d.backgroundColor=g;break;case"color":h=!0,d.color=g;break;case"font-family":h=!0,d.fontFamily=g;break;case"font-size":h=!0,d.fontSize=g;break;case"font-weight":700<=parseInt(g,10)&&(h=!0,d.fontWeight=700);break;case"font-style":switch(g){case"normal":h=!0,d.fontStyle=Tt;break;case"italic":h=!0,d.fontStyle="italic";break;case"oblique":h=!0,d.fontStyle="oblique"}break;case"opacity":h=!0,d.opacity=parseFloat(g);break;case"white-space":h=!0,d.wrapLine="noWrap"!=g}}}h&&r.set(c,d)}if(f=n,1==s.length&&!s[0]||/^NOTE($|[ \t])/.test(s[0])||"STYLE"==s[0])s=null;else{if(c=null,s[0].includes("--\x3e")||(c=s[0],s.splice(0,1)),d=Ym(u=new Ih(s[0])),p=Ch(u,/[ \t]+--\x3e[ \t]+/g),h=Ym(u),null==d||null==p||null==h)throw new Ee(2,2,2001,"Could not parse cue time range in WebVTT");for(d+=f,h+=f,f=s.slice(1).join("\n").trim(),r.has("global")?((s=r.get("global").clone()).startTime=d,s.endTime=h,s.payload=""):s=new ot(d,h,""),Hm(f,s,r),kh(u),d=Mh(u);d;)Wm(s,d,a),kh(u),d=Mh(u);null!=c&&(s.id=c)}s&&o.push(s)}return o},G("shaka.text.VttTextParser",Vm),Vm.prototype.parseMedia=Vm.prototype.parseMedia,Vm.prototype.setSequenceMode=Vm.prototype.setSequenceMode,Vm.prototype.parseInit=Vm.prototype.parseInit,hn["text/vtt"]=function(){return new Vm},hn['text/vtt; codecs="vtt"']=function(){return new Vm},hn['text/vtt; codecs="wvtt"']=function(){return new Vm},Jm.prototype.parseInit=function(e){var t=this,n=!1;if((new xr).box("moov",Ir).box("trak",Ir).box("mdia",Ir).Y("mdhd",(function(e){e=Ga(e.reader,e.version),t.g=e.timescale})).box("minf",Ir).box("stbl",Ir).Y("stsd",kr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new Ee(2,2,2008);if(!n)throw new Ee(2,2,2008)},Jm.prototype.setSequenceMode=function(){},Jm.prototype.parseMedia=function(e,t){if(!this.g)throw new Ee(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,c=null;if((new xr).box("moof",Ir).box("traf",Ir).Y("tfdt",(function(e){o=!0,i=Fa(e.reader,e.version).Ne})).Y("tfhd",(function(e){c=Ba(e.reader,e.flags).Xe})).Y("trun",(function(e){s=!0,r=Ka(e.reader,e.version,e.flags).uf})).box("mdat",Cr((function(e){u=!0,n=e}))).parse(e,!1),!u&&!o&&!s)throw new Ee(2,2,2008);for(var d=i,h=new Ar(n,0),f=l(r),p=f.next();!p.done;p=f.next()){var g=(p=p.value).me||c,m=p.ud?i+p.ud:d;d=m+(g||0);var v=0;do{var y=h.P();v+=y;var b=null;"vttc"==Lr(h.P())?8<y&&(b=h.Eb(y-8)):h.skip(y-8),g&&b&&(y=$m(b,t.periodStart+m/this.g,t.periodStart+d/this.g),a.push(y))}while(p.sampleSize&&v<p.sampleSize)}return a.filter(Ce)},G("shaka.text.Mp4VttParser",Jm),Jm.prototype.parseMedia=Jm.prototype.parseMedia,Jm.prototype.setSequenceMode=Jm.prototype.setSequenceMode,Jm.prototype.parseInit=Jm.prototype.parseInit,hn['application/mp4; codecs="wvtt"']=function(){return new Jm},Qm.prototype.parseInit=function(){},Qm.prototype.setSequenceMode=function(){},Qm.prototype.parseMedia=function(e){var t=Bt(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=l(t.split("\n\n"))).next();!n.done;n=t.next()){var i=new Ih((n=n.value.split("\n"))[0]),r=Zm(i),a=Ch(i,/,/g);if(i=Zm(i),null==r||null==a||null==i)throw new Ee(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new ot(r,i,n.slice(1).join("\n").trim()))}return e},G("shaka.text.SbvTextParser",Qm),Qm.prototype.parseMedia=Qm.prototype.parseMedia,Qm.prototype.setSequenceMode=Qm.prototype.setSequenceMode,Qm.prototype.parseInit=Qm.prototype.parseInit,hn["text/x-subviewer"]=function(){return new Qm},ev.prototype.parseInit=function(){},ev.prototype.setSequenceMode=function(){},ev.prototype.parseMedia=function(e,t){var n=Bt(e);return n=Lt(Kt(n=tv(n))),this.g.parseMedia(n,t)},G("shaka.text.SrtTextParser",ev),ev.srt2webvtt=tv,ev.prototype.parseMedia=ev.prototype.parseMedia,ev.prototype.setSequenceMode=ev.prototype.setSequenceMode,ev.prototype.parseInit=ev.prototype.parseInit,hn["text/srt"]=function(){return new ev},nv.prototype.parseInit=function(){},nv.prototype.setSequenceMode=function(){},nv.prototype.parseMedia=function(e){for(var t="",n="",i=(e=l(e=Bt(e).split(/\r?\n\s*\r?\n/))).next();!i.done;i=e.next()){var r=uv.exec(i.value);r&&(i=r[1],r=r[2],"V4 Styles"==i||"V4+ Styles"==i?t=r:"Events"==i&&(n=r))}e=[],i=null;for(var a=(t=l(t.split(/\r?\n/))).next();!a.done;a=t.next())if(r=a.value,!/^\s*;/.test(r)&&(a=lv.exec(r)))if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(cv);else if("Style"==r){r=a.split(cv),a={};for(var o=0;o<i.length&&o<r.length;o++)a[i[o]]=r[o];e.push(a)}for(i=[],t=null,r={},a=(n=l(n.split(/\r?\n/))).next();!a.done;r={Md:r.Md},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=lv.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(cv);else if("Dialogue"==a){o=o.split(cv),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new ot(s=av(a.Start),av(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}
2/g,"")),r.Md=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.Md}}(r)))&&iv(o,a),i.push(o)}return i},G("shaka.text.SsaTextParser",nv),nv.prototype.parseMedia=nv.prototype.parseMedia,nv.prototype.setSequenceMode=nv.prototype.setSequenceMode,nv.prototype.parseInit=nv.prototype.parseInit;var ov,sv,uv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,lv=/^\s*([^:]+):\s*(.*)/,cv=/\s*,\s*/,dv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function hv(){}function fv(){ov?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ov=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=pv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function pv(e,t){var n,i=this;return _((function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),E(r,ov.call(i,e,t),2)):wv(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ov,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=gv,r.return(gv.call(i,e,t)))}))}function gv(e,t){var n,i,r,a,o,s,u,c,d,h,f=this;return _((function(p){if(1==p.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=Av(e),i=[],r=l(t),a=r.next();!a.done;a=r.next())o=a.value,s=mv(o.videoCapabilities,n),u=mv(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=u,i.push(c));if(!i.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return E(p,ov.call(f,e,i),2)}return h=p.h,p.return(new Tv(h,n))}))}function mv(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function vv(){}function yv(){sv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(sv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function bv(e){var t,n,i=this;return _((function(r){return 1==r.g?(console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(r,sv.call(i,e),2)):(t=r.h,e.keySystemConfiguration?(n=t.keySystemAccess)&&wv(n)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=sv,r.return(t)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ev,r.return(Ev.call(i,e))):r.return(t))}))}function Ev(e){var t,n,i,r,a,o,s,u,l,c=this;return _((function(d){switch(d.g){case 1:return console.assert(c==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,i=n.keySystem,r=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=Av(i),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},r&&r!=t||a&&a!=t)?d.return(o):E(d,sv.call(c,e),2);case 2:if((s=d.h).keySystemAccess){s.keySystemAccess=new Tv(s.keySystemAccess,t),d.D(3);break}if(!e.keySystemConfiguration){d.D(3);break}var h=e.keySystemConfiguration,f=[],p=[];return h.audio&&f.push({robustness:h.audio.robustness||"",contentType:e.audio.contentType}),h.video&&p.push({robustness:h.video.robustness||"",contentType:e.video.contentType}),h={initDataTypes:h.initDataType?[h.initDataType]:[],distinctiveIdentifier:h.distinctiveIdentifier,persistentState:h.persistentState,sessionTypes:h.sessionTypes},f.length&&(h.audioCapabilities=f),p.length&&(h.videoCapabilities=p),u=h,l=s,E(d,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[u]),5);case 5:l.keySystemAccess=d.h;case 3:return d.return(s)}}))}function Tv(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Av(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function wv(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Sv(){}function xv(){fv(),yv()}hn["text/x-ssa"]=function(){return new nv},G("EmeEncryptionSchemePolyfill",hv),hv.install=fv,G("McEncryptionSchemePolyfill",vv),vv.
2install=yv,Tv.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=l(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=l(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},Tv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},G("EncryptionSchemePolyfills",Sv),Sv.install=xv,void 0!==n&&n.exports&&(n.exports=Sv);for(var Iv={ach:{s:"Lwo",u:"Acholi"},ady:{s:"Адыгэбзэ",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"Tɕɥi",u:"Akan"},ar:{s:"العربية",u:"Arabic"},"ar-AR":{s:"العربية",u:"Arabic"},"ar-MA":{s:"العربية",u:"Arabic (Morocco)"},"ar-SA":{s:"العربية (السعودية)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Azərbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Azərbaycan dili",u:"Azerbaijani"},"be-BY":{s:"Беларуская",u:"Belarusian"},bg:{s:"Български",u:"Bulgarian"},"bg-BG":{s:"Български",u:"Bulgarian"},bn:{s:"বাংলা",u:"Bengali"},"bn-IN":{s:"বাংলা (ভারত)",u:"Bengali (India)"},"bn-BD":{s:"বাংলা(বাংলাদেশ)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Català",u:"Catalan"},"ca-ES":{s:"Català",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"ᏣᎳᎩ (tsalagi)",u:"Cherokee"},cs:{s:"Čeština",u:"Czech"},"cs-CZ":{s:"Čeština",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (Österreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserbšćina",u:"Lower Sorbian"},el:{s:"Ελληνικά",u:"Greek"},"el-GR":{s:"Ελληνικά",u:"Greek (Greece)"},en:{s:"English",u:"English"},"en-GB":{s:"English (UK)",u:"English (UK)"},"en-AU":{s:"English (Australia)",u:"English (Australia)"},"en-CA":{s:"English (Canada)",u:"English (Canada)"},"en-IE":{s:"English (Ireland)",u:"English (Ireland)"},"en-IN":{s:"English (India)",u:"English (India)"},"en-PI":{s:"English (Pirate)",u:"English (Pirate)"},"en-UD":{s:"English (Upside Down)",u:"English (Upside Down)"},"en-US":{s:"English (US)",u:"English (US)"},"en-ZA":{s:"English (South Africa)",u:"English (South Africa)"},"en@pirate":{s:"English (Pirate)",u:"English (Pirate)"},eo:{s:"Esperanto",u:"Esperanto"},"eo-EO":{s:"Esperanto",u:"Esperanto"},es:{s:"Español",u:"Spanish"},"es-AR":{s:"Español (Argentine)",u:"Spanish (Argentina)"},"es-419":{s:"Español (Latinoamérica)",u:"Spanish (Latin America)"},"es-CL":{s:"Español (Chile)",u:"Spanish (Chile)"},"es-CO":{s:"Español (Colombia)",u:"Spanish (Colombia)"},"es-EC":{s:"Español (Ecuador)",u:"Spanish (Ecuador)"},"es-ES":{s:"Español (España)",u:"Spanish (Spain)"},"es-LA":{s:"Español (Latinoamérica)",u:"Spanish (Latin America)"},"es-NI":{s:"Español (Nicaragua)",u:"Spanish (Nicaragua)"},"es-MX":{s:"Español (México)",u:"Spanish (Mexico)"},"es-US":{s:"Español (Estados Unidos)",u:"Spanish (United States)"},"es-VE":{s:"Español (Venezuela)",u:"Spanish (Venezuela)"},et:{s:"eesti keel",u:"Estonian"},"et-EE":{s:"Eesti (Estonia)",u:"Estonian (Estonia)"},eu:{s:"Euskara",u:"Basque"},"eu-ES":{s:"Euskara",u:"Basque"},fa:{s:"فارسی",u:"Persian"},"fa-IR":{s:"فارسی",u:"Persian"},"fb-LT":{s:"Leet Speak",u:"Leet"},ff:{s:"Fulah",u:"Fulah"},fi:{s:"Suomi",u:"Finnish"},"fi-FI":{s:"Suomi",u:"Finnish"},"fo-FO":{s:"Føroyskt",u:"Faroese"},fr:{s:"Français",u:"French"},"fr-CA":{s:"Français (Canada)",u:"French (Canada)"},"fr-FR":{s:"Français (France)",u:"French (France)"},"fr-BE":{s:"Français (Belgique)",u:"French (Belgium)"},"fr-CH":{s:"Français (Suisse)",u:"French (Switzerland)"},"fy-NL":{s:"Frysk",u:"Frisian (West)"},ga:{s:"Gaeilge",u:"Irish"},"ga-IE":{s:"Gaeilge (Gaelic)",u:"Irish (Gaelic)"},gl:{s:"Galego",u:"Galician"},"gl-ES":{s:"Galego",u:"Galician"},"gn-PY":{s:"Avañe'ẽ",u:"Guarani"},"gu-IN":{s:"ગુજરાતી",u:"Gujarati"},"gx-GR":{s:"Ἑλληνική ἀρχαία",u:"Classical Greek"},he:{s:"עברית‏",u:"Hebrew"},"he-IL":{s:"עברית‏",u:"Hebrew"},hi:{s:"हिन्दी",u:"Hindi"},"hi-IN":{s:"हिन्दी",u:"Hindi"},hr:{s:"Hrvatski",u:"Croatian"},"hr-HR":{s:"Hrvatski",u:"Croatian"},hsb:{s:"Hornjoserbšćina",u:"Upper Sorbian"},ht:{s:"Kreyòl",u:"Haitian Creole"},hu:{s:"Magyar",u:"Hungarian"},"hu-HU":{s:"Magyar",u:"Hungarian"},"hy-AM":{s:"Հայերեն",u:"Armenian"},id:{s:"Bahasa Indonesia",u:"Indonesian"},"id-ID":{s:"Bahasa Indonesia",u:"Indonesian"},is:{s:"Íslenska",u:"Icelandic"},"is-IS":{s:"Íslenska (Iceland)",u:"Icelandic (Iceland)"},it:{s:"Italiano",u:"Italian"},"it-IT":{s:"Italiano",u:"Italian"},ja:{s:"日本語",u:"Japanese"},"ja-JP":{s:"日本語",u:"Japanese"},"jv-ID":{s:"Basa Jawa",u:"Javanese"},"ka-GE":{s:"ქართული",u:"Georgian"},"kk-KZ":{s:"Қазақша",u:"Kazakh"},km:{s:"ភាសាខ្មែរ",u:"Khmer"},"km-KH":{s:"ភាសាខ្មែរ",u:"Khmer"},kab:{s:"Taqbaylit",u:"Kabyle"},kn:{s:"ಕನ್ನಡ",u:"Kannada"},"kn-IN":{s:"ಕನ್ನಡ (India)",u:"Kannada (India)"},ko:{s:"한국어",u:"Korean"},"ko-KR":{s:"한국어 (韩国)",u:"Korean (Korea)"},ku:{s:"Kurdî",u:"Kurdish"},"ku-TR":{s:"Kurdî",u:"Kurdish"},la:{s:"Latin",u:"Latin"},"la-VA":{s:"Latin",u:"Latin"},lb:{s:"Lëtzebuergesch",u:"Luxembourgish"},"li-NL":{s:"Lèmbörgs",u:"Limburgish"},lt:{s:"Lietuvių",u:"Lithuanian"},"lt-LT":{s:"Lietuvių",u:"Lithuanian"},lv:{s:"Latviešu",u:"Latvian"},"lv-LV":{s:"Latviešu",u:"Latvian"},mai:{s:"मैथिली, মৈথিলী",u:"Maithili"},"mg-MG":{s:"Malagasy",u:"Malagasy"},mk:{s:"Македонски",u:"Macedonian"},"mk-MK":{s:"Македонски (Македонски)",u:"Macedonian (Macedonian)"},ml:{s:"മലയാളം",u:"Malayalam"},"ml-IN":{s:"മലയാളം",u:"Malayalam"},"mn-MN":{s:"Монгол",u:"Mongolian"},mr:{s:"मराठी",u:"Marathi"},"mr-IN":{s:"मराठी",u:"Marathi"},ms:{s:"Bahasa Melayu",u:"Malay"},"ms-MY":{s:"Bahasa Melayu",u:"Malay"},mt:{s:"Malti",u:"Maltese"},"mt-MT":{s:"Malti",u:"Maltese"},my:{s:"ဗမာစကာ",u:"Burmese"},nb:{s:"Norsk (bokmål)",u:"Norwegian (bokmal)"},"nb-NO":{s:"Norsk (bokmål)",u:"Norwegian (bokmal)"},ne:{s:"नेपाली",u:"Nepali"}
2,"ne-NP":{s:"नेपाली",u:"Nepali"},nl:{s:"Nederlands",u:"Dutch"},"nl-BE":{s:"Nederlands (België)",u:"Dutch (Belgium)"},"nl-NL":{s:"Nederlands (Nederland)",u:"Dutch (Netherlands)"},"nn-NO":{s:"Norsk (nynorsk)",u:"Norwegian (nynorsk)"},no:{s:"Norsk",u:"Norwegian"},oc:{s:"Occitan",u:"Occitan"},"or-IN":{s:"ଓଡ଼ିଆ",u:"Oriya"},pa:{s:"ਪੰਜਾਬੀ",u:"Punjabi"},"pa-IN":{s:"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",u:"Punjabi (India)"},pl:{s:"Polski",u:"Polish"},"pl-PL":{s:"Polski",u:"Polish"},"ps-AF":{s:"پښتو",u:"Pashto"},pt:{s:"Português",u:"Portuguese"},"pt-BR":{s:"Português (Brasil)",u:"Portuguese (Brazil)"},"pt-PT":{s:"Português (Portugal)",u:"Portuguese (Portugal)"},"qu-PE":{s:"Qhichwa",u:"Quechua"},"rm-CH":{s:"Rumantsch",u:"Romansh"},ro:{s:"Română",u:"Romanian"},"ro-RO":{s:"Română",u:"Romanian"},ru:{s:"Русский",u:"Russian"},"ru-RU":{s:"Русский",u:"Russian"},"sa-IN":{s:"संस्कृतम्",u:"Sanskrit"},"se-NO":{s:"Davvisámegiella",u:"Northern Sámi"},"si-LK":{s:"පළාත",u:"Sinhala (Sri Lanka)"},sk:{s:"Slovenčina",u:"Slovak"},"sk-SK":{s:"Slovenčina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s:"Slovenščina",u:"Slovenian"},"sl-SI":{s:"Slovenščina",u:"Slovenian"},"so-SO":{s:"Soomaaliga",u:"Somali"},sq:{s:"Shqip",u:"Albanian"},"sq-AL":{s:"Shqip",u:"Albanian"},sr:{s:"Српски",u:"Serbian"},"sr-RS":{s:"Српски (Serbia)",u:"Serbian (Serbia)"},su:{s:"Basa Sunda",u:"Sundanese"},sv:{s:"Svenska",u:"Swedish"},"sv-SE":{s:"Svenska",u:"Swedish"},sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"தமிழ்",u:"Tamil"},"ta-IN":{s:"தமிழ்",u:"Tamil"},te:{s:"తెలుగు",u:"Telugu"},"te-IN":{s:"తెలుగు",u:"Telugu"},tg:{s:"забо́ни тоҷикӣ́",u:"Tajik"},"tg-TJ":{s:"тоҷикӣ",u:"Tajik"},th:{s:"ภาษาไทย",u:"Thai"},"th-TH":{s:"ภาษาไทย (ประเทศไทย)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"Türkçe",u:"Turkish"},"tr-TR":{s:"Türkçe",u:"Turkish"},"tt-RU":{s:"татарча",u:"Tatar"},uk:{s:"Українська",u:"Ukrainian"},"uk-UA":{s:"Українська",u:"Ukrainian"},ur:{s:"اردو",u:"Urdu"},"ur-PK":{s:"اردو",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Tiếng Việt",u:"Vietnamese"},"vi-VN":{s:"Tiếng Việt",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"ייִדיש",u:"Yiddish"},"yi-DE":{s:"ייִדיש (German)",u:"Yiddish (German)"},zh:{s:"中文",u:"Chinese"},"zh-HANS":{s:"中文简体",u:"Chinese Simplified"},"zh-HANT":{s:"中文繁體",u:"Chinese Traditional"},"zh-CN":{s:"中文(中国)",u:"Chinese Simplified (China)"},"zh-HK":{s:"中文(香港)",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"中文(新加坡)",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"中文(台灣)",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},kv=l(Object.keys(Iv)),Cv=kv.next();!Cv.done;Cv=kv.next()){var Mv=Cv.value;Iv[Mv.toLowerCase()]=Iv[Mv]}function Lv(e,t){var n=this;this.parent=e,this.controls=t,this.eventManager=new Ui,this.localization=this.controls.Na,this.player=this.controls.dc(),this.video=this.controls.Db(),this.adManager=this.player.dd(),this.ad=t.getAd(),this.eventManager.o(this.adManager,"ad-started",(function(e){n.ad=e.ad})),this.eventManager.o(this.adManager,"ad-stopped",(function(){n.ad=null}))}function Nv(e){return Rv(e,"shaka-back-to-overflow-button")}function Rv(e,t){var n=e.getElementsByClassName(t);return n.length?n[0]:null}function _v(e){e&&(e=Rv(e,"shaka-chosen-item"))&&e.parentElement.focus()}function Pv(){var e=Ts("i");return e.classList.add("material-icons-round"),e.classList.add("shaka-chosen-item"),e.textContent="done",e.ariaHidden="true",e}function Dv(e,t){e&&(t?e.classList.remove("shaka-hidden"):e.classList.add("shaka-hidden"))}function Ov(e,t){var n=Math.floor(e/3600),i=Math.floor(e/60%60),r=Math.floor(e%60);return 10>r&&(r="0"+r),r=i+":"+r,t&&(10>i&&(r="0"+r),r=n+":"+r),r}function Uv(e,t){Lv.call(this,e,t);var n=this;this.i=Ts("div"),this.i.classList.add("shaka-ad-counter"),this.parent.appendChild(this.i),this.h=Ts("span"),this.h.classList.add("shaka-ad-counter-span"),this.i.appendChild(this.h),this.g=new pn((function(){var e=Math.round(n.ad.getRemainingTime()),t=n.ad.getDuration();-1!=e&&-1!=t&&(0<e?(e=Ov(t-e,!1)+" / "+Ov(t,!1),1<n.ad.getSequenceLength()?n.h.textContent=e:(t=n.localization.resolve("AD_TIME"),n.h.textContent=t.replace("[AD_TIME]",e))):(n.g.stop(),n.h.textContent=""))})),this.eventManager.o(this.localization,"locale-updated",(function(){})),this.eventManager.o(this.localization,"locale-changed",(function(){})),this.eventManager.o(this.adManager,"ad-started",(function(){n.g.Aa(),n.g.ka(.5)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){n.g.stop(),n.h.textContent=""})),this.ad&&(this.g.Aa(),this.g.ka(.5))}function jv(e,t){Lv.call(this,e,t);var n=this;this.g=Ts("div"),this.g.classList.add("shaka-ad-position"),Dv(this.g,!1),this.parent.appendChild(this.g),this.h=Ts("span"),this.h.classList.add("shaka-ad-position-span"),this.g.appendChild(this.h),this.eventManager.o(this.localization,"locale-updated",(function(){n.ad&&Bv(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){n.ad&&Bv(n)})),this.eventManager.o(this.adManager,"ad-started",(function(){Bv(n)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){n.h.textContent="",Dv(n.g,!1)})),this.ad&&Bv(this)}function Bv(e){var t=e.ad.getSequenceLength();if(1<t){var n=e.ad.getPositionInSequence();e.h.textContent=e.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(n)).replace("[NUM_ADS]",String(t)),Dv(e.g,!0)}}function Fv(e,t){Lv.call(this,e,t);var n=this;this.button=As(),this.parent.appendChild(this.button),this.eventManager.o(this.localization,"locale-updated",(function(){n.g()})),this.eventManager.o(this.localization,"locale-changed",(function(){n.g()})),this.eventManager.o(this.video,"play",(function(){n.g(),n.h()})),this.eventManager.o(this.video,"pause",(function(){n.g(),n.h()})),this.eventManager.o(this.video,"seeking",(function(){n.g(),n.h()})),this.eventManager.o(this.adManager,"ad-paused",(function(){n.g(),n.h()})),this.eventManager.o(this.adManager,"ad-resumed",(function(){n.g(),n.h()})),this.eventManager.o(this.adManager,"ad-started",(function(){n.g(),n.h()})),this.eventManager.o(this.button,"click",(function(){n.ad&&n.ad.isLinear()?iy(n.controls):ny(n.controls)})),this.ad&&(this.g(),this.h())}function Gv(e,t){Fv.call(this,e,t),this.button.classList.add("shaka-play-button"),this.button.classList.add("shaka-no-propagation"),this.h(),this.g()}function Kv(t,n){Lv.call(this,t,n);var i=this;this.j=this.controls.i,this.h=this.controls.g,this.i=[],this.g=Ts("div"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("shaka-context-menu"),this.g.classList.add("shaka-hidden"),this.h.appendChild(this.g),this.eventManager.o(this.h,"contextmenu",(function(e){if(i.g.classList.contains("shaka-hidden")){e.preventDefault();var t=i.h.getBoundingClientRect();i.g.style.left=e.clientX-t.left+"px",i.g.style.top=e.clientY-t.top+"px",Dv(i.g,!0)}else Dv(i.g,!1)})),this.eventManager.o(e,"click",(function(){Dv(i.g,!1)})),function(e){for(var t=l(e.j.contextMenuElements),n=t.next();!n.done;n=t.next()){n=n.value;var i=zv.get(n);i?e.i.push(i.create(e.g,e.controls)):q("Unrecognized context menu element:",n)}}(this)}function Vv(e,t){zv.set(e,t)}Lv.prototype.release=function(){this.eventManager.release(),this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null},G("shaka.ui.Element",Lv),Lv.prototype.release=Lv.prototype.release,m(Uv,Lv),Uv.prototype.release=function(){this.g.stop(),this.g=null,Lv.prototype.release.call(this)},G("shaka.ui.AdCounter",Uv),m(jv,Lv),G("shaka.ui.AdPosition",jv),m(Fv,Lv),Fv.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var e=this.ad.isPaused();else e=(e=this.controls).B.paused&&!e.$;return e},Fv.prototype.g=function(){},Fv.prototype.h=function(){},G("shaka.ui.PlayButton",Fv),m(Gv,Fv),Gv.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")},Gv.prototype.g=function(){var e=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(e)},G("shaka.ui.BigPlayButton",Gv),m(Kv,Lv),Kv.prototype.release=function(){this.h=null;for(var e=l(this.i),t=e.next();!t.done;t=e.next())t.value.release();this.i=[],Lv.prototype.release.call(this)},G("shaka.ui.ContextMenu",Kv),Kv.registerElement=Vv;var zv=new Map;function Hv(e,t,n,i){Lv.call(this,e,t);var r=this;this.container=Ts("div"),this.container.classList.add("shaka-range-container"),this.container.classList.add.apply(this.container.classList,c(n)),this.g=!1,this.bar=document.createElement("input"),this.l=new pn((function(){r.onChangeEnd(),r.g=!1})),this.bar.classList.add("shaka-range-element"),this.bar.classList.add.apply(this.bar.classList,c(i)),this.bar.type="range",this.bar.step="any",this.bar.min="0",this.bar.max="1",this.bar.value="0",this.container.appendChild(this.bar),this.parent.appendChild(this.container),this.eventManager.o(this.bar,"mousedown",(function(){r.controls.Ob()&&(r.g=!0,r.onCh
2angeStart())})),this.eventManager.o(this.bar,"touchstart",(function(e){r.controls.Ob()&&(r.g=!0,qv(r,e),r.onChangeStart())})),this.eventManager.o(this.bar,"input",(function(){r.onChange()})),this.eventManager.o(this.bar,"touchmove",(function(e){r.g&&(qv(r,e),r.onChange())})),this.eventManager.o(this.bar,"touchend",(function(e){r.g&&(r.g=!1,qv(r,e),r.onChangeEnd())})),this.eventManager.o(this.bar,"mouseup",(function(){r.g&&(r.g=!1,r.onChangeEnd())}))}function qv(e,t){t.preventDefault();var n=t.changedTouches[0],i=e.bar.getBoundingClientRect(),r=parseFloat(e.bar.min),a=parseFloat(e.bar.max);(n=r+(a-r)/i.width*(n.clientX-i.left))<r?n=r:n>a&&(n=a),e.bar.value=n}function Xv(e,t){Hv.call(this,e,t,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var n=this;this.j=Ts("div"),this.j.classList.add("shaka-ad-markers"),this.container.insertBefore(this.j,this.container.childNodes[0]),this.m=this.controls.i,this.h=new pn((function(){n.video.currentTime=n.getValue()})),this.A=new pn((function(){Wv(n)})),this.B=!1,this.i=[],this.eventManager.o(this.localization,"locale-updated",(function(){return $v(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){return $v(n)})),this.eventManager.o(this.adManager,"ad-started",(function(){Jv(n)||Dv(n.container,!1)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){Jv(n)&&Dv(n.container,!0)})),this.eventManager.o(this.adManager,"ad-cue-points-changed",(function(e){n.i=e.cuepoints,Yv(n)})),this.eventManager.o(this.player,"unloading",(function(){n.i=[],Yv(n)})),this.setValue(this.video.currentTime),this.update(),$v(this),this.ad&&Dv(this.container,!1)}function Wv(e){if(e.i.length){for(var t=e.player.Ga(),n=t.end-t.start,i=["to right"],r=[],a=e.m.seekBarColors.adBreaks,o=!1,s=l(e.i),u=s.next();!u.done;u=s.next())if(-1!=(u=u.value).start||u.end||(o=!0),u.start>=t.start&&u.start<t.end&&!(u.end&&u.end>t.end)){var c=(u.start-t.start)/n||0,d=c+.01;u.end&&(d=(u.end-t.start)/n||0),r.push({start:c,end:d})}for(u=(t=l(r)).next();!u.done;u=t.next())n=u.value,i.push("transparent "+100*n.start+"%"),i.push(a+" "+100*n.start+"%"),i.push(a+" "+100*n.end+"%"),i.push("transparent "+100*n.end+"%");o&&(i.push("transparent 99%"),i.push(a+" 99%")),e.j.style.background="linear-gradient("+i.join(",")+")"}else e.j.style.background="transparent"}function Yv(e){Wv(e);var t=e.player.Ga();t=t.end-t.start,e.player.T()&&5<t&&e.A.ka(1)}function Jv(e){var t=e.player.Ga();return t=t.end-t.start,!(e.player.T()&&5>t)&&(null==e.ad||!e.ad.isLinear())}function $v(e){e.bar.ariaLabel=e.localization.resolve("SEEK")}function Qv(){}function Zv(t,n,i,r){ee.call(this);var a=this;this.W=!0,this.i=r,this.C=new pc(i,t,this.i.castReceiverAppId),this.jb=!0,this.B=this.C.Db(),this.A=i,this.F=this.C.dc(),this.Ma=t,this.j=n,this.Ya=this.F.dd(),this.m=this.l=null,this.$=!1,this.G=[],this.Hb=[],this.mb=!1,this.aa=new pn((function(){a.j.style.cursor="none",a.mb=!1,ay(a)})),this.ha=new pn((function(){a.g.removeAttribute("shown"),a.J.R(2)})),this.J=new pn((function(){for(var e=l(a.G),t=e.next();!t.done;t=e.next())Dv(t.value,!1)})),this.Oa=new pn((function(){a.Ob()&&cy(a)})),this.K=null,this.H=[],this.Na=function(){var e=new We("en");return e.ia("ar",new Map([["AD_DURATION","مدة الإعلان"],["AD_PROGRESS","الإعلان [AD_ON] من [NUM_ADS]"],["AD_TIME","الإعلان: [AD_TIME]"],["AUTO_QUALITY","تلقائي"],["BACK","رجوع"],["CAPTIONS","الترجمة والشرح"],["CAST","إرسال..."],["ENTER_LOOP_MODE","تكرار الفيديو الحالي"],["ENTER_PICTURE_IN_PICTURE",'الدخول في وضع "نافذة ضمن نافذة"'],["EXIT_FULL_SCREEN","إنهاء وضع ملء الشاشة"],["EXIT_LOOP_MODE","إيقاف تكرار الفيديو الحالي"],["EXIT_PICTURE_IN_PICTURE",'الخروج من وضع "نافذة ضمن نافذة"'],["FAST_FORWARD","تقديم سريع"],["FULL_SCREEN","ملء الشاشة"],["LANGUAGE","اللغة"],["LIVE","مباشر"],["LOOP","تكرار"],["MORE_SETTINGS","مزيد من الإعدادات"],["MULTIPLE_LANGUAGES","لغات متعددة"],["MUTE","كتم الصوت"],["NOT_APPLICABLE","غير سارٍ"],["OF
2F","إيقاف"],["ON","تشغيل"],["PAUSE","إيقاف مؤقت"],["PICTURE_IN_PICTURE","نافذة ضمن النافذة"],["PLAY","التشغيل"],["PLAYBACK_RATE","سرعة التشغيل"],["RESOLUTION","درجة الدقة"],["REWIND","ترجيع"],["SEEK","البحث بالتمرير"],["SKIP_AD","تخطّي الإعلان"],["SKIP_TO_LIVE","الانتقال إلى بث مباشر"],["UNDETERMINED_LANGUAGE","غير محدد"],["UNMUTE","إعادة الصوت"],["UNRECOGNIZED_LANGUAGE","غير معروف"],["VOLUME","مستوى الصوت"]])),e.ia("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung [AD_ON] von [NUM_ADS]"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AUTO_QUALITY","Automatisch"],["BACK","Zurück"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild-im-Bild-Modus aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild-im-Bild-Modus beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Sc
2hleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE","Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["RESOLUTION","Auflösung"],["REWIND","Zurückspulen"],["SEEK","Suche"],["SKIP_AD","Überspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautstärke"]])),e.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]])),e.ia("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_TIME","Ad: [AD_TIME]"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognised"],["VOLUME","volume"]])),e.ia("es",new Map([["AD_DURATION","Duración del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_TIME","Anuncio: [AD_TIME]"],["AUTO_QUALITY","Automático"],["BACK","Atrás"],["CAPTIONS","Subtítulos"],["CAST","Enviar..."],["ENTER_LOOP_MODE","Reproducir en bucle el vídeo actual"],["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el vídeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar rápidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","Más ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducción"],["RESOLUTION","Resolución"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_TO_LIVE","Ir al vídeo en directo"],["SUBTITLE_FORCED","Forzado"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]])),e.ia("es-419",new Map([["AD_DURATION","Duración del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_TIME","Anuncio: [AD_TIME]"],["AUTO_QUALITY","Automático"],["BACK","Atrás"],["CAPTIONS","Subtítulos"],["CAST","Transmitir..."],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetición indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","Más opciones de configuración"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducción"],["RESOLUTION","Resolución"],["REWIND","Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisión en vivo"],["SUBTITLE_FORCED","Forzado"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]])),e.ia("fr",new Map([["AD_DURATION","Durée de l'annonce"],["AD_PROGRESS","Annonce [AD_ON] sur
2 [NUM_ADS]"],["AD_TIME","Annonce : [AD_TIME]"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster…"],["ENTER_LOOP_MODE","Lire en boucle la vidéo en cours"],["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein écran"],["EXIT_LOOP_MODE","Arrêter la lecture en boucle de la vidéo en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein écran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","Répéter"],["MORE_SETTINGS","Plus de paramètres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","Désactivée"],["ON","Activée"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["RESOLUTION","Résolution"],["REWIND","Retour arrière"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_TO_LIVE","Accéder à la partie la plus récente du direct"],["UNDETERMINED_LANGUAGE","Langue indéterminée"],["UNMUTE","Réactiver le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]])),e.ia("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_TIME","Annuncio: [AD_TIME]"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE","Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES","Più lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocità di riproduzione"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]])),e.ia("ja",new Map([["AD_DURATION","広告再生時間"],["AD_PROGRESS","[AD_ON] 番目の広告(全 [NUM_ADS] 個)"],["AD_TIME","広告: [AD_TIME]"],["AUTO_QUALITY","自動"],["BACK","戻る"],["CAPTIONS","字幕"],["CAST","キャスト..."],["ENTER_LOOP_MODE","現在の動画をループ再生"],["ENTER_PICTURE_IN_PICTURE","ピクチャー イン ピクチャーを開始"],["EXIT_FULL_SCREEN","全画面表示を終了"],["EXIT_LOOP_MODE","現在の動画のループ再生を停止"],["EXIT_PICTURE_IN_PICTURE","ピクチャー イン ピクチャーを終了"],["FAST_FORWARD","早送り"],["FULL_SCREEN","全画面表示"],["LANGUAGE","言語"],["LIVE","ライブ"],["LOOP","ループ"],["MORE_SETTINGS","詳細設定"],["MULTIPLE_LANGUAGES","多言語"],["MUTE","ミュート"],["NOT_APPLICABLE","該当なし"],["OFF","オフ"],["ON","オン"],["PAUSE","一時停止"],["PICTURE_IN_PICTURE","ピクチャー イン ピクチャー"],["PLAY","再生"],["PLAYBACK_RATE","再生速度"],["RESOLUTION","解像度"],["REWIND","巻き戻し"],["SEEK","シーク再生"],["SKIP_AD","広告をスキップ"],["SKIP_TO_LIVE","ライブ配信までスキップ"],["UNDETERMINED_LANGUAGE","不明"],["UNMUTE","ミュートを解除"],["UNRECOGNIZED_LANGUAGE","不明"],["VOLUME","音量"]])),e.ia("ko",new Map([["AD_DURATION","광고 기간"],["AD_PROGRESS","광고 [AD_ON]/[NUM_ADS]"],["AD_TIME","광고: [AD_TIME]"],["AUTO_QUALITY","자동"],["BACK","뒤로"],["CAPTIONS","자막"],["CAST","전송..."],["ENTER_LOOP_MODE","현재 동영상 반복 재생"],["ENTER_PICTURE_IN_PICTURE","PIP 모드 시작"],["EXIT_FULL_SCREEN","전체화면 닫기"],["EXIT_LOOP_MODE","현재 동영상 반복 재생 중지"],["EXIT_PICTURE_IN_PICTURE","PIP 모드 종료"],["FAST_FORWARD","빨리 감기"],["FULL_SCREEN","전체화면"],["LANGUAGE","언어"],["LIVE","실시간"],["LOOP","반복 재생"],["MORE_SETTINGS","설정 더보기"],["MULTIPLE_LANGUAGES","여러 언어"],["MUTE","음소거"],["NOT_APPLICABLE","해당 사항 없음"],["OFF","사용 안함"],["ON","사용"],["PAUSE","일시중지"],["PICTURE_IN_PICTURE","PIP 모드"],["PLAY","재생"],["PLAYBACK_RATE","재생 속ë
2„"],["RESOLUTION","해상도"],["REWIND","되감기"],["SEEK","찾기"],["SKIP_AD","광고 건너뛰기"],["SKIP_TO_LIVE","라이브 동영상으로 건너뛰기"],["UNDETERMINED_LANGUAGE","미정"],["UNMUTE","음소거 해제"],["UNRECOGNIZED_LANGUAGE","알 수 없음"],["VOLUME","볼륨"]])),e.ia("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_TIME","Advertentie: [AD_TIME]"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN","Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Dempen"],["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Dempen opheffen"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]])),e.ia("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama [AD_ON] z [NUM_ADS]"],["AD_TIME","Reklama: [AD_TIME]"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesyłaj..."],["ENTER_LOOP_MODE","Odtwarzaj bieżący film w pętli"],["ENTER_PICTURE_IN_PICTURE","Włącz tryb obrazu w obrazie"],["EXIT_FULL_SCREEN","Zamknij pełny ekran"],["EXIT_LOOP_MODE","Wyłącz odtwarzanie bieżącego filmu w pętli"],["EXIT_PICTURE_IN_PICTURE","Wyłącz tryb obrazu w obrazie"],["FAST_FORWARD","Przewiń do przodu"],["FULL_SCREEN","Pełny ekran"],["LANGUAGE","Język"],["LIVE","Na żywo"],["LOOP","Odtwarzaj w pętli"],["MORE_SETTINGS","Więcej ustawień"],["MULTIPLE_LANGUAGES","Wiele języków"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wyłączone"],["ON","Włączone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w obrazie"],["PLAY","Odtwórz"],["PLAYBACK_RATE","Szybkość odtwarzania"],["RESOLUTION","Rozdzielczość"],["REWIND","Przewiń do tyłu"],["SEEK","Szukaj"],["SKIP_AD","Pomiń reklamę"],["SKIP_TO_LIVE","Przejdź do transmisji na żywo"],["UNDETERMINED_LANGUAGE","Nie określono"],["UNMUTE","Wyłącz wyciszenie"],["UNRECOGNIZED_LANGUAGE","Nierozpoznany"],["VOLUME","Głośność"]])),e.ia("pt-BR",new Map([["AD_DURATION","Duração do anúncio"],["AD_PROGRESS","Anúncio [AD_ON] de [NUM_ADS]"],["AD_TIME","Anúncio: [AD_TIME]"],["AUTO_QUALITY","Automática"],["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["ENTER_LOOP_MODE","Repetir o vídeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repetição do vídeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avançar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE","Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais definições"],["MULTIPLE_LANGUAGES","Vários idiomas"],["MUTE","Desativar som"],["NOT_APPLICABLE","Não relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodução"],["RESOLUTION","Resolução"],["REWIND","Retroceder"],["SEEK","Procurar"],["SKIP_AD","Pular anúncio"],["SKIP_TO_LIVE","Pular para transmissão ao vivo"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","Não reconhecido"],["VOLUME","Volume"]])),e.ia("ru",new Map([["AD_DURATION","Продолжительность рекламы"],["AD_PROGRESS","Реклама [AD_ON] из [NUM_ADS]"],["AD_TIME","Реклама: [AD_TIME]"],["AUTO_QUALITY","Авто"],["BACK","Назад"],["CAPTIONS","Субтитры"],["CAST","Транслировать..."],["ENTER_LOOP_MODE","Зациклить текущее видео"],["ENTER_PICTURE_IN_PICTURE",'Перейти в режим "Картинка в картинке"'],["EXIT_FULL_SCREEN","Обычный режим"],["EXIT_LOOP_MODE","Отменить зацикливание текущего видео"],["EXIT_PICTURE_IN_PICTURE",'Выйти из режима "Картинка в картинке"'],["FAST_FORWARD","Перемотка вперед"],["FULL_SCREEN","Полноэкранный режим"],["LANGUAGE","Язык"],["LIVE","Прямой эфир"],["LOOP","Зациклить"],["MORE_SETTINGS","Дополнительные настройки"],["MULTIPLE_LANGUAGES","Несколько языков"],["MUTE","Отключить звук"],["NOT_APPLICABLE","Неприменимо"],["OFF","Выкл."],["ON","Вкл."],["PAUSE","Пауза"],["PICTURE_IN_PICTURE","Картинка в картинке"],["PLAY","Воспроизвести"],["PLAYBACK_RATE","Скорость воспроизведения"],["RESOLUTION","Разрешение"],["REWIND","Перемотать назад"],["SEEK","Перемотка"],["SKIP_AD","Пропустить"],["SKIP_TO_LIVE","Пропустить и перейти Ð
2º прямой трансляции"],["UNDETERMINED_LANGUAGE","Не указано"],["UNMUTE","Включить звук"],["UNRECOGNIZED_LANGUAGE","Не распознано"],["VOLUME","Громкость"]])),e.ia("th",new Map([["AD_DURATION","ระยะเวลาโฆษณา"],["AD_PROGRESS","โฆษณา [AD_ON] จาก [NUM_ADS] รายการ"],["AD_TIME","โฆษณา: [AD_TIME]"],["AUTO_QUALITY","อัตโนมัติ"],["BACK","กลับ"],["CAPTIONS","คำบรรยาย"],["CAST","แคสต์..."],["ENTER_LOOP_MODE","วนซ้ำวิดีโอปัจจุบัน"],["ENTER_PICTURE_IN_PICTURE","เข้าสู่การแสดงภาพซ้อนภาพ"],["EXIT_FULL_SCREEN","ออกจากการแสดงแบบเต็มหน้าจอ"],["EXIT_LOOP_MODE","หยุดวนซ้ำวิดีโอปัจจุบัน"],["EXIT_PICTURE_IN_PICTURE","ออกจากการแสดงภาพซ้อนภาพ"],["FAST_FORWARD","กรอไปข้างหน้า"],["FULL_SCREEN","เต็มหน้าจอ"],["LANGUAGE","ภาษา"],["LIVE","สด"],["LOOP","ลูป"],["MORE_SETTINGS","การตั้งค่าเพิ่มเติม"],["MULTIPLE_LANGUAGES","หลายภาษา"],["MUTE","ปิดเสียง"],["NOT_APPLICABLE","ไม่เกี่ยวข้อง"],["OFF","ปิด"],["ON","เปิด"],["PAUSE","หยุดชั่วคราว"],["PICTURE_IN_PICTURE","การแสดงภาพซ้อนภาพ"],["PLAY","เล่น"],["PLAYBACK_RATE","ความเร็วในการเล่น"],["RESOLUTION","ความละเอียด"],["REWIND","กรอกลับ"],["SEEK","ค้นหา"],["SKIP_AD","ข้ามโฆษณา"],["SKIP_TO_LIVE","ข้ามไปที่การถ่ายทอดสด"],["UNDETERMINED_LANGUAGE","ไม่กำหนด"],["UNMUTE","เปิดเสียง"],["UNRECOGNIZED_LANGUAGE","ที่ไม่รู้จัก"],["VOLUME","ระดับเสียง"]])),e.ia("tr",new Map([["AD_DURATION","Reklam süresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_TIME","Reklam: [AD_TIME]"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyazılar"],["CAST","Yayınla..."],["ENTER_LOOP_MODE","Mevcut videoyu döngüye al"],["ENTER_PICTURE_IN_PICTURE","Pencere içinde Pencere moduna gir"],["EXIT_FULL_SCREEN","Tam ekrandan çık"],["EXIT_LOOP_MODE","Mevcut videonun döngüsünü durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere İçinde Pencereden Çık"],["FAST_FORWARD","İleri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canlı"],["LOOP","Döngü"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden çok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Geçerli değil"],["OFF","Kapalı"],["ON","Açık"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere İçinde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","Çalma hızı"],["RESOLUTION","Çözünürlük"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklamı Atla"],["SKIP_TO_LIVE","Canlı yayına atla"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi aç"],["UNRECOGNIZED_LANGUAGE","Tanınmayan"],["VOLUME","Ses"]])),e.ia("zh",new Map([["AD_DURATION","广告持续时间"],["AD_PROGRESS","广告 [AD_ON]/[NUM_ADS]"],["AD_TIME","广告:[AD_TIME]"],["AUTO_QUALITY","自动"],["BACK","返回"],["CAPTIONS","字幕"],["CAST","投射…"],["ENTER_LOOP_MODE","循环播放当前视频"],["ENTER_PICTURE_IN_PICTURE","进入“画中画”模式"],["EXIT_FULL_SCREEN","退出全屏模式"],["EXIT_LOOP_MODE","停止循环播放当前视频"],["EXIT_PICTURE_IN_PICTURE","退出“画中画”模式"],["FAST_FORWARD","快进"],["FULL_SCREEN","全屏"],["LANGUAGE","语言"],["LIVE","直播"],["LOOP","循环播放"],["MORE_SETTINGS","更多设置"],["MULTIPLE_LANGUAGES","多种语言"],["MUTE","静音"],["NOT_APPLICABLE","不适用"],["OFF","关闭"],["ON","开启"],["PAUSE","暂停"],["PICTURE_IN_PICTURE","画中画"],["PLAY","播放"],["PLAYBACK_RATE","播放速度"],["RESOLUTION","分辨率"],["REWIND","快退"],["SEEK","进度"],["SKIP_AD","跳过广告"],["SKIP_TO_LIVE","跳至当前直播"],["UNDETERMINED_LANGUAGE","未确定"],["UNMUTE","取消静音"],["UNRECOGNIZED_LANGUAGE","无法识别"],["VOLUME","音量"]])),e.ia("zh-TW",new Map([["AD_DURATION","廣告長度"],["AD_PROGRESS","廣告 [AD_ON]/[NUM_ADS]"],["AD_TIME","廣告:[AD_TIME]"],["AUTO_QUALITY","自動"],["BACK","返回"],["CAPTIONS","字幕"],["CAST","投放..."],["ENTER_LOOP_MODE","循環播放目前的影片"],["ENTER_PICTURE_IN_PICTURE","進入子母畫面"],["EXIT_FULL_SCREEN","退出全螢幕模式"],["EXIT_LOOP_MODE","停止循環播放目前的影片"],["EXIT_PICTURE_IN_PICTURE","離開子母畫面"],["FAST_FORWARD","快轉"],["FULL_SCREEN","全螢幕"],["LANGUAGE","語言"],["LIVE","直播"],["LOOP","循環播放"],["MORE_SETTINGS","顯示更多設定"],["MULTIPLE_LANGUAGES","多種語言"],["MUTE","靜音"],["NOT_APPLICABLE","不適用"],["OFF","關閉"],["ON","開啟"],["PAUSE","暫停"],["PICTURE_IN_PICTURE","子母畫面"],["PLAY","播放"],["PLAYBACK_RATE","播放速度"],["RESOLUTION","解析度"],["REWIND","倒轉"],["SEEK","搜尋"],["SKIP_AD","略過廣告"],["SKIP_TO_LIVE","跳至当前直播"],["UNDETERMINED_LANGUAGE","不明"],["UNMUTE","取消靜音"],["UNRECOGNIZED_LANGUAGE","無法辨識"],["VOLUME","音量"]])),e.Re(navigator.languages||[]),e}(),this.h=new Ui,this.configure(this.i),function(t){t.h.o(t.F,"buffering",(function(){t.W&&Dv(t.ea,t.F.Ic())})),t.W&&Dv(t.ea,t.F.Ic()),t.h.o(e,"keydown",(function(n){!function(t,n){t.wa.add(n.key);var i=t.Xc();"Tab"==n.key&&(t.g.classList.add("shaka-keyboard-navigation"),ay(t),t.h.o(e,"mousedown",(function(){t.h.La(e,"mousedown")}))),"Escape"==n.key&&t.J.Aa(),i&&t.wa.has("Tab")&&function(e,t){var n=e.G.filter((function(e){return!e.classList.contains("shaka-hidden")}));if(n.length){var i=n[0];if(i.childNodes.length){for(n=i.firstElementChild;n&&n.classList.contains("shaka-hidden");)n=n.nextElementSibling;for(i=i.lastElementChild;i&&i.classList.contains("shaka-hidden");)i=i.previousElementSibling;var r=document.activeElement;e.wa.has("Shift")?r==n&&(t.preventDefault(),i.focus()):r==i&&(t.preventDefault(),n.focus())}}}(t,n)}(t,n)})),t.h.o(e,"click",(function(){return t.fc()})),t.h.o(t,"submenuopen",(function(){t.fc()})),t.h.o(t.B,"play",(function(){ay(t)})),t.h.o(t.B,"pause",(function(){ay(t)})),t.h.o(t.j,"mousemove",(function(e){ry(t,e)})),t.h.o(t.j,"touchmove",(function(e){ry(t,e)}),{passive:!0}),t.h.o(t.j,"touchend",(function(e){ry(t,e)}),{passive:!0}),t.h.o(t.j,"mouseleave",(function(){t.K||t.aa.Aa()})),t.h.o(t.C,"caststatuschanged",(function(){uy(t)})),t.h.o(t.j,"keydown",(function(e){var n=document.activeElement,i=!(!n||!n.classList)&&n.classList.contains("shaka-volume-bar"),r=n&&n.classList&&n.classList.contains("shaka-seek-bar");if(t.g.contains(n)&&ry(t,e),t.i.enableKeyboardPlaybackControls)switch(e.key){case"ArrowLeft":t.m&&!i&&(e.preventDefault(),ly(t,t.m.getValue()-5));break;case"ArrowRight":t.m&&!i&&(e.preventDefault(),ly(t,t.m.getValue()+5));break;case"Home":t.m&&ly(t,t.F.Ga().start);break;case"End":t.m&&ly(t,t.F.Ga().end);break;case" ":r&&sy(t)}})),t.h.o(t.j,"keyup",(function(e){t.wa.delete(e.key)})),t.h.o(t.Ya,"ad-started",(function(e){t.l=e.ad,t.Bf()})),t.h.o(t.Ya,"ad-stopped",(function(){t.l=null,t.gf()})),screen.orientation&&t.h.o(screen.orientation,"change",(function(){return _((function(e){return E(e,function(e){return _((function(t){return e.B&&0!=e.B.readyState&&!e.C.sa()&&e.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?E(t,e.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?E(t,document.exitFullscreen(),0):t.D(0):t.return()}))}(t),0)}))})),t.h.o(document,"fullscreenchange",(function(){t.l&&t.l.resize(t.A.offsetWidth,t.A.offsetHeight)}))}(this),this.wa=new Set,uy(this),this.Oa.ka(.125),this.h.o(this.Na,"locale-changed",(function(e){a.Ya.setLocale(e.locales[0])}))}function ey(e){for(var t=l(e.H),n=t.next();!n.done;n=t.next())n.value.release();e.H=[]}function ty(e,t){dy.set(e,t)}function ny(e){e.W&&e.B.duration&&(e.F.Pe(),e.B.paused&&!e.$?e.B.play():e.B.pause())}function iy(e){e.l&&e.l.isPaused()?e.l.play():e.l&&e.l.pause()}function ry(e,t){"mousemove"==t.type&&(e.g.classList.remove("shaka-keyboard-navigation"),ay(e)),"touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"ke
2yup"==t.type?e.K=Date.now():e.K+1e3<Date.now()&&(e.K=null),e.K&&"mousemove"==t.type||(e.j.style.cursor="",e.mb=!0,e.J.stop(),e.Ob()||(cy(e),ay(e)),e.aa.stop(),"touchend"!=t.type&&"keyup"!=t.type&&e.K||e.aa.R(3))}function ay(t){var n=!!t.l&&t.l.isPaused(),i=t.B.paused&&!t.$,r=t.g.classList.contains("shaka-keyboard-navigation");n||(!t.l||!t.l.isLinear())&&i||t.mb||r||function(t){return!!e.matchMedia("hover: hover").matches&&t.Hb.some((function(e){return e.matches(":hover")}))}(t)?(cy(t),t.g.setAttribute("shown","true"),t.ha.stop()):t.ha.R(t.i.fadeDelay)}function oy(e){e.W&&(e.Xc()?e.J.Aa():e.i.singleClickForPlayAndPause&&sy(e))}function sy(e){e.l&&e.l.isLinear()?iy(e):ny(e)}function uy(e){var t=e.C.sa();e.dispatchEvent(new K("caststatuschanged",(new Map).set("newStatus",t))),t?e.g.setAttribute("casting","true"):e.g.removeAttribute("casting")}function ly(e,t){e.m.changeTo(t),e.Ob()&&cy(e)}function cy(e){if(e.m)if(e.m.setValue(e.B.currentTime),e.m.update(),e.m.isShowing())for(var t=l(e.G),n=t.next();!n.done;n=t.next())n.value.classList.remove("shaka-low-position");else for(n=(t=l(e.G)).next();!n.done;n=t.next())n.value.classList.add("shaka-low-position");e.dispatchEvent(new K("timeandseekrangeupdated"))}m(Hv,Lv),(i=Hv.prototype).release=function(){this.l&&(this.l.stop(),this.l=null),Lv.prototype.release.call(this)},i.setRange=function(e,t){this.bar.min=e,this.bar.max=t},i.onChangeStart=function(){},i.onChange=function(){},i.onChangeEnd=function(){},i.changeTo=function(e){this.g||(this.g=!0,this.onChangeStart());var t=parseFloat(this.bar.min),n=parseFloat(this.bar.max);this.bar.value=e>n?n:e<t?t:e,this.onChange(),this.l.R(.5)},i.getValue=function(){return parseFloat(this.bar.value)},i.setValue=function(e){this.g||(this.bar.value=e)},G("shaka.ui.RangeElement",Hv),Hv.prototype.setValue=Hv.prototype.setValue,Hv.prototype.getValue=Hv.prototype.getValue,Hv.prototype.changeTo=Hv.prototype.changeTo,Hv.prototype.onChangeEnd=Hv.prototype.onChangeEnd,Hv.prototype.onChange=Hv.prototype.onChange,Hv.prototype.onChangeStart=Hv.prototype.onChangeStart,Hv.prototype.setRange=Hv.prototype.setRange,m(Xv,Hv),(i=Xv.prototype).release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null),Hv.prototype.release.call(this)},i.onChangeStart=function(){this.B=!this.video.paused,this.controls.xe(!0),this.video.pause()},i.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))},i.onChangeEnd=function(){this.h.Aa(),this.controls.xe(!1),this.B&&this.video.play()},i.isShowing=function(){return!this.container.classList.contains("shaka-hidden")},i.update=function(){var e=this.m.seekBarColors,t=this.getValue(),n=this.video.buffered.length,i=n?this.video.buffered.start(0):0,r=n?this.video.buffered.end(n-1):0,a=this.player.Ga(),o=a.end-a.start;this.setRange(a.start,a.end),Jv(this)?(Dv(this.container,!0),0==n?this.container.style.background=e.base:(n=(Math.max(i,a.start)-a.start)/o||0,r=(Math.min(r,a.end)-a.start)/o||0,t=(Math.min(Math.max(t,a.start),a.end)-a.start)/o||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?e.base:e.played)+" "+100*n+"%",e.played+" "+100*n+"%",e.played+" "+100*t+"%",e.buffered+" "+100*t+"%",e.buffered+" "+100*r+"%",e.base+" "+100*r+"%"].join()+")")):Dv(this.container,!1)},G("shaka.ui.SeekBar",Xv),Qv.prototype.create=function(e,t){return new Xv(e,t)},Xv.Factory=Qv,m(Zv,ee),(i=Zv.prototype).destroy=function(){var e=this;return _((function(t){switch(t.g){case 1:if(document.pictureInPictureElement!=e.A){t.D(2);break}return E(t,document.exitPictureInPicture(),2);case 2:if(e.h&&(e.h.release(),e.h=null),e.aa&&(e.aa.stop(),e.aa=null),e.ha&&(e.ha.stop(),e.ha=null),e.J&&(e.J.stop(),e.J=null),e.Oa&&(e.Oa.stop(),e.Oa=null),ey(e),e.g&&(e.j.removeChild(e.g),e.g=null),!e.C){t.D(4);break}return E(t,e.C.destroy(),5);case 5:e.C=null;case 4:if(!e.Ma){t.D(6);break}return E(t,e.Ma.destroy(),7);case 7:e.Ma=null;case 6:e.F=null,e.A=null,e.B=null,e.Na=null,e.wa.clear(),ee.prototype.release.call(e),T(t)}}))},i.Lf=function(e){this.jb=e,uy(this)},i.Gg=function(){ay(this)},i.configure=function(e){this.i=e,this.C.Se(e.castReceiverAppId),this.m&&(this.m=null),this.hb&&(this.hb=null),this.Za&&(this.Za=null),this.g?(ws(this.g),ey(this)):(function(e){e.g=Ts("div"),e.g.classList.add("shaka-controls-container"),e.j.appendChild(e.g),e.j.setAttribute("shaka-controls","true"),e.h.o(e.g,"touchstart",(function(t){e.B.duration&&(e.Ob()?e.K=Date.now():(ry(e,t),t.preventDefault()))}),{passive:!1}),e.h.o(e.g,"click",(function(){oy(e)})),e.h.o(e.g,"dblclick",(function(){e.i.doubleClickForFullscreen&&e.Rd()&&e.De()}))}(this),function(e){e.S=Ts("div"),e.S.classList.add("shaka-client-side-a
2d-container"),Dv(e.S,!1),e.h.o(e.S,"click",(function(){oy(e)})),e.j.appendChild(e.S)}(this)),this.j.classList.add("shaka-video-container"),this.A.classList.add("shaka-video"),function(e){var t=Ts("div");t.classList.add("shaka-scrim-container"),e.g.appendChild(t)}(this),this.i.addBigPlayButton&&function(e){var t=Ts("div");t.classList.add("shaka-play-button-container"),e.g.appendChild(t),e.hb=new Gv(t,e),e.H.push(e.hb)}(this),this.i.customContextMenu&&(this.Za=new Kv(this.X,this),this.H.push(this.Za)),this.ea||function(e){e.ea=Ts("div"),e.ea.classList.add("shaka-spinner-container"),e.j.appendChild(e.ea);var t=Ts("div");t.classList.add("shaka-spinner"),e.ea.appendChild(t),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),e.classList.add("shaka-spinner-svg"),e.setAttribute("viewBox","0 0 30 30"),t.appendChild(e),t=document.createElementNS("http://www.w3.org/2000/svg","circle"),t.classList.add("shaka-spinner-path"),t.setAttribute("cx","15"),t.setAttribute("cy","15"),t.setAttribute("r","14.5"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","1"),t.setAttribute("stroke-miterlimit","10"),e.appendChild(t)}(this),this.kb=Ts("div"),this.kb.classList.add("shaka-server-side-ad-container"),this.g.appendChild(this.kb),function(e){e.N=Ts("div"),e.N.classList.add("shaka-bottom-controls"),e.N.classList.add("shaka-no-propagation"),e.g.appendChild(e.N),e.h.o(e.N,"click",(function(t){t.target.closest(".shaka-overflow-button")||e.fc()})),function(e){e.M=Ts("div"),e.M.classList.add("shaka-ad-controls");var t=null!=e.l&&e.l.isLinear();Dv(e.M,t),e.N.appendChild(e.M),t=new jv(e.M,e),e.H.push(t),t=new Uv(e.M,e),e.H.push(t)}(e),e.X=Ts("div"),e.X.classList.add("shaka-controls-button-panel"),e.X.classList.add("shaka-show-controls-on-mouse-over"),e.i.enableTooltips&&e.X.classList.add("shaka-tooltips-on"),e.N.appendChild(e.X);for(var t={},n=l(e.i.controlPanelElements),i=n.next();!i.done;t={sc:t.sc},i=n.next())i=i.value,dy.get(i)?("function"!=typeof(i=dy.get(i).create(e.X,e)).release&&(Ae("shaka.extern.IUIElement","Please update UI elements to have a release() method."),t.sc=i,t.sc.release=function(e){return function(){e.sc.destroy&&e.sc.destroy()}}(t)),e.H.push(i)):q("Unrecognized control panel element requested:",i)}(this),this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu")),this.G.push.apply(this.G,c(Array.from(this.j.getElementsByClassName("shaka-overflow-menu")))),function(e){if(e.i.addSeekBar)e.m=hy.create(e.N,e),e.H.push(e.m);else for(var t=(e=l(e.G)).next();!t.done;t=e.next())t.value.classList.add("shaka-low-position")}(this),this.Hb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over")),ay(this);for(var t=(e=l(this.j.getElementsByClassName("shaka-no-propagation"))).next();!t.done;t=e.next()){t=t.value;var n=function(e){return e.stopPropagation()};this.h.o(t,"click",n),this.h.o(t,"dblclick",n)}},i.se=function(e){(this.W=e)?(this.j.setAttribute("shaka-controls","true"),this.A.tabIndex=-1,this.A.controls=!1):this.j.removeAttribute("shaka-controls"),ay(this)},i.yf=function(e){this.A.controls=e,this.A.tabIndex=e?0:-1,e&&this.se(!1)},i.getAd=function(){return this.l},i.Wf=function(){return this.C},i.jg=function(){return this.Na},i.Ag=function(){return this.j},i.Db=function(){return this.B},i.ig=function(){return this.A},i.dc=function(){return this.F},i.hg=function(){return this.Ma},i.ag=function(){return this.g},i.rg=function(){return this.kb},i.Yf=function(){return this.S},i.Zf=function(){return this.i},i.Fg=function(){return this.$},i.xe=function(e){this.$=e},i.Dg=function(){return this.jb},i.cf=function(){return this.m?this.m.getValue():this.B.currentTime},i.zf=function(e){this.K=e},i.Xc=function(){return this.G.some((function(e){return!e.classList.contains("shaka-hidden")}))},i.fc=function(){this.J.Aa()},i.Rd=function(){return!(!document.fullscreenEnabled&&!this.A.webkitSupportsFullscreen)},i.Qd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var e=this.A;return!!e.webkitSupportsFullscreen&&e.webkitDisplayingFullscreen},i.De=function(){var e,t,n=this;return _((function(i){switch(i.g){case 1:if(!document.fullscreenEnabled){(e=n.A).webkitSupportsFullscreen&&(e.webkitDisplayingFullscreen?e.webkitExitFullscreen():e.webkitEnterFullscreen()),i.D(0);break}if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),E(i,document.exitFullscreen(),0);if(A(i,5),!document.pictureInPictureElement){i.D(7);break}return E(i,document.exitPictureInPicture(),7);case 7:return E(i,n.j.requestFullscreen({navigationUI:"hide"}),9);
2case 9:if(!n.i.forceLandscapeOnFullscreen||!screen.orientation){i.D(10);break}return A(i,11),E(i,screen.orientation.lock("landscape"),13);case 13:S(i,10,5);break;case 11:x(i,5);case 10:S(i,0);break;case 5:t=x(i),n.dispatchEvent(new K("error",(new Map).set("detail",t))),i.D(0)}}))},i.Bf=function(){Dv(this.M,!0),Dv(this.S,!0),this.g.setAttribute("ad-active","true")},i.gf=function(){Dv(this.M,!1),Dv(this.S,!1),this.g.removeAttribute("ad-active")},i.Ob=function(){return!!this.W&&(null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"))},G("shaka.ui.Controls",Zv),Zv.prototype.isOpaque=Zv.prototype.Ob,Zv.prototype.hideAdUI=Zv.prototype.gf,Zv.prototype.showAdUI=Zv.prototype.Bf,Zv.prototype.toggleFullScreen=Zv.prototype.De,Zv.prototype.isFullScreenEnabled=Zv.prototype.Qd,Zv.prototype.isFullScreenSupported=Zv.prototype.Rd,Zv.prototype.hideSettingsMenus=Zv.prototype.fc,Zv.prototype.anySettingsMenusAreOpen=Zv.prototype.Xc,Zv.prototype.setLastTouchEventTime=Zv.prototype.zf,Zv.prototype.getDisplayTime=Zv.prototype.cf,Zv.prototype.isCastAllowed=Zv.prototype.Dg,Zv.prototype.setSeeking=Zv.prototype.xe,Zv.prototype.isSeeking=Zv.prototype.Fg,Zv.prototype.getConfig=Zv.prototype.Zf,Zv.prototype.getClientSideAdContainer=Zv.prototype.Yf,Zv.prototype.getServerSideAdContainer=Zv.prototype.rg,Zv.prototype.getControlsContainer=Zv.prototype.ag,Zv.prototype.getLocalPlayer=Zv.prototype.hg,Zv.prototype.getPlayer=Zv.prototype.dc,Zv.prototype.getLocalVideo=Zv.prototype.ig,Zv.prototype.getVideo=Zv.prototype.Db,Zv.prototype.getVideoContainer=Zv.prototype.Ag,Zv.prototype.getLocalization=Zv.prototype.jg,Zv.prototype.getCastProxy=Zv.prototype.Wf,Zv.prototype.getAd=Zv.prototype.getAd,Zv.prototype.setEnabledNativeControls=Zv.prototype.yf,Zv.prototype.setEnabledShakaControls=Zv.prototype.se,Zv.prototype.configure=Zv.prototype.configure,Zv.prototype.loadComplete=Zv.prototype.Gg,Zv.prototype.allowCast=Zv.prototype.Lf,Zv.registerSeekBar=function(e){hy=e},Zv.registerElement=ty,Zv.prototype.destroy=Zv.prototype.destroy;var dy=new Map,hy=new Qv;function fy(e,t){Lv.call(this,e,t);var n=this;this.l=this.controls.i,this.j=this.controls.g,this.i=[],this.g=As(),this.g.classList.add("shaka-overflow-menu-button"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.g.textContent="more_vert",this.parent.appendChild(this.g),this.h=Ts("div"),this.h.classList.add("shaka-overflow-menu"),this.h.classList.add("shaka-no-propagation"),this.h.classList.add("shaka-show-controls-on-mouse-over"),this.h.classList.add("shaka-hidden"),this.j.appendChild(this.h),function(e){for(var t=l(e.l.overflowMenuButtons),n=t.next();!n.done;n=t.next())n=n.value,vy.get(n)?(n=vy.get(n),e.i.push(n.create(e.h,e.controls))):q("Unrecognized overflow menu element requested:",n)}(this),this.eventManager.o(this.localization,"locale-updated",(function(){gy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){gy(n)})),this.eventManager.o(this.adManager,"ad-started",(function(){n.ad&&n.ad.isLinear()&&Dv(n.g,!1)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){Dv(n.g,!0)})),this.eventManager.o(this.controls,"submenuopen",(function(){Dv(n.h,!1)})),this.eventManager.o(this.h,"touchstart",(function(e){n.controls.zf(Date.now()),e.stopPropagation()})),this.eventManager.o(this.g,"click",(function(){!function(e){if(e.controls.Xc())e.controls.fc();else{Dv(e.h,!0),ay(e.controls);var t=function(e){return 0==e.classList.contains("shaka-hidden")};(function(e,t){for(var n=l(e),i=n.next();!i.done;i=n.next())if(t(i.value))return!0;return!1})(e.h.childNodes,t)&&ne(e.h.childNodes,t)[0].focus()}}(n)})),gy(this),this.ad&&this.ad.isLinear()&&Dv(this.g,!1)}function py(e,t){vy.set(e,t)}function gy(e){e.g.ariaLabel=e.localization.resolve("MORE_SETTINGS")}function my(){}m(fy,Lv),fy.prototype.release=function(){this.j=null;for(var e=l(this.i),t=e.next();!t.done;t=e.next())t.value.release();this.i=[],Lv.prototype.release.call(this)},G("shaka.ui.OverflowMenu",fy),fy.registerElement=py,my.prototype.create=function(e,t){return new fy(e,t)},ty("overflow_menu",new my);var vy=new Map;function yy(t,n){Lv.call(this,t,n);var i=this;this.g=As(),this.g.classList.add("shaka-airplay-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.h=Ts("i"),this.h.classList.add("material-icons-round"),this.h.textContent="airplay",this.g.appendChild(this.h),e.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var r=Ts("label");r.classList.add("shaka-overflow-button-label"),r.classList.add("shaka-overflow-menu-only"),this.j=Ts("span"),r.appendChild(this.j),this.i=Ts("span"),this.i.classList.add("shaka-current-selection-span"),r.appendChild(this.i),this.g.appendChild(r),this.parent.appendChild(this.g),Ey(this),by(this),this.eventManager.o(this.localization,"locale-updated",(function(){Ey(i)})),this.eventManager.o(this.localization,"locale-changed",(function(){Ey(i)})),this.eventManager.o(this.g,"click",(function(){i.controls.Db().webkitShowPlaybackTargetPicker()})),r=this.controls.Db(),this.eventManager.o(r,"webkitplaybacktargetavailabilitychanged",(function(e){var t=i.player.df()==Il;Dv(i.g,"available"==e.availability&&t)})),this.eventManager.o(r,"webkitcurrentplaybacktargetiswirelesschanged",(function(){by(i)}))}function by(e){var t=e.controls.Db();e.g.ariaPressed=t&&t.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Ey(e){e.g.ariaLabel=e.localization.resolve("AIRPLAY"),e.j.textContent=e.localization.resolve("AIRPLAY")}function Ty(){}
2function Ay(e,t,n){this.i=e,this.h=wy(this),t.dataset.shakaPlayerContainer="",t.ui=this,this.Sd()&&t.classList.add("shaka-mobile"),this.g=new Zv(e,t,n,this.h),this.configure({}),n.controls||e.Ae(t),t.ui=this,n.ui=this}function wy(t){var n={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop","picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:ky,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};return e.WebKitPlaybackTargetAvailabilityEvent&&n.overflowMenuButtons.push("airplay"),t.Sd()&&(n.addBigPlayButton=!0,n.controlPanelElements=n.controlPanelElements.filter((function(e){return"play_pause"!=e&&"volume"!=e}))),n}function Sy(){var e,t,n,i,r,a,o,s,u,c,d,h;return _((function(f){switch(f.g){case 1:if(Np(),!au())return xy("shaka-ui-load-failed",Cy),f.return();if(e=document.querySelectorAll("[data-shaka-player-container]"),!(t=document.querySelectorAll("[data-shaka-player]")).length&&!e.length){f.D(2);break}if(t.length&&!e.length){for(n=l(t),i=n.next();!i.done;i=n.next())(r=i.value).ui||(a=document.createElement("div"),r.parentElement.replaceChild(a,r),a.appendChild(r),Iy(a,r));f.D(2);break}o=l(e),s=o.next();case 4:if(s.done){f.D(2);break}if((u=s.value).ui){f.D(5);break}for(c=null,d=l(t),i=d.next();!i.done;i=d.next())if((h=i.value).parentElement==u){c=h;break}return c||((c=document.createElement("video")).setAttribute("playsinline",""),u.appendChild(c)),A(f,7),E(f,Iy(u,c),9);case 9:S(f,5);break;case 7:return x(f),xy("shaka-ui-load-failed",My),f.return();case 5:s=o.next(),f.D(4);break;case 2:xy("shaka-ui-loaded"),T(f)}}))}function xy(e,t){var n=null;null!=t&&(n={reasonCode:t}),n=new CustomEvent(e,{detail:n}),document.dispatchEvent(n)}function Iy(e,t){var n,i,r,a,o,s,u,c;return _((function(d){switch(d.g){case 1:n=new iu(t),i=new Ay(n,e,t),r="",e.dataset&&e.dataset.shakaPlayerCastReceiverId?r=e.dataset.shakaPlayerCastReceiverId:t.dataset&&t.dataset.shakaPlayerCastReceiverId&&(r=t.dataset.shakaPlayerCastReceiverId),r.length&&i.configure({castReceiverAppId:r}),t.controls&&i.g.yf(!0),(a=t.getAttribute("src"))&&((o=document.createElement("source")).setAttribute("src",a),t.appendChild(o),t.removeAttribute("src")),s=l(t.querySelectorAll("source")),u=s.next();case 2:if(u.done){d.D(0);break}return c=u.value,A(d,5),E(d,i.g.dc().load(c.getAttribute("src")),7);case 7:d.D(0);break;case 5:x(d);case 3:u=s.next(),d.D(2)}}))}m(yy,Lv),G("shaka.ui.AirPlayButton",yy),Ty.prototype.create=function(e,t){return new yy(e,t)},py("airplay",new Ty),ty("airplay",new Ty),(i=Ay.prototype).destroy=function(){var e=this;return _((function(t){return 1==t.g?e.g?E(t,e.g.destroy(),2):t.D(2):4!=t.g?(e.g=null,e.i?E(t,e.i.destroy(),4):t.D(4)):(e.i=null,void T(t))}))},i.Sd=function(){return!!/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)||yn()&&1<navigator.maxTouchPoints},i.getConfiguration=function(){var e=wy(this);return qs(e,this.h,wy(this),{},""),e},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Xs(e,t)),qs(this.h,e,wy(this),{},""),this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast"),this.g.configure(this.h),this.g.dis
2patchEvent(new K("uiupdated"))},i.$f=function(){return this.g},i.hh=function(e){this.g.se(e)},G("shaka.ui.Overlay",Ay),Ay.prototype.setEnabled=Ay.prototype.hh,Ay.prototype.getControls=Ay.prototype.$f,Ay.prototype.configure=Ay.prototype.configure,Ay.prototype.getConfiguration=Ay.prototype.getConfiguration,Ay.prototype.isMobile=Ay.prototype.Sd,Ay.prototype.destroy=Ay.prototype.destroy;var ky=0;Ay.TrackLabelFormat={LANGUAGE:ky,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Cy=0,My=1;function Ly(e,t,n,i,r,a,o){function s(e,t){return e+": "+t}function u(e){return"variant"==e.type?e.audioRoles?e.audioRoles.join(", "):void 0:e.roles.join(", ")}var c=e.find((function(e){return 1==e.active})),d=Nv(t);ws(t),t.appendChild(d),d=new Map;for(var h=l(e),f=h.next();!f.done;f=h.next())f=f.value,d.has(f.language)||d.set(f.language,new Set),d.get(f.language).add(u(f));for(d=new Set,c=c?s(c.language,u(c)):"",h={},f=(e=l(e)).next();!f.done;h={Wa:h.Wa},f=e.next()){h.Wa=f.value,f=h.Wa.language;var p=h.Wa.forced,g=a.resolve(Qe.Gf),m=u(h.Wa),v=s(f,m);if(!d.has(v)){d.add(v);var y=As();y.addEventListener("click",function(e){return function(){n(e.Wa)}}(h));var b=Ts("span");switch(y.appendChild(b),b.textContent=Ny(f,a),o){case ky:p&&(b.textContent+=" ("+g+")");break;case 1:m?b.textContent=m:(q("Track #"+h.Wa.id+" does not have a role, but the UI is configured to only show role."),b.textContent="?"),p&&(b.textContent+=" ("+g+")");break;case 2:m&&(b.textContent+=": "+m),p&&(b.textContent+=" ("+g+")");break;case 3:h.Wa.label?b.textContent=h.Wa.label:(q("Track #"+h.Wa.id+" does not have a label, but the UI is configured to only show labels."),b.textContent="?")}i&&v==c&&(y.appendChild(Pv()),b.classList.add("shaka-chosen-item"),y.ariaSelected="true",r.textContent=b.textContent),t.appendChild(y)}}}function Ny(e,t){if(!e&&!t)return"";switch(e){case"mul":return t.resolve("MULTIPLE_LANGUAGES");case"und":return t.resolve("UNDETERMINED_LANGUAGE");case"zxx":return t.resolve("NOT_APPLICABLE")}var n=ze(e);return e in Iv?Iv[e].s:n in Iv?Iv[n].s+" ("+e+")":t.resolve("UNRECOGNIZED_LANGUAGE")+" ("+e+")"}function Ry(e,t,n){Lv.call(this,e,t);var i=this;!function(e,t){e.button=As(),e.button.classList.add("shaka-overflow-button"),e.icon=Ts("i"),e.icon.classList.add("material-icons-round"),e.icon.textContent=t,e.button.appendChild(e.icon);var n=Ts("label");n.classList.add("shaka-overflow-button-label"),n.classList.add("shaka-overflow-menu-only"),e.nameSpan=Ts("span"),n.appendChild(e.nameSpan),e.currentSelection=Ts("span"),e.currentSelection.classList.add("shaka-current-selection-span"),n.appendChild(e.currentSelection),e.button.appendChild(n),e.parent.appendChild(e.button)}(this,n),function(e){e.menu=Ts("div"),e.menu.classList.add("shaka-no-propagation"),e.menu.classList.add("shaka-show-controls-on-mouse-over"),e.menu.classList.add("shaka-settings-menu"),e.menu.classList.add("shaka-hidden"),e.backButton=As(),e.backButton.classList.add("shaka-back-to-overflow-button"),e.menu.appendChild(e.backButton),e.eventManager.o(e.backButton,"click",(function(){e.controls.fc()}));var t=Ts("i");t.classList.add("material-icons-round"),t.textContent="close",e.backButton.appendChild(t),e.backSpan=Ts("span"),e.backButton.appendChild(e.backSpan),e.controls.g.appendChild(e.menu)}(this),function(e){e.parent.classList.contains("shaka-overflow-menu")&&(e.backButton.firstChild.textContent="arrow_back",e.eventManager.o(e.backButton,"click",(function(){Dv(e.parent,!0),e.parent.childNodes[0].focus(),ay(e.controls)})))}(this),this.eventManager.o(this.button,"click",(function(){i.menu.classList.contains("shaka-hidden")?(i.controls.dispatchEvent(new K("submenuopen")),Dv(i.menu,!0),_v(i.menu)):Dv(i.menu,!1)}))}function _y(e,t){Ry.call(this,e,t,"language");var n=this;this.button.classList.add("shaka-language-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-audio-languages"),this.eventManager.o(this.localization,"locale-updated",(function(){Dy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Dy(n)})),this.eventManager.o(this.player,"trackschanged",(function(){var e=0<n.player.ab().length;Dv(n.button,e),Py(n)})),this.eventManager.o(this.player,"variantchanged",(function(){Py(n)})),Dy(this),Py(this)}function Py(e){Ly(e.player.ab(),e.menu,(function(t){e.player.vd(t.language,t.roles[0])}),!0,e.currentSelection,e.localization,e.controls.i.trackLabelFormat),_v(e.menu),e.controls.dispatchEvent(new K("languageselectionupdated")),e.button.setAttribute("shaka-status",e.currentSelection.innerText)}function Dy(e){e.backButton.ariaLabel=e.localization.resolve("BACK"),e.button.ariaLabel=e.localization.resolve("LANGUAGE"),e.nameSpan.textContent=e.localization.resolve("LANGUAGE"),e.backSpan.textContent=e.localization.resolve("LANGUAGE")}function Oy(){}function Uy(e,t){Lv.call(this,e,t);var n=this;this.h=this.controls.C,this.g=As(),this.g.classList.add("shaka-cast-button"),this.g.classList.add("shaka-tooltip"),this.g.ariaPressed="false",this.i=Ts("i"),this.i.classList.add("material-icons-round"),this.i.textContent="cast",this.g.appendChild(this.i);var i=Ts("label");i.classList.add("shaka-overflow-button-label"),i.classList.add("shaka-overflow-menu-only"),this.l=Ts("span"),i.appendChild(this.l),this.j=Ts("span"),this.j.classList.add("shaka-current-selection-span"),i.appendChild(this.j),this.g.appendChild(i),this.parent.appendChild(this.g),Fy(this),jy(this),this.eventManager.o(this.localization,"locale-updated",(function(){Fy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Fy(n)})),this.eventManager.o(this.g,"click",(function(){!function(e){var t;_((function(n){return 1==n.g?e.h.sa()?(e.h.Cf(),n.D(0)):(A(n,3),e.g.disabled=!0,E(n,e.h.cast(),5)):3!=n.g?(e.g.disabled=!1,S(n,0)):(t=x(n),e.g.disabled=!1,8004!=t.code&&e.controls.dispatchEvent(new K("error",(new Map).set("detail",t))),void T(n))}))}(n)})),this.eventManager.o(this.controls,"caststatuschanged",(function(){jy(n)}))}function jy(e){var t=e.h.Oe()&&e.controls.jb,n=e.h.sa();Dv(e.g,t),e.i.textContent=n?"cast_connected":"cast",t&&(e.g.ariaPressed=n?"true":"false"),By(e)}function By(e){e.j.textContent=e.h.sa()?e.h.td():e.localization.resolve("OFF")}function Fy(e){e.g.ariaLabel=e.localization.resolve("CAST"),e.l.textContent=e.localization.resolve("CAST"),By(e)}function Gy(){}function Ky(e,t){Lv.call(this,e,t);var n=this;this.g=As(),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-fast-forward-button"),this.g.classList.add("shaka-tooltip-status"),this.g.setAttribute("shaka-status","1x"),this.g.textContent="fast_forward",this.parent.appendChild(this.g),Vy(this),this.h=this.controls.i.fastForwardRates,this.eventManager.o(this.localization,"locale-updated",(function(){Vy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Vy(n)})),this.eventManager.o(this.g,"click",(function(){if(n.video.duration){var e=n.h.indexOf(n.player.Cb())+1;e=e!=n.h.length?n.h[e]:n.h[0],n.player.Fe(e),n.g.setAttribute("shaka-status",e+"x")}}))}function Vy(e){e.g.ariaLabel=e.localization.resolve("FAST_FORWARD")}function zy(){}function Hy(e,t){Lv.call(this,e,t);var n=this;this.h=this.controls.A,this.g=As(),this.g.classList.add("shaka-fullscreen-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),qy(this),this.g.textContent="fullscreen",this.parent.appendChild(this.g),Xy(this),this.eventManager.o(this.localization,"locale-updated",(function(){Xy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Xy(n)})),this.eventManager.o(this.g,"click",(function(){return _((function(e){return E(e,n.controls.De(),0)}))})),this.eventManager.o(document,"fullscreenchange",(function(){n.g.textContent=n.controls.Qd()?"fullscreen_exit":"fullscreen",Xy(n)})),this.eventManager.o(this.h,"loadedmetadata",(function(){qy(n)})),this.eventManager.o(this.h,"loadeddata",(function(){qy(n)}))}function qy(e){e.controls.Rd()?e.g.classList.remove("shaka-hidden"):e.g.classList.add("shaka-hidden")}function Xy(e){e.g.ariaLabel=e.localization.resolve(e.controls.Qd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}function Wy(){}function Yy(e,t){Lv.call(this,e,t);var n=this;this.g=As(),this.g.classList.add("shaka-loop-button"),this.g.classList.add("shaka-tooltip"),this.i=Ts("i"),this.i.classList.add("material-icons-round"),this.i.textContent="repeat",this.g.appendChild(this.i);var i=Ts("label");i.classList.add("shaka-overflow-button-label"),i.classList.add("shaka-overflow-menu-only"),this.j=Ts("span"),this.j.textContent=this.localization.resolve("LOOP"),i.appendChild(this.j),this.l=Ts("span"),this.l.classList.add("shaka-current-selection-span"),i.appendChild(this.l),this.g.appendChild(i),Jy(this),this.parent.appendChild(this.g),this.eventManager.o(this.localization,"locale-updated",(function(){Jy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Jy(n)})),this.eventManager.o(this.g,"click",(function(){n.video.loop=!n.video.loop,n.h.Aa(),n.h.ka(1)})),this.m=this.video.loop,this.h=new pn((function(){n.m!=n.video.loop&&(Jy(n),n.m=n.video.loop)})),this.h.ka(1)}function Jy(e){e.j.textContent=e.localization.resolve("LOOP"),e.l.textContent=e.localization.resolve(e.video.loop?"ON":"OFF"),e.i.textContent=e.video.loop?"repeat_on":"repeat",e.g.ariaLabel=e.localization.resolve(e.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}function $y(){}function Qy(e,t){Lv.call(this,e,t);var n=this;this.g=As(),this.g.classList.add("shaka-mute-button"),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-tooltip"),this.parent.appendChild(this.g),Zy(this),eb(this),this.eventManager.o(this.localization,"locale-updated",(function(){Zy(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Zy(n)})),this.eventManager.o(this.g,"click",(function(){n.ad&&n.ad.isLinear()?n.ad.setMuted(!n.ad.isMuted()):n.video.muted=!n.video.muted})),this.eventManager.o(this.video,"volumechange",(function(){Zy(n),eb(n)})),this.eventManager.o(this.adManager,"ad-volume-changed",(function(){Zy(n),eb(n)})),this.eventManager.o(this.adManager,"ad-muted",(function(){Zy(n),eb(n)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){n.ad=null,Zy(n),eb(n)}))}
2function Zy(e){var t=e.ad?e.ad.isMuted()?"UNMUTE":"MUTE":e.video.muted?"UNMUTE":"MUTE";e.g.ariaLabel=e.localization.resolve(t)}function eb(e){var t=e.ad?e.ad.isMuted()?"volume_off":"volume_up":e.video.muted?"volume_off":"volume_up";e.g.textContent=t}function tb(){}function nb(e,t){Lv.call(this,e,t);var n=this;this.l=this.controls.A,this.g=As(),this.g.classList.add("shaka-pip-button"),this.g.classList.add("shaka-tooltip"),this.i=Ts("i"),this.i.classList.add("material-icons-round"),this.i.textContent="picture_in_picture_alt",this.g.appendChild(this.i);var i=Ts("label");i.classList.add("shaka-overflow-button-label"),i.classList.add("shaka-overflow-menu-only"),this.j=Ts("span"),this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE"),i.appendChild(this.j),this.h=Ts("span"),this.h.classList.add("shaka-current-selection-span"),i.appendChild(this.h),this.g.appendChild(i),ib(this),this.parent.appendChild(this.g),document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Dv(this.g,!1),this.eventManager.o(this.localization,"locale-updated",(function(){ib(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){ib(n)})),this.eventManager.o(this.g,"click",(function(){!function(e){var t;_((function(n){return 1==n.g?(A(n,2),document.pictureInPictureElement?E(n,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),E(n,e.video.requestPictureInPicture(),5))):2!=n.g?S(n,0):(t=x(n),e.controls.dispatchEvent(new K("error",(new Map).set("detail",t))),void T(n))}))}(n)})),this.eventManager.o(this.l,"enterpictureinpicture",(function(){n.i.textContent="branding_watermark",n.g.ariaLabel=n.localization.resolve("EXIT_PICTURE_IN_PICTURE"),n.h.textContent=n.localization.resolve("ON")})),this.eventManager.o(this.l,"leavepictureinpicture",(function(){n.i.textContent="picture_in_picture_alt",n.g.ariaLabel=n.localization.resolve("ENTER_PICTURE_IN_PICTURE"),n.h.textContent=n.localization.resolve("OFF")})),this.eventManager.o(this.controls,"caststatuschanged",(function(e){e.newStatus?document.pictureInPictureEnabled&&!n.video.disablePictureInPicture&&Dv(n.g,!1):document.pictureInPictureEnabled&&!n.video.disablePictureInPicture&&Dv(n.g,!0)})),this.eventManager.o(this.player,"trackschanged",(function(){!function(e){_((function(t){return!document.pictureInPictureEnabled||e.video.disablePictureInPicture?(Dv(e.g,!1),t.D(0)):e.player&&e.player.jf()?(Dv(e.g,!1),document.pictureInPictureElement?E(t,document.exitPictureInPicture(),0):t.D(0)):(Dv(e.g,!0),t.D(0))}))}(n)}))}function ib(e){e.j.textContent=e.localization.resolve("PICTURE_IN_PICTURE"),e.g.ariaLabel=e.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"),e.h.textContent=e.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}function rb(){}function ab(e,t){Ry.call(this,e,t,"slow_motion_video");var n=this;this.button.classList.add("shaka-playbackrate-button"),this.menu.classList.add("shaka-playback-rates"),this.button.classList.add("shaka-tooltip-status"),this.eventManager.o(this.localization,"locale-updated",(function(){ob(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){ob(n)})),this.eventManager.o(this.player,"ratechange",(function(){sb(n,n.player.Cb())})),this.g=new Map(this.controls.i.playbackRates.map((function(e){return[e+"x",e]}))),ob(this),function(e){for(var t={},n=l(e.g.keys()),i=n.next();!i.done;t={tc:t.tc},i=n.next()){t.tc=i.value,i=As();var r=Ts("span");r.textContent=t.tc,i.appendChild(r),e.eventManager.o(i,"click",function(t){return function(){e.video.playbackRate=e.g.get(t.tc),e.video.defaultPlaybackRate=e.g.get(t.tc)}}(t)),e.menu.appendChild(i)}_v(e.menu)}(this),sb(this,this.player.Cb())}function ob(e){e.backButton.ariaLabel=e.localization.resolve("BACK"),e.button.ariaLabel=e.localization.resolve("PLAYBACK_RATE"),e.nameSpan.textContent=e.localization.resolve("PLAYBACK_RATE"),e.backSpan.textContent=e.localization.resolve("PLAYBACK_RATE")}function sb(e,t){var n=Rv(e.menu,"material-icons-round shaka-chosen-item");if(n){var i=n.parentElement;i.removeAttribute("aria-selected"),i.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item"),i.removeChild(n)}(n=Array.from(e.menu.querySelectorAll("span")).find((function(n){return e.g.get(n.textContent)==t})))&&((i=n.parentElement).appendChild(Pv()),i.ariaSelected="true",n.classList.add("shaka-chosen-item")),e.currentSelection.textContent=t+"x",e.button.setAttribute("shaka-status",t+"x")}function ub(){}function lb(e,t){Lv.call(this,e,t);var n=this;this.g=As(),this.g.classList.add("shaka-current-time"),cb(this,"0:00"),this.parent.appendChild(this.g),this.eventManager.o(this.g,"click",(function(){n.player.T()&&(n.video.currentTime=n.player.Ga().end)})),this.eventManager.o(this.controls,"timeandseekrangeupdated",(function(){var e=n.controls.$,t=n.controls.cf(),i=n.video.duration,r=n.player.Ga(),a=r.end-r.start;n.player.T()?(i=3600<=a,1<=(t=Math.max(0,Math.floor(r.end-t)))||e?(cb(n,"- "+Ov(t,i)),n.g.disabled=!1):(cb(n,n.localization.resolve("LIVE")),n.g.disabled=!0)):(t=Ov(t,e=3600<=i),i&&(t+=" / "+Ov(i,e)),cb(n,t),n.g.disabled=!0)})),this.eventManager.o(this.player,"trackschanged",(function(){n.player.T()&&(n.g.ariaLabel=n.localization.resolve("SKIP_TO_LIVE"))}))}function cb(e,t){t!=e.g.textContent&&(e.g.textContent=t)}function db(){}function hb(e,t){Ry.call(this,e,t,"settings");var n=this;this.button.classList.add("shaka-resolution-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-resolutions"),this.eventManager.o(this.localization,"locale-updated",(function(){pb(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){pb(n)})),this.eventManager.o(this.player,"variantchanged",(function(){fb(n)})),this.eventManager.o(this.player,"trackschanged",(function(){fb(n)})),this.eventManager.o(this.player,"abrstatuschanged",(function(){fb(n)})),fb(this),pb(this)}function fb(e){var t=e.player.ab();if(t.length&&!t[0].height)Dv(e.menu,!1),Dv(e.button,!1);else{Dv(e.button,!0),t.sort((function(e,t){return t.height-e.height}));var n=t.find((function(e){return e.active}));n&&(t=t.filter((function(e){return e.language==n.language&&e.channelsCount==n.channelsCount}))),t=t.filter((function(e,n){return t.findIndex((function(t){return t.height==e.height}))==n}));var i=Nv(e.menu);ws(e.menu),e.menu.appendChild(i),i=e.player.getConfiguration().abr.enabled;for(var r={},a=l(t),o=a.next();!o.done;r={wc:r.wc},o=a.next()){r.wc=o.value,(o=As()).classList.add("explicit-resolution"),e.eventManager.o(o,"click",function(t){return function(){var n=t.
2wc;e.player.configure({abr:{enabled:!1}}),e.player.qe(n,e.controls.i.clearBufferOnQualityChange)}}(r));var s=Ts("span");s.textContent=r.wc.height+"p",o.appendChild(s),i||r.wc!=n||(o.ariaSelected="true",o.appendChild(Pv()),s.classList.add("shaka-chosen-item"),e.currentSelection.textContent=s.textContent),e.menu.appendChild(o)}(r=As()).classList.add("shaka-enable-abr-button"),e.eventManager.o(r,"click",(function(){e.player.configure({abr:{enabled:!0}}),fb(e)})),e.g=Ts("span"),e.g.classList.add("shaka-auto-span"),e.g.textContent=e.localization.resolve("AUTO_QUALITY"),r.appendChild(e.g),i&&(r.ariaSelected="true",r.appendChild(Pv()),e.g.classList.add("shaka-chosen-item"),e.currentSelection.textContent=e.localization.resolve("AUTO_QUALITY")),e.button.setAttribute("shaka-status",e.currentSelection.textContent),e.menu.appendChild(r),_v(e.menu),e.controls.dispatchEvent(new K("resolutionselectionupdated"))}}function pb(e){e.button.ariaLabel=e.localization.resolve("RESOLUTION"),e.backButton.ariaLabel=e.localization.resolve("RESOLUTION"),e.backSpan.textContent=e.localization.resolve("RESOLUTION"),e.nameSpan.textContent=e.localization.resolve("RESOLUTION"),e.g.textContent=e.localization.resolve("AUTO_QUALITY"),e.player.getConfiguration().abr.enabled&&(e.currentSelection.textContent=e.localization.resolve("AUTO_QUALITY"))}function gb(){}function mb(e,t){Lv.call(this,e,t);var n=this;this.g=As(),this.g.classList.add("material-icons-round"),this.g.classList.add("shaka-rewind-button"),this.g.classList.add("shaka-tooltip-status"),this.g.setAttribute("shaka-status",this.localization.resolve("OFF")),this.g.textContent="fast_rewind",this.parent.appendChild(this.g),vb(this),this.h=this.controls.i.rewindRates,this.eventManager.o(this.localization,"locale-updated",(function(){vb(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){vb(n)})),this.eventManager.o(this.g,"click",(function(){if(n.video.duration){var e=n.h.indexOf(n.player.Cb())+1;e=e!=n.h.length?n.h[e]:n.h[0],n.player.Fe(e),n.g.setAttribute("shaka-status",e+"x")}}))}function vb(e){e.g.ariaLabel=e.localization.resolve("REWIND")}function yb(){}function bb(e,t){Lv.call(this,e,t);var n=this;this.j=Ts("div"),this.j.classList.add("shaka-skip-ad-container"),this.parent.appendChild(this.j),this.h=Ts("div"),this.h.classList.add("shaka-skip-ad-counter"),Dv(this.h,!1),this.j.appendChild(this.h),this.g=As(),this.g.classList.add("shaka-skip-ad-button"),this.g.disabled=!0,Dv(this.g,!1),this.g.classList.add("shaka-no-propagation"),this.j.appendChild(this.g),Eb(this),this.i=new pn((function(){var e=Math.round(n.ad.getTimeUntilSkippable());0<e?n.h.textContent=e:(n.i.stop(),Dv(n.h,!1))})),this.eventManager.o(this.localization,"locale-updated",(function(){Eb(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Eb(n)})),this.eventManager.o(this.adManager,"ad-started",(function(){Tb(n)})),this.eventManager.o(this.adManager,"ad-skip-state-changed",(function(){n.ad.canSkipNow()&&(n.g.disabled=!1,n.i.stop(),Dv(n.h,!1))})),this.eventManager.o(this.adManager,"ad-stopped",(function(){n.i.stop(),n.g.disabled=!0,Dv(n.g,!1),Dv(n.h,!1)})),this.eventManager.o(this.g,"click",(function(){n.ad.skip()})),this.ad&&Tb(this)}function Eb(e){e.g.textContent=e.localization.resolve("SKIP_AD")}function Tb(e){e.ad.isSkippable()&&(Dv(e.g,!0),Dv(e.h,!0),e.h.textContent="",e.i.Aa(),e.i.ka(.5))}function Ab(e,t){Fv.call(this,e,t),this.button.classList.add("shaka-small-play-button"),this.button.classList.add("material-icons-round"),this.button.classList.add("shaka-tooltip"),this.h(),this.g()}function wb(){}function Sb(e,t){Lv.call(this,e,t);var n=Ts("div");n.classList.add("shaka-spacer"),n.ariaHidden="true",this.parent.appendChild(n)}function xb(){}function Ib(e,t){function n(e){return Ov(s.h[e],!1)+" (m)"}function i(e){return Math.round(s.h[e]/1e3)+" (kbits/s)"}function r(e){return s.h[e].toFixed(2)+" (s)"}function a(e){return s.h[e]+" (frames)"}function o(e){return s.h[e]+" (px)"}Lv.call(this,e,t);var s=this;this.i=As(),this.i.classList.add("shaka-statistics-button"),this.j=Ts("i"),this.j.classList.add("material-icons-round"),this.j.textContent="insert_chart_outlined",this.i.appendChild(this.j);var u=Ts("label");u.classList.add("shaka-overflow-button-label"),this.A=Ts("span"),u.appendChild(this.A),this.m=Ts("span"),this.m.classList.add("shaka-current-selection-span"),u.appendChild(this.m),this.i.appendChild(u),this.parent.appendChild(this.i),this.g=Ts("div"),this.g.classList.add("shaka-no-propagation"),this.g.classList.add("shaka-show-controls-on-mouse-over"),this.g.classList.add("shaka-statistics-container"),this.g.classList.add("shaka-hidden"),this.controls.g.appendChild(this.g),this.F=[],this.G=["stateHistory","switchHistory"],this.h=this.player.getStats(),this.B={}
2,this.C={width:o,height:o,completionPercent:function(e){return s.h[e]+" (%)"},bufferingTime:r,drmTimeSeconds:r,licenseTime:r,liveLatency:r,loadLatency:r,manifestTimeSeconds:r,estimatedBandwidth:i,streamBandwidth:i,maxSegmentDuration:n,pauseTime:n,playTime:n,corruptedFrames:a,decodedFrames:a,droppedFrames:a},this.l=new pn((function(){s.h=s.player.getStats();for(var e=l(s.F),t=e.next();!t.done;t=e.next())t=t.value,s.B[t].textContent=s.C[t](t)})),kb(this),function(e){for(var t=l(e.controls.i.statisticsList),n=t.next();!n.done;n=t.next())if((n=n.value)in e.h&&!e.G.includes(n)){var i=e.g,r=i.appendChild,a=e,o=Ts("div"),s=Ts("label");s.textContent=n+":",o.appendChild(s),(s=Ts("span")).textContent=a.C[n](n),o.appendChild(s),a.B[n]=s,r.call(i,o),e.F.push(n)}else q("Unrecognized statistic element:",n)}(this),this.eventManager.o(this.localization,"locale-updated",(function(){kb(s)})),this.eventManager.o(this.localization,"locale-changed",(function(){kb(s)})),this.eventManager.o(this.i,"click",(function(){Dv(s.parent,!1),s.g.classList.contains("shaka-hidden")?(s.j.textContent="insert_chart",s.l.ka(.1),Dv(s.g,!0)):(s.j.textContent="insert_chart_outlined",s.l.stop(),Dv(s.g,!1)),kb(s)}))}function kb(e){e.A.textContent=e.localization.resolve("STATISTICS"),e.i.ariaLabel=e.localization.resolve("STATISTICS"),e.m.textContent=e.localization.resolve(e.g.classList.contains("shaka-hidden")?"OFF":"ON")}function Cb(){}function Mb(e,t){Ry.call(this,e,t,"closed_caption");var n=this;this.button.classList.add("shaka-caption-button"),this.button.classList.add("shaka-tooltip-status"),this.menu.classList.add("shaka-text-languages"),this.player&&this.player.Pb()?this.button.ariaPressed="true":this.button.ariaPressed="false",function(e){var t=As();t.ariaSelected="true",e.menu.appendChild(t),t.appendChild(Pv()),e.g=Ts("span"),e.g.classList.add("shaka-auto-span"),t.appendChild(e.g)}(this),this.eventManager.o(this.localization,"locale-updated",(function(){Rb(n),Nb(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){Rb(n),Nb(n)})),this.eventManager.o(this.player,"texttrackvisibility",(function(){Lb(n),Nb(n)})),this.eventManager.o(this.player,"textchanged",(function(){Nb(n)})),this.eventManager.o(this.player,"trackschanged",(function(){_b(n)})),Lb(this),Rb(this),Nb(this),_b(this)}function Lb(e){e.player.Pb()?(e.icon.textContent="closed_caption_disabled",e.button.ariaPressed="true"):(e.icon.textContent="closed_caption",e.button.ariaPressed="false"),e.controls.dispatchEvent(new K("captionselectionupdated"))}function Nb(e){var t=e.player.rb();Ly(t,e.menu,(function(t){return function(e,t){return _((function(n){return e.player.pe(t),E(n,e.player.ze(!0),0)}))}(e,t)}),e.player.Pb(),e.currentSelection,e.localization,e.controls.i.trackLabelFormat),(t=As()).classList.add("shaka-turn-captions-off-button"),e.eventManager.o(t,"click",(function(){e.player.ze(!1),Nb(e)})),t.appendChild(e.g),e.menu.appendChild(t),e.player.Pb()||(t.ariaSelected="true",t.appendChild(Pv()),e.g.classList.add("shaka-chosen-item"),e.currentSelection.textContent=e.localization.resolve("OFF")),e.button.setAttribute("shaka-status",e.currentSelection.textContent),_v(e.menu),e.controls.dispatchEvent(new K("captionselectionupdated"))}function Rb(e){e.button.ariaLabel=e.localization.resolve("CAPTIONS"),e.backButton.ariaLabel=e.localization.resolve("BACK"),e.nameSpan.textContent=e.localization.resolve("CAPTIONS"),e.backSpan.textContent=e.localization.resolve("CAPTIONS"),e.g.textContent=e.localization.resolve("OFF")}function _b(e){var t=0<e.player.rb().length;Dv(e.button,t),Nb(e)}function Pb(){}function Db(e,t){Hv.call(this,e,t,["shaka-volume-bar-container"],["shaka-volume-bar"]);var n=this;this.h=this.controls.i,this.eventManager.o(this.video,"volumechange",(function(){return Ob(n)})),this.eventManager.o(this.adManager,"ad-volume-changed",(function(){return Ub(n)})),this.eventManager.o(this.adManager,"ad-muted",(function(){return Ub(n)})),this.eventManager.o(this.adManager,"ad-stopped",(function(){return Ob(n)})),this.eventManager.o(this.localization,"locale-updated",(function(){return Bb(n)})),this.eventManager.o(this.localization,"locale-changed",(function(){return Bb(n)})),Ob(this),Bb(this),this.ad&&this.onChange()}function Ob(e){e.video.muted?e.setValue(0):e.setValue(e.video.volume),jb(e)}function Ub(e){var t=e.ad.getVolume();e.setValue(t),jb(e)}function jb(e){var t=e.h.volumeBarColors,n=["to right"];
2n.push(t.level+100*e.getValue()+"%"),n.push(t.base+100*e.getValue()+"%"),n.push(t.base+"100%"),e.container.style.background="linear-gradient("+n.join(",")+")"}function Bb(e){e.bar.ariaLabel=e.localization.resolve("VOLUME")}function Fb(){}Ay.FailReasonCode={NO_BROWSER_SUPPORT:Cy,PLAYER_FAILED_TO_LOAD:My},"complete"==document.readyState?_((function(e){if(1==e.g)return E(e,Promise.resolve(),2);Sy(),T(e)})):e.addEventListener("load",Sy),m(Ry,Lv),G("shaka.ui.SettingsMenu",Ry),m(_y,Ry),G("shaka.ui.AudioLanguageSelection",_y),Oy.prototype.create=function(e,t){return new _y(e,t)},py("language",new Oy),ty("language",new Oy),m(Uy,Lv),G("shaka.ui.CastButton",Uy),Gy.prototype.create=function(e,t){return new Uy(e,t)},py("cast",new Gy),ty("cast",new Gy),m(Ky,Lv),G("shaka.ui.FastForwardButton",Ky),zy.prototype.create=function(e,t){return new Ky(e,t)},ty("fast_forward",new zy),m(Hy,Lv),G("shaka.ui.FullscreenButton",Hy),Wy.prototype.create=function(e,t){return new Hy(e,t)},ty("fullscreen",new Wy),m(Yy,Lv),Yy.prototype.release=function(){this.h.stop(),this.h=null,Lv.prototype.release.call(this)},G("shaka.ui.LoopButton",Yy),$y.prototype.create=function(e,t){return new Yy(e,t)},py("loop",new $y),ty("loop",new $y),Vv("loop",new $y),m(Qy,Lv),G("shaka.ui.MuteButton",Qy),tb.prototype.create=function(e,t){return new Qy(e,t)},ty("mute",new tb),m(nb,Lv),G("shaka.ui.PipButton",nb),rb.prototype.create=function(e,t){return new nb(e,t)},py("picture_in_picture",new rb),ty("picture_in_picture",new rb),Vv("picture_in_picture",new rb),m(ab,Ry),G("shaka.ui.PlaybackRateSelection",ab),ub.prototype.create=function(e,t){return new ab(e,t)},py("playback_rate",new ub),ty("playback_rate",new ub),m(lb,Lv),G("shaka.ui.PresentationTimeTracker",lb),db.prototype.create=function(e,t){return new lb(e,t)},ty("time_and_duration",new db),m(hb,Ry),G("shaka.ui.ResolutionSelection",hb),gb.prototype.create=function(e,t){return new hb(e,t)},py("quality",new gb),ty("quality",new gb),m(mb,Lv),G("shaka.ui.RewindButton",mb),yb.prototype.create=function(e,t){return new mb(e,t)},ty("rewind",new yb),m(bb,Lv),bb.prototype.release=function(){this.i.stop(),this.i=null,Lv.prototype.release.call(this)},G("shaka.ui.SkipAdButton",bb),m(Ab,Fv),Ab.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"},Ab.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var e=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(e)}},G("shaka.ui.SmallPlayButton",Ab),wb.prototype.create=function(e,t){return new Ab(e,t)},ty("play_pause",new wb),m(Sb,Lv),G("shaka.ui.Spacer",Sb),xb.prototype.create=function(e,t){return new Sb(e,t)},ty("spacer",new xb),m(Ib,Lv),Ib.prototype.release=function(){this.l.stop(),this.l=null,Lv.prototype.release.call(this)},G("shaka.ui.StatisticsButton",Ib),Cb.prototype.create=function(e,t){return new Ib(e,t)},py("statistics",new Cb),Vv("statistics",new Cb),m(Mb,Ry),G("shaka.ui.TextSelection",Mb),Pb.prototype.create=function(e,t){return new Mb(e,t)},py("captions",new Pb),ty("captions",new Pb),m(Db,Hv),Db.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume)},G("shaka.ui.VolumeBar",Db),Fb.prototype.create=function(e,t){return new Db(e,t)},ty("volume",new Fb)}.call(t,e,e,void 0),"undefined"!=typeof exports)for(var n in t.shaka)exports[n]=t.shaka[n];else"function"==typeof define&&define.amd?define((function(){return t.shaka})):e.shaka=t.shaka}();

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.