1/*! For license information please see 9266.c462a8681be42e5c32cb.js.LICENSE.txt */ 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"[email protected]+e12bf37"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8612a0e7-9531-4aca-a381-8a81a75b3e40",e._sentryDebugIdIdentifier="sentry-dbid-8612a0e7-9531-4aca-a381-8a81a75b3e40")}catch(e){}}(),(self.webpackChunk_putdotio_app=self.webpackChunk_putdotio_app||[]).push([[9266],{9772:e=>{"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},9918:(e,t,n)=>{"use strict";var i,r,a,o=n(9772),s=n(7400),u=n(9859),l=n(26733),c=n(85052),d=n(98270),h=n(81589),f=n(59821),p=n(75762),g=n(14768),m=n(96616),v=n(91321),y=n(67567),b=n(56540),w=n(70095),T=n(81441),x=n(56407),S=x.enforce,A=x.get,E=u.Int8Array,k=E&&E.prototype,C=u.Uint8ClampedArray,I=C&&C.prototype,M=E&&y(E),R=k&&y(k),D=Object.prototype,L=u.TypeError,N=w("toStringTag"),P=T("TYPED_ARRAY_TAG"),O="TypedArrayConstructor",j=o&&
2!!b&&"Opera"!==h(u.opera),U=!1,_={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},F=function(e){var t=y(e);if(c(t)){var n=A(t);return n&&d(n,O)?n[O]:F(t)}},H=function(e){if(!c(e))return!1;var t=h(e);return d(_,t)||d(B,t)};for(i in _)(a=(r=u[i])&&r.prototype)?S(a)[O]=r:j=!1;for(i in B)(a=(r=u[i])&&r.prototype)&&(S(a)[O]=r);if((!j||!l(M)||M===Function.prototype)&&(M=function(){throw new L("Incorrect invocation")},j))for(i in _)u[i]&&b(u[i],M);if((!j||!R||R===D)&&(R=M.prototype,j))for(i in _)u[i]&&b(u[i].prototype,R);if(j&&y(I)!==R&&b(I,R),s&&!d(R,N))for(i in U=!0,m(R,N,{configurable:!0,get:function(){return c(this)?this[P]:void 0}}),_)u[i]&&p(u[i],P,i);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:j,TYPED_ARRAY_TAG:U&&P,aTypedArray:function(e){if(H(e))return e;throw new L("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!b||v(M,e)))return e;throw new L(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,i){if(s){if(n)for(var r in _){var a=u[r];if(a&&d(a.prototype,e))try{delete a.prototype[e]}catch(n){try{a.prototype[e]=t}catch(e){}}}R[e]&&!n||g(R,e,n?t:j&&k[e]||t,i)}},exportTypedArrayStaticMethod:function(e,t,n){var i,r;if(s){if(b){if(n)for(i in _)if((r=u[i])&&d(r,e))try{delete r[e]}catch(e){}if(M[e]&&!n)return;try{return g(M,e,n?t:j&&M[e]||t)}catch(e){}}for(i in _)!(r=u[i])||r[e]&&!n||g(r,e,t)}},getTypedArrayConstructor:F,isView:function(e){if(!c(e))return!1;var t=h(e);return"DataView"===t||d(_,t)||d(B,t)},isTypedArray:H,TypedArray:M,TypedArrayPrototype:R}},21178:(e,t,n)=>{"use strict";var i=n(39646);e.exports=function(e,t){for(var n=i(e),r=new t(n),a=0;a<n;a++)r[a]=e[n-a-1];return r}},69647:(e,t,n)=>{"use strict";var i=n(39646),r=n(43329),a=RangeError;e.exports=function(e,t,n,o){var s=i(e),u=r(n),l=u<0?s+u:u;if(l>=s||l<0)throw new a("Incorrect index");for(var c=new t(s),d=0;d<s;d++)c[d]=d===l?o:e[d];return c}},79098:(e,t,n)=>{"use strict";var i=n(81589);e.exports=function(e){var t=i(e);return"BigInt64Array"===t||"BigUint64Array"===t}},19123:(e,t,n)=>{"use strict";var i=n(92066),r=TypeError;e.exports=function(e){var t=i(e,"number");if("number"==typeof t)throw new r("Can't convert number to bigint");return BigInt(t)}},92529:(e,t,n)=>{"use strict";var i=n(21178),r=n(9918),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;o("toReversed",(function(){return i(a(this),s(this))}))},86943:(e,t,n)=>{"use strict";var i=n(9918),r=n(65968),a=n(77111),o=n(41253),s=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,c=r(i.TypedArrayPrototype.sort);l("toSorted",(function(e){void 0!==e&&a(e);var t=s(this),n=o(u(t),t);return c(n,e)}))},91157:(e,t,n)=>{"use strict";var i=n(69647),r=n(9918),a=n(79098),o=n(43329),s=n(19123),u=r.aTypedArray,l=r.getTypedArrayConstructor,c=r.exportTypedArrayMethod,d=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();c("with",{with:function(e,t){var n=u(this),r=o(e),c=a(n)?s(t):+t;return i(n,l(n),r,c)}}.with,!d)},14671:(e,t,n)=>{!function(){var e="undefined"!=typeof window?window:n.g,i={};for(var r in function(e,t,n){var i,r,a="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t},o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},s=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var i=0;i<n.length;++i){var r=n[i];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function u(e,t){if(t)e:{var n=s;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&o(n,e,{configurable:!0,writable:!0,value:t})}}if("function"==typeof Object.setPrototypeOf)r=Object.setPrototypeOf;else{var l;e:{var c={};try{c.__proto__={a:!0},l=c.a;break e}catch(e){}l=!1}r=l?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var d=r;function h(e,t){if(e.prototype=a(t.prototype),e.prototype.constructor=e,d)d(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.Qj=t.prototype}function f(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function p(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);
2if("number"==typeof e.length)return{next:f(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function g(e){if(!(e instanceof Array)){e=p(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function m(e){if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object")}function v(){this.H=!1,this.C=null,this.i=void 0,this.h=1,this.B=this.D=0,this.L=this.A=null}function y(e){if(e.H)throw new TypeError("Generator is already running");e.H=!0}function b(e,t){e.A={zg:t,Lg:!0},e.h=e.D||e.B}function w(e){for(var t in this.i=e,this.g=[],e)this.g.push(t);this.g.reverse()}function T(e){this.g=new v,this.h=e}function x(e,t,n,i){try{var r=t.call(e.g.C,n);if(m(r),!r.done)return e.g.H=!1,r;var a=r.value}catch(t){return e.g.C=null,b(e.g,t),S(e)}return e.g.C=null,i.call(e.g,a),S(e)}function S(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.H=!1,{value:t.value,done:!1}}catch(t){e.g.i=void 0,b(e.g,t)}if(e.g.H=!1,e.g.A){if(t=e.g.A,e.g.A=null,t.Lg)throw t.zg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function A(e){this.next=function(t){return y(e.g),e.g.C?t=x(e,e.g.C.next,t,e.g.K):(e.g.K(t),t=S(e)),t},this.throw=function(t){return y(e.g),e.g.C?t=x(e,e.g.C.throw,t,e.g.K):(b(e.g,t),t=S(e)),t},this.return=function(t){return function(e,t){y(e.g);var n=e.g.C;return n?x(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),S(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function E(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 A(new T(e)))}function k(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function C(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function M(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{Gg:r,v:a}}return{Gg:-1,v:void 0}}function R(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var r=n++;return{value:t(r,e[r]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function D(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}v.prototype.K=function(e){this.i=e},v.prototype.getNextAddressJsc=function(){return this.h},v.prototype.getYieldResultJsc=function(){return this.i},v.prototype.return=function(e){this.A={return:e},this.h=this.B},v.prototype.return=v.prototype.return,v.prototype.O=function(e){this.A={u:e},this.h=this.B},v.prototype.jumpThroughFinallyBlocks=v.prototype.O,v.prototype.g=function(e,t){return this.h=t,{value:e}},v.prototype.yield=v.prototype.g,v.prototype.S=function(e,t){var n=(e=p(e)).next();if(m(n),!n.done)return this.C=e,this.g(n.value,t);this.i=n.value,this.h=t},v.prototype.yieldAll=v.prototype.S,v.prototype.u=function(e){this.h=e},v.prototype.jumpTo=v.prototype.u,v.prototype.j=function(){this.h=0},v.prototype.jumpToEnd=v.prototype.j,v.prototype.m=function(e,t){this.D=e,null!=t&&(this.B=t)},v.prototype.setCatchFinallyBlocks=v.prototype.m,v.prototype.J=function(e){this.D=0,this.B=e||0},v.prototype.setFinallyBlock=v.prototype.J,v.prototype.o=function(e,t){this.h=e,this.D=t||0},v.prototype.leaveTryBlock=v.prototype.o,v.prototype.l=function(e){return this.D=e||0,e=this.A.zg,this.A=null,e},v.prototype.enterCatchBlock=v.prototype.l,v.prototype.F=function(e,t,n){n?this.L[n]=this.A:this.L=[this.A],this.D=e||0,this.B=t||0},v.prototype.enterFinallyBlock=v.prototype.F,v.prototype.G=function(e,t){t=this.L.splice(t||0)[0],(t=this.A=this.A||t)?t.Lg?this.h=this.D||this.B:null!=t.u&&this.B<t.u?(this.h=t.u,this.A=null):this.h=this.B:this.h=e},v.prototype.leaveFinallyBlock=v.prototype.G,v.prototype.M=function(e){return new w(e)},v.prototype.forIn=v.prototype.M,w.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},w.prototype.getNext=w.prototype.h,u("Symbol",(function(e){function t(e,t){this.g=e,o(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",i=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}})),u("Symbol.iterator",(function(e){return e||(e=Symbol("Symbol.iterator"),o(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return C(f(this))}}),e)})),u("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()}
2))}this.g.push(e)};var r=s.setTimeout;n.prototype.i=function(e){r(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(i){n||(n=!0,e.call(t,i))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.D(e):this.m(e)}},t.prototype.D=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.J(t,e):this.m(e)},t.prototype.l=function(e){this.A(2,e)},t.prototype.m=function(e){this.A(1,e)},t.prototype.A=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.B()},t.prototype.G=function(){var e=this;r((function(){if(e.C()){var t=s.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.C=function(){if(this.o)return!1;var e=s.CustomEvent,t=s.Event,n=s.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=s.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.B=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.Rd(t.resolve,t.reject)},t.prototype.J=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function i(e,t){return"function"==typeof e?function(t){try{r(e(t))}catch(e){a(e)}}:t}var r,a,o=new t((function(e,t){r=e,a=t}));return this.Rd(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Rd=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=p(e),a=r.next();!a.done;a=r.next())i(a.value).Rd(t,n)}))},t.all=function(e){var n=p(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).Rd(a(o.length-1),t),r=n.next()}while(!r.done)}))},t})),u("WeakMap",(function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=p(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(!I(e,s)){var t=new n;o(e,s,{value:t})}}function a(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&r(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),i=new e([[t,2],[n,3]]);return 2==i.get(t)&&3==i.get(n)&&(i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();a("freeze"),a("preventExtensions"),a("seal");var u=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!I(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&I(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&I(e,s)&&I(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&I(e,s)&&I(e[s],this.g))&&delete e[s][this.g]},t})),u("Map",(function(e){function t(){var e={};return e.Wb=e.next=e.head=e}function n(e,t){var n=e[1];return C((function(){if(n){for(;n.head!=e[1];)n=n.Wb;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e[0][n];if(i&&I(e[0],n))for(e=0;e<i.length;e++){var r=i[e];if(t!=t&&r.key!=r.key||t===r.key)return{id:n,list:i,index:e,entry:r}}return{id:n,list:i,index:-1,entry:void 0}}function r(e){if(this[0]={},this[1]=t(),this.size=0,e){e=p(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(p([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&"s"==r.value[1]&&!((r=i.next()).done||4!=r.value[0].x||"t"!=r.value[1]||!i.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this[0][n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this[1],Wb:this[1].Wb,head:this[1],key:e,value:t},n.list.push(n.entry),this[1].Wb.next=n.entry,this[1].Wb=n.entry,this.size++),this},r.prototype.delete=function(e){return!(!(e=i(this,e)).entry||!e.list||(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.Wb.next=e.entry.next,e.entry.next.Wb=e.entry.Wb,e.entry.head=null,this.size--,0))},r.prototype.clear=function(){this[0]={},this[1]=this[1].Wb=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).entry},r.prototype.get=function(e){return(e=i(this,e).entry)&&e.value},r.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},r.prototype.keys=function(){return n(this,(function(e){return e.key}))},r.prototype.values=function(){return n(this,(function(e){return e.value}))},r.prototype.forEach=function(e,t){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var o=0;return r})),u("Set",(function(e){function t(e){if(this.g=new Map,e){e=p(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(p([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==t&&r.value[1]==t&&!(r=i.next()).done&&r.value[0]!=t&&4==r.value[0].x&&r.value[1]==r.value[0]&&i.next().done}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach((function(i){return e.call(t,i,i,n)}))},t)})),u("Array.prototype.findIndex",(function(e){return e||function(e,t){return M(this,e,t).Gg}})),u("Array.prototype.values",(function(e){return e||function(){return R(this,(function(e,t){return t}))}})),u("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var i=[],r="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof r){e=r.call(e);for(var a=0;!(r=e.next()).done;)i.push(t.call(n,r.value,a++))}else for(r=e.length,a=0;a<r;a++)i.push(t.call(n,e[a],a));return i}})),u("Array.prototype.keys",(function(e){return e||function(){return R(this,(function(e){return e}))}})),u("String.prototype.startsWith",(function(e){return e||function(e,t){var n=D(this,e,"startsWith"),i=n.length,r=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<r&&t<i;)if(n[t++]!=e[a++])return!1;return a>=r}})),u("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),u("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length;for((t=t||0)<0&&(t=Math.max(t+i,0));t<i;t++){var r=n[t];if(r===e||Object.is(r,e))return!0}return!1}}
2)),u("String.prototype.includes",(function(e){return e||function(e,t){return-1!==D(this,e,"includes").indexOf(e,t||0)}})),u("String.fromCodePoint",(function(e){return e||function(e){for(var t="",n=0;n<arguments.length;n++){var i=Number(arguments[n]);if(i<0||i>1114111||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);i<=65535?t+=String.fromCharCode(i):(i-=65536,t+=String.fromCharCode(i>>>10&1023|55296),t+=String.fromCharCode(1023&i|56320))}return t}})),u("WeakSet",(function(e){function t(e){if(this.g=new WeakMap,e){e=p(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),i=new e([t]);return!(!i.has(t)||i.has(n))&&(i.delete(t),i.add(n),!i.has(t)&&i.has(n))}catch(e){return!1}}()?e:(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t)})),u("Array.prototype.find",(function(e){return e||function(e,t){return M(this,e,t).v}})),u("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)I(e,t)&&n.push([t,e[t]]);return n}}));var L="function"==typeof Object.assign?Object.assign:function(e,t){if(null==e)throw new TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)I(i,r)&&(e[r]=i[r])}return e};u("Object.assign",(function(e){return e||L})),u("Math.clz32",(function(e){return e||function(e){if(0==(e=Number(e)>>>0))return 32;var t=0;return!(4294901760&e)&&(e<<=16,t+=16),!(4278190080&e)&&(e<<=8,t+=8),!(4026531840&e)&&(e<<=4,t+=4),!(3221225472&e)&&(e<<=2,t+=2),!(2147483648&e)&&t++,t}})),u("Array.prototype.entries",(function(e){return e||function(){return R(this,(function(e,t){return[e,t]}))}})),u("Promise.withResolvers",(function(e){return e||function(){var e,t;return{promise:new Promise((function(n,i){e=n,t=i})),resolve:e,reject:t}}})),u("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}})),u("Number.EPSILON",(function(){return 2220446049250313e-31})),u("Number.MAX_SAFE_INTEGER",(function(){return 9007199254740991})),u("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||e===1/0||e===-1/0||0===e)return e;var t=Math.floor(Math.abs(e));return e<0?-t:t}})),u("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),u("String.prototype.trimLeft",(function(e){return e||function(){return this.replace(/^[\s\xa0]+/,"")}})),u("String.prototype.trimStart",(function(e){return e||String.prototype.trimLeft})),u("String.prototype.repeat",(function(e){return e||function(e){var t=D(this,null,"repeat");if(e<0||e>1342177279)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),u("Number.isFinite",(function(e){return e||function(e){return"number"==typeof e&&!isNaN(e)&&e!==1/0&&e!==-1/0}})),u("String.prototype.endsWith",(function(e){return e||function(e,t){var n=D(this,e,"endsWith");void 0===t&&(t=n.length),t=Math.max(0,Math.min(0|t,n.length));for(var i=e.length;i>0&&t>0;)if(n[--t]!=e[--i])return!1;return i<=0}}));var N=this||self;function P(e,t){e=e.split(".");var n,i=N;e[0]in i||void 0===i.execScript||i.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t}function O(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}function j(e){return e.h/(1-Math.pow(e.g,e.j))}function U(){this.h=new O(2),this.j=new O(5),this.g=0,this.i=128e3,this.l=16e3}function _(){}function B(){}function F(){}function H(e){var t=k.apply(1,arguments);V.has(e)||(V.add(e),F.apply(_,g(t)))}O.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.j+=e)},U.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),(t=this.j).g=Math.exp(t.i/e.slowHalfLife)},U.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},U.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(j(this.h),j(this.j))};var V=new Set;function G(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function K(e,t){(t=e.indexOf(t))>-1&&e.splice(t,1)}function X(e,t){var n;if(n||(n=G),e.length!=t.length)return!1;t=t.slice();for(var i=(e=p(e)).next(),r={};!i.done;r={Og:void 0},i=e.next()){if(r.Og=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.Og,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function W(e,t){for(var n=0,i=e.length;n<i;){var r=n+i>>>1;t(e[r])?n=r+1:i=r}return n}function z(e,t,n){if(e===t)return!0;
2if(!e||!t)return e==t;if(n||(n=G),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 q(){this.g=new Map}function Y(){this.g=new q}function J(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=$;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}$=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}e.console&&((new Map).set(1,(function(){return console.error.apply(console,g(k.apply(0,arguments)))})).set(2,(function(){return console.warn.apply(console,g(k.apply(0,arguments)))})).set(3,(function(){return console.info.apply(console,g(k.apply(0,arguments)))})).set(4,(function(){return console.log.apply(console,g(k.apply(0,arguments)))})).set(5,(function(){return console.debug.apply(console,g(k.apply(0,arguments)))})).set(6,(function(){return console.debug.apply(console,g(k.apply(0,arguments)))})),F=function(){return console.warn.apply(console,g(k.apply(0,arguments)))},B=function(){console.error.apply(console,g(k.apply(0,arguments)))}),(i=q.prototype).push=function(e,t){this.g.getOrInsertComputed(e,(function(){return[]})).push(t)},i.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},i.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter((function(e){return e!=t}));this.g.set(e,n),n.length||this.g.delete(e)}},i.forEach=function(e){this.g.forEach((function(t,n){e(n,t)}))},i.size=function(){return this.g.size},i.keys=function(){return Array.from(this.g.keys())},(i=Y.prototype).release=function(){this.Pa(),this.g=null},i.I=function(e,t,n,i){this.g&&(e=new J(e,t,n,i),this.g.push(t,e))},i.Ja=function(e,t,n,i){var r=this;this.I(e,t,(function i(a){r.eb(e,t,i),n(a)}),i)},i.Jb=function(e,t,n,i){if(this.g)for(var r=(t=p(t)).next();!r.done;r=t.next())this.I(e,r.value,n,i)},i.Qi=function(e,t,n,i){var r=this;if(this.g)for(var a=!1,o=function(i){if(!a){a=!0;for(var s=p(t),u=s.next();!u.done;u=s.next())r.eb(e,u.value,o);n(i)}},s=p(t),u=s.next();!u.done;u=s.next())this.I(e,u.value,o,i)},i.eb=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=p(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.eb(),this.g.remove(t,r))},i.Pa=function(){if(this.g){for(var e=[],t=p(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,g(n.value));for(t=(e=p(e)).next();!t.done;t=e.next())t.value.eb();this.g.g.clear()}},P("shaka.util.EventManager",Y),Y.prototype.removeAll=Y.prototype.Pa,Y.prototype.unlisten=Y.prototype.eb,Y.prototype.listenOnceMulti=Y.prototype.Qi,Y.prototype.listenMulti=Y.prototype.Jb,Y.prototype.listenOnce=Y.prototype.Ja,Y.prototype.listen=Y.prototype.I,Y.prototype.release=Y.prototype.release,J.prototype.eb=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var $=void 0;function Q(e){this.h=e,this.g=void 0}function Z(){return ne.value()}Q.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var ee=null,te=null,ne=new Q((function(){var e=void 0;return ee&&(e=ee()),!e&&te&&(e=te()),e})),ie=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function re(e){var t;e instanceof re?(ae(this,e.Ob),this.Ec=e.Ec,oe(this,e.ob),se(this,e.Vc),this.Nb=e.Nb,ue(this,e.g.clone()),this.nc=e.nc):e&&(t=String(e).match(ie))?(ae(this,t[1]||"",!0),this.Ec=le(t[2]||""),oe(this,t[3]||"",!0),se(this,t[4]),this.Nb=le(t[5]||"",!0),ue(this,t[6]||"",!0),this.nc=le(t[7]||"")):this.g=new ve(null)}function ae(e,t,n){e.Ob=n?le(t,!0):t,e.Ob&&(e.Ob=e.Ob.replace(/:$/,""))}function oe(e,t,n){e.ob=n?le(t,!0):t}function se(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.Vc=t}else e.Vc=null}function ue(e,t,n){t instanceof ve?e.g=t:(n||(t=ce(t,ge)),e.g=new ve(t))}function le(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function ce(e,t,n){return null!=e?(e=encodeURI(e).replace(t,de),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function de(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(i=re.prototype).Ob="",i.Ec="",i.ob="",i.Vc=null,i.Nb="",i.nc="",i.toString=function(){var e=[],t=this.Ob;if(t&&e.push(ce(t,he,!0),":"),t=this.ob){e.push("//");var n=this.Ec;n&&e.push(ce(n,he,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Vc)&&e.push(":",String(t))}return(t=this.Nb)&&(this.ob&&"/"!=t.charAt(0)&&e.push("/"),e.push(ce(t,"/"==t.charAt(0)?pe:fe,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.nc)&&e.push("#",ce(t,me)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Ob&&(t=new re);var n=!!e.Ob;n?ae(t,e.Ob):n=!!e.Ec,n?t.Ec=e.Ec:n=!!e.ob,n?oe(t,e.ob):n=null!=e.Vc;var i=e.Nb;if(n)se(t,e.Vc);else if(n=!!e.Nb){if("/"!=i.charAt(0))if(this.ob&&!this.Nb)i="/"+i;else{var r=t.Nb.lastIndexOf("/");-1!=r&&(i=t.Nb.substr(0,r+1)+i)}if(".."==(r=i)||"."==r)i="";else if(-1==r.indexOf("./")&&-1==r.indexOf("/."))i=r;else{i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((a.length>1||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}i=a.join("/")}}return n?t.Nb=i:n=""!==e.g.toString(),n?ue(t,e.g.clone()):n=!!e.nc,n&&(t.nc=e.nc),t},i.clone=function(){return new re(this)};var he=/[#\/\?@]/g,fe=/[#\?:]/g,pe=/[#\?]/g,ge=/[#\?@]/g,me=/#/g;function ve(e){this.g=e||null}function ye(e){if(!e.Ya&&(e.Ya=new Map,e.cd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(i>=0){var a=t[n].substring(0,i);r=t[n].substring(i+1)}else a=t[n];a=decodeURIComponent(a),r=r||"",e.add(a,decodeURIComponent(r))}}function be(){}function we(e,t){if(!e&&!t)return!0;
2if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=xe(e);t=xe(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function Te(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function xe(e,t,n){return Ee(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function Se(e,t,n){return Ee(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function Ae(e,t,n){return Ee(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function Ee(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,a=1;"BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function ke(e,t){if(e===t||!e.length||!t.length)return!0;for(var n=(e=p(e)).next();!n.done;n=e.next()){if(Ne(n=n.value))return!0;for(var i=p(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||Ne(r))return!0}return!1}function Ce(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=(e=p(e)).next();!i.done;i=e.next()){i=i.value;for(var r=p(t),a=r.next();!a.done;a=r.next()){if(a=a.value,i.keySystem==a.keySystem){r=new Map;for(var o=p((i.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,r.set(s.keyId,s);r=Array.from(r.values()),o=i.keyIds&&a.keyIds?new Set([].concat(g(i.keyIds),g(a.keyIds))):i.keyIds||a.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||a.persistentStateRequired,videoRobustness:i.videoRobustness||a.videoRobustness,audioRobustness:i.audioRobustness||a.audioRobustness,serverCertificate:i.serverCertificate||a.serverCertificate,serverCertificateUri:i.serverCertificateUri||a.serverCertificateUri,initData:r,keyIds:o});break}Ne(i)?n.push(i):Ne(a)&&n.push(a)}}return n}function Ie(e){return e?e.keySystem:""}function Me(e){return"org.w3.clearkey"===e}function Re(e){return!!e&&!!e.match(/^com\.widevine\.alpha/)}function De(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Le(e){return!!e&&!!e.match(/^com\.apple\.fps/)}function Ne(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}function Pe(e,t,n,i){return e+"#"+t+"#"+n+"#"+[].concat(g(new Set(i))).sort().join("#")}function Oe(e,t){t=void 0!==t&&t;var n={"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"};if(!(e=void 0!==e&&e)&&!t)return n;var i,r={};for(i in n){var a=n[i],o=i;t?o="urn:uuid:"+i:e&&(o=i.replace(/-/g,"")),r[o]=a}return r}(i=ve.prototype).Ya=null,i.cd=null,i.add=function(e,t){ye(this),this.g=null;var n=this.Ya.has(e)?this.Ya.get(e):null;return n||this.Ya.set(e,n=[]),n.push(t),this.cd++,this},i.set=function(e,t){return ye(this),this.g=null,this.Ya.has(e)?this.Ya.set(e,[t]):this.add(e,t),this},i.get=function(e){return ye(this),this.Ya.get(e)||[]},i.toString=function(){if(this.g)return this.g;if(!this.Ya||!this.Ya.size)return"";for(var e=[],t=p(this.Ya.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Ya.get(i);for(var r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),e.push(a)}}return this.g=e.join("&")},i.clone=function(){var e=new ve;if(e.g=this.g,this.Ya){for(var t=new Map,n=p(this.Ya),i=n.next();!i.done;i=n.next()){var r=p(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Ya=t,e.cd=this.cd}return e},P("shaka.util.BufferUtils",be),be.toDataView=Ae,be.toUint16=Se,be.toUint8=xe,be.toArrayBuffer=Te,be.equal=we;var je=new Q((function(){return Te(new Uint8Array([0]))})),Ue=new Map;function _e(e,t,n){var i=k.apply(3,arguments);
2if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,Fe)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}function Be(e){var t=e.code,n=e.msExtendedCode;return n&&(n<0&&(n+=4294967296),n=n.toString(16)),{code:t,Vh:n,message:e.message}}_e.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},P("shaka.util.Error",_e);var Fe=!0;function He(){}function Ve(t){if(!t)return"";if(239==(t=xe(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!Z().Yf())return(t=(new TextDecoder).decode(t)).includes("�")&&B('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),t;for(var n="",i=0;i<t.length;++i){var r=65533;if(128&t[i]?t.length>=i+2&&192==(224&t[i])&&128==(192&t[i+1])?(r=(31&t[i])<<6|63&t[i+1],i+=1):t.length>=i+3&&224==(240&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])?(r=(15&t[i])<<12|(63&t[i+1])<<6|63&t[i+2],i+=2):t.length>=i+4&&240==(241&t[i])&&128==(192&t[i+1])&&128==(192&t[i+2])&&128==(192&t[i+3])&&(r=(7&t[i])<<18|(63&t[i+1])<<12|(63&t[i+2])<<6|63&t[i+3],i+=3):r=t[i],r<=65535)n+=String.fromCharCode(r);else{var a=1023&(r-=65536);n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+a)}}return n}function Ge(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new _e(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=Ae(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return qe.value()(i)}function Ke(e){function t(e){return n.byteLength<=e||n[e]>=9&&n[e]<=126}if(!e)return"";var n=xe(e);if(239==n[0]&&187==n[1]&&191==n[2])return Ve(n);if(254==n[0]&&255==n[1])return Ge(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Ge(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Ge(e,!1);if(0==n[1]&&0==n[3])return Ge(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Ve(e);throw new _e(2,2,2003)}function Xe(t){if(e.TextEncoder&&!Z().Yf()){var n=new TextEncoder;return Te(n.encode(t))}t=encodeURIComponent(t),t=unescape(t),n=new Uint8Array(t.length);for(var i=0;i<t.length;i++)n[i]=t[i].charCodeAt(0);return Te(n)}function We(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function ze(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":" ","‎":"â","‏":"â"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,(function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10))>=0&&e<=1114111?String.fromCodePoint(e):"":t[e]||"'"})):e||""}_e.Severity={RECOVERABLE:1,CRITICAL:2},_e.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},_e.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,BUFFER_WRITE_OUT_OF_BOUNDS:3025,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_
2LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,WEBTRANSPORT_NOT_AVAILABLE:4056,WEBTRANSPORT_INITIALIZATION_FAILED:4057,MSF_VOD_CONTENT_NOT_SUPPORTED:4058,MSF_CATALOG_TIMEOUT:4058,HLS_INVALID_KEY_IV_FOR_GCM:4059,HLS_INVALID_GCM_SEGMENT:4060,DASH_INVALID_JSON:4061,MSF_NO_CATALOG:4062,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,SS_IMA_SDK_MISSING:10002,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,VAST_INVALID_XML:10007,CS_AD_CONTAINER_MISSING:10008,SS_AD_CONTAINER_MISSING:10009,MEDIATAILOR_REQUEST_FAILED:10010},P("shaka.util.StringUtils",He),He.resetFromCharCode=function(){qe.g=void 0},He.toUTF16=We,He.toUTF8=Xe,He.fromBytesAutoDetect=Ke,He.fromUTF16=Ge,He.fromUTF8=Ve;var qe=new Q((function(){function e(e){try{var t=new Uint8Array(e);return String.fromCharCode.apply(null,t).length>0}catch(e){return!1}}for(var t={lc:65536};t.lc>0;(t={lc:t.lc}).lc/=2)if(e(t.lc))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.lc)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.lc));return n}}(t);return null}));function Ye(){}function Je(e){return e=xe(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):(e=qe.value()(e),btoa(e))}function $e(e,t){return t=null==t||t,Uint8Array.prototype.toBase64?xe(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=Je(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function Qe(t){if(!("fromBase64"in Uint8Array)){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}return t=t.replace(/\s+/g,""),Uint8Array.fromBase64(t,{alphabet:/[-_]/.test(t)?"base64url":"base64"})}function Ze(t){if(!("fromHex"in Uint8Array)){for(var n=t.length/2,i=new Uint8Array(n),r=0;r<n;r++)i[r]=e.parseInt(t.substr(2*r,2),16);return i}return Uint8Array.fromHex(t)}function et(e){var t=xe(e);if(!Uint8Array.prototype.toHex){e="";for(var n=(t=p(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}return t.toHex()}function tt(){var e=k.apply(0,arguments);return nt(e,0,e.length)}function nt(e,t,n){t=void 0===t?0:t,n=void 0===n?e.length:n;for(var i=0,r=t;r<n;++r)i+=e[r].byteLength;for(i=new Uint8Array(i),r=0;t<n;++t){var a=e[t];ArrayBuffer.isView(a)&&1===a.BYTES_PER_ELEMENT?i.set(a,r):i.set(xe(a),r),r+=a.byteLength}return i}function it(e,t){var n=void 0===n?"":n;if(0==t.length)return e;if(1==e.length&&1==t.length){var i=new re(e[0]);return t=new re(t[0]),t=i.resolve(t),n&&ue(t,n),[t.toString()]}t=t.map((function(e){return new re(e)})),i=[];
2for(var r=(e=p(e)).next();!r.done;r=e.next()){r=new re(r.value);for(var a=p(t),o=a.next();!o.done;o=a.next())o=r.resolve(o.value),n&&ue(o,n),i.push(o.toString())}return i}function rt(e,t,n,i,r){return t={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:r},i&&(t.keySystemUris=new Set([i])),!n&&Le(e)&&t.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null}),t}function at(t,n){n=void 0===n?"cenc":n;var i=[],r=[],a=[];t.forEach((function(e,t){var n=t;22!=n.length&&(n=$e(Ze(t),!1));var o=e;22!=o.length&&(o=$e(Ze(e),!1)),e={kty:"oct",kid:n,k:o},i.push(e),r.push(e.kid),a.push(t)})),t=JSON.stringify({keys:i});var o=JSON.stringify({kids:r});return o=[{initData:xe(Xe(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:n,licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(a)}}function ot(e,t){if(1==t.length)return t[0];if(null!=(e=st(e,t)))return e;throw new _e(2,4,4025,t)}function st(e,t){for(var n=dt.get(e),i=(n=p(n)).next();!i.done;i=n.next()){i=i.value;for(var r=p(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==lt?"":null}function ut(e,t){for(var n=[],i=(e=p(e=dt.get(e))).next();!i.done;i=e.next()){i=i.value;for(var r=p(t),a=r.next();!a.done;a=r.next())a=a.value,i.test(a.trim())&&n.push(a.trim())}return n}P("shaka.util.Uint8ArrayUtils",Ye),Ye.concat=tt,Ye.toHex=et,Ye.fromHex=Ze,Ye.fromBase64=Qe,Ye.toBase64=$e,Ye.toStandardBase64=Je;var lt="text",ct={qa:"video",W:"audio",Na:lt,Fh:"image",Aj:"application",Dh:"chapter"},dt=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function ht(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.j=i,"undefined"==typeof libDPIModule&&F("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec?(this.h=LCEVCdec,void 0===this.h.SupportObject?(F("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||F(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)):(F("Could not find LCEVC Library on this page"),e=!1),e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=new this.h.LCEVCdec(this.l,this.i,this.m))}function ft(e,t,n,i){"video"!==i.type||e.j&&!gt(i)||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.j)}function pt(e){e.g&&e.i.classList.add("shaka-hidden")}function gt(e){return!(!e||"undefined"==typeof LCEVCdec)&&"lvc1"==e.codecs}function mt(){}function vt(e,t){yt.set(e,t)}ht.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},P("shaka.lcevc.Dec",ht),ht.prototype.release=ht.prototype.release,P("shaka.media.ManifestParser",mt),mt.unregisterParserByMime=function(e){yt.delete(e)},mt.registerParserByMime=vt,mt.AccessibilityPurpose={Kj:"visually impaired",Cj:"hard of hearing",Ij:"spoken subtitles"};
2var yt=new Map;function bt(){}function wt(){}function Tt(e){this.h=new Map,this.i=0,this.j=new wt,(e=At(e.toLowerCase()))&&(this.j=e()),this.g=new bt,(e=kt)&&(this.g=e(),this.h.set(this.i,this.g))}function xt(e,t){for(var n=(t=p(t=e.j.parse(t))).next();!n.done;n=t.next()){var i=xe((n=n.value).packet);if(i.length>0)switch(n.format){case Ct:e.g.extract(i,n.pts);break;case It:e.g.extractRaw608(i,n.pts)}}return e.g.decode()}function St(e,t){Et.set(e,t)}function At(e){return Et.get(e)}(i=bt.prototype).extract=function(){},i.extractRaw608=function(){},i.decode=function(){return[]},i.clear=function(){},i.getStreams=function(){return[]},wt.prototype.init=function(){},wt.prototype.parse=function(){return[]},Tt.prototype.init=function(e,t,n){if(t=void 0!==t&&t,-1!=(n=void 0===n?-1:n)&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=kt)&&(this.g=i()),this.h.set(t,this.g))}else t||this.g.clear();this.j.init(e),-1!=n&&(this.i=n)},Tt.prototype.remove=function(e){e=void 0===e?[]:e,e=new Set(e);for(var t=p(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},P("shaka.media.ClosedCaptionParser",Tt),Tt.findDecoder=function(){return kt},Tt.unregisterDecoder=function(){kt=null},Tt.registerDecoder=function(e){kt=e},Tt.findParser=At,Tt.unregisterParser=function(e){Et.delete(e)},Tt.registerParser=St;var Et=new Map,kt=null,Ct="sei",It="raw608";function Mt(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Rt,this.scroll=Dt}Mt.prototype.clone=function(){var e=new Mt;return e.id=this.id,e.viewportAnchorX=this.viewportAnchorX,e.viewportAnchorY=this.viewportAnchorY,e.regionAnchorX=this.regionAnchorX,e.regionAnchorY=this.regionAnchorY,e.width=this.width,e.height=this.height,e.heightUnits=this.heightUnits,e.widthUnits=this.widthUnits,e.viewportAnchorUnits=this.viewportAnchorUnits,e.scroll=this.scroll,e},P("shaka.text.CueRegion",Mt),Mt.prototype.clone=Mt.prototype.clone;var Rt=1;Mt.units={PX:0,PERCENTAGE:Rt,LINES:2};var Dt="";function Lt(e){this.h=e||"",this.g=0}function Nt(e){Pt(e,/[ \t]+/gm)}function Pt(e,t){return t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g?null:(e.g+=t.length,t.results)}function Ot(e){return e.g==e.h.length?null:(e=Pt(e,/[^ \t\n]*/gm))?e[0]:null}function jt(e){if(null==(e=Pt(e,Ut)))return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}Mt.scrollMode={NONE:Dt,UP:"up"};var Ut=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function _t(){}function Bt(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||ArrayBuffer.isView(n))return n;if(t.has(n))return null;var i=Array.isArray(n);if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function Ft(e){var t,n={};for(t in e)n[t]=e[t];return n}function Ht(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];void 0!==r&&(r=Ht(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if("function"==typeof e)e="";else if(e instanceof Object){for((n=Object.keys(e)).sort(),t=[],i=(n=p(n)).next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),void 0!==(r=e[r])&&(r=Ht(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Vt(e,t,n){if(e=function(e,t){function n(){for(var t=i;-1==="\r\n\t>/= ".indexOf(e[i])&&e[i];)i++;return(" "+e.slice(t,i)).slice(1)}var i=0,r=0;return function a(o,s){s=void 0!==s&&s;for(var u=[];e[i];)if(60==e.charCodeAt(i)){if(47===e.charCodeAt(i+1)){s=i+2,i=e.indexOf(">",i);var l=(s=e.substring(s,i)).indexOf(o);if(-1==l){var c=o.indexOf(".");c>0&&(l=s.indexOf(o.substring(0,c)))}if(-1==l)throw o=e.substring(0,i).split("\n"),Error("Unexpected close tag\nLine: "+(o.length-1)+"\nColumn: "+(o[o.length-1].length+1)+"\nChar: "+e[i]);i+1&&(i+=1);break}
2if(33===e.charCodeAt(i+1)){if(45==e.charCodeAt(i+2)){for(;-1!==i&&(62!==e.charCodeAt(i)||45!=e.charCodeAt(i-1)||45!=e.charCodeAt(i-2)||-1==i);)i=e.indexOf(">",i+1);-1===i&&(i=e.length)}else if(91===e.charCodeAt(i+2)&&91===e.charCodeAt(i+8)&&"cdata"===e.substr(i+3,5).toLowerCase()){-1==(l=e.indexOf("]]>",i))?(u.push(e.substr(i+9)),i=e.length):(u.push(e.substring(i+9,l)),i=l+3);continue}i++;continue}if(r>512)throw Error("XML is too deeply nested");r++;e:{c=s,i++;var d=n(),h={};for(l=[];62!==e.charCodeAt(i)&&e[i];){var f=e.charCodeAt(i);if(f>64&&f<91||f>96&&f<123){f=n();for(var p=e.charCodeAt(i);p&&39!==p&&34!==p&&!(p>64&&p<91||p>96&&p<123)&&62!==p;)i++,p=e.charCodeAt(i);var m=i+1;if(i=e.indexOf(e[i],m),m=(" "+e.slice(m,i)).slice(1),39===p||34===p){if(-1===i){if(c={tagName:d,attributes:h,children:l,parent:null},t)for(d=0;d<l.length;d++)"string"!=typeof l[d]&&(l[d].parent=c);l=c;break e}}else m=null,i--;if(f.startsWith("xmlns:")){p=m;var v=f.split(":")[1];Jt.set(p,v),$t.set(v,p)}"tt"===d&&"xml:space"===f&&"preserve"===m&&(c=!0),h[f]=m}i++}for(47!==e.charCodeAt(i-1)?(i++,l=a(d,c)):i++,c={tagName:d,attributes:h,children:l,parent:null},d=l.length,h=0;h<d;h++)"string"!=typeof(f=l[h])?t&&(f.parent=c):h==d-1&&"\n"==f&&l.pop();l=c}if(r--,u.push(l),"string"==typeof l)break;"?"===l.tagName[0]&&l.children&&(u.push.apply(u,g(l.children)),l.children=[])}else l=i,-2==(i=e.indexOf("<",i)-1)&&(i=e.length),l=(" "+e.slice(l,i+1)).slice(1),s?l.length>0&&u.push(l):(u.length&&1==l.length&&"\n"==l[0]||l.trim().length>0)&&u.push(l),i++;return u}("")}(e,void 0!==n&&n),!t&&e.length)return e[0];var i=t.split(",");return(t=e.find((function(e){return i.includes(e.tagName)})))?t:null}function Gt(e){return"string"==typeof e}function Kt(e,t){var n=[];if(!e.children)return[];for(var i=(e=p(e.children)).next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function Xt(e){if("string"==typeof e)return ze(e);for(var t=[],n=(e=p(e.children)).next();!n.done;n=e.next())"string"==typeof(n=n.value)&&t.push(n);return""===(t=t.join(""))?null:ze(t)}function Wt(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children)for(var i=(e=p(e.children)).next();!i.done;i=e.next())Wt(i.value,t,n);return n}function zt(e,t,n){return t=Jt.has(t)?Jt.get(t):"",e.attributes[t+":"+n]||null}function qt(e,t,n){for(var i=(t=p(t)).next();!i.done;i=t.next())if(i=zt(e,i.value,n))return i;return null}function Yt(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}P("shaka.util.ObjectUtils",_t),_t.alphabeticalKeyOrderStringify=Ht,_t.shallowCloneObject=Ft,_t.cloneObject=Bt;var Jt=new Map,$t=new Map;function Qt(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Mt,this.position=null,this.positionAlign=on,this.size=0,this.textAlign=sn,this.direction=dn,this.writingMode=hn,this.lineInterpretation=fn,this.line=null,this.lineHeight="",this.lineAlign=pn,this.displayAlign=ln,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=yn,this.fontStyle=wn,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={columns:32,rows:15}}function Zt(e,t){return(e=new Qt(e,t,"")).lineBreak=!0,e}function en(e,t){if(e.payload!=t.payload||!(Math.abs(e.startTime-t.startTime)<.001&&Math.abs(e.endTime-t.endTime)<.001))return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!z(e.nestedCues,t.nestedCues,en))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!z(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}function tn(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&nn(t);var i=n;n=[];for(var r=-1,a=0;a<i.length;a++)"<"===i[a]?r=a+1:">"===i[a]&&r>0&&((r=i.substr(r,a-r)).match(An)&&n.push(r),r=-1);for(a=(n=p(n)).next();!a.done;a=n.next())a=a.value,i=i.replace("<"+a+">",'<div time="'+a+'">'),i+="</div>";e:{a=i,r=[];var o=-1;n="",i=!1;for(var s=0;s<a.length;s++)if("/"===a[s]){var u=a.indexOf(">",s);if(-1===u){n=a;break e}if((u=a.substring(s+1,u))&&"v"==u){i=!0;var l=null;if(r.length&&(l=r[r.length-1]),l){if(l===u)n+="/"+u+">";else{if(!l.startsWith("v")){n+=a[s];continue}n+="/"+l+">"}s+=u.length+1}else n+=a[s]}else n+=a[s]}else"<"===a[s]?"v"!=a[o=s+1]&&(o=-1):">"===a[s]&&o>0&&(r.push(a.substr(o,s-o)),o=-1),n+=a[s];for(r=(a=p(r)).next();!r.done;r=a.next())o=(r=r.value).replace(" ",".voice-"),n=(n=n.replace("<"+r+">","<"+o+">")).replace("</"+r+">","</"+o+">"),i||(n+="</"+o+">")}n=function(e){var t={"< ":""," >":" >"},n=/(< +>|<\s|\s>
2)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,(function(e){return t[e]||""})):e||""}(n),e.payload="",i="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var c=Vt(i,"span")}catch(e){}if(c)if(1!=(c=c.children).length||c[0].tagName)for(n=(c=p(c)).next();!n.done;n=c.next())rn(n.value,e,t);else e.payload=ze(n);else e.payload=ze(n)}else e.payload=ze(n)}function nn(e){for(var t=p(Object.entries(mn)),n=t.next();!n.done;n=t.next()){var i=p(n.value);n=i.next().value,i=i.next().value;var r=new Qt(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=p(Object.entries(vn))).next();!n.done;n=t.next())n=(i=p(n.value)).next().value,i=i.next().value,(r=new Qt(0,0,"")).backgroundColor=i,e.set("."+n,r)}function rn(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new Mt,i.position=null,i.size=0,i.textAlign=sn,e.tagName)for(var r=p(e.tagName.split(/(?=[ .])+/g)),a=r.next();!a.done;a=r.next()){var o=a=a.value;if(o.startsWith(".voice-")){var s=o.split("-").pop();o='v[voice="'+s+'"]',n.has(o)||(o="v[voice="+s+"]")}switch(n.has(o)&&(s=i,o=n.get(o))&&(s.backgroundColor=an(o.backgroundColor,s.backgroundColor),s.color=an(o.c
2olor,s.color),s.fontFamily=an(o.fontFamily,s.fontFamily),s.fontSize=an(o.fontSize,s.fontSize),s.textShadow=an(o.textShadow,s.textShadow),s.fontWeight=o.fontWeight,s.fontStyle=o.fontStyle,s.opacity=o.opacity,s.rubyTag=o.rubyTag,s.textCombineUpright=o.textCombineUpright,s.wrapLine=o.wrapLine),a){case"br":return i=Zt(i.startTime,i.endTime),void t.nestedCues.push(i);case"b":i.fontWeight=bn;break;case"i":i.fontStyle=Tn;break;case"u":i.textDecoration.push(Sn);break;case"font":(a=e.attributes.color)&&(i.color=a);break;case"div":if(!(a=e.attributes.time))break;(a=a?jt(new Lt(a)):null)&&(i.startTime=a);break;case"ruby":case"rp":case"rt":i.rubyTag=a}}if(r=e.children,Gt(e)||1==r.length&&Gt(r[0]))for(n=Xt(e).split("\n"),e=!0,r=(n=p(n)).next();!r.done;r=n.next())r=r.value,e||(e=Zt(i.startTime,i.endTime),t.nestedCues.push(e)),r.length>0&&((e=i.clone()).payload=ze(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),e=(t=p(r)).next();!e.done;e=t.next())rn(e.value,i,n)}function an(e,t){return e&&e.length>0?e:t}Qt.prototype.clone=function(){function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);if(t instanceof Qt)return t.clone();if(t instanceof Mt)return t.clone();var n,i={};for(n in t)i[n]=e(t[n]);return i}var t,n=new Qt(0,0,"");for(t in this)n[t]=e(this[t]);return n},P("shaka.text.Cue",Qt),Qt.parseCuePayload=tn,Qt.equal=en,Qt.prototype.clone=Qt.prototype.clone;var on="auto";Qt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:on};var sn="center",un={LEFT:"left",RIGHT:"right",CENTER:sn,START:"start",END:"end"};Qt.textAlign=un;var ln="after",cn={BEFORE:"before",CENTER:"center",AFTER:ln};Qt.displayAlign=cn;var dn="ltr";Qt.direction={HORIZONTAL_LEFT_TO_RIGHT:dn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var hn="horizontal-tb";Qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:hn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var fn=0;Qt.lineInterpretation={LINE_NUMBER:fn,PERCENTAGE:1};var pn="start",gn={CENTER:"center",START:pn,END:"end"};Qt.lineAlign=gn;var mn={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Qt.defaultTextColor=mn;var vn={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Qt.defaultTextBackgroundColor=vn;var yn=400,bn=700;Qt.fontWeight={NORMAL:yn,BOLD:bn};var wn="normal",Tn="italic",xn={NORMAL:wn,ITALIC:Tn,OBLIQUE:"oblique"};Qt.fontStyle=xn;var Sn="underline";Qt.textDecoration={UNDERLINE:Sn,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var An=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function En(){}function kn(e,t,n){In.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,ve:t})}function Cn(e,t){for(var n=e.toLowerCase().split(";")[0],i=p([Ln,Dn,Rn,Mn]),r=i.next();!r.done;r=i.next())if(r=In.get(n+"-"+r.value)){var a=r.ve(),o=a.isSupported(e,t);if(a.destroy(),o)return r.ve}return null}En.prototype.destroy=function(){},P("shaka.transmuxer.TransmuxerEngine",En),En.findTransmuxer=Cn,En.unregisterTransmuxer=function(e,t){In.delete(e.toLowerCase().split(";")[0]+"-"+t)},En.registerTransmuxer=kn,En.prototype.destroy=En.prototype.destroy;var In=new Map,Mn=1,Rn=2,Dn=3,Ln=4;function Nn(){}function Pn(e,t){var n=e;return t&&!Kn.includes(e)&&(n+='; codecs="'+t+'"'),n}function On(e,t){return t&&(e+='; codecs="'+t+'"'),e}function jn(e,t,n){var i=Pn(e,t);return Cn(t=On(e,t))?(e=Cn(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function Un(e){return e.split(";")[0].split("/")[1]}function _n(e){var t=Gn(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:case"ac3"===e:case"ac-3"===e:return"ac-3";case"mp4a"===e&&"a6"===t:case"eac3"===e:case"ec-3"===e:return"ec-3";case"ac-4"===e:return"ac-4";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";
2case"vp09"===e:case"vp9"===e:return"vp9";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"vvc1"===e:case"vvi1"===e:return"vvc";case"dvh1"===e:case"dvhe"===e:return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc";case"lvc1"===e:return"lcevc"}return e}function Bn(e){for(var t=[],n=(e=p(e.split(","))).next();!n.done;n=e.next())n=Gn(n.value),t.push(n[0]);return t.sort().join(",")}function Fn(e){return e.split(";")[0]}function Hn(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function Vn(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function Gn(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}En.PluginPriority={FALLBACK:Mn,PREFERRED_SECONDARY:Rn,PREFERRED:Dn,APPLICATION:Ln},P("shaka.util.MimeUtils",Nn),Nn.getFullTypeWithAllCodecs=On,Nn.getFullType=Pn,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Kn=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Xn(e,t){this.l=null,this.j=e,this.D=void 0===t?"UNKNOWN":t,this.C=this.H=!1,this.o=new Map,this.i=new Map,this.A=0,this.B=1/0,this.h=this.g=null,this.G="",this.F=function(){},this.m=new Map}function Wn(e,t){ei.set(e,t)}function zn(e){return ei.get(e)}function qn(e){return!!ei.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!kt}function Yn(e,t,n,i,r,a){var o,s,u,l,c,d,h,f,g;return a=void 0===a?-1:a,E((function(m){if(1==m.h)return e.C||e.o.has(a)?m.g(Promise.resolve(),2):((o=e.i.get(a)||[]).push({buffer:t,startTime:n,endTime:i,uri:r,Uh:a}),e.i.set(a,o),m.return());if(!e.l||!e.j)return m.return();if(null==n||null==i)return e.l.parseInit(xe(t)),m.return();for(s=e.C?0:e.o.get(a),u=e.H||e.C?n:e.o.get(a),l={periodStart:s,segmentStart:n,segmentEnd:i,vttOffset:u},c=e.l.parseMedia(xe(t),l,r,[]),d=p(c),h=d.next();!h.done;h=d.next())f=h.value,e.F(f,r||null,l);g=c.filter((function(t){return t.startTime>=e.A&&t.startTime<e.B})),e.j.append(g),null==e.g&&(e.g=Math.max(n,e.A)),e.h=Math.min(i,e.B),m.j()}))}function Jn(e,t,n){n=void 0===n?-1:n,(!e.o.has(n)||"HLS"!==e.D||"HLS"===e.D&&-1===n&&0===e.o.get(n))&&e.o.set(n,t),t=e.i.get(n)||[];for(var i=0;i<t.length;i++){var r=t[i];Yn(e,r.buffer,r.startTime,r.endTime,r.uri,r.Uh)}e.i.set(n,[])}function $n(e,t,n){e.G=t,(t=e.m.get(t))&&(t=t.filter((function(e){return e.endTime<=n}))).length&&e.j.append(t)}function Qn(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=p(t.nestedCues)).next();!i.done;i=t.next())Qn(e,i.value,n)}function Zn(e){for(var t=1/0,n=-1/0,i=p(e.m.values()),r=i.next();!r.done;r=i.next())for(var a=(r=p(r.value)).next();!a.done;a=r.next())a=a.value,t=Math.min(t,a.startTime),n=Math.max(n,a.endTime);t!==1/0&&n!==-1/0&&(e.g=null==e.g?Math.max(t,e.A):Math.min(e.g,Math.max(t,e.A)),e.h=Math.max(e.h,Math.min(n,e.B)))}Xn.prototype.destroy=function(){return this.j=this.l=null,this.o.clear(),this.i.clear(),this.m.clear(),Promise.resolve()},Xn.prototype.remove=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d=this;return E((function(h){if(1==h.h)return h.g(Promise.resolve(),2);if(e>=t||n&&(function(e,t,n){for(var i=p(e.m.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var a=e.m.get(r);a=a.filter((function(e){return e.startTime<t||e.endTime>=n})),e.m.set(r,a)}}(d,e,t),""===d.G))return h.return();for(i=function(n){return n.startTime<t&&n.endTime>e},r=p(d.i.keys()),a=r.next();!a.done;a=r.next()){for(o=a.value,s=d.i.get(o),u=[],l=0;l<s.length;l++)c=s[l],i(c)||u.push(c);d.i.set(o,u)}d.j&&d.j.remove(e,t)&&null!=d.g&&(t<=d.g||e>=d.h||(e<=d.g&&t>=d.h?d.g=d.h=null:e<=d.g&&t<d.h?d.g=t:e>d.g&&t>=d.h&&(d.h=e)),Zn(d)),h.j()}))},P("shaka.text.TextEngine",Xn),Xn.prototype.destroy=Xn.prototype.destroy,Xn.findParser=zn,Xn.unregisterParser=function(e){ei.delete(e)},Xn.registerParser=Wn;var ei=new Map;function ti(e){this.g=e,this.h=null}function ni(e,t,n){var i=!0,r=null;e.h=function(){clearTimeout(r),i=!1},r=setTimeout((function(){i&&t()}),1e3*n)}function ii(e,t){ni(e,(function(){ii(e,t),e.g()}),t)}function ri(e){return null!=e}function ai(e,t){return Promise.race([t,new Promise((function(t,n){new ti(n).ba(e)}))])}function oi(){}function si(e,t){return e=ci(e),t=ci(t),e.split("-")[0]==t.split("-")[0]}function ui(e,t){return e=ci(e),t=ci(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function li(e,t){return e=ci(e),t=ci(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function ci(e){var t=(e=p(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=p(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=gi.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function di(e,t){return e=ci(e),(t=ci(t))==e?4:ui(t,e)?3:li(t,e)?2:ui(e,t)?1:0}function hi(e){var t=e.indexOf("-");return e=(e=t>=0?e.substring(0,t):e).toLowerCase(),gi.get(e)||e}function fi(e){return e.language?ci(e.language):e.audio&&e.audio.language?ci(e.audio.language):e.video&&e.video.language?ci(e.video.language):"und"}function pi(e,t){e=ci(e);for(var n=new Set,i=(t=p(t)).next();!i.done;i=t.next())n.add(ci(i.value));for(i=(t=p(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=p(n)).next();!i.done;i=t.next())if(ui(i=i.value,e))return i;for(i=(t=p(n)).next();!i.done;i=t.next())if(li(i=i.value,e))return i;for(t=(n=p(n)).next();!t.done;t=n.next())if(ui(e,t=t.value))return t;return null}ti.prototype.Qa=function(){return this.stop(),this.g(),this},ti.prototype.ba=function(e){var t=this;return this.stop(),ni(this,(function(){t.g()}),e),this},ti.prototype.Aa=function(e){return this.stop(),ii(this,e),this},ti.prototype.stop=function(){var e;null==(e=this.h)||e.call(this),this.h=null},P("shaka.util.Timer",ti),ti.prototype.stop=ti.prototype.stop,ti.prototype.tickEvery=ti.prototype.Aa,ti.prototype.tickAfter=ti.prototype.ba,ti.prototype.tickNow=ti.prototype.Qa,P("shaka.util.LanguageUtils",oi),oi.findClosestLocale=pi,oi.getLocaleForVariant=fi,oi.getLocaleForText=function(e){return ci(e.language||"und")},oi.getBase=hi,oi.relatedness=di,oi.areSiblings=function(e,t){var n=hi(e),i=hi(t);return e!=n&&t!=i&&n==i},oi.normalize=ci,oi.isSiblingOf=li,oi.isParentOf=ui,oi.areLanguageCompatible=si,oi.areLocaleCompatible=function(e,t){return(e=ci(e))==ci(t)};var gi=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 mi(){}function vi(e,t,n){function i(e,t,n){return e>=t&&e<=n}if(e&&e.video&&e.video.width&&e.video.height){var r=e.video.width,a=e.video.height;if(a>r&&(r=(a=p([a,r])).next().value,a=a.next().value),!i(r,t.minWidth,Math.min(t.maxWidth,n.width))||!i(a,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r*a,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function yi(e,t){var n,i,r,a,o,s,u;return E((function(l){if(1==l.h){for(n=function(e,t){if(e){var n=Ft(e);return n.supported=e.supported&&t.supported,n.powerEfficient=e.powerEfficient&&t.powerEfficient,n.smooth=e.smooth&&t.smooth,t.keySystemAccess&&!n.keySystemAccess&&(n.keySystemAccess=t.keySystemAccess),n}return t},i=null,r=[],a=p(t),o=a.next(),s={};!o.done;s={cache:void 0,Qd:void 0},o=a.next())u=o.value,s.Qd=Ht(u),s.cache=_i,s.cache.has(s.Qd)?i=n(i,s.cache.get(s.Qd)):r.push(bi(u).then(function(e){return function(t){for(var r=null,a=(t=p(t||[])).next();!a.done;a=t.next())r=n(r,a.value);r&&(e.cache.set(e.Qd,r),i=n(i,r))}}(s)));return l.g(Promise.all(r),2)}i&&e.decodingInfos.push(i),l.j()}))}function bi(e){var t=[""];e.video&&(t=Hn(e.video.contentType).split(","));var n=[""];e.audio&&(n=Hn(e.audio.contentType).split(","));for(var i=[],r=(t=p(t)).next();!r.done;r=t.next()){r=r.value;for(var a=p(n),o=a.next(),s={};!o.done;s={mc:void 0},o=a.next())o=o.value,s.mc=Bt(e),e.video&&(s.mc.video.contentType=Pn(Fn(s.mc.video.contentType),r)),e.audio&&(s.mc.audio.contentType=Pn(Fn(s.mc.audio.contentType),o)),i.push(new Promise(function(e){return function(t,n){("MOBILE"==Z().Fa()?ai(5,navigator.mediaCapabilities.decodingInfo(e.mc)):navigator.mediaCapabilities.decodingInfo(e.mc)).then((function(e){t(e)})).catch(n)}}(s)))}return Promise.all(i).catch((function(){return JSON.stringify(e),null}))}function wi(e,t,n,i){var r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x;return E((function(S){switch(S.h){case 1:if(e.some((function(e){return e.decodingInfos.length})))return S.return();r=p(i),a=r.next(),o={};case 2:if(a.done){S.u(4);break}o.bh=a.value,s=!1,u=p(e),l=u.next();case 5:if(l.done){S.u(7);break}c=l.value,d=Ti(c,t,n).filter((A=o,function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||e===A.bh})),h=p(d),f=h.next();case 8:if(f.done){S.u(10);break}return g=f.value,S.g(yi(c,g),9);case 9:f=h.next(),S.u(8);break;
2case 10:c.decodingInfos.some((function(e){return e.supported}))&&(s=!0),l=u.next(),S.u(5);break;case 7:if(s)return S.return();o={bh:void 0},a=r.next(),S.u(2);break;case 4:m=p(e),v=m.next();case 12:if(v.done){S.u(0);break}y=v.value,b=Ti(y,t,n).filter((function(e){return!(e=(e=e[0]).keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!i.includes(e)})),w=p(b),T=w.next();case 15:if(T.done){v=m.next(),S.u(12);break}return x=T.value,S.g(yi(y,x),16);case 16:T=w.next(),S.u(15)}var A}))}function Ti(e,t,n){var i=e.audio,r=e.video,a=[],o=[];if(r)for(var s=p(r.fullMimeTypes),u=s.next();!u.done;u=s.next()){var l=Hn(u=u.value);if(l.includes(",")&&!i){var c=l.split(","),d=Fn(u);l=ot("video",c),d=jn(d,c=xi(c=ot("audio",c),d),"audio"),o.push({contentType:d,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=Si(l),u={contentType:jn(Fn(u),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}r.colorGamut&&(u.colorGamut=r.colorGamut),a.push(u)}if(i)for(u=(s=p(i.fullMimeTypes)).next();!u.done;u=s.next())u=jn(u=Fn(l=u.value),l=xi(Hn(l),u),"audio"),o.push({contentType:u,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(s=[],0==a.length&&a.push(null),0==o.length&&o.push(null),u=(a=p(a)).next();!u.done;u=a.next())for(u=u.value,d=(l=p(o)).next();!d.done;d=l.next())d=d.value,c={type:n?"file":"media-source"},u&&(c.video=u),d&&(c.audio=d),s.push(c);if(!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[s];for(e=[],n=new Map,a=(o=p(o)).next();!a.done;a=o.next())a=a.value,n.get(a.keySystem)||n.set(a.keySystem,[]),n.get(a.keySystem).push(a);for(o=t?"required":"optional",t=t?["persistent-license"]:["temporary"],u=(a=p(n.keys())).next();!u.done;u=a.next()){for(u=u.value,d=n.get(u),l=new Map,c=(d=p(d)).next();!c.done;c=d.next()){var h=(c=c.value).videoRobustness+","+c.audioRobustness;l.get(h)||l.set(h,[]),l.get(h).push(c)}for(d=(l=p(l.values())).next();!d.done;d=l.next()){d=d.value,c=[];for(var f=(h=p(s)).next();!f.done;f=h.next()){f=Object.assign({},f.value);for(var g={keySystem:u,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},m=p(d),v=m.next();!v.done;v=m.next()){if((v=v.value).initData&&v.initData.length){for(var y=new Set,b=p(v.initData),w=b.next();!w.done;w=b.next())y.add(w.value.initDataType);g.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(g.distinctiveIdentifier="required"),v.persistentStateRequired&&(g.persistentState="required"),v.sessionType&&(g.sessionTypes=[v.sessionType]),i&&(g.audio?(v.encryptionScheme&&(g.audio.encryptionScheme=g.audio.encryptionScheme||v.encryptionScheme),g.audio.robustness=g.audio.robustness||v.audioRobustness):(g.audio={robustness:v.audioRobustness},v.encryptionScheme&&(g.audio.encryptionScheme=v.encryptionScheme)),""==g.audio.robustness&&delete g.audio.robustness),r&&(g.video?(v.encryptionScheme&&(g.video.encryptionScheme=g.video.encryptionScheme||v.encryptionScheme),g.video.robustness=g.video.robustness||v.videoRobustness):(g.video={robustness:v.videoRobustness},v.encryptionScheme&&(g.video.encryptionScheme=v.encryptionScheme)),""==g.video.robustness&&delete g.video.robustness)}f.keySystemConfiguration=g,c.push(f)}e.push(c)}}return e}function xi(e,t){var n=Z();return"flac"==e.toLowerCase()?"WEBKIT"!=n.va()?"flac":"fLaC":"opus"===e.toLowerCase()?"WEBKIT"!=n.va()?"opus":"mp4"==Un(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&n.sd()?"ec-3":e}function Si(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function Ai(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=p(t.roles),h=d.next();!h.done;h=d.next())c.add(h.value);if(n)for(h=(d=p(n.roles)).next();!h.done;h=d.next())c.add(h.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,videoLabel:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(c),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audio
2Bandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,e.videoRoles=n.roles,e.videoLabel=n.label,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec,e.pixelAspectRatio=i.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&i.bandwidth&&(e.videoBandwidth+=i.bandwidth)),o.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,r=o.split(",");try{e.videoCodec=ot("video",r),e.audioCodec=ot("audio",r)}catch(e){}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,r=t.dependencyStream)&&(e.audioCodec=r.codecs||e.audioCodec,e.audioBandwidth&&r.bandwidth&&(e.audioBandwidth+=r.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function Ei(e){return{id:e.id,active:!1,type:lt,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function ki(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=au(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function Ci(e){return{id:e.id,type:"chapter",bandwidth:e.bandwidth||0,language:e.language}}function Ii(e){return e.__shaka_id||(e.__shaka_id=Bi++),e.__shaka_id}function Mi(e,t){return t=void 0!==t&&t,t={id:Ii(e),active:t&&"disabled"!=e.mode,type:lt,bandwidth:0,language:ci(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==e.kind,originalTextId:e.id,originalLanguage:e.language},"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function Ri(e,t){var n=e?e.language:null;if(n={id:Ii(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:ci(n||"und"),label:e?e.label:null,videoLabel:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!!e&&"main"==e.kind,roles:[],forced:!1,audioR
2oles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+","+n.videoCodec:n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function Di(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function Li(e){return e.filter((function(e){return Di(e)}))}function Ni(e,t,n,i){if(!t)return[];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=pi(ci(t),e.map((function(e){return e.language})));if(!s)return[];r=e.filter((function(e){return ci(e.language)==s}))}if(r=r.filter((function(e){return e.forced==i})),n){if((e=Pi(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((function(e,t){return e.concat(t)}),[]),e.length?Pi(r,e[0]):r}function Pi(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function Oi(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function ji(e,t){t.length&&(t=t.filter((function(t){return _n(e.codecs)==_n(t.codecs)})).sort((function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:(e.width||0)-(t.width||0)})),e.trickModeVideo=t[0],t.length>1&&(t=t.find((function(t){return e.width==t.width&&e.height==t.height}))))&&(e.trickModeVideo=t)}function Ui(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"}P("shaka.util.StreamUtils",mi),mi.meetsRestrictions=vi;var _i=new Map,Bi=0,Fi=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Hi=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Vi(){var t=this;this.L=this.G=null,this.o=!1,this.A=new U,this.i=new Y,navigator.connection&&navigator.connection.addEventListener&&this.i.I(navigator.connection,"change",(function(){t.g.useNetworkInformation&&navigator.onLine&&(t.A=new U,t.g&&t.A.configure(t.g.advanced),t.trySuggestStreams())})),this.m=[],this.K=1,this.O=!1,this.l=this.h=this.g=this.B=null,this.C=new ti((function(){if(t.o&&(t.g.restrictToElementSize||t.g.restrictToScreenSize)){var e=t.chooseVariant();e&&t.G&&t.G(e,t.g.clearBufferSwitch,t.g.safeMarginSwitch)}})),this.D=e,"documentPictureInPicture"in e&&this.i.I(e.documentPictureInPicture,"enter",(function(){t.D=e.documentPictureInPicture.window,t.C&&t.C.Qa(),t.i.Ja(t.D,"pagehide",(function(){t.D=e,t.C&&t.C.Qa()}))})),this.M=this.F=this.j=null,this.J=this.H=0}function Gi(e,t){if(void 0===t||!t){if(!e.O){if(!((t=e.A).g>=t.i))return;e.O=!0,e.B-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}
2if(Date.now()-e.B<1e3*e.g.switchInterval)return}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G&&(e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch),zi(e))}function Ki(e,t,n,i,r){if(e.F){var a=e.F.Dg();a&&(n=n.filter((function(e){return!e.bandwidth||!a||e.bandwidth<=a})))}return t&&(n=n.filter((function(e){return vi(e,t,{width:r,height:i})}))),n.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Xi(e){Wi(e);var t=e.h;e.g.droppedFrames&&null!=t&&t.getVideoPlaybackQuality&&(zi(e),function(e){e.i.I(e.h,"resize",(function(){zi(e)}))}(e),e.M=new ti((function(){if(!e.h.paused&&e.o&&e.g.droppedFrames){var t=e.h.getVideoPlaybackQuality(),n=t.droppedVideoFrames;if(t=t.totalVideoFrames,e.h.playbackRate>1||!t)e.H=n,e.J=t;else{var i=n-e.H,r=t-e.J;e.H=n,e.J=t,i/r>=e.g.advanced.droppedFramesThreshold&&e.L&&e.L("video",e.g.advanced.droppedFramesBanDuration)}}})).Aa(e.g.advanced.droppedFramesInterval))}function Wi(e){var t;e.i.eb(e.h,"resize"),null==(t=e.M)||t.stop(),e.M=null}function zi(e){var t=e.h;e.g.droppedFrames&&null!=t&&t.getVideoPlaybackQuality&&(t=t.getVideoPlaybackQuality(),e.H=t.droppedVideoFrames,e.J=t.totalVideoFrames)}(i=Vi.prototype).stop=function(){var e,t;this.G=null,this.o=!1,this.m=[],this.K=1,this.h=this.B=null,null==(e=this.l)||e.disconnect(),this.l=null,null==(t=this.C)||t.stop(),this.F=this.j=null,Wi(this)},i.release=function(){this.stop(),this.i.release(),this.C=null},i.init=function(e,t){this.G=e,this.L=t},i.chooseVariant=function(e){e=void 0!==e&&e;var t=1/0,n=1/0;if(this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,t=this.D.screen.height*n,n*=this.D.screen.width),this.l&&this.g.restrictToElementSize){var i=this.g.ignoreDevicePixelRatio?1:this.D.devicePixelRatio,r=this.h.clientHeight,a=this.h.clientWidth;this.j&&document.pictureInPictureElement&&document.pictureInPictureElement==this.h&&(r=this.j.height,a=this.j.width),t=Math.min(t,r*i),n=Math.min(n,a*i)}if((r=this.m.filter((function(e){return e&&!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}))).length||(r=this.m),i=r,e&&r.length!=this.m.length&&(i=this.m.filter((function(e){return e&&!!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}))),e=Ki(this,this.g.restrictions,i,1/0,1/0),t!=1/0||n!=1/0){for(e=function(e){for(var t=[],n=(e=p(e)).next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort((function(e,t){return e.width-t.width}))}(e),r=(e=p(e)).next();!r.done;r=e.next())if((r=r.value).height>=t&&r.width>=n){t=r.height,n=r.width;break}e=Ki(this,this.g.restrictions,i,t,n)}for(t=this.getBandwidthEstimate(),i.length&&!e.length&&(e=[(e=Ki(this,null,i,1/0,1/0))[0]]),n=e[0]||null,i=0;i<e.length;i++){r=e[i];var o=isNaN(this.K)?1:Math.abs(this.K);a=o*r.bandwidth/this.g.bandwidthDowngradeTarget;for(var s={bandwidth:1/0},u=i+1;u<e.length;u++)if(r.bandwidth!=e[u].bandwidth){s=e[u];break}o=o*s.bandwidth/this.g.bandwidthUpgradeTarget,n&&r&&t>=a&&t<=o&&(n.bandwidth!=r.bandwidth||n.bandwidth==r.bandwidth&&n.video&&r.video&&(n.video.width<r.video.width||n.video.height<r.video.height))&&(n=r)}return this.B=Date.now(),n},i.enable=function(){this.o=!0,zi(this),this.m.length&&this.trySuggestStreams()},i.disable=function(){this.o=!1},i.segmentDownloaded=function(e,t,n){e>=this.g.cacheLoadThreshold&&this.A.sample(e,t),n&&null!=this.B&&this.o&&Gi(this)},i.trySuggestStreams=function(){this.o&&(this.B=Date.now(),Gi(this,!0))},i.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.A.getBandwidthEstimate(e),this.F?this.F.getBandwidthEstimate(e):e)},i.setVariants=function(e){return!X(e,this.m)&&(this.m=e,!0)},i.playbackRateChanged=function(e){this.K=e},i.setMediaElement=function(t){function n(){i.C.ba(qi)}var i=this;this.h=t,this.l&&(this.l.disconnect(),this.l=null),this.h&&"ResizeObserver"in e&&(this.l=new ResizeObserver(n),this.l.observe(this.h)),this.i.I(t,"enterpictureinpicture",(function(e){e.pictureInPictureWindow&&(i.j=e.pictureInPictureWindow,i.i.I(i.j,"resize",n))})),this.i.I(t,"leavepictureinpicture",(function(){i.j&&i.i.eb(i.j,"resize",n),i.j=null})),Xi(this)},i.setCmsdManager=function(e){this.F=e},i.configure=function(e){this.g=e,this.A&&this.g&&this.A.configure(this.g.advanced),Xi(this)},P("shaka.abr.SimpleAbrManager",Vi),Vi.prototype.configure=Vi.prototype.configure,Vi.prototype.setCmsdManager=Vi.prototype.setCmsdManager,Vi.prototype.setMediaElement=Vi.prototype.setMediaElement,Vi.prototype.playbackRateChanged=Vi.prototype.playbackRateChanged,Vi.prototype.setVariants=Vi.prototype.setVariants,Vi.prototype.getBandwidthEstimate=Vi.prototype.getBandwidthEstimate,Vi.prototype.trySuggestStreams=Vi.prototype.trySuggestStreams,Vi.prototype.segmentDownloaded=Vi.prototype.segmentDownloaded,Vi.prototype.disable=Vi.prototype.disable,Vi.prototype.enable=Vi.prototype.enable,Vi.prototype.chooseVariant=Vi.prototype.chooseVariant,Vi.prototype.init=Vi.prototype.init,Vi.prototype.release=Vi.prototype.release,Vi.prototype.stop=Vi.prototype.stop;var qi=1;function Yi(e,t,n,i,r){if(i>=r)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){a=s;break}for(s=n.length-1;s>=0;s--)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=Ji(i,r,s,u,l,c);a<=o;a++){for(var h=n[a],f=-1,p=-1,g=0;g<h.length;g++)if(null!=h[g]&&""!==h[g].g.trim()){f=g;break}for(g=h.length-1;g>=0;g--)if(null!=h[g]&&""!==h[g].g.trim()){p=g;break}if(-1===f||-1===p)h=$i(i,r),e.nestedCues.push(h);else{for(;f<=p;f++)if(g=h[f]){var m=g.l,v=g.i,y=g.j,b=g.h;m==s&&v==u&&y==l&&b==c||(d.payload&&e.nestedCues.push(d),d=Ji(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=$i(i,r),e.nestedCues.push(d)),d=Ji(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Ji(e,t,n,i,r,a){return e=new Qt(e,t,""),n&&e.textDecoration.push(Sn),i&&(e.fontStyle=Tn),e.color=r,e.backgroundColor=a,e}function $i(e,t){return(e=new Qt(e,t,"")).lineBreak=!0,e}function Qi(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function Zi(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.o="black",this.A=this.B=null,tr(this)}function er(e,t,n){var i="CC"+(1+(e.D<<1|e.C)),r=new Qt(t,n,"");r.lineInterpretation=1;var a=lr.get(e.g);return a&&(r.line=a),null!=e.A&&null!=e.B&&(r.position=10+Math.min(70,10*e.A)+2.5*e.B),(t=Yi(r,i,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(a=lr.get(e.g+3-t.cue.nestedCues.length))&&(r.line=a),t}function tr(e){rr(e,0,15),e.g=1}function nr(e,t,n){if(!(n<32||n>127)){var i="";switch(t){case 0:i=ar.has(n)?ar.get(n):String.fromCharCode(n);break;case 1:i=or.get(n);break;case 2:e.i[e.g].pop(),i=sr.get(n);break;case 3:e.i[e.g].pop(),i=ur.get(n)}i&&e.i[e.g].push(new Qi(i,e.m,e.j,e.o,e.l))}}function ir(e,t,n,i){if(!(n<0||t<0))if(t>=n)for(--i;i>=0;i--)e.i[t+i]=e.i[n+i].map((function(e){return e}));else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map((function(e){return e}))}function rr(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var ar=new Map([[39,"â"],[42,"á"],[92,"é"],[92,"é"],[94,"Ã"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ã"],[126,"ñ"],[127,"â"]]),or=new Map([[48,"Â
2®"],[49,"°"],[50,"½"],[51,"¿"],[52,"â¢"],[53,"¢"],[54,"£"],[55,"âª"],[56,"à "],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),sr=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,"»"]]),ur=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,"â"]]),lr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function cr(e,t){this.h=0,this.o=new Zi(e,t),this.i=new Zi(e,t),this.g=this.j=new Zi(e,t),this.l=0,this.m=null}function dr(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=er(i,e.l,n),(n=e.i).g=n.h>0?n.h:0,rr(n,0,15),(n=e.j).g=n.h>0?n.h:0,rr(n,0,15),i.g=15),e.h=3,i.h=t,r}function hr(e){e.h=1,e.g=e.j,e.g.h=0}function fr(e){H("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var pr="black green blue cyan red yellow magenta black".split(" "),gr="white green blue cyan red yellow magenta white_italics".split(" ");function mr(e,t){this.J=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.A="black",vr(this)}function vr(e){e.i=[];for(var t=0;t<16;t++)e.i.push(yr())}function yr(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function br(e,t){wr(e)&&(e.i[e.h][e.g]=new Qi(t,e.D,e.B,e.A,e.C),e.g++)}function wr(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}function Tr(e,t,n){var i=new Qt(e.j,t,"");i.textAlign=0===e.F?"left":1===e.F?"right":sn;var r=i.region;switch(e.J&&(r.id+="svc"+e.J),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?Rt:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Yi(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function xr(){this.i=[],this.h=null,this.g=0}function Sr(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(e.g>0&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new Ar(e.h)),e.h=null,e.g=0))}function Ar(e){this.g=0,this.h=e}function Er(e){if(!e.Ta())throw new _e(2,2,3e3);return e.h[e.g++]}function kr(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function Cr(e,t){var n=Er(t),i=n.value;return n=n.pts,16===i&&(i=i<<16|Er(t).value),i>=0&&i<=31?function(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=Er(t).value,i=Er(t).value].map((function(e){return("0"+(255&e).toString(16)).slice(-2)})).join(""),br(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!wr(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=Tr(t,i,e.i)),t.h+1>=t.o?function(e){for(var t=0,n=1;n<16;n++,t++)e.i[t]=e.i[n];for(n=0;n<1;n++,t++)e.i[t]=yr()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=Tr(t,i,e.i)),t.i[t.h]=yr(),t.g=0;break;case 12:t.isVisible()&&(r=Tr(t,i,e.i)),vr(t),t.h=0,t.g=0}return r?[r]:[]}(e,t,i,n):i>=128&&i<=159?function(e,t,n,i){if(n>=128&&n<=135)i=7&n,e.h[i]&&(e.g=e.h[i]);else{if(136===n){n=Er(t).value,t=[];for(var r=(n=p(Ir(e,n))).next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var a=Tr(r,i,e.i);a&&t.push(a)}vr(r)}return t}if(137===n)for(n=(t=p(Ir(e,t=Er(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.display();else{if(138===n){for(n=Er(t).value,t=null,r=(n=p(Ir(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Tr(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=Er(t).value,t=null,r=(n=p(Ir(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=Tr(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return Mr(e,t=Er(t).value,i);if(143===n)return i=Mr(e,255,i),Rr(e),i;if(144===n)t.skip(1),i=Er(t).value,e.g&&(e.g.B=(128&i)>0,e.g.D=(64&i)>0);
2else if(145===n)i=Er(t).value,n=Er(t).value,t.skip(1),e.g&&(t=Dr((48&n)>>4,(12&n)>>2,3&n),e.g.C=Dr((48&i)>>4,(12&i)>>2,3&i),e.g.A=t);else if(146===n)i=Er(t).value,t=Er(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=Er(t).value,t.skip(1),e.g&&(e.g.F=3&i);else if(n>=152&&n<=159){n=(15&n)-8,(r=null!==e.h[n])||((a=new mr(n,e.i)).j=i,e.h[n]=a),i=Er(t).value,a=Er(t).value;var o=Er(t).value,s=Er(t).value,u=Er(t).value;t=Er(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.A="black"),(t=e.h[n]).l=(32&i)>0,t.L=127&a,t.H=o,t.G=(240&s)>>4,t.K=(128&a)>0,t.o=1+(15&s),t.m=1+(63&u),e.g=e.h[n]}}}return[]}(e,t,i,n):(i>=4096&&i<=4127?(e=255&i)>=8&&e<=15?t.skip(1):e>=16&&e<=23?t.skip(2):e>=24&&e<=31&&t.skip(3):i>=4224&&i<=4255?(e=255&i)>=128&&e<=135?t.skip(4):e>=136&&e<=143&&t.skip(5):i>=32&&i<=127?(t=i,e.g&&br(e.g,127===t?"âª":String.fromCharCode(t))):i>=160&&i<=255?e.g&&br(e.g,String.fromCharCode(i)):i>=4128&&i<=4223?(t=255&i,e.g&&(Lr.has(t)?(t=Lr.get(t),br(e.g,t)):br(e.g,"_"))):i>=4256&&i<=4351&&e.g&&br(e.g,160!=(255&i)?"_":"[CC]"),[])}function Ir(e,t){for(var n=[],i=0;i<8;i++)!(1&~t)&&e.h[i]&&n.push(i),t>>=1;return n}function Mr(e,t,n){for(var i=[],r=(t=p(Ir(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(a=Tr(a,n,e.i))&&i.push(a),e.h[r]=null}return i}function Rr(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Dr(e,t,n){var i={0:0,1:0,2:1,3:1};return Nr[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}mr.prototype.isVisible=function(){return this.l},mr.prototype.display=function(){this.l=!0},Ar.prototype.Ta=function(){return this.g<this.h.length},Ar.prototype.Va=function(){return this.g},Ar.prototype.skip=function(e){if(this.g+e>this.h.length)throw new _e(2,2,3e3);this.g+=e},Ar.prototype.hh=function(e){if(this.g-e<0)throw new _e(2,2,3e3);this.g-=e};var Lr=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,"â"]]),Nr="black blue green cyan red magenta yellow white".split(" ");function Pr(e,t){this.h=Ae(e),this.i=t==jr,this.g=0}function Or(){return new _e(2,3,3e3)}(i=Pr.prototype).Ta=function(){return this.g<this.h.byteLength},i.Va=function(){return this.g},i.kb=function(){return this.h.byteLength},i.V=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw Or()}},i.ra=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw Or()}},i.T=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw Or()}},i.Of=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw Or()}},i.we=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw Or()}if(t>2097151)throw new _e(2,3,3001);return this.g+=8,4294967296*t+e},i.ab=function(e,t){if(this.g+e>this.h.byteLength)throw Or();var n=xe(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},i.skip=function(e){if(this.g+e>this.h.byteLength)throw Or();this.g+=e},i.hh=function(e){if(this.g<e)throw Or();this.g-=e},i.seek=function(e){if(e<0||e>this.h.byteLength)throw Or();this.g=e},i.Wc=function(){for(var e=this.g;this.Ta()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=xe(this.h,e,this.g-e),this.g+=1,Ve(e)},P("shaka.util.DataViewReader",Pr),Pr.prototype.readTerminatedString=Pr.prototype.Wc,Pr.prototype.seek=Pr.prototype.seek,Pr.prototype.rewind=Pr.prototype.hh,Pr.prototype.skip=Pr.prototype.skip,Pr.prototype.readBytes=Pr.prototype.ab,Pr.prototype.readUint64=Pr.prototype.we,Pr.prototype.readInt32=Pr.prototype.Of,Pr.prototype.readUint32=Pr.prototype.T,Pr.prototype.readUint16=Pr.prototype.ra,Pr.prototype.readUint8=Pr.prototype.V,Pr.prototype.getLength=Pr.prototype.kb,Pr.prototype.getPosition=Pr.prototype.Va,Pr.prototype.hasMoreData=Pr.prototype.Ta;var jr=1;function Ur(){this.g=[],this.h=[],this.i=new xr,this.j=0,this.l=new Map([["CC1",new cr(0,0)],["CC2",new cr(0,1)],["CC3",new cr(1,0)],["CC4",new cr(1,1)]]),this.o=this.m=0,this.C=new Map,this.B=!0,this.A=new Set,_r(this)}function _r(e){e.m=0,e.o=0;for(var t=p(e.l.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,tr(n.i),tr(n.j),tr(n.o);e.B=!0}function Br(e,t){var n=t.type;if(16==(112&t.gb)){var i=t.gb>>3&1;0===n?e.m=i:e.o=i}if(i="CC"+(1+(n<<1|(n?e.o:e.m))),n=e.l.get(i),255===t.gb&&255===t.Cb||!t.gb&&!t.Cb||!Hr(t.gb)||!Hr(t.Cb))return++e.j>=45&&_r(e),null;e.j=0,t.gb&=127,t.Cb&=127;var r=t.gb;if(r>=1&&r<=15||!t.gb&&!t.Cb)return null;if(r=null,16==(112&t.gb))e:{if(e.A.add(i),i=t.gb,e=t.Cb,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,16==(240&i)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1],i="white",r=!1;var a=null,o=e>95?e-96:e-64;o<=13?i=gr[Math.floor(o/2)]:o<=15?r=!0:a=Math.floor((o-16)/2),e=!(1&~e),4!==n.h&&(o=n.g,3===n.h&&t!==o.g&&(ir(o,n=1+t-o.h,1+o.g-o.h,o.h),rr(o,0,n-1),rr(o,t+1,15-t)),o.g=t,o.m=e,o.j=r,o.l=i,o.A=a,o.o="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",nr(n.g,0,32),i=!1,"white_italics"===(t=gr[(14&e)>>
21])&&(t="white",i=!0),n.g.m=!(1&~e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",!(7&i)&&(t=pr[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))nr(n.g,1,e);else if(18==(246&i)&&32==(224&e))nr(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.Cb){case 32:hr(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=dr(n,2,e);break;case 38:i=dr(n,3,e);break;case 39:i=dr(n,4,e);break;case 40:nr(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:tr(n.o),fr(n);break;case 43:fr(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=er(t,n.l,e)),rr(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=er(t,n.l,e),ir(t,(r=t.g-t.h+1)-1,r,t.h),rr(t,0,r-1),rr(t,t.g,15-t.g),n.l=e);break;case 46:rr(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=er(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,hr(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&e>=33&&e<=35&&(n.g.B=e-32)}r=null}else e=t.Cb,nr(n.g,0,t.gb),nr(n.g,0,e);return r}function Fr(e,t){var n=[];try{for(;t.Ta();){var i=Er(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&Er(t).value),0!=r){e.A.add("svc"+r);for(var o=e.C.getOrInsertComputed(r,(function(e){return new kr(e)})),s=t.Va();t.Va()-s<a;){var u=Cr(o,t);n.push.apply(n,g(u))}}}}catch(e){if(!(e instanceof _e&&3e3===e.code))throw e;H("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Hr(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function Vr(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(g(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function Gr(){this.i=new Map,this.h=new Map,this.g=!1}function Kr(e){for(var t=$r(e);e.reader.Ta()&&!e.parser.g;)e.parser.Tc(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Xr(e){for(var t=$r(e),n=e.reader.T(),i=0;i<n&&(e.parser.Tc(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function Wr(e){var t=$r(e);for(e.reader.skip(78);e.reader.Ta()&&!e.parser.g;)e.parser.Tc(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function zr(e){var t=$r(e);e.reader.skip(8);var n=e.reader.ra();for(e.reader.skip(6),2==n?e.reader.skip(48):e.reader.skip(12),1==n&&e.reader.skip(16);e.reader.Ta()&&!e.parser.g;)e.parser.Tc(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function qr(e,t){return function(n){e(n.reader.ab(n.reader.kb()-n.reader.Va(),t))}}function Yr(e){for(var t=0,n=(e=p(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Jr(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function $r(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}Pr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jr},(i=Ur.prototype).clear=function(){this.j=0,this.g=[],this.h=[];var e=this.i;e.i=[],e.h=[],e.g=0,_r(this);for(var t=(e=p(this.C.values())).next();!t.done;t=e.next())Rr(t.value)},i.extract=function(e,t){if(this.B){for(var n=p(this.l.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(!((e=new Pr(e,0)).kb()<8)&&181===e.V()&&49===e.ra()&&1195456820===e.T()&&3===e.V()&&64&(n=e.V()))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.V(),a=(4&r)>>2,o=e.V(),s=e.V();a&&(0==(r&=3)||1===r?this.g.push({pts:t,type:r,gb:o,Cb:s,order:this.g.length}):(this.h.push({pts:t,type:r,value:o,order:this.h.length}),this.h.push({pts:t,type:2,value:s,order:this.h.length})))}},i.extractRaw608=function(e,t){for(var n=0;n+1<e.length;n+=2)this.g.push({pts:t,type:0,gb:e[n],Cb:e[n+1],order:this.g.length})},i.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t=[];this.g.sort(e),this.h.sort(e);for(var n=p(this.g),i=n.next();!i.done;i=n.next())(i=Br(this,i.value))&&t.push(i);for(i=(n=p(this.h)).next();!i.done;i=n.next())Sr(this.i,i.value);for(i=(n=p(this.i.i)).next();!i.done;i=n.next())i=Fr(this,i.value),t.push.apply(t,g(i));return this.i.i=[],this.g=[],this.h=[],t},i.getStreams=function(){return Array.from(this.A)},P("shaka.cea.CeaDecoder",Ur),kt=function(){return new Ur},(i=Gr.prototype).box=function(e,t){return e=Yr(e),this.i.set(e,Qr),this.h.set(e,t),this},i.N=function(e,t){return e=Yr(e),this.i.set(e,Zr),this.h.set(e,t),this},i.stop=function(){this.g=!0},i.parse=function(e,t,n){for(e=new Pr(e,0),this.g=!1;e.Ta()&&!this.g;)this.Tc(0,e,t,n)},i.Tc=function(e,t,n,i){var r=t.Va();if(i&&r+8>t.kb())this.g=!0;else{var a=t.T(),o=t.T(),s=Jr(o),u=!1;switch(a){case 0:a=t.kb()-r;break;case 1:if(i&&t.Va()+8>t.kb())return void(this.g=!0);a=t.we(),u=!0}var l=this.h.get(o);if(l){var c=null,d=null;if(this.i.get(o)==Zr){if(i&&t.Va()+4>t.kb())return void(this.g=!0);c=(d=t.T())>>>24,d&=16777215}o=r+a,n&&o>t.kb()&&(o=t.kb()),i&&o>t.kb()?this.g=!0:(o-=t.Va(),l({name:s,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:c,flags:d,reader:t=new Pr(t=o>0?t.ab(o,!1):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:u}))}else t.skip(Math.min(r+a-t.Va(),t.kb()-t.Va()))}},P("shaka.util.Mp4Parser",Gr),Gr.headerSize=$r,Gr.typeToString=Jr,Gr.allData=qr,Gr.audioSampleEntry=zr,Gr.visualSampleEntry=Wr,Gr.sampleDescription=Xr,Gr.children=Kr,Gr.prototype.parseNext=Gr.prototype.Tc,Gr.prototype.parse=Gr.prototype.parse,Gr.prototype.stop=Gr.prototype.stop,Gr.prototype.fullBox=Gr.prototype.N,Gr.prototype.box=Gr.prototype.box;var Qr=0,Zr=1;function ea(e,t){var n=null,i=null,r=null,a=null,o=e.T();return 1&t&&(r=e.we()),2&t&&(a=e.T()),8&t&&(n=e.T()),16&t&&(i=e.T()),{trackId:o,ac:n,Kc:i,Mh:r,ih:a}}function ta(e,t){return 1==t?{ya:4294967296*(t=e.T())+(e=e.T())}:{ya:e.T()}}
2function na(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.T(),e.skip(4),e=e.ra(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function ia(e,t,n){var i=e.T(),r=[],a=null;1&n&&(a=e.Of()),4&n&&e.skip(4);for(var o=0;o<i;o++){var s={ud:null,sampleSize:null,ze:null};256&n&&(s.ud=e.T()),512&n&&(s.sampleSize=e.T()),1024&n&&e.skip(4),2048&n&&(s.ze=0==t?e.T():e.Of()),r.push(s)}return{Nj:i,td:r,Wd:a}}function ra(e,t){1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.T();return 1==t?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),{trackId:n,width:t=e.ra()+e.ra()/16,height:e=e.ra()+e.ra()/16}}function aa(e){e.skip(6),e.skip(2),e.skip(8);var t=e.ra();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.ra()+e.ra()/65536}}function oa(e){return{codec:Jr(e=e.T())}}function sa(e){return e.V(),e.V(),e.V(),e.V(),{defaultKID:et(e=e.ab(16,!1))}}function ua(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function la(e){return(e<10?"0":"")+e}function ca(){this.j=new Map,this.i=this.h=0,this.l=null,this.g=fa}function da(e,t,n,i,r,a,o,s,u){var l=0,c=a,d=s.map((function(e){return e.td}));for((d=[].concat.apply([],g(d))).length&&(c=d[0].sampleSize||a),t.skip(o+s[0].Wd);t.Ta();){o=t.T();var h=t.V(),f=null;switch(f=!1,s=1,e.g){case pa:f=6==(f=31&h);break;case ga:s=2,t.skip(1),f=39==(f=h>>1&63)||40==f;break;case ma:s=2,t.skip(1),f=23==(f=h>>1&63)||24==f;break;default:return}if(f)for(h=0,l<d.length&&(h=d[l].ze||0),h=(n+h)/i,f=(s=p(Vr(s=t.ab(o-s,!1)))).next();!f.done;f=s.next())u.push({packet:f.value,pts:h,format:Ct});else try{t.skip(o-s)}catch(e){break}0==(c-=o+4)&&(n=l<d.length?n+(d[l].ud||r):n+r,c=++l<d.length&&d[l].sampleSize||a)}}function ha(e,t,n,i,r,a,o,s){var u=o.map((function(e){return e.td}));for(u=[].concat.apply([],g(u)),e.skip(a+o[0].Wd),a=0;a<u.length;a++){o=t/n;var l=e.ab(u[a].sampleSize||r,!1);s.push({packet:l,pts:o,format:It}),t+=u[a].ud||i}}ca.prototype.init=function(e){function t(e){e=e.name,ya.has(e)&&(n.g=ya.get(e))}var n=this,i=[],r=[],a=null;if((new Gr).box("moov",Kr).box("mvex",Kr).N("trex",(function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.T(),t=t.T(),n.h=e,n.i=t})).box("trak",Kr).N("tkhd",(function(e){e=ra(e.reader,e.version),a=e.trackId,i.push(e.trackId)})).box("mdia",Kr).N("mdhd",(function(e){e=na(e.reader,e.version),r.push(e.timescale)})).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",Wr).box("sinf",Kr).box("frma",(function(e){e=oa(e.reader).codec,ya.has(e)&&(n.g=ya.get(e))})).box("c608",(function(){n.g=va,n.l=a})).parse(e,!0,!0),!i.length||!r.length||i.length!=r.length)throw new _e(2,2,2010);this.g==fa&&F("Unable to determine bitstream format for CEA parsing!"),i.forEach((function(e,t){n.j.set(e,r[t])}))},ca.prototype.parse=function(e){var t=this;if(this.g==fa)return[];var n=[],i=0,r=[];return(new Gr).box("moof",(function(e){i=e.start,r=[],Kr(e)})).box("traf",(function(e){r.push({trackId:null,ya:null,ac:t.h,Kc:t.i,Lf:[],timescale:9e4}),Kr(e)})).N("trun",(function(e){var t=r[r.length-1];e=ia(e.reader,e.version,e.flags),t.Lf.push(e)})).N("tfhd",(function(e){var n=r[r.length-1];e=ea(e.reader,e.flags),n.trackId=e.trackId,n.ac=e.ac||t.h,n.Kc=e.Kc||t.i,e=e.trackId,t.j.has(e)&&(n.timescale=t.j.get(e))})).N("tfdt",(function(e){var t=r[r.length-1];e=ta(e.reader,e.version),t.ya=e.ya})).box("mdat",(function(e){for(var a=i-e.start-8,o=e.reader.Va(),s=p(r),u=s.next();!u.done;u=s.next())u=u.value,(t.g!=va||u.trackId===t.l)&&(null===u.ya?F("Unable to find base media decode time for CEA captions!"):(e.reader.seek(o),t.g===va?ha(e.reader,u.ya,u.timescale,u.ac,u.Kc,a,u.Lf,n):da(t,e.reader,u.ya,u.timescale,u.ac,u.Kc,a,u.Lf,n)))})).parse(e,!1,!0),n},P("shaka.cea.Mp4CeaParser",ca);var fa=0,pa=1,ga=2,ma=3,va=4,ya=(new Map).set("avc1",pa).set("avc3",pa).set("dvav",pa).set("dva1",pa).set("hev1",ga).set("hvc1",ga).set("dvh1",ga).set("dvhe",ga).set("vvc1",ma).set("vvi1",ma).set("dvc1",ma).set("dvi1",ma);
2function ba(e,t){if(this.j=e,void 0!==t&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)i>=2&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=xe(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function wa(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(0!==n){for(var i=0,r=0;r<n;r++)i=i<<8|e.j[t+r];e.h=i<<8*(4-n),e.g=8*n,e.i-=n}}function Ta(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,wa(e)}e.h<<=t,e.g-=t}function xa(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&wa(e),(n=t-n)>0?i<<n|xa(e,n):i}function Sa(e){for(var t=0;0===e.g;){if(0===e.i)return t;wa(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||0===e.i)break;wa(e)}return t}function Aa(e){Ta(e,1+Sa(e))}function Ea(e){return xa(e,Sa(e)+1)-1}function ka(e){return 1&(e=Ea(e))?1+e>>>1:-1*(e>>>1)}function Ca(e){return 1===xa(e,1)}function Ia(e){return xa(e,8)}function Ma(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=ka(e))+256)%256),n=0===i?n:i}function Ra(e){return Ia(e),Ea(e),Ea(e)}function Da(){}function La(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Na(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function Pa(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function Oa(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(e.size<2||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=Ve(xe(e.data,1,n)),r=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=Ve(xe(e.data,3+n,a));return o="--\x3e"===i?Ve(xe(e.data,4+n+a)):Te(e.data.subarray(4+n+a)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?e.size<2||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=Ve(xe(e.data,1,i)),e=Ve(xe(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?e.size<2||-1===(n=e.data.indexOf(0))?null:(n=Ve(xe(e.data,0,n)),t.description=n,"com.apple.streaming.transportStreamTimestamp"==n?(n=e.data.subarray(n.length+1),e=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=Te(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?e.size<2||3!==e.data[0]?null:(e=Ve(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=Ve(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Te(e.data),t):null}function ja(e){for(var t=0,n=[];La(e,t);){var i=Pa(e,t+6);for(e[t+5]>>6&1&&(t+=10),i=(t+=10)+i;t+10<i;){var r=e.subarray(t),a=Pa(r,4);(a=Oa(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:a,data:r.subarray(10,10+a)}))&&n.push(a),t+=r.size+10}Na(e,t)&&(t+=10)}return n}function Ua(e,t){for(var n=t=void 0===t?0:t,i=0;La(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=Pa(e,t+6),Na(e,t+10)&&(i+=10),t+=i;return i>0?e.subarray(n,n+i):new Uint8Array([])}function _a(){this.L=null,this.M=!1,this.C=this.O=null,this.D=[],this.j=[],this.g=[],this.G=this.H=null,this.l=[],this.i=[],this.h=[],this.J=null,this.o=[],this.m=[],this.F=this.K=this.A=this.B=null}function Ba(e,t,n){return nt(e,t[n],n+1<t.length?t[n+1]:e.length)}function Fa(e,t){if(1!=(t[0]<<16|t[1]<<8|t[2]))return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(192&i){var r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2;null==e.B&&(e.B=r),n.pts=Va(r,e.B),e.B=n.pts,n.dts=n.pts,64&i&&(i=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.A&&(e.A=i),n.dts=n.pts!=r?Va(i,e.A):i),e.A=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}function Ha(e){var t=e.Nc();return t.length>1&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?Math.abs(1/(t-e)*9e4):null}function Va(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e}function Ga(e){return!(Ka(e)<0)}function Ka(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;var i=e.indexOf(71,n+1);n=i>=0&&i<t?i:n+1}return-1}St("video/mp4",(function(){return new ca})),P("shaka.util.ExpGolomb",ba),P("shaka.util.Id3Utils",Da),Da.getID3Data=Ua,Da.getID3Frames=ja,(i=_a.prototype).clearData=function(){this.D=[],this.j=[],this.g=[],this.l=[],this.i=[],this.h=[],this.o=[],this.m=[]},i.Ae=function(e){null!=this.F&&this.F!=e&&(this.A=this.B=null),this.F=e},i.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,Ka(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71==e[r]){var a=!!(64&e[r+1]),o=((31&e[r+1])<<8)+e[r+2];
2if((48&e[r+3])>>4>1){var s=r+5+e[r+4];if(s==r+188)continue}else s=r+4;switch(o){case 0:a&&(s+=e[s]+1),this.L=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.L:a&&(s+=e[s]+1),o={audio:-1,video:-1,ie:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<u;){var l=(31&a[s+1])<<8|a[s+2],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(c>0)for(var d=s+5,h=c;h>2;){var f=a[d+1]+2;switch(a[d]){case 5:var p=d+2;p=a[p]<<24|a[p+1]<<16|a[p+2]<<8|a[p+3],-1==o.audio&&1332770163===p?(o.audio=l,o.audioCodec="opus"):-1==o.video&&1096167473===p&&(o.video=l,o.videoCodec="av1");break;case 106:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 122:-1==o.audio&&(o.audio=l,o.audioCodec="ec3");break;case 124:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 127:"opus"==o.audioCodec&&(p=null,128===a[d+2]&&(p=a[d+3]),null!=p&&(this.K={channelCount:15&p?15&p:2,Nh:p,sampleRate:48e3}))}d+=f,h-=f}break;case 15:-1==o.audio&&(o.audio=l,o.audioCodec="aac");break;case 17:-1==o.audio&&(o.audio=l,o.audioCodec="aac-loas");break;case 21:-1==o.ie&&(o.ie=l);break;case 27:-1==o.video&&(o.video=l,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=l,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=l,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=l,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=l,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.O=a.video,this.C=a.videoCodec),-1!=a.audio&&(this.H=a.audio,this.G=a.audioCodec),-1!=a.ie&&(this.J=a.ie),i&&!this.M&&(i=!1,r=t-188),this.M=!0;break;case this.O:s=e.subarray(s,r+188),a?(this.j.push(this.D.length),this.D.push(s)):this.j.length&&this.D.push(s);break;case this.H:s=e.subarray(s,r+188),a?(this.i.push(this.l.length),this.l.push(s)):this.i.length&&this.l.push(s);break;case this.J:s=e.subarray(s,r+188),a?(this.m.push(this.o.length),this.o.push(s)):this.m.length&&this.o.push(s);break;default:i=!0}}return this},i.ah=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.C&&(r=2);var a=t.state||0,o=a,s=0,u=[],l=-1,c=0,d="hvc"===this.C;for(-1==a&&(l=0,c=d?e[0]>>1&63:31&e[0],a=0,s=1);s<i;){var h=e[s++];a?1===a?a=h?0:2:h?1==h?(h=s-a-1,l>=0?u.push({data:e.subarray(l+r,h),fullData:e.subarray(l,h),type:c,time:n,state:null}):(a=u.length?u[u.length-1]:t.re)&&(o&&s<=4-o&&a.state&&(a.data=a.data.subarray(0,a.data.byteLength-o),a.fullData=a.fullData.subarray(0,a.fullData.byteLength-o)),h>0&&(h=e.subarray(0,h),a.data=tt(a.data,h),a.fullData=tt(a.fullData,h),a.state=0)),s<i?(c=d?e[s]>>1&63:31&e[s],l=s,a=0):a=-1):a=0:a=3:a=h?0:1}return l>=0&&a>=0&&u.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:a}),!u.length&&t.re&&(n=u.length?u[u.length-1]:t.re)&&(n.data=tt(n.data,e),n.fullData=tt(n.fullData,e)),t.state=a,u},i.getMetadata=function(){for(var e=[],t=0;t<this.m.length;t++){var n=Ba(this.o,this.m,t);(n=Fa(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:ja(n.data),dts:n.dts,pts:n.pts})}return e},i.ib=function(){if(this.i.length&&!this.h.length)for(var e=0;e<this.i.length;e++){var t=Ba(this.l,this.i,e),n=Fa(this,t),i=this.h.length?this.h[this.h.length-1]:null;n&&null!=n.pts&&null!=n.dts&&(!i||i.pts!=n.pts&&i.dts!=n.dts)?this.h.push(n):this.h.length&&(t=n?n.data:t)&&((i=this.h.pop()).data=tt(i.data,t),this.h.push(i))}return this.h},i.Nc=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=0;t<this.j.length;t++){var n=Ba(this.D,this.j,t),i=Fa(this,n),r=this.g.length?this.g[this.g.length-1]:null;i&&null!=i.pts&&null!=i.dts&&(!r||r.pts!=i.pts&&r.dts!=i.dts)?this.g.push(i):this.g.length&&(n=i?i.data:n)&&((r=this.g.pop()).data=tt(r.data,n),this.g.push(r))}if(e){for(t={re:null,state:null},r=[],i=(n=p(this.g)).next();!i.done;i=n.next())(i=i.value).nalus=this.ah(i,t),i.nalus.length&&(r.push(i),t.re=i.nalus[i.nalus.length-1]);this.g=r}}return e?this.g:(e=this.g,this.g=[],e)},i.getStartTime=function(e){if("audio"==e){e=null;var t=this.ib();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.Nc(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},i.dd=function(){return{audio:this.G,video:this.C}},i.fe=function(){for(var e=[],t=p(this.Nc()),n=t.next();!n.done;n=t.next())e.push.apply(e,g(n.value.nalus));return e},i.Fg=function(){return"hvc"==this.C?function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length)return t;if(!(n=n.find((function(e){return 33==e.type}))))return t;var i=new ba(n.fullData,!0);Ia(i),Ia(i),xa(i,4);var r=xa(i,3);Ca(i);var a=xa(i,2),o=xa(i,1),s=xa(i,5),u=xa(i,32);n=Ia(i);for(var l=Ia(i),c=Ia(i),d=Ia(i),h=Ia(i),f=Ia(i),p=Ia(i),g=[],m=[],v=0;v<r;v++)g.push(Ca(i)),m.push(Ca(i));if(r>0)for(v=r;v<8;
2v++)xa(i,2);for(v=0;v<r;v++)g[v]&&xa(i,88),m[v]&&Ia(i);Ea(i),3==(r=Ea(i))&&xa(i,1),g=Ea(i),m=Ea(i);var y=v=0,b=0,w=0;return Ca(i)&&(v+=Ea(i),y+=Ea(i),b+=Ea(i),w+=Ea(i)),t.width=String(g-(v+y)*(1===r||2===r?2:1)),t.height=String(m-(b+w)*(1===r?2:1)),i=function(e){for(var t=0,n=0;n<32;n++)t|=(e>>n&1)<<31-n;return t>>>0}(u),o=1==o?"H":"L",a="hvc1."+["","A","B","C"][a]+s,a+="."+i.toString(16).toUpperCase(),a+="."+o+p,f&&(a+="."+f.toString(16).toUpperCase()),h&&(a+="."+h.toString(16).toUpperCase()),d&&(a+="."+d.toString(16).toUpperCase()),c&&(a+="."+c.toString(16).toUpperCase()),l&&(a+="."+l.toString(16).toUpperCase()),n&&(a+="."+n.toString(16).toUpperCase()),t.codec=a,t.frameRate=Ha(e),t}(this):function(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length)return t;if(!(n=n.find((function(e){return 7==e.type}))))return t;var i=Ia(n=new ba(n.data)),r=Ia(n),a=Ia(n);if(Aa(n),Xa.includes(i)){var o=Ea(n);if(3===o&&Ta(n,1),Aa(n),Aa(n),Ta(n,1),Ca(n)){o=3!==o?8:12;for(var s=0;s<o;s++)Ca(n)&&Ma(n,s<6?16:64)}}if(Aa(n),0===(o=Ea(n)))Ea(n);else if(1===o)for(Ta(n,1),Aa(n),Aa(n),o=Ea(n),s=0;s<o;s++)Aa(n);Aa(n),Ta(n,1),o=Ea(n),s=Ea(n);var u=xa(n,1);0===u&&Ta(n,1),Ta(n,1);var l=0,c=0,d=0,h=0;return Ca(n)&&(l=Ea(n),c=Ea(n),d=Ea(n),h=Ea(n)),t.height=String((2-u)*(s+1)*16-2*d-2*h),t.width=String(16*(o+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+a.toString(16).toUpperCase()).slice(-2),t.frameRate=Ha(e),t}(this)},P("shaka.util.TsParser",_a),_a.syncOffset=Ka,_a.probe=Ga,_a.prototype.getVideoInfo=_a.prototype.Fg,_a.prototype.getVideoNalus=_a.prototype.fe,_a.prototype.getCodecs=_a.prototype.dd,_a.prototype.getStartTime=_a.prototype.getStartTime,_a.prototype.getVideoData=_a.prototype.Nc,_a.prototype.getAudioData=_a.prototype.ib,_a.prototype.getMetadata=_a.prototype.getMetadata,_a.prototype.parseNalus=_a.prototype.ah,_a.prototype.parse=_a.prototype.parse,_a.prototype.setDiscontinuitySequence=_a.prototype.Ae,_a.prototype.clearData=_a.prototype.clearData,_a.Timescale=9e4;var Xa=[100,110,122,244,44,83,86,118,128,138,139,134];function Wa(){this.g=null}function za(e,t){this.g=e,this.h=t}function qa(e,t,n,i){F([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Ya(e,t,n,i){B([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}Wa.prototype.init=function(){},Wa.prototype.parse=function(e){this.g?this.g.clearData():this.g=new _a;var t=[];if(!Ga(e=xe(e)))return t;var n=(e=this.g.parse(e)).dd(),i=e.fe();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=p(i)).next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&null!=i.time)for(var r=p(Vr(i.data)),a=r.next();!a.done;a=r.next())t.push({packet:a.value,pts:i.time,format:Ct});return t},P("shaka.cea.TsCeaParser",Wa),St("video/mp2t",(function(){return new Wa})),P("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),P("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"}),P("shaka.config.MsfFilterType",{NONE:0,NEXT_GROUP_START:1,LARGEST_OBJECT:2,ABSOLUTE_START:3,ABSOLUTE_RANGE:4}),P("shaka.config.MsfVersion",{AUTO:"auto",DRAFT_14:"draft-14",DRAFT_16:"draft-16"}),P("shaka.config.PositionArea",{DEFAULT:0,TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,CENTER_LEFT:4,CENTER:5,CENTER_RIGHT:6,BOTTOM_LEFT:7,BOTTOM_CENTER:8,BOTTOM_RIGHT:9}),P("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2}),za.prototype.toString=function(){return"v"+this.g+"."+this.h};var Ja=null;function $a(){}function Qa(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function Za(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;i>=0;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function eo(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function to(){return io||(no||(no=new ti((function(){io=null}))),(io=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(io=document.createElement("video")),no.ba(1),io)}P("shaka.util.Dom",$a),$a.removeAllChildren=eo,$a.clearSourceFromVideo=Za;var no=null,io=null;function ro(){this.j=new Q((function(){for(var e=navigator.userAgent.toLowerCase(),t=p([{type:"VR",Qf:/oculus|quest/},{type:"TV",Qf:/smart[ _]?tv|android ?tv/},{type:"MOBILE",Qf:/iphone|ipad|ipod|android/}]),n=t.next();!n.done;n=t.next())if((n=n.value).Qf.test(e))return n.type;var i;if(t=(null==(e=navigator.userAgentData)||null==(i=e.platform)?void 0:i.toLowerCase())||"",e){if(e.mobile)return"MOBILE";if(t.includes("android"))return"TV"}return"DESKTOP"})),this.l=new Q((function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"}))}function ao(){var t=e.ManagedMediaSource||e.MediaSource;
2return!(!t||!t.isTypeSupported)}function oo(e,t){return e=e.Fa(),["DESKTOP","MOBILE","VR","APPLE_VR"].includes(e)?t.remote:null}function so(){ro.call(this),this.g=new Q((function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})),this.h=new Q((function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"}))}function uo(){if(!lo())throw Error("Not a Chromecast device!");ro.call(this),this.h=new Q((function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null})),this.g=new Q((function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return(e=e.toLowerCase()).includes("android")?co:e.includes("fuchsia")?ho:fo}))}function lo(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}(i=ro.prototype).Pb=function(){return!!navigator.mediaCapabilities},i.Fa=function(){return this.j.value()},i.va=function(){return this.l.value()},i.Xc=function(){return!1},i.Sf=function(){return!1},i.je=function(){return!1},i.fh=function(){return!1},i.sd=function(){return!1},i.Dc=function(){return!0},i.cb=function(){var t=e.ManagedSourceBuffer||e.SourceBuffer;return!!t&&!!t.prototype&&!!t.prototype.changeType},i.wd=function(){return!0},i.jh=function(){return 0},i.Fb=function(){return Promise.resolve({width:1/0,height:1/0})},i.sh=function(){return!1},i.Yf=function(){return!1},i.Oa=function(e){var t=this.Fa();return"TV"!==t&&"CONSOLE"!==t&&"CAST"!==t||(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},i.eh=function(){return[]},i.ec=function(t){return void 0!==e.matchMedia&&(e.matchMedia("(color-gamut: p3)").matches||e.matchMedia("(dynamic-range: high)").matches)?t?"HLG":"PQ":"SDR"},i.wh=function(){return!1},i.Vg=function(){return!1},i.ye=function(){return!1},i.De=function(){return!0},i.Wg=function(){return!1},i.uh=function(){return!0},i.Cc=function(){return!1},i.Hf=function(e){return"com.apple.fps"===e},i.Ce=function(){return!0},i.toString=function(){return"Device: "+this.jb()+" v"+this.oa()+"; Type: "+this.Fa()},h(so,ro),(i=so.prototype).oa=function(){return this.g.value()},i.jb=function(){return"Apple Browser"},i.Fa=function(){return this.h.value()},i.va=function(){return"WEBKIT"},i.Pb=function(){return!1},i.Xc=function(e,t){return"audio"===t},i.je=function(){return!0},i.fh=function(e){return"audio"===e},i.Oa=function(e){return ro.prototype.Oa.call(this,e),e.abr.minTimeToSwitch=.5,e},i.wh=function(){return!0},i.Ce=function(){return!1},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(ee=function(){return new so}),h(uo,ro),(i=uo.prototype).oa=function(){return this.h.value()},i.jb=function(){return"Chromecast with "+this.g.value()},i.Fa=function(){return"CAST"},i.va=function(){return"CHROMIUM"},i.Pb=function(){return ro.prototype.Pb.call(this)&&this.g.value()!==fo},i.cb=function(e){return ro.prototype.cb.call(this,e)&&this.g.value()!==fo},i.jh=function(){switch(this.g.value()){case co:return 0;case ho:return 3;default:return 1}},i.Fb=function(){var t,n,i,r;return E((function(a){switch(a.h){case 1:if(t=e.cast&&cast.__platform__&&cast.__platform__.canDisplayType,n={width:1280,height:720},a.m(2),!(i=t)){a.u(4);break}return a.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:i=a.i;case 4:if(i){n.width=3840,n.height=2160,a.u(6);break}if(!(r=t)){a.u(7);break}return a.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=a.i;case 7:r&&(n.width=1920,n.height=1080);case 6:a.o(3);break;case 2:B("Failed to check canDisplayType:",a.l());case 3:return a.return(n)}}))},i.Oa=function(e){return ro.prototype.Oa.call(this,e),e.streaming.stallSkip=0,e},i.Cc=function(){return!0};var co="Android",ho="Fuchsia",fo="Linux";function po(){ro.call(this),this.i=new Q((function(){var e=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return e?parseInt(e[2],10):null})),this.g=new Q((function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"})),this.h=new Q((function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")})),this.o=new Q((function(){return navigator.userAgent.includes("sony.hbbtv.tv")})),this.m=new Q((function(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():!!navigator.userAgent.includes("Android")}))}function go(){ro.apply(this,arguments)}function mo(){ro.call(this),this.g=new Q((function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null}))}function vo(){ro.apply(this,arguments)}function yo(){ro.apply(this,arguments)}function bo(){ro.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}function wo(){ro.apply(this,arguments)}function To(){ro.call(this),this.i=new Q((function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")})),this.h=new Q((function(){return navigator.userAgent.includes("SOPOpenBrowser")})),this.g=new Q((function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}))}function xo(){ro.call(this);var e=this;this.h=function(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}(),this.g=null;try{var t=new PalmServiceBridge;t.onservicecallback=function(t){var n,i,r,a;t=JSON.parse(t),e.g=null!=(a=null!=(r=null==(n=t.configs)?void 0:n["tv.model.supp
2ortHDR"])?r:null==(i=t.configs)?void 0:i["tv.config.supportDolbyHDRContents"])&&a},t.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(e){F("WebOS: getConfigs call failed",e)}}if(lo()&&(ee=function(){return new uo}),h(po,ro),(i=po.prototype).oa=function(){return this.i.value()},i.jb=function(){return this.g.value()},i.Xc=function(e){return!!De(e)&&"Edge"===this.g.value()&&this.h.value()},i.Sf=function(){return"Edge"===this.g.value()&&this.h.value()},i.je=function(){return"Edge"===this.g.value()&&this.h.value()},i.cb=function(e){return("Edge"!==this.g.value()||!this.h.value()||!De(e))&&ro.prototype.cb.call(this,e)},i.Oa=function(e){if(ro.prototype.Oa.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="",e.drm.defaultVideoRobustnessForWidevine=""),e},i.ye=function(){return"Edge"===this.g.value()||this.o.value()},i.Cc=function(){if("GECKO"===this.va()){var e=this.oa();return null!==e?e>=100:ro.prototype.Cc.call(this)}return ro.prototype.Cc.call(this)},i.Hf=function(e){return"GECKO"===this.va()?De(e):ro.prototype.Hf.call(this,e)},te=function(){return new po},h(go,ro),(i=go.prototype).oa=function(){return null},i.jb=function(){return"Hisense"},i.Fa=function(){return"TV"},i.Pb=function(){return!1},i.cb=function(){return!1},i.Fb=function(){var t={width:1920,height:1080},n=null;if(e.Hisense_Get4KSupportState)try{n=e.Hisense_Get4KSupportState()}catch(e){}return null==n&&(n=navigator.userAgent.includes("UHD")),n&&(t.width=3840,t.height=2160),Promise.resolve(t)},i.Oa=function(e){return ro.prototype.Oa.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(ee=function(){return new go}),h(mo,ro),(i=mo.prototype).jb=function(){return"PlayStation"},i.Fa=function(){return"CONSOLE"},i.va=function(){return"WEBKIT"},i.oa=function(){return this.g.value()},i.Pb=function(){return!1},i.Dc=function(){return!1},i.cb=function(){return!1},i.Yf=function(){return 4===this.oa()},i.Fb=function(){var t,n,i,r;return E((function(a){switch(a.h){case 1:return t={width:1920,height:1080},n=!1,a.m(2),a.g(e.msdk.device.getDisplayInfo(),4);case 4:i=a.i,n="4K"===i.resolution,a.o(3);break;case 2:return a.l(),a.m(5),a.g(e.msdk.device.getDisplayInfoImmediate(),7);case 7:r=a.i,n="4K"===r.resolution,a.o(3);break;case 5:F("PlayStation: Failed to get the display info:",a.l());case 3:return n&&(t.width=3840,t.height=2160),a.return(t)}}))},i.Oa=function(e){return ro.prototype.Oa.call(this,e),4===this.oa()&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},i.ye=function(){return 4===this.oa()},i.De=function(){return 4!==this.oa()},navigator.userAgent.includes("PlayStation")&&(ee=function(){return new mo}),h(vo,ro),(i=vo.prototype).oa=function(){return null},i.jb=function(){return"TitanOS"},i.Fa=function(){return"TV"},i.Fb=function(){var e={width:1920,height:1080};try{SmartTvA_API.hasCapability("UHD")?(e.width=3840,e.height=2160):SmartTvA_API.hasCapability("FHD")?(e.width=1920,e.height=1080):(e.width=1280,e.height=720)}catch(e){F("Titan OS: Error detecting screen size, default screen size 1920x1080.",e)}return Promise.resolve(e)},i.ec=function(e){try{if(SmartTvA_API.hasCapability("HDR","HDR10")||SmartTvA_API.hasCapability("HDR","DV"))return e?"HLG":"PQ"}catch(t){return F("Titan OS: Error checking HDR support",t),ro.prototype.ec.call(this,e)}return"SDR"},navigator.userAgent.includes("TitanOS")&&(ee=function(){return new vo}),h(yo,ro),(i=yo.prototype).oa=function(){return null},i.jb=function(){return"TiVoOS"},i.Fa=function(){return"TV"},i.va=function(){return"CHROMIUM"},i.cb=function(){return!1},navigator.userAgent.includes("TiVoOS")&&(ee=function(){return new yo}),h(bo,ro),(i=bo.prototype).oa=function(){return this.g},i.jb=function(){return"Tizen"},i.va=function(){return"CHROMIUM"},i.Fa=function(){return"TV"},i.Xc=function(){return!0},i.sd=function(){return 3===this.oa()},i.Pb=function(){return!1},i.Dc=function(){var e=this.oa();return null!==e?e>=4:ro.prototype.Dc.call(this)},i.cb=function(){return!1},i.wd=function(){return this.g&&this.h?5===this.g?this.h>=5:this.g>5:ro.prototype.wd.call(this)},i.Fb=function(){var t=e.devicePixelRatio;t={width:e.screen.width*t>1920?3840:1920,height:e.screen.height*t>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var n=webapis.systeminfo.getMaxVideoResolution();t.width=n.width,t.height=n.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(t.width=7680,t.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(t.width=3840,t.height=2160)}catch(e){F("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},i.Oa=function(e){return ro.prototype.Oa.call(this,e),e.drm.ignoreDuplicateInitData=2!==this.oa(),3===this.oa()&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},i.eh=function(){var e=[];return null!==this.g&&this.g<5&&e.push("opus"),e},i.ec=function(e){try{if(webapis.avinfo.isHdrTvSupport())return e?"HLG":"PQ"}catch(t){return ro.prototype.ec.call(this,e)}return"SDR"},i.Vg=function(){return!0},i.Wg=function(){return 3===this.oa()},navigator.userAgent.includes("Tizen")&&(ee=function(){return new bo}),h(wo,ro),wo.prototype.oa=function(){return null},wo.prototype.jb=function(){return"Vizio"},wo.prototype.Fa=function(){return"TV"},wo.prototype.Pb=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(ee=function(){return new wo}),h(To,ro),(i=To.prototype).oa=function(){return this.g.value()},i.jb=function(){return"WebKit STB"},i.Fa=function(){return"TV"},i.va=function(){return"WEBKIT"},i.Pb=function(){return!1},i.Dc=function(){var e=this.g.value();return null===e||e>=15},i.Xc=function(){return this.h.value()},i.Fb=function(){return Promise.resolve({width:e.screen.width*e.devicePixelRatio,height:e.screen.height*e.devicePixelRatio})}
2,i.De=function(){return!this.i.value()},i.Ce=function(){return!1},(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(ee=function(){return new To}),h(xo,ro),(i=xo.prototype).oa=function(){return this.h},i.jb=function(){return"WebOS"},i.Fa=function(){return"TV"},i.va=function(){return"CHROMIUM"},i.Pb=function(){return!1},i.Dc=function(){var e=this.oa();return null!==e?e>3:ro.prototype.Dc.call(this)},i.cb=function(){return!1},i.wd=function(){var e=this.oa();return null!==e?e>3:ro.prototype.wd.call(this)},i.Fb=function(){var t={width:1920,height:1080};try{var n=JSON.parse(e.PalmSystem.deviceInfo);t.width=Math.max(1920,n.screenWidth),t.height=Math.max(1080,n.screenHeight)}catch(e){F("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(t)},i.Oa=function(e){return ro.prototype.Oa.call(this,e),3===this.oa()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},i.ec=function(e){return null==this.g?(F("WebOS: getConfigs call haven't finished"),ro.prototype.ec.call(this,e)):this.g?e?"HLG":"PQ":"SDR"},i.uh=function(){return!1},i.Cc=function(){var e=this.oa();return null!==e?e>=6:ro.prototype.Cc.call(this)},navigator.userAgent.includes("Web0S")){var So=new xo;ee=function(){return So}}function Ao(){ro.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}function Eo(){var e=null;try{e="undefined"!=typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(e){}return e}function ko(e,t){var n=2,i=1e3,r=2,a=.5;this.l=null==e.maxAttempts?n:e.maxAttempts,this.j=null==e.baseDelay?i:e.baseDelay,this.o=null==e.fuzzFactor?a:e.fuzzFactor,this.m=null==e.backoffFactor?r:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Co(e,t){this.promise=e,this.i=t,this.g=null}function Io(e){return new Co(Promise.reject(e),(function(){return Promise.resolve()}))}function Mo(){var e=Promise.reject(new _e(2,7,7001));return e.catch((function(){})),new Co(e,(function(){return Promise.resolve()}))}function Ro(e){return new Co(Promise.resolve(e),(function(){return Promise.resolve()}))}function Do(e){return new Co(e,(function(){return e.catch((function(){}))}))}function Lo(t,n){if(n)if(n instanceof Map)for(var i=p(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 No(){this.Xa=new q,this.mg=this}function Po(){this.g=[]}function Oo(e,t){e.g.push(t.finally((function(){K(e.g,t)})))}function jo(e,t,n,i,r,a,o){No.call(this),this.i=null,this.j=!1,this.A=new Po,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=i||null,this.D=r||null,this.G=a||null,this.F=o||null,this.l=new Map}function Uo(e,t,n,i){i=void 0!==i&&i,n=n||Ko;var r=Xo.get(e);(!r||n>=r.priority)&&Xo.set(e,{priority:n,ve:t,bj:i})}function _o(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n,attempt:0}}function Bo(e,t,n,i,r,a,o){var s=n.attempt%n.uris.length,u=function(e,t,n,i){function r(e){a=a.Db((function(){return n.body&&(n.body=Te(n.body)),e(t,n,i)}))}var a=Ro(void 0);e.D&&r(e.D);for(var o=(e=p(e.g)).next();!o.done;o=e.next())r(o.value);return a.Db(void 0,(function(e){if(e instanceof _e&&7001==e.code)throw e;throw new _e(2,1,1006,e)}))}(e,t,n,i),l=Date.now(),c=0;u.promise.then((function(){c=Date.now()-l}),(function(){})),e.i.forceHTTP&&(n.uris[s]=n.uris[s].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[s]=n.uris[s].replace("http://","https://")),s>0&&e.G&&e.G(t,i,n.uris[s],n.uris[s-1]);var d=new re(n.uris[s]),h=d.Ob,f=!1;h||(ae(d,h=(h=location.protocol).slice(0,-1)),n.uris[s]=d.toString()),h=
2h.toLowerCase();var g=(h=Xo.get(h))?h.ve:null;if(!g)return Io(new _e(2,1,1e3,d));var m=h.bj;(d=e.l.get(d.ob))&&(n.headers[e.i.commonAccessTokenHeaderName]=d);var v,y=null,b=null,w=!1,T=!1;return u.Db((function(){return Do(r.attempt())})).Db((function(){if(e.j)return Mo();v=Date.now();var r=0;n.requestStartTime=Date.now();var a=g(n.uris[s],n,t,(function(a,s,u){y&&y.stop(),b&&b.ba(l/1e3),e.o&&t==Go&&(r++,n.packetNumber=r,e.o(a,s,Fo(i),n,i),f=!0,o.g=u)}),(function(i){T=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(i,n,t)}),{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!m)return a;var u=n.retryParameters.connectionTimeout;u&&(y=new ti((function(){w=!0,a.abort()}))).ba(u/1e3);var l=n.retryParameters.stallTimeout;return l&&(b=new ti((function(){w=!0,a.abort()}))),a})).Db((function(r){y&&y.stop(),b&&b.stop(),null==r.timeMs&&(r.timeMs=Date.now()-v,r.timeMs+=c);var a=r.headers[e.i.commonAccessTokenHeaderName];if(a){var o=new re(r.uri);e.l.set(o.ob,a)}return a={response:r,Ii:f},!T&&e.m&&e.m(r.headers,n,t),e.B&&e.B(t,n,i,r),a}),(function(u){if(y&&y.stop(),b&&b.stop(),e.C){var l=null,c=0;u instanceof _e&&(l=u,1001==u.code&&(c=u.data[1])),e.C(t,n,i,l,c,w)}if(e.j)return Mo();if(w&&(u=new _e(1,1,1003,n.uris[s],t)),u instanceof _e){if(7001==u.code)throw u;if(1010==u.code)throw a;if(1==u.severity){if((l=new Lo("retry",l=(new Map).set("error",u))).cancelable=!0,e.dispatchEvent(l),l.defaultPrevented)throw u;return++n.attempt,Bo(e,t,n,i,r,u,o)}}throw u}))}function Fo(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.xc)return!1}return!0}function Ho(){this.g=0}function Vo(e,t,n){Co.call(this,e,t),this.h=n}h(Ao,ro),(i=Ao.prototype).oa=function(){return this.h},i.jb=function(){return"Xbox"},i.Fa=function(){return"CONSOLE"},i.va=function(){return this.g?"EDGE":"CHROMIUM"},i.Xc=function(){return!0},i.Sf=function(){return!0},i.je=function(){return!0},i.sh=function(){return this.g},i.Fb=function(){var e={width:1920,height:1080},t=Eo();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do{t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation")}while(t===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch(e){F("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},i.Oa=function(e){return ro.prototype.Oa.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},i.ye=function(){return!0},(navigator.userAgent.includes("Xbox One")||null!==Eo())&&(ee=function(){return new Ao}),ko.prototype.attempt=function(){var e,t,n=this;return E((function(i){if(1==i.h){if(n.g>=n.l){if(!n.i)throw new _e(2,7,1010);n.g=1,n.h=n.j}return e=n.g,n.g++,0==e?i.return():(t=n.h*(1+(2*Math.random()-1)*n.o),i.g(new Promise((function(e){new ti(e).ba(t/1e3)})),2))}n.h*=n.m,i.j()}))},Co.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},Co.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Co.prototype.Db=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=Promise.withResolvers();a.promise.catch((function(){}));var o=new _e(2,7,7001);return this.promise.then(n(!0),n(!1)),new Co(a.promise,(function(){return i()}))},s.Object.defineProperties(Co.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),P("shaka.util.AbortableOperation",Co),Co.prototype.chain=Co.prototype.Db,Co.prototype.finally=Co.prototype.finally,Co.all=function(e){return new Co(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))},Co.prototype.abort=Co.prototype.abort,Co.notAbortable=Do,Co.completed=Ro,Co.aborted=Mo,Co.failed=Io,Lo.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Lo.prototype.stopImmediatePropagation=function(){this.g=!0},Lo.prototype.stopPropagation=function(){},P("shaka.util.FakeEvent",Lo),No.prototype.addEventListener=function(e,t){this.Xa&&this.Xa.push(e,t)},No.prototype.removeEventListener=function(e,t){this.Xa&&this.Xa.remove(e,t)},No.prototype.dispatchEvent=function(e){if(!this.Xa)return!0;var t=this.Xa.get(e.type)||[],n=this.Xa.get("All");for(n&&(t=t.concat(n)),n=(t=p(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.mg,e.currentTarget=this.mg;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},No.prototype.release=function(){this.Xa=null},Po.prototype.destroy=function(){for(var e=[],t=p(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)},h(jo,No),(i=jo.prototype).configure=function(e){this.i=e},i.ej=function(e){this.g.add(e)},i.vj=function(e){this.g.delete(e)},i.Oh=function(){this.g.clear()},i.fj=function(e){this.h.add(e)},i.wj=function(e){this.h.delete(e)},i.Ph=function(){this.h.clear()},i.wg=function(){this.l.clear()},i.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),No.prototype.release.call(this),this.A.destroy()},i.request=function(e,t,n){var i=this,r=new Ho;if(this.j){var a=Promise.reject(new _e(2,7,7001));return a.catch((function(){})),new Vo(a,(function(){return Promise.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Bt(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=Bt(t.uris),t.attempt=0;var o=(a=Bo(this,e,t,n,new ko(t.retryParameters,!1),null,r)).Db((function(t){return function(e,t,n,i){for(var r=Ro(void 0),a=(e=p(e.h)).next(),o={};!a.done;o={gh:void 0},a=e.next())o.gh=a.value,r=r.Db(function(e){return function(){var r=n.response;return r.data&&(r.data=Te(r.data)),(0,e.gh)(t,r,i)}}(o));return r.Db((function(){return n}),(function(e){var t=2;if(e instanceof _e){if(7001==e.code)throw e;t=e.severity}throw new _e(t,1,1007,e)}))}(i,e,t,n)})),s=0;a.promise.then((function(){s=Date.now()}),(function(){}));var u=o.Db((function(r){var a=r.response;return a.timeMs+=Date.now()-s,r.Ii||!i.o||a.fromCache||"HEAD"==t.method||e!=Go||i.o(a.timeMs,a.data.byteLength,Fo(n),t,n),i.F&&i.F(e,a,n),a}),(function(e){throw e&&(e.severity=2),e}));return r=new Vo(u.promise,(function(){return u.abort()}),r),Oo(this.A,r),r},P("shaka.net.NetworkingEngine",jo),jo.prototype.request=jo.prototype.request,jo.prototype.destroy=jo.prototype.destroy,jo.makeRequest=_o,jo.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},jo.prototype.clearCommonAccessTokenMap=jo.prototype.wg,jo.prototype.clearAllResponseFilters=jo.prototype.Ph,jo.prototype.unregisterResponseFilter=jo.prototype.wj,jo.prototype.registerResponseFilter=jo.prototype.fj,jo.prototype.clearAllRequestFilters=jo.prototype.Oh,jo.prototype.unregisterRequestFilter=jo.prototype.vj,jo.prototype.registerRequestFilter=jo.prototype.ej,jo.unregisterScheme=function(e){Xo.delete(e)},jo.registerScheme=Uo,jo.prototype.configure=jo.prototype.configure,jo.NumBytesRemainingClass=Ho,h(Vo,Co),jo.PendingRequest=Vo;var Go=1;jo.RequestType={MANIFEST:0,SEGMENT:Go,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9,SESSION_DATA:10,FINGERPRINT:11},jo.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12,TRACKING_EVENT:13};var Ko=3;jo.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ko};var Xo=new Map;function Wo(e){this.g=!1,this.h=Promise.withResolvers(),this.i=e}function zo(e,t){if(e.g){if(t instanceof _e&&7003==t.code)throw t;throw new _e(2,7,7003,t)}}function qo(e){for(var t=new Map,n=p(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function Yo(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Jo(e){var t=this;this.g=[],this.data=[],(new Gr).box("moov",Kr).box("moof",Kr).N("pssh",(function(e){if(!(e.version>1)){var n=xe(e.reader.h,-12,e.size);t.data.push(n),e=e.reader.ab(16,!1),t.g.push(et(e))}})).parse(e)}function $o(e){var t=this;this.D=e,this.o=this.A=null,this.O=!1,this.J=0,this.g=null,this.B=new Y,this.i=new Map,this.U=[],this.C=new Map,this.K=!1,this.l=Promise.withResolvers(),this.h=null,this.m=function(n){2==n.severity&&t.l.reject(n),e.onError(n)},this.Z=new Map,this.ka=new Map,this.L=new ti((function(){return function(e){var t=e.Z,n=e.ka;n.clear(),t.forEach((function(e,t){return n.set(t,e)}
2)),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.m(new _e(2,6,6014)),e.D.$g(Yo(n))}(t)})),this.ea=!1,this.M=[],this.ma=!1,this.F=new ti((function(){!function(e){var t=Date.now()/1e3;e.i.forEach((function(n,i){var r=n.Jf,a=i.expiration;isNaN(a)&&(a=1/0),a!=r&&(e.D.onExpirationUpdated(i.sessionId,a),n.Jf=a),e.h.renewalIntervalSec>0&&(r=t-n.nd,n.nd>0&&r>=e.h.renewalIntervalSec&&ds(e,i))}))}(t)})),this.l.promise.catch((function(){})),this.j=new Wo((function(){return function(e){return E((function(t){switch(t.h){case 1:return e.B.release(),e.B=null,e.l.reject(),e.F.stop(),e.F=null,e.L.stop(),e.L=null,t.g(ls(e),2);case 2:if(!e.o){t.u(3);break}return t.m(4),t.g(e.o.setMediaKeys(null),6);case 6:t.o(5);break;case 4:t.l();case 5:e.o=null;case 3:e.g=null,e.A=null,e.C=new Map,e.h=null,e.m=function(){},e.D=null,e.$=!1,e.H=null,t.j()}}))}(t)})),this.$=!1,this.G=this.H=null,this.S=function(){return!1}}function Qo(t,n,i,r){r=void 0===r||r,t.C=new Map;for(var a=(i=p(i)).next();!a.done;a=i.next())t.C.set(a.value,{initData:null,initDataType:null});for(a=(i=p(t.h.persistentSessionsMetadata)).next();!a.done;a=i.next())a=a.value,t.C.set(a.sessionId,{initData:a.initData,initDataType:a.initDataType});return t.ea=t.C.size>0,function(t,n,i){var r,a,o,s,u,l,c,d,h,f,m,v,y,b,w,T,x;return E((function(S){if(1==S.h){for(function(e,t){if(0!=(e=qo(e)).size){e=at(e);for(var n=(t=p(t)).next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(t.h.clearKeys,n),r=n.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})),a=qo(t.h.servers),o=qo(t.h.advanced||{}),!r&&i&&function(e,t){var n=[];for(t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})})),t=(e=p(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,a),s=new WeakSet,u=p(n),l=u.next();!l.done;l=u.next())for(c=l.value,d=cs(c),h=p(d),f=h.next();!f.done;f=h.next())m=f.value,s.has(m)||(s.add(m),fs(m,a,o,t.h.keySystemsMapping));for(v=function(e,n){for(var i=[],r=(e=p(e)).next();!r.done;r=e.next()){var a=(r=r.value)[n]||o.has(r.keySystem)&&o.get(r.keySystem)[n]||"";if(""==a&&Re(r.keySystem)&&("audioRobustness"==n?a=[t.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==n&&(a=[t.h.defaultVideoRobustnessForWidevine])),"string"==typeof a)i.push(r);else if(Array.isArray(a)){0===a.length&&(a=[""]);for(var s=(a=p(a)).next();!s.done;s=a.next()){var u={};i.push(Object.assign({},r,(u[n]=s.value,u)))}}}return i},y=new WeakSet,b=p(n),w=b.next();!w.done;w=b.next())(T=w.value).video&&!y.has(T.video)&&(T.video.drmInfos=v(T.video.drmInfos,"videoRobustness"),T.video.drmInfos=v(T.video.drmInfos,"audioRobustness"),y.add(T.video)),T.audio&&!y.has(T.audio)&&(T.audio.drmInfos=v(T.audio.drmInfos,"videoRobustness"),T.audio.drmInfos=v(T.audio.drmInfos,"audioRobustness"),y.add(T.audio));return S.g(wi(n,t.ea,t.$,t.h.preferredKeySystems),2)}return zo(t.j),r||a.size>0?(x=function(t,n){var i,r,a,o,s,u;return E((function(l){switch(l.h){case 1:if(i=new Map,r=function(e,t,n){for(var i=p(t),r=i.next();!r.done;r=i.next())for(var a=(r=p(cs(r.value))).next();!a.done;a=r.next())a=a.value,n.getOrInsertComputed(a.keySystem,(function(){return[]})).push(a);if(1==n.size&&n.has(""))throw new _e(2,6,6e3);(i=e.h.preferredKeySystems).length||1==(r=qo(e.h.servers)).size&&(i=Array.from(r.keys()));var o=(r=p(i)).next();for(a={};!o.done;a={dh:void 0},o=r.next()){a.dh=o.value;for(var s=(o=p(t)).next();!s.done;s=o.next())if(s=s.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.dh}}(a)))return s.keySystemAccess}for(a=(r=p([!0,!1])).next();!a.done;a=r.next())for(a=a.value,s=(o=p(t)).next();!s.done;s=o.next())for(var u=(s=p(s.value.decodingInfos)).next();!u.done;u=s.next())if((u=u.value).supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!i.includes(l)){var c=n.get(l);for(!c&&e.h.keySystemsMapping[l]&&(c=n.get(e.h.keySystemsMapping[l])),c=(l=p(c)).next();!c.done;c=l.next())if(!!c.value.licenseServerUri==a)return u.keySystemAccess}}return null}(t,n,i),!r){if(!navigator.requestMediaKeySystemAccess)throw new _e(2,6,6020);throw new _e(2,6,6001)}zo(t.j),l.m(2),r.getConfiguration();var c=a=t.h.keySystemsMapping[r.keySystem]||r.keySystem,d=i.get(a),h=[],f=[],m=[],v=[],y=[],b=new Set,w=new Set;!function(t,n,i,r,a,o,s,u){for(var l=[],c=(t=p(t)).next(),d={};!c.done;d={Ea:void 0}
2,c=t.next()){if(d.Ea=c.value,n.includes(d.Ea.encryptionScheme)||n.push(d.Ea.encryptionScheme),"org.w3.clearkey"==d.Ea.keySystem&&d.Ea.licenseServerUri.startsWith("data:application/json;base64,")?l.includes(d.Ea.licenseServerUri)||l.push(d.Ea.licenseServerUri):i.includes(d.Ea.licenseServerUri)||i.push(d.Ea.licenseServerUri),a.includes(d.Ea.serverCertificateUri)||a.push(d.Ea.serverCertificateUri),d.Ea.serverCertificate&&(r.some(function(e){return function(t){return we(t,e.Ea.serverCertificate)}}(d))||r.push(d.Ea.serverCertificate)),d.Ea.initData)for(var h=(c=p(d.Ea.initData)).next(),f={};!h.done;f={zf:void 0},h=c.next())f.zf=h.value,o.some(function(e){return function(t){var n=e.zf;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&we(t.initData,n.initData)}}(f))||o.push(f.zf);if(d.Ea.keyIds)for(h=(c=p(d.Ea.keyIds)).next();!h.done;h=c.next())s.add(h.value);if(d.Ea.keySystemUris&&u)for(c=(d=p(d.Ea.keySystemUris)).next();!c.done;c=d.next())u.add(c.value)}if(1==l.length)i.push(l[0]);else if(l.length>0){for(n=[],r=(l=p(l)).next();!r.done;r=l.next())r=e.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),n.push.apply(n,g(r.keys));l=JSON.stringify({keys:n}),i.push("data:application/json;base64,"+e.btoa(l))}}(d,h,f,v,m,y,b,w);var T=t.ea?"persistent-license":"temporary";for(c={keySystem:c,encryptionScheme:h[0],licenseServerUri:f[0],distinctiveIdentifierRequired:d[0].distinctiveIdentifierRequired,persistentStateRequired:d[0].persistentStateRequired,sessionType:d[0].sessionType||T,audioRobustness:d[0].audioRobustness||"",videoRobustness:d[0].videoRobustness||"",serverCertificate:v[0],serverCertificateUri:m[0],initData:y,keyIds:b,mediaTypes:d[0].mediaTypes},w.size>0&&(c.keySystemUris=w),w=(d=p(d)).next();!w.done;w=d.next())(w=w.value).distinctiveIdentifierRequired&&(c.distinctiveIdentifierRequired=w.distinctiveIdentifierRequired),w.persistentStateRequired&&(c.persistentStateRequired=w.persistentStateRequired);if(t.g=c,!t.g.licenseServerUri)throw new _e(2,6,6012,t.g.keySystem);return l.g(r.createMediaKeys(),4);case 4:if(o=l.i,zo(t.j),t.A=o,""==t.h.minHdcpVersion||!("getStatusForPolicy"in t.A)){l.u(5);break}return l.m(6),l.g(t.A.getStatusForPolicy({minHdcpVersion:t.h.minHdcpVersion}),8);case 8:if("usable"!=l.i)throw new _e(2,6,6018);zo(t.j),l.o(5,2);break;case 6:if((s=l.l(2))instanceof _e)throw s;throw new _e(2,6,6019,s.message);case 5:return t.O=!0,t.F.Aa(t.h.updateExpirationTime),l.g(function(e){var t,n,i;return E((function(r){switch(r.h){case 1:if(!e.A||!e.g)return r.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){r.u(2);break}return t=_o([e.g.serverCertificateUri],e.h.retryParameters),r.m(3),n=e.D.wc.request(5,t,{isPreload:e.S()}),r.g(n.promise,5);case 5:i=r.i,e.g.serverCertificate=xe(i.data),r.o(4);break;case 3:throw new _e(2,6,6017,r.l());case 4:if(e.j.g)return r.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(r.m(6),r.g(e.A.setServerCertificate(e.g.serverCertificate),8)):r.return();case 8:r.o(0);break;case 6:throw new _e(2,6,6004,r.l().message)}}))}(t),9);case 9:zo(t.j),l.o(0);break;case 2:if(u=l.l(),zo(t.j,u),t.g=null,u instanceof _e)throw u;throw new _e(2,6,6002,u.message)}}))}(t,n),S.return(r?x:x.catch((function(){})))):(t.O=!0,S.return(Promise.resolve()))}))}(t,n,r)}function Zo(e){var t;return E((function(n){switch(n.h){case 1:if(e.o.mediaKeys)return n.return();if(!e.H){n.u(2);break}return n.g(e.H,3);case 3:return zo(e.j),n.return();case 2:return n.m(4),e.H=e.o.setMediaKeys(e.A),n.g(e.H,6);case 6:n.o(5);break;case 4:t=n.l(),e.m(new _e(2,6,6003,t.message));case 5:zo(e.j),n.j()}}))}
2function es(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(n){return t=n,n instanceof _e||(t=new _e(2,6,6016,n)),void e.m(t)}if(e.h.ignoreDuplicateInitData){for(var i=e.i.values(),r=(i=p(i)).next();!r.done;r=i.next())if(we(n,r.value.initData))return;var a=!1;if(e.C.forEach((function(e){!a&&we(n,e.initData)&&(a=!0)})),a)return}e.K=!0,e.i.size>0&&hs(e)&&(e.l.resolve(),e.K=!1,e.l=Promise.withResolvers(),e.l.promise.catch((function(){}))),is(e,t,n,e.g.sessionType)}}function ts(e){hs(e)&&e.l.resolve()}function ns(e,t){new ti((function(){t.loaded=!0,ts(e)})).ba(gs)}function is(e,t,n,i,r){r=void 0!==r&&r;try{var a=e.A.createSession(i)}catch(t){return e.m(new _e(2,6,6005,t.message)),null}return e.B.I(a,"message",(function(t){rs(e)?e.M.push(t):as(e,t)})),e.B.I(a,"keystatuseschange",(function(t){return os(e,t)})),e.i.set(a,{initData:n,initDataType:t,loaded:!1,Jf:1/0,rb:null,type:i,nd:0,Mg:r}),a.closed.then((function(t){if(!e.j.g){var n=e.i.get(a);if(n){var i=a;"unknown"!==(t=t||"unknown")&&(e.i.delete(i),us(e,t,n))}}})).catch((function(){})),e.h.logLicenseExchange&&$e(n),a.generateRequest(t,n).catch((function(t){if(!e.j.g){e.i.delete(a);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;i<0&&(i+=4294967296),i="0x"+i.toString(16)}e.m(new _e(2,6,6006,t.message,t,i))}})),a}function rs(e){return e.o?e.h.delayLicenseRequestUntilPlayed&&e.o.paused&&!e.ma:e.h.delayLicenseRequestUntilPlayed}function as(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y;E((function(b){switch(b.h){case 1:if(n=t.target,e.h.logLicenseExchange&&$e(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=_o([r],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,i&&(o.initData=i.initData,o.initDataType=i.initDataType,i.Mg&&(o.licenseRequestType="license-renewal")),a&&a.headers)for(s in a.headers)o.headers[s]=a.headers[s];if(Me(e.g.keySystem)){var w=o,T=e.g;try{var x=Ke(w.body);if(x){var S=JSON.parse(x);S.type||(S.type=T.sessionType,w.body=Xe(JSON.stringify(S)))}}catch(e){}}if(De(e.g.keySystem))if((w=Ge(o.body,!0,!0)).includes("PlayReadyKeyMessage")){for(x=(T=p(T=Wt(w=Vt(w,"PlayReadyKeyMessage"),"HttpHeader"))).next();!x.done;x=T.next())x=Wt(S=x.value,"name")[0],S=Wt(S,"value")[0],o.headers[Xt(x)]=Xt(S);w=Wt(w,"Challenge")[0],o.body=Qe(Xt(w))}else o.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),b.m(2),c=e.D.wc.request(2,o,{isPreload:e.S()}),e.U.push(c),b.g(c.promise,4);case 4:l=b.i,K(e.U,c),b.o(3);break;case 2:if(d=b.l(),e.j.g)return b.return();if(h={sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType},f=new _e(2,6,6007,d,h),e.h.failureCallback)try{e.h.failureCallback(f)}catch(e){}return f.handled?(i&&i.rb&&i.rb.reject(f),b.return()):(1==e.i.size?(e.m(f),i&&i.rb&&i.rb.reject(f)):(i&&i.rb&&i.rb.reject(f),e.i.delete(n),hs(e)&&(e.l.resolve(),e.L.ba(.1))),b.return());case 3:return e.j.g?b.return():(e.J+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&$e(l.data),b.m(5),b.g(n.update(l.data),7));case 7:i&&(i.nd=Date.now()/1e3),b.o(6);break;case 5:return m=(g=b.l())&&g.message||String(g),v=new _e(2,6,6008,m),e.m(v),i&&i.rb&&i.rb.reject(v),b.return();case 6:if(e.j.g)return b.return();y=new Lo("drmsessionupdate"),e.D.onEvent(y),i&&(i.rb&&i.rb.resolve(),ns(e,i)),b.j()}}))}function os(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach((function(t,r){if("string"==typeof r){var a=r;r=t,t=a}if(a=Z(),De(e.g.keySystem)&&16==r.byteLength&&a.ye()){var o=(a=Ae(r)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}n&&"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(i=!0),r=et(r).slice(0,32),e.Z.set(r,t)}));var r=t.expiration-Date.now();(r<0||i&&r<1e3)&&n&&!n.rb&&(e.i.delete(t),ss(e,t)),hs(e)&&(e.l.resolve(),e.L.ba(ms))}function ss(e,t){var n,i;return E((function(r){switch(r.h){case 1:return n=null,r.m(2),r.g(ai(ps,Promise.all([t.close().catch((function(){})),t.closed])),4);case 4:i=r.i,n=i[1],r.o(3);break;case 2:r.l();case 3:n&&"unknown"!==n&&us(e,n),r.j()}}))}
2function us(e,t,n){if("internal-error"===t)e.m(new _e(2,6,6005,"CDM reported internal error"));else if("closed-by-application"!==t&&"release-acknowledged"!==t&&"resource-evicted"!==t&&"hardware-context-reset"===t&&n)if(n.initDataType&&n.initData)try{is(e,n.initDataType,n.initData,n.type)}catch(t){e.m(new _e(2,6,6005,"Failed to recreate session after hardware context reset: "+t.message))}else e.m(new _e(2,6,6005,"Cannot recreate session after hardware reset: missing metadata"))}function ls(e){var t;return E((function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map((function(t){var n=(t=p(t)).next().value,i=t.next().value;return E((function(t){return 1==t.h?(t.m(2),e.C.has(n.sessionId)||"persistent-license"!==i.type||e.h.persistentSessionOnlinePlayback?t.g(ss(e,n),5):t.g(n.remove(),5)):2!=t.h?t.o(0):(t.l(),void t.j())}))}))),0)}))}function cs(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function ds(e,t){var n,i,r,a,o,s,u,l;E((function(c){switch(c.h){case 1:return(n=e.i.get(t))&&(n.nd=Date.now()/1e3),e.g?(i=e.g.keySystem,r=t,a={sessionId:t.sessionId,sessionType:e.g.sessionType,initData:n?n.initData:null,initDataType:n?n.initDataType:null},c.m(2),Le(i)?(o=Xe("renew"),c.g(t.update(o),5)):De(i)&&n&&n.initData&&n.initDataType?c.g(function(e,t,n){var i;return E((function(r){if(1==r.h)return e.i.delete(t),r.g(ss(e,t),2);if(!(i=is(e,n.initDataType,n.initData,e.g.sessionType,!0)))throw new _e(2,6,6005,"Failed to create new session for renewal");return r.return(i)}))}(e,t,n),7):(F("Manual license renewal is not supported for "+i),c.return())):c.return();case 7:r=c.i,c.u(5);break;case 5:c.o(3);break;case 2:return c.l(),c.return();case 3:s=e.i.get(r),u={sessionId:r.sessionId,sessionType:e.g.sessionType,initData:s?s.initData:null,initDataType:s?s.initDataType:null},l=new Lo("licenserenewal",(new Map).set("oldSessionMetadata",a).set("newSessionMetadata",u)),e.D.onEvent(l),c.j()}}))}function hs(e){return function(e,t){for(var n=(e=p(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),(function(e){return e.loaded}))}function fs(t,n,i,r){var a=t.keySystem;!a||"org.w3.clearkey"==a&&t.licenseServerUri||(n.size&&n.get(a)&&(n=n.get(a),t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=i.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=i.persistentStateRequired),t.serverCertificate||(t.serverCertificate=i.serverCertificate),i.sessionType&&(t.sessionType=i.sessionType),t.serverCertificateUri||(t.serverCertificateUri=i.serverCertificateUri)),r[a]&&(t.keySystem=r[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}Wo.prototype.destroy=function(){var e=this;return this.g?this.h.promise:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},(i=$o.prototype).destroy=function(){return this.j.destroy()},i.configure=function(e,t){this.h=e,t&&(this.S=t),this.F&&this.O&&this.g&&this.F.Aa(this.h.updateExpirationTime)},i.Rb=function(e){var t,n,i,r,a=this;return E((function(o){if(1==o.h)return a.o===e?o.return():a.A?(t=Z(),a.o=e,a.h.delayLicenseRequestUntilPlayed&&a.B.Ja(a.o,"play",(function(){for(var e=p(a.M),t=e.next();!t.done;t=e.next())as(a,t.value);a.ma=!0,a.M=[]})),(n=oo(t,a.o))?a.B.Jb(n,["connect","connecting","disconnect"],(function(){ls(a)})):"webkitCurrentPlaybackTargetIsWireless"in a.o&&a.B.I(a.o,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return ls(a)})),a.G=a.g&&a.g.initData.find((function(e){return e.initData.length>0}))||null,i=a.g.keySystem,(r=t.Hf(i))||!a.G&&"com.apple.fps"===a.g.keySystem&&!a.C.size?o.u(2):o.g(Zo(a),2)):(a.B.Ja(e,"encrypted",(function(){a.m(new _e(2,6,6010))})),o.return());(function(e){var t,n,i,r;
2return E((function(a){if(1==a.h)return e.C.size?(e.C.forEach((function(t,n){!function(e,t,n){var i,r,a,o,s,u,l;E((function(c){switch(c.h){case 1:try{i=e.A.createSession("persistent-license")}catch(t){return r=new _e(2,6,6005,t.message),e.m(r),c.return(Promise.reject(r))}return e.B.I(i,"message",(function(t){rs(e)?e.M.push(t):as(e,t)})),e.B.I(i,"keystatuseschange",(function(t){return os(e,t)})),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Jf:1/0,rb:null,type:"persistent-license",nd:0,Mg:!1},e.i.set(i,a),c.m(2),c.g(i.load(t),4);case 4:return o=c.i,zo(e.j),o||(e.i.delete(i),s=e.h.persistentSessionOnlinePlayback?1:2,e.m(new _e(s,6,6013)),a.loaded=!0),ns(e,a),ts(e),c.return(i);case 2:u=c.l(),zo(e.j,u),e.i.delete(i),l=e.h.persistentSessionOnlinePlayback?1:2,e.m(new _e(l,6,6005,u.message)),a.loaded=!0,ts(e);case 3:return c.return(Promise.resolve())}}))}(e,n,t)})),a.g(e.l.promise,3)):a.u(2);if(2!=a.h){if((e.g&&e.g.keyIds||new Set([])).size>0&&function(e){for(var t=p(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.Z.get(n.value))return!1;return!0}(e))return a.return(e.l.promise);e.K=!1,e.l=Promise.withResolvers(),e.l.promise.catch((function(){}))}for(t=(e.g?e.g.initData:[])||[],n=p(t),i=n.next();!i.done;i=n.next())r=i.value,es(e,r.initDataType,r.initData);return hs(e)&&e.l.resolve(),a.return(e.l.promise)}))})(a).catch((function(){})),!r&&(a.G||a.C.size||a.h.parseInbandPsshEnabled)||a.B.I(a.o,"encrypted",(function(e){return function(e,t){return E((function(n){if(1==n.h)return n.g(Zo(e),2);es(e,t.initDataType,xe(t.initData)),n.j()}))}(a,e)})),o.j()}))},i.tf=function(){var e=this,t=this.i.keys();return t=function(e,t){for(var n=[],i=(e=p(e)).next();!i.done;i=e.next())n.push(t(i.value));return n}(t,(function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}})),Array.from(t)},i.Rf=function(e){var t=this;this.i.forEach((function(n,i){null!=e&&i.sessionId!=e||ds(t,i)}))},i.Uf=function(e,t){t=void 0===t?.1:t;var n,i,r,a,o=this;return E((function(s){switch(s.h){case 1:if(zo(o.j),i=n=null,o.i.forEach((function(t,r){r.sessionId===e.sessionId&&(n=r,i=t)})),!(n&&i&&o.g&&i.initData&&i.initDataType))return s.return(!1);if(r=i.initData,a=i.initDataType,!(t>0)){s.u(2);break}return s.g(function(e){return new Promise((function(t){new ti(t).ba(e)}))}(t),2);case 2:return s.m(4),o.i.delete(n),s.g(ss(o,n),6);case 6:if(!is(o,a,r,o.g.sessionType,!1))throw new _e(2,6,6005,"Failed to create new session for license retry");return s.return(!0);case 4:return s.l(),s.return(!1)}}))},i.uf=function(){for(var e=1/0,t=this.i.keys(),n=(t=p(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},i.ce=function(){return Yo(this.ka)};var ps=1,gs=5,ms=.5;function vs(){}function ys(e){return new re(e=Ke(e)).ob}function bs(e,t,n){function i(e){Ae(a).setUint32(o,e.byteLength,!0),o+=4,a.set(xe(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new _e(2,6,6015);var r;r="string"==typeof t?We(t,!0):t,e=We(e=Ke(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function ws(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,bs(e,n=Ke(e).split("skd://").pop(),t))}function Ts(e,t){2!==e||t.attempt>0||(e=t.drmInfo)&&Le(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function xs(e){try{var t=function(e){return(e=function(e){var t=0,n=Ae(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,1&r||r+e>n.byteLength){n=[];break e}var a=xe(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e).find((function(e){return e.type===Ss})))&&(e=Vt(e=Ge(e.value,!0),"WRMHEADER"))?e:null}(e);if(t)e:{for(var n=p(Wt(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var a=p(r.children),o=a.next();!o.done;o=a.next()){var s=o.value;if("LA_URL"==s.tagName){var u=Xt(s);break e}}}u=""}else u="";return u}catch(e){return""}}P("shaka.drm.FairPlay",vs),vs.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&Le(e.keySystem)){try{var n=Ve(t.data)}catch(e){return}if(e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch(e){}e&&(t.data=Te(Qe(n)))}},vs.gumletFairPlayRequest=function(e,t){2!==e||t.attempt>0||(e=t.drmInfo)&&Le(e.keySystem)&&t.body&&(e=$e(e=xe(t.body)),t.body=Xe(JSON.stringify({Pj:e})),t.headers["Content-Type"]="application/json")},vs.muxFairPlayRequest=function(e,t){Ts(e,t)},vs.expressplayFairPlayRequest=function(e,t){Ts(e,t)},vs.conaxFairPlayRequest=function(e,t){Ts(e,t)},vs.ezdrmFairPlayRequest=function(e,t){Ts(e,t)},vs.verimatrixFairPlayRequest=function(e,t){2!==e||t.attempt>0||(e=t.drmInfo)&&Le(e.keySystem)&&(e=$e(e=xe(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Xe("spc="+e))},vs.muxInitDataTransform=function(e,t,n){return ws(e,t,n)},vs.expressplayInitDataTransform=function(e,t,n){return ws(e,t,n)},vs.conaxInitDataTransform=function(t,n,i){if("skd"!==n)return t;n=i.serverCertificate,i=Ke(t).split("skd://").pop().split("?").shift(),i=e.atob(i);var r=new ArrayBuffer(2*i.length);r=Se(r);for(var a=0,o=i.length;a<o;a++)r[a]=i.charCodeAt(a);return bs(t,r,n)},vs.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,bs(e,n=Ke(e).split(";").pop(),t))},vs.verimatrixInitDataTransform=function(e,t,n){return ws(e,t,n)},vs.initDataTransform=bs,vs.defaultGetContentId=ys,vs.isFairPlaySupported=function(){var e;return E((function(t){return 1==t.h?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.h?t.return(!0):(t.l(),t.return(!1))}))};var Ss=1;
2function As(e,t,n){this.type=e,this.X=t,this.segments=n||null}function Es(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function ks(e,t){return t?e.toString():(t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Cs(e,t){return e.attributes.find((function(e){return e.name===t}))||null}function Is(e,t,n){return(e=Cs(e,t))?e.value:n||null}function Ms(e,t){if(!(e=Cs(e,t)))throw new _e(2,4,4023,t);return e.value}function Rs(e,t,n){n=void 0===n?[]:n,this.X=t,this.h=e,this.g=n}function Ds(e,t){this.name=e,this.value=t}function Ls(e,t){return e.filter((function(e){return e.name==t}))}function Ns(e,t){return e.filter((function(e){return Ms(e,"TYPE")==t}))}function Ps(e,t){for(var n=(e=p(e)).next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function Os(e,t,n){return n=void 0===n?0:n,(e=Ps(e,t))?Number(e.value):n}function js(e,t,n){return t?Us(e,[t],n):[]}function Us(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map((function(e){return _s(e,n)}))),it(e,i)}function _s(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n)for(var i=(n=p(n)).next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),a=t.get(r);if(!a)throw new _e(2,4,4039,r);e=e.replace(i,a)}return e}function Bs(e){var t=(e=e.value).indexOf(",");return Number(-1===t?e:e.substring(0,t))}function Fs(e){return(e=Is(e,"SUPPLEMENTAL-CODECS"))?e.split(/\s*,\s*/).map((function(e){return e.split("/")[0]})).join(","):""}function Hs(){this.g=0}function Vs(e,t){var n=Ve(t).trim().split(/[\r\n]+/);if(!n[0].startsWith("#EXTM3U"))throw new _e(2,4,4015);t=0;for(var i=!1,r=[],a=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(s.startsWith("#")&&!s.startsWith("#EXT")||a)a=!1;else{if(s=Gs(e,s),i||(Ks.has(s.name)?(t=1,i=!0):"EXT-X-STREAM-INF"==s.name||"EXT-X-MEDIA"==s.name?i=!0:Xs.has(s.name)&&(t=1,i=!0)),Xs.has(s.name)){if(1!=t)throw new _e(2,4,4017);a=e,e=Array(Math.max(100,Math.floor((n.length-o)/2))),i=0,s=[];var l=[];for(u=null;o<n.length;o++){var c=n[o];c.startsWith("#EXT")?(c=Gs(a,c),Ks.has(c.name)?r.push(c):"EXT-X-MAP"==c.name?u=c:"EXT-X-PART"==c.name?l.push(c):"EXT-X-PRELOAD-HINT"==c.name?"PART"==Is(c,"TYPE")?l.push(c):"MAP"==Is(c,"TYPE")&&(c.name="EXT-X-MAP",u=c):s.push(c)):c.startsWith("#")&&!c.startsWith("#EXT")||(c=c.trim(),u&&s.push(u),s=new Rs(c,s,l),i<e.length?e[i++]=s:(e.push(s),i++),s=[],l=[])}return l.length&&(u&&s.push(u),n=new Rs("",s,l),i<e.length?e[i++]=n:(e.push(n),i++)),new As(t,r,i<e.length?e.slice(0,i):e)}r.push(s),"EXT-X-STREAM-INF"==s.name&&(s.attributes.push(new Ds("URI",u)),a=!0)}}return new As(t,r)}function Gs(e,t){e=e.g++;var n=t.indexOf(":"),i=-1===n?t.substring(1):t.substring(1,n);if(!i.startsWith("EXT"))throw new _e(2,4,4016,t);if(null===(t=-1===n?null:t.substring(n+1)))e=new Es(e,i,[]);else if(-1===t.indexOf("="))e=new Es(e,i,[],t);else{n=[];var r=null,a=0,o=t.indexOf(","),s=t.indexOf("=");for(-1!==o&&o<s&&(r=t.substring(0,o),a=o+1);a<t.length;){for(;" "===t[a];)a++;if(-1===(s=t.indexOf("=",a)))break;if(o=t.substring(a,s),'"'===t[a=s+1]){a++;var u=t.indexOf('"',a);s=-1===u?t.substring(a):t.substring(a,u),a=-1===u?t.length:u+1}else s=-1===(u=t.indexOf(",",a))?t.substring(a):t.substring(a,u),a=-1===u?t.length:u;a<t.length&&","===t[a]&&a++,n.push(new Ds(o,s))}e=new Es(e,i,n,r)}return e}Es.prototype.toString=function(e){var t="#"+this.name,n=this.attributes?this.attributes.filter((function(t){return!e||!e.has(t.name)})).map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&n.unshift(this.value),n.length>0&&(t+=":"+n.join(",")),t};var Ks=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),Xs=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function Ws(e,t,n,i,r,a,o,s){this.P=e,this.startByte=t,this.endByte=n,this.Rc=void 0===i?null:i,this.timescale=void 0===r?null:r,this.h=void 0===a?null:a,this.aesKey=void 0===o?null:o,this.g=this.mimeType=this.codecs=null,this.encrypted=void 0!==s&&s}function zs(e,t){return e===t||(e&&t?e.fc()==t.fc()&&e.dc()==t.dc()&&z(e.P().sort(),t.P().sort())&&we(e.qc(),t.qc()):e==t)}function qs(e,t,n,i,r,a,o,s,u,l,c,d,h,f,g,m){for(l=void 0===l?[]:l,f=void 0===f?Js:f,this.startTime=e,this.l=this.endTime=t,this.G=n,this.startByte=i,this.endByte=r,this.aa=a,this.m=o,this.F=s,this.D=u,this.g=l,this.tilesLayout=void 0===c?"":c,this.C=void 0===d?null:d,this.h=void 0===h?null:h,this.status=f,this.preload=!1,this.j=!0,this.A=!1,this.aesKey=void 0===g?null:g,this.thumbnailSprite=null,this.i=-1,this.o=void 0!==m&&m,this.md=this.xc=!1,t=(e=p(this.g)).next();!t.done;t=e.next())t.value.Ug();this.o&&this.g.length&&this.g[this.g.length-1].Sg(),this.B=this.bandwidth=this.mimeType=this.codecs=null,this.J=!1,this.H=null}function Ys(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.g.length>0&&e.o)for(e=(e=p(e.g)).next();!e.done;e=e.next()){Ys(e.value);break}return null}Ws.prototype.fc=function(){return this.startByte},Ws.prototype.dc=function(){return this.endByte},Ws.prototype.vd=function(e){this.h=e},Ws.prototype.qc=function(){return this.h},P("shaka.media.InitSegmentReference",Ws),Ws.prototype.getEndByte=Ws.prototype.dc,Ws.prototype.getStartByte=Ws.prototype.fc,(i=qs.prototype).P=function(){return this.G()},i.getStartTime=function(){return this.startTime},i.gi=function(){return this.endTime},i.fc=function(){return this.startByte},i.dc=function(){return this.endByte},i.Fi=function(){return this.tilesLayout},i.Ei=function(){return this.C},i.Ib=function(){return this.status},i.Ti=function(){this.status=$s},i.Ff=function(){this.preload=!0},i.isPreload=function(){return this.preload},i.Tg=function(){this.j=!1},i.Mi=function(){return this.j},i.Ug=function(){this.xc=!0},i.Oi=function(){return this.xc}
2,i.Sg=function(){this.md=!0},i.Ni=function(){return this.md},i.Rg=function(){this.A=!0},i.Ji=function(){return this.A},i.qh=function(e){this.thumbnailSprite=e},i.Ci=function(){return this.thumbnailSprite},i.offset=function(e){this.startTime+=e,this.endTime+=e,this.l+=e;for(var t=p(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.l+=e},i.dg=function(e){null==this.h?B("Sync attempted without sync time!"):(e=this.h-e-this.startTime,Math.abs(e)>=.001&&this.offset(e))},i.vd=function(e,t){this.B=e,this.J=void 0!==t&&t},i.qc=function(e){var t=this.B;return(void 0===e||e)&&this.J&&(this.B=null),t},i.Xf=function(e){this.H=e},i.getMetadata=function(){return this.H},P("shaka.media.SegmentReference",qs),qs.prototype.getMetadata=qs.prototype.getMetadata,qs.prototype.setMetadata=qs.prototype.Xf,qs.prototype.getSegmentData=qs.prototype.qc,qs.prototype.setSegmentData=qs.prototype.vd,qs.prototype.syncAgainst=qs.prototype.dg,qs.prototype.offset=qs.prototype.offset,qs.prototype.getThumbnailSprite=qs.prototype.Ci,qs.prototype.setThumbnailSprite=qs.prototype.qh,qs.prototype.hasByterangeOptimization=qs.prototype.Ji,qs.prototype.markAsByterangeOptimization=qs.prototype.Rg,qs.prototype.isLastPartial=qs.prototype.Ni,qs.prototype.markAsLastPartial=qs.prototype.Sg,qs.prototype.isPartial=qs.prototype.Oi,qs.prototype.markAsPartial=qs.prototype.Ug,qs.prototype.isIndependent=qs.prototype.Mi,qs.prototype.markAsNonIndependent=qs.prototype.Tg,qs.prototype.isPreload=qs.prototype.isPreload,qs.prototype.markAsPreload=qs.prototype.Ff,qs.prototype.markAsUnavailable=qs.prototype.Ti,qs.prototype.getStatus=qs.prototype.Ib,qs.prototype.getTileDuration=qs.prototype.Ei,qs.prototype.getTilesLayout=qs.prototype.Fi,qs.prototype.getEndByte=qs.prototype.dc,qs.prototype.getStartByte=qs.prototype.fc,qs.prototype.getEndTime=qs.prototype.gi,qs.prototype.getStartTime=qs.prototype.getStartTime,qs.prototype.getUris=qs.prototype.P;var Js=0,$s=1;function Qs(e,t,n,i){this.h=e,this.D=t,this.o=this.m=1/0,this.i=void 0===i?1:i,this.g=this.l=null,this.C=0,this.B=!0,this.J=!1,this.H=0,this.F=void 0===n||n,this.G=0,this.A=!1,this.j=e}function Zs(e){var t=this;this.j=e,this.h=new Y,this.g=new Set,this.i=new ti((function(){eu(t,!1)})).Qa(),e.paused||this.i.Aa(.25),this.h.I(e,"playing",(function(){t.i.Qa().Aa(.25)})),this.h.I(e,"pause",(function(){t.i.stop()})),this.h.I(e,"seeked",(function(){t.i.Qa(),e.paused||t.i.Aa(.25)}))}function eu(e,t){for(var n=e.j.currentTime,i=(e=p(e.g)).next();!i.done;i=e.next())i.value.j(n,t)}function tu(e){No.call(this),this.g=new Map,this.h=e}function nu(e,t,n){return!!((e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function iu(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return"video"==e.type&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),"audio"==e.type&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function ru(e){this.g=e,this.j=null,this.h=0,this.l=!1}function au(e){return e.g[0]||null}function ou(e,t,n){return new ru([e=new qs(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function su(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function uu(){ru.call(this,[]),this.i=[]}function lu(t){return du.getOrInsertComputed(t,(function(){var n,i;return null!=(i=null==(n=e.ManagedMediaSource||e.MediaSource)?void 0:n.isTypeSupported(t))&&i}))}function cu(){var t=e.ManagedMediaSource||e.MediaSource;return!!(t&&t.prototype&&t.prototype.setLiveSeekableRange&&t.prototype.clearLiveSeekableRange)}qs.Status={Bj:Js,Jj:$s,Gj:2},(i=Qs.prototype).getDuration=function(){return this.m},i.ni=function(){return this.i},i.nh=function(e){this.h=e},i.kc=function(e){this.m=e},i.wi=function(){return this.h},i.oj=function(e){this.C=e},i.Be=function(e){e&&!this.B&&(this.J=!0),this.B=e},i.ph=function(e){this.o=e},i.ee=function(){return this.o},i.kh=function(e){this.D=e},i.ei=function(){return this.D},i.Yi=function(e,t){if(0!=e.length){var n=(Date.now()+this.C)/1e3;if(0!=(e=e.filter((function(e){return e.start+t<n}
2))).length){var i=e[e.length-1].end+t;this.ue(e[0].start+t),this.i=e.reduce((function(e,t){return Math.max(e,t.end-t.start)}),this.i),this.g=Math.max(this.g,i),null!=this.h&&this.F&&!this.A&&(this.h=n-this.g-this.i)}}},i.Zg=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.C)/1e3,r=(e=p(e)).next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.i=Math.max(this.i,r.endTime-r.startTime));this.ue(t),this.g=Math.max(this.g,n),null!=this.h&&this.F&&!this.A&&(this.h=i-this.g-this.i)}},i.Xi=function(e,t){this.ue(e),t==1/0||this.isLive()||(this.g=Math.max(this.g,t))},i.oi=function(){return this.g},i.Pg=function(){this.A=!0},i.Pi=function(){return this.A},i.mh=function(e){this.j=e},i.li=function(){return this.j},i.ue=function(e){null==this.l?this.l=e:this.J||(this.l=Math.min(this.l,e))},i.Wi=function(e){this.i=Math.max(this.i,e)},i.offset=function(e){null!=this.l&&(this.l+=e),null!=this.g&&(this.g+=e)},i.isLive=function(){return this.m==1/0&&!this.B},i.Qc=function(){return this.m!=1/0&&!this.B},i.na=function(){return!this.B},i.hd=function(){var e=this.gd()-this.o;return Math.max(this.H,e)},i.rh=function(e){this.H=e},i.gd=function(){return this.na()?Math.min(Math.max(0,(Date.now()+this.C)/1e3-this.i-this.h)+this.G,this.m):this.g?Math.min(this.g,this.m):this.m},i.fd=function(e){var t=Math.max(this.l,this.H);if(this.o==1/0)return Math.ceil(1e3*t)/1e3;var n=this.gd()-this.o;return e=Math.min(n+e,this.qb()),Math.max(t,e)},i.Tb=function(){return this.fd(0)},i.qb=function(){var e=this.na()?this.D:0;return Math.max(0,this.gd()-e)},i.yj=function(){return!(null==this.h||null!=this.g&&this.F)},i.nj=function(e){this.G=e},i.ai=function(){return this.G},P("shaka.media.PresentationTimeline",Qs),Qs.prototype.getAvailabilityTimeOffset=Qs.prototype.ai,Qs.prototype.setAvailabilityTimeOffset=Qs.prototype.nj,Qs.prototype.usingPresentationStartTime=Qs.prototype.yj,Qs.prototype.getSeekRangeEnd=Qs.prototype.qb,Qs.prototype.getSeekRangeStart=Qs.prototype.Tb,Qs.prototype.getSafeSeekRangeStart=Qs.prototype.fd,Qs.prototype.getSegmentAvailabilityEnd=Qs.prototype.gd,Qs.prototype.setUserSeekStart=Qs.prototype.rh,Qs.prototype.getSegmentAvailabilityStart=Qs.prototype.hd,Qs.prototype.isDynamic=Qs.prototype.na,Qs.prototype.isInProgress=Qs.prototype.Qc,Qs.prototype.isLive=Qs.prototype.isLive,Qs.prototype.offset=Qs.prototype.offset,Qs.prototype.notifyMaxSegmentDuration=Qs.prototype.Wi,Qs.prototype.notifyMinSegmentStartTime=Qs.prototype.ue,Qs.prototype.getInitialProgramDateTime=Qs.prototype.li,Qs.prototype.setInitialProgramDateTime=Qs.prototype.mh,Qs.prototype.isStartTimeLocked=Qs.prototype.Pi,Qs.prototype.lockStartTime=Qs.prototype.Pg,Qs.prototype.getMaxSegmentEndTime=Qs.prototype.oi,Qs.prototype.notifyPeriodDuration=Qs.prototype.Xi,Qs.prototype.notifySegments=Qs.prototype.Zg,Qs.prototype.notifyTimeRange=Qs.prototype.Yi,Qs.prototype.getDelay=Qs.prototype.ei,Qs.prototype.setDelay=Qs.prototype.kh,Qs.prototype.getSegmentAvailabilityDuration=Qs.prototype.ee,Qs.prototype.setSegmentAvailabilityDuration=Qs.prototype.ph,Qs.prototype.setStatic=Qs.prototype.Be,Qs.prototype.setClockOffset=Qs.prototype.oj,Qs.prototype.getPresentationStartTime=Qs.prototype.wi,Qs.prototype.setDuration=Qs.prototype.kc,Qs.prototype.setPresentationStartTime=Qs.prototype.nh,Qs.prototype.getMaxSegmentDuration=Qs.prototype.ni,Qs.prototype.getDuration=Qs.prototype.getDuration,Zs.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=p(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},h(tu,No),tu.prototype.release=function(){this.g.clear(),No.prototype.release.call(this)},tu.prototype.j=function(e){for(var t=p(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).Xe;e:{for(var r=n.rd,a=r.length-1;a>=0;a--){var o=r[a];if(o.position<=e){r=o.Rc;break e}}r=null}a=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),o=r&&i&&r.label&&i.label&&i.label!==r.label;var s=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!z(i.roles,r.roles),(o||s||i)&&nu(this,e,r.contentType)&&(n.Xe=r,i=new Lo("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),a&&nu(this,e,r.contentType)&&(n.Xe=r,JSON.stringify(r),n=new Lo("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},(i=ru.prototype).getNumReferences=function(){return this.g.length},i.getNumEvicted=function(){return this.h},i.release=function(){this.l||(this.g=[],this.j&&this.j.stop(),this.j=null)},i.Ui=function(){this.l=!0},i.Sb=function(e){for(var t=p(this.g),n=t.next();!n.done;n=t.next())e(n.value)},i.find=function(e){for(var t=this.g.length-1,n=t;n>=0;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.h}return this.g.length&&e<this.g[0].startTime?this.h:null},i.get=function(e){return 0==this.g.length||(e-=this.h)<0||e>=this.g.length?null:this.g[e]},i.offset=function(e){if(!this.l)for(var t=p(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},i.Gf=function(e){if(!this.l&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3,n=W(this.g,(function(e){return Math.round(1e3*e.startTime)/1e3<t}));n<this.g.length&&(this.g=this.g.slice(0,n)),this.g.push.apply(this.g,g(e))}},i.od=function(e,t){for(var n=this.g.length>0?this.g[0].startTime:-1/0,i=0;i<e.length;){var r=e[i];if(r.endTime>t&&r.endTime>n)break;i++}i>0&&(e=e.slice(i)),this.Gf(e),this.xb(t)},i.xb=function(e){if(!this.l){var t=W(this.g,(function(t){return t.endTime<=e}));t>0&&(this.h+=t,this.g=this.g.slice(t))}},i.Zd=function(e,t,n){if(n=void 0!==n&&n,!this.l){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();var i=W(this.g,(function(t){return t.endTime<=e}));i>0&&(n||(this.h+=i),this.g=this.g.slice(i)),0!=this.g.length&&((t=new qs((n=this.g[this.g.length-1]).startTime,t,n.G,n.startByte,n.endByte,n.aa,n.m,n.F,n.D,n.g,n.tilesLayout,n.C,n.h,n.status,n.aesKey)).mimeType=n.mimeType,t.codecs=n.co
2decs,t.i=n.i,this.g[this.g.length-1]=t)}},i.hg=function(e,t){var n=this;this.l||(this.j&&this.j.stop(),this.j=new ti((function(){var e=t();e?n.g.push.apply(n.g,g(e)):(n.j.stop(),n.j=null)})),this.j.Aa(e))},ru.prototype[Symbol.iterator]=function(){return this.Gb(0)},ru.prototype.Gb=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var i=this.find(e);if(null==i)return null;var r=this.get(i);n?i++:i--;var a=-1;if(r&&r.g.length>0)for(var o=r.g.length-1;o>=0;--o){var s=r.g[o];if(e>=s.startTime&&e<s.endTime){if(!t){for(;o&&!s.j;)o--,s=r.g[o];if(!s.j)return B("No independent partial segment found!"),null}n?i--:i++,a=o-1;break}}return new su(this,i,a,n)},P("shaka.media.SegmentIndex",ru),ru.forSingleSegment=ou,ru.prototype.getIteratorForTime=ru.prototype.Gb,ru.prototype.updateEvery=ru.prototype.hg,ru.prototype.fit=ru.prototype.Zd,ru.prototype.evict=ru.prototype.xb,ru.prototype.mergeAndEvict=ru.prototype.od,ru.prototype.offset=ru.prototype.offset,ru.prototype.get=ru.prototype.get,ru.prototype.find=ru.prototype.find,ru.prototype.markImmutable=ru.prototype.Ui,ru.prototype.release=ru.prototype.release,ru.prototype.getNumEvicted=ru.prototype.getNumEvicted,ru.prototype.getNumReferences=ru.prototype.getNumReferences,(i=su.prototype).Yc=function(e){this.reverse=e},i.Sh=function(){return this.h},i.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.o&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.g.length>0?e.g[this.g]:e},i.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.g.length>0?e.g.length-1:0)):(this.h--,this.g=0):e&&e.g.length>0?(this.g++,e.o&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},i.Tf=function(){var e=this.current();if(e&&e.xc&&!e.j&&(e=this.i.get(this.h))&&e.g.length>0)for(var t=e.g[this.g];t.j&&!(this.g<=0);)this.g--,t=e.g[this.g]},P("shaka.media.SegmentIterator",su),su.prototype.resetToLastIndependent=su.prototype.Tf,su.prototype.next=su.prototype.next,su.prototype.current=su.prototype.current,su.prototype.currentPosition=su.prototype.Sh,su.prototype.setReverse=su.prototype.Yc,h(uu,ru),(i=uu.prototype).clone=function(){var e=new uu;return e.i=this.i.slice(),e.h=this.h,e},i.release=function(){this.i=[]},i.Sb=function(e){for(var t=p(this.i),n=t.next();!n.done;n=t.next())n.value.Sb(e)},i.find=function(e){for(var t=this.h,n=p(this.i),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},i.get=function(e){for(var t=this.h,n=p(this.i),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},i.offset=function(){},i.Gf=function(){},i.xb=function(e){if(this.i.length){var t=this.i[0];t.xb(e),0==t.getNumReferences()&&(this.i.shift(),this.h+=t.getNumEvicted(),t.release(),this.xb(e))}},i.od=function(){},i.Zd=function(){},i.hg=function(){},P("shaka.media.MetaSegmentIndex",uu),uu.prototype.updateEvery=uu.prototype.hg,uu.prototype.fit=uu.prototype.Zd,uu.prototype.mergeAndEvict=uu.prototype.od,uu.prototype.evict=uu.prototype.xb,uu.prototype.merge=uu.prototype.Gf,uu.prototype.offset=uu.prototype.offset,uu.prototype.get=uu.prototype.get,uu.prototype.find=uu.prototype.find,uu.prototype.forEachTopLevelReference=uu.prototype.Sb,uu.prototype.release=uu.prototype.release;var du=new Map;function hu(e){var t=Fn(e);return{type:t.split("/")[0],mimeType:t,codecs:e=Hn(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,zd:null,colorGamut:null,frameRate:null,timescale:null,drmInfos:[]}}function fu(e){for(var t=new Set,n=[],i=(e=p(e)).next();!i.done;i=e.next()){var r=Bn(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=ut("audio",n),i=ut("video",n),e=ut(lt,n),i=function(e){if(e.length<=1)return e;var t=e.find((function(e){return e.startsWith("dvav.")||e.startsWith("dva1.")||e.startsWith("dvh1.")||e.startsWith("dvhe.")||e.startsWith("dav1.")||e.startsWith("dvc1.")||e.startsWith("dvi1.")}));return t?lu('video/mp4; codecs="'+t+'"')?[t]:e.filter((function(e){return e!=t})):e}
2(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function pu(t,n,i){var r,a,o,s,u,l,c,d,h;return E((function(f){if(1==f.h)return(r=n).cryptoKey?f.u(2):f.g(r.fetchKey(),3);if("GCM"==n.blockCipherMode&&256==n.bitsKey){if((a=xe(t)).byteLength<32)throw new _e(2,4,4060);return o=a.slice(0,16),s=a.slice(16),u={name:"AES-GCM",iv:o,tagLength:128},f.return(e.crypto.subtle.decrypt(u,r.cryptoKey,s))}if(!(l=r.iv))for(l=xe(new ArrayBuffer(16)),c=r.firstMediaSequenceNumber+i,d=l.byteLength-1;d>=0;d--)l[d]=255&c,c>>=8;return h="CBC"==n.blockCipherMode?{name:"AES-CBC",iv:l}:{name:"AES-CTR",counter:l,length:64},f.return(e.crypto.subtle.decrypt(h,r.cryptoKey,t))}))}function gu(){}function mu(e,t){try{var n=vu(e);return Ro({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(e){return Io(e)}}function vu(e){if(!e.startsWith("data:"))throw new _e(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new _e(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),n=e.split(";"),e=n[0];var i=!1;return n.length>1&&"base64"==n[n.length-1].toLowerCase()&&(i=!0,n.pop()),{data:i?Qe(t):Xe(t),contentType:e,gg:n}}function yu(e,t,n){var i,r,a,o,s,u;return E((function(l){switch(l.h){case 1:var c;return(i=null!=(c=Tu.get(bu(e)))?c:"")?l.return(i):(r=0,a=_o([e],n),l.m(2),a.method="HEAD",l.g(t.request(r,a).promise,4));case 4:o=l.i,i=o.headers["content-type"],l.o(3);break;case 2:if(!(s=l.l())||1002!=s.code&&1001!=s.code){l.u(3);break}return a.method="GET",l.g(t.request(r,a).promise,6);case 6:u=l.i,i=u.headers["content-type"];case 3:return l.return(i?i.toLowerCase().split(";").shift():"")}}))}function bu(e){for(var t=e.length,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(63===i||35===i){t=n;break}}for(n=t-1;n>=0;n--){if(46===(i=e.charCodeAt(n))){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(47===i)break}return""}function wu(e,t,n,i,r){return e=_o(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}P("shaka.net.DataUriPlugin",gu),gu.parse=mu,Uo("data",mu);var Tu=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function xu(e){this.o=null,this.B=e,this.G=new Po,this.l=[],this.i=null,this.j=[],this.C=null,this.F=[],this.D=300,this.m=new Map,this.h=new Map,this.g=null,this.A="UNKNOWN"}function Su(e,t){var n,i,r,a,o,s,u;return E((function(l){return 1==l.h?(n=it(e.l,[Au(e,t)]),i=_o(n,e.o.retryParameters),r=e.B.networkingEngine.request(8,i),Oo(e.G,r),l.m(2),l.g(r.promise,4)):2!=l.h?(a=l.i,o=Ve(a.data),1==(s=JSON.parse(o)).VERSION&&function(e,t,n){null!=e.g&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new ti((function(){Su(e,i)})),(n=t.TTL)&&(e.D=n),e.g.ba(e.D),e.j=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}(e,s,a.uri),l.o(0)):(u=l.l())&&7001==u.code?l.return():(null!=e.g&&(e.g.stop(),e.g=null),e.g=new ti((function(){Su(e,t)})),e.g.ba(e.D),void l.j())}))}function Au(e,t){if(!e.j.length)return t;t=new re(t);var n=e.C||e.j[0],i=Math.round(e.B.getBandwidthEstimate()),r=t.g;return"DASH"==e.A?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.A&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),ye(r),r.cd&&ue(t,r),t.toString()}function Eu(e,t,n,i){var r=e.m.get(t);r||(r=new Map),r.set(n,i),e.m.set(t,r)}function ku(){var t=this;this.g=this.h=null,this.D=1,this.H=new Map,this.L=new Map,this.G=new Map,this.G.set("video",new Map),this.G.set("audio",new Map),this.G.set(lt,new Map),this.G.set("image",new Map),this.Xb=(new Map).set("com.apple.streamingkeydelivery",(function(n,i,r){return function(t,n,i,r){var a,o,s,u,l;return E((function(c){if(1==c.h){if("video/mp2t"==i)throw new _e(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new _e(2,4,4041);if(a=Ms(n,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return c.return(null);o="cenc","SAMPLE-AES"==a&&(o="cbcs"),s=Ms(n,"URI"),u=rt("com.apple.fps",o,null,s);var d=new re(s).ob.replace(/-/g,"").toLowerCase();return(l=32===d.length&&/^[0-9a-f]+$/.test(d)?d:null)||!r?c.u(2):c.g(bl(t,r),3)}return 2!=c.h&&(l=c.i),l&&u.keyIds.add(l),c.return(u)}))}(t,n,i,r)})).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",(function(e){return function(e,t){var n=Ms(t,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n))return Promise.resolve(null);var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=vu((n=Ms(t,"URI")).split("?")[0]);return i=rt("com.widevine.alpha",i,[{initDataType:"cenc",initData:e=e.Ra.getOrInsertComputed(n.split("?")[0],(function(){return xe(r.data)}))}],void 0,r.gg),(t=Is(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),Promise.resolve(i)}(t,e)})).set("com.microsoft.playready",(function(e){var t=Ms(e,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)){var n="cenc";"SAMPLE-AES"==t&&(n="cbcs"),t=vu((e=Ms(e,"URI")).split("?")[0]),e=xe(t.data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),r=e.length,a=12+i.length+4+r,o=new Uint8Array(a),s=Ae(o),u=0;s.setUint32(u,a),u+=4,s.setUint32(u,1886614376),u+=4,s.setUint32(u,0),u+=4,o.set(i,u),u+=i.length,s.setUint32(u,r),o.set(e,u+4),n=rt("com.microsoft.playready",n,[{initDataType:"cenc",initData:o}],void 0,t.gg),(e=Vt(["<PLAYREADY>",$e(e),"</PLAYREADY>"].join("\n")))&&(e=xs(e=Qe(Xt(e))),n.licenseServerUri=e),n=Promise.resolve(n)}else n=Promise.resolve(null);return n})).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",(function(e){return function(e,t){var n=Ms(t,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n))return Promise.resolve(null);var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=vu((n=Ms(t,"URI")).split("?")[0]);return i=rt("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:e=e.Ra.getOrInsertComputed(n.split("?")[0],(function(){return xe(r.data)}))}],void 0,r.gg),(t=Is(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),Promise.resolve(i)}(t,e)})),this.Xa=new Set,this.j=new Map,this.o=null,this.F="",this.Ia=new Hs,this.M=-1,this.ma=1/0,this.ka=this.$b=this.Wa=!1,this.C=new ti((function(){t.$&&!t.g.continueLoadingWhenPaused&&(t.Z.eb(t.$,"timeupdate"),t.$.paused)?t.Z.Ja(t.$,"timeupdate",(function(){return pl(t)})):pl(t)})),this.m=Cl,this.i=null,this.Ka=0,this.B=1/0,this.Ga=this.Ba=this.U=0,this.ea=new Po,this.J=new Map,this.K=new Map,this.Zb=new Map,this.Za=new Map,this.Ca=new Map,this.Lb=new Map,this.sa=new Map,this.Yb=this.ua=!1,this.Kb=new O(5),this.l=null,this.S=!0,this.Z=new Y,this.A=this.$=null,this.Mb=function(){return!1},this.Ra=new Map,this.O=[],this.Ha=new Map}function Cu(e,t){return e.m==Ml?e.G.get(t.type):t.pe}function Iu(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P,O,j,U,_,B;return E((function(E){switch(E.h){case 1:if(t.stream.isAudioMuxedInVideo)return E.return();for(n=[],i=p(t.P()),r=i.next();!r.done;
2r=i.next())a=r.value,o=new re(a),s=o.g,t.Sd&&(t.zb>=0&&s.add("_HLS_msn",String(t.zb)),t.Ab>=0&&s.add("_HLS_part",String(t.Ab))),t.Td?s.add("_HLS_skip","v2"):t.Ud&&s.add("_HLS_skip","YES"),n.push(o.toString());return E.m(2),E.g(fl(e,n,!0).promise,4);case 4:u=E.i,E.o(3);break;case 2:throw l=E.l(),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return E.return();if(1!=(c=Vs(e.Ia,u.data)).type)throw new _e(2,4,4017);return(d=u.uri)==u.originalUri||t.P().includes(d)||t.xe.push(d),h=Ls(c.X,"EXT-X-DEFINE"),f=Nu(e,h,d),m=t.stream,v=Cu(e,t),E.g(Qu(e,c,m.mimeType,t.P,f),5);case 5:for(y=E.i,b=y.keyIds,w=y.drmInfos,T=y.encrypted,x=y.pg,m.encrypted||!T||x||(m.encrypted=!0),function(e,t){return e.size===t.size&&[].concat(g(e)).every((function(e){return t.has(e)}))}(m.keyIds,b)||(m.keyIds=b,m.drmInfos=w,e.h.newDrmInfo(m)),S=sl(e,c,v,f,t.P,t.type),A=S.segments,(k=S.bandwidth)&&(m.bandwidth=k),C=iu(m),I=p(A),M=I.next();!M.done;M=I.next())(R=M.value).aa&&(R.aa.Rc=C);m.segmentIndex.od(A,e.o.hd()),A.length&&(D=Os(c.X,"EXT-X-MEDIA-SEQUENCE",0),N=(L=Ps(c.X,"EXT-X-SKIP"))?Number(Is(L,"SKIPPED-SEGMENTS")):0,P=Ju(D,A),O=P.zb,j=P.Ab,t.zb=O+N,t.Ab=j,U=v.get(D),m.segmentIndex.xb(U)),(_=au(m.segmentIndex))&&(t.vc=_.startTime,B=A[A.length-1],t.hc=B.endTime),Ps(c.X,"EXT-X-ENDLIST")&&(t.jd=!0),tl(e,c),ol(e,c.X,m.type,f,t.P),E.j()}}))}function Mu(e,t,n){n=void 0!==n&&n;for(var i=-1==e.M,r=p(t),a=r.next();!a.done;a=r.next()){var o=(a=a.value).stream.segmentIndex,s=Cu(e,a);if(o=au(o))for(var u=(s=p(s)).next();!u.done;u=s.next()){var l=(u=p(u.value)).next().value;if(u.next().value==o.startTime){i&&(e.M=Math.max(e.M,l)),a.Ye=l;break}}}if(!(e.M<0))for(i=(t=p(t)).next();!i.done;i=t.next())(qu(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&(a=e.M-i.Ye)>0&&(r.g.splice(0,a),r=au(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),Ru(e,i,r))}function Ru(e,t,n){if(!(Math.abs(n)<.001)){t.vc+=n,t.hc+=n;for(var i=p(e=Cu(e,t)),r=i.next();!r.done;r=i.next()){var a=p(r.value);r=a.next().value,a=a.next().value,e.set(r,a+n)}t.P()}}function Du(e,t,n){var i,r,a,o,s,u;return E((function(l){switch(l.h){case 1:return t?(i=Go,r=wu(t.P(),t.fc(),t.dc(),e.h.getStreamingRetryParameters()),a=t instanceof qs?1:0,l.g(ml(e,r,i,{type:a}).promise,2)):l.return({mimeType:null,data:null});case 2:if(o=l.i,s=o.data,!t.aesKey){l.u(3);break}return l.g(pu(s,t.aesKey,n),4);case 4:s=l.i;case 3:return t instanceof qs?t.vd(s,!0):t.vd(s),(u=o.headers["content-type"])&&(u=u.split(";")[0].toLowerCase()),l.return({mimeType:u,data:s})}}))}function Lu(e){if(e.m==Ml){for(var t=1/0,n=1/0,i=p(e.j.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.hc),n=Math.min(n,r.vc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.o.ph(t)}else e.o.kc(Xu(e));if(!e.o.A)for(n=(t=p(e.j.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=au(n.stream.segmentIndex))&&null!=n.h&&e.o.mh(n.h);e.o.Pg()}function Nu(e,t,n){n=new re(n).g;for(var i=new Map,r=(t=p(t)).next();!r.done;r=t.next()){var a=r.value,o=Is(a,"NAME"),s=Is(a,"VALUE");r=Is(a,"QUERYPARAM"),a=Is(a,"IMPORT"),o&&s&&i.getOrInsert(o,s),r&&(o=n.get(r)[0])&&!i.has(o)&&i.set(r,o),a&&(r=e.H.get(a))&&i.set(a,r)}return i}function Pu(e){var t=new Set([Pn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Sb((function(n){n.mimeType&&t.add(Pn(n.mimeType,e.codecs))})),e.fullMimeTypes=t}function Ou(e,t,n){var i,r;return E((function(a){return 1==a.h?(i=t.map((function(t){var n,i;return E((function(r){if(1==r.h)return e.g.disableThumbnails?r.return(null):(r.m(2),r.g(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f;return E((function(p){return 1==p.h?(n=Ms(t,"URI"),i=Is(t,"CODECS","jpeg")||"",r=Fs(t),e.j.has(n)?p.return(e.j.get(n)):(a=Is(t,"LANGUAGE"),o=Is(t,"NAME"),s=Is(t,"CHARACTERISTICS"),u=n,l=Ku(e,e.D++,[n],i,"image",a,!1,o,null,null,s,!1,null,!1,r,u),(c=Is(t,"RESOLUTION"))?p.g(l.stream.createSegmentIndex(),3):p.u(2))):(2!=p.h&&(d=au(l.stream.segmentIndex),(h=d.tilesLayout)&&(l.stream.width=Number(c.split("x")[0])*Number(h.split("x")[0]),l.stream.height=Number(c.split("x")[1])*Number(h.split("x")[1])),l.stream.closeSegmentIndex()),(f=Is(t,"BANDWIDTH"))&&(l.stream.bandwidth=Number(f)),e.j.set(n,l),p.return(l))}))}(e,t),4));if(2!=r.h)return n=r.i,r.return(n.stream);if(i=r.l(),e.g.hls.ignoreImageStreamFailures)return r.return(null);throw i}))})).concat(n.map((function(t){if(e.g.disableThumbnails)return null;try{var n=Gu(e,t);return"image"!==n.stream.type?null:n.stream}catch(t){if(e.g.hls.ignoreImageStreamFailures)return null;throw t}}))),a.g(Promise.all(i),2)):(r=a.i,a.return(r.filter((function(e){return e}))))}))}function ju(e){var t,n,i,r;
2return E((function(a){if(e.g.disableChapters)return a.return();for(t=[],n=p(e.O),i=n.next();!i.done;i=n.next())r=i.value,t.push(Uu(e,r));return a.g(Promise.all(t),0)}))}function Uu(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x;return E((function(S){if(1==S.h)return n=_o([t],e.g.retryParameters),S.g(ml(e,n,10).promise,2);for(i=S.i,r=Ve(i.data),a=JSON.parse(r),o=new Map,s=0;s<a.length;s++)if((u=a[s]).titles){if(l=[],u.images)for(c=p(u.images),d=c.next();!d.done;d=c.next())if((h=d.value).url)for(f=js([i.uri],h.url),g=p(f),m=g.next();!m.done;m=g.next())v=m.value,y={type:h["image-category"],width:h["pixel-width"],height:h["pixel-height"],url:v},l.push(y);for(b=p(u.titles),w=b.next();!w.done;w=b.next())T=w.value,x={id:"",title:T.title,startTime:u["start-time"],endTime:u["start-time"],images:l},u.duration?x.endTime+=u.duration:s+1<a.length&&(x.endTime=a[s+1]["start-time"]),o.getOrInsertComputed(T.language,(function(){return[]})).push(x)}o.forEach((function(t,n){for(var i=[],r=(t=p(t)).next();!r.done;r=t.next()){var a=new qs((r=r.value).startTime,r.endTime,(function(){return[]}),0,null,null,0,0,1/0);a.Xf({title:r.title,images:r.images}),i.push(a)}(t=e.Ha.getOrInsertComputed(n,(function(){return{id:e.D++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"text/plain",codecs:"",supplementalCodecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:n,originalLanguage:n,label:null,type:"chapter",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Pn("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null}}))).segmentIndex?t.segmentIndex.od(i,e.o.hd()):t.segmentIndex=new ru(i)})),S.j()}))}function _u(e,t,n){for(var i={audio:[],video:[]},r=new Map,a=[],o=!1,s=!1,u=p(t),l=u.next();!l.done;l=u.next()){var c=l.value;l=Is(c,"AUDIO");var d=Is(c,"VIDEO"),h=l||d;h&&(a.includes(h)||a.push(h),(c=Is(c,"PATHWAY-ID"))&&r.set(h,c),l?o=!0:d&&(s=!0))}a.length&&n.length&&function(e,t,n){t=t.filter((function(e){var t=Is(e,"URI")||"";return"SUBTITLES"!=(e=Is(e,"TYPE"))&&(""!=t||"AUDIO"==e)}));for(var i={},r=(t=p(t)).next();!r.done;r=t.next()){var a=ks(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}for(var o in i)Vu(e,i[o],n,!1)}(e,n=n.filter((function(e){return a.includes(Ms(e,"GROUP-ID"))})),r),r=(r=a.sort().join(","))&&e.L.has(r)?e.L.get(r):[],o?i.audio.push.apply(i.audio,g(r)):s&&i.video.push.apply(i.video,g(r)),s=!1;var f=t.map((function(e){return Ms(e,"URI")}));return o=i.audio.find((function(e){return e&&e.P().find((function(e){return f.includes(e)}))})),n=st("video",r=Bu(e,t[0])),u=st("audio",r),l=Fs(t[0]),u&&!n?(o="audio",s=i.audio.length>0&&!i.audio.some((function(e){return e.stream.isAudioMuxedInVideo}))):!i.audio.length&&!i.video.length&&u&&n?(o="video",r=[[n,u].join()]):i.audio.length&&o?(o="audio",s=!0):o=i.video.length&&!i.audio.length?"audio":"video",s||(e=function(e,t,n,i,r){for(var a=e.D++,o=[],s=p(t),u=s.next();!u.done;u=s.next()){var l=u.value;u=Ms(l,"URI"),l=Is(l,"PATHWAY-ID"),e.l&&l&&Eu(e.l,a,l,u),o.push(u)}if(s=o.sort().join(",")+n.sort().join(","),e.j.has(s))return e.j.get(s);u=o.join(",");e:{if(t=Is(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.S=!1,t=null;break e}if(t){if("NONE"!=t){t=e.J.get(t);break e}e.S=!1}else if(!t&&e.J.size)for(t=(t=p(e.J.keys())).next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return i=Ku(e,a,o,n=ot(i,n),i,null,!1,null,null,t,null,!1,null,!1,r,u),e.j.set(s,i),i}(e,t,r,o,l),"audio"==e.stream.type&&"audio"===o&&i.audio.some((function(e){return e.stream.isAudioMuxedInVideo}))&&(t=i.audio[0].stream,e.stream.language=t.language,e.stream.channelsCount=t.channelsCount,e.stream.label=t.label,e.stream.audioSamplingRate=t.audioSamplingRate,e.stream.originalId=t.originalId,e.stream.originalLanguage=t.originalLanguage),i[e.stream.type]=[e]),i}function Bu(e,t){return t=Is(t,"CODECS")||"",e.ka=t.length>0,e.ka||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),fu(t.split(/\s*,\s*/))}function Fu(e){return(e=Is(e,"FRAME-RATE"))?parseFloat(e):null}function Hu(e,t,n,i,r,a,o,s,u,l,c,d){for(var h=p(n),f=h.next();!f.done;f=h.next())hl(f.value.stream,r,a,o,s,u,null);for(r=e.g.disableVideo,n.length&&!r||(n=[null]),r&&(t=t.filter((function(e){return!e.stream.isAudioMuxedInVideo}))),r=e.g.disableAudio,t.length&&!r||(t=[null]),r=[],a=(t=p(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=p(n)).next();!s.done;s=o.next()){var g=s.value;(s=a?a.stream:null)&&(s.drmInfos=l,s.keyIds=c),(u=g?g.stream:null)&&(u.drmInfos=l,u.keyIds=c,e.g.disableIFrames||ji(u,d)),u&&!s&&(u.bandwidth=i),!u&&s&&(s.bandwidth=i),h=a?a.stream.drmInfos:null,f=g?g.stream.drmInfos:null,g=g?g.P().sort().join(","):"";var m=a?a.P().sort().join(","):"",v=[];s&&s.codecs&&v.push(s.codecs),u&&u.codecs&&v.push(u.codecs),g=[g,m,v.sort()].join("-"),s&&u&&!ke(h,f)||e.Xa.has(g)||(s={id:e.D++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!u&&u.primary,audio:s,video:u,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(s),e.Xa.add(g))}return r}function Vu(e,t,n,i){i=void 0===i||i;for(var r=[],a=[],o=new Map,s=p(t),u=s.next(),l={};!u.done;l={Hg:void 0},u=s.next()){u=u.value,l.Hg=++e.D,l=function(e){return function(){return"shaka://hls-muxed"+e.Hg}}(l);var c=i?Ms(u,"URI"):Is(u,"URI")||l();l=Ms(u,"GROUP-ID"),r.push(c),a.push(l),o.set(l,c),(u=Is(u,"PATHWAY-ID"))&&n.set(l,u)}if(i=a.sort().join(","),u=t[0],t="",s=function(e){return"subtitles"==(e=Ms(e,"TYPE").toLowerCase())&&(e=lt),e}(u),s==lt&&(t=Is(u,"CODECS")||""),!t)for(l=(a=p(a)).next();!l.done;l=a.next())if(l=l.value,e.K.has(l)){t=e.K.get(l);break}if(l=Fs(u),a=c=r.sort().join(","),"audio"==s&&i&&(a+=i),e.j.has(a))return e.j.get(a);var d=e.D++;if(e.l)for(var h=(o=p(o)).next();!h.done;h=o.next()){var f=p(h.value);h=f.next().value,f=f.next().value,(h=n.get(h))&&Eu(e.l,d,h,f)}n=Is(u,"LANGUAGE"),o=Is(u,"NAME"),h="YES"==Is(u,"DEFAULT"),f="audio"==s?function(e){return(e=Is(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}(u):null;var g="audio"==s&&function(e){return!!(e=Is(e,"CHANNELS"))&&2==(e=e.split("/")).length&&("JOC"===e[1]||e[1].includes("ATMOS"))}(u),m=Is(u,"CHARACTERISTICS"),v="YES"==Is(u,"FORCED");return u="audio"==s?function(e){return(e=Is(e,"SAMPLE-RATE"))?parseInt(e,10):null}(u):null,r=Ku(e,d,r,t,s,n,h,o,f,null,m,v,u,g,l,c),e.L.has(i)?e.L.get(i).push(r):e.L.set(i,[r]),e.j.set(a,r),r}function Gu(e,t){var n="video",i=Ms(t,"URI"),r=Is(t,"CODECS")||"",a=Fs(t);
2if("mjpg"==r&&(n="image"),e.j.has(i))return e.j.get(i);var o=Is(t,"LANGUAGE"),s=Is(t,"NAME"),u=Is(t,"CHARACTERISTICS");return n=Ku(e,e.D++,[i],r,n,o,!1,s,null,null,u,!1,null,!1,a,i),a=p((r=Is(t,"RESOLUTION"))?r.split("x"):[null,null]),r=a.next().value,a=a.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(a)||void 0,(t=Is(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(i,n),n}function Ku(e,t,n,i,r,a,o,s,u,l,c,d,h,f,g,m){function v(){return e.l&&n.length>1?function(e,t){var n=void 0!==n&&n;t=e.m.get(t)||new Map;for(var i=[],r=p(e.j),a=r.next(),o={};!a.done;o={Uc:void 0},a=r.next())if(o.Uc=a.value,a=t.get(o.Uc))i.push({Mf:o.Uc,location:a});else if(a=e.F.find(function(e){return function(t){return t.Dj==e.Uc}}(o))){var s=t.get(a["BASE-ID"]);s&&(a["URI-REPLACEMENT"].Eh?(oe(s=new re(s),a["URI-REPLACEMENT"].Eh),i.push({Mf:o.Uc,location:s.toString()})):i.push({Mf:o.Uc,location:s}))}for(r=Date.now(),a=(o=p(e.h.keys())).next();!a.done;a=o.next())a=a.value,r>(s=e.h.get(a))&&e.h.delete(a);if(i=i.filter((function(t){for(var n=p(e.h.keys()),i=n.next();!i.done;i=n.next())if(i.value.includes(new re(t.location).ob))return!1;return!0})),i.length&&(e.C=i[0].Mf),i=i.map((function(e){return e.location})),!i.length&&e.i)for(o=(r=p(e.i.split(","))).next();!o.done;o=r.next())(o=t.get(o.value))&&(e.C=e.i,i.push(o));
2if(!i.length)for(r=(t=p(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:it(e.l,i)}(e.l,t):w.xe.concat(Us([e.F],n,e.H))}var y=$u(e,i,r,a,o,s,u,l,c,d,h,f,g,m);n.some((function(e){return e.startsWith("shaka://hls-muxed")}))&&(y.isAudioMuxedInVideo=!0,y.mimeType="video/mp2t",Pu(y));var b,w={stream:y,type:r,xe:[],vc:0,hc:0,pe:new Map,Ud:!1,Td:!1,Sd:!1,jd:!1,Ye:-1,zb:-1,Ab:-1,P:v},T=null;return y.createSegmentIndex=function(){return T||(y.isAudioMuxedInVideo?(y.segmentIndex=new ru([]),Promise.resolve()):(b=fl(e,w.P(),!0),T=new Promise((function(t){t(function(t){var n,b,T,x,S,A,k,C,I,M,R,D,L,N,P,O,j,U;return E((function(E){switch(E.h){case 1:return n=ct,E.m(2),E.g(t.promise,4);case 4:if(b=E.i,t.aborted)return E.return();if((T=b.uri)!=b.originalUri&&(w.P().includes(T)||w.xe.push(T)),1!=(x=Vs(e.Ia,b.data)).type)throw new _e(2,4,4017);return S=Ls(x.X,"EXT-X-DEFINE"),A=Nu(e,S,T),k=!1,(!e.ka&&e.g.hls.disableCodecGuessing||e.S&&r==n.qa&&!e.g.hls.disableClosedCaptionsDetection)&&x.segments.length>0&&(e.S=!1,k=!0),C=!e.ka&&e.g.hls.disableCodecGuessing,I=e.m!=Cl,E.g(Yu(e,0,A,x,v,i,r,a,o,s,u,l,c,d,h,f,g,m,void 0,k,C),5);case 5:return M=E.i,t.aborted?E.return():(R=M.stream,el(e,x),e.m!=Cl&&!I&&nl(e,x),w.vc=M.vc,w.hc=M.hc,w.Ud=M.Ud,w.Td=M.Td,w.Sd=M.Sd,w.jd=M.jd,w.pe=M.pe,w.zb=M.zb,w.Ab=M.Ab,y.segmentIndex=R.segmentIndex,y.encrypted=R.encrypted,y.drmInfos=R.drmInfos,y.keyIds=R.keyIds,y.mimeType=R.mimeType,y.bandwidth=y.bandwidth||R.bandwidth,y.codecs=y.codecs||R.codecs,y.closedCaptions=y.closedCaptions||R.closedCaptions,y.width=y.width||R.width,y.height=y.height||R.height,y.hdr=y.hdr||R.hdr,y.colorGamut=y.colorGamut||R.colorGamut,y.frameRate=y.frameRate||R.frameRate,"und"==y.language&&"und"!=R.language&&(y.language=R.language),y.language=y.language||R.language,y.channelsCount=y.channelsCount||R.channelsCount,y.audioSamplingRate=y.audioSamplingRate||R.audioSamplingRate,Pu(y),y.drmInfos.length&&e.h.newDrmInfo(y),D=!1,(!l&&y.closedCaptions||l&&y.closedCaptions&&l.size!=y.closedCaptions.size)&&(D=!0),e.i&&D&&e.h.makeTextStreamsForClosedCaptions(e.i),r==n.Na&&(L=au(R.segmentIndex))&&L.aa&&(y.mimeType="application/mp4",Pu(y)),N=iu(y),y.segmentIndex.Sb((function(e){e.aa&&(e.aa.Rc=N)})),function(e){if(!e.i||!e.i.variants.length)return!1;for(var t=[],n=[],i=(e=p(e.i.variants)).next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return!(t.length>0&&!t.some((function(e){return e.segmentIndex}))||n.length>0&&!n.some((function(e){return e.segmentIndex})))}(e)&&(e.$b?zu(e,[w]):(e.$b=!0,P=Array.from(e.j.values()),O=P.filter((function(e){return e.stream.segmentIndex})),zu(e,O),Lu(e),(j=e.B)>0&&e.C.ba(j))),E.g(ol(e,x.X,y.type,A,v),6));case 6:if(t.aborted)return E.return();e.i&&(e.i.startTime=e.A),E.o(0);break;case 2:if(U=E.l(),y.closeSegmentIndex(),7001===U.code)return E.return();if(!e.h.disableStream(y))throw U;E.j()}}))}(b))}))))},y.closeSegmentIndex=function(){T&&!y.segmentIndex&&b.abort(),y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null),T=null},w}function Xu(e){for(var t=1/0,n=(e=p(e.j.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.hc));return t}function Wu(e,t){for(var n=[],i=(t=p(t)).next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.Sb((function(e){n.push(e)}));e.o.Zg(n)}function zu(e,t){if(e.m==Cl)for(var n=Xu(e),i=p(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Zd(0,n);Wu(e,t.map((function(e){return e.stream}))),n=(i=Array.from(e.j.values()).filter((function(e){return e.stream.segmentIndex}))).some((function(e){return"audio"==e.stream.type})),r=i.some((function(e){return"video"==e.stream.type})),i=e.m==Ml&&!e.Wa,n=e.m==Cl&&e.Wa&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?Mu(e,t,i):(function(e,t){if(e.ma==1/0)for(var n=(t=p(t)).next();!n.done;n=t.next())null!=(n=au(n.value.stream.segmentIndex))&&null!=n.h&&(e.ma=Math.min(e.ma,n.h));if((t=e.ma)!=1/0)for(var i=(n=p(e.j.values())).next();!i.done;i=n.next())if(!qu(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var a=au(r);if(a)if(null==a.h)B("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.P(),"Expect AV sync issues!");else for(Ru(e,i,a.h-t-a.startTime),r=(i=p(r)).next();!r.done;r=i.next())r.value.dg(t)}}}(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&Mu(e,t))}function qu(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function Yu(e,t,n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T){var x,S,A,k,C,I,M,R,D,L,N,P,O,j,U,_,B,F,H,V,G,K,X,W,z,q,Y,J,$,Q;return w=void 0===w||w,T=void 0===T||T,E((function(t){switch(t.h){case 1:if(x=i.segments||[],S=x.every((function(e){return!!Ps(e.X,"EXT-X-GAP")})),!x.length||S)throw new _e(2,4,4053);if(function(e,t){var n=Ps(t.X,"EXT-X-PLAYLIST-TYPE");t=Ps(t.X,"EXT-X-ENDLIST"),t=n&&"VOD"==n.value||t,n=n&&"EVENT"==n.value&&!t,n=!t&&!n,gl(e,t?Cl:n?Ml:Il)}(e,i),e.m!=Cl&&tl(e,i),A=e.m==Ml?e.G.get(o):new Map,k=sl(e,i,A,n,r,o),C=k.segments,I=k.bandwidth,b||o!=lt){t.u(2);break}return t.g(dl(e,o,a,C),3);case 3:b=t.i,a||"application/mp4"!=b||!C[0]||C[0].aa||(b="text/vtt"),a||"application/mp4"!=b||(T=w=!0);case 2:if(N=L=D=R=M=null,!(C.length>0&&w)){t.u(4);break}return t.g(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y;return E((function(b){if(1==b.h)return n=hu(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=cl(e,t),r=i.segment,a=i.segmentIndex,o=r.P(),(s=bu(o[0]))&&(u=wl.get(s))?b.return(
2hu(u)):b.g(Promise.all([Du(e,r.aa,0),Du(e,r,a)]),2)):b.return(n);if(l=b.i,c=l[1].mimeType,d=l[0].data,h=l[1].data,f="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),g=["audio/mp4","video/mp4","video/iso.segment"],!(m=r.aa||g.includes(c))&&Ga(xe(h))){var w=h,T=e.g.disableAudio,x=e.g.disableVideo,S=e.g.disableText,A=xe(w),E=(new _a).parse(A),k=E.dd();A=E.Fg();var C=[],I=!1,M=!1;if(!T)switch(k.audio){case"aac":case"aac-loas":E.ib().length&&(C.push("mp4a.40.2"),I=!0);break;case"mp3":E.ib().length&&(C.push("mp4a.40.34"),I=!0);break;case"ac3":E.ib().length&&(C.push("ac-3"),I=!0);break;case"ec3":E.ib().length&&(C.push("ec-3"),I=!0);break;case"opus":E.ib().length&&(C.push("opus"),I=!0)}if(!x)switch(k.video){case"avc":A.codec?C.push(A.codec):C.push("avc1.42E01E"),M=!0;break;case"hvc":A.codec?C.push(A.codec):C.push("hvc1.1.6.L93.90"),M=!0;break;case"av1":C.push("av01.0.01M.08"),M=!0}if(C.length){if(T=I&&!M,x=new Map,M&&!S){for(xt(S=new Tt("video/mp2t"),w),M=(w=p(S.g.getStreams())).next();!M.done;M=w.next())M=M.value,x.set(M,M);S.g.clear()}A={type:T?"audio":"video",mimeType:"video/mp2t",codecs:C.join(", "),language:null,height:A.height,width:A.width,channelCount:null,sampleRate:null,closedCaptions:x,zd:null,colorGamut:null,frameRate:A.frameRate,timescale:null,drmInfos:[]}}else A=null;if(v=A)return b.return(v)}else if((m||f.includes(s))&&(y=function(e,t,n){function i(e){o=e.name;var t=e.reader;t.skip(24);var n=t.ra(),i=t.ra();t.skip(50),v=String(n),m=String(i),e.reader.Ta()&&Kr(e)}function r(e){var t=aa(e.reader);y=t.channelCount,b=t.sampleRate,a(e.name),e.reader.Ta()&&Kr(e)}function a(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":l.push(e+".42E01E"),h=!0;break;case"hev1":case"hvc1":l.push(e+".1.6.L93.90"),h=!0;break;case"dvh1":case"dvhe":l.push(e+".05.04"),h=!0;break;case"vp09":l.push(e+".00.10.08"),h=!0;break;case"av01":l.push(e+".0.01M.08"),h=!0;break;case"mp4a":u.push("mp4a.40.2"),d=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":u.push(e),d=!0;break;case"apac":u.push("apac.31.00"),d=!0}}var o,s,u=[],l=[],c=[],d=!1,h=!1,f=!1,g=null,m=null,v=null,y=null,b=null,w=null,T=null,x=null,S=null,A=new Map,E=new Set,k=null,C=null,I=0,M=[],R=new Map,D=null,L=new Map;if(e&&t){S=xe(e);var N=xe(t);N=tt(S,N)}else t?N=xe(t):e&&(N=xe(e));if((new Gr).box("moof",Kr).box("moov",Kr).box("trak",Kr).N("tkhd",(function(e){D=ra(e.reader,e.version).trackId})).box("mdia",Kr).N("mdhd",(function(e){e=na(e.reader,e.version),g=e.language,null!==D&&R.set(D,e.timescale)})).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("traf",Kr).N("tfhd",(function(e){(e=ea(e.reader,e.flags)).ac&&(I=e.ac)})).N("trun",(function(e){M=ia(e.reader,e.version,e.flags).td})).box("mp4a",(function(e){var t=aa(e.reader);y=t.channelCount,b=t.sampleRate,e.reader.Ta()?Kr(e):a(e.name)})).box("esds",(function(e){e=e.reader;for(var t,n,i="mp4a";e.Ta();){t=e.V();for(var r=e.V();128&r;)r=e.V();if(3==t)e.ra(),128&(r=e.V())&&e.ra(),64&r&&e.skip(e.V()),32&r&&e.ra();else if(4==t)n=e.V(),e.skip(12);else if(5==t)break}n&&(i+="."+ua(n),5==t&&e.Ta()&&(31==(n=(248&(t=e.V()))>>3)&&e.Ta()&&(n=32+((7&t)<<3)+((224&e.V())>>5)),i+="."+n)),u.push(i),d=!0})).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",(function(e){var t=o||"";switch(o){case"dvav":t="avc3";break;case"dva1":t="avc1"}(e=e.reader).skip(1),e=t+"."+ua(e.V())+ua(e.V())+ua(e.V()),l.push(e),h=!0})).box("hvcC",(function(e){var t=o||"";switch(o){case"dvh1":t="hvc1";break;case"dvhe":t="hev1"}var n=e.reader;n.skip(1);var i=["","A","B","C"][(e=n.V())>>6],r=31&e,a=n.T(),s=(32&e)>>5?"H":"L";e=[n.V(),n.V(),n.V(),n.V(),n.V(),n.V()],n=n.V();for(var u=0,c=0;c<32&&(u|=1&a,31!=c);c++)u<<=1,a>>=1;for(t=t+"."+i+r+"."+ua(u,!0),t+="."+s+n,i="",r=e.length;r--;)((s=e[r])||i)&&(i="."+s.toString(16).toUpperCase()+i);t+=i,l.push(t),h=!0})).box("dvcC",(function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.V(),n=n.V(),l.push(t+"."+la(e>>1&127)+"."+la(e<<5&32|n>>3&31)),h=!0})).box("dvvC",(function(e){var t=o||"";switch(o){case"hvc1":t="dvh1";break;case"hev1":t="dvhe";break;case"avc1":t="dva1";break;case"avc3":t="dvav";break;case"av01":t="dav1"}var n=e.reader;n.skip(2),e=n.V(),n=n.V(),l.push(t+"."+la(e>>1&127)+"."+la(e<<5&32|n>>3&31)),h=!0})).N("vpcC",(function(e){var t=o||"",n=e.reader;e=n.V();var i=n.V();n=n.V()>>4&15,l.push(t+"."+la(e)+"."+la(i)+"."+la(n)),h=!0})).box("av1C",(function(e){var t=o||"";"dav1"===o&&(t="av01");var n=e.reader;n.skip(1);var i=(e=n.V())>>>5,r=(64&(n=n.V()))>>6;l.push(t+"."+i+"."+la(31&e)+(n>>>7?"H":"M")+"."+la(2===i&&r?(32&n)>>5?12:10:r?10:8)+"."+((16&n)>>4)+"."+((8&n)>>3)+((4&n)>>2)+(3&n)+"."+la(1)+"."+la(1)+"."+la(1)+".0"),h=!0})).box("wvtt",(function(e){c.push(e.name),f=!0})).box("stpp",(function(e){c.push(e.name),f=!0})).box("c608",(function(){L.set("CC1","CC1"),null!==D&&R.delete(D)})).box("enca",r).box("encv",i).box("sinf",Kr).box("frma",(function(e){a(e=oa(e.reader).codec)})).box("colr",(function(e){l=l.map((function(t){if(t.startsWith("av01.")){var n=e.reader,i=n.Va(),r=n.ab(4,!1),a=String.fromCharCode(r[0]);if(a+=String.fromCharCode(r[1]),a+=String.fromCharCode(r[2]),"nclx"===(a+=String.fromCharCode(r[3]))){r=n.ra(),a=n.ra();var o=n.ra(),s=n.V()>>7,u=t.split(".");10==u.length&&(u[6]=la(r),u[7]=la(a),u[8]=la(o),u[9]=String(s),t=u.join("."))}n.seek(i)}return t}));var t=function(e){var t=null,n=null,i=e.ab(4,!1),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){switch(e.ra()){case 1:case 5:case
26:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.ra(),e.ra(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,zd:n}}(e.reader),n=t.colorGamut;w=t.zd,T=n})).N("schm",(function(e){k=Jr(e.reader.T())})).box("schi",Kr).N("tenc",(function(e){C=sa(e.reader).defaultKID})).N("pssh",(function(e){var t=xe(e.reader.h,-12,e.size),n=et(t);if(!E.has(n)&&(E.add(n),n=et(n=e.reader.ab(16,!1)),s||(s=Oe(!0)),n=s[n.toLowerCase()])){var i=rt(n,"cenc",[{initDataType:"cenc",initData:t}]);if(De(n)){var r=8,a=(t=Ae(t)).getUint8(r);r+=20,a>0&&(r+=4+16*t.getUint32(r)),t=xs(t=xe(t,r+4)),i.licenseServerUri=t}if(e.version>0)for(t=e.reader.T(),r=0;r<t;r++)a=e.reader.ab(16,!1),i.keyIds.add(et(a));A.set(n,i)}})).parse(N,!0,!0),!u.length&&!l.length&&!c.length)return null;if(S=R.values().next().value,N=d&&!h,h&&!n&&t&&!L.size){n=new Tt("video/mp4"),e&&n.init(e);try{xt(n,t);for(var P=p(n.g.getStreams()),O=P.next();!O.done;O=P.next()){var j=O.value;L.set(j,j)}}catch(e){}n.g.clear()}for(e=u.concat(l).concat(c),"cbcs"===k&&C&&!A.has("com.apple.fps")&&A.set("com.apple.fps",rt("com.apple.fps",k,null)),P=(t=p(A.values())).next();!P.done;P=t.next())P=P.value,k&&(P.encryptionScheme=k),C&&P.keyIds.add(C);if(t="video",P="video/mp4",f?(t="text",P="application/mp4"):N&&(t="audio",P="audio/mp4"),"video"===t&&null!=S&&M.length){for(N=S,O=0,n=(j=p(M)).next();!n.done;n=j.next()){var U;O+=null!=(U=n.value.ud)?U:I}O>0&&(x=N*M.length/O)}return{type:t,mimeType:P,codecs:fu(e).join(", "),language:g,height:m,width:v,channelCount:y,sampleRate:b,closedCaptions:L,zd:w,colorGamut:T,frameRate:x,timescale:S,drmInfos:Array.from(A.values())}}(d,h,e.g.disableText)))return b.return(y);return c?b.return(hu(c)):b.return(n)}))}(e,C),5);case 5:P=t.i,o!=P.type&&e.m==Ml&&(e.G.set(P.type,e.G.get(o)),e.G.set(o,new Map)),o=P.type,s=P.language,c=P.channelCount,g=P.sampleRate,e.g.disableText||(d=P.closedCaptions),R=P.height,M=P.width,D=P.zd,L=P.colorGamut,N=P.frameRate,T&&(b=P.mimeType,a=P.codecs);case 4:if(b){t.u(6);break}return t.g(dl(e,o,a,C),7);case 7:b=t.i;case 6:return t.g(Qu(e,i,b,r,n),8);case 8:if(O=t.i,j=O.drmInfos,U=O.keyIds,_=O.encrypted,B=O.pg,_&&!j.length&&!B)throw new _e(2,4,4026);return(F=$u(e,a,o,s,u,l,c,d,h,f,g,m,v,y)).encrypted=_&&!B,F.drmInfos=j,F.keyIds=U,F.mimeType=b,I&&(F.bandwidth=I),Pu(F),"video"==o&&(M||R||D||L)&&hl(F,M,R,N,D,null,L),e.m!=Cl&&tl(e,i),H=C[0].startTime,V=C[C.length-1],G=V.endTime,K=new ru(C),F.segmentIndex=K,W=!!(X=Ps(i.X,"EXT-X-SERVER-CONTROL"))&&null!=Cs(X,"CAN-SKIP-UNTIL"),z=!1,W&&(z=!!X&&null!=Cs(X,"CAN-SKIP-DATERANGES")),q=!!X&&null!=Cs(X,"CAN-BLOCK-RELOAD"),Y=Os(i.X,"EXT-X-MEDIA-SEQUENCE",0),J=Ju(Y,C),$=J.zb,Q=J.Ab,t.return({stream:F,type:o,xe:[],P:r,vc:H,hc:G,Ud:W,Td:z,Sd:q,jd:!1,Ye:-1,zb:$,Ab:Q,pe:A})}}))}function Ju(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{zb:++e,Ab:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{zb:e,Ab:n}):(e++,t.A&&(n=0),{zb:e,Ab:n})}function $u(e,t,n,i,r,a,o,s,u,l,c,d,h,f){var g=ul(n,t)||ll(n),m=[];if(u)for(var v=(u=p(u.split(","))).next();!v.done;v=u.next())m.push(v.value);return v=void 0,u=null,n==lt?v=m.includes("public.accessibility.transcribes-spoken-dialog")&&m.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":m.includes("public.accessibility.describes-video")&&(u="visually impaired"),m.length||"subtitle"!==v||m.push("subtitle"),v=null,"video"!=n&&(v=a),Pu(e={id:e.D++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:g,codecs:t,supplementalCodecs:h,kind:n==lt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ci(i||"und"),originalLanguage:i,label:v,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:m,forced:l,channelsCount:o,audioSamplingRate:c,spatialAudio:d,closedCaptions:s,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}),e}function Qu(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P,O;return E((function(E){switch(E.h){case 1:if(a=new Map,!e.g.ignoreDrmInfo&&t.segments)for(o=p(t.segments),s=o.next();!s.done;s=o.next())if(u=s.value,l=Ls(u.X,"EXT-X-KEY"),c=null,l.length)for(c=il(e,t,u.X,i,r),d=p(l),h=d.next();!h.done;h=d.next())f=h.value,a.set(f,c);m=g=!1,v=[],y=new Set,b=p(a),w=b.next();case 2:if(w.done){E.u(4);break}if(T=w.value,x=p(T),S=x.next().value,A=x.next().value,C=A,"NONE"==(I=Ms(k=S,"METHOD"))){E.u(3);break}if(g=!0,M=Is(k,"KEYFORMAT")||"identity",R=null,vl(I)){m=!0,E.u(3);break}if("identity"==M)return E.g(yl(e,k,n,i,C,r),11);if(!(D=e.Xb.get(M))){L=null,E.u(9);break}return E.g(D(k,n,C),10);case 10:L=E.i;case 9:R=L,E.u(6);break;case 11:R=E.i;case 6:if(R){if(R.keyIds)for(N=p(R.keyIds),P=N.next();!P.done;P=N.next())O=P.value,y.add(O);v.push(R)}case 3:w=b.next(),E.u(2);break;case 4:return E.return({drmInfos:v,keyIds:y,encrypted:g,pg:m})}}))}function Zu(t,n,i,r,a){if(!e.crypto||!e.crypto.subtle)throw F("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new _e(2,4,4042);var o=Ms(n,"METHOD"),s=0,u=Is(n,"IV","");if("AES-256-GCM"===o){if(u)throw new _e(2,4,4059)}else if(u){var l=Ze(u.substr(2));if(16!=l.byteLength)throw new _e(2,4,4048)}else s=Os(i.X,"EXT-X-MEDIA-SEQUENCE",0);var c=js(r(),Ms(n,"URI"),a),d=c.sort().join("");return t.Za.getOrInsertComputed(n.toString()+"-"+s+"-"+d,(function(){var n={bitsKey:128,blockCipherMode:"CBC",iv:l,firstMediaSequenceNumber:s};switch(o){case"AES-256":n.bitsKey=256;break;case"AES-256-CTR":n.bitsKey=256,n.blockCipherMode="CTR";break;case"AES-256-GCM":n.bitsKey=256,n.blockCipherMode="GCM"}return n.fetchKey=function(){var i,r;
2return E((function(a){if(1==a.h)return a.g(t.Ca.getOrInsertComputed(d,(function(){return ml(t,_o(c,t.g.retryParameters),6).promise})),2);if(3!=a.h){if(!(i=a.i).data||i.data.byteLength!=n.bitsKey/8)throw new _e(2,4,4049);return r={name:"CBC"===n.blockCipherMode?"AES-CBC":"GCM"===n.blockCipherMode?"AES-GCM":"AES-CTR",length:n.bitsKey},a.g(e.crypto.subtle.importKey("raw",i.data,r,!0,["decrypt"]),3)}n.cryptoKey=a.i,n.fetchKey=void 0,a.j()}))},n}))}function el(e,t){null==e.A&&(t=Ps(t.X,"EXT-X-START"))&&(e.A=Number(Ms(t,"TIME-OFFSET")))}function tl(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;r>=0;){var a=Ps(i[r].X,"EXTINF");if(a){n=Bs(a);break}r--}if(!(i=Ps(t.X,"EXT-X-TARGETDURATION")))throw new _e(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Ps(t.X,"EXT-X-PART-INF"))&&(e.U=Number(Ms(r,"PART-TARGET"))),t=Ps(t.X,"EXT-X-SERVER-CONTROL"),e.ua&&e.U?(e.B=e.Yb?5*e.U<=n?Math.min(e.U,e.B):Math.min(n,e.B):Math.min(e.U,e.B),e.Ga=t?Number(Ms(t,"PART-HOLD-BACK")):0):(e.B=Math.min(n,e.B),n=t?Cs(t,"HOLD-BACK"):null,e.Ba=n?Number(n.value):0),e.Ka=Math.max(i,e.Ka)}function nl(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ga)n=e.Ga;else if(e.Ba)n=e.Ba;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var a=Ps(t.segments[r].X,"EXTINF");n=a?n+Bs(a):n+e.Ka}e.A&&e.A<0&&(n=Math.min(-e.A,n),e.A+=n),e.o.nh(0),e.o.kh(n),e.o.Be(!1)}function il(e,t,n,i,r){var a=Ps(n,"EXT-X-MAP");if(!a)return null;var o=Ms(a,"URI"),s=js(i(),o,r);return o=[s.toString(),Is(a,"BYTERANGE","")].join("-"),e.Zb.getOrInsertComputed(o,(function(){for(var o=void 0,u=void 0,l=!1,c=p(n),d=c.next();!d.done;d=c.next())"EXT-X-KEY"==(d=d.value).name?vl(l=Ms(d,"METHOD"))&&d.id<a.id?(l=!1,o=Zu(e,d,t,i,r)):l="NONE"!=l:"EXT-X-BYTERANGE"==d.name&&d.id<a.id&&(u=d);return function(e,t,n,i,r){var a=0,o=null;return!(t=Is(t,"BYTERANGE"))&&n&&(t=n.value),t&&(a=t.split("@"),o=Number(a[0]),o=(a=Number(a[1]))+o-1,i&&((n=o+1-a)%16&&(o+=16-n%16))),new Ws((function(){return e}),a,o,null,null,null,i,r)}(s,a,u,o,l)}))}function rl(t,n,i,r,a,o,s,u,l,c){var d=r.X,h=Ps(d,"EXTINF"),f=0,g=0,m=null;r.g.length&&(t.i.isLowLatency=!0);var v=null;if(!t.g.hls.ignoreManifestProgramDateTime){var y=Ps(d,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Yt(y.value),t.Wa=!0)}var b=Js;if(Ps(d,"EXT-X-GAP")&&(t.i.gapCount++,b=2),!h){if(0==r.g.length)throw new _e(2,4,4024,"EXTINF");if(!t.ua)return null}var w=[];y=!1;var T=null,x=!1,S=!1;if(t.ua&&r.g.length){f=n&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var A=v,E={},k=0;k<r.g.length;E={Fe:void 0,qd:void 0},k++){var C=r.g[k],I=0==k?i:w[w.length-1],M=0==k?a:I.endTime,R=Number(Is(C,"DURATION"))||t.U;if(R){var D=M+R,L=0,N=null;if("EXT-X-PRELOAD-HINT"==C.name?(L=(L=Is(C,"BYTERANGE-START"))?Number(L):0,(I=Is(C,"BYTERANGE-LENGTH"))?N=L+Number(I)-1:L&&(N=Number.MAX_SAFE_INTEGER)):(L=(N=p(al(I,L=Is(C,"BYTERANGE")))).next().value,N=N.next().value),E.qd=Is(C,"URI"),E.qd){I=Js,"YES"==Is(C,"GAP")&&(t.i.gapCount++,I=2,x=!0),E.Fe=null;var P=function(e){return function(){return null==e.Fe&&(e.Fe=js(u(),e.qd,o)),e.Fe}}(E);f&&L>=0&&null!=N&&(T=P,y=!0),M=new qs(M,D,P,L,N,n,0,0,1/0,[],"",null,A,I,c),"EXT-X-PRELOAD-HINT"==C.name&&(M.Ff(),S=!0),"YES"!=Is(C,"INDEPENDENT")&&k>0&&M.Tg(),(C=l)||(w.length&&w[0].mimeType?C=w[0].mimeType:E.qd&&(E=bu(E.qd),C=El.get(s).get(E)||null)),C&&(M.mimeType=C,kl.has(C)&&(M.aa=null)),w.push(M),A&&(A+=R)}}}}if(h){if(0==(h=Bs(h)))return null;f=a+h}else{if(!w.length)return null;f=w[w.length-1].endTime}y&&(x||0!=w[0].startByte?(y=!1,T=null):w=[]),(h=Ps(d,"EXT-X-BYTERANGE"))?(g=(m=p(al(i,h.value))).next().value,m=m.next().value):w.length&&(g=w[0].startByte,m=w[w.length-1].endByte),i="",h=null,"image"==s&&(i="1x1",s=Ps(d,"EXT-X-TILES"))&&(i=Ms(s,"LAYOUT"),(s=Is(s,"DURATION"))&&(h=Number(s)));var O=null;return n=new qs(a,f,(function(){return T?T():(null==O&&(O=js(u(),r.h,o)),O||[])}),g,m,n,0,0,1/0,w,i,h,v,b,c,w.length>0&&!!r.h),l&&(n.mimeType=l,kl.has(l)&&(n.aa=null)),y&&(t.Yb=!0,n.Rg(),S&&n.Ff()),n}function al(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function ol(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P;return E((function(E){if(n!=(a=ct).qa&&n!=a.W)return E.return();if(null==(o=e.o.j)||qu(e,n))return E.return();for(s=(s=Ls(t,"EXT-X-DATERANGE")).filter((function(e){return null!=Cs(e,"START-DATE")})).sort((function(e,t){return(e=Ms(e,"START-DATE"))<(t=Ms(t,"START-DATE"))?-1:e>t?1:0})),u=[],l=0;l<s.length;l++){c=s[l];try{if(d=Ms(c,"START-DATE"),h=Yt(d),!isNaN(h)){if(f=Math.max(0,h-o),g=null,(m=Is(c,"END-DATE"))&&(v=Yt(m),!isNaN(v)&&(g=v-o)<0))continue;if(null==g&&(y=Is(c,"DURATION")||Is(c,"PLANNED-DURATION"))&&(b=parseFloat(y),isNaN(b)||(g=f+b),h-o+b<0))continue;if(w=Is(c,"CLASS")||"com.apple.quicktime.HLS",T="YES"==Is(c,"END-ON-NEXT"),null==g&&T){for(x=l+1;x<s.length;x++)if(S=Is(s[x],"CLASS")||"com.apple.quicktime.HLS",w==S&&(A=Ms(s[x],"START-DATE"),k=Yt(A),!isNaN(k)&&k&&k>h)){g=Math.max(0,k-o);break}if(null==g)continue}for(C=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"],I=[],M=p(c.attributes),R=M.next();!R.done;R=M.next())D=R.value,C.includes(D.name)||(L=_s(D.value,i),"X-ASSET-URI"!=D.name&&"X-ASSET-LIST"!=D.name||(L=js(r(),D.value,i)[0]),N={key:D.name,description:"",data:L,mimeType:null,pictureType:null},I.push(N));I.length>1&&(P=e.h.onMetadata(w,f,g,I))&&u.push(P)}}catch(e){}}return u.length?E.g(Promise.all(u),0):E.u(0)}))}function sl(e,t,n,i,r,a){function o(e){if(!(e=bu(e)))return null;var t=El.get(a).get(e);return t||(t=wl.get(e)),t}var s=t.segments,u=null,l=null,c=null,d=null,h=void 0,f=Os(t.X,"EXT-X-DISCONTINUITY-SEQUENCE",-1),g=Os(t.X,"EXT-X-MEDIA-SEQUENCE",0),m=Ps(t.X,"EXT-X-SKIP"),v=m?Number(Is(m,"SKIPPED-SEGMENTS")):0,y=g+v,b=0;e.m==Ml&&n.has(y)&&(b=n.get(y)),0===b&&e.m==Ml&&n.size>0&&!n.has(y)&&null!=e.o.h&&(b=e.o.hd());var w=[],T=null;m=[];for(var x=0;x<s.length;x++){var S=s[x];(y=Ps(S.X,"EXT-X-MAP"))&&y.id!==l&&(u=il(e,t,S.X,r,i),l=y.id);var A="";(y=S.h)&&(A=bu(y)),A!==d&&(c=o(y),d=A),A=0==x?b:T.endTime,y=g+v+x,Ps(S.X,"EXT-X-DISCONTINUITY")&&(f++,T&&T.aa&&(T.aa.g=A));for(var E=p(S.X),k=E.next();!k.done;k=E.next())"EXT-X-KEY"==(k=k.value).name&&(h=vl(Ms(k,"METHOD"))?Zu(e,k,t,r,i):void 0);if(n.set(y,A),A=rl(e,u,T,S,A,i,a,r,c,h)){if((T=Os(S.X,"EXT-X-BITRATE"))?(m.push({bitrate:T,duration:A.endTime-A.startTime}),A.bandwidth=T):A.endByte?(S=Ys(A))&&(S=8*S/(T=A.endTime-A.startTime)/1e3,m.push({bitrate:S,duration:T}),A.bandwidth=S):m.length&&((T=m.pop()).duration+=A.endTime-A.startTime,m.push(T),A.bandwidth=T.bitrate),A.bandwidth)for(S=(T=p(A.g)).next();!S.done;S=T.next())S.value.bandwidth=A.bandwidth;T=A,A.i=f,qu(e,a)&&null!=e.M&&y<e.M||w.push(A)}}if(t=void 0,m.length&&(t=m.reduce((function(e,t){return e+t.duration}),0),t=Math.round(m.reduce((function(e,t){return e+t.bitrate*t.duration}),0)/t*1e3)),m=w.some((function(e){return null!=e.h})))for(n={},i=0;i<w.length;n={ae:void 0,$d:void 0,Pd:void 0,yc:void 0,Od:void 0},i++)if(n.yc=w[i],null==n.yc.h)for(n.$d=0,n.ae=i,r=function(e){return function(){var t=w[e.ae];if(t){if(null!=t.h)return t.h+e.$d;e.$d-=t.endTime-t.startTime,e.ae+=1}return null}}(n),n.Od=0,n.Pd=i,s=function(e){return function(){var t=w[e.Pd];if(t){if(t!=e.yc&&(e.Od+=t.endTime-t.startTime),null!=t.h)return t.h+e.Od;--e.Pd}return null}}(n);null==n.yc.h;)n.yc.h=s(),null==n.yc.h&&(n.yc.h=r());if(m)for(i=(n=p(w)).next();!i.done;i=n.next())for(i=(r=i.value).h,s=(r=p(r.g)).next();!s.done;s=r.next())(s=s.value).h=i,i+=s.endTime-s.startTime;if(n=e.ma,m&&n!=1/0&&!qu(e,a))for(m=(e=p(w)).next();!m.done;m=e.next())m.value.dg(n);return{segments:w,bandwidth:t}}function ul(e,t){if(e==lt){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function ll(e){return e==lt?"text/vtt":El.get(e).get("mp4")}function cl(e,t){for(var n=t[e=e.m==Ml?Math.trunc((t.length-1)/2):0];2==n.Ib()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function dl(e,t,n,i){var r,a,o,s,u,l,c,d,h,f,p,g,m;return E((function(v){switch(v.h){case 1:return r=Go,a=cl(e,i),2==(o=a.segment).status?v.return(ll(t)):(u=o.P(),(l=bu(u[0]))&&(c=El.get(t),(d=c.get(l))||(d=wl.get(l)))?v.return(d):(s=ul(t,n))?v.return(s):(f=1,p=_o(u,e.h.getStreamingRetryParameters()),v.m(2),p.method="HEAD",v.g(ml(e,p,r,{type:f}).promise,4)));case 4:g=v.i,h=g.headers["content-type"],v.o(3);break;case 2:if(!(m=v.l())||1002!=m.code&&1001!=m.code){v.u(3);break}return p.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(p.headers.Range="bytes=0-0"),v.g(ml(e,p,r,{type:f}).promise,6);case 6:g=v.i,h=g.headers["content-type"];case 3:if(!h){v.u(7);break}if("application/octet-stream"!=(s=h.toLowerCase().split(";")[0])){v.u(8);break}if(g.data.byteLength){v.u(9);break}return p.method="GET",v.g(ml(e,p,r,{type:f}).promise,10);case 10:g=v.i;case 9:Ga(xe(g.data))&&(s="video/mp2t");case 8:if("application/octet-stream"!=s)return v.return(s);case 7:return v.return(ll(t))}}))}function hl(e,t,n,i,r,a,o){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=i||void 0,e.hdr=r||void 0,e.videoLayout=a||void 0,e.colorGamut=o||void 0)}function fl(e,t,n){return ml(e,_o(t,e.g.retryParameters),0,{type:n?2:3})}function pl(e){var t,n,i,r,a,o;return E((function(s){switch(s.h){case 1:return e.h?(s.m(2),t=Date.now(),s.g(e.update(
2),4)):s.return();case 4:n=Date.now(),e.m!=Cl&&(i=(n-t)/1e3,e.Kb.sample(1,i),r=e.g.updatePeriod>0?e.g.updatePeriod:e.B,a=Math.max(0,r-j(e.Kb)),isFinite(a)?e.C.ba(a):e.C.ba(1)),s.o(3);break;case 2:if(o=s.l(),!e.h)return s.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(o),s.return();o.severity=1,e.h.onError(o),e.C.ba(.1);case 3:if(!e.h)return s.return();e.h.onManifestUpdated(),s.j()}}))}function gl(e,t){e.m=t,e.o&&e.o.Be(e.m==Cl),e.m!=Cl||e.C.stop()}function ml(e,t,n,i){if(!e.ea)throw new _e(2,7,7001);return i||(i={}),i.isPreload=e.Mb(),t=e.h.networkingEngine.request(n,t,i),Oo(e.ea,t),t}function vl(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e||"AES-256-GCM"==e}function yl(t,n,i,r,a,o){var s,u,l,c,d,h,f,p,g;return E((function(m){switch(m.h){case 1:if("video/mp2t"==i)throw new _e(2,4,4040);if("apple"===e.shakaMediaKeysPolyfill)throw new _e(2,4,4041);if(s=Ms(n,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s))return m.return(null);if((u=js(r(),Ms(n,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=et(Qe(u[0].split("data:text/plain;base64,").pop())),m.u(2);break}return c=u.sort().join(""),m.g(t.Lb.getOrInsertComputed(c,(function(){return ml(t,_o(u,t.g.retryParameters),6).promise})),3);case 3:d=m.i,l=et(d.data);case 2:if(h="00000000000000000000000000000000",!a){m.u(4);break}return m.g(bl(t,a),5);case 5:(f=m.i)&&(h=f);case 4:return(p=new Map).set(h,l),g="cenc","SAMPLE-AES"==s&&(g="cbcs"),m.return(at(p,g))}}))}function bl(e,t){var n,i,r,a;return E((function(o){return 1==o.h?(n=null,e.sa.has(t)?(n=e.sa.get(t),o.u(2)):(i=wu(t.P(),t.fc(),t.dc(),e.h.getStreamingRetryParameters()),r=Go,o.g(ml(e,i,r,{type:0}).promise,3))):(2!=o.h&&(a=o.i,t.vd(a.data),n=function(e){var t=null;return(new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("encv",Wr).box("enca",zr).box("sinf",Kr).box("schi",Kr).N("tenc",(function(e){t=sa(e.reader).defaultKID})).parse(e,!0),t}(a.data),e.sa.set(t,n)),o.return(n))}))}xu.prototype.configure=function(e){this.o=e},xu.prototype.destroy=function(){return this.B=this.o=null,this.l=[],this.i=null,this.j=[],this.F=[],this.m.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},xu.prototype.setManifestType=function(e){this.A=e},xu.prototype.banLocation=function(e){this.h.set(e,Date.now()+6e4)},(i=ku.prototype).configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.Mb=t),this.l&&this.l.configure(this.g),n&&this.i&&this.i.presentationTimeline.na()&&this.C.Qa()},i.start=function(e,t){var n,i=this;return E((function(r){return 1==r.h?(i.h=t,i.ua=t.isLowLatencyMode(),r.g(fl(i,[e]).promise,2)):3!=r.h?(n=r.i,i.F=n.uri,r.g(function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P,O,j,U,_,B,F,H,V,G,X,W,z,q,Y;return E((function(J){switch(J.h){case 1:return n=ct,i=Vs(e.Ia,t),r=Ls(i.X,"EXT-X-DEFINE"),a=[],o=[],s=[],e.o=new Qs(null,0),e.o.Be(!0),u=function(){return[e.F]},l=null,c=new Map,e.i={presentationTimeline:e.o,variants:a,textStreams:o,imageStreams:s,chapterStreams:[],offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.A},1==i.type?(e.S=!1,j=Ls(i.X,"EXT-X-DEFINE"),c=Nu(e,j,e.F),l=n.qa,U="",_=new Map,B=e.F,J.g(Yu(e,e.D++,c,i,u,"",l,U,!0,"Media Playlist",null,_,null,!1,null,!1,"",B),7)):(function(e,t){for(var n=new re(e.F).g,i=(t=p(t)).next();!i.done;i=t.next()){var r=i.value;i=Is(r,"NAME");var a=Is(r,"VALUE");r=Is(r,"QUERYPARAM"),i&&a&&e.H.getOrInsert(i,a),r&&(i=n.get(r)[0])&&!e.H.has(i)&&e.H.set(r,i)}}(e,r),d=Ls(i.X,"EXT-X-MEDIA"),h=Ls(i.X,"EXT-X-STREAM-INF"),f=Ls(i.X,"EXT-X-IMAGE-STREAM-INF"),m=Ls(i.X,"EXT-X-I-FRAME-STREAM-INF"),v=Ls(i.X,"EXT-X-SESSION-KEY"),y=Ls(i.X,"EXT-X-SESSION-DATA"),b=Ls(i.X,"EXT-X-CONTENT-STEERING"),e.O=function(e,t){for(var n=[],i=(t=p(t)).next();!i.done;i=t.next()){var r=i.value;i=Is(r,"DATA-ID");var a=Is(r,"URI"),o=Is(r,"LANGUAGE");r=Is(r,"VALUE");var s=(new Map).set("id",i);a&&s.set("uri",js([e.F],a,e.H)[0]),o&&s.set("language",o),r&&s.set("value",r),"com.apple.hls.chapters"==i&&a&&n.push(s.get("uri")),i=new Lo("sessiondata",
2s),e.h&&e.h.onEvent(i)}return n}(e,y),e.g.hls.chaptersUri&&!e.O.includes(e.g.hls.chaptersUri)&&e.O.push(e.g.hls.chaptersUri),J.g(function(e,t){var n,i,r,a,o,s;return E((function(u){if(!e.h||!e.g)return u.return();for(i=p(t),r=i.next();!r.done;r=i.next())if(a=r.value,o=Is(a,"PATHWAY-ID"),s=Is(a,"SERVER-URI"),o&&s){e.l=new xu(e.h),e.l.configure(e.g),e.l.l=[e.F],e.l.setManifestType("HLS"),e.l.i=o,n=Su(e.l,s);break}return u.g(n,0)}))}(e,b),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(w=[],T=p(h),x=T.next(),S={};!x.done;S={ag:void 0},x=T.next())A=x.value,S.ag=Fs(A),S.ag&&(k=A.attributes.map(function(e){return function(t){var n=t.name,i=t.value;return"CODECS"==n&&(i=e.ag,(t=t.value.split(",")).length>1&&(t=st("audio",t))&&(i+=","+t)),new Ds(n,i)}}(S)),w.push(new Es(A.id,A.name,k,null)));for(h.push.apply(h,g(w)),C=[],I=p(m),M=I.next(),R={};!M.done;R={cg:void 0},M=I.next())D=M.value,R.cg=Fs(D),R.cg&&(L=D.attributes.map(function(e){return function(t){var n=t.name;return t=t.value,"CODECS"==n&&(t=e.cg),new Ds(n,t)}}(R)),C.push(new Es(D.id,D.name,L,null)));m.push.apply(m,g(C))}return function(e,t){for(var n=(t=p(t)).next();!n.done;n=t.next()){var i=n.value,r=Is(i,"AUDIO");n=Is(i,"VIDEO");var a=Is(i,"SUBTITLES");if(i=Bu(e,i),a){var o=st(lt,i);e.K.set(a,o),K(i,o)}r&&((a=st("audio",i))||(a=e.g.hls.defaultAudioCodec),e.K.set(r,a)),n&&((r=st("video",i))||(r=e.g.hls.defaultVideoCodec),e.K.set(n,r))}}(e,h),function(e,t){t=Ns(t,"CLOSED-CAPTIONS"),e.S=0==t.length;for(var n=(t=p(t)).next();!n.done;n=t.next()){var i=n.value,r=Is(i,"LANGUAGE");n=ci(r||"und"),r||(r=Is(i,"NAME"))&&(n=r),r=Ms(i,"GROUP-ID"),i=Ms(i,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(r)||e.J.set(r,new Map),e.J.get(r).set(i,n)}}(e,d),N=function(e,t){return t.map((function(t){return"video"!==(t=Gu(e,t)).stream.type?null:t.stream})).filter((function(e){return e}))}(e,m),J.g(function(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P,O,j,U,_,B,F,H,V,G;return E((function(E){switch(E.h){case 1:if(s=[],u=new Set,e.g.ignoreDrmInfo||!(n.length>0)){E.u(2);break}l=p(n),c=l.next(),d={};case 3:if(c.done){E.u(2);break}if(h=c.value,f=Ms(h,"METHOD"),m=Is(h,"KEYFORMAT")||"identity",v=null,"NONE"==f){E.u(4);break}if(vl(f)){d.Df=js(r(),Ms(h,"URI"),a),y=d.Df.sort().join(""),e.Ca.getOrInsertComputed(y,function(t){return function(){return ml(e,_o(t.Df,e.g.retryParameters),6).promise}}(d)),E.u(4);break}if("identity"==m)return E.g(yl(e,h,"",r,null,a),12);if(!(b=e.Xb.get(m))){w=null,E.u(10);break}return E.g(b(h,"",null),11);case 11:w=E.i;case 10:v=w,E.u(6);break;case 12:v=E.i;case 6:if(v){if(v.keyIds)for(T=p(v.keyIds),x=T.next();!x.done;x=T.next())S=x.value,u.add(S);s.push(v)}case 4:d={Df:void 0},c=l.next(),E.u(3);break;case 2:for(A={},k=p(t),C=k.next();!C.done;C=k.next())I=C.value,M=ks(I,!e.l),A[M]?A[M].push(I):A[M]=[I];for(D in R=[],A)L=A[D],N=L[0],P=Fu(N),O=Number(Ms(N,"BANDWIDTH"))||Number(Is(N,"AVERAGE-BANDWIDTH")),j=Is(N,"RESOLUTION"),U=p(j?j.split("x"):[null,null]),_=U.next().value,B=U.next().value,F=Is(N,"VIDEO-RANGE"),(H=Is(N,"REQ-VIDEO-LAYOUT"))&&H.includes(",")&&(V=H.split(",").filter((function(e){return"CH-STEREO"==e||"CH-MONO"==e})),H=V[0]),H=H||"CH-MONO",G=_u(e,L,i),R.push.apply(R,g(Hu(e,G.audio,G.video,O,_,B,P,F,H,s,u,o)));return E.return(R.filter((function(e){return null!=e})))}}))}(e,h,v,d,u,e.H,N),5);case 5:return a=J.i,o=function(e,t){for(var n=Ns(t,"SUBTITLES"),i={},r=(t=p(n)).next();!r.done;r=t.next()){var a=ks(r=r.value,!e.l);i[a]?i[a].push(r):i[a]=[r]}if(t=[],!e.g.disableText)for(var o in i)try{t.push(Vu(e,i[o],new Map).stream)}catch(t){if(!e.g.hls.ignoreTextStreamFailures)throw t}for(n=(o=p(n)).next();!n.done;n=o.next())if(i=Ms(n.value,"GROUP-ID"),(n=e.K.get(i))&&(i=e.L.get(i)))for(r=(i=p(i)).next();!r.done;r=i.next())(r=r.value).stream.codecs=n,r.stream.mimeType=ul(lt,n)||ll(lt),Pu(r.stream);return t.filter((function(e){return e}))}(e,d),P=p,J.g(Promise.all([Ou(e,f,m),ju(e)]),6);case 6:O=P(J.i),s=O.next().value,J.u(3);break;case 7:return F=J.i,e.j.set(e.F,F),F.stream&&(H=iu(F.stream),F.stream.segmentIndex.Sb((function(e){e.aa&&(e.aa.Rc=H)}))),l=F.stream.type,V=!0,(e.g.disableAudio&&"audio"==F.type||e.g.disableVideo&&"video"==F.type&&!F.stream.codecs.includes(","))&&(V=!1),V&&a.push({id:0,language:ci(U||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==F.type?F.stream:null,video:"video"==F.type?F.stream:null,bandwidth:F.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}),e.g.hls.chaptersUri&&!e.O.includes(e.g.hls.chaptersUri)&&e.O.push(e.g.hls.chaptersUri),J.g(ju(e),3);case 3:if(!e.h)throw new _e(2,7,7001);if(el(e,i),1!=i.type){J.u(9);break}
2return e.m!=Cl&&(nl(e,i),G=e.B,e.C.ba(G)),X=Array.from(e.j.values()),zu(e,X),Lu(e),J.g(ol(e,i.X,l,c,u),9);case 9:if(e.i.variants=a,e.i.textStreams=o,e.i.imageStreams=s,e.i.chapterStreams=Array.from(e.Ha.values()),e.i.startTime=e.A,e.ka||!e.g.hls.disableCodecGuessing){J.u(11);break}for(W=[],z=p(e.i.variants),q=z.next();!q.done;q=z.next())(Y=q.value).audio&&""===Y.audio.codecs&&W.push(Y.audio.createSegmentIndex()),Y.video&&""===Y.video.codecs&&W.push(Y.video.createSegmentIndex());return J.g(Promise.all(W),11);case 11:e.h.makeTextStreamsForClosedCaptions(e.i),J.j()}}))}(i,n.data),3)):r.return(i.i)}))},i.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.ea&&(e.push(this.ea.destroy()),this.ea=null),this.g=this.h=null,this.Xa.clear(),this.i=null,this.j.clear(),this.L.clear(),this.K.clear(),this.H.clear(),this.Zb.clear(),this.Za.clear(),this.Ca.clear(),this.Lb.clear(),this.sa.clear(),this.Ra.clear(),this.l&&this.l.destroy(),this.Z&&(this.Z.release(),this.Z=null),Promise.all(e)},i.update=function(){var e,t,n,i,r,a,o,s,u,l,c,d,h,f,g=this;return E((function(m){if(1==m.h){if(g.m==Cl)return m.return();if(e=[],t=Array.from(g.j.values()),0===(n=t.filter((function(e){return!e.stream.isAudioMuxedInVideo&&e.stream.segmentIndex}))).length)return m.return();for(g.B=1/0,g.i.gapCount=0,i=p(n),r=i.next();!r.done;r=i.next())a=r.value,e.push(Iu(g,a));return e.push(ju(g)),m.g(Promise.all(e),2)}for(o=Array.from(g.Ha.values()),s=p(o),u=s.next();!u.done;u=s.next())l=u.value,g.i.chapterStreams.includes(l)||g.i.chapterStreams.push(l);for(Wu(g,n.map((function(e){return e.stream}))),c=n.some((function(e){return 0==e.jd})),n.length&&!c&&(gl(g,Cl),Lu(g)),c&&Lu(g),d=p(n),h=d.next();!h.done;h=d.next())(f=h.value).stream.isAudioMuxedInVideo||!f.stream.segmentIndex||au(f.stream.segmentIndex)||g.h.disableStream(f.stream);m.j()}))},i.onExpirationUpdated=function(){},i.onInitialVariantChosen=function(){},i.banLocation=function(e){this.l&&this.l.banLocation(e)},i.setMediaElement=function(e){this.$=e},P("shaka.hls.HlsParser",ku);var wl=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),Tl=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),xl=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),Sl=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),Al=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),El=(new Map).set("audio",Tl).set("video",xl).set("text",Sl).set("image",Al),kl=new Set(["video/mp2t"].concat(g(Kn))),Cl="VOD",Il="EVENT",Ml="LIVE";function Rl(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=p(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function Dl(e,t){return e.mimeType==t.mimeType&&X(e=e.codecs.split(",").map((function(e){return Bn(e)})),t=t.codecs.split(",").map((function(e){return Bn(e)})))}function Ll(){this.g=Ol,this.j=(new Map).set(Ol,2).set(Pl,1),this.i=0,this.h=-1}function Nl(e,t){var n=e.g!==t;return e.g=t,n&&t===Ol&&(e.i=Date.now()),n}vt("application/x-mpegurl",(function(){return new ku})),vt("application/vnd.apple.mpegurl",(function(){return new ku})),Rl.prototype.add=function(e,t){var n,i=this.h;if(t=void 0===t||t,!(n=!!i.audio!=!!e.audio||!!i.video!=!!e.video||i.language!=e.language)&&(n=i.audio&&e.audio)){n=i.audio;var r=e.audio;n=!(!((!n.channelsCount||!r.channelsCount||n.channelsCount>2||r.channelsCount>2)&&n.channelsCount!=r.channelsCount||n.spatialAudio!==r.spatialAudio||t&&!Dl(n,r))&&X(n.roles,r.roles)&&n.groupId===r.groupId)}return!n&&(n=i.video&&e.video)&&(i=i.video,n=e.video,n=!((!t||Dl(i,n))&&X(i.roles,n.roles))),!n&&(this.g.add(e),!0)},Rl.prototype.values=function(){return this.g.values()},P("shaka.media.AdaptationSet",Rl);var Pl=0,Ol=1;function jl(e){this.g=e=void 0===e?[]:e}function Ul(e){if(0===e.g.length)throw Error("StreamInfos must have elements");for(var t=[],n=p(e.g),i=n.next();!i.done;i=n.next()){var r=t,a=r.push,o=i.value;i=ql;var s=o.id+1,u=o.stream.width||0,l=o.stream.height||0;"audio"==o.type&&(l=u=0);var c=o.duration*o.timescale,d=Math.floor(c/(Jl+1));switch(c=Math.floor(c%(Jl+1)),s=ql("tkhd",s=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(g(Xl(s,4)),[0,0,0,0],g(Xl(d,4)),g(Xl(c,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],g(Xl(u,2)),[0,0],g(Xl(l,2)),[0,0]))),u=ql,d=o.duration*o.timescale,l=Math.floor(d/(Jl+1)),d=Math.floor(d%(Jl+1)),c=(c=o.stream.language).charCodeAt(0)-96<<10|c.charCo
2deAt(1)-96<<5|c.charCodeAt(2)-96,l=ql("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(g(Xl(o.timescale,4)),g(Xl(l,4)),g(Xl(d,4)),g(Xl(c,2)),[0,0]))),d=o,c=new Uint8Array([]),d.type){case"video":c=Ql.value();break;case"audio":c=Zl.value()}d=ql("hdlr",c);e:{switch(o.type){case"video":o=ql("minf",ql("vmhd",rc.value()),uc.value(),_l(o));break e;case"audio":o=ql("minf",ql("smhd",ac.value()),uc.value(),_l(o));break e}o=new Uint8Array([])}i=i("trak",s,o=u("mdia",l,d,o)),a.call(r,i)}for(t=tt.apply(Ye,g(t)),r=ql,i=(n=e.g[0]).duration*n.timescale,a=Math.floor(i/(Jl+1)),i=Math.floor(i%(Jl+1)),a=ql("mvhd",a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(g(Xl(n.timescale,4)),g(Xl(a,4)),g(Xl(i,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))),i=[],u=(e=p(e.g)).next();!u.done;u=e.next())s=(o=i).push,u=ql("trex",u=new Uint8Array([0,0,0,0].concat(g(Xl(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),s.call(o,u);return e=r("moov",a,t,e=ql("mvex",e=tt.apply(Ye,g(i))),Hl(n.stream)),t=sc.value(),(n=new Uint8Array(t.byteLength+e.byteLength)).set(t),n.set(e,t.byteLength),n}function _l(e){var t=ql,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=Z().sd()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,e.Ma.byteLength>0)var r=ql("avcC",e.Ma);else{r=ql;for(var a=7,o=[],s=[],u=0,l=0,c=0,d=0;d<e.ub.length;d++){var h=Wl(e.ub[d]);switch(31&h[0]){case 7:o.push(h),a+=h.length+2;break;case 8:s.push(h),a+=h.length+2}}for(o.length>0&&(u=o[0][1],c=o[0][2],l=o[0][3]),d=0,(a=new Uint8Array(a))[d++]=1,a[d++]=u,a[d++]=c,a[d++]=l,a[d++]=255,a[d++]=224|o.length,u=0;u<o.length;u++)a[d++]=(65280&o[u].length)>>8,a[d++]=255&o[u].length,a.set(o[u],d),d+=o[u].length;for(a[d++]=s.length,o=0;o<s.length;o++)a[d++]=(65280&s[o].length)>>8,a[d++]=255&s[o].length,a.set(s[o],d),d+=s[o].length;r=r("avcC",a)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(g(Xl(n,2)),g(Xl(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="avc1",s=Bl(e),o=new Uint8Array([]),Yl(e.stream)&&(o=Vl(e.stream,e.codecs),i="encv"),i=ql(i,n,r,s,o)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),e.Ma.byteLength>0&&(n=ql("hvcC",e.Ma)),i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(g(Xl(i,2)),g(Xl(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="hvc1",s=Bl(e),o=new Uint8Array([]),Yl(e.stream)&&(o=Vl(e.stream,e.codecs),r="encv"),i=ql(r,i,n,s,o));break;case"audio":"mp3"==n?e=ql(".mp3",Fl(e)):"ac-3"==n?(n=ql("dac3",e.Da),i="ac-3",r=new Uint8Array([]),Yl(e.stream)&&(r=Vl(e.stream,e.codecs),i="enca"),e=ql(i,Fl(e),n,r)):"ec-3"==n?(n=ql("dec3",e.Da),i="ec-3",r=new Uint8Array([]),Yl(e.stream)&&(r=Vl(e.stream,e.codecs),i="enca"),e=ql(i,Fl(e),n,r)):"opus"==n?(n=ql("dOps",e.Da),i="Opus",r=new Uint8Array([]),Yl(e.stream)&&(r=Vl(e.stream,e.codecs),i="enca"),e=ql(i,Fl(e),n,r)):(e.Da.byteLength>0?n=ql("esds",e.Da):(n=ql,i=e.id+1,r=e.stream.channelsCount||2,o=e.stream.audioSamplingRate||44100,u=ot("audio",e.codecs.split(",")),s=(l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[o],"mp4a.40.5"!==u&&"mp4a.40.29"!==u||(s=l[2*o]),o=parseInt(u.split(".").pop(),10),n=n("esds",i=new Uint8Array([0,0,0,0,3,25].concat(g(Xl(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,o<<3|s>>>1,s<<7|r<<3,6,1,2])))),i="mp4a",r=new Uint8Array([]),Yl(e.stream)&&(r=Vl(e.stream,e.codecs),i="enca"),e=ql(i,Fl(e),n,r)),i=e}return t("stbl",e=ql("stsd",oc.value(),i),ql("stts",ec.value()),ql("stsc",tc.value()),ql("stsz",ic.value()),ql("stco",nc.value()))}function Bl(e){if(!e.Sa&&!e.Ua)return new Uint8Array([]);var t=e.Ua;
2return ql("pasp",e=new Uint8Array([].concat(g(Xl(e.Sa,4)),g(Xl(t,4)))))}function Fl(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(g(Xl(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Hl(e){var t=[];if(!Yl(e))return new Uint8Array([]);for(var n=(e=p(e.drmInfos)).next();!n.done;n=e.next())if((n=n.value).initData)for(var i=(n=p(n.initData)).next();!i.done;i=n.next())t.push(i.value.initData);return tt.apply(Ye,g(t))}function Vl(e,t){var n=ql;t=ql("frma",t=new Uint8Array([].concat(g(Xl(zl(t.split(".")[0]),4)))));var i="cenc",r=e.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=ql("schm",i=new Uint8Array([0,0,0,0].concat(g(Xl(zl(i),4)),[0,1,0,0]))),r=ql;for(var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=(e=p(e.drmInfos)).next();!o.done;o=e.next())if((o=o.value)&&o.keyIds&&o.keyIds.size)for(var s=(o=p(o.keyIds)).next();!s.done;s=o.next())a=Wl(s.value);return n("sinf",t,i,r("schi",a=ql("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function Gl(e){for(var t=[],n=(e=p(e.g)).next();!n.done;n=e.next()){n=n.value;var i,r=t.push,a=r.apply,o=ql,s=new Uint8Array([0,0,0,0].concat(g(Xl(n.data?n.data.sequenceNumber:0,4))));s=ql("mfhd",s);var u=n.data?n.data.mb:[],l=new Uint8Array(4+u.length);for(i=0;i<u.length;i++){var c=u[i].flags;l[i+4]=c.Yd<<4|c.ke<<2|c.ge}var d=(u=ql("sdtp",l)).length+32+20+8+16+8+8;l=ql,i=ql("tfhd",i=new Uint8Array([0,0,0,58].concat(g(Xl(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),c=n.data?n.data.ya:0;var h=Math.floor(c%(Jl+1));c=ql("tfdt",c=new Uint8Array([1,0,0,0].concat(g(Xl(Math.floor(c/(Jl+1)),4)),g(Xl(h,4)))));var f=d,m=12+16*(h=(d=n.data?n.data.mb:[]).length),v=new Uint8Array(m);for(f+=8+m,v.set(["video"===n.type?1:0,0,15,1].concat(g(Xl(h,4)),g(Xl(f,4))),0),f=0;f<h;f++){var y=d[f];m=Xl(y.duration,4);var b=Xl(y.size,4),w=y.flags;y=Xl(y.hb,4),v.set([].concat(g(m),g(b),[w.Bf<<2|w.Yd,w.ke<<6|w.ge<<4|w.Cf,61440&w.Xd,15&w.Xd],g(y)),12+16*f)}o=o("moof",s,u=l("traf",i,c,d=ql("trun",v),u)),a.call(r,t,[o,Kl(n)])}return tt.apply(Ye,g(t))}function Kl(e){return e=(e.data?e.data.mb:[]).map((function(e){return e.data})),ql("mdat",e=tt.apply(Ye,g(e)))}function Xl(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function Wl(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function zl(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function ql(e){var t=k.apply(1,arguments),n=$l.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],$l.set(e,n));for(var i=8,r=t.length-1;r>=0;r--)i+=t[r].byteLength;for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}function Yl(e){return e.encrypted&&e.drmInfos.length>0}var Jl=4294967295,$l=new Map,Ql=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])})),Zl=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])})),ec=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0])})),tc=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0])})),nc=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0])})),ic=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])})),rc=new Q((function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])})),ac=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,0])})),oc=new Q((function(){return new Uint8Array([0,0,0,0,0,0,0,1])})),sc=new Q((function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]);return ql("ftyp",e,new Uint8Array([0,0,0,1]),e,t)})),uc=new Q((function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=ql("dref",e),ql("dinf",e)}));function lc(e){function t(e){o.push(e),Kr(e)}var n,i,r,a,o=[];if((new Gr).box("moof",t).box("traf",t).N("tfhd",(function(e){n=e,r=ea(e.reader,e.flags)})).N("trun",(function(e){i=e,a=ia(e.reader,e.version,e.flags)})).parse(e),r&&2!==r.ih){var s=n.start+$r(n)+4+(null!==r.Mh?8:0),u=Ae(e);
2if(null!==r.ih)u.setUint32(s,2);else{dc(e,n.start,n.size+4);var l=u.getUint32(n.start+8);u.setUint32(n.start+8,2|l),a&&null!==a.Wd&&u.setInt32(i.start+$r(i)+4,a.Wd+4),l=e.subarray(0,s),u=e.subarray(s),(e=new Uint8Array(e.byteLength+4)).set(l),l=[];for(var c=3;c>=0;c--)l.push(2>>8*c&255);for(e.set(new Uint8Array(l),s),e.set(u,s+4),u=(s=p(o)).next();!u.done;u=s.next())dc(e,(u=u.value).start,u.size+4)}}return e}function cc(e,t,n,i,r,a){var o=Vl(e,i.name),s=t.subarray(i.start,i.start+i.size);for((e=new Uint8Array(i.size+o.byteLength)).set(s,0),Ae(e).setUint32(4,a),e.set(o,i.size),dc(e,0,e.byteLength),a=new Uint8Array(t.byteLength+e.byteLength),i=Z().je()?i.start:i.start+i.size,o=t.subarray(i),a.set(t.subarray(0,i)),a.set(e,i),a.set(o,i+e.byteLength),r=(t=p(r)).next();!r.done;r=t.next())dc(a,(r=r.value).start,r.size+e.byteLength);return e=Ae(a,n.start),n=$r(n),t=e.getUint32(n),e.setUint32(n,t+1),a}function dc(e,t,n){0!=(t=(e=Ae(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}function hc(e){return 1==e.length&&e.end(0)-e.start(0)<1e-4}function fc(e){return!e||hc(e)?null:1==e.length&&e.start(0)<0?0:e.length?e.start(0):null}function pc(e){return!e||hc(e)?null:e.length?e.end(e.length-1):null}function gc(e,t){return!(!e||!e.length||hc(e)||t>e.end(e.length-1))&&t>=e.start(0)}function mc(e,t){if(!e||!e.length||hc(e))return 0;for(var n=0,i=(e=p(vc(e))).next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function vc(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function yc(e,t,n,i){var r=this;this.A=i,this.g=e,this.D=t,this.h=n,this.j=new Y,this.m=!1,this.l=0,this.C=!1,this.G=this.F=0,this.o=function(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new wc(new Tc(e.g),t,(function(){return E((function(t){if(1==t.h)return vc(e.g.buffered).length?n?(e.g.currentTime+=n,t.u(2)):t.g(e.g.play(),3):t.return();if(2!=t.h){if(!e.g)return t.return();e.g.pause(),e.g.play()}e.G++,e.A(new Lo("stalldetected")),t.j()}))}))}(this),this.B=!1,this.j.I(e,"waiting",(function(){return bc(r)})),this.i=new ti((function(){bc(r)})).Aa(this.h.gapJumpTimerTime)}function bc(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.m)return}else e.m=!1;if(!e.g.paused||e.g.currentTime==e.l&&(e.g.autoplay||e.g.currentTime!=e.l)){var t;if(!(t=!e.o)){var n=(t=e.o).h,i=xc(n),r=n.g.currentTime,a=Date.now()/1e3;t.g==r&&t.m==i||(t.l=a,t.g=r,t.m=i,t.i=!1),(i=(r=a-t.l)>=t.o&&i&&!t.i)&&(t.j&&t.j(t.g,r),t.i=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,i=function(e,t,n){return e&&e.length&&!hc(e)&&(e=vc(e).findIndex((function(e,i,r){return e.start>t&&(0==i||r[i-1].end-t<=n)})))>=0?e:null}(n=e.g.buffered,t,e.h.gapDetectionThreshold),null==i||0==i&&!e.B||(r=n.start(i),(a=e.h.gapPadding)&&(r=Math.ceil(100*(r+a))/100),r>=(a=e.D.qb())||r-t<.001||(0!=i&&n.end(i-1),function(e,t){e.C=!0,e.j.Ja(e.g,"seeked",(function(){e.C=!1})),e.g.currentTime=t}(e,r),t==e.l&&(e.l=r),e.F++,e.A(new Lo("gapjumped")))))}}}function wc(e,t,n){this.h=e,this.m=xc(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}function Tc(e){var t=this;this.g=e,this.h=new Y,this.i=!1,this.h.I(this.g,"audiofocuspaused",(function(){t.i=!0})),this.h.I(this.g,"audiofocusgranted",(function(){t.i=!1})),this.h.I(this.g,"audiofocuslost",(function(){t.i=!0}))}function xc(e){if(e.g.paused||0==e.g.playbackRate||e.i||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=p(vc(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 Sc(e,t,n){this.h=e,this.i=t,this.g=n}function Ac(e,t){var n,i,r;return E((function(a){if(1==a.h)return a.g(function(e,t,n,i){return n=void 0===n?[]:n,i=void 0===i?{}:i,E((function(r){return 1==r.h?r.g(function(e,t,n,i,r){var a,o;return E((function(s){if(1==s.h)return Z().sh()&&function(e){for(var t=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set,i=(e=p(e)).next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);
2for(e=(n=p(n)).next();!e.done;e=n.next()){e=e.value;for(var r=(i=p(t)).next();!r.done;r=i.next()){var a=p(r.value);if(r=a.next().value,a=a.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,a);break}}}}(t.variants),s.g(wi(t.variants,n,!1,i),2);a=null,e&&(o=e.g)&&(a=o.keySystem),t.variants=t.variants.filter((function(e){var t=function(e,t,n){if(!e.decodingInfos.some((function(e){return!(!e.supported||t&&(e=e.keySystemAccess)&&(n[e.keySystem]||e.keySystem)!=t)})))return!1;var i=Z(),r="Xbox"===i.jb();i="MOBILE"===i.Fa()&&"GECKO"===i.va();var a=e.video,o=a&&a.width||0,s=a&&a.height||0;return!(r&&a&&(o>1920||s>1080)&&(a.codecs.includes("avc1.")||a.codecs.includes("avc3."))||(r=a&&a.dependencyStream)&&!gt(r)||(e=e.audio,i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}(e,a,r);if(!t){var n=[];e.audio&&n.push(Ui(e.audio)),e.video&&n.push(Ui(e.video))}return t})),s.j()}))}(e,t,t.offlineSessionIds.length>0,n,i),2):(function(e){e.textStreams=e.textStreams.filter((function(e){return qn(e=Pn(e.mimeType,e.codecs))}))}(t),r.g(function(e){var t,n,i,r,a,o,s;return E((function(u){switch(u.h){case 1:t=[],n=p(e.imageStreams),i=n.next();case 2:if(i.done){u.u(4);break}if(r=i.value,"application/mp4"==(a=r.mimeType)&&"mjpg"==r.codecs&&(a="image/jpg"),Fi.has(a)){u.u(5);break}if(!(o=Hi.get(a))){Fi.set(a,!1),u.u(5);break}return u.g(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.i,Fi.set(a,s);case 5:Fi.get(a)&&t.push(r),i=n.next(),u.u(2);break;case 4:e.imageStreams=t,u.j()}}))}(t),0))}))}(e.g,t,e.h.drm.preferredKeySystems,e.h.drm.keySystemsMapping),2);if(e.h.streaming.dontChooseCodecs||(n=e.h.preferredVideo.map((function(e){return e.codec})).filter(Boolean),i=e.h.preferredAudio.map((function(e){return e.codec})).filter(Boolean),r=e.h.preferredText.map((function(e){return e.format})).filter(Boolean),function(e,t,n,i,r){if(r.length){for(var a=e.textStreams,o=(r=p(r)).next(),s={};!o.done;s={fg:void 0},o=r.next())if(s.fg=o.value,(o=a.filter(function(e){return function(t){return!(!t.codecs.startsWith(e.fg)&&!t.mimeType.startsWith(e.fg))}}(s))).length){a=o;break}e.textStreams=a}if(a=e.variants,(t.length||n.length)&&(a=function(e,t,n){for(var i=(t=p(t)).next(),r={};!i.done;r={Ah:void 0},i=t.next())if(r.Ah=i.value,i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.Ah)}}(r)),i.length){e=i;break}for(t=(n=p(n)).next(),i={};!t.done;i={qg:void 0},t=n.next())if(i.qg=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.qg)}}(i)),t.length){e=t;break}return e}(a,t,n)),i.length){for(t=new q,n=(a=p(a)).next();!n.done;n=a.next())n=n.value,t.push(String(n.video.width||0),n);var u=[];t.forEach((function(e,t){e=0;for(var n=[],r=(t=p(t)).next(),a={};!r.done;a={Ge:void 0},r=t.next())a.Ge=r.value,(r=i.filter(function(e){return function(t){return e.Ge.decodingInfos[0][t]}}(a)).length)>e?(e=r,n=[a.Ge]):r==e&&n.push(a.Ge);u.push.apply(u,g(n))})),a=u}for(t=new Set,r=(n=p(a)).next();!r.done;r=n.next())(r=r.value).video&&t.add(r.video);if(t.size){var l={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};r=Array.from(t).sort((function(e,t){return e.bandwidth&&t.bandwidth&&e.bandwidth!=t.bandwidth?e.bandwidth-t.bandwidth:e.width!=t.width?e.width-t.width:e.codecs&&t.codecs?(e=_n(e.codecs),t=_n(t.codecs),(l[e]||1)-(l[t]||1)):0}));var c=[];for(t=new Map,n=function(e){var t=[String(e.width||""),String(e.height||""),String(Math.round(e.frameRate||0)),e.hdr||"",e.fastSwitching];return e.dependencyStream&&t.push(e.dependencyStream.baseOriginalId||""),e.roles&&t.push(e.roles.sort().join("_")),t.join(";")},o=(r=p(r)).next();!o.done;o=r.next()){s=n(o=o.value);var d=t.get(s)||[];d.length?_n(d[d.length-1].codecs)==_n(o.codecs)&&(d.push(o),c.push(o.id)):(d.push(o),c.push(o.id)),t.set(s,d)}e.variants=a.filter((function(e){return!((e=e.video)&&!c.includes(e.id))}))}else e.variants=a}(t,n,i,e.h.preferredDecodingAttributes,r)),!t.variants.some(Di))throw new _e(2,4,4032);return a.return(kc(e,t))}))}function Ec(e,t){var n=e.h.restrictions;e=e.i;
2for(var i=!1,r=(t=p(t.variants)).next();!r.done;r=t.next()){var a=(r=r.value).allowedByApplication;r.allowedByApplication=vi(r,n,e),a!=r.allowedByApplication&&(i=!0)}return i}function kc(e,t){var n=Ec(e,t);if(t){var i=e.g?e.g.g:null;if(i&&e.g.A){for(var r=new Set,a=p(t.variants),o=a.next();!o.done;o=a.next())(o=o.value).audio&&r.add(o.audio),o.video&&r.add(o.video);for(a=(r=p(r)).next();!a.done;a=r.next())Cc(e,i.keySystem,a.value)}Ic(e,t)}return n}function Cc(e,t,n){for(var i=(n=p(n.drmInfos)).next();!i.done;i=n.next())if((i=i.value).keySystem==t){for(var r=p(i.initData||[]),a=r.next();!a.done;a=r.next())a=a.value,es(e.g,a.initDataType,a.initData);(r=e.g).g&&r.g.mediaTypes!==i.mediaTypes&&(r.g.mediaTypes=i.mediaTypes)}}function Ic(e,t){function n(e){if(e&&!s.has(e)&&(s.add(e),e.keyIds.size))for(var t=(e=p(e.keyIds)).next();!t.done;t=e.next()){t=t.value;var n=i[r?"00":t];n?Mc.includes(n)&&o.add(n):a.add(t)}}var i=e.g?e.g.ce():{},r=(e=Object.keys(i)).length&&"00"==e[0];e=!1;for(var a=new Set,o=new Set,s=new WeakSet,u=(t=p(t.variants)).next();!u.done;u=t.next()){if((u=u.value).allowedByApplication){if(u.allowedByKeySystem)return}else e=!0;n(u.audio),n(u.video)}throw new _e(2,4,4012,e={hasAppRestrictions:e,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}yc.prototype.release=function(){this.j&&(this.j.release(),this.j=null),null!=this.i&&(this.i.stop(),this.i=null),this.o&&(this.o.release(),this.o=null),this.g=this.D=this.A=null},yc.prototype.Sc=function(){this.B=!0,this.i&&this.i.Aa(this.h.gapJumpTimerTime),bc(this)},wc.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null},Tc.prototype.release=function(){this.h&&this.h.release(),this.h=null};var Mc=["output-restricted","internal-error"];function Rc(e,t,n){return n=void 0===n?Number.EPSILON:n,e===t||(e=Math.abs(e-t))<=n||n!==Number.EPSILON&&Math.abs(e-n)<=Number.EPSILON}function Dc(e,t,n,i,r){var a=this;this.g=e,this.F=n,this.A=i,this.ea=t,this.l=new Map,this.D=new Map,this.Ga=new Map,this.h=null,this.Ha=!1,this.H=r||null,this.m=new Map,this.B=new Y,this.j=new Map,this.J=null,this.K=Promise.withResolvers(),this.Ca="",this.Za=!1,this.Ba=!0,this.$=!1,this.C=this.O=null,this.i=Lc(this,this.K),this.Ia=this.L=!1,this.G=new Wo((function(){return function(e){var t,n,i,r,a,o,s,u,l,c,d,h,f,g,m;return E((function(v){if(1==v.h){for(t=[],n=p(e.m),i=n.next();!i.done;i=n.next())for(r=i.value,a=p(r),o=a.next().value,s=a.next().value,u=s[0],l=o,e.m.set(l,s.slice(0,1)),u&&t.push(u.p.promise.catch((function(){}))),c=p(s.slice(1)),d=c.next();!d.done;d=c.next())d.value.p.reject(new _e(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),v.g(Promise.all(t),2)}for(h=p(e.j.values()),f=h.next();!f.done;f=h.next())f.value.destroy();e.B&&(e.B.release(),e.B=null),e.g&&(null==(g=e.C)?void 0:g.parentElement)===e.g&&e.g.removeChild(e.C),e.g&&(null==(m=e.O)?void 0:m.parentElement)===e.g&&(e.g.removeChild(e.O),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.O=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Ga.clear(),e.j.clear(),e.J=null,e.m.clear(),e.H=null,e.Ka.clear(),e.F=null,v.j()}))}(a)})),this.M=!1,this.Z="UNKNOWN",this.o=this.Wa=this.Xa=!1,this.ua=null,this.Ka=new Map,this.ma=this.S=this.sa=this.U=null,this.ka=Promise.withResolvers();var o=oo(Z(),this.g);o&&(this.$="disconnected"!=o.state,this.B.Jb(o,["connect","connecting","disconnect"],(function(){a.$="disconnected"!=o.state}))),this.Ra=!1}function Lc(t,n){if(t.Ba=!0,e.ManagedMediaSource){t.C||(t.g.disableRemotePlayback=!0);var i=new ManagedMediaSource;t.B.I(i,"startstreaming",(function(){t.Ba=!0})),t.B.I(i,"endstreaming",(function(){t.Ba=!1}))}else i=new MediaSource;var r,a;return t.B.Ja(i,"sourceopen",(function(){URL.revokeObjectURL(t.Ca),n.resolve()})),t.B.Ja(t.g,"playing",(function(){t.Za=!0})),t.Ca=sd(i),t.A.useSourceElements?(t.g.removeAttribute("src"),(null==(r=t.O)?void 0:r.parentElement)===t.g&&t.g.removeChild(t.O),(null==(a=t.C)?void 0:a.parentElement)===t.g&&t.g.removeChild(t.C),t.O=Qa(t.Ca),t.g.appendChild(t.O),t.C&&t.g.appendChild(t.C),t.g.load()):t.g.src=t.Ca,i}function Nc(e,t,n,i){"audio"==t&&i&&(i=xi(i,n.mimeType)),"video"==t&&i&&"video/mp4"==n.mimeType&&(i=Si(i));
2var r=Pn(n.mimeType,i);if(t==lt)Oc(e,r,n.external);else{var a=e.A.forceTransmux;(!lu(r)||!e.M&&Kn.includes(r))&&(a=!0);var o=On(n.mimeType,i);if(a){if(a=st("audio",(i||"").split(",")),i=st("video",(i||"").split(",")),a&&i)return e.o=!0,Nc(e,"audio",n,a),void Nc(e,"video",n,i);(i=Cn(o))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,o))}o=r+e.A.addExtraFeaturesToSourceBuffer(r),zo(e.G);try{var s=e.i.addSourceBuffer(o)}catch(t){throw new _e(2,3,3015,t,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.M&&(s.mode=ud),e.B.I(s,"error",(function(){var n=e.m.get(t)[0];n.p.reject(new _e(2,3,3014,e.g.error?e.g.error.code:0,n.uri))})),e.B.I(s,"updateend",(function(){return Qc(e,t)})),e.l.set(t,s),e.D.set(t,r),e.Ga.set(t,!!n.drmInfos.length)}}function Pc(e){return e.Ba&&!e.$&&!e.L}function Oc(e,t,n){e.h||(e.h=new Xn(e.ea,e.Z),e.h&&(e.h.F=e.A.modifyCueCallback));var i=e.h;e=e.Ha,"application/cea-608"==t||"application/cea-708"==t?i.l=null:(i.l=ei.get(t)(),i.l.setManifestType(i.D),i.H=e,i.C=n)}function jc(e){return!(e.L||e.i&&"ended"!=e.i.readyState)}function Uc(e){return!(e.L||e.i&&"closed"!=e.i.readyState)}function _c(e,t){return e.l.size?t==lt?e.h.g:fc(Fc(e,t)):null}function Bc(e,t){return e.l.size?t==lt?e.h.h:pc(Fc(e,t)):null}function Fc(e,t){if(!od(e))return null;try{return e.l.get(t).buffered}catch(n){return e.l.has(t),null}}function Hc(e,t,n,i){var r=Rc(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);i&&"HLS"==e.Z&&!r&&(n=-i+n.startTime,t.startTime+=n,t.endTime+=n),e.F.Zi(t),!t.messageData||"https://aomedia.org/emsg/ID3"!=t.schemeIdUri&&"https://developer.apple.com/streaming/emsg-id3"!=t.schemeIdUri||(n=ja(t.messageData)).length&&(i=t.startTime,e.F.onMetadata([{cueTime:i,data:t.messageData,frames:n,dts:i,pts:i}],0,t.endTime))}function Vc(e,t,n,i,r,a,o,s,u,l,c){var d,h,f,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D;return o=void 0!==o&&o,s=void 0!==s&&s,u=void 0!==u&&u,l=void 0!==l&&l,E((function(E){switch(E.h){case 1:if(t!=(d=ct).Na){E.u(2);break}return E.g(Yn(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.P()[0]:null,i?i.i:-1),3);case 3:return E.return();case 2:if(l||!e.o){E.u(4);break}return E.g(Vc(e,d.W,n,i,r,a,o,s,u,!0),5);case 5:return E.g(Vc(e,d.qa,n,i,r,a,o,s,u,!0),6);case 6:return E.return();case 4:if(!e.l.has(t))return E.return();if(h=e.l.get(t).timestampOffset,f=e.D.get(t),e.j.has(t)&&(f=e.j.get(t).getOriginalMimeType()),i&&(m=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s=null,u=[],l=xe(n);if(Kn.includes(a))(n=ja(l)).length&&i&&((o=n.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&"number"==typeof o.data&&(s=Math.round(o.data)/1e3),e.F.onMetadata([{cueTime:i.startTime,data:l,frames:n,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(a.includes("/mp4")&&i&&i.aa){l=new Gr;var c=null!=r.emsgSchemeIdUris&&r.emsgSchemeIdUris.length>0||e.A.dispatchAllEmsgBoxes,d=[];c&&l.N("emsg",(function(t){e:{var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.Wc(),o=t.reader.Wc(),s=t.reader.T(),u=t.reader.T(),l=t.reader.T(),c=t.reader.T(),h=i.startTime+u/s;else s=t.reader.T(),u=(h=t.reader.we()/s+i.m)-i.startTime,l=t.reader.T(),c=t.reader.T(),a=t.reader.Wc(),o=t.reader.Wc();if(t=t.reader.ab(t.reader.kb()-t.reader.Va(),!0),n&&n.includes(a)||e.A.dispatchAllEmsgBoxes){if("urn:mpeg:dash:event:2012"!=a){n=h,"https://aomedia.org/emsg/ID3"===a&&4294967295===l||(n+=l/s),s={startTime:h,endTime:n,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t};break e}e.F.aj()}s=null}s&&d.push(s)}));var h=i.aa.timescale;t=h&&!isNaN(h);var f=0,g=!1;for(t&&l.N("prft",(function(t){var n=t.reader,i=t.version;n.T(),t=1e3*(t=n.T())+n.T()/4294967296*1e3,0===i?n=n.T():(i=n.T(),n=4294967296*i+(n=n.T())),t=new Date(Date.UTC(1900,0,1,0,0,0,0)+t).getTime(),n=new Lo("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/h*1e3)})),e.F.onEvent(n)})).box("moof",Kr).box("traf",Kr).N("tfdt",(function(e){g||(f=ta(e.reader,e.version).ya/h,g=!0,c||e.parser.stop())})),(c||t)&&l.parse(n,!1,o),g&&0==i.m&&(s=f),n=(l=p(d)).next();!n.done;n=l.next())Hc(e,n.value,i,s)}else a.includes("/mp4")||a.includes("/webm")||!Ga(l)||((u=e.Ka.getOrInsertComputed(t,(function(){return new _a}))).clearData(),u.Ae(i.i),u.parse(l),null!=(l=u.getStartTime(t))&&(s=l),u=u.getMetadata());return{timestamp:s,metadata:u}}(e,t,n,i,r,f,u),v=m.timestamp,y=m.metadata,null!=v&&(null==e.U&&t==d.qa&&(e.U=v,e.sa=i.startTime,null!=e.S&&(b=0,e.sa==e.ma&&(b=e.U-e.S),e.ka.resolve(b))),null==e.S&&t==d.W&&(e.S=v,e.ma=i.startTime,null!=e.U&&(w=0,e.sa==e.ma&&(w=e.U-e.S),e.ka.resolve(w))),T=v,x=Kn,
2!e.M&&x.includes(e.D.get(t))&&(T=0),S=i.startTime-T,(Math.abs(h-S)>=.001||o||s)&&(!u||S>0||!h)&&(h=S,e.Wa&&(Zc(e,t,(function(){return Yc(e,t)}),null),Zc(e,t,(function(){return Jc(e,t,h)}),null))),(t==d.qa||!e.l.has(d.qa))&&e.h&&Jn(e.h,h,i.i)),y.length)&&e.F.onMetadata(y,h,i?i.endTime:null),a&&t==d.qa&&(e.h||Oc(e,"application/cea-608",!1),e.J||(A=f.split(";",1)[0],e.J=new Tt(A)),i?(k=xt(e.J,n)).length&&function(e,t,n){for(var i=new Map,r=(t=p(t)).next();!r.done;r=t.next()){var a=r.value;r=a.stream,a=a.cue,i.getOrInsert(r,[]),Qn(e,a,n),a.startTime>=e.A&&a.startTime<e.B&&(i.get(r).push(a),r==e.G&&e.j.append([a]))}for(t=(n=p(i.keys())).next();!t.done;t=n.next())for(r=t.value,t=e.m.getOrInsertComputed(r,(function(){return[]})),a=(r=p(i.get(r))).next();!a.done;a=r.next())t.push(a.value);Zn(e)}(e.h,k,h):e.J.init(n,s,c)),!e.j.has(t)){E.u(7);break}return E.g(e.j.get(t).transmux(n,r,i,e.i.duration,t),8);case 8:C=E.i,ArrayBuffer.isView(C)?n=C:(null!=(I=C).init&&(M=I.init,Zc(e,t,(function(){zc(e,t,M,h,r,!0)}),i?i.P()[0]:null)),n=I.data);case 7:if(n=function(e,t,n,i,r){if("mp4"!=Un(e.D.get(r)))return n;var a=null===i,o=e.Ga.get(r),s=e.F.ed(),u=!1;i&&i.aa&&(u=i.aa.encrypted),i=i?i.P()[0]:null;var l,c=Z();if(e.A.correctEc3Enca&&a&&"audio"===r&&(n=function(e){e=xe(e);var t=null;return(new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("enca",(function(e){return t=e.reader.h,zr(e)})).box("sinf",Kr).box("frma",(function(e){e.parser.stop(),"ec-3"===oa(e.reader).codec&&t&&2!==t.getUint16(16)&&t.setUint16(16,2)})).parse(e),e}(n)),l=a)if("CHROMIUM"!=c.va())l=!1;else{l=null;var d=navigator.userAgent.match(/Chrome\/(\d+)/);d&&(l=parseInt(d[1],10)),l="video"===t.type&&null!=l&&l<94&&t.supplementalCodecs!=t.codecs&&/dvh1|dvhe/.test(t.supplementalCodecs)}return l&&(n=function(e){e=xe(e);var t=null,n=-1;return(new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("hvc1",(function(e){return t=e.reader.h,n=e.start,Wr(e)})).box("dvvC",(function(e){e.parser.stop(),t.setUint32(e.start-n-4,1718773093)})).parse(e),e}(n)),e.A.insertFakeEncryptionInInit&&o&&c.Xc(s,r)&&(a?n=function(e,t,n){function i(e){d.push({box:e,Xg:1701733217})}function r(e){d.push({box:e,Xg:1701733238})}function a(e){l=!0,e.parser.stop()}function o(e){c.push(e),Kr(e)}var s,u=t=xe(t),l=!1,c=[],d=[];if((new Gr).box("moov",o).box("trak",o).box("mdia",o).box("minf",o).box("stbl",o).N("stsd",(function(e){s=e,c.push(e),Xr(e)})).N("encv",a).N("enca",a).N("dvav",r).N("dva1",r).N("dvh1",r).N("dvhe",r).N("dvc1",r).N("dvi1",r).N("hev1",r).N("hvc1",r).N("avc1",r).N("avc3",r).N("ac-3",i).N("ec-3",i).N("ac-4",i).N("Opus",i).N("fLaC",i).N("mp4a",i).parse(t),l)return t;if(0==d.length||!s)throw et(t),new _e(2,3,3019,n);d.reverse();for(var h=(n=p(d)).next();!h.done;h=n.next())h=h.value,u=cc(e,u,s,h.box,c,h.Xg);return u=function(e,t){if(0===(e=Hl(e)).byteLength)return t;var n=0,i=0;(new Gr).box("moov",(function(e){n=e.start,i=e.size,e.parser.stop()})).parse(t);var r=n+i;dc(t,n,i+e.byteLength);var a=new Uint8Array(t.byteLength+e.byteLength),o=t.subarray(r);return a.set(t.subarray(0,r)),a.set(e,r),a.set(o,r+e.byteLength),a}(e,u),Z().Sf()?((e=new Uint8Array(t.byteLength+u.byteLength)).set(u),e.set(t,u.byteLength),e):u}(t,n,i):!u&&c.fh(r)&&(n=function(e){e=xe(e);var t=[];(new Gr).box("mdat",(function(e){t.push(e)})).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],a=t[i];n.push(lc(e.subarray(r?r.start+r.size:0,a.start+a.size)))}return tt.apply(Ye,g(n))}(n))),a&&c.sd()&&(n=function(e){function t(e){i.push({start:e.start,size:e.size}),Kr(e)}var n=xe(e),i=[];return(new Gr).box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",(function(e){i.push({start:e.start,size:e.size});for(var t=Ae(n,e.start),r=0;r<e.size-3;r++){var a=t.getUint32(r);1633889587==a?t.setUint32(r,1700998451):1684103987==a&&t.setUint32(r,1684366131)}})).parse(n),n}(n)),n}(e,r,n,i,t),!i||!e.M||t==d.Na){E.u(9);break}if(!o&&!s){E.u(9);break}if(R=i.startTime,"HLS"!=e.Z||e.o||t!=d.W||!e.l.has(d.qa)){E.u(11);break}return E.g(e.ka.promise,12);case 12:D=E.i,Math.abs(D)>.15&&(R-=D);case 11:Zc(e,t,(function(){return Yc(e,t)}),null),Zc(e,t,(function(){return Jc(e,t,R)}),null);case 9:return E.g(Zc(e,t,(function(){zc(e,t,n,h,r,!i)}),i?i.P()[0]:null),13);case 13:E.j()}}))}function Gc(e,t){var n;return E((function(i){return 1==i.h?t==(n=ct).Na?e.h?i.g(e.h.remove(0,1/0),0):i.return():t===n.qa&&e.J&&e.h?i.g(e.h.remove(0,1/0,!0),4):i.u(4):6!=i.h?i.g(Zc(e,t,(function(){return qc(e,t,0,e.i.duration)}),null),6):e.o?i.g(Zc(e,n.W,(function(){return qc(e,n.W,0,e.i.duration)}),null),0):i.u(0)}))}function Kc(e,t,n,i,r,a,o,s,u){var l,c;return E((function(d){return 1==d.h?t==(l=ct).Na?(a||Jn(e.h,n),function(e,t,n){e.A=t,e.B=n}(e.h,i,r),d.return()):(c=[],d.g(function(e,t,n,i,r){var a,o,s,u,l,c;return E((function(d){return 1==d.h?(a=ct,o=ad(e,t,n,i,r),s=o.type,u=o.Qb,l=o.se,(c=r.get(a.W))&&(e.o=c.isAudioMuxedInVideo),s==ld?(e.j.has(t)&&!u?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&u?e.j.set(t,u):u&&(e.j.has(t)&&e.j.get(t).transmux!==u.transmux?(e.j.get(t).destroy(),e.j.set(t,u)):u.destroy()),d.return(!1)):s==dd?d.g(function(e,t,n,i){return Zc(e,t,(function(){if(t!==lt){e.D.get(t);var r=Z(),a=e.F.ed();r.cb(a)&&(e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i),r=n+e.A.addExtraFeaturesToSourceBuffer(n),e.l.get(t).changeType(r),e.D.set(t,n)),Qc(e,t)}}),null)}(e,t,l,u),3):s!=cd?d.u(3):(u&&u.destroy(),d.g(id(e,r),3))):d.return(!0)}))}(e,t,o,s,u),2)):(d.i||(c.push(Zc(e,t,(function(){return Yc(e,t)}),null)),e.o&&c.push(Zc(e,l.W,(function(){return Yc(e,l.W)}),null))),a||(c.push(Zc(e,t,(function(){return Jc(e,t,n)}),null)),e.o&&c.push(Zc(e,l.W,(function(){return Jc(e,l.W,n)}),null))),0==i&&r==1/0||(c.push(Zc(e,t,(function(){return $c(e,t,i,r)}),null)),e.o&&c.push(Zc(e,l.W,(function(){return $c(e,l.W,i,r)}),null))),c.length?d.g(Promise.all(c),0):d.u(0))}))}function Xc(e,t,n){var i,r;return E((function(a){return 1==a.h?t==(i=ct).Na||!e.M||(r=Bc(e,t))&&Math.abs(r-n)<.
215?a.return():(Zc(e,t,(function(){return Yc(e,t)}),null),e.o&&Zc(e,i.W,(function(){return Yc(e,i.W)}),null),a.g(Zc(e,t,(function(){return Jc(e,t,n)}),null),2)):e.o?a.g(Zc(e,i.W,(function(){return Jc(e,i.W,n)}),null),0):a.u(0)}))}function Wc(e){E((function(t){return od(e)&&e.Ra&&e.i.duration===1/0?(e.Ra=!1,t.g(ed(e,(function(){od(e)&&e.i.duration===1/0&&e.i.clearLiveSeekableRange()})),0)):t.return()}))}function zc(e,t,n,i,r,a){a=void 0!==a&&a,e.H&&ft(e.H,n,i,r),i=void 0!==(i=a)&&i,i=new Lo("bufferappending",i=(new Map).set("data",n).set("contentType",t).set("isInitData",i)),e.F.onEvent(i),e.l.get(t).appendBuffer(n)}function qc(e,t,n,i){if(i<=n)Qc(e,t);else{if(e.H){var r=e.H;"video"===t&&r.g&&r.g.flushBuffer(n,i)}e.l.get(t).remove(n,i)}}function Yc(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,Qc(e,t)}function Jc(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,Qc(e,t)}function $c(e,t,n,i){var r=e.l.get(t);r.appendWindowEnd===i&&r.appendWindowStart===n||(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),Qc(e,t)}function Qc(e,t){if(e.L||e.G.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),td(e,t))}function Zc(e,t,n,i){return zo(e.G),n={start:n,p:Promise.withResolvers(),uri:i},e.m.get(t).push(n),1==e.m.get(t).length&&nd(e,t),n.p.promise}function ed(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T;return E((function(x){switch(x.h){case 1:for(zo(e.G),n=[],i=Array.from(e.l.keys()),r=new Map,a=p(i),o=a.next(),s={};!o.done;s={ready:void 0},o=a.next())u=o.value,s.ready=Promise.withResolvers(),l={start:function(e){return function(){return e.ready.resolve()}}(s),p:s.ready,uri:null},(c=e.m.get(u)).push(l),n.push(s.ready.promise),r.set(u,l),1==c.length&&l.start();return x.m(2),x.g(Promise.all(n),4);case 4:x.o(3);break;case 2:if(d=x.l(),e.G.g){for(h=p(i),f=h.next();!f.done;f=h.next())g=f.value,m=e.m.get(g),r.has(g)&&K(m,r.get(g));return x.return()}throw d;case 3:return x.m(5,6),x.g(t(),6);case 6:for(x.F(),v=p(i),y=v.next();!y.done;y=v.next())b=y.value,td(e,b);x.G(0);break;case 5:throw w=x.l(),T=e.g.error?Be(e.g.error):"No error in the media element",new _e(2,3,3015,w,T,null)}}))}function td(e,t){e.m.get(t).shift(),nd(e,t)}function nd(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(r){if("QuotaExceededError"==r.name)n.p.reject(new _e(2,3,3017,t));else if(Pc(e)){var i=e.g.error?Be(e.g.error):"No error in the media element";n.p.reject(new _e(2,3,3015,r,i,n.uri))}else n.p.reject(new _e(2,3,3024,t));td(e,t)}}function id(e,t){return ed(e,(function(){return function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T;return E((function(x){if(1==x.h){if(e.L||e.$)return x.return();for(n=ct,e.L=!0,e.o=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.Ia=!0),e.Za&&(e.g.autoplay=!1),x.J(2),e.B.Pa(),a=p(e.j.values()),o=a.next();!o.done;o=a.next())o.value.destroy();for(s=p(e.l.values()),u=s.next();!u.done;u=s.next()){l=u.value;try{e.i.removeSourceBuffer(l)}catch(e){}}return e.j.clear(),e.l.clear(),c=e.i.duration,e.K=Promise.withResolvers(),e.i=Lc(e,e.K),x.g(e.K.promise,4)}if(2!=x.h){for(!isNaN(c)&&c?e.i.duration=c:!isNaN(e.ua)&&e.ua&&(e.i.duration=e.ua),d=Promise.withResolvers(),h=e.i.sourceBuffers,f=t.size,g=0,m=function(){++g===f&&(d.resolve(),e.B.eb(h,"addsourcebuffer",m))},e.B.I(h,"addsourcebuffer",m),v=p(t.keys()),y=v.next();!y.done;y=v.next())b=y.value,w=t.get(b),Nc(e,b,w,w.codecs);return(T=t.get(n.W))&&T.isAudioMuxedInVideo&&(e.o=!0),e.o&&!e.m.has(n.W)&&e.m.set(n.W,[]),x.g(d.promise,2)}return x.F(),e.L=!1,zo(e.G),e.B.Ja(e.g,"loadedmetadata",(function(){e.G.g||(e.g.currentTime=i)})),e.B.Ja(e.g,"canplaythrough",(function(){e.G.g||(e.g.autoplay=r,e.Ia&&(e.Ia=!1,e.g.play()))})),x.G(0)}))}(e,t)}))}function rd(e,t,n,i){var r=!1,a=st("audio",(i||"").split(",")),o=st("video",(i||"").split(",")),s=o;"audio"==t&&(s=a),s||(s=i);var u=Pn(n,s),l=Fn(e.D.get(t)),c=e.A.forceTransmux;if(!lu(u)||!e.M&&Kn.includes(u)?c=!0:c||n==l||(c=!Z().Ce()&&Kn.includes(n)),c&&(s=Cn(e=On(n,s)))){var d=s();a&&o&&(r=!0),u=d.convertCodecs(t,e)}return!d&&"video"===t&&a&&(u=Pn(n,i)),t=_n(Hn(u)),{Qb:d,tj:r,sg:Fn(u),codec:t,mimeType:u}}function ad(e,t,n,i,r){if(t==lt)return{type:ld,se:n,Qb:null};var a=_n(Hn(e.D.get(t))),o=Fn(e.D.get(t)),s=rd(e,t,n,i),u=s.Qb,l=s.tj,c=s.sg,d=s.codec;s=s.mimeType;var h=!0;return l&&e.D.has("audio")&&(n=rd(e,"audio",n,i),i=_n(Hn(e.D.get("audio"))),h=Fn(e.D.get("audio")),h=i==n.codec&&h==n.sg,n.Qb&&n.Qb.destroy()),a===d&&o===c&&h?{type:ld,se:s,Qb:u}:(a=!0,(e.o&&!r.has("audio")||l&&u&&!e.j.has(t))&&(a=!1),t=Z(),r=e.F.ed(),a&&"smooth"===e.A.codecSwitchingStrategy&&t.cb(r)?{type:dd,se:s,Qb:u}:(u&&u.destroy(),{type:cd,se:s,Qb:null}))}function od(e){return!(!e.i||e.G.g||e.g.error||e.$||e.L||Uc(e))}(i=Dc.prototype).destroy=function(){return this.G.destroy()},i.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var r,a,o,s,u,l,c=this;return E((function(d){if(1==d.h)return r=ct,d.g(c.K.promise,2);if(3!=d.h)return jc(c)||Uc(c)?(B("Expected MediaSource to be open during init(); reopening the media source."),c.K=Promise.withResolvers(),c.i=Lc(c,c.K),d.g(c.K.promise,3)):d.u(3);for(c.M=t,c.Z=n,c.Xa=i,c.Wa=!c.M&&"HLS"==c.Z&&!c.Xa,c.Ka.clear(),c.U=null,c.sa=null,c.S=null,c.ma=null,c.ka=Promise.withResolvers(),a=p(e.ke
2ys()),o=a.next();!o.done;o=a.next())s=o.value,u=e.get(s),Nc(c,s,u,u.codecs),c.o?(c.m.set(r.W,[]),c.m.set(r.qa,[])):c.m.set(s,[]);(l=e.get(r.W))&&l.isAudioMuxedInVideo&&(c.o=!0),d.j()}))},i.configure=function(e){this.A=e,this.h&&(this.h.F=e.modifyCueCallback)},i.cc=function(){var e={total:this.L?[]:vc(this.g.buffered),audio:vc(Fc(this,"audio")),video:vc(Fc(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},i.remove=function(e,t,n,i){var r,a,o=this;return E((function(s){return 1==s.h?(e==(r=ct).qa&&o.J&&(o.J.remove(i),a=o.h.g||0,o.h.remove(a,n,!0)),e==r.Na?s.g(o.h.remove(t,n),0):n>t?s.g(Zc(o,e,(function(){return qc(o,e,t,n)}),null),5):s.u(0)):o.o?s.g(Zc(o,r.W,(function(){return qc(o,r.W,t,n)}),null),0):s.u(0)}))},i.flush=function(e){var t,n=this;return E((function(i){return 1==i.h?e==(t=ct).Na?i.return():i.g(Zc(n,e,(function(){n.g.currentTime-=.001,Qc(n,e)}),null),2):n.o?i.g(Zc(n,t.W,(function(){var e=t.W;n.g.currentTime-=.001,Qc(n,e)}),null),0):i.u(0)}))},i.endOfStream=function(e){var t=this;return E((function(n){return n.g(ed(t,(function(){jc(t)||Uc(t)||(e?t.i.endOfStream(e):t.i.endOfStream())})),0)}))},i.kc=function(e){var t=this;return E((function(n){return n.g(ed(t,(function(){if(t.A.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var n=p(t.l.keys()),i=n.next();!i.done;i=n.next()){i=i.value;var r={start:function(){},p:Promise.withResolvers(),uri:null};t.m.get(i).unshift(r)}t.i.duration=e,t.ua=e})),0)}))},i.getDuration=function(){return this.i.duration};var sd=e.URL.createObjectURL,ud="sequence",ld="none",cd="reset",dd="changeType";function hd(e){var t=this;this.g=e,this.j=!1,this.i=this.g.yf(),this.h=new ti((function(){t.g.isPaused()||t.g.Vi(.25*t.i)}))}function fd(e){e.h.stop();var t=e.j?0:e.i;if(t>=0)try{return void(e.g.yf()!=t&&e.g.oh(t))}catch(e){}e.h.Aa(.25),0!=e.g.yf()&&e.g.oh(0)}function pd(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=gd.value().get(t),n.Ja(e,t,i))}hd.prototype.release=function(){this.set(this.Lc()),this.h&&(this.h.stop(),this.h=null),this.g=null},hd.prototype.set=function(e){this.i=e,fd(this)},hd.prototype.Lc=function(){return this.g.Lc()};var gd=new Q((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function md(e,t,n,i){var r=this;this.g=e,this.m=t,this.A=n,this.l=null,this.j=function(){return null==r.l&&(r.l=i()),r.l},this.o=!1,this.h=new Y,this.i=new Td(e),pd(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){bd(r,r.j())}))}function vd(e){return e.o?e.g.currentTime:e.j()}function yd(e,t){e.g.readyState>0?xd(e.i,t):pd(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){bd(e,e.j())}))}function bd(e,t){Math.abs(e.g.currentTime-t)<.001?wd(e):(e.h.Ja(e.g,"seeking",(function(){wd(e)})),xd(e.i,t))}function wd(e){e.o=!0,e.h.I(e.g,"seeking",(function(){return e.m()})),e.A(e.g.currentTime)}function Td(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new ti((function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)}))}function xd(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Aa(.1)}function Sd(e){this.g=e,this.i=!1,this.h=null,this.j=new Y}function Ad(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Ed(e,t){return(e=e.g.seekable).length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function kd(e,t,n,i,r,a){var o=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.A=r,this.o=null,this.i=new yc(e,t.presentationTimeline,n,a),this.j=new md(e,(function(){e:{var e=o.i;e.m=!0,e.B=!1,e.i&&e.i.Aa(e.h.gapJumpTimerTime),bc(e);var t=vd(o.j);if(e=Md(o,t),!cu()&&Math.abs(e-t)>.001){t=!1;var n=Z().jh();if(n){var i=Date.now()/1e3;(!o.o||o.o<i-n)&&(o.o=i,t=!0)}else t=!0;if(t){yd(o.j,e),e=void 0;break e}}o.A(),e=void 0}return e}),(function(e){var t=o.i;t.g.seeking&&!t.m&&(t.m=!0,t.l=e),t.i&&t.i.Aa(t.h.gapJumpTimerTime),bc(t)}),(function(){return Cd(o,i)})),this.m=new ti((function(){if(0!=o.h.readyState&&!o.h.paused){var e=vd(o.j),t=o.g.Tb(),n=o.g.qb();
2n-t<3&&(t=n-3),e<t&&(e=Md(o,e),o.h.currentTime=e)}}))}function Cd(e,t){return null==t?t=e.g.na()?e.g.qb():e.g.Tb():t instanceof Date?t=t.getTime()/1e3-(e.g.j||e.g.h):t<0&&(t=e.g.qb()+t),Id(e,Rd(e,t))}function Id(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Md(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Tb(),a=e.g.qb(),o=e.g.getDuration();a-r<3&&(r=a-3);var s=e.g.fd(n),u=e.g.fd(i);return n=e.g.fd(n+i),t>=o?Id(e,t):t>a?a-e.l.safeSeekEndOffset:t<r?e.g.isLive()&&e.l.returnToEndOfLiveWindowWhenOutside?a-e.l.safeSeekEndOffset:gc(e.h.buffered,u)?u:n:t>=s||gc(e.h.buffered,t)?t:n}function Rd(e,t){var n=e.g.Tb();return t<n?n:t>(e=e.g.qb())?e:t}function Dd(){this.h=this.g=null}function Ld(e,t){var n=pi(t=ci(t),e.map((function(e){return fi(e)})));return n?e.filter((function(e){return n==fi(e)})):[]}function Nd(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}function Pd(e,t){return e.filter((function(e){return!!e.video&&(t?e.video.roles.includes(t):0==e.video.roles.length)}))}function Od(e,t){return e.filter((function(e){return!(!e.audio||!e.audio.label)&&e.audio.label.toLowerCase()==t.toLowerCase()}))}function jd(e,t){return e.filter((function(e){return!(!e.video||!e.video.label)&&e.video.label.toLowerCase()==t.toLowerCase()}))}function Ud(e,t){return e.filter((function(e){return!(e.audio&&e.audio.channelsCount&&e.audio.channelsCount>t)})).sort((function(e,t){return e.audio||t.audio?e.audio?t.audio?(t.audio.channelsCount||0)-(e.audio.channelsCount||0):1:-1:0}))}function _d(e,t){if("AUTO"==t){var n=e.some((function(e){return!(!e.video||!e.video.hdr||"HLG"!=e.video.hdr)}));t=Z().ec(n)}return e.filter((function(e){return!e.video||!e.video.hdr||e.video.hdr==t}))}function Bd(e,t){return e.filter((function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==t}))}function Fd(e,t){return e.filter((function(e){return!e.audio||e.audio.spatialAudio==t}))}function Hd(e,t){return e.filter((function(e){return!e.audio||e.audio.codecs==t}))}function Vd(e,t){return e.filter((function(e){return!e.video||e.video.codecs==t}))}function Gd(e){No.call(this),this.g=new Map,this.i=e,this.h=null}function Kd(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1);e.g.has(n)||(e.g.set(n,t),t=new Lo("regionadd",new Map([["region",t]])),e.dispatchEvent(t),function(e){e.h||(e.h=new ti((function(){for(var t=e.i(),n=p(e.g),i=n.next();!i.done;i=n.next()){var r=p(i.value);i=r.next().value,(r=r.next().value).endTime<t.start&&(e.g.delete(i),i=new Lo("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.g.size&&e.h&&(e.h.stop(),e.h=null)})).Aa(2))}(e))}function Xd(e,t,n,i,r,a){this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=i,this.B=r||function(e,t){return!(t.fastSwitching&&e.xc&&e.md)},this.A=a||function(){return 1}}function Wd(e,t){e.l=t;for(var n=(e=p(e.g.values())).next();!n.done;n=e.next())n.value.g=t}function zd(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex)return Promise.resolve();if(e.h||(e.h=e.i.segmentIndex.Gb(t,!0,e.o)),!e.h)return Promise.resolve();for(n&&e.h.next(),t=[],n=Math.abs(e.A()),n=Math.ceil(e.m*n);e.g.size<n;){var i=e.h.next().value;if(!i)break;var r=!0;if(i.isPreload()&&null!=i.endByte&&(r=!1),2==i.Ib()&&(r=!1),i.qc(!1)&&(r=!1),r&&i.aa&&t.push(qd(e,i.aa)),r&&!e.g.has(i)&&(r=new eh(e.l),t.push(th(r,i,e.i)),e.g.set(i,r)),!e.B(i,e.i))break}return $d(e),Promise.all(t)}function qd(e,t){if(!e.i.segmentIndex||t.qc()||Array.from(e.j.keys()).some((function(e){return zs(e,t)})))return Promise.resolve();var n=new eh(e.l),i=th(n,t,e.i);return e.j.set(t,n),i}function Yd(e,t){for(var n=(t=p(t.keys())).next();!n.done;n=t.next())(n=n.value)&&Zd(e,n)}function Jd(e){Yd(e,e.g),Yd(e,e.j),e.h=null}function $d(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=p(e.j.keys()),i=n.next(),r={};!i.done;r={Af:void 0},i=n.next())r.Af=i.value,t.some(function(e){return function(t){return zs(t.aa,e.Af)}}(r))||Zd(e,r.Af)}function Qd(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var i=n.pop();i&&Zd(e,i)}$d(e)}function Zd(e,t){var n=e.g;t instanceof Ws&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function eh(e){this.g=e,this.pd=this.$f=null}function th(e,t,n){var i=new Uint8Array(0);return e.pd=e.g(t,n,(function(t){return E((function(n){if(1==n.h)return i=i.byteLength>0?tt(i,t):t,e.$f?n.g(e.$f(i),3):n.u(0);i=new Uint8Array(0),n.j()}))})),e.pd.promise.catch((function(e){return e instanceof _e&&7001==e.code?Promise.resolve():Promise.reject(e)}))}function nh(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.S=new Map,this.B=1,this.C=this.o=null,this.$=0,this.h=new Map,this.J=!1,this.ea=null,this.D=!1,this.l=new Wo((function(){return function(e){var t,n,i,r,a,o,s,u,l,c;return E((function(d){if(1==d.h){for(null==(t=e.A)||t.stop(),e.A=null,null==(n=e.M)||n.release(),e.M=null,null==(i=e.L)||i.stop(),e.L=null,null==(r=e.K)||r.release(),e.K=null,a=[],o=p(e.h.values()),s=o.next();!s.done;s=o.next())xh(u=s.value),a.push(Sh(u)),u.Y&&(Jd(u.Y),u.Y=null);for(l=p(e.m.values()),c=l.next();!c.done;c=l.next())Jd(c.value);return d.g(Promise.all(a),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.G=null,d.j()}))}(n)})),this.U=Date.now()/1e3,this.m=new Map,this.Z={projection:null,hfov:null},this.ma=0,this.ka=1/0,this.F=null,this.O=[],this.M=new Y,this.A=new ti((function(){if(n.j&&n.g)if(n.j.presentationTimeline.na()){var e=n.j.presentationTimeline.Tb(),t=n.j.presentationTimeline.qb();t-e>1?function(e,t,n){E((function(i){return od(e)&&e.i.duration===1/0?(e.Ra=!0,i.g(ed(e,(function(){od(e)&&e.i.duration===1/0&&e.i.setLiveSeekableRange(t,n)})),0)):i.return()}))}(n.g.R,e,t):Wc(n.g.R)}else Wc(n.g.R),n.A&&n.A.stop();else n.A&&n.A.stop()})),this.G=null,this.H=!1,this.L=new ti((function(){var e=n.g.video;!e.ended&&n.G&&(n.H=!0,e.currentTime=n.G,n.G=null)})),this.K=new Y}function ih(e,t){for(var n=e.g.pb()<0,i=p(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).ia&&r.ia.Yc(n),r.Y&&r.Y.Yc(n);
2for(r=(i=p(e.m.values())).next();!r.done;r=i.next())r.value.Yc(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.jc&&(oh(e,t,!1,0,!1),n.jc=i):(t=n.jc)&&(n.jc=null,oh(e,t,!0,0,!1)))}function rh(e,t,n,i,r,a){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,a=void 0!==a&&a,e.o=t,e.J&&(t.video&&oh(e,t.video,n,i,r,a),t.audio&&oh(e,t.audio,n,i,r,a))}function ah(e,t){E((function(n){if(1==n.h)return e.F=null,e.C=t,e.J?t.segmentIndex?n.u(2):n.g(t.createSegmentIndex(),2):n.return();oh(e,t,!0,0,!1),n.j()}))}function oh(e,t,n,i,r,a){var o=e.h.get(t.type);o||t.type!=lt?o&&(o.jc&&(t.trickModeVideo?(o.jc=t,t=t.trickModeVideo):o.jc=null),o.stream!=t||r)&&(e.m.has(t)?o.Y=e.m.get(t):o.Y&&function(e,t){t&&t!==e.i&&(Jd(e),e.i=t)}(o.Y,t),t.type==lt&&o.stream!=t&&(r=Pn(t.mimeType,t.codecs),Oc(e.g.R,r,t.external)),e.m.has(o.stream)||o.stream.closeSegmentIndex&&(o.za?e.S.getOrInsert("("+o.type+":"+o.stream.id+")",o.stream.closeSegmentIndex):o.stream.closeSegmentIndex()),r=o.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,o.stream=t,o.ia=null,o.Qe=!!a,t.dependencyStream?o.bc=lh(e,t.dependencyStream):o.bc=null,Ih(e),r&&(o.$a=null,o.Vb=null,o.Ub=null,t.isAudioMuxedInVideo&&(t=null,"video"===o.type?t=e.h.get("audio"):"audio"===o.type&&(t=e.h.get("video")),t&&(Sh(t).catch((function(){})),t.$a=null,t.Vb=null,t.Ub=null,uh(e,t),sh(e,t).catch((function(t){e.g&&e.g.onError(t)}))))),n?o.Eb?o.$c=!0:o.za?(o.Bb=!0,o.Hc=i,o.$c=!0):(xh(o),wh(e,o,!0,i).catch((function(t){e.g&&e.g.onError(t)}))):o.za||o.fb||Th(e,o,0),sh(e,o).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,i,r,a,o;E((function(s){switch(s.h){case 1:return n=ct,e.$++,i=e.$,s.m(2),s.g(Gc(e.g.R,n.Na),4);case 4:s.o(3);break;case 2:r=s.l(),e.g&&e.g.onError(r);case 3:a=Pn(t.mimeType,t.codecs),Oc(e.g.R,a,t.external),e.g.R.ea.isTextVisible()&&e.$==i&&(o=lh(e,t),e.h.set(n.Na,o),Th(e,o,0)),s.j()}}))}(e,t)}function sh(e,t){var n,i,r;return E((function(a){if(1==a.h)return t.La?(n=t.stream,i=t.La,n.segmentIndex?a.u(2):a.g(n.createSegmentIndex(),2)):a.return();if(4!=a.h)return!(r=n.dependencyStream)||r.segmentIndex?a.u(4):a.g(r.createSegmentIndex(),4);if(t.La!=i||t.stream!=n)return a.return();var o=e.g.Hb(),s=Bc(e.g.R,t.type),u=t.stream.segmentIndex.find(t.xa?t.xa.endTime:o),l=null==u?null:t.stream.segmentIndex.get(u);u=l?Ys(l):null,l&&!u&&(u=(l.endTime-l.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),u?((l=l.aa)&&(u+=(l.endByte?l.endByte+1-l.startByte:null)||0),o=8*u/(l=e.g.getBandwidthEstimate())<(s||0)-o-e.i.rebufferingGoal||t.La.h.g>u):o=!0,o&&t.La.abort(),a.j()}))}function uh(e,t){t.Eb||t.Bb||(t.za?(t.Bb=!0,t.Hc=0):null==_c(e.g.R,t.type)?null==t.fb&&Th(e,t,0):(xh(t),wh(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function lh(e,t){var n={stream:t,type:t.type,ia:null,Y:ch(e,t),xa:null,$a:null,oe:null,Vb:null,Ub:null,le:null,me:null,jc:null,endOfStream:!1,za:!1,fb:null,Bb:!1,Hc:0,$c:!1,Eb:!1,Ac:!0,Qe:!1,Pf:!1,Oc:!1,La:null,bc:null};return t.dependencyStream&&(n.bc=lh(e,t.dependencyStream)),n}function ch(e,t){if("MSF"==e.j.type||"video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===lt&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===lt&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.Y)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new Xd(e.i.segmentPrefetchLimit,t,(function(t,n,i){return bh(t,n,i||null,e.i.retryParameters,e.g.wc)}),e.g.pb()<0,e.g.sj,e.g.pb):null}function dh(t,n){var i,r,a,o,s,u,l,c,d,h,f,g;return E((function(m){switch(m.h){case 1:if(zo(t.l),i=ct,n.za||null==n.fb||n.Eb)return m.return();if(n.fb=null,!n.Bb){m.u(2);break}return m.g(wh(t,n,n.$c,n.Hc),3);case 3:return m.return();case 2:if(function(e,t){for(var n=p(e.S.entries()),i=n.next();!i.done;i=n.next()){var r=p(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.S.delete(i))}}(t,n),n.stream.segmentIndex){m.u(4);break}return r=n.stream,a=n.stream.codecs,o=n.stream.mimeType,m.m(5),m.g(n.stream.createSegmentIndex(),7);case 7:m.o(6);break;case 5:return s=m.l(),m.g(Ah(t,n,s),8);case 8:return m.return();case 6:if(n.type!==i.Na||a==n.stream.codecs&&o==n.stream.mimeType||(u=Pn(n.stream.mimeType,n.stream.codecs),Oc(t.g.R,u,n.stream.external)),r!=n.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),n.za||n.fb||Th(t,n,0),m.return();case 4:if(!n.bc){m.u(9);break}if(n.bc.stream.segmentIndex){m.u(9);break}return m.m(11),m.g(n.bc.stream.createSegmentIndex(),13);case 13:m.o(9);break;case 11:m.l();case 9:m.m(14),l=function(t,n){if(vh(n))return function(e,t){var n=Bc(e,"video")||0;$n(e.h,t,n)}(t.g.R,n.stream.originalId||""),null;if(n.type==lt&&function(e){e.h&&$n(e.h,"",0)}(t.g.R),n.stream.isAudioMuxedInVideo&&"audio"==n.type)return null;if(n.type!=lt&&Uc(t.g.R))return kh(t,!0),null;var i=t.i.updateIntervalSeconds/Math.max(1,Math.abs(t.g.pb()));if(!Pc(t.g.R)&&n.type!=lt)return i/2;var r=t.g.Hb();if("audio"===n.type)for(var a=p(t.m.keys()),o=a.next();!o.done;o=a.next())(o=t.m.get(o.value)).xb(r,!0),zd(o,r);a=n.xa?n.xa.endTime:r;var s=function(e,t,n){return t==lt?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):mc(e=Fc(e,t),n)}(t.g.R,n.type,r);o=Math.max(1,Math.max(t.i.rebufferingGoal,t.i.bufferingGoal)*t.B);var u=t.j.presentationTimeline.na()?1/0:t.j.presentationTimeline.getDuration()-a,l=Bc(t.g.R,n.type);if(u<1e-6&&l)return n.endOfStream=!0,"video"==n.type&&((i=t.h.get(lt))&&vh(i)&&(i.endOfStream=!0),(i=t.h.get("audio"))&&i.stream.isAudioMuxedInVideo&&(i.endOfStream=!0)),null;if(n.endOfStream=!1,s>0&&t.i.stopFetchingOnPause&&t.g.video.paused||s>=o)return i/2;if(s=!n.ia,!(l=hh(t,n,r,l)))return!t.j.presentationTimeline.na()&&u<1e-6?(n.endOfStream=!0,"video"==n.type&&(i=t.h.get(lt))&&vh(i)&&(i.endOfStream=!0),null):(t=1/0,
2(n=n.xa)&&(t=n.endTime-n.startTime),Math.min(t/2,i));u=n.$a;var c=l.aa;u&&c&&zs(c,u)&&(u.g=c.g),u=!1,s&&n.Qe&&(u=!0,n.Qe=!1),s=1/0;for(var d=(c=p(t.h.values())).next();!d.done;d=c.next())vh(d=d.value)||d.stream.isAudioMuxedInVideo||d.ia&&!d.ia.current()||(s=Math.min(s,d.xa?d.xa.endTime:r));return a>=s+t.j.presentationTimeline.i?i:(n.Y&&n.ia&&!t.m.has(n.stream)&&(n.Y.xb(l.startTime+.001),zd(n.Y,l.startTime).catch((function(){}))),Ch(t)&&function(e,t,n){if(t.type===lt)return!1;var i=t.$a;if(!i)return!1;var r=n.aa;if(n=i.g!==r.g,"reset_to_encrypted"===e.i.crossBoundaryStrategy&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.i.crossBoundaryStrategy&&i.encrypted==r.encrypted&&(n=!1),"keep"===e.i.crossBoundaryStrategy&&i.mimeType&&r.mimeType){var a=_n(Hn(i.mimeType)),o=_n(Hn(r.mimeType));i.mimeType==r.mimeType&&a==o&&(n=!1)}return(e.h.get("video")||e.h.get("audio"))===t&&n&&(e.H||t.Ac)&&(e.H=!1,kh(e,!0).then((function(){var t=(new Map).set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new Lo("boundarycrossed",t))}))),n}(t,n,l)||(function(t,n,i,r,a){var o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S;return E((function(A){switch(A.h){case 1:if(o=ct,s=n.stream,u=n.ia,n.za=!0,A.m(2),2==r.Ib())throw new _e(1,1,1011);return A.g(function(e,t,n,i){var r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T;return E((function(x){switch(x.h){case 1:if(r=ct,a=null==t.xa,o=[],s=Math.max(0,Math.max(n.F,e.ma)-.1),u=Math.min(n.D,e.ka)+.1,e.i.clampAppendWindowToDuration&&(l=e.j.presentationTimeline.getDuration())<1/0&&(u=Math.min(u,l)),c=n.codecs||t.stream.codecs,d=Bn(c),h=Fn(n.mimeType||t.stream.mimeType),(f=n.m)==t.oe&&s==t.Vb&&u==t.Ub&&d==t.le&&h==t.me){x.u(2);break}if(g=t.le&&t.me&&function(e,t,n,i,r){return(e=ad(e,t,n,i,r)).Qb&&e.Qb.destroy(),e.type==cd}(e.g.R,t.type,h,c,Rh(e)),!g){x.u(3);break}if(m=null,t.type===r.qa?m=e.h.get(r.W):t.type===r.W&&(m=e.h.get(r.qa)),!m){x.u(3);break}return x.g(Sh(m).catch((function(){})),5);case 5:m.$a=null,m.Vb=null,m.Ub=null,uh(e,m);case 3:return x.g(ph(e,t,f,s,u,n,d,h),2);case 2:return zs(n.aa,t.$a)||(t.$a=n.aa,n.j&&n.aa&&(v=yh(e,t,n.aa),y=function(){var a,o,s,u,l,c,d,h,f,g,m;return E((function(y){switch(y.h){case 1:return y.m(2),y.g(v,4);case 4:return a=y.i,zo(e.l),o=null,s=new Map,u={projection:null,hfov:null},t.stream&&(l=t.stream.videoLayout)&&((c=l.split("/")).includes("PROJ-RECT")?u.projection="rect":c.includes("PROJ-EQUI")?u.projection="equi":c.includes("PROJ-HEQU")?u.projection="hequ":c.includes("PROJ-PRIM")?u.projection="prim":c.includes("PROJ-AIV")&&(u.projection="hequ")),(d=new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).N("mdhd",(function(e){o=na(e.reader,e.version).timescale})).N("hdlr",(function(e){switch((e=e.reader).skip(4),e=e.ab(4,!1),String.fromCharCode(e[0],e[1],e[2],e[3])){case"soun":s.set(r.W,o);break;case"vide":s.set(r.qa,o)}o=null})),t.type!==r.qa||u.projection||d.box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("encv",Wr).box("avc1",Wr).box("avc3",Wr).box("hev1",Wr).box("hvc1",Wr).box("dvav",Wr).box("dva1",Wr).box("dvh1",Wr).box("dvhe",Wr).box("dvc1",Wr).box("dvi1",Wr).box("vexu",Kr).box("proj",Kr).N("prji",(function(e){e=e.reader.Wc(),u.projection=e})).box("hfov",(function(e){e=e.reader.T()/1e3,u.hfov=e})),d.parse(a,!0,!0),t.type===r.qa&&function(e,t){if(e.Z.projection!=t.projection||e.Z.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new Lo("spatialvideoinfo",n)}else n=new Lo("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.Z=t}}(e,u),s.has(t.type)?n.aa.timescale=s.get(t.type):null!=o&&(n.aa.timescale=o),(h=t.stream.segmentIndex)instanceof uu&&(f=function(e,t){for(var n=(e=p(e.i)).next();!n.done&&null==n.value.find(t);n=e.next());return-1}(h,n.startTime)),g=t.stream.closedCaptions&&t.stream.closedCaptions.size>0,y.g(e.g.ug(t.type,a),5);case 5:return y.g(Vc(e.g.R,t.type,a,null,t.stream,g,t.Ac,i,!1,!1,f),6);case 6:y.o(0);break;case 2:throw m=y.l(),t.$a=null,m}}))},b=n.startTime,a&&null!=(w=Bc(e.g.R,t.type))&&(b=w),e.g.$i(b,n.aa),o.push(y()))),T=t.xa?t.xa.i:-1,n.i!=T&&o.push(Xc(e.g.R,t.type,n.startTime)),x.g(Promise.all(o),0)}}))}(t,n,r,a),4);case 4:return zo(t.l),t.D?A.return():(l="video/mp4"==s.mimeType||"audio/mp4"==s.mimeType,c=e.ReadableStream,t.i.lowLatencyMode&&t.j.isLowLatency&&c&&l&&("HLS"!=t.j.type||r.A)?(f=new Uint8Array(0),m=g=!1,y=function(e){var o,u,l;return E((function(c){switch(c.h){case 1:if(g)return c.return();if(m=!0,zo(t.l),t.D)return c.return();if(c.m(2),f=tt(f,e),o=!1,u=0,(new Gr).box("mdat",(function(e){u=e.size+e.start,o=!0})).parse(f,!1,!0),!o){c.u(4);break}
2return l=f.subarray(0,u),f=f.subarray(u),c.g(gh(t,n,i,s,r,l,!0,a),5);case 5:n.Y&&n.ia&&zd(n.Y,r.startTime,!0);case 4:c.o(0);break;case 2:v=c.l(),c.j()}}))},A.g(yh(t,n,r,y),9)):(d=yh(t,n,r),A.g(d,7)));case 7:return h=A.i,zo(t.l),t.D?A.return():(zo(t.l),n.Bb?(n.za=!1,Th(t,n,0),A.return()):A.g(gh(t,n,i,s,r,h,!1,a),6));case 9:if(b=A.i,v)throw v;if(m){A.u(10);break}return g=!0,zo(t.l),t.D?A.return():n.Bb?(n.za=!1,Th(t,n,0),A.return()):A.g(gh(t,n,i,s,r,b,!1,a),10);case 10:n.Y&&n.ia&&zd(n.Y,r.startTime,!0);case 6:if(zo(t.l),t.D)return A.return();n.xa=r,u.next(),n.za=!1,n.Pf=!1,w=t.g.R.cc(),T=w[n.type],JSON.stringify(T),n.Bb||(x=null,n.type===o.qa?x=t.h.get(o.W):n.type===o.W&&(x=t.h.get(o.qa)),x&&x.type==o.W?t.g.Sc(r,n.stream,x.stream.isAudioMuxedInVideo,!1):t.g.Sc(r,n.stream,n.stream.codecs.includes(","),!1)),xh(n),Th(t,n,0),A.o(0);break;case 2:if(S=A.l(),zo(t.l,S),t.D)return A.return();if(n.za=!1,7001==S.code)n.za=!1,xh(n),Th(t,n,0),A.u(0);else{if(n.type!=o.Na||!t.i.ignoreTextStreamFailures)return 3017==S.code?A.g(function(e,t,n){var i,r,a,o,s,u,l,c,d;return E((function(h){switch(h.h){case 1:for(i=!1,r=p(e.h.values()),a=r.next();!a.done;a=r.next())if((o=a.value)!=t&&o.Pf){i=!0;break}if(i){h.u(2);break}if(e.i.avoidEvictionOnQuotaExceededError)return s=Eh(e,n),e.g.disableStream(t.stream,s)||Th(e,t,4),h.return();if((u=Math.round(100*e.B))>20){e.B-=.2,h.u(3);break}if(u>4){e.B-=.04,h.u(3);break}if(l=Eh(e,n),!e.g.disableStream(t.stream,l)){t.Oc=!0,e.D=!0,e.g.onError(n),h.u(5);break}return e.B=1,c=e.g.Hb(),h.g(mh(e,t,c),5);case 5:return h.return();case 3:return t.Pf=!0,d=e.g.Hb(),h.g(mh(e,t,d),2);case 2:Th(e,t,4),h.j()}}))}(t,n,S),0):(n.Oc=!0,1==S.category&&n.Y&&Zd(n.Y,r),S.severity=2,A.g(Ah(t,n,S),0));t.h.delete(o.Na),A.u(0)}}}))}(t,n,r,l,u).catch((function(){})),n.bc&&fh(t,n.bc,r,o)),null)}(t,n),null!=l&&(Th(t,n,l),n.Oc=!1),m.o(15);break;case 14:return c=m.l(),m.g(Ah(t,n,c),16);case 16:return m.return();case 15:if(n.type===i.Na)return m.return();if(d=[],n.stream&&!n.stream.isAudioMuxedInVideo&&d.push(n),h=n.type===i.W?i.qa:i.W,(f=t.h.get(h))&&f.stream&&!f.stream.isAudioMuxedInVideo&&d.push(f),!t.J||!d.every((function(e){return e.endOfStream}))){m.u(0);break}return m.g(t.g.R.endOfStream(),18);case 18:zo(t.l),0!=(g=t.g.R.getDuration())&&g<t.j.presentationTimeline.getDuration()&&t.j.presentationTimeline.kc(g),m.j()}}))}function hh(e,t,n,i){if(t.ia){var r=t.ia.current();return r&&t.xa&&(n=t.xa.endTime,Rc(t.xa.startTime,r.startTime,.002)&&Rc(n,r.endTime,.002)&&(r=t.ia.next().value)),r}if(t.xa||i)return r=t.xa?t.xa.endTime:i,n=e.g.pb()<0,t.stream.segmentIndex&&(t.ia=t.stream.segmentIndex.Gb(r,!1,n)),t.ia&&t.ia.next().value;i=e.j.sequenceMode||Ch(e)||"MSF"===e.j.type?0:e.i.inaccurateManifestTolerance;var a=Math.max(n-i,0),o=e.g.R.getDuration();for(Math.abs(a-o)<1&&(i=1,a=Math.max(n-i,0)),o=e.g.pb()<0,e=null,i&&(t.stream.segmentIndex&&(t.ia=t.stream.segmentIndex.Gb(a,!1,o)),e=t.ia&&t.ia.next().value),e||(t.stream.segmentIndex&&(t.ia=t.stream.segmentIndex.Gb(n,!1,o)),e=t.ia&&t.ia.next().value);2===(null==(r=e)?void 0:r.Ib());)i=n=void 0,e=null!=(i=null==(n=t.ia)?void 0:n.next().value)?i:null;return e}function fh(e,t,n,i){var r,a,o,s,u,l,c,d,h,f,p,m;return E((function(v){switch(v.h){case 1:for(r=ct,a=t.stream,u=(s=(o=a.segmentIndex)&&o.Gb(n))&&s.next().value;u&&e.O.includes(u.startTime);)u=s&&s.next().value;if(!u){v.u(0);break}if(!(l=u.aa)||zs(l,t.$a)){v.u(3);break}return t.$a=l,v.m(4),v.g(yh(e,t,l),6);case 6:if(c=v.i,!e.g)return v.return();var y=e.g.R;y.H&&ft(y.H,c,0,a),e.O=[],v.o(3);break;case 4:throw d=v.l(),t.$a=null,d;case 3:if(t.xa&&t.xa==u){v.u(0);break}return t.xa=u,v.m(8),v.g(yh(e,t,u),10);case 10:if(h=v.i,!e.g)return v.return();(y=e.g.R).H&&ft(y.H,h,0,a),e.O.push(u.startTime),v.o(9);break;case 8:throw f=v.l(),t.xa=null,f;case 9:if(!e.g)return v.return();if(t.Bb||(p=null,t.type===r.qa?p=e.h.get(r.W):t.type===r.W&&(p=e.h.get(r.qa)),p&&p.type==r.W?e.g.Sc(u,t.stream,p.stream.isAudioMuxedInVideo,!0):e.g.Sc(u,t.stream,t.stream.codecs.includes(","),!0)),m=Math.max.apply(Math,[0].concat(g(e.O))),e.g.Hb()+i>m)return v.g(fh(e,t,u.startTime,i),0);v.u(0)}}))}function ph(e,t,n,i,r,a,o,s){var u,l,c,d,h;return E((function(f){switch(f.h){case 1:if(u=ct,l=Rh(e),f.m(2),t.Vb=i,t.Ub=r,o&&(t.le=o),s&&(t.me=s),t.oe=n,c=e.j.sequenceMode||"HLS"==e.j.type,d=null,t.type===u.qa?d=e.h.get(u.W):t.type===u.W&&(d=e.h.get(u.qa)),!(d&&d.stream&&d.stream.isAudioMuxedInVideo)){f.u(4);break}return f.g(Kc(e.g.R,d.type,n,i,r,c,d.stream.mimeType,d.stream.codecs,l),4);case 4:return f.g(Kc(e.g.R,t.type,n,i,r,c,a.mimeType||t.stream.mimeType,a.
2codecs||t.stream.codecs,l),6);case 6:f.o(0);break;case 2:throw h=f.l(),t.Vb=null,t.Ub=null,t.le=null,t.me=null,t.oe=null,h}}))}function gh(e,t,n,i,r,a,o,s){var u,l,c,d;return o=void 0!==o&&o,s=void 0!==s&&s,E((function(h){switch(h.h){case 1:return u=i.closedCaptions&&i.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(l="video/mp4"==i.mimeType||"audio/mp4"==i.mimeType,c=null,r.aa&&(c=r.aa.timescale),l&&c&&"video"===i.type&&"DASH"==e.j.type&&(new Gr).box("moof",Kr).box("traf",Kr).N("tfdt",(function(n){var i,a,o,s,u;return E((function(l){return i=ta(n.reader,n.version),(a=i.ya)?(o=-a/c,(Number(t.oe)||0)<o?(s=t.Vb,u=t.Ub,l.g(ph(e,t,o,s,u,r),0)):l.u(0)):l.return()}))})).parse(a,!1,o)),h.g(mh(e,t,n),2);case 2:return zo(e.l),d=t.Ac,t.Ac=!1,h.g(e.g.ug(t.type,a),3);case 3:return h.g(Vc(e.g.R,t.type,a,r,i,u,d,s,o),4);case 4:zo(e.l),h.j()}}))}function mh(e,t,n){var i,r,a,o,s,u,l,c,d;return E((function(h){return 1==h.h?(e.F==t&&(e.F=null),(i=t.stream.segmentIndex)instanceof uu&&(i.xb(e.j.presentationTimeline.hd()),r=[],function(e,t){for(var n=(e=p(e.i)).next();!n.done;n=e.next())n.value,r.push(-1)}(i)),a=Math.max(e.i.bufferBehind*e.B,e.j.presentationTimeline.i),null==(o=_c(e.g.R,t.type))?h.return():(s=n-o,u=e.i.evictionGoal,l=e.j.presentationTimeline.Tb(),c=e.j.presentationTimeline.qb(),d=s-a,c-l>u&&(d=Math.max(s-a,l-u-o)),d<=u?h.return():h.g(e.g.R.remove(t.type,o,o+d,r),2))):4!=h.h?(zo(e.l),e.F?h.g(mh(e,e.F,n),4):h.u(0)):(zo(e.l),void h.j())}))}function vh(e){return e&&e.type==lt&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function yh(e,t,n,i){var r,a,o,s,u;return E((function(l){switch(l.h){case 1:if(r=n.qc())return l.return(r);if(a=null,t.Y){var c=t.Y,d=c.g;n instanceof Ws&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.$f=i),a=c.pd):a=null}return a||(a=bh(n,t.stream,i||null,e.i.retryParameters,e.g.wc)),o=0,t.ia&&(o=t.ia.h),t.La=a,l.g(a.promise,2);case 2:if(s=l.i,t.La=null,u=s.data,!n.aesKey){l.u(3);break}return l.g(pu(u,n.aesKey,o),4);case 4:u=l.i;case 3:return l.return(u)}}))}function bh(e,t,n,i,r,a){a=void 0!==a&&a;var o=e instanceof qs?e:void 0,s=o?1:0;return(e=wu(e.P(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(Go,e,{type:s,stream:t,segment:o,isPreload:a})}function wh(e,t,n,i){var r,a;return E((function(o){return 1==o.h?(t.Bb=!1,t.$c=!1,t.Hc=0,t.Eb=!0,t.xa=null,t.ia=null,t.Y&&!e.m.has(t.stream)&&Jd(t.Y),i?(r=e.g.Hb(),a=e.g.R.getDuration(),o.g(e.g.R.remove(t.type,r+i,a),3)):o.g(Gc(e.g.R,t.type),4)):3!=o.h?(zo(e.l),n?o.g(e.g.R.flush(t.type),3):o.u(3)):(zo(e.l),t.Eb=!1,t.endOfStream=!1,t.za||t.fb||Th(e,t,0),void o.j())}))}function Th(e,t,n){var i=t.type;(i!=lt||e.h.has(i))&&(t.fb=new ti((function(){var n;return E((function(i){return 1==i.h?(i.m(2),i.g(dh(e,t),4)):2!=i.h?i.o(0):(n=i.l(),e.g&&e.g.onError(n),void i.j())}))})).ba(n))}function xh(e){null!=e.fb&&(e.fb.stop(),e.fb=null)}function Sh(e){return E((function(t){return e.La?t.g(e.La.abort(),0):t.u(0)}))}function Ah(e,t,n){var i,r,a,o,s;return E((function(u){switch(u.h){case 1:return 3024==n.code?(t.za=!1,xh(t),Th(e,t,0),u.return()):u.g(e.ea.attempt(),2);case 2:if(zo(e.l),3015==n.code||3014==n.code||1===n.category&&1003!=n.code){if(t.jc)return ih(e,!1),u.return();i=Eh(e,n),n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}if(n.handled||1011!=n.code){u.u(3);break}for(r=e.g.Hb(),a=Bc(e.g.R,t.type),o=hh(e,t,r,a);2===(null==(s=o)?void 0:s.Ib());)t.xa=o,o=hh(e,t,r,a);if(!o){u.u(3);break}return u.g(Xc(e.g.R,t.type,o.startTime),5);case 5:return t.za=!1,t.Oc=!1,xh(t),Th(e,t,0),u.return();case 3:n.handled&&1011==n.code||e.g.onError(n),n.handled||e.i.failureCallback(n),u.j()}}))}function Eh(e,t){return 0===e.i.maxDisabledTime&&1011==t.code?1:3014==t.code||3015==t.code?1/0:e.i.maxDisabledTime}function kh(e,t){var n,i,r,a,o,s;return t=void 0!==t&&t,E((function(u){return 1==u.h?(n=Date.now()/1e3,i=e.i.minTimeBetweenRecoveries,t||e.i.allowMediaSourceRecoveries&&!(n-e.U<i)?(e.U=n,r=ct,(a=e.h.get(r.W))&&(xh(a),a.La&&(a.La.abort(),a.La=null),a.$a=null,a.Vb=null,a.Ub=null,a.za=!1,a.Bb=!1,a.Hc=0,a.$c=!1,a.Eb=!1,a.ia&&a.ia.Tf()),(o=e.h.get(r.qa))&&(xh(o),o.La&&(o.La.abort(),o.La=null),o.$a=null,o.Vb=null,o.Ub=null,o.za=!1,o.Bb=!1,o.Hc=0,o.$c=!1,o.Eb=!1,o.ia&&o.ia.Tf()),s=e.g.video.paused,u.g(id(e.g.R,Rh(e)),2)):u.return(!1)):(!o||o.Eb||o.za||o.fb||Th(e,o,0),!a||a.Eb||a.za||a.fb||Th(e,a,0),s||e.g.video.play(),u.return(!0))}))}function Ch(e){if("keep"!==e.i.crossBoundaryStrategy)return!0;var t=Z(),n=e.g.ed();
2if(t.cb(n)){if(!t.Ce())for(n=(t=p(e.h.keys())).next();!n.done;n=t.next())if((n=e.h.get(n.value)).type!==ct.Na&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1){for(e=new Set,n=(t=p(n.fullMimeTypes)).next();!n.done;n=t.next())e.add(Un(n.value));return e.size>1}}else for(n=(t=p(e.h.keys())).next();!n.done;n=t.next())if((n=e.h.get(n.value)).type!==ct.Na&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1)return!0;return!1}function Ih(e){e.K.Pa(),Ch(e)&&e.K.Jb(e.g.video,["waiting","timeupdate"],(function(){Mh(e)}))}function Mh(e){if(Ch(e)){e.L.stop();var t=e.g.Hb(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.$a)&&null!==n.g&&((t=n.g-t)<0||t>1||(e.G=n.g+.1,e.L.ba(t)))}}function Rh(e,t){function n(t){if(t.fullMimeTypes&&t.fullMimeTypes.size>1&&e.h.has(t.type)){var n=e.h.get(t.type),i=Bc(e.g.R,n.type),r=e.g.Hb();(n=hh(e,n,r,i))&&n.codecs&&n.mimeType&&(t.codecs=n.codecs,t.mimeType=n.mimeType)}}t=void 0!==t&&t;var i=new Map,r=e.o.audio;return r&&(n(r),i.set("audio",r)),(r=e.o.video)&&(n(r),i.set("video",r)),t&&e.C&&i.set(lt,e.C),i}function Dh(){}function Lh(e,t,n,i,r){for(var a=(r in i),o=new Set(["__proto__","constructor","prototype"]),s=a?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=a||s,l=!0,c=p(Object.keys(t)),d=c.next();!d.done;d=c.next()){var h=r+"."+(d=d.value),f=a?i[r]:n[d];o.has(d)?(B("Invalid config, dangerous key "+h),l=!1):u||d in n?void 0===t[d]?void 0===f||u?delete e[d]:e[d]=Bt(f):s?e[d]=t[d]:f.constructor==Object&&t[d]&&t[d].constructor==Object?(e[d]||(e[d]=Bt(f)),d=Lh(e[d],t[d],f,i,h),l=l&&d):typeof t[d]!=typeof f||null==t[d]||"function"!=typeof t[d]&&t[d].constructor!=f.constructor?(B("Invalid config, wrong type for "+h),l=!1):"function"==typeof n[d]&&n[d].length!=t[d].length?(F("Unexpected number of arguments for "+h),e[d]=t[d]):e[d]=Array.isArray(e[d])?t[d].slice():t[d]:(B("Invalid config, unrecognized key "+h),l=!1)}return l}function Nh(e,t){for(var n={},i=n,r=0,a=0;!((r=e.indexOf(".",r))<0);)0!=r&&"\\"==e[r-1]||(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function Ph(e,t){return e&&t}function Oh(e,t){function n(e){return e&&"object"==typeof e&&!Array.isArray(e)}return e=function e(t,i){return Object.keys(t).reduce((function(r,a){var o=t[a];return i.hasOwnProperty(a)?o instanceof HTMLElement&&i[a]instanceof HTMLElement?o.isEqualNode(i[a])||(r[a]=o):n(o)&&n(i[a])?(o=e(o,i[a]),(Object.keys(o).length>0||!n(o))&&(r[a]=o)):Array.isArray(o)&&Array.isArray(i[a])?z(o,i[a])||(r[a]=o):Number.isNaN(o)&&Number.isNaN(i[a])||o!==i[a]&&(r[a]=o):r[a]=o,r}),{})}(e,t),function e(t){for(var i=p(Object.keys(t)),r=i.next();!r.done;r=i.next())t[r=r.value]instanceof HTMLElement||(n(t[r])&&0===Object.keys(t[r]).length||"function"==typeof t[r]?delete t[r]:n(t[r])&&(e(t[r]),0===Object.keys(t[r]).length&&delete t[r]))}(e),e}function jh(){}function Uh(){var t=1/0,n=Z();navigator.connection&&navigator.connection.saveData&&(t=360);var i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,i){return"apple"===e.shakaMediaKeysPolyfill&&"skd"==n&&(n=i.serverCertificate,t=bs(t,i=ys(t),n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE",renewalIntervalSec:0,failureCallback:function(e){return Ph([e])}},r="reload";n.cb("")&&(r="smooth");var a={trackSelectionCallback:function(e){return E((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return E((function(n){return 1==n.h?navigator.storage&&navigator.storage.estimate?n.g(navigator.storage.estimate(),3):n.return(!0):(t=n.i,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return Ph([e,t])},usePersistentLicense:!0,numberOfParallelDownloads:5},o={drm:i,manifest:{retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,disableChapters:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:Oe(!1,!0),manifestPreprocessorTXml:Fh,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0}
vendor: 4,842 bytes, line 2
2,hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:n.Dc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1,chaptersUri:""},msf:{fingerprintUri:"",namespaces:[],authorizationToken:"",subscribeFilterType:2,useFetchCatalog:!1,version:"auto"}},streaming:{retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return Ph([e])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1,stopFetchingOnPause:!1,clampAppendWindowToDuration:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,commonAccessTokenHeaderName:"cta-common-access-token"},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(e){return Ph([e],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(e,t,n){return Ph([e,t,n])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:a,abrFactory:function(){return new Vi},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(Dd,[null].concat(g(k.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5,droppedFramesThreshold:.15,droppedFramesInterval:2,droppedFramesBanDuration:30},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,droppedFrames:!0},preferredAudio:[{language:"",role:"",label:"",channelCount:2,codec:""}],preferredText:[],preferredVideo:[{label:"",role:"",codec:"",hdrLevel:"AUTO",layout:""}],preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1,positionArea:0,subtitleDelay:0},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0,disableTrackingEvents:!1,disableSnapback:!1,interstitialPreloadAheadTime:10},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:1/0,preloadPrevItem:!0,repeatMode:0},accessibility:{handleForcedSubtitlesAutomatically:!0,speechToText:{enabled:!1,maxTextLength:140,processLocally:!1,languagesToTranslate:[]}}};return a.trackSelectionCallback=function(e){var t,n;return E((function(i){return t=o.preferredAudio.map((function(e){return e.language}
2)).filter(Boolean),n=o.preferredVideo[0]&&o.preferredVideo[0].hdrLevel||"",i.return(function(e,t,n){var i=n;"AUTO"==i&&(n=e.some((function(e){return!(!e.hdr||"HLG"!=e.hdr)})),i=Z().ec(n));var r=e.filter((function(e){return!("variant"!=e.type||e.hdr&&e.hdr!=i)}));n=[];for(var a=r.map((function(e){return e.language})),o=null,s=(t=p(t)).next();!s.done&&!(o=pi(s.value,a));s=t.next());o&&(n=r.filter((function(e){return ci(e.language)==o}))),0==n.length&&(n=r.filter((function(e){return e.primary}))),0==n.length&&(r.map((function(e){return e.language})),n=r);var u=n.filter((function(e){return e.height&&e.height<=480}));for(u.length&&(u.sort((function(e,t){return t.height-e.height})),n=u.filter((function(e){return e.height==u[0].height}))),t=[],n.length&&(r=Math.floor(n.length/2),n.sort((function(e,t){return e.bandwidth-t.bandwidth})),t.push(n[r])),n=(e=p(e)).next();!n.done;n=e.next())(n=n.value).type!=lt&&"image"!=n.type&&"chapter"!=n.type||t.push(n);return t}(e,t,n))}))},n.Oa(o)}function _h(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Lh(e,t,n||Uh(),i,"")}function Bh(e){var t,n,i,r,a,o,s,u,l,c,d=e.preferredAudio[0],h=e.preferredVideo[0];e.language=null!=(t=null==d?void 0:d.language)?t:"",e.role=null!=(n=null==d?void 0:d.role)?n:"",e.channelCount=null!=(i=null==d?void 0:d.channelCount)?i:2,e.spatialAudio=null!=(r=null==d?void 0:d.spatialAudio)&&r,e.audioLabel=null!=(a=null==d?void 0:d.label)?a:"",e.videoRole=null!=(o=null==h?void 0:h.role)?o:"",e.hdrLevel=null!=(s=null==h?void 0:h.hdrLevel)?s:"",e.videoLayout=null!=(u=null==h?void 0:h.layout)?u:"",e.videoLabel=null!=(l=null==h?void 0:h.label)?l:"",e.preferredAudioCodecs=e.preferredAudio.map((function(e){return e.codec})).filter(Boolean),e.preferredAudioChannelCount=null!=(c=null==d?void 0:d.channelCount)?c:2}function Fh(e){return Ph([e],e)}function Hh(){this.g=null,this.h=[]}function Vh(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=(e=p(e.h)).next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function Gh(){this.i=this.h=null,this.g=[]}function Kh(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 Xh(){this.C=this.$=NaN,this.l="",this.i=this.Qg=this.A=this.B=this.K=this.D=this.o=this.m=this.J=this.F=this.h=this.U=this.Z=this.M=this.O=this.S=NaN,this.L=0,this.G=this.H=NaN,this.g=new Hh,this.j=new Gh}function Wh(e,t,n){e.$=t,e.C=n}function zh(e,t){e.i=isNaN(e.i)?t:e.i+t}function qh(e,t,n,i){No.call(this),this.O=e,this.Z=t,this.Ha=i.networkingEngine,this.A=n,this.l=null,this.Ca=0,this.Ia=i.Vd,this.H=i.Ri,this.Ka=i.Si,this.i=i.config,this.m=this.J=this.g=null,this.sa=!1,this.K=i.dj,this.ua=!1,this.j=null,this.ka=!1,this.B=null,this.C=new Map,this.Ba=!1,this.Ga=i.cj,this.$=new Xh,this.ma=Promise.withResolvers(),this.D=Promise.withResolvers(),this.S=null,this.F=!1,this.ea=i.Jh,this.o=this.h=null,this.U=!1,this.M=[],this.L=[],this.G=!0}function Yh(e,t,n){(e=t?e.L:e.M)?e.push(n):n()}function Jh(e,t){if(e.S=t,e.U=!0,e.M)for(var n=(t=p(e.M)).next();!n.done;n=t.next())(n=n.value)();e.M=null}function $h(e){if(e.F)throw new _e(2,7,7003)}function Qh(e,t){e.dispatchEvent(new Lo("onstatechange",(new Map).set("state",t)))}function Zh(e,t){var n,i,r,a;return E((function(o){switch(o.h){case 1:return!e.g||e.j?o.return():(Qh(e,"drm-engine"),e.Ca=Date.now()/1e3,e.j=e.Ia(),e.H.g=e.j,e.j.configure(e.i.drm,(function(){return e.G})),n=Li(e.g.variants),i=!0,e.g&&e.g.presentationTimeline&&(i=e.g.presentationTimeline.na()),o.g(Qo(e.j,n,e.g.offlineSessionIds,i),2));case 2:if($h(e),!t){o.u(3);break}return o.g(e.j.Rb(t),4);case 4:$h(e);case 3:return e.l&&((r=e.l.getConfiguration()).keySystem=Ie(e.j?e.j.g:null),e.l.configure(r)),o.g(Ac(e.H,e.g),5);case 5:if(!o.i){o.u(0);break}return a=new Lo("trackschanged",void 0),o.g(Promise.resolve(),7);case 7:e.dispatchEvent(a),o.j()}}))}function ef(e){if(!e.B){var t=e.i.abrFactory;e.B=t(),e.B.configure(e.i.abr)}t=e.g.isLowLatency&&e.i.streaming.lowLatencyMode;var n=Li(e.g.variants);return n=e.l.create(n),e.B.setVariants(Array.from(n.values()),t),e.B.chooseVariant(!0)}function tf(e,t){for(var n=null,i=p(e.i.preferredText),r=i.next();!r.done;r=i.next())if((r=r.value).language&&(r=Ni(e.g.textStreams,r.language,r.role,r.forced)).length){n=r[0];break}return!n&&null!=t&&t.audio&&e.i.accessibility.handleForcedSubtitlesAutomatically&&(e=Ni(e.g.textStreams,t.audio.language,"",!0)).length&&(n=e[0]),n}function nf(e,t,n){var i,r,a,o,s;return E((function(u){return 1==u.h?(i=e.i.streaming.segmentPrefetchLimit||2,r=new Xd(i,t,(function(t,n,i){return bh(t,n,i||null,e.i.streaming.retryParameters,e.Ha,e.G)}),!1),e.C.set(t.id,r),t.segmentIndex?u.u(2):u.g(t.createSegmentIndex(),2)):(a="number"==typeof e.A?e.A:0,o=t.segmentIndex.Gb(a),s=null,o&&((s=o.current())||(s=o.next().value)),s||(s=au(t.segmentIndex)),s?n?s.aa?u.g(qd(r,s.aa),0):u.u(0):u.g(zd(r,s.startTime),0):u.u(0))}))}function rf(e){var t,n,i,r;return E((function(a){for(t=[],n=p([e.video,e.audio]),i=n.next();!i.done;i=n.next())(r=i.value)&&!r.segmentIndex&&t.push(r.createSegmentIndex());return t.length>0?a.g(Promise.all(t),0):a.u(0)}))}function af(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}function of(e,t){No.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Gc:null,Fc:lf,uc:function(e,t){return sf(n,"enter",e,t)}},{Gc:uf,Fc:lf,uc:function(e,t){return sf(n,"enter",e,t)}},{Gc:cf,Fc:lf,uc:function(e,t){return sf(n,"enter",e,t)}},{Gc:lf,Fc:uf,uc:function(e,t){return sf(n,"exit",e,t)}},{Gc:lf,Fc:cf,uc:function(e,t){return sf(n,"exit",e,t)}},{Gc:uf,Fc:cf,uc:function(e,t){t?sf(n,"skip",e,t):(sf(n,"enter",e,t),sf(n,"exit",e,t))}},{Gc:cf,Fc:uf,uc:function(e,t){return sf(n,"skip",e,t)}}],this.h=new Y,this.h.I(this.i,"regionremove",(function(e){n.g.delete(e.region)}))}function sf(e,t,n,i){t=new Lo(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}md.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},Td.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(i=Sd.prototype).ready=function(){var e=this;pd(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,(function(){!function(){if(null==e.h||0==e.h&&e.g.duration!=1/0)e.i=!0;else{var t=e.g.currentTime,n=null;if("number"==typeof e.h)n=e.h;else if(e.h instanceof Date){var i=Ad(e);
2null!==i&&(n=e.h.getTime()/1e3-i,n=Ed(e,n))}null==n?e.i=!0:(n<0&&(n=Math.max(0,t+n)),t!=n?(e.j.Ja(e.g,"seeking",(function(){e.i=!0})),e.g.currentTime=n):e.i=!0)}}()}))},i.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},i.Ie=function(e){this.h=this.i?this.h:e},i.ad=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=Ed(this,e=e.getTime()/1e3-(Ad(this)||0))),e||0},i.lg=function(){return 0},i.jg=function(){return 0},i.kg=function(){return!1},i.Yg=function(){},i.Jg=function(){var e=pc(this.g.buffered);return null!=e&&e>=this.g.duration-1},(i=kd.prototype).ready=function(){this.m.Aa(.25)},i.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.A=function(){}},i.Ie=function(e){yd(this.j,Cd(this,e))},i.ad=function(){var e=vd(this.j);return this.h.readyState>0&&!this.h.paused?Rd(this,e):e},i.lg=function(){return this.i.G},i.jg=function(){return this.i.F},i.kg=function(){return this.i.C},i.Yg=function(){this.i.Sc()},i.Jg=function(){if(this.g.na()){var e=this.g.gd(),t=pc(this.h.buffered);if(null!=t&&t>=e)return!0}return!1},Dd.prototype.configure=function(e){this.g=e},Dd.prototype.getConfiguration=function(){return this.g},Dd.prototype.create=function(e){e=function(e,t,n,i){for(var r=(t=p(t)).next(),a={};!r.done;a={Ic:void 0},r=t.next()){var o=e;if((!(r=r.value).language||(o=Ld(o,r.language)).length)&&(!r.role||(o=Nd(o,r.role)).length)&&(!r.label||(o=Od(o,r.label)).length)&&(!r.channelCount||(o=Ud(o,r.channelCount)).length)){a.Ic=[],r.codec&&a.Ic.push(r.codec),n&&a.Ic.push(n),i&&a.Ic.push(i);var s=a.Ic.filter(function(e){return function(t,n){return e.Ic.indexOf(t)===n}}(a));if(s.length){a=!1;for(var u=(s=p(s)).next();!u.done;u=s.next())if((u=Hd(o,u.value)).length){o=u,a=!0;break}if(!a&&r.codec)continue}if(void 0!==r.spatialAudio){if(!(r=Fd(o,r.spatialAudio)).length)continue;o=r}if(o.length)return o}}var l=[];if(n&&l.push(n),i&&l.push(i),(n=l.filter((function(e,t){return l.indexOf(e)===t}))).length)for(i=(n=p(n)).next();!i.done;i=n.next())if((i=Hd(e,i.value)).length){e=i;break}return(n=e.filter((function(e){return e.primary}))).length?n:e}(e,this.g.preferredAudio,this.g.audioCodec,this.g.activeAudioCodec);e:for(var t=p(this.g.preferredVideo),n=t.next();!n.done;n=t.next()){var i=e;if((!(n=n.value).role||(i=Pd(i,n.role)).length)&&(!n.label||(i=jd(i,n.label)).length)&&(!n.hdrLevel||(i=_d(i,n.hdrLevel)).length)&&(!n.layout||(i=Bd(i,n.layout)).length)){if(n.codec){if(!(n=Vd(i,n.codec)).length)continue;i=n}if(i.length){e=i;break e}}}return t=Z(),n=this.g.keySystem,t="smooth"==this.g.codecSwitchingStrategy&&t.cb(n),this.h=new Rl(e[0],e,!t)},Dd.prototype.getLastAdaptationSet=function(){return this.h},h(Gd,No),Gd.prototype.release=function(){this.g.clear(),this.h&&(this.h.stop(),this.h=null),No.prototype.release.call(this)},Xd.prototype.xb=function(e,t){t=void 0!==t&&t;for(var n=p(this.g.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&Zd(this,i);t&&$d(this)},Xd.prototype.Yc=function(e){this.o=e,this.h&&this.h.Yc(e)},eh.prototype.abort=function(){this.pd&&this.pd.abort()},(i=nh.prototype).destroy=function(){return this.l.destroy()},i.configure=function(e){if(this.i=e,this.ea=new ko({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.Y&&(Jd(t.Y),t.Y=null);for(var n=(t=p(this.m.keys())).next();!n.done;n=t.next())n=n.value,Jd(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(lt))&&t.Y&&(Jd(t.Y),t.Y=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.Y&&(Jd(t.Y),t.Y=null),n=(t=p(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).Y?(Qd(n.Y,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(Jd(n.Y),n.Y=null)):e.segmentPrefetchLimit>0&&(n.Y=ch(this,n.stream));e.disableAudioPrefetch||function(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=p(e.j.variants),r=i.next(),a={};!r.done;a={sb:void 0},r=i.next())if(a.sb=r.value,a.sb.audio)if(e.m.has(a.sb.audio)){if(Qd(r=e.m.get(a.sb.audio),t),!(t>0&&n.some(function(e){return function(t){return si(e.sb.audio.language,t)}}(a)))){var o=e.h.get(a.sb.audio.type);r!==(o&&o.Y)&&Jd(r),e.m.delete(a.sb.audio)}}else t<=0||!n.some(function(e){return function(t){return si(e.sb.audio.language,t)}}(a))||!(r=ch(e,a.sb.audio))||(a.sb.audio.segmentIndex||a.sb.audio.createSegmentIndex(),e.m.set(a.sb.audio,r))}(this)},i.start=function(e){var t=this;return E((function(n){if(1==n.h)return n.g(function(e,t){var n,i,r,a,o,s,u,l;return E((function(c){if(1==c.h){if(!e.o)throw new _e(2,5,5006);return n=Rh(e,!0),i=e.g.R,c.g(i.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(zo(e.l),e.updateDuration().catch((function(){})),r=p(n.keys()),a=r.next();!a.done;
2a=r.next())o=a.value,s=n.get(o),e.h.has(o)||(u=lh(e,s),(l=t.get(s.id))&&(Wd(l,(function(t,n,i){return bh(t,n,i||null,e.i.retryParameters,e.g.wc)})),u.Y=l),e.h.set(o,u),Th(e,u,0));Ih(e),c.j()}))}(t,e||new Map),2);zo(t.l),t.J=!0,n.j()}))},i.Ac=function(){if(this.g){for(var e=this.g.Hb(),t=p(this.h.keys()),n=t.next();!n.done;n=t.next()){var i,r=n.value;if(n=this.h.get(r),(i=!this.H)&&(i=this.g.R,i=!(i=r==lt?null!=(i=i.h).g&&null!=i.h&&e>=i.g&&e<i.h:gc(i=Fc(i,r),e))),i){if(this.U=0,n.Y&&(n.Y.h=null),"audio"===n.type)for(var a=(i=p(this.m.values())).next();!a.done;a=i.next())a.value.h=null;n.ia=null,(null!=Bc(this.g.R,r)||n.za)&&uh(this,n),n.La&&(n.La.abort(),n.La=null),r===lt&&(r=this.g.R).J&&r.J.g.clear(),n.Ac=!0}!this.H||n.Eb||n.za||n.fb||Th(this,n,0)}Ch(this)&&Mh(this)}},i.updateDuration=function(){var e,t,n=this;return E((function(i){return 1==i.h?(e=cu(),t=n.j.presentationTimeline.getDuration(),n.M.Pa(),t<1/0?(e&&(n.A&&n.A.stop(),Wc(n.g.R)),i.g(n.g.R.kc(t),0)):e?i.g(n.g.R.kc(1/0),5):(n.g.R.kc(4294967296),i.u(0))):(n.A&&(n.A.Qa(),n.M.Ja(n.g.video,"timeupdate",(function(){n.A.Qa().Aa(.5)}))),i.u(0))}))},P("shaka.util.ConfigUtils",Dh),Dh.getDifferenceFromConfigObjects=Oh,Dh.convertToConfigObject=Nh,Dh.mergeConfigObjects=Lh,P("shaka.util.PlayerConfiguration",jh),jh.mergeConfigObjects=_h,jh.createDefaultForLL=function(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}},jh.createDefault=Uh,h(qh,No),(i=qh.prototype).getStartTime=function(){return this.A},i.xf=function(){return this.Z},i.be=function(){return this.O},i.wf=function(){return this.g},i.getStats=function(){return this.$},i.ui=function(){return this.h?Ai(this.h):null},i.ti=function(){return this.o?Ei(this.o):null},i.start=function(){var t,n=this;E((function(i){switch(i.h){case 1:return i.g(Promise.resolve(),2);case 2:return i.m(3),i.g(function(e){var t,n,i,r,a;return E((function(o){switch(o.h){case 1:if(Qh(e,"manifest-parser"),e.m||(e.J=function(e,t){if(t){var n=yt.get(t);if(n)return n}throw new _e(2,4,4e3,e,t)}(e.O,e.Z),e.m=e.J(),e.m.configure(e.i.manifest,(function(){return e.G}))),t=Date.now()/1e3,Qh(e,"manifest"),e.g){o.u(2);break}return o.g(e.m.start(e.O,e.Ka),3);case 3:return e.g=o.i,af(e.g),o.g(function(e){var t;return E((function(n){return e.l||(e.l=e.i.adaptationSetCriteriaFactory(),Bh(t={preferredAudio:e.i.preferredAudio,preferredVideo:e.i.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.i.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:Ie(e.j?e.j.g:null)}),e.l.configure(t)),e.h||!e.g.variants.length||1!=e.g.variants.length&&"HLS"!=e.g.type?n.u(0):(e.h=ef(e),e.h?n.g(rf(e.h),0):n.u(0))}))}(e),2);case 2:return e.ma.resolve(),n=new Lo("manifestparsed",void 0),o.g(Promise.resolve(),5);case 5:if(e.dispatchEvent(n),0==e.g.variants.length)throw new _e(2,4,4036);if(af(e.g),!Ec(e.H,e.g)){o.u(6);break}return i=new Lo("trackschanged",void 0),o.g(Promise.resolve(),7);case 7:$h(e),e.dispatchEvent(i);case 6:r=Date.now()/1e3,(a=r-t)>=0&&(e.$.J=a),o.j()}}))}(n),5);case 5:if($h(n),"webkit"===e.shakaMediaKeysPolyfill){i.u(6);break}return i.g(Zh(n),7);case 7:$h(n);case 6:return i.g(function(e){return E((function(t){return 1==t.h?!e.h||e.g.variants.includes(e.h)?t.u(0):t.g(function(e){var t,n,i,r;return E((function(a){for(t=[],n=p([e.video,e.audio]),i=n.next();!i.done;i=n.next())(r=i.value)&&r.segmentIndex&&r.closeSegmentIndex&&t.push(r.closeSegmentIndex());return t.length>0?a.g(Promise.all(t),0):a.u(0)}))}(e.h),3):(e.h=ef(e),e.h?t.g(rf(e.h),0):t.u(0))}))}(n),8);case 8:if($h(n),!n.ea){i.u(9);break}return i.g(function(e){var t,n,i,r,a;return E((function(o){return!e.h&&(t=ef(e))&&(e.h=t),e.h?(n=e.g.presentationTimeline.isLive(),i=[],(r=e.h).video&&i.push(nf(e,r.video,n)),r.audio&&i.push(nf(e,r.audio,n)
2),(a=tf(e,r))&&(i.push(nf(e,a,n)),e.o=a),o.g(Promise.all(i),0)):o.u(0)}))}(n),10);case 10:$h(n);case 9:if(!n.ea||!n.j){i.u(11);break}return i.g(function(e){return E((function(t){return 1==t.h?!e.K||rs(e)?t.u(0):t.g(e.l.promise,3):t.g(Promise.all(e.U.map((function(e){return e.promise}))),0)}))}(n.j),12);case 12:$h(n);case 11:n.D.resolve(),i.o(0);break;case 3:(t=i.l())instanceof _e&&(7001==t.code||7003==t.code)||n.D.reject(t),i.j()}}))},i.dispatchEvent=function(e){return this.S?this.S.dispatchEvent(e):No.prototype.dispatchEvent.call(this,e)},i.onError=function(e){2===e.severity&&(this.D.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new Lo("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},i.configure=function(e,t){e=Nh(e,t),_h(this.i,e),function(e){var t,n,i,r,a,o,s,u,l,c,d,h,f;E((function(g){if(1==g.h)return e.h?(t=e.g.presentationTimeline.isLive(),n=[],i=function(t){t&&(e.C.has(t.id)&&(Jd(e.C.get(t.id)),e.C.delete(t.id)),t.segmentIndex&&t.closeSegmentIndex&&n.push(t.closeSegmentIndex()))},r=function(){for(var t=e.h,n=(t=p([t.video,t.audio])).next();!n.done;n=t.next())i(n.value);e.o=null},a=function(){i(e.o),e.o=null},o=e.l.getConfiguration(),Bh(s={preferredAudio:e.i.preferredAudio,preferredVideo:e.i.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:e.i.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:Ie(e.j?e.j.g:null)}),Ht(o)!=Ht(s)&&(e.l.configure(s),r(),e.h=ef(e)),e.h&&(u=tf(e,e.h))?u!=e.o&&(a(),e.o=u):a(),g.g(Promise.all(n),2)):g.return();if(l=[],e.h){for(c=e.h,d=p([c.video,c.audio]),h=d.next();!h.done;h=d.next())f=h.value,l.push(nf(e,f,t));e.o&&l.push(nf(e,e.o,t))}return g.g(Promise.all(l),0)}))}(this)},i.getConfiguration=function(){return Bt(this.i)},i.zj=function(){return this.D.promise},i.destroy=function(){var e,t,n=this;return E((function(i){if(1==i.h)return n.F=!0,!n.m||n.sa?i.u(2):i.g(n.m.stop(),2);if(4!=i.h)return n.B&&n.B.release(),n.K&&!n.ua&&n.K.release(),!n.j||n.ka?i.u(4):i.g(n.j.destroy(),4);if(n.C.size>0&&!n.Ba)for(e=p(n.C.values()),t=e.next();!t.done;t=e.next())Jd(t.value);i.j()}))},P("shaka.media.PreloadManager",qh),qh.prototype.destroy=qh.prototype.destroy,qh.prototype.waitForFinish=qh.prototype.zj,qh.prototype.getPrefetchedTextTrack=qh.prototype.ti,qh.prototype.getPrefetchedVariantTrack=qh.prototype.ui,h(of,No),of.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,No.prototype.release.call(this)},of.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=p(this.i.g.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),a=e<i.startTime?uf:e>i.endTime?cf:lf;this.g.set(i,a);for(var o=p(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Gc==r&&s.Fc==a&&s.uc(i,t)}}};var uf=1,lf=2,cf=3;function df(e,t,n,i,r,a,o){if(n>=200&&n<=299&&202!=n||304==n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:a};a=null;try{a=Ke(t)}catch(e){}throw new _e(1,1,1001,i,n,a,e,o,r||i)}function hf(){}function ff(e,t,n,i,r,a){var o=new yf;try{qo(t.headers).forEach((function(e,t){o.append(t,e)}))}catch(t){return Io(new _e(1,1,1002,e,t,n))}var s=new mf,u={vg:!1,yh:!1};if(e=function(e,t,n,i,r,a,o,s,u){var l,c,d,h,f,p,g,m,v,y,b,w,T,x;return E((function(S){switch(S.h){case 1:return l=gf,c=vf,h=new ArrayBuffer(0),p=f=0,g={},m=Date.now(),S.m(2),S.g(l(e,i),4);case 4:if(d=S.i,g=function(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}(d.headers),o(g),"HEAD"==i.method){S.u(5);break}return y=(v=d.headers.get("Content-Length"))?parseInt(v,10):0,d.body?(b=d.clone().body.getReader(),new c({start:function(e){!function t(){var n,i,r,o;return E((function(l){switch(l.h){case 1:return l.m(2),l.g(b.read(),4);case 4:n=l.i,l.o(3);break;case 2:return l.l(),l.return();case 3:if(n.done){l.u(5);break}if(f+=n.value.byteLength,!s){l.u(5);break}return l.g(s(n.value),5);case 5:i=Date.now(),r=f-p,(i-m>100&&r>=u||n.done)&&(o=n.done?0:y-f,a(i-m,r,o),p=f,m=i),n.done?e.close():(e.enqueue(n.value),t()),l.j()}}))}()}}),S.g(d.arrayBuffer(),8)):S.g(d.arrayBuffer(),9);case 8:h=S.i,S.u(5);break;case 9:h=S.i,w=Date.now(),a(w-m,h.byteLength,0);case 5:t.headers.Range&&2==(T=t.headers.Range.replace("bytes=","").split("-").filter((function(e){return e})).map((function(e){return parseInt(e,10)}))).length&&h.byteLength!=T[1]-T[0]+1&&F("Payload length does not match range requested bytes",t,d),S.o(3);break;
2case 2:if(x=S.l(),r.vg)throw new _e(1,1,7001,e,n);if(r.yh)throw new _e(1,1,1003,e,n);throw new _e(1,1,1002,e,x,n);case 3:return S.return(df(g,h,d.status,e,d.url,t,n))}}))}(e,t,n,{body:t.body||void 0,headers:o,method:t.method,signal:s.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u,i,r,t.streamDataCallback,a.minBytesForProgressEvents||0),e=new Co(e,(function(){return u.vg=!0,s.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var l=new ti((function(){u.yh=!0,s.abort()}));l.ba(t/1e3),e.finally((function(){l.stop()}))}return e}function pf(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&!!new Response("").body&&!(!e.fetch||"polyfill"in e.fetch||!e.AbortController)}P("shaka.net.HttpFetchPlugin",hf),hf.isSupported=pf,hf.parse=ff;var gf=e.fetch,mf=e.AbortController,vf=e.ReadableStream,yf=e.Headers;function bf(){}function wf(e,t,n,i,r,a){var o=new Tf,s=Date.now(),u=0;return new Co(new Promise((function(l,c){o.open(t.method,e,!0),o.responseType="arraybuffer",o.timeout=t.retryParameters.timeout,o.withCredentials=t.allowCrossSiteCredentials;var d={};for(var h in o.onabort=function(){c(new _e(1,1,7001,e,n))},o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.HEADERS_RECEIVED){for(var e=o.getAllResponseHeaders().trim().split("\r\n"),t={},n=(e=p(e)).next();!n.done;n=e.next()){var i=(n=n.value).indexOf(": ");-1!==i&&(t[n.slice(0,i).toLowerCase()]=n.slice(i+2))}r(d=t)}},o.onload=function(){var i=o.response;try{var r=df(d,i,o.status,e,o.responseURL,t,n);l(r)}catch(e){c(e)}},o.onerror=function(t){c(new _e(1,1,1002,e,t,n))},o.ontimeout=function(){c(new _e(1,1,1003,e,n))},o.onprogress=function(e){var t=Date.now(),n=a.minBytesForProgressEvents||0,r=e.loaded-u;(t-s>100&&r>=n||e.lengthComputable&&e.loaded==e.total)&&(i(t-s,r,4==o.readyState?0:e.total-e.loaded),u=e.loaded,s=t)},t.headers)try{o.setRequestHeader(h.toLowerCase(),t.headers[h])}catch(t){throw new _e(1,1,1002,e,t,n)}o.send(t.body)})),(function(){return o.abort(),Promise.resolve()}))}pf()&&(Uo("http",ff,2,!0),Uo("https",ff,2,!0),Uo("blob",ff,2,!0)),P("shaka.net.HttpXHRPlugin",bf),bf.parse=wf;var Tf=e.XMLHttpRequest;Uo("http",wf,1,!0),Uo("https",wf,1,!0),Uo("blob",wf,1,!0);for(var xf={ach:"Lwo",ady:"ÐдÑгÑбзÑ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"TÉÉ¥i",ar:"Ø§ÙØ¹Ø±Ø¨ÙØ©","ar-AR":"Ø§ÙØ¹Ø±Ø¨ÙØ©","ar-MA":"Ø§ÙØ¹Ø±Ø¨ÙØ©","ar-SA":"Ø§ÙØ¹Ø±Ø¨ÙØ© (Ø§ÙØ³Ø¹ÙØ¯ÙØ©)","ay-BO":"Aymar aru",az:"AzÉrbaycan dili","az-AZ":"AzÉrbaycan dili","be-BY":"ÐелаÑÑÑкаÑ",bg:"ÐÑлгаÑÑки","bg-BG":"ÐÑлгаÑÑки",bn:"বাà¦à¦²à¦¾","bn-IN":"বাà¦à¦²à¦¾ (à¦à¦¾à¦°à¦¤)","bn-BD":"বাà¦à¦²à¦¾(বাà¦à¦²à¦¾à¦¦à§à¦¶)","bs-BA":"Bosanski",ca:"Català ","ca-ES":"Català ",cak:"Maya Kaqchikel","ck-US":"á£á³á© (tsalagi)",cs:"ÄeÅ¡tina","cs-CZ":"ÄeÅ¡tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Ãsterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"DolnoserbÅ¡Äina",el:"Îλληνικά","el-GR":"Îλληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"ÙØ§Ø±Ø³Û","fa-IR":"ÙØ§Ø±Ø³Û","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"àªà«àªàª°àª¾àª¤à«","gx-GR":"á¼Î»Î»Î·Î½Î¹ÎºÎ® á¼ÏÏαία",he:"×¢×ר×תâ","he-IL":"×¢×ר×תâ",hi:"हिनà¥à¤¦à¥","hi-IN":"हिनà¥à¤¦à¥",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"HornjoserbÅ¡Äina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"ÕÕ¡ÕµÕ¥ÖÕ¥Õ¶",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Ãslenska","is-IS":"Ãslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"æ¥æ¬èª","ja-JP":"æ¥æ¬èª","jv-ID":"Basa Jawa","ka-GE":"á¥áá áá£áá","kk-KZ":"ÒазаÒÑа",km:"áá¶áá¶ááááá","km-KH":"áá¶áá¶ááááá",kab:"Taqbaylit",kn:"à²à²¨à³à²¨à²¡","kn-IN":"à²à²¨à³à²¨à²¡ (India)",ko:"íêµì´","ko-KR":"íêµì´ (é©å½)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA"
2:"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"LatvieÅ¡u","lv-LV":"LatvieÅ¡u",mai:"मà¥à¤¥à¤¿à¤²à¥, মà§à¦¥à¦¿à¦²à§","mg-MG":"Malagasy",mk:"ÐакедонÑки","mk-MK":"ÐакедонÑки (ÐакедонÑки)",ml:"മലയാളà´","ml-IN":"മലയാളà´","mn-MN":"Ðонгол",mr:"मराठà¥","mr-IN":"मराठà¥",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ááá¬á
áá¬",nb:"Norsk (bokmÃ¥l)","nb-NO":"Norsk (bokmÃ¥l)",ne:"नà¥à¤ªà¤¾à¤²à¥","ne-NP":"नà¥à¤ªà¤¾à¤²à¥",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"à¬à¬¡à¬¼à¬¿à¬",pa:"ਪੰà¨à¨¾à¨¬à©","pa-IN":"ਪੰà¨à¨¾à¨¬à© (à¨à¨¾à¨°à¨¤ ਨà©à©°)",pl:"Polski","pl-PL":"Polski","ps-AF":"Ù¾ÚØªÙ",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"RomânÄ","ro-RO":"RomânÄ",ru:"Ð ÑÑÑкий","ru-RU":"Ð ÑÑÑкий","sa-IN":"सà¤à¤¸à¥à¤à¥à¤¤à¤®à¥","se-NO":"Davvisámegiella","si-LK":"à¶´à·
à·à¶",sk:"SlovenÄina","sk-SK":"SlovenÄina (Slovakia)",sl:"SlovenÅ¡Äina","sl-SI":"SlovenÅ¡Äina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"СÑпÑки","sr-RS":"СÑпÑки (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழà¯","ta-IN":"தமிழà¯",te:"à°¤à±à°²à±à°à±","te-IN":"à°¤à±à°²à±à°à±",tg:"забоÌни ÑоҷикӣÌ","tg-TJ":"Ñоҷикӣ",th:"ภาษาà¹à¸à¸¢","th-TH":"ภาษาà¹à¸à¸¢ (à¸à¸£à¸°à¹à¸à¸¨à¹à¸à¸¢)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"ÑаÑаÑÑа",uk:"УкÑаÑнÑÑка","uk-UA":"УкÑаÑнÑÑка",ur:"اردÙ","ur-PK":"اردÙ",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Viá»t","vi-VN":"Tiếng Viá»t","xh-ZA":"isiXhosa",yi:"××Ö´××ש","yi-DE":"××Ö´××ש (German)",zh:"䏿","zh-HANS":"䏿ç®ä½","zh-HANT":"䏿ç¹é«","zh-CN":"䏿ï¼ä¸å½ï¼","zh-HK":"䏿ï¼é¦æ¸¯ï¼","zh-SG":"ä¸æï¼æ°å å¡ï¼","zh-TW":"䏿ï¼å°ç£ï¼","zu-ZA":"isiZulu"},Sf=p(Object.keys(xf)),Af=Sf.next();!Af.done;Af=Sf.next()){var Ef=Af.value;xf[Ef.toLowerCase()]=xf[Ef]}function kf(e,t){if(e.lineBreak)return"\n";if(e.nestedCues.length)return e.nestedCues.map((function(t){return kf(t,e)})).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=bn,r=e.fontStyle==Tn,a=e.textDecoration.includes(Sn);return i&&n.push(["b"]),r&&n.push(["i"]),a&&n.push(["u"]),""==(r=e.color)&&t&&(r=t.color),i="",(r=Cf(r))&&(i+="."+r),""==(r=e.backgroundColor)&&t&&(r=t.backgroundColor),(t=Cf(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight((function(e,t){var n=p(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"}),e.payload)}function Cf(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&e.length>7&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function If(e,t){for(var n=[],i=(e=p(Mf(e))).next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,g(If(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=kf(i,t),n.push(r)}return n}function Mf(e){for(var t=[],n=(e=p(e)).next(),i={};!n.done;i={Ue:void 0},n=e.next())i.Ue=n.value,t.some(function(e){return function(t){return en(e.Ue,t)}}(i))||t.push(i.Ue);return t}function Rf(e){function t(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=n.align&&(n.align="middle"),"vertical-lr"==e.writingMode?n.vertical="lr":"vertical-rl"==e.writingMode&&(n.vertical="rl"),1==e.lineInterpretation&&(n.snapToLines=!1),null!=e.line&&(n.line=e.line),null!=e.position&&(n.position=e.position),n}function Df(e){var t=this;this.i=e,this.l=new Y,this.j=this.B=null,this.h=new Map,this.g=-1,this.A=!1,this.m=null,this.D=function(){var e;null==(e=t.m)||e.stop(),t.m=null,t.l.eb(t.i,"textchanged",t.o),t.l.eb(t.j.textTracks,"change",t.C);
2for(var n=(e=p(t.h.values())).next();!n.done;n=e.next())n.value.remove();t.h.clear(),t.g=-1,t.j=null},this.o=function(){for(var e=new Map,n=t.i.yb(),i=(n=p(n)).next();!i.done;i=n.next()){if(i=i.value,t.h.has(i.id)){var r=t.h.get(i.id);i.active||"disabled"===r.track.mode||(r.track.mode="disabled"),t.h.delete(i.id)}else{var a=r=t.j.ownerDocument.createElement("track"),o=Z();if(o=i.forced&&"WEBKIT"===o.va()?"forced":"caption"===i.kind?"captions":"subtitles",a.kind=o,a=r,o=void 0,i.label)o=i.label;else if(i.language)if(i.language in xf)o=xf[i.language];else{var s=hi(i.language);s in xf&&(o=xf[s]+" ("+i.language+")")}o||(o=i.originalTextId,i.language&&i.language!==i.originalTextId&&(o+=" ("+i.language+")")),a.label=o,i.language?i.language in xf?r.srclang=i.language:(a=hi(i.language),o=void 0,r.srclang=null!=(o=a)?o:"und"):r.srclang="und",r.src="data:,WEBVTT",r.track.mode="disabled",t.j.appendChild(r)}e.set(i.id,r),i.active&&(t.g=i.id)}for(i=(n=p(t.h.values())).next();!i.done;i=n.next())i.value.remove();t.g>-1&&(e.has(t.g)?"disabled"===(n=e.get(t.g).track).mode&&(n.mode=t.A?"showing":"hidden"):t.g=-1),t.h=e},this.C=function(){if(!t.m){var e=t.j;t.m=new ti((function(){if(t.m=null,t.j===e){var n=-1,i=!1;if(t.h.has(t.g)){var r=t.h.get(t.g);"showing"===r.track.mode?(n=t.g,i=!0):"hidden"===r.track.mode&&(n=t.g)}if(!i)for(r=(i=p(t.h)).next();!r.done;r=i.next()){var a=p(r.value);if(r=a.next().value,"showing"===(a=a.next().value).track.mode){n=r;break}n<0&&"hidden"===a.track.mode&&(n=r)}for(r=(i=p(t.h)).next();!r.done;r=i.next())r=(a=p(r.value)).next().value,a=a.next().value,r!==n&&"disabled"!==a.track.mode&&(a.track.mode="disabled");t.g!==n&&(t.g=n,n>-1?t.i.Bc({id:n}):t.i.Bc())}})).ba(0)}},this.l.I(e,"loaded",(function(){return Lf(t)})),Lf(this)}function Lf(e){!e.j&&e.i&&2===e.i.vf()&&(e.j=e.i.Mc(),e.l.Ja(e.i,"unloading",e.D),e.l.I(e.i,"textchanged",e.o),e.l.I(e.j.textTracks,"change",e.C),e.o())}function Nf(e){var t=this;this.l=e,this.o=null,this.j=new Y,this.H=Bf.value(),this.g=null,this.A=!1,this.B=new Vf,this.K=new ti((function(){Pf(t)})),this.J=1e15,this.F=Uf(this),this.i=[this.F],this.D=this.G=this.h=this.m=null,this.C=new Hf(this.B,this.K,(function(e){if(t.A&&t.g){var n,i=t.o.maxTextLength;if(!(e.length<=i)){for(i=e.length-i;i>0&&" "!==e[i-1];)i--;e="..."+e.slice(i).trimStart()}null!=(n=t.h)&&n.h&&(n.g||(n.g=document.createElement("span"),n.g.setAttribute("translate","no"),n.g.style.backgroundColor="rgba(0,0,0,0.8)",n.g.style.padding="0px 5px",n.g.style.margin="2.5% 5%",n.h.appendChild(n.g)),n.g.textContent=e)}}),(function(){var e;null!=(e=t.h)&&e.g&&(e.g.textContent="")}))}function Pf(t){var n,i,r,a,o,s,u;E((function(l){switch(l.h){case 1:if(null!=(n=t.h)&&n.g&&(n.g.textContent=""),!(i=t.l.getAudioTracks()).length)return l.return();if(r=function(t){var n=t.l.Mc();return n?_f.getOrInsertComputed(n,(function(){var t=new(e.AudioContext||e.webkitAudioContext),i=t.createMediaElementSource(n),r=t.createMediaStreamDestination();i.connect(r),i.connect(t.destination);var a=r.stream.getAudioTracks()[0];return{Lj:t,Oj:i,Mj:r,Lh:a}})).Lh:null}(t),!r)return l.return();if(a=i.find((function(e){return e.active})),o="en",a&&a.language&&"und"!=a.language&&(o=a.language),s=t.i.find((function(e){return e.id==t.m})),u="",s&&s.language&&"und"!=s.language&&(u=s.language),!t.C.isActive()||t.G!==o||t.D===u){l.u(2);break}return t.D=u,l.g(Gf(t.B,o,u),3);case 3:return l.return();case 2:return Of(t),l.m(4),l.g(Gf(t.B,o,u),6);case 6:l.o(5);break;case 4:if("NotSupportedError"==l.l().name)return l.return();case 5:return l.g(t.C.start(r,o,t.o.processLocally),7);case 7:t.G=o,t.D=u,l.j()}}))}function Of(e,t){e.C.stop(void 0===t||t)}function jf(e){if(!(e=e.l.$b))return null;var t=document.createElement("div");return t.classList.add("shaka-speech-to-text-container"),t.style.textAlign="center",t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.justifyContent="flex-end",e.appendChild(t),t}function Uf(e){return{id:e.J++,active:!1,type:lt,bandwidth:0,language:"",label:null,kind:null,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:!1,originalTextId:null,originalLanguage:"speech-to-text"}}(i=Df.prototype).configure=function(e){this.B=e},i.remove=function(e,t){return!!this.i&&(this.h.has(this.g)&&function(e,t){var n=!1;"disabled"===e.mode&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}(this.h.get(this.g).track,(function(n){return n.startTime<t&&n.endTime>e})),!0)},i.append=function(e){if(this.h.has(this.g)){var t,n,i=null!=(n=null==(t=this.B)?void 0:t.subtitleDelay)?n:0;t=e,0!=i&&(t=e.map((function(e){return(e=e.clone()).startTime=Math.max(0,e.startTime+i),e.endTime=Math.max(0,e.endTime+i),e}))),function(e,t){var n=If(t),i=[];t=e.cues?Array.from(e.cues):[];for(var r=(n=p(n)).next(),a={};!r.done;a={Pc:void 0},r=n.next())a.Pc=r.value,!t.some(function(e){return function(t){return t.startTime==e.Pc.startTime&&t.endTime==e.Pc.endTime&&t.text==e.Pc.payload}}(a))&&a.Pc.payload&&(r=Rf(a.Pc))&&i.push(r);for(n=(t=p(t=i.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)})))).next();!n.done;n=t.next())e.addCue(n.value)}(this.h.get(this.g).track,t)}},i.destroy=function(){var e,t;return this.i&&(this.j&&this.D(),this.i=null),null==(e=this.m)||e.stop(),this.m=null,null==(t=this.l)||t.release(),this.l=null,Promise.resolve()},i.isTextVisible=function(){return this.A},i.setTextVisibility=function(e){if(this.A=e,this.h.has(this.g)){var t=this.h.get(this.g).track;"disabled"!==t.mode&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&3===this.i.vf())if(t=Array.from(this.i.Mc().textTracks).filter((function(e){return["captions","subtitles","forced"].includes(e.kind)})),e){e=null;for(var n=(t=p(t)).next();!n.done;n=t.next()){if("showing"===(n=n.value).mode){e=null;break}
2e||"hidden"!==n.mode||(e=n)}e&&(e.mode="showing")}else for(t=(e=p(t)).next();!t.done;t=e.next())"showing"===(t=t.value).mode&&(t.mode="hidden")},i.setTextLanguage=function(){},P("shaka.text.NativeTextDisplayer",Df),Df.prototype.setTextLanguage=Df.prototype.setTextLanguage,Df.prototype.setTextVisibility=Df.prototype.setTextVisibility,Df.prototype.isTextVisible=Df.prototype.isTextVisible,Df.prototype.destroy=Df.prototype.destroy,Df.prototype.append=Df.prototype.append,Df.prototype.remove=Df.prototype.remove,Df.prototype.configure=Df.prototype.configure,(i=Nf.prototype).configure=function(t){this.o=t,function(t){var n=t.i.map((function(e){return e.language})).filter((function(e){return e}));if(!X(t.o.languagesToTranslate,n)&&"Translator"in e){t.i=t.i.filter((function(e){return!(e.id!=t.F.id&&!t.o.languagesToTranslate.includes(e.language)&&(e.id==t.m&&t.disable(),1))}));for(var i=(n=p(t.o.languagesToTranslate)).next(),r={};!i.done;r={Ef:void 0},i=n.next())r.Ef=i.value,(i=t.i.find(function(e){return function(t){return t.language==e.Ef}}(r)))||((i=Uf(t)).language=r.Ef,t.i.push(i));n=new Lo("textchanged"),t.l.dispatchEvent(n)}}(this)},i.release=function(){var e;this.m=null,this.j.Pa(),Of(this),this.l=null,this.j.release(),null==(e=this.h)||e.release(),this.g&&this.g.parentElement&&(this.g.remove(),this.g=null)},i.enable=function(e){var t=this;this.H&&(this.g||(this.g=jf(this)),this.g&&(this.h||(this.h=new Ff(this.g)),this.A&&e.id==this.m||(this.A=!0,this.m=e.id,this.j.I(this.l,"audiotrackschanged",(function(){Pf(t)})),e=this.l.Mc(),this.j.I(e,"seeking",(function(){Pf(t)})),this.j.I(e,"pause",(function(){Of(t,!1)})),this.j.I(e,"play",(function(){Pf(t)})),e.paused||Pf(this))))},i.disable=function(){var e;this.A&&(this.A=!1,this.m=null,this.j.Pa(),Of(this),null==(e=this.h)||e.release(),this.h=null,this.B.release(),this.C.release())},i.isSupported=function(){return!!this.H&&(this.g||(this.g=jf(this)),!!this.g)},i.yb=function(){if(!this.isSupported())return[];for(var e=p(this.i),t=e.next();!t.done;t=e.next())(t=t.value).active=t.id==this.m;return this.i};var _f=new Map,Bf=new Q((function(){var e=document.body.appendChild(document.createElement("iframe")),t=e.contentWindow;if(!(t=t.SpeechRecognition||t.webkitSpeechRecognition))return e.remove(),!1;t=new t,e.remove();try{return t.start(0),t.stop(),!1}catch(e){return"TypeError"==e.name}}));function Ff(e){this.h=e,this.g=null}function Hf(e,t,n,i){this.m=e,this.i=t,this.A=n,this.o=i,this.h=new Y,this.l=null,this.g=0,this.j=!1}function Vf(){this.h=this.g=null,this.m=this.l=0,this.j=this.i=null}function Gf(t,n,i){var r,a,o;return E((function(s){if(1==s.h)return t.i===n&&t.j===i&&t.g?s.return():(t.release(),t.l++,r=t.l,i&&n!=i&&"Translator"in e?(t.h=new AbortController,s.m(2),s.g(Translator.create({sourceLanguage:n,targetLanguage:i,signal:t.h.signal}),4)):s.return());if(2!=s.h)return a=s.i,r!==t.l?(a.destroy(),s.return()):(t.g=a,t.i=n,t.j=i,s.o(0));if("NotSupportedError"==(o=s.l()).name)throw o;s.j()}))}function Kf(){}function Xf(t){var n=this;this.B=!1,this.j=[],this.m=t.Mc(),this.o=t.$b,this.D=null,this.F=!1,this.L=!0,this.h=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C=new ti((function(){n.m.paused||Jf(n)})),Wf(this),this.A=new ti((function(){zf(n)})),this.l=new Map,this.i=new Y,this.i.I(document,"fullscreenchange",(function(){Jf(n,!0)})),this.i.I(this.m,"seeking",(function(){Jf(n,!0)})),this.i.I(this.m,"ratechange",(function(){Wf(n)})),this.i.I(this.m,"resize",(function(){var e=n.m,t=e.videoWidth;e=e.videoHeight,n.D=t&&e?t/e:null})),this.K=!1,this.H=null,"ResizeObserver"in e&&(this.H=new ResizeObserver((function(){n.K||(n.K=!0,requestAnimationFrame((function(){n.K=!1,n.g&&n.g.parentElement&&n.B&&Jf(n,!0)})))})),this.H.observe(this.o)),this.G=new Map,this.J=null,"IntersectionObserver"in e&&(this.J=new IntersectionObserver((function(e){var t;e.length&&(e=e[e.length-1],n.L=e.isIntersecting&&e.intersectionRatio>0,e=(null==(t=n.h)?void 0:t.captionsUpdatePeriod)||.25,n.A.ba(e))}),{root:null,threshold:[.01]}),this.J.observe(this.o)),this.i.I(document,"visibilitychange",(function(){n.A.Qa()})),this.i.I(document,"fullscreenchange",(function(){n.A.Qa()})),this.i.Jb(this.m,["enterpictureinpicture","leavepictureinpicture"],(function(){n.A.Qa()})),"documentPictureInPicture"in e&&this.i.I(e.documentPictureInPicture,"enter",(function(e){n.A.Qa(),n.i.Ja(e.window,"pagehide",(function(){n.A.Qa()}))})),((t=this.m).webkitPresentationMode||t.webkitSupportsFullscreen)&&this.i.I(t,"webkitpresentationmodechanged",(function(){n.A.Qa()})),zf(this)}function Wf(e){e.C&&(e.j.length&&!e.F?e.C.Aa((e.h?e.h.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.m.playbackRate))):e.C.stop())}function zf(t){var n=t.m,i=!1;(e.documentPictureInPicture&&e.documentPictureInPicture.window||document.pictureInPictureElement===n)&&(i=!0);var r=!1;document.fullscreenEnabled&&document.fullscreenElement===t.o?r=!0:n.webkitSupportsFullscreen&&(r=n.webkitDisplayingFullscreen),n="visible"===document.visibilityState,i||r||n&&t.L?t.F&&(t.F=!1,Wf(t),requestAnimationFrame((function(){t.g&&t.g.parentElement&&t.B&&Jf(t)}))):t.F||(t.F=!0,t.C&&t.C.stop())}function qf(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function Yf(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=p(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var l=u,c=e.l.get(u);if(!c&&e.h&&0!=e.h.positionArea)for(var d=p(e.l.keys()),h=d.next();!h.done;h=d.next())en(u,h=h.value)&&(l=h,c=e.l.get(h));d=u.startTime<=i&&u.endTime>i,h=c?c.Ch:null,c&&(o.push(c.We),c.zc&&o.push(c.zc),d||(a=!0,e.l.delete(l),c=null)),d&&(s.push(u),c?qf(e,h)||(a=!0):($f(e,u,r),h=(c=e.l.get(l)).Ch,a=!0)),u.nestedCues.length>0&&h&&Yf(e,u.nestedCues,h,i,r),r.pop()}if(a){for(r=(i=p(o)).next();!r.done;r=i.next())(r=r.value).parentElement&&r.parentElement.removeChild(r);for(s.sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),i=(s=p(s)).next();!i.done;i=s.next()){if(i=i.value,!(r=e.l.get(i))&&0!=e.h.positionArea)for(o=(a=p(e.l.keys())).next();!o.done;o=a.next())en(i,o=o.value)&&(r=e.l.get(o));r.zc?(r.zc.contains(n)&&r.zc.removeChild(n),n.appendChild(r.zc),r.zc.appendChild(r.We)):n.appendChild(r.We)}}}function Jf(e,t){if(e.g&&!e.F){var n,i,r=null!=(i=null==(n=e.h)?void 0:n.subtitleDelay)?i:0;if(n=e.m.currentTime-r,!e.B||void 0!==t&&t){for(i=(t=p(e.G.values())
2).next();!i.done;i=t.next())eo(i.value);eo(e.g),e.l.clear(),e.G.clear()}e.B&&(t=e.j,e.h&&0!=e.h.positionArea&&(t=t.map((function(t){switch(function(e){var t=new Qt(0,0,"");!function e(n){n.line=t.line,n.lineAlign=t.lineAlign,n.position=t.position,n.positionAlign=t.positionAlign,n.size=t.size,n.displayAlign=t.displayAlign,n.region=t.region;for(var i=(n=p(n.nestedCues)).next();!i.done;i=n.next())e(i.value)}(e)}(t=t.clone()),t.region=Zf.value(),e.h.positionArea){case 1:t.textAlign="left",t.displayAlign="before";break;case 2:t.textAlign=sn,t.displayAlign="before";break;case 3:t.textAlign="right",t.displayAlign="before";break;case 4:t.textAlign="left",t.displayAlign="center";break;case 5:t.textAlign=sn,t.displayAlign="center";break;case 6:t.textAlign="right",t.displayAlign="center";break;case 7:t.textAlign="left",t.displayAlign=ln;break;case 8:t.textAlign=sn,t.displayAlign=ln;break;case 9:t.textAlign="right",t.displayAlign=ln}return t}))),Yf(e,t,e.g,n,[]))}}function $f(e,t,n){var i=n.length>1,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&t.nestedCues.length>0;var a=document.createElement(r);if("br"!=r&&function(e,t,n,i,r){var a=t.style,o=0==n.nestedCues.length,s=i.length>1;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=Qf(n.linePadding,n,e.o),a.paddingRight=Qf(n.linePadding,n,e.o),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage.replace(/['"()\\]/g,"")+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",n.backgroundColor&&(a.backgroundColor=n.backgroundColor),a.width="100%",a.height="100%";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.style.border=n.border),r||((t=function(e,t){for(var n=e.length-1;n>=0;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,(function(e){return e.backgroundColor})))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.setAttribute("translate","no"),l.textContent=u)}s&&!i[i.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(a.width="100%",a.alignItems="flex-start"):"right"!=n.textAlign&&"end"!=n.textAlign||(a.width="100%",a.alignItems="flex-end"),a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,(1!==(i=e.h?e.h.fontScaleFactor:1)||n.fontSize)&&(a.fontSize=Qf(n.fontSize||"1em",n,e.o,i)),null!=(i=n.line)&&((o=n.lineInterpretation)==fn&&(o=1,s=16,e.D&&e.D<1&&(s=32),i=i<0?100+i/s*100:i/s*100),1==o&&(a.position="absolute",n.writingMode==hn?(a.width="100%",n.lineAlign==pn?a.top=i+"%":"end"==n.lineAlign&&(a.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==pn?a.left=i+"%":"end"==n.lineAlign&&(a.right=100-i+"%")):(a.height="100%",n.lineAlign==pn?a.right=i+"%":"end"==n.lineAlign&&(a.left=100-i+"%")))),a.lineHeight=n.lineHeight,e=function(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==on?n:"left"===e||"start"===e&&t===dn||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===dn?"line-right":"center"}(n),"line-left"==e?(a.cssFloat="left",null!==n.position&&(a.position="absolute",n.writingMode==hn?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%")):"line-right"==e?(a.cssFloat="right",null!==n.position&&(a.position="absolute",n.writingMode==hn?(a.right=100-n.position+"%",a.width="auto"):a.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(a.position="absolute",n.writingMode==hn?(a.left=n.position+"%",a.width="auto"):a.top=n.position+"%",n.size&&(a.transform="translateX(-50%)")),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==hn?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,i),n=null,t.region&&t.region.id){var o=t.region,s=e.D===4/3?2.5:1.9;if(n=o.id+"_"+o.width+"x"+o.height+(o.heightUnits==Rt?"%":"px")+"-"+o.viewportAnchorX+"x"+o.viewportAnchorY+(o.viewportAnchorUnits==Rt?"%":"px"),e.G.has(n))n=e.G.get(n);else{r=document.createElement("span");var u=o.heightUnits==Rt?"%":"px",l=o.widthUnits==Rt?"%":"px",c=o.viewportAnchorUnits==Rt?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=o.height,h=o.width;2===o.heightUnits&&(d=5.33*o.height,u="%"),2===o.widthUnits&&(h=o.width*s,l="%"),r.style.height=d+u,r.style.width=h+l,2===o.viewportAnchorUnits?(s=o.viewportAnchorY/75*100,u=o.viewportAnchorX/(e.D===4/3?160:210)*100,s-=o.regionAnchorY*d/100,u-=o.regionAnchorX*h/100,r.style.top=s+"%",r.style.left=u+"%"):(r.style.top=o.viewportAnchorY-o.regionAnchorY*d/100+c,r.style.left=o.viewportAnchorX-o.regionAnchorX*h/100+c),0!==o.heightUnits&&0!==o.widthUnits&&0!==o.viewportAnchorUnits&&(o=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=o+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.G.set(n,r),n=r}}r=a,i&&((r=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",a.appendChild(r)),e.l.set(t,{We:a,Ch:r,zc:n})}function Qf(e,t,n,i){i=void 0===i?1:i;
2var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}Ff.prototype.release=function(){this.h&&eo(this.h),this.g=null},Hf.prototype.start=function(t,n,i){var r,a,o,s,u=this;return E((function(l){switch(l.h){case 1:if(u.stop(),u.g++,r=u.g,u.j=!0,a=e.SpeechRecognition||e.webkitSpeechRecognition,o=new a,u.l=o,o.lang=n,o.continuous=!0,o.interimResults=!0,!(i&&"install"in a&&"available"in a)){l.u(2);break}return l.m(3),l.g(a.available({langs:[n],processLocally:!0}),5);case 5:switch(l.i){case"available":o.processLocally=!0;break;case"downloading":case"downloadable":return l.u(6);default:return l.return()}l.u(7);break;case 6:return l.g(a.install({langs:[n],processLocally:!0}),8);case 8:o.processLocally=!0,l.u(7);break;case 7:l.o(2);break;case 3:l.l();case 2:if(r!==u.g)return l.return();s=!1,u.h.I(o,"start",(function(){r===u.g&&u.i.ba(5)})),u.h.I(o,"result",(function(e){var t,n,i,a;return E((function(o){if(1==o.h){if(r!==u.g)return o.return();for(n="",i=(t=e).resultIndex;i<t.results.length;i++)n+=t.results[i][0].transcript;return o.g(function(e,t){var n,i;return E((function(r){return 1==r.h?e.g?(e.m++,n=e.m,r.m(2),r.g(e.g.translate(t),4)):r.return(t):2!=r.h?(i=r.i,n!==e.m?r.return(null):r.return(i)):(r.l(),r.return(null))}))}(u.m,n),2)}if(null===(a=o.i)||r!==u.g)return o.return();u.A(a),u.i.ba(.75),o.j()}))})),u.h.I(o,"error",(function(e){r===u.g&&(s=!0,u.o(),"network"==e.error&&u.i.ba(30))})),u.h.I(o,"end",(function(){u.j&&r===u.g&&(s||u.start(t,n,i))})),o.start(t),l.j()}}))},Hf.prototype.stop=function(e){e=void 0===e||e,this.g++,this.j=!1,this.h.Pa(),this.i.stop(),this.l&&(this.l.stop(),this.l=null),e&&this.o()},Hf.prototype.release=function(){this.stop(),this.m.release()},Hf.prototype.isActive=function(){return this.j},Vf.prototype.release=function(){var e,t;null==(e=this.h)||e.abort(),this.h=null,null==(t=this.g)||t.destroy(),this.j=this.i=this.g=null},(i=Kf.prototype).configure=function(){},i.remove=function(){},i.append=function(){},i.destroy=function(){},i.isTextVisible=function(){return!1},i.setTextVisibility=function(){},i.setTextLanguage=function(){},P("shaka.text.StubTextDisplayer",Kf),Kf.prototype.setTextLanguage=Kf.prototype.setTextLanguage,Kf.prototype.setTextVisibility=Kf.prototype.setTextVisibility,Kf.prototype.isTextVisible=Kf.prototype.isTextVisible,Kf.prototype.destroy=Kf.prototype.destroy,Kf.prototype.append=Kf.prototype.append,Kf.prototype.remove=Kf.prototype.remove,Kf.prototype.configure=Kf.prototype.configure,(i=Xf.prototype).configure=function(e){this.h=e,Wf(this),Jf(this,!0)},i.append=function(e){for(var t=[].concat(g(this.j)),n=(e=p(Mf(e))).next(),i={};!n.done;i={Ve:void 0},n=e.next())i.Ve=n.value,t.some(function(e){return function(t){return en(t,e.Ve)}}(i))||this.j.push(i.Ve);this.j.length&&Wf(this),Jf(this)},i.destroy=function(){return this.g?(this.g.parentElement&&this.o.removeChild(this.g),this.g=null,this.B=!1,this.j=[],null==(e=this.C)||e.stop(),this.C=null,null==(t=this.A)||t.stop(),this.A=null,this.l.clear(),null==(n=this.i)||n.release(),this.i=null,null==(i=this.H)||i.disconnect(),this.H=null,null==(r=this.J)||r.disconnect(),this.J=null,Promise.resolve()):Promise.resolve();var e,t,n,i,r},i.remove=function(e,t){if(!this.g)return!1;var n=this.j.length;return this.j=this.j.filter((function(n){return n.startTime<e||n.endTime>=t})),Jf(this,n>this.j.length),this.j.length||Wf(this),!0},i.isTextVisible=function(){return this.B},i.setTextVisibility=function(e){(this.B=e)?(this.g.parentElement||this.o.appendChild(this.g),Jf(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)},i.setTextLanguage=function(e){e&&"und"!=e?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},P("shaka.text.UITextDisplayer",Xf),Xf.prototype.setTextLanguage=Xf.prototype.setTextLanguage,Xf.prototype.setTextVisibility=Xf.prototype.setTextVisibility,Xf.prototype.isTextVisible=Xf.prototype.isTextVisible,Xf.prototype.remove=Xf.prototype.remove,Xf.prototype.destroy=Xf.prototype.destroy,Xf.prototype.append=Xf.prototype.append,Xf.prototype.configure=Xf.prototype.configure;var Zf=new Q((function(){var e=new Mt;return e.id="shaka-custom-region",e.height=90,e.width=90,e.viewportAnchorX=5,e.viewportAnchorY=5,e}));function ep(e,t){this.g=t,this.j=e,this.m=new Map,this.l=void 0,this.D=!1,this.J=!0,this.A=this.H=!1,this.C=this.B=void 0,this.G=0,this.K={request:!1,event:!1},this.o={},this.i=new Y,this.F=[],this.h=null}function tp(e){if(e.F)for(var t=p(e.F),n=t.next();!n.done;n=t.next())n.value.stop();e.F=[]}function np(e){return(e=e.g.targets)?e.filter((function(e){return e.enabled})):[]}function ip(e){return!!(e=e.g.targets)&&e.some((function(e){return e.events&&e.events.includes("rr")&&e.enabled}))}
2function rp(t){return t.g.sessionId||(t.g.sessionId=e.crypto.randomUUID()),{v:t.g.version,sf:t.l,sid:t.g.sessionId,cid:t.g.contentId,mtp:t.j.getBandwidthEstimate()/1e3}}function ap(e,t,n){if(n=void 0===n?{}:n,t=hp(e,t=Object.assign({e:t,ts:Date.now()},n),Fp),n=e.g.targets,!(e.g.version<Sp)&&n){var i=np(e);n=Array.from(new Set([].concat(g(Dp),g(Np))));for(var r=(i=p(i)).next();!r.done;r=i.next()){var a=sp((r=r.value).includeKeys||[],n);a.includes(Up)||a.push(Up),a.includes("e")||a.push("e");var o=lp(r);e.o[o]||(e.o[o]={request:1,response:1}),t.sn=e.o[o].response++,o=up(t,a),a=r.events||[];var s=o.e,u=o.sta;if(!s||Pp.includes(s)&&("ps"!==s||u&&Op.includes(u))&&(!(a&&a.length>0)||a.includes(s)))e:{if(a=e,s={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},u=r.url,r.useHeaders){if(r=pp(o),!Object.keys(r).length)break e;o=_o([u],s),Object.assign(o.headers,r)}else{if(!(r=fp(o)))break e;o=_o([r=gp(u,r)],s)}a.j.L.request(9,o)}}}}function op(e,t,n){if(e.g.enabled){n=hp(e,n,Bp);var i=lp({mode:Bp,useHeaders:e.g.useHeaders,includeKeys:e.g.includeKeys||[]});e.o[i]||(e.o[i]={request:1,response:1}),n.sn=e.o[i].request++,function(e,t,n,i){if(i){if(t=pp(t),!Object.keys(t).length)return;Object.assign(n.headers,t)}else{var r=fp(t);if(!r)return;n.uris=n.uris.map((function(e){return gp(e,r)}))}!ip(e)&&e.m.has(n)&&e.m.delete(n)}(e,n=up(n,i=sp(i=e.g.includeKeys||[],e.g.version==Sp?Array.from(new Set([].concat(g(Dp),g(Lp)))):Rp)),t,e.g.useHeaders)}}function sp(e,t){if(!e||0===e.length)return t;for(var n=p(e),i=n.next();!i.done;i=n.next())t.includes(i.value);return e.filter((function(e){return t.includes(e)}))}function up(e,t){return Object.keys(e).reduce((function(n,i){return t.includes(i)&&(n[i]=e[i]),n}),{})}function lp(e){var t=Object.keys(e).sort().reduce((function(t,n){return"enabled"!==n&&(t[n]=e[n]),t}),{});return JSON.stringify(t)}function cp(e,t){if(!(t=e.j.cc()[t]).length)return 0;var n=e.h?e.h.currentTime:0;return(e=t.find((function(e){return e.start<=n&&e.end>=n})))?1e3*(e.end-n):0}function dp(e,t,n){var i=t.segment,r=0;i&&(r=i.endTime-i.startTime),(r={d:1e3*r,st:e.j.isLive()?Ep:Ap}).ot=function(e){if(0===e.type)return wp;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?bp:yp;if("audio"==t)return vp;if("text"==t)return"application/mp4"===e.mimeType?xp:Tp}}(t);var a=r.ot===yp||r.ot===vp||r.ot===bp||r.ot===xp;if(t=t.stream){var o=e.j.pb();if(a&&(r.bl=function(e,t){if(!(t=e.j.cc()[t]).length)return NaN;var n=e.h?e.h.currentTime:0;return(e=t.find((function(e){return e.start<=n&&e.end>=n})))?1e3*(e.end-n):NaN}(e,t.type),r.ot!==xp)){var s=cp(e,t.type);r.dl=o?s/Math.abs(o):s}if(t.bandwidth&&(r.br=t.bandwidth/1e3),t.segmentIndex&&i){if((o=t.segmentIndex.Gb(i.endTime,!0,o<0))&&(o=o.next().value)&&o!=i){if(n&&!z(i.P(),o.P())){var u=o.P()[0];s=new URL(u);var l=new URL(n);if(s.origin!==l.origin)n=u;else{n=s.pathname.split("/").slice(1),u=l.pathname.split("/").slice(1,-1),l=Math.min(n.length,u.length);for(var c=0;c<l&&n[c]===u[c];c++)n.shift(),u.shift();for(;u.length;)u.shift(),n.unshift("..");n=n.join("/")+s.search+s.hash}r.nor=n}!o.startByte&&!o.endByte||i.startByte==o.startByte&&i.endByte==o.endByte||(n=o.startByte+"-",o.endByte&&(n+=o.endByte),r.nrr=n)}o=e.j.pb()||1,n=cp(e,t.type)||500,i=(t=t.bandwidth)?t*(i.endTime-i.startTime)/1e3/(n/o/1e3)*e.g.rtpSafetyFactor:NaN,isNaN(i)||(r.rtp=i)}}return a&&r.ot!==xp&&(r.tb=function(e,t){var n=e.j.sc();if(!n.length)return NaN;e=n[0];for(var i=(n=p(n)).next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case yp:return e.videoBandwidth||NaN;case vp:return e.audioBandwidth||NaN;default:return e.bandwidth}}(e,r.ot)/1e3),r}function hp(e,t,n){Object.assign(t,rp(e)),t.pr=e.j.pb();var i=t.ot===yp||t.ot===bp;return e.H&&i&&(t.bs=!0,t.su=!0,e.H=!1),null==t.su&&(t.su=e.J),e.j.isLive()&&(i=xg(e.j),t.ltc=i||void 0),document.hidden&&(t.bg=!0),null==(i=e.C&&e.B?e.C-(e.G||e.B):void 0)||e.K[n]||(t.msd=i,e.K[n]=!0),t}function fp(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}
2for(var i,r=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n,ttfb:n,ttlb:n},o=Object.keys(e||{}).sort(),s=(o=p(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 l,c=a[s];c&&(u=c(u)),l="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(l)}}return r.join(",")}function pp(e){for(var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3},o=(t=p(t)).next();!o.done;o=t.next())r[null!=a[o=o.value]?a[o]:1][o]=e[o];for(e=0;e<r.length;e++)(a=fp(r[e]))&&(n["CMCD-"+i[e]]=a);return n}function gp(e,t){return!t||e.includes("offline:")?e:((e=new re(e)).g.set("CMCD",t),e.toString())}P("shaka.text.WebVttGenerator",(function(){})),ep.prototype.setMediaElement=function(t){this.h=t,function(t){t.i.I(t.h,"playing",(function(){t.C||(t.C=Date.now()),ap(t,"ps",{sta:"p"})})),t.i.I(t.h,"volumechange",(function(){ap(t,t.h.muted?"m":"um")})),t.i.I(t.h,"play",(function(){t.B||(t.B=Date.now(),ap(t,"ps",{sta:"s"}))})),t.i.I(t.h,"pause",(function(){ap(t,"ps",{sta:"a"})})),t.i.I(t.j,"buffering",(function(){ap(t,"ps",{sta:"w"})})),t.i.I(t.h,"seeking",(function(){return ap(t,"ps",{sta:"k"})})),t.i.I(document,"fullscreenchange",(function(){ap(t,document.fullscreenElement?"pe":"pc")}));var n=t.h;(n.webkitPresentationMode||n.webkitSupportsFullscreen)&&t.i.I(n,"webkitpresentationmodechanged",(function(){n.webkitPresentationMode?ap(t,"inline"!==n.webkitPresentationMode?"pe":"pc"):n.webkitSupportsFullscreen&&ap(t,n.webkitDisplayingFullscreen?"pe":"pc")})),t.i.I(t.h,"enterpictureinpicture",(function(){ap(t,"pe")})),t.i.I(t.h,"leavepictureinpicture",(function(){ap(t,"pc")})),"documentPictureInPicture"in e&&t.i.I(e.documentPictureInPicture,"enter",(function(e){ap(t,"pe"),t.i.Ja(e.window,"pagehide",(function(){ap(t,"pc")}))})),t.i.I(document,"visibilitychange",(function(){document.hidden?ap(t,"b",{bg:!0}):ap(t,"b")})),t.i.I(t.j,"complete",(function(){ap(t,"ps",{sta:"e"})}))}(this)},ep.prototype.configure=function(e){this.g=e,function(e){tp(e);for(var t=np(e),n=(t=p(t)).next();!n.done;n=t.next())if(void 0===(n=n.value.timeInterval)&&(n=jp),n>=1){var i=new ti((function(){return ap(e,_p)}));i.Aa(n),e.F.push(i)}}(this)};var mp="m",vp="a",yp="v",bp="av",wp="i",Tp="c",xp="tt",Sp=2,Ap="v",Ep="l",kp="d",Cp="ld",Ip="h",Mp="lh";P("shaka.util.CmcdManager.StreamingFormat",{DASH:kp,Ej:Cp,HLS:Ip,Fj:Mp,Hj:"s",OTHER:"o"});var Rp="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),Dp="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),Lp="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),Np="e sta d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),Pp="ps e t c b m um pe pc rr".split(" "),Op="spawkrfeqd".split(""),jp=10,Up="ts",_p="t",Bp="request",Fp="event";function Hp(e){this.h=e,this.g=null}
2function Vp(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}(i=Hp.prototype).configure=function(e){this.h=e},i.Dg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Kp)?1e3*this.g.get(Kp):null},i.Bg=function(){return this.h.enabled&&this.g&&this.g.has(Gp)?1e3*this.g.get(Gp):null},i.zi=function(){return this.h.enabled&&this.g&&this.g.has(Xp)?this.g.get(Xp):null},i.Ai=function(){return this.h.enabled&&this.g&&this.g.has(Wp)?this.g.get(Wp):null},i.getBandwidthEstimate=function(e){var t=this.Bg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e},P("shaka.util.CmsdManager",Hp),Hp.prototype.getBandwidthEstimate=Hp.prototype.getBandwidthEstimate,Hp.prototype.getRoundTripTime=Hp.prototype.Ai,Hp.prototype.getResponseDelay=Hp.prototype.zi,Hp.prototype.getEstimatedThroughput=Hp.prototype.Bg,Hp.prototype.getMaxBitrate=Hp.prototype.Dg;var Gp="etp",Kp="mb",Xp="rd",Wp="rtt";function zp(){this.g=null,this.h=[]}function qp(e,t){return E((function(n){if(1==n.h)return e.g?n.g(new Promise((function(t){return e.h.push(t)})),2):n.u(2);e.g=t,n.j()}))}function Yp(t,n,i){n=void 0===n?null:n,No.call(this);var r,a,o,s=this;this.l=em,this.h=null,this.$b=n,this.Ca=!1,this.Kd=new Y,this.Cd=new Y,this.m=new Y,this.Mb=new Y,this.Zc=new Y,this.F=this.G=this.B=this.L=null,this.Md=0,this.ma=new zp,this.S=this.Ga=this.ea=this.i=this.Yb=this.H=this.j=this.Bd=this.Z=this.og=this.Ba=this.K=this.Ra=this.ka=this.Zb=this.U=this.Ka=this.M=this.Kb=null,this.Wa=!1,this.Ed=this.A=null,this.Ld=1e9,this.Jd=[],this.Xb=new Map,this.Id=[],this.Je=-1,this.g=kg(this),this.Ne={streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}},this.$=null,this.Nd=-1,this.Lb=null,this.Ha={width:1/0,height:1/0},this.He=new Sc(this.g,this.Ha,null),this.Gd=[],this.o=null,this.O=this.g.adaptationSetCriteriaFactory(),Bh(n={preferredAudio:this.g.preferredAudio,preferredVideo:this.g.preferredVideo,language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,keySystem:this.keySystem()}),this.O.configure(n),this.Hd=(null==(r=this.g.preferredText[0])?void 0:r.language)||"",this.Le=(null==(a=this.g.preferredText[0])?void 0:a.role)||"",this.Ke=(null==(o=this.g.preferredText[0])?void 0:o.forced)||!1,this.Dd=[],i&&i(this),this.K=new ep(this,this.g.cmcd),this.Ba=new Hp(this.g.cmsd),this.L=cg(this),this.sa=this.ua=this.Ia=this.C=null,this.Pe=!1,this.Me=[],this.Oe=ne
2w ti((function(){return E((function(e){return 1==e.h?s.ua?e.g(s.Rb(s.sa,!0),3):e.u(0):4!=e.h?e.g(s.load(s.ua),4):(s.Pe?s.sa.pause():s.sa.play(),s.ua=null,s.Pe=!1,void e.j())}))})),am&&(this.C=am(this),this.C.configure(this.g.ads),this.Zc.I(this.C,"ad-content-pause-requested",(function(e){var t,n;return E((function(i){if(1==i.h)return s.Oe.stop(),s.ua?i.u(0):(s.sa=s.h,s.Pe=s.ld(),t=e.saveLivePosition||!1,n=!0,s.isLive()&&(n=t),i.g(s.yg(!0,n),3));s.ua=i.i,i.j()}))})),this.Zc.I(this.C,"ad-content-resume-requested",(function(e){if(e=e.offset||0,s.ua){var t=s.ua;t.A&&e&&("number"==typeof t.A?t.A+=e:t.A.setTime(t.A.getTime()+1e3*e))}s.Oe.ba(.1)})),this.Zc.I(this.C,"ad-content-attach-requested",(function(){return E((function(e){if(1==e.h)return s.h||!s.sa?e.u(0):e.g(s.Rb(s.sa,!0),3);s.sa=null,e.j()}))}))),om&&(this.Ia=om(this),this.Ia.configure(this.g.queue)),this.Kd.I(e,"online",(function(){Wg(s),s.Vf()})),this.Fd=new ti((function(){for(var e=Date.now()/1e3,t=!1,n=!0,i=p(s.i.variants),r=i.next();!r.done;r=i.next())(r=r.value).disabledUntilTime>0&&r.disabledUntilTime<=e&&(r.disabledUntilTime=0,t=!0),r.disabledUntilTime>0&&(n=!1);n&&s.Fd.stop(),t&&Og(s,!1,void 0,!1,!1)})),this.J=this.D=this.Za=null,t&&(F("Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Rb(t,!0))}function Jp(e){null!=e.Z&&(pt(e.Z),e.Z.release(),e.Z=null)}function $p(e,t){return new Lo(e,t)}function Qp(e,t){e.dispatchEvent($p("onstatechange",(new Map).set("state",t)))}function Zp(e,t){var n;return E((function(i){return 1==i.h?(n=++e.Md,i.g(qp(e.ma,t),2)):n!=e.Md?(e.ma.release(),i.return(!0)):i.return(!1)}))}function eg(e,t){var n,i,r;return t=void 0!==t&&t,E((function(a){if(1==a.h)return n=null,e.i&&e.H&&e.Yb&&e.ea&&e.g?(i=e.h.currentTime,t||(i=null),a.g(ng(e,e.ea,i,e.Ga,e.g,!0,!1),3)):a.u(2);if(2!=a.h){n=a.i,e.Gd.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null),(r=e.j?e.j.o:null)&&(n.h=r);var o=n,s=e.H,u=e.Yb;o.g=e.i,o.m=s,o.J=u,n.l=e.O,n.start(),e.i=null,e.H=null,e.Yb=null,e.A=null,e.Ed=null}return a.return(n)}))}function tg(e,t,n,i,r,a){var o,s,u;return r=void 0!==r&&r,E((function(l){return 1==l.h?i?l.u(2):l.g(ig(e,t),3):(2!=l.h&&(i=l.i),function(e,t){if(!ao(Z()))return!0;if(t){if(""==(e.h||to()).canPlayType(t))return!1;if(!ao(Z())||!yt.has(t))return!0;if(Vn(t))return"WEBKIT"===Z().va()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i)?l.return(null):(o=a||e.g,s=!1,r&&e.h&&"AUDIO"===e.h.nodeName&&(s=!0),u=ng(e,t,n,i||null,o,!r,s),u=r?u.then((function(e){return e.G=!1,e})):u.then((function(t){return e.Gd.push(t),t})),l.return(u)))}))}function ng(e,t,n,i,r,a,o){var s,u,l,c,d,h,f,g,m,v,y,b,w;return a=void 0===a||a,o=void 0!==o&&o,E((function(T){return 1==T.h?(s=null,u=Bt(r),o&&(u.manifest.disableVideo=!0),l=function(){return s.U&&s.F?null:s},c=function(){return l()?l().getConfiguration():e.g},e.Ha.width!=1/0||e.Ha.height!=1/0||e.g.ignoreHardwareResolution?T.u(2):(d=Z(),T.g(d.Fb(),3))):(2!=T.h&&(h=T.i,e.Ha.width=h.width,e.Ha.height=h.height),f=new Sc(u,e.Ha,null),g={networkingEngine:e.L,filter:function(e){var t;return E((function(n){return 1==n.h?n.g(Ac(f,e),2):4!=n.h?n.i?(t=$p("trackschanged"),n.g(Promise.resolve(),4)):n.u(0):(s.dispatchEvent(t),void n.j())}))},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=p(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(r=(i=p(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var a=p(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 uu,l=r.closedCaptions.get(o);s={id:e.Ld++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",supplementalCodecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:lt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Pn(s,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(e){Kd(s.K,e)},onEvent:function(e){return s.dispatchEvent(e)},onError:function(e){return s.onError(e)},isLowLatencyMode:function(){return c().streaming.lowLatencyMode},updateDuration:function(){e.j&&s.U&&e.j.updateDuration()},newDrmInfo:function(e){var t=s.j,n=t?t.g:null;n&&t.A&&Cc(f,n.keySystem,e)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.isLive()).set("isInProgress",e.Qc());s.dispatchEvent($p("manifestupdated",t)),Yh(s,!1,(function(){e.C&&e.C.onManifestUpdated(e.na())}))},getBandwidthEstimate:function(){return e.A.getBandwidthEstimate()},onMetadata:function(t,n,i,r){var a=t;"com.apple.hls.interstitial"!=t&&"com.apple.hls.overlay"!=t||(a="com.apple.quicktime.HLS");var o={type:a,startTime:n,endTime:i,values:r},u=!1;t=new Promise((function(t){Yh(s,!1,(function(){return E((function(n){switch(n.h){case 1:if(!e.C){n.u(0);break}if(u=!0,!e.h){n.u(3);break}return n.m(4),n.g(e.C.onHLSMetadata(o),6);case 6:n.o(3);break;case 4:n.l();case 3:t(),n.j()}}))}))}));for(var l=(r=p(r)).next(),c={};!l.done;c={Nf:void 0},l=r.next())c.Nf=l.value,"ID"!=c.Nf.name&&Yh(s,!1,function(t){return function(){lg(e,n,i,a,t.Nf)}}(c));return u?t:Promise.resolve()},disableStream:function(t){return e.disableStream(t,e.g.streaming.maxDisabledTime)},addFont:function(t,n){return e.addFont(t,n)},getStreamingRetryParameters:function(){return e.g.streaming.retryParameters}},(m=new Gd((function(){return e.bb()}
2))).addEventListener("regionadd",(function(t){var n=t.region;qg(e,"timelineregionadded",n,s),Yh(s,!1,(function(){e.C&&e.C.onDASHMetadata(n)}))})),v=null,u.streaming.observeQualityChanges&&((v=new tu((function(){return e.cc()}))).addEventListener("qualitychange",(function(t){Yg(e,t.quality,t.position)})),v.addEventListener("audiotrackchange",(function(t){Yg(e,t.quality,t.position,!0)}))),y=!0,b={wc:e.L,onError:function(e){return s.onError(e)},$g:function(t){Yh(s,!0,(function(){e.B&&function(e,t){var n=$p("keystatuschanged");e.dispatchEvent(n);var i=Object.keys(t);1==i.length&&""==i[0]&&(i=["00"],t={"00":t[""]});var r=1==i.length&&"00"==i[0];if(n=!1,i.length){i=e.keySystem();for(var a=qo(e.g.drm.clearKeys),o=function(n,i){n.allowedByKeySystem=!0;for(var a=(i=p(i)).next();!a.done;a=i.next())a=a.value,((a=t[r?"00":a])||e.B.G)&&(n.allowedByKeySystem=n.allowedByKeySystem&&!!a&&!Mc.includes(a))},s=p(e.i.variants),u=s.next();!u.done;u=s.next())for(var l=Oi(u=u.value),c=(l=p(l)).next();!c.done;c=l.next()){c=c.value;var d=u.allowedByKeySystem;if(c.keyIds.size)if(c.drmInfos.length&&!a.size&&"HLS"==e.i.type)for(var h=p(c.drmInfos),f=h.next();!f.done;f=h.next())(f=f.value).keySystem==i&&(f.keyIds.size?o(u,f.keyIds):o(u,c.keyIds));else o(u,c.keyIds);d!=u.allowedByKeySystem&&(n=!0)}}n&&(Bg(e),(n=e.j.o)&&!n.allowedByKeySystem?Og(e):Ng(e))}(e,t)}))},onExpirationUpdated:function(e,t){var n=$p("expirationupdated");s.dispatchEvent(n),(n=s.m)&&n.onExpirationUpdated&&n.onExpirationUpdated(e,t)},onEvent:function(t){if(s.dispatchEvent(t),"drmsessionupdate"==t.type&&y){y=!1,t=Date.now()/1e3-s.Ca;var n=e.o||s.getStats();t>=0&&(n.m=t),e.Z&&pt(e.Z)}}},w=cg(e,l),function(e,t){for(var n=p(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=p(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}(e.L,w),s=new qh(t,i,n,{config:u,Si:g,dj:m,cj:v,Vd:function(){return e.Vd(b)},Ri:f,networkingEngine:w,Jh:a}),T.return(s))}))}function ig(e,t){var n,i;return E((function(r){return 1==r.h?(n=e.g.manifest.retryParameters,r.g(yu(t,e.L,n),2)):(Vn(i=r.i)?"WEBKIT"===Z().va()&&(i="application/vnd.apple.mpegurl"):"video/quicktime"===i&&"CHROMIUM"===Z().va()&&(i="video/mp4"),r.return(i))}))}function rg(e,t){var n=e.g.textDisplayFactory;e.ng!==n||void 0!==t&&t?(t=e.D,e.D=n(e),e.D.configure(e.g.textDisplayer),t?(e.D.setTextVisibility(t.isTextVisible()),t.destroy().catch((function(){}))):e.D.setTextVisibility(e.Ca),e.G&&function(e,t){e.ea=t,e.h&&(e.h.j=t)}(e.G,e.D),e.ng=n,e.j&&function(e){var t=e.h.get(lt);t&&oh(e,t.stream,!0,0,!0)}(e.j)):e.D&&e.D.configure(e.g.textDisplayer)}function ag(e){var t,n,i;return E((function(r){if(1==r.h)return Z(),Qp(e,"media-source"),e.g.mediaSource.useSourceElements&&Za(e.h),rg(e),t=function(e,t,n,i,r){return new Dc(e,t,n,r,i)}(e.h,e.D,{ed:function(){return e.keySystem()},onMetadata:function(t,n,i){for(var r=(t=p(t)).next();!r.done;r=t.next())if((r=r.value).data&&"number"==typeof r.cueTime&&r.frames){var a=r.cueTime+n,o=i;o&&a>o&&(o=a);for(var s=p(r.frames),u=s.next();!u.done;u=s.next())lg(e,a,o,"org.id3",u.value);e.C&&e.C.onHlsTimedMetadata(r,a)}},Zi:function(t){e.Ra&&Kd(e.Ra,{schemeIdUri:t.schemeIdUri,startTime:t.startTime,endTime:t.endTime,id:String(t.id),emsg:t})},onEvent:function(t){return e.dispatchEvent(t)},aj:function(){e.H&&e.H.update&&e.H.update()}},e.Z,e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ha=i,r.g(t.K.promise,2);e.G=t,r.j()}))}function og(e,t){e.M=new hd({yf:function(){return t.playbackRate},Lc:function(){return t.defaultPlaybackRate},oh:function(e){t.playbackRate=e},Vi:function(e){t.currentTime+=e},isPaused:function(){return t.paused}})}function sg(e,t,n){e.m.Jb(t,["playing","pause","ended"],(function(){Mg(e)})),e.m.I(t,"ratechange",(function(){var t=e.h.playbackRate;0!=t&&(e.M&&(e.M.set(t),e.l==tm&&e.A.playbackRateChanged(t),Ig(e,t)),t=$p("ratechange"),e.dispatchEvent(t))}));var i=oo(Z(),t);if(i&&(e.m.I(i,"connect",(function(){e.j&&"connected"==i.state&&Gg(e),Bg(e)})),e.m.I(i,"connecting",(function(){return Bg(e)})),e.m.I(i,"disconnect",(function(){return E((function(t){if(1==t.h)return e.j&&"disconnected"==i.state?t.g(kh(e.j),3):t.u(2);2!=t.h&&Gg(e),Bg(e),t.j()}))}))),t.audioTracks&&e.m.Jb(t.audioTracks,["addtrack","removetrack","change"],(function(){Bg(e)}
2)),t.videoTracks&&e.m.Jb(t.videoTracks,["addtrack","removetrack","change"],(function(){Bg(e)})),(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.m.I(t,"webkitpresentationmodechanged",(function(){e.$b&&rg(e,!0)})),t.textTracks){var r=function(){e.l===nm&&e.D instanceof Df&&Gg(e),Bg(e)};e.m.I(t.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){if("metadata"==t.kind){t.mode="hidden";var n=function(){if(t.cues){for(var n=[],i=p(t.cues),r=i.next(),a={};!r.done;a={wb:void 0},r=i.next())a.wb=r.value,null!=a.wb.startTime&&"type"in a.wb&&(r=n.find(function(e){return function(t){return t.startTime==e.wb.startTime&&t.endTime==e.wb.endTime}}(a)),r||(r={type:a.wb.type,startTime:a.wb.startTime,endTime:a.wb.endTime,values:[]},n.push(r)),a.wb.value&&"X-AD-CREATIVE-SIGNALING"==a.wb.value.key&&(r.type="urn:svta:advertising-wg:ad-creative-signaling"),r.values.push(a.wb.value));for(i=(n=p(n)).next();!i.done;i=n.next())i=i.value,e.C&&(i.values.some((function(e){return"X-ASSET-URI"==e.key||"X-ASSET-LIST"==e.key}))&&(a=0==i.startTime&&!e.na(),i.values.push({key:"CUE",description:"",data:a?"ONCE,PRE":"ONCE",mimeType:null,pictureType:null})),e.C.onHLSMetadata(i))}};e.m.I(t,"cuechange",(function(){if(t.activeCues)for(var i=p(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,lg(e,r.startTime,r.endTime,r.type,r.value),e.C&&e.C.onCueMetadataChange(r.value);n()})),n();var i=new ti((function(){for(var t=function(e){return Array.from(e.h.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=p(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Qa().ba(.5);e.Dd.push((function(){i.stop()}))}}(e,t);break;case"chapters":!function(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new ti((function(){t.mode="hidden"})).Qa().ba(.5);e.Dd.push((function(){n.stop()}))}}(e,t);break;default:r()}})),e.m.Jb(t.textTracks,["removetrack","change"],r)}"none"!=t.preload&&e.m.Ja(t,"loadedmetadata",(function(){var t=e.o,i=Date.now()/1e3-n;i>=0&&(t.F=i)}))}function ug(e,t,n){t=(new Map).set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent($p(n,t))}function lg(e,t,n,i,r){e.ka&&((t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r}).id=JSON.stringify(t),Kd(e.ka,t))}function cg(e,t){function n(n){t()?t().dispatchEvent(n):e.dispatchEvent(n)}function i(e){t()?Yh(t(),!0,e):e()}t||(t=function(){return null});var r=new jo((function(t,n,r,a,o){i((function(){e.A&&e.A.segmentDownloaded(t,n,r,a,o)}))}),(function(t,r,a){n($p("downloadheadersreceived",r=(new Map).set("headers",t).set("request",r).set("requestType",a))),i((function(){if(e.Ba){var n=e.Ba;if(n.h.enabled){var i=t["cmsd-static"];if(i)try{var r=new Map,a=i.split(",");for(i=0;i<a.length;i++){var o=a[i].split("=");r.set(o[0],Vp(o[1]))}}catch(e){}if(r=t["cmsd-dynamic"]){e:{try{var s=new Map,u=r.split(";");for(r=1;r<u.length;r++){var l=u[r].split("=");s.set(l[0],Vp(l[1]))}var c=s;break e}catch(e){c=null;break e}c=void 0}c&&(n.g=c)}}}}))}),(function(e,t,i,r){n($p("downloadcompleted",e=(new Map).set("requestType",e).set("request",t).set("context",i).set("response",r)))}),(function(e,t,i,r,a,o){n($p("downloadfailed",e=(new Map).set("requestType",e).set("request",t).set("context",i).set("error",r).set("httpResponseCode",a).set("aborted",o)))}),(function(t,n,r){i((function(){if(e.K){var i=e.K,a=r;if(a=void 0===a?{}:a,i.g.enabled)if("HEAD"===n.method)op(i,n,{});else switch(t){case 0:try{if(i.g.enabled){if(a.type){e:{switch(a.type){case 4:var o=i.A?Cp:kp;break e;case 3:case 2:o=i.A?Mp:Ip;break e}o=void 0}i.l=o}op(i,n,{ot:mp,su:!i.D})}}catch(e){H("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case Go:try{if(i.g.enabled){var s=dp(i,a,n.uris[0]);s.ts=Date.now(),i.m.has(n)&&i.m.delete(n),i.m.set(n,s.ts),op(i,n,s)}}catch(e){H("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:op(i,n,{ot:"k"});break;case 4:op(i,n,{ot:"o"})}}}))}),(function(n,i,r,a){(n=t()?t().m:e.H)&&n.banLocation&&n.banLocation(a)}),(function(n,i,r){if(i.data){var a=i.data.byteLength,o=t()?t().getStats():e.o;if(o&&(zh(o,a),0===n&&(o.Qg=a)),r=void 0===r?{}:r,ip(a=e.K)&&n===Go)try{var s=dp(a,r,i.uri);i.originalRequest&&null!=i.originalRequest.timeToFirstByte&&(s.ttfb=i.originalRequest.timeToFirstByte),null!=i.timeMs&&(s.ttlb=i.timeMs);var u=i.originalUri||i.uri;if(u.includes("CMCD="))try{var l=new URL(u);l.searchParams.delete("CMCD");var c=l.toString()}catch(e){c=u}else c=u;s.url=c,s.rc=i.status||0,a.m.has(i.originalRequest)?(s.ts=a.m.get(i.originalRequest),a.m.delete(i.originalRequest)):s.ts||(s.ts=Date.now()),i.headers&&i.headers["CMSD-Static"]&&(s.cmsds=btoa(i.headers["CMSD-Static"])),i.headers&&i.headers["CMSD-Dynamic"]&&(s.cmsdd=btoa(i.headers["CMSD-Dynamic"])),ap(a,"rr",s)}catch(e){H("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",e)}}}));return r.configure(e.g.networking),r}function dg(e,t,n){e.U=new Ll,Nl(e.U,Pl),hg(e),Cg(e),e.Ka=new ti((function(){fg(e)})),e.g.streaming.rebufferingGoal&&e.Ka.Aa(.25),e.m.I(t,"waiting",(function(){return fg(e,"waiting")})),e.m.I(t,"canplaythrough",(function(){return fg(e,"canplaythrough")})),e.m.I(t,"playing",(function(){return fg(e,"playing")})),e.m.I(t,"seeked",(function(){return fg(e,"seeked")}
2)),e.m.I(t,"timeupdate",(function(){return fg(e,"timeupdate")})),n&&(e.m.I(t,"progress",(function(){return fg(e,"progress")})),e.m.I(t,"stalled",(function(){return fg(e,"stalled")})))}function hg(e){var t=e.g.streaming.rebufferingGoal;e.U.j.set(Ol,Math.min(.5,t/2)).set(Pl,t)}function fg(e,t){if(e.g.streaming.rebufferingGoal){t=!!e.G&&jc(e.G),t=e.ld()||t||e.F.Jg();var n=mc(e.h.buffered,e.h.currentTime),i=e.U,r=i.j.get(i.g);Nl(i,t||n>=r&&n>0?Ol:Pl)&&Cg(e)}else if(t){n=e.U,i=e.h.currentTime,r=n.h,n.h=i;var a=void 0;switch(t){case"seeking":case"waiting":n.h=-1,a=Pl;break;case"canplaythrough":case"playing":case"seeked":a=Ol;break;case"timeupdate":r>=0&&i-r>.01&&(a=Ol)}void 0!==a&&Nl(n,a)&&Cg(e)}}function pg(e,t){if(e.He=new Sc(e.g,e.Ha,e.B),e.H){var n=Bt(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(n.disableVideo=!0),e.H.configure(n)}if(e.B&&e.B.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.l!=Zg&&kc(e.He,e.i)&&Bg(e)}catch(t){zg(e,t)}e.A&&Ng(e),!(n=e.j.o)||n.allowedByApplication&&n.allowedByKeySystem||Og(e)}if(e.L&&e.L.configure(e.g.networking),e.G&&(e.G.configure(e.g.mediaSource),e.G.Ha=e.g.manifest.segmentRelativeVttTiming),e.D&&rg(e),e.A&&(e.A.configure(e.g.abr),e.g.abr.enabled?e.A.enable():e.A.disable(),Kg(e)),e.U&&hg(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Aa(.25):e.Ka.stop()),e.i&&$g(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.K&&e.K.configure(e.g.cmcd),e.Ba&&e.Ba.configure(e.g.cmsd),e.Ia&&e.Ia.configure(e.g.queue),n=e.l==tm||e.l==nm,e.g.accessibility.speechToText.enabled?e.J?e.J.configure(e.g.accessibility.speechToText):(e.J=new Nf(e),e.J.configure(e.g.accessibility.speechToText),n&&Gg(e)):e.J&&(e.J.release(),e.J=null,n&&Gg(e)),e.l==tm&&e.O.getConfiguration){n=e.O.getConfiguration();var i=!1;Ht(t.preferredVideo)!=Ht(e.g.preferredVideo)&&(n.preferredVideo=e.g.preferredVideo,i=!0),Ht(t.preferredAudio)!=Ht(e.g.preferredAudio)&&(n.preferredAudio=e.g.preferredAudio,i=!0),i&&(Bh(n),e.O.configure(n),Og(e))}t=$p("configurationchanged"),e.dispatchEvent(t)}function gg(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function mg(e,t){var n,i;return E((function(r){return 1==r.h?e.l!=tm&&e.l!=nm?r.return(null):(n=e.Jd,e.i&&(n=e.i.imageStreams),(i=n[0])?(null!=t&&(i=n.find((function(e){return e.id==t}))),i?i.segmentIndex?r.u(2):r.g(i.createSegmentIndex(),2):r.return(null)):r.return(null)):r.return(i)}))}function vg(e,t,n,i){var r=e.P();if(!r.length)return null;var a=t.width||0,o=t.height||0,s=a/i.columns,u=o/i.rows,l=i.columns*i.rows,c=e.l-e.startTime;c=e.C||c/l;var d=e.startTime,h=0,f=0;return l>1&&(f=Math.floor((n-e.startTime)/c+1e-4),d=e.startTime+f*c,h=f%i.columns*s,f=Math.floor(f/i.columns)*u),d>=e.endTime||Rc(d,e.endTime,1e-4)?null:(i=!1,(n=e.thumbnailSprite)&&(i=!0,u=n.height,h=n.positionX,f=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:a,height:u,positionX:h,positionY:f,startTime:d,duration:c,uris:r,startByte:e.fc(),endByte:e.dc(),width:s,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}function yg(e,t){e.m.I(t,"cuechange",(function(){e.D.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));for(var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]),a=(r=p(r)).next();!a.done;a=r.next()){if((a=a.value).endTime===1/0||a.endTime<a.startTime)a=null;else{var o=new Qt(a.startTime,a.endTime,a.text);o.line="number"==typeof a.line?a.line:null,a.lineAlign&&(o.lineAlign=a.lineAlign),o.lineInterpretation=a.snapToLines?fn:1,o.position="number"==typeof a.position?a.position:null,a.positionAlign&&(o.positionAlign=a.positionAlign),o.size=a.size,o.textAlign=a.align,"lr"===a.vertical?o.writingMode="vertical-lr":"rl"===a.vertical&&(o.writingMode="vertical-rl"),a.region&&(o.region.id=a.region.id,o.region.height=a.region.lines,o.region.heightUnits=2,o.region.regionAnchorX=a.region.regionAnchorX,o.region.regionAnchorY=a.region.regionAnchorY,o.region.scroll=a.region.scroll,o.region.viewportAnchorX=a.region.viewportAnchorX,o.region.viewportAnchorY=a.region.viewportAnchorY,o.region.viewportAnchorUnits=Rt,o.region.width=a.region.width,o.region.widthUnits=Rt),tn(o),a=o}a&&((o=e.g.mediaSource.modifyCueCallback)&&o(a,null,n),i.push(a))}e.D.append(i)})),t.mode=document.pictureInPictureElement?"showing":"hidden"}function bg(e){return Array.from(e.h.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function wg(e){return e.h&&e.h.textTracks?Array.from(e.h.textTracks).filter((function(e){return"chapters"==e.kind})):[]}function Tg(e,t){t=!!t,e.Ca!=t&&(e.Ca=t,e.l==tm?(e.D.setTextVisibility(t),t?e.j.C||(t=Ni(e.i.textStreams,e.Hd,e.Le,e.Ke)).length>0&&(ah(e.j,t[0]),Gg(e),Xg(e)):function(e){var t=e.h.get(lt);
2t&&(xh(t),Sh(t).catch((function(){})),e.F=e.h.get(lt),e.h.delete(lt),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.C=null}(e.j)):e.h&&e.h.src&&e.h.textTracks&&e.D.setTextVisibility(t))}function xg(e){if(!e.h||!e.h.currentTime)return null;var t=e.Eg();return t?Math.floor(Date.now()-(t.getTime()+1e3*e.h.currentTime)):null}function Sg(e,t){var n;return E((function(i){switch(i.h){case 1:return i.m(2),i.g(yu(t,e.L,e.g.streaming.retryParameters),4);case 4:n=i.i,i.o(3);break;case 2:i.l();case 3:if(n)return i.return(n);throw new _e(1,2,2011,t)}}))}function Ag(e,t){var n,i,r,a;return E((function(o){if(1==o.h){n=Go,i=e.g.streaming.retryParameters,(r=_o([t],i)).method="GET";var s=e.K;try{s.g.enabled&&op(s,r,{ot:Tp,su:!0})}catch(e){H("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return o.g(e.L.request(n,r).promise,2)}return a=o.i,o.return(a.data)}))}function Eg(e,t,n,i){var r=zn(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=xe(t),function(e,t){function n(e){for(var n=e,i=p(t),r=i.next();!r.done;r=i.next())(r=r.value).end&&r.start<e&&(n+=r.end-r.start);return((e=Math.floor(n/3600))<10?"0":"")+e+":"+((i=Math.floor(n/60%60))<10?"0":"")+i+":"+((r=Math.floor(n%60))<10?"0":"")+r+"."+((n=Math.floor(1e3*n%1e3))<100?n<10?"00":"0":"")+n}var i=If(e);e="WEBVTT\n\n";for(var r=(i=p(i)).next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case sn:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n",e+=r.payload+"\n\n";return e}(t=n.parseMedia(t,e,null,[]),i);throw new _e(2,2,2014,n)}function kg(e){var t=Uh();return t.streaming.failureCallback=function(t){if(e.na()){var n=null;1001==t.code||1002==t.code?(n=1,e.g.streaming.lowLatencyMode&&(n=.1)):1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.Vf(n))}},t.textDisplayFactory=function(t){if(e.$b){var n=e.h;n=!(n.webkitDisplayingFullscreen||n.webkitPresentationMode&&"inline"!=n.webkitPresentationMode)}else n=!1;return n?new Xf(t):"track"in document.createElement("track")?new Df(t):new Kf},t}function Cg(e){var t=e.Kg();if(e.o&&e.U&&e.F){if(0==e.g.streaming.rebufferingGoal){var n=e.M;n.j=!1,fd(n)}else(n=e.M).j=t,fd(n);if(e.K&&(n=e.K,t||n.D||(n.D=!0),n.D&&t&&(n.H=!0,ap(n,"ps",{sta:"r"})),n.J=t),Mg(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Nd<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.$&&(e.$=Math.min(e.$+ ++e.Nd*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent($p("buffering",t))}function Ig(e,t){e.Mb.Pa(),e.Mb.I(e.h,"timeupdate",(function(){var n=e.h.currentTime,i=e.bb(),r=e.na(),a=r?e.g.streaming.safeSeekOffset:0;t>0?r&&t>1&&Math.floor(n)>=Math.floor(i.end)&&e.bd():Math.floor(n)<=Math.floor(i.start+a)&&e.bd()}))}function Mg(e){if(e.o&&e.U){var t=e.o.g,n="playing";e.U.g==Pl?n="buffering":e.ld()?n="ended":e.h.paused&&(n="paused");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent($p("statechanged",n)))}}function Rg(e){var t=e.h.playbackRate,n=e.na();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Ag();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.xd(i,!1):1==r&&t!==e.M.Lc()&&e.bd()}if(n&&(n=e.bb(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var a=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var o=e.g.streaming.liveSync.targetLatency,s=o+i,u=Math.max(0,o-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(o=e.i.serviceDescription.targetLatency,null!=e.i.serviceDescription.targetLatency?s=e.i.serviceDescription.targetLatency+i:null!=e.i.serviceDescription.maxLatency&&(s=e.i.serviceDescription.maxLatency),null!=e.i.serviceDescription.targetLatency?u=Math.max(0,e.i.serviceDescription.targetLatency-i):null!=e.i.serviceDescription.minLatency&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.$||"number"!=typeof o||(e.$=o);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Lb&&null!==e.$&&"number"==typeof o&&e.Nd<d&&Date.now()-e.Lb>1e3*a&&(a=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.$=Math.max(e.$-(o-a)/2,a+i),e.Lb=Date.now()),r&&null!==e.$&&(s=e.$+i,u=e.$-i),o=n.end-e.h.currentTime,i=0,e.l==nm&&(r=e.h.buffered).length>0&&(i=r.end(r.length-1),i=Math.max(l,i-n.end)),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,a=Date.now()-e.U.i,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&a<=r?t!=c&&e.xd(c,!1):null!=s&&l&&o-i>s?(t!=l&&e.xd(l,!1),e.Lb=null):null!=u&&c&&o-i<u?(t!=c&&e.xd(c,!1),e.Lb=null):t!==e.M.Lc()&&(e.bd(),e.Lb=Date.now())}}function Dg(e,t,n){return!!((Rc(t,n,.01)||n>t)&&e.Je<t)&&(e.Je=t,!0)}function Lg(e){if(e.h){var t=e.bb();if(t=(t=t.end-t.start)>0?e.h.currentTime/t:0,!isNaN(t)){if(Dg(e,0,t*=100))var n=$p("started");else Dg(e,25,t)?n=$p("firstquartile"):Dg(e,50,t)?n=$p("midpoint"):Dg(e,7
25,t)?n=$p("thirdquartile"):((Dg(e,100,t)||t>100)&&(n=$p("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.ld()&&e.h.pause());n&&e.dispatchEvent(n)}}}function Ng(e){try{Ic(e.He,e.i)}catch(t){return zg(e,t),!1}var t=e.i.isLowLatency&&e.g.streaming.lowLatencyMode,n=Li(e.i.variants);return n=e.O.create(n),"boolean"!=typeof(e=e.A.setVariants(Array.from(n.values()),t))||e}function Pg(e,t){if(t=void 0!==t&&t,Ng(e)){if(!e.g.abr.enabled){var n=e.O.getLastAdaptationSet();if(n&&(n=Array.from(n.values())).length){var i=e.j.o;if(i&&i.video&&(n=n.find((function(e){return e.video==i.video}))))return n}}return e.A.chooseVariant(t)}return null}function Og(e,t,n,i,r){t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r;var a=Pg(e);a&&jg(e,a,r,t,n,i)}function jg(e,t,n,i,r,a){a=void 0!==a&&a;var o=e.j.o;if(t==o)i&&rh(e.j,t,i,r,!0);else{var s=e.o.j;if(s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),rh(e.j,t,i,r,a,n),i=null,o&&(i=Ai(o)),(o=Ai(t)).active=!0,e.Z&&(r=e.Z,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),a=0,s=-1,t.mimeType){case"video/webm":a=1;break;case"video/mp4":a=2}switch(e.Cg()){case"DASH":s=1;break;case"HLS":s=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(a),r.g.setStreamingFormat(s))}n?Qg(e,n=$p("adaptation",n=(new Map).set("oldTrack",i).set("newTrack",o))):Fg(e,i,o),Hg(e,i,o)}}function Ug(e,t){var n=Array.from(e.h.audioTracks).find((function(e){return e.enabled}));if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=_g(e);Fg(e,n=Ri(n,i),t=Ri(t,i)),Hg(e,n,t)}}function _g(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find((function(e){return e.selected})):null}function Bg(e){Qg(e,$p("trackschanged")),Vg(e)}function Fg(e,t,n){Qg(e,t=$p("variantchanged",t=(new Map).set("oldTrack",t).set("newTrack",n)))}function Hg(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&Vg(e)}function Vg(e){Qg(e,$p("audiotrackschanged"))}function Gg(e){Qg(e,$p("textchanged"))}function Kg(e){e.g.abr.enabled||Wg(e),Qg(e,$p("abrstatuschanged",(new Map).set("newStatus",e.g.abr.enabled)))}function Xg(e){var t=e.yb().find((function(e){return e.active}));t&&e.D&&e.D.setTextLanguage(t.language)}function Wg(e,t){if(t=void 0===t||t,e.l==tm){e.Fd.stop();for(var n=p(e.i.variants),i=n.next();!i.done;i=n.next())i=i.value,isFinite(i.disabledUntilTime)&&(i.disabledUntilTime=0);t&&Ng(e)}}function zg(e,t){var n,i;return E((function(r){switch(r.h){case 1:if(e.l==Zg)return r.return();if(1===t.severity&&e.o.L++,!e.i||!e.j||3016!=t.code&&3014!=t.code&&3015!=t.code&&3024!=t.code&&3018!=t.code){r.u(2);break}if(!(Li(e.i.variants).length>1||e.Wa)){r.u(2);break}return"WEBKIT"===Z().va()&&3016==t.code?r.return():(r.m(4),r.g(kh(e.j),6));case 6:if(r.i)return n=$p("mediasourcerecovered"),e.dispatchEvent(n),r.return();r.o(2);break;case 4:r.l();case 2:2===t.severity&&Wg(e,!1),i=$p("error",(new Map).set("detail",t)),e.dispatchEvent(i),i.defaultPrevented&&(t.handled=!0),r.j()}}))}function qg(e,t,n,i){i=void 0===i?e:i,e=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventNode:n.eventNode}),i.dispatchEvent($p(t,e))}function Yg(e,t,n,i){i=void 0!==i&&i,t=(new Map).set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent($p(i?"audiotrackchanged":"mediaqualitychanged",t))}function Jg(e,t){if(t=void 0===t||t,!e.h.error)return t?new _e(2,3,3016):null;var n=(e=Be(e.h.error)).code;return t||n!==MediaError.MEDIA_ERR_ABORTED?new _e(2,3,3016,n,e.Vh,e.message):null}function $g(e,t,n){t>0&&(e.na()||e.rh(t)),n<(t=e.getDuration())&&(e.na()||e.kc(n))}function Qg(e,t){E((function(n){if(1==n.h)return n.g(Promise.resolve(),2);e.l!=Zg&&e.dispatchEvent(t),n.j()}))}zp.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null}
2,h(Yp,No),(i=Yp.prototype).destroy=function(){var e,t=this;return E((function(n){switch(n.h){case 1:return t.l==Zg?n.return():(Jp(t),e=t.detach(),t.l=Zg,n.g(e,2));case 2:return n.g(t.xg(),3);case 3:if(t.Kd&&(t.Kd.release(),t.Kd=null),t.Cd&&(t.Cd.release(),t.Cd=null),t.m&&(t.m.release(),t.m=null),t.Mb&&(t.Mb.release(),t.Mb=null),t.Zc&&(t.Zc.release(),t.Zc=null),t.Ed=null,t.g=null,t.o=null,t.$b=null,t.K=null,t.Ba=null,!t.L){n.u(4);break}return n.g(t.L.destroy(),5);case 5:t.L=null;case 4:t.A&&(t.A.release(),t.A=null),t.Ia&&(t.Ia.destroy(),t.Ia=null),t.J&&(t.J.release(),t.J=null),No.prototype.release.call(t),n.j()}}))},i.Rb=function(e,t){t=void 0===t||t;var n,i,r,a=this;return E((function(o){switch(o.h){case 1:if(a.l==Zg)throw new _e(2,7,7e3);if(n=a.h&&a.h==e,!a.h||a.h==e){o.u(2);break}return o.g(a.detach(),2);case 2:return o.g(Zp(a,"attach"),4);case 4:if(o.i)return o.return();if(o.m(5,6),n||(Qp(a,"attach"),i=function(){var e=Jg(a,!1);e&&zg(a,e)},a.Cd.I(e,"error",i),a.h=e,a.K&&a.K.setMediaElement(e)),Z(),!t||!ao()||a.G){o.u(6);break}return o.g(ag(a),6);case 6:o.F(),a.ma.release(),o.G(0);break;case 5:return r=o.l(),o.g(a.detach(),10);case 10:throw r}}))},i.Kh=function(e){this.og=e},i.detach=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var n=this;return E((function(i){if(1==i.h){if(n.l==Zg)throw new _e(2,7,7e3);return i.g(n.yd(!1,e,t),2)}if(3!=i.h)return i.g(Zp(n,"detach"),3);if(i.i)return i.return();try{n.h&&(n.Cd.Pa(),n.h=null),Qp(n,"detach"),n.C&&!e&&n.C.release()}finally{n.ma.release()}i.j()}))},i.yd=function(t,n,i){t=void 0===t||t,n=void 0!==n&&n,i=void 0!==i&&i;var r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T=this;return E((function(x){switch(x.h){case 1:return T.l!=Zg&&(T.l=em),x.g(Zp(T,"unload"),2);case 2:return x.i?x.return():(x.J(3),T.Wa=!1,Qp(T,"unload"),Jp(T),r=T.Dd.map((function(e){return e()})),T.Dd=[],x.g(Promise.all(r),5));case 5:if(a=(new Map).set("isSwitchingContent",i),T.dispatchEvent($p("unloading",a)),T.Zb&&(T.Zb.release(),T.Zb=null),T.ka&&(T.ka.release(),T.ka=null),T.Ra&&(T.Ra.release(),T.Ra=null),T.h&&(T.m.Pa(),T.Mb.Pa()),T.Fd.stop(),T.Kb&&(T.Kb.release(),T.Kb=null),T.Ka&&(T.Ka.stop(),T.Ka=null),!T.H){x.u(6);break}return x.g(T.H.stop(),7);case 7:T.H=null,T.Yb=null;case 6:if(T.A&&T.A.stop(),!T.j){x.u(8);break}return x.g(T.j.destroy(),9);case 9:T.j=null;case 8:if(T.M&&(T.M.release(),T.M=null),T.F&&(T.F.release(),T.F=null),"webkit"!==e.shakaMediaKeysPolyfill||!T.B){x.u(10);break}return x.g(T.B.destroy(),11);case 11:T.B=null;case 10:if(!T.G){x.u(12);break}return x.g(T.G.destroy(),13);case 13:T.G=null;case 12:if(T.C&&!n&&T.C.onAssetUnload(),T.ua&&!n&&(T.ua.destroy(),T.ua=null),n||T.Oe.stop(),T.K&&function(e){e.m.clear(),e.D=!1,e.J=!0,e.H=!1,e.A=!1,e.B=0,e.C=0,e.G=0,e.K={request:!1,response:!1,event:!1},tp(e),e.o={},e.h=null,e.i.Pa()}(T.K),T.Ba&&(T.Ba.g=null),!T.D){x.u(14);break}return x.g(T.D.destroy(),15);case 15:T.D=null;case 14:if(T.Ca=!1,T.J&&T.J.disable(),T.h){for(o=p(T.Me),s=o.next();!s.done;s=o.next())(u=s.value).src.startsWith("blob:")&&URL.revokeObjectURL(u.src),u.remove();T.Me=[],Za(T.h)&&T.h.load()}if(!T.B){x.u(16);break}return x.g(T.B.destroy(),17);case 17:T.B=null;case 16:if(T.Za&&T.ea!=T.Za.be()&&(T.Za.F||T.Za.destroy(),T.Za=null),T.ea=null,T.Ga=null,T.U=null,T.i){for(l=p(T.i.variants),c=l.next();!c.done;c=l.next())for(d=c.value,h=p([d.audio,d.video]),f=h.next();!f.done;f=h.next())(g=f.value)&&g.segmentIndex&&g.segmentIndex.release();for(m=p(T.i.textStreams),v=m.next();!v.done;v=m.next())(y=v.value).segmentIndex&&y.segmentIndex.release()}for(T.g&&T.g.streaming.clearDecodingCache&&(_i.clear(),Ue.clear()),T.i=null,T.o=new Xh,T.ng=null,T.Lb=null,T.$=null,T.Nd=-1,T.Jd=[],b=p(T.Xb.values()),w=b.next();!w.done;w=b.next())w.value.stop();T.Xb.clear(),T.Id=[],T.Je=-1,T.L&&T.L.wg(),Cg(T);case 3:x.F(),T.ma.release(),x.G(4);break;case 4:if(Z(),t&&ao()&&!T.G&&T.h)return x.g(ag(T),0);x.u(0)}}))},i.xj=function(e){this.S=e},i.load=function(t,n,i){n=void 0===n?null:n;var r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T=this;return E((function(x){switch(x.h){case 1:if(T.l==Zg)throw new _e(2,7,7e3);if(T.h||!T.sa){x.u(2);break}return x.g(T.Rb(T.sa,!0),3);case 3:T.sa=null;case 2:if(r=null,a="",i=null==(o=i)?void 0:o.toLowerCase(),t instanceof qh){if(t.F)throw new _e(2,7,7006);a=(r=t).be()||""}else a=t||"";return x.g(qp(T.ma,"load"),4);case 4:if(T.ma.release(),!T.h)throw new _e(2,7,7002);if(!T.ea){x.u(5);break}return T.ea=a,x.g(T.yd(!1,!1,!0),5);case 5:if(s=++T.Md,u=function(){return E((function(e){if(1==e.h)return T.Md==s?e.u(0):r?e.g(r.destroy(),3):e.u(3);throw new _e(2,7,7e3)}))},l=function(e,t){return E((function(n){switch(n.h){case 1:return n.J(2),n.g(qp(T.ma,t),4);case 4:return n.g(u(),5);case 5:return n.g(e(),6);case 6:return n.g(u(),7);case 7:r&&T.g&&(r.i=T.g);case 2:n.F(),T.ma.release(),n.G(0)}}))},x.m(7,8),null==n&&r&&(n=r.getStartTime()),T.S=n,T.Wa=!1,T.dispatchEvent($p("loading")),r){i=r.xf(),x.u(10);break}if(i){x.u(10);break}return x.g(l((function(){return E((function(e){if(1==e.h)return e.g(ig(T,a),2);i=e.i,e.j()}))}),"guessMimeType_"),10);case 10:if(c=!!r,r){Jh(r,T),T.o=r.getStats(),x.u(13);break}return x.g(tg(T,a,n,i,!0,T.g),14);case 14:(r=x.i)?(r.G=!1,Jh(r,T),T.o=r.getStats(),r.start(),r.D.promise.catch((function(){}))):T.o=new Xh;case 13:return d=!r,h=Date.now()/1e3,T.o=r?r.getStats():new Xh,T.ea=a,T.Ga=i||null,Cg(T),f=function(){var e=T.h?T.h.buffered:null;return{start:fc(e)||0,end:pc(e)||0}},T.ka=new Gd(f),T.ka.addEventListener("regionadd",(function(e){ug(T,e.region,"metadataadded")})),d?x.g(l((function(){return E((function(e){return e.g(function(e,t){var n,i,r;return E((function(a){return 1==a.h?(n=Date.now()/1e3,i=!0,e.B=e.Vd({wc:e.L,onError:function(t){zg(e,t)},$g:function(){},onExpirationUpdated:function(){var t=$p("expirationupdated");e.dispatchEvent(t)},onEvent:function(t){if(e.dispatchEvent(t),"drmsessionupdate"==t.type&&i){i=!1,t=e.o;var r=Date.now()/1e3-n;r>=0&&(t.m=r)}}}),e.B.configure(e.g.drm),r=function(e){for(var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},n=(e=p(e)).next();!n.done;n=e.next()){var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:(n=n.value)?Fn(n):"",codecs:n?Hn(n):"",supplementalCodecs:"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};i.fullMimeTypes.add(Pn(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}([t]),e.B.$=!0,a.g(Qo(e.B,[r],[]),2)):a.g(e.B.Rb(e.h),0)}))}(T,i),0)}))}),"initializeSrcEqualsDrmInner_"),25):(T.Ra=new Gd(f),x.g(l((function(){return E((function(e){if(1==e.h)return e.g(Promise.race([r.ma.promise,r.D.promise]),2);T.Yb=r.J;var t=r;t.sa=!0,T.H=t.m,T.i=r.wf(),e.j()}))}),"waitForFinish"),17));case 17:if(T.G){x.u(18);break}return x.g(l((function(){return E((function(e){return e.g(ag(T),0)}))}),"initializeMediaSourceEngineInner_"),18);case 18:return x.g(l((function(){return E((function(e){return e.g(r.D.promise,0)}))}),"waitForFinish"),20);case 20:if(T.g=r.getConfiguration(),T.He=r.H,T.H&&T.H.setMediaElement&&T.h&&T.H.setMediaElement(T.h),T.Zb=function(e){return e.ua=!0,e.K}(r),T.Bd=r.Ga,(g=r.l)&&(T.O=g),c&&T.h&&"AUDIO"===T.h.nodeName&&(function(e){for(var t=p(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter((function(e){return e.audio}))}(T),T.configure("manifest.disableVideo",!0)),r.j){x.u(21);break}return x.g(l((function(){return E((function(e){return e.g(Zh(r,T.h),0)}))}),"drmEngine_.init"),21);case 21:return T.B=function(e){return e.ka=!0,e.j}(r),x.g(l((function(){return E((function(e){return e.g(T.B.Rb(T.h),0)}))}),"drmEngine_.attach"),23);
2case 23:return T.O&&((m=T.O.getConfiguration()).keySystem=T.keySystem(),T.O.configure(m)),v=T.g.abrFactory,T.A&&T.Ed==v||(T.Ed=v,T.A&&T.A.release(),T.A=v(),T.A.configure(T.g.abr)),y=function(e){return e.Ba=!0,e.C}(r),b=r.h,x.g(l((function(){return E((function(t){return t.g(function(t,n,i,r){var a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P;return E((function(O){switch(O.h){case 1:Qp(t,"load"),a=t.h,og(t,a),sg(t,a,n),"onchange"in e.screen&&t.m.I(e.screen,"change",(function(){if(t.O.getConfiguration){var e=t.O.getConfiguration();e.preferredVideo.some((function(e){return"AUTO"==e.hdrLevel}))?Ng(t):t.g.preferredVideo.some((function(e){return"AUTO"==e.hdrLevel}))&&t.g.abr.enabled&&(e.preferredVideo=t.g.preferredVideo,Bh(e),t.O.configure(e),Ng(t))}})),o=!1,s=p(t.i.variants);for(u=s.next();!u.done;u=s.next())l=u.value,(c=l.video&&l.video.dependencyStream)&&(o=gt(c));!function(e,t,n){n||t.lcevc.enabled?(Jp(e),null==e.Z&&(e.Z=new ht(e.h,e.og,t.lcevc,n),e.G&&(e.G.H=e.Z))):Jp(e)}(t,t.g,o),t.Hd=t.g.preferredText[0]&&t.g.preferredText[0].language||"",t.Le=t.g.preferredText[0]&&t.g.preferredText[0].role||"",t.Ke=(null==(d=t.g.preferredText[0])?void 0:d.forced)||!1,$g(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.A.init((function(e,n,i){t.i&&t.j&&e!=t.j.o&&jg(t,e,!0,void 0!==n&&n,void 0===i?0:i)}),(function(e,n){var i,r=null==(i=t.j)?void 0:i.o;(e=r&&r[e])&&t.disableStream(e,n)})),t.A.setMediaElement(a),t.A.setCmsdManager(t.Ba),t.j=function(e){return new nh(e.i,{Hb:function(){return e.F?e.F.ad():0},getBandwidthEstimate:function(){return e.A.getBandwidthEstimate()},pb:function(){return e.pb()},video:e.h,R:e.G,wc:e.L,onError:function(t){return zg(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Sc:function(t,n,i,r){var a=t.startTime,o=t.endTime,s=n.type;if(s!=lt){if(e.F){e.F.Yg();var u=_c(e.G,s);!e.na()&&e.h.paused&&!e.h.seeking&&null!=u&&u>0&&e.F.ad()<u&&!Rc(e.F.ad(),u,.001)&&e.F.Ie(u)}fg(e)}i=(new Map).set("start",a).set("end",o).set("contentType",s).set("isMuxed",i).set("isDependency",r),e.dispatchEvent($p("segmentappended",i)),e.A&&n.fastSwitching&&t.xc&&t.md&&e.A.trySuggestStreams()},$i:function(t,n){(n=n.Rc)&&e.Bd&&function(e,t,n){var i=function(e,t){var n=e.g.get(t);return n||(n={rd:[],Xe:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,i=e[e.length-1].end,r=t.rd;t.rd=r.filter((function(e,t){return!(e.position<=n&&t+1<r.length&&r[t+1].position<=n||e.position>=i)}))}else t.rd=[]}(e,i),e={Rc:t,position:n},(t=(i=i.rd).findIndex((function(e){return e.position>=n})))>=0?i.splice(t,i[t].position==n?1:0,e):i.push(e)}(e.Bd,n,t)},ug:function(t,n){var i=e.B;if(i.h.parseInbandPsshEnabled&&!i.G&&["audio","video"].includes(t)){t=new Jo(xe(n)),n=0;for(var r=p(t.data),a=r.next();!a.done;a=r.next())n+=a.value.length;if(0==n)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,a=(t=p(t.data)).next();!a.done;a=t.next())a=a.value,n.set(a,r),r+=a.length;es(i,"cenc",n),i=i.l.promise}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)},sj:function(t,n){return!(e.g.abr.enabled&&n.fastSwitching&&t.xc&&t.md)},ed:function(){return e.keySystem()}})}(t),t.j.configure(t.g.streaming),t.l=tm,t.dispatchEvent($p("streaming")),h=i;case 2:for((g=t.j.o)||h||(h=Pg(t,!0)),m=[],v=p([(f=g||h).video,f.audio]),y=v.next();!y.done;y=v.next())(b=y.value)&&!b.segmentIndex&&(m.push(b.createSegmentIndex()),b.dependencyStream&&m.push(b.dependencyStream.createSegmentIndex()));if(!(m.length>0)){O.u(4);break}return O.g(Promise.all(m),4);case 4:if(!f||0!=f.disabledUntilTime){O.u(2);break}if(Ng(t),t.H&&t.H.onInitialVariantChosen&&t.H.onInitialVariantChosen(f),t.i.isLowLatency&&(t.g.streaming.lowLatencyMode?t.configure(t.Ne):F("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),t.K&&(function(e,t){e.A=t,e.A?e.l==kp?e.l=Cp:e.l==Ip&&(e.l=Mp):e.l==Cp?e.l=kp:e.l==Mp&&(e.l=Ip)}(t.K,t.i.isLowLatency&&t.g.streaming.lowLatencyMode),function(e,t){if(e.g&&e.g.enabled&&(ap(e,"ps",{sta:"d"}),e.h&&e.h.autoplay)){var n=e.h.play();n&&n.then((function(){e.G=t})).catch((function(){e.G=0}))}}(t.K,1e3*n)),$g(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),function(e,t,n){e.j.presentationTimeline.na()||(e.ma=t,e.ka=n)}(t.j,t.g.playRangeStart,t.g.playRangeEnd),t.Wa=!0,t.dispatchEvent($p("canupdatestarttime")),w=function(e){t.F=function(e,t){return new kd(e.h,e.i,e.g.streaming,t,(function(){e.Kb&&eu(e.Kb,!e.F.kg()),e.j&&e.j.Ac(),e.U&&fg(e,"seeking")}),(function(t){return e.dispatchEvent(t)}))}(t,e),t.Kb=function(e,t){var n=e.na()||"number"==typeof t&&t>0;
2(t=new of(e.Zb,n)).addEventListener("enter",(function(t){qg(e,"timelineregionenter",t.region)})),t.addEventListener("exit",(function(t){qg(e,"timelineregionexit",t.region)})),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(qg(e,"timelineregionenter",n),qg(e,"timelineregionexit",n))}));var i=new of(e.ka,n);i.addEventListener("enter",(function(t){ug(e,t.region,"metadata")})),(n=new of(e.Ra,n)).addEventListener("enter",(function(t){t=(new Map).set("detail",t.region.emsg),e.dispatchEvent($p("emsg",t))}));var r=new Zs(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.Bd&&r.g.add(e.Bd),r}(t,e),dg(t,a,!1)},t.g.streaming.startAtSegmentBoundary||(null==(T=t.S)&&t.i.startTime&&(T=t.i.startTime),w(T)),g){O.u(7);break}if(!t.g.streaming.startAtSegmentBoundary){O.u(8);break}return x=t.i.presentationTimeline,t.S instanceof Date&&(A=x.j||x.h,null!=(k=t.S.getTime()/1e3-A)&&(S=k)),null==S&&(S="number"==typeof t.S?t.S:t.isLive()?1/0:t.h.currentTime),null==t.S&&t.i.startTime&&(S=t.i.startTime),C=x.Tb(),I=x.qb(),S<C?S=C:S>I&&(S=I),O.g(function(e,t){var n,i,r,a,o;return E((function(s){return 1==s.h?(n=e.audio,i=e.video,r=function(e,t){var n,i,r;return E((function(a){return 1==a.h?e?e.segmentIndex?a.u(2):a.g(e.createSegmentIndex(),2):a.return(null):(i=(n=e.segmentIndex.Gb(t))?n.next().value:null)?(r=i.startTime,a.return(r)):a.return(null)}))},s.g(r(n,t),2)):3!=s.h?(a=s.i,s.g(r(i,t),3)):null!=(o=s.i)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(h,S),9);case 9:M=O.i,w(M);case 8:jg(t,h,!0,!1,0);case 7:return t.F.ready(),t.yb().find((function(e){return e.active}))||((R=function(e,t){var n=null,i=Ni(e.i.textStreams,e.Hd,e.Le,e.Ke);return i.length&&(n=i[0]),!n&&t.audio&&e.g.accessibility.handleForcedSubtitlesAutomatically&&((i=Ni(e.i.textStreams,t.audio.language,"",!0)).length&&(n=i[0])),n}(t,h))&&(Kh(t.o.j,R,!0),R?(t.Ca=!0,t.D.setTextVisibility(!0)):(t.Ca=!1,t.D.setTextVisibility(!1))),R&&t.Ca&&(ah(t.j,R),Xg(t))),O.g(t.j.start(r),10);case 10:t.g.abr.enabled&&(t.A.enable(),Kg(t)),Bg(t),t.i.variants.some((function(e){return e.primary})),((D=t.na())&&(t.g.streaming.liveSync&&t.g.streaming.liveSync.enabled||t.i.serviceDescription||t.g.streaming.liveSync.panicMode)||t.g.streaming.vodDynamicPlaybackRate)&&(L=function(){return Rg(t)},t.m.I(a,"timeupdate",L)),D||(N=function(){return Lg(t)},t.m.I(a,"timeupdate",N),Lg(t),t.i.nextUrl&&(t.g.streaming.preloadNextUrlWindow>0&&(P=function(){var e;return E((function(n){if(1==n.h)return e=t.bb().end-t.h.currentTime,!isNaN(e)&&e<=t.g.streaming.preloadNextUrlWindow?(t.m.eb(a,"timeupdate",P),n.g(t.preload(t.i.nextUrl),4)):n.u(0);t.Za=n.i,n.j()}))},t.m.I(a,"timeupdate",P)),t.m.I(a,"ended",(function(){t.load(t.Za||t.i.nextUrl)})))),t.C&&t.C.onManifestUpdated(D),O.j()}}))}(T,h,b,y),0)}))}),"loadInner_"),24);case 24:!function(e){if(e.L)for(var t=p(e.L),n=t.next();!n.done;n=t.next())(n=n.value)();e.L=null}(r),T.Ga&&Z().wh()&&Vn(T.Ga)&&function(t,n,i){var r;t.g&&e.ManagedMediaSource&&t.i&&t.A.useSourceElements&&((null==(r=t.C)?void 0:r.parentElement)===t.g&&t.g.removeChild(t.C),t.C=Qa(n,i),t.g.appendChild(t.C),t.g.disableRemotePlayback=!1)}(T.G,T.ea,T.Ga),x.u(16);break;case 25:return x.g(l((function(){return E((function(e){return e.g(function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,g,m,v;return E((function(y){switch(y.h){case 1:if(Qp(e,"src-equals"),i=e.h,e.F=new Sd(i),r=!1,e.Dd.push((function(){r=!0})),e.dispatchEvent($p("canupdatestarttime")),null!=e.S&&e.F.Ie(e.S),e.Kb=function(e,t){(t=new of(e.ka,t instanceof Date||t>0)).addEventListener("enter",(function(t){ug(e,t.region,"metadata")}));var n=new Zs(e.h);return n.g.add(t),n}(e,e.S||0),og(e,i),dg(e,i,!0),i.textTracks&&(rg(e),a=function(t){if(!(e.D instanceof Df)){var n=bg(e).find((function(e){return"disabled"!==e.mode}));n&&(n.mode=t?"showing":"hidden")}},e.m.I(i,"enterpictureinpicture",(function(){return a(!0)})),e.m.I(i,"leavepictureinpicture",(function(){return a(!1)})),o=Z(),(s=oo(o,i))?e.m.Jb(s,["connect","connecting","disconnect"],(function(){a(!1)})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.m.I(i,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return a(!1)})),((u=i).webkitPresentationMode||u.webkitSupportsFullscreen)&&e.m.I(u,"webkitpresentationmodechanged",(function(){u.webkitPresentationMode?a("inline"!==u.webkitPresentationMode):u.webkitSupportsFullscreen&&a(u.webkitDisplayingFullscreen)}))),sg(e,i,t),l=function(e,t,n){try{if(!e.g.enabled)return t;var i=rp(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=vp;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=bp;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/d
2ash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=mp;break e}r=void 0}return i.ot=r,i.su=!0,gp(t,fp(i))}catch(e){return H("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.K,e.ea,n),!l.includes("#t=")&&(e.g.playRangeStart>0||isFinite(e.g.playRangeEnd))&&(l+="#t=",e.g.playRangeStart>0&&(l+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(l+=","+e.g.playRangeEnd)),!e.G){y.u(2);break}return y.g(e.G.destroy(),3);case 3:e.G=null;case 2:return Za(i),i.src=l,"TV"==(c=Z()).Fa()&&i.load(),"none"!=i.preload&&!i.autoplay&&Vn(n)&&"WEBKIT"===c.va()&&i.load(),e.l=nm,e.dispatchEvent($p("streaming")),d=function(){return new Promise((function(t){var n=new ti(t);e.m.I(i.textTracks,"change",(function(){return n.ba(.5)})),n.ba(.5)}))},h=Promise.withResolvers(),pd(i,HTMLMediaElement.HAVE_METADATA,e.m,(function(){return E((function(t){if(1==t.h)return e.F.ready(),e.Ga&&Vn(e.Ga)?t.g(d(),3):(h.resolve(),t.u(0));h.resolve(),t.j()}))})),pd(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,(function(){var t,n,i,a,o;return E((function(s){if(1==s.h)return s.g(d(),2);if(r)return s.return();if(function(e){var t=e.g.preferredAudio;if(t.length&&e.h&&e.h.audioTracks)for(var n=e.sc(),i=(t=p(t)).next();!i.done;i=t.next())if((i=i.value).language&&(i=Ni(n,i.language,i.role,!1)[0])){e.Wf(i);break}}(e),(t=bg(e)).some((function(e){return"showing"===e.mode}))&&(e.Ca=!0,e.D.setTextVisibility(!0)),!(e.D instanceof Df))for(n=!1,i=p(t),a=i.next();!a.done;a=i.next())"disabled"!==(o=a.value).mode&&(n?(o.mode="disabled",F("Found more than one enabled text track, disabling it",o)):(yg(e,o),n=!0));!function(e){for(var t=e.yb(),n=p(e.g.preferredText),i=n.next();!i.done;i=n.next())if((i=i.value).language&&(i=Ni(t,i.language,i.role,i.forced)).length)return void e.Bc(i[0]);e.h&&e.h.audioTracks&&e.g.accessibility.handleForcedSubtitlesAutomatically&&(n=Array.from(e.h.audioTracks).find((function(e){return e.enabled})))&&(t=Ni(t,n.language,"",!0)).length?e.Bc(t[0]):e.Bc(null)}(e),s.j()}))})),i.error?h.reject(Jg(e)):"none"==i.preload&&(F('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.'),h.resolve()),e.m.Ja(i,"error",(function(){h.reject(Jg(e))})),y.g(ai(e.g.streaming.loadTimeout,h.promise),4);case 4:((f=e.na())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(g=function(){return Rg(e)},e.m.I(i,"timeupdate",g)),f||(m=function(){return Lg(e)},e.m.I(i,"timeupdate",m),Lg(e)),e.C&&(e.C.onManifestUpdated(f),f&&(v=e.bb().end,e.m.I(i,"progress",(function(){var t=e.bb().end;v!=t&&(e.C.onManifestUpdated(e.na()),v=t)})))),e.Wa=!0,y.j()}}))}(T,h,i),0)}))}),"srcEqualsInner_"),16);case 16:T.dispatchEvent($p("loaded"));case 8:if(x.F(),!r){x.u(27);break}return x.g(r.destroy(),27);case 27:T.Za=null,x.G(0);break;case 7:if(!(w=x.l())||7e3==w.code){x.u(29);break}return x.g(T.yd(!1),29);case 29:throw w}}))},i.uj=function(e,t,n,i){e=void 0===e||e,t=void 0!==t&&t,n=void 0!==n&&n,i=void 0!==i&&i;var r,a=this;return E((function(o){return 1==o.h?o.g(eg(a,n),2):3!=o.h?(r=o.i,o.g(a.yd(e,t,i),3)):o.return(r)}))},i.yg=function(e,t,n){e=void 0!==e&&e,t=void 0!==t&&t,n=void 0!==n&&n;var i,r=this;return E((function(a){return 1==a.h?a.g(eg(r,t),2):3!=a.h?(i=a.i,a.g(r.detach(e,n),3)):a.return(i)}))},i.preload=function(e,t,n,i){t=void 0===t?null:t;var r,a,o,s=this;return E((function(u){return 1==u.h?(n=null==(r=n)?void 0:r.toLowerCase(),_h(a=kg(s),i||s.g,kg(s)),u.g(tg(s,e,t,n,!1,a),2)):((o=u.i)?o.start():zg(s,new _e(2,7,7005)),u.return(o))}))},i.xg=function(){var e,t,n,i,r=this;return E((function(a){for(e=[],t=p(r.Gd),n=t.next();!n.done;n=t.next())(i=n.value).F||e.push(i.destroy());return r.Gd=[],a.g(Promise.all(e),0)}))},i.gj=function(){for(var e=this.ma;e.g;)e.release()},i.Vd=function(e){return new $o(e)},i.configure=function(e,t){var n=this.getConfiguration();if(2==arguments.length&&"string"==typeof e&&(e=Nh(e,t)),e.manifest&&e.manifest.dash&&"disableXlinkProcessing"in e.manifest.dash){var i=new za(6,0),r=Ja,a=r.g,o=i.h-a.h;((i.g-a.g||o)>0?r.i:r.h)(r.g,i,"manifest.dash.disableXlinkProcessing configuration","It is now automatically detected if the manifest has Xlink."),delete e.manifest.dash.disableXlinkProcessing}return function(e){function t(e,t){F(e,"has been deprecated. Please use",t,"instead.")}var n={preferredAudioLanguage:"language",preferredAudioRole:"role",preferredAudioLabel:"label",preferredAudioChannelCount:"channelCount",preferSpatialAudio:"spatialAudio"};if(Object.keys(n).some((function(t){return t in e}))){for(var i={language:"",role:"",label:"",channelCount:0,codec:""},r=(n=p(Object.entries(n))).next();!r.done;r=n.next()){var a=p(r.value);r=a.next().value,a=a.next().value,r in e&&(t(r,"preferredAudio"),i[a]=e[r],delete e[r])}e.preferredAudio||(e.preferredAudio=[i])}if("preferredAudioCodecs"in e&&(t("preferredAudioCodecs","preferredAudio"),i=e.preferredAudioCodecs,Array.isArray(i)&&i.length&&(e.preferredAudio||(e.preferredAudio=i.map((function(e){return{language:"",role:"",label:"",channelCount:0,codec:e}})))),delete e.preferredAudioCodecs),n={preferredTextLanguage:"language",preferredTextRole:"role",preferForcedSubs:"forced"},Object.keys(n).some((function(t){return t in e}))){for(i={language:"",role:"",format:""},r=(n=p(Object.entries(n))).next();!r.done;r=n.next())r=(a=p(r.value)).next().value,a=a.next().value,r in e&&(t(r,"preferredText"),i[a]=e[r],delete e[r]);e.preferredText||(e.preferredText=[i])}if("preferredTextFormats"in e&&(t("preferredTextFormats","preferredText"),i=e.preferredTextFormats,Array.isArray(i)&&i.length&&(e.preferredText||(e.preferredText=i.map((function(e){return{language:"",role:"",format:e}})))),delete e.preferredTextFormats),n={preferredVideoLabel:"label",preferredVideoRole:"role",preferredVideoHdrLevel:"hdrLevel",preferredVideoLayout:"layout"},Object.keys(n).some((function(t){return t in e}))){for(i={label:"",role:"",codec:"",hdrLevel:"",layout:""},r=(n=p(Object.entries(n))).next();!r.done;r=n.next())r=(a=p(r.value)).next().value,a=a.next().value,r in e&&(t(r,"preferredVideo"),i[a]=e[r],delete e[r]);e.preferredVideo||(e.preferredVideo=[i])}"preferredVideoCodecs"in e&&(t("preferredVideoCodecs","preferredVideo"),i=e.preferredVideoCodecs,Array.isArray(i)&&i.length&&(e.preferredVideo||(e.preferredVideo=i.map((function(e){return{label:"",role:"",codec:e,hdrLevel:"",layout:""}})))),delete e.preferredVideoCodecs)}(e),i=_h(this.g,e,kg(this)),pg(this,n),i},i.Rh=function(e){this.Ne=e},i.getConfiguration=function(){var e=kg(this);return _h(e,this.g,kg(this)),e},i.di=function(){return this.Ne},i.ri=function(){return _h(kg(this),this.g,kg(this)),Oh(this.g,kg(this))},i.Ag=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.h.currentTime+t,this.bb().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},i.hj=function(){var e,t=this.getConfiguration();for(e in this.g)delete this.g[e];_h(this.g,kg(this),kg(this)),pg(this,t)},i.vf=function(){return this.l},i.Cg=function(){return this.i?this.i.type:null},i.Mc=function(){return this.h},i.pi=function(){return this.L},i.be=function(){return this.ea},i.xf=function(){return this.Ga},i.Yh=function(){var e;return Array.from((null==(e=this.ka)?void 0:e.g.values())||[])},i.Xh=function(){var e;return Array.from((null==(e=this.Ra)?void 0:e.g.values())||[])},i.$h=function(){var e;return Array.from((null==(e=this.Zb)?void 0:e.g.values())||[])},i.Wh=function(){return this.C?this.C:null},i.xi=function(){return this.Ia?this.Ia:null},i.isLive=function(){return this.i&&!this.wa()?this.i.presentationTimeline.isLive():!(!this.h||!this.h.src&&!this.wa())&&this.h.duration==1/0},i.Qc=function(){return!!this.i&&this.i.presentationTimeline.Qc()},i.na=function(){return this.isLive()||this.Qc()},i.Ki=function(){if(this.i&&!this.wa()){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.h||!this.h.src&&!this.wa())&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},i.Ng=function(){if(this.i&&!this.wa()){var e=this.i.variants;return!(!e.length||(e=e[0]).audio||!e.video||e.video.codecs.includes(","))}return!(!this.h||!this.h.src&&!this.wa()||!this.h.audioTracks)&&0==this.h.audioTracks.length},i.bb=function(){if(this.i&&!this.wa()){if(!this.Wa&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Tb(),end:e.qb()}}if(this.h&&(this.h.src||this.wa())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return{start:t,end:e=Math.min(e.end(e.length-1),n)}}return{start:0,end:0}},i.Hi=function(){this.na()&&(this.h.currentTime=this.bb().end)},i.Li=function(){return this.Wa},i.keySystem=function(){return Ie(this.drmInfo())},i.drmInfo=function(){return this.B?this.B.g:null},i.uf=function(){return this.B?this.B.uf():1/0},i.tf=function(){return this.B?this.B.tf():[]},i.Rf=function(e){this.B&&this.B.Rf(e)},i.Uf=function(e,t){var n,i=this;return E((function(r){return 1==r.h?i.B?r.g(i.B.Uf(e,t),3):r.u(2):2!=r.h?(n=r.i,r.return(n)):r.return(!1)}))},i.ce=function(){return this.B?this.B.ce():{}},i.Kg=function(){return this.U?this.U.g==Pl:!!this.ea},i.pb=function(){return this.h?this.M?this.M.i:1:0},i.ig=function(e){this.l==tm&&this.j&&ih(this.j,e)},i.xd=function(e,t){t=void 0===t||t,0==e?F("A trick play rate of 0 is unsupported!"):(this.M.set(e),this.l==tm&&(this.A.playbackRateChanged(e),this.ig(t&&1!=e)),Ig(this,e))},i.bd=function(){var e=this.M.Lc();this.l==nm&&this.M.set(e),this.l==tm&&(this.M.set(e),this.A.playbackRateChanged(e),this.ig(!1)),this.Mb.Pa()},i.sc=function(){if(this.i&&!this.wa()){for(var e=this.j?this.j.o:null,t=[],n=0,i=p(this.i.variants),r=i.next();!r.done;r=i.next())if(Di(r=r.value)){var a=Ai(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}if(this.h&&this.h.audioTracks){var o=_g(this);return(e=Array.from(this.h.audioTracks)).length?e.map((function(e){return Ri(e,o)})):o?[Ri(null,o)]:[]}return[]},i.yb=function(){if(this.i){if(this.wa())return[];for(var e=this.j?this.j.C:null,t=[],n=p(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=Ei(i=i.value);r.active=i==e,t.push(r)}return this.J&&t.push.apply(t,g(this.J.yb())),t}if(this.h&&this.h.src&&this.h.textTracks){e=bg(this);var a=this.D.isTextVisible();return e=e.map((function(e){return Mi(e,a)})),this.J&&e.push.apply(e,g(this.J.yb())),e}return[]},i.ki=function(){var e=this.Jd;return this.i&&(e=this.i.imageStreams),e.map((function(e){return ki(e)}))},i.Zh=function(e){var t,n,i=this;return E((function(r){return 1==r.h?r.g(mg(i,e),2):(t=r.i)?(n=[],t.segmentIndex.Sb((function(e){var i=gg(e.tilesLayout||t.tilesLayout);if(i)for(var r=i.rows*i.columns,a=(e.l-e.startTime)/r,o=0;o<r;o++){var s=vg(e,t,e.startTime+o*a,i);if(!s)break;n.push(s)}})),t.closeSegmentIndex&&t.closeSegmentIndex(),r.return(n)):r.return(null)}))},i.Di=function(e,t){var n,i,r,a,o,s=this;
2return E((function(u){return 1==u.h?u.g(mg(s,e),2):(n=u.i)?(n.closeSegmentIndex&&(s.Xb.has(n)||(i=new ti((function(){n.closeSegmentIndex(),s.Xb.delete(n)})),s.Xb.set(n,i)),s.Xb.get(n).ba(5)),null==(r=n.segmentIndex.find(t))?u.return(null):(a=n.segmentIndex.get(r),(o=gg(a.tilesLayout||n.tilesLayout))?u.return(vg(a,n,t,o)):u.return(null))):u.return(null)}))},i.Bc=function(e){var t=this,n=!1;if(this.J&&e&&(n=this.J.yb().includes(e)),this.J&&!n&&this.J.disable(),!e||n)this.J&&n&&e&&this.J.enable(e),Gg(this),Tg(this,!1);else{if(n=function(){var n=t.i.textStreams.find((function(t){return t.id==e.id}));n?n!=t.j.C&&(Kh(t.o.j,n,!1),ah(t.j,n),Gg(t),Xg(t),t.Hd=n.language,Tg(t,!0)):t.wa()},this.i&&this.F&&(n(),!this.wa()))return;!function(){if(t.h&&t.h.textTracks){var n=bg(t),i=n.find((function(t){return Ii(t)===e.id}));if(i){if(t.D instanceof Df)for(var r=(n=p(n)).next();!r.done;r=n.next()){var a=(r=r.value)===i?t.Ca?"showing":"hidden":"disabled";r.mode!==a&&(r.mode=a)}else(n=n.find((function(e){return"disabled"!==e.mode})))!==i&&(n&&(n.mode="disabled",t.m.eb(n,"cuechange"),t.D.remove(0,1/0)),i&&yg(t,i));Gg(t),Xg(t),Tg(t,!0)}}}()}},i.Wf=function(e,t,n){var i=this;t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.F&&(function(){var r=i.i.variants.find((function(t){return t.id==e.id}));if(r){if(Di(r)){var a=i.j.o;i.g.abr.enabled&&(a.video!=r.video||a.audio&&r.audio&&a.audio.language==r.audio.language&&a.audio.channelsCount==r.audio.channelsCount&&a.audio.label==r.audio.label)&&F("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.wa()?jg(i,r,!1,!1,0):jg(i,r,!1,t||!1,n||0),Bh(r={preferredAudio:[{language:r.language||"",role:r.audio&&r.audio.roles&&r.audio.roles[0]||"",label:r.audio&&r.audio.label||"",channelCount:r.audio&&r.audio.channelsCount||0,codec:r.audio&&r.audio.codecs||"",spatialAudio:!(!r.audio||!r.audio.spatialAudio)&&r.audio.spatialAudio}],preferredVideo:[{label:r.video&&r.video.label||"",role:r.video&&r.video.roles&&r.video.roles[0]||"",codec:r.video&&r.video.codecs||"",hdrLevel:r.video&&r.video.hdr||"",layout:r.video&&r.video.videoLayout||""}],language:"",role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",audioLabel:"",videoLabel:"",preferredAudioCodecs:[],preferredAudioChannelCount:0,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:r.audio&&r.audio.codecs?r.audio.codecs:"",activeAudioCodec:a.audio&&a.audio.codecs?a.audio.codecs:"",activeAudioChannelCount:a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,keySystem:i.keySystem()}),i.O.configure(r),Ng(i)}}else i.wa()}(),!this.wa())||function(){if(e.originalAudioId&&i.h&&i.h.audioTracks)for(var t=Array.from(i.h.audioTracks),n=(t=p(t)).next();!n.done;n=t.next())if(Ii(n=n.value)==e.id){Ug(i,n);break}}()},i.lj=function(e,t){function n(e,t){if(e!=t&&i.g.accessibility.handleForcedSubtitlesAutomatically){var n=i.yb(),r=n.find((function(e){return e.active})),a=r?ci(r.language):null;e=ci(e),t=ci(t),(!r||a==e&&a!=t&&r.forced)&&(n=Ni(n,t,"",!0)).length&&i.Bc(n[0])}}var i=this;t=void 0===t?0:t,this.i&&this.F&&(function(){var r=i.O.getConfiguration();r.audioCodec=e.codecs||"",r.preferredAudio=[{language:e.language,role:e.roles[0]||"",label:e.label||"",channelCount:e.channelsCount||0,codec:"",spatialAudio:e.spatialAudio}];var a=i.j.o;(a=a&&a.audio)&&(r.activeAudioCodec=a.codecs||"",r.activeAudioChannelCount=a.channelsCount||0,n(a.language,e.language)),Bh(r),i.O.configure(r),Og(i,!0,t,!1,!1)}(),!this.wa())||function(){if(i.h&&i.h.audioTracks){for(var t=ci(e.language),r=Array.from(i.h.audioTracks),a=null,o=null,s=(r=p(r)).next();!s.done;s=r.next()){var u=(s=s.value).language||"und";a||s.label!=e.label||ci(u)!=t||s.kind!=e.roles[0]||(a=s),s.enabled&&(o=s)}a&&(o&&n(o.language,a.language),Ug(i,a))}}()},i.getAudioTracks=function(){if(this.i&&!this.wa()){var e=this.sc();if(!e.length)return[];var t=e.find((function(e){return e.active}));if(!t)return[];var n=e;if(this.l!=tm||this.wa()||(n=e.filter((function(e){return e.originalVideoId===t.originalVideoId&&(e.audioCodec||Kn.includes(e.audioMimeType||""))}))),!n.length)return[];e=new Map;for(var i=(n=p(n)).next();!i.done;i=n.next()){var r=i.value;i=[r.language,r.originalLanguage,r.label||"",(r.audioRoles||[]).join(","),r.channelsCount,r.spatialAudio,r.audioCodec||"",r.accessibilityPurpose||""].join("_"),r={active:r.active,language:r.language,label:r.label,mimeType:r.audioMimeType,codecs:r.audioCodec,primary:r.primary,roles:r.audioRoles||[],accessibilityPurpose:r.accessibilityPurpose,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,originalLanguage:r.originalLanguage},e.has(i)?!e.get(i).active&&r.active&&e.set(i,r):e.set(i,r)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map((function(e){var t=e.language;return t={active:e.enabled,language:ci(t||"und"),label:e.label,mimeType:null,codecs:null,primary:"main"==e.kind,roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:t},e.kind&&("description"==e.kind&&(t.accessibilityPurpose="visually impaired"),t.roles.push(e.kind)),e.configuration&&(e.configuration.codec&&(t.codecs=e.configuration.codec),e.configuration.sampleRate&&(t.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(t.channelsCount=e.configuration.numberOfChannels)),t})):[]},i.mj=function(e,t,n){t=void 0!==t&&t,n=void 0===n?0:n;var i=this.sc();if(i.length){var r,a=i.find((function(e){return e.active}));a&&((r=1==(i=i.filter((function(t){return(t.videoBandwidth||t.bandwidth)==e.bandwidth&&t.width==e.width&&t.height==e.height&&t.frameRate==e.frameRate&&t.pixelAspectRatio==e.pixelAspectRatio&&t.hdr==e.hdr&&t.colorGamut==e.colorGamut&&t.videoLayout==e.videoLayout&&t.videoMimeType==e.mimeType&&t.videoCodec==e.codecs&&z(t.videoRoles,e.roles)&&t.videoLabel==e.label}))).length?i[0]:i.find((function(e){return e.audioId===a.audioId})))||(r=i.find((function(e){return e.language==a.language&&e.label===a.label&&e.channelsCount===a.channelsCount&&e.spatialAudio===a.spatialAudio&&e.audioMimeType===a.audioMimeType&&_n(e.audioCodec||"")===_n(a.audioCodec||"")&&z(e.audioRoles,a.audioR
2oles)}))),r&&!r.active&&this.Wf(r,t,n))}},i.getVideoTracks=function(){if(this.l==nm||this.wa())return[];var e=this.sc();if(!e.length)return[];var t=e.find((function(e){return e.active}));if(!t)return[];var n=e;if(this.Ng()||(n=e.filter((function(e){return!(!e.videoCodec||e.audioGroupId!==t.audioGroupId||e.originalAudioId!==t.originalAudioId)&&(e.audioId===t.audioId||e.language===t.language&&e.label===t.label&&e.channelsCount===t.channelsCount&&e.spatialAudio===t.spatialAudio&&e.audioMimeType===t.audioMimeType&&_n(e.audioCodec||"")===_n(t.audioCodec||"")&&z(e.audioRoles,t.audioRoles))}))),!n.length)return[];e=new Map;for(var i=(n=p(n)).next();!i.done;i=n.next()){var r=(i=i.value).originalVideoId;r||null==i.videoId||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec,roles:i.videoRoles||[],label:i.videoLabel})}return Array.from(e.values())},i.ci=function(){var e=this.Id;this.i&&(e=this.i.chapterStreams),e=e.map((function(e){return Ci(e)}));var t=wg(this);return t.length&&e.push.apply(e,g(t.map((function(e){return{id:Ii(e),type:"chapter",bandwidth:0,language:ci(e.language||"und")}})))),e},i.bi=function(e){var t,n,i,r,a,o,s,u,l,c,d,h,f,g=this;return E((function(m){switch(m.h){case 1:if(t=function(e,t){if(!(e=wg(e)).length)return[];var n=ci(t),i=e.filter((function(e){return ci(e.language)==n}));if(!i||!i.length)return[];t=[],e=new Set;for(var r=(i=p(i)).next();!r.done;r=i.next())if((r=r.value)&&r.cues)for(var a=(r=p(r.cues)).next();!a.done;a=r.next()){var o=a.value;(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime,images:[]},e.has(a)||(t.push(o),e.add(a))}return t}(g,e),t.length)return m.return(t);if(n=g.Id,g.i&&(n=g.i.chapterStreams),!n.length)return m.return([]);if(i=ci(e),!(r=n.filter((function(e){return ci(e.language)==i}))).length)return m.return([]);a=[],o=new Set,s=p(r),u=s.next(),l={};case 2:if(u.done){m.u(4);break}if((c=u.value).segmentIndex){m.u(5);break}return m.g(c.createSegmentIndex(),5);case 5:l.tc=0,d=void 0,g.isLive()&&"HLS"===(null==(d=g.i)?void 0:d.type)&&(h=g.i.presentationTimeline,l.tc=Math.max(0,null!=(f=h.j)?f:h.h)),c.segmentIndex.Sb((v=l,function(e){var t=e.getMetadata();if(t){var n=t.title,i=e.startTime+"-"+e.endTime+"-"+n;v.tc>0&&e.endTime-v.tc<0&&(v.tc=0),e={id:i,title:n,startTime:Math.max(0,e.startTime-v.tc),endTime:Math.max(0,e.endTime-v.tc),images:t.images},o.has(i)||(a.push(e),o.add(i))}})),l={tc:void 0},u=s.next(),m.u(2);break;case 4:return m.return(a)}var v}))},i.si=function(){if(this.F)var e=this.F.ad();else{if(null==this.S)return new Date;if(this.S instanceof Date)return this.S;e=this.S}if(this.i&&!this.wa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.j||t.h)+e))}return this.h&&this.h.getStartDate&&(t=this.h.getStartDate())instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+1e3*e):null},i.Eg=function(){if(this.i&&!this.wa()){var e=this.i.presentationTimeline;return null===(e=e.j||e.h)?null:new Date(1e3*e)}return this.h&&this.h.getStartDate&&(e=this.h.getStartDate())instanceof Date&&!isNaN(e.getTime())?e:null},i.ee=function(){return this.isLive()&&this.i?this.i.presentationTimeline.ee():null},i.cc=function(){if(this.l==tm)return this.G.cc();var e={total:[],audio:[],video:[],text:[]};return this.l==nm&&(e.total=vc(this.h.buffered)),e},i.getBandwidthEstimate=function(){return this.A?this.A.getBandwidthEstimate():NaN},i.getStats=function(){if(this.l!=tm&&this.l!=nm)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};Mg(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.na()||function(e,t){e.h=isNaN(e.h)?t:Math.max(e.h,t)}(this.o,Math.round(100*t)),this.F&&(this.o.U=this.F.jg(),this.o.Z=this.F.lg()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),function(e,t,n){e.S=t,e.O=n}(this.o,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.o.M=Number(t.corruptedVideoFrames)),function(e,t){t>=0&&(e.o=t)}(this.o,this.B?function(e){return e.J?e.J:NaN}(this.B):NaN),Wh(this.o,e.videoWidth||NaN,e.videoHeight||NaN),this.o.l="",this.na()&&null!=(e=xg(this))&&function(e,t){t>=0&&(e.D=t)}(this.o,e/1e3),t=this.sc().find((function(e){return e.active})),e=this.yb().find((function(e){return e.active})),t){if(t.bandwidth){var n=this.M?this.M.i:1,i=n*t.bandwidth;e&&e.bandwidth&&(i+=n*e.bandwidth),this.o.B=i}t.width&&t.height&&Wh(this.o,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.o.l=t)}return this.l!=tm||this.wa()||(this.i&&(this.o.H=this.i.periodCount,this.o.G=this.i.gapCount,this.i.presentationTimeline&&function(e,t){t>=0&&(e.K=t)}(this.o,this.i.presentationTimeline.i)),e=this.A.getBandwidthEstimate(),this.o.A=e),this.l==nm&&zh(this.o,NaN),function(e){for(var t=e.$,n=e.C,i=e.l,r=e.B,a=e.O,o=e.S,s=e.M,u=e.Z,l=e.U,c=e.A,d=e.h,h=e.F,f=e.J,g=e.m,m=Vh(e.g,"playing"),v=Vh(e.g,"paused"),y=Vh(e.g,"buffering"),b=e.o,w=e.D,T=e.K,x=e.Qg,S=e.i,A=e.L,E=e.H,k=e.G,C=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=p(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(e.g),I=[],M=(e=p(e.j.g)).next();!M.done;M=e.next())M=M.value,I.push({timestamp:M.timestamp,id:M.id,type:M.type,fromAdaptation:M.fromAdaptation,bandwidth:M.bandwidth});
2return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:a,droppedFrames:o,corruptedFrames:s,stallsDetected:u,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:h,manifestTimeSeconds:f,drmTimeSeconds:g,playTime:m,pauseTime:v,bufferingTime:y,licenseTime:b,liveLatency:w,maxSegmentDuration:T,manifestSizeBytes:x,bytesDownloaded:S,nonFatalErrorCount:A,manifestPeriodCount:E,manifestGapCount:k,stateHistory:C,switchHistory:I}}(this.o)},i.Hh=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,l,c,d,h,f,p,g,m,v=this;return E((function(y){switch(y.h){case 1:if(v.l!=tm&&v.l!=nm)throw new _e(1,7,7004);if("subtitles"!=n&&"captions"!=n&&F("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){y.u(2);break}return y.g(Sg(v,e),3);case 3:i=y.i;case 2:if(s=[],v.C&&(s=v.C.getCuePoints()),v.l!=nm){y.u(4);break}return u=Z(),o&&"WEBKIT"===u.va()&&(n="forced"),y.g(function(e,t,n,i,r,a,o){var s,u,l,c;return E((function(d){if(1==d.h)return"text/vtt"!=r||o.length?d.g(Ag(e,t),3):d.u(2);2!=d.h&&(s=d.i,u=Eg(e,s,r,o),l=new Blob([u],{type:"text/vtt"}),t=sd(l),r="text/vtt"),c=document.createElement("track");e:{var h=e.K,f=t;try{if(!h.g.enabled){var p=f;break e}var g=rp(h);g.ot=Tp,g.su=!0,p=gp(f,fp(g));break e}catch(e){H("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),p=f;break e}p=void 0}return c.src=p,c.label=a,c.kind=i,c.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(c),e.Me.push(c),d.return(c)}))}(v,e,t,n,i,a||"",s),5);case 5:if((l=y.i).track)return Bg(v),Gg(v),y.return(Mi(l.track,v.D.isTextVisible()));throw new _e(1,2,2012);case 4:if(c=ct,d=v.bb(),h=d.end-d.start,v.i&&(h=v.i.presentationTimeline.getDuration()),h==1/0)throw new _e(1,4,4033);if(!s.length){y.u(6);break}return y.g(Ag(v,e),7);case 7:f=y.i,p=Eg(v,f,i,s),g=new Blob([p],{type:"text/vtt"}),e=sd(g),i="text/vtt";case 6:if(m={id:v.Ld++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ou(0,h,[e]),mimeType:i||"",codecs:r||"",supplementalCodecs:"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:c.Na,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Pn(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!qn(Pn(m.mimeType,m.codecs)))throw new _e(2,2,2014,i);return v.i.textStreams.push(m),Bg(v),Gg(v),y.return(Ei(m))}}))},i.Ih=function(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T=this;return E((function(x){switch(x.h){case 1:if(T.l!=tm&&T.l!=nm)throw new _e(1,7,7004);if(t){x.u(2);break}return x.g(Sg(T,e),3);case 3:t=x.i;case 2:if("text/vtt"!=t)throw new _e(1,2,2017,e);if(n=ct,i=T.bb(),r=i.end-i.start,T.i&&(r=T.i.presentationTimeline.getDuration()),r==1/0)throw new _e(1,4,4045);return x.g(Ag(T,e),4);case 4:if(a=x.i,!(o=zn(t)))throw new _e(2,2,2014,t);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=xe(a),c=s.parseMedia(l,u,e,[]),d=[],h=p(c),f=h.next(),g={};!f.done;g={Ee:void 0,Jc:void 0},f=h.next())g.Jc=f.value,g.Ee=null,m=function(t){return function(){return null==t.Ee&&(t.Ee=it([e],[t.Jc.payload])),t.Ee||[]}}(g),v=new qs(g.Jc.startTime,g.Jc.endTime,m,0,null,null,0,0,1/0),g.Jc.payload.includes("#xywh")&&4===(y=g.Jc.payload.split("#xywh=")[1].split(",")).length&&v.qh({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)}),d.push(v);if(b=t,!d.length){x.u(5);break}return x.g(Sg(T,d[0].P()[0]),6);case 6:b=x.i;case 5:return w={id:T.Ld++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ru(d),mimeType:b||"",codecs:"",supplementalCodecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Fh,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Pn(b||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},T.l==nm?T.Jd.push(w):T.i.imageStreams.push(w),Bg(T),x.return(ki(w))}}))},i.Gh=function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w=this;return E((function(T){switch(T.h){case 1:if(w.l!=tm&&w.l!=nm)throw new _e(1,7,7004);if(n){T.u(2);break}return T.g(Sg(w,e),3);case 3:n=T.i;case 2:if(i=ct,r=w.bb(),a=r.end-r.start,w.i&&(a=w.i.presentationTimeline.getDuration()),a==1/0)throw new _e(1,4,4055);if(!(o=zn(n)))throw new _e(2,2,2014,n);return T.g(Ag(w,e),4);case 4:for(s=T.i,u=o(),l={periodStart:0,segmentStart:0,segmentEnd:a,vttOffset:0},c=xe(s),d=u.parseMedia(c,l,e,[]),h=[],f=p(d),g=f.next();!g.done;g=f.next())m=g.value,v=new qs(m.startTime,m.endTime,(function(){return[]}),0,null,null,0,0,1/0),y={title:m.payload,images:[]},v.Xf(y),h.push(v);return b={id:w.Ld++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ru(h),mimeType:"text/plain",codecs:"",supplementalCodecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Dh,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Pn("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},w.l==tm?w.i.chapterStreams.push(b):w.Id.push(b),Bg(w),T.return(Ci(b))}}))},i.pj=function(e,t){this.Ha.width=e,this.Ha.height=t},i.Vf=function(e){if(this.l==tm){var t=this.j;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=p(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).Oc||i.za||i.fb||(i.Oc=!1,Th(t,i,e));t=!0}}else t=!1;return t},i.wf=function(){return F("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.mi=function(){return this.Yb},i.ii=function(){var e={video:null,audio:null,text:null};if(this.l!=tm)return e;for(var t=this.j.o,n=this.h.currentTime,i=(t=p([t.video,t.audio,this.j.C])).next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r,a,o,s,u,l,c=i.segmentIndex.find(n),d={codecs:null!=(s=null==(r=c=i.segmentIndex.get(c))?void 0:r.codecs)?s:i.codecs,mimeType:null!=(u=null==(a=c)?void 0:a.mimeType)?u:i.mimeType,bandwidth:null!=(l=null==(o=c)?void 0:o.bandwidth)?l:i.bandwidth};"video"==i.type?(d.width=i.width,d.height=i.height,e.video=d):"audio"==i.type?e.audio=d:i.type==lt&&(e.text=d)}return e},i.rj=function(e){this.$b=e},i.disableStream=function(e,t){if(!this.g.abr.enabled||this.l===Zg||!navigator.onLine||0==t||!this.i)return!1;if(this.i.variants.some((function(t){var n=t[e.type];return!(!n||n.id===e.id||t.disabledUntilTime||"audio"==e.type&&e.language!==n.language)}))){for(var n=!1,i=!1,r=p(this.i.variants),a=r.next();!a.done;a=r.next()){var o=(a=a.value)[e.type];o&&(o.id===e.id?(a.disabledUntilTime=Date.now()/1e3+t,n=!0):o.trickModeVideo&&o.trickModeVideo.id==e.id&&(i=!0))}return!(!n&&i||(this.Fd.Aa(1),t=this.cc().video.reduce((function(e,t){return e+t.end-t.start}),0),Og(this,!1,t,!0,!1),0))}return!1},i.addFont=function(t,n){return function(t,n){var i,r,a,o,s;return E((function(u){if(1==u.h)return"fonts"in document&&"FontFace"in e?u.g(document.fonts.ready,2):u.return();if(!("entries"in document.fonts))return u.return();for(i=function(e){for(var t=[],n=(e=e.entries()).next();!1===n.done;)t.push(n.value),n=e.next();return t}
2,r=p(i(document.fonts)),a=r.next();!a.done;a=r.next())if((o=a.value).family===t&&"swap"===o.display)return u.return();s=new FontFace(t,"url("+n+")",{display:"swap"}),document.fonts.add(s),u.j()}))}(t,n)},i.wa=function(){if(!this.h)return!1;var e=oo(Z(),this.h);return!!e&&"disconnected"!=e.state},i.ld=function(){return!(this.h&&!this.h.ended)||this.Wa&&!this.na()&&this.h.currentTime>=this.bb().end},P("shaka.Player",Yp),Yp.prototype.isEnded=Yp.prototype.ld,Yp.prototype.isRemotePlayback=Yp.prototype.wa,Yp.prototype.addFont=Yp.prototype.addFont,Yp.prototype.setVideoContainer=Yp.prototype.rj,Yp.prototype.getFetchedPlaybackInfo=Yp.prototype.ii,Yp.prototype.getManifestParserFactory=Yp.prototype.mi,Yp.prototype.getManifest=Yp.prototype.wf,Yp.prototype.retryStreaming=Yp.prototype.Vf,Yp.prototype.setMaxHardwareResolution=Yp.prototype.pj,Yp.prototype.addChaptersTrack=Yp.prototype.Gh,Yp.prototype.addThumbnailsTrack=Yp.prototype.Ih,Yp.prototype.addTextTrackAsync=Yp.prototype.Hh,Yp.prototype.getStats=Yp.prototype.getStats,Yp.prototype.getBufferedInfo=Yp.prototype.cc,Yp.prototype.getSegmentAvailabilityDuration=Yp.prototype.ee,Yp.prototype.getPresentationStartTimeAsDate=Yp.prototype.Eg,Yp.prototype.getPlayheadTimeAsDate=Yp.prototype.si,Yp.prototype.getChaptersAsync=Yp.prototype.bi,Yp.prototype.getChaptersTracks=Yp.prototype.ci,Yp.prototype.getVideoTracks=Yp.prototype.getVideoTracks,Yp.prototype.selectVideoTrack=Yp.prototype.mj,Yp.prototype.getAudioTracks=Yp.prototype.getAudioTracks,Yp.prototype.selectAudioTrack=Yp.prototype.lj,Yp.prototype.selectVariantTrack=Yp.prototype.Wf,Yp.prototype.selectTextTrack=Yp.prototype.Bc,Yp.prototype.getThumbnails=Yp.prototype.Di,Yp.prototype.getAllThumbnails=Yp.prototype.Zh,Yp.prototype.getImageTracks=Yp.prototype.ki,Yp.prototype.getTextTracks=Yp.prototype.yb,Yp.prototype.getVariantTracks=Yp.prototype.sc,Yp.prototype.cancelTrickPlay=Yp.prototype.bd,Yp.prototype.trickPlay=Yp.prototype.xd,Yp.prototype.useTrickPlayTrackIfAvailable=Yp.prototype.ig,Yp.prototype.getPlaybackRate=Yp.prototype.pb,Yp.prototype.isBuffering=Yp.prototype.Kg,Yp.prototype.getKeyStatuses=Yp.prototype.ce,Yp.prototype.retryLicensing=Yp.prototype.Uf,Yp.prototype.renewLicense=Yp.prototype.Rf,Yp.prototype.getActiveSessionsMetadata=Yp.prototype.tf,Yp.prototype.getExpiration=Yp.prototype.uf,Yp.prototype.drmInfo=Yp.prototype.drmInfo,Yp.prototype.keySystem=Yp.prototype.keySystem,Yp.prototype.isFullyLoaded=Yp.prototype.Li,Yp.prototype.goToLive=Yp.prototype.Hi,Yp.prototype.seekRange=Yp.prototype.bb,Yp.prototype.isVideoOnly=Yp.prototype.Ng,Yp.prototype.isAudioOnly=Yp.prototype.Ki,Yp.prototype.isDynamic=Yp.prototype.na,Yp.prototype.isInProgress=Yp.prototype.Qc,Yp.prototype.isLive=Yp.prototype.isLive,Yp.prototype.getQueueManager=Yp.prototype.xi,Yp.prototype.getAdManager=Yp.prototype.Wh,Yp.prototype.getAllTimelineRegions=Yp.prototype.$h,Yp.prototype.getAllEmsgRegions=Yp.prototype.Xh,Yp.prototype.getAllMetadataRegions=Yp.prototype.Yh,Yp.prototype.getMimeType=Yp.prototype.xf,Yp.prototype.getAssetUri=Yp.prototype.be,Yp.prototype.getNetworkingEngine=Yp.prototype.pi,Yp.prototype.getMediaElement=Yp.prototype.Mc,Yp.prototype.getManifestType=Yp.prototype.Cg,Yp.prototype.getLoadMode=Yp.prototype.vf,Yp.prototype.resetConfiguration=Yp.prototype.hj,Yp.prototype.getBufferFullness=Yp.prototype.Ag,Yp.prototype.getNonDefaultConfiguration=Yp.prototype.ri,Yp.prototype.getConfigurationForLowLatency=Yp.prototype.di,Yp.prototype.getConfiguration=Yp.prototype.getConfiguration,Yp.prototype.configurationForLowLatency=Yp.prototype.Rh,Yp.prototype.configure=Yp.prototype.configure,Yp.prototype.releaseAllMutexes=Yp.prototype.gj,Yp.prototype.destroyAllPreloads=Yp.prototype.xg,Yp.prototype.preload=Yp.prototype.preload,Yp.prototype.detachAndSavePreload=Yp.prototype.yg,Yp.prototype.unloadAndSavePreload=Yp.prototype.uj,Yp.prototype.load=Yp.prototype.load,Yp.prototype.updateStartTime=Yp.prototype.xj,Yp.prototype.unload=Yp.prototype.yd,Yp.prototype.detach=Yp.prototype.detach,Yp.prototype.attachCanvas=Yp.prototype.Kh,Yp.prototype.attach=Yp.prototype.Rb,Yp.probeSupport=function(t){var n,i,r,a,o,s;return t=void 0===t||t,E((function(u){switch(u.h){case 1:if(n={},!t){u.u(2);break}return u.g(function(){var t,n,i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A,k,C,I;return E((function(M){if(1==M.h){if(t="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration)){for(n={},i=p(t),r=i.next();!r.done;r=i.next())a=r.value,n[a]=null;return M.return(n)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),u={"com.widevine.alpha":s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":["150","2000","3000"]},l={videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},c=[null,"cenc","cbcs"],d=new Map,h=Z(),f=function(e,t,n){var i,r,a,s,u,l,c,f,g,m,v,y;return E((function(b){switch(b.h){case 1:return b.m(2),b.g(t.createMediaKeys(),5);case 5:i=b.i;case 4:b.o(3);break;case 2:return b.l(),b.return();case 3:if(a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),h.Wg()&&(a=!1),s=t.getConfiguration().videoCapabilities,u=t.getConfiguration().audioCapabilities,l={persistentState:a,encryptionSchemes:[],videoRobustnessLevels:[],audioR
2obustnessLevels:[],minHdcpVersions:[]},d.get(e)?l=d.get(e):d.set(e,l),(c=s[0].encryptionScheme)&&!l.encryptionSchemes.includes(c)&&l.encryptionSchemes.push(c),(f=s[0].robustness)&&!l.videoRobustnessLevels.includes(f)&&l.videoRobustnessLevels.push(f),(g=u[0].robustness)&&!l.audioRobustnessLevels.includes(g)&&l.audioRobustnessLevels.push(g),!n||!("getStatusForPolicy"in i)){b.u(0);break}m=p(o),v=m.next();case 7:if(v.done){b.u(0);break}if(y=v.value,l.minHdcpVersions.includes(y)){b.u(8);break}return b.g(i.getStatusForPolicy({minHdcpVersion:y}),10);case 10:if("usable"!=b.i){b.u(0);break}l.minHdcpVersions.includes(y)||l.minHdcpVersions.push(y);case 8:v=m.next(),b.u(7)}}))},g=function(e,t,n,i,r){var a,o,s,u,c,d,h,g,m,v;return r=void 0!==r&&r,E((function(y){switch(y.h){case 1:for(y.m(2),a=Bt(l),o=p(a.videoCapabilities),s=o.next();!s.done;s=o.next())(u=s.value).encryptionScheme=t,u.robustness=n;for(c=p(a.audioCapabilities),d=c.next();!d.done;d=c.next())(h=d.value).encryptionScheme=t,h.robustness=i;return(g=Bt(a)).persistentState="required",g.sessionTypes=["persistent-license"],m=[g,a],"MOBILE"==Z().Fa()?y.g(ai(5,navigator.requestMediaKeySystemAccess(e,m)),7):y.g(navigator.requestMediaKeySystemAccess(e,m),6);case 6:v=y.i,y.u(5);break;case 7:v=y.i;case 5:return y.g(f(e,v,r),8);case 8:y.o(0);break;case 2:y.l(),y.j()}}))},m=function(e){return"WEBKIT"!==Z().va()||!Me(e)},v=[],y=p(t),b=y.next();!b.done;b=y.next())if(w=b.value,d.set(w,null),m(w)){for(T=!0,x=p(c),S=x.next();!S.done;S=x.next())A=S.value,v.push(g(w,A,"","",T)),T=!1;for(k=p(u[w]||[]),C=k.next();!C.done;C=k.next())I=C.value,v.push(g(w,null,I,"")),v.push(g(w,null,"",I))}return M.g(Promise.all(v),2)}return M.return(Yo(d))}))}(),3);case 3:n=u.i;case 2:return i=function(){var e={};if(Z(),ao())for(var t=p(yt.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=p(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl"])).next();!n.done;n=t.next())e[n=n.value]=ao()?yt.has(n):""!=to().canPlayType(n);return e}(),r=function(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(g(Kn)),t={};Z();for(var n=(e=p(e)).next();!n.done;n=e.next()){if(qn(n=n.value))t[n]=!0;else if(ao()){var i=Fn(n);i=Pn(i,xi(Hn(n),i)),t[n]=lu(i)||!!Cn(i)}else t[n]=""!=to().canPlayType(n);t[i=n.split(";")[0]]=t[i]||t[n]}return t}(),a=Z(),u.g(a.Fb(),4);case 4:return o=u.i,s={manifest:i,media:r,drm:n,hardwareResolution:o},rm.forEach((function(e,t){s[t]=e()})),u.return(s)}}))},Yp.isBrowserSupported=function(){return e.Promise||F("A Promise implementation or polyfill is required"),!(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")||(Z(),!ao()&&""==to().canPlayType("application/x-mpegurl")))},Yp.setQueueManagerFactory=function(e){om=e},Yp.setAdManagerFactory=function(e){am=e},Yp.registerSupportPlugin=function(e,t){rm.set(e,t)},Yp.prototype.destroy=Yp.prototype.destroy;var Zg=0,em=1,tm=2,nm=3;Yp.LoadMode={DESTROYED:Zg,NOT_LOADED:em,MEDIA_SOURCE:tm,SRC_EQUALS:nm},Yp.version="v5.1.0";var im=["5","1"];Ja=new function(e){this.g=e,this.i=qa,this.h=Ya}(new za(Number(im[0]),Number(im[1])));var rm=new Map,am=null,om=null;function sm(){}function um(e,t){for(e={priority:t||0,callback:e},t=0;t<dm.length;t++)if(dm[t].priority<e.priority)return void dm.splice(t,0,e);dm.push(e)}P("shaka.polyfill",sm),sm.register=um,sm.installAll=function(){for(var e=p(dm),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){F("Error installing polyfill!",e)}}};var lm,cm,dm=[];function hm(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function fm(e){return Le(e)?"cbcs":Re(e)||De(e)||Me(e)||"com.huawei.wiseplay"===e?"cenc":(F("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function pm(e){if(!e)return!1;var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function gm(e,t){return!(e&&e!=t&&("cbcs"!=e&&"cbcs-1-9"!=e||!Z().Cc()))}function mm(){}function vm(){Z().De()&&!lm&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(lm=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=ym,navigator.emeEncryptionSchemePolyfilled=!0)}function ym(e,t){var n,i=this;return E((function(r){return 1==r.h?r.g(lm.call(i,e,t),2):pm(n=r.i)?(navigator.requestMediaKeySystemAccess=lm,r.return(n)):(navigator.requestMediaKeySystemAccess=bm,r.return(bm.call(i,e,t)))}))}function bm(e,t){var n,i,r,a,o,s,u,l,c,d,h,f,g=this;return E((function(m){if(1==m.h){for(n=fm(e),i=[],r=p(t),a=r.next();!a.done;a=r.next())o=a.value,s=wm(o.videoCapabilities,n),u=wm(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((l=Object.assign({},o)).videoCapabilities=s,l.audioCapabilities=u,i.push(l));if(!i.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return m.g(lm.call(g,e,i),2)}
2return d=m.i,f=h=null,i[0]&&(i[0].videoCapabilities&&(h=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(f=i[0].audioCapabilities[0].encryptionScheme)),m.return(new hm(d,h,f))}))}function wm(e,t){return e?e.filter((function(e){return gm(e.encryptionScheme,t)})):e}function Tm(){}function xm(){"getOrInsert"in Map.prototype||(Map.prototype.getOrInsert=Sm),"getOrInsertComputed"in Map.prototype||(Map.prototype.getOrInsertComputed=Am),"getOrInsert"in WeakMap.prototype||(WeakMap.prototype.getOrInsert=Sm),"getOrInsertComputed"in WeakMap.prototype||(WeakMap.prototype.getOrInsertComputed=Am)}function Sm(e,t){return this.has(e)||this.set(e,t),this.get(e)}function Am(e,t){return this.has(e)||this.set(e,t(e)),this.get(e)}function Em(){}function km(){Z().De()&&!cm&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(cm=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=Cm,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function Cm(e){var t,n,i=this;return E((function(r){switch(r.h){case 1:return r.g(cm.call(i,e),2);case 2:if(!(t=r.i).supported||!e.keySystemConfiguration)return r.return(t);if(pm(n=t.keySystemAccess))return navigator.mediaCapabilities.decodingInfo=cm,r.return(t);if(navigator.mediaCapabilities.decodingInfo=Im,n){r.u(3);break}return r.g(Mm(e),4);case 4:return t.keySystemAccess=r.i,r.return(t);case 3:return r.return(Im.call(i,e))}}))}function Im(e){var t,n,i,r,a,o,s,u=this;return E((function(l){switch(l.h){case 1:return n=t=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,r=i.keySystem,n=i.audio&&i.audio.encryptionScheme,t=i.video&&i.video.encryptionScheme,a=fm(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},gm(n,a)&&gm(t,a))?l.g(cm.call(u,e),2):l.return(o);case 2:if((s=l.i).keySystemAccess){s.keySystemAccess=new hm(s.keySystemAccess,t,n),l.u(3);break}if(!e.keySystemConfiguration){l.u(3);break}return l.g(Mm(e),5);case 5:s.keySystemAccess=l.i;case 3:return l.return(s)}}))}function Mm(e){var t,n;return E((function(i){if(1==i.h){var r=e.keySystemConfiguration,a=[],o=[];return r.audio&&a.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&o.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},a.length&&(r.audioCapabilities=a),o.length&&(r.videoCapabilities=o),t=r,i.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.i,i.return(n)}))}function Rm(){}function Dm(){Z().Pb()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Rm.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Lm)}function Lm(t){var n,i,r,a,o,s,u;return E((function(l){switch(l.h){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},Z(),i=t.video,r=t.audio,"media-source"!=t.type){if("file"!=t.type)return l.return(n);if(i&&(a=i.contentType,""==to().canPlayType(a))||r&&(o=r.contentType,""==to().canPlayType(o)))return l.return(n);l.u(2);break}if(!ao())return l.return(n);if(!i){l.u(3);break}return l.g(function(t){var n;return E((function(i){return 1==i.h?"CAST"!==Z().Fa()?i.u(2):i.g(function(t){var n,i,r,a;return E((function(o){if(1==o.h){if(!(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return o.return(lu(t.contentType));switch(n=t.contentType,t.width&&t.height&&t.width>1280&&t.height>720&&(n+="; width="+t.width+"; height="+t.height),t.framerate&&((i=Math.round(t.framerate))<24||i>30)&&(n+="; framerate="+t.framerate),t.transferFunction||""){case"":case"srgb":break;case"pq":n+="; eotf=smpte2084";break;case"hlg":n+="; eotf=arib-std-b67";break;default:return o.return(!1)}return r=!1,(a=Bm).has(n)?(r=a.get(n),o.u(2)):o.g(cast.__platform__.canDisplayType(n),3)}return 2!=o.h&&(r=o.i,a.set(n,r)),o.return(r)}))}(t),3):2!=i.h?(n=i.i,i.return(n)):i.return(lu(t.contentType))}))}(i),4);case 4:if(!l.i)return l.return(n);case 3:if(r){var c=Z().Fa(),d=r.contentType;
2if("CAST"===c&&r.spatialRendering&&(d+="; spatialRendering=true"),!lu(d))return l.return(n)}case 2:return t.keySystemConfiguration?(s=t.keySystemConfiguration,l.g(function(e,t,n){var i,r,a,o,s,u,l,c,d,h,f,p;return E((function(g){switch(g.h){case 1:i=[],r=[],a=[],n.audio&&(o={robustness:n.audio.robustness||"",contentType:t.contentType},Z().Vg()&&t.contentType.includes('codecs="ac-3"')&&(o.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(o.encryptionScheme=n.audio.encryptionScheme,a.push(n.audio.encryptionScheme)),i.push(o)),n.video&&(s={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(s.encryptionScheme=n.video.encryptionScheme,a.push(n.video.encryptionScheme)),r.push(s)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(u.audioCapabilities=i),r.length&&(u.videoCapabilities=r),l=e?e.contentType:"",c=t?t.contentType:"",d=Fn(l)+";"+Bn(l),h=Fn(c)+";"+Bn(c),f=n.keySystem,p=null,g.m(2);var m=Pe(d,h,f,a);if(Ue.has(m)){m=Pe(d,h,f,a),p=Ue.get(m)||null,g.u(4);break}return g.g(navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:m=p=g.i;var v=Pe(d,h,f,a);Ue.set(v,m);case 4:g.o(3);break;case 2:g.l();case 3:return g.return(p)}}))}(i,r,s),6)):(n.supported=!0,l.return(n));case 6:(u=l.i)&&(n.supported=!0,n.keySystemAccess=u);case 5:return l.return(n)}}))}hm.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=p(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=p(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},hm.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},sm.EmeEncryptionScheme=mm,mm.install=vm,um(vm),sm.Map=Tm,Tm.install=xm,um(xm),sm.MCapEncryptionScheme=Em,Em.install=km,um(km,-2),sm.MediaCapabilities=Rm,Rm.install=Dm,Rm.originalMcap=null;var Nm,Pm,Om,jm,Um,_m,Bm=new Map;function Fm(){}function Hm(){var t=Z(),n="WEBKIT"===t.va()?t.oa():null;for((e.MediaSource||e.ManagedMediaSource)&&n&&e.MediaSource&&(n<=12?(Vm(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):n<=15&&Vm()),n=(t=p(t.eh())).next();!n.done;n=t.next())Gm(n.value);(e.MediaSource||e.ManagedMediaSource)&&function(){if(e.MediaSource){var t=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(e){return"mp2t"!=Un(e)&&t(e)}}if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return"mp2t"!=Un(e)&&n(e)}}}(),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;Z().uh()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex((function(e){return e.startsWith("codecs=")}));if(i<0)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=r.findIndex((function(e){return e.startsWith("vp09")}));return a>=0&&(r[a]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}()}function Vm(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,k.apply(0,arguments));return t.abort=function(){},t}}function Gm(t){var n=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(e){return Bn(e)!=t&&n(e)},e.ManagedMediaSource){var i=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);e.ManagedMediaSource.isTypeSupported=function(e){return Bn(e)!=t&&i(e)}}}function Km(){}function Xm(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&e.shakaMediaKeysPolyfill!=tv&&(void 0!==t&&t&&(Nm=!0,Pm=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Om=HTMLMediaElement.prototype.setMediaKeys,jm=e.MediaKeys,Um=e.MediaKeySystemAccess,_m=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=zm,e.MediaKeys=Jm,e.MediaKeySystemAccess=Ym,navigator.requestMediaKeySystemAccess=Wm,e.shakaMediaKeysPolyfill=tv,_i.clear(),Ue.clear())}function Wm(e,t){try{var n=new Ym(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function zm(e){var t=this.mediaKeys;return t&&t!=e&&$m(t,null),delete this.mediaKeys,(this.mediaKeys=e)?$m(e,this):Promise.resolve()}function qm(e){if(Ae(e=xe(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Xe(e=Ge(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Te(e),this.dispatchEvent(t)}function Ym(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=p(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var a=p(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupp
2orted(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),r=!0));if(n.videoCapabilities)for(a=(n=p(n.videoCapabilities)).next();!a.done;a=n.next())(a=a.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function Jm(e){this.h=new WebKitMediaKeys(e),this.g=new Y}function $m(e,t){if(e.g.Pa(),!t)return Promise.resolve();e.g.I(t,"webkitneedkey",qm);try{return pd(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Qm(e){No.call(this),this.i=null,this.m=e,this.g=this.h=null,this.j=new Y,this.l=Promise.withResolvers(),this.sessionId="",this.expiration=NaN,this.keyStatuses=new ev,this.onkeystatuseschange=null}function Zm(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new Lo("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function ev(){this.size=0,this.g=void 0}um(Dm,-1),sm.MediaSource=Fm,Fm.install=Hm,um(Hm),sm.PatchedMediaKeysApple=Km,Km.uninstall=function(){e.shakaMediaKeysPolyfill==tv&&Nm&&(Nm=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Pm),HTMLMediaElement.prototype.setMediaKeys=Om,e.MediaKeys=jm,e.MediaKeySystemAccess=Um,navigator.requestMediaKeySystemAccess=_m,Pm=_m=Om=Um=jm=null,e.shakaMediaKeysPolyfill="",_i.clear(),Ue.clear())},Km.install=Xm,Ym.prototype.createMediaKeys=function(){var e=new Jm(this.keySystem);return Promise.resolve(e)},Ym.prototype.getConfiguration=function(){return this.g},Jm.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Qm(this.h,e)},Jm.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Jm.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},h(Qm,No),(i=Qm.prototype).generateRequest=function(e,t){var n=this;this.h=Promise.withResolvers();try{var i=this.m.createSession("video/mp4",xe(t));this.i=i,this.sessionId=i.sessionId||"",this.j.I(this.i,"webkitkeymessage",(function(e){n.h&&(n.h.resolve(),n.h=null),e=new Lo("message",e=(new Map).set("messageType",null==n.keyStatuses.Ib()?"license-request":"license-renewal").set("message",Te(e.message))),n.dispatchEvent(e)})),this.j.I(i,"webkitkeyadded",(function(){n.g&&(Zm(n,"usable"),n.g.resolve(),n.g=null)})),this.j.I(i,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Zm(n,"output-not-allowed");break;default:Zm(n,"internal-error")}})),Zm(this,"status-pending")}catch(e){this.h.reject(e)}return this.h.promise},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.g=Promise.withResolvers();try{this.i.update(xe(e))}catch(e){this.g.reject(e)}return this.g.promise},i.close=function(){try{this.i.close(),this.l.resolve(),this.j.Pa()}catch(e){this.l.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"))},s.Object.defineProperties(Qm.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.l.promise}}}),(i=ev.prototype).Ib=function(){return this.g},i.forEach=function(e){this.g&&e(this.g,je.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=je.value();return!(!this.g||!we(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var tv="apple";function nv(){}function iv(){if(e.MediaKeys){var t=Z();MediaKeys.prototype.setServerCertificate&&t.wd()||(MediaKeys.prototype.setServerCertificate=rv)}}function rv(){return Promise.resolve(!1)}function av(){}function ov(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
2(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=uv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lv,e.MediaKeys=dv,e.MediaKeySystemAccess=cv,e.shakaMediaKeysPolyfill=wv}}function sv(e){return bv?bv+e.charAt(0).toUpperCase()+e.slice(1):e}function uv(e,t){try{var n=new cv(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function lv(e){var t=this.mediaKeys;return t&&t!=e&&hv(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&hv(e,this),Promise.resolve()}function cv(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var a=(t=p(t)).next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var u=p(a.audioCapabilities),l=u.next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(l),i=!0));if(a.videoCapabilities)for(l=(u=p(a.videoCapabilities)).next();!l.done;l=u.next())(l=l.value).contentType&&(s=!0,r.canPlayType(l.contentType,this.g)&&(o.videoCapabilities.push(l),i=!0));if(s||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=o)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function dv(e){this.l=e,this.h=null,this.g=new Y,this.i=[],this.j=new Map}function hv(e,t){e.h=t,e.g.Pa();var n=bv;t&&(e.g.I(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=Te(t.initData),e.h.dispatchEvent(n)})),e.g.I(t,n+"keymessage",(function(t){var n=fv(e,t.sessionId);n&&(t=new Lo("message",t=(new Map).set("messageType",null==n.keyStatuses.Ib()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.g.I(t,n+"keyadded",(function(t){(t=fv(e,t.sessionId))&&t.ready()})),e.g.I(t,n+"keyerror",(function(t){var n=fv(e,t.sessionId);if(n){var i=Error("EME v0.1b key error"),r=t.errorCode;r.systemCode=t.systemCode,i.errorCode=r,!t.sessionId&&n.h?(45==t.systemCode&&(i.message="Unsupported session type."),n.h.reject(i),n.h=null):t.sessionId&&n.g?(n.g.reject(i),n.g=null):(i=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?vv(n,"output-restricted"):vv(n,1==i?"expired":"internal-error"))}})))}function fv(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 pv(e,t,n){No.call(this),this.l=e,this.o=!1,this.g=this.h=null,this.j=t,this.m=n,this.i=Promise.withResolvers(),this.sessionId="",this.expiration=NaN,this.keyStatuses=new yv,this.onkeystatuseschange=null}function gv(e,t,n){if(e.o)return Promise.reject(Error("The session is already initialized."));e.o=!0;try{if("persistent-license"==e.m)if(n)var i=xe(Xe("LOAD_SESSION|"+n));else{var r=Xe("PERSISTENT|");i=tt(r,t)}else i=xe(t)}catch(e){return Promise.reject(e)}e.h=Promise.withResolvers();var a=sv("generateKeyRequest");try{e.l[a](e.j,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new ti((function(){try{e.l[a](e.j,i)}catch(t){e.h.reject(t),e.h=null}})).ba(.01)}return e.h.promise}function mv(e,t,n){if(e.g)e.g.promise.then((function(){return mv(e,t,n)})).catch((function(){return mv(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.j){var i=Ve(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=Qe(r.keys[0].k),r=Qe(r.keys[0].kid)}else i=xe(n),r=null;var a=sv("addKey");try{e.l[a](e.j,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function vv(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new Lo("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}
2function yv(){this.size=0,this.g=void 0}um((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||Xm())})),sm.PatchedMediaKeysCert=nv,nv.install=iv,um(iv),sm.PatchedMediaKeysWebkit=av,av.install=ov,cv.prototype.createMediaKeys=function(){var e=new dv(this.g);return Promise.resolve(e)},cv.prototype.getConfiguration=function(){return this.h},dv.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 pv(t,this.l,e),this.i.push(e),e},dv.prototype.setServerCertificate=function(){return Promise.resolve(!1)},dv.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},h(pv,No),(i=pv.prototype).ready=function(){vv(this,"usable"),this.g&&this.g.resolve(),this.g=null},i.generateRequest=function(e,t){return gv(this,t,null)},i.load=function(e){return"persistent-license"==this.m?gv(this,null,e):Promise.reject(Error("Not a persistent session."))},i.update=function(e){var t=Promise.withResolvers();return mv(this,t,e),t.promise},i.close=function(){if("persistent-license"!=this.m){if(!this.sessionId)return this.i.reject(Error("The session is not callable.")),this.i.promise;var e=sv("cancelKeyRequest");try{this.l[e](this.j,this.sessionId)}catch(e){}}return this.i.resolve(),this.i.promise},i.remove=function(){return"persistent-license"!=this.m?Promise.reject(Error("Not a persistent session.")):this.close()},s.Object.defineProperties(pv.prototype,{closed:{configurable:!0,enumerable:!0,get:function(){return this.i.promise}}}),(i=yv.prototype).Ib=function(){return this.g},i.forEach=function(e){this.g&&e(this.g,je.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=je.value();return!(!this.g||!we(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var bv="",wv="webkit";function Tv(){}function xv(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=Sv))}function Sv(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function Av(){}function Ev(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:kv})}function kv(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function Cv(){}function Iv(){for(var e=p([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next()){var n=void 0;null!=(n=(t=t.value).prototype).indexOf||(n.indexOf=Array.prototype.indexOf),n=void 0,null!=(n=t.prototype).lastIndexOf||(n.lastIndexOf=Array.prototype.lastIndexOf),n=void 0,null!=(n=t.prototype).includes||(n.includes=Array.prototype.includes)}}function Mv(){}function Rv(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function Dv(){}function Lv(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||"number"==typeof to().webkitDroppedFrameCount)&&(t.getVideoPlaybackQuality=Nv)}}function Nv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Pv(){}function Ov(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=jv;else if(6==n)t=Uv;else{try{var i=!!jv(1,2,"")}catch(e){i=!1}i&&(t=jv)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function jv(t,n,i){return new e.TextTrackCue(t,n,i)}function Uv(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function _v(){this.g="UNKNOWN"}function Bv(e,t,n,i,r,a,o,s,u,l,c,d,h,f){var g=c;if(Gt(t)){if(!d)return null;var m={tagName:"span",children:[Xt(t)],attributes:{},parent:null}}else m=t;for(var v=null,y=p(fy),b=y.next();!b.done&&!(v=zv(m,"backgroundImage",r,"#",b.value)[0]);b=y.next());y=null;var w=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((b=qt(m,fy,"backgroundImage"))&&w.test(b)){if((y=parseInt(b.split(":").pop(),10)-1)>=f.length)return null;y=f[y]}else h&&b&&!b.startsWith("#")&&(w=new re(h),b=new re(b),(b=w.resolve(b).toString())&&
2(y=b));if(("p"==t.tagName||v||y)&&(d=!0),t=d,b="default"==(m.attributes["xml:space"]||(u?"default":"preserve")),u=[],!(w=m.children.every(Gt)))for(var T=p(m.children),x=T.next();!x.done;x=T.next())(x=Bv(e,x.value,n,i,r,a,o,s,b,l,m,d,h,f))&&u.push(x);if(r=null!=c,h=Xt(m),h=m.children.length&&h&&/\S/.test(h),!((T=m.attributes.begin||m.attributes.end||m.attributes.dur)||h||"br"==m.tagName||0!=u.length||r&&!b))return null;for(h=(f=Yv(m,i)).start,f=f.end;g&&g.tagName&&"tt"!=g.tagName;)h=(f=qv(g,i,h,f)).start,f=f.end,g=g.parent;if(null==h&&(h=0),h+=n.periodStart,f=null==f?1/0:f+n.periodStart,"HLS"!==e.g&&(h=Math.max(h,n.segmentStart),f=Math.min(f,n.segmentEnd)),!T&&u.length>0)for(h=1/0,f=0,i=(n=p(u)).next();!i.done;i=n.next())i=i.value,h=Math.min(h,i.startTime),f=Math.max(f,i.endTime);if("br"==m.tagName)return(e=new Qt(h,f,"")).lineBreak=!0,e;if(n="",w&&(n=ze(Xt(m)||""),b&&(n=n.replace(/\s+/g," "))),(n=new Qt(h,f,n)).nestedCues=u,d||(n.isContainer=!0),l&&(n.cellResolution=l),l=zv(m,"region",o,"")[0],m.attributes.region&&l&&l.attributes["xml:id"]){var S=l.attributes["xml:id"];n.region=s.filter((function(e){return e.id==S}))[0]}return s=l,c&&r&&!m.attributes.region&&!m.attributes.style&&(s=zv(c,"region",o,"")[0]),function(e,t,n,i,r,a,o,s,u){if("rtl"==Gv(e,n,i,o,"direction",s=s||u)&&(t.direction="rtl"),"tb"==(u=Gv(e,n,i,o,"writingMode",s))||"tblr"==u?t.writingMode="vertical-lr":"tbrl"==u?t.writingMode="vertical-rl":"rltb"==u||"rl"==u?t.direction="rtl":u&&(t.direction=dn),(u=Gv(e,n,i,o,"textAlign",!0))?(t.positionAlign=cy.get(u),t.lineAlign=ly.get(u),t.textAlign=un[u.toUpperCase()]):t.textAlign=sn,(u=Gv(e,n,i,o,"displayAlign",!0))&&(t.displayAlign=cn[u.toUpperCase()]),(u=Gv(e,n,i,o,"color",s))&&(t.color=Hv(u)),(u=Gv(e,n,i,o,"backgroundColor",s))&&(t.backgroundColor=Hv(u)),(u=Gv(e,n,i,o,"border",s))&&(t.border=u),u=Gv(e,n,i,o,"fontFamily",s))switch(u){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=u.split(",").filter((function(e){return"default"!=e})).join(",")}switch((u=Gv(e,n,i,o,"fontWeight",s))&&"bold"==u&&(t.fontWeight=bn),u=Gv(e,n,i,o,"wrapOption",s),t.wrapLine=!u||"noWrap"!=u,(u=Gv(e,n,i,o,"lineHeight",s))&&u.match(ty)&&(t.lineHeight=u),(u=Gv(e,n,i,o,"fontSize",s))&&(u.match(ty)||u.match(ey))&&(t.fontSize=u),(u=Gv(e,n,i,o,"fontStyle",s))&&(t.fontStyle=xn[u.toUpperCase()]),r?(a=r.attributes.imageType||r.attributes.imagetype,u=r.attributes.encoding,r=Xt(r).trim(),"PNG"==a&&"Base64"==u&&r&&(t.backgroundImage="data:image/png;base64,"+r)):a&&(t.backgroundImage=a),(r=Gv(e,n,i,o,"textOutline",s))&&((r=r.split(" "))[0].match(ty)?t.textStrokeColor=t.color:(t.textStrokeColor=Hv(r[0]),r.shift()),r[0]&&r[0].match(ty)?t.textStrokeWidth=r[0]:t.textStrokeColor=""),(r=Gv(e,n,i,o,"letterSpacing",s))&&r.match(ty)&&(t.letterSpacing=r),(r=Gv(e,n,i,o,"linePadding",s))&&r.match(ty)&&(t.linePadding=r),(r=Gv(e,n,i,o,"opacity",s))&&(t.opacity=parseFloat(r)),(r=Kv(e,i,o,"textDecoration"))&&Vv(t,r),(r=Xv(e,n,o,"textDecoration"))&&Vv(t,r),(r=Gv(e,n,i,o,"textCombine",s))&&(t.textCombineUpright=r),Gv(e,n,i,o,"ruby",s)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}(e,n,m,s,v,y,a,t,0==u.length),n}function Fv(e,t,n,i){var r=new Mt,a=t.attributes["xml:id"];if(!a)return null;r.id=a,a=null,i&&(a=Zv.exec(i)||ny.exec(i)),i=a?Number(a[1]):null,a=a?Number(a[2]):null;var o,s=Kv(e,t,n,"extent");if(s){var u=(o=Zv.exec(s))||ny.exec(s);null!=u&&(r.width=Number(u[1]),r.height=Number(u[2]),o||(null!=i&&(r.width=100*r.width/i),null!=a&&(r.height=100*r.height/a)),r.widthUnits=o||null!=i?Rt:0,r.heightUnits=o||null!=a?Rt:0)}return(e=Kv(e,t,n,"origin"))&&null!=(u=(o=Zv.exec(e))||ny.exec(e))&&(r.viewportAnchorX=Number(u[1]),r.viewportAnchorY=Number(u[2]),o?s||(r.width=100-r.viewportAnchorX,r.widthUnits=Rt,r.height=100-r.viewportAnchorY,r.heightUnits=Rt):(null!=a&&(r.viewportAnchorY=100*r.viewportAnchorY/a),null!=i&&(r.viewportAnchorX=100*r.viewportAnchorX/i)),r.viewportAnchorUnits=o||null!=i?Rt:0),r}function Hv(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&4==(t=t[1].split(",")).length?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function Vv(e,t){for(var n=(t=p(t.split(" "))).next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Sn)||e.textDecoration.push(Sn);break;case"noUnderline":e.textDecoration.includes(Sn)&&K(e.textDecoration,Sn);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&K(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&K(e.textDecoration,"overline")}}function Gv(e,t,n,i,r,a){return a=void 0===a||a,(t=Xv(e,t,i,r))?t:a?Kv(e,n,i,r):null}function Kv(e,t,n,i){return t?qt(t,hy,i)||Wv(e,t,n,i):null}function Xv(e,t,n,i){return qt(t,hy,i)||Wv(e,t,n,i)}function Wv(e,t,n,i){t=zv(t,"style",n,"");for(var r=null,a=0;a<t.length;a++){var o=zt(t[a],"urn:ebu:tt:style",i);o||(o=qt(t[a],hy,i)),o||(o=Xv(e,t[a],n,i)),o&&(r=o)}return r}function zv(e,t,n,i,r){var a=[];if(!e||n.length<1)return a;var o=e;for(e=null;!e&&!(e=r?zt(o,r,t):o.attributes[t])&&(o=o.parent););if(t=e)for(r=(t=p(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=p(n)).next();!o.done;o=e.next())if(i+(o=o.value).attributes["xml:id"]==r){a.push(o);break}return a}function qv(e,t,n,i){return e=Yv(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 Yv(e,t){var n=Jv(e.attributes.begin,t),i=Jv(e.attributes.end,t);return e=Jv(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function Jv(e,t){var n=null;if(iy.test(e)){e=iy.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),a=Number(e[4]);n=(r+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*i+3600*n}else if(ry.test(e))n=$v(ry,e);else if(ay.test(e))n=$v(ay,e);else if(oy.test(e))e=oy.exec(e),n=Number(e[1])/t.frameRate;else if(sy.test(e))e=sy.exec(e),n=Number(e[1])/t.g;else if(uy.test(e))n=$v(uy,e);else if(e)throw new _e(2,2,2001,"Could not parse cue time range in TTML");return n}function $v(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function Qv(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]))}um(ov),sm.RandomUUID=Tv,Tv.install=xv,um(xv),sm.Symbol=Av,Av.install=Ev,um(Ev),sm.TypedArray=Cv,Cv.install=Iv,um(Iv),sm.VideoPlayPromise=Mv,Mv.install=Rv,um(Rv),sm.VideoPlaybackQuality=Dv,Dv.install=Lv,um(Lv),sm.VTTCue=Pv,Pv.install=Ov,um(Ov),_v.prototype.parseInit=function(){},_v.prototype.setManifestType=function(e){this.g=e},_v.prototype.parseMedia=function(e,t,n,i){var r=Ve(e);if(e=[],""==r)return e;var a=Vt(r,"tt",!0);if(!a)throw new _e(2,2,2005,"Failed to parse TTML.");if(!(r=Wt(a,"body")[0]))return[];var o=qt(a,dy,"frameRate"),s=qt(a,dy,"subFrameRate"),u=qt(a,dy,"frameRateMultiplier"),l=qt(a,dy,"tickRate"),c=qt(a,dy,"cellResolution"),d=a.attributes["xml:space"]||"default",h=qt(a,hy,"extent");
2if("default"!=d&&"preserve"!=d)throw new _e(2,2,2005,"Invalid xml:space value: "+d);d="default"==d,o=new Qv(o,s,u,l),c=function(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}(c),s=((s=Wt(a,"metadata")[0])?s.children:[]).filter((function(e){return"\n"!=e})),u=Wt(a,"style"),l=[];for(var f=p(a=Wt(a,"region")),g=f.next();!g.done;g=f.next())(g=Fv(this,g.value,u,h))&&l.push(g);if(Kt(r,"p").length)throw new _e(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(h=p(Kt(r,"div"))).next();!f.done;f=h.next())if(Kt(f.value,"span").length)throw new _e(2,2,2001,"<span> can only be inside <p> in TTML");return(t=Bv(this,r,t,o,s,u,a,l,d,c,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},P("shaka.text.TtmlTextParser",_v),_v.prototype.parseMedia=_v.prototype.parseMedia,_v.prototype.setManifestType=_v.prototype.setManifestType,_v.prototype.parseInit=_v.prototype.parseInit;var Zv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ey=/^(\d{1,4}(?:\.\d+)?|100)%$/,ty=/^(\d+px|\d+em|\d*\.?\d+c)$/,ny=/^(\d+)px (\d+)px$/,iy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ry=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ay=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,oy=/^(\d*(?:\.\d*)?)f$/,sy=/^(\d*(?:\.\d*)?)t$/,uy=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ly=(new Map).set("left",pn).set("center","center").set("right","end").set("start",pn).set("end","end"),cy=(new Map).set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),dy=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],hy=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],fy=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function py(){this.g=new _v}function gy(){this.g="UNKNOWN"}function my(e,t,n){var i;(i=yy.exec(t))?(t=i[1],e.textAlign="middle"==t?sn:un[t.toUpperCase()]):(i=by.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=wy.exec(t))?e.size=Number(i[1]):(i=Ty.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":on)):(i=xy.exec(t))?(t=function(e,t){return e=e.filter((function(e){return e.id==t})),e.length?e[0]:null}(n,i[1]))&&(e.region=t):(n=Sy.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=gn[n[2].toUpperCase()])):(n=Ay.exec(t))&&(e.lineInterpretation=fn,e.line=Number(n[1]),n[2]&&(e.lineAlign=gn[n[2].toUpperCase()]))}Wn("application/ttml+xml",(function(){return new _v})),py.prototype.parseInit=function(e){var t=!1;if((new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new _e(2,2,2007)},py.prototype.setManifestType=function(e){this.g.setManifestType(e)},py.prototype.parseMedia=function(e,t,n){var i=[],r=null,a=[],o=new Map,s=[];if((new Gr).box("moof",Kr).box("traf",Kr).N("tfhd",(function(e){r=ea(e.reader,e.flags).Kc})).N("trun",(function(e){for(var t=(e=p((e=ia(e.reader,e.version,e.flags)).td)).next();!t.done;t=e.next())s.push(t.value.sampleSize||r||0)})).N("subs",(function(e){for(var t=e.reader,n=t.T(),i=-1,r=0;r<n;r++){var a=t.T();i+=a,a=t.ra();for(var s=[],u=0;u<a;u++)1==e.version?s.push(t.T()):s.push(t.ra()),t.V(),t.V(),t.T();o.set(i,s)}})).box("mdat",qr((function(e){a.push(e)}),!1)).parse(e,!1),0==a.length)throw new _e(2,2,2007);e=tt.apply(Ye,g(a));for(var u=0,l=0;l<s.length;l++){var c=xe(e,u,s[l]);u+=s[l];var d=o.get(l);if(d&&d.length){for(var h=xe(c,0,d[0]),f=[],m=d[0],v=1;v<d.length;v++){var y=xe(c,m,d[v]);y=Je(y),f.push("data:image/png;base64,"+y),m+=d[v]}i=i.concat(this.g.parseMedia(h,t,n,f))}else i=i.concat(this.g.parseMedia(c,t,n,[]))}return i},P("shaka.text.Mp4TtmlParser",py),py.prototype.parseMedia=py.prototype.parseMedia,py.prototype.setManifestType=py.prototype.setManifestType,py.prototype.parseInit=py.prototype.parseInit,Wn('application/mp4; codecs="stpp"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.im1i"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.im1t"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.im2i"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.im2t"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.etd1"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.etd1|im1t"',(function(){return new py})),Wn('application/mp4; codecs="stpp.ttml.im1t|etd1"',(function(){return new py})),Wn('application/mp4; codecs="stpp.TTML.im1t"',(function(){return new py})),gy.prototype.parseInit=function(){},gy.prototype.setManifestType=function(e){this.g=e},gy.prototype.parseMedia=function(e,t){var n=(e=(e=Ve(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);
2if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new _e(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g&&n[0].includes("X-TIMESTAMP-MAP")){var i=(e=n[0]).match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);if(e=e.match(/MPEGTS:(\d+)/m),!i||!e)throw new _e(2,2,2e3);if(null==(i=(i=i[1])?jt(new Lt(i)):null))throw new _e(2,2,2e3);e=Number(e[1]);for(var r=t.segmentStart-t.periodStart;r>=95443.7176888889;)r-=95443.7176888889,e+=8589934592;e=t.periodStart+e/9e4-i}for(t=[],r=(i=p(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new Lt(r);var a=new Mt;Ot(r),Nt(r);for(var o=Ot(r);o;){var s=a,u=o;(o=/^id=(.*)$/.exec(u))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(u))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(u))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(u)&&(s.scroll="up"),Nt(r),o=Ot(r)}t.push(a)}for(nn(i=new Map),r=[],a=(n=p(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!vy.test(a[0])&&"STYLE"==a[0]){for(s=[],o=-1,u=1;u<a.length;u++)a[u].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[u]),a[u].includes("}")&&(o=-1));for(o=(s=p(s)).next();!o.done;o=s.next()){var l=o.value;o="global",(u=l[0].match(/\((.*)\)/))&&(o=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=i.get(o))||(l=new Qt(0,0,""));for(var c=!1,d=0;d<u.length;d++){var h=/^\s*([^:]+):\s*(.*)/.exec(u[d]);if(h){var f=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=f;break;case"color":c=!0,l.color=f;break;case"font-family":c=!0,l.fontFamily=f;break;case"font-size":c=!0,l.fontSize=f;break;case"font-weight":(parseInt(f,10)>=700||"bold"==f)&&(c=!0,l.fontWeight=bn);break;case"font-style":switch(f){case"normal":c=!0,l.fontStyle=wn;break;case"italic":c=!0,l.fontStyle=Tn;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(f);break;case"text-combine-upright":c=!0,l.textCombineUpright=f;break;case"text-shadow":c=!0,l.textShadow=f;break;case"white-space":c=!0,l.wrapLine="noWrap"!=f}}}c&&i.set(o,l)}}if(d=e,1==(l=a).length&&!l[0]||vy.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])a=null;else if(a=null,c=0,l[0].includes("--\x3e")||(a=l[0],c=1),o=jt(s=new Lt(l[c])),h=Pt(s,/[ \t]+--\x3e[ \t]+/g),u=jt(s),null==o||null==h||null==u)F("Failed to parse VTT time code. Cue skipped:",a,l),a=null;else{for(u+=d,(o+=d)<0&&(o=0),d="",h=c+1;h<l.length;h++)h>c+1&&(d+="\n"),d+=l[h];for(d=d.trim(),i.has("global")?((l=i.get("global").clone()).startTime=o,l.endTime=u,l.payload=d):l=new Qt(o,u,d),Nt(s),o=Ot(s);o;)my(l,o,t),Nt(s),o=Ot(s);tn(l,i),null!=a&&(l.id=a),a=l}a&&r.push(a)}return r},P("shaka.text.VttTextParser",gy),gy.prototype.parseMedia=gy.prototype.parseMedia,gy.prototype.setManifestType=gy.prototype.setManifestType,gy.prototype.parseInit=gy.prototype.parseInit;var vy=/^NOTE($|[ \t])/,yy=/^align:(start|middle|center|end|left|right)$/,by=/^vertical:(lr|rl)$/,wy=/^size:([\d.]+)%$/,Ty=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,xy=/^region:(.*)$/,Sy=/^line:([\d.]+)%(?:,(start|end|center))?$/,Ay=/^line:(-?\d+)(?:,(start|end|center))?$/;function Ey(){this.g=null}function ky(e,t,n){var i,r,a;return(new Gr).box("payl",qr((function(e){i=Ve(e)}),!1)).box("iden",qr((function(e){r=Ve(e)}),!1)).box("sttg",qr((function(e){a=Ve(e)}),!1)).parse(e),i?function(e,t,n,i,r){if(tn(e=new Qt(i,r,e)),t&&(e.id=t),n)for(n=Ot(t=new Lt(n));n;)my(e,n,[]),Nt(t),n=Ot(t);return e}(i,r,a,t,n):null}function Cy(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)>0?{kd:n,ha:e}:null}function Iy(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var r=1+((192&e[t+2])>>>6),a=(1&e[t+2])<<2;return a|=(192&e[t+3])>>>6,{sampleRate:n[i],channelCount:a,codec:"mp4a.40."+r}}function My(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}Wn("text/vtt",(function(){return new gy})),Wn('text/vtt; codecs="vtt"',(function(){return new gy})),Wn('text/vtt; codecs="wvtt"',(function(){return new gy})),Ey.prototype.parseInit=function(e){var t=this,n=!1;if((new Gr).box("moov",Kr).box("trak",Kr).box("mdia",Kr).N("mdhd",(function(e){e=na(e.reader,e.version),t.g=e.timescale})).box("minf",Kr).box("stbl",Kr).N("stsd",Xr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new _e(2,2,2008);if(!n)throw new _e(2,2,2008)},Ey.prototype.setManifestType=function(){},Ey.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new _e(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,l=null;if((new Gr).box("moof",Kr).box("traf",Kr).N("tfdt",(function(e){o=!0,i=ta(e.reader,e.version).ya})).N("tfhd",(function(e){l=ea(e.reader,e.flags).ac})).N("trun",(function(e){s=!0,r=ia(e.reader,e.version,e.flags).td})).box("mdat",qr((function(e){u=!0,n=e}
2),!1)).parse(e,!1),!u&&!o&&!s)throw new _e(2,2,2008);e=i;for(var c=new Pr(n,0),d=p(r),h=d.next();!h.done;h=d.next()){var f=(h=h.value).ud||l,g=h.ze?i+h.ze:e;e=g+(f||0);var m=0;do{var v=c.T();m+=v;var y=null;"vttc"==Jr(c.T())?v>8&&(y=c.ab(v-8,!1)):c.skip(v-8),f&&y&&(v=ky(y,t.periodStart+g/this.g,t.periodStart+e/this.g),a.push(v))}while(h.sampleSize&&m<h.sampleSize)}return a.filter(ri)},P("shaka.text.Mp4VttParser",Ey),Ey.prototype.parseMedia=Ey.prototype.parseMedia,Ey.prototype.setManifestType=Ey.prototype.setManifestType,Ey.prototype.parseInit=Ey.prototype.parseInit,Wn('application/mp4; codecs="wvtt"',(function(){return new Ey}));var Ry=Object.freeze({Bf:0,ke:0,ge:0,Xd:0,Yd:2,Cf:0}),Dy=Object.freeze({Bf:0,ke:0,ge:0,Xd:0,Yd:2,Cf:0}),Ly=Object.freeze({Bf:0,ke:0,ge:0,Xd:0,Yd:1,Cf:1});function Ny(e){this.j=e,this.g=0,this.h=new Map,this.i=null}function Py(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(n>=3)return null;var i=63&e[t+4],r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,Da:e,ha:r}}function Oy(e,t){if(11===e[t]&&119===e[t+1]){var n,i,r=0,a=5;for(t+=a;a>0;){i=e[t];var o=Math.min(a,8),s=8-o;n=(i&(n=4278190080>>>24+s<<s))>>s,r=r?r<<o|n:n,t+=1,a-=o}if(r<16)return!0}return!1}function jy(e){this.j=e,this.g=0,this.h=new Map,this.i=null}function Uy(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]))return null;var n=new ba(e.subarray(t+2));Ta(n,2),Ta(n,3);var i=xa(n,11)+1<<1,r=xa(n,2);if(3==r){r=[24e3,22060,16e3][r=xa(n,2)];var a=3}else r=[48e3,44100,32e3][r],a=xa(n,2);var o=xa(n,3),s=xa(n,1);return n=xa(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][a])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,r<<6|n<<1,o<<1|s,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][o]+s,Da:e,ha:i})}function _y(e){this.j=e,this.g=0,this.h=new Map,this.i=null}(i=Ny.prototype).destroy=function(){this.h.clear()},i.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&lu(this.convertCodecs("audio",e))},i.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Hn(t)||"mp4a.40.2")+'"':t},i.getOriginalMimeType=function(){return this.j},i.transmux=function(e,t,n,i){for(var r=xe(e),a=Ua(r),o=a.length;o<r.length&&!My(r,o);o++);if(e=1e3*n.endTime,(a=ja(a)).length&&n&&(a=a.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(e=a.data),!(a=Iy(r,o)))return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));t.audioSamplingRate=a.sampleRate,t.channelsCount=a.channelCount;for(var s=[];o<r.length;){var u=Cy(r,o);if(!u)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));var l=u.kd+u.ha;o+l<=r.length&&s.push({data:r.subarray(o+u.kd,o+l),size:u.ha,duration:1024,hb:0,flags:Ry}),o+=l}r=a.sampleRate,e=Math.floor(e*r/1e3);var c=new jl([i={id:t.id,type:"audio",codecs:a.codec,timescale:r,duration:i,ub:[],Da:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:this.g,ya:e,mb:s},stream:t}]);return t=this.h.getOrInsertComputed(t.id+"_"+n.i,(function(){return Ul(c)})),n=this.i!==t,i=Gl(c),this.i=t,this.g++,Promise.resolve({data:i,init:n?t:null})},P("shaka.transmuxer.AacTransmuxer",Ny),Ny.prototype.transmux=Ny.prototype.transmux,Ny.prototype.getOriginalMimeType=Ny.prototype.getOriginalMimeType,Ny.prototype.convertCodecs=Ny.prototype.convertCodecs,Ny.prototype.isSupported=Ny.prototype.isSupported,Ny.prototype.destroy=Ny.prototype.destroy,kn("audio/aac",(function(){return new Ny("audio/aac")}),Mn),(i=jy.prototype).destroy=function(){this.h.clear()},i.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&lu(this.convertCodecs("audio",e))},i.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?Z().sd()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},i.getOriginalMimeType=function(){return this.j},i.transmux=function(e,t,n,i){for(var r=Ua(e=xe(e)),a=r.length;a<e.length&&!Oy(e,a);a++);var o=1e3*n.endTime;(r=ja(r)).length&&n&&(r=r.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=Py(e,a);if(!l)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));
2t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Da,u.push({data:e.subarray(a,a+l.ha),size:l.ha,duration:1536,hb:0,flags:Ry}),a+=l.ha}e=Math.floor(o*r/1e3);var c=new jl([i={id:t.id,type:"audio",codecs:"ac-3",timescale:r,duration:i,ub:[],Da:s,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:this.g,ya:e,mb:u},stream:t}]);return t=this.h.getOrInsertComputed(t.id+"_"+n.i,(function(){return Ul(c)})),n=this.i!==t,i=Gl(c),this.i=t,this.g++,Promise.resolve({data:i,init:n?t:null})},P("shaka.transmuxer.Ac3Transmuxer",jy),jy.prototype.transmux=jy.prototype.transmux,jy.prototype.getOriginalMimeType=jy.prototype.getOriginalMimeType,jy.prototype.convertCodecs=jy.prototype.convertCodecs,jy.prototype.isSupported=jy.prototype.isSupported,jy.prototype.destroy=jy.prototype.destroy,kn("audio/ac3",(function(){return new jy("audio/ac3")}),Mn),(i=_y.prototype).destroy=function(){this.h.clear()},i.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&lu(this.convertCodecs("audio",e))},i.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},i.getOriginalMimeType=function(){return this.j},i.transmux=function(e,t,n,i){for(var r=Ua(e=xe(e)),a=r.length;a<e.length&&2935!=(e[a]<<8|e[a+1]);a++);var o=1e3*n.endTime;(r=ja(r)).length&&n&&(r=r.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=r.data),r=0;for(var s=new Uint8Array([]),u=[];a<e.length;){var l=Uy(e,a);if(!l)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,s=l.Da,u.push({data:e.subarray(a,a+l.ha),size:l.ha,duration:1536,hb:0,flags:Ry}),a+=l.ha}e=Math.floor(o*r/1e3);var c=new jl([i={id:t.id,type:"audio",codecs:"ec-3",timescale:r,duration:i,ub:[],Da:s,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:this.g,ya:e,mb:u},stream:t}]);return t=this.h.getOrInsertComputed(t.id+"_"+n.i,(function(){return Ul(c)})),n=this.i!==t,i=Gl(c),this.i=t,this.g++,Promise.resolve({data:i,init:n?t:null})},P("shaka.transmuxer.Ec3Transmuxer",_y),_y.prototype.transmux=_y.prototype.transmux,_y.prototype.getOriginalMimeType=_y.prototype.getOriginalMimeType,_y.prototype.convertCodecs=_y.prototype.convertCodecs,_y.prototype.isSupported=_y.prototype.isSupported,_y.prototype.destroy=_y.prototype.destroy,kn("audio/ec3",(function(){return new _y("audio/ec3")}),Mn);var By=[100,110,122,244,44,83,86,118,128,138,139,134];function Fy(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==a){var o=e[t+3]>>6;r=1e3*Gy[14*(3===n?3-i:3===i?3:4)+r-1],a=Ky[3*(3===n?0:2===n?1:2)+a],n=Xy[n][i];var s=Wy[i],u=Math.floor(n*r/a+(e[t+2]>>1&1))*s,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&l<=87&&2===i&&r>=224e3&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,ha:u,ij:8*n*s}}return null}function Hy(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function Vy(e,t){if(t+1<e.length&&Hy(e,t)){var n=Fy(e,t),i=4;return n&&n.ha&&(i=n.ha),(t+=i)===e.length||t+1<e.length&&Hy(e,t)}return!1}var Gy=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Ky=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Xy=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Wy=[0,1,1,4];function zy(e){this.j=e,this.g=0,this.h=new Map,this.i=null}function qy(e){this.h=e,this.g=null}function Yy(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}(i=zy.prototype).destroy=function(){this.h.clear()},i.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&lu(this.convertCodecs("audio",e))},i.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},i.getOriginalMimeType=function(){return this.j},i.transmux=function(e,t,n,i){for(var r=xe(e),a=Ua(r).length;a<r.length&&!Vy(r,a);a++);var o;for(e=[];a<r.length;){var s=Fy(r,a);if(!s)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));o||(o=s),a+s.ha<=r.length&&e.push({data:r.subarray(a,a+s.ha),size:s.ha,duration:1152,hb:0,flags:Ry}),a+=s.ha}if(!o)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));r=9e4*o.ij/o.sampleRate*this.g;var u=new jl([i={id:t.id,type:"audio",codecs:"mp3",timescale:o.sampleRate,duration:i,ub:[],Da:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:this.g,ya:r,mb:e},stream:t}]);return t=this.h.getOrInsertComputed(t.id+"_"+n.i,(function(){return Ul(u)}
2)),n=this.i!==t,i=Gl(u),this.i=t,this.g++,Promise.resolve({data:i,init:n?t:null})},P("shaka.transmuxer.Mp3Transmuxer",zy),zy.prototype.transmux=zy.prototype.transmux,zy.prototype.getOriginalMimeType=zy.prototype.getOriginalMimeType,zy.prototype.convertCodecs=zy.prototype.convertCodecs,zy.prototype.isSupported=zy.prototype.isSupported,zy.prototype.destroy=zy.prototype.destroy,kn("audio/mpeg",(function(){return new zy("audio/mpeg")}),Mn),(i=qy.prototype).destroy=function(){},i.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=Hn(e).split(","),n=st("audio",t);return t=st("video",t),!(!n||t||"mp3"!=_n(n))&&lu(this.convertCodecs("audio",e))},i.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},i.getOriginalMimeType=function(){return this.h},i.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new _a,this.g.Ae(n.i),e=xe(e),"mp3"!=(e=this.g.parse(e)).dd().audio||"audio"!=r)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));for(n=new Uint8Array([]),r=p(e.ib()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=Fy(e,t))?(t+i.ha<=e.length&&(n=tt(n,e.subarray(t,t+i.ha))),t+=i.ha):t++;return Promise.resolve(n)},P("shaka.transmuxer.MpegTsTransmuxer",qy),qy.prototype.transmux=qy.prototype.transmux,qy.prototype.getOriginalMimeType=qy.prototype.getOriginalMimeType,qy.prototype.convertCodecs=qy.prototype.convertCodecs,qy.prototype.isSupported=qy.prototype.isSupported,qy.prototype.destroy=qy.prototype.destroy,kn("video/mp2t",(function(){return new qy("video/mp2t")}),Rn),(i=Yy.prototype).destroy=function(){this.j.clear(),this.i&&this.i.destroy()},i.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=Hn(n).split(",");return n=st("audio",i),i=st("video",i),!(n&&(n=_n(n),!Jy.includes(n))||i&&(n=_n(i),!$y.includes(n)))&&(t?lu(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),lu(t)||lu(e)))},i.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=Hn(t).replace("mp4a.40.34","mp3").split(",").map((function(e){return xi(e,"audio/mp4")})).map(Si).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},i.getOriginalMimeType=function(){return this.m},i.transmux=function(e,t,n,i,r){var a=xe(e);if("audio"==r&&!Ga(a)){for(var o=Ua(a),s=o.length;s<a.length;s++)if(Vy(a,s))return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));for(s=o.length;s<a.length;s++)if(My(a,s))return this.i||(this.i=new Ny("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null))}this.h?this.h.clearData():this.h=new _a,this.h.Ae(n.i),e=this.h.parse(a),a=[],o=e.dd();try{if(s=null,"video"==r){switch(o.video){case"avc":s=function(e,t,n,i,r){var a=[],o=null,s=function(e){function t(e){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:e.pts,dts:e.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var e=4*r.nalus.length,t=p(r.nalus),n=t.next();!n.done;n=t.next())e+=n.value.fullData.byteLength;e=new Uint8Array(e),t=0;for(var a=(n=p(r.nalus)).next();!a.done;a=n.next()){var o=(a=a.value).fullData.byteLength;e[t]=o>>24&255,e[t+1]=o>>16&255,e[t+2]=o>>8&255,e[t+3]=255&o,e.set(a.fullData,t+4),t+=4+o}r.data=e,i.push(r)}}for(var i=[],r=null,a=!1,o=0;o<e.length;o++){var s=e[o],u=s.nalus,l=!1;r&&u.length&&!a&&(n(),t(s));for(var c=(u=p(s.nalus)).next();!c.done;c=u.next()){var d=!1;switch((c=c.value).type){case 1:var h=!1;d=!0;var f=c.data;l&&f.length>4&&(2===(f=Ra(new ba(f)))||4===f||7===f||9===f)&&(h=!0),h&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=h;break;case 5:d=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(s),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:d=!0;break;case 7:l=d=!0;break;case 9:a=d=!0,r&&r.frame&&(n(),r=null),r||t(s);break;default:d=!1}r&&d&&r.nalus.push(c)}}return n(),i}(t=t.Nc());if(!s.length)throw new _e(2,3,3023,r?r.P()[0]:null);for(var u=0;u<s.length;u++){var l=s[u];null==o&&(o=l.dts),a.push({data:l.data,size:l.data.byteLength,duration:u+1<s.length?(s[u+1].dts||0)-(l.dts||0):s.length>1?(l.dts||0)-(s[u-1].dts||0):9e4*(r.endTime-r.startTime),hb:Math.round((l.pts||0)-(l.dts||0)),flags:l.isKeyframe?Dy:Ly})}for(s=[],u=(t=p(t)).next();!u.done;u=t.next())s.push.apply(s,g(u.value.nalus));if(t=function(e){if(!e.length)return null;var t=e.find((function(e){return 7==e.type}));if(e=e.find((function(e){return 8==e.type})),!t||!e)return null;var n=new ba(t.data),i=Ia(n);if(Ia(n),Ia(n),Aa(n),By.includes(i)&&(3===(i=Ea(n))&&Ta(n,1),Aa(n),Aa(n),Ta(n,1),
2Ca(n))){i=3!==i?8:12;for(var r=0;r<i;r++)Ca(n)&&Ma(n,r<6?16:64)}if(Aa(n),0===(i=Ea(n)))Ea(n);else if(1===i)for(Ta(n,1),Aa(n),Aa(n),i=Ea(n),r=0;r<i;r++)Aa(n);Aa(n),Ta(n,1);var a=Ea(n),o=Ea(n),s=xa(n,1);0===s&&Ta(n,1),Ta(n,1);var u=0,l=0,c=0,d=0;if(Ca(n)&&(u=Ea(n),l=Ea(n),c=Ea(n),d=Ea(n)),r=i=1,Ca(n)&&Ca(n)){var h=Ia(n);h>0&&h<=16?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][h-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][h-1]):255===h&&(i=xa(n,16),r=xa(n,16))}return n=(2-s)*(o+1)*16-2*c-2*d,a=16*(a+1)-2*u-2*l,u=(t=t.fullData).byteLength,l=(e=e.fullData).byteLength,o=0,(s=new Uint8Array(11+u+l))[o++]=1,s[o++]=t[1],s[o++]=t[2],s[o++]=t[3],s[o++]=255,s[o++]=225,s[o++]=u>>>8&255,s[o++]=255&u,s.set(t,o),o+=u,s[o++]=1,s[o++]=l>>>8&255,s[o++]=255&l,s.set(e,o),{height:n,width:a,Ma:s,Sa:i,Ua:r}}(s),!t||null==o)throw new _e(2,3,3018,r?r.P()[0]:null);return n.height=n.height||t.height,n.width=n.width||t.width,{id:n.id,type:"video",codecs:"avc1",timescale:9e4,duration:i,ub:[],Da:new Uint8Array([]),Ma:t.Ma,Sa:t.Sa,Ua:t.Ua,data:{sequenceNumber:e.g,ya:o,mb:a},stream:n}}(this,e,t,i,n);break;case"hvc":s=function(e,t,n,i,r){var a=[],o=null,s=[];if(!(t=t.Nc()).length)throw new _e(2,3,3023,r?r.P()[0]:null);for(var u=0;u<t.length;u++){var l=t[u],c=l.nalus;s.push.apply(s,g(c));for(var d=!1,h=[],f=!1,m=(c=p(c)).next();!m.done;m=c.next()){switch((m=m.value).type){case 1:case 0:var v=f=!0;break;case 19:case 20:case 21:d=v=f=!0;break;case 32:case 33:case 34:case 39:case 40:v=!0;break;case 35:f=v=!0;break;default:v=!1}if(f&&v){v=m.fullData.byteLength;var y=new Uint8Array(4);y[0]=v>>24&255,y[1]=v>>16&255,y[2]=v>>8&255,y[3]=255&v,h.push(y),h.push(m.fullData)}}(d=h.length?{data:tt.apply(Ye,g(h)),isKeyframe:d}:null)&&(null==o&&null!=l.dts&&(o=l.dts),a.push({data:d.data,size:d.data.byteLength,duration:u+1<t.length?(t[u+1].dts||0)-(l.dts||0):t.length>1?(l.dts||0)-(t[u-1].dts||0):9e4*(r.endTime-r.startTime),hb:Math.round((l.pts||0)-(l.dts||0)),flags:d.isKeyframe?Dy:Ly}))}if(s=function(e){if(!e.length)return null;var t=e.find((function(e){return 32==e.type})),n=e.find((function(e){return 33==e.type})),i=e.find((function(e){return 34==e.type}));if(!t||!n||!i)return null;var r=function(e){var t=new ba(e,!0);return Ia(t),Ia(t),xa(t,4),xa(t,2),xa(t,6),{If:(e=xa(t,3))+1,eg:t=Ca(t)}}(t.fullData);e=function(e){Ia(e=new ba(e,!0)),Ia(e);var t=0,n=0,i=0,r=0;xa(e,4);var a=xa(e,3);Ca(e);for(var o=xa(e,2),s=xa(e,1),u=xa(e,5),l=Ia(e),c=Ia(e),d=Ia(e),h=Ia(e),f=Ia(e),p=Ia(e),g=Ia(e),m=Ia(e),v=Ia(e),y=Ia(e),b=Ia(e),w=[],T=[],x=0;x<a;x++)w.push(Ca(e)),T.push(Ca(e));if(a>0)for(x=a;x<8;x++)xa(e,2);for(x=0;x<a;x++)w[x]&&xa(e,88),T[x]&&Ia(e);Ea(e),3==(w=Ea(e))&&xa(e,1),T=Ea(e),x=Ea(e),Ca(e)&&(t+=Ea(e),n+=Ea(e),i+=Ea(e),r+=Ea(e));var S=Ea(e),A=Ea(e),E=Ea(e);if(Ca(e))for(var k=0;k<=a;k++)Ea(e),Ea(e),Ea(e);else Ea(e),Ea(e),Ea(e);if(Ea(e),Ea(e),Ea(e),Ea(e),Ea(e),Ea(e),Ca(e)&&Ca(e))for(k=0;k<4;k++)for(var C=0;C<(3===k?2:6);C++)if(Ca(e)){var I=Math.min(64,1<<4+(k<<1));k>1&&ka(e);for(var M=0;M<I;M++)ka(e)}else Ea(e);for(Ca(e),Ca(e),Ca(e)&&(Ia(e),Ea(e),Ea(e),Ca(e)),k=Ea(e),I=C=0;I<k;I++)if(M=!1,0!==I&&(M=Ca(e)),M){I===k&&Ea(e),Ca(e),Ea(e);for(var R=M=0;R<=C;R++){var D=Ca(e),L=!1;D||(L=Ca(e)),(D||L)&&M++}C=M}else{for(C=(R=Ea(e))+(M=Ea(e)),D=0;D<R;D++)Ea(e),Ca(e);for(R=0;R<M;R++)Ea(e),Ca(e)}if(Ca(e))for(k=Ea(e),C=0;C<k;C++){for(I=0;I<E+4;I++)xa(e,1);xa(e,1)}if(k=E=1,C=!0,I=1,R=M=0,Ca(e),Ca(e),Ca(e)){if(Ca(e)){L=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];(D=Ia(e))>0&&D<=16?(E=L[D-1],k=N[D-1]):255===D&&(E=xa(e,16),k=xa(e,16))}if(Ca(e)&&Ca(e),Ca(e)&&(xa(e,3),Ca(e),Ca(e)&&(Ia(e),Ia(e),Ia(e))),Ca(e)&&(Ea(e),Ea(e)),Ca(e),Ca(e),Ca(e),(D=Ca(e))&&(Aa(e),Aa(e),Aa(e),Aa(e)),Ca(e)&&(I=xa(e,32),M=xa(e,32),Ca(e)&&Ea(e),Ca(e))){N=!1,D=Ca(e),L=Ca(e),(D||L)&&((N=Ca(e))&&(Ia(e),xa(e,5),Ca(e),xa(e,5)),xa(e,4),xa(e,4),N&&xa(e,4),xa(e,5),xa(e,5),xa(e,5));for(var P=0;P<=a;P++){var O=!0,j=1;(C=Ca(e))||(O=Ca(e));var U=!1;if(O?Ea(e):U=Ca(e),U||(j=Ea(e)+1),D){for(O=0;O<j;O++)Ea(e),Ea(e),N&&(Ea(e),Ea(e));Ca(e)}if(L){for(O=0;O<j;O++)Ea(e),Ea(e),N&&(Ea(e),Ea(e));Ca(e)}}}Ca(e)&&(Ca(e),Ca(e),Ca(e),R=Ea(e),Ea(e),Ea(e),Ea(e),Ea(e))}return{jf:b,qf:o,rf:s,pf:u,kf:l,lf:c,mf:d,nf:h,bf:f,cf:p,df:g,ef:m,gf:v,hf:y,qe:R,Te:w,Se:S,Re:A,width:T-(t+n)*(1===w||2===w?2:1),height:x-(i+r)*(1===w?2:1),kj:E,jj:k,$e:M/I,Ze:C}}(n.fullData);var a=function(e){var t=new ba(e,!0);Ia(t),Ia(t),Ea(t),Ea(t),Ca(t),Ca(t),xa(t,3),Ca(t),Ca(t),Ea(t),Ea(t),ka(t),Ca(t),Ca(t),Ca(t)&&Ea(t),ka(t),ka(t),Ca(t),Ca(t),Ca(t),Ca(t),e=Ca(t);var n=1;return(t=Ca(t))&&e?n=0:t?n=3:e&&(n=2),{Kf:n}}(i.fullData);
2return t=function(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));for(r[0]=1,r[1]=(3&i.qf)<<6|(i.rf?1:0)<<5|31&i.pf,r[2]=i.kf,r[3]=i.lf,r[4]=i.mf,r[5]=i.nf,r[6]=i.bf,r[7]=i.cf,r[8]=i.df,r[9]=i.ef,r[10]=i.gf,r[11]=i.hf,r[12]=i.jf,r[13]=240|(3840&i.qe)>>8,r[14]=255&i.qe,r[15]=252|3&i.Kf,r[16]=252|3&i.Te,r[17]=248|7&i.Se,r[18]=248|7&i.Re,r[19]=0,r[20]=parseInt(i.$e,10),r[21]=(3&(i.Ze?1:0))<<6|(7&i.If)<<3|(i.eg?1:0)<<2|3,r[22]=3,e=[e,t,n],t=23,n=e.length-1,i=0;i<e.length;i+=1)r.set(new Uint8Array([32+i|(i===n?128:0),0,1]),t),t+=3,r.set(new Uint8Array([e[i].byteLength>>8,255&e[i].byteLength]),t),t+=2,r.set(e[i],t),t+=e[i].byteLength;return r}(t.fullData,n.fullData,i.fullData,{If:r.If,eg:r.eg,qf:e.qf,rf:e.rf,jf:e.jf,pf:e.pf,kf:e.kf,lf:e.lf,mf:e.mf,nf:e.nf,bf:e.bf,cf:e.cf,df:e.df,ef:e.ef,gf:e.gf,hf:e.hf,qe:e.qe,Te:e.Te,Se:e.Se,Re:e.Re,Kf:a.Kf,$e:e.$e,Ze:e.Ze}),{height:e.height,width:e.width,Ma:t,Sa:e.kj,Ua:e.jj}}(s),!s||null==o)throw new _e(2,3,3018,r?r.P()[0]:null);return n.height=n.height||s.height,n.width=n.width||s.width,{id:n.id,type:"video",codecs:"hvc1",timescale:9e4,duration:i,ub:[],Da:new Uint8Array([]),Ma:s.Ma,Sa:s.Sa,Ua:s.Ua,data:{sequenceNumber:e.g,ya:o,mb:a},stream:n}}(this,e,t,i,n)}s&&(a.push(s),s=null)}if("audio"==r){switch(o.audio){case"aac":s=function(e,t,n,i,r){for(var a=[],o=null,s=null,u=null,l=(t=p(t.ib())).next();!l.done;l=t.next()){var c=l.value;if(l=c.data){var d=0;if(-1==s&&u)l=tt(u,c.data),s=null;else if(null!=s&&u){d=Math.max(0,s);var h=tt(u,l.subarray(0,d));a.push({data:h,size:h.byteLength,duration:1024,hb:0,flags:Ry}),s=u=null}if(!(h=Iy(l,d)))throw new _e(2,3,3018,r?r.P()[0]:null);for(n.audioSamplingRate=h.sampleRate,n.channelsCount=h.channelCount,null==o&&null!==c.pts&&(o=c.pts);d<l.length;){if(!(c=Cy(l,d))){u=l.subarray(d,l.length),s=-1;break}var f=c.kd+c.ha;0!=(s=Math.max(0,d+f-l.length))?u=l.subarray(d+c.kd,d+f):d+f<=l.length&&a.push({data:l.subarray(d+c.kd,d+f),size:c.ha,duration:1024,hb:0,flags:Ry}),d+=f}}}if(!h||null==o){if(o=9e4*r.startTime,!(s=st("audio",n.codecs.split(",")))||!n.channelsCount||!n.audioSamplingRate)throw new _e(2,3,3018,r?r.P()[0]:null);if(h={sampleRate:n.audioSamplingRate,channelCount:n.channelsCount,codec:s},s=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}(s,n.channelsCount),!s)throw new _e(2,3,3018,r?r.P()[0]:null);for(r=o+9e4*(r.endTime-r.startTime),u=o;u<r;)a.push({data:s,size:s.byteLength,duration:1024,hb:0,flags:Ry}),u+=1024/h.sampleRate*9e4}return o=o/9e4*(r=h.sampleRate),{id:n.id,type:"audio",codecs:h.codec,timescale:r,duration:i,ub:[],Da:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:e.g,ya:o,mb:a},stream:n}}(this,e,t,i,n);break;case"ac3":s=function(e,t,n,i,r){for(var a=[],o=0,s=new Uint8Array([]),u=null,l=(t=p(t.ib())).next();!l.done;l=t.next()){var c=l.value;for(l=c.data,null==u&&null!==c.pts&&(u=c.pts),c=0;c<l.length;){var d=Py(l,c);d?(n.audioSamplingRate=d.sampleRate,n.channelsCount=d.channelCount,o=d.sampleRate,s=d.Da,a.push({data:l.subarray(c,c+d.ha),size:d.ha,duration:1536,hb:0,flags:Ry}),c+=d.ha):c++}}if(0==o||0==s.byteLength||null==u)throw new _e(2,3,3018,r?r.P()[0]:null);return r=u/9e4*o,{id:n.id,type:"audio",codecs:"ac-3",timescale:o,duration:i,ub:[],Da:s,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:e.g,ya:r,mb:a},stream:n}}(this,e,t,i,n);break;case"ec3":s=function(e,t,n,i,r){for(var a=[],o=0,s=new Uint8Array([]),u=null,l=(t=p(t.ib())).next();!l.done;
2l=t.next()){var c=l.value;for(l=c.data,null==u&&null!==c.pts&&(u=c.pts),c=0;c<l.length;){var d=Uy(l,c);d?(n.audioSamplingRate=d.sampleRate,n.channelsCount=d.channelCount,o=d.sampleRate,s=d.Da,a.push({data:l.subarray(c,c+d.ha),size:d.ha,duration:1536,hb:0,flags:Ry}),c+=d.ha):c++}}if(0==o||0==s.byteLength||null==u)throw new _e(2,3,3018,r?r.P()[0]:null);return r=u/9e4*o,{id:n.id,type:"audio",codecs:"ec-3",timescale:o,duration:i,ub:[],Da:s,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:e.g,ya:r,mb:a},stream:n}}(this,e,t,i,n);break;case"mp3":s=function(e,t,n,i,r){for(var a,o=[],s=null,u=(t=p(t.ib())).next();!u.done;u=t.next()){var l=u.value;if(u=l.data)for(null==s&&null!==l.pts&&(s=l.pts),l=0;l<u.length;){var c=Fy(u,l);c?(a||(a=c),l+c.ha<=u.length&&o.push({data:u.subarray(l,l+c.ha),size:c.ha,duration:1152,hb:0,flags:Ry}),l+=c.ha):l++}}if(!a||null==s)throw new _e(2,3,3018,r?r.P()[0]:null);return s=s/9e4*(r=a.sampleRate),{id:n.id,type:"audio",codecs:"mp3",timescale:r,duration:i,ub:[],Da:new Uint8Array([]),Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:e.g,ya:s,mb:o},stream:n}}(this,e,t,i,n);break;case"opus":s=function(e,t,n,i,r){var a=[],o=null,s=t.K;if(!s)throw new _e(2,3,3018,r?r.P()[0]:null);var u=[];switch(s.Nh){case 1:case 2:u=[0];break;case 0:u=[255,1,1,0,1];break;case 128:u=[255,2,0,0,1];break;case 3:u=[1,2,1,0,2,1];break;case 4:u=[1,2,2,0,1,2,3];break;case 5:u=[1,3,2,0,4,1,2,3];break;case 6:u=[1,4,2,0,4,1,2,3,5];break;case 7:u=[1,4,2,0,4,1,2,3,5,6];break;case 8:u=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:u=[1,1,2,0,1];break;case 131:u=[1,1,3,0,1,2];break;case 132:u=[1,1,4,0,1,2,3];break;case 133:u=[1,1,5,0,1,2,3,4];break;case 134:u=[1,1,6,0,1,2,3,4,5];break;case 135:u=[1,1,7,0,1,2,3,4,5,6];break;case 136:u=[1,1,8,0,1,2,3,4,5,6,7]}u=new Uint8Array([0,s.channelCount,0,0,s.sampleRate>>>24&255,s.sampleRate>>>17&255,s.sampleRate>>>8&255,s.sampleRate>>>0&255,0,0].concat(g(u)));for(var l=s.sampleRate,c=(t=p(t.ib())).next();!c.done;c=t.next()){var d=c.value;c=d.data,null==o&&null!==d.pts&&(o=d.pts);for(var h=0;h<c.length;){d=!!(16&c[h+1]);var f=!!(8&c[h+1]);h+=2;for(var m=0;255===c[h];)m+=255,h+=1;m+=c[h],h+=1,h+=d?2:0,h+=f?2:0,d=c.slice(h,h+m),a.push({data:d,size:d.byteLength,duration:960,hb:0,flags:Ry}),h+=m}}if(0==u.byteLength||null==o)throw new _e(2,3,3018,r?r.P()[0]:null);return n.audioSamplingRate=s.sampleRate,n.channelsCount=s.channelCount,r=o/9e4*l,{id:n.id,type:"audio",codecs:"opus",timescale:l,duration:i,ub:[],Da:u,Ma:new Uint8Array([]),Sa:0,Ua:0,data:{sequenceNumber:e.g,ya:r,mb:a},stream:n}}(this,e,t,i,n)}s&&(a.push(s),s=null)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}if(!a.length)return Promise.reject(new _e(2,3,3018,n?n.P()[0]:null));var u=new jl(a);return t=this.j.getOrInsertComputed(t.id+"_"+n.i,(function(){return Ul(u)})),n=this.l!==t,i=Gl(u),this.l=t,this.g++,Promise.resolve({data:i,init:n?t:null})},P("shaka.transmuxer.TsTransmuxer",Yy),Yy.prototype.transmux=Yy.prototype.transmux,Yy.prototype.getOriginalMimeType=Yy.prototype.getOriginalMimeType,Yy.prototype.convertCodecs=Yy.prototype.convertCodecs,Yy.prototype.isSupported=Yy.prototype.isSupported,Yy.prototype.destroy=Yy.prototype.destroy;var Jy=["aac","ac-3","ec-3","mp3","opus"],$y=["avc","hevc"];function Qy(e){this.g=new Uint8Array(e),Ae(this.g),this.h=0}function Zy(){this.m=[],this.h=[],this.g=[],this.j=[],this.i=[],this.o=!1,this.l=new Set,this.A=(new Map).set("audio",this.h).set("video",this.g).set(lt,this.j).set("image",this.i)}function eb(e,t){var n;e.matchedStreams=null==(n=e.matchedStreams)?void 0:n.filter((function(e){return e!==t}))}function tb(e,t){for(var n=[],i=[],r=[],a=[],o=(e=p(e)).next();!o.done;o=e.next()){var s=o.value;o=new Map(s.audioStreams.map((function(e){return[Eb(e),e]})));var u=new Map(s.videoStreams.map((function(e){return[Ab(e),e]}))),l=new Map(s.textStreams.map((function(e){return[kb(e),e]})));if(s=new Map(s.imageStreams.map((function(e){return[Cb(e),e]}))),t){var c=bb(lt);l.set(kb(c),c),c=bb("image"),s.set(Cb(c),c)}n.push(o),i.push(u),r.push(l),a.push(s)}return{rg:n,Bh:i,xh:r,Ig:a}}function nb(e,t,n,i,r){var a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A=ob,k=sb;return E((function(C){switch(C.h){case 1:for(a=[],o=0;o<n.length;o++)o>
2=i?a.push(new Set(n[o].values())):a.push(new Set);s=p(t),u=s.next();case 2:if(u.done){C.u(4);break}return l=u.value,C.g(function(e,t,n,i,r,a,o){return E((function(s){return 1==s.h?(lb(e,n,t,o>0),t.matchedStreams?t.segmentIndex?s.g(ib(t,i+o),2):s.u(2):s.return(!1)):(ab(t,i,r,a,o),s.return(!0))}))}(e,l,n,i,k,a,r),5);case 5:if(!C.i)throw new _e(2,4,4037);u=s.next(),C.u(2);break;case 4:for(c=p(a),d=c.next();!d.done;d=c.next())for(h=d.value,f=p(h),g=f.next();!g.done;g=f.next())m=g.value,(v=rb(e,t,m,n,A,k,a))&&t.push(v);for(y=p(a),b=y.next();!b.done;b=y.next())for(w=b.value,T=p(w),x=T.next(),S={};!x.done;S={Zf:void 0},x=T.next())if(S.Zf=x.value,!Sb(S.Zf)&&t.some(function(e){return function(t){return hb(e.Zf,t)}}(S)))throw new _e(2,4,4037);return C.return(t)}}))}function ib(e,t){var n,i,r,a,o,s,u,l,c,d;return E((function(h){if(1==h.h){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)for(a=i[r],n.push(a.createSegmentIndex()),o=Rb(a),s=p(o),u=s.next();!u.done;u=s.next())(l=u.value).segmentIndex||n.push(l.createSegmentIndex());return h.g(Promise.all(n),2)}if(e.segmentIndex instanceof uu)for(c=t;c<i.length;c++)(d=i[c]).segmentIndex&&e.segmentIndex.i.push(d.segmentIndex);h.j()}))}function rb(e,t,n,i,r,a,o){if(Sb(n))return null;var s=r(n);return lb(e,i,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return E((function(e){return s.segmentIndex?e.u(0):(s.segmentIndex=new uu,e.g(ib(s,0),0))}))},s.closeSegmentIndex=function(){if(s.segmentIndex&&(s.segmentIndex.release(),s.segmentIndex=null),s.matchedStreams)for(var e=p(s.matchedStreams),n=e.next();!n.done;n=e.next()){var i;if(i=(n=n.value).segmentIndex){e:{for(var r=(i=p(t)).next();!r.done;r=i.next())if((r=r.value)!==s&&r.segmentIndex&&r.matchedStreams&&r.matchedStreams.includes(n)){i=!0;break e}i=!1}i=!i}i&&(n.segmentIndex.release(),n.segmentIndex=null)}}),s.matchedStreams&&s.matchedStreams.length?(ab(s,0,a,o,0),s):null}function ab(e,t,n,i,r){var a=e.matchedStreams;for(t+=r;t<a.length;t++){var o=a[t];n(e,o);var s=!0;if("audio"==e.type&&0==di(e.language,o.language)&&(s=!1),s&&((s=i[t-r])&&s.delete(o),o.fullMimeTypes))for(s=(o=p(o.fullMimeTypes.values())).next();!s.done;s=o.next())e.fullMimeTypes.add(s.value)}}function ob(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function sb(e,t){function n(e,t){e||(e=[]);for(var n=(t=p(t)).next();!n.done;n=t.next())n=n.value,e.includes(n)||e.push(n);return e}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=p(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=Ce(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new _e(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=p(t.closedCaptions)).next();!r.done;r=i.next()){var a=p(r.value);r=a.next().value,a=a.next().value,e.closedCaptions.set(r,a)}for(e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),r=(i=p(Db)).next();!r.done;r=i.next())ub(e,t,r.value)}function ub(e,t,n){var i=t[n]||null,r=e[n]||null;i?(r||((r=ob(i)).matchedStreams=[],r.createSegmentIndex=function(){var e,t,n,i;return E((function(a){switch(a.h){case 1:if(r.segmentIndex)return a.return();e=new uu,t=p(r.matchedStreams),n=t.next();case 2:if(n.done){a.u(4);break}if((i=n.value).segmentIndex){a.u(5);break}return a.g(i.createSegmentIndex(),5);case 5:e.i.push(i.segmentIndex),n=t.next(),a.u(2);break;case 4:r.segmentIndex=e,a.j()}}))},e[n]=r),r.matchedStreams.push(i),sb(r,i)):r&&(r.matchedStreams.push(t),sb(r,t))}function lb(e,t,n,i){i=void 0!==i&&i?n.matchedStreams:[];for(var r=(t=p(t)).next();!r.done;r=t.next()){if(!(r=cb(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function cb(e,t,n){var i={audio:Eb,video:Ab,text:kb,image:Cb}[n.type],r=null,a=i(n);if(t.has(a))r=t.get(a);else{a={audio:function(e,t){return hb(e,t)},video:function(e,t){return hb(e,t)},text:fb,image:pb}[n.type];for(var o={audio:gb,video:mb,text:vb,image:yb}[n.type],s=p(t.values()),u=s.next();!u.done;u=s.next())!a(n,u=u.value)||n.fastSwitching!=u.fastSwitching||r&&!o(n,r,u)||(r=u)}return e.o&&!Sb(r)&&t.delete(i(r)),r}function db(e,t){return e.mimeType==t.mimeType&&Mb(e.codecs)===Mb(t.codecs)}function hb(e,t){return!(e.drmInfos&&!ke(e.drmInfos,t.drmInfos))}function fb(e,t){return!t.language||e.forced===t.forced&&0!=di(e.language,t.language)&&t.kind==e.kind}function pb(){return!0}function gb(e,t,n){var i=Tb(e,t,n);if(i===Lb)return!0;
2if(i===Pb)return!1;i=di(e.language,t.language);var r=di(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter((function(t){return e.roles.includes(t)})),(r=n.roles.filter((function(t){return e.roles.includes(t)}))).length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&((i=wb(e.channelsCount,t.channelsCount,n.channelsCount))==Lb||i!=Pb&&((i=wb(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Lb||i!=Pb&&!(!e.bandwidth||xb(e.bandwidth,t.bandwidth,n.bandwidth)!=Lb)))}function mb(e,t,n){var i=Tb(e,t,n);if(i===Lb)return!0;if(i===Pb)return!1;if((i=wb(e.width*e.height,t.width*t.height,n.width*n.height))==Lb)return!0;if(i==Pb)return!1;if(e.frameRate){if((i=wb(e.frameRate,t.frameRate,n.frameRate))==Lb)return!0;if(i==Pb)return!1}return!(!e.bandwidth||xb(e.bandwidth,t.bandwidth,n.bandwidth)!=Lb)}function vb(e,t,n){var i=di(e.language,t.language),r=di(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter((function(t){return e.roles.includes(t)})),(r=n.roles.filter((function(t){return e.roles.includes(t)}))).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function yb(e,t,n){return wb(e.width*e.height,t.width*t.height,n.width*n.height)==Lb}function bb(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ru([]),mimeType:"",codecs:"",supplementalCodecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function wb(e,t,n){if(t==e&&e!=n)return Pb;if(n==e&&e!=t)return Lb;if(t>e){if(n<=e||n-e<t-e)return Lb;if(n-e>t-e)return Pb}else{if(n>e)return Pb;if(e-n<e-t)return Lb;if(e-n>e-t)return Pb}return Nb}function Tb(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?Pb:!i&&r?Lb:(t=db(e,t),e=db(e,n),t&&!e?Pb:!t&&e?Lb:Nb)}function xb(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Lb:t<e?Pb:Nb}function Sb(e){switch(e.type){case lt:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function Ab(e){var t,n;return Ib([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,null!=(n=null==(t=e.dependencyStream)?void 0:t.baseOriginalId)?n:e.baseOriginalId,Array.from(e.keyIds)])}function Eb(e){var t,n;return Ib([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,null!=(n=null==(t=e.dependencyStream)?void 0:t.baseOriginalId)?n:e.baseOriginalId,Array.from(e.keyIds)])}function kb(e){return Ib([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Cb(e){return Ib([e.width,e.codecs,e.mimeType])}function Ib(e){return JSON.stringify(e)}function Mb(e){return Ob.getOrInsertComputed(e,(function(){return _n(e)}))}function Rb(e){for(var t=[],n=p(Db),i=n.next();!i.done;i=n.next())(i=e[i.value])&&t.push(i);return t}kn("video/mp2t",(function(){return new Yy("video/mp2t")}),Dn),Qy.prototype.Va=function(){return this.h},Qy.prototype.kb=function(){return this.h},Qy.prototype.seek=function(e){if(e>this.g.length)throw new _e(2,3,3025);this.h=e},Qy.prototype.skip=function(e){var t=this.h+e;t<=this.g.length||((t=new Uint8Array(Math.max(2*this.g.length,t))).set(this.g),this.g=t,Ae(this.g)),this.h+=e},P("shaka.util.DataViewWriter",Qy),Qy.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:1},(i=Zy.prototype).release=function(){for(var e=p(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.m=[],this.o=!1,this.l.clear(),this.A.clear()},i.Gi=function(){return this.m},i.Bi=function(){return this.j.slice()},i.ji=function(){return this.i},i.Th=function(e,t){if(e){for(var n=this.A.get(e.type)||[],i=(n=p(n)).next();!i.done;i=n.next()){eb(i=i.value,e);for(var r=(i=p(i=Rb(i))).next();!r.done;r=i.next())eb(r.value,e)}e.segmentIndex&&e.closeSegmentIndex(),this.l.delete(t)}},i.Qh=function(e,t,n){n=void 0!==n&&n;var i,r,a,o,s,u,l,c,d,h,f,g,m,v,y,b,w,T,x,S,A,k,C,I,M,R,D,L,N,P,O,j,U=this;return E((function(E){if(1==E.h){if(i=ct,!t&&1==e.length)return r=tb(e,!1),a=r.rg,o=r.Bh,s=r.xh,u=r.Ig,U.h=Array.from(a[0].values()),U.g=Array.from(o[0].values()),U.j=Array.from(s[0].values()),U.i=Array.from(u[0].values()),E.u(2);for(l=n?U.l.size:0,c=-1,d=0;d<e.length;d++)h=e[d],U.l.has(h.id)||(U.l.add(h.id),-1==c&&(c=d));return-1==c?E.return():(f=tb(e,!0),g=f.rg,m=f.Bh,v=f.xh,y=f.Ig,E.g(Promise.all([nb(U,U.h,g,c,l),nb(U,U.g,m,c,l),nb(U,U.j,v,c,l),nb(U,U.i,y,c,l)]),2))}if(b=0,w=[],U.g.length&&U.h.length)for(I=p(U.h),M=I.next();!M.done;M=I.next())for(R=M.value,D=p(U.g),L=D.next();!L.done;L=D.next())N=L.value,P=Ce(R.drmInfos,N.drmInfos),R.drmInfos.length&&N.drmInfos.length&&!P.length||(O=(R.bandwidth||0)+(N.bandwidth||0),R.dependencyStream&&(O+=R.dependencyStream.bandwidth||0),N.dependencyStream&&(O+=N.dependencyStream.bandwidth||0),j=b++,w.push({id:j,language:R.language,disabledUntilTime:0,primary:R.primary,audio:R,video:N,bandwidth:O,drmInfos:P,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(T=U.g.length?U.g:U.h,x=p(T),S=x.next();!S.done;S=x.next())A=S.value,k=b++,C=A.bandwidth||0,A.dependencyStream&&(C+=A.dependencyStream.bandwidth||0),w.push({id:k,language:A.language,disabledUntilTime:0,primary:A.primary,audio:A.type==i.W?A:null,video:A.type==i.qa?A:null,bandwidth:C,drmInfos:A.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});U.m=w,E.j()}))},i.qj=function(e){this.o=e},P("shaka.util.PeriodCombiner",Zy),Zy.prototype.setUseStreamOnce=Zy.prototype.qj,Zy.prototype.combinePeriods=Zy.prototype.Qh,Zy.prototype.deleteStream=Zy.prototype.Th,Zy.prototype.getImageStreams=Zy.prototype.ji,Zy.prototype.getTextStreams=Zy.prototype.Bi,Zy.prototype.getVariants=Zy.prototype.Gi;var Db=["trickModeVideo","dependencyStream"],Lb=1,Nb=0,Pb=-1,Ob=new Map}.call(i,e,e,void 0),i.shaka)t[r]=i.shaka[r]}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.