156 lines
1.1 MiB
156 lines
1.1 MiB
var pO=(R,k)=>()=>(k||R((k={exports:{}}).exports,k),k.exports);var tM=pO((iM,Wy)=>{(function(){const k=document.createElement("link").relList;if(k&&k.supports&&k.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))x(E);new MutationObserver(E=>{for(const V of E)if(V.type==="childList")for(const M of V.addedNodes)M.tagName==="LINK"&&M.rel==="modulepreload"&&x(M)}).observe(document,{childList:!0,subtree:!0});function j(E){const V={};return E.integrity&&(V.integrity=E.integrity),E.referrerPolicy&&(V.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?V.credentials="include":E.crossOrigin==="anonymous"?V.credentials="omit":V.credentials="same-origin",V}function x(E){if(E.ep)return;E.ep=!0;const V=j(E);fetch(E.href,V)}})();var hO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wp(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var kS={exports:{}},Hy={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var $E;function yO(){if($E)return Hy;$E=1;var R=Symbol.for("react.transitional.element"),k=Symbol.for("react.fragment");function j(x,E,V){var M=null;if(V!==void 0&&(M=""+V),E.key!==void 0&&(M=""+E.key),"key"in E){V={};for(var y in E)y!=="key"&&(V[y]=E[y])}else V=E;return E=V.ref,{$$typeof:R,type:x,key:M,ref:E!==void 0?E:null,props:V}}return Hy.Fragment=k,Hy.jsx=j,Hy.jsxs=j,Hy}var eA;function gO(){return eA||(eA=1,kS.exports=yO()),kS.exports}var pe=gO(),MS={exports:{}},jt={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var tA;function vO(){if(tA)return jt;tA=1;var R=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),M=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function D(oe){return oe===null||typeof oe!="object"?null:(oe=m&&oe[m]||oe["@@iterator"],typeof oe=="function"?oe:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,te={};function ae(oe,Oe,$e){this.props=oe,this.context=Oe,this.refs=te,this.updater=$e||X}ae.prototype.isReactComponent={},ae.prototype.setState=function(oe,Oe){if(typeof oe!="object"&&typeof oe!="function"&&oe!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,oe,Oe,"setState")},ae.prototype.forceUpdate=function(oe){this.updater.enqueueForceUpdate(this,oe,"forceUpdate")};function he(){}he.prototype=ae.prototype;function je(oe,Oe,$e){this.props=oe,this.context=Oe,this.refs=te,this.updater=$e||X}var ee=je.prototype=new he;ee.constructor=je,A(ee,ae.prototype),ee.isPureReactComponent=!0;var ke=Array.isArray,Re={H:null,A:null,T:null,S:null,V:null},nt=Object.prototype.hasOwnProperty;function Gt(oe,Oe,$e,qe,G,Tt){return $e=Tt.ref,{$$typeof:R,type:oe,key:Oe,ref:$e!==void 0?$e:null,props:Tt}}function ln(oe,Oe){return Gt(oe.type,Oe,void 0,void 0,void 0,oe.props)}function cn(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===R}function L(oe){var Oe={"=":"=0",":":"=2"};return"$"+oe.replace(/[=:]/g,function($e){return Oe[$e]})}var ce=/\/+/g;function ye(oe,Oe){return typeof oe=="object"&&oe!==null&&oe.key!=null?L(""+oe.key):Oe.toString(36)}function it(){}function Le(oe){switch(oe.status){case"fulfilled":return oe.value;case"rejected":throw oe.reason;default:switch(typeof oe.status=="string"?oe.then(it,it):(oe.status="pending",oe.then(function(Oe){oe.status==="pending"&&(oe.status="fulfilled",oe.value=Oe)},function(Oe){oe.status==="pending"&&(oe.status="rejected",oe.reason=Oe)})),oe.status){case"fulfilled":return oe.value;case"rejected":throw oe.reason}}throw oe}function De(oe,Oe,$e,qe,G){var Tt=typeof oe;(Tt==="undefined"||Tt==="boolean")&&(oe=null);var dt=!1;if(oe===null)dt=!0;else switch(Tt){case"bigint":case"string":case"number":dt=!0;break;case"object":switch(oe.$$typeof){case R:case k:dt=!0;break;case p:return dt=oe._init,De(dt(oe._payload),Oe,$e,qe,G)}}if(dt)return G=G(oe),dt=qe===""?"."+ye(oe,0):qe,ke(G)?($e="",dt!=null&&($e=dt.replace(ce,"$&/")+"/"),De(G,Oe,$e,"",function(rl){return rl})):G!=null&&(cn(G)&&(G=ln(G,$e+(G.key==null||oe&&oe.key===G.key?"":(""+G.key).replace(ce,"$&/")+"/")+dt)),Oe.push(G)),1;dt=0;var Vi=qe===""?".":qe+":";if(ke(oe))for(var Tn=0;Tn<oe.length;Tn++)qe=oe[Tn],Tt=Vi+ye(qe,Tn),dt+=De(qe,Oe,$e,Tt,G);else if(Tn=D(oe),typeof Tn=="function")for(oe=Tn.call(oe),Tn=0;!(qe=oe.next()).done;)qe=qe.value,Tt=Vi+ye(qe,Tn++),dt+=De(qe,Oe,$e,Tt,G);else if(Tt==="object"){if(typeof oe.then=="function")return De(Le(oe),Oe,$e,qe,G);throw Oe=String(oe),Error("Objects are not valid as a React child (found: "+(Oe==="[object Object]"?"object with keys {"+Object.keys(oe).join(", ")+"}":Oe)+"). If you meant to render a collection of children, use an array instead.")}return dt}function Te(oe,Oe,$e){if(oe==null)return oe;var qe=[],G=0;return De(oe,qe,"","",function(Tt){return Oe.call($e,Tt,G++)}),qe}function _e(oe){if(oe._status===-1){var Oe=oe._result;Oe=Oe(),Oe.then(function($e){(oe._status===0||oe._status===-1)&&(oe._status=1,oe._result=$e)},function($e){(oe._status===0||oe._status===-1)&&(oe._status=2,oe._result=$e)}),oe._status===-1&&(oe._status=0,oe._result=Oe)}if(oe._status===1)return oe._result.default;throw oe._result}var ft=typeof reportError=="function"?reportError:function(oe){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Oe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof oe=="object"&&oe!==null&&typeof oe.message=="string"?String(oe.message):String(oe),error:oe});if(!window.dispatchEvent(Oe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",oe);return}console.error(oe)};function Sn(){}return jt.Children={map:Te,forEach:function(oe,Oe,$e){Te(oe,function(){Oe.apply(this,arguments)},$e)},count:function(oe){var Oe=0;return Te(oe,function(){Oe++}),Oe},toArray:function(oe){return Te(oe,function(Oe){return Oe})||[]},only:function(oe){if(!cn(oe))throw Error("React.Children.only expected to receive a single React element child.");return oe}},jt.Component=ae,jt.Fragment=j,jt.Profiler=E,jt.PureComponent=je,jt.StrictMode=x,jt.Suspense=s,jt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Re,jt.__COMPILER_RUNTIME={__proto__:null,c:function(oe){return Re.H.useMemoCache(oe)}},jt.cache=function(oe){return function(){return oe.apply(null,arguments)}},jt.cloneElement=function(oe,Oe,$e){if(oe==null)throw Error("The argument must be a React element, but you passed "+oe+".");var qe=A({},oe.props),G=oe.key,Tt=void 0;if(Oe!=null)for(dt in Oe.ref!==void 0&&(Tt=void 0),Oe.key!==void 0&&(G=""+Oe.key),Oe)!nt.call(Oe,dt)||dt==="key"||dt==="__self"||dt==="__source"||dt==="ref"&&Oe.ref===void 0||(qe[dt]=Oe[dt]);var dt=arguments.length-2;if(dt===1)qe.children=$e;else if(1<dt){for(var Vi=Array(dt),Tn=0;Tn<dt;Tn++)Vi[Tn]=arguments[Tn+2];qe.children=Vi}return Gt(oe.type,G,void 0,void 0,Tt,qe)},jt.createContext=function(oe){return oe={$$typeof:M,_currentValue:oe,_currentValue2:oe,_threadCount:0,Provider:null,Consumer:null},oe.Provider=oe,oe.Consumer={$$typeof:V,_context:oe},oe},jt.createElement=function(oe,Oe,$e){var qe,G={},Tt=null;if(Oe!=null)for(qe in Oe.key!==void 0&&(Tt=""+Oe.key),Oe)nt.call(Oe,qe)&&qe!=="key"&&qe!=="__self"&&qe!=="__source"&&(G[qe]=Oe[qe]);var dt=arguments.length-2;if(dt===1)G.children=$e;else if(1<dt){for(var Vi=Array(dt),Tn=0;Tn<dt;Tn++)Vi[Tn]=arguments[Tn+2];G.children=Vi}if(oe&&oe.defaultProps)for(qe in dt=oe.defaultProps,dt)G[qe]===void 0&&(G[qe]=dt[qe]);return Gt(oe,Tt,void 0,void 0,null,G)},jt.createRef=function(){return{current:null}},jt.forwardRef=function(oe){return{$$typeof:y,render:oe}},jt.isValidElement=cn,jt.lazy=function(oe){return{$$typeof:p,_payload:{_status:-1,_result:oe},_init:_e}},jt.memo=function(oe,Oe){return{$$typeof:a,type:oe,compare:Oe===void 0?null:Oe}},jt.startTransition=function(oe){var Oe=Re.T,$e={};Re.T=$e;try{var qe=oe(),G=Re.S;G!==null&&G($e,qe),typeof qe=="object"&&qe!==null&&typeof qe.then=="function"&&qe.then(Sn,ft)}catch(Tt){ft(Tt)}finally{Re.T=Oe}},jt.unstable_useCacheRefresh=function(){return Re.H.useCacheRefresh()},jt.use=function(oe){return Re.H.use(oe)},jt.useActionState=function(oe,Oe,$e){return Re.H.useActionState(oe,Oe,$e)},jt.useCallback=function(oe,Oe){return Re.H.useCallback(oe,Oe)},jt.useContext=function(oe){return Re.H.useContext(oe)},jt.useDebugValue=function(){},jt.useDeferredValue=function(oe,Oe){return Re.H.useDeferredValue(oe,Oe)},jt.useEffect=function(oe,Oe,$e){var qe=Re.H;if(typeof $e=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return qe.useEffect(oe,Oe)},jt.useId=function(){return Re.H.useId()},jt.useImperativeHandle=function(oe,Oe,$e){return Re.H.useImperativeHandle(oe,Oe,$e)},jt.useInsertionEffect=function(oe,Oe){return Re.H.useInsertionEffect(oe,Oe)},jt.useLayoutEffect=function(oe,Oe){return Re.H.useLayoutEffect(oe,Oe)},jt.useMemo=function(oe,Oe){return Re.H.useMemo(oe,Oe)},jt.useOptimistic=function(oe,Oe){return Re.H.useOptimistic(oe,Oe)},jt.useReducer=function(oe,Oe,$e){return Re.H.useReducer(oe,Oe,$e)},jt.useRef=function(oe){return Re.H.useRef(oe)},jt.useState=function(oe){return Re.H.useState(oe)},jt.useSyncExternalStore=function(oe,Oe,$e){return Re.H.useSyncExternalStore(oe,Oe,$e)},jt.useTransition=function(){return Re.H.useTransition()},jt.version="19.1.0",jt}var nA;function Xm(){return nA||(nA=1,MS.exports=vO()),MS.exports}var xe=Xm();const Qy=wp(xe);var RS={exports:{}},Ky={},NS={exports:{}},PS={};/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var iA;function mO(){return iA||(iA=1,function(R){function k(Te,_e){var ft=Te.length;Te.push(_e);e:for(;0<ft;){var Sn=ft-1>>>1,oe=Te[Sn];if(0<E(oe,_e))Te[Sn]=_e,Te[ft]=oe,ft=Sn;else break e}}function j(Te){return Te.length===0?null:Te[0]}function x(Te){if(Te.length===0)return null;var _e=Te[0],ft=Te.pop();if(ft!==_e){Te[0]=ft;e:for(var Sn=0,oe=Te.length,Oe=oe>>>1;Sn<Oe;){var $e=2*(Sn+1)-1,qe=Te[$e],G=$e+1,Tt=Te[G];if(0>E(qe,ft))G<oe&&0>E(Tt,qe)?(Te[Sn]=Tt,Te[G]=ft,Sn=G):(Te[Sn]=qe,Te[$e]=ft,Sn=$e);else if(G<oe&&0>E(Tt,ft))Te[Sn]=Tt,Te[G]=ft,Sn=G;else break e}}return _e}function E(Te,_e){var ft=Te.sortIndex-_e.sortIndex;return ft!==0?ft:Te.id-_e.id}if(R.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var V=performance;R.unstable_now=function(){return V.now()}}else{var M=Date,y=M.now();R.unstable_now=function(){return M.now()-y}}var s=[],a=[],p=1,m=null,D=3,X=!1,A=!1,te=!1,ae=!1,he=typeof setTimeout=="function"?setTimeout:null,je=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;function ke(Te){for(var _e=j(a);_e!==null;){if(_e.callback===null)x(a);else if(_e.startTime<=Te)x(a),_e.sortIndex=_e.expirationTime,k(s,_e);else break;_e=j(a)}}function Re(Te){if(te=!1,ke(Te),!A)if(j(s)!==null)A=!0,nt||(nt=!0,ye());else{var _e=j(a);_e!==null&&De(Re,_e.startTime-Te)}}var nt=!1,Gt=-1,ln=5,cn=-1;function L(){return ae?!0:!(R.unstable_now()-cn<ln)}function ce(){if(ae=!1,nt){var Te=R.unstable_now();cn=Te;var _e=!0;try{e:{A=!1,te&&(te=!1,je(Gt),Gt=-1),X=!0;var ft=D;try{t:{for(ke(Te),m=j(s);m!==null&&!(m.expirationTime>Te&&L());){var Sn=m.callback;if(typeof Sn=="function"){m.callback=null,D=m.priorityLevel;var oe=Sn(m.expirationTime<=Te);if(Te=R.unstable_now(),typeof oe=="function"){m.callback=oe,ke(Te),_e=!0;break t}m===j(s)&&x(s),ke(Te)}else x(s);m=j(s)}if(m!==null)_e=!0;else{var Oe=j(a);Oe!==null&&De(Re,Oe.startTime-Te),_e=!1}}break e}finally{m=null,D=ft,X=!1}_e=void 0}}finally{_e?ye():nt=!1}}}var ye;if(typeof ee=="function")ye=function(){ee(ce)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,Le=it.port2;it.port1.onmessage=ce,ye=function(){Le.postMessage(null)}}else ye=function(){he(ce,0)};function De(Te,_e){Gt=he(function(){Te(R.unstable_now())},_e)}R.unstable_IdlePriority=5,R.unstable_ImmediatePriority=1,R.unstable_LowPriority=4,R.unstable_NormalPriority=3,R.unstable_Profiling=null,R.unstable_UserBlockingPriority=2,R.unstable_cancelCallback=function(Te){Te.callback=null},R.unstable_forceFrameRate=function(Te){0>Te||125<Te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ln=0<Te?Math.floor(1e3/Te):5},R.unstable_getCurrentPriorityLevel=function(){return D},R.unstable_next=function(Te){switch(D){case 1:case 2:case 3:var _e=3;break;default:_e=D}var ft=D;D=_e;try{return Te()}finally{D=ft}},R.unstable_requestPaint=function(){ae=!0},R.unstable_runWithPriority=function(Te,_e){switch(Te){case 1:case 2:case 3:case 4:case 5:break;default:Te=3}var ft=D;D=Te;try{return _e()}finally{D=ft}},R.unstable_scheduleCallback=function(Te,_e,ft){var Sn=R.unstable_now();switch(typeof ft=="object"&&ft!==null?(ft=ft.delay,ft=typeof ft=="number"&&0<ft?Sn+ft:Sn):ft=Sn,Te){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=ft+oe,Te={id:p++,callback:_e,priorityLevel:Te,startTime:ft,expirationTime:oe,sortIndex:-1},ft>Sn?(Te.sortIndex=ft,k(a,Te),j(s)===null&&Te===j(a)&&(te?(je(Gt),Gt=-1):te=!0,De(Re,ft-Sn))):(Te.sortIndex=oe,k(s,Te),A||X||(A=!0,nt||(nt=!0,ye()))),Te},R.unstable_shouldYield=L,R.unstable_wrapCallback=function(Te){var _e=D;return function(){var ft=D;D=_e;try{return Te.apply(this,arguments)}finally{D=ft}}}}(PS)),PS}var rA;function SO(){return rA||(rA=1,NS.exports=mO()),NS.exports}var LS={exports:{}},pr={};/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var oA;function TO(){if(oA)return pr;oA=1;var R=Xm();function k(s){var a="https://react.dev/errors/"+s;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)a+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function j(){}var x={d:{f:j,r:function(){throw Error(k(522))},D:j,C:j,L:j,m:j,X:j,S:j,M:j},p:0,findDOMNode:null},E=Symbol.for("react.portal");function V(s,a,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:m==null?null:""+m,children:s,containerInfo:a,implementation:p}}var M=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(s,a){if(s==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,pr.createPortal=function(s,a){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(k(299));return V(s,a,null,p)},pr.flushSync=function(s){var a=M.T,p=x.p;try{if(M.T=null,x.p=2,s)return s()}finally{M.T=a,x.p=p,x.d.f()}},pr.preconnect=function(s,a){typeof s=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,x.d.C(s,a))},pr.prefetchDNS=function(s){typeof s=="string"&&x.d.D(s)},pr.preinit=function(s,a){if(typeof s=="string"&&a&&typeof a.as=="string"){var p=a.as,m=y(p,a.crossOrigin),D=typeof a.integrity=="string"?a.integrity:void 0,X=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;p==="style"?x.d.S(s,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:m,integrity:D,fetchPriority:X}):p==="script"&&x.d.X(s,{crossOrigin:m,integrity:D,fetchPriority:X,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},pr.preinitModule=function(s,a){if(typeof s=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var p=y(a.as,a.crossOrigin);x.d.M(s,{crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&x.d.M(s)},pr.preload=function(s,a){if(typeof s=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var p=a.as,m=y(p,a.crossOrigin);x.d.L(s,p,{crossOrigin:m,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},pr.preloadModule=function(s,a){if(typeof s=="string")if(a){var p=y(a.as,a.crossOrigin);x.d.m(s,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else x.d.m(s)},pr.requestFormReset=function(s){x.d.r(s)},pr.unstable_batchedUpdates=function(s,a){return s(a)},pr.useFormState=function(s,a,p){return M.H.useFormState(s,a,p)},pr.useFormStatus=function(){return M.H.useHostTransitionStatus()},pr.version="19.1.0",pr}var lA;function wO(){if(lA)return LS.exports;lA=1;function R(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R)}catch(k){console.error(k)}}return R(),LS.exports=TO(),LS.exports}/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var uA;function xO(){if(uA)return Ky;uA=1;var R=SO(),k=Xm(),j=wO();function x(o){var u="https://react.dev/errors/"+o;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function E(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function V(o){var u=o,d=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(d=u.return),o=u.return;while(o)}return u.tag===3?d:null}function M(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function y(o){if(V(o)!==o)throw Error(x(188))}function s(o){var u=o.alternate;if(!u){if(u=V(o),u===null)throw Error(x(188));return u!==o?null:o}for(var d=o,g=u;;){var w=d.return;if(w===null)break;var C=w.alternate;if(C===null){if(g=w.return,g!==null){d=g;continue}break}if(w.child===C.child){for(C=w.child;C;){if(C===d)return y(w),o;if(C===g)return y(w),u;C=C.sibling}throw Error(x(188))}if(d.return!==g.return)d=w,g=C;else{for(var U=!1,H=w.child;H;){if(H===d){U=!0,d=w,g=C;break}if(H===g){U=!0,g=w,d=C;break}H=H.sibling}if(!U){for(H=C.child;H;){if(H===d){U=!0,d=C,g=w;break}if(H===g){U=!0,g=C,d=w;break}H=H.sibling}if(!U)throw Error(x(189))}}if(d.alternate!==g)throw Error(x(190))}if(d.tag!==3)throw Error(x(188));return d.stateNode.current===d?o:u}function a(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=a(o),u!==null)return u;o=o.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),he=Symbol.for("react.provider"),je=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),ke=Symbol.for("react.forward_ref"),Re=Symbol.for("react.suspense"),nt=Symbol.for("react.suspense_list"),Gt=Symbol.for("react.memo"),ln=Symbol.for("react.lazy"),cn=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function ye(o){return o===null||typeof o!="object"?null:(o=ce&&o[ce]||o["@@iterator"],typeof o=="function"?o:null)}var it=Symbol.for("react.client.reference");function Le(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===it?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case A:return"Fragment";case ae:return"Profiler";case te:return"StrictMode";case Re:return"Suspense";case nt:return"SuspenseList";case cn:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case X:return"Portal";case ee:return(o.displayName||"Context")+".Provider";case je:return(o._context.displayName||"Context")+".Consumer";case ke:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Gt:return u=o.displayName||null,u!==null?u:Le(o.type)||"Memo";case ln:u=o._payload,o=o._init;try{return Le(o(u))}catch{}}return null}var De=Array.isArray,Te=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_e=j.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ft={pending:!1,data:null,method:null,action:null},Sn=[],oe=-1;function Oe(o){return{current:o}}function $e(o){0>oe||(o.current=Sn[oe],Sn[oe]=null,oe--)}function qe(o,u){oe++,Sn[oe]=o.current,o.current=u}var G=Oe(null),Tt=Oe(null),dt=Oe(null),Vi=Oe(null);function Tn(o,u){switch(qe(dt,u),qe(Tt,o),qe(G,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?Kd(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=Kd(u),o=fv(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}$e(G),qe(G,o)}function rl(){$e(G),$e(Tt),$e(dt)}function Ap(o){o.memoizedState!==null&&qe(Vi,o);var u=G.current,d=fv(u,o.type);u!==d&&(qe(Tt,o),qe(G,d))}function _f(o){Tt.current===o&&($e(G),$e(Tt)),Vi.current===o&&($e(Vi),Ef._currentValue=ft)}var Me=Object.prototype.hasOwnProperty,Cp=R.unstable_scheduleCallback,bp=R.unstable_cancelCallback,Ha=R.unstable_shouldYield,Uf=R.unstable_requestPaint,Zi=R.unstable_now,Qm=R.unstable_getCurrentPriorityLevel,Qr=R.unstable_ImmediatePriority,Et=R.unstable_UserBlockingPriority,ko=R.unstable_NormalPriority,Jm=R.unstable_LowPriority,Zm=R.unstable_IdlePriority,o2=R.log,ng=R.unstable_setDisableYieldValue,Fl=null,yt=null;function ol(o){if(typeof o2=="function"&&ng(o),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(Fl,o)}catch{}}var hr=Math.clz32?Math.clz32:Ip,$m=Math.log,ig=Math.LN2;function Ip(o){return o>>>=0,o===0?32:31-($m(o)/ig|0)|0}var bt=256,jf=4194304;function Ou(o){var u=o&42;if(u!==0)return u;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function pc(o,u,d){var g=o.pendingLanes;if(g===0)return 0;var w=0,C=o.suspendedLanes,U=o.pingedLanes;o=o.warmLanes;var H=g&134217727;return H!==0?(g=H&~C,g!==0?w=Ou(g):(U&=H,U!==0?w=Ou(U):d||(d=H&~o,d!==0&&(w=Ou(d))))):(H=g&~C,H!==0?w=Ou(H):U!==0?w=Ou(U):d||(d=g&~o,d!==0&&(w=Ou(d)))),w===0?0:u!==0&&u!==w&&(u&C)===0&&(C=w&-w,d=u&-u,C>=d||C===32&&(d&4194048)!==0)?u:w}function hc(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function fn(o,u){switch(o){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yc(){var o=bt;return bt<<=1,(bt&4194048)===0&&(bt=256),o}function gc(){var o=jf;return jf<<=1,(jf&62914560)===0&&(jf=4194304),o}function vc(o){for(var u=[],d=0;31>d;d++)u.push(o);return u}function Jr(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Ka(o,u,d,g,w,C){var U=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var H=o.entanglements,$=o.expirationTimes,ve=o.hiddenUpdates;for(d=U&~d;0<d;){var Ee=31-hr(d),Ce=1<<Ee;H[Ee]=0,$[Ee]=-1;var me=ve[Ee];if(me!==null)for(ve[Ee]=null,Ee=0;Ee<me.length;Ee++){var Se=me[Ee];Se!==null&&(Se.lane&=-536870913)}d&=~Ce}g!==0&&qa(o,g,0),C!==0&&w===0&&o.tag!==0&&(o.suspendedLanes|=C&~(U&~u))}function qa(o,u,d){o.pendingLanes|=u,o.suspendedLanes&=~u;var g=31-hr(u);o.entangledLanes|=u,o.entanglements[g]=o.entanglements[g]|1073741824|d&4194090}function rg(o,u){var d=o.entangledLanes|=u;for(o=o.entanglements;d;){var g=31-hr(d),w=1<<g;w&u|o[g]&u&&(o[g]|=u),d&=~w}}function Bf(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Dp(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function og(){var o=_e.p;return o!==0?o:(o=window.event,o===void 0?32:ey(o.type))}function e0(o,u){var d=_e.p;try{return _e.p=o,u()}finally{_e.p=d}}var Xl=Math.random().toString(36).slice(2),Yn="__reactFiber$"+Xl,Ii="__reactProps$"+Xl,ku="__reactContainer$"+Xl,Yl="__reactEvents$"+Xl,ll="__reactListeners$"+Xl,yr="__reactHandles$"+Xl,Je="__reactResources$"+Xl,Ga="__reactMarker$"+Xl;function Ti(o){delete o[Yn],delete o[Ii],delete o[Yl],delete o[ll],delete o[yr]}function Wl(o){var u=o[Yn];if(u)return u;for(var d=o.parentNode;d;){if(u=d[ku]||d[Yn]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(o=hv(o);o!==null;){if(d=o[Yn])return d;o=hv(o)}return u}o=d,d=o.parentNode}return null}function Y(o){if(o=o[Yn]||o[ku]){var u=o.tag;if(u===5||u===6||u===13||u===26||u===27||u===3)return o}return null}function ul(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(x(33))}function Mu(o){var u=o[Je];return u||(u=o[Je]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function ti(o){o[Ga]=!0}var Vf=new Set,mc={};function Mo(o,u){Zr(o,u),Zr(o+"Capture",u)}function Zr(o,u){for(mc[o]=u,o=0;o<u.length;o++)Vf.add(u[o])}var Sc=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ct={},$r={};function Tc(o){return Me.call($r,o)?!0:Me.call(ct,o)?!1:Sc.test(o)?$r[o]=!0:(ct[o]=!0,!1)}function Ql(o,u,d){if(Tc(u))if(d===null)o.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var g=u.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+d)}}function $i(o,u,d){if(d===null)o.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+d)}}function si(o,u,d,g){if(g===null)o.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(u,d,""+g)}}var eo,Ro;function al(o){if(eo===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);eo=u&&u[1]||"",Ro=-1<d.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+eo+o+Ro}var er=!1;function Hf(o,u){if(!o||er)return"";er=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(u){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Se){var me=Se}Reflect.construct(o,[],Ce)}else{try{Ce.call()}catch(Se){me=Se}o.call(Ce.prototype)}}else{try{throw Error()}catch(Se){me=Se}(Ce=o())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(Se){if(Se&&me&&typeof Se.stack=="string")return[Se.stack,me.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=g.DetermineComponentFrameRoot(),U=C[0],H=C[1];if(U&&H){var $=U.split(`
|
||
`),ve=H.split(`
|
||
`);for(w=g=0;g<$.length&&!$[g].includes("DetermineComponentFrameRoot");)g++;for(;w<ve.length&&!ve[w].includes("DetermineComponentFrameRoot");)w++;if(g===$.length||w===ve.length)for(g=$.length-1,w=ve.length-1;1<=g&&0<=w&&$[g]!==ve[w];)w--;for(;1<=g&&0<=w;g--,w--)if($[g]!==ve[w]){if(g!==1||w!==1)do if(g--,w--,0>w||$[g]!==ve[w]){var Ee=`
|
||
`+$[g].replace(" at new "," at ");return o.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",o.displayName)),Ee}while(1<=g&&0<=w);break}}}finally{er=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?al(d):""}function ni(o){switch(o.tag){case 26:case 27:case 5:return al(o.type);case 16:return al("Lazy");case 13:return al("Suspense");case 19:return al("SuspenseList");case 0:case 15:return Hf(o.type,!1);case 11:return Hf(o.type.render,!1);case 1:return Hf(o.type,!0);case 31:return al("Activity");default:return""}}function Ru(o){try{var u="";do u+=ni(o),o=o.return;while(o);return u}catch(d){return`
|
||
Error generating stack: `+d.message+`
|
||
`+d.stack}}function qn(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function wc(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function lg(o){var u=wc(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,u),g=""+o[u];if(!o.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,C=d.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return w.call(this)},set:function(U){g=""+U,C.call(this,U)}}),Object.defineProperty(o,u,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(U){g=""+U},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function za(o){o._valueTracker||(o._valueTracker=lg(o))}function sl(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var d=u.getValue(),g="";return o&&(g=wc(o)?o.checked?"true":"false":o.value),o=g,o!==d?(u.setValue(o),!0):!1}function Fa(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Op=/[\n"\\]/g;function Vt(o){return o.replace(Op,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Jl(o,u,d,g,w,C,U,H){o.name="",U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?o.type=U:o.removeAttribute("type"),u!=null?U==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+qn(u)):o.value!==""+qn(u)&&(o.value=""+qn(u)):U!=="submit"&&U!=="reset"||o.removeAttribute("value"),u!=null?Mp(o,U,qn(u)):d!=null?Mp(o,U,qn(d)):g!=null&&o.removeAttribute("value"),w==null&&C!=null&&(o.defaultChecked=!!C),w!=null&&(o.checked=w&&typeof w!="function"&&typeof w!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?o.name=""+qn(H):o.removeAttribute("name")}function kp(o,u,d,g,w,C,U,H){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(o.type=C),u!=null||d!=null){if(!(C!=="submit"&&C!=="reset"||u!=null))return;d=d!=null?""+qn(d):"",u=u!=null?""+qn(u):d,H||u===o.value||(o.value=u),o.defaultValue=u}g=g??w,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=H?o.checked:!!g,o.defaultChecked=!!g,U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"&&(o.name=U)}function Mp(o,u,d){u==="number"&&Fa(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function Nu(o,u,d,g){if(o=o.options,u){u={};for(var w=0;w<d.length;w++)u["$"+d[w]]=!0;for(d=0;d<o.length;d++)w=u.hasOwnProperty("$"+o[d].value),o[d].selected!==w&&(o[d].selected=w),w&&g&&(o[d].defaultSelected=!0)}else{for(d=""+qn(d),u=null,w=0;w<o.length;w++){if(o[w].value===d){o[w].selected=!0,g&&(o[w].defaultSelected=!0);return}u!==null||o[w].disabled||(u=o[w])}u!==null&&(u.selected=!0)}}function Rp(o,u,d){if(u!=null&&(u=""+qn(u),u!==o.value&&(o.value=u),d==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=d!=null?""+qn(d):""}function Kf(o,u,d,g){if(u==null){if(g!=null){if(d!=null)throw Error(x(92));if(De(g)){if(1<g.length)throw Error(x(93));g=g[0]}d=g}d==null&&(d=""),u=d}d=qn(u),o.defaultValue=d,g=o.textContent,g===d&&g!==""&&g!==null&&(o.value=g)}function to(o,u){if(u){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=u;return}}o.textContent=u}var Pu=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Zt(o,u,d){var g=u.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":g?o.setProperty(u,d):typeof d!="number"||d===0||Pu.has(u)?u==="float"?o.cssFloat=d:o[u]=(""+d).trim():o[u]=d+"px"}function cl(o,u,d){if(u!=null&&typeof u!="object")throw Error(x(62));if(o=o.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||u!=null&&u.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var w in u)g=u[w],u.hasOwnProperty(w)&&d[w]!==g&&Zt(o,w,g)}else for(var C in u)u.hasOwnProperty(C)&&Zt(o,C,u[C])}function Or(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kr=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Np=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Xa(o){return Np.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var wi=null;function qf(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Nn=null,fl=null;function No(o){var u=Y(o);if(u&&(o=u.stateNode)){var d=o[Ii]||null;e:switch(o=u.stateNode,u.type){case"input":if(Jl(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),u=d.name,d.type==="radio"&&u!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Vt(""+u)+'"][type="radio"]'),u=0;u<d.length;u++){var g=d[u];if(g!==o&&g.form===o.form){var w=g[Ii]||null;if(!w)throw Error(x(90));Jl(g,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(u=0;u<d.length;u++)g=d[u],g.form===o.form&&sl(g)}break e;case"textarea":Rp(o,d.value,d.defaultValue);break e;case"select":u=d.value,u!=null&&Nu(o,!!d.multiple,u,!1)}}}var Hi=!1;function Zl(o,u,d){if(Hi)return o(u,d);Hi=!0;try{var g=o(u);return g}finally{if(Hi=!1,(Nn!==null||fl!==null)&&(af(),Nn&&(u=Nn,o=fl,fl=Nn=null,No(u),o)))for(u=0;u<o.length;u++)No(o[u])}}function gr(o,u){var d=o.stateNode;if(d===null)return null;var g=d[Ii]||null;if(g===null)return null;d=g[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(x(231,u,typeof d));return d}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pn=!1;if(Ht)try{var Mr={};Object.defineProperty(Mr,"passive",{get:function(){Pn=!0}}),window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{Pn=!1}var dl=null,$l=null,ci=null;function Gf(){if(ci)return ci;var o,u=$l,d=u.length,g,w="value"in dl?dl.value:dl.textContent,C=w.length;for(o=0;o<d&&u[o]===w[o];o++);var U=d-o;for(g=1;g<=U&&u[d-g]===w[C-g];g++);return ci=w.slice(o,1<g?1-g:void 0)}function ot(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function wn(){return!0}function ug(){return!1}function Ki(o){function u(d,g,w,C,U){this._reactName=d,this._targetInst=w,this.type=g,this.nativeEvent=C,this.target=U,this.currentTarget=null;for(var H in o)o.hasOwnProperty(H)&&(d=o[H],this[H]=d?d(C):C[H]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?wn:ug,this.isPropagationStopped=ug,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),u}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ya=Ki(no),Wa=p({},no,{view:0,detail:0}),ag=Ki(Wa),Ln,pl,Qa,Ja=p({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eu,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Qa&&(Qa&&o.type==="mousemove"?(Ln=o.screenX-Qa.screenX,pl=o.screenY-Qa.screenY):pl=Ln=0,Qa=o),Ln)},movementY:function(o){return"movementY"in o?o.movementY:pl}}),Za=Ki(Ja),Pp=p({},Ja,{dataTransfer:0}),xc=Ki(Pp),tr=p({},Wa,{relatedTarget:0}),Ec=Ki(tr),sg=p({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),Lp=Ki(sg),$a=p({},no,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Lu=Ki($a),qi=p({},no,{data:0}),_p=Ki(qi),cg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Up={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function es(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=Up[o])?!!u[o]:!1}function eu(){return es}var ts=p({},Wa,{key:function(o){if(o.key){var u=cg[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=ot(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Rr[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eu,charCode:function(o){return o.type==="keypress"?ot(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?ot(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),_u=Ki(ts),Uu=p({},Ja,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ns=Ki(Uu),is=p({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eu}),t0=Ki(is),io=p({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),ju=Ki(io),jp=p({},Ja,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Ac=Ki(jp),Bu=p({},no,{newState:0,oldState:0}),Bp=Ki(Bu),n0=[9,13,27,32],rs=Ht&&"CompositionEvent"in window,os=null;Ht&&"documentMode"in document&&(os=document.documentMode);var Mt=Ht&&"TextEvent"in window&&!os,Cn=Ht&&(!rs||os&&8<os&&11>=os),Gi=" ",Nr=!1;function xn(o,u){switch(o){case"keyup":return n0.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vr(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ze=!1;function hl(o,u){switch(o){case"compositionend":return vr(u);case"keypress":return u.which!==32?null:(Nr=!0,Gi);case"textInput":return o=u.data,o===Gi&&Nr?null:o;default:return null}}function fg(o,u){if(ze)return o==="compositionend"||!rs&&xn(o,u)?(o=Gf(),ci=$l=dl=null,ze=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Cn&&u.locale!=="ko"?null:u.data;default:return null}}var Po={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yl(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!Po[o.type]:u==="textarea"}function ro(o,u,d,g){Nn?fl?fl.push(g):fl=[g]:Nn=g,u=Qs(u,"onChange"),0<u.length&&(d=new Ya("onChange","change",null,d,g),o.push({event:d,listeners:u}))}var tu=null,Wn=null;function gl(o){Bd(o,0)}function Qn(o){var u=ul(o);if(sl(u))return o}function ls(o,u){if(o==="change")return u}var Cc=!1;if(Ht){var Vp;if(Ht){var us="oninput"in document;if(!us){var Hp=document.createElement("div");Hp.setAttribute("oninput","return;"),us=typeof Hp.oninput=="function"}Vp=us}else Vp=!1;Cc=Vp&&(!document.documentMode||9<document.documentMode)}function Kp(){tu&&(tu.detachEvent("onpropertychange",qp),Wn=tu=null)}function qp(o){if(o.propertyName==="value"&&Qn(Wn)){var u=[];ro(u,Wn,o,qf(o)),Zl(gl,u)}}function dg(o,u,d){o==="focusin"?(Kp(),tu=u,Wn=d,tu.attachEvent("onpropertychange",qp)):o==="focusout"&&Kp()}function Gp(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Qn(Wn)}function zp(o,u){if(o==="click")return Qn(u)}function Fp(o,u){if(o==="input"||o==="change")return Qn(u)}function Ft(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var nr=typeof Object.is=="function"?Object.is:Ft;function nu(o,u){if(nr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var d=Object.keys(o),g=Object.keys(u);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var w=d[g];if(!Me.call(u,w)||!nr(o[w],u[w]))return!1}return!0}function bc(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Xp(o,u){var d=bc(o);o=0;for(var g;d;){if(d.nodeType===3){if(g=o+d.textContent.length,o<=u&&g>=u)return{node:d,offset:u-o};o=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=bc(d)}}function pg(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?pg(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function Yp(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=Fa(o.document);u instanceof o.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)o=u.contentWindow;else break;u=Fa(o.document)}return u}function Vu(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var zf=Ht&&"documentMode"in document&&11>=document.documentMode,zi=null,Ic=null,vl=null,Ff=!1;function as(o,u,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Ff||zi==null||zi!==Fa(g)||(g=zi,"selectionStart"in g&&Vu(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),vl&&nu(vl,g)||(vl=g,g=Qs(Ic,"onSelect"),0<g.length&&(u=new Ya("onSelect","select",null,u,d),o.push({event:u,listeners:g}),u.target=zi)))}function mr(o,u){var d={};return d[o.toLowerCase()]=u.toLowerCase(),d["Webkit"+o]="webkit"+u,d["Moz"+o]="moz"+u,d}var Lo={animationend:mr("Animation","AnimationEnd"),animationiteration:mr("Animation","AnimationIteration"),animationstart:mr("Animation","AnimationStart"),transitionrun:mr("Transition","TransitionRun"),transitionstart:mr("Transition","TransitionStart"),transitioncancel:mr("Transition","TransitionCancel"),transitionend:mr("Transition","TransitionEnd")},ml={},Xf={};Ht&&(Xf=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function iu(o){if(ml[o])return ml[o];if(!Lo[o])return o;var u=Lo[o],d;for(d in u)if(u.hasOwnProperty(d)&&d in Xf)return ml[o]=u[d];return o}var Wp=iu("animationend"),Qp=iu("animationiteration"),Hu=iu("animationstart"),Jp=iu("transitionrun"),ss=iu("transitionstart"),hg=iu("transitioncancel"),_o=iu("transitionend"),yg=new Map,Uo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Uo.push("scrollEnd");function fi(o,u){yg.set(o,u),Mo(u,[o])}var Sl=new WeakMap;function ir(o,u){if(typeof o=="object"&&o!==null){var d=Sl.get(o);return d!==void 0?d:(u={value:o,source:u,stack:Ru(u)},Sl.set(o,u),u)}return{value:o,source:u,stack:Ru(u)}}var di=[],ru=0,Dc=0;function Oc(){for(var o=ru,u=Dc=ru=0;u<o;){var d=di[u];di[u++]=null;var g=di[u];di[u++]=null;var w=di[u];di[u++]=null;var C=di[u];if(di[u++]=null,g!==null&&w!==null){var U=g.pending;U===null?w.next=w:(w.next=U.next,U.next=w),g.pending=w}C!==0&&Yf(d,w,C)}}function cs(o,u,d,g){di[ru++]=o,di[ru++]=u,di[ru++]=d,di[ru++]=g,Dc|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function dn(o,u,d,g){return cs(o,u,d,g),Wf(o)}function oo(o,u){return cs(o,null,null,u),Wf(o)}function Yf(o,u,d){o.lanes|=d;var g=o.alternate;g!==null&&(g.lanes|=d);for(var w=!1,C=o.return;C!==null;)C.childLanes|=d,g=C.alternate,g!==null&&(g.childLanes|=d),C.tag===22&&(o=C.stateNode,o===null||o._visibility&1||(w=!0)),o=C,C=C.return;return o.tag===3?(C=o.stateNode,w&&u!==null&&(w=31-hr(d),o=C.hiddenUpdates,g=o[w],g===null?o[w]=[u]:g.push(u),u.lane=d|536870912),C):null}function Wf(o){if(50<Vs)throw Vs=0,Ct=null,Error(x(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var Tl={};function pi(o,u,d,g){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(o,u,d,g){return new pi(o,u,d,g)}function Di(o){return o=o.prototype,!(!o||!o.isReactComponent)}function _n(o,u){var d=o.alternate;return d===null?(d=ii(o.tag,u,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=u,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,u=o.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function Qf(o,u){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,u=d.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function kc(o,u,d,g,w,C){var U=0;if(g=o,typeof o=="function")Di(o)&&(U=1);else if(typeof o=="string")U=xv(o,d,G.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case cn:return o=ii(31,d,u,w),o.elementType=cn,o.lanes=C,o;case A:return Ku(d.children,w,C,u);case te:U=8,w|=24;break;case ae:return o=ii(12,d,u,w|2),o.elementType=ae,o.lanes=C,o;case Re:return o=ii(13,d,u,w),o.elementType=Re,o.lanes=C,o;case nt:return o=ii(19,d,u,w),o.elementType=nt,o.lanes=C,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case he:case ee:U=10;break e;case je:U=9;break e;case ke:U=11;break e;case Gt:U=14;break e;case ln:U=16,g=null;break e}U=29,d=Error(x(130,o===null?"null":typeof o,"")),g=null}return u=ii(U,d,u,w),u.elementType=o,u.type=g,u.lanes=C,u}function Ku(o,u,d,g){return o=ii(7,o,g,u),o.lanes=d,o}function lo(o,u,d){return o=ii(6,o,null,u),o.lanes=d,o}function uo(o,u,d){return u=ii(4,o.children!==null?o.children:[],o.key,u),u.lanes=d,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var Dn=[],wl=0,xl=null,Jf=0,Pr=[],Sr=0,ou=null,El=1,Tr="";function qu(o,u){Dn[wl++]=Jf,Dn[wl++]=xl,xl=o,Jf=u}function gg(o,u,d){Pr[Sr++]=El,Pr[Sr++]=Tr,Pr[Sr++]=ou,ou=o;var g=El;o=Tr;var w=32-hr(g)-1;g&=~(1<<w),d+=1;var C=32-hr(u)+w;if(30<C){var U=w-w%5;C=(g&(1<<U)-1).toString(32),g>>=U,w-=U,El=1<<32-hr(u)+w|d<<w|g,Tr=C+o}else El=1<<C|d<<w|g,Tr=o}function jo(o){o.return!==null&&(qu(o,1),gg(o,1,0))}function Gu(o){for(;o===xl;)xl=Dn[--wl],Dn[wl]=null,Jf=Dn[--wl],Dn[wl]=null;for(;o===ou;)ou=Pr[--Sr],Pr[Sr]=null,Tr=Pr[--Sr],Pr[Sr]=null,El=Pr[--Sr],Pr[Sr]=null}var bn=null,En=null,Xt=!1,Al=null,At=!1,Cl=Error(x(519));function bl(o){var u=Error(x(418,""));throw Rc(ir(u,o)),Cl}function Zf(o){var u=o.stateNode,d=o.type,g=o.memoizedProps;switch(u[Yn]=o,u[Ii]=g,d){case"dialog":_t("cancel",u),_t("close",u);break;case"iframe":case"object":case"embed":_t("load",u);break;case"video":case"audio":for(d=0;d<Ws.length;d++)_t(Ws[d],u);break;case"source":_t("error",u);break;case"img":case"image":case"link":_t("error",u),_t("load",u);break;case"details":_t("toggle",u);break;case"input":_t("invalid",u),kp(u,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0),za(u);break;case"select":_t("invalid",u);break;case"textarea":_t("invalid",u),Kf(u,g.value,g.defaultValue,g.children),za(u)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||u.textContent===""+d||g.suppressHydrationWarning===!0||Vd(u.textContent,d)?(g.popover!=null&&(_t("beforetoggle",u),_t("toggle",u)),g.onScroll!=null&&_t("scroll",u),g.onScrollEnd!=null&&_t("scrollend",u),g.onClick!=null&&(u.onclick=ma),u=!0):u=!1,u||bl(o)}function Mc(o){for(bn=o.return;bn;)switch(bn.tag){case 5:case 13:At=!1;return;case 27:case 3:At=!0;return;default:bn=bn.return}}function fs(o){if(o!==bn)return!1;if(!Xt)return Mc(o),Xt=!0,!1;var u=o.tag,d;if((d=u!==3&&u!==27)&&((d=u===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||qh(o.type,o.memoizedProps)),d=!d),d&&En&&bl(o),Mc(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(x(317));e:{for(o=o.nextSibling,u=0;o;){if(o.nodeType===8)if(d=o.data,d==="/$"){if(u===0){En=mo(o.nextSibling);break e}u--}else d!=="$"&&d!=="$!"&&d!=="$?"||u++;o=o.nextSibling}En=null}}else u===27?(u=En,vo(o.type)?(o=vf,vf=null,En=o):En=u):En=bn?mo(o.stateNode.nextSibling):null;return!0}function ds(){En=bn=null,Xt=!1}function Zp(){var o=Al;return o!==null&&(yi===null?yi=o:yi.push.apply(yi,o),Al=null),o}function Rc(o){Al===null?Al=[o]:Al.push(o)}var $p=Oe(null),Bo=null,Il=null;function Dl(o,u,d){qe($p,u._currentValue),u._currentValue=d}function Ol(o){o._currentValue=$p.current,$e($p)}function eh(o,u,d){for(;o!==null;){var g=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),o===d)break;o=o.return}}function $f(o,u,d,g){var w=o.child;for(w!==null&&(w.return=o);w!==null;){var C=w.dependencies;if(C!==null){var U=w.child;C=C.firstContext;e:for(;C!==null;){var H=C;C=w;for(var $=0;$<u.length;$++)if(H.context===u[$]){C.lanes|=d,H=C.alternate,H!==null&&(H.lanes|=d),eh(C.return,d,o),g||(U=null);break e}C=H.next}}else if(w.tag===18){if(U=w.return,U===null)throw Error(x(341));U.lanes|=d,C=U.alternate,C!==null&&(C.lanes|=d),eh(U,d,o),U=null}else U=w.child;if(U!==null)U.return=w;else for(U=w;U!==null;){if(U===o){U=null;break}if(w=U.sibling,w!==null){w.return=U.return,U=w;break}U=U.return}w=U}}function Nc(o,u,d,g){o=null;for(var w=u,C=!1;w!==null;){if(!C){if((w.flags&524288)!==0)C=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var U=w.alternate;if(U===null)throw Error(x(387));if(U=U.memoizedProps,U!==null){var H=w.type;nr(w.pendingProps.value,U.value)||(o!==null?o.push(H):o=[H])}}else if(w===Vi.current){if(U=w.alternate,U===null)throw Error(x(387));U.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(o!==null?o.push(Ef):o=[Ef])}w=w.return}o!==null&&$f(u,o,d,g),u.flags|=262144}function Pc(o){for(o=o.firstContext;o!==null;){if(!nr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function lu(o){Bo=o,Il=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function ri(o){return vg(Bo,o)}function ps(o,u){return Bo===null&&lu(o),vg(o,u)}function vg(o,u){var d=u._currentValue;if(u={context:u,memoizedValue:d,next:null},Il===null){if(o===null)throw Error(x(308));Il=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Il=Il.next=u;return d}var i0=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(d,g){o.push(g)}};this.abort=function(){u.aborted=!0,o.forEach(function(d){return d()})}},r0=R.unstable_scheduleCallback,zu=R.unstable_NormalPriority,Un={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new i0,data:new Map,refCount:0}}function Fu(o){o.refCount--,o.refCount===0&&r0(zu,function(){o.controller.abort()})}var hs=null,_c=0,Xu=0,Vo=null;function ed(o,u){if(hs===null){var d=hs=[];_c=0,Xu=jh(),Vo={status:"pending",value:void 0,then:function(g){d.push(g)}}}return _c++,u.then(Yu,Yu),u}function Yu(){if(--_c===0&&hs!==null){Vo!==null&&(Vo.status="fulfilled");var o=hs;hs=null,Xu=0,Vo=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function mg(o,u){var d=[],g={status:"pending",value:null,reason:null,then:function(w){d.push(w)}};return o.then(function(){g.status="fulfilled",g.value=u;for(var w=0;w<d.length;w++)(0,d[w])(u)},function(w){for(g.status="rejected",g.reason=w,w=0;w<d.length;w++)(0,d[w])(void 0)}),g}var th=Te.S;Te.S=function(o,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&ed(o,u),th!==null&&th(o,u)};var uu=Oe(null);function td(){var o=uu.current;return o!==null?o:In.pooledCache}function Wu(o,u){u===null?qe(uu,uu.current):qe(uu,u.pool)}function Sg(){var o=td();return o===null?null:{parent:Un._currentValue,pool:o}}var au=Error(x(460)),Tg=Error(x(474)),Qt=Error(x(542)),nd={then:function(){}};function id(o){return o=o.status,o==="fulfilled"||o==="rejected"}function rd(){}function wg(o,u,d){switch(d=o[d],d===void 0?o.push(u):d!==u&&(u.then(rd,rd),u=d),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Lr(o),o;default:if(typeof u.status=="string")u.then(rd,rd);else{if(o=In,o!==null&&100<o.shellSuspendCounter)throw Error(x(482));o=u,o.status="pending",o.then(function(g){if(u.status==="pending"){var w=u;w.status="fulfilled",w.value=g}},function(g){if(u.status==="pending"){var w=u;w.status="rejected",w.reason=g}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,Lr(o),o}throw ys=u,au}}var ys=null;function nh(){if(ys===null)throw Error(x(459));var o=ys;return ys=null,o}function Lr(o){if(o===au||o===Qt)throw Error(x(483))}var It=!1;function pn(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kl(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ho(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function wr(o,u,d){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(an&2)!==0){var w=g.pending;return w===null?u.next=u:(u.next=w.next,w.next=u),g.pending=u,u=Wf(o),Yf(o,null,d),u}return cs(o,g,u,d),Wf(o)}function gs(o,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194048)!==0)){var g=u.lanes;g&=o.pendingLanes,d|=g,u.lanes=d,rg(o,d)}}function od(o,u){var d=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var w=null,C=null;if(d=d.firstBaseUpdate,d!==null){do{var U={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};C===null?w=C=U:C=C.next=U,d=d.next}while(d!==null);C===null?w=C=u:C=C.next=u}else w=C=u;d={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:C,shared:g.shared,callbacks:g.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=u}var ih=!1;function Ie(){if(ih){var o=Vo;if(o!==null)throw o}}function vs(o,u,d,g){ih=!1;var w=o.updateQueue;It=!1;var C=w.firstBaseUpdate,U=w.lastBaseUpdate,H=w.shared.pending;if(H!==null){w.shared.pending=null;var $=H,ve=$.next;$.next=null,U===null?C=ve:U.next=ve,U=$;var Ee=o.alternate;Ee!==null&&(Ee=Ee.updateQueue,H=Ee.lastBaseUpdate,H!==U&&(H===null?Ee.firstBaseUpdate=ve:H.next=ve,Ee.lastBaseUpdate=$))}if(C!==null){var Ce=w.baseState;U=0,Ee=ve=$=null,H=C;do{var me=H.lane&-536870913,Se=me!==H.lane;if(Se?(Jt&me)===me:(g&me)===me){me!==0&&me===Xu&&(ih=!0),Ee!==null&&(Ee=Ee.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var wt=o,vt=H;me=u;var vn=d;switch(vt.tag){case 1:if(wt=vt.payload,typeof wt=="function"){Ce=wt.call(vn,Ce,me);break e}Ce=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=vt.payload,me=typeof wt=="function"?wt.call(vn,Ce,me):wt,me==null)break e;Ce=p({},Ce,me);break e;case 2:It=!0}}me=H.callback,me!==null&&(o.flags|=64,Se&&(o.flags|=8192),Se=w.callbacks,Se===null?w.callbacks=[me]:Se.push(me))}else Se={lane:me,tag:H.tag,payload:H.payload,callback:H.callback,next:null},Ee===null?(ve=Ee=Se,$=Ce):Ee=Ee.next=Se,U|=me;if(H=H.next,H===null){if(H=w.shared.pending,H===null)break;Se=H,H=Se.next,Se.next=null,w.lastBaseUpdate=Se,w.shared.pending=null}}while(!0);Ee===null&&($=Ce),w.baseState=$,w.firstBaseUpdate=ve,w.lastBaseUpdate=Ee,C===null&&(w.shared.lanes=0),Yo|=U,o.lanes=U,o.memoizedState=Ce}}function Uc(o,u){if(typeof o!="function")throw Error(x(191,o));o.call(u)}function Nt(o,u){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)Uc(d[o],u)}var ao=Oe(null),Ko=Oe(0);function Kt(o,u){o=jl,qe(Ko,o),qe(ao,u),jl=o|u.baseLanes}function so(){qe(Ko,jl),qe(ao,ao.current)}function ld(){jl=Ko.current,$e(ao),$e(Ko)}var un=0,Lt=null,hn=null,oi=null,jc=!1,Qu=!1,qo=!1,Fi=0,ms=0,Ml=null,Ss=0;function at(){throw Error(x(321))}function Bc(o,u){if(u===null)return!1;for(var d=0;d<u.length&&d<o.length;d++)if(!nr(o[d],u[d]))return!1;return!0}function rh(o,u,d,g,w,C){return un=C,Lt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Te.H=o===null||o.memoizedState===null?Sd:bs,qo=!1,C=d(g,w),qo=!1,Qu&&(C=ud(u,d,g,w)),su(o),C}function su(o){Te.H=Gc;var u=hn!==null&&hn.next!==null;if(un=0,oi=hn=Lt=null,jc=!1,ms=0,Ml=null,u)throw Error(x(300));o===null||xi||(o=o.dependencies,o!==null&&Pc(o)&&(xi=!0))}function ud(o,u,d,g){Lt=o;var w=0;do{if(Qu&&(Ml=null),ms=0,Qu=!1,25<=w)throw Error(x(301));if(w+=1,oi=hn=null,o.updateQueue!=null){var C=o.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}Te.H=ta,C=u(d,g)}while(Qu);return C}function Yt(){var o=Te.H,u=o.useState()[0];return u=typeof u.then=="function"?Ju(u):u,o=o.useState()[0],(hn!==null?hn.memoizedState:null)!==o&&(Lt.flags|=1024),u}function co(){var o=Fi!==0;return Fi=0,o}function ad(o,u,d){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~d}function Pt(o){if(jc){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}jc=!1}un=0,oi=hn=Lt=null,Qu=!1,ms=Fi=0,Ml=null}function Ze(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oi===null?Lt.memoizedState=oi=o:oi=oi.next=o,oi}function An(){if(hn===null){var o=Lt.alternate;o=o!==null?o.memoizedState:null}else o=hn.next;var u=oi===null?Lt.memoizedState:oi.next;if(u!==null)oi=u,hn=o;else{if(o===null)throw Lt.alternate===null?Error(x(467)):Error(x(310));hn=o,o={memoizedState:hn.memoizedState,baseState:hn.baseState,baseQueue:hn.baseQueue,queue:hn.queue,next:null},oi===null?Lt.memoizedState=oi=o:oi=oi.next=o}return oi}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ju(o){var u=ms;return ms+=1,Ml===null&&(Ml=[]),o=wg(Ml,o,u),u=Lt,(oi===null?u.memoizedState:oi.next)===null&&(u=u.alternate,Te.H=u===null||u.memoizedState===null?Sd:bs),o}function Rl(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Ju(o);if(o.$$typeof===ee)return ri(o)}throw Error(x(438,String(o)))}function sd(o){var u=null,d=Lt.updateQueue;if(d!==null&&(u=d.memoCache),u==null){var g=Lt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(u={data:g.data.map(function(w){return w.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),d===null&&(d=Oi(),Lt.updateQueue=d),d.memoCache=u,d=u.data[u.index],d===void 0)for(d=u.data[u.index]=Array(o),g=0;g<o;g++)d[g]=L;return u.index++,d}function _r(o,u){return typeof u=="function"?u(o):u}function fo(o){var u=An();return oh(u,hn,o)}function oh(o,u,d){var g=o.queue;if(g===null)throw Error(x(311));g.lastRenderedReducer=d;var w=o.baseQueue,C=g.pending;if(C!==null){if(w!==null){var U=w.next;w.next=C.next,C.next=U}u.baseQueue=w=C,g.pending=null}if(C=o.baseState,w===null)o.memoizedState=C;else{u=w.next;var H=U=null,$=null,ve=u,Ee=!1;do{var Ce=ve.lane&-536870913;if(Ce!==ve.lane?(Jt&Ce)===Ce:(un&Ce)===Ce){var me=ve.revertLane;if(me===0)$!==null&&($=$.next={lane:0,revertLane:0,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),Ce===Xu&&(Ee=!0);else if((un&me)===me){ve=ve.next,me===Xu&&(Ee=!0);continue}else Ce={lane:0,revertLane:ve.revertLane,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},$===null?(H=$=Ce,U=C):$=$.next=Ce,Lt.lanes|=me,Yo|=me;Ce=ve.action,qo&&d(C,Ce),C=ve.hasEagerState?ve.eagerState:d(C,Ce)}else me={lane:Ce,revertLane:ve.revertLane,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},$===null?(H=$=me,U=C):$=$.next=me,Lt.lanes|=Ce,Yo|=Ce;ve=ve.next}while(ve!==null&&ve!==u);if($===null?U=C:$.next=H,!nr(C,o.memoizedState)&&(xi=!0,Ee&&(d=Vo,d!==null)))throw d;o.memoizedState=C,o.baseState=U,o.baseQueue=$,g.lastRenderedState=C}return w===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function cd(o){var u=An(),d=u.queue;if(d===null)throw Error(x(311));d.lastRenderedReducer=o;var g=d.dispatch,w=d.pending,C=u.memoizedState;if(w!==null){d.pending=null;var U=w=w.next;do C=o(C,U.action),U=U.next;while(U!==w);nr(C,u.memoizedState)||(xi=!0),u.memoizedState=C,u.baseQueue===null&&(u.baseState=C),d.lastRenderedState=C}return[C,g]}function fd(o,u,d){var g=Lt,w=An(),C=Xt;if(C){if(d===void 0)throw Error(x(407));d=d()}else d=u();var U=!nr((hn||w).memoizedState,d);U&&(w.memoizedState=d,xi=!0),w=w.queue;var H=xg.bind(null,g,w,o);if(xs(2048,8,H,[o]),w.getSnapshot!==u||U||oi!==null&&oi.memoizedState.tag&1){if(g.flags|=2048,Zu(9,pd(),Hc.bind(null,g,w,d,u),null),In===null)throw Error(x(349));C||(un&124)!==0||Vc(g,u,d)}return d}function Vc(o,u,d){o.flags|=16384,o={getSnapshot:u,value:d},u=Lt.updateQueue,u===null?(u=Oi(),Lt.updateQueue=u,u.stores=[o]):(d=u.stores,d===null?u.stores=[o]:d.push(o))}function Hc(o,u,d,g){u.value=d,u.getSnapshot=g,Eg(u)&&lh(o)}function xg(o,u,d){return d(function(){Eg(u)&&lh(o)})}function Eg(o){var u=o.getSnapshot;o=o.value;try{var d=u();return!nr(o,d)}catch{return!0}}function lh(o){var u=oo(o,2);u!==null&&Rn(u,o,2)}function uh(o){var u=Ze();if(typeof o=="function"){var d=o;if(o=d(),qo){ol(!0);try{d()}finally{ol(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:o},u}function ah(o,u,d,g){return o.baseState=d,oh(o,hn,typeof g=="function"?g:_r)}function Ag(o,u,d,g,w){if(qc(o))throw Error(x(485));if(o=u.action,o!==null){var C={payload:w,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(U){C.listeners.push(U)}};Te.T!==null?d(!0):C.isTransition=!1,g(C),d=u.pending,d===null?(C.next=u.pending=C,Cg(u,C)):(C.next=d.next,u.pending=d.next=C)}}function Cg(o,u){var d=u.action,g=u.payload,w=o.state;if(u.isTransition){var C=Te.T,U={};Te.T=U;try{var H=d(w,g),$=Te.S;$!==null&&$(U,H),bg(o,u,H)}catch(ve){dd(o,u,ve)}finally{Te.T=C}}else try{C=d(w,g),bg(o,u,C)}catch(ve){dd(o,u,ve)}}function bg(o,u,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){Ig(o,u,g)},function(g){return dd(o,u,g)}):Ig(o,u,d)}function Ig(o,u,d){u.status="fulfilled",u.value=d,Ts(u),o.state=d,u=o.pending,u!==null&&(d=u.next,d===u?o.pending=null:(d=d.next,u.next=d,Cg(o,d)))}function dd(o,u,d){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do u.status="rejected",u.reason=d,Ts(u),u=u.next;while(u!==g)}o.action=null}function Ts(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function sh(o,u){return u}function ch(o,u){if(Xt){var d=In.formState;if(d!==null){e:{var g=Lt;if(Xt){if(En){t:{for(var w=En,C=At;w.nodeType!==8;){if(!C){w=null;break t}if(w=mo(w.nextSibling),w===null){w=null;break t}}C=w.data,w=C==="F!"||C==="F"?w:null}if(w){En=mo(w.nextSibling),g=w.data==="F!";break e}}bl(g)}g=!1}g&&(u=d[0])}}return d=Ze(),d.memoizedState=d.baseState=u,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sh,lastRenderedState:u},d.queue=g,d=Cs.bind(null,Lt,g),g.dispatch=d,g=uh(!1),C=vd.bind(null,Lt,!1,g.queue),g=Ze(),w={state:u,dispatch:null,action:o,pending:null},g.queue=w,d=Ag.bind(null,Lt,w,C,d),w.dispatch=d,g.memoizedState=o,[u,d,!1]}function Dg(o){var u=An();return Og(u,hn,o)}function Og(o,u,d){if(u=oh(o,u,sh)[0],o=fo(_r)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var g=Ju(u)}catch(U){throw U===au?Qt:U}else g=u;u=An();var w=u.queue,C=w.dispatch;return d!==u.memoizedState&&(Lt.flags|=2048,Zu(9,pd(),fh.bind(null,w,d),null)),[g,C,o]}function fh(o,u){o.action=u}function dh(o){var u=An(),d=hn;if(d!==null)return Og(u,d,o);An(),u=u.memoizedState,d=An();var g=d.queue.dispatch;return d.memoizedState=o,[u,g,!1]}function Zu(o,u,d,g){return o={tag:o,create:d,deps:g,inst:u,next:null},u=Lt.updateQueue,u===null&&(u=Oi(),Lt.updateQueue=u),d=u.lastEffect,d===null?u.lastEffect=o.next=o:(g=d.next,d.next=o,o.next=g,u.lastEffect=o),o}function pd(){return{destroy:void 0,resource:void 0}}function kg(){return An().memoizedState}function ws(o,u,d,g){var w=Ze();g=g===void 0?null:g,Lt.flags|=o,w.memoizedState=Zu(1|u,pd(),d,g)}function xs(o,u,d,g){var w=An();g=g===void 0?null:g;var C=w.memoizedState.inst;hn!==null&&g!==null&&Bc(g,hn.memoizedState.deps)?w.memoizedState=Zu(u,C,d,g):(Lt.flags|=o,w.memoizedState=Zu(1|u,C,d,g))}function Mg(o,u){ws(8390656,8,o,u)}function Rg(o,u){xs(2048,8,o,u)}function ph(o,u){return xs(4,2,o,u)}function Es(o,u){return xs(4,4,o,u)}function hh(o,u){if(typeof u=="function"){o=o();var d=u(o);return function(){typeof d=="function"?d():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function Ng(o,u,d){d=d!=null?d.concat([o]):null,xs(4,4,hh.bind(null,u,o),d)}function $u(){}function Pg(o,u){var d=An();u=u===void 0?null:u;var g=d.memoizedState;return u!==null&&Bc(u,g[1])?g[0]:(d.memoizedState=[o,u],o)}function Lg(o,u){var d=An();u=u===void 0?null:u;var g=d.memoizedState;if(u!==null&&Bc(u,g[1]))return g[0];if(g=o(),qo){ol(!0);try{o()}finally{ol(!1)}}return d.memoizedState=[g,u],g}function hd(o,u,d){return d===void 0||(un&1073741824)!==0?o.memoizedState=u:(o.memoizedState=d,o=uf(),Lt.lanes|=o,Yo|=o,d)}function _g(o,u,d,g){return nr(d,u)?d:ao.current!==null?(o=hd(o,d,g),nr(o,u)||(xi=!0),o):(un&42)===0?(xi=!0,o.memoizedState=d):(o=uf(),Lt.lanes|=o,Yo|=o,u)}function yh(o,u,d,g,w){var C=_e.p;_e.p=C!==0&&8>C?C:8;var U=Te.T,H={};Te.T=H,vd(o,!1,u,d);try{var $=w(),ve=Te.S;if(ve!==null&&ve(H,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var Ee=mg($,g);ea(o,u,Ee,Bn(o))}else ea(o,u,g,Bn(o))}catch(Ce){ea(o,u,{then:function(){},status:"rejected",reason:Ce},Bn())}finally{_e.p=C,Te.T=U}}function o0(){}function gh(o,u,d,g){if(o.tag!==5)throw Error(x(476));var w=Ug(o).queue;yh(o,w,u,ft,d===null?o0:function(){return Kc(o),d(g)})}function Ug(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:ft,baseState:ft,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:ft},next:null};var d={};return u.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:d},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function Kc(o){var u=Ug(o).next.queue;ea(o,u,{},Bn())}function yd(){return ri(Ef)}function vh(){return An().memoizedState}function gd(){return An().memoizedState}function l0(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var d=Bn();o=Ho(d);var g=wr(u,o,d);g!==null&&(Rn(g,u,d),gs(g,u,d)),u={cache:Lc()},o.payload=u;return}u=u.return}}function As(o,u,d){var g=Bn();d={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null},qc(o)?mh(u,d):(d=dn(o,u,d,g),d!==null&&(Rn(d,o,g),md(d,u,g)))}function Cs(o,u,d){var g=Bn();ea(o,u,d,g)}function ea(o,u,d,g){var w={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null};if(qc(o))mh(u,w);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=u.lastRenderedReducer,C!==null))try{var U=u.lastRenderedState,H=C(U,d);if(w.hasEagerState=!0,w.eagerState=H,nr(H,U))return cs(o,u,w,0),In===null&&Oc(),!1}catch{}finally{}if(d=dn(o,u,w,g),d!==null)return Rn(d,o,g),md(d,u,g),!0}return!1}function vd(o,u,d,g){if(g={lane:2,revertLane:jh(),action:g,hasEagerState:!1,eagerState:null,next:null},qc(o)){if(u)throw Error(x(479))}else u=dn(o,d,g,2),u!==null&&Rn(u,o,2)}function qc(o){var u=o.alternate;return o===Lt||u!==null&&u===Lt}function mh(o,u){Qu=jc=!0;var d=o.pending;d===null?u.next=u:(u.next=d.next,d.next=u),o.pending=u}function md(o,u,d){if((d&4194048)!==0){var g=u.lanes;g&=o.pendingLanes,d|=g,u.lanes=d,rg(o,d)}}var Gc={readContext:ri,use:Rl,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at},Sd={readContext:ri,use:Rl,useCallback:function(o,u){return Ze().memoizedState=[o,u===void 0?null:u],o},useContext:ri,useEffect:Mg,useImperativeHandle:function(o,u,d){d=d!=null?d.concat([o]):null,ws(4194308,4,hh.bind(null,u,o),d)},useLayoutEffect:function(o,u){return ws(4194308,4,o,u)},useInsertionEffect:function(o,u){ws(4,2,o,u)},useMemo:function(o,u){var d=Ze();u=u===void 0?null:u;var g=o();if(qo){ol(!0);try{o()}finally{ol(!1)}}return d.memoizedState=[g,u],g},useReducer:function(o,u,d){var g=Ze();if(d!==void 0){var w=d(u);if(qo){ol(!0);try{d(u)}finally{ol(!1)}}}else w=u;return g.memoizedState=g.baseState=w,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:w},g.queue=o,o=o.dispatch=As.bind(null,Lt,o),[g.memoizedState,o]},useRef:function(o){var u=Ze();return o={current:o},u.memoizedState=o},useState:function(o){o=uh(o);var u=o.queue,d=Cs.bind(null,Lt,u);return u.dispatch=d,[o.memoizedState,d]},useDebugValue:$u,useDeferredValue:function(o,u){var d=Ze();return hd(d,o,u)},useTransition:function(){var o=uh(!1);return o=yh.bind(null,Lt,o.queue,!0,!1),Ze().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,d){var g=Lt,w=Ze();if(Xt){if(d===void 0)throw Error(x(407));d=d()}else{if(d=u(),In===null)throw Error(x(349));(Jt&124)!==0||Vc(g,u,d)}w.memoizedState=d;var C={value:d,getSnapshot:u};return w.queue=C,Mg(xg.bind(null,g,C,o),[o]),g.flags|=2048,Zu(9,pd(),Hc.bind(null,g,C,d,u),null),d},useId:function(){var o=Ze(),u=In.identifierPrefix;if(Xt){var d=Tr,g=El;d=(g&~(1<<32-hr(g)-1)).toString(32)+d,u="«"+u+"R"+d,d=Fi++,0<d&&(u+="H"+d.toString(32)),u+="»"}else d=Ss++,u="«"+u+"r"+d.toString(32)+"»";return o.memoizedState=u},useHostTransitionStatus:yd,useFormState:ch,useActionState:ch,useOptimistic:function(o){var u=Ze();u.memoizedState=u.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=d,u=vd.bind(null,Lt,!0,d),d.dispatch=u,[o,u]},useMemoCache:sd,useCacheRefresh:function(){return Ze().memoizedState=l0.bind(null,Lt)}},bs={readContext:ri,use:Rl,useCallback:Pg,useContext:ri,useEffect:Rg,useImperativeHandle:Ng,useInsertionEffect:ph,useLayoutEffect:Es,useMemo:Lg,useReducer:fo,useRef:kg,useState:function(){return fo(_r)},useDebugValue:$u,useDeferredValue:function(o,u){var d=An();return _g(d,hn.memoizedState,o,u)},useTransition:function(){var o=fo(_r)[0],u=An().memoizedState;return[typeof o=="boolean"?o:Ju(o),u]},useSyncExternalStore:fd,useId:vh,useHostTransitionStatus:yd,useFormState:Dg,useActionState:Dg,useOptimistic:function(o,u){var d=An();return ah(d,hn,o,u)},useMemoCache:sd,useCacheRefresh:gd},ta={readContext:ri,use:Rl,useCallback:Pg,useContext:ri,useEffect:Rg,useImperativeHandle:Ng,useInsertionEffect:ph,useLayoutEffect:Es,useMemo:Lg,useReducer:cd,useRef:kg,useState:function(){return cd(_r)},useDebugValue:$u,useDeferredValue:function(o,u){var d=An();return hn===null?hd(d,o,u):_g(d,hn.memoizedState,o,u)},useTransition:function(){var o=cd(_r)[0],u=An().memoizedState;return[typeof o=="boolean"?o:Ju(o),u]},useSyncExternalStore:fd,useId:vh,useHostTransitionStatus:yd,useFormState:dh,useActionState:dh,useOptimistic:function(o,u){var d=An();return hn!==null?ah(d,hn,o,u):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:sd,useCacheRefresh:gd},Is=null,Ds=0;function Nl(o){var u=Ds;return Ds+=1,Is===null&&(Is=[]),wg(Is,o,u)}function cu(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function na(o,u){throw u.$$typeof===m?Error(x(525)):(o=Object.prototype.toString.call(u),Error(x(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function zc(o){var u=o._init;return u(o._payload)}function Fc(o){function u(fe,le){if(o){var ge=fe.deletions;ge===null?(fe.deletions=[le],fe.flags|=16):ge.push(le)}}function d(fe,le){if(!o)return null;for(;le!==null;)u(fe,le),le=le.sibling;return null}function g(fe){for(var le=new Map;fe!==null;)fe.key!==null?le.set(fe.key,fe):le.set(fe.index,fe),fe=fe.sibling;return le}function w(fe,le){return fe=_n(fe,le),fe.index=0,fe.sibling=null,fe}function C(fe,le,ge){return fe.index=ge,o?(ge=fe.alternate,ge!==null?(ge=ge.index,ge<le?(fe.flags|=67108866,le):ge):(fe.flags|=67108866,le)):(fe.flags|=1048576,le)}function U(fe){return o&&fe.alternate===null&&(fe.flags|=67108866),fe}function H(fe,le,ge,Ae){return le===null||le.tag!==6?(le=lo(ge,fe.mode,Ae),le.return=fe,le):(le=w(le,ge),le.return=fe,le)}function $(fe,le,ge,Ae){var tt=ge.type;return tt===A?Ee(fe,le,ge.props.children,Ae,ge.key):le!==null&&(le.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===ln&&zc(tt)===le.type)?(le=w(le,ge.props),cu(le,ge),le.return=fe,le):(le=kc(ge.type,ge.key,ge.props,null,fe.mode,Ae),cu(le,ge),le.return=fe,le)}function ve(fe,le,ge,Ae){return le===null||le.tag!==4||le.stateNode.containerInfo!==ge.containerInfo||le.stateNode.implementation!==ge.implementation?(le=uo(ge,fe.mode,Ae),le.return=fe,le):(le=w(le,ge.children||[]),le.return=fe,le)}function Ee(fe,le,ge,Ae,tt){return le===null||le.tag!==7?(le=Ku(ge,fe.mode,Ae,tt),le.return=fe,le):(le=w(le,ge),le.return=fe,le)}function Ce(fe,le,ge){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return le=lo(""+le,fe.mode,ge),le.return=fe,le;if(typeof le=="object"&&le!==null){switch(le.$$typeof){case D:return ge=kc(le.type,le.key,le.props,null,fe.mode,ge),cu(ge,le),ge.return=fe,ge;case X:return le=uo(le,fe.mode,ge),le.return=fe,le;case ln:var Ae=le._init;return le=Ae(le._payload),Ce(fe,le,ge)}if(De(le)||ye(le))return le=Ku(le,fe.mode,ge,null),le.return=fe,le;if(typeof le.then=="function")return Ce(fe,Nl(le),ge);if(le.$$typeof===ee)return Ce(fe,ps(fe,le),ge);na(fe,le)}return null}function me(fe,le,ge,Ae){var tt=le!==null?le.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return tt!==null?null:H(fe,le,""+ge,Ae);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case D:return ge.key===tt?$(fe,le,ge,Ae):null;case X:return ge.key===tt?ve(fe,le,ge,Ae):null;case ln:return tt=ge._init,ge=tt(ge._payload),me(fe,le,ge,Ae)}if(De(ge)||ye(ge))return tt!==null?null:Ee(fe,le,ge,Ae,null);if(typeof ge.then=="function")return me(fe,le,Nl(ge),Ae);if(ge.$$typeof===ee)return me(fe,le,ps(fe,ge),Ae);na(fe,ge)}return null}function Se(fe,le,ge,Ae,tt){if(typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint")return fe=fe.get(ge)||null,H(le,fe,""+Ae,tt);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case D:return fe=fe.get(Ae.key===null?ge:Ae.key)||null,$(le,fe,Ae,tt);case X:return fe=fe.get(Ae.key===null?ge:Ae.key)||null,ve(le,fe,Ae,tt);case ln:var Ut=Ae._init;return Ae=Ut(Ae._payload),Se(fe,le,ge,Ae,tt)}if(De(Ae)||ye(Ae))return fe=fe.get(ge)||null,Ee(le,fe,Ae,tt,null);if(typeof Ae.then=="function")return Se(fe,le,ge,Nl(Ae),tt);if(Ae.$$typeof===ee)return Se(fe,le,ge,ps(le,Ae),tt);na(le,Ae)}return null}function wt(fe,le,ge,Ae){for(var tt=null,Ut=null,rt=le,xt=le=0,vi=null;rt!==null&&xt<ge.length;xt++){rt.index>xt?(vi=rt,rt=null):vi=rt.sibling;var nn=me(fe,rt,ge[xt],Ae);if(nn===null){rt===null&&(rt=vi);break}o&&rt&&nn.alternate===null&&u(fe,rt),le=C(nn,le,xt),Ut===null?tt=nn:Ut.sibling=nn,Ut=nn,rt=vi}if(xt===ge.length)return d(fe,rt),Xt&&qu(fe,xt),tt;if(rt===null){for(;xt<ge.length;xt++)rt=Ce(fe,ge[xt],Ae),rt!==null&&(le=C(rt,le,xt),Ut===null?tt=rt:Ut.sibling=rt,Ut=rt);return Xt&&qu(fe,xt),tt}for(rt=g(rt);xt<ge.length;xt++)vi=Se(rt,fe,xt,ge[xt],Ae),vi!==null&&(o&&vi.alternate!==null&&rt.delete(vi.key===null?xt:vi.key),le=C(vi,le,xt),Ut===null?tt=vi:Ut.sibling=vi,Ut=vi);return o&&rt.forEach(function(Eu){return u(fe,Eu)}),Xt&&qu(fe,xt),tt}function vt(fe,le,ge,Ae){if(ge==null)throw Error(x(151));for(var tt=null,Ut=null,rt=le,xt=le=0,vi=null,nn=ge.next();rt!==null&&!nn.done;xt++,nn=ge.next()){rt.index>xt?(vi=rt,rt=null):vi=rt.sibling;var Eu=me(fe,rt,nn.value,Ae);if(Eu===null){rt===null&&(rt=vi);break}o&&rt&&Eu.alternate===null&&u(fe,rt),le=C(Eu,le,xt),Ut===null?tt=Eu:Ut.sibling=Eu,Ut=Eu,rt=vi}if(nn.done)return d(fe,rt),Xt&&qu(fe,xt),tt;if(rt===null){for(;!nn.done;xt++,nn=ge.next())nn=Ce(fe,nn.value,Ae),nn!==null&&(le=C(nn,le,xt),Ut===null?tt=nn:Ut.sibling=nn,Ut=nn);return Xt&&qu(fe,xt),tt}for(rt=g(rt);!nn.done;xt++,nn=ge.next())nn=Se(rt,fe,xt,nn.value,Ae),nn!==null&&(o&&nn.alternate!==null&&rt.delete(nn.key===null?xt:nn.key),le=C(nn,le,xt),Ut===null?tt=nn:Ut.sibling=nn,Ut=nn);return o&&rt.forEach(function(M0){return u(fe,M0)}),Xt&&qu(fe,xt),tt}function vn(fe,le,ge,Ae){if(typeof ge=="object"&&ge!==null&&ge.type===A&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case D:e:{for(var tt=ge.key;le!==null;){if(le.key===tt){if(tt=ge.type,tt===A){if(le.tag===7){d(fe,le.sibling),Ae=w(le,ge.props.children),Ae.return=fe,fe=Ae;break e}}else if(le.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===ln&&zc(tt)===le.type){d(fe,le.sibling),Ae=w(le,ge.props),cu(Ae,ge),Ae.return=fe,fe=Ae;break e}d(fe,le);break}else u(fe,le);le=le.sibling}ge.type===A?(Ae=Ku(ge.props.children,fe.mode,Ae,ge.key),Ae.return=fe,fe=Ae):(Ae=kc(ge.type,ge.key,ge.props,null,fe.mode,Ae),cu(Ae,ge),Ae.return=fe,fe=Ae)}return U(fe);case X:e:{for(tt=ge.key;le!==null;){if(le.key===tt)if(le.tag===4&&le.stateNode.containerInfo===ge.containerInfo&&le.stateNode.implementation===ge.implementation){d(fe,le.sibling),Ae=w(le,ge.children||[]),Ae.return=fe,fe=Ae;break e}else{d(fe,le);break}else u(fe,le);le=le.sibling}Ae=uo(ge,fe.mode,Ae),Ae.return=fe,fe=Ae}return U(fe);case ln:return tt=ge._init,ge=tt(ge._payload),vn(fe,le,ge,Ae)}if(De(ge))return wt(fe,le,ge,Ae);if(ye(ge)){if(tt=ye(ge),typeof tt!="function")throw Error(x(150));return ge=tt.call(ge),vt(fe,le,ge,Ae)}if(typeof ge.then=="function")return vn(fe,le,Nl(ge),Ae);if(ge.$$typeof===ee)return vn(fe,le,ps(fe,ge),Ae);na(fe,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,le!==null&&le.tag===6?(d(fe,le.sibling),Ae=w(le,ge),Ae.return=fe,fe=Ae):(d(fe,le),Ae=lo(ge,fe.mode,Ae),Ae.return=fe,fe=Ae),U(fe)):d(fe,le)}return function(fe,le,ge,Ae){try{Ds=0;var tt=vn(fe,le,ge,Ae);return Is=null,tt}catch(rt){if(rt===au||rt===Qt)throw rt;var Ut=ii(29,rt,null,fe.mode);return Ut.lanes=Ae,Ut.return=fe,Ut}finally{}}}var ia=Fc(!0),Sh=Fc(!1),Ur=Oe(null),rr=null;function Gn(o){var u=o.alternate;qe(li,li.current&1),qe(Ur,o),rr===null&&(u===null||ao.current!==null||u.memoizedState!==null)&&(rr=o)}function fu(o){if(o.tag===22){if(qe(li,li.current),qe(Ur,o),rr===null){var u=o.alternate;u!==null&&u.memoizedState!==null&&(rr=o)}}else xr()}function xr(){qe(li,li.current),qe(Ur,Ur.current)}function Go(o){$e(Ur),rr===o&&(rr=null),$e(li)}var li=Oe(0);function du(o){for(var u=o;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||Js(d)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Pl(o,u,d,g){u=o.memoizedState,d=d(g,u),d=d==null?u:p({},u,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var ra={enqueueSetState:function(o,u,d){o=o._reactInternals;var g=Bn(),w=Ho(g);w.payload=u,d!=null&&(w.callback=d),u=wr(o,w,g),u!==null&&(Rn(u,o,g),gs(u,o,g))},enqueueReplaceState:function(o,u,d){o=o._reactInternals;var g=Bn(),w=Ho(g);w.tag=1,w.payload=u,d!=null&&(w.callback=d),u=wr(o,w,g),u!==null&&(Rn(u,o,g),gs(u,o,g))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var d=Bn(),g=Ho(d);g.tag=2,u!=null&&(g.callback=u),u=wr(o,g,d),u!==null&&(Rn(u,o,d),gs(u,o,d))}};function jg(o,u,d,g,w,C,U){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,C,U):u.prototype&&u.prototype.isPureReactComponent?!nu(d,g)||!nu(w,C):!0}function $t(o,u,d,g){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,g),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,g),u.state!==o&&ra.enqueueReplaceState(u,u.state,null)}function pu(o,u){var d=u;if("ref"in u){d={};for(var g in u)g!=="ref"&&(d[g]=u[g])}if(o=o.defaultProps){d===u&&(d=p({},d));for(var w in o)d[w]===void 0&&(d[w]=o[w])}return d}var Xc=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function gt(o){Xc(o)}function Th(o){console.error(o)}function Ll(o){Xc(o)}function Yc(o,u){try{var d=o.onUncaughtError;d(u.value,{componentStack:u.stack})}catch(g){setTimeout(function(){throw g})}}function Bg(o,u,d){try{var g=o.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function wh(o,u,d){return d=Ho(d),d.tag=3,d.payload={element:null},d.callback=function(){Yc(o,u)},d}function Vg(o){return o=Ho(o),o.tag=3,o}function Hg(o,u,d,g){var w=d.type.getDerivedStateFromError;if(typeof w=="function"){var C=g.value;o.payload=function(){return w(C)},o.callback=function(){Bg(u,d,g)}}var U=d.stateNode;U!==null&&typeof U.componentDidCatch=="function"&&(o.callback=function(){Bg(u,d,g),typeof w!="function"&&(Bl===null?Bl=new Set([this]):Bl.add(this));var H=g.stack;this.componentDidCatch(g.value,{componentStack:H!==null?H:""})})}function u0(o,u,d,g,w){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(u=d.alternate,u!==null&&Nc(u,d,w,!0),d=Ur.current,d!==null){switch(d.tag){case 13:return rr===null?Gs():d.alternate===null&&Pe===0&&(Pe=3),d.flags&=-257,d.flags|=65536,d.lanes=w,g===nd?d.flags|=16384:(u=d.updateQueue,u===null?d.updateQueue=new Set([g]):u.add(g),_h(o,g,w)),!1;case 22:return d.flags|=65536,g===nd?d.flags|=16384:(u=d.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=u):(d=u.retryQueue,d===null?u.retryQueue=new Set([g]):d.add(g)),_h(o,g,w)),!1}throw Error(x(435,d.tag))}return _h(o,g,w),Gs(),!1}if(Xt)return u=Ur.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=w,g!==Cl&&(o=Error(x(422),{cause:g}),Rc(ir(o,d)))):(g!==Cl&&(u=Error(x(423),{cause:g}),Rc(ir(u,d))),o=o.current.alternate,o.flags|=65536,w&=-w,o.lanes|=w,g=ir(g,d),w=wh(o.stateNode,g,w),od(o,w),Pe!==4&&(Pe=2)),!1;var C=Error(x(520),{cause:g});if(C=ir(C,d),js===null?js=[C]:js.push(C),Pe!==4&&(Pe=2),u===null)return!0;g=ir(g,d),d=u;do{switch(d.tag){case 3:return d.flags|=65536,o=w&-w,d.lanes|=o,o=wh(d.stateNode,g,o),od(d,o),!1;case 1:if(u=d.type,C=d.stateNode,(d.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(Bl===null||!Bl.has(C))))return d.flags|=65536,w&=-w,d.lanes|=w,w=Vg(w),Hg(w,o,d,g),od(d,w),!1}d=d.return}while(d!==null);return!1}var Kg=Error(x(461)),xi=!1;function ki(o,u,d,g){u.child=o===null?Sh(u,null,d,g):ia(u,o.child,d,g)}function qg(o,u,d,g,w){d=d.render;var C=u.ref;if("ref"in g){var U={};for(var H in g)H!=="ref"&&(U[H]=g[H])}else U=g;return lu(u),g=rh(o,u,d,U,C,w),H=co(),o!==null&&!xi?(ad(o,u,w),_l(o,u,w)):(Xt&&H&&jo(u),u.flags|=1,ki(o,u,g,w),u.child)}function Wc(o,u,d,g,w){if(o===null){var C=d.type;return typeof C=="function"&&!Di(C)&&C.defaultProps===void 0&&d.compare===null?(u.tag=15,u.type=C,Gg(o,u,C,g,w)):(o=kc(d.type,null,g,u,u.mode,w),o.ref=u.ref,o.return=u,u.child=o)}if(C=o.child,!ho(o,w)){var U=C.memoizedProps;if(d=d.compare,d=d!==null?d:nu,d(U,g)&&o.ref===u.ref)return _l(o,u,w)}return u.flags|=1,o=_n(C,g),o.ref=u.ref,o.return=u,u.child=o}function Gg(o,u,d,g,w){if(o!==null){var C=o.memoizedProps;if(nu(C,g)&&o.ref===u.ref)if(xi=!1,u.pendingProps=g=C,ho(o,w))(o.flags&131072)!==0&&(xi=!0);else return u.lanes=o.lanes,_l(o,u,w)}return xh(o,u,d,g,w)}function Td(o,u,d){var g=u.pendingProps,w=g.children,C=o!==null?o.memoizedState:null;if(g.mode==="hidden"){if((u.flags&128)!==0){if(g=C!==null?C.baseLanes|d:d,o!==null){for(w=u.child=o.child,C=0;w!==null;)C=C|w.lanes|w.childLanes,w=w.sibling;u.childLanes=C&~g}else u.childLanes=0,u.child=null;return zg(o,u,g,d)}if((d&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&Wu(u,C!==null?C.cachePool:null),C!==null?Kt(u,C):so(),fu(u);else return u.lanes=u.childLanes=536870912,zg(o,u,C!==null?C.baseLanes|d:d,d)}else C!==null?(Wu(u,C.cachePool),Kt(u,C),xr(),u.memoizedState=null):(o!==null&&Wu(u,null),so(),xr());return ki(o,u,w,d),u.child}function zg(o,u,d,g){var w=td();return w=w===null?null:{parent:Un._currentValue,pool:w},u.memoizedState={baseLanes:d,cachePool:w},o!==null&&Wu(u,null),so(),fu(u),o!==null&&Nc(o,u,g,!0),null}function wd(o,u){var d=u.ref;if(d===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(x(284));(o===null||o.ref!==d)&&(u.flags|=4194816)}}function xh(o,u,d,g,w){return lu(u),d=rh(o,u,d,g,void 0,w),g=co(),o!==null&&!xi?(ad(o,u,w),_l(o,u,w)):(Xt&&g&&jo(u),u.flags|=1,ki(o,u,d,w),u.child)}function Fg(o,u,d,g,w,C){return lu(u),u.updateQueue=null,d=ud(u,g,d,w),su(o),g=co(),o!==null&&!xi?(ad(o,u,C),_l(o,u,C)):(Xt&&g&&jo(u),u.flags|=1,ki(o,u,d,C),u.child)}function Qc(o,u,d,g,w){if(lu(u),u.stateNode===null){var C=Tl,U=d.contextType;typeof U=="object"&&U!==null&&(C=ri(U)),C=new d(g,C),u.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=ra,u.stateNode=C,C._reactInternals=u,C=u.stateNode,C.props=g,C.state=u.memoizedState,C.refs={},pn(u),U=d.contextType,C.context=typeof U=="object"&&U!==null?ri(U):Tl,C.state=u.memoizedState,U=d.getDerivedStateFromProps,typeof U=="function"&&(Pl(u,d,U,g),C.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(U=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),U!==C.state&&ra.enqueueReplaceState(C,C.state,null),vs(u,g,C,w),Ie(),C.state=u.memoizedState),typeof C.componentDidMount=="function"&&(u.flags|=4194308),g=!0}else if(o===null){C=u.stateNode;var H=u.memoizedProps,$=pu(d,H);C.props=$;var ve=C.context,Ee=d.contextType;U=Tl,typeof Ee=="object"&&Ee!==null&&(U=ri(Ee));var Ce=d.getDerivedStateFromProps;Ee=typeof Ce=="function"||typeof C.getSnapshotBeforeUpdate=="function",H=u.pendingProps!==H,Ee||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(H||ve!==U)&&$t(u,C,g,U),It=!1;var me=u.memoizedState;C.state=me,vs(u,g,C,w),Ie(),ve=u.memoizedState,H||me!==ve||It?(typeof Ce=="function"&&(Pl(u,d,Ce,g),ve=u.memoizedState),($=It||jg(u,d,$,g,me,ve,U))?(Ee||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(u.flags|=4194308)):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=g,u.memoizedState=ve),C.props=g,C.state=ve,C.context=U,g=$):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),g=!1)}else{C=u.stateNode,kl(o,u),U=u.memoizedProps,Ee=pu(d,U),C.props=Ee,Ce=u.pendingProps,me=C.context,ve=d.contextType,$=Tl,typeof ve=="object"&&ve!==null&&($=ri(ve)),H=d.getDerivedStateFromProps,(ve=typeof H=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(U!==Ce||me!==$)&&$t(u,C,g,$),It=!1,me=u.memoizedState,C.state=me,vs(u,g,C,w),Ie();var Se=u.memoizedState;U!==Ce||me!==Se||It||o!==null&&o.dependencies!==null&&Pc(o.dependencies)?(typeof H=="function"&&(Pl(u,d,H,g),Se=u.memoizedState),(Ee=It||jg(u,d,Ee,g,me,Se,$)||o!==null&&o.dependencies!==null&&Pc(o.dependencies))?(ve||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,Se,$),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,Se,$)),typeof C.componentDidUpdate=="function"&&(u.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof C.componentDidUpdate!="function"||U===o.memoizedProps&&me===o.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||U===o.memoizedProps&&me===o.memoizedState||(u.flags|=1024),u.memoizedProps=g,u.memoizedState=Se),C.props=g,C.state=Se,C.context=$,g=Ee):(typeof C.componentDidUpdate!="function"||U===o.memoizedProps&&me===o.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||U===o.memoizedProps&&me===o.memoizedState||(u.flags|=1024),g=!1)}return C=g,wd(o,u),g=(u.flags&128)!==0,C||g?(C=u.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:C.render(),u.flags|=1,o!==null&&g?(u.child=ia(u,o.child,null,w),u.child=ia(u,null,d,w)):ki(o,u,d,w),u.memoizedState=C.state,o=u.child):o=_l(o,u,w),o}function Xg(o,u,d,g){return ds(),u.flags|=256,ki(o,u,d,g),u.child}var Ei={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Os(o){return{baseLanes:o,cachePool:Sg()}}function Ke(o,u,d){return o=o!==null?o.childLanes&~d:0,u&&(o|=Cr),o}function Eh(o,u,d){var g=u.pendingProps,w=!1,C=(u.flags&128)!==0,U;if((U=C)||(U=o!==null&&o.memoizedState===null?!1:(li.current&2)!==0),U&&(w=!0,u.flags&=-129),U=(u.flags&32)!==0,u.flags&=-33,o===null){if(Xt){if(w?Gn(u):xr(),Xt){var H=En,$;if($=H){e:{for($=H,H=At;$.nodeType!==8;){if(!H){H=null;break e}if($=mo($.nextSibling),$===null){H=null;break e}}H=$}H!==null?(u.memoizedState={dehydrated:H,treeContext:ou!==null?{id:El,overflow:Tr}:null,retryLane:536870912,hydrationErrors:null},$=ii(18,null,null,0),$.stateNode=H,$.return=u,u.child=$,bn=u,En=null,$=!0):$=!1}$||bl(u)}if(H=u.memoizedState,H!==null&&(H=H.dehydrated,H!==null))return Js(H)?u.lanes=32:u.lanes=536870912,null;Go(u)}return H=g.children,g=g.fallback,w?(xr(),w=u.mode,H=Jc({mode:"hidden",children:H},w),g=Ku(g,w,d,null),H.return=u,g.return=u,H.sibling=g,u.child=H,w=u.child,w.memoizedState=Os(d),w.childLanes=Ke(o,U,d),u.memoizedState=Ei,g):(Gn(u),po(u,H))}if($=o.memoizedState,$!==null&&(H=$.dehydrated,H!==null)){if(C)u.flags&256?(Gn(u),u.flags&=-257,u=oa(o,u,d)):u.memoizedState!==null?(xr(),u.child=o.child,u.flags|=128,u=null):(xr(),w=g.fallback,H=u.mode,g=Jc({mode:"visible",children:g.children},H),w=Ku(w,H,d,null),w.flags|=2,g.return=u,w.return=u,g.sibling=w,u.child=g,ia(u,o.child,null,d),g=u.child,g.memoizedState=Os(d),g.childLanes=Ke(o,U,d),u.memoizedState=Ei,u=w);else if(Gn(u),Js(H)){if(U=H.nextSibling&&H.nextSibling.dataset,U)var ve=U.dgst;U=ve,g=Error(x(419)),g.stack="",g.digest=U,Rc({value:g,source:null,stack:null}),u=oa(o,u,d)}else if(xi||Nc(o,u,d,!1),U=(d&o.childLanes)!==0,xi||U){if(U=In,U!==null&&(g=d&-d,g=(g&42)!==0?1:Bf(g),g=(g&(U.suspendedLanes|d))!==0?0:g,g!==0&&g!==$.retryLane))throw $.retryLane=g,oo(o,g),Rn(U,o,g),Kg;H.data==="$?"||Gs(),u=oa(o,u,d)}else H.data==="$?"?(u.flags|=192,u.child=o.child,u=null):(o=$.treeContext,En=mo(H.nextSibling),bn=u,Xt=!0,Al=null,At=!1,o!==null&&(Pr[Sr++]=El,Pr[Sr++]=Tr,Pr[Sr++]=ou,El=o.id,Tr=o.overflow,ou=u),u=po(u,g.children),u.flags|=4096);return u}return w?(xr(),w=g.fallback,H=u.mode,$=o.child,ve=$.sibling,g=_n($,{mode:"hidden",children:g.children}),g.subtreeFlags=$.subtreeFlags&65011712,ve!==null?w=_n(ve,w):(w=Ku(w,H,d,null),w.flags|=2),w.return=u,g.return=u,g.sibling=w,u.child=g,g=w,w=u.child,H=o.child.memoizedState,H===null?H=Os(d):($=H.cachePool,$!==null?(ve=Un._currentValue,$=$.parent!==ve?{parent:ve,pool:ve}:$):$=Sg(),H={baseLanes:H.baseLanes|d,cachePool:$}),w.memoizedState=H,w.childLanes=Ke(o,U,d),u.memoizedState=Ei,g):(Gn(u),d=o.child,o=d.sibling,d=_n(d,{mode:"visible",children:g.children}),d.return=u,d.sibling=null,o!==null&&(U=u.deletions,U===null?(u.deletions=[o],u.flags|=16):U.push(o)),u.child=d,u.memoizedState=null,d)}function po(o,u){return u=Jc({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function Jc(o,u){return o=ii(22,o,null,u),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function oa(o,u,d){return ia(u,o.child,null,d),o=po(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function xd(o,u,d){o.lanes|=u;var g=o.alternate;g!==null&&(g.lanes|=u),eh(o.return,u,d)}function Zc(o,u,d,g,w){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:w}:(C.isBackwards=u,C.rendering=null,C.renderingStartTime=0,C.last=g,C.tail=d,C.tailMode=w)}function Ah(o,u,d){var g=u.pendingProps,w=g.revealOrder,C=g.tail;if(ki(o,u,g.children,d),g=li.current,(g&2)!==0)g=g&1|2,u.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&xd(o,d,u);else if(o.tag===19)xd(o,d,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}switch(qe(li,g),w){case"forwards":for(d=u.child,w=null;d!==null;)o=d.alternate,o!==null&&du(o)===null&&(w=d),d=d.sibling;d=w,d===null?(w=u.child,u.child=null):(w=d.sibling,d.sibling=null),Zc(u,!1,w,d,C);break;case"backwards":for(d=null,w=u.child,u.child=null;w!==null;){if(o=w.alternate,o!==null&&du(o)===null){u.child=w;break}o=w.sibling,w.sibling=d,d=w,w=o}Zc(u,!0,d,null,C);break;case"together":Zc(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function _l(o,u,d){if(o!==null&&(u.dependencies=o.dependencies),Yo|=u.lanes,(d&u.childLanes)===0)if(o!==null){if(Nc(o,u,d,!1),(d&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(x(153));if(u.child!==null){for(o=u.child,d=_n(o,o.pendingProps),u.child=d,d.return=u;o.sibling!==null;)o=o.sibling,d=d.sibling=_n(o,o.pendingProps),d.return=u;d.sibling=null}return u.child}function ho(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&Pc(o)))}function Yg(o,u,d){switch(u.tag){case 3:Tn(u,u.stateNode.containerInfo),Dl(u,Un,o.memoizedState.cache),ds();break;case 27:case 5:Ap(u);break;case 4:Tn(u,u.stateNode.containerInfo);break;case 10:Dl(u,u.type,u.memoizedProps.value);break;case 13:var g=u.memoizedState;if(g!==null)return g.dehydrated!==null?(Gn(u),u.flags|=128,null):(d&u.child.childLanes)!==0?Eh(o,u,d):(Gn(u),o=_l(o,u,d),o!==null?o.sibling:null);Gn(u);break;case 19:var w=(o.flags&128)!==0;if(g=(d&u.childLanes)!==0,g||(Nc(o,u,d,!1),g=(d&u.childLanes)!==0),w){if(g)return Ah(o,u,d);u.flags|=128}if(w=u.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),qe(li,li.current),g)break;return null;case 22:case 23:return u.lanes=0,Td(o,u,d);case 24:Dl(u,Un,o.memoizedState.cache)}return _l(o,u,d)}function Ch(o,u,d){if(o!==null)if(o.memoizedProps!==u.pendingProps)xi=!0;else{if(!ho(o,d)&&(u.flags&128)===0)return xi=!1,Yg(o,u,d);xi=(o.flags&131072)!==0}else xi=!1,Xt&&(u.flags&1048576)!==0&&gg(u,Jf,u.index);switch(u.lanes=0,u.tag){case 16:e:{o=u.pendingProps;var g=u.elementType,w=g._init;if(g=w(g._payload),u.type=g,typeof g=="function")Di(g)?(o=pu(g,o),u.tag=1,u=Qc(null,u,g,o,d)):(u.tag=0,u=xh(null,u,g,o,d));else{if(g!=null){if(w=g.$$typeof,w===ke){u.tag=11,u=qg(null,u,g,o,d);break e}else if(w===Gt){u.tag=14,u=Wc(null,u,g,o,d);break e}}throw u=Le(g)||g,Error(x(306,u,""))}}return u;case 0:return xh(o,u,u.type,u.pendingProps,d);case 1:return g=u.type,w=pu(g,u.pendingProps),Qc(o,u,g,w,d);case 3:e:{if(Tn(u,u.stateNode.containerInfo),o===null)throw Error(x(387));g=u.pendingProps;var C=u.memoizedState;w=C.element,kl(o,u),vs(u,g,null,d);var U=u.memoizedState;if(g=U.cache,Dl(u,Un,g),g!==C.cache&&$f(u,[Un],d,!0),Ie(),g=U.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:U.cache},u.updateQueue.baseState=C,u.memoizedState=C,u.flags&256){u=Xg(o,u,g,d);break e}else if(g!==w){w=ir(Error(x(424)),u),Rc(w),u=Xg(o,u,g,d);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(En=mo(o.firstChild),bn=u,Xt=!0,Al=null,At=!0,d=Sh(u,null,g,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(ds(),g===w){u=_l(o,u,d);break e}ki(o,u,g,d)}u=u.child}return u;case 26:return wd(o,u),o===null?(d=Sv(u.type,null,u.pendingProps,null))?u.memoizedState=d:Xt||(d=u.type,o=u.pendingProps,g=Ta(dt.current).createElement(d),g[Yn]=u,g[Ii]=o,tn(g,d,o),ti(g),u.stateNode=g):u.memoizedState=Sv(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return Ap(u),o===null&&Xt&&(g=u.stateNode=yv(u.type,u.pendingProps,dt.current),bn=u,At=!0,w=En,vo(u.type)?(vf=w,En=mo(g.firstChild)):En=w),ki(o,u,u.pendingProps.children,d),wd(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&Xt&&((w=g=En)&&(g=mu(g,u.type,u.pendingProps,At),g!==null?(u.stateNode=g,bn=u,En=mo(g.firstChild),At=!1,w=!0):w=!1),w||bl(u)),Ap(u),w=u.type,C=u.pendingProps,U=o!==null?o.memoizedProps:null,g=C.children,qh(w,C)?g=null:U!==null&&qh(w,U)&&(u.flags|=32),u.memoizedState!==null&&(w=rh(o,u,Yt,null,null,d),Ef._currentValue=w),wd(o,u),ki(o,u,g,d),u.child;case 6:return o===null&&Xt&&((o=d=En)&&(d=E0(d,u.pendingProps,At),d!==null?(u.stateNode=d,bn=u,En=null,o=!0):o=!1),o||bl(u)),null;case 13:return Eh(o,u,d);case 4:return Tn(u,u.stateNode.containerInfo),g=u.pendingProps,o===null?u.child=ia(u,null,g,d):ki(o,u,g,d),u.child;case 11:return qg(o,u,u.type,u.pendingProps,d);case 7:return ki(o,u,u.pendingProps,d),u.child;case 8:return ki(o,u,u.pendingProps.children,d),u.child;case 12:return ki(o,u,u.pendingProps.children,d),u.child;case 10:return g=u.pendingProps,Dl(u,u.type,g.value),ki(o,u,g.children,d),u.child;case 9:return w=u.type._context,g=u.pendingProps.children,lu(u),w=ri(w),g=g(w),u.flags|=1,ki(o,u,g,d),u.child;case 14:return Wc(o,u,u.type,u.pendingProps,d);case 15:return Gg(o,u,u.type,u.pendingProps,d);case 19:return Ah(o,u,d);case 31:return g=u.pendingProps,d=u.mode,g={mode:g.mode,children:g.children},o===null?(d=Jc(g,d),d.ref=u.ref,u.child=d,d.return=u,u=d):(d=_n(o.child,g),d.ref=u.ref,u.child=d,d.return=u,u=d),u;case 22:return Td(o,u,d);case 24:return lu(u),g=ri(Un),o===null?(w=td(),w===null&&(w=In,C=Lc(),w.pooledCache=C,C.refCount++,C!==null&&(w.pooledCacheLanes|=d),w=C),u.memoizedState={parent:g,cache:w},pn(u),Dl(u,Un,w)):((o.lanes&d)!==0&&(kl(o,u),vs(u,null,null,d),Ie()),w=o.memoizedState,C=u.memoizedState,w.parent!==g?(w={parent:g,cache:g},u.memoizedState=w,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=w),Dl(u,Un,g)):(g=C.cache,Dl(u,Un,g),g!==w.cache&&$f(u,[Un],d,!0))),ki(o,u,u.pendingProps.children,d),u.child;case 29:throw u.pendingProps}throw Error(x(156,u.tag))}function Ni(o){o.flags|=4}function Ed(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!Xh(u)){if(u=Ur.current,u!==null&&((Jt&4194048)===Jt?rr!==null:(Jt&62914560)!==Jt&&(Jt&536870912)===0||u!==rr))throw ys=nd,Tg;o.flags|=8192}}function $c(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?gc():536870912,o.lanes|=u,Us|=u)}function ks(o,u){if(!Xt)switch(o.tailMode){case"hidden":u=o.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function On(o){var u=o.alternate!==null&&o.alternate.child===o.child,d=0,g=0;if(u)for(var w=o.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags&65011712,g|=w.flags&65011712,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=g,o.childLanes=d,u}function a0(o,u,d){var g=u.pendingProps;switch(Gu(u),u.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return On(u),null;case 1:return On(u),null;case 3:return d=u.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),u.memoizedState.cache!==g&&(u.flags|=2048),Ol(Un),rl(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(fs(u)?Ni(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Zp())),On(u),null;case 26:return d=u.memoizedState,o===null?(Ni(u),d!==null?(On(u),Ed(u,d)):(On(u),u.flags&=-16777217)):d?d!==o.memoizedState?(Ni(u),On(u),Ed(u,d)):(On(u),u.flags&=-16777217):(o.memoizedProps!==g&&Ni(u),On(u),u.flags&=-16777217),null;case 27:_f(u),d=dt.current;var w=u.type;if(o!==null&&u.stateNode!=null)o.memoizedProps!==g&&Ni(u);else{if(!g){if(u.stateNode===null)throw Error(x(166));return On(u),null}o=G.current,fs(u)?Zf(u):(o=yv(w,g,d),u.stateNode=o,Ni(u))}return On(u),null;case 5:if(_f(u),d=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==g&&Ni(u);else{if(!g){if(u.stateNode===null)throw Error(x(166));return On(u),null}if(o=G.current,fs(u))Zf(u);else{switch(w=Ta(dt.current),o){case 1:o=w.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:o=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":o=w.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":o=w.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":o=w.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof g.is=="string"?w.createElement("select",{is:g.is}):w.createElement("select"),g.multiple?o.multiple=!0:g.size&&(o.size=g.size);break;default:o=typeof g.is=="string"?w.createElement(d,{is:g.is}):w.createElement(d)}}o[Yn]=u,o[Ii]=g;e:for(w=u.child;w!==null;){if(w.tag===5||w.tag===6)o.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===u)break e;for(;w.sibling===null;){if(w.return===null||w.return===u)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}u.stateNode=o;e:switch(tn(o,d,g),d){case"button":case"input":case"select":case"textarea":o=!!g.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ni(u)}}return On(u),u.flags&=-16777217,null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==g&&Ni(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(x(166));if(o=dt.current,fs(u)){if(o=u.stateNode,d=u.memoizedProps,g=null,w=bn,w!==null)switch(w.tag){case 27:case 5:g=w.memoizedProps}o[Yn]=u,o=!!(o.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||Vd(o.nodeValue,d)),o||bl(u)}else o=Ta(o).createTextNode(g),o[Yn]=u,u.stateNode=o}return On(u),null;case 13:if(g=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(w=fs(u),g!==null&&g.dehydrated!==null){if(o===null){if(!w)throw Error(x(318));if(w=u.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(x(317));w[Yn]=u}else ds(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;On(u),w=!1}else w=Zp(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=w),w=!0;if(!w)return u.flags&256?(Go(u),u):(Go(u),null)}if(Go(u),(u.flags&128)!==0)return u.lanes=d,u;if(d=g!==null,o=o!==null&&o.memoizedState!==null,d){g=u.child,w=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(w=g.alternate.memoizedState.cachePool.pool);var C=null;g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(C=g.memoizedState.cachePool.pool),C!==w&&(g.flags|=2048)}return d!==o&&d&&(u.child.flags|=8192),$c(u,u.updateQueue),On(u),null;case 4:return rl(),o===null&&hf(u.stateNode.containerInfo),On(u),null;case 10:return Ol(u.type),On(u),null;case 19:if($e(li),w=u.memoizedState,w===null)return On(u),null;if(g=(u.flags&128)!==0,C=w.rendering,C===null)if(g)ks(w,!1);else{if(Pe!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(C=du(o),C!==null){for(u.flags|=128,ks(w,!1),o=C.updateQueue,u.updateQueue=o,$c(u,o),u.subtreeFlags=0,o=d,d=u.child;d!==null;)Qf(d,o),d=d.sibling;return qe(li,li.current&1|2),u.child}o=o.sibling}w.tail!==null&&Zi()>Bs&&(u.flags|=128,g=!0,ks(w,!1),u.lanes=4194304)}else{if(!g)if(o=du(C),o!==null){if(u.flags|=128,g=!0,o=o.updateQueue,u.updateQueue=o,$c(u,o),ks(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!Xt)return On(u),null}else 2*Zi()-w.renderingStartTime>Bs&&d!==536870912&&(u.flags|=128,g=!0,ks(w,!1),u.lanes=4194304);w.isBackwards?(C.sibling=u.child,u.child=C):(o=w.last,o!==null?o.sibling=C:u.child=C,w.last=C)}return w.tail!==null?(u=w.tail,w.rendering=u,w.tail=u.sibling,w.renderingStartTime=Zi(),u.sibling=null,o=li.current,qe(li,g?o&1|2:o&1),u):(On(u),null);case 22:case 23:return Go(u),ld(),g=u.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(d&536870912)!==0&&(u.flags&128)===0&&(On(u),u.subtreeFlags&6&&(u.flags|=8192)):On(u),d=u.updateQueue,d!==null&&$c(u,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==d&&(u.flags|=2048),o!==null&&$e(uu),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),u.memoizedState.cache!==d&&(u.flags|=2048),Ol(Un),On(u),null;case 25:return null;case 30:return null}throw Error(x(156,u.tag))}function la(o,u){switch(Gu(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Ol(Un),rl(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return _f(u),null;case 13:if(Go(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(x(340));ds()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return $e(li),null;case 4:return rl(),null;case 10:return Ol(u.type),null;case 22:case 23:return Go(u),ld(),o!==null&&$e(uu),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Ol(Un),null;case 25:return null;default:return null}}function ua(o,u){switch(Gu(u),u.tag){case 3:Ol(Un),rl();break;case 26:case 27:case 5:_f(u);break;case 4:rl();break;case 13:Go(u);break;case 19:$e(li);break;case 10:Ol(u.type);break;case 22:case 23:Go(u),ld(),o!==null&&$e(uu);break;case 24:Ol(Un)}}function Er(o,u){try{var d=u.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var w=g.next;d=w;do{if((d.tag&o)===o){g=void 0;var C=d.create,U=d.inst;g=C(),U.destroy=g}d=d.next}while(d!==w)}}catch(H){yn(u,u.return,H)}}function zo(o,u,d){try{var g=u.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var C=w.next;g=C;do{if((g.tag&o)===o){var U=g.inst,H=U.destroy;if(H!==void 0){U.destroy=void 0,w=u;var $=d,ve=H;try{ve()}catch(Ee){yn(w,$,Ee)}}}g=g.next}while(g!==C)}}catch(Ee){yn(u,u.return,Ee)}}function Pi(o){var u=o.updateQueue;if(u!==null){var d=o.stateNode;try{Nt(u,d)}catch(g){yn(o,o.return,g)}}}function ht(o,u,d){d.props=pu(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(g){yn(o,u,g)}}function aa(o,u){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof d=="function"?o.refCleanup=d(g):d.current=g}}catch(w){yn(o,u,w)}}function kn(o,u){var d=o.ref,g=o.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(w){yn(o,u,w)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(w){yn(o,u,w)}else d.current=null}function Ne(o){var u=o.type,d=o.memoizedProps,g=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(w){yn(o,o.return,w)}}function hu(o,u,d){try{var g=o.stateNode;cv(g,o.type,d,u),g[Ii]=u}catch(w){yn(o,o.return,w)}}function He(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&vo(o.type)||o.tag===4}function Dt(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||He(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&vo(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ms(o,u,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,u?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,u):(u=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,u.appendChild(o),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=ma));else if(g!==4&&(g===27&&vo(o.type)&&(d=o.stateNode,u=null),o=o.child,o!==null))for(Ms(o,u,d),o=o.sibling;o!==null;)Ms(o,u,d),o=o.sibling}function Ad(o,u,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,u?d.insertBefore(o,u):d.appendChild(o);else if(g!==4&&(g===27&&vo(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Ad(o,u,d),o=o.sibling;o!==null;)Ad(o,u,d),o=o.sibling}function Wt(o){var u=o.stateNode,d=o.memoizedProps;try{for(var g=o.type,w=u.attributes;w.length;)u.removeAttributeNode(w[0]);tn(u,g,d),u[Yn]=o,u[Ii]=d}catch(C){yn(o,o.return,C)}}var yo=!1,zn=!1,bh=!1,Wg=typeof WeakSet=="function"?WeakSet:Set,hi=null;function Rs(o,u){if(o=o.containerInfo,Sa=Xd,o=Yp(o),Vu(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var w=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{d.nodeType,C.nodeType}catch{d=null;break e}var U=0,H=-1,$=-1,ve=0,Ee=0,Ce=o,me=null;t:for(;;){for(var Se;Ce!==d||w!==0&&Ce.nodeType!==3||(H=U+w),Ce!==C||g!==0&&Ce.nodeType!==3||($=U+g),Ce.nodeType===3&&(U+=Ce.nodeValue.length),(Se=Ce.firstChild)!==null;)me=Ce,Ce=Se;for(;;){if(Ce===o)break t;if(me===d&&++ve===w&&(H=U),me===C&&++Ee===g&&($=U),(Se=Ce.nextSibling)!==null)break;Ce=me,me=Ce.parentNode}Ce=Se}d=H===-1||$===-1?null:{start:H,end:$}}else d=null}d=d||{start:0,end:0}}else d=null;for(gf={focusedElem:o,selectionRange:d},Xd=!1,hi=u;hi!==null;)if(u=hi,o=u.child,(u.subtreeFlags&1024)!==0&&o!==null)o.return=u,hi=o;else for(;hi!==null;){switch(u=hi,C=u.alternate,o=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&C!==null){o=void 0,d=u,w=C.memoizedProps,C=C.memoizedState,g=d.stateNode;try{var wt=pu(d.type,w,d.elementType===d.type);o=g.getSnapshotBeforeUpdate(wt,C),g.__reactInternalSnapshotBeforeUpdate=o}catch(vt){yn(d,d.return,vt)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,d=o.nodeType,d===9)qd(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":qd(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(x(163))}if(o=u.sibling,o!==null){o.return=u.return,hi=o;break}hi=u.return}}function Cd(o,u,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:ur(o,d),g&4&&Er(5,d);break;case 1:if(ur(o,d),g&4)if(o=d.stateNode,u===null)try{o.componentDidMount()}catch(U){yn(d,d.return,U)}else{var w=pu(d.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(w,u,o.__reactInternalSnapshotBeforeUpdate)}catch(U){yn(d,d.return,U)}}g&64&&Pi(d),g&512&&aa(d,d.return);break;case 3:if(ur(o,d),g&64&&(o=d.updateQueue,o!==null)){if(u=null,d.child!==null)switch(d.child.tag){case 27:case 5:u=d.child.stateNode;break;case 1:u=d.child.stateNode}try{Nt(o,u)}catch(U){yn(d,d.return,U)}}break;case 27:u===null&&g&4&&Wt(d);case 26:case 5:ur(o,d),u===null&&g&4&&Ne(d),g&512&&aa(d,d.return);break;case 12:ur(o,d);break;case 13:ur(o,d),g&4&&Zg(o,d),g&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=ff.bind(null,d),Gd(o,d))));break;case 22:if(g=d.memoizedState!==null||yo,!g){u=u!==null&&u.memoizedState!==null||zn,w=yo;var C=zn;yo=g,(zn=u)&&!C?Ar(o,d,(d.subtreeFlags&8772)!==0):ur(o,d),yo=w,zn=C}break;case 30:break;default:ur(o,d)}}function Qg(o){var u=o.alternate;u!==null&&(o.alternate=null,Qg(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&Ti(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Mn=null,Li=!1;function Ul(o,u,d){for(d=d.child;d!==null;)Jg(o,u,d),d=d.sibling}function Jg(o,u,d){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Fl,d)}catch{}switch(d.tag){case 26:zn||kn(d,u),Ul(o,u,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:zn||kn(d,u);var g=Mn,w=Li;vo(d.type)&&(Mn=d.stateNode,Li=!1),Ul(o,u,d),xa(d.stateNode),Mn=g,Li=w;break;case 5:zn||kn(d,u);case 6:if(g=Mn,w=Li,Mn=null,Ul(o,u,d),Mn=g,Li=w,Mn!==null)if(Li)try{(Mn.nodeType===9?Mn.body:Mn.nodeName==="HTML"?Mn.ownerDocument.body:Mn).removeChild(d.stateNode)}catch(C){yn(d,u,C)}else try{Mn.removeChild(d.stateNode)}catch(C){yn(d,u,C)}break;case 18:Mn!==null&&(Li?(o=Mn,wa(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),nc(o)):wa(Mn,d.stateNode));break;case 4:g=Mn,w=Li,Mn=d.stateNode.containerInfo,Li=!0,Ul(o,u,d),Mn=g,Li=w;break;case 0:case 11:case 14:case 15:zn||zo(2,d,u),zn||zo(4,d,u),Ul(o,u,d);break;case 1:zn||(kn(d,u),g=d.stateNode,typeof g.componentWillUnmount=="function"&&ht(d,u,g)),Ul(o,u,d);break;case 21:Ul(o,u,d);break;case 22:zn=(g=zn)||d.memoizedState!==null,Ul(o,u,d),zn=g;break;default:Ul(o,u,d)}}function Zg(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{nc(o)}catch(d){yn(u,u.return,d)}}function s0(o){switch(o.tag){case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new Wg),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new Wg),u;default:throw Error(x(435,o.tag))}}function Ns(o,u){var d=s0(o);u.forEach(function(g){var w=ov.bind(null,o,g);d.has(g)||(d.add(g),g.then(w,w))})}function or(o,u){var d=u.deletions;if(d!==null)for(var g=0;g<d.length;g++){var w=d[g],C=o,U=u,H=U;e:for(;H!==null;){switch(H.tag){case 27:if(vo(H.type)){Mn=H.stateNode,Li=!1;break e}break;case 5:Mn=H.stateNode,Li=!1;break e;case 3:case 4:Mn=H.stateNode.containerInfo,Li=!0;break e}H=H.return}if(Mn===null)throw Error(x(160));Jg(C,U,w),Mn=null,Li=!1,C=w.alternate,C!==null&&(C.return=null),w.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)yu(u,o),u=u.sibling}var lr=null;function yu(o,u){var d=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:or(u,o),Ai(o),g&4&&(zo(3,o,o.return),Er(3,o),zo(5,o,o.return));break;case 1:or(u,o),Ai(o),g&512&&(zn||d===null||kn(d,d.return)),g&64&&yo&&(o=o.updateQueue,o!==null&&(g=o.callbacks,g!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var w=lr;if(or(u,o),Ai(o),g&512&&(zn||d===null||kn(d,d.return)),g&4){var C=d!==null?d.memoizedState:null;if(g=o.memoizedState,d===null)if(g===null)if(o.stateNode===null){e:{g=o.type,d=o.memoizedProps,w=w.ownerDocument||w;t:switch(g){case"title":C=w.getElementsByTagName("title")[0],(!C||C[Ga]||C[Yn]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=w.createElement(g),w.head.insertBefore(C,w.querySelector("head > title"))),tn(C,g,d),C[Yn]=o,ti(C),g=C;break e;case"link":var U=wv("link","href",w).get(g+(d.href||""));if(U){for(var H=0;H<U.length;H++)if(C=U[H],C.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&C.getAttribute("rel")===(d.rel==null?null:d.rel)&&C.getAttribute("title")===(d.title==null?null:d.title)&&C.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){U.splice(H,1);break t}}C=w.createElement(g),tn(C,g,d),w.head.appendChild(C);break;case"meta":if(U=wv("meta","content",w).get(g+(d.content||""))){for(H=0;H<U.length;H++)if(C=U[H],C.getAttribute("content")===(d.content==null?null:""+d.content)&&C.getAttribute("name")===(d.name==null?null:d.name)&&C.getAttribute("property")===(d.property==null?null:d.property)&&C.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&C.getAttribute("charset")===(d.charSet==null?null:d.charSet)){U.splice(H,1);break t}}C=w.createElement(g),tn(C,g,d),w.head.appendChild(C);break;default:throw Error(x(468,g))}C[Yn]=o,ti(C),g=C}o.stateNode=g}else ui(w,o.type,o.stateNode);else o.stateNode=Tv(w,g,o.memoizedProps);else C!==g?(C===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):C.count--,g===null?ui(w,o.type,o.stateNode):Tv(w,g,o.memoizedProps)):g===null&&o.stateNode!==null&&hu(o,o.memoizedProps,d.memoizedProps)}break;case 27:or(u,o),Ai(o),g&512&&(zn||d===null||kn(d,d.return)),d!==null&&g&4&&hu(o,o.memoizedProps,d.memoizedProps);break;case 5:if(or(u,o),Ai(o),g&512&&(zn||d===null||kn(d,d.return)),o.flags&32){w=o.stateNode;try{to(w,"")}catch(Se){yn(o,o.return,Se)}}g&4&&o.stateNode!=null&&(w=o.memoizedProps,hu(o,w,d!==null?d.memoizedProps:w)),g&1024&&(bh=!0);break;case 6:if(or(u,o),Ai(o),g&4){if(o.stateNode===null)throw Error(x(162));g=o.memoizedProps,d=o.stateNode;try{d.nodeValue=g}catch(Se){yn(o,o.return,Se)}}break;case 3:if(Tf=null,w=lr,lr=Su(u.containerInfo),or(u,o),lr=w,Ai(o),g&4&&d!==null&&d.memoizedState.isDehydrated)try{nc(u.containerInfo)}catch(Se){yn(o,o.return,Se)}bh&&(bh=!1,bd(o));break;case 4:g=lr,lr=Su(o.stateNode.containerInfo),or(u,o),Ai(o),lr=g;break;case 12:or(u,o),Ai(o);break;case 13:or(u,o),Ai(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Dd=Zi()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Ns(o,g)));break;case 22:w=o.memoizedState!==null;var $=d!==null&&d.memoizedState!==null,ve=yo,Ee=zn;if(yo=ve||w,zn=Ee||$,or(u,o),zn=Ee,yo=ve,Ai(o),g&8192)e:for(u=o.stateNode,u._visibility=w?u._visibility&-2:u._visibility|1,w&&(d===null||$||yo||zn||sa(o)),d=null,u=o;;){if(u.tag===5||u.tag===26){if(d===null){$=d=u;try{if(C=$.stateNode,w)U=C.style,typeof U.setProperty=="function"?U.setProperty("display","none","important"):U.display="none";else{H=$.stateNode;var Ce=$.memoizedProps.style,me=Ce!=null&&Ce.hasOwnProperty("display")?Ce.display:null;H.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Se){yn($,$.return,Se)}}}else if(u.tag===6){if(d===null){$=u;try{$.stateNode.nodeValue=w?"":$.memoizedProps}catch(Se){yn($,$.return,Se)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}g&4&&(g=o.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Ns(o,d))));break;case 19:or(u,o),Ai(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Ns(o,g)));break;case 30:break;case 21:break;default:or(u,o),Ai(o)}}function Ai(o){var u=o.flags;if(u&2){try{for(var d,g=o.return;g!==null;){if(He(g)){d=g;break}g=g.return}if(d==null)throw Error(x(160));switch(d.tag){case 27:var w=d.stateNode,C=Dt(o);Ad(o,C,w);break;case 5:var U=d.stateNode;d.flags&32&&(to(U,""),d.flags&=-33);var H=Dt(o);Ad(o,H,U);break;case 3:case 4:var $=d.stateNode.containerInfo,ve=Dt(o);Ms(o,ve,$);break;default:throw Error(x(161))}}catch(Ee){yn(o,o.return,Ee)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function bd(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;bd(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function ur(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Cd(o,u.alternate,u),u=u.sibling}function sa(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:zo(4,u,u.return),sa(u);break;case 1:kn(u,u.return);var d=u.stateNode;typeof d.componentWillUnmount=="function"&&ht(u,u.return,d),sa(u);break;case 27:xa(u.stateNode);case 26:case 5:kn(u,u.return),sa(u);break;case 22:u.memoizedState===null&&sa(u);break;case 30:sa(u);break;default:sa(u)}o=o.sibling}}function Ar(o,u,d){for(d=d&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var g=u.alternate,w=o,C=u,U=C.flags;switch(C.tag){case 0:case 11:case 15:Ar(w,C,d),Er(4,C);break;case 1:if(Ar(w,C,d),g=C,w=g.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(ve){yn(g,g.return,ve)}if(g=C,w=g.updateQueue,w!==null){var H=g.stateNode;try{var $=w.shared.hiddenCallbacks;if($!==null)for(w.shared.hiddenCallbacks=null,w=0;w<$.length;w++)Uc($[w],H)}catch(ve){yn(g,g.return,ve)}}d&&U&64&&Pi(C),aa(C,C.return);break;case 27:Wt(C);case 26:case 5:Ar(w,C,d),d&&g===null&&U&4&&Ne(C),aa(C,C.return);break;case 12:Ar(w,C,d);break;case 13:Ar(w,C,d),d&&U&4&&Zg(w,C);break;case 22:C.memoizedState===null&&Ar(w,C,d),aa(C,C.return);break;case 30:break;default:Ar(w,C,d)}u=u.sibling}}function Ih(o,u){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&Fu(d))}function Ps(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Fu(o))}function Fo(o,u,d,g){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)$g(o,u,d,g),u=u.sibling}function $g(o,u,d,g){var w=u.flags;switch(u.tag){case 0:case 11:case 15:Fo(o,u,d,g),w&2048&&Er(9,u);break;case 1:Fo(o,u,d,g);break;case 3:Fo(o,u,d,g),w&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Fu(o)));break;case 12:if(w&2048){Fo(o,u,d,g),o=u.stateNode;try{var C=u.memoizedProps,U=C.id,H=C.onPostCommit;typeof H=="function"&&H(U,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch($){yn(u,u.return,$)}}else Fo(o,u,d,g);break;case 13:Fo(o,u,d,g);break;case 23:break;case 22:C=u.stateNode,U=u.alternate,u.memoizedState!==null?C._visibility&2?Fo(o,u,d,g):ef(o,u):C._visibility&2?Fo(o,u,d,g):(C._visibility|=2,ca(o,u,d,g,(u.subtreeFlags&10256)!==0)),w&2048&&Ih(U,u);break;case 24:Fo(o,u,d,g),w&2048&&Ps(u.alternate,u);break;default:Fo(o,u,d,g)}}function ca(o,u,d,g,w){for(w=w&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var C=o,U=u,H=d,$=g,ve=U.flags;switch(U.tag){case 0:case 11:case 15:ca(C,U,H,$,w),Er(8,U);break;case 23:break;case 22:var Ee=U.stateNode;U.memoizedState!==null?Ee._visibility&2?ca(C,U,H,$,w):ef(C,U):(Ee._visibility|=2,ca(C,U,H,$,w)),w&&ve&2048&&Ih(U.alternate,U);break;case 24:ca(C,U,H,$,w),w&&ve&2048&&Ps(U.alternate,U);break;default:ca(C,U,H,$,w)}u=u.sibling}}function ef(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var d=o,g=u,w=g.flags;switch(g.tag){case 22:ef(d,g),w&2048&&Ih(g.alternate,g);break;case 24:ef(d,g),w&2048&&Ps(g.alternate,g);break;default:ef(d,g)}u=u.sibling}}var tf=8192;function Ls(o){if(o.subtreeFlags&tf)for(o=o.child;o!==null;)Id(o),o=o.sibling}function Id(o){switch(o.tag){case 26:Ls(o),o.flags&tf&&o.memoizedState!==null&&wf(lr,o.memoizedState,o.memoizedProps);break;case 5:Ls(o);break;case 3:case 4:var u=lr;lr=Su(o.stateNode.containerInfo),Ls(o),lr=u;break;case 22:o.memoizedState===null&&(u=o.alternate,u!==null&&u.memoizedState!==null?(u=tf,tf=16777216,Ls(o),tf=u):Ls(o));break;default:Ls(o)}}function nf(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function Xo(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];hi=g,jn(g,o)}nf(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)fa(o),o=o.sibling}function fa(o){switch(o.tag){case 0:case 11:case 15:Xo(o),o.flags&2048&&zo(9,o,o.return);break;case 3:Xo(o);break;case 12:Xo(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,jr(o)):Xo(o);break;default:Xo(o)}}function jr(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];hi=g,jn(g,o)}nf(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:zo(8,u,u.return),jr(u);break;case 22:d=u.stateNode,d._visibility&2&&(d._visibility&=-3,jr(u));break;default:jr(u)}o=o.sibling}}function jn(o,u){for(;hi!==null;){var d=hi;switch(d.tag){case 0:case 11:case 15:zo(8,d,u);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:Fu(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,hi=g;else e:for(d=o;hi!==null;){g=hi;var w=g.sibling,C=g.return;if(Qg(g),g===d){hi=null;break e}if(w!==null){w.return=C,hi=w;break e}hi=C}}}var rf={getCacheForType:function(o){var u=ri(Un),d=u.data.get(o);return d===void 0&&(d=o(),u.data.set(o,d)),d}},Dh=typeof WeakMap=="function"?WeakMap:Map,an=0,In=null,qt=null,Jt=0,sn=0,ar=null,gu=!1,_s=!1,of=!1,jl=0,Pe=0,Yo=0,go=0,Oh=0,Cr=0,Us=0,js=null,yi=null,kh=!1,Dd=0,Bs=1/0,lf=null,Bl=null,Ci=0,Vl=null,da=null,pa=0,Od=0,kd=null,Mh=null,Vs=0,Ct=null;function Bn(){if((an&2)!==0&&Jt!==0)return Jt&-Jt;if(Te.T!==null){var o=Xu;return o!==0?o:jh()}return og()}function uf(){Cr===0&&(Cr=(Jt&536870912)===0||Xt?yc():536870912);var o=Ur.current;return o!==null&&(o.flags|=32),Cr}function Rn(o,u,d){(o===In&&(sn===2||sn===9)||o.cancelPendingCommit!==null)&&(qs(o,0),Wo(o,Jt,Cr,!1)),Jr(o,d),((an&2)===0||o!==In)&&(o===In&&((an&2)===0&&(go|=d),Pe===4&&Wo(o,Jt,Cr,!1)),Jo(o))}function on(o,u,d){if((an&6)!==0)throw Error(x(327));var g=!d&&(u&124)===0&&(u&o.expiredLanes)===0||hc(o,u),w=g?c0(o,u):ha(o,u,!0),C=g;do{if(w===0){_s&&!g&&Wo(o,u,0,!1);break}else{if(d=o.current.alternate,C&&!Rh(d)){w=ha(o,u,!1),C=!1;continue}if(w===2){if(C=u,o.errorRecoveryDisabledLanes&C)var U=0;else U=o.pendingLanes&-536870913,U=U!==0?U:U&536870912?536870912:0;if(U!==0){u=U;e:{var H=o;w=js;var $=H.current.memoizedState.isDehydrated;if($&&(qs(H,U).flags|=256),U=ha(H,U,!1),U!==2){if(of&&!$){H.errorRecoveryDisabledLanes|=C,go|=C,w=4;break e}C=yi,yi=w,C!==null&&(yi===null?yi=C:yi.push.apply(yi,C))}w=U}if(C=!1,w!==2)continue}}if(w===1){qs(o,0),Wo(o,u,0,!0);break}e:{switch(g=o,C=w,C){case 0:case 1:throw Error(x(345));case 4:if((u&4194048)!==u)break;case 6:Wo(g,u,Cr,!gu);break e;case 2:yi=null;break;case 3:case 5:break;default:throw Error(x(329))}if((u&62914560)===u&&(w=Dd+300-Zi(),10<w)){if(Wo(g,u,Cr,!gu),pc(g,0,!0)!==0)break e;g.timeoutHandle=dv(Hs.bind(null,g,d,yi,lf,kh,u,Cr,go,Us,gu,C,2,-0,0),w);break e}Hs(g,d,yi,lf,kh,u,Cr,go,Us,gu,C,0,-0,0)}}break}while(!0);Jo(o)}function Hs(o,u,d,g,w,C,U,H,$,ve,Ee,Ce,me,Se){if(o.timeoutHandle=-1,Ce=u.subtreeFlags,(Ce&8192||(Ce&16785408)===16785408)&&(Vn={stylesheets:null,count:0,unsuspend:gi},Id(u),Ce=D0(),Ce!==null)){o.cancelPendingCommit=Ce(Rd.bind(null,o,u,C,d,g,w,U,H,$,Ee,1,me,Se)),Wo(o,C,U,!ve);return}Rd(o,u,C,d,g,w,U,H,$)}function Rh(o){for(var u=o;;){var d=u.tag;if((d===0||d===11||d===15)&&u.flags&16384&&(d=u.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var w=d[g],C=w.getSnapshot;w=w.value;try{if(!nr(C(),w))return!1}catch{return!1}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Wo(o,u,d,g){u&=~Oh,u&=~go,o.suspendedLanes|=u,o.pingedLanes&=~u,g&&(o.warmLanes|=u),g=o.expirationTimes;for(var w=u;0<w;){var C=31-hr(w),U=1<<C;g[C]=-1,w&=~U}d!==0&&qa(o,d,u)}function af(){return(an&6)===0?(Zo(0),!1):!0}function Ks(){if(qt!==null){if(sn===0)var o=qt.return;else o=qt,Il=Bo=null,Pt(o),Is=null,Ds=0,o=qt;for(;o!==null;)ua(o.alternate,o),o=o.return;qt=null}}function qs(o,u){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,T0(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),Ks(),In=o,qt=d=_n(o.current,null),Jt=u,sn=0,ar=null,gu=!1,_s=hc(o,u),of=!1,Us=Cr=Oh=go=Yo=Pe=0,yi=js=null,kh=!1,(u&8)!==0&&(u|=u&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=u;0<g;){var w=31-hr(g),C=1<<w;u|=o[w],g&=~C}return jl=u,Oc(),d}function ev(o,u){Lt=null,Te.H=Gc,u===au||u===Qt?(u=nh(),sn=3):u===Tg?(u=nh(),sn=4):sn=u===Kg?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,ar=u,qt===null&&(Pe=1,Yc(o,ir(u,o.current)))}function Nh(){var o=Te.H;return Te.H=Gc,o===null?Gc:o}function tv(){var o=Te.A;return Te.A=rf,o}function Gs(){Pe=4,gu||(Jt&4194048)!==Jt&&Ur.current!==null||(_s=!0),(Yo&134217727)===0&&(go&134217727)===0||In===null||Wo(In,Jt,Cr,!1)}function ha(o,u,d){var g=an;an|=2;var w=Nh(),C=tv();(In!==o||Jt!==u)&&(lf=null,qs(o,u)),u=!1;var U=Pe;e:do try{if(sn!==0&&qt!==null){var H=qt,$=ar;switch(sn){case 8:Ks(),U=6;break e;case 3:case 2:case 9:case 6:Ur.current===null&&(u=!0);var ve=sn;if(sn=0,ar=null,ya(o,H,$,ve),d&&_s){U=0;break e}break;default:ve=sn,sn=0,ar=null,ya(o,H,$,ve)}}Ph(),U=Pe;break}catch(Ee){ev(o,Ee)}while(!0);return u&&o.shellSuspendCounter++,Il=Bo=null,an=g,Te.H=w,Te.A=C,qt===null&&(In=null,Jt=0,Oc()),U}function Ph(){for(;qt!==null;)nv(qt)}function c0(o,u){var d=an;an|=2;var g=Nh(),w=tv();In!==o||Jt!==u?(lf=null,Bs=Zi()+500,qs(o,u)):_s=hc(o,u);e:do try{if(sn!==0&&qt!==null){u=qt;var C=ar;t:switch(sn){case 1:sn=0,ar=null,ya(o,u,C,1);break;case 2:case 9:if(id(C)){sn=0,ar=null,zs(u);break}u=function(){sn!==2&&sn!==9||In!==o||(sn=7),Jo(o)},C.then(u,u);break e;case 3:sn=7;break e;case 4:sn=5;break e;case 7:id(C)?(sn=0,ar=null,zs(u)):(sn=0,ar=null,ya(o,u,C,7));break;case 5:var U=null;switch(qt.tag){case 26:U=qt.memoizedState;case 5:case 27:var H=qt;if(!U||Xh(U)){sn=0,ar=null;var $=H.sibling;if($!==null)qt=$;else{var ve=H.return;ve!==null?(qt=ve,sf(ve)):qt=null}break t}}sn=0,ar=null,ya(o,u,C,5);break;case 6:sn=0,ar=null,ya(o,u,C,6);break;case 8:Ks(),Pe=6;break e;default:throw Error(x(462))}}Md();break}catch(Ee){ev(o,Ee)}while(!0);return Il=Bo=null,Te.H=g,Te.A=w,an=d,qt!==null?0:(In=null,Jt=0,Oc(),Pe)}function Md(){for(;qt!==null&&!Ha();)nv(qt)}function nv(o){var u=Ch(o.alternate,o,jl);o.memoizedProps=o.pendingProps,u===null?sf(o):qt=u}function zs(o){var u=o,d=u.alternate;switch(u.tag){case 15:case 0:u=Fg(d,u,u.pendingProps,u.type,void 0,Jt);break;case 11:u=Fg(d,u,u.pendingProps,u.type.render,u.ref,Jt);break;case 5:Pt(u);default:ua(d,u),u=qt=Qf(u,jl),u=Ch(d,u,jl)}o.memoizedProps=o.pendingProps,u===null?sf(o):qt=u}function ya(o,u,d,g){Il=Bo=null,Pt(u),Is=null,Ds=0;var w=u.return;try{if(u0(o,w,u,d,Jt)){Pe=1,Yc(o,ir(d,o.current)),qt=null;return}}catch(C){if(w!==null)throw qt=w,C;Pe=1,Yc(o,ir(d,o.current)),qt=null;return}u.flags&32768?(Xt||g===1?o=!0:_s||(Jt&536870912)!==0?o=!1:(gu=o=!0,(g===2||g===9||g===3||g===6)&&(g=Ur.current,g!==null&&g.tag===13&&(g.flags|=16384))),Br(u,o)):sf(u)}function sf(o){var u=o;do{if((u.flags&32768)!==0){Br(u,gu);return}o=u.return;var d=a0(u.alternate,u,jl);if(d!==null){qt=d;return}if(u=u.sibling,u!==null){qt=u;return}qt=u=o}while(u!==null);Pe===0&&(Pe=5)}function Br(o,u){do{var d=la(o.alternate,o);if(d!==null){d.flags&=32767,qt=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!u&&(o=o.sibling,o!==null)){qt=o;return}qt=o=d}while(o!==null);Pe=6,qt=null}function Rd(o,u,d,g,w,C,U,H,$){o.cancelPendingCommit=null;do cf();while(Ci!==0);if((an&6)!==0)throw Error(x(327));if(u!==null){if(u===o.current)throw Error(x(177));if(C=u.lanes|u.childLanes,C|=Dc,Ka(o,d,C,U,H,$),o===In&&(qt=In=null,Jt=0),da=u,Vl=o,pa=d,Od=C,kd=w,Mh=g,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,d0(ko,function(){return Pd(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||g){g=Te.T,Te.T=null,w=_e.p,_e.p=2,U=an,an|=4;try{Rs(o,u,d)}finally{an=U,_e.p=w,Te.T=g}}Ci=1,Lh(),iv(),Fs()}}function Lh(){if(Ci===1){Ci=0;var o=Vl,u=da,d=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||d){d=Te.T,Te.T=null;var g=_e.p;_e.p=2;var w=an;an|=4;try{yu(u,o);var C=gf,U=Yp(o.containerInfo),H=C.focusedElem,$=C.selectionRange;if(U!==H&&H&&H.ownerDocument&&pg(H.ownerDocument.documentElement,H)){if($!==null&&Vu(H)){var ve=$.start,Ee=$.end;if(Ee===void 0&&(Ee=ve),"selectionStart"in H)H.selectionStart=ve,H.selectionEnd=Math.min(Ee,H.value.length);else{var Ce=H.ownerDocument||document,me=Ce&&Ce.defaultView||window;if(me.getSelection){var Se=me.getSelection(),wt=H.textContent.length,vt=Math.min($.start,wt),vn=$.end===void 0?vt:Math.min($.end,wt);!Se.extend&&vt>vn&&(U=vn,vn=vt,vt=U);var fe=Xp(H,vt),le=Xp(H,vn);if(fe&&le&&(Se.rangeCount!==1||Se.anchorNode!==fe.node||Se.anchorOffset!==fe.offset||Se.focusNode!==le.node||Se.focusOffset!==le.offset)){var ge=Ce.createRange();ge.setStart(fe.node,fe.offset),Se.removeAllRanges(),vt>vn?(Se.addRange(ge),Se.extend(le.node,le.offset)):(ge.setEnd(le.node,le.offset),Se.addRange(ge))}}}}for(Ce=[],Se=H;Se=Se.parentNode;)Se.nodeType===1&&Ce.push({element:Se,left:Se.scrollLeft,top:Se.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<Ce.length;H++){var Ae=Ce[H];Ae.element.scrollLeft=Ae.left,Ae.element.scrollTop=Ae.top}}Xd=!!Sa,gf=Sa=null}finally{an=w,_e.p=g,Te.T=d}}o.current=u,Ci=2}}function iv(){if(Ci===2){Ci=0;var o=Vl,u=da,d=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||d){d=Te.T,Te.T=null;var g=_e.p;_e.p=2;var w=an;an|=4;try{Cd(o,u.alternate,u)}finally{an=w,_e.p=g,Te.T=d}}Ci=3}}function Fs(){if(Ci===4||Ci===3){Ci=0,Uf();var o=Vl,u=da,d=pa,g=Mh;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Ci=5:(Ci=0,da=Vl=null,Nd(o,o.pendingLanes));var w=o.pendingLanes;if(w===0&&(Bl=null),Dp(d),u=u.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Fl,u,void 0,(u.current.flags&128)===128)}catch{}if(g!==null){u=Te.T,w=_e.p,_e.p=2,Te.T=null;try{for(var C=o.onRecoverableError,U=0;U<g.length;U++){var H=g[U];C(H.value,{componentStack:H.stack})}}finally{Te.T=u,_e.p=w}}(pa&3)!==0&&cf(),Jo(o),w=o.pendingLanes,(d&4194090)!==0&&(w&42)!==0?o===Ct?Vs++:(Vs=0,Ct=o):Vs=0,Zo(0)}}function Nd(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,Fu(u)))}function cf(o){return Lh(),iv(),Fs(),Pd()}function Pd(){if(Ci!==5)return!1;var o=Vl,u=Od;Od=0;var d=Dp(pa),g=Te.T,w=_e.p;try{_e.p=32>d?32:d,Te.T=null,d=kd,kd=null;var C=Vl,U=pa;if(Ci=0,da=Vl=null,pa=0,(an&6)!==0)throw Error(x(331));var H=an;if(an|=4,fa(C.current),$g(C,C.current,U,d),an=H,Zo(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Fl,C)}catch{}return!0}finally{_e.p=w,Te.T=g,Nd(o,u)}}function rv(o,u,d){u=ir(d,u),u=wh(o.stateNode,u,2),o=wr(o,u,2),o!==null&&(Jr(o,2),Jo(o))}function yn(o,u,d){if(o.tag===3)rv(o,o,d);else for(;u!==null;){if(u.tag===3){rv(u,o,d);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Bl===null||!Bl.has(g))){o=ir(d,o),d=Vg(2),g=wr(u,d,2),g!==null&&(Hg(d,g,u,o),Jr(g,2),Jo(g));break}}u=u.return}}function _h(o,u,d){var g=o.pingCache;if(g===null){g=o.pingCache=new Dh;var w=new Set;g.set(u,w)}else w=g.get(u),w===void 0&&(w=new Set,g.set(u,w));w.has(d)||(of=!0,w.add(d),o=f0.bind(null,o,u,d),u.then(o,o))}function f0(o,u,d){var g=o.pingCache;g!==null&&g.delete(u),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,In===o&&(Jt&d)===d&&(Pe===4||Pe===3&&(Jt&62914560)===Jt&&300>Zi()-Dd?(an&2)===0&&qs(o,0):Oh|=d,Us===Jt&&(Us=0)),Jo(o)}function Ld(o,u){u===0&&(u=gc()),o=oo(o,u),o!==null&&(Jr(o,u),Jo(o))}function ff(o){var u=o.memoizedState,d=0;u!==null&&(d=u.retryLane),Ld(o,d)}function ov(o,u){var d=0;switch(o.tag){case 13:var g=o.stateNode,w=o.memoizedState;w!==null&&(d=w.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(x(314))}g!==null&&g.delete(u),Ld(o,d)}function d0(o,u){return Cp(o,u)}var _d=null,Xs=null,Uh=!1,Ys=!1,Ud=!1,Qo=0;function Jo(o){o!==Xs&&o.next===null&&(Xs===null?_d=Xs=o:Xs=Xs.next=o),Ys=!0,Uh||(Uh=!0,h0())}function Zo(o,u){if(!Ud&&Ys){Ud=!0;do for(var d=!1,g=_d;g!==null;){if(o!==0){var w=g.pendingLanes;if(w===0)var C=0;else{var U=g.suspendedLanes,H=g.pingedLanes;C=(1<<31-hr(42|o)+1)-1,C&=w&~(U&~H),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(d=!0,jd(g,C))}else C=Jt,C=pc(g,g===In?C:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(C&3)===0||hc(g,C)||(d=!0,jd(g,C));g=g.next}while(d);Ud=!1}}function p0(){df()}function df(){Ys=Uh=!1;var o=0;Qo!==0&&(S0()&&(o=Qo),Qo=0);for(var u=Zi(),d=null,g=_d;g!==null;){var w=g.next,C=lv(g,u);C===0?(g.next=null,d===null?_d=w:d.next=w,w===null&&(Xs=d)):(d=g,(o!==0||(C&3)!==0)&&(Ys=!0)),g=w}Zo(o)}function lv(o,u){for(var d=o.suspendedLanes,g=o.pingedLanes,w=o.expirationTimes,C=o.pendingLanes&-62914561;0<C;){var U=31-hr(C),H=1<<U,$=w[U];$===-1?((H&d)===0||(H&g)!==0)&&(w[U]=fn(H,u)):$<=u&&(o.expiredLanes|=H),C&=~H}if(u=In,d=Jt,d=pc(o,o===u?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,d===0||o===u&&(sn===2||sn===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&bp(g),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||hc(o,d)){if(u=d&-d,u===o.callbackPriority)return u;switch(g!==null&&bp(g),Dp(d)){case 2:case 8:d=Et;break;case 32:d=ko;break;case 268435456:d=Zm;break;default:d=ko}return g=pf.bind(null,o),d=Cp(d,g),o.callbackPriority=u,o.callbackNode=d,u}return g!==null&&g!==null&&bp(g),o.callbackPriority=2,o.callbackNode=null,2}function pf(o,u){if(Ci!==0&&Ci!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(cf()&&o.callbackNode!==d)return null;var g=Jt;return g=pc(o,o===In?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(on(o,g,u),lv(o,Zi()),o.callbackNode!=null&&o.callbackNode===d?pf.bind(null,o):null)}function jd(o,u){if(cf())return null;on(o,u,!0)}function h0(){w0(function(){(an&6)!==0?Cp(Qr,p0):df()})}function jh(){return Qo===0&&(Qo=yc()),Qo}function uv(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Xa(""+o)}function av(o,u){var d=u.ownerDocument.createElement("input");return d.name=u.name,d.value=u.value,o.id&&d.setAttribute("form",o.id),u.parentNode.insertBefore(d,u),o=new FormData(o),d.parentNode.removeChild(d),o}function y0(o,u,d,g,w){if(u==="submit"&&d&&d.stateNode===w){var C=uv((w[Ii]||null).action),U=g.submitter;U&&(u=(u=U[Ii]||null)?uv(u.formAction):U.getAttribute("formAction"),u!==null&&(C=u,U=null));var H=new Ya("action","action",null,g,w);o.push({event:H,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Qo!==0){var $=U?av(w,U):new FormData(w);gh(d,{pending:!0,data:$,method:w.method,action:C},null,$)}}else typeof C=="function"&&(H.preventDefault(),$=U?av(w,U):new FormData(w),gh(d,{pending:!0,data:$,method:w.method,action:C},C,$))},currentTarget:w}]})}}for(var Bh=0;Bh<Uo.length;Bh++){var Vh=Uo[Bh],g0=Vh.toLowerCase(),v0=Vh[0].toUpperCase()+Vh.slice(1);fi(g0,"on"+v0)}fi(Wp,"onAnimationEnd"),fi(Qp,"onAnimationIteration"),fi(Hu,"onAnimationStart"),fi("dblclick","onDoubleClick"),fi("focusin","onFocus"),fi("focusout","onBlur"),fi(Jp,"onTransitionRun"),fi(ss,"onTransitionStart"),fi(hg,"onTransitionCancel"),fi(_o,"onTransitionEnd"),Zr("onMouseEnter",["mouseout","mouseover"]),Zr("onMouseLeave",["mouseout","mouseover"]),Zr("onPointerEnter",["pointerout","pointerover"]),Zr("onPointerLeave",["pointerout","pointerover"]),Mo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ws="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Hh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ws));function Bd(o,u){u=(u&4)!==0;for(var d=0;d<o.length;d++){var g=o[d],w=g.event;g=g.listeners;e:{var C=void 0;if(u)for(var U=g.length-1;0<=U;U--){var H=g[U],$=H.instance,ve=H.currentTarget;if(H=H.listener,$!==C&&w.isPropagationStopped())break e;C=H,w.currentTarget=ve;try{C(w)}catch(Ee){Xc(Ee)}w.currentTarget=null,C=$}else for(U=0;U<g.length;U++){if(H=g[U],$=H.instance,ve=H.currentTarget,H=H.listener,$!==C&&w.isPropagationStopped())break e;C=H,w.currentTarget=ve;try{C(w)}catch(Ee){Xc(Ee)}w.currentTarget=null,C=$}}}}function _t(o,u){var d=u[Yl];d===void 0&&(d=u[Yl]=new Set);var g=o+"__bubble";d.has(g)||(bi(u,o,2,!1),d.add(g))}function ga(o,u,d){var g=0;u&&(g|=4),bi(d,o,g,u)}var va="_reactListening"+Math.random().toString(36).slice(2);function hf(o){if(!o[va]){o[va]=!0,Vf.forEach(function(d){d!=="selectionchange"&&(Hh.has(d)||ga(d,!1,o),ga(d,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[va]||(u[va]=!0,ga("selectionchange",!1,u))}}function bi(o,u,d,g){switch(ey(u)){case 2:var w=k0;break;case 8:w=Jh;break;default:w=Tu}d=w.bind(null,u,d,o),w=void 0,!Pn||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(w=!0),g?w!==void 0?o.addEventListener(u,d,{capture:!0,passive:w}):o.addEventListener(u,d,!0):w!==void 0?o.addEventListener(u,d,{passive:w}):o.addEventListener(u,d,!1)}function vu(o,u,d,g,w){var C=g;if((u&1)===0&&(u&2)===0&&g!==null)e:for(;;){if(g===null)return;var U=g.tag;if(U===3||U===4){var H=g.stateNode.containerInfo;if(H===w)break;if(U===4)for(U=g.return;U!==null;){var $=U.tag;if(($===3||$===4)&&U.stateNode.containerInfo===w)return;U=U.return}for(;H!==null;){if(U=Wl(H),U===null)return;if($=U.tag,$===5||$===6||$===26||$===27){g=C=U;continue e}H=H.parentNode}}g=g.return}Zl(function(){var ve=C,Ee=qf(d),Ce=[];e:{var me=yg.get(o);if(me!==void 0){var Se=Ya,wt=o;switch(o){case"keypress":if(ot(d)===0)break e;case"keydown":case"keyup":Se=_u;break;case"focusin":wt="focus",Se=Ec;break;case"focusout":wt="blur",Se=Ec;break;case"beforeblur":case"afterblur":Se=Ec;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=Za;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=xc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=t0;break;case Wp:case Qp:case Hu:Se=Lp;break;case _o:Se=ju;break;case"scroll":case"scrollend":Se=ag;break;case"wheel":Se=Ac;break;case"copy":case"cut":case"paste":Se=Lu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=ns;break;case"toggle":case"beforetoggle":Se=Bp}var vt=(u&4)!==0,vn=!vt&&(o==="scroll"||o==="scrollend"),fe=vt?me!==null?me+"Capture":null:me;vt=[];for(var le=ve,ge;le!==null;){var Ae=le;if(ge=Ae.stateNode,Ae=Ae.tag,Ae!==5&&Ae!==26&&Ae!==27||ge===null||fe===null||(Ae=gr(le,fe),Ae!=null&&vt.push(Hl(le,Ae,ge))),vn)break;le=le.return}0<vt.length&&(me=new Se(me,wt,null,d,Ee),Ce.push({event:me,listeners:vt}))}}if((u&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",Se=o==="mouseout"||o==="pointerout",me&&d!==wi&&(wt=d.relatedTarget||d.fromElement)&&(Wl(wt)||wt[ku]))break e;if((Se||me)&&(me=Ee.window===Ee?Ee:(me=Ee.ownerDocument)?me.defaultView||me.parentWindow:window,Se?(wt=d.relatedTarget||d.toElement,Se=ve,wt=wt?Wl(wt):null,wt!==null&&(vn=V(wt),vt=wt.tag,wt!==vn||vt!==5&&vt!==27&&vt!==6)&&(wt=null)):(Se=null,wt=ve),Se!==wt)){if(vt=Za,Ae="onMouseLeave",fe="onMouseEnter",le="mouse",(o==="pointerout"||o==="pointerover")&&(vt=ns,Ae="onPointerLeave",fe="onPointerEnter",le="pointer"),vn=Se==null?me:ul(Se),ge=wt==null?me:ul(wt),me=new vt(Ae,le+"leave",Se,d,Ee),me.target=vn,me.relatedTarget=ge,Ae=null,Wl(Ee)===ve&&(vt=new vt(fe,le+"enter",wt,d,Ee),vt.target=ge,vt.relatedTarget=vn,Ae=vt),vn=Ae,Se&&wt)t:{for(vt=Se,fe=wt,le=0,ge=vt;ge;ge=Kl(ge))le++;for(ge=0,Ae=fe;Ae;Ae=Kl(Ae))ge++;for(;0<le-ge;)vt=Kl(vt),le--;for(;0<ge-le;)fe=Kl(fe),ge--;for(;le--;){if(vt===fe||fe!==null&&vt===fe.alternate)break t;vt=Kl(vt),fe=Kl(fe)}vt=null}else vt=null;Se!==null&&sv(Ce,me,Se,vt,!1),wt!==null&&vn!==null&&sv(Ce,vn,wt,vt,!0)}}e:{if(me=ve?ul(ve):window,Se=me.nodeName&&me.nodeName.toLowerCase(),Se==="select"||Se==="input"&&me.type==="file")var tt=ls;else if(yl(me))if(Cc)tt=Fp;else{tt=Gp;var Ut=dg}else Se=me.nodeName,!Se||Se.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?ve&&Or(ve.elementType)&&(tt=ls):tt=zp;if(tt&&(tt=tt(o,ve))){ro(Ce,tt,d,Ee);break e}Ut&&Ut(o,me,ve),o==="focusout"&&ve&&me.type==="number"&&ve.memoizedProps.value!=null&&Mp(me,"number",me.value)}switch(Ut=ve?ul(ve):window,o){case"focusin":(yl(Ut)||Ut.contentEditable==="true")&&(zi=Ut,Ic=ve,vl=null);break;case"focusout":vl=Ic=zi=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,as(Ce,d,Ee);break;case"selectionchange":if(zf)break;case"keydown":case"keyup":as(Ce,d,Ee)}var rt;if(rs)e:{switch(o){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else ze?xn(o,d)&&(xt="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(xt="onCompositionStart");xt&&(Cn&&d.locale!=="ko"&&(ze||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&ze&&(rt=Gf()):(dl=Ee,$l="value"in dl?dl.value:dl.textContent,ze=!0)),Ut=Qs(ve,xt),0<Ut.length&&(xt=new _p(xt,o,null,d,Ee),Ce.push({event:xt,listeners:Ut}),rt?xt.data=rt:(rt=vr(d),rt!==null&&(xt.data=rt)))),(rt=Mt?hl(o,d):fg(o,d))&&(xt=Qs(ve,"onBeforeInput"),0<xt.length&&(Ut=new _p("onBeforeInput","beforeinput",null,d,Ee),Ce.push({event:Ut,listeners:xt}),Ut.data=rt)),y0(Ce,o,ve,d,Ee)}Bd(Ce,u)})}function Hl(o,u,d){return{instance:o,listener:u,currentTarget:d}}function Qs(o,u){for(var d=u+"Capture",g=[];o!==null;){var w=o,C=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||C===null||(w=gr(o,d),w!=null&&g.unshift(Hl(o,w,C)),w=gr(o,u),w!=null&&g.push(Hl(o,w,C))),o.tag===3)return g;o=o.return}return[]}function Kl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function sv(o,u,d,g,w){for(var C=u._reactName,U=[];d!==null&&d!==g;){var H=d,$=H.alternate,ve=H.stateNode;if(H=H.tag,$!==null&&$===g)break;H!==5&&H!==26&&H!==27||ve===null||($=ve,w?(ve=gr(d,C),ve!=null&&U.unshift(Hl(d,ve,$))):w||(ve=gr(d,C),ve!=null&&U.push(Hl(d,ve,$)))),d=d.return}U.length!==0&&o.push({event:u,listeners:U})}var Kh=/\r\n?/g,m0=/\u0000|\uFFFD/g;function yf(o){return(typeof o=="string"?o:""+o).replace(Kh,`
|
||
`).replace(m0,"")}function Vd(o,u){return u=yf(u),yf(o)===u}function ma(){}function en(o,u,d,g,w,C){switch(d){case"children":typeof g=="string"?u==="body"||u==="textarea"&&g===""||to(o,g):(typeof g=="number"||typeof g=="bigint")&&u!=="body"&&to(o,""+g);break;case"className":$i(o,"class",g);break;case"tabIndex":$i(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":$i(o,d,g);break;case"style":cl(o,g,C);break;case"data":if(u!=="object"){$i(o,"data",g);break}case"src":case"href":if(g===""&&(u!=="a"||d!=="href")){o.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=Xa(""+g),o.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(d==="formAction"?(u!=="input"&&en(o,u,"name",w.name,w,null),en(o,u,"formEncType",w.formEncType,w,null),en(o,u,"formMethod",w.formMethod,w,null),en(o,u,"formTarget",w.formTarget,w,null)):(en(o,u,"encType",w.encType,w,null),en(o,u,"method",w.method,w,null),en(o,u,"target",w.target,w,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=Xa(""+g),o.setAttribute(d,g);break;case"onClick":g!=null&&(o.onclick=ma);break;case"onScroll":g!=null&&_t("scroll",o);break;case"onScrollEnd":g!=null&&_t("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(x(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(x(60));o.innerHTML=d}}break;case"multiple":o.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":o.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){o.removeAttribute("xlink:href");break}d=Xa(""+g),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""+g):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":g===!0?o.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(d,g):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?o.setAttribute(d,g):o.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?o.removeAttribute(d):o.setAttribute(d,g);break;case"popover":_t("beforetoggle",o),_t("toggle",o),Ql(o,"popover",g);break;case"xlinkActuate":si(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":si(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":si(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":si(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":si(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":si(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":si(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":si(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":si(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Ql(o,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=kr.get(d)||d,Ql(o,d,g))}}function Hd(o,u,d,g,w,C){switch(d){case"style":cl(o,g,C);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(x(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(x(60));o.innerHTML=d}}break;case"children":typeof g=="string"?to(o,g):(typeof g=="number"||typeof g=="bigint")&&to(o,""+g);break;case"onScroll":g!=null&&_t("scroll",o);break;case"onScrollEnd":g!=null&&_t("scrollend",o);break;case"onClick":g!=null&&(o.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mc.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(w=d.endsWith("Capture"),u=d.slice(2,w?d.length-7:void 0),C=o[Ii]||null,C=C!=null?C[d]:null,typeof C=="function"&&o.removeEventListener(u,C,w),typeof g=="function")){typeof C!="function"&&C!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(u,g,w);break e}d in o?o[d]=g:g===!0?o.setAttribute(d,""):Ql(o,d,g)}}}function tn(o,u,d){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",o),_t("load",o);var g=!1,w=!1,C;for(C in d)if(d.hasOwnProperty(C)){var U=d[C];if(U!=null)switch(C){case"src":g=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(x(137,u));default:en(o,u,C,U,d,null)}}w&&en(o,u,"srcSet",d.srcSet,d,null),g&&en(o,u,"src",d.src,d,null);return;case"input":_t("invalid",o);var H=C=U=w=null,$=null,ve=null;for(g in d)if(d.hasOwnProperty(g)){var Ee=d[g];if(Ee!=null)switch(g){case"name":w=Ee;break;case"type":U=Ee;break;case"checked":$=Ee;break;case"defaultChecked":ve=Ee;break;case"value":C=Ee;break;case"defaultValue":H=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(x(137,u));break;default:en(o,u,g,Ee,d,null)}}kp(o,C,H,$,ve,U,w,!1),za(o);return;case"select":_t("invalid",o),g=U=C=null;for(w in d)if(d.hasOwnProperty(w)&&(H=d[w],H!=null))switch(w){case"value":C=H;break;case"defaultValue":U=H;break;case"multiple":g=H;default:en(o,u,w,H,d,null)}u=C,d=U,o.multiple=!!g,u!=null?Nu(o,!!g,u,!1):d!=null&&Nu(o,!!g,d,!0);return;case"textarea":_t("invalid",o),C=w=g=null;for(U in d)if(d.hasOwnProperty(U)&&(H=d[U],H!=null))switch(U){case"value":g=H;break;case"defaultValue":w=H;break;case"children":C=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(x(91));break;default:en(o,u,U,H,d,null)}Kf(o,g,w,C),za(o);return;case"option":for($ in d)if(d.hasOwnProperty($)&&(g=d[$],g!=null))switch($){case"selected":o.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:en(o,u,$,g,d,null)}return;case"dialog":_t("beforetoggle",o),_t("toggle",o),_t("cancel",o),_t("close",o);break;case"iframe":case"object":_t("load",o);break;case"video":case"audio":for(g=0;g<Ws.length;g++)_t(Ws[g],o);break;case"image":_t("error",o),_t("load",o);break;case"details":_t("toggle",o);break;case"embed":case"source":case"link":_t("error",o),_t("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in d)if(d.hasOwnProperty(ve)&&(g=d[ve],g!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(x(137,u));default:en(o,u,ve,g,d,null)}return;default:if(Or(u)){for(Ee in d)d.hasOwnProperty(Ee)&&(g=d[Ee],g!==void 0&&Hd(o,u,Ee,g,d,void 0));return}}for(H in d)d.hasOwnProperty(H)&&(g=d[H],g!=null&&en(o,u,H,g,d,null))}function cv(o,u,d,g){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,C=null,U=null,H=null,$=null,ve=null,Ee=null;for(Se in d){var Ce=d[Se];if(d.hasOwnProperty(Se)&&Ce!=null)switch(Se){case"checked":break;case"value":break;case"defaultValue":$=Ce;default:g.hasOwnProperty(Se)||en(o,u,Se,null,g,Ce)}}for(var me in g){var Se=g[me];if(Ce=d[me],g.hasOwnProperty(me)&&(Se!=null||Ce!=null))switch(me){case"type":C=Se;break;case"name":w=Se;break;case"checked":ve=Se;break;case"defaultChecked":Ee=Se;break;case"value":U=Se;break;case"defaultValue":H=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(x(137,u));break;default:Se!==Ce&&en(o,u,me,Se,g,Ce)}}Jl(o,U,H,$,ve,Ee,C,w);return;case"select":Se=U=H=me=null;for(C in d)if($=d[C],d.hasOwnProperty(C)&&$!=null)switch(C){case"value":break;case"multiple":Se=$;default:g.hasOwnProperty(C)||en(o,u,C,null,g,$)}for(w in g)if(C=g[w],$=d[w],g.hasOwnProperty(w)&&(C!=null||$!=null))switch(w){case"value":me=C;break;case"defaultValue":H=C;break;case"multiple":U=C;default:C!==$&&en(o,u,w,C,g,$)}u=H,d=U,g=Se,me!=null?Nu(o,!!d,me,!1):!!g!=!!d&&(u!=null?Nu(o,!!d,u,!0):Nu(o,!!d,d?[]:"",!1));return;case"textarea":Se=me=null;for(H in d)if(w=d[H],d.hasOwnProperty(H)&&w!=null&&!g.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:en(o,u,H,null,g,w)}for(U in g)if(w=g[U],C=d[U],g.hasOwnProperty(U)&&(w!=null||C!=null))switch(U){case"value":me=w;break;case"defaultValue":Se=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(x(91));break;default:w!==C&&en(o,u,U,w,g,C)}Rp(o,me,Se);return;case"option":for(var wt in d)if(me=d[wt],d.hasOwnProperty(wt)&&me!=null&&!g.hasOwnProperty(wt))switch(wt){case"selected":o.selected=!1;break;default:en(o,u,wt,null,g,me)}for($ in g)if(me=g[$],Se=d[$],g.hasOwnProperty($)&&me!==Se&&(me!=null||Se!=null))switch($){case"selected":o.selected=me&&typeof me!="function"&&typeof me!="symbol";break;default:en(o,u,$,me,g,Se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var vt in d)me=d[vt],d.hasOwnProperty(vt)&&me!=null&&!g.hasOwnProperty(vt)&&en(o,u,vt,null,g,me);for(ve in g)if(me=g[ve],Se=d[ve],g.hasOwnProperty(ve)&&me!==Se&&(me!=null||Se!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(x(137,u));break;default:en(o,u,ve,me,g,Se)}return;default:if(Or(u)){for(var vn in d)me=d[vn],d.hasOwnProperty(vn)&&me!==void 0&&!g.hasOwnProperty(vn)&&Hd(o,u,vn,void 0,g,me);for(Ee in g)me=g[Ee],Se=d[Ee],!g.hasOwnProperty(Ee)||me===Se||me===void 0&&Se===void 0||Hd(o,u,Ee,me,g,Se);return}}for(var fe in d)me=d[fe],d.hasOwnProperty(fe)&&me!=null&&!g.hasOwnProperty(fe)&&en(o,u,fe,null,g,me);for(Ce in g)me=g[Ce],Se=d[Ce],!g.hasOwnProperty(Ce)||me===Se||me==null&&Se==null||en(o,u,Ce,me,g,Se)}var Sa=null,gf=null;function Ta(o){return o.nodeType===9?o:o.ownerDocument}function Kd(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fv(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function qh(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Gh=null;function S0(){var o=window.event;return o&&o.type==="popstate"?o===Gh?!1:(Gh=o,!0):(Gh=null,!1)}var dv=typeof setTimeout=="function"?setTimeout:void 0,T0=typeof clearTimeout=="function"?clearTimeout:void 0,pv=typeof Promise=="function"?Promise:void 0,w0=typeof queueMicrotask=="function"?queueMicrotask:typeof pv<"u"?function(o){return pv.resolve(null).then(o).catch(x0)}:dv;function x0(o){setTimeout(function(){throw o})}function vo(o){return o==="head"}function wa(o,u){var d=u,g=0,w=0;do{var C=d.nextSibling;if(o.removeChild(d),C&&C.nodeType===8)if(d=C.data,d==="/$"){if(0<g&&8>g){d=g;var U=o.ownerDocument;if(d&1&&xa(U.documentElement),d&2&&xa(U.body),d&4)for(d=U.head,xa(d),U=d.firstChild;U;){var H=U.nextSibling,$=U.nodeName;U[Ga]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&U.rel.toLowerCase()==="stylesheet"||d.removeChild(U),U=H}}if(w===0){o.removeChild(C),nc(u);return}w--}else d==="$"||d==="$?"||d==="$!"?w++:g=d.charCodeAt(0)-48;else g=0;d=C}while(d);nc(u)}function qd(o){var u=o.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var d=u;switch(u=u.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":qd(d),Ti(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function mu(o,u,d,g){for(;o.nodeType===1;){var w=d;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[Ga])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(C=o.getAttribute("rel"),C==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(C!==w.rel||o.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||o.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||o.getAttribute("title")!==(w.title==null?null:w.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(C=o.getAttribute("src"),(C!==(w.src==null?null:w.src)||o.getAttribute("type")!==(w.type==null?null:w.type)||o.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&C&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var C=w.name==null?null:""+w.name;if(w.type==="hidden"&&o.getAttribute("name")===C)return o}else return o;if(o=mo(o.nextSibling),o===null)break}return null}function E0(o,u,d){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=mo(o.nextSibling),o===null))return null;return o}function Js(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function Gd(o,u){var d=o.ownerDocument;if(o.data!=="$?"||d.readyState==="complete")u();else{var g=function(){u(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function mo(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="F!"||u==="F")break;if(u==="/$")return null}}return o}var vf=null;function hv(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(u===0)return o;u--}else d==="/$"&&u++}o=o.previousSibling}return null}function yv(o,u,d){switch(u=Ta(d),o){case"html":if(o=u.documentElement,!o)throw Error(x(452));return o;case"head":if(o=u.head,!o)throw Error(x(453));return o;case"body":if(o=u.body,!o)throw Error(x(454));return o;default:throw Error(x(451))}}function xa(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);Ti(o)}var Xi=new Map,sr=new Set;function Su(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var ql=_e.d;_e.d={f:gv,r:A0,D:C0,C:Ea,L:zh,m:b0,X:I0,S:mv,M:Fh};function gv(){var o=ql.f(),u=af();return o||u}function A0(o){var u=Y(o);u!==null&&u.tag===5&&u.type==="form"?Kc(u):ql.r(o)}var Zs=typeof document>"u"?null:document;function vv(o,u,d){var g=Zs;if(g&&typeof u=="string"&&u){var w=Vt(u);w='link[rel="'+o+'"][href="'+w+'"]',typeof d=="string"&&(w+='[crossorigin="'+d+'"]'),sr.has(w)||(sr.add(w),o={rel:o,crossOrigin:d,href:u},g.querySelector(w)===null&&(u=g.createElement("link"),tn(u,"link",o),ti(u),g.head.appendChild(u)))}}function C0(o){ql.D(o),vv("dns-prefetch",o,null)}function Ea(o,u){ql.C(o,u),vv("preconnect",o,u)}function zh(o,u,d){ql.L(o,u,d);var g=Zs;if(g&&o&&u){var w='link[rel="preload"][as="'+Vt(u)+'"]';u==="image"&&d&&d.imageSrcSet?(w+='[imagesrcset="'+Vt(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(w+='[imagesizes="'+Vt(d.imageSizes)+'"]')):w+='[href="'+Vt(o)+'"]';var C=w;switch(u){case"style":C=Vr(o);break;case"script":C=$o(o)}Xi.has(C)||(o=p({rel:"preload",href:u==="image"&&d&&d.imageSrcSet?void 0:o,as:u},d),Xi.set(C,o),g.querySelector(w)!==null||u==="style"&&g.querySelector(br(C))||u==="script"&&g.querySelector(So(C))||(u=g.createElement("link"),tn(u,"link",o),ti(u),g.head.appendChild(u)))}}function b0(o,u){ql.m(o,u);var d=Zs;if(d&&o){var g=u&&typeof u.as=="string"?u.as:"script",w='link[rel="modulepreload"][as="'+Vt(g)+'"][href="'+Vt(o)+'"]',C=w;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=$o(o)}if(!Xi.has(C)&&(o=p({rel:"modulepreload",href:o},u),Xi.set(C,o),d.querySelector(w)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(So(C)))return}g=d.createElement("link"),tn(g,"link",o),ti(g),d.head.appendChild(g)}}}function mv(o,u,d){ql.S(o,u,d);var g=Zs;if(g&&o){var w=Mu(g).hoistableStyles,C=Vr(o);u=u||"default";var U=w.get(C);if(!U){var H={loading:0,preload:null};if(U=g.querySelector(br(C)))H.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":u},d),(d=Xi.get(C))&&zd(o,d);var $=U=g.createElement("link");ti($),tn($,"link",o),$._p=new Promise(function(ve,Ee){$.onload=ve,$.onerror=Ee}),$.addEventListener("load",function(){H.loading|=1}),$.addEventListener("error",function(){H.loading|=2}),H.loading|=4,mf(U,u,g)}U={type:"stylesheet",instance:U,count:1,state:H},w.set(C,U)}}}function I0(o,u){ql.X(o,u);var d=Zs;if(d&&o){var g=Mu(d).hoistableScripts,w=$o(o),C=g.get(w);C||(C=d.querySelector(So(w)),C||(o=p({src:o,async:!0},u),(u=Xi.get(w))&&Sf(o,u),C=d.createElement("script"),ti(C),tn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(w,C))}}function Fh(o,u){ql.M(o,u);var d=Zs;if(d&&o){var g=Mu(d).hoistableScripts,w=$o(o),C=g.get(w);C||(C=d.querySelector(So(w)),C||(o=p({src:o,async:!0,type:"module"},u),(u=Xi.get(w))&&Sf(o,u),C=d.createElement("script"),ti(C),tn(C,"link",o),d.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(w,C))}}function Sv(o,u,d,g){var w=(w=dt.current)?Su(w):null;if(!w)throw Error(x(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(u=Vr(d.href),d=Mu(w).hoistableStyles,g=d.get(u),g||(g={type:"style",instance:null,count:0,state:null},d.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=Vr(d.href);var C=Mu(w).hoistableStyles,U=C.get(o);if(U||(w=w.ownerDocument||w,U={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(o,U),(C=w.querySelector(br(o)))&&!C._p&&(U.instance=C,U.state.loading=5),Xi.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Xi.set(o,d),C||ec(w,o,d,U.state))),u&&g===null)throw Error(x(528,""));return U}if(u&&g!==null)throw Error(x(529,""));return null;case"script":return u=d.async,d=d.src,typeof d=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=$o(d),d=Mu(w).hoistableScripts,g=d.get(u),g||(g={type:"script",instance:null,count:0,state:null},d.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(x(444,o))}}function Vr(o){return'href="'+Vt(o)+'"'}function br(o){return'link[rel="stylesheet"]['+o+"]"}function $s(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function ec(o,u,d,g){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=o.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),tn(u,"link",d),ti(u),o.head.appendChild(u))}function $o(o){return'[src="'+Vt(o)+'"]'}function So(o){return"script[async]"+o}function Tv(o,u,d){if(u.count++,u.instance===null)switch(u.type){case"style":var g=o.querySelector('style[data-href~="'+Vt(d.href)+'"]');if(g)return u.instance=g,ti(g),g;var w=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),ti(g),tn(g,"style",w),mf(g,d.precedence,o),u.instance=g;case"stylesheet":w=Vr(d.href);var C=o.querySelector(br(w));if(C)return u.state.loading|=4,u.instance=C,ti(C),C;g=$s(d),(w=Xi.get(w))&&zd(g,w),C=(o.ownerDocument||o).createElement("link"),ti(C);var U=C;return U._p=new Promise(function(H,$){U.onload=H,U.onerror=$}),tn(C,"link",g),u.state.loading|=4,mf(C,d.precedence,o),u.instance=C;case"script":return C=$o(d.src),(w=o.querySelector(So(C)))?(u.instance=w,ti(w),w):(g=d,(w=Xi.get(C))&&(g=p({},d),Sf(g,w)),o=o.ownerDocument||o,w=o.createElement("script"),ti(w),tn(w,"link",g),o.head.appendChild(w),u.instance=w);case"void":return null;default:throw Error(x(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,mf(g,d.precedence,o));return u.instance}function mf(o,u,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=g.length?g[g.length-1]:null,C=w,U=0;U<g.length;U++){var H=g[U];if(H.dataset.precedence===u)C=H;else if(C!==w)break}C?C.parentNode.insertBefore(o,C.nextSibling):(u=d.nodeType===9?d.head:d,u.insertBefore(o,u.firstChild))}function zd(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function Sf(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var Tf=null;function wv(o,u,d){if(Tf===null){var g=new Map,w=Tf=new Map;w.set(d,g)}else w=Tf,g=w.get(d),g||(g=new Map,w.set(d,g));if(g.has(o))return g;for(g.set(o,null),d=d.getElementsByTagName(o),w=0;w<d.length;w++){var C=d[w];if(!(C[Ga]||C[Yn]||o==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var U=C.getAttribute(u)||"";U=o+U;var H=g.get(U);H?H.push(C):g.set(U,[C])}}return g}function ui(o,u,d){o=o.ownerDocument||o,o.head.insertBefore(d,u==="title"?o.querySelector("head > title"):null)}function xv(o,u,d){if(d===1||u.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return o=u.disabled,typeof u.precedence=="string"&&o==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function Xh(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Vn=null;function gi(){}function wf(o,u,d){if(Vn===null)throw Error(x(475));var g=Vn;if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var w=Vr(d.href),C=o.querySelector(br(w));if(C){o=C._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(g.count++,g=xf.bind(g),o.then(g,g)),u.state.loading|=4,u.instance=C,ti(C);return}C=o.ownerDocument||o,d=$s(d),(w=Xi.get(w))&&zd(d,w),C=C.createElement("link"),ti(C);var U=C;U._p=new Promise(function(H,$){U.onload=H,U.onerror=$}),tn(C,"link",d),u.instance=C}g.stylesheets===null&&(g.stylesheets=new Map),g.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(g.count++,u=xf.bind(g),o.addEventListener("load",u),o.addEventListener("error",u))}}function D0(){if(Vn===null)throw Error(x(475));var o=Vn;return o.stylesheets&&o.count===0&&Yh(o,o.stylesheets),0<o.count?function(u){var d=setTimeout(function(){if(o.stylesheets&&Yh(o,o.stylesheets),o.unsuspend){var g=o.unsuspend;o.unsuspend=null,g()}},6e4);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(d)}}:null}function xf(){if(this.count--,this.count===0){if(this.stylesheets)Yh(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var To=null;function Yh(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,To=new Map,u.forEach(O0,o),To=null,xf.call(o))}function O0(o,u){if(!(u.state.loading&4)){var d=To.get(o);if(d)var g=d.get(null);else{d=new Map,To.set(o,d);for(var w=o.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<w.length;C++){var U=w[C];(U.nodeName==="LINK"||U.getAttribute("media")!=="not all")&&(d.set(U.dataset.precedence,U),g=U)}g&&d.set(null,g)}w=u.instance,U=w.getAttribute("data-precedence"),C=d.get(U)||g,C===g&&d.set(null,w),d.set(U,w),this.count++,g=xf.bind(this),w.addEventListener("load",g),w.addEventListener("error",g),C?C.parentNode.insertBefore(w,C.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(w,o.firstChild)),u.state.loading|=4}}var Ef={$$typeof:ee,Provider:null,Consumer:null,_currentValue:ft,_currentValue2:ft,_threadCount:0};function Wh(o,u,d,g,w,C,U,H){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=vc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vc(0),this.hiddenUpdates=vc(null),this.identifierPrefix=g,this.onUncaughtError=w,this.onCaughtError=C,this.onRecoverableError=U,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function Ev(o,u,d,g,w,C,U,H,$,ve,Ee,Ce){return o=new Wh(o,u,d,U,H,$,ve,Ce),u=1,C===!0&&(u|=24),C=ii(3,null,null,u),o.current=C,C.stateNode=o,u=Lc(),u.refCount++,o.pooledCache=u,u.refCount++,C.memoizedState={element:g,isDehydrated:d,cache:u},pn(C),o}function Av(o){return o?(o=Tl,o):Tl}function Fd(o,u,d,g,w,C){w=Av(w),g.context===null?g.context=w:g.pendingContext=w,g=Ho(u),g.payload={element:d},C=C===void 0?null:C,C!==null&&(g.callback=C),d=wr(o,g,u),d!==null&&(Rn(d,o,u),gs(d,o,u))}function Cv(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<u?d:u}}function Qh(o,u){Cv(o,u),(o=o.alternate)&&Cv(o,u)}function bv(o){if(o.tag===13){var u=oo(o,67108864);u!==null&&Rn(u,o,67108864),Qh(o,67108864)}}var Xd=!0;function k0(o,u,d,g){var w=Te.T;Te.T=null;var C=_e.p;try{_e.p=2,Tu(o,u,d,g)}finally{_e.p=C,Te.T=w}}function Jh(o,u,d,g){var w=Te.T;Te.T=null;var C=_e.p;try{_e.p=8,Tu(o,u,d,g)}finally{_e.p=C,Te.T=w}}function Tu(o,u,d,g){if(Xd){var w=Zh(g);if(w===null)vu(o,u,g,Yd,d),Iv(o,g);else if(Qd(w,o,u,d,g))g.stopPropagation();else if(Iv(o,g),u&4&&-1<Wd.indexOf(o)){for(;w!==null;){var C=Y(w);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var U=Ou(C.pendingLanes);if(U!==0){var H=C;for(H.pendingLanes|=2,H.entangledLanes|=2;U;){var $=1<<31-hr(U);H.entanglements[1]|=$,U&=~$}Jo(C),(an&6)===0&&(Bs=Zi()+500,Zo(0))}}break;case 13:H=oo(C,2),H!==null&&Rn(H,C,2),af(),Qh(C,2)}if(C=Zh(g),C===null&&vu(o,u,g,Yd,d),C===w)break;w=C}w!==null&&g.stopPropagation()}else vu(o,u,g,null,d)}}function Zh(o){return o=qf(o),$h(o)}var Yd=null;function $h(o){if(Yd=null,o=Wl(o),o!==null){var u=V(o);if(u===null)o=null;else{var d=u.tag;if(d===13){if(o=M(u),o!==null)return o;o=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return Yd=o,null}function ey(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qm()){case Qr:return 2;case Et:return 8;case ko:case Jm:return 32;case Zm:return 268435456;default:return 32}default:return 32}}var ty=!1,wo=null,wu=null,el=null,tc=new Map,xu=new Map,xo=[],Wd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Iv(o,u){switch(o){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":wu=null;break;case"mouseover":case"mouseout":el=null;break;case"pointerover":case"pointerout":tc.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":xu.delete(u.pointerId)}}function Aa(o,u,d,g,w,C){return o===null||o.nativeEvent!==C?(o={blockedOn:u,domEventName:d,eventSystemFlags:g,nativeEvent:C,targetContainers:[w]},u!==null&&(u=Y(u),u!==null&&bv(u)),o):(o.eventSystemFlags|=g,u=o.targetContainers,w!==null&&u.indexOf(w)===-1&&u.push(w),o)}function Qd(o,u,d,g,w){switch(u){case"focusin":return wo=Aa(wo,o,u,d,g,w),!0;case"dragenter":return wu=Aa(wu,o,u,d,g,w),!0;case"mouseover":return el=Aa(el,o,u,d,g,w),!0;case"pointerover":var C=w.pointerId;return tc.set(C,Aa(tc.get(C)||null,o,u,d,g,w)),!0;case"gotpointercapture":return C=w.pointerId,xu.set(C,Aa(xu.get(C)||null,o,u,d,g,w)),!0}return!1}function ny(o){var u=Wl(o.target);if(u!==null){var d=V(u);if(d!==null){if(u=d.tag,u===13){if(u=M(d),u!==null){o.blockedOn=u,e0(o.priority,function(){if(d.tag===13){var g=Bn();g=Bf(g);var w=oo(d,g);w!==null&&Rn(w,d,g),Qh(d,g)}});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Ca(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var d=Zh(o.nativeEvent);if(d===null){d=o.nativeEvent;var g=new d.constructor(d.type,d);wi=g,d.target.dispatchEvent(g),wi=null}else return u=Y(d),u!==null&&bv(u),o.blockedOn=d,!1;u.shift()}return!0}function Af(o,u,d){Ca(o)&&d.delete(u)}function Jd(){ty=!1,wo!==null&&Ca(wo)&&(wo=null),wu!==null&&Ca(wu)&&(wu=null),el!==null&&Ca(el)&&(el=null),tc.forEach(Af),xu.forEach(Af)}function ba(o,u){o.blockedOn===u&&(o.blockedOn=null,ty||(ty=!0,R.unstable_scheduleCallback(R.unstable_NormalPriority,Jd)))}var _i=null;function iy(o){_i!==o&&(_i=o,R.unstable_scheduleCallback(R.unstable_NormalPriority,function(){_i===o&&(_i=null);for(var u=0;u<o.length;u+=3){var d=o[u],g=o[u+1],w=o[u+2];if(typeof g!="function"){if($h(g||d)===null)continue;break}var C=Y(d);C!==null&&(o.splice(u,3),u-=3,gh(C,{pending:!0,data:w,method:d.method,action:g},g,w))}}))}function nc(o){function u($){return ba($,o)}wo!==null&&ba(wo,o),wu!==null&&ba(wu,o),el!==null&&ba(el,o),tc.forEach(u),xu.forEach(u);for(var d=0;d<xo.length;d++){var g=xo[d];g.blockedOn===o&&(g.blockedOn=null)}for(;0<xo.length&&(d=xo[0],d.blockedOn===null);)ny(d),d.blockedOn===null&&xo.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var w=d[g],C=d[g+1],U=w[Ii]||null;if(typeof C=="function")U||iy(d);else if(U){var H=null;if(C&&C.hasAttribute("formAction")){if(w=C,U=C[Ii]||null)H=U.formAction;else if($h(w)!==null)continue}else H=U.action;typeof H=="function"?d[g+1]=H:(d.splice(g,3),g-=3),iy(d)}}}function Zd(o){this._internalRoot=o}Cf.prototype.render=Zd.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(x(409));var d=u.current,g=Bn();Fd(d,g,o,u,null,null)},Cf.prototype.unmount=Zd.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;Fd(o.current,2,null,o,null,null),af(),u[ku]=null}};function Cf(o){this._internalRoot=o}Cf.prototype.unstable_scheduleHydration=function(o){if(o){var u=og();o={blockedOn:null,target:o,priority:u};for(var d=0;d<xo.length&&u!==0&&u<xo[d].priority;d++);xo.splice(d,0,o),d===0&&ny(o)}};var ry=k.version;if(ry!=="19.1.0")throw Error(x(527,ry,"19.1.0"));_e.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(x(188)):(o=Object.keys(o).join(","),Error(x(268,o)));return o=s(u),o=o!==null?a(o):null,o=o===null?null:o.stateNode,o};var Dv={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Te,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{Fl=ic.inject(Dv),yt=ic}catch{}}return Ky.createRoot=function(o,u){if(!E(o))throw Error(x(299));var d=!1,g="",w=gt,C=Th,U=Ll,H=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(U=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(H=u.unstable_transitionCallbacks)),u=Ev(o,1,!1,null,null,d,g,w,C,U,H,null),o[ku]=u.current,hf(o),new Zd(u)},Ky.hydrateRoot=function(o,u,d){if(!E(o))throw Error(x(299));var g=!1,w="",C=gt,U=Th,H=Ll,$=null,ve=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onUncaughtError!==void 0&&(C=d.onUncaughtError),d.onCaughtError!==void 0&&(U=d.onCaughtError),d.onRecoverableError!==void 0&&(H=d.onRecoverableError),d.unstable_transitionCallbacks!==void 0&&($=d.unstable_transitionCallbacks),d.formState!==void 0&&(ve=d.formState)),u=Ev(o,1,!0,u,d??null,g,w,C,U,H,$,ve),u.context=Av(null),d=u.current,g=Bn(),g=Bf(g),w=Ho(g),w.callback=null,wr(d,w,g),d=g,u.current.lanes=d,Jr(u,d),Jo(u),o[ku]=u.current,hf(o),new Cf(u)},Ky.version="19.1.0",Ky}var aA;function EO(){if(aA)return RS.exports;aA=1;function R(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R)}catch(k){console.error(k)}}return R(),RS.exports=xO(),RS.exports}var AO=EO(),qy={},sA;function CO(){if(sA)return qy;sA=1,Object.defineProperty(qy,"__esModule",{value:!0}),qy.parse=M,qy.serialize=a;const R=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,k=/^[\u0021-\u003A\u003C-\u007E]*$/,j=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,x=/^[\u0020-\u003A\u003D-\u007E]*$/,E=Object.prototype.toString,V=(()=>{const D=function(){};return D.prototype=Object.create(null),D})();function M(D,X){const A=new V,te=D.length;if(te<2)return A;const ae=(X==null?void 0:X.decode)||p;let he=0;do{const je=D.indexOf("=",he);if(je===-1)break;const ee=D.indexOf(";",he),ke=ee===-1?te:ee;if(je>ke){he=D.lastIndexOf(";",je-1)+1;continue}const Re=y(D,he,je),nt=s(D,je,Re),Gt=D.slice(Re,nt);if(A[Gt]===void 0){let ln=y(D,je+1,ke),cn=s(D,ke,ln);const L=ae(D.slice(ln,cn));A[Gt]=L}he=ke+1}while(he<te);return A}function y(D,X,A){do{const te=D.charCodeAt(X);if(te!==32&&te!==9)return X}while(++X<A);return A}function s(D,X,A){for(;X>A;){const te=D.charCodeAt(--X);if(te!==32&&te!==9)return X+1}return A}function a(D,X,A){const te=(A==null?void 0:A.encode)||encodeURIComponent;if(!R.test(D))throw new TypeError(`argument name is invalid: ${D}`);const ae=te(X);if(!k.test(ae))throw new TypeError(`argument val is invalid: ${X}`);let he=D+"="+ae;if(!A)return he;if(A.maxAge!==void 0){if(!Number.isInteger(A.maxAge))throw new TypeError(`option maxAge is invalid: ${A.maxAge}`);he+="; Max-Age="+A.maxAge}if(A.domain){if(!j.test(A.domain))throw new TypeError(`option domain is invalid: ${A.domain}`);he+="; Domain="+A.domain}if(A.path){if(!x.test(A.path))throw new TypeError(`option path is invalid: ${A.path}`);he+="; Path="+A.path}if(A.expires){if(!m(A.expires)||!Number.isFinite(A.expires.valueOf()))throw new TypeError(`option expires is invalid: ${A.expires}`);he+="; Expires="+A.expires.toUTCString()}if(A.httpOnly&&(he+="; HttpOnly"),A.secure&&(he+="; Secure"),A.partitioned&&(he+="; Partitioned"),A.priority)switch(typeof A.priority=="string"?A.priority.toLowerCase():void 0){case"low":he+="; Priority=Low";break;case"medium":he+="; Priority=Medium";break;case"high":he+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${A.priority}`)}if(A.sameSite)switch(typeof A.sameSite=="string"?A.sameSite.toLowerCase():A.sameSite){case!0:case"strict":he+="; SameSite=Strict";break;case"lax":he+="; SameSite=Lax";break;case"none":he+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${A.sameSite}`)}return he}function p(D){if(D.indexOf("%")===-1)return D;try{return decodeURIComponent(D)}catch{return D}}function m(D){return E.call(D)==="[object Date]"}return qy}CO();var cA="popstate";function bO(R={}){function k(x,E){let{pathname:V,search:M,hash:y}=x.location;return XS("",{pathname:V,search:M,hash:y},E.state&&E.state.usr||null,E.state&&E.state.key||"default")}function j(x,E){return typeof E=="string"?E:Jy(E)}return DO(k,j,null,R)}function ei(R,k){if(R===!1||R===null||typeof R>"u")throw new Error(k)}function Iu(R,k){if(!R){typeof console<"u"&&console.warn(k);try{throw new Error(k)}catch{}}}function IO(){return Math.random().toString(36).substring(2,10)}function fA(R,k){return{usr:R.state,key:R.key,idx:k}}function XS(R,k,j=null,x){return{pathname:typeof R=="string"?R:R.pathname,search:"",hash:"",...typeof k=="string"?xp(k):k,state:j,key:k&&k.key||x||IO()}}function Jy({pathname:R="/",search:k="",hash:j=""}){return k&&k!=="?"&&(R+=k.charAt(0)==="?"?k:"?"+k),j&&j!=="#"&&(R+=j.charAt(0)==="#"?j:"#"+j),R}function xp(R){let k={};if(R){let j=R.indexOf("#");j>=0&&(k.hash=R.substring(j),R=R.substring(0,j));let x=R.indexOf("?");x>=0&&(k.search=R.substring(x),R=R.substring(0,x)),R&&(k.pathname=R)}return k}function DO(R,k,j,x={}){let{window:E=document.defaultView,v5Compat:V=!1}=x,M=E.history,y="POP",s=null,a=p();a==null&&(a=0,M.replaceState({...M.state,idx:a},""));function p(){return(M.state||{idx:null}).idx}function m(){y="POP";let ae=p(),he=ae==null?null:ae-a;a=ae,s&&s({action:y,location:te.location,delta:he})}function D(ae,he){y="PUSH";let je=XS(te.location,ae,he);a=p()+1;let ee=fA(je,a),ke=te.createHref(je);try{M.pushState(ee,"",ke)}catch(Re){if(Re instanceof DOMException&&Re.name==="DataCloneError")throw Re;E.location.assign(ke)}V&&s&&s({action:y,location:te.location,delta:1})}function X(ae,he){y="REPLACE";let je=XS(te.location,ae,he);a=p();let ee=fA(je,a),ke=te.createHref(je);M.replaceState(ee,"",ke),V&&s&&s({action:y,location:te.location,delta:0})}function A(ae){let he=E.location.origin!=="null"?E.location.origin:E.location.href,je=typeof ae=="string"?ae:Jy(ae);return je=je.replace(/ $/,"%20"),ei(he,`No window.location.(origin|href) available to create URL for href: ${je}`),new URL(je,he)}let te={get action(){return y},get location(){return R(E,M)},listen(ae){if(s)throw new Error("A history only accepts one active listener");return E.addEventListener(cA,m),s=ae,()=>{E.removeEventListener(cA,m),s=null}},createHref(ae){return k(E,ae)},createURL:A,encodeLocation(ae){let he=A(ae);return{pathname:he.pathname,search:he.search,hash:he.hash}},push:D,replace:X,go(ae){return M.go(ae)}};return te}function IA(R,k,j="/"){return OO(R,k,j,!1)}function OO(R,k,j,x){let E=typeof k=="string"?xp(k):k,V=Ba(E.pathname||"/",j);if(V==null)return null;let M=DA(R);kO(M);let y=null;for(let s=0;y==null&&s<M.length;++s){let a=HO(V);y=BO(M[s],a,x)}return y}function DA(R,k=[],j=[],x=""){let E=(V,M,y)=>{let s={relativePath:y===void 0?V.path||"":y,caseSensitive:V.caseSensitive===!0,childrenIndex:M,route:V};s.relativePath.startsWith("/")&&(ei(s.relativePath.startsWith(x),`Absolute route path "${s.relativePath}" nested under path "${x}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(x.length));let a=ja([x,s.relativePath]),p=j.concat(s);V.children&&V.children.length>0&&(ei(V.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${a}".`),DA(V.children,k,p,a)),!(V.path==null&&!V.index)&&k.push({path:a,score:UO(a,V.index),routesMeta:p})};return R.forEach((V,M)=>{var y;if(V.path===""||!((y=V.path)!=null&&y.includes("?")))E(V,M);else for(let s of OA(V.path))E(V,M,s)}),k}function OA(R){let k=R.split("/");if(k.length===0)return[];let[j,...x]=k,E=j.endsWith("?"),V=j.replace(/\?$/,"");if(x.length===0)return E?[V,""]:[V];let M=OA(x.join("/")),y=[];return y.push(...M.map(s=>s===""?V:[V,s].join("/"))),E&&y.push(...M),y.map(s=>R.startsWith("/")&&s===""?"/":s)}function kO(R){R.sort((k,j)=>k.score!==j.score?j.score-k.score:jO(k.routesMeta.map(x=>x.childrenIndex),j.routesMeta.map(x=>x.childrenIndex)))}var MO=/^:[\w-]+$/,RO=3,NO=2,PO=1,LO=10,_O=-2,dA=R=>R==="*";function UO(R,k){let j=R.split("/"),x=j.length;return j.some(dA)&&(x+=_O),k&&(x+=NO),j.filter(E=>!dA(E)).reduce((E,V)=>E+(MO.test(V)?RO:V===""?PO:LO),x)}function jO(R,k){return R.length===k.length&&R.slice(0,-1).every((x,E)=>x===k[E])?R[R.length-1]-k[k.length-1]:0}function BO(R,k,j=!1){let{routesMeta:x}=R,E={},V="/",M=[];for(let y=0;y<x.length;++y){let s=x[y],a=y===x.length-1,p=V==="/"?k:k.slice(V.length)||"/",m=zm({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},p),D=s.route;if(!m&&a&&j&&!x[x.length-1].route.index&&(m=zm({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},p)),!m)return null;Object.assign(E,m.params),M.push({params:E,pathname:ja([V,m.pathname]),pathnameBase:zO(ja([V,m.pathnameBase])),route:D}),m.pathnameBase!=="/"&&(V=ja([V,m.pathnameBase]))}return M}function zm(R,k){typeof R=="string"&&(R={path:R,caseSensitive:!1,end:!0});let[j,x]=VO(R.path,R.caseSensitive,R.end),E=k.match(j);if(!E)return null;let V=E[0],M=V.replace(/(.)\/+$/,"$1"),y=E.slice(1);return{params:x.reduce((a,{paramName:p,isOptional:m},D)=>{if(p==="*"){let A=y[D]||"";M=V.slice(0,V.length-A.length).replace(/(.)\/+$/,"$1")}const X=y[D];return m&&!X?a[p]=void 0:a[p]=(X||"").replace(/%2F/g,"/"),a},{}),pathname:V,pathnameBase:M,pattern:R}}function VO(R,k=!1,j=!0){Iu(R==="*"||!R.endsWith("*")||R.endsWith("/*"),`Route path "${R}" will be treated as if it were "${R.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${R.replace(/\*$/,"/*")}".`);let x=[],E="^"+R.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(M,y,s)=>(x.push({paramName:y,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return R.endsWith("*")?(x.push({paramName:"*"}),E+=R==="*"||R==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):j?E+="\\/*$":R!==""&&R!=="/"&&(E+="(?:(?=\\/|$))"),[new RegExp(E,k?void 0:"i"),x]}function HO(R){try{return R.split("/").map(k=>decodeURIComponent(k).replace(/\//g,"%2F")).join("/")}catch(k){return Iu(!1,`The URL path "${R}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${k}).`),R}}function Ba(R,k){if(k==="/")return R;if(!R.toLowerCase().startsWith(k.toLowerCase()))return null;let j=k.endsWith("/")?k.length-1:k.length,x=R.charAt(j);return x&&x!=="/"?null:R.slice(j)||"/"}function KO(R,k="/"){let{pathname:j,search:x="",hash:E=""}=typeof R=="string"?xp(R):R;return{pathname:j?j.startsWith("/")?j:qO(j,k):k,search:FO(x),hash:XO(E)}}function qO(R,k){let j=k.replace(/\/+$/,"").split("/");return R.split("/").forEach(E=>{E===".."?j.length>1&&j.pop():E!=="."&&j.push(E)}),j.length>1?j.join("/"):"/"}function _S(R,k,j,x){return`Cannot include a '${R}' character in a manually specified \`to.${k}\` field [${JSON.stringify(x)}]. Please separate it out to the \`to.${j}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function GO(R){return R.filter((k,j)=>j===0||k.route.path&&k.route.path.length>0)}function kA(R){let k=GO(R);return k.map((j,x)=>x===k.length-1?j.pathname:j.pathnameBase)}function MA(R,k,j,x=!1){let E;typeof R=="string"?E=xp(R):(E={...R},ei(!E.pathname||!E.pathname.includes("?"),_S("?","pathname","search",E)),ei(!E.pathname||!E.pathname.includes("#"),_S("#","pathname","hash",E)),ei(!E.search||!E.search.includes("#"),_S("#","search","hash",E)));let V=R===""||E.pathname==="",M=V?"/":E.pathname,y;if(M==null)y=j;else{let m=k.length-1;if(!x&&M.startsWith("..")){let D=M.split("/");for(;D[0]==="..";)D.shift(),m-=1;E.pathname=D.join("/")}y=m>=0?k[m]:"/"}let s=KO(E,y),a=M&&M!=="/"&&M.endsWith("/"),p=(V||M===".")&&j.endsWith("/");return!s.pathname.endsWith("/")&&(a||p)&&(s.pathname+="/"),s}var ja=R=>R.join("/").replace(/\/\/+/g,"/"),zO=R=>R.replace(/\/+$/,"").replace(/^\/*/,"/"),FO=R=>!R||R==="?"?"":R.startsWith("?")?R:"?"+R,XO=R=>!R||R==="#"?"":R.startsWith("#")?R:"#"+R;function YO(R){return R!=null&&typeof R.status=="number"&&typeof R.statusText=="string"&&typeof R.internal=="boolean"&&"data"in R}var RA=["POST","PUT","PATCH","DELETE"];new Set(RA);var WO=["GET",...RA];new Set(WO);var Ep=xe.createContext(null);Ep.displayName="DataRouter";var Ym=xe.createContext(null);Ym.displayName="DataRouterState";var NA=xe.createContext({isTransitioning:!1});NA.displayName="ViewTransition";var QO=xe.createContext(new Map);QO.displayName="Fetchers";var JO=xe.createContext(null);JO.displayName="Await";var Du=xe.createContext(null);Du.displayName="Navigation";var $y=xe.createContext(null);$y.displayName="Location";var Va=xe.createContext({outlet:null,matches:[],isDataRoute:!1});Va.displayName="Route";var e2=xe.createContext(null);e2.displayName="RouteError";function ZO(R,{relative:k}={}){ei(eg(),"useHref() may be used only in the context of a <Router> component.");let{basename:j,navigator:x}=xe.useContext(Du),{hash:E,pathname:V,search:M}=tg(R,{relative:k}),y=V;return j!=="/"&&(y=V==="/"?j:ja([j,V])),x.createHref({pathname:y,search:M,hash:E})}function eg(){return xe.useContext($y)!=null}function Lf(){return ei(eg(),"useLocation() may be used only in the context of a <Router> component."),xe.useContext($y).location}var PA="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function LA(R){xe.useContext(Du).static||xe.useLayoutEffect(R)}function $O(){let{isDataRoute:R}=xe.useContext(Va);return R?dk():ek()}function ek(){ei(eg(),"useNavigate() may be used only in the context of a <Router> component.");let R=xe.useContext(Ep),{basename:k,navigator:j}=xe.useContext(Du),{matches:x}=xe.useContext(Va),{pathname:E}=Lf(),V=JSON.stringify(kA(x)),M=xe.useRef(!1);return LA(()=>{M.current=!0}),xe.useCallback((s,a={})=>{if(Iu(M.current,PA),!M.current)return;if(typeof s=="number"){j.go(s);return}let p=MA(s,JSON.parse(V),E,a.relative==="path");R==null&&k!=="/"&&(p.pathname=p.pathname==="/"?k:ja([k,p.pathname])),(a.replace?j.replace:j.push)(p,a.state,a)},[k,j,V,E,R])}xe.createContext(null);function tg(R,{relative:k}={}){let{matches:j}=xe.useContext(Va),{pathname:x}=Lf(),E=JSON.stringify(kA(j));return xe.useMemo(()=>MA(R,JSON.parse(E),x,k==="path"),[R,E,x,k])}function tk(R,k){return _A(R,k)}function _A(R,k,j,x){var je;ei(eg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:E,static:V}=xe.useContext(Du),{matches:M}=xe.useContext(Va),y=M[M.length-1],s=y?y.params:{},a=y?y.pathname:"/",p=y?y.pathnameBase:"/",m=y&&y.route;{let ee=m&&m.path||"";UA(a,!m||ee.endsWith("*")||ee.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${ee}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${ee}"> to <Route path="${ee==="/"?"*":`${ee}/*`}">.`)}let D=Lf(),X;if(k){let ee=typeof k=="string"?xp(k):k;ei(p==="/"||((je=ee.pathname)==null?void 0:je.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${ee.pathname}" was given in the \`location\` prop.`),X=ee}else X=D;let A=X.pathname||"/",te=A;if(p!=="/"){let ee=p.replace(/^\//,"").split("/");te="/"+A.replace(/^\//,"").split("/").slice(ee.length).join("/")}let ae=!V&&j&&j.matches&&j.matches.length>0?j.matches:IA(R,{pathname:te});Iu(m||ae!=null,`No routes matched location "${X.pathname}${X.search}${X.hash}" `),Iu(ae==null||ae[ae.length-1].route.element!==void 0||ae[ae.length-1].route.Component!==void 0||ae[ae.length-1].route.lazy!==void 0,`Matched leaf route at location "${X.pathname}${X.search}${X.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let he=lk(ae&&ae.map(ee=>Object.assign({},ee,{params:Object.assign({},s,ee.params),pathname:ja([p,E.encodeLocation?E.encodeLocation(ee.pathname).pathname:ee.pathname]),pathnameBase:ee.pathnameBase==="/"?p:ja([p,E.encodeLocation?E.encodeLocation(ee.pathnameBase).pathname:ee.pathnameBase])})),M,j,x);return k&&he?xe.createElement($y.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...X},navigationType:"POP"}},he):he}function nk(){let R=fk(),k=YO(R)?`${R.status} ${R.statusText}`:R instanceof Error?R.message:JSON.stringify(R),j=R instanceof Error?R.stack:null,x="rgba(200,200,200, 0.5)",E={padding:"0.5rem",backgroundColor:x},V={padding:"2px 4px",backgroundColor:x},M=null;return console.error("Error handled by React Router default ErrorBoundary:",R),M=xe.createElement(xe.Fragment,null,xe.createElement("p",null,"💿 Hey developer 👋"),xe.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",xe.createElement("code",{style:V},"ErrorBoundary")," or"," ",xe.createElement("code",{style:V},"errorElement")," prop on your route.")),xe.createElement(xe.Fragment,null,xe.createElement("h2",null,"Unexpected Application Error!"),xe.createElement("h3",{style:{fontStyle:"italic"}},k),j?xe.createElement("pre",{style:E},j):null,M)}var ik=xe.createElement(nk,null),rk=class extends xe.Component{constructor(R){super(R),this.state={location:R.location,revalidation:R.revalidation,error:R.error}}static getDerivedStateFromError(R){return{error:R}}static getDerivedStateFromProps(R,k){return k.location!==R.location||k.revalidation!=="idle"&&R.revalidation==="idle"?{error:R.error,location:R.location,revalidation:R.revalidation}:{error:R.error!==void 0?R.error:k.error,location:k.location,revalidation:R.revalidation||k.revalidation}}componentDidCatch(R,k){console.error("React Router caught the following error during render",R,k)}render(){return this.state.error!==void 0?xe.createElement(Va.Provider,{value:this.props.routeContext},xe.createElement(e2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ok({routeContext:R,match:k,children:j}){let x=xe.useContext(Ep);return x&&x.static&&x.staticContext&&(k.route.errorElement||k.route.ErrorBoundary)&&(x.staticContext._deepestRenderedBoundaryId=k.route.id),xe.createElement(Va.Provider,{value:R},j)}function lk(R,k=[],j=null,x=null){if(R==null){if(!j)return null;if(j.errors)R=j.matches;else if(k.length===0&&!j.initialized&&j.matches.length>0)R=j.matches;else return null}let E=R,V=j==null?void 0:j.errors;if(V!=null){let s=E.findIndex(a=>a.route.id&&(V==null?void 0:V[a.route.id])!==void 0);ei(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(V).join(",")}`),E=E.slice(0,Math.min(E.length,s+1))}let M=!1,y=-1;if(j)for(let s=0;s<E.length;s++){let a=E[s];if((a.route.HydrateFallback||a.route.hydrateFallbackElement)&&(y=s),a.route.id){let{loaderData:p,errors:m}=j,D=a.route.loader&&!p.hasOwnProperty(a.route.id)&&(!m||m[a.route.id]===void 0);if(a.route.lazy||D){M=!0,y>=0?E=E.slice(0,y+1):E=[E[0]];break}}}return E.reduceRight((s,a,p)=>{let m,D=!1,X=null,A=null;j&&(m=V&&a.route.id?V[a.route.id]:void 0,X=a.route.errorElement||ik,M&&(y<0&&p===0?(UA("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,A=null):y===p&&(D=!0,A=a.route.hydrateFallbackElement||null)));let te=k.concat(E.slice(0,p+1)),ae=()=>{let he;return m?he=X:D?he=A:a.route.Component?he=xe.createElement(a.route.Component,null):a.route.element?he=a.route.element:he=s,xe.createElement(ok,{match:a,routeContext:{outlet:s,matches:te,isDataRoute:j!=null},children:he})};return j&&(a.route.ErrorBoundary||a.route.errorElement||p===0)?xe.createElement(rk,{location:j.location,revalidation:j.revalidation,component:X,error:m,children:ae(),routeContext:{outlet:null,matches:te,isDataRoute:!0}}):ae()},null)}function t2(R){return`${R} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uk(R){let k=xe.useContext(Ep);return ei(k,t2(R)),k}function ak(R){let k=xe.useContext(Ym);return ei(k,t2(R)),k}function sk(R){let k=xe.useContext(Va);return ei(k,t2(R)),k}function n2(R){let k=sk(R),j=k.matches[k.matches.length-1];return ei(j.route.id,`${R} can only be used on routes that contain a unique "id"`),j.route.id}function ck(){return n2("useRouteId")}function fk(){var x;let R=xe.useContext(e2),k=ak("useRouteError"),j=n2("useRouteError");return R!==void 0?R:(x=k.errors)==null?void 0:x[j]}function dk(){let{router:R}=uk("useNavigate"),k=n2("useNavigate"),j=xe.useRef(!1);return LA(()=>{j.current=!0}),xe.useCallback(async(E,V={})=>{Iu(j.current,PA),j.current&&(typeof E=="number"?R.navigate(E):await R.navigate(E,{fromRouteId:k,...V}))},[R,k])}var pA={};function UA(R,k,j){!k&&!pA[R]&&(pA[R]=!0,Iu(!1,j))}xe.memo(pk);function pk({routes:R,future:k,state:j}){return _A(R,void 0,j,k)}function Xy(R){ei(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hk({basename:R="/",children:k=null,location:j,navigationType:x="POP",navigator:E,static:V=!1}){ei(!eg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let M=R.replace(/^\/*/,"/"),y=xe.useMemo(()=>({basename:M,navigator:E,static:V,future:{}}),[M,E,V]);typeof j=="string"&&(j=xp(j));let{pathname:s="/",search:a="",hash:p="",state:m=null,key:D="default"}=j,X=xe.useMemo(()=>{let A=Ba(s,M);return A==null?null:{location:{pathname:A,search:a,hash:p,state:m,key:D},navigationType:x}},[M,s,a,p,m,D,x]);return Iu(X!=null,`<Router basename="${M}"> is not able to match the URL "${s}${a}${p}" because it does not start with the basename, so the <Router> won't render anything.`),X==null?null:xe.createElement(Du.Provider,{value:y},xe.createElement($y.Provider,{children:k,value:X}))}function yk({children:R,location:k}){return tk(YS(R),k)}function YS(R,k=[]){let j=[];return xe.Children.forEach(R,(x,E)=>{if(!xe.isValidElement(x))return;let V=[...k,E];if(x.type===xe.Fragment){j.push.apply(j,YS(x.props.children,V));return}ei(x.type===Xy,`[${typeof x.type=="string"?x.type:x.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ei(!x.props.index||!x.props.children,"An index route cannot have child routes.");let M={id:x.props.id||V.join("-"),caseSensitive:x.props.caseSensitive,element:x.props.element,Component:x.props.Component,index:x.props.index,path:x.props.path,loader:x.props.loader,action:x.props.action,hydrateFallbackElement:x.props.hydrateFallbackElement,HydrateFallback:x.props.HydrateFallback,errorElement:x.props.errorElement,ErrorBoundary:x.props.ErrorBoundary,hasErrorBoundary:x.props.hasErrorBoundary===!0||x.props.ErrorBoundary!=null||x.props.errorElement!=null,shouldRevalidate:x.props.shouldRevalidate,handle:x.props.handle,lazy:x.props.lazy};x.props.children&&(M.children=YS(x.props.children,V)),j.push(M)}),j}var qm="get",Gm="application/x-www-form-urlencoded";function Wm(R){return R!=null&&typeof R.tagName=="string"}function gk(R){return Wm(R)&&R.tagName.toLowerCase()==="button"}function vk(R){return Wm(R)&&R.tagName.toLowerCase()==="form"}function mk(R){return Wm(R)&&R.tagName.toLowerCase()==="input"}function Sk(R){return!!(R.metaKey||R.altKey||R.ctrlKey||R.shiftKey)}function Tk(R,k){return R.button===0&&(!k||k==="_self")&&!Sk(R)}var Hm=null;function wk(){if(Hm===null)try{new FormData(document.createElement("form"),0),Hm=!1}catch{Hm=!0}return Hm}var xk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function US(R){return R!=null&&!xk.has(R)?(Iu(!1,`"${R}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gm}"`),null):R}function Ek(R,k){let j,x,E,V,M;if(vk(R)){let y=R.getAttribute("action");x=y?Ba(y,k):null,j=R.getAttribute("method")||qm,E=US(R.getAttribute("enctype"))||Gm,V=new FormData(R)}else if(gk(R)||mk(R)&&(R.type==="submit"||R.type==="image")){let y=R.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=R.getAttribute("formaction")||y.getAttribute("action");if(x=s?Ba(s,k):null,j=R.getAttribute("formmethod")||y.getAttribute("method")||qm,E=US(R.getAttribute("formenctype"))||US(y.getAttribute("enctype"))||Gm,V=new FormData(y,R),!wk()){let{name:a,type:p,value:m}=R;if(p==="image"){let D=a?`${a}.`:"";V.append(`${D}x`,"0"),V.append(`${D}y`,"0")}else a&&V.append(a,m)}}else{if(Wm(R))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');j=qm,x=null,E=Gm,M=R}return V&&E==="text/plain"&&(M=V,V=void 0),{action:x,method:j.toLowerCase(),encType:E,formData:V,body:M}}function i2(R,k){if(R===!1||R===null||typeof R>"u")throw new Error(k)}async function Ak(R,k){if(R.id in k)return k[R.id];try{let j=await import(R.module);return k[R.id]=j,j}catch(j){return console.error(`Error loading route module \`${R.module}\`, reloading page...`),console.error(j),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ck(R){return R==null?!1:R.href==null?R.rel==="preload"&&typeof R.imageSrcSet=="string"&&typeof R.imageSizes=="string":typeof R.rel=="string"&&typeof R.href=="string"}async function bk(R,k,j){let x=await Promise.all(R.map(async E=>{let V=k.routes[E.route.id];if(V){let M=await Ak(V,j);return M.links?M.links():[]}return[]}));return kk(x.flat(1).filter(Ck).filter(E=>E.rel==="stylesheet"||E.rel==="preload").map(E=>E.rel==="stylesheet"?{...E,rel:"prefetch",as:"style"}:{...E,rel:"prefetch"}))}function hA(R,k,j,x,E,V){let M=(s,a)=>j[a]?s.route.id!==j[a].route.id:!0,y=(s,a)=>{var p;return j[a].pathname!==s.pathname||((p=j[a].route.path)==null?void 0:p.endsWith("*"))&&j[a].params["*"]!==s.params["*"]};return V==="assets"?k.filter((s,a)=>M(s,a)||y(s,a)):V==="data"?k.filter((s,a)=>{var m;let p=x.routes[s.route.id];if(!p||!p.hasLoader)return!1;if(M(s,a)||y(s,a))return!0;if(s.route.shouldRevalidate){let D=s.route.shouldRevalidate({currentUrl:new URL(E.pathname+E.search+E.hash,window.origin),currentParams:((m=j[0])==null?void 0:m.params)||{},nextUrl:new URL(R,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Ik(R,k,{includeHydrateFallback:j}={}){return Dk(R.map(x=>{let E=k.routes[x.route.id];if(!E)return[];let V=[E.module];return E.clientActionModule&&(V=V.concat(E.clientActionModule)),E.clientLoaderModule&&(V=V.concat(E.clientLoaderModule)),j&&E.hydrateFallbackModule&&(V=V.concat(E.hydrateFallbackModule)),E.imports&&(V=V.concat(E.imports)),V}).flat(1))}function Dk(R){return[...new Set(R)]}function Ok(R){let k={},j=Object.keys(R).sort();for(let x of j)k[x]=R[x];return k}function kk(R,k){let j=new Set;return new Set(k),R.reduce((x,E)=>{let V=JSON.stringify(Ok(E));return j.has(V)||(j.add(V),x.push({key:V,link:E})),x},[])}var Mk=new Set([100,101,204,205]);function Rk(R,k){let j=typeof R=="string"?new URL(R,typeof window>"u"?"server://singlefetch/":window.location.origin):R;return j.pathname==="/"?j.pathname="_root.data":k&&Ba(j.pathname,k)==="/"?j.pathname=`${k.replace(/\/$/,"")}/_root.data`:j.pathname=`${j.pathname.replace(/\/$/,"")}.data`,j}function jA(){let R=xe.useContext(Ep);return i2(R,"You must render this element inside a <DataRouterContext.Provider> element"),R}function Nk(){let R=xe.useContext(Ym);return i2(R,"You must render this element inside a <DataRouterStateContext.Provider> element"),R}var r2=xe.createContext(void 0);r2.displayName="FrameworkContext";function BA(){let R=xe.useContext(r2);return i2(R,"You must render this element inside a <HydratedRouter> element"),R}function Pk(R,k){let j=xe.useContext(r2),[x,E]=xe.useState(!1),[V,M]=xe.useState(!1),{onFocus:y,onBlur:s,onMouseEnter:a,onMouseLeave:p,onTouchStart:m}=k,D=xe.useRef(null);xe.useEffect(()=>{if(R==="render"&&M(!0),R==="viewport"){let te=he=>{he.forEach(je=>{M(je.isIntersecting)})},ae=new IntersectionObserver(te,{threshold:.5});return D.current&&ae.observe(D.current),()=>{ae.disconnect()}}},[R]),xe.useEffect(()=>{if(x){let te=setTimeout(()=>{M(!0)},100);return()=>{clearTimeout(te)}}},[x]);let X=()=>{E(!0)},A=()=>{E(!1),M(!1)};return j?R!=="intent"?[V,D,{}]:[V,D,{onFocus:Gy(y,X),onBlur:Gy(s,A),onMouseEnter:Gy(a,X),onMouseLeave:Gy(p,A),onTouchStart:Gy(m,X)}]:[!1,D,{}]}function Gy(R,k){return j=>{R&&R(j),j.defaultPrevented||k(j)}}function Lk({page:R,...k}){let{router:j}=jA(),x=xe.useMemo(()=>IA(j.routes,R,j.basename),[j.routes,R,j.basename]);return x?xe.createElement(Uk,{page:R,matches:x,...k}):null}function _k(R){let{manifest:k,routeModules:j}=BA(),[x,E]=xe.useState([]);return xe.useEffect(()=>{let V=!1;return bk(R,k,j).then(M=>{V||E(M)}),()=>{V=!0}},[R,k,j]),x}function Uk({page:R,matches:k,...j}){let x=Lf(),{manifest:E,routeModules:V}=BA(),{basename:M}=jA(),{loaderData:y,matches:s}=Nk(),a=xe.useMemo(()=>hA(R,k,s,E,x,"data"),[R,k,s,E,x]),p=xe.useMemo(()=>hA(R,k,s,E,x,"assets"),[R,k,s,E,x]),m=xe.useMemo(()=>{if(R===x.pathname+x.search+x.hash)return[];let A=new Set,te=!1;if(k.forEach(he=>{var ee;let je=E.routes[he.route.id];!je||!je.hasLoader||(!a.some(ke=>ke.route.id===he.route.id)&&he.route.id in y&&((ee=V[he.route.id])!=null&&ee.shouldRevalidate)||je.hasClientLoader?te=!0:A.add(he.route.id))}),A.size===0)return[];let ae=Rk(R,M);return te&&A.size>0&&ae.searchParams.set("_routes",k.filter(he=>A.has(he.route.id)).map(he=>he.route.id).join(",")),[ae.pathname+ae.search]},[M,y,x,E,a,k,R,V]),D=xe.useMemo(()=>Ik(p,E),[p,E]),X=_k(p);return xe.createElement(xe.Fragment,null,m.map(A=>xe.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...j})),D.map(A=>xe.createElement("link",{key:A,rel:"modulepreload",href:A,...j})),X.map(({key:A,link:te})=>xe.createElement("link",{key:A,...te})))}function jk(...R){return k=>{R.forEach(j=>{typeof j=="function"?j(k):j!=null&&(j.current=k)})}}var VA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{VA&&(window.__reactRouterVersion="7.5.2")}catch{}function Bk({basename:R,children:k,window:j}){let x=xe.useRef();x.current==null&&(x.current=bO({window:j,v5Compat:!0}));let E=x.current,[V,M]=xe.useState({action:E.action,location:E.location}),y=xe.useCallback(s=>{xe.startTransition(()=>M(s))},[M]);return xe.useLayoutEffect(()=>E.listen(y),[E,y]),xe.createElement(hk,{basename:R,children:k,location:V.location,navigationType:V.action,navigator:E})}var HA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,KA=xe.forwardRef(function({onClick:k,discover:j="render",prefetch:x="none",relative:E,reloadDocument:V,replace:M,state:y,target:s,to:a,preventScrollReset:p,viewTransition:m,...D},X){let{basename:A}=xe.useContext(Du),te=typeof a=="string"&&HA.test(a),ae,he=!1;if(typeof a=="string"&&te&&(ae=a,VA))try{let cn=new URL(window.location.href),L=a.startsWith("//")?new URL(cn.protocol+a):new URL(a),ce=Ba(L.pathname,A);L.origin===cn.origin&&ce!=null?a=ce+L.search+L.hash:he=!0}catch{Iu(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let je=ZO(a,{relative:E}),[ee,ke,Re]=Pk(x,D),nt=Kk(a,{replace:M,state:y,target:s,preventScrollReset:p,relative:E,viewTransition:m});function Gt(cn){k&&k(cn),cn.defaultPrevented||nt(cn)}let ln=xe.createElement("a",{...D,...Re,href:ae||je,onClick:he||V?k:Gt,ref:jk(X,ke),target:s,"data-discover":!te&&j==="render"?"true":void 0});return ee&&!te?xe.createElement(xe.Fragment,null,ln,xe.createElement(Lk,{page:je})):ln});KA.displayName="Link";var Ua=xe.forwardRef(function({"aria-current":k="page",caseSensitive:j=!1,className:x="",end:E=!1,style:V,to:M,viewTransition:y,children:s,...a},p){let m=tg(M,{relative:a.relative}),D=Lf(),X=xe.useContext(Ym),{navigator:A,basename:te}=xe.useContext(Du),ae=X!=null&&Xk(m)&&y===!0,he=A.encodeLocation?A.encodeLocation(m).pathname:m.pathname,je=D.pathname,ee=X&&X.navigation&&X.navigation.location?X.navigation.location.pathname:null;j||(je=je.toLowerCase(),ee=ee?ee.toLowerCase():null,he=he.toLowerCase()),ee&&te&&(ee=Ba(ee,te)||ee);const ke=he!=="/"&&he.endsWith("/")?he.length-1:he.length;let Re=je===he||!E&&je.startsWith(he)&&je.charAt(ke)==="/",nt=ee!=null&&(ee===he||!E&&ee.startsWith(he)&&ee.charAt(he.length)==="/"),Gt={isActive:Re,isPending:nt,isTransitioning:ae},ln=Re?k:void 0,cn;typeof x=="function"?cn=x(Gt):cn=[x,Re?"active":null,nt?"pending":null,ae?"transitioning":null].filter(Boolean).join(" ");let L=typeof V=="function"?V(Gt):V;return xe.createElement(KA,{...a,"aria-current":ln,className:cn,ref:p,style:L,to:M,viewTransition:y},typeof s=="function"?s(Gt):s)});Ua.displayName="NavLink";var Vk=xe.forwardRef(({discover:R="render",fetcherKey:k,navigate:j,reloadDocument:x,replace:E,state:V,method:M=qm,action:y,onSubmit:s,relative:a,preventScrollReset:p,viewTransition:m,...D},X)=>{let A=zk(),te=Fk(y,{relative:a}),ae=M.toLowerCase()==="get"?"get":"post",he=typeof y=="string"&&HA.test(y),je=ee=>{if(s&&s(ee),ee.defaultPrevented)return;ee.preventDefault();let ke=ee.nativeEvent.submitter,Re=(ke==null?void 0:ke.getAttribute("formmethod"))||M;A(ke||ee.currentTarget,{fetcherKey:k,method:Re,navigate:j,replace:E,state:V,relative:a,preventScrollReset:p,viewTransition:m})};return xe.createElement("form",{ref:X,method:ae,action:te,onSubmit:x?s:je,...D,"data-discover":!he&&R==="render"?"true":void 0})});Vk.displayName="Form";function Hk(R){return`${R} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qA(R){let k=xe.useContext(Ep);return ei(k,Hk(R)),k}function Kk(R,{target:k,replace:j,state:x,preventScrollReset:E,relative:V,viewTransition:M}={}){let y=$O(),s=Lf(),a=tg(R,{relative:V});return xe.useCallback(p=>{if(Tk(p,k)){p.preventDefault();let m=j!==void 0?j:Jy(s)===Jy(a);y(R,{replace:m,state:x,preventScrollReset:E,relative:V,viewTransition:M})}},[s,y,a,j,x,k,R,E,V,M])}var qk=0,Gk=()=>`__${String(++qk)}__`;function zk(){let{router:R}=qA("useSubmit"),{basename:k}=xe.useContext(Du),j=ck();return xe.useCallback(async(x,E={})=>{let{action:V,method:M,encType:y,formData:s,body:a}=Ek(x,k);if(E.navigate===!1){let p=E.fetcherKey||Gk();await R.fetch(p,j,E.action||V,{preventScrollReset:E.preventScrollReset,formData:s,body:a,formMethod:E.method||M,formEncType:E.encType||y,flushSync:E.flushSync})}else await R.navigate(E.action||V,{preventScrollReset:E.preventScrollReset,formData:s,body:a,formMethod:E.method||M,formEncType:E.encType||y,replace:E.replace,state:E.state,fromRouteId:j,flushSync:E.flushSync,viewTransition:E.viewTransition})},[R,k,j])}function Fk(R,{relative:k}={}){let{basename:j}=xe.useContext(Du),x=xe.useContext(Va);ei(x,"useFormAction must be used inside a RouteContext");let[E]=x.matches.slice(-1),V={...tg(R||".",{relative:k})},M=Lf();if(R==null){V.search=M.search;let y=new URLSearchParams(V.search),s=y.getAll("index");if(s.some(p=>p==="")){y.delete("index"),s.filter(m=>m).forEach(m=>y.append("index",m));let p=y.toString();V.search=p?`?${p}`:""}}return(!R||R===".")&&E.route.index&&(V.search=V.search?V.search.replace(/^\?/,"?index&"):"?index"),j!=="/"&&(V.pathname=V.pathname==="/"?j:ja([j,V.pathname])),Jy(V)}function Xk(R,k={}){let j=xe.useContext(NA);ei(j!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:x}=qA("useViewTransitionState"),E=tg(R,{relative:k.relative});if(!j.isTransitioning)return!1;let V=Ba(j.currentLocation.pathname,x)||j.currentLocation.pathname,M=Ba(j.nextLocation.pathname,x)||j.nextLocation.pathname;return zm(E.pathname,M)!=null||zm(E.pathname,V)!=null}new TextEncoder;[...Mk];/*!
|
||
* protobuf.js v7.4.0 (c) 2016, daniel wirtz
|
||
* compiled thu, 22 aug 2024 20:30:39 utc
|
||
* licensed under the bsd-3-clause license
|
||
* see: https://github.com/dcodeio/protobuf.js for details
|
||
*/(function(R){(function(k,j,x){var E=function V(M){var y=j[M];return y||k[M][0].call(y=j[M]={exports:{}},V,y,y.exports),y.exports}(x[0]);E.util.global.protobuf=E,typeof define=="function"&&define.amd&&define(["long"],function(V){return V&&V.isLong&&(E.util.Long=V,E.configure()),E}),typeof Wy=="object"&&Wy&&Wy.exports&&(Wy.exports=E)})({1:[function(k,j,x){j.exports=function(E,V){for(var M=Array(arguments.length-1),y=0,s=2,a=!0;s<arguments.length;)M[y++]=arguments[s++];return new Promise(function(p,m){M[y]=function(D){if(a)if(a=!1,D)m(D);else{for(var X=Array(arguments.length-1),A=0;A<X.length;)X[A++]=arguments[A];p.apply(null,X)}};try{E.apply(V||null,M)}catch(D){a&&(a=!1,m(D))}})}},{}],2:[function(k,j,x){x.length=function(s){var a=s.length;if(!a)return 0;for(var p=0;1<--a%4&&(s[0|a]||"")=="=";)++p;return Math.ceil(3*s.length)/4-p};for(var E=Array(64),V=Array(123),M=0;M<64;)V[E[M]=M<26?M+65:M<52?M+71:M<62?M-4:M-59|43]=M++;x.encode=function(s,a,p){for(var m,D=null,X=[],A=0,te=0;a<p;){var ae=s[a++];switch(te){case 0:X[A++]=E[ae>>2],m=(3&ae)<<4,te=1;break;case 1:X[A++]=E[m|ae>>4],m=(15&ae)<<2,te=2;break;case 2:X[A++]=E[m|ae>>6],X[A++]=E[63&ae],te=0}8191<A&&((D=D||[]).push(String.fromCharCode.apply(String,X)),A=0)}return te&&(X[A++]=E[m],X[A++]=61,te===1&&(X[A++]=61)),D?(A&&D.push(String.fromCharCode.apply(String,X.slice(0,A))),D.join("")):String.fromCharCode.apply(String,X.slice(0,A))};var y="invalid encoding";x.decode=function(s,a,p){for(var m,D=p,X=0,A=0;A<s.length;){var te=s.charCodeAt(A++);if(te==61&&1<X)break;if((te=V[te])===R)throw Error(y);switch(X){case 0:m=te,X=1;break;case 1:a[p++]=m<<2|(48&te)>>4,m=te,X=2;break;case 2:a[p++]=(15&m)<<4|(60&te)>>2,m=te,X=3;break;case 3:a[p++]=(3&m)<<6|te,X=0}}if(X===1)throw Error(y);return p-D},x.test=function(s){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s)}},{}],3:[function(k,j,x){function E(){this.t={}}(j.exports=E).prototype.on=function(V,M,y){return(this.t[V]||(this.t[V]=[])).push({fn:M,ctx:y||this}),this},E.prototype.off=function(V,M){if(V===R)this.t={};else if(M===R)this.t[V]=[];else for(var y=this.t[V],s=0;s<y.length;)y[s].fn===M?y.splice(s,1):++s;return this},E.prototype.emit=function(V){var M=this.t[V];if(M){for(var y=[],s=1;s<arguments.length;)y.push(arguments[s++]);for(s=0;s<M.length;)M[s].fn.apply(M[s++].ctx,y)}return this}},{}],4:[function(k,j,x){function E(a){function p(ce,ye,it,Le){var De=ye<0?1:0;ce((ye=De?-ye:ye)===0?0<1/ye?0:2147483648:isNaN(ye)?2143289344:34028234663852886e22<ye?(De<<31|2139095040)>>>0:ye<11754943508222875e-54?(De<<31|Math.round(ye/1401298464324817e-60))>>>0:(De<<31|127+(ce=Math.floor(Math.log(ye)/Math.LN2))<<23|8388607&Math.round(ye*Math.pow(2,-ce)*8388608))>>>0,it,Le)}function m(ce,ye,it){return ce=ce(ye,it),ye=2*(ce>>31)+1,it=ce>>>23&255,ce&=8388607,it==255?ce?NaN:1/0*ye:it==0?1401298464324817e-60*ye*ce:ye*Math.pow(2,it-150)*(8388608+ce)}function D(ce,ye,it){ae[0]=ce,ye[it]=he[0],ye[it+1]=he[1],ye[it+2]=he[2],ye[it+3]=he[3]}function X(ce,ye,it){ae[0]=ce,ye[it]=he[3],ye[it+1]=he[2],ye[it+2]=he[1],ye[it+3]=he[0]}function A(ce,ye){return he[0]=ce[ye],he[1]=ce[ye+1],he[2]=ce[ye+2],he[3]=ce[ye+3],ae[0]}function te(ce,ye){return he[3]=ce[ye],he[2]=ce[ye+1],he[1]=ce[ye+2],he[0]=ce[ye+3],ae[0]}var ae,he,je,ee,ke;function Re(ce,ye,it,Le,De,Te){var _e,ft=Le<0?1:0;(Le=ft?-Le:Le)===0?(ce(0,De,Te+ye),ce(0<1/Le?0:2147483648,De,Te+it)):isNaN(Le)?(ce(0,De,Te+ye),ce(2146959360,De,Te+it)):17976931348623157e292<Le?(ce(0,De,Te+ye),ce((ft<<31|2146435072)>>>0,De,Te+it)):Le<22250738585072014e-324?(ce((_e=Le/5e-324)>>>0,De,Te+ye),ce((ft<<31|_e/4294967296)>>>0,De,Te+it)):(ce(4503599627370496*(_e=Le*Math.pow(2,-(Le=(Le=Math.floor(Math.log(Le)/Math.LN2))===1024?1023:Le)))>>>0,De,Te+ye),ce((ft<<31|Le+1023<<20|1048576*_e&1048575)>>>0,De,Te+it))}function nt(ce,ye,it,Le,De){return ye=ce(Le,De+ye),ce=ce(Le,De+it),Le=2*(ce>>31)+1,De=ce>>>20&2047,it=4294967296*(1048575&ce)+ye,De==2047?it?NaN:1/0*Le:De==0?5e-324*Le*it:Le*Math.pow(2,De-1075)*(it+4503599627370496)}function Gt(ce,ye,it){je[0]=ce,ye[it]=ee[0],ye[it+1]=ee[1],ye[it+2]=ee[2],ye[it+3]=ee[3],ye[it+4]=ee[4],ye[it+5]=ee[5],ye[it+6]=ee[6],ye[it+7]=ee[7]}function ln(ce,ye,it){je[0]=ce,ye[it]=ee[7],ye[it+1]=ee[6],ye[it+2]=ee[5],ye[it+3]=ee[4],ye[it+4]=ee[3],ye[it+5]=ee[2],ye[it+6]=ee[1],ye[it+7]=ee[0]}function cn(ce,ye){return ee[0]=ce[ye],ee[1]=ce[ye+1],ee[2]=ce[ye+2],ee[3]=ce[ye+3],ee[4]=ce[ye+4],ee[5]=ce[ye+5],ee[6]=ce[ye+6],ee[7]=ce[ye+7],je[0]}function L(ce,ye){return ee[7]=ce[ye],ee[6]=ce[ye+1],ee[5]=ce[ye+2],ee[4]=ce[ye+3],ee[3]=ce[ye+4],ee[2]=ce[ye+5],ee[1]=ce[ye+6],ee[0]=ce[ye+7],je[0]}return typeof Float32Array<"u"?(ae=new Float32Array([-0]),he=new Uint8Array(ae.buffer),ke=he[3]===128,a.writeFloatLE=ke?D:X,a.writeFloatBE=ke?X:D,a.readFloatLE=ke?A:te,a.readFloatBE=ke?te:A):(a.writeFloatLE=p.bind(null,V),a.writeFloatBE=p.bind(null,M),a.readFloatLE=m.bind(null,y),a.readFloatBE=m.bind(null,s)),typeof Float64Array<"u"?(je=new Float64Array([-0]),ee=new Uint8Array(je.buffer),ke=ee[7]===128,a.writeDoubleLE=ke?Gt:ln,a.writeDoubleBE=ke?ln:Gt,a.readDoubleLE=ke?cn:L,a.readDoubleBE=ke?L:cn):(a.writeDoubleLE=Re.bind(null,V,0,4),a.writeDoubleBE=Re.bind(null,M,4,0),a.readDoubleLE=nt.bind(null,y,0,4),a.readDoubleBE=nt.bind(null,s,4,0)),a}function V(a,p,m){p[m]=255&a,p[m+1]=a>>>8&255,p[m+2]=a>>>16&255,p[m+3]=a>>>24}function M(a,p,m){p[m]=a>>>24,p[m+1]=a>>>16&255,p[m+2]=a>>>8&255,p[m+3]=255&a}function y(a,p){return(a[p]|a[p+1]<<8|a[p+2]<<16|a[p+3]<<24)>>>0}function s(a,p){return(a[p]<<24|a[p+1]<<16|a[p+2]<<8|a[p+3])>>>0}j.exports=E(E)},{}],5:[function(k,j,x){function E(V){try{var M=void 0;if(M&&(M.length||Object.keys(M).length))return M}catch{}return null}j.exports=E},{}],6:[function(k,j,x){j.exports=function(E,V,M){var y=M||8192,s=y>>>1,a=null,p=y;return function(m){return m<1||s<m?E(m):(y<p+m&&(a=E(y),p=0),m=V.call(a,p,p+=m),7&p&&(p=1+(7|p)),m)}}},{}],7:[function(k,j,x){x.length=function(E){for(var V,M=0,y=0;y<E.length;++y)(V=E.charCodeAt(y))<128?M+=1:V<2048?M+=2:(64512&V)==55296&&(64512&E.charCodeAt(y+1))==56320?(++y,M+=4):M+=3;return M},x.read=function(E,V,M){if(M-V<1)return"";for(var y,s=null,a=[],p=0;V<M;)(y=E[V++])<128?a[p++]=y:191<y&&y<224?a[p++]=(31&y)<<6|63&E[V++]:239<y&&y<365?(y=((7&y)<<18|(63&E[V++])<<12|(63&E[V++])<<6|63&E[V++])-65536,a[p++]=55296+(y>>10),a[p++]=56320+(1023&y)):a[p++]=(15&y)<<12|(63&E[V++])<<6|63&E[V++],8191<p&&((s=s||[]).push(String.fromCharCode.apply(String,a)),p=0);return s?(p&&s.push(String.fromCharCode.apply(String,a.slice(0,p))),s.join("")):String.fromCharCode.apply(String,a.slice(0,p))},x.write=function(E,V,M){for(var y,s,a=M,p=0;p<E.length;++p)(y=E.charCodeAt(p))<128?V[M++]=y:(y<2048?V[M++]=y>>6|192:((64512&y)==55296&&(64512&(s=E.charCodeAt(p+1)))==56320?(++p,V[M++]=(y=65536+((1023&y)<<10)+(1023&s))>>18|240,V[M++]=y>>12&63|128):V[M++]=y>>12|224,V[M++]=y>>6&63|128),V[M++]=63&y|128);return M-a}},{}],8:[function(k,j,x){var E=x;function V(){E.util.n(),E.Writer.n(E.BufferWriter),E.Reader.n(E.BufferReader)}E.build="minimal",E.Writer=k(16),E.BufferWriter=k(17),E.Reader=k(9),E.BufferReader=k(10),E.util=k(15),E.rpc=k(12),E.roots=k(11),E.configure=V,V()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(k,j,x){j.exports=a;var E,V=k(15),M=V.LongBits,y=V.utf8;function s(ae,he){return RangeError("index out of range: "+ae.pos+" + "+(he||1)+" > "+ae.len)}function a(ae){this.buf=ae,this.pos=0,this.len=ae.length}function p(){return V.Buffer?function(ae){return(a.create=function(he){return V.Buffer.isBuffer(he)?new E(he):D(he)})(ae)}:D}var m,D=typeof Uint8Array<"u"?function(ae){if(ae instanceof Uint8Array||Array.isArray(ae))return new a(ae);throw Error("illegal buffer")}:function(ae){if(Array.isArray(ae))return new a(ae);throw Error("illegal buffer")};function X(){var ae=new M(0,0),he=0;if(!(4<this.len-this.pos)){for(;he<3;++he){if(this.pos>=this.len)throw s(this);if(ae.lo=(ae.lo|(127&this.buf[this.pos])<<7*he)>>>0,this.buf[this.pos++]<128)return ae}return ae.lo=(ae.lo|(127&this.buf[this.pos++])<<7*he)>>>0,ae}for(;he<4;++he)if(ae.lo=(ae.lo|(127&this.buf[this.pos])<<7*he)>>>0,this.buf[this.pos++]<128)return ae;if(ae.lo=(ae.lo|(127&this.buf[this.pos])<<28)>>>0,ae.hi=(ae.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return ae;if(he=0,4<this.len-this.pos){for(;he<5;++he)if(ae.hi=(ae.hi|(127&this.buf[this.pos])<<7*he+3)>>>0,this.buf[this.pos++]<128)return ae}else for(;he<5;++he){if(this.pos>=this.len)throw s(this);if(ae.hi=(ae.hi|(127&this.buf[this.pos])<<7*he+3)>>>0,this.buf[this.pos++]<128)return ae}throw Error("invalid varint encoding")}function A(ae,he){return(ae[he-4]|ae[he-3]<<8|ae[he-2]<<16|ae[he-1]<<24)>>>0}function te(){if(this.pos+8>this.len)throw s(this,8);return new M(A(this.buf,this.pos+=4),A(this.buf,this.pos+=4))}a.create=p(),a.prototype.i=V.Array.prototype.subarray||V.Array.prototype.slice,a.prototype.uint32=(m=4294967295,function(){if(m=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(m=(m|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(m=(m|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(m=(m|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(m=(m|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return m;throw this.pos=this.len,s(this,10)}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var ae=this.uint32();return ae>>>1^-(1&ae)|0},a.prototype.bool=function(){return this.uint32()!==0},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return A(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|A(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var ae=V.float.readFloatLE(this.buf,this.pos);return this.pos+=4,ae},a.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var ae=V.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,ae},a.prototype.bytes=function(){var ae=this.uint32(),he=this.pos,je=this.pos+ae;if(je>this.len)throw s(this,ae);return this.pos+=ae,Array.isArray(this.buf)?this.buf.slice(he,je):he===je?(ae=V.Buffer)?ae.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,he,je)},a.prototype.string=function(){var ae=this.bytes();return y.read(ae,0,ae.length)},a.prototype.skip=function(ae){if(typeof ae=="number"){if(this.pos+ae>this.len)throw s(this,ae);this.pos+=ae}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function(ae){switch(ae){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(ae=7&this.uint32())!=4;)this.skipType(ae);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+ae+" at offset "+this.pos)}return this},a.n=function(ae){E=ae,a.create=p(),E.n();var he=V.Long?"toLong":"toNumber";V.merge(a.prototype,{int64:function(){return X.call(this)[he](!1)},uint64:function(){return X.call(this)[he](!0)},sint64:function(){return X.call(this).zzDecode()[he](!1)},fixed64:function(){return te.call(this)[he](!0)},sfixed64:function(){return te.call(this)[he](!1)}})}},{15:15}],10:[function(k,j,x){j.exports=M;var E=k(9),V=((M.prototype=Object.create(E.prototype)).constructor=M,k(15));function M(y){E.call(this,y)}M.n=function(){V.Buffer&&(M.prototype.i=V.Buffer.prototype.slice)},M.prototype.string=function(){var y=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+y,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+y,this.len))},M.n()},{15:15,9:9}],11:[function(k,j,x){j.exports={}},{}],12:[function(k,j,x){x.Service=k(13)},{13:13}],13:[function(k,j,x){j.exports=V;var E=k(15);function V(M,y,s){if(typeof M!="function")throw TypeError("rpcImpl must be a function");E.EventEmitter.call(this),this.rpcImpl=M,this.requestDelimited=!!y,this.responseDelimited=!!s}((V.prototype=Object.create(E.EventEmitter.prototype)).constructor=V).prototype.rpcCall=function M(y,s,a,p,m){if(!p)throw TypeError("request must be specified");var D=this;if(!m)return E.asPromise(M,D,y,s,a,p);if(!D.rpcImpl)return setTimeout(function(){m(Error("already ended"))},0),R;try{return D.rpcImpl(y,s[D.requestDelimited?"encodeDelimited":"encode"](p).finish(),function(X,A){if(X)return D.emit("error",X,y),m(X);if(A===null)return D.end(!0),R;if(!(A instanceof a))try{A=a[D.responseDelimited?"decodeDelimited":"decode"](A)}catch(te){return D.emit("error",te,y),m(te)}return D.emit("data",A,y),m(null,A)})}catch(X){return D.emit("error",X,y),setTimeout(function(){m(X)},0),R}},V.prototype.end=function(M){return this.rpcImpl&&(M||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(k,j,x){j.exports=V;var E=k(15);function V(s,a){this.lo=s>>>0,this.hi=a>>>0}var M=V.zero=new V(0,0),y=(M.toNumber=function(){return 0},M.zzEncode=M.zzDecode=function(){return this},M.length=function(){return 1},V.zeroHash="\0\0\0\0\0\0\0\0",V.fromNumber=function(s){var a,p;return s===0?M:(p=(s=(a=s<0)?-s:s)>>>0,s=(s-p)/4294967296>>>0,a&&(s=~s>>>0,p=~p>>>0,4294967295<++p&&(p=0,4294967295<++s&&(s=0))),new V(p,s))},V.from=function(s){if(typeof s=="number")return V.fromNumber(s);if(E.isString(s)){if(!E.Long)return V.fromNumber(parseInt(s,10));s=E.Long.fromString(s)}return s.low||s.high?new V(s.low>>>0,s.high>>>0):M},V.prototype.toNumber=function(s){var a;return!s&&this.hi>>>31?(s=1+~this.lo>>>0,a=~this.hi>>>0,-(s+4294967296*(a=s?a:a+1>>>0))):this.lo+4294967296*this.hi},V.prototype.toLong=function(s){return E.Long?new E.Long(0|this.lo,0|this.hi,!!s):{low:0|this.lo,high:0|this.hi,unsigned:!!s}},String.prototype.charCodeAt);V.fromHash=function(s){return s==="\0\0\0\0\0\0\0\0"?M:new V((y.call(s,0)|y.call(s,1)<<8|y.call(s,2)<<16|y.call(s,3)<<24)>>>0,(y.call(s,4)|y.call(s,5)<<8|y.call(s,6)<<16|y.call(s,7)<<24)>>>0)},V.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},V.prototype.zzEncode=function(){var s=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^s)>>>0,this.lo=(this.lo<<1^s)>>>0,this},V.prototype.zzDecode=function(){var s=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^s)>>>0,this.hi=(this.hi>>>1^s)>>>0,this},V.prototype.length=function(){var s=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p==0?a==0?s<16384?s<128?1:2:s<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:p<128?9:10}},{15:15}],15:[function(k,j,x){var E=x;function V(y,s,a){for(var p=Object.keys(s),m=0;m<p.length;++m)y[p[m]]!==R&&a||(y[p[m]]=s[p[m]]);return y}function M(y){function s(a,p){if(!(this instanceof s))return new s(a,p);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack||""}),p&&V(this,p)}return s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return y},set:R,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),s}E.asPromise=k(1),E.base64=k(2),E.EventEmitter=k(3),E.float=k(4),E.inquire=k(5),E.utf8=k(7),E.pool=k(6),E.LongBits=k(14),E.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),E.global=E.isNode&&global||!1||typeof self<"u"&&self||this,E.emptyArray=Object.freeze?Object.freeze([]):[],E.emptyObject=Object.freeze?Object.freeze({}):{},E.isInteger=Number.isInteger||function(y){return typeof y=="number"&&isFinite(y)&&Math.floor(y)===y},E.isString=function(y){return typeof y=="string"||y instanceof String},E.isObject=function(y){return y&&typeof y=="object"},E.isset=E.isSet=function(y,s){var a=y[s];return a!=null&&y.hasOwnProperty(s)&&(typeof a!="object"||0<(Array.isArray(a)?a:Object.keys(a)).length)},E.Buffer=function(){try{var y=E.inquire("buffer").Buffer;return y.prototype.utf8Write?y:null}catch{return null}}(),E.r=null,E.u=null,E.newBuffer=function(y){return typeof y=="number"?E.Buffer?E.u(y):new E.Array(y):E.Buffer?E.r(y):typeof Uint8Array>"u"?y:new Uint8Array(y)},E.Array=typeof Uint8Array<"u"?Uint8Array:Array,E.Long=E.global.dcodeIO&&E.global.dcodeIO.Long||E.global.Long||E.inquire("long"),E.key2Re=/^true|false|0|1$/,E.key32Re=/^-?(?:0|[1-9][0-9]*)$/,E.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,E.longToHash=function(y){return y?E.LongBits.from(y).toHash():E.LongBits.zeroHash},E.longFromHash=function(y,s){return y=E.LongBits.fromHash(y),E.Long?E.Long.fromBits(y.lo,y.hi,s):y.toNumber(!!s)},E.merge=V,E.lcFirst=function(y){return(y[0]||"").toLowerCase()+y.substring(1)},E.newError=M,E.ProtocolError=M("ProtocolError"),E.oneOfGetter=function(y){for(var s={},a=0;a<y.length;++a)s[y[a]]=1;return function(){for(var p=Object.keys(this),m=p.length-1;-1<m;--m)if(s[p[m]]===1&&this[p[m]]!==R&&this[p[m]]!==null)return p[m]}},E.oneOfSetter=function(y){return function(s){for(var a=0;a<y.length;++a)y[a]!==s&&delete this[y[a]]}},E.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},E.n=function(){var y=E.Buffer;y?(E.r=y.from!==Uint8Array.from&&y.from||function(s,a){return new y(s,a)},E.u=y.allocUnsafe||function(s){return new y(s)}):E.r=E.u=null}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(k,j,x){j.exports=D;var E,V=k(15),M=V.LongBits,y=V.base64,s=V.utf8;function a(ee,ke,Re){this.fn=ee,this.len=ke,this.next=R,this.val=Re}function p(){}function m(ee){this.head=ee.head,this.tail=ee.tail,this.len=ee.len,this.next=ee.states}function D(){this.len=0,this.head=new a(p,0,0),this.tail=this.head,this.states=null}function X(){return V.Buffer?function(){return(D.create=function(){return new E})()}:function(){return new D}}function A(ee,ke,Re){ke[Re]=255&ee}function te(ee,ke){this.len=ee,this.next=R,this.val=ke}function ae(ee,ke,Re){for(;ee.hi;)ke[Re++]=127&ee.lo|128,ee.lo=(ee.lo>>>7|ee.hi<<25)>>>0,ee.hi>>>=7;for(;127<ee.lo;)ke[Re++]=127&ee.lo|128,ee.lo=ee.lo>>>7;ke[Re++]=ee.lo}function he(ee,ke,Re){ke[Re]=255&ee,ke[Re+1]=ee>>>8&255,ke[Re+2]=ee>>>16&255,ke[Re+3]=ee>>>24}D.create=X(),D.alloc=function(ee){return new V.Array(ee)},V.Array!==Array&&(D.alloc=V.pool(D.alloc,V.Array.prototype.subarray)),D.prototype.e=function(ee,ke,Re){return this.tail=this.tail.next=new a(ee,ke,Re),this.len+=ke,this},(te.prototype=Object.create(a.prototype)).fn=function(ee,ke,Re){for(;127<ee;)ke[Re++]=127&ee|128,ee>>>=7;ke[Re]=ee},D.prototype.uint32=function(ee){return this.len+=(this.tail=this.tail.next=new te((ee>>>=0)<128?1:ee<16384?2:ee<2097152?3:ee<268435456?4:5,ee)).len,this},D.prototype.int32=function(ee){return ee<0?this.e(ae,10,M.fromNumber(ee)):this.uint32(ee)},D.prototype.sint32=function(ee){return this.uint32((ee<<1^ee>>31)>>>0)},D.prototype.int64=D.prototype.uint64=function(ee){return ee=M.from(ee),this.e(ae,ee.length(),ee)},D.prototype.sint64=function(ee){return ee=M.from(ee).zzEncode(),this.e(ae,ee.length(),ee)},D.prototype.bool=function(ee){return this.e(A,1,ee?1:0)},D.prototype.sfixed32=D.prototype.fixed32=function(ee){return this.e(he,4,ee>>>0)},D.prototype.sfixed64=D.prototype.fixed64=function(ee){return ee=M.from(ee),this.e(he,4,ee.lo).e(he,4,ee.hi)},D.prototype.float=function(ee){return this.e(V.float.writeFloatLE,4,ee)},D.prototype.double=function(ee){return this.e(V.float.writeDoubleLE,8,ee)};var je=V.Array.prototype.set?function(ee,ke,Re){ke.set(ee,Re)}:function(ee,ke,Re){for(var nt=0;nt<ee.length;++nt)ke[Re+nt]=ee[nt]};D.prototype.bytes=function(ee){var ke,Re=ee.length>>>0;return Re?(V.isString(ee)&&(ke=D.alloc(Re=y.length(ee)),y.decode(ee,ke,0),ee=ke),this.uint32(Re).e(je,Re,ee)):this.e(A,1,0)},D.prototype.string=function(ee){var ke=s.length(ee);return ke?this.uint32(ke).e(s.write,ke,ee):this.e(A,1,0)},D.prototype.fork=function(){return this.states=new m(this),this.head=this.tail=new a(p,0,0),this.len=0,this},D.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(p,0,0),this.len=0),this},D.prototype.ldelim=function(){var ee=this.head,ke=this.tail,Re=this.len;return this.reset().uint32(Re),Re&&(this.tail.next=ee.next,this.tail=ke,this.len+=Re),this},D.prototype.finish=function(){for(var ee=this.head.next,ke=this.constructor.alloc(this.len),Re=0;ee;)ee.fn(ee.val,ke,Re),Re+=ee.len,ee=ee.next;return ke},D.n=function(ee){E=ee,D.create=X(),E.n()}},{15:15}],17:[function(k,j,x){j.exports=M;var E=k(16),V=((M.prototype=Object.create(E.prototype)).constructor=M,k(15));function M(){E.call(this)}function y(s,a,p){s.length<40?V.utf8.write(s,a,p):a.utf8Write?a.utf8Write(s,p):a.write(s,p)}M.n=function(){M.alloc=V.u,M.writeBytesBuffer=V.Buffer&&V.Buffer.prototype instanceof Uint8Array&&V.Buffer.prototype.set.name==="set"?function(s,a,p){a.set(s,p)}:function(s,a,p){if(s.copy)s.copy(a,p,0,s.length);else for(var m=0;m<s.length;)a[p++]=s[m++]}},M.prototype.bytes=function(s){var a=(s=V.isString(s)?V.r(s,"base64"):s).length>>>0;return this.uint32(a),a&&this.e(M.writeBytesBuffer,a,s),this},M.prototype.string=function(s){var a=V.Buffer.byteLength(s);return this.uint32(a),a&&this.e(y,a,s),this},M.n()},{15:15,16:16}]},{},[8])})();(function(R){var k=R.Reader,j=R.Writer,x=R.util,E=R.roots.default||(R.roots.default={});return E.license_protocol=function(){var V={};return V.LicenseType=function(){var M={},y=Object.create(M);return y[M[1]="STREAMING"]=1,y[M[2]="OFFLINE"]=2,y[M[3]="AUTOMATIC"]=3,y}(),V.PlatformVerificationStatus=function(){var M={},y=Object.create(M);return y[M[0]="PLATFORM_UNVERIFIED"]=0,y[M[1]="PLATFORM_TAMPERED"]=1,y[M[2]="PLATFORM_SOFTWARE_VERIFIED"]=2,y[M[3]="PLATFORM_HARDWARE_VERIFIED"]=3,y[M[4]="PLATFORM_NO_VERIFICATION"]=4,y[M[5]="PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED"]=5,y}(),V.LicenseIdentification=function(){function M(y){if(y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.requestId=x.newBuffer([]),M.prototype.sessionId=x.newBuffer([]),M.prototype.purchaseId=x.newBuffer([]),M.prototype.type=1,M.prototype.version=0,M.prototype.providerSessionToken=x.newBuffer([]),M.create=function(s){return new M(s)},M.encode=function(s,a){return a||(a=j.create()),s.requestId!=null&&Object.hasOwnProperty.call(s,"requestId")&&a.uint32(10).bytes(s.requestId),s.sessionId!=null&&Object.hasOwnProperty.call(s,"sessionId")&&a.uint32(18).bytes(s.sessionId),s.purchaseId!=null&&Object.hasOwnProperty.call(s,"purchaseId")&&a.uint32(26).bytes(s.purchaseId),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(32).int32(s.type),s.version!=null&&Object.hasOwnProperty.call(s,"version")&&a.uint32(40).int32(s.version),s.providerSessionToken!=null&&Object.hasOwnProperty.call(s,"providerSessionToken")&&a.uint32(50).bytes(s.providerSessionToken),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.LicenseIdentification;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.requestId=s.bytes();break}case 2:{m.sessionId=s.bytes();break}case 3:{m.purchaseId=s.bytes();break}case 4:{m.type=s.int32();break}case 5:{m.version=s.int32();break}case 6:{m.providerSessionToken=s.bytes();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.requestId!=null&&s.hasOwnProperty("requestId")&&!(s.requestId&&typeof s.requestId.length=="number"||x.isString(s.requestId)))return"requestId: buffer expected";if(s.sessionId!=null&&s.hasOwnProperty("sessionId")&&!(s.sessionId&&typeof s.sessionId.length=="number"||x.isString(s.sessionId)))return"sessionId: buffer expected";if(s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&!(s.purchaseId&&typeof s.purchaseId.length=="number"||x.isString(s.purchaseId)))return"purchaseId: buffer expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:break}return s.version!=null&&s.hasOwnProperty("version")&&!x.isInteger(s.version)?"version: integer expected":s.providerSessionToken!=null&&s.hasOwnProperty("providerSessionToken")&&!(s.providerSessionToken&&typeof s.providerSessionToken.length=="number"||x.isString(s.providerSessionToken))?"providerSessionToken: buffer expected":null},M.fromObject=function(s){if(s instanceof E.license_protocol.LicenseIdentification)return s;var a=new E.license_protocol.LicenseIdentification;switch(s.requestId!=null&&(typeof s.requestId=="string"?x.base64.decode(s.requestId,a.requestId=x.newBuffer(x.base64.length(s.requestId)),0):s.requestId.length>=0&&(a.requestId=s.requestId)),s.sessionId!=null&&(typeof s.sessionId=="string"?x.base64.decode(s.sessionId,a.sessionId=x.newBuffer(x.base64.length(s.sessionId)),0):s.sessionId.length>=0&&(a.sessionId=s.sessionId)),s.purchaseId!=null&&(typeof s.purchaseId=="string"?x.base64.decode(s.purchaseId,a.purchaseId=x.newBuffer(x.base64.length(s.purchaseId)),0):s.purchaseId.length>=0&&(a.purchaseId=s.purchaseId)),s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"STREAMING":case 1:a.type=1;break;case"OFFLINE":case 2:a.type=2;break;case"AUTOMATIC":case 3:a.type=3;break}return s.version!=null&&(a.version=s.version|0),s.providerSessionToken!=null&&(typeof s.providerSessionToken=="string"?x.base64.decode(s.providerSessionToken,a.providerSessionToken=x.newBuffer(x.base64.length(s.providerSessionToken)),0):s.providerSessionToken.length>=0&&(a.providerSessionToken=s.providerSessionToken)),a},M.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(a.bytes===String?p.requestId="":(p.requestId=[],a.bytes!==Array&&(p.requestId=x.newBuffer(p.requestId))),a.bytes===String?p.sessionId="":(p.sessionId=[],a.bytes!==Array&&(p.sessionId=x.newBuffer(p.sessionId))),a.bytes===String?p.purchaseId="":(p.purchaseId=[],a.bytes!==Array&&(p.purchaseId=x.newBuffer(p.purchaseId))),p.type=a.enums===String?"STREAMING":1,p.version=0,a.bytes===String?p.providerSessionToken="":(p.providerSessionToken=[],a.bytes!==Array&&(p.providerSessionToken=x.newBuffer(p.providerSessionToken)))),s.requestId!=null&&s.hasOwnProperty("requestId")&&(p.requestId=a.bytes===String?x.base64.encode(s.requestId,0,s.requestId.length):a.bytes===Array?Array.prototype.slice.call(s.requestId):s.requestId),s.sessionId!=null&&s.hasOwnProperty("sessionId")&&(p.sessionId=a.bytes===String?x.base64.encode(s.sessionId,0,s.sessionId.length):a.bytes===Array?Array.prototype.slice.call(s.sessionId):s.sessionId),s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&(p.purchaseId=a.bytes===String?x.base64.encode(s.purchaseId,0,s.purchaseId.length):a.bytes===Array?Array.prototype.slice.call(s.purchaseId):s.purchaseId),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.LicenseType[s.type]===void 0?s.type:E.license_protocol.LicenseType[s.type]:s.type),s.version!=null&&s.hasOwnProperty("version")&&(p.version=s.version),s.providerSessionToken!=null&&s.hasOwnProperty("providerSessionToken")&&(p.providerSessionToken=a.bytes===String?x.base64.encode(s.providerSessionToken,0,s.providerSessionToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerSessionToken):s.providerSessionToken),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseIdentification"},M}(),V.License=function(){function M(y){if(this.key=[],this.groupIds=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.id=null,M.prototype.policy=null,M.prototype.key=x.emptyArray,M.prototype.licenseStartTime=x.Long?x.Long.fromBits(0,0,!1):0,M.prototype.remoteAttestationVerified=!1,M.prototype.providerClientToken=x.newBuffer([]),M.prototype.protectionScheme=0,M.prototype.srmRequirement=x.newBuffer([]),M.prototype.srmUpdate=x.newBuffer([]),M.prototype.platformVerificationStatus=4,M.prototype.groupIds=x.emptyArray,M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.id!=null&&Object.hasOwnProperty.call(s,"id")&&E.license_protocol.LicenseIdentification.encode(s.id,a.uint32(10).fork()).ldelim(),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&E.license_protocol.License.Policy.encode(s.policy,a.uint32(18).fork()).ldelim(),s.key!=null&&s.key.length)for(var p=0;p<s.key.length;p+=1)E.license_protocol.License.KeyContainer.encode(s.key[p],a.uint32(26).fork()).ldelim();if(s.licenseStartTime!=null&&Object.hasOwnProperty.call(s,"licenseStartTime")&&a.uint32(32).int64(s.licenseStartTime),s.remoteAttestationVerified!=null&&Object.hasOwnProperty.call(s,"remoteAttestationVerified")&&a.uint32(40).bool(s.remoteAttestationVerified),s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&a.uint32(50).bytes(s.providerClientToken),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&a.uint32(56).uint32(s.protectionScheme),s.srmRequirement!=null&&Object.hasOwnProperty.call(s,"srmRequirement")&&a.uint32(66).bytes(s.srmRequirement),s.srmUpdate!=null&&Object.hasOwnProperty.call(s,"srmUpdate")&&a.uint32(74).bytes(s.srmUpdate),s.platformVerificationStatus!=null&&Object.hasOwnProperty.call(s,"platformVerificationStatus")&&a.uint32(80).int32(s.platformVerificationStatus),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)a.uint32(90).bytes(s.groupIds[p]);return a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.License;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.id=E.license_protocol.LicenseIdentification.decode(s,s.uint32());break}case 2:{m.policy=E.license_protocol.License.Policy.decode(s,s.uint32());break}case 3:{m.key&&m.key.length||(m.key=[]),m.key.push(E.license_protocol.License.KeyContainer.decode(s,s.uint32()));break}case 4:{m.licenseStartTime=s.int64();break}case 5:{m.remoteAttestationVerified=s.bool();break}case 6:{m.providerClientToken=s.bytes();break}case 7:{m.protectionScheme=s.uint32();break}case 8:{m.srmRequirement=s.bytes();break}case 9:{m.srmUpdate=s.bytes();break}case 10:{m.platformVerificationStatus=s.int32();break}case 11:{m.groupIds&&m.groupIds.length||(m.groupIds=[]),m.groupIds.push(s.bytes());break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.id!=null&&s.hasOwnProperty("id")){var a=E.license_protocol.LicenseIdentification.verify(s.id);if(a)return"id."+a}if(s.policy!=null&&s.hasOwnProperty("policy")){var a=E.license_protocol.License.Policy.verify(s.policy);if(a)return"policy."+a}if(s.key!=null&&s.hasOwnProperty("key")){if(!Array.isArray(s.key))return"key: array expected";for(var p=0;p<s.key.length;p+=1){var a=E.license_protocol.License.KeyContainer.verify(s.key[p]);if(a)return"key."+a}}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&!x.isInteger(s.licenseStartTime)&&!(s.licenseStartTime&&x.isInteger(s.licenseStartTime.low)&&x.isInteger(s.licenseStartTime.high)))return"licenseStartTime: integer|Long expected";if(s.remoteAttestationVerified!=null&&s.hasOwnProperty("remoteAttestationVerified")&&typeof s.remoteAttestationVerified!="boolean")return"remoteAttestationVerified: boolean expected";if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&!(s.providerClientToken&&typeof s.providerClientToken.length=="number"||x.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!x.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.srmRequirement!=null&&s.hasOwnProperty("srmRequirement")&&!(s.srmRequirement&&typeof s.srmRequirement.length=="number"||x.isString(s.srmRequirement)))return"srmRequirement: buffer expected";if(s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&!(s.srmUpdate&&typeof s.srmUpdate.length=="number"||x.isString(s.srmUpdate)))return"srmUpdate: buffer expected";if(s.platformVerificationStatus!=null&&s.hasOwnProperty("platformVerificationStatus"))switch(s.platformVerificationStatus){default:return"platformVerificationStatus: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(s.groupIds!=null&&s.hasOwnProperty("groupIds")){if(!Array.isArray(s.groupIds))return"groupIds: array expected";for(var p=0;p<s.groupIds.length;p+=1)if(!(s.groupIds[p]&&typeof s.groupIds[p].length=="number"||x.isString(s.groupIds[p])))return"groupIds: buffer[] expected"}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.License)return s;var a=new E.license_protocol.License;if(s.id!=null){if(typeof s.id!="object")throw TypeError(".license_protocol.License.id: object expected");a.id=E.license_protocol.LicenseIdentification.fromObject(s.id)}if(s.policy!=null){if(typeof s.policy!="object")throw TypeError(".license_protocol.License.policy: object expected");a.policy=E.license_protocol.License.Policy.fromObject(s.policy)}if(s.key){if(!Array.isArray(s.key))throw TypeError(".license_protocol.License.key: array expected");a.key=[];for(var p=0;p<s.key.length;p+=1){if(typeof s.key[p]!="object")throw TypeError(".license_protocol.License.key: object expected");a.key[p]=E.license_protocol.License.KeyContainer.fromObject(s.key[p])}}switch(s.licenseStartTime!=null&&(x.Long?(a.licenseStartTime=x.Long.fromValue(s.licenseStartTime)).unsigned=!1:typeof s.licenseStartTime=="string"?a.licenseStartTime=parseInt(s.licenseStartTime,10):typeof s.licenseStartTime=="number"?a.licenseStartTime=s.licenseStartTime:typeof s.licenseStartTime=="object"&&(a.licenseStartTime=new x.LongBits(s.licenseStartTime.low>>>0,s.licenseStartTime.high>>>0).toNumber())),s.remoteAttestationVerified!=null&&(a.remoteAttestationVerified=!!s.remoteAttestationVerified),s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?x.base64.decode(s.providerClientToken,a.providerClientToken=x.newBuffer(x.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(a.providerClientToken=s.providerClientToken)),s.protectionScheme!=null&&(a.protectionScheme=s.protectionScheme>>>0),s.srmRequirement!=null&&(typeof s.srmRequirement=="string"?x.base64.decode(s.srmRequirement,a.srmRequirement=x.newBuffer(x.base64.length(s.srmRequirement)),0):s.srmRequirement.length>=0&&(a.srmRequirement=s.srmRequirement)),s.srmUpdate!=null&&(typeof s.srmUpdate=="string"?x.base64.decode(s.srmUpdate,a.srmUpdate=x.newBuffer(x.base64.length(s.srmUpdate)),0):s.srmUpdate.length>=0&&(a.srmUpdate=s.srmUpdate)),s.platformVerificationStatus){case"PLATFORM_UNVERIFIED":case 0:a.platformVerificationStatus=0;break;case"PLATFORM_TAMPERED":case 1:a.platformVerificationStatus=1;break;case"PLATFORM_SOFTWARE_VERIFIED":case 2:a.platformVerificationStatus=2;break;case"PLATFORM_HARDWARE_VERIFIED":case 3:a.platformVerificationStatus=3;break;default:if(typeof s.platformVerificationStatus=="number"){a.platformVerificationStatus=s.platformVerificationStatus;break}break;case"PLATFORM_NO_VERIFICATION":case 4:a.platformVerificationStatus=4;break;case"PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED":case 5:a.platformVerificationStatus=5;break}if(s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.License.groupIds: array expected");a.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?x.base64.decode(s.groupIds[p],a.groupIds[p]=x.newBuffer(x.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(a.groupIds[p]=s.groupIds[p])}return a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.key=[],p.groupIds=[]),a.defaults){if(p.id=null,p.policy=null,x.Long){var m=new x.Long(0,0,!1);p.licenseStartTime=a.longs===String?m.toString():a.longs===Number?m.toNumber():m}else p.licenseStartTime=a.longs===String?"0":0;p.remoteAttestationVerified=!1,a.bytes===String?p.providerClientToken="":(p.providerClientToken=[],a.bytes!==Array&&(p.providerClientToken=x.newBuffer(p.providerClientToken))),p.protectionScheme=0,a.bytes===String?p.srmRequirement="":(p.srmRequirement=[],a.bytes!==Array&&(p.srmRequirement=x.newBuffer(p.srmRequirement))),a.bytes===String?p.srmUpdate="":(p.srmUpdate=[],a.bytes!==Array&&(p.srmUpdate=x.newBuffer(p.srmUpdate))),p.platformVerificationStatus=a.enums===String?"PLATFORM_NO_VERIFICATION":4}if(s.id!=null&&s.hasOwnProperty("id")&&(p.id=E.license_protocol.LicenseIdentification.toObject(s.id,a)),s.policy!=null&&s.hasOwnProperty("policy")&&(p.policy=E.license_protocol.License.Policy.toObject(s.policy,a)),s.key&&s.key.length){p.key=[];for(var D=0;D<s.key.length;D+=1)p.key[D]=E.license_protocol.License.KeyContainer.toObject(s.key[D],a)}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&(typeof s.licenseStartTime=="number"?p.licenseStartTime=a.longs===String?String(s.licenseStartTime):s.licenseStartTime:p.licenseStartTime=a.longs===String?x.Long.prototype.toString.call(s.licenseStartTime):a.longs===Number?new x.LongBits(s.licenseStartTime.low>>>0,s.licenseStartTime.high>>>0).toNumber():s.licenseStartTime),s.remoteAttestationVerified!=null&&s.hasOwnProperty("remoteAttestationVerified")&&(p.remoteAttestationVerified=s.remoteAttestationVerified),s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&(p.providerClientToken=a.bytes===String?x.base64.encode(s.providerClientToken,0,s.providerClientToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerClientToken):s.providerClientToken),s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&(p.protectionScheme=s.protectionScheme),s.srmRequirement!=null&&s.hasOwnProperty("srmRequirement")&&(p.srmRequirement=a.bytes===String?x.base64.encode(s.srmRequirement,0,s.srmRequirement.length):a.bytes===Array?Array.prototype.slice.call(s.srmRequirement):s.srmRequirement),s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&(p.srmUpdate=a.bytes===String?x.base64.encode(s.srmUpdate,0,s.srmUpdate.length):a.bytes===Array?Array.prototype.slice.call(s.srmUpdate):s.srmUpdate),s.platformVerificationStatus!=null&&s.hasOwnProperty("platformVerificationStatus")&&(p.platformVerificationStatus=a.enums===String?E.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]===void 0?s.platformVerificationStatus:E.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]:s.platformVerificationStatus),s.groupIds&&s.groupIds.length){p.groupIds=[];for(var D=0;D<s.groupIds.length;D+=1)p.groupIds[D]=a.bytes===String?x.base64.encode(s.groupIds[D],0,s.groupIds[D].length):a.bytes===Array?Array.prototype.slice.call(s.groupIds[D]):s.groupIds[D]}return p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.License"},M.Policy=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.canPlay=!1,y.prototype.canPersist=!1,y.prototype.canRenew=!1,y.prototype.rentalDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.playbackDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.licenseDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.renewalRecoveryDurationSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.renewalServerUrl="",y.prototype.renewalDelaySeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.renewalRetryIntervalSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.renewWithUsage=!1,y.prototype.alwaysIncludeClientId=!1,y.prototype.playStartGracePeriodSeconds=x.Long?x.Long.fromBits(0,0,!1):0,y.prototype.softEnforcePlaybackDuration=!1,y.prototype.softEnforceRentalDuration=!0,y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.canPlay!=null&&Object.hasOwnProperty.call(a,"canPlay")&&p.uint32(8).bool(a.canPlay),a.canPersist!=null&&Object.hasOwnProperty.call(a,"canPersist")&&p.uint32(16).bool(a.canPersist),a.canRenew!=null&&Object.hasOwnProperty.call(a,"canRenew")&&p.uint32(24).bool(a.canRenew),a.rentalDurationSeconds!=null&&Object.hasOwnProperty.call(a,"rentalDurationSeconds")&&p.uint32(32).int64(a.rentalDurationSeconds),a.playbackDurationSeconds!=null&&Object.hasOwnProperty.call(a,"playbackDurationSeconds")&&p.uint32(40).int64(a.playbackDurationSeconds),a.licenseDurationSeconds!=null&&Object.hasOwnProperty.call(a,"licenseDurationSeconds")&&p.uint32(48).int64(a.licenseDurationSeconds),a.renewalRecoveryDurationSeconds!=null&&Object.hasOwnProperty.call(a,"renewalRecoveryDurationSeconds")&&p.uint32(56).int64(a.renewalRecoveryDurationSeconds),a.renewalServerUrl!=null&&Object.hasOwnProperty.call(a,"renewalServerUrl")&&p.uint32(66).string(a.renewalServerUrl),a.renewalDelaySeconds!=null&&Object.hasOwnProperty.call(a,"renewalDelaySeconds")&&p.uint32(72).int64(a.renewalDelaySeconds),a.renewalRetryIntervalSeconds!=null&&Object.hasOwnProperty.call(a,"renewalRetryIntervalSeconds")&&p.uint32(80).int64(a.renewalRetryIntervalSeconds),a.renewWithUsage!=null&&Object.hasOwnProperty.call(a,"renewWithUsage")&&p.uint32(88).bool(a.renewWithUsage),a.alwaysIncludeClientId!=null&&Object.hasOwnProperty.call(a,"alwaysIncludeClientId")&&p.uint32(96).bool(a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&Object.hasOwnProperty.call(a,"playStartGracePeriodSeconds")&&p.uint32(104).int64(a.playStartGracePeriodSeconds),a.softEnforcePlaybackDuration!=null&&Object.hasOwnProperty.call(a,"softEnforcePlaybackDuration")&&p.uint32(112).bool(a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&Object.hasOwnProperty.call(a,"softEnforceRentalDuration")&&p.uint32(120).bool(a.softEnforceRentalDuration),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.License.Policy;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.canPlay=a.bool();break}case 2:{D.canPersist=a.bool();break}case 3:{D.canRenew=a.bool();break}case 4:{D.rentalDurationSeconds=a.int64();break}case 5:{D.playbackDurationSeconds=a.int64();break}case 6:{D.licenseDurationSeconds=a.int64();break}case 7:{D.renewalRecoveryDurationSeconds=a.int64();break}case 8:{D.renewalServerUrl=a.string();break}case 9:{D.renewalDelaySeconds=a.int64();break}case 10:{D.renewalRetryIntervalSeconds=a.int64();break}case 11:{D.renewWithUsage=a.bool();break}case 12:{D.alwaysIncludeClientId=a.bool();break}case 13:{D.playStartGracePeriodSeconds=a.int64();break}case 14:{D.softEnforcePlaybackDuration=a.bool();break}case 15:{D.softEnforceRentalDuration=a.bool();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){return typeof a!="object"||a===null?"object expected":a.canPlay!=null&&a.hasOwnProperty("canPlay")&&typeof a.canPlay!="boolean"?"canPlay: boolean expected":a.canPersist!=null&&a.hasOwnProperty("canPersist")&&typeof a.canPersist!="boolean"?"canPersist: boolean expected":a.canRenew!=null&&a.hasOwnProperty("canRenew")&&typeof a.canRenew!="boolean"?"canRenew: boolean expected":a.rentalDurationSeconds!=null&&a.hasOwnProperty("rentalDurationSeconds")&&!x.isInteger(a.rentalDurationSeconds)&&!(a.rentalDurationSeconds&&x.isInteger(a.rentalDurationSeconds.low)&&x.isInteger(a.rentalDurationSeconds.high))?"rentalDurationSeconds: integer|Long expected":a.playbackDurationSeconds!=null&&a.hasOwnProperty("playbackDurationSeconds")&&!x.isInteger(a.playbackDurationSeconds)&&!(a.playbackDurationSeconds&&x.isInteger(a.playbackDurationSeconds.low)&&x.isInteger(a.playbackDurationSeconds.high))?"playbackDurationSeconds: integer|Long expected":a.licenseDurationSeconds!=null&&a.hasOwnProperty("licenseDurationSeconds")&&!x.isInteger(a.licenseDurationSeconds)&&!(a.licenseDurationSeconds&&x.isInteger(a.licenseDurationSeconds.low)&&x.isInteger(a.licenseDurationSeconds.high))?"licenseDurationSeconds: integer|Long expected":a.renewalRecoveryDurationSeconds!=null&&a.hasOwnProperty("renewalRecoveryDurationSeconds")&&!x.isInteger(a.renewalRecoveryDurationSeconds)&&!(a.renewalRecoveryDurationSeconds&&x.isInteger(a.renewalRecoveryDurationSeconds.low)&&x.isInteger(a.renewalRecoveryDurationSeconds.high))?"renewalRecoveryDurationSeconds: integer|Long expected":a.renewalServerUrl!=null&&a.hasOwnProperty("renewalServerUrl")&&!x.isString(a.renewalServerUrl)?"renewalServerUrl: string expected":a.renewalDelaySeconds!=null&&a.hasOwnProperty("renewalDelaySeconds")&&!x.isInteger(a.renewalDelaySeconds)&&!(a.renewalDelaySeconds&&x.isInteger(a.renewalDelaySeconds.low)&&x.isInteger(a.renewalDelaySeconds.high))?"renewalDelaySeconds: integer|Long expected":a.renewalRetryIntervalSeconds!=null&&a.hasOwnProperty("renewalRetryIntervalSeconds")&&!x.isInteger(a.renewalRetryIntervalSeconds)&&!(a.renewalRetryIntervalSeconds&&x.isInteger(a.renewalRetryIntervalSeconds.low)&&x.isInteger(a.renewalRetryIntervalSeconds.high))?"renewalRetryIntervalSeconds: integer|Long expected":a.renewWithUsage!=null&&a.hasOwnProperty("renewWithUsage")&&typeof a.renewWithUsage!="boolean"?"renewWithUsage: boolean expected":a.alwaysIncludeClientId!=null&&a.hasOwnProperty("alwaysIncludeClientId")&&typeof a.alwaysIncludeClientId!="boolean"?"alwaysIncludeClientId: boolean expected":a.playStartGracePeriodSeconds!=null&&a.hasOwnProperty("playStartGracePeriodSeconds")&&!x.isInteger(a.playStartGracePeriodSeconds)&&!(a.playStartGracePeriodSeconds&&x.isInteger(a.playStartGracePeriodSeconds.low)&&x.isInteger(a.playStartGracePeriodSeconds.high))?"playStartGracePeriodSeconds: integer|Long expected":a.softEnforcePlaybackDuration!=null&&a.hasOwnProperty("softEnforcePlaybackDuration")&&typeof a.softEnforcePlaybackDuration!="boolean"?"softEnforcePlaybackDuration: boolean expected":a.softEnforceRentalDuration!=null&&a.hasOwnProperty("softEnforceRentalDuration")&&typeof a.softEnforceRentalDuration!="boolean"?"softEnforceRentalDuration: boolean expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.License.Policy)return a;var p=new E.license_protocol.License.Policy;return a.canPlay!=null&&(p.canPlay=!!a.canPlay),a.canPersist!=null&&(p.canPersist=!!a.canPersist),a.canRenew!=null&&(p.canRenew=!!a.canRenew),a.rentalDurationSeconds!=null&&(x.Long?(p.rentalDurationSeconds=x.Long.fromValue(a.rentalDurationSeconds)).unsigned=!1:typeof a.rentalDurationSeconds=="string"?p.rentalDurationSeconds=parseInt(a.rentalDurationSeconds,10):typeof a.rentalDurationSeconds=="number"?p.rentalDurationSeconds=a.rentalDurationSeconds:typeof a.rentalDurationSeconds=="object"&&(p.rentalDurationSeconds=new x.LongBits(a.rentalDurationSeconds.low>>>0,a.rentalDurationSeconds.high>>>0).toNumber())),a.playbackDurationSeconds!=null&&(x.Long?(p.playbackDurationSeconds=x.Long.fromValue(a.playbackDurationSeconds)).unsigned=!1:typeof a.playbackDurationSeconds=="string"?p.playbackDurationSeconds=parseInt(a.playbackDurationSeconds,10):typeof a.playbackDurationSeconds=="number"?p.playbackDurationSeconds=a.playbackDurationSeconds:typeof a.playbackDurationSeconds=="object"&&(p.playbackDurationSeconds=new x.LongBits(a.playbackDurationSeconds.low>>>0,a.playbackDurationSeconds.high>>>0).toNumber())),a.licenseDurationSeconds!=null&&(x.Long?(p.licenseDurationSeconds=x.Long.fromValue(a.licenseDurationSeconds)).unsigned=!1:typeof a.licenseDurationSeconds=="string"?p.licenseDurationSeconds=parseInt(a.licenseDurationSeconds,10):typeof a.licenseDurationSeconds=="number"?p.licenseDurationSeconds=a.licenseDurationSeconds:typeof a.licenseDurationSeconds=="object"&&(p.licenseDurationSeconds=new x.LongBits(a.licenseDurationSeconds.low>>>0,a.licenseDurationSeconds.high>>>0).toNumber())),a.renewalRecoveryDurationSeconds!=null&&(x.Long?(p.renewalRecoveryDurationSeconds=x.Long.fromValue(a.renewalRecoveryDurationSeconds)).unsigned=!1:typeof a.renewalRecoveryDurationSeconds=="string"?p.renewalRecoveryDurationSeconds=parseInt(a.renewalRecoveryDurationSeconds,10):typeof a.renewalRecoveryDurationSeconds=="number"?p.renewalRecoveryDurationSeconds=a.renewalRecoveryDurationSeconds:typeof a.renewalRecoveryDurationSeconds=="object"&&(p.renewalRecoveryDurationSeconds=new x.LongBits(a.renewalRecoveryDurationSeconds.low>>>0,a.renewalRecoveryDurationSeconds.high>>>0).toNumber())),a.renewalServerUrl!=null&&(p.renewalServerUrl=String(a.renewalServerUrl)),a.renewalDelaySeconds!=null&&(x.Long?(p.renewalDelaySeconds=x.Long.fromValue(a.renewalDelaySeconds)).unsigned=!1:typeof a.renewalDelaySeconds=="string"?p.renewalDelaySeconds=parseInt(a.renewalDelaySeconds,10):typeof a.renewalDelaySeconds=="number"?p.renewalDelaySeconds=a.renewalDelaySeconds:typeof a.renewalDelaySeconds=="object"&&(p.renewalDelaySeconds=new x.LongBits(a.renewalDelaySeconds.low>>>0,a.renewalDelaySeconds.high>>>0).toNumber())),a.renewalRetryIntervalSeconds!=null&&(x.Long?(p.renewalRetryIntervalSeconds=x.Long.fromValue(a.renewalRetryIntervalSeconds)).unsigned=!1:typeof a.renewalRetryIntervalSeconds=="string"?p.renewalRetryIntervalSeconds=parseInt(a.renewalRetryIntervalSeconds,10):typeof a.renewalRetryIntervalSeconds=="number"?p.renewalRetryIntervalSeconds=a.renewalRetryIntervalSeconds:typeof a.renewalRetryIntervalSeconds=="object"&&(p.renewalRetryIntervalSeconds=new x.LongBits(a.renewalRetryIntervalSeconds.low>>>0,a.renewalRetryIntervalSeconds.high>>>0).toNumber())),a.renewWithUsage!=null&&(p.renewWithUsage=!!a.renewWithUsage),a.alwaysIncludeClientId!=null&&(p.alwaysIncludeClientId=!!a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&(x.Long?(p.playStartGracePeriodSeconds=x.Long.fromValue(a.playStartGracePeriodSeconds)).unsigned=!1:typeof a.playStartGracePeriodSeconds=="string"?p.playStartGracePeriodSeconds=parseInt(a.playStartGracePeriodSeconds,10):typeof a.playStartGracePeriodSeconds=="number"?p.playStartGracePeriodSeconds=a.playStartGracePeriodSeconds:typeof a.playStartGracePeriodSeconds=="object"&&(p.playStartGracePeriodSeconds=new x.LongBits(a.playStartGracePeriodSeconds.low>>>0,a.playStartGracePeriodSeconds.high>>>0).toNumber())),a.softEnforcePlaybackDuration!=null&&(p.softEnforcePlaybackDuration=!!a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&(p.softEnforceRentalDuration=!!a.softEnforceRentalDuration),p},y.toObject=function(a,p){p||(p={});var m={};if(p.defaults){if(m.canPlay=!1,m.canPersist=!1,m.canRenew=!1,x.Long){var D=new x.Long(0,0,!1);m.rentalDurationSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.rentalDurationSeconds=p.longs===String?"0":0;if(x.Long){var D=new x.Long(0,0,!1);m.playbackDurationSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.playbackDurationSeconds=p.longs===String?"0":0;if(x.Long){var D=new x.Long(0,0,!1);m.licenseDurationSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.licenseDurationSeconds=p.longs===String?"0":0;if(x.Long){var D=new x.Long(0,0,!1);m.renewalRecoveryDurationSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.renewalRecoveryDurationSeconds=p.longs===String?"0":0;if(m.renewalServerUrl="",x.Long){var D=new x.Long(0,0,!1);m.renewalDelaySeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.renewalDelaySeconds=p.longs===String?"0":0;if(x.Long){var D=new x.Long(0,0,!1);m.renewalRetryIntervalSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.renewalRetryIntervalSeconds=p.longs===String?"0":0;if(m.renewWithUsage=!1,m.alwaysIncludeClientId=!1,x.Long){var D=new x.Long(0,0,!1);m.playStartGracePeriodSeconds=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.playStartGracePeriodSeconds=p.longs===String?"0":0;m.softEnforcePlaybackDuration=!1,m.softEnforceRentalDuration=!0}return a.canPlay!=null&&a.hasOwnProperty("canPlay")&&(m.canPlay=a.canPlay),a.canPersist!=null&&a.hasOwnProperty("canPersist")&&(m.canPersist=a.canPersist),a.canRenew!=null&&a.hasOwnProperty("canRenew")&&(m.canRenew=a.canRenew),a.rentalDurationSeconds!=null&&a.hasOwnProperty("rentalDurationSeconds")&&(typeof a.rentalDurationSeconds=="number"?m.rentalDurationSeconds=p.longs===String?String(a.rentalDurationSeconds):a.rentalDurationSeconds:m.rentalDurationSeconds=p.longs===String?x.Long.prototype.toString.call(a.rentalDurationSeconds):p.longs===Number?new x.LongBits(a.rentalDurationSeconds.low>>>0,a.rentalDurationSeconds.high>>>0).toNumber():a.rentalDurationSeconds),a.playbackDurationSeconds!=null&&a.hasOwnProperty("playbackDurationSeconds")&&(typeof a.playbackDurationSeconds=="number"?m.playbackDurationSeconds=p.longs===String?String(a.playbackDurationSeconds):a.playbackDurationSeconds:m.playbackDurationSeconds=p.longs===String?x.Long.prototype.toString.call(a.playbackDurationSeconds):p.longs===Number?new x.LongBits(a.playbackDurationSeconds.low>>>0,a.playbackDurationSeconds.high>>>0).toNumber():a.playbackDurationSeconds),a.licenseDurationSeconds!=null&&a.hasOwnProperty("licenseDurationSeconds")&&(typeof a.licenseDurationSeconds=="number"?m.licenseDurationSeconds=p.longs===String?String(a.licenseDurationSeconds):a.licenseDurationSeconds:m.licenseDurationSeconds=p.longs===String?x.Long.prototype.toString.call(a.licenseDurationSeconds):p.longs===Number?new x.LongBits(a.licenseDurationSeconds.low>>>0,a.licenseDurationSeconds.high>>>0).toNumber():a.licenseDurationSeconds),a.renewalRecoveryDurationSeconds!=null&&a.hasOwnProperty("renewalRecoveryDurationSeconds")&&(typeof a.renewalRecoveryDurationSeconds=="number"?m.renewalRecoveryDurationSeconds=p.longs===String?String(a.renewalRecoveryDurationSeconds):a.renewalRecoveryDurationSeconds:m.renewalRecoveryDurationSeconds=p.longs===String?x.Long.prototype.toString.call(a.renewalRecoveryDurationSeconds):p.longs===Number?new x.LongBits(a.renewalRecoveryDurationSeconds.low>>>0,a.renewalRecoveryDurationSeconds.high>>>0).toNumber():a.renewalRecoveryDurationSeconds),a.renewalServerUrl!=null&&a.hasOwnProperty("renewalServerUrl")&&(m.renewalServerUrl=a.renewalServerUrl),a.renewalDelaySeconds!=null&&a.hasOwnProperty("renewalDelaySeconds")&&(typeof a.renewalDelaySeconds=="number"?m.renewalDelaySeconds=p.longs===String?String(a.renewalDelaySeconds):a.renewalDelaySeconds:m.renewalDelaySeconds=p.longs===String?x.Long.prototype.toString.call(a.renewalDelaySeconds):p.longs===Number?new x.LongBits(a.renewalDelaySeconds.low>>>0,a.renewalDelaySeconds.high>>>0).toNumber():a.renewalDelaySeconds),a.renewalRetryIntervalSeconds!=null&&a.hasOwnProperty("renewalRetryIntervalSeconds")&&(typeof a.renewalRetryIntervalSeconds=="number"?m.renewalRetryIntervalSeconds=p.longs===String?String(a.renewalRetryIntervalSeconds):a.renewalRetryIntervalSeconds:m.renewalRetryIntervalSeconds=p.longs===String?x.Long.prototype.toString.call(a.renewalRetryIntervalSeconds):p.longs===Number?new x.LongBits(a.renewalRetryIntervalSeconds.low>>>0,a.renewalRetryIntervalSeconds.high>>>0).toNumber():a.renewalRetryIntervalSeconds),a.renewWithUsage!=null&&a.hasOwnProperty("renewWithUsage")&&(m.renewWithUsage=a.renewWithUsage),a.alwaysIncludeClientId!=null&&a.hasOwnProperty("alwaysIncludeClientId")&&(m.alwaysIncludeClientId=a.alwaysIncludeClientId),a.playStartGracePeriodSeconds!=null&&a.hasOwnProperty("playStartGracePeriodSeconds")&&(typeof a.playStartGracePeriodSeconds=="number"?m.playStartGracePeriodSeconds=p.longs===String?String(a.playStartGracePeriodSeconds):a.playStartGracePeriodSeconds:m.playStartGracePeriodSeconds=p.longs===String?x.Long.prototype.toString.call(a.playStartGracePeriodSeconds):p.longs===Number?new x.LongBits(a.playStartGracePeriodSeconds.low>>>0,a.playStartGracePeriodSeconds.high>>>0).toNumber():a.playStartGracePeriodSeconds),a.softEnforcePlaybackDuration!=null&&a.hasOwnProperty("softEnforcePlaybackDuration")&&(m.softEnforcePlaybackDuration=a.softEnforcePlaybackDuration),a.softEnforceRentalDuration!=null&&a.hasOwnProperty("softEnforceRentalDuration")&&(m.softEnforceRentalDuration=a.softEnforceRentalDuration),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.License.Policy"},y}(),M.KeyContainer=function(){function y(s){if(this.videoResolutionConstraints=[],s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.id=x.newBuffer([]),y.prototype.iv=x.newBuffer([]),y.prototype.key=x.newBuffer([]),y.prototype.type=1,y.prototype.level=1,y.prototype.requiredProtection=null,y.prototype.requestedProtection=null,y.prototype.keyControl=null,y.prototype.operatorSessionKeyPermissions=null,y.prototype.videoResolutionConstraints=x.emptyArray,y.prototype.antiRollbackUsageTable=!1,y.prototype.trackLabel="",y.create=function(a){return new y(a)},y.encode=function(a,p){if(p||(p=j.create()),a.id!=null&&Object.hasOwnProperty.call(a,"id")&&p.uint32(10).bytes(a.id),a.iv!=null&&Object.hasOwnProperty.call(a,"iv")&&p.uint32(18).bytes(a.iv),a.key!=null&&Object.hasOwnProperty.call(a,"key")&&p.uint32(26).bytes(a.key),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(32).int32(a.type),a.level!=null&&Object.hasOwnProperty.call(a,"level")&&p.uint32(40).int32(a.level),a.requiredProtection!=null&&Object.hasOwnProperty.call(a,"requiredProtection")&&E.license_protocol.License.KeyContainer.OutputProtection.encode(a.requiredProtection,p.uint32(50).fork()).ldelim(),a.requestedProtection!=null&&Object.hasOwnProperty.call(a,"requestedProtection")&&E.license_protocol.License.KeyContainer.OutputProtection.encode(a.requestedProtection,p.uint32(58).fork()).ldelim(),a.keyControl!=null&&Object.hasOwnProperty.call(a,"keyControl")&&E.license_protocol.License.KeyContainer.KeyControl.encode(a.keyControl,p.uint32(66).fork()).ldelim(),a.operatorSessionKeyPermissions!=null&&Object.hasOwnProperty.call(a,"operatorSessionKeyPermissions")&&E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.encode(a.operatorSessionKeyPermissions,p.uint32(74).fork()).ldelim(),a.videoResolutionConstraints!=null&&a.videoResolutionConstraints.length)for(var m=0;m<a.videoResolutionConstraints.length;m+=1)E.license_protocol.License.KeyContainer.VideoResolutionConstraint.encode(a.videoResolutionConstraints[m],p.uint32(82).fork()).ldelim();return a.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(a,"antiRollbackUsageTable")&&p.uint32(88).bool(a.antiRollbackUsageTable),a.trackLabel!=null&&Object.hasOwnProperty.call(a,"trackLabel")&&p.uint32(98).string(a.trackLabel),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.License.KeyContainer;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.id=a.bytes();break}case 2:{D.iv=a.bytes();break}case 3:{D.key=a.bytes();break}case 4:{D.type=a.int32();break}case 5:{D.level=a.int32();break}case 6:{D.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.decode(a,a.uint32());break}case 7:{D.requestedProtection=E.license_protocol.License.KeyContainer.OutputProtection.decode(a,a.uint32());break}case 8:{D.keyControl=E.license_protocol.License.KeyContainer.KeyControl.decode(a,a.uint32());break}case 9:{D.operatorSessionKeyPermissions=E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.decode(a,a.uint32());break}case 10:{D.videoResolutionConstraints&&D.videoResolutionConstraints.length||(D.videoResolutionConstraints=[]),D.videoResolutionConstraints.push(E.license_protocol.License.KeyContainer.VideoResolutionConstraint.decode(a,a.uint32()));break}case 11:{D.antiRollbackUsageTable=a.bool();break}case 12:{D.trackLabel=a.string();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.id!=null&&a.hasOwnProperty("id")&&!(a.id&&typeof a.id.length=="number"||x.isString(a.id)))return"id: buffer expected";if(a.iv!=null&&a.hasOwnProperty("iv")&&!(a.iv&&typeof a.iv.length=="number"||x.isString(a.iv)))return"iv: buffer expected";if(a.key!=null&&a.hasOwnProperty("key")&&!(a.key&&typeof a.key.length=="number"||x.isString(a.key)))return"key: buffer expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:break}if(a.level!=null&&a.hasOwnProperty("level"))switch(a.level){default:return"level: enum value expected";case 1:case 2:case 3:case 4:case 5:break}if(a.requiredProtection!=null&&a.hasOwnProperty("requiredProtection")){var p=E.license_protocol.License.KeyContainer.OutputProtection.verify(a.requiredProtection);if(p)return"requiredProtection."+p}if(a.requestedProtection!=null&&a.hasOwnProperty("requestedProtection")){var p=E.license_protocol.License.KeyContainer.OutputProtection.verify(a.requestedProtection);if(p)return"requestedProtection."+p}if(a.keyControl!=null&&a.hasOwnProperty("keyControl")){var p=E.license_protocol.License.KeyContainer.KeyControl.verify(a.keyControl);if(p)return"keyControl."+p}if(a.operatorSessionKeyPermissions!=null&&a.hasOwnProperty("operatorSessionKeyPermissions")){var p=E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.verify(a.operatorSessionKeyPermissions);if(p)return"operatorSessionKeyPermissions."+p}if(a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")){if(!Array.isArray(a.videoResolutionConstraints))return"videoResolutionConstraints: array expected";for(var m=0;m<a.videoResolutionConstraints.length;m+=1){var p=E.license_protocol.License.KeyContainer.VideoResolutionConstraint.verify(a.videoResolutionConstraints[m]);if(p)return"videoResolutionConstraints."+p}}return a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&typeof a.antiRollbackUsageTable!="boolean"?"antiRollbackUsageTable: boolean expected":a.trackLabel!=null&&a.hasOwnProperty("trackLabel")&&!x.isString(a.trackLabel)?"trackLabel: string expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.License.KeyContainer)return a;var p=new E.license_protocol.License.KeyContainer;switch(a.id!=null&&(typeof a.id=="string"?x.base64.decode(a.id,p.id=x.newBuffer(x.base64.length(a.id)),0):a.id.length>=0&&(p.id=a.id)),a.iv!=null&&(typeof a.iv=="string"?x.base64.decode(a.iv,p.iv=x.newBuffer(x.base64.length(a.iv)),0):a.iv.length>=0&&(p.iv=a.iv)),a.key!=null&&(typeof a.key=="string"?x.base64.decode(a.key,p.key=x.newBuffer(x.base64.length(a.key)),0):a.key.length>=0&&(p.key=a.key)),a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"SIGNING":case 1:p.type=1;break;case"CONTENT":case 2:p.type=2;break;case"KEY_CONTROL":case 3:p.type=3;break;case"OPERATOR_SESSION":case 4:p.type=4;break;case"ENTITLEMENT":case 5:p.type=5;break;case"OEM_CONTENT":case 6:p.type=6;break}switch(a.level){default:if(typeof a.level=="number"){p.level=a.level;break}break;case"SW_SECURE_CRYPTO":case 1:p.level=1;break;case"SW_SECURE_DECODE":case 2:p.level=2;break;case"HW_SECURE_CRYPTO":case 3:p.level=3;break;case"HW_SECURE_DECODE":case 4:p.level=4;break;case"HW_SECURE_ALL":case 5:p.level=5;break}if(a.requiredProtection!=null){if(typeof a.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requiredProtection: object expected");p.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.fromObject(a.requiredProtection)}if(a.requestedProtection!=null){if(typeof a.requestedProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requestedProtection: object expected");p.requestedProtection=E.license_protocol.License.KeyContainer.OutputProtection.fromObject(a.requestedProtection)}if(a.keyControl!=null){if(typeof a.keyControl!="object")throw TypeError(".license_protocol.License.KeyContainer.keyControl: object expected");p.keyControl=E.license_protocol.License.KeyContainer.KeyControl.fromObject(a.keyControl)}if(a.operatorSessionKeyPermissions!=null){if(typeof a.operatorSessionKeyPermissions!="object")throw TypeError(".license_protocol.License.KeyContainer.operatorSessionKeyPermissions: object expected");p.operatorSessionKeyPermissions=E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.fromObject(a.operatorSessionKeyPermissions)}if(a.videoResolutionConstraints){if(!Array.isArray(a.videoResolutionConstraints))throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: array expected");p.videoResolutionConstraints=[];for(var m=0;m<a.videoResolutionConstraints.length;m+=1){if(typeof a.videoResolutionConstraints[m]!="object")throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: object expected");p.videoResolutionConstraints[m]=E.license_protocol.License.KeyContainer.VideoResolutionConstraint.fromObject(a.videoResolutionConstraints[m])}}return a.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!a.antiRollbackUsageTable),a.trackLabel!=null&&(p.trackLabel=String(a.trackLabel)),p},y.toObject=function(a,p){p||(p={});var m={};if((p.arrays||p.defaults)&&(m.videoResolutionConstraints=[]),p.defaults&&(p.bytes===String?m.id="":(m.id=[],p.bytes!==Array&&(m.id=x.newBuffer(m.id))),p.bytes===String?m.iv="":(m.iv=[],p.bytes!==Array&&(m.iv=x.newBuffer(m.iv))),p.bytes===String?m.key="":(m.key=[],p.bytes!==Array&&(m.key=x.newBuffer(m.key))),m.type=p.enums===String?"SIGNING":1,m.level=p.enums===String?"SW_SECURE_CRYPTO":1,m.requiredProtection=null,m.requestedProtection=null,m.keyControl=null,m.operatorSessionKeyPermissions=null,m.antiRollbackUsageTable=!1,m.trackLabel=""),a.id!=null&&a.hasOwnProperty("id")&&(m.id=p.bytes===String?x.base64.encode(a.id,0,a.id.length):p.bytes===Array?Array.prototype.slice.call(a.id):a.id),a.iv!=null&&a.hasOwnProperty("iv")&&(m.iv=p.bytes===String?x.base64.encode(a.iv,0,a.iv.length):p.bytes===Array?Array.prototype.slice.call(a.iv):a.iv),a.key!=null&&a.hasOwnProperty("key")&&(m.key=p.bytes===String?x.base64.encode(a.key,0,a.key.length):p.bytes===Array?Array.prototype.slice.call(a.key):a.key),a.type!=null&&a.hasOwnProperty("type")&&(m.type=p.enums===String?E.license_protocol.License.KeyContainer.KeyType[a.type]===void 0?a.type:E.license_protocol.License.KeyContainer.KeyType[a.type]:a.type),a.level!=null&&a.hasOwnProperty("level")&&(m.level=p.enums===String?E.license_protocol.License.KeyContainer.SecurityLevel[a.level]===void 0?a.level:E.license_protocol.License.KeyContainer.SecurityLevel[a.level]:a.level),a.requiredProtection!=null&&a.hasOwnProperty("requiredProtection")&&(m.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.toObject(a.requiredProtection,p)),a.requestedProtection!=null&&a.hasOwnProperty("requestedProtection")&&(m.requestedProtection=E.license_protocol.License.KeyContainer.OutputProtection.toObject(a.requestedProtection,p)),a.keyControl!=null&&a.hasOwnProperty("keyControl")&&(m.keyControl=E.license_protocol.License.KeyContainer.KeyControl.toObject(a.keyControl,p)),a.operatorSessionKeyPermissions!=null&&a.hasOwnProperty("operatorSessionKeyPermissions")&&(m.operatorSessionKeyPermissions=E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.toObject(a.operatorSessionKeyPermissions,p)),a.videoResolutionConstraints&&a.videoResolutionConstraints.length){m.videoResolutionConstraints=[];for(var D=0;D<a.videoResolutionConstraints.length;D+=1)m.videoResolutionConstraints[D]=E.license_protocol.License.KeyContainer.VideoResolutionConstraint.toObject(a.videoResolutionConstraints[D],p)}return a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&(m.antiRollbackUsageTable=a.antiRollbackUsageTable),a.trackLabel!=null&&a.hasOwnProperty("trackLabel")&&(m.trackLabel=a.trackLabel),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.License.KeyContainer"},y.KeyType=function(){var s={},a=Object.create(s);return a[s[1]="SIGNING"]=1,a[s[2]="CONTENT"]=2,a[s[3]="KEY_CONTROL"]=3,a[s[4]="OPERATOR_SESSION"]=4,a[s[5]="ENTITLEMENT"]=5,a[s[6]="OEM_CONTENT"]=6,a}(),y.SecurityLevel=function(){var s={},a=Object.create(s);return a[s[1]="SW_SECURE_CRYPTO"]=1,a[s[2]="SW_SECURE_DECODE"]=2,a[s[3]="HW_SECURE_CRYPTO"]=3,a[s[4]="HW_SECURE_DECODE"]=4,a[s[5]="HW_SECURE_ALL"]=5,a}(),y.KeyControl=function(){function s(a){if(a)for(var p=Object.keys(a),m=0;m<p.length;m+=1)a[p[m]]!=null&&(this[p[m]]=a[p[m]])}return s.prototype.keyControlBlock=x.newBuffer([]),s.prototype.iv=x.newBuffer([]),s.create=function(p){return new s(p)},s.encode=function(p,m){return m||(m=j.create()),p.keyControlBlock!=null&&Object.hasOwnProperty.call(p,"keyControlBlock")&&m.uint32(10).bytes(p.keyControlBlock),p.iv!=null&&Object.hasOwnProperty.call(p,"iv")&&m.uint32(18).bytes(p.iv),m},s.encodeDelimited=function(p,m){return this.encode(p,m).ldelim()},s.decode=function(p,m){p instanceof k||(p=k.create(p));for(var D=m===void 0?p.len:p.pos+m,X=new E.license_protocol.License.KeyContainer.KeyControl;p.pos<D;){var A=p.uint32();switch(A>>>3){case 1:{X.keyControlBlock=p.bytes();break}case 2:{X.iv=p.bytes();break}default:p.skipType(A&7);break}}return X},s.decodeDelimited=function(p){return p instanceof k||(p=new k(p)),this.decode(p,p.uint32())},s.verify=function(p){return typeof p!="object"||p===null?"object expected":p.keyControlBlock!=null&&p.hasOwnProperty("keyControlBlock")&&!(p.keyControlBlock&&typeof p.keyControlBlock.length=="number"||x.isString(p.keyControlBlock))?"keyControlBlock: buffer expected":p.iv!=null&&p.hasOwnProperty("iv")&&!(p.iv&&typeof p.iv.length=="number"||x.isString(p.iv))?"iv: buffer expected":null},s.fromObject=function(p){if(p instanceof E.license_protocol.License.KeyContainer.KeyControl)return p;var m=new E.license_protocol.License.KeyContainer.KeyControl;return p.keyControlBlock!=null&&(typeof p.keyControlBlock=="string"?x.base64.decode(p.keyControlBlock,m.keyControlBlock=x.newBuffer(x.base64.length(p.keyControlBlock)),0):p.keyControlBlock.length>=0&&(m.keyControlBlock=p.keyControlBlock)),p.iv!=null&&(typeof p.iv=="string"?x.base64.decode(p.iv,m.iv=x.newBuffer(x.base64.length(p.iv)),0):p.iv.length>=0&&(m.iv=p.iv)),m},s.toObject=function(p,m){m||(m={});var D={};return m.defaults&&(m.bytes===String?D.keyControlBlock="":(D.keyControlBlock=[],m.bytes!==Array&&(D.keyControlBlock=x.newBuffer(D.keyControlBlock))),m.bytes===String?D.iv="":(D.iv=[],m.bytes!==Array&&(D.iv=x.newBuffer(D.iv)))),p.keyControlBlock!=null&&p.hasOwnProperty("keyControlBlock")&&(D.keyControlBlock=m.bytes===String?x.base64.encode(p.keyControlBlock,0,p.keyControlBlock.length):m.bytes===Array?Array.prototype.slice.call(p.keyControlBlock):p.keyControlBlock),p.iv!=null&&p.hasOwnProperty("iv")&&(D.iv=m.bytes===String?x.base64.encode(p.iv,0,p.iv.length):m.bytes===Array?Array.prototype.slice.call(p.iv):p.iv),D},s.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.KeyControl"},s}(),y.OutputProtection=function(){function s(a){if(a)for(var p=Object.keys(a),m=0;m<p.length;m+=1)a[p[m]]!=null&&(this[p[m]]=a[p[m]])}return s.prototype.hdcp=0,s.prototype.cgmsFlags=42,s.prototype.hdcpSrmRule=0,s.prototype.disableAnalogOutput=!1,s.prototype.disableDigitalOutput=!1,s.create=function(p){return new s(p)},s.encode=function(p,m){return m||(m=j.create()),p.hdcp!=null&&Object.hasOwnProperty.call(p,"hdcp")&&m.uint32(8).int32(p.hdcp),p.cgmsFlags!=null&&Object.hasOwnProperty.call(p,"cgmsFlags")&&m.uint32(16).int32(p.cgmsFlags),p.hdcpSrmRule!=null&&Object.hasOwnProperty.call(p,"hdcpSrmRule")&&m.uint32(24).int32(p.hdcpSrmRule),p.disableAnalogOutput!=null&&Object.hasOwnProperty.call(p,"disableAnalogOutput")&&m.uint32(32).bool(p.disableAnalogOutput),p.disableDigitalOutput!=null&&Object.hasOwnProperty.call(p,"disableDigitalOutput")&&m.uint32(40).bool(p.disableDigitalOutput),m},s.encodeDelimited=function(p,m){return this.encode(p,m).ldelim()},s.decode=function(p,m){p instanceof k||(p=k.create(p));for(var D=m===void 0?p.len:p.pos+m,X=new E.license_protocol.License.KeyContainer.OutputProtection;p.pos<D;){var A=p.uint32();switch(A>>>3){case 1:{X.hdcp=p.int32();break}case 2:{X.cgmsFlags=p.int32();break}case 3:{X.hdcpSrmRule=p.int32();break}case 4:{X.disableAnalogOutput=p.bool();break}case 5:{X.disableDigitalOutput=p.bool();break}default:p.skipType(A&7);break}}return X},s.decodeDelimited=function(p){return p instanceof k||(p=new k(p)),this.decode(p,p.uint32())},s.verify=function(p){if(typeof p!="object"||p===null)return"object expected";if(p.hdcp!=null&&p.hasOwnProperty("hdcp"))switch(p.hdcp){default:return"hdcp: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(p.cgmsFlags!=null&&p.hasOwnProperty("cgmsFlags"))switch(p.cgmsFlags){default:return"cgmsFlags: enum value expected";case 42:case 0:case 2:case 3:break}if(p.hdcpSrmRule!=null&&p.hasOwnProperty("hdcpSrmRule"))switch(p.hdcpSrmRule){default:return"hdcpSrmRule: enum value expected";case 0:case 1:break}return p.disableAnalogOutput!=null&&p.hasOwnProperty("disableAnalogOutput")&&typeof p.disableAnalogOutput!="boolean"?"disableAnalogOutput: boolean expected":p.disableDigitalOutput!=null&&p.hasOwnProperty("disableDigitalOutput")&&typeof p.disableDigitalOutput!="boolean"?"disableDigitalOutput: boolean expected":null},s.fromObject=function(p){if(p instanceof E.license_protocol.License.KeyContainer.OutputProtection)return p;var m=new E.license_protocol.License.KeyContainer.OutputProtection;switch(p.hdcp){default:if(typeof p.hdcp=="number"){m.hdcp=p.hdcp;break}break;case"HDCP_NONE":case 0:m.hdcp=0;break;case"HDCP_V1":case 1:m.hdcp=1;break;case"HDCP_V2":case 2:m.hdcp=2;break;case"HDCP_V2_1":case 3:m.hdcp=3;break;case"HDCP_V2_2":case 4:m.hdcp=4;break;case"HDCP_V2_3":case 5:m.hdcp=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:m.hdcp=255;break}switch(p.cgmsFlags){default:if(typeof p.cgmsFlags=="number"){m.cgmsFlags=p.cgmsFlags;break}break;case"CGMS_NONE":case 42:m.cgmsFlags=42;break;case"COPY_FREE":case 0:m.cgmsFlags=0;break;case"COPY_ONCE":case 2:m.cgmsFlags=2;break;case"COPY_NEVER":case 3:m.cgmsFlags=3;break}switch(p.hdcpSrmRule){default:if(typeof p.hdcpSrmRule=="number"){m.hdcpSrmRule=p.hdcpSrmRule;break}break;case"HDCP_SRM_RULE_NONE":case 0:m.hdcpSrmRule=0;break;case"CURRENT_SRM":case 1:m.hdcpSrmRule=1;break}return p.disableAnalogOutput!=null&&(m.disableAnalogOutput=!!p.disableAnalogOutput),p.disableDigitalOutput!=null&&(m.disableDigitalOutput=!!p.disableDigitalOutput),m},s.toObject=function(p,m){m||(m={});var D={};return m.defaults&&(D.hdcp=m.enums===String?"HDCP_NONE":0,D.cgmsFlags=m.enums===String?"CGMS_NONE":42,D.hdcpSrmRule=m.enums===String?"HDCP_SRM_RULE_NONE":0,D.disableAnalogOutput=!1,D.disableDigitalOutput=!1),p.hdcp!=null&&p.hasOwnProperty("hdcp")&&(D.hdcp=m.enums===String?E.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]===void 0?p.hdcp:E.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]:p.hdcp),p.cgmsFlags!=null&&p.hasOwnProperty("cgmsFlags")&&(D.cgmsFlags=m.enums===String?E.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]===void 0?p.cgmsFlags:E.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]:p.cgmsFlags),p.hdcpSrmRule!=null&&p.hasOwnProperty("hdcpSrmRule")&&(D.hdcpSrmRule=m.enums===String?E.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]===void 0?p.hdcpSrmRule:E.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]:p.hdcpSrmRule),p.disableAnalogOutput!=null&&p.hasOwnProperty("disableAnalogOutput")&&(D.disableAnalogOutput=p.disableAnalogOutput),p.disableDigitalOutput!=null&&p.hasOwnProperty("disableDigitalOutput")&&(D.disableDigitalOutput=p.disableDigitalOutput),D},s.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OutputProtection"},s.HDCP=function(){var a={},p=Object.create(a);return p[a[0]="HDCP_NONE"]=0,p[a[1]="HDCP_V1"]=1,p[a[2]="HDCP_V2"]=2,p[a[3]="HDCP_V2_1"]=3,p[a[4]="HDCP_V2_2"]=4,p[a[5]="HDCP_V2_3"]=5,p[a[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,p}(),s.CGMS=function(){var a={},p=Object.create(a);return p[a[42]="CGMS_NONE"]=42,p[a[0]="COPY_FREE"]=0,p[a[2]="COPY_ONCE"]=2,p[a[3]="COPY_NEVER"]=3,p}(),s.HdcpSrmRule=function(){var a={},p=Object.create(a);return p[a[0]="HDCP_SRM_RULE_NONE"]=0,p[a[1]="CURRENT_SRM"]=1,p}(),s}(),y.VideoResolutionConstraint=function(){function s(a){if(a)for(var p=Object.keys(a),m=0;m<p.length;m+=1)a[p[m]]!=null&&(this[p[m]]=a[p[m]])}return s.prototype.minResolutionPixels=0,s.prototype.maxResolutionPixels=0,s.prototype.requiredProtection=null,s.create=function(p){return new s(p)},s.encode=function(p,m){return m||(m=j.create()),p.minResolutionPixels!=null&&Object.hasOwnProperty.call(p,"minResolutionPixels")&&m.uint32(8).uint32(p.minResolutionPixels),p.maxResolutionPixels!=null&&Object.hasOwnProperty.call(p,"maxResolutionPixels")&&m.uint32(16).uint32(p.maxResolutionPixels),p.requiredProtection!=null&&Object.hasOwnProperty.call(p,"requiredProtection")&&E.license_protocol.License.KeyContainer.OutputProtection.encode(p.requiredProtection,m.uint32(26).fork()).ldelim(),m},s.encodeDelimited=function(p,m){return this.encode(p,m).ldelim()},s.decode=function(p,m){p instanceof k||(p=k.create(p));for(var D=m===void 0?p.len:p.pos+m,X=new E.license_protocol.License.KeyContainer.VideoResolutionConstraint;p.pos<D;){var A=p.uint32();switch(A>>>3){case 1:{X.minResolutionPixels=p.uint32();break}case 2:{X.maxResolutionPixels=p.uint32();break}case 3:{X.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.decode(p,p.uint32());break}default:p.skipType(A&7);break}}return X},s.decodeDelimited=function(p){return p instanceof k||(p=new k(p)),this.decode(p,p.uint32())},s.verify=function(p){if(typeof p!="object"||p===null)return"object expected";if(p.minResolutionPixels!=null&&p.hasOwnProperty("minResolutionPixels")&&!x.isInteger(p.minResolutionPixels))return"minResolutionPixels: integer expected";if(p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&!x.isInteger(p.maxResolutionPixels))return"maxResolutionPixels: integer expected";if(p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")){var m=E.license_protocol.License.KeyContainer.OutputProtection.verify(p.requiredProtection);if(m)return"requiredProtection."+m}return null},s.fromObject=function(p){if(p instanceof E.license_protocol.License.KeyContainer.VideoResolutionConstraint)return p;var m=new E.license_protocol.License.KeyContainer.VideoResolutionConstraint;if(p.minResolutionPixels!=null&&(m.minResolutionPixels=p.minResolutionPixels>>>0),p.maxResolutionPixels!=null&&(m.maxResolutionPixels=p.maxResolutionPixels>>>0),p.requiredProtection!=null){if(typeof p.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.VideoResolutionConstraint.requiredProtection: object expected");m.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.fromObject(p.requiredProtection)}return m},s.toObject=function(p,m){m||(m={});var D={};return m.defaults&&(D.minResolutionPixels=0,D.maxResolutionPixels=0,D.requiredProtection=null),p.minResolutionPixels!=null&&p.hasOwnProperty("minResolutionPixels")&&(D.minResolutionPixels=p.minResolutionPixels),p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&(D.maxResolutionPixels=p.maxResolutionPixels),p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")&&(D.requiredProtection=E.license_protocol.License.KeyContainer.OutputProtection.toObject(p.requiredProtection,m)),D},s.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.VideoResolutionConstraint"},s}(),y.OperatorSessionKeyPermissions=function(){function s(a){if(a)for(var p=Object.keys(a),m=0;m<p.length;m+=1)a[p[m]]!=null&&(this[p[m]]=a[p[m]])}return s.prototype.allowEncrypt=!1,s.prototype.allowDecrypt=!1,s.prototype.allowSign=!1,s.prototype.allowSignatureVerify=!1,s.create=function(p){return new s(p)},s.encode=function(p,m){return m||(m=j.create()),p.allowEncrypt!=null&&Object.hasOwnProperty.call(p,"allowEncrypt")&&m.uint32(8).bool(p.allowEncrypt),p.allowDecrypt!=null&&Object.hasOwnProperty.call(p,"allowDecrypt")&&m.uint32(16).bool(p.allowDecrypt),p.allowSign!=null&&Object.hasOwnProperty.call(p,"allowSign")&&m.uint32(24).bool(p.allowSign),p.allowSignatureVerify!=null&&Object.hasOwnProperty.call(p,"allowSignatureVerify")&&m.uint32(32).bool(p.allowSignatureVerify),m},s.encodeDelimited=function(p,m){return this.encode(p,m).ldelim()},s.decode=function(p,m){p instanceof k||(p=k.create(p));for(var D=m===void 0?p.len:p.pos+m,X=new E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;p.pos<D;){var A=p.uint32();switch(A>>>3){case 1:{X.allowEncrypt=p.bool();break}case 2:{X.allowDecrypt=p.bool();break}case 3:{X.allowSign=p.bool();break}case 4:{X.allowSignatureVerify=p.bool();break}default:p.skipType(A&7);break}}return X},s.decodeDelimited=function(p){return p instanceof k||(p=new k(p)),this.decode(p,p.uint32())},s.verify=function(p){return typeof p!="object"||p===null?"object expected":p.allowEncrypt!=null&&p.hasOwnProperty("allowEncrypt")&&typeof p.allowEncrypt!="boolean"?"allowEncrypt: boolean expected":p.allowDecrypt!=null&&p.hasOwnProperty("allowDecrypt")&&typeof p.allowDecrypt!="boolean"?"allowDecrypt: boolean expected":p.allowSign!=null&&p.hasOwnProperty("allowSign")&&typeof p.allowSign!="boolean"?"allowSign: boolean expected":p.allowSignatureVerify!=null&&p.hasOwnProperty("allowSignatureVerify")&&typeof p.allowSignatureVerify!="boolean"?"allowSignatureVerify: boolean expected":null},s.fromObject=function(p){if(p instanceof E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions)return p;var m=new E.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;return p.allowEncrypt!=null&&(m.allowEncrypt=!!p.allowEncrypt),p.allowDecrypt!=null&&(m.allowDecrypt=!!p.allowDecrypt),p.allowSign!=null&&(m.allowSign=!!p.allowSign),p.allowSignatureVerify!=null&&(m.allowSignatureVerify=!!p.allowSignatureVerify),m},s.toObject=function(p,m){m||(m={});var D={};return m.defaults&&(D.allowEncrypt=!1,D.allowDecrypt=!1,D.allowSign=!1,D.allowSignatureVerify=!1),p.allowEncrypt!=null&&p.hasOwnProperty("allowEncrypt")&&(D.allowEncrypt=p.allowEncrypt),p.allowDecrypt!=null&&p.hasOwnProperty("allowDecrypt")&&(D.allowDecrypt=p.allowDecrypt),p.allowSign!=null&&p.hasOwnProperty("allowSign")&&(D.allowSign=p.allowSign),p.allowSignatureVerify!=null&&p.hasOwnProperty("allowSignatureVerify")&&(D.allowSignatureVerify=p.allowSignatureVerify),D},s.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OperatorSessionKeyPermissions"},s}(),y}(),M}(),V.ProtocolVersion=function(){var M={},y=Object.create(M);return y[M[20]="VERSION_2_0"]=20,y[M[21]="VERSION_2_1"]=21,y[M[22]="VERSION_2_2"]=22,y}(),V.LicenseRequest=function(){function M(y){if(y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.clientId=null,M.prototype.contentId=null,M.prototype.type=1,M.prototype.requestTime=x.Long?x.Long.fromBits(0,0,!1):0,M.prototype.keyControlNonceDeprecated=x.newBuffer([]),M.prototype.protocolVersion=20,M.prototype.keyControlNonce=0,M.prototype.encryptedClientId=null,M.create=function(s){return new M(s)},M.encode=function(s,a){return a||(a=j.create()),s.clientId!=null&&Object.hasOwnProperty.call(s,"clientId")&&E.license_protocol.ClientIdentification.encode(s.clientId,a.uint32(10).fork()).ldelim(),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&E.license_protocol.LicenseRequest.ContentIdentification.encode(s.contentId,a.uint32(18).fork()).ldelim(),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(24).int32(s.type),s.requestTime!=null&&Object.hasOwnProperty.call(s,"requestTime")&&a.uint32(32).int64(s.requestTime),s.keyControlNonceDeprecated!=null&&Object.hasOwnProperty.call(s,"keyControlNonceDeprecated")&&a.uint32(42).bytes(s.keyControlNonceDeprecated),s.protocolVersion!=null&&Object.hasOwnProperty.call(s,"protocolVersion")&&a.uint32(48).int32(s.protocolVersion),s.keyControlNonce!=null&&Object.hasOwnProperty.call(s,"keyControlNonce")&&a.uint32(56).uint32(s.keyControlNonce),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&E.license_protocol.EncryptedClientIdentification.encode(s.encryptedClientId,a.uint32(66).fork()).ldelim(),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.LicenseRequest;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.clientId=E.license_protocol.ClientIdentification.decode(s,s.uint32());break}case 2:{m.contentId=E.license_protocol.LicenseRequest.ContentIdentification.decode(s,s.uint32());break}case 3:{m.type=s.int32();break}case 4:{m.requestTime=s.int64();break}case 5:{m.keyControlNonceDeprecated=s.bytes();break}case 6:{m.protocolVersion=s.int32();break}case 7:{m.keyControlNonce=s.uint32();break}case 8:{m.encryptedClientId=E.license_protocol.EncryptedClientIdentification.decode(s,s.uint32());break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.clientId!=null&&s.hasOwnProperty("clientId")){var a=E.license_protocol.ClientIdentification.verify(s.clientId);if(a)return"clientId."+a}if(s.contentId!=null&&s.hasOwnProperty("contentId")){var a=E.license_protocol.LicenseRequest.ContentIdentification.verify(s.contentId);if(a)return"contentId."+a}if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:break}if(s.requestTime!=null&&s.hasOwnProperty("requestTime")&&!x.isInteger(s.requestTime)&&!(s.requestTime&&x.isInteger(s.requestTime.low)&&x.isInteger(s.requestTime.high)))return"requestTime: integer|Long expected";if(s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&!(s.keyControlNonceDeprecated&&typeof s.keyControlNonceDeprecated.length=="number"||x.isString(s.keyControlNonceDeprecated)))return"keyControlNonceDeprecated: buffer expected";if(s.protocolVersion!=null&&s.hasOwnProperty("protocolVersion"))switch(s.protocolVersion){default:return"protocolVersion: enum value expected";case 20:case 21:case 22:break}if(s.keyControlNonce!=null&&s.hasOwnProperty("keyControlNonce")&&!x.isInteger(s.keyControlNonce))return"keyControlNonce: integer expected";if(s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")){var a=E.license_protocol.EncryptedClientIdentification.verify(s.encryptedClientId);if(a)return"encryptedClientId."+a}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.LicenseRequest)return s;var a=new E.license_protocol.LicenseRequest;if(s.clientId!=null){if(typeof s.clientId!="object")throw TypeError(".license_protocol.LicenseRequest.clientId: object expected");a.clientId=E.license_protocol.ClientIdentification.fromObject(s.clientId)}if(s.contentId!=null){if(typeof s.contentId!="object")throw TypeError(".license_protocol.LicenseRequest.contentId: object expected");a.contentId=E.license_protocol.LicenseRequest.ContentIdentification.fromObject(s.contentId)}switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"NEW":case 1:a.type=1;break;case"RENEWAL":case 2:a.type=2;break;case"RELEASE":case 3:a.type=3;break}switch(s.requestTime!=null&&(x.Long?(a.requestTime=x.Long.fromValue(s.requestTime)).unsigned=!1:typeof s.requestTime=="string"?a.requestTime=parseInt(s.requestTime,10):typeof s.requestTime=="number"?a.requestTime=s.requestTime:typeof s.requestTime=="object"&&(a.requestTime=new x.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber())),s.keyControlNonceDeprecated!=null&&(typeof s.keyControlNonceDeprecated=="string"?x.base64.decode(s.keyControlNonceDeprecated,a.keyControlNonceDeprecated=x.newBuffer(x.base64.length(s.keyControlNonceDeprecated)),0):s.keyControlNonceDeprecated.length>=0&&(a.keyControlNonceDeprecated=s.keyControlNonceDeprecated)),s.protocolVersion){default:if(typeof s.protocolVersion=="number"){a.protocolVersion=s.protocolVersion;break}break;case"VERSION_2_0":case 20:a.protocolVersion=20;break;case"VERSION_2_1":case 21:a.protocolVersion=21;break;case"VERSION_2_2":case 22:a.protocolVersion=22;break}if(s.keyControlNonce!=null&&(a.keyControlNonce=s.keyControlNonce>>>0),s.encryptedClientId!=null){if(typeof s.encryptedClientId!="object")throw TypeError(".license_protocol.LicenseRequest.encryptedClientId: object expected");a.encryptedClientId=E.license_protocol.EncryptedClientIdentification.fromObject(s.encryptedClientId)}return a},M.toObject=function(s,a){a||(a={});var p={};if(a.defaults){if(p.clientId=null,p.contentId=null,p.type=a.enums===String?"NEW":1,x.Long){var m=new x.Long(0,0,!1);p.requestTime=a.longs===String?m.toString():a.longs===Number?m.toNumber():m}else p.requestTime=a.longs===String?"0":0;a.bytes===String?p.keyControlNonceDeprecated="":(p.keyControlNonceDeprecated=[],a.bytes!==Array&&(p.keyControlNonceDeprecated=x.newBuffer(p.keyControlNonceDeprecated))),p.protocolVersion=a.enums===String?"VERSION_2_0":20,p.keyControlNonce=0,p.encryptedClientId=null}return s.clientId!=null&&s.hasOwnProperty("clientId")&&(p.clientId=E.license_protocol.ClientIdentification.toObject(s.clientId,a)),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=E.license_protocol.LicenseRequest.ContentIdentification.toObject(s.contentId,a)),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.LicenseRequest.RequestType[s.type]===void 0?s.type:E.license_protocol.LicenseRequest.RequestType[s.type]:s.type),s.requestTime!=null&&s.hasOwnProperty("requestTime")&&(typeof s.requestTime=="number"?p.requestTime=a.longs===String?String(s.requestTime):s.requestTime:p.requestTime=a.longs===String?x.Long.prototype.toString.call(s.requestTime):a.longs===Number?new x.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber():s.requestTime),s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&(p.keyControlNonceDeprecated=a.bytes===String?x.base64.encode(s.keyControlNonceDeprecated,0,s.keyControlNonceDeprecated.length):a.bytes===Array?Array.prototype.slice.call(s.keyControlNonceDeprecated):s.keyControlNonceDeprecated),s.protocolVersion!=null&&s.hasOwnProperty("protocolVersion")&&(p.protocolVersion=a.enums===String?E.license_protocol.ProtocolVersion[s.protocolVersion]===void 0?s.protocolVersion:E.license_protocol.ProtocolVersion[s.protocolVersion]:s.protocolVersion),s.keyControlNonce!=null&&s.hasOwnProperty("keyControlNonce")&&(p.keyControlNonce=s.keyControlNonce),s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&(p.encryptedClientId=E.license_protocol.EncryptedClientIdentification.toObject(s.encryptedClientId,a)),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseRequest"},M.ContentIdentification=function(){function y(a){if(a)for(var p=Object.keys(a),m=0;m<p.length;m+=1)a[p[m]]!=null&&(this[p[m]]=a[p[m]])}y.prototype.widevinePsshData=null,y.prototype.webmKeyId=null,y.prototype.existingLicense=null,y.prototype.initData=null;var s;return Object.defineProperty(y.prototype,"contentIdVariant",{get:x.oneOfGetter(s=["widevinePsshData","webmKeyId","existingLicense","initData"]),set:x.oneOfSetter(s)}),y.create=function(p){return new y(p)},y.encode=function(p,m){return m||(m=j.create()),p.widevinePsshData!=null&&Object.hasOwnProperty.call(p,"widevinePsshData")&&E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.encode(p.widevinePsshData,m.uint32(10).fork()).ldelim(),p.webmKeyId!=null&&Object.hasOwnProperty.call(p,"webmKeyId")&&E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.encode(p.webmKeyId,m.uint32(18).fork()).ldelim(),p.existingLicense!=null&&Object.hasOwnProperty.call(p,"existingLicense")&&E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.encode(p.existingLicense,m.uint32(26).fork()).ldelim(),p.initData!=null&&Object.hasOwnProperty.call(p,"initData")&&E.license_protocol.LicenseRequest.ContentIdentification.InitData.encode(p.initData,m.uint32(34).fork()).ldelim(),m},y.encodeDelimited=function(p,m){return this.encode(p,m).ldelim()},y.decode=function(p,m){p instanceof k||(p=k.create(p));for(var D=m===void 0?p.len:p.pos+m,X=new E.license_protocol.LicenseRequest.ContentIdentification;p.pos<D;){var A=p.uint32();switch(A>>>3){case 1:{X.widevinePsshData=E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.decode(p,p.uint32());break}case 2:{X.webmKeyId=E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.decode(p,p.uint32());break}case 3:{X.existingLicense=E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.decode(p,p.uint32());break}case 4:{X.initData=E.license_protocol.LicenseRequest.ContentIdentification.InitData.decode(p,p.uint32());break}default:p.skipType(A&7);break}}return X},y.decodeDelimited=function(p){return p instanceof k||(p=new k(p)),this.decode(p,p.uint32())},y.verify=function(p){if(typeof p!="object"||p===null)return"object expected";var m={};if(p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")){m.contentIdVariant=1;{var D=E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.verify(p.widevinePsshData);if(D)return"widevinePsshData."+D}}if(p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")){if(m.contentIdVariant===1)return"contentIdVariant: multiple values";m.contentIdVariant=1;{var D=E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.verify(p.webmKeyId);if(D)return"webmKeyId."+D}}if(p.existingLicense!=null&&p.hasOwnProperty("existingLicense")){if(m.contentIdVariant===1)return"contentIdVariant: multiple values";m.contentIdVariant=1;{var D=E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.verify(p.existingLicense);if(D)return"existingLicense."+D}}if(p.initData!=null&&p.hasOwnProperty("initData")){if(m.contentIdVariant===1)return"contentIdVariant: multiple values";m.contentIdVariant=1;{var D=E.license_protocol.LicenseRequest.ContentIdentification.InitData.verify(p.initData);if(D)return"initData."+D}}return null},y.fromObject=function(p){if(p instanceof E.license_protocol.LicenseRequest.ContentIdentification)return p;var m=new E.license_protocol.LicenseRequest.ContentIdentification;if(p.widevinePsshData!=null){if(typeof p.widevinePsshData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.widevinePsshData: object expected");m.widevinePsshData=E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.fromObject(p.widevinePsshData)}if(p.webmKeyId!=null){if(typeof p.webmKeyId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.webmKeyId: object expected");m.webmKeyId=E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.fromObject(p.webmKeyId)}if(p.existingLicense!=null){if(typeof p.existingLicense!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.existingLicense: object expected");m.existingLicense=E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.fromObject(p.existingLicense)}if(p.initData!=null){if(typeof p.initData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.initData: object expected");m.initData=E.license_protocol.LicenseRequest.ContentIdentification.InitData.fromObject(p.initData)}return m},y.toObject=function(p,m){m||(m={});var D={};return p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")&&(D.widevinePsshData=E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.toObject(p.widevinePsshData,m),m.oneofs&&(D.contentIdVariant="widevinePsshData")),p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")&&(D.webmKeyId=E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.toObject(p.webmKeyId,m),m.oneofs&&(D.contentIdVariant="webmKeyId")),p.existingLicense!=null&&p.hasOwnProperty("existingLicense")&&(D.existingLicense=E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.toObject(p.existingLicense,m),m.oneofs&&(D.contentIdVariant="existingLicense")),p.initData!=null&&p.hasOwnProperty("initData")&&(D.initData=E.license_protocol.LicenseRequest.ContentIdentification.InitData.toObject(p.initData,m),m.oneofs&&(D.contentIdVariant="initData")),D},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.LicenseRequest.ContentIdentification"},y.WidevinePsshData=function(){function a(p){if(this.psshData=[],p)for(var m=Object.keys(p),D=0;D<m.length;D+=1)p[m[D]]!=null&&(this[m[D]]=p[m[D]])}return a.prototype.psshData=x.emptyArray,a.prototype.licenseType=1,a.prototype.requestId=x.newBuffer([]),a.create=function(m){return new a(m)},a.encode=function(m,D){if(D||(D=j.create()),m.psshData!=null&&m.psshData.length)for(var X=0;X<m.psshData.length;X+=1)D.uint32(10).bytes(m.psshData[X]);return m.licenseType!=null&&Object.hasOwnProperty.call(m,"licenseType")&&D.uint32(16).int32(m.licenseType),m.requestId!=null&&Object.hasOwnProperty.call(m,"requestId")&&D.uint32(26).bytes(m.requestId),D},a.encodeDelimited=function(m,D){return this.encode(m,D).ldelim()},a.decode=function(m,D){m instanceof k||(m=k.create(m));for(var X=D===void 0?m.len:m.pos+D,A=new E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;m.pos<X;){var te=m.uint32();switch(te>>>3){case 1:{A.psshData&&A.psshData.length||(A.psshData=[]),A.psshData.push(m.bytes());break}case 2:{A.licenseType=m.int32();break}case 3:{A.requestId=m.bytes();break}default:m.skipType(te&7);break}}return A},a.decodeDelimited=function(m){return m instanceof k||(m=new k(m)),this.decode(m,m.uint32())},a.verify=function(m){if(typeof m!="object"||m===null)return"object expected";if(m.psshData!=null&&m.hasOwnProperty("psshData")){if(!Array.isArray(m.psshData))return"psshData: array expected";for(var D=0;D<m.psshData.length;D+=1)if(!(m.psshData[D]&&typeof m.psshData[D].length=="number"||x.isString(m.psshData[D])))return"psshData: buffer[] expected"}if(m.licenseType!=null&&m.hasOwnProperty("licenseType"))switch(m.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return m.requestId!=null&&m.hasOwnProperty("requestId")&&!(m.requestId&&typeof m.requestId.length=="number"||x.isString(m.requestId))?"requestId: buffer expected":null},a.fromObject=function(m){if(m instanceof E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData)return m;var D=new E.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;if(m.psshData){if(!Array.isArray(m.psshData))throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.psshData: array expected");D.psshData=[];for(var X=0;X<m.psshData.length;X+=1)typeof m.psshData[X]=="string"?x.base64.decode(m.psshData[X],D.psshData[X]=x.newBuffer(x.base64.length(m.psshData[X])),0):m.psshData[X].length>=0&&(D.psshData[X]=m.psshData[X])}switch(m.licenseType){default:if(typeof m.licenseType=="number"){D.licenseType=m.licenseType;break}break;case"STREAMING":case 1:D.licenseType=1;break;case"OFFLINE":case 2:D.licenseType=2;break;case"AUTOMATIC":case 3:D.licenseType=3;break}return m.requestId!=null&&(typeof m.requestId=="string"?x.base64.decode(m.requestId,D.requestId=x.newBuffer(x.base64.length(m.requestId)),0):m.requestId.length>=0&&(D.requestId=m.requestId)),D},a.toObject=function(m,D){D||(D={});var X={};if((D.arrays||D.defaults)&&(X.psshData=[]),D.defaults&&(X.licenseType=D.enums===String?"STREAMING":1,D.bytes===String?X.requestId="":(X.requestId=[],D.bytes!==Array&&(X.requestId=x.newBuffer(X.requestId)))),m.psshData&&m.psshData.length){X.psshData=[];for(var A=0;A<m.psshData.length;A+=1)X.psshData[A]=D.bytes===String?x.base64.encode(m.psshData[A],0,m.psshData[A].length):D.bytes===Array?Array.prototype.slice.call(m.psshData[A]):m.psshData[A]}return m.licenseType!=null&&m.hasOwnProperty("licenseType")&&(X.licenseType=D.enums===String?E.license_protocol.LicenseType[m.licenseType]===void 0?m.licenseType:E.license_protocol.LicenseType[m.licenseType]:m.licenseType),m.requestId!=null&&m.hasOwnProperty("requestId")&&(X.requestId=D.bytes===String?x.base64.encode(m.requestId,0,m.requestId.length):D.bytes===Array?Array.prototype.slice.call(m.requestId):m.requestId),X},a.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},a.getTypeUrl=function(m){return m===void 0&&(m="type.googleapis.com"),m+"/license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData"},a}(),y.WebmKeyId=function(){function a(p){if(p)for(var m=Object.keys(p),D=0;D<m.length;D+=1)p[m[D]]!=null&&(this[m[D]]=p[m[D]])}return a.prototype.header=x.newBuffer([]),a.prototype.licenseType=1,a.prototype.requestId=x.newBuffer([]),a.create=function(m){return new a(m)},a.encode=function(m,D){return D||(D=j.create()),m.header!=null&&Object.hasOwnProperty.call(m,"header")&&D.uint32(10).bytes(m.header),m.licenseType!=null&&Object.hasOwnProperty.call(m,"licenseType")&&D.uint32(16).int32(m.licenseType),m.requestId!=null&&Object.hasOwnProperty.call(m,"requestId")&&D.uint32(26).bytes(m.requestId),D},a.encodeDelimited=function(m,D){return this.encode(m,D).ldelim()},a.decode=function(m,D){m instanceof k||(m=k.create(m));for(var X=D===void 0?m.len:m.pos+D,A=new E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;m.pos<X;){var te=m.uint32();switch(te>>>3){case 1:{A.header=m.bytes();break}case 2:{A.licenseType=m.int32();break}case 3:{A.requestId=m.bytes();break}default:m.skipType(te&7);break}}return A},a.decodeDelimited=function(m){return m instanceof k||(m=new k(m)),this.decode(m,m.uint32())},a.verify=function(m){if(typeof m!="object"||m===null)return"object expected";if(m.header!=null&&m.hasOwnProperty("header")&&!(m.header&&typeof m.header.length=="number"||x.isString(m.header)))return"header: buffer expected";if(m.licenseType!=null&&m.hasOwnProperty("licenseType"))switch(m.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return m.requestId!=null&&m.hasOwnProperty("requestId")&&!(m.requestId&&typeof m.requestId.length=="number"||x.isString(m.requestId))?"requestId: buffer expected":null},a.fromObject=function(m){if(m instanceof E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId)return m;var D=new E.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;switch(m.header!=null&&(typeof m.header=="string"?x.base64.decode(m.header,D.header=x.newBuffer(x.base64.length(m.header)),0):m.header.length>=0&&(D.header=m.header)),m.licenseType){default:if(typeof m.licenseType=="number"){D.licenseType=m.licenseType;break}break;case"STREAMING":case 1:D.licenseType=1;break;case"OFFLINE":case 2:D.licenseType=2;break;case"AUTOMATIC":case 3:D.licenseType=3;break}return m.requestId!=null&&(typeof m.requestId=="string"?x.base64.decode(m.requestId,D.requestId=x.newBuffer(x.base64.length(m.requestId)),0):m.requestId.length>=0&&(D.requestId=m.requestId)),D},a.toObject=function(m,D){D||(D={});var X={};return D.defaults&&(D.bytes===String?X.header="":(X.header=[],D.bytes!==Array&&(X.header=x.newBuffer(X.header))),X.licenseType=D.enums===String?"STREAMING":1,D.bytes===String?X.requestId="":(X.requestId=[],D.bytes!==Array&&(X.requestId=x.newBuffer(X.requestId)))),m.header!=null&&m.hasOwnProperty("header")&&(X.header=D.bytes===String?x.base64.encode(m.header,0,m.header.length):D.bytes===Array?Array.prototype.slice.call(m.header):m.header),m.licenseType!=null&&m.hasOwnProperty("licenseType")&&(X.licenseType=D.enums===String?E.license_protocol.LicenseType[m.licenseType]===void 0?m.licenseType:E.license_protocol.LicenseType[m.licenseType]:m.licenseType),m.requestId!=null&&m.hasOwnProperty("requestId")&&(X.requestId=D.bytes===String?x.base64.encode(m.requestId,0,m.requestId.length):D.bytes===Array?Array.prototype.slice.call(m.requestId):m.requestId),X},a.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},a.getTypeUrl=function(m){return m===void 0&&(m="type.googleapis.com"),m+"/license_protocol.LicenseRequest.ContentIdentification.WebmKeyId"},a}(),y.ExistingLicense=function(){function a(p){if(p)for(var m=Object.keys(p),D=0;D<m.length;D+=1)p[m[D]]!=null&&(this[m[D]]=p[m[D]])}return a.prototype.licenseId=null,a.prototype.secondsSinceStarted=x.Long?x.Long.fromBits(0,0,!1):0,a.prototype.secondsSinceLastPlayed=x.Long?x.Long.fromBits(0,0,!1):0,a.prototype.sessionUsageTableEntry=x.newBuffer([]),a.create=function(m){return new a(m)},a.encode=function(m,D){return D||(D=j.create()),m.licenseId!=null&&Object.hasOwnProperty.call(m,"licenseId")&&E.license_protocol.LicenseIdentification.encode(m.licenseId,D.uint32(10).fork()).ldelim(),m.secondsSinceStarted!=null&&Object.hasOwnProperty.call(m,"secondsSinceStarted")&&D.uint32(16).int64(m.secondsSinceStarted),m.secondsSinceLastPlayed!=null&&Object.hasOwnProperty.call(m,"secondsSinceLastPlayed")&&D.uint32(24).int64(m.secondsSinceLastPlayed),m.sessionUsageTableEntry!=null&&Object.hasOwnProperty.call(m,"sessionUsageTableEntry")&&D.uint32(34).bytes(m.sessionUsageTableEntry),D},a.encodeDelimited=function(m,D){return this.encode(m,D).ldelim()},a.decode=function(m,D){m instanceof k||(m=k.create(m));for(var X=D===void 0?m.len:m.pos+D,A=new E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;m.pos<X;){var te=m.uint32();switch(te>>>3){case 1:{A.licenseId=E.license_protocol.LicenseIdentification.decode(m,m.uint32());break}case 2:{A.secondsSinceStarted=m.int64();break}case 3:{A.secondsSinceLastPlayed=m.int64();break}case 4:{A.sessionUsageTableEntry=m.bytes();break}default:m.skipType(te&7);break}}return A},a.decodeDelimited=function(m){return m instanceof k||(m=new k(m)),this.decode(m,m.uint32())},a.verify=function(m){if(typeof m!="object"||m===null)return"object expected";if(m.licenseId!=null&&m.hasOwnProperty("licenseId")){var D=E.license_protocol.LicenseIdentification.verify(m.licenseId);if(D)return"licenseId."+D}return m.secondsSinceStarted!=null&&m.hasOwnProperty("secondsSinceStarted")&&!x.isInteger(m.secondsSinceStarted)&&!(m.secondsSinceStarted&&x.isInteger(m.secondsSinceStarted.low)&&x.isInteger(m.secondsSinceStarted.high))?"secondsSinceStarted: integer|Long expected":m.secondsSinceLastPlayed!=null&&m.hasOwnProperty("secondsSinceLastPlayed")&&!x.isInteger(m.secondsSinceLastPlayed)&&!(m.secondsSinceLastPlayed&&x.isInteger(m.secondsSinceLastPlayed.low)&&x.isInteger(m.secondsSinceLastPlayed.high))?"secondsSinceLastPlayed: integer|Long expected":m.sessionUsageTableEntry!=null&&m.hasOwnProperty("sessionUsageTableEntry")&&!(m.sessionUsageTableEntry&&typeof m.sessionUsageTableEntry.length=="number"||x.isString(m.sessionUsageTableEntry))?"sessionUsageTableEntry: buffer expected":null},a.fromObject=function(m){if(m instanceof E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense)return m;var D=new E.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;if(m.licenseId!=null){if(typeof m.licenseId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.licenseId: object expected");D.licenseId=E.license_protocol.LicenseIdentification.fromObject(m.licenseId)}return m.secondsSinceStarted!=null&&(x.Long?(D.secondsSinceStarted=x.Long.fromValue(m.secondsSinceStarted)).unsigned=!1:typeof m.secondsSinceStarted=="string"?D.secondsSinceStarted=parseInt(m.secondsSinceStarted,10):typeof m.secondsSinceStarted=="number"?D.secondsSinceStarted=m.secondsSinceStarted:typeof m.secondsSinceStarted=="object"&&(D.secondsSinceStarted=new x.LongBits(m.secondsSinceStarted.low>>>0,m.secondsSinceStarted.high>>>0).toNumber())),m.secondsSinceLastPlayed!=null&&(x.Long?(D.secondsSinceLastPlayed=x.Long.fromValue(m.secondsSinceLastPlayed)).unsigned=!1:typeof m.secondsSinceLastPlayed=="string"?D.secondsSinceLastPlayed=parseInt(m.secondsSinceLastPlayed,10):typeof m.secondsSinceLastPlayed=="number"?D.secondsSinceLastPlayed=m.secondsSinceLastPlayed:typeof m.secondsSinceLastPlayed=="object"&&(D.secondsSinceLastPlayed=new x.LongBits(m.secondsSinceLastPlayed.low>>>0,m.secondsSinceLastPlayed.high>>>0).toNumber())),m.sessionUsageTableEntry!=null&&(typeof m.sessionUsageTableEntry=="string"?x.base64.decode(m.sessionUsageTableEntry,D.sessionUsageTableEntry=x.newBuffer(x.base64.length(m.sessionUsageTableEntry)),0):m.sessionUsageTableEntry.length>=0&&(D.sessionUsageTableEntry=m.sessionUsageTableEntry)),D},a.toObject=function(m,D){D||(D={});var X={};if(D.defaults){if(X.licenseId=null,x.Long){var A=new x.Long(0,0,!1);X.secondsSinceStarted=D.longs===String?A.toString():D.longs===Number?A.toNumber():A}else X.secondsSinceStarted=D.longs===String?"0":0;if(x.Long){var A=new x.Long(0,0,!1);X.secondsSinceLastPlayed=D.longs===String?A.toString():D.longs===Number?A.toNumber():A}else X.secondsSinceLastPlayed=D.longs===String?"0":0;D.bytes===String?X.sessionUsageTableEntry="":(X.sessionUsageTableEntry=[],D.bytes!==Array&&(X.sessionUsageTableEntry=x.newBuffer(X.sessionUsageTableEntry)))}return m.licenseId!=null&&m.hasOwnProperty("licenseId")&&(X.licenseId=E.license_protocol.LicenseIdentification.toObject(m.licenseId,D)),m.secondsSinceStarted!=null&&m.hasOwnProperty("secondsSinceStarted")&&(typeof m.secondsSinceStarted=="number"?X.secondsSinceStarted=D.longs===String?String(m.secondsSinceStarted):m.secondsSinceStarted:X.secondsSinceStarted=D.longs===String?x.Long.prototype.toString.call(m.secondsSinceStarted):D.longs===Number?new x.LongBits(m.secondsSinceStarted.low>>>0,m.secondsSinceStarted.high>>>0).toNumber():m.secondsSinceStarted),m.secondsSinceLastPlayed!=null&&m.hasOwnProperty("secondsSinceLastPlayed")&&(typeof m.secondsSinceLastPlayed=="number"?X.secondsSinceLastPlayed=D.longs===String?String(m.secondsSinceLastPlayed):m.secondsSinceLastPlayed:X.secondsSinceLastPlayed=D.longs===String?x.Long.prototype.toString.call(m.secondsSinceLastPlayed):D.longs===Number?new x.LongBits(m.secondsSinceLastPlayed.low>>>0,m.secondsSinceLastPlayed.high>>>0).toNumber():m.secondsSinceLastPlayed),m.sessionUsageTableEntry!=null&&m.hasOwnProperty("sessionUsageTableEntry")&&(X.sessionUsageTableEntry=D.bytes===String?x.base64.encode(m.sessionUsageTableEntry,0,m.sessionUsageTableEntry.length):D.bytes===Array?Array.prototype.slice.call(m.sessionUsageTableEntry):m.sessionUsageTableEntry),X},a.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},a.getTypeUrl=function(m){return m===void 0&&(m="type.googleapis.com"),m+"/license_protocol.LicenseRequest.ContentIdentification.ExistingLicense"},a}(),y.InitData=function(){function a(p){if(p)for(var m=Object.keys(p),D=0;D<m.length;D+=1)p[m[D]]!=null&&(this[m[D]]=p[m[D]])}return a.prototype.initDataType=1,a.prototype.initData=x.newBuffer([]),a.prototype.licenseType=1,a.prototype.requestId=x.newBuffer([]),a.create=function(m){return new a(m)},a.encode=function(m,D){return D||(D=j.create()),m.initDataType!=null&&Object.hasOwnProperty.call(m,"initDataType")&&D.uint32(8).int32(m.initDataType),m.initData!=null&&Object.hasOwnProperty.call(m,"initData")&&D.uint32(18).bytes(m.initData),m.licenseType!=null&&Object.hasOwnProperty.call(m,"licenseType")&&D.uint32(24).int32(m.licenseType),m.requestId!=null&&Object.hasOwnProperty.call(m,"requestId")&&D.uint32(34).bytes(m.requestId),D},a.encodeDelimited=function(m,D){return this.encode(m,D).ldelim()},a.decode=function(m,D){m instanceof k||(m=k.create(m));for(var X=D===void 0?m.len:m.pos+D,A=new E.license_protocol.LicenseRequest.ContentIdentification.InitData;m.pos<X;){var te=m.uint32();switch(te>>>3){case 1:{A.initDataType=m.int32();break}case 2:{A.initData=m.bytes();break}case 3:{A.licenseType=m.int32();break}case 4:{A.requestId=m.bytes();break}default:m.skipType(te&7);break}}return A},a.decodeDelimited=function(m){return m instanceof k||(m=new k(m)),this.decode(m,m.uint32())},a.verify=function(m){if(typeof m!="object"||m===null)return"object expected";if(m.initDataType!=null&&m.hasOwnProperty("initDataType"))switch(m.initDataType){default:return"initDataType: enum value expected";case 1:case 2:break}if(m.initData!=null&&m.hasOwnProperty("initData")&&!(m.initData&&typeof m.initData.length=="number"||x.isString(m.initData)))return"initData: buffer expected";if(m.licenseType!=null&&m.hasOwnProperty("licenseType"))switch(m.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return m.requestId!=null&&m.hasOwnProperty("requestId")&&!(m.requestId&&typeof m.requestId.length=="number"||x.isString(m.requestId))?"requestId: buffer expected":null},a.fromObject=function(m){if(m instanceof E.license_protocol.LicenseRequest.ContentIdentification.InitData)return m;var D=new E.license_protocol.LicenseRequest.ContentIdentification.InitData;switch(m.initDataType){default:if(typeof m.initDataType=="number"){D.initDataType=m.initDataType;break}break;case"CENC":case 1:D.initDataType=1;break;case"WEBM":case 2:D.initDataType=2;break}switch(m.initData!=null&&(typeof m.initData=="string"?x.base64.decode(m.initData,D.initData=x.newBuffer(x.base64.length(m.initData)),0):m.initData.length>=0&&(D.initData=m.initData)),m.licenseType){default:if(typeof m.licenseType=="number"){D.licenseType=m.licenseType;break}break;case"STREAMING":case 1:D.licenseType=1;break;case"OFFLINE":case 2:D.licenseType=2;break;case"AUTOMATIC":case 3:D.licenseType=3;break}return m.requestId!=null&&(typeof m.requestId=="string"?x.base64.decode(m.requestId,D.requestId=x.newBuffer(x.base64.length(m.requestId)),0):m.requestId.length>=0&&(D.requestId=m.requestId)),D},a.toObject=function(m,D){D||(D={});var X={};return D.defaults&&(X.initDataType=D.enums===String?"CENC":1,D.bytes===String?X.initData="":(X.initData=[],D.bytes!==Array&&(X.initData=x.newBuffer(X.initData))),X.licenseType=D.enums===String?"STREAMING":1,D.bytes===String?X.requestId="":(X.requestId=[],D.bytes!==Array&&(X.requestId=x.newBuffer(X.requestId)))),m.initDataType!=null&&m.hasOwnProperty("initDataType")&&(X.initDataType=D.enums===String?E.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[m.initDataType]===void 0?m.initDataType:E.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[m.initDataType]:m.initDataType),m.initData!=null&&m.hasOwnProperty("initData")&&(X.initData=D.bytes===String?x.base64.encode(m.initData,0,m.initData.length):D.bytes===Array?Array.prototype.slice.call(m.initData):m.initData),m.licenseType!=null&&m.hasOwnProperty("licenseType")&&(X.licenseType=D.enums===String?E.license_protocol.LicenseType[m.licenseType]===void 0?m.licenseType:E.license_protocol.LicenseType[m.licenseType]:m.licenseType),m.requestId!=null&&m.hasOwnProperty("requestId")&&(X.requestId=D.bytes===String?x.base64.encode(m.requestId,0,m.requestId.length):D.bytes===Array?Array.prototype.slice.call(m.requestId):m.requestId),X},a.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},a.getTypeUrl=function(m){return m===void 0&&(m="type.googleapis.com"),m+"/license_protocol.LicenseRequest.ContentIdentification.InitData"},a.InitDataType=function(){var p={},m=Object.create(p);return m[p[1]="CENC"]=1,m[p[2]="WEBM"]=2,m}(),a}(),y}(),M.RequestType=function(){var y={},s=Object.create(y);return s[y[1]="NEW"]=1,s[y[2]="RENEWAL"]=2,s[y[3]="RELEASE"]=3,s}(),M}(),V.MetricData=function(){function M(y){if(this.metricData=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.stageName="",M.prototype.metricData=x.emptyArray,M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.stageName!=null&&Object.hasOwnProperty.call(s,"stageName")&&a.uint32(10).string(s.stageName),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)E.license_protocol.MetricData.TypeValue.encode(s.metricData[p],a.uint32(18).fork()).ldelim();return a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.MetricData;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.stageName=s.string();break}case 2:{m.metricData&&m.metricData.length||(m.metricData=[]),m.metricData.push(E.license_protocol.MetricData.TypeValue.decode(s,s.uint32()));break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.stageName!=null&&s.hasOwnProperty("stageName")&&!x.isString(s.stageName))return"stageName: string expected";if(s.metricData!=null&&s.hasOwnProperty("metricData")){if(!Array.isArray(s.metricData))return"metricData: array expected";for(var a=0;a<s.metricData.length;a+=1){var p=E.license_protocol.MetricData.TypeValue.verify(s.metricData[a]);if(p)return"metricData."+p}}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.MetricData)return s;var a=new E.license_protocol.MetricData;if(s.stageName!=null&&(a.stageName=String(s.stageName)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.MetricData.metricData: array expected");a.metricData=[];for(var p=0;p<s.metricData.length;p+=1){if(typeof s.metricData[p]!="object")throw TypeError(".license_protocol.MetricData.metricData: object expected");a.metricData[p]=E.license_protocol.MetricData.TypeValue.fromObject(s.metricData[p])}}return a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.metricData=[]),a.defaults&&(p.stageName=""),s.stageName!=null&&s.hasOwnProperty("stageName")&&(p.stageName=s.stageName),s.metricData&&s.metricData.length){p.metricData=[];for(var m=0;m<s.metricData.length;m+=1)p.metricData[m]=E.license_protocol.MetricData.TypeValue.toObject(s.metricData[m],a)}return p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.MetricData"},M.MetricType=function(){var y={},s=Object.create(y);return s[y[1]="LATENCY"]=1,s[y[2]="TIMESTAMP"]=2,s}(),M.TypeValue=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.type=1,y.prototype.value=x.Long?x.Long.fromBits(0,0,!1):0,y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(8).int32(a.type),a.value!=null&&Object.hasOwnProperty.call(a,"value")&&p.uint32(16).int64(a.value),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.MetricData.TypeValue;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.type=a.int32();break}case 2:{D.value=a.int64();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 1:case 2:break}return a.value!=null&&a.hasOwnProperty("value")&&!x.isInteger(a.value)&&!(a.value&&x.isInteger(a.value.low)&&x.isInteger(a.value.high))?"value: integer|Long expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.MetricData.TypeValue)return a;var p=new E.license_protocol.MetricData.TypeValue;switch(a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"LATENCY":case 1:p.type=1;break;case"TIMESTAMP":case 2:p.type=2;break}return a.value!=null&&(x.Long?(p.value=x.Long.fromValue(a.value)).unsigned=!1:typeof a.value=="string"?p.value=parseInt(a.value,10):typeof a.value=="number"?p.value=a.value:typeof a.value=="object"&&(p.value=new x.LongBits(a.value.low>>>0,a.value.high>>>0).toNumber())),p},y.toObject=function(a,p){p||(p={});var m={};if(p.defaults)if(m.type=p.enums===String?"LATENCY":1,x.Long){var D=new x.Long(0,0,!1);m.value=p.longs===String?D.toString():p.longs===Number?D.toNumber():D}else m.value=p.longs===String?"0":0;return a.type!=null&&a.hasOwnProperty("type")&&(m.type=p.enums===String?E.license_protocol.MetricData.MetricType[a.type]===void 0?a.type:E.license_protocol.MetricData.MetricType[a.type]:a.type),a.value!=null&&a.hasOwnProperty("value")&&(typeof a.value=="number"?m.value=p.longs===String?String(a.value):a.value:m.value=p.longs===String?x.Long.prototype.toString.call(a.value):p.longs===Number?new x.LongBits(a.value.low>>>0,a.value.high>>>0).toNumber():a.value),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.MetricData.TypeValue"},y}(),M}(),V.VersionInfo=function(){function M(y){if(y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.licenseSdkVersion="",M.prototype.licenseServiceVersion="",M.create=function(s){return new M(s)},M.encode=function(s,a){return a||(a=j.create()),s.licenseSdkVersion!=null&&Object.hasOwnProperty.call(s,"licenseSdkVersion")&&a.uint32(10).string(s.licenseSdkVersion),s.licenseServiceVersion!=null&&Object.hasOwnProperty.call(s,"licenseServiceVersion")&&a.uint32(18).string(s.licenseServiceVersion),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.VersionInfo;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.licenseSdkVersion=s.string();break}case 2:{m.licenseServiceVersion=s.string();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){return typeof s!="object"||s===null?"object expected":s.licenseSdkVersion!=null&&s.hasOwnProperty("licenseSdkVersion")&&!x.isString(s.licenseSdkVersion)?"licenseSdkVersion: string expected":s.licenseServiceVersion!=null&&s.hasOwnProperty("licenseServiceVersion")&&!x.isString(s.licenseServiceVersion)?"licenseServiceVersion: string expected":null},M.fromObject=function(s){if(s instanceof E.license_protocol.VersionInfo)return s;var a=new E.license_protocol.VersionInfo;return s.licenseSdkVersion!=null&&(a.licenseSdkVersion=String(s.licenseSdkVersion)),s.licenseServiceVersion!=null&&(a.licenseServiceVersion=String(s.licenseServiceVersion)),a},M.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(p.licenseSdkVersion="",p.licenseServiceVersion=""),s.licenseSdkVersion!=null&&s.hasOwnProperty("licenseSdkVersion")&&(p.licenseSdkVersion=s.licenseSdkVersion),s.licenseServiceVersion!=null&&s.hasOwnProperty("licenseServiceVersion")&&(p.licenseServiceVersion=s.licenseServiceVersion),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.VersionInfo"},M}(),V.SignedMessage=function(){function M(y){if(this.metricData=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.type=1,M.prototype.msg=x.newBuffer([]),M.prototype.signature=x.newBuffer([]),M.prototype.sessionKey=x.newBuffer([]),M.prototype.remoteAttestation=x.newBuffer([]),M.prototype.metricData=x.emptyArray,M.prototype.serviceVersionInfo=null,M.prototype.sessionKeyType=1,M.prototype.oemcryptoCoreMessage=x.newBuffer([]),M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.msg!=null&&Object.hasOwnProperty.call(s,"msg")&&a.uint32(18).bytes(s.msg),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&a.uint32(26).bytes(s.signature),s.sessionKey!=null&&Object.hasOwnProperty.call(s,"sessionKey")&&a.uint32(34).bytes(s.sessionKey),s.remoteAttestation!=null&&Object.hasOwnProperty.call(s,"remoteAttestation")&&a.uint32(42).bytes(s.remoteAttestation),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)E.license_protocol.MetricData.encode(s.metricData[p],a.uint32(50).fork()).ldelim();return s.serviceVersionInfo!=null&&Object.hasOwnProperty.call(s,"serviceVersionInfo")&&E.license_protocol.VersionInfo.encode(s.serviceVersionInfo,a.uint32(58).fork()).ldelim(),s.sessionKeyType!=null&&Object.hasOwnProperty.call(s,"sessionKeyType")&&a.uint32(64).int32(s.sessionKeyType),s.oemcryptoCoreMessage!=null&&Object.hasOwnProperty.call(s,"oemcryptoCoreMessage")&&a.uint32(74).bytes(s.oemcryptoCoreMessage),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.SignedMessage;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.type=s.int32();break}case 2:{m.msg=s.bytes();break}case 3:{m.signature=s.bytes();break}case 4:{m.sessionKey=s.bytes();break}case 5:{m.remoteAttestation=s.bytes();break}case 6:{m.metricData&&m.metricData.length||(m.metricData=[]),m.metricData.push(E.license_protocol.MetricData.decode(s,s.uint32()));break}case 7:{m.serviceVersionInfo=E.license_protocol.VersionInfo.decode(s,s.uint32());break}case 8:{m.sessionKeyType=s.int32();break}case 9:{m.oemcryptoCoreMessage=s.bytes();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:break}if(s.msg!=null&&s.hasOwnProperty("msg")&&!(s.msg&&typeof s.msg.length=="number"||x.isString(s.msg)))return"msg: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||x.isString(s.signature)))return"signature: buffer expected";if(s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&!(s.sessionKey&&typeof s.sessionKey.length=="number"||x.isString(s.sessionKey)))return"sessionKey: buffer expected";if(s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&!(s.remoteAttestation&&typeof s.remoteAttestation.length=="number"||x.isString(s.remoteAttestation)))return"remoteAttestation: buffer expected";if(s.metricData!=null&&s.hasOwnProperty("metricData")){if(!Array.isArray(s.metricData))return"metricData: array expected";for(var a=0;a<s.metricData.length;a+=1){var p=E.license_protocol.MetricData.verify(s.metricData[a]);if(p)return"metricData."+p}}if(s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")){var p=E.license_protocol.VersionInfo.verify(s.serviceVersionInfo);if(p)return"serviceVersionInfo."+p}if(s.sessionKeyType!=null&&s.hasOwnProperty("sessionKeyType"))switch(s.sessionKeyType){default:return"sessionKeyType: enum value expected";case 0:case 1:case 2:break}return s.oemcryptoCoreMessage!=null&&s.hasOwnProperty("oemcryptoCoreMessage")&&!(s.oemcryptoCoreMessage&&typeof s.oemcryptoCoreMessage.length=="number"||x.isString(s.oemcryptoCoreMessage))?"oemcryptoCoreMessage: buffer expected":null},M.fromObject=function(s){if(s instanceof E.license_protocol.SignedMessage)return s;var a=new E.license_protocol.SignedMessage;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"LICENSE_REQUEST":case 1:a.type=1;break;case"LICENSE":case 2:a.type=2;break;case"ERROR_RESPONSE":case 3:a.type=3;break;case"SERVICE_CERTIFICATE_REQUEST":case 4:a.type=4;break;case"SERVICE_CERTIFICATE":case 5:a.type=5;break;case"SUB_LICENSE":case 6:a.type=6;break;case"CAS_LICENSE_REQUEST":case 7:a.type=7;break;case"CAS_LICENSE":case 8:a.type=8;break;case"EXTERNAL_LICENSE_REQUEST":case 9:a.type=9;break;case"EXTERNAL_LICENSE":case 10:a.type=10;break}if(s.msg!=null&&(typeof s.msg=="string"?x.base64.decode(s.msg,a.msg=x.newBuffer(x.base64.length(s.msg)),0):s.msg.length>=0&&(a.msg=s.msg)),s.signature!=null&&(typeof s.signature=="string"?x.base64.decode(s.signature,a.signature=x.newBuffer(x.base64.length(s.signature)),0):s.signature.length>=0&&(a.signature=s.signature)),s.sessionKey!=null&&(typeof s.sessionKey=="string"?x.base64.decode(s.sessionKey,a.sessionKey=x.newBuffer(x.base64.length(s.sessionKey)),0):s.sessionKey.length>=0&&(a.sessionKey=s.sessionKey)),s.remoteAttestation!=null&&(typeof s.remoteAttestation=="string"?x.base64.decode(s.remoteAttestation,a.remoteAttestation=x.newBuffer(x.base64.length(s.remoteAttestation)),0):s.remoteAttestation.length>=0&&(a.remoteAttestation=s.remoteAttestation)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.SignedMessage.metricData: array expected");a.metricData=[];for(var p=0;p<s.metricData.length;p+=1){if(typeof s.metricData[p]!="object")throw TypeError(".license_protocol.SignedMessage.metricData: object expected");a.metricData[p]=E.license_protocol.MetricData.fromObject(s.metricData[p])}}if(s.serviceVersionInfo!=null){if(typeof s.serviceVersionInfo!="object")throw TypeError(".license_protocol.SignedMessage.serviceVersionInfo: object expected");a.serviceVersionInfo=E.license_protocol.VersionInfo.fromObject(s.serviceVersionInfo)}switch(s.sessionKeyType){case"UNDEFINED":case 0:a.sessionKeyType=0;break;default:if(typeof s.sessionKeyType=="number"){a.sessionKeyType=s.sessionKeyType;break}break;case"WRAPPED_AES_KEY":case 1:a.sessionKeyType=1;break;case"EPHERMERAL_ECC_PUBLIC_KEY":case 2:a.sessionKeyType=2;break}return s.oemcryptoCoreMessage!=null&&(typeof s.oemcryptoCoreMessage=="string"?x.base64.decode(s.oemcryptoCoreMessage,a.oemcryptoCoreMessage=x.newBuffer(x.base64.length(s.oemcryptoCoreMessage)),0):s.oemcryptoCoreMessage.length>=0&&(a.oemcryptoCoreMessage=s.oemcryptoCoreMessage)),a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.metricData=[]),a.defaults&&(p.type=a.enums===String?"LICENSE_REQUEST":1,a.bytes===String?p.msg="":(p.msg=[],a.bytes!==Array&&(p.msg=x.newBuffer(p.msg))),a.bytes===String?p.signature="":(p.signature=[],a.bytes!==Array&&(p.signature=x.newBuffer(p.signature))),a.bytes===String?p.sessionKey="":(p.sessionKey=[],a.bytes!==Array&&(p.sessionKey=x.newBuffer(p.sessionKey))),a.bytes===String?p.remoteAttestation="":(p.remoteAttestation=[],a.bytes!==Array&&(p.remoteAttestation=x.newBuffer(p.remoteAttestation))),p.serviceVersionInfo=null,p.sessionKeyType=a.enums===String?"WRAPPED_AES_KEY":1,a.bytes===String?p.oemcryptoCoreMessage="":(p.oemcryptoCoreMessage=[],a.bytes!==Array&&(p.oemcryptoCoreMessage=x.newBuffer(p.oemcryptoCoreMessage)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.SignedMessage.MessageType[s.type]===void 0?s.type:E.license_protocol.SignedMessage.MessageType[s.type]:s.type),s.msg!=null&&s.hasOwnProperty("msg")&&(p.msg=a.bytes===String?x.base64.encode(s.msg,0,s.msg.length):a.bytes===Array?Array.prototype.slice.call(s.msg):s.msg),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=a.bytes===String?x.base64.encode(s.signature,0,s.signature.length):a.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&(p.sessionKey=a.bytes===String?x.base64.encode(s.sessionKey,0,s.sessionKey.length):a.bytes===Array?Array.prototype.slice.call(s.sessionKey):s.sessionKey),s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&(p.remoteAttestation=a.bytes===String?x.base64.encode(s.remoteAttestation,0,s.remoteAttestation.length):a.bytes===Array?Array.prototype.slice.call(s.remoteAttestation):s.remoteAttestation),s.metricData&&s.metricData.length){p.metricData=[];for(var m=0;m<s.metricData.length;m+=1)p.metricData[m]=E.license_protocol.MetricData.toObject(s.metricData[m],a)}return s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")&&(p.serviceVersionInfo=E.license_protocol.VersionInfo.toObject(s.serviceVersionInfo,a)),s.sessionKeyType!=null&&s.hasOwnProperty("sessionKeyType")&&(p.sessionKeyType=a.enums===String?E.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]===void 0?s.sessionKeyType:E.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]:s.sessionKeyType),s.oemcryptoCoreMessage!=null&&s.hasOwnProperty("oemcryptoCoreMessage")&&(p.oemcryptoCoreMessage=a.bytes===String?x.base64.encode(s.oemcryptoCoreMessage,0,s.oemcryptoCoreMessage.length):a.bytes===Array?Array.prototype.slice.call(s.oemcryptoCoreMessage):s.oemcryptoCoreMessage),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedMessage"},M.MessageType=function(){var y={},s=Object.create(y);return s[y[1]="LICENSE_REQUEST"]=1,s[y[2]="LICENSE"]=2,s[y[3]="ERROR_RESPONSE"]=3,s[y[4]="SERVICE_CERTIFICATE_REQUEST"]=4,s[y[5]="SERVICE_CERTIFICATE"]=5,s[y[6]="SUB_LICENSE"]=6,s[y[7]="CAS_LICENSE_REQUEST"]=7,s[y[8]="CAS_LICENSE"]=8,s[y[9]="EXTERNAL_LICENSE_REQUEST"]=9,s[y[10]="EXTERNAL_LICENSE"]=10,s}(),M.SessionKeyType=function(){var y={},s=Object.create(y);return s[y[0]="UNDEFINED"]=0,s[y[1]="WRAPPED_AES_KEY"]=1,s[y[2]="EPHERMERAL_ECC_PUBLIC_KEY"]=2,s}(),M}(),V.HashAlgorithmProto=function(){var M={},y=Object.create(M);return y[M[0]="HASH_ALGORITHM_UNSPECIFIED"]=0,y[M[1]="HASH_ALGORITHM_SHA_1"]=1,y[M[2]="HASH_ALGORITHM_SHA_256"]=2,y[M[3]="HASH_ALGORITHM_SHA_384"]=3,y}(),V.ClientIdentification=function(){function M(y){if(this.clientInfo=[],this.deviceCredentials=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.type=0,M.prototype.token=x.newBuffer([]),M.prototype.clientInfo=x.emptyArray,M.prototype.providerClientToken=x.newBuffer([]),M.prototype.licenseCounter=0,M.prototype.clientCapabilities=null,M.prototype.vmpData=x.newBuffer([]),M.prototype.deviceCredentials=x.emptyArray,M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.token!=null&&Object.hasOwnProperty.call(s,"token")&&a.uint32(18).bytes(s.token),s.clientInfo!=null&&s.clientInfo.length)for(var p=0;p<s.clientInfo.length;p+=1)E.license_protocol.ClientIdentification.NameValue.encode(s.clientInfo[p],a.uint32(26).fork()).ldelim();if(s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&a.uint32(34).bytes(s.providerClientToken),s.licenseCounter!=null&&Object.hasOwnProperty.call(s,"licenseCounter")&&a.uint32(40).uint32(s.licenseCounter),s.clientCapabilities!=null&&Object.hasOwnProperty.call(s,"clientCapabilities")&&E.license_protocol.ClientIdentification.ClientCapabilities.encode(s.clientCapabilities,a.uint32(50).fork()).ldelim(),s.vmpData!=null&&Object.hasOwnProperty.call(s,"vmpData")&&a.uint32(58).bytes(s.vmpData),s.deviceCredentials!=null&&s.deviceCredentials.length)for(var p=0;p<s.deviceCredentials.length;p+=1)E.license_protocol.ClientIdentification.ClientCredentials.encode(s.deviceCredentials[p],a.uint32(66).fork()).ldelim();return a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.ClientIdentification;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.type=s.int32();break}case 2:{m.token=s.bytes();break}case 3:{m.clientInfo&&m.clientInfo.length||(m.clientInfo=[]),m.clientInfo.push(E.license_protocol.ClientIdentification.NameValue.decode(s,s.uint32()));break}case 4:{m.providerClientToken=s.bytes();break}case 5:{m.licenseCounter=s.uint32();break}case 6:{m.clientCapabilities=E.license_protocol.ClientIdentification.ClientCapabilities.decode(s,s.uint32());break}case 7:{m.vmpData=s.bytes();break}case 8:{m.deviceCredentials&&m.deviceCredentials.length||(m.deviceCredentials=[]),m.deviceCredentials.push(E.license_protocol.ClientIdentification.ClientCredentials.decode(s,s.uint32()));break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}if(s.token!=null&&s.hasOwnProperty("token")&&!(s.token&&typeof s.token.length=="number"||x.isString(s.token)))return"token: buffer expected";if(s.clientInfo!=null&&s.hasOwnProperty("clientInfo")){if(!Array.isArray(s.clientInfo))return"clientInfo: array expected";for(var a=0;a<s.clientInfo.length;a+=1){var p=E.license_protocol.ClientIdentification.NameValue.verify(s.clientInfo[a]);if(p)return"clientInfo."+p}}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&!(s.providerClientToken&&typeof s.providerClientToken.length=="number"||x.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.licenseCounter!=null&&s.hasOwnProperty("licenseCounter")&&!x.isInteger(s.licenseCounter))return"licenseCounter: integer expected";if(s.clientCapabilities!=null&&s.hasOwnProperty("clientCapabilities")){var p=E.license_protocol.ClientIdentification.ClientCapabilities.verify(s.clientCapabilities);if(p)return"clientCapabilities."+p}if(s.vmpData!=null&&s.hasOwnProperty("vmpData")&&!(s.vmpData&&typeof s.vmpData.length=="number"||x.isString(s.vmpData)))return"vmpData: buffer expected";if(s.deviceCredentials!=null&&s.hasOwnProperty("deviceCredentials")){if(!Array.isArray(s.deviceCredentials))return"deviceCredentials: array expected";for(var a=0;a<s.deviceCredentials.length;a+=1){var p=E.license_protocol.ClientIdentification.ClientCredentials.verify(s.deviceCredentials[a]);if(p)return"deviceCredentials."+p}}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.ClientIdentification)return s;var a=new E.license_protocol.ClientIdentification;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"KEYBOX":case 0:a.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:a.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:a.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:a.type=3;break}if(s.token!=null&&(typeof s.token=="string"?x.base64.decode(s.token,a.token=x.newBuffer(x.base64.length(s.token)),0):s.token.length>=0&&(a.token=s.token)),s.clientInfo){if(!Array.isArray(s.clientInfo))throw TypeError(".license_protocol.ClientIdentification.clientInfo: array expected");a.clientInfo=[];for(var p=0;p<s.clientInfo.length;p+=1){if(typeof s.clientInfo[p]!="object")throw TypeError(".license_protocol.ClientIdentification.clientInfo: object expected");a.clientInfo[p]=E.license_protocol.ClientIdentification.NameValue.fromObject(s.clientInfo[p])}}if(s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?x.base64.decode(s.providerClientToken,a.providerClientToken=x.newBuffer(x.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(a.providerClientToken=s.providerClientToken)),s.licenseCounter!=null&&(a.licenseCounter=s.licenseCounter>>>0),s.clientCapabilities!=null){if(typeof s.clientCapabilities!="object")throw TypeError(".license_protocol.ClientIdentification.clientCapabilities: object expected");a.clientCapabilities=E.license_protocol.ClientIdentification.ClientCapabilities.fromObject(s.clientCapabilities)}if(s.vmpData!=null&&(typeof s.vmpData=="string"?x.base64.decode(s.vmpData,a.vmpData=x.newBuffer(x.base64.length(s.vmpData)),0):s.vmpData.length>=0&&(a.vmpData=s.vmpData)),s.deviceCredentials){if(!Array.isArray(s.deviceCredentials))throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: array expected");a.deviceCredentials=[];for(var p=0;p<s.deviceCredentials.length;p+=1){if(typeof s.deviceCredentials[p]!="object")throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: object expected");a.deviceCredentials[p]=E.license_protocol.ClientIdentification.ClientCredentials.fromObject(s.deviceCredentials[p])}}return a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.clientInfo=[],p.deviceCredentials=[]),a.defaults&&(p.type=a.enums===String?"KEYBOX":0,a.bytes===String?p.token="":(p.token=[],a.bytes!==Array&&(p.token=x.newBuffer(p.token))),a.bytes===String?p.providerClientToken="":(p.providerClientToken=[],a.bytes!==Array&&(p.providerClientToken=x.newBuffer(p.providerClientToken))),p.licenseCounter=0,p.clientCapabilities=null,a.bytes===String?p.vmpData="":(p.vmpData=[],a.bytes!==Array&&(p.vmpData=x.newBuffer(p.vmpData)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.ClientIdentification.TokenType[s.type]===void 0?s.type:E.license_protocol.ClientIdentification.TokenType[s.type]:s.type),s.token!=null&&s.hasOwnProperty("token")&&(p.token=a.bytes===String?x.base64.encode(s.token,0,s.token.length):a.bytes===Array?Array.prototype.slice.call(s.token):s.token),s.clientInfo&&s.clientInfo.length){p.clientInfo=[];for(var m=0;m<s.clientInfo.length;m+=1)p.clientInfo[m]=E.license_protocol.ClientIdentification.NameValue.toObject(s.clientInfo[m],a)}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&(p.providerClientToken=a.bytes===String?x.base64.encode(s.providerClientToken,0,s.providerClientToken.length):a.bytes===Array?Array.prototype.slice.call(s.providerClientToken):s.providerClientToken),s.licenseCounter!=null&&s.hasOwnProperty("licenseCounter")&&(p.licenseCounter=s.licenseCounter),s.clientCapabilities!=null&&s.hasOwnProperty("clientCapabilities")&&(p.clientCapabilities=E.license_protocol.ClientIdentification.ClientCapabilities.toObject(s.clientCapabilities,a)),s.vmpData!=null&&s.hasOwnProperty("vmpData")&&(p.vmpData=a.bytes===String?x.base64.encode(s.vmpData,0,s.vmpData.length):a.bytes===Array?Array.prototype.slice.call(s.vmpData):s.vmpData),s.deviceCredentials&&s.deviceCredentials.length){p.deviceCredentials=[];for(var m=0;m<s.deviceCredentials.length;m+=1)p.deviceCredentials[m]=E.license_protocol.ClientIdentification.ClientCredentials.toObject(s.deviceCredentials[m],a)}return p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.ClientIdentification"},M.TokenType=function(){var y={},s=Object.create(y);return s[y[0]="KEYBOX"]=0,s[y[1]="DRM_DEVICE_CERTIFICATE"]=1,s[y[2]="REMOTE_ATTESTATION_CERTIFICATE"]=2,s[y[3]="OEM_DEVICE_CERTIFICATE"]=3,s}(),M.NameValue=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.name="",y.prototype.value="",y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.name!=null&&Object.hasOwnProperty.call(a,"name")&&p.uint32(10).string(a.name),a.value!=null&&Object.hasOwnProperty.call(a,"value")&&p.uint32(18).string(a.value),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.ClientIdentification.NameValue;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.name=a.string();break}case 2:{D.value=a.string();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){return typeof a!="object"||a===null?"object expected":a.name!=null&&a.hasOwnProperty("name")&&!x.isString(a.name)?"name: string expected":a.value!=null&&a.hasOwnProperty("value")&&!x.isString(a.value)?"value: string expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.ClientIdentification.NameValue)return a;var p=new E.license_protocol.ClientIdentification.NameValue;return a.name!=null&&(p.name=String(a.name)),a.value!=null&&(p.value=String(a.value)),p},y.toObject=function(a,p){p||(p={});var m={};return p.defaults&&(m.name="",m.value=""),a.name!=null&&a.hasOwnProperty("name")&&(m.name=a.name),a.value!=null&&a.hasOwnProperty("value")&&(m.value=a.value),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.NameValue"},y}(),M.ClientCapabilities=function(){function y(s){if(this.supportedCertificateKeyType=[],s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.clientToken=!1,y.prototype.sessionToken=!1,y.prototype.videoResolutionConstraints=!1,y.prototype.maxHdcpVersion=0,y.prototype.oemCryptoApiVersion=0,y.prototype.antiRollbackUsageTable=!1,y.prototype.srmVersion=0,y.prototype.canUpdateSrm=!1,y.prototype.supportedCertificateKeyType=x.emptyArray,y.prototype.analogOutputCapabilities=0,y.prototype.canDisableAnalogOutput=!1,y.prototype.resourceRatingTier=0,y.create=function(a){return new y(a)},y.encode=function(a,p){if(p||(p=j.create()),a.clientToken!=null&&Object.hasOwnProperty.call(a,"clientToken")&&p.uint32(8).bool(a.clientToken),a.sessionToken!=null&&Object.hasOwnProperty.call(a,"sessionToken")&&p.uint32(16).bool(a.sessionToken),a.videoResolutionConstraints!=null&&Object.hasOwnProperty.call(a,"videoResolutionConstraints")&&p.uint32(24).bool(a.videoResolutionConstraints),a.maxHdcpVersion!=null&&Object.hasOwnProperty.call(a,"maxHdcpVersion")&&p.uint32(32).int32(a.maxHdcpVersion),a.oemCryptoApiVersion!=null&&Object.hasOwnProperty.call(a,"oemCryptoApiVersion")&&p.uint32(40).uint32(a.oemCryptoApiVersion),a.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(a,"antiRollbackUsageTable")&&p.uint32(48).bool(a.antiRollbackUsageTable),a.srmVersion!=null&&Object.hasOwnProperty.call(a,"srmVersion")&&p.uint32(56).uint32(a.srmVersion),a.canUpdateSrm!=null&&Object.hasOwnProperty.call(a,"canUpdateSrm")&&p.uint32(64).bool(a.canUpdateSrm),a.supportedCertificateKeyType!=null&&a.supportedCertificateKeyType.length)for(var m=0;m<a.supportedCertificateKeyType.length;m+=1)p.uint32(72).int32(a.supportedCertificateKeyType[m]);return a.analogOutputCapabilities!=null&&Object.hasOwnProperty.call(a,"analogOutputCapabilities")&&p.uint32(80).int32(a.analogOutputCapabilities),a.canDisableAnalogOutput!=null&&Object.hasOwnProperty.call(a,"canDisableAnalogOutput")&&p.uint32(88).bool(a.canDisableAnalogOutput),a.resourceRatingTier!=null&&Object.hasOwnProperty.call(a,"resourceRatingTier")&&p.uint32(96).uint32(a.resourceRatingTier),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.ClientIdentification.ClientCapabilities;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.clientToken=a.bool();break}case 2:{D.sessionToken=a.bool();break}case 3:{D.videoResolutionConstraints=a.bool();break}case 4:{D.maxHdcpVersion=a.int32();break}case 5:{D.oemCryptoApiVersion=a.uint32();break}case 6:{D.antiRollbackUsageTable=a.bool();break}case 7:{D.srmVersion=a.uint32();break}case 8:{D.canUpdateSrm=a.bool();break}case 9:{if(D.supportedCertificateKeyType&&D.supportedCertificateKeyType.length||(D.supportedCertificateKeyType=[]),(X&7)===2)for(var A=a.uint32()+a.pos;a.pos<A;)D.supportedCertificateKeyType.push(a.int32());else D.supportedCertificateKeyType.push(a.int32());break}case 10:{D.analogOutputCapabilities=a.int32();break}case 11:{D.canDisableAnalogOutput=a.bool();break}case 12:{D.resourceRatingTier=a.uint32();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.clientToken!=null&&a.hasOwnProperty("clientToken")&&typeof a.clientToken!="boolean")return"clientToken: boolean expected";if(a.sessionToken!=null&&a.hasOwnProperty("sessionToken")&&typeof a.sessionToken!="boolean")return"sessionToken: boolean expected";if(a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")&&typeof a.videoResolutionConstraints!="boolean")return"videoResolutionConstraints: boolean expected";if(a.maxHdcpVersion!=null&&a.hasOwnProperty("maxHdcpVersion"))switch(a.maxHdcpVersion){default:return"maxHdcpVersion: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(a.oemCryptoApiVersion!=null&&a.hasOwnProperty("oemCryptoApiVersion")&&!x.isInteger(a.oemCryptoApiVersion))return"oemCryptoApiVersion: integer expected";if(a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&typeof a.antiRollbackUsageTable!="boolean")return"antiRollbackUsageTable: boolean expected";if(a.srmVersion!=null&&a.hasOwnProperty("srmVersion")&&!x.isInteger(a.srmVersion))return"srmVersion: integer expected";if(a.canUpdateSrm!=null&&a.hasOwnProperty("canUpdateSrm")&&typeof a.canUpdateSrm!="boolean")return"canUpdateSrm: boolean expected";if(a.supportedCertificateKeyType!=null&&a.hasOwnProperty("supportedCertificateKeyType")){if(!Array.isArray(a.supportedCertificateKeyType))return"supportedCertificateKeyType: array expected";for(var p=0;p<a.supportedCertificateKeyType.length;p+=1)switch(a.supportedCertificateKeyType[p]){default:return"supportedCertificateKeyType: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(a.analogOutputCapabilities!=null&&a.hasOwnProperty("analogOutputCapabilities"))switch(a.analogOutputCapabilities){default:return"analogOutputCapabilities: enum value expected";case 0:case 1:case 2:case 3:break}return a.canDisableAnalogOutput!=null&&a.hasOwnProperty("canDisableAnalogOutput")&&typeof a.canDisableAnalogOutput!="boolean"?"canDisableAnalogOutput: boolean expected":a.resourceRatingTier!=null&&a.hasOwnProperty("resourceRatingTier")&&!x.isInteger(a.resourceRatingTier)?"resourceRatingTier: integer expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.ClientIdentification.ClientCapabilities)return a;var p=new E.license_protocol.ClientIdentification.ClientCapabilities;switch(a.clientToken!=null&&(p.clientToken=!!a.clientToken),a.sessionToken!=null&&(p.sessionToken=!!a.sessionToken),a.videoResolutionConstraints!=null&&(p.videoResolutionConstraints=!!a.videoResolutionConstraints),a.maxHdcpVersion){default:if(typeof a.maxHdcpVersion=="number"){p.maxHdcpVersion=a.maxHdcpVersion;break}break;case"HDCP_NONE":case 0:p.maxHdcpVersion=0;break;case"HDCP_V1":case 1:p.maxHdcpVersion=1;break;case"HDCP_V2":case 2:p.maxHdcpVersion=2;break;case"HDCP_V2_1":case 3:p.maxHdcpVersion=3;break;case"HDCP_V2_2":case 4:p.maxHdcpVersion=4;break;case"HDCP_V2_3":case 5:p.maxHdcpVersion=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:p.maxHdcpVersion=255;break}if(a.oemCryptoApiVersion!=null&&(p.oemCryptoApiVersion=a.oemCryptoApiVersion>>>0),a.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!a.antiRollbackUsageTable),a.srmVersion!=null&&(p.srmVersion=a.srmVersion>>>0),a.canUpdateSrm!=null&&(p.canUpdateSrm=!!a.canUpdateSrm),a.supportedCertificateKeyType){if(!Array.isArray(a.supportedCertificateKeyType))throw TypeError(".license_protocol.ClientIdentification.ClientCapabilities.supportedCertificateKeyType: array expected");p.supportedCertificateKeyType=[];for(var m=0;m<a.supportedCertificateKeyType.length;m+=1)switch(a.supportedCertificateKeyType[m]){default:if(typeof a.supportedCertificateKeyType[m]=="number"){p.supportedCertificateKeyType[m]=a.supportedCertificateKeyType[m];break}case"RSA_2048":case 0:p.supportedCertificateKeyType[m]=0;break;case"RSA_3072":case 1:p.supportedCertificateKeyType[m]=1;break;case"ECC_SECP256R1":case 2:p.supportedCertificateKeyType[m]=2;break;case"ECC_SECP384R1":case 3:p.supportedCertificateKeyType[m]=3;break;case"ECC_SECP521R1":case 4:p.supportedCertificateKeyType[m]=4;break}}switch(a.analogOutputCapabilities){default:if(typeof a.analogOutputCapabilities=="number"){p.analogOutputCapabilities=a.analogOutputCapabilities;break}break;case"ANALOG_OUTPUT_UNKNOWN":case 0:p.analogOutputCapabilities=0;break;case"ANALOG_OUTPUT_NONE":case 1:p.analogOutputCapabilities=1;break;case"ANALOG_OUTPUT_SUPPORTED":case 2:p.analogOutputCapabilities=2;break;case"ANALOG_OUTPUT_SUPPORTS_CGMS_A":case 3:p.analogOutputCapabilities=3;break}return a.canDisableAnalogOutput!=null&&(p.canDisableAnalogOutput=!!a.canDisableAnalogOutput),a.resourceRatingTier!=null&&(p.resourceRatingTier=a.resourceRatingTier>>>0),p},y.toObject=function(a,p){p||(p={});var m={};if((p.arrays||p.defaults)&&(m.supportedCertificateKeyType=[]),p.defaults&&(m.clientToken=!1,m.sessionToken=!1,m.videoResolutionConstraints=!1,m.maxHdcpVersion=p.enums===String?"HDCP_NONE":0,m.oemCryptoApiVersion=0,m.antiRollbackUsageTable=!1,m.srmVersion=0,m.canUpdateSrm=!1,m.analogOutputCapabilities=p.enums===String?"ANALOG_OUTPUT_UNKNOWN":0,m.canDisableAnalogOutput=!1,m.resourceRatingTier=0),a.clientToken!=null&&a.hasOwnProperty("clientToken")&&(m.clientToken=a.clientToken),a.sessionToken!=null&&a.hasOwnProperty("sessionToken")&&(m.sessionToken=a.sessionToken),a.videoResolutionConstraints!=null&&a.hasOwnProperty("videoResolutionConstraints")&&(m.videoResolutionConstraints=a.videoResolutionConstraints),a.maxHdcpVersion!=null&&a.hasOwnProperty("maxHdcpVersion")&&(m.maxHdcpVersion=p.enums===String?E.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[a.maxHdcpVersion]===void 0?a.maxHdcpVersion:E.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[a.maxHdcpVersion]:a.maxHdcpVersion),a.oemCryptoApiVersion!=null&&a.hasOwnProperty("oemCryptoApiVersion")&&(m.oemCryptoApiVersion=a.oemCryptoApiVersion),a.antiRollbackUsageTable!=null&&a.hasOwnProperty("antiRollbackUsageTable")&&(m.antiRollbackUsageTable=a.antiRollbackUsageTable),a.srmVersion!=null&&a.hasOwnProperty("srmVersion")&&(m.srmVersion=a.srmVersion),a.canUpdateSrm!=null&&a.hasOwnProperty("canUpdateSrm")&&(m.canUpdateSrm=a.canUpdateSrm),a.supportedCertificateKeyType&&a.supportedCertificateKeyType.length){m.supportedCertificateKeyType=[];for(var D=0;D<a.supportedCertificateKeyType.length;D+=1)m.supportedCertificateKeyType[D]=p.enums===String?E.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[a.supportedCertificateKeyType[D]]===void 0?a.supportedCertificateKeyType[D]:E.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[a.supportedCertificateKeyType[D]]:a.supportedCertificateKeyType[D]}return a.analogOutputCapabilities!=null&&a.hasOwnProperty("analogOutputCapabilities")&&(m.analogOutputCapabilities=p.enums===String?E.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[a.analogOutputCapabilities]===void 0?a.analogOutputCapabilities:E.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[a.analogOutputCapabilities]:a.analogOutputCapabilities),a.canDisableAnalogOutput!=null&&a.hasOwnProperty("canDisableAnalogOutput")&&(m.canDisableAnalogOutput=a.canDisableAnalogOutput),a.resourceRatingTier!=null&&a.hasOwnProperty("resourceRatingTier")&&(m.resourceRatingTier=a.resourceRatingTier),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.ClientCapabilities"},y.HdcpVersion=function(){var s={},a=Object.create(s);return a[s[0]="HDCP_NONE"]=0,a[s[1]="HDCP_V1"]=1,a[s[2]="HDCP_V2"]=2,a[s[3]="HDCP_V2_1"]=3,a[s[4]="HDCP_V2_2"]=4,a[s[5]="HDCP_V2_3"]=5,a[s[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,a}(),y.CertificateKeyType=function(){var s={},a=Object.create(s);return a[s[0]="RSA_2048"]=0,a[s[1]="RSA_3072"]=1,a[s[2]="ECC_SECP256R1"]=2,a[s[3]="ECC_SECP384R1"]=3,a[s[4]="ECC_SECP521R1"]=4,a}(),y.AnalogOutputCapabilities=function(){var s={},a=Object.create(s);return a[s[0]="ANALOG_OUTPUT_UNKNOWN"]=0,a[s[1]="ANALOG_OUTPUT_NONE"]=1,a[s[2]="ANALOG_OUTPUT_SUPPORTED"]=2,a[s[3]="ANALOG_OUTPUT_SUPPORTS_CGMS_A"]=3,a}(),y}(),M.ClientCredentials=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.type=0,y.prototype.token=x.newBuffer([]),y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.type!=null&&Object.hasOwnProperty.call(a,"type")&&p.uint32(8).int32(a.type),a.token!=null&&Object.hasOwnProperty.call(a,"token")&&p.uint32(18).bytes(a.token),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.ClientIdentification.ClientCredentials;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.type=a.int32();break}case 2:{D.token=a.bytes();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.type!=null&&a.hasOwnProperty("type"))switch(a.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return a.token!=null&&a.hasOwnProperty("token")&&!(a.token&&typeof a.token.length=="number"||x.isString(a.token))?"token: buffer expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.ClientIdentification.ClientCredentials)return a;var p=new E.license_protocol.ClientIdentification.ClientCredentials;switch(a.type){default:if(typeof a.type=="number"){p.type=a.type;break}break;case"KEYBOX":case 0:p.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:p.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:p.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:p.type=3;break}return a.token!=null&&(typeof a.token=="string"?x.base64.decode(a.token,p.token=x.newBuffer(x.base64.length(a.token)),0):a.token.length>=0&&(p.token=a.token)),p},y.toObject=function(a,p){p||(p={});var m={};return p.defaults&&(m.type=p.enums===String?"KEYBOX":0,p.bytes===String?m.token="":(m.token=[],p.bytes!==Array&&(m.token=x.newBuffer(m.token)))),a.type!=null&&a.hasOwnProperty("type")&&(m.type=p.enums===String?E.license_protocol.ClientIdentification.TokenType[a.type]===void 0?a.type:E.license_protocol.ClientIdentification.TokenType[a.type]:a.type),a.token!=null&&a.hasOwnProperty("token")&&(m.token=p.bytes===String?x.base64.encode(a.token,0,a.token.length):p.bytes===Array?Array.prototype.slice.call(a.token):a.token),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.ClientIdentification.ClientCredentials"},y}(),M}(),V.EncryptedClientIdentification=function(){function M(y){if(y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.providerId="",M.prototype.serviceCertificateSerialNumber=x.newBuffer([]),M.prototype.encryptedClientId=x.newBuffer([]),M.prototype.encryptedClientIdIv=x.newBuffer([]),M.prototype.encryptedPrivacyKey=x.newBuffer([]),M.create=function(s){return new M(s)},M.encode=function(s,a){return a||(a=j.create()),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&a.uint32(10).string(s.providerId),s.serviceCertificateSerialNumber!=null&&Object.hasOwnProperty.call(s,"serviceCertificateSerialNumber")&&a.uint32(18).bytes(s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&a.uint32(26).bytes(s.encryptedClientId),s.encryptedClientIdIv!=null&&Object.hasOwnProperty.call(s,"encryptedClientIdIv")&&a.uint32(34).bytes(s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&Object.hasOwnProperty.call(s,"encryptedPrivacyKey")&&a.uint32(42).bytes(s.encryptedPrivacyKey),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.EncryptedClientIdentification;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.providerId=s.string();break}case 2:{m.serviceCertificateSerialNumber=s.bytes();break}case 3:{m.encryptedClientId=s.bytes();break}case 4:{m.encryptedClientIdIv=s.bytes();break}case 5:{m.encryptedPrivacyKey=s.bytes();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){return typeof s!="object"||s===null?"object expected":s.providerId!=null&&s.hasOwnProperty("providerId")&&!x.isString(s.providerId)?"providerId: string expected":s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&!(s.serviceCertificateSerialNumber&&typeof s.serviceCertificateSerialNumber.length=="number"||x.isString(s.serviceCertificateSerialNumber))?"serviceCertificateSerialNumber: buffer expected":s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&!(s.encryptedClientId&&typeof s.encryptedClientId.length=="number"||x.isString(s.encryptedClientId))?"encryptedClientId: buffer expected":s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&!(s.encryptedClientIdIv&&typeof s.encryptedClientIdIv.length=="number"||x.isString(s.encryptedClientIdIv))?"encryptedClientIdIv: buffer expected":s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&!(s.encryptedPrivacyKey&&typeof s.encryptedPrivacyKey.length=="number"||x.isString(s.encryptedPrivacyKey))?"encryptedPrivacyKey: buffer expected":null},M.fromObject=function(s){if(s instanceof E.license_protocol.EncryptedClientIdentification)return s;var a=new E.license_protocol.EncryptedClientIdentification;return s.providerId!=null&&(a.providerId=String(s.providerId)),s.serviceCertificateSerialNumber!=null&&(typeof s.serviceCertificateSerialNumber=="string"?x.base64.decode(s.serviceCertificateSerialNumber,a.serviceCertificateSerialNumber=x.newBuffer(x.base64.length(s.serviceCertificateSerialNumber)),0):s.serviceCertificateSerialNumber.length>=0&&(a.serviceCertificateSerialNumber=s.serviceCertificateSerialNumber)),s.encryptedClientId!=null&&(typeof s.encryptedClientId=="string"?x.base64.decode(s.encryptedClientId,a.encryptedClientId=x.newBuffer(x.base64.length(s.encryptedClientId)),0):s.encryptedClientId.length>=0&&(a.encryptedClientId=s.encryptedClientId)),s.encryptedClientIdIv!=null&&(typeof s.encryptedClientIdIv=="string"?x.base64.decode(s.encryptedClientIdIv,a.encryptedClientIdIv=x.newBuffer(x.base64.length(s.encryptedClientIdIv)),0):s.encryptedClientIdIv.length>=0&&(a.encryptedClientIdIv=s.encryptedClientIdIv)),s.encryptedPrivacyKey!=null&&(typeof s.encryptedPrivacyKey=="string"?x.base64.decode(s.encryptedPrivacyKey,a.encryptedPrivacyKey=x.newBuffer(x.base64.length(s.encryptedPrivacyKey)),0):s.encryptedPrivacyKey.length>=0&&(a.encryptedPrivacyKey=s.encryptedPrivacyKey)),a},M.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(p.providerId="",a.bytes===String?p.serviceCertificateSerialNumber="":(p.serviceCertificateSerialNumber=[],a.bytes!==Array&&(p.serviceCertificateSerialNumber=x.newBuffer(p.serviceCertificateSerialNumber))),a.bytes===String?p.encryptedClientId="":(p.encryptedClientId=[],a.bytes!==Array&&(p.encryptedClientId=x.newBuffer(p.encryptedClientId))),a.bytes===String?p.encryptedClientIdIv="":(p.encryptedClientIdIv=[],a.bytes!==Array&&(p.encryptedClientIdIv=x.newBuffer(p.encryptedClientIdIv))),a.bytes===String?p.encryptedPrivacyKey="":(p.encryptedPrivacyKey=[],a.bytes!==Array&&(p.encryptedPrivacyKey=x.newBuffer(p.encryptedPrivacyKey)))),s.providerId!=null&&s.hasOwnProperty("providerId")&&(p.providerId=s.providerId),s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&(p.serviceCertificateSerialNumber=a.bytes===String?x.base64.encode(s.serviceCertificateSerialNumber,0,s.serviceCertificateSerialNumber.length):a.bytes===Array?Array.prototype.slice.call(s.serviceCertificateSerialNumber):s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&(p.encryptedClientId=a.bytes===String?x.base64.encode(s.encryptedClientId,0,s.encryptedClientId.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedClientId):s.encryptedClientId),s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&(p.encryptedClientIdIv=a.bytes===String?x.base64.encode(s.encryptedClientIdIv,0,s.encryptedClientIdIv.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedClientIdIv):s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&(p.encryptedPrivacyKey=a.bytes===String?x.base64.encode(s.encryptedPrivacyKey,0,s.encryptedPrivacyKey.length):a.bytes===Array?Array.prototype.slice.call(s.encryptedPrivacyKey):s.encryptedPrivacyKey),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.EncryptedClientIdentification"},M}(),V.DrmCertificate=function(){function M(y){if(this.serviceTypes=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.type=0,M.prototype.serialNumber=x.newBuffer([]),M.prototype.creationTimeSeconds=0,M.prototype.expirationTimeSeconds=0,M.prototype.publicKey=x.newBuffer([]),M.prototype.systemId=0,M.prototype.testDeviceDeprecated=!1,M.prototype.providerId="",M.prototype.serviceTypes=x.emptyArray,M.prototype.algorithm=1,M.prototype.rotId=x.newBuffer([]),M.prototype.encryptionKey=null,M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(8).int32(s.type),s.serialNumber!=null&&Object.hasOwnProperty.call(s,"serialNumber")&&a.uint32(18).bytes(s.serialNumber),s.creationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"creationTimeSeconds")&&a.uint32(24).uint32(s.creationTimeSeconds),s.publicKey!=null&&Object.hasOwnProperty.call(s,"publicKey")&&a.uint32(34).bytes(s.publicKey),s.systemId!=null&&Object.hasOwnProperty.call(s,"systemId")&&a.uint32(40).uint32(s.systemId),s.testDeviceDeprecated!=null&&Object.hasOwnProperty.call(s,"testDeviceDeprecated")&&a.uint32(48).bool(s.testDeviceDeprecated),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&a.uint32(58).string(s.providerId),s.serviceTypes!=null&&s.serviceTypes.length)for(var p=0;p<s.serviceTypes.length;p+=1)a.uint32(64).int32(s.serviceTypes[p]);return s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&a.uint32(72).int32(s.algorithm),s.rotId!=null&&Object.hasOwnProperty.call(s,"rotId")&&a.uint32(82).bytes(s.rotId),s.encryptionKey!=null&&Object.hasOwnProperty.call(s,"encryptionKey")&&E.license_protocol.DrmCertificate.EncryptionKey.encode(s.encryptionKey,a.uint32(90).fork()).ldelim(),s.expirationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"expirationTimeSeconds")&&a.uint32(96).uint32(s.expirationTimeSeconds),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.DrmCertificate;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.type=s.int32();break}case 2:{m.serialNumber=s.bytes();break}case 3:{m.creationTimeSeconds=s.uint32();break}case 12:{m.expirationTimeSeconds=s.uint32();break}case 4:{m.publicKey=s.bytes();break}case 5:{m.systemId=s.uint32();break}case 6:{m.testDeviceDeprecated=s.bool();break}case 7:{m.providerId=s.string();break}case 8:{if(m.serviceTypes&&m.serviceTypes.length||(m.serviceTypes=[]),(D&7)===2)for(var X=s.uint32()+s.pos;s.pos<X;)m.serviceTypes.push(s.int32());else m.serviceTypes.push(s.int32());break}case 9:{m.algorithm=s.int32();break}case 10:{m.rotId=s.bytes();break}case 11:{m.encryptionKey=E.license_protocol.DrmCertificate.EncryptionKey.decode(s,s.uint32());break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(s.serialNumber!=null&&s.hasOwnProperty("serialNumber")&&!(s.serialNumber&&typeof s.serialNumber.length=="number"||x.isString(s.serialNumber)))return"serialNumber: buffer expected";if(s.creationTimeSeconds!=null&&s.hasOwnProperty("creationTimeSeconds")&&!x.isInteger(s.creationTimeSeconds))return"creationTimeSeconds: integer expected";if(s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&!x.isInteger(s.expirationTimeSeconds))return"expirationTimeSeconds: integer expected";if(s.publicKey!=null&&s.hasOwnProperty("publicKey")&&!(s.publicKey&&typeof s.publicKey.length=="number"||x.isString(s.publicKey)))return"publicKey: buffer expected";if(s.systemId!=null&&s.hasOwnProperty("systemId")&&!x.isInteger(s.systemId))return"systemId: integer expected";if(s.testDeviceDeprecated!=null&&s.hasOwnProperty("testDeviceDeprecated")&&typeof s.testDeviceDeprecated!="boolean")return"testDeviceDeprecated: boolean expected";if(s.providerId!=null&&s.hasOwnProperty("providerId")&&!x.isString(s.providerId))return"providerId: string expected";if(s.serviceTypes!=null&&s.hasOwnProperty("serviceTypes")){if(!Array.isArray(s.serviceTypes))return"serviceTypes: array expected";for(var a=0;a<s.serviceTypes.length;a+=1)switch(s.serviceTypes[a]){default:return"serviceTypes: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(s.algorithm!=null&&s.hasOwnProperty("algorithm"))switch(s.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}if(s.rotId!=null&&s.hasOwnProperty("rotId")&&!(s.rotId&&typeof s.rotId.length=="number"||x.isString(s.rotId)))return"rotId: buffer expected";if(s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")){var p=E.license_protocol.DrmCertificate.EncryptionKey.verify(s.encryptionKey);if(p)return"encryptionKey."+p}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.DrmCertificate)return s;var a=new E.license_protocol.DrmCertificate;switch(s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"ROOT":case 0:a.type=0;break;case"DEVICE_MODEL":case 1:a.type=1;break;case"DEVICE":case 2:a.type=2;break;case"SERVICE":case 3:a.type=3;break;case"PROVISIONER":case 4:a.type=4;break}if(s.serialNumber!=null&&(typeof s.serialNumber=="string"?x.base64.decode(s.serialNumber,a.serialNumber=x.newBuffer(x.base64.length(s.serialNumber)),0):s.serialNumber.length>=0&&(a.serialNumber=s.serialNumber)),s.creationTimeSeconds!=null&&(a.creationTimeSeconds=s.creationTimeSeconds>>>0),s.expirationTimeSeconds!=null&&(a.expirationTimeSeconds=s.expirationTimeSeconds>>>0),s.publicKey!=null&&(typeof s.publicKey=="string"?x.base64.decode(s.publicKey,a.publicKey=x.newBuffer(x.base64.length(s.publicKey)),0):s.publicKey.length>=0&&(a.publicKey=s.publicKey)),s.systemId!=null&&(a.systemId=s.systemId>>>0),s.testDeviceDeprecated!=null&&(a.testDeviceDeprecated=!!s.testDeviceDeprecated),s.providerId!=null&&(a.providerId=String(s.providerId)),s.serviceTypes){if(!Array.isArray(s.serviceTypes))throw TypeError(".license_protocol.DrmCertificate.serviceTypes: array expected");a.serviceTypes=[];for(var p=0;p<s.serviceTypes.length;p+=1)switch(s.serviceTypes[p]){default:if(typeof s.serviceTypes[p]=="number"){a.serviceTypes[p]=s.serviceTypes[p];break}case"UNKNOWN_SERVICE_TYPE":case 0:a.serviceTypes[p]=0;break;case"LICENSE_SERVER_SDK":case 1:a.serviceTypes[p]=1;break;case"LICENSE_SERVER_PROXY_SDK":case 2:a.serviceTypes[p]=2;break;case"PROVISIONING_SDK":case 3:a.serviceTypes[p]=3;break;case"CAS_PROXY_SDK":case 4:a.serviceTypes[p]=4;break}}switch(s.algorithm){case"UNKNOWN_ALGORITHM":case 0:a.algorithm=0;break;default:if(typeof s.algorithm=="number"){a.algorithm=s.algorithm;break}break;case"RSA":case 1:a.algorithm=1;break;case"ECC_SECP256R1":case 2:a.algorithm=2;break;case"ECC_SECP384R1":case 3:a.algorithm=3;break;case"ECC_SECP521R1":case 4:a.algorithm=4;break}if(s.rotId!=null&&(typeof s.rotId=="string"?x.base64.decode(s.rotId,a.rotId=x.newBuffer(x.base64.length(s.rotId)),0):s.rotId.length>=0&&(a.rotId=s.rotId)),s.encryptionKey!=null){if(typeof s.encryptionKey!="object")throw TypeError(".license_protocol.DrmCertificate.encryptionKey: object expected");a.encryptionKey=E.license_protocol.DrmCertificate.EncryptionKey.fromObject(s.encryptionKey)}return a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.serviceTypes=[]),a.defaults&&(p.type=a.enums===String?"ROOT":0,a.bytes===String?p.serialNumber="":(p.serialNumber=[],a.bytes!==Array&&(p.serialNumber=x.newBuffer(p.serialNumber))),p.creationTimeSeconds=0,a.bytes===String?p.publicKey="":(p.publicKey=[],a.bytes!==Array&&(p.publicKey=x.newBuffer(p.publicKey))),p.systemId=0,p.testDeviceDeprecated=!1,p.providerId="",p.algorithm=a.enums===String?"RSA":1,a.bytes===String?p.rotId="":(p.rotId=[],a.bytes!==Array&&(p.rotId=x.newBuffer(p.rotId))),p.encryptionKey=null,p.expirationTimeSeconds=0),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.DrmCertificate.Type[s.type]===void 0?s.type:E.license_protocol.DrmCertificate.Type[s.type]:s.type),s.serialNumber!=null&&s.hasOwnProperty("serialNumber")&&(p.serialNumber=a.bytes===String?x.base64.encode(s.serialNumber,0,s.serialNumber.length):a.bytes===Array?Array.prototype.slice.call(s.serialNumber):s.serialNumber),s.creationTimeSeconds!=null&&s.hasOwnProperty("creationTimeSeconds")&&(p.creationTimeSeconds=s.creationTimeSeconds),s.publicKey!=null&&s.hasOwnProperty("publicKey")&&(p.publicKey=a.bytes===String?x.base64.encode(s.publicKey,0,s.publicKey.length):a.bytes===Array?Array.prototype.slice.call(s.publicKey):s.publicKey),s.systemId!=null&&s.hasOwnProperty("systemId")&&(p.systemId=s.systemId),s.testDeviceDeprecated!=null&&s.hasOwnProperty("testDeviceDeprecated")&&(p.testDeviceDeprecated=s.testDeviceDeprecated),s.providerId!=null&&s.hasOwnProperty("providerId")&&(p.providerId=s.providerId),s.serviceTypes&&s.serviceTypes.length){p.serviceTypes=[];for(var m=0;m<s.serviceTypes.length;m+=1)p.serviceTypes[m]=a.enums===String?E.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[m]]===void 0?s.serviceTypes[m]:E.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[m]]:s.serviceTypes[m]}return s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=a.enums===String?E.license_protocol.DrmCertificate.Algorithm[s.algorithm]===void 0?s.algorithm:E.license_protocol.DrmCertificate.Algorithm[s.algorithm]:s.algorithm),s.rotId!=null&&s.hasOwnProperty("rotId")&&(p.rotId=a.bytes===String?x.base64.encode(s.rotId,0,s.rotId.length):a.bytes===Array?Array.prototype.slice.call(s.rotId):s.rotId),s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")&&(p.encryptionKey=E.license_protocol.DrmCertificate.EncryptionKey.toObject(s.encryptionKey,a)),s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&(p.expirationTimeSeconds=s.expirationTimeSeconds),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.DrmCertificate"},M.Type=function(){var y={},s=Object.create(y);return s[y[0]="ROOT"]=0,s[y[1]="DEVICE_MODEL"]=1,s[y[2]="DEVICE"]=2,s[y[3]="SERVICE"]=3,s[y[4]="PROVISIONER"]=4,s}(),M.ServiceType=function(){var y={},s=Object.create(y);return s[y[0]="UNKNOWN_SERVICE_TYPE"]=0,s[y[1]="LICENSE_SERVER_SDK"]=1,s[y[2]="LICENSE_SERVER_PROXY_SDK"]=2,s[y[3]="PROVISIONING_SDK"]=3,s[y[4]="CAS_PROXY_SDK"]=4,s}(),M.Algorithm=function(){var y={},s=Object.create(y);return s[y[0]="UNKNOWN_ALGORITHM"]=0,s[y[1]="RSA"]=1,s[y[2]="ECC_SECP256R1"]=2,s[y[3]="ECC_SECP384R1"]=3,s[y[4]="ECC_SECP521R1"]=4,s}(),M.EncryptionKey=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.publicKey=x.newBuffer([]),y.prototype.algorithm=1,y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.publicKey!=null&&Object.hasOwnProperty.call(a,"publicKey")&&p.uint32(10).bytes(a.publicKey),a.algorithm!=null&&Object.hasOwnProperty.call(a,"algorithm")&&p.uint32(16).int32(a.algorithm),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.DrmCertificate.EncryptionKey;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.publicKey=a.bytes();break}case 2:{D.algorithm=a.int32();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){if(typeof a!="object"||a===null)return"object expected";if(a.publicKey!=null&&a.hasOwnProperty("publicKey")&&!(a.publicKey&&typeof a.publicKey.length=="number"||x.isString(a.publicKey)))return"publicKey: buffer expected";if(a.algorithm!=null&&a.hasOwnProperty("algorithm"))switch(a.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return null},y.fromObject=function(a){if(a instanceof E.license_protocol.DrmCertificate.EncryptionKey)return a;var p=new E.license_protocol.DrmCertificate.EncryptionKey;switch(a.publicKey!=null&&(typeof a.publicKey=="string"?x.base64.decode(a.publicKey,p.publicKey=x.newBuffer(x.base64.length(a.publicKey)),0):a.publicKey.length>=0&&(p.publicKey=a.publicKey)),a.algorithm){case"UNKNOWN_ALGORITHM":case 0:p.algorithm=0;break;default:if(typeof a.algorithm=="number"){p.algorithm=a.algorithm;break}break;case"RSA":case 1:p.algorithm=1;break;case"ECC_SECP256R1":case 2:p.algorithm=2;break;case"ECC_SECP384R1":case 3:p.algorithm=3;break;case"ECC_SECP521R1":case 4:p.algorithm=4;break}return p},y.toObject=function(a,p){p||(p={});var m={};return p.defaults&&(p.bytes===String?m.publicKey="":(m.publicKey=[],p.bytes!==Array&&(m.publicKey=x.newBuffer(m.publicKey))),m.algorithm=p.enums===String?"RSA":1),a.publicKey!=null&&a.hasOwnProperty("publicKey")&&(m.publicKey=p.bytes===String?x.base64.encode(a.publicKey,0,a.publicKey.length):p.bytes===Array?Array.prototype.slice.call(a.publicKey):a.publicKey),a.algorithm!=null&&a.hasOwnProperty("algorithm")&&(m.algorithm=p.enums===String?E.license_protocol.DrmCertificate.Algorithm[a.algorithm]===void 0?a.algorithm:E.license_protocol.DrmCertificate.Algorithm[a.algorithm]:a.algorithm),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.DrmCertificate.EncryptionKey"},y}(),M}(),V.SignedDrmCertificate=function(){function M(y){if(y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.drmCertificate=x.newBuffer([]),M.prototype.signature=x.newBuffer([]),M.prototype.signer=null,M.prototype.hashAlgorithm=0,M.create=function(s){return new M(s)},M.encode=function(s,a){return a||(a=j.create()),s.drmCertificate!=null&&Object.hasOwnProperty.call(s,"drmCertificate")&&a.uint32(10).bytes(s.drmCertificate),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&a.uint32(18).bytes(s.signature),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&E.license_protocol.SignedDrmCertificate.encode(s.signer,a.uint32(26).fork()).ldelim(),s.hashAlgorithm!=null&&Object.hasOwnProperty.call(s,"hashAlgorithm")&&a.uint32(32).int32(s.hashAlgorithm),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.SignedDrmCertificate;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.drmCertificate=s.bytes();break}case 2:{m.signature=s.bytes();break}case 3:{m.signer=E.license_protocol.SignedDrmCertificate.decode(s,s.uint32());break}case 4:{m.hashAlgorithm=s.int32();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.drmCertificate!=null&&s.hasOwnProperty("drmCertificate")&&!(s.drmCertificate&&typeof s.drmCertificate.length=="number"||x.isString(s.drmCertificate)))return"drmCertificate: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||x.isString(s.signature)))return"signature: buffer expected";if(s.signer!=null&&s.hasOwnProperty("signer")){var a=E.license_protocol.SignedDrmCertificate.verify(s.signer);if(a)return"signer."+a}if(s.hashAlgorithm!=null&&s.hasOwnProperty("hashAlgorithm"))switch(s.hashAlgorithm){default:return"hashAlgorithm: enum value expected";case 0:case 1:case 2:case 3:break}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.SignedDrmCertificate)return s;var a=new E.license_protocol.SignedDrmCertificate;if(s.drmCertificate!=null&&(typeof s.drmCertificate=="string"?x.base64.decode(s.drmCertificate,a.drmCertificate=x.newBuffer(x.base64.length(s.drmCertificate)),0):s.drmCertificate.length>=0&&(a.drmCertificate=s.drmCertificate)),s.signature!=null&&(typeof s.signature=="string"?x.base64.decode(s.signature,a.signature=x.newBuffer(x.base64.length(s.signature)),0):s.signature.length>=0&&(a.signature=s.signature)),s.signer!=null){if(typeof s.signer!="object")throw TypeError(".license_protocol.SignedDrmCertificate.signer: object expected");a.signer=E.license_protocol.SignedDrmCertificate.fromObject(s.signer)}switch(s.hashAlgorithm){default:if(typeof s.hashAlgorithm=="number"){a.hashAlgorithm=s.hashAlgorithm;break}break;case"HASH_ALGORITHM_UNSPECIFIED":case 0:a.hashAlgorithm=0;break;case"HASH_ALGORITHM_SHA_1":case 1:a.hashAlgorithm=1;break;case"HASH_ALGORITHM_SHA_256":case 2:a.hashAlgorithm=2;break;case"HASH_ALGORITHM_SHA_384":case 3:a.hashAlgorithm=3;break}return a},M.toObject=function(s,a){a||(a={});var p={};return a.defaults&&(a.bytes===String?p.drmCertificate="":(p.drmCertificate=[],a.bytes!==Array&&(p.drmCertificate=x.newBuffer(p.drmCertificate))),a.bytes===String?p.signature="":(p.signature=[],a.bytes!==Array&&(p.signature=x.newBuffer(p.signature))),p.signer=null,p.hashAlgorithm=a.enums===String?"HASH_ALGORITHM_UNSPECIFIED":0),s.drmCertificate!=null&&s.hasOwnProperty("drmCertificate")&&(p.drmCertificate=a.bytes===String?x.base64.encode(s.drmCertificate,0,s.drmCertificate.length):a.bytes===Array?Array.prototype.slice.call(s.drmCertificate):s.drmCertificate),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=a.bytes===String?x.base64.encode(s.signature,0,s.signature.length):a.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=E.license_protocol.SignedDrmCertificate.toObject(s.signer,a)),s.hashAlgorithm!=null&&s.hasOwnProperty("hashAlgorithm")&&(p.hashAlgorithm=a.enums===String?E.license_protocol.HashAlgorithmProto[s.hashAlgorithm]===void 0?s.hashAlgorithm:E.license_protocol.HashAlgorithmProto[s.hashAlgorithm]:s.hashAlgorithm),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedDrmCertificate"},M}(),V.WidevinePsshData=function(){function M(y){if(this.keyIds=[],this.groupIds=[],this.entitledKeys=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.keyIds=x.emptyArray,M.prototype.contentId=x.newBuffer([]),M.prototype.cryptoPeriodIndex=0,M.prototype.protectionScheme=0,M.prototype.cryptoPeriodSeconds=0,M.prototype.type=0,M.prototype.keySequence=0,M.prototype.groupIds=x.emptyArray,M.prototype.entitledKeys=x.emptyArray,M.prototype.videoFeature="",M.prototype.algorithm=0,M.prototype.provider="",M.prototype.trackType="",M.prototype.policy="",M.prototype.groupedLicense=x.newBuffer([]),M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&a.uint32(8).int32(s.algorithm),s.keyIds!=null&&s.keyIds.length)for(var p=0;p<s.keyIds.length;p+=1)a.uint32(18).bytes(s.keyIds[p]);if(s.provider!=null&&Object.hasOwnProperty.call(s,"provider")&&a.uint32(26).string(s.provider),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&a.uint32(34).bytes(s.contentId),s.trackType!=null&&Object.hasOwnProperty.call(s,"trackType")&&a.uint32(42).string(s.trackType),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&a.uint32(50).string(s.policy),s.cryptoPeriodIndex!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodIndex")&&a.uint32(56).uint32(s.cryptoPeriodIndex),s.groupedLicense!=null&&Object.hasOwnProperty.call(s,"groupedLicense")&&a.uint32(66).bytes(s.groupedLicense),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&a.uint32(72).uint32(s.protectionScheme),s.cryptoPeriodSeconds!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodSeconds")&&a.uint32(80).uint32(s.cryptoPeriodSeconds),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&a.uint32(88).int32(s.type),s.keySequence!=null&&Object.hasOwnProperty.call(s,"keySequence")&&a.uint32(96).uint32(s.keySequence),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)a.uint32(106).bytes(s.groupIds[p]);if(s.entitledKeys!=null&&s.entitledKeys.length)for(var p=0;p<s.entitledKeys.length;p+=1)E.license_protocol.WidevinePsshData.EntitledKey.encode(s.entitledKeys[p],a.uint32(114).fork()).ldelim();return s.videoFeature!=null&&Object.hasOwnProperty.call(s,"videoFeature")&&a.uint32(122).string(s.videoFeature),a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.WidevinePsshData;s.pos<p;){var D=s.uint32();switch(D>>>3){case 2:{m.keyIds&&m.keyIds.length||(m.keyIds=[]),m.keyIds.push(s.bytes());break}case 4:{m.contentId=s.bytes();break}case 7:{m.cryptoPeriodIndex=s.uint32();break}case 9:{m.protectionScheme=s.uint32();break}case 10:{m.cryptoPeriodSeconds=s.uint32();break}case 11:{m.type=s.int32();break}case 12:{m.keySequence=s.uint32();break}case 13:{m.groupIds&&m.groupIds.length||(m.groupIds=[]),m.groupIds.push(s.bytes());break}case 14:{m.entitledKeys&&m.entitledKeys.length||(m.entitledKeys=[]),m.entitledKeys.push(E.license_protocol.WidevinePsshData.EntitledKey.decode(s,s.uint32()));break}case 15:{m.videoFeature=s.string();break}case 1:{m.algorithm=s.int32();break}case 3:{m.provider=s.string();break}case 5:{m.trackType=s.string();break}case 6:{m.policy=s.string();break}case 8:{m.groupedLicense=s.bytes();break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.keyIds!=null&&s.hasOwnProperty("keyIds")){if(!Array.isArray(s.keyIds))return"keyIds: array expected";for(var a=0;a<s.keyIds.length;a+=1)if(!(s.keyIds[a]&&typeof s.keyIds[a].length=="number"||x.isString(s.keyIds[a])))return"keyIds: buffer[] expected"}if(s.contentId!=null&&s.hasOwnProperty("contentId")&&!(s.contentId&&typeof s.contentId.length=="number"||x.isString(s.contentId)))return"contentId: buffer expected";if(s.cryptoPeriodIndex!=null&&s.hasOwnProperty("cryptoPeriodIndex")&&!x.isInteger(s.cryptoPeriodIndex))return"cryptoPeriodIndex: integer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!x.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.cryptoPeriodSeconds!=null&&s.hasOwnProperty("cryptoPeriodSeconds")&&!x.isInteger(s.cryptoPeriodSeconds))return"cryptoPeriodSeconds: integer expected";if(s.type!=null&&s.hasOwnProperty("type"))switch(s.type){default:return"type: enum value expected";case 0:case 1:case 2:break}if(s.keySequence!=null&&s.hasOwnProperty("keySequence")&&!x.isInteger(s.keySequence))return"keySequence: integer expected";if(s.groupIds!=null&&s.hasOwnProperty("groupIds")){if(!Array.isArray(s.groupIds))return"groupIds: array expected";for(var a=0;a<s.groupIds.length;a+=1)if(!(s.groupIds[a]&&typeof s.groupIds[a].length=="number"||x.isString(s.groupIds[a])))return"groupIds: buffer[] expected"}if(s.entitledKeys!=null&&s.hasOwnProperty("entitledKeys")){if(!Array.isArray(s.entitledKeys))return"entitledKeys: array expected";for(var a=0;a<s.entitledKeys.length;a+=1){var p=E.license_protocol.WidevinePsshData.EntitledKey.verify(s.entitledKeys[a]);if(p)return"entitledKeys."+p}}if(s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&!x.isString(s.videoFeature))return"videoFeature: string expected";if(s.algorithm!=null&&s.hasOwnProperty("algorithm"))switch(s.algorithm){default:return"algorithm: enum value expected";case 0:case 1:break}return s.provider!=null&&s.hasOwnProperty("provider")&&!x.isString(s.provider)?"provider: string expected":s.trackType!=null&&s.hasOwnProperty("trackType")&&!x.isString(s.trackType)?"trackType: string expected":s.policy!=null&&s.hasOwnProperty("policy")&&!x.isString(s.policy)?"policy: string expected":s.groupedLicense!=null&&s.hasOwnProperty("groupedLicense")&&!(s.groupedLicense&&typeof s.groupedLicense.length=="number"||x.isString(s.groupedLicense))?"groupedLicense: buffer expected":null},M.fromObject=function(s){if(s instanceof E.license_protocol.WidevinePsshData)return s;var a=new E.license_protocol.WidevinePsshData;if(s.keyIds){if(!Array.isArray(s.keyIds))throw TypeError(".license_protocol.WidevinePsshData.keyIds: array expected");a.keyIds=[];for(var p=0;p<s.keyIds.length;p+=1)typeof s.keyIds[p]=="string"?x.base64.decode(s.keyIds[p],a.keyIds[p]=x.newBuffer(x.base64.length(s.keyIds[p])),0):s.keyIds[p].length>=0&&(a.keyIds[p]=s.keyIds[p])}switch(s.contentId!=null&&(typeof s.contentId=="string"?x.base64.decode(s.contentId,a.contentId=x.newBuffer(x.base64.length(s.contentId)),0):s.contentId.length>=0&&(a.contentId=s.contentId)),s.cryptoPeriodIndex!=null&&(a.cryptoPeriodIndex=s.cryptoPeriodIndex>>>0),s.protectionScheme!=null&&(a.protectionScheme=s.protectionScheme>>>0),s.cryptoPeriodSeconds!=null&&(a.cryptoPeriodSeconds=s.cryptoPeriodSeconds>>>0),s.type){default:if(typeof s.type=="number"){a.type=s.type;break}break;case"SINGLE":case 0:a.type=0;break;case"ENTITLEMENT":case 1:a.type=1;break;case"ENTITLED_KEY":case 2:a.type=2;break}if(s.keySequence!=null&&(a.keySequence=s.keySequence>>>0),s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.WidevinePsshData.groupIds: array expected");a.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?x.base64.decode(s.groupIds[p],a.groupIds[p]=x.newBuffer(x.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(a.groupIds[p]=s.groupIds[p])}if(s.entitledKeys){if(!Array.isArray(s.entitledKeys))throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: array expected");a.entitledKeys=[];for(var p=0;p<s.entitledKeys.length;p+=1){if(typeof s.entitledKeys[p]!="object")throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: object expected");a.entitledKeys[p]=E.license_protocol.WidevinePsshData.EntitledKey.fromObject(s.entitledKeys[p])}}switch(s.videoFeature!=null&&(a.videoFeature=String(s.videoFeature)),s.algorithm){default:if(typeof s.algorithm=="number"){a.algorithm=s.algorithm;break}break;case"UNENCRYPTED":case 0:a.algorithm=0;break;case"AESCTR":case 1:a.algorithm=1;break}return s.provider!=null&&(a.provider=String(s.provider)),s.trackType!=null&&(a.trackType=String(s.trackType)),s.policy!=null&&(a.policy=String(s.policy)),s.groupedLicense!=null&&(typeof s.groupedLicense=="string"?x.base64.decode(s.groupedLicense,a.groupedLicense=x.newBuffer(x.base64.length(s.groupedLicense)),0):s.groupedLicense.length>=0&&(a.groupedLicense=s.groupedLicense)),a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.keyIds=[],p.groupIds=[],p.entitledKeys=[]),a.defaults&&(p.algorithm=a.enums===String?"UNENCRYPTED":0,p.provider="",a.bytes===String?p.contentId="":(p.contentId=[],a.bytes!==Array&&(p.contentId=x.newBuffer(p.contentId))),p.trackType="",p.policy="",p.cryptoPeriodIndex=0,a.bytes===String?p.groupedLicense="":(p.groupedLicense=[],a.bytes!==Array&&(p.groupedLicense=x.newBuffer(p.groupedLicense))),p.protectionScheme=0,p.cryptoPeriodSeconds=0,p.type=a.enums===String?"SINGLE":0,p.keySequence=0,p.videoFeature=""),s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=a.enums===String?E.license_protocol.WidevinePsshData.Algorithm[s.algorithm]===void 0?s.algorithm:E.license_protocol.WidevinePsshData.Algorithm[s.algorithm]:s.algorithm),s.keyIds&&s.keyIds.length){p.keyIds=[];for(var m=0;m<s.keyIds.length;m+=1)p.keyIds[m]=a.bytes===String?x.base64.encode(s.keyIds[m],0,s.keyIds[m].length):a.bytes===Array?Array.prototype.slice.call(s.keyIds[m]):s.keyIds[m]}if(s.provider!=null&&s.hasOwnProperty("provider")&&(p.provider=s.provider),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=a.bytes===String?x.base64.encode(s.contentId,0,s.contentId.length):a.bytes===Array?Array.prototype.slice.call(s.contentId):s.contentId),s.trackType!=null&&s.hasOwnProperty("trackType")&&(p.trackType=s.trackType),s.policy!=null&&s.hasOwnProperty("policy")&&(p.policy=s.policy),s.cryptoPeriodIndex!=null&&s.hasOwnProperty("cryptoPeriodIndex")&&(p.cryptoPeriodIndex=s.cryptoPeriodIndex),s.groupedLicense!=null&&s.hasOwnProperty("groupedLicense")&&(p.groupedLicense=a.bytes===String?x.base64.encode(s.groupedLicense,0,s.groupedLicense.length):a.bytes===Array?Array.prototype.slice.call(s.groupedLicense):s.groupedLicense),s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&(p.protectionScheme=s.protectionScheme),s.cryptoPeriodSeconds!=null&&s.hasOwnProperty("cryptoPeriodSeconds")&&(p.cryptoPeriodSeconds=s.cryptoPeriodSeconds),s.type!=null&&s.hasOwnProperty("type")&&(p.type=a.enums===String?E.license_protocol.WidevinePsshData.Type[s.type]===void 0?s.type:E.license_protocol.WidevinePsshData.Type[s.type]:s.type),s.keySequence!=null&&s.hasOwnProperty("keySequence")&&(p.keySequence=s.keySequence),s.groupIds&&s.groupIds.length){p.groupIds=[];for(var m=0;m<s.groupIds.length;m+=1)p.groupIds[m]=a.bytes===String?x.base64.encode(s.groupIds[m],0,s.groupIds[m].length):a.bytes===Array?Array.prototype.slice.call(s.groupIds[m]):s.groupIds[m]}if(s.entitledKeys&&s.entitledKeys.length){p.entitledKeys=[];for(var m=0;m<s.entitledKeys.length;m+=1)p.entitledKeys[m]=E.license_protocol.WidevinePsshData.EntitledKey.toObject(s.entitledKeys[m],a)}return s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&(p.videoFeature=s.videoFeature),p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.WidevinePsshData"},M.Type=function(){var y={},s=Object.create(y);return s[y[0]="SINGLE"]=0,s[y[1]="ENTITLEMENT"]=1,s[y[2]="ENTITLED_KEY"]=2,s}(),M.EntitledKey=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.entitlementKeyId=x.newBuffer([]),y.prototype.keyId=x.newBuffer([]),y.prototype.key=x.newBuffer([]),y.prototype.iv=x.newBuffer([]),y.prototype.entitlementKeySizeBytes=32,y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.entitlementKeyId!=null&&Object.hasOwnProperty.call(a,"entitlementKeyId")&&p.uint32(10).bytes(a.entitlementKeyId),a.keyId!=null&&Object.hasOwnProperty.call(a,"keyId")&&p.uint32(18).bytes(a.keyId),a.key!=null&&Object.hasOwnProperty.call(a,"key")&&p.uint32(26).bytes(a.key),a.iv!=null&&Object.hasOwnProperty.call(a,"iv")&&p.uint32(34).bytes(a.iv),a.entitlementKeySizeBytes!=null&&Object.hasOwnProperty.call(a,"entitlementKeySizeBytes")&&p.uint32(40).uint32(a.entitlementKeySizeBytes),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.WidevinePsshData.EntitledKey;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.entitlementKeyId=a.bytes();break}case 2:{D.keyId=a.bytes();break}case 3:{D.key=a.bytes();break}case 4:{D.iv=a.bytes();break}case 5:{D.entitlementKeySizeBytes=a.uint32();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){return typeof a!="object"||a===null?"object expected":a.entitlementKeyId!=null&&a.hasOwnProperty("entitlementKeyId")&&!(a.entitlementKeyId&&typeof a.entitlementKeyId.length=="number"||x.isString(a.entitlementKeyId))?"entitlementKeyId: buffer expected":a.keyId!=null&&a.hasOwnProperty("keyId")&&!(a.keyId&&typeof a.keyId.length=="number"||x.isString(a.keyId))?"keyId: buffer expected":a.key!=null&&a.hasOwnProperty("key")&&!(a.key&&typeof a.key.length=="number"||x.isString(a.key))?"key: buffer expected":a.iv!=null&&a.hasOwnProperty("iv")&&!(a.iv&&typeof a.iv.length=="number"||x.isString(a.iv))?"iv: buffer expected":a.entitlementKeySizeBytes!=null&&a.hasOwnProperty("entitlementKeySizeBytes")&&!x.isInteger(a.entitlementKeySizeBytes)?"entitlementKeySizeBytes: integer expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.WidevinePsshData.EntitledKey)return a;var p=new E.license_protocol.WidevinePsshData.EntitledKey;return a.entitlementKeyId!=null&&(typeof a.entitlementKeyId=="string"?x.base64.decode(a.entitlementKeyId,p.entitlementKeyId=x.newBuffer(x.base64.length(a.entitlementKeyId)),0):a.entitlementKeyId.length>=0&&(p.entitlementKeyId=a.entitlementKeyId)),a.keyId!=null&&(typeof a.keyId=="string"?x.base64.decode(a.keyId,p.keyId=x.newBuffer(x.base64.length(a.keyId)),0):a.keyId.length>=0&&(p.keyId=a.keyId)),a.key!=null&&(typeof a.key=="string"?x.base64.decode(a.key,p.key=x.newBuffer(x.base64.length(a.key)),0):a.key.length>=0&&(p.key=a.key)),a.iv!=null&&(typeof a.iv=="string"?x.base64.decode(a.iv,p.iv=x.newBuffer(x.base64.length(a.iv)),0):a.iv.length>=0&&(p.iv=a.iv)),a.entitlementKeySizeBytes!=null&&(p.entitlementKeySizeBytes=a.entitlementKeySizeBytes>>>0),p},y.toObject=function(a,p){p||(p={});var m={};return p.defaults&&(p.bytes===String?m.entitlementKeyId="":(m.entitlementKeyId=[],p.bytes!==Array&&(m.entitlementKeyId=x.newBuffer(m.entitlementKeyId))),p.bytes===String?m.keyId="":(m.keyId=[],p.bytes!==Array&&(m.keyId=x.newBuffer(m.keyId))),p.bytes===String?m.key="":(m.key=[],p.bytes!==Array&&(m.key=x.newBuffer(m.key))),p.bytes===String?m.iv="":(m.iv=[],p.bytes!==Array&&(m.iv=x.newBuffer(m.iv))),m.entitlementKeySizeBytes=32),a.entitlementKeyId!=null&&a.hasOwnProperty("entitlementKeyId")&&(m.entitlementKeyId=p.bytes===String?x.base64.encode(a.entitlementKeyId,0,a.entitlementKeyId.length):p.bytes===Array?Array.prototype.slice.call(a.entitlementKeyId):a.entitlementKeyId),a.keyId!=null&&a.hasOwnProperty("keyId")&&(m.keyId=p.bytes===String?x.base64.encode(a.keyId,0,a.keyId.length):p.bytes===Array?Array.prototype.slice.call(a.keyId):a.keyId),a.key!=null&&a.hasOwnProperty("key")&&(m.key=p.bytes===String?x.base64.encode(a.key,0,a.key.length):p.bytes===Array?Array.prototype.slice.call(a.key):a.key),a.iv!=null&&a.hasOwnProperty("iv")&&(m.iv=p.bytes===String?x.base64.encode(a.iv,0,a.iv.length):p.bytes===Array?Array.prototype.slice.call(a.iv):a.iv),a.entitlementKeySizeBytes!=null&&a.hasOwnProperty("entitlementKeySizeBytes")&&(m.entitlementKeySizeBytes=a.entitlementKeySizeBytes),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.WidevinePsshData.EntitledKey"},y}(),M.Algorithm=function(){var y={},s=Object.create(y);return s[y[0]="UNENCRYPTED"]=0,s[y[1]="AESCTR"]=1,s}(),M}(),V.FileHashes=function(){function M(y){if(this.signatures=[],y)for(var s=Object.keys(y),a=0;a<s.length;a+=1)y[s[a]]!=null&&(this[s[a]]=y[s[a]])}return M.prototype.signer=x.newBuffer([]),M.prototype.signatures=x.emptyArray,M.create=function(s){return new M(s)},M.encode=function(s,a){if(a||(a=j.create()),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&a.uint32(10).bytes(s.signer),s.signatures!=null&&s.signatures.length)for(var p=0;p<s.signatures.length;p+=1)E.license_protocol.FileHashes.Signature.encode(s.signatures[p],a.uint32(18).fork()).ldelim();return a},M.encodeDelimited=function(s,a){return this.encode(s,a).ldelim()},M.decode=function(s,a){s instanceof k||(s=k.create(s));for(var p=a===void 0?s.len:s.pos+a,m=new E.license_protocol.FileHashes;s.pos<p;){var D=s.uint32();switch(D>>>3){case 1:{m.signer=s.bytes();break}case 2:{m.signatures&&m.signatures.length||(m.signatures=[]),m.signatures.push(E.license_protocol.FileHashes.Signature.decode(s,s.uint32()));break}default:s.skipType(D&7);break}}return m},M.decodeDelimited=function(s){return s instanceof k||(s=new k(s)),this.decode(s,s.uint32())},M.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.signer!=null&&s.hasOwnProperty("signer")&&!(s.signer&&typeof s.signer.length=="number"||x.isString(s.signer)))return"signer: buffer expected";if(s.signatures!=null&&s.hasOwnProperty("signatures")){if(!Array.isArray(s.signatures))return"signatures: array expected";for(var a=0;a<s.signatures.length;a+=1){var p=E.license_protocol.FileHashes.Signature.verify(s.signatures[a]);if(p)return"signatures."+p}}return null},M.fromObject=function(s){if(s instanceof E.license_protocol.FileHashes)return s;var a=new E.license_protocol.FileHashes;if(s.signer!=null&&(typeof s.signer=="string"?x.base64.decode(s.signer,a.signer=x.newBuffer(x.base64.length(s.signer)),0):s.signer.length>=0&&(a.signer=s.signer)),s.signatures){if(!Array.isArray(s.signatures))throw TypeError(".license_protocol.FileHashes.signatures: array expected");a.signatures=[];for(var p=0;p<s.signatures.length;p+=1){if(typeof s.signatures[p]!="object")throw TypeError(".license_protocol.FileHashes.signatures: object expected");a.signatures[p]=E.license_protocol.FileHashes.Signature.fromObject(s.signatures[p])}}return a},M.toObject=function(s,a){a||(a={});var p={};if((a.arrays||a.defaults)&&(p.signatures=[]),a.defaults&&(a.bytes===String?p.signer="":(p.signer=[],a.bytes!==Array&&(p.signer=x.newBuffer(p.signer))),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=a.bytes===String?x.base64.encode(s.signer,0,s.signer.length):a.bytes===Array?Array.prototype.slice.call(s.signer):s.signer)),s.signatures&&s.signatures.length){p.signatures=[];for(var m=0;m<s.signatures.length;m+=1)p.signatures[m]=E.license_protocol.FileHashes.Signature.toObject(s.signatures[m],a)}return p},M.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},M.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.FileHashes"},M.Signature=function(){function y(s){if(s)for(var a=Object.keys(s),p=0;p<a.length;p+=1)s[a[p]]!=null&&(this[a[p]]=s[a[p]])}return y.prototype.filename="",y.prototype.testSigning=!1,y.prototype.SHA512Hash=x.newBuffer([]),y.prototype.mainExe=!1,y.prototype.signature=x.newBuffer([]),y.create=function(a){return new y(a)},y.encode=function(a,p){return p||(p=j.create()),a.filename!=null&&Object.hasOwnProperty.call(a,"filename")&&p.uint32(10).string(a.filename),a.testSigning!=null&&Object.hasOwnProperty.call(a,"testSigning")&&p.uint32(16).bool(a.testSigning),a.SHA512Hash!=null&&Object.hasOwnProperty.call(a,"SHA512Hash")&&p.uint32(26).bytes(a.SHA512Hash),a.mainExe!=null&&Object.hasOwnProperty.call(a,"mainExe")&&p.uint32(32).bool(a.mainExe),a.signature!=null&&Object.hasOwnProperty.call(a,"signature")&&p.uint32(42).bytes(a.signature),p},y.encodeDelimited=function(a,p){return this.encode(a,p).ldelim()},y.decode=function(a,p){a instanceof k||(a=k.create(a));for(var m=p===void 0?a.len:a.pos+p,D=new E.license_protocol.FileHashes.Signature;a.pos<m;){var X=a.uint32();switch(X>>>3){case 1:{D.filename=a.string();break}case 2:{D.testSigning=a.bool();break}case 3:{D.SHA512Hash=a.bytes();break}case 4:{D.mainExe=a.bool();break}case 5:{D.signature=a.bytes();break}default:a.skipType(X&7);break}}return D},y.decodeDelimited=function(a){return a instanceof k||(a=new k(a)),this.decode(a,a.uint32())},y.verify=function(a){return typeof a!="object"||a===null?"object expected":a.filename!=null&&a.hasOwnProperty("filename")&&!x.isString(a.filename)?"filename: string expected":a.testSigning!=null&&a.hasOwnProperty("testSigning")&&typeof a.testSigning!="boolean"?"testSigning: boolean expected":a.SHA512Hash!=null&&a.hasOwnProperty("SHA512Hash")&&!(a.SHA512Hash&&typeof a.SHA512Hash.length=="number"||x.isString(a.SHA512Hash))?"SHA512Hash: buffer expected":a.mainExe!=null&&a.hasOwnProperty("mainExe")&&typeof a.mainExe!="boolean"?"mainExe: boolean expected":a.signature!=null&&a.hasOwnProperty("signature")&&!(a.signature&&typeof a.signature.length=="number"||x.isString(a.signature))?"signature: buffer expected":null},y.fromObject=function(a){if(a instanceof E.license_protocol.FileHashes.Signature)return a;var p=new E.license_protocol.FileHashes.Signature;return a.filename!=null&&(p.filename=String(a.filename)),a.testSigning!=null&&(p.testSigning=!!a.testSigning),a.SHA512Hash!=null&&(typeof a.SHA512Hash=="string"?x.base64.decode(a.SHA512Hash,p.SHA512Hash=x.newBuffer(x.base64.length(a.SHA512Hash)),0):a.SHA512Hash.length>=0&&(p.SHA512Hash=a.SHA512Hash)),a.mainExe!=null&&(p.mainExe=!!a.mainExe),a.signature!=null&&(typeof a.signature=="string"?x.base64.decode(a.signature,p.signature=x.newBuffer(x.base64.length(a.signature)),0):a.signature.length>=0&&(p.signature=a.signature)),p},y.toObject=function(a,p){p||(p={});var m={};return p.defaults&&(m.filename="",m.testSigning=!1,p.bytes===String?m.SHA512Hash="":(m.SHA512Hash=[],p.bytes!==Array&&(m.SHA512Hash=x.newBuffer(m.SHA512Hash))),m.mainExe=!1,p.bytes===String?m.signature="":(m.signature=[],p.bytes!==Array&&(m.signature=x.newBuffer(m.signature)))),a.filename!=null&&a.hasOwnProperty("filename")&&(m.filename=a.filename),a.testSigning!=null&&a.hasOwnProperty("testSigning")&&(m.testSigning=a.testSigning),a.SHA512Hash!=null&&a.hasOwnProperty("SHA512Hash")&&(m.SHA512Hash=p.bytes===String?x.base64.encode(a.SHA512Hash,0,a.SHA512Hash.length):p.bytes===Array?Array.prototype.slice.call(a.SHA512Hash):a.SHA512Hash),a.mainExe!=null&&a.hasOwnProperty("mainExe")&&(m.mainExe=a.mainExe),a.signature!=null&&a.hasOwnProperty("signature")&&(m.signature=p.bytes===String?x.base64.encode(a.signature,0,a.signature.length):p.bytes===Array?Array.prototype.slice.call(a.signature):a.signature),m},y.prototype.toJSON=function(){return this.constructor.toObject(this,R.util.toJSONOptions)},y.getTypeUrl=function(a){return a===void 0&&(a="type.googleapis.com"),a+"/license_protocol.FileHashes.Signature"},y}(),M}(),V}(),E})(protobuf);const{SignedMessage:Yk,LicenseRequest:Wk}=protobuf.roots.default.license_protocol;function GA(R){const k=Array.from(R).map(j=>String.fromCharCode(j)).join("");return btoa(k)}function Qk(R){R=R.replace(/^await\s+/,"");const k=/fetch\(['"](.+?)['"],\s*(\{.+?\})\)/s;R.split(`
|
||
`).map(M=>M.trim()).filter(Boolean);const j={method:"UNDEFINED",url:"",headers:{},body:null},x=R.match(k);if(!x)throw console.log(R),new Error("Invalid 'Copy as fetch' string.");j.url=x[1];const E=x[2],V=JSON.parse(E);return V.method&&(j.method=V.method),V.headers&&(j.headers=V.headers),V.body&&(j.body=V.body),j}const Jk=new Uint8Array([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237]),Zk=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),$k=new Uint8Array([112,115,115,104]);function WS(R,k){const j=new ArrayBuffer(4);return new DataView(j).setUint32(0,R,k),new Uint8Array(j)}function jS(R,k){const j=new ArrayBuffer(2);return new DataView(j).setUint16(0,R,k),new Uint8Array(j)}function yA(R,k){const j=R.length,x=j+32,E=new Uint8Array([...WS(x,!1),...$k,...new Uint8Array(4),...k,...WS(j,!1),...R]);return GA(E)}function e4(R){const k=new Uint8Array([...jS(1,!0),...jS(R.length,!0),...R]);return new Uint8Array([...WS(k.length+2+4,!0),...jS(1,!0),...k])}function t4(R){const k=new Uint8Array(R.length*2);for(let j=0;j<R.length;j++){const x=R.charCodeAt(j);k[j*2]=x&255,k[j*2+1]=x>>8}return k}function n4(R){return Uint8Array.from(R.split("").map(k=>k.charCodeAt()))}async function i4(){try{const R=await navigator.clipboard.readText(),k=Qk(R);let j,x;if(k.body.startsWith("<")){x=k.body;const E=x.match(/.*(<WRMHEADER.*<\/WRMHEADER>).*/),V=E?E[1]:null,M=t4(V),y=e4(M);j=yA(y,Zk)}else{const E=n4(k.body);let V,M;try{V=Yk.decode(E),M=Wk.decode(V.msg)}catch(y){console.error("Decoding failed, returning empty pssh",y),j=""}if(M&&M.contentId&&M.contentId.widevinePsshData){const y=M.contentId.widevinePsshData.psshData[0];j=yA(y,Jk)}r4(E)?x=GA(E):x=k.body}document.getElementById("licurl").value=k.url,document.getElementById("headers").value=JSON.stringify(k.headers),document.getElementById("pssh").value=j,document.getElementById("data").value=x}catch(R){console.error("Failed to read clipboard contents:",R)}}function r4(R){return R.some(k=>k>127)}var BS={exports:{}},VS,gA;function o4(){if(gA)return VS;gA=1;var R="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return VS=R,VS}var HS,vA;function l4(){if(vA)return HS;vA=1;var R=o4();function k(){}function j(){}return j.resetWarningCache=k,HS=function(){function x(M,y,s,a,p,m){if(m!==R){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}}x.isRequired=x;function E(){return x}var V={array:x,bigint:x,bool:x,func:x,number:x,object:x,string:x,symbol:x,any:x,arrayOf:E,element:x,elementType:x,instanceOf:E,node:x,objectOf:E,oneOf:E,oneOfType:E,shape:E,exact:E,checkPropTypes:j,resetWarningCache:k};return V.PropTypes=V,V},HS}var mA;function u4(){return mA||(mA=1,BS.exports=l4()()),BS.exports}var a4=u4();const Fn=wp(a4);var KS,SA;function s4(){if(SA)return KS;SA=1;function R(y){return y&&typeof y=="object"&&"default"in y?y.default:y}var k=Xm(),j=R(k);function x(y,s,a){return s in y?Object.defineProperty(y,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):y[s]=a,y}function E(y,s){y.prototype=Object.create(s.prototype),y.prototype.constructor=y,y.__proto__=s}var V=!!(typeof window<"u"&&window.document&&window.document.createElement);function M(y,s,a){if(typeof y!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof s!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof a<"u"&&typeof a!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function p(m){return m.displayName||m.name||"Component"}return function(D){if(typeof D!="function")throw new Error("Expected WrappedComponent to be a React component.");var X=[],A;function te(){A=y(X.map(function(he){return he.props})),ae.canUseDOM?s(A):a&&(A=a(A))}var ae=function(he){E(je,he);function je(){return he.apply(this,arguments)||this}je.peek=function(){return A},je.rewind=function(){if(je.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var Re=A;return A=void 0,X=[],Re};var ee=je.prototype;return ee.UNSAFE_componentWillMount=function(){X.push(this),te()},ee.componentDidUpdate=function(){te()},ee.componentWillUnmount=function(){var Re=X.indexOf(this);X.splice(Re,1),te()},ee.render=function(){return j.createElement(D,this.props)},je}(k.PureComponent);return x(ae,"displayName","SideEffect("+p(D)+")"),x(ae,"canUseDOM",V),ae}}return KS=M,KS}var c4=s4();const f4=wp(c4);var qS,TA;function d4(){if(TA)return qS;TA=1;var R=typeof Element<"u",k=typeof Map=="function",j=typeof Set=="function",x=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function E(V,M){if(V===M)return!0;if(V&&M&&typeof V=="object"&&typeof M=="object"){if(V.constructor!==M.constructor)return!1;var y,s,a;if(Array.isArray(V)){if(y=V.length,y!=M.length)return!1;for(s=y;s--!==0;)if(!E(V[s],M[s]))return!1;return!0}var p;if(k&&V instanceof Map&&M instanceof Map){if(V.size!==M.size)return!1;for(p=V.entries();!(s=p.next()).done;)if(!M.has(s.value[0]))return!1;for(p=V.entries();!(s=p.next()).done;)if(!E(s.value[1],M.get(s.value[0])))return!1;return!0}if(j&&V instanceof Set&&M instanceof Set){if(V.size!==M.size)return!1;for(p=V.entries();!(s=p.next()).done;)if(!M.has(s.value[0]))return!1;return!0}if(x&&ArrayBuffer.isView(V)&&ArrayBuffer.isView(M)){if(y=V.length,y!=M.length)return!1;for(s=y;s--!==0;)if(V[s]!==M[s])return!1;return!0}if(V.constructor===RegExp)return V.source===M.source&&V.flags===M.flags;if(V.valueOf!==Object.prototype.valueOf&&typeof V.valueOf=="function"&&typeof M.valueOf=="function")return V.valueOf()===M.valueOf();if(V.toString!==Object.prototype.toString&&typeof V.toString=="function"&&typeof M.toString=="function")return V.toString()===M.toString();if(a=Object.keys(V),y=a.length,y!==Object.keys(M).length)return!1;for(s=y;s--!==0;)if(!Object.prototype.hasOwnProperty.call(M,a[s]))return!1;if(R&&V instanceof Element)return!1;for(s=y;s--!==0;)if(!((a[s]==="_owner"||a[s]==="__v"||a[s]==="__o")&&V.$$typeof)&&!E(V[a[s]],M[a[s]]))return!1;return!0}return V!==V&&M!==M}return qS=function(M,y){try{return E(M,y)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}},qS}var p4=d4();const h4=wp(p4);/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var GS,wA;function y4(){if(wA)return GS;wA=1;var R=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;function x(V){if(V==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(V)}function E(){try{if(!Object.assign)return!1;var V=new String("abc");if(V[5]="de",Object.getOwnPropertyNames(V)[0]==="5")return!1;for(var M={},y=0;y<10;y++)M["_"+String.fromCharCode(y)]=y;var s=Object.getOwnPropertyNames(M).map(function(p){return M[p]});if(s.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(p){a[p]=p}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return GS=E()?Object.assign:function(V,M){for(var y,s=x(V),a,p=1;p<arguments.length;p++){y=Object(arguments[p]);for(var m in y)k.call(y,m)&&(s[m]=y[m]);if(R){a=R(y);for(var D=0;D<a.length;D++)j.call(y,a[D])&&(s[a[D]]=y[a[D]])}}return s},GS}var g4=y4();const v4=wp(g4);var Pf={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},Rt={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(Rt).map(function(R){return Rt[R]});var Xn={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},Fm={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Zy={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},m4=Object.keys(Fm).reduce(function(R,k){return R[Fm[k]]=k,R},{}),S4=[Rt.NOSCRIPT,Rt.SCRIPT,Rt.STYLE],zl="data-react-helmet",T4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},w4=function(R,k){if(!(R instanceof k))throw new TypeError("Cannot call a class as a function")},x4=function(){function R(k,j){for(var x=0;x<j.length;x++){var E=j[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(k,E.key,E)}}return function(k,j,x){return j&&R(k.prototype,j),x&&R(k,x),k}}(),Wr=Object.assign||function(R){for(var k=1;k<arguments.length;k++){var j=arguments[k];for(var x in j)Object.prototype.hasOwnProperty.call(j,x)&&(R[x]=j[x])}return R},E4=function(R,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);R.prototype=Object.create(k&&k.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(R,k):R.__proto__=k)},xA=function(R,k){var j={};for(var x in R)k.indexOf(x)>=0||Object.prototype.hasOwnProperty.call(R,x)&&(j[x]=R[x]);return j},A4=function(R,k){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:R},QS=function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return j===!1?String(k):String(k).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},C4=function(k){var j=Sp(k,Rt.TITLE),x=Sp(k,Zy.TITLE_TEMPLATE);if(x&&j)return x.replace(/%s/g,function(){return Array.isArray(j)?j.join(""):j});var E=Sp(k,Zy.DEFAULT_TITLE);return j||E||void 0},b4=function(k){return Sp(k,Zy.ON_CHANGE_CLIENT_STATE)||function(){}},zS=function(k,j){return j.filter(function(x){return typeof x[k]<"u"}).map(function(x){return x[k]}).reduce(function(x,E){return Wr({},x,E)},{})},I4=function(k,j){return j.filter(function(x){return typeof x[Rt.BASE]<"u"}).map(function(x){return x[Rt.BASE]}).reverse().reduce(function(x,E){if(!x.length)for(var V=Object.keys(E),M=0;M<V.length;M++){var y=V[M],s=y.toLowerCase();if(k.indexOf(s)!==-1&&E[s])return x.concat(E)}return x},[])},zy=function(k,j,x){var E={};return x.filter(function(V){return Array.isArray(V[k])?!0:(typeof V[k]<"u"&&M4("Helmet: "+k+' should be of type "Array". Instead found type "'+T4(V[k])+'"'),!1)}).map(function(V){return V[k]}).reverse().reduce(function(V,M){var y={};M.filter(function(D){for(var X=void 0,A=Object.keys(D),te=0;te<A.length;te++){var ae=A[te],he=ae.toLowerCase();j.indexOf(he)!==-1&&!(X===Xn.REL&&D[X].toLowerCase()==="canonical")&&!(he===Xn.REL&&D[he].toLowerCase()==="stylesheet")&&(X=he),j.indexOf(ae)!==-1&&(ae===Xn.INNER_HTML||ae===Xn.CSS_TEXT||ae===Xn.ITEM_PROP)&&(X=ae)}if(!X||!D[X])return!1;var je=D[X].toLowerCase();return E[X]||(E[X]={}),y[X]||(y[X]={}),E[X][je]?!1:(y[X][je]=!0,!0)}).reverse().forEach(function(D){return V.push(D)});for(var s=Object.keys(y),a=0;a<s.length;a++){var p=s[a],m=v4({},E[p],y[p]);E[p]=m}return V},[]).reverse()},Sp=function(k,j){for(var x=k.length-1;x>=0;x--){var E=k[x];if(E.hasOwnProperty(j))return E[j]}return null},D4=function(k){return{baseTag:I4([Xn.HREF,Xn.TARGET],k),bodyAttributes:zS(Pf.BODY,k),defer:Sp(k,Zy.DEFER),encode:Sp(k,Zy.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:zS(Pf.HTML,k),linkTags:zy(Rt.LINK,[Xn.REL,Xn.HREF],k),metaTags:zy(Rt.META,[Xn.NAME,Xn.CHARSET,Xn.HTTPEQUIV,Xn.PROPERTY,Xn.ITEM_PROP],k),noscriptTags:zy(Rt.NOSCRIPT,[Xn.INNER_HTML],k),onChangeClientState:b4(k),scriptTags:zy(Rt.SCRIPT,[Xn.SRC,Xn.INNER_HTML],k),styleTags:zy(Rt.STYLE,[Xn.CSS_TEXT],k),title:C4(k),titleAttributes:zS(Pf.TITLE,k)}},JS=function(){var R=Date.now();return function(k){var j=Date.now();j-R>16?(R=j,k(j)):setTimeout(function(){JS(k)},0)}}(),EA=function(k){return clearTimeout(k)},O4=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||JS:global.requestAnimationFrame||JS,k4=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||EA:global.cancelAnimationFrame||EA,M4=function(k){return console&&typeof console.warn=="function"&&console.warn(k)},Fy=null,R4=function(k){Fy&&k4(Fy),k.defer?Fy=O4(function(){AA(k,function(){Fy=null})}):(AA(k),Fy=null)},AA=function(k,j){var x=k.baseTag,E=k.bodyAttributes,V=k.htmlAttributes,M=k.linkTags,y=k.metaTags,s=k.noscriptTags,a=k.onChangeClientState,p=k.scriptTags,m=k.styleTags,D=k.title,X=k.titleAttributes;ZS(Rt.BODY,E),ZS(Rt.HTML,V),N4(D,X);var A={baseTag:mp(Rt.BASE,x),linkTags:mp(Rt.LINK,M),metaTags:mp(Rt.META,y),noscriptTags:mp(Rt.NOSCRIPT,s),scriptTags:mp(Rt.SCRIPT,p),styleTags:mp(Rt.STYLE,m)},te={},ae={};Object.keys(A).forEach(function(he){var je=A[he],ee=je.newTags,ke=je.oldTags;ee.length&&(te[he]=ee),ke.length&&(ae[he]=A[he].oldTags)}),j&&j(),a(k,te,ae)},zA=function(k){return Array.isArray(k)?k.join(""):k},N4=function(k,j){typeof k<"u"&&document.title!==k&&(document.title=zA(k)),ZS(Rt.TITLE,j)},ZS=function(k,j){var x=document.getElementsByTagName(k)[0];if(x){for(var E=x.getAttribute(zl),V=E?E.split(","):[],M=[].concat(V),y=Object.keys(j),s=0;s<y.length;s++){var a=y[s],p=j[a]||"";x.getAttribute(a)!==p&&x.setAttribute(a,p),V.indexOf(a)===-1&&V.push(a);var m=M.indexOf(a);m!==-1&&M.splice(m,1)}for(var D=M.length-1;D>=0;D--)x.removeAttribute(M[D]);V.length===M.length?x.removeAttribute(zl):x.getAttribute(zl)!==y.join(",")&&x.setAttribute(zl,y.join(","))}},mp=function(k,j){var x=document.head||document.querySelector(Rt.HEAD),E=x.querySelectorAll(k+"["+zl+"]"),V=Array.prototype.slice.call(E),M=[],y=void 0;return j&&j.length&&j.forEach(function(s){var a=document.createElement(k);for(var p in s)if(s.hasOwnProperty(p))if(p===Xn.INNER_HTML)a.innerHTML=s.innerHTML;else if(p===Xn.CSS_TEXT)a.styleSheet?a.styleSheet.cssText=s.cssText:a.appendChild(document.createTextNode(s.cssText));else{var m=typeof s[p]>"u"?"":s[p];a.setAttribute(p,m)}a.setAttribute(zl,"true"),V.some(function(D,X){return y=X,a.isEqualNode(D)})?V.splice(y,1):M.push(a)}),V.forEach(function(s){return s.parentNode.removeChild(s)}),M.forEach(function(s){return x.appendChild(s)}),{oldTags:V,newTags:M}},FA=function(k){return Object.keys(k).reduce(function(j,x){var E=typeof k[x]<"u"?x+'="'+k[x]+'"':""+x;return j?j+" "+E:E},"")},P4=function(k,j,x,E){var V=FA(x),M=zA(j);return V?"<"+k+" "+zl+'="true" '+V+">"+QS(M,E)+"</"+k+">":"<"+k+" "+zl+'="true">'+QS(M,E)+"</"+k+">"},L4=function(k,j,x){return j.reduce(function(E,V){var M=Object.keys(V).filter(function(a){return!(a===Xn.INNER_HTML||a===Xn.CSS_TEXT)}).reduce(function(a,p){var m=typeof V[p]>"u"?p:p+'="'+QS(V[p],x)+'"';return a?a+" "+m:m},""),y=V.innerHTML||V.cssText||"",s=S4.indexOf(k)===-1;return E+"<"+k+" "+zl+'="true" '+M+(s?"/>":">"+y+"</"+k+">")},"")},XA=function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(k).reduce(function(x,E){return x[Fm[E]||E]=k[E],x},j)},_4=function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(k).reduce(function(x,E){return x[m4[E]||E]=k[E],x},j)},U4=function(k,j,x){var E,V=(E={key:j},E[zl]=!0,E),M=XA(x,V);return[Qy.createElement(Rt.TITLE,M,j)]},j4=function(k,j){return j.map(function(x,E){var V,M=(V={key:E},V[zl]=!0,V);return Object.keys(x).forEach(function(y){var s=Fm[y]||y;if(s===Xn.INNER_HTML||s===Xn.CSS_TEXT){var a=x.innerHTML||x.cssText;M.dangerouslySetInnerHTML={__html:a}}else M[s]=x[y]}),Qy.createElement(k,M)})},_a=function(k,j,x){switch(k){case Rt.TITLE:return{toComponent:function(){return U4(k,j.title,j.titleAttributes)},toString:function(){return P4(k,j.title,j.titleAttributes,x)}};case Pf.BODY:case Pf.HTML:return{toComponent:function(){return XA(j)},toString:function(){return FA(j)}};default:return{toComponent:function(){return j4(k,j)},toString:function(){return L4(k,j,x)}}}},YA=function(k){var j=k.baseTag,x=k.bodyAttributes,E=k.encode,V=k.htmlAttributes,M=k.linkTags,y=k.metaTags,s=k.noscriptTags,a=k.scriptTags,p=k.styleTags,m=k.title,D=m===void 0?"":m,X=k.titleAttributes;return{base:_a(Rt.BASE,j,E),bodyAttributes:_a(Pf.BODY,x,E),htmlAttributes:_a(Pf.HTML,V,E),link:_a(Rt.LINK,M,E),meta:_a(Rt.META,y,E),noscript:_a(Rt.NOSCRIPT,s,E),script:_a(Rt.SCRIPT,a,E),style:_a(Rt.STYLE,p,E),title:_a(Rt.TITLE,{title:D,titleAttributes:X},E)}},B4=function(k){var j,x;return x=j=function(E){E4(V,E);function V(){return w4(this,V),A4(this,E.apply(this,arguments))}return V.prototype.shouldComponentUpdate=function(y){return!h4(this.props,y)},V.prototype.mapNestedChildrenToProps=function(y,s){if(!s)return null;switch(y.type){case Rt.SCRIPT:case Rt.NOSCRIPT:return{innerHTML:s};case Rt.STYLE:return{cssText:s}}throw new Error("<"+y.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},V.prototype.flattenArrayTypeChildren=function(y){var s,a=y.child,p=y.arrayTypeChildren,m=y.newChildProps,D=y.nestedChildren;return Wr({},p,(s={},s[a.type]=[].concat(p[a.type]||[],[Wr({},m,this.mapNestedChildrenToProps(a,D))]),s))},V.prototype.mapObjectTypeChildren=function(y){var s,a,p=y.child,m=y.newProps,D=y.newChildProps,X=y.nestedChildren;switch(p.type){case Rt.TITLE:return Wr({},m,(s={},s[p.type]=X,s.titleAttributes=Wr({},D),s));case Rt.BODY:return Wr({},m,{bodyAttributes:Wr({},D)});case Rt.HTML:return Wr({},m,{htmlAttributes:Wr({},D)})}return Wr({},m,(a={},a[p.type]=Wr({},D),a))},V.prototype.mapArrayTypeChildrenToProps=function(y,s){var a=Wr({},s);return Object.keys(y).forEach(function(p){var m;a=Wr({},a,(m={},m[p]=y[p],m))}),a},V.prototype.warnOnInvalidChildren=function(y,s){return!0},V.prototype.mapChildrenToProps=function(y,s){var a=this,p={};return Qy.Children.forEach(y,function(m){if(!(!m||!m.props)){var D=m.props,X=D.children,A=xA(D,["children"]),te=_4(A);switch(a.warnOnInvalidChildren(m,X),m.type){case Rt.LINK:case Rt.META:case Rt.NOSCRIPT:case Rt.SCRIPT:case Rt.STYLE:p=a.flattenArrayTypeChildren({child:m,arrayTypeChildren:p,newChildProps:te,nestedChildren:X});break;default:s=a.mapObjectTypeChildren({child:m,newProps:s,newChildProps:te,nestedChildren:X});break}}}),s=this.mapArrayTypeChildrenToProps(p,s),s},V.prototype.render=function(){var y=this.props,s=y.children,a=xA(y,["children"]),p=Wr({},a);return s&&(p=this.mapChildrenToProps(s,p)),Qy.createElement(k,p)},x4(V,null,[{key:"canUseDOM",set:function(y){k.canUseDOM=y}}]),V}(Qy.Component),j.propTypes={base:Fn.object,bodyAttributes:Fn.object,children:Fn.oneOfType([Fn.arrayOf(Fn.node),Fn.node]),defaultTitle:Fn.string,defer:Fn.bool,encodeSpecialCharacters:Fn.bool,htmlAttributes:Fn.object,link:Fn.arrayOf(Fn.object),meta:Fn.arrayOf(Fn.object),noscript:Fn.arrayOf(Fn.object),onChangeClientState:Fn.func,script:Fn.arrayOf(Fn.object),style:Fn.arrayOf(Fn.object),title:Fn.string,titleAttributes:Fn.object,titleTemplate:Fn.string},j.defaultProps={defer:!0,encodeSpecialCharacters:!0},j.peek=k.peek,j.rewind=function(){var E=k.rewind();return E||(E=YA({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),E},x},V4=function(){return null},H4=f4(D4,R4,YA)(V4),Tp=B4(H4);Tp.renderStatic=Tp.rewind;function K4(){const[R,k]=xe.useState(""),[j,x]=xe.useState(""),[E,V]=xe.useState(""),[M,y]=xe.useState(""),[s,a]=xe.useState(""),[p,m]=xe.useState(""),[D,X]=xe.useState(""),[A,te]=xe.useState(!1),ae=xe.useRef(null),he=xe.useRef(null),je=()=>{A&&te(!1),k(""),x(""),V(""),y(""),a(""),m("")},ee=nt=>{nt.preventDefault(),fetch("/api/decrypt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pssh:R,licurl:j,proxy:E,headers:M,cookies:s,data:p})}).then(Gt=>Gt.json()).then(Gt=>{const ln=Gt.message.replace(/\n/g,"<br />");X(ln),te(!0)}).catch(Gt=>{console.error("Error during decryption request:",Gt),X("Error: Unable to process request."),te(!0)})},ke=nt=>{if(nt.preventDefault(),he.current){const Gt=he.current.innerText;navigator.clipboard.writeText(Gt).catch(ln=>{alert("Failed to copy!"),console.error(ln)})}},Re=()=>{event.preventDefault(),i4().then(()=>{k(document.getElementById("pssh").value),x(document.getElementById("licurl").value),y(document.getElementById("headers").value),m(document.getElementById("data").value)}).catch(nt=>{alert("Failed to paste from fetch!")})};return xe.useEffect(()=>{A&&ae.current&&ae.current.scrollIntoView({behavior:"smooth"})},[D,A]),pe.jsxs(pe.Fragment,{children:[pe.jsxs("div",{className:"flex flex-col w-full overflow-y-auto p-4 min-h-full",children:[pe.jsx(Tp,{children:pe.jsx("title",{children:"CDRM-Project"})}),pe.jsxs("form",{className:"flex flex-col w-full h-full bg-black/5 p-4 overflow-y-auto",children:[pe.jsx("label",{htmlFor:"pssh",className:"text-white w-8/10 self-center",children:"PSSH: "}),pe.jsx("input",{type:"text",id:"pssh",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:R,onChange:nt=>k(nt.target.value)}),pe.jsx("label",{htmlFor:"licurl",className:"text-white w-8/10 self-center",children:"License URL: "}),pe.jsx("input",{type:"text",id:"licurl",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:j,onChange:nt=>x(nt.target.value)}),pe.jsx("label",{htmlFor:"proxy",className:"text-white w-8/10 self-center",children:"Proxy: "}),pe.jsx("input",{type:"text",id:"proxy",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white p-1",value:E,onChange:nt=>V(nt.target.value)}),pe.jsx("label",{htmlFor:"headers",className:"text-white w-8/10 self-center",children:"Headers: "}),pe.jsx("textarea",{id:"headers",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:M,onChange:nt=>y(nt.target.value)}),pe.jsx("label",{htmlFor:"cookies",className:"text-white w-8/10 self-center",children:"Cookies: "}),pe.jsx("textarea",{id:"cookies",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:s,onChange:nt=>a(nt.target.value)}),pe.jsx("label",{htmlFor:"data",className:"text-white w-8/10 self-center",children:"Data: "}),pe.jsx("textarea",{id:"data",className:"w-8/10 border-2 border-sky-500/25 rounded-xl self-center m-2 text-white p-1 h-48",value:p,onChange:nt=>m(nt.target.value)}),pe.jsxs("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:[pe.jsx("button",{type:"button",className:"bg-sky-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate w-1/2",onClick:ee,children:"Submit"}),pe.jsx("button",{onClick:Re,className:"bg-yellow-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate mt-5 w-1/2 lg:mt-0",children:"Paste from fetch"}),pe.jsx("button",{type:"button",className:"bg-red-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate mt-5 w-1/2 lg:mt-0",onClick:je,children:"Reset"})]})]})]}),A&&pe.jsxs("div",{id:"main_content",className:"flex-col w-full h-full p-10 items-center justify-center self-center",children:[pe.jsx("div",{className:"flex flex-col w-full h-full overflow-y-auto items-center",children:pe.jsxs("div",{className:"w-8/10 grow p-4 text-white text-bold text-center text-xl md:text-3xl border-2 border-sky-500/25 rounded-xl bg-black/5",children:[pe.jsx("p",{className:"w-full border-b-2 border-white/75 pb-2",children:"Results:"}),pe.jsx("p",{className:"w-full grow pt-10 break-words overflow-y-auto",ref:he,dangerouslySetInnerHTML:{__html:D}}),pe.jsx("div",{ref:ae})]})}),pe.jsx("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:pe.jsx("button",{className:"bg-green-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-12 truncate w-1/2",onClick:ke,children:"Copy Results"})})]})]})}function q4(){const[R,k]=xe.useState(""),[j,x]=xe.useState([]),[E,V]=xe.useState(0),M=xe.useRef(null);xe.useEffect(()=>{(async()=>{try{const m=await(await fetch("/api/cache/keycount")).json();V(m.count)}catch(p){console.error("Error fetching key count:",p)}})()},[]);const y=a=>{const p=a.target.value;k(p),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{p.trim()!==""?s(p):x([])},1e3)},s=a=>{fetch("/api/cache/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:a})}).then(p=>p.json()).then(p=>x(p)).catch(p=>console.error("Error:",p))};return pe.jsxs("div",{className:"flex flex-col w-full h-full overflow-y-auto p-4",children:[pe.jsx(Tp,{children:pe.jsx("title",{children:"Cache"})}),pe.jsxs("div",{className:"flex flex-col lg:flex-row w-full lg:h-12 items-center",children:[pe.jsx("input",{type:"text",value:R,onChange:y,placeholder:`Search ${E} keys...`,className:"lg:grow w-full border-2 border-emerald-500/25 rounded-xl h-10 self-center m-2 text-white p-1 focus:outline-none focus:ring-2 focus:ring-emerald-500/50 transition-all duration-200 ease-in-out"}),pe.jsx("a",{href:"/api/cache/download",className:"bg-emerald-500/50 rounded-xl text-white text-bold text-xl p-1 lg:w-1/5 lg:h-10 truncate w-full text-center flex items-center justify-center m-2",children:"Download Cache"})]}),pe.jsx("div",{className:"w-full grow p-4 border-2 border-emerald-500/50 rounded-2xl mt-5 overflow-y-auto",children:pe.jsxs("table",{className:"min-w-full text-white",children:[pe.jsx("thead",{children:pe.jsxs("tr",{children:[pe.jsx("th",{className:"p-2 border border-black",children:"PSSH"}),pe.jsx("th",{className:"p-2 border border-black",children:"KID"}),pe.jsx("th",{className:"p-2 border border-black",children:"Key"})]})}),pe.jsx("tbody",{children:j.length>0?j.map((a,p)=>pe.jsxs("tr",{children:[pe.jsx("td",{className:"p-2 border border-black",children:a.PSSH}),pe.jsx("td",{className:"p-2 border border-black",children:a.KID}),pe.jsx("td",{className:"p-2 border border-black",children:a.Key})]},p)):pe.jsx("tr",{children:pe.jsx("td",{colSpan:"3",className:"p-2 border border-black text-center",children:"No data found"})})})]})})]})}const{protocol:$S,hostname:G4,port:Km}=window.location;let Yy=`${$S}//${G4}`;($S==="http:"&&Km!=="80"||$S==="https:"&&Km!=="443"&&Km!=="")&&(Yy+=`:${Km}`);function z4(){const[R,k]=xe.useState({device_type:"",system_id:"",security_level:"",host:"",secret:"",device_name:""}),[j,x]=xe.useState({security_level:"",host:"",secret:"",device_name:""});return xe.useEffect(()=>{fetch("/remotecdm/widevine/deviceinfo").then(E=>E.json()).then(E=>{k({device_type:E.device_type,system_id:E.system_id,security_level:E.security_level,host:E.host,secret:E.secret,device_name:E.device_name})}).catch(E=>console.error("Error fetching Widevine info:",E)),fetch("/remotecdm/playready/deviceinfo").then(E=>E.json()).then(E=>{x({security_level:E.security_level,host:E.host,secret:E.secret,device_name:E.device_name})}).catch(E=>console.error("Error fetching PlayReady info:",E))},[]),pe.jsxs("div",{className:"flex flex-col w-full overflow-y-auto p-4 text-white",children:[pe.jsx(Tp,{children:pe.jsx("title",{children:"API"})}),pe.jsxs("details",{open:!0,className:"w-full list-none",children:[pe.jsx("summary",{className:"text-2xl",children:"Sending a decryption request"}),pe.jsx("div",{className:"mt-5 p-5 rounded-lg border-2 border-indigo-500/50",children:pe.jsx("pre",{className:"rounded-lg font-mono whitespace-pre-wrap text-white overflow-auto",children:`import requests
|
||
|
||
print(requests.post(
|
||
url='${Yy}/api/decrypt',
|
||
headers={
|
||
'Content-Type': 'application/json',
|
||
},
|
||
json={
|
||
'pssh': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==',
|
||
'licurl': 'https://cwip-shaka-proxy.appspot.com/no_auth',
|
||
'headers': str({
|
||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0',
|
||
'Accept': '*/*',
|
||
'Accept-Language': 'en-US,en;q=0.5',
|
||
})
|
||
}
|
||
).json()['message'])`})})]}),pe.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[pe.jsx("summary",{className:"text-2xl",children:"Sending a search request"}),pe.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg",children:pe.jsx("pre",{className:"rounded-lg font-mono whitespace-pre text-white overflow-x-auto max-w-full p-5",children:`import requests
|
||
|
||
print(requests.post(
|
||
url='${Yy}/api/cache/search',
|
||
json={
|
||
'input': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA=='
|
||
}
|
||
).json())`})})]}),pe.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[pe.jsx("summary",{className:"text-2xl",children:"PyWidevine RemoteCDM info"}),pe.jsx("div",{className:"mt-5 border-2 border-indigo-500 p-5 rounded-lg overflow-x-auto",children:pe.jsxs("p",{children:[pe.jsx("strong",{children:"Device Type:"})," '",R.device_type,"'",pe.jsx("br",{}),pe.jsx("strong",{children:"System ID:"})," ",R.system_id,pe.jsx("br",{}),pe.jsx("strong",{children:"Security Level:"})," ",R.security_level,pe.jsx("br",{}),pe.jsx("strong",{children:"Host:"})," ",Yy,"/remotecdm/widevine",pe.jsx("br",{}),pe.jsx("strong",{children:"Secret:"})," '",R.secret,"'",pe.jsx("br",{}),pe.jsx("strong",{children:"Device Name:"})," ",R.device_name]})})]}),pe.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[pe.jsx("summary",{className:"text-2xl",children:"PyPlayready RemoteCDM info"}),pe.jsx("div",{className:"mt-5 border-2 border-indigo-500 p-5 rounded-lg overflow-x-auto",children:pe.jsxs("p",{children:[pe.jsx("strong",{children:"Security Level:"})," ",j.security_level,pe.jsx("br",{}),pe.jsx("strong",{children:"Host:"})," ",Yy,"/remotecdm/playready",pe.jsx("br",{}),pe.jsx("strong",{children:"Secret:"})," '",j.secret,"'",pe.jsx("br",{}),pe.jsx("strong",{children:"Device Name:"})," ",j.device_name]})})]})]})}var FS={};/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2016 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/var CA;function F4(){return CA||(CA=1,function(R){(function(){var k=typeof window<"u"?window:hO,j={};(function(E,V,M){var y;function s(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function p(e){e=[typeof globalThis=="object"&&globalThis,e,typeof E=="object"&&E,typeof self=="object"&&self,typeof V=="object"&&V];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var m=p(this);function D(e,t){if(t)e:{var n=m;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}e=e[e.length-1],i=n[e],t=t(i),t!=i&&t!=null&&a(n,e,{configurable:!0,writable:!0,value:t})}}D("Symbol",function(e){function t(l){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(i+(l||"")+"_"+r++,l)}function n(l,c){this.g=l,a(this,"description",{configurable:!0,writable:!0,value:c})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return t}),D("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=m[t[n]];typeof i=="function"&&typeof i.prototype[e]!="function"&&a(i.prototype,e,{configurable:!0,writable:!0,value:function(){return X(s(this))}})}return e});function X(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function A(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:s(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function te(e){if(!(e instanceof Array)){e=A(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var ae=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},he;if(typeof Object.setPrototypeOf=="function")he=Object.setPrototypeOf;else{var je;e:{var ee={a:!0},ke={};try{ke.__proto__=ee,je=ke.a;break e}catch{}je=!1}he=je?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Re=he;function nt(e,t){if(e.prototype=ae(t.prototype),e.prototype.constructor=e,Re)Re(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Tk=t.prototype}function Gt(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function ln(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}Gt.prototype.u=function(e){this.h=e};function cn(e,t){e.i={Ng:t,Zg:!0},e.g=e.m||e.j}Gt.prototype.return=function(e){this.i={return:e},this.g=this.j};function L(e,t,n){return e.g=n,{value:t}}Gt.prototype.s=function(e){this.g=e};function ce(e){e.g=0}function ye(e,t,n){e.m=t,n!=null&&(e.j=n)}function it(e,t){e.m=0,e.j=t||0}function Le(e,t,n){e.g=t,e.m=n||0}function De(e,t){return e.m=t||0,t=e.i.Ng,e.i=null,t}function Te(e){e.A=[e.i],e.m=0,e.j=0}function _e(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.Zg?e.g=e.m||e.j:n.s!=null&&e.j<n.s?(e.g=n.s,e.i=null):e.g=e.j:e.g=t}function ft(e){this.g=new Gt,this.h=e}function Sn(e,t){ln(e.g);var n=e.g.l;return n?oe(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),Oe(e))}function oe(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var l=r.value}catch(c){return e.g.l=null,cn(e.g,c),Oe(e)}return e.g.l=null,i.call(e.g,l),Oe(e)}function Oe(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,cn(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Zg)throw t.Ng;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function $e(e){this.next=function(t){return ln(e.g),e.g.l?t=oe(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=Oe(e)),t},this.throw=function(t){return ln(e.g),e.g.l?t=oe(e,e.g.l.throw,t,e.g.u):(cn(e.g,t),t=Oe(e)),t},this.return=function(t){return Sn(e,t)},this[Symbol.iterator]=function(){return this}}function qe(e){function t(i){return e.next(i)}function n(i){return e.throw(i)}return new Promise(function(i,r){function l(c){c.done?i(c.value):Promise.resolve(c.value).then(t,n).then(l,r)}l(e.next())})}function G(e){return qe(new $e(new ft(e)))}function Tt(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}D("Promise",function(e){function t(c){this.h=0,this.i=void 0,this.g=[],this.o=!1;var f=this.j();try{c(f.resolve,f.reject)}catch(h){f.reject(h)}}function n(){this.g=null}function i(c){return c instanceof t?c:new t(function(f){f(c)})}if(e)return e;n.prototype.h=function(c){if(this.g==null){this.g=[];var f=this;this.i(function(){f.l()})}this.g.push(c)};var r=m.setTimeout;n.prototype.i=function(c){r(c,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var c=this.g;this.g=[];for(var f=0;f<c.length;++f){var h=c[f];c[f]=null;try{h()}catch(v){this.j(v)}}}this.g=null},n.prototype.j=function(c){this.i(function(){throw c})},t.prototype.j=function(){function c(v){return function(S){h||(h=!0,v.call(f,S))}}var f=this,h=!1;return{resolve:c(this.F),reject:c(this.l)}},t.prototype.F=function(c){if(c===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof t)this.H(c);else{e:switch(typeof c){case"object":var f=c!=null;break e;case"function":f=!0;break e;default:f=!1}f?this.C(c):this.m(c)}},t.prototype.C=function(c){var f=void 0;try{f=c.then}catch(h){this.l(h);return}typeof f=="function"?this.I(f,c):this.m(c)},t.prototype.l=function(c){this.u(2,c)},t.prototype.m=function(c){this.u(1,c)},t.prototype.u=function(c,f){if(this.h!=0)throw Error("Cannot settle("+c+", "+f+"): Promise already settled in state"+this.h);this.h=c,this.i=f,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var c=this;r(function(){if(c.B()){var f=m.console;typeof f<"u"&&f.error(c.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var c=m.CustomEvent,f=m.Event,h=m.dispatchEvent;return typeof h>"u"?!0:(typeof c=="function"?c=new c("unhandledrejection",{cancelable:!0}):typeof f=="function"?c=new f("unhandledrejection",{cancelable:!0}):(c=m.document.createEvent("CustomEvent"),c.initCustomEvent("unhandledrejection",!1,!0,c)),c.promise=this,c.reason=this.i,h(c))},t.prototype.A=function(){if(this.g!=null){for(var c=0;c<this.g.length;++c)l.h(this.g[c]);this.g=null}};var l=new n;return t.prototype.H=function(c){var f=this.j();c.Sd(f.resolve,f.reject)},t.prototype.I=function(c,f){var h=this.j();try{c.call(f,h.resolve,h.reject)}catch(v){h.reject(v)}},t.prototype.then=function(c,f){function h(b,I){return typeof b=="function"?function(O){try{v(b(O))}catch(P){S(P)}}:I}var v,S,T=new t(function(b,I){v=b,S=I});return this.Sd(h(c,v),h(f,S)),T},t.prototype.catch=function(c){return this.then(void 0,c)},t.prototype.Sd=function(c,f){function h(){switch(v.h){case 1:c(v.i);break;case 2:f(v.i);break;default:throw Error("Unexpected state: "+v.h)}}var v=this;this.g==null?l.h(h):this.g.push(h),this.o=!0},t.resolve=i,t.reject=function(c){return new t(function(f,h){h(c)})},t.race=function(c){return new t(function(f,h){for(var v=A(c),S=v.next();!S.done;S=v.next())i(S.value).Sd(f,h)})},t.all=function(c){var f=A(c),h=f.next();return h.done?i([]):new t(function(v,S){function T(O){return function(P){b[O]=P,I--,I==0&&v(b)}}var b=[],I=0;do b.push(void 0),I++,i(h.value).Sd(T(b.length-1),S),h=f.next();while(!h.done)})},t});function dt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}D("WeakMap",function(e){function t(h){if(this.g=(f+=Math.random()+1).toString(),h){h=A(h);for(var v;!(v=h.next()).done;)v=v.value,this.set(v[0],v[1])}}function n(){}function i(h){var v=typeof h;return v==="object"&&h!==null||v==="function"}function r(h){if(!dt(h,c)){var v=new n;a(h,c,{value:v})}}function l(h){var v=Object[h];v&&(Object[h]=function(S){return S instanceof n?S:(Object.isExtensible(S)&&r(S),v(S))})}if(function(){if(!e||!Object.seal)return!1;try{var h=Object.seal({}),v=Object.seal({}),S=new e([[h,2],[v,3]]);return S.get(h)!=2||S.get(v)!=3?!1:(S.delete(h),S.set(v,4),!S.has(h)&&S.get(v)==4)}catch{return!1}}())return e;var c="$jscomp_hidden_"+Math.random();l("freeze"),l("preventExtensions"),l("seal");var f=0;return t.prototype.set=function(h,v){if(!i(h))throw Error("Invalid WeakMap key");if(r(h),!dt(h,c))throw Error("WeakMap key fail: "+h);return h[c][this.g]=v,this},t.prototype.get=function(h){return i(h)&&dt(h,c)?h[c][this.g]:void 0},t.prototype.has=function(h){return i(h)&&dt(h,c)&&dt(h[c],this.g)},t.prototype.delete=function(h){return i(h)&&dt(h,c)&&dt(h[c],this.g)?delete h[c][this.g]:!1},t}),D("Map",function(e){function t(){var f={};return f.Yb=f.next=f.head=f}function n(f,h){var v=f[1];return X(function(){if(v){for(;v.head!=f[1];)v=v.Yb;for(;v.next!=v.head;)return v=v.next,{done:!1,value:h(v)};v=null}return{done:!0,value:void 0}})}function i(f,h){var v=h&&typeof h;v=="object"||v=="function"?l.has(h)?v=l.get(h):(v=""+ ++c,l.set(h,v)):v="p_"+h;var S=f[0][v];if(S&&dt(f[0],v))for(f=0;f<S.length;f++){var T=S[f];if(h!==h&&T.key!==T.key||h===T.key)return{id:v,list:S,index:f,entry:T}}return{id:v,list:S,index:-1,entry:void 0}}function r(f){if(this[0]={},this[1]=t(),this.size=0,f){f=A(f);for(var h;!(h=f.next()).done;)h=h.value,this.set(h[0],h[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var f=Object.seal({x:4}),h=new e(A([[f,"s"]]));if(h.get(f)!="s"||h.size!=1||h.get({x:4})||h.set({x:4},"t")!=h||h.size!=2)return!1;var v=h.entries(),S=v.next();return S.done||S.value[0]!=f||S.value[1]!="s"?!1:(S=v.next(),!(S.done||S.value[0].x!=4||S.value[1]!="t"||!v.next().done))}catch{return!1}}())return e;var l=new WeakMap;r.prototype.set=function(f,h){f=f===0?0:f;var v=i(this,f);return v.list||(v.list=this[0][v.id]=[]),v.entry?v.entry.value=h:(v.entry={next:this[1],Yb:this[1].Yb,head:this[1],key:f,value:h},v.list.push(v.entry),this[1].Yb.next=v.entry,this[1].Yb=v.entry,this.size++),this},r.prototype.delete=function(f){return f=i(this,f),f.entry&&f.list?(f.list.splice(f.index,1),f.list.length||delete this[0][f.id],f.entry.Yb.next=f.entry.next,f.entry.next.Yb=f.entry.Yb,f.entry.head=null,this.size--,!0):!1},r.prototype.clear=function(){this[0]={},this[1]=this[1].Yb=t(),this.size=0},r.prototype.has=function(f){return!!i(this,f).entry},r.prototype.get=function(f){return(f=i(this,f).entry)&&f.value},r.prototype.entries=function(){return n(this,function(f){return[f.key,f.value]})},r.prototype.keys=function(){return n(this,function(f){return f.key})},r.prototype.values=function(){return n(this,function(f){return f.value})},r.prototype.forEach=function(f,h){for(var v=this.entries(),S;!(S=v.next()).done;)S=S.value,f.call(h,S[1],S[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var c=0;return r}),D("Set",function(e){function t(n){if(this.g=new Map,n){n=A(n);for(var i;!(i=n.next()).done;)this.add(i.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),i=new e(A([n]));if(!i.has(n)||i.size!=1||i.add(n)!=i||i.size!=1||i.add({x:4})!=i||i.size!=2)return!1;var r=i.entries(),l=r.next();return l.done||l.value[0]!=n||l.value[1]!=n?!1:(l=r.next(),l.done||l.value[0]==n||l.value[0].x!=4||l.value[1]!=l.value[0]?!1:r.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},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(n,i){var r=this;this.g.forEach(function(l){return n.call(i,l,l,r)})},t)});function Vi(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var l=n++;return{value:t(l,e[l]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}D("Array.prototype.values",function(e){return e||function(){return Vi(this,function(t,n){return n})}}),D("Array.from",function(e){return e||function(t,n,i){n=n??function(f){return f};var r=[],l=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof l=="function"){t=l.call(t);for(var c=0;!(l=t.next()).done;)r.push(n.call(i,l.value,c++))}else for(l=t.length,c=0;c<l;c++)r.push(n.call(i,t[c],c));return r}}),D("Array.prototype.keys",function(e){return e||function(){return Vi(this,function(t){return t})}}),D("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),D("Array.prototype.includes",function(e){return e||function(t,n){var i=this;i instanceof String&&(i=String(i));var r=i.length;for(n=n||0,0>n&&(n=Math.max(n+r,0));n<r;n++){var l=i[n];if(l===t||Object.is(l,t))return!0}return!1}});function Tn(e,t,n){if(e==null)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+""}D("String.prototype.includes",function(e){return e||function(t,n){return Tn(this,t,"includes").indexOf(t,n||0)!==-1}}),D("String.fromCodePoint",function(e){return e||function(t){for(var n="",i=0;i<arguments.length;i++){var r=Number(arguments[i]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(r>>>10&1023|55296),n+=String.fromCharCode(r&1023|56320))}return n}});function rl(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var l=e[r];if(t.call(n,l,r,e))return{Xg:r,v:l}}return{Xg:-1,v:void 0}}D("Array.prototype.findIndex",function(e){return e||function(t,n){return rl(this,t,n).Xg}}),D("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=A(n);for(var i;!(i=n.next()).done;)this.add(i.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),i=Object.seal({}),r=new e([n]);return!r.has(n)||r.has(i)?!1:(r.delete(n),r.add(i),!r.has(n)&&r.has(i))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),D("Array.prototype.find",function(e){return e||function(t,n){return rl(this,t,n).v}}),D("String.prototype.startsWith",function(e){return e||function(t,n){var i=Tn(this,t,"startsWith"),r=i.length,l=t.length;n=Math.max(0,Math.min(n|0,i.length));for(var c=0;c<l&&n<r;)if(i[n++]!=t[c++])return!1;return c>=l}}),D("Object.entries",function(e){return e||function(t){var n=[],i;for(i in t)dt(t,i)&&n.push([i,t[i]]);return n}});var Ap=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)dt(i,r)&&(e[r]=i[r])}return e};D("Object.assign",function(e){return e||Ap}),D("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),D("Array.prototype.entries",function(e){return e||function(){return Vi(this,function(t,n){return[t,n]})}}),D("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),D("String.prototype.repeat",function(e){return e||function(t){var n=Tn(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var i="";t;)t&1&&(i+=n),(t>>>=1)&&(n+=n);return i}}),D("Number.EPSILON",function(){return Math.pow(2,-52)}),D("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),D("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),D("Object.values",function(e){return e||function(t){var n=[],i;for(i in t)dt(t,i)&&n.push(t[i]);return n}}),D("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),D("String.prototype.endsWith",function(e){return e||function(t,n){var i=Tn(this,t,"endsWith");n===void 0&&(n=i.length),n=Math.max(0,Math.min(n|0,i.length));for(var r=t.length;0<r&&0<n;)if(i[--n]!=t[--r])return!1;return 0>=r}}),D("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var _f=this||self;function Me(e,t){e=e.split(".");var n=_f;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||t===void 0?n[i]&&n[i]!==Object.prototype[i]?n=n[i]:n=n[i]={}:n[i]=t}function Cp(){}function bp(){}function Ha(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}Ha.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.i+=e)};function Uf(e){return e.h/(1-Math.pow(e.g,e.i))}function Zi(){this.h=new Ha(2),this.j=new Ha(5),this.g=0,this.i=128e3,this.l=16e3}Zi.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},Zi.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)}},Zi.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(Uf(this.h),Uf(this.j))};function Qm(){}function Qr(){}function Et(){}function ko(e){var t=Tt.apply(1,arguments);ng.has(e)||(ng.add(e),Et.apply(Qm,te(t)))}function Jm(){}function Zm(){}function o2(){}var ng=new Set;E.console&&(new Map().set(1,function(){return console.error.apply(console,te(Tt.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,te(Tt.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,te(Tt.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,te(Tt.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,te(Tt.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,te(Tt.apply(0,arguments)))}),Et=function(){return console.warn.apply(console,te(Tt.apply(0,arguments)))},Qr=function(){console.error.apply(console,te(Tt.apply(0,arguments)))});function Fl(){this.g=new Map}y=Fl.prototype,y.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},y.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},y.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(i){return i!=t});this.g.set(e,n),n.length||this.g.delete(e)}},y.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},y.size=function(){return this.g.size},y.keys=function(){return Array.from(this.g.keys())};function yt(){this.g=new Fl}y=yt.prototype,y.release=function(){this.Qa(),this.g=null},y.D=function(e,t,n,i){this.g&&(e=new ol(e,t,n,i),this.g.push(t,e))},y.ma=function(e,t,n,i){function r(c){l.Ja(e,t,r),n(c)}var l=this;this.D(e,t,r,i)},y.Ja=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=A(i);for(var r=i.next();!r.done;r=i.next())r=r.value,r.target!=e||n!=r.listener&&n||(r.Ja(),this.g.remove(t,r))}},y.Qa=function(){if(this.g){for(var e=[],t=A(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,te(n.value));for(e=A(e),t=e.next();!t.done;t=e.next())t.value.Ja();this.g.g.clear()}},Me("shaka.util.EventManager",yt),yt.prototype.removeAll=yt.prototype.Qa,yt.prototype.unlisten=yt.prototype.Ja,yt.prototype.listenOnce=yt.prototype.ma,yt.prototype.listen=yt.prototype.D,yt.prototype.release=yt.prototype.release;function ol(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=hr(e,i),this.target.addEventListener(t,n,this.g)}ol.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function hr(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(i){return!n.has(i)}),$m(e)?t:t.capture||!1}function $m(e){var t=ig;if(t==null){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{t=!1}ig=t}return t||!1}var ig=void 0;Me("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Ip(e,t){this.g=e,this.h=t}Ip.prototype.toString=function(){return"v"+this.g+"."+this.h};function bt(e,t){var n=new Ip(5,0),i=pc,r=i.g,l=n.h-r.h;(0<(n.g-r.g||l)?i.i:i.h)(i.g,n,e,t)}function jf(e,t,n,i){Et([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Ou(e,t,n,i){Qr([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}var pc=null;/*
|
||
@license
|
||
Copyright 2008 The Closure Library Authors
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/var hc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
|
||
@license
|
||
Copyright 2006 The Closure Library Authors
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function fn(e){var t;e instanceof fn?(yc(this,e.Kb),this.Hc=e.Hc,gc(this,e.nb),vc(this,e.$c),this.ab=e.ab,Jr(this,e.g.clone()),this.qc=e.qc):e&&(t=String(e).match(hc))?(yc(this,t[1]||"",!0),this.Hc=Ka(t[2]||""),gc(this,t[3]||"",!0),vc(this,t[4]),this.ab=Ka(t[5]||"",!0),Jr(this,t[6]||"",!0),this.qc=Ka(t[7]||"")):this.g=new Yn(null)}y=fn.prototype,y.Kb="",y.Hc="",y.nb="",y.$c=null,y.ab="",y.qc="",y.toString=function(){var e=[],t=this.Kb;if(t&&e.push(qa(t,Bf,!0),":"),t=this.nb){e.push("//");var n=this.Hc;n&&e.push(qa(n,Bf,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.$c,t!=null&&e.push(":",String(t))}return(t=this.ab)&&(this.nb&&t.charAt(0)!="/"&&e.push("/"),e.push(qa(t,t.charAt(0)=="/"?og:Dp,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.qc)&&e.push("#",qa(t,Xl)),e.join("")},y.resolve=function(e){var t=this.clone();t.Kb==="data"&&(t=new fn);var n=!!e.Kb;n?yc(t,e.Kb):n=!!e.Hc,n?t.Hc=e.Hc:n=!!e.nb,n?gc(t,e.nb):n=e.$c!=null;var i=e.ab;if(n)vc(t,e.$c);else if(n=!!e.ab){if(i.charAt(0)!="/")if(this.nb&&!this.ab)i="/"+i;else{var r=t.ab.lastIndexOf("/");r!=-1&&(i=t.ab.substr(0,r+1)+i)}if(i==".."||i==".")i="";else if(i.indexOf("./")!=-1||i.indexOf("/.")!=-1){r=i.lastIndexOf("/",0)==0,i=i.split("/");for(var l=[],c=0;c<i.length;){var f=i[c++];f=="."?r&&c==i.length&&l.push(""):f==".."?((1<l.length||l.length==1&&l[0]!="")&&l.pop(),r&&c==i.length&&l.push("")):(l.push(f),r=!0)}i=l.join("/")}}return n?t.ab=i:n=e.g.toString()!=="",n?Jr(t,e.g.clone()):n=!!e.qc,n&&(t.qc=e.qc),t},y.clone=function(){return new fn(this)};function yc(e,t,n){e.Kb=n?Ka(t,!0):t,e.Kb&&(e.Kb=e.Kb.replace(/:$/,""))}function gc(e,t,n){e.nb=n?Ka(t,!0):t}function vc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.$c=t}else e.$c=null}function Jr(e,t,n){t instanceof Yn?e.g=t:(n||(t=qa(t,e0)),e.g=new Yn(t))}function Ka(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function qa(e,t,n){return e!=null?(e=encodeURI(e).replace(t,rg),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function rg(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var Bf=/[#\/\?@]/g,Dp=/[#\?:]/g,og=/[#\?]/g,e0=/[#\?@]/g,Xl=/#/g;function Yn(e){this.g=e||null}function Ii(e){if(!e.Va&&(e.Va=new Map,e.kd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var l=t[n].substring(0,i);r=t[n].substring(i+1)}else l=t[n];l=decodeURIComponent(l.replace(/\+/g," ")),r=r||"",e.add(l,decodeURIComponent(r.replace(/\+/g," ")))}}y=Yn.prototype,y.Va=null,y.kd=null;function ku(e){return Ii(e),e.kd}y.add=function(e,t){Ii(this),this.g=null;var n=this.Va.has(e)?this.Va.get(e):null;return n||this.Va.set(e,n=[]),n.push(t),this.kd++,this},y.set=function(e,t){return Ii(this),this.g=null,this.Va.has(e)?this.Va.set(e,[t]):this.add(e,t),this},y.get=function(e){return Ii(this),this.Va.get(e)||[]},y.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var e=[],t=A(this.Va.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Va.get(i);for(var r=0;r<i.length;r++){var l=n;i[r]!==""&&(l+="="+encodeURIComponent(i[r])),e.push(l)}}return this.g=e.join("&")},y.clone=function(){var e=new Yn;if(e.g=this.g,this.Va){for(var t=new Map,n=A(this.Va),i=n.next();!i.done;i=n.next()){var r=A(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Va=t,e.kd=this.kd}return e};function Yl(){}function ll(e,t){if(!e&&!t)return!0;if(!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=Je(e);t=Je(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function yr(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Je(e,t,n){return n=n===void 0?1/0:n,Wl(e,t===void 0?0:t,n,Uint8Array)}function Ga(e,t,n){return n=n===void 0?1/0:n,Wl(e,t===void 0?0:t,n,Uint16Array)}function Ti(e,t,n){return n=n===void 0?1/0:n,Wl(e,t===void 0?0:t,n,DataView)}function Wl(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,l=1;"BYTES_PER_ELEMENT"in i&&(l=i.BYTES_PER_ELEMENT);var c=((e.byteOffset||0)+e.byteLength)/l;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/l,c))),new i(r,e,Math.floor(Math.min(e+Math.max(n,0),c))-e)}Me("shaka.util.BufferUtils",Yl),Yl.toDataView=Ti,Yl.toUint16=Ga,Yl.toUint8=Je,Yl.toArrayBuffer=yr,Yl.equal=ll;function Y(e,t,n){var i=Tt.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(r){this.stack=r.stack}}Y.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},Me("shaka.util.Error",Y),Y.Severity={RECOVERABLE:1,CRITICAL:2},Y.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},Y.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,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function ul(e){this.h=e,this.g=void 0}ul.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};function Mu(e,t){return e.length&&t.length&&e!==t?0<ti(e,t).length:!0}function ti(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=A(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=A(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.keySystem==l.keySystem){r=new Map;for(var c=A((i.initData||[]).concat(l.initData||[])),f=c.next();!f.done;f=c.next())f=f.value,r.set(f.keyId,f);r=Array.from(r.values()),c=i.keyIds&&l.keyIds?new Set([].concat(te(i.keyIds),te(l.keyIds))):i.keyIds||l.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||l.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||l.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||l.persistentStateRequired,videoRobustness:i.videoRobustness||l.videoRobustness,audioRobustness:i.audioRobustness||l.audioRobustness,serverCertificate:i.serverCertificate||l.serverCertificate,serverCertificateUri:i.serverCertificateUri||l.serverCertificateUri,initData:r,keyIds:c});break}}return n}function Vf(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function mc(e){return e?!!e.match(/^com\.apple\.fps/):!1}var Mo=new ul(function(){return yr(new Uint8Array([0]))}),Zr=new Map;function Sc(e){this.h=e,this.g=null}Sc.prototype.da=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){E.clearTimeout(i),n=!1},i=E.setTimeout(function(){n&&t.h()},1e3*e),this},Sc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ct(e){this.h=e,this.g=null}ct.prototype.sb=function(){return this.stop(),this.h(),this},ct.prototype.da=function(e){var t=this;return this.stop(),this.g=new Sc(function(){t.h()}).da(e),this},ct.prototype.ua=function(e){var t=this;return this.stop(),this.g=new Sc(function(){t.g.da(e),t.h()}).da(e),this},ct.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Me("shaka.util.Timer",ct),ct.prototype.stop=ct.prototype.stop,ct.prototype.tickEvery=ct.prototype.ua,ct.prototype.tickAfter=ct.prototype.da,ct.prototype.tickNow=ct.prototype.sb;function $r(){var e=E.ManagedMediaSource||E.MediaSource;return!!(e&&e.isTypeSupported)}function Tc(e){return kp().canPlayType(e)!=""}function Ql(){return!!navigator.userAgent.match(/Edge?\//)}function $i(){return Vt("Xbox One")}function si(){return Vt("Tizen")}function eo(){return Vt("Tizen 3")}function Ro(){return Vt("Web0S")}function al(){return Ro()&&Hf()===38}function er(){return Vt("CrKey")&&!Vt("VIZIO SmartCast")}function Hf(){if(!Vt("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function ni(){return Jl()&&((navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1)||(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:Jl()&&1<navigator.maxTouchPoints))}function Ru(){return Vt("PlayStation 5")}function qn(){return Vt("PlayStation 4")}function wc(){return Vt("Hisense")||Vt("VIDAA")}function lg(){if(!ni()&&(!Jl()||ni()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function za(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function sl(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":Vt("Android")}function Fa(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="fuchsia":Vt("Fuchsia")}function Op(){return!!(si()||Ro()||$i()||qn()||Ru()||er()||wc()||Vt("VIZIO SmartCast")||Jl()&&!ni())}function Vt(e){return(navigator.userAgent||"").includes(e)}function Jl(){return(navigator.vendor||"").includes("Apple")}function kp(){return to||(Kf||(Kf=new ct(function(){to=null})),(to=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(to=document.createElement("video")),Kf.da(1),to)}function Mp(){if(eo()||Vt("Tizen 2")||al()||qn()||Ru())return!1;var e=lg();return!(Jl()&&!ni()&&e!=null&&15>e)}function Nu(){var e,t,n,i,r,l,c,f,h,v,S,T,b,I,O,P,N;return G(function(_){switch(_.g){case 1:if(e={width:1/0,height:1/0},er()){if(I=E.cast&&cast.__platform__&&cast.__platform__.canDisplayType,e.width=1280,e.height=720,ye(_,14),!(O=I)){_.s(16);break}return L(_,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(si()){t=E.devicePixelRatio,e.width=1920<E.screen.width*t?3840:1920,e.height=1080<E.screen.height*t?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),e.width=n.width,e.height=n.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{Et("Tizen: Error detecting screen size, default screen size 1920x1080.")}_.s(3);break}if(Ro()){try{i=JSON.parse(E.PalmSystem.deviceInfo),e.width=Math.max(1920,i.screenWidth),e.height=Math.max(1080,i.screenHeight)}catch{Et("WebOS: Error detecting screen size, default screen size 1920x1080."),e.width=1920,e.height=1080}_.s(3);break}if(wc()){if(r=null,E.Hisense_Get4KSupportState)try{r=E.Hisense_Get4KSupportState()}catch{}r==null&&(r=Vt("UHD")),r?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),_.s(3);break}if(!qn()&&!Ru()){l=void 0;try{l=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}if(l){e.width=1920,e.height=1080;try{c=new l.Media.Protection.ProtectionCapabilities,f=l.Media.Protection.ProtectionCapabilityResult,h=null;do h=c.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(h===f.maybe);h===f.probably&&(e.width=3840,e.height=2160)}catch{Et("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else $i()&&(e.width=1920,e.height=1080,Et("Xbox: Error detecting screen size, default screen size 1920x1080."));_.s(3);break}return v=!1,ye(_,8),L(_,E.msdk.device.getDisplayInfo(),10);case 10:S=_.h,v=S.resolution==="4K",Le(_,9);break;case 8:return De(_),ye(_,11),L(_,E.msdk.device.getDisplayInfoImmediate(),13);case 13:T=_.h,v=T.resolution==="4K",Le(_,9);break;case 11:b=De(_),Et("PlayStation: Failed to get the display info:",b);case 9:v?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),_.s(3);break;case 17:O=_.h;case 16:if(O){e.width=3840,e.height=2160,_.s(18);break}if(!(P=I)){_.s(19);break}return L(_,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:P=_.h;case 19:P&&(e.width=1920,e.height=1080);case 18:Le(_,3);break;case 14:N=De(_),Qr("Failed to check canDisplayType:",N);case 3:return _.return(e)}})}function Rp(e){return E.matchMedia!==void 0&&E.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}var Kf=null,to=null;function Pu(){}function Zt(e){if(!e)return"";if(e=Je(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),E.TextDecoder&&!qn())return e=new TextDecoder().decode(e),e.includes("<22>")&&Qr('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var i=65533;if((e[n]&128)==0?i=e[n]:e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(i=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(i=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(i=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3),65535>=i)t+=String.fromCharCode(i);else{i-=65536;var r=i&1023;t+=String.fromCharCode(55296+(i>>10)),t+=String.fromCharCode(56320+r)}}return t}function cl(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new Y(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=Ti(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return Xa(i)}function Or(e){function t(i){return n.byteLength<=i||9<=n[i]&&126>=n[i]}if(!e)return"";var n=Je(e);if(n[0]==239&&n[1]==187&&n[2]==191)return Zt(n);if(n[0]==254&&n[1]==255)return cl(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return cl(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return cl(e,!1);if(n[1]==0&&n[3]==0)return cl(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Zt(e);throw new Y(2,2,2003)}function kr(e){if(E.TextEncoder&&!qn()){var t=new TextEncoder;return yr(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return yr(t)}function Np(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 Xa(e){return qf.value()(e)}function wi(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(r){return r[1]=="#"?(r=r[2]=="x"||r[2]=="X"?parseInt(r.substring(3),16):parseInt(r.substring(2),10),0<=r&&1114111>=r?String.fromCodePoint(r):""):t[r]||"'"}):e||""}Me("shaka.util.StringUtils",Pu),Pu.resetFromCharCode=function(){qf.g=void 0},Pu.toUTF16=Np,Pu.toUTF8=kr,Pu.fromBytesAutoDetect=Or,Pu.fromUTF16=cl,Pu.fromUTF8=Zt;var qf=new ul(function(){function e(n){try{var i=new Uint8Array(n);return 0<String.fromCharCode.apply(null,i).length}catch{return!1}}for(var t={jc:65536};0<t.jc;t={jc:t.jc},t.jc/=2)if(e(t.jc))return function(n){return function(i){for(var r="",l=0;l<i.length;l+=n.jc)r+=String.fromCharCode.apply(null,i.subarray(l,l+n.jc));return r}}(t);return null});function Nn(){}function fl(e){return e=Xa(Je(e)),btoa(e)}function No(e,t){return t=t??!0,e=fl(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function Hi(e){e=E.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function Zl(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=E.parseInt(e.substr(2*i,2),16);return n}function gr(e){var t=Je(e);e="",t=A(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function Ht(){for(var e=Tt.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&r.BYTES_PER_ELEMENT===1?t.set(r,n):t.set(Je(r),n),n+=r.byteLength}return t}Me("shaka.util.Uint8ArrayUtils",Nn),Nn.concat=Ht,Nn.toHex=gr,Nn.fromHex=Zl,Nn.fromBase64=Hi,Nn.toBase64=No,Nn.toStandardBase64=fl;function Pn(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var i=new fn(e[0]);return t=new fn(t[0]),t=i.resolve(t),n&&Jr(t,n),[t.toString()]}t=t.map(function(f){return new fn(f)}),i=[],e=A(e);for(var r=e.next();!r.done;r=e.next()){r=new fn(r.value);for(var l=A(t),c=l.next();!c.done;c=l.next())c=r.resolve(c.value),n&&Jr(c,n),i.push(c.toString())}return i}function Mr(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function dl(e,t){t=t===void 0?"cenc":t;var n=[],i=[],r=[];e.forEach(function(c,f){var h=f;h.length!=22&&(h=No(Zl(f),!1));var v=c;v.length!=22&&(v=No(Zl(c),!1)),c={kty:"oct",kid:h,k:v},n.push(c),i.push(c.kid),r.push(f)}),e=JSON.stringify({keys:n});var l=JSON.stringify({kids:i});return l=[{initData:Je(kr(l)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+E.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:l,keyIds:new Set(r)}}function $l(e,t){if(t.length==1)return t[0];if(e=ci(e,t),e!=null)return e;throw new Y(2,4,4025,t)}function ci(e,t){var n=Ki.get(e);n=A(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=A(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.test(l.trim()))return l.trim()}return e==ot?"":null}function Gf(e,t){var n=[];e=Ki.get(e),e=A(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=A(t),l=r.next();!l.done;l=r.next())l=l.value,i.test(l.trim())&&n.push(l.trim())}return n}var ot="text",wn={la:"video",V:"audio",za:ot,$e:"image",Mj:"application"},ug=1/15,Ki=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function no(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if(typeof libDPIModule>"u"&&Et("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,bt("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Et("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(Et("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Et(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Ya(e,t,n,i){i.type!=="video"||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function Wa(e){e.g&&e.i.classList.add("shaka-hidden")}no.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ag(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Me("shaka.lcevc.Dec",no),no.prototype.release=no.prototype.release;function Ln(e){if(Ja.has(e))return Ja.get(e);var t=E.ManagedMediaSource||E.MediaSource;return t?(t=t.isTypeSupported(e),Ja.set(e,t),t):!1}function pl(){var e=E.ManagedSourceBuffer||E.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function Qa(){var e=E.ManagedMediaSource||E.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var Ja=new Map;function Za(){}Za.prototype.extract=function(){},Za.prototype.decode=function(){return[]},Za.prototype.clear=function(){},Za.prototype.getStreams=function(){return[]};function Pp(){}Pp.prototype.init=function(){},Pp.prototype.parse=function(){return[]};function xc(){}xc.prototype.init=function(){},xc.prototype.i=function(){},xc.prototype.g=function(){},xc.prototype.j=function(){},Me("shaka.media.IClosedCaptionParser",xc);function tr(e){this.l=new Pp,(e=sg(e.toLowerCase()))&&(this.l=e()),this.h=new Za,(e=$a)&&(this.h=e())}tr.prototype.init=function(e,t){t!==void 0&&t||this.g(),this.l.init(e)},tr.prototype.i=function(e){e=this.l.parse(e),e=A(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=Je(t.packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},tr.prototype.g=function(){this.h.clear()},tr.prototype.j=function(){return this.h.getStreams()};function Ec(e,t){Lp.set(e,t)}function sg(e){return Lp.get(e)}Me("shaka.media.ClosedCaptionParser",tr),tr.findDecoder=function(){return $a},tr.unregisterDecoder=function(){$a=null},tr.registerDecoder=function(e){$a=e},tr.findParser=sg,tr.unregisterParser=function(e){Lp.delete(e)},tr.registerParser=Ec;var Lp=new Map,$a=null;function Lu(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=qi,this.scroll=_p}Me("shaka.text.CueRegion",Lu);var qi=1;Lu.units={PX:0,PERCENTAGE:qi,LINES:2};var _p="";Lu.scrollMode={NONE:_p,UP:"up"};function cg(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function Rr(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function Up(e,t,n){if(n||(n=cg),e.length!=t.length)return!1;t=t.slice(),e=A(e);for(var i=e.next(),r={};!i.done;r={ah:void 0},i=e.next()){if(r.ah=i.value,i=t.findIndex(function(l){return function(c){return n(l.ah,c)}}(r)),i==-1)return!1;t[i]=t[t.length-1],t.pop()}return t.length==0}function es(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=cg),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 eu(e){this.h=e||"",this.g=0}function ts(e){_u(e,/[ \t]+/gm)}function _u(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function Uu(e){return e.g==e.h.length?null:(e=_u(e,/[^ \t\n]*/gm))?e[0]:null}function ns(e){if(e=_u(e,t0),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function is(e){return e?ns(new eu(e)):null}var t0=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function io(e){function t(i){switch(typeof i){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return i;default:if(!i||ArrayBuffer.isView(i))return i;if(n.has(i))return null;var r=i.constructor==Array;if(i.constructor!=Object&&!r)return null;n.add(i);var l=r?[]:{},c;for(c in i)l[c]=t(i[c]);return r&&(l.length=i.length),l}}var n=new WeakSet;return t(e)}function ju(e){var t={},n;for(n in e)t[n]=e[n];return t}function jp(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];r!==void 0&&(r=jp(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=A(n),i=n.next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),r=e[r],r!==void 0&&(r=jp(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Ac(e,t){var n=n===void 0?!1:n;return e=Or(e),Bu(e,t,n)}function Bu(e,t,n){return e=n0(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(i){return t.split(",").includes(i.tagName)}))?e:null}function Bp(e){return zp.has(e)?zp.get(e):""}function n0(e,t){function n(l,c){c=c===void 0?!1:c;for(var f=[];e[r];)if(e.charCodeAt(r)==60){if(e.charCodeAt(r+1)===47){c=r+2,r=e.indexOf(">",r),c=e.substring(c,r);var h=c.indexOf(l);if(h==-1){var v=l.indexOf(".");0<v&&(h=c.indexOf(l.substring(0,v)))}if(h==-1)throw l=e.substring(0,r).split(`
|
||
`),Error(`Unexpected close tag
|
||
Line: `+(l.length-1)+`
|
||
Column: `+(l[l.length-1].length+1)+`
|
||
Char: `+e[r]);r+1&&(r+=1);break}else if(e.charCodeAt(r+1)===33){if(e.charCodeAt(r+2)==45){for(;r!==-1&&(e.charCodeAt(r)!==62||e.charCodeAt(r-1)!=45||e.charCodeAt(r-2)!=45||r==-1);)r=e.indexOf(">",r+1);r===-1&&(r=e.length)}else if(e.charCodeAt(r+2)===91&&e.charCodeAt(r+8)===91&&e.substr(r+3,5).toLowerCase()==="cdata"){h=e.indexOf("]]>",r),h==-1?(f.push(e.substr(r+9)),r=e.length):(f.push(e.substring(r+9,h)),r=h+3);continue}r++;continue}e:{v=c,r++;var S=i(),T={};for(h=[];e.charCodeAt(r)!==62&&e[r];){var b=e.charCodeAt(r);if(64<b&&91>b||96<b&&123>b){b=i();for(var I=e.charCodeAt(r);I&&I!==39&&I!==34&&!(64<I&&91>I||96<I&&123>I)&&I!==62;)r++,I=e.charCodeAt(r);var O=r+1;if(r=e.indexOf(e[r],O),O=e.slice(O,r),I===39||I===34){if(r===-1){if(v={tagName:S,attributes:T,children:h,parent:null},t)for(S=0;S<h.length;S++)typeof h[S]!="string"&&(h[S].parent=v);h=v;break e}}else O=null,r--;if(b.startsWith("xmlns:")){I=O;var P=b.split(":")[1];zp.set(I,P),Fp.set(P,I)}S==="tt"&&b==="xml:space"&&O==="preserve"&&(v=!0),T[b]=O}r++}for(e.charCodeAt(r-1)!==47?(r++,h=n(S,v)):r++,v={tagName:S,attributes:T,children:h,parent:null},S=h.length,T=0;T<S;T++)b=h[T],typeof b!="string"?t&&(b.parent=v):T==S-1&&b==`
|
||
`&&h.pop();h=v}if(f.push(h),typeof h=="string")break;h.tagName[0]==="?"&&h.children&&(f.push.apply(f,te(h.children)),h.children=[])}else h=r,r=e.indexOf("<",r)-1,r===-2&&(r=e.length),h=e.slice(h,r+1),c?0<h.length&&f.push(h):(f.length&&h.length==1&&h[0]==`
|
||
`||0<h.trim().length)&&f.push(h),r++;return f}function i(){for(var l=r;`\r
|
||
>/= `.indexOf(e[r])===-1&&e[r];)r++;return e.slice(l,r)}var r=0;return n("")}function rs(e){return typeof e=="string"}function os(e){var t=[];if(!e.children)return[];e=A(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Mt(e,t){var n=[];if(!e.children)return[];e=A(e.children);for(var i=e.next();!i.done;i=e.next())i=i.value,i.tagName===t&&n.push(i);return n}function Cn(e){return typeof e=="string"?wi(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:wi(e))}function Gi(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=Cn(e))&&(e=e.trim()),e):null}function Nr(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=A(e.children);for(var i=e.next();!i.done;i=e.next())Nr(i.value,t,n)}return n}function xn(e,t){return e=Mt(e,t),e.length!=1?null:e[0]}function vr(e,t,n){return e=fg(e,t,n),e.length!=1?null:e[0]}function ze(e,t,n,i){i=i===void 0?null:i;var r=null;return e=e.attributes[t],e!=null&&(r=n(e)),r??i}function hl(e,t,n){return t=Bp(t),e.attributes[t+":"+n]||null}function fg(e,t,n){var i=Bp(t);if(t=[],e.children)for(n=i?i+":"+n:n,e=A(e.children),i=e.next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function Po(e,t,n){t=A(t);for(var i=t.next();!i.done;i=t.next())if(i=hl(e,i.value,n))return i;return null}function yl(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}function ro(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function tu(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function Wn(e){return e=Number(e),e%1===0?e:null}function gl(e){return e=Number(e),e%1===0&&0<e?e:null}function Qn(e){return e=Number(e),e%1===0&&0<=e?e:null}function ls(e){return e=Number(e),isNaN(e)?null:e}function Cc(e){return e?e.toLowerCase()==="true":!1}function Vp(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function us(e){var t=[];e=wi(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=A(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=n.match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),l=n.match(/(@t='(\d+)')/),c=n.match(/(@n='(\d+)')/),f=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:l?Number(l[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:c?Number(c[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:f?Number(f[1])-1:null,ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].ac=n.slice(1))}return t}function Hp(e,t){var n=us(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;n=i.position,n==null&&(i.t!==null&&(n=Kp(e,"t",i.t)),i.n!==null&&(n=Kp(e,"n",i.n))),n===null?n=r==="prepend"?0:e.length:r==="prepend"?--n:r==="after"&&++n,r=t.tagName,(i=i.ac)&&e[n]?qp(e[n],r,i,Gi(t)||""):(r!=="remove"&&r!=="replace"||e.splice(n,1),r!=="add"&&r!=="replace"||e.splice.apply(e,[n,0].concat(te(t.children))))}}function Kp(e,t,n){var i=0;e=A(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function qp(e,t,n,i){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=i)}function dg(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=Fp.has(t)?Fp.get(t):""),t=document.createElementNS(t,e.tagName);for(var i in e.attributes)t.setAttribute(i,e.attributes[i]);for(e=A(e.children),i=e.next();!i.done;i=e.next())i=i.value,n=void 0,typeof i=="string"?n=new Text(i):n=dg(i),t.appendChild(n);return t}function Gp(e){if(!e)return null;var t={tagName:e.tagName,attributes:ju(e.attributes),children:[],parent:null};e=A(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=Gp(n),n.parent=t),t.children.push(n);return t}var zp=new Map,Fp=new Map;function Ft(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Lu,this.position=null,this.positionAlign=zf,this.size=0,this.textAlign=zi,this.direction=as,this.writingMode=mr,this.lineInterpretation=Lo,this.line=null,this.lineHeight="",this.lineAlign=ml,this.displayAlign=vl,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Qp,this.fontStyle=Jp,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={oc:32,rows:15}}function nr(e,t){return e=new Ft(e,t,""),e.lineBreak=!0,e}Ft.prototype.clone=function(){var e=new Ft(0,0,""),t;for(t in this)e[t]=this[t],e[t]&&e[t].constructor==Array&&(e[t]=e[t].slice());return e};function nu(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!es(e.nestedCues,t.nestedCues,nu))return!1}else if(n=="region"||n=="cellResolution"){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!es(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function bc(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&Xp(t);var i=n;n=[];for(var r=-1,l=0;l<i.length;l++)i[l]==="<"?r=l+1:i[l]===">"&&0<r&&(r=i.substr(r,l-r),r.match(yg)&&n.push(r),r=-1);for(n=A(n),l=n.next();!l.done;l=n.next())l=l.value,i=i.replace("<"+l+">",'<div time="'+l+'">'),i+="</div>";e:{l=i,r=[];var c=-1;n="",i=!1;for(var f=0;f<l.length;f++)if(l[f]==="/"){var h=l.indexOf(">",f);if(h===-1){n=l;break e}if((h=l.substring(f+1,h))&&h=="v"){i=!0;var v=null;if(r.length&&(v=r[r.length-1]),v){if(v===h)n+="/"+h+">";else{if(!v.startsWith("v")){n+=l[f];continue}n+="/"+v+">"}f+=h.length+1}else n+=l[f]}else n+=l[f]}else l[f]==="<"?(c=f+1,l[c]!="v"&&(c=-1)):l[f]===">"&&0<c&&(r.push(l.substr(c,f-c)),c=-1),n+=l[f];for(l=A(r),r=l.next();!r.done;r=l.next())r=r.value,c=r.replace(" ",".voice-"),n=n.replace("<"+r+">","<"+c+">"),n=n.replace("</"+r+">","</"+c+">"),i||(n+="</"+c+">")}n=pg(n),e.payload="";try{var S=Bu("<span>"+n+"</span>","span")}catch{}if(S)if(S=S.children,S.length!=1||S[0].tagName)for(S=A(S),n=S.next();!n.done;n=S.next())Yp(n.value,e,t);else e.payload=wi(n);else e.payload=wi(n)}else e.payload=wi(n)}function Xp(e){for(var t=A(Object.entries(iu)),n=t.next();!n.done;n=t.next()){var i=A(n.value);n=i.next().value,i=i.next().value;var r=new Ft(0,0,"");r.color=i,e.set("."+n,r)}for(t=A(Object.entries(Wp)),n=t.next();!n.done;n=t.next())i=A(n.value),n=i.next().value,i=i.next().value,r=new Ft(0,0,""),r.backgroundColor=i,e.set("."+n,r)}function pg(e){var t={"< ":""," >":" >"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}function Yp(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new Lu,i.position=null,i.size=0,i.textAlign=zi,e.tagName)for(var r=A(e.tagName.split(/(?=[ .])+/g)),l=r.next();!l.done;l=r.next()){var c=l=l.value;if(c.startsWith(".voice-")){var f=c.split("-").pop();c='v[voice="'+f+'"]',n.has(c)||(c="v[voice="+f+"]")}switch(n.has(c)&&(f=i,c=n.get(c))&&(f.backgroundColor=Vu(c.backgroundColor,f.backgroundColor),f.color=Vu(c.color,f.color),f.fontFamily=Vu(c.fontFamily,f.fontFamily),f.fontSize=Vu(c.fontSize,f.fontSize),f.textShadow=Vu(c.textShadow,f.textShadow),f.fontWeight=c.fontWeight,f.fontStyle=c.fontStyle,f.opacity=c.opacity,f.rubyTag=c.rubyTag,f.textCombineUpright=c.textCombineUpright,f.wrapLine=c.wrapLine),l){case"br":i=nr(i.startTime,i.endTime),t.nestedCues.push(i);return;case"b":i.fontWeight=Hu;break;case"i":i.fontStyle=ss;break;case"u":i.textDecoration.push(_o);break;case"font":(l=e.attributes.color)&&(i.color=l);break;case"div":if(l=e.attributes.time,!l)break;(l=is(l))&&(i.startTime=l);break;case"ruby":case"rp":case"rt":i.rubyTag=l}}if(r=e.children,rs(e)||r.length==1&&rs(r[0]))for(n=Cn(e).split(`
|
||
`),e=!0,n=A(n),r=n.next();!r.done;r=n.next())r=r.value,e||(e=nr(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&(e=i.clone(),e.payload=wi(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),t=A(r),e=t.next();!e.done;e=t.next())Yp(e.value,i,n)}function Vu(e,t){return e&&0<e.length?e:t}Me("shaka.text.Cue",Ft),Ft.parseCuePayload=bc,Ft.equal=nu,Ft.prototype.clone=Ft.prototype.clone;var zf="auto";Ft.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:zf};var zi="center",Ic={LEFT:"left",RIGHT:"right",CENTER:zi,START:"start",END:"end"};Ft.textAlign=Ic;var vl="after",Ff={BEFORE:"before",CENTER:"center",AFTER:vl};Ft.displayAlign=Ff;var as="ltr";Ft.direction={HORIZONTAL_LEFT_TO_RIGHT:as,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mr="horizontal-tb";Ft.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Lo=0;Ft.lineInterpretation={LINE_NUMBER:Lo,PERCENTAGE:1};var ml="start",Xf={CENTER:"center",START:ml,END:"end"};Ft.lineAlign=Xf;var iu={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ft.defaultTextColor=iu;var Wp={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ft.defaultTextBackgroundColor=Wp;var Qp=400,Hu=700;Ft.fontWeight={NORMAL:Qp,BOLD:Hu};var Jp="normal",ss="italic",hg={NORMAL:Jp,ITALIC:ss,OBLIQUE:"oblique"};Ft.fontStyle=hg;var _o="underline";Ft.textDecoration={UNDERLINE:_o,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var yg=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Uo(){}Uo.prototype.destroy=function(){};function fi(e,t,n){ir.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,se:t})}function Sl(e,t){for(var n=e.toLowerCase().split(";")[0],i=A([Oc,Dc,ru,di]),r=i.next();!r.done;r=i.next())if(r=ir.get(n+"-"+r.value)){var l=r.se(),c=l.isSupported(e,t);if(l.destroy(),c)return r.se}return null}Me("shaka.transmuxer.TransmuxerEngine",Uo),Uo.findTransmuxer=Sl,Uo.unregisterTransmuxer=function(e,t){ir.delete(e.toLowerCase().split(";")[0]+"-"+t)},Uo.registerTransmuxer=fi,Uo.prototype.destroy=Uo.prototype.destroy;var ir=new Map,di=1,ru=2,Dc=3,Oc=4;Uo.PluginPriority={FALLBACK:di,PREFERRED_SECONDARY:ru,PREFERRED:Dc,APPLICATION:Oc};function cs(){}function dn(e,t){var n=e;return t&&!lo.includes(e)&&(n+='; codecs="'+t+'"'),n}function oo(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Yf(e,t,n){var i=dn(e,t);return t=oo(e,t),Sl(t)?(e=Sl(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?i.replace("video","audio"):i,n}function Wf(e,t,n){var i=[t];return Ku.forEach(function(r,l){var c=e[l];l=="codecs"?lo.includes(e.mimeType)||i.push('codecs="'+n+'"'):c&&i.push(r+'="'+c+'"')}),e.hdr=="PQ"&&i.push('eotf="smpte2084"'),i.join(";")}function Tl(e){return e.split(";")[0].split("/")[1]}function pi(e){var t=kc(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function ii(e){var t=[];e=A(e.split(","));for(var n=e.next();!n.done;n=e.next())n=kc(n.value),t.push(n[0]);return t.sort().join(",")}function Di(e){return e.split(";")[0]}function _n(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Qf(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function kc(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Me("shaka.util.MimeUtils",cs),cs.getFullTypeWithAllCodecs=oo,cs.getFullType=dn;var Ku=new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),lo=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function uo(e){this.i=null,this.j=e,this.B=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function Dn(e,t){Tr.set(e,t)}function wl(e){return Tr.get(e)}function xl(e){return Tr.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!$a:!1}uo.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function Jf(e,t,n,i,r){var l,c,f,h,v,S,T;return G(function(b){if(b.g==1)return L(b,Promise.resolve(),2);if(!e.i||!e.j)return b.return();if(n==null||i==null)return e.i.parseInit(Je(t)),b.return();for(l=e.B?n:e.u,c={periodStart:e.u,segmentStart:n,segmentEnd:i,vttOffset:l},f=e.i.parseMedia(Je(t),c,r,[]),h=A(f),v=h.next();!v.done;v=h.next())S=v.value,e.A(S,r||null,c);T=f.filter(function(I){return I.startTime>=e.l&&I.startTime<e.m}),e.j.append(T),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),ce(b)})}uo.prototype.remove=function(e,t){var n=this;return G(function(i){if(i.g==1)return L(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),ce(i)})};function Pr(e,t,n){e.l=t,e.m=n}function Sr(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=A(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(l){return l.endTime<=n}))&&e.j.append(r)}function ou(e,t,n){t.startTime+=n,t.endTime+=n,t=A(t.nestedCues);for(var i=t.next();!i.done;i=t.next())ou(e,i.value,n)}function El(e,t,n,i,r){var l=n+" "+i,c=new Map;t=A(t);for(var f=t.next();!f.done;f=t.next()){var h=f.value;f=h.stream,h=h.cue,c.has(f)||c.set(f,new Map),c.get(f).has(l)||c.get(f).set(l,[]),ou(e,h,r),h.startTime>=e.l&&h.startTime<e.m&&(c.get(f).get(l).push(h),f==e.C&&e.j.append([h]))}for(r=A(c.keys()),l=r.next();!l.done;l=r.next())for(l=l.value,e.o.has(l)||e.o.set(l,new Map),t=A(c.get(l).keys()),f=t.next();!f.done;f=t.next())f=f.value,h=c.get(l).get(f),e.o.get(l).set(f,h);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}Me("shaka.text.TextEngine",uo),uo.prototype.destroy=uo.prototype.destroy,uo.findParser=wl,uo.unregisterParser=function(e){Tr.delete(e)},uo.registerParser=Dn;var Tr=new Map;function qu(e,t){return e.concat(t)}function gg(){}function jo(e){return e!=null}function Gu(e,t){return Promise.race([t,new Promise(function(n,i){new ct(i).da(e)})])}function bn(){}function En(e,t){return e=At(e),t=At(t),e.split("-")[0]==t.split("-")[0]}function Xt(e,t){return e=At(e),t=At(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function Al(e,t){return e=At(e),t=At(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function At(e){e=A(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=A(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=fs.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function Cl(e,t){return e=At(e),t=At(t),t==e?4:Xt(t,e)?3:Al(t,e)?2:Xt(e,t)?1:0}function bl(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=fs.get(e)||e}function Zf(e){return e.language?At(e.language):e.audio&&e.audio.language?At(e.audio.language):e.video&&e.video.language?At(e.video.language):"und"}function Mc(e,t){e=At(e);var n=new Set;t=A(t);for(var i=t.next();!i.done;i=t.next())n.add(At(i.value));for(t=A(n),i=t.next();!i.done;i=t.next())if(i=i.value,i==e)return i;for(t=A(n),i=t.next();!i.done;i=t.next())if(i=i.value,Xt(i,e))return i;for(t=A(n),i=t.next();!i.done;i=t.next())if(i=i.value,Al(i,e))return i;for(n=A(n),t=n.next();!t.done;t=n.next())if(t=t.value,Xt(e,t))return t;return null}Me("shaka.util.LanguageUtils",bn),bn.findClosestLocale=Mc,bn.getLocaleForVariant=Zf,bn.getLocaleForText=function(e){return At(e.language||"und")},bn.getBase=bl,bn.relatedness=Cl,bn.areSiblings=function(e,t){var n=bl(e),i=bl(t);return e!=n&&t!=i&&n==i},bn.normalize=At,bn.isSiblingOf=Al,bn.isParentOf=Xt,bn.areLanguageCompatible=En,bn.areLocaleCompatible=function(e,t){return e=At(e),t=At(t),e==t};var fs=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ds(){}function Zp(e,t,n,i,r){function l(_){var B=String(_.width||"")+String(_.height||"")+String(Math.round(_.frameRate||0))+(_.hdr||"")+_.fastSwitching;return _.dependencyStream&&(B+=_.dependencyStream.baseOriginalId||""),B}function c(_){var B=_.language+(_.channelsCount||0)+(_.audioSamplingRate||0)+_.roles.join(",")+_.label+_.groupId+_.fastSwitching;return _.dependencyStream&&(B+=_.dependencyStream.baseOriginalId||""),B}if(r.length){var f=e.textStreams;r=A(r);for(var h=r.next(),v={};!h.done;v={sg:void 0},h=r.next())if(v.sg=h.value,h=f.filter(function(_){return function(B){return!!(B.codecs.startsWith(_.sg)||B.mimeType.startsWith(_.sg))}}(v)),h.length){f=h;break}e.textStreams=f}if(f=e.variants,(t.length||n.length)&&(f=Rc(f,t,n)),i.length){for(t=new Fl,n=A(f),f=n.next();!f.done;f=n.next())f=f.value,t.push(String(f.video.width||0),f);var S=[];t.forEach(function(_,B){_=0;var F=[];B=A(B);for(var z=B.next(),J={};!z.done;J={Pe:void 0},z=B.next())J.Pe=z.value,z=i.filter(function(q){return function(K){return q.Pe.decodingInfos[0][K]}}(J)).length,z>_?(_=z,F=[J.Pe]):z==_&&F.push(J.Pe);S.push.apply(S,te(F))}),f=S}for(n=new Set,t=new Set,f=A(f),r=f.next();!r.done;r=f.next())r=r.value,r.audio&&n.add(r.audio),r.video&&t.add(r.video);f=Array.from(n).sort(function(_,B){return _.bandwidth-B.bandwidth});var T=[];for(n=new Map,f=A(f),r=f.next();!r.done;r=f.next()){if(r=r.value,h=c(r),v=n.get(h)||[],v.length){var b=v[v.length-1],I=pi(b.codecs),O=pi(r.codecs);I!=O||r.bandwidth&&b.bandwidth&&!(r.bandwidth>b.bandwidth)||(v.push(r),T.push(r.id))}else v.push(r),T.push(r.id);n.set(h,v)}var P={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};f=Array.from(t).sort(function(_,B){if(!_.bandwidth||!B.bandwidth||_.bandwidth==B.bandwidth){if(_.codecs&&B.codecs&&_.codecs!=B.codecs&&_.width==B.width){var F=pi(_.codecs),z=pi(B.codecs);if(F!=z)return(P[F]||1)-(P[z]||1)}return _.width-B.width}return _.bandwidth-B.bandwidth}),t=pl();var N=[];for(n=new Map,f=A(f),r=f.next();!r.done;r=f.next()){if(r=r.value,h=l(r),v=n.get(h)||[],v.length){if(b=v[v.length-1],!t&&(I=pi(b.codecs),O=pi(r.codecs),I!==O))continue;I=pi(b.codecs),O=pi(r.codecs),I!=O||r.bandwidth&&b.bandwidth&&!(r.bandwidth>b.bandwidth)||(v.push(r),N.push(r.id))}else v.push(r),N.push(r.id);n.set(h,v)}e.variants=e.variants.filter(function(_){var B=_.audio;return _=_.video,!(B&&!T.includes(B.id)||_&&!N.includes(_.id))})}function Rc(e,t,n){t=A(t);for(var i=t.next(),r={};!i.done;r={Lh:void 0},i=t.next())if(r.Lh=i.value,i=e.filter(function(l){return function(c){return c.video&&c.video.codecs.startsWith(l.Lh)}}(r)),i.length){e=i;break}for(n=A(n),t=n.next(),i={};!t.done;i={Cg:void 0},t=n.next())if(i.Cg=t.value,t=e.filter(function(l){return function(c){return c.audio&&c.audio.codecs.startsWith(l.Cg)}}(i)),t.length){e=t;break}return e}function $p(e,t,n){e.variants=e.variants.filter(function(i){return Bo(i,t,n)})}function Bo(e,t,n){function i(f,h,v){return f>=h&&f<=v}var r=e.video;if(r&&r.width&&r.height){var l=r.width,c=r.height;if(c>l&&(c=A([c,l]),l=c.next().value,c=c.next().value),!i(l,t.minWidth,Math.min(t.maxWidth,n.width))||!i(c,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,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 Il(e,t,n,i){return n=n===void 0?[]:n,i=i===void 0?{}:i,G(function(r){return r.g==1?L(r,Dl(e,t,0<t.offlineSessionIds.length,n,i),2):(vg(t),L(r,i0(t),0))})}function Dl(e,t,n,i,r){var l,c;return G(function(f){if(f.g==1)return $i()&&Ol(t.variants),L(f,Pc(t.variants,n,!1,i),2);l=null,e&&(c=e.h)&&(l=c.keySystem),t.variants=t.variants.filter(function(h){var v=eh(h,l,r);if(!v){var S=[];h.audio&&S.push(uu(h.audio)),h.video&&S.push(uu(h.video))}return v}),ce(f)})}function Ol(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=A(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&n.add(i.video);for(n=A(n),e=n.next();!e.done;e=n.next()){e=e.value,i=A(t);for(var r=i.next();!r.done;r=i.next()){var l=A(r.value);if(r=l.next().value,l=l.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,l);break}}}}function eh(e,t,n){if(!e.decodingInfos.some(function(h){return!(!h.supported||t&&(h=h.keySystemAccess)&&(n[h.keySystem]||h.keySystem)!=t)}))return!1;var i=$i(),r=Vt("Firefox")&&sl(),l=e.video,c=l&&l.width||0,f=l&&l.height||0;return i&&l&&(1920<c||1080<f)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3."))||(i=l&&l.dependencyStream)&&!ag(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function $f(e,t){var n,i,r,l,c,f,h;return G(function(v){if(v.g==1){for(n=function(S,T){if(S){var b=ju(S);return b.supported=S.supported&&T.supported,b.powerEfficient=S.powerEfficient&&T.powerEfficient,b.smooth=S.smooth&&T.smooth,T.keySystemAccess&&!b.keySystemAccess&&(b.keySystemAccess=T.keySystemAccess),b}return T},i=null,r=[],l=A(t),c=l.next(),f={};!c.done;f={cache:void 0,Rd:void 0},c=l.next())h=c.value,f.Rd=jp(h),f.cache=Wu,f.cache.has(f.Rd)?i=n(i,f.cache.get(f.Rd)):r.push(Nc(h).then(function(S){return function(T){var b=null;T=A(T||[]);for(var I=T.next();!I.done;I=T.next())b=n(b,I.value);b&&(S.cache.set(S.Rd,b),i=n(i,b))}}(f)));return L(v,Promise.all(r),2)}i&&e.decodingInfos.push(i),ce(v)})}function Nc(e){var t=[""];e.video&&(t=_n(e.video.contentType).split(","));var n=[""];e.audio&&(n=_n(e.audio.contentType).split(","));var i=[];t=A(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var l=A(n),c=l.next(),f={};!c.done;f={pc:void 0},c=l.next())c=c.value,f.pc=io(e),e.video&&(f.pc.video.contentType=dn(Di(f.pc.video.contentType),r)),e.audio&&(f.pc.audio.contentType=dn(Di(f.pc.audio.contentType),c)),i.push(new Promise(function(h){return function(v,S){(sl()?Gu(5,navigator.mediaCapabilities.decodingInfo(h.pc)):navigator.mediaCapabilities.decodingInfo(h.pc)).then(function(T){v(T)}).catch(S)}}(f)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Pc(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J;return G(function(q){switch(q.g){case 1:if(e.some(function(K){return K.decodingInfos.length}))return q.return();r=A(i),l=r.next(),c={};case 2:if(l.done){q.s(4);break}c.mh=l.value,f=!1,h=A(e),v=h.next();case 5:if(v.done){q.s(7);break}S=v.value,T=lu(S,t,n).filter(function(K){return function(W){return W=W[0],(W.keySystemConfiguration&&W.keySystemConfiguration.keySystem)===K.mh}}(c)),b=A(T),I=b.next();case 8:if(I.done){q.s(10);break}return O=I.value,L(q,$f(S,O),9);case 9:I=b.next(),q.s(8);break;case 10:S.decodingInfos.length&&(f=!0),v=h.next(),q.s(5);break;case 7:if(f)return q.return();c={mh:void 0},l=r.next(),q.s(2);break;case 4:P=A(e),N=P.next();case 12:if(N.done){q.s(0);break}_=N.value,B=lu(_,t,n).filter(function(K){return K=K[0],K=K.keySystemConfiguration&&K.keySystemConfiguration.keySystem,!K||!i.includes(K)}),F=A(B),z=F.next();case 15:if(z.done){N=P.next(),q.s(12);break}return J=z.value,L(q,$f(_,J),16);case 16:z=F.next(),q.s(15)}})}function lu(e,t,n){var i=e.audio,r=e.video,l=[],c=[];if(r)for(var f=A(r.fullMimeTypes),h=f.next();!h.done;h=f.next()){h=h.value;var v=_n(h);if(v.includes(",")&&!i){var S=v.split(","),T=Di(h);v=$l("video",S),S=$l("audio",S),S=ri(S,T),T=Yf(T,S,"audio"),c.push({contentType:T,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(v=ps(v),h={contentType:Yf(Di(h),v,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":h.transferFunction="srgb";break;case"PQ":h.transferFunction="pq";break;case"HLG":h.transferFunction="hlg"}r.colorGamut&&(h.colorGamut=r.colorGamut),l.push(h)}if(i)for(f=A(i.fullMimeTypes),h=f.next();!h.done;h=f.next())v=h.value,h=Di(v),v=ri(_n(v),h),h=Yf(h,v,"audio"),c.push({contentType:h,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(f=[],l.length==0&&l.push(null),c.length==0&&c.push(null),l=A(l),h=l.next();!h.done;h=l.next())for(h=h.value,v=A(c),T=v.next();!T.done;T=v.next())T=T.value,S={type:n?"file":"media-source"},h&&(S.video=h),T&&(S.audio=T),f.push(S);if(c=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!c.length)return[f];for(e=[],n=new Map,c=A(c),l=c.next();!l.done;l=c.next())l=l.value,n.get(l.keySystem)||n.set(l.keySystem,[]),n.get(l.keySystem).push(l);for(c=t?"required":"optional",t=t?["persistent-license"]:["temporary"],l=A(n.keys()),h=l.next();!h.done;h=l.next()){for(h=h.value,T=n.get(h),v=new Map,T=A(T),S=T.next();!S.done;S=T.next()){S=S.value;var b=S.videoRobustness+","+S.audioRobustness;v.get(b)||v.set(b,[]),v.get(b).push(S)}for(v=A(v.values()),T=v.next();!T.done;T=v.next()){T=T.value,S=[],b=A(f);for(var I=b.next();!I.done;I=b.next()){I=Object.assign({},I.value);for(var O={keySystem:h,initDataType:"cenc",persistentState:c,distinctiveIdentifier:"optional",sessionTypes:t},P=A(T),N=P.next();!N.done;N=P.next()){if(N=N.value,N.initData&&N.initData.length){for(var _=new Set,B=A(N.initData),F=B.next();!F.done;F=B.next())_.add(F.value.initDataType);O.initDataType=N.initData[0].initDataType}N.distinctiveIdentifierRequired&&(O.distinctiveIdentifier="required"),N.persistentStateRequired&&(O.persistentState="required"),N.sessionType&&(O.sessionTypes=[N.sessionType]),i&&(O.audio?(N.encryptionScheme&&(O.audio.encryptionScheme=O.audio.encryptionScheme||N.encryptionScheme),O.audio.robustness=O.audio.robustness||N.audioRobustness):(O.audio={robustness:N.audioRobustness},N.encryptionScheme&&(O.audio.encryptionScheme=N.encryptionScheme)),O.audio.robustness==""&&delete O.audio.robustness),r&&(O.video?(N.encryptionScheme&&(O.video.encryptionScheme=O.video.encryptionScheme||N.encryptionScheme),O.video.robustness=O.video.robustness||N.videoRobustness):(O.video={robustness:N.videoRobustness},N.encryptionScheme&&(O.video.encryptionScheme=N.encryptionScheme)),O.video.robustness==""&&delete O.video.robustness)}I.keySystemConfiguration=O,S.push(I)}e.push(S)}}return e}function ri(e,t){return e.toLowerCase()=="flac"?ni()?"fLaC":"flac":e.toLowerCase()==="opus"?ni()&&Tl(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&eo()?"ec-3":e}function ps(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function vg(e){e.textStreams=e.textStreams.filter(function(t){return t=dn(t.mimeType,t.codecs),xl(t)})}function i0(e){var t,n,i,r,l,c,f;return G(function(h){switch(h.g){case 1:t=[],n=A(e.imageStreams),i=n.next();case 2:if(i.done){h.s(4);break}if(r=i.value,l=r.mimeType,l=="application/mp4"&&r.codecs=="mjpg"&&(l="image/jpg"),au.has(l)){h.s(5);break}if(c=Tg.get(l),!c){au.set(l,!1),h.s(5);break}return L(h,r0(c),7);case 7:f=h.h,au.set(l,f);case 5:au.get(l)&&t.push(r),i=n.next(),h.s(2);break;case 4:e.imageStreams=t,ce(h)}})}function r0(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(n.height===2)}})}function zu(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,l=t?t.codecs:null,c=n?n.codecs:null,f=t?t.groupId:null,h=[];n&&h.push(n.mimeType),t&&h.push(t.mimeType),h=h[0]||null;var v=[];t&&v.push(t.kind),n&&v.push(n.kind),v=v[0]||null;var S=new Set;if(t)for(var T=A(t.roles),b=T.next();!b.done;b=T.next())S.add(b.value);if(n)for(T=A(n.roles),b=T.next();!b.done;b=T.next())S.add(b.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:v,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:h,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:l,videoCodec:c,primary:e.primary,roles:Array.from(S),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:f,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),c.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=c.split(",");try{e.videoCodec=$l("video",n),e.audioCodec=$l("audio",n)}catch{}}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,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function Un(e){return{id:e.id,active:!1,type:ot,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function Lc(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=Bn(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&t!=null&&(t/=Number(r.split("x")[0])),r&&n!=null&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function Fu(e){return e.__shaka_id||(e.__shaka_id=Sg++),e.__shaka_id}function hs(e){var t=Xu(e);return t.active=e.mode!="disabled",t.type="text",t.originalTextId=e.id,e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),e.kind=="forced"&&(t.forced=!0),t}function _c(e){var t=Xu(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,e.kind=="main"&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function Xu(e){var t=e.language;return{id:Fu(e),active:!1,type:"",bandwidth:0,language:At(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function Vo(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function ed(e){return e.filter(function(t){return Vo(t)})}function Yu(e,t,n,i){var r=e,l=e.filter(function(h){return h.primary});l.length&&(r=l);var c=r.length?r[0].language:"";if(r=r.filter(function(h){return h.language==c}),t){var f=Mc(At(t),e.map(function(h){return h.language}));f&&(r=e.filter(function(h){return At(h.language)==f}))}if(r=r.filter(function(h){return h.forced==i}),n){if(e=mg(r,n),e.length)return e}else if(e=r.filter(function(h){return h.roles.length==0}),e.length)return e;return e=r.map(function(h){return h.roles}).reduce(qu,[]),e.length?mg(r,e[0]):r}function mg(e,t){return e.filter(function(n){return n.roles.includes(t)})}function th(e,t){t.length&&(t=t.filter(function(n){return pi(e.codecs)==pi(n.codecs)}).sort(function(n,i){return n.bandwidth&&i.bandwidth&&n.bandwidth!=i.bandwidth?n.bandwidth-i.bandwidth:(n.width||0)-(i.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function uu(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function td(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var i=At(n.preferredTextLanguage);return t=At(t.language),n.autoShowText==2?En(t,i):n.autoShowText==3?e?(e=At(e.language),En(t,i)&&!En(e,t)):!1:(Et("Invalid autoShowText setting!"),!1)}Me("shaka.util.StreamUtils",ds),ds.meetsRestrictions=Bo;var Wu=new Map,Sg=0,au=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Tg=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Qt(){var e=this;this.G=null,this.o=!1,this.m=new Zi,this.j=new yt,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new Zi,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.u=null,this.A=new ct(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=E,"documentPictureInPicture"in E&&this.j.D(E.documentPictureInPicture,"enter",function(){e.B=E.documentPictureInPicture.window,e.A&&e.A.sb(),e.j.ma(e.B,"pagehide",function(){e.B=E,e.A&&e.A.sb()})}),this.C=this.i=null}y=Qt.prototype,y.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},y.release=function(){this.j.release(),this.A=null},y.init=function(e){this.G=e},y.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if(n=this.F.filter(function(v){return v&&!(v.audio&&v.audio.fastSwitching||v.video&&v.video.fastSwitching)}),n.length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(v){return v&&!!(v.audio&&v.audio.fastSwitching||v.video&&v.video.fastSwitching)})),n=id(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=rd(n),n=A(n),r=n.next();!r.done;r=n.next())if(r=r.value,r.height>=e&&r.width>=t){e=r.height,t=r.width;break}n=id(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=id(this,null,i,1/0,1/0),n=[n[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var l=isNaN(this.H)?1:Math.abs(this.H),c=l*r.bandwidth/this.g.bandwidthDowngradeTarget,f={bandwidth:1/0},h=i+1;h<n.length;h++)if(r.bandwidth!=n[h].bandwidth){f=n[h];break}l=l*f.bandwidth/this.g.bandwidthUpgradeTarget,e>=c&&e<=l&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.u=Date.now(),t},y.enable=function(){this.o=!0},y.disable=function(){this.o=!1},y.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&this.u!=null&&this.o&&nd(this))},y.trySuggestStreams=function(){this.u!=null&&this.o&&nd(this)},y.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},y.setVariants=function(e){this.F=e},y.playbackRateChanged=function(e){this.H=e},y.setMediaElement=function(e){function t(){n.A.da(wg)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in E&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(i){i.pictureInPictureWindow&&(n.i=i.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.Ja(n.i,"resize",t),n.i=null})},y.setCmsdManager=function(e){this.C=e},y.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function nd(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function id(e,t,n,i,r){if(e.C){var l=e.C.Ug();l&&(n=n.filter(function(c){return c.bandwidth&&l?c.bandwidth<=l:!0}))}return t&&(n=n.filter(function(c){return Bo(c,t,{width:r,height:i})})),n.sort(function(c,f){return c.bandwidth-f.bandwidth})}function rd(e){var t=[];e=A(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(i,r){return i.width-r.width})}Me("shaka.abr.SimpleAbrManager",Qt),Qt.prototype.configure=Qt.prototype.configure,Qt.prototype.setCmsdManager=Qt.prototype.setCmsdManager,Qt.prototype.setMediaElement=Qt.prototype.setMediaElement,Qt.prototype.playbackRateChanged=Qt.prototype.playbackRateChanged,Qt.prototype.setVariants=Qt.prototype.setVariants,Qt.prototype.getBandwidthEstimate=Qt.prototype.getBandwidthEstimate,Qt.prototype.trySuggestStreams=Qt.prototype.trySuggestStreams,Qt.prototype.segmentDownloaded=Qt.prototype.segmentDownloaded,Qt.prototype.disable=Qt.prototype.disable,Qt.prototype.enable=Qt.prototype.enable,Qt.prototype.chooseVariant=Qt.prototype.chooseVariant,Qt.prototype.init=Qt.prototype.init,Qt.prototype.release=Qt.prototype.release,Qt.prototype.stop=Qt.prototype.stop;var wg=1;Me("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function ys(e,t){var n=Lr();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function nh(e){var t,n;return G(function(i){if(i.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new Y(2,7,1010);return t=e.g,e.g++,t==0?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),L(i,new Promise(function(r){new ct(r).da(n/1e3)}),2))}e.h*=e.m,ce(i)})}function Lr(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function It(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}It.prototype.resolve=function(){},It.prototype.reject=function(){};function pn(e,t){this.promise=e,this.i=t,this.g=null}function kl(e){return new pn(Promise.reject(e),function(){return Promise.resolve()})}function Ho(){var e=Promise.reject(new Y(2,7,7001));return e.catch(function(){}),new pn(e,function(){return Promise.resolve()})}function wr(e){return new pn(Promise.resolve(e),function(){return Promise.resolve()})}function gs(e){return new pn(e,function(){return e.catch(function(){})})}pn.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function od(e){return new pn(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}pn.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},pn.prototype.Ha=function(e,t){function n(f){return function(h){if(r.g&&f)l.reject(c);else{var v=f?e:t;v?i=ih(v,h,l):(f?l.resolve:l.reject)(h)}}}function i(){return l.reject(c),r.abort()}var r=this,l=new It;l.catch(function(){});var c=new Y(2,7,7001);return this.promise.then(n(!0),n(!1)),new pn(l,function(){return i()})};function ih(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(r){return n.reject(r),function(){return Promise.resolve()}}}m.Object.defineProperties(pn.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Me("shaka.util.AbortableOperation",pn),pn.prototype.chain=pn.prototype.Ha,pn.prototype.finally=pn.prototype.finally,pn.all=od,pn.prototype.abort=pn.prototype.abort,pn.notAbortable=gs,pn.completed=wr,pn.aborted=Ho,pn.failed=kl;function Ie(e,t){if(t)if(t instanceof Map)for(var n=A(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],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=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function vs(e){var t=new Ie(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}Ie.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},Ie.prototype.stopImmediatePropagation=function(){this.g=!0},Ie.prototype.stopPropagation=function(){},Me("shaka.util.FakeEvent",Ie);var Uc={Oj:"abrstatuschanged",Pj:"adaptation",Qj:"audiotrackchanged",Rj:"audiotrackschanged",Sj:"boundarycrossed",Tj:"buffering",Uj:"complete",Vj:"downloadcompleted",Wj:"downloadfailed",Xj:"downloadheadersreceived",Yj:"drmsessionupdate",$j:"emsg",uk:"prft",Error:"error",ak:"expirationupdated",bk:"firstquartile",ck:"gapjumped",fk:"keystatuschanged",jk:"loaded",kk:"loading",mk:"manifestparsed",nk:"manifestupdated",pk:"mediaqualitychanged",qk:"mediasourcerecovered",Metadata:"metadata",rk:"midpoint",sk:"nospatialvideoinfo",tk:"onstatechange",vk:"ratechange",xk:"segmentappended",yk:"sessiondata",zk:"spatialvideoinfo",Ak:"stalldetected",Bk:"started",Ck:"statechanged",Dk:"streaming",Ek:"textchanged",Fk:"texttrackvisibility",Gk:"thirdquartile",Hk:"timelineregionadded",Ik:"timelineregionenter",Jk:"timelineregionexit",Kk:"trackschanged",Mk:"unloading",Ok:"variantchanged"};function Nt(){this.Ea=new Fl,this.Ge=this}Nt.prototype.addEventListener=function(e,t){this.Ea&&this.Ea.push(e,t)},Nt.prototype.removeEventListener=function(e,t){this.Ea&&this.Ea.remove(e,t)},Nt.prototype.dispatchEvent=function(e){if(!this.Ea)return!0;var t=this.Ea.get(e.type)||[],n=this.Ea.get("All");for(n&&(t=t.concat(n)),t=A(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Ge,e.currentTarget=this.Ge;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},Nt.prototype.release=function(){this.Ea=null};function ao(){this.g=[]}function Ko(e,t){e.g.push(t.finally(function(){Rr(e.g,t)}))}ao.prototype.destroy=function(){for(var e=[],t=A(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function Kt(e,t,n,i,r,l,c){Nt.call(this),this.i=!1,this.u=new ao,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=i||null,this.G=r||null,this.I=l||null,this.H=c||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}nt(Kt,Nt),y=Kt.prototype,y.kg=function(e){this.B=e},y.lg=function(e){this.A=e};function so(e,t,n,i){i=i===void 0?!1:i,n=n||ms;var r=Ml.get(e);(!r||n>=r.priority)&&Ml.set(e,{priority:n,se:t,ij:i})}function ld(e,t){for(var n=A(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(e=A(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}y.lj=function(e){this.g.add(e)},y.Hj=function(e){this.g.delete(e)},y.$h=function(){this.g.clear()},y.mj=function(e){this.h.add(e)},y.Ij=function(e){this.h.delete(e)},y.ai=function(){this.h.clear()},y.Hg=function(){this.j.clear()};function un(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:n===void 0?null:n}}y.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),Nt.prototype.release.call(this),this.u.destroy()},y.request=function(e,t,n){var i=this,r=new Qu;if(this.i){var l=Promise.reject(new Y(2,7,7001));return l.catch(function(){}),new qo(l,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?io(t.retryParameters):Lr(),t.uris=io(t.uris),l=Lt(this,e,t,n);var c=l.Ha(function(){return hn(i,e,t,n,new ys(t.retryParameters,!1),0,null,r)}),f=c.Ha(function(b){return oi(i,e,b,n)}),h=Date.now(),v=0;l.promise.then(function(){v=Date.now()-h},function(){});var S=0;c.promise.then(function(){S=Date.now()},function(){});var T=f.Ha(function(b){var I=Date.now()-S,O=b.response;return O.timeMs+=v,O.timeMs+=I,b.Oi||!i.m||O.fromCache||t.method=="HEAD"||e!=Fi||i.m(O.timeMs,O.data.byteLength,jc(n)),i.H&&i.H(e,O,n),O},function(b){throw b&&(b.severity=2),b});return l=new qo(T.promise,function(){return T.abort()},r),Ko(this.u,l),l};function Lt(e,t,n,i){function r(f){l=l.Ha(function(){return n.body&&(n.body=yr(n.body)),f(t,n,i)})}var l=wr(void 0);e.G&&r(e.G),e=A(e.g);for(var c=e.next();!c.done;c=e.next())r(c.value);return l.Ha(void 0,function(f){throw f instanceof Y&&f.code==7001?f:new Y(2,1,1006,f)})}function hn(e,t,n,i,r,l,c,f){e.B&&(n.uris[l]=n.uris[l].replace("https://","http://")),e.A&&(n.uris[l]=n.uris[l].replace("http://","https://")),0<l&&e.I&&e.I(t,i,n.uris[l],n.uris[l-1]);var h=new fn(n.uris[l]),v=h.Kb,S=!1;v||(v=location.protocol,v=v.slice(0,-1),yc(h,v),n.uris[l]=h.toString()),v=v.toLowerCase();var T=(v=Ml.get(v))?v.se:null;if(!T)return kl(new Y(2,1,1e3,h));var b=v.ij;(h=e.j.get(h.nb))&&(n.headers["common-access-token"]=h);var I=null,O=null,P=!1,N=!1,_;return gs(nh(r)).Ha(function(){if(e.i)return Ho();_=Date.now();var B=0;n.requestStartTime=Date.now();var F=T(n.uris[l],n,t,function(q,K,W){I&&I.stop(),O&&O.da(J/1e3),e.m&&t==Fi&&(B++,n.packetNumber=B,e.m(q,K,jc(i),n),S=!0,f.g=W)},function(q){N=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.l&&e.l(q,n,t)},{minBytesForProgressEvents:e.o});if(!b)return F;var z=n.retryParameters.connectionTimeout;z&&(I=new ct(function(){P=!0,F.abort()}),I.da(z/1e3));var J=n.retryParameters.stallTimeout;return J&&(O=new ct(function(){P=!0,F.abort()})),F}).Ha(function(B){I&&I.stop(),O&&O.stop(),B.timeMs==null&&(B.timeMs=Date.now()-_);var F=B.headers["common-access-token"];if(F){var z=new fn(B.uri);e.j.set(z.nb,F)}return F={response:B,Oi:S},!N&&e.l&&e.l(B.headers,n,t),e.C&&e.C(n,B),F},function(B){if(I&&I.stop(),O&&O.stop(),e.F){var F=null,z=0;B instanceof Y&&(F=B,B.code==1001&&(z=B.data[1])),e.F(n,F,z,P)}if(e.i)return Ho();if(P&&(B=new Y(1,1,1003,n.uris[l],t)),B instanceof Y){if(B.code==7001)throw B;if(B.code==1010)throw c;if(B.severity==1){if(F=new Map().set("error",B),F=new Ie("retry",F),F.cancelable=!0,e.dispatchEvent(F),F.defaultPrevented)throw B;return l=(l+1)%n.uris.length,hn(e,t,n,i,r,l,B,f)}}throw B})}function oi(e,t,n,i){var r=wr(void 0);e=A(e.h);for(var l=e.next(),c={};!l.done;c={ph:void 0},l=e.next())c.ph=l.value,r=r.Ha(function(f){return function(){var h=n.response;return h.data&&(h.data=yr(h.data)),(0,f.ph)(t,h,i)}}(c));return r.Ha(function(){return n},function(f){var h=2;if(f instanceof Y){if(f.code==7001)throw f;h=f.severity}throw new Y(h,1,1007,f)})}function jc(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Me("shaka.net.NetworkingEngine",Kt),Kt.prototype.request=Kt.prototype.request,Kt.prototype.destroy=Kt.prototype.destroy,Kt.makeRequest=un,Kt.defaultRetryParameters=function(){return Lr()},Kt.prototype.clearCommonAccessTokenMap=Kt.prototype.Hg,Kt.prototype.clearAllResponseFilters=Kt.prototype.ai,Kt.prototype.unregisterResponseFilter=Kt.prototype.Ij,Kt.prototype.registerResponseFilter=Kt.prototype.mj,Kt.prototype.clearAllRequestFilters=Kt.prototype.$h,Kt.prototype.unregisterRequestFilter=Kt.prototype.Hj,Kt.prototype.registerRequestFilter=Kt.prototype.lj,Kt.unregisterScheme=function(e){Ml.delete(e)},Kt.registerScheme=so,Kt.prototype.setForceHTTPS=Kt.prototype.lg,Kt.prototype.setForceHTTP=Kt.prototype.kg;function Qu(){this.g=0}Kt.NumBytesRemainingClass=Qu;function qo(e,t,n){pn.call(this,e,t),this.h=n}nt(qo,pn),Kt.PendingRequest=qo;var Fi=1;Kt.RequestType={MANIFEST:0,SEGMENT:Fi,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Kt.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var ms=3;Kt.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ms};var Ml=new Map;function Ss(e){this.g=!1,this.h=new It,this.i=e}Ss.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function at(e,t){if(e.g)throw t instanceof Y&&t.code==7003?t:new Y(2,7,7003,t)}function Bc(e,t){var n=[];e=A(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function rh(e,t){e=A(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function su(e){for(var t=new Map,n=A(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function ud(e){var t={};return e.forEach(function(n,i){t[i]=n}),t}function Yt(e,t){this.h=Ti(e),this.i=t==ad,this.g=0}y=Yt.prototype,y.ta=function(){return this.g<this.h.byteLength},y.Ba=function(){return this.g},y.getLength=function(){return this.h.byteLength},y.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw co()}},y.na=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw co()}},y.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw co()}},y.$f=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw co()}},y.bd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw co()}if(2097151<t)throw new Y(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},y.Cb=function(e){if(this.g+e>this.h.byteLength)throw co();var t=Je(this.h,this.g,e);return this.g+=e,t},y.skip=function(e){if(this.g+e>this.h.byteLength)throw co();this.g+=e},y.qh=function(e){if(this.g<e)throw co();this.g-=e},y.seek=function(e){if(0>e||e>this.h.byteLength)throw co();this.g=e},y.Cc=function(){for(var e=this.g;this.ta()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=Je(this.h,e,this.g-e),this.g+=1,Zt(e)};function co(){return new Y(2,3,3e3)}Me("shaka.util.DataViewReader",Yt),Yt.prototype.readTerminatedString=Yt.prototype.Cc,Yt.prototype.seek=Yt.prototype.seek,Yt.prototype.rewind=Yt.prototype.qh,Yt.prototype.skip=Yt.prototype.skip,Yt.prototype.readBytes=Yt.prototype.Cb,Yt.prototype.readUint64=Yt.prototype.bd,Yt.prototype.readInt32=Yt.prototype.$f,Yt.prototype.readUint32=Yt.prototype.S,Yt.prototype.readUint16=Yt.prototype.na,Yt.prototype.readUint8=Yt.prototype.X,Yt.prototype.getLength=Yt.prototype.getLength,Yt.prototype.getPosition=Yt.prototype.Ba,Yt.prototype.hasMoreData=Yt.prototype.ta;var ad=1;Yt.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ad};function Pt(){this.i=new Map,this.h=new Map,this.g=!1}y=Pt.prototype,y.box=function(e,t){return e=sd(e),this.i.set(e,oh),this.h.set(e,t),this},y.R=function(e,t){return e=sd(e),this.i.set(e,cd),this.h.set(e,t),this},y.stop=function(){this.g=!0},y.parse=function(e,t,n){for(e=new Yt(e,0),this.g=!1;e.ta()&&!this.g;)this.Yc(0,e,t,n)},y.Yc=function(e,t,n,i){var r=t.Ba();if(i&&r+8>t.getLength())this.g=!0;else{var l=t.S(),c=t.S(),f=_r(c),h=!1;switch(l){case 0:l=t.getLength()-r;break;case 1:if(i&&t.Ba()+8>t.getLength()){this.g=!0;return}l=t.bd(),h=!0}var v=this.h.get(c);if(v){var S=null,T=null;if(this.i.get(c)==cd){if(i&&t.Ba()+4>t.getLength()){this.g=!0;return}T=t.S(),S=T>>>24,T&=16777215}c=r+l,n&&c>t.getLength()&&(c=t.getLength()),i&&c>t.getLength()?this.g=!0:(i=c-t.Ba(),t=0<i?t.Cb(i):new Uint8Array(0),t=new Yt(t,0),v({name:f,parser:this,partialOkay:n||!1,version:S,flags:T,reader:t,size:l,start:r+e,has64BitSize:h}))}else t.skip(Math.min(r+l-t.Ba(),t.getLength()-t.Ba()))}};function Ze(e){for(var t=fo(e);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function An(e){for(var t=fo(e),n=e.reader.S(),i=0;i<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function Oi(e){var t=fo(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function Ju(e){var t=fo(e);e.reader.skip(8);var n=e.reader.na();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function Rl(e){return function(t){e(t.reader.Cb(t.reader.getLength()-t.reader.Ba()))}}function sd(e){var t=0;e=A(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function _r(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function fo(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Me("shaka.util.Mp4Parser",Pt),Pt.headerSize=fo,Pt.typeToString=_r,Pt.allData=Rl,Pt.audioSampleEntry=Ju,Pt.visualSampleEntry=Oi,Pt.sampleDescription=An,Pt.children=Ze,Pt.prototype.parseNext=Pt.prototype.Yc,Pt.prototype.parse=Pt.prototype.parse,Pt.prototype.stop=Pt.prototype.stop,Pt.prototype.fullBox=Pt.prototype.R,Pt.prototype.box=Pt.prototype.box;var oh=0,cd=1;function fd(e){var t=this;this.g=[],this.h=[],this.data=[],new Pt().box("moov",Ze).box("moof",Ze).R("pssh",function(n){if(!(1<n.version)){var i=Je(n.reader.h,-12,n.size);if(t.data.push(i),t.g.push(gr(n.reader.Cb(16))),0<n.version){i=n.reader.S();for(var r=0;r<i;r++){var l=gr(n.reader.Cb(16));t.h.push(l)}}}}).parse(e)}function Vc(e,t,n,i){var r=e.length,l=t.length+16+r;0<i&&(l+=4+16*n.size);var c=new Uint8Array(l),f=Ti(c),h=0;if(f.setUint32(h,l),h+=4,f.setUint32(h,1886614376),h+=4,1>i?f.setUint32(h,0):f.setUint32(h,16777216),h+=4,c.set(t,h),h+=t.length,0<i)for(f.setUint32(h,n.size),h+=4,t=A(n),n=t.next();!n.done;n=t.next())n=Zl(n.value),c.set(n,h),h+=n.length;return f.setUint32(h,r),c.set(e,h+4),c}function Hc(e){var t=this;this.C=e,this.j=this.A=null,this.ka=this.ea=!1,this.H=0,this.h=null,this.o=new yt,this.i=new Map,this.T=[],this.B=new Map,this.K=!1,this.m=new It,this.g=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.Z=new Map,this.fa=new Map,this.L=new ct(function(){return Mg(t)}),this.O=!1,this.M=[],this.W=!1,this.I=new ct(function(){Ng(t)}),this.m.catch(function(){}),this.l=new Ss(function(){return xg(t)}),this.$=!1,this.F=this.G=null,this.P=function(){return!1}}y=Hc.prototype,y.destroy=function(){return this.l.destroy()};function xg(e){return G(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,L(t,Es(e),2);case 2:if(!e.j){t.s(3);break}return ye(t,4),L(t,e.j.setMediaKeys(null),6);case 6:Le(t,5);break;case 4:De(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.u=function(){},e.C=null,e.$=!1,e.G=null,ce(t)}})}y.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)};function Eg(e,t,n){return e.ka=!0,e.B=new Map,e.O=n,ah(e,t,!1)}function lh(e,t,n,i){i=i===void 0?!0:i,e.B=new Map,n=A(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=A(e.g.persistentSessionsMetadata),r=n.next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,ah(e,t,i)}function uh(e,t,n,i,r,l){var c=new Map;return r={audioCapabilities:r,videoCapabilities:l,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t},r.drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:i,serverCertificateUri:"",initData:null,keyIds:null}],c.set(t,r),ch(e,c,[])}function ah(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q;return G(function(K){if(K.g==1){for(yh(e.g.clearKeys,t),i=t.some(function(W){return!!(W.video&&W.video.drmInfos.length||W.audio&&W.audio.drmInfos.length)}),!i&&n&&(r=su(e.g.servers),Lg(t,r)),l=new Set,c=A(t),f=c.next();!f.done;f=c.next())for(h=f.value,v=hh(h),S=A(v),T=S.next();!T.done;T=S.next())b=T.value,l.add(b);for(I=A(l),O=I.next();!O.done;O=I.next())P=O.value,_g(P,su(e.g.servers),su(e.g.advanced||{}),e.g.keySystemsMapping);for(N=function(W,Q){var ie=[];W=A(W);for(var Z=W.next();!Z.done;Z=W.next()){Z=Z.value;var ne=Z[Q]||e.g.advanced&&e.g.advanced[Z.keySystem]&&e.g.advanced[Z.keySystem][Q]||"",re;if((re=ne=="")&&(re=(re=Z.keySystem)?!!re.match(/^com\.widevine\.alpha/):!1),re&&(Q=="audioRobustness"?ne=[e.g.defaultAudioRobustnessForWidevine]:Q=="videoRobustness"&&(ne=[e.g.defaultVideoRobustnessForWidevine])),typeof ne=="string")ie.push(Z);else if(Array.isArray(ne))for(ne.length===0&&(ne=[""]),ne=A(ne),re=ne.next();!re.done;re=ne.next()){var ue={};ie.push(Object.assign({},Z,(ue[Q]=re.value,ue)))}}return ie},_=new Set,B=A(t),F=B.next();!F.done;F=B.next())z=F.value,z.video&&!_.has(z.video)&&(z.video.drmInfos=N(z.video.drmInfos,"videoRobustness"),z.video.drmInfos=N(z.video.drmInfos,"audioRobustness"),_.add(z.video)),z.audio&&!_.has(z.audio)&&(z.audio.drmInfos=N(z.audio.drmInfos,"videoRobustness"),z.audio.drmInfos=N(z.audio.drmInfos,"audioRobustness"),_.add(z.audio));return _.clear(),L(K,Pc(t,e.O,e.$,e.g.preferredKeySystems),2)}return at(e.l),J=i||Object.keys(e.g.servers).length,J?(q=ch(e,void 0,t),K.return(i?q:q.catch(function(){}))):(e.ea=!0,K.return(Promise.resolve()))})}function Ag(e){var t;return G(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.s(2);break}return L(n,e.G,3);case 3:return at(e.l),n.return();case 2:return ye(n,4),e.G=e.j.setMediaKeys(e.A),L(n,e.G,6);case 6:Le(n,5);break;case 4:t=De(n),e.u(new Y(2,6,6003,t.message));case 5:at(e.l),ce(n)}})}function Cg(e,t){return G(function(n){if(n.g==1)return L(n,Ag(e),2);Ts(e,t.initDataType,Je(t.initData)),ce(n)})}y.Lb=function(e){var t=this;return G(function(n){if(n.g==1)return t.j===e?n.return():t.A?(t.j=e,t.o.ma(t.j,"play",function(){for(var i=A(t.M),r=i.next();!r.done;r=i.next())ws(t,r.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return Es(t)}),t.o.D(t.j.remote,"connecting",function(){return Es(t)}),t.o.D(t.j.remote,"disconnect",function(){return Es(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Es(t)}),t.F=t.h&&t.h.initData.find(function(i){return 0<i.initData.length})||null,t.F||t.h.keySystem!=="com.apple.fps"||t.B.size?L(n,Ag(t),2):n.s(2)):(t.o.ma(e,"encrypted",function(){t.u(new Y(2,6,6010))}),n.return());dd(t).catch(function(){}),t.F||t.B.size||t.g.parseInbandPsshEnabled||t.o.D(t.j,"encrypted",function(i){return Cg(t,i)}),ce(n)})};function bg(e){var t,n,i,r,l;return G(function(c){switch(c.g){case 1:if(!e.A||!e.h)return c.return();if(!e.h.serverCertificateUri||e.h.serverCertificate&&e.h.serverCertificate.length){c.s(2);break}return t=un([e.h.serverCertificateUri],e.g.retryParameters),ye(c,3),n=e.C.Xb.request(5,t,{isPreload:e.P()}),L(c,n.promise,5);case 5:i=c.h,e.h.serverCertificate=Je(i.data),Le(c,4);break;case 3:throw r=De(c),new Y(2,6,6017,r);case 4:if(e.l.g)return c.return();case 2:return!e.h.serverCertificate||!e.h.serverCertificate.length?c.return():(ye(c,6),L(c,e.A.setServerCertificate(e.h.serverCertificate),8));case 8:Le(c,0);break;case 6:throw l=De(c),new Y(2,6,6004,l.message)}})}function Ig(e,t){var n,i,r;return G(function(l){if(l.g==1)return L(l,Zu(e,t,{initData:null,initDataType:null}),2);if(l.g!=3)return n=l.h,n?(i=[],(r=e.i.get(n))&&(r.ub=new It,i.push(r.ub)),i.push(n.remove()),L(l,Promise.all(i),3)):l.return();e.i.delete(n),ce(l)})}function dd(e){var t,n,i,r,l;return G(function(c){if(c.g==1)return e.B.size?(e.B.forEach(function(f,h){Zu(e,h,f)}),L(c,e.m,3)):c.s(2);if(c.g!=2){if(t=e.h&&e.h.keyIds||new Set([]),0<t.size&&Pg(e))return c.return(e.m);e.K=!1,e.m=new It,e.m.catch(function(){})}for(n=(e.h?e.h.initData:[])||[],i=A(n),r=i.next();!r.done;r=i.next())l=r.value,Ts(e,l.initDataType,l.initData);return $u(e)&&e.m.resolve(),c.return(e.m)})}function Ts(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var i=e.i.values();i=A(i);for(var r=i.next();!r.done;r=i.next())if(ll(n,r.value.initData))return;var l=!1;if(e.B.forEach(function(c){!l&&ll(n,c.initData)&&(l=!0)}),l)return}e.K=!0,0<e.i.size&&$u(e)&&(e.m.resolve(),e.K=!1,e.m=new It,e.m.catch(function(){})),pd(e,t,n,e.h.sessionType)}}function sh(e){return e=e.i.keys(),e=Bc(e,function(t){return t.sessionId}),Array.from(e)}y.Gf=function(){var e=this,t=this.i.keys();return t=Bc(t,function(n){var i=e.i.get(n);return{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}}),Array.from(t)},y.pd=function(){var e=1/0,t=this.i.keys();t=A(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},y.Yd=function(){return ud(this.fa)};function ch(e,t,n){var i,r,l,c,f,h,v,S;return G(function(T){switch(T.g){case 1:if(i=new Map,n.length){r=Dg(e,n,i),T.s(2);break}return L(T,Og(e,t),3);case 3:r=T.h;case 2:if(l=r,!l)throw navigator.requestMediaKeySystemAccess?new Y(2,6,6001):new Y(2,6,6020);if(at(e.l),ye(T,4),l.getConfiguration(),c=e.g.keySystemsMapping[l.keySystem]||l.keySystem,n.length){var b=c,I=i.get(c),O=[],P=[],N=[],_=[],B=[],F=new Set,z=new Set;hd(I,O,P,_,N,B,F,z);var J=e.O?"persistent-license":"temporary";for(b={keySystem:b,encryptionScheme:O[0],licenseServerUri:P[0],distinctiveIdentifierRequired:I[0].distinctiveIdentifierRequired,persistentStateRequired:I[0].persistentStateRequired,sessionType:I[0].sessionType||J,audioRobustness:I[0].audioRobustness||"",videoRobustness:I[0].videoRobustness||"",serverCertificate:_[0],serverCertificateUri:N[0],initData:B,keyIds:F},0<z.size&&(b.keySystemUris=z),I=A(I),z=I.next();!z.done;z=I.next())z=z.value,z.distinctiveIdentifierRequired&&(b.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(b.persistentStateRequired=z.persistentStateRequired);I=b}else I=c,z=t.get(c),b=[],O=[],P=[],N=[],_=[],B=new Set,hd(z.drmInfos,b,O,N,P,_,B),I={keySystem:I,encryptionScheme:b[0],licenseServerUri:O[0],distinctiveIdentifierRequired:z.distinctiveIdentifier=="required",persistentStateRequired:z.persistentState=="required",sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:N[0],serverCertificateUri:P[0],initData:_,keyIds:B};if(e.h=I,!e.h.licenseServerUri)throw new Y(2,6,6012,e.h.keySystem);return L(T,l.createMediaKeys(),6);case 6:if(f=T.h,at(e.l),e.A=f,!(e.g.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){T.s(7);break}return ye(T,8),L(T,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if(h=T.h,h!="usable")throw new Y(2,6,6018);at(e.l),Le(T,7,4);break;case 8:throw v=De(T,4),v instanceof Y?v:new Y(2,6,6019,v.message);case 7:return e.ea=!0,L(T,bg(e),11);case 11:at(e.l),Le(T,0);break;case 4:throw S=De(T),at(e.l,S),e.h=null,S instanceof Y?S:new Y(2,6,6002,S.message)}})}function Dg(e,t,n){for(var i=A(t),r=i.next();!r.done;r=i.next()){r=A(hh(r.value));for(var l=r.next();!l.done;l=r.next())l=l.value,n.has(l.keySystem)||n.set(l.keySystem,[]),n.get(l.keySystem).push(l)}if(n.size==1&&n.has(""))throw new Y(2,6,6e3);i=e.g.preferredKeySystems,i.length||(r=su(e.g.servers),r.size==1&&(i=Array.from(r.keys()))),r=A(i);var c=r.next();for(l={};!c.done;l={nh:void 0},c=r.next()){l.nh=c.value,c=A(t);for(var f=c.next();!f.done;f=c.next())if(f=f.value.decodingInfos.find(function(T){return function(b){return b.supported&&b.keySystemAccess!=null&&b.keySystemAccess.keySystem==T.nh}}(l)))return f.keySystemAccess}for(r=A([!0,!1]),l=r.next();!l.done;l=r.next())for(l=l.value,c=A(t),f=c.next();!f.done;f=c.next()){f=A(f.value.decodingInfos);for(var h=f.next();!h.done;h=f.next())if(h=h.value,h.supported&&h.keySystemAccess){var v=h.keySystemAccess.keySystem;if(!i.includes(v)){var S=n.get(v);for(!S&&e.g.keySystemsMapping[v]&&(S=n.get(e.g.keySystemsMapping[v])),v=A(S),S=v.next();!S.done;S=v.next())if(!!S.value.licenseServerUri==l)return h.keySystemAccess}}}return null}function Og(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_;return G(function(B){switch(B.g){case 1:if(t.size==1&&t.has(""))throw new Y(2,6,6e3);for(i=A(t.values()),r=i.next();!r.done;r=i.next())l=r.value,l.audioCapabilities.length==0&&delete l.audioCapabilities,l.videoCapabilities.length==0&&delete l.videoCapabilities;c=A(e.g.preferredKeySystems),f=c.next();case 2:if(f.done){B.s(4);break}if(h=f.value,!t.has(h)){B.s(3);break}return v=t.get(h),ye(B,6),L(B,navigator.requestMediaKeySystemAccess(h,[v]),8);case 8:return n=B.h,B.return(n);case 6:De(B);case 7:at(e.l);case 3:f=c.next(),B.s(2);break;case 4:S=A([!0,!1]),T=S.next();case 9:if(T.done){B.s(11);break}b=T.value,I=A(t.keys()),O=I.next();case 12:if(O.done){T=S.next(),B.s(9);break}if(P=O.value,N=t.get(P),_=N.drmInfos.some(function(F){return!!F.licenseServerUri}),_!=b){B.s(13);break}return ye(B,15),L(B,navigator.requestMediaKeySystemAccess(P,[N]),17);case 17:return n=B.h,B.return(n);case 15:De(B);case 16:at(e.l);case 13:O=I.next(),B.s(12);break;case 11:return B.return(n)}})}function fh(e){$u(e)&&e.m.resolve()}function dh(e,t){new ct(function(){t.loaded=!0,fh(e)}).da(gh)}function Zu(e,t,n){var i,r,l,c,f,h,v;return G(function(S){switch(S.g){case 1:try{i=e.A.createSession("persistent-license")}catch(T){return r=new Y(2,6,6005,T.message),e.u(r),S.return(Promise.reject(r))}return e.o.D(i,"message",function(T){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(T):ws(e,T)}),e.o.D(i,"keystatuseschange",function(T){return xs(e,T)}),l={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vf:1/0,ub:null,type:"persistent-license"},e.i.set(i,l),ye(S,2),L(S,i.load(t),4);case 4:return c=S.h,at(e.l),c||(e.i.delete(i),f=e.g.persistentSessionOnlinePlayback?1:2,e.u(new Y(f,6,6013)),l.loaded=!0),dh(e,l),fh(e),S.return(i);case 2:h=De(S),at(e.l,h),e.i.delete(i),v=e.g.persistentSessionOnlinePlayback?1:2,e.u(new Y(v,6,6005,h.message)),l.loaded=!0,fh(e);case 3:return S.return(Promise.resolve())}})}function pd(e,t,n,i){try{var r=e.A.createSession(i)}catch(l){e.u(new Y(2,6,6005,l.message));return}e.o.D(r,"message",function(l){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(l):ws(e,l)}),e.o.D(r,"keystatuseschange",function(l){return xs(e,l)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Vf:1/0,ub:null,type:i});try{n=e.g.initDataTransform(n,t,e.h)}catch(l){t=l,l instanceof Y||(t=new Y(2,6,6016,l)),e.u(t);return}e.g.logLicenseExchange&&No(n),r.generateRequest(t,n).catch(function(l){if(!e.l.g){e.i.delete(r);var c=l.errorCode;if(c&&c.systemCode){var f=c.systemCode;0>f&&(f+=Math.pow(2,32)),f="0x"+f.toString(16)}e.u(new Y(2,6,6006,l.message,l,f))}})}function kg(e){return G(function(t){return t.g==1?e.K?L(t,e.m,3):t.s(0):L(t,Promise.all(e.T.map(function(n){return n.promise})),0)})}function ws(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P;G(function(N){switch(N.g){case 1:if(n=t.target,e.g.logLicenseExchange&&No(t.message),i=e.i.get(n),r=e.h.licenseServerUri,l=e.g.advanced[e.h.keySystem],t.messageType=="individualization-request"&&l&&l.individualizationServer&&(r=l.individualizationServer),c=un([r],e.g.retryParameters),c.body=t.message,c.method="POST",c.licenseRequestType=t.messageType,c.sessionId=n.sessionId,c.drmInfo=e.h,i&&(c.initData=i.initData,c.initDataType=i.initDataType),l&&l.headers)for(f in l.headers)c.headers[f]=l.headers[f];if(e.h.keySystem==="org.w3.clearkey"){var _=c,B=e.h;try{var F=Or(_.body);if(F){var z=JSON.parse(F);z.type||(z.type=B.sessionType,_.body=kr(JSON.stringify(z)))}}catch{}}if(Vf(e.h.keySystem))if(_=cl(c.body,!0,!0),_.includes("PlayReadyKeyMessage")){for(_=Bu(_,"PlayReadyKeyMessage"),B=Nr(_,"HttpHeader"),B=A(B),F=B.next();!F.done;F=B.next())z=F.value,F=Nr(z,"name")[0],z=Nr(z,"value")[0],c.headers[Cn(F)]=Cn(z);_=Nr(_,"Challenge")[0],c.body=Hi(Cn(_))}else c.headers["Content-Type"]="text/xml; charset=utf-8";return h=Date.now(),ye(N,2),S=e.C.Xb.request(2,c,{isPreload:e.P()}),e.T.push(S),L(N,S.promise,4);case 4:v=N.h,Rr(e.T,S),Le(N,3);break;case 2:return T=De(N),e.l.g||(b=new Y(2,6,6007,T),e.i.size==1?(e.u(b),i&&i.ub&&i.ub.reject(b)):(i&&i.ub&&i.ub.reject(b),e.i.delete(n),$u(e)&&(e.m.resolve(),e.L.da(.1)))),N.return();case 3:return e.l.g?N.return():(e.H+=(Date.now()-h)/1e3,e.g.logLicenseExchange&&No(v.data),ye(N,5),L(N,n.update(v.data),7));case 7:Le(N,6);break;case 5:return I=De(N),O=new Y(2,6,6008,I.message),e.u(O),i&&i.ub&&i.ub.reject(O),N.return();case 6:if(e.l.g)return N.return();P=new Ie("drmsessionupdate"),e.C.onEvent(P),i&&(i.ub&&i.ub.resolve(),dh(e,i)),ce(N)}})}function xs(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(l,c){if(typeof c=="string"){var f=c;c=l,l=f}if(Vf(e.h.keySystem)&&c.byteLength==16&&(Ql()||qn())){f=Ti(c);var h=f.getUint32(0,!0),v=f.getUint16(4,!0),S=f.getUint16(6,!0);f.setUint32(0,h,!1),f.setUint16(4,v,!1),f.setUint16(6,S,!1)}l!="status-pending"&&(n.loaded=!0),l=="expired"&&(i=!0),c=gr(c).slice(0,32),e.Z.set(c,l)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.ub&&(e.i.delete(t),ph(t)),$u(e)&&(e.m.resolve(),e.L.da(Ug))}function Mg(e){var t=e.Z,n=e.fa;n.clear(),t.forEach(function(i,r){return n.set(r,i)}),t=Array.from(n.values()),t.length&&t.every(function(i){return i=="expired"})&&e.u(new Y(2,6,6014)),e.C.pe(ud(n))}function Rg(){var e,t,n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we;return G(function(be){if(be.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation 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(t={},n=A(e),i=n.next();!i.done;i=n.next())r=i.value,t[r]=null;return be.return(t)}for(l="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),c=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],f=["150","2000","3000"],h={"com.widevine.alpha":c,"com.widevine.alpha.experiment":c,"com.microsoft.playready.recommendation":f},v=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],S=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],T={videoCapabilities:v,audioCapabilities:S,initDataTypes:["cenc","sinf","skd","keyids"]},b=[null,"cenc","cbcs","cbcs-1-9"],I=new Map,O=function(Qe,Be){var kt,mt,st,pt,Ot,lt,St,et,ut,zt,$n,gn,mn;return G(function(Kn){switch(Kn.g){case 1:return ye(Kn,2),L(Kn,Be.createMediaKeys(),5);case 5:kt=Kn.h;case 4:Le(Kn,3);break;case 2:return De(Kn),Kn.return();case 3:if(st=(mt=Be.getConfiguration().sessionTypes)?mt.includes("persistent-license"):!1,eo()&&(st=!1),pt=Be.getConfiguration().videoCapabilities,Ot=Be.getConfiguration().audioCapabilities,lt={persistentState:st,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},I.has(Qe)&&I.get(Qe)?lt=I.get(Qe):I.set(Qe,lt),(St=pt[0].encryptionScheme)&&!lt.encryptionSchemes.includes(St)&<.encryptionSchemes.push(St),(et=pt[0].robustness)&&!lt.videoRobustnessLevels.includes(et)&<.videoRobustnessLevels.push(et),(ut=Ot[0].robustness)&&!lt.audioRobustnessLevels.includes(ut)&<.audioRobustnessLevels.push(ut),"getStatusForPolicy"in kt){for(zt=[],$n=A(l),gn=$n.next(),mn={};!gn.done;mn={td:void 0},gn=$n.next())mn.td=gn.value,lt.minHdcpVersions.includes(mn.td)||zt.push(kt.getStatusForPolicy({minHdcpVersion:mn.td}).then(function(ai){return function(Rf){Rf!="usable"||lt.minHdcpVersions.includes(ai.td)||lt.minHdcpVersions.push(ai.td)}}(mn)));return L(Kn,Promise.all(zt),0)}Kn.s(0)}})},P=function(Qe,Be,kt,mt){var st,pt,Ot,lt,St,et,ut,zt,$n,gn;return G(function(mn){switch(mn.g){case 1:for(ye(mn,2),st=io(T),pt=A(st.videoCapabilities),Ot=pt.next();!Ot.done;Ot=pt.next())lt=Ot.value,lt.encryptionScheme=Be,lt.robustness=kt;for(St=A(st.audioCapabilities),et=St.next();!et.done;et=St.next())ut=et.value,ut.encryptionScheme=Be,ut.robustness=mt;return zt=io(st),zt.persistentState="required",zt.sessionTypes=["persistent-license"],$n=[zt,st],sl()?L(mn,Gu(5,navigator.requestMediaKeySystemAccess(Qe,$n)),7):L(mn,navigator.requestMediaKeySystemAccess(Qe,$n),6);case 6:gn=mn.h,mn.s(5);break;case 7:gn=mn.h;case 5:return L(mn,O(Qe,gn),8);case 8:Le(mn,0);break;case 2:De(mn),ce(mn)}})},N=function(Qe,Be,kt,mt){var st,pt,Ot;return G(function(lt){switch(lt.g){case 1:return ye(lt,2),st={type:"media-source",video:{contentType:v[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:S[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Qe,video:{encryptionScheme:Be,robustness:kt},audio:{encryptionScheme:Be,robustness:mt}}},sl()?L(lt,Gu(5,navigator.mediaCapabilities.decodingInfo(st)),7):L(lt,navigator.mediaCapabilities.decodingInfo(st),6);case 6:pt=lt.h,lt.s(5);break;case 7:pt=lt.h;case 5:return Ot=pt.keySystemAccess,L(lt,O(Qe,Ot),8);case 8:Le(lt,0);break;case 2:De(lt),ce(lt)}})},_=A(e),B=_.next();!B.done;B=_.next())F=B.value,I.set(F,null);for(z=function(Qe){return!(Qe==="org.w3.clearkey"&&ni())},J=[],q=A(b),K=q.next();!K.done;K=q.next())for(W=K.value,Q=A(e),ie=Q.next();!ie.done;ie=Q.next())Z=ie.value,z(Z)&&(J.push(P(Z,W,"","")),J.push(N(Z,W,"","")));for(ne=A(e),re=ne.next();!re.done;re=ne.next())for(ue=re.value,de=A(h[ue]||[]),se=de.next();!se.done;se=de.next())we=se.value,z(ue)&&(J.push(P(ue,null,we,"")),J.push(P(ue,null,"",we)),J.push(N(ue,null,we,"")),J.push(N(ue,null,"",we)));return L(be,Promise.all(J),2)}return be.return(ud(I))})}function ph(e){return G(function(t){if(t.g==1)return ye(t,2),L(t,Gu(o0,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return Le(t,0);De(t),ce(t)})}function Es(e){var t;return G(function(n){return t=Array.from(e.i.entries()),e.i.clear(),L(n,Promise.all(t.map(function(i){i=A(i);var r=i.next().value,l=i.next().value;return G(function(c){if(c.g==1)return ye(c,2),e.ka||e.B.has(r.sessionId)||l.type!=="persistent-license"||e.g.persistentSessionOnlinePlayback?L(c,ph(r),5):L(c,r.remove(),5);if(c.g!=2)return Le(c,0);De(c),ce(c)})})),0)})}function hh(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Ng(e){e.i.forEach(function(t,n){var i=t.Vf,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Vf=r)})}function $u(e){return e=e.i.values(),rh(e,function(t){return t.loaded})}function Pg(e){for(var t=A(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.Z.get(n.value)!=="usable")return!1;return!0}function Lg(e,t){var n=[];for(t.forEach(function(i,r){n.push({keySystem:r,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=A(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function hd(e,t,n,i,r,l,c,f){var h=[];e=A(e);for(var v=e.next(),S={};!v.done;S={va:void 0},v=e.next()){if(S.va=v.value,t.includes(S.va.encryptionScheme)||t.push(S.va.encryptionScheme),S.va.keySystem=="org.w3.clearkey"&&S.va.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(S.va.licenseServerUri)||h.push(S.va.licenseServerUri):n.includes(S.va.licenseServerUri)||n.push(S.va.licenseServerUri),r.includes(S.va.serverCertificateUri)||r.push(S.va.serverCertificateUri),S.va.serverCertificate&&(i.some(function(I){return function(O){return ll(O,I.va.serverCertificate)}}(S))||i.push(S.va.serverCertificate)),S.va.initData){v=A(S.va.initData);for(var T=v.next(),b={};!T.done;b={Mf:void 0},T=v.next())b.Mf=T.value,l.some(function(I){return function(O){var P=I.Mf;return O.keyId&&O.keyId==P.keyId?!0:O.initDataType==P.initDataType&&ll(O.initData,P.initData)}}(b))||l.push(b.Mf)}if(S.va.keyIds)for(v=A(S.va.keyIds),T=v.next();!T.done;T=v.next())c.add(T.value);if(S.va.keySystemUris&&f)for(S=A(S.va.keySystemUris),v=S.next();!v.done;v=S.next())f.add(v.value)}if(h.length==1)n.push(h[0]);else if(0<h.length){for(t=[],h=A(h),i=h.next();!i.done;i=h.next())i=E.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,te(i.keys));h=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+E.btoa(h))}}function _g(e,t,n,i){var r=e.keySystem;r&&(r!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(r)&&(t=t.get(r),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(r))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),i[r]&&(e.keySystem=i[r]),E.cast&&E.cast.__platform__&&r=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function yh(e,t){if(e=su(e),e.size!=0){e=dl(e),t=A(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var o0=1,gh=5,Ug=.5;function Kc(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=A(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}Kc.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var i;if(!(i=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(i=n.audio&&e.audio)){i=n.audio;var r=e.audio;i=!(!((!i.channelsCount||!r.channelsCount||2<i.channelsCount||2<r.channelsCount)&&i.channelsCount!=r.channelsCount||i.spatialAudio!==r.spatialAudio||t&&!yd(i,r))&&vh(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||yd(n,i))&&vh(n.roles,i.roles))),i?!1:(this.g.add(e),!0)},Kc.prototype.values=function(){return this.g.values()};function yd(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return ii(i)}),t=t.codecs.split(",").map(function(i){return ii(i)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function vh(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=A(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Me("shaka.media.AdaptationSet",Kc),Me("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function gd(){}gd.prototype.create=function(){},gd.prototype.configure=function(){},Me("shaka.media.AdaptationSetCriteria",gd);function l0(){this.g=Cs,this.i=new Map().set(Cs,2).set(As,1),this.h=0}var As=0,Cs=1;/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2023 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function ea(e,t,n){this.g=e,this.i=t,this.h=n}function vd(e,t){return G(function(n){if(n.g==1)return L(n,Il(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||Zp(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(Vo))throw new Y(2,4,4032);return n.return(mh(e,t))})}function qc(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=A(t.variants);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=r.allowedByApplication;r.allowedByApplication=Bo(r,n,e),l!=r.allowedByApplication&&(i=!0)}return i}function mh(e,t){var n=qc(e,t);if(t){var i=e.h?e.h.h:null;if(i&&e.h.A)for(var r=A(t.variants),l=r.next();!l.done;l=r.next())l=l.value,md(e,i.keySystem,l.video),md(e,i.keySystem,l.audio);Gc(e,t)}return n}function md(e,t,n){if(n){n=A(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if(i=i.value,i.keySystem==t){i=A(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,Ts(e.h,r.initDataType,r.initData)}}}function Gc(e,t){e=e.h?e.h.Yd():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var i=!1,r=!1,l=new Set,c=new Set;t=A(t.variants);for(var f=t.next();!f.done;f=t.next()){f=f.value;var h=[];f.audio&&h.push(f.audio),f.video&&h.push(f.video),h=A(h);for(var v=h.next();!v.done;v=h.next())if(v=v.value,v.keyIds.size){v=A(v.keyIds);for(var S=v.next();!S.done;S=v.next()){S=S.value;var T=e[n?"00":S];T?Sd.includes(T)&&c.add(T):l.add(S)}}f.allowedByApplication?f.allowedByKeySystem&&(i=!0):r=!0}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(l),restrictedKeyStatuses:Array.from(c)},new Y(2,4,4012,e)}var Sd=["output-restricted","internal-error"];function bs(){}function ta(e,t){Nl.set(e,t)}function Is(){var e={};if($r())for(var t=A(Nl.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=A(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=$r()?Nl.has(n):Tc(n);return e}function Ds(e,t){if(t){var n=Nl.get(t.toLowerCase());if(n)return n}throw new Y(2,4,4e3,e,t)}Me("shaka.media.ManifestParser",bs),bs.unregisterParserByMime=function(e){Nl.delete(e)},bs.registerParserByMime=ta,bs.registerParserByExtension=function(){bt("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},bs.AccessibilityPurpose={Nk:"visually impaired",dk:"hard of hearing"};var Nl=new Map;function cu(e,t){var n=null,i=null,r=null,l=null,c=e.S();return t&1&&(r=e.bd()),t&2&&(l=e.S()),t&8&&(n=e.S()),t&16&&(i=e.S()),{trackId:c,ld:n,md:i,Wh:r,rh:l}}function na(e,t){return t==1?(t=e.S(),e=e.S(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.S()}}function zc(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),e=e.na(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function Fc(e,t,n){var i=e.S(),r=[],l=null;n&1&&(l=e.$f()),n&4&&e.skip(4);for(var c=0;c<i;c++){var f={gg:null,sampleSize:null,ye:null};n&256&&(f.gg=e.S()),n&512&&(f.sampleSize=e.S()),n&1024&&e.skip(4),n&2048&&(f.ye=t==0?e.S():e.$f()),r.push(f)}return{Sk:i,fg:r,nf:l}}function ia(e){e.skip(6),e.skip(2),e.skip(8);var t=e.na();return e.skip(2),e.skip(2),e.skip(2),e=e.na()+e.na()/65536,{channelCount:t,sampleRate:e}}function Sh(e){return e=e.S(),{codec:_r(e)}}function Ur(e){var t=null,n=null,i=e.Cb(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),r+=String.fromCharCode(i[3]),r==="nclx"){switch(e.na()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.na(),e.na(),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,Nd:n}}function rr(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Gn(e){return(10>e?"0":"")+e}function fu(e){if(!Th){Th=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);Wc=gt("ftyp",t,i,t,n),t=gt("dref",Gg),Td=gt("dinf",t)}this.g=e}function xr(e){for(var t=[],n=A(e.g),i=n.next();!i.done;i=n.next()){var r=t,l=r.push,c=i.value;i=gt;var f=c.id+1,h=c.stream.width||0,v=c.stream.height||0;c.type=="audio"&&(v=h=0);var S=c.duration*c.timescale,T=Math.floor(S/(Ll+1));switch(S=Math.floor(S%(Ll+1)),f=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(te($t(f,4)),[0,0,0,0],te($t(T,4)),te($t(S,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],te($t(h,2)),[0,0],te($t(v,2)),[0,0])),f=gt("tkhd",f),h=gt,T=c.duration*c.timescale,v=Math.floor(T/(Ll+1)),T=Math.floor(T%(Ll+1)),S=c.stream.language,S=S.charCodeAt(0)-96<<10|S.charCodeAt(1)-96<<5|S.charCodeAt(2)-96,v=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(te($t(c.timescale,4)),te($t(v,4)),te($t(T,4)),te($t(S,2)),[0,0])),v=gt("mdhd",v),T=c,S=new Uint8Array([]),T.type){case"video":S=Bg;break;case"audio":S=wh}T=gt("hdlr",S);e:{switch(c.type){case"video":c=gt("minf",gt("vmhd",xi),Td,Go(c));break e;case"audio":c=gt("minf",gt("smhd",ki),Td,Go(c));break e}c=new Uint8Array([])}c=h("mdia",v,T,c),i=i("trak",f,c),l.call(r,i)}for(t=Ht.apply(Nn,te(t)),l=e.g[0],n=gt,i=l.duration*l.timescale,r=Math.floor(i/(Ll+1)),i=Math.floor(i%(Ll+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(te($t(l.timescale,4)),te($t(r,4)),te($t(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])),r=gt("mvhd",r),i=[],e=A(e.g),h=e.next();!h.done;h=e.next())c=i,f=c.push,h=new Uint8Array([0,0,0,0].concat(te($t(h.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),h=gt("trex",h),f.call(c,h);if(e=Ht.apply(Nn,te(i)),e=gt("mvex",e),i=[],l.encrypted){for(l=A(l.stream.drmInfos),c=l.next();!c.done;c=l.next())if(c=c.value,c.initData)for(c=A(c.initData),f=c.next();!f.done;f=c.next())i.push(f.value.initData);l=Ht.apply(Nn,te(i))}else l=new Uint8Array([]);return e=n("moov",r,t,e,l),t=new Uint8Array(Wc.byteLength+e.byteLength),t.set(Wc),t.set(e,Wc.byteLength),t}function Go(e){var t=gt,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=eo()?"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,0<e.Ca.byteLength)var r=gt("avcC",e.Ca);else{r=gt;for(var l=7,c=[],f=[],h=0,v=0,S=0,T=0;T<e.lb.length;T++){var b=pu(e.lb[T]);switch(b[0]&31){case 7:c.push(b),l+=b.length+2;break;case 8:f.push(b),l+=b.length+2}}for(0<c.length&&(h=c[0][1],S=c[0][2],v=c[0][3]),l=new Uint8Array(l),T=0,l[T++]=1,l[T++]=h,l[T++]=S,l[T++]=v,l[T++]=255,l[T++]=224|c.length,h=0;h<c.length;h++)l[T++]=(c[h].length&65280)>>8,l[T++]=c[h].length&255,l.set(c[h],T),T+=c[h].length;for(l[T++]=f.length,c=0;c<f.length;c++)l[T++]=(f[c].length&65280)>>8,l[T++]=f[c].length&255,l.set(f[c],T),T+=f[c].length;r=r("avcC",l)}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(te($t(n,2)),te($t(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",f=li(e),c=new Uint8Array([]),e.encrypted&&(c=Pl(0,e.stream,e.codecs),i="encv"),i=gt(i,n,r,f,c)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.Ca.byteLength&&(n=gt("hvcC",e.Ca)),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(te($t(i,2)),te($t(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",f=li(e),c=new Uint8Array([]),e.encrypted&&(c=Pl(0,e.stream,e.codecs),r="encv"),i=gt(r,i,n,f,c));break;case"audio":n=="mp3"?e=gt(".mp3",du(e)):n=="ac-3"?(n=gt("dac3",e.ra),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=Pl(0,e.stream,e.codecs),i="enca"),e=gt(i,du(e),n,r)):n=="ec-3"?(n=gt("dec3",e.ra),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=Pl(0,e.stream,e.codecs),i="enca"),e=gt(i,du(e),n,r)):n=="opus"?(n=gt("dOps",e.ra),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=Pl(0,e.stream,e.codecs),i="enca"),e=gt(i,du(e),n,r)):(0<e.ra.byteLength?n=gt("esds",e.ra):(n=gt,i=e.id+1,r=e.stream.channelsCount||2,c=e.stream.audioSamplingRate||44100,h=$l("audio",e.codecs.split(",")),v={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},f=v[c],(h==="mp4a.40.5"||h==="mp4a.40.29")&&(f=v[2*c]),c=parseInt(h.split(".").pop(),10),i=new Uint8Array([0,0,0,0,3,25].concat(te($t(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,c<<3|f>>>1,f<<7|r<<3,6,1,2])),n=n("esds",i)),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=Pl(0,e.stream,e.codecs),i="enca"),e=gt(i,du(e),n,r)),i=e}return e=gt("stsd",qg,i),t("stbl",e,gt("stts",Vg),gt("stsc",Hg),gt("stsz",Kg),gt("stco",u0))}function li(e){if(!e.Ia&&!e.Ka)return new Uint8Array([]);var t=e.Ka;return e=new Uint8Array([].concat(te($t(e.Ia,4)),te($t(t,4)))),gt("pasp",e)}function du(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(te($t(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Pl(e,t,n){e=gt,n=new Uint8Array([].concat(te($t(Xc(n.split(".")[0]),4)))),n=gt("frma",n);var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=new Uint8Array([0,0,0,0].concat(te($t(Xc(i),4)),[0,1,0,0])),i=gt("schm",i),r=gt;var l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=A(t.drmInfos);for(var c=t.next();!c.done;c=t.next())if((c=c.value)&&c.keyIds&&c.keyIds.size){c=A(c.keyIds);for(var f=c.next();!f.done;f=c.next())l=pu(f.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=gt("tenc",t,l),e("sinf",n,i,r("schi",t))}function ra(e){var t=[];e=A(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,l=gt,c=new Uint8Array([0,0,0,0].concat(te($t(n.data?n.data.Db:0,4))));c=gt("mfhd",c);var f,h=n.data?n.data.jb:[],v=new Uint8Array(4+h.length);for(f=0;f<h.length;f++){var S=h[f].flags;v[f+4]=S.Ya<<4|S.$a<<2|S.Za}h=gt("sdtp",v);var T=h.length+92;v=gt,f=new Uint8Array([0,0,0,58].concat(te($t(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),f=gt("tfhd",f),S=n.data?n.data.baseMediaDecodeTime:0;var b=Math.floor(S%(Ll+1));S=new Uint8Array([1,0,0,0].concat(te($t(Math.floor(S/(Ll+1)),4)),te($t(b,4)))),S=gt("tfdt",S);var I=T;T=n.data?n.data.jb:[],b=T.length;var O=12+16*b,P=new Uint8Array(O);for(I+=8+O,P.set([n.type==="video"?1:0,0,15,1].concat(te($t(b,4)),te($t(I,4))),0),I=0;I<b;I++){var N=T[I];O=$t(N.duration,4);var _=$t(N.size,4),B=N.flags;N=$t(N.eb,4),P.set([].concat(te(O),te(_),[B.hb<<2|B.Ya,B.$a<<6|B.Za<<4|B.ib,B.Xa&61440,B.Xa&15],te(N)),12+16*I)}T=gt("trun",P),h=v("traf",f,S,T,h),l=l("moof",c,h),r.call(i,t,[l,jg(n)])}return Ht.apply(Nn,te(t))}function jg(e){return e=(e.data?e.data.jb:[]).map(function(t){return t.data}),e=Ht.apply(Nn,te(e)),gt("mdat",e)}function $t(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function pu(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 Xc(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function gt(e){var t=Tt.apply(1,arguments),n=Yc.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Yc.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for(r=new Uint8Array(i),r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=i&255,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var Th=!1,Ll=Math.pow(2,32)-1,Yc=new Map,Bg=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]),wh=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]),Vg=new Uint8Array([0,0,0,0,0,0,0,0]),Hg=new Uint8Array([0,0,0,0,0,0,0,0]),u0=new Uint8Array([0,0,0,0,0,0,0,0]),Kg=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),xi=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ki=new Uint8Array([0,0,0,0,0,0,0,0]),qg=new Uint8Array([0,0,0,0,0,0,0,1]),Wc=new Uint8Array([]),Gg=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Td=new Uint8Array([]);function zg(e,t,n){function i(I){T.push({box:I,hh:1701733217})}function r(I){T.push({box:I,hh:1701733238})}function l(I){h=!0,I.parser.stop()}function c(I){S.push(I),Ze(I)}var f=t=Je(t),h=!1,v,S=[],T=[];if(new Pt().box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(I){v=I,S.push(I),An(I)}).R("encv",l).R("enca",l).R("dvav",r).R("dva1",r).R("dvh1",r).R("dvhe",r).R("dvc1",r).R("dvi1",r).R("hev1",r).R("hvc1",r).R("avc1",r).R("avc3",r).R("ac-3",i).R("ec-3",i).R("ac-4",i).R("Opus",i).R("fLaC",i).R("mp4a",i).parse(t),h)return t;if(T.length==0||!v)throw gr(t),new Y(2,3,3019,n);T.reverse(),n=A(T);for(var b=n.next();!b.done;b=n.next())b=b.value,f=Fg(e,f,v,b.box,S,b.hh);return Ql()&&za()&&!$i()?(e=new Uint8Array(t.byteLength+f.byteLength),e.set(f),e.set(t,f.byteLength),e):f}function wd(e){e=Je(e);var t=[];new Pt().box("mdat",function(c){t.push(c)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],l=t[i];n.push(xh(e.subarray(r?r.start+r.size:0,l.start+l.size)))}return Ht.apply(Nn,te(n))}function xh(e){function t(T){c.push(T),Ze(T)}var n,i,r,l,c=[];if(new Pt().box("moof",t).box("traf",t).R("tfhd",function(T){n=T,r=cu(T.reader,T.flags)}).R("trun",function(T){i=T,l=Fc(T.reader,T.version,T.flags)}).parse(e),r&&r.rh!==2){var f=n.start+fo(n)+4+(r.Wh!==null?8:0),h=Ti(e);if(r.rh!==null)h.setUint32(f,2);else{Qc(e,n.start,n.size+4);var v=h.getUint32(n.start+8);h.setUint32(n.start+8,v|2),l&&l.nf!==null&&h.setInt32(i.start+fo(i)+4,l.nf+4),v=e.subarray(0,f),h=e.subarray(f),e=new Uint8Array(e.byteLength+4),e.set(v),v=[];for(var S=3;0<=S;S--)v.push(2>>8*S&255);for(e.set(new Uint8Array(v),f),e.set(h,f+4),f=A(c),h=f.next();!h.done;h=f.next())h=h.value,Qc(e,h.start,h.size+4)}}return e}function Fg(e,t,n,i,r,l){var c=Pl(new fu([]),e,i.name),f=t.subarray(i.start,i.start+i.size);for(e=new Uint8Array(i.size+c.byteLength),e.set(f,0),Ti(e).setUint32(4,l),e.set(c,i.size),Qc(e,0,e.byteLength),l=new Uint8Array(t.byteLength+e.byteLength),i=ni()||$i()||Ql()?i.start:i.start+i.size,c=t.subarray(i),l.set(t.subarray(0,i)),l.set(e,i),l.set(c,i+e.byteLength),t=A(r),r=t.next();!r.done;r=t.next())r=r.value,Qc(l,r.start,r.size+e.byteLength);return e=Ti(l,n.start),n=fo(n),t=e.getUint32(n),e.setUint32(n,t+1),l}function Qc(e,t,n){e=Ti(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function Xg(e){function t(r){i.push({start:r.start,size:r.size}),Ze(r)}var n=Je(e),i=[];return new Pt().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(r){i.push({start:r.start,size:r.size});for(var l=Ti(n,r.start),c=0;c<r.size-3;c++){var f=l.getUint32(c);f==1633889587?l.setUint32(c,1700998451):f==1684103987&&l.setUint32(c,1684366131)}}).parse(n),n}function Ei(e,t,n,i,r,l,c,f){this.N=e,this.Sa=t,this.wa=n,this.Wc=i===void 0?null:i,this.timescale=r===void 0?null:r,this.h=l===void 0?null:l,this.aesKey=c===void 0?null:c,this.g=this.mimeType=this.codecs=null,this.encrypted=f===void 0?!1:f}Ei.prototype.uc=function(){return this.Sa},Ei.prototype.tc=function(){return this.wa},Ei.prototype.Kd=function(e){this.h=e},Ei.prototype.Ib=function(){return this.h};function Os(e,t){return e===t?!0:e&&t?e.uc()==t.uc()&&e.tc()==t.tc()&&es(e.N().sort(),t.N().sort())&&ll(e.Ib(),t.Ib()):e==t}Me("shaka.media.InitSegmentReference",Ei),Ei.prototype.getEndByte=Ei.prototype.tc,Ei.prototype.getStartByte=Ei.prototype.uc;function Ke(e,t,n,i,r,l,c,f,h,v,S,T,b,I,O,P){for(v=v===void 0?[]:v,I=I===void 0?po:I,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Sa=i,this.wa=r,this.Y=l,this.timestampOffset=c,this.appendWindowStart=f,this.appendWindowEnd=h,this.g=v,this.tilesLayout=S===void 0?"":S,this.B=T===void 0?null:T,this.h=b===void 0?null:b,this.status=I,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=O===void 0?null:O,this.thumbnailSprite=null,this.i=-1,this.A=P===void 0?!1:P,this.F=this.o=!1,e=A(this.g),t=e.next();!t.done;t=e.next())t.value.fh();this.A&&this.g.length&&this.g[this.g.length-1].eh(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}y=Ke.prototype,y.N=function(){return this.C()},y.getStartTime=function(){return this.startTime},y.mi=function(){return this.endTime},y.uc=function(){return this.Sa},y.tc=function(){return this.wa},y.Ji=function(){return this.tilesLayout},y.Ii=function(){return this.B},y.dc=function(){return this.status},y.aj=function(){this.status=Jc},y.Sf=function(){this.preload=!0},y.isPreload=function(){return this.preload},y.Vc=function(){this.l=!1},y.Ti=function(){return this.l},y.fh=function(){this.o=!0},y.Vi=function(){return this.o},y.eh=function(){this.F=!0},y.Ui=function(){return this.F},y.dh=function(){this.m=!0},y.Pi=function(){return this.m},y.De=function(e){this.thumbnailSprite=e},y.Gi=function(){return this.thumbnailSprite},y.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=A(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},y.qg=function(e){this.h==null?Qr("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},y.Kd=function(e,t){this.u=e,this.G=t===void 0?!1:t},y.Ib=function(e){var t=this.u;return(e===void 0||e)&&this.G&&(this.u=null),t};function Eh(e,t){e.Y=t,e=A(e.g);for(var n=e.next();!n.done;n=e.next())Eh(n.value,t)}Me("shaka.media.SegmentReference",Ke),Ke.prototype.getSegmentData=Ke.prototype.Ib,Ke.prototype.setSegmentData=Ke.prototype.Kd,Ke.prototype.syncAgainst=Ke.prototype.qg,Ke.prototype.offset=Ke.prototype.offset,Ke.prototype.getThumbnailSprite=Ke.prototype.Gi,Ke.prototype.setThumbnailSprite=Ke.prototype.De,Ke.prototype.hasByterangeOptimization=Ke.prototype.Pi,Ke.prototype.markAsByterangeOptimization=Ke.prototype.dh,Ke.prototype.isLastPartial=Ke.prototype.Ui,Ke.prototype.markAsLastPartial=Ke.prototype.eh,Ke.prototype.isPartial=Ke.prototype.Vi,Ke.prototype.markAsPartial=Ke.prototype.fh,Ke.prototype.isIndependent=Ke.prototype.Ti,Ke.prototype.markAsNonIndependent=Ke.prototype.Vc,Ke.prototype.isPreload=Ke.prototype.isPreload,Ke.prototype.markAsPreload=Ke.prototype.Sf,Ke.prototype.markAsUnavailable=Ke.prototype.aj,Ke.prototype.getStatus=Ke.prototype.dc,Ke.prototype.getTileDuration=Ke.prototype.Ii,Ke.prototype.getTilesLayout=Ke.prototype.Ji,Ke.prototype.getEndByte=Ke.prototype.tc,Ke.prototype.getStartByte=Ke.prototype.uc,Ke.prototype.getEndTime=Ke.prototype.mi,Ke.prototype.getStartTime=Ke.prototype.getStartTime,Ke.prototype.getUris=Ke.prototype.N;var po=0,Jc=1;Ke.Status={Nj:po,Lk:Jc,lk:2};function oa(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function xd(e){return!e||oa(e)?null:e.length?e.end(e.length-1):null}function Zc(e,t){return!e||!e.length||oa(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Ah(e,t){if(!e||!e.length||oa(e))return 0;var n=0;e=A(ho(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,r=r.end,r>t&&(n+=r-Math.max(i,t))}return n}function _l(e,t,n){return!e||!e.length||oa(e)?null:(e=ho(e).findIndex(function(i,r,l){return i.start>t&&(r==0||l[r-1].end-t<=n)}),0<=e?e:null)}function ho(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 Yg(){}function Ch(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function Ni(e){for(;e.firstChild;)e.removeChild(e.firstChild)}Me("shaka.util.Dom",Yg),Yg.removeAllChildren=Ni;/*
|
||
@license
|
||
Shaka Player
|
||
Copyright 2022 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function Ed(){}function $c(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function ks(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function On(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function a0(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var i=Zt(Je(e.data,1,n)),r=e.data[2+n],l=e.data.subarray(3+n).indexOf(0);if(l===-1)return null;var c=Zt(Je(e.data,3+n,l)),f;return i==="-->"?f=Zt(Je(e.data,4+n+l)):f=yr(e.data.subarray(4+n+l)),t.mimeType=i,t.pictureType=r,t.description=c,t.data=f,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=Zt(Je(e.data,1,i)),e=Zt(Je(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=Zt(Je(e.data,1,i)),e=Zt(Je(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=Zt(Je(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=yr(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=Zt(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=Zt(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=yr(e.data),t):null}function la(e){for(var t=0,n=[];$c(e,t);){var i=On(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),l=On(r,4);r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:l,data:r.subarray(10,10+l)},(l=a0(r))&&n.push(l),t+=r.size+10}ks(e,t)&&(t+=10)}return n}function ua(e,t){for(var n=t=t===void 0?0:t,i=0;$c(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=On(e,t+6),ks(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}Me("shaka.util.Id3Utils",Ed),Ed.getID3Data=ua,Ed.getID3Frames=la;function Er(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&e[i]==3&&e[i-1]==0&&e[i-2]==0||(t[n]=e[i],n++);this.j=Je(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function zo(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);i!==0&&(n.set(e.j.subarray(t,t+i)),e.h=new Yt(n,0).S(),e.g=8*i,e.i-=i)}function Pi(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,zo(e)}e.h<<=t,e.g-=t}function ht(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&zo(e),n=t-n,0<n?i<<n|ht(e,n):i}function aa(e){var t;for(t=0;t<e.g;++t)if((e.h&2147483648>>>t)!==0)return e.h<<=t,e.g-=t,t;return zo(e),t+aa(e)}function kn(e){Pi(e,1+aa(e))}function Ne(e){var t=aa(e);return ht(e,t+1)-1}function hu(e){return e=Ne(e),1&e?1+e>>>1:-1*(e>>>1)}function He(e){return ht(e,1)===1}function Dt(e){return ht(e,8)}function Ms(e,t){for(var n=8,i=8,r=0;r<t;r++)i!==0&&(i=hu(e),i=(n+i+256)%256),n=i===0?n:i}function Ad(e){return Dt(e),Ne(e),Ne(e)}Me("shaka.util.ExpGolomb",Er);function Wt(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.u=null}y=Wt.prototype,y.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},y.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Cd(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(e[r]==71){var l=!!(e[r+1]&64),c=((e[r+1]&31)<<8)+e[r+2];if(1<(e[r+3]&48)>>4){var f=r+5+e[r+4];if(f==r+188)continue}else f=r+4;switch(c){case 0:l&&(f+=e[f]+1),this.G=(e[f+10]&31)<<8|e[f+11];break;case 17:case 8191:break;case this.G:l&&(f+=e[f]+1),l=e,c={audio:-1,video:-1,ce:-1,audioCodec:"",videoCodec:""};var h=f+3+((l[f+1]&15)<<8|l[f+2])-4;for(f+=12+((l[f+10]&15)<<8|l[f+11]);f<h;){var v=(l[f+1]&31)<<8|l[f+2],S=(l[f+3]&15)<<8|l[f+4];switch(l[f]){case 6:if(0<S)for(var T=f+5,b=S;2<b;){var I=l[T+1]+2;switch(l[T]){case 5:var O=Xa(l.subarray(T+2,T+I));c.audio==-1&&O==="Opus"?(c.audio=v,c.audioCodec="opus"):c.video==-1&&O==="AV01"&&(c.video=v,c.videoCodec="av1");break;case 106:c.audio==-1&&(c.audio=v,c.audioCodec="ac3");break;case 122:c.audio==-1&&(c.audio=v,c.audioCodec="ec3");break;case 124:c.audio==-1&&(c.audio=v,c.audioCodec="aac");break;case 127:c.audioCodec=="opus"&&(O=null,l[T+2]===128&&(O=l[T+3]),O!=null&&(this.F={channelCount:(O&15)===0?2:O&15,Zh:O,sampleRate:48e3}))}T+=I,b-=I}break;case 15:c.audio==-1&&(c.audio=v,c.audioCodec="aac");break;case 17:c.audio==-1&&(c.audio=v,c.audioCodec="aac-loas");break;case 21:c.ce==-1&&(c.ce=v);break;case 27:c.video==-1&&(c.video=v,c.videoCodec="avc");break;case 3:case 4:c.audio==-1&&(c.audio=v,c.audioCodec="mp3");break;case 36:c.video==-1&&(c.video=v,c.videoCodec="hvc");break;case 129:c.audio==-1&&(c.audio=v,c.audioCodec="ac3");break;case 132:case 135:c.audio==-1&&(c.audio=v,c.audioCodec="ec3")}f+=S+5}l=c,l.video!=-1&&(this.I=l.video,this.m=l.videoCodec),l.audio!=-1&&(this.B=l.audio,this.A=l.audioCodec),l.ce!=-1&&(this.C=l.ce),i&&!this.H&&(i=!1,r=t-188),this.H=!0;break;case this.I:f=e.subarray(f,r+188),l?this.j.push([f]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(f);break;case this.B:f=e.subarray(f,r+188),l?this.i.push([f]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(f);break;case this.C:f=e.subarray(f,r+188),l?this.l.push([f]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(f);break;default:i=!0}}return this};function yo(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)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(i&192){var r=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.u==null&&(e.u=r),n.pts=hi(r,e.u),e.u=n.pts,n.dts=n.pts,i&64&&(i=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=i),n.dts=hi(i,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}y.hj=function(e){return bt("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xf(e,{Dd:null,state:null})},y.Xf=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var i=e.byteLength,r=1;this.m=="hvc"&&(r=2);var l=t.state||0,c=l,f=0,h=[],v=-1,S=0;for(l==-1&&(v=0,S=this.m=="hvc"?e[0]>>1&63:e[0]&31,l=0,f=1);f<i;){var T=e[f++];l?l===1?l=T?0:2:T?T==1?(T=f-l-1,0<=v?h.push({data:e.subarray(v+r,T),fullData:e.subarray(v,T),type:S,time:n,state:null}):(l=h.length?h[h.length-1]:t.Dd)&&(c&&f<=4-c&&l.state&&(l.data=l.data.subarray(0,l.data.byteLength-c),l.fullData=l.fullData.subarray(0,l.fullData.byteLength-c)),0<T&&(T=e.subarray(0,T),l.data=Ht(l.data,T),l.fullData=Ht(l.fullData,T),l.state=0)),f<i?(S=this.m=="hvc"?e[f]>>1&63:e[f]&31,v=f,l=0):l=-1):l=0:l=3:l=T?0:1}return 0<=v&&0<=l&&h.push({data:e.subarray(v+r,i),fullData:e.subarray(v,i),type:S,time:n,state:l}),!h.length&&t.Dd&&(n=h.length?h[h.length-1]:t.Dd)&&(n.data=Ht(n.data,e),n.fullData=Ht(n.fullData,e)),t.state=l,h},y.getMetadata=function(){for(var e=[],t=A(this.l),n=t.next();!n.done;n=t.next())n=Ht.apply(Nn,te(n.value)),(n=yo(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:la(n.data),dts:n.dts,pts:n.pts});return e},y.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=A(this.i),n=t.next();!n.done;n=t.next()){var i=Ht.apply(Nn,te(n.value)),r=yo(this,i);n=this.h.length?this.h[this.h.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&(n=this.h.pop(),n.data=Ht(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(l,c){var f=(l.pts||0)-(c.pts||0);return(l.dts||0)-(c.dts||0)||f}))}return this.h},y.wc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=!1,n=A(this.j),i=n.next();!i.done;i=n.next()){var r=Ht.apply(Nn,te(i.value)),l=yo(this,r);i=this.g.length?this.g[this.g.length-1]:null,l&&l.pts!=null&&l.dts!=null&&(!i||i.pts!=l.pts&&i.dts!=l.dts)?(this.g.length&&l.dts<(i.dts||0)&&(t=!0),this.g.push(l)):this.g.length&&(r=l?l.data:r)&&(i=this.g.pop(),i.data=Ht(i.data,r),this.g.push(i))}if(e){for(n={Dd:null,state:null},i=[],r=A(this.g),l=r.next();!l.done;l=r.next())l=l.value,l.nalus=this.Xf(l,n),l.nalus.length&&(i.push(l),n.Dd=l.nalus[l.nalus.length-1]);this.g=i}t&&(this.g=this.g.sort(function(c,f){var h=(c.pts||0)-(f.pts||0);return(c.dts||0)-(f.dts||0)||h}))}return e?this.g:(e=this.g,this.g=[],e)},y.getStartTime=function(e){if(e=="audio"){e=null;var t=this.fb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.wc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},y.od=function(){return{audio:this.A,video:this.m}},y.be=function(){for(var e=[],t=A(this.wc()),n=t.next();!n.done;n=t.next())e.push.apply(e,te(n.value.nalus));return e},y.Mi=function(){bt("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Kf();return{height:e.height,width:e.width}},y.Kf=function(){return this.m=="hvc"?Wg(this):bh(this)};function zn(e){var t=e.wc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function bh(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(I){return I.type==7}),!n))return t;n=new Er(n.data);var i=Dt(n),r=Dt(n),l=Dt(n);if(kn(n),Qg.includes(i)){var c=Ne(n);if(c===3&&Pi(n,1),kn(n),kn(n),Pi(n,1),He(n)){c=c!==3?8:12;for(var f=0;f<c;f++)He(n)&&(6>f?Ms(n,16):Ms(n,64))}}if(kn(n),c=Ne(n),c===0)Ne(n);else if(c===1)for(Pi(n,1),kn(n),kn(n),c=Ne(n),f=0;f<c;f++)kn(n);kn(n),Pi(n,1),c=Ne(n),f=Ne(n);var h=ht(n,1);h===0&&Pi(n,1),Pi(n,1);var v=0,S=0,T=0,b=0;return He(n)&&(v=Ne(n),S=Ne(n),T=Ne(n),b=Ne(n)),t.height=String((2-h)*(f+1)*16-2*T-2*b),t.width=String(16*(c+1)-2*v-2*S),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+l.toString(16).toUpperCase()).slice(-2),t.frameRate=zn(e),t}function Wg(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.be();if(!n.length||(n=n.find(function(J){return J.type==33}),!n))return t;var i=new Er(n.fullData,!0);Dt(i),Dt(i),ht(i,4);var r=ht(i,3);He(i);var l=ht(i,2),c=ht(i,1),f=ht(i,5),h=ht(i,32);n=Dt(i);for(var v=Dt(i),S=Dt(i),T=Dt(i),b=Dt(i),I=Dt(i),O=Dt(i),P=[],N=[],_=0;_<r;_++)P.push(He(i)),N.push(He(i));if(0<r)for(_=r;8>_;_++)ht(i,2);for(_=0;_<r;_++)P[_]&&ht(i,88),N[_]&&Dt(i);Ne(i),r=Ne(i),r==3&&ht(i,1),P=Ne(i),N=Ne(i);var B=_=0,F=0,z=0;return He(i)&&(_+=Ne(i),B+=Ne(i),F+=Ne(i),z+=Ne(i)),t.width=String(P-(_+B)*(r===1||r===2?2:1)),t.height=String(N-(F+z)*(r===1?2:1)),i=function(J){for(var q=0,K=0;32>K;K++)q|=(J>>K&1)<<31-K;return q>>>0}(h),c=c==1?"H":"L",l="hvc1"+("."+["","A","B","C"][l]+f),l+="."+i.toString(16).toUpperCase(),l+="."+c+O,I&&(l+="."+I.toString(16).toUpperCase()),b&&(l+="."+b.toString(16).toUpperCase()),T&&(l+="."+T.toString(16).toUpperCase()),S&&(l+="."+S.toString(16).toUpperCase()),v&&(l+="."+v.toString(16).toUpperCase()),n&&(l+="."+n.toString(16).toUpperCase()),t.codec=l,t.frameRate=zn(e),t}function hi(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Rs(e){return!(0>Cd(e))}function Cd(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}Me("shaka.util.TsParser",Wt),Wt.syncOffset=Cd,Wt.probe=Rs,Wt.prototype.getVideoInfo=Wt.prototype.Kf,Wt.prototype.getVideoResolution=Wt.prototype.Mi,Wt.prototype.getVideoNalus=Wt.prototype.be,Wt.prototype.getCodecs=Wt.prototype.od,Wt.prototype.getStartTime=Wt.prototype.getStartTime,Wt.prototype.getVideoData=Wt.prototype.wc,Wt.prototype.getAudioData=Wt.prototype.fb,Wt.prototype.getMetadata=Wt.prototype.getMetadata,Wt.prototype.parseNalus=Wt.prototype.Xf,Wt.prototype.parseAvcNalus=Wt.prototype.hj,Wt.prototype.parse=Wt.prototype.parse,Wt.prototype.clearData=Wt.prototype.clearData,Wt.Timescale=9e4;var Qg=[100,110,122,244,44,83,86,118,128,138,139,134];function Mn(e,t,n,i){var r=this;this.g=e,this.K=n,this.A=null,this.ea=t,this.l=new Map,this.B=new Map,this.Aa=new Map,this.h=null,this.Ea=!1,this.I=i||null,this.u=new Map,this.o=new yt,this.j=new Map,this.L=null,this.G=new It,this.Ga="",this.Na=!1,this.sa=!0,this.$=!1,this.C=this.M=null,this.i=Li(this,this.G),this.ya=this.H=!1,this.O=new Ss(function(){return s0(r)}),this.F=!1,this.P="UNKNOWN",this.La=this.Ma=!1,this.Fa=new It,this.m=!1,this.pa=null,this.Z=new Map,this.ka=this.T=this.oa=this.W=null,this.fa=new It,this.g.remote&&(this.$=this.g.remote.state!="disconnected",this.o.D(this.g.remote,"connect",function(){r.$=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"connecting",function(){r.$=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"disconnect",function(){r.$=r.g.remote.state!="disconnected"}))}function Li(e,t){if(e.sa=!0,E.ManagedMediaSource){e.C||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.o.D(n,"startstreaming",function(){e.sa=!0}),e.o.D(n,"endstreaming",function(){e.sa=!1})}else n=new MediaSource;return e.o.ma(n,"sourceopen",function(){URL.revokeObjectURL(e.Ga),t.resolve()}),e.o.ma(e.g,"playing",function(){e.Na=!0}),e.Ga=of(n),e.g.removeAttribute("src"),e.M&&e.g.removeChild(e.M),e.C&&e.g.removeChild(e.C),e.M=Ch(e.Ga),e.g.appendChild(e.M),e.C&&e.g.appendChild(e.C),e.g.load(),n}function Ul(e,t,n){e.g&&E.ManagedMediaSource&&e.i&&(e.C&&e.g.removeChild(e.C),e.C=Ch(t,n),e.g.appendChild(e.C),e.g.disableRemotePlayback=!1)}function Jg(e,t){var n,i,r,l,c,f,h,v,S,T,b;return G(function(I){if(I.g==1)return e.createSegmentIndex?L(I,e.createSegmentIndex(),2):I.s(2);if(!e.segmentIndex)return I.return(!1);if(e.segmentIndex.getNumReferences()==0)return I.return(!0);for(n=wn,i=new Set,r=A(e.segmentIndex),l=r.next();!l.done;l=r.next())if(c=l.value,f=c.mimeType||e.mimeType||"",h=c.codecs||e.codecs||"",(f!=e.mimeType||h!=e.codecs)&&(v=f+":"+h,!i.has(v))){if(i.add(v),t==n.za){if(S=dn(f,h),!xl(S))return I.return(!1)}else if(t==n.la?h=ps(h):t==n.V&&(h=ri(h,f)),T=Wf(e,f,h),b=oo(f,h),!Ln(T)&&!Sl(b))return I.return(!1)}return I.return(!0)})}function Zg(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(te(lo)),t={};e=A(e);for(var n=e.next();!n.done;n=e.next()){n=n.value,xl(n)?t[n]=!0:t[n]=$r()?Ln(n)||!!Sl(n):Tc(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}y=Mn.prototype,y.destroy=function(){return this.O.destroy()};function s0(e){var t,n,i,r,l,c,f,h,v,S,T,b,I,O,P;return G(function(N){if(N.g==1){for(t=[],n=A(e.u),i=n.next();!i.done;i=n.next())for(r=i.value,l=A(r),c=l.next().value,f=l.next().value,h=f[0],v=c,e.u.set(v,f.slice(0,1)),h&&t.push(h.p.catch(gg)),S=A(f.slice(1)),T=S.next();!T.done;T=S.next())b=T.value,b.p.reject(new Y(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),L(N,Promise.all(t),2)}for(I=A(e.j.values()),O=I.next();!O.done;O=I.next())P=O.value,P.destroy();e.o&&(e.o.release(),e.o=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.M&&(e.g.removeChild(e.M),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.M=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Aa.clear(),e.j.clear(),e.L=null,e.u.clear(),e.I=null,e.Z.clear(),e.K=null,ce(N)})}y.init=function(e,t,n,i){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,i=i===void 0?!1:i;var r=this,l,c,f,h,v,S;return G(function(T){switch(T.g){case 1:return l=wn,L(T,r.G,2);case 2:if(!yu(r)&&!Ai(r)){T.s(3);break}return Qr("Expected MediaSource to be open during init(); reopening the media source."),r.G=new It,r.i=Li(r,r.G),L(T,r.G,3);case 3:r.F=t,r.P=n,r.Ma=i,r.La=!r.F&&r.P=="HLS"&&!r.Ma,r.Z.clear(),r.W=null,r.oa=null,r.T=null,r.ka=null,r.fa=new It,c=A(e.keys()),f=c.next();case 5:if(f.done){T.s(7);break}return h=f.value,v=e.get(h),L(T,Ns(r,h,v,v.codecs),8);case 8:r.m?(r.u.set(l.V,[]),r.u.set(l.la,[])):r.u.set(h,[]),f=c.next(),T.s(5);break;case 7:(S=e.get(l.V))&&S.isAudioMuxedInVideo&&(r.m=!0),ce(T)}})};function Ns(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P;return G(function(N){switch(N.g){case 1:return r=wn,l=Cp,c=bp,L(N,Jg(n,t),2);case 2:if(c.call(l,N.h,"Type negotiation should happen before MediaSourceEngine.init!"),t==r.V&&i&&(i=ri(i,n.mimeType)),f=dn(n.mimeType,i),t==r.za){lr(e,f,e.F,n.external),N.s(0);break}if(h=e.A.forceTransmux,(!Ln(f)||!e.F&&lo.includes(f))&&(h=!0),v=oo(n.mimeType,i),!h){N.s(4);break}if(S=ci(r.V,(i||"").split(",")),T=ci(r.la,(i||"").split(",")),!S||!T){N.s(5);break}return e.m=!0,L(N,Ns(e,r.V,n,S),6);case 6:return L(N,Ns(e,r.la,n,T),7);case 7:return N.return();case 5:(b=Sl(v))&&(I=b(),e.j.set(t,I),f=I.convertCodecs(t,v));case 4:O=f+e.A.addExtraFeaturesToSourceBuffer(f),at(e.O);try{P=e.i.addSourceBuffer(O)}catch(_){throw new Y(2,3,3015,_,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(P.mode=jl),e.o.D(P,"error",function(){var _=e.u.get(t)[0];_.p.reject(new Y(2,3,3014,e.g.error?e.g.error.code:0,_.uri))}),e.o.D(P,"updateend",function(){return jr(e,t)}),e.l.set(t,P),e.B.set(t,f),e.Aa.set(t,!!n.drmInfos.length),ce(N)}})}y.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function or(e){return e.sa&&!e.$&&!e.H}function lr(e,t,n,i){e.h||(e.h=new uo(e.ea),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ea,e=e.P,t=="application/cea-608"||t=="application/cea-708"?r.i=null:(r.i=Tr.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):bt("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):bt("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function yu(e){return e.H?!1:e.i?e.i.readyState=="ended":!0}function Ai(e){return e.H?!1:e.i?e.i.readyState=="closed":!0}function bd(e,t){return e.l.size?t==ot?e=e.h.g:(e=Ar(e,t),e=!e||oa(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function ur(e,t){return e.l.size?t==ot?e.h.h:xd(Ar(e,t)):null}function sa(e,t,n){return t==ot?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Ar(e,t),Ah(e,n))}y.Fb=function(){var e={total:this.H?[]:ho(this.g.buffered),audio:ho(Ar(this,"audio")),video:ho(Ar(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function Ar(e,t){if(e.H||e.$)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function Ih(e,t,n,i,r,l){var c=null,f=[],h=Je(n);if(lo.includes(l))t=la(h),t.length&&i&&((n=t.find(function(I){return I.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=Math.round(n.data)/1e3),e.K.onMetadata([{cueTime:i.startTime,data:h,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(l.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var v=i.Y.timescale;if(!isNaN(v)){var S=r.emsgSchemeIdUris!=null&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,T=0,b=!1;h=new Pt,S&&h.R("emsg",function(I){var O=r.emsgSchemeIdUris;if(I.version===0)var P=I.reader.Cc(),N=I.reader.Cc(),_=I.reader.S(),B=I.reader.S(),F=I.reader.S(),z=I.reader.S(),J=i.startTime+B/_;else _=I.reader.S(),J=I.reader.bd()/_+i.timestampOffset,B=J-i.startTime,F=I.reader.S(),z=I.reader.S(),P=I.reader.Cc(),N=I.reader.Cc();I=I.reader.Cb(I.reader.getLength()-I.reader.Ba()),(O&&O.includes(P)||e.A.dispatchAllEmsgBoxes)&&(P=="urn:mpeg:dash:event:2012"?e.K.gj():(O=J+F/_,_={startTime:J,endTime:O,schemeIdUri:P,value:N,timescale:_,presentationTimeDelta:B,eventDuration:F,id:z,messageData:I},z=new Map().set("detail",_),new Ie("emsg",z).cancelable=!0,e.K.ej(_),(P=="https://aomedia.org/emsg/ID3"||P=="https://developer.apple.com/streaming/emsg-id3")&&(P=la(I),P.length&&e.K.onMetadata([{cueTime:J,data:I,frames:P,dts:J,pts:J}],0,O))))}),h.R("prft",function(I){var O=I.reader,P=I.version;O.S(),I=O.S();var N=O.S();I=1e3*I+N/Math.pow(2,32)*1e3,P===0?O=O.S():(P=O.S(),O=O.S(),O=P*Math.pow(2,32)+O),I=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+I).getTime(),O=new Map().set("detail",{wallClockTime:I,programStartDate:new Date(I-O/v*1e3)}),O=new Ie("prft",O),e.K.onEvent(O)}).box("moof",Ze).box("traf",Ze).R("tfdt",function(I){b||(T=na(I.reader,I.version).baseMediaDecodeTime/v,b=!0,S||I.parser.stop())}).parse(n,!0),b&&i.timestampOffset==0&&(c=T)}}else l.includes("/mp4")||l.includes("/webm")||!Rs(h)||(e.Z.has(t)?e.Z.get(t).clearData():e.Z.set(t,new Wt),f=e.Z.get(t).parse(h),h=f.getStartTime(t),h!=null&&(c=h),f=f.getMetadata());return{timestamp:c,metadata:f}}function Ps(e,t,n,i,r,l,c,f,h,v){c=c===void 0?!1:c,f=f===void 0?!1:f,h=h===void 0?!1:h,v=v===void 0?!1:v;var S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie;return G(function(Z){switch(Z.g){case 1:if(S=wn,t!=S.za){Z.s(2);break}if(e.P!="HLS"){Z.s(3);break}return L(Z,e.Fa,4);case 4:T=Z.h,e.h.u=T;case 3:return L(Z,Jf(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.N()[0]:null),5);case 5:return Z.return();case 2:if(v||!e.m){Z.s(6);break}return L(Z,Ps(e,S.V,n,i,r,l,c,f,h,!0),7);case 7:return L(Z,Ps(e,S.la,n,i,r,l,c,f,h,!0),8);case 8:return Z.return();case 6:if(!e.l.has(t))return Z.return();if(b=e.l.get(t).timestampOffset,I=e.B.get(t),e.j.has(t)&&(I=e.j.get(t).getOriginalMimeType()),i&&(O=Ih(e,t,n,i,r,I),P=O.timestamp,N=O.metadata,P!=null&&(e.W==null&&t==S.la&&(e.W=P,e.oa=i.startTime,e.T!=null&&(_=0,e.oa==e.ka&&(_=e.W-e.T),e.fa.resolve(_))),e.T==null&&t==S.V&&(e.T=P,e.ka=i.startTime,e.W!=null&&(B=0,e.oa==e.ka&&(B=e.W-e.T),e.fa.resolve(B))),F=P,z=lo,!e.F&&z.includes(e.B.get(t))&&(F=0),J=i.startTime-F,q=Math.abs(b-J),(.001<=q||c||f)&&(!h||0<J||!b)&&(b=J,e.La&&(jn(e,t,function(){return Xo(e,t)},null),jn(e,t,function(){return fa(e,t,b)},null))),(t==S.la||!e.l.has(S.la))&&e.Fa.resolve(b)),N.length)&&e.K.onMetadata(N,b,i?i.endTime:null),l&&t==S.la&&(e.h||lr(e,"application/cea-608",e.F,!1),e.L||(K=I.split(";",1)[0],e.L=new tr(K)),i?(W=e.L.i(n),W.length&&El(e.h,W,i.startTime,i.endTime,b)):e.L.init(n,f)),!e.j.has(t)){Z.s(9);break}return L(Z,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=Z.h;case 9:if(n=In(e,r,n,i,t),!i||!e.F||t==S.za){Z.s(11);break}if(!c&&!f){Z.s(11);break}if(Q=i.startTime,e.P!="HLS"||e.m||t!=S.V||!e.l.has(S.la)){Z.s(13);break}return L(Z,e.fa,14);case 14:ie=Z.h,.15<Math.abs(ie)&&(Q-=ie);case 13:jn(e,t,function(){return Xo(e,t)},null),jn(e,t,function(){return fa(e,t,Q)},null);case 11:return L(Z,jn(e,t,function(){var ne=n;e.I&&Ya(e.I,ne,b,r),e.l.get(t).appendBuffer(ne)},i?i.N()[0]:null),15);case 15:ce(Z)}})}function Fo(e,t){var n=ur(e,"video")||0;Sr(e.h,t,n)}function $g(e){e.h&&Sr(e.h,"",0)}y.remove=function(e,t,n){var i=this,r;return G(function(l){return l.g==1?(r=wn,e==r.za?L(l,i.h.remove(t,n),0):n>t?L(l,jn(i,e,function(){return nf(i,e,t,n)},null),5):l.s(0)):i.m?L(l,jn(i,r.V,function(){return nf(i,r.V,t,n)},null),0):l.s(0)})};function ca(e,t){var n;return G(function(i){return i.g==1?(n=wn,t==n.za?e.h?L(i,e.h.remove(0,1/0),0):i.return():L(i,jn(e,t,function(){return nf(e,t,0,e.i.duration)},null),4)):e.m?L(i,jn(e,n.V,function(){return nf(e,n.V,0,e.i.duration)},null),0):i.s(0)})}y.flush=function(e){var t=this,n;return G(function(i){return i.g==1?(n=wn,e==n.za?i.return():L(i,jn(t,e,function(){t.g.currentTime-=.001,jr(t,e)},null),2)):t.m?L(i,jn(t,n.V,function(){var r=n.V;t.g.currentTime-=.001,jr(t,r)},null),0):i.s(0)})};function ef(e,t,n,i,r,l,c,f,h){var v,S,T;return G(function(b){return b.g==1?(v=wn,t==v.za?(l||(e.h.u=n),Pr(e.h,i,r),b.return()):(S=[],L(b,gu(e,t,c,f,h),2))):(T=b.h,T||(S.push(jn(e,t,function(){return Xo(e,t)},null)),e.m&&S.push(jn(e,v.V,function(){return Xo(e,v.V)},null))),l||(S.push(jn(e,t,function(){return fa(e,t,n)},null)),e.m&&S.push(jn(e,v.V,function(){return fa(e,v.V,n)},null))),(i!=0||r!=1/0)&&(S.push(jn(e,t,function(){var I=e.l.get(t);I.appendWindowStart=0,I.appendWindowEnd=r,I.appendWindowStart=i,jr(e,t)},null)),e.m&&S.push(jn(e,v.V,function(){var I=v.V,O=e.l.get(I);O.appendWindowStart=0,O.appendWindowEnd=r,O.appendWindowStart=i,jr(e,I)},null))),S.length?L(b,Promise.all(S),0):b.s(0))})}function tf(e,t,n){var i,r;return G(function(l){return l.g==1?(i=wn,t==i.za||(t==i.la&&(e.Fa=new It),!e.F||(r=ur(e,t))&&.1>Math.abs(r-n))?l.return():(jn(e,t,function(){return Xo(e,t)},null),e.m&&jn(e,i.V,function(){return Xo(e,i.V)},null),L(l,jn(e,t,function(){return fa(e,t,n)},null),2))):e.m?L(l,jn(e,i.V,function(){return fa(e,i.V,n)},null),0):l.s(0)})}y.endOfStream=function(e){var t=this;return G(function(n){return L(n,rf(t,function(){yu(t)||Ai(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},y.bb=function(e){var t=this;return G(function(n){return L(n,rf(t,function(){if(e<t.i.duration)for(var i=A(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var l={start:function(){},p:new It,uri:null};t.u.get(r).unshift(l)}t.i.duration=e,t.pa=e}),0)})},y.getDuration=function(){return this.i.duration};function Ls(e,t,n){G(function(i){return yu(e)||Ai(e)?i.return():L(i,rf(e,function(){yu(e)||Ai(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function Id(e){G(function(t){return yu(e)||Ai(e)?t.return():L(t,rf(e,function(){yu(e)||Ai(e)||e.i.clearLiveSeekableRange()}),0)})}function nf(e,t,n,i){i<=n?jr(e,t):e.l.get(t).remove(n,i)}function Xo(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,jr(e,t)}function fa(e,t,n){0>n&&(n+=.001);var i=!0;e.P=="HLS"&&(i=ur(e,t),i=!i||.15<Math.abs(i-n)),i&&(e.l.get(t).timestampOffset=n),jr(e,t)}function jr(e,t){if(!e.H){var n=e.u.get(t)[0];n&&(n.p.resolve(),Dh(e,t))}}function jn(e,t,n,i){return at(e.O),n={start:n,p:new It,uri:i},e.u.get(t).push(n),e.u.get(t).length==1&&an(e,t),n.p}function rf(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O;return G(function(P){switch(P.g){case 1:for(at(e.O),n=[],i=Array.from(e.l.keys()),r=A(i),l=r.next(),c={};!l.done;c={ready:void 0},l=r.next())f=l.value,c.ready=new It,h={start:function(N){return function(){return N.ready.resolve()}}(c),p:c.ready,uri:null},v=e.u.get(f),v.push(h),n.push(c.ready),v.length==1&&h.start();return ye(P,2),L(P,Promise.all(n),4);case 4:Le(P,3);break;case 2:throw S=De(P),S;case 3:return ye(P,5,6),L(P,t(),6);case 6:for(Te(P),T=A(i),b=T.next();!b.done;b=T.next())I=b.value,Dh(e,I);_e(P,0);break;case 5:throw O=De(P),new Y(2,3,3015,O,e.g.error||"No error in the media element",null)}})}function Dh(e,t){e.u.get(t).shift(),an(e,t)}function an(e,t){var n=e.u.get(t)[0];if(n)try{n.start()}catch(i){i.name=="QuotaExceededError"?n.p.reject(new Y(2,3,3017,t)):or(e)?n.p.reject(new Y(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new Y(2,3,3024,t)),Dh(e,t)}}function In(e,t,n,i,r){if(Tl(e.B.get(r))!="mp4")return n;var l=i===null,c=e.Aa.get(r),f=e.K.si(),h=!1;return i&&i.Y&&(h=i.Y.encrypted),i=i?i.N()[0]:null,(e=e.A.insertFakeEncryptionInInit&&c)&&(f=Vf(f),e=ni()&&r==="audio"||si()||$i()||Vt("SOPOpenBrowser")||Ql()&&za()&&f),e&&(l?n=zg(t,n,i):((t=!h)&&(t=ni()&&r==="audio"),t&&(n=wd(n)))),l&&eo()&&(n=Xg(n)),n}function qt(e,t,n,i){return jn(e,t,function(){if(t!==ot){if(e.B.get(t),pl()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.A.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.B.set(t,n)}jr(e,t)}},null)}function Jt(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J;return G(function(q){switch(q.g){case 1:if(e.H)return q.return();for(n=wn,e.H=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.ya=!0),e.Na&&(e.g.autoplay=!1),it(q,2),e.o.Qa(),l=A(e.j.values()),c=l.next();!c.done;c=l.next())f=c.value,f.destroy();for(h=A(e.l.values()),v=h.next();!v.done;v=h.next()){S=v.value;try{e.i.removeSourceBuffer(S)}catch{}}return e.j.clear(),e.l.clear(),T=e.i.duration,e.G=new It,e.i=Li(e,e.G),L(q,e.G,4);case 4:!isNaN(T)&&T?e.i.duration=T:!isNaN(e.pa)&&e.pa&&(e.i.duration=e.pa),b=new It,I=e.i.sourceBuffers,O=t.size,P=0,N=function(){P++,P===O&&(b.resolve(),e.o.Ja(I,"addsourcebuffer",N))},e.o.D(I,"addsourcebuffer",N),_=A(t.keys()),B=_.next();case 5:return B.done?((J=t.get(n.V))&&J.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.u.has(n.V)&&e.u.set(n.V,[]),e.g.currentTime=i,L(q,b,2)):(F=B.value,z=t.get(F),L(q,Ns(e,F,z,z.codecs),6));case 6:B=_.next(),q.s(5);break;case 2:Te(q),e.H=!1,at(e.O),e.o.ma(e.g,"canplaythrough",function(){e.O.g||(e.g.autoplay=r,e.ya&&(e.ya=!1,e.g.play()))}),_e(q,0)}})}function sn(e,t){return rf(e,function(){return Jt(e,t)})}function ar(e,t,n,i){var r=!1,l=ci("audio",(i||"").split(",")),c=ci("video",(i||"").split(",")),f=c;t=="audio"&&(f=l),f||(f=i),i=dn(n,f);var h=e.A.forceTransmux;if((!Ln(i)||!e.F&&lo.includes(i))&&(h=!0),h&&(e=oo(n,f),n=Sl(e))){var v=n();l&&c&&(r=!0),i=v.convertCodecs(t,e)}return t=pi(_n(i)),{ug:v,Fj:r,Eg:Di(i),codec:t,mimeType:i}}function gu(e,t,n,i,r){var l,c,f,h,v,S,T,b,I,O,P,N,_,B;return G(function(F){return F.g==1?(l=wn,t==l.za?F.return(!1):(c=pi(_n(e.B.get(t))),f=Di(e.B.get(t)),h=ar(e,t,n,i),v=h.ug,S=h.Fj,T=h.Eg,b=h.codec,I=h.mimeType,O=!0,S&&e.B.has(l.V)&&(P=ar(e,l.V,n,i),N=pi(_n(e.B.get(l.V))),_=Di(e.B.get(l.V)),O=N==P.codec&&_==P.Eg,P.ug&&P.ug.destroy()),c===b&&f===T&&O?(e.j.has(t)&&!v?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&v?e.j.set(t,v):v&&(e.j.has(t)&&e.j.get(t).transmux!=v.transmux?(e.j.get(t).destroy(),e.j.delete(t),e.j.set(t,v)):v.destroy()),F.return(!1)):(B=!0,(e.m||S&&v&&!e.j.has(t))&&(B=!1),B&&e.A.codecSwitchingStrategy==="smooth"&&pl()?L(F,qt(e,t,I,v),3):(v&&v.destroy(),L(F,sn(e,r),3))))):F.return(!0)})}function _s(e,t,n,i){if(t==ot)var r=!1;else{r=pi(_n(e.B.get(t)));var l=Di(e.B.get(t)),c=dn(n,i),f=e.A.forceTransmux;(!Ln(c)||!e.F&&lo.includes(c))&&(f=!0),n=oo(n,i),f&&(f=Sl(n))&&(f=f(),c=f.convertCodecs(t,n),f.destroy()),t=pi(_n(c)),c=Di(c),r=r!==t||l!==c}return r?e.A.codecSwitchingStrategy!=="smooth"||!pl()||e.m:!1}var of=E.URL.createObjectURL,jl="sequence";function Pe(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.u=!1,this.m=e}y=Pe.prototype,y.getDuration=function(){return this.l},y.vi=function(){return this.h},y.yh=function(e){this.i=e},y.bb=function(e){this.l=e},y.Bi=function(){return this.i},y.wh=function(e){this.A=e},y.Gc=function(e){e&&!this.B&&(this.I=!0),this.B=e},y.Ce=function(e){this.o=e},y.ae=function(){return this.o},y.jg=function(e){this.C=e},y.li=function(){return this.C},y.kh=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(r){return r.start+t<n}),e.length!=0){var i=e[e.length-1].end+t;this.ne(e[0].start+t),this.h=e.reduce(function(r,l){return Math.max(r,l.end-l.start)},this.h),this.g=Math.max(this.g,i),this.i!=null&&this.F&&!this.u&&(this.i=n-this.g-this.h)}}},y.Ed=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=A(e);for(var r=e.next();!r.done;r=e.next())r=r.value,i<r.startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.ne(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.u&&(this.i=i-this.g-this.h)}},y.jh=function(e,t){this.ne(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},y.wi=function(){return this.g},y.ie=function(){this.u=!0},y.Wi=function(){return this.u},y.xh=function(e){this.m=e},y.ri=function(){return this.m},y.ne=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},y.Tf=function(e){this.h=Math.max(this.h,e)},y.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},y.U=function(){return this.l==1/0&&!this.B},y.yc=function(){return this.l!=1/0&&!this.B},y.pb=function(){return Math.max(this.H,this.cc()-this.o)},y.Bh=function(e){this.H=e},y.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},y.qd=function(e){var t=Math.max(this.j,this.H);return this.o==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.cc()-this.o+e,this.ob()))},y.Hb=function(){return this.qd(0)},y.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))},y.Kh=function(){return!(this.i==null||this.g!=null&&this.F)},y.vh=function(e){this.G=e},y.ii=function(){return this.G},Me("shaka.media.PresentationTimeline",Pe),Pe.prototype.getAvailabilityTimeOffset=Pe.prototype.ii,Pe.prototype.setAvailabilityTimeOffset=Pe.prototype.vh,Pe.prototype.usingPresentationStartTime=Pe.prototype.Kh,Pe.prototype.getSeekRangeEnd=Pe.prototype.ob,Pe.prototype.getSeekRangeStart=Pe.prototype.Hb,Pe.prototype.getSafeSeekRangeStart=Pe.prototype.qd,Pe.prototype.getSegmentAvailabilityEnd=Pe.prototype.cc,Pe.prototype.setUserSeekStart=Pe.prototype.Bh,Pe.prototype.getSegmentAvailabilityStart=Pe.prototype.pb,Pe.prototype.isInProgress=Pe.prototype.yc,Pe.prototype.isLive=Pe.prototype.U,Pe.prototype.offset=Pe.prototype.offset,Pe.prototype.notifyMaxSegmentDuration=Pe.prototype.Tf,Pe.prototype.notifyMinSegmentStartTime=Pe.prototype.ne,Pe.prototype.getInitialProgramDateTime=Pe.prototype.ri,Pe.prototype.setInitialProgramDateTime=Pe.prototype.xh,Pe.prototype.isStartTimeLocked=Pe.prototype.Wi,Pe.prototype.lockStartTime=Pe.prototype.ie,Pe.prototype.getMaxSegmentEndTime=Pe.prototype.wi,Pe.prototype.notifyPeriodDuration=Pe.prototype.jh,Pe.prototype.notifySegments=Pe.prototype.Ed,Pe.prototype.notifyTimeRange=Pe.prototype.kh,Pe.prototype.getDelay=Pe.prototype.li,Pe.prototype.setDelay=Pe.prototype.jg,Pe.prototype.getSegmentAvailabilityDuration=Pe.prototype.ae,Pe.prototype.setSegmentAvailabilityDuration=Pe.prototype.Ce,Pe.prototype.setStatic=Pe.prototype.Gc,Pe.prototype.setClockOffset=Pe.prototype.wh,Pe.prototype.getPresentationStartTime=Pe.prototype.Bi,Pe.prototype.setDuration=Pe.prototype.bb,Pe.prototype.setPresentationStartTime=Pe.prototype.yh,Pe.prototype.getMaxSegmentDuration=Pe.prototype.vi,Pe.prototype.getDuration=Pe.prototype.getDuration;function Yo(e,t,n,i){var r=this;this.u=i,this.g=e,this.B=t,this.h=n,this.o=new yt,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=Oh(this),this.A=!1,this.o.D(e,"waiting",function(){return go(r)}),this.i=new ct(function(){go(r)}).ua(this.h.gapJumpTimerTime)}Yo.prototype.release=function(){this.o&&(this.o.release(),this.o=null),this.i!=null&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.u=null},Yo.prototype.qe=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),go(this)};function go(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){e.g.readyState!=e.F&&(e.F=e.g.readyState);var t;if(!(t=!e.m)){t=e.m;var n=t.j,i=js(n),r=n.g.currentTime,l=Date.now()/1e3;(t.g!=r||t.m!=i)&&(t.l=l,t.g=r,t.m=i,t.h=!1),r=l-t.l,(i=r>=t.o&&i&&!t.h)&&(t.i&&t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,n=e.g.buffered,i=_l(n,t,e.h.gapDetectionThreshold),i==null||i==0&&!e.A||(r=n.start(i),(l=e.h.gapPadding)&&(r=Math.ceil(100*(r+l))/100),r>=e.B.ob()||.001>r-t||(i!=0&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.C++,e.u(new Ie("gapjumped")))))}}}function Oh(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new Cr(new Us(e.g),e.h.stallThreshold,function(){var n;return G(function(i){if(i.g==1)return n=ho(e.g.buffered),n.length?t?(e.g.currentTime+=t,i.s(2)):L(i,e.g.play(),3):i.return();if(i.g!=2){if(!e.g)return i.return();e.g.pause(),e.g.play()}e.G++,e.u(new Ie("stalldetected")),ce(i)})})}function Cr(e,t,n){this.j=e,this.m=js(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}Cr.prototype.release=function(){this.i=this.j=null};function Us(e){this.g=e}function js(e){if(e.g.paused||e.g.playbackRate==0||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=A(ho(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function yi(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=kh.value().get(t),n.ma(e,t,i))}var kh=new ul(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Dd(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return r.l==null&&(r.l=i()),r.l},this.o=!1,this.h=new yt,this.i=new Vl(e),yi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bl(r,r.j())})}Dd.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function Bs(e){return e.o?e.g.currentTime:e.j()}function lf(e,t){0<e.g.readyState?da(e.i,t):yi(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){Bl(e,e.j())})}function Bl(e,t){.001>Math.abs(e.g.currentTime-t)?Ci(e):(e.h.ma(e.g,"seeking",function(){Ci(e)}),da(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function Ci(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function Vl(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new ct(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}Vl.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function da(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function pa(e){this.h=e,this.j=!1,this.g=null,this.i=new yt}y=pa.prototype,y.ready=function(){function e(){if(t.g==null||t.g==0&&t.h.duration!=1/0)t.j=!0;else{var n=t.h.currentTime,i=t.g;0>t.g&&(i=Math.max(0,n+t.g)),n!=i?(t.i.ma(t.h,"seeking",function(){t.j=!0}),t.h.currentTime=i):t.j=!0}}var t=this;yi(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){e()})},y.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},y.af=function(e){this.g=this.j?this.g:e},y.Od=function(){return(this.j?this.h.currentTime:this.g)||0},y.Ag=function(){return 0},y.zg=function(){return 0},y.ih=function(){};function Od(e,t,n,i,r,l){var c=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.j=new Yo(e,t.presentationTimeline,n,l),this.h=new Dd(e,function(){e:{var f=c.j;f.l=!0,f.A=!1,f.i&&f.i.ua(f.h.gapJumpTimerTime),go(f);var h=Bs(c.h);if(f=Mh(c,h),!Qa()&&.001<Math.abs(f-h)){if(h=!1,!er()||er()&&sl())h=!0;else{var v=Date.now()/1e3,S=er()&&Fa()?3:1;(!c.o||c.o<v-S)&&(c.o=v,h=!0)}if(h){lf(c.h,f),f=void 0;break e}}c.u(),f=void 0}return f},function(f){var h=c.j;h.g.seeking&&!h.l&&(h.l=!0,h.j=f),h.i&&h.i.ua(h.h.gapJumpTimerTime),go(h)},function(){var f=i;return f==null?f=1/0>c.g.getDuration()?c.g.Hb():c.g.ob():0>f&&(f=c.g.ob()+f),kd(c,Vs(c,f))}),this.m=new ct(function(){if(c.i.readyState!=0&&!c.i.paused){var f=Bs(c.h),h=c.g.Hb(),v=c.g.ob();3>v-h&&(h=v-3),f<h&&(f=Mh(c,f),c.i.currentTime=f)}})}y=Od.prototype,y.ready=function(){this.m.ua(.25)},y.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},y.af=function(e){lf(this.h,e)},y.Od=function(){var e=Bs(this.h);return 0<this.i.readyState&&!this.i.paused?Vs(this,e):e},y.Ag=function(){return this.j.G},y.zg=function(){return this.j.C},y.ih=function(){this.j.qe()};function kd(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Mh(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Hb(),l=e.g.ob(),c=e.g.getDuration();3>l-r&&(r=l-3);var f=e.g.qd(n),h=e.g.qd(i);return n=e.g.qd(n+i),t>=c?kd(e,t):t>l?l-e.l.safeSeekEndOffset:t<r?Zc(e.i.buffered,h)?h:n:t>=f||Zc(e.i.buffered,t)?t:n}function Vs(e,t){var n=e.g.Hb();return t<n?n:(e=e.g.ob(),t>e?e:t)}function Ct(e){this.g=e,this.m=null,this.i=0,this.o=!1}y=Ct.prototype,y.getNumReferences=function(){return this.g.length},y.getNumEvicted=function(){return this.i},y.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},y.bj=function(){this.o=!0},y.Eb=function(e){for(var t=A(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Bn(e){return e.g[0]||null}y.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},y.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},y.offset=function(e){if(!this.o)for(var t=A(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},y.ke=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,te(e))}},y.Bd=function(e,t){var n=this;e=e.filter(function(i){return i.endTime>t&&(n.g.length==0||i.endTime>n.g[0].startTime)}),this.ke(e),this.Oa(t)},y.Oa=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},y.Oc=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new Ke(e.startTime,t,e.C,e.Sa,e.wa,e.Y,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},y.Ie=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new ct(function(){var i=t();i?n.g.push.apply(n.g,te(i)):(n.m.stop(),n.m=null)}),this.m.ua(e))},Ct.prototype[Symbol.iterator]=function(){return this.Gb(0)},Ct.prototype.Gb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var i=this.find(e);if(i==null)return null;var r=this.get(i);n?i++:i--;var l=-1;if(r&&0<r.g.length)for(var c=r.g.length-1;0<=c;--c){var f=r.g[c];if(e>=f.startTime&&e<f.endTime){if(!t){for(;c&&!f.l;)c--,f=r.g[c];if(!f.l)return Qr("No independent partial segment found!"),null}n?i--:i++,l=c-1;break}}return new Rn(this,i,l,n)};function uf(e,t,n){return e=new Ke(e,e+t,function(){return n},0,null,null,e,e,e+t),new Ct([e])}Me("shaka.media.SegmentIndex",Ct),Ct.forSingleSegment=uf,Ct.prototype.getIteratorForTime=Ct.prototype.Gb,Ct.prototype.updateEvery=Ct.prototype.Ie,Ct.prototype.fit=Ct.prototype.Oc,Ct.prototype.evict=Ct.prototype.Oa,Ct.prototype.mergeAndEvict=Ct.prototype.Bd,Ct.prototype.offset=Ct.prototype.offset,Ct.prototype.get=Ct.prototype.get,Ct.prototype.find=Ct.prototype.find,Ct.prototype.markImmutable=Ct.prototype.bj,Ct.prototype.release=Ct.prototype.release,Ct.prototype.getNumEvicted=Ct.prototype.getNumEvicted,Ct.prototype.getNumReferences=Ct.prototype.getNumReferences;function Rn(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}y=Rn.prototype,y.ed=function(e){this.reverse=e},y.di=function(){return this.h},y.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},y.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},y.dg=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},Me("shaka.media.SegmentIterator",Rn),Rn.prototype.resetToLastIndependent=Rn.prototype.dg,Rn.prototype.next=Rn.prototype.next,Rn.prototype.current=Rn.prototype.current,Rn.prototype.currentPosition=Rn.prototype.di,Rn.prototype.setReverse=Rn.prototype.ed;function on(){Ct.call(this,[]),this.h=[]}nt(on,Ct),y=on.prototype,y.clone=function(){var e=new on;return e.h=this.h.slice(),e.i=this.i,e},y.release=function(){for(var e=A(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},y.Eb=function(e){for(var t=A(this.h),n=t.next();!n.done;n=t.next())n.value.Eb(e)},y.find=function(e){for(var t=this.i,n=A(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.find(e);if(r!=null)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},y.get=function(e){for(var t=this.i,n=A(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},y.offset=function(){},y.ke=function(){},y.Oa=function(e){for(var t=A(this.h),n=t.next();!n.done;n=t.next())n.value.Oa(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},y.Bd=function(){},y.Oc=function(){},y.Ie=function(){},Me("shaka.media.MetaSegmentIndex",on),on.prototype.updateEvery=on.prototype.Ie,on.prototype.fit=on.prototype.Oc,on.prototype.mergeAndEvict=on.prototype.Bd,on.prototype.evict=on.prototype.Oa,on.prototype.merge=on.prototype.ke,on.prototype.offset=on.prototype.offset,on.prototype.get=on.prototype.get,on.prototype.find=on.prototype.find,on.prototype.forEachTopLevelReference=on.prototype.Eb,on.prototype.release=on.prototype.release;function Hs(e){var t=this;this.g=e,this.j=!1,this.i=this.g.$d(),this.h=new ct(function(){t.g.gh(.25*t.i)})}Hs.prototype.release=function(){this.set(this.sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Hs.prototype.set=function(e){this.i=e,Rh(this)},Hs.prototype.sc=function(){return this.g.sc()};function Rh(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.$d()!=t&&e.g.mg(t);return}catch{}e.h.ua(.25),e.g.$d()!=0&&e.g.mg(0)}function Wo(e){var t=this;this.j=e,this.h=new yt,this.g=new Set,this.i=new ct(function(){af(t,!1)}).sb(),e.paused||this.i.ua(.25),this.h.D(e,"playing",function(){t.i.sb().ua(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}Wo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=A(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function af(e,t){var n=e.j.currentTime;e=A(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function Ks(e){Nt.call(this),this.g=new Map,this.h=e}nt(Ks,Nt),Ks.prototype.release=function(){this.g.clear(),Nt.prototype.release.call(this)};function qs(e,t){var n=e.g.get(t);return n||(n={Jd:[],mf:null,contentType:t},e.g.set(t,n)),n}function ev(e,t,n){var i=qs(e,t.contentType);tv(e,i),e={Wc:t,position:n},i=i.Jd,t=i.findIndex(function(r){return r.position>=n}),0<=t?i.splice(t,i[t].position==n?1:0,e):i.push(e)}Ks.prototype.j=function(e){for(var t=A(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var i=n.mf;e:{for(var r=n.Jd,l=r.length-1;0<=l;l--){var c=r[l];if(c.position<=e){r=c.Wc;break e}}r=null}l=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),c=r&&i&&r.label&&i.label&&i.label!==r.label;var f=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!es(i.roles,r.roles),(c||f||i)&&Nh(this,e,r.contentType)&&(n.mf=r,i=new Ie("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),l&&Nh(this,e,r.contentType)&&(n.mf=r,JSON.stringify(r),n=new Ie("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}};function Nh(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function tv(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.Jd;t.Jd=r.filter(function(l,c){return!(l.position<=n&&c+1<r.length&&r[c+1].position<=n||l.position>=i)})}else t.Jd=[]}function Gs(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 e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function ha(e){Nt.call(this),this.h=new Map,this.i=e,this.g=null}nt(ha,Nt),ha.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),Nt.prototype.release.call(this)};function Ph(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new Ie("regionadd",new Map([["region",t]])),e.dispatchEvent(t),c0(e))}function c0(e){e.g||(e.g=new ct(function(){for(var t=e.i(),n=A(e.h),i=n.next();!i.done;i=n.next()){var r=A(i.value);i=r.next().value,r=r.next().value,r.endTime<t.start&&(e.h.delete(i),i=new Ie("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).ua(2))}function Md(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function nv(e,t){e.l=t,e=A(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function zs(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Gb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var i=!0;n.isPreload()&&n.wa!=null&&(i=!1),n.dc()==2&&(i=!1),n.Ib(!1)&&(i=!1),i&&n.Y&&t.push(ya(e,n.Y)),i&&!e.h.has(n)&&(i=new Nd(e.l),t.push(cf(i,n,e.i)),e.h.set(n,i))}return Rd(e),Promise.all(t)}function ya(e,t){if(!e.i.segmentIndex||t.Ib()||Array.from(e.j.keys()).some(function(r){return Os(r,t)}))return Promise.resolve();var n=new Nd(e.l),i=cf(n,t,e.i);return e.j.set(t,n),i}function sf(e,t){t=A(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&Fs(e,n)}function Br(e){sf(e,e.h),sf(e,e.j),e.g=null}Md.prototype.Oa=function(e,t){t=t===void 0?!1:t;for(var n=A(this.h.keys()),i=n.next();!i.done;i=n.next())i=i.value,e>i.endTime&&Fs(this,i);t&&Rd(this)},Md.prototype.ed=function(e){this.o=e,this.g&&this.g.ed(e)};function Rd(e){for(var t=Array.from(e.h.keys()),n=A(e.j.keys()),i=n.next(),r={};!i.done;r={Nf:void 0},i=n.next())r.Nf=i.value,t.some(function(l){return function(c){return Os(c.Y,l.Nf)}}(r))||Fs(e,r.Nf)}function Lh(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&Fs(e,i)}Rd(e)}function iv(e,t){t&&t!==e.i&&(Br(e),e.i=t)}function Fs(e,t){var n=e.h;t instanceof Ei&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function Nd(e){this.g=e,this.Gd=this.pg=null}function cf(e,t,n){var i=new Uint8Array(0);return e.Gd=e.g(t,n,function(r){return G(function(l){if(l.g==1)return 0<i.byteLength?i=Ht(i,r):i=r,e.pg?L(l,e.pg(i),3):l.s(0);i=new Uint8Array(0),ce(l)})}),e.Gd.promise.catch(function(r){return r instanceof Y&&r.code==7001?Promise.resolve():Promise.reject(r)})}Nd.prototype.abort=function(){this.Gd&&this.Gd.abort()};function Pd(e){var t=Di(e),n=t.split("/")[0];return e=_n(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nd:null,colorGamut:null,frameRate:null}}function rv(e,t,n){function i(K){_=K.name;var W=K.reader;W.skip(24);var Q=W.na(),ie=W.na();W.skip(50),b=String(Q),T=String(ie),K.reader.ta()&&Ze(K)}function r(K){var W=ia(K.reader);I=W.channelCount,O=W.sampleRate,l(K.name)}function l(K){switch(K=K.toLowerCase(),K){case"avc1":case"avc3":f.push(K+".42E01E"),v=!0;break;case"hev1":case"hvc1":f.push(K+".1.6.L93.90"),v=!0;break;case"dvh1":case"dvhe":f.push(K+".05.04"),v=!0;break;case"vp09":f.push(K+".00.10.08"),v=!0;break;case"av01":f.push(K+".0.01M.08"),v=!0;break;case"mp4a":c.push("mp4a.40.2"),h=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":c.push(K),h=!0}}var c=[],f=[],h=!1,v=!1,S=null,T=null,b=null,I=null,O=null,P=null,N=null,_;if(new Pt().box("moov",Ze).box("trak",Ze).box("mdia",Ze).R("mdhd",function(K){S=zc(K.reader,K.version).language}).box("minf",Ze).box("stbl",Ze).R("stsd",An).box("mp4a",function(K){var W=ia(K.reader);I=W.channelCount,O=W.sampleRate,K.reader.ta()?Ze(K):l(K.name)}).box("esds",function(K){K=K.reader;for(var W="mp4a",Q,ie;K.ta();){Q=K.X();for(var Z=K.X();Z&128;)Z=K.X();if(Q==3)K.na(),Z=K.X(),Z&128&&K.na(),Z&64&&K.skip(K.X()),Z&32&&K.na();else if(Q==4)ie=K.X(),K.skip(12);else if(Q==5)break}ie&&(W+="."+rr(ie),Q==5&&K.ta()&&(Q=K.X(),ie=(Q&248)>>3,ie===31&&K.ta()&&(ie=32+((Q&7)<<3)+((K.X()&224)>>5)),W+="."+ie)),c.push(W),h=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(K){var W=_||"";switch(_){case"dvav":W="avc3";break;case"dva1":W="avc1"}K=K.reader,K.skip(1),K=W+"."+rr(K.X())+rr(K.X())+rr(K.X()),f.push(K),v=!0}).box("hvcC",function(K){var W=_||"";switch(_){case"dvh1":W="hvc1";break;case"dvhe":W="hev1"}var Q=K.reader;Q.skip(1),K=Q.X();var ie=["","A","B","C"][K>>6],Z=K&31,ne=Q.S(),re=(K&32)>>5?"H":"L";K=[Q.X(),Q.X(),Q.X(),Q.X(),Q.X(),Q.X()],Q=Q.X();for(var ue=0,de=0;32>de&&(ue|=ne&1,de!=31);de++)ue<<=1,ne>>=1;for(W=W+("."+ie+Z)+("."+rr(ue,!0)),W+="."+re+Q,ie="",Z=K.length;Z--;)((re=K[Z])||ie)&&(ie="."+re.toString(16).toUpperCase()+ie);W+=ie,f.push(W),v=!0}).box("dvcC",function(K){var W=_||"";switch(_){case"hvc1":W="dvh1";break;case"hev1":W="dvhe";break;case"avc1":W="dva1";break;case"avc3":W="dvav";break;case"av01":W="dav1"}var Q=K.reader;Q.skip(2),K=Q.X(),Q=Q.X(),f.push(W+"."+Gn(K>>1&127)+"."+Gn(K<<5&32|Q>>3&31)),v=!0}).box("dvvC",function(K){var W=_||"";switch(_){case"hvc1":W="dvh1";break;case"hev1":W="dvhe";break;case"avc1":W="dva1";break;case"avc3":W="dvav";break;case"av01":W="dav1"}var Q=K.reader;Q.skip(2),K=Q.X(),Q=Q.X(),f.push(W+"."+Gn(K>>1&127)+"."+Gn(K<<5&32|Q>>3&31)),v=!0}).R("vpcC",function(K){var W=_||"",Q=K.reader;K=Q.X();var ie=Q.X();Q=Q.X()>>4&15,f.push(W+"."+Gn(K)+"."+Gn(ie)+"."+Gn(Q)),v=!0}).box("av1C",function(K){var W=_||"";switch(_){case"dav1":W="av01"}var Q=K.reader;Q.skip(1),K=Q.X(),Q=Q.X();var ie=K>>>5,Z=(Q&64)>>6;f.push(W+"."+ie+"."+Gn(K&31)+(Q>>>7?"H":"M")+"."+Gn(ie===2&&Z?(Q&32)>>5?12:10:Z?10:8)+"."+((Q&16)>>4)+"."+((Q&8)>>3)+((Q&4)>>2)+(Q&3)+"."+Gn(1)+"."+Gn(1)+"."+Gn(1)+".0"),v=!0}).box("enca",Ju).box("encv",Oi).box("sinf",Ze).box("frma",function(K){K=Sh(K.reader).codec,l(K)}).box("colr",function(K){f=f.map(function(ie){if(ie.startsWith("av01.")){var Z=K.reader,ne=Z.Ba(),re=Z.Cb(4),ue=String.fromCharCode(re[0]);if(ue+=String.fromCharCode(re[1]),ue+=String.fromCharCode(re[2]),ue+=String.fromCharCode(re[3]),ue==="nclx"){re=Z.na(),ue=Z.na();var de=Z.na(),se=Z.X()>>7,we=ie.split(".");we.length==10&&(we[6]=Gn(re),we[7]=Gn(ue),we[8]=Gn(de),we[9]=String(se),ie=we.join("."))}Z.seek(ne)}return ie});var W=Ur(K.reader),Q=W.colorGamut;P=W.Nd,N=Q}).parse(e||t,!0),!c.length&&!f.length)return null;var B=h&&!v,F=new Map;if(v&&!n){n=new tr("video/mp4"),e&&n.init(e);try{n.i(t);for(var z=A(n.j()),J=z.next();!J.done;J=z.next()){var q=J.value;F.set(q,q)}}catch{}n.g()}return{type:B?"audio":"video",mimeType:B?"audio/mp4":"video/mp4",codecs:yn(c.concat(f)).join(", "),language:S,height:T,width:b,channelCount:I,sampleRate:O,closedCaptions:F,Nd:P,colorGamut:N,frameRate:null}}function yn(e){var t=new Set,n=[];e=A(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=ii(i);t.has(r)||(n.push(i),t.add(r))}return t=Gf("audio",n),i=Gf("video",n),e=Gf(ot,n),i=_h(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function _h(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Ln('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function f0(e){var t=null;return new Pt().box("moov",Ze).box("trak",Ze).box("mdia",Ze).box("minf",Ze).box("stbl",Ze).R("stsd",An).box("encv",Oi).box("enca",Ju).box("sinf",Ze).box("schi",Ze).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=gr(n.Cb(16))}).parse(e,!0),t}function Ld(e,t,n){var i,r,l,c,f;return G(function(h){if(h.g==1)return i=t,i.cryptoKey?h.s(2):L(h,i.fetchKey(),3);if(r=i.iv,!r)for(r=Je(new ArrayBuffer(16)),l=i.firstMediaSequenceNumber+n,c=r.byteLength-1;0<=c;c--)r[c]=l&255,l>>=8;return t.blockCipherMode=="CBC"?f={name:"AES-CBC",iv:r}:f={name:"AES-CTR",counter:r,length:64},h.return(E.crypto.subtle.decrypt(f,i.cryptoKey,e))})}function ff(e,t,n,i,r){return e=un(e,i,r),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function ov(e,t){var n=this;this.g=t,this.j=e,this.h=null,this.K=new Map,this.C=1,this.u=this.l=null,this.O=0,this.i=new Map,this.I=!1,this.P=null,this.B=!1,this.m=new Ss(function(){return d0(n)}),this.L=Date.now()/1e3,this.o=new Map,this.M={projection:null,hfov:null},this.W=0,this.T=1/0,this.F=null,this.A=new ct(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var i=n.j.presentationTimeline.Hb(),r=n.j.presentationTimeline.ob();1<r-i?Ls(n.g.aa,i,r):Id(n.g.aa)}else Id(n.g.aa),n.A&&n.A.stop()}),this.G=null,this.H=new ct(function(){var i=n.g.video;!i.ended&&n.G&&(i.currentTime=n.G,n.G=null)})}y=ov.prototype,y.destroy=function(){return this.m.destroy()};function d0(e){var t,n,i,r,l,c,f;return G(function(h){if(h.g==1){for(t=[],n=A(e.i.values()),i=n.next();!i.done;i=n.next())r=i.value,vu(r),t.push(Hl(r)),r.ba&&(Br(r.ba),r.ba=null);for(l=A(e.o.values()),c=l.next();!c.done;c=l.next())f=c.value,Br(f);return L(h,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.j=null,e.h=null,e.A&&e.A.stop(),e.A=null,e.H&&e.H.stop(),e.H=null,e.G=null,ce(h)})}y.configure=function(e){if(this.h=e,this.P=new ys({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.ba&&(Br(t.ba),t.ba=null),t=A(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Br(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(ot))&&t.ba&&(Br(t.ba),t.ba=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.ba&&(Br(t.ba),t.ba=null),t=A(this.i.keys()),n=t.next();!n.done;n=t.next())n=this.i.get(n.value),n.ba?(Lh(n.ba,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(Br(n.ba),n.ba=null)):0<e.segmentPrefetchLimit&&(n.ba=jd(this,n.stream));e.disableAudioPrefetch||h0(this)};function _d(e,t,n){e.j.presentationTimeline.U()||(e.W=t,e.T=n)}y.start=function(e){var t=this;return G(function(n){if(n.g==1)return L(n,lv(t,e||new Map),2);at(t.m),t.I=!0,ce(n)})};function Xs(e,t){var n,i,r,l,c,f;G(function(h){switch(h.g){case 1:return n=wn,e.O++,i=e.O,ye(h,2),L(h,ca(e.g.aa,n.za),4);case 4:Le(h,3);break;case 2:r=De(h),e.g&&e.g.onError(r);case 3:l=dn(t.mimeType,t.codecs),lr(e.g.aa,l,e.j.sequenceMode,t.external),c=e.g.aa.ea,(c.isTextVisible()||e.h.alwaysStreamText)&&e.O==i&&(f=pf(e,t),e.i.set(n.za,f),bi(e,f,0)),ce(h)}})}function Uh(e){var t=e.i.get(ot);t&&(vu(t),Hl(t).catch(function(){}),e.F=e.i.get(ot),e.i.delete(ot)),e.u=null}function Ys(e,t){for(var n=0>e.g.gb(),i=A(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.ja&&r.ja.ed(n),r.ba&&r.ba.ed(n);for(i=A(e.o.values()),r=i.next();!r.done;r=i.next())r.value.ed(n);(n=e.i.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.fc&&(Zo(e,t,!1,0,!1),n.fc=i):(t=n.fc)&&(n.fc=null,Zo(e,t,!0,0,!1)))}function Ud(e,t,n,i,r,l){n=n===void 0?!1:n,i=i===void 0?0:i,r=r===void 0?!1:r,l=l===void 0?!1:l,e.l=t,e.I&&(t.video&&Zo(e,t.video,n,i,r,l),t.audio&&Zo(e,t.audio,n,i,r,l))}function Qo(e,t){G(function(n){if(n.g==1)return e.F=null,e.u=t,e.I?t.segmentIndex?n.s(2):L(n,t.createSegmentIndex(),2):n.return();Zo(e,t,!0,0,!1),ce(n)})}function Jo(e,t){for(var n=A(e.K.entries()),i=n.next();!i.done;i=n.next()){var r=A(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.K.delete(i))}}function Zo(e,t,n,i,r,l){var c=e.i.get(t.type);c||t.type!=ot?c&&(c.fc&&(t.trickModeVideo?(c.fc=t,t=t.trickModeVideo):c.fc=null),c.stream!=t||r)&&(e.o.has(t)?c.ba=e.o.get(t):c.ba&&iv(c.ba,t),t.type==ot&&(r=dn(t.mimeType,t.codecs),lr(e.g.aa,r,e.j.sequenceMode,t.external)),!e.o.has(c.stream)&&c.stream.closeSegmentIndex&&(c.Da?(r="("+c.type+":"+c.stream.id+")",e.K.has(r)||e.K.set(r,c.stream.closeSegmentIndex)):c.stream.closeSegmentIndex()),r=c.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,c.stream=t,c.ja=null,c.bf=!!l,t.dependencyStream?c.nd=pf(e,t.dependencyStream):c.nd=null,r?Kl(e,!0,!1):(n?c.nc?c.Re=!0:c.Da?(c.lc=!0,c.Vd=i,c.Re=!0):(vu(c),hf(e,c,!0,i).catch(function(f){e.g&&e.g.onError(f)})):c.Da||c.kb||bi(e,c,0),p0(e,c).catch(function(f){e.g&&e.g.onError(f)}))):Xs(e,t)}function p0(e,t){var n,i;return G(function(r){if(r.g==1)return t.rb?(n=t.stream,i=t.rb,n.segmentIndex?r.s(2):L(r,n.createSegmentIndex(),2)):r.return();if(t.rb!=i||t.stream!=n)return r.return();var l=e.g.Rc(),c=ur(e.g.aa,t.type),f=t.stream.segmentIndex.find(t.xa?t.xa.endTime:l),h=f==null?null:t.stream.segmentIndex.get(f);f=h&&h.wa?h.wa-h.Sa:null,h&&!f&&(f=(h.endTime-h.getStartTime())*(t.stream.bandwidth||0)/8),f?((h=h.Y)&&(f+=(h.wa?h.wa-h.Sa:null)||0),h=e.g.getBandwidthEstimate(),l=8*f/h<(c||0)-l-e.h.rebufferingGoal||t.rb.h.g>f):l=!1,l&&t.rb.abort(),ce(r)})}y.Fc=function(){if(this.g){for(var e=this.g.Rc(),t=A(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.i.get(i);var r=this.g.aa;if(i==ot?(r=r.h,r=r.g==null||r.h==null?!1:e>=r.g&&e<r.h):(r=Ar(r,i),r=Zc(r,e)),!r){if(this.L=0,n.ba&&(n.ba.g=null),n.type==="audio"){r=A(this.o.values());for(var l=r.next();!l.done;l=r.next())l.value.g=null}n.ja=null,(ur(this.g.aa,i)!=null||n.Da)&&df(this,n),n.rb&&(n.rb.abort(),n.rb=null),i===ot&&(i=this.g.aa,i.L&&i.L.g()),n.Fc=!0}}this.h.crossBoundaryStrategy!=="keep"&&Kh(this)}};function df(e,t){t.nc||t.lc||(t.Da?(t.lc=!0,t.Vd=0):bd(e.g.aa,t.type)==null?t.kb==null&&bi(e,t,0):(vu(t),hf(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function lv(e,t){var n,i,r,l,c,f,h,v,S,T;return G(function(b){if(b.g==1){if(n=wn,!e.l)throw new Y(2,5,5006);return i=new Map,r=new Set,e.l.audio&&(i.set(n.V,e.l.audio),r.add(e.l.audio)),e.l.video&&(i.set(n.la,e.l.video),r.add(e.l.video)),e.u&&(i.set(n.za,e.u),r.add(e.u)),l=e.g.aa,L(b,l.init(i,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(at(e.m),e.updateDuration(),c=A(i.keys()),f=c.next();!f.done;f=c.next())h=f.value,v=i.get(h),e.i.has(h)||(S=pf(e,v),t.has(v.id)&&(T=t.get(v.id),nv(T,function(I,O,P){return va(I,O,P||null,e.h.retryParameters,e.g.Xb)}),S.ba=T),e.i.set(h,S),bi(e,S,0));ce(b)})}function pf(e,t){var n={stream:t,type:t.type,ja:null,ba:jd(e,t),xa:null,yb:null,he:null,Ac:null,zc:null,fe:null,ge:null,fc:null,endOfStream:!1,Da:!1,kb:null,lc:!1,Vd:0,Re:!1,nc:!1,Fc:!0,bf:!1,bg:!1,sd:!1,rb:null,nd:null};return t.dependencyStream&&(n.nd=pf(e,t.dependencyStream)),n}function jd(e,t){if(t.type==="video"&&e.h.disableVideoPrefetch||t.type==="audio"&&e.h.disableAudioPrefetch||t.type===ot&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===ot&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.ba)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new Md(e.h.segmentPrefetchLimit,t,function(i,r,l){return va(i,r,l||null,e.h.retryParameters,e.g.Xb)},0>e.g.gb()):null}function h0(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,i=A(e.j.variants),r=i.next(),l={};!r.done;l={wb:void 0},r=i.next())if(l.wb=r.value,l.wb.audio)if(e.o.has(l.wb.audio)){if(r=e.o.get(l.wb.audio),Lh(r,t),!(0<t&&n.some(function(f){return function(h){return En(f.wb.audio.language,h)}}(l)))){var c=e.i.get(l.wb.audio.type);r!==(c&&c.ba)&&Br(r),e.o.delete(l.wb.audio)}}else 0>=t||!n.some(function(f){return function(h){return En(f.wb.audio.language,h)}}(l))||!(r=jd(e,l.wb.audio))||(l.wb.audio.segmentIndex||l.wb.audio.createSegmentIndex(),e.o.set(l.wb.audio,r))}y.updateDuration=function(){var e=Qa(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),Id(this.g.aa)),this.g.aa.bb(t)):e?(this.A&&this.A.ua(.5),this.g.aa.bb(1/0)):this.g.aa.bb(Math.pow(2,32))};function jh(e,t){var n,i,r,l,c,f;return G(function(h){switch(h.g){case 1:if(at(e.m),t.Da||t.kb==null||t.nc)return h.return();if(t.kb=null,!t.lc){h.s(2);break}return L(h,hf(e,t,t.Re,t.Vd),3);case 3:return h.return();case 2:if(Jo(e,t),t.stream.segmentIndex){h.s(4);break}return n=t.stream,ye(h,5),L(h,t.stream.createSegmentIndex(),7);case 7:Le(h,6);break;case 5:return i=De(h),L(h,Qs(e,t,i),8);case 8:return h.return();case 6:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),t.Da||t.kb||bi(e,t,0),h.return();case 4:ye(h,9),r=uv(e,t),r!=null&&(bi(e,t,r),t.sd=!1),Le(h,10);break;case 9:return l=De(h),L(h,Qs(e,t,l),11);case 11:return h.return();case 10:if(c=Array.from(e.i.values()),!e.I||!c.every(function(v){return v.endOfStream})){h.s(0);break}return L(h,e.g.aa.endOfStream(),13);case 13:at(e.m),f=e.g.aa.getDuration(),f!=0&&f<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.bb(f),ce(h)}})}function uv(e,t){if(_t(t))return Fo(e.g.aa,t.stream.originalId||""),null;if(t.type==ot&&$g(e.g.aa),t.stream.isAudioMuxedInVideo)return null;var n=e.h.updateIntervalSeconds/Math.max(1,Math.abs(e.g.gb()));if(!or(e.g.aa)&&t.type!=ot)return n/2;var i=e.g.Rc();if(t.type==="audio")for(var r=A(e.o.keys()),l=r.next();!l.done;l=r.next())l=e.o.get(l.value),l.Oa(i,!0),zs(l,i);r=t.xa?t.xa.endTime:i;var c=sa(e.g.aa,t.type,i),f=Math.max(1,Math.max(e.h.rebufferingGoal,e.h.bufferingGoal)*e.C),h=e.j.presentationTimeline.getDuration()-r;if(l=ur(e.g.aa,t.type),1e-6>h&&l)return t.endOfStream=!0,t.type=="video"&&(e=e.i.get(ot))&&_t(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,c>=f)return n/2;if(f=!t.ja,l=av(e,t,i,l),!l)return n;c=!1,f&&t.bf&&(c=!0,t.bf=!1),f=1/0,h=Array.from(e.i.values()),h=A(h);for(var v=h.next();!v.done;v=h.next())v=v.value,_t(v)||v.ja&&!v.ja.current()||(f=Math.min(f,v.xa?v.xa.endTime:i));return r>=f+e.j.presentationTimeline.h?n:(e.h.crossBoundaryStrategy!=="keep"&&m0(e,t,l)||(t.ba&&t.ja&&!e.o.has(t.stream)&&(t.ba.Oa(l.startTime+.001),zs(t.ba,l.startTime).catch(function(){})),y0(e,t,i,l,c).catch(function(){}),t.nd&&Bh(e,t.nd,i)),null)}function av(e,t,n,i){if(t.ja)return(n=t.ja.current())&&t.xa&&.001>Math.abs(t.xa.startTime-n.startTime)&&(n=t.ja.next().value),n;if(t.xa||i)return n=t.xa?t.xa.endTime:i,e=0>e.g.gb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),t.ja&&t.ja.next().value;i=e.j.sequenceMode?0:e.h.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.gb();var l=null;return i&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(r,!1,e)),l=t.ja&&t.ja.next().value),l||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),l=t.ja&&t.ja.next().value),l}function y0(e,t,n,i,r){var l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J;return G(function(q){switch(q.g){case 1:if(l=wn,c=t.stream,f=t.ja,t.Da=!0,ye(q,2),i.dc()==2)throw new Y(1,1,1011);return L(q,v0(e,t,i,r),4);case 4:return at(e.m),e.B?q.return():(h=c.mimeType=="video/mp4"||c.mimeType=="audio/mp4",v=E.ReadableStream,e.h.lowLatencyMode&&e.j.isLowLatency&&v&&h&&(e.j.type!="HLS"||i.m)?(b=new Uint8Array(0),O=I=!1,N=function(K){var W,Q,ie;return G(function(Z){switch(Z.g){case 1:if(I||(O=!0,at(e.m),e.B))return Z.return();if(ye(Z,2),b=Vh(b,K),W=!1,Q=0,new Pt().box("mdat",function(ne){Q=ne.size+ne.start,W=!0}).parse(b,!1,!0),!W){Z.s(4);break}return ie=b.subarray(0,Q),b=b.subarray(Q),L(Z,Hh(e,t,n,c,i,ie,!0,r),5);case 5:t.ba&&t.ja&&zs(t.ba,i.startTime,!0);case 4:Le(Z,0);break;case 2:P=De(Z),ce(Z)}})},L(q,ga(e,t,i,N),9)):(S=ga(e,t,i),L(q,S,7)));case 7:return T=q.h,at(e.m),e.B?q.return():(at(e.m),t.lc?(t.Da=!1,bi(e,t,0),q.return()):L(q,Hh(e,t,n,c,i,T,!1,r),6));case 9:if(_=q.h,P)throw P;if(O){q.s(10);break}return I=!0,at(e.m),e.B?q.return():t.lc?(t.Da=!1,bi(e,t,0),q.return()):L(q,Hh(e,t,n,c,i,_,!1,r),10);case 10:t.ba&&t.ja&&zs(t.ba,i.startTime,!0);case 6:if(at(e.m),e.B)return q.return();t.xa=i,f.next(),t.Da=!1,t.bg=!1,B=e.g.aa.Fb(),F=B[t.type],JSON.stringify(F),t.lc||(z=null,t.type===l.la?z=e.i.get(l.V):t.type===l.V&&(z=e.i.get(l.la)),z&&z.type==l.V?e.g.qe(i,t.stream,z.stream.isAudioMuxedInVideo):e.g.qe(i,t.stream,t.stream.codecs.includes(","))),bi(e,t,0),Le(q,0);break;case 2:if(J=De(q),at(e.m,J),e.B)return q.return();if(t.Da=!1,J.code==7001)t.Da=!1,vu(t),bi(e,t,0),q.s(0);else if(t.type==l.za&&e.h.ignoreTextStreamFailures)e.i.delete(l.za),q.s(0);else return J.code==3017?L(q,g0(e,t,J),0):(t.sd=!0,J.category==1&&t.ba&&Fs(t.ba,i),J.severity=2,L(q,Qs(e,t,J),0))}})}function Bh(e,t,n){var i,r,l,c,f,h,v,S;G(function(T){switch(T.g){case 1:if(i=t.stream,l=(r=i.segmentIndex.Gb(n))&&r.next().value,!l){T.s(0);break}if(c=l.Y,!c||Os(c,t.yb)){T.s(3);break}return t.yb=c,ye(T,4),L(T,ga(e,t,c),6);case 6:f=T.h;var b=e.g.aa;b.I&&Ya(b.I,f,0,i),Le(T,3);break;case 4:throw h=De(T),t.yb=null,h;case 3:if(t.xa&&t.xa==l){T.s(0);break}return t.xa=l,ye(T,8),L(T,ga(e,t,l),10);case 10:v=T.h,b=e.g.aa,b.I&&Ya(b.I,v,0,i),Le(T,0);break;case 8:throw S=De(T),t.xa=null,S}})}function Vh(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function g0(e,t,n){var i,r,l,c;return G(function(f){if(f.g==1){if(i=Array.from(e.i.values()),i.some(function(h){return h!=t&&h.bg}))return f.s(2);if(r=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,e.g.disableStream(t.stream,r))return f.return();if(e.h.avoidEvictionOnQuotaExceededError)return bi(e,t,4),f.return();if(l=Math.round(100*e.C),20<l)e.C-=.2;else if(4<l)e.C-=.04;else return t.sd=!0,e.B=!0,e.g.onError(n),f.return();return t.bg=!0,c=e.g.Rc(),L(f,Bd(e,t,c),2)}bi(e,t,4),ce(f)})}function v0(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F;return G(function(z){switch(z.g){case 1:if(r=wn,l=t.xa==null,c=[],f=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),h=Math.min(n.appendWindowEnd,e.T)+.01,v=n.codecs||t.stream.codecs,S=ii(v),T=Di(n.mimeType||t.stream.mimeType),b=n.timestampOffset,b==t.he&&f==t.Ac&&h==t.zc&&S==t.fe&&T==t.ge){z.s(2);break}if(I=t.fe&&t.ge&&_s(e.g.aa,t.type,T,v),!I){z.s(3);break}if(O=null,t.type===r.la?O=e.i.get(r.V):t.type===r.V&&(O=e.i.get(r.la)),!O){z.s(3);break}return L(z,Hl(O).catch(function(){}),5);case 5:O.yb=null,O.Ac=null,O.zc=null,df(e,O);case 3:return L(z,Ws(e,t,b,f,h,n,S,T),2);case 2:return Os(n.Y,t.yb)||(t.yb=n.Y,n.l&&n.Y&&(P=ga(e,t,n.Y),N=function(){var J,q,K,W,Q,ie,Z;return G(function(ne){switch(ne.g){case 1:return ye(ne,2),L(ne,P,4);case 4:return J=ne.h,at(e.m),q=null,K=new Map,W={projection:null,hfov:null},Q=new Pt,Q.box("moov",Ze).box("trak",Ze).box("mdia",Ze).R("mdhd",function(re){q=zc(re.reader,re.version).timescale}).box("hdlr",function(re){switch(re=re.reader,re.skip(8),re.Cc()){case"soun":K.set(r.V,q);break;case"vide":K.set(r.la,q)}q=null}).box("minf",Ze).box("stbl",Ze).R("stsd",An).box("encv",Oi).box("avc1",Oi).box("avc3",Oi).box("hev1",Oi).box("hvc1",Oi).box("dvav",Oi).box("dva1",Oi).box("dvh1",Oi).box("dvhe",Oi).box("dvc1",Oi).box("dvi1",Oi).box("vexu",Ze).box("proj",Ze).R("prji",function(re){re=re.reader.Cc(),W.projection=re}).box("hfov",function(re){re=re.reader.S()/1e3,W.hfov=re}).parse(J),t.type===r.la&&sv(e,W),K.has(t.type)?n.Y.timescale=K.get(t.type):q!=null&&(n.Y.timescale=q),ie=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,L(ne,e.g.Fg(t.type,J),5);case 5:return L(ne,Ps(e.g.aa,t.type,J,null,t.stream,ie,t.Fc,i),6);case 6:Le(ne,0);break;case 2:throw Z=De(ne),t.yb=null,Z}})},_=n.startTime,l&&(B=ur(e.g.aa,t.type),B!=null&&(_=B)),e.g.fj(_,n.Y),c.push(N()))),F=t.xa?t.xa.i:null,n.i!=F&&c.push(tf(e.g.aa,t.type,n.startTime)),L(z,Promise.all(c),0)}})}function Ws(e,t,n,i,r,l,c,f){var h,v,S,T;return G(function(b){if(b.g==1)return h=wn,v=new Map,e.l.audio&&v.set(h.V,e.l.audio),e.l.video&&v.set(h.la,e.l.video),ye(b,2),t.Ac=i,t.zc=r,c&&(t.fe=c),f&&(t.ge=f),t.he=n,S=e.j.sequenceMode||e.j.type=="HLS",L(b,ef(e.g.aa,t.type,n,i,r,S,l.mimeType||t.stream.mimeType,l.codecs||t.stream.codecs,v),4);if(b.g!=2)return Le(b,0);throw T=De(b),t.Ac=null,t.zc=null,t.fe=null,t.ge=null,t.he=null,T})}function Hh(e,t,n,i,r,l,c,f){c=c===void 0?!1:c,f=f===void 0?!1:f;var h,v,S,T,b,I;return G(function(O){switch(O.g){case 1:return h=i.closedCaptions&&0<i.closedCaptions.size,e.h.shouldFixTimestampOffset&&(S=i.mimeType=="video/mp4"||i.mimeType=="audio/mp4",T=null,r.Y&&(T=r.Y.timescale),(b=S&&T&&i.type==="video"&&e.j.type=="DASH")&&(v=new Pt),b&&v.box("moof",Ze).box("traf",Ze).R("tfdt",function(P){var N,_,B,F,z,J;return G(function(q){return N=na(P.reader,P.version),_=N.baseMediaDecodeTime,_?(B=-_/T,F=Number(t.he)||0,F<B?(z=t.Ac,J=t.zc,L(q,Ws(e,t,B,z,J,r),0)):q.s(0)):q.return()})}),b&&v.parse(l,!1,c)),L(O,Bd(e,t,n),2);case 2:return at(e.m),I=t.Fc,t.Fc=!1,L(O,e.g.Fg(t.type,l),3);case 3:return L(O,Ps(e.g.aa,t.type,l,r,i,h,I,f,c),4);case 4:at(e.m),ce(O)}})}function Bd(e,t,n){var i,r,l,c,f,h,v,S;return G(function(T){if(T.g==1)return i=t.stream.segmentIndex,i instanceof on&&i.Oa(e.j.presentationTimeline.pb()),r=Math.max(e.h.bufferBehind*e.C,e.j.presentationTimeline.h),l=bd(e.g.aa,t.type),l==null?(e.F==t&&(e.F=null),T.return()):(c=n-l,f=e.h.evictionGoal,h=e.j.presentationTimeline.Hb(),v=e.j.presentationTimeline.ob(),S=c-r,v-h>f&&(S=Math.max(c-r,h-f-l)),S<=f?T.return():L(T,e.g.aa.remove(t.type,l,l+S),2));if(T.g!=4)return at(e.m),e.F?L(T,Bd(e,e.F,n),4):T.s(0);at(e.m),ce(T)})}function _t(e){return e&&e.type==ot&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function ga(e,t,n,i){var r,l,c,f,h;return G(function(v){switch(v.g){case 1:if(r=n.Ib())return v.return(r);if(l=null,t.ba){var S=t.ba,T=S.h;n instanceof Ei&&(T=S.j),T.has(n)?(S=T.get(n),i&&(S.pg=i),l=S.Gd):l=null}return l||(l=va(n,t.stream,i||null,e.h.retryParameters,e.g.Xb)),c=0,t.ja&&(c=t.ja.h),t.rb=l,L(v,l.promise,2);case 2:if(f=v.h,t.rb=null,h=f.data,!n.aesKey){v.s(3);break}return L(v,Ld(h,n.aesKey,c),4);case 4:h=v.h;case 3:return v.return(h)}})}function va(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e instanceof Ke?e:void 0,f=c?1:0;return e=ff(e.N(),e.Sa,e.wa,i,n),e.contentType=t.type,r.request(Fi,e,{type:f,stream:t,segment:c,isPreload:l})}function hf(e,t,n,i){var r,l;return G(function(c){if(c.g==1)return t.lc=!1,t.Re=!1,t.Vd=0,t.nc=!0,t.xa=null,t.ja=null,t.ba&&!e.o.has(t.stream)&&Br(t.ba),i?(r=e.g.Rc(),l=e.g.aa.getDuration(),L(c,e.g.aa.remove(t.type,r+i,l),3)):L(c,ca(e.g.aa,t.type),4);if(c.g!=3)return at(e.m),n?L(c,e.g.aa.flush(t.type),3):c.s(3);at(e.m),t.nc=!1,t.endOfStream=!1,t.Da||t.kb||bi(e,t,0),ce(c)})}function bi(e,t,n){var i=t.type;(i!=ot||e.i.has(i))&&(t.kb=new Sc(function(){var r;return G(function(l){if(l.g==1)return ye(l,2),L(l,jh(e,t),4);if(l.g!=2)return Le(l,0);r=De(l),e.g&&e.g.onError(r),ce(l)})}).da(n))}function vu(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function Hl(e){return G(function(t){return e.rb?L(t,e.rb.abort(),0):t.s(0)})}function Qs(e,t,n){var i;return G(function(r){if(r.g==1)return n.code==3024?(t.Da=!1,vu(t),bi(e,t,0),r.return()):L(r,nh(e.P),2);if(at(e.m),n.category===1&&n.code!=1003){if(t.fc)return Ys(e,!1),r.return();i=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.h.failureCallback(n),ce(r)})}function Kl(e,t,n){t=t===void 0?!1:t,n=n===void 0?!0:n;var i,r,l,c,f,h;return G(function(v){if(v.g==1){if(i=Date.now()/1e3,r=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||i-e.L<r)return v.return(!1);e.L=i}return l=wn,(c=e.i.get(l.V))&&(c.yb=null,c.Ac=null,c.zc=null,n&&df(e,c),Hl(c).catch(function(){}),c.ja&&c.ja.dg()),(f=e.i.get(l.la))&&(f.yb=null,f.Ac=null,f.zc=null,n&&df(e,f),Hl(f).catch(function(){}),f.ja&&f.ja.dg()),h=new Map,e.l.audio&&h.set(l.V,e.l.audio),e.l.video&&h.set(l.la,e.l.video),L(v,sn(e.g.aa,h),2)}return!f||f.nc||f.Da||f.kb||bi(e,f,0),!c||c.nc||c.Da||c.kb||bi(e,c,0),v.return(!0)})}function sv(e,t){if(e.M.projection!=t.projection||e.M.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new Ie("spatialvideoinfo",n)}else n=new Ie("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.M=t}}function Kh(e){if(e.h.crossBoundaryStrategy!=="keep"){e.H.stop();var t=e.g.Rc(),n=e.i.get("video")||e.i.get("audio");n&&(n=n.yb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.01,e.H.da(t)))}}function m0(e,t,n){if(t.type===ot)return!1;var i=t.yb;if(!i)return!1;n=n.Y;var r=i.g!==n.g;if(e.h.crossBoundaryStrategy==="reset_to_encrypted"&&(i.encrypted||n.encrypted||(r=!1),i.encrypted&&(e.h.crossBoundaryStrategy="keep")),e.h.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&i.encrypted==n.encrypted&&(r=!1),r&&t.Fc){var l=e.g.video,c=l.paused;Kl(e,!0).then(function(){e.g.onEvent(new Ie("boundarycrossed")),c||l.play()})}return r}function yf(){}function Vd(e,t,n,i,r){var l=r in i,c=l?n.constructor==Object&&Object.keys(i).length==0:n.constructor==Object&&Object.keys(n).length==0,f=l||c,h=!0,v;for(v in t){var S=r+"."+v,T=l?i[r]:n[v];f||v in n?t[v]===void 0?T===void 0||f?delete e[v]:e[v]=io(T):c?e[v]=t[v]:T.constructor==Object&&t[v]&&t[v].constructor==Object?(e[v]||(e[v]=io(T)),S=Vd(e[v],t[v],T,i,S),h=h&&S):typeof t[v]!=typeof T||t[v]==null||typeof t[v]!="function"&&t[v].constructor!=T.constructor?(Qr("Invalid config, wrong type for "+S),h=!1):(typeof n[v]=="function"&&n[v].length!=t[v].length&&Et("Unexpected number of arguments for "+S),e[v]=t[v]):(Qr("Invalid config, unrecognized key "+S),h=!1)}return h}function ma(e,t){for(var n={},i=n,r=0,l=0;r=e.indexOf(".",r),!(0>r);)(r==0||e[r-1]!="\\")&&(l=e.substring(l,r).replace(/\\\./g,"."),i[l]={},i=i[l],l=r+1),r+=1;return i[e.substring(l).replace(/\\\./g,".")]=t,n}function en(e,t){return e&&t}function Hd(e,t){function n(l){for(var c=A(Object.keys(l)),f=c.next();!f.done;f=c.next())if(f=f.value,!(l[f]instanceof HTMLElement))if(r(l[f])&&Object.keys(l[f]).length===0)delete l[f];else{var h=l[f];Array.isArray(h)&&h.length===0||typeof l[f]=="function"?delete l[f]:r(l[f])&&(n(l[f]),Object.keys(l[f]).length===0&&delete l[f])}}function i(l,c){return Object.keys(l).reduce(function(f,h){var v=l[h];return c.hasOwnProperty(h)?v instanceof HTMLElement&&c[h]instanceof HTMLElement?v.isEqualNode(c[h])||(f[h]=v):r(v)&&r(c[h])?(v=i(v,c[h]),(0<Object.keys(v).length||!r(v))&&(f[h]=v)):Array.isArray(v)&&Array.isArray(c[h])?Up(v,c[h])||(f[h]=v):Number.isNaN(v)&&Number.isNaN(c[h])||v!==c[h]&&(f[h]=v):f[h]=v,f},{})}function r(l){return l&&typeof l=="object"&&!Array.isArray(l)}return e=i(e,t),n(e),e}Me("shaka.util.ConfigUtils",yf),yf.getDifferenceFromConfigObjects=Hd,yf.convertToConfigObject=ma,yf.mergeConfigObjects=Vd;function tn(){}function cv(e){return e=Or(e),new fn(e).nb}function Sa(e,t,n){function i(f){Ti(l).setUint32(c,f.byteLength,!0),c+=4,l.set(Je(f),c),c+=f.byteLength}if(!n||!n.byteLength)throw new Y(2,6,6015);var r;typeof t=="string"?r=Np(t,!0):r=t,e=Or(e),e=Np(e,!0);var l=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),c=0;return i(e),i(r),i(n),l}function gf(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Or(e).split("skd://").pop(),Sa(e,n,t))}function Ta(e,t){e===2&&(e=t.drmInfo)&&mc(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Me("shaka.drm.FairPlay",tn),tn.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&mc(e.keySystem)){try{var n=Zt(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(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&&(t.data=yr(Hi(n)))}},tn.muxFairPlayRequest=function(e,t){Ta(e,t)},tn.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&mc(n.keySystem)&&Ta(e,t)}},tn.conaxFairPlayRequest=function(e,t){Ta(e,t)},tn.ezdrmFairPlayRequest=function(e,t){Ta(e,t)},tn.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&mc(e.keySystem)&&(e=Je(t.body),e=No(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=kr("spc="+e))},tn.muxInitDataTransform=function(e,t,n){return gf(e,t,n)},tn.expressplayInitDataTransform=function(e,t,n){return gf(e,t,n)},tn.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=Or(e).split("skd://").pop().split("?").shift(),n=E.atob(n);var i=new ArrayBuffer(2*n.length);i=Ga(i);for(var r=0,l=n.length;r<l;r++)i[r]=n.charCodeAt(r);return Sa(e,i,t)},tn.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Or(e).split(";").pop(),Sa(e,n,t))},tn.verimatrixInitDataTransform=function(e,t,n){return gf(e,t,n)},tn.initDataTransform=Sa,tn.defaultGetContentId=cv,tn.isFairPlaySupported=function(){var e;return G(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ye(t,2),L(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(De(t),t.return(!1))})};function Kd(){this.g=null}Kd.prototype.configure=function(e){this.g=e},Kd.prototype.create=function(e){var t;if(this.g.language){var n=fv(e,this.g.language);n.length&&(t=n)}return t||(t=e.filter(function(i){return i.primary}),t=t.length?t:e),e=qh(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=pv(t,this.g.videoLayout),e.length&&(t=e)),this.g.Sc&&(e=T0(t,this.g.Sc),e.length&&(t=e)),this.g.channelCount&&(e=dv(t,this.g.channelCount),e.length&&(t=e)),this.g.Kc&&(e=Gh(t,this.g.Kc),e.length&&(t=e)),this.g.fd&&(e=S0(t,this.g.fd),e.length&&(t=e)),e=w0(t,this.g.spatialAudio),e.length&&(t=e),this.g.audioCodec&&(e=x0(t,this.g.audioCodec),e.length&&(t=e)),new Kc(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&pl()))};function fv(e,t){t=At(t);var n=Mc(t,e.map(function(i){return Zf(i)}));return n?e.filter(function(i){return n==Zf(i)}):[]}function qh(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function Gh(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function S0(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function dv(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,i){return n.audio||i.audio?n.audio?i.audio?(i.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function T0(e,t){if(t=="AUTO"){var n=e.some(function(i){return!!(i.video&&i.video.hdr&&i.video.hdr=="HLG")});t=Rp(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}function pv(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function w0(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function x0(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function vo(){}function wa(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:Lr(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(S,T,b){return E.shakaMediaKeysPolyfill==="apple"&&T=="skd"&&(T=b.serverCertificate,b=cv(S),S=Sa(S,b,T)),S},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:$i(),minHdcpVersion:"",ignoreDuplicateInitData:!Vt("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};($i()||qn())&&t.preferredKeySystems.push("com.microsoft.playready");var n="reload",i=!1;!pl()||si()||qn()||Ru()||Ro()&&Hf()===79||er()&&!sl()&&!Fa()||za()&&Ql()||(n="smooth",i=!0),i={retryParameters:Lr(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Js,manifestPreprocessorTXml:Gd,sequenceMode:!1,multiTypeVariantsAllowed:i,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:Mp(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Js,manifestPreprocessorTXml:Gd,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var r={retryParameters:Lr(),failureCallback:function(S){return en([S])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:qn()||Ru(),dontChooseCodecs:!1,shouldFixTimestampOffset:Ro()||si(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};(Ro()||si()||er()||wc())&&(r.stallSkip=0),(navigator.userAgent.match(/Edge\//)||$i())&&(r.gapPadding=.01),si()&&(r.gapPadding=2),al()&&(r.crossBoundaryStrategy="reset"),eo()&&(r.crossBoundaryStrategy="reset_to_encrypted");var l={trackSelectionCallback:function(S){return G(function(T){return T.return(S)})},downloadSizeCallback:function(S){var T;return G(function(b){return b.g==1?navigator.storage&&navigator.storage.estimate?L(b,navigator.storage.estimate(),3):b.return(!0):(T=b.h,b.return(T.usage+S<.95*T.quota))})},progressCallback:function(S,T){return en([S,T])},usePersistentLicense:!0,numberOfParallelDownloads:5};e={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:ni()?.5:0,preferNetworkInformationBandwidth:!1},n={codecSwitchingStrategy:n,addExtraFeaturesToSourceBuffer:function(S){return en([S],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(S,T){return en([S,T])},dispatchAllEmsgBoxes:!1};var c=!1,f=!1,h=!0;Op()&&(f=c=!0,h=!1);var v={drm:t,manifest:i,streaming:r,mediaSource:n,offline:l,abrFactory:function(){return new Qt},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(Kd,[null].concat(te(Tt.apply(0,arguments)))))},abr:e,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:c,skipPlayDetection:f,supportsMultipleMediaElements:h,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};return l.trackSelectionCallback=function(S){return G(function(T){return T.return(E0(S,v.preferredAudioLanguage,v.preferredVideoHdrLevel))})},v}function qd(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function mu(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 Vd(e,t,n||wa(),i,"")}function E0(e,t,n){var i=n;i=="AUTO"&&(n=e.some(function(f){return!!(f.hdr&&f.hdr=="HLG")}),i=Rp(n));var r=e.filter(function(f){return!(f.type!="variant"||f.hdr&&f.hdr!=i)});n=[];var l=Mc(t,r.map(function(f){return f.language}));l&&(n=r.filter(function(f){return At(f.language)==l})),n.length==0&&(n=r.filter(function(f){return f.primary})),n.length==0&&(r.map(function(f){return f.language}),n=r);var c=n.filter(function(f){return f.height&&480>=f.height});for(c.length&&(c.sort(function(f,h){return h.height-f.height}),n=c.filter(function(f){return f.height==c[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(f,h){return f.bandwidth-h.bandwidth}),t.push(n[r])),e=A(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=ot&&n.type!="image"||t.push(n);return t}function Js(e){return en([e],e)}function Gd(e){return en([e],e)}Me("shaka.util.PlayerConfiguration",vo),vo.mergeConfigObjects=mu,vo.createDefaultForLL=qd,vo.createDefault=wa;function mo(){this.g=null,this.h=[]}function vf(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=A(e.h);for(var i=e.next();!i.done;i=e.next())i=i.value,n+=i.state==t?i.duration:0;return n}function hv(e){function t(l){return{timestamp:l.timestamp,state:l.state,duration:l.duration}}for(var n=[],i=A(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}function yv(){this.i=this.h=null,this.g=[]}function xa(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 Xi(){this.mc=this.bh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new mo,this.h=new yv}function sr(e,t,n,i){Nt.call(this),this.O=e,this.Z=t,this.Fa=i.networkingEngine,this.B=n,this.o=null,this.ya=0,this.Ma=i.Lc,this.F=i.Zi,this.Na=i.$i,this.g=i.config,this.l=this.G=this.h=null,this.pa=!1,this.H=i.kj,this.sa=!1,this.i=null,this.ka=!1,this.j=this.C=null,this.ea=!1,this.M=new Map,this.Aa=!1,this.Ga=i.jj,this.$=new Xi,this.oa=new It,this.m=new It,this.P=null,this.u=!1,this.fa=i.Uh,this.W=this.K=null,this.La=i.Th,this.T=!1,this.L=[],this.I=[],this.A=!0}nt(sr,Nt);function Su(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function ql(e){if(e.I)for(var t=A(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function gv(e,t){if(e.P=t,e.T=!0,e.L){t=A(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}y=sr.prototype,y.getStartTime=function(){return this.B},y.Qc=function(){return this.O},y.Hf=function(){return this.h};function A0(e){return e.ea=!0,e.j}function Zs(e){return e.sa=!0,e.H}y.getStats=function(){return this.$};function vv(e){return e.ka=!0,e.i}y.Ai=function(){return this.K?zu(this.K):null},y.zi=function(){return this.W?Un(this.W):null};function C0(e){return e.Aa=!0,e.M}y.start=function(){var e=this;(function(){var t;return G(function(n){switch(n.g){case 1:return L(n,Promise.resolve(),2);case 2:return ye(n,3),L(n,b0(e),5);case 5:if(Ea(e),E.shakaMediaKeysPolyfill==="webkit"){n.s(6);break}return L(n,mv(e),7);case 7:Ea(e);case 6:return L(n,I0(e),8);case 8:if(Ea(e),!e.fa||!e.i){n.s(9);break}return L(n,kg(e.i),10);case 10:Ea(e);case 9:e.m.resolve(),Le(n,0);break;case 3:t=De(n),t instanceof Y&&(t.code==7001||t.code==7003)||e.m.reject(t),ce(n)}})})()},y.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):Nt.prototype.dispatchEvent.call(this,e)},y.onError=function(e){e.severity===2&&(this.m.reject(e),this.destroy());var t=new Map().set("detail",e);t=new Ie("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Ea(e){if(e.u)throw new Y(2,7,7003)}function zh(e,t){e.dispatchEvent(new Ie("onstatechange",new Map().set("state",t)))}function b0(e){var t,n,i,r,l,c,f,h,v;return G(function(S){switch(S.g){case 1:if(zh(e,"manifest-parser"),e.l||(e.G=Ds(e.O,e.Z),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.A})),t=Date.now()/1e3,zh(e,"manifest"),e.h){S.s(2);break}return L(S,e.l.start(e.O,e.Na),3);case 3:if(e.h=S.h,e.h.variants.length!=1){S.s(2);break}for(n=[],i=e.h.variants[0],r=A([i.video,i.audio]),l=r.next();!l.done;l=r.next())(c=l.value)&&!c.segmentIndex&&n.push(c.createSegmentIndex());if(!(0<n.length)){S.s(2);break}return L(S,Promise.all(n),2);case 2:return e.oa.resolve(),f=new Ie("manifestparsed",void 0),L(S,Promise.resolve(),7);case 7:if(e.dispatchEvent(f),e.h.variants.length==0)throw new Y(2,4,4036);Sv(e.h),h=Date.now()/1e3,v=h-t,e.$.H=v,ce(S)}})}function mv(e,t){var n,i,r,l,c,f;return G(function(h){switch(h.g){case 1:if(!e.h||e.i)return h.return();if(zh(e,"drm-engine"),e.ya=Date.now()/1e3,e.i=e.Ma(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),n=qc(e.F,e.h),!n){h.s(2);break}return i=new Ie("trackschanged",void 0),L(h,Promise.resolve(),3);case 3:Ea(e),e.dispatchEvent(i);case 2:return r=ed(e.h.variants),l=!0,e.h&&e.h.presentationTimeline&&e.h.type!="HLS"&&(l=e.h.presentationTimeline.U()),L(h,lh(e.i,r,e.h.offlineSessionIds,l),4);case 4:if(Ea(e),!t){h.s(5);break}return L(h,e.i.Lb(t),6);case 6:Ea(e);case 5:return L(h,vd(e.F,e.h),7);case 7:if(c=h.h,!c){h.s(0);break}return f=new Ie("trackschanged",void 0),L(h,Promise.resolve(),9);case 9:e.dispatchEvent(f),ce(h)}})}y.configure=function(e,t){e=ma(e,t),mu(this.g,e)},y.getConfiguration=function(){return io(this.g)};function I0(e){var t,n,i,r,l,c,f;return G(function(h){return e.o||(e.o=e.g.adaptationSetCriteriaFactory(),e.o.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Sc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Kc:e.g.preferredAudioLabel,fd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),e.La&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),!e.fa||(n=e.h.presentationTimeline.U(),i=ed(e.h.variants),r=e.o.create(i),e.j.configure(e.g.abr),e.j.setVariants(Array.from(r.values())),l=e.j.chooseVariant(),!l)?h.s(0):(c=[],e.K=l,l.video&&c.push(Fh(e,l.video,n)),l.audio&&c.push(Fh(e,l.audio,n)),(f=Yu(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&td(l.audio,f,e.g)&&(c.push(Fh(e,f,n)),e.W=f),L(h,Promise.all(c),0))})}function Fh(e,t,n){var i,r,l,c,f;return G(function(h){return h.g==1?(i=e.g.streaming.segmentPrefetchLimit||2,r=new Md(i,t,function(v,S,T){return va(v,S,T||null,e.g.streaming.retryParameters,e.Fa,e.A)},!1),e.M.set(t.id,r),t.segmentIndex?h.s(2):L(h,t.createSegmentIndex(),2)):(l=e.B||0,c=t.segmentIndex.Gb(l),f=null,c&&(f=c.current(),f||(f=c.next().value)),f||(f=Bn(t.segmentIndex)),f?n?f.Y?L(h,ya(r,f.Y),0):h.s(0):L(h,zs(r,f.startTime),0):h.s(0))})}y.Lj=function(){return this.m},y.destroy=function(){var e=this,t,n,i;return G(function(r){switch(r.g){case 1:if(e.u=!0,!e.l||e.pa){r.s(2);break}return L(r,e.l.stop(),2);case 2:if(!e.j||e.ea){r.s(4);break}return L(r,e.j.stop(),4);case 4:if(e.H&&!e.sa&&e.H.release(),!e.i||e.ka){r.s(6);break}return L(r,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.Aa)for(t=A(e.M.values()),n=t.next();!n.done;n=t.next())i=n.value,Br(i);ce(r)}})};function Sv(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Me("shaka.media.PreloadManager",sr),sr.prototype.destroy=sr.prototype.destroy,sr.prototype.waitForFinish=sr.prototype.Lj,sr.prototype.getPrefetchedTextTrack=sr.prototype.zi,sr.prototype.getPrefetchedVariantTrack=sr.prototype.Ai;function Vr(e,t){Nt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Jc:null,Ic:ec,xc:function(i,r){return br(n,"enter",i,r)}},{Jc:$s,Ic:ec,xc:function(i,r){return br(n,"enter",i,r)}},{Jc:$o,Ic:ec,xc:function(i,r){return br(n,"enter",i,r)}},{Jc:ec,Ic:$s,xc:function(i,r){return br(n,"exit",i,r)}},{Jc:ec,Ic:$o,xc:function(i,r){return br(n,"exit",i,r)}},{Jc:$s,Ic:$o,xc:function(i,r){r?br(n,"skip",i,r):(br(n,"enter",i,r),br(n,"exit",i,r))}},{Jc:$o,Ic:$s,xc:function(i,r){return br(n,"skip",i,r)}}],this.h=new yt,this.h.D(this.i,"regionremove",function(i){n.g.delete(i.region)})}nt(Vr,Nt),Vr.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,Nt.prototype.release.call(this)},Vr.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=A(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),l=e<i.startTime?$s:e>i.endTime?$o:ec;this.g.set(i,l);for(var c=A(this.m),f=c.next();!f.done;f=c.next())f=f.value,f.Jc==r&&f.Ic==l&&f.xc(i,t)}}};function br(e,t,n,i){t=new Ie(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}var $s=1,ec=2,$o=3;function So(e,t,n){var i,r,l,c,f,h,v;return G(function(S){switch(S.g){case 1:var T=new fn(e).ab.split("/").pop().split(".");return i=T.length==1?"":T.pop().toLowerCase(),(r=Tv.get(i))?S.return(r):(l=0,c=un([e],n),ye(S,2),c.method="HEAD",L(S,t.request(l,c).promise,4));case 4:f=S.h,r=f.headers["content-type"],Le(S,3);break;case 2:if(h=De(S),!h||h.code!=1002&&h.code!=1001){S.s(3);break}return c.method="GET",L(S,t.request(l,c).promise,6);case 6:v=S.h,r=v.headers["content-type"];case 3:return S.return(r?r.toLowerCase().split(";").shift():"")}})}var Tv=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function mf(e,t){if(e.lineBreak)return`
|
||
`;if(e.nestedCues.length)return e.nestedCues.map(function(c){return mf(c,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=Hu,r=e.fontStyle==ss,l=e.textDecoration.includes(_o);return i&&n.push(["b"]),r&&n.push(["i"]),l&&n.push(["u"]),r=e.color,r==""&&t&&(r=t.color),i="",(r=zd(r))&&(i+="."+r),r=e.backgroundColor,r==""&&t&&(r=t.backgroundColor),(t=zd(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(c,f){var h=A(f);return f=h.next().value,h=h.next().value,"<"+f+(h===void 0?"":h)+">"+c+"</"+f+">"},e.payload)}function zd(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Sf(e,t){var n=[];e=A(Tf(e));for(var i=e.next();!i.done;i=e.next())if(i=i.value,i.isContainer)n.push.apply(n,te(Sf(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=mf(i,t),n.push(r)}return n}function Tf(e){var t=[];e=A(e);for(var n=e.next(),i={};!n.done;i={jf:void 0},n=e.next())i.jf=n.value,t.some(function(r){return function(l){return nu(r.jf,l)}}(i))||t.push(i.jf);return t}function wv(e){function t(i){for(var r=5381,l=i.length;l;)r=33*r^i.charCodeAt(--l);return(r>>>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{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function ui(e,t){for(this.h=e,this.i=t,this.g=null,e=A(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}y=ui.prototype,y.configure=function(){},y.remove=function(e,t){return this.g?(Xh(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},y.append=function(e){if(this.g){var t=Sf(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=A(t);for(var i=t.next(),r={};!i.done;r={Tc:void 0},i=t.next())r.Tc=i.value,!e.some(function(l){return function(c){return c.startTime==l.Tc.startTime&&c.endTime==l.Tc.endTime&&c.text==l.Tc.payload}}(r))&&r.Tc.payload&&(i=wv(r.Tc))&&n.push(i);for(e=n.slice().sort(function(l,c){return l.startTime!=c.startTime?l.startTime-c.startTime:l.endTime!=c.endTime?l.endTime-c.startTime:"line"in VTTCue.prototype?n.indexOf(c)-n.indexOf(l):n.indexOf(l)-n.indexOf(c)}),e=A(e),t=e.next();!t.done;t=e.next())this.g.addCue(t.value)}},y.destroy=function(){return this.g&&(Xh(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},y.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},y.setTextVisibility=function(e){e&&!this.g&&xv(this),this.g&&(this.g.mode=e?"showing":"hidden")},y.setTextLanguage=function(){},y.enableTextDisplayer=function(){xv(this)};function xv(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function Xh(e,t){var n=e.mode;e.mode=n=="showing"?"showing":"hidden";for(var i=A(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}Me("shaka.text.SimpleTextDisplayer",ui),ui.prototype.enableTextDisplayer=ui.prototype.enableTextDisplayer,ui.prototype.setTextLanguage=ui.prototype.setTextLanguage,ui.prototype.setTextVisibility=ui.prototype.setTextVisibility,ui.prototype.isTextVisible=ui.prototype.isTextVisible,ui.prototype.destroy=ui.prototype.destroy,ui.prototype.append=ui.prototype.append,ui.prototype.remove=ui.prototype.remove,ui.prototype.configure=ui.prototype.configure;function Vn(){}y=Vn.prototype,y.configure=function(){},y.remove=function(){},y.append=function(){},y.destroy=function(){},y.isTextVisible=function(){return!1},y.setTextVisibility=function(){},y.setTextLanguage=function(){},y.enableTextDisplayer=function(){},Me("shaka.text.StubTextDisplayer",Vn),Vn.prototype.enableTextDisplayer=Vn.prototype.enableTextDisplayer,Vn.prototype.setTextLanguage=Vn.prototype.setTextLanguage,Vn.prototype.setTextVisibility=Vn.prototype.setTextVisibility,Vn.prototype.isTextVisible=Vn.prototype.isTextVisible,Vn.prototype.destroy=Vn.prototype.destroy,Vn.prototype.append=Vn.prototype.append,Vn.prototype.remove=Vn.prototype.remove,Vn.prototype.configure=Vn.prototype.configure;function gi(e,t){var n=this;document.fullscreenEnabled||Et("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.A=!1,this.h=[],this.j=e,this.C=t,this.u=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C.appendChild(this.g),this.o=new ct(function(){n.j.paused||To(n)}),wf(this),this.l=new Map,this.i=new yt,this.i.D(document,"fullscreenchange",function(){To(n,!0)}),this.i.D(this.j,"seeking",function(){To(n,!0)}),this.i.D(this.j,"ratechange",function(){wf(n)}),this.i.D(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,r&&i?n.m=r/i:n.m=null}),this.B=null,"ResizeObserver"in E&&(this.B=new ResizeObserver(function(){To(n,!0)}),this.B.observe(this.g)),this.F=new Map}y=gi.prototype,y.configure=function(e){this.u=e,wf(this),To(this,!0)},y.append=function(e){var t=[].concat(te(this.h));e=A(Tf(e));for(var n=e.next(),i={};!n.done;i={kf:void 0},n=e.next())i.kf=n.value,t.some(function(r){return function(l){return nu(l,r.kf)}}(i))||this.h.push(i.kf);this.h.length&&wf(this),To(this)},y.destroy=function(){return this.g&&(this.C.removeChild(this.g),this.g=null,this.A=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.B&&(this.B.disconnect(),this.B=null)),Promise.resolve()},y.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(i){return i.startTime<e||i.endTime>=t}),To(this,n>this.h.length),this.h.length||wf(this),!0},y.isTextVisible=function(){return this.A},y.setTextVisibility=function(e){this.A=e,To(this,!0)},y.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},y.enableTextDisplayer=function(){};function wf(e){e.o&&(e.h.length?e.o.ua((e.u?e.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function D0(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function xf(e,t,n,i,r){var l=!1,c=[],f=[];t=A(t);for(var h=t.next();!h.done;h=t.next()){h=h.value,r.push(h);var v=e.l.get(h),S=h.startTime<=i&&h.endTime>i,T=v?v.Nh:null;v&&(c.push(v.lf),v.Ec&&c.push(v.Ec),S||(l=!0,e.l.delete(h),v=null)),S&&(f.push(h),v?D0(e,T)||(l=!0):(Yh(e,h,r),v=e.l.get(h),T=v.Nh,l=!0)),0<h.nestedCues.length&&T&&xf(e,h.nestedCues,T,i,r),r.pop()}if(l){for(i=A(c),r=i.next();!r.done;r=i.next())r=r.value,r.parentElement&&r.parentElement.removeChild(r);for(f.sort(function(b,I){return b.startTime!=I.startTime?b.startTime-I.startTime:b.endTime-I.endTime}),f=A(f),i=f.next();!i.done;i=f.next())i=e.l.get(i.value),i.Ec?(i.Ec.contains(n)&&i.Ec.removeChild(n),n.appendChild(i.Ec),i.Ec.appendChild(i.lf)):n.appendChild(i.lf)}}function To(e,t){if(e.g){var n=e.j.currentTime;if(!e.A||t!==void 0&&t){t=A(e.F.values());for(var i=t.next();!i.done;i=t.next())Ni(i.value);Ni(e.g),e.l.clear(),e.F.clear()}e.A&&xf(e,e.h,e.g,n,[])}}function Yh(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var l=document.createElement(r);if(r!="br"&&Ef(e,l,t,n,i),n=null,t.region&&t.region.id){var c=t.region,f=e.m===4/3?2.5:1.9;if(n=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==qi?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==qi?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var h=c.heightUnits==qi?"%":"px",v=c.widthUnits==qi?"%":"px",S=c.viewportAnchorUnits==qi?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var T=c.height,b=c.width;c.heightUnits===2&&(T=5.33*c.height,h="%"),c.widthUnits===2&&(b=c.width*f,v="%"),r.style.height=T+h,r.style.width=b+v,c.viewportAnchorUnits===2?(f=c.viewportAnchorY/75*100,h=c.viewportAnchorX/(e.m===4/3?160:210)*100,f-=c.regionAnchorY*T/100,h-=c.regionAnchorX*b/100,r.style.top=f+"%",r.style.left=h+"%"):(r.style.top=c.viewportAnchorY-c.regionAnchorY*T/100+S,r.style.left=c.viewportAnchorX-c.regionAnchorX*b/100+S),c.heightUnits!==0&&c.widthUnits!==0&&c.viewportAnchorUnits!==0&&(c=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=c+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.F.set(n,r),n=r}}r=l,i&&(r=document.createElement("span"),r.classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",l.appendChild(r)),e.l.set(t,{lf:l,Nh:r,Ec:n})}function O0(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==zf?n:e==="left"||e==="start"&&t===as||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===as?"line-right":"center"}function Ef(e,t,n,i,r){var l=t.style,c=n.nestedCues.length==0,f=1<i.length;l.whiteSpace="pre-wrap";var h=n.payload.replace(/\s+$/g,function(S){return" ".repeat(S.length)});if(l.webkitTextStrokeColor=n.textStrokeColor,l.webkitTextStrokeWidth=n.textStrokeWidth,l.color=n.color,l.direction=n.direction,l.opacity=n.opacity,l.paddingLeft=Wh(n.linePadding,n,e.C),l.paddingRight=Wh(n.linePadding,n,e.C),l.textCombineUpright=n.textCombineUpright,l.textShadow=n.textShadow,n.backgroundImage)l.backgroundImage="url('"+n.backgroundImage+"')",l.backgroundRepeat="no-repeat",l.backgroundSize="contain",l.backgroundPosition="center",n.backgroundColor&&(l.backgroundColor=n.backgroundColor),l.width="100%",l.height="100%";else{if(n.nestedCues.length)var v=t;else v=document.createElement("span"),t.appendChild(v);n.border&&(v.style.border=n.border),r||((t=Ev(i,function(S){return S.backgroundColor}))?v.style.backgroundColor=t:h&&(v.style.backgroundColor="rgba(0, 0, 0, 0.8)")),h&&(v.textContent=h)}f&&!i[i.length-1].isContainer?l.display="inline":(l.display="flex",l.flexDirection="column",l.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(l.width="100%",l.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(l.width="100%",l.alignItems="end"),l.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),c||(l.margin="0"),l.fontFamily=n.fontFamily,l.fontWeight=n.fontWeight.toString(),l.fontStyle=n.fontStyle,l.letterSpacing=n.letterSpacing,l.fontSize=Wh(n.fontSize,n,e.C,e.u?e.u.fontScaleFactor:1),i=n.line,i!=null&&(c=n.lineInterpretation,c==Lo&&(c=1,f=16,e.m&&1>e.m&&(f=32),i=0>i?100+i/f*100:i/f*100),c==1&&(l.position="absolute",n.writingMode==mr?(l.width="100%",n.lineAlign==ml?l.top=i+"%":n.lineAlign=="end"&&(l.bottom=100-i+"%")):n.writingMode=="vertical-lr"?(l.height="100%",n.lineAlign==ml?l.left=i+"%":n.lineAlign=="end"&&(l.right=100-i+"%")):(l.height="100%",n.lineAlign==ml?l.right=i+"%":n.lineAlign=="end"&&(l.left=100-i+"%")))),l.lineHeight=n.lineHeight,e=O0(n),e=="line-left"?(l.cssFloat="left",n.position!==null&&(l.position="absolute",n.writingMode==mr?(l.left=n.position+"%",l.width="auto"):l.top=n.position+"%")):e=="line-right"?(l.cssFloat="right",n.position!==null&&(l.position="absolute",n.writingMode==mr?(l.right=100-n.position+"%",l.width="auto"):l.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(l.position="absolute",n.writingMode==mr?(l.left=n.position+"%",l.width="auto"):l.top=n.position+"%"),l.textAlign=n.textAlign,l.textDecoration=n.textDecoration.join(" "),l.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&l.writingMode==n.writingMode||(l.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==mr?l.width=n.size+"%":l.height=n.size+"%")}function Wh(e,t,n,i){i=i===void 0?1:i;var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function Ev(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||i===0)return i}return null}Me("shaka.text.UITextDisplayer",gi),gi.prototype.enableTextDisplayer=gi.prototype.enableTextDisplayer,gi.prototype.setTextLanguage=gi.prototype.setTextLanguage,gi.prototype.setTextVisibility=gi.prototype.setTextVisibility,gi.prototype.isTextVisible=gi.prototype.isTextVisible,gi.prototype.remove=gi.prototype.remove,gi.prototype.destroy=gi.prototype.destroy,gi.prototype.append=gi.prototype.append,gi.prototype.configure=gi.prototype.configure;function Av(e,t){function n(l){for(var c=l,f=A(t),h=f.next();!h.done;h=f.next())h=h.value,h.end&&h.start<l&&(c+=h.end-h.start);return l=Math.floor(c/3600),f=Math.floor(c/60%60),h=Math.floor(c%60),c=Math.floor(1e3*c%1e3),(10>l?"0":"")+l+":"+(10>f?"0":"")+f+":"+(10>h?"0":"")+h+"."+(100>c?10>c?"00":"0":"")+c}var i=Sf(e);e=`WEBVTT
|
||
|
||
`,i=A(i);for(var r=i.next();!r.done;r=i.next())r=r.value,e+=n(r.startTime)+" --> "+n(r.endTime)+function(l){var c=[];switch(l.textAlign){case"left":c.push("align:left");break;case"right":c.push("align:right");break;case zi:c.push("align:middle");break;case"start":c.push("align:start");break;case"end":c.push("align:end")}switch(l.writingMode){case"vertical-lr":c.push("vertical:lr");break;case"vertical-rl":c.push("vertical:rl")}return c.length?" "+c.join(" "):""}(r)+`
|
||
`,e+=r.payload+`
|
||
|
||
`;return e}Me("shaka.text.WebVttGenerator",function(){});function Fd(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new yt,this.j=null}Fd.prototype.setMediaElement=function(e){this.j=e,k0(this)},Fd.prototype.configure=function(e){this.g=e};function Cv(e){e.u=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.Qa()}function Qh(e,t){e.l=t,e.l?e.i==Ca?e.i=Af:e.i==Jd&&(e.i=ba):e.i==Af?e.i=Ca:e.i==ba&&(e.i=Jd)}function bv(e,t){if(e.g&&e.g.enabled&&e.g.version==ny&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function Xd(e,t,n){try{if(!e.g.enabled)return t;var i=Jh(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=xu;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=Wd;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=tc;break e}r=void 0}i.ot=r,i.su=!0;var l=wo(i);return el(t,l)}catch(c){return ko("CMCD_SRC_ERROR","Could not generate src CMCD data.",c),t}}function k0(e){e.C.ma(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.ma(e.j,"playing",function(){e.o||(e.o=Date.now())})}function Jh(e){return e.g.sessionId||(e.g.sessionId=E.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function Tu(e,t,n){n=n===void 0?{}:n;var i=i===void 0?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,Jh(e)),n.pr=e.h.gb();var r=n.ot===xo||n.ot===Wd;if(e.B&&r&&(n.bs=!0,n.su=!0,e.B=!1),n.su==null&&(n.su=e.F),n.v===ny&&(e.h.U()&&(n.ltc=e.h.Zd()),r=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,r!=null&&(n.msd=r,e.G=!0)),e=Zh(e,n),i)i=wu(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var l=wo(e);l&&(t.uris=t.uris.map(function(c){return el(c,l)}))}}}function Zh(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(i,r){return n.includes(r)&&(i[r]=t[r]),i},{}):t}function Yd(e){if(e.type===0)return Iv;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?Wd:xo;if(t=="audio")return xu;if(t=="text")return e.mimeType==="application/mp4"?Qd:Aa}}function $h(e,t){if(t=e.h.Fb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):NaN}function ey(e,t){if(t=e.h.Fb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):0}function ty(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0],n=A(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.type==="variant"&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case xo:return e.videoBandwidth||NaN;case xu:return e.audioBandwidth||NaN;default:return e.bandwidth}}function wo(e){function t(T){return 100*n(T/100)}function n(T){return Math.round(T)}function i(T){return!Number.isNaN(T)&&T!=null&&T!==""&&T!==!1}var r=[],l={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(T){return encodeURIComponent(T)},rtp:t,tb:n},c=Object.keys(e||{}).sort();c=A(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var h=e[f];if(i(h)&&(f!=="v"||h!==1)&&(f!="pr"||h!==1)){var v=l[f];v&&(h=v(h)),v=typeof h;var S=void 0;S=v==="string"&&f!=="ot"&&f!=="sf"&&f!=="st"?f+"="+JSON.stringify(h):v==="boolean"?f:v==="symbol"?f+"="+h.description:f+"="+h,r.push(S)}}return r.join(",")}function wu(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],l={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=A(t);for(var c=t.next();!c.done;c=t.next())c=c.value,r[l[c]!=null?l[c]:1][c]=e[c];for(e=0;e<r.length;e++)(l=wo(r[e]))&&(n["CMCD-"+i[e]]=l);return n}function el(e,t){return!t||e.includes("offline:")?e:(e=new fn(e),e.g.set("CMCD",t),e.toString())}var tc="m",xu="a",xo="v",Wd="av",Iv="i",Aa="c",Qd="tt",ny=2,Ca="d",Af="ld",Jd="h",ba="lh";Me("shaka.util.CmcdManager.StreamingFormat",{DASH:Ca,hk:Af,HLS:Jd,ik:ba,wk:"s",OTHER:"o"});function _i(e){this.h=e,this.g=null}y=_i.prototype,y.configure=function(e){this.h=e},y.Ug=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Zd)?1e3*this.g.get(Zd):null},y.Sg=function(){return this.h.enabled&&this.g&&this.g.has(nc)?1e3*this.g.get(nc):null},y.Ci=function(){return this.h.enabled&&this.g&&this.g.has(Cf)?this.g.get(Cf):null},y.Di=function(){return this.h.enabled&&this.g&&this.g.has(ry)?this.g.get(ry):null},y.getBandwidthEstimate=function(e){var t=this.Sg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function iy(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Me("shaka.util.CmsdManager",_i),_i.prototype.getBandwidthEstimate=_i.prototype.getBandwidthEstimate,_i.prototype.getRoundTripTime=_i.prototype.Di,_i.prototype.getResponseDelay=_i.prototype.Ci,_i.prototype.getEstimatedThroughput=_i.prototype.Sg,_i.prototype.getMaxBitrate=_i.prototype.Ug;var nc="etp",Zd="mb",Cf="rd",ry="rtt";function Dv(){this.g=null,this.h=[]}function ic(e,t){return G(function(n){if(n.g==1)return e.g?L(n,new Promise(function(i){return e.h.push(i)}),2):n.s(2);e.g=t,ce(n)})}Dv.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function o(e,t,n){t=t===void 0?null:t,Nt.call(this);var i=this;this.m=Mv,this.h=null,this.ue=t,this.oa=!1,this.Qe=new yt,this.zd=new yt,this.l=new yt,this.Na=new yt,this.Sb=new yt,this.G=this.I=this.C=this.F=null,this.Te=0,this.$=new Dv,this.Z=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.yg=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.pa=this.K=this.La=null,this.sa=!1,this.Fa=this.o=null,this.We=1e9,this.Oe=[],this.Ve=-1,this.g=Ia(this),this.Xe=qd(),this.P=null,this.Ue=-1,this.Ma=null,this.ka={width:1/0,height:1/0},this.te=new ea(this.g,this.ka,null),this.Ee=[],this.B=null,this.W=this.g.adaptationSetCriteriaFactory(),this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Tb=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Fd=this.g.preferForcedSubs,this.Cd=[],n&&n(this),this.L=iC(this),this.fa=new _i(this.g.cmsd),this.F=vi(this),this.F.kg(this.g.streaming.forceHTTP),this.F.lg(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Ub=this.ea=this.A=null,this.Ze=!1,this.Ye=new ct(function(){return G(function(r){if(r.g==1)return i.ea?L(r,i.Lb(i.Ub,!0),3):r.s(0);if(r.g!=4)return L(r,i.load(i.ea),4);i.Ze?i.Ub.pause():i.Ub.play(),i.ea=null,i.Ze=!1,ce(r)})}),Rv&&(this.A=Rv(),this.A.configure(this.g.ads),this.Sb.D(this.A,"ad-content-pause-requested",function(r){var l;return G(function(c){if(c.g==1)return i.Ye.stop(),i.ea?c.s(0):(i.Ub=i.h,i.Ze=i.Uc(),l=r.saveLivePosition||!1,L(c,i.Lg(!0,l),3));i.ea=c.h,ce(c)})}),this.Sb.D(this.A,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.ea){var l=i.ea;l.B&&r&&(l.B+=r)}i.Ye.da(.1)}),this.Sb.D(this.A,"ad-content-attach-requested",function(){return G(function(r){return i.h||!i.Ub?r.s(0):L(r,i.Lb(i.Ub,!0),0)})})),this.Qe.D(E,"online",function(){_0(i),i.eg()}),this.xe=new ct(function(){for(var r=Date.now()/1e3,l=!1,c=!0,f=A(i.i.variants),h=f.next();!h.done;h=f.next())h=h.value,0<h.disabledUntilTime&&h.disabledUntilTime<=r&&(h.disabledUntilTime=0,l=!0),0<h.disabledUntilTime&&(c=!1);c&&i.xe.stop(),l&&$d(i,!1,void 0,!1,!1)}),this.ya=null,e&&(bt("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(e,!0)),this.u=null}nt(o,Nt);function u(e){e.O!=null&&(Wa(e.O),e.O.release(),e.O=null)}function d(e,t,n){n||t.lcevc.enabled?(u(e),e.O==null&&(e.O=new no(e.h,e.yg,t.lcevc,n),e.I&&(e.I.I=e.O))):u(e)}function g(e,t){return new Ie(e,t)}y=o.prototype,y.destroy=function(){var e=this,t;return G(function(n){switch(n.g){case 1:return e.m==tl?n.return():(u(e),t=e.detach(),e.m=tl,L(n,t,2));case 2:return L(n,e.pf(),3);case 3:if(e.Qe&&(e.Qe.release(),e.Qe=null),e.zd&&(e.zd.release(),e.zd=null),e.l&&(e.l.release(),e.l=null),e.Na&&(e.Na.release(),e.Na=null),e.Sb&&(e.Sb.release(),e.Sb=null),e.Fa=null,e.g=null,e.B=null,e.ue=null,e.L=null,e.fa=null,!e.F){n.s(4);break}return L(n,e.F.destroy(),5);case 5:e.F=null;case 4:e.o&&(e.o.release(),e.o=null),Nt.prototype.release.call(e),ce(n)}})};function w(e,t){O2.set(e,t)}function C(e,t){e.dispatchEvent(g("onstatechange",new Map().set("state",t)))}y.Lb=function(e,t){t=t===void 0?!0:t;var n=this,i,r,l;return G(function(c){switch(c.g){case 1:if(n.m==tl)throw new Y(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){c.s(2);break}return L(c,n.detach(),2);case 2:return L(c,U(n,"attach"),4);case 4:if(c.h)return c.return();if(ye(c,5,6),i||(C(n,"attach"),r=function(){var f=U0(n,!1);f&&ep(n,f)},n.zd.D(e,"error",r),n.h=e,n.L&&n.L.setMediaElement(e)),!t||!$r()||n.I){c.s(6);break}return L(c,wt(n),6);case 6:Te(c),n.$.release(),_e(c,0);break;case 5:return l=De(c),L(c,n.detach(),10);case 10:throw l}})},y.Vh=function(e){this.yg=e},y.detach=function(e){e=e===void 0?!1:e;var t=this;return G(function(n){if(n.g==1){if(t.m==tl)throw new Y(2,7,7e3);return L(n,t.kc(!1,e),2)}if(n.g!=3)return L(n,U(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.zd.Qa(),t.h=null),C(t,"detach"),t.A&&!e&&t.A.release()}finally{t.$.release()}ce(n)})};function U(e,t){var n;return G(function(i){return i.g==1?(n=++e.Te,L(i,ic(e.$,t),2)):n!=e.Te?(e.$.release(),i.return(!0)):i.return(!1)})}y.kc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i,r,l,c,f,h,v,S,T,b;return G(function(I){switch(I.g){case 1:return n.m!=tl&&(n.m=Mv),L(I,U(n,"unload"),2);case 2:return I.h?I.return():(it(I,3),n.sa=!1,C(n,"unload"),u(n),i=n.Cd.map(function(O){return O()}),n.Cd=[],L(I,Promise.all(i),5));case 5:if(n.dispatchEvent(g("unloading")),n.yd&&(n.yd.release(),n.yd=null),n.Aa&&(n.Aa.release(),n.Aa=null),n.Ga&&(n.Ga.release(),n.Ga=null),n.h&&(n.l.Qa(),n.Na.Qa()),n.xe.stop(),n.La&&(n.La.release(),n.La=null),n.pa&&(n.pa.stop(),n.pa=null),!n.H){I.s(6);break}return L(I,n.H.stop(),7);case 7:n.H=null,n.Qb=null;case 6:if(!n.o){I.s(8);break}return L(I,n.o.stop(),8);case 8:if(!n.j){I.s(10);break}return L(I,n.j.destroy(),11);case 11:n.j=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.G&&(n.G.release(),n.G=null),E.shakaMediaKeysPolyfill!=="webkit"||!n.C){I.s(12);break}return L(I,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.I){I.s(14);break}return L(I,n.I.destroy(),15);case 15:n.I=null;case 14:if(n.A&&!t&&n.A.onAssetUnload(),n.ea&&!t&&(n.ea.destroy(),n.ea=null),t||n.Ye.stop(),n.L&&Cv(n.L),n.fa&&(n.fa.g=null),!n.u){I.s(16);break}return L(I,n.u.destroy(),17);case 17:n.u=null;case 16:if(n.h&&(Ni(n.h),n.h.src&&(n.h.removeAttribute("src"),n.h.load())),!n.C){I.s(18);break}return L(I,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.ya&&n.T!=n.ya.Qc()&&(n.ya.u||n.ya.destroy(),n.ya=null),n.T=null,n.Pb=null,n.M=null,n.i){for(r=A(n.i.variants),l=r.next();!l.done;l=r.next())for(c=l.value,f=A([c.audio,c.video]),h=f.next();!h.done;h=f.next())(v=h.value)&&v.segmentIndex&&v.segmentIndex.release();for(S=A(n.i.textStreams),T=S.next();!T.done;T=S.next())b=T.value,b.segmentIndex&&b.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(Wu.clear(),Zr.clear()),n.i=null,n.B=new Xi,n.Se=null,n.Ma=null,n.P=null,n.Ue=-1,n.Oe=[],n.Ve=-1,n.F&&n.F.Hg(),P0(n);case 3:Te(I),n.$.release(),_e(I,4);break;case 4:if(e&&$r()&&!n.I&&n.h)return L(I,wt(n),0);I.s(0)}})},y.Kj=function(e){this.Z=e},y.load=function(e,t,n){t=t===void 0?null:t;var i=this,r,l,c,f,h,v,S,T,b,I,O,P,N;return G(function(_){switch(_.g){case 1:if(i.m==tl)throw new Y(2,7,7e3);if(r=null,l="",e instanceof sr){if(e.u)throw new Y(2,7,7006);r=e,l=r.Qc()||""}else l=e||"";return L(_,ic(i.$,"load"),2);case 2:if(i.$.release(),!i.h)throw new Y(2,7,7002);if(!i.T){_.s(3);break}return i.T=l,L(_,i.kc(!1),3);case 3:if(c=++i.Te,f=function(){return G(function(B){if(B.g==1)return i.Te==c?B.s(0):r?L(B,r.destroy(),3):B.s(3);throw new Y(2,7,7e3)})},h=function(B,F){return G(function(z){switch(z.g){case 1:return it(z,2),L(z,ic(i.$,F),4);case 4:return L(z,f(),5);case 5:return L(z,B(),6);case 6:return L(z,f(),7);case 7:r&&i.g&&(r.g=i.g);case 2:Te(z),i.$.release(),_e(z,0)}})},ye(_,5,6),t==null&&r&&(t=r.getStartTime()),i.Z=t,i.sa=!1,i.dispatchEvent(g("loading")),r){n=r.Z,_.s(8);break}if(n){_.s(8);break}return L(_,h(function(){return G(function(B){if(B.g==1)return L(B,Ce(i,l),2);n=B.h,ce(B)})},"guessMimeType_"),8);case 8:if(v=!!r,r){gv(r,i),i.B=r.getStats(),_.s(11);break}return L(_,ve(i,l,t,n,!0),12);case 12:(r=_.h)?(r.A=!1,gv(r,i),i.B=r.getStats(),r.start(),r.m.catch(function(){})):i.B=new Xi;case 11:return S=!r,T=Date.now()/1e3,i.B=r?r.getStats():new Xi,i.T=l,i.Pb=n||null,i.Aa=new ha(function(){return i.Ra()}),S?L(_,h(function(){return G(function(B){return L(B,fe(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.Ga=new ha(function(){return i.Ra()}),L(_,h(function(){return G(function(B){if(B.g==1)return L(B,Promise.race([r.oa,r.m]),2);i.Qb=r.G;var F=r;F.pa=!0,i.H=F.l,i.i=r.Hf(),ce(B)})},"waitForFinish"),15));case 15:if(i.I){_.s(16);break}return L(_,h(function(){return G(function(B){return L(B,wt(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.u.enableTextDisplayer?i.u.enableTextDisplayer():bt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),L(_,h(function(){return G(function(B){return L(B,r.m,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.te=r.F,i.H&&i.H.setMediaElement&&i.h&&i.H.setMediaElement(i.h),i.yd=Zs(r),i.xd=r.Ga,(b=r.o)&&(i.W=b),v&&i.h&&i.h.nodeName==="AUDIO"&&(H(i),i.configure("manifest.disableVideo",!0)),r.i){_.s(19);break}return L(_,h(function(){return G(function(B){return L(B,mv(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.C=vv(r),L(_,h(function(){return G(function(B){return L(B,i.C.Lb(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(I=r.C)||i.Fa&&i.Fa==I||(i.o=A0(r),i.Fa=r.C,typeof i.o.setMediaElement!="function"&&(bt("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.o.setMediaElement=function(){}),typeof i.o.setCmsdManager!="function"&&(bt("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.o.setCmsdManager=function(){}),typeof i.o.trySuggestStreams!="function"&&(bt("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.o.trySuggestStreams=function(){})),O=C0(r),P=r.K,L(_,h(function(){return G(function(B){return L(B,vn(i,T,P,O),0)})},"loadInner_"),22);case 22:ql(r),i.Pb&&ni()&&Qf(i.Pb)&&Ul(i.I,i.T,i.Pb),_.s(14);break;case 23:return L(_,h(function(){return G(function(B){return L(B,le(i,T,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(g("loaded"));case 6:if(Te(_),!r){_.s(25);break}return L(_,r.destroy(),25);case 25:i.ya=null,_e(_,0);break;case 5:if(N=De(_),!N||N.code==7e3){_.s(27);break}return L(_,i.kc(!1),27);case 27:throw N}})};function H(e){for(var t=A(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.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(i){return i.audio})}y.Gj=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i;return G(function(r){return r.g==1?L(r,$(n),2):r.g!=3?(i=r.h,L(r,n.kc(e,t),3)):r.return(i)})},y.Lg=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,i;return G(function(r){return r.g==1?L(r,$(n,t),2):r.g!=3?(i=r.h,L(r,n.detach(e),3)):r.return(i)})};function $(e,t){t=t===void 0?!1:t;var n,i;return G(function(r){if(r.g==1)return n=null,e.i&&e.H&&e.Qb&&e.T?(i=e.h.currentTime,e.U()&&!t&&(i=null),L(r,Ee(e,e.T,i,e.Pb,!0,!1,!1),3)):r.s(2);if(r.g!=2){n=r.h,e.Ee.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var l=n,c=e.H,f=e.Qb;l.h=e.i,l.l=c,l.G=f,l=n,c=e.Fa,l.j=e.o,l.C=c,n.o=e.W,n.start(),e.i=null,e.H=null,e.Qb=null,e.o=null,e.Fa=null}return r.return(n)})}y.preload=function(e,t,n){t=t===void 0?null:t;var i=this,r;return G(function(l){return l.g==1?L(l,ve(i,e,t,n),2):((r=l.h)?r.start():ep(i,new Y(2,7,7005)),l.return(r))})},y.pf=function(){var e=this,t,n,i,r;return G(function(l){for(t=[],n=A(e.Ee),i=n.next();!i.done;i=n.next())r=i.value,r.u||t.push(r.destroy());return e.Ee=[],L(l,Promise.all(t),0)})};function ve(e,t,n,i,r){r=r===void 0?!1:r;var l,c,f;return G(function(h){return h.g==1?i?h.s(2):L(h,Ce(e,t),3):(h.g!=2&&(i=h.h),me(e,i)?h.return(null):(l=!1,c=!0,r&&(e.o&&e.Fa==e.g.abrFactory&&(c=!1),e.h&&e.h.nodeName==="AUDIO"&&(l=!0)),f=Ee(e,t,n,i||null,!r,l,c),f=r?f.then(function(v){return v.A=!1,v}):f.then(function(v){return e.Ee.push(v),v}),h.return(f)))})}function Ee(e,t,n,i,r,l,c){r=r===void 0?!0:r,l=l===void 0?!1:l,c=c===void 0?!0:c;var f,h,v,S,T,b,I,O,P,N,_,B,F,z;return G(function(J){return J.g==1?(f=null,h=io(e.g),l&&(h.manifest.disableVideo=!0),v=function(){return f.T&&f.u?null:f},S=function(){return v()?v().getConfiguration():e.g},e.ka.width!=1/0||e.ka.height!=1/0||e.g.ignoreHardwareResolution?J.s(2):L(J,Nu(),3)):(J.g!=2&&(T=J.h,e.ka.width=T.width,e.ka.height=T.height),b=new ea(h,e.ka,null),I={networkingEngine:e.F,filter:function(q){var K,W;return G(function(Q){if(Q.g==1)return L(Q,vd(b,q),2);if(Q.g!=4)return K=Q.h,K?(W=g("trackschanged"),L(Q,Promise.resolve(),4)):Q.s(0);f.dispatchEvent(W),ce(Q)})},makeTextStreamsForClosedCaptions:function(q){return lC(e,q)},onTimelineRegionAdded:function(q){Ph(f.H,q)},onEvent:function(q){return f.dispatchEvent(q)},onError:function(q){return f.onError(q)},isLowLatencyMode:function(){return S().streaming.lowLatencyMode},updateDuration:function(){e.j&&f.T&&e.j.updateDuration()},newDrmInfo:function(q){var K=f.i,W=K?K.h:null;W&&K.A&&md(b,W.keySystem,q)},onManifestUpdated:function(){var q=new Map().set("isLive",e.U());f.dispatchEvent(g("manifestupdated",q)),Su(f,!1,function(){e.A&&e.A.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(q,K,W,Q){var ie=q;q=="com.apple.hls.interstitial"&&(ie="com.apple.quicktime.HLS",q={startTime:K,endTime:W,values:Q},e.A)&&e.A.onHLSInterstitialMetadata(e,e.h,q),Q=A(Q),q=Q.next();for(var Z={};!q.done;Z={Zf:void 0},q=Q.next())Z.Zf=q.value,Z.Zf.name!="ID"&&Su(f,!1,function(ne){return function(){rt(e,K,W,ie,ne.Zf)}}(Z))},disableStream:function(q){return e.disableStream(q,e.g.streaming.maxDisabledTime)},addFont:function(q,K){return e.addFont(q,K)}},O=new ha(function(){return e.Ra()}),O.addEventListener("regionadd",function(q){var K=q.region;ay(e,"timelineregionadded",K,f),Su(f,!1,function(){e.A&&(e.A.onDashTimedMetadata(K),e.A.onDASHInterstitialMetadata(e,e.h,K))})}),P=null,h.streaming.observeQualityChanges&&(P=new Ks(function(){return e.Fb()}),P.addEventListener("qualitychange",function(q){C2(e,q.quality,q.position)}),P.addEventListener("audiotrackchange",function(q){C2(e,q.quality,q.position,!0)})),N=!0,_={Xb:e.F,onError:function(q){return f.onError(q)},pe:function(q){Su(f,!0,function(){e:{var K=q,W=g("keystatuschanged");e.dispatchEvent(W);var Q=Object.keys(K);Q.length==1&&Q[0]==""&&(Q=["00"],K={"00":K[""]}),W=Q.length==1&&Q[0]=="00";var ie=!1;if(Q.length){Q=e.keySystem();for(var Z=su(e.g.drm.clearKeys),ne=A(e.i.variants),re=ne.next();!re.done;re=ne.next()){re=re.value;var ue=[];re.audio&&ue.push(re.audio),re.video&&ue.push(re.video),ue=A(ue);for(var de=ue.next();!de.done;de=ue.next()){var se=de.value;if(de=re.allowedByKeySystem,se.keyIds.size)if(se.drmInfos.length&&!Z.size){se=A(se.drmInfos);for(var we=se.next();!we.done;we=se.next())if(we=we.value,we.keyIds.size&&we.keySystem==Q){re.allowedByKeySystem=!0,we=A(we.keyIds);for(var be=we.next();!be.done;be=we.next())be=be.value,((be=K[W?"00":be])||e.C.F)&&(re.allowedByKeySystem=re.allowedByKeySystem&&!!be&&!Sd.includes(be))}}else for(re.allowedByKeySystem=!0,se=A(se.keyIds),we=se.next();!we.done;we=se.next())we=we.value,((we=K[W?"00":we])||e.C.F)&&(re.allowedByKeySystem=re.allowedByKeySystem&&!!we&&!Sd.includes(we));de!=re.allowedByKeySystem&&(ie=!0)}}}if(ie&&(cr(e),!bf(e)))break e;(K=e.j.l)&&!K.allowedByKeySystem&&$d(e)}})},onExpirationUpdated:function(q,K){var W=g("expirationupdated");f.dispatchEvent(W),(W=f.l)&&W.onExpirationUpdated&&W.onExpirationUpdated(q,K)},onEvent:function(q){f.dispatchEvent(q),q.type=="drmsessionupdate"&&N&&(N=!1,q=Date.now()/1e3-f.ya,(e.B||f.getStats()).j=q,e.O&&Wa(e.O))}},B=vi(e,v),ld(e.F,B),F=function(){return e.Lc(_)},z={config:h,$i:I,kj:O,jj:P,Lc:F,Zi:b,networkingEngine:B,Uh:r,Th:c},f=new sr(t,i,n,z),J.return(f))})}function Ce(e,t){var n,i;return G(function(r){return r.g==1?(n=e.g.manifest.retryParameters,L(r,So(t,e.F,n),2)):(i=r.h,i=="application/x-mpegurl"&&ni()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function me(e,t){if(!$r())return!0;if(t){if((e.h||kp()).canPlayType(t)=="")return!1;if(!$r()||!Nl.has(t))return!0;if(Qf(t))return ni()&&(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(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function Se(e){var t=e.g.textDisplayFactory;t!==e.Se&&(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):bt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Se=t,e.u.setTextVisibility(e.oa))}function wt(e){var t,n,i;return G(function(r){if(r.g==1)return C(e,"media-source"),e.h.removeAttribute("src"),Ni(e.h),Se(e),t=nC(e.h,e.u,{si:function(){return e.keySystem()},onMetadata:function(l,c,f){l=A(l);for(var h=l.next();!h.done;h=l.next())if(h=h.value,h.data&&typeof h.cueTime=="number"&&h.frames){var v=h.cueTime+c,S=f;S&&v>S&&(S=v);for(var T=A(h.frames),b=T.next();!b.done;b=T.next())rt(e,v,S,"org.id3",b.value);e.A&&e.A.onHlsTimedMetadata(h,v)}},ej:function(l){e.Ga&&Ph(e.Ga,{schemeIdUri:l.schemeIdUri,startTime:l.startTime,endTime:l.endTime,id:String(l.id),emsg:l})},onEvent:function(l){return e.dispatchEvent(l)},gj:function(){e.H&&e.H.update&&e.H.update()}},e.O),t.configure(e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ea=i,L(r,t.G,2);e.I=t,ce(r)})}function vt(e,t,n){function i(){return L0(e)}e.l.D(t,"playing",i),e.l.D(t,"pause",i),e.l.D(t,"ended",i),e.l.D(t,"ratechange",function(){var r=e.h.playbackRate;r!=0&&(e.K&&(e.K.set(r),e.m==Ui&&e.o.playbackRateChanged(r),v2(e,r)),r=g("ratechange"),e.dispatchEvent(r))}),t.remote&&(e.l.D(t.remote,"connect",function(){return cr(e)}),e.l.D(t.remote,"connecting",function(){return cr(e)}),e.l.D(t.remote,"disconnect",function(){return G(function(r){if(r.g==1)return e.j&&t.remote.state=="disconnected"?L(r,Kl(e.j),2):r.s(2);cr(e),ce(r)})})),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return cr(e)}),e.l.D(t.audioTracks,"removetrack",function(){return cr(e)}),e.l.D(t.audioTracks,"change",function(){return cr(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(r){if(r.track)switch(r=r.track,r.kind){case"metadata":tt(e,r);break;case"chapters":xt(e,r);break;default:cr(e)}}),e.l.D(t.textTracks,"removetrack",function(){return cr(e)}),e.l.D(t.textTracks,"change",function(){return cr(e)}),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.l.D(t,"waiting",function(){e.j&&Kh(e.j)}),e.l.D(t,"timeupdate",function(){e.j&&Kh(e.j)}))),t.preload!="none"&&e.l.ma(t,"loadedmetadata",function(){e.B.C=Date.now()/1e3-n})}function vn(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re;return G(function(ue){switch(ue.g){case 1:for(C(e,"load"),r=e.h,e.K=new Hs({$d:function(){return r.playbackRate},sc:function(){return r.defaultPlaybackRate},mg:function(de){r.playbackRate=de},gh:function(de){r.currentTime+=de}}),vt(e,r,t),l=!1,c=A(e.i.variants),f=c.next();!f.done;f=c.next())h=f.value,(v=h.video&&h.video.dependencyStream)&&(l=ag(v));d(e,e.g,l),e.Tb=e.g.preferredTextLanguage,e.Hd=e.g.preferredTextRole,e.Fd=e.g.preferForcedSubs,j0(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(de,se,we){e.i&&e.j&&de!=e.j.l&&ly(e,de,!0,se===void 0?!1:se,we===void 0?0:we)}),e.o.setMediaElement(r),e.o.setCmsdManager(e.fa),e.j=rC(e),e.j.configure(e.g.streaming),e.m=Ui,e.dispatchEvent(g("streaming")),S=n;case 2:for((b=e.j.l)||S||(S=bf(e)?e.o.chooseVariant():null),I=[],T=b||S,O=A([T.video,T.audio]),P=O.next();!P.done;P=O.next())(N=P.value)&&!N.segmentIndex&&(I.push(N.createSegmentIndex()),N.dependencyStream&&I.push(N.dependencyStream.createSegmentIndex()));if(!(0<I.length)){ue.s(4);break}return L(ue,Promise.all(I),4);case 4:if(!T||T.disabledUntilTime!=0){ue.s(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(T),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Xe):Et("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.")),e.L&&(Qh(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),bv(e.L,1e3*t)),j0(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),_d(e.j,e.g.playRangeStart,e.g.playRangeEnd),_=function(de){e.G=nn(e,de),e.La=Eu(e,de),l2(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(B=e.Z,B==null&&e.i.startTime&&(B=e.i.startTime),_(B)),b){ue.s(7);break}if(!e.g.streaming.startAtSegmentBoundary){ue.s(8);break}return F=e.i.presentationTimeline,z=e.Z||e.h.currentTime,e.Z==null&&e.i.startTime&&(z=e.i.startTime),J=F.Hb(),q=F.ob(),z<J?z=J:z>q&&(z=q),L(ue,uC(S,z),9);case 9:K=ue.h,_(K);case 8:ly(e,S,!0,!1,0);case 7:return e.G.ready(),W=e.vc().find(function(de){return de.active}),W||((Q=Yu(e.i.textStreams,e.Tb,e.Hd,e.Fd)[0]||null)&&xa(e.B.h,Q,!0),S&&(Q?(td(S.audio,Q,e.g)&&(e.oa=!0),e.oa&&e.u.setTextVisibility(!0),E2(e)):e.oa=!1),Q&&(e.g.streaming.alwaysStreamText||e.Pf())&&(Qo(e.j,Q),uy(e))),L(ue,e.j.start(i),10);case 10:e.g.abr.enabled&&(e.o.enable(),A2(e)),cr(e),bf(e),e.i.variants.some(function(de){return de.primary}),((ie=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(Z=function(){return m2(e)},e.l.D(r,"timeupdate",Z)),ie||(ne=function(){return Ov(e)},e.l.D(r,"timeupdate",ne),Ov(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(re=function(){var de;return G(function(se){if(se.g==1)return de=e.Ra().end-e.h.currentTime,isNaN(de)||!(de<=e.g.streaming.preloadNextUrlWindow)?se.s(0):(e.l.Ja(r,"timeupdate",re),L(se,e.preload(e.i.nextUrl),4));e.ya=se.h,ce(se)})},e.l.D(r,"timeupdate",re)),e.l.D(r,"ended",function(){e.load(e.ya||e.i.nextUrl)}))),e.A&&e.A.onManifestUpdated(ie),e.sa=!0,ce(ue)}})}function fe(e,t){var n,i,r,l,c;return G(function(f){return f.g==1?(n=wn,i=Date.now()/1e3,r=!0,e.C=e.Lc({Xb:e.F,onError:function(h){ep(e,h)},pe:function(){},onExpirationUpdated:function(){var h=g("expirationupdated");e.dispatchEvent(h)},onEvent:function(h){e.dispatchEvent(h),h.type=="drmsessionupdate"&&r&&(r=!1,e.B.j=Date.now()/1e3-i)}}),e.C.configure(e.g.drm),l={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},c={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?Di(t):"",codecs:t?_n(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.la,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},c.fullMimeTypes.add(dn(c.mimeType,c.codecs)),t.startsWith("audio/")?(c.type=n.V,l.audio=c):l.video=c,e.C.$=!0,L(f,lh(e.C,[l],[]),2)):L(f,e.C.Lb(e.h),0)})}function le(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O;return G(function(P){switch(P.g){case 1:if(C(e,"src-equals"),i=e.h,e.G=new pa(i),r=!1,e.Cd.push(function(){r=!0}),e.Z!=null&&e.G.af(e.Z),e.La=M0(e,e.Z||0),e.K=new Hs({$d:function(){return i.playbackRate},sc:function(){return i.defaultPlaybackRate},mg:function(N){i.playbackRate=N},gh:function(N){i.currentTime+=N}}),l2(e,i,!0),i.textTracks&&(Se(e),l=function(){var N=oy(e).find(function(_){return _.mode!=="disabled"});N&&(N.mode="showing"),(N=p2(e))&&(N.mode="hidden")},c=function(){var N=oy(e).find(function(B){return B.mode!=="disabled"});N&&(N.mode="hidden"),N=p2(e);var _=e.u.isTextVisible();N&&_&&(N.mode="showing")},e.l.D(i,"enterpictureinpicture",function(){return l()}),e.l.D(i,"leavepictureinpicture",function(){return c()}),i.remote?(e.l.D(i.remote,"connect",function(){return c()}),e.l.D(i.remote,"connecting",function(){return c()}),e.l.D(i.remote,"disconnect",function(){return c()})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.l.D(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return c()}),f=i,f.webkitSupportsFullscreen&&e.l.D(f,"webkitpresentationmodechanged",function(){f.webkitPresentationMode!="inline"?l():c()})),vt(e,i,t),h=Xd(e.L,e.T,n),!h.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(h+="#t=",0<e.g.playRangeStart&&(h+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(h+=","+e.g.playRangeEnd)),!e.I){P.s(2);break}return L(P,e.I.destroy(),3);case 3:e.I=null;case 2:return Ni(i),i.src=h,(si()||Ro())&&i.load(),i.preload!="none"&&!i.autoplay&&Qf(n)&&ni()&&i.load(),e.m=Hr,e.dispatchEvent(g("streaming")),v=new It,yi(i,HTMLMediaElement.HAVE_METADATA,e.l,function(){e.G.ready(),v.resolve()}),S=function(){return new Promise(function(N){var _=new ct(N);e.l.D(i.textTracks,"change",function(){return _.da(.5)}),_.da(.5)})},yi(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,function(){var N,_,B,F,z;return G(function(J){if(J.g==1)return L(J,S(),2);if(r)return J.return();for(ge(e),N=oy(e),N.some(function(q){return q.mode==="showing"})&&(e.oa=!0,e.u.setTextVisibility(!0)),N.length&&(e.u.enableTextDisplayer?e.u.enableTextDisplayer():bt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),_=!1,B=A(N),F=B.next();!F.done;F=B.next())z=F.value,z.mode!=="disabled"&&(_?(z.mode="disabled",Et("Found more than one enabled text track, disabling it",z)):(d2(e,z),_=!0));Ae(e),ce(J)})}),i.error?v.reject(U0(e)):i.preload=="none"&&(Et('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.'),v.resolve()),e.l.ma(i,"error",function(){v.reject(U0(e))}),L(P,Gu(e.g.streaming.loadTimeout,v),4);case 4:((T=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(b=function(){return m2(e)},e.l.D(i,"timeupdate",b)),T||(I=function(){return Ov(e)},e.l.D(i,"timeupdate",I),Ov(e)),e.A&&(e.A.onManifestUpdated(T),T&&(O=e.Ra().end,e.l.D(i,"progress",function(){var N=e.Ra().end;O!=N&&(e.A.onManifestUpdated(e.U()),O=N)}))),e.sa=!0,ce(P)}})}function ge(e){var t=e.g.preferredAudioLanguage;t!=""&&e.sh(t,e.g.preferredVariantRole)}function Ae(e){var t=e.g.preferredTextLanguage;t!=""&&e.hg(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function tt(e,t){if(t.kind=="metadata"){t.mode="hidden",e.l.D(t,"cuechange",function(){if(t.activeCues)for(var i=A(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,rt(e,r.startTime,r.endTime,r.type,r.value),e.A&&e.A.onCueMetadataChange(r.value);if(t.cues){i=[],r=A(t.cues);for(var l=r.next(),c={};!l.done;c={bc:void 0},l=r.next())c.bc=l.value,c.bc.type=="com.apple.quicktime.HLS"&&c.bc.startTime!=null&&(l=i.find(function(f){return function(h){return h.startTime==f.bc.startTime&&h.endTime==f.bc.endTime}}(c)),l||(l={startTime:c.bc.startTime,endTime:c.bc.endTime,values:[]},i.push(l)),l.values.push(c.bc.value));for(i=A(i),r=i.next();!r.done;r=i.next())r=r.value,r.values.some(function(f){return f.key=="X-ASSET-URI"||f.key=="X-ASSET-LIST"})&&e.A&&(r.values.push({key:"CUE",description:"",data:r.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.A.onHLSInterstitialMetadata(e,e.h,r))}});var n=new ct(function(){var i=oC(e);i=A(i);for(var r=i.next();!r.done;r=i.next())r.value.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}function Ut(e,t){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(g("metadata",t))}function rt(e,t,n,i,r){e.Aa&&(t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r},t.id=JSON.stringify(t),Ph(e.Aa,t))}function xt(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new ct(function(){t.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}y.oj=function(){for(var e=this.$;e.g;)e.release()},y.Lc=function(e){return new Hc(e)};function vi(e,t){function n(r){t()?t().dispatchEvent(r):e.dispatchEvent(r)}function i(r){t()?Su(t(),!0,r):r()}return t||(t=function(){return null}),new Kt(function(r,l,c,f){var h=t()?t().j:e.o;h&&h.segmentDownloaded(r,l,c,f)},function(r,l,c){l=new Map().set("headers",r).set("request",l).set("requestType",c),n(g("downloadheadersreceived",l)),i(function(){if(e.fa){var f=e.fa;if(f.h.enabled){var h=r["cmsd-static"];if(h)try{var v=new Map,S=h.split(",");for(h=0;h<S.length;h++){var T=S[h].split("=");v.set(T[0],iy(T[1]))}}catch{}if(v=r["cmsd-dynamic"]){try{var b=new Map,I=v.split(";");for(v=1;v<I.length;v++){var O=I[v].split("=");b.set(O[0],iy(O[1]))}var P=b}catch{P=null}P&&(f.g=P)}}}})},function(r,l){r=new Map().set("request",r).set("response",l),n(g("downloadcompleted",r))},function(r,l,c,f){r=new Map().set("request",r).set("error",l).set("httpResponseCode",c).set("aborted",f),n(g("downloadfailed",r))},function(r,l,c){i(function(){var f=e.L,h=c;if(h=h===void 0?{}:h,f.g.enabled)if(l.method==="HEAD")Tu(f,l);else switch(r){case 0:try{if(f.g.enabled){if(h.type){e:{switch(h.type){case 4:var v=f.l?Af:Ca;break e;case 3:case 2:v=f.l?ba:Jd;break e;case 5:v="s";break e}v=void 0}f.i=v}Tu(f,l,{ot:tc,su:!f.u})}}catch(ue){ko("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",ue)}break;case Fi:try{if(f.g.enabled){var S=h.segment;v=0,S&&(v=S.endTime-S.startTime);var T={d:1e3*v,st:f.h.U()?"l":"v"};T.ot=Yd(h);var b=T.ot===xo||T.ot===xu||T.ot===Wd||T.ot===Qd,I=h.stream;if(I){var O=f.h.gb();if(b&&(T.bl=$h(f,I.type),T.ot!==Qd)){var P=ey(f,I.type);T.dl=O?P/Math.abs(O):P}if(I.bandwidth&&(T.br=I.bandwidth/1e3),I.segmentIndex&&S){var N=I.segmentIndex.Gb(S.endTime,!0,0>O);if(N){var _=N.next().value;if(_&&_!=S){if(!es(S.N(),_.N())){var B=_.N()[0],F=l.uris[0],z=new URL(B),J=new URL(F);if(z.origin!==J.origin)var q=B;else{for(var K=z.pathname.split("/").slice(1),W=J.pathname.split("/").slice(1,-1);K[0]===W[0];)K.shift(),W.shift();for(;W.length;)W.shift(),K.unshift("..");q=K.join("/")}T.nor=q}if((_.Sa||_.wa)&&(S.Sa!=_.Sa||S.wa!=_.wa)){var Q=_.Sa+"-";_.wa&&(Q+=_.wa),T.nrr=Q}}}var ie=f.h.gb()||1,Z=ey(f,I.type)||500,ne=I.bandwidth,re=ne?ne*(S.endTime-S.startTime)/1e3/(Z/ie/1e3)*f.g.rtpSafetyFactor:NaN;isNaN(re)||(T.rtp=re)}}b&&T.ot!==Qd&&(T.tb=ty(f,T.ot)/1e3),Tu(f,l,T)}}catch(ue){ko("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",ue)}break;case 2:case 5:case 6:Tu(f,l,{ot:"k"});break;case 4:Tu(f,l,{ot:"o"})}})},function(r,l,c,f){(r=t()?t().l:e.H)&&r.banLocation&&r.banLocation(f)},function(r,l){if(l.data){l=l.data.byteLength;var c=t()?t().getStats():e.B;c&&(c.mc=isNaN(c.mc)?l:c.mc+l,r===0&&(c.bh=l))}})}function nn(e,t){return new Od(e.h,e.i,e.g.streaming,t,function(){e.La&&af(e.La,!0),e.j&&e.j.Fc(),e.M&&Au(e)},function(n){return e.dispatchEvent(n)})}function Eu(e,t){var n=e.U()||0<t;t=new Vr(e.yd,n),t.addEventListener("enter",function(l){ay(e,"timelineregionenter",l.region)}),t.addEventListener("exit",function(l){ay(e,"timelineregionexit",l.region)}),t.addEventListener("skip",function(l){var c=l.region;l.seeking||(ay(e,"timelineregionenter",c),ay(e,"timelineregionexit",c))});var i=new Vr(e.Aa,n);i.addEventListener("enter",function(l){Ut(e,l.region)}),n=new Vr(e.Ga,n),n.addEventListener("enter",function(l){l=new Map().set("detail",l.region.emsg),e.dispatchEvent(g("emsg",l))});var r=new Wo(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.xd&&r.g.add(e.xd),r}function M0(e,t){t=new Vr(e.Aa,0<t),t.addEventListener("enter",function(i){Ut(e,i.region)});var n=new Wo(e.h);return n.g.add(t),n}function l2(e,t,n){e.M=new l0,e.M.g=As,u2(e),P0(e),e.pa=new ct(function(){Au(e)}),e.g.streaming.rebufferingGoal&&e.pa.ua(.25),e.l.D(t,"waiting",function(){return Au(e)}),e.l.D(t,"canplaythrough",function(){return Au(e)}),e.l.D(t,"playing",function(){return Au(e)}),e.l.D(t,"seeked",function(){return Au(e)}),n&&(e.l.D(t,"stalled",function(){return Au(e)}),e.l.D(t,"progress",function(){return Au(e)}),e.l.D(t,"timeupdate",function(){return Au(e)}))}function u2(e){var t=e.g.streaming.rebufferingGoal;e.M.i.set(Cs,Math.min(.5,t/2)).set(As,t)}function Au(e){switch(e.m){case Hr:if(e.Uc())var t=!0;else{var n=xd(e.h.buffered);t=n!=null&&n>=e.h.duration-1}break;case Ui:e:if(e.Uc()||yu(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.cc();var i=xd(e.h.buffered);if(i!=null&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Ah(e.h.buffered,e.h.currentTime),n=e.M;var r=t,l=n.i.get(n.g);t=n.g,i=r||i>=l&&0<i?Cs:As,n.g=i,(t=t!=i)&&i===Cs&&(n.h=Date.now()),t&&P0(e)}function nC(e,t,n,i){return new Mn(e,t,n,i)}function iC(e){return new Fd({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},Fb:function(){return e.Fb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},gb:function(){return e.gb()},xb:function(){return e.xb()},Rb:function(){return e.Rb()},U:function(){return e.U()},Zd:function(){return e.Zd()}},e.g.cmcd)}function rC(e){return new ov(e.i,{Rc:function(){return e.G?e.G.Od():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},gb:function(){return e.gb()},video:e.h,aa:e.I,Xb:e.F,onError:function(t){return ep(e,t)},onEvent:function(t){return e.dispatchEvent(t)},qe:function(t,n,i){var r=t.startTime;if(t=t.endTime,n=n.type,n!=ot){if(e.G){e.G.ih();var l=bd(e.I,n);!e.U()&&e.h.paused&&!e.h.seeking&&l!=null&&0<l&&e.G.Od()<l&&e.G.af(l)}Au(e)}i=new Map().set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(g("segmentappended",i))},fj:function(t,n){(n=n.Wc)&&e.xd&&ev(e.xd,n,t)},Fg:function(t,n){var i=e.C;if(i.g.parseInbandPsshEnabled&&!i.F&&["audio","video"].includes(t)){t=new fd(Je(n)),n=0;for(var r=A(t.data),l=r.next();!l.done;l=r.next())n+=l.value.length;if(n==0)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,t=A(t.data),l=t.next();!l.done;l=t.next())l=l.value,n.set(l,r),r+=l.length;Ts(i,"cenc",n),i=i.m}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}y.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=ma(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(bt("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(bt("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(bt("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&ni(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&typeof e.streaming.liveSync=="boolean"){bt("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(bt("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(bt("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(bt("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(bt("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(bt("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(bt("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(bt("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(bt("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){bt("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(bt("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(bt("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(bt("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(bt("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(bt("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(bt("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(bt("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(bt("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(bt("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(bt("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){n=!1;for(var l in e.drm.advanced){var c=e.drm.advanced[l];i=c.videoRobustness,c=c.audioRobustness,"videoRobustness"in e.drm.advanced[l]&&!Array.isArray(e.drm.advanced[l].videoRobustness)&&(e.drm.advanced[l].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[l]&&!Array.isArray(e.drm.advanced[l].audioRobustness)&&(e.drm.advanced[l].audioRobustness=[c],n=!0)}n&&bt("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"crossBoundaryStrategy"in e.streaming&&e.streaming.crossBoundaryStrategy!="keep"&&(e.streaming.inaccurateManifestTolerance=0),l=mu(this.g,e,Ia(this)),a2(this),l},y.ci=function(e){this.Xe=e};function a2(e){if(e.te=new ea(e.g,e.ka,e.C),e.H){var t=io(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=tl&&mh(e.te,e.i)&&cr(e)}catch(r){ep(e,r)}e.o&&bf(e),t=e.j.l,!t||t.allowedByApplication&&t.allowedByKeySystem||$d(e)}if(e.F&&(e.F.kg(e.g.streaming.forceHTTP),e.F.lg(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ea=e.g.manifest.segmentRelativeVttTiming),e.u)if(t=e.g.textDisplayFactory,e.Se!=t){var n=e.u;if(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):bt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||bt("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.u.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.u;n.ea=i,n.h&&(n.h.j=i)}e.Se=t,e.j&&(t=e.j,(n=t.i.get(ot))&&Zo(t,n.stream,!0,0,!0))}else e.u.configure&&e.u.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),A2(e)),e.M&&u2(e),e.pa&&(e.g.streaming.rebufferingGoal?e.pa.ua(.25):e.pa.stop()),e.i&&j0(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.A&&e.A.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}y.getConfiguration=function(){var e=Ia(this);return mu(e,this.g,Ia(this)),e},y.ki=function(){return this.Xe},y.Vg=function(){var e=Ia(this);return mu(e,this.g,Ia(this)),Hd(this.g,Ia(this))},y.Qg=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(t=Math.min(this.h.currentTime+t,this.Ra().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},y.sj=function(){for(var e in this.g)delete this.g[e];mu(this.g,Ia(this),Ia(this)),a2(this)},y.ti=function(){return this.m},y.Tg=function(){return this.i?this.i.type:null},y.xi=function(){return this.h},y.xb=function(){return this.F},y.Qc=function(){return this.T},y.Pg=function(){return this.A?this.A:null},y.U=function(){return this.i&&!this.Pa()?this.i.presentationTimeline.U():this.h&&this.h.src?this.h.duration==1/0:!1},y.yc=function(){return this.i?this.i.presentationTimeline.yc():!1},y.Qi=function(){if(this.i&&!this.Pa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},y.Ra=function(){if(this.i&&!this.Pa()){if(!this.sa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Hb(),end:e.ob()}}if(this.h&&this.h.src&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},y.Ni=function(){this.U()&&(this.h.currentTime=this.Ra().end)},y.Ri=function(){return this.sa},y.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},y.drmInfo=function(){return this.C?this.C.h:null},y.pd=function(){return this.C?this.C.pd():1/0},y.Gf=function(){return this.C?this.C.Gf():[]},y.Yd=function(){return this.C?this.C.Yd():{}},y.Of=function(){return this.M?this.M.g==As:!1},y.gb=function(){return this.h?this.K?this.K.i:1:0},y.Md=function(e,t){t=t===void 0?!0:t,e==0?Et("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==Ui&&(this.o.playbackRateChanged(e),Ys(this.j,t&&1<Math.abs(e))),v2(this,e))},y.gd=function(){var e=this.K.sc();this.m==Hr&&this.K.set(e),this.m==Ui&&(this.K.set(e),this.o.playbackRateChanged(e),Ys(this.j,!1)),this.Na.Qa()},y.Rb=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.l:null,t=[],n=0,i=A(this.i.variants),r=i.next();!r.done;r=i.next())if(r=r.value,Vo(r)){var l=zu(r);l.active=r==e,l.active||n==1||e==null||r.video!=e.video||r.audio!=e.audio||(l.active=!0),l.active&&n++,t.push(l)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(c){return _c(c)}):[]},y.vc=function(){if(this.i&&!this.Pa()){for(var e=this.j?this.j.u:null,t=[],n=A(this.i.textStreams),i=n.next();!i.done;i=n.next()){i=i.value;var r=Un(i);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?oy(this).map(function(l){return hs(l)}):[]},y.pi=function(){var e=this.Oe;return this.i&&(e=this.i.imageStreams),e.map(function(t){return Lc(t)})},y.fi=function(e){var t=this,n,i;return G(function(r){return r.g==1?L(r,c2(t,e),2):(n=r.h,n?(i=[],n.segmentIndex.Eb(function(l){var c=s2(l.tilesLayout||n.tilesLayout);if(c){c=c.rows*c.oc;for(var f=l.j-l.startTime,h=0;h<c;h++){var v=f2(n,l.startTime+f*h/c);v&&i.push(v)}}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null))})};function s2(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}y.Hi=function(e,t){var n=this,i;return G(function(r){return r.g==1?L(r,c2(n,e),2):(i=r.h)?r.return(f2(i,t)):r.return(null)})};function c2(e,t){var n,i;return G(function(r){return r.g==1?e.m!=Ui&&e.m!=Hr||(n=e.Oe,e.i&&(n=e.i.imageStreams),i=n[0],!i)?r.return(null):(t!=null&&(i=n.find(function(l){return l.id==t})),i?i.segmentIndex?r.s(2):L(r,i.createSegmentIndex(),2):r.return(null)):r.return(i)})}function f2(e,t){var n=e.segmentIndex.find(t);if(n==null)return null;n=e.segmentIndex.get(n);var i=s2(n.tilesLayout||e.tilesLayout);if(!i)return null;var r=e.width||0,l=e.height||0,c=r/i.oc,f=l/i.rows,h=i.oc*i.rows,v=n.j-n.startTime;v=n.B||v/h;var S=n.startTime,T=0,b=0;return 1<h&&(t=Math.floor((t-n.startTime)/v),S=n.startTime+t*v,T=t%i.oc*c,b=Math.floor(t/i.oc)*f),t=!1,(i=n.thumbnailSprite)&&(t=!0,f=i.height,T=i.positionX,b=i.positionY,c=i.width),{segment:n,imageHeight:l,imageWidth:r,height:f,positionX:T,positionY:b,startTime:S,duration:v,uris:n.N(),width:c,sprite:t,mimeType:n.mimeType||e.mimeType,codecs:n.codecs||e.codecs}}y.th=function(e){function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.j.u&&(xa(n.B.h,i,!1),Qo(n.j,i),kv(n),uy(n),n.Tb=i.language)}var n=this;this.i&&this.G&&(t(),!this.Pa())||function(){if(n.h&&n.h.textTracks){var i=oy(n),r=i.find(function(l){return l.mode!=="disabled"});(i=i.find(function(l){return Fu(l)===e.id}))&&(r!==i&&(r&&(r.mode="disabled",n.l.Ja(r,"cuechange"),n.u.remove(0,1/0)),i&&d2(n,i)),kv(n),uy(n))}}()};function d2(e,t){e.l.D(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=A(r);for(var l=r.next();!l.done;l=r.next()){if(l=l.value,l.endTime===1/0||l.endTime<l.startTime)l=null;else{var c=new Ft(l.startTime,l.endTime,l.text);c.line=typeof l.line=="number"?l.line:null,l.lineAlign&&(c.lineAlign=l.lineAlign),c.lineInterpretation=l.snapToLines?Lo:1,c.position=typeof l.position=="number"?l.position:null,l.positionAlign&&(c.positionAlign=l.positionAlign),c.size=l.size,c.textAlign=l.align,l.vertical==="lr"?c.writingMode="vertical-lr":l.vertical==="rl"&&(c.writingMode="vertical-rl"),l.region&&(c.region.id=l.region.id,c.region.height=l.region.lines,c.region.heightUnits=2,c.region.regionAnchorX=l.region.regionAnchorX,c.region.regionAnchorY=l.region.regionAnchorY,c.region.scroll=l.region.scroll,c.region.viewportAnchorX=l.region.viewportAnchorX,c.region.viewportAnchorY=l.region.viewportAnchorY,c.region.viewportAnchorUnits=qi,c.region.width=l.region.width,c.region.widthUnits=qi),bc(c),l=c}l&&((c=e.g.mediaSource.modifyCueCallback)&&c(l,null,n),i.push(l))}e.u.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}y.Be=function(e,t,n){function i(){var l=r.i.variants.find(function(f){return f.id==e.id});if(l&&Vo(l)){var c=r.j.l;r.g.abr.enabled&&(c.video!=l.video||c.audio&&l.audio&&c.audio.language==l.audio.language&&c.audio.channelsCount==l.audio.channelsCount&&c.audio.label==l.audio.label)&&Et("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.Pa()?ly(r,l,!1,!1,0):ly(r,l,!1,t||!1,n||0),r.W.configure({language:l.language,role:l.audio&&l.audio.roles&&l.audio.roles[0]||"",channelCount:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,Sc:l.video&&l.video.hdr?l.video.hdr:"",spatialAudio:l.audio&&l.audio.spatialAudio?l.audio.spatialAudio:!1,videoLayout:l.video&&l.video.videoLayout?l.video.videoLayout:"",Kc:l.audio&&l.audio.label?l.audio.label:"",fd:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:l.audio&&l.audio.codecs?l.audio.codecs:""}),bf(r)}}var r=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){if(r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks);l=A(l);for(var c=l.next();!c.done;c=l.next())if(c=c.value,Fu(c)==e.id){S2(r,c);break}}}()},y.xj=function(e,t){t=t===void 0?0:t;var n=this.Rb();if(n.length){var i=n.find(function(r){return r.active});i&&(n=n.find(function(r){return r.videoId===i.videoId&&r.language==e.language&&r.label==e.label&&r.audioMimeType==e.mimeType&&r.audioCodec==e.codecs&&r.primary==e.primary&&es(r.audioRoles,e.roles)&&r.accessibilityPurpose==e.accessibilityPurpose&&r.channelsCount==e.channelsCount&&r.audioSamplingRate==e.audioSamplingRate&&r.spatialAudio==e.spatialAudio}))&&!n.active&&this.Be(n,!0,t)}},y.getAudioTracks=function(){var e=this.Rb();if(!e.length)return[];var t=e.find(function(l){return l.active});if(!t)return[];var n=e;if(this.m==Ui&&(n=e.filter(function(l){return l.originalVideoId===t.originalVideoId&&l.audioCodec})),!n.length)return[];e=new Map,n=A(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalAudioId;r||i.audioId==null||(r=String(i.audioId)),r&&e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())},y.hi=function(){return I2(this.Rb())},y.Fi=function(){return I2(this.vc())},y.gi=function(){return Array.from(b2(this.Rb()))},y.Ei=function(){return Array.from(b2(this.vc()))},y.sh=function(e,t,n,i,r,l,c){function f(){function v(O,P){return O.video||P.video?O.video&&P.video?Math.abs((O.video.height||0)-(P.video.height||0))+Math.abs((O.video.width||0)-(P.video.width||0)):1/0:0}h.W=h.g.adaptationSetCriteriaFactory(),h.W.configure({language:e,role:t||"",channelCount:n||0,Sc:"",spatialAudio:l||!1,videoLayout:"",Kc:c||"",fd:"",codecSwitchingStrategy:h.g.mediaSource.codecSwitchingStrategy,audioCodec:r||""});var S=h.j.l,T=h.W.create(h.i.variants),b=null;T=A(T.values());for(var I=T.next();!I.done;I=T.next())I=I.value,Vo(I)&&(!b||v(b,S)>v(I,S))&&(b=I);b!=S&&(b?(S=zu(b),h.Be(S,!0,i||0)):$d(h))}var h=this;n=n===void 0?0:n,i=i===void 0?0:i,r=r===void 0?"":r,l=l===void 0?!1:l,c=c===void 0?"":c,!(this.i&&this.G&&(f(),!this.Pa()))&&function(){if(h.h&&h.h.audioTracks){var v=Yu(h.Rb(),e,t||"",!1)[0];v&&h.Be(v)}}()},y.hg=function(e,t,n){function i(){r.Tb=e,r.Hd=t||"",r.Fd=n||!1;var l=Yu(r.i.textStreams,r.Tb,r.Hd,r.Fd)[0]||null;l&&l!=r.j.u&&(xa(r.B.h,l,!1),r.g.streaming.alwaysStreamText||r.Pf())&&(Qo(r.j,l),kv(r),uy(r))}var r=this;n=n===void 0?!1:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){var l=Yu(r.vc(),e,t||"",n||!1)[0];l&&r.th(l)}()},y.yj=function(e,t,n){function i(){for(var l=null,c=A(r.i.variants),f=c.next();!f.done;f=c.next())if(f=f.value,f.audio.label==e){l=f;break}l!=null&&(r.W=r.g.adaptationSetCriteriaFactory(),r.W.configure({language:l.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),$d(r,t,n))}var r=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Pa()))&&function(){if(r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks),c=null;l=A(l);for(var f=l.next();!f.done;f=l.next())f=f.value,f.label==e&&(c=f);c&&S2(r,c)}}()},y.Pf=function(){var e=this.oa;return this.u?this.u.isTextVisible():e},y.Rg=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?h2(this).map(function(e){return hs(e)}):[]},y.ji=function(e){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var t=At(e),n=h2(this).filter(function(f){return At(f.language)==t});if(!n||!n.length)return[];e=[];var i=new Set;n=A(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&r.cues){r=A(r.cues);for(var l=r.next();!l.done;l=r.next()){var c=l.value;(l=c.id)&&l!=""||(l=c.startTime+"-"+c.endTime+"-"+c.text),c={id:l,title:c.text,startTime:c.startTime,endTime:c.endTime},i.has(l)||(e.push(c),i.add(l))}}return e};function oy(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function p2(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function oC(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}function h2(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="chapters"})}y.zh=function(e){e=!!e,this.oa!=e&&(this.oa=e,this.m==Ui?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.u||(e=Yu(this.i.textStreams,this.Tb,this.Hd,this.Fd),0<e.length&&(Qo(this.j,e[0]),kv(this),uy(this))):Uh(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),E2(this))},y.yi=function(){if(this.G)var e=this.G.Od();else{if(this.Z==null)return new Date;e=this.Z}if(this.i&&!this.Pa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},y.Wg=function(){if(this.i&&!this.Pa()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},y.ae=function(){return this.U()&&this.i?this.i.presentationTimeline.ae():null},y.Fb=function(){if(this.m==Ui)return this.I.Fb();var e={total:[],audio:[],video:[],text:[]};return this.m==Hr&&(e.total=ho(this.h.buffered)),e},y.Zd=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Wg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},y.getStats=function(){if(this.m!=Ui&&this.m!=Hr)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};L0(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.B;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.B.P=this.G.zg(),this.B.T=this.G.Ag()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.B;var i=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=i,this.B.L=Number(n.corruptedVideoFrames)}if(this.C?(n=this.C,n=n.H?n.H:NaN):n=NaN,this.B.o=n,this.m==Ui){if(n=this.j.l,t=this.j.u,n){i=this.K?this.K.i:1;var r=i*n.bandwidth;t&&t.bandwidth&&(r+=i*t.bandwidth),this.B.A=r}n&&n.video&&(t=this.B,i=n.video.height||NaN,t.m=n.video.width||NaN,t.l=i),this.U()&&(n=this.Zd()||0,this.B.B=n/1e3),this.i&&(this.B.G=this.i.periodCount,this.B.F=this.i.gapCount,this.i.presentationTimeline&&(this.B.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.B.u=n}this.m==Hr&&(n=this.B,n.mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.B,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var l=this.B;e=l.m,n=l.l,t=l.A,i=l.M,r=l.O;var c=l.L,f=l.T,h=l.P,v=l.u,S=l.i,T=l.C,b=l.H,I=l.j,O=vf(l.g,"playing"),P=vf(l.g,"paused"),N=vf(l.g,"buffering"),_=l.o,B=l.B,F=l.I,z=l.bh,J=l.mc,q=l.K,K=l.G,W=l.F,Q=hv(l.g),ie=[];l=A(l.h.g);for(var Z=l.next();!Z.done;Z=l.next())Z=Z.value,ie.push({timestamp:Z.timestamp,id:Z.id,type:Z.type,fromAdaptation:Z.fromAdaptation,bandwidth:Z.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:r,corruptedFrames:c,stallsDetected:f,gapsJumped:h,estimatedBandwidth:v,completionPercent:S,loadLatency:T,manifestTimeSeconds:b,drmTimeSeconds:I,playTime:O,pauseTime:P,bufferingTime:N,licenseTime:_,liveLatency:B,maxSegmentDuration:F,manifestSizeBytes:z,bytesDownloaded:J,nonFatalErrorCount:q,manifestPeriodCount:K,manifestGapCount:W,stateHistory:Q,switchHistory:ie}},y.Rh=function(e,t,n,i,r,l,c){c=c===void 0?!1:c;var f=this,h,v,S,T,b,I,O,P,N,_,B,F,z;return G(function(J){switch(J.g){case 1:if(f.m!=Ui&&f.m!=Hr)throw new Y(1,7,7004);if(n!="subtitles"&&n!="captions"&&Et("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){J.s(2);break}return L(J,R0(f,e),3);case 3:i=J.h;case 2:if(h=[],f.A&&(h=f.A.getCuePoints()),f.m!=Hr){J.s(4);break}return c&&(n="forced"),L(J,y2(f,e,t,n,i,l||"",h),5);case 5:if(v=At(t),S=f.vc(),T=S.find(function(q){return At(q.language)==v&&q.label==(l||"")&&q.kind==n}))return cr(f),J.return(T);throw new Y(1,2,2012);case 4:if(b=wn,I=f.Ra(),O=I.end-I.start,f.i&&(O=f.i.presentationTimeline.getDuration()),O==1/0)throw new Y(1,4,4033);if(!h.length){J.s(6);break}return L(J,N0(f,e,f.F,f.g.streaming.retryParameters),7);case 7:P=J.h,N=g2(f,P,i,h),_=new Blob([N],{type:"text/vtt"}),e=of(_),i="text/vtt";case 6:if(B={id:f.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:uf(0,O,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:l||null,type:b.za,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!c,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([dn(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},F=dn(B.mimeType,B.codecs),z=xl(F),!z)throw new Y(2,2,2014,i);return f.i.textStreams.push(B),cr(f),J.return(Un(B))}})},y.Sh=function(e,t){var n=this,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z;return G(function(J){switch(J.g){case 1:if(n.m!=Ui&&n.m!=Hr)throw new Y(1,7,7004);if(t){J.s(2);break}return L(J,R0(n,e),3);case 3:t=J.h;case 2:if(t!="text/vtt")throw new Y(1,2,2017,e);if(i=wn,r=n.Ra(),l=r.end-r.start,n.i&&(l=n.i.presentationTimeline.getDuration()),l==1/0)throw new Y(1,4,4045);return L(J,N0(n,e,n.F,n.g.streaming.retryParameters),4);case 4:if(c=J.h,f=wl(t),!f)throw new Y(2,2,2014,t);for(h=f(),v={periodStart:0,segmentStart:0,segmentEnd:l,vttOffset:0},S=Je(c),T=h.parseMedia(S,v,e,[]),b=[],I=A(T),O=I.next(),P={};!O.done;P={Ne:void 0,Mc:void 0},O=I.next())P.Mc=O.value,P.Ne=null,N=function(q){return function(){return q.Ne==null&&(q.Ne=Pn([e],[q.Mc.payload])),q.Ne||[]}}(P),_=new Ke(P.Mc.startTime,P.Mc.endTime,N,0,null,null,0,0,1/0),P.Mc.payload.includes("#xywh")&&(B=P.Mc.payload.split("#xywh=")[1].split(","),B.length===4&&_.De({height:parseInt(B[3],10),positionX:parseInt(B[0],10),positionY:parseInt(B[1],10),width:parseInt(B[2],10)})),b.push(_);if(F=t,!b.length){J.s(5);break}return L(J,So(b[0].N()[0],n.F,n.g.manifest.retryParameters),6);case 6:F=J.h;case 5:return z={id:n.We++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ct(b),mimeType:F||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.$e,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([dn(F||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==Hr?n.Oe.push(z):n.i.imageStreams.push(z),cr(n),J.return(Lc(z))}})},y.Qh=function(e,t,n){var i=this,r,l,c,f;return G(function(h){switch(h.g){case 1:if(i.m!=Ui&&i.m!=Hr)throw new Y(1,7,7004);if(n){h.s(2);break}return L(h,R0(i,e),3);case 3:n=h.h;case 2:return r=[],i.A&&(r=i.A.getCuePoints()),L(h,y2(i,e,t,"chapters",n,"",r),4);case 4:if(l=h.h,c=i.Rg(),f=c.find(function(v){return v.language==t}),!f){h.s(5);break}return L(h,new Promise(function(v,S){i.l.ma(l,"load",v),i.l.ma(l,"error",function(){S(new Y(1,2,2015))})}),6);case 6:return cr(i),h.return(f);case 5:throw new Y(1,2,2012)}})};function R0(e,t){var n;return G(function(i){switch(i.g){case 1:return ye(i,2),L(i,So(t,e.F,e.g.streaming.retryParameters),4);case 4:n=i.h,Le(i,3);break;case 2:De(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function y2(e,t,n,i,r,l,c){var f,h,v,S;return G(function(T){if(T.g==1)return r!="text/vtt"||c.length?L(T,N0(e,t,e.F,e.g.streaming.retryParameters),3):T.s(2);T.g!=2&&(f=T.h,h=g2(e,f,r,c),v=new Blob([h],{type:"text/vtt"}),t=of(v),r="text/vtt"),S=document.createElement("track");var b=e.L,I=t;try{if(b.g.enabled){var O=Jh(b);O.ot=Aa,O.su=!0;var P=wo(O),N=el(I,P)}else N=I}catch(_){ko("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",_),N=I}return S.src=N,S.label=l,S.kind=i,S.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(S),T.return(S)})}function N0(e,t,n,i){var r,l,c;return G(function(f){if(f.g==1){r=Fi,l=un([t],i),l.method="GET";var h=e.L;try{h.g.enabled&&Tu(h,l,{ot:Aa,su:!0})}catch(v){ko("CMCD_TEXT_ERROR","Could not generate text CMCD data.",v)}return L(f,n.request(r,l).promise,2)}return c=f.h,f.return(c.data)})}function g2(e,t,n,i){var r=wl(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Je(t),t=n.parseMedia(t,e,null,[]),Av(t,i);throw new Y(2,2,2014,n)}y.Dj=function(e,t){this.ka.width=e,this.ka.height=t},y.eg=function(e){if(this.m==Ui){var t=this.j;if(e=e===void 0?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=A(t.i.values()),i=n.next();!i.done;i=n.next())i=i.value,!i.sd||i.Da||i.kb||(i.sd=!1,bi(t,i,e));t=!0}}else t=!1;return t},y.Hf=function(){return Et("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},y.ui=function(){return this.Qb},y.ni=function(){var e={video:null,audio:null,text:null};if(this.m!=Ui)return e;var t=this.j.l,n=this.h.currentTime;t=A([t.video,t.audio,this.j.u]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r=i.segmentIndex.get(r),r={codecs:r.codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},i.type=="video"?(r.width=i.width,r.height=i.height,e.video=r):i.type=="audio"?e.audio=r:i.type==ot&&(e.text=r)}return e};function Ia(e){var t=wa();return t.streaming.failureCallback=function(n){if(e.U()){var i=null;n.code==1001||n.code==1002?(i=1,e.g.streaming.lowLatencyMode&&(i=.1)):n.code==1003&&(i=.1),i!=null&&(n.severity=1,e.eg(i))}},t.textDisplayFactory=function(){return!e.ue||ni()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new ui(e.h,"Shaka Player TextTrack"):new Vn:new gi(e.h,e.ue)},t}y.Ch=function(e){this.ue=e};function lC(e,t){for(var n=new Set,i=A(t.textStreams),r=i.next();!r.done;r=i.next())r=r.value,r.mimeType!="application/cea-608"&&r.mimeType!="application/cea-708"||n.add(r.originalId);for(i=A(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var l=A(r.closedCaptions.keys()),c=l.next();!c.done;c=l.next())if(c=c.value,!n.has(c)){var f=c.startsWith("CC")?"application/cea-608":"application/cea-708",h=new on,v=r.closedCaptions.get(c);f={id:e.We++,originalId:c,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:h,mimeType:f,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:v,originalLanguage:v,label:null,type:ot,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([dn(f,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(f),n.add(c)}}}function uC(e,t){var n,i,r,l,c;return G(function(f){return f.g==1?(n=e.audio,i=e.video,r=function(h,v){var S,T,b;return G(function(I){return I.g==1?h?h.segmentIndex?I.s(2):L(I,h.createSegmentIndex(),2):I.return(null):(T=(S=h.segmentIndex.Gb(v))?S.next().value:null,T?(b=T.startTime,I.return(b)):I.return(null))})},L(f,r(n,t),2)):f.g!=3?(l=f.h,L(f,r(i,t),3)):(c=f.h,c!=null&&l!=null?f.return(Math.max(c,l)):c!=null?f.return(c):l!=null?f.return(l):f.return(t))})}function P0(e){var t=e.Of();if(e.B&&e.M&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,Rh(n)}else n=e.K,n.j=t,Rh(n);if(e.L&&(n=e.L,t||n.u||(n.u=!0),n.u&&t&&(n.B=!0),n.F=t),L0(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ue<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Ue*r,n-i))}}t=new Map().set("buffering",t),e.dispatchEvent(g("buffering",t))}function v2(e,t){e.Na.Qa(),e.Na.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ra(),r=e.U()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.gd():Math.floor(n)<=Math.floor(i.start+r)&&e.gd()})}function L0(e){if(e.B&&e.M){var t=e.B.g,n="playing";e.M.g==As?n="buffering":e.Uc()?n="ended":e.h.paused&&(n="paused");var i=n;if(t.g==null)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(g("statechanged",n)))}}function m2(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Qg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Md(i,!1):r==1&&t!==e.K.sc()&&e.gd()}if(n&&(n=e.Ra(),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 l=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var c=e.g.streaming.liveSync.targetLatency,f=c+i,h=Math.max(0,c-i),v=e.g.streaming.liveSync.maxPlaybackRate,S=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(c=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?f=e.i.serviceDescription.targetLatency+i:e.i.serviceDescription.maxLatency!=null&&(f=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?h=Math.max(0,e.i.serviceDescription.targetLatency-i):e.i.serviceDescription.minLatency!=null&&(h=e.i.serviceDescription.minLatency),v=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,S=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||typeof c!="number"||(e.P=c);var T=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Ma&&e.P!==null&&typeof c=="number"&&e.Ue<T&&Date.now()-e.Ma>1e3*l&&(l=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(c-l)/2,l+i),e.Ma=Date.now()),r&&e.P!==null&&(f=e.P+i,h=e.P-i),c=n.end-e.h.currentTime,i=0,e.m==Hr&&(r=e.h.buffered,0<r.length&&(i=r.end(r.length-1),i=Math.max(v,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,l=Date.now()-e.M.h,n&&!S&&(S=e.g.streaming.liveSync.minPlaybackRate),n&&S&&l<=r?t!=S&&e.Md(S,!1):f!=null&&v&&c-i>f?(t!=v&&e.Md(v,!1),e.Ma=null):h!=null&&S&&c-i<h?(t!=S&&e.Md(S,!1),e.Ma=null):t!==e.K.sc()&&(e.gd(),e.Ma=Date.now())}}function Ov(e){if(e.h){var t=function(r,l){var c=c===void 0?Number.EPSILON:c;if(r===l)c=!0;else{var f=Math.abs(r-l);c=f<=c?!0:c!==Number.EPSILON?Math.abs(f-c)<=Number.EPSILON:!1}return(c||l>r)&&e.Ve<r?(e.Ve=r,!0):!1},n=e.Ra();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var i=g("started");else t(25,n)?i=g("firstquartile"):t(50,n)?i=g("midpoint"):t(75,n)?i=g("thirdquartile"):(t(100,n)&&(i=g("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Uc()&&e.h.pause());i&&e.dispatchEvent(i)}}}function bf(e){try{Gc(e.te,e.i)}catch(n){return ep(e,n),!1}var t=ed(e.i.variants);return t=e.W.create(t),e.o.setVariants(Array.from(t.values())),!0}function $d(e,t,n,i,r){t=t===void 0?!0:t,n=n===void 0?0:n,i=i===void 0?!1:i,r=r===void 0?!0:r;var l;(l=bf(e)?e.o.chooseVariant():null)&&ly(e,l,r,t,n,i)}function ly(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e.j.l;if(t==c)i&&Ud(e.j,t,i,r,!0);else{var f=e.B.h;if(f.h!=t&&(f.h=t,f.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Ud(e.j,t,i,r,l,n),i=null,c&&(i=zu(c)),c=zu(t),c.active=!0,e.O&&(r=e.O,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),l=0,f=-1,t.mimeType){case"video/webm":l=1;break;case"video/mp4":l=2}switch(e.Tg()){case"DASH":f=1;break;case"HLS":f=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(l),r.j||r.g.setStreamingFormat(f))}n?(n=new Map().set("oldTrack",i).set("newTrack",c),n=g("adaptation",n),If(e,n)):T2(e,i,c),w2(e,i,c)}}function S2(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=_c(n),t=_c(t),T2(e,n,t),w2(e,n,t))}function cr(e){var t=g("trackschanged");If(e,t),x2(e)}function T2(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=g("variantchanged",t),If(e,t)}function w2(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&x2(e)}function x2(e){var t=g("audiotrackschanged");If(e,t)}function kv(e){var t=g("textchanged");If(e,t)}function E2(e){var t=g("texttrackvisibility");If(e,t)}function A2(e){e.g.abr.enabled||_0(e);var t=new Map().set("newStatus",e.g.abr.enabled);If(e,g("abrstatuschanged",t))}function uy(e){var t=e.vc().find(function(n){return n.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function _0(e,t){if(t=t===void 0?!0:t,e.m==Ui){e.xe.stop();for(var n=A(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&bf(e)}}y.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===tl||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(f){var h=f[e.type];return h&&h.id!==e.id&&!f.disabledUntilTime?e.type=="audio"?e.language===h.language:!0:!1})){for(var n=!1,i=!1,r=A(this.i.variants),l=r.next();!l.done;l=r.next()){l=l.value;var c=l[e.type];c&&(c.id===e.id?(l.disabledUntilTime=Date.now()/1e3+t,n=!0):c.trickModeVideo&&c.trickModeVideo.id==e.id&&(i=!0))}return!n&&i?!1:(this.xe.ua(1),t=this.Fb().video.reduce(function(f,h){return f+h.end-h.start},0),$d(this,!1,t,!0,!1),!0)}return!1};function ep(e,t){var n,i,r,l;return G(function(c){switch(c.g){case 1:if(e.m==tl)return c.return();if(t.severity===1&&e.B.K++,n=!0,!(e.sa&&e.i&&e.j)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3018){c.s(2);break}return ni()&&t.code==3016?c.return():(ye(c,3),L(c,Kl(e.j),5));case 5:i=c.h,n=!i,i&&(r=g("mediasourcerecovered"),e.dispatchEvent(r)),Le(c,2);break;case 3:De(c),n=!0;case 2:if(!n)return c.return();t.severity===2&&_0(e,!1),l=g("error",new Map().set("detail",t)),e.dispatchEvent(l),l.defaultPrevented&&(t.handled=!0),ce(c)}})}y.addFont=function(e,t){var n,i,r,l,c;return G(function(f){if(f.g==1)return"fonts"in document&&"FontFace"in E?L(f,document.fonts.ready,3):f.s(0);if(!("entries"in document.fonts))return f.return();for(n=function(h){h=h.entries();for(var v=[],S=h.next();S.done===!1;)v.push(S.value),S=h.next();return v},i=A(n(document.fonts)),r=i.next();!r.done;r=i.next())if(l=r.value,l.family==e&&l.display=="swap")return f.return();c=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(c),ce(f)})};function ay(e,t,n,i){i=i===void 0?e:i,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(g(t,e))}function C2(e,t,n,i){i=i===void 0?!1: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(g(i?"audiotrackchanged":"mediaqualitychanged",t))}function U0(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new Y(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new Y(2,3,3016,n,t,e.h.error.message))}function j0(e,t,n){0<t&&(e.U()||e.Bh(t)),t=e.getDuration(),n<t&&(e.U()||e.bb(n))}function If(e,t){G(function(n){if(n.g==1)return L(n,Promise.resolve(),2);e.m!=tl&&e.dispatchEvent(t),ce(n)})}function b2(e){var t=new Set;e=A(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(At(n.language)):t.add("und");return t}function I2(e){var t=new Map,n=new Map;e=A(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",l=[];i.language&&(r=At(i.language)),i.type=="variant"?l=i.audioRoles:l=i.roles,l&&l.length||(l=[""]),t.has(r)||t.set(r,new Set),l=A(l);for(var c=l.next();!c.done;c=l.next())c=c.value,t.get(r).add(c),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(c,i.label))}var f=[];return t.forEach(function(h,v){h=A(h);for(var S=h.next();!S.done;S=h.next()){S=S.value;var T=null;n.has(v)&&n.get(v).has(S)&&(T=n.get(v).get(S)),f.push({language:v,role:S,label:T})}}),f}y.Pa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},y.Uc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.U()&&this.h.currentTime>=this.Ra().end},Me("shaka.Player",o),o.prototype.isEnded=o.prototype.Uc,o.prototype.isRemotePlayback=o.prototype.Pa,o.prototype.addFont=o.prototype.addFont,o.prototype.setVideoContainer=o.prototype.Ch,o.prototype.getFetchedPlaybackInfo=o.prototype.ni,o.prototype.getManifestParserFactory=o.prototype.ui,o.prototype.getManifest=o.prototype.Hf,o.prototype.retryStreaming=o.prototype.eg,o.prototype.setMaxHardwareResolution=o.prototype.Dj,o.prototype.addChaptersTrack=o.prototype.Qh,o.prototype.addThumbnailsTrack=o.prototype.Sh,o.prototype.addTextTrackAsync=o.prototype.Rh,o.prototype.getStats=o.prototype.getStats,o.prototype.getBufferedInfo=o.prototype.Fb,o.prototype.getSegmentAvailabilityDuration=o.prototype.ae,o.prototype.getPresentationStartTimeAsDate=o.prototype.Wg,o.prototype.getPlayheadTimeAsDate=o.prototype.yi,o.prototype.setTextTrackVisibility=o.prototype.zh,o.prototype.getChapters=o.prototype.ji,o.prototype.getChaptersTracks=o.prototype.Rg,o.prototype.isTextTrackVisible=o.prototype.Pf,o.prototype.selectVariantsByLabel=o.prototype.yj,o.prototype.selectTextLanguage=o.prototype.hg,o.prototype.selectAudioLanguage=o.prototype.sh,o.prototype.getTextLanguages=o.prototype.Ei,o.prototype.getAudioLanguages=o.prototype.gi,o.prototype.getTextLanguagesAndRoles=o.prototype.Fi,o.prototype.getAudioLanguagesAndRoles=o.prototype.hi,o.prototype.getAudioTracks=o.prototype.getAudioTracks,o.prototype.selectAudioTrack=o.prototype.xj,o.prototype.selectVariantTrack=o.prototype.Be,o.prototype.selectTextTrack=o.prototype.th,o.prototype.getThumbnails=o.prototype.Hi,o.prototype.getAllThumbnails=o.prototype.fi,o.prototype.getImageTracks=o.prototype.pi,o.prototype.getTextTracks=o.prototype.vc,o.prototype.getVariantTracks=o.prototype.Rb,o.prototype.cancelTrickPlay=o.prototype.gd,o.prototype.trickPlay=o.prototype.Md,o.prototype.getPlaybackRate=o.prototype.gb,o.prototype.isBuffering=o.prototype.Of,o.prototype.getKeyStatuses=o.prototype.Yd,o.prototype.getActiveSessionsMetadata=o.prototype.Gf,o.prototype.getExpiration=o.prototype.pd,o.prototype.drmInfo=o.prototype.drmInfo,o.prototype.keySystem=o.prototype.keySystem,o.prototype.isFullyLoaded=o.prototype.Ri,o.prototype.goToLive=o.prototype.Ni,o.prototype.seekRange=o.prototype.Ra,o.prototype.isAudioOnly=o.prototype.Qi,o.prototype.isInProgress=o.prototype.yc,o.prototype.isLive=o.prototype.U,o.prototype.getAdManager=o.prototype.Pg,o.prototype.getAssetUri=o.prototype.Qc,o.prototype.getNetworkingEngine=o.prototype.xb,o.prototype.getMediaElement=o.prototype.xi,o.prototype.getManifestType=o.prototype.Tg,o.prototype.getLoadMode=o.prototype.ti,o.prototype.resetConfiguration=o.prototype.sj,o.prototype.getBufferFullness=o.prototype.Qg,o.prototype.getNonDefaultConfiguration=o.prototype.Vg,o.prototype.getConfigurationForLowLatency=o.prototype.ki,o.prototype.getConfiguration=o.prototype.getConfiguration,o.prototype.configurationForLowLatency=o.prototype.ci,o.prototype.configure=o.prototype.configure,o.prototype.releaseAllMutexes=o.prototype.oj,o.prototype.destroyAllPreloads=o.prototype.pf,o.prototype.preload=o.prototype.preload,o.prototype.detachAndSavePreload=o.prototype.Lg,o.prototype.unloadAndSavePreload=o.prototype.Gj,o.prototype.load=o.prototype.load,o.prototype.updateStartTime=o.prototype.Kj,o.prototype.unload=o.prototype.kc,o.prototype.detach=o.prototype.detach,o.prototype.attachCanvas=o.prototype.Vh,o.prototype.attach=o.prototype.Lb,o.probeSupport=function(e){e=e===void 0?!0:e;var t,n,i,r,l,c;return G(function(f){switch(f.g){case 1:if(t={},!e){f.s(2);break}return L(f,Rg(),3);case 3:t=f.h;case 2:return n=Is(),i=Zg(),L(f,Nu(),4);case 4:return r=f.h,l={manifest:n,media:i,drm:t,hardwareResolution:r},c=O2,c.forEach(function(h,v){l[v]=h()}),f.return(l)}})},o.isBrowserSupported=function(){return E.Promise||Et("A Promise implementation or polyfill is required"),E.Promise&&E.Uint8Array&&Array.prototype.forEach&&!Vt("Trident/")?$r()?!0:Tc("application/x-mpegurl"):!1},o.setAdManagerFactory=function(e){Rv=e},o.registerSupportPlugin=w,o.prototype.destroy=o.prototype.destroy;var tl=0,Mv=1,Ui=2,Hr=3;o.LoadMode={DESTROYED:tl,NOT_LOADED:Mv,MEDIA_SOURCE:Ui,SRC_EQUALS:Hr},o.version="v4.14.9";var D2=["4","14"];pc=new function(e){this.g=e,this.i=jf,this.h=Ou}(new Ip(Number(D2[0]),Number(D2[1])));var O2=new Map,Rv=null;function k2(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function aC(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Fe(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new yt,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}y=Fe.prototype,y.needsSkipUI=function(){return!1},y.isClientRendering=function(){return!0},y.hasCustomClick=function(){return!0},y.isUsingAnotherMediaElement=function(){return!0},y.getDuration=function(){return this.g.getDuration()},y.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},y.getRemainingTime=function(){return this.h.getRemainingTime()},y.isPaused=function(){return this.i},y.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},y.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},y.canSkipNow=function(){return this.h.getAdSkippableState()},y.skip=function(){return this.h.skip()},y.pause=function(){return this.h.pause()},y.play=function(){return this.h.resume()},y.getVolume=function(){return this.h.getVolume()},y.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},y.isMuted=function(){return this.h.getVolume()==0},y.isLinear=function(){return this.g.isLinear()},y.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},y.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},y.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},y.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},y.getTitle=function(){return this.g.getTitle()},y.getDescription=function(){return this.g.getDescription()},y.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},y.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},y.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},y.getAdId=function(){return this.g.getAdId()},y.getCreativeAdId=function(){return this.g.getCreativeAdId()},y.getAdvertiserName=function(){return this.g.getAdvertiserName()},y.getMediaUrl=function(){return this.g.getMediaUrl()},y.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},y.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},y.release=function(){this.h=this.g=null},Me("shaka.ads.ClientSideAd",Fe),Fe.prototype.release=Fe.prototype.release,Fe.prototype.getPodIndex=Fe.prototype.getPodIndex,Fe.prototype.getTimeOffset=Fe.prototype.getTimeOffset,Fe.prototype.getMediaUrl=Fe.prototype.getMediaUrl,Fe.prototype.getAdvertiserName=Fe.prototype.getAdvertiserName,Fe.prototype.getCreativeAdId=Fe.prototype.getCreativeAdId,Fe.prototype.getAdId=Fe.prototype.getAdId,Fe.prototype.getVastMediaWidth=Fe.prototype.getVastMediaWidth,Fe.prototype.getVastMediaHeight=Fe.prototype.getVastMediaHeight,Fe.prototype.getVastMediaBitrate=Fe.prototype.getVastMediaBitrate,Fe.prototype.getDescription=Fe.prototype.getDescription,Fe.prototype.getTitle=Fe.prototype.getTitle,Fe.prototype.getPositionInSequence=Fe.prototype.getPositionInSequence,Fe.prototype.getSequenceLength=Fe.prototype.getSequenceLength,Fe.prototype.setMuted=Fe.prototype.setMuted,Fe.prototype.resize=Fe.prototype.resize,Fe.prototype.isLinear=Fe.prototype.isLinear,Fe.prototype.isMuted=Fe.prototype.isMuted,Fe.prototype.setVolume=Fe.prototype.setVolume,Fe.prototype.getVolume=Fe.prototype.getVolume,Fe.prototype.play=Fe.prototype.play,Fe.prototype.pause=Fe.prototype.pause,Fe.prototype.skip=Fe.prototype.skip,Fe.prototype.canSkipNow=Fe.prototype.canSkipNow,Fe.prototype.getTimeUntilSkippable=Fe.prototype.getTimeUntilSkippable,Fe.prototype.isSkippable=Fe.prototype.isSkippable,Fe.prototype.isPaused=Fe.prototype.isPaused,Fe.prototype.getRemainingTime=Fe.prototype.getRemainingTime,Fe.prototype.getMinSuggestedDuration=Fe.prototype.getMinSuggestedDuration,Fe.prototype.getDuration=Fe.prototype.getDuration,Fe.prototype.isUsingAnotherMediaElement=Fe.prototype.isUsingAnotherMediaElement,Fe.prototype.hasCustomClick=Fe.prototype.hasCustomClick,Fe.prototype.isClientRendering=Fe.prototype.isClientRendering,Fe.prototype.needsSkipUI=Fe.prototype.needsSkipUI;function rn(){}function M2(e,t){var n=[];e=A(Mt(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=xn(i.value,"InLine"))&&(i=xn(i,"Creatives"))){i=A(Mt(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){r=r.value;var l=xn(r,"Linear");if(l&&sC(n,t,l),r=xn(r,"NonLinearAds")){r=Mt(r,"NonLinear"),r=A(r);for(var c=r.next();!c.done;c=r.next())e:{l=n;var f=t,h=c.value,v=xn(h,"StaticResource");if(v)c=v.attributes.creativeType;else{if(v=xn(h,"HTMLResource"),!v)break e;c="text/html"}if(v=Gi(v)){c==="text/html"&&(v="data:text/html;charset=UTF-8,"+encodeURIComponent(v));var S=ze(h,"width",Wn)||ze(h,"expandedWidth",Wn),T=ze(h,"height",Wn)||ze(h,"expandedHeight",Wn);if(S||T){var b=null;(h=h.attributes.minSuggestedDuration)&&(b=is(h)),h=0,f!=null&&(h=f),l.push({id:null,groupId:null,startTime:h,endTime:null,uri:v,mimeType:c,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:b,once:!0,pre:f==null,post:f==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:S||0,y:T||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function sC(e,t,n){var i=0;t!=null&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=is(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=xn(n,"MediaFiles")){var l=Mt(n,"MediaFile");for(n=l,l=l.filter(function(f){return f.attributes.delivery=="streaming"}),l.length&&(n=l),n=n.sort(function(f,h){return(parseInt(h.attributes.height,10)||0)-(parseInt(f.attributes.height,10)||0)}),n=A(n),l=n.next();!l.done;l=n.next())if(l=l.value,!l.attributes.apiFramework){var c=Gi(l);if(c){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:c,mimeType:l.attributes.type||null,isSkippable:r!=null,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}Me("shaka.ads.Utils",rn),rn.ADS_LOADED="ads-loaded",rn.AD_STARTED="ad-started",rn.AD_FIRST_QUARTILE="ad-first-quartile",rn.AD_MIDPOINT="ad-midpoint",rn.AD_THIRD_QUARTILE="ad-third-quartile",rn.AD_COMPLETE="ad-complete",rn.AD_STOPPED="ad-stopped",rn.AD_SKIPPED="ad-skipped",rn.AD_VOLUME_CHANGED="ad-volume-changed",rn.AD_MUTED="ad-muted",rn.AD_PAUSED="ad-paused",rn.AD_RESUMED="ad-resumed",rn.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",rn.CUEPOINTS_CHANGED="ad-cue-points-changed",rn.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",rn.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",rn.AD_CLICKED="ad-clicked",rn.AD_PROGRESS="ad-progress",rn.AD_BUFFERING="ad-buffering",rn.AD_IMPRESSION="ad-impression",rn.AD_DURATION_CHANGED="ad-duration-changed",rn.AD_CLOSED="ad-closed",rn.AD_LOADED="ad-loaded",rn.ALL_ADS_COMPLETED="all-ads-completed",rn.AD_LINEAR_CHANGED="ad-linear-changed",rn.AD_METADATA="ad-metadata",rn.AD_RECOVERABLE_ERROR="ad-recoverable-error",rn.AD_ERROR="ad-error",rn.AD_BREAK_READY="ad-break-ready",rn.AD_INTERACTION="ad-interaction",rn.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",rn.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",rn.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Nv(e,t,n,i,r){var l=this;this.u=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=r,this.j=null,this.h=new yt,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.u,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.14.9"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(c){cC(l,c)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){R2(l,c)}),this.h.D(this.i,"ended",function(){l.m.contentComplete()}),this.h.ma(this.i,"play",function(){l.F=!0})}Nv.prototype.configure=function(e){this.o=e},Nv.prototype.stop=function(){this.g&&this.g.stop(),this.u&&Ni(this.u)},Nv.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function R2(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new Ie("ad-error",t)),Lv(e,null),e.l(new Ie("ad-cue-points-changed",new Map().set("cuepoints",[])))}function cC(e,t){if(e.l(new Ie("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new Ie("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[],i=A(i);for(var r=i.next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new Ie("ad-cue-points-changed",new Map().set("cuepoints",t)))}fC(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight,Pv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Pv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in E?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Pv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,Pv(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.ma(e.i,"play",function(){e.F=!0,e.g.start()})}catch{Lv(e,null)}}function Pv(e){return document.fullscreenEnabled?!!document.fullscreenElement:(e=e.i,e.webkitSupportsFullscreen?e.webkitDisplayingFullscreen:!1)}function fC(e){function t(n,i){n=new Map().set("originalEvent",n),e.l(new Ie(i,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){R2(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){N2(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){N2(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){Lv(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){Lv(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function N2(e,t){var n=t.getAd();n?(e.j=new Fe(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new Ie("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new Ie("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Et("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Lv(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new Ie("ad-content-resume-requested")),e.l(new Ie("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function Xe(e,t,n,i,r,l){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=i,this.m=r,this.u=l,this.B=t.overlay}y=Xe.prototype,y.needsSkipUI=function(){return!0},y.isClientRendering=function(){return!0},y.hasCustomClick=function(){return!1},y.isUsingAnotherMediaElement=function(){return this.u},y.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},y.getMinSuggestedDuration=function(){return this.getDuration()},y.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},y.isPaused=function(){return this.g.paused},y.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},y.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},y.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},y.skip=function(){this.canSkipNow()&&this.A()},y.pause=function(){return this.g.pause()},y.play=function(){return this.g.play()},y.getVolume=function(){return this.g.volume},y.setVolume=function(e){this.g.volume=e},y.isMuted=function(){return this.g.muted},y.isLinear=function(){return this.B==null},y.resize=function(){},y.setMuted=function(e){this.g.muted=e},y.getSequenceLength=function(){return this.o},y.getPositionInSequence=function(){return this.m},y.getTitle=function(){return""},y.getDescription=function(){return""},y.getVastMediaBitrate=function(){return 0},y.getVastMediaHeight=function(){return 0},y.getVastMediaWidth=function(){return 0},y.getAdId=function(){return this.i.id||""},y.getCreativeAdId=function(){return""},y.getAdvertiserName=function(){return""},y.getMediaUrl=function(){return this.i.uri},y.getTimeOffset=function(){return 0},y.getPodIndex=function(){return 0},y.release=function(){this.g=null},Me("shaka.ads.InterstitialAd",Xe),Xe.prototype.release=Xe.prototype.release,Xe.prototype.getPodIndex=Xe.prototype.getPodIndex,Xe.prototype.getTimeOffset=Xe.prototype.getTimeOffset,Xe.prototype.getMediaUrl=Xe.prototype.getMediaUrl,Xe.prototype.getAdvertiserName=Xe.prototype.getAdvertiserName,Xe.prototype.getCreativeAdId=Xe.prototype.getCreativeAdId,Xe.prototype.getAdId=Xe.prototype.getAdId,Xe.prototype.getVastMediaWidth=Xe.prototype.getVastMediaWidth,Xe.prototype.getVastMediaHeight=Xe.prototype.getVastMediaHeight,Xe.prototype.getVastMediaBitrate=Xe.prototype.getVastMediaBitrate,Xe.prototype.getDescription=Xe.prototype.getDescription,Xe.prototype.getTitle=Xe.prototype.getTitle,Xe.prototype.getPositionInSequence=Xe.prototype.getPositionInSequence,Xe.prototype.getSequenceLength=Xe.prototype.getSequenceLength,Xe.prototype.setMuted=Xe.prototype.setMuted,Xe.prototype.resize=Xe.prototype.resize,Xe.prototype.isLinear=Xe.prototype.isLinear,Xe.prototype.isMuted=Xe.prototype.isMuted,Xe.prototype.setVolume=Xe.prototype.setVolume,Xe.prototype.getVolume=Xe.prototype.getVolume,Xe.prototype.play=Xe.prototype.play,Xe.prototype.pause=Xe.prototype.pause,Xe.prototype.skip=Xe.prototype.skip,Xe.prototype.canSkipNow=Xe.prototype.canSkipNow,Xe.prototype.getTimeUntilSkippable=Xe.prototype.getTimeUntilSkippable,Xe.prototype.isSkippable=Xe.prototype.isSkippable,Xe.prototype.isPaused=Xe.prototype.isPaused,Xe.prototype.getRemainingTime=Xe.prototype.getRemainingTime,Xe.prototype.getMinSuggestedDuration=Xe.prototype.getMinSuggestedDuration,Xe.prototype.getDuration=Xe.prototype.getDuration,Xe.prototype.isUsingAnotherMediaElement=Xe.prototype.isUsingAnotherMediaElement,Xe.prototype.hasCustomClick=Xe.prototype.hasCustomClick,Xe.prototype.isClientRendering=Xe.prototype.isClientRendering,Xe.prototype.needsSkipUI=Xe.prototype.needsSkipUI;function Ye(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}y=Ye.prototype,y.needsSkipUI=function(){return!0},y.isClientRendering=function(){return!0},y.hasCustomClick=function(){return!1},y.isUsingAnotherMediaElement=function(){return!1},y.getDuration=function(){return-1},y.getMinSuggestedDuration=function(){return this.getDuration()},y.getRemainingTime=function(){return-1},y.isPaused=function(){return!1},y.isSkippable=function(){return!1},y.getTimeUntilSkippable=function(){return 0},y.canSkipNow=function(){return!1},y.skip=function(){},y.pause=function(){},y.play=function(){},y.getVolume=function(){return 1},y.setVolume=function(){},y.isMuted=function(){return!1},y.isLinear=function(){return this.i},y.resize=function(){},y.setMuted=function(){},y.getSequenceLength=function(){return this.j},y.getPositionInSequence=function(){return this.h},y.getTitle=function(){return""},y.getDescription=function(){return""},y.getVastMediaBitrate=function(){return 0},y.getVastMediaHeight=function(){return 0},y.getVastMediaWidth=function(){return 0},y.getAdId=function(){return this.g.id||""},y.getCreativeAdId=function(){return""},y.getAdvertiserName=function(){return""},y.getMediaUrl=function(){return this.g.uri},y.getTimeOffset=function(){return 0},y.getPodIndex=function(){return 0},y.release=function(){},Me("shaka.ads.InterstitialStaticAd",Ye),Ye.prototype.release=Ye.prototype.release,Ye.prototype.getPodIndex=Ye.prototype.getPodIndex,Ye.prototype.getTimeOffset=Ye.prototype.getTimeOffset,Ye.prototype.getMediaUrl=Ye.prototype.getMediaUrl,Ye.prototype.getAdvertiserName=Ye.prototype.getAdvertiserName,Ye.prototype.getCreativeAdId=Ye.prototype.getCreativeAdId,Ye.prototype.getAdId=Ye.prototype.getAdId,Ye.prototype.getVastMediaWidth=Ye.prototype.getVastMediaWidth,Ye.prototype.getVastMediaHeight=Ye.prototype.getVastMediaHeight,Ye.prototype.getVastMediaBitrate=Ye.prototype.getVastMediaBitrate,Ye.prototype.getDescription=Ye.prototype.getDescription,Ye.prototype.getTitle=Ye.prototype.getTitle,Ye.prototype.getPositionInSequence=Ye.prototype.getPositionInSequence,Ye.prototype.getSequenceLength=Ye.prototype.getSequenceLength,Ye.prototype.setMuted=Ye.prototype.setMuted,Ye.prototype.resize=Ye.prototype.resize,Ye.prototype.isLinear=Ye.prototype.isLinear,Ye.prototype.isMuted=Ye.prototype.isMuted,Ye.prototype.setVolume=Ye.prototype.setVolume,Ye.prototype.getVolume=Ye.prototype.getVolume,Ye.prototype.play=Ye.prototype.play,Ye.prototype.pause=Ye.prototype.pause,Ye.prototype.skip=Ye.prototype.skip,Ye.prototype.canSkipNow=Ye.prototype.canSkipNow,Ye.prototype.getTimeUntilSkippable=Ye.prototype.getTimeUntilSkippable,Ye.prototype.isSkippable=Ye.prototype.isSkippable,Ye.prototype.isPaused=Ye.prototype.isPaused,Ye.prototype.getRemainingTime=Ye.prototype.getRemainingTime,Ye.prototype.getMinSuggestedDuration=Ye.prototype.getMinSuggestedDuration,Ye.prototype.getDuration=Ye.prototype.getDuration,Ye.prototype.isUsingAnotherMediaElement=Ye.prototype.isUsingAnotherMediaElement,Ye.prototype.hasCustomClick=Ye.prototype.hasCustomClick,Ye.prototype.isClientRendering=Ye.prototype.isClientRendering,Ye.prototype.needsSkipUI=Ye.prototype.needsSkipUI;function P2(e,t,n,i){var r=this;this.T=null,this.A=e,this.H=t,this.g=n,this.F=null,this.B=!0,this.h=this.g,this.i=i,this.W=new Set,this.G=new Set,this.C=new Map,this.L=new Map,this.j=new o,K0(this),this.I=new yt,this.l=new yt,this.K=!1,this.ea=this.m=this.u=this.o=null,this.fa=!1,this.O=-1,this.$=function(){if(!r.K&&r.o&&!r.H.Pa()){r.o=r.g.currentTime,r.u&&!r.u.pre&&!r.u.post&&r.o<r.u.startTime&&(r.u=null);var l=cy(r);l&&_v(r,l,1,1,Date.now())}},this.Z=function(){if(!(r.K||r.o||r.H.Pa())){r.o=r.g.currentTime;var l=cy(r,!0);l&&_v(r,l,1,1,Date.now())}},this.P=new ct(this.$),this.M=new ct(function(){var l,c,f,h,v,S,T,b,I,O,P;return G(function(N){switch(N.g){case 1:if(!r.G.size||r.o==null){N.s(0);break}if(l=r.H.m,l==tl||l==Mv)return N.return();c=!1,f=Array.from(r.G),h=r.H.Ra(),v=A(f),S=v.next();case 3:if(S.done){N.s(5);break}if(T=S.value,T==r.u){N.s(4);break}if(b=T.endTime||T.startTime,!(1<=h.start-b)){I=T.startTime-r.o,0<I&&10>=I&&(!r.C.has(T)&&_2(T)&&r.C.set(T,r.j.preload(T.uri,null,T.mimeType||void 0)),U2(r,T)),N.s(4);break}if(!r.C.has(T)){N.s(7);break}return L(N,r.C.get(T),8);case 8:(O=N.h)&&O.destroy(),r.C.delete(T);case 7:j2(r,T),P=JSON.stringify(T),r.W.has(P)&&r.W.delete(P),r.G.delete(T),B0(r),T.overlay||(c=!0);case 4:S=v.next(),N.s(3);break;case 5:c&&Uv(r),ce(N)}})})}y=P2.prototype,y.configure=function(e){this.T=e,V0(this)};function dC(e){if(!e.fa&&e.G.size){if(e.I.D(e.g,"playing",e.Z),e.I.D(e.g,"timeupdate",e.Z),e.I.D(e.g,"ended",e.$),"requestVideoFrameCallback"in e.g&&!Op()){var t=e.g,n=function(){e.O!=-1&&(e.$(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ua(.025);e.M&&e.M.ua(1),e.fa=!0}}function B0(e){e.fa&&!e.G.size&&(e.I.Ja(e.g,"playing",e.Z),e.I.Ja(e.g,"timeupdate",e.Z),e.I.Ja(e.g,"ended",e.$),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.M&&e.M.stop(),e.fa=!1)}function V0(e){if(e.A&&e.T&&!e.K){var t=e.T.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.F&&(e.F.parentElement&&e.A.removeChild(e.F),e.F=null)):(e.F||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.F=t),e.h=e.F))}}y.stop=function(){if(this.l&&this.l.Qa(),this.W.clear(),this.G.clear(),this.j.pf(),this.C.size){var e=Array.from(this.C.values());e=A(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.C.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=A(e),t=e.next();!t.done;t=e.next())j2(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.u=this.o=null,this.B=!0,this.h=this.g,this.F=null,H0(this),B0(this),this.A&&Ni(this.A),this.m&&(this.m.stop(),this.m=null)},y.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.M&&(this.M.stop(),this.M=null),this.j.destroy()},y.If=function(){return this.j};function pC(e,t){var n;G(function(i){if(i.g==1)return K0(e),L(i,vC(e,t),2);n=i.h,n.length?sy(e,n):Et("Unsupported HLS interstitial",t),ce(i)})}function hC(e,t){var n=xn(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,l=n.attributes.loop=="true",c=ze(n,"z",Wn);if(i&&c!=0){var f={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},h=xn(n,"Viewport"),v=xn(n,"TopLeft"),S=xn(n,"Size");if(h&&v&&S){if(f=ze(h,"x",Wn),f==null||(h=ze(h,"y",Wn),h==null))return;var T=ze(v,"x",Wn);if(T==null||(v=ze(v,"y",Wn),v==null))return;var b=ze(S,"x",Wn);if(b==null||(S=ze(S,"y",Wn),S==null))return;f={viewport:{x:f,y:h},topLeft:{x:T,y:v},size:{x:b,y:S}}}S=xn(n,"SqueezeCurrent"),n=null,S&&(S=ze(S,"percentage",ls))&&(n={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*S,y:1080*S}}),sy(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:l,overlay:f,displayOnBackground:c==-1,currentVideo:n,background:null}])}}y.addAdUrlInterstitial=function(e){var t=this,n,i,r,l,c,f,h,v,S;return G(function(T){switch(T.g){case 1:return n={type:12},L(T,q0(t,e,n),2);case 2:if(i=T.h,r=Ac(i,"VAST,vmap:VMAP"),!r)throw new Y(2,10,10007);if(l=[],r.tagName=="VAST"){l=M2(r,t.o),T.s(3);break}if(r.tagName!="vmap:VMAP"){T.s(3);break}for(var b=[],I=A(Mt(r,"vmap:AdBreak")),O=I.next();!O.done;O=I.next()){var P=O.value,N=P.attributes.timeOffset;N&&(O=null,N=="start"?O=0:N=="end"?O=1/0:O=is(N),(P=xn(P,"vmap:AdSource"))&&(P=xn(P,"vmap:AdTagURI"))&&(P=Cn(P))&&b.push({time:O,uri:P}))}c=A(b),f=c.next();case 5:if(f.done){T.s(3);break}return h=f.value,L(T,q0(t,h.uri,n),8);case 8:if(v=T.h,S=Ac(v,"VAST"),!S)throw new Y(2,10,10007);l.push.apply(l,te(M2(S,h.time))),f=c.next(),T.s(5);break;case 3:sy(t,l),ce(T)}})};function sy(e,t){var n,i,r,l,c,f,h,v;G(function(S){switch(S.g){case 1:n=!1,i=A(t),r=i.next();case 2:if(r.done){S.s(4);break}if(l=r.value,!l.uri){Et("Missing URL in interstitial",l),S.s(3);break}if(l.mimeType){S.s(5);break}return ye(S,6),c=e.j.xb(),L(S,So(l.uri,c,e.H.getConfiguration().streaming.retryParameters),8);case 8:l.mimeType=S.h,Le(S,5);break;case 6:De(S);case 5:if(f=l.id||JSON.stringify(l),e.W.has(f)){S.s(3);break}l.loop&&!l.overlay&&Et("Loop is only supported in overlay interstitials",l),l.overlay||(n=!0),e.W.add(f),e.G.add(l),h=!1,l.pre&&e.o==null?h=!0:l.startTime!=0||l.canJump?e.o!=null&&(v=l.startTime-e.o,0<v&&10>=v&&(h=!0)):h=!0,h&&(!e.C.has(l)&&_2(l)&&e.C.set(l,e.j.preload(l.uri,null,l.mimeType||void 0)),U2(e,l));case 3:r=i.next(),S.s(2);break;case 4:n&&Uv(e),dC(e),ce(S)}})}function cy(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var i=0,r=null;if(e.G.size&&e.o!=null){var l=e.g.ended,c=Array.from(e.G).sort(function(S,T){return T.startTime-S.startTime}),f=c;for(f=t?c.filter(function(S){return S.pre}):l?c.filter(function(S){return S.post}):c.filter(function(S){return!S.pre&&!S.post}),c=A(f),f=c.next();!f.done;f=c.next()){f=f.value;var h=!1;if(t)h=f.pre;else if(l)h=f.post;else if(!f.pre&&!f.post){var v=e.o-Math.round(1e3*f.startTime)/1e3;0<v&&(1>=v||!f.canJump)&&(h=!(n==null&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=f.startTime))}h&&(!e.u||f.startTime>=e.u.startTime)&&(i==(n||0)?r=f:r&&!f.canJump&&.001<Math.round(1e3*f.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=f,i=0),i++)}}return r}function _v(e,t,n,i,r,l){l=l===void 0?0:l,e.u=t,V0(e),!e.h.parentElement&&e.A&&e.A.appendChild(e.h),i==1&&n==1&&(n=Array.from(e.G).filter(function(c){return t.pre?c.pre==t.pre:t.post?c.post==t.post:.001>Math.abs(c.startTime-t.startTime)}).length),t.once&&(l++,e.G.delete(t),B0(e),t.overlay||Uv(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?yC(e,t,n,i,l):Et("Unsupported interstitial",t):e.B&&t.overlay?Et("Unsupported interstitial",t):gC(e,t,n,i,r,l)}function yC(e,t,n,i,r){function l(){e.m&&(e.m.stop(),e.m=null),e.A.removeChild(h),H0(e,t),e.i(new Ie("ad-stopped"));var b=cy(e,t.pre,i-r);b?(e.l.Qa(),_v(e,b,n,++i,Date.now(),r)):e.K=!1}var c=t.overlay,f=t.mimeType=="text/html"?"iframe":"img",h=document.createElement(f);h.style.objectFit="contain",h.style.position="absolute",h.style.border="none",L2(e,t),e.i(new Ie("ad-started",new Map().set("ad",new Ye(t,n,i)))),f=="iframe"?h.src=t.uri:(h.src=t.uri,h.onerror=function(b){e.i(new Ie("ad-error",new Map().set("originalEvent",b))),l()});var v=c.viewport,S=c.topLeft;c=c.size,v.x==0&&v.y==0?(h.width=t.overlay.size.x,h.height=t.overlay.size.y,h.style.bottom="10%",h.style.left="0",h.style.right="0",h.style.width="100%",t.overlay.size.y||f!="iframe"||(h.style.height="auto")):(h.style.height=c.y/v.y*100+"%",h.style.left=S.x/v.x*100+"%",h.style.top=S.y/v.y*100+"%",h.style.width=c.x/v.x*100+"%"),e.A.appendChild(h);var T=Date.now();e.m&&e.m.stop(),e.m=new ct(function(){t.playoutLimit&&(Date.now()-T)/1e3>t.playoutLimit?(e.i(new Ie("ad-complete")),l()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new Ie("ad-complete")),l()):e.g.currentTime<t.startTime&&(e.i(new Ie("ad-skipped")),l())}),t.playoutLimit&&!t.endTime?e.m.da(t.playoutLimit):t.endTime&&e.m.ua(.025),e.l.D(e.g,"seeked",function(){var b=e.g.currentTime;(b<t.startTime||t.endTime&&b>t.endTime)&&(e.m&&e.m.stop(),e.i(new Ie("ad-skipped")),l())})}function gC(e,t,n,i,r,l){var c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q;G(function(K){switch(K.g){case 1:if(c=Date.now(),e.K=!0,!e.B||i!=1){K.s(2);break}return e.i(new Ie("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),f=new It,h=function(W){return G(function(Q){if(Q.g==1)return W.state!="detach"?Q.s(0):Op()?L(Q,new Promise(function(ie){return new ct(ie).da(.1)}),3):Q.s(3);f.resolve(),e.l.Ja(e.H,"onstatechange",h),ce(Q)})},e.l.D(e.H,"onstatechange",h),L(K,f,2);case 2:return L2(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,v=t.overlay.viewport,S=t.overlay.topLeft,T=t.overlay.size,e.h.style.height=T.y/v.y*100+"%",e.h.style.left=S.x/v.x*100+"%",e.h.style.top=S.y/v.y*100+"%",e.h.style.width=T.x/v.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),b=!1,I=function(){if(!e.B&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var W=Date.now();e.g.currentTime+=(W-r)/1e3,r=W}},O=function(W){var Q,ie;return G(function(Z){if(Z.g==1){if(I(),Q=cy(e,t.pre,i-l),W&&t.groupId)for(;Q&&Q.groupId==t.groupId;)i++,Q=cy(e,t.pre,i-l);return e.m&&(!t.groupId||Q&&Q.groupId!=t.groupId)&&(e.m.stop(),e.m=null),H0(e,t),Q&&!Q.overlay?Z.s(2):(t.post&&(e.o=null,e.u=null),e.B?L(Z,e.j.detach(),4):L(Z,e.j.kc(),4))}Z.g!=2&&(e.B&&(ie=t.resumeOffset,ie==null&&(ie=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.o||0):(Date.now()-r)/1e3),e.i(new Ie("ad-content-resume-requested",new Map().set("offset",ie)))),e.i(new Ie("ad-stopped")),e.l.Qa(),e.K=!1,e.B?Uv(e):(e.h.style.display="none",I(),e.g.ended||e.g.play())),V0(e),Q&&(e.i(new Ie("ad-stopped")),e.l.Qa(),_v(e,Q,n,++i,r,l)),ce(Z)})},P=function(W){return G(function(Q){return b?Q.return():(b=!0,e.i(new Ie("ad-error",new Map().set("originalEvent",W))),L(Q,O(!1),0))})},N=function(){return G(function(W){if(W.g==1)return b?W.return():(b=!0,L(W,O(!1),2));e.i(new Ie("ad-complete")),ce(W)})},e.ea=function(){return G(function(W){return b?W.return():(b=!0,e.i(new Ie("ad-skipped")),L(W,O(!0),0))})},_=new Xe(e.h,t,e.ea,n,i,!e.B),e.B||(_.setMuted(e.g.muted),_.setVolume(e.g.volume)),e.i(new Ie("ad-started",new Map().set("ad",_))),(B=_.canSkipNow())&&e.i(new Ie("ad-skip-state-changed")),e.l.ma(e.j,"error",P),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var W=_.canSkipNow();B!=W&&0<_.getRemainingTime()&&0<_.getDuration()&&e.i(new Ie("ad-skip-state-changed")),B=W}}),e.l.ma(e.j,"firstquartile",function(){I(),e.i(new Ie("ad-first-quartile"))}),e.l.ma(e.j,"midpoint",function(){I(),e.i(new Ie("ad-midpoint"))}),e.l.ma(e.j,"thirdquartile",function(){I(),e.i(new Ie("ad-third-quartile"))}),e.l.ma(e.j,"complete",N),e.l.D(e.h,"play",function(){e.i(new Ie("ad-resumed"))}),e.l.D(e.h,"pause",function(){var W=e.j.getConfiguration();e.h.currentTime>=W.playRangeEnd?N():e.i(new Ie("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new Ie("ad-muted")):e.i(new Ie("ad-volume-changed"))}),ye(K,4),K0(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(F=t.endTime-t.startTime,0<F&&e.j.configure("playRangeEnd",F)),t.playoutLimit&&!e.m&&(e.m=new ct(function(){e.ea()}).da(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),L(K,e.j.Lb(e.h),6);case 6:return e.C.has(t)?L(K,e.C.get(t),10):L(K,e.j.load(t.uri,null,t.mimeType||void 0),8);case 10:return z=K.h,e.C.delete(t),z?L(K,e.j.load(z),8):L(K,e.j.load(t.uri,null,t.mimeType||void 0),8);case 8:e.h.play(),J=(Date.now()-c)/1e3,e.i(new Ie("ads-loaded",new Map().set("loadTime",J))),e.B&&e.g.play(),t.overlay&&(e.l.D(e.g,"seeking",function(){var W=e.g.currentTime-t.startTime;.1<Math.abs(W-e.h.currentTime)&&(e.h.currentTime=W)}),e.l.D(e.g,"seeked",function(){var W=e.g.currentTime;(W<t.startTime||t.endTime&&W>t.endTime)&&e.ea()})),Le(K,0);break;case 4:if(q=De(K),!e.K)return K.return();P(q),ce(K)}})}function L2(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],l=n.topLeft.x/n.viewport.x*100;0<l&&100>=l&&(r.push("translateX("+l+"%)"),i=!1),l=n.topLeft.y/n.viewport.y*100,0<l&&100>=l&&(r.push("translateY("+l+"%)"),i=!1),l=n.size.x/n.viewport.x,1>l&&r.push("scaleX("+l+")"),n=n.size.y/n.viewport.y,1>l&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.A&&(e.A.style.pointerEvents="none",t.background&&(e.A.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function H0(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.A&&(e.A.style.pointerEvents="",!t||t.background)&&(e.A.style.background=""),e.F&&(e.F.style.background="")}function vC(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt,St;return G(function(et){switch(et.g){case 1:if(n=[],!t||(i=t.values.find(function(ut){return ut.key=="X-ASSET-URI"}),r=t.values.find(function(ut){return ut.key=="X-ASSET-LIST"}),!i&&!r))return et.return(n);if(l=null,(c=t.values.find(function(ut){return ut.key=="ID"}))&&(l=c.data),f=l==null?Math.floor(10*t.startTime)/10:t.startTime,(h=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(h=l==null?Math.floor(10*t.endTime)/10:t.endTime),v=t.values.find(function(ut){return ut.key=="X-RESTRICT"}),T=S=!0,v&&v.data&&(b=v.data,S=!b.includes("SKIP"),T=!b.includes("JUMP")),I=S?0:null,(O=t.values.find(function(ut){return ut.key=="X-ENABLE-SKIP-AFTER"}))&&(P=O.data,I=parseFloat(P),isNaN(I)&&(I=S?0:null)),N=null,(_=t.values.find(function(ut){return ut.key=="X-ENABLE-SKIP-FOR"}))&&(B=_.data,N=parseFloat(B),isNaN(I)&&(N=null)),F=null,(z=t.values.find(function(ut){return ut.key=="X-RESUME-OFFSET"}))&&(J=z.data,F=parseFloat(J),isNaN(F)&&(F=null)),q=null,(K=t.values.find(function(ut){return ut.key=="X-PLAYOUT-LIMIT"}))&&(W=K.data,q=parseFloat(W),isNaN(q)&&(q=null)),Z=ie=Q=!1,(ne=t.values.find(function(ut){return ut.key=="CUE"}))&&(re=ne.data,Q=re.includes("ONCE"),ie=re.includes("PRE"),Z=re.includes("POST")),ue=!1,(de=t.values.find(function(ut){return ut.key=="X-TIMELINE-OCCUPIES"}))?(se=de.data,ue=se.includes("RANGE")):!z&&e.H.U()&&(ue=!ie&&!Z),i){if(we=i.data,!we)return et.return(n);n.push({id:l,groupId:null,startTime:f,endTime:h,uri:we,mimeType:null,isSkippable:S,skipOffset:I,skipFor:N,canJump:T,resumeOffset:F,playoutLimit:q,once:Q,pre:ie,post:Z,timelineRange:ue,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),et.s(2);break}if(!r){et.s(2);break}return be=r.data,be?(ye(et,4),Qe={type:11},L(et,q0(e,be,Qe),6)):et.return(n);case 6:for(Be=et.h,kt=Zt(Be),mt=JSON.parse(kt),(st=mt["SKIP-CONTROL"])&&(pt=st["ENABLE-SKIP-AFTER"],typeof pt=="number"&&(I=parseFloat(pt),isNaN(pt)&&(I=S?0:null)),Ot=st["ENABLE-SKIP-FOR"],typeof Ot=="number"&&(N=parseFloat(Ot),isNaN(Ot)&&(N=null))),lt=0;lt<mt.ASSETS.length;lt++)St=mt.ASSETS[lt],St.URI&&n.push({id:l+"_shaka_asset_"+lt,groupId:l,startTime:f,endTime:h,uri:St.URI,mimeType:null,isSkippable:S,skipOffset:I,skipFor:N,canJump:T,resumeOffset:F,playoutLimit:q,once:Q,pre:ie,post:Z,timelineRange:ue,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});Le(et,2);break;case 4:De(et);case 2:return et.return(n)}})}function Uv(e){for(var t=[],n=A(e.G),i=n.next(),r={};!i.done;r={$b:void 0},i=n.next())i=i.value,i.overlay||(r.$b={start:i.startTime,end:null},i.pre?(r.$b.start=0,r.$b.end=null):i.post?(r.$b.start=-1,r.$b.end=null):i.timelineRange&&(r.$b.end=i.endTime),t.find(function(l){return function(c){return l.$b.start==c.start&&l.$b.end==c.end}}(r))||t.push(r.$b));e.i(new Ie("ad-cue-points-changed",new Map().set("cuepoints",t)))}function K0(e){e.j.configure(e.H.Vg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),ld(e.H.xb(),e.j.xb())}function q0(e,t,n){var i,r,l;return G(function(c){return c.g==1?(i=un([t],Lr()),r=e.H.xb().request(7,i,n),L(c,r.promise,2)):(l=c.h,c.return(l.data))})}function _2(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function U2(e,t){if(!(e.L.has(t)||e.T&&!e.T.allowPreloadOnDomElements)){var n=function(l){var c=document.createElement("link");return c.rel="preload",c.href=l,c.as="image",document.head.appendChild(c),c},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.L.set(t,i)}}function j2(e,t){if(e.L.has(t)){var n=e.L.get(t);n=A(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.parentNode.removeChild(i);e.L.delete(t)}}function Ge(e,t,n,i,r){this.h=e,this.j=is(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}y=Ge.prototype,y.needsSkipUI=function(){return!0},y.isClientRendering=function(){return!1},y.hasCustomClick=function(){return!1},y.isUsingAnotherMediaElement=function(){return!1},y.getDuration=function(){return this.h.durationInSeconds},y.getMinSuggestedDuration=function(){return this.getDuration()},y.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},y.isPaused=function(){return this.g.paused},y.isSkippable=function(){return typeof this.j=="number"},y.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},y.canSkipNow=function(){return this.getTimeUntilSkippable()==0},y.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},y.pause=function(){return this.g.pause()},y.play=function(){return this.g.play()},y.getVolume=function(){return this.g.volume},y.setVolume=function(e){this.g.volume=e},y.isMuted=function(){return this.g.muted},y.isLinear=function(){return this.o},y.resize=function(){},y.setMuted=function(e){this.g.muted=e},y.getSequenceLength=function(){return this.l?this.l:1},y.getPositionInSequence=function(){return this.i?this.i:1},y.getTitle=function(){return this.h.adTitle},y.getDescription=function(){return""},y.getVastMediaBitrate=function(){return 0},y.getVastMediaHeight=function(){return 0},y.getVastMediaWidth=function(){return 0},y.getAdId=function(){return this.h.adId},y.getCreativeAdId=function(){return this.h.creativeId},y.getAdvertiserName=function(){return""},y.getMediaUrl=function(){return null},y.getTimeOffset=function(){return 0},y.getPodIndex=function(){return 0},y.release=function(){this.l=this.i=this.g=this.h=null},Me("shaka.ads.MediaTailorAd",Ge),Ge.prototype.release=Ge.prototype.release,Ge.prototype.getPodIndex=Ge.prototype.getPodIndex,Ge.prototype.getTimeOffset=Ge.prototype.getTimeOffset,Ge.prototype.getMediaUrl=Ge.prototype.getMediaUrl,Ge.prototype.getAdvertiserName=Ge.prototype.getAdvertiserName,Ge.prototype.getCreativeAdId=Ge.prototype.getCreativeAdId,Ge.prototype.getAdId=Ge.prototype.getAdId,Ge.prototype.getVastMediaWidth=Ge.prototype.getVastMediaWidth,Ge.prototype.getVastMediaHeight=Ge.prototype.getVastMediaHeight,Ge.prototype.getVastMediaBitrate=Ge.prototype.getVastMediaBitrate,Ge.prototype.getDescription=Ge.prototype.getDescription,Ge.prototype.getTitle=Ge.prototype.getTitle,Ge.prototype.getPositionInSequence=Ge.prototype.getPositionInSequence,Ge.prototype.getSequenceLength=Ge.prototype.getSequenceLength,Ge.prototype.setMuted=Ge.prototype.setMuted,Ge.prototype.resize=Ge.prototype.resize,Ge.prototype.isLinear=Ge.prototype.isLinear,Ge.prototype.isMuted=Ge.prototype.isMuted,Ge.prototype.setVolume=Ge.prototype.setVolume,Ge.prototype.getVolume=Ge.prototype.getVolume,Ge.prototype.play=Ge.prototype.play,Ge.prototype.pause=Ge.prototype.pause,Ge.prototype.skip=Ge.prototype.skip,Ge.prototype.canSkipNow=Ge.prototype.canSkipNow,Ge.prototype.getTimeUntilSkippable=Ge.prototype.getTimeUntilSkippable,Ge.prototype.isSkippable=Ge.prototype.isSkippable,Ge.prototype.isPaused=Ge.prototype.isPaused,Ge.prototype.getRemainingTime=Ge.prototype.getRemainingTime,Ge.prototype.getMinSuggestedDuration=Ge.prototype.getMinSuggestedDuration,Ge.prototype.getDuration=Ge.prototype.getDuration,Ge.prototype.isUsingAnotherMediaElement=Ge.prototype.isUsingAnotherMediaElement,Ge.prototype.hasCustomClick=Ge.prototype.hasCustomClick,Ge.prototype.isClientRendering=Ge.prototype.isClientRendering,Ge.prototype.needsSkipUI=Ge.prototype.needsSkipUI;function fy(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.o=new yt}fy.prototype.stop=function(){for(var e=A(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ja(t.target,t.type,t.listener);tp(this),this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},fy.prototype.release=function(){this.stop(),this.o&&this.o.release()},fy.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(SC(this,this.G,this.O),this.O=!1)},fy.prototype.getCuePoints=function(){for(var e=[],t=A(this.j),n=t.next();!n.done;n=t.next()){n=A(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e};function mC(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O;G(function(P){if(P.g==1)return i={type:7},r=un([t],Lr()),r.method="POST",n&&(l=JSON.stringify(n),r.body=kr(l)),c=e.K.request(7,r,i),ye(P,2),L(P,c.promise,4);if(P.g!=2){if(f=P.h,h=Zt(f.data),v=JSON.parse(h),v.manifestUrl&&v.trackingUrl)S=new fn(t),T=new fn(v.trackingUrl),e.G=S.resolve(T).toString(),b=Date.now()/1e3,I=b-e.P,e.i(new Ie("ads-loaded",new Map().set("loadTime",I))),O=new fn(v.manifestUrl),e.l.resolve(S.resolve(O).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return Le(P,0)}if(De(P),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,P.return();e.l.resolve(e.H),e.l=null,ce(P)})}function SC(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B;G(function(F){if(F.g==1)return i={type:8},r=un([t],Lr()),l=e.K.request(7,r,i),ye(F,2),L(F,l.promise,4);if(F.g!=2){if(c=F.h,f=[],h=Zt(c.data),v=JSON.parse(h),0<v.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(v.avails)){for(e.j=v.avails,S=A(e.j),T=S.next();!T.done;T=S.next())for(b=T.value,I=A(b.nonLinearAdsList),O=I.next();!O.done;O=I.next())for(P=O.value,N=A(P.nonLinearAdList),_=N.next();!_.done;_=N.next())B=_.value,TC(e,B);f=e.getCuePoints(),e.i(new Ie("ad-cue-points-changed",new Map().set("cuepoints",f)))}}else e.j.length&&e.i(new Ie("ad-cue-points-changed",new Map().set("cuepoints",f))),tp(e),e.j=[];return n&&(e.I||0<f.length)&&wC(e),Le(F,0)}De(F),ce(F)})}function TC(e,t){var n,i,r,l,c,f,h,v;G(function(S){if(S.g==1)return!t.staticResource||(n=B2(t),e.F.get(n))?S.return():(i={type:9},r=un([t.staticResource],Lr()),l=e.K.request(7,r,i),ye(S,2),e.F.set(n,[]),L(S,l.promise,4));if(S.g!=2)return c=S.h,f=Zt(c.data),h=JSON.parse(f),v=h.apps,e.F.set(n,v),Le(S,0);De(S),e.F.delete(n),ce(S)})}function B2(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function wC(e){H2(e),e.I||(V2(e),e.o.D(e.h,"seeked",function(){V2(e)}),e.o.D(e.h,"ended",function(){tp(e)})),e.o.D(e.h,"timeupdate",function(){H2(e)})}function V2(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,i,r=A(e.j),l=r.next();!l.done;l=r.next()){l=l.value;for(var c=A(l.ads),f=c.next();!f.done;f=c.next())if(f=f.value,!i)f.startTimeInSeconds<t&&(i=f,n=l);else if(f.startTimeInSeconds<t&&f.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=f,n=l;break}}n&&i&&!e.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function H2(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,l=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),Yi(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),Yi(e,"midpoint")):t>=l&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),Yi(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&Yi(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&tp(e)}if(!e.g||!e.g.isLinear()){e:for(i=A(e.j),r=i.next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(l=0;l<r.ads.length;l++){var c=r.ads[l],f=c.startTimeInSeconds+c.durationInSeconds;if(c.startTimeInSeconds<=t&&f>t){if(e.M.includes(c.adId)){if(e.h.ended)continue;e.h.currentTime=f;break e}tp(e),e.L=r,e.g=new Ge(c,l+1,r.ads.length,!0,e.h),e.C=c,l===0&&Yi(e,"breakStart"),K2(e);break}}if(!e.g){for(i=A(e.j),r=i.next();!r.done&&(r=r.value,!e.g);r=i.next())for(l=0;l<r.nonLinearAdsList.length;l++)if(c=r.nonLinearAdsList[l],c.nonLinearAdList.length){f=r.startTimeInSeconds;var h=e.F.get(B2(c.nonLinearAdList[0]));if(f<=t&&h&&h.length){tp(e),f=e,h=A(h);for(var v=h.next();!v.done;v=h.next())if(v=v.value,v.data.source.length){var S=document.createElement("img");S.src=v.data.source[0].url,S.style.top=(v.placeholder.top||0)+"%",S.style.height=100-(v.placeholder.top||0)+"%",S.style.left=(v.placeholder.left||0)+"%",S.style.maxWidth=100-(v.placeholder.left||0)+"%",S.style.objectFit="contain",S.style.position="absolute",f.B.appendChild(S)}e.L=r,e.g=new Ge(c,l+1,r.ads.length,!1,e.h),e.C=c,l===0&&Yi(e,"breakStart"),K2(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function tp(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?Yi(e,"skip"):Yi(e,"complete"),t=A(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ja(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Yi(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function K2(e){var t=!1;e.h.paused?t=!0:(Yi(e,"impression"),Yi(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Yi(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Yi(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Yi(e,"impression"),Yi(e,"start"),t=!1):Yi(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Yi(e,"pause")}});for(var n=A(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function Yi(e,t){var n=e.C.trackingEvents.find(function(l){return l.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(l){return l.eventType==t})),n){var i={type:10};n=A(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&r!=""&&(r=un([r],Lr()),r.method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new Ie("ad-impression"));break;case"start":e.i(new Ie("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new Ie("ad-muted"));break;case"unmute":e.i(new Ie("ad-volume-changed"));break;case"resume":e.i(new Ie("ad-resumed"));break;case"pause":e.i(new Ie("ad-paused"));break;case"firstQuartile":e.i(new Ie("ad-first-quartile"));break;case"midpoint":e.i(new Ie("ad-midpoint"));break;case"thirdQuartile":e.i(new Ie("ad-third-quartile"));break;case"complete":e.i(new Ie("ad-complete")),e.i(new Ie("ad-stopped"));break;case"skip":e.i(new Ie("ad-skipped")),e.i(new Ie("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new Ie("ad-skip-state-changed"))}}function We(e,t){this.g=e,this.i=null,this.h=t}y=We.prototype,y.needsSkipUI=function(){return!0},y.isClientRendering=function(){return!1},y.hasCustomClick=function(){return!0},y.isUsingAnotherMediaElement=function(){return!1},y.getDuration=function(){return this.i?this.i.duration:-1},y.getMinSuggestedDuration=function(){return this.getDuration()},y.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},y.isPaused=function(){return this.h.paused},y.isSkippable=function(){return this.g.isSkippable()},y.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},y.canSkipNow=function(){return this.getTimeUntilSkippable()==0},y.skip=function(){this.h.currentTime+=this.getRemainingTime()},y.pause=function(){return this.h.pause()},y.play=function(){return this.h.play()},y.getVolume=function(){return this.h.volume},y.setVolume=function(e){this.h.volume=e},y.isMuted=function(){return this.h.muted},y.isLinear=function(){return!0},y.resize=function(){},y.setMuted=function(e){this.h.muted=e},y.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},y.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},y.getTitle=function(){return this.g.getTitle()},y.getDescription=function(){return this.g.getDescription()},y.getVastMediaBitrate=function(){return 0},y.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},y.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},y.getAdId=function(){return this.g.getAdId()},y.getCreativeAdId=function(){return this.g.getCreativeAdId()},y.getAdvertiserName=function(){return this.g.getAdvertiserName()},y.getMediaUrl=function(){return null},y.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},y.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},y.release=function(){this.h=this.i=this.g=null},Me("shaka.ads.ServerSideAd",We),We.prototype.release=We.prototype.release,We.prototype.getPodIndex=We.prototype.getPodIndex,We.prototype.getTimeOffset=We.prototype.getTimeOffset,We.prototype.getMediaUrl=We.prototype.getMediaUrl,We.prototype.getAdvertiserName=We.prototype.getAdvertiserName,We.prototype.getCreativeAdId=We.prototype.getCreativeAdId,We.prototype.getAdId=We.prototype.getAdId,We.prototype.getVastMediaWidth=We.prototype.getVastMediaWidth,We.prototype.getVastMediaHeight=We.prototype.getVastMediaHeight,We.prototype.getVastMediaBitrate=We.prototype.getVastMediaBitrate,We.prototype.getDescription=We.prototype.getDescription,We.prototype.getTitle=We.prototype.getTitle,We.prototype.getPositionInSequence=We.prototype.getPositionInSequence,We.prototype.getSequenceLength=We.prototype.getSequenceLength,We.prototype.setMuted=We.prototype.setMuted,We.prototype.resize=We.prototype.resize,We.prototype.isLinear=We.prototype.isLinear,We.prototype.isMuted=We.prototype.isMuted,We.prototype.setVolume=We.prototype.setVolume,We.prototype.getVolume=We.prototype.getVolume,We.prototype.play=We.prototype.play,We.prototype.pause=We.prototype.pause,We.prototype.skip=We.prototype.skip,We.prototype.canSkipNow=We.prototype.canSkipNow,We.prototype.getTimeUntilSkippable=We.prototype.getTimeUntilSkippable,We.prototype.isSkippable=We.prototype.isSkippable,We.prototype.isPaused=We.prototype.isPaused,We.prototype.getRemainingTime=We.prototype.getRemainingTime,We.prototype.getMinSuggestedDuration=We.prototype.getMinSuggestedDuration,We.prototype.getDuration=We.prototype.getDuration,We.prototype.isUsingAnotherMediaElement=We.prototype.isUsingAnotherMediaElement,We.prototype.hasCustomClick=We.prototype.hasCustomClick,We.prototype.isClientRendering=We.prototype.isClientRendering,We.prototype.needsSkipUI=We.prototype.needsSkipUI;function q2(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new yt,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new Ie("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(l){xC(r,l)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(l){l=l.getAd(),r.m=new We(l,r.l),r.A&&(r.m.i=r.A),r.i(new Ie("ad-started",new Map().set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var l=r.l.currentTime;r.o&&r.o>l&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(l){r.A=l.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new Ie("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new Ie("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new Ie("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new Ie("ad-complete")),r.i(new Ie("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new Ie("ad-skipped")),r.i(new Ie("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(l){var c=l.getStreamData();l=[],c=A(c.cuepoints);for(var f=c.next();!f.done;f=c.next())f=f.value,l.push({start:f.start,end:f.end});r.C=l,r.i(new Ie("ad-cue-points-changed",new Map().set("cuepoints",l)))})}y=q2.prototype,y.configure=function(){},y.stop=function(){this.B="",this.o=null,this.C=[]},y.release=function(){this.stop(),this.h&&this.h.release()},y.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},y.getCuePoints=function(){return this.C};function xC(e,t){e.i(new Ie("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var i=e.g.previousCuePointForStreamTime(n);i&&!i.played&&(e.o=n,e.l.currentTime=i.start)}})}function Ue(){Nt.call(this),this.h=this.i=this.j=this.g=null,this.m=new k2,this.o=navigator.language,this.l=null}nt(Ue,Nt),y=Ue.prototype,y.setLocale=function(e){this.o=e},y.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},y.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new P2(e,t,n,function(r){return jv(i,r)}),this.g.configure(this.l)},y.initClientSide=function(e,t,n){var i=this;if(!E.google||!google.ima||!google.ima.AdsLoader)throw new Y(2,10,1e4);this.j&&this.j.release(),this.j=new Nv(e,t,this.o,n,function(r){return jv(i,r)}),this.j.configure(this.l)},y.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),Nt.prototype.release.call(this)},y.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new Ie("ad-stopped")),this.dispatchEvent(new Ie("ad-content-attach-requested")),this.m=new k2},y.requestClientSideAds=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},y.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new Y(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},y.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new fy(e,t,n,function(r){return jv(i,r)})},y.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new Y(1,10,10005);var i=this.i;return n=n===void 0?"":n,i.l?e=Promise.reject(new Y(1,10,10004)):(i.l=new It,mC(i,e,t),i.H=n||"",i.P=Date.now()/1e3,e=i.l),e},y.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new Y(1,10,10005);var t=this.i;t.G=e,t.i(new Ie("ads-loaded",new Map().set("loadTime",0)))},y.initServerSide=function(e,t){var n=this;if(!E.google||!google.ima||!google.ima.dai)throw new Y(2,10,10002);this.h&&this.h.release(),this.h=new q2(e,t,this.o,function(i){return jv(n,i)}),this.h.configure(this.l)},y.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new Y(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Et('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.14.9",n=this.h,n.j?e=Promise.reject(new Y(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new It,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},y.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new Y(1,10,10003);(e.mpt||e.mpv)&&Et('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.14.9",this.h.g.replaceAdTagParameters(e)},y.getServerSideCuePoints=function(){return bt("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},y.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},y.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:aC(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},y.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},y.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},y.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},y.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},y.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&pC(this.g,n))},y.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if(i=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||i=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",i=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||i)){for(var r=n.startTime,l=n.endTime,c=null,f=0,h,v=A(n.eventNode.children),S=v.next();!S.done;S=v.next())if(S=S.value,S.tagName=="AlternativeMPD"){if(S=S.attributes.uri){h=S;break}}else if(S.tagName=="InsertPresentation"||S.tagName=="ReplacePresentation"){var T=S.attributes.url;if(T){h=T,(v=ze(S,"maxDuration",Wn))&&(c=v/n.timescale),(v=ze(S,"returnOffset",Wn))&&(f=v/n.timescale),t&&f&&(l=r+f);break}}h&&sy(e,[{id:n.id,groupId:null,startTime:r,endTime:l,uri:h,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?f:null,playoutLimit:c,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else(i=="urn:mpeg:dash:event:2012"||i=="urn:scte:dash:scte214-events")&&n.eventNode&&xn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&hC(this.g,n))}},y.addCustomInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);sy(this.g,[e])},y.addAdUrlInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);return this.g.addAdUrlInterstitial(e)},y.getInterstitialPlayer=function(){if(!this.g)throw new Y(1,10,10006);return this.g.If()};function jv(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Me("shaka.ads.AdManager",Ue),Ue.prototype.getInterstitialPlayer=Ue.prototype.getInterstitialPlayer,Ue.prototype.addAdUrlInterstitial=Ue.prototype.addAdUrlInterstitial,Ue.prototype.addCustomInterstitial=Ue.prototype.addCustomInterstitial,Ue.prototype.onDASHInterstitialMetadata=Ue.prototype.onDASHInterstitialMetadata,Ue.prototype.onHLSInterstitialMetadata=Ue.prototype.onHLSInterstitialMetadata,Ue.prototype.onCueMetadataChange=Ue.prototype.onCueMetadataChange,Ue.prototype.onHlsTimedMetadata=Ue.prototype.onHlsTimedMetadata,Ue.prototype.onDashTimedMetadata=Ue.prototype.onDashTimedMetadata,Ue.prototype.onManifestUpdated=Ue.prototype.onManifestUpdated,Ue.prototype.getStats=Ue.prototype.getStats,Ue.prototype.getCuePoints=Ue.prototype.getCuePoints,Ue.prototype.getServerSideCuePoints=Ue.prototype.getServerSideCuePoints,Ue.prototype.replaceServerSideAdTagParameters=Ue.prototype.replaceServerSideAdTagParameters,Ue.prototype.requestServerSideStream=Ue.prototype.requestServerSideStream,Ue.prototype.initServerSide=Ue.prototype.initServerSide,Ue.prototype.addMediaTailorTrackingUrl=Ue.prototype.addMediaTailorTrackingUrl,Ue.prototype.requestMediaTailorStream=Ue.prototype.requestMediaTailorStream,Ue.prototype.initMediaTailor=Ue.prototype.initMediaTailor,Ue.prototype.updateClientSideAdsRenderingSettings=Ue.prototype.updateClientSideAdsRenderingSettings,Ue.prototype.requestClientSideAds=Ue.prototype.requestClientSideAds,Ue.prototype.onAssetUnload=Ue.prototype.onAssetUnload,Ue.prototype.release=Ue.prototype.release,Ue.prototype.initClientSide=Ue.prototype.initClientSide,Ue.prototype.initInterstitial=Ue.prototype.initInterstitial,Ue.prototype.configure=Ue.prototype.configure,Ue.prototype.setLocale=Ue.prototype.setLocale,Ue.ADS_LOADED="ads-loaded",Ue.AD_STARTED="ad-started",Ue.AD_FIRST_QUARTILE="ad-first-quartile",Ue.AD_MIDPOINT="ad-midpoint",Ue.AD_THIRD_QUARTILE="ad-third-quartile",Ue.AD_COMPLETE="ad-complete",Ue.AD_STOPPED="ad-stopped",Ue.AD_SKIPPED="ad-skipped",Ue.AD_VOLUME_CHANGED="ad-volume-changed",Ue.AD_MUTED="ad-muted",Ue.AD_PAUSED="ad-paused",Ue.AD_RESUMED="ad-resumed",Ue.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Ue.CUEPOINTS_CHANGED="ad-cue-points-changed",Ue.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Ue.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Ue.AD_CLICKED="ad-clicked",Ue.AD_PROGRESS="ad-progress",Ue.AD_BUFFERING="ad-buffering",Ue.AD_IMPRESSION="ad-impression",Ue.AD_DURATION_CHANGED="ad-duration-changed",Ue.AD_CLOSED="ad-closed",Ue.AD_LOADED="ad-loaded",Ue.ALL_ADS_COMPLETED="all-ads-completed",Ue.AD_LINEAR_CHANGED="ad-linear-changed",Ue.AD_METADATA="ad-metadata",Ue.AD_RECOVERABLE_ERROR="ad-recoverable-error",Ue.AD_ERROR="ad-error",Ue.AD_BREAK_READY="ad-break-ready",Ue.AD_INTERACTION="ad-interaction",Ue.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Ue.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Ue.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Rv=function(){return new Ue};function G2(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof Ie){var i={};for(r in n)(t=n[r])&&typeof t=="object"?r=="detail"&&(i[r]=t):r in Event||(i[r]=t);return i}if(n instanceof Error){var r=new Set(["name","message","stack"]);for(i in n)r.add(i);for(i=A(Object.getOwnPropertyNames(n)),t=i.next();!t.done;t=i.next())r.add(t.value);for(i={},r=A(r),t=r.next();!t.done;t=r.next())t=t.value,i[t]=n[t];n={__type__:"Error",contents:i}}else if(n instanceof TimeRanges){for(r={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=A(ho(n)),i=n.next();!i.done;i=n.next())i=i.value,t=i.end,r.start.push(i.start),r.end.push(t);n=r}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function G0(e){return JSON.parse(e,function(t,n){if(n=="NaN")var i=NaN;else if(n=="-Infinity")i=-1/0;else if(n=="Infinity")i=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")i=EC(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")i=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(i in t)n[i]=t[i];i=n}else i=n;return i})}function EC(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var z2="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),AC="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),z0=["loop","playbackRate"],CC=["pause","play"],F0=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),X0=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),F2=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),X2=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Y2=[["isTextTrackVisible","setTextTrackVisibility"]],bC="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),IC=["attach","attachCanvas","detach","load","unload"];function Y0(e,t,n,i,r,l,c){var f=this;this.G=e,this.K=c,this.l=new ct(t),this.L=n,this.u=!1,this.A=i,this.F=r,this.M=l,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return W0(f)},this.C=function(h,v){switch(h=G0(v),h.type){case"event":var S=h.targetName,T=vs(h.event);f.A(S,T);break;case"update":S=h.update;for(T in S){h=f.g[T]||{};for(var b in S[T])h[b]=S[T][b]}f.u&&(f.L(),f.u=!1);break;case"asyncComplete":if(T=h.id,b=h.error,h=f.h.get(T),f.h.delete(T),h)if(b){T=new Y(b.severity,b.category,b.code);for(S in b)T[S]=b[S];h.reject(T)}else h.resolve()}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,py.add(this)}y=Y0.prototype,y.destroy=function(){return py.delete(this),Q0(this),nl&&Q2(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},y.qb=function(){return this.i},y.ag=function(){return this.I},y.init=function(){if(this.G.length)if(E.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.sb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=A(py),i=n.next();!i.done;i=n.next()){i=i.value;var r=t;i.j=new It,i.u=!0,Bv(i,r)}},function(t){for(var n=A(py),i=n.next();!i.done;i=n.next())i=i.value,Vv=t=="available",i.l.sb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),Vv&&this.l.da(OC),(e=nl)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new It,this.u=!0,Bv(this,e)):nl=null}else E.__onGCastApiAvailable!==J2&&(Hv=E.__onGCastApiAvailable||null,E.__onGCastApiAvailable=J2)},y.ig=function(e){this.o=e,this.i&&dy(this,{type:"appData",appData:this.o})},y.cast=function(){var e=this;return G(function(t){if(!e.m)throw new Y(1,8,8e3);if(!Vv)throw new Y(1,8,8001);if(e.i)throw new Y(1,8,8002);return e.j=new It,chrome.cast.requestSession(function(n){return Bv(e,n)},function(n){return W2(e,n)}),L(t,e.j,0)})};function DC(e){e.i&&chrome.cast.requestSession(function(t){return Bv(e,t)},function(t){return W2(e,t)})}y.Pc=function(){if(this.i){if(Q0(this),nl){Q2(this);try{nl.stop(function(){},function(){})}catch{}nl=null}W0(this)}},y.get=function(e,t){var n=this;if(e=="video"){if(CC.includes(t))return function(){return n.oh.apply(n,[e,t].concat(te(Tt.apply(0,arguments))))}}else if(e=="player"){if(F2.has(t)&&!this.get("player","isLive")())return function(){};if(bC.includes(t))return function(){return n.oh.apply(n,[e,t].concat(te(Tt.apply(0,arguments))))};if(IC.includes(t))return function(){return n.pj.apply(n,[e,t].concat(te(Tt.apply(0,arguments))))};if(F0.has(t)||X0.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},y.set=function(e,t,n){this.g[e][t]=n,dy(this,{type:"set",targetName:e,property:t,value:n})};function Bv(e,t){var n=e.M();nl=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),W0(e),dy(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function W2(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new Y(2,8,n,t))}y.oh=function(e,t){dy(this,{type:"call",targetName:e,methodName:t,args:Tt.apply(2,arguments)})},y.pj=function(e,t){var n=Tt.apply(2,arguments),i=new It,r=this.H.toString();this.H++,this.h.set(r,i);try{dy(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(l){i.reject(l)}return i};function Q2(e){var t=nl;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function W0(e){var t=nl?nl.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};Q0(e)}e.i=t,e.I=t?nl.receiver.friendlyName:"",e.l.sb()}function Q0(e){if(e.h)for(var t=A(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new Y(1,7,7e3))}}function dy(e,t){t=G2(t);var n=nl;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Jm)}catch(i){throw t=new Y(2,8,8005,i),n=new Ie("error",new Map().set("detail",t)),e.A("player",n),e.Pc(),t}}var OC=.02,Vv=!1,nl=null,Hv=null,py=new Set;function J2(e){if(Hv?E.__onGCastApiAvailable=Hv:delete E.__onGCastApiAvailable,Hv=null,e)for(var t=A(py),n=t.next();!n.done;n=t.next())n.value.init();typeof E.__onGCastApiAvailable=="function"&&E.__onGCastApiAvailable(e)}function Hn(e,t,n,i){i=i===void 0?!1:i,Nt.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.l=this.u=this.j=null,this.C=n,this.B=i,this.A=new Map,this.g=null,E.chrome?(this.g=new Y0(n,function(){return eT(r)},function(){return tT(r)},function(l,c){return iT(r,l,c)},function(){return nT(r)},function(){return $2(r)},i),kC(this)):(this.j=this.i,this.u=this.h)}nt(Hn,Nt),y=Hn.prototype,y.destroy=function(e){return this.g&&e&&this.g.Pc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,Nt.prototype.release.call(this),Promise.all(e)},y.Li=function(){return this.j},y.If=function(){return this.u},y.Xh=function(){return this.g?this.g.m&&Vv:!1},y.qb=function(){return this.g?this.g.qb():!1},y.ag=function(){return this.g?this.g.ag():""},y.cast=function(){var e=this;return G(function(t){return t.g==1?e.g?L(t,e.g.cast(),2):t.return():e.h?L(t,e.h.kc(),0):t.return()})},y.ig=function(e){this.g&&this.g.ig(e)},y.Ej=function(){this.g&&DC(this.g)},y.Pc=function(){this.g&&this.g.Pc()},y.Yh=function(e,t){t=t===void 0?!1:t;var n=this;return G(function(i){if(i.g==1)return e==n.C&&t==n.B||(n.C=e,n.B=t,!n.g)?i.return():(n.g.Pc(),L(i,n.g.destroy(),2));n.g=null,n.g=new Y0(e,function(){return eT(n)},function(){return tT(n)},function(r,l){return iT(n,r,l)},function(){return nT(n)},function(){return $2(n)},t),n.g.init(),ce(i)})};function kC(e){e.g.init(),e.m=new yt;for(var t=A(z2),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,function(l){e.g.qb()||(l=vs(l),e.l.dispatchEvent(l))});for(var i in Uc)e.m.D(e.h,Uc[i],function(l){e.g.qb()||e.o.dispatchEvent(l)});e.j={},t={};for(var r in e.i)t={wd:t.wd},t.wd=r,Object.defineProperty(e.j,t.wd,{configurable:!1,enumerable:!0,get:function(l){return function(){return RC(e,l.wd)}}(t),set:function(l){return function(c){var f=l.wd;e.g.qb()?e.g.set("video",f,c):e.i[f]=c}}(t)});e.u={},Z2(e,function(l){Object.defineProperty(e.u,l,{configurable:!1,enumerable:!0,get:function(){return NC(e,l)}})}),MC(e),e.l=new Nt,e.l.Ge=e.j,e.o=new Nt,e.o.Ge=e.u}function MC(e){var t=new Map;Z2(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.A.set(n,i):e.A.set(i,n)):t.set(i,n)})}function Z2(e,t){function n(h){return h=="constructor"||typeof i[h]!="function"?!1:!r.has(h)}var i=e.h,r=new Set,l;for(l in i)n(l)&&(r.add(l),t(l,i[l]));for(e=Object.getPrototypeOf(i),l=Object.getPrototypeOf({});e&&e!=l;){for(var c=A(Object.getOwnPropertyNames(e)),f=c.next();!f.done;f=c.next())f=f.value,n(f)&&(r.add(f),t(f,i[f]));e=Object.getPrototypeOf(e)}}function $2(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Qc(),startTime:null};e.i.pause();for(var n=A(z0),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),n=A(X2),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(n=A(Y2),i=n.next();!i.done;i=n.next())r=i.value,i=r[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function eT(e){var t=new Ie("caststatuschanged");e.dispatchEvent(t)}function tT(e){var t=new Ie(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function nT(e){for(var t=A(X2),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var l=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime"));var c;(i=e.g.get("player","getTextTracks")())&&i.length&&(c=i.find(function(v){return v.active}));var f=e.g.get("player","isTextTrackVisible")();r&&(e.i.autoplay=!1,t=e.h.load(r,n));var h={};for(n=A(z0),i=n.next();!i.done;i=n.next())i=i.value,h[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var v=A(z0),S=v.next();!S.done;S=v.next())S=S.value,e.i[S]=h[S];for(v=A(Y2),S=v.next();!S.done;S=v.next()){var T=S.value;S=T[1],T=e.g.get("player",T[0])(),e.h[S](T)}e.h.zh(f),c&&e.h.hg(c.language,c.roles,c.forced),e.i.autoplay=l,r&&e.i.play()}},function(v){v=new Map().set("detail",v),v=new Ie("error",v),e.h.dispatchEvent(v)})}function RC(e,t){if(t=="addEventListener")return function(i,r,l){return e.l.addEventListener(i,r,l)};if(t=="removeEventListener")return function(i,r,l){return e.l.removeEventListener(i,r,l)};if(e.g.qb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.qb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function NC(e,t){if(e.A.has(t)&&(t=e.A.get(t)),t=="addEventListener")return function(n,i,r){return e.o.addEventListener(n,i,r)};if(t=="removeEventListener")return function(n,i,r){return e.o.removeEventListener(n,i,r)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.xb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Pg()};if(t=="setVideoContainer")return function(n){return e.h.Ch(n)};if(e.g.qb()){if(t=="getManifest"||t=="drmInfo")return function(){return Et(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return Et(t+"() does not work while casting!"),Promise.resolve()}}return e.g.qb()&&Object.keys(e.g.g.video).length==0&&(F0.has(t)||X0.has(t))||!e.g.qb()?e.h[t].bind(e.h):e.g.get("player",t)}function iT(e,t,n){e.g.qb()&&(t=="video"?e.l.dispatchEvent(n):t=="player"&&e.o.dispatchEvent(n))}Me("shaka.cast.CastProxy",Hn),Hn.prototype.changeReceiverId=Hn.prototype.Yh,Hn.prototype.forceDisconnect=Hn.prototype.Pc,Hn.prototype.suggestDisconnect=Hn.prototype.Ej,Hn.prototype.setAppData=Hn.prototype.ig,Hn.prototype.cast=Hn.prototype.cast,Hn.prototype.receiverName=Hn.prototype.ag,Hn.prototype.isCasting=Hn.prototype.qb,Hn.prototype.canCast=Hn.prototype.Xh,Hn.prototype.getPlayer=Hn.prototype.If,Hn.prototype.getVideo=Hn.prototype.Li,Hn.prototype.destroy=Hn.prototype.destroy;function Mi(e,t,n,i){Nt.call(this);var r=this;this.g=e,this.h=t,this.j=new yt,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(l){return l},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.u=this.l=null,this.C=new ct(function(){J0(r)}),PC(this)}nt(Mi,Nt),y=Mi.prototype,y.isConnected=function(){return this.G},y.Si=function(){return this.o},y.Bj=function(e){this.i=e},y.bi=function(){this.i=null},y.Cj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},y.Aj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},y.zj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},y.destroy=function(){var e=this,t,n;return G(function(i){if(i.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.h&&(t.push(e.h.destroy()),e.h=null),e.C&&(e.C.stop(),e.C=null),e.g=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.u=null,Nt.prototype.release.call(e),L(i,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),ce(i)})};function PC(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return rT(e)},t.onSenderDisconnected=function(){return rT(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&Da(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),Da(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(r){return UC(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return _C(e,r)},t.start(),t=A(z2);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(r){return oT(e,"video",r)});for(var i in Uc)e.j.D(e.h,Uc[i],function(r){return oT(e,"player",r)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,np(e)}),e.j.D(e.g,"playing",function(){e.o=!1,np(e)}),e.j.D(e.g,"pause",function(){np(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,np(e)}),e.j.D(e.g,"ended",function(){new ct(function(){e.g&&e.g.ended&&(e.o=!0,np(e))}).da(BC)})}function rT(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,np(e)}function np(e){var t;G(function(n){if(n.g==1)return L(n,Promise.resolve(),2);if(!e.h)return n.return();t=new Ie("caststatuschanged"),e.dispatchEvent(t),lT(e)||Oa(e),ce(n)})}function LC(e,t,n){var i,r,l,c,f,h,v,S,T,b;G(function(I){switch(I.g){case 1:for(i in t.player)r=t.player[i],e.h[i](r);return e.F(n),l=e.g.autoplay,t.manifest?(e.g.autoplay=!1,ye(I,5),L(I,e.h.load(t.manifest,t.startTime),7)):L(I,Promise.resolve(),3);case 7:Le(I,3);break;case 5:return c=De(I),f=new Map().set("detail",c),h=new Ie("error",f),e.h&&e.h.dispatchEvent(h),I.return();case 3:if(!e.h)return I.return();for(v in t.video)S=t.video[v],e.g[v]=S;for(T in t.playerAfterLoad)b=t.playerAfterLoad[T],e.h[T](b);e.g.autoplay=l,t.manifest&&(e.g.play(),Oa(e)),ce(I)}})}function oT(e,t,n){e.h&&(J0(e),Da(e,{type:"event",targetName:t,event:n},e.l))}function J0(e){e.C.da(jC);for(var t={video:{},player:{}},n=A(AC),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];e.h.U()&&F2.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.h[l]())}),F0.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.h[l]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Da(e,{type:"update",update:t},e.l),X0.forEach(function(r,l){e.m%r==0&&(r={player:{}},r.player[l]=e.h[l](),Da(e,{type:"update",update:r},e.l))}),e.B&&(e.m+=1),lT(e)}function lT(e){return e.A&&(e.g.duration||e.h.U())?(Z0(e),e.A=!1,!0):!1}function Z0(e,t){var n={contentId:e.h.Qc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Oa(e,t===void 0?0:t,n)}function _C(e,t){var n=G0(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,LC(e,n.initState,n.appData),J0(e);break;case"appData":e.F(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,i=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),r=="volume"){t.setSystemVolumeLevel(n);break}else if(r=="muted"){t.setSystemVolumeMuted(n);break}}e.H[i][r]=n;break;case"call":i=e.H[n.targetName],i[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,i=="player"&&r=="load"&&(e.m=0,e.B=!1);var l=n.id,c=t.senderId;t=e.H[i],n=t[r].apply(t,n.args),i=="player"&&r=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(){return uT(e,c,l,null)},function(f){return uT(e,c,l,f)})}}function UC(e,t){var n=G0(t.data);switch(n.type){case"PLAY":e.g.play(),Oa(e);break;case"PAUSE":e.g.pause(),Oa(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;t!=null&&(e.g.currentTime=Number(t)),i&&i=="PLAYBACK_START"?(e.g.play(),Oa(e)):i&&i=="PLAYBACK_PAUSE"&&(e.g.pause(),Oa(e));break;case"STOP":e.h.kc().then(function(){e.h&&Oa(e)});break;case"GET_STATUS":Z0(e,Number(n.requestId));break;case"VOLUME":i=n.volume,t=i.level,i=i.muted;var r=e.g.volume,l=e.g.muted;t!=null&&(e.g.volume=Number(t)),i!=null&&(e.g.muted=i),r==e.g.volume&&l==e.g.muted||Oa(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),l=n.autoplay||!0,e.F(t.customData),l&&(e.g.autoplay=!0),e.h.load(r,i).then(function(){e.h&&Z0(e)}).catch(function(c){var f="LOAD_FAILED";c.category==7&&c.code==7e3&&(f="LOAD_CANCELLED"),Da(e,{requestId:Number(n.requestId),type:f},e.u)});break;default:Da(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function uT(e,t,n,i){e.h&&Da(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function Da(e,t,n,i){e.G&&(e=G2(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Oa(e,t,n){n=n===void 0?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?VC:e.h.Of()?KC:e.g.paused?qC:HC,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),Da(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}Me("shaka.cast.CastReceiver",Mi),Mi.prototype.destroy=Mi.prototype.destroy,Mi.prototype.setContentArtist=Mi.prototype.zj,Mi.prototype.setContentImage=Mi.prototype.Aj,Mi.prototype.setContentTitle=Mi.prototype.Cj,Mi.prototype.clearContentMetadata=Mi.prototype.bi,Mi.prototype.setContentMetadata=Mi.prototype.Bj,Mi.prototype.isIdle=Mi.prototype.Si,Mi.prototype.isConnected=Mi.prototype.isConnected;var jC=.5,BC=5,VC="IDLE",HC="PLAYING",KC="BUFFERING",qC="PAUSED";function aT(e,t,n,i,r){if(i>=r)return null;for(var l=-1,c=-1,f=0;f<n.length;f++)if(n[f].some(function(z){return z!=null&&z.g.trim()!=""})){l=f;break}for(f=n.length-1;0<=f;f--)if(n[f].some(function(z){return z!=null&&z.g.trim()!=""})){c=f;break}if(l===-1||c===-1)return null;for(var h=f=!1,v="white",S="black",T=$0(i,r,f,h,v,S);l<=c;l++){for(var b=n[l],I=-1,O=-1,P=0;P<b.length;P++)if(b[P]!=null&&b[P].g.trim()!==""){I=P;break}for(P=b.length-1;0<=P;P--)if(b[P]!=null&&b[P].g.trim()!==""){O=P;break}if(I===-1||O===-1)b=sT(i,r),e.nestedCues.push(b);else{for(;I<=O;I++)if(P=b[I]){var N=P.l,_=P.i,B=P.j,F=P.h;(N!=f||_!=h||B!=v||F!=S)&&(T.payload&&e.nestedCues.push(T),T=$0(i,r,N,_,B,F),f=N,h=_,v=B,S=F),T.payload+=P.g}else T.payload+=" ";T.payload&&e.nestedCues.push(T),l!==c&&(T=sT(i,r),e.nestedCues.push(T)),T=$0(i,r,f,h,v,S)}}return e.nestedCues.length?{cue:e,stream:t}:null}function $0(e,t,n,i,r,l){return e=new Ft(e,t,""),n&&e.textDecoration.push(_o),i&&(e.fontStyle=ss),e.color=r,e.backgroundColor=l,e}function sT(e,t){return e=new Ft(e,t,""),e.lineBreak=!0,e}function cT(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function e1(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.A=null,hy(this)}function Kv(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new Ft(t,n,"");r.lineInterpretation=1;var l=pT.get(e.g);return l&&(r.line=l),e.u!=null&&e.A!=null&&(r.position=10+Math.min(70,10*e.u)+2.5*e.A),(t=aT(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(l=pT.get(e.g+3-t.cue.nestedCues.length))&&(r.line=l),t}function hy(e){ka(e,0,15),e.g=1}function ip(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=dT.has(n)?dT.get(n):String.fromCharCode(n);break;case 1:i=GC.get(n);break;case 2:e.i[e.g].pop(),i=zC.get(n);break;case 3:e.i[e.g].pop(),i=FC.get(n)}i&&e.i[e.g].push(new cT(i,e.m,e.j,e.o,e.l))}}function fT(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(l){return l});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(l){return l})}function ka(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var dT=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),GC=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),zC=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,"»"]]),FC=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,"┘"]]),pT=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 qv(e,t){this.h=0,this.o=new e1(e,t),this.i=new e1(e,t),this.g=this.j=new e1(e,t),this.l=0,this.m=null}function t1(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==3&&e.h!==4&&(r=Kv(i,e.l,n),n=e.i,n.g=0<n.h?n.h:0,ka(n,0,15),n=e.j,n.g=0<n.h?n.h:0,ka(n,0,15),i.g=15),e.h=3,i.h=t,r}function hT(e){e.h=1,e.g=e.j,e.g.h=0}function yT(e){ko("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var XC="black green blue cyan red yellow magenta black".split(" "),gT="white green blue cyan red yellow magenta white_italics".split(" ");function n1(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.u="black",i1(this)}function i1(e){e.i=[];for(var t=0;16>t;t++)e.i.push(r1())}function r1(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function rc(e,t){vT(e)&&(e.i[e.h][e.g]=new cT(t,e.C,e.A,e.u,e.B),e.g++)}function vT(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}n1.prototype.isVisible=function(){return this.l};function YC(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=r1()}function Df(e,t,n){var i=new Ft(e.j,t,"");i.textAlign=e.F===0?"left":e.F===1?"right":zi;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?qi: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=aT(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}n1.prototype.display=function(){this.l=!0};function WC(){this.i=[],this.h=null,this.g=0}function QC(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new yy(e.h)),e.h=null,e.g=0))}function yy(e){this.g=0,this.h=e}yy.prototype.ta=function(){return this.g<this.h.length},yy.prototype.Ba=function(){return this.g};function Jn(e){if(!e.ta())throw new Y(2,2,3e3);return e.h[e.g++]}yy.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Y(2,2,3e3);this.g+=e},yy.prototype.qh=function(e){if(0>this.g-e)throw new Y(2,2,3e3);this.g-=e};function JC(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function ZC(e,t,n,i){if(!e.g)return[];if(n==24)return n=Jn(t).value,i=Jn(t).value,n=function(l){return l.map(function(c){return("0"+(c&255).toString(16)).slice(-2)}).join("")}([n,i]),rc(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!vT(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=Df(t,i,e.i)),t.h+1>=t.o?YC(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=Df(t,i,e.i)),t.i[t.h]=r1(),t.g=0;break;case 12:t.isVisible()&&(r=Df(t,i,e.i)),i1(t),t.h=0,t.g=0}return r?[r]:[]}function $C(e,t,n,i){if(128<=n&&135>=n)i=n&7,e.h[i]&&(e.g=e.h[i]);else{if(n===136){n=Jn(t).value,t=[],n=A(gy(e,n));for(var r=n.next();!r.done;r=n.next()){if(r=e.h[r.value],r.isVisible()){var l=Df(r,i,e.i);l&&t.push(l)}i1(r)}return t}if(n===137)for(t=Jn(t).value,t=A(gy(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=i),n.display();else{if(n===138){for(n=Jn(t).value,t=null,n=A(gy(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()&&(t=Df(r,i,e.i)),r.l=!1;return t?[t]:[]}if(n===139){for(n=Jn(t).value,t=null,n=A(gy(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()?t=Df(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(n===140)return t=Jn(t).value,mT(e,t,i);if(n===143)return i=mT(e,255,i),ST(e),i;if(n===144)t.skip(1),i=Jn(t).value,e.g&&(e.g.A=0<(i&128),e.g.C=0<(i&64));else if(n===145)i=Jn(t).value,n=Jn(t).value,t.skip(1),e.g&&(t=TT((n&48)>>4,(n&12)>>2,n&3),e.g.B=TT((i&48)>>4,(i&12)>>2,i&3),e.g.u=t);else if(n===146)i=Jn(t).value,t=Jn(t).value,e.g&&(e=e.g,e.h=i&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),i=Jn(t).value,t.skip(1),e.g&&(e.g.F=i&3);else if(152<=n&&159>=n){n=(n&15)-8,r=e.h[n]!==null,r||(l=new n1(n,e.i),l.j=i,e.h[n]=l),i=Jn(t).value,l=Jn(t).value;var c=Jn(t).value,f=Jn(t).value,h=Jn(t).value;t=Jn(t).value,r&&(t&7)===0||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.u="black"),t=e.h[n],t.l=0<(i&32),t.L=l&127,t.H=c,t.G=(f&240)>>4,t.K=0<(l&128),t.o=(f&15)+1,t.m=(h&63)+1,e.g=e.h[n]}}}return[]}function gy(e,t){for(var n=[],i=0;8>i;i++)(t&1)===1&&e.h[i]&&n.push(i),t>>=1;return n}function mT(e,t,n){var i=[];t=A(gy(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=e.h[r];l.isVisible()&&(l=Df(l,n,e.i))&&i.push(l),e.h[r]=null}return i}function ST(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function TT(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],n=i[n],eb[e<<2|t<<1|n]}var wT=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,"┌"]]),eb="black blue green cyan red magenta yellow white".split(" ");function rp(){this.h=[],this.g=[],this.i=new WC,this.l=0,this.m=new Map([["CC1",new qv(0,0)],["CC2",new qv(0,1)],["CC3",new qv(1,0)],["CC4",new qv(1,1)]]),this.u=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,o1(this)}rp.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,o1(this),e=A(this.j.values());for(var t=e.next();!t.done;t=e.next())ST(t.value)};function o1(e){e.o=0,e.u=0;for(var t=A(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,hy(n.i),hy(n.j),hy(n.o);e.B=!0}rp.prototype.extract=function(e,t){if(this.B){for(var n=A(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(e=new Yt(e,0),!(8>e.getLength())&&e.X()===181&&e.na()===49&&e.S()===1195456820&&e.X()===3&&(n=e.X(),(n&64)!==0))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.X(),l=(r&4)>>2,c=e.X(),f=e.X();l&&(r&=3,r===0||r===1?this.h.push({pts:t,type:r,mb:c,Mb:f,order:this.h.length}):(this.g.push({pts:t,type:r,value:c,order:this.g.length}),this.g.push({pts:t,type:2,value:f,order:this.g.length})))}},rp.prototype.decode=function(){function e(r,l){return r.pts-l.pts||r.order-l.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=A(this.h),i=n.next();!i.done;i=n.next())(i=tb(this,i.value))&&t.push(i);for(n=A(this.g),i=n.next();!i.done;i=n.next())QC(this.i,i.value);for(n=A(this.i.i),i=n.next();!i.done;i=n.next())i=nb(this,i.value),t.push.apply(t,te(i));return this.i.i=[],this.h=[],this.g=[],t};function tb(e,t){var n=t.type;if((t.mb&112)===16){var i=t.mb>>3&1;n===0?e.o=i:e.u=i}if(i="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(i),t.mb===255&&t.Mb===255||!t.mb&&!t.Mb||!xT(t.mb)||!xT(t.Mb))return 45<=++e.l&&o1(e),null;e.l=0,t.mb&=127,t.Mb&=127;var r=t.mb;if(1<=r&&15>=r||!t.mb&&!t.Mb)return null;if(r=null,(t.mb&112)===16)e:{if(e.A.add(i),i=t.mb,e=t.Mb,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(i&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(i&7)<<1|e>>5&1],i="white",r=!1;var l=null,c=95<e?e-96:e-64;13>=c?i=gT[Math.floor(c/2)]:15>=c?r=!0:l=Math.floor((c-16)/2),e=(e&1)===1,n.h!==4&&(c=n.g,n.h===3&&t!==c.g&&(n=1+t-c.h,fT(c,n,1+c.g-c.h,c.h),ka(c,0,n-1),ka(c,t+1,15-t)),c.g=t,c.m=e,c.j=r,c.l=i,c.u=l,c.o="black")}else if((i&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",ip(n.g,0,32),i=!1,t=gT[(e&14)>>1],t==="white_italics"&&(t="white",i=!0),n.g.m=(e&1)===1,n.g.j=i,n.g.l=t;else if((i&247)===16&&(e&240)===32||(i&247)===23&&(e&255)===45)t="black",(i&7)===0&&(t=XC[(e&14)>>1]),n.g.o=t;else if((i&247)===17&&(e&240)===48)ip(n.g,1,e);else if((i&246)===18&&(e&224)===32)ip(n.g,i&1?3:2,e);else{if((i&246)===20&&(e&240)===32){switch(e=t.pts,i=null,t.Mb){case 32:hT(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:i=t1(n,2,e);break;case 38:i=t1(n,3,e);break;case 39:i=t1(n,4,e);break;case 40:ip(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:hy(n.o),yT(n);break;case 43:yT(n);break;case 44:t=n.i,i=null,n.h!==4&&(i=Kv(t,n.l,e)),ka(t,0,15);break;case 45:t=n.g,n.h!==3?i=null:(i=Kv(t,n.l,e),r=t.g-t.h+1,fT(t,r-1,r,t.h),ka(t,0,r-1),ka(t,t.g,15-t.g),n.l=e);break;case 46:ka(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=Kv(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,hT(n),n.l=e,i=t}r=i;break e}(i==23||i==31)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.Mb,ip(n.g,0,t.mb),ip(n.g,0,e);return r}function nb(e,t){var n=[];try{for(;t.ta();){var i=Jn(t).value,r=(i&224)>>5,l=i&31;if(r===7&&l!=0&&(r=Jn(t).value&63),r!=0){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new JC(r));for(var c=e.j.get(r),f=t.Ba();t.Ba()-f<l;){r=c;var h=t,v=Jn(h),S=v.value,T=v.pts;if(S===16){var b=Jn(h);S=S<<16|b.value}if(0<=S&&31>=S)var I=ZC(r,h,S,T);else if(128<=S&&159>=S)I=$C(r,h,S,T);else{if(4096<=S&&4127>=S)r=h,h=S&255,8<=h&&15>=h?r.skip(1):16<=h&&23>=h?r.skip(2):24<=h&&31>=h&&r.skip(3);else if(4224<=S&&4255>=S)r=h,h=S&255,128<=h&&135>=h?r.skip(4):136<=h&&143>=h&&r.skip(5);else if(32<=S&&127>=S)h=S,r.g&&(h===127?rc(r.g,"♪"):rc(r.g,String.fromCharCode(h)));else if(160<=S&&255>=S)r.g&&rc(r.g,String.fromCharCode(S));else if(4128<=S&&4223>=S){if(h=S&255,r.g)if(wT.has(h)){var O=wT.get(h);rc(r.g,O)}else rc(r.g,"_")}else 4256<=S&&4351>=S&&r.g&&((S&255)!=160?rc(r.g,"_"):rc(r.g,"[CC]"));I=[]}n.push.apply(n,te(I))}}}}catch(P){if(P instanceof Y&&P.code===3e3)ko("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw P}return n}function xT(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}rp.prototype.getStreams=function(){return Array.from(this.A)},Me("shaka.cea.CeaDecoder",rp),$a=function(){return new rp};function ET(e){for(var t=[],n=e,i=e=0;i<n.length;)e==2&&n[i]==3?(e=0,n=[].concat(te(n)),n.splice(i,1),n=new Uint8Array(n)):n[i]==0?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;e[i]==255;)n+=255,i++;n+=e[i++];for(var r=0;e[i]==255;)r+=255,i++;r+=e[i++],n==4&&t.push(e.subarray(i,i+r)),i+=r}return t}function Gv(){this.j=new Map,this.i=this.h=0,this.g=l1}Gv.prototype.init=function(e){function t(l){l=l.name,zv.has(l)&&(n.g=zv.get(l))}var n=this,i=[],r=[];if(new Pt().box("moov",Ze).box("mvex",Ze).R("trex",function(l){var c=l.reader;c.skip(4),c.skip(4),l=c.S(),c=c.S(),n.h=l,n.i=c}).box("trak",Ze).R("tkhd",function(l){var c=l.reader;l=l.version,l==1?(c.skip(8),c.skip(8)):(c.skip(4),c.skip(4));var f=c.S();l==1?c.skip(8):c.skip(4),c.skip(4),c.skip(8),c.skip(2),c.skip(2),c.skip(2),c.skip(2),c.skip(36),c.na(),c.na(),c.na(),c.na(),i.push(f)}).box("mdia",Ze).R("mdhd",function(l){l=zc(l.reader,l.version),r.push(l.timescale)}).box("minf",Ze).box("stbl",Ze).R("stsd",An).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",Oi).box("sinf",Ze).box("frma",function(l){l=Sh(l.reader).codec,zv.has(l)&&(n.g=zv.get(l))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new Y(2,2,2010);this.g==l1&&Et("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(l,c){n.j.set(l,r[c])})},Gv.prototype.parse=function(e){var t=this;if(this.g==l1)return[];var n=[],i=0,r=[];return new Pt().box("moof",function(l){i=l.start,r=[],Ze(l)}).box("traf",function(l){r.push({baseMediaDecodeTime:null,ld:t.h,md:t.i,lh:[],timescale:9e4}),Ze(l)}).R("trun",function(l){var c=r[r.length-1];l=Fc(l.reader,l.version,l.flags),c.lh.push(l)}).R("tfhd",function(l){var c=r[r.length-1];l=cu(l.reader,l.flags),c.ld=l.ld||t.h,c.md=l.md||t.i,l=l.trackId,t.j.has(l)&&(c.timescale=t.j.get(l))}).R("tfdt",function(l){var c=r[r.length-1];l=na(l.reader,l.version),c.baseMediaDecodeTime=l.baseMediaDecodeTime}).box("mdat",function(l){for(var c=i-l.start-8,f=l.reader.Ba(),h=A(r),v=h.next();!v.done;v=h.next()){if(v=v.value,v.baseMediaDecodeTime===null)throw Et("Unable to find base media decode time for CEA captions!"),new Y(2,2,2010);l.reader.seek(f),ib(t,l.reader,v.baseMediaDecodeTime,v.timescale,v.ld,v.md,c,v.lh,n)}}).parse(e,!1),n};function ib(e,t,n,i,r,l,c,f,h){var v=0,S=l,T=f.map(function(O){return O.fg});for(T=[].concat.apply([],te(T)),T.length&&(S=T[0].sampleSize||l),t.skip(c+f[0].nf);t.ta();){c=t.S();var b=t.X(),I=null;switch(I=!1,f=1,e.g){case vy:I=b&31,I=I==6;break;case my:f=2,t.skip(1),I=b>>1&63,I=I==39||I==40;break;case Sy:f=2,t.skip(1),I=b>>1&63,I=I==23||I==24;break;default:return}if(I)for(b=0,v<T.length&&(b=T[v].ye||0),b=(n+b)/i,f=A(ET(t.Cb(c-f))),I=f.next();!I.done;I=f.next())h.push({packet:I.value,pts:b});else try{t.skip(c-f)}catch{break}S-=c+4,S==0&&(n=v<T.length?n+(T[v].gg||r):n+r,v++,v<T.length?S=T[v].sampleSize||l:S=l)}}Me("shaka.cea.Mp4CeaParser",Gv);var l1=0,vy=1,my=2,Sy=3,zv=new Map().set("avc1",vy).set("avc3",vy).set("dvav",vy).set("dva1",vy).set("hev1",my).set("hvc1",my).set("dvh1",my).set("dvhe",my).set("vvc1",Sy).set("vvi1",Sy).set("dvc1",Sy).set("dvi1",Sy);Ec("video/mp4",function(){return new Gv});function Fv(){this.g=null}Fv.prototype.init=function(){},Fv.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Wt;var t=[];if(e=Je(e),!Rs(e))return t;e=this.g.parse(e);var n=e.od(),i=e.be();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=A(i),i=n.next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&i.time!=null)for(var r=A(ET(i.data)),l=r.next();!l.done;l=r.next())t.push({packet:l.value,pts:i.time});return t},Me("shaka.cea.TsCeaParser",Fv),Ec("video/mp2t",function(){return new Fv});function rb(e){var t=0,n=Ti(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,(r&1)!=0||r+e>n.byteLength){n=[];break e}var l=Je(n,e,r);t.push({type:i,value:l}),e+=r}n=t}return n}function AT(e){return e=Hi(Cn(e)),e=rb(e).filter(function(t){return t.type===ob})[0],e?(e=cl(e.value,!0),(e=Bu(e,"WRMHEADER"))?e:null):null}function Xv(e){try{var t=AT(e);if(t)e:{for(var n=A(Nr(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var l=A(r.children),c=l.next();!c.done;c=l.next()){var f=c.value;if(f.tagName=="LA_URL"){var h=Cn(f);break e}}}h=""}else h="";return h}catch{return""}}var ob=1;function CT(e,t,n){var i=ab(e),r=null;e=[];var l=[],c=null,f=new Set(i.map(function(v){return v.keyId}));f.delete(null);var h="cenc";if(1<f.size)throw new Y(2,4,4010);if(!t){if(l=i.filter(function(v){return v.cd=="urn:mpeg:dash:sea:2012"}),1<l.length)throw new Y(2,4,4050);l.length&&(c=cb(l[0])),(l=i.find(function(v){return v.cd=="urn:mpeg:dash:mp4protection:2011"}))&&l.encryptionScheme&&(h=l.encryptionScheme),l=i.filter(function(v){return v.cd=="urn:mpeg:dash:mp4protection:2011"?(r=v.init||r,!1):v.cd!="urn:mpeg:dash:sea:2012"}),l.length&&(e=ub(r,h,l,n,f),e.length==0&&(e=[Mr("",h,r)]))}if(i.length&&!c&&(t||!l.length))for(e=[],t=A(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(Mr(n,h,r));if(f=Array.from(f)[0]||null)for(h=A(e),t=h.next();!t.done;t=h.next())for(t=A(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=f;return{Jg:f,Pk:r,drmInfos:e,cf:c,Og:!0}}function lb(e,t,n,i){var r=CT(e,n,i);if(t.Og)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=r.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=r.drmInfos),t.Og=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(l){return r.drmInfos.some(function(c){return c.keySystem==l.keySystem})}),t.drmInfos.length==0))throw new Y(2,4,4008);return r.Jg||t.Jg}function Yv(e){var t=vr(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=Cn(t)))return t;if((t=vr(e.node,"urn:microsoft:playready","pro"))&&Cn(t))return Xv(t);if((e=vr(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=Cn(e))){t=Hi(e),e=8,t=Ti(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=Je(t,e+4),e=fl(e),e=Bu("<pro>"+e+"</pro>"),Xv(e)}return""}function ub(e,t,n,i,r){var l=[];n=A(n);for(var c=n.next();!c.done;c=n.next()){c=c.value;var f=i[c.cd];if(f){var h;if((h=vr(c.node,"urn:microsoft:playready","pro"))&&Cn(h)){h=Cn(h),h=Hi(h);var v=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Vc(h,v,new Set,0),initDataType:"cenc",keyId:c.keyId}]}else h=null;if(v=null,c.cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){v=c;var S=r;if(S.size==0)v=null;else{var T=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),b=new Uint8Array([]);v=[{initData:Vc(b,T,S,1),initDataType:"cenc",keyId:v.keyId}]}}h=Mr(f,t,c.init||e||h||v),(f=fb.get(f))&&(h.licenseServerUri=f(c)),l.push(h)}}return l}function ab(e){var t=[];e=A(e);for(var n=e.next();!n.done;n=e.next())(n=sb(n.value))&&t.push(n);return t}function sb(e){var t=e.attributes.schemeIdUri,n=hl(e,"urn:mpeg:cenc:2013","default_KID"),i=fg(e,"urn:mpeg:cenc:2013","pssh").map(Gi),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new Y(2,4,4009);var l=[];try{l=i.map(function(c){return{initDataType:"cenc",initData:Hi(c),keyId:null}})}catch{throw new Y(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<l.length?l:null,encryptionScheme:r}}function cb(e){if(!E.crypto||!E.crypto.subtle)throw Et("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var t=vr(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new Y(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new Y(2,4,4051);if(t=vr(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new Y(2,4,4051);if(e=t.attributes.IV,t=wi(t.attributes.keyUriTemplate),!e||!t)throw new Y(2,4,4051);if(e=Zl(e.substr(2)),e.byteLength!=16)throw new Y(2,4,4048);return{Xi:t,iv:e}}var fb=new Map().set("com.apple.fps",function(e){if(E.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4054);return(e=vr(e.node,"https://dashif.org/CPS","Laurl"))&&(e=Cn(e))?e:""}).set("com.widevine.alpha",function(e){var t=vr(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Cn(t))?t:(e=vr(e.node,"urn:microsoft","laurl"))&&wi(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",Yv).set("com.microsoft.playready.recommendation",Yv).set("com.microsoft.playready.software",Yv).set("com.microsoft.playready.hardware",Yv).set("org.w3.clearkey",function(e){var t=vr(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Cn(t))?t:(e=vr(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=Cn(e))?e:""});function Ty(e,t,n,i,r,l){var c=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",i).set("Bandwidth",r).set("Time",l);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(f,h,v,S){if(f=="$$")return"$";var T=c.get(h);if(T==null)return f;switch(h=="RepresentationID"&&v&&(v=void 0),h=="Time"&&typeof T!="bigint"&&(.2<=Math.abs(T-Math.round(T))&&Et("Calculated $Time$ values must be close to integers"),T=Math.round(T)),S){case void 0:case"d":case"i":case"u":f=T.toString();break;case"o":f=T.toString(8);break;case"x":f=T.toString(16);break;case"X":f=T.toString(16).toUpperCase();break;default:f=T.toString()}return v=E.parseInt(v,10)||1,Array(Math.max(0,v-f.length)+1).join("0")+f})}function bT(e,t){var n=il(e,t,"timescale"),i=1;n&&(i=gl(n)||1),n=il(e,t,"duration");var r=(n=gl(n||""))?n/i:null,l=il(e,t,"startNumber"),c=Number(il(e,t,"presentationTimeOffset"))||0,f=Qn(l||"");if((l==null||f==null)&&(f=1),l=null,t=op(e,t,"SegmentTimeline")){t=Mt(t,"S"),l=i,e=e.ha.duration||1/0;for(var h=f,v=[],S=-c,T=0;T<t.length;++T){var b=t[T],I=t[T+1],O=ze(b,"t",Qn),P=ze(b,"d",Qn),N=ze(b,"r",Wn);if(b=ze(b,"k",Wn)||0,O!=null&&(O-=c),P){if(O=O??S,N=N||0,0>N)if(I){if(I=ze(I,"t",Qn),I==null)break;if(O>=I)break;N=Math.ceil((I-O)/P)-1}else{if(e==1/0)break;if(O/l>=e)break;N=Math.ceil((e*l-O)/P)-1}for(0<v.length&&O!=S&&(v[v.length-1].end=O/l),I=0;I<=N;++I)S=O+P,v.push({start:O/l,end:S/l,xg:O,Jb:b,wj:v.length+h}),O=S}}l=v}return{timescale:i,He:n,Wa:r,Ld:f,hc:c/i||0,wg:c,timeline:l}}function IT(e,t){return[t(e.J),t(e.ga),t(e.qa)].filter(jo)}function il(e,t,n){t=IT(e,t),e=null,t=A(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function op(e,t,n){t=IT(e,t),e=null,t=A(t);for(var i=t.next();!i.done&&!(e=xn(i.value,n));i=t.next());return e}function db(e,t,n,i,r,l){for(var c=hl(e,"http://www.w3.org/1999/xlink","href"),f=hl(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",h=A(Object.keys(e.attributes)),v=h.next();!v.done;v=h.next()){v=v.value;var S=v.split(":"),T=Bp("http://www.w3.org/1999/xlink");S[0]==T&&delete e.attributes[v]}if(5<=l)return kl(new Y(2,4,4028));if(f!="onLoad")return kl(new Y(2,4,4027));var b=Pn([i],[c]);return r.request(0,un(b,t)).Ha(function(I){if(I=Ac(I.data,e.tagName),!I)return kl(new Y(2,4,4001,c));for(e.children=[];I.children.length;){var O=I.children.shift();e.children.push(O)}O=A(Object.keys(I.attributes));for(var P=O.next();!P.done;P=O.next())P=P.value,e.attributes[P]=I.attributes[P];return Wv(e,t,n,b[0],r,l+1)})}function Wv(e,t,n,i,r,l){if(l=l===void 0?0:l,hl(e,"http://www.w3.org/1999/xlink","href")){var c=db(e,t,n,i,r,l);return n&&(c=c.Ha(void 0,function(){return Wv(e,t,n,i,r,l)})),c}c=[];for(var f=A(os(e)),h=f.next(),v={};!h.done;v={hd:void 0},h=f.next())v.hd=h.value,hl(v.hd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(S){return function(T){return T!==S.hd}}(v)):v.hd.tagName!="SegmentTimeline"&&c.push(Wv(v.hd,t,n,i,r,l));return od(c).Ha(function(){return e})}function pb(e,t,n,i,r,l,c){var f,h=new Pt().R("sidx",function(v){f=hb(t,i,r,l,c,n,v)});if(e&&h.parse(e),f)return f;throw new Y(2,3,3004)}function hb(e,t,n,i,r,l,c){var f=[];c.reader.skip(4);var h=c.reader.S();if(h==0)throw new Y(2,3,3005);if(c.version==0)var v=c.reader.S(),S=c.reader.S();else v=c.reader.bd(),S=c.reader.bd();c.reader.skip(2);var T=c.reader.na();for(e=e+c.size+S,S=0;S<T;S++){var b=c.reader.S(),I=(b&2147483648)>>>31;b&=2147483647;var O=c.reader.S();if(c.reader.skip(4),I==1)throw new Y(2,3,3006);f.push(new Ke(v/h+n,(v+O)/h+n,function(){return l},e,e+b-1,t,n,i,r)),v+=O,e+=b}return c.parser.stop(),f}function oc(e){this.h=Ti(e),this.g=new Yt(this.h,0)}oc.prototype.ta=function(){return this.g.ta()};function Ma(e){var t=DT(e);if(7<t.length)throw new Y(2,3,3002);var n=0;t=A(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=DT(e);e:{i=A(yb);for(var r=i.next();!r.done;r=i.next())if(ll(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ba();else{if(t.length==8&&t[1]&224)throw new Y(2,3,3001);for(r=i=0;r<t.length;r++){var l=t[r];i=r==0?l&(1<<8-t.length)-1:256*i+l}t=i}return t=e.g.Ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ba(),i=Ti(e.h,e.g.Ba(),t),e.g.skip(t),new gb(n,i)}function DT(e){var t=e.g.Ba(),n=e.g.X();if(n==0)throw new Y(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Je(e.h,t,n)}var yb=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function gb(e,t){this.id=e,this.g=t}function u1(e){if(8<e.g.byteLength)throw new Y(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new Y(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var i=e.g.getUint8(n);t=256*t+i}return t}function vb(e,t,n,i,r,l,c,f,h){function v(){return r}var S=[];e=new oc(e.g);for(var T=null,b=null;e.ta();){var I=Ma(e);if(I.id==187){var O=mb(I);O&&(I=n*O.Jj,O=t+O.nj,T!=null&&S.push(new Ke(T+c,I+c,v,b,O-1,l,c,f,h)),T=I,b=O)}}return T!=null&&S.push(new Ke(T+c,i+c,v,b,null,l,c,f,h)),S}function mb(e){var t=new oc(e.g);if(e=Ma(t),e.id!=179)throw new Y(2,3,3013);if(e=u1(e),t=Ma(t),t.id!=183)throw new Y(2,3,3012);t=new oc(t.g);for(var n=0;t.ta();){var i=Ma(t);if(i.id==241){n=u1(i);break}}return{Jj:e,nj:n}}function OT(e,t,n){if(t=op(e,t,"Initialization"),!t)return null;var i=e.J.Ua(),r=t.attributes.sourceURL;r&&(i=Pn(i,[wi(r)],e.vb())),r=0;var l=null;return(t=ze(t,"range",tu))&&(r=t.start,l=t.end),n=new Ei(function(){return i},r,l,NT(e),null,null,n,e.ga.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ha&&(n.g=e.ha.start+e.ha.duration),n}function Sb(e,t,n){var i=Number(il(e,lp,"presentationTimeOffset"))||0,r=il(e,lp,"timescale"),l=1;r&&(l=gl(r)||1);var c=i/l||0,f=OT(e,lp,n);Tb(e,f);var h=ju(e);return{rc:function(){var v=op(h,lp,"RepresentationIndex"),S=h.J.Ua();return v&&(v=wi(v.attributes.sourceURL))&&(S=Pn(S,[v],h.vb())),v=MT(h),kT(h,t,f,S,v.start,v.end,c)}}}function kT(e,t,n,i,r,l,c){var f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W;return G(function(Q){if(Q.g==1)return f=e.presentationTimeline,h=!e.Ob||!e.ha.$g,v=e.ha.start,S=e.ha.duration,T=e.J.mimeType.split("/")[1],b=t,I=null,O=[b(i,r,l,!1),T=="webm"?b(n.N(),n.Sa,n.wa,!0):null],b=null,L(Q,Promise.all(O),2);if(P=Q.h,N=P[0],_=P[1]||null,B=null,F=v-c,z=v,J=S?v+S:1/0,T=="mp4")var ie=pb(N,r,i,n,F,z,J);else{ie=N;var Z=new oc(_);if(Ma(Z).id!=440786851)throw new Y(2,3,3008);var ne=Ma(Z);if(ne.id!=408125543)throw new Y(2,3,3009);Z=ne.g.byteOffset,ne=new oc(ne.g);for(var re=null;ne.ta();){var ue=Ma(ne);if(ue.id==357149030){re=ue;break}}if(!re)throw new Y(2,3,3010);for(re=new oc(re.g),ue=1e6,ne=null;re.ta();){var de=Ma(re);if(de.id==2807729)ue=u1(de);else if(de.id==17545)if(de.g.byteLength==4)ne=de.g.getFloat32(0);else if(de.g.byteLength==8)ne=de.g.getFloat64(0);else throw new Y(2,3,3003)}if(ne==null)throw new Y(2,3,3011);if(re=ue/1e9,ne*=re,ie=Ma(new oc(ie)),ie.id!=475249515)throw new Y(2,3,3007);ie=vb(ie,Z,re,ne,i,n,F,z,J)}for(B=ie,q=A(B),K=q.next();!K.done;K=q.next())W=K.value,W.codecs=e.J.codecs,W.mimeType=e.J.mimeType,W.bandwidth=e.bandwidth;return f.Ed(B),I=new Ct(B),h&&I.Oc(z,J,!0),Q.return(I)})}function lp(e){return e.dd}function MT(e){var t=op(e,lp,"RepresentationIndex");return e=il(e,lp,"indexRange"),e=tu(e||""),t&&(e=ze(t,"range",tu,e)),e}function Tb(e,t){if(RT(e,t),!MT(e))throw new Y(2,4,4002)}function RT(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=ot&&n!="mp4"&&n!="webm")throw new Y(2,4,4006);if(n=="webm"&&!t)throw new Y(2,4,4005)}function NT(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.oe,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function wb(e,t,n){var i=OT(e,PT,n),r=xb(e);if(!r.Wa&&!r.timeline&&1<r.Xc.length)throw new Y(2,4,4002);if(!r.Wa&&!e.ha.duration&&!r.timeline&&r.Xc.length==1)throw new Y(2,4,4002);if(r.timeline&&r.timeline.length==0)throw new Y(2,4,4002);var l=null,c=null;e.qa.id&&e.J.id&&(c=t.get(e.qa.id+","+e.J.id))&&(l=c.segmentIndex);var f=Eb(e.ha.start,e.ha.duration,e.J.Ua,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.vb);return t=!l,l?l.Bd(f,e.presentationTimeline.pb()):l=new Ct(f),e.presentationTimeline.Ed(f),e.Ob&&e.ha.$g||l.Oc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),c&&(c.segmentIndex=l),{rc:function(){return l&&l.getNumReferences()!=0||l.ke(f),Promise.resolve(l)}}}function PT(e){return e.Zb}function xb(e){var t=Ab(e);e=bT(e,PT);var n=e.Ld;n==0&&(n=1);var i=0;return e.Wa?i=e.Wa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{Wa:e.Wa,startTime:i,Ld:n,hc:e.hc,timeline:e.timeline,Xc:t}}function Eb(e,t,n,i,r,l,c,f,h,v){var S=i.Xc.length;i.timeline&&i.timeline.length!=i.Xc.length&&(S=Math.min(i.timeline.length,i.Xc.length));for(var T=e-i.hc,b=t?e+t:1/0,I=[],O=i.startTime,P={},N=0;N<S;P={Je:void 0,ze:void 0},N++){P.ze=i.Xc[N];var _=O;O=void 0,O=i.Wa!=null?_+i.Wa:i.timeline?i.timeline[N].end:_+t,P.Je=null,P=new Ke(e+_,e+O,function(B){return function(){return B.Je==null&&(B.Je=Pn(n(),[B.ze.cj],v())),B.Je}}(P),P.ze.start,P.ze.end,r,T,e,b,[],"",null,null,po,l),P.codecs=f,P.mimeType=c,P.bandwidth=h,I.push(P)}return I}function Ab(e){return[e.J.Zb,e.ga.Zb,e.qa.Zb].filter(jo).map(function(t){return Mt(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Lf&&(e.Lf=!0);var n=wi(t.attributes.media);return t=ze(t,"mediaRange",tu,{start:0,end:null}),{cj:n,start:t.start,end:t.end}})}function LT(e,t,n,i,r,l,c,f,h){h||e.J.de||(e.J.de=il(e,lc,"initialization"));var v=e.J.de?Db(e,c):null,S=Cb(e);bb(S);var T=ju(e);if(S.vd)return RT(e,v),{rc:function(){var P=Ty(S.vd,T.J.originalId,null,null,T.bandwidth||null,null);return P=Pn(T.J.Ua(),[P]),kT(T,t,v,P,0,null,S.hc)}};if(S.Wa)return i||e.ga.contentType==="image"||e.ga.contentType==="text"||(n=e.ha.start,i=e.qa.id,h=e.ha.duration,i=(i=i!=null&&l.get(i)||h)?n+i:1/0,e.presentationTimeline.Tf(S.Wa),e.presentationTimeline.jh(n,i)),{rc:function(){return Ib(T,S,r,v,l,c,f,e.J.Ae)}};var b=null;i=i=null,e.qa.id&&e.J.id&&(i=e.qa.id+","+e.J.id,i=n.get(i))&&(b=i.segmentIndex);var I=e.ha.start,O=e.ha.duration?I+e.ha.duration:1/0;return b?(n=b,_T(n,S,I,O,v),n.Oa(e.presentationTimeline.pb())):b=new Qv(S,e.J.originalId,e.bandwidth,e.J.Ua,e.vb,I,O,v,c,e.J.Ae),S.timeline&&e.ga.contentType!=="image"&&e.ga.contentType!=="text"&&e.presentationTimeline.kh(b.h?b.h.timeline:[],I),i&&e.Ob&&(i.segmentIndex=b),{rc:function(){return b instanceof Qv&&b.getNumReferences()==0&&_T(b,S,I,O,v),Promise.resolve(b)}}}function lc(e){return e.ic}function Cb(e){var t=bT(e,lc),n=il(e,lc,"media"),i=il(e,lc,"index"),r=il(e,lc,"k"),l=0;return r&&(l=parseInt(r,10)),{He:t.He,Wa:t.Wa,timescale:t.timescale,Ld:t.Ld,hc:t.hc,wg:t.wg,timeline:t.timeline,ec:n&&wi(n),vd:i,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,dj:l}}function bb(e){var t=e.vd?1:0;if(t+=e.timeline?1:0,t+=e.Wa?1:0,t==0)throw new Y(2,4,4002);if(t!=1&&(e.vd&&(e.timeline=null),e.He=null,e.Wa=null),!e.vd&&!e.ec)throw new Y(2,4,4002)}function Ib(e,t,n,i,r,l,c,f){function h(ne){var re=ne-N,ue=re*P,de=t.He,se=re*de;"BigInt"in E&&se>Number.MAX_SAFE_INTEGER&&(se=BigInt(re)*BigInt(de)),ue+=b,re=ue+P,de=Math.min(re,S());var we=[],be=t.dj;if(be)for(var Qe=(de-ue)/be,Be={},kt=0;kt<be;Be={Eh:void 0},kt++){var mt=ue+Qe*kt,st=mt+Qe;Be.Eh=kt+1,Be=new Ke(mt,st,function(pt){return function(){var Ot=Ty(_,F,ne,pt.Eh,B,se);return Pn(z(),[Ot],J())}}(Be),0,null,i,q,b,S(),[],"",null,null,po,l),Be.codecs=e.J.codecs,Be.mimeType=e.J.mimeType,f==0?0<kt&&Be.Vc():kt%f!=0&&Be.Vc(),we.push(Be)}return ue=new Ke(ue,de,function(){if(be)return[];var pt=Ty(_,F,ne,null,B,se);return Pn(z(),[pt],J())},0,null,i,q,b,S(),we,"",null,null,po,l,0<we.length),ue.codecs=e.J.codecs,ue.mimeType=e.J.mimeType,ue.bandwidth=e.bandwidth,ue.j=re,ue}function v(){var ne=[Math.max(T.pb(),b),Math.min(T.cc(),S())].map(function(re){return re-b});return ne=[Math.ceil(ne[0]/P),Math.ceil(ne[1]/P)-1],e.J.cb&&ne[1]++,ne.map(function(re){return re+N})}function S(){var ne=I!=null&&r.get(I)||O;return ne?b+ne:1/0}var T=e.presentationTimeline,b=e.ha.start,I=e.qa.id,O=e.ha.duration,P=t.Wa,N=t.Ld,_=t.ec,B=e.bandwidth||null,F=e.J.id,z=e.J.Ua,J=e.vb,q=b-t.hc,K=v();n=e.Ob?Math.max(K[0],K[1]-n+1):K[0],c=c||K[1],K=[];for(var W=n;W<=c;++W){var Q=h(W);K.push(Q)}var ie=new Ct(K);if(K=T.cc()<S(),W=T.U(),K||W){var Z=Math.max(n,c+1);n=P,e.J.cb&&(n=.1),ie.Ie(n,function(){var ne=T.pb();ie.Oa(ne);var re=A(v());re.next(),re=re.next().value;for(var ue=[];Z<=re;){var de=h(Z);ue.push(de),Z++}return ne>S()&&!ue.length?null:ue})}return Promise.resolve(ie)}function Db(e,t){var n=e.J.de;if(n||(n=il(e,lc,"initialization")),!n)return null;n=wi(n);var i=e.J.originalId,r=e.bandwidth||null,l=e.J.Ua,c=e.vb;return t=new Ei(function(){var f=Ty(n,i,null,null,r,null);return Pn(l(),[f],c())},0,null,NT(e),null,null,t,e.ga.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ha&&(t.g=e.ha.start+e.ha.duration),t}function Qv(e,t,n,i,r,l,c,f,h,v){Ct.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=i,this.H=r,this.j=l,this.l=c,this.u=f,this.A=h,this.G=v,a1(this)}nt(Qv,Ct),y=Qv.prototype,y.getNumReferences=function(){return this.h?this.h.timeline.length:0},y.release=function(){Ct.prototype.release.call(this),this.h=null},y.Oa=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function _T(e,t,n,i,r){if(Ob(e,r),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),n.length){var l=n[n.length-1];t=t.timeline.filter(function(c){return c.end>l.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,te(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;a1(e)}function Ob(e,t){if(e.u!==t){e.u=t,e=A(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&Eh(n,t)}}function a1(e){if(e.h&&!e.o){for(var t=[],n=A(e.h.timeline),i=n.next();!i.done;i=n.next())i=i.value,i.start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.Oa(e.j)}}y.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],l=r.start+this.j;if(r=i<n?t[i+1].start+this.j:this.l===1/0?r.end+this.j:this.l,e>=l&&e<r)return i+this.i}return null},y.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=this.h.timeline[e],r=i.wj,l=i.xg+this.h.wg;n=this.j-this.h.hc;var c=this.j+i.end,f=c;e===this.getNumReferences()-1&&this.l!==1/0&&(f=this.l);for(var h=this.h.codecs,v=this.h.mimeType,S=this.h.bandwidth,T=[],b=(i.end-i.start)/i.Jb,I={},O=0;O<i.Jb;I={Ke:void 0,Fh:void 0},O++){var P=i.start+b*O,N=P+b;I.Fh=O+1,I.Ke=null,I=new Ke(this.j+P,this.j+N,function(_){return function(){return t.h?(_.Ke==null&&(_.Ke=UT(t.h.ec,t.F,r,t.B,l,_.Fh,t.C,t.H)),_.Ke):[]}}(I),0,null,this.u,n,this.j,this.l,[],"",null,null,po,this.A),I.codecs=h,I.mimeType=v,I.bandwidth=S,this.G==0?0<O&&I.Vc():O%this.G!=0&&I.Vc(),T.push(I)}n=new Ke(this.j+i.start,f,function(){return 0<i.Jb||!t.h?[]:UT(t.h.ec,t.F,r,t.B,l,null,t.C,t.H)},0,null,this.u,n,this.j,this.l,T,"",null,null,po,this.A,0<i.Jb),n.codecs=h,n.mimeType=v,n.j=c,n.bandwidth=S,this.g[e]=n}return n},y.Eb=function(e){a1(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function UT(e,t,n,i,r,l,c,f){return e=Ty(e,t,n,l,i||null,r),Pn(c(),[e],f()).map(function(h){return h.toString()})}function up(e){this.o=null,this.A=e,this.G=new ao,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}up.prototype.configure=function(e){this.o=e},up.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},up.prototype.setManifestType=function(e){this.u=e};function wy(e,t){var n,i,r,l,c,f,h;return G(function(v){if(v.g==1)return n=Pn(e.i,[kb(e,t)]),i=un(n,e.o.retryParameters),r=e.A.networkingEngine.request(8,i),Ko(e.G,r),ye(v,2),L(v,r.promise,4);if(v.g!=2)return l=v.h,c=Zt(l.data),f=JSON.parse(c),f.VERSION==1&&Mb(e,f,l.uri),Le(v,0);if((h=De(v))&&h.code==7001)return v.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new ct(function(){wy(e,t)}),e.g.da(e.C),ce(v)})}function kb(e,t){if(!e.m.length)return t;t=new fn(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return e.u=="DASH"?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):e.u=="HLS"&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),ku(r)&&Jr(t,r),t.toString()}function Mb(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new ct(function(){wy(e,i)}),(n=t.TTL)&&(e.C=n),e.g.da(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function ap(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}up.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function xy(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var i=[],r=A(e.m),l=r.next(),c={};!l.done;c={Zc:void 0},l=r.next())if(c.Zc=l.value,l=t.get(c.Zc))i.push({Yf:c.Zc,location:l});else if(l=e.F.find(function(h){return function(v){return v.ek==h.Zc}}(c))){var f=t.get(l["BASE-ID"]);f&&(l["URI-REPLACEMENT"].Oh?(f=new fn(f),gc(f,l["URI-REPLACEMENT"].Oh),i.push({Yf:c.Zc,location:f.toString()})):i.push({Yf:c.Zc,location:f}))}for(r=Date.now(),c=A(e.j.keys()),l=c.next();!l.done;l=c.next())l=l.value,f=e.j.get(l),r>f&&e.j.delete(l);if(i=i.filter(function(h){for(var v=A(e.j.keys()),S=v.next();!S.done;S=v.next())if(S.value.includes(new fn(h.location).nb))return!1;return!0}),i.length&&(e.B=i[0].Yf),i=i.map(function(h){return h.location}),!i.length&&e.h)for(r=A(e.h.split(",")),c=r.next();!c.done;c=r.next())(c=t.get(c.value))&&(e.B=e.h,i.push(c));if(!i.length)for(t=A(t.values()),r=t.next();!r.done;r=t.next())i.push(r.value);return n?i:Pn(e.i,i)}function ji(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}y=ji.prototype,y.release=function(){for(var e=A(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},y.Ki=function(){return this.l},y.Jf=function(){return this.j.slice()},y.oi=function(){return this.i},y.Kg=function(e,t){if(e){if(e.type=="audio")for(var n=A(this.h),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="video")for(n=A(this.g),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(r){return r!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(r){return r!==e}));else if(e.type==ot)for(n=A(this.j),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="image")for(n=A(this.i),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function jT(e,t){var n=[],i=[],r=[],l=[];e=A(e);for(var c=e.next();!c.done;c=e.next()){var f=c.value;c=new Map(f.audioStreams.map(function(T){return[d1(T),T]}));var h=new Map(f.videoStreams.map(function(T){return[f1(T),T]})),v=new Map(f.textStreams.map(function(T){return[Cy(T),T]}));if(f=new Map(f.imageStreams.map(function(T){return[by(T),T]})),t){var S=GT(ot);v.set(Cy(S),S),S=GT("image"),f.set(by(S),S)}n.push(c),i.push(h),r.push(v),l.push(f)}return{Dg:n,Mh:i,Ih:r,Yg:l}}y.gf=function(e,t,n){n=n===void 0?!1:n;var i=this,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe;return G(function(Be){if(Be.g==1){if(r=wn,!t&&e.length==1)return l=jT(e,!1),c=l.Dg,f=l.Mh,h=l.Ih,v=l.Yg,i.h=Array.from(c[0].values()),i.g=Array.from(f[0].values()),i.j=Array.from(h[0].values()),i.i=Array.from(v[0].values()),Be.s(2);for(S=n?i.m.size:0,T=-1,b=0;b<e.length;b++)I=e[b],i.m.has(I.id)||(i.m.add(I.id),T==-1&&(T=b));return T==-1?Be.return():(O=jT(e,!0),P=O.Dg,N=O.Mh,_=O.Ih,B=O.Yg,L(Be,Promise.all([uc(i,i.h,P,T,sp,ac,S),uc(i,i.g,N,T,sp,ac,S),uc(i,i.j,_,T,sp,ac,S),uc(i,i.i,B,T,sp,ac,S)]),2))}if(F=0,z=[],i.g.length&&i.h.length)for(Z=A(i.h),ne=Z.next();!ne.done;ne=Z.next())for(re=ne.value,ue=A(i.g),de=ue.next();!de.done;de=ue.next())se=de.value,we=ti(re.drmInfos,se.drmInfos),re.drmInfos.length&&se.drmInfos.length&&!we.length||(be=(re.bandwidth||0)+(se.bandwidth||0),re.dependencyStream&&(be+=re.dependencyStream.bandwidth||0),se.dependencyStream&&(be+=se.dependencyStream.bandwidth||0),Qe=F++,z.push({id:Qe,language:re.language,disabledUntilTime:0,primary:re.primary,audio:re,video:se,bandwidth:be,drmInfos:we,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(J=i.g.length?i.g:i.h,q=A(J),K=q.next();!K.done;K=q.next())W=K.value,Q=F++,ie=W.bandwidth||0,W.dependencyStream&&(ie+=W.dependencyStream.bandwidth||0),z.push({id:Q,language:W.language,disabledUntilTime:0,primary:W.primary,audio:W.type==r.V?W:null,video:W.type==r.la?W:null,bandwidth:ie,drmInfos:W.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=z,ce(Be)})};function BT(e){var t,n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue;return G(function(de){switch(de.g){case 1:if(t=wn,e.length==1)return de.return(e[0]);for(n=e.map(function(se){return new Map(se.filter(function(we){return we.type===t.V}).map(function(we){return[d1(we),we]}))}),i=e.map(function(se){return new Map(se.filter(function(we){return we.type===t.la}).map(function(we){return[f1(we),we]}))}),r=e.map(function(se){return new Map(se.filter(function(we){return we.type===t.za}).map(function(we){return[Cy(we),we]}))}),l=e.map(function(se){return new Map(se.filter(function(we){return we.type===t.$e}).map(function(we){return[by(we),we]}))}),c=A(r),f=c.next();!f.done;f=c.next())h=f.value,v=qT(t.za),h.set(Cy(v),v);for(S=A(l),T=S.next();!T.done;T=S.next())b=T.value,I=qT(t.$e),b.set(by(I),I);return O=new ji,L(de,uc(O,[],n,0,Jv,Zv,0),2);case 2:return P=de.h,L(de,uc(O,[],i,0,Jv,Zv,0),3);case 3:return N=de.h,L(de,uc(O,[],r,0,Jv,Zv,0),4);case 4:return _=de.h,L(de,uc(O,[],l,0,Jv,Zv,0),5);case 5:if(B=de.h,F=0,N.length&&P.length)for(W=A(P),Q=W.next();!Q.done;Q=W.next())for(ie=Q.value,Z=A(N),ne=Z.next();!ne.done;ne=Z.next())re=ne.value,ue=F++,re.variantIds.push(ue),ie.variantIds.push(ue);else for(z=N.concat(P),J=A(z),q=J.next();!q.done;q=J.next())K=q.value,K.variantIds=[F++];return de.return(N.concat(P).concat(_).concat(B))}})}function uc(e,t,n,i,r,l,c){var f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q;return G(function(ie){switch(ie.g){case 1:for(f=[],h=0;h<n.length;h++)h>=i?f.push(new Set(n[h].values())):f.push(new Set);v=A(t),S=v.next();case 2:if(S.done){ie.s(4);break}return T=S.value,L(ie,Rb(e,T,n,i,l,f,c),5);case 5:if(b=ie.h,!b)throw new Y(2,4,4037);S=v.next(),ie.s(2);break;case 4:for(I=A(f),O=I.next();!O.done;O=I.next())for(P=O.value,N=A(P),_=N.next();!_.done;_=N.next())B=_.value,(F=Nb(e,B,n,r,l,f))&&t.push(F);for(z=A(f),J=z.next();!J.done;J=z.next())for(q=J.value,K=A(q),W=K.next(),Q={};!W.done;Q={ng:void 0},W=K.next())if(Q.ng=W.value,!c1(Q.ng)&&t.some(function(Z){return function(ne){return s1(e,Z.ng,ne)}}(Q)))throw new Y(2,4,4037);return ie.return(t)}})}function Rb(e,t,n,i,r,l,c){return G(function(f){return f.g==1?(KT(e,n,t,0<c),t.matchedStreams?t.segmentIndex?L(f,VT(t,i+c),2):f.s(2):f.return(!1)):(HT(t,i,r,l,c),f.return(!0))})}function VT(e,t){var n,i,r,l,c,f;return G(function(h){if(h.g==1){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)l=i[r],n.push(l.createSegmentIndex()),l.trickModeVideo&&!l.trickModeVideo.segmentIndex&&n.push(l.trickModeVideo.createSegmentIndex()),l.dependencyStream&&!l.dependencyStream.segmentIndex&&n.push(l.dependencyStream.createSegmentIndex());return L(h,Promise.all(n),2)}if(e.segmentIndex instanceof on)for(c=t;c<i.length;c++)f=i[c],f.segmentIndex&&e.segmentIndex.h.push(f.segmentIndex);ce(h)})}function Nb(e,t,n,i,r,l){if(c1(t))return null;var c=i(t);return KT(e,n,c),c.createSegmentIndex&&(c.createSegmentIndex=function(){return G(function(f){return c.segmentIndex?f.s(0):(c.segmentIndex=new on,L(f,VT(c,0),0))})}),!c.matchedStreams||!c.matchedStreams.length?null:(HT(c,0,r,l,0),c)}function HT(e,t,n,i,r){var l=e.matchedStreams;for(t+=r;t<l.length;t++){var c=l[t];n(e,c);var f=!0;if(e.type=="audio"&&Cl(e.language,c.language)==0&&(f=!1),f&&(i[t-r].delete(c),c.fullMimeTypes))for(c=A(c.fullMimeTypes.values()),f=c.next();!f.done;f=c.next())e.fullMimeTypes.add(f.value)}}function sp(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=A(t.matchedStreams),i=n.next();!i.done;i=n.next())i=i.value,i.segmentIndex&&(i.segmentIndex.release(),i.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function Jv(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function ac(e,t){function n(c,f){c||(c=[]),f=A(f);for(var h=f.next();!h.done;h=f.next())h=h.value,c.includes(h)||c.push(h);return c}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=A(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(e.originalId==null?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=ti(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new Y(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),i=A(t.closedCaptions),r=i.next();!r.done;r=i.next()){var l=A(r.value);r=l.next().value,l=l.next().value,e.closedCaptions.set(r,l)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=sp(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var c=new on,f=A(e.trickModeVideo.matchedStreams),h=f.next();!h.done;h=f.next())c.h.push(h.value.segmentIndex);return e.trickModeVideo.segmentIndex=c,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),ac(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),ac(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=sp(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var c=new on,f=A(e.dependencyStream.matchedStreams),h=f.next();!h.done;h=f.next())c.h.push(h.value.segmentIndex);return e.dependencyStream.segmentIndex=c,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),ac(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),ac(e.dependencyStream,t))}function Zv(e,t){var n=e.roles;n||(n=[]);for(var i=A(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,n=A(t.keyIds),i=n.next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,te(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=A(t.closedCaptions),n=t.next();!n.done;n=t.next())i=A(n.value),n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}function KT(e,t,n,i){i=i!==void 0&&i?n.matchedStreams:[],t=A(t);for(var r=t.next();!r.done;r=t.next()){if(r=Pb(e,r.value,n),!r)return;i.push(r)}n.matchedStreams=i}function Pb(e,t,n){var i={audio:d1,video:f1,text:Cy,image:by}[n.type],r=null,l=i(n);if(t.has(l))r=t.get(l);else{l={audio:function(v,S){return s1(e,v,S)},video:function(v,S){return s1(e,v,S)},text:Lb,image:_b}[n.type];for(var c={audio:Ub,video:jb,text:Bb,image:Vb}[n.type],f=A(t.values()),h=f.next();!h.done;h=f.next())h=h.value,!l(n,h)||n.fastSwitching!=h.fastSwitching||r&&!c(n,r,h)||(r=h)}return e.u&&!c1(r)&&t.delete(i(r)),r}function Ey(e,t){return e.mimeType!=t.mimeType?!1:$v(e.codecs)===$v(t.codecs)}y.uh=function(e){this.o=e},y.Ah=function(e){this.u=e};function s1(e,t,n){return!(!Ey(t,n)&&!e.o||t.drmInfos&&!Mu(t.drmInfos,n.drmInfos))}function Lb(e,t){return t.language?!(e.forced!==t.forced||Cl(e.language,t.language)==0||t.kind!=e.kind):!0}function _b(){return!0}function Ub(e,t,n){var i=Ey(e,t),r=Ey(e,n);if(i&&!r)return!1;if(!i&&r||(i=Cl(e.language,t.language),r=Cl(e.language,n.language),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(l){return e.roles.includes(l)}),r=n.roles.filter(function(l){return e.roles.includes(l)}),r.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?!0:t.primary&&!n.primary?!1:(i=Ay(e.channelsCount,t.channelsCount,n.channelsCount),i==Gl?!0:i==Ra?!1:(i=Ay(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),i==Gl?!0:i==Ra?!1:!!(e.bandwidth&&zT(e.bandwidth,t.bandwidth,n.bandwidth)==Gl)))}function jb(e,t,n){var i=Ey(e,t),r=Ey(e,n);if(i&&!r)return!1;if(!i&&r||(i=Ay(e.width*e.height,t.width*t.height,n.width*n.height),i==Gl))return!0;if(i==Ra)return!1;if(e.frameRate){if(i=Ay(e.frameRate,t.frameRate,n.frameRate),i==Gl)return!0;if(i==Ra)return!1}return!!(e.bandwidth&&zT(e.bandwidth,t.bandwidth,n.bandwidth)==Gl)}function Bb(e,t,n){var i=Cl(e.language,t.language),r=Cl(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(l){return e.roles.includes(l)}),r=n.roles.filter(function(l){return e.roles.includes(l)}),r.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 Vb(e,t,n){return Ay(e.width*e.height,t.width*t.height,n.width*n.height)==Gl}function qT(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function GT(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ct([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function Ay(e,t,n){if(t==e&&e!=n)return Ra;if(n==e&&e!=t)return Gl;if(t>e){if(n<=e||n-e<t-e)return Gl;if(n-e>t-e)return Ra}else{if(n>e)return Ra;if(e-n<e-t)return Gl;if(e-n>e-t)return Ra}return FT}function zT(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?Gl:t<e?Ra:FT}function c1(e){switch(e.type){case ot:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function f1(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,$v(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function d1(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,$v(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Cy(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function by(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function $v(e){if(!p1.has(e)){var t=pi(e);p1.set(e,t)}return p1.get(e)}Me("shaka.util.PeriodCombiner",ji),ji.prototype.setUseStreamOnce=ji.prototype.Ah,ji.prototype.setAllowMultiTypeVariants=ji.prototype.uh,ji.prototype.combinePeriods=ji.prototype.gf,ji.prototype.deleteStream=ji.prototype.Kg,ji.prototype.getImageStreams=ji.prototype.oi,ji.prototype.getTextStreams=ji.prototype.Jf,ji.prototype.getVariants=ji.prototype.Ki;var Gl=1,FT=0,Ra=-1,p1=new Map;function Hb(e,t){var n=new DOMParser,i=Kb.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function XT(e,t){try{var n=Or(e);return Hb(n,t)}catch{return null}}var Kb=new ul(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function em(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.pa=1,this.F=[],this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.u=new Map,this.o=new Map,this.B=new Map,this.ka=new Map,this.m=new ji,this.I=0,this.oa=new Ha(5),this.K=new ct(function(){if(e.H&&!e.g.continueLoadingWhenPaused&&(e.G.Ja(e.H,"timeupdate"),e.H.paused)){e.G.ma(e.H,"timeupdate",function(){return ew(e)});return}ew(e)}),this.O=new ao,this.M=null,this.C=[],this.$=1/0,this.fa=!1,this.h=null,this.L=0,this.P=!1,this.G=new yt,this.H=null,this.T=!1,this.Z="",this.ea=function(){return!1},this.W=[]}y=em.prototype,y.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ea=t),n&&this.i&&this.i.presentationTimeline.U()&&this.K.sb(),this.h&&this.h.configure(this.g),this.m&&(this.m.uh(this.g.dash.multiTypeVariantsAllowed&&pl()),this.m.Ah(this.g.dash.useStreamOnceInPeriodFlattening))},y.start=function(e,t){var n=this,i;return G(function(r){if(r.g==1)return n.fa=t.isLowLatencyMode(),n.A=[e],n.j=t,L(r,h1(n),2);if(i=r.h,n.j&&y1(n,i),!n.j)throw new Y(2,7,7001);return r.return(n.i)})},y.stop=function(){for(var e=A(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.B.clear(),this.u.clear(),this.l={me:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.m=null,this.K!=null&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},y.update=function(){var e=this,t;return G(function(n){if(n.g==1)return ye(n,2),L(n,h1(e),4);if(n.g!=2)return Le(n,0);if(t=De(n),!e.j||!t)return n.return();e.j.onError(t),ce(n)})},y.onExpirationUpdated=function(){},y.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.cc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,y1(this,0))}}},y.banLocation=function(e){this.h&&this.h.banLocation(e)},y.setMediaElement=function(e){this.H=e};function h1(e){var t,n,i,r,l,c,f,h,v,S,T;return G(function(b){return b.g==1?(t=4,n="MPD",i=r3(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(l=xy(e.h,"Location",!0),l.length&&(r=l)),c=un(r,e.g.retryParameters),f=Date.now(),L(b,v1(e,c,0,{type:t}),2)):b.g!=3?(h=b.h,e.j?(h.uri&&h.uri!=h.originalUri&&!e.A.includes(h.uri)&&e.A.unshift(h.uri),v=new fn(h.uri),e.Z=v.g.toString(),L(b,qb(e,h.data,h.uri,n),3)):b.return(0)):(S=Date.now(),T=(S-f)/1e3,e.oa.sample(1,T),b.return(T))})}function qb(e,t,n,i){var r,l,c,f,h,v,S,T,b,I;return G(function(O){if(O.g==1){if(r=t,l=e.g.dash.manifestPreprocessor,c=Js,l!=c){if(bt("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),f=XT(r,i),!f)throw new Y(2,4,4001,n);l(f),r=kr(f.outerHTML)}if(h=Ac(r,i),!h)throw new Y(2,4,4001,n);return v=e.g.dash.manifestPreprocessorTXml,S=Gd,v!=S&&v(h),i==="Patch"?O.return(Gb(e,h)):e.g.dash.disableXlinkProcessing?O.return(YT(e,h,n)):(T=e.g.dash.xlinkFailGracefully,b=Wv(h,e.g.retryParameters,T,n,e.j.networkingEngine),Ko(e.O,b),L(O,b.promise,2))}return I=O.h,O.return(YT(e,I,n))})}function YT(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt,St,et,ut,zt,$n,gn,mn,Kn,ai,Rf,Pa,cc;return G(function(Oo){switch(Oo.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],l=new Map,c=Mt(t,"Location"),f=A(c),h=f.next();!h.done;h=f.next())v=h.value,S=v.attributes.serviceLocation,(T=Gi(v))&&(b=Pn(i,[T])[0],S&&(e.h?ap(e.h,"Location",S,b):l.set(S,b)),r.push(b));if(e.h?(I=xy(e.h,"Location",!0),0<I.length&&(i=e.A=I)):r.length&&(i=e.A=r),e.l.me=t.attributes.id||"",e.l.Id=ze(t,"publishTime",yl)||0,e.F=Mt(t,"PatchLocation"),O=Promise.resolve(),(P=xn(t,"ContentSteering"))&&e.j)for(N=P.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=N):(e.h=new up(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=N,(_=Gi(P))&&(ze(P,"queryBeforeStart",Cc,!1)?O=wy(e.h,_):wy(e.h,_))),B=A(l.keys()),F=B.next();!F.done;F=B.next())z=F.value,J=l.get(z),ap(e.h,"Location",z,J);if(q=Mt(t,"BaseURL"),K=!1,e.h)for(W=A(q),Q=W.next();!Q.done;Q=W.next())ie=Q.value,Z=ie.attributes.serviceLocation,ne=Gi(ie),Z&&ne&&(ap(e.h,"BaseURL",Z,ne),K=!0);if(e.W=null,K&&e.h||(re=q.map(Gi),e.W=Pn(i,re)),ue=function(){return e.h&&K?xy(e.h,"BaseURL"):e.W?e.W:[]},e.l.Ua=ue,de=0,q&&q.length&&(de=ze(q[0],"availabilityTimeOffset",ls)||0),e.l.cb=de,e.I=ze(t,"minimumUpdatePeriod",ro,-1),se=ze(t,"availabilityStartTime",yl),we=ze(t,"timeShiftBufferDepth",ro),be=e.g.dash.ignoreSuggestedPresentationDelay,Qe=null,be||(Qe=ze(t,"suggestedPresentationDelay",ro)),Be=e.g.dash.ignoreMaxSegmentDuration,kt=null,Be||(kt=ze(t,"maxSegmentDuration",ro)),mt=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.T=e.i.presentationTimeline.U()&&mt=="static"),e.l.type=mt,e.i)for(st=e.i.presentationTimeline,pt=st.pb(),Ot=A(e.o.values()),lt=Ot.next();!lt.done;lt=Ot.next())St=lt.value,St.segmentIndex&&St.segmentIndex.Oa(pt);else et=e.g.dash.ignoreMinBufferTime,ut=0,et||(ut=ze(t,"minBufferTime",ro)||0),zt=0,zt=Qe!=null?Math.min(Qe,we||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*ut,we||1/0),st=new Pe(se,zt,e.g.dash.autoCorrectDrift);return st.Gc(mt=="static"),st.U()&&!isNaN(e.g.availabilityWindowOverride)&&(we=e.g.availabilityWindowOverride),we==null&&(we=1/0),st.Ce(we),$n=t.attributes.profiles||"",e.l.profiles=$n.split(","),gn={Ob:mt!="static",presentationTimeline:st,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:de,Wb:null,profiles:$n.split(","),roles:null,vb:function(){return""}},L(Oo,O,2);case 2:return e.L=0,mn=ZT(e,gn,ue,t,!1),Kn=mn.duration,ai=mn.periods,(mt!="static"||e.T)&&mn.Mg||st.bb(Kn||1/0),e.P&&e.fa&&st.vh(e.$),st.Tf(kt||1),e.P&&e.fa&&(Rf=Qe??e.g.defaultPresentationDelay,st.jg(Rf)),e.i?(e.i.periodCount=ai.length,e.i.gapCount=e.L,L(Oo,WT(e,ai,!1),4)):L(Oo,e.m.gf(ai,gn.Ob),6);case 6:if(e.i={presentationTimeline:st,variants:e.m.l,textStreams:e.m.Jf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Xb(t),nextUrl:Yb(t),periodCount:ai.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!st.Kh()){Oo.s(7);break}return Pa=Mt(t,"UTCTiming"),L(Oo,n3(e,ue,Pa),8);case 8:if(cc=Oo.h,!e.j)return Oo.return();st.wh(cc);case 7:st.ie(),e.m&&!e.i.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),Wb(e),ce(Oo)}})}function WT(e,t,n){var i;return G(function(r){if(r.g==1)return L(r,e.m.gf(t,!0,n),2);e.i.variants=e.m.l,i=e.m.Jf(),0<i.length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),ce(r)})}function Gb(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne;return G(function(re){if(re.g==1){if(n=t.attributes.mpdId,i=ze(t,"originalPublishTime",yl),!n||n!==e.l.me||i!==e.l.Id)throw e.F=[],new Y(1,4,4052);for(r=[],l=[],c=new Set,f=A(os(t)),h=f.next();!h.done;h=f.next())if(v=h.value,S=us(v.attributes.sel||""),T=S[S.length-1],b=Gi(v)||"",T.name==="MPD")if(T.ac==="mediaPresentationDuration"){I=Gi(v)||"";var ue=ro(I);if(ue!=null){e.l.Wb=ue;for(var de=A(e.u.values()),se=de.next();!se.done;se=de.next())se.value.Wb=ue}}else if(T.ac==="type"){for(e.i.presentationTimeline.Gc(b=="static"),e.l.type=b,ue=A(e.u.values()),de=ue.next();!de.done;de=ue.next())de.value.Ob=b=="dynamic";b=="static"&&(e.I=-1)}else T.ac==="publishTime"?e.l.Id=yl(b)||0:T.ac===null&&v.tagName==="add"&&l.push(v);else if(T.name==="PatchLocation")Hp(e.F,v);else if(T.name==="Period")v.tagName==="add"?l.push(v):v.tagName==="remove"&&T.id&&Fb(e,T.id);else if(T.name==="SegmentTemplate"){if(de=us(v.attributes.sel||""),ue=de[de.length-1],ue.ac){de=QT(e,de),se=Gi(v)||"";for(var we=A(de),be=we.next();!be.done;be=we.next())be=e.u.get(be.value),qp(be.J.ic,v.tagName,ue.ac,se);ue=de}else ue=[];for(O=ue,P=A(O),N=P.next();!N.done;N=P.next())_=N.value,c.add(_)}else if(T.name==="SegmentTimeline"||T.name==="S"){for(ue=us(v.attributes.sel||""),ue=QT(e,ue),de=A(ue),se=de.next();!se.done;se=de.next())se=e.u.get(se.value),se=op(se,lc,"SegmentTimeline"),we=Mt(se,"S"),Hp(we,v),se.children=we;for(B=ue,F=A(B),z=F.next();!z.done;z=F.next())J=z.value,c.add(J)}for(q=A(c),K=q.next();!K.done;K=q.next())W=K.value,JT(e,W);for(Q=A(l),ie=Q.next();!ie.done;ie=Q.next())Z=ie.value,r.push.apply(r,te(zb(e,Z)));return r.length?(e.i.periodCount+=r.length,e.i.gapCount=e.L,L(re,WT(e,r,!0),2)):re.s(2)}e.l.type=="static"&&(ne=e.l.Wb,e.i.presentationTimeline.bb(ne||1/0)),ce(re)})}function zb(e,t){return ZT(e,{Ob:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,qa:null,ha:null,ga:null,J:null,bandwidth:0,Lf:!1,cb:e.l.cb,profiles:e.l.profiles,Wb:e.l.Wb,roles:null,vb:function(){return""}},e.l.Ua,t,!0).periods}function Fb(e,t){e.i.periodCount--;for(var n=A(e.u.keys()),i=n.next();!i.done;i=n.next())if(i=i.value,i.startsWith(t)){var r=e.u.get(i);op(r,lc,"SegmentTimeline").children=[],JT(e,i),e.u.delete(i)}e.C=e.C.filter(function(l){return l!==t})}function QT(e,t){var n="",i="",r=-1,l="";t=A(t);for(var c=t.next();!c.done;c=t.next())c=c.value,c.name==="Period"?n=c.id:c.name==="AdaptationSet"?(i=c.id,c.position!==null&&(r=c.position)):c.name==="Representation"&&(l=c.id);if(t=[],l)t.push(n+","+l);else if(i)for(r=A(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.qa.id===n&&e.ga.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(i=A(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.qa.id===n&&e.ga.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function JT(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Oa(e.i.presentationTimeline.pb());try{var r=LT(n,function(l,c,f,h){return nw(e,l,c,f,h)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return G(function(l){if(l.g==1)return i.segmentIndex?l.s(0):L(l,r.rc(),3);i.segmentIndex=l.h,ce(l)})}}catch(l){if(t=n.J.contentType,t!=ot&&t!="application"&&t!="image"||l.code!=4002)throw l}}function Xb(e){var t=xn(e,"ServiceDescription");if(!t||(e=xn(t,"Latency"),t=xn(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function Yb(e){if(e=Mt(e,"SupplementalProperty"),!e.length)return null;e=A(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function ZT(e,t,n,i,r){var l=t.Wb;l||(l=ze(i,"mediaPresentationDuration",ro),e.l.Wb=l);var c=0;e.i&&e.i.presentationTimeline&&e.T&&(c=e.i.presentationTimeline.Hb());var f=[],h=c;i=Mt(i,"Period");for(var v=0;v<i.length;v++){var S=i[v],T=i[v+1],b=ze(S,"start",ro,h),I=S.attributes.id,O=ze(S,"duration",ro);b=v==0&&b==0&&e.T?c:b;var P=null;if(T){var N=ze(T,"start",ro);N!=null&&(P=N-b+c)}else l!=null&&(P=l-b+c);if(N=ug,P&&O&&Math.abs(P-O)>N&&P>O&&e.L++,P==null&&(P=O),!(e.M!==null&&I!==null&&b!==null&&b<e.M)||e.C.includes(I)||v+1==i.length){if(b!==null&&(e.M===null||b>e.M)&&(e.M=b),h=Qb(e,t,n,{start:b,duration:P,node:S,$g:P==null||!T}),f.push(h),t.qa.id&&P&&e.ka.set(t.qa.id,P),P==null){h=null;break}h=b+P}}if(r)for(t=A(f),n=t.next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=f.map(function(_){return _.id});return l!=null?{periods:f,duration:l+c,Mg:!1}:{periods:f,duration:h,Mg:!0}}function Wb(e){var t=Array.from(e.B.keys()).filter(function(f){return!e.C.includes(f)});t=A(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=A(e.B.get(n)),l=r.next();!l.done;l=r.next()){l=l.value;var c=e.o.get(l);c&&(c.segmentIndex&&c.segmentIndex.getNumReferences()!=0?i=!1:(e.m&&e.m.Kg(c,n),e.o.delete(l)))}i&&e.B.delete(n)}}function Qb(e,t,n,i){t.qa=g1(e,i.node,null,n),t.ha=i,t.qa.cb=t.cb,t.qa.id||(t.qa.id="__shaka_period_"+i.start);var r=Mt(i.node,"EventStream");n=t.presentationTimeline.pb(),r=A(r);for(var l=r.next();!l.done;l=r.next())i3(e,i.start,i.duration,l.value,n);for(n=Mt(i.node,"SupplementalProperty"),n=A(n),r=n.next();!r.done;r=n.next())r=r.value,r.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(r=Iy(e,r))&&(t.vb=r);if(n=Mt(i.node,"AdaptationSet").map(function(I,O){return $T(e,t,O,I)}).filter(jo),t.Ob){r=[],l=A(n);for(var c=l.next();!c.done;c=l.next()){c=A(c.value.rj);for(var f=c.next();!f.done;f=c.next())r.push(f.value)}if(r.length!=new Set(r).size)throw new Y(2,4,4018)}for(r=new Map,l=A(n),c=l.next();!c.done;c=l.next())for(c=A(c.value.ei),f=c.next();!f.done;f=c.next()){var h=A(f.value);f=h.next().value,h=h.next().value,r.set(f,h)}if(r.size)for(l=null,c=A(n),f=c.next();!f.done;f=c.next()){f=f.value,h=[];for(var v=A(f.streams),S=v.next(),T={};!S.done;T={og:void 0},S=v.next())if(T.og=S.value,r.has(T.og.originalId)){l||(l=Mt(i.node,"AdaptationSet").map(function(I,O){return $T(e,t,O,I)}).filter(jo)),S=A(l);for(var b=S.next();!b.done;b=S.next())(b=b.value.streams.find(function(I){return function(O){return O.originalId==I.og.originalId}}(T)))&&(b.dependencyStream=r.get(b.originalId),h.push(b))}h.length&&f.streams.push.apply(f.streams,te(h))}if(i=n.filter(function(I){return!I.vg}),n=n.filter(function(I){return I.vg}),!e.g.disableIFrames){for(n=A(n),r=n.next();!r.done;r=n.next())for(r=r.value,l=r.vg.split(" "),c=A(i),f=c.next();!f.done;f=c.next())if(f=f.value,l.includes(f.id))for(f=A(f.streams),h=f.next();!h.done;h=f.next())th(h.value,r.streams)}if(n=tm(e.g.disableAudio,i,"audio"),r=tm(e.g.disableVideo,i,"video"),l=tm(e.g.disableText,i,ot),i=tm(e.g.disableThumbnails,i,"image"),r.length===0&&n.length===0)throw new Y(2,4,4004);return{id:t.qa.id,audioStreams:n,videoStreams:r,textStreams:l,imageStreams:i}}function tm(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,te(r.streams)),i},[])}function $T(e,t,n,i){function r(ne){var re=ne.attributes["dvb:fontFamily"];ne=ne.attributes["dvb:url"],re&&ne&&(ne=Pn(t.ga.Ua(),[ne],t.vb()),e.j.addFont(re,ne[0]))}function l(ne){switch(ne){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function c(ne){switch(ne){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ga=g1(e,i,t.qa,null),t.ga.position=n;var f=!1;n=Mt(i,"Role");var h=n.map(function(ne){return ne.attributes.value}).filter(jo),v=void 0,S=t.ga.contentType==ot;S&&(v="subtitle"),n=A(n);for(var T=n.next();!T.done;T=n.next()){T=T.value;var b=T.attributes.schemeIdUri;if(b==null||b=="urn:mpeg:dash:role:2011")switch(T=T.attributes.value,T){case"main":f=!0;break;case"caption":case"subtitle":v=T}}var I=Mt(i,"EssentialProperty");n=null;var O=!1;T=null,b=!1,I=A(I);for(var P=I.next();!P.done;P=I.next()){P=P.value;var N=P.attributes.schemeIdUri;if(N=="http://dashif.org/guidelines/trickmode")n=P.attributes.value;else if(N=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var _=c(parseInt(P.attributes.value,10));else if(N=="urn:mpeg:mpegB:cicp:ColourPrimaries")var B=l(parseInt(P.attributes.value,10));else N!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(N=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?O=!0:N=="urn:dvb:dash:fontdownload:2014"?r(P):N=="urn:mpeg:dash:urlparam:2014"&&(T=Iy(e,P))||(b=!0))}if(b)return null;var F=null;for(b=Mt(i,"SupplementalProperty"),b=A(b),I=b.next();!I.done;I=b.next())I=I.value,P=I.attributes.schemeIdUri,P=="http://dashif.org/guidelines/last-segment-number"?F=parseInt(I.attributes.value,10)-1:P=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?_=c(parseInt(I.attributes.value,10)):P=="urn:mpeg:mpegB:cicp:ColourPrimaries"?B=l(parseInt(I.attributes.value,10)):P=="urn:dvb:dash:fontdownload:2014"?r(I):P=="urn:mpeg:dash:urlparam:2014"&&(T=Iy(e,I));T&&(t.vb=T),T=Mt(i,"Accessibility");var z=new Map,J;for(T=A(T),b=T.next();!b.done;b=T.next())if(I=b.value,b=I.attributes.schemeIdUri,I=I.attributes.value,b!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(b!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)b=="urn:mpeg:dash:role:2011"?I!=null&&(h.push(I),I=="captions"&&(v="caption")):b=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(I=="1"?J="visually impaired":I=="2"&&(J="hard of hearing"));else if(b=1,I!=null)for(I=A(I.split(";")),P=I.next();!P.done;P=I.next()){N=P.value;var q=P=void 0;N.includes("=")?(N=N.split("="),P="svc"+N[0],q=N[1].split(",")[0].split(":").pop()):(P="svc"+b,b++,q=N),z.set(P,At(q))}else z.set("svc1","und");else if(b=1,I!=null)for(I=I.split(";"),P=A(I),N=P.next();!N.done;N=P.next()){q=N.value;var K=N=void 0;q.includes("=")?(q=q.split("="),N=q[0].startsWith("CC")?q[0]:"CC"+q[0],K=q[1]||"und"):(N="CC"+b,I.length==2?b+=2:b++,K=q),z.set(N,At(K))}else z.set("CC1","und");T=Mt(i,"ContentProtection");var W=CT(T,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.ga.encrypted=0<T.length;var Q=At(t.ga.language||"und"),ie=t.ga.label,Z=new Map;if(i=Mt(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(T=[],b=A(i),I=b.next();!I.done;I=b.next())P=I.value,(I=hl(P,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(P=io(P),P.attributes.codecs=I.split(" ").join(","),P.attributes.id&&(P.attributes.supplementalId=P.attributes.id+"_supplementalCodecs"),T.push(P));i.push.apply(i,te(T))}if(T=i.map(function(ne){var re=Jb(e,t,W,v,Q,ie,f,h,z,ne,J,F);return re&&(re.hdr=re.hdr||_,re.colorGamut=re.colorGamut||B,re.fastSwitching=O,ne=ne.attributes.dependencyId)?(re.baseOriginalId=ne,Z.set(ne,re),null):re}).filter(function(ne){return!!ne}),T.length==0&&Z.size==0){if(n=t.ga.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||S||n)return null;throw new Y(2,4,4003)}if(!t.ga.contentType||t.ga.contentType=="application")for(t.ga.contentType=iw(T[0].mimeType,T[0].codecs),S=A(T),b=S.next();!b.done;b=S.next())b.value.type=t.ga.contentType;for(S=t.ga.id||"__fake__"+e.pa++,b=A(T),I=b.next();!I.done;I=b.next()){for(I=I.value,P=A(W.drmInfos),N=P.next();!N.done;N=P.next())N=N.value,N.keyIds=N.keyIds&&I.keyIds?new Set([].concat(te(N.keyIds),te(I.keyIds))):N.keyIds||I.keyIds;I.groupId=S}return i=i.map(function(ne){return ne.attributes.supplementalId||ne.attributes.id}).filter(jo),{id:S,contentType:t.ga.contentType,language:Q,Qk:f,streams:T,drmInfos:W.drmInfos,vg:n,rj:i,ei:Z}}function Iy(e,t){if((t=vr(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ze(t,"useMPDUrlQuery",Cc,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.Z:n.split("&").map(function(i){if(i=="$querypart$")return e.Z;var r=/\$query:(.*?)\$/g.exec(i);if(r&&r.length==2){r=r[1];var l=new Yn(e.Z).get(r);if(l.length)return r+"="+l[0]}return i}).join("&")}}return null}function Jb(e,t,n,i,r,l,c,f,h,v,S,T){t.J=g1(e,v,t.ga,null);var b=t.J.id;if(e.$=Math.min(e.$,t.J.cb),e.P=0<e.$,!t3(t.J))return null;var I=t.ha.start;t.bandwidth=ze(v,"bandwidth",gl)||0,t.roles=f;var O=Mt(v,"SupplementalProperty"),P=Mt(v,"EssentialProperty"),N=Mt(v,"ContentProtection");v=null;var _=P.find(function(de){return de.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(_||(_=O.find(function(de){return de.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(v=Iy(e,_)),v&&(t.vb=v),_=t.J.contentType,v=_==ot||_=="application",_=_=="image",N.length&&(t.ga.encrypted=!0);try{var B=void 0;if(n.cf){var F=t.J.Ua,z=t.vb,J=Pn(F(),[n.cf.Xi],z()),q=un(J,e.g.retryParameters);B={bitsKey:128,blockCipherMode:"CBC",iv:n.cf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var de,se,we;return G(function(be){if(be.g==1)return L(be,v1(e,q,6),2);if(be.g!=3){if(de=be.h,!de.data||de.data.byteLength!=16)throw new Y(2,4,4049);return se={name:"AES-CBC"},we=B,L(be,E.crypto.subtle.importKey("raw",de.data,se,!0,["decrypt"]),3)}we.cryptoKey=be.h,B.fetchKey=void 0,ce(be)})}}}if(t.J.aesKey=B,F=function(de,se,we,be){return nw(e,de,se,we,be)},t.J.dd)var K=Sb(t,F,B);else if(t.J.Zb)K=wb(t,e.o,B);else if(t.J.ic)K=LT(t,F,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.ka,B,T,!1);else{var W=t.ha.duration||0,Q=t.J.Ua,ie=t.J.mimeType,Z=t.J.codecs;K={rc:function(){var de=uf(I,W,Q());return de.Eb(function(se){se.mimeType=ie,se.codecs=Z}),Promise.resolve(de)}}}}catch(de){if((v||_)&&de.code==4002)return null;throw de}T=lb(N,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),T=new Set(T?[T]:[]),N=!1,O.some(function(de){return de.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&de.attributes.value=="JOC"})&&(N=!0),O=!1,v&&(O=f.includes("forced_subtitle")||f.includes("forced-subtitle"));var ne;if(_&&((P=P.find(function(de){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(de.attributes.schemeIdUri)}))&&(ne=P.attributes.value),!ne))return null;var re;v=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(re="PQ"),P=t.J.id?t.qa.id+","+t.J.id:"",e.F.length&&b&&e.u.set(t.qa.id+","+b,Zb(t));var ue=P&&e.o.has(P)?e.o.get(P):{id:e.pa++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){ue.segmentIndex&&(ue.segmentIndex.release(),ue.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:v,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:T,language:r,originalLanguage:t.ga.language,label:l,type:t.ga.contentType,primary:c,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:f,forced:O,channelsCount:t.J.oe,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:N,closedCaptions:h,hdr:re,colorGamut:void 0,videoLayout:void 0,tilesLayout:ne,accessibilityPurpose:S,external:!1,fastSwitching:!1,fullMimeTypes:new Set([dn(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return ue.createSegmentIndex=function(){var de;return G(function(se){if(se.g==1)return ue.segmentIndex?se.s(0):(de=ue,L(se,K.rc(),3));de.segmentIndex=se.h,ce(se)})},P&&t.Ob&&!e.o.has(P)&&(t=t.qa.id||"",e.B.has(t)||e.B.set(t,[]),e.o.set(P,ue),e.B.get(t).push(P)),ue}function Zb(e){function t(n){return n?(n=ju(n),n.dd=null,n.Zb=null,n.ic=Gp(n.ic),n):null}return e=ju(e),e.qa=t(e.qa),e.ga=t(e.ga),e.J=t(e.J),e.ha&&(e.ha=ju(e.ha),e.ha.node=null),e}function ew(e){var t,n;return G(function(i){switch(i.g){case 1:return t=0,ye(i,2),L(i,h1(e),4);case 4:t=i.h,Le(i,3);break;case 2:if(n=De(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),y1(e,t),ce(i)}})}function y1(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.da(Math.max(n-t,Uf(e.oa)))}}function g1(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,oe:null,audioSamplingRate:null,cb:0,Ae:0,encrypted:!1},i=i||n.Ua;var r=t.attributes.id,l=t.attributes.supplementalId,c=Mt(t,"BaseURL"),f,h=!1;if(e.h)for(var v=A(c),S=v.next();!S.done;S=v.next()){var T=S.value;S=T.attributes.serviceLocation,T=Gi(T),S&&T&&(ap(e.h,r,S,T),h=!0)}h&&e.h||(f=c.map(Gi)),v=t.attributes.contentType||n.contentType,S=t.attributes.mimeType||n.mimeType,T=yn([t.attributes.codecs||n.codecs]).join(",");var b=ze(t,"frameRate",Vp)||n.frameRate,I=t.attributes.sar||n.pixelAspectRatio,O=$b(Mt(t,"InbandEventStream"),n.emsgSchemeIdUris),P=Mt(t,"AudioChannelConfiguration");P=e3(P)||n.oe;var N=ze(t,"audioSamplingRate",Qn)||n.audioSamplingRate;v||(v=iw(S,T));var _=xn(t,"SegmentBase"),B=xn(t,"SegmentTemplate"),F=_&&ze(_,"availabilityTimeOffset",ls)||0,z=B&&ze(B,"availabilityTimeOffset",ls)||0,J=c&&c.length&&ze(c[0],"availabilityTimeOffset",ls)||0;F=n.cb+J+F+z,z=null,(J=xn(t,"SegmentSequenceProperties"))&&(J=xn(J,"SAP"))&&(z=ze(J,"cadence",Wn)),J=t.attributes.label;var q=Mt(t,"Label");return q&&q.length&&(q=q[0],Cn(q)&&(J=Cn(q))),{Ua:function(){return Pn(i(),c.length?e.h&&h?xy(e.h,r):f||[]:[])},dd:_||n.dd,Zb:xn(t,"SegmentList")||n.Zb,ic:B||n.ic,width:ze(t,"width",Qn)||n.width,height:ze(t,"height",Qn)||n.height,contentType:v,mimeType:S,codecs:T,frameRate:b,pixelAspectRatio:I,emsgSchemeIdUris:O,id:l||r,originalId:r,language:t.attributes.lang,oe:P,audioSamplingRate:N,cb:F,de:null,Ae:z||n.Ae,label:J||null,encrypted:!1}}function $b(e,t){t=t.slice(),e=A(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function e3(e){e=A(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function t3(e){var t=e.dd?1:0;return t+=e.Zb?1:0,t+=e.ic?1:0,t==0?e.contentType==ot||e.contentType=="application":(t!=1&&(e.dd&&(e.Zb=null),e.ic=null),!0)}function tw(e,t,n,i){var r,l,c,f,h,v,S;return G(function(T){if(T.g==1)return r=[wi(n)],l=Pn(t(),r),c=un(l,e.g.retryParameters),c.method=i,f=e.j.networkingEngine.request(4,c,{isPreload:e.ea()}),Ko(e.O,f),L(T,f.promise,2);if(h=T.h,i=="HEAD"){if(!h.headers||!h.headers.date)return T.return(0);v=h.headers.date}else v=Zt(h.data);return S=Date.parse(v),isNaN(S)?T.return(0):T.return(S-Date.now())})}function n3(e,t,n){var i,r,l,c,f,h,v,S;return G(function(T){switch(T.g){case 1:i=n.map(function(b){return{scheme:b.attributes.schemeIdUri,value:b.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),l=A(i),c=l.next();case 2:if(c.done){T.s(4);break}switch(f=c.value,ye(T,5),h=f.scheme,v=f.value,h){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return T.s(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return T.s(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return S=Date.parse(v),T.return(isNaN(S)?0:S-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Et("NTP UTCTiming scheme is not supported");break;default:Et("Unrecognized scheme in UTCTiming element",h)}T.s(9);break;case 7:return L(T,tw(e,t,v,"HEAD"),10);case 10:return T.return(T.h);case 8:return L(T,tw(e,t,v,"GET"),11);case 11:return T.return(T.h);case 9:Le(T,3);break;case 5:De(T);case 3:c=l.next(),T.s(2);break;case 4:return Et("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),T.return(0)}})}function i3(e,t,n,i,r){var l=i.attributes.schemeIdUri||"",c=i.attributes.value||"",f=ze(i,"timescale",Qn)||1,h=ze(i,"presentationTimeOffset",Qn)||0;i=A(Mt(i,"Event"));for(var v=i.next();!v.done;v=i.next()){v=v.value;var S=ze(v,"presentationTime",Qn)||0,T=ze(v,"duration",Qn)||0;S=Math.max((S-h)/f+t,t),T=S+T/f,n!=null&&(S=Math.min(S,t+n),T=Math.min(T,t+n)),T<r||(v={schemeIdUri:l,value:c,startTime:S,endTime:T,id:v.attributes.id||"",timescale:f,eventElement:dg(v),eventNode:Gp(v)},e.j.onTimelineRegionAdded(v))}}function nw(e,t,n,i,r){var l,c,f,h;return G(function(v){return v.g==1?(l=Fi,c=r?0:1,f=ff(t,n,i,e.g.retryParameters),L(v,v1(e,f,l,{type:c}),2)):(h=v.h,v.return(h.data))})}function iw(e,t){return t=dn(e,t),xl(t)?ot:e.split("/")[0]}function v1(e,t,n,i){return i||(i={}),i.isPreload=e.ea(),t=e.j.networkingEngine.request(n,t,i),Ko(e.O,t),t.promise}function r3(e){var t=e.l.Id;if(!e.l.me||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(r){return r=Qn(r.attributes.ttl),!r||t+r>n}).map(Gi).filter(jo);return i.length?Pn(e.A,i):[]}Me("shaka.dash.DashParser",em),ta("application/dash+xml",function(){return new em}),ta("video/vnd.mpeg.dash.mpd",function(){return new em});function nm(){}Me("shaka.dependencies",nm),nm.has=function(e){return m1.has(e)},nm.add=function(e,t){if(!ow[e])throw Error(e+" is not supported");e==rw?bt("mux.js","mux.js is no longer used in Shaka Player."):m1.set(e,function(){return t})};var rw="muxjs",ow={Rk:rw,ISOBoxer:"ISOBoxer"};nm.Allowed=ow;var m1=new Map([["ISOBoxer",function(){return E.ISOBoxer}]]);function lw(e,t,n){this.type=e,this.ca=t,this.segments=n||null}function im(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=i===void 0?null:i}im.prototype.toString=function(e){function t(r){return r.name+"="+(isNaN(Number(r.value))?'"'+r.value+'"':r.value)}var n="#"+this.name,i=this.attributes?this.attributes.filter(function(r){return e?!e.has(r.name):!0}).map(t):[];return this.value&&i.unshift(this.value),0<i.length&&(n+=":"+i.join(",")),n};function uw(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 cp(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function Ve(e,t,n){return(e=cp(e,t))?e.value:n||null}function Bt(e,t){if(e=cp(e,t),!e)throw new Y(2,4,4023,t);return e.value}function aw(e,t,n){n=n===void 0?[]:n,this.ca=t,this.g=e,this.Jb=n}function rm(e,t){this.name=e,this.value=t}function Eo(e,t){return e.filter(function(n){return n.name==t})}function sw(e,t){return e.filter(function(n){return Bt(n,"TYPE")==t})}function mi(e,t){e=A(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function fp(e,t,n){return n=n===void 0?0:n,(e=mi(e,t))?Number(e.value):n}function sc(e,t,n){return t?cw(e,[t],n):[]}function cw(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return fw(r,n)})),Pn(e,i)}function fw(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=A(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.slice(2,i.length-1),l=t.get(r);if(l)e=e.replace(i,l);else throw new Y(2,4,4039,r)}}return e}function o3(){this.g=0}function S1(e,t){t=Zt(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
||
`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new Y(2,4,4015);t=0;for(var i=!0,r=A(n),l=r.next();!l.done;l=r.next())if(l=l.value,/^#(?!EXT)/m.test(l)||i)i=!1;else if(l=T1(e,l),--e.g,dw.includes(l.name)){t=1;break}else l.name=="EXT-X-STREAM-INF"&&(i=!0);for(r=[],i=!0,l=0;l<n.length;l++){var c=n[l],f=n[l+1];if(/^#(?!EXT)/m.test(c)||i)i=!1;else{if(c=T1(e,c),l3.includes(c.name)){if(t!=1)throw new Y(2,4,4017);c=n.splice(l,n.length-l),n=[],i=[],l=[],f=null,c=A(c);for(var h=c.next();!h.done;h=c.next())h=h.value,/^(#EXT)/.test(h)?(h=T1(e,h),dw.includes(h.name)?r.push(h):h.name=="EXT-X-MAP"?f=h:h.name=="EXT-X-PART"?l.push(h):h.name=="EXT-X-PRELOAD-HINT"?Ve(h,"TYPE")=="PART"?l.push(h):Ve(h,"TYPE")=="MAP"&&(h.name="EXT-X-MAP",f=h):i.push(h)):/^#(?!EXT)/m.test(h)||(h=h.trim(),f&&i.push(f),n.push(new aw(h,i,l)),i=[],l=[]);return l.length&&(f&&i.push(f),n.push(new aw("",i,l))),new lw(t,r,n)}r.push(c),c.name=="EXT-X-STREAM-INF"&&(c.attributes.push(new rm("URI",f)),i=!0)}}return new lw(t,r)}function T1(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new Y(2,4,4016,t);t=n[1];var i=n[2];n=[];var r;if(i){i=new eu(i);var l;(l=_u(i,/^([^,=]+)(?:,|$)/g))&&(r=l[1]);for(var c=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;l=_u(i,c);)n.push(new rm(l[1],l[2]||l[3])),ts(i)}return new im(e,t,n,r)}var dw="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(" "),l3="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 pw(){}function hw(e,t){try{var n=om(e);return wr({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return kl(i)}}function om(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new Y(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new Y(2,1,1004,e);var n=t[0];e=E.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var i=!1;1<t.length&&t[t.length-1]=="base64"&&(i=!0,t.pop());var r;return i?r=Hi(e):r=kr(e),{data:r,contentType:n}}Me("shaka.net.DataUriPlugin",pw),pw.parse=hw,so("data",hw);function lm(){var e=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(ot,new Map),this.M.set("image",new Map),this.Sb=new Map().set("com.apple.streamingkeydelivery",function(t,n,i){return k3(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Bt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Bt(t,"URI"),n=om(n.split("?")[0]),n=Je(n.data),i=Mr("com.widevine.alpha",i,[{initDataType:"cenc",initData:n}]),(t=Ve(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=Bt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),t=Bt(t,"URI"),t=om(t.split("?")[0]),t=Je(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=Vc(t,n,new Set,0),i=Mr("com.microsoft.playready",i,[{initDataType:"cenc",initData:n}]),(t=Bu(["<PLAYREADY>",No(t),"</PLAYREADY>"].join(`
|
||
`)))&&(i.licenseServerUri=Xv(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Bt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Bt(t,"URI"),n=om(n.split("?")[0]),n=Je(n.data),i=Mr("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:n}]),(t=Ve(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.Na=new Set,this.i=new Map,this.l=null,this.C="",this.Ga=new o3,this.K=-1,this.ea=1/0,this.$=this.Ub=this.Ma=!1,this.B=new ct(function(){if(e.W&&!e.g.continueLoadingWhenPaused&&(e.T.Ja(e.W,"timeupdate"),e.W.paused)){e.T.ma(e.W,"timeupdate",function(){return Lw(e)});return}Lw(e)}),this.Ea=fm,this.m=null,this.La=0,this.o=1/0,this.Fa=this.Aa=this.P=0,this.Z=new ao,this.G=new Map,this.H=new Map,this.sa=new Map,this.ka=new Map,this.L=new Map,this.oa=new Map,this.pa=new Map,this.Tb=this.fa=!1,this.Pb=new Ha(5),this.j=null,this.O=!0,this.ya=new Set,this.T=new yt,this.u=this.W=null,this.Qb=function(){return!1}}y=lm.prototype,y.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Qb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()},y.start=function(e,t){var n=this,i;return G(function(r){return r.g==1?(n.h=t,n.fa=t.isLowLatencyMode(),L(r,D1(n,[e]).promise,2)):r.g!=3?(i=r.h,n.C=i.uri,L(r,s3(n,i.data),3)):r.return(n.m)})},y.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.Z&&(e.push(this.Z.destroy()),this.Z=null),this.g=this.h=null,this.Na.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ka.clear(),this.L.clear(),this.oa.clear(),this.pa.clear(),this.ya.clear(),this.j&&this.j.destroy(),this.T&&(this.T.release(),this.T=null),Promise.all(e)},y.update=function(){var e=this,t,n,i,r,l,c,f,h,v,S,T,b;return G(function(I){if(I.g==1){if(!Wi(e))return I.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(O){return O.stream.segmentIndex}),r=A(i),l=r.next();!l.done;l=r.next())c=l.value,t.push(u3(e,c));return L(I,Promise.all(t),2)}for(xw(e,i.map(function(O){return O.stream})),f=i.some(function(O){return O.rd==0}),i.length&&!f&&(h=L3,sm(e,h.Ph),v=i.map(function(O){return O.Vb}),e.l.bb(Math.min.apply(Math,te(v))),e.h.updateDuration()),f&&x1(e),S=A(i),T=S.next();!T.done;T=S.next())b=T.value,b.stream.isAudioMuxedInVideo||!b.stream.segmentIndex||Bn(b.stream.segmentIndex)||e.h.disableStream(b.stream);ce(I)})};function w1(e,t){return Wi(e)?e.M.get(t.type):t.je}function u3(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt;return G(function(mt){switch(mt.g){case 1:if(t.stream.isAudioMuxedInVideo)return mt.return();for(n=[],i=A(t.N()),r=i.next();!r.done;r=i.next())l=r.value,c=new fn(l),f=c.g,t.Td&&(0<=t.Ab&&f.add("_HLS_msn",String(t.Ab)),0<=t.Bb&&f.add("_HLS_part",String(t.Bb))),t.Ud&&f.add("_HLS_skip","YES"),ku(f)&&Jr(c,Ka(f.toString())),n.push(c.toString());return ye(mt,2),L(mt,D1(e,n,!0).promise,4);case 4:h=mt.h,Le(mt,3);break;case 2:throw v=De(mt),e.h&&e.h.disableStream(t.stream),v;case 3:if(!t.stream.segmentIndex)return mt.return();if(S=S1(e.Ga,h.data),S.type!=1)throw new Y(2,4,4017);return T=h.uri,T==h.originalUri||t.N().includes(T)||t.ve.push(T),b=Eo(S.ca,"EXT-X-DEFINE"),I=E1(e,b,T),O=t.stream,P=w1(e,t),L(mt,bw(e,S,O.mimeType,t.N,I),5);case 5:for(N=mt.h,_=N.keyIds,B=N.drmInfos,F=N.encrypted,z=N.Bg,O.encrypted||!F||z||(O.encrypted=!0),J=function(st,pt){return st.size===pt.size&&[].concat(te(st)).every(function(Ot){return pt.has(Ot)})},J(O.keyIds,_)||(O.keyIds=_,O.drmInfos=B,e.h.newDrmInfo(O)),q=Rw(e,S,P,I,t.N,t.type),K=q.segments,(W=q.bandwidth)&&(O.bandwidth=W),Q=Gs(O),ie=A(K),Z=ie.next();!Z.done;Z=ie.next())ne=Z.value,ne.Y&&(ne.Y.Wc=Q);O.segmentIndex.Bd(K,e.l.pb()),K.length&&(re=fp(S.ca,"EXT-X-MEDIA-SEQUENCE",0),de=(ue=mi(S.ca,"EXT-X-SKIP"))?Number(Ve(ue,"SKIPPED-SEGMENTS")):0,se=Aw(re,K),we=se.Ab,be=se.Bb,t.Ab=we+de,t.Bb=be,Qe=P.get(re),O.segmentIndex.Oa(Qe)),(Be=Bn(O.segmentIndex))&&(t.Bc=Be.startTime,kt=K[K.length-1],t.Vb=kt.endTime),mi(S.ca,"EXT-X-ENDLIST")&&(t.rd=!0),C1(e,S),b1(e,S.ca,O.type,I,t.N),ce(mt)}})}y.onExpirationUpdated=function(){},y.onInitialVariantChosen=function(){},y.banLocation=function(e){this.j&&this.j.banLocation(e)},y.setMediaElement=function(e){this.W=e};function yw(e,t,n){n=n===void 0?!1:n;for(var i=e.K==-1,r=A(t),l=r.next();!l.done;l=r.next()){l=l.value;var c=l.stream.segmentIndex,f=w1(e,l);if(c=Bn(c)){f=A(f);for(var h=f.next();!h.done;h=f.next()){h=A(h.value);var v=h.next().value;if(h.next().value==c.startTime){i&&(e.K=Math.max(e.K,v)),l.qf=v;break}}}}if(!(0>e.K))for(t=A(t),i=t.next();!i.done;i=t.next())i=i.value,(Dy(e,i.type)||n)&&(r=i.stream.segmentIndex)&&(l=e.K-i.qf,0<l&&(r.g.splice(0,l),r=Bn(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),gw(e,i,r)))}function a3(e,t){if(e.ea==1/0){t=A(t);for(var n=t.next();!n.done;n=t.next())n=Bn(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ea=Math.min(e.ea,n.h))}if(t=e.ea,t!=1/0){n=A(e.i.values());for(var i=n.next();!i.done;i=n.next())if(i=i.value,!Dy(e,i.type)){var r=i.stream.segmentIndex;if(r!=null){var l=Bn(r);if(l)if(l.h==null)Qr("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(gw(e,i,l.h-t-l.startTime),i=A(r),r=i.next();!r.done;r=i.next())r.value.qg(t)}}}}function gw(e,t,n){if(!(.001>Math.abs(n))){t.Bc+=n,t.Vb+=n,e=w1(e,t);for(var i=A(e),r=i.next();!r.done;r=i.next()){var l=A(r.value);r=l.next().value,l=l.next().value,e.set(r,l+n)}t.N()}}function s3(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt,St;return G(function(et){switch(et.g){case 1:return n=wn,i=S1(e.Ga,t),r=Eo(i.ca,"EXT-X-DEFINE"),l=[],c=[],f=[],e.l=new Pe(null,0),e.l.Gc(!0),h=function(){return[e.C]},v=null,S=new Map,i.type==1?(e.O=!1,we=Eo(i.ca,"EXT-X-DEFINE"),S=E1(e,we,e.C),v=n.la,be="",Qe=new Map,L(et,Ew(e,e.F++,S,i,h,"",v,be,!0,"Media Playlist",null,Qe,null,!1,null,!1),7)):(f3(e,r),T=Eo(i.ca,"EXT-X-MEDIA"),b=Eo(i.ca,"EXT-X-STREAM-INF"),I=Eo(i.ca,"EXT-X-IMAGE-STREAM-INF"),O=Eo(i.ca,"EXT-X-I-FRAME-STREAM-INF"),P=Eo(i.ca,"EXT-X-SESSION-KEY"),N=Eo(i.ca,"EXT-X-SESSION-DATA"),_=Eo(i.ca,"EXT-X-CONTENT-STEERING"),p3(e,N),L(et,h3(e,_),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(B=[],F=A(b),z=F.next(),J={};!z.done;J={Gh:void 0},z=F.next())q=z.value,(K=Ve(q,"SUPPLEMENTAL-CODECS"))&&(J.Gh=K.split(/\s*,\s*/).map(function(ut){return ut.split("/")[0]}),W=q.attributes.map(function(ut){return function(zt){var $n=zt.name,gn=zt.value;return $n=="CODECS"&&(gn=ut.Gh.join(","),zt=zt.value.split(","),1<zt.length&&(zt=ci("audio",zt))&&(gn+=","+zt)),new rm($n,gn)}}(J)),B.push(new im(q.id,q.name,W,null)));for(b.push.apply(b,te(B)),Q=[],ie=A(O),Z=ie.next(),ne={};!Z.done;ne={Hh:void 0},Z=ie.next())re=Z.value,(ue=Ve(re,"SUPPLEMENTAL-CODECS"))&&(ne.Hh=ue.split(/\s*,\s*/).map(function(ut){return ut.split("/")[0]}),de=re.attributes.map(function(ut){return function(zt){var $n=zt.name;return zt=zt.value,$n=="CODECS"&&(zt=ut.Hh.join(",")),new rm($n,zt)}}(ne)),Q.push(new im(re.id,re.name,de,null)));O.push.apply(O,te(Q))}return d3(e,b),x3(e,T),se=m3(e,O),L(et,S3(e,b,P,T,h,e.A,se),5);case 5:return l=et.h,c=y3(e,T),L(et,g3(e,I,O),6);case 6:f=et.h,et.s(3);break;case 7:Be=et.h,e.i.set(e.C,Be),Be.stream&&(kt=Gs(Be.stream),Be.stream.segmentIndex.Eb(function(ut){ut.Y&&(ut.Y.Wc=kt)})),v=Be.stream.type,l.push({id:0,language:At(be||"und"),disabledUntilTime:0,primary:!0,audio:v=="audio"?Be.stream:null,video:v=="video"?Be.stream:null,bandwidth:Be.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new Y(2,7,7001);if(Dw(e,i),i.type==1&&(Wi(e)&&(Ow(e,i),mt=e.o,e.B.da(mt)),st=Array.from(e.i.values()),A1(e,st),x1(e),b1(e,i.ca,v,S,h)),e.m={presentationTimeline:e.l,variants:l,textStreams:c,imageStreams:f,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.u},e.$||!e.g.hls.disableCodecGuessing){et.s(8);break}for(pt=[],Ot=A(e.m.variants),lt=Ot.next();!lt.done;lt=Ot.next())St=lt.value,St.audio&&St.audio.codecs===""&&pt.push(St.audio.createSegmentIndex()),St.video&&St.video.codecs===""&&pt.push(St.video.createSegmentIndex());return L(et,Promise.all(pt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),ce(et)}})}function c3(e,t){var n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B;return G(function(F){if(F.g==1)return n=Pd(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=Nw(e,t),r=i.segment,l=i.segmentIndex,c=r.N(),f=c[0],h=new fn(f),v=h.ab.split(".").pop(),(S=O1.get(v))?F.return(Pd(S)):L(F,Promise.all([vw(e,r.Y,0),vw(e,r,l)]),2)):F.return(n);if(T=F.h,b=T[1].mimeType,I=T[0].data,O=T[1].data,P="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),N=["audio/mp4","video/mp4","video/iso.segment"],Rs(Je(O))){var z=O,J=e.g.disableAudio,q=e.g.disableVideo,K=e.g.disableText,W=Je(z),Q=new Wt().parse(W),ie=Q.od();W=Q.Kf();var Z=[],ne=!1,re=!1;if(!J)switch(ie.audio){case"aac":case"aac-loas":Q.fb().length&&(Z.push("mp4a.40.2"),ne=!0);break;case"mp3":Q.fb().length&&(Z.push("mp4a.40.34"),ne=!0);break;case"ac3":Q.fb().length&&(Z.push("ac-3"),ne=!0);break;case"ec3":Q.fb().length&&(Z.push("ec-3"),ne=!0);break;case"opus":Q.fb().length&&(Z.push("opus"),ne=!0)}if(!q)switch(ie.video){case"avc":W.codec?Z.push(W.codec):Z.push("avc1.42E01E"),re=!0;break;case"hvc":W.codec?Z.push(W.codec):Z.push("hvc1.1.6.L93.90"),re=!0;break;case"av1":Z.push("av01.0.01M.08"),re=!0}if(Z.length){if(J=ne&&!re,q=new Map,re&&!K){for(K=new tr("video/mp2t"),K.i(z),z=A(K.j()),re=z.next();!re.done;re=z.next())re=re.value,q.set(re,re);K.g()}W={type:J?"audio":"video",mimeType:"video/mp2t",codecs:Z.join(", "),language:null,height:W.height,width:W.width,channelCount:null,sampleRate:null,closedCaptions:q,Nd:null,colorGamut:null,frameRate:W.frameRate}}else W=null;if(_=W)return F.return(_)}else if((r.Y||P.includes(v)||N.includes(b))&&(B=rv(I,O,e.g.disableText)))return F.return(B);return b?F.return(Pd(b)):F.return(n)})}function vw(e,t,n){var i,r,l,c,f,h;return G(function(v){switch(v.g){case 1:return t?(i=Fi,r=ff(t.N(),t.uc(),t.tc(),e.g.retryParameters),l=t instanceof Ke?1:0,L(v,Na(e,r,i,{type:l}).promise,2)):v.return({mimeType:null,data:null});case 2:if(c=v.h,f=c.data,!t.aesKey){v.s(3);break}return L(v,Ld(f,t.aesKey,n),4);case 4:f=v.h;case 3:return t instanceof Ke?t.Kd(f,!0):t.Kd(f),(h=c.headers["content-type"])&&(h=h.split(";")[0].toLowerCase()),v.return({mimeType:h,data:f})}})}function x1(e){if(Wi(e)){if(e.Ea==dm){for(var t=1/0,n=1/0,i=A(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.stream.segmentIndex&&r.stream.type!="text"&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.Vb),n=Math.min(n,r.Bc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Ce(t)}}else e.l.bb(ww(e));if(!e.l.u)for(t=A(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Bn(n.stream.segmentIndex))&&n.h&&e.l.xh(n.h);e.l.ie()}function f3(e,t){var n=new fn(e.C).g;t=A(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=Ve(r,"NAME");var l=Ve(r,"VALUE");r=Ve(r,"QUERYPARAM"),i&&l&&(e.A.has(i)||e.A.set(i,l)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}function E1(e,t,n){n=new fn(n).g;var i=new Map;t=A(t);for(var r=t.next();!r.done;r=t.next()){var l=r.value,c=Ve(l,"NAME"),f=Ve(l,"VALUE");r=Ve(l,"QUERYPARAM"),l=Ve(l,"IMPORT"),c&&f&&(i.has(c)||i.set(c,f)),r&&(c=n.get(r)[0])&&!i.has(c)&&i.set(r,c),l&&(r=e.A.get(l))&&i.set(l,r)}return i}function d3(e,t){t=A(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=Ve(i,"AUDIO");n=Ve(i,"VIDEO");var l=Ve(i,"SUBTITLES");if(i=mw(e,i),l){var c=ci(ot,i);e.H.set(l,c),Rr(i,c)}r&&(l=ci("audio",i),l||(l=e.g.hls.defaultAudioCodec),e.H.set(r,l)),n&&(r=ci("video",i),r||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}function p3(e,t){t=A(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=Ve(i,"DATA-ID");n=Ve(i,"URI");var l=Ve(i,"LANGUAGE");i=Ve(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",sc([e.C],n,e.A)[0]),l&&r.set("language",l),i&&r.set("value",i),n=new Ie("sessiondata",r),e.h&&e.h.onEvent(n)}}function h3(e,t){var n,i,r,l,c,f;return G(function(h){if(!e.h||!e.g)return h.return();for(i=A(t),r=i.next();!r.done;r=i.next())if(l=r.value,c=Ve(l,"PATHWAY-ID"),f=Ve(l,"SERVER-URI"),c&&f){e.j=new up(e.h),e.j.configure(e.g),e.j.i=[e.C],e.j.setManifestType("HLS"),e.j.h=c,n=wy(e.j,f);break}return L(h,n,0)})}function y3(e,t){var n=sw(t,"SUBTITLES");t=n.map(function(c){if(e.g.disableText)return null;try{return Sw(e,[c],new Map).stream}catch(f){if(e.g.hls.ignoreTextStreamFailures)return null;throw f}}),n=A(n);for(var i=n.next();!i.done;i=n.next()){var r=Bt(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r))){r=A(r);for(var l=r.next();!l.done;l=r.next())l=l.value,l.stream.codecs=i,l.stream.mimeType=I1(ot,i)||am(ot),Of(l.stream)}}return t.filter(function(c){return c})}function Of(e){var t=new Set([dn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Eb(function(n){n.mimeType&&t.add(dn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function g3(e,t,n){var i,r;return G(function(l){return l.g==1?(i=t.map(function(c){var f,h;return G(function(v){if(v.g==1)return e.g.disableThumbnails?v.return(null):(ye(v,2),L(v,E3(e,c),4));if(v.g!=2)return f=v.h,v.return(f.stream);if(h=De(v),e.g.hls.ignoreImageStreamFailures)return v.return(null);throw h})}).concat(n.map(function(c){if(e.g.disableThumbnails)return null;try{var f=Tw(e,c);return f.stream.type!=="image"?null:f.stream}catch(h){if(e.g.hls.ignoreImageStreamFailures)return null;throw h}})),L(l,Promise.all(i),2)):(r=l.h,l.return(r.filter(function(c){return c})))})}function v3(e,t,n){t=t.filter(function(f){var h=Ve(f,"URI")||"";return f=Ve(f,"TYPE"),f!="SUBTITLES"&&(h!=""||f=="AUDIO")});var i={};t=A(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=uw(r,!e.j);i[l]?i[l].push(r):i[l]=[r]}for(var c in i)Sw(e,i[c],n,!1)}function m3(e,t){return t.map(function(n){return n=Tw(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function S3(e,t,n,i,r,l,c){var f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt;return G(function(St){switch(St.g){case 1:if(f=[],h=new Set,e.g.ignoreDrmInfo||!(0<n.length)){St.s(2);break}v=A(n),S=v.next();case 3:if(S.done){St.s(2);break}if(T=S.value,b=Bt(T,"METHOD"),I=Ve(T,"KEYFORMAT")||"identity",O=null,b=="NONE"){St.s(4);break}if(cm(b)){P=sc(r(),Bt(T,"URI"),l),N=P.sort().join(""),e.L.has(N)||(_=un(P,e.g.retryParameters),B=Na(e,_,6).promise,e.L.set(N,B)),St.s(4);break}if(I=="identity")return L(St,_w(e,T,"",r,null,l),12);if(F=e.Sb.get(I),!F){z=null,St.s(10);break}return L(St,F(T,"",null),11);case 11:z=St.h;case 10:O=z,St.s(6);break;case 12:O=St.h;case 6:if(O){if(O.keyIds)for(J=A(O.keyIds),q=J.next();!q.done;q=J.next())K=q.value,h.add(K);f.push(O)}case 4:S=v.next(),St.s(3);break;case 2:for(W={},Q=A(t),ie=Q.next();!ie.done;ie=Q.next())Z=ie.value,ne=uw(Z,!e.j),W[ne]?W[ne].push(Z):W[ne]=[Z];re=[];for(ue in W)de=W[ue],se=de[0],we=Ve(se,"FRAME-RATE"),be=Number(Ve(se,"AVERAGE-BANDWIDTH"))||Number(Bt(se,"BANDWIDTH")),Qe=Ve(se,"RESOLUTION"),Be=A(Qe?Qe.split("x"):[null,null]),kt=Be.next().value,mt=Be.next().value,st=Ve(se,"VIDEO-RANGE"),(pt=Ve(se,"REQ-VIDEO-LAYOUT"))&&pt.includes(",")&&(Ot=pt.split(",").filter(function(et){return et=="CH-STEREO"||et=="CH-MONO"}),pt=Ot[0]),pt=pt||"CH-MONO",lt=T3(e,de,i),re.push.apply(re,te(w3(e,lt.audio,lt.video,be,kt,mt,we,st,pt,f,h,c)));return St.return(re.filter(function(et){return et!=null}))}})}function T3(e,t,n){for(var i={audio:[],video:[]},r=new Map,l=[],c=!1,f=!1,h=A(t),v=h.next();!v.done;v=h.next()){var S=v.value;v=Ve(S,"AUDIO");var T=Ve(S,"VIDEO"),b=v||T;b&&(l.includes(b)||l.push(b),(S=Ve(S,"PATHWAY-ID"))&&r.set(b,S),v?c=!0:T&&(f=!0))}l.length&&n.length&&(n=n.filter(function(O){return l.includes(Bt(O,"GROUP-ID"))}),v3(e,n,r)),n=(r=l.sort().join(","))&&e.I.has(r)?e.I.get(r):[],c?i.audio.push.apply(i.audio,te(n)):f&&i.video.push.apply(i.video,te(n)),c=!1;var I=t.map(function(O){return Bt(O,"URI")});return v=i.audio.find(function(O){return O&&O.N().find(function(P){return I.includes(P)})}),f=mw(e,t[0]),n=ci("video",f),(h=ci("audio",f))&&!n?(v="audio",c=0<i.audio.length):!i.audio.length&&!i.video.length&&h&&n?(v="video",f=[[n,h].join()]):i.audio.length&&v?(v="audio",c=!0):v=i.video.length&&!i.audio.length?"audio":"video",c||(e=A3(e,t,f,v),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function mw(e,t){return t=Ve(t,"CODECS")||"",e.$=0<t.length,e.$||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),yn(t.split(/\s*,\s*/))}function w3(e,t,n,i,r,l,c,f,h,v,S,T){for(var b=A(n),I=b.next();!I.done;I=b.next())Pw(I.value.stream,r,l,c,f,h,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],t=A(t),l=t.next();!l.done;l=t.next())for(l=l.value,c=A(n),f=c.next();!f.done;f=c.next()){var O=f.value;(f=l?l.stream:null)&&(f.drmInfos=v,f.keyIds=S),(h=O?O.stream:null)&&(h.drmInfos=v,h.keyIds=S,e.g.disableIFrames||th(h,T)),h&&!f&&(h.bandwidth=i),!h&&f&&(f.bandwidth=i),b=l?l.stream.drmInfos:null,I=O?O.stream.drmInfos:null,O=O?O.N().sort().join(","):"";var P=l?l.N().sort().join(","):"",N=[];f&&f.codecs&&N.push(f.codecs),h&&h.codecs&&N.push(h.codecs),O=[O,P,N.sort()].join("-"),f&&h&&!Mu(b,I)||e.Na.has(O)||(f={id:e.F++,language:f?f.language:"und",disabledUntilTime:0,primary:!!f&&f.primary||!!h&&h.primary,audio:f,video:h,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(f),e.Na.add(O))}return r}function x3(e,t){t=sw(t,"CLOSED-CAPTIONS"),e.O=t.length==0,t=A(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=Ve(i,"LANGUAGE");n=At(r||"und"),r||(r=Ve(i,"NAME"))&&(n=r),r=Bt(i,"GROUP-ID"),i=Bt(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}function Sw(e,t,n,i){i=i===void 0?!0:i;for(var r=[],l=[],c=new Map,f=A(t),h=f.next();!h.done;h=f.next()){var v=h.value;h=i?Bt(v,"URI"):Ve(v,"URI")||"shaka://hls-muxed",v=Bt(v,"GROUP-ID"),r.push(h),l.push(v),c.set(v,h)}if(i=l.sort().join(","),h=t[0],t="",f=Bt(h,"TYPE").toLowerCase(),f=="subtitles"&&(f=ot),f==ot)t=Ve(h,"CODECS")||"";else for(l=A(l),v=l.next();!v.done;v=l.next())if(v=v.value,e.H.has(v)){t=e.H.get(v);break}if(l=r.sort().join(","),e.i.has(l))return e.i.get(l);if(v=e.F++,e.j){c=A(c);for(var S=c.next();!S.done;S=c.next()){var T=A(S.value);S=T.next().value,T=T.next().value,(S=n.get(S))&&ap(e.j,v,S,T)}}n=Ve(h,"LANGUAGE"),c=Ve(h,"NAME"),S=Ve(h,"DEFAULT")=="YES",f=="audio"?T=(T=Ve(h,"CHANNELS"))?parseInt(T.split("/")[0],10):null:T=null;var b;f=="audio"&&(b=Ve(h,"CHANNELS"))?(b=b.split("/"),b=b.length!=2?!1:b[1]==="JOC"||b[1].includes("ATMOS")):b=!1;var I=Ve(h,"CHARACTERISTICS"),O=Ve(h,"FORCED")=="YES";return f=="audio"?h=(h=Ve(h,"SAMPLE-RATE"))?parseInt(h,10):null:h=null,r=um(e,v,r,t,f,n,S,c,T,null,I,O,h,b),r.stream&&(r.stream.groupId=i),e.I.has(i)?e.I.get(i).push(r):e.I.set(i,[r]),e.i.set(l,r),r}function E3(e,t){var n,i,r,l,c,f,h,v,S,T;return G(function(b){return b.g==1?(n=Bt(t,"URI"),i=Ve(t,"CODECS","jpeg")||"",e.i.has(n)?b.return(e.i.get(n)):(r=Ve(t,"LANGUAGE"),l=Ve(t,"NAME"),c=Ve(t,"CHARACTERISTICS"),f=um(e,e.F++,[n],i,"image",r,!1,l,null,null,c,!1,null,!1),(h=Ve(t,"RESOLUTION"))?L(b,f.stream.createSegmentIndex(),3):b.s(2))):(b.g!=2&&(v=Bn(f.stream.segmentIndex),S=v.tilesLayout)&&(f.stream.width=Number(h.split("x")[0])*Number(S.split("x")[0]),f.stream.height=Number(h.split("x")[1])*Number(S.split("x")[1])),(T=Ve(t,"BANDWIDTH"))&&(f.stream.bandwidth=Number(T)),e.i.set(n,f),b.return(f))})}function Tw(e,t){var n="video",i=Bt(t,"URI"),r=Ve(t,"CODECS")||"";if(r=="mjpg"&&(n="image"),e.i.has(i))return e.i.get(i);var l=Ve(t,"LANGUAGE"),c=Ve(t,"NAME"),f=Ve(t,"CHARACTERISTICS");return n=um(e,e.F++,[i],r,n,l,!1,c,null,null,f,!1,null,!1),r=Ve(t,"RESOLUTION"),l=A(r?r.split("x"):[null,null]),r=l.next().value,l=l.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(l)||void 0,(t=Ve(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function A3(e,t,n,i){for(var r=e.F++,l=[],c=A(t),f=c.next();!f.done;f=c.next()){var h=f.value;f=Bt(h,"URI"),h=Ve(h,"PATHWAY-ID"),e.j&&h&&ap(e.j,r,h,f),l.push(f)}if(c=l.sort().join(",")+n.sort().join(","),e.i.has(c))return e.i.get(c);f=l.join(",");e:{if(t=Ve(t[0],"CLOSED-CAPTIONS"),i=="video"){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if(t!="NONE"){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=A(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return n=$l(i,n),i=um(e,r,l,n,i,null,!1,f,null,t,null,!1,null,!1),e.i.set(c,i),i}function um(e,t,n,i,r,l,c,f,h,v,S,T,b,I){function O(z){var J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt,St;return G(function(et){switch(et.g){case 1:return J=wn,ye(et,2),L(et,z.promise,4);case 4:if(q=et.h,z.aborted)return et.return();if(K=q.uri,K!=q.originalUri&&(W=_.N(),W.includes(K)||_.ve.push(K)),Q=S1(e.Ga,q.data),Q.type!=1)throw new Y(2,4,4017);return ie=Eo(Q.ca,"EXT-X-DEFINE"),Z=E1(e,ie,K),ne=!1,(!e.$&&e.g.hls.disableCodecGuessing||e.O&&r==J.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<Q.segments.length&&(e.O=!1,ne=!0),re=!e.$&&e.g.hls.disableCodecGuessing,ue=Wi(e),L(et,Ew(e,0,Z,Q,P,i,r,l,c,f,h,v,S,T,b,I,void 0,ne,re),5);case 5:if(de=et.h,z.aborted)return et.return();if(se=de.stream,Dw(e,Q),Wi(e)&&!ue&&Ow(e,Q),_.Bc=de.Bc,_.Vb=de.Vb,_.Ud=de.Ud,_.Td=de.Td,_.rd=de.rd,_.je=de.je,_.Ab=de.Ab,_.Bb=de.Bb,_.Rf=!0,N.segmentIndex=se.segmentIndex,N.encrypted=se.encrypted,N.drmInfos=se.drmInfos,N.keyIds=se.keyIds,N.mimeType=se.mimeType,N.bandwidth=N.bandwidth||se.bandwidth,N.codecs=N.codecs||se.codecs,N.closedCaptions=N.closedCaptions||se.closedCaptions,N.width=N.width||se.width,N.height=N.height||se.height,N.hdr=N.hdr||se.hdr,N.colorGamut=N.colorGamut||se.colorGamut,N.frameRate=N.frameRate||se.frameRate,N.language=="und"&&se.language!="und"&&(N.language=se.language),N.language=N.language||se.language,N.channelsCount=N.channelsCount||se.channelsCount,N.audioSamplingRate=N.audioSamplingRate||se.audioSamplingRate,Of(N),N.drmInfos.length&&e.h.newDrmInfo(N),we=!1,(!v&&N.closedCaptions||v&&N.closedCaptions&&v.size!=N.closedCaptions.size)&&(we=!0),e.m&&we&&e.h.makeTextStreamsForClosedCaptions(e.m),r==J.la||r==J.V)for(be=A(e.i.values()),Qe=be.next();!Qe.done;Qe=be.next())Be=Qe.value,Be.Rf||Be.type!=r||(Be.stream.mimeType=se.mimeType,Of(Be.stream));r==J.za&&(kt=Bn(se.segmentIndex))&&kt.Y&&(N.mimeType="application/mp4",Of(N)),mt=Gs(N),N.segmentIndex.Eb(function(ut){ut.Y&&(ut.Y.Wc=mt)}),C3(e)&&(e.Ub?A1(e,[_]):(e.Ub=!0,st=Array.from(e.i.values()),pt=st.filter(function(ut){return ut.stream.segmentIndex}),A1(e,pt),x1(e),Ot=e.o,0<Ot&&e.B.da(Ot))),b1(e,Q.ca,N.type,Z,P),e.m&&(e.m.startTime=e.u),Le(et,0);break;case 2:if(lt=De(et),N.closeSegmentIndex(),lt.code===7001)return et.return();if(St=e.h.disableStream(N),!St)throw lt;ce(et)}})}function P(){return e.j&&1<n.length?xy(e.j,t):_.ve.concat(cw([e.C],n,e.A))}var N=Cw(e,i,r,l,c,f,h,v,S,T,b,I);n.includes("shaka://hls-muxed")&&(N.isAudioMuxedInVideo=!0,N.mimeType="video/mp2t",Of(N));var _={stream:N,type:r,ve:[],Bc:0,Vb:0,je:new Map,Ud:!1,Td:!1,rd:!1,qf:-1,Ab:-1,Bb:-1,Rf:!1,N:P},B=null,F;return N.createSegmentIndex=function(){return B||(N.isAudioMuxedInVideo?(N.segmentIndex=new Ct([]),Promise.resolve()):(F=D1(e,_.N(),!0),B=new Promise(function(z){z(O(F))})))},N.closeSegmentIndex=function(){B&&!N.segmentIndex&&F.abort(),N.segmentIndex&&(N.segmentIndex.release(),N.segmentIndex=null),B=null},_}function ww(e){var t=1/0;e=A(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Vb));return t}function xw(e,t){var n=[];t=A(t);for(var i=t.next();!i.done;i=t.next())i=i.value,i.segmentIndex&&i.segmentIndex.Eb(function(r){n.push(r)});e.l.Ed(n)}function A1(e,t){if(!Wi(e))for(var n=ww(e),i=A(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Oc(0,n);xw(e,t.map(function(l){return l.stream})),i=Array.from(e.i.values()).filter(function(l){return l.stream.segmentIndex}),n=i.some(function(l){return l.stream.type=="audio"}),r=i.some(function(l){return l.stream.type=="video"}),i=Wi(e)&&!e.Ma,n=!Wi(e)&&e.Ma&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?yw(e,t,i):(a3(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&yw(e,t))}function Dy(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function C3(e){if(!e.m)return!1;var t=[],n=[];e=A(e.m.variants);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&t.push(i.video),i.audio&&n.push(i.audio);return!(0<t.length&&!t.some(function(r){return r.segmentIndex})||0<n.length&&!n.some(function(r){return r.segmentIndex}))}function Ew(e,t,n,i,r,l,c,f,h,v,S,T,b,I,O,P,N,_,B){_=_===void 0?!0:_,B=B===void 0?!0:B;var F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we,be,Qe,Be,kt,mt,st,pt,Ot,lt,St,et,ut,zt,$n;return G(function(gn){switch(gn.g){case 1:if(F=i.segments||[],z=F.every(function(mn){return!!mi(mn.ca,"EXT-X-GAP")}),!F.length||z)throw new Y(2,4,4053);if(b3(e,i),Wi(e)&&C1(e,i),J=Wi(e)?e.M.get(c):new Map,q=Rw(e,i,J,n,r,c),K=q.segments,W=q.bandwidth,re=ne=Z=ie=Q=null,!(0<K.length&&_)){gn.s(2);break}return L(gn,c3(e,K),3);case 3:ue=gn.h,c=ue.type,f=ue.language,S=ue.channelCount,O=ue.sampleRate,e.g.disableText||(T=ue.closedCaptions),ie=ue.height,Q=ue.width,Z=ue.Nd,ne=ue.colorGamut,re=ue.frameRate,B&&(N=ue.mimeType,l=ue.codecs);case 2:if(N){gn.s(4);break}return L(gn,O3(e,c,l,K),5);case 5:N=gn.h,c!=ot||l||N!="application/mp4"||!K[0]||K[0].Y||(N="text/vtt");case 4:return L(gn,bw(e,i,N,r,n),6);case 6:if(de=gn.h,se=de.drmInfos,we=de.keyIds,be=de.encrypted,Qe=de.Bg,be&&!se.length&&!Qe)throw new Y(2,4,4026);return Be=Cw(e,l,c,f,h,v,S,T,b,I,O,P),Be.encrypted=be&&!Qe,Be.drmInfos=se,Be.keyIds=we,Be.mimeType=N,W&&(Be.bandwidth=W),Of(Be),c=="video"&&(Q||ie||Z||ne)&&Pw(Be,Q,ie,re,Z,null,ne),Wi(e)&&C1(e,i),kt=K[0].startTime,mt=K[K.length-1],st=mt.endTime,pt=new Ct(K),Be.segmentIndex=pt,lt=(Ot=mi(i.ca,"EXT-X-SERVER-CONTROL"))?cp(Ot,"CAN-SKIP-UNTIL")!=null:!1,St=Ot?cp(Ot,"CAN-BLOCK-RELOAD")!=null:!1,et=fp(i.ca,"EXT-X-MEDIA-SEQUENCE",0),ut=Aw(et,K),zt=ut.Ab,$n=ut.Bb,gn.return({stream:Be,type:c,ve:[],N:r,Bc:kt,Vb:st,Ud:lt,Td:St,rd:!1,qf:-1,Ab:zt,Bb:$n,je:J,Rf:!1})}})}function Aw(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Ab:e,Bb:n};t=t[t.length-1];var i=t.g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Ab:e,Bb:n}):(e++,t.m&&(n=0),{Ab:e,Bb:n})}function Cw(e,t,n,i,r,l,c,f,h,v,S,T){var b=I1(n,t)||am(n),I=[];if(h){h=A(h.split(","));for(var O=h.next();!O.done;O=h.next())I.push(O.value)}return h=void 0,O=null,n==ot?h=I.includes("public.accessibility.transcribes-spoken-dialog")&&I.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":I.includes("public.accessibility.describes-video")&&(O="visually impaired"),I.length||h!=="subtitle"||I.push("subtitle"),e={id:e.F++,originalId:l,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b,codecs:t,kind:n==ot?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:At(i||"und"),originalLanguage:i,label:l,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:I,forced:v,channelsCount:c,audioSamplingRate:S,spatialAudio:T,closedCaptions:f,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:O,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},Of(e),e}function bw(e,t,n,i,r){var l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we;return G(function(be){switch(be.g){case 1:if(l=new Map,!e.g.ignoreDrmInfo&&t.segments){for(c=A(t.segments),f=c.next();!f.done;f=c.next())if(h=f.value,v=Eo(h.ca,"EXT-X-KEY"),S=null,v.length)for(S=kw(e,t,h.ca,i,r),T=A(v),b=T.next();!b.done;b=T.next())I=b.value,l.set(I,S)}P=O=!1,N=[],_=new Set,B=A(l),F=B.next();case 2:if(F.done){be.s(4);break}if(z=F.value,J=A(z),q=J.next().value,K=J.next().value,W=q,Q=K,ie=Bt(W,"METHOD"),ie=="NONE"){be.s(3);break}if(O=!0,Z=Ve(W,"KEYFORMAT")||"identity",ne=null,cm(ie)){P=!0,be.s(3);break}if(Z=="identity")return L(be,_w(e,W,n,i,Q,r),11);if(re=e.Sb.get(Z),!re){ue=null,be.s(9);break}return L(be,re(W,n,Q),10);case 10:ue=be.h;case 9:ne=ue,be.s(6);break;case 11:ne=be.h;case 6:if(ne){if(ne.keyIds)for(de=A(ne.keyIds),se=de.next();!se.done;se=de.next())we=se.value,_.add(we);N.push(ne)}case 3:F=B.next(),be.s(2);break;case 4:return be.return({drmInfos:N,keyIds:_,encrypted:O,Bg:P})}})}function Iw(e,t,n,i,r){if(!E.crypto||!E.crypto.subtle)throw Et("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new Y(2,4,4042);var l=0,c=Ve(t,"IV","");if(c){var f=Zl(c.substr(2));if(f.byteLength!=16)throw new Y(2,4,4048)}else l=fp(n.ca,"EXT-X-MEDIA-SEQUENCE",0);var h=sc(i(),Bt(t,"URI"),r),v=h.sort().join("");if(n=t.toString()+"-"+l+"-"+v,!e.ka.has(n)){var S={bitsKey:128,blockCipherMode:"CBC",iv:f,firstMediaSequenceNumber:l};switch(Bt(t,"METHOD")){case"AES-256":S.bitsKey=256;break;case"AES-256-CTR":S.bitsKey=256,S.blockCipherMode="CTR"}S.fetchKey=function(){var T,b,I,O;return G(function(P){if(P.g==1)return e.L.has(v)||(T=un(h,e.g.retryParameters),b=Na(e,T,6).promise,e.L.set(v,b)),L(P,e.L.get(v),2);if(P.g!=3){if(I=P.h,!I.data||I.data.byteLength!=S.bitsKey/8)throw new Y(2,4,4049);return O={name:S.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:S.bitsKey},L(P,E.crypto.subtle.importKey("raw",I.data,O,!0,["decrypt"]),3)}S.cryptoKey=P.h,S.fetchKey=void 0,ce(P)})},e.ka.set(n,S)}return e.ka.get(n)}function Dw(e,t){e.u==null&&(t=mi(t.ca,"EXT-X-START"))&&(e.u=Number(Bt(t,"TIME-OFFSET")))}function b3(e,t){var n=mi(t.ca,"EXT-X-PLAYLIST-TYPE");t=mi(t.ca,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?sm(e,fm):n?sm(e,dm):sm(e,Bw)}function C1(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var l=mi(i[r].ca,"EXTINF");if(l){n=Number(l.value.split(",")[0]);break}r--}if(i=mi(t.ca,"EXT-X-TARGETDURATION"),!i)throw new Y(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=mi(t.ca,"EXT-X-PART-INF"))&&(e.P=Number(Bt(r,"PART-TARGET"))),t=mi(t.ca,"EXT-X-SERVER-CONTROL"),e.fa&&e.P?(e.o=e.Tb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Fa=t?Number(Bt(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?cp(t,"HOLD-BACK"):null,e.Aa=n?Number(n.value):0),e.La=Math.max(i,e.La)}function Ow(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.Aa)n=e.Aa;else{var i=t.segments.length,r=e.g.hls.liveSegmentsDelay;for(r>i-2&&(r=Math.max(1,i-2)),r=i-r;r<i;r++){var l=mi(t.segments[r].ca,"EXTINF");n=l?n+Math.ceil(Number(l.value.split(",")[0])):n+e.La}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.yh(0),e.l.jg(n),e.l.Gc(!1)}function kw(e,t,n,i,r){var l=mi(n,"EXT-X-MAP");if(!l)return null;var c=Bt(l,"URI"),f=sc(i(),c,r);if(c=[f.toString(),Ve(l,"BYTERANGE","")].join("-"),!e.sa.has(c)){var h=void 0,v=null,S=!1;n=A(n);for(var T=n.next();!T.done;T=n.next())T=T.value,T.name=="EXT-X-KEY"?(S=Bt(T,"METHOD"),cm(S)&&T.id<l.id?(S=!1,h=Iw(e,T,t,i,r)):S=S!="NONE"):T.name=="EXT-X-BYTERANGE"&&T.id<l.id&&(v=T);t=I3(f,l,v,h,S),e.sa.set(c,t)}return e.sa.get(c)}function I3(e,t,n,i,r){var l=0,c=null;return t=Ve(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(l=t.split("@"),c=Number(l[0]),l=Number(l[1]),c=l+c-1,i&&(n=c+1-l,n%16&&(c+=16-n%16))),new Ei(function(){return e},l,c,null,null,null,i,r)}function D3(e,t,n,i,r,l,c,f,h){function v(be){be=new fn(be).ab.split(".").pop();var Qe=k1.get(c).get(be);return Qe||(Qe=O1.get(be)),Qe}var S=i.ca,T=mi(S,"EXTINF"),b=0,I=0,O=null;i.Jb.length&&(e.m.isLowLatency=!0);var P=null;if(!e.g.hls.ignoreManifestProgramDateTime){var N=mi(S,"EXT-X-PROGRAM-DATE-TIME");N&&N.value&&(P=yl(N.value),e.Ma=!0)}var _=po;if(mi(S,"EXT-X-GAP")&&(e.m.gapCount++,_=2),!T){if(i.Jb.length==0)throw new Y(2,4,4024,"EXTINF");if(!e.fa)return null}var B=[];N=!1;var F=null,z=!1,J=!1;if(e.fa&&i.Jb.length){b=t&&E.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var q=P,K={},W=0;W<i.Jb.length;K={Le:void 0,re:void 0},W++){var Q=i.Jb[W],ie=W==0?n:B[B.length-1],Z=W==0?r:ie.endTime,ne=Number(Ve(Q,"DURATION"))||e.P;if(ne){var re=Z+ne,ue=0,de=null;if(Q.name=="EXT-X-PRELOAD-HINT"?(ue=(ue=Ve(Q,"BYTERANGE-START"))?Number(ue):0,(ie=Ve(Q,"BYTERANGE-LENGTH"))?de=ue+Number(ie)-1:ue&&(de=Number.MAX_SAFE_INTEGER)):(ue=Ve(Q,"BYTERANGE"),de=A(Mw(ie,ue)),ue=de.next().value,de=de.next().value),K.re=Ve(Q,"URI"),K.re){ie=po,Ve(Q,"GAP")=="YES"&&(e.m.gapCount++,ie=2,z=!0),K.Le=null;var se=function(be){return function(){return be.Le==null&&(be.Le=sc(f(),be.re,l)),be.Le}}(K);b&&0<=ue&&de!=null&&(F=se,N=!0),Z=new Ke(Z,re,se,ue,de,t,0,0,1/0,[],"",null,q,ie,h),Q.name=="EXT-X-PRELOAD-HINT"&&(Z.Sf(),J=!0),Ve(Q,"INDEPENDENT")!="YES"&&0<W&&Z.Vc(),(K=v(K.re))&&(Z.mimeType=K,jw.has(K)&&(Z.Y=null)),B.push(Z),q&&(q+=ne)}}}}if(T){if(T=Number(T.value.split(",")[0]),T==0)return null;b=r+T}else if(B.length)b=B[B.length-1].endTime;else return null;N&&(z||B[0].Sa!=0?(N=!1,F=null):B=[]),(T=mi(S,"EXT-X-BYTERANGE"))?(O=A(Mw(n,T.value)),I=O.next().value,O=O.next().value):B.length&&(I=B[0].Sa,O=B[B.length-1].wa),n="",T=null,c=="image"&&(n="1x1",S=mi(S,"EXT-X-TILES"))&&(n=Bt(S,"LAYOUT"),(S=Ve(S,"DURATION"))&&(T=Number(S)));var we=null;return t=new Ke(r,b,function(){return F?F():(we==null&&(we=sc(f(),i.g,l)),we||[])},I,O,t,0,0,1/0,B,n,T,P,_,h,0<B.length&&!!i.g),(r=v(i.g))&&(t.mimeType=r,jw.has(r)&&(t.Y=null)),N&&(e.Tb=!0,t.dh(),J&&t.Sf()),t}function Mw(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.wa+1,i=n+t-1),[n,i]}function b1(e,t,n,i,r){if(n=="video"||n=="audio"){var l=e.l.m;if(l&&!Dy(e,n))for(t=Eo(t,"EXT-X-DATERANGE"),t=t.filter(function(Z){return cp(Z,"START-DATE")!=null}).sort(function(Z,ne){return Z=Bt(Z,"START-DATE"),ne=Bt(ne,"START-DATE"),Z<ne?-1:Z>ne?1:0}),n=0;n<t.length;n++){var c=t[n];try{var f=Bt(c,"ID");if(!e.ya.has(f)){var h=Bt(c,"START-DATE"),v=yl(h);if(!isNaN(v)){var S=Math.max(0,v-l),T=null,b=Ve(c,"END-DATE");if(b){var I=yl(b);if(!isNaN(I)&&(T=I-l,0>T))continue}if(T==null){var O=Ve(c,"DURATION")||Ve(c,"PLANNED-DURATION");if(O){var P=parseFloat(O);if(isNaN(P)||(T=S+P),0>v-l+P)continue}}var N=Ve(c,"CLASS")||"com.apple.quicktime.HLS",_=Ve(c,"END-ON-NEXT")=="YES";if(T==null&&_){for(var B=n+1;B<t.length;B++){var F=Ve(t[B],"CLASS")||"com.apple.quicktime.HLS";if(N==F){var z=Bt(t[B],"START-DATE"),J=yl(z);if(!isNaN(J)&&J&&J>v){T=Math.max(0,J-l);break}}}if(T==null)continue}B=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var q=[],K=A(c.attributes),W=K.next();!W.done;W=K.next()){var Q=W.value;if(!B.includes(Q.name)){var ie=fw(Q.value,i);(Q.name=="X-ASSET-URI"||Q.name=="X-ASSET-LIST")&&(ie=sc(r(),Q.value,i)[0]),q.push({key:Q.name,description:"",data:ie,mimeType:null,pictureType:null})}}1<q.length&&e.h.onMetadata(N,S,T,q),e.ya.add(f)}}}catch{}}}}function Rw(e,t,n,i,r,l){var c=t.segments,f=void 0,h=fp(t.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),v=fp(t.ca,"EXT-X-MEDIA-SEQUENCE",0),S=mi(t.ca,"EXT-X-SKIP"),T=S?Number(Ve(S,"SKIPPED-SEGMENTS")):0,b=v+T,I=0;Wi(e)&&n.has(b)&&(I=n.get(b)),I===0&&e.Ea==dm&&0<n.size&&!n.has(b)&&e.l.i!=null&&(I=e.l.pb());var O=[],P=null;S=[];for(var N=0;N<c.length;N++){var _=c[N],B=N==0?I:P.endTime;b=v+T+N,mi(_.ca,"EXT-X-DISCONTINUITY")&&(h++,P&&P.Y&&(P.Y.g=B));for(var F=A(_.ca),z=F.next();!z.done;z=F.next())z=z.value,z.name=="EXT-X-KEY"&&(cm(Bt(z,"METHOD"))?f=Iw(e,z,t,r,i):f=void 0);n.set(b,B),F=kw(e,t,_.ca,r,i),(B=D3(e,F,P,_,B,i,l,r,f))&&((P=fp(_.ca,"EXT-X-BITRATE"))?S.push({bitrate:P,duration:B.endTime-B.startTime}):S.length&&(P=S.pop(),P.duration+=B.endTime-B.startTime,S.push(P)),P=B,B.i=h,Dy(e,l)&&e.K!=null&&b<e.K||O.push(B))}if(t=void 0,S.length&&(t=S.reduce(function(J,q){return J+q.duration},0),t=Math.round(S.reduce(function(J,q){return J+q.bitrate*q.duration},0)/t*1e3)),S=O.some(function(J){return J.h!=null})){for(n={},i=0;i<O.length;n={Xd:void 0,Wd:void 0,Qd:void 0,Dc:void 0,Pd:void 0},i++)if(n.Dc=O[i],n.Dc.h==null)for(n.Wd=0,n.Xd=i,r=function(J){return function(){var q=O[J.Xd];if(q){if(q.h!=null)return q.h+J.Wd;J.Wd-=q.endTime-q.startTime,J.Xd+=1}return null}}(n),n.Pd=0,n.Qd=i,c=function(J){return function(){var q=O[J.Qd];if(q){if(q!=J.Dc&&(J.Pd+=q.endTime-q.startTime),q.h!=null)return q.h+J.Pd;--J.Qd}return null}}(n);n.Dc.h==null;)n.Dc.h=c(),n.Dc.h==null&&(n.Dc.h=r())}if(S)for(n=A(O),i=n.next();!i.done;i=n.next())for(r=i.value,i=r.h,r=A(r.g),c=r.next();!c.done;c=r.next())c=c.value,c.h=i,i+=c.endTime-c.startTime;if(n=e.ea,S&&n!=1/0&&!Dy(e,l))for(e=A(O),l=e.next();!l.done;l=e.next())l.value.qg(n);return{segments:O,bandwidth:t}}function I1(e,t){if(e==ot){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function am(e){return e==ot?"text/vtt":k1.get(e).get("mp4")}function Nw(e,t){e=Wi(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.dc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function O3(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P,N;return G(function(_){switch(_.g){case 1:return r=Fi,l=Nw(e,i),c=l.segment,c.status==2?_.return(am(t)):(f=c.N(),h=new fn(f[0]),v=h.ab.split(".").pop(),S=k1.get(t),(T=S.get(v))||(T=O1.get(v))||(T=I1(t,n))?_.return(T):(I=1,O=un(f,e.g.retryParameters),ye(_,2),O.method="HEAD",L(_,Na(e,O,r,{type:I}).promise,4)));case 4:P=_.h,b=P.headers["content-type"],Le(_,3);break;case 2:if(N=De(_),!N||N.code!=1002&&N.code!=1001){_.s(3);break}return O.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(O.headers.Range="bytes=0-0"),L(_,Na(e,O,r,{type:I}).promise,6);case 6:P=_.h,b=P.headers["content-type"];case 3:if(!b){_.s(7);break}if(T=b.toLowerCase().split(";")[0],T!="application/octet-stream"){_.s(8);break}if(P.data.byteLength){_.s(9);break}return O.method="GET",L(_,Na(e,O,r,{type:I}).promise,10);case 10:P=_.h;case 9:Rs(Je(P.data))&&(T="video/mp2t");case 8:if(T!="application/octet-stream")return _.return(T);case 7:return _.return(am(t))}})}function Pw(e,t,n,i,r,l,c){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=l||void 0,e.colorGamut=c||void 0)}function D1(e,t,n){return Na(e,un(t,e.g.retryParameters),0,{type:n?2:3})}function Lw(e){var t,n,i,r,l,c;return G(function(f){switch(f.g){case 1:return e.h?(ye(f,2),t=Date.now(),L(f,e.update(),4)):f.return();case 4:n=Date.now(),Wi(e)&&(i=(n-t)/1e3,e.Pb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.o,l=Math.max(0,r-Uf(e.Pb)),e.B.da(l)),Le(f,3);break;case 2:if(c=De(f),!e.h)return f.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(c),f.return();c.severity=1,e.h.onError(c),e.B.da(.1);case 3:if(!e.h)return f.return();e.h.onManifestUpdated(),ce(f)}})}function Wi(e){return e.Ea!=fm}function sm(e,t){e.Ea=t,e.l&&e.l.Gc(!Wi(e)),Wi(e)||e.B.stop()}function Na(e,t,n,i){if(!e.Z)throw new Y(2,7,7001);return i||(i={}),i.isPreload=e.Qb(),t=e.h.networkingEngine.request(n,t,i),Ko(e.Z,t),t}function cm(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function k3(e,t,n,i){var r,l,c,f,h,v;return G(function(S){if(S.g==1){if(n=="video/mp2t")throw new Y(2,4,4040);if(E.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(r=Bt(t,"METHOD"),l=["SAMPLE-AES","SAMPLE-AES-CTR"],!l.includes(r))return S.return(null);c="cenc",r=="SAMPLE-AES"&&(c="cbcs"),f=Bt(t,"URI"),h=Mr("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],f);var T=new fn(f).nb.replace(/-/g,"").toLowerCase();return(v=T.length===32&&/^[0-9a-f]+$/.test(T)?T:null)||!i?S.s(2):L(S,Uw(e,i),3)}return S.g!=2&&(v=S.h),v&&h.keyIds.add(v),S.return(h)})}function _w(e,t,n,i,r,l){var c,f,h,v,S,T,b,I,O,P,N,_;return G(function(B){switch(B.g){case 1:if(n=="video/mp2t")throw new Y(2,4,4040);if(E.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(c=Bt(t,"METHOD"),f=["SAMPLE-AES","SAMPLE-AES-CTR"],!f.includes(c))return B.return(null);if(h=sc(i(),Bt(t,"URI"),l),h[0].startsWith("data:text/plain;base64,")){v=gr(Hi(h[0].split("data:text/plain;base64,").pop())),B.s(2);break}return S=h.sort().join(""),e.oa.has(S)||(T=un(h,e.g.retryParameters),b=Na(e,T,6).promise,e.oa.set(S,b)),L(B,e.oa.get(S),3);case 3:I=B.h,v=gr(I.data);case 2:if(O="00000000000000000000000000000000",!r){B.s(4);break}return L(B,Uw(e,r),5);case 5:(P=B.h)&&(O=P);case 4:return N=new Map,N.set(O,v),_="cenc",c=="SAMPLE-AES"&&(_="cbcs"),B.return(dl(N,_))}})}function Uw(e,t){var n,i,r,l;return G(function(c){return c.g==1?(n=null,e.pa.has(t)?(n=e.pa.get(t),c.s(2)):(i=ff(t.N(),t.uc(),t.tc(),e.g.retryParameters),r=Fi,L(c,Na(e,i,r,{type:0}).promise,3))):(c.g!=2&&(l=c.h,t.Kd(l.data),n=f0(l.data),e.pa.set(t,n)),c.return(n))})}Me("shaka.hls.HlsParser",lm);var O1=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),M3=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"),R3=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"),N3=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"),P3=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),k1=new Map().set("audio",M3).set("video",R3).set("text",N3).set("image",P3),jw=new Set(["video/mp2t"].concat(te(lo))),fm="VOD",Bw="EVENT",dm="LIVE",L3={Ph:fm,Zj:Bw,gk:dm};ta("application/x-mpegurl",function(){return new lm}),ta("application/vnd.apple.mpegurl",function(){return new lm});function pm(e){return Xv(e)}var _3=new Map().set("com.microsoft.playready",pm).set("com.microsoft.playready.recommendation",pm).set("com.microsoft.playready.software",pm).set("com.microsoft.playready.hardware",pm);function M1(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.C=new Ha(5),this.o=new ct(function(){U3(e)}),this.B=new ao,this.m=new Map,this.A=function(){return!1}}y=M1.prototype,y.configure=function(e,t){this.g=e,t&&(this.A=t)},y.start=function(e,t){var n=this;return G(function(i){if(i.g==1)return n.l=[e],n.h=t,L(i,R1(n),2);if(!n.h)throw new Y(2,7,7001);return i.return(n.j)})};function U3(e){var t;G(function(n){switch(n.g){case 1:return ye(n,2),L(n,R1(e),4);case 4:Le(n,3);break;case 2:t=De(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();ce(n)}})}y.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},y.update=function(){var e=this,t;return G(function(n){if(n.g==1)return ye(n,2),L(n,R1(e),4);if(n.g!=2)return Le(n,0);if(t=De(n),!e.h||!t)return n.return();e.h.onError(t),ce(n)})},y.onExpirationUpdated=function(){},y.onInitialVariantChosen=function(){},y.banLocation=function(){},y.setMediaElement=function(){};function R1(e){var t,n,i,r,l,c,f;return G(function(h){if(h.g==1)return t=un(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),Ko(e.B,r),L(h,r.promise,2);if(l=h.h,!e.h)return h.return();l.uri&&!e.l.includes(l.uri)&&e.l.unshift(l.uri);var v=l.uri,S=l.data,T=e.g.mss.manifestPreprocessor;if(T!=Js){if(bt("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),S=XT(S,"SmoothStreamingMedia"),!S)throw new Y(2,4,4046,v);T(S),S=kr(S.outerHTML)}var b=Ac(S,"SmoothStreamingMedia");if(!b)throw new Y(2,4,4046,v);if(v=e.g.mss.manifestPreprocessorTXml,v!=Gd&&v(b),e.i||(e.i=new Pe(null,0)),v=ze(b,"IsLive",Cc,!1))throw new Y(2,4,4047);e.i.Gc(!v),T=ze(b,"TimeScale",Qn,1e7),S=ze(b,"DVRWindowLength",Qn),v&&(S===0||isNaN(S))&&(S=1/0);var I=ze(b,"CanSeek",Cc,!1);S===0&&I&&(S=1/0),I=null,S&&0<S&&(I=S/T),v&&!isNaN(e.g.availabilityWindowOverride)&&(I=e.g.availabilityWindowOverride),I==null&&(I=1/0),e.i.Ce(I),S=ze(b,"Duration",Qn,1/0),v||e.i.bb(S/T),v={variants:[],textStreams:[],timescale:T,duration:S/T};var O;for(I=Mt(b,"Protection"),T=e.g.mss.keySystemsBySystemId,S=[],I=A(I),O=I.next();!O.done;O=I.next())S=S.concat(Mt(O.value,"ProtectionHeader"));if(S.length){for(I=[],O=0;O<S.length;O++){var P=S[O],N=P.attributes.SystemID.toLowerCase(),_=T[N];if(_){var B;e:{if(B=AT(P)){B=A(Nr(B,"DATA"));for(var F=B.next();!F.done;F=B.next())if(F=xn(F.value,"KID")){B=Hi(Cn(F)),B=new Uint8Array([B[3],B[2],B[1],B[0],B[5],B[4],B[7],B[6]].concat(te(B.slice(8)))),B=gr(B);break e}}B=null}F=Hi(Cn(P)),N=Zl(N.replace(/-/g,"")),N=[{initData:Vc(F,N,new Set,0),initDataType:"cenc",keyId:B}],N=Mr(_,"cenc",N),B&&N.keyIds.add(B),(_=_3.get(_))&&(N.licenseServerUri=_(P)),I.push(N)}}T=I}else T=[];for(O=T,I=[],T=[],S=[],b=Mt(b,"StreamIndex"),b=A(b),P=b.next();!P.done;P=b.next()){P=P.value,_=Mt(P,"QualityLevel"),N=v.timescale,B=v.duration,F=Mt(P,"c");for(var z=[],J=0,q=0;q<F.length;++q){var K=F[q],W=F[q+1],Q=ze(K,"t",Qn),ie=ze(K,"d",Qn);if(K=ze(K,"r",Wn),!ie)break;if(Q=Q??J,(K=K||0)&&K--,0>K)if(W){if(W=ze(W,"t",Qn),W==null)break;if(Q>=W)break;K=Math.ceil((W-Q)/ie)-1}else{if(B==1/0)break;if(Q/N>=B)break;K=Math.ceil((B*N-Q)/ie)-1}for(W=0;W<=K;++W)J=Q+ie,z.push({start:Q/N,end:J/N,xg:Q}),Q=J}for(N=z,_=A(_),B=_.next();!B.done;B=_.next())(B=j3(e,P,B.value,N,O,v))&&(B.type!="audio"||e.g.disableAudio?B.type!="video"||e.g.disableVideo?B.type!=ot||e.g.disableText||S.push(B):T.push(B):I.push(B))}for(b=[],I=A(0<I.length?I:[null]),O=I.next();!O.done;O=I.next())for(O=O.value,P=A(0<T.length?T:[null]),z=P.next();!z.done;z=P.next())_=b,N=_.push,B=e,F=O,z=z.value,q=0,F&&F.bandwidth&&0<F.bandwidth&&(q+=F.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(q+=z.bandwidth),B={id:B.u++,language:F?F.language:"und",disabledUntilTime:0,primary:!!F&&F.primary||!!z&&z.primary,audio:F,video:z,bandwidth:q,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},N.call(_,B);v.variants=b,v.textStreams=S,e.j?(e.j.variants=v.variants,e.j.textStreams=v.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:v.variants,textStreams:v.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.ie()),Promise.resolve(),c=Date.now(),f=(c-i)/1e3,e.C.sample(1,f),ce(h)})}function j3(e,t,n,i,r,l){var c=t.attributes.Type;if(c!=="audio"&&c!=="video"&&c!=="text")return Et("Ignoring unrecognized type:",c),null;var f=t.attributes.Language,h=e.u++,v=ze(n,"Bitrate",gl),S=ze(n,"MaxWidth",gl),T=ze(n,"MaxHeight",gl),b=ze(n,"Channels",gl),I=ze(n,"SamplingRate",gl),O=l.duration;i.length&&(O=i[i.length-1].end-i[0].start);var P=e.i.getDuration();e.i.bb(Math.min(O,P));var N={id:h,originalId:t.attributes.Name||String(h),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:v||0,width:S||void 0,height:T||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:At(f||"und"),originalLanguage:f,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:b,audioSamplingRate:I,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:O,timescale:l.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=G3.get(r))&&N.roles.push(r),r==="main"&&(N.primary=!0)),r=n.attributes.FourCC,(r===null||r==="")&&(r=t.attributes.FourCC),!r){if(c==="audio")r="AAC";else if(c==="video")return Et('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!q3.includes(r.toUpperCase()))return Et("Codec not supported:",r),null;switch(n=B3(n,c,r,N),N.mssPrivateData.codecPrivateData=n,c){case"audio":if(!n)return Et("Quality unsupported without CodecPrivateData",c),null;N.type="audio",N.mimeType="mss/audio/mp4",N.codecs=V3(r,n);break;case"video":if(!n)return Et("Quality unsupported without CodecPrivateData",c),null;N.type="video",N.mimeType="mss/video/mp4",N.codecs=H3(n);break;case"text":N.type=ot,N.mimeType="application/mp4",(r==="TTML"||r==="DFXP")&&(N.codecs="stpp")}return N.fullMimeTypes.add(dn(N.mimeType,N.codecs)),N.createSegmentIndex=function(){if(N.segmentIndex)return Promise.resolve();if(e.m.has(N.id))var _=e.m.get(N.id);else _=[],N.type=="video"&&(_=N.mssPrivateData.codecPrivateData.split("00000001").slice(1)),_={id:N.id,type:N.type,codecs:N.codecs,encrypted:N.encrypted,timescale:N.mssPrivateData.timescale,duration:N.mssPrivateData.duration,lb:_,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:null,stream:N},_=xr(new fu([_])),e.m.set(N.id,_);return _=K3(e,new Ei(function(){return[]},0,null,Gs(N),N.mssPrivateData.timescale,_,null,N.encrypted),N,t,i),N.segmentIndex=new Ct(_),Promise.resolve()},N.closeSegmentIndex=function(){N.segmentIndex&&(N.segmentIndex.release(),N.segmentIndex=null)},N}function B3(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return i=r[e],n==="AACH"?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|i>>1,n[1]=i<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function V3(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function H3(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function K3(e,t,n,i,r){var l=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=A(r);for(var c=r.next(),f={};!c.done;f={Fe:void 0},c=r.next())f.Fe=c.value,i.push(new Ke(f.Fe.start,f.Fe.end,function(h){return function(){return Pn(e.l,[l.replace("{start time}",String(h.Fe.xg))])}}(f),0,null,t,0,0,n.mssPrivateData.duration));return i}Me("shaka.mss.MssParser",M1);var q3="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),G3=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");ta("application/vnd.ms-sstr+xml",function(){return new M1});function Vw(e,t,n,i,r,l,c){if(200<=n&&299>=n&&n!=202||n==304)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:l};l=null;try{l=Or(t)}catch{}throw new Y(n==401||n==403?2:1,1,1001,i,n,l,e,c,r||i)}function N1(){}function hm(e,t,n,i,r,l){var c=new W3;su(t.headers).forEach(function(S,T){c.append(T,S)});var f=new X3,h={Gg:!1,Jh:!1};if(e=z3(e,t,n,{body:t.body||void 0,headers:c,method:t.method,signal:f.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},h,i,r,t.streamDataCallback,l.minBytesForProgressEvents||0),e=new pn(e,function(){return h.Gg=!0,f.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var v=new ct(function(){h.Jh=!0,f.abort()});v.da(t/1e3),e.finally(function(){v.stop()})}return e}function z3(e,t,n,i,r,l,c,f,h){var v,S,T,b,I,O,P,N,_,B,F,z,J,q;return G(function(K){switch(K.g){case 1:return v=F3,S=Y3,b=new ArrayBuffer(0),O=I=0,P=Date.now(),ye(K,2),L(K,v(e,i),4);case 4:if(T=K.h,c(Hw(T.headers)),i.method=="HEAD"){K.s(5);break}return _=(N=T.headers.get("Content-Length"))?parseInt(N,10):0,T.body?(B=T.clone().body.getReader(),F=function(W){function Q(){var ie,Z,ne,re;return G(function(ue){switch(ue.g){case 1:return ye(ue,2),L(ue,B.read(),4);case 4:ie=ue.h,Le(ue,3);break;case 2:return De(ue),ue.return();case 3:if(ie.done){ue.s(5);break}if(I+=ie.value.byteLength,!f){ue.s(5);break}return L(ue,f(ie.value),5);case 5:Z=Date.now(),ne=I-O,(100<Z-P&&ne>=h||ie.done)&&(re=ie.done?0:_-I,l(Z-P,ne,re),O=I,P=Z),ie.done?W.close():(W.enqueue(ie.value),Q()),ce(ue)}})}Q()},new S({start:F}),L(K,T.arrayBuffer(),8)):L(K,T.arrayBuffer(),9);case 8:b=K.h,K.s(5);break;case 9:b=K.h,z=Date.now(),l(z-P,b.byteLength,0);case 5:Le(K,3);break;case 2:throw J=De(K),r.Gg?new Y(1,1,7001,e,n):r.Jh?new Y(1,1,1003,e,n):new Y(1,1,1002,e,J,n);case 3:return q=Hw(T.headers),K.return(Vw(q,b,T.status,e,T.url,t,n))}})}function Hw(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}function Kw(){if(E.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(E.Response){if(!new Response("").body)return!1}else return!1;return!(!E.fetch||"polyfill"in E.fetch||!E.AbortController)}Me("shaka.net.HttpFetchPlugin",N1),N1.isSupported=Kw,N1.parse=hm;var F3=E.fetch,X3=E.AbortController,Y3=E.ReadableStream,W3=E.Headers;Kw()&&(so("http",hm,2,!0),so("https",hm,2,!0),so("blob",hm,2,!0));function qw(){}function ym(e,t,n,i,r,l){var c=new Q3,f=Date.now(),h=0,v=new Promise(function(S,T){c.open(t.method,e,!0),c.responseType="arraybuffer",c.timeout=t.retryParameters.timeout,c.withCredentials=t.allowCrossSiteCredentials,c.onabort=function(){T(new Y(1,1,7001,e,n))};var b=!1;c.onreadystatechange=function(){if(c.readyState==2&&!b){var O=Gw(c);r(O),b=!0}},c.onload=function(O){var P=Gw(c),N=c.response;try{i(Date.now()-f,O.loaded-h,0);var _=Vw(P,N,c.status,e,c.responseURL,t,n);S(_)}catch(B){T(B)}},c.onerror=function(O){T(new Y(1,1,1002,e,O,n))},c.ontimeout=function(){T(new Y(1,1,1003,e,n))},c.onprogress=function(O){var P=Date.now(),N=l.minBytesForProgressEvents||0,_=O.loaded-h;(100<P-f&&_>=N||O.lengthComputable&&O.loaded==O.total)&&(i(P-f,_,c.readyState==4?0:O.total-O.loaded),h=O.loaded,f=P)};for(var I in t.headers)c.setRequestHeader(I.toLowerCase(),t.headers[I]);c.send(t.body)});return new pn(v,function(){return c.abort(),Promise.resolve()})}function Gw(e){var t=e.getAllResponseHeaders().trim().split(`\r
|
||
`);e={},t=A(t);for(var n=t.next();!n.done;n=t.next())n=n.value.split(": "),e[n[0].toLowerCase()]=n.slice(1).join(": ");return e}Me("shaka.net.HttpXHRPlugin",qw),qw.parse=ym;var Q3=E.XMLHttpRequest;so("http",ym,1,!0),so("https",ym,1,!0),so("blob",ym,1,!0);function zw(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function P1(e){var t=e.Ib(!1);return t?No(t):e.N().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.Sa+":"+e.wa}function J3(e,t){return ff(e.g.N(),e.g.Sa,e.g.wa,t.streaming.retryParameters)}function Fw(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function Xw(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}Fw.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function Yw(e){return e.i==0?0:e.j/e.i}function Ww(e){var t=this;this.u=e,this.i=new Map,this.h=new Ss(function(){return L1(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new Fw,this.l=!1}Ww.prototype.destroy=function(){return this.h.destroy()};function Z3(e,t,n){e.o=t,e.m=n}function L1(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function $3(e,t,n,i,r,l){at(e.h);var c=(e.i.get(t)||Promise.resolve()).then(function(){var f,h,v,S,T,b,I;return G(function(O){if(O.g==1)return L(O,nI(e,n),2);if(f=O.h,e.h.g)throw new Y(2,9,7001);if(r)for(S in h=Je(f),v=new fd(h),v.data)T=Number(S),b=v.data[T],I=v.g[T],e.m(b,I);return e.g.close(i,f.byteLength),e.o(Yw(e.g),e.g.g),O.return(l(f))})});e.i.set(t,c)}function eI(e,t,n,i,r,l){at(e.h);var c=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new Y(2,9,7001);if(r){var f=Je(n);f=new fd(f);for(var h in f.data){var v=Number(h);e.m(f.data[v],f.g[v])}}return e.g.close(i,n.byteLength),e.o(Yw(e.g),e.g.g),l(n)});e.i.set(t,c)}function tI(e){return G(function(t){return t.g==1?L(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function nI(e,t){var n,i,r,l;return G(function(c){return c.g==1?(n=Fi,i=e.u.request(n,t),r=function(){return i.abort()},e.j.push(r),L(c,i.promise,2)):(l=c.h,Rr(e.j,r),c.return(l.data))})}function gm(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new It,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}gm.prototype.abort=function(){var e=this;return G(function(t){if(t.g==1){try{e.i.abort()}catch{}return ye(t,2),L(t,e.g,4)}if(t.g!=2)return Le(t,0);De(t),ce(t)})};function _1(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var l;return G(function(c){if(c.g==1)return r.result==null?(n(),c.return()):(l=r.result,L(c,t(l.key,l.value,l),2));l.continue(),ce(c)})}})}gm.prototype.store=function(){return this.h},gm.prototype.promise=function(){return this.g};function U1(e){this.h=e,this.g=[]}U1.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function kf(e,t){return vm(e,t,"readwrite")}function vm(e,t,n){n=e.h.transaction([t],n);var i=new gm(n,t);return e.g.push(i),i.promise().then(function(){Rr(e.g,i)},function(){Rr(e.g,i)}),i}function Mf(e,t,n){this.h=new U1(e),this.i=t,this.g=n}y=Mf.prototype,y.destroy=function(){return this.h.destroy()},y.hasFixedKeySpace=function(){return!0},y.addSegments=function(){return Qw(this.i)},y.removeSegments=function(e,t){return Jw(this,this.i,e,t)},y.getSegments=function(e){var t=this,n;return G(function(i){return i.g==1?L(i,Zw(t,t.i,e),2):(n=i.h,i.return(n.map(function(r){return t.Ig(r)})))})},y.addManifests=function(){return Qw(this.g)},y.updateManifest=function(){return Promise.reject(new Y(2,9,9016,"Cannot modify values in "+this.g))};function iI(e,t,n){e=kf(e.h,e.g);var i=e.store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}y.updateManifestExpiration=function(e,t){var n=kf(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,i.put(r,e))},n.promise()},y.removeManifests=function(e,t){return Jw(this,this.g,e,t)},y.getManifests=function(e){var t=this,n;return G(function(i){return i.g==1?L(i,Zw(t,t.g,e),2):(n=i.h,i.return(Promise.all(n.map(function(r){return t.jd(r)}))))})},y.getAllManifests=function(){var e=this,t,n;return G(function(i){return i.g==1?(t=vm(e.h,e.g,"readonly"),n=new Map,L(i,_1(t,function(r,l){var c;return G(function(f){if(f.g==1)return L(f,e.jd(l),2);c=f.h,n.set(r,c),ce(f)})}),2)):i.g!=3?L(i,t.promise(),3):i.return(n)})},y.Ig=function(e){return e},y.jd=function(e){return Promise.resolve(e)};function Qw(e){return Promise.reject(new Y(2,9,9011,"Cannot add new value to "+e))}y.add=function(e,t){var n=this,i,r,l,c,f,h,v;return G(function(S){if(S.g==1){for(i=kf(n.h,e),r=i.store(),l=[],c=A(t),f=c.next(),h={};!f.done;h={cg:void 0},f=c.next())v=f.value,h.cg=r.add(v),h.cg.onsuccess=function(T){return function(){l.push(T.cg.result)}}(h);return L(S,i.promise(),2)}return S.return(l)})};function Jw(e,t,n,i){e=kf(e.h,t),t=e.store(),n=A(n);for(var r=n.next(),l={};!r.done;l={Qf:void 0},r=n.next())l.Qf=r.value,t.delete(l.Qf).onsuccess=function(c){return function(){return i(c.Qf)}}(l);return e.promise()}function Zw(e,t,n){var i,r,l,c,f,h,v;return G(function(S){if(S.g==1){for(i=vm(e.h,t,"readonly"),r=i.store(),l={},c=[],f=A(n),h=f.next(),v={};!h.done;v={we:void 0,ee:void 0},h=f.next())v.ee=h.value,v.we=r.get(v.ee),v.we.onsuccess=function(T){return function(){T.we.result==null&&c.push(T.ee),l[T.ee]=T.we.result}}(v);return L(S,i.promise(),2)}if(c.length)throw new Y(2,9,9012,"Could not find values for "+c);return S.return(n.map(function(T){return l[T]}))})}function Oy(e){this.g=new U1(e)}Oy.prototype.destroy=function(){return this.g.destroy()},Oy.prototype.getAll=function(){var e=this,t,n;return G(function(i){return i.g==1?(t=vm(e.g,"session-ids","readonly"),n=[],L(i,_1(t,function(r,l){n.push(l)}),2)):i.g!=3?L(i,t.promise(),3):i.return(n)})},Oy.prototype.add=function(e){var t=kf(this.g,"session-ids"),n=t.store();e=A(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},Oy.prototype.remove=function(e){var t=this,n;return G(function(i){return i.g==1?(n=kf(t.g,"session-ids"),L(i,_1(n,function(r,l,c){e.includes(l.sessionId)&&c.delete()}),2)):L(i,n.promise(),0)})};function fr(){this.g=new Map}fr.prototype.destroy=function(){for(var e=[],t=A(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},fr.prototype.init=function(){var e=this;ky.forEach(function(r,l){(r=r())&&e.g.set(l,r)});for(var t=[],n=A(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)};function $w(e){var t=null;if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){r.hasFixedKeySpace()||t||(t={path:{zb:i,Ta:l},Ta:r})})}),t)return t;throw new Y(2,9,9013,"Could not find a cell that supports add-operations")}function rI(e,t){e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){t({zb:i,Ta:l},r)})})}function mm(e,t,n){if(e=e.g.get(t),!e)throw new Y(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new Y(2,9,9013,"Could not find cell with name "+n);return t}function oI(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function lI(e){var t=Array.from(e.g.keys());if(!t.length)throw new Y(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function uI(e){var t,n,i;return G(function(r){return r.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(i=ky,i.forEach(function(l){(l=l())&&t.push(l)})),L(r,Promise.all(t.map(function(l){return l.erase()})),2)):n?r.s(0):L(r,Promise.all(t.map(function(l){return l.destroy()})),0)})}function ex(e,t){ky.set(e,t)}Me("shaka.offline.StorageMuxer",fr),fr.unregister=function(e){ky.delete(e)},fr.register=ex,fr.prototype.destroy=fr.prototype.destroy;var ky=new Map;function My(){Mf.apply(this,arguments)}nt(My,Mf),My.prototype.updateManifestExpiration=function(e,t){var n=this,i,r,l;return G(function(c){return i=kf(n.h,n.g),r=i.store(),l=new It,r.get(e).onsuccess=function(f){(f=f.target.result)?(f.expiration=t,r.put(f),l.resolve()):l.reject(new Y(2,9,9012,"Could not find values for "+e))},L(c,Promise.all([i.promise(),l]),0)})},My.prototype.jd=function(e){var t,n,i,r,l,c;return G(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,l=aI(e.periods[n],r),t.push(l);return L(f,BT(t),2)}return c=f.h,f.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:c,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function aI(e,t){cI(e);for(var n=A(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return sI(r,e.startTime,t)})}function sI(e,t,n){var i=e.initSegmentUri?tx(e.initSegmentUri):null,r=t+e.presentationTimeOffset,l=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(c){var f=tx(c.uri);return{startTime:t+c.startTime,endTime:t+c.endTime,dataKey:f,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:l,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}My.prototype.Ig=function(e){return{data:e.data}};function tx(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new Y(2,9,9004,"Could not parse uri "+e)}function cI(e){var t=e.streams.filter(function(f){return f.contentType=="audio"});if(e=e.streams.filter(function(f){return f.contentType=="video"}),!t.every(function(f){return f.variantIds})||!e.every(function(f){return f.variantIds})){for(var n=A(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=A(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=A(e),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=A(t),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i);if(e.length&&t.length)for(t=A(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=A(e),l=r.next();!l.done;l=r.next()){l=l.value;var c=n++;i.variantIds.push(c),l.variantIds.push(c)}}}function Sm(){Mf.apply(this,arguments)}nt(Sm,Mf),Sm.prototype.jd=function(e){var t,n,i,r,l,c;return G(function(f){if(f.g==1){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var h=e.periods[n],v=[],S=A(h.streams),T=S.next();!T.done;T=S.next())T=T.value,T.variantIds.length!=0&&v.push(fI(T,h.startTime,h.startTime+r));l=v,t.push(l)}return L(f,BT(t),2)}return c=f.h,f.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:c,sequenceMode:!1})})};function fI(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function j1(){Mf.apply(this,arguments)}nt(j1,Mf),y=j1.prototype,y.hasFixedKeySpace=function(){return!1},y.addSegments=function(e){return this.add(this.i,e)},y.addManifests=function(e){return this.add(this.g,e)},y.updateManifest=function(e,t){return iI(this,e,t)},y.jd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function nx(){this.m=this.j=this.i=this.h=this.g=this.l=null}y=nx.prototype,y.init=function(){var e=this,t=new It,n=!1,i=new ct(function(){n=!0,t.reject(new Y(2,9,9017))});i.da(5);var r=E.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){var l=r.result;e.l=l;var c=l.objectStoreNames;c=c.contains("manifest")&&c.contains("segment")?new My(l,"segment","manifest"):null,e.g=c,c=l.objectStoreNames,c=c.contains("manifest-v2")&&c.contains("segment-v2")?new Sm(l,"segment-v2","manifest-v2"):null,e.h=c,c=l.objectStoreNames,c=c.contains("manifest-v3")&&c.contains("segment-v3")?new Sm(l,"segment-v3","manifest-v3"):null,e.i=c,c=l.objectStoreNames,c=c.contains("manifest-v5")&&c.contains("segment-v5")?new j1(l,"segment-v5","manifest-v5"):null,e.j=c,l=l.objectStoreNames.contains("session-ids")?new Oy(l):null,e.m=l,i.stop(),t.resolve()}},r.onupgradeneeded=function(){for(var l=r.result,c=A(["segment-v5","manifest-v5","session-ids"]),f=c.next();!f.done;f=c.next())f=f.value,l.objectStoreNames.contains(f)||l.createObjectStore(f,{autoIncrement:!0})},r.onerror=function(l){n||(t.reject(new Y(2,9,9001,r.error)),i.stop(),l.preventDefault())},t},y.destroy=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return L(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return L(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return L(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return L(t,e.j.destroy(),8);case 8:if(!e.m){t.s(10);break}return L(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),ce(t)}})},y.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},y.getEmeSessionCell=function(){return this.m},y.erase=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return L(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return L(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return L(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return L(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),L(t,dI(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,L(t,e.init(),0)}})};function dI(){var e=new It,t=E.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new Y(2,9,9001,t.error)),n.preventDefault()},e}ex("idb",function(){return(!er()||er()&&sl())&&!$i()&&E.indexedDB?new nx:null});function Cu(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}Cu.prototype.zb=function(){return this.i},Cu.prototype.Ta=function(){return this.h},Cu.prototype.key=function(){return this.l},Cu.prototype.toString=function(){return this.j};function B1(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var i=e[3];return i&&t!=null?new Cu(t,n,i,Number(e[4])):null}function ix(e,t){this.h=e,this.g=t}function rx(e,t){var n=new Pe(null,0);n.bb(t.duration);var i=t.streams.filter(function(v){return v.type=="audio"}),r=t.streams.filter(function(v){return v.type=="video"});i=pI(e,i,r,n),r=t.streams.filter(function(v){return v.type==ot}).map(function(v){return Tm(e,v,n)});var l=t.streams.filter(function(v){return v.type=="image"}).map(function(v){return Tm(e,v,n)}),c=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var f=A(i.values()),h=f.next();!h.done;h=f.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=c),h.video&&h.video.encrypted&&(h.video.drmInfos=c);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:l,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function pI(e,t,n,i){for(var r=new Set,l=A(t),c=l.next();!c.done;c=l.next()){c=A(c.value.variantIds);for(var f=c.next();!f.done;f=c.next())r.add(f.value)}for(l=A(n),c=l.next();!c.done;c=l.next())for(c=A(c.value.variantIds),f=c.next();!f.done;f=c.next())r.add(f.value);for(l=new Map,r=A(r),c=r.next();!c.done;c=r.next())c=c.value,l.set(c,{id:c,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=A(t),r=t.next();!r.done;r=t.next())for(c=r.value,r=Tm(e,c,i),c=A(c.variantIds),f=c.next();!f.done;f=c.next())f=l.get(f.value),f.language=r.language,f.primary=f.primary||r.primary,f.audio=r;for(n=A(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=Tm(e,r,i),r=A(r.variantIds),c=r.next();!c.done;c=r.next())c=l.get(c.value),c.primary=c.primary||t.primary,c.video=t;return l}function Tm(e,t,n){var i=t.segments.map(function(r){return hI(e,r,t)});return n.Ed(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ct(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([dn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function hI(e,t,n){var i=new Cu("segment",e.h,e.g,t.dataKey);return e=new Ke(t.startTime,t.endTime,function(){return[i.toString()]},0,null,t.initSegmentKey!=null?yI(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.De(t.thumbnailSprite),e}function yI(e,t){var n=new Cu("segment",e.h,e.g,t);return new Ei(function(){return[n.toString()]},0,null)}function ox(){this.g=null}y=ox.prototype,y.configure=function(){},y.start=function(e,t){var n=this,i,r,l,c,f,h,v;return G(function(S){switch(S.g){case 1:if(i=B1(e),n.g=i,i==null||i.g!="manifest")throw new Y(2,1,9004,e);return r=new fr,it(S,2),L(S,r.init(),4);case 4:return L(S,mm(r,i.zb(),i.Ta()),5);case 5:return l=S.h,L(S,l.getManifests([i.key()]),6);case 6:return c=S.h,f=c[0],h=new ix(i.zb(),i.Ta()),v=rx(h,f),t.makeTextStreamsForClosedCaptions(v),S.return(v);case 2:return Te(S),L(S,r.destroy(),7);case 7:_e(S,0)}})},y.stop=function(){return Promise.resolve()},y.update=function(){},y.onExpirationUpdated=function(e,t){var n=this,i,r,l,c,f,h,v;return G(function(S){switch(S.g){case 1:return i=n.g,r=new fr,ye(S,2,3),L(S,r.init(),5);case 5:return L(S,mm(r,i.zb(),i.Ta()),6);case 6:return l=S.h,L(S,l.getManifests([i.key()]),7);case 7:if(c=S.h,f=c[0],h=f.sessionIds.includes(e),v=f.expiration==null||f.expiration>t,!h||!v){S.s(3);break}return L(S,l.updateManifestExpiration(i.key(),t),3);case 3:return Te(S),L(S,r.destroy(),10);case 10:_e(S,0);break;case 2:De(S),S.s(3)}})},y.onInitialVariantChosen=function(){},y.banLocation=function(){},y.setMediaElement=function(){},ta("application/x-offline-manifest",function(){return new ox});function lx(){}function ux(e,t){var n=B1(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=wr(e)):e=n&&n.g=="segment"?gI(n.key(),n,t):kl(new Y(2,1,9004,e)),e}function gI(e,t,n){var i=new fr;return wr(void 0).Ha(function(){return i.init()}).Ha(function(){return mm(i,t.zb(),t.Ta())}).Ha(function(r){return r.getSegments([t.key()])}).Ha(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}Me("shaka.offline.OfflineScheme",lx),lx.plugin=ux,so("offline",ux);function ax(e,t,n){var i,r,l,c,f,h;return G(function(v){switch(v.g){case 1:i=[];for(var S=[],T=A(n),b=T.next();!b.done;b=T.next()){b=b.value;for(var I=!1,O=A(S),P=O.next();!P.done;P=O.next())if(P=P.value,mI(P.info,b)){P.sessionIds.push(b.sessionId),I=!0;break}I||S.push({info:b,sessionIds:[b.sessionId]})}r=A(S),l=r.next();case 2:if(l.done){v.s(4);break}return c=l.value,f=vI(e,t,c),L(v,f,5);case 5:h=v.h,i=i.concat(h),l=r.next(),v.s(2);break;case 4:return v.return(i)}})}function vI(e,t,n){var i,r;return G(function(l){switch(l.g){case 1:return i=new Hc({Xb:t,onError:function(){},pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ye(l,2),i.configure(e),L(l,uh(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:Le(l,3);break;case 2:return De(l),L(l,i.destroy(),5);case 5:return l.return([]);case 3:return r=[],L(l,Promise.all(n.sessionIds.map(function(c){return G(function(f){if(f.g==1)return ye(f,2),L(f,Ig(i,c),4);if(f.g!=2)return r.push(c),Le(f,0);De(f),ce(f)})})),6);case 6:return L(l,i.destroy(),7);case 7:return l.return(r)}})}function mI(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Up(e.audioCapabilities,t.audioCapabilities,n)&&Up(e.videoCapabilities,t.videoCapabilities,n)}function SI(e,t,n){var i=t.presentationTimeline.getDuration();return t=sx(t),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function V1(e,t){var n=rx(new ix(e.zb(),e.Ta()),t),i=t.appMetadata||{};return n=sx(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function sx(e){var t=[],n=ed(e.variants);n=A(n);for(var i=n.next();!i.done;i=n.next())t.push(zu(i.value));for(e=A(e.textStreams),n=e.next();!n.done;n=e.next())t.push(Un(n.value));return t}function TI(){this.g=new Map}function wI(e,t){var n=t.audio,i=t.video;if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,l=i.bandwidth||t.bandwidth-r;0>=l&&(l=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,l)}}function xI(e,t){e.g.set(t.id,t.bandwidth||2048)}function cx(e,t){return e=e.g.get(t),e==null&&(e=0),e}function Si(e){var t=this;if(e&&e.constructor!=o)throw new Y(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.xb()):(this.h=wa(),this.g=new Kt),this.i=[],this.l=[];var n=!e;this.j=new Ss(function(){var i,r,l,c,f;return G(function(h){switch(h.g){case 1:return L(h,Promise.all(t.l.map(function(v){return L1(v)})),2);case 2:for(i=function(){},r=[],l=A(t.i),c=l.next();!c.done;c=l.next())f=c.value,r.push(f.then(i,i));return L(h,Promise.all(r),3);case 3:if(!n){h.s(4);break}return L(h,t.g.destroy(),4);case 4:t.h=null,t.g=null,ce(h)}})}),this.m=1e9}function H1(){if($r())e:{for(var e=A(ky.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}y=Si.prototype,y.destroy=function(){return this.j.destroy()},y.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=ma(e,t)),mu(this.h,e)},y.getConfiguration=function(){var e=wa();return mu(e,this.h,wa()),e},y.xb=function(){return this.g},y.store=function(e,t,n,i,r){var l=this,c=this.getConfiguration(),f=new Ww(this.g);return this.l.push(f),t=EI(this,e,t||{},i||[],r||[],function(){var h;return G(function(v){return v.g==1?n?v.s(2):L(v,So(e,l.g,c.manifest.retryParameters),3):(v.g!=2&&(n=v.h),h=Ds(e,n||null),v.return(h()))})},c,f),t=new pn(t,function(){return L1(f)}),t.finally(function(){Rr(l.l,f)}),BI(this,t)};function EI(e,t,n,i,r,l,c,f){var h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de;return G(function(se){switch(se.g){case 1:return wm(),v=h=null,S=new fr,I=b=T=null,ye(se,2,3),L(se,l(),5);case 5:return h=se.h,L(se,RI(e,t,h,c),6);case 6:if(O=se.h,Kr(e),P=!O.presentationTimeline.U()&&!O.presentationTimeline.yc(),!P)throw new Y(2,9,9005,t);N=A(i),_=N.next();case 7:if(_.done){se.s(9);break}return B=_.value,L(se,NI(e,B,O),10);case 10:F=se.h,O.imageStreams.push(F),Kr(e),_=N.next(),se.s(7);break;case 9:z=A(r),J=z.next();case 11:return J.done?(yh(c.drm.clearKeys,O.variants),W=O.variants.some(function(we){if(we.audio){for(var be=A(we.audio.drmInfos),Qe=be.next();!Qe.done;Qe=be.next())if(Qe.value.licenseServerUri.startsWith("data:"))return!0}if(we.video){for(we=A(we.video.drmInfos),be=we.next();!be.done;be=we.next())if(be.value.licenseServerUri.startsWith("data:"))return!0}return!1}),Q=c.offline.usePersistentLicense,W&&(Q=!1),L(se,e.Lc(O,function(we){I=I||we},c,Q),15)):(q=J.value,L(se,PI(e,O,q.uri,q.language,q.kind,q.mime,q.codecs),14));case 14:K=se.h,O.textStreams.push(K),Kr(e),J=z.next(),se.s(11);break;case 15:if(v=se.h,Kr(e),I)throw I;return L(se,CI(O,v,c,Q),16);case 16:return L(se,S.init(),17);case 17:return Kr(e),L(se,$w(S),18);case 18:return T=se.h,Kr(e),ie=bI(v,O,t,n,c,f,Q),Z=ie.Yi,ne=ie.tg,L(se,T.Ta.addManifests([Z]),19);case 19:if(re=se.h,Kr(e),b=re[0],Kr(e),I)throw I;return L(se,AI(e,ne,b,Z,f,c,T.Ta,O,v,Q),20);case 20:return Kr(e),hx(O,Z,v,Q),L(se,T.Ta.updateManifest(b,Z),21);case 21:return Kr(e),ue=new Cu("manifest",T.path.zb,T.path.Ta,b),se.return(V1(ue,Z));case 3:return Te(se),L(se,S.destroy(),22);case 22:if(!h){se.s(23);break}return L(se,h.stop(),23);case 23:if(!v){se.s(25);break}return L(se,v.destroy(),25);case 25:_e(se,0);break;case 2:if(de=De(se),b==null){se.s(27);break}return L(se,fx(b),27);case 27:throw I||de}})}function AI(e,t,n,i,r,l,c,f,h,v){var S,T,b,I,O,P,N,_,B,F,z;return G(function(J){switch(J.g){case 1:if(S={},T=0,b=function(){if(e.j.g||r.l)throw new Y(2,9,7001)},I=function(q,K){var W,Q,ie,Z,ne,re,ue,de,se;return G(function(we){if(we.g==1){for(W=A(q),Q=W.next(),ie={};!Q.done;ie={Nb:void 0},Q=W.next())ie.Nb=Q.value,b(),Z=J3(ie.Nb,l),ne=ie.Nb.i,re=ie.Nb.h,ue=function(be){return function(Qe){var Be,kt,mt,st;return G(function(pt){switch(pt.g){case 1:if(Be=be.Nb.g,kt=Be.Ib(!1),!Be.aesKey||kt){pt.s(2);break}return L(pt,Ld(Qe,Be.aesKey,be.Nb.j),3);case 3:Qe=pt.h;case 2:return mt=P1(Be),L(pt,c.addSegments([{data:Qe}]),4);case 4:st=pt.h,b(),S[mt]=st[0],T+=Qe.byteLength,ce(pt)}})}}(ie),de=ie.Nb.g,(se=de.Ib(!1))?eI(r,ie.Nb.groupId,se,ne,re,ue):$3(r,ie.Nb.groupId,Z,ne,re,ue);return L(we,tI(r),2)}return b(),!K||r.l?we.s(0):(hx(f,i,h,v),L(we,c.updateManifest(n,i),0))})},O=!1,ye(J,2),!K1(f)||!O||px(f)){J.s(4);break}return L(J,I(t.filter(function(q){return q.h}),!0),5);case 5:return b(),t=t.filter(function(q){return!q.h}),P=S,N=T,S={},T=0,L(J,dx(c,n,i,P,N,function(){return Kr(e)}),6);case 6:b();case 4:if(O){J.s(7);break}return L(J,I(t,!1),8);case 8:return b(),_=S,B=T,S={},T=0,L(J,dx(c,n,i,_,B,function(){return b()}),9);case 9:b();case 7:Le(J,0);break;case 2:return F=De(J),z=Object.values(S),L(J,c.removeSegments(z,function(){}),10);case 10:throw F}})}function fx(e){var t,n,i,r;return G(function(l){switch(l.g){case 1:return t=new fr,L(l,t.init(),2);case 2:return L(l,$w(t),3);case 3:return n=l.h,i=new Cu("manifest",n.path.zb,n.path.Ta,e),L(l,t.destroy(),4);case 4:return r=new Si,L(l,r.remove(i.toString()),0)}})}function dx(e,t,n,i,r,l){var c,f,h,v,S,T,b,I,O,P,N;return G(function(_){switch(_.g){case 1:for(c=!1,ye(_,2),f=!0,h=A(n.streams),v=h.next();!v.done;v=h.next())for(S=v.value,T=A(S.segments),b=T.next();!b.done;b=T.next())I=b.value,O=I.pendingSegmentRefId?i[I.pendingSegmentRefId]:null,O!=null&&(I.dataKey=O,I.pendingSegmentRefId=void 0),O=I.pendingInitSegmentRefId?i[I.pendingInitSegmentRefId]:null,O!=null&&(I.initSegmentKey=O,I.pendingInitSegmentRefId=void 0),I.pendingSegmentRefId&&(f=!1),I.pendingInitSegmentRefId&&(f=!1);return n.size+=r,f&&(n.isIncomplete=!1),L(_,e.updateManifest(t,n),4);case 4:c=!0,l(),Le(_,0);break;case 2:return P=De(_),L(_,fx(t),5);case 5:if(c){_.s(6);break}return N=Object.values(i),L(_,e.removeSegments(N,function(){}),6);case 6:throw P}})}function CI(e,t,n,i){var r,l,c,f,h,v,S,T,b,I,O,P,N,_,B,F,z,J,q,K,W,Q,ie,Z,ne,re,ue,de,se,we;return G(function(be){switch(be.g){case 1:return r={width:1/0,height:1/0},$p(e,n.restrictions,r),L(be,Dl(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(l=[],c=n.preferredDecodingAttributes,f=n.preferredVideoCodecs,h=n.preferredAudioCodecs,v=n.preferredTextFormats,Zp(e,f,h,c,v),S=A(e.variants),T=S.next();!T.done;T=S.next())b=T.value,l.push(zu(b));for(I=A(e.textStreams),O=I.next();!O.done;O=I.next())P=O.value,l.push(Un(P));for(N=A(e.imageStreams),_=N.next();!_.done;_=N.next())B=_.value,l.push(Lc(B));return L(be,n.offline.trackSelectionCallback(l),3);case 3:for(F=be.h,z=e.presentationTimeline.getDuration(),J=0,q=A(F),K=q.next();!K.done;K=q.next())W=K.value,Q=W.bandwidth*z/8,J+=Q;return ye(be,4),L(be,n.offline.downloadSizeCallback(J),6);case 6:if(ie=be.h,!ie)throw new Y(2,9,9014);Le(be,5);break;case 4:throw Z=De(be),Z instanceof Y?Z:new Y(2,9,9015);case 5:for(ne=new Set,re=new Set,ue=new Set,de=A(F),se=de.next();!se.done;se=de.next())we=se.value,we.type=="variant"&&ne.add(we.id),we.type=="text"&&re.add(we.id),we.type=="image"&&ue.add(we.id);e.variants=e.variants.filter(function(Qe){return ne.has(Qe.id)}),e.textStreams=e.textStreams.filter(function(Qe){return re.has(Qe.id)}),e.imageStreams=e.imageStreams.filter(function(Qe){return ue.has(Qe.id)}),KI(e),ce(be)}})}function bI(e,t,n,i,r,l,c){var f=SI(n,t,i),h=r.offline.progressCallback;Z3(l,function(O,P){f.size=P,h(f,O)},function(O,P){v&&c&&S==P&&Ts(e,"cenc",O)});var v=K1(t)&&!px(t),S=null;v&&(S=qI.get(e.h.keySystem));for(var T=new TI,b=A(t.textStreams),I=b.next();!I.done;I=b.next())T.g.set(I.value.id,52);for(b=A(t.imageStreams),I=b.next();!I.done;I=b.next())xI(T,I.value);for(b=A(t.variants),I=b.next();!I.done;I=b.next())wI(T,I.value);return l=_I(l,T,t,r),r=l.streams,l=l.tg,(T=e.h)&&c&&(T.initData=[]),{Yi:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.pd(),streams:r,sessionIds:c?sh(e):[],drmInfo:T,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},tg:l}}function K1(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function px(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function hx(e,t,n,i){if(t.expiration=n.pd(),n=sh(n),t.sessionIds=i?n:[],K1(e)&&i&&!n.length)throw new Y(2,9,9007)}y.remove=function(e){return q1(this,II(this,e))};function II(e,t){var n,i,r,l,c,f;return G(function(h){switch(h.g){case 1:if(wm(),n=B1(t),n==null||n.g!="manifest")throw new Y(2,9,9004,t);return i=n,r=new fr,it(h,2),L(h,r.init(),4);case 4:return L(h,mm(r,i.zb(),i.Ta()),5);case 5:return l=h.h,L(h,l.getManifests([i.key()]),6);case 6:return c=h.h,f=c[0],L(h,Promise.all([DI(e,f,r),OI(l,i,f)]),2);case 2:return Te(h),L(h,r.destroy(),8);case 8:_e(h,0)}})}function yx(e,t){for(var n=[],i=A(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&r.type=="video"?n.push({contentType:dn(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||r.type!="audio"||n.push({contentType:dn(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function DI(e,t,n){return G(function(i){return L(i,HI(e.g,e.h.drm,n,t),0)})}function OI(e,t,n){function i(){}var r=VI(n);return V1(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}y.qj=function(){return q1(this,kI(this))};function kI(e){var t,n,i,r,l,c,f,h,v,S;return G(function(T){switch(T.g){case 1:return wm(),t=e.g,n=e.h.drm,i=new fr,r=!1,it(T,2),L(T,i.init(),4);case 4:l=[],oI(i,function(b){return l.push(b)}),c=A(l),f=c.next();case 5:if(f.done){T.s(2);break}return h=f.value,L(T,h.getAll(),8);case 8:return v=T.h,L(T,ax(n,t,v),9);case 9:return S=T.h,L(T,h.remove(S),10);case 10:S.length!=v.length&&(r=!0),f=c.next(),T.s(5);break;case 2:return Te(T),L(T,i.destroy(),11);case 11:_e(T,3);break;case 3:return T.return(!r)}})}y.list=function(){return q1(this,MI())};function MI(){var e,t,n;return G(function(i){switch(i.g){case 1:return wm(),e=[],t=new fr,it(i,2),L(i,t.init(),4);case 4:return n=Promise.resolve(),rI(t,function(r,l){n=n.then(function(){var c;return G(function(f){if(f.g==1)return L(f,l.getAllManifests(),2);c=f.h,c.forEach(function(h,v){h=V1(new Cu("manifest",r.zb,r.Ta,v),h),e.push(h)}),ce(f)})})}),L(i,n,2);case 2:return Te(i),L(i,t.destroy(),6);case 6:_e(i,3);break;case 3:return i.return(e)}})}function RI(e,t,n,i){var r,l,c,f,h;return G(function(v){if(v.g==1)return r=null,l=e.g,c={networkingEngine:l,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(S){r=S},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),Kr(e),L(v,n.start(t,c),2);if(v.g!=3)return f=v.h,Kr(e),h=vx(f),L(v,Promise.all(Bc(h,function(S){return S.createSegmentIndex()})),3);if(Kr(e),r)throw r;return v.return(f)})}function NI(e,t,n){var i,r,l,c,f,h,v,S,T,b,I,O,P,N,_;return G(function(B){switch(B.g){case 1:return L(B,gx(e,t),2);case 2:if(i=B.h,i!="text/vtt")throw new Y(1,2,2017,t);return L(B,LI(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=B.h,l=wl(i),!l)throw new Y(2,2,2014,i);for(c=l(),f={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},h=Je(r),v=c.parseMedia(h,f,t,[]),S=[],T=A(v),b=T.next(),I={};!b.done;I={Me:void 0,Nc:void 0},b=T.next())I.Nc=b.value,I.Me=null,O=function(F){return function(){return F.Me==null&&(F.Me=Pn([t],[F.Nc.payload])),F.Me||[]}}(I),P=new Ke(I.Nc.startTime,I.Nc.endTime,O,0,null,null,0,0,1/0),I.Nc.payload.includes("#xywh")&&(N=I.Nc.payload.split("#xywh=")[1].split(","),N.length===4&&P.De({height:parseInt(N[3],10),positionX:parseInt(N[0],10),positionY:parseInt(N[1],10),width:parseInt(N[2],10)})),S.push(P);if(_=i,!S.length){B.s(4);break}return L(B,So(S[0].N()[0],e.g,e.h.manifest.retryParameters),5);case 5:_=B.h;case 4:return B.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ct(S),mimeType:_||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([dn(_||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function PI(e,t,n,i,r,l,c){var f,h,v;return G(function(S){if(S.g==1)return l?S.s(2):L(S,gx(e,n),3);if(S.g!=2&&(l=S.h),f={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:uf(0,t.presentationTimeline.getDuration(),[n]),mimeType:l||"",codecs:c||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:ot,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([dn(l||"",c||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},h=dn(f.mimeType,f.codecs),v=xl(h),!v)throw new Y(2,2,2014,l);return S.return(f)})}function gx(e,t){var n;return G(function(i){switch(i.g){case 1:return ye(i,2),L(i,So(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,Le(i,3);break;case 2:De(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function LI(e,t,n){var i,r,l;return G(function(c){return c.g==1?(i=Fi,r=un([e],n),r.method="GET",L(c,t.request(i,r).promise,2)):(l=c.h,c.return(l.data))})}y.Lc=function(e,t,n,i){var r=this,l;return G(function(c){return c.g==1?(l=new Hc({Xb:r.g,onError:t,pe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),l.configure(n.drm),L(c,Eg(l,e.variants,i),2)):c.g!=3?L(c,dd(l),3):c.return(l)})};function _I(e,t,n,i){var r=new Map,l=vx(n),c=new Map;l=A(l);for(var f=l.next();!f.done;f=l.next()){f=f.value;var h=UI(e,t,n,f,i,r);c.set(f.id,h)}for(e=A(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&c.get(t.audio.id).variantIds.push(t.id),t.video&&c.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(c.values()),tg:Array.from(r.values())}}function UI(e,t,n,i,r,l){var c={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},f=r.offline.numberOfParallelDownloads,h=f===0?i.id:0;return jI(i,n.presentationTimeline.pb(),function(v,S){var T=P1(v),b=void 0;if(!l.has(T)){var I=v.endTime-v.startTime;I=cx(t,i.id)*I,I=Xw(e.g,I),l.set(T,new zw(v,I,h,!1,S))}v.Y&&(b=P1(v.Y),l.has(b)||(I=.5*cx(t,i.id),I=Xw(e.g,I),l.set(b,new zw(v.Y,I,h,!0,S)))),c.segments.push({pendingInitSegmentRefId:b,initSegmentKey:b?0:null,startTime:v.startTime,endTime:v.endTime,appendWindowStart:v.appendWindowStart,appendWindowEnd:v.appendWindowEnd,timestampOffset:v.timestampOffset,tilesLayout:v.tilesLayout,pendingSegmentRefId:T,dataKey:0,mimeType:v.mimeType,codecs:v.codecs,thumbnailSprite:v.thumbnailSprite}),f!==0&&(h=(h+1)%f)}),c}function jI(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}function Kr(e){if(e.j.g)throw new Y(2,9,7001)}function wm(){if(!H1())throw new Y(2,9,9e3)}function q1(e,t){return G(function(n){return n.g==1?(e.i.push(t),it(n,2),L(n,t,4)):n.g!=2?n.return(n.h):(Te(n),Rr(e.i,t),_e(n,0))})}function BI(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Rr(e.i,n)})}function VI(e){var t=new Set;e=A(e.streams);for(var n=e.next();!n.done;n=e.next()){n=A(n.value.segments);for(var i=n.next();!i.done;i=n.next())i=i.value,i.initSegmentKey!=null&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}function HI(e,t,n,i){var r,l,c;return G(function(f){return f.g==1?i.drmInfo?(r=lI(n),l=i.sessionIds.map(function(h){return{sessionId:h,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:yx(i,!1),videoCapabilities:yx(i,!0)}}),L(f,ax(t,e,l),2)):f.return():f.g!=3?(c=f.h,L(f,r.remove(c),3)):L(f,r.add(l.filter(function(h){return!c.includes(h.sessionId)})),0)})}function vx(e){for(var t=new Set,n=A(e.variants),i=n.next();!i.done;i=n.next())i=i.value,i.audio&&t.add(i.audio),i.video&&t.add(i.video);for(n=A(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(e=A(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function KI(e){e.variants.map(function(l){return l.video});var t=new Set(e.variants.map(function(l){return l.audio}));e=e.textStreams;for(var n=A(t),i=n.next();!i.done;i=n.next()){i=A(t);for(var r=i.next();!r.done;r=i.next());}for(t=A(e),n=t.next();!n.done;n=t.next())for(n=A(e),i=n.next();!i.done;i=n.next());}Me("shaka.offline.Storage",Si),Si.deleteAll=function(){var e;return G(function(t){return t.g==1?(e=new fr,it(t,2),L(t,uI(e),2)):t.g!=5?(Te(t),L(t,e.destroy(),5)):_e(t,0)})},Si.prototype.list=Si.prototype.list,Si.prototype.removeEmeSessions=Si.prototype.qj,Si.prototype.remove=Si.prototype.remove,Si.prototype.store=Si.prototype.store,Si.prototype.getNetworkingEngine=Si.prototype.xb,Si.prototype.getConfiguration=Si.prototype.getConfiguration,Si.prototype.configure=Si.prototype.configure,Si.prototype.destroy=Si.prototype.destroy,Si.support=H1;var qI=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");w("offline",H1);function Bi(){}function dr(e,t){for(e={priority:t||0,callback:e},t=0;t<Ry.length;t++)if(Ry[t].priority<e.priority){Ry.splice(t,0,e);return}Ry.push(e)}Me("shaka.polyfill",Bi),Bi.register=dr,Bi.installAll=function(){for(var e=A(Ry),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Et("Error installing polyfill!",n)}}};var Ry=[];function mx(){}function Sx(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=A(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())GI(t.value)}function GI(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}Bi.Aria=mx,mx.install=Sx,dr(Sx);function Tx(){}function wx(){qn()||Vt("Sky_STB")||PE()}Bi.EncryptionScheme=Tx,Tx.install=wx,dr(wx,-2);function xx(){}function Ex(){if(E.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",dp),document.addEventListener("webkitfullscreenerror",dp),document.addEventListener("mozfullscreenchange",dp),document.addEventListener("mozfullscreenerror",dp),document.addEventListener("MSFullscreenChange",dp),document.addEventListener("MSFullscreenError",dp)}}function dp(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}Bi.Fullscreen=xx,xx.install=Ex,dr(Ex);function G1(){}function Ax(){var e=!0;(er()&&!sl()&&!Fa()||ni()||Ru()||qn()||Ro()||si()||wc()||Jl()&&!ni())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Cx=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=zI)}function zI(e){var t,n,i,r,l,c,f,h,v,S,T;return G(function(b){switch(b.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},n=e.video,i=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(r=n.contentType,l=Tc(r),!l)||i&&(c=i.contentType,f=Tc(c),!f))return b.return(t)}else return b.return(t);b.s(2);break}if(!$r())return b.return(t);if(!n){b.s(3);break}return L(b,FI(n),4);case 4:if(h=b.h,!h)return b.return(t);case 3:if(i){var I=i.contentType;if(er()&&i.spatialRendering&&(I+="; spatialRendering=true"),v=Ln(I),!v)return b.return(t)}case 2:return e.keySystemConfiguration?(S=e.keySystemConfiguration,L(b,XI(n,i,S),6)):(t.supported=!0,b.return(t));case 6:(T=b.h)&&(t.supported=!0,t.keySystemAccess=T);case 5:return b.return(t)}})}function FI(e){var t,n;return G(function(i){return i.g==1?er()?L(i,YI(e),3):si()?(t=e.contentType,e.width&&e.height&&(t+="; width="+e.width,t+="; height="+e.height),e.framerate&&(t+="; framerate="+e.framerate),e.bitrate&&(t+="; bitrate="+e.bitrate),i.return(Ln(t))):i.s(2):i.g!=2?(n=i.h,i.return(n)):i.return(Ln(e.contentType))})}function XI(e,t,n){var i,r,l,c,f,h,v,S,T,b,I;return G(function(O){switch(O.g){case 1:if(i=[],r=[],n.audio&&(l={robustness:n.audio.robustness||"",contentType:t.contentType},si()&&t.contentType.includes('codecs="ac-3"')&&(l.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(l.encryptionScheme=n.audio.encryptionScheme),i.push(l)),n.video&&(c={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(c.encryptionScheme=n.video.encryptionScheme),r.push(c)),f={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(f.audioCapabilities=i),r.length&&(f.videoCapabilities=r),h=e?e.contentType:"",v=t?t.contentType:"",S=Di(h)+";"+ii(h),T=Di(v)+";"+ii(v),b=n.keySystem,I=null,ye(O,2),Zr.has(S+"#"+T+"#"+b)){I=Zr.get(S+"#"+T+"#"+b)||null,O.s(4);break}return L(O,navigator.requestMediaKeySystemAccess(n.keySystem,[f]),5);case 5:I=O.h,Zr.set(S+"#"+T+"#"+b,I);case 4:Le(O,3);break;case 2:De(O);case 3:return O.return(I)}})}function YI(e){var t,n,i,r,l;return G(function(c){if(c.g==1){if(!(E.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return c.return(Ln(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),i=e.transferFunction||"",i){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return c.return(!1)}return r=!1,l=WI,l.has(t)?(r=l.get(t),c.s(2)):L(c,cast.__platform__.canDisplayType(t),3)}return c.g!=2&&(r=c.h,l.set(t,r)),c.return(r)})}Bi.MediaCapabilities=G1,G1.install=Ax;var Cx=null;G1.originalMcap=Cx;var WI=new Map;dr(Ax,-1);function bx(){}function Ix(){var e=lg();(E.MediaSource||E.ManagedMediaSource)&&(e&&E.MediaSource?12>=e?(z1(),Dx()):15>=e&&z1():Vt("DT_STB_BCM")?(z1(),Dx()):(Vt("Tizen 2")||eo()||Vt("Tizen 4"))&&JI()),(E.MediaSource||E.ManagedMediaSource)&&QI(),E.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ZI()}function z1(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,Tt.apply(0,arguments));return t.abort=function(){},t}}function Dx(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function QI(){if(E.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return Tl(n)!="mp2t"&&e(n)}}if(E.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);E.ManagedMediaSource.isTypeSupported=function(n){return Tl(n)!="mp2t"&&t(n)}}}function JI(){var e=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(n){return ii(n)!="opus"&&e(n)},E.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);E.ManagedMediaSource.isTypeSupported=function(n){return ii(n)!="opus"&&t(n)}}}function ZI(){var e=MediaSource.isTypeSupported;Ro()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(c){return c.startsWith("codecs=")});if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),l=r.findIndex(function(c){return c.startsWith("vp09")});return 0<=l&&(r[l]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}Bi.MediaSource=bx,bx.install=Ix,dr(Ix);function Ox(){}function kx(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?$I():E.orientation!=null&&eD())}function $I(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function eD(){function e(){switch(E.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new xm;screen.orientation=t,e(),E.addEventListener("orientationchange",function(){e();var n=new Ie("change");t.dispatchEvent(n)})}Bi.Orientation=Ox,Ox.install=kx;function xm(){Nt.call(this),this.type="",this.angle=0}nt(xm,Nt),xm.prototype.lock=function(e){function t(i){return screen.lockOrientation?screen.lockOrientation(i):screen.mozLockOrientation?screen.mozLockOrientation(i):screen.msLockOrientation?screen.msLockOrientation(i):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},xm.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},dr(kx);function F1(){}var X1,Y1,W1,Q1,J1,Z1;function Mx(e){E.HTMLVideoElement&&E.WebKitMediaKeys&&(e!==void 0&&e&&(X1=!0,Y1=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),W1=HTMLMediaElement.prototype.setMediaKeys,Q1=E.MediaKeys,J1=E.MediaKeySystemAccess,Z1=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=nD,E.MediaKeys=Ny,E.MediaKeySystemAccess=Em,navigator.requestMediaKeySystemAccess=tD,E.shakaMediaKeysPolyfill=rD,Wu.clear(),Zr.clear())}function tD(e,t){try{var n=new Em(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function nD(e){var t=this.mediaKeys;return t&&t!=e&&Rx(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Rx(e,this):Promise.resolve()}function iD(e){if(e=Je(e.initData),Ti(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=cl(e.subarray(4),!0),e=kr(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=yr(e),this.dispatchEvent(t)}Bi.PatchedMediaKeysApple=F1,F1.uninstall=function(){X1&&(X1=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Y1),HTMLMediaElement.prototype.setMediaKeys=W1,E.MediaKeys=Q1,E.MediaKeySystemAccess=J1,navigator.requestMediaKeySystemAccess=Z1,Y1=Z1=W1=J1=Q1=null,E.shakaMediaKeysPolyfill="",Wu.clear(),Zr.clear())},F1.install=Mx;function Em(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=A(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")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 l=A(n.audioCapabilities),c=l.next();!c.done;c=l.next())c=c.value,c.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,c.contentType.split(";")[0])&&(t.audioCapabilities.push(c),r=!0));if(n.videoCapabilities)for(n=A(n.videoCapabilities),l=n.next();!l.done;l=n.next())l=l.value,l.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,l.contentType.split(";")[0])&&(t.videoCapabilities.push(l),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Em.prototype.createMediaKeys=function(){var e=new Ny(this.keySystem);return Promise.resolve(e)},Em.prototype.getConfiguration=function(){return this.g};function Ny(e){this.h=new WebKitMediaKeys(e),this.g=new yt}Ny.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new $1(this.h)},Ny.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Rx(e,t){if(e.g.Qa(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",iD);try{return yi(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}Ny.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function $1(e){Nt.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new yt,this.sessionId="",this.expiration=NaN,this.closed=new It,this.keyStatuses=new Nx}nt($1,Nt),y=$1.prototype,y.generateRequest=function(e,t){var n=this;this.h=new It;try{var i=this.l.createSession("video/mp4",Je(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(r){n.h&&(n.h.resolve(),n.h=null),r=new Map().set("messageType",n.keyStatuses.dc()==null?"license-request":"license-renewal").set("message",yr(r.message)),r=new Ie("message",r),n.dispatchEvent(r)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(Am(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var r=Error("EME PatchedMediaKeysApple key error");if(r.errorCode=n.i.error,n.h!=null)n.h.reject(r),n.h=null;else if(n.g!=null)n.g.reject(r),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Am(n,"output-not-allowed");break;default:Am(n,"internal-error")}}),Am(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},y.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},y.update=function(e){this.g=new It;try{this.i.update(Je(e))}catch(t){this.g.reject(t)}return this.g},y.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(e){this.closed.reject(e)}return this.closed},y.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Am(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ie("keystatuseschange"),e.dispatchEvent(t)}function Nx(){this.size=0,this.g=void 0}y=Nx.prototype,y.dc=function(){return this.g},y.forEach=function(e){this.g&&e(this.g,Mo.value())},y.get=function(e){if(this.has(e))return this.g},y.has=function(e){var t=Mo.value();return!!(this.g&&ll(e,t))},y.entries=function(){},y.keys=function(){},y.values=function(){};var rD="apple";dr(function(){E.HTMLVideoElement&&E.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||Mx())});function Px(){}function Lx(){E.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||eo()||Vt("Tizen 4")||Vt("Tizen 5.0")||al())&&(MediaKeys.prototype.setServerCertificate=oD)}function oD(){return Promise.resolve(!1)}Bi.PatchedMediaKeysCert=Px,Px.install=Lx,dr(Lx);function _x(){}function Ux(){if(!(!E.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)rS="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=lD,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=uD,E.MediaKeys=Py,E.MediaKeySystemAccess=Cm,E.shakaMediaKeysPolyfill=aD}}function eS(e){var t=rS;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function lD(e,t){try{var n=new Cm(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function uD(e){var t=this.mediaKeys;return t&&t!=e&&jx(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&jx(e,this),Promise.resolve()}Bi.PatchedMediaKeysWebkit=_x,_x.install=Ux;function Cm(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=A(t);for(var l=t.next();!l.done;l=t.next()){l=l.value;var c={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:l.initDataTypes,sessionTypes:["temporary"],label:l.label},f=!1;if(l.audioCapabilities)for(var h=A(l.audioCapabilities),v=h.next();!v.done;v=h.next())v=v.value,v.contentType&&(f=!0,r.canPlayType(v.contentType.split(";")[0],this.g)&&(c.audioCapabilities.push(v),i=!0));if(l.videoCapabilities)for(h=A(l.videoCapabilities),v=h.next();!v.done;v=h.next())v=v.value,v.contentType&&(f=!0,r.canPlayType(v.contentType,this.g)&&(c.videoCapabilities.push(v),i=!0));if(f||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),l.persistentState=="required"&&(n?(c.persistentState="required",c.sessionTypes=["persistent-license"]):i=!1),i){this.h=c;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Cm.prototype.createMediaKeys=function(){var e=new Py(this.g);return Promise.resolve(e)},Cm.prototype.getConfiguration=function(){return this.h};function Py(e){this.l=e,this.h=null,this.g=new yt,this.i=[],this.j=new Map}function jx(e,t){e.h=t,e.g.Qa();var n=rS;t&&(e.g.D(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=yr(i.initData),e.h.dispatchEvent(r)}),e.g.D(t,n+"keymessage",function(i){var r=tS(e,i.sessionId);r&&(i=new Map().set("messageType",r.keyStatuses.dc()==null?"licenserequest":"licenserenewal").set("message",i.message),i=new Ie("message",i),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}),e.g.D(t,n+"keyadded",function(i){(i=tS(e,i.sessionId))&&i.ready()}),e.g.D(t,n+"keyerror",function(i){var r=tS(e,i.sessionId);if(r){var l=Error("EME v0.1b key error"),c=i.errorCode;c.systemCode=i.systemCode,l.errorCode=c,!i.sessionId&&r.h?(i.systemCode==45&&(l.message="Unsupported session type."),r.h.reject(l),r.h=null):i.sessionId&&r.g?(r.g.reject(l),r.g=null):(l=i.systemCode,i.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?bm(r,"output-restricted"):l==1?bm(r,"expired"):bm(r,"internal-error"))}}))}Py.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")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 nS(t,this.l,e),this.i.push(e),e},Py.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Py.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function tS(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 nS(e,t,n){Nt.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new It,this.keyStatuses=new Vx}nt(nS,Nt),y=nS.prototype,y.ready=function(){bm(this,"usable"),this.g&&this.g.resolve(),this.g=null};function Bx(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var i=Je(kr("LOAD_SESSION|"+n));else{var r=kr("PERSISTENT|");i=Ht(r,t)}else i=Je(t)}catch(c){return Promise.reject(c)}e.h=new It;var l=eS("generateKeyRequest");try{e.j[l](e.i,i)}catch(c){if(c.name!="InvalidStateError")return e.h=null,Promise.reject(c);new ct(function(){try{e.j[l](e.i,i)}catch(f){e.h.reject(f),e.h=null}}).da(.01)}return e.h}function iS(e,t,n){if(e.g)e.g.then(function(){return iS(e,t,n)}).catch(function(){return iS(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var i=Zt(n),r=JSON.parse(i);r.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=Hi(r.keys[0].k),r=Hi(r.keys[0].kid)}else i=Je(n),r=null;var l=eS("addKey");try{e.j[l](e.i,i,r,e.sessionId)}catch(c){e.g.reject(c),e.g=null}}}function bm(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new Ie("keystatuseschange"),e.dispatchEvent(t)}y.generateRequest=function(e,t){return Bx(this,t,null)},y.load=function(e){return this.l=="persistent-license"?Bx(this,null,e):Promise.reject(Error("Not a persistent session."))},y.update=function(e){var t=new It;return iS(this,t,e),t},y.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=eS("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},y.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function Vx(){this.size=0,this.g=void 0}y=Vx.prototype,y.dc=function(){return this.g},y.forEach=function(e){this.g&&e(this.g,Mo.value())},y.get=function(e){if(this.has(e))return this.g},y.has=function(e){var t=Mo.value();return!!(this.g&&ll(e,t))},y.entries=function(){},y.keys=function(){},y.values=function(){};var rS="",aD="webkit";dr(Ux);function Hx(){}function Kx(){if(E.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=cD,Object.defineProperty(e,"disablePictureInPicture",{get:dD,set:pD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=fD,document.addEventListener("webkitpresentationmodechanged",sD,!0))}}function sD(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function cD(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function fD(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function dD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pD(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Bi.PiPWebkit=Hx,Hx.install=Kx,dr(Kx);function qx(){}function Gx(){E.crypto&&("randomUUID"in E.crypto||(E.crypto.randomUUID=hD))}function hD(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}Bi.RandomUUID=qx,qx.install=Gx,dr(Gx);function zx(){}function Fx(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:yD})}function yD(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}Bi.Symbol=zx,zx.install=Fx,dr(Fx);function Xx(){}function Yx(){if(E.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}Bi.VideoPlayPromise=Xx,Xx.install=Yx,dr(Yx);function Wx(){}function Qx(){if(E.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||al())&&(e.getVideoPlaybackQuality=gD)}}function gD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Bi.VideoPlaybackQuality=Wx,Wx.install=Qx,dr(Qx);function Jx(){}function Zx(){if(!E.VTTCue&&E.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=oS;else if(t==6)e=vD;else{try{var n=!!oS(1,2,"")}catch{n=!1}n&&(e=oS)}e&&(E.VTTCue=function(i,r,l){return e(i,r,l)})}}function oS(e,t,n){return new E.TextTrackCue(e,t,n)}function vD(e,t,n){return new E.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}Bi.VTTCue=Jx,Jx.install=Zx,dr(Zx);function qr(){}qr.prototype.parseInit=function(){},qr.prototype.setSequenceMode=function(){},qr.prototype.setManifestType=function(){},qr.prototype.parseMedia=function(e,t){var n=null,i=[];e=Zt(e).split(/\r?\n/),e=A(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=mD.exec(r))){var l=SD.exec(r[1]);l=60*parseInt(l[1],10)+parseFloat(l[2].replace(",",".")),r=new Ft(l,t.segmentEnd?t.segmentEnd:l+2,r[2]),n&&(n.endTime=l,i.push(n)),n=r}return n&&i.push(n),i},Me("shaka.text.LrcTextParser",qr),qr.prototype.parseMedia=qr.prototype.parseMedia,qr.prototype.setManifestType=qr.prototype.setManifestType,qr.prototype.setSequenceMode=qr.prototype.setSequenceMode,qr.prototype.parseInit=qr.prototype.parseInit;var mD=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,SD=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dn("application/x-subtitle-lrc",function(){return new qr});function Ir(){}Ir.prototype.parseInit=function(){},Ir.prototype.setSequenceMode=function(){},Ir.prototype.setManifestType=function(){},Ir.prototype.parseMedia=function(e,t,n,i){var r=Zt(e);if(e=[],r=="")return e;var l=Bu(r,"tt",!0);if(!l)throw new Y(2,2,2005,"Failed to parse TTML.");if(r=Nr(l,"body")[0],!r)return[];var c=Po(l,Ly,"frameRate"),f=Po(l,Ly,"subFrameRate"),h=Po(l,Ly,"frameRateMultiplier"),v=Po(l,Ly,"tickRate"),S=Po(l,Ly,"cellResolution"),T=l.attributes["xml:space"]||"default",b=Po(l,Om,"extent");if(T!="default"&&T!="preserve")throw new Y(2,2,2005,"Invalid xml:space value: "+T);T=T=="default",c=new AD(c,f,h,v),S=ED(S),f=Nr(l,"metadata")[0],f=(f?f.children:[]).filter(function(P){return P!=`
|
||
`}),h=Nr(l,"style"),l=Nr(l,"region"),v=[];for(var I=A(l),O=I.next();!O.done;O=I.next())(O=TD(O.value,h,b))&&v.push(O);if(Mt(r,"p").length)throw new Y(2,2,2001,"<p> can only be inside <div> in TTML");for(b=A(Mt(r,"div")),I=b.next();!I.done;I=b.next())if(Mt(I.value,"span").length)throw new Y(2,2,2001,"<span> can only be inside <p> in TTML");return(t=$x(r,t,c,f,h,l,v,T,S,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function $x(e,t,n,i,r,l,c,f,h,v,S,T,b){var I=v;if(rs(e)){if(!S)return null;var O={tagName:"span",children:[Cn(e)],attributes:{},parent:null}}else O=e;for(var P=null,N=A(sE),_=N.next();!_.done&&!(P=Dm(O,"backgroundImage",i,"#",_.value)[0]);_=N.next());N=null,_=Po(O,sE,"backgroundImage");var B=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(_&&B.test(_)){if(N=parseInt(_.split(":").pop(),10)-1,N>=b.length)return null;N=b[N]}else T&&_&&!_.startsWith("#")&&(B=new fn(T),_=new fn(_),(_=B.resolve(_).toString())&&(N=_));if((e.tagName=="p"||P||N)&&(S=!0),e=S,_=(O.attributes["xml:space"]||(f?"default":"preserve"))=="default",B=O.children.every(rs),f=[],!B)for(var F=A(O.children),z=F.next();!z.done;z=F.next())(z=$x(z.value,t,n,i,r,l,c,_,h,O,S,T,b))&&f.push(z);if(i=v!=null,T=Cn(O),T=O.children.length&&T&&/\S/.test(T),F=O.attributes.begin||O.attributes.end||O.attributes.dur,!(F||T||O.tagName=="br"||f.length!=0||i&&!_))return null;for(b=nE(O,n),T=b.start,b=b.end;I&&I.tagName&&I.tagName!="tt";)b=xD(I,n,T,b),T=b.start,b=b.end,I=I.parent;if(T==null&&(T=0),T+=t.periodStart,b=b==null?1/0:b+t.periodStart,T=Math.max(T,t.segmentStart),b=Math.min(b,t.segmentEnd),!F&&0<f.length)for(T=1/0,b=0,t=A(f),n=t.next();!n.done;n=t.next())n=n.value,T=Math.min(T,n.startTime),b=Math.max(b,n.endTime);if(O.tagName=="br")return r=new Ft(T,b,""),r.lineBreak=!0,r;if(t="",B&&(t=wi(Cn(O)||""),_&&(t=t.replace(/\s+/g," "))),t=new Ft(T,b,t),t.nestedCues=f,S||(t.isContainer=!0),h&&(t.cellResolution=h),h=Dm(O,"region",l,"")[0],O.attributes.region&&h&&h.attributes["xml:id"]){var J=h.attributes["xml:id"];t.region=c.filter(function(q){return q.id==J})[0]}return c=h,v&&i&&!O.attributes.region&&!O.attributes.style&&(c=Dm(v,"region",l,"")[0]),wD(t,O,c,P,N,r,e,f.length==0),t}function TD(e,t,n){var i=new Lu,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=cS.exec(n)||fS.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var l,c=Im(e,t,"extent");if(c){var f=(l=cS.exec(c))||fS.exec(c);f!=null&&(i.width=Number(f[1]),i.height=Number(f[2]),l||(n!=null&&(i.width=100*i.width/n),r!=null&&(i.height=100*i.height/r)),i.widthUnits=l||n!=null?qi:0,i.heightUnits=l||r!=null?qi:0)}return(e=Im(e,t,"origin"))&&(f=(l=cS.exec(e))||fS.exec(e),f!=null&&(i.viewportAnchorX=Number(f[1]),i.viewportAnchorY=Number(f[2]),l?c||(i.width=100-i.viewportAnchorX,i.widthUnits=qi,i.height=100-i.viewportAnchorY,i.heightUnits=qi):(r!=null&&(i.viewportAnchorY=100*i.viewportAnchorY/r),n!=null&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=l||n!=null?qi:0)),i}function lS(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function wD(e,t,n,i,r,l,c,f){if(c=c||f,Ri(t,n,l,"direction",c)=="rtl"&&(e.direction="rtl"),f=Ri(t,n,l,"writingMode",c),f=="tb"||f=="tblr"?e.writingMode="vertical-lr":f=="tbrl"?e.writingMode="vertical-rl":f=="rltb"||f=="rl"?e.direction="rtl":f&&(e.direction=as),(f=Ri(t,n,l,"textAlign",!0))?(e.positionAlign=ID.get(f),e.lineAlign=bD.get(f),e.textAlign=Ic[f.toUpperCase()]):e.textAlign=zi,(f=Ri(t,n,l,"displayAlign",!0))&&(e.displayAlign=Ff[f.toUpperCase()]),(f=Ri(t,n,l,"color",c))&&(e.color=lS(f)),(f=Ri(t,n,l,"backgroundColor",c))&&(e.backgroundColor=lS(f)),(f=Ri(t,n,l,"border",c))&&(e.border=f),f=Ri(t,n,l,"fontFamily",c))switch(f){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=f.split(",").filter(function(h){return h!="default"}).join(",")}switch((f=Ri(t,n,l,"fontWeight",c))&&f=="bold"&&(e.fontWeight=Hu),f=Ri(t,n,l,"wrapOption",c),e.wrapLine=!(f&&f=="noWrap"),(f=Ri(t,n,l,"lineHeight",c))&&f.match(pp)&&(e.lineHeight=f),(f=Ri(t,n,l,"fontSize",c))&&(f.match(pp)||f.match(CD))&&(e.fontSize=f),(f=Ri(t,n,l,"fontStyle",c))&&(e.fontStyle=hg[f.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,f=i.attributes.encoding,i=Cn(i).trim(),r=="PNG"&&f=="Base64"&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=Ri(t,n,l,"textOutline",c))&&(i=i.split(" "),i[0].match(pp)?e.textStrokeColor=e.color:(e.textStrokeColor=lS(i[0]),i.shift()),i[0]&&i[0].match(pp)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=Ri(t,n,l,"letterSpacing",c))&&i.match(pp)&&(e.letterSpacing=i),(i=Ri(t,n,l,"linePadding",c))&&i.match(pp)&&(e.linePadding=i),(i=Ri(t,n,l,"opacity",c))&&(e.opacity=parseFloat(i)),(i=Im(n,l,"textDecoration"))&&eE(e,i),(i=uS(t,l,"textDecoration"))&&eE(e,i),(i=Ri(t,n,l,"textCombine",c))&&(e.textCombineUpright=i),Ri(t,n,l,"ruby",c)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function eE(e,t){t=A(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(_o)||e.textDecoration.push(_o);break;case"noUnderline":e.textDecoration.includes(_o)&&Rr(e.textDecoration,_o);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Rr(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Rr(e.textDecoration,"overline")}}function Ri(e,t,n,i,r){return r=r===void 0?!0:r,(e=uS(e,n,i))?e:r?Im(t,n,i):null}function Im(e,t,n){if(!e)return null;var i=Po(e,Om,n);return i||tE(e,t,n)}function uS(e,t,n){var i=Po(e,Om,n);return i||tE(e,t,n)}function tE(e,t,n){e=Dm(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var l=hl(e[r],"urn:ebu:tt:style",n);l||(l=Po(e[r],Om,n)),l||(l=uS(e[r],t,n)),l&&(i=l)}return i}function Dm(e,t,n,i,r){var l=[];if(!e||1>n.length)return l;var c=e;for(e=null;!e&&!(e=r?hl(c,r,t):c.attributes[t])&&(c=c.parent,c););if(t=e){for(t=A(t.split(" ")),r=t.next();!r.done;r=t.next())for(r=r.value,e=A(n),c=e.next();!c.done;c=e.next())if(c=c.value,i+c.attributes["xml:id"]==r){l.push(c);break}}return l}function xD(e,t,n,i){return e=nE(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),i==null?i=e.end:e.start!=null&&(i+=e.start),{start:n,end:i}}function nE(e,t){var n=aS(e.attributes.begin,t),i=aS(e.attributes.end,t);return e=aS(e.attributes.dur,t),i==null&&e!=null&&(i=n+e),{start:n,end:i}}function aS(e,t){var n=null;if(iE.test(e)){e=iE.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),l=Number(e[4]);l+=(Number(e[5])||0)/t.h,r+=l/t.frameRate,n=r+60*i+3600*n}else if(rE.test(e))n=sS(rE,e);else if(oE.test(e))n=sS(oE,e);else if(lE.test(e))e=lE.exec(e),n=Number(e[1])/t.frameRate;else if(uE.test(e))e=uE.exec(e),n=Number(e[1])/t.g;else if(aE.test(e))n=sS(aE,e);else if(e)throw new Y(2,2,2001,"Could not parse cue time range in TTML");return n}function sS(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function ED(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Me("shaka.text.TtmlTextParser",Ir),Ir.prototype.parseMedia=Ir.prototype.parseMedia,Ir.prototype.setManifestType=Ir.prototype.setManifestType,Ir.prototype.setSequenceMode=Ir.prototype.setSequenceMode,Ir.prototype.parseInit=Ir.prototype.parseInit;function AD(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var cS=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,CD=/^(\d{1,4}(?:\.\d+)?|100)%$/,pp=/^(\d+px|\d+em|\d*\.?\d+c)$/,fS=/^(\d+)px (\d+)px$/,iE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,oE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,lE=/^(\d*(?:\.\d*)?)f$/,uE=/^(\d*(?:\.\d*)?)t$/,aE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),bD=new Map().set("left",ml).set("center","center").set("right","end").set("start",ml).set("end","end"),ID=new Map().set("left","line-left").set("center","center").set("right","line-right"),Ly=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Om=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],sE=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dn("application/ttml+xml",function(){return new Ir});function Zn(){this.g=new Ir}Zn.prototype.parseInit=function(e){var t=!1;if(new Pt().box("moov",Ze).box("trak",Ze).box("mdia",Ze).box("minf",Ze).box("stbl",Ze).R("stsd",An).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new Y(2,2,2007)},Zn.prototype.setSequenceMode=function(){},Zn.prototype.setManifestType=function(){},Zn.prototype.parseMedia=function(e,t,n){var i=[],r=null,l=[],c=new Map,f=[];if(new Pt().box("moof",Ze).box("traf",Ze).R("tfhd",function(_){r=cu(_.reader,_.flags).md}).R("trun",function(_){_=Fc(_.reader,_.version,_.flags),_=A(_.fg);for(var B=_.next();!B.done;B=_.next())f.push(B.value.sampleSize||r||0)}).R("subs",function(_){for(var B=_.reader,F=B.S(),z=-1,J=0;J<F;J++){var q=B.S();z+=q,q=B.na();for(var K=[],W=0;W<q;W++)_.version==1?K.push(B.S()):K.push(B.na()),B.X(),B.X(),B.S();c.set(z,K)}}).box("mdat",Rl(function(_){l.push(_)})).parse(e,!1),l.length==0)throw new Y(2,2,2007);for(var h=Ht.apply(Nn,te(l)),v=0,S=0;S<f.length;S++){var T=Je(h,v,f[S]);v+=f[S];var b=c.get(S);if(b&&b.length){T=Je(T,0,b[0]);for(var I=[],O=b[0],P=1;P<b.length;P++){var N=Je(e,O,b[P]);N=fl(N),I.push("data:image/png;base64,"+N),O+=b[P]}i=i.concat(this.g.parseMedia(T,t,n,I))}else i=i.concat(this.g.parseMedia(T,t,n,[]))}return i},Me("shaka.text.Mp4TtmlParser",Zn),Zn.prototype.parseMedia=Zn.prototype.parseMedia,Zn.prototype.setManifestType=Zn.prototype.setManifestType,Zn.prototype.setSequenceMode=Zn.prototype.setSequenceMode,Zn.prototype.parseInit=Zn.prototype.parseInit,Dn('application/mp4; codecs="stpp"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Zn}),Dn('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Zn});function Qi(){this.g="UNKNOWN"}Qi.prototype.parseInit=function(){},Qi.prototype.setSequenceMode=function(){},Qi.prototype.setManifestType=function(e){this.g=e},Qi.prototype.parseMedia=function(e,t){e=Zt(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
|
||
`);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new Y(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new Y(2,2,2e3);if(e=is(e[1]),e==null)throw new Y(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],i=A(n[0].split(`
|
||
`)),r=i.next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new eu(r);var l=new Lu;Uu(r),ts(r);for(var c=Uu(r);c;){var f=l,h=c;(c=/^id=(.*)$/.exec(h))?f.id=c[1]:(c=/^width=(\d{1,2}|100)%$/.exec(h))?f.width=Number(c[1]):(c=/^lines=(\d+)$/.exec(h))?(f.height=Number(c[1]),f.heightUnits=2):(c=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(h))?(f.regionAnchorX=Number(c[1]),f.regionAnchorY=Number(c[2])):(c=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(h))?(f.viewportAnchorX=Number(c[1]),f.viewportAnchorY=Number(c[2])):/^scroll=up$/.exec(h)&&(f.scroll="up"),ts(r),c=Uu(r)}t.push(l)}for(i=new Map,Xp(i),r=[],n=A(n.slice(1)),l=n.next();!l.done;l=n.next()){if(l=l.value.split(`
|
||
`),(l.length!=1||l[0])&&!/^NOTE($|[ \t])/.test(l[0])&&l[0]=="STYLE"){for(f=[],c=-1,h=1;h<l.length;h++)l[h].includes("::cue")&&(f.push([]),c=f.length-1),c!=-1&&(f[c].push(l[h]),l[h].includes("}")&&(c=-1));for(f=A(f),c=f.next();!c.done;c=f.next()){var v=c.value;c="global",(h=v[0].match(/\((.*)\)/))&&(c=h.pop()),h=v.slice(1,-1),v[0].includes("}")&&(v=/\{(.*?)\}/.exec(v[0]))&&(h=v[1].split(";")),(v=i.get(c))||(v=new Ft(0,0,""));for(var S=!1,T=0;T<h.length;T++){var b=/^\s*([^:]+):\s*(.*)/.exec(h[T]);if(b){var I=b[2].trim().replace(";","");switch(b[1].trim()){case"background-color":case"background":S=!0,v.backgroundColor=I;break;case"color":S=!0,v.color=I;break;case"font-family":S=!0,v.fontFamily=I;break;case"font-size":S=!0,v.fontSize=I;break;case"font-weight":(700<=parseInt(I,10)||I=="bold")&&(S=!0,v.fontWeight=Hu);break;case"font-style":switch(I){case"normal":S=!0,v.fontStyle=Jp;break;case"italic":S=!0,v.fontStyle=ss;break;case"oblique":S=!0,v.fontStyle="oblique"}break;case"opacity":S=!0,v.opacity=parseFloat(I);break;case"text-combine-upright":S=!0,v.textCombineUpright=I;break;case"text-shadow":S=!0,v.textShadow=I;break;case"white-space":S=!0,v.wrapLine=I!="noWrap"}}}S&&i.set(c,v)}}if(v=l,S=e,v.length==1&&!v[0]||/^NOTE($|[ \t])/.test(v[0])||v[0]=="STYLE"||v[0]=="REGION")l=null;else if(l=null,v[0].includes("-->")||(l=v[0],v.splice(0,1)),f=new eu(v[0]),c=ns(f),T=_u(f,/[ \t]+--\x3e[ \t]+/g),h=ns(f),c==null||T==null||h==null)Et("Failed to parse VTT time code. Cue skipped:",l,v),l=null;else{for(c+=S,h+=S,S=v.slice(1).join(`
|
||
`).trim(),i.has("global")?(v=i.get("global").clone(),v.startTime=c,v.endTime=h,v.payload=S):v=new Ft(c,h,S),ts(f),c=Uu(f);c;)cE(v,c,t),ts(f),c=Uu(f);bc(v,i),l!=null&&(v.id=l),l=v}l&&r.push(l)}return r};function cE(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],t=="middle"?e.textAlign=zi:e.textAlign=Ic[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=i[1]=="lr"?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":zf)):(i=/^region:(.*)$/.exec(t))?(t=DD(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Xf[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Lo,e.line=Number(n[1]),n[2]&&(e.lineAlign=Xf[n[2].toUpperCase()]))}function DD(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Me("shaka.text.VttTextParser",Qi),Qi.prototype.parseMedia=Qi.prototype.parseMedia,Qi.prototype.setManifestType=Qi.prototype.setManifestType,Qi.prototype.setSequenceMode=Qi.prototype.setSequenceMode,Qi.prototype.parseInit=Qi.prototype.parseInit,Dn("text/vtt",function(){return new Qi}),Dn('text/vtt; codecs="vtt"',function(){return new Qi}),Dn('text/vtt; codecs="wvtt"',function(){return new Qi});function Gr(){this.g=null}Gr.prototype.parseInit=function(e){var t=this,n=!1;if(new Pt().box("moov",Ze).box("trak",Ze).box("mdia",Ze).R("mdhd",function(i){i=zc(i.reader,i.version),t.g=i.timescale}).box("minf",Ze).box("stbl",Ze).R("stsd",An).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new Y(2,2,2008);if(!n)throw new Y(2,2,2008)},Gr.prototype.setSequenceMode=function(){},Gr.prototype.setManifestType=function(){},Gr.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new Y(2,2,2008);var n=0,i=[],r,l=[],c=!1,f=!1,h=!1,v=null;if(new Pt().box("moof",Ze).box("traf",Ze).R("tfdt",function(F){c=!0,n=na(F.reader,F.version).baseMediaDecodeTime}).R("tfhd",function(F){v=cu(F.reader,F.flags).ld}).R("trun",function(F){f=!0,i=Fc(F.reader,F.version,F.flags).fg}).box("mdat",Rl(function(F){h=!0,r=F})).parse(e,!1),!h&&!c&&!f)throw new Y(2,2,2008);e=n;for(var S=new Yt(r,0),T=A(i),b=T.next();!b.done;b=T.next()){b=b.value;var I=b.gg||v,O=b.ye?n+b.ye:e;e=O+(I||0);var P=0;do{var N=S.S();P+=N;var _=S.S(),B=null;_r(_)=="vttc"?8<N&&(B=S.Cb(N-8)):S.skip(N-8),I&&B&&(N=OD(B,t.periodStart+O/this.g,t.periodStart+e/this.g),l.push(N))}while(b.sampleSize&&P<b.sampleSize)}return l.filter(jo)};function OD(e,t,n){var i,r,l;return new Pt().box("payl",Rl(function(c){i=Zt(c)})).box("iden",Rl(function(c){r=Zt(c)})).box("sttg",Rl(function(c){l=Zt(c)})).parse(e),i?kD(i,r,l,t,n):null}function kD(e,t,n,i,r){if(e=new Ft(i,r,e),bc(e),t&&(e.id=t),n)for(t=new eu(n),n=Uu(t);n;)cE(e,n,[]),ts(t),n=Uu(t);return e}Me("shaka.text.Mp4VttParser",Gr),Gr.prototype.parseMedia=Gr.prototype.parseMedia,Gr.prototype.setManifestType=Gr.prototype.setManifestType,Gr.prototype.setSequenceMode=Gr.prototype.setSequenceMode,Gr.prototype.parseInit=Gr.prototype.parseInit,Dn('application/mp4; codecs="wvtt"',function(){return new Gr});function zr(){}zr.prototype.parseInit=function(){},zr.prototype.setSequenceMode=function(){},zr.prototype.setManifestType=function(){},zr.prototype.parseMedia=function(e){var t=Zt(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=A(t.split(`
|
||
|
||
`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
|
||
`);var i=new eu(n[0]),r=ns(i),l=_u(i,/,/g);if(i=ns(i),r==null||l==null||i==null)throw new Y(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Ft(r,i,n.slice(1).join(`
|
||
`).trim()))}return e},Me("shaka.text.SbvTextParser",zr),zr.prototype.parseMedia=zr.prototype.parseMedia,zr.prototype.setManifestType=zr.prototype.setManifestType,zr.prototype.setSequenceMode=zr.prototype.setSequenceMode,zr.prototype.parseInit=zr.prototype.parseInit,Dn("text/x-subviewer",function(){return new zr});function Dr(){this.g=new Qi}Dr.prototype.parseInit=function(){},Dr.prototype.setSequenceMode=function(){},Dr.prototype.setManifestType=function(){},Dr.prototype.parseMedia=function(e,t,n){return e=Zt(e),e=fE(e),e=Je(kr(e)),this.g.parseMedia(e,t,n,[])};function fE(e){var t=`WEBVTT
|
||
|
||
`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=A(e.split(`
|
||
|
||
`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
|
||
`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
|
||
|
||
`;return t}Me("shaka.text.SrtTextParser",Dr),Dr.srt2webvtt=fE,Dr.prototype.parseMedia=Dr.prototype.parseMedia,Dr.prototype.setManifestType=Dr.prototype.setManifestType,Dr.prototype.setSequenceMode=Dr.prototype.setSequenceMode,Dr.prototype.parseInit=Dr.prototype.parseInit,Dn("text/srt",function(){return new Dr});function Fr(){}Fr.prototype.parseInit=function(){},Fr.prototype.setSequenceMode=function(){},Fr.prototype.setManifestType=function(){},Fr.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=Zt(e).split(/\r?\n\s*\r?\n/),e=A(r),r=e.next();!r.done;r=e.next()){var l=r.value;r=l,(l=RD.exec(l))&&(i=l[1],r=l[2]),i=="V4 Styles"||i=="V4+ Styles"?(t=r,t=n?t+(`
|
||
`+r):r):i=="Events"&&(n=n?n+(`
|
||
`+r):r)}for(i=[],r=null,t=A(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(l=hE.exec(e))){if(e=l[1].trim(),l=l[2].trim(),e=="Format")r=l.split(km);else if(e=="Style"){e=l.split(km),l={};for(var c=0;c<r.length&&c<e.length;c++)l[r[c]]=e[c];i.push(l)}}for(r=[],t=null,n=A(n.split(/\r?\n/)),l=n.next(),e={};!l.done;e={Dh:void 0},l=n.next())if(l=l.value,!/^\s*;/.test(l)&&(c=hE.exec(l))){if(l=c[1].trim(),c=c[2].trim(),l=="Format")t=c.split(km);else if(l=="Dialogue"){c=c.split(km),l={};for(var f=0;f<t.length&&f<c.length;f++)l[t[f]]=c[f];f=pE(l.Start);var h=pE(l.End);c=new Ft(f,h,c.slice(t.length-1).join(",").replace(/\\N/g,`
|
||
`).replace(/\{[^}]+\}/g,"")),e.Dh=l.Style,(e=i.find(function(v){return function(S){return S.Name==v.Dh}}(e)))&&MD(c,e),r.push(c)}}return r};function MD(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=dE(n))&&(e.color=n),(n=t.BackColour)&&(n=dE(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=Hu),t.Italic&&(e.fontStyle=ss),t.Underline&&e.textDecoration.push(_o),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=vl,e.textAlign="start";break;case 2:e.displayAlign=vl,e.textAlign=zi;break;case 3:e.displayAlign=vl,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=zi;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=zi;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function dE(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function pE(e){return e=ND.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Me("shaka.text.SsaTextParser",Fr),Fr.prototype.parseMedia=Fr.prototype.parseMedia,Fr.prototype.setManifestType=Fr.prototype.setManifestType,Fr.prototype.setSequenceMode=Fr.prototype.setSequenceMode,Fr.prototype.parseInit=Fr.prototype.parseInit;var RD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,hE=/^\s*([^:]+):\s*(.*)/,km=/\s*,\s*/,ND=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dn("text/x-ssa",function(){return new Fr});function yE(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{ud:n,ia:e}:null}function gE(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(e[t+2]&60)>>>2;if(i>n.length-1)return null;var r=((e[t+2]&192)>>>6)+1,l=(e[t+2]&1)<<2;return l|=(e[t+3]&192)>>>6,{sampleRate:n[i],channelCount:l,codec:"mp4a.40."+r}}function vE(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var i=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return i<=n?!1:(t+=i,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function PD(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)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(t===6)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]);break;default:if(t===1)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(t===2||t===3)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}function Xr(e){this.j=e,this.h=0,this.g=new Map,this.i=null}y=Xr.prototype,y.destroy=function(){this.g.clear()},y.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Ln(this.convertCodecs("audio",e)):!1},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(_n(t)||"mp4a.40.2")+'"':t},y.getOriginalMimeType=function(){return this.j},y.transmux=function(e,t,n,i){for(var r=Je(e),l=ua(r),c=l.length;c<r.length&&!vE(r,c);c++);if(e=1e3*n.endTime,l=la(l),l.length&&n&&(l=l.find(function(S){return S.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=l.data),l=gE(r,c),!l)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount;for(var f=[];c<r.length;){var h=yE(r,c);if(!h)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var v=h.ud+h.ia;c+v<=r.length&&f.push({data:r.subarray(c+h.ud,c+v),size:h.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),c+=v}return r=l.sampleRate,e=Math.floor(e*r/1e3),i={id:t.id,type:"audio",codecs:l.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:f},stream:t},i=new fu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=xr(i),this.g.set(n,t)),n=this.i!==t,i=ra(i),this.i=t,this.h++,n?(t=Ht(t,i),Promise.resolve(t)):Promise.resolve(i)},Me("shaka.transmuxer.AacTransmuxer",Xr),Xr.prototype.transmux=Xr.prototype.transmux,Xr.prototype.getOriginalMimeType=Xr.prototype.getOriginalMimeType,Xr.prototype.convertCodecs=Xr.prototype.convertCodecs,Xr.prototype.isSupported=Xr.prototype.isSupported,Xr.prototype.destroy=Xr.prototype.destroy,fi("audio/aac",function(){return new Xr("audio/aac")},di);function mE(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var i=e[t+4]&63,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 l=e[t+6]>>5,c=0;l===2?c+=2:(l&1&&l!==1&&(c+=2),l&4&&(c+=2)),c=(e[t+6]<<8|e[t+7])>>12-c&1;var f=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|f>>2,(f&3)<<6|l<<3|c<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][l]+c,ra:e,ia:r}}function LD(e,t){if(e[t]===11&&e[t+1]===119){var n=0,i=5;t+=i;for(var r,l;0<i;){l=e[t];var c=Math.min(i,8),f=8-c;r=4278190080>>>24+f<<f,r=(l&r)>>f,n=n?n<<c|r:r,t+=1,i-=c}if(16>n)return!0}return!1}function Ao(e){this.j=e,this.h=0,this.g=new Map,this.i=null}y=Ao.prototype,y.destroy=function(){this.g.clear()},y.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Ln(this.convertCodecs("audio",e)):!1},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?eo()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},y.getOriginalMimeType=function(){return this.j},y.transmux=function(e,t,n,i){e=Je(e);for(var r=ua(e),l=r.length;l<e.length&&!LD(e,l);l++);var c=1e3*n.endTime;r=la(r),r.length&&n&&(r=r.find(function(S){return S.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),h=[];l<e.length;){var v=mE(e,l);if(!v)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=v.sampleRate,t.channelsCount=v.channelCount,r=v.sampleRate,f=v.ra,h.push({data:e.subarray(l,l+v.ia),size:v.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=v.ia}return e=Math.floor(c*r/1e3),i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:f,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:h},stream:t},i=new fu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=xr(i),this.g.set(n,t)),n=this.i!==t,i=ra(i),this.i=t,this.h++,n?(t=Ht(t,i),Promise.resolve(t)):Promise.resolve(i)},Me("shaka.transmuxer.Ac3Transmuxer",Ao),Ao.prototype.transmux=Ao.prototype.transmux,Ao.prototype.getOriginalMimeType=Ao.prototype.getOriginalMimeType,Ao.prototype.convertCodecs=Ao.prototype.convertCodecs,Ao.prototype.isSupported=Ao.prototype.isSupported,Ao.prototype.destroy=Ao.prototype.destroy,fi("audio/ac3",function(){return new Ao("audio/ac3")},di);function SE(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new Er(e.subarray(t+2));Pi(n,2),Pi(n,3);var i=ht(n,11)+1<<1,r=ht(n,2);if(r==3){r=ht(n,2),r=[24e3,22060,16e3][r];var l=3}else r=[48e3,44100,32e3][r],l=ht(n,2);var c=ht(n,3),f=ht(n,1);return n=ht(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][l])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,r<<6|n<<1|0,0|c<<1|f<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][c]+f,ra:e,ia:i})}function Co(e){this.j=e,this.h=0,this.g=new Map,this.i=null}y=Co.prototype,y.destroy=function(){this.g.clear()},y.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Ln(this.convertCodecs("audio",e)):!1},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},y.getOriginalMimeType=function(){return this.j},y.transmux=function(e,t,n,i){e=Je(e);for(var r=ua(e),l=r.length;l<e.length&&(e[l]<<8|e[l+1]<<0)!==2935;l++);var c=1e3*n.endTime;r=la(r),r.length&&n&&(r=r.find(function(S){return S.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),h=[];l<e.length;){var v=SE(e,l);if(!v)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=v.sampleRate,t.channelsCount=v.channelCount,r=v.sampleRate,f=v.ra,h.push({data:e.subarray(l,l+v.ia),size:v.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=v.ia}return e=Math.floor(c*r/1e3),i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:f,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:e,jb:h},stream:t},i=new fu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=xr(i),this.g.set(n,t)),n=this.i!==t,i=ra(i),this.i=t,this.h++,n?(t=Ht(t,i),Promise.resolve(t)):Promise.resolve(i)},Me("shaka.transmuxer.Ec3Transmuxer",Co),Co.prototype.transmux=Co.prototype.transmux,Co.prototype.getOriginalMimeType=Co.prototype.getOriginalMimeType,Co.prototype.convertCodecs=Co.prototype.convertCodecs,Co.prototype.isSupported=Co.prototype.isSupported,Co.prototype.destroy=Co.prototype.destroy,fi("audio/ec3",function(){return new Co("audio/ec3")},di);function _D(e){if(!e.length)return null;var t=e.find(function(P){return P.type==7});if(e=e.find(function(P){return P.type==8}),!t||!e)return null;var n=new Er(t.data),i=Dt(n);if(Dt(n),Dt(n),kn(n),jD.includes(i)&&(i=Ne(n),i===3&&Pi(n,1),kn(n),kn(n),Pi(n,1),He(n))){i=i!==3?8:12;for(var r=0;r<i;r++)He(n)&&(6>r?Ms(n,16):Ms(n,64))}if(kn(n),i=Ne(n),i===0)Ne(n);else if(i===1)for(Pi(n,1),kn(n),kn(n),i=Ne(n),r=0;r<i;r++)kn(n);kn(n),Pi(n,1);var l=Ne(n),c=Ne(n),f=ht(n,1);f===0&&Pi(n,1),Pi(n,1);var h=0,v=0,S=0,T=0;if(He(n)&&(h=Ne(n),v=Ne(n),S=Ne(n),T=Ne(n)),r=i=1,He(n)&&He(n)){var b=Dt(n),I=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<b&&16>=b?(i=I[b-1],r=O[b-1]):b===255&&(i=ht(n,16),r=ht(n,16))}return n=(2-f)*(c+1)*16-2*S-2*T,l=16*(l+1)-2*h-2*v,h=[],t=t.fullData,h.push(t.byteLength>>>8&255),h.push(t.byteLength&255),h=h.concat.apply(h,te(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,te(e)),e=new Uint8Array([1,h[3],h[4],h[5],255,225].concat(h,[1],t)),{height:n,width:l,Ca:e,Ia:i,Ka:r}}function UD(e){function t(O){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:O.pts,dts:O.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var O=[],P=A(r.nalus),N=P.next();!N.done;N=P.next()){N=N.value;var _=N.fullData.byteLength,B=new Uint8Array(4);B[0]=_>>24&255,B[1]=_>>16&255,B[2]=_>>8&255,B[3]=_&255,O.push(B),O.push(N.fullData)}r.data=Ht.apply(Nn,te(O)),i.push(r)}}for(var i=[],r=null,l=!1,c=0;c<e.length;c++){var f=e[c],h=f.nalus,v=!1;r&&h.length&&!l&&(n(),t(f)),h=A(f.nalus);for(var S=h.next();!S.done;S=h.next()){S=S.value;var T=!1;switch(S.type){case 1:var b=!1;T=!0;var I=S.data;v&&4<I.length&&(I=Ad(new Er(I)),I===2||I===4||I===7||I===9)&&(b=!0),b&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(f),r.frame=!0,r.isKeyframe=b;break;case 5:T=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(f),r.frame=!0,r.isKeyframe=!0;break;case 6:T=!0;break;case 7:v=T=!0;break;case 8:T=!0;break;case 9:l=T=!0,r&&r.frame&&(n(),r=null),r||t(f);break;case 12:T=!0;break;default:T=!1}r&&T&&r.nalus.push(S)}}return n(),i}var jD=[100,110,122,244,44,83,86,118,128,138,139,134];function BD(e){if(!e.length)return null;var t=e.find(function(c){return c.type==32}),n=e.find(function(c){return c.type==33}),i=e.find(function(c){return c.type==34});if(!t||!n||!i)return null;var r=VD(t.fullData);e=HD(n.fullData);var l=KD(i.fullData);return t=qD(t.fullData,n.fullData,i.fullData,{Uf:r.Uf,rg:r.rg,Ef:e.Ef,Ff:e.Ff,yf:e.yf,Df:e.Df,zf:e.zf,Af:e.Af,Bf:e.Bf,Cf:e.Cf,rf:e.rf,tf:e.tf,uf:e.uf,vf:e.vf,wf:e.wf,xf:e.xf,hf:e.hf,le:e.le,ff:e.ff,ef:e.ef,df:e.df,Wf:l.Wf}),{height:e.height,width:e.width,Ca:t,Ia:e.vj,Ka:e.uj}}function VD(e){var t=new Er(e,!0);return Dt(t),Dt(t),ht(t,4),ht(t,2),ht(t,6),e=ht(t,3),t=He(t),{Uf:e+1,rg:t}}function HD(e){e=new Er(e,!0),Dt(e),Dt(e);var t=0,n=0,i=0,r=0;ht(e,4);var l=ht(e,3);He(e);for(var c=ht(e,2),f=ht(e,1),h=ht(e,5),v=Dt(e),S=Dt(e),T=Dt(e),b=Dt(e),I=Dt(e),O=Dt(e),P=Dt(e),N=Dt(e),_=Dt(e),B=Dt(e),F=Dt(e),z=[],J=[],q=0;q<l;q++)z.push(He(e)),J.push(He(e));if(0<l)for(q=l;8>q;q++)ht(e,2);for(q=0;q<l;q++)z[q]&&ht(e,88),J[q]&&Dt(e);Ne(e),z=Ne(e),z==3&&ht(e,1),J=Ne(e),q=Ne(e),He(e)&&(t+=Ne(e),n+=Ne(e),i+=Ne(e),r+=Ne(e));var K=Ne(e),W=Ne(e),Q=Ne(e);if(He(e))for(var ie=0;ie<=l;ie++)Ne(e),Ne(e),Ne(e);else Ne(e),Ne(e),Ne(e);if(Ne(e),Ne(e),Ne(e),Ne(e),Ne(e),Ne(e),He(e)&&He(e))for(ie=0;4>ie;ie++)for(var Z=0;Z<(ie===3?2:6);Z++)if(He(e)){var ne=Math.min(64,1<<4+(ie<<1));1<ie&&hu(e);for(var re=0;re<ne;re++)hu(e)}else Ne(e);for(He(e),He(e),He(e)&&(Dt(e),Ne(e),Ne(e),He(e)),ie=Ne(e),ne=Z=0;ne<ie;ne++)if(re=!1,ne!==0&&(re=He(e)),re){ne===ie&&Ne(e),He(e),Ne(e);for(var ue=re=0;ue<=Z;ue++){var de=He(e),se=!1;de||(se=He(e)),(de||se)&&re++}Z=re}else{for(ue=Ne(e),re=Ne(e),Z=ue+re,de=0;de<ue;de++)Ne(e),He(e);for(ue=0;ue<re;ue++)Ne(e),He(e)}if(He(e))for(ie=Ne(e),Z=0;Z<ie;Z++){for(ne=0;ne<Q+4;ne++)ht(e,1);ht(e,1)}if(ie=Q=1,Z=0,He(e),He(e),He(e)){if(He(e)&&(ne=Dt(e),re=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ue=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<ne&&16>=ne?(Q=re[ne-1],ie=ue[ne-1]):ne===255&&(Q=ht(e,16),ie=ht(e,16))),He(e)&&He(e),He(e)&&(ht(e,3),He(e),He(e)&&(Dt(e),Dt(e),Dt(e))),He(e)&&(Ne(e),Ne(e)),He(e),He(e),He(e),(ne=He(e))&&(Ne(e),Ne(e),Ne(e),Ne(e)),He(e)&&(ht(e,32),ht(e,32),He(e)&&Ne(e),He(e)))for(ue=!1,ne=He(e),re=He(e),(ne||re)&&((ue=He(e))&&(Dt(e),ht(e,5),He(e),ht(e,5)),ht(e,4),ht(e,4),ue&&ht(e,4),ht(e,5),ht(e,5),ht(e,5)),de=0;de<=l;de++){var we=!0;se=1,He(e)||(we=He(e));var be=!1;if(we?Ne(e):be=He(e),be||(se=Ne(e)+1),ne){for(we=0;we<se;we++)Ne(e),Ne(e),ue&&(Ne(e),Ne(e));He(e)}if(re){for(we=0;we<se;we++)Ne(e),Ne(e),ue&&(Ne(e),Ne(e));He(e)}}He(e)&&(He(e),He(e),He(e),Z=Ne(e),Ne(e),Ne(e),Ne(e),Ne(e))}return{yf:F,Ef:c,Ff:f,Df:h,zf:v,Af:S,Bf:T,Cf:b,rf:I,tf:O,uf:P,vf:N,wf:_,xf:B,le:Z,hf:0,ff:z,ef:K,df:W,width:J-(t+n)*(z===1||z===2?2:1),height:q-(i+r)*(z===1?2:1),vj:Q,uj:ie}}function KD(e){var t=new Er(e,!0);Dt(t),Dt(t),Ne(t),Ne(t),He(t),He(t),ht(t,3),He(t),He(t),Ne(t),Ne(t),hu(t),He(t),He(t),He(t)&&Ne(t),hu(t),hu(t),He(t),He(t),He(t),He(t),e=He(t),t=He(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Wf:n}}function qD(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(i.Ef&3)<<6|(i.Ff?1:0)<<5|i.Df&31,r[2]=i.zf,r[3]=i.Af,r[4]=i.Bf,r[5]=i.Cf,r[6]=i.rf,r[7]=i.tf,r[8]=i.uf,r[9]=i.vf,r[10]=i.wf,r[11]=i.xf,r[12]=i.yf,r[13]=240|(i.le&3840)>>8,r[14]=i.le&255,r[15]=252|i.Wf&3,r[16]=252|i.ff&3,r[17]=248|i.ef&7,r[18]=248|i.df&7,r[19]=0,r[20]=0,r[21]=(i.hf&3)<<6|(i.Uf&7)<<3|(i.rg?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(e.byteLength&65280)>>8,r[27]=(e.byteLength&255)>>0,r.set(e,28),r[23+(5+e.byteLength)]=161,r[e.byteLength+29]=0,r[e.byteLength+30]=1,r[e.byteLength+31]=(t.byteLength&65280)>>8,r[e.byteLength+32]=(t.byteLength&255)>>0,r.set(t,e.byteLength+33),r[23+(e.byteLength+10+t.byteLength)]=162,r[e.byteLength+10+t.byteLength+24]=0,r[e.byteLength+10+t.byteLength+25]=1,r[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,r[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,r.set(n,e.byteLength+10+t.byteLength+28),r}function Mm(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,l=e[t+2]>>2&3;if(n!==1&&r!==0&&r!==15&&l!==3){var c=e[t+3]>>6;r=1e3*GD[14*(n===3?3-i:i===3?3:4)+r-1],l=zD[3*(n===3?0:n===2?1:2)+l],n=FD[n][i];var f=XD[i],h=Math.floor(n*r/l+(e[t+2]>>1&1))*f,v=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(v=v?parseInt(v[1],10):0)&&87>=v&&i===2&&224e3<=r&&c===0&&(e[t+3]|=128),{sampleRate:l,channelCount:c===3?1:2,ia:h,tj:8*n*f}}return null}function TE(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function wE(e,t){if(t+1<e.length&&TE(e,t)){var n=Mm(e,t),i=4;return n&&n.ia&&(i=n.ia),t+=i,t===e.length||t+1<e.length&&TE(e,t)}return!1}var GD=[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],zD=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],FD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],XD=[0,1,1,4];function bo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}y=bo.prototype,y.destroy=function(){this.g.clear()},y.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Ln(this.convertCodecs("audio",e)):!1},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},y.getOriginalMimeType=function(){return this.j},y.transmux=function(e,t,n,i){for(var r=Je(e),l=ua(r).length;l<r.length&&!wE(r,l);l++);var c;for(e=[];l<r.length;){var f=Mm(r,l);if(!f)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));c||(c=f),l+f.ia<=r.length&&e.push({data:r.subarray(l,l+f.ia),size:f.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),l+=f.ia}return c?(r=9e4*c.tj/c.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:c.sampleRate,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.h,baseMediaDecodeTime:r,jb:e},stream:t},i=new fu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=xr(i),this.g.set(n,t)),n=this.i!==t,i=ra(i),this.i=t,this.h++,n?(t=Ht(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))},Me("shaka.transmuxer.Mp3Transmuxer",bo),bo.prototype.transmux=bo.prototype.transmux,bo.prototype.getOriginalMimeType=bo.prototype.getOriginalMimeType,bo.prototype.convertCodecs=bo.prototype.convertCodecs,bo.prototype.isSupported=bo.prototype.isSupported,bo.prototype.destroy=bo.prototype.destroy,fi("audio/mpeg",function(){return new bo("audio/mpeg")},di);function Io(e){this.h=e,this.g=null}y=Io.prototype,y.destroy=function(){},y.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=_n(e).split(","),n=ci("audio",t);return t=ci("video",t),!n||t||pi(n)!="mp3"?!1:Ln(this.convertCodecs("audio",e))},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},y.getOriginalMimeType=function(){return this.h},y.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Wt,e=Je(e),e=this.g.parse(e),e.od().audio!="mp3"||r!="audio")return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),r=A(e.fb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=Mm(e,t))?(t+i.ia<=e.length&&(n=Ht(n,e.subarray(t,t+i.ia))),t+=i.ia):t++;return Promise.resolve(n)},Me("shaka.transmuxer.MpegTsTransmuxer",Io),Io.prototype.transmux=Io.prototype.transmux,Io.prototype.getOriginalMimeType=Io.prototype.getOriginalMimeType,Io.prototype.convertCodecs=Io.prototype.convertCodecs,Io.prototype.isSupported=Io.prototype.isSupported,Io.prototype.destroy=Io.prototype.destroy,fi("video/mp2t",function(){return new Io("video/mp2t")},ru);/*
|
||
@license
|
||
MSS Transmuxer
|
||
Copyright 2015 Dash Industry Forum
|
||
SPDX-License-Identifier: BSD-3-Clause
|
||
*/function Yr(e){this.h=e,(this.g=m1.get("ISOBoxer")())&&YD(this)}function YD(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(i){this._procEntryField(i,"BytesOfClearData","uint",16),this._procEntryField(i,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,i=0;16>i;i++)this.usertype[i]!==WD[i]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}y=Yr.prototype,y.destroy=function(){},y.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Ln(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ln(t)||Ln(e))},y.convertCodecs=function(e,t){return t.replace("mss/","")},y.getOriginalMimeType=function(){return this.h},y.transmux=function(e,t,n){if(!n)return Promise.resolve(Je(e));if(!t.mssPrivateData)return Promise.reject(new Y(2,3,3020,n?n.N()[0]:null));try{var i,r=this.g.parseBuffer(e),l=r.fetch("tfhd");l.track_ID=t.id+1;var c=r.fetch("tfdt"),f=r.fetch("traf");c===null&&(c=this.g.createFullBox("tfdt",f,l),c.version=1,c.flags=0,c.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var h=r.fetch("trun"),v=r.fetch("tfxd");v&&v._parent.boxes.splice(v._parent.boxes.indexOf(v),1);var S=r.fetch("tfrf");S&&S._parent.boxes.splice(S._parent.boxes.indexOf(S),1);var T=r.fetch("sepiff");if(T!==null){T.type="senc",T.usertype=void 0;var b=r.fetch("saio");if(b===null){b=this.g.createFullBox("saio",f),b.version=0,b.flags=0,b.entry_count=1,b.offset=[0];var I=this.g.createFullBox("saiz",f);if(I.version=0,I.flags=0,I.sample_count=T.sample_count,I.default_sample_info_size=0,I.sample_info_size=[],T.flags&2)for(i=0;i<T.sample_count;i+=1)I.sample_info_size[i]=10+6*T.entry[i].NumberOfEntries;else I.default_sample_info_size=8}}l.flags&=16777214,l.flags|=131072,h.flags|=1;var O=r.fetch("moof");h.data_offset=O.getLength()+8;var P=r.fetch("saio");P!==null&&(P.offset[0]=xE(O,"traf")+xE(f,"senc")+16);var N=Je(r.write());return Promise.resolve(N)}catch(_){return _ instanceof Y?Promise.reject(_):Promise.reject(new Y(2,3,3022,n?n.N()[0]:null))}};function xE(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}Me("shaka.transmuxer.MssTransmuxer",Yr),Yr.prototype.transmux=Yr.prototype.transmux,Yr.prototype.getOriginalMimeType=Yr.prototype.getOriginalMimeType,Yr.prototype.convertCodecs=Yr.prototype.convertCodecs,Yr.prototype.isSupported=Yr.prototype.isSupported,Yr.prototype.destroy=Yr.prototype.destroy;var WD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);fi("mss/audio/mp4",function(){return new Yr("mss/audio/mp4")},di),fi("mss/video/mp4",function(){return new Yr("mss/video/mp4")},di);function Do(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}y=Do.prototype,y.destroy=function(){this.i.clear(),this.h&&this.h.destroy()},y.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=_n(n).split(",");return n=ci("audio",i),i=ci("video",i),n&&(n=pi(n),!QD.includes(n))||i&&(n=pi(i),!JD.includes(n))?!1:t?Ln(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ln(t)||Ln(e))},y.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=_n(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return ri(n,"audio/mp4")}).map(ps).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},y.getOriginalMimeType=function(){return this.m},y.transmux=function(e,t,n,i,r){var l=Je(e);if(r=="audio"&&!Rs(l)){for(var c=ua(l),f=c.length;f<l.length;f++)if(wE(l,f))return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));for(f=c.length;f<l.length;f++)if(vE(l,f))return this.h||(this.h=new Xr("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new Wt;var h=this.j.parse(l),v=[],S=h.od();try{var T=null;if(r=="video"){switch(S.video){case"avc":var b=[],I=null,O=h.wc(),P=UD(O);if(!P.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var N=0;N<P.length;N++){var _=P[N];I==null&&(I=_.dts);var B=void 0;B=N+1<P.length?(P[N+1].dts||0)-(_.dts||0):1<P.length?(_.dts||0)-(P[N-1].dts||0):9e4*(n.endTime-n.startTime),b.push({data:_.data,size:_.data.byteLength,duration:B,eb:Math.round((_.pts||0)-(_.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:_.isKeyframe?2:1,ib:_.isKeyframe?0:1}})}for(var F=[],z=A(O),J=z.next();!J.done;J=z.next())F.push.apply(F,te(J.value.nalus));var q=_D(F);if(!q||I==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=q.height,t.width=q.width,T={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:q.Ca,Ia:q.Ia,Ka:q.Ka,data:{Db:this.g,baseMediaDecodeTime:I,jb:b},stream:t};break;case"hvc":var K=[],W=null,Q=[],ie=h.wc();if(!ie.length)throw new Y(2,3,3023,n?n.N()[0]:null);for(var Z=0;Z<ie.length;Z++){var ne=ie[Z],re=ne.nalus;Q.push.apply(Q,te(re));for(var ue=!1,de=[],se=!1,we=A(re),be=we.next();!be.done;be=we.next()){var Qe=be.value;switch(Qe.type){case 1:case 0:var Be=se=!0;break;case 19:case 20:case 21:ue=Be=se=!0;break;case 32:Be=!0;break;case 33:Be=!0;break;case 34:Be=!0;break;case 35:se=Be=!0;break;case 39:case 40:Be=!0;break;default:Be=!1}if(se&&Be){var kt=Qe.fullData.byteLength,mt=new Uint8Array(4);mt[0]=kt>>24&255,mt[1]=kt>>16&255,mt[2]=kt>>8&255,mt[3]=kt&255,de.push(mt),de.push(Qe.fullData)}}var st=de.length?{data:Ht.apply(Nn,te(de)),isKeyframe:ue}:null;if(st){W==null&&ne.dts!=null&&(W=ne.dts);var pt=void 0;pt=Z+1<ie.length?(ie[Z+1].dts||0)-(ne.dts||0):1<ie.length?(ne.dts||0)-(ie[Z-1].dts||0):9e4*(n.endTime-n.startTime),K.push({data:st.data,size:st.data.byteLength,duration:pt,eb:Math.round((ne.pts||0)-(ne.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:st.isKeyframe?2:1,ib:st.isKeyframe?0:1}})}}var Ot=BD(Q);if(!Ot||W==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.height=Ot.height,t.width=Ot.width,T={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:Ot.Ca,Ia:Ot.Ia,Ka:Ot.Ka,data:{Db:this.g,baseMediaDecodeTime:W,jb:K},stream:t}}T&&(v.push(T),T=null)}if(r=="audio"){switch(S.audio){case"aac":for(var lt=[],St,et=null,ut=null,zt=null,$n=A(h.fb()),gn=$n.next();!gn.done;gn=$n.next()){var mn=gn.value,Kn=mn.data;if(Kn){var ai=0;if(ut==-1&&zt)Kn=Ht(zt,mn.data),ut=null;else if(ut!=null&&zt){ai=Math.max(0,ut);var Rf=Ht(zt,Kn.subarray(0,ai));lt.push({data:Rf,size:Rf.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),ut=zt=null}if(St=gE(Kn,ai),!St)throw new Y(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=St.sampleRate,t.channelsCount=St.channelCount,et==null&&mn.pts!==null&&(et=mn.pts);ai<Kn.length;){var Pa=yE(Kn,ai);if(!Pa){zt=Kn.subarray(ai,Kn.length),ut=-1;break}var cc=Pa.ud+Pa.ia;ut=Math.max(0,ai+cc-Kn.length),ut!=0?zt=Kn.subarray(ai+Pa.ud,ai+cc):ai+cc<=Kn.length&<.push({data:Kn.subarray(ai+Pa.ud,ai+cc),size:Pa.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),ai+=cc}}}if(!St||et==null){if(!h.wc().length)throw new Y(2,3,3018,n?n.N()[0]:null);et=9e4*n.startTime;var Oo=ci("audio",t.codecs.split(","));if(!Oo||!t.channelsCount||!t.audioSamplingRate)throw new Y(2,3,3018,n?n.N()[0]:null);St={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Oo};var yS=PD(Oo,t.channelsCount);if(!yS)throw new Y(2,3,3018,n?n.N()[0]:null);for(var iO=et+9e4*(n.endTime-n.startTime),UE=et;UE<iO;)lt.push({data:yS,size:yS.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),UE+=1024/St.sampleRate*9e4}var jE=St.sampleRate,rO=et/9e4*jE;T={id:t.id,type:"audio",codecs:St.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:jE,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:rO,jb:lt},stream:t};break;case"ac3":for(var BE=[],Nm=0,gS=new Uint8Array([]),Pm=null,VE=A(h.fb()),vS=VE.next();!vS.done;vS=VE.next()){var mS=vS.value,SS=mS.data;Pm==null&&mS.pts!==null&&(Pm=mS.pts);for(var hp=0;hp<SS.length;){var fc=mE(SS,hp);fc?(t.audioSamplingRate=fc.sampleRate,t.channelsCount=fc.channelCount,Nm=fc.sampleRate,gS=fc.ra,BE.push({data:SS.subarray(hp,hp+fc.ia),size:fc.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),hp+=fc.ia):hp++}}if(Nm==0||gS.byteLength==0||Pm==null)throw new Y(2,3,3018,n?n.N()[0]:null);var oO=Pm/9e4*Nm;T={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Nm,duration:i,lb:[],ra:gS,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:oO,jb:BE},stream:t};break;case"ec3":for(var HE=[],Lm=0,TS=new Uint8Array([]),_m=null,KE=A(h.fb()),wS=KE.next();!wS.done;wS=KE.next()){var xS=wS.value,ES=xS.data;_m==null&&xS.pts!==null&&(_m=xS.pts);for(var yp=0;yp<ES.length;){var dc=SE(ES,yp);dc?(t.audioSamplingRate=dc.sampleRate,t.channelsCount=dc.channelCount,Lm=dc.sampleRate,TS=dc.ra,HE.push({data:ES.subarray(yp,yp+dc.ia),size:dc.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),yp+=dc.ia):yp++}}if(Lm==0||TS.byteLength==0||_m==null)throw new Y(2,3,3018,n?n.N()[0]:null);var lO=_m/9e4*Lm;T={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Lm,duration:i,lb:[],ra:TS,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:lO,jb:HE},stream:t};break;case"mp3":for(var qE=[],Um,jm=null,GE=A(h.fb()),AS=GE.next();!AS.done;AS=GE.next()){var CS=AS.value,jy=CS.data;if(jy){jm==null&&CS.pts!==null&&(jm=CS.pts);for(var Nf=0;Nf<jy.length;){var gp=Mm(jy,Nf);gp?(Um||(Um=gp),Nf+gp.ia<=jy.length&&qE.push({data:jy.subarray(Nf,Nf+gp.ia),size:gp.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Nf+=gp.ia):Nf++}}}if(!Um||jm==null)throw new Y(2,3,3018,n?n.N()[0]:null);var zE=Um.sampleRate,uO=jm/9e4*zE;T={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:zE,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:uO,jb:qE},stream:t};break;case"opus":var FE=[],Bm=null,bu=h.F;if(!bu)throw new Y(2,3,3018,n?n.N()[0]:null);var Ji=[];switch(bu.Zh){case 1:case 2:Ji=[0];break;case 0:Ji=[255,1,1,0,1];break;case 128:Ji=[255,2,0,0,1];break;case 3:Ji=[1,2,1,0,2,1];break;case 4:Ji=[1,2,2,0,1,2,3];break;case 5:Ji=[1,3,2,0,4,1,2,3];break;case 6:Ji=[1,4,2,0,4,1,2,3,5];break;case 7:Ji=[1,4,2,0,4,1,2,3,5,6];break;case 8:Ji=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Ji=[1,1,2,0,1];break;case 131:Ji=[1,1,3,0,1,2];break;case 132:Ji=[1,1,4,0,1,2,3];break;case 133:Ji=[1,1,5,0,1,2,3,4];break;case 134:Ji=[1,1,6,0,1,2,3,4,5];break;case 135:Ji=[1,1,7,0,1,2,3,4,5,6];break;case 136:Ji=[1,1,8,0,1,2,3,4,5,6,7]}for(var XE=new Uint8Array([0,bu.channelCount,0,0,bu.sampleRate>>>24&255,bu.sampleRate>>>17&255,bu.sampleRate>>>8&255,bu.sampleRate>>>0&255,0,0].concat(te(Ji))),YE=bu.sampleRate,WE=A(h.fb()),bS=WE.next();!bS.done;bS=WE.next()){var IS=bS.value,vp=IS.data;Bm==null&&IS.pts!==null&&(Bm=IS.pts);for(var By=0;By<vp.length;){for(var aO=(vp[By+1]&16)!==0,sO=(vp[By+1]&8)!==0,La=By+2,Vm=0;vp[La]===255;)Vm+=255,La+=1;Vm+=vp[La],La+=1,La+=aO?2:0,La+=sO?2:0;var QE=vp.slice(La,La+Vm);FE.push({data:QE,size:QE.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),By=La+Vm}}if(XE.byteLength==0||Bm==null)throw new Y(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=bu.sampleRate,t.channelsCount=bu.channelCount;var cO=Bm/9e4*YE;T={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:YE,duration:i,lb:[],ra:XE,Ca:new Uint8Array([]),Ia:0,Ka:0,data:{Db:this.g,baseMediaDecodeTime:cO,jb:FE},stream:t}}T&&(v.push(T),T=null)}}catch(OS){return OS&&OS.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(OS)}if(!v.length)return Promise.reject(new Y(2,3,3018,n?n.N()[0]:null));var JE=new fu(v),DS=t.id+"_"+n.i;if(this.i.has(DS))var Vy=this.i.get(DS);else Vy=xr(JE),this.i.set(DS,Vy);var fO=this.l!==Vy,ZE=ra(JE);if(this.l=Vy,this.g++,fO){var dO=Ht(Vy,ZE);return Promise.resolve(dO)}return Promise.resolve(ZE)},Me("shaka.transmuxer.TsTransmuxer",Do),Do.prototype.transmux=Do.prototype.transmux,Do.prototype.getOriginalMimeType=Do.prototype.getOriginalMimeType,Do.prototype.convertCodecs=Do.prototype.convertCodecs,Do.prototype.isSupported=Do.prototype.isSupported,Do.prototype.destroy=Do.prototype.destroy;var QD=["aac","ac-3","ec-3","mp3","opus"],JD=["avc","hevc"];fi("video/mp2t",function(){return new Do("video/mp2t")},Dc);function EE(){}nt(EE,tn),Me("shaka.util.FairPlayUtils",EE);/*
|
||
@license
|
||
EME Encryption Scheme Polyfill
|
||
Copyright 2019 Google LLC
|
||
SPDX-License-Identifier: Apache-2.0
|
||
*/function AE(){}var _y;function CE(){_y||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(_y=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ZD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function ZD(e,t){var n=this,i;return G(function(r){return r.g==1?(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),L(r,_y.call(n,e,t),2)):(i=r.h,NE(i)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=_y,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=bE,r.return(bE.call(n,e,t))))})}function bE(e,t){var n=this,i,r,l,c,f,h,v,S,T,b,I,O;return G(function(P){if(P.g==1){for(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=RE(e),r=[],l=A(t),c=l.next();!c.done;c=l.next())f=c.value,h=IE(f.videoCapabilities,i),v=IE(f.audioCapabilities,i),f.videoCapabilities&&f.videoCapabilities.length&&!h.length||f.audioCapabilities&&f.audioCapabilities.length&&!v.length||(S=Object.assign({},f),S.videoCapabilities=h,S.audioCapabilities=v,r.push(S));if(!r.length)throw T=Error("Unsupported keySystem or supportedConfigurations."),T.name="NotSupportedError",T.code=DOMException.NOT_SUPPORTED_ERR,T;return L(P,_y.call(n,e,r),2)}return b=P.h,O=I=null,r[0]&&(r[0].videoCapabilities&&(I=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(O=r[0].audioCapabilities[0].encryptionScheme)),P.return(new Rm(b,I,O))})}function IE(e,t){return e&&e.filter(function(n){return dS(n.encryptionScheme,t)})}Me("EmeEncryptionSchemePolyfill",AE),AE.install=CE;function DE(){}var Uy;function OE(){Uy||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Uy=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$D,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function $D(e){var t=this,n,i;return G(function(r){switch(r.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),L(r,Uy.call(t,e),2);case 2:if(n=r.h,!n.supported||!e.keySystemConfiguration)return r.return(n);if((i=n.keySystemAccess)&&NE(i))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Uy,r.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=kE,i){r.s(3);break}return L(r,ME(e),4);case 4:return n.keySystemAccess=r.h,r.return(n);case 3:return r.return(kE.call(t,e))}})}function kE(e){var t=this,n,i,r,l,c,f,h;return G(function(v){switch(v.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),i=n=null,!e.keySystemConfiguration||(r=e.keySystemConfiguration,l=r.keySystem,i=r.audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,c=RE(l),f={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},dS(i,c)&&dS(n,c))?L(v,Uy.call(t,e),2):v.return(f);case 2:if(h=v.h,h.keySystemAccess){h.keySystemAccess=new Rm(h.keySystemAccess,n,i),v.s(3);break}if(!e.keySystemConfiguration){v.s(3);break}return L(v,ME(e),5);case 5:h.keySystemAccess=v.h;case 3:return v.return(h)}})}function ME(e){var t,n;return G(function(i){if(i.g==1){var r=e.keySystemConfiguration,l=[],c=[];return r.audio&&l.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&c.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},l.length&&(r.audioCapabilities=l),c.length&&(r.videoCapabilities=c),t=r,L(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}Me("McEncryptionSchemePolyfill",DE),DE.install=OE;function Rm(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}Rm.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=A(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=A(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},Rm.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function RE(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function NE(e){e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function dS(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&(tO||nO||eO))}function pS(){}function PE(){CE(),OE()}Me("EncryptionSchemePolyfills",pS),pS.install=PE;var eO=navigator.userAgent.includes("CrKey"),tO=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),hS,LE=navigator.userAgent||"";if(LE.includes("Web0S")){var _E=LE.match(/Chrome\/(\d+)/);hS=_E?79<=parseInt(_E[1],10):!1}else hS=!1;var nO=hS;typeof M<"u"&&M.exports&&(M.exports=pS)}).call(j,k,k,void 0);for(var x in j.shaka)R[x]=j.shaka[x]})()}(FS)),FS}var X4=F4();const bA=wp(X4);function Y4(){const[R,k]=xe.useState(""),[j,x]=xe.useState(""),[E,V]=xe.useState(""),[M,y]=xe.useState(""),s=xe.useRef(null),a=xe.useRef(null),p=ae=>{k(ae.target.value)},m=ae=>{x(ae.target.value)},D=ae=>{V(ae.target.value)},X=ae=>{y(ae.target.value)},A=()=>{if(s.current&&!a.current){const ae=new bA.Player(s.current);a.current=ae,ae.addEventListener("error",he=>{console.error("Error code",he.detail.code,"object",he.detail)})}},te=()=>{if(R&&j&&E){const ae=j.split(`
|
||
`).map(ke=>ke.trim()),he=E.split(`
|
||
`).map(ke=>ke.trim());if(ae.length!==he.length){console.error("The number of KIDs and Keys must be the same.");return}const je=new bA.Player(s.current),ee={drm:{clearKeys:{}}};ae.forEach((ke,Re)=>{ee.drm.clearKeys[ke]=he[Re]}),console.log("Configuring player with the following DRM config and headers:",ee),je.configure(ee),je.load(R).then(()=>{console.log("Video loaded")}).catch(ke=>{console.error("Error loading the video",ke)})}else console.error("MPD URL, KIDs, and Keys are required.")};return xe.useEffect(()=>{A()},[]),pe.jsxs("div",{className:"flex flex-col items-center w-full p-4",children:[pe.jsx(Tp,{children:pe.jsx("title",{children:"Test Player"})}),pe.jsxs("div",{className:"w-full flex flex-col",children:[pe.jsx("video",{ref:s,width:"100%",height:"auto",controls:!0,className:"h-96"}),pe.jsx("input",{type:"text",value:R,onChange:p,placeholder:"MPD URL",className:"border-2 border-rose-700/50 mt-2 text-white p-1 rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),pe.jsx("textarea",{placeholder:"KIDs (one per line)",value:j,onChange:m,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),pe.jsx("textarea",{placeholder:"Keys (one per line)",value:E,onChange:D,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),pe.jsx("textarea",{placeholder:"Headers (one per line)",value:M,onChange:X,className:"border-2 border-rose-700/50 mt-2 text-white p-1 overflow-y-auto rounded transition-all ease-in-out focus:outline-none focus:ring-2 focus:ring-rose-700/50 duration-200"}),pe.jsx("button",{onClick:te,className:"mt-4 p-2 bg-blue-500 text-white rounded",children:"Submit"})]})]})}const WA="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20stroke='%23ffffff'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%200L0%206V8H1V15H4V10H7V15H15V8H16V6L14%204.5V1H11V2.25L8%200ZM9%2010H12V13H9V10Z'%20fill='%23ffffff'/%3e%3c/g%3e%3c/svg%3e",QA="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='_x32_'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23ffffff;}%20%3c/style%3e%3cg%3e%3cpath%20class='st0'%20d='M0,17.067V153.6h512V17.067H0z%20M110.933,110.925h-51.2v-51.2h51.2V110.925z'/%3e%3cpath%20class='st0'%20d='M0,324.267h512V187.733H0V324.267z%20M59.733,230.391h51.2v51.2h-51.2V230.391z'/%3e%3cpath%20class='st0'%20d='M0,494.933h512V358.4H0V494.933z%20M59.733,401.058h51.2v51.2h-51.2V401.058z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",JA="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M7%208L3%2011.6923L7%2016M17%208L21%2011.6923L17%2016M14%204L10%2020'%20stroke='%23ffffff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3c/svg%3e",ZA="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20491.52%20491.52'%20xml:space='preserve'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%3e%3cg%3e%3cpath%20d='M0,0v327.68h491.52V0H0z%20M471.04,307.2H20.48V20.48h450.56V307.2z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M194.56,87.77v141.9l122.88-70.95L194.56,87.77z%20M215.04,123.25l61.44,35.47l-61.44,35.47V123.25z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M183.285,430.08c-4.758-23.34-25.441-40.96-50.165-40.96s-45.407,17.62-50.165,40.96H0v20.48h82.955%20c4.758,23.34,25.441,40.96,50.165,40.96s45.407-17.62,50.165-40.96H491.52v-20.48H183.285z%20M133.12,471.04%20c-16.94,0-30.72-13.78-30.72-30.72s13.78-30.72,30.72-30.72s30.72,13.78,30.72,30.72S150.06,471.04,133.12,471.04z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",$A="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2048%2048'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23ffffff'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cg%20id='Layer_2'%20data-name='Layer%202'%3e%3cg%20id='invisible_box'%20data-name='invisible%20box'%3e%3crect%20width='48'%20height='48'%20fill='none'/%3e%3c/g%3e%3cg%20id='Icons'%3e%3cg%3e%3cpath%20d='M20.1,20.5a2.3,2.3,0,0,0-2.2,2.4,2.3,2.3,0,0,0,2.2,2.4,2.4,2.4,0,0,0,0-4.8Z'/%3e%3cpath%20d='M28,20.5a2.4,2.4,0,1,0,2.2,2.4A2.3,2.3,0,0,0,28,20.5Z'/%3e%3cpath%20d='M38.5,2H9.5A4.5,4.5,0,0,0,5,6.5V36.3a4.5,4.5,0,0,0,4.5,4.5H34.1l-1.2-4.1,2.8,2.7,2.6,2.4L43,46V6.5A4.5,4.5,0,0,0,38.5,2ZM30.2,30.7l-1.5-1.8a6.9,6.9,0,0,0,4-2.6,15.1,15.1,0,0,1-2.5,1.3,14.6,14.6,0,0,1-3.2,1,15,15,0,0,1-5.6,0,20.2,20.2,0,0,1-3.2-1l-1.6-.7h-.2c0-.1,0-.1-.1-.1l-.6-.4a6.9,6.9,0,0,0,3.8,2.6l-1.4,1.8a8,8,0,0,1-6.7-3.3,29,29,0,0,1,3.2-12.8,10.3,10.3,0,0,1,6.1-2.3l.2.2a15.4,15.4,0,0,0-5.7,2.9l1.3-.6a12.7,12.7,0,0,1,4.9-1.4h.4a20.6,20.6,0,0,1,4.3,0,16.3,16.3,0,0,1,6.6,2.1,13.5,13.5,0,0,0-5.4-2.8l.3-.3a10.3,10.3,0,0,1,6.1,2.3,29.7,29.7,0,0,1,3.1,12.8S35,30.6,30.2,30.7Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",eC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20width='800px'%20height='800px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3ctitle%3etelegram%3c/title%3e%3cpath%20d='M22.122%2010.040c0.006-0%200.014-0%200.022-0%200.209%200%200.403%200.065%200.562%200.177l-0.003-0.002c0.116%200.101%200.194%200.243%200.213%200.403l0%200.003c0.020%200.122%200.031%200.262%200.031%200.405%200%200.065-0.002%200.129-0.007%200.193l0-0.009c-0.225%202.369-1.201%208.114-1.697%2010.766-0.21%201.123-0.623%201.499-1.023%201.535-0.869%200.081-1.529-0.574-2.371-1.126-1.318-0.865-2.063-1.403-3.342-2.246-1.479-0.973-0.52-1.51%200.322-2.384%200.221-0.23%204.052-3.715%204.127-4.031%200.004-0.019%200.006-0.040%200.006-0.062%200-0.078-0.029-0.149-0.076-0.203l0%200c-0.052-0.034-0.117-0.053-0.185-0.053-0.045%200-0.088%200.009-0.128%200.024l0.002-0.001q-0.198%200.045-6.316%204.174c-0.445%200.351-1.007%200.573-1.619%200.599l-0.006%200c-0.867-0.105-1.654-0.298-2.401-0.573l0.074%200.024c-0.938-0.306-1.683-0.467-1.619-0.985q0.051-0.404%201.114-0.827%206.548-2.853%208.733-3.761c1.607-0.853%203.47-1.555%205.429-2.010l0.157-0.031zM15.93%201.025c-8.302%200.020-15.025%206.755-15.025%2015.060%200%208.317%206.742%2015.060%2015.060%2015.060s15.060-6.742%2015.060-15.060c0-8.305-6.723-15.040-15.023-15.060h-0.002q-0.035-0-0.070%200z'/%3e%3c/g%3e%3c/svg%3e",tC="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23ffffff'%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20role='img'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M4.209%204.603c-.247%200-.525.02-.84.088-.333.07-1.28.283-2.054%201.027C-.403%207.25.035%209.685.089%2010.052c.065.446.263%201.687%201.21%202.768%201.749%202.141%205.513%202.092%205.513%202.092s.462%201.103%201.168%202.119c.955%201.263%201.936%202.248%202.89%202.367%202.406%200%207.212-.004%207.212-.004s.458.004%201.08-.394c.535-.324%201.013-.893%201.013-.893s.492-.527%201.18-1.73c.21-.37.385-.729.538-1.068%200%200%202.107-4.471%202.107-8.823-.042-1.318-.367-1.55-.443-1.627-.156-.156-.366-.153-.366-.153s-4.475.252-6.792.306c-.508.011-1.012.023-1.512.027v4.474l-.634-.301c0-1.39-.004-4.17-.004-4.17-1.107.016-3.405-.084-3.405-.084s-5.399-.27-5.987-.324c-.187-.011-.401-.032-.648-.032zm.354%201.832h.111s.271%202.269.6%203.597C5.549%2011.147%206.22%2013%206.22%2013s-.996-.119-1.641-.348c-.99-.324-1.409-.714-1.409-.714s-.73-.511-1.096-1.52C1.444%208.73%202.021%207.7%202.021%207.7s.32-.859%201.47-1.145c.395-.106.863-.12%201.072-.12zm8.33%202.554c.26.003.509.127.509.127l.868.422-.529%201.075a.686.686%200%200%200-.614.359.685.685%200%200%200%20.072.756l-.939%201.924a.69.69%200%200%200-.66.527.687.687%200%200%200%20.347.763.686.686%200%200%200%20.867-.206.688.688%200%200%200-.069-.882l.916-1.874a.667.667%200%200%200%20.237-.02.657.657%200%200%200%20.271-.137%208.826%208.826%200%200%201%201.016.512.761.761%200%200%201%20.286.282c.073.21-.073.569-.073.569-.087.29-.702%201.55-.702%201.55a.692.692%200%200%200-.676.477.681.681%200%201%200%201.157-.252c.073-.141.141-.282.214-.431.19-.397.515-1.16.515-1.16.035-.066.218-.394.103-.814-.095-.435-.48-.638-.48-.638-.467-.301-1.116-.58-1.116-.58s0-.156-.042-.27a.688.688%200%200%200-.148-.241l.516-1.062%202.89%201.401s.48.218.583.619c.073.282-.019.534-.069.657-.24.587-2.1%204.317-2.1%204.317s-.232.554-.748.588a1.065%201.065%200%200%201-.393-.045l-.202-.08-4.31-2.1s-.417-.218-.49-.596c-.083-.31.104-.691.104-.691l2.073-4.272s.183-.37.466-.497a.855.855%200%200%201%20.35-.077z'/%3e%3c/g%3e%3c/svg%3e";function W4(){return pe.jsxs("div",{className:"flex flex-col w-full h-full bg-white/1",children:[pe.jsx("div",{children:pe.jsx("p",{className:"text-white text-2xl font-bold p-3 text-center mb-5",children:pe.jsx("a",{href:"/",children:"CDRM-Project"})})}),pe.jsxs("div",{className:"overflow-y-auto grow",children:[pe.jsxs(Ua,{to:"/",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-sky-500/50 bg-black/50":"hover:border-l-sky-500/50 hover:bg-white/5"}`,children:[pe.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:pe.jsx("img",{src:WA,alt:"Home",className:"w-1/2 cursor-pointer"})}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Home"})]}),pe.jsxs(Ua,{to:"/cache",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-emerald-500/50 bg-black/50":"hover:border-l-emerald-500/50 hover:bg-white/5"}`,children:[pe.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:pe.jsx("img",{src:QA,alt:"Cache",className:"w-1/2 cursor-pointer"})}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Cache"})]}),pe.jsxs(Ua,{to:"/api",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-indigo-500/50 bg-black/50":"hover:border-l-indigo-500/50 hover:bg-white/5"}`,children:[pe.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:pe.jsx("img",{src:JA,alt:"API",className:"w-1/2 cursor-pointer"})}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"API"})]}),pe.jsxs(Ua,{to:"/testplayer",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-rose-700/50 bg-black/50":"hover:border-l-rose-700/50 hover:bg-white/5"}`,children:[pe.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:pe.jsx("img",{src:ZA,alt:"Test Player",className:"w-1/2 cursor-pointer"})}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Test Player"})]})]}),pe.jsxs("div",{className:"flex flex-row w-full h-16 self-end bg-black/25",children:[pe.jsx("a",{href:"https://discord.cdrm-project.com",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-blue-950 group",children:pe.jsx("img",{src:$A,alt:"Discord",className:"w-1/2 cursor-pointer group-hover:animate-bounce"})}),pe.jsx("a",{href:"https://telegram.cdrm-project.com",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-blue-400 group",children:pe.jsx("img",{src:eC,alt:"Telegram",className:"w-1/2 cursor-pointer group-hover:animate-bounce"})}),pe.jsx("a",{href:"https://cdm-project.com/tpd94/cdrm-project",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer hover:bg-green-700 group",children:pe.jsx("img",{src:tC,alt:"Gitea",className:"w-1/2 cursor-pointer group-hover:animate-bounce"})})]})]})}const Q4="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20d='M20%207L4%207'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M20%2012L4%2012'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M20%2017L4%2017'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e";function J4({setIsMenuOpen:R}){const k=()=>{R(j=>!j)};return pe.jsxs("div",{className:"flex flex-row w-full h-full bg-white/1",children:[pe.jsx("button",{className:"w-24 p-4",onClick:k,children:pe.jsx("img",{src:Q4,alt:"Menu",className:"w-full h-full cursor-pointer"})}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),pe.jsx("div",{className:"w-24 p-4"})]})}const Z4="data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20stroke='%23ffffff'%20stroke-width='1.5'/%3e%3cpath%20d='M14.5%209.50002L9.5%2014.5M9.49998%209.5L14.5%2014.5'%20stroke='%23ffffff'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e";function $4({isMenuOpen:R,setIsMenuOpen:k}){return pe.jsx(pe.Fragment,{children:pe.jsx("div",{className:`flex flex-col fixed top-0 left-0 w-full h-full bg-black transition-transform transform ${R?"translate-x-0":"-translate-x-full"} z-50`,style:{transitionDuration:"0.3s"},children:pe.jsxs("div",{className:"flex flex-col bg-gray-950/55 h-full",children:[pe.jsxs("div",{className:"h-16 w-full border-b-2 border-white/5 flex flex-row",children:[pe.jsx("div",{className:"w-1/4 h-full"}),pe.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),pe.jsx("div",{className:"w-1/4 h-full",children:pe.jsx("button",{className:"w-full h-full flex items-center justify-center",onClick:()=>k(!1),children:pe.jsx("img",{src:Z4,alt:"Close",className:"w-1/2 h-1/2 cursor-pointer"})})})]}),pe.jsxs("div",{className:"overflow-y-auto flex flex-col p-5 w-full space-y-2 flex-grow",children:[pe.jsxs(Ua,{to:"/",className:({isActive:j})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${j?"border-l-4 border-l-sky-500/50 bg-black/50 text-white":"border-transparent hover:border-l-sky-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>k(!1),children:[pe.jsx("img",{src:WA,alt:"Home",className:"w-5 h-5"}),pe.jsx("span",{className:"text-lg",children:"Home"})]}),pe.jsxs(Ua,{to:"/cache",className:({isActive:j})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${j?"border-l-emerald-500/50 bg-black/50 text-white":"border-transparent hover:border-l-emerald-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>k(!1),children:[pe.jsx("img",{src:QA,alt:"Cache",className:"w-5 h-5"}),pe.jsx("span",{className:"text-lg",children:"Cache"})]}),pe.jsxs(Ua,{to:"/api",className:({isActive:j})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${j?"border-l-indigo-500/50 bg-black/50 text-white":"border-transparent hover:border-l-indigo-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>k(!1),children:[pe.jsx("img",{src:JA,alt:"API",className:"w-5 h-5"}),pe.jsx("span",{className:"text-lg",children:"API"})]}),pe.jsxs(Ua,{to:"/testplayer",className:({isActive:j})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${j?"border-l-rose-700/50 bg-black/50 text-white":"border-transparent hover:border-l-rose-700/50 hover:bg-white/5 text-white/80"}`,onClick:()=>k(!1),children:[pe.jsx("img",{src:ZA,alt:"Test Player",className:"w-5 h-5"}),pe.jsx("span",{className:"text-lg",children:"Test Player"})]})]}),pe.jsxs("div",{className:"h-16 self-end w-full flex flex-row bg-black/5",children:[pe.jsx("a",{href:"https://discord.cdrm-project.com/",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-950 group",children:pe.jsx("img",{src:$A,alt:"Discord",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),pe.jsx("a",{href:"https://telegram.cdrm-project.com",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-400 group",children:pe.jsx("img",{src:eC,alt:"Telegram",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),pe.jsx("a",{href:"https://cdm-project.com/tpd94/cdrm-project",target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-green-700 group",children:pe.jsx("img",{src:tC,alt:"Gitea",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})})]})]})})})}function eM(){const[R,k]=xe.useState(!1);return pe.jsxs("div",{id:"appcontainer",className:"flex flex-row w-full h-full bg-black",children:[pe.jsx($4,{isMenuOpen:R,setIsMenuOpen:k}),pe.jsx("div",{id:"navbarcontainer",className:"hidden lg:flex lg:w-2xs bg-gray-950/55 border-r border-white/5 0",children:pe.jsx(W4,{})}),pe.jsxs("div",{id:"maincontainer",className:"w-full lg:w-5/6 bg-gray-950/50 flex flex-col grow",children:[pe.jsx("div",{id:"navbarmaincontainer",className:"w-full lg:hidden h-16 bg-gray-950/10 border-b border-white/5 sticky top-0 z-10",children:pe.jsx(J4,{setIsMenuOpen:k})}),pe.jsx("div",{id:"maincontentcontainer",className:"w-full grow overflow-y-auto",children:pe.jsxs(yk,{children:[pe.jsx(Xy,{path:"/",element:pe.jsx(K4,{})}),pe.jsx(Xy,{path:"/cache",element:pe.jsx(q4,{})}),pe.jsx(Xy,{path:"/api",element:pe.jsx(z4,{})}),pe.jsx(Xy,{path:"/testplayer",element:pe.jsx(Y4,{})})]})})]})]})}AO.createRoot(document.getElementById("root")).render(pe.jsx(xe.StrictMode,{children:pe.jsx(Bk,{children:pe.jsx(eM,{})})}))});export default tM();
|