1/*! For license information please see shaka-player.compiled.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,f="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 h;e:{var p={};try{p.__proto__={a:!0},h=p.a;break e}catch(e){}h=!1}d=h?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=f(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.Pg=t.prototype}function v(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function y(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}function b(e,t){e.i={fe:t,le:!0},e.g=e.m||e.j}function w(e,t,n){return e.g=n,{value:t}}function T(e){e.g=0}function x(e,t,n){e.m=t,null!=n&&(e.j=n)}function S(e){e.m=0,e.j=2}function A(e,t){e.g=t,e.m=0}function E(e){e.m=0;var t=e.i.fe;return e.i=null,t}function k(e){e.u=[e.i],e.m=0,e.j=0}function I(e,t){var n=e.u.splice(0)[0];(n=e.i=e.i||n)?n.le?e.g=e.m||e.j:null!=n.A&&e.j<n.A?(e.g=n.A,e.i=null):e.g=e.j:e.g=t}function M(e){this.g=new v,this.h=e}function C(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.o=!1,r;var a=r.value}catch(t){return e.g.l=null,b(e.g,t),R(e)}
2return e.g.l=null,i.call(e.g,a),R(e)}function R(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.le)throw t.fe;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return y(e.g),e.g.l?t=C(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=R(e)),t},this.throw=function(t){return y(e.g),e.g.l?t=C(e,e.g.l.throw,t,e.g.s):(b(e.g,t),t=R(e)),t},this.return=function(t){return function(e,t){y(e.g);var n=e.g.l;return n?C(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),R(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function N(e,t){var n=new D(new M(t));return g&&e.prototype&&g(n,e.prototype),n}function P(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 D(new M(e)))}function L(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(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{ca:r,v:a}}return{ca:-1,v:void 0}}function O(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function U(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}v.prototype.s=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.A=function(e){this.g=e},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function i(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var r=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.G),reject:e(this.l)}},t.prototype.G=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.J(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.L(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.H(),this.u()},t.prototype.H=function(){var e=this;r((function(){if(e.C()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.C=function(){if(this.o)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.u=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.J=function(e){var t=this.j();e.zc(t.resolve,t.reject)},t.prototype.L=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.o=!0},t.resolve=i,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var r=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(!j(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),!j(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&j(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&j(e,s)&&j(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&j(e,s)&&j(e[s],this.g))&&delete e[s][this.g]},t})),s("Map",(function(e){function t(){var e={};return e.Ra=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.Ra;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&&j(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,ia:s}}return{id:n,list:i,index:-1,ia: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.ia?n.ia.value=t:(n.ia={next:this.g,Ra:this.g.Ra,head:this.g,key:e,value:t},n.list.push(n.ia),this.g.Ra.next=n.ia,this.g.Ra=n.ia,this.size++),this},r.prototype.delete=function(e){return!(!(e=i(this,e)).ia||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.ia.Ra.next=e.ia.next,e.ia.next.Ra=e.ia.Ra,e.ia.head=null,this.size--,!0)},r.prototype.clear=function(){this.h={},this.g=this.g.Ra=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).ia},r.prototype.get=function(e){return(e=i(this,e).ia)&&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("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.prototype.findIndex",(function(e){return e||function(e,t){return _(this,e,t).ca}})),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!==O(this,e,"includes").indexOf(e,t||0)}})),s("Array.prototype.find",(function(e){return e||function(e,t){return _(this,e,t).v}})),s("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=O(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}})),s("Array.prototype.keys",(function(e){return e||function(){return U(this,(function(e){return e}))}}));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)j(i,r)&&(e[r]=i[r])}return e};s("Object.assign",(function(e){return e||B})),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.values",(function(e){return e||function(){return U(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 U(this,(function(e,t){return[e,t]}))}})),s("String.prototype.repeat",(function(e){return e||function(e){var t=O(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)j(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)j(e,t)&&n.push([t,e[t]]);return n}}));var F=this||self;function V(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(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function H(e){return e.h/(1-Math.pow(e.g,e.i))}function q(){this.h=new K(2),this.j=new K(5),this.g=0,this.i=128e3,this.l=16e3}function G(){}function z(){}function X(){}function W(e){var t=L.apply(1,arguments);$.has(e)||($.add(e),X.apply(G,c(t)))}function Y(){}K.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)},q.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)},q.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)}},q.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(H(this.h),H(this.j))};var $=new Set;if(e.console&&e.console.log.bind){var J={},Q=(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);X=Q[2],z=Q[1]}function Z(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function ee(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function te(e,t,n){if(n||(n=Z),e.length!=t.length)return!1;t=t.slice();for(var i={},r=(e=l(e)).next();!r.done;i={Yc:i.Yc},r=e.next()){if(i.Yc=r.value,-1==(r=t.findIndex(function(e){return function(t){return n(e.Yc,t)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function ne(e,t,n){if(n||(n=Z),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 ie(e,t,n){this.startTime=e,this.direction=ce,this.endTime=t,this.payload=n,this.region=new we,this.position=null,this.positionAlign=ae,this.size=0,this.textAlign=oe,this.writingMode=de,this.lineInterpretation=fe,this.line=null,this.lineHeight="",this.lineAlign=he,this.displayAlign=ue,this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=ve,this.fontStyle=ye,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 re(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(!ne(e.nestedCues,t.nestedCues,re))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(!ne(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}ie.prototype.clone=function(){var e,t=new ie(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},V("shaka.text.Cue",ie);var ae="auto";ie.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ae};var oe="center",se={LEFT:"left",RIGHT:"right",CENTER:oe,START:"start",END:"end"};ie.textAlign=se;var ue="after",le={BEFORE:"before",CENTER:"center",AFTER:ue};ie.displayAlign=le;var ce="ltr";ie.direction={HORIZONTAL_LEFT_TO_RIGHT:ce,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var de="horizontal-tb";ie.writingMode={HORIZONTAL_TOP_TO_BOTTOM:de,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var fe=0;ie.lineInterpretation={LINE_NUMBER:fe,PERCENTAGE:1};var he="start",pe={CENTER:"center",START:he,END:"end"};ie.lineAlign=pe;var ge={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ie.defaultTextColor=ge;var me={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ie.defaultTextBackgroundColor=me;var ve=400;ie.fontWeight={NORMAL:ve,BOLD:700};var ye="normal",be={NORMAL:ye,ITALIC:"italic",OBLIQUE:"oblique"};function we(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Te,this.scroll=xe}ie.fontStyle=be,ie.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},V("shaka.text.CueRegion",we);var Te=1;we.units={PX:0,PERCENTAGE:Te,LINES:2};var xe="";function Se(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next())n.push(t(r.value));return n}we.scrollMode={NONE:xe,UP:"up"};var Ae=function e(t){var n;return N(e,(function(e){return 1==e.g&&(n=0),3!=e.g?n<t?w(e,n,3):e.A(0):(n++,e.A(2))}))},Ee=function e(t){var n,i,r,a,o,s;return N(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.A(0):w(e,{ca:n,If:i,item:r,next:void 0},0):(s=o.value,0<=n?w(e,{ca:n,item:r,If:i,next:s},5):e.A(5)):(n++,i=r,r=s,o=a.next(),e.A(2))}))};function ke(){}function Ie(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(Me(e)==Me(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;for(var n=Re(e),i=Re(t),r=l(Ae(e.byteLength)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function Me(e){return e instanceof ArrayBuffer?e:e.buffer}function Ce(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function Re(e,t,n){return Ne(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function De(e,t,n){return Ne(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function Ne(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(Me(e),t,Math.min(t+Math.max(n,0),r)-t)}function Pe(e,t){this.g=e,this.h=t}function Le(e,t){var n=new Pe(4,0),i=Oe,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function je(e,t,n,i){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function _e(e,t,n,i){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(""))}V("shaka.util.BufferUtils",ke),ke.toDataView=De,ke.toUint8=Re,ke.toArrayBuffer=Ce,ke.equal=Ie,Pe.prototype.toString=function(){return"v"+this.g+"."+this.h};var Oe=null;function Ue(e,t){return e.concat(t)}function Be(){}function Fe(e){return null!=e}function Ve(e){var t=Object.create(e.prototype||Object.prototype);try{var n=e.call(t);n||(Le("Factories requiring new","Factories should be plain functions"),n=t)}catch(t){Le("Factories requiring new","Factories should be plain functions"),n=new e}return n}function Ke(){}V("shaka.dependencies",Ke),Ke.has=function(e){return qe.has(e)},Ke.add=function(e,t){if(!He[e])throw Error(e+" is not supported");qe.set(e,(function(){return t}))};var He={muxjs:"muxjs"};Ke.Allowed=He;var qe=new Map([["muxjs",function(){return e.muxjs}]]);function Ge(e,t,n){var i=L.apply(3,arguments);
2this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}Ge.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},V("shaka.util.Error",Ge),Ge.Severity={RECOVERABLE:1,CRITICAL:2},Ge.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Ge.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_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,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};var ze=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function Xe(e){var t;e instanceof Xe?(We(this,e.Fa),this.pb=e.pb,this.Ha=e.Ha,Ye(this,e.Kb),this.va=e.va,$e(this,e.g.clone()),this.eb=e.eb):e&&(t=String(e).match(ze))?(We(this,t[1]||"",!0),this.pb=Je(t[2]||""),this.Ha=Je(t[3]||"",!0),Ye(this,t[4]),this.va=Je(t[5]||"",!0),$e(this,t[6]||"",!0),this.eb=Je(t[7]||"")):this.g=new at(null)}function We(e,t,n){e.Fa=n?Je(t,!0):t,e.Fa&&(e.Fa=e.Fa.replace(/:$/,""))}function Ye(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Kb=t}else e.Kb=null}function $e(e,t,n){t instanceof at?e.g=t:(n||(t=Qe(t,it)),e.g=new at(t))}function Je(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Qe(e,t,n){return null!=e?(e=encodeURI(e).replace(t,Ze),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Ze(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(i=Xe.prototype).Fa="",i.pb="",i.Ha="",i.Kb=null,i.va="",i.eb="",i.toString=function(){var e=[],t=this.Fa;if(t&&e.push(Qe(t,et,!0),":"),t=this.Ha){e.push("//");var n=this.pb;n&&e.push(Qe(n,et,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Kb)&&e.push(":",String(t))}return(t=this.va)&&(this.Ha&&"/"!=t.charAt(0)&&e.push("/"),e.push(Qe(t,"/"==t.charAt(0)?nt:tt,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.eb)&&e.push("#",Qe(t,rt)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Fa&&(t=new Xe);var n=!!e.Fa;n?We(t,e.Fa):n=!!e.pb,n?t.pb=e.pb:n=!!e.Ha,n?t.Ha=e.Ha:n=null!=e.Kb;var i=e.va;if(n)Ye(t,e.Kb);else if(n=!!e.va){if("/"!=i.charAt(0))if(this.Ha&&!this.va)i="/"+i;else{var r=t.va.lastIndexOf("/");-1!=r&&(i=t.va.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.va=i:n=""!==e.g.toString(),n?$e(t,e.g.clone()):n=!!e.eb,n&&(t.eb=e.eb),t},i.clone=function(){return new Xe(this)};var et=/[#\/\?@]/g,tt=/[#\?:]/g,nt=/[#\?]/g,it=/[#\?@]/g,rt=/#/g;function at(e){this.g=e||null}function ot(e){if(!e.na&&(e.na={},e.Bc=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 st(e,t){if(0==t.length)return e;var n=t.map((function(e){return new Xe(e)}));return e.map((function(e){return new Xe(e)})).map((function(e){return n.map((function(t){return e.resolve(t)}))}
2)).reduce(Ue,[]).map((function(e){return e.toString()}))}function ut(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function lt(e,t){if(1==t.length)return t[0];var n=ct(e,t);if(null!=n)return n;throw new Ge(2,4,4025,t)}function ct(e,t){for(var n=l(ht[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==dt?"":null}(i=at.prototype).na=null,i.Bc=null,i.add=function(e,t){ot(this),this.g=null;var n=this.na.hasOwnProperty(e)&&this.na[e];return n||(this.na[e]=n=[]),n.push(t),this.Bc++,this},i.set=function(e,t){return ot(this),this.g=null,this.na.hasOwnProperty(e)?this.na[e]=[t]:this.add(e,t),this},i.toString=function(){if(this.g)return this.g;if(!this.na)return"";var e,t=[];for(e in this.na)for(var n=encodeURIComponent(e),i=this.na[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 at;if(e.g=this.g,this.na){var t,n={};for(t in this.na)n[t]=this.na[t].concat();e.na=n,e.Bc=this.Bc}return e};var dt="text",ft={Na:"video",bb:"audio",Y:dt,Tb:"image",fg:"application"},ht={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function pt(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function gt(e){this.h=e,this.g=void 0}function mt(){}function vt(e){return e?(239==(e=Re(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),(e=(new TextDecoder).decode(e)).includes("�")&&z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e):""}function yt(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new Ge(2,2,2004);var i=Math.floor(e.byteLength/2);n=new Uint16Array(i),e=De(e);for(var r=(i=l(Ae(i))).next();!r.done;r=i.next())n[r=r.value]=e.getUint16(2*r,t);return xt.value()(n)}function bt(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=Re(e);if(239==n[0]&&187==n[1]&&191==n[2])return vt(n);if(254==n[0]&&255==n[1])return yt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return yt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return yt(e,!1);if(0==n[1]&&0==n[3])return yt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return vt(e);throw new Ge(2,2,2003)}function wt(e){return Ce((new TextEncoder).encode(e))}function Tt(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=l(Ee(e)),a=r.next();!a.done;a=r.next())a=a.value,i.setUint16(2*a.ca,a.item.charCodeAt(0),t);return n}pt.prototype.resolve=function(){},pt.prototype.reject=function(){},gt.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},V("shaka.util.StringUtils",mt),mt.resetFromCharCode=function(){xt.g=void 0},mt.toUTF16=Tt,mt.toUTF8=wt,mt.fromBytesAutoDetect=bt,mt.fromUTF16=yt,mt.fromUTF8=vt;var xt=new gt((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={Va:65536};0<t.Va;(t={Va:t.Va}).Va/=2)if(e(t.Va))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Va)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Va));return n}}(t);return null}));function St(){}function At(e){return e=Re(e),e=xt.value()(e),btoa(e)}function Et(e,t){t=null==t||t;var n=At(e).replace(/\+/g,"-").replace(/\//g,"_");return t?n:n.replace(/[=]*$/,"")}function kt(t){var n=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));t=new Uint8Array(n.length);for(var i=(n=l(Ee(n))).next();!i.done;i=n.next())t[(i=i.value).ca]=i.item.charCodeAt(0);return t}function It(t){for(var n=t.length/2,i=new Uint8Array(n),r=(n=l(Ae(n))).next();!r.done;r=n.next())i[r=r.value]=e.parseInt(t.substr(2*r,2),16);return i}function Mt(e){var t=Re(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 Ct(){for(var e=L.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(Re(i),n),n+=i.byteLength;return t}function Rt(){var e=this;this.o=qe.get("muxjs")(),this.g=new this.o.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(Ct(t.initSegment,t.data))})),this.g.on("done",(function(){var t={data:Ct.apply(St,c(e.m)),captions:e.j,metadata:e.i};e.h.resolve(t),e.l=!1}))}function Dt(e,t){if(!qe.get("muxjs")()||!Nt(e))return!1;
2if(t)return MediaSource.isTypeSupported(Pt(t,e));var n=Pt("audio",e),i=Pt("video",e);return MediaSource.isTypeSupported(n)||MediaSource.isTypeSupported(i)}function Nt(e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]}function Pt(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 Lt(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function jt(e,t,n){return e=Lt(e,t),qe.get("muxjs")()&&Nt(e)?Pt(n,e):e}function _t(e){var t=(e=e.split("."))[0];return e.pop(),t}function Ot(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function Ut(e){this.j=null,this.i=e,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.s="",this.o=new Map}function Bt(e){return!(!Ht[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function Ft(e,t,n){if(e.s=t,t=e.o.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 Vt(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=l(t.nestedCues)).next();!i.done;i=t.next())Vt(e,i.value,n)}function Kt(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,[]),Vt(e,u,r),u.startTime>=e.l&&u.startTime<e.m&&(o.get(s).get(a).push(u),s==e.s&&e.i.append([u]))}for(a=(r=l(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.o.has(a)||e.o.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.o.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))}V("shaka.util.Uint8ArrayUtils",St),St.concat=Ct,St.toHex=Mt,St.fromHex=It,St.fromBase64=kt,St.toBase64=Et,St.toStandardBase64=At,St.equal=function(e,t){return Le("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead."),Ie(e,t)},Rt.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"),Ut.prototype.destroy=function(){return this.i=this.j=null,this.o.clear(),Promise.resolve()},Ut.prototype.remove=function(e,t){var n=this;return P((function(i){if(1==i.g)return w(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)}))},V("shaka.text.TextEngine",Ut),Ut.prototype.destroy=Ut.prototype.destroy,Ut.findParser=function(e){return Ht[e]},Ut.unregisterParser=function(e){delete Ht[e]},Ut.registerParser=function(e,t){Ht[e]=t};var Ht={};function qt(){}function Gt(e,t){return e=Wt(e),t=Wt(t),e.split("-")[0]==t.split("-")[0]}function zt(e,t){e=Wt(e),t=Wt(t);var n=e.split("-"),i=t.split("-");return n[0]==i[0]&&1==n.length&&2==i.length}function Xt(e,t){e=Wt(e),t=Wt(t);var n=e.split("-"),i=t.split("-");return 2==n.length&&2==i.length&&n[0]==i[0]}function Wt(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Zt.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Yt(e,t){return e=Wt(e),(t=Wt(t))==e?4:zt(t,e)?3:Xt(t,e)?2:zt(e,t)?1:0}function $t(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),Zt.get(e)||e}function Jt(e){return e.language?Wt(e.language):e.audio&&e.audio.language?Wt(e.audio.language):e.video&&e.video.language?Wt(e.video.language):"und"}function Qt(e,t){for(var n=Wt(e),i=new Set,r=l(t),a=r.next();!a.done;a=r.next())i.add(Wt(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(zt(a=a.value,n))return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(Xt(a=a.value,n))return a;for(a=(i=l(i)).next();!a.done;a=i.next())if(zt(n,a=a.value))return a;return null}V("shaka.util.LanguageUtils",qt),qt.findClosestLocale=Qt,qt.getLocaleForVariant=Jt,qt.getLocaleForText=function(e){return Wt(e.language||"und")},qt.getBase=$t,qt.relatedness=Yt,qt.areSiblings=function(e,t){var n=$t(e),i=$t(t);return e!=n&&t!=i&&n==i},qt.normalize=Wt,qt.isSiblingOf=Xt,qt.isParentOf=zt,qt.areLanguageCompatible=Gt,qt.areLocaleCompatible=function(e,t){return(e=Wt(e))==(t=Wt(t))};var Zt=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 en(){this.g={}}function tn(e,t){for(var n in e.g)t(n,e.g[n])}function nn(e){this.h=e,this.g=null}function rn(e){this.h=e,this.g=null}function an(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function on(e){return""!=dn().canPlayType(e)}function sn(){return cn("Tizen")}function un(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sn()}function ln(){if(!un())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function cn(e){return(navigator.userAgent||"").includes(e)}function dn(){return hn||(fn||(fn=new rn((function(){hn=null}))),(hn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(hn=document.createElement("video")),fn.R(1),hn)}(i=en.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)},nn.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},nn.prototype.stop=function(){this.g&&(this.g(),this.g=null)},rn.prototype.Nb=function(){return this.stop(),this.h(),this},rn.prototype.R=function(e){var t=this;return this.stop(),this.g=new nn((function(){t.h()})).R(e),this},rn.prototype.Ca=function(e){var t=this;return this.stop(),this.g=new nn((function(){t.g.R(e),t.h()})).R(e),this},rn.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},V("shaka.util.Timer",rn),rn.prototype.stop=rn.prototype.stop,rn.prototype.tickEvery=rn.prototype.Ca,rn.prototype.tickAfter=rn.prototype.R,rn.prototype.tickNow=rn.prototype.Nb;var fn=null,hn=null;function pn(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={jd:i.jd},r=t.next())if(i.jd=r.value,r=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.jd)}}(i)),r.length){e=r;break}for(i={},n=l(n),t=n.next();!t.done;i={Vc:i.Vc},t=n.next())if(i.Vc=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Vc)}}(i)),t.length){e=t;break}return e}(a,t,n)),t=function(e){for(var t=new en,n=(e=l(e)).next();!n.done;n=e.next()){var i=mn(n=n.value);t.push(i,n)}return t}(a=Ln(a,i)),t=function(e){var t=0,n=new Map,i=e.size();return tn(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 en);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)==Fn||i==Vn){if(1==(e=gn(e,i)).size())return e.keys()[0]}else if(i==Kn)break;return function(e){var t="",n=1/0;return tn(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 mn(e)==o}))}function gn(e,t){var n=0,i=new en;return tn(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 mn(e){var t="";e.video&&(t=_t(e.video.codecs));var n="";return e.audio&&(n=_t(e.audio.codecs)),t+"-"+n}function vn(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 yn(e,t){return P((function(n){return 1==n.g?w(n,bn(t,0<t.offlineSessionIds.length),2):(An(e,t),function(e){e.textStreams=e.textStreams.filter((function(e){return Bt(Lt(e.mimeType,e.codecs))}))}(t),w(n,function(e){var t,n,i,r,a,o,s;return P((function(u){switch(u.g){case 1:t=[],n=l(e.imageStreams),i=n.next();case 2:if(i.done){u.A(4);break}if(r=i.value,a=r.mimeType,Hn.has(a)){u.A(5);break}if(!(o=qn.get(a))){Hn.set(a,!1),u.A(5);break}return w(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,Hn.set(a,s);case 5:Hn.get(a)&&t.push(r),i=n.next(),u.A(2);break;case 4:e.imageStreams=t,T(u)}}))}(t),0))}))}function bn(e,t){return P((function(n){if(1==n.g)return w(n,wn(e.variants,t,!1),2);e.variants=e.variants.filter((function(e){var t=e.video;if(t){var n=Sn(t.codecs);if(t.codecs.includes(",")){var i=t.codecs.split(",");if(n=lt("video",i),i=lt("audio",i),i=jt(t.mimeType,i,"audio"),!MediaSource.isTypeSupported(i))return!1}if(n=jt(t.mimeType,n,"video"),!MediaSource.isTypeSupported(n))return!1}return!((n=e.audio)&&(i=xn(n.codecs),n=jt(n.mimeType,i,"audio"),!MediaSource.isTypeSupported(n)))&&(cn("Xbox One")&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&t.codecs.includes("avc1.")?(On(e),!1):((t=e.decodingInfos.some((function(e){return e.supported})))||On(e),t))})),T(n)}))}function wn(e,t,n){var i,r,a,o,s,u,c,d,f,h;return P((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 P((function(r){return 1==r.g?(x(r,2),w(r,i.decodingInfo(t),4)):2!=r.g?(n=r.h,e.decodingInfos.push(n),A(r,0)):(E(r),JSON.stringify(t),void T(r))}))},o=l(e),s=o.next();!s.done;s=o.next())for(u=s.value,c=Tn(u,t,n),d=l(c),f=d.next();!f.done;f=d.next())h=f.value,r.push(a(u,h));return w(p,Promise.all(r),0)}))}function Tn(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=Sn(a=lt("video",o)),o=lt("audio",o),o=jt(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=Sn(a),a=jt(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=xn(i.codecs),a=jt(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 f=a.get(d);for(d={keySystem:d,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(f=l(f)).next();!s.done;s=f.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,p=l(s.initData),g=p.next();!g.done;g=p.next())h.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 xn(e){return sn()&&"ac-3"==e.toLowerCase()?"ec-3":e}function Sn(e){return"vp9"==e?"vp09.00.10.08":e}function An(e,t){t.variants=t.variants.filter((function(t){var n=t.audio;return t=t.video,!(n&&e&&e.audio&&!En(n,e.audio)||t&&e&&e.video&&!En(t,e.video))}))}function En(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function kn(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 f=l(t.roles),h=f.next();!h.done;h=f.next())d.add(h.value);if(n)for(h=(f=l(n.roles)).next();!h.done;h=f.next())d.add(h.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 In(e){return{id:e.id,active:!1,type:dt,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 Mn(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 Cn(e){return e.__shaka_id||(e.__shaka_id=Bn++),e.__shaka_id}function Rn(e){var t=Nn(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 Dn(e){var t=Nn(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 Nn(e){return{id:Cn(e),active:!1,type:"",bandwidth:0,language:Wt(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 Pn(e){return e.allowedByApplication&&e.allowedByKeySystem}function Ln(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 jn(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=Qt(Wt(t),e.map((function(e){return e.language})));s&&(r=e.filter((function(e){return Wt(e.language)==s})))}if(r=r.filter((function(e){return e.forced==i})),n){if((e=_n(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(Ue,[]),e.length?_n(r,e[0]):r}function _n(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function On(e){var t=[];return e.audio&&t.push(Un(e.audio)),e.video&&t.push(Un(e.video)),t.join(", ")}function Un(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 Bn=0,Fn="smooth",Vn="powerEfficient",Kn="bandwidth",Hn=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),qn=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Gn(){var e=this;this.l=null,this.j=!1,this.h=new q,navigator.connection&&navigator.connection.addEventListener("change",(function(){if(e.g.useNetworkInformation&&e.j){e.h=new q,e.g&&e.h.configure(e.g.advanced);var t=e.chooseVariant();t&&e.l(t)}})),this.i=[],this.o=1,this.s=!1,this.g=this.m=null}function zn(e){var t=e.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.g.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function Xn(e,t){return e&&(t=t.filter((function(t){return vn(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Wn(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 Yn(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)&&$n(n,i)&&Jn(n.roles,i.roles))}return!n&&(n=e.video&&t.video)&&(n=!($n(n=e.video,i=t.video)&&Jn(n.roles,i.roles))),!n}function $n(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return _t(e)})),i=t.codecs.split(",").map((function(e){return _t(e)}));if(n.length!=i.length)return!1;n.sort(),i.sort();for(var r=l(Ae(n.length)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function Jn(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 Qn(e){this.g=e,this.h=new Zn(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function Zn(e,t,n,i){this.i=e,this.j=t,this.g=n,this.h=void 0===i?"":i}function ei(){this.g=ii,this.h=(new Map).set(ii,2).set(ni,1)}function ti(e,t,n){e.h.set(ii,n).set(ni,t)}(i=Gn.prototype).stop=function(){this.l=null,this.j=!1,this.i=[],this.o=1,this.m=null},i.init=function(e){this.l=e},i.chooseVariant=function(){var e=Xn(this.g.restrictions,this.i),t=this.h.getBandwidthEstimate(zn(this));this.i.length&&!e.length&&(e=[(e=Xn(null,this.i))[0]]);for(var n=e[0]||null,i=0;i<e.length;i++){for(var r=e[i],a=isNaN(this.o)?1:Math.abs(this.o),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.j=!0},i.disable=function(){this.j=!1},i.segmentDownloaded=function(e,t){if(this.h.sample(e,t),null!=this.m&&this.j)e:{if(this.s){if
2(Date.now()-this.m<1e3*this.g.switchInterval)break e}else{var n=this.h;if(!(n.g>=n.i))break e;this.s=!0}n=this.chooseVariant(),this.h.getBandwidthEstimate(zn(this)),n&&this.l(n)}},i.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)},i.setVariants=function(e){this.i=e},i.playbackRateChanged=function(e){this.o=e},i.configure=function(e){this.g=e,this.h&&this.g&&this.h.configure(this.g.advanced)},V("shaka.abr.SimpleAbrManager",Gn),Gn.prototype.configure=Gn.prototype.configure,Gn.prototype.playbackRateChanged=Gn.prototype.playbackRateChanged,Gn.prototype.setVariants=Gn.prototype.setVariants,Gn.prototype.getBandwidthEstimate=Gn.prototype.getBandwidthEstimate,Gn.prototype.segmentDownloaded=Gn.prototype.segmentDownloaded,Gn.prototype.disable=Gn.prototype.disable,Gn.prototype.enable=Gn.prototype.enable,Gn.prototype.chooseVariant=Gn.prototype.chooseVariant,Gn.prototype.init=Gn.prototype.init,Gn.prototype.stop=Gn.prototype.stop,Wn.prototype.add=function(e){return!!Yn(this.h,e)&&(this.g.add(e),!0)},Wn.prototype.values=function(){return this.g.values()},Qn.prototype.create=function(e){var t=this,n=e.filter((function(e){return Yn(t.g,e)}));return n.length?new Wn(n[0],n):this.h.create(e)},Zn.prototype.create=function(e){var t=[];t=function(e,t){var n=Wt(t),i=Qt(n,e.map((function(e){return Jt(e)})));return i?e.filter((function(e){return i==Jt(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=Ln(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 Wn(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Yn(e.h,n)&&e.add(n);return e};var ni=0,ii=1;function ri(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.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function ai(e){var t,n;return P((function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new Ge(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.o),w(i,new Promise((function(e){new rn(e).R(n/1e3)})),2))}e.h*=e.m,T(i)}))}function oi(e,t){this.promise=e,this.i=t,this.g=!1}function si(e){return new oi(Promise.reject(e),(function(){return Promise.resolve()}))}function ui(){var e=Promise.reject(new Ge(2,7,7001));return e.catch((function(){})),new oi(e,(function(){return Promise.resolve()}))}function li(e){return new oi(Promise.resolve(e),(function(){return Promise.resolve()}))}function ci(e){return new oi(e,(function(){return e.catch((function(){}))}))}function di(e){return new oi(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function fi(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 hi(e){var t,n=new fi(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}function pi(){this.ga=new en,this.Cc=this}function gi(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 mi(e){var t,n={};for(t in e)n[t]=e[t];return n}function vi(){this.g=[]}function yi(e,t){e.g.push(t.finally((function(){ee(e.g,t)})))}function bi(e,t,n){pi.call(this),this.i=!1,this.m=new vi,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.o=!1}function wi(e,t,n,i){n=n||ki;var r=Ii[e];(!r||n>=r.priority)&&(Ii[e]={priority:n,Hf:t,Jf:void 0!==i&&i})}
2function Ti(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===n?null:n}}function xi(e,t,n,i,r,a,o){e.o&&(n.uris[r]=n.uris[r].replace("http://","https://"));var s=new Xe(n.uris[r]),u=s.Fa,l=!1;u||(We(s,u=(u=location.protocol).slice(0,-1)),n.uris[r]=s.toString()),u=u.toLowerCase();var c=(u=Ii[u])?u.Hf:null;if(!c)return si(new Ge(2,1,1e3,s));var d,f=u.Jf,h=null,p=null,g=!1,m=!1;return ci(ai(i)).aa((function(){if(e.i)return ui();d=Date.now();var i=c(n.uris[r],n,t,(function(n,i,r){h&&h.stop(),p&&p.R(s/1e3),e.l&&t==Ei&&(e.l(n,i),l=!0,o.g=r)}),(function(i){e.j&&e.j(i,n,t),m=!0}));if(!f)return i;var a=n.retryParameters.connectionTimeout;a&&(h=new rn((function(){g=!0,i.abort()}))).R(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new rn((function(){g=!0,i.abort()}))),i})).aa((function(i){h&&h.stop(),p&&p.stop(),null==i.timeMs&&(i.timeMs=Date.now()-d);var r={response:i,wf:l};return!m&&e.j&&e.j(i.headers,n,t),r}),(function(s){if(h&&h.stop(),p&&p.stop(),e.s){var u=null,l=0;s instanceof Ge&&(u=s,1001==s.code&&(l=s.data[1])),e.s(n,u,l,g)}if(e.i)return ui();if(g&&(s=new Ge(1,1,1003,n.uris[r],t)),s instanceof Ge){if(7001==s.code)throw s;if(1010==s.code)throw a;if(1==s.severity)return u=new fi("retry",u=(new Map).set("error",s)),e.dispatchEvent(u),r=(r+1)%n.uris.length,xi(e,t,n,i,r,s,o)}throw s}))}function Si(){this.g=0}function Ai(e,t,n){oi.call(this,e,t),this.h=n}oi.prototype.abort=function(){return this.g=!0,this.i()},oi.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},oi.prototype.aa=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 pt,o=new Ge(2,7,7001);return this.promise.then(n(!0),n(!1)),new oi(a,(function(){return i()}))},V("shaka.util.AbortableOperation",oi),oi.prototype.chain=oi.prototype.aa,oi.prototype.finally=oi.prototype.finally,oi.all=di,oi.prototype.abort=oi.prototype.abort,oi.notAbortable=ci,oi.completed=li,oi.aborted=ui,oi.failed=si,fi.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},fi.prototype.stopImmediatePropagation=function(){this.g=!0},fi.prototype.stopPropagation=function(){},V("shaka.util.FakeEvent",fi),pi.prototype.addEventListener=function(e,t){this.ga&&this.ga.push(e,t)},pi.prototype.removeEventListener=function(e,t){this.ga&&this.ga.remove(e,t)},pi.prototype.dispatchEvent=function(e){if(!this.ga)return!0;var t=this.ga.get(e.type)||[],n=this.ga.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Cc,e.currentTarget=this.Cc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},pi.prototype.release=function(){this.ga=null},vi.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(bi,pi),(i=bi.prototype).Od=function(e){this.o=e},i.Kf=function(e){this.g.add(e)},i.ag=function(e){this.g.delete(e)},i.Oe=function(){this.g.clear()},i.Lf=function(e){this.h.add(e)},i.bg=function(e){this.h.delete(e)},i.Pe=function(){this.h.clear()},i.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),pi.prototype.release.call(this),this.m.destroy()},i.request=function(e,t){var n=this,i=new Si;if(this.i){var r=Promise.reject(new Ge(2,7,7001));return r.catch((function(){})),new Ai(r,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?gi(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=gi(t.uris),r=function(e,t,n){for(var i=li(void 0),r={},a=(e=l(e.g)).next();!a.done;r={dd:r.dd},a=e.next())r.dd=a.value,i=i.aa(function(e){return function(){return n.body&&(n.body=Ce(n.body)),e.dd(t,n)}}(r));return i.aa(void 0,(function(e){if(e instanceof Ge&&7001==e.code)throw e;throw new Ge(2,1,1006,e)}))}(this,e,t);var a=r.aa((function(){return xi(n,e,t,new ri(t.retryParameters,!1),0,null,i)})),o=a.aa((function(t){return function(e,t,n){for(var i=li(void 0),r={},a=(e=l(e.h)).next();!a.done;r={ed:r.ed},a=e.next())r.ed=a.value,i=i.aa(function(e){return function(){var i=n.response;return i.data&&(i.data=Ce(i.data)),e.ed(t,i)}}(r));return i.aa((function(){return n}),(function(e){var t=2;if(e instanceof Ge){if(7001==e.code)throw e;t=e.severity}throw new Ge(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.aa((function(t){var i=Date.now()-c,r=t.response;return r.timeMs+=u,r.timeMs+=i,t.wf||!n.l||r.fromCache||e!=Ei||n.l(r.timeMs,r.data.byteLength),r}),(function(e){throw e&&(e.severity=2),e}));return r=new Ai(d.promise,(function(){return d.abort()}),i),yi(this.m,r),r},V("shaka.net.NetworkingEngine",bi),bi.prototype.request=bi.prototype.request,bi.prototype.destroy=bi.prototype.destroy,bi.makeRequest=Ti,bi.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},bi.prototype.clearAllResponseFilters=bi.prototype.Pe,bi.prototype.unregisterResponseFilter=bi.prototype.bg,bi.prototype.registerResponseFilter=bi.prototype.Lf,bi.prototype.clearAllRequestFilters=bi.prototype.Oe,bi.prototype.unregisterRequestFilter=bi.prototype.ag,bi.prototype.registerRequestFilter=bi.prototype.Kf,bi.unregisterScheme=function(e){delete Ii[e]},bi.registerScheme=wi,bi.prototype.setForceHTTPS=bi.prototype.Od,bi.NumBytesRemainingClass=Si,m(Ai,oi),bi.PendingRequest=Ai;var Ei=1;bi.RequestType={MANIFEST:0,SEGMENT:Ei,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var ki=3;bi.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ki};var Ii={};function Mi(e){this.g=!1,this.h=new pt,this.i=e}function Ci(e,t){if(e.g){if(t instanceof Ge&&7003==t.code)throw t;throw new Ge(2,7,7003,t)}}function Ri(){this.g=new en}function Di(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=Ni;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}Ni=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}Mi.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=Ri.prototype).release=function(){this.nb(),this.g=null},i.B=function(e,t,n,i){this.g&&(e=new Di(e,t,n,i),this.g.push(t,e))},i.ta=function(e,t,n,i){var r=this;this.B(e,t,(function i(a){r.Da(e,t,i),n(a)}),i)},i.Da=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.Da(),this.g.remove(t,r))},i.nb=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.Da();this.g.g={}}},V("shaka.util.EventManager",Ri),Ri.prototype.removeAll=Ri.prototype.nb,Ri.prototype.unlisten=Ri.prototype.Da,Ri.prototype.listenOnce=Ri.prototype.ta,Ri.prototype.listen=Ri.prototype.B,Ri.prototype.release=Ri.prototype.release,Di.prototype.Da=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Ni=void 0;function Pi(){}function Li(e){return new Xe(e=bt(e)).Ha}function ji(e,t,n){function i(e){De(a).setUint32(o,e.byteLength,!0),o+=4,a.set(Re(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new Ge(2,6,6015);var r;r="string"==typeof t?Tt(t,!0):t,e=Tt(e=bt(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function _i(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 Oi(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Ui(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 Bi(e,t){var n=this;t=void 0===t?1:t,this.D=e,this.H=new Set,this.j=this.s=null,this.pa=this.fa=!1,this.J=0,this.g=null,this.o=new Ri,this.i=new Map,this.C=[],this.u=new pt,this.h=null,this.m=function(t){n.u.reject(t),e.onError(t)},this.qa=new Map,this.ga=new Map,this.X=new rn((function(){return function(e){var t=e.qa,n=e.ga;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 Ge(2,6,6014)),e.D.Nc(Oi(n))}(n)})),this.N=!1,this.L=[],this.V=!1,this.ha=new rn((function(){!function(e){e.i.forEach((function(t,n){var i=t.Ed,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.Ed=r)}))}(n)})).Ca(t),this.u.catch((function(){})),this.l=new Mi((function(){return function(e){return P((function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.u.reject(),e.ha.stop(),e.ha=null,e.X.stop(),e.X=null,w(t,Zi(e),2);case 2:if(!e.j){t.A(3);break}return x(t,4),w(t,e.j.setMediaKeys(null),6);case 6:A(t,5);break;case 4:E(t);case 5:e.j=null;case 3:e.g=null,e.H.clear(),e.s=null,e.C=[],e.h=null,e.m=function(){},e.D=null,e.$=!1,e.G=null,T(t)}}))}(n)})),this.$=!1,this.G=null}function Fi(e,t,n){return e.C=n,e.N=0<n.length,Vi(e,t)}function Vi(t,n){var i,r,a,o,s,u,c,d,f,h,p,g;return P((function(m){if(1==m.g){if(i=function(t){if(t=_i(t.h.clearKeys),0==t.size)return null;var n=[],i=[];t.forEach((function(e,t){var r=It(t),a=It(e);r={kty:"oct",kid:Et(r,!1),k:Et(a,!1)},n.push(r),i.push(r.kid)})),t=JSON.stringify({keys:n});var r=JSON.stringify({kids:i});return r=[{initData:Re(wt(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=_i(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,f=tr(d),h=l(f),p=h.next();!p.done;p=h.next())rr(p.value,_i(t.h.servers),_i(t.h.advanced||{}));return w(m,wn(n,t.N,t.$),2)}return s||Object.keys(t.h.servers).length?(g=Wi(t,void 0,n),m.return(s?g:g.catch((function(){})))):(t.fa=!0,m.return(Promise.resolve()))}))}function Ki(e){var t;return P((function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.A(2);break}return w(n,e.G,3);case 3:return n.return();case 2:return x(n,4),e.G=e.j.setMediaKeys(e.s),w(n,e.G,6);case 6:A(n,5);break;case 4:t=E(n),e.m(new Ge(2,6,6003,t.message));case 5:Ci(e.l),T(n)}}))}function Hi(e){var t,n;return P((function(i){switch(i.g){case 1:if(!e.s||!e.g)return i.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){i.A(2);break}return t=Ti([e.g.serverCertificateUri],e.h.retryParameters),x(i,3),w(i,e.D.lb.request(5,t).promise,5);case 5:n=i.h,e.g.serverCertificate=Re(n.data),A(i,4);break;case 3:throw new Ge(2,6,6017,E(i));case 4:if(e.l.g)return i.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(x(i,6),w(i,e.s.setServerCertificate(e.g.serverCertificate),8)):i.return();case 8:A(i,0);break;case 6:throw new Ge(2,6,6004,E(i).message)}}))}function qi(e){for(var t=(e.g?e.g.initData:[])||[],n=l(t),i=n.next();!i.done;i=n.next())Gi(e,(i=i.value).initDataType,i.initData);for(i=(n=l(e.C)).next();!i.done;i=n.next())Yi(e,i.value);return t.length||e.C.length||e.u.resolve(),e.u}function Gi(t,n,i){if(i.length){for(var r=t.i.values(),a=(r=l(r)).next();!a.done;a=r.next())if(Ie(i,a.value.initData)&&!cn("Tizen 2"))return;!function(t,n,i,r){try{var a=t.s.createSession(r)}catch(e){return void t.m(new Ge(2,6,6005,e.message))}if(t.o.B(a,"message",(function(e){t.j&&t.h.delayLicenseRequestUntilPlayed&&t.j.paused&&!t.V?t.L.push(e):Ji(t,e)})),t.o.B(a,"keystatuseschange",(function(e){return Qi(t,e)})),t.i.set(a,{initData:i,loaded:!1,Ed:1/0,La:null,type:r}),e.shakaMediaKeysPolyfill)try{i=t.h.initDataTransform(i,n,t.g)}catch(e){return n=e,e instanceof Ge||(n=new Ge(2,6,6016,e)),void t.m(n)}t.h.logLicenseExchange&&Et(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 Ge(2,6,6006,e.message,e,i))}}))}(t,n,i,t.g.sessionType)}}function zi(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Xi(e){return e=Se(e=e.i.keys(),(function(e){return e.sessionId})),Array.from(e)}function Wi(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m;return P((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(tr(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 Ge(2,6,6e3);for(i={},e=l(e.h.preferredKeySystems),r=e.next();!r.done;i={bd:i.bd},r=e.next())for(i.bd=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.bd}}(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.A(2);break}return w(v,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v;return P((function(y){switch(y.g){case 1:if(1==t.size&&t.has(""))throw new Ge(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.A(4);break}if(u=s.value,!t.has(u)){y.A(3);break}
2return c=t.get(u),x(y,6),w(y,navigator.requestMediaKeySystemAccess(u,[c]),8);case 8:return n=y.h,y.return(n);case 6:E(y);case 7:Ci(e.l);case 3:s=o.next(),y.A(2);break;case 4:d=l([!0,!1]),f=d.next();case 9:if(f.done){y.A(11);break}h=f.value,p=l(t.keys()),s=p.next();case 12:if(s.done){f=d.next(),y.A(9);break}if(g=s.value,m=t.get(g),v=m.drmInfos.some((function(e){return!!e.licenseServerUri})),v!=h){y.A(13);break}return x(y,15),w(y,navigator.requestMediaKeySystemAccess(g,[m]),17);case 17:return n=y.h,y.return(n);case 15:E(y);case 16:Ci(e.l);case 13:s=p.next(),y.A(12);break;case 11:return y.return(n)}}))}(e,t),3);case 3:r=v.h;case 2:if(!(a=r))throw new Ge(2,6,6001);for(Ci(e.l),x(v,4),e.H.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],u=o.videoCapabilities||[],c=l(s),d=c.next();!d.done;d=c.next())f=d.value,e.H.add(f.contentType.toLowerCase());for(h=l(u),d=h.next();!d.done;d=h.next())p=d.value,e.H.add(p.contentType.toLowerCase());if(n.length){var y=a.keySystem,b=i.get(a.keySystem),T=[],S=[],k=[],I=[],M=new Set;ir(b,T,k,S,I,M);var C=e.N?"persistent-license":"temporary";for(y={keySystem:y,licenseServerUri:T[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||C,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:k[0],serverCertificateUri:S[0],initData:I,keyIds:M},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=[],S=[],k=[],I=[],M=new Set,ir(y.drmInfos,T,k,S,I,M),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:k[0],serverCertificateUri:S[0],initData:I,keyIds:M};if(e.g=b,!e.g.licenseServerUri)throw new Ge(2,6,6012,e.g.keySystem);return w(v,a.createMediaKeys(),6);case 6:return g=v.h,Ci(e.l),e.s=g,e.fa=!0,w(v,Hi(e),7);case 7:Ci(e.l),A(v,0);break;case 4:if(m=E(v),Ci(e.l,m),e.g=null,e.H.clear(),m instanceof Ge)throw m;throw new Ge(2,6,6002,m.message)}}))}function Yi(e,t){var n,i,r,a,o;return P((function(s){switch(s.g){case 1:try{n=e.s.createSession("persistent-license")}catch(t){return i=new Ge(2,6,6005,t.message),e.m(i),s.return(Promise.reject(i))}return e.o.B(n,"message",(function(t){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.V?e.L.push(t):Ji(e,t)})),e.o.B(n,"keystatuseschange",(function(t){return Qi(e,t)})),r={initData:null,loaded:!1,Ed:1/0,La:null,type:"persistent-license"},e.i.set(n,r),x(s,2),w(s,n.load(t),4);case 4:return a=s.h,Ci(e.l),a?(r.loaded=!0,nr(e)&&e.u.resolve(),s.return(n)):(e.i.delete(n),e.m(new Ge(2,6,6013)),s.return(Promise.resolve()));case 2:o=E(s),Ci(e.l,o),e.i.delete(n),e.m(new Ge(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function $i(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=ji(e,n=Li(e),t)),e}function Ji(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;P((function(g){switch(g.g){case 1:return n=t.target,e.h.logLicenseExchange&&Et(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=Ti([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=yt(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=kt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),x(g,2),w(g,e.D.lb.request(2,o).promise,4);case 4:u=g.h,A(g,3);break;case 2:return c=E(g),d=new Ge(2,6,6007,c),e.m(d),i&&i.La&&i.La.reject(d),g.return();case 3:return e.l.g?g.return():(e.J+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&Et(u.data),x(g,5),w(g,n.update(u.data),7));case 7:A(g,6);break;case 5:return f=E(g),h=new Ge(2,6,6008,f.message),e.m(h),i&&i.La&&i.La.reject(h),g.return();case 6:p=new fi("drmsessionupdate"),e.D.onEvent(p),i&&(i.La&&i.La.resolve(),new rn((function(){i.loaded=!0,nr(e)&&e.u.resolve()})).R(or)),T(g)}}))}function Qi(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=De(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=Mt(n),e.qa.set(a,t)}));var a=n.expiration-Date.now();(0>a||r&&1e3>a)&&i&&!i.La&&(e.i.delete(n),n.close().catch((function(){}))),nr(e)&&(e.u.resolve(),e.X.R(sr))}function Zi(e){var t;return P((function(n){return t=Array.from(e.i.entries()),e.i.clear(),w(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,i=t.next().value;return P((function(t){return 1==t.g?(x(t,2),e.pa||e.C.includes(n.sessionId)||"persistent-license"!==i.type?w(t,function(e){var t;return P((function(n){return 1==n.g?(t=new Promise((function(e,t){new rn(t).R(ar)})),x(n,2),w(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?A(n,0):(E(n),void T(n))}))}(n),5):w(t,n.remove(),5)):2!=t.g?A(t,0):(E(t),void T(t))}))}))),0)}))}function er(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={Ea:a.Ea},s=o.next())if(s=s.value,r.keySystem==s.keySystem){a.Ea=[],a.Ea=a.Ea.concat(r.initData||[]),a.Ea=a.Ea.concat(s.initData||[]),a.Ea=a.Ea.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Ea.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.Ea,keyIds:o});break}}return n}function tr(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function nr(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 ir(e,t,n,i,r,a){for(var o={},s=(e=l(e)).next();!s.done;o={oa:o.oa},s=e.next()){if(o.oa=s.value,t.includes(o.oa.licenseServerUri)||t.push(o.oa.licenseServerUri),i.includes(o.oa.serverCertificateUri)||i.push(o.oa.serverCertificateUri),o.oa.serverCertificate&&(n.some(function(e){return function(t){return Ie(t,e.oa.serverCertificate)}}(o))||n.push(o.oa.serverCertificate)),o.oa.initData){s={};for(var u=l(o.oa.initData),c=u.next();!c.done;s={sc:s.sc},c=u.next())s.sc=c.value,r.some(function(e){return function(t){var n=e.sc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&Ie(t.initData,n.initData)}}(s))||r.push(s.sc)}if(o.oa.keyIds)for(u=(s=l(o.oa.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}function rr(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"))}V("shaka.util.FairPlayUtils",Pi),Pi.initDataTransform=ji,Pi.defaultGetContentId=Li,(i=Bi.prototype).destroy=function(){return this.l.destroy()},i.configure=function(e){this.h=e},i.Xb=function(t){var n,i=this;return P((function(r){if(1==r.g)return i.s?(i.j=t,i.o.ta(i.j,"play",(function(){for(var e=l(i.L),t=e.next();!t.done;t=e.next())Ji(i,t.value);i.V=!0,i.L=[]})),"webkitCurrentPlaybackTargetIsWireless"in i.j&&i.o.B(i.j,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Zi(i)})),(n=i.g.initData.find((function(e){return 0<e.initData.length})))||e.shakaMediaKeysPolyfill||i.C.length?w(r,Ki(i),2):r.A(2)):(i.o.ta(t,"encrypted",(function(){i.m(new Ge(2,6,6010))})),r.return());qi(i),n||i.C.length||i.o.B(i.j,"encrypted",(function(e){return function(e,t){return P((function(n){if(1==n.g)return w(n,Ki(e),2);Gi(e,t.initDataType,Re(t.initData)),T(n)}))}(i,e)})),T(r)}))},i.ac=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.Gc=function(){return Oi(this.ga)};var ar=1,or=5,sr=.5,ur=new gt((function(){return Ce(new Uint8Array([0]))}));function lr(){}function cr(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g)return i&&(r=hr[i.toLowerCase()])?u.return(r):(a=fr(e))&&(o=pr[a])?u.return(o):i?u.A(2):w(u,dr(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=hr[i]))return u.return(s);throw new Ge(2,4,4e3,e)}))}function dr(e,t,n){var i,r,a;return P((function(o){return 1==o.g?((i=Ti([e],n)).method="HEAD",w(o,t.request(0,i).promise,2)):(r=o.h,a=r.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function fr(e){return 1==(e=new Xe(e).va.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}V("shaka.media.ManifestParser",lr),lr.unregisterParserByMime=function(e){delete hr[e]},lr.registerParserByMime=function(e,t){hr[e]=t},lr.registerParserByExtension=function(e,t){pr[e]=t};var hr={},pr={};function gr(e,t){this.P=De(e),this.h=t==vr,this.g=0}function mr(){return new Ge(2,3,3e3)}(i=gr.prototype).ma=function(){return this.g<this.P.byteLength},i.ba=function(){return this.g},i.af=function(){return this.P.byteLength},i.Sa=function(){try{var e=this.P.getUint8(this.g);return this.g+=1,e}catch(e){throw mr()}},i.Gd=function(){try{var e=this.P.getUint16(this.g,this.h);return this.g+=2,e}catch(e){throw mr()}},i.M=function(){try{var e=this.P.getUint32(this.g,this.h);return this.g+=4,e}catch(e){throw mr()}},i.re=function(){try{var e=this.P.getInt32(this.g,this.h);return this.g+=4,e}catch(e){throw mr()}},i.Lb=function(){try{if(this.h)var e=this.P.getUint32(this.g,!0),t=this.P.getUint32(this.g+4,!0);else t=this.P.getUint32(this.g,!1),e=this.P.getUint32(this.g+4,!1)}catch(e){throw mr()}if(2097151<t)throw new Ge(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},i.$a=function(e){if(this.g+e>this.P.byteLength)throw mr();var t=Re(this.P,this.g,e);return this.g+=e,t},i.skip=function(e){if(this.g+e>this.P.byteLength)throw mr();this.g+=e},i.Rf=function(e){if(this.g<e)throw mr();this.g-=e},i.seek=function(e){if(0>e||e>this.P.byteLength)throw mr();this.g=e},i.jc=function(){for(var e=this.g;this.ma()&&0!=this.P.getUint8(this.g);)this.g+=1;return e=Re(this.P,e,this.g-e),this.g+=1,vt(e)},V("shaka.util.DataViewReader",gr),gr.prototype.readTerminatedString=gr.prototype.jc,gr.prototype.seek=gr.prototype.seek,gr.prototype.rewind=gr.prototype.Rf,gr.prototype.skip=gr.prototype.skip,gr.prototype.readBytes=gr.prototype.$a,gr.prototype.readUint64=gr.prototype.Lb,gr.prototype.readInt32=gr.prototype.re,gr.prototype.readUint32=gr.prototype.M,gr.prototype.readUint16=gr.prototype.Gd,gr.prototype.readUint8=gr.prototype.Sa,gr.prototype.getLength=gr.prototype.af,gr.prototype.getPosition=gr.prototype.ba,gr.prototype.hasMoreData=gr.prototype.ma;var vr=1;function yr(){this.i=[],this.h=[],this.g=!1}function br(e){for(var t=Ar(e);
2e.reader.ma()&&!e.parser.g;)e.parser.Pc(e.start+t,e.reader,e.partialOkay)}function wr(e){for(var t=Ar(e),n=e.reader.M(),i=(n=l(Ae(n))).next();!i.done&&(e.parser.Pc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i=n.next());}function Tr(e){return function(t){e(t.reader.$a(t.reader.P.byteLength-t.reader.ba()))}}function xr(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 Sr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Ar(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}gr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:vr},(i=yr.prototype).box=function(e,t){var n=xr(e);return this.i[n]=Er,this.h[n]=t,this},i.S=function(e,t){var n=xr(e);return this.i[n]=kr,this.h[n]=t,this},i.stop=function(){this.g=!0},i.parse=function(e,t,n){for(e=new gr(e,0),this.g=!1;e.ma()&&!this.g;)this.Pc(0,e,t,n)},i.Pc=function(e,t,n,i){var r=t.ba();if(i&&r+8>t.P.byteLength)this.g=!0;else{var a=t.M(),o=t.M(),s=!1;switch(a){case 0:a=t.P.byteLength-r;break;case 1:if(i&&t.ba()+8>t.P.byteLength)return void(this.g=!0);a=t.Lb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==kr){if(i&&t.ba()+4>t.P.byteLength)return void(this.g=!0);l=(c=t.M())>>>24,c&=16777215}o=r+a,n&&o>t.P.byteLength&&(o=t.P.byteLength),i&&o>t.P.byteLength?this.g=!0:(i=o-t.ba(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new gr(t=0<i?t.$a(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:s}))}else t.skip(Math.min(r+a-t.ba(),t.P.byteLength-t.ba()))}},V("shaka.util.Mp4Parser",yr),yr.headerSize=Ar,yr.typeToString=Sr,yr.allData=Tr,yr.sampleDescription=wr,yr.children=br,yr.prototype.parseNext=yr.prototype.Pc,yr.prototype.parse=yr.prototype.parse,yr.prototype.stop=yr.prototype.stop,yr.prototype.fullBox=yr.prototype.S,yr.prototype.box=yr.prototype.box;var Er=0,kr=1;function Ir(e,t,n,i,r){var a=Cr.value(),o=e.subarray(n.start,n.start+n.size),s=De(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=De(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),Mr(u,0,u.byteLength),r=new
2Uint8Array(e.byteLength+u.byteLength),n=cn("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())Mr(r,(i=i.value).start,i.size+u.byteLength);return u=De(r,t.start),t=Ar(t),e=u.getUint32(t),u.setUint32(t,e+1),r}function Mr(e,t,n){0!=(t=(e=De(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Cr=new gt((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 Rr(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=Dr(i,r,s,u,l,c);a<=o;a++){for(var f=n[a],h=-1,p=-1,g=0;g<f.length;g++)if(null!=f[g]&&""!==f[g].g.trim()){h=g;break}for(g=f.length-1;0<=g;g--)if(null!=f[g]&&""!==f[g].g.trim()){p=g;break}if(-1===h||-1===p)f=Nr(i,r),e.nestedCues.push(f);else{for(;h<=p;h++)if(g=f[h]){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=Dr(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=Nr(i,r),e.nestedCues.push(d)),d=Dr(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Dr(e,t,n,i,r,a){return e=new ie(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function Nr(e,t){var n=new ie(e,t,"");return n.lineBreak=!0,n}function Pr(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function Lr(e,t){this.i=[],this.g=1,this.h=0,this.u=e,this.s=t,this.j=this.m=!1,this.l="white",this.o="black",_r(this)}function jr(e,t,n){return Rr(new ie(t,n,""),"CC"+(e.u<<1|e.s+1),e.i,t,n)}function _r(e){Br(e,0,15),e.g=1}function Or(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case Fr:i=qr.has(n)?qr.get(n):String.fromCharCode(n);break;case Vr:i=Gr.get(n);break;case Kr:e.i[e.g].pop(),i=zr.get(n);break;case Hr:e.i[e.g].pop(),i=Xr.get(n)}i&&e.i[e.g].push(new Pr(i,e.m,e.j,e.o,e.l))}}function Ur(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 Br(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var Fr=0,Vr=1,Kr=2,Hr=3,qr=new Map([[39,"â"],[42,"á"],[92,"é"],[92,"é"],[94,"Ã"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ã"],[126,"ñ"],[127,"â"]]),Gr=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,"»"]]),Xr=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 Wr(e,t){this.h=Qr,this.o=new Lr(e,t),this.i=new Lr(e,t),this.l=new Lr(e,t),this.g=this.i,this.j=0,this.m=null}function Yr(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==ea&&e.h!==ta&&(r=jr(i,e.j,n),(n=e.i).g=0<n.h?n.h:0,Br(n,0,15),(n=e.l).g=0<n.h?n.h:0,Br(n,0,15),i.g=15),e.h=ea,i.h=t,r}function $r(e){e.h=Zr,e.g=e.l,e.g.h=0}function Jr(e){W("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=ta}var Qr=0,Zr=1,ea=3,ta=4,na="black green blue cyan red yellow magenta black".split(" "),ia="white green blue cyan red yellow magenta white_italics".split(" ");function ra(){this.l=!1,this.C=this.G=0,this.D=fa,this.i=[],this.g=this.h=this.j=0,this.u=this.o=!1,this.s="white",this.m="black",aa(this)}function aa(e){e.i=[];for(var t=0;15>t;t++)e.i.push(oa())}function oa(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function sa(e,t){ua(e)&&(e.i[e.h][e.g]=new Pr(t,e.u,e.o,e.m,e.s),e.g++)}function ua(e){var t=e.g<e.C&&0<=e.g;return e.h<e.G&&0<=e.h&&t}function la(e,t,n){var i=new ie(e.j,t,"");return i.textAlign=e.D===ca?"left":e.D===da?"right":oe,(n=Rr(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}ra.prototype.isVisible=function(){return this.l};var ca=0,da=1,fa=2;function ha(){this.i=[],this.h=null,this.g=0}function pa(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 ga(e.h)),e.h=null,e.g=0))}function ga(e){this.g=0,this.h=e}function ma(e){if(!e.ma())throw new Ge(2,2,3e3);return e.h[e.g++]}function va(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function ya(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=ma(t).value,t=null;for(var r=(n=l(ba(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=la(r,i,e.i)),aa(r);return t}
2if(137===n)for(t=ma(t).value,n=(t=l(ba(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=ma(t).value,t=null,r=(n=l(ba(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=la(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=ma(t).value,t=null,r=(n=l(ba(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=la(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return wa(e,t=ma(t).value,i);if(143===n)return i=wa(e,255,i),Ta(e),i;if(144===n)t.skip(1),i=ma(t).value,e.g&&(e.g.o=0<(128&i),e.g.u=0<(64&i));else if(145===n)i=ma(t).value,n=ma(t).value,t.skip(1),e.g&&(t=xa((48&n)>>4,(12&n)>>2,3&n),e.g.s=xa((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=ma(t).value,t=ma(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=ma(t).value,t.skip(1),e.g&&(e.g.D=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new ra;a.j=i,e.h[n]=a}i=ma(t).value,ma(t),ma(t),a=ma(t).value;var o=ma(t).value;t=ma(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.u=!1,t.o=!1,t.s="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.G=1+(15&a),t.C=1+(63&o),e.g=e.h[n]}}}return null}ga.prototype.ma=function(){return this.g<this.h.length},ga.prototype.ba=function(){return this.g},ga.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Ge(2,2,3e3);this.g+=e};var ba=function e(t,n){var i;return N(e,(function(e){return 1==e.g&&(i=0),5!=e.g?8>i?!(1&~n)&&t.h[i]?w(e,i,5):e.A(5):e.A(0):(n>>=1,i++,e.A(2))}))};function wa(e,t,n){for(var i=null,r=(t=l(ba(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=la(a,n,e.i)),e.h[r]=null}return i}function Ta(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function xa(e,t,n){var i={0:0,1:0,2:1,3:1};return Aa[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}var Sa=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,"â"]]),Aa="black blue green cyan red magenta yellow white".split(" ");function Ea(){this.h=[],this.g=[],this.i=new ha,this.l=0,this.s=new Map([["CC1",new Wr(0,0)],["CC2",new Wr(0,1)],["CC3",new Wr(1,0)],["CC4",new Wr(1,1)]]),this.o=this.m=0,this.j=new Map,ka(this)}function ka(e){e.m=0,e.o=0;for(var t=(e=l(e.s.values())).next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,_r(t.i),_r(t.l),_r(t.o)}function Ia(e,t){var n=t.type;if(16==(112&t.xa)){var i=t.xa>>3&1;0===n?e.m=i:e.o=i}if(n=e.s.get("CC"+(n<<1|(n?e.o:e.m)+1)),255===t.xa&&255===t.Oa||!t.xa&&!t.Oa||!Ca(t.xa)||!Ca(t.Oa))return 45<=++e.l&&ka(e),null;if(e.l=0,t.xa&=127,t.Oa&=127,!t.xa&&!t.Oa)return null;if(i=null,16==(112&t.xa))e:{var r=t.xa;if(i=t.Oa,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=ia[a]:7===a&&(s=!0),i=!(1&~i),n.h!==ta){if(a=n.g,n.h===ea&&r!==a.g){var u=1+r-a.h;Ur(a,u,1+a.g-a.h,a.h),Br(a,0,u-1),Br(a,r+1,15-r)}a.g=r,n.g.m=i,n.g.j=s,n.g.l=o,n.g.o="black"}}else if(17==(247&r)&&32==(240&i))n.g.m=!1,n.g.j=!1,n.g.l="white",Or(n.g,Fr,32),o=!1,"white_italics"===(r=ia[(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=na[(14&i)>>1]),n.g.o=o;else if(17==(247&r)&&48==(240&i))Or(n.g,Vr,i);else if(18==(246&r)&&32==(224&i))Or(n.g,1&r?Hr:Kr,i);else if(20==(246&r)&&32==(240&i)){switch(i=t.pts,r=null,t.Oa){case 32:$r(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=Yr(n,2,i);break;case 38:r=Yr(n,3,i);break;case 39:r=Yr(n,4,i);break;case 40:Or(n.g,Fr,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=i;break;case 42:_r(n.o),Jr(n);break;case 43:Jr(n);break;case 44:r=n.i,o=null,n.h!==ta&&(o=jr(r,n.j,i)),Br(r,0,15),r=o;break;case 45:r=n.g,n.h!==ea?r=null:(o=jr(r,n.j,i),Ur(r,(s=r.g-r.h+1)-1,s,r.h),Br(r,0,s-1),Br(r,r.g,15-r.g),n.j=i,r=o);break;case 46:Br(n.l,0,15);break;case 47:r=null,n.h!==ta&&(r=jr(n.i,n.j,i)),o=n.l,n.l=n.i,n.i=o,$r(n),n.j=i}i=r;break e}i=null}else r=t.Oa,Or(n.g,Fr,t.xa),Or(n.g,Fr,r);return i}function Ma(e,t){var n=[];try{for(;t.ma();){var i=ma(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&ma(t).value),0!=r){e.j.has(r)||e.j.set(r,new va(r));for(var o=e.j.get(r),s=t.ba();t.ba()-s<a;){var u=ma(r=t),l=u.value,c=u.pts;if(16===l)l=l<<16|ma(r).value;if(0<=l&&31>=l){var d=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!ua(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.C-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(r=la(f,d,o.i)),f.h+1>=f.G){d=f;for(var h=0,p=1;15>p;p++,h++)d.i[h]=d.i[p];for(p=0;1>p;p++,h++)d.i[h]=oa()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(r=la(f,d,o.i)),f.i[f.h]=oa(),f.g=0;break;case 12:f.isVisible()&&(r=la(f,d,o.i)),aa(f),(d=f).h=0,d.g=0}var g=r}else g=null}else if(128<=l&&159>=l)g=ya(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&&sa(o.g,127===r?"âª":String.fromCharCode(r));else if(160<=l&&255>=l)o.g&&sa(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g)if(Sa.has(r)){var m=Sa.get(r);sa(o.g,m)}else sa(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&sa(o.g,160!=(255&l)?"_":"[CC]");g=null}(r=g)&&n.push(r)}}}}catch(e){if(!(e instanceof Ge&&3e3===e.code))throw e;
2W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Ca(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function Ra(){}var Da=function e(t,n){var i,r,a,o;return N(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.A(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.A(4):w(e,i.subarray(r,r+o),4)}return r+=o,e.A(2)}))};function Na(e,t){var n=null,i=null,r=e.M();return 1&t&&e.skip(8),2&t&&e.skip(4),8&t&&(n=e.M()),16&t&&(i=e.M()),{trackId:r,de:n,Re:i}}function Pa(e,t){return{Yd:1==t?e.Lb():e.M()}}function La(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.M()}}function ja(e,t,n){var i=e.M(),r=[];1&n&&e.skip(4),4&n&&e.skip(4);for(var a=l(Ae(i)),o=a.next();!o.done;o=a.next())o={Kd:null,sampleSize:null,Rc:null},256&n&&(o.Kd=e.M()),512&n&&(o.sampleSize=e.M()),1024&n&&e.skip(4),2048&n&&(o.Rc=0==t?e.M():e.re()),r.push(o);return{Og:i,te:r}}function _a(){this.j=new Ra,this.i=new Map,this.h=this.g=0}function Oa(){this.h=new _a,this.g=new Ea}function Ua(e,t){for(var n=e.h.parse(t),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value,a=Re(r.Gf);if(0<a.length&&(i=e.g,r=r.pts,181===(a=new gr(a,0)).Sa()&&49===a.Gd()&&1195456820===a.M()&&3===a.Sa())){var o=a.Sa();if(64&o){o&=31,a.skip(1);for(var s=0;s<o;s++){var u=a.Sa(),d=(4&u)>>2,f=a.Sa(),h=a.Sa();d&&(0===(u&=3)||1===u?i.h.push({pts:r,type:u,xa:f,Oa:h,order:i.h.length}):(i.g.push({pts:r,type:u,value:f,order:i.g.length}),i.g.push({pts:r,type:2,value:h,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=Ia(e,r.value))&&n.push(r);for(r=(i=l(e.g)).next();!r.done;r=i.next())pa(e.i,r.value);for(r=(i=l(e.i.i)).next();!r.done;r=i.next())r=Ma(e,r.value),n.push.apply(n,c(r));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function Ba(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Fa(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 Va(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(Ka(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 Ka(e){if(!e)return[];for(var t=[],n=l(Ae(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 Ha(e,t,n,i){var r=this;this.j=e,this.l=n,this.h={},this.H={},this.g=null,this.J=i||function(){},this.i={},this.o=new Ri,this.s={},this.u=t,this.D=new pt,this.m=function(e,t){var n=new MediaSource;return e.o.ta(n,"sourceopen",(function(){URL.revokeObjectURL(e.G),t.resolve()})),e.G=io(n),e.j.src=e.G,n}(this,this.D),this.C=new Mi((function(){return function(e){var t,n,i,r,a,o,s;return P((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(Be)),a=l(i.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new Ge(2,7,7003,void 0));
2for(s in e.g&&t.push(e.g.destroy()),e.l&&t.push(e.l.destroy()),e.s)t.push(e.s[s].destroy());return w(u,Promise.all(t),2)}e.o&&(e.o.release(),e.o=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.s={},e.u=null,e.i={},T(u)}))}(r)})),this.G=""}function qa(e,t,n){e.g||(e.g=new Ut(e.l)),e=e.g,"application/cea-608"!=t&&"application/cea-708"!=t&&(e.j=Ve(Ht[t]),e.j.setSequenceMode?e.j.setSequenceMode(n):X('Text parsers should have a "setSequenceMode" method!'))}function Ga(e){return!e.m||"ended"==e.m.readyState}function za(e,t){if(t==dt)var n=e.g.g;else n=!(n=Wa(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 Xa(e,t){return t==dt?e.g.h:Ba(Wa(e,t))}function Wa(e,t){try{return e.h[t].buffered}catch(e){return null}}function Ya(e,t,n,i,r,a,o,s){var u,c,d,f,h,p,g,m,v;return P((function(y){return 1==y.g?(u=ft,null!=i&&s&&t!=u.Y&&o&&(c=i,Qa(e,t,(function(){var n=c;0>n&&(n+=.001),e.h[t].timestampOffset=n,Ja(e,t)}))),t==u.Y?w(y,function(e,t,n,i){var r,a,o;return P((function(s){return 1==s.g?w(s,Promise.resolve(),2):e.j&&e.i?null==n||null==i?(e.j.parseInit(Re(t)),s.return()):(r={periodStart:e.u,segmentStart:n,segmentEnd:i},a=e.j.parseMedia(Re(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.s[t]?w(y,function(e,t){e.l=!0,e.h=new pt,e.m=[],e.j=[],e.i=[];var n=Re(t);return e.g.push(n),e.g.flush(),e.l&&e.h.reject(new Ge(2,3,3018)),e.h}(e.s[t],n),10):a?(e.g||qa(e,"text/vtt",s||!1),null==i&&null==r?e.u.init(n):(d=Ua(e.u,n)).length&&(f=e.h[u.Na].timestampOffset,Kt(e.g,d,i,r,f)),n=no(e,n,i,t),w(y,Qa(e,t,(function(){e.h[t].appendBuffer(n)})),0)):(n=no(e,n,i,t),w(y,Qa(e,t,(function(){e.h[t].appendBuffer(n)})),0))):(h=y.h,e.g||qa(e,"text/vtt",s||!1),h.metadata&&(p=e.h[t].timestampOffset,e.J(h.metadata,p,r)),h.captions&&h.captions.length&&(g=e.h[u.Na].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 ie(n.startTime,n.endTime,n.text)});return t}(h.captions),Kt(e.g,m,i,r,g)),v=h.data,v=no(e,v,i,t),w(y,Qa(e,t,(function(){e.h[t].appendBuffer(v)})),0))}))}function $a(e,t){return P((function(n){return t==ft.Y?e.g?w(n,e.g.remove(0,1/0),0):n.return():w(n,Qa(e,t,(function(){var n=e.m.duration;0>=n?Ja(e,t):e.h[t].remove(0,n)})),0)}))}function Ja(e,t){var n=e.i[t][0];n&&(n.p.resolve(),eo(e,t))}function Qa(e,t,n){return Ci(e.C),n={start:n,p:new pt},e.i[t].push(n),1==e.i[t].length&&to(e,t),n.p}function Za(e,t){var n,i,r,a,o;return P((function(s){switch(s.g){case 1:for(r in Ci(e.C),n=[],i={},e.h)i.Rb=new pt,a={start:function(e){return function(){return e.Rb.resolve()}}(i),p:i.Rb},e.i[r].push(a),n.push(i.Rb),1==e.i[r].length&&a.start(),i={Rb:i.Rb};return x(s,2),w(s,Promise.all(n),4);case 4:A(s,3);break;case 2:throw E(s);case 3:try{t()}catch(e){throw new Ge(2,3,3015,e)}finally{for(o in e.h)eo(e,o)}T(s)}}))}function eo(e,t){e.i[t].shift(),to(e,t)}function to(e,t){var n=e.i[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new Ge(2,3,3017,t)):n.p.reject(new Ge(2,3,3015,i)),eo(e,t)}}function no(e,t,n,i){var r=e.j.mediaKeys;return null==n&&r&&(sn()||cn("Xbox One"))&&"mp4"==e.H[i].split(";")[0].split("/")[1]&&(t=function(e){function t(){r=!0}function n(e){a.push(e),br(e)}e=Re(e);var i,r=!1,a=[],o=[];if((new yr).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).S("stsd",(function(e){i=e,a.push(e),wr(e)})).S("encv",t).S("enca",t).S("avc1",(function(e){o.push({box:e,hc:1701733238})})).S("avc3",(function(e){o.push({box:e,hc:1701733238})})).S("ac-3",(function(e){o.push({box:e,hc:1701733217})})).S("ec-3",(function(e){o.push({box:e,hc:1701733217})})).S("mp4a",(function(e){o.push({box:e,hc:1701733217})})).parse(e),r)return e;if(0==o.length||!i)throw Mt(e),new Ge(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=Ir(e,i,u.box,a,u.hc);return e}(t)),t}_a.prototype.init=function(e){var t=this,n=[],i=[];if((new yr).box("moov",br).box("mvex",br).S("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.M(),n=n.M(),t.g=e,t.h=n})).box("trak",br).S("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.M(),n.push(e)})).box("mdia",br).S("mdhd",(function(e){e=La(e.reader,e.version),i.push(e.timescale)})).parse(e,!0),!n.length||!i.length||n.length!=i.length)throw new Ge(2,2,2010);
2n.forEach((function(e,n){t.i.set(e,i[n])}))},_a.prototype.parse=function(e){var t=this,n=[],i=this.g,r=this.h,a=[],o=null,s=9e4;return(new yr).box("moof",br).box("traf",br).S("trun",(function(e){a=ja(e.reader,e.version,e.flags).te})).S("tfhd",(function(e){e=Na(e.reader,e.flags),i=e.de||t.g,r=e.Re||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).S("tfdt",(function(e){o=Pa(e.reader,e.version).Yd})).box("mdat",(function(e){if(null===o)throw new Ge(2,2,2010);e=e.reader;var u=o,c=s,d=i,f=r,h=a,p=0,g=f;for(h.length&&(g=h[0].sampleSize||f);e.ma();){var m=e.M();if(6==(31&e.Sa())){var v=0;h.length>p&&(v=h[p].Rc||0),v=(u+v)/c;for(var y=l(Da(t.j,e.$a(m-1))),b=y.next();!b.done;b=y.next())n.push({Gf:b.value,pts:v})}else try{e.skip(m-1)}catch(e){break}0==(g-=m+4)&&(u=h.length>p?u+(h[p].Kd||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Oa.prototype.init=function(e){this.h.init(e)},(i=Ha.prototype).destroy=function(){return this.C.destroy()},i.init=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,c,d=this;return P((function(f){if(1==f.g)return i=ft,w(f,d.D,2);for(r={},a=l(e.keys()),o=a.next();!o.done;r={ra:r.ra},o=a.next())r.ra=o.value,s=e.get(r.ra),u=Lt(s.mimeType,s.codecs),r.ra==i.Y?qa(d,u,n):(!t&&MediaSource.isTypeSupported(u)||!Dt(u,r.ra)||(d.s[r.ra]=new Rt,u=Pt(r.ra,u)),c=d.m.addSourceBuffer(u),n&&(c.mode=ro),d.o.B(c,"error",function(e){return function(){d.i[e.ra][0].p.reject(new Ge(2,3,3014,d.j.error?d.j.error.code:0))}}(r)),d.o.B(c,"updateend",function(e){return function(){return Ja(d,e.ra)}}(r)),d.h[r.ra]=c,d.H[r.ra]=u,d.i[r.ra]=[]);T(f)}))},i.Za=function(){var e={total:Ka(this.j.buffered),audio:Ka(Wa(this,"audio")),video:Ka(Wa(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 P((function(r){return e==ft.Y?w(r,i.g.remove(t,n),0):w(r,Qa(i,e,(function(){n<=t?Ja(i,e):i.h[e].remove(t,n)})),0)}))},i.flush=function(e){var t=this;return P((function(n){return e==ft.Y?n.return():w(n,Qa(t,e,(function(){t.j.currentTime-=.001,Ja(t,e)})),0)}))},i.endOfStream=function(e){var t=this;return P((function(n){return w(n,Za(t,(function(){Ga(t)||(e?t.m.endOfStream(e):t.m.endOfStream())})),0)}))},i.Ka=function(e){var t=this;return P((function(n){return w(n,Za(t,(function(){t.m.duration=e})),0)}))},i.getDuration=function(){return this.m.duration};var io=e.URL.createObjectURL,ro="sequence",ao=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function oo(e,t,n,i){this.ya=e,this.Ba=t,this.la=n,this.xd=void 0===i?null:i}function so(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.Ba=i,this.la=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 uo(e,t,n){this.j=e,this.Qc=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.o=0,this.s=!0,this.u=0,this.C=void 0===n||n,this.D=0}function lo(e,t){this.j=e,this.m=fo(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=function(){}}function co(e){this.g=e}function fo(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(Ka(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 ho(e,t,n,i,r){var a=this;this.g=e,this.C=t,this.l=n,this.u=r,this.i=new Ri,this.s=!1,this.D=e.readyState,this.j=!1,this.h=i,this.o=!1,this.i.B(e,"waiting",(function(){return po(a)})),this.m=new rn((function(){po(a)})).Ca(.25)}function po(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.s)return}else e.s=!1;if(!e.g.paused||0==e.g.currentTime&&(e.g.autoplay||0!=e.g.currentTime)){var t;if(e.g.readyState!=e.D&&(e.j=!1,e.D=e.g.readyState),!(t=!e.h)){var n=(t=e.h).j,i=fo(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.o&&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=Ka(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.o||(i=t.start(n),i>=e.C.Pa()))){var s=i-o;r=s<=r,a=!1,.001>s||(r||e.j||(e.j=!0,(o=new fi("largegap",o=(new Map).set("currentTime",o).set("gapSize",s))).c
2ancelable=!0,e.u(o),e.l.jumpLargeGaps&&!o.defaultPrevented&&(a=!0)),!r&&!a)||(0!=n&&t.end(n-1),e.g.currentTime=i)}}}}}function go(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=mo.value().get(t),n.ta(e,t,i))}oo.prototype.dc=function(){return this.Ba},oo.prototype.$b=function(){return this.la},V("shaka.media.InitSegmentReference",oo),oo.prototype.getEndByte=oo.prototype.$b,oo.prototype.getStartByte=oo.prototype.dc,(i=so.prototype).ya=function(){return this.j()},i.lf=function(){return this.startTime},i.Ze=function(){return this.endTime},i.dc=function(){return this.Ba},i.$b=function(){return this.la},i.tf=function(){return this.tilesLayout},i.rf=function(){return this.i},V("shaka.media.SegmentReference",so),so.prototype.getTileDuration=so.prototype.rf,so.prototype.getTilesLayout=so.prototype.tf,so.prototype.getEndByte=so.prototype.$b,so.prototype.getStartByte=so.prototype.dc,so.prototype.getEndTime=so.prototype.Ze,so.prototype.getStartTime=so.prototype.lf,so.prototype.getUris=so.prototype.ya,(i=uo.prototype).getDuration=function(){return this.l},i.ef=function(){return this.g},i.Ka=function(e){this.l=e},i.kf=function(){return this.j},i.ye=function(e){this.o=e},i.oc=function(e){this.s=e},i.Rd=function(e){this.m=e},i.Xf=function(e){this.Qc=e},i.Ye=function(){return this.Qc},i.Ib=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.Cd(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.C&&(this.j=(Date.now()+this.o)/1e3-this.h-this.g)}},i.Cd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},i.Bd=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.s},i.kb=function(){return 1/0!=this.l&&!this.s},i.Qa=function(){return Math.max(this.u,this.fb()-this.m)},i.ze=function(e){this.u=e},i.fb=function(){return this.T()||this.kb()?Math.min(Math.max(0,(Date.now()+this.o)/1e3-this.g-this.j)+this.D,this.l):this.h||this.l},i.cc=function(e){var t=Math.max(this.i,this.u);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.fb()-this.m+e,this.Pa()))},i.Eb=function(){return this.cc(0)},i.Pa=function(){return Math.max(0,this.fb()-(this.T()||this.kb()?this.Qc:0))},i.Ce=function(){return!(null==this.j||null!=this.h&&this.C)},i.xe=function(e){this.D=e},V("shaka.media.PresentationTimeline",uo),uo.prototype.setAvailabilityTimeOffset=uo.prototype.xe,uo.prototype.usingPresentationStartTime=uo.prototype.Ce,uo.prototype.getSeekRangeEnd=uo.prototype.Pa,uo.prototype.getSeekRangeStart=uo.prototype.Eb,uo.prototype.getSafeSeekRangeStart=uo.prototype.cc,uo.prototype.getSegmentAvailabilityEnd=uo.prototype.fb,uo.prototype.setUserSeekStart=uo.prototype.ze,uo.prototype.getSegmentAvailabilityStart=uo.prototype.Qa,uo.prototype.isInProgress=uo.prototype.kb,uo.prototype.isLive=uo.prototype.T,uo.prototype.offset=uo.prototype.offset,uo.prototype.notifyMaxSegmentDuration=uo.prototype.Bd,uo.prototype.notifyMinSegmentStartTime=uo.prototype.Cd,uo.prototype.notifySegments=uo.prototype.Ib,uo.prototype.getDelay=uo.prototype.Ye,uo.prototype.setDelay=uo.prototype.Xf,uo.prototype.setSegmentAvailabilityDuration=uo.prototype.Rd,uo.prototype.setStatic=uo.prototype.oc,uo.prototype.setClockOffset=uo.prototype.ye,uo.prototype.getPresentationStartTime=uo.prototype.kf,uo.prototype.setDuration=uo.prototype.Ka,uo.prototype.getMaxSegmentDuration=uo.prototype.ef,uo.prototype.getDuration=uo.prototype.getDuration,lo.prototype.release=function(){this.j=null,this.i=function(){}},ho.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.C=this.u=null},ho.prototype.Fd=function(){this.o=!0,po(this)};var mo=new gt((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function vo(e,t,n){var i=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new Ri,this.i=new xo(e),go(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){wo(i,i.j)}))}function yo(e){return e.m?e.g.currentTime:e.j}function bo(e,t){0<e.g.readyState?So(e.i,t):go(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){wo(e,e.j)}))}function wo(e,t){.001>Math.abs(e.g.currentTime-t)?To(e):(e.h.ta(e.g,"seeking",(function(){To(e)})),So(e.i,0==e.g.currentTime?t:e.g.currentTime))}function To(e){e.m=!0,e.h.B(e.g,"seeking",(function(){return e.l()}))}function xo(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new rn((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function So(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Ca(.1)}function Ao(e){var t=this;this.g=e,this.j=!1,this.h=null,this.i=new Ri,go(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,(function(){null==t.h||0==t.h?t.j=!0:(t.i.ta(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.h))}))}function Eo(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.G=t.minBufferTime||0,this.l=n,this.C=r,this.u=null,this.j=new ho(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,i=new lo(new co(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 vo(e,(function(){var e=o.j;e.s=!0,e.o=!1,e.j=!1;var t=yo(o.h);return e=Io(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.u||o.u<t-1)?(o.u=t,bo(o.h,e),e=void 0):(o.C(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.g.getDuration()?e.g.Eb():e.g.Pa():0>t&&(t=e.g.Pa()+t),ko(e,Mo(e,t))}(this,i)),this.s=new rn((function(){if(0!=o.i.readyState&&!o.i.paused){var e=yo(o.h),t=o.g.Eb(),n=o.g.Pa();3>n-t&&(t=n-3),e<t&&(e=Io(o,e),o.i.currentTime=e)}})).Ca(.25)}function ko(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Io(e,t){var n=Math.max(e.G,e.l.rebufferingGoal),i=e.l.safeSeekOffset,r=e.g.Eb(),a=e.g.Pa(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.cc(n),u=e.g.cc(i);return n=e.g.cc(n+i),t>=o?ko(e,t):t>a?a:t<r?Fa(e.i.buffered,u)?u:n:t>=s||Fa(e.i.buffered,t)?t:n}function Mo(e,t){var n=e.g.Eb();return t<n||t>(n=e.g.Pa())?n:t}function Co(e){this.K=e,this.g=null,this.h=0,this.i=!1}function Ro(e,t,n){return new Co([new so(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Do(e,t,n){this.i=e,this.h=t,this.g=n}function No(){Co.call(this,[]),this.j=[]}function Po(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Jc(),this.h=new rn((function(){t.g.pe(.25*t.i)}))}function Lo(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Jc()!=t&&e.g.Qd(t))}catch(e){}e.h.Ca(.25),0!=e.g.Jc()&&e.g.Qd(0)}function jo(e){var t=this;this.h=e,this.g=new Set,this.i=new rn((function(){_o(t,!1)})).Ca(.25)}function _o(e,t){for(var n=l(e.g),i=n.next();!i.done;i=n.next())i.value.j(e.h.currentTime,t)}function Oo(e){pi.call(this),this.g=new Map,this.h=e}function Uo(e){pi.call(this);var t=this;this.g=new Set,this.i=e,this.h=new rn((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 fi("regionremove",new Map([["region",i]])),t.dispatchEvent(i))})).Ca(2)}function Bo(e){pi.call(this);var t=this;this.i=e,this.g=new Map,this.l=[{sb:null,rb:Ko,jb:function(e,n){return Fo(t,"enter",e,n)}},{sb:Vo,rb:Ko,jb:function(e,n){return Fo(t,"enter",e,n)}},{sb:Ho,rb:Ko,jb:function(e,n){return Fo(t,"enter",e,n)}},{sb:Ko,rb:Vo,jb:function(e,n){return Fo(t,"exit",e,n)}},{sb:Ko,rb:Ho,jb:function(e,n){return Fo(t,"exit",e,n)}},{sb:Vo,rb:Ho,jb:function(e,n){return Fo(t,"skip",e,n)}},{sb:Ho,rb:Vo,jb:function(e,n){return Fo(t,"skip",e,n)}}],this.h=new Ri,this.h.B(this.i,"regionremove",(function(e){t.g.delete(e.region)}))}function Fo(e,t,n,i){t=new fi(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}vo.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},xo.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},Ao.prototype.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},Ao.prototype.o=function(e){this.h=this.j?this.h:e},Ao.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0},Ao.prototype.D=function(){},Eo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.s&&(this.s.stop(),this.s=null),this.i=this.h=this.g=this.l=null,this.C=function(){}},Eo.prototype.o=function(e){bo(this.h,e)},Eo.prototype.m=function(){var e=yo(this.h);return 0<this.i.readyState&&!this.i.paused?Mo(this,e):e},Eo.prototype.D=function(){this.j.Fd()},(i=Co.prototype).destroy=function(){return Le("shaka.media.SegmentIndex","Please use release() instead of destroy()."),this.release(),Promise.resolve()},i.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)},i.Af=function(){this.i=!0},i.find=function(e){for(var t=this.K.length-1,n=t;0<=n;--n){var i=this.K[n],r=n<t?this.K[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.h}return this.K.length&&e<this.K[0].startTime?this.h:null},i.get=function(e){return 0==this.K.length||0>(e-=this.h)||e>=this.K.length?null:this.K[e]},i.offset=function(e){if(!this.i)for(var t=l(this.K),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},i.Gb=function(e){!this.i&&e.length&&(this.K=this.K.filter((function(t){return t.startTime<e[0].startTime})),this.K.push.apply(this.K,c(e)))},i.Hb=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.K.length||e.endTime>n.K[0].startTime)})),this.Gb(e),this.cb(t)},i.cb=function(e){if(!this.i){var t=this.K.length;this.K=this.K.filter((function(t){return t.endTime>e})),this.h+=t-this.K.length}},i.Ya=function(e,t,n){if(n=void 0!==n&&n,!this.i){for(;this.K.length&&this.K[this.K.length-1].startTime>=t;)this.K.pop();for(;this.K.length&&this.K[0].endTime<=e;)this.K.shift(),n||this.h++;0!=this.K.length&&(e=this.K[this.K.length-1],this.K[this.K.length-1]=new so(e.startTime,t,e.j,e.Ba,e.la,e.g,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.h,e.tilesLayout,e.i))}},i.Sc=function(e,t){var n=this;this.i||(this.g&&this.g.stop(),this.g=new rn((function(){var e=t();e?n.K.push.apply(n.K,c(e)):(n.g.stop(),n.g=null)})),this.g.Ca(e))},Co.prototype[Symbol.iterator]=function(){return this.Db(0)},Co.prototype.Db=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 Do(this,t,i)},V("shaka.media.SegmentIndex",Co),Co.forSingleSegment=Ro,Co.prototype.getIteratorForTime=Co.prototype.Db,Co.prototype.updateEvery=Co.prototype.Sc,Co.prototype.fit=Co.prototype.Ya,Co.prototype.evict=Co.prototype.cb,Co.prototype.mergeAndEvict=Co.prototype.Hb,Co.prototype.merge=Co.prototype.Gb,Co.prototype.offset=Co.prototype.offset,Co.prototype.get=Co.prototype.get,Co.prototype.find=Co.prototype.find,Co.prototype.markImmutable=Co.prototype.Af,Co.prototype.release=Co.prototype.release,Co.prototype.destroy=Co.prototype.destroy,Do.prototype.seek=function(e){return Le("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek()."),(e=this.i.Db(e))?(this.h=e.h,this.g=e.g):(this.h=Number.MAX_VALUE,this.g=0),this.next().value},Do.prototype.current=function(){var e=this.i.get(this.h);return e&&0<e.h.length&&e.ya().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},Do.prototype.next=function(){var e=this.i.get(this.h);return e&&0<e.h.length?(this.g++,e.ya().length&&this.g==e.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},V("shaka.media.SegmentIterator",Do),Do.prototype.next=Do.prototype.next,Do.prototype.current=Do.prototype.current,Do.prototype.seek=Do.prototype.seek,m(No,Co),(i=No.prototype).clone=function(){var e=new No;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.K.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.K.length}return null},i.offset=function(){},i.Gb=function(){},i.cb=function(){},i.Hb=function(){},i.Ya=function(){},i.Sc=function(){},V("shaka.media.MetaSegmentIndex",No),No.prototype.updateEvery=No.prototype.Sc,No.prototype.fit=No.prototype.Ya,No.prototype.mergeAndEvict=No.prototype.Hb,No.prototype.evict=No.prototype.cb,No.prototype.merge=No.prototype.Gb,No.prototype.offset=No.prototype.offset,No.prototype.get=No.prototype.get,No.prototype.find=No.prototype.find,No.prototype.release=No.prototype.release,Po.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},Po.prototype.set=function(e){this.i=e,Lo(this)},Po.prototype.Fc=function(){return this.g.Fc()},jo.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(Oo,pi),Oo.prototype.release=function(){this.g.clear(),pi.prototype.release.call(this)},Oo.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).ic,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.be)===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.co
2decs&&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.be=i,JSON.stringify(i),n=new fi("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}},m(Uo,pi),Uo.prototype.release=function(){this.g.clear(),this.h.stop(),pi.prototype.release.call(this)},m(Bo,pi),Bo.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,pi.prototype.release.call(this)},Bo.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?Vo:e>i.endTime?Ho:Ko;this.g.set(i,a);for(var o=l(this.l),s=o.next();!s.done;s=o.next())(s=s.value).sb==r&&s.rb==a&&s.jb(i,t)}};var Vo=1,Ko=2,Ho=3;function qo(e,t,n,i,r){return e=Ti(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Go(e,t){var n=this;this.g=t,this.m=e,this.h=null,this.u=1,this.o=this.l=null,this.i=new Map,this.C=!1,this.D=null,this.s=!1,this.j=new Mi((function(){return function(e){var t,n,i,r;return P((function(a){if(1==a.g){for(t=[],n=l(e.i.values()),i=n.next();!i.done;i=n.next())rs(r=i.value),t.push(as(r));return w(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.ob&&(Yo(e,r,!1,0,!1),n.ob=i)}else(i=n.ob)&&(n.ob=null,Yo(e,i,!0,0,!1))}}function Xo(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.C&&(t.video&&Yo(e,t.video,n,i,r),t.audio&&Yo(e,t.audio,n,i,r))}function Wo(e,t){e.o=t,e.C&&Yo(e,t,!0,0,!1)}function Yo(e,t,n,i,r){var a=e.i.get(t.type);a||t.type!=dt?a&&(a.ob&&(t.trickModeVideo?(a.ob=t,t=t.trickModeVideo):a.ob=null),a.stream!=t||r)&&(t.type==dt&&qa(e.g.O,Lt(t.mimeType,t.codecs),e.m.sequenceMode),a.stream.closeSegmentIndex&&a.stream.closeSegmentIndex(),a.stream=t,a.ea=null,n&&(a.Yb?a.Uc=!0:a.Ja?(a.qb=!0,a.Ac=i,a.Uc=!0):(rs(a),ns(e,a,!0,i).catch((function(t){e.g&&e.g.onError(t)})))),function(e,t){var n,i;return P((function(r){if(1==r.g)return t.ua?(n=t.stream,i=t.ua,n.segmentIndex?r.A(2):w(r,n.createSegmentIndex(),2)):r.return();if(t.ua!=i||t.stream!=n)return r.return();var a=e.g.Ic(),o=Xa(e.g.O,t.type),s=t.stream.segmentIndex.find(t.za?t.za.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.la?u.la-u.Ba:null,u&&!s&&(s=(u.endTime-u.startTime)*(t.stream.bandwidth||0)/8),s?((u=u.g)&&(s+=(u.la?u.la-u.Ba:null)||0),a=8*s/(u=e.g.getBandwidthEstimate())<(o||0)-a-Math.max(e.m.minBufferTime||0,e.h.rebufferingGoal)||t.ua.h.g>s):a=!1,a&&t.ua.abort(),T(r)}))}(e,a).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,i,r,a;P((function(o){switch(o.g){case 1:return n=ft,x(o,2),w(o,$a(e.g.O,n.Y),4);case 4:A(o,3);break;case 2:i=E(o),e.g&&e.g.onError(i);case 3:r=Lt(t.mimeType,t.codecs),qa(e.g.O,r,e.m.sequenceMode),(e.g.O.l.isTextVisible()||e.h.alwaysStreamText)&&(a=Jo(t),e.i.set(n.Y,a),is(e,a,0)),T(o)}}))}(e,t)}function $o(e,t){t.Yb||t.qb||(t.Ja?(t.qb=!0,t.Ac=0):null==za(e.g.O,t.type)?null==t.Ma&&is(e,t,0):(rs(t),ns(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function Jo(e){return{stream:e,type:e.type,ea:null,za:null,Kc:null,vd:null,ud:null,td:null,ob:null,endOfStream:!1,Ja:!1,Ma:null,qb:!1,Ac:0,Uc:!1,Yb:!1,lc:!0,Id:!1,ec:!1,ua:null}}function Qo(t,n){var i,r,a,o,s;return P((function(u){switch(u.g){case 1:if(Ci(t.j),n.Ja||null==n.Ma||n.Yb)return u.return();if(n.Ma=null,!n.qb){u.A(2);break}return w(u,ns(t,n,n.Uc,n.Ac),3);case 3:return u.return();case 2:if(n.stream.segmentIndex){u.A(4);break}return i=n.stream,w(u,n.stream.createSegmentIndex(),5);case 5:if(i!=n.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),null==n.Ma&&is(t,n,0),u.return();case 4:x(u,6),r=function(t,n){if(es(n))return function(e,t){var n=Xa(e,"video")||0;Ft(e.g,t,n)}(t.g.O,n.stream.originalId||""),null;n.type==dt&&function(e){e.g&&Ft(e.g,"",0)}(t.g.O);var i=t.g.Ic(),r=n.za?n.za.endTime:i,a=function(e,t,n){return t==dt?null==(e=e.g).h||e.h<n?0:e.h-Math.max(n,e.g):Va(e=Wa(e,t),n)}(t.g.O,n.type,i),o=Math.max(t.m.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.u;if(1e-6>t.m.presentationTimeline.getDuration()-r)return n.endOfStream=!0,"video"==n.type&&(i=t.i.get(dt))&&es(i)&&(i.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.h.updateIntervalSeconds/2;if(a=Xa(t.g.O,n.type),a=function(e,t,n,i){if(t.ea)return t.ea.current();if(t.za||i)return t.ea=t.stream.segmentIndex.Db(t.za?t.za.endTime:i),t.ea&&t.ea.next().value;e=e.h.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.ea=t.stream.segmentIndex.Db(i),r=t.ea&&t.ea.next().value),r||(t.ea=t.stream.segmentIndex.Db(n),r=t.ea&&t.ea.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())es(u=u.value)||u.ea&&!u.ea.current()||(o=Math.min(o,u.za?u.za.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,f,h,p,g;return P((function(m){switch(m.g){case 1:return a=ft,o=n.stream,s=n.ea,n.Ja=!0,x(m,2),w(m,function(e,t,n){var i,r,a,o,s,u,l;return P((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 P((function(i){if(1==i.g)return x(i,2),t.ud=r,t.td=a,t.vd=o,w(i,function(e,t,n,i,r,a){return P((function(o){return t==ft.Y?(a||(e.g.u=n),function(e,t,n){e.l=t,e.m=n}(e.g,i,r),o.return()):w(o,Promise.all([Qa(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,Ja(e,t)})),a?Promise.resolve():Qa(e,t,(function(){var i=n;0>i&&(i+=.001),e.h[t].timestampOffset=i,Ja(e,t)})),Qa(e,t,(function(){e.h[t].appendWindowStart=0,e.h[t].appendWindowEnd=r,e.h[t].appendWindowStart=i,Ja(e,t)}))]),0)}))}(e.g.O,t.type,o,r,a,e.m.sequenceMode),4);if(2!=i.g)return A(i,0);throw n=E(i),t.ud=null,t.td=null,t.vd=null,n}))},i.push(s())),!function(e,t){return e&&t?e.dc()==t.dc()&&e.$b()==t.$b()&&ne(e.ya(),t.ya()):e==t}(n.g,t.Kc)&&(t.Kc=n.g)&&(u=ts(e,t,n.g),l=function(){var n,i,r;return P((function(a){switch(a.g){case 1:return x(a,2),w(a,u,4);case 4:return n=a.h,Ci(e.j),i=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,w(a,Ya(e.g.O,t.type,n,null,null,i),5);case 5:A(a,0);break;case 2:throw r=E(a),t.Kc=null,r}}))}
2,e.g.Ef(n.startTime,n.g),i.push(l())),w(c,Promise.all(i),0)}))}(t,n,r),4);case 4:return Ci(t.j),t.s?m.return():(u="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,l=e.ReadableStream,t.h.lowLatencyMode&&l&&u?(d=new Uint8Array(0),f=function(e){var a,s,u;return P((function(l){return Ci(t.j),t.s?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 yr).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),w(l,Zo(t,n,i,o,r,u),0)):l.A(0))}))},w(m,ts(t,n,r,f),6)):w(m,ts(t,n,r),7));case 7:return c=m.h,Ci(t.j),t.s?m.return():n.qb?(n.Ja=!1,is(t,n,0),m.return()):w(m,Zo(t,n,i,o,r,c),6);case 6:if(Ci(t.j),t.s)return m.return();n.za=r,s.next(),n.Ja=!1,n.Id=!1,h=t.g.O.Za(),p=h[n.type],JSON.stringify(p),n.qb||t.g.Fd(),is(t,n,0),A(m,0);break;case 2:if(g=E(m),Ci(t.j,g),t.s)return m.return();if(n.Ja=!1,7001==g.code)n.Ja=!1,n.Ma=null,is(t,n,0),m.A(0);else if(n.type==a.Y&&t.h.ignoreTextStreamFailures)t.i.delete(a.Y),m.A(0);else if(3017==g.code)(function(e,t,n){if(!Array.from(e.i.values()).some((function(e){return e!=t&&e.Id}))){var i=Math.round(100*e.u);if(20<i)e.u-=.2;else{if(!(4<i))return t.ec=!0,e.s=!0,void e.g.onError(n);e.u-=.04}t.Id=!0}is(e,t,4)})(t,n,g),m.A(0);else{if(1001!=g.code||!g.data||404!=g.data[1])return n.ec=!0,g.severity=2,w(m,os(t,g),0);n.Ja=!1,n.Ma=null,is(t,n,1),m.A(0)}}}))}(t,n,i,a).catch((function(){})),null)}(t,n),null!=r&&(is(t,n,r),n.ec=!1),A(u,7);break;case 6:return a=E(u),w(u,os(t,a),8);case 8:return u.return();case 7:if(o=Array.from(t.i.values()),!t.C||!o.every((function(e){return e.endOfStream}))){u.A(0);break}return w(u,t.g.O.endOfStream(),10);case 10:Ci(t.j),0!=(s=t.g.O.getDuration())&&s<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.Ka(s),T(u)}}))}function Zo(e,t,n,i,r,a){var o,s;return P((function(u){return 1==u.g?(o=i.closedCaptions&&0<i.closedCaptions.size,(null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length||e.h.dispatchAllEmsgBoxes)&&(new yr).S("emsg",(function(t){var n=i.emsgSchemeIdUris;if(0===t.version)var a=t.reader.jc(),o=t.reader.jc(),s=t.reader.M(),u=t.reader.M(),l=t.reader.M(),c=t.reader.M(),d=r.startTime+u/s;else s=t.reader.M(),u=(d=t.reader.Lb()/s+r.timestampOffset)-r.startTime,l=t.reader.M(),c=t.reader.M(),a=t.reader.jc(),o=t.reader.jc();t=t.reader.$a(t.reader.P.byteLength-t.reader.ba()),(n&&n.includes(a)||e.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.Ff():(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 fi(zu,n),e.g.onEvent(n)))})).parse(a),w(u,function(e,t,n){var i,r,a;return P((function(o){if(1==o.g)return i=Math.max(e.h.bufferBehind,e.m.presentationTimeline.g),null==(r=za(e.g.O,t.type))||.01>=(a=n-r-i)?o.return():w(o,e.g.O.remove(t.type,r,r+a),2);Ci(e.j),T(o)}))}(e,t,n),2)):3!=u.g?(Ci(e.j),s=t.lc,t.lc=!1,w(u,Ya(e.g.O,t.type,a,r.startTime,r.endTime,o,s,e.m.sequenceMode),3)):(Ci(e.j),void T(u))}))}function es(e){return e&&e.type==dt&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function ts(e,t,n,i){var r,a,o,s,u;return P((function(l){return 1==l.g?(r=Ei,a=qo(n.ya(),n.Ba,n.la,e.h.retryParameters,i),o=t.stream,e.g.modifySegmentRequest(a,{type:o.type,init:n instanceof oo,duration:n.endTime-n.startTime,mimeType:o.mimeType,codecs:o.codecs,bandwidth:o.bandwidth}),s=e.g.lb.request(r,a),t.ua=s,w(l,s.promise,2)):(u=l.h,t.ua=null,l.return(u.data))}))}function ns(e,t,n,i){var r,a;return P((function(o){return 1==o.g?(t.qb=!1,t.Uc=!1,t.Ac=0,t.Yb=!0,t.za=null,t.Kc=null,t.ea=null,i?(r=e.g.Ic(),a=e.g.O.getDuration(),w(o,e.g.O.remove(t.type,r+i,a),3)):w(o,$a(e.g.O,t.type),4)):3!=o.g?(Ci(e.j),n?w(o,e.g.O.flush(t.type),3):o.A(3)):(Ci(e.j),t.Yb=!1,t.endOfStream=!1,is(e,t,0),void T(o))}))}function is(e,t,n){var i=t.type;(i!=dt||e.i.has(i))&&(t.Ma=new nn((function(){var n;return P((function(i){return 1==i.g?(x(i,2),w(i,Qo(e,t),4)):2!=i.g?A(i,0):(n=E(i),e.g&&e.g.onError(n),void T(i))}))})).R(n))}function rs(e){null!=e.Ma&&(e.Ma.stop(),e.Ma=null)}function as(e){return P((function(t){return e.ua?w(t,e.ua.abort(),0):t.A(0)}))}function os(e,t){return P((function(n){if(1==n.g)return w(n,ai(e.D),2);Ci(e.j),e.g.onError(t),t.handled||e.h.failureCallback(t),T(n)}))}function ss(e,t){var n=Uu(),i=this;this.j=t,this.i=e,this.l=n,this.o=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return P((function(t){if(e.s.g)t=t.A(0);else{if(0==e.m.length||e.g&&!e.g.ib)var n=!1;else{e.g&&(e.g.Ia.mb(),e.g=null);var i=(n=e.m.shift()).create(e.l);i?(n.Ia.Jb(),e.g={node:i.node,payload:i.payload,ib:i.ib,Ia:n.Ia}):n.Ia.Oc(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return P((function(i){switch(i.g){case 1:return e.i=e.j.gf(e.i,e.l,e.g.node,e.g.payload),x(i,2),e.h=e.j.Se(e.i,e.l,e.g.payload),w(i,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ia.Mc(),e.g=null),A(i,0);break;case 2:return 7001==(t=E(i)).code?e.g.Ia.mb():e.g.Ia.onError(t),e.g=null,e.h=null,n=e,w(i,e.j.handleError(e.l,t),5);case 5:n.i=i.h,T(i)}}))}(e):(e.j.Df(e.i),e.o=new pt,n=e.o),t=w(t,n,1)}return t}))}(i)})),this.s=new Mi((function(){return function(e){var t,n;return P((function(i){if(1==i.g)return e.h&&e.h.abort(),ls(e),w(i,e.u,2);for(e.g&&e.g.Ia.mb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.Ia.mb();e.g=null,e.m=[],e.j=null,T(i)}))}(i)}))}function us(e,t){var n={Jb:function(){},Mc:function(){},mb:function(){},onError:function(){},Oc:function(){},Ng:function(){}};return e.m.push({create:t,Ia:n}),e.h&&e.h.abort(),ls(e),n}function ls(e){e.o&&(e.o.resolve(),e.o=null)}function cs(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 ds(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 fs(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 hs(){}function ps(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function gs(t,n){var i=this;this.j=!1,this.i=[],this.u=t,this.m=n,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.m.appendChild(this.g),this.s=new rn((function(){vs(i)})).Ca(.25),this.h=new Map,this.o=new Ri,this.o.B(document,"fullscreenchange",(function(){vs(i,!0)})),this.l=null,"ResizeObserver"in e&&(this.l=new ResizeObserver((function(){vs(i,!0)})),this.l.observe(this.g))}function ms(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,f=c?c.De:null;c&&(o.push(c.ae),d||(a=!0,e.h.delete(u),c=null)),d&&(s.push(u),c||(ys(e,u,r),f=(c=e.h.get(u)).De,a=!0)),0<u.nestedCues.length&&f&&ms(e,u.nestedCues,f,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.ae)}}function vs(e,t){if(e.g){var n=e.u.currentTime;
2if((!e.j||void 0!==t&&t)&&0<e.h.size&&(ps(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));ms(e,e.i,e.g,n,[])}}}function ys(e,t,n){var i=1<n.length,r=i?"span":"div";(t.lineBreak||t.spacer)&&(t.spacer&&Le("shaka.extern.Cue","Please use lineBreak instead of spacer."),r="br"),i=!i&&0<t.nestedCues.length;var a=document.createElement(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=bs(n.linePadding,n,e.m),a.paddingRight=bs(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=document.createElement("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=bs(n.fontSize,n,e.m),n.line?1==n.lineInterpretation&&(a.position="absolute",a.left="0",a.top="0",n.writingMode==de?(a.width="100%",n.lineAlign==he?a.top=n.line+"%":"end"==n.lineAlign&&(a.bottom=n.line+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==he?a.left=n.line+"%":"end"==n.lineAlign&&(a.right=n.line+"%")):(a.height="100%",n.lineAlign==he?a.right=n.line+"%":"end"==n.lineAlign&&(a.left=n.line+"%"))):n.region&&n.region.id&&(e=n.region.widthUnits==Te?"%":"px",i=n.region.viewportAnchorUnits==Te?"%":"px",a.height=n.region.height+(n.region.heightUnits==Te?"%":"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==de?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==de?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,i),n=a,i&&((n=document.createElement("span")).classList.add("shaka-text-wrapper"),n.style.backgroundColor=t.backgroundColor,a.appendChild(n)),e.h.set(t,{ae:a,De:n})}function bs(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 ws(e,t){this.h=e,this.g=t,this.j="",this.o=void 0,this.i=!1,this.m=!0,this.l=!1}function Ts(e,t,n){try{if(e.g.enabled){var i={d:1e3*n.duration,st:e.h.T()?js:Ls};i.ot=function(e){var t=e.type;if(e.init)return Ds;if("video"==t)return e.codecs.includes(",")?Rs:Cs;if("audio"==t)return Ms;if("text"==t)return"application/mp4"===e.mimeType?Ps:Ns}(n);var r=i.ot===Cs||i.ot===Ms||i.ot===Rs||i.ot===Ps;r&&(i.bl=function(e,t){var n=e.h.Za()[t];if(!n.length)return NaN;var i=e.h.Xe();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!==Ps&&(i.tb=function(e,t){var n=e.h.hb();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 Cs:return i.videoBandwidth||NaN;case Ms:return i.audioBandwidth||NaN;default:return i.bandwidth}}(e,i.ot)/1e3),As(e,t,i)}}catch(e){W("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}}function xs(e,t){try{if(!e.g.enabled)return t;var n=Ss(e);return n.ot=Ns,n.su=!0,ks(t,Es(n))}catch(e){return W("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),t}}function Ss(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.o,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}
2function As(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,Ss(e)),n.pr=e.h.Hc();var r=n.ot===Cs||n.ot===Rs;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=Es(r[e]))&&(n["CMCD-"+i[e]]=a);return n}(n),Object.keys(e).length&&Object.assign(t.headers,e);else{var a=Es(n);a&&(t.uris=t.uris.map((function(e){return ks(e,a)})))}}}function Es(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 ks(e,t){if(!t||e.includes("offline:"))return e;var n=new Xe(e);return n.g.set("CMCD",t),n.toString()}Go.prototype.destroy=function(){return this.j.destroy()},Go.prototype.configure=function(e){this.h=e,this.D=new ri({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)},Go.prototype.start=function(){var e=this;return P((function(t){if(1==t.g)return w(t,function(e){var t,n,i,r,a,o,s,u,c,d;return P((function(f){if(1==f.g){if(t=ft,!e.l)throw new Ge(2,5,5006);return n=new Map,i=new Set,e.l.audio&&(n.set(t.bb,e.l.audio),i.add(e.l.audio)),e.l.video&&(n.set(t.Na,e.l.video),i.add(e.l.video)),e.o&&(n.set(t.Y,e.o),i.add(e.o)),r=e.g.O,a=e.h.forceTransmuxTS,w(f,r.init(n,a,e.m.sequenceMode),2)}Ci(e.j);var h=e.m.presentationTimeline.getDuration();for(1/0>h?e.g.O.Ka(h):e.g.O.Ka(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=Jo(c),e.i.set(u,d),is(e,d,0));T(f)}))}(e),2);Ci(e.j),e.C=!0,T(t)}))},Go.prototype.lc=function(){for(var e=this.g.Ic(),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)).ea=null;var a=this.g.O;if(r==dt?a=null!=(a=a.g).g&&null!=a.h&&(e>=a.g&&e<a.h):a=Fa(a=Wa(a,r),e,t),!a){if((null!=Xa(this.g.O,r)||i.Ja)&&$o(this,i),i.ua&&(i.ua.abort(),i.ua=null),r===dt)for((r=this.g.O.u.g).l=0,r.h=[],r.g=[],(a=r.i).i=[],a.h=[],a.g=0,ka(r),a=(r=l(r.j.values())).next();!a.done;a=r.next())Ta(a.value);i.lc=!0}}},ss.prototype.destroy=function(){return this.s.destroy()},(i=cs.prototype).remove=function(e,t){return!!this.g&&(fs(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&&Le("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={ub:r.ub},a=n.next())r.ub=a.value,e.some(function(e){return function(t){return t.startTime==e.ub.startTime&&t.endTime==e.ub.endTime&&t.text==e.ub.payload}}(r))||(a=ds(r.ub))&&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&&(fs(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"},V("shaka.text.SimpleTextDisplayer",cs),cs.prototype.setTextVisibility=cs.prototype.setTextVisibility,cs.prototype.isTextVisible=cs.prototype.isTextVisible,cs.prototype.destroy=cs.prototype.destroy,cs.prototype.append=cs.prototype.append,cs.prototype.remove=cs.prototype.remove,V("shaka.util.Dom",hs),hs.removeAllChildren=ps,(i=gs.prototype).append=function(e){for(var t=[].concat(c(this.i)),n={},i=(e=l(e)).next();!i.done;n={pc:n.pc},i=e.next())n.pc=i.value,t.some(function(e){return function(t){return re(t,e.pc)}}(n))||this.i.push(n.pc);vs(this)},i.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.s&&this.s.stop(),this.h.clear(),this.o&&(this.o.release(),this.o=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})),vs(this,n>this.i.length),!0},i.isTextVisible=function(){return this.j},i.setTextVisibility=function(e){this.j=e},V("shaka.text.UITextDisplayer",gs),gs.prototype.setTextVisibility=gs.prototype.setTextVisibility,gs.prototype.isTextVisible=gs.prototype.isTextVisible,gs.prototype.remove=gs.prototype.remove,gs.prototype.destroy=gs.prototype.destroy,gs.prototype.append=gs.prototype.append,V("shaka.text.WebVttGenerator",(function(){}));var Is="m",Ms="a",Cs="v",Rs="av",Ds="i",Ns="c",Ps="tt",Ls="v",js="l";function _s(){}function Os(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]=gi(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=gi(l)),u=Os(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?(z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+u),e[a]=t[a]):(z("Invalid config, unrecognized key "+u),s=!1)}return s}function Us(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 Bs(){}function Fs(){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:$i,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\//)||sn()||cn("CrKey"))&&(i.gapDetectionThreshold=.5),(cn("Web0S")||sn()||cn("CrKey"))&&(i.stallSkip=0);var r={trackSelectionCallback:function(e){return P((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return P((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?w(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 Gn},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 P((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),i=[],r=Qt(t,n.map((function(e){return e.language})));r&&(i=n.filter((function(e){return Wt(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!=dt&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function Vs(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 Os(e,t,n||Fs(),i,"")}function Ks(){this.g=null,this.h=[]}function Hs(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 qs(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 Gs(){this.i=this.h=null,this.g=[]}function zs(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 Xs(){this.o=this.s=this.G=this.C=this.m=this.j=this.D=this.l=this.i=this.H=this.J=this.L=this.u=this.N=NaN,this.g=new Ks,this.h=new Gs}function Ws(t,n){pi.call(this);var i=this;this.l=pl,this.xc=this.g=null,this.pa=!1,this.m=new Ri,this.kd=this.s=this.Ub=this.i=this.Dc=this.J=this.j=this.qa=this.X=this.Ec=this.L=this.yc=this.H=this.yb=this.D=this.N=this.o=this.G=null,this.wd=1e9,this.h=lu(this),this.sd={width:1/0,height:1/0},this.u=null,this.vb=new Zn(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount),this.wb=this.h.preferredTextLanguage,this.Ob=this.h.preferredTextRole,this.Vb=this.h.preferForcedSubs,this.md=[],this.Wb=null,n&&n(this),this.G=function(e){return new bi((function(t,n){e.s&&e.s.segmentDownloaded(t,n)}),(function(t,n,i){t=(new Map).set("headers",t).set("request",n).set("requestType",i),e.dispatchEvent(Ys(qu,t))}),(function(t,n,i,r){t=(new Map).set("request",t).set("error",n).set("httpResponseCode",i).set("aborted",r),e.dispatchEvent(Ys(Hu,t))}))}(this),this.G.Od(this.h.streaming.forceHTTPS),this.C=null,wl&&(this.C=Ve(wl)),this.m.B(e,"online",(function(){i.Jd()})),this.V={name:"detach"},this.$={name:"attach"},this.ha={name:"unload"},this.zd={name:"manifest-parser"},this.rd={name:"manifest"},this.xb={name:"media-source"},this.nd={name:"drm-engine"},this.fa={name:"load"},this.Dd={name:"src-equals-drm-engine"},this.zb={name:"src-equals"};var r=new Map;r.set(this.$,(function(e,t){return ci(function(e,t,n){return null==t.F&&(t.F=n.F,e.m.B(t.F,"error",(function(){var t=Iu(e);t&&Eu(e,t)}))),e.g=t.F,Promise.resolve()}(i,e,t))})),r.set(this.V,(function(e){return e.F&&(i.m.Da(e.F,"error"),e.F=null),i.C&&i.C.release(),i.g=null,ci(e=Promise.resolve())})),r.set(this.ha,(function(e){return ci($s(i,e))})),r.set(this.xb,(function(e){return e=function(e,t){var n,i,r,a;return P((function(o){if(1==o.g)return n=new Oa,i=e.h.textDisplayFactory,r=Ve(i),e.qd=i,a=function(e,t,n,i){return new Ha(e,t,n,i)}(t.F,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())Js(e,a,o,"ID3",u.value);e.C&&e.C.onHlsTimedMetadata(r,a)}})),w(o,a.D,2);e.N=a,T(o)}))}(i,e),ci(e)})),r.set(this.zd,(function(e,t){var n=function(e,t,n){var i,r,a,o;return P((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,r=e.G,e.Ub=i,a=e,w(s,cr(i,r,e.h.manifest.retryParameters,t.mimeType),2);a.Dc=s.h,e.J=Ve(e.Dc),o=gi(e.h.manifest),n.F&&"AUDIO"===n.F.nodeName&&(o.disableVideo=!0),e.J.configure(o),T(s)}))}(i,e,t);return ci(n)})),r.set(this.rd,(function(e){return function(e,t){var n=t.uri,i=e.G;e.Ec=new Uo((function(){return e.kc()})),e.Ec.addEventListener("regionadd",(function(t){t=t.region,ku(e,ol,t),e.C&&e.C.onDashTimedMetadata(t)})),e.qa=null,e.h.streaming.observeQualityChanges&&(e.qa=new Oo((function(){return e.Za()})),e.qa.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(Ys(Qu,n))})));var r={networkingEngine:i,modifyManifestRequest:function(t,n){var i=e.X;try{i.g.enabled&&(i.o=n.format,As(i,t,{ot:Is,su:!i.i}))}catch(e){W("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}},modifySegmentRequest:function(t,n){Ts(e.X,t,n)},filter:function(t){return cu(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 No;s={id:e.wd++,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:dt,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.Ec;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 fi("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Eu(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 oi(function(){var t,i,o,s;return P((function(u){if(1==u.g)return t=e,w(u,e.J.start(n,r),2);if(t.i=u.h,i=Ys(Ju),e.dispatchEvent(i),0==e.i.variants.length)throw new Ge(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.u.D=s,T(u)}))}(),(function(){return e.J.stop()}))}(i,e)})),r.set(this.nd,(function(e){return e=function(e,t){var n,i;return P((function(r){return 1==r.g?(n=Date.now()/1e3,i=!0,e.o=Zs(e,{lb:e.G,onError:function(t){Eu(e,t)},Nc:function(t){Mu(e,t)},onExpirationUpdated:function(t,n){Cu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==Gu&&i&&(i=!1,e.u.j=Date.now()/1e3-n)}}),e.o.configure(e.h.drm),w(r,Fi(e.o,e.i.variants,e.i.offlineSessionIds),2)):3!=r.g?w(r,e.o.Xb(t.F),3):w(r,cu(e,e.i),0)}))}(i,e),ci(e)})),r.set(this.fa,(function(e,t){return ci(function(e,t,n){var i,r,a,o,s,u,l,c,d,f;return P((function(h){switch(h.g){case 1:if(t.startTime=n.startTime,null!=e.Wb&&(t.startTime=e.Wb,e.Wb=null),i=t.F,r=t.uri,e.Ub=r,e.H=new Po({Jc:function(){return t.F.playbackRate},Fc:function(){return t.F.defaultPlaybackRate},Qd:function(e){t.F.playbackRate=e},pe:function(e){t.F.currentTime+=e}}),a=function(){return pu(e)},o=function(){return hu(e)},e.m.B(i,"playing",a),e.m.B(i,"pause",a),e.m.B(i,"ended",a),e.m.B(i,"ratechange",o),s=e.h.abrFactory,e.s&&e.kd==s||(e.kd=s,e.s=Ve(s),"function"!=typeof e.s.playbackRateChanged&&(Le("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.s.playbackRateChanged=function(){}),e.s.configure(e.h.abr)),e.vb=new Zn(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount),e.wb=e.h.preferredTextLanguage,e.Ob=e.h.preferredTextRole,e.Vb=e.h.preferForcedSubs,Ru(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.s.init((function(t,n,i){e.j&&t!=e.j.l&&vu(e,t,!0,void 0!==n&&n,void 0===i?0:i)})),e.D=function(e,t){return new Eo(e.g,e.i,e.h.streaming,t,(function(){e.yb&&_o(e.yb,!0),e.j&&e.j.lc(),e.L&&tu
2(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.yb=function(e){var t=new Bo(e.Ec);t.addEventListener("enter",(function(t){ku(e,sl,t.region)})),t.addEventListener("exit",(function(t){ku(e,ul,t.region)})),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(ku(e,sl,n),ku(e,ul,n))}));var n=new jo(e.g);return n.g.add(t),e.qa&&n.g.add(e.qa),n}(e),u=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),eu(e,u),pn(e.i,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredAudioChannelCount,e.h.preferredDecodingAttributes),e.j=function(e){return new Go(e.i,{Ic:function(){return e.D.m()},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},modifySegmentRequest:function(t,n){Ts(e.X,t,n)},O:e.N,lb:e.G,onError:function(t){return Eu(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Ff:function(){e.J&&e.J.update&&e.J.update()},Fd:function(){e.D&&e.D.D(),tu(e)},Ef:function(t,n){var i=n.xd;i&&e.qa&&function(e,t,n){var i=function(e,t){var n=e.g.get(t);return n||(n={ic:[],be: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.ic;t.ic=a.filter((function(e,t){return!(e.position<=i&&t+1<a.length&&a[t+1].position<=i||e.position>=r)}))}else t.ic=[]}(e,i),e={xd:t,position:n},0<=(t=(i=i.ic).findIndex((function(e){return e.position>=n})))?i.splice(t,i[t].position==n?1:0,e):i.push(e)}(e.qa,i,t)}})}(e),e.j.configure(e.h.streaming),e.l=gl,e.dispatchEvent(Ys(il)),l=null,e.hb().find((function(e){return e.active}))){h.A(2);break}if(l=gu(e)?e.s.chooseVariant():null,vu(e,l,!0,!1,0),!e.h.streaming.startAtSegmentBoundary){h.A(3);break}return c=e.D.m(),w(h,function(e,t){var n,i,r,a,o;return P((function(s){return 1==s.g?(n=e.audio,i=e.video,r=function(e,t){var n,i;return P((function(r){return 1==r.g?e?w(r,e.createSegmentIndex(),2):r.return(null):(n=e.segmentIndex[Symbol.iterator]().seek(t))?(i=n.startTime,r.return(i)):r.return(null)}))},w(s,r(n,t),2)):3!=s.g?(a=s.h,w(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=h.h,e.D.o(d);case 3:bu(e,null,kn(l));case 2:return e.gb().find((function(e){return e.active}))||((f=jn(e.i.textStreams,e.wb,e.Ob,e.Vb)[0]||null)&&zs(e.u.h,f,!0),l&&(f?(l.audio&&function(e,t,n){return e=Wt(e.h.preferredTextLanguage),t=Wt(t.language),n=Wt(n.language),Gt(n,e)&&!Gt(t,n)}(e,l.audio,f)&&(e.pa=!0),e.pa&&e.N.l.setTextVisibility(!0),Su(e)):e.pa=!1),f&&(e.h.streaming.alwaysStreamText||e.pd())&&Wo(e.j,f)),w(h,e.j.start(),5);case 5:e.h.abr.enabled&&(e.s.enable(),Au(e)),An(e.j?e.j.l:null,e.i),Nu(e.i),wu(e),gu(e),e.i.variants.some((function(e){return e.primary})),e.m.ta(i,"loadedmetadata",(function(){e.u.l=Date.now()/1e3-n.Sd})),T(h)}}))}(i,e,t))})),r.set(this.Dd,(function(e,t){var n=function(e,t,n){var i,r,a,o,s,u,l;return P((function(c){return 1==c.g?(i=ft,r=Date.now()/1e3,a=!0,e.o=Zs(e,{lb:e.G,onError:function(t){Eu(e,t)},Nc:function(t){Mu(e,t)},onExpirationUpdated:function(t,n){Cu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==Gu&&a&&(a=!1,e.u.j=Date.now()/1e3-r)}}),e.o.configure(e.h.drm),o=n.uri||"",s=fr(o),"application/x-mpegurl"==(u=Tl[s])&&un()&&(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?Ot(n.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:i.Na,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.o.$=!0,w(c,Fi(e.o,[l],[]),2)):w(c,e.o.Xb(t.F),0)}))}(i,e,t);return ci(n)})),r.set(this.zb,(function(e,t){return function(e,t,n){function i(){return pu(e)}t.uri=n.uri,t.startTime=n.startTime,e.Ub=t.uri,e.D=new Ao(t.F),null!=t.startTime&&e.D.o(t.startTime),e.H=new Po({Jc:function(){return t.F.playbackRate},Fc:function(){return t.F.defaultPlaybackRate},Qd:function(e){t.F.playbackRate=e},pe:function(e){t.F.currentTime+=e}}),eu(e,e.h.streaming.rebufferingGoal),e.m.B(t.F,"playing",i),e.m.B(t.F,"pause",i),e.m.B(t.F,"ended",i),e.m.B(t.F,"ratechange",(function(){return hu(e)})),"none"!=e.g.preload&&e.m.ta(e.g,"loadedmetadata",(function(){e.u.l=Date.now()/1e3-n.Sd})),e.g.audioTracks&&(e.m.B(e.g.audioTracks,"addtrack",(function(){return wu(e)})),e.m.B(e.g.audioTracks,"removetrack",(function(){return wu(e)})),e.m.B(e.g.audioTracks,"change",(function(){return wu(e)}))),e.g.textTracks&&(e.m.B(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.B(t,"cuechange",(function(){if(t.activeCues)for(var n=l(t.activeCues),i=n.next();!i.done;i=n.next())i=i.value,Js(e,i.startTime,i.endTime,i.type,i.value),e.C&&e.C.onCueMetadataChange(i.value)})),new rn((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"})).Nb().R(.5))}(e,t);break;case"chapters":Qs(e,t);break;default:wu(e)}})),e.m.B(e.g.textTracks,"removetrack",(function(){return wu(e)})),e.m.B(e.g.textTracks,"change",(function(){return wu(e)})));var r=fr(t.uri);t.F.src=function(e,t,n){try{if(!e.g.enabled)return t;var i=Ss(e);e:{switch(n){case"video/webm":case"video/mp4":var r=Rs;break e;case"application/x-mpegurl":r=Is;break e}r=void 0}return i.ot=r,i.su=!0,ks(t,Es(i))}catch(e){return W("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.X,t.uri,Tl[r]),(sn()||cn("Web0S"))&&t.F.load(),e.l=ml,e.dispatchEvent(Ys(il));var a=new pt;go(e.g,HTMLMediaElement.HAVE_METADATA,e.m,(function(){a.resolve()}));var o=!1;return e.md.push((function(){o=!0})),go(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,(function(){return P((function(t){return 1==t.g?o?t.return():(function(e){var t=e.h.preferredAudioLanguage;if(""!=t){e.Ld(t);var n=e.h.preferredVariantRole;""!=n&&e.Ld(t,n)}}(e),iu(e).find((function(e){return"disabled"!=e.mode}))?t.A(2):w(t,new Promise((function(t){e.m.ta(e.g.textTracks,"change",t),new rn(t).R(1)})),2)):o?t.return():(function(e){var t=e.h.preferredTextLanguage,n=e.h.preferForcedSubs;if(""!=t){e.Md(t,"",n);var i=e.h.preferredTextRole;""!=i&&e.Md(t,i,n)}}(e),void T(t))}))})),e.g.error?a.reject(Iu(e)):"none"==e.g.preload&&(X('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),a.resolve()),e.m.ta(e.g,"error",(function(){a.reject(Iu(e))})),new oi(a,(function(){return a.reject(new Ge(2,7,7001)),Promise.resolve()}))}(i,e,t)})),this.Ga=new ss(this.V,{gf:function(e,t,n,r){var a=null;return e==i.V&&(a=n==i.V?i.V:i.$),e==i.$&&(a=n==i.V||t.F!=r.F?i.V:n==i.$?i.$:n==i.xb||n==i.fa?i.xb:n==i.zb?i.Dd:null),e==i.xb&&(a=n==i.fa&&t.F==r.F?i.zd:i.ha),e==i.zd&&(a=Ou(i.fa,i.rd,i.ha,n,t,r)),e==i.rd&&(a=Ou(i.fa,i.nd,i.ha,n,t,r)),e==i.nd&&(a=Ou(i.fa,i.fa,i.ha,n,t,r)),e==i.Dd&&(a=n==i.zb&&t.F==r.F?i.zb:i.ha),e!=i.fa&&e!=i.zb||(a=i.ha),e==i.ha&&(a=r.F&&t.F==r.F?i.$:i.V),a},Se:function(e,t,n){return i.dispatchEvent(Ys(el,(new Map).set("state",e.name))),r.get(e)(t,n)},handleError:function(e){return P((function(t){return 1==t.g?w(t,$s(i,e),2):t.return(e.F?i.$:i.V)}))},Df:function(e){i.dispatchEvent(Ys(tl,(new Map).set("state",e.name)))}}),t&&this.Xb(t,!0)}function Ys(e,t){return new fi(e,t)}function $s(e,t){var n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return e.l!=hl&&(e.l=pl),n=e.md.map((function(e){return e()})),e.md=[],w(f,Promise.all(n),2);
2case 2:if(e.dispatchEvent(Ys(cl)),t.mimeType=null,t.startTime=null,t.uri=null,t.F&&(e.m.Da(t.F,"loadedmetadata"),e.m.Da(t.F,"playing"),e.m.Da(t.F,"pause"),e.m.Da(t.F,"ended"),e.m.Da(t.F,"ratechange")),e.yb&&(e.yb.release(),e.yb=null),e.yc&&(e.yc.stop(),e.yc=null),!e.J){f.A(3);break}return w(f,e.J.stop(),4);case 4:e.J=null,e.Dc=null;case 3:if(!e.s){f.A(5);break}return w(f,e.s.stop(),5);case 5:if(!e.j){f.A(7);break}return w(f,e.j.destroy(),8);case 8:e.j=null;case 7:if(e.H&&(e.H.release(),e.H=null),e.D&&(e.D.release(),e.D=null),!e.N){f.A(9);break}return w(f,e.N.destroy(),10);case 10:e.N=null;case 9:if(e.C&&e.C.onAssetUnload(),!t.F||!t.F.src){f.A(11);break}return w(f,new Promise((function(e){return new rn(e).R(.1)})),12);case 12:for(t.F.removeAttribute("src"),t.F.load();t.F.lastChild;)t.F.removeChild(t.F.firstChild);case 11:if(!e.o){f.A(13);break}return w(f,e.o.destroy(),14);case 14:e.o=null;case 13:if(e.Ub=null,e.L=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.u=new Xs,e.qd=null,fu(e),T(f)}}))}function Js(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(Ys(Zu,t))}function Qs(e,t){t&&"chapters"==t.kind&&(t.mode="hidden",new rn((function(){for(var t=ru(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Nb().R(.5))}function Zs(e,t){return new Bi(t,e.h.drm.updateExpirationTime)}function eu(e,t){e.L=new ei,e.L.g=ni,ti(e.L,t,Math.min(.5,t/2)),fu(e),e.yc=new rn((function(){tu(e)})).Ca(.25)}function tu(e){switch(e.l){case ml:if(e.g.ended)var t=!0;else{var n=Ba(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case gl:e:if(e.g.ended||Ga(e.N))t=!0;else{if(e.i.presentationTimeline.T()){n=e.i.presentationTimeline.fb();var i=Ba(e.g.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Va(e.g.buffered,e.g.currentTime);var r=t,a=(n=e.L).h.get(n.g);t=n.g,i=r||i>=a?ii:ni,n.g=i,t!=i&&fu(e)}function nu(e){if(e.J){var t=gi(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.J.configure(t)}if(e.o&&e.o.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{du(e,e.i)}catch(t){Eu(e,t)}e.s&&gu(e),!(t=e.j.l)||t.allowedByApplication&&t.allowedByKeySystem||mu(e)}if(e.G&&e.G.Od(e.h.streaming.forceHTTPS),e.N&&(t=e.h.textDisplayFactory,e.qd!=t)){var n=Ve(t),i=e.N,r=i.l;i.l=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.g&&(i.g.i=n),e.qd=t,e.j&&((n=(t=e.j).i.get(dt))&&Yo(t,n.stream,!0,0,!0))}e.s&&(e.s.configure(e.h.abr),e.h.abr.enabled?e.s.enable():e.s.disable(),Au(e)),e.L&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),ti(e.L,t,Math.min(.5,t/2))),e.i&&Ru(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd)}function iu(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function ru(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function au(e,t){var n,i;return P((function(r){switch(r.g){case 1:return n=fr(t),(i=xl[n])?r.return(i):(x(r,2),w(r,dr(t,e.G,e.h.streaming.retryParameters),4));case 4:i=r.h,A(r,3);break;case 2:E(r);case 3:if(i)return r.return(i);throw new Ge(1,2,2011,n)}}))}function ou(e,t,n,i,r,a,o){var s,u,l,c;return P((function(d){if(1==d.g)return"text/vtt"!=r||o.length?w(d,su(e,t,e.G,e.h.streaming.retryParameters),3):d.A(2);2!=d.g&&(s=d.h,u=uu(e,s,r,o),l=new Blob([u],{type:"text/vtt"}),t=io(l),r="text/vtt"),(c=document.createElement("track")).src=xs(e.X,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 su(e,t,n,i){var r,a,o;return P((function(s){if(1==s.g){r=Ei,(a=Ti([t],i)).method="GET";var u=e.X;try{u.g.enabled&&As(u,a,{ot:Ns,su:!0})}catch(e){W("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return w(s,n.request(r,a).promise,2)}return o=s.h,s.return(o.data)}))}function uu(e,t,n,i){var r=Ht[n];if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration},t=Re(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");
2return 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&&Le("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=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case oe: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 Ge(2,2,2014,n)}function lu(e){var t=Fs();return t.streaming.failureCallback=function(t){e.T()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.Jd())},t.textDisplayFactory=function(){return e.xc?new gs(e.g,e.xc):new cs(e.g)},t}function cu(e,t){return P((function(n){if(1==n.g)return w(n,function(e,t){return P((function(n){if(1==n.g)return w(n,yn(e.j?e.j.l:null,t),2);Nu(t),T(n)}))}(e,t),2);du(e,t),T(n)}))}function du(e,t){if(e.l!=hl){for(var n=e.h.restrictions,i=e.sd,r=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=vn(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.j&&wu(e),(n=e.o?e.o.g:null)&&e.o.s)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,Gi(e.o,o.initDataType,o.initData);Du(e,t)}}function fu(e){var t=e.od();if(e.u&&e.L&&e.D){var n=e.H;n.j=t,Lo(n),e.X&&(n=e.X,t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t),pu(e)}t=(new Map).set("buffering",t),e.dispatchEvent(Ys(Ku,t))}function hu(e){var t=e.g.playbackRate;0!=t&&(e.H&&e.H.set(t),t=Ys(nl),e.dispatchEvent(t))}function pu(e){if(e.u&&e.L){var t=e.u.g;e.L.g==ni?Hs(t,"buffering"):e.g.paused?Hs(t,"paused"):e.g.ended?Hs(t,"ended"):Hs(t,"playing")}}function gu(e){try{Du(e,e.i)}catch(t){return Eu(e,t),!1}var t=e.i.variants.filter((function(e){return Pn(e)}));return t=e.vb.create(t),e.s.setVariants(Array.from(t.values())),!0}function mu(e){var t;(t=gu(e)?e.s.chooseVariant():null)&&vu(e,t,!0,!0,0)}function vu(e,t,n,i,r){var a=e.j.l;if(t==a)i&&Xo(e.j,t,i,r,!0);else{var o=e.u.h;o.h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Xo(e.j,t,i,r),i=null,a&&(i=kn(a)),t=kn(t),n?bu(e,i,t):Tu(e,i,t)}}function yu(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),Tu(e,n=Dn(n),Dn(t))}function bu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),Pu(e,t=Ys(Vu,t))}function wu(e){Pu(e,Ys(ll))}function Tu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),Pu(e,t=Ys(dl,t))}function xu(e){Pu(e,Ys(rl))}function Su(e){Pu(e,Ys(al))}function Au(e){var t=(new Map).set("newStatus",e.h.abr.enabled);Pu(e,Ys(Fu,t))}function Eu(e,t){if(e.l!=hl){var n=Ys(Xu,(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function ku(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(Ys(t,n))}function Iu(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 Ge(2,3,3016,t,n,e.g.error.message)}function Mu(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&&!yl.includes(c)}s!=a.allowedByKeySystem&&(r=!0)}}r&&gu(e),(i=e.j.l)&&!i.allowedByKeySystem&&mu(e),r&&wu(e)}}function Cu(e,t,n){e.J&&e.J.onExpirationUpdated&&e.J.onExpirationUpdated(t,n),t=Ys(Wu),e.dispatchEvent(t)}function Ru(e,t,n){0<t&&(e.T()||e.ze(t)),n<(t=e.getDuration())&&(e.T()||e.Ka(n))}function Du(e,t){var n=e.o?e.o.Gc():{},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 f=(d=l(d)).next();!f.done;f=d.next())if((f=f.value).keyIds.size)for(var h=(f=l(f.keyIds)).next();!h.done;h=f.next()){h=h.value;var p=n[i?"00":h];p?yl.includes(p)&&s.add(p):o.add(h)}c.allowedByApplication?c.allowedByKeySystem&&(r=!0):a=!0}if(!r)throw new Ge(2,4,4012,n={hasAppRestrictions:a,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)})}function Nu(e){if(!e.variants.some(Pn))throw new Ge(2,4,4032)}function Pu(e,t){P((function(n){if(1==n.g)return w(n,Promise.resolve(),2);e.l!=hl&&e.dispatchEvent(t),T(n)}))}function Lu(e){for(var t=new Set,n=(e=l(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(Wt(n.language)):t.add("und");return t}function ju(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=Wt(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 _u(){return new Ge(2,7,7e3)}function Ou(e,t,n,i,r,a){return i==e&&r.F==a.F&&r.uri==a.uri&&r.mimeType==a.mimeType?t:n}function Uu(){return{F:null,mimeType:null,startTime:null,Sd:NaN,uri:null}}function Bu(e){return new Promise((function(t,n){e.mb=function(){return n(_u())},e.Mc=function(){return t()},e.onError=function(e){return n(e)},e.Oc=function(){return n(_u())}}))}V("shaka.util.CmcdManager.StreamingFormat",{jg:"d",qg:"h",Ag:"s",wg:"o"}),V("shaka.util.ConfigUtils",_s),_s.convertToConfigObject=Us,_s.mergeConfigObjects=Os,V("shaka.util.PlayerConfiguration",Bs),Bs.mergeConfigObjects=Vs,m(Ws,pi),(i=Ws.prototype).destroy=function(){var e,t=this;return P((function(n){switch(n.g){case 1:return t.l==hl?n.return():(t.l=hl,e=us(t.Ga,(function(){return{node:t.V,payload:Uu(),ib:!1}})),w(n,new Promise((function(t){e.Jb=function(){},e.Mc=function(){t()},e.mb=function(){t()},e.onError=function(){t()},e.Oc=function(){t()}})),2));case 2:return w(n,t.Ga.destroy(),3);case 3:if(t.m&&(t.m.release(),t.m=null),t.kd=null,t.s=null,t.h=null,t.u=null,t.xc=null,t.X=null,!t.G){n.A(4);break}return w(n,t.G.destroy(),5);case 5:t.G=null;case 4:pi.prototype.release.call(t),T(n)}}))},i.Xb=function(e,t){if(t=void 0===t||t,this.l==hl)return Promise.reject(_u());var n=Uu();n.F=e,an()||(t=!1);var i=t?this.xb:this.$,r=us(this.Ga,(function(){return{node:i,payload:n,ib:!1}}));return r.Jb=function(){},Bu(r)},i.detach=function(){var e=this;if(this.l==hl)return Promise.reject(_u());var t=us(this.Ga,(function(){return{node:e.V,payload:Uu(),ib:!1}}));return t.Jb=function(){},Bu(t)},i.Vd=function(e){var t=this;if(e=void 0===e||e,this.l==hl)return Promise.reject(_u());an()||(e=!1);var n=Uu(),i=us(this.Ga,(function(i){var r=i.F&&e?t.xb:i.F?t.$:t.V;return n.F=i.F,{node:r,payload:n,ib:!1}}));return i.Jb=function(){},Bu(i)},i.eg=function(e){this.Wb=e},i.load=function(e,t,n){var i=this;if(this.Wb=null,this.l==hl)return Promise.reject(_u());this.dispatchEvent(Ys($u));var r=Uu();
2r.uri=e,r.Sd=Date.now()/1e3,n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var a=function(e,t){if(!an())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n=fr(i),n=Tl[n]),n){if(""==(t.F||dn()).canPlayType(n))return!1;if(!an()||!(n in hr)&&!(fr(i)in pr)||e.h.streaming.preferNativeHls)return!0;if(un())return e.h.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.zb:this.fa,o=us(this.Ga,(function(e){return null==e.F?null:(r.F=e.F,{node:a,payload:r,ib:!0})}));return this.u=new Xs,this.X=function(e){return new ws({getBandwidthEstimate:function(){return e.s?e.s.getBandwidthEstimate():NaN},Za:function(){return e.Za()},Xe:function(){return e.g?e.g.currentTime:0},hb:function(){return e.hb()},Hc:function(){return e.Hc()},T:function(){return e.T()}},e.h.cmcd)}(this),o.Jb=function(){},new Promise((function(e,t){o.Oc=function(){return t(new Ge(2,7,7002))},o.Mc=function(){e(),i.dispatchEvent(Ys(Yu))},o.mb=function(){return t(_u())},o.onError=function(e){return t(e)}}))},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=Us(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Le("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=Vs(this.h,e,lu(this));return nu(this),n},i.getConfiguration=function(){var e=lu(this);return Vs(e,this.h,lu(this)),e},i.Ve=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.kc().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},i.Qf=function(){for(var e in this.h)delete this.h[e];Vs(this.h,lu(this),lu(this)),nu(this)},i.bf=function(){return this.l},i.ff=function(){return this.g},i.bc=function(){return this.G},i.ld=function(){return this.Ub},i.he=function(){return this.C?this.C:null},i.T=function(){return this.i?this.i.presentationTimeline.T():!(!this.g||!this.g.src)&&1/0==this.g.duration},i.kb=function(){return!!this.i&&this.i.presentationTimeline.kb()},i.xf=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.kc=function(){if(this.i){var e=this.i.presentationTimeline;return{start:e.Eb(),end:e.Pa()}}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.vf=function(){this.T()&&(this.g.currentTime=this.kc().end)},i.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},i.drmInfo=function(){return this.o?this.o.g:null},i.ac=function(){return this.o?this.o.ac():1/0},i.Gc=function(){return this.o?this.o.Gc():{}},i.od=function(){return!!this.L&&this.L.g==ni},i.Hc=function(){return this.g?this.H?this.H.i:1:0},i.$f=function(e){0==e?X("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(e),this.l==gl&&(this.s.playbackRateChanged(e),zo(this.j,1<Math.abs(e))))},i.Me=function(){var e=this.H.Fc();this.l==ml&&this.H.set(e),this.l==gl&&(this.H.set(e),this.s.playbackRateChanged(e),zo(this.j,!1))},i.hb=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(Pn(r=r.value)){var a=kn(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 Dn(e)})):[]},i.gb=function(){if(this.i){for(var e=this.j?this.j.o:null,t=[],n=l(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=In(i=i.value);r.active=i==e,t.push(r)}return t}return this.g&&this.g.src&&this.g.textTracks?iu(this).map((function(e){return Rn(e)})):[]},i.$e=function(){return this.i?this.i.imageStreams.map((function(e){return Mn(e)})):[]},i.qf=function(e,t){var n,i,r,a,o,s,u,l,c,d,f,h,p,g,m,v,y,b,T=this;return P((function(x){return 1==x.g?T.i?(n=T.i.imageStreams.find((function(t){return t.id==e})))?n.segmentIndex?x.A(3):w(x,n.createSegmentIndex(),3):x.return(null):x.A(2):2!=x.g?null==(i=n.segmentIndex.find(t))?x.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,f=u/c,h=l*c,p=r.l-r.startTime,g=r.i||p/h,m=r.startTime,y=v=0,1<h&&(b=Math.floor((t-r.startTime)/g),m=r.startTime+b*g,v=b%l*d,y=Math.floor(b/l)*f),x.return({imageHeight:u,imageWidth:s,height:f,positionX:v,positionY:y,startTime:m,duration:g,uris:r.ya(),width:d})):x.return(null)):x.return(null)}))},i.ve=function(e){if(this.i&&this.j){var t=this.i.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.j.o&&(zs(this.u.h,t,!1),Wo(this.j,t),xu(this),this.wb=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=l(t=iu(this))).next();!n.done;n=t.next())Cn(n=n.value)==e.id?n.mode=this.pa?"showing":"hidden":n.mode="disabled";xu(this)}},i.we=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.h.abr.enabled&&X("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&&Pn(i)&&(vu(this,i,!1,t,n),this.vb=new Qn(i),gu(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(Cn(n=n.value)==e.id){yu(this,n);break}},i.Ue=function(){return ju(this.hb())},i.pf=function(){return ju(this.gb())},i.Te=function(){return Array.from(Lu(this.hb()))},i.nf=function(){return Array.from(Lu(this.gb()))},i.Ld=function(e,t){if(this.i&&this.D){this.vb=new Zn(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.vb.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=kn(a),this.we(n,!0)):mu(this)}else if(this.g&&this.g.audioTracks){for(r=Array.from(this.g.audioTracks),n=Wt(e),a=i=null,o=(r=l(r)).next();!o.done;o=r.next()){var s=Dn(o=o.value);Wt(s.language)==n&&(i=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?yu(this,a):i&&yu(this,i)}},i.Md=function(e,t,n){if(n=void 0!==n&&n,this.i&&this.D)this.wb=e,this.Ob=t||"",this.Vb=n,(e=jn(this.i.textStreams,this.wb,this.Ob,this.Vb)[0]||null)&&e!=this.j.o&&(zs(this.u.h,e,!1),this.h.streaming.alwaysStreamText||this.pd())&&(Wo(this.j,e),xu(this));else{var i=Wt(e);(e=this.gb().find((function(e){return Wt(e.language)==i&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.ve(e)}},i.Sf=function(e){if(this.i&&this.D){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.vb=new Zn(t.language,"",0,e),mu(this))}},i.pd=function(){var e=this.pa;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?iu(this).some((function(e){return"showing"==e.mode})):e},i.ie=function(){return this.g&&this.g.src&&this.g.textTracks?ru(this).map((function(e){return Rn(e)})):[]},i.We=function(e){var t=Wt(e),n=ru(this).filter((function(e){return Wt(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.Yf=function(e){if(e=!!e,this.pa!=e){if(this.pa=e,this.l==gl)this.N.l.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.o||0<(e=jn(this.i.textStreams,this.wb,this.Ob,this.Vb)).length&&(Wo(this.j,e[0]),xu(this)):function(e){var t=e.i.get(dt);t&&(rs(t),as(t).catch((function(){})),e.i.delete(dt)),e.o=null}(this.j));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=iu(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");Su(this)}},i.jf=function(){if(!this.T())return null;var e=this.Ga.l,t=0;if(this.D)t=this.D.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.je=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.Za=function(){if(this.l==gl)return this.N.Za();var e={total:[],audio:[],video:[],text:[]};return this.l==ml&&(e.total=Ka(this.g.buffered)),e},i.getStats=function(){if(this.l!=gl&&this.l!=ml)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:[]};pu(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.u;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),n=this.u,t=Number(e.totalVideoFrames),n.L=Number(e.droppedVideoFrames),n.J=t,this.u.H=Number(e.corruptedVideoFrames)),this.o?e=(e=this.o).J?e.J:NaN:e=NaN,this.u.m=e,this.l==gl&&((e=this.j.l)&&(this.u.s=(this.H?this.H.i:1)*e.bandwidth),e&&e.video&&(n=this.u,t=e.video.height||NaN,n.N=e.video.width||NaN,n.u=t),this.T()&&(e=this.je().valueOf()+1e3*this.kc().end,this.u.C=(Date.now()-e)/1e3),this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g),e=this.s.getBandwidthEstimate(),this.u.o=e);var i=this.u;e=i.N,n=i.u,t=i.s;for(var r=i.J,a=i.L,o=i.H,s=i.o,u=i.i,c=i.l,d=i.D,f=i.j,h=qs(i.g,"playing"),p=qs(i.g,"paused"),g=qs(i.g,"buffering"),m=i.m,v=i.C,y=i.G,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),w=[],T=(i=l(i.h.g)).next();!T.done;T=i.next())T=T.value,w.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:f,playTime:h,pauseTime:p,bufferingTime:g,licenseTime:m,liveLatency:v,maxSegmentDuration:y,stateHistory:b,switchHistory:w}},i.addTextTrack=function(e,t,n,i,r,a,o){if(o=void 0!==o&&o,Le("addTextTrack","Please use an addTextTrackAsync."),this.l!=gl&&this.l!=ml)throw new Ge(1,7,7004);if(!i){var s=fr(e);if(!(i=xl[s]))throw new Ge(1,2,2011,s)}if(this.l==ml){if("text/vtt"!=i)throw new Ge(1,2,2013,i);if(o&&(n="forced"),(i=document.createElement("track")).src=xs(this.X,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.gb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return wu(this),e;throw new Ge(1,2,2012)}if(1/0==(s=this.i.presentationTimeline.getDuration()))throw new Ge(1,4,4033);if(!Bt(Lt((e={id:this.wd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ro(0,s,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:dt,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}).mimeType,e.codecs)))throw new Ge(2,2,2014,i);return this.i.textStreams.push(e),wu(this),In(e)},i.Ie=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,f,h,p,g,m,v=this;return P((function(y){switch(y.g){case 1:if(v.l!=gl&&v.l!=ml)throw new Ge(1,7,7004);if(i){y.A(2);break}return w(y,au(v,e),3);case 3:i=y.h;case 2:if(s=[],v.C)try{s=v.C.getServerSideCuePoints()}catch(e){}if(v.l!=ml){y.A(4);break}return o&&(n="forced"),w(y,ou(v,e,t,n,i,a||"",s),5);case 5:if(u=v.gb(),l=u.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return wu(v),y.return(l);throw new Ge(1,2,2012);case 4:if(c=ft,1/0==(d=v.i.presentationTimeline.getDuration()))throw new Ge(1,4,4033);if(!s.length){y.A(6);break}return w(y,su(v,e,v.G,v.h.streaming.retryParameters),7);case 7:f=y.h,h=uu(v,f,i,s),p=new Blob([h],{type:"text/vtt"}),e=io(p),i="text/vtt";case 6:if(g={id:v.wd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ro(0,d,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:c.Y,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},m=Lt(g.mimeType,g.codecs),!Bt(m))throw new Ge(2,2,2014,i);return v.i.textStreams.push(g),wu(v),y.return(In(g))}}))},i.He=function(e,t,n){var i,r,a,o,s,u,c,d=this;return P((function(f){switch(f.g){case 1:if(d.l!=gl&&d.l!=ml)throw new Ge(1,7,7004);if(n){f.A(2);break}return w(f,au(d,e),3);case 3:n=f.h;case 2:if(i=[],d.C)try{i=d.C.getServerSideCuePoints()}catch(e){}return w(f,ou(d,e,t,"chapters",n,"",i),4);case 4:if(r=d.ie(),a=r.find((function(e){return e.language==t}
2))){for(o=ru(d),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,Qs(d,c);return f.return(a)}throw new Ge(1,2,2012)}}))},i.Pd=function(e,t){this.sd.width=e,this.sd.height=t},i.Jd=function(){if(this.l==gl){var e=this.j;if(e.j.g)e=!1;else if(e.s)e=!1;else{for(var t=l(e.i.values()),n=t.next();!n.done;n=t.next())(n=n.value).ec&&(n.ec=!1,is(e,n,.1));e=!0}}else e=!1;return e},i.cf=function(){return X("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},i.df=function(){return this.Dc},i.Ae=function(e){this.xc=e},V("shaka.Player",Ws),Ws.prototype.setVideoContainer=Ws.prototype.Ae,Ws.prototype.getManifestParserFactory=Ws.prototype.df,Ws.prototype.getManifest=Ws.prototype.cf,Ws.prototype.retryStreaming=Ws.prototype.Jd,Ws.prototype.setMaxHardwareResolution=Ws.prototype.Pd,Ws.prototype.addChaptersTrack=Ws.prototype.He,Ws.prototype.addTextTrackAsync=Ws.prototype.Ie,Ws.prototype.addTextTrack=Ws.prototype.addTextTrack,Ws.prototype.getStats=Ws.prototype.getStats,Ws.prototype.getBufferedInfo=Ws.prototype.Za,Ws.prototype.getPresentationStartTimeAsDate=Ws.prototype.je,Ws.prototype.getPlayheadTimeAsDate=Ws.prototype.jf,Ws.prototype.setTextTrackVisibility=Ws.prototype.Yf,Ws.prototype.getChapters=Ws.prototype.We,Ws.prototype.getChaptersTracks=Ws.prototype.ie,Ws.prototype.isTextTrackVisible=Ws.prototype.pd,Ws.prototype.selectVariantsByLabel=Ws.prototype.Sf,Ws.prototype.selectTextLanguage=Ws.prototype.Md,Ws.prototype.selectAudioLanguage=Ws.prototype.Ld,Ws.prototype.getTextLanguages=Ws.prototype.nf,Ws.prototype.getAudioLanguages=Ws.prototype.Te,Ws.prototype.getTextLanguagesAndRoles=Ws.prototype.pf,Ws.prototype.getAudioLanguagesAndRoles=Ws.prototype.Ue,Ws.prototype.selectVariantTrack=Ws.prototype.we,Ws.prototype.selectTextTrack=Ws.prototype.ve,Ws.prototype.getThumbnails=Ws.prototype.qf,Ws.prototype.getImageTracks=Ws.prototype.$e,Ws.prototype.getTextTracks=Ws.prototype.gb,Ws.prototype.getVariantTracks=Ws.prototype.hb,Ws.prototype.cancelTrickPlay=Ws.prototype.Me,Ws.prototype.trickPlay=Ws.prototype.$f,Ws.prototype.getPlaybackRate=Ws.prototype.Hc,Ws.prototype.isBuffering=Ws.prototype.od,Ws.prototype.getKeyStatuses=Ws.prototype.Gc,Ws.prototype.getExpiration=Ws.prototype.ac,Ws.prototype.drmInfo=Ws.prototype.drmInfo,Ws.prototype.keySystem=Ws.prototype.keySystem,Ws.prototype.goToLive=Ws.prototype.vf,Ws.prototype.seekRange=Ws.prototype.kc,Ws.prototype.isAudioOnly=Ws.prototype.xf,Ws.prototype.isInProgress=Ws.prototype.kb,Ws.prototype.isLive=Ws.prototype.T,Ws.prototype.getAdManager=Ws.prototype.he,Ws.prototype.getAssetUri=Ws.prototype.ld,Ws.prototype.getNetworkingEngine=Ws.prototype.bc,Ws.prototype.getMediaElement=Ws.prototype.ff,Ws.prototype.getLoadMode=Ws.prototype.bf,Ws.prototype.resetConfiguration=Ws.prototype.Qf,Ws.prototype.getBufferFullness=Ws.prototype.Ve,Ws.prototype.getConfiguration=Ws.prototype.getConfiguration,Ws.prototype.configure=Ws.prototype.configure,Ws.prototype.load=Ws.prototype.load,Ws.prototype.updateStartTime=Ws.prototype.eg,Ws.prototype.unload=Ws.prototype.Vd,Ws.prototype.detach=Ws.prototype.detach,Ws.prototype.attach=Ws.prototype.Xb,Ws.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,P((function(o){if(1==o.g)return t={},e?w(o,function(){var e,t,n,i,r,a;return P((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 P((function(o){switch(o.g){case 1:if(x(o,2),"org.w3.clearkey"===e&&ln())throw Error("Unsupported keySystem");return w(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),cn("Tizen 3")&&(a=!1),i.set(e,{persistentState:a}),w(o,t.createMediaKeys(),5);case 5:A(o,0);break;case 2:E(o),i.set(e,null),T(o)}}))},a=e.map((function(e){return r(e)})),w(o,Promise.all(a),2)):o.return(Oi(i))}))}(),3):o.A(2);2!=o.g&&(t=o.h);var s={};if(an()){for(var u in hr)s[u]=!0;for(var d in pr)s[d]=!0}
2u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var f=(d=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!f.done;f=d.next())s[f=f.value]=an()?!!hr[f]:on(f);for(var h in u)s[h]=an()?!!pr[h]:on(u[h]);for(n=s,s={},u=(h=l(h='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(ao)))).next();!u.done;u=h.next())s[u=u.value]=an()?!!Bt(u)||(MediaSource.isTypeSupported(u)||Dt(u)):on(u),s[d=u.split(";")[0]]=s[d]||s[u];for(a in i={manifest:n,media:s,drm:t},r=bl)i[a]=r[a]();return o.return(i)}))},Ws.isBrowserSupported=function(){if(e.Promise||X("A Promise implementation or polyfill is required"),e.TextDecoder&&e.TextEncoder||X("A TextDecoder/TextEncoder implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&e.TextDecoder&&e.TextEncoder&&Array.prototype.forEach)||cn("Trident/"))return!1;var t=ln();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!an()||on("application/x-mpegurl"))},Ws.setAdManagerFactory=function(e){wl=e},Ws.registerSupportPlugin=function(e,t){bl[e]=t},Ws.prototype.destroy=Ws.prototype.destroy;var Fu="abrstatuschanged",Vu="adaptation",Ku="buffering",Hu="downloadfailed",qu="downloadheadersreceived",Gu="drmsessionupdate",zu="emsg",Xu="error",Wu="expirationupdated",Yu="loaded",$u="loading",Ju="manifestparsed",Qu="mediaqualitychanged",Zu="metadata",el="onstatechange",tl="onstateidle",nl="ratechange",il="streaming",rl="textchanged",al="texttrackvisibility",ol="timelineregionadded",sl="timelineregionenter",ul="timelineregionexit",ll="trackschanged",cl="unloading",dl="variantchanged",fl={gg:Fu,hg:Vu,ig:Ku,kg:Hu,lg:qu,mg:Gu,og:zu,Error:Xu,pg:Wu,rg:"largegap",sg:Yu,tg:$u,ug:Ju,vg:Qu,Metadata:Zu,xg:el,yg:tl,zg:nl,Bg:"sessiondata",Cg:il,Dg:rl,Eg:al,Fg:ol,Gg:sl,Hg:ul,Ig:ll,Jg:cl,Kg:dl},hl=0,pl=1,gl=2,ml=3;Ws.LoadMode={DESTROYED:hl,NOT_LOADED:pl,MEDIA_SOURCE:gl,SRC_EQUALS:ml},Ws.version="v3.1.6-master-18-gd6bdf9a4";var vl=["3","1"];Oe=new function(e){this.g=e,this.i=je,this.h=_e}(new Pe(Number(vl[0]),Number(vl[1])));var yl=["output-restricted","internal-error"],bl={},wl=null,Tl={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"},xl={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 Sl(){this.h=[],this.j=this.i=this.g=0}function Al(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 Ri,this.j.B(this.g,google.ima.AdEvent.Type.PAUSED,(function(){i.i=!0})),this.j.B(this.g,google.ima.AdEvent.Type.RESUMED,(function(){i.i=!1}))}function El(t,n,i,r){var a=this;this.o=t,this.i=n,this.s=null,this.u=NaN,this.j=r,this.m=null,this.h=new Ri,google.ima.settings.setLocale(i),(t=new google.ima.AdDisplayContainer(this.o,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.ta(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){t.j(new fi("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.u))),t.g=n.getAdsManager(t.i),t.j(new fi("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 fi("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 fi(n,i))}e.h.B(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){kl(e,t)})),e.h.B(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Ml(e,t)})),e.h.B(e.g,google.ima.AdEvent.Type.STARTED,(function(t){Ml(e,t)})),e.h.B(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.B(e.g,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.B(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.B(e.g,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")}
2)),e.h.B(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Cl(e,t)})),e.h.B(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Cl(e,t)})),e.h.B(e.g,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.B(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.B(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.B(e.g,google.ima.AdEvent.Type.PAUSED,(function(n){e.m.i=!0,t(n,"ad-paused")})),e.h.B(e.g,google.ima.AdEvent.Type.RESUMED,(function(n){e.m.i=!1,t(n,"ad-resumed")})),e.h.B(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(e){t(e,"ad-skip-state-changed")})),e.h.B(e.g,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.B(e.g,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.B(e.g,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.B(e.g,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.B(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.B(e.g,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.B(e.g,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.B(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.B(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.B(e.g,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.B(e.g,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.B(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.B(e.g,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,Il(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.B(t.i,"loadeddata",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Il(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e&&(t.s=new ResizeObserver((function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Il(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.s.observe(t.i)),t.g.start()}catch(e){Cl(t,null)}}(a,t)})),this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){kl(a,e)})),this.i.onended=function(){a.l.contentComplete()}}function kl(e,t){t.getError(),Cl(e,null),e.j(new fi("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Il(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function Ml(e,t){var n=t.getAd();e.m=new Al(n,e.g,e.i),n=(new Map).set("ad",e.m).set("sdkAdObject",n).set("originalEvent",t),e.j(new fi("ad-started",n)),e.m.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause())}function Cl(e,t){e.j(new fi("ad-stopped",(new Map).set("originalEvent",t))),e.m.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.play())}function Rl(e,t){this.i=e,this.h=null,this.g=t}function Dl(e,t,n,i){var r=this;this.s=e,this.l=t,this.j=null,this.H=NaN,this.i=i,this.G=!1,this.u=this.m=this.o=null,this.C="",this.D=[],this.h=new Ri,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new fi("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.i(new fi("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.H)));var n=t.getStreamData().url;e.j.resolve(n),e.j=null,e.G||e.h.B(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.o=t,e.l.currentTime=n.start)}}))}(r,e)})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){r.C.length?r.j.resolve(r.C):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),r.m=new Rl(e,r.l),r.u&&(r.m.h=r.u),r.i(new fi("ad-started",(new Map).set("ad",r.m))),r.s.setAttribute("ad-active","true")})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){r.s.removeAttribute("ad-active");var e=r.l.currentTime;r.o&&r.o>e&&(r.l.currentTime=r.o,r.o=null)})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){r.u=e.getStreamData().adProgressData,r.m&&(r.m.h=r.u)})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){r.i(new fi("ad-first-quartile"))})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){r.i(new fi("ad-mi
2dpoint"))})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){r.i(new fi("ad-third-quartile"))})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){r.i(new fi("ad-complete")),r.i(new fi("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null})),this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){r.i(new fi("ad-skipped")),r.i(new fi("ad-stopped"))})),this.h.B(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.D=e,r.i(new fi("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function Nl(){pi.call(this),this.g=this.i=null,this.h=new Sl,this.j=navigator.language}function Pl(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof fi){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(Ka(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 Ll(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=Al.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},V("shaka.ads.ClientSideAd",Al),Al.prototype.release=Al.prototype.release,Al.prototype.getPositionInSequence=Al.prototype.getPositionInSequence,Al.prototype.getSequenceLength=Al.prototype.getSequenceLength,Al.prototype.setMuted=Al.prototype.setMuted,Al.prototype.resize=Al.prototype.resize,Al.prototype.isLinear=Al.prototype.isLinear,Al.prototype.isMuted=Al.prototype.isMuted,Al.prototype.setVolume=Al.prototype.setVolume,Al.prototype.getVolume=Al.prototype.getVolume,Al.prototype.play=Al.prototype.play,Al.prototype.pause=Al.prototype.pause,Al.prototype.skip=Al.prototype.skip,Al.prototype.canSkipNow=Al.prototype.canSkipNow,Al.prototype.getTimeUntilSkippable=Al.prototype.getTimeUntilSkippable,Al.prototype.isSkippable=Al.prototype.isSkippable,Al.prototype.isPaused=Al.prototype.isPaused,Al.prototype.getRemainingTime=Al.prototype.getRemainingTime,Al.prototype.getMinSuggestedDuration=Al.prototype.getMinSuggestedDuration,Al.prototype.getDuration=Al.prototype.getDuration,El.prototype.stop=function(){this.g&&this.g.stop(),this.o&&ps(this.o)},El.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy()},(i=Rl.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},V("shaka.ads.ServerSideAd",Rl),Rl.prototype.release=Rl.prototype.release,Rl.prototype.getPositionInSequence=Rl.prototype.getPositionInSequence,Rl.prototype.getSequenceLength=Rl.prototype.getSequenceLength,Rl.prototype.setMuted=Rl.prototype.setMuted,Rl.prototype.resize=Rl.prototype.resize,Rl.prototype.isLinear=Rl.prototype.isLinear,Rl.prototype.isMuted=Rl.prototype.isMuted,Rl.prototype.setVolume=Rl.prototype.setVolume,Rl.prototype.getVolume=Rl.prototype.getVolume,Rl.prototype.play=Rl.prototype.play,Rl.prototype.pause=Rl.prototype.pause,Rl.prototype.skip=Rl.prototype.skip,Rl.prototype.canSkipNow=Rl.prototype.canSkipNow,Rl.prototype.getTimeUntilSkippable=Rl.prototype.getTimeUntilSkippable,Rl.prototype.isSkippable=Rl.prototype.isSkippable,Rl.prototype.isPaused=Rl.prototype.isPaused,Rl.prototype.getRemainingTime=Rl.prototype.getRemainingTime,Rl.prototype.getMinSuggestedDuration=Rl.prototype.getMinSuggestedDuration,Rl.prototype.getDuration=Rl.prototype.getDuration,Dl.prototype.stop=function(){this.C="",this.o=null,this.D=[]},Dl.prototype.release=function(){this.stop(),this.h&&this.h.release()},Dl.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},m(Nl,pi),(i=Nl.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 Ge(2,10,1e4);this.i&&this.i.release(),this.i=new El(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),pi.prototype.release.call(this)},i.onAssetUnload=function(){this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new fi("ad-stopped")),this.h=new Sl},i.requestClientSideAds=function(e){if(!this.i)throw new Ge(1,10,10001);var t=this.i;t.u=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 Ge(2,10,10002);this.g&&this.g.release(),this.g=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.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new Ge(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;(n.mpt||n.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be 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 Ge(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new pt,n.g.requestStream(e),n.C=i||"",n.H=Date.now()/1e3,n=n.j),n},i.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new Ge(1,10,10003);(e.mpt||e.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be 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 Ge(1,10,10003);return this.g.D},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)},V("shaka.ads.AdManager",Nl),Nl.prototype.onCueMetadataChange=Nl.prototype.onCueMetadataChange,Nl.prototype.onHlsTimedMetadata=Nl.prototype.onHlsTimedMetadata,Nl.prototype.onDashTimedMetadata=Nl.prototype.onDashTimedMetadata,Nl.prototype.getStats=Nl.prototype.getStats,Nl.prototype.getServerSideCuePoints=Nl.prototype.getServerSideCuePoints,Nl.prototype.replaceServerSideAdTagParameters=Nl.prototype.replaceServerSideAdTagParameters,Nl.prototype.requestServerSideStream=Nl.prototype.requestServerSideStream,Nl.prototype.initServerSide=Nl.prototype.initServerSide,Nl.prototype.requestClientSideAds=Nl.prototype.requestClientSideAds,Nl.prototype.onAssetUnload=Nl.prototype.onAssetUnload,Nl.prototype.release=Nl.prototype.release,Nl.prototype.initClientSide=Nl.prototype.initClientSide,Nl.prototype.setLocale=Nl.prototype.setLocale,Nl.ADS_LOADED="ads-loaded",Nl.AD_STARTED="ad-started",Nl.AD_FIRST_QUARTILE="ad-first-quartile",Nl.AD_MI
2DPOINT="ad-midpoint",Nl.AD_THIRD_QUARTILE="ad-third-quartile",Nl.AD_COMPLETE="ad-complete",Nl.AD_STOPPED="ad-stopped",Nl.AD_SKIPPED="ad-skipped",Nl.AD_VOLUME_CHANGED="ad-volume-changed",Nl.AD_MUTED="ad-muted",Nl.AD_PAUSED="ad-paused",Nl.AD_RESUMED="ad-resumed",Nl.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Nl.CUEPOINTS_CHANGED="ad-cue-points-changed",Nl.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Nl.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Nl.AD_CLICKED="ad-clicked",Nl.AD_PROGRESS="ad-progress",Nl.AD_BUFFERING="ad-buffering",Nl.AD_IMPRESSION="ad-impression",Nl.AD_DURATION_CHANGED="ad-duration-changed",Nl.AD_CLOSED="ad-closed",Nl.AD_LOADED="ad-loaded",Nl.ALL_ADS_COMPLETED="all-ads-completed",Nl.AD_LINEAR_CHANGED="ad-linear-changed",Nl.AD_METADATA="ad-metadata",Nl.AD_RECOVERABLE_ERROR="ad-recoverable-error",Nl.AD_BREAK_READY="ad-break-ready",Nl.AD_INTERACTION="ad-interaction",wl=function(){return new Nl};var jl="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),_l="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ol=["loop","playbackRate"],Ul=["pause","play"],Bl={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},Fl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Vl=[["getConfiguration","configure"]],Kl=[["isTextTrackVisible","setTextTrackVisibility"]],Hl="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),ql=["attach","detach","load","unload"];function Gl(e,t,n,i,r,a){var o=this;this.H=e,this.j=new rn(t),this.V=n,this.u=!1,this.s=i,this.G=r,this.L=a,this.h=this.m=!1,this.N="",this.o=null,this.C=function(){return $l
2(o)},this.D=function(e,t){var n=Ll(t);switch(n.type){case"event":var i=n.targetName;n=hi(n.event),o.s(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.u&&(o.V(),o.u=!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 Ge(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},this.g={video:{},player:{}},this.J=0,this.i={},this.l=null,nc.add(this)}function zl(e,t,n){tc=n,n.addUpdateListener(e.C),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),$l(e),Ql(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function Xl(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 Ge(2,8,n,t))}function Wl(e,t){var n=e.L();e.l=new pt,e.u=!0,zl(e,n,t)}function Yl(e){var t=tc;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function $l(e){var t=!!tc&&"connected"==tc.status;if(e.h&&!t){for(var n in e.G(),e.g)e.g[n]={};Jl(e)}e.h=t,e.N=t?tc.receiver.friendlyName:"",e.j.Nb()}function Jl(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new Ge(1,7,7e3))}}function Ql(e,t){var n=Pl(t),i=tc;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),Y)}catch(t){throw n=new Ge(2,8,8005,t),i=new fi("error",(new Map).set("detail",n)),e.s("player",i),e.Bb(),n}}(i=Gl.prototype).destroy=function(){return nc.delete(this),Jl(this),tc&&Yl(this),this.j&&(this.j.stop(),this.j=null),this.G=this.s=null,this.h=this.m=!1,this.D=this.C=this.l=this.i=this.g=this.o=null,Promise.resolve()},i.sa=function(){return this.h},i.Hd=function(){return this.N},i.init=function(){if(this.H.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Nb();var t=new chrome.cast.SessionRequest(this.H);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(nc),n=t.next();!n.done;n=t.next())Wl(n.value,e)}),(function(e){for(var t=l(nc),n=t.next();!n.done;n=t.next())n=n.value,ec="available"==e,n.j.Nb()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),ec&&this.j.R(Zl),(t=tc)&&t.status!=chrome.cast.SessionStatus.STOPPED?Wl(this,t):tc=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=ic),e.__onGCastApiAvailable!=ic&&X("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},i.Nd=function(e){this.o=e,this.h&&Ql(this,{type:"appData",appData:this.o})},i.cast=function(e){var t=this;return P((function(n){if(!t.m)throw new Ge(1,8,8e3);if(!ec)throw new Ge(1,8,8001);if(t.h)throw new Ge(1,8,8002);return t.l=new pt,chrome.cast.requestSession((function(n){return zl(t,e,n)}),(function(e){return Xl(t,e)})),w(n,t.l,0)}))},i.Bb=function(){if(this.h){if(Jl(this),tc){Yl(this);try{tc.stop((function(){}),(function(){}))}catch(e){}tc=null}$l(this)}},i.get=function(e,t){var n=this;if("video"==e){if(Ul.includes(t))return function(){return n.se.apply(n,[e,t].concat(c(L.apply(0,arguments))))}}else if("player"==e){if(Fl[t]&&!this.get("player","isLive")())return function(){};if(Hl.includes(t))return function(){return n.se.apply(n,[e,t].concat(c(L.apply(0,arguments))))};if(ql.includes(t))return function(){return n.Nf.apply(n,[e,t].concat(c(L.apply(0,arguments))))};if(Bl[t])return function(){return n.g[e][t]}}return this.g[e][t]},i.set=function(e,t,n){this.g[e][t]=n,Ql(this,{type:"set",targetName:e,property:t,value:n})},i.se=function(e,t){Ql(this,{type:"call",targetName:e,methodName:t,args:L.apply(2,arguments)})},i.Nf=function(e,t){var n=L.apply(2,arguments),i=new pt,r=this.J.toString();this.J++,this.i[r]=i;try{Ql(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(e){i.reject(e)}return i};var Zl=.02,ec=!1,tc=null,nc=new Set;function ic(e){if(e)for(var t=(e=l(nc)).next();!t.done;t=e.next())t.value.init()}function rc(e,t,n){pi.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.u=new Map,this.g=new Gl(n,(function(){return sc(i)}),(function(){return uc(i)}),(function(e,t){return dc(i,e,t)}),(function(){return lc(i)}),(function(){return oc(i)})),function(e){e.g.init(),e.m=new Ri;for(var t=l(jl),n=t.next();!n.done;n=t.next())e.m.B(e.i,n.value,(function(t){e.g.sa()||(t=hi(t),e.j.dispatchEvent(t))}));for(var i in fl)e.m.B(e.h,fl[i],(function(t){e.g.sa()||e.o.dispatchEvent(t)}));for(var r in e.l={},t={}
2,e.i)t.Pb=r,Object.defineProperty(e.l,t.Pb,{configurable:!1,enumerable:!0,get:function(t){return function(){return cc(e,t.Pb)}}(t),set:function(t){return function(n){var i=t.Pb;e.g.sa()?e.g.set("video",i,n):e.i[i]=n}}(t)}),t={Pb:t.Pb};e.s={},ac(e,(function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.u.has(t)&&(t=e.u.get(t)),"addEventListener"==t)return function(t,n,i){return e.o.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.o.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.bc()};if("getDrmEngine"==t)return function(){return e.h.o};if("getAdManager"==t)return function(){return e.h.he()};if("setVideoContainer"==t)return function(t){return e.h.Ae(t)};if(e.g.sa()){if("getManifest"==t||"drmInfo"==t)return function(){return X(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return X(t+"() does not work while casting!"),Promise.resolve()}}return e.g.sa()&&0==Object.keys(e.g.g.video).length&&Bl[t]||!e.g.sa()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;ac(e,(function(n,i){if(t.has(i)){var r=t.get(i);n.length<r.length?e.u.set(n,r):e.u.set(r,n)}else t.set(i,n)}))}(e),e.j=new pi,e.j.Cc=e.l,e.o=new pi,e.o.Cc=e.s}(this)}function ac(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 oc(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.ld(),startTime:null};e.i.pause();for(var n=l(Ol),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(Vl)).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(Kl)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function sc(e){var t=new fi("caststatuschanged");e.dispatchEvent(t)}function uc(e){var t=new fi(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function lc(e){for(var t=l(Vl),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.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(Ol)).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(Ol),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=o[n];for(n=(t=l(Kl)).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 fi(Xu,t),e.h.dispatchEvent(t)}))}function cc(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 dc(e,t,n){e.g.sa()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function fc(e,t,n,i){pi.call(this);var r=this;this.g=e,this.h=t,this.j=new Ri,this.J={video:e,player:t},this.D=n||function(){},this.L=i||function(e){return e},this.i=null,this.G=!1,this.o=!0,this.m=0,this.C=!1,this.u=!0,this.s=this.l=null,this.H=new rn((function(){mc(r)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return hc(e)},t.onSenderDisconnected=function(){return hc(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&wc(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),wc(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(t){return function(e,t){var n=Ll(t.data);switch(n.type){case"PLAY":e.g.play(),Tc(e);break;case"PAUSE":e.g.pause(),Tc(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(),Tc(e)):r&&"PLAYBACK_PAUSE"==r&&(e.g.pause(),Tc(e));break;case"STOP":e.h.Vd().then((function(){e.h&&Tc(e)}));break;case"GET_STATUS":yc(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||Tc(e);break;case"LOAD":e.m=0,e.C=!1,e.u=!1,i=n.media,r=n.currentTime,a=e.L(i.contentId),o=n.autoplay||!0,e.D(i.customData),o&&(e.g.autoplay=!0),e.h.load(a,r).then((function(){e.h&&yc(e)})).catch((function(t){var i="LOAD_FAILED";7==t.category&&7e3==t.code&&(i="LOAD_CANCELLED"),wc(e,{requestId:Number(n.requestId),type:i},e.s)}
2));break;default:wc(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=Ll(t.data);switch(n.type){case"init":e.m=0,e.C=!1,e.u=!0,function(e,t,n){var i,r,a,o,s,u,l,c,d,f,h;P((function(p){switch(p.g){case 1:for(i in t.player)r=t.player[i],e.h[i](r);return e.D(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,x(p,5),w(p,e.h.load(t.manifest,t.startTime),7)):w(p,Promise.resolve(),3);case 7:A(p,3);break;case 5:return o=E(p),s=Xu,u=(new Map).set("detail",o),l=new fi(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(f in t.playerAfterLoad)h=t.playerAfterLoad[f],e.h[f](h);e.g.autoplay=a,t.manifest&&(e.g.play(),Tc(e)),T(p)}}))}(e,n.initState,n.appData),mc(e);break;case"appData":e.D(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.J[i][r]=n;break;case"call":(i=e.J[n.targetName])[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,"player"==i&&"load"==r&&(e.m=0,e.C=!1);var o=n.id,s=t.senderId;n=(a=e.J[i])[r].apply(a,n.args),"player"==i&&"load"==r&&(n=n.then((function(){e.u=!0}))),n.then((function(){return bc(e,s,o,null)}),(function(t){return bc(e,s,o,t)}))}}(e,t)},t.start();for(var n=(t=l(jl)).next();!n.done;n=t.next())e.j.B(e.g,n.value,(function(t){return gc(e,"video",t)}));for(var i in fl)e.j.B(e.h,fl[i],(function(t){return gc(e,"player",t)}));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.Pd(3840,2160):e.h.Pd(1920,1080),e.j.B(e.g,"loadeddata",(function(){e.C=!0})),e.j.B(e.h,"loading",(function(){e.o=!1,pc(e)})),e.j.B(e.g,"playing",(function(){e.o=!1,pc(e)})),e.j.B(e.g,"pause",(function(){pc(e)})),e.j.B(e.h,"unloading",(function(){e.o=!0,pc(e)})),e.j.B(e.g,"ended",(function(){new rn((function(){e.g&&e.g.ended&&(e.o=!0,pc(e))})).R(Sc)}))}(this)}function hc(e){e.m=0,e.u=!0,e.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,pc(e)}function pc(e){var t;P((function(n){return 1==n.g?w(n,Promise.resolve(),2):e.h?(t=new fi("caststatuschanged"),e.dispatchEvent(t),vc(e)||Tc(e),void T(n)):n.return()}))}function gc(e,t,n){e.h&&(mc(e),wc(e,{type:"event",targetName:t,event:n},e.l))}function mc(e){e.H.R(xc);for(var t={video:{},player:{}},n=l(_l),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 Fl)0==e.m%Fl[r]&&(t.player[r]=e.h[r]());for(var a in Bl)0==e.m%Bl[a]&&(t.player[a]=e.h[a]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.C&&(e.m+=1),wc(e,{type:"update",update:t},e.l),vc(e)}function vc(e){return!(!e.u||!e.g.duration&&!e.h.T())&&(yc(e),e.u=!1,!0)}function yc(e,t){var n={contentId:e.h.ld(),streamType:e.h.T()?"LIVE":"BUFFERED",contentType:""};e.h.T()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Tc(e,void 0===t?0:t,n)}function bc(e,t,n,i){e.h&&wc(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function wc(e,t,n,i){e.G&&(e=Pl(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Tc(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?Ac:e.h.od()?kc:e.g.paused?Ic:Ec,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),wc(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}m(rc,pi),(i=rc.prototype).destroy=function(e){return e&&this.g.Bb(),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.s=this.l=this.i=null,pi.prototype.release.call(this),Promise.all(e)},i.uf=function(){return this.l},i.hf=function(){return this.s},i.Ke=function(){return this.g.m&&ec},i.sa=function(){return this.g.sa()},i.Hd=function(){return this.g.Hd()},i.cast=function(){var e,t=this;return P((function(n){return 1==n.g?(e=oc(t),w(n,t.g.cast(e),2)):t.h?w(n,t.h.Vd(),0
2):n.return()}))},i.Nd=function(e){this.g.Nd(e)},i.Zf=function(){!function(e){if(e.h){var t=e.L();chrome.cast.requestSession((function(n){return zl(e,t,n)}),(function(t){return Xl(e,t)}))}}(this.g)},i.Bb=function(){this.g.Bb()},i.Ne=function(e){var t=this;return P((function(n){if(1==n.g)return e==t.C?n.return():(t.C=e,t.g.Bb(),w(n,t.g.destroy(),2));t.g=null,t.g=new Gl(e,(function(){return sc(t)}),(function(){return uc(t)}),(function(e,n){return dc(t,e,n)}),(function(){return lc(t)}),(function(){return oc(t)})),t.g.init(),T(n)}))},V("shaka.cast.CastProxy",rc),rc.prototype.changeReceiverId=rc.prototype.Ne,rc.prototype.forceDisconnect=rc.prototype.Bb,rc.prototype.suggestDisconnect=rc.prototype.Zf,rc.prototype.setAppData=rc.prototype.Nd,rc.prototype.cast=rc.prototype.cast,rc.prototype.receiverName=rc.prototype.Hd,rc.prototype.isCasting=rc.prototype.sa,rc.prototype.canCast=rc.prototype.Ke,rc.prototype.getPlayer=rc.prototype.hf,rc.prototype.getVideo=rc.prototype.uf,rc.prototype.destroy=rc.prototype.destroy,m(fc,pi),(i=fc.prototype).isConnected=function(){return this.G},i.yf=function(){return this.o},i.Vf=function(e){this.i=e},i.Qe=function(){this.i=null},i.Wf=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},i.Uf=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},i.Tf=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 P((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.H&&(t.H.stop(),t.H=null),t.g=null,t.J=null,t.D=null,t.G=!1,t.o=!0,t.l=null,t.s=null,pi.prototype.release.call(t),w(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),T(n)}))},V("shaka.cast.CastReceiver",fc),fc.prototype.destroy=fc.prototype.destroy,fc.prototype.setContentArtist=fc.prototype.Tf,fc.prototype.setContentImage=fc.prototype.Uf,fc.prototype.setContentTitle=fc.prototype.Wf,fc.prototype.clearContentMetadata=fc.prototype.Qe,fc.prototype.setContentMetadata=fc.prototype.Vf,fc.prototype.isIdle=fc.prototype.yf,fc.prototype.isConnected=fc.prototype.isConnected;var xc=.5,Sc=5,Ac="IDLE",Ec="PLAYING",kc="BUFFERING",Ic="PAUSED";function Mc(e){var t=this;this.g=[],this.h=[],this.data=[],(new yr).box("moov",br).S("pssh",(function(e){if(!(1<e.version)){var n=Re(e.reader.P,-12,e.size);if(t.data.push(n),t.g.push(Mt(e.reader.$a(16))),0<e.version){n=e.reader.M();for(var i=(n=l(Ae(n))).next();!i.done;i=n.next())i=Mt(e.reader.$a(16)),t.h.push(i)}}})).parse(e)}function Cc(e,t){var n=e.length,i=t.length+16+n,r=new Uint8Array(i),a=De(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 Rc(e,t){var n=Nc(e,t);return 1!=n.length?null:n[0]}function Dc(e,t,n){return 1!=(e=Pc(e,t,n)).length?null:e[0]}function Nc(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName==t}))}function Pc(e,t,n){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))}function Lc(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function jc(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 _c(e){return Array.from(e.childNodes).every(Oc)?e.textContent.trim():null}function Oc(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function Uc(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 Bc(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 Fc(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 Vc(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 Kc(e){return 0==(e=Number(e))%1?e:null}function Hc(e){return 0==(e=Number(e))%1&&0<e?e:null}function qc(e){return 0==(e=Number(e))%1&&0<=e?e:null}function Gc(e){return e=Number(e),isNaN(e)?null:e}function zc(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Xc(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 Wc(e,t){try{return Xc(vt(e),t)}catch(e){return null}}function Yc(e,t,n){var i=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=Jc(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 Ge(2,4,4010);if(t||(a=i.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.ue||(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).ue];if(a){var o;
2if(o=Dc(r.node,"urn:microsoft:playready","pro"))o=[{initData:Cc(o=kt(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=ut(a,r.init||e||o),(a=Zc.get(a))&&(o.licenseServerUri=a(r)),i.push(o)}}return i}(r,a,n),0==e.length&&(e=[ut("",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(ut(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{ce:o,Lg:r,drmInfos:e,ge:!0}}function $c(e){return(e=Dc(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=De(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=Re(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e=kt(e.textContent)).filter((function(e){return e.type===Qc}))[0])&&(e=Xc(e=yt(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 Jc(e){var t=e.getAttribute("schemeIdUri"),n=Lc(e,"urn:mpeg:cenc:2013","default_KID"),i=Pc(e,"urn:mpeg:cenc:2013","pssh").map(_c);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new Ge(2,4,4009);var r=[];try{r=i.map((function(e){return{initDataType:"cenc",initData:kt(e),keyId:null}}))}catch(e){throw new Ge(2,4,4007)}return{node:e,ue:t,keyId:n,init:0<r.length?r:null}}var Qc=1,Zc=(new Map).set("com.widevine.alpha",(function(e){return(e=Dc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",$c).set("com.microsoft.playready.recommendation",$c).set("com.microsoft.playready.software",$c).set("com.microsoft.playready.hardware",$c);function ed(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 td(e,t){var n=nd(e,t,"timescale"),i=1;n&&(i=Hc(n)||1);var r=nd(e,t,"duration");n=Hc(r||""),"image"==e.I.contentType&&(n=Gc(r||"")),n&&(n/=i);var a=nd(e,t,"startNumber");r=Number(nd(e,t,"presentationTimeOffset"))||0;var o=qc(a||"");null!=a&&null!=o||(o=1);var s=id(e,t,"SegmentTimeline");if(a=null,s){a=i;var u=e.U.duration||1/0,c=Nc(s,"S");s=[];for(var d=-r,f=(c=l(Ee(c))).next();!f.done;f=c.next()){var h=(f=f.value).item,p=f.next,g=Uc(h,"t",qc);f=Uc(h,"d",qc);var m=Uc(h,"r",Kc);if(null!=g&&(g-=r),!f)break;if(h=null!=g?g:d,0>(g=m||0))if(p){if(null==(p=Uc(p,"t",qc)))break;if(h>=p)break;g=Math.ceil((p-h)/f)-1}else{if(1/0==u)break;if(h/a>=u)break;g=Math.ceil((u*a-h)/f)-1}for(0<s.length&&h!=d&&(s[s.length-1].end=h/a),g=(p=l(Ae(g+1))).next();!g.done;g=p.next())d=h+f,s.push({start:h/a,end:d/a,cg:h}),h=d}a=s}return{timescale:i,ja:n,Mb:o,Ta:r/i||0,Wd:r,timeline:a}}function nd(e,t,n){return[t(e.I),t(e.ka),t(e.da)].filter(Fe).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function id(e,t,n){return[t(e.I),t(e.ka),t(e.da)].filter(Fe).map((function(e){return Rc(e,n)})).reduce((function(e,t){return e||t}))}function rd(e,t,n,i,r,a){if(a=void 0===a?0:a,Lc(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=Lc(e,"http://www.w3.org/1999/xlink","href"),s=Lc(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 si(new Ge(2,4,4028));if("onLoad"!=s)return si(new Ge(2,4,4027));
2var d=st([i],[o]);return r.request(0,Ti(d,t)).aa((function(i){if(!(i=Wc(i.data,e.tagName)))return si(new Ge(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 rd(e,t,n,d[0],r,a+1)}))}(e,t,n,i,r,a);return n&&(o=o.aa(void 0,(function(){return rd(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"==Lc(u,"http://www.w3.org/1999/xlink","href")?e.removeChild(u):"SegmentTimeline"!=u.tagName&&o.push(rd(u,t,n,i,r,a)));return di(o).aa((function(){return e}))}function ad(e,t,n,i,r,a,o){var s,u=(new yr).S("sidx",(function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.M();if(0==u)throw new Ge(2,3,3005);if(0==o.version)var c=o.reader.M(),d=o.reader.M();else c=o.reader.Lb(),d=o.reader.Lb();o.reader.skip(2);var f=o.reader.Gd();for(e=e+o.size+d,f=l(Ae(f)),d=f.next();!d.done;d=f.next()){var h=o.reader.M();d=(2147483648&h)>>>31,h&=2147483647;var p=o.reader.M();if(o.reader.skip(4),1==d)throw new Ge(2,3,3006);s.push(new so(c/u+n,(c+p)/u+n,(function(){return a}),e,e+h-1,t,n,i,r)),c+=p,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)}));if(e&&u.parse(e),s)return s;throw new Ge(2,3,3004)}function od(e){this.h=De(e),this.g=new gr(this.h,0)}function sd(e){var t=ud(e);if(7<t.length)throw new Ge(2,3,3002);for(var n=0,i=(t=l(t)).next();!i.done;i=t.next())n=256*n+i.value;t=ud(e);e:{for(var r=(i=l(ld)).next();!r.done;r=i.next())if(Ie(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.ba();else{if(8==t.length&&224&t[1])throw new Ge(2,3,3001);i=0;for(var a=(r=l(Ee(t))).next();!a.done;a=r.next()){var o=(a=a.value).item;i=0==a.ca?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.ba(),i=De(e.h,e.g.ba(),t),e.g.skip(t),new cd(n,i)}function ud(e){var t=e.g.ba(),n=e.g.Sa();if(0==n)throw new Ge(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Re(e.h,t,n)}od.prototype.ma=function(){return this.g.ma()};var ld=[[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 cd(e,t){this.id=e,this.g=t}function dd(e){if(8<e.g.byteLength)throw new Ge(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new Ge(2,3,3001);for(var t=0,n=l(Ae(e.g.byteLength)),i=n.next();!i.done;i=n.next())t=256*t+(i=e.g.getUint8(i.value));return t}function fd(e){var t=new od(e.g);if(179!=(e=sd(t)).id)throw new Ge(2,3,3013);if(e=dd(e),183!=(t=sd(t)).id)throw new Ge(2,3,3012);t=new od(t.g);for(var n=0;t.ma();){var i=sd(t);if(241==i.id){n=dd(i);break}}return{dg:e,Mf:n}}function hd(e,t){var n=id(e,t,"Initialization");if(!n)return null;var i=e.I.wa,r=n.getAttribute("sourceURL");r&&(i=st(e.I.wa,[r])),r=0;var a=null;return(n=Uc(n,"range",Vc))&&(r=n.start,a=n.end),new oo((function(){return i}),r,a,bd(e))}function pd(e,t){var n=Number(nd(e,md,"presentationTimeOffset"))||0,i=nd(e,md,"timescale"),r=1;i&&(r=Hc(i)||1);var a=n/r||0,o=hd(e,md);!function(e,t){if(yd(e,t),!vd(e))throw new Ge(2,4,4002)}(e,o);var s=mi(e);return{Cb:function(){var e=id(s,md,"RepresentationIndex"),n=s.I.wa;return e&&(e=e.getAttribute("sourceURL"))&&(n=st(s.I.wa,[e])),e=vd(s),gd(s,t,o,n,e.start,e.end,a)}}}function gd(e,t,n,i,r,a,o){var s,u,l,c,d,f,h,p,g,m,v,y,b,T,x;return P((function(S){if(1==S.g)return s=e.presentationTimeline,u=!e.Xa||!e.U.me,l=e.U.start,c=e.U.duration,d=e.I.mimeType.split("/")[1],h=null,p=[(f=t)(i,r,a),"webm"==d?f(n.ya(),n.Ba,n.la):null],f=null,w(S,Promise.all(p),2);if(g=S.h,m=g[0],v=g[1]||null,null,b=l-o,T=l,x=c?l+c:1/0,"mp4"==d)var A=ad(m,r,i,n,b,T,x);else{if(440786851!=sd(A=new od(v)).id)throw new Ge(2,3,3008);var E=sd(A);if(408125543!=E.id)throw new Ge(2,3,3009);A=E.g.byteOffset,E=new od(E.g);for(var k=null;E.ma();){var I=sd(E);if(357149030==I.id){k=I;break}}if(!k)throw new Ge(2,3,3010);for(k=new od(k.g),I=1e6,E=null;k.ma();){var M=sd(k);if(2807729==M.id)I=dd(M);else if(17545==M.id)if(4==M.g.byteLength)E=M.g.getFloat32(0);else{if(8!=M.g.byteLength)throw new Ge(2,3,3003);E=M.g.getFloat64(0)}}if(null==E)throw new Ge(2,3,3011);if(E*=k=I/1e9,475249515!=(I=sd(new od(m))).id)throw new Ge(2,3,3007);A=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new od(e.g);for(var d=null,f=null;e.ma();){var h=sd(e);if(187==h.id){var p=fd(h);p&&(h=n*p.dg,p=t+p.Mf,null!=d&&c.push(new so(d+o,h+o,l,f,p-1,a,o,s,u)),d=h,f=p)}}return null!=d&&c.push(new so(d+o,i+o,l,f,null,a,o,s,u)),c}(I,A,k,E,i,n,b,T,x)}return y=A,s.Ib(y),h=new Co(y),u&&h.Ya(T,x,!0),S.return(h)}))}function md(e){return e.mc}function vd(e){var t=id(e,md,"RepresentationIndex");return e=Vc((e=nd(e,md,"indexRange"))||""),t&&(e=Uc(t,"range",Vc,e)),e}function yd(e,t){var n=e.I.mimeType.split("/")[1];if(e.I.contentType!=dt&&"mp4"!=n&&"webm"!=n)throw new Ge(2,4,4006);if("webm"==n&&!t)throw new Ge(2,4,4005)}function bd(e){var t=e.I;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.Lc,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function wd(e,t){var n=hd(e,Td),i=function(e){var t=function(e){return[e.I.ab,e.ka.ab,e.da.ab].filter(Fe).map((function(e){return Nc(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.ke&&(e.ke=!0),{Cf:t.getAttribute("media"),start:(t=Uc(t,"mediaRange",Vc,{start:0,end:null})).start,end:t.end}}))}(e);e=td(e,Td);var n=e.Mb;0==n&&(n=1);var i=0;return e.ja?i=e.ja*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{ja:e.ja,startTime:i,Mb:n,Ta:e.Ta,timeline:e.timeline,Fb:t}}(e);if(!i.ja&&!i.timeline&&1<i.Fb.length)throw new Ge(2,4,4002);if(!i.ja&&!e.U.duration&&!i.timeline&&1==i.Fb.length)throw new Ge(2,4,4002);if(i.timeline&&0==i.timeline.length)throw new Ge(2,4,4002);var r=null,a=null;e.da.id&&e.I.id&&(a=t[e.da.id+","+e.I.id])&&(r=a.segmentIndex);var o=function(e,t,n,i,r){var a=i.Fb.length;i.timeline&&i.timeline.length!=i.Fb.length&&(a=Math.min(i.timeline.length,i.Fb.length));for(var o=e-i.Ta,s=t?e+t:1/0,u=[],c=i.startTime,d={},f=(a=l(Ae(a))).next();!f.done;d={$c:d.$c},f=a.next()){f=f.value;var h=i.Fb[f];d.$c=st(n,[h.Cf]);var p=void 0;p=null!=i.ja?c+i.ja:i.timeline?i.timeline[f].end:c+t,u.push(new so(e+c,e+p,function(e){return function(){return e.$c}}(d),h.start,h.end,r,o,e,s)),c=p}return u}(e.U.start,e.U.duration,e.I.wa,i,n);return n=!r,r?r.Hb(o,e.presentationTimeline.Qa()):r=new Co(o),e.presentationTimeline.Ib(o),e.Xa&&e.U.me||r.Ya(e.U.start,e.U.duration?e.U.start+e.U.duration:1/0,n),a&&(a.segmentIndex=r),{Cb:function(){return r&&0!=r.K.length||r.Gb(o),Promise.resolve(r)}}}function Td(e){return e.ab}function xd(e,t,n,i,r,a){var o=function(e){var t=nd(e,Sd,"initialization");if(!t)return null;var n=e.I.id,i=e.bandwidth||null,r=e.I.wa;return new oo((function(){var e=ed(t,n,null,i,null);return st(r,[e])}),0,null,bd(e))}(e),s=function(e){var t=td(e,Sd),n=nd(e,Sd,"media");return e=nd(e,Sd,"index"),{ja:t.ja,timescale:t.timescale,Mb:t.Mb,Ta:t.Ta,Wd:t.Wd,timeline:t.timeline,yd:n,fc:e}}(e);!function(e){var t=e.fc?1:0;if(t+=e.timeline?1:0,t+=e.ja?1:0,0==t)throw new Ge(2,4,4002);
2if(1!=t&&(e.fc&&(e.timeline=null),e.ja=null),!e.fc&&!e.yd)throw new Ge(2,4,4002)}(s);var u=mi(e);if(s.fc)return yd(e,o),{Cb:function(){var e=ed(s.fc,u.I.id,null,u.bandwidth||null,null);return e=st(u.I.wa,[e]),gd(u,t,o,e,0,null,s.Ta)}};if(s.ja)return i||(e.presentationTimeline.Bd(s.ja),e.presentationTimeline.Cd(e.U.start)),{Cb:function(){return function(e,t,n,i,r){function a(e){var n=(e-p)*h,r=n+t.Ta,a=n+c;return n=a+h,(a=new so(a,Math.min(n,s()),(function(){var t=ed(m,y,e,v,r*g);return st(b,[t])}),0,null,i,w,c,s())).l=n,a}function o(){var e=[Math.max(u.Qa(),c),Math.min(u.fb(),s())].map((function(e){return e-c}));return[Math.ceil(e[0]/h),Math.ceil(e[1]/h)-1].map((function(e){return e+p}))}function s(){var e=null!=d&&r[d]||f;return e?c+e:1/0}var u=e.presentationTimeline,c=e.U.start,d=e.da.id,f=e.U.duration,h=t.ja,p=t.Mb,g=t.timescale,m=t.yd,v=e.bandwidth||null,y=e.I.id,b=e.I.wa,w=c-t.Ta,T=o();e=e.Xa?Math.max(T[0],T[1]-n+1):T[0],T=T[1],n=[];for(var x=e;x<=T;++x){var S=a(x);n.push(S)}var A=new Co(n);if(n=u.fb()<s(),x=u.T(),n||x){var E=Math.max(e,T+1);A.Sc(h,(function(){var e=u.Qa();A.cb(e);var t=l(o());t.next(),t=t.next().value;for(var n=[];E<=t;){var i=a(E);n.push(i),E++}return e>s()&&!n.length?null:n}))}return Promise.resolve(A)}(u,s,r,o,a)}};var c=null;i=i=null,e.da.id&&e.I.id&&(i=n[i=e.da.id+","+e.I.id])&&(c=i.segmentIndex);var d=function(e,t,n){var i=e.U.start,r=e.U.duration,a=i-t.Ta;r=r?i+r:1/0;for(var o=[],s={},u=l(Ee(t.timeline)),c=u.next();!c.done;s={Zc:s.Zc,cd:s.cd,fd:s.fd,Wc:s.Wc,hd:s.hd,Xc:s.Xc},c=u.next()){var d=(c=c.value).item,f=d.start,h=d.cg;d=d.end,s.fd=c.ca+t.Mb,s.hd=h+t.Wd,s.cd=e.I.id,s.Wc=e.bandwidth||null,s.Zc=t.yd,s.Xc=e.I.wa,o.push(new so(i+f,i+d,function(e){return function(){var t=ed(e.Zc,e.cd,e.fd,e.Wc||null,e.hd);return st(e.Xc,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,i,r))}return o}(u,s,o);n=e.U.start;var f=e.U.duration?e.U.start+e.U.duration:1/0,h=1/0!=f;return c?(h&&new Co(d).Ya(n,f,!0),c.Hb(d,e.presentationTimeline.Qa())):c=new Co(d),e.presentationTimeline.Ib(d),h&&c.Ya(n,f),i&&e.Xa&&(i.segmentIndex=c),{Cb:function(){return c&&0!=c.K.length||c.Gb(d),Promise.resolve(c)}}}function Sd(e){return e.nc}function Ad(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function Ed(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,x,S,A,E,k,I,M,C,R,D,N,L,j,_,O;return P((function(P){switch(P.g){case 1:if(i=ft,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).wc),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&&te(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.wc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).Tc),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&&te(r.roles,s.roles)&&Ui(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.Tc=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&&te(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.wc,e.h=r.Tc,e.j=r.textStreams,e.i=r.imageStreams,P.A(2);break}for(a=-1,o=l(Ee(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ca,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return P.return();for(f=t.map((function(e){return e.wc})),h=t.map((function(e){return e.Tc})),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(qd(i.Y));for(y=l(g),b=y.next();!b.done;b=y.next())b.value.push(qd(i.Tb));return w(P,Id(e.g,f,a,Dd,Pd),3);case 3:return w(P,Id(e.h,h,a,Dd,Pd),4);case 4:return w(P,Id(e.j,p,a,Dd,Pd),5);case 5:return w(P,Id(e.i,g,a,Dd,Pd),2);case 2:if(x=0,S=[],e.h.length&&e.g.length)for(C=l(e.g),R=C.next();!R.done;R=C.next())for(D=R.value,N=l(e.h),L=N.next();!L.done;L=N.next())j=L.value,_=er(D.drmInfos,j.drmInfos),D.drmInfos.length&&j.drmInfos.length&&!_.length||(O=x++,S.push({id:O,language:D.language,primary:D.primary,audio:D,video:j,bandwidth:(D.bandwidth||0)+(j.bandwidth||0),drmInfos:_,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=e.h.concat(e.g),E=l(A),k=E.next();!k.done;k=E.next())I=k.value,M=x++,S.push({id:M,language:I.language,primary:I.primary,audio:I.type==i.bb?I:null,video:I.type==i.Na?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=S,T(P)}}))}function kd(e){var t,n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,A,E,k;return P((function(I){switch(I.g){case 1:if(t=ft,1==e.length)return I.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.bb}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.Na}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.Y}))})),a=e.map((function(e){return e.filter((function(e){return e.type==t.Tb}))})),o=l(r),s=o.next();!s.done;s=o.next())s.value.push(Hd(t.Y));for(u=l(a),c=u.next();!c.done;c=u.next())c.value.push(Hd(t.Tb));return w(I,Id([],n,0,Nd,Ld),2);case 2:return d=I.h,w(I,Id([],i,0,Nd,Ld),3);case 3:return f=I.h,w(I,Id([],r,0,Nd,Ld),4);case 4:return h=I.h,w(I,Id([],a,0,Nd,Ld),5);case 5:if(p=I.h,g=0,f.length&&d.length)for(b=l(d),T=b.next();!T.done;T=b.next())for(x=T.value,S=l(f),A=S.next();!A.done;A=S.next())E=A.value,k=g++,E.variantIds.push(k),x.variantIds.push(k);else for(m=f.concat(d),v=l(m),y=v.next();!y.done;y=v.next())y.value.variantIds=[g++];return I.return(f.concat(d).concat(h).concat(p))}}))}function Id(e,t,n,i,r){var a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,A,E,k,I,M;return P((function(C){switch(C.g){case 1:for(a=ft,o=[],s=l(Ee(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ca,f=c.item,d>=n?o.push(new Set(f)):o.push(new Set);h=l(e),p=h.next();case 2:if(p.done){C.A(4);break}return w(C,function(e,t,n,i,r){return P((function(a){return 1==a.g?(jd(t,e),e.matchedStreams?e.segmentIndex?w(a,Md(e,n),2):a.A(2):a.return(!1)):(Rd(e,n,i,r),a.return(!0))}))}(p.value,t,n,r,o),5);case 5:if(!C.h)throw new Ge(2,4,4037);p=h.next(),C.A(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,(x=Cd(T,t,i,r,o))&&e.push(x);for(S=l(o),m=S.next();!m.done;m=S.next())for(A=m.value,E={},k=l(A),b=k.next();!b.done;E={Wa:E.Wa},b=k.next())if(E.Wa=b.value,I=E.Wa.type==a.Y&&!E.Wa.language,M=E.Wa.type==a.Tb&&!E.Wa.tilesLayout,!I&&!M&&e.some(function(e){return function(t){return t.mimeType==e.Wa.mimeType&&_t(t.codecs)==_t(e.Wa.codecs)}}(E)))throw new Ge(2,4,4037);return C.return(e)}}))}function Md(e,t){var n,i,r,a,o,s,u,c,d,f;return P((function(h){if(1==h.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 w(h,Promise.all(n),2)}if(e.segmentIndex instanceof No)for(s=l(Ee(i)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ca,(f=c.item).segmentIndex&&d>=t&&e.segmentIndex.j.push(f.segmentIndex);T(h)}))}function Cd(e,t,n,i,r){var a=n(e);return jd(t,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return P((function(e){return a.segmentIndex?e.A(0):(a.segmentIndex=new No,w(e,Md(a,0),0))}))}),a.matchedStreams?(Rd(a,0,i,r),a):null}
2function Rd(e,t,n,i){for(var r=l(Ee(e.matchedStreams)),a=r.next();!a.done;a=r.next()){var o=a.value;if(a=o.ca,o=o.item,a>=t){n(e,o);var s=!0;"audio"==e.type&&0==Yt(e.language,o.language)&&(s=!1),s&&i[a].delete(o)}}}function Dd(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 Nd(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Pd(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=er(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new Ge(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=Dd(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),Pd(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Pd(e.trickModeVideo,t)}function Ld(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 jd(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){for(var a=t,o={audio:_d,video:_d,text:Od,image:Ud}[a.type],s={audio:Bd,video:Fd,text:Vd,image:Kd}[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 _d(e,t){var n;if(!(n=t.mimeType!=e.mimeType||_t(t.codecs)!=_t(e.codecs))&&(n=e.drmInfos)){n=e.drmInfos;var i=t.drmInfos;n=!(!n.length||!i.length||0<er(n,i).length)}return!n}function Od(e,t){return!!e.language&&(!t.language||0!=Yt(e.language,t.language)&&t.kind==e.kind)}function Ud(e){return!!e.tilesLayout}function Bd(e,t,n){if(e.id==n.id)return!0;var i=Yt(e.language,t.language),r=Yt(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=Gd(e.channelsCount,t.channelsCount,n.channelsCount))==Xd||i!=Yd&&((i=Gd(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Xd||i!=Yd&&!(!e.bandwidth||zd(e.bandwidth,t.bandwidth,n.bandwidth)!=Xd)))))}function Fd(e,t,n){if(e.id==n.id)return!0;var i=Gd(e.width*e.height,t.width*t.height,n.width*n.height);if(i==Xd)return!0;if(i==Yd)return!1;if(e.frameRate){if((i=Gd(e.frameRate,t.frameRate,n.frameRate))==Xd)return!0;if(i==Yd)return!1}return!(!e.bandwidth||zd(e.bandwidth,t.bandwidth,n.bandwidth)!=Xd)}function Vd(e,t,n){if(e.id==n.id)return!0;var i=Yt(e.language,t.language),r=Yt(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;
2if(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 Kd(e,t,n){return e.id==n.id||Gd(e.width*e.height,t.width*t.height,n.width*n.height)==Xd}function Hd(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 qd(e){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Co([]),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 Gd(e,t,n){if(t==e&&e!=n)return Yd;if(n==e&&e!=t)return Xd;if(t>e){if(n<=e||n-e<t-e)return Xd;if(n-e>t-e)return Yd}else{if(n>e)return Yd;if(e-n<e-t)return Xd;if(e-n>e-t)return Yd}return Wd}function zd(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Xd:t<e?Yd:Wd}Ad.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 Xd=1,Wd=0,Yd=-1;function $d(){var e=this;this.h=this.g=null,this.m=[],this.i=null,this.H=1,this.l={},this.N={},this.j=new Ad,this.G=0,this.J=new K(5),this.D=new rn((function(){!function(e){var t,n;P((function(i){switch(i.g){case 1:return t=0,x(i,2),w(i,Jd(e),4);case 4:t=i.h,A(i,3);break;case 2:n=E(i),e.h&&(n.severity=1,e.h.onError(n));case 3:if(!e.h)return i.return();tf(e,t),T(i)}}))}(e)})),this.o=new vi,this.s=null,this.L=[],this.u=1/0,this.C=!1}function Jd(e){var t,n,i,r,a,o,s;return P((function(u){return 1==u.g?(t=Ti(e.m,e.g.retryParameters),n=e.h.networkingEngine,e.h.modifyManifestRequest(t,{format:"d"}),i=Date.now(),r=n.request(0,t),yi(e.o,r),w(u,r.promise,2)):3!=u.g?(a=u.h,e.h?(a.uri&&!e.m.includes(a.uri)&&e.m.unshift(a.uri),w(u,function(e,t,n){var i,r,a,o;return P((function(s){if(1==s.g){if(!(i=Wc(t,"MPD")))throw new Ge(2,4,4001,n);return e.g.dash.disableXlinkProcessing?s.return(Qd(e,i,n)):(r=e.g.dash.xlinkFailGracefully,a=rd(i,e.g.retryParameters,r,n,e.h.networkingEngine),yi(e.o,a),w(s,a.promise,2))}return o=s.h,s.return(Qd(e,o,n))}))}(e,a.data,a.uri),3)):u.return(0)):(o=Date.now(),s=(o-i)/1e3,e.J.sample(1,s),u.return(s))}))}function Qd(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,k,I,M,C,R,D,N,L,j,_,O,U;return P((function(B){switch(B.g){case 1:if((i=e.g.dash.manifestPreprocessor)&&i(t),r=[n],0<(a=Nc(t,"Location").map(_c).filter(Fe)).length&&(o=st(r,a),r=e.m=o),s=Nc(t,"BaseURL"),u=s.map(_c),c=st(r,u),d=0,s&&s.length&&(d=Uc(s[0],"availabilityTimeOffset",Gc)||0),f=e.g.dash.ignoreMinBufferTime,h=0,f||(h=Uc(t,"minBufferTime",Fc)||0),e.G=Uc(t,"minimumUpdatePeriod",Fc,-1),p=Uc(t,"availabilityStartTime",Bc),g=Uc(t,"timeShiftBufferDepth",Fc),m=e.g.dash.ignoreSuggestedPresentationDelay,v=null,m||(v=Uc(t,"suggestedPresentationDelay",Fc)),y=e.g.dash.ignoreMaxSegmentDuration,b=null,y||(b=Uc(t,"maxSegmentDuration",Fc)),S=t.getAttribute("type")||"static",e.i)for(k=e.i.presentationTimeline,I=l(Object.values(e.l)),M=I.next();!M.done;M=I.next())(C=M.value).segmentIndex&&C.segmentIndex.cb(k.Qa());else R=e.g.defaultPresentationDelay||1.5*h,k=new uo(p,null!=v?v:R,e.g.dash.autoCorrectDrift);return k.oc("static"==S),k.T()&&!isNaN(e.g.availabilityWindowOverride)&&(g=e.g.availabilityWindowOverride),null==g&&(g=1/0),k.Rd(g),D=t.getAttribute("profiles")||"",N={Xa:"static"!=S,presentationTimeline:k,da:null,U:null,ka:null,I:null,bandwidth:0,ke:!1,Ab:d,profiles:D.split(",")},L=function(e,t,n,i){var r=Uc(i,"mediaPresentationDuration",Fc),a=[],o=0;i=Nc(i,"Period");for(var s=l(Ee(i)),u=s.next();!u.done;u=s.next()){var c=u.value;u=c.ca;var d=c.item,f=c.next;c=Uc(d,"start",Fc,o);var h=d.id,p=Uc(d,"duration",Fc),g=null;if(f){var m=Uc(f,"start",Fc);null!=m&&(g=m-c)}else null!=r&&(g=r-c);if(null==g&&(g=p),!(null!==e.s&&null!==h&&null!==c&&c<e.s)||e.L.includes(h)||u+1==i.length){if(null!==c&&(null===e.s||c>e.s)&&(e.s=c),o=Zd(e,t,n,{start:c,duration:g,node:d,me:null==g||!f}),a.push(o),t.da.id&&g&&(e.N[t.da.id]=g),null==g){o=null;break}o=c+g}}return e.L=a.map((function(e){return e.id})),null!=r?{periods:a,duration:r,ee:!1}:{periods:a,duration:o,ee:!0}}
2(e,N,c,t),j=L.duration,_=L.periods,"static"!=S&&L.ee||k.Ka(j||1/0),e.u&&!e.C&&e.h.isAutoLowLatencyMode()&&(e.h.enableLowLatencyMode(),e.C=e.h.isLowLatencyMode()),e.C?k.xe(e.u):e.u&&X("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."),k.Bd(b||1),w(B,Ed(e.j,_,N.Xa),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.A(3);break}if(e.i={presentationTimeline:k,variants:e.j.l,textStreams:e.j.j.slice(),imageStreams:e.j.i,offlineSessionIds:[],minBufferTime:h||0,sequenceMode:!1},!k.Ce()){B.A(3);break}return O=Nc(t,"UTCTiming"),w(B,function(e,t,n){var i,r,a,o,s,u,c,d;return P((function(f){switch(f.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){f.A(4);break}switch(s=o.value,x(f,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 f.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return f.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),f.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":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",u)}f.A(9);break;case 7:return w(f,rf(e,t,c,"HEAD"),10);case 10:return f.return(f.h);case 8:return w(f,rf(e,t,c,"GET"),11);case 11:return f.return(f.h);case 9:A(f,3);break;case 5:E(f);case 3:o=a.next(),f.A(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f.return(0)}}))}(e,c,O),5);case 5:if(U=B.h,!e.h)return B.return();k.ye(U);case 3:e.h.makeTextStreamsForClosedCaptions(e.i),T(B)}}))}function Zd(e,t,n,i){t.da=nf(i.node,null,n),t.U=i,t.da.Ab=t.Ab,t.da.id||(t.da.id="__shaka_period_"+i.start);var r=Nc(i.node,"EventStream");n=t.presentationTimeline.Qa();for(var a=(r=l(r)).next();!a.done;a=r.next())af(e,i.start,i.duration,a.value,n);if(n=Nc(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.ka=nf(n,t.da,null);var r,a=!1,o=Nc(n,"Role"),s=o.map((function(e){return e.getAttribute("value")})).filter(Fe),u=void 0,d=t.ka.contentType==dt;d&&(u="subtitle");for(var f=(o=l(o)).next();!f.done;f=o.next()){var h=(f=f.value).getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(f=f.getAttribute("value"),f){case"main":a=!0;break;case"caption":case"subtitle":u=f}}h=Nc(n,"EssentialProperty"),o=null,f=!1;for(var p=(h=l(h)).next();!p.done;p=h.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)):f=!0}for(h=l(h=Nc(n,"SupplementalProperty")),p=h.next();!p.done;p=h.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(p=p.value).getAttribute("schemeIdUri")&&(r=i(parseInt(p.getAttribute("value"),10)));h=Nc(n,"Accessibility");var m=new Map;for(h=l(h),p=h.next();!p.done;p=h.next())if(g=p.value,p=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608: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,x=y=void 0;b.includes("=")?(y=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],x=b[1]||"und"):(y="CC"+p,2==g.length?p+=2:p++,x=b),m.set(y,Wt(x))}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,Wt(b));else m.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=g&&(s.push(g),"captions"==g&&(u="caption"));if(f)return null;f=Nc(n,"ContentProtection");var S=Yc(f,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),A=Wt(n.getAttribute("lang")||"und"),E=n.getAttribute("label");if((f=Nc(n,"Label"))&&f.length&&(f=f[0],f.textContent&&(E=f.textContent)),f=Nc(n,"Representation"),n=f.map((function(n){return(n=function(e,t,n,i,r,a,o,s,u,l){if(t.I=nf(l,t.ka,null),e.u=Math.min(e.u,t.I.Ab),!function(e){var t=e.mc?1:0;return t+=e.ab?1:0,t+=e.nc?1:0,0==t?e.contentType==dt||"application"==e.contentType:(1!=t&&(e.mc&&(e.ab=null),e.nc=null),!0)}(t.I))return null;var c=t.U.start;t.bandwidth=Uc(l,"bandwidth",Hc)||0;var d=t.I.contentType,f=d==dt||"application"==d;d="image"==d;try{var h=function(t,n,i){return function(e,t,n,i){var r,a,o,s,u;return P((function(l){return 1==l.g?(r=Ei,a=qo(t,n,i,e.g.retryParameters),o=e.h.networkingEngine,s=o.request(r,a),yi(e.o,s),w(l,s.promise,2)):(u=l.h,l.return(u.data))}))}(e,t,n,i)};if(t.I.mc)var p=pd(t,h);else if(t.I.ab)p=wd(t,e.l);else if(t.I.nc)p=xd(t,h,e.l,!!e.i,e.g.dash.initialSegmentLimit,e.N);else{var g=t.I.wa,m=t.U.duration||0;p={Cb:function(){return Promise.resolve(Ro(c,m,g))}}}}catch(e){if((f||d)&&4002==e.code)return null;throw e}h=Nc(l,"ContentProtection"),h=function(e,t,n,i){var r=Yc(e,n,i);
2if(t.ge)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.ge=!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 Ge(2,4,4008);return r.ce||t.ce}(h,n,e.g.dash.ignoreDrmInfo,e.g.dash.keySystemsByURI),h=new Set(h?[h]:[]);var v=!1;Nc(l,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")}))&&(t.I.mimeType="audio/eac3-joc",v=!0);var y,b,x=!1;if(f&&(x=s.includes("forced_subtitle")||s.includes("forced-subtitle")),d&&((l=Nc(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.I.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 S=t.I.id?t.da.id+","+t.I.id:"",A={id:e.H++,originalId:t.I.id,createSegmentIndex:function(){var n,i;return P((function(r){if(1==r.g)return(n=S&&t.Xa&&e.l[S]?e.l[S]:A).segmentIndex?r.A(0):(i=n,w(r,p.Cb(),3));i.segmentIndex=r.h,T(r)}))},closeSegmentIndex:function(){A.segmentIndex&&(A.segmentIndex.release(),A.segmentIndex=null)},segmentIndex:null,mimeType:t.I.mimeType,codecs:t.I.codecs,frameRate:t.I.frameRate,pixelAspectRatio:t.I.pixelAspectRatio,bandwidth:t.bandwidth,width:t.I.width,height:t.I.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:h,language:r,label:a,type:t.ka.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:t.I.emsgSchemeIdUris,roles:s,forced:x,channelsCount:t.I.Lc,audioSamplingRate:t.I.audioSamplingRate,spatialAudio:v,closedCaptions:u,hdr:b,tilesLayout:y,matchedStreams:[]};return S&&t.Xa&&!e.l[S]&&(e.l[S]=A),A}(e,t,S,u,A,E,a,s,m,n))&&(n.hdr=n.hdr||r),n})).filter((function(e){return!!e})),0==n.length){if(o="image"==t.ka.contentType,e.g.dash.ignoreEmptyAdaptationSet||d||o)return null;throw new Ge(2,4,4003)}if(!t.ka.contentType||"application"==t.ka.contentType)for(t.ka.contentType=of(n[0].mimeType,n[0].codecs),d=l(n),h=d.next();!h.done;h=d.next())h.value.type=t.ka.contentType;for(d=l(n),h=d.next();!h.done;h=d.next())for(h=h.value,p=l(S.drmInfos),g=p.next();!g.done;g=p.next())(g=g.value).keyIds=g.keyIds&&h.keyIds?new Set([].concat(c(g.keyIds),c(h.keyIds))):g.keyIds||h.keyIds;return d=f.map((function(e){return e.getAttribute("id")})).filter(Fe),{id:t.ka.id||"__fake__"+e.H++,contentType:t.ka.contentType,language:A,Mg:a,streams:n,drmInfos:S.drmInfos,Ud:o,Pf:d}}(e,t,n)})).filter(Fe),t.Xa){for(i=[],a=(r=l(n)).next();!a.done;a=r.next())for(var o=(a=l(a.value.Pf)).next();!o.done;o=a.next())i.push(o.value);if(i.length!=new Set(i).size)throw new Ge(2,4,4018)}for(i=n.filter((function(e){return!e.Ud})),r=(n=l(n=n.filter((function(e){return e.Ud})))).next();!r.done;r=n.next()){a=(r=r.value).Ud.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={vc:s.vc},d=u.next())s.vc=d.value,s.vc.trickModeVideo=r.streams.find(function(e){return function(t){return _t(e.vc.codecs)==_t(t.codecs)}}(s))}}}if(r=e.g.disableAudio?[]:ef(i,"audio"),o=e.g.disableVideo?[]:ef(i,"video"),a=e.g.disableText?[]:ef(i,dt),n=e.g.disableThumbnails?[]:ef(i,"image"),!o.length&&!r.length)throw new Ge(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.da.id,wc:i,Tc:r,textStreams:o,imageStreams:a}}function ef(e,t){return e.filter((function(e){return e.contentType==t}))}function tf(e,t){0>e.G||e.D.R(Math.max(3,e.G-t,H(e.J)))}function nf(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Lc:null,audioSamplingRate:null,Ab:0},n=n||t.wa;for(var i=Nc(e,"BaseURL"),r=i.map(_c),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=Uc(e,"frameRate",zc)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,d=Nc(e,"InbandEventStream"),f=t.emsgSchemeIdUris.slice(),h=(d=l(d)).next();!h.done;h=d.next())h=h.value.getAttribute("schemeIdUri"),f.includes(h)||f.push(h);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=Nc(e,"AudioChannelConfiguration"))||t.Lc,h=Uc(e,"audioSamplingRate",qc)||t.audioSamplingRate,a||(a=of(o,s));var p=Rc(e,"SegmentBase"),g=Rc(e,"SegmentTemplate"),m=p&&Uc(p,"availabilityTimeOffset",Gc)||0,v=g&&Uc(g,"availabilityTimeOffset",Gc)||0;return i=i&&i.length&&Uc(i[0],"availabilityTimeOffset",Gc)||0,i=t.Ab+i+m+v,{wa:st(n,r),mc:p||t.mc,ab:Rc(e,"SegmentList")||t.ab,nc:g||t.nc,width:Uc(e,"width",qc)||t.width,height:Uc(e,"height",qc)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:c,emsgSchemeIdUris:f,id:e.getAttribute("id"),Lc:d,audioSamplingRate:h,Ab:i}}function rf(e,t,n,i){var r,a,o,s,u,l;return P((function(c){if(1==c.g)return r=st(t,[n]),(a=Ti(r,e.g.retryParameters)).method=i,o=e.h.networkingEngine.request(4,a),yi(e.o,o),w(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=vt(s.data);return l=Date.parse(u),isNaN(l)?c.return(0):c.return(l-Date.now())}))}function af(e,t,n,i,r){for(var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=Uc(i,"timescale",qc)||1,u=(i=l(Nc(i,"Event"))).next();!u.done;u=i.next()){var c=Uc(u=u.value,"presentationTime",qc)||0,d=Uc(u,"duration",qc)||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 of(e,t){return Bt(Lt(e,t))?dt:e.split("/")[0]}function sf(e,t,n,i){this.g=e,this.type=t,this.W=n,this.segments=i||null}function uf(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function lf(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function cf(e,t){var n=e.getAttribute(t);if(!n)throw new Ge(2,4,4023,t);return n.value}function df(e,t,n){n=void 0===n?[]:n,this.W=t,this.g=e,this.h=n}function ff(e,t){this.name=e,this.value=t}function hf(e,t){return e.filter((function(e){return e.name==t}))}function pf(e,t){return e.filter((function(e){return cf(e,"TYPE")==t}))}function gf(e,t){var n=hf(e,t);return n.length?n[0]:null}function mf(e){var t=0;return t=void 0===t?0:t,(e=gf(e,"EXT-X-MEDIA-SEQUENCE"))?Number(e.value):t}function vf(e){this.h=e,this.g=0}function yf(e){bf(e,/[ \t]+/gm)}function bf(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 wf(e){return e.g==e.h.length?null:(e=bf(e,/[^ \t\n]*/gm))?e[0]:null}function Tf(){this.g=0}function xf(e,t,n){var i=(t=(t=vt(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new Ge(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=Sf(e.g++,o),--e.g,Af.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(r=!0)}a=[],r=!0;for(var s=(o=l(Ee(i))).next();!s.done;s=o.next()){var u=s.value;s=u.ca;var c=u.item;if(u=u.next,/^#(?!EXT)/m.test(c)||r)r=!1;else{if(c=Sf(e.g++,c),Ef.includes(c.name)){if(1!=t)throw new Ge(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=Sf(e.g++,d),Af.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"==lf(d,"TYPE")?s.push(d):"MAP"==lf(d,"TYPE")&&(d.name="EXT-X-MAP",c=d):o.push(d)):/^#(?!EXT)/m.test(d)||(d=st([i],[d.trim()])[0],c&&o.push(c),r.push(new df(d,o,s)),o=[],s=[]);return s.length&&(c&&o.push(c),r.push(new df("",o,s))),new sf(n,t,a,r)}a.push(c),"EXT-X-STREAM-INF"==c.name&&(c.g.push(new ff("URI",u)),r=!0)}}return new sf(n,t,a)}function Sf(e,t){var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Ge(2,4,4016,t);var i,r=n[1],a=n[2];if(n=[],a){var o;(o=bf(a=new vf(a),/^([^,=]+)(?:,|$)/g))&&(i=o[1]);
2for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=bf(a,s);)n.push(new ff(o[1],o[2]||o[3])),yf(a)}return new uf(e,r,n,i)}(i=$d.prototype).configure=function(e){this.g=e},i.start=function(e,t){var n,i=this;return P((function(r){if(1==r.g)return i.C=t.isLowLatencyMode(),i.m=[e],i.h=t,w(r,Jd(i),2);if(n=r.h,i.h&&tf(i,n),!i.h)throw new Ge(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.D&&(this.D.stop(),this.D=null),this.o.destroy()},i.update=function(){var e,t=this;return P((function(n){return 1==n.g?(x(n,2),w(n,Jd(t),4)):2!=n.g?A(n,0):(e=E(n),t.h&&e?(t.h.onError(e),void T(n)):n.return())}))},i.onExpirationUpdated=function(){},V("shaka.dash.DashParser",$d),pr.mpd=function(){return new $d},hr["application/dash+xml"]=function(){return new $d},hr["video/vnd.mpeg.dash.mpd"]=function(){return new $d},uf.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},uf.prototype.getAttribute=function(e){var t=this.g.filter((function(t){return t.name==e}));return t.length?t[0]:null};var Af="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(" "),Ef="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function kf(){}function If(e){try{var t=Mf(e);return li({uri:e,qe:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return si(e)}}function Mf(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new Ge(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new Ge(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?kt(t):wt(t),contentType:i}}function Cf(){var e=this;this.h=this.j=null,this.pa=1,this.o=new Map,this.u=new Map,this.ha=new Set,this.g=new Map,this.i=null,this.L="",this.X=new Tf,this.ga=0,this.C=new rn((function(){!function(e){var t,n;P((function(i){return 1==i.g?e.j?(x(i,2),w(i,e.update(),4)):i.return():2!=i.g?(t=e.ga,e.C.R(t),A(i,0)):(n=E(i),e.j?(n.severity=1,e.j.onError(n),e.C.R(.1),void T(i)):i.return())}))}(e)})),this.l=Xf,this.H=null,this.fa=0,this.G=1/0,this.V=this.Ga=0,this.D=new vi,this.N=[],this.J=new Map,this.qa=!1,this.s=new Map,this.$=new Map,this.m=!1}function Rf(e,t){var n,i,r,a,o,s,u,l,c,d,f,h;return P((function(p){if(1==p.g)return n=$f,i=t.Ge,r=new Xe(i),e.m&&t.Le&&$e(r,new at("_HLS_skip=YES")),w(p,Kf(e,r.toString()),2);if(a=p.h,1!=(o=xf(e.X,a.data,a.uri)).type)throw new Ge(2,4,4017);s=hf(o.W,"EXT-X-DEFINE"),u=Df(e,s),l=t.stream,c=Ff(e,o,l.type,t.ne,u),l.segmentIndex.Hb(c,e.i.Qa()),c.length&&(d=mf(o.W),f=t.ne.get(d),l.segmentIndex.cb(f)),h=c[c.length-1],gf(o.W,"EXT-X-ENDLIST")&&(Hf(e,n.Fe),e.i.Ka(h.endTime)),T(p)}))}function Df(e,t){for(var n=new Map,i=l(t),r=i.next();!r.done;r=i.next()){var a=r.value;r=lf(a,"NAME");var o=lf(a,"VALUE");a=lf(a,"IMPORT"),r&&o&&n.set(r,o),a&&(r=e.o.get(a))&&n.set(a,r)}return n}function Nf(e,t){var n=[];e.h.disableVideo||n.push(e.h.hls.defaultVideoCodec),e.h.disableAudio||n.push(e.h.hls.defaultAudioCodec);var i=lf(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=_t(a=a.value);
2n.has(o)||(r.push(a),n.add(o))}return r}function Pf(e){return Wt(e=lf(e,"LANGUAGE")||"und")}function Lf(e,t){var n,i,r,a,o,s,u,l,c,d,f,h,p;return P((function(g){if(1==g.g){n=cf(t,"GROUP-ID"),i="";var m=cf(t,"TYPE").toLowerCase();return"subtitles"==m&&(m=dt),(r=m)!=dt&&n&&e.s.has(n)&&(i=e.s.get(n)),a=Vf(cf(t,"URI"),e.o),e.g.has(a)?g.return(e.g.get(a)):(o=Pf(t),s=lf(t,"NAME"),u=lf(t,"DEFAULT"),l="YES"==u,m="audio"==r&&(m=lf(t,"CHANNELS"))?parseInt(m.split("/")[0],10):null,c=m,m="audio"==r&&(!!(m=lf(t,"CHANNELS"))&&m.includes("/JOC")),d=m,f=lf(t,"CHARACTERISTICS"),h=lf(t,"FORCED"),w(g,jf(e,a,i,r,o,l,s,c,null,f,"YES"==h,d),2))}return p=g.h,e.u.has(n)?e.u.get(n).push(p):e.u.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 jf(e,t,n,i,r,a,o,s,u,d,f,h){var p,g,m,v,y,b,T,x,S,A,E,k,I,M,C,R,D,N,L,j,_,O,U,B,F,V,K,H,q,G,z,W,Y,$,J,Q,Z;return P((function(ee){if(1==ee.g)return p=st([e.L],[t])[0],w(ee,Kf(e,p),2);if(3!=ee.g){if(g=ee.h,p=g.uri,1!=(m=xf(e.X,g.data,p)).type)throw new Ge(2,4,4017);return v=hf(m.W,"EXT-X-DEFINE"),y=Df(e,v),function(e,t){var n=gf(t.W,"EXT-X-PLAYLIST-TYPE"),i=gf(t.W,"EXT-X-ENDLIST");if(i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i)Hf(e,Xf);else{if(Hf(e,n?Yf:Wf),!(i=gf(t.W,"EXT-X-TARGETDURATION")))throw new Ge(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),n=gf(t.W,"EXT-X-PART-INF"),e.m&&n?(e.Ga=Number(cf(n,"PART-TARGET")),e.G=Math.min(e.Ga,e.G),n=gf(t.W,"EXT-X-SERVER-CONTROL"),e.V=n?Number(cf(n,"PART-HOLD-BACK")):0):e.G=Math.min(i,e.G),e.fa=Math.max(i,e.fa)}}(e,m),w(ee,function(e,t,n,i,r){var a,o,s,u,l,c,d,f,h,p,g;return P((function(m){return 1==m.g?(a=ft,o=Ei,s=Vf(i.segments[0].g,r),u=new Xe(s),l=u.va.split(".").pop(),c=Gf[t],(d=c[l])?m.return(d):t==a.Y?n&&"vtt"!=n&&"wvtt"!=n?m.return("application/mp4"):m.return("text/vtt"):t!=a.Tb||n&&"jpeg"!=n?((f=Ti([s],e.h.retryParameters)).method="HEAD",w(m,qf(e,f,o),2)):m.return("image/jpeg")):(h=m.h,(p=h.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(x=l(m.segments),S=x.next();!S.done;S=x.next())A=S.value,E=hf(A.W,"EXT-X-KEY"),T.push.apply(T,c(E));for(k=!1,I=[],M=new Set,C=l(T),R=C.next();!R.done;R=C.next())if(D=R.value,"NONE"!=(N=cf(D,"METHOD"))){if(k=!0,"AES-128"==N)return e.qa=!0,ee.return(null);if(L=cf(D,"KEYFORMAT"),_=(j=zf[L])?j(D,b):null){if(_.keyIds)for(O=l(_.keyIds),U=O.next();!U.done;U=O.next())B=U.value,M.add(B);I.push(_)}}if(k&&!I.length)throw new Ge(2,4,4026);ao.includes(b)&&(n=""),F=new Map;try{V=Ff(e,m,i,F,y)}catch(e){if(4035==e.code)return X("Skipping unsupported HLS stream",b,t),ee.return(null);throw e}if(K=V[0].startTime,H=V[V.length-1].endTime,q=new Co(V),G=i==dt?"subtitle":void 0,z=[],d)for(W=l(d.split(",")),Y=W.next();!Y.done;Y=W.next())$=Y.value,z.push($);return Q=!!(J=gf(m.W,"EXT-X-SERVER-CONTROL"))&&null!=J.getAttribute("CAN-SKIP-UNTIL"),Z={id:e.pa++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:q,mimeType:b,codecs:n,kind:G,encrypted:k,drmInfos:I,keyIds:M,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:z,forced:f,channelsCount:s,audioSamplingRate:null,spatialAudio:h,closedCaptions:u,hdr:void 0,tilesLayout:void 0},ee.return({stream:Z,Xd:t,Ge:p,oe:K,Bf:H,ne:F,Le:Q})}))}function _f(e,t){var n=0,i=null,r=lf(t,"BYTERANGE");return r&&(n=r.split("@"),i=Number(n[0]),i=(n=Number(n[1]))+i-1),new oo((function(){return[e]}),n,i)}function Of(e,t,n,i,r,a,o,s){var u=i.W,c=Vf(i.g,a),d=gf(u,"EXTINF"),f=a=0,h=null;i.h.length&&!e.m&&X("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(Ee(i.h))).next();!g.done;e={ad:e.ad},g=i.next()){var m=(g=g.value).ca;g=g.item;var v=0==m?n:p[p.length-1];m=0==m?r:v.endTime;var y=Number(lf(g,"DURATION"));y=m+y;var b=0,w=null;
2"EXT-X-PRELOAD-HINT"==g.name?b=(v=lf(g,"BYTERANGE-START"))?Number(v):0:(b=(v=l(Uf(v,b=lf(g,"BYTERANGE")))).next().value,w=v.next().value),g=lf(g,"URI"),e.ad=st([o],[g])[0],p.push(new so(m,y,function(e){return function(){return[e.ad]}}(e),b,w,t,0,0,1/0))}}else if(!d)throw new Ge(2,4,4024,"EXTINF");return a=d?r+Number(d.value.split(",")[0]):p[p.length-1].endTime,(o=gf(u,"EXT-X-BYTERANGE"))?(f=(h=l(Uf(n,o.value))).next().value,h=h.next().value):p.length&&(f=p[0].Ba,h=p[p.length-1].la),n="",o=null,"image"==s&&(n="1x1",s=gf(u,"EXT-X-TILES"))&&(n=cf(s,"LAYOUT"),(s=lf(s,"DURATION"))&&(o=Number(s))),new so(r,a,(function(){return c.length?[c]:[]}),f,h,t,0,0,1/0,p,n,o)}function Uf(e,t){var n=0,i=null;return t&&(n=t.split("@"),i=Number(n[0]),i=(n=n[1]?Number(n[1]):e.la+1)+i-1),[n,i]}function Bf(e){if(e.i){for(var t=l(e.N),n=t.next();!n.done;n=t.next())e.i.Ib(n.value);e.N=[]}}function Ff(e,t,n,i,r){var a=t.segments,o=mf(t.W),s=gf(t.W,"EXT-X-SKIP"),u=o+(s=s?Number(lf(s,"SKIPPED-SEGMENTS")):0),c=0;e.l!=Xf&&i.has(u)&&(c=i.get(u)),a[0].g.split("/").pop();for(var d=[],f=(a=l(Ee(a))).next();!f.done;f=a.next()){u=(f=f.value).ca,f=f.item;var h=d[d.length-1],p=0==u?c:h.endTime;u=o+s+u,i.set(u,p),u=e;var g=t.g,m=r,v=gf(f.W,"EXT-X-MAP");if(v)g=[m=Vf(st([g],[cf(v,"URI")])[0],m),lf(v,"BYTERANGE","")].join("-"),u.$.has(g)||(v=_f(m,v),u.$.set(g,v)),u=u.$.get(g);else u=null;!e.m&&e.j.isAutoLowLatencyMode()&&(e.j.enableLowLatencyMode(),e.m=e.j.isLowLatencyMode()),f=Of(e,u,h,f,p,r,t.g,n),d.push(f)}return d}function Vf(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 Ge(2,4,4039,a);n=n.replace(r,o)}return n}function Kf(e,t){var n=Ti([t],e.h.retryParameters);return e.j.modifyManifestRequest(n,{format:"h"}),qf(e,n,0)}function Hf(e,t){e.l=t,e.i&&e.i.oc(e.l==Xf),e.l!=Xf||e.C.stop()}function qf(e,t,n){if(!e.D)throw new Ge(2,7,7001);return t=e.j.networkingEngine.request(n,t),yi(e.D,t),t.promise}V("shaka.net.DataUriPlugin",kf),kf.parse=If,wi("data",If),(i=Cf.prototype).configure=function(e){this.h=e},i.start=function(e,t){var n,i,r=this;return P((function(a){return 1==a.g?(r.j=t,r.m=t.isLowLatencyMode(),w(a,Kf(r,e),2)):3!=a.g?(n=a.h,r.L=n.uri,w(a,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,A,k,I,M,C,R,D,N,L,j,_,O,U,B,F,V,K,H;return P((function(q){switch(q.g){case 1:if(0!=(n=xf(e.X,t,e.L)).type)throw new Ge(2,4,4022);for(i=hf(n.W,"EXT-X-DEFINE"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;i=lf(r,"NAME"),r=lf(r,"VALUE"),i&&r&&(e.o.has(i)||e.o.set(i,r))}}(e,i),r=hf(n.W,"EXT-X-MEDIA"),a=hf(n.W,"EXT-X-STREAM-INF"),o=hf(n.W,"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=lf(r,"AUDIO");i=lf(r,"VIDEO");var o=lf(r,"SUBTITLES");if(r=Nf(e,r),o){var s=ct(dt,r);e.s.set(o,s),ee(r,s)}a&&(o=lt("audio",r),e.s.set(a,o)),i&&(a=lt("video",r),e.s.set(i,a))}}(e,a),s=hf(n.W,"EXT-X-SESSION-DATA"),u=l(s),c=u.next();!c.done;c=u.next())d=c.value,f=lf(d,"DATA-ID"),h=lf(d,"URI"),p=lf(d,"LANGUAGE"),g=lf(d,"VALUE"),m=(new Map).set("id",f),h&&m.set("uri",st([e.L],[h])[0]),p&&m.set("language",p),g&&m.set("value",g),v=new fi("sessiondata",m),e.j&&e.j.onEvent(v);return w(q,function(e,t){var n;return P((function(i){return 1==i.g?(t=t.filter((function(e){var t=lf(e,"URI")||"";return"SUBTITLES"!=lf(e,"TYPE")&&""!=t})),t.length?w(i,Lf(e,t[0]),2):i.A(2)):(n=t.slice(1).map((function(t){return Lf(e,t)})),w(i,Promise.all(n),0))}))}(e,r),2);case 2:return function(e,t){for(var n=pf(t,"CLOSED-CAPTIONS"),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value;i=Pf(r);var a=cf(r,"GROUP-ID");r=cf(r,"INSTREAM-ID"),e.J.get(a)||e.J.set(a,new Map),e.J.get(a).set(r,i)}}(e,r),w(q,function(e,t){var n,i,r;return P((function(a){return 1==a.g?(n=t.map((function(t){var n,i,r,a,o,s,u,c;return P((function(d){if(1==d.g)return n=lf(t,"FRAME-RATE"),i=Number(lf(t,"AVERAGE-BANDWIDTH"))||Number(cf(t,"BANDWIDTH")),r=lf(t,"RESOLUTION"),a=l(r?r.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=lf(t,"VIDEO-RANGE"),w(d,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m;return P((function(v){if(1==v.g)return n=ft,i=Nf(e,t),r=lf(t,"AUDIO"),a=lf(t,"VIDEO"),s=(o=r||a)&&e.u.has(o)?e.u.get(o):[],u={audio:r?s:[],video:a?s:[]},d=!1,f=cf(t,"URI"),h=u.audio.find((function(e){return e&&e.Xd==f})),p=ct(n.Na,i),(g=ct(n.bb,i))&&!p?c=n.bb:!s.length&&g&&p?(c=n.Na,i=[[p,g].join()]):u.audio.length&&h?(c=n.bb,d=!0):c=u.video.length?n.bb:n.Na,d?v.A(2):w(v,function(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g){if(r=Vf(cf(t,"URI"),e.o),e.g.has(r))return u.return(e.g.get(r));var l=lf(t,"CLOSED-CAPTIONS");return a="video"==i&&l&&"NONE"!=l?e.J.get(l):null,o=lt(i,n),w(u,jf(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 f=d.return,h=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,h.length&&!g||(h=[null]),g=e.h.disableVideo,p.length&&!g||(p=[null]),g=[],m=(h=l(h)
2).next();!m.done;m=h.next()){m=m.value;for(var v=l(p),y=v.next();!y.done;y=v.next()){var b=y.value;y=m?m.stream:null;var T=b?b.stream:null,x=m?m.stream.drmInfos:null,S=b?b.stream.drmInfos:null;b=(b?b.Xd:"")+" - "+(m?m.Xd:""),y&&T&&x.length&&S.length&&!(0<er(x,S).length)||e.ha.has(b)||(y={id:e.pa++,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.ha.add(b))}}d=f.call(d,g)}else d=d.return([]);return d}))})),w(a,Promise.all(n),2)):(i=a.h,r=(r=i.reduce(Ue,[])).filter((function(e){return null!=e})),a.return(r))}))}(e,a),3);case 3:return y=q.h,w(q,function(e,t){var n,i,r,a,o,s,u,c,d,f,h;return P((function(p){if(1==p.g)return n=pf(t,"SUBTITLES"),i=n.map((function(t){var n,i;return P((function(r){if(1==r.g)return e.h.disableText?r.return(null):(x(r,2),w(r,Lf(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=E(r),e.h.hls.ignoreTextStreamFailures)return r.return(null);throw i}))})),w(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=cf(s,"GROUP-ID"),(c=e.s.get(u))&&(d=e.u.get(u)))for(f=l(d),h=f.next();!h.done;h=f.next())h.value.stream.codecs=c;return p.return(r.filter((function(e){return e})))}))}(e,r),4);case 4:return b=q.h,w(q,function(e,t){var n,i;return P((function(r){return 1==r.g?(n=t.map((function(t){var n,i;return P((function(r){if(1==r.g)return e.h.disableThumbnails?r.return(null):(x(r,2),w(r,function(e,t){var n,i,r,a,o,s,u,l,c,d;return P((function(f){return 1==f.g?(n=Vf(cf(t,"URI"),e.o),i=lf(t,"CODECS","jpeg")||"",e.g.has(n)?f.return(e.g.get(n)):(r=Pf(t),a=lf(t,"NAME"),o=lf(t,"CHARACTERISTICS"),w(f,jf(e,n,i,"image",r,!1,a,null,
2null,o,!1,!1),2))):null==(s=f.h)?f.return(null):e.g.has(n)?f.return(e.g.get(n)):((u=lf(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=lf(t,"BANDWIDTH"))&&(s.stream.bandwidth=Number(d)),e.g.set(n,s),f.return(s))}))}(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=E(r),e.h.hls.ignoreImageStreamFailures)return r.return(null);throw i}))})),w(r,Promise.all(n),2)):(i=r.h,r.return(i.filter((function(e){return e}))))}))}(e,o),5);case 5:if(S=q.h,!e.j)throw new Ge(2,7,7001);if(e.qa&&0==y.length)throw new Ge(2,4,4034);for(k=A=1/0,I=l(e.g.values()),M=I.next();!M.done;M=I.next())C=M.value,A=Math.min(A,C.oe),"text"!=C.stream.type&&(k=Math.min(k,C.Bf-C.oe));if(e.l!=Xf?(e.i=new uo(0,e.h.defaultPresentationDelay?e.h.defaultPresentationDelay:e.V?e.V:3*e.fa),e.i.oc(!1)):(e.i=new uo(null,0),e.i.oc(!0)),Bf(e),e.l!=Xf)e.ga=e.G,R=$f,e.l==R.Ee&&(D=e.i.Qc,isNaN(e.h.availabilityWindowOverride)||(D=e.h.availabilityWindowOverride),e.i.Rd(D));else for(e.i.Ka(k),e.i.offset(-A),N=l(e.g.values()),M=N.next();!M.done;M=N.next())(L=M.value).stream.segmentIndex.offset(-A),L.stream.segmentIndex.Ya(0,k);for(e.N=[],j=[],_=l(y),O=_.next();!O.done;O=_.next())for(U=O.value,B=l([U.video,U.audio]),F=B.next();!F.done;F=B.next())(V=F.value)&&j.push(V);return w(q,Promise.all(j.map((function(e){return P((function(t){return w(t,e.createSegmentIndex(),0)}))}))),6);case 6:for(K=l(j),F=K.next();!F.done;F=K.next())H=F.value,e.N.push(H.segmentIndex.K);Bf(e),e.H={presentationTimeline:e.i,variants:y,textStreams:b,imageStreams:S,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0},e.j.makeTextStreamsForClosedCaptions(e.H),T(q)}}))}(r,n.data),3)):(0<(i=r.ga)&&r.C.R(i),a.return(r.H))}))},i.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.D&&(e.push(this.D.destroy()),this.D=null),this.h=this.j=null,this.ha.clear(),this.H=null,this.g.clear(),this.u.clear(),this.s.clear(),this.o.clear(),Promise.all(e)},i.update=function(){var e,t,n,i=this;return P((function(r){if(1==r.g)return i.l==Xf?r.return():(e=[],(t=Array.from(i.g.values())).length?w(r,Rf(i,t[0]),2):r.A(2));for(n=1;n<t.length;n++)e.push(Rf(i,t[n]));return w(r,Promise.all(e),0)}))},i.onExpirationUpdated=function(){}
2,V("shaka.hls.HlsParser",Cf);var Gf={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"}},zf={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new Ge(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new Ge(2,4,4041);return ut("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=cf(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=ut("com.widevine.alpha",[{initDataType:"cenc",initData:t=Re((t=Mf(t=cf(e,"URI"))).data)}]),(e=lf(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=cf(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?ut("com.microsoft.playready",[{initDataType:"cenc",initData:e=Cc(e=Re((e=Mf(e=cf(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]))}]):null}},Xf="VOD",Wf="EVENT",Yf="LIVE",$f={Fe:Xf,ng:Wf,Ee:Yf};function Jf(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,qe:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=bt(t)}catch(e){}throw new Ge(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function Qf(){}function Zf(e,t,n,i,r){var a=new ah;_i(t.headers).forEach((function(e,t){a.append(t,e)}));var o=new ih,s={Zd:!1,Be:!1};if(e=function(e,t,n,i,r,a,o){var s,u,l,c,d,f,h,p,g,m,v,y;return P((function(b){switch(b.g){case 1:return s=nh,u=rh,f=d=0,h=Date.now(),x(b,2),w(b,s(e,n),4);case 4:return l=b.h,a(eh(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 P((function(a){switch(a.g){case 1:return x(a,2),w(a,p.read(),4);case 4:n=a.h,A(a,3);break;case 2:return E(a),a.return();case 3:if(n.done){a.A(5);break}if(d+=n.value.byteLength,!o){a.A(5);break}return w(a,o(n.value),5);case 5:(100<(i=Date.now())-h||n.done)&&(r(i-h,d-f,m-d),f=d,h=i),n.done?e.close():(e.enqueue(n.value),t()),T(a)}}))}t()}}),w(b,l.arrayBuffer(),5);case 5:c=b.h,A(b,3);break;case 2:if(v=E(b),i.Zd)throw new Ge(1,1,7001,e,t);if(i.Be)throw new Ge(1,1,1003,e,t);throw new Ge(1,1,1002,e,v,t);case 3:return y=eh(l.headers),b.return(Jf(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 oi(e,(function(){return s.Zd=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var u=new rn((function(){s.Be=!0,o.abort()}));u.R(t/1e3),e.finally((function(){u.stop()}))}return e}function eh(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}function th(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}cn("Tizen 3")||cn("Tizen 2")||cn("Web0S")&&cn("Chrome/38.0.2125.122 Safari/537.36")||(pr.m3u8=function(){return new Cf},hr["application/x-mpegurl"]=function(){return new Cf},hr["application/vnd.apple.mpegurl"]=function(){return new Cf}),V("shaka.net.HttpFetchPlugin",Qf),Qf.isSupported=th,Qf.parse=Zf;var nh=e.fetch,ih=e.AbortController,rh=e.ReadableStream,ah=e.Headers;function oh(){}function sh(e,t,n,i,r){var a=new lh,o=Date.now(),s=0;return new oi(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 Ge(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){if(2==a.readyState&&!c){var e=uh(a);r(e),c=!0}},a.onload=function(){var t=uh(a),i=a.response;try{var r=Jf(t,i,a.status,e,a.responseURL,n);u(r)}catch(e){l(e)}},a.onerror=function(t){l(new Ge(1,1,1002,e,t,n))},a.ontimeout=function(){l(new Ge(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 uh(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}th()&&(wi("http",Zf,2,!0),wi("https",Zf,2,!0),wi("blob",Zf,2,!0)),V("shaka.net.HttpXHRPlugin",oh),oh.parse=sh;var lh=e.XMLHttpRequest;function ch(e,t,n,i){this.g=e,this.i=t,this.groupId=n,this.h=i}function dh(e){return e.ya().map((function(e){return"{"+encodeURI(e)+"}"})).join("")+":"+e.Ba+":"+e.la}function fh(e,t){return qo(e.g.ya(),e.g.Ba,e.g.la,t.streaming.retryParameters)}function hh(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function ph(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function gh(e){var t=this;this.o=e,this.h=new Map,this.i=new Mi((function(){return mh(t).catch((function(){}))})),this.j=[],this.m=function(){},this.l=function(){},this.g=new hh}function mh(e){var t=e.j.map((function(e){return e()}));return e.j=[],Promise.all(t)}function vh(e,t,n,i,r,a){Ci(e.i);var o=(e.h.get(t)||Promise.resolve()).then((function(){var t,o,s,u,l,c,d;return P((function(f){if(1==f.g)return w(f,function(e,t){var n,i,r,a;return P((function(o){return 1==o.g?(n=Ei,i=e.o.request(n,t),r=function(){return i.abort()},e.j.push(r),w(o,i.promise,2)):(a=o.h,ee(e.j,r),o.return(a.data))}))}(e,n),2);
2if(t=f.h,e.i.g)throw new Ge(2,9,7001);if(r)for(u in o=Re(t),(s=new Mc(o)).data)l=Number(u),c=s.data[l],d=s.g[l],e.l(c,d);e.g.close(i,t.byteLength);var h=e.g;return e.m(0==h.i?0:h.j/h.i,e.g.h),f.return(a(t))}))}));e.h.set(t,o)}function yh(e,t,n){Ci(e.i);var i=(e.h.get(t)||Promise.resolve()).then((function(){return P((function(e){return w(e,n(),0)}))}));e.h.set(t,i)}function bh(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new pt,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 wh(e,t){return new Promise((function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return P((function(i){if(1==i.g)return null==r.result?(n(),i.return()):(e=r.result,w(i,t(e.key,e.value,e),2));e.continue(),T(i)}))}}))}function Th(e){this.h=e,this.g=[]}function xh(e,t){return Sh(e,t,"readwrite")}function Sh(e,t,n){var i=new bh(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then((function(){ee(e.g,i)}),(function(){ee(e.g,i)})),i}function Ah(e,t,n){this.h=new Th(e),this.i=t,this.g=n}function Eh(e){return Promise.reject(new Ge(2,9,9011,"Cannot add new value to "+e))}function kh(e,t,n,i){t=(e=xh(e.h,t)).store();for(var r={},a=(n=l(n)).next();!a.done;r={tc:r.tc},a=n.next())r.tc=a.value,t.delete(r.tc).onsuccess=function(e){return function(){return i(e.tc)}}(r);return e.promise()}function Ih(e,t,n){var i,r,a,o,s,u,c;return P((function(d){if(1==d.g){for(i=Sh(e.h,t,"readonly"),r=i.store(),a={},o=[],s={},u=l(n),c=u.next();!c.done;s={Sb:s.Sb,Qb:s.Qb},c=u.next())s.Qb=c.value,s.Sb=r.get(s.Qb),s.Sb.onsuccess=function(e){return function(){null==e.Sb.result&&o.push(e.Qb),a[e.Qb]=e.Sb.result}}(s);return w(d,i.promise(),2)}if(o.length)throw new Ge(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function Mh(e){this.g=new Th(e)}function Ch(){this.g=new Map}function Rh(e){var t=null;
2if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){e.hasFixedKeySpace()||t||(t={path:{Aa:n,Z:i},Z:e})}))})),t)return t;throw new Ge(2,9,9013,"Could not find a cell that supports add-operations")}function Dh(e,t,n){if(!(e=e.g.get(t)))throw new Ge(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new Ge(2,9,9013,"Could not find cell with name "+n);return t}function Nh(e,t){Ph.set(e,t)}wi("http",sh,1,!0),wi("https",sh,1,!0),wi("blob",sh,1,!0),hh.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}},gh.prototype.destroy=function(){return this.i.destroy()},bh.prototype.abort=function(){var e=this;return P((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return x(t,2),w(t,e.g,4)}if(2!=t.g)return A(t,0);E(t),T(t)}))},bh.prototype.store=function(){return this.h},bh.prototype.promise=function(){return this.g},Th.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(i=Ah.prototype).destroy=function(){return this.h.destroy()},i.hasFixedKeySpace=function(){return!0},i.addSegments=function(){return Eh(this.i)},i.removeSegments=function(e,t){return kh(this,this.i,e,t)},i.getSegments=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,Ih(n,n.i,e),2):(t=i.h,i.return(t.map((function(e){return n.$d(e)}))))}))},i.addManifests=function(){return Eh(this.g)},i.updateManifest=function(){return Promise.reject(new Ge(2,9,9016,"Cannot modify values in "+this.g))},i.updateManifestExpiration=function(e,t){var n=xh(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 kh(this,this.g,e,t)},i.getManifests=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,Ih(n,n.g,e),2):(t=i.h,i.return(Promise.all(t.map((function(e){return n.Zb(e)})))))}))},i.getAllManifests=function(){var e,t,n=this;return P((function(i){return 1==i.g?(e=Sh(n.h,n.g,"readonly"),t=new Map,w(i,wh(e,(function(e,i){var r;return P((function(a){if(1==a.g)return w(a,n.Zb(i),2);r=a.h,t.set(e,r),T(a)}))})),2)):3!=i.g?w(i,e.promise(),3):i.return(t)}))},i.$d=function(e){return e},i.Zb=function(e){return Promise.resolve(e)},i.add=function(e,t){var n,i,r,a,o,s,u,c=this;return P((function(d){if(1==d.g){for(n=xh(c.h,e),i=n.store(),r=[],a={},o=l(t),s=o.next();!s.done;a={uc:a.uc},s=o.next())u=s.value,a.uc=i.add(u),a.uc.onsuccess=function(e){return function(){r.push(e.uc.result)}}(a);return w(d,n.promise(),2)}return d.return(r)}))},Mh.prototype.destroy=function(){return this.g.destroy()},Mh.prototype.getAll=function(){var e,t,n=this;return P((function(i){return 1==i.g?(e=Sh(n.g,"session-ids","readonly"),t=[],w(i,wh(e,(function(e,n){t.push(n)})),2)):3!=i.g?w(i,e.promise(),3):i.return(t)}))},Mh.prototype.add=function(e){for(var t=xh(this.g,"session-ids"),n=t.store(),i=(e=l(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},Mh.prototype.remove=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,wh(t=xh(n.g,"session-ids"),(function(t,n,i){e.includes(n.sessionId)&&i.delete()})),2):w(i,t.promise(),0)}))},Ch.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)},Ch.prototype.init=function(){var e=this;Ph.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)},V("shaka.offline.StorageMuxer",Ch),Ch.unregister=function(e){Ph.delete(e)},Ch.register=Nh,Ch.prototype.destroy=Ch.prototype.destroy;var Ph=new Map;function Lh(){Ah.apply(this,arguments)}function jh(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?_h(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=_h(e.ur
2i);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 _h(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 Ge(2,9,9004,"Could not parse uri "+e)}function Oh(){Ah.apply(this,arguments)}function Uh(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 Bh(){Ah.apply(this,arguments)}function Fh(){this.m=this.j=this.i=this.h=this.g=this.l=null}function Vh(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 Kh(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 Vh(t,n,i,Number(e[4])):null}function Hh(e,t){this.h=e,this.g=t}function qh(e,t){var n=new uo(null,0);n.Ka(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=Gh(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=Gh(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==dt})).map((function(t){return Gh(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return Gh(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 Gh(e,t,n){var i=t.segments.map((function(t){return function(e,t){var n=new Vh("segment",e.h,e.g,t.dataKey);return new so(t.startTime,t.endTime,(function(){return[n.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new Vh("segment",e.h,e.g,t);return new oo((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||"")}(e,t)}));return n.Ib(i),{id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Co(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 zh(){this.g=null}function Xh(){}function Wh(e){var t=Kh(e);return t&&"manifest"==t.g?e=li(e={uri:e,qe:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Ch;return li(void 0).aa((function(){return n.init()})).aa((function(){return Dh(n,t.Aa(),t.Z())})).aa((function(e){return e.getSegments([t.key()])})).aa((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}(t.key(),t):si(new Ge(2,1,9004,e)),e}function Yh(e,t,n){var i,r,a,o,s,u;return P((function(c){switch(c.g){case 1:i=[];for(var d=[],f=l(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var p=!1,g=l(d),m=g.next();!m.done;m=g.next())if($h((m=m.value).info,h)){m.sessionIds.push(h.sessionId),p=!0;break}p||d.push({info:h,sessionIds:[h.sessionId]})}
2r=l(d),a=r.next();case 2:if(a.done){c.A(4);break}return o=a.value,s=function(e,t,n){var i,r;return P((function(a){switch(a.g){case 1:return i=new Bi({lb:t,onError:function(){},Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(a,2),i.configure(e),w(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),Wi(e,o,[])}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:A(a,3);break;case 2:return E(a),w(a,i.destroy(),5);case 5:case 9:return a.return([]);case 3:return x(a,6),w(a,Hi(i),8);case 8:A(a,7);break;case 6:return E(a),w(a,i.destroy(),9);case 7:return r=[],w(a,Promise.all(n.sessionIds.map((function(e){return P((function(t){return 1==t.g?(x(t,2),w(t,function(e,t){var n,i,r;return P((function(a){return 1==a.g?w(a,Yi(e,t),2):3!=a.g?(n=a.h)?(i=[],(r=e.i.get(n))&&(r.La=new pt,i.push(r.La)),i.push(n.remove()),w(a,Promise.all(i),3)):a.return():(e.i.delete(n),void T(a))}))}(i,e),4)):2!=t.g?(r.push(e),A(t,0)):(E(t),void T(t))}))}))),10);case 10:return w(a,i.destroy(),11);case 11:return a.return(r)}}))}(e,t,o),w(c,s,5);case 5:u=c.h,i=i.concat(u),a=r.next(),c.A(2);break;case 4:return c.return(i)}}))}function $h(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&te(e.audioCapabilities,t.audioCapabilities,n)&&te(e.videoCapabilities,t.videoCapabilities,n)}function Jh(e,t){var n=qh(new Hh(e.Aa(),e.Z()),t),i=t.appMetadata||{};return n=Qh(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 Qh(e){for(var t=[],n=function(e){return e.filter((function(e){return Pn(e)}))}(e.variants),i=(n=l(n)).next();!i.done;i=n.next())t.push(kn(i.value));for(n=(e=l(e.textStreams)).next();!n.done;n=e.next())t.push(In(n.value));return t}function Zh(){this.g={}}function ep(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 tp(e,t){e.g[t.id]=t.bandwidth||2048}function np(e,t){var n=e.g[t];return null==n&&(n=0),n}function ip(){this.h=[],this.g=this.i=0}function rp(e){var t=this;if(e&&e.constructor!=Ws)throw new Ge(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.bc()):(this.h=Fs(),this.g=new bi),this.i=[],this.j=[];var n=!e;this.l=new Mi((function(){var e,i,r,a,o;return P((function(s){switch(s.g){case 1:return w(s,Promise.all(t.j.map((function(e){return mh(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 w(s,Promise.all(i),3);case 3:if(!n){s.A(4);break}return w(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,T(s)}}))}))}function ap(){if(an())e:{for(var e=l(Ph.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 op(e){var t,n,i;return P((function(r){switch(r.g){case 1:return w(r,(t=new Ch).init(),2);case 2:return w(r,Rh(t),3);case 3:return n=r.h,i=new Vh("manifest",n.path.Aa,n.path.Z,e),w(r,t.destroy(),4);case 4:return w(r,(new rp).remove(i.toString()),0)}}))}function sp(e,t,n,i){var r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,S;return P((function(A){switch(A.g){case 1:return r=new Ch,a=dh(t),o=!1,d=0,x(A,2,3),w(A,r.init(),5);case 5:return w(A,Rh(r),6);case 6:return w(A,(u=A.h).Z.addSegments([n]),7);case 7:return f=A.h,s=f[0],i(),w(A,function(){var e,t=yp;return P((function(n){return 1==n.g?(e=++t.i,t.g?w(n,new Promise((function(n){t.h.push((function(){t.g=e,n()}))})),2):(t.g=e,n.A(2))):n.return(e)}))}(),8);case 8:return d=A.h,i(),w(A,u.Z.getManifests([e]),9);case 9:for(h=A.h,i(),c=h[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),w(A,u.Z.updateManifest(e,c),10);case 10:o=!0,i();case 3:return k(A),w(A,r.destroy(),11);case 11:yp.release(d),I(A,4);break;case 2:return S=E(A),w(A,op(e),12);case 12:if(!u||o||!s){A.A(13);break}return w(A,u.Z.removeSegments([s],(function(){})),13);case 13:throw S;case 4:return A.return(c)}}))}function up(e){return e.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t}))}function lp(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 cp(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:Lt(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:Lt(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function dp(e,t,n){return P((function(i){return w(i,function(e,t,n,i){var r,a,o;return P((function(s){return 1==s.g?i.drmInfo?(r=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new Ge(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:cp(i,!1),videoCapabilities:cp(i,!0)}})),w(s,Yh(t,e,a),2)):s.return():3!=s.g?(o=s.h,w(s,r.remove(o),3)):w(s,r.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.g,e.h.drm,n,t),0)}))}function fp(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 Jh(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}function hp(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.Qa(),(function(n){var o=dh(n),s=void 0;if(!r.has(o)){var u=n.endTime-n.startTime;u=np(t,i.id)*u,u=ph(e.g,u),r.set(o,new ch(n,u,i.id,!1))}n.g&&(s=dh(n.g),r.has(s)||(u=.5*np(t,i.id),u=ph(e.g,u),r.set(s,new ch(n.g,u,i.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 pp(e){if(e.l.g)throw new Ge(2,9,7001)}function gp(){if(!ap())throw new Ge(2,9,9e3)}function mp(e,t){return P((function(n){return 1==n.g?(e.i.push(t),S(n),w(n,t,4)):2!=n.g?n.return(n.h):(k(n),ee(e.i,t),I(n,0))}))}function vp(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);
2for(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(Lh,Ah),Lh.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return P((function(o){return n=xh(a.h,a.g),i=n.store(),r=new pt,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new Ge(2,9,9012,"Could not find values for "+e))},w(o,Promise.all([n.promise(),r]),0)}))},Lh.prototype.Zb=function(e){var t,n,i,r,a,o;return P((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=jh(e.periods[n],r),t.push(a);return w(s,kd(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})}))},Lh.prototype.$d=function(e){return{data:e.data}},m(Oh,Ah),Oh.prototype.Zb=function(e){var t,n,i,r,a,o;return P((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),f=d.next();!f.done;f=d.next())0!=(f=f.value).variantIds.length&&c.push(Uh(f,u.startTime,u.startTime+r));a=c,t.push(a)}return w(s,kd(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(Bh,Ah),(i=Bh.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=xh(e.h,e.g)).store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}(this,e,t)},i.Zb=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(i=Fh.prototype).init=function(){var t=this,n=new pt,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 Lh(e,"segment","manifest"):null,t.g=r,r=(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new Oh(e,"segment-v2","manifest-v2"):null,t.h=r,r=(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new Oh(e,"segment-v3","manifest-v3"):null,t.i=r,r=(r=e.objectStoreNames).contains("manifest-v5")&&r.contains("segment-v5")?new Bh(e,"segment-v5","manifest-v5"):null,t.j=r,e=e.objectStoreNames.contains("session-ids")?new Mh(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 Ge(2,9,9001,i.error)),e.preventDefault()},n},i.destroy=function(){var e=this;return P((function(t){switch(t.g){case 1:if(!e.g){t.A(2);break}return w(t,e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return w(t,e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return w(t,e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return w(t,e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return w(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 P((function(n){switch(n.g){case 1:if(!t.g){n.A(2);break}return w(n,t.g.destroy(),2);case 2:if(!t.h){n.A(4);break}return w(n,t.h.destroy(),4);case 4:if(!t.i){n.A(6);break}return w(n,t.i.destroy(),6);case 6:if(!t.j){n.A(8);break}return w(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),w(n,function(){var t=new pt,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new Ge(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,w(n,t.init(),0)}}))},Nh("idb",(function(){return cn("CrKey")||!e.indexedDB?null:new Fh})),Vh.prototype.Aa=function(){return this.i},Vh.prototype.Z=function(){return this.h},Vh.prototype.key=function(){return this.l},Vh.prototype.toString=function(){return this.j},(i=zh.prototype).configure=function(){},i.start=function(e,t){var n,i,r,a,o,s,u=this;return P((function(l){switch(l.g){case 1:if(n=Kh(e),u.g=n,null==n||"manifest"!=n.g)throw new Ge(2,1,9004,e);return i=new Ch,S(l),w(l,i.init(),4);case 4:return w(l,Dh(i,n.Aa(),n.Z()),5);case 5:return w(l,l.h.getManifests([n.key()]),6);case 6:return r=l.h,a=r[0],o=new Hh(n.Aa(),n.Z()),s=qh(o,a),t.makeTextStreamsForClosedCaptions(s),l.return(s);case 2:return k(l),w(l,i.destroy(),7);case 7:I(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 P((function(c){switch(c.g){case 1:return n=l.g,i=new Ch,x(c,2,3),w(c,i.init(),5);case 5:return w(c,Dh(i,n.Aa(),n.Z()),6);case 6:return w(c,(r=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),u=null==o.expiration||o.expiration>t,!s||!u){c.A(3);break}return w(c,r.updateManifestExpiration(n.key(),t),3);case 3:return k(c),w(c,i.destroy(),10);case 10:I(c,0);break;case 2:E(c),c.A(3)}}))},hr["application/x-offline-manifest"]=function(){return new zh},V("shaka.offline.OfflineScheme",Xh),Xh.plugin=Wh,wi("offline",Wh),ip.prototype.release=function(e){e==this.g&&(this.g=0,0<this.h.length&&this.h.shift()())},(i=rp.prototype).destroy=function(){return this.l.destroy()},i.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=Us(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Le("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),Vs(this.h,e)},i.getConfiguration=function(){var e=Fs();return Vs(e,this.h,Fs()),e},i.bc=function(){return this.g},i.store=function(e,t,n){var i=this,r=this.getConfiguration(),a=new gh(this.g);this.j.push(a),t=function(e,t,n,i,r,a){var o,s,u,c,d,f,h,p,g,m,v,y,b;return P((function(S){switch(S.g){case 1:return gp(),s=o=null,u=new Ch,f=d=c=null,x(S,2,3),w(S,i(),5);case 5:return o=S.h,w(S,function(e,t,n,i){var r,a,o,s,u;return P((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),pp(e),w(l,n.start(t,o),2);if(3!=l.g)return s=l.h,pp(e),u=vp(s),w(l,Promise.all(Se(u,(function(e){return e.createSegmentIndex()}))),3);if(pp(e),r)throw r;return l.return(s)}))}(e,t,o,r),6);case 6:if(h=S.h,pp(e),!(!h.presentationTimeline.T()&&!h.presentationTimeline.kb()))throw new Ge(2,9,9005,t);return w(S,function(e,t,n,i){var r;
2return P((function(a){switch(a.g){case 1:return(r=new Bi({lb:e.g,onError:n,Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(i.drm),w(a,function(e,t,n){return e.pa=!0,e.C=[],e.N=n,Vi(e,t)}(r,t.variants,i.offline.usePersistentLicense),2);case 2:return w(a,Hi(r),3);case 3:return w(a,qi(r),4);case 4:return a.return(r)}}))}(e,h,(function(e){f=f||e}),r),7);case 7:if(s=S.h,pp(e),f)throw f;return w(S,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,k,I,M,C,R,D,N,L,j,_;return P((function(P){switch(P.g){case 1:return n={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return vn(e,t,n)}))}(e,t.restrictions,n),w(P,bn(e,t.offline.usePersistentLicense),2);case 2:for(i=[],r=t.preferredAudioChannelCount,a=t.preferredDecodingAttributes,o=t.preferredVideoCodecs,s=t.preferredAudioCodecs,pn(e,o,s,r,a),u=l(e.variants),c=u.next();!c.done;c=u.next())d=c.value,i.push(kn(d));for(f=l(e.textStreams),h=f.next();!h.done;h=f.next())p=h.value,i.push(In(p));for(g=l(e.imageStreams),m=g.next();!m.done;m=g.next())v=m.value,i.push(Mn(v));return w(P,t.offline.trackSelectionCallback(i),3);case 3:for(y=P.h,b=e.presentationTimeline.getDuration(),S=0,k=l(y),I=k.next();!I.done;I=k.next())M=I.value,C=M.bandwidth*b/8,S+=C;return x(P,4),w(P,t.offline.downloadSizeCallback(S),6);case 6:if(!P.h)throw new Ge(2,9,9014);A(P,5);break;case 4:if((R=E(P))instanceof Ge)throw R;throw new Ge(2,9,9015);case 5:for(D=new Set,N=new Set,L=new Set,j=l(y),I=j.next();!I.done;I=j.next())"variant"==(_=I.value).type&&D.add(_.id),"text"==_.type&&N.add(_.id),"image"==_.type&&L.add(_.id);e.variants=e.variants.filter((function(e){return D.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return N.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return L.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(P)}}))}(h,r),8);case 8:return w(S,u.init(),9);case 9:return pp(e),w(S,Rh(u),10);case 10:return c=S.h,pp(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=Qh(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&&Gi(e,"cenc",t)}));var u=up(t)&&!lp(t),c=null;u&&(c=bp.get(e.g.keySystem));for(var d=new Zh,f=l(t.textStreams),h=f.next();!h.done;h=f.next())d.g[h.value.id]=52;for(f=l(t.imageStreams),h=f.next();!h.done;h=f.next())tp(d,h.value);for(h=l(t.variants),f=h.next();!f.done;f=h.next())ep(d,f.value);return d=function(e,t,n){for(var i=new Map,r=vp(n),a=new Map,o=(r=l(r)).next();!o.done;o=r.next()){var s=hp(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()),Td:Array.from(i.values())}}(a,d,t),a=d.streams,d=d.Td,h=e.g,f=r.offline.usePersistentLicense,h&&f&&(h.initData=[]),{zf:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.ac(),streams:a,sessionIds:f?Xi(e):[],drmInfo:h,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode},Td:d}}(s,h,t,n,r,a),g=p.zf,m=p.Td,w(S,c.Z.addManifests([g]),11);case 11:if(v=S.h,pp(e),d=v[0],pp(e),f)throw f;return w(S,function(e,t,n,i,r,a,o,s,u){var c,d;return P((function(f){switch(f.g){case 1:if(c=function(t,c){var d,f,h,p,g,m,v,y;return P((function(b){if(1==b.g){for(d=function(){pp(e)},f={},h=l(t),p=h.next();!p.done;f={qc:f.qc,Ua:f.Ua},p=h.next())f.Ua=p.value,f.qc=void 0,g=fh(f.Ua,a),m=f.Ua.i,v=f.Ua.h,y=function(e){return function(t){return e.qc=t,Promise.resolve()}}(f),vh(r,f.Ua.groupId,g,m,v,y),yh(r,f.Ua.groupId,function(e){return function(){var t;return P((function(r){if(1==r.g)return t=e.Ua.g,w(r,sp(n,t,{data:e.qc},d),2);i=r.h||i,T(r)}))}}(f));return w(b,function(e){return P((function(t){return 1==t.g?w(t,Promise.all(e.h.values()),2):t.return(e.g.h)}))}(r),2)}return c?(pp(e),function(e,t,n,i){if(t.expiration=n.ac(),n=Xi(n),t.sessionIds=i.offline.usePersistentLicense?n:[],up(e)&&i.offline.usePersistentLicense&&!n.length)throw new Ge(2,9,9007)}(s,i,u,a),w(b,o.updateManifest(n,i),0)):b.A(0)}))},d=!1,!up(s)||!d||lp(s)){f.A(2);break}return w(f,c(t.filter((function(e){return e.h})),!0),3);case 3:pp(e),t=t.filter((function(e){return!e.h}));case 2:if(d){f.A(0);break}return w(f,c(t,!1),5);case 5:pp(e),T(f)}}))}(e,m,d,g,a,r,c.Z,h,s),12);case 12:return pp(e),y=new Vh("manifest",c.path.Aa,c.path.Z,d),S.return(Jh(y,g));case 3:return k(S),w(S,u.destroy(),13);case 13:if(!o){S.A(14);break}return w(S,o.stop(),14);case 14:if(!s){S.A(16);break}return w(S,s.destroy(),16);case 16:I(S,0);break;case 2:if(b=E(S),null==d){S.A(18);break}return w(S,op(d),18);case 18:throw f||b}}))}(this,e,t||{},(function(){var t;return P((function(a){return 1==a.g?w(a,cr(e,i.g,r.manifest.retryParameters,n||null),2):(t=a.h,a.return(Ve(t)))}))}),r,a);var o=new oi(t,(function(){return mh(a)}));return o.finally((function(){ee(i.j,a)})),o.then=function(e){return Le("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(){ee(e.i,n)}))}(this,o)},i.mf=function(){return Le("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},i.remove=function(e){return mp(this,function(e,t){var n,i,r,a,o,s;return P((function(u){switch(u.g){case 1:if(gp(),null==(n=Kh(t))||"manifest"!=n.g)throw new Ge(2,9,9004,t);return i=n,r=new Ch,S(u),w(u,r.init(),4);case 4:return w(u,Dh(r,i.Aa(),i.Z()),5);case 5:return w(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],w(u,Promise.all([dp(e,s,r),fp(a,i,s)]),2);case 2:return k(u),w(u,r.destroy(),8);case 8:I(u,0)}}))}(this,e))},i.Of=function(){return mp(this,function(e){var t,n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return gp(),t=e.g,n=e.h.drm,i=new Ch,r=!1,S(f),w(f,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){f.A(2);break}return w(f,(u=s.value).getAll(),8);case 8:return c=f.h,w(f,Yh(n,t,c),9);case 9:return d=f.h,w(f,u.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),f.A(5);break;case 2:return k(f),w(f,i.destroy(),11);case 11:I(f,3);break;case 3:return f.return(!r)}}))}(this))},i.list=function(){return mp(this,P((function(i){switch(i.g){case 1:return gp(),e=[],t=new Ch,S(i),w(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({Aa:n,Z:i},e)}))}))}(t,(function(t,i){n=n.then((function(){return P((function(n){if(1==n.g)return w(n,i.getAllManifests(),2);n.h.forEach((function(n,i){var r=Jh(new Vh("manifest",t.Aa,t.Z,i),n);e.push(r)})),T(n)}))}))})),w(i,n,2);case 2:return k(i),w(i,t.destroy(),6);case 6:I(i,3);break;case 3:return i.return(e)}})));var e,t,n},V("shaka.offline.Storage",rp),rp.deleteAll=function(){var e;return P((function(t){return 1==t.g?(e=new Ch,S(t),w(t,function(e){var t,n;return P((function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0<t.length)||Ph.forEach((function(e){(e=e())&&t.push(e)})),w(i,Promise.all(t.map((function(e){return e.erase()}))),2)):n?i.A(0):w(i,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(k(t),w(t,e.destroy(),5)):I(t,0)}))},rp.prototype.list=rp.prototype.list,rp.prototype.removeEmeSessions=rp.prototype.Of,rp.prototype.remove=rp.prototype.remove,rp.prototype.getStoreInProgress=rp.prototype.mf,rp.prototype.store=rp.prototype.store,rp.prototype.getNetworkingEngine=rp.prototype.bc,rp.prototype.getConfiguration=rp.prototype.getConfiguration,rp.prototype.configure=rp.prototype.configure,rp.prototype.destroy=rp.prototype.destroy,rp.support=ap;var yp=new ip,bp=(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 wp(){}function Tp(e,t){for(var n={priority:t||0,Je:e},i=l(Ee(xp)),r=i.next();!r.done;r=i.next()){var a=(r=r.value).ca;if(r.item.priority<n.priority)return void xp.splice(a,0,n)}xp.push(n)}bl.offline=ap,V("shaka.polyfill",wp),wp.register=Tp,wp.installAll=function(){for(var e=l(xp),t=e.next();!t.done;t=e.next()){t=t.value;try{t.Je()}catch(e){X("Error installing polyfill!",e)}}};var xp=[];function Sp(){}function Ap(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=l(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Ep(t.value)}function Ep(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 kp(){}function Ip(){pv()}function Mp(){}function Cp(){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",Rp),document.addEventListener("webkitfullscreenerror",Rp),document.addEventListener("mozfullscreenchange",Rp),document.addEventListener("mozfullscreenerror",Rp),document.addEventListener("MSFullscreenChange",Rp),document.addEventListener("MSFullscreenError",Rp)}}function Rp(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 Dp(){}function Np(){}function Pp(){}function Lp(){(cn("CrKey")||un()||cn("PlayStation 5")||!navigator.mediaCapabilities)&&(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),_p=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=jp)}function jp(e){var t,n,i,r,a,o,s,u,l,c,d,f;return P((function(h){switch(h.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},!e)return h.return(t);if("media-source"==e.type){if(!an()||e.video&&(n=e.video.contentType,!MediaSource.isTypeSupp
2orted(n))||e.audio&&(i=e.audio.contentType,!MediaSource.isTypeSupported(i)))return h.return(t)}else{if("file"!=e.type)return h.return(t);if(e.video&&(r=e.video.contentType,!on(r))||e.audio&&(a=e.audio.contentType,!on(a)))return h.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),x(h,3),w(h,navigator.requestMediaKeySystemAccess(o.keySystem,[d]),5)):(t.supported=!0,h.return(Promise.resolve(t)));case 5:f=h.h,A(h,4);break;case 3:E(h);case 4:f&&(t.supported=!0,t.keySystemAccess=f);case 2:return h.return(t)}}))}wp.Aria=Sp,Sp.install=Ap,Tp(Ap),wp.EncryptionScheme=kp,kp.install=Ip,Tp(Ip,-2),wp.Fullscreen=Mp,Mp.install=Cp,Tp(Cp),wp.MathRound=Dp,Dp.install=Np,Tp(Np),wp.MediaCapabilities=Pp,Pp.install=Lp;var _p=null;function Op(){}function Up(){var t=ln();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?(Bp(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Bp()):(cn("Tizen 2")||cn("Tizen 3")||cn("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=_t(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;cn("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 Bp(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,L.apply(0,arguments));return t.abort=function(){},t}}function Fp(){}function Vp(){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 Kp;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new fi("change");n.dispatchEvent(e)}))}()}function Kp(){pi.call(this),this.type="",this.angle=0}function Hp(){}function qp(){if(e.HTMLVideoElement&&e.WebKitMediaKeys){var t=ln();navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&t&&14<=t||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=zp,e.MediaKeys=Yp,e.MediaKeySystemAccess=Wp,navigator.requestMediaKeySystemAccess=Gp,e.shakaMediaKeysPolyfill=!0)}}function Gp(e,t){try{var n=new Wp(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function zp(e){var t=this.mediaKeys;return t&&t!=e&&$p(t,null),delete this.mediaKeys,(this.mediaKeys=e)?$p(e,this):Promise.resolve()}function Xp(e){if(De(e=Re(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=wt(e=yt(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Ce(e),this.dispatchEvent(t)}function Wp(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 Yp(e){this.h=new WebKitMediaKeys(e),this.g=new Ri}function $p(e,t){if(e.g.nb(),!t)return Promise.resolve();e.g.B(t,"webkitneedkey",Xp);try{return go(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Jp(e){pi.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new Ri,this.sessionId="",this.expiration=NaN,this.closed=new pt,this.keyStatuses=new Zp}function Qp(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new fi("keystatuseschange"),e.dispatchEvent(n)}function Zp(){this.size=0,this.g=void 0}function eg(){}function tg(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,e.MediaKeys=og,e.MediaKeySystemAccess=rg,navigator.requestMediaKeySystemAccess=ng,HTMLMediaElement.prototype.setMediaKeys=ag,e.shakaMediaKeysPolyfill=!0)}function ng(e,t){try{var n=new rg(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function ig(e){if(e.initData){var t=new CustomEvent("encrypted");t.initDataType="cenc",t.initData=Ce(function(e){if(!e)return e;var t=new Mc(e);if(1>=t.data.length)return e;e=[];for(var n={},i=(t=l(t.data)).next();!i.done;n={rc:n.rc},i=t.next())n.rc=i.value,e.some(function(e){return function(t){return Ie(t,e.rc)}}(n))||e.push(n.rc);return Ct.apply(St,c(e))}(e.initData)),this.dispatchEvent(t)}}function rg(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 ag(e){var t=this.mediaKeys;return t&&t!=e&&sg(t,null),delete this.mediaKeys,(this.mediaKeys=e)?sg(e,this):Promise.resolve()}function og(e){this.h=new MSMediaKeys(e),this.g=new Ri}function sg(e,t){if(e.g.nb(),!t)return Promise.resolve();e.g.B(t,"msneedkey",ig);try{return go(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.msSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function ug(e){pi.call(this),this.i=null,this.l=e,this.h=this.g=null,this.j=new Ri,this.sessionId="",this.expiration=NaN,this.closed=new pt,this.keyStatuses=new cg}function lg(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new fi("keystatuseschange"),e.dispatchEvent(n)}function cg(){this.size=0,this.g=void 0}function dg(){}function fg(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=hg,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=pg,e.MediaKeys=gg,e.MediaKeySystemAccess=mg,e.shakaMediaKeysPolyfill=!0)}function hg(){return Promise.reject(Error("The key system specified is not supported."))}function pg(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function gg(){throw new TypeError("Illegal constructor.")}function mg(){throw this.keySystem="",new TypeError("Illegal constructor.")}function vg(){}function yg(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
2(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Dg="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=wg,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Tg,e.MediaKeys=Sg,e.MediaKeySystemAccess=xg,e.shakaMediaKeysPolyfill=!0}}function bg(e){return Dg?Dg+e.charAt(0).toUpperCase()+e.slice(1):e}function wg(e,t){try{var n=new xg(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Tg(e){var t=this.mediaKeys;return t&&t!=e&&Ag(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Ag(e,this),Promise.resolve()}function xg(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 Sg(e){this.l=e,this.h=null,this.g=new Ri,this.i=[],this.j=new Map}function Ag(e,t){e.h=t,e.g.nb();var n=Dg;t&&(e.g.B(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=Ce(t.initData),e.h.dispatchEvent(n)})),e.g.B(t,n+"keymessage",(function(t){var n=Eg(e,t.sessionId);n&&(t=new fi("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.B(t,n+"keyadded",(function(t){(t=Eg(e,t.sessionId))&&(Cg(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.g.B(t,n+"keyerror",(function(t){var n=Eg(e,t.sessionId);n&&n.handleError(t)})))}function Eg(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 kg(e,t,n){pi.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 pt,this.keyStatuses=new Rg}function Ig(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=Re(wt("LOAD_SESSION|"+n));else{var r=wt("PERSISTENT|");i=Ct(r,t)}else i=Re(t)}catch(e){return Promise.reject(e)}e.h=new pt;var a=bg("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new rn((function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}})).R(.01)}return e.h}function Mg(e,t,n){if(e.g)e.g.then((function(){return Mg(e,t,n)})).catch((function(){return Mg(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=vt(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=kt(r.keys[0].k),r=kt(r.keys[0].kid)}else i=Re(n),r=null;var a=bg("addKey");try{e.j[a](e.i,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function Cg(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new fi("keystatuseschange"),e.dispatchEvent(n)}function Rg(){this.size=0,this.g=void 0}Pp.originalMcap=_p,Tp(Lp,-1),wp.MediaSource=Op,Op.install=Up,Tp(Up),wp.Orientation=Fp,Fp.install=Vp,m(Kp,pi),Kp.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))},Kp.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Tp(Vp),wp.PatchedMediaKeysApple=Hp,Hp.install=qp,Wp.prototype.createMediaKeys=function(){var e=new Yp(this.keySystem);return Promise.resolve(e)},Wp.prototype.getConfiguration=function(){return this.g},Yp.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Jp(this.h,e)},Yp.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Jp,pi),(i=Jp.prototype).generateRequest=function(e,t){var n=this;this.g=new pt;try{var i=this.l.createSession("video/mp4",Re(t));this.i=i,this.sessionId=i.sessionId||"",this.j.B(this.i,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new fi("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",Ce(e.message))),n.dispatchEvent(e)})),this.j.B(i,"webkitkeyadded",(function(){n.h&&(Qp(n,"usable"),n.h.resolve(),n.h=null)})),this.j.B(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:Qp(n,"output-not-allowed");break;default:Qp(n,"internal-error")}})),Qp(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 pt;try{this.i.update(Re(e))}catch(e){this.h.reject(e)}return this.h},i.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}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=Zp.prototype).forEach=function(e){this.g&&e(this.g,ur.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=ur.value();return!(!this.g||!Ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},Tp(qp),wp.PatchedMediaKeysMs=eg,eg.install=tg,rg.prototype.createMediaKeys=function(){var e=new og(this.keySystem);return Promise.resolve(e)},rg.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,pi),(i=ug.prototype).generateRequest=function(e,t){var n=this;this.g=new pt;try{this.i=this.l.createSession("video/mp4",Re(t),null),this.j.B(this.i,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new fi("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",Ce(e.message))),n.dispatchEvent(e)})),this.j.B(this.i,"mskeyadded",(function(){n.g?(lg(n,"usable"),n.g.resolve(),n.g=null):n.h&&(lg(n,"usable"),n.h.resolve(),n.h=null)})),this.j.B(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: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 pt;try{this.i.update(Re(e))}catch(e){this.h.reject(e)}return this.h},i.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}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,ur.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=ur.value();return!(!this.g||!Ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},Tp(tg),wp.PatchedMediaKeysNop=dg,dg.install=fg,gg.prototype.createSession=function(){},gg.prototype.setServerCertificate=function(){},mg.prototype.getConfiguration=function(){},mg.prototype.createMediaKeys=function(){},Tp(fg,-10),wp.PatchedMediaKeysWebkit=vg,vg.install=yg,xg.prototype.createMediaKeys=function(){var e=new Sg(this.g);return Promise.resolve(e)},xg.prototype.getConfiguration=function(){return this.h},Sg.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 kg(t,this.l,e),this.i.push(e),e},Sg.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(kg,pi),(i=kg.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?Cg(this,"output-restricted"):Cg(this,1==t?"expired":"internal-error"))},i.generateRequest=function(e,t){return Ig(this,t,null)},i.load=function(e){return"persistent-license"==this.l?Ig(this,null,e):Prom
2ise.reject(Error("Not a persistent session."))},i.update=function(e){var t=new pt;return Mg(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=bg("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=Rg.prototype).forEach=function(e){this.g&&e(this.g,ur.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=ur.value();return!(!this.g||!Ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var Dg="";function Ng(){}function Pg(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=jg,Object.defineProperty(t,"disablePictureInPicture",{get:Og,set:Ug,enumerable:!0,configurable:!0}),document.exitPictureInPicture=_g,document.addEventListener("webkitpresentationmodechanged",Lg,!0))}}function Lg(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 jg(){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 _g(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Og(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Ug(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Bg(){}function Fg(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=Vg))}function Vg(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function Kg(){}function Hg(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=qg)}function qg(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function Gg(){}function zg(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function Xg(){}function Wg(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Yg)}}function Yg(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function $g(){}function Jg(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=Qg;else if(6==n)t=Zg;else{try{var i=!!Qg(1,2,"")}catch(e){i=!1}i&&(t=Qg)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function Qg(t,n,i){return new e.TextTrackCue(t,n,i)}function Zg(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function em(){}Tp(yg),wp.PiPWebkit=Ng,Ng.install=Pg,Tp(Pg),wp.RandomUUID=Bg,Bg.install=Fg,Tp(Fg),wp.StorageEstimate=Kg,Kg.install=Hg,Tp(Hg),wp.VideoPlayPromise=Gg,Gg.install=zg,Tp(zg),wp.VideoPlaybackQuality=Xg,Xg.install=Wg,Tp(Wg),wp.VTTCue=$g,$g.install=Jg,Tp(Jg),em.prototype.parseInit=function(){},em.prototype.setSequenceMode=function(){},em.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=vt(e).split(/\r?\n/),a=(r=l(r)).next();!a.done;a=r.next())if((a=a.value)&&!/^\s+$/.test(a)&&(a=tm.exec(a))){var o=nm.exec(a[1]);a=new ie(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},V("shaka.text.LrcTextParser",em),em.prototype.parseMedia=em.prototype.parseMedia,em.prototype.setSequenceMode=em.prototype.setSequenceMode,em.prototype.parseInit=em.prototype.parseInit;var tm=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,nm=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function im(){}function rm(e,t,n,i,r,a,o,s,u,c,d){var f=e.parentNode;if(e.nodeType==Node.COMMENT_NODE)return null;if(e.nodeType==Node.TEXT_NODE){if(!d)return null;var h=document.createElement("span");h.textContent=e.textContent}else h=e;for(var p=null,g=l(Rm),m=g.next();!m.done&&!(p=cm(h,"backgroundImage",i,"#",m.value)[0]);m=g.next());if(g=d,("p"==e.nodeName||p)&&(d=!0),s="default"==(h.getAttribute("xml:space")||(s?"default":"preserve")),e=[],!(m=Array.from(h.childNodes).every((function(e){return e.no
2deType==Node.TEXT_NODE}))))for(var v=l(h.childNodes),y=v.next();!y.done;y=v.next())(y=rm(y.value,t,n,i,r,a,o,s,u,h,d))&&e.push(y);i=null!=c,v=/\S/.test(h.textContent);var b=h.hasAttribute("begin")||h.hasAttribute("end")||h.hasAttribute("dur");if(!(b||v||"br"==h.tagName||0!=e.length||i&&!s))return null;for(v=(y=fm(h,n)).start,y=y.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)v=(y=dm(f,n,v,y)).start,y=y.end,f=f.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"==h.tagName)return(r=new ie(v,y,"")).lineBreak=!0,r;if(t="",m&&(t=h.textContent,s&&(t=(t=t.trim()).replace(/\s+/g," "))),(t=new ie(v,y,t)).nestedCues=e,d||(t.isContainer=!0),u&&(t.cellResolution=u),u=cm(h,"region",a,"")[0],h.hasAttribute("region")&&u&&u.getAttribute("xml:id")){var w=u.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==w}))[0]}return o=u,c&&i&&!h.getAttribute("region")&&!h.getAttribute("style")&&(o=cm(c,"region",a,"")[0]),function(e,t,n,i,r,a,o){a=a||o,"rtl"==om(t,n,r,"direction",a)&&(e.direction="rtl"),o=om(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=ce),(o=om(t,n,r,"textAlign",!0))?(e.positionAlign=Im[o],e.lineAlign=km[o],e.textAlign=se[o.toUpperCase()]):e.textAlign="start",(o=om(t,n,r,"displayAlign",!0))&&(e.displayAlign=le[o.toUpperCase()]);(o=om(t,n,r,"color",a))&&(e.color=o);(o=om(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o);(o=om(t,n,r,"border",a))&&(e.border=o);(o=om(t,n,r,"fontFamily",a))&&(e.fontFamily=o);(o=om(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=om(t,n,r,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=om(t,n,r,"lineHeight",a))&&o.match(ym)&&(e.lineHeight=o),(o=om(t,n,r,"fontSize",a))&&(o.match(ym)||o.match(vm))&&(e.fontSize=o),(o=om(t,n,r,"fontStyle",a))&&(e.fontStyle=be[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=om(t,n,r,"textOutline",a))&&(i=i.split(" "),i[0].match(ym)?e.textStrokeColor=e.color:(e.textStrokeColor=i[0],i.shift()),i[0]&&i[0].match(ym)?e.textStrokeWidth=i[0]:e.textStrokeColor="");(i=om(t,n,r,"letterSpacing",a))&&i.match(ym)&&(e.letterSpacing=i),(i=om(t,n,r,"linePadding",a))&&i.match(ym)&&(e.linePadding=i),(a=om(t,n,r,"opacity",a))&&(e.opacity=parseFloat(a));(n=sm(n,r,"textDecoration"))&&am(e,n),(t=um(t,r,"textDecoration"))&&am(e,t)}(t,h,o,p,r,g,0==e.length),t}function am(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")&&ee(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&ee(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&ee(e.textDecoration,"overline")}}function om(e,t,n,i,r){return r=void 0===r||r,(e=um(e,n,i))?e:r?sm(t,n,i):null}function sm(e,t,n){if(!e)return null;var i=jc(e,Cm,n);return i||lm(e,t,n)}function um(e,t,n){var i=jc(e,Cm,n);return i||lm(e,t,n)}function lm(e,t,n){e=cm(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=Lc(e[r],"urn:ebu:tt:style",n);a||(a=jc(e[r],Cm,n)),a||(a=um(e[r],t,n)),a&&(i=a)}return i}function cm(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=r?Lc(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 dm(e,t,n,i){return e=fm(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 fm(e,t){var n=hm(e.getAttribute("begin"),t),i=hm(e.getAttribute("end"),t),r=hm(e.getAttribute("dur"),t);return null==i&&null!=r&&(i=n+r),{start:n,end:i}}function hm(e,t){var n=null;if(wm.test(e)){n=wm.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(Tm.test(e))n=pm(Tm,e);else if(xm.test(e))n=pm(xm,e);else if(Sm.test(e))n=Sm.exec(e),n=Number(n[1])/t.frameRate;else if(Am.test(e))n=Am.exec(e),n=Number(n[1])/t.g;else if(Em.test(e))n=pm(Em,e);else if(e)throw new Ge(2,2,2001,"Could not parse cue time range in TTML");return n}function pm(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 gm(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]))}Ht["application/x-subtitle-lrc"]=function(){return new em},im.prototype.parseInit=function(){},im.prototype.setSequenceMode=function(){},im.prototype.parseMedia=function(e,t){var n=vt(e),i=[],r=new DOMParser,a=null;if(""==n)return i;try{a=r.parseFromString(n,"text/xml")}catch(e){throw new Ge(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new Ge(2,2,2005,n.textContent);var o=a.getElementsByTagName("tt")[0];if(!o)throw new Ge(2,2,2005,"TTML does not contain <tt> tag.");if(!(a=o.getElementsByTagName("body")[0]))return[];var s=jc(o,Mm,"frameRate"),u=jc(o,Mm,"subFrameRate"),c=jc(o,Mm,"frameRateMultiplier"),d=jc(o,Mm,"tickRate"),f=jc(o,Mm,"cellResolution");if(n=o.getAttribute("xml:space")||"default",r=jc(o,Cm,"extent"),"default"!=n&&"preserve"!=n)throw new Ge(2,2,2005,"Invalid xml:space value: "+n);n="default"==n,s=new gm(s,u,c,d),f=f&&(f=/^(\d+) (\d+)$/.exec(f))?{columns:parseInt(f[1],10),rows:parseInt(f[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 h=l(o=Array.from(o.getElementsByTagName("region"))),p=h.next();!p.done;p=h.next()){var g=p.value;p=new we;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;r&&(b=mm.exec(r)||bm.exec(r)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=sm(g,c,"extent"))&&(null!=(v=(y=mm.exec(v))||bm.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?Te:0,p.heightUnits=y||null!=b?Te:0)),(g=sm(g,c,"origin"))&&(null!=(v=(y=mm.exec(g))||bm.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?Te:0))}else p=null;p&&d.push(p)}if(Nc(a,"p").length)throw new Ge(2,2,2001,"<p> can only be inside <div> in TTML");for(h=(r=l(Nc(a,"div"))).next();!h.done;h=r.next())if(Nc(h.value,"span").length)throw new Ge(2,2,2001,"<span> can only be inside <p> in TTML");(a=rm(a,t.periodStart,s,u,c,o,d,n,f,null,!1))&&i.push(a)}return i},V("shaka.text.TtmlTextParser",im),im.prototype.parseMedia=im.prototype.parseMedia,im.prototype.setSequenceMode=im.prototype.setSequenceMode,im.prototype.parseInit=im.prototype.parseInit;var mm=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vm=/^(\d{1,2}(?:\.\d+)?|100)%$/,ym=/^(\d+px|\d+em|\d*\.?\d+c)$/,bm=/^(\d+)px (\d+)px$/,wm=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Tm=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,xm=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Sm=/^(\d*(?:\.\d*)?)f$/,Am=/^(\d*(?:\.\d*)?)t$/,Em=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),km={left:he,center:"center",right:"end",start:he,end:"end"},Im={left:"line-left",center:"center",right:"line-right"},Mm=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cm=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Rm=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Dm(){this.g=new im}function Nm(){this.g=!1}function Pm(e){for(var t=l(Object.entries(ge)),n=t.next();!n.done;n=t.next()){var i=l(n.value);n=i.next().value,i=i.next().value;var r=new ie(0,0,"");r.color=i,e.set(n,r)}for(n=(t=l(Object.entries(me))).next();!n.done;n=t.next())n=(i=l(n.value)).next().value,i=i.next().value,(r=new ie(0,0,"")).backgroundColor=i,e.set(n,r)}function Lm(e,t,n){0===n.size&&Pm(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=Xc("<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())_m(i.value,t,r,n);t.nestedCues=r}else t.payload=e}function jm(e,t){return e&&0<e.length?e:t}function _m(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=jm(s.backgroundColor,r.backgroundColor),r.color=jm(s.color,r.color),r.fontFamily=jm(s.fontFamily,r.fontFamily),r.fontSize=jm(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(Oc(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())_m(e.value,r,n,i)}
2function Om(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],e.textAlign="middle"==t?oe:se[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=/^region:(.*)$/.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=pe[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=fe,e.line=Number(n[1]),n[2]&&(e.lineAlign=pe[n[2].toUpperCase()]))}function Um(e){if(null==(e=bf(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 Bm(){this.g=null}function Fm(e,t,n){var i,r,a;return(new yr).box("payl",Tr((function(e){i=vt(e)}))).box("iden",Tr((function(e){r=vt(e)}))).box("sttg",Tr((function(e){a=vt(e)}))).parse(e),i?function(e,t,n,i,r){if(i=new ie(i,r,""),Lm(e,i,new Map),t&&(i.id=t),n)for(e=new vf(n),t=wf(e);t;)Om(i,t,[]),yf(e),t=wf(e);return i}(i,r,a,t,n):null}function Vm(){}function Km(e){if(null==(e=bf(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 Hm(){this.g=new Nm}function qm(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 Gm(){}function zm(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=Xm(n))&&(e.color=n),(n=t.BackColour)&&(n=Xm(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=ue,e.textAlign="start";break;case 2:e.displayAlign=ue,e.textAlign=oe;break;case 3:e.displayAlign=ue,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=oe;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=oe;break;case 11:e.displayAlign="center",e.textAlign="end"}(n=t.AlphaLevel)&&(e.opacity=parseFloat(n))}function Xm(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 Wm(e){return 3600*((e=ev.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Ht["application/ttml+xml"]=function(){return new im},Dm.prototype.parseInit=function(e){var t=!1;if((new yr).box("moov",br).box("trak",br).box("mdia",br).box("minf",br).box("stbl",br).S("stsd",wr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new Ge(2,2,2007)},Dm.prototype.setSequenceMode=function(){},Dm.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new yr).box("mdat",Tr((function(e){i=!0,r=r.concat(n.g.parseMedia(e,t))}))).parse(e,!1),!i)throw new Ge(2,2,2007);return r},V("shaka.text.Mp4TtmlParser",Dm),Dm.prototype.parseMedia=Dm.prototype.parseMedia,Dm.prototype.setSequenceMode=Dm.prototype.setSequenceMode,Dm.prototype.parseInit=Dm.prototype.parseInit,Ht['application/mp4; codecs="stpp"']=function(){return new Dm},Ht['application/mp4; codecs="stpp.ttml"']=function(){return new Dm},Ht['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Dm},Ht['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Dm},Nm.prototype.parseInit=function(){},Nm.prototype.setSequenceMode=function(e){this.g=e},Nm.prototype.parseMedia=function(e,t){var n=vt(e),i=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);
2if(!/^WEBVTT($|[ \t\n])/m.test(i[0]))throw new Ge(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=Um(new vf(r[1]))))throw new Ge(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 vf(o);var s=new we;wf(o),yf(o);for(var u=wf(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"),yf(o),u=wf(o)}a.push(s)}for(Pm(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("}")&&(d=/\{(.*?)\}/.exec(s[1]))&&(u=d[1].split(";")),d=new ie(0,0,"");for(var f=!1,h=0;h<u.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(u[h]);if(p){var g=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":f=!0,d.backgroundColor=g;break;case"color":f=!0,d.color=g;break;case"font-family":f=!0,d.fontFamily=g;break;case"font-size":f=!0,d.fontSize=g;break;case"font-weight":700<=parseInt(g,10)&&(f=!0,d.fontWeight=700);break;case"font-style":switch(g){case"normal":f=!0,d.fontStyle=ye;break;case"italic":f=!0,d.fontStyle="italic";break;case"oblique":f=!0,d.fontStyle="oblique"}break;case"opacity":f=!0,d.opacity=parseFloat(g);break;case"white-space":f=!0,d.wrapLine="noWrap"!=g}}}f&&r.set(c,d)}if(h=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=Um(u=new vf(s[0])),p=bf(u,/[ \t]+--\x3e[ \t]+/g),f=Um(u),null==d||null==p||null==f)throw new Ge(2,2,2001,"Could not parse cue time range in WebVTT");for(d+=h,f+=h,h=s.slice(1).join("\n").trim(),r.has("global")?((s=r.get("global").clone()).startTime=d,s.endTime=f,s.payload=""):s=new ie(d,f,""),Lm(h,s,r),yf(u),d=wf(u);d;)Om(s,d,a),yf(u),d=wf(u);null!=c&&(s.id=c)}s&&o.push(s)}return o},V("shaka.text.VttTextParser",Nm),Nm.prototype.parseMedia=Nm.prototype.parseMedia,Nm.prototype.setSequenceMode=Nm.prototype.setSequenceMode,Nm.prototype.parseInit=Nm.prototype.parseInit,Ht["text/vtt"]=function(){return new Nm},Ht['text/vtt; codecs="vtt"']=function(){return new Nm},Ht['text/vtt; codecs="wvtt"']=function(){return new Nm},Bm.prototype.parseInit=function(e){var t=this,n=!1;if((new yr).box("moov",br).box("trak",br).box("mdia",br).S("mdhd",(function(e){e=La(e.reader,e.version),t.g=e.timescale})).box("minf",br).box("stbl",br).S("stsd",wr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new Ge(2,2,2008);if(!n)throw new Ge(2,2,2008)},Bm.prototype.setSequenceMode=function(){},Bm.prototype.parseMedia=function(e,t){if(!this.g)throw new Ge(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,c=null;if((new yr).box("moof",br).box("traf",br).S("tfdt",(function(e){o=!0,i=Pa(e.reader,e.version).Yd})).S("tfhd",(function(e){c=Na(e.reader,e.flags).de})).S("trun",(function(e){s=!0,r=ja(e.reader,e.version,e.flags).te})).box("mdat",Tr((function(e){u=!0,n=e}))).parse(e,!1),!u&&!o&&!s)throw new Ge(2,2,2008);for(var d=i,f=new gr(n,0),h=l(r),p=h.next();!p.done;p=h.next()){var g=(p=p.value).Kd||c,m=p.Rc?i+p.Rc:d;d=m+(g||0);var v=0;do{var y=f.M();v+=y;var b=null;"vttc"==Sr(f.M())?8<y&&(b=f.$a(y-8)):f.skip(y-8),g&&b&&(y=Fm(b,t.periodStart+m/this.g,t.periodStart+d/this.g),a.push(y))}while(p.sampleSize&&v<p.sampleSize)}return a.filter(Fe)},V("shaka.text.Mp4VttParser",Bm),Bm.prototype.parseMedia=Bm.prototype.parseMedia,Bm.prototype.setSequenceMode=Bm.prototype.setSequenceMode,Bm.prototype.parseInit=Bm.prototype.parseInit,Ht['application/mp4; codecs="wvtt"']=function(){return new Bm},Vm.prototype.parseInit=function(){},Vm.prototype.setSequenceMode=function(){},Vm.prototype.parseMedia=function(e){var t=vt(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 vf((n=n.value.split("\n"))[0]),r=Km(i),a=bf(i,/,/g);if(i=Km(i),null==r||null==a||null==i)throw new Ge(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new ie(r,i,n.slice(1).join("\n").trim()))}return e},V("shaka.text.SbvTextParser",Vm),Vm.prototype.parseMedia=Vm.prototype.parseMedia,Vm.prototype.setSequenceMode=Vm.prototype.setSequenceMode,Vm.prototype.parseInit=Vm.prototype.parseInit,Ht["text/x-subviewer"]=function(){return new Vm},Hm.prototype.parseInit=function(){},Hm.prototype.setSequenceMode=function(){},Hm.prototype.parseMedia=function(e,t){var n=vt(e);return n=Re(wt(n=qm(n))),this.g.parseMedia(n,t)},V("shaka.text.SrtTextParser",Hm),Hm.srt2webvtt=qm,Hm.prototype.parseMedia=Hm.prototype.parseMedia,Hm.prototype.setSequenceMode=Hm.prototype.setSequenceMode,Hm.prototype.parseInit=Hm.prototype.parseInit,Ht["text/srt"]=function(){return new Hm},Gm.prototype.parseInit=function(){},Gm.prototype.setSequenceMode=function(){},Gm.prototype.parseMedia=function(e){for(var t="",n="",i=(e=l(e=vt(e).split(/\r?\n\s*\r?\n/))).next();!i.done;i=e.next()){var r=Jm.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=Qm.exec(r)))if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(Zm);else if("Style"==r){r=a.split(Zm),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={gd:r.gd},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=Qm.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(Zm);else if("Dialogue"==a){o=o.split(Zm),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new ie(s=Wm(a.Start),Wm(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}
2/g,"")),r.gd=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.gd}}(r)))&&zm(o,a),i.push(o)}return i},V("shaka.text.SsaTextParser",Gm),Gm.prototype.parseMedia=Gm.prototype.parseMedia,Gm.prototype.setSequenceMode=Gm.prototype.setSequenceMode,Gm.prototype.parseInit=Gm.prototype.parseInit;var Ym,$m,Jm=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Qm=/^\s*([^:]+):\s*(.*)/,Zm=/\s*,\s*/,ev=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function tv(){}function nv(){Ym?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Ym=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=iv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function iv(e,t){var n,i=this;return P((function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),w(r,Ym.call(i,e,t),2)):fv(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Ym,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=rv,r.return(rv.call(i,e,t)))}))}function rv(e,t){var n,i,r,a,o,s,u,c,d,f,h=this;return P((function(p){if(1==p.g){for(console.assert(h==navigator,'bad "this" for requestMediaKeySystemAccess'),n=dv(e),i=[],r=l(t),a=r.next();!a.done;a=r.next())o=a.value,s=av(o.videoCapabilities,n),u=av(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 w(p,Ym.call(h,e,i),2)}return f=p.h,p.return(new cv(f,n))}))}function av(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function ov(){}function sv(){$m?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?($m=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=uv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function uv(e){var t,n,i=this;return P((function(r){return 1==r.g?(console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),w(r,$m.call(i,e),2)):(t=r.h,e.keySystemConfiguration?(n=t.keySystemAccess)&&fv(n)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=$m,r.return(t)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=lv,r.return(lv.call(i,e))):r.return(t))}))}function lv(e){var t,n,i,r,a,o,s,u,l,c=this;return P((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=dv(i),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},r&&r!=t||a&&a!=t)?d.return(o):w(d,$m.call(c,e),2);case 2:if((s=d.h).keySystemAccess){s.keySystemAccess=new cv(s.keySystemAccess,t),d.A(3);break}if(!e.keySystemConfiguration){d.A(3);break}var f=e.keySystemConfiguration,h=[],p=[];return f.audio&&h.push({robustness:f.audio.robustness||"",contentType:e.audio.contentType}),f.video&&p.push({robustness:f.video.robustness||"",contentType:e.video.contentType}),f={initDataTypes:f.initDataType?[f.initDataType]:[],distinctiveIdentifier:f.distinctiveIdentifier,persistentState:f.persistentState,sessionTypes:f.sessionTypes},h.length&&(f.audioCapabilities=h),p.length&&(f.videoCapabilities=p),u=f,l=s,w(d,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[u]),5);case 5:l.keySystemAccess=d.h;case 3:return d.return(s)}}))}function cv(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function dv(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 fv(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function hv(){}function pv(){nv(),sv()}Ht["text/x-ssa"]=function(){return new Gm},V("EmeEncryptionSchemePolyfill",tv),tv.install=nv,V("McEncryptionSchemePolyfill",ov),ov.install=sv,cv.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},cv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},V("EncryptionSchemePolyfills",hv),hv.install=pv,void 0!==n&&n.exports&&(n.exports=hv)}
2.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.