var b4=(A,b)=>()=>(b||A((b={exports:{}}).exports,b),b.exports);var cN=b4((ON,ug)=>{(function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))S(x);new MutationObserver(x=>{for(const U of x)if(U.type==="childList")for(const O of U.addedNodes)O.tagName==="LINK"&&O.rel==="modulepreload"&&S(O)}).observe(document,{childList:!0,subtree:!0});function R(x){const U={};return x.integrity&&(U.integrity=x.integrity),x.referrerPolicy&&(U.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?U.credentials="include":x.crossOrigin==="anonymous"?U.credentials="omit":U.credentials="same-origin",U}function S(x){if(x.ep)return;x.ep=!0;const U=R(x);fetch(x.href,U)}})();var I4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k4(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var u2={exports:{}},ng={};/**
 * @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 RA;function D4(){if(RA)return ng;RA=1;var A=Symbol.for("react.transitional.element"),b=Symbol.for("react.fragment");function R(S,x,U){var O=null;if(U!==void 0&&(O=""+U),x.key!==void 0&&(O=""+x.key),"key"in x){U={};for(var h in x)h!=="key"&&(U[h]=x[h])}else U=x;return x=U.ref,{$$typeof:A,type:S,key:O,ref:x!==void 0?x:null,props:U}}return ng.Fragment=b,ng.jsx=R,ng.jsxs=R,ng}var MA;function O4(){return MA||(MA=1,u2.exports=D4()),u2.exports}var re=O4(),a2={exports:{}},Gt={};/**
 * @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 NA;function R4(){if(NA)return Gt;NA=1;var A=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),O=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.iterator;function N(ae){return ae===null||typeof ae!="object"?null:(ae=v&&ae[v]||ae["@@iterator"],typeof ae=="function"?ae:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,$={};function oe(ae,Oe,et){this.props=ae,this.context=Oe,this.refs=$,this.updater=et||Z}oe.prototype.isReactComponent={},oe.prototype.setState=function(ae,Oe){if(typeof ae!="object"&&typeof ae!="function"&&ae!=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,ae,Oe,"setState")},oe.prototype.forceUpdate=function(ae){this.updater.enqueueForceUpdate(this,ae,"forceUpdate")};function me(){}me.prototype=oe.prototype;function Ve(ae,Oe,et){this.props=ae,this.context=Oe,this.refs=$,this.updater=et||Z}var ue=Ve.prototype=new me;ue.constructor=Ve,C(ue,oe.prototype),ue.isPureReactComponent=!0;var Ne=Array.isArray,Re={H:null,A:null,T:null,S:null,V:null},$e=Object.prototype.hasOwnProperty;function it(ae,Oe,et,ze,G,vt){return et=vt.ref,{$$typeof:A,type:ae,key:Oe,ref:et!==void 0?et:null,props:vt}}function Dt(ae,Oe){return it(ae.type,Oe,void 0,void 0,void 0,ae.props)}function _t(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===A}function _(ae){var Oe={"=":"=0",":":"=2"};return"$"+ae.replace(/[=:]/g,function(et){return Oe[et]})}var ce=/\/+/g;function he(ae,Oe){return typeof ae=="object"&&ae!==null&&ae.key!=null?_(""+ae.key):Oe.toString(36)}function ot(){}function _e(ae){switch(ae.status){case"fulfilled":return ae.value;case"rejected":throw ae.reason;default:switch(typeof ae.status=="string"?ae.then(ot,ot):(ae.status="pending",ae.then(function(Oe){ae.status==="pending"&&(ae.status="fulfilled",ae.value=Oe)},function(Oe){ae.status==="pending"&&(ae.status="rejected",ae.reason=Oe)})),ae.status){case"fulfilled":return ae.value;case"rejected":throw ae.reason}}throw ae}function De(ae,Oe,et,ze,G){var vt=typeof ae;(vt==="undefined"||vt==="boolean")&&(ae=null);var mt=!1;if(ae===null)mt=!0;else switch(vt){case"bigint":case"string":case"number":mt=!0;break;case"object":switch(ae.$$typeof){case A:case b:mt=!0;break;case p:return mt=ae._init,De(mt(ae._payload),Oe,et,ze,G)}}if(mt)return G=G(ae),mt=ze===""?"."+he(ae,0):ze,Ne(G)?(et="",mt!=null&&(et=mt.replace(ce,"$&/")+"/"),De(G,Oe,et,"",function(pl){return pl})):G!=null&&(_t(G)&&(G=Dt(G,et+(G.key==null||ae&&ae.key===G.key?"":(""+G.key).replace(ce,"$&/")+"/")+mt)),Oe.push(G)),1;mt=0;var Gi=ze===""?".":ze+":";if(Ne(ae))for(var Tn=0;Tn<ae.length;Tn++)ze=ae[Tn],vt=Gi+he(ze,Tn),mt+=De(ze,Oe,et,vt,G);else if(Tn=N(ae),typeof Tn=="function")for(ae=Tn.call(ae),Tn=0;!(ze=ae.next()).done;)ze=ze.value,vt=Gi+he(ze,Tn++),mt+=De(ze,Oe,et,vt,G);else if(vt==="object"){if(typeof ae.then=="function")return De(_e(ae),Oe,et,ze,G);throw Oe=String(ae),Error("Objects are not valid as a React child (found: "+(Oe==="[object Object]"?"object with keys {"+Object.keys(ae).join(", ")+"}":Oe)+"). If you meant to render a collection of children, use an array instead.")}return mt}function xe(ae,Oe,et){if(ae==null)return ae;var ze=[],G=0;return De(ae,ze,"","",function(vt){return Oe.call(et,vt,G++)}),ze}function Ue(ae){if(ae._status===-1){var Oe=ae._result;Oe=Oe(),Oe.then(function(et){(ae._status===0||ae._status===-1)&&(ae._status=1,ae._result=et)},function(et){(ae._status===0||ae._status===-1)&&(ae._status=2,ae._result=et)}),ae._status===-1&&(ae._status=0,ae._result=Oe)}if(ae._status===1)return ae._result.default;throw ae._result}var gt=typeof reportError=="function"?reportError:function(ae){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Oe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ae=="object"&&ae!==null&&typeof ae.message=="string"?String(ae.message):String(ae),error:ae});if(!window.dispatchEvent(Oe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",ae);return}console.error(ae)};function wn(){}return Gt.Children={map:xe,forEach:function(ae,Oe,et){xe(ae,function(){Oe.apply(this,arguments)},et)},count:function(ae){var Oe=0;return xe(ae,function(){Oe++}),Oe},toArray:function(ae){return xe(ae,function(Oe){return Oe})||[]},only:function(ae){if(!_t(ae))throw Error("React.Children.only expected to receive a single React element child.");return ae}},Gt.Component=oe,Gt.Fragment=R,Gt.Profiler=x,Gt.PureComponent=Ve,Gt.StrictMode=S,Gt.Suspense=s,Gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Re,Gt.__COMPILER_RUNTIME={__proto__:null,c:function(ae){return Re.H.useMemoCache(ae)}},Gt.cache=function(ae){return function(){return ae.apply(null,arguments)}},Gt.cloneElement=function(ae,Oe,et){if(ae==null)throw Error("The argument must be a React element, but you passed "+ae+".");var ze=C({},ae.props),G=ae.key,vt=void 0;if(Oe!=null)for(mt in Oe.ref!==void 0&&(vt=void 0),Oe.key!==void 0&&(G=""+Oe.key),Oe)!$e.call(Oe,mt)||mt==="key"||mt==="__self"||mt==="__source"||mt==="ref"&&Oe.ref===void 0||(ze[mt]=Oe[mt]);var mt=arguments.length-2;if(mt===1)ze.children=et;else if(1<mt){for(var Gi=Array(mt),Tn=0;Tn<mt;Tn++)Gi[Tn]=arguments[Tn+2];ze.children=Gi}return it(ae.type,G,void 0,void 0,vt,ze)},Gt.createContext=function(ae){return ae={$$typeof:O,_currentValue:ae,_currentValue2:ae,_threadCount:0,Provider:null,Consumer:null},ae.Provider=ae,ae.Consumer={$$typeof:U,_context:ae},ae},Gt.createElement=function(ae,Oe,et){var ze,G={},vt=null;if(Oe!=null)for(ze in Oe.key!==void 0&&(vt=""+Oe.key),Oe)$e.call(Oe,ze)&&ze!=="key"&&ze!=="__self"&&ze!=="__source"&&(G[ze]=Oe[ze]);var mt=arguments.length-2;if(mt===1)G.children=et;else if(1<mt){for(var Gi=Array(mt),Tn=0;Tn<mt;Tn++)Gi[Tn]=arguments[Tn+2];G.children=Gi}if(ae&&ae.defaultProps)for(ze in mt=ae.defaultProps,mt)G[ze]===void 0&&(G[ze]=mt[ze]);return it(ae,vt,void 0,void 0,null,G)},Gt.createRef=function(){return{current:null}},Gt.forwardRef=function(ae){return{$$typeof:h,render:ae}},Gt.isValidElement=_t,Gt.lazy=function(ae){return{$$typeof:p,_payload:{_status:-1,_result:ae},_init:Ue}},Gt.memo=function(ae,Oe){return{$$typeof:u,type:ae,compare:Oe===void 0?null:Oe}},Gt.startTransition=function(ae){var Oe=Re.T,et={};Re.T=et;try{var ze=ae(),G=Re.S;G!==null&&G(et,ze),typeof ze=="object"&&ze!==null&&typeof ze.then=="function"&&ze.then(wn,gt)}catch(vt){gt(vt)}finally{Re.T=Oe}},Gt.unstable_useCacheRefresh=function(){return Re.H.useCacheRefresh()},Gt.use=function(ae){return Re.H.use(ae)},Gt.useActionState=function(ae,Oe,et){return Re.H.useActionState(ae,Oe,et)},Gt.useCallback=function(ae,Oe){return Re.H.useCallback(ae,Oe)},Gt.useContext=function(ae){return Re.H.useContext(ae)},Gt.useDebugValue=function(){},Gt.useDeferredValue=function(ae,Oe){return Re.H.useDeferredValue(ae,Oe)},Gt.useEffect=function(ae,Oe,et){var ze=Re.H;if(typeof et=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ze.useEffect(ae,Oe)},Gt.useId=function(){return Re.H.useId()},Gt.useImperativeHandle=function(ae,Oe,et){return Re.H.useImperativeHandle(ae,Oe,et)},Gt.useInsertionEffect=function(ae,Oe){return Re.H.useInsertionEffect(ae,Oe)},Gt.useLayoutEffect=function(ae,Oe){return Re.H.useLayoutEffect(ae,Oe)},Gt.useMemo=function(ae,Oe){return Re.H.useMemo(ae,Oe)},Gt.useOptimistic=function(ae,Oe){return Re.H.useOptimistic(ae,Oe)},Gt.useReducer=function(ae,Oe,et){return Re.H.useReducer(ae,Oe,et)},Gt.useRef=function(ae){return Re.H.useRef(ae)},Gt.useState=function(ae){return Re.H.useState(ae)},Gt.useSyncExternalStore=function(ae,Oe,et){return Re.H.useSyncExternalStore(ae,Oe,et)},Gt.useTransition=function(){return Re.H.useTransition()},Gt.version="19.1.0",Gt}var PA;function O2(){return PA||(PA=1,a2.exports=R4()),a2.exports}var Se=O2(),s2={exports:{}},ig={},c2={exports:{}},f2={};/**
 * @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 LA;function M4(){return LA||(LA=1,function(A){function b(xe,Ue){var gt=xe.length;xe.push(Ue);e:for(;0<gt;){var wn=gt-1>>>1,ae=xe[wn];if(0<x(ae,Ue))xe[wn]=Ue,xe[gt]=ae,gt=wn;else break e}}function R(xe){return xe.length===0?null:xe[0]}function S(xe){if(xe.length===0)return null;var Ue=xe[0],gt=xe.pop();if(gt!==Ue){xe[0]=gt;e:for(var wn=0,ae=xe.length,Oe=ae>>>1;wn<Oe;){var et=2*(wn+1)-1,ze=xe[et],G=et+1,vt=xe[G];if(0>x(ze,gt))G<ae&&0>x(vt,ze)?(xe[wn]=vt,xe[G]=gt,wn=G):(xe[wn]=ze,xe[et]=gt,wn=et);else if(G<ae&&0>x(vt,gt))xe[wn]=vt,xe[G]=gt,wn=G;else break e}}return Ue}function x(xe,Ue){var gt=xe.sortIndex-Ue.sortIndex;return gt!==0?gt:xe.id-Ue.id}if(A.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var U=performance;A.unstable_now=function(){return U.now()}}else{var O=Date,h=O.now();A.unstable_now=function(){return O.now()-h}}var s=[],u=[],p=1,v=null,N=3,Z=!1,C=!1,$=!1,oe=!1,me=typeof setTimeout=="function"?setTimeout:null,Ve=typeof clearTimeout=="function"?clearTimeout:null,ue=typeof setImmediate<"u"?setImmediate:null;function Ne(xe){for(var Ue=R(u);Ue!==null;){if(Ue.callback===null)S(u);else if(Ue.startTime<=xe)S(u),Ue.sortIndex=Ue.expirationTime,b(s,Ue);else break;Ue=R(u)}}function Re(xe){if($=!1,Ne(xe),!C)if(R(s)!==null)C=!0,$e||($e=!0,he());else{var Ue=R(u);Ue!==null&&De(Re,Ue.startTime-xe)}}var $e=!1,it=-1,Dt=5,_t=-1;function _(){return oe?!0:!(A.unstable_now()-_t<Dt)}function ce(){if(oe=!1,$e){var xe=A.unstable_now();_t=xe;var Ue=!0;try{e:{C=!1,$&&($=!1,Ve(it),it=-1),Z=!0;var gt=N;try{t:{for(Ne(xe),v=R(s);v!==null&&!(v.expirationTime>xe&&_());){var wn=v.callback;if(typeof wn=="function"){v.callback=null,N=v.priorityLevel;var ae=wn(v.expirationTime<=xe);if(xe=A.unstable_now(),typeof ae=="function"){v.callback=ae,Ne(xe),Ue=!0;break t}v===R(s)&&S(s),Ne(xe)}else S(s);v=R(s)}if(v!==null)Ue=!0;else{var Oe=R(u);Oe!==null&&De(Re,Oe.startTime-xe),Ue=!1}}break e}finally{v=null,N=gt,Z=!1}Ue=void 0}}finally{Ue?he():$e=!1}}}var he;if(typeof ue=="function")he=function(){ue(ce)};else if(typeof MessageChannel<"u"){var ot=new MessageChannel,_e=ot.port2;ot.port1.onmessage=ce,he=function(){_e.postMessage(null)}}else he=function(){me(ce,0)};function De(xe,Ue){it=me(function(){xe(A.unstable_now())},Ue)}A.unstable_IdlePriority=5,A.unstable_ImmediatePriority=1,A.unstable_LowPriority=4,A.unstable_NormalPriority=3,A.unstable_Profiling=null,A.unstable_UserBlockingPriority=2,A.unstable_cancelCallback=function(xe){xe.callback=null},A.unstable_forceFrameRate=function(xe){0>xe||125<xe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Dt=0<xe?Math.floor(1e3/xe):5},A.unstable_getCurrentPriorityLevel=function(){return N},A.unstable_next=function(xe){switch(N){case 1:case 2:case 3:var Ue=3;break;default:Ue=N}var gt=N;N=Ue;try{return xe()}finally{N=gt}},A.unstable_requestPaint=function(){oe=!0},A.unstable_runWithPriority=function(xe,Ue){switch(xe){case 1:case 2:case 3:case 4:case 5:break;default:xe=3}var gt=N;N=xe;try{return Ue()}finally{N=gt}},A.unstable_scheduleCallback=function(xe,Ue,gt){var wn=A.unstable_now();switch(typeof gt=="object"&&gt!==null?(gt=gt.delay,gt=typeof gt=="number"&&0<gt?wn+gt:wn):gt=wn,xe){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=gt+ae,xe={id:p++,callback:Ue,priorityLevel:xe,startTime:gt,expirationTime:ae,sortIndex:-1},gt>wn?(xe.sortIndex=gt,b(u,xe),R(s)===null&&xe===R(u)&&($?(Ve(it),it=-1):$=!0,De(Re,gt-wn))):(xe.sortIndex=ae,b(s,xe),C||Z||(C=!0,$e||($e=!0,he()))),xe},A.unstable_shouldYield=_,A.unstable_wrapCallback=function(xe){var Ue=N;return function(){var gt=N;N=Ue;try{return xe.apply(this,arguments)}finally{N=gt}}}}(f2)),f2}var _A;function N4(){return _A||(_A=1,c2.exports=M4()),c2.exports}var d2={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 UA;function P4(){if(UA)return pr;UA=1;var A=O2();function b(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function R(){}var S={d:{f:R,r:function(){throw Error(b(522))},D:R,C:R,L:R,m:R,X:R,S:R,M:R},p:0,findDOMNode:null},x=Symbol.for("react.portal");function U(s,u,p){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:v==null?null:""+v,children:s,containerInfo:u,implementation:p}}var O=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(s,u){if(s==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,pr.createPortal=function(s,u){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(b(299));return U(s,u,null,p)},pr.flushSync=function(s){var u=O.T,p=S.p;try{if(O.T=null,S.p=2,s)return s()}finally{O.T=u,S.p=p,S.d.f()}},pr.preconnect=function(s,u){typeof s=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,S.d.C(s,u))},pr.prefetchDNS=function(s){typeof s=="string"&&S.d.D(s)},pr.preinit=function(s,u){if(typeof s=="string"&&u&&typeof u.as=="string"){var p=u.as,v=h(p,u.crossOrigin),N=typeof u.integrity=="string"?u.integrity:void 0,Z=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;p==="style"?S.d.S(s,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:v,integrity:N,fetchPriority:Z}):p==="script"&&S.d.X(s,{crossOrigin:v,integrity:N,fetchPriority:Z,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},pr.preinitModule=function(s,u){if(typeof s=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var p=h(u.as,u.crossOrigin);S.d.M(s,{crossOrigin:p,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&S.d.M(s)},pr.preload=function(s,u){if(typeof s=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var p=u.as,v=h(p,u.crossOrigin);S.d.L(s,p,{crossOrigin:v,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},pr.preloadModule=function(s,u){if(typeof s=="string")if(u){var p=h(u.as,u.crossOrigin);S.d.m(s,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:p,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else S.d.m(s)},pr.requestFormReset=function(s){S.d.r(s)},pr.unstable_batchedUpdates=function(s,u){return s(u)},pr.useFormState=function(s,u,p){return O.H.useFormState(s,u,p)},pr.useFormStatus=function(){return O.H.useHostTransitionStatus()},pr.version="19.1.0",pr}var jA;function L4(){if(jA)return d2.exports;jA=1;function A(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A)}catch(b){console.error(b)}}return A(),d2.exports=P4(),d2.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 BA;function _4(){if(BA)return ig;BA=1;var A=N4(),b=O2(),R=L4();function S(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)a+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function x(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function U(o){var a=o,d=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(d=a.return),o=a.return;while(o)}return a.tag===3?d:null}function O(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function h(o){if(U(o)!==o)throw Error(S(188))}function s(o){var a=o.alternate;if(!a){if(a=U(o),a===null)throw Error(S(188));return a!==o?null:o}for(var d=o,g=a;;){var E=d.return;if(E===null)break;var k=E.alternate;if(k===null){if(g=E.return,g!==null){d=g;continue}break}if(E.child===k.child){for(k=E.child;k;){if(k===d)return h(E),o;if(k===g)return h(E),a;k=k.sibling}throw Error(S(188))}if(d.return!==g.return)d=E,g=k;else{for(var B=!1,H=E.child;H;){if(H===d){B=!0,d=E,g=k;break}if(H===g){B=!0,g=E,d=k;break}H=H.sibling}if(!B){for(H=k.child;H;){if(H===d){B=!0,d=k,g=E;break}if(H===g){B=!0,g=k,d=E;break}H=H.sibling}if(!B)throw Error(S(189))}}if(d.alternate!==g)throw Error(S(190))}if(d.tag!==3)throw Error(S(188));return d.stateNode.current===d?o:a}function u(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=u(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,v=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),Z=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),Ve=Symbol.for("react.consumer"),ue=Symbol.for("react.context"),Ne=Symbol.for("react.forward_ref"),Re=Symbol.for("react.suspense"),$e=Symbol.for("react.suspense_list"),it=Symbol.for("react.memo"),Dt=Symbol.for("react.lazy"),_t=Symbol.for("react.activity"),_=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function he(o){return o===null||typeof o!="object"?null:(o=ce&&o[ce]||o["@@iterator"],typeof o=="function"?o:null)}var ot=Symbol.for("react.client.reference");function _e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===ot?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case oe:return"Profiler";case $:return"StrictMode";case Re:return"Suspense";case $e:return"SuspenseList";case _t:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case Z:return"Portal";case ue:return(o.displayName||"Context")+".Provider";case Ve:return(o._context.displayName||"Context")+".Consumer";case Ne:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case it:return a=o.displayName||null,a!==null?a:_e(o.type)||"Memo";case Dt:a=o._payload,o=o._init;try{return _e(o(a))}catch{}}return null}var De=Array.isArray,xe=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ue=R.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,gt={pending:!1,data:null,method:null,action:null},wn=[],ae=-1;function Oe(o){return{current:o}}function et(o){0>ae||(o.current=wn[ae],wn[ae]=null,ae--)}function ze(o,a){ae++,wn[ae]=o.current,o.current=a}var G=Oe(null),vt=Oe(null),mt=Oe(null),Gi=Oe(null);function Tn(o,a){switch(ze(mt,a),ze(vt,o),ze(G,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?Im(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=Im(a),o=km(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}et(G),ze(G,o)}function pl(){et(G),et(vt),et(mt)}function Up(o){o.memoizedState!==null&&ze(Gi,o);var a=G.current,d=km(a,o.type);a!==d&&(ze(vt,o),ze(G,d))}function Uf(o){vt.current===o&&(et(G),et(vt)),Gi.current===o&&(et(Gi),pc._currentValue=gt)}var Pe=Object.prototype.hasOwnProperty,Ql=A.unstable_scheduleCallback,os=A.unstable_cancelCallback,bc=A.unstable_shouldYield,Tv=A.unstable_requestPaint,ui=A.unstable_now,Ct=A.unstable_getCurrentPriorityLevel,Jl=A.unstable_ImmediatePriority,yg=A.unstable_UserBlockingPriority,jp=A.unstable_NormalPriority,B2=A.unstable_LowPriority,Bp=A.unstable_IdlePriority,jf=A.log,Mt=A.unstable_setDisableYieldValue,ls=null,yr=null;function Zl(o){if(typeof jf=="function"&&Mt(o),yr&&typeof yr.setStrictMode=="function")try{yr.setStrictMode(ls,o)}catch{}}var nr=Math.clz32?Math.clz32:io,Jn=Math.log,yt=Math.LN2;function io(o){return o>>>=0,o===0?32:31-(Jn(o)/yt|0)|0}var us=256,Bf=4194304;function hl(o){var a=o&42;if(a!==0)return a;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 Et(o,a,d){var g=o.pendingLanes;if(g===0)return 0;var E=0,k=o.suspendedLanes,B=o.pingedLanes;o=o.warmLanes;var H=g&134217727;return H!==0?(g=H&~k,g!==0?E=hl(g):(B&=H,B!==0?E=hl(B):d||(d=H&~o,d!==0&&(E=hl(d))))):(H=g&~k,H!==0?E=hl(H):B!==0?E=hl(B):d||(d=g&~o,d!==0&&(E=hl(d)))),E===0?0:a!==0&&a!==E&&(a&k)===0&&(k=E&-E,d=a&-a,k>=d||k===32&&(d&4194048)!==0)?a:E}function Ic(o,a){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&a)===0}function xv(o,a){switch(o){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Vp(){var o=us;return us<<=1,(us&4194048)===0&&(us=256),o}function gg(){var o=Bf;return Bf<<=1,(Bf&62914560)===0&&(Bf=4194304),o}function dn(o){for(var a=[],d=0;31>d;d++)a.push(o);return a}function $l(o,a){o.pendingLanes|=a,a!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Vf(o,a,d,g,E,k){var B=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,ie=o.expirationTimes,we=o.hiddenUpdates;for(d=B&~d;0<d;){var F=31-nr(d),Ie=1<<F;H[F]=0,ie[F]=-1;var Te=we[F];if(Te!==null)for(we[F]=null,F=0;F<Te.length;F++){var de=Te[F];de!==null&&(de.lane&=-536870913)}d&=~Ie}g!==0&&Hf(o,g,0),k!==0&&E===0&&o.tag!==0&&(o.suspendedLanes|=k&~(B&~a))}function Hf(o,a,d){o.pendingLanes|=a,o.suspendedLanes&=~a;var g=31-nr(a);o.entangledLanes|=a,o.entanglements[g]=o.entanglements[g]|1073741824|d&4194090}function eu(o,a){var d=o.entangledLanes|=a;for(o=o.entanglements;d;){var g=31-nr(d),E=1<<g;E&a|o[g]&a&&(o[g]|=a),d&=~E}}function tu(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 Qu(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function mg(){var o=Ue.p;return o!==0?o:(o=window.event,o===void 0?32:Bm(o.type))}function vg(o,a){var d=Ue.p;try{return Ue.p=o,a()}finally{Ue.p=d}}var nu=Math.random().toString(36).slice(2),Di="__reactFiber$"+nu,ir="__reactProps$"+nu,as="__reactContainer$"+nu,iu="__reactEvents$"+nu,Kf="__reactListeners$"+nu,Sg="__reactHandles$"+nu,Ju="__reactResources$"+nu,gr="__reactMarker$"+nu;function Fi(o){delete o[Di],delete o[ir],delete o[iu],delete o[Kf],delete o[Sg]}function Ge(o){var a=o[Di];if(a)return a;for(var d=o.parentNode;d;){if(a=d[as]||d[Di]){if(d=a.alternate,a.child!==null||d!==null&&d.child!==null)for(o=Rm(o);o!==null;){if(d=o[Di])return d;o=Rm(o)}return a}o=d,d=o.parentNode}return null}function Zu(o){if(o=o[Di]||o[as]){var a=o.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return o}return null}function Zn(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o.stateNode;throw Error(S(33))}function ru(o){var a=o[Ju];return a||(a=o[Ju]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Y(o){o[gr]=!0}var ou=new Set,ln={};function rr(o,a){qi(o,a),qi(o+"Capture",a)}function qi(o,a){for(ln[o]=a,o=0;o<a.length;o++)ou.add(a[o])}var Br=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]*$"),Gf={},Ff={};function Oi(o){return Pe.call(Ff,o)?!0:Pe.call(Gf,o)?!1:Br.test(o)?Ff[o]=!0:(Gf[o]=!0,!1)}function kc(o,a,d){if(Oi(a))if(d===null)o.removeAttribute(a);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(a);return;case"boolean":var g=a.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(a);return}}o.setAttribute(a,""+d)}}function Bn(o,a,d){if(d===null)o.removeAttribute(a);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(a);return}o.setAttribute(a,""+d)}}function Vr(o,a,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(a,d,""+g)}}var ro,or;function Hr(o){if(ro===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);ro=a&&a[1]||"",or=-1<d.stack.indexOf(`
    at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ro+o+or}var oo=!1;function an(o,a){if(!o||oo)return"";oo=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(a){var Ie=function(){throw Error()};if(Object.defineProperty(Ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ie,[])}catch(de){var Te=de}Reflect.construct(o,[],Ie)}else{try{Ie.call()}catch(de){Te=de}o.call(Ie.prototype)}}else{try{throw Error()}catch(de){Te=de}(Ie=o())&&typeof Ie.catch=="function"&&Ie.catch(function(){})}}catch(de){if(de&&Te&&typeof de.stack=="string")return[de.stack,Te.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=g.DetermineComponentFrameRoot(),B=k[0],H=k[1];if(B&&H){var ie=B.split(`
`),we=H.split(`
`);for(E=g=0;g<ie.length&&!ie[g].includes("DetermineComponentFrameRoot");)g++;for(;E<we.length&&!we[E].includes("DetermineComponentFrameRoot");)E++;if(g===ie.length||E===we.length)for(g=ie.length-1,E=we.length-1;1<=g&&0<=E&&ie[g]!==we[E];)E--;for(;1<=g&&0<=E;g--,E--)if(ie[g]!==we[E]){if(g!==1||E!==1)do if(g--,E--,0>E||ie[g]!==we[E]){var F=`
`+ie[g].replace(" at new "," at ");return o.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",o.displayName)),F}while(1<=g&&0<=E);break}}}finally{oo=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?Hr(d):""}function Vn(o){switch(o.tag){case 26:case 27:case 5:return Hr(o.type);case 16:return Hr("Lazy");case 13:return Hr("Suspense");case 19:return Hr("SuspenseList");case 0:case 15:return an(o.type,!1);case 11:return an(o.type.render,!1);case 1:return an(o.type,!0);case 31:return Hr("Activity");default:return""}}function Oo(o){try{var a="";do a+=Vn(o),o=o.return;while(o);return a}catch(d){return`
Error generating stack: `+d.message+`
`+d.stack}}function mr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function $u(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ri(o){var a=$u(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,a),g=""+o[a];if(!o.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var E=d.get,k=d.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return E.call(this)},set:function(B){g=""+B,k.call(this,B)}}),Object.defineProperty(o,a,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(B){g=""+B},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function ss(o){o._valueTracker||(o._valueTracker=Ri(o))}function ut(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var d=a.getValue(),g="";return o&&(g=$u(o)?o.checked?"true":"false":o.value),o=g,o!==d?(a.setValue(o),!0):!1}function Dn(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 wg=/[\n"\\]/g;function vr(o){return o.replace(wg,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ea(o,a,d,g,E,k,B,H){o.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?o.type=B:o.removeAttribute("type"),a!=null?B==="number"?(a===0&&o.value===""||o.value!=a)&&(o.value=""+mr(a)):o.value!==""+mr(a)&&(o.value=""+mr(a)):B!=="submit"&&B!=="reset"||o.removeAttribute("value"),a!=null?zf(o,B,mr(a)):d!=null?zf(o,B,mr(d)):g!=null&&o.removeAttribute("value"),E==null&&k!=null&&(o.defaultChecked=!!k),E!=null&&(o.checked=E&&typeof E!="function"&&typeof E!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?o.name=""+mr(H):o.removeAttribute("name")}function qf(o,a,d,g,E,k,B,H){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.type=k),a!=null||d!=null){if(!(k!=="submit"&&k!=="reset"||a!=null))return;d=d!=null?""+mr(d):"",a=a!=null?""+mr(a):d,H||a===o.value||(o.value=a),o.defaultValue=a}g=g??E,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=H?o.checked:!!g,o.defaultChecked=!!g,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(o.name=B)}function zf(o,a,d){a==="number"&&Dn(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function ta(o,a,d,g){if(o=o.options,a){a={};for(var E=0;E<d.length;E++)a["$"+d[E]]=!0;for(d=0;d<o.length;d++)E=a.hasOwnProperty("$"+o[d].value),o[d].selected!==E&&(o[d].selected=E),E&&g&&(o[d].defaultSelected=!0)}else{for(d=""+mr(d),a=null,E=0;E<o.length;E++){if(o[E].value===d){o[E].selected=!0,g&&(o[E].defaultSelected=!0);return}a!==null||o[E].disabled||(a=o[E])}a!==null&&(a.selected=!0)}}function ai(o,a,d){if(a!=null&&(a=""+mr(a),a!==o.value&&(o.value=a),d==null)){o.defaultValue!==a&&(o.defaultValue=a);return}o.defaultValue=d!=null?""+mr(d):""}function na(o,a,d,g){if(a==null){if(g!=null){if(d!=null)throw Error(S(92));if(De(g)){if(1<g.length)throw Error(S(93));g=g[0]}d=g}d==null&&(d=""),a=d}d=mr(a),o.defaultValue=d,g=o.textContent,g===d&&g!==""&&g!==null&&(o.value=g)}function ia(o,a){if(a){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=a;return}}o.textContent=a}var Hp=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 cs(o,a,d){var g=a.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?o.setProperty(a,""):a==="float"?o.cssFloat="":o[a]="":g?o.setProperty(a,d):typeof d!="number"||d===0||Hp.has(a)?a==="float"?o.cssFloat=d:o[a]=(""+d).trim():o[a]=d+"px"}function Xf(o,a,d){if(a!=null&&typeof a!="object")throw Error(S(62));if(o=o.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||a!=null&&a.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var E in a)g=a[E],a.hasOwnProperty(E)&&d[E]!==g&&cs(o,E,g)}else for(var k in a)a.hasOwnProperty(k)&&cs(o,k,a[k])}function Yf(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 lo=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"]]),Kp=/^[\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 Dc(o){return Kp.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var Oc=null;function yl(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Kr=null,$n=null;function Gp(o){var a=Zu(o);if(a&&(o=a.stateNode)){var d=o[ir]||null;e:switch(o=a.stateNode,a.type){case"input":if(ea(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),a=d.name,d.type==="radio"&&a!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+vr(""+a)+'"][type="radio"]'),a=0;a<d.length;a++){var g=d[a];if(g!==o&&g.form===o.form){var E=g[ir]||null;if(!E)throw Error(S(90));ea(g,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(a=0;a<d.length;a++)g=d[a],g.form===o.form&&ut(g)}break e;case"textarea":ai(o,d.value,d.defaultValue);break e;case"select":a=d.value,a!=null&&ta(o,!!d.multiple,a,!1)}}}var Wf=!1;function Sr(o,a,d){if(Wf)return o(a,d);Wf=!0;try{var g=o(a);return g}finally{if(Wf=!1,(Kr!==null||$n!==null)&&(Qs(),Kr&&(a=Kr,o=$n,$n=Kr=null,Gp(a),o)))for(a=0;a<o.length;a++)Gp(o[a])}}function ra(o,a){var d=o.stateNode;if(d===null)return null;var g=d[ir]||null;if(g===null)return null;d=g[a];e:switch(a){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(S(231,a,typeof d));return d}var wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lu=!1;if(wr)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){lu=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{lu=!1}var lr=null,gl=null,uu=null;function oa(){if(uu)return uu;var o,a=gl,d=a.length,g,E="value"in lr?lr.value:lr.textContent,k=E.length;for(o=0;o<d&&a[o]===E[o];o++);var B=d-o;for(g=1;g<=B&&a[d-g]===E[k-g];g++);return uu=E.slice(o,1<g?1-g:void 0)}function Qf(o){var a=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&a===13&&(o=13)):o=a,o===10&&(o=13),32<=o||o===13?o:0}function la(){return!0}function Tr(){return!1}function Gn(o){function a(d,g,E,k,B){this._reactName=d,this._targetInst=E,this.type=g,this.nativeEvent=k,this.target=B,this.currentTarget=null;for(var H in o)o.hasOwnProperty(H)&&(d=o[H],this[H]=d?d(k):k[H]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?la:Tr,this.isPropagationStopped=Tr,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=la)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=la)},persist:function(){},isPersistent:la}),a}var Mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},au=Gn(Mo),uo=p({},Mo,{view:0,detail:0}),Fp=Gn(uo),qp,fs,ds,Rt=p({},uo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,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!==ds&&(ds&&o.type==="mousemove"?(qp=o.screenX-ds.screenX,fs=o.screenY-ds.screenY):fs=qp=0,ds=o),qp)},movementY:function(o){return"movementY"in o?o.movementY:fs}}),Cn=Gn(Rt),zi=p({},Rt,{dataTransfer:0}),ao=Gn(zi),sn=p({},uo,{relatedTarget:0}),ur=Gn(sn),Ze=p({},Mo,{animationName:0,elapsedTime:0,pseudoElement:0}),ml=Gn(Ze),Tg=p({},Mo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),No=Gn(Tg),vl=p({},Mo,{data:0}),so=Gn(vl),Jf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fn={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"},Sl={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ei(o){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(o):(o=Sl[o])?!!a[o]:!1}function ps(){return ei}var Zf=p({},uo,{key:function(o){if(o.key){var a=Jf[o.key]||o.key;if(a!=="Unidentified")return a}return o.type==="keypress"?(o=Qf(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?Fn[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(o){return o.type==="keypress"?Qf(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Qf(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Ev=Gn(Zf),$f=p({},Rt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zp=Gn($f),xg=p({},uo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),Eg=Gn(xg),Ag=p({},Mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xp=Gn(Ag),Yp=p({},Rt,{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}),Wp=Gn(Yp),Zt=p({},Mo,{newState:0,oldState:0}),Cg=Gn(Zt),ed=[9,13,27,32],hs=wr&&"CompositionEvent"in window,ys=null;wr&&"documentMode"in document&&(ys=document.documentMode);var Av=wr&&"TextEvent"in window&&!ys,Qp=wr&&(!hs||ys&&8<ys&&11>=ys),gs=" ",Rc=!1;function co(o,a){switch(o){case"keyup":return ed.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function td(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Po=!1;function bg(o,a){switch(o){case"compositionend":return td(a);case"keypress":return a.which!==32?null:(Rc=!0,gs);case"textInput":return o=a.data,o===gs&&Rc?null:o;default:return null}}function Mc(o,a){if(Po)return o==="compositionend"||!hs&&co(o,a)?(o=oa(),uu=gl=lr=null,Po=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Qp&&a.locale!=="ko"?null:a.data;default:return null}}var ua={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 ms(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a==="input"?!!ua[o.type]:a==="textarea"}function su(o,a,d,g){Kr?$n?$n.push(g):$n=[g]:Kr=g,a=oc(a,"onChange"),0<a.length&&(d=new au("onChange","change",null,d,g),o.push({event:d,listeners:a}))}var aa=null,vs=null;function Ig(o){Zd(o,0)}function Nc(o){var a=Zn(o);if(ut(a))return o}function sa(o,a){if(o==="change")return a}var nd=!1;if(wr){var cu;if(wr){var id="oninput"in document;if(!id){var Lo=document.createElement("div");Lo.setAttribute("oninput","return;"),id=typeof Lo.oninput=="function"}cu=id}else cu=!1;nd=cu&&(!document.documentMode||9<document.documentMode)}function kg(){aa&&(aa.detachEvent("onpropertychange",wl),vs=aa=null)}function wl(o){if(o.propertyName==="value"&&Nc(vs)){var a=[];su(a,vs,o,yl(o)),Sr(Ig,a)}}function Tl(o,a,d){o==="focusin"?(kg(),aa=a,vs=d,aa.attachEvent("onpropertychange",wl)):o==="focusout"&&kg()}function Ss(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Nc(vs)}function Jp(o,a){if(o==="click")return Nc(a)}function fu(o,a){if(o==="input"||o==="change")return Nc(a)}function Zp(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var Xi=typeof Object.is=="function"?Object.is:Zp;function ws(o,a){if(Xi(o,a))return!0;if(typeof o!="object"||o===null||typeof a!="object"||a===null)return!1;var d=Object.keys(o),g=Object.keys(a);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var E=d[g];if(!Pe.call(a,E)||!Xi(o[E],a[E]))return!1}return!0}function rd(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function xn(o,a){var d=rd(o);o=0;for(var g;d;){if(d.nodeType===3){if(g=o+d.textContent.length,o<=a&&g>=a)return{node:d,offset:a-o};o=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=rd(d)}}function Pc(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?Pc(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function od(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var a=Dn(o.document);a instanceof o.HTMLIFrameElement;){try{var d=typeof a.contentWindow.location.href=="string"}catch{d=!1}if(d)o=a.contentWindow;else break;a=Dn(o.document)}return a}function Ts(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}var Ti=wr&&"documentMode"in document&&11>=document.documentMode,xr=null,Mi=null,xi=null,ca=!1;function $p(o,a,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;ca||xr==null||xr!==Dn(g)||(g=xr,"selectionStart"in g&&Ts(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}),xi&&ws(xi,g)||(xi=g,g=oc(Mi,"onSelect"),0<g.length&&(a=new au("onSelect","select",null,a,d),o.push({event:a,listeners:g}),a.target=xr)))}function ar(o,a){var d={};return d[o.toLowerCase()]=a.toLowerCase(),d["Webkit"+o]="webkit"+a,d["Moz"+o]="moz"+a,d}var sr={animationend:ar("Animation","AnimationEnd"),animationiteration:ar("Animation","AnimationIteration"),animationstart:ar("Animation","AnimationStart"),transitionrun:ar("Transition","TransitionRun"),transitionstart:ar("Transition","TransitionStart"),transitioncancel:ar("Transition","TransitionCancel"),transitionend:ar("Transition","TransitionEnd")},Hn={},xs={};wr&&(xs=document.createElement("div").style,"AnimationEvent"in window||(delete sr.animationend.animation,delete sr.animationiteration.animation,delete sr.animationstart.animation),"TransitionEvent"in window||delete sr.transitionend.transition);function fo(o){if(Hn[o])return Hn[o];if(!sr[o])return o;var a=sr[o],d;for(d in a)if(a.hasOwnProperty(d)&&d in xs)return Hn[o]=a[d];return o}var Dg=fo("animationend"),Og=fo("animationiteration"),eh=fo("animationstart"),Rg=fo("transitionrun"),Cv=fo("transitionstart"),Lc=fo("transitioncancel"),Es=fo("transitionend"),dt=new Map,th="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(" ");th.push("scrollEnd");function po(o,a){dt.set(o,a),rr(a,[o])}var xl=new WeakMap;function Ni(o,a){if(typeof o=="object"&&o!==null){var d=xl.get(o);return d!==void 0?d:(a={value:o,source:a,stack:Oo(a)},xl.set(o,a),a)}return{value:o,source:a,stack:Oo(a)}}var Ln=[],ho=0,fa=0;function As(){for(var o=ho,a=fa=ho=0;a<o;){var d=Ln[a];Ln[a++]=null;var g=Ln[a];Ln[a++]=null;var E=Ln[a];Ln[a++]=null;var k=Ln[a];if(Ln[a++]=null,g!==null&&E!==null){var B=g.pending;B===null?E.next=E:(E.next=B.next,B.next=E),g.pending=E}k!==0&&ld(d,E,k)}}function Ot(o,a,d,g){Ln[ho++]=o,Ln[ho++]=a,Ln[ho++]=d,Ln[ho++]=g,fa|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function El(o,a,d,g){return Ot(o,a,d,g),da(o)}function Al(o,a){return Ot(o,null,null,a),da(o)}function ld(o,a,d){o.lanes|=d;var g=o.alternate;g!==null&&(g.lanes|=d);for(var E=!1,k=o.return;k!==null;)k.childLanes|=d,g=k.alternate,g!==null&&(g.childLanes|=d),k.tag===22&&(o=k.stateNode,o===null||o._visibility&1||(E=!0)),o=k,k=k.return;return o.tag===3?(k=o.stateNode,E&&a!==null&&(E=31-nr(d),o=k.hiddenUpdates,g=o[E],g===null?o[E]=[a]:g.push(a),a.lane=d|536870912),k):null}function da(o){if(50<La)throw La=0,Hd=null,Error(S(185));for(var a=o.return;a!==null;)o=a,a=o.return;return o.tag===3?o.stateNode:null}var pa={};function Mg(o,a,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=a,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 cr(o,a,d,g){return new Mg(o,a,d,g)}function nh(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Cl(o,a){var d=o.alternate;return d===null?(d=cr(o.tag,a,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=a,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,a=o.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function _c(o,a){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=a,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,a=d.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),o}function ud(o,a,d,g,E,k){var B=0;if(g=o,typeof o=="function")nh(o)&&(B=1);else if(typeof o=="string")B=Pm(o,d,G.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case _t:return o=cr(31,d,a,E),o.elementType=_t,o.lanes=k,o;case C:return du(d.children,E,k,a);case $:B=8,E|=24;break;case oe:return o=cr(12,d,a,E|2),o.elementType=oe,o.lanes=k,o;case Re:return o=cr(13,d,a,E),o.elementType=Re,o.lanes=k,o;case $e:return o=cr(19,d,a,E),o.elementType=$e,o.lanes=k,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case me:case ue:B=10;break e;case Ve:B=9;break e;case Ne:B=11;break e;case it:B=14;break e;case Dt:B=16,g=null;break e}B=29,d=Error(S(130,o===null?"null":typeof o,"")),g=null}return a=cr(B,d,a,E),a.elementType=o,a.type=g,a.lanes=k,a}function du(o,a,d,g){return o=cr(7,o,g,a),o.lanes=d,o}function ih(o,a,d){return o=cr(6,o,null,a),o.lanes=d,o}function rh(o,a,d){return a=cr(4,o.children!==null?o.children:[],o.key,a),a.lanes=d,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}var ha=[],Cs=0,Uc=null,jc=0,Yi=[],Er=0,ya=null,bl=1,Il="";function Ar(o,a){ha[Cs++]=jc,ha[Cs++]=Uc,Uc=o,jc=a}function pu(o,a,d){Yi[Er++]=bl,Yi[Er++]=Il,Yi[Er++]=ya,ya=o;var g=bl;o=Il;var E=32-nr(g)-1;g&=~(1<<E),d+=1;var k=32-nr(a)+E;if(30<k){var B=E-E%5;k=(g&(1<<B)-1).toString(32),g>>=B,E-=B,bl=1<<32-nr(a)+E|d<<E|g,Il=k+o}else bl=1<<k|d<<E|g,Il=o}function Bc(o){o.return!==null&&(Ar(o,1),pu(o,1,0))}function bs(o){for(;o===Uc;)Uc=ha[--Cs],ha[Cs]=null,jc=ha[--Cs],ha[Cs]=null;for(;o===ya;)ya=Yi[--Er],Yi[Er]=null,Il=Yi[--Er],Yi[Er]=null,bl=Yi[--Er],Yi[Er]=null}var Pi=null,On=null,$t=!1,_o=null,Wi=!1,ad=Error(S(519));function hu(o){var a=Error(S(418,""));throw gu(Ni(a,o)),ad}function oh(o){var a=o.stateNode,d=o.type,g=o.memoizedProps;switch(a[Di]=o,a[ir]=g,d){case"dialog":Ht("cancel",a),Ht("close",a);break;case"iframe":case"object":case"embed":Ht("load",a);break;case"video":case"audio":for(d=0;d<Nr.length;d++)Ht(Nr[d],a);break;case"source":Ht("error",a);break;case"img":case"image":case"link":Ht("error",a),Ht("load",a);break;case"details":Ht("toggle",a);break;case"input":Ht("invalid",a),qf(a,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0),ss(a);break;case"select":Ht("invalid",a);break;case"textarea":Ht("invalid",a),na(a,g.value,g.defaultValue,g.children),ss(a)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||a.textContent===""+d||g.suppressHydrationWarning===!0||lc(a.textContent,d)?(g.popover!=null&&(Ht("beforetoggle",a),Ht("toggle",a)),g.onScroll!=null&&Ht("scroll",a),g.onScrollEnd!=null&&Ht("scrollend",a),g.onClick!=null&&(a.onclick=uc),a=!0):a=!1,a||hu(o)}function lh(o){for(Pi=o.return;Pi;)switch(Pi.tag){case 5:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:Pi=Pi.return}}function Is(o){if(o!==Pi)return!1;if(!$t)return lh(o),$t=!0,!1;var a=o.tag,d;if((d=a!==3&&a!==27)&&((d=a===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||ry(o.type,o.memoizedProps)),d=!d),d&&On&&hu(o),lh(o),a===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(S(317));e:{for(o=o.nextSibling,a=0;o;){if(o.nodeType===8)if(d=o.data,d==="/$"){if(a===0){On=xo(o.nextSibling);break e}a--}else d!=="$"&&d!=="$!"&&d!=="$?"||a++;o=o.nextSibling}On=null}}else a===27?(a=On,To(o.type)?(o=ip,ip=null,On=o):On=a):On=Pi?xo(o.stateNode.nextSibling):null;return!0}function yu(){On=Pi=null,$t=!1}function Ng(){var o=_o;return o!==null&&(Ji===null?Ji=o:Ji.push.apply(Ji,o),_o=null),o}function gu(o){_o===null?_o=[o]:_o.push(o)}var uh=Oe(null),Yt=null,Uo=null;function jo(o,a,d){ze(uh,a._currentValue),a._currentValue=d}function kl(o){o._currentValue=uh.current,et(uh)}function ah(o,a,d){for(;o!==null;){var g=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,g!==null&&(g.childLanes|=a)):g!==null&&(g.childLanes&a)!==a&&(g.childLanes|=a),o===d)break;o=o.return}}function sd(o,a,d,g){var E=o.child;for(E!==null&&(E.return=o);E!==null;){var k=E.dependencies;if(k!==null){var B=E.child;k=k.firstContext;e:for(;k!==null;){var H=k;k=E;for(var ie=0;ie<a.length;ie++)if(H.context===a[ie]){k.lanes|=d,H=k.alternate,H!==null&&(H.lanes|=d),ah(k.return,d,o),g||(B=null);break e}k=H.next}}else if(E.tag===18){if(B=E.return,B===null)throw Error(S(341));B.lanes|=d,k=B.alternate,k!==null&&(k.lanes|=d),ah(B,d,o),B=null}else B=E.child;if(B!==null)B.return=E;else for(B=E;B!==null;){if(B===o){B=null;break}if(E=B.sibling,E!==null){E.return=B.return,B=E;break}B=B.return}E=B}}function ks(o,a,d,g){o=null;for(var E=a,k=!1;E!==null;){if(!k){if((E.flags&524288)!==0)k=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var B=E.alternate;if(B===null)throw Error(S(387));if(B=B.memoizedProps,B!==null){var H=E.type;Xi(E.pendingProps.value,B.value)||(o!==null?o.push(H):o=[H])}}else if(E===Gi.current){if(B=E.alternate,B===null)throw Error(S(387));B.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(o!==null?o.push(pc):o=[pc])}E=E.return}o!==null&&sd(a,o,d,g),a.flags|=262144}function Ds(o){for(o=o.firstContext;o!==null;){if(!Xi(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Bo(o){Yt=o,Uo=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function si(o){return ma(Yt,o)}function ga(o,a){return Yt===null&&Bo(o),ma(o,a)}function ma(o,a){var d=a._currentValue;if(a={context:a,memoizedValue:d,next:null},Uo===null){if(o===null)throw Error(S(308));Uo=a,o.dependencies={lanes:0,firstContext:a},o.flags|=524288}else Uo=Uo.next=a;return d}var Pg=typeof AbortController<"u"?AbortController:function(){var o=[],a=this.signal={aborted:!1,addEventListener:function(d,g){o.push(g)}};this.abort=function(){a.aborted=!0,o.forEach(function(d){return d()})}},Lg=A.unstable_scheduleCallback,yo=A.unstable_NormalPriority,ct={$$typeof:ue,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vn(){return{controller:new Pg,data:new Map,refCount:0}}function go(o){o.refCount--,o.refCount===0&&Lg(yo,function(){o.controller.abort()})}var va=null,mu=0,Sa=0,wa=null;function bv(o,a){if(va===null){var d=va=[];mu=0,Sa=Wd(),wa={status:"pending",value:void 0,then:function(g){d.push(g)}}}return mu++,a.then(ke,ke),a}function ke(){if(--mu===0&&va!==null){wa!==null&&(wa.status="fulfilled");var o=va;va=null,Sa=0,wa=null;for(var a=0;a<o.length;a++)(0,o[a])()}}function _g(o,a){var d=[],g={status:"pending",value:null,reason:null,then:function(E){d.push(E)}};return o.then(function(){g.status="fulfilled",g.value=a;for(var E=0;E<d.length;E++)(0,d[E])(a)},function(E){for(g.status="rejected",g.reason=E,E=0;E<d.length;E++)(0,d[E])(void 0)}),g}var Vc=xe.S;xe.S=function(o,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&bv(o,a),Vc!==null&&Vc(o,a)};var It=Oe(null);function vu(){var o=It.current;return o!==null?o:En.pooledCache}function Vo(o,a){a===null?ze(It,It.current):ze(It,a.pool)}function en(){var o=vu();return o===null?null:{parent:ct._currentValue,pool:o}}var Cr=Error(S(460)),sh=Error(S(474)),bn=Error(S(542)),ch={then:function(){}};function fh(o){return o=o.status,o==="fulfilled"||o==="rejected"}function cd(){}function dh(o,a,d){switch(d=o[d],d===void 0?o.push(a):d!==a&&(a.then(cd,cd),a=d),a.status){case"fulfilled":return a.value;case"rejected":throw o=a.reason,br(o),o;default:if(typeof a.status=="string")a.then(cd,cd);else{if(o=En,o!==null&&100<o.shellSuspendCounter)throw Error(S(482));o=a,o.status="pending",o.then(function(g){if(a.status==="pending"){var E=a;E.status="fulfilled",E.value=g}},function(g){if(a.status==="pending"){var E=a;E.status="rejected",E.reason=g}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw o=a.reason,br(o),o}throw Os=a,Cr}}var Os=null;function Hc(){if(Os===null)throw Error(S(459));var o=Os;return Os=null,o}function br(o){if(o===Cr||o===bn)throw Error(S(483))}var Dl=!1;function Rs(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Su(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Pt(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ho(o,a,d){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(Sn&2)!==0){var E=g.pending;return E===null?a.next=a:(a.next=E.next,E.next=a),g.pending=a,a=da(o),ld(o,null,d),a}return Ot(o,g,a,d),da(o)}function Kc(o,a,d){if(a=a.updateQueue,a!==null&&(a=a.shared,(d&4194048)!==0)){var g=a.lanes;g&=o.pendingLanes,d|=g,a.lanes=d,eu(o,d)}}function wu(o,a){var d=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var E=null,k=null;if(d=d.firstBaseUpdate,d!==null){do{var B={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};k===null?E=k=B:k=k.next=B,d=d.next}while(d!==null);k===null?E=k=a:k=k.next=a}else E=k=a;d={baseState:g.baseState,firstBaseUpdate:E,lastBaseUpdate:k,shared:g.shared,callbacks:g.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=a:o.next=a,d.lastBaseUpdate=a}var Gc=!1;function Bt(){if(Gc){var o=wa;if(o!==null)throw o}}function Ir(o,a,d,g){Gc=!1;var E=o.updateQueue;Dl=!1;var k=E.firstBaseUpdate,B=E.lastBaseUpdate,H=E.shared.pending;if(H!==null){E.shared.pending=null;var ie=H,we=ie.next;ie.next=null,B===null?k=we:B.next=we,B=ie;var F=o.alternate;F!==null&&(F=F.updateQueue,H=F.lastBaseUpdate,H!==B&&(H===null?F.firstBaseUpdate=we:H.next=we,F.lastBaseUpdate=ie))}if(k!==null){var Ie=E.baseState;B=0,F=we=ie=null,H=k;do{var Te=H.lane&-536870913,de=Te!==H.lane;if(de?(nn&Te)===Te:(g&Te)===Te){Te!==0&&Te===Sa&&(Gc=!0),F!==null&&(F=F.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var bt=o,pt=H;Te=a;var yn=d;switch(pt.tag){case 1:if(bt=pt.payload,typeof bt=="function"){Ie=bt.call(yn,Ie,Te);break e}Ie=bt;break e;case 3:bt.flags=bt.flags&-65537|128;case 0:if(bt=pt.payload,Te=typeof bt=="function"?bt.call(yn,Ie,Te):bt,Te==null)break e;Ie=p({},Ie,Te);break e;case 2:Dl=!0}}Te=H.callback,Te!==null&&(o.flags|=64,de&&(o.flags|=8192),de=E.callbacks,de===null?E.callbacks=[Te]:de.push(Te))}else de={lane:Te,tag:H.tag,payload:H.payload,callback:H.callback,next:null},F===null?(we=F=de,ie=Ie):F=F.next=de,B|=Te;if(H=H.next,H===null){if(H=E.shared.pending,H===null)break;de=H,H=de.next,de.next=null,E.lastBaseUpdate=de,E.shared.pending=null}}while(!0);F===null&&(ie=Ie),E.baseState=ie,E.firstBaseUpdate=we,E.lastBaseUpdate=F,k===null&&(E.shared.lanes=0),Vl|=B,o.lanes=B,o.memoizedState=Ie}}function ph(o,a){if(typeof o!="function")throw Error(S(191,o));o.call(a)}function Ut(o,a){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)ph(d[o],a)}var nt=Oe(null),Gr=Oe(0);function Li(o,a){o=$o,ze(Gr,o),ze(nt,a),$o=o|a.baseLanes}function Ms(){ze(Gr,$o),ze(nt,nt.current)}function Tu(){$o=Gr.current,et(nt),et(Gr)}var Ol=0,Lt=null,tn=null,ti=null,Fc=!1,xu=!1,Ko=!1,Ta=0,qc=0,Ns=null,Ug=0;function qn(){throw Error(S(321))}function fd(o,a){if(a===null)return!1;for(var d=0;d<a.length&&d<o.length;d++)if(!Xi(o[d],a[d]))return!1;return!0}function dd(o,a,d,g,E,k){return Ol=k,Lt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,xe.H=o===null||o.memoizedState===null?Ih:wt,Ko=!1,k=d(g,E),Ko=!1,xu&&(k=Bg(a,d,g,E)),jg(o),k}function jg(o){xe.H=Zc;var a=tn!==null&&tn.next!==null;if(Ol=0,ti=tn=Lt=null,Fc=!1,qc=0,Ns=null,a)throw Error(S(300));o===null||ni||(o=o.dependencies,o!==null&&Ds(o)&&(ni=!0))}function Bg(o,a,d,g){Lt=o;var E=0;do{if(xu&&(Ns=null),qc=0,xu=!1,25<=E)throw Error(S(301));if(E+=1,ti=tn=null,o.updateQueue!=null){var k=o.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}xe.H=Zg,k=a(d,g)}while(xu);return k}function Iv(){var o=xe.H,a=o.useState()[0];return a=typeof a.then=="function"?Ea(a):a,o=o.useState()[0],(tn!==null?tn.memoizedState:null)!==o&&(Lt.flags|=1024),a}function pd(){var o=Ta!==0;return Ta=0,o}function xa(o,a,d){a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~d}function hd(o){if(Fc){for(o=o.memoizedState;o!==null;){var a=o.queue;a!==null&&(a.pending=null),o=o.next}Fc=!1}Ol=0,ti=tn=Lt=null,xu=!1,qc=Ta=0,Ns=null}function fr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ti===null?Lt.memoizedState=ti=o:ti=ti.next=o,ti}function zn(){if(tn===null){var o=Lt.alternate;o=o!==null?o.memoizedState:null}else o=tn.next;var a=ti===null?Lt.memoizedState:ti.next;if(a!==null)ti=a,tn=o;else{if(o===null)throw Lt.alternate===null?Error(S(467)):Error(S(310));tn=o,o={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},ti===null?Lt.memoizedState=ti=o:ti=ti.next=o}return ti}function hh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ea(o){var a=qc;return qc+=1,Ns===null&&(Ns=[]),o=dh(Ns,o,a),a=Lt,(ti===null?a.memoizedState:ti.next)===null&&(a=a.alternate,xe.H=a===null||a.memoizedState===null?Ih:wt),o}function zc(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Ea(o);if(o.$$typeof===ue)return si(o)}throw Error(S(438,String(o)))}function yd(o){var a=null,d=Lt.updateQueue;if(d!==null&&(a=d.memoCache),a==null){var g=Lt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(a={data:g.data.map(function(E){return E.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),d===null&&(d=hh(),Lt.updateQueue=d),d.memoCache=a,d=a.data[a.index],d===void 0)for(d=a.data[a.index]=Array(o),g=0;g<o;g++)d[g]=_;return a.index++,d}function Rl(o,a){return typeof a=="function"?a(o):a}function gd(o){var a=zn();return Xc(a,tn,o)}function Xc(o,a,d){var g=o.queue;if(g===null)throw Error(S(311));g.lastRenderedReducer=d;var E=o.baseQueue,k=g.pending;if(k!==null){if(E!==null){var B=E.next;E.next=k.next,k.next=B}a.baseQueue=E=k,g.pending=null}if(k=o.baseState,E===null)o.memoizedState=k;else{a=E.next;var H=B=null,ie=null,we=a,F=!1;do{var Ie=we.lane&-536870913;if(Ie!==we.lane?(nn&Ie)===Ie:(Ol&Ie)===Ie){var Te=we.revertLane;if(Te===0)ie!==null&&(ie=ie.next={lane:0,revertLane:0,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null}),Ie===Sa&&(F=!0);else if((Ol&Te)===Te){we=we.next,Te===Sa&&(F=!0);continue}else Ie={lane:0,revertLane:we.revertLane,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},ie===null?(H=ie=Ie,B=k):ie=ie.next=Ie,Lt.lanes|=Te,Vl|=Te;Ie=we.action,Ko&&d(k,Ie),k=we.hasEagerState?we.eagerState:d(k,Ie)}else Te={lane:Ie,revertLane:we.revertLane,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},ie===null?(H=ie=Te,B=k):ie=ie.next=Te,Lt.lanes|=Ie,Vl|=Ie;we=we.next}while(we!==null&&we!==a);if(ie===null?B=k:ie.next=H,!Xi(k,o.memoizedState)&&(ni=!0,F&&(d=wa,d!==null)))throw d;o.memoizedState=k,o.baseState=B,o.baseQueue=ie,g.lastRenderedState=k}return E===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function md(o){var a=zn(),d=a.queue;if(d===null)throw Error(S(311));d.lastRenderedReducer=o;var g=d.dispatch,E=d.pending,k=a.memoizedState;if(E!==null){d.pending=null;var B=E=E.next;do k=o(k,B.action),B=B.next;while(B!==E);Xi(k,a.memoizedState)||(ni=!0),a.memoizedState=k,a.baseQueue===null&&(a.baseState=k),d.lastRenderedState=k}return[k,g]}function Vg(o,a,d){var g=Lt,E=zn(),k=$t;if(k){if(d===void 0)throw Error(S(407));d=d()}else d=a();var B=!Xi((tn||E).memoizedState,d);B&&(E.memoizedState=d,ni=!0),E=E.queue;var H=Ps.bind(null,g,E,o);if(Ls(2048,8,H,[o]),E.getSnapshot!==a||B||ti!==null&&ti.memoizedState.tag&1){if(g.flags|=2048,mo(9,Eu(),yh.bind(null,g,E,d,a),null),En===null)throw Error(S(349));k||(Ol&124)!==0||Hg(g,a,d)}return d}function Hg(o,a,d){o.flags|=16384,o={getSnapshot:a,value:d},a=Lt.updateQueue,a===null?(a=hh(),Lt.updateQueue=a,a.stores=[o]):(d=a.stores,d===null?a.stores=[o]:d.push(o))}function yh(o,a,d,g){a.value=d,a.getSnapshot=g,gh(a)&&Kg(o)}function Ps(o,a,d){return d(function(){gh(a)&&Kg(o)})}function gh(o){var a=o.getSnapshot;o=o.value;try{var d=a();return!Xi(o,d)}catch{return!0}}function Kg(o){var a=Al(o,2);a!==null&&Rr(a,o,2)}function Aa(o){var a=fr();if(typeof o=="function"){var d=o;if(o=d(),Ko){Zl(!0);try{d()}finally{Zl(!1)}}}return a.memoizedState=a.baseState=o,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:o},a}function Gg(o,a,d,g){return o.baseState=d,Xc(o,tn,typeof g=="function"?g:Rl)}function kv(o,a,d,g,E){if(bu(o))throw Error(S(485));if(o=a.action,o!==null){var k={payload:E,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){k.listeners.push(B)}};xe.T!==null?d(!0):k.isTransition=!1,g(k),d=a.pending,d===null?(k.next=a.pending=k,Fg(a,k)):(k.next=d.next,a.pending=d.next=k)}}function Fg(o,a){var d=a.action,g=a.payload,E=o.state;if(a.isTransition){var k=xe.T,B={};xe.T=B;try{var H=d(E,g),ie=xe.S;ie!==null&&ie(B,H),qg(o,a,H)}catch(we){vh(o,a,we)}finally{xe.T=k}}else try{k=d(E,g),qg(o,a,k)}catch(we){vh(o,a,we)}}function qg(o,a,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){mh(o,a,g)},function(g){return vh(o,a,g)}):mh(o,a,d)}function mh(o,a,d){a.status="fulfilled",a.value=d,zg(a),o.state=d,a=o.pending,a!==null&&(d=a.next,d===a?o.pending=null:(d=d.next,a.next=d,Fg(o,d)))}function vh(o,a,d){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do a.status="rejected",a.reason=d,zg(a),a=a.next;while(a!==g)}o.action=null}function zg(o){o=o.listeners;for(var a=0;a<o.length;a++)(0,o[a])()}function Xg(o,a){return a}function Yc(o,a){if($t){var d=En.formState;if(d!==null){e:{var g=Lt;if($t){if(On){t:{for(var E=On,k=Wi;E.nodeType!==8;){if(!k){E=null;break t}if(E=xo(E.nextSibling),E===null){E=null;break t}}k=E.data,E=k==="F!"||k==="F"?E:null}if(E){On=xo(E.nextSibling),g=E.data==="F!";break e}}hu(g)}g=!1}g&&(a=d[0])}}return d=fr(),d.memoizedState=d.baseState=a,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xg,lastRenderedState:a},d.queue=g,d=bh.bind(null,Lt,g),g.dispatch=d,g=Aa(!1),k=Nl.bind(null,Lt,!1,g.queue),g=fr(),E={state:a,dispatch:null,action:o,pending:null},g.queue=E,d=kv.bind(null,Lt,E,k,d),E.dispatch=d,g.memoizedState=o,[a,d,!1]}function Sh(o){var a=zn();return wh(a,tn,o)}function wh(o,a,d){if(a=Xc(o,a,Xg)[0],o=gd(Rl)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var g=Ea(a)}catch(B){throw B===Cr?bn:B}else g=a;a=zn();var E=a.queue,k=E.dispatch;return d!==a.memoizedState&&(Lt.flags|=2048,mo(9,Eu(),vd.bind(null,E,d),null)),[g,k,o]}function vd(o,a){o.action=a}function Yg(o){var a=zn(),d=tn;if(d!==null)return wh(a,d,o);zn(),a=a.memoizedState,d=zn();var g=d.queue.dispatch;return d.memoizedState=o,[a,g,!1]}function mo(o,a,d,g){return o={tag:o,create:d,deps:g,inst:a,next:null},a=Lt.updateQueue,a===null&&(a=hh(),Lt.updateQueue=a),d=a.lastEffect,d===null?a.lastEffect=o.next=o:(g=d.next,d.next=o,o.next=g,a.lastEffect=o),o}function Eu(){return{destroy:void 0,resource:void 0}}function Sd(){return zn().memoizedState}function Wc(o,a,d,g){var E=fr();g=g===void 0?null:g,Lt.flags|=o,E.memoizedState=mo(1|a,Eu(),d,g)}function Ls(o,a,d,g){var E=zn();g=g===void 0?null:g;var k=E.memoizedState.inst;tn!==null&&g!==null&&fd(g,tn.memoizedState.deps)?E.memoizedState=mo(a,k,d,g):(Lt.flags|=o,E.memoizedState=mo(1|a,k,d,g))}function Th(o,a){Wc(8390656,8,o,a)}function xh(o,a){Ls(2048,8,o,a)}function Eh(o,a){return Ls(4,2,o,a)}function wd(o,a){return Ls(4,4,o,a)}function _s(o,a){if(typeof a=="function"){o=o();var d=a(o);return function(){typeof d=="function"?d():a(null)}}if(a!=null)return o=o(),a.current=o,function(){a.current=null}}function Au(o,a,d){d=d!=null?d.concat([o]):null,Ls(4,4,_s.bind(null,a,o),d)}function Ah(){}function Ch(o,a){var d=zn();a=a===void 0?null:a;var g=d.memoizedState;return a!==null&&fd(a,g[1])?g[0]:(d.memoizedState=[o,a],o)}function Ca(o,a){var d=zn();a=a===void 0?null:a;var g=d.memoizedState;if(a!==null&&fd(a,g[1]))return g[0];if(g=o(),Ko){Zl(!0);try{o()}finally{Zl(!1)}}return d.memoizedState=[g,a],g}function Us(o,a,d){return d===void 0||(Ol&1073741824)!==0?o.memoizedState=a:(o.memoizedState=d,o=dm(),Lt.lanes|=o,Vl|=o,d)}function Qc(o,a,d,g){return Xi(d,a)?d:nt.current!==null?(o=Us(o,d,g),Xi(o,a)||(ni=!0),o):(Ol&42)===0?(ni=!0,o.memoizedState=d):(o=dm(),Lt.lanes|=o,Vl|=o,a)}function Jc(o,a,d,g,E){var k=Ue.p;Ue.p=k!==0&&8>k?k:8;var B=xe.T,H={};xe.T=H,Nl(o,!1,a,d);try{var ie=E(),we=xe.S;if(we!==null&&we(H,ie),ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var F=_g(ie,g);Ml(o,a,F,Ui(o))}else Ml(o,a,g,Ui(o))}catch(Ie){Ml(o,a,{then:function(){},status:"rejected",reason:Ie},Ui())}finally{Ue.p=k,xe.T=B}}function Td(){}function xd(o,a,d,g){if(o.tag!==5)throw Error(S(476));var E=Ed(o).queue;Jc(o,E,a,gt,d===null?Td:function(){return Wg(o),d(g)})}function Ed(o){var a=o.memoizedState;if(a!==null)return a;a={memoizedState:gt,baseState:gt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:gt},next:null};var d={};return a.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rl,lastRenderedState:d},next:null},o.memoizedState=a,o=o.alternate,o!==null&&(o.memoizedState=a),a}function Wg(o){var a=Ed(o).next.queue;Ml(o,a,{},Ui())}function ba(){return si(pc)}function _i(){return zn().memoizedState}function Cu(){return zn().memoizedState}function js(o){for(var a=o.return;a!==null;){switch(a.tag){case 24:case 3:var d=Ui();o=Pt(d);var g=Ho(a,o,d);g!==null&&(Rr(g,a,d),Kc(g,a,d)),a={cache:vn()},o.payload=a;return}a=a.return}}function Qg(o,a,d){var g=Ui();d={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null},bu(o)?Jg(a,d):(d=El(o,a,d,g),d!==null&&(Rr(d,o,g),un(d,a,g)))}function bh(o,a,d){var g=Ui();Ml(o,a,d,g)}function Ml(o,a,d,g){var E={lane:g,revertLane:0,action:d,hasEagerState:!1,eagerState:null,next:null};if(bu(o))Jg(a,E);else{var k=o.alternate;if(o.lanes===0&&(k===null||k.lanes===0)&&(k=a.lastRenderedReducer,k!==null))try{var B=a.lastRenderedState,H=k(B,d);if(E.hasEagerState=!0,E.eagerState=H,Xi(H,B))return Ot(o,a,E,0),En===null&&As(),!1}catch{}finally{}if(d=El(o,a,E,g),d!==null)return Rr(d,o,g),un(d,a,g),!0}return!1}function Nl(o,a,d,g){if(g={lane:2,revertLane:Wd(),action:g,hasEagerState:!1,eagerState:null,next:null},bu(o)){if(a)throw Error(S(479))}else a=El(o,d,g,2),a!==null&&Rr(a,o,2)}function bu(o){var a=o.alternate;return o===Lt||a!==null&&a===Lt}function Jg(o,a){xu=Fc=!0;var d=o.pending;d===null?a.next=a:(a.next=d.next,d.next=a),o.pending=a}function un(o,a,d){if((d&4194048)!==0){var g=a.lanes;g&=o.pendingLanes,d|=g,a.lanes=d,eu(o,d)}}var Zc={readContext:si,use:zc,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useLayoutEffect:qn,useInsertionEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useSyncExternalStore:qn,useId:qn,useHostTransitionStatus:qn,useFormState:qn,useActionState:qn,useOptimistic:qn,useMemoCache:qn,useCacheRefresh:qn},Ih={readContext:si,use:zc,useCallback:function(o,a){return fr().memoizedState=[o,a===void 0?null:a],o},useContext:si,useEffect:Th,useImperativeHandle:function(o,a,d){d=d!=null?d.concat([o]):null,Wc(4194308,4,_s.bind(null,a,o),d)},useLayoutEffect:function(o,a){return Wc(4194308,4,o,a)},useInsertionEffect:function(o,a){Wc(4,2,o,a)},useMemo:function(o,a){var d=fr();a=a===void 0?null:a;var g=o();if(Ko){Zl(!0);try{o()}finally{Zl(!1)}}return d.memoizedState=[g,a],g},useReducer:function(o,a,d){var g=fr();if(d!==void 0){var E=d(a);if(Ko){Zl(!0);try{d(a)}finally{Zl(!1)}}}else E=a;return g.memoizedState=g.baseState=E,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:E},g.queue=o,o=o.dispatch=Qg.bind(null,Lt,o),[g.memoizedState,o]},useRef:function(o){var a=fr();return o={current:o},a.memoizedState=o},useState:function(o){o=Aa(o);var a=o.queue,d=bh.bind(null,Lt,a);return a.dispatch=d,[o.memoizedState,d]},useDebugValue:Ah,useDeferredValue:function(o,a){var d=fr();return Us(d,o,a)},useTransition:function(){var o=Aa(!1);return o=Jc.bind(null,Lt,o.queue,!0,!1),fr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,a,d){var g=Lt,E=fr();if($t){if(d===void 0)throw Error(S(407));d=d()}else{if(d=a(),En===null)throw Error(S(349));(nn&124)!==0||Hg(g,a,d)}E.memoizedState=d;var k={value:d,getSnapshot:a};return E.queue=k,Th(Ps.bind(null,g,k,o),[o]),g.flags|=2048,mo(9,Eu(),yh.bind(null,g,k,d,a),null),d},useId:function(){var o=fr(),a=En.identifierPrefix;if($t){var d=Il,g=bl;d=(g&~(1<<32-nr(g)-1)).toString(32)+d,a="«"+a+"R"+d,d=Ta++,0<d&&(a+="H"+d.toString(32)),a+="»"}else d=Ug++,a="«"+a+"r"+d.toString(32)+"»";return o.memoizedState=a},useHostTransitionStatus:ba,useFormState:Yc,useActionState:Yc,useOptimistic:function(o){var a=fr();a.memoizedState=a.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=d,a=Nl.bind(null,Lt,!0,d),d.dispatch=a,[o,a]},useMemoCache:yd,useCacheRefresh:function(){return fr().memoizedState=js.bind(null,Lt)}},wt={readContext:si,use:zc,useCallback:Ch,useContext:si,useEffect:xh,useImperativeHandle:Au,useInsertionEffect:Eh,useLayoutEffect:wd,useMemo:Ca,useReducer:gd,useRef:Sd,useState:function(){return gd(Rl)},useDebugValue:Ah,useDeferredValue:function(o,a){var d=zn();return Qc(d,tn.memoizedState,o,a)},useTransition:function(){var o=gd(Rl)[0],a=zn().memoizedState;return[typeof o=="boolean"?o:Ea(o),a]},useSyncExternalStore:Vg,useId:_i,useHostTransitionStatus:ba,useFormState:Sh,useActionState:Sh,useOptimistic:function(o,a){var d=zn();return Gg(d,tn,o,a)},useMemoCache:yd,useCacheRefresh:Cu},Zg={readContext:si,use:zc,useCallback:Ch,useContext:si,useEffect:xh,useImperativeHandle:Au,useInsertionEffect:Eh,useLayoutEffect:wd,useMemo:Ca,useReducer:md,useRef:Sd,useState:function(){return md(Rl)},useDebugValue:Ah,useDeferredValue:function(o,a){var d=zn();return tn===null?Us(d,o,a):Qc(d,tn.memoizedState,o,a)},useTransition:function(){var o=md(Rl)[0],a=zn().memoizedState;return[typeof o=="boolean"?o:Ea(o),a]},useSyncExternalStore:Vg,useId:_i,useHostTransitionStatus:ba,useFormState:Yg,useActionState:Yg,useOptimistic:function(o,a){var d=zn();return tn!==null?Gg(d,tn,o,a):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:yd,useCacheRefresh:Cu},kr=null,Bs=0;function Ad(o){var a=Bs;return Bs+=1,kr===null&&(kr=[]),dh(kr,o,a)}function $c(o,a){a=a.props.ref,o.ref=a!==void 0?a:null}function Cd(o,a){throw a.$$typeof===v?Error(S(525)):(o=Object.prototype.toString.call(a),Error(S(31,o==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":o)))}function $g(o){var a=o._init;return a(o._payload)}function em(o){function a(ye,se){if(o){var ve=ye.deletions;ve===null?(ye.deletions=[se],ye.flags|=16):ve.push(se)}}function d(ye,se){if(!o)return null;for(;se!==null;)a(ye,se),se=se.sibling;return null}function g(ye){for(var se=new Map;ye!==null;)ye.key!==null?se.set(ye.key,ye):se.set(ye.index,ye),ye=ye.sibling;return se}function E(ye,se){return ye=Cl(ye,se),ye.index=0,ye.sibling=null,ye}function k(ye,se,ve){return ye.index=ve,o?(ve=ye.alternate,ve!==null?(ve=ve.index,ve<se?(ye.flags|=67108866,se):ve):(ye.flags|=67108866,se)):(ye.flags|=1048576,se)}function B(ye){return o&&ye.alternate===null&&(ye.flags|=67108866),ye}function H(ye,se,ve,be){return se===null||se.tag!==6?(se=ih(ve,ye.mode,be),se.return=ye,se):(se=E(se,ve),se.return=ye,se)}function ie(ye,se,ve,be){var rt=ve.type;return rt===C?F(ye,se,ve.props.children,be,ve.key):se!==null&&(se.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===Dt&&$g(rt)===se.type)?(se=E(se,ve.props),$c(se,ve),se.return=ye,se):(se=ud(ve.type,ve.key,ve.props,null,ye.mode,be),$c(se,ve),se.return=ye,se)}function we(ye,se,ve,be){return se===null||se.tag!==4||se.stateNode.containerInfo!==ve.containerInfo||se.stateNode.implementation!==ve.implementation?(se=rh(ve,ye.mode,be),se.return=ye,se):(se=E(se,ve.children||[]),se.return=ye,se)}function F(ye,se,ve,be,rt){return se===null||se.tag!==7?(se=du(ve,ye.mode,be,rt),se.return=ye,se):(se=E(se,ve),se.return=ye,se)}function Ie(ye,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=ih(""+se,ye.mode,ve),se.return=ye,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case N:return ve=ud(se.type,se.key,se.props,null,ye.mode,ve),$c(ve,se),ve.return=ye,ve;case Z:return se=rh(se,ye.mode,ve),se.return=ye,se;case Dt:var be=se._init;return se=be(se._payload),Ie(ye,se,ve)}if(De(se)||he(se))return se=du(se,ye.mode,ve,null),se.return=ye,se;if(typeof se.then=="function")return Ie(ye,Ad(se),ve);if(se.$$typeof===ue)return Ie(ye,ga(ye,se),ve);Cd(ye,se)}return null}function Te(ye,se,ve,be){var rt=se!==null?se.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return rt!==null?null:H(ye,se,""+ve,be);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case N:return ve.key===rt?ie(ye,se,ve,be):null;case Z:return ve.key===rt?we(ye,se,ve,be):null;case Dt:return rt=ve._init,ve=rt(ve._payload),Te(ye,se,ve,be)}if(De(ve)||he(ve))return rt!==null?null:F(ye,se,ve,be,null);if(typeof ve.then=="function")return Te(ye,se,Ad(ve),be);if(ve.$$typeof===ue)return Te(ye,se,ga(ye,ve),be);Cd(ye,ve)}return null}function de(ye,se,ve,be,rt){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return ye=ye.get(ve)||null,H(se,ye,""+be,rt);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case N:return ye=ye.get(be.key===null?ve:be.key)||null,ie(se,ye,be,rt);case Z:return ye=ye.get(be.key===null?ve:be.key)||null,we(se,ye,be,rt);case Dt:var qt=be._init;return be=qt(be._payload),de(ye,se,ve,be,rt)}if(De(be)||he(be))return ye=ye.get(ve)||null,F(se,ye,be,rt,null);if(typeof be.then=="function")return de(ye,se,ve,Ad(be),rt);if(be.$$typeof===ue)return de(ye,se,ve,ga(se,be),rt);Cd(se,be)}return null}function bt(ye,se,ve,be){for(var rt=null,qt=null,at=se,Tt=se=0,pi=null;at!==null&&Tt<ve.length;Tt++){at.index>Tt?(pi=at,at=null):pi=at.sibling;var cn=Te(ye,at,ve[Tt],be);if(cn===null){at===null&&(at=pi);break}o&&at&&cn.alternate===null&&a(ye,at),se=k(cn,se,Tt),qt===null?rt=cn:qt.sibling=cn,qt=cn,at=pi}if(Tt===ve.length)return d(ye,at),$t&&Ar(ye,Tt),rt;if(at===null){for(;Tt<ve.length;Tt++)at=Ie(ye,ve[Tt],be),at!==null&&(se=k(at,se,Tt),qt===null?rt=at:qt.sibling=at,qt=at);return $t&&Ar(ye,Tt),rt}for(at=g(at);Tt<ve.length;Tt++)pi=de(at,ye,Tt,ve[Tt],be),pi!==null&&(o&&pi.alternate!==null&&at.delete(pi.key===null?Tt:pi.key),se=k(pi,se,Tt),qt===null?rt=pi:qt.sibling=pi,qt=pi);return o&&at.forEach(function(Ku){return a(ye,Ku)}),$t&&Ar(ye,Tt),rt}function pt(ye,se,ve,be){if(ve==null)throw Error(S(151));for(var rt=null,qt=null,at=se,Tt=se=0,pi=null,cn=ve.next();at!==null&&!cn.done;Tt++,cn=ve.next()){at.index>Tt?(pi=at,at=null):pi=at.sibling;var Ku=Te(ye,at,cn.value,be);if(Ku===null){at===null&&(at=pi);break}o&&at&&Ku.alternate===null&&a(ye,at),se=k(Ku,se,Tt),qt===null?rt=Ku:qt.sibling=Ku,qt=Ku,at=pi}if(cn.done)return d(ye,at),$t&&Ar(ye,Tt),rt;if(at===null){for(;!cn.done;Tt++,cn=ve.next())cn=Ie(ye,cn.value,be),cn!==null&&(se=k(cn,se,Tt),qt===null?rt=cn:qt.sibling=cn,qt=cn);return $t&&Ar(ye,Tt),rt}for(at=g(at);!cn.done;Tt++,cn=ve.next())cn=de(at,ye,Tt,cn.value,be),cn!==null&&(o&&cn.alternate!==null&&at.delete(cn.key===null?Tt:cn.key),se=k(cn,se,Tt),qt===null?rt=cn:qt.sibling=cn,qt=cn);return o&&at.forEach(function(Jv){return a(ye,Jv)}),$t&&Ar(ye,Tt),rt}function yn(ye,se,ve,be){if(typeof ve=="object"&&ve!==null&&ve.type===C&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case N:e:{for(var rt=ve.key;se!==null;){if(se.key===rt){if(rt=ve.type,rt===C){if(se.tag===7){d(ye,se.sibling),be=E(se,ve.props.children),be.return=ye,ye=be;break e}}else if(se.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===Dt&&$g(rt)===se.type){d(ye,se.sibling),be=E(se,ve.props),$c(be,ve),be.return=ye,ye=be;break e}d(ye,se);break}else a(ye,se);se=se.sibling}ve.type===C?(be=du(ve.props.children,ye.mode,be,ve.key),be.return=ye,ye=be):(be=ud(ve.type,ve.key,ve.props,null,ye.mode,be),$c(be,ve),be.return=ye,ye=be)}return B(ye);case Z:e:{for(rt=ve.key;se!==null;){if(se.key===rt)if(se.tag===4&&se.stateNode.containerInfo===ve.containerInfo&&se.stateNode.implementation===ve.implementation){d(ye,se.sibling),be=E(se,ve.children||[]),be.return=ye,ye=be;break e}else{d(ye,se);break}else a(ye,se);se=se.sibling}be=rh(ve,ye.mode,be),be.return=ye,ye=be}return B(ye);case Dt:return rt=ve._init,ve=rt(ve._payload),yn(ye,se,ve,be)}if(De(ve))return bt(ye,se,ve,be);if(he(ve)){if(rt=he(ve),typeof rt!="function")throw Error(S(150));return ve=rt.call(ve),pt(ye,se,ve,be)}if(typeof ve.then=="function")return yn(ye,se,Ad(ve),be);if(ve.$$typeof===ue)return yn(ye,se,ga(ye,ve),be);Cd(ye,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint"?(ve=""+ve,se!==null&&se.tag===6?(d(ye,se.sibling),be=E(se,ve),be.return=ye,ye=be):(d(ye,se),be=ih(ve,ye.mode,be),be.return=ye,ye=be),B(ye)):d(ye,se)}return function(ye,se,ve,be){try{Bs=0;var rt=yn(ye,se,ve,be);return kr=null,rt}catch(at){if(at===Cr||at===bn)throw at;var qt=cr(29,at,null,ye.mode);return qt.lanes=be,qt.return=ye,qt}finally{}}}var Vs=em(!0),tm=em(!1),Fr=Oe(null),Go=null;function vo(o){var a=o.alternate;ze(ci,ci.current&1),ze(Fr,o),Go===null&&(a===null||nt.current!==null||a.memoizedState!==null)&&(Go=o)}function nm(o){if(o.tag===22){if(ze(ci,ci.current),ze(Fr,o),Go===null){var a=o.alternate;a!==null&&a.memoizedState!==null&&(Go=o)}}else Fo()}function Fo(){ze(ci,ci.current),ze(Fr,Fr.current)}function Pl(o){et(Fr),Go===o&&(Go=null),et(ci)}var ci=Oe(0);function bd(o){for(var a=o;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||gf(d)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function kh(o,a,d,g){a=o.memoizedState,d=d(g,a),d=d==null?a:p({},a,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Dh={enqueueSetState:function(o,a,d){o=o._reactInternals;var g=Ui(),E=Pt(g);E.payload=a,d!=null&&(E.callback=d),a=Ho(o,E,g),a!==null&&(Rr(a,o,g),Kc(a,o,g))},enqueueReplaceState:function(o,a,d){o=o._reactInternals;var g=Ui(),E=Pt(g);E.tag=1,E.payload=a,d!=null&&(E.callback=d),a=Ho(o,E,g),a!==null&&(Rr(a,o,g),Kc(a,o,g))},enqueueForceUpdate:function(o,a){o=o._reactInternals;var d=Ui(),g=Pt(d);g.tag=2,a!=null&&(g.callback=a),a=Ho(o,g,d),a!==null&&(Rr(a,o,d),Kc(a,o,d))}};function ef(o,a,d,g,E,k,B){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,k,B):a.prototype&&a.prototype.isPureReactComponent?!ws(d,g)||!ws(E,k):!0}function im(o,a,d,g){o=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(d,g),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(d,g),a.state!==o&&Dh.enqueueReplaceState(a,a.state,null)}function Kn(o,a){var d=a;if("ref"in a){d={};for(var g in a)g!=="ref"&&(d[g]=a[g])}if(o=o.defaultProps){d===a&&(d=p({},d));for(var E in o)d[E]===void 0&&(d[E]=o[E])}return d}var Iu=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function Fe(o){Iu(o)}function Oh(o){console.error(o)}function qo(o){Iu(o)}function tf(o,a){try{var d=o.onUncaughtError;d(a.value,{componentStack:a.stack})}catch(g){setTimeout(function(){throw g})}}function Hs(o,a,d){try{var g=o.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function nf(o,a,d){return d=Pt(d),d.tag=3,d.payload={element:null},d.callback=function(){tf(o,a)},d}function Id(o){return o=Pt(o),o.tag=3,o}function Rh(o,a,d,g){var E=d.type.getDerivedStateFromError;if(typeof E=="function"){var k=g.value;o.payload=function(){return E(k)},o.callback=function(){Hs(a,d,g)}}var B=d.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(o.callback=function(){Hs(a,d,g),typeof E!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var H=g.stack;this.componentDidCatch(g.value,{componentStack:H!==null?H:""})})}function Dv(o,a,d,g,E){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(a=d.alternate,a!==null&&ks(a,d,E,!0),d=Fr.current,d!==null){switch(d.tag){case 13:return Go===null?Gd():d.alternate===null&&_n===0&&(_n=3),d.flags&=-257,d.flags|=65536,d.lanes=E,g===ch?d.flags|=16384:(a=d.updateQueue,a===null?d.updateQueue=new Set([g]):a.add(g),Wh(o,g,E)),!1;case 22:return d.flags|=65536,g===ch?d.flags|=16384:(a=d.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=a):(d=a.retryQueue,d===null?a.retryQueue=new Set([g]):d.add(g)),Wh(o,g,E)),!1}throw Error(S(435,d.tag))}return Wh(o,g,E),Gd(),!1}if($t)return a=Fr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=E,g!==ad&&(o=Error(S(422),{cause:g}),gu(Ni(o,d)))):(g!==ad&&(a=Error(S(423),{cause:g}),gu(Ni(a,d))),o=o.current.alternate,o.flags|=65536,E&=-E,o.lanes|=E,g=Ni(g,d),E=nf(o.stateNode,g,E),wu(o,E),_n!==4&&(_n=2)),!1;var k=Error(S(520),{cause:g});if(k=Ni(k,d),Ys===null?Ys=[k]:Ys.push(k),_n!==4&&(_n=2),a===null)return!0;g=Ni(g,d),d=a;do{switch(d.tag){case 3:return d.flags|=65536,o=E&-E,d.lanes|=o,o=nf(d.stateNode,g,o),wu(d,o),!1;case 1:if(a=d.type,k=d.stateNode,(d.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Si===null||!Si.has(k))))return d.flags|=65536,E&=-E,d.lanes|=E,E=Id(E),Rh(E,o,d,g),wu(d,E),!1}d=d.return}while(d!==null);return!1}var zo=Error(S(461)),ni=!1;function gi(o,a,d,g){a.child=o===null?tm(a,null,d,g):Vs(a,o.child,d,g)}function rf(o,a,d,g,E){d=d.render;var k=a.ref;if("ref"in g){var B={};for(var H in g)H!=="ref"&&(B[H]=g[H])}else B=g;return Bo(a),g=dd(o,a,d,B,k,E),H=pd(),o!==null&&!ni?(xa(o,a,E),Me(o,a,E)):($t&&H&&Bc(a),a.flags|=1,gi(o,a,g,E),a.child)}function Ks(o,a,d,g,E){if(o===null){var k=d.type;return typeof k=="function"&&!nh(k)&&k.defaultProps===void 0&&d.compare===null?(a.tag=15,a.type=k,ku(o,a,k,g,E)):(o=ud(d.type,null,g,a,a.mode,E),o.ref=a.ref,o.return=a,a.child=o)}if(k=o.child,!Ou(o,E)){var B=k.memoizedProps;if(d=d.compare,d=d!==null?d:ws,d(B,g)&&o.ref===a.ref)return Me(o,a,E)}return a.flags|=1,o=Cl(k,g),o.ref=a.ref,o.return=a,a.child=o}function ku(o,a,d,g,E){if(o!==null){var k=o.memoizedProps;if(ws(k,g)&&o.ref===a.ref)if(ni=!1,a.pendingProps=g=k,Ou(o,E))(o.flags&131072)!==0&&(ni=!0);else return a.lanes=o.lanes,Me(o,a,E)}return of(o,a,d,g,E)}function rm(o,a,d){var g=a.pendingProps,E=g.children,k=o!==null?o.memoizedState:null;if(g.mode==="hidden"){if((a.flags&128)!==0){if(g=k!==null?k.baseLanes|d:d,o!==null){for(E=a.child=o.child,k=0;E!==null;)k=k|E.lanes|E.childLanes,E=E.sibling;a.childLanes=k&~g}else a.childLanes=0,a.child=null;return kd(o,a,g,d)}if((d&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},o!==null&&Vo(a,k!==null?k.cachePool:null),k!==null?Li(a,k):Ms(),nm(a);else return a.lanes=a.childLanes=536870912,kd(o,a,k!==null?k.baseLanes|d:d,d)}else k!==null?(Vo(a,k.cachePool),Li(a,k),Fo(),a.memoizedState=null):(o!==null&&Vo(a,null),Ms(),Fo());return gi(o,a,E,d),a.child}function kd(o,a,d,g){var E=vu();return E=E===null?null:{parent:ct._currentValue,pool:E},a.memoizedState={baseLanes:d,cachePool:E},o!==null&&Vo(a,null),Ms(),nm(a),o!==null&&ks(o,a,g,!0),null}function Ll(o,a){var d=a.ref;if(d===null)o!==null&&o.ref!==null&&(a.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(S(284));(o===null||o.ref!==d)&&(a.flags|=4194816)}}function of(o,a,d,g,E){return Bo(a),d=dd(o,a,d,g,void 0,E),g=pd(),o!==null&&!ni?(xa(o,a,E),Me(o,a,E)):($t&&g&&Bc(a),a.flags|=1,gi(o,a,d,E),a.child)}function Mh(o,a,d,g,E,k){return Bo(a),a.updateQueue=null,d=Bg(a,g,d,E),jg(o),g=pd(),o!==null&&!ni?(xa(o,a,k),Me(o,a,k)):($t&&g&&Bc(a),a.flags|=1,gi(o,a,d,k),a.child)}function Nh(o,a,d,g,E){if(Bo(a),a.stateNode===null){var k=pa,B=d.contextType;typeof B=="object"&&B!==null&&(k=si(B)),k=new d(g,k),a.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=Dh,a.stateNode=k,k._reactInternals=a,k=a.stateNode,k.props=g,k.state=a.memoizedState,k.refs={},Rs(a),B=d.contextType,k.context=typeof B=="object"&&B!==null?si(B):pa,k.state=a.memoizedState,B=d.getDerivedStateFromProps,typeof B=="function"&&(kh(a,d,B,g),k.state=a.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(B=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),B!==k.state&&Dh.enqueueReplaceState(k,k.state,null),Ir(a,g,k,E),Bt(),k.state=a.memoizedState),typeof k.componentDidMount=="function"&&(a.flags|=4194308),g=!0}else if(o===null){k=a.stateNode;var H=a.memoizedProps,ie=Kn(d,H);k.props=ie;var we=k.context,F=d.contextType;B=pa,typeof F=="object"&&F!==null&&(B=si(F));var Ie=d.getDerivedStateFromProps;F=typeof Ie=="function"||typeof k.getSnapshotBeforeUpdate=="function",H=a.pendingProps!==H,F||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(H||we!==B)&&im(a,k,g,B),Dl=!1;var Te=a.memoizedState;k.state=Te,Ir(a,g,k,E),Bt(),we=a.memoizedState,H||Te!==we||Dl?(typeof Ie=="function"&&(kh(a,d,Ie,g),we=a.memoizedState),(ie=Dl||ef(a,d,ie,g,Te,we,B))?(F||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=g,a.memoizedState=we),k.props=g,k.state=we,k.context=B,g=ie):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),g=!1)}else{k=a.stateNode,Su(o,a),B=a.memoizedProps,F=Kn(d,B),k.props=F,Ie=a.pendingProps,Te=k.context,we=d.contextType,ie=pa,typeof we=="object"&&we!==null&&(ie=si(we)),H=d.getDerivedStateFromProps,(we=typeof H=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(B!==Ie||Te!==ie)&&im(a,k,g,ie),Dl=!1,Te=a.memoizedState,k.state=Te,Ir(a,g,k,E),Bt();var de=a.memoizedState;B!==Ie||Te!==de||Dl||o!==null&&o.dependencies!==null&&Ds(o.dependencies)?(typeof H=="function"&&(kh(a,d,H,g),de=a.memoizedState),(F=Dl||ef(a,d,F,g,Te,de,ie)||o!==null&&o.dependencies!==null&&Ds(o.dependencies))?(we||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(g,de,ie),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(g,de,ie)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||B===o.memoizedProps&&Te===o.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&Te===o.memoizedState||(a.flags|=1024),a.memoizedProps=g,a.memoizedState=de),k.props=g,k.state=de,k.context=ie,g=F):(typeof k.componentDidUpdate!="function"||B===o.memoizedProps&&Te===o.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&Te===o.memoizedState||(a.flags|=1024),g=!1)}return k=g,Ll(o,a),g=(a.flags&128)!==0,k||g?(k=a.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:k.render(),a.flags|=1,o!==null&&g?(a.child=Vs(a,o.child,null,E),a.child=Vs(a,null,d,E)):gi(o,a,d,E),a.memoizedState=k.state,o=a.child):o=Me(o,a,E),o}function Dd(o,a,d,g){return yu(),a.flags|=256,gi(o,a,d,g),a.child}var Ph={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _l(o){return{baseLanes:o,cachePool:en()}}function Du(o,a,d){return o=o!==null?o.childLanes&~d:0,a&&(o|=Or),o}function Lh(o,a,d){var g=a.pendingProps,E=!1,k=(a.flags&128)!==0,B;if((B=k)||(B=o!==null&&o.memoizedState===null?!1:(ci.current&2)!==0),B&&(E=!0,a.flags&=-129),B=(a.flags&32)!==0,a.flags&=-33,o===null){if($t){if(E?vo(a):Fo(),$t){var H=On,ie;if(ie=H){e:{for(ie=H,H=Wi;ie.nodeType!==8;){if(!H){H=null;break e}if(ie=xo(ie.nextSibling),ie===null){H=null;break e}}H=ie}H!==null?(a.memoizedState={dehydrated:H,treeContext:ya!==null?{id:bl,overflow:Il}:null,retryLane:536870912,hydrationErrors:null},ie=cr(18,null,null,0),ie.stateNode=H,ie.return=a,a.child=ie,Pi=a,On=null,ie=!0):ie=!1}ie||hu(a)}if(H=a.memoizedState,H!==null&&(H=H.dehydrated,H!==null))return gf(H)?a.lanes=32:a.lanes=536870912,null;Pl(a)}return H=g.children,g=g.fallback,E?(Fo(),E=a.mode,H=Gs({mode:"hidden",children:H},E),g=du(g,E,d,null),H.return=a,g.return=a,H.sibling=g,a.child=H,E=a.child,E.memoizedState=_l(d),E.childLanes=Du(o,B,d),a.memoizedState=Ph,g):(vo(a),So(a,H))}if(ie=o.memoizedState,ie!==null&&(H=ie.dehydrated,H!==null)){if(k)a.flags&256?(vo(a),a.flags&=-257,a=Ei(o,a,d)):a.memoizedState!==null?(Fo(),a.child=o.child,a.flags|=128,a=null):(Fo(),E=g.fallback,H=a.mode,g=Gs({mode:"visible",children:g.children},H),E=du(E,H,d,null),E.flags|=2,g.return=a,E.return=a,g.sibling=E,a.child=g,Vs(a,o.child,null,d),g=a.child,g.memoizedState=_l(d),g.childLanes=Du(o,B,d),a.memoizedState=Ph,a=E);else if(vo(a),gf(H)){if(B=H.nextSibling&&H.nextSibling.dataset,B)var we=B.dgst;B=we,g=Error(S(419)),g.stack="",g.digest=B,gu({value:g,source:null,stack:null}),a=Ei(o,a,d)}else if(ni||ks(o,a,d,!1),B=(d&o.childLanes)!==0,ni||B){if(B=En,B!==null&&(g=d&-d,g=(g&42)!==0?1:tu(g),g=(g&(B.suspendedLanes|d))!==0?0:g,g!==0&&g!==ie.retryLane))throw ie.retryLane=g,Al(o,g),Rr(B,o,g),zo;H.data==="$?"||Gd(),a=Ei(o,a,d)}else H.data==="$?"?(a.flags|=192,a.child=o.child,a=null):(o=ie.treeContext,On=xo(H.nextSibling),Pi=a,$t=!0,_o=null,Wi=!1,o!==null&&(Yi[Er++]=bl,Yi[Er++]=Il,Yi[Er++]=ya,bl=o.id,Il=o.overflow,ya=a),a=So(a,g.children),a.flags|=4096);return a}return E?(Fo(),E=g.fallback,H=a.mode,ie=o.child,we=ie.sibling,g=Cl(ie,{mode:"hidden",children:g.children}),g.subtreeFlags=ie.subtreeFlags&65011712,we!==null?E=Cl(we,E):(E=du(E,H,d,null),E.flags|=2),E.return=a,g.return=a,g.sibling=E,a.child=g,g=E,E=a.child,H=o.child.memoizedState,H===null?H=_l(d):(ie=H.cachePool,ie!==null?(we=ct._currentValue,ie=ie.parent!==we?{parent:we,pool:we}:ie):ie=en(),H={baseLanes:H.baseLanes|d,cachePool:ie}),E.memoizedState=H,E.childLanes=Du(o,B,d),a.memoizedState=Ph,g):(vo(a),d=o.child,o=d.sibling,d=Cl(d,{mode:"visible",children:g.children}),d.return=a,d.sibling=null,o!==null&&(B=a.deletions,B===null?(a.deletions=[o],a.flags|=16):B.push(o)),a.child=d,a.memoizedState=null,d)}function So(o,a){return a=Gs({mode:"visible",children:a},o.mode),a.return=o,o.child=a}function Gs(o,a){return o=cr(22,o,null,a),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function Ei(o,a,d){return Vs(a,o.child,null,d),o=So(a,a.pendingProps.children),o.flags|=2,a.memoizedState=null,o}function St(o,a,d){o.lanes|=a;var g=o.alternate;g!==null&&(g.lanes|=a),ah(o.return,a,d)}function lf(o,a,d,g,E){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:E}:(k.isBackwards=a,k.rendering=null,k.renderingStartTime=0,k.last=g,k.tail=d,k.tailMode=E)}function Ai(o,a,d){var g=a.pendingProps,E=g.revealOrder,k=g.tail;if(gi(o,a,g.children,d),g=ci.current,(g&2)!==0)g=g&1|2,a.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=a.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&St(o,d,a);else if(o.tag===19)St(o,d,a);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}switch(ze(ci,g),E){case"forwards":for(d=a.child,E=null;d!==null;)o=d.alternate,o!==null&&bd(o)===null&&(E=d),d=d.sibling;d=E,d===null?(E=a.child,a.child=null):(E=d.sibling,d.sibling=null),lf(a,!1,E,d,k);break;case"backwards":for(d=null,E=a.child,a.child=null;E!==null;){if(o=E.alternate,o!==null&&bd(o)===null){a.child=E;break}o=E.sibling,E.sibling=d,d=E,E=o}lf(a,!0,d,null,k);break;case"together":lf(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Me(o,a,d){if(o!==null&&(a.dependencies=o.dependencies),Vl|=a.lanes,(d&a.childLanes)===0)if(o!==null){if(ks(o,a,d,!1),(d&a.childLanes)===0)return null}else return null;if(o!==null&&a.child!==o.child)throw Error(S(153));if(a.child!==null){for(o=a.child,d=Cl(o,o.pendingProps),a.child=d,d.return=a;o.sibling!==null;)o=o.sibling,d=d.sibling=Cl(o,o.pendingProps),d.return=a;d.sibling=null}return a.child}function Ou(o,a){return(o.lanes&a)!==0?!0:(o=o.dependencies,!!(o!==null&&Ds(o)))}function Ke(o,a,d){switch(a.tag){case 3:Tn(a,a.stateNode.containerInfo),jo(a,ct,o.memoizedState.cache),yu();break;case 27:case 5:Up(a);break;case 4:Tn(a,a.stateNode.containerInfo);break;case 10:jo(a,a.type,a.memoizedProps.value);break;case 13:var g=a.memoizedState;if(g!==null)return g.dehydrated!==null?(vo(a),a.flags|=128,null):(d&a.child.childLanes)!==0?Lh(o,a,d):(vo(a),o=Me(o,a,d),o!==null?o.sibling:null);vo(a);break;case 19:var E=(o.flags&128)!==0;if(g=(d&a.childLanes)!==0,g||(ks(o,a,d,!1),g=(d&a.childLanes)!==0),E){if(g)return Ai(o,a,d);a.flags|=128}if(E=a.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ze(ci,ci.current),g)break;return null;case 22:case 23:return a.lanes=0,rm(o,a,d);case 24:jo(a,ct,o.memoizedState.cache)}return Me(o,a,d)}function Nt(o,a,d){if(o!==null)if(o.memoizedProps!==a.pendingProps)ni=!0;else{if(!Ou(o,d)&&(a.flags&128)===0)return ni=!1,Ke(o,a,d);ni=(o.flags&131072)!==0}else ni=!1,$t&&(a.flags&1048576)!==0&&pu(a,jc,a.index);switch(a.lanes=0,a.tag){case 16:e:{o=a.pendingProps;var g=a.elementType,E=g._init;if(g=E(g._payload),a.type=g,typeof g=="function")nh(g)?(o=Kn(g,o),a.tag=1,a=Nh(null,a,g,o,d)):(a.tag=0,a=of(null,a,g,o,d));else{if(g!=null){if(E=g.$$typeof,E===Ne){a.tag=11,a=rf(null,a,g,o,d);break e}else if(E===it){a.tag=14,a=Ks(null,a,g,o,d);break e}}throw a=_e(g)||g,Error(S(306,a,""))}}return a;case 0:return of(o,a,a.type,a.pendingProps,d);case 1:return g=a.type,E=Kn(g,a.pendingProps),Nh(o,a,g,E,d);case 3:e:{if(Tn(a,a.stateNode.containerInfo),o===null)throw Error(S(387));g=a.pendingProps;var k=a.memoizedState;E=k.element,Su(o,a),Ir(a,g,null,d);var B=a.memoizedState;if(g=B.cache,jo(a,ct,g),g!==k.cache&&sd(a,[ct],d,!0),Bt(),g=B.element,k.isDehydrated)if(k={element:g,isDehydrated:!1,cache:B.cache},a.updateQueue.baseState=k,a.memoizedState=k,a.flags&256){a=Dd(o,a,g,d);break e}else if(g!==E){E=Ni(Error(S(424)),a),gu(E),a=Dd(o,a,g,d);break e}else{switch(o=a.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(On=xo(o.firstChild),Pi=a,$t=!0,_o=null,Wi=!0,d=tm(a,null,g,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(yu(),g===E){a=Me(o,a,d);break e}gi(o,a,g,d)}a=a.child}return a;case 26:return Ll(o,a),o===null?(d=ay(a.type,null,a.pendingProps,null))?a.memoizedState=d:$t||(d=a.type,o=a.pendingProps,g=$d(mt.current).createElement(d),g[Di]=a,g[ir]=o,bi(g,d,o),Y(g),a.stateNode=g):a.memoizedState=ay(a.type,o.memoizedProps,a.pendingProps,o.memoizedState),null;case 27:return Up(a),o===null&&$t&&(g=a.stateNode=ly(a.type,a.pendingProps,mt.current),Pi=a,Wi=!0,E=On,To(a.type)?(ip=E,On=xo(g.firstChild)):On=E),gi(o,a,a.pendingProps.children,d),Ll(o,a),o===null&&(a.flags|=4194304),a.child;case 5:return o===null&&$t&&((E=g=On)&&(g=Bv(g,a.type,a.pendingProps,Wi),g!==null?(a.stateNode=g,Pi=a,On=xo(g.firstChild),Wi=!1,E=!0):E=!1),E||hu(a)),Up(a),E=a.type,k=a.pendingProps,B=o!==null?o.memoizedProps:null,g=k.children,ry(E,k)?g=null:B!==null&&ry(E,B)&&(a.flags|=32),a.memoizedState!==null&&(E=dd(o,a,Iv,null,null,d),pc._currentValue=E),Ll(o,a),gi(o,a,g,d),a.child;case 6:return o===null&&$t&&((o=d=On)&&(d=Vv(d,a.pendingProps,Wi),d!==null?(a.stateNode=d,Pi=a,On=null,o=!0):o=!1),o||hu(a)),null;case 13:return Lh(o,a,d);case 4:return Tn(a,a.stateNode.containerInfo),g=a.pendingProps,o===null?a.child=Vs(a,null,g,d):gi(o,a,g,d),a.child;case 11:return rf(o,a,a.type,a.pendingProps,d);case 7:return gi(o,a,a.pendingProps,d),a.child;case 8:return gi(o,a,a.pendingProps.children,d),a.child;case 12:return gi(o,a,a.pendingProps.children,d),a.child;case 10:return g=a.pendingProps,jo(a,a.type,g.value),gi(o,a,g.children,d),a.child;case 9:return E=a.type._context,g=a.pendingProps.children,Bo(a),E=si(E),g=g(E),a.flags|=1,gi(o,a,g,d),a.child;case 14:return Ks(o,a,a.type,a.pendingProps,d);case 15:return ku(o,a,a.type,a.pendingProps,d);case 19:return Ai(o,a,d);case 31:return g=a.pendingProps,d=a.mode,g={mode:g.mode,children:g.children},o===null?(d=Gs(g,d),d.ref=a.ref,a.child=d,d.return=a,a=d):(d=Cl(o.child,g),d.ref=a.ref,a.child=d,d.return=a,a=d),a;case 22:return rm(o,a,d);case 24:return Bo(a),g=si(ct),o===null?(E=vu(),E===null&&(E=En,k=vn(),E.pooledCache=k,k.refCount++,k!==null&&(E.pooledCacheLanes|=d),E=k),a.memoizedState={parent:g,cache:E},Rs(a),jo(a,ct,E)):((o.lanes&d)!==0&&(Su(o,a),Ir(a,null,null,d),Bt()),E=o.memoizedState,k=a.memoizedState,E.parent!==g?(E={parent:g,cache:g},a.memoizedState=E,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=E),jo(a,ct,g)):(g=k.cache,jo(a,ct,g),g!==E.cache&&sd(a,[ct],d,!0))),gi(o,a,a.pendingProps.children,d),a.child;case 29:throw a.pendingProps}throw Error(S(156,a.tag))}function qr(o){o.flags|=4}function om(o,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!fy(a)){if(a=Fr.current,a!==null&&((nn&4194048)===nn?Go!==null:(nn&62914560)!==nn&&(nn&536870912)===0||a!==Go))throw Os=ch,sh;o.flags|=8192}}function Vt(o,a){a!==null&&(o.flags|=4),o.flags&16384&&(a=o.tag!==22?gg():536870912,o.lanes|=a,Na|=a)}function Ia(o,a){if(!$t)switch(o.tailMode){case"hidden":a=o.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.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?a||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function Mn(o){var a=o.alternate!==null&&o.alternate.child===o.child,d=0,g=0;if(a)for(var E=o.child;E!==null;)d|=E.lanes|E.childLanes,g|=E.subtreeFlags&65011712,g|=E.flags&65011712,E.return=o,E=E.sibling;else for(E=o.child;E!==null;)d|=E.lanes|E.childLanes,g|=E.subtreeFlags,g|=E.flags,E.return=o,E=E.sibling;return o.subtreeFlags|=g,o.childLanes=d,a}function Ov(o,a,d){var g=a.pendingProps;switch(bs(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(a),null;case 1:return Mn(a),null;case 3:return d=a.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),a.memoizedState.cache!==g&&(a.flags|=2048),kl(ct),pl(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Is(a)?qr(a):o===null||o.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ng())),Mn(a),null;case 26:return d=a.memoizedState,o===null?(qr(a),d!==null?(Mn(a),om(a,d)):(Mn(a),a.flags&=-16777217)):d?d!==o.memoizedState?(qr(a),Mn(a),om(a,d)):(Mn(a),a.flags&=-16777217):(o.memoizedProps!==g&&qr(a),Mn(a),a.flags&=-16777217),null;case 27:Uf(a),d=mt.current;var E=a.type;if(o!==null&&a.stateNode!=null)o.memoizedProps!==g&&qr(a);else{if(!g){if(a.stateNode===null)throw Error(S(166));return Mn(a),null}o=G.current,Is(a)?oh(a):(o=ly(E,g,d),a.stateNode=o,qr(a))}return Mn(a),null;case 5:if(Uf(a),d=a.type,o!==null&&a.stateNode!=null)o.memoizedProps!==g&&qr(a);else{if(!g){if(a.stateNode===null)throw Error(S(166));return Mn(a),null}if(o=G.current,Is(a))oh(a);else{switch(E=$d(mt.current),o){case 1:o=E.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:o=E.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":o=E.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":o=E.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":o=E.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof g.is=="string"?E.createElement("select",{is:g.is}):E.createElement("select"),g.multiple?o.multiple=!0:g.size&&(o.size=g.size);break;default:o=typeof g.is=="string"?E.createElement(d,{is:g.is}):E.createElement(d)}}o[Di]=a,o[ir]=g;e:for(E=a.child;E!==null;){if(E.tag===5||E.tag===6)o.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===a)break e;for(;E.sibling===null;){if(E.return===null||E.return===a)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=o;e:switch(bi(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&&qr(a)}}return Mn(a),a.flags&=-16777217,null;case 6:if(o&&a.stateNode!=null)o.memoizedProps!==g&&qr(a);else{if(typeof g!="string"&&a.stateNode===null)throw Error(S(166));if(o=mt.current,Is(a)){if(o=a.stateNode,d=a.memoizedProps,g=null,E=Pi,E!==null)switch(E.tag){case 27:case 5:g=E.memoizedProps}o[Di]=a,o=!!(o.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||lc(o.nodeValue,d)),o||hu(a)}else o=$d(o).createTextNode(g),o[Di]=a,a.stateNode=o}return Mn(a),null;case 13:if(g=a.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(E=Is(a),g!==null&&g.dehydrated!==null){if(o===null){if(!E)throw Error(S(318));if(E=a.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(S(317));E[Di]=a}else yu(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mn(a),E=!1}else E=Ng(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=E),E=!0;if(!E)return a.flags&256?(Pl(a),a):(Pl(a),null)}if(Pl(a),(a.flags&128)!==0)return a.lanes=d,a;if(d=g!==null,o=o!==null&&o.memoizedState!==null,d){g=a.child,E=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(E=g.alternate.memoizedState.cachePool.pool);var k=null;g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(k=g.memoizedState.cachePool.pool),k!==E&&(g.flags|=2048)}return d!==o&&d&&(a.child.flags|=8192),Vt(a,a.updateQueue),Mn(a),null;case 4:return pl(),o===null&&hf(a.stateNode.containerInfo),Mn(a),null;case 10:return kl(a.type),Mn(a),null;case 19:if(et(ci),E=a.memoizedState,E===null)return Mn(a),null;if(g=(a.flags&128)!==0,k=E.rendering,k===null)if(g)Ia(E,!1);else{if(_n!==0||o!==null&&(o.flags&128)!==0)for(o=a.child;o!==null;){if(k=bd(o),k!==null){for(a.flags|=128,Ia(E,!1),o=k.updateQueue,a.updateQueue=o,Vt(a,o),a.subtreeFlags=0,o=d,d=a.child;d!==null;)_c(d,o),d=d.sibling;return ze(ci,ci.current&1|2),a.child}o=o.sibling}E.tail!==null&&ui()>ff&&(a.flags|=128,g=!0,Ia(E,!1),a.lanes=4194304)}else{if(!g)if(o=bd(k),o!==null){if(a.flags|=128,g=!0,o=o.updateQueue,a.updateQueue=o,Vt(a,o),Ia(E,!0),E.tail===null&&E.tailMode==="hidden"&&!k.alternate&&!$t)return Mn(a),null}else 2*ui()-E.renderingStartTime>ff&&d!==536870912&&(a.flags|=128,g=!0,Ia(E,!1),a.lanes=4194304);E.isBackwards?(k.sibling=a.child,a.child=k):(o=E.last,o!==null?o.sibling=k:a.child=k,E.last=k)}return E.tail!==null?(a=E.tail,E.rendering=a,E.tail=a.sibling,E.renderingStartTime=ui(),a.sibling=null,o=ci.current,ze(ci,g?o&1|2:o&1),a):(Mn(a),null);case 22:case 23:return Pl(a),Tu(),g=a.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(a.flags|=8192):g&&(a.flags|=8192),g?(d&536870912)!==0&&(a.flags&128)===0&&(Mn(a),a.subtreeFlags&6&&(a.flags|=8192)):Mn(a),d=a.updateQueue,d!==null&&Vt(a,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),g=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(g=a.memoizedState.cachePool.pool),g!==d&&(a.flags|=2048),o!==null&&et(It),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),kl(ct),Mn(a),null;case 25:return null;case 30:return null}throw Error(S(156,a.tag))}function Rv(o,a){switch(bs(a),a.tag){case 1:return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return kl(ct),pl(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 26:case 27:case 5:return Uf(a),null;case 13:if(Pl(a),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(S(340));yu()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return et(ci),null;case 4:return pl(),null;case 10:return kl(a.type),null;case 22:case 23:return Pl(a),Tu(),o!==null&&et(It),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 24:return kl(ct),null;case 25:return null;default:return null}}function _h(o,a){switch(bs(a),a.tag){case 3:kl(ct),pl();break;case 26:case 27:case 5:Uf(a);break;case 4:pl();break;case 13:Pl(a);break;case 19:et(ci);break;case 10:kl(a.type);break;case 22:case 23:Pl(a),Tu(),o!==null&&et(It);break;case 24:kl(ct)}}function Xo(o,a){try{var d=a.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var E=g.next;d=E;do{if((d.tag&o)===o){g=void 0;var k=d.create,B=d.inst;g=k(),B.destroy=g}d=d.next}while(d!==E)}}catch(H){An(a,a.return,H)}}function Yo(o,a,d){try{var g=a.updateQueue,E=g!==null?g.lastEffect:null;if(E!==null){var k=E.next;g=k;do{if((g.tag&o)===o){var B=g.inst,H=B.destroy;if(H!==void 0){B.destroy=void 0,E=a;var ie=d,we=H;try{we()}catch(F){An(E,ie,F)}}}g=g.next}while(g!==k)}}catch(F){An(a,a.return,F)}}function lm(o){var a=o.updateQueue;if(a!==null){var d=o.stateNode;try{Ut(a,d)}catch(g){An(o,o.return,g)}}}function Uh(o,a,d){d.props=Kn(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(g){An(o,a,g)}}function ka(o,a){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(E){An(o,a,E)}}function Wo(o,a){var d=o.ref,g=o.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(E){An(o,a,E)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(E){An(o,a,E)}else d.current=null}function um(o){var a=o.type,d=o.memoizedProps,g=o.stateNode;try{e:switch(a){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(E){An(o,o.return,E)}}function jh(o,a,d){try{var g=o.stateNode;Uv(g,o.type,d,a),g[ir]=a}catch(E){An(o,o.return,E)}}function uf(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&To(o.type)||o.tag===4}function Od(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||uf(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&&To(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 Fs(o,a,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,a?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,a):(a=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,a.appendChild(o),d=d._reactRootContainer,d!=null||a.onclick!==null||(a.onclick=uc));else if(g!==4&&(g===27&&To(o.type)&&(d=o.stateNode,a=null),o=o.child,o!==null))for(Fs(o,a,d),o=o.sibling;o!==null;)Fs(o,a,d),o=o.sibling}function Qo(o,a,d){var g=o.tag;if(g===5||g===6)o=o.stateNode,a?d.insertBefore(o,a):d.appendChild(o);else if(g!==4&&(g===27&&To(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Qo(o,a,d),o=o.sibling;o!==null;)Qo(o,a,d),o=o.sibling}function Da(o){var a=o.stateNode,d=o.memoizedProps;try{for(var g=o.type,E=a.attributes;E.length;)a.removeAttributeNode(E[0]);bi(a,g,d),a[Di]=o,a[ir]=d}catch(k){An(o,o.return,k)}}var wo=!1,In=!1,Bh=!1,Oa=typeof WeakSet=="function"?WeakSet:Set,mi=null;function Rd(o,a){if(o=o.containerInfo,ny=lp,o=od(o),Ts(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 E=g.anchorOffset,k=g.focusNode;g=g.focusOffset;try{d.nodeType,k.nodeType}catch{d=null;break e}var B=0,H=-1,ie=-1,we=0,F=0,Ie=o,Te=null;t:for(;;){for(var de;Ie!==d||E!==0&&Ie.nodeType!==3||(H=B+E),Ie!==k||g!==0&&Ie.nodeType!==3||(ie=B+g),Ie.nodeType===3&&(B+=Ie.nodeValue.length),(de=Ie.firstChild)!==null;)Te=Ie,Ie=de;for(;;){if(Ie===o)break t;if(Te===d&&++we===E&&(H=B),Te===k&&++F===g&&(ie=B),(de=Ie.nextSibling)!==null)break;Ie=Te,Te=Ie.parentNode}Ie=de}d=H===-1||ie===-1?null:{start:H,end:ie}}else d=null}d=d||{start:0,end:0}}else d=null;for(iy={focusedElem:o,selectionRange:d},lp=!1,mi=a;mi!==null;)if(a=mi,o=a.child,(a.subtreeFlags&1024)!==0&&o!==null)o.return=a,mi=o;else for(;mi!==null;){switch(a=mi,k=a.alternate,o=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&k!==null){o=void 0,d=a,E=k.memoizedProps,k=k.memoizedState,g=d.stateNode;try{var bt=Kn(d.type,E,d.elementType===d.type);o=g.getSnapshotBeforeUpdate(bt,k),g.__reactInternalSnapshotBeforeUpdate=o}catch(pt){An(d,d.return,pt)}}break;case 3:if((o&1024)!==0){if(o=a.stateNode.containerInfo,d=o.nodeType,d===9)yf(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":yf(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(S(163))}if(o=a.sibling,o!==null){o.return=a.return,mi=o;break}mi=a.return}}function am(o,a,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:Jo(o,d),g&4&&Xo(5,d);break;case 1:if(Jo(o,d),g&4)if(o=d.stateNode,a===null)try{o.componentDidMount()}catch(B){An(d,d.return,B)}else{var E=Kn(d.type,a.memoizedProps);a=a.memoizedState;try{o.componentDidUpdate(E,a,o.__reactInternalSnapshotBeforeUpdate)}catch(B){An(d,d.return,B)}}g&64&&lm(d),g&512&&ka(d,d.return);break;case 3:if(Jo(o,d),g&64&&(o=d.updateQueue,o!==null)){if(a=null,d.child!==null)switch(d.child.tag){case 27:case 5:a=d.child.stateNode;break;case 1:a=d.child.stateNode}try{Ut(o,a)}catch(B){An(d,d.return,B)}}break;case 27:a===null&&g&4&&Da(d);case 26:case 5:Jo(o,d),a===null&&g&4&&um(d),g&512&&ka(d,d.return);break;case 12:Jo(o,d);break;case 13:Jo(o,d),g&4&&Md(o,d),g&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=Xd.bind(null,d),np(o,d))));break;case 22:if(g=d.memoizedState!==null||wo,!g){a=a!==null&&a.memoizedState!==null||In,E=wo;var k=In;wo=g,(In=a)&&!k?Nu(o,d,(d.subtreeFlags&8772)!==0):Jo(o,d),wo=E,In=k}break;case 30:break;default:Jo(o,d)}}function sm(o){var a=o.alternate;a!==null&&(o.alternate=null,sm(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&Fi(a)),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 Rn=null,Qi=!1;function Ul(o,a,d){for(d=d.child;d!==null;)cm(o,a,d),d=d.sibling}function cm(o,a,d){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(ls,d)}catch{}switch(d.tag){case 26:In||Wo(d,a),Ul(o,a,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:In||Wo(d,a);var g=Rn,E=Qi;To(d.type)&&(Rn=d.stateNode,Qi=!1),Ul(o,a,d),mf(d.stateNode),Rn=g,Qi=E;break;case 5:In||Wo(d,a);case 6:if(g=Rn,E=Qi,Rn=null,Ul(o,a,d),Rn=g,Qi=E,Rn!==null)if(Qi)try{(Rn.nodeType===9?Rn.body:Rn.nodeName==="HTML"?Rn.ownerDocument.body:Rn).removeChild(d.stateNode)}catch(k){An(d,a,k)}else try{Rn.removeChild(d.stateNode)}catch(k){An(d,a,k)}break;case 18:Rn!==null&&(Qi?(o=Rn,Om(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),Af(o)):Om(Rn,d.stateNode));break;case 4:g=Rn,E=Qi,Rn=d.stateNode.containerInfo,Qi=!0,Ul(o,a,d),Rn=g,Qi=E;break;case 0:case 11:case 14:case 15:In||Yo(2,d,a),In||Yo(4,d,a),Ul(o,a,d);break;case 1:In||(Wo(d,a),g=d.stateNode,typeof g.componentWillUnmount=="function"&&Uh(d,a,g)),Ul(o,a,d);break;case 21:Ul(o,a,d);break;case 22:In=(g=In)||d.memoizedState!==null,Ul(o,a,d),In=g;break;default:Ul(o,a,d)}}function Md(o,a){if(a.memoizedState===null&&(o=a.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Af(o)}catch(d){An(a,a.return,d)}}function Nd(o){switch(o.tag){case 13:case 19:var a=o.stateNode;return a===null&&(a=o.stateNode=new Oa),a;case 22:return o=o.stateNode,a=o._retryCache,a===null&&(a=o._retryCache=new Oa),a;default:throw Error(S(435,o.tag))}}function Ru(o,a){var d=Nd(o);a.forEach(function(g){var E=Nv.bind(null,o,g);d.has(g)||(d.add(g),g.then(E,E))})}function vi(o,a){var d=a.deletions;if(d!==null)for(var g=0;g<d.length;g++){var E=d[g],k=o,B=a,H=B;e:for(;H!==null;){switch(H.tag){case 27:if(To(H.type)){Rn=H.stateNode,Qi=!1;break e}break;case 5:Rn=H.stateNode,Qi=!1;break e;case 3:case 4:Rn=H.stateNode.containerInfo,Qi=!0;break e}H=H.return}if(Rn===null)throw Error(S(160));cm(k,B,E),Rn=null,Qi=!1,k=E.alternate,k!==null&&(k.return=null),E.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)jl(a,o),a=a.sibling}var zr=null;function jl(o,a){var d=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:vi(a,o),rn(o),g&4&&(Yo(3,o,o.return),Xo(3,o),Yo(5,o,o.return));break;case 1:vi(a,o),rn(o),g&512&&(In||d===null||Wo(d,d.return)),g&64&&wo&&(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 E=zr;if(vi(a,o),rn(o),g&512&&(In||d===null||Wo(d,d.return)),g&4){var k=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,E=E.ownerDocument||E;t:switch(g){case"title":k=E.getElementsByTagName("title")[0],(!k||k[gr]||k[Di]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=E.createElement(g),E.head.insertBefore(k,E.querySelector("head > title"))),bi(k,g,d),k[Di]=o,Y(k),g=k;break e;case"link":var B=op("link","href",E).get(g+(d.href||""));if(B){for(var H=0;H<B.length;H++)if(k=B[H],k.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&k.getAttribute("rel")===(d.rel==null?null:d.rel)&&k.getAttribute("title")===(d.title==null?null:d.title)&&k.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){B.splice(H,1);break t}}k=E.createElement(g),bi(k,g,d),E.head.appendChild(k);break;case"meta":if(B=op("meta","content",E).get(g+(d.content||""))){for(H=0;H<B.length;H++)if(k=B[H],k.getAttribute("content")===(d.content==null?null:""+d.content)&&k.getAttribute("name")===(d.name==null?null:d.name)&&k.getAttribute("property")===(d.property==null?null:d.property)&&k.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&k.getAttribute("charset")===(d.charSet==null?null:d.charSet)){B.splice(H,1);break t}}k=E.createElement(g),bi(k,g,d),E.head.appendChild(k);break;default:throw Error(S(468,g))}k[Di]=o,Y(k),g=k}o.stateNode=g}else cy(E,o.type,o.stateNode);else o.stateNode=fc(E,g,o.memoizedProps);else k!==g?(k===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):k.count--,g===null?cy(E,o.type,o.stateNode):fc(E,g,o.memoizedProps)):g===null&&o.stateNode!==null&&jh(o,o.memoizedProps,d.memoizedProps)}break;case 27:vi(a,o),rn(o),g&512&&(In||d===null||Wo(d,d.return)),d!==null&&g&4&&jh(o,o.memoizedProps,d.memoizedProps);break;case 5:if(vi(a,o),rn(o),g&512&&(In||d===null||Wo(d,d.return)),o.flags&32){E=o.stateNode;try{ia(E,"")}catch(de){An(o,o.return,de)}}g&4&&o.stateNode!=null&&(E=o.memoizedProps,jh(o,E,d!==null?d.memoizedProps:E)),g&1024&&(Bh=!0);break;case 6:if(vi(a,o),rn(o),g&4){if(o.stateNode===null)throw Error(S(162));g=o.memoizedProps,d=o.stateNode;try{d.nodeValue=g}catch(de){An(o,o.return,de)}}break;case 3:if(Sf=null,E=zr,zr=rp(a.containerInfo),vi(a,o),zr=E,rn(o),g&4&&d!==null&&d.memoizedState.isDehydrated)try{Af(a.containerInfo)}catch(de){An(o,o.return,de)}Bh&&(Bh=!1,qs(o));break;case 4:g=zr,zr=rp(o.stateNode.containerInfo),vi(a,o),rn(o),zr=g;break;case 12:vi(a,o),rn(o);break;case 13:vi(a,o),rn(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Bd=ui()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Ru(o,g)));break;case 22:E=o.memoizedState!==null;var ie=d!==null&&d.memoizedState!==null,we=wo,F=In;if(wo=we||E,In=F||ie,vi(a,o),In=F,wo=we,rn(o),g&8192)e:for(a=o.stateNode,a._visibility=E?a._visibility&-2:a._visibility|1,E&&(d===null||ie||wo||In||Mu(o)),d=null,a=o;;){if(a.tag===5||a.tag===26){if(d===null){ie=d=a;try{if(k=ie.stateNode,E)B=k.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{H=ie.stateNode;var Ie=ie.memoizedProps.style,Te=Ie!=null&&Ie.hasOwnProperty("display")?Ie.display:null;H.style.display=Te==null||typeof Te=="boolean"?"":(""+Te).trim()}}catch(de){An(ie,ie.return,de)}}}else if(a.tag===6){if(d===null){ie=a;try{ie.stateNode.nodeValue=E?"":ie.memoizedProps}catch(de){An(ie,ie.return,de)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===o)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;d===a&&(d=null),a=a.return}d===a&&(d=null),a.sibling.return=a.return,a=a.sibling}g&4&&(g=o.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,Ru(o,d))));break;case 19:vi(a,o),rn(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Ru(o,g)));break;case 30:break;case 21:break;default:vi(a,o),rn(o)}}function rn(o){var a=o.flags;if(a&2){try{for(var d,g=o.return;g!==null;){if(uf(g)){d=g;break}g=g.return}if(d==null)throw Error(S(160));switch(d.tag){case 27:var E=d.stateNode,k=Od(o);Qo(o,k,E);break;case 5:var B=d.stateNode;d.flags&32&&(ia(B,""),d.flags&=-33);var H=Od(o);Qo(o,H,B);break;case 3:case 4:var ie=d.stateNode.containerInfo,we=Od(o);Fs(o,we,ie);break;default:throw Error(S(161))}}catch(F){An(o,o.return,F)}o.flags&=-3}a&4096&&(o.flags&=-4097)}function qs(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var a=o;qs(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),o=o.sibling}}function Jo(o,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)am(o,a.alternate,a),a=a.sibling}function Mu(o){for(o=o.child;o!==null;){var a=o;switch(a.tag){case 0:case 11:case 14:case 15:Yo(4,a,a.return),Mu(a);break;case 1:Wo(a,a.return);var d=a.stateNode;typeof d.componentWillUnmount=="function"&&Uh(a,a.return,d),Mu(a);break;case 27:mf(a.stateNode);case 26:case 5:Wo(a,a.return),Mu(a);break;case 22:a.memoizedState===null&&Mu(a);break;case 30:Mu(a);break;default:Mu(a)}o=o.sibling}}function Nu(o,a,d){for(d=d&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var g=a.alternate,E=o,k=a,B=k.flags;switch(k.tag){case 0:case 11:case 15:Nu(E,k,d),Xo(4,k);break;case 1:if(Nu(E,k,d),g=k,E=g.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(we){An(g,g.return,we)}if(g=k,E=g.updateQueue,E!==null){var H=g.stateNode;try{var ie=E.shared.hiddenCallbacks;if(ie!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ie.length;E++)ph(ie[E],H)}catch(we){An(g,g.return,we)}}d&&B&64&&lm(k),ka(k,k.return);break;case 27:Da(k);case 26:case 5:Nu(E,k,d),d&&g===null&&B&4&&um(k),ka(k,k.return);break;case 12:Nu(E,k,d);break;case 13:Nu(E,k,d),d&&B&4&&Md(E,k);break;case 22:k.memoizedState===null&&Nu(E,k,d),ka(k,k.return);break;case 30:break;default:Nu(E,k,d)}a=a.sibling}}function Vh(o,a){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&go(d))}function Hh(o,a){o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==o&&(a.refCount++,o!=null&&go(o))}function Zo(o,a,d,g){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Kh(o,a,d,g),a=a.sibling}function Kh(o,a,d,g){var E=a.flags;switch(a.tag){case 0:case 11:case 15:Zo(o,a,d,g),E&2048&&Xo(9,a);break;case 1:Zo(o,a,d,g);break;case 3:Zo(o,a,d,g),E&2048&&(o=null,a.alternate!==null&&(o=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==o&&(a.refCount++,o!=null&&go(o)));break;case 12:if(E&2048){Zo(o,a,d,g),o=a.stateNode;try{var k=a.memoizedProps,B=k.id,H=k.onPostCommit;typeof H=="function"&&H(B,a.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(ie){An(a,a.return,ie)}}else Zo(o,a,d,g);break;case 13:Zo(o,a,d,g);break;case 23:break;case 22:k=a.stateNode,B=a.alternate,a.memoizedState!==null?k._visibility&2?Zo(o,a,d,g):zs(o,a):k._visibility&2?Zo(o,a,d,g):(k._visibility|=2,Ra(o,a,d,g,(a.subtreeFlags&10256)!==0)),E&2048&&Vh(B,a);break;case 24:Zo(o,a,d,g),E&2048&&Hh(a.alternate,a);break;default:Zo(o,a,d,g)}}function Ra(o,a,d,g,E){for(E=E&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var k=o,B=a,H=d,ie=g,we=B.flags;switch(B.tag){case 0:case 11:case 15:Ra(k,B,H,ie,E),Xo(8,B);break;case 23:break;case 22:var F=B.stateNode;B.memoizedState!==null?F._visibility&2?Ra(k,B,H,ie,E):zs(k,B):(F._visibility|=2,Ra(k,B,H,ie,E)),E&&we&2048&&Vh(B.alternate,B);break;case 24:Ra(k,B,H,ie,E),E&&we&2048&&Hh(B.alternate,B);break;default:Ra(k,B,H,ie,E)}a=a.sibling}}function zs(o,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var d=o,g=a,E=g.flags;switch(g.tag){case 22:zs(d,g),E&2048&&Vh(g.alternate,g);break;case 24:zs(d,g),E&2048&&Hh(g.alternate,g);break;default:zs(d,g)}a=a.sibling}}var af=8192;function Xs(o){if(o.subtreeFlags&af)for(o=o.child;o!==null;)Pd(o),o=o.sibling}function Pd(o){switch(o.tag){case 26:Xs(o),o.flags&af&&o.memoizedState!==null&&Xv(zr,o.memoizedState,o.memoizedProps);break;case 5:Xs(o);break;case 3:case 4:var a=zr;zr=rp(o.stateNode.containerInfo),Xs(o),zr=a;break;case 22:o.memoizedState===null&&(a=o.alternate,a!==null&&a.memoizedState!==null?(a=af,af=16777216,Xs(o),af=a):Xs(o));break;default:Xs(o)}}function fm(o){var a=o.alternate;if(a!==null&&(o=a.child,o!==null)){a.child=null;do a=o.sibling,o.sibling=null,o=a;while(o!==null)}}function Ma(o){var a=o.deletions;if((o.flags&16)!==0){if(a!==null)for(var d=0;d<a.length;d++){var g=a[d];mi=g,qe(g,o)}fm(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Ld(o),o=o.sibling}function Ld(o){switch(o.tag){case 0:case 11:case 15:Ma(o),o.flags&2048&&Yo(9,o,o.return);break;case 3:Ma(o);break;case 12:Ma(o);break;case 22:var a=o.stateNode;o.memoizedState!==null&&a._visibility&2&&(o.return===null||o.return.tag!==13)?(a._visibility&=-3,sf(o)):Ma(o);break;default:Ma(o)}}function sf(o){var a=o.deletions;if((o.flags&16)!==0){if(a!==null)for(var d=0;d<a.length;d++){var g=a[d];mi=g,qe(g,o)}fm(o)}for(o=o.child;o!==null;){switch(a=o,a.tag){case 0:case 11:case 15:Yo(8,a,a.return),sf(a);break;case 22:d=a.stateNode,d._visibility&2&&(d._visibility&=-3,sf(a));break;default:sf(a)}o=o.sibling}}function qe(o,a){for(;mi!==null;){var d=mi;switch(d.tag){case 0:case 11:case 15:Yo(8,d,a);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:go(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,mi=g;else e:for(d=o;mi!==null;){g=mi;var E=g.sibling,k=g.return;if(sm(g),g===d){mi=null;break e}if(E!==null){E.return=k,mi=E;break e}mi=k}}}var Gh={getCacheForType:function(o){var a=si(ct),d=a.data.get(o);return d===void 0&&(d=o(),a.data.set(o,d)),d}},cf=typeof WeakMap=="function"?WeakMap:Map,Sn=0,En=null,Ft=null,nn=0,on=0,Dr=null,Bl=!1,Pu=!1,_d=!1,$o=0,_n=0,Vl=0,Lu=0,Ud=0,Or=0,Na=0,Ys=null,Ji=null,jd=!1,Bd=0,ff=1/0,At=null,Si=null,ii=0,ri=null,Jt=null,Ws=0,Fh=0,Pa=null,Vd=null,La=0,Hd=null;function Ui(){if((Sn&2)!==0&&nn!==0)return nn&-nn;if(xe.T!==null){var o=Sa;return o!==0?o:Wd()}return mg()}function dm(){Or===0&&(Or=(nn&536870912)===0||$t?Vp():536870912);var o=Fr.current;return o!==null&&(o.flags|=32),Or}function Rr(o,a,d){(o===En&&(on===2||on===9)||o.cancelPendingCommit!==null)&&(Hl(o,0),Xr(o,nn,Or,!1)),$l(o,d),((Sn&2)===0||o!==En)&&(o===En&&((Sn&2)===0&&(Lu|=d),_n===4&&Xr(o,nn,Or,!1)),el(o))}function qh(o,a,d){if((Sn&6)!==0)throw Error(S(327));var g=!d&&(a&124)===0&&(a&o.expiredLanes)===0||Ic(o,a),E=g?ym(o,a):Mr(o,a,!0),k=g;do{if(E===0){Pu&&!g&&Xr(o,a,0,!1);break}else{if(d=o.current.alternate,k&&!Kd(d)){E=Mr(o,a,!1),k=!1;continue}if(E===2){if(k=a,o.errorRecoveryDisabledLanes&k)var B=0;else B=o.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){a=B;e:{var H=o;E=Ys;var ie=H.current.memoizedState.isDehydrated;if(ie&&(Hl(H,B).flags|=256),B=Mr(H,B,!1),B!==2){if(_d&&!ie){H.errorRecoveryDisabledLanes|=k,Lu|=k,E=4;break e}k=Ji,Ji=E,k!==null&&(Ji===null?Ji=k:Ji.push.apply(Ji,k))}E=B}if(k=!1,E!==2)continue}}if(E===1){Hl(o,0),Xr(o,a,0,!0);break}e:{switch(g=o,k=E,k){case 0:case 1:throw Error(S(345));case 4:if((a&4194048)!==a)break;case 6:Xr(g,a,Or,!Bl);break e;case 2:Ji=null;break;case 3:case 5:break;default:throw Error(S(329))}if((a&62914560)===a&&(E=Bd+300-ui(),10<E)){if(Xr(g,a,Or,!Bl),Et(g,0,!0)!==0)break e;g.timeoutHandle=Ka(pm.bind(null,g,d,Ji,At,jd,a,Or,Lu,Na,Bl,k,2,-0,0),E);break e}pm(g,d,Ji,At,jd,a,Or,Lu,Na,Bl,k,0,-0,0)}}break}while(!0);el(o)}function pm(o,a,d,g,E,k,B,H,ie,we,F,Ie,Te,de){if(o.timeoutHandle=-1,Ie=a.subtreeFlags,(Ie&8192||(Ie&16785408)===16785408)&&(Fa={stylesheets:null,count:0,unsuspend:Lm},Pd(a),Ie=_m(),Ie!==null)){o.cancelPendingCommit=Ie(qd.bind(null,o,a,k,d,g,E,B,H,ie,F,1,Te,de)),Xr(o,k,B,!we);return}qd(o,a,k,d,g,E,B,H,ie)}function Kd(o){for(var a=o;;){var d=a.tag;if((d===0||d===11||d===15)&&a.flags&16384&&(d=a.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var E=d[g],k=E.getSnapshot;E=E.value;try{if(!Xi(k(),E))return!1}catch{return!1}}if(d=a.child,a.subtreeFlags&16384&&d!==null)d.return=a,a=d;else{if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Xr(o,a,d,g){a&=~Ud,a&=~Lu,o.suspendedLanes|=a,o.pingedLanes&=~a,g&&(o.warmLanes|=a),g=o.expirationTimes;for(var E=a;0<E;){var k=31-nr(E),B=1<<k;g[k]=-1,E&=~B}d!==0&&Hf(o,d,a)}function Qs(){return(Sn&6)===0?(pf(0),!1):!0}function zh(){if(Ft!==null){if(on===0)var o=Ft.return;else o=Ft,Uo=Yt=null,hd(o),kr=null,Bs=0,o=Ft;for(;o!==null;)_h(o.alternate,o),o=o.return;Ft=null}}function Hl(o,a){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,Dm(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),zh(),En=o,Ft=d=Cl(o.current,null),nn=a,on=0,Dr=null,Bl=!1,Pu=Ic(o,a),_d=!1,Na=Or=Ud=Lu=Vl=_n=0,Ji=Ys=null,jd=!1,(a&8)!==0&&(a|=a&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=a;0<g;){var E=31-nr(g),k=1<<E;a|=o[E],g&=~k}return $o=a,As(),d}function hm(o,a){Lt=null,xe.H=Zc,a===Cr||a===bn?(a=Hc(),on=3):a===sh?(a=Hc(),on=4):on=a===zo?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Dr=a,Ft===null&&(_n=1,tf(o,Ni(a,o.current)))}function Js(){var o=xe.H;return xe.H=Zc,o===null?Zc:o}function Xh(){var o=xe.A;return xe.A=Gh,o}function Gd(){_n=4,Bl||(nn&4194048)!==nn&&Fr.current!==null||(Pu=!0),(Vl&134217727)===0&&(Lu&134217727)===0||En===null||Xr(En,nn,Or,!1)}function Mr(o,a,d){var g=Sn;Sn|=2;var E=Js(),k=Xh();(En!==o||nn!==a)&&(At=null,Hl(o,a)),a=!1;var B=_n;e:do try{if(on!==0&&Ft!==null){var H=Ft,ie=Dr;switch(on){case 8:zh(),B=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(a=!0);var we=on;if(on=0,Dr=null,_a(o,H,ie,we),d&&Pu){B=0;break e}break;default:we=on,on=0,Dr=null,_a(o,H,ie,we)}}Yh(),B=_n;break}catch(F){hm(o,F)}while(!0);return a&&o.shellSuspendCounter++,Uo=Yt=null,Sn=g,xe.H=E,xe.A=k,Ft===null&&(En=null,nn=0,As()),B}function Yh(){for(;Ft!==null;)Zs(Ft)}function ym(o,a){var d=Sn;Sn|=2;var g=Js(),E=Xh();En!==o||nn!==a?(At=null,ff=ui()+500,Hl(o,a)):Pu=Ic(o,a);e:do try{if(on!==0&&Ft!==null){a=Ft;var k=Dr;t:switch(on){case 1:on=0,Dr=null,_a(o,a,k,1);break;case 2:case 9:if(fh(k)){on=0,Dr=null,Fd(a);break}a=function(){on!==2&&on!==9||En!==o||(on=7),el(o)},k.then(a,a);break e;case 3:on=7;break e;case 4:on=5;break e;case 7:fh(k)?(on=0,Dr=null,Fd(a)):(on=0,Dr=null,_a(o,a,k,7));break;case 5:var B=null;switch(Ft.tag){case 26:B=Ft.memoizedState;case 5:case 27:var H=Ft;if(!B||fy(B)){on=0,Dr=null;var ie=H.sibling;if(ie!==null)Ft=ie;else{var we=H.return;we!==null?(Ft=we,$s(we)):Ft=null}break t}}on=0,Dr=null,_a(o,a,k,5);break;case 6:on=0,Dr=null,_a(o,a,k,6);break;case 8:zh(),_n=6;break e;default:throw Error(S(462))}}Mv();break}catch(F){hm(o,F)}while(!0);return Uo=Yt=null,xe.H=g,xe.A=E,Sn=d,Ft!==null?0:(En=null,nn=0,As(),_n)}function Mv(){for(;Ft!==null&&!bc();)Zs(Ft)}function Zs(o){var a=Nt(o.alternate,o,$o);o.memoizedProps=o.pendingProps,a===null?$s(o):Ft=a}function Fd(o){var a=o,d=a.alternate;switch(a.tag){case 15:case 0:a=Mh(d,a,a.pendingProps,a.type,void 0,nn);break;case 11:a=Mh(d,a,a.pendingProps,a.type.render,a.ref,nn);break;case 5:hd(a);default:_h(d,a),a=Ft=_c(a,$o),a=Nt(d,a,$o)}o.memoizedProps=o.pendingProps,a===null?$s(o):Ft=a}function _a(o,a,d,g){Uo=Yt=null,hd(a),kr=null,Bs=0;var E=a.return;try{if(Dv(o,E,a,d,nn)){_n=1,tf(o,Ni(d,o.current)),Ft=null;return}}catch(k){if(E!==null)throw Ft=E,k;_n=1,tf(o,Ni(d,o.current)),Ft=null;return}a.flags&32768?($t||g===1?o=!0:Pu||(nn&536870912)!==0?o=!1:(Bl=o=!0,(g===2||g===9||g===3||g===6)&&(g=Fr.current,g!==null&&g.tag===13&&(g.flags|=16384))),gm(a,o)):$s(a)}function $s(o){var a=o;do{if((a.flags&32768)!==0){gm(a,Bl);return}o=a.return;var d=Ov(a.alternate,a,$o);if(d!==null){Ft=d;return}if(a=a.sibling,a!==null){Ft=a;return}Ft=a=o}while(a!==null);_n===0&&(_n=5)}function gm(o,a){do{var d=Rv(o.alternate,o);if(d!==null){d.flags&=32767,Ft=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!a&&(o=o.sibling,o!==null)){Ft=o;return}Ft=o=d}while(o!==null);_n=6,Ft=null}function qd(o,a,d,g,E,k,B,H,ie){o.cancelPendingCommit=null;do df();while(ii!==0);if((Sn&6)!==0)throw Error(S(327));if(a!==null){if(a===o.current)throw Error(S(177));if(k=a.lanes|a.childLanes,k|=fa,Vf(o,d,k,B,H,ie),o===En&&(Ft=En=null,nn=0),Jt=a,ri=o,Ws=d,Fh=k,Pa=E,Vd=g,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,Pv(jp,function(){return Sm(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||g){g=xe.T,xe.T=null,E=Ue.p,Ue.p=2,B=Sn,Sn|=4;try{Rd(o,a,d)}finally{Sn=B,Ue.p=E,xe.T=g}}ii=1,mm(),vm(),zd()}}function mm(){if(ii===1){ii=0;var o=ri,a=Jt,d=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||d){d=xe.T,xe.T=null;var g=Ue.p;Ue.p=2;var E=Sn;Sn|=4;try{jl(a,o);var k=iy,B=od(o.containerInfo),H=k.focusedElem,ie=k.selectionRange;if(B!==H&&H&&H.ownerDocument&&Pc(H.ownerDocument.documentElement,H)){if(ie!==null&&Ts(H)){var we=ie.start,F=ie.end;if(F===void 0&&(F=we),"selectionStart"in H)H.selectionStart=we,H.selectionEnd=Math.min(F,H.value.length);else{var Ie=H.ownerDocument||document,Te=Ie&&Ie.defaultView||window;if(Te.getSelection){var de=Te.getSelection(),bt=H.textContent.length,pt=Math.min(ie.start,bt),yn=ie.end===void 0?pt:Math.min(ie.end,bt);!de.extend&&pt>yn&&(B=yn,yn=pt,pt=B);var ye=xn(H,pt),se=xn(H,yn);if(ye&&se&&(de.rangeCount!==1||de.anchorNode!==ye.node||de.anchorOffset!==ye.offset||de.focusNode!==se.node||de.focusOffset!==se.offset)){var ve=Ie.createRange();ve.setStart(ye.node,ye.offset),de.removeAllRanges(),pt>yn?(de.addRange(ve),de.extend(se.node,se.offset)):(ve.setEnd(se.node,se.offset),de.addRange(ve))}}}}for(Ie=[],de=H;de=de.parentNode;)de.nodeType===1&&Ie.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<Ie.length;H++){var be=Ie[H];be.element.scrollLeft=be.left,be.element.scrollTop=be.top}}lp=!!ny,iy=ny=null}finally{Sn=E,Ue.p=g,xe.T=d}}o.current=a,ii=2}}function vm(){if(ii===2){ii=0;var o=ri,a=Jt,d=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||d){d=xe.T,xe.T=null;var g=Ue.p;Ue.p=2;var E=Sn;Sn|=4;try{am(o,a.alternate,a)}finally{Sn=E,Ue.p=g,xe.T=d}}ii=3}}function zd(){if(ii===4||ii===3){ii=0,Tv();var o=ri,a=Jt,d=Ws,g=Vd;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?ii=5:(ii=0,Jt=ri=null,ec(o,o.pendingLanes));var E=o.pendingLanes;if(E===0&&(Si=null),Qu(d),a=a.stateNode,yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(ls,a,void 0,(a.current.flags&128)===128)}catch{}if(g!==null){a=xe.T,E=Ue.p,Ue.p=2,xe.T=null;try{for(var k=o.onRecoverableError,B=0;B<g.length;B++){var H=g[B];k(H.value,{componentStack:H.stack})}}finally{xe.T=a,Ue.p=E}}(Ws&3)!==0&&df(),el(o),E=o.pendingLanes,(d&4194090)!==0&&(E&42)!==0?o===Hd?La++:(La=0,Hd=o):La=0,pf(0)}}function ec(o,a){(o.pooledCacheLanes&=a)===0&&(a=o.pooledCache,a!=null&&(o.pooledCache=null,go(a)))}function df(o){return mm(),vm(),zd(),Sm()}function Sm(){if(ii!==5)return!1;var o=ri,a=Fh;Fh=0;var d=Qu(Ws),g=xe.T,E=Ue.p;try{Ue.p=32>d?32:d,xe.T=null,d=Pa,Pa=null;var k=ri,B=Ws;if(ii=0,Jt=ri=null,Ws=0,(Sn&6)!==0)throw Error(S(331));var H=Sn;if(Sn|=4,Ld(k.current),Kh(k,k.current,B,d),Sn=H,pf(0,!1),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(ls,k)}catch{}return!0}finally{Ue.p=E,xe.T=g,ec(o,a)}}function wm(o,a,d){a=Ni(d,a),a=nf(o.stateNode,a,2),o=Ho(o,a,2),o!==null&&($l(o,2),el(o))}function An(o,a,d){if(o.tag===3)wm(o,o,d);else for(;a!==null;){if(a.tag===3){wm(a,o,d);break}else if(a.tag===1){var g=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Si===null||!Si.has(g))){o=Ni(d,o),d=Id(2),g=Ho(a,d,2),g!==null&&(Rh(d,g,a,o),$l(g,2),el(g));break}}a=a.return}}function Wh(o,a,d){var g=o.pingCache;if(g===null){g=o.pingCache=new cf;var E=new Set;g.set(a,E)}else E=g.get(a),E===void 0&&(E=new Set,g.set(a,E));E.has(d)||(_d=!0,E.add(d),o=Tm.bind(null,o,a,d),a.then(o,o))}function Tm(o,a,d){var g=o.pingCache;g!==null&&g.delete(a),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,En===o&&(nn&d)===d&&(_n===4||_n===3&&(nn&62914560)===nn&&300>ui()-Bd?(Sn&2)===0&&Hl(o,0):Ud|=d,Na===nn&&(Na=0)),el(o)}function Qh(o,a){a===0&&(a=gg()),o=Al(o,a),o!==null&&($l(o,a),el(o))}function Xd(o){var a=o.memoizedState,d=0;a!==null&&(d=a.retryLane),Qh(o,d)}function Nv(o,a){var d=0;switch(o.tag){case 13:var g=o.stateNode,E=o.memoizedState;E!==null&&(d=E.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(S(314))}g!==null&&g.delete(a),Qh(o,d)}function Pv(o,a){return Ql(o,a)}var Kl=null,Ua=null,ja=!1,Yd=!1,tc=!1,Gl=0;function el(o){o!==Ua&&o.next===null&&(Ua===null?Kl=Ua=o:Ua=Ua.next=o),Yd=!0,ja||(ja=!0,_v())}function pf(o,a){if(!tc&&Yd){tc=!0;do for(var d=!1,g=Kl;g!==null;){if(o!==0){var E=g.pendingLanes;if(E===0)var k=0;else{var B=g.suspendedLanes,H=g.pingedLanes;k=(1<<31-nr(42|o)+1)-1,k&=E&~(B&~H),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(d=!0,Am(g,k))}else k=nn,k=Et(g,g===En?k:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(k&3)===0||Ic(g,k)||(d=!0,Am(g,k));g=g.next}while(d);tc=!1}}function Lv(){xm()}function xm(){Yd=ja=!1;var o=0;Gl!==0&&(ep()&&(o=Gl),Gl=0);for(var a=ui(),d=null,g=Kl;g!==null;){var E=g.next,k=Em(g,a);k===0?(g.next=null,d===null?Kl=E:d.next=E,E===null&&(Ua=d)):(d=g,(o!==0||(k&3)!==0)&&(Yd=!0)),g=E}pf(o)}function Em(o,a){for(var d=o.suspendedLanes,g=o.pingedLanes,E=o.expirationTimes,k=o.pendingLanes&-62914561;0<k;){var B=31-nr(k),H=1<<B,ie=E[B];ie===-1?((H&d)===0||(H&g)!==0)&&(E[B]=xv(H,a)):ie<=a&&(o.expiredLanes|=H),k&=~H}if(a=En,d=nn,d=Et(o,o===a?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,d===0||o===a&&(on===2||on===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&os(g),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||Ic(o,d)){if(a=d&-d,a===o.callbackPriority)return a;switch(g!==null&&os(g),Qu(d)){case 2:case 8:d=yg;break;case 32:d=jp;break;case 268435456:d=Bp;break;default:d=jp}return g=Jh.bind(null,o),d=Ql(d,g),o.callbackPriority=a,o.callbackNode=d,a}return g!==null&&g!==null&&os(g),o.callbackPriority=2,o.callbackNode=null,2}function Jh(o,a){if(ii!==0&&ii!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(df()&&o.callbackNode!==d)return null;var g=nn;return g=Et(o,o===En?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(qh(o,g,a),Em(o,ui()),o.callbackNode!=null&&o.callbackNode===d?Jh.bind(null,o):null)}function Am(o,a){if(df())return null;qh(o,a,!0)}function _v(){jv(function(){(Sn&6)!==0?Ql(Jl,Lv):xm()})}function Wd(){return Gl===0&&(Gl=Vp()),Gl}function Qd(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Dc(""+o)}function Jd(o,a){var d=a.ownerDocument.createElement("input");return d.name=a.name,d.value=a.value,o.id&&d.setAttribute("form",o.id),a.parentNode.insertBefore(d,a),o=new FormData(o),d.parentNode.removeChild(d),o}function Zh(o,a,d,g,E){if(a==="submit"&&d&&d.stateNode===E){var k=Qd((E[ir]||null).action),B=g.submitter;B&&(a=(a=B[ir]||null)?Qd(a.formAction):B.getAttribute("formAction"),a!==null&&(k=a,B=null));var H=new au("action","action",null,g,E);o.push({event:H,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Gl!==0){var ie=B?Jd(E,B):new FormData(E);xd(d,{pending:!0,data:ie,method:E.method,action:k},null,ie)}}else typeof k=="function"&&(H.preventDefault(),ie=B?Jd(E,B):new FormData(E),xd(d,{pending:!0,data:ie,method:E.method,action:k},k,ie))},currentTarget:E}]})}}for(var Ba=0;Ba<th.length;Ba++){var nc=th[Ba],$h=nc.toLowerCase(),Ci=nc[0].toUpperCase()+nc.slice(1);po($h,"on"+Ci)}po(Dg,"onAnimationEnd"),po(Og,"onAnimationIteration"),po(eh,"onAnimationStart"),po("dblclick","onDoubleClick"),po("focusin","onFocus"),po("focusout","onBlur"),po(Rg,"onTransitionRun"),po(Cv,"onTransitionStart"),po(Lc,"onTransitionCancel"),po(Es,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),rr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rr("onBeforeInput",["compositionend","keypress","textInput","paste"]),rr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="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(" "),ic=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Nr));function Zd(o,a){a=(a&4)!==0;for(var d=0;d<o.length;d++){var g=o[d],E=g.event;g=g.listeners;e:{var k=void 0;if(a)for(var B=g.length-1;0<=B;B--){var H=g[B],ie=H.instance,we=H.currentTarget;if(H=H.listener,ie!==k&&E.isPropagationStopped())break e;k=H,E.currentTarget=we;try{k(E)}catch(F){Iu(F)}E.currentTarget=null,k=ie}else for(B=0;B<g.length;B++){if(H=g[B],ie=H.instance,we=H.currentTarget,H=H.listener,ie!==k&&E.isPropagationStopped())break e;k=H,E.currentTarget=we;try{k(E)}catch(F){Iu(F)}E.currentTarget=null,k=ie}}}}function Ht(o,a){var d=a[iu];d===void 0&&(d=a[iu]=new Set);var g=o+"__bubble";d.has(g)||(Cm(a,o,2,!1),d.add(g))}function ey(o,a,d){var g=0;a&&(g|=4),Cm(d,o,g,a)}var Va="_reactListening"+Math.random().toString(36).slice(2);function hf(o){if(!o[Va]){o[Va]=!0,ou.forEach(function(d){d!=="selectionchange"&&(ic.has(d)||ey(d,!1,o),ey(d,!0,o))});var a=o.nodeType===9?o:o.ownerDocument;a===null||a[Va]||(a[Va]=!0,ey("selectionchange",!1,a))}}function Cm(o,a,d,g){switch(Bm(a)){case 2:var E=Yv;break;case 8:E=hy;break;default:E=yy}d=E.bind(null,a,d,o),E=void 0,!lu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(E=!0),g?E!==void 0?o.addEventListener(a,d,{capture:!0,passive:E}):o.addEventListener(a,d,!0):E!==void 0?o.addEventListener(a,d,{passive:E}):o.addEventListener(a,d,!1)}function rc(o,a,d,g,E){var k=g;if((a&1)===0&&(a&2)===0&&g!==null)e:for(;;){if(g===null)return;var B=g.tag;if(B===3||B===4){var H=g.stateNode.containerInfo;if(H===E)break;if(B===4)for(B=g.return;B!==null;){var ie=B.tag;if((ie===3||ie===4)&&B.stateNode.containerInfo===E)return;B=B.return}for(;H!==null;){if(B=Ge(H),B===null)return;if(ie=B.tag,ie===5||ie===6||ie===26||ie===27){g=k=B;continue e}H=H.parentNode}}g=g.return}Sr(function(){var we=k,F=yl(d),Ie=[];e:{var Te=dt.get(o);if(Te!==void 0){var de=au,bt=o;switch(o){case"keypress":if(Qf(d)===0)break e;case"keydown":case"keyup":de=Ev;break;case"focusin":bt="focus",de=ur;break;case"focusout":bt="blur",de=ur;break;case"beforeblur":case"afterblur":de=ur;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":de=Cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=ao;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=Eg;break;case Dg:case Og:case eh:de=ml;break;case Es:de=Xp;break;case"scroll":case"scrollend":de=Fp;break;case"wheel":de=Wp;break;case"copy":case"cut":case"paste":de=No;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=zp;break;case"toggle":case"beforetoggle":de=Cg}var pt=(a&4)!==0,yn=!pt&&(o==="scroll"||o==="scrollend"),ye=pt?Te!==null?Te+"Capture":null:Te;pt=[];for(var se=we,ve;se!==null;){var be=se;if(ve=be.stateNode,be=be.tag,be!==5&&be!==26&&be!==27||ve===null||ye===null||(be=ra(se,ye),be!=null&&pt.push(_u(se,be,ve))),yn)break;se=se.return}0<pt.length&&(Te=new de(Te,bt,null,d,F),Ie.push({event:Te,listeners:pt}))}}if((a&7)===0){e:{if(Te=o==="mouseover"||o==="pointerover",de=o==="mouseout"||o==="pointerout",Te&&d!==Oc&&(bt=d.relatedTarget||d.fromElement)&&(Ge(bt)||bt[as]))break e;if((de||Te)&&(Te=F.window===F?F:(Te=F.ownerDocument)?Te.defaultView||Te.parentWindow:window,de?(bt=d.relatedTarget||d.toElement,de=we,bt=bt?Ge(bt):null,bt!==null&&(yn=U(bt),pt=bt.tag,bt!==yn||pt!==5&&pt!==27&&pt!==6)&&(bt=null)):(de=null,bt=we),de!==bt)){if(pt=Cn,be="onMouseLeave",ye="onMouseEnter",se="mouse",(o==="pointerout"||o==="pointerover")&&(pt=zp,be="onPointerLeave",ye="onPointerEnter",se="pointer"),yn=de==null?Te:Zn(de),ve=bt==null?Te:Zn(bt),Te=new pt(be,se+"leave",de,d,F),Te.target=yn,Te.relatedTarget=ve,be=null,Ge(F)===we&&(pt=new pt(ye,se+"enter",bt,d,F),pt.target=ve,pt.relatedTarget=yn,be=pt),yn=be,de&&bt)t:{for(pt=de,ye=bt,se=0,ve=pt;ve;ve=Fl(ve))se++;for(ve=0,be=ye;be;be=Fl(be))ve++;for(;0<se-ve;)pt=Fl(pt),se--;for(;0<ve-se;)ye=Fl(ye),ve--;for(;se--;){if(pt===ye||ye!==null&&pt===ye.alternate)break t;pt=Fl(pt),ye=Fl(ye)}pt=null}else pt=null;de!==null&&Ha(Ie,Te,de,pt,!1),bt!==null&&yn!==null&&Ha(Ie,yn,bt,pt,!0)}}e:{if(Te=we?Zn(we):window,de=Te.nodeName&&Te.nodeName.toLowerCase(),de==="select"||de==="input"&&Te.type==="file")var rt=sa;else if(ms(Te))if(nd)rt=fu;else{rt=Ss;var qt=Tl}else de=Te.nodeName,!de||de.toLowerCase()!=="input"||Te.type!=="checkbox"&&Te.type!=="radio"?we&&Yf(we.elementType)&&(rt=sa):rt=Jp;if(rt&&(rt=rt(o,we))){su(Ie,rt,d,F);break e}qt&&qt(o,Te,we),o==="focusout"&&we&&Te.type==="number"&&we.memoizedProps.value!=null&&zf(Te,"number",Te.value)}switch(qt=we?Zn(we):window,o){case"focusin":(ms(qt)||qt.contentEditable==="true")&&(xr=qt,Mi=we,xi=null);break;case"focusout":xi=Mi=xr=null;break;case"mousedown":ca=!0;break;case"contextmenu":case"mouseup":case"dragend":ca=!1,$p(Ie,d,F);break;case"selectionchange":if(Ti)break;case"keydown":case"keyup":$p(Ie,d,F)}var at;if(hs)e:{switch(o){case"compositionstart":var Tt="onCompositionStart";break e;case"compositionend":Tt="onCompositionEnd";break e;case"compositionupdate":Tt="onCompositionUpdate";break e}Tt=void 0}else Po?co(o,d)&&(Tt="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Tt="onCompositionStart");Tt&&(Qp&&d.locale!=="ko"&&(Po||Tt!=="onCompositionStart"?Tt==="onCompositionEnd"&&Po&&(at=oa()):(lr=F,gl="value"in lr?lr.value:lr.textContent,Po=!0)),qt=oc(we,Tt),0<qt.length&&(Tt=new so(Tt,o,null,d,F),Ie.push({event:Tt,listeners:qt}),at?Tt.data=at:(at=td(d),at!==null&&(Tt.data=at)))),(at=Av?bg(o,d):Mc(o,d))&&(Tt=oc(we,"onBeforeInput"),0<Tt.length&&(qt=new so("onBeforeInput","beforeinput",null,d,F),Ie.push({event:qt,listeners:Tt}),qt.data=at)),Zh(Ie,o,we,d,F)}Zd(Ie,a)})}function _u(o,a,d){return{instance:o,listener:a,currentTarget:d}}function oc(o,a){for(var d=a+"Capture",g=[];o!==null;){var E=o,k=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||k===null||(E=ra(o,d),E!=null&&g.unshift(_u(o,E,k)),E=ra(o,a),E!=null&&g.push(_u(o,E,k))),o.tag===3)return g;o=o.return}return[]}function Fl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function Ha(o,a,d,g,E){for(var k=a._reactName,B=[];d!==null&&d!==g;){var H=d,ie=H.alternate,we=H.stateNode;if(H=H.tag,ie!==null&&ie===g)break;H!==5&&H!==26&&H!==27||we===null||(ie=we,E?(we=ra(d,k),we!=null&&B.unshift(_u(d,we,ie))):E||(we=ra(d,k),we!=null&&B.push(_u(d,we,ie)))),d=d.return}B.length!==0&&o.push({event:a,listeners:B})}var bm=/\r\n?/g,ji=/\u0000|\uFFFD/g;function ty(o){return(typeof o=="string"?o:""+o).replace(bm,`
`).replace(ji,"")}function lc(o,a){return a=ty(a),ty(o)===a}function uc(){}function pn(o,a,d,g,E,k){switch(d){case"children":typeof g=="string"?a==="body"||a==="textarea"&&g===""||ia(o,g):(typeof g=="number"||typeof g=="bigint")&&a!=="body"&&ia(o,""+g);break;case"className":Bn(o,"class",g);break;case"tabIndex":Bn(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":Bn(o,d,g);break;case"style":Xf(o,g,k);break;case"data":if(a!=="object"){Bn(o,"data",g);break}case"src":case"href":if(g===""&&(a!=="a"||d!=="href")){o.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=Dc(""+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 k=="function"&&(d==="formAction"?(a!=="input"&&pn(o,a,"name",E.name,E,null),pn(o,a,"formEncType",E.formEncType,E,null),pn(o,a,"formMethod",E.formMethod,E,null),pn(o,a,"formTarget",E.formTarget,E,null)):(pn(o,a,"encType",E.encType,E,null),pn(o,a,"method",E.method,E,null),pn(o,a,"target",E.target,E,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(d);break}g=Dc(""+g),o.setAttribute(d,g);break;case"onClick":g!=null&&(o.onclick=uc);break;case"onScroll":g!=null&&Ht("scroll",o);break;case"onScrollEnd":g!=null&&Ht("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(S(61));if(d=g.__html,d!=null){if(E.children!=null)throw Error(S(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=Dc(""+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":Ht("beforetoggle",o),Ht("toggle",o),kc(o,"popover",g);break;case"xlinkActuate":Vr(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":Vr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":Vr(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":Vr(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":Vr(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":Vr(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":Vr(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":Vr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":Vr(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":kc(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=lo.get(d)||d,kc(o,d,g))}}function ac(o,a,d,g,E,k){switch(d){case"style":Xf(o,g,k);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(S(61));if(d=g.__html,d!=null){if(E.children!=null)throw Error(S(60));o.innerHTML=d}}break;case"children":typeof g=="string"?ia(o,g):(typeof g=="number"||typeof g=="bigint")&&ia(o,""+g);break;case"onScroll":g!=null&&Ht("scroll",o);break;case"onScrollEnd":g!=null&&Ht("scrollend",o);break;case"onClick":g!=null&&(o.onclick=uc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ln.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),a=d.slice(2,E?d.length-7:void 0),k=o[ir]||null,k=k!=null?k[d]:null,typeof k=="function"&&o.removeEventListener(a,k,E),typeof g=="function")){typeof k!="function"&&k!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(a,g,E);break e}d in o?o[d]=g:g===!0?o.setAttribute(d,""):kc(o,d,g)}}}function bi(o,a,d){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ht("error",o),Ht("load",o);var g=!1,E=!1,k;for(k in d)if(d.hasOwnProperty(k)){var B=d[k];if(B!=null)switch(k){case"src":g=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(S(137,a));default:pn(o,a,k,B,d,null)}}E&&pn(o,a,"srcSet",d.srcSet,d,null),g&&pn(o,a,"src",d.src,d,null);return;case"input":Ht("invalid",o);var H=k=B=E=null,ie=null,we=null;for(g in d)if(d.hasOwnProperty(g)){var F=d[g];if(F!=null)switch(g){case"name":E=F;break;case"type":B=F;break;case"checked":ie=F;break;case"defaultChecked":we=F;break;case"value":k=F;break;case"defaultValue":H=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(S(137,a));break;default:pn(o,a,g,F,d,null)}}qf(o,k,H,ie,we,B,E,!1),ss(o);return;case"select":Ht("invalid",o),g=B=k=null;for(E in d)if(d.hasOwnProperty(E)&&(H=d[E],H!=null))switch(E){case"value":k=H;break;case"defaultValue":B=H;break;case"multiple":g=H;default:pn(o,a,E,H,d,null)}a=k,d=B,o.multiple=!!g,a!=null?ta(o,!!g,a,!1):d!=null&&ta(o,!!g,d,!0);return;case"textarea":Ht("invalid",o),k=E=g=null;for(B in d)if(d.hasOwnProperty(B)&&(H=d[B],H!=null))switch(B){case"value":g=H;break;case"defaultValue":E=H;break;case"children":k=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(S(91));break;default:pn(o,a,B,H,d,null)}na(o,g,E,k),ss(o);return;case"option":for(ie in d)if(d.hasOwnProperty(ie)&&(g=d[ie],g!=null))switch(ie){case"selected":o.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:pn(o,a,ie,g,d,null)}return;case"dialog":Ht("beforetoggle",o),Ht("toggle",o),Ht("cancel",o),Ht("close",o);break;case"iframe":case"object":Ht("load",o);break;case"video":case"audio":for(g=0;g<Nr.length;g++)Ht(Nr[g],o);break;case"image":Ht("error",o),Ht("load",o);break;case"details":Ht("toggle",o);break;case"embed":case"source":case"link":Ht("error",o),Ht("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(we in d)if(d.hasOwnProperty(we)&&(g=d[we],g!=null))switch(we){case"children":case"dangerouslySetInnerHTML":throw Error(S(137,a));default:pn(o,a,we,g,d,null)}return;default:if(Yf(a)){for(F in d)d.hasOwnProperty(F)&&(g=d[F],g!==void 0&&ac(o,a,F,g,d,void 0));return}}for(H in d)d.hasOwnProperty(H)&&(g=d[H],g!=null&&pn(o,a,H,g,d,null))}function Uv(o,a,d,g){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,k=null,B=null,H=null,ie=null,we=null,F=null;for(de in d){var Ie=d[de];if(d.hasOwnProperty(de)&&Ie!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":ie=Ie;default:g.hasOwnProperty(de)||pn(o,a,de,null,g,Ie)}}for(var Te in g){var de=g[Te];if(Ie=d[Te],g.hasOwnProperty(Te)&&(de!=null||Ie!=null))switch(Te){case"type":k=de;break;case"name":E=de;break;case"checked":we=de;break;case"defaultChecked":F=de;break;case"value":B=de;break;case"defaultValue":H=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(S(137,a));break;default:de!==Ie&&pn(o,a,Te,de,g,Ie)}}ea(o,B,H,ie,we,F,k,E);return;case"select":de=B=H=Te=null;for(k in d)if(ie=d[k],d.hasOwnProperty(k)&&ie!=null)switch(k){case"value":break;case"multiple":de=ie;default:g.hasOwnProperty(k)||pn(o,a,k,null,g,ie)}for(E in g)if(k=g[E],ie=d[E],g.hasOwnProperty(E)&&(k!=null||ie!=null))switch(E){case"value":Te=k;break;case"defaultValue":H=k;break;case"multiple":B=k;default:k!==ie&&pn(o,a,E,k,g,ie)}a=H,d=B,g=de,Te!=null?ta(o,!!d,Te,!1):!!g!=!!d&&(a!=null?ta(o,!!d,a,!0):ta(o,!!d,d?[]:"",!1));return;case"textarea":de=Te=null;for(H in d)if(E=d[H],d.hasOwnProperty(H)&&E!=null&&!g.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:pn(o,a,H,null,g,E)}for(B in g)if(E=g[B],k=d[B],g.hasOwnProperty(B)&&(E!=null||k!=null))switch(B){case"value":Te=E;break;case"defaultValue":de=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(S(91));break;default:E!==k&&pn(o,a,B,E,g,k)}ai(o,Te,de);return;case"option":for(var bt in d)if(Te=d[bt],d.hasOwnProperty(bt)&&Te!=null&&!g.hasOwnProperty(bt))switch(bt){case"selected":o.selected=!1;break;default:pn(o,a,bt,null,g,Te)}for(ie in g)if(Te=g[ie],de=d[ie],g.hasOwnProperty(ie)&&Te!==de&&(Te!=null||de!=null))switch(ie){case"selected":o.selected=Te&&typeof Te!="function"&&typeof Te!="symbol";break;default:pn(o,a,ie,Te,g,de)}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 pt in d)Te=d[pt],d.hasOwnProperty(pt)&&Te!=null&&!g.hasOwnProperty(pt)&&pn(o,a,pt,null,g,Te);for(we in g)if(Te=g[we],de=d[we],g.hasOwnProperty(we)&&Te!==de&&(Te!=null||de!=null))switch(we){case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(S(137,a));break;default:pn(o,a,we,Te,g,de)}return;default:if(Yf(a)){for(var yn in d)Te=d[yn],d.hasOwnProperty(yn)&&Te!==void 0&&!g.hasOwnProperty(yn)&&ac(o,a,yn,void 0,g,Te);for(F in g)Te=g[F],de=d[F],!g.hasOwnProperty(F)||Te===de||Te===void 0&&de===void 0||ac(o,a,F,Te,g,de);return}}for(var ye in d)Te=d[ye],d.hasOwnProperty(ye)&&Te!=null&&!g.hasOwnProperty(ye)&&pn(o,a,ye,null,g,Te);for(Ie in g)Te=g[Ie],de=d[Ie],!g.hasOwnProperty(Ie)||Te===de||Te==null&&de==null||pn(o,a,Ie,Te,g,de)}var ny=null,iy=null;function $d(o){return o.nodeType===9?o:o.ownerDocument}function Im(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 km(o,a){if(o===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&a==="foreignObject"?0:o}function ry(o,a){return o==="textarea"||o==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var oy=null;function ep(){var o=window.event;return o&&o.type==="popstate"?o===oy?!1:(oy=o,!0):(oy=null,!1)}var Ka=typeof setTimeout=="function"?setTimeout:void 0,Dm=typeof clearTimeout=="function"?clearTimeout:void 0,tl=typeof Promise=="function"?Promise:void 0,jv=typeof queueMicrotask=="function"?queueMicrotask:typeof tl<"u"?function(o){return tl.resolve(null).then(o).catch(tp)}:Ka;function tp(o){setTimeout(function(){throw o})}function To(o){return o==="head"}function Om(o,a){var d=a,g=0,E=0;do{var k=d.nextSibling;if(o.removeChild(d),k&&k.nodeType===8)if(d=k.data,d==="/$"){if(0<g&&8>g){d=g;var B=o.ownerDocument;if(d&1&&mf(B.documentElement),d&2&&mf(B.body),d&4)for(d=B.head,mf(d),B=d.firstChild;B;){var H=B.nextSibling,ie=B.nodeName;B[gr]||ie==="SCRIPT"||ie==="STYLE"||ie==="LINK"&&B.rel.toLowerCase()==="stylesheet"||d.removeChild(B),B=H}}if(E===0){o.removeChild(k),Af(a);return}E--}else d==="$"||d==="$?"||d==="$!"?E++:g=d.charCodeAt(0)-48;else g=0;d=k}while(d);Af(a)}function yf(o){var a=o.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var d=a;switch(a=a.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":yf(d),Fi(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function Bv(o,a,d,g){for(;o.nodeType===1;){var E=d;if(o.nodeName.toLowerCase()!==a.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[gr])switch(a){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(k=o.getAttribute("rel"),k==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(k!==E.rel||o.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||o.getAttribute("title")!==(E.title==null?null:E.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(k=o.getAttribute("src"),(k!==(E.src==null?null:E.src)||o.getAttribute("type")!==(E.type==null?null:E.type)||o.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&k&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(a==="input"&&o.type==="hidden"){var k=E.name==null?null:""+E.name;if(E.type==="hidden"&&o.getAttribute("name")===k)return o}else return o;if(o=xo(o.nextSibling),o===null)break}return null}function Vv(o,a,d){if(a==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=xo(o.nextSibling),o===null))return null;return o}function gf(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function np(o,a){var d=o.ownerDocument;if(o.data!=="$?"||d.readyState==="complete")a();else{var g=function(){a(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function xo(o){for(;o!=null;o=o.nextSibling){var a=o.nodeType;if(a===1||a===3)break;if(a===8){if(a=o.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return o}var ip=null;function Rm(o){o=o.previousSibling;for(var a=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(a===0)return o;a--}else d==="/$"&&a++}o=o.previousSibling}return null}function ly(o,a,d){switch(a=$d(d),o){case"html":if(o=a.documentElement,!o)throw Error(S(452));return o;case"head":if(o=a.head,!o)throw Error(S(453));return o;case"body":if(o=a.body,!o)throw Error(S(454));return o;default:throw Error(S(451))}}function mf(o){for(var a=o.attributes;a.length;)o.removeAttributeNode(a[0]);Fi(o)}var Nn=new Map,sc=new Set;function rp(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var nl=Ue.d;Ue.d={f:Hv,r:Kv,D:Gv,C:Ga,L:uy,m:Fv,X:qv,S:Nm,M:zv};function Hv(){var o=nl.f(),a=Qs();return o||a}function Kv(o){var a=Zu(o);a!==null&&a.tag===5&&a.type==="form"?Wg(a):nl.r(o)}var cc=typeof document>"u"?null:document;function Mm(o,a,d){var g=cc;if(g&&typeof a=="string"&&a){var E=vr(a);E='link[rel="'+o+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),sc.has(E)||(sc.add(E),o={rel:o,crossOrigin:d,href:a},g.querySelector(E)===null&&(a=g.createElement("link"),bi(a,"link",o),Y(a),g.head.appendChild(a)))}}function Gv(o){nl.D(o),Mm("dns-prefetch",o,null)}function Ga(o,a){nl.C(o,a),Mm("preconnect",o,a)}function uy(o,a,d){nl.L(o,a,d);var g=cc;if(g&&o&&a){var E='link[rel="preload"][as="'+vr(a)+'"]';a==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+vr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+vr(d.imageSizes)+'"]')):E+='[href="'+vr(o)+'"]';var k=E;switch(a){case"style":k=Uu(o);break;case"script":k=il(o)}Nn.has(k)||(o=p({rel:"preload",href:a==="image"&&d&&d.imageSrcSet?void 0:o,as:a},d),Nn.set(k,o),g.querySelector(E)!==null||a==="style"&&g.querySelector(vf(k))||a==="script"&&g.querySelector(rl(k))||(a=g.createElement("link"),bi(a,"link",o),Y(a),g.head.appendChild(a)))}}function Fv(o,a){nl.m(o,a);var d=cc;if(d&&o){var g=a&&typeof a.as=="string"?a.as:"script",E='link[rel="modulepreload"][as="'+vr(g)+'"][href="'+vr(o)+'"]',k=E;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=il(o)}if(!Nn.has(k)&&(o=p({rel:"modulepreload",href:o},a),Nn.set(k,o),d.querySelector(E)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(rl(k)))return}g=d.createElement("link"),bi(g,"link",o),Y(g),d.head.appendChild(g)}}}function Nm(o,a,d){nl.S(o,a,d);var g=cc;if(g&&o){var E=ru(g).hoistableStyles,k=Uu(o);a=a||"default";var B=E.get(k);if(!B){var H={loading:0,preload:null};if(B=g.querySelector(vf(k)))H.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":a},d),(d=Nn.get(k))&&sy(o,d);var ie=B=g.createElement("link");Y(ie),bi(ie,"link",o),ie._p=new Promise(function(we,F){ie.onload=we,ie.onerror=F}),ie.addEventListener("load",function(){H.loading|=1}),ie.addEventListener("error",function(){H.loading|=2}),H.loading|=4,ol(B,a,g)}B={type:"stylesheet",instance:B,count:1,state:H},E.set(k,B)}}}function qv(o,a){nl.X(o,a);var d=cc;if(d&&o){var g=ru(d).hoistableScripts,E=il(o),k=g.get(E);k||(k=d.querySelector(rl(E)),k||(o=p({src:o,async:!0},a),(a=Nn.get(E))&&ll(o,a),k=d.createElement("script"),Y(k),bi(k,"link",o),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},g.set(E,k))}}function zv(o,a){nl.M(o,a);var d=cc;if(d&&o){var g=ru(d).hoistableScripts,E=il(o),k=g.get(E);k||(k=d.querySelector(rl(E)),k||(o=p({src:o,async:!0,type:"module"},a),(a=Nn.get(E))&&ll(o,a),k=d.createElement("script"),Y(k),bi(k,"link",o),d.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},g.set(E,k))}}function ay(o,a,d,g){var E=(E=mt.current)?rp(E):null;if(!E)throw Error(S(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(a=Uu(d.href),d=ru(E).hoistableStyles,g=d.get(a),g||(g={type:"style",instance:null,count:0,state:null},d.set(a,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=Uu(d.href);var k=ru(E).hoistableStyles,B=k.get(o);if(B||(E=E.ownerDocument||E,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(o,B),(k=E.querySelector(vf(o)))&&!k._p&&(B.instance=k,B.state.loading=5),Nn.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},Nn.set(o,d),k||ql(E,o,d,B.state))),a&&g===null)throw Error(S(528,""));return B}if(a&&g!==null)throw Error(S(529,""));return null;case"script":return a=d.async,d=d.src,typeof d=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=il(d),d=ru(E).hoistableScripts,g=d.get(a),g||(g={type:"script",instance:null,count:0,state:null},d.set(a,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(S(444,o))}}function Uu(o){return'href="'+vr(o)+'"'}function vf(o){return'link[rel="stylesheet"]['+o+"]"}function ju(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function ql(o,a,d,g){o.querySelector('link[rel="preload"][as="style"]['+a+"]")?g.loading=1:(a=o.createElement("link"),g.preload=a,a.addEventListener("load",function(){return g.loading|=1}),a.addEventListener("error",function(){return g.loading|=2}),bi(a,"link",d),Y(a),o.head.appendChild(a))}function il(o){return'[src="'+vr(o)+'"]'}function rl(o){return"script[async]"+o}function fc(o,a,d){if(a.count++,a.instance===null)switch(a.type){case"style":var g=o.querySelector('style[data-href~="'+vr(d.href)+'"]');if(g)return a.instance=g,Y(g),g;var E=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),Y(g),bi(g,"style",E),ol(g,d.precedence,o),a.instance=g;case"stylesheet":E=Uu(d.href);var k=o.querySelector(vf(E));if(k)return a.state.loading|=4,a.instance=k,Y(k),k;g=ju(d),(E=Nn.get(E))&&sy(g,E),k=(o.ownerDocument||o).createElement("link"),Y(k);var B=k;return B._p=new Promise(function(H,ie){B.onload=H,B.onerror=ie}),bi(k,"link",g),a.state.loading|=4,ol(k,d.precedence,o),a.instance=k;case"script":return k=il(d.src),(E=o.querySelector(rl(k)))?(a.instance=E,Y(E),E):(g=d,(E=Nn.get(k))&&(g=p({},d),ll(g,E)),o=o.ownerDocument||o,E=o.createElement("script"),Y(E),bi(E,"link",g),o.head.appendChild(E),a.instance=E);case"void":return null;default:throw Error(S(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(g=a.instance,a.state.loading|=4,ol(g,d.precedence,o));return a.instance}function ol(o,a,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=g.length?g[g.length-1]:null,k=E,B=0;B<g.length;B++){var H=g[B];if(H.dataset.precedence===a)k=H;else if(k!==E)break}k?k.parentNode.insertBefore(o,k.nextSibling):(a=d.nodeType===9?d.head:d,a.insertBefore(o,a.firstChild))}function sy(o,a){o.crossOrigin==null&&(o.crossOrigin=a.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=a.referrerPolicy),o.title==null&&(o.title=a.title)}function ll(o,a){o.crossOrigin==null&&(o.crossOrigin=a.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=a.referrerPolicy),o.integrity==null&&(o.integrity=a.integrity)}var Sf=null;function op(o,a,d){if(Sf===null){var g=new Map,E=Sf=new Map;E.set(d,g)}else E=Sf,g=E.get(d),g||(g=new Map,E.set(d,g));if(g.has(o))return g;for(g.set(o,null),d=d.getElementsByTagName(o),E=0;E<d.length;E++){var k=d[E];if(!(k[gr]||k[Di]||o==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var B=k.getAttribute(a)||"";B=o+B;var H=g.get(B);H?H.push(k):g.set(B,[k])}}return g}function cy(o,a,d){o=o.ownerDocument||o,o.head.insertBefore(d,a==="title"?o.querySelector("head > title"):null)}function Pm(o,a,d){if(d===1||a.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return o=a.disabled,typeof a.precedence=="string"&&o==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fy(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Fa=null;function Lm(){}function Xv(o,a,d){if(Fa===null)throw Error(S(475));var g=Fa;if(a.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var E=Uu(d.href),k=o.querySelector(vf(E));if(k){o=k._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(g.count++,g=dc.bind(g),o.then(g,g)),a.state.loading|=4,a.instance=k,Y(k);return}k=o.ownerDocument||o,d=ju(d),(E=Nn.get(E))&&sy(d,E),k=k.createElement("link"),Y(k);var B=k;B._p=new Promise(function(H,ie){B.onload=H,B.onerror=ie}),bi(k,"link",d),a.instance=k}g.stylesheets===null&&(g.stylesheets=new Map),g.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(g.count++,a=dc.bind(g),o.addEventListener("load",a),o.addEventListener("error",a))}}function _m(){if(Fa===null)throw Error(S(475));var o=Fa;return o.stylesheets&&o.count===0&&dy(o,o.stylesheets),0<o.count?function(a){var d=setTimeout(function(){if(o.stylesheets&&dy(o,o.stylesheets),o.unsuspend){var g=o.unsuspend;o.unsuspend=null,g()}},6e4);return o.unsuspend=a,function(){o.unsuspend=null,clearTimeout(d)}}:null}function dc(){if(this.count--,this.count===0){if(this.stylesheets)dy(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var kn=null;function dy(o,a){o.stylesheets=null,o.unsuspend!==null&&(o.count++,kn=new Map,a.forEach(fi,o),kn=null,dc.call(o))}function fi(o,a){if(!(a.state.loading&4)){var d=kn.get(o);if(d)var g=d.get(null);else{d=new Map,kn.set(o,d);for(var E=o.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<E.length;k++){var B=E[k];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(d.set(B.dataset.precedence,B),g=B)}g&&d.set(null,g)}E=a.instance,B=E.getAttribute("data-precedence"),k=d.get(B)||g,k===g&&d.set(null,E),d.set(B,E),this.count++,g=dc.bind(this),E.addEventListener("load",g),E.addEventListener("error",g),k?k.parentNode.insertBefore(E,k.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(E,o.firstChild)),a.state.loading|=4}}var pc={$$typeof:ue,Provider:null,Consumer:null,_currentValue:gt,_currentValue2:gt,_threadCount:0};function di(o,a,d,g,E,k,B,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=dn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dn(0),this.hiddenUpdates=dn(null),this.identifierPrefix=g,this.onUncaughtError=E,this.onCaughtError=k,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function oi(o,a,d,g,E,k,B,H,ie,we,F,Ie){return o=new di(o,a,d,B,H,ie,we,Ie),a=1,k===!0&&(a|=24),k=cr(3,null,null,a),o.current=k,k.stateNode=o,a=vn(),a.refCount++,o.pooledCache=a,a.refCount++,k.memoizedState={element:g,isDehydrated:d,cache:a},Rs(k),o}function hc(o){return o?(o=pa,o):pa}function Um(o,a,d,g,E,k){E=hc(E),g.context===null?g.context=E:g.pendingContext=E,g=Pt(a),g.payload={element:d},k=k===void 0?null:k,k!==null&&(g.callback=k),d=Ho(o,g,a),d!==null&&(Rr(d,o,a),Kc(d,o,a))}function py(o,a){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<a?d:a}}function ul(o,a){py(o,a),(o=o.alternate)&&py(o,a)}function jm(o){if(o.tag===13){var a=Al(o,67108864);a!==null&&Rr(a,o,67108864),ul(o,67108864)}}var lp=!0;function Yv(o,a,d,g){var E=xe.T;xe.T=null;var k=Ue.p;try{Ue.p=2,yy(o,a,d,g)}finally{Ue.p=k,xe.T=E}}function hy(o,a,d,g){var E=xe.T;xe.T=null;var k=Ue.p;try{Ue.p=8,yy(o,a,d,g)}finally{Ue.p=k,xe.T=E}}function yy(o,a,d,g){if(lp){var E=gy(g);if(E===null)rc(o,a,g,yc,d),Sy(o,g);else if(Qv(E,o,a,d,g))g.stopPropagation();else if(Sy(o,g),a&4&&-1<Wv.indexOf(o)){for(;E!==null;){var k=Zu(E);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var B=hl(k.pendingLanes);if(B!==0){var H=k;for(H.pendingLanes|=2,H.entangledLanes|=2;B;){var ie=1<<31-nr(B);H.entanglements[1]|=ie,B&=~ie}el(k),(Sn&6)===0&&(ff=ui()+500,pf(0))}}break;case 13:H=Al(k,2),H!==null&&Rr(H,k,2),Qs(),ul(k,2)}if(k=gy(g),k===null&&rc(o,a,g,yc,d),k===E)break;E=k}E!==null&&g.stopPropagation()}else rc(o,a,g,null,d)}}function gy(o){return o=yl(o),my(o)}var yc=null;function my(o){if(yc=null,o=Ge(o),o!==null){var a=U(o);if(a===null)o=null;else{var d=a.tag;if(d===13){if(o=O(a),o!==null)return o;o=null}else if(d===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;o=null}else a!==o&&(o=null)}}return yc=o,null}function Bm(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(Ct()){case Jl:return 2;case yg:return 8;case jp:case B2:return 32;case Bp:return 268435456;default:return 32}default:return 32}}var vy=!1,Bu=null,Vu=null,al=null,sl=new Map,wf=new Map,Hu=[],Wv="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 Sy(o,a){switch(o){case"focusin":case"focusout":Bu=null;break;case"dragenter":case"dragleave":Vu=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":sl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":wf.delete(a.pointerId)}}function Tf(o,a,d,g,E,k){return o===null||o.nativeEvent!==k?(o={blockedOn:a,domEventName:d,eventSystemFlags:g,nativeEvent:k,targetContainers:[E]},a!==null&&(a=Zu(a),a!==null&&jm(a)),o):(o.eventSystemFlags|=g,a=o.targetContainers,E!==null&&a.indexOf(E)===-1&&a.push(E),o)}function Qv(o,a,d,g,E){switch(a){case"focusin":return Bu=Tf(Bu,o,a,d,g,E),!0;case"dragenter":return Vu=Tf(Vu,o,a,d,g,E),!0;case"mouseover":return al=Tf(al,o,a,d,g,E),!0;case"pointerover":var k=E.pointerId;return sl.set(k,Tf(sl.get(k)||null,o,a,d,g,E)),!0;case"gotpointercapture":return k=E.pointerId,wf.set(k,Tf(wf.get(k)||null,o,a,d,g,E)),!0}return!1}function xf(o){var a=Ge(o.target);if(a!==null){var d=U(a);if(d!==null){if(a=d.tag,a===13){if(a=O(d),a!==null){o.blockedOn=a,vg(o.priority,function(){if(d.tag===13){var g=Ui();g=tu(g);var E=Al(d,g);E!==null&&Rr(E,d,g),ul(d,g)}});return}}else if(a===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function up(o){if(o.blockedOn!==null)return!1;for(var a=o.targetContainers;0<a.length;){var d=gy(o.nativeEvent);if(d===null){d=o.nativeEvent;var g=new d.constructor(d.type,d);Oc=g,d.target.dispatchEvent(g),Oc=null}else return a=Zu(d),a!==null&&jm(a),o.blockedOn=d,!1;a.shift()}return!0}function ap(o,a,d){up(o)&&d.delete(a)}function Vm(){vy=!1,Bu!==null&&up(Bu)&&(Bu=null),Vu!==null&&up(Vu)&&(Vu=null),al!==null&&up(al)&&(al=null),sl.forEach(ap),wf.forEach(ap)}function qa(o,a){o.blockedOn===a&&(o.blockedOn=null,vy||(vy=!0,A.unstable_scheduleCallback(A.unstable_NormalPriority,Vm)))}var za=null;function Ef(o){za!==o&&(za=o,A.unstable_scheduleCallback(A.unstable_NormalPriority,function(){za===o&&(za=null);for(var a=0;a<o.length;a+=3){var d=o[a],g=o[a+1],E=o[a+2];if(typeof g!="function"){if(my(g||d)===null)continue;break}var k=Zu(d);k!==null&&(o.splice(a,3),a-=3,xd(k,{pending:!0,data:E,method:d.method,action:g},g,E))}}))}function Af(o){function a(ie){return qa(ie,o)}Bu!==null&&qa(Bu,o),Vu!==null&&qa(Vu,o),al!==null&&qa(al,o),sl.forEach(a),wf.forEach(a);for(var d=0;d<Hu.length;d++){var g=Hu[d];g.blockedOn===o&&(g.blockedOn=null)}for(;0<Hu.length&&(d=Hu[0],d.blockedOn===null);)xf(d),d.blockedOn===null&&Hu.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var E=d[g],k=d[g+1],B=E[ir]||null;if(typeof k=="function")B||Ef(d);else if(B){var H=null;if(k&&k.hasAttribute("formAction")){if(E=k,B=k[ir]||null)H=B.formAction;else if(my(E)!==null)continue}else H=B.action;typeof H=="function"?d[g+1]=H:(d.splice(g,3),g-=3),Ef(d)}}}function Cf(o){this._internalRoot=o}Xa.prototype.render=Cf.prototype.render=function(o){var a=this._internalRoot;if(a===null)throw Error(S(409));var d=a.current,g=Ui();Um(d,g,o,a,null,null)},Xa.prototype.unmount=Cf.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var a=o.containerInfo;Um(o.current,2,null,o,null,null),Qs(),a[as]=null}};function Xa(o){this._internalRoot=o}Xa.prototype.unstable_scheduleHydration=function(o){if(o){var a=mg();o={blockedOn:null,target:o,priority:a};for(var d=0;d<Hu.length&&a!==0&&a<Hu[d].priority;d++);Hu.splice(d,0,o),d===0&&xf(o)}};var wy=b.version;if(wy!=="19.1.0")throw Error(S(527,wy,"19.1.0"));Ue.findDOMNode=function(o){var a=o._reactInternals;if(a===void 0)throw typeof o.render=="function"?Error(S(188)):(o=Object.keys(o).join(","),Error(S(268,o)));return o=s(a),o=o!==null?u(o):null,o=o===null?null:o.stateNode,o};var sp={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:xe,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ya=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ya.isDisabled&&Ya.supportsFiber)try{ls=Ya.inject(sp),yr=Ya}catch{}}return ig.createRoot=function(o,a){if(!x(o))throw Error(S(299));var d=!1,g="",E=Fe,k=Oh,B=qo,H=null;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onUncaughtError!==void 0&&(E=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(B=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(H=a.unstable_transitionCallbacks)),a=oi(o,1,!1,null,null,d,g,E,k,B,H,null),o[as]=a.current,hf(o),new Cf(a)},ig.hydrateRoot=function(o,a,d){if(!x(o))throw Error(S(299));var g=!1,E="",k=Fe,B=Oh,H=qo,ie=null,we=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(k=d.onUncaughtError),d.onCaughtError!==void 0&&(B=d.onCaughtError),d.onRecoverableError!==void 0&&(H=d.onRecoverableError),d.unstable_transitionCallbacks!==void 0&&(ie=d.unstable_transitionCallbacks),d.formState!==void 0&&(we=d.formState)),a=oi(o,1,!0,a,d??null,g,E,k,B,H,ie,we),a.context=hc(null),d=a.current,g=Ui(),g=tu(g),E=Pt(g),E.callback=null,Ho(d,E,g),d=g,a.current.lanes=d,$l(a,d),el(a),o[as]=a.current,hf(o),new Xa(a)},ig.version="19.1.0",ig}var VA;function U4(){if(VA)return s2.exports;VA=1;function A(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A)}catch(b){console.error(b)}}return A(),s2.exports=_4(),s2.exports}var j4=U4();/**
 * react-router v7.7.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var HA="popstate";function B4(A={}){function b(S,x){let{pathname:U,search:O,hash:h}=S.location;return w2("",{pathname:U,search:O,hash:h},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function R(S,x){return typeof x=="string"?x:ag(x)}return H4(b,R,null,A)}function Qn(A,b){if(A===!1||A===null||typeof A>"u")throw new Error(b)}function Yu(A,b){if(!A){typeof console<"u"&&console.warn(b);try{throw new Error(b)}catch{}}}function V4(){return Math.random().toString(36).substring(2,10)}function KA(A,b){return{usr:A.state,key:A.key,idx:b}}function w2(A,b,R=null,S){return{pathname:typeof A=="string"?A:A.pathname,search:"",hash:"",...typeof b=="string"?Np(b):b,state:R,key:b&&b.key||S||V4()}}function ag({pathname:A="/",search:b="",hash:R=""}){return b&&b!=="?"&&(A+=b.charAt(0)==="?"?b:"?"+b),R&&R!=="#"&&(A+=R.charAt(0)==="#"?R:"#"+R),A}function Np(A){let b={};if(A){let R=A.indexOf("#");R>=0&&(b.hash=A.substring(R),A=A.substring(0,R));let S=A.indexOf("?");S>=0&&(b.search=A.substring(S),A=A.substring(0,S)),A&&(b.pathname=A)}return b}function H4(A,b,R,S={}){let{window:x=document.defaultView,v5Compat:U=!1}=S,O=x.history,h="POP",s=null,u=p();u==null&&(u=0,O.replaceState({...O.state,idx:u},""));function p(){return(O.state||{idx:null}).idx}function v(){h="POP";let oe=p(),me=oe==null?null:oe-u;u=oe,s&&s({action:h,location:$.location,delta:me})}function N(oe,me){h="PUSH";let Ve=w2($.location,oe,me);u=p()+1;let ue=KA(Ve,u),Ne=$.createHref(Ve);try{O.pushState(ue,"",Ne)}catch(Re){if(Re instanceof DOMException&&Re.name==="DataCloneError")throw Re;x.location.assign(Ne)}U&&s&&s({action:h,location:$.location,delta:1})}function Z(oe,me){h="REPLACE";let Ve=w2($.location,oe,me);u=p();let ue=KA(Ve,u),Ne=$.createHref(Ve);O.replaceState(ue,"",Ne),U&&s&&s({action:h,location:$.location,delta:0})}function C(oe){return K4(oe)}let $={get action(){return h},get location(){return A(x,O)},listen(oe){if(s)throw new Error("A history only accepts one active listener");return x.addEventListener(HA,v),s=oe,()=>{x.removeEventListener(HA,v),s=null}},createHref(oe){return b(x,oe)},createURL:C,encodeLocation(oe){let me=C(oe);return{pathname:me.pathname,search:me.search,hash:me.hash}},push:N,replace:Z,go(oe){return O.go(oe)}};return $}function K4(A,b=!1){let R="http://localhost";typeof window<"u"&&(R=window.location.origin!=="null"?window.location.origin:window.location.href),Qn(R,"No window.location.(origin|href) available to create URL");let S=typeof A=="string"?A:ag(A);return S=S.replace(/ $/,"%20"),!b&&S.startsWith("//")&&(S=R+S),new URL(S,R)}function aC(A,b,R="/"){return G4(A,b,R,!1)}function G4(A,b,R,S){let x=typeof b=="string"?Np(b):b,U=is(x.pathname||"/",R);if(U==null)return null;let O=sC(A);F4(O);let h=null;for(let s=0;h==null&&s<O.length;++s){let u=tO(U);h=$4(O[s],u,S)}return h}function sC(A,b=[],R=[],S=""){let x=(U,O,h)=>{let s={relativePath:h===void 0?U.path||"":h,caseSensitive:U.caseSensitive===!0,childrenIndex:O,route:U};s.relativePath.startsWith("/")&&(Qn(s.relativePath.startsWith(S),`Absolute route path "${s.relativePath}" nested under path "${S}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(S.length));let u=ns([S,s.relativePath]),p=R.concat(s);U.children&&U.children.length>0&&(Qn(U.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),sC(U.children,b,p,u)),!(U.path==null&&!U.index)&&b.push({path:u,score:J4(u,U.index),routesMeta:p})};return A.forEach((U,O)=>{if(U.path===""||!U.path?.includes("?"))x(U,O);else for(let h of cC(U.path))x(U,O,h)}),b}function cC(A){let b=A.split("/");if(b.length===0)return[];let[R,...S]=b,x=R.endsWith("?"),U=R.replace(/\?$/,"");if(S.length===0)return x?[U,""]:[U];let O=cC(S.join("/")),h=[];return h.push(...O.map(s=>s===""?U:[U,s].join("/"))),x&&h.push(...O),h.map(s=>A.startsWith("/")&&s===""?"/":s)}function F4(A){A.sort((b,R)=>b.score!==R.score?R.score-b.score:Z4(b.routesMeta.map(S=>S.childrenIndex),R.routesMeta.map(S=>S.childrenIndex)))}var q4=/^:[\w-]+$/,z4=3,X4=2,Y4=1,W4=10,Q4=-2,GA=A=>A==="*";function J4(A,b){let R=A.split("/"),S=R.length;return R.some(GA)&&(S+=Q4),b&&(S+=X4),R.filter(x=>!GA(x)).reduce((x,U)=>x+(q4.test(U)?z4:U===""?Y4:W4),S)}function Z4(A,b){return A.length===b.length&&A.slice(0,-1).every((S,x)=>S===b[x])?A[A.length-1]-b[b.length-1]:0}function $4(A,b,R=!1){let{routesMeta:S}=A,x={},U="/",O=[];for(let h=0;h<S.length;++h){let s=S[h],u=h===S.length-1,p=U==="/"?b:b.slice(U.length)||"/",v=sv({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},p),N=s.route;if(!v&&u&&R&&!S[S.length-1].route.index&&(v=sv({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},p)),!v)return null;Object.assign(x,v.params),O.push({params:x,pathname:ns([U,v.pathname]),pathnameBase:oO(ns([U,v.pathnameBase])),route:N}),v.pathnameBase!=="/"&&(U=ns([U,v.pathnameBase]))}return O}function sv(A,b){typeof A=="string"&&(A={path:A,caseSensitive:!1,end:!0});let[R,S]=eO(A.path,A.caseSensitive,A.end),x=b.match(R);if(!x)return null;let U=x[0],O=U.replace(/(.)\/+$/,"$1"),h=x.slice(1);return{params:S.reduce((u,{paramName:p,isOptional:v},N)=>{if(p==="*"){let C=h[N]||"";O=U.slice(0,U.length-C.length).replace(/(.)\/+$/,"$1")}const Z=h[N];return v&&!Z?u[p]=void 0:u[p]=(Z||"").replace(/%2F/g,"/"),u},{}),pathname:U,pathnameBase:O,pattern:A}}function eO(A,b=!1,R=!0){Yu(A==="*"||!A.endsWith("*")||A.endsWith("/*"),`Route path "${A}" will be treated as if it were "${A.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${A.replace(/\*$/,"/*")}".`);let S=[],x="^"+A.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(O,h,s)=>(S.push({paramName:h,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return A.endsWith("*")?(S.push({paramName:"*"}),x+=A==="*"||A==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):R?x+="\\/*$":A!==""&&A!=="/"&&(x+="(?:(?=\\/|$))"),[new RegExp(x,b?void 0:"i"),S]}function tO(A){try{return A.split("/").map(b=>decodeURIComponent(b).replace(/\//g,"%2F")).join("/")}catch(b){return Yu(!1,`The URL path "${A}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${b}).`),A}}function is(A,b){if(b==="/")return A;if(!A.toLowerCase().startsWith(b.toLowerCase()))return null;let R=b.endsWith("/")?b.length-1:b.length,S=A.charAt(R);return S&&S!=="/"?null:A.slice(R)||"/"}function nO(A,b="/"){let{pathname:R,search:S="",hash:x=""}=typeof A=="string"?Np(A):A;return{pathname:R?R.startsWith("/")?R:iO(R,b):b,search:lO(S),hash:uO(x)}}function iO(A,b){let R=b.replace(/\/+$/,"").split("/");return A.split("/").forEach(x=>{x===".."?R.length>1&&R.pop():x!=="."&&R.push(x)}),R.length>1?R.join("/"):"/"}function p2(A,b,R,S){return`Cannot include a '${A}' character in a manually specified \`to.${b}\` field [${JSON.stringify(S)}].  Please separate it out to the \`to.${R}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rO(A){return A.filter((b,R)=>R===0||b.route.path&&b.route.path.length>0)}function fC(A){let b=rO(A);return b.map((R,S)=>S===b.length-1?R.pathname:R.pathnameBase)}function dC(A,b,R,S=!1){let x;typeof A=="string"?x=Np(A):(x={...A},Qn(!x.pathname||!x.pathname.includes("?"),p2("?","pathname","search",x)),Qn(!x.pathname||!x.pathname.includes("#"),p2("#","pathname","hash",x)),Qn(!x.search||!x.search.includes("#"),p2("#","search","hash",x)));let U=A===""||x.pathname==="",O=U?"/":x.pathname,h;if(O==null)h=R;else{let v=b.length-1;if(!S&&O.startsWith("..")){let N=O.split("/");for(;N[0]==="..";)N.shift(),v-=1;x.pathname=N.join("/")}h=v>=0?b[v]:"/"}let s=nO(x,h),u=O&&O!=="/"&&O.endsWith("/"),p=(U||O===".")&&R.endsWith("/");return!s.pathname.endsWith("/")&&(u||p)&&(s.pathname+="/"),s}var ns=A=>A.join("/").replace(/\/\/+/g,"/"),oO=A=>A.replace(/\/+$/,"").replace(/^\/*/,"/"),lO=A=>!A||A==="?"?"":A.startsWith("?")?A:"?"+A,uO=A=>!A||A==="#"?"":A.startsWith("#")?A:"#"+A;function aO(A){return A!=null&&typeof A.status=="number"&&typeof A.statusText=="string"&&typeof A.internal=="boolean"&&"data"in A}var pC=["POST","PUT","PATCH","DELETE"];new Set(pC);var sO=["GET",...pC];new Set(sO);var Pp=Se.createContext(null);Pp.displayName="DataRouter";var dv=Se.createContext(null);dv.displayName="DataRouterState";Se.createContext(!1);var hC=Se.createContext({isTransitioning:!1});hC.displayName="ViewTransition";var cO=Se.createContext(new Map);cO.displayName="Fetchers";var fO=Se.createContext(null);fO.displayName="Await";var Wu=Se.createContext(null);Wu.displayName="Navigation";var cg=Se.createContext(null);cg.displayName="Location";var rs=Se.createContext({outlet:null,matches:[],isDataRoute:!1});rs.displayName="Route";var R2=Se.createContext(null);R2.displayName="RouteError";function dO(A,{relative:b}={}){Qn(fg(),"useHref() may be used only in the context of a <Router> component.");let{basename:R,navigator:S}=Se.useContext(Wu),{hash:x,pathname:U,search:O}=dg(A,{relative:b}),h=U;return R!=="/"&&(h=U==="/"?R:ns([R,U])),S.createHref({pathname:h,search:O,hash:x})}function fg(){return Se.useContext(cg)!=null}function _f(){return Qn(fg(),"useLocation() may be used only in the context of a <Router> component."),Se.useContext(cg).location}var yC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gC(A){Se.useContext(Wu).static||Se.useLayoutEffect(A)}function pO(){let{isDataRoute:A}=Se.useContext(rs);return A?bO():hO()}function hO(){Qn(fg(),"useNavigate() may be used only in the context of a <Router> component.");let A=Se.useContext(Pp),{basename:b,navigator:R}=Se.useContext(Wu),{matches:S}=Se.useContext(rs),{pathname:x}=_f(),U=JSON.stringify(fC(S)),O=Se.useRef(!1);return gC(()=>{O.current=!0}),Se.useCallback((s,u={})=>{if(Yu(O.current,yC),!O.current)return;if(typeof s=="number"){R.go(s);return}let p=dC(s,JSON.parse(U),x,u.relative==="path");A==null&&b!=="/"&&(p.pathname=p.pathname==="/"?b:ns([b,p.pathname])),(u.replace?R.replace:R.push)(p,u.state,u)},[b,R,U,x,A])}Se.createContext(null);function dg(A,{relative:b}={}){let{matches:R}=Se.useContext(rs),{pathname:S}=_f(),x=JSON.stringify(fC(R));return Se.useMemo(()=>dC(A,JSON.parse(x),S,b==="path"),[A,x,S,b])}function yO(A,b){return mC(A,b)}function mC(A,b,R,S){Qn(fg(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=Se.useContext(Wu),{matches:U}=Se.useContext(rs),O=U[U.length-1],h=O?O.params:{},s=O?O.pathname:"/",u=O?O.pathnameBase:"/",p=O&&O.route;{let me=p&&p.path||"";vC(s,!p||me.endsWith("*")||me.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${me}">) 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="${me}"> to <Route path="${me==="/"?"*":`${me}/*`}">.`)}let v=_f(),N;if(b){let me=typeof b=="string"?Np(b):b;Qn(u==="/"||me.pathname?.startsWith(u),`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 "${u}" but pathname "${me.pathname}" was given in the \`location\` prop.`),N=me}else N=v;let Z=N.pathname||"/",C=Z;if(u!=="/"){let me=u.replace(/^\//,"").split("/");C="/"+Z.replace(/^\//,"").split("/").slice(me.length).join("/")}let $=aC(A,{pathname:C});Yu(p||$!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),Yu($==null||$[$.length-1].route.element!==void 0||$[$.length-1].route.Component!==void 0||$[$.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 oe=wO($&&$.map(me=>Object.assign({},me,{params:Object.assign({},h,me.params),pathname:ns([u,x.encodeLocation?x.encodeLocation(me.pathname).pathname:me.pathname]),pathnameBase:me.pathnameBase==="/"?u:ns([u,x.encodeLocation?x.encodeLocation(me.pathnameBase).pathname:me.pathnameBase])})),U,R,S);return b&&oe?Se.createElement(cg.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...N},navigationType:"POP"}},oe):oe}function gO(){let A=CO(),b=aO(A)?`${A.status} ${A.statusText}`:A instanceof Error?A.message:JSON.stringify(A),R=A instanceof Error?A.stack:null,S="rgba(200,200,200, 0.5)",x={padding:"0.5rem",backgroundColor:S},U={padding:"2px 4px",backgroundColor:S},O=null;return console.error("Error handled by React Router default ErrorBoundary:",A),O=Se.createElement(Se.Fragment,null,Se.createElement("p",null,"💿 Hey developer 👋"),Se.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",Se.createElement("code",{style:U},"ErrorBoundary")," or"," ",Se.createElement("code",{style:U},"errorElement")," prop on your route.")),Se.createElement(Se.Fragment,null,Se.createElement("h2",null,"Unexpected Application Error!"),Se.createElement("h3",{style:{fontStyle:"italic"}},b),R?Se.createElement("pre",{style:x},R):null,O)}var mO=Se.createElement(gO,null),vO=class extends Se.Component{constructor(A){super(A),this.state={location:A.location,revalidation:A.revalidation,error:A.error}}static getDerivedStateFromError(A){return{error:A}}static getDerivedStateFromProps(A,b){return b.location!==A.location||b.revalidation!=="idle"&&A.revalidation==="idle"?{error:A.error,location:A.location,revalidation:A.revalidation}:{error:A.error!==void 0?A.error:b.error,location:b.location,revalidation:A.revalidation||b.revalidation}}componentDidCatch(A,b){console.error("React Router caught the following error during render",A,b)}render(){return this.state.error!==void 0?Se.createElement(rs.Provider,{value:this.props.routeContext},Se.createElement(R2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function SO({routeContext:A,match:b,children:R}){let S=Se.useContext(Pp);return S&&S.static&&S.staticContext&&(b.route.errorElement||b.route.ErrorBoundary)&&(S.staticContext._deepestRenderedBoundaryId=b.route.id),Se.createElement(rs.Provider,{value:A},R)}function wO(A,b=[],R=null,S=null){if(A==null){if(!R)return null;if(R.errors)A=R.matches;else if(b.length===0&&!R.initialized&&R.matches.length>0)A=R.matches;else return null}let x=A,U=R?.errors;if(U!=null){let s=x.findIndex(u=>u.route.id&&U?.[u.route.id]!==void 0);Qn(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(U).join(",")}`),x=x.slice(0,Math.min(x.length,s+1))}let O=!1,h=-1;if(R)for(let s=0;s<x.length;s++){let u=x[s];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(h=s),u.route.id){let{loaderData:p,errors:v}=R,N=u.route.loader&&!p.hasOwnProperty(u.route.id)&&(!v||v[u.route.id]===void 0);if(u.route.lazy||N){O=!0,h>=0?x=x.slice(0,h+1):x=[x[0]];break}}}return x.reduceRight((s,u,p)=>{let v,N=!1,Z=null,C=null;R&&(v=U&&u.route.id?U[u.route.id]:void 0,Z=u.route.errorElement||mO,O&&(h<0&&p===0?(vC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,C=null):h===p&&(N=!0,C=u.route.hydrateFallbackElement||null)));let $=b.concat(x.slice(0,p+1)),oe=()=>{let me;return v?me=Z:N?me=C:u.route.Component?me=Se.createElement(u.route.Component,null):u.route.element?me=u.route.element:me=s,Se.createElement(SO,{match:u,routeContext:{outlet:s,matches:$,isDataRoute:R!=null},children:me})};return R&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?Se.createElement(vO,{location:R.location,revalidation:R.revalidation,component:Z,error:v,children:oe(),routeContext:{outlet:null,matches:$,isDataRoute:!0}}):oe()},null)}function M2(A){return`${A} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function TO(A){let b=Se.useContext(Pp);return Qn(b,M2(A)),b}function xO(A){let b=Se.useContext(dv);return Qn(b,M2(A)),b}function EO(A){let b=Se.useContext(rs);return Qn(b,M2(A)),b}function N2(A){let b=EO(A),R=b.matches[b.matches.length-1];return Qn(R.route.id,`${A} can only be used on routes that contain a unique "id"`),R.route.id}function AO(){return N2("useRouteId")}function CO(){let A=Se.useContext(R2),b=xO("useRouteError"),R=N2("useRouteError");return A!==void 0?A:b.errors?.[R]}function bO(){let{router:A}=TO("useNavigate"),b=N2("useNavigate"),R=Se.useRef(!1);return gC(()=>{R.current=!0}),Se.useCallback(async(x,U={})=>{Yu(R.current,yC),R.current&&(typeof x=="number"?A.navigate(x):await A.navigate(x,{fromRouteId:b,...U}))},[A,b])}var FA={};function vC(A,b,R){!b&&!FA[A]&&(FA[A]=!0,Yu(!1,R))}Se.memo(IO);function IO({routes:A,future:b,state:R}){return mC(A,void 0,R,b)}function Mp(A){Qn(!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 kO({basename:A="/",children:b=null,location:R,navigationType:S="POP",navigator:x,static:U=!1}){Qn(!fg(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let O=A.replace(/^\/*/,"/"),h=Se.useMemo(()=>({basename:O,navigator:x,static:U,future:{}}),[O,x,U]);typeof R=="string"&&(R=Np(R));let{pathname:s="/",search:u="",hash:p="",state:v=null,key:N="default"}=R,Z=Se.useMemo(()=>{let C=is(s,O);return C==null?null:{location:{pathname:C,search:u,hash:p,state:v,key:N},navigationType:S}},[O,s,u,p,v,N,S]);return Yu(Z!=null,`<Router basename="${O}"> is not able to match the URL "${s}${u}${p}" because it does not start with the basename, so the <Router> won't render anything.`),Z==null?null:Se.createElement(Wu.Provider,{value:h},Se.createElement(cg.Provider,{children:b,value:Z}))}function DO({children:A,location:b}){return yO(T2(A),b)}function T2(A,b=[]){let R=[];return Se.Children.forEach(A,(S,x)=>{if(!Se.isValidElement(S))return;let U=[...b,x];if(S.type===Se.Fragment){R.push.apply(R,T2(S.props.children,U));return}Qn(S.type===Mp,`[${typeof S.type=="string"?S.type:S.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Qn(!S.props.index||!S.props.children,"An index route cannot have child routes.");let O={id:S.props.id||U.join("-"),caseSensitive:S.props.caseSensitive,element:S.props.element,Component:S.props.Component,index:S.props.index,path:S.props.path,loader:S.props.loader,action:S.props.action,hydrateFallbackElement:S.props.hydrateFallbackElement,HydrateFallback:S.props.HydrateFallback,errorElement:S.props.errorElement,ErrorBoundary:S.props.ErrorBoundary,hasErrorBoundary:S.props.hasErrorBoundary===!0||S.props.ErrorBoundary!=null||S.props.errorElement!=null,shouldRevalidate:S.props.shouldRevalidate,handle:S.props.handle,lazy:S.props.lazy};S.props.children&&(O.children=T2(S.props.children,U)),R.push(O)}),R}var rv="get",ov="application/x-www-form-urlencoded";function pv(A){return A!=null&&typeof A.tagName=="string"}function OO(A){return pv(A)&&A.tagName.toLowerCase()==="button"}function RO(A){return pv(A)&&A.tagName.toLowerCase()==="form"}function MO(A){return pv(A)&&A.tagName.toLowerCase()==="input"}function NO(A){return!!(A.metaKey||A.altKey||A.ctrlKey||A.shiftKey)}function PO(A,b){return A.button===0&&(!b||b==="_self")&&!NO(A)}var nv=null;function LO(){if(nv===null)try{new FormData(document.createElement("form"),0),nv=!1}catch{nv=!0}return nv}var _O=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function h2(A){return A!=null&&!_O.has(A)?(Yu(!1,`"${A}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ov}"`),null):A}function UO(A,b){let R,S,x,U,O;if(RO(A)){let h=A.getAttribute("action");S=h?is(h,b):null,R=A.getAttribute("method")||rv,x=h2(A.getAttribute("enctype"))||ov,U=new FormData(A)}else if(OO(A)||MO(A)&&(A.type==="submit"||A.type==="image")){let h=A.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=A.getAttribute("formaction")||h.getAttribute("action");if(S=s?is(s,b):null,R=A.getAttribute("formmethod")||h.getAttribute("method")||rv,x=h2(A.getAttribute("formenctype"))||h2(h.getAttribute("enctype"))||ov,U=new FormData(h,A),!LO()){let{name:u,type:p,value:v}=A;if(p==="image"){let N=u?`${u}.`:"";U.append(`${N}x`,"0"),U.append(`${N}y`,"0")}else u&&U.append(u,v)}}else{if(pv(A))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');R=rv,S=null,x=ov,O=A}return U&&x==="text/plain"&&(O=U,U=void 0),{action:S,method:R.toLowerCase(),encType:x,formData:U,body:O}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function P2(A,b){if(A===!1||A===null||typeof A>"u")throw new Error(b)}function jO(A,b,R){let S=typeof A=="string"?new URL(A,typeof window>"u"?"server://singlefetch/":window.location.origin):A;return S.pathname==="/"?S.pathname=`_root.${R}`:b&&is(S.pathname,b)==="/"?S.pathname=`${b.replace(/\/$/,"")}/_root.${R}`:S.pathname=`${S.pathname.replace(/\/$/,"")}.${R}`,S}async function BO(A,b){if(A.id in b)return b[A.id];try{let R=await import(A.module);return b[A.id]=R,R}catch(R){return console.error(`Error loading route module \`${A.module}\`, reloading page...`),console.error(R),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function VO(A){return A==null?!1:A.href==null?A.rel==="preload"&&typeof A.imageSrcSet=="string"&&typeof A.imageSizes=="string":typeof A.rel=="string"&&typeof A.href=="string"}async function HO(A,b,R){let S=await Promise.all(A.map(async x=>{let U=b.routes[x.route.id];if(U){let O=await BO(U,R);return O.links?O.links():[]}return[]}));return qO(S.flat(1).filter(VO).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function qA(A,b,R,S,x,U){let O=(s,u)=>R[u]?s.route.id!==R[u].route.id:!0,h=(s,u)=>R[u].pathname!==s.pathname||R[u].route.path?.endsWith("*")&&R[u].params["*"]!==s.params["*"];return U==="assets"?b.filter((s,u)=>O(s,u)||h(s,u)):U==="data"?b.filter((s,u)=>{let p=S.routes[s.route.id];if(!p||!p.hasLoader)return!1;if(O(s,u)||h(s,u))return!0;if(s.route.shouldRevalidate){let v=s.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:R[0]?.params||{},nextUrl:new URL(A,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function KO(A,b,{includeHydrateFallback:R}={}){return GO(A.map(S=>{let x=b.routes[S.route.id];if(!x)return[];let U=[x.module];return x.clientActionModule&&(U=U.concat(x.clientActionModule)),x.clientLoaderModule&&(U=U.concat(x.clientLoaderModule)),R&&x.hydrateFallbackModule&&(U=U.concat(x.hydrateFallbackModule)),x.imports&&(U=U.concat(x.imports)),U}).flat(1))}function GO(A){return[...new Set(A)]}function FO(A){let b={},R=Object.keys(A).sort();for(let S of R)b[S]=A[S];return b}function qO(A,b){let R=new Set;return new Set(b),A.reduce((S,x)=>{let U=JSON.stringify(FO(x));return R.has(U)||(R.add(U),S.push({key:U,link:x})),S},[])}function SC(){let A=Se.useContext(Pp);return P2(A,"You must render this element inside a <DataRouterContext.Provider> element"),A}function zO(){let A=Se.useContext(dv);return P2(A,"You must render this element inside a <DataRouterStateContext.Provider> element"),A}var L2=Se.createContext(void 0);L2.displayName="FrameworkContext";function wC(){let A=Se.useContext(L2);return P2(A,"You must render this element inside a <HydratedRouter> element"),A}function XO(A,b){let R=Se.useContext(L2),[S,x]=Se.useState(!1),[U,O]=Se.useState(!1),{onFocus:h,onBlur:s,onMouseEnter:u,onMouseLeave:p,onTouchStart:v}=b,N=Se.useRef(null);Se.useEffect(()=>{if(A==="render"&&O(!0),A==="viewport"){let $=me=>{me.forEach(Ve=>{O(Ve.isIntersecting)})},oe=new IntersectionObserver($,{threshold:.5});return N.current&&oe.observe(N.current),()=>{oe.disconnect()}}},[A]),Se.useEffect(()=>{if(S){let $=setTimeout(()=>{O(!0)},100);return()=>{clearTimeout($)}}},[S]);let Z=()=>{x(!0)},C=()=>{x(!1),O(!1)};return R?A!=="intent"?[U,N,{}]:[U,N,{onFocus:rg(h,Z),onBlur:rg(s,C),onMouseEnter:rg(u,Z),onMouseLeave:rg(p,C),onTouchStart:rg(v,Z)}]:[!1,N,{}]}function rg(A,b){return R=>{A&&A(R),R.defaultPrevented||b(R)}}function YO({page:A,...b}){let{router:R}=SC(),S=Se.useMemo(()=>aC(R.routes,A,R.basename),[R.routes,A,R.basename]);return S?Se.createElement(QO,{page:A,matches:S,...b}):null}function WO(A){let{manifest:b,routeModules:R}=wC(),[S,x]=Se.useState([]);return Se.useEffect(()=>{let U=!1;return HO(A,b,R).then(O=>{U||x(O)}),()=>{U=!0}},[A,b,R]),S}function QO({page:A,matches:b,...R}){let S=_f(),{manifest:x,routeModules:U}=wC(),{basename:O}=SC(),{loaderData:h,matches:s}=zO(),u=Se.useMemo(()=>qA(A,b,s,x,S,"data"),[A,b,s,x,S]),p=Se.useMemo(()=>qA(A,b,s,x,S,"assets"),[A,b,s,x,S]),v=Se.useMemo(()=>{if(A===S.pathname+S.search+S.hash)return[];let C=new Set,$=!1;if(b.forEach(me=>{let Ve=x.routes[me.route.id];!Ve||!Ve.hasLoader||(!u.some(ue=>ue.route.id===me.route.id)&&me.route.id in h&&U[me.route.id]?.shouldRevalidate||Ve.hasClientLoader?$=!0:C.add(me.route.id))}),C.size===0)return[];let oe=jO(A,O,"data");return $&&C.size>0&&oe.searchParams.set("_routes",b.filter(me=>C.has(me.route.id)).map(me=>me.route.id).join(",")),[oe.pathname+oe.search]},[O,h,S,x,u,b,A,U]),N=Se.useMemo(()=>KO(p,x),[p,x]),Z=WO(p);return Se.createElement(Se.Fragment,null,v.map(C=>Se.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...R})),N.map(C=>Se.createElement("link",{key:C,rel:"modulepreload",href:C,...R})),Z.map(({key:C,link:$})=>Se.createElement("link",{key:C,...$})))}function JO(...A){return b=>{A.forEach(R=>{typeof R=="function"?R(b):R!=null&&(R.current=b)})}}var TC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{TC&&(window.__reactRouterVersion="7.7.0")}catch{}function ZO({basename:A,children:b,window:R}){let S=Se.useRef();S.current==null&&(S.current=B4({window:R,v5Compat:!0}));let x=S.current,[U,O]=Se.useState({action:x.action,location:x.location}),h=Se.useCallback(s=>{Se.startTransition(()=>O(s))},[O]);return Se.useLayoutEffect(()=>x.listen(h),[x,h]),Se.createElement(kO,{basename:A,children:b,location:U.location,navigationType:U.action,navigator:x})}var xC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,EC=Se.forwardRef(function({onClick:b,discover:R="render",prefetch:S="none",relative:x,reloadDocument:U,replace:O,state:h,target:s,to:u,preventScrollReset:p,viewTransition:v,...N},Z){let{basename:C}=Se.useContext(Wu),$=typeof u=="string"&&xC.test(u),oe,me=!1;if(typeof u=="string"&&$&&(oe=u,TC))try{let _t=new URL(window.location.href),_=u.startsWith("//")?new URL(_t.protocol+u):new URL(u),ce=is(_.pathname,C);_.origin===_t.origin&&ce!=null?u=ce+_.search+_.hash:me=!0}catch{Yu(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let Ve=dO(u,{relative:x}),[ue,Ne,Re]=XO(S,N),$e=tR(u,{replace:O,state:h,target:s,preventScrollReset:p,relative:x,viewTransition:v});function it(_t){b&&b(_t),_t.defaultPrevented||$e(_t)}let Dt=Se.createElement("a",{...N,...Re,href:oe||Ve,onClick:me||U?b:it,ref:JO(Z,Ne),target:s,"data-discover":!$&&R==="render"?"true":void 0});return ue&&!$?Se.createElement(Se.Fragment,null,Dt,Se.createElement(YO,{page:Ve})):Dt});EC.displayName="Link";var Yl=Se.forwardRef(function({"aria-current":b="page",caseSensitive:R=!1,className:S="",end:x=!1,style:U,to:O,viewTransition:h,children:s,...u},p){let v=dg(O,{relative:u.relative}),N=_f(),Z=Se.useContext(dv),{navigator:C,basename:$}=Se.useContext(Wu),oe=Z!=null&&lR(v)&&h===!0,me=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,Ve=N.pathname,ue=Z&&Z.navigation&&Z.navigation.location?Z.navigation.location.pathname:null;R||(Ve=Ve.toLowerCase(),ue=ue?ue.toLowerCase():null,me=me.toLowerCase()),ue&&$&&(ue=is(ue,$)||ue);const Ne=me!=="/"&&me.endsWith("/")?me.length-1:me.length;let Re=Ve===me||!x&&Ve.startsWith(me)&&Ve.charAt(Ne)==="/",$e=ue!=null&&(ue===me||!x&&ue.startsWith(me)&&ue.charAt(me.length)==="/"),it={isActive:Re,isPending:$e,isTransitioning:oe},Dt=Re?b:void 0,_t;typeof S=="function"?_t=S(it):_t=[S,Re?"active":null,$e?"pending":null,oe?"transitioning":null].filter(Boolean).join(" ");let _=typeof U=="function"?U(it):U;return Se.createElement(EC,{...u,"aria-current":Dt,className:_t,ref:p,style:_,to:O,viewTransition:h},typeof s=="function"?s(it):s)});Yl.displayName="NavLink";var $O=Se.forwardRef(({discover:A="render",fetcherKey:b,navigate:R,reloadDocument:S,replace:x,state:U,method:O=rv,action:h,onSubmit:s,relative:u,preventScrollReset:p,viewTransition:v,...N},Z)=>{let C=rR(),$=oR(h,{relative:u}),oe=O.toLowerCase()==="get"?"get":"post",me=typeof h=="string"&&xC.test(h),Ve=ue=>{if(s&&s(ue),ue.defaultPrevented)return;ue.preventDefault();let Ne=ue.nativeEvent.submitter,Re=Ne?.getAttribute("formmethod")||O;C(Ne||ue.currentTarget,{fetcherKey:b,method:Re,navigate:R,replace:x,state:U,relative:u,preventScrollReset:p,viewTransition:v})};return Se.createElement("form",{ref:Z,method:oe,action:$,onSubmit:S?s:Ve,...N,"data-discover":!me&&A==="render"?"true":void 0})});$O.displayName="Form";function eR(A){return`${A} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function AC(A){let b=Se.useContext(Pp);return Qn(b,eR(A)),b}function tR(A,{target:b,replace:R,state:S,preventScrollReset:x,relative:U,viewTransition:O}={}){let h=pO(),s=_f(),u=dg(A,{relative:U});return Se.useCallback(p=>{if(PO(p,b)){p.preventDefault();let v=R!==void 0?R:ag(s)===ag(u);h(A,{replace:v,state:S,preventScrollReset:x,relative:U,viewTransition:O})}},[s,h,u,R,S,b,A,x,U,O])}var nR=0,iR=()=>`__${String(++nR)}__`;function rR(){let{router:A}=AC("useSubmit"),{basename:b}=Se.useContext(Wu),R=AO();return Se.useCallback(async(S,x={})=>{let{action:U,method:O,encType:h,formData:s,body:u}=UO(S,b);if(x.navigate===!1){let p=x.fetcherKey||iR();await A.fetch(p,R,x.action||U,{preventScrollReset:x.preventScrollReset,formData:s,body:u,formMethod:x.method||O,formEncType:x.encType||h,flushSync:x.flushSync})}else await A.navigate(x.action||U,{preventScrollReset:x.preventScrollReset,formData:s,body:u,formMethod:x.method||O,formEncType:x.encType||h,replace:x.replace,state:x.state,fromRouteId:R,flushSync:x.flushSync,viewTransition:x.viewTransition})},[A,b,R])}function oR(A,{relative:b}={}){let{basename:R}=Se.useContext(Wu),S=Se.useContext(rs);Qn(S,"useFormAction must be used inside a RouteContext");let[x]=S.matches.slice(-1),U={...dg(A||".",{relative:b})},O=_f();if(A==null){U.search=O.search;let h=new URLSearchParams(U.search),s=h.getAll("index");if(s.some(p=>p==="")){h.delete("index"),s.filter(v=>v).forEach(v=>h.append("index",v));let p=h.toString();U.search=p?`?${p}`:""}}return(!A||A===".")&&x.route.index&&(U.search=U.search?U.search.replace(/^\?/,"?index&"):"?index"),R!=="/"&&(U.pathname=U.pathname==="/"?R:ns([R,U.pathname])),ag(U)}function lR(A,b={}){let R=Se.useContext(hC);Qn(R!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:S}=AC("useViewTransitionState"),x=dg(A,{relative:b.relative});if(!R.isTransitioning)return!1;let U=is(R.currentLocation.pathname,S)||R.currentLocation.pathname,O=is(R.nextLocation.pathname,S)||R.nextLocation.pathname;return sv(x.pathname,O)!=null||sv(x.pathname,U)!=null}/*!
 * 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(A){(function(b,R,S){var x=function U(O){var h=R[O];return h||b[O][0].call(h=R[O]={exports:{}},U,h,h.exports),h.exports}(S[0]);x.util.global.protobuf=x,typeof define=="function"&&define.amd&&define(["long"],function(U){return U&&U.isLong&&(x.util.Long=U,x.configure()),x}),typeof ug=="object"&&ug&&ug.exports&&(ug.exports=x)})({1:[function(b,R,S){R.exports=function(x,U){for(var O=Array(arguments.length-1),h=0,s=2,u=!0;s<arguments.length;)O[h++]=arguments[s++];return new Promise(function(p,v){O[h]=function(N){if(u)if(u=!1,N)v(N);else{for(var Z=Array(arguments.length-1),C=0;C<Z.length;)Z[C++]=arguments[C];p.apply(null,Z)}};try{x.apply(U||null,O)}catch(N){u&&(u=!1,v(N))}})}},{}],2:[function(b,R,S){S.length=function(s){var u=s.length;if(!u)return 0;for(var p=0;1<--u%4&&(s[0|u]||"")=="=";)++p;return Math.ceil(3*s.length)/4-p};for(var x=Array(64),U=Array(123),O=0;O<64;)U[x[O]=O<26?O+65:O<52?O+71:O<62?O-4:O-59|43]=O++;S.encode=function(s,u,p){for(var v,N=null,Z=[],C=0,$=0;u<p;){var oe=s[u++];switch($){case 0:Z[C++]=x[oe>>2],v=(3&oe)<<4,$=1;break;case 1:Z[C++]=x[v|oe>>4],v=(15&oe)<<2,$=2;break;case 2:Z[C++]=x[v|oe>>6],Z[C++]=x[63&oe],$=0}8191<C&&((N=N||[]).push(String.fromCharCode.apply(String,Z)),C=0)}return $&&(Z[C++]=x[v],Z[C++]=61,$===1&&(Z[C++]=61)),N?(C&&N.push(String.fromCharCode.apply(String,Z.slice(0,C))),N.join("")):String.fromCharCode.apply(String,Z.slice(0,C))};var h="invalid encoding";S.decode=function(s,u,p){for(var v,N=p,Z=0,C=0;C<s.length;){var $=s.charCodeAt(C++);if($==61&&1<Z)break;if(($=U[$])===A)throw Error(h);switch(Z){case 0:v=$,Z=1;break;case 1:u[p++]=v<<2|(48&$)>>4,v=$,Z=2;break;case 2:u[p++]=(15&v)<<4|(60&$)>>2,v=$,Z=3;break;case 3:u[p++]=(3&v)<<6|$,Z=0}}if(Z===1)throw Error(h);return p-N},S.test=function(s){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s)}},{}],3:[function(b,R,S){function x(){this.t={}}(R.exports=x).prototype.on=function(U,O,h){return(this.t[U]||(this.t[U]=[])).push({fn:O,ctx:h||this}),this},x.prototype.off=function(U,O){if(U===A)this.t={};else if(O===A)this.t[U]=[];else for(var h=this.t[U],s=0;s<h.length;)h[s].fn===O?h.splice(s,1):++s;return this},x.prototype.emit=function(U){var O=this.t[U];if(O){for(var h=[],s=1;s<arguments.length;)h.push(arguments[s++]);for(s=0;s<O.length;)O[s].fn.apply(O[s++].ctx,h)}return this}},{}],4:[function(b,R,S){function x(u){function p(ce,he,ot,_e){var De=he<0?1:0;ce((he=De?-he:he)===0?0<1/he?0:2147483648:isNaN(he)?2143289344:34028234663852886e22<he?(De<<31|2139095040)>>>0:he<11754943508222875e-54?(De<<31|Math.round(he/1401298464324817e-60))>>>0:(De<<31|127+(ce=Math.floor(Math.log(he)/Math.LN2))<<23|8388607&Math.round(he*Math.pow(2,-ce)*8388608))>>>0,ot,_e)}function v(ce,he,ot){return ce=ce(he,ot),he=2*(ce>>31)+1,ot=ce>>>23&255,ce&=8388607,ot==255?ce?NaN:1/0*he:ot==0?1401298464324817e-60*he*ce:he*Math.pow(2,ot-150)*(8388608+ce)}function N(ce,he,ot){oe[0]=ce,he[ot]=me[0],he[ot+1]=me[1],he[ot+2]=me[2],he[ot+3]=me[3]}function Z(ce,he,ot){oe[0]=ce,he[ot]=me[3],he[ot+1]=me[2],he[ot+2]=me[1],he[ot+3]=me[0]}function C(ce,he){return me[0]=ce[he],me[1]=ce[he+1],me[2]=ce[he+2],me[3]=ce[he+3],oe[0]}function $(ce,he){return me[3]=ce[he],me[2]=ce[he+1],me[1]=ce[he+2],me[0]=ce[he+3],oe[0]}var oe,me,Ve,ue,Ne;function Re(ce,he,ot,_e,De,xe){var Ue,gt=_e<0?1:0;(_e=gt?-_e:_e)===0?(ce(0,De,xe+he),ce(0<1/_e?0:2147483648,De,xe+ot)):isNaN(_e)?(ce(0,De,xe+he),ce(2146959360,De,xe+ot)):17976931348623157e292<_e?(ce(0,De,xe+he),ce((gt<<31|2146435072)>>>0,De,xe+ot)):_e<22250738585072014e-324?(ce((Ue=_e/5e-324)>>>0,De,xe+he),ce((gt<<31|Ue/4294967296)>>>0,De,xe+ot)):(ce(4503599627370496*(Ue=_e*Math.pow(2,-(_e=(_e=Math.floor(Math.log(_e)/Math.LN2))===1024?1023:_e)))>>>0,De,xe+he),ce((gt<<31|_e+1023<<20|1048576*Ue&1048575)>>>0,De,xe+ot))}function $e(ce,he,ot,_e,De){return he=ce(_e,De+he),ce=ce(_e,De+ot),_e=2*(ce>>31)+1,De=ce>>>20&2047,ot=4294967296*(1048575&ce)+he,De==2047?ot?NaN:1/0*_e:De==0?5e-324*_e*ot:_e*Math.pow(2,De-1075)*(ot+4503599627370496)}function it(ce,he,ot){Ve[0]=ce,he[ot]=ue[0],he[ot+1]=ue[1],he[ot+2]=ue[2],he[ot+3]=ue[3],he[ot+4]=ue[4],he[ot+5]=ue[5],he[ot+6]=ue[6],he[ot+7]=ue[7]}function Dt(ce,he,ot){Ve[0]=ce,he[ot]=ue[7],he[ot+1]=ue[6],he[ot+2]=ue[5],he[ot+3]=ue[4],he[ot+4]=ue[3],he[ot+5]=ue[2],he[ot+6]=ue[1],he[ot+7]=ue[0]}function _t(ce,he){return ue[0]=ce[he],ue[1]=ce[he+1],ue[2]=ce[he+2],ue[3]=ce[he+3],ue[4]=ce[he+4],ue[5]=ce[he+5],ue[6]=ce[he+6],ue[7]=ce[he+7],Ve[0]}function _(ce,he){return ue[7]=ce[he],ue[6]=ce[he+1],ue[5]=ce[he+2],ue[4]=ce[he+3],ue[3]=ce[he+4],ue[2]=ce[he+5],ue[1]=ce[he+6],ue[0]=ce[he+7],Ve[0]}return typeof Float32Array<"u"?(oe=new Float32Array([-0]),me=new Uint8Array(oe.buffer),Ne=me[3]===128,u.writeFloatLE=Ne?N:Z,u.writeFloatBE=Ne?Z:N,u.readFloatLE=Ne?C:$,u.readFloatBE=Ne?$:C):(u.writeFloatLE=p.bind(null,U),u.writeFloatBE=p.bind(null,O),u.readFloatLE=v.bind(null,h),u.readFloatBE=v.bind(null,s)),typeof Float64Array<"u"?(Ve=new Float64Array([-0]),ue=new Uint8Array(Ve.buffer),Ne=ue[7]===128,u.writeDoubleLE=Ne?it:Dt,u.writeDoubleBE=Ne?Dt:it,u.readDoubleLE=Ne?_t:_,u.readDoubleBE=Ne?_:_t):(u.writeDoubleLE=Re.bind(null,U,0,4),u.writeDoubleBE=Re.bind(null,O,4,0),u.readDoubleLE=$e.bind(null,h,0,4),u.readDoubleBE=$e.bind(null,s,4,0)),u}function U(u,p,v){p[v]=255&u,p[v+1]=u>>>8&255,p[v+2]=u>>>16&255,p[v+3]=u>>>24}function O(u,p,v){p[v]=u>>>24,p[v+1]=u>>>16&255,p[v+2]=u>>>8&255,p[v+3]=255&u}function h(u,p){return(u[p]|u[p+1]<<8|u[p+2]<<16|u[p+3]<<24)>>>0}function s(u,p){return(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])>>>0}R.exports=x(x)},{}],5:[function(b,R,S){function x(U){try{var O=void 0;if(O&&(O.length||Object.keys(O).length))return O}catch{}return null}R.exports=x},{}],6:[function(b,R,S){R.exports=function(x,U,O){var h=O||8192,s=h>>>1,u=null,p=h;return function(v){return v<1||s<v?x(v):(h<p+v&&(u=x(h),p=0),v=U.call(u,p,p+=v),7&p&&(p=1+(7|p)),v)}}},{}],7:[function(b,R,S){S.length=function(x){for(var U,O=0,h=0;h<x.length;++h)(U=x.charCodeAt(h))<128?O+=1:U<2048?O+=2:(64512&U)==55296&&(64512&x.charCodeAt(h+1))==56320?(++h,O+=4):O+=3;return O},S.read=function(x,U,O){if(O-U<1)return"";for(var h,s=null,u=[],p=0;U<O;)(h=x[U++])<128?u[p++]=h:191<h&&h<224?u[p++]=(31&h)<<6|63&x[U++]:239<h&&h<365?(h=((7&h)<<18|(63&x[U++])<<12|(63&x[U++])<<6|63&x[U++])-65536,u[p++]=55296+(h>>10),u[p++]=56320+(1023&h)):u[p++]=(15&h)<<12|(63&x[U++])<<6|63&x[U++],8191<p&&((s=s||[]).push(String.fromCharCode.apply(String,u)),p=0);return s?(p&&s.push(String.fromCharCode.apply(String,u.slice(0,p))),s.join("")):String.fromCharCode.apply(String,u.slice(0,p))},S.write=function(x,U,O){for(var h,s,u=O,p=0;p<x.length;++p)(h=x.charCodeAt(p))<128?U[O++]=h:(h<2048?U[O++]=h>>6|192:((64512&h)==55296&&(64512&(s=x.charCodeAt(p+1)))==56320?(++p,U[O++]=(h=65536+((1023&h)<<10)+(1023&s))>>18|240,U[O++]=h>>12&63|128):U[O++]=h>>12|224,U[O++]=h>>6&63|128),U[O++]=63&h|128);return O-u}},{}],8:[function(b,R,S){var x=S;function U(){x.util.n(),x.Writer.n(x.BufferWriter),x.Reader.n(x.BufferReader)}x.build="minimal",x.Writer=b(16),x.BufferWriter=b(17),x.Reader=b(9),x.BufferReader=b(10),x.util=b(15),x.rpc=b(12),x.roots=b(11),x.configure=U,U()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(b,R,S){R.exports=u;var x,U=b(15),O=U.LongBits,h=U.utf8;function s(oe,me){return RangeError("index out of range: "+oe.pos+" + "+(me||1)+" > "+oe.len)}function u(oe){this.buf=oe,this.pos=0,this.len=oe.length}function p(){return U.Buffer?function(oe){return(u.create=function(me){return U.Buffer.isBuffer(me)?new x(me):N(me)})(oe)}:N}var v,N=typeof Uint8Array<"u"?function(oe){if(oe instanceof Uint8Array||Array.isArray(oe))return new u(oe);throw Error("illegal buffer")}:function(oe){if(Array.isArray(oe))return new u(oe);throw Error("illegal buffer")};function Z(){var oe=new O(0,0),me=0;if(!(4<this.len-this.pos)){for(;me<3;++me){if(this.pos>=this.len)throw s(this);if(oe.lo=(oe.lo|(127&this.buf[this.pos])<<7*me)>>>0,this.buf[this.pos++]<128)return oe}return oe.lo=(oe.lo|(127&this.buf[this.pos++])<<7*me)>>>0,oe}for(;me<4;++me)if(oe.lo=(oe.lo|(127&this.buf[this.pos])<<7*me)>>>0,this.buf[this.pos++]<128)return oe;if(oe.lo=(oe.lo|(127&this.buf[this.pos])<<28)>>>0,oe.hi=(oe.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return oe;if(me=0,4<this.len-this.pos){for(;me<5;++me)if(oe.hi=(oe.hi|(127&this.buf[this.pos])<<7*me+3)>>>0,this.buf[this.pos++]<128)return oe}else for(;me<5;++me){if(this.pos>=this.len)throw s(this);if(oe.hi=(oe.hi|(127&this.buf[this.pos])<<7*me+3)>>>0,this.buf[this.pos++]<128)return oe}throw Error("invalid varint encoding")}function C(oe,me){return(oe[me-4]|oe[me-3]<<8|oe[me-2]<<16|oe[me-1]<<24)>>>0}function $(){if(this.pos+8>this.len)throw s(this,8);return new O(C(this.buf,this.pos+=4),C(this.buf,this.pos+=4))}u.create=p(),u.prototype.i=U.Array.prototype.subarray||U.Array.prototype.slice,u.prototype.uint32=(v=4294967295,function(){if(v=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(v=(v|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(v=(v|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return v;throw this.pos=this.len,s(this,10)}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var oe=this.uint32();return oe>>>1^-(1&oe)|0},u.prototype.bool=function(){return this.uint32()!==0},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return C(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|C(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var oe=U.float.readFloatLE(this.buf,this.pos);return this.pos+=4,oe},u.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var oe=U.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,oe},u.prototype.bytes=function(){var oe=this.uint32(),me=this.pos,Ve=this.pos+oe;if(Ve>this.len)throw s(this,oe);return this.pos+=oe,Array.isArray(this.buf)?this.buf.slice(me,Ve):me===Ve?(oe=U.Buffer)?oe.alloc(0):new this.buf.constructor(0):this.i.call(this.buf,me,Ve)},u.prototype.string=function(){var oe=this.bytes();return h.read(oe,0,oe.length)},u.prototype.skip=function(oe){if(typeof oe=="number"){if(this.pos+oe>this.len)throw s(this,oe);this.pos+=oe}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(oe){switch(oe){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(oe=7&this.uint32())!=4;)this.skipType(oe);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+oe+" at offset "+this.pos)}return this},u.n=function(oe){x=oe,u.create=p(),x.n();var me=U.Long?"toLong":"toNumber";U.merge(u.prototype,{int64:function(){return Z.call(this)[me](!1)},uint64:function(){return Z.call(this)[me](!0)},sint64:function(){return Z.call(this).zzDecode()[me](!1)},fixed64:function(){return $.call(this)[me](!0)},sfixed64:function(){return $.call(this)[me](!1)}})}},{15:15}],10:[function(b,R,S){R.exports=O;var x=b(9),U=((O.prototype=Object.create(x.prototype)).constructor=O,b(15));function O(h){x.call(this,h)}O.n=function(){U.Buffer&&(O.prototype.i=U.Buffer.prototype.slice)},O.prototype.string=function(){var h=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+h,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+h,this.len))},O.n()},{15:15,9:9}],11:[function(b,R,S){R.exports={}},{}],12:[function(b,R,S){S.Service=b(13)},{13:13}],13:[function(b,R,S){R.exports=U;var x=b(15);function U(O,h,s){if(typeof O!="function")throw TypeError("rpcImpl must be a function");x.EventEmitter.call(this),this.rpcImpl=O,this.requestDelimited=!!h,this.responseDelimited=!!s}((U.prototype=Object.create(x.EventEmitter.prototype)).constructor=U).prototype.rpcCall=function O(h,s,u,p,v){if(!p)throw TypeError("request must be specified");var N=this;if(!v)return x.asPromise(O,N,h,s,u,p);if(!N.rpcImpl)return setTimeout(function(){v(Error("already ended"))},0),A;try{return N.rpcImpl(h,s[N.requestDelimited?"encodeDelimited":"encode"](p).finish(),function(Z,C){if(Z)return N.emit("error",Z,h),v(Z);if(C===null)return N.end(!0),A;if(!(C instanceof u))try{C=u[N.responseDelimited?"decodeDelimited":"decode"](C)}catch($){return N.emit("error",$,h),v($)}return N.emit("data",C,h),v(null,C)})}catch(Z){return N.emit("error",Z,h),setTimeout(function(){v(Z)},0),A}},U.prototype.end=function(O){return this.rpcImpl&&(O||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(b,R,S){R.exports=U;var x=b(15);function U(s,u){this.lo=s>>>0,this.hi=u>>>0}var O=U.zero=new U(0,0),h=(O.toNumber=function(){return 0},O.zzEncode=O.zzDecode=function(){return this},O.length=function(){return 1},U.zeroHash="\0\0\0\0\0\0\0\0",U.fromNumber=function(s){var u,p;return s===0?O:(p=(s=(u=s<0)?-s:s)>>>0,s=(s-p)/4294967296>>>0,u&&(s=~s>>>0,p=~p>>>0,4294967295<++p&&(p=0,4294967295<++s&&(s=0))),new U(p,s))},U.from=function(s){if(typeof s=="number")return U.fromNumber(s);if(x.isString(s)){if(!x.Long)return U.fromNumber(parseInt(s,10));s=x.Long.fromString(s)}return s.low||s.high?new U(s.low>>>0,s.high>>>0):O},U.prototype.toNumber=function(s){var u;return!s&&this.hi>>>31?(s=1+~this.lo>>>0,u=~this.hi>>>0,-(s+4294967296*(u=s?u:u+1>>>0))):this.lo+4294967296*this.hi},U.prototype.toLong=function(s){return x.Long?new x.Long(0|this.lo,0|this.hi,!!s):{low:0|this.lo,high:0|this.hi,unsigned:!!s}},String.prototype.charCodeAt);U.fromHash=function(s){return s==="\0\0\0\0\0\0\0\0"?O:new U((h.call(s,0)|h.call(s,1)<<8|h.call(s,2)<<16|h.call(s,3)<<24)>>>0,(h.call(s,4)|h.call(s,5)<<8|h.call(s,6)<<16|h.call(s,7)<<24)>>>0)},U.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)},U.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},U.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},U.prototype.length=function(){var s=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p==0?u==0?s<16384?s<128?1:2:s<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:p<128?9:10}},{15:15}],15:[function(b,R,S){var x=S;function U(h,s,u){for(var p=Object.keys(s),v=0;v<p.length;++v)h[p[v]]!==A&&u||(h[p[v]]=s[p[v]]);return h}function O(h){function s(u,p){if(!(this instanceof s))return new s(u,p);Object.defineProperty(this,"message",{get:function(){return u}}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack||""}),p&&U(this,p)}return s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return h},set:A,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),s}x.asPromise=b(1),x.base64=b(2),x.EventEmitter=b(3),x.float=b(4),x.inquire=b(5),x.utf8=b(7),x.pool=b(6),x.LongBits=b(14),x.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),x.global=x.isNode&&global||!1||typeof self<"u"&&self||this,x.emptyArray=Object.freeze?Object.freeze([]):[],x.emptyObject=Object.freeze?Object.freeze({}):{},x.isInteger=Number.isInteger||function(h){return typeof h=="number"&&isFinite(h)&&Math.floor(h)===h},x.isString=function(h){return typeof h=="string"||h instanceof String},x.isObject=function(h){return h&&typeof h=="object"},x.isset=x.isSet=function(h,s){var u=h[s];return u!=null&&h.hasOwnProperty(s)&&(typeof u!="object"||0<(Array.isArray(u)?u:Object.keys(u)).length)},x.Buffer=function(){try{var h=x.inquire("buffer").Buffer;return h.prototype.utf8Write?h:null}catch{return null}}(),x.r=null,x.u=null,x.newBuffer=function(h){return typeof h=="number"?x.Buffer?x.u(h):new x.Array(h):x.Buffer?x.r(h):typeof Uint8Array>"u"?h:new Uint8Array(h)},x.Array=typeof Uint8Array<"u"?Uint8Array:Array,x.Long=x.global.dcodeIO&&x.global.dcodeIO.Long||x.global.Long||x.inquire("long"),x.key2Re=/^true|false|0|1$/,x.key32Re=/^-?(?:0|[1-9][0-9]*)$/,x.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,x.longToHash=function(h){return h?x.LongBits.from(h).toHash():x.LongBits.zeroHash},x.longFromHash=function(h,s){return h=x.LongBits.fromHash(h),x.Long?x.Long.fromBits(h.lo,h.hi,s):h.toNumber(!!s)},x.merge=U,x.lcFirst=function(h){return(h[0]||"").toLowerCase()+h.substring(1)},x.newError=O,x.ProtocolError=O("ProtocolError"),x.oneOfGetter=function(h){for(var s={},u=0;u<h.length;++u)s[h[u]]=1;return function(){for(var p=Object.keys(this),v=p.length-1;-1<v;--v)if(s[p[v]]===1&&this[p[v]]!==A&&this[p[v]]!==null)return p[v]}},x.oneOfSetter=function(h){return function(s){for(var u=0;u<h.length;++u)h[u]!==s&&delete this[h[u]]}},x.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},x.n=function(){var h=x.Buffer;h?(x.r=h.from!==Uint8Array.from&&h.from||function(s,u){return new h(s,u)},x.u=h.allocUnsafe||function(s){return new h(s)}):x.r=x.u=null}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(b,R,S){R.exports=N;var x,U=b(15),O=U.LongBits,h=U.base64,s=U.utf8;function u(ue,Ne,Re){this.fn=ue,this.len=Ne,this.next=A,this.val=Re}function p(){}function v(ue){this.head=ue.head,this.tail=ue.tail,this.len=ue.len,this.next=ue.states}function N(){this.len=0,this.head=new u(p,0,0),this.tail=this.head,this.states=null}function Z(){return U.Buffer?function(){return(N.create=function(){return new x})()}:function(){return new N}}function C(ue,Ne,Re){Ne[Re]=255&ue}function $(ue,Ne){this.len=ue,this.next=A,this.val=Ne}function oe(ue,Ne,Re){for(;ue.hi;)Ne[Re++]=127&ue.lo|128,ue.lo=(ue.lo>>>7|ue.hi<<25)>>>0,ue.hi>>>=7;for(;127<ue.lo;)Ne[Re++]=127&ue.lo|128,ue.lo=ue.lo>>>7;Ne[Re++]=ue.lo}function me(ue,Ne,Re){Ne[Re]=255&ue,Ne[Re+1]=ue>>>8&255,Ne[Re+2]=ue>>>16&255,Ne[Re+3]=ue>>>24}N.create=Z(),N.alloc=function(ue){return new U.Array(ue)},U.Array!==Array&&(N.alloc=U.pool(N.alloc,U.Array.prototype.subarray)),N.prototype.e=function(ue,Ne,Re){return this.tail=this.tail.next=new u(ue,Ne,Re),this.len+=Ne,this},($.prototype=Object.create(u.prototype)).fn=function(ue,Ne,Re){for(;127<ue;)Ne[Re++]=127&ue|128,ue>>>=7;Ne[Re]=ue},N.prototype.uint32=function(ue){return this.len+=(this.tail=this.tail.next=new $((ue>>>=0)<128?1:ue<16384?2:ue<2097152?3:ue<268435456?4:5,ue)).len,this},N.prototype.int32=function(ue){return ue<0?this.e(oe,10,O.fromNumber(ue)):this.uint32(ue)},N.prototype.sint32=function(ue){return this.uint32((ue<<1^ue>>31)>>>0)},N.prototype.int64=N.prototype.uint64=function(ue){return ue=O.from(ue),this.e(oe,ue.length(),ue)},N.prototype.sint64=function(ue){return ue=O.from(ue).zzEncode(),this.e(oe,ue.length(),ue)},N.prototype.bool=function(ue){return this.e(C,1,ue?1:0)},N.prototype.sfixed32=N.prototype.fixed32=function(ue){return this.e(me,4,ue>>>0)},N.prototype.sfixed64=N.prototype.fixed64=function(ue){return ue=O.from(ue),this.e(me,4,ue.lo).e(me,4,ue.hi)},N.prototype.float=function(ue){return this.e(U.float.writeFloatLE,4,ue)},N.prototype.double=function(ue){return this.e(U.float.writeDoubleLE,8,ue)};var Ve=U.Array.prototype.set?function(ue,Ne,Re){Ne.set(ue,Re)}:function(ue,Ne,Re){for(var $e=0;$e<ue.length;++$e)Ne[Re+$e]=ue[$e]};N.prototype.bytes=function(ue){var Ne,Re=ue.length>>>0;return Re?(U.isString(ue)&&(Ne=N.alloc(Re=h.length(ue)),h.decode(ue,Ne,0),ue=Ne),this.uint32(Re).e(Ve,Re,ue)):this.e(C,1,0)},N.prototype.string=function(ue){var Ne=s.length(ue);return Ne?this.uint32(Ne).e(s.write,Ne,ue):this.e(C,1,0)},N.prototype.fork=function(){return this.states=new v(this),this.head=this.tail=new u(p,0,0),this.len=0,this},N.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 u(p,0,0),this.len=0),this},N.prototype.ldelim=function(){var ue=this.head,Ne=this.tail,Re=this.len;return this.reset().uint32(Re),Re&&(this.tail.next=ue.next,this.tail=Ne,this.len+=Re),this},N.prototype.finish=function(){for(var ue=this.head.next,Ne=this.constructor.alloc(this.len),Re=0;ue;)ue.fn(ue.val,Ne,Re),Re+=ue.len,ue=ue.next;return Ne},N.n=function(ue){x=ue,N.create=Z(),x.n()}},{15:15}],17:[function(b,R,S){R.exports=O;var x=b(16),U=((O.prototype=Object.create(x.prototype)).constructor=O,b(15));function O(){x.call(this)}function h(s,u,p){s.length<40?U.utf8.write(s,u,p):u.utf8Write?u.utf8Write(s,p):u.write(s,p)}O.n=function(){O.alloc=U.u,O.writeBytesBuffer=U.Buffer&&U.Buffer.prototype instanceof Uint8Array&&U.Buffer.prototype.set.name==="set"?function(s,u,p){u.set(s,p)}:function(s,u,p){if(s.copy)s.copy(u,p,0,s.length);else for(var v=0;v<s.length;)u[p++]=s[v++]}},O.prototype.bytes=function(s){var u=(s=U.isString(s)?U.r(s,"base64"):s).length>>>0;return this.uint32(u),u&&this.e(O.writeBytesBuffer,u,s),this},O.prototype.string=function(s){var u=U.Buffer.byteLength(s);return this.uint32(u),u&&this.e(h,u,s),this},O.n()},{15:15,16:16}]},{},[8])})();(function(A){var b=A.Reader,R=A.Writer,S=A.util,x=A.roots.default||(A.roots.default={});return x.license_protocol=function(){var U={};return U.LicenseType=function(){var O={},h=Object.create(O);return h[O[1]="STREAMING"]=1,h[O[2]="OFFLINE"]=2,h[O[3]="AUTOMATIC"]=3,h}(),U.PlatformVerificationStatus=function(){var O={},h=Object.create(O);return h[O[0]="PLATFORM_UNVERIFIED"]=0,h[O[1]="PLATFORM_TAMPERED"]=1,h[O[2]="PLATFORM_SOFTWARE_VERIFIED"]=2,h[O[3]="PLATFORM_HARDWARE_VERIFIED"]=3,h[O[4]="PLATFORM_NO_VERIFICATION"]=4,h[O[5]="PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED"]=5,h}(),U.LicenseIdentification=function(){function O(h){if(h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.requestId=S.newBuffer([]),O.prototype.sessionId=S.newBuffer([]),O.prototype.purchaseId=S.newBuffer([]),O.prototype.type=1,O.prototype.version=0,O.prototype.providerSessionToken=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,u){return u||(u=R.create()),s.requestId!=null&&Object.hasOwnProperty.call(s,"requestId")&&u.uint32(10).bytes(s.requestId),s.sessionId!=null&&Object.hasOwnProperty.call(s,"sessionId")&&u.uint32(18).bytes(s.sessionId),s.purchaseId!=null&&Object.hasOwnProperty.call(s,"purchaseId")&&u.uint32(26).bytes(s.purchaseId),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(32).int32(s.type),s.version!=null&&Object.hasOwnProperty.call(s,"version")&&u.uint32(40).int32(s.version),s.providerSessionToken!=null&&Object.hasOwnProperty.call(s,"providerSessionToken")&&u.uint32(50).bytes(s.providerSessionToken),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.LicenseIdentification;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.requestId=s.bytes();break}case 2:{v.sessionId=s.bytes();break}case 3:{v.purchaseId=s.bytes();break}case 4:{v.type=s.int32();break}case 5:{v.version=s.int32();break}case 6:{v.providerSessionToken=s.bytes();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.isString(s.requestId)))return"requestId: buffer expected";if(s.sessionId!=null&&s.hasOwnProperty("sessionId")&&!(s.sessionId&&typeof s.sessionId.length=="number"||S.isString(s.sessionId)))return"sessionId: buffer expected";if(s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&!(s.purchaseId&&typeof s.purchaseId.length=="number"||S.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")&&!S.isInteger(s.version)?"version: integer expected":s.providerSessionToken!=null&&s.hasOwnProperty("providerSessionToken")&&!(s.providerSessionToken&&typeof s.providerSessionToken.length=="number"||S.isString(s.providerSessionToken))?"providerSessionToken: buffer expected":null},O.fromObject=function(s){if(s instanceof x.license_protocol.LicenseIdentification)return s;var u=new x.license_protocol.LicenseIdentification;switch(s.requestId!=null&&(typeof s.requestId=="string"?S.base64.decode(s.requestId,u.requestId=S.newBuffer(S.base64.length(s.requestId)),0):s.requestId.length>=0&&(u.requestId=s.requestId)),s.sessionId!=null&&(typeof s.sessionId=="string"?S.base64.decode(s.sessionId,u.sessionId=S.newBuffer(S.base64.length(s.sessionId)),0):s.sessionId.length>=0&&(u.sessionId=s.sessionId)),s.purchaseId!=null&&(typeof s.purchaseId=="string"?S.base64.decode(s.purchaseId,u.purchaseId=S.newBuffer(S.base64.length(s.purchaseId)),0):s.purchaseId.length>=0&&(u.purchaseId=s.purchaseId)),s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"STREAMING":case 1:u.type=1;break;case"OFFLINE":case 2:u.type=2;break;case"AUTOMATIC":case 3:u.type=3;break}return s.version!=null&&(u.version=s.version|0),s.providerSessionToken!=null&&(typeof s.providerSessionToken=="string"?S.base64.decode(s.providerSessionToken,u.providerSessionToken=S.newBuffer(S.base64.length(s.providerSessionToken)),0):s.providerSessionToken.length>=0&&(u.providerSessionToken=s.providerSessionToken)),u},O.toObject=function(s,u){u||(u={});var p={};return u.defaults&&(u.bytes===String?p.requestId="":(p.requestId=[],u.bytes!==Array&&(p.requestId=S.newBuffer(p.requestId))),u.bytes===String?p.sessionId="":(p.sessionId=[],u.bytes!==Array&&(p.sessionId=S.newBuffer(p.sessionId))),u.bytes===String?p.purchaseId="":(p.purchaseId=[],u.bytes!==Array&&(p.purchaseId=S.newBuffer(p.purchaseId))),p.type=u.enums===String?"STREAMING":1,p.version=0,u.bytes===String?p.providerSessionToken="":(p.providerSessionToken=[],u.bytes!==Array&&(p.providerSessionToken=S.newBuffer(p.providerSessionToken)))),s.requestId!=null&&s.hasOwnProperty("requestId")&&(p.requestId=u.bytes===String?S.base64.encode(s.requestId,0,s.requestId.length):u.bytes===Array?Array.prototype.slice.call(s.requestId):s.requestId),s.sessionId!=null&&s.hasOwnProperty("sessionId")&&(p.sessionId=u.bytes===String?S.base64.encode(s.sessionId,0,s.sessionId.length):u.bytes===Array?Array.prototype.slice.call(s.sessionId):s.sessionId),s.purchaseId!=null&&s.hasOwnProperty("purchaseId")&&(p.purchaseId=u.bytes===String?S.base64.encode(s.purchaseId,0,s.purchaseId.length):u.bytes===Array?Array.prototype.slice.call(s.purchaseId):s.purchaseId),s.type!=null&&s.hasOwnProperty("type")&&(p.type=u.enums===String?x.license_protocol.LicenseType[s.type]===void 0?s.type:x.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=u.bytes===String?S.base64.encode(s.providerSessionToken,0,s.providerSessionToken.length):u.bytes===Array?Array.prototype.slice.call(s.providerSessionToken):s.providerSessionToken),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseIdentification"},O}(),U.License=function(){function O(h){if(this.key=[],this.groupIds=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.id=null,O.prototype.policy=null,O.prototype.key=S.emptyArray,O.prototype.licenseStartTime=S.Long?S.Long.fromBits(0,0,!1):0,O.prototype.remoteAttestationVerified=!1,O.prototype.providerClientToken=S.newBuffer([]),O.prototype.protectionScheme=0,O.prototype.srmRequirement=S.newBuffer([]),O.prototype.srmUpdate=S.newBuffer([]),O.prototype.platformVerificationStatus=4,O.prototype.groupIds=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.id!=null&&Object.hasOwnProperty.call(s,"id")&&x.license_protocol.LicenseIdentification.encode(s.id,u.uint32(10).fork()).ldelim(),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&x.license_protocol.License.Policy.encode(s.policy,u.uint32(18).fork()).ldelim(),s.key!=null&&s.key.length)for(var p=0;p<s.key.length;p+=1)x.license_protocol.License.KeyContainer.encode(s.key[p],u.uint32(26).fork()).ldelim();if(s.licenseStartTime!=null&&Object.hasOwnProperty.call(s,"licenseStartTime")&&u.uint32(32).int64(s.licenseStartTime),s.remoteAttestationVerified!=null&&Object.hasOwnProperty.call(s,"remoteAttestationVerified")&&u.uint32(40).bool(s.remoteAttestationVerified),s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&u.uint32(50).bytes(s.providerClientToken),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&u.uint32(56).uint32(s.protectionScheme),s.srmRequirement!=null&&Object.hasOwnProperty.call(s,"srmRequirement")&&u.uint32(66).bytes(s.srmRequirement),s.srmUpdate!=null&&Object.hasOwnProperty.call(s,"srmUpdate")&&u.uint32(74).bytes(s.srmUpdate),s.platformVerificationStatus!=null&&Object.hasOwnProperty.call(s,"platformVerificationStatus")&&u.uint32(80).int32(s.platformVerificationStatus),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)u.uint32(90).bytes(s.groupIds[p]);return u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.License;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.id=x.license_protocol.LicenseIdentification.decode(s,s.uint32());break}case 2:{v.policy=x.license_protocol.License.Policy.decode(s,s.uint32());break}case 3:{v.key&&v.key.length||(v.key=[]),v.key.push(x.license_protocol.License.KeyContainer.decode(s,s.uint32()));break}case 4:{v.licenseStartTime=s.int64();break}case 5:{v.remoteAttestationVerified=s.bool();break}case 6:{v.providerClientToken=s.bytes();break}case 7:{v.protectionScheme=s.uint32();break}case 8:{v.srmRequirement=s.bytes();break}case 9:{v.srmUpdate=s.bytes();break}case 10:{v.platformVerificationStatus=s.int32();break}case 11:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(s.bytes());break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.id!=null&&s.hasOwnProperty("id")){var u=x.license_protocol.LicenseIdentification.verify(s.id);if(u)return"id."+u}if(s.policy!=null&&s.hasOwnProperty("policy")){var u=x.license_protocol.License.Policy.verify(s.policy);if(u)return"policy."+u}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 u=x.license_protocol.License.KeyContainer.verify(s.key[p]);if(u)return"key."+u}}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&!S.isInteger(s.licenseStartTime)&&!(s.licenseStartTime&&S.isInteger(s.licenseStartTime.low)&&S.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"||S.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!S.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.srmRequirement!=null&&s.hasOwnProperty("srmRequirement")&&!(s.srmRequirement&&typeof s.srmRequirement.length=="number"||S.isString(s.srmRequirement)))return"srmRequirement: buffer expected";if(s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&!(s.srmUpdate&&typeof s.srmUpdate.length=="number"||S.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"||S.isString(s.groupIds[p])))return"groupIds: buffer[] expected"}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.License)return s;var u=new x.license_protocol.License;if(s.id!=null){if(typeof s.id!="object")throw TypeError(".license_protocol.License.id: object expected");u.id=x.license_protocol.LicenseIdentification.fromObject(s.id)}if(s.policy!=null){if(typeof s.policy!="object")throw TypeError(".license_protocol.License.policy: object expected");u.policy=x.license_protocol.License.Policy.fromObject(s.policy)}if(s.key){if(!Array.isArray(s.key))throw TypeError(".license_protocol.License.key: array expected");u.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");u.key[p]=x.license_protocol.License.KeyContainer.fromObject(s.key[p])}}switch(s.licenseStartTime!=null&&(S.Long?(u.licenseStartTime=S.Long.fromValue(s.licenseStartTime)).unsigned=!1:typeof s.licenseStartTime=="string"?u.licenseStartTime=parseInt(s.licenseStartTime,10):typeof s.licenseStartTime=="number"?u.licenseStartTime=s.licenseStartTime:typeof s.licenseStartTime=="object"&&(u.licenseStartTime=new S.LongBits(s.licenseStartTime.low>>>0,s.licenseStartTime.high>>>0).toNumber())),s.remoteAttestationVerified!=null&&(u.remoteAttestationVerified=!!s.remoteAttestationVerified),s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?S.base64.decode(s.providerClientToken,u.providerClientToken=S.newBuffer(S.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(u.providerClientToken=s.providerClientToken)),s.protectionScheme!=null&&(u.protectionScheme=s.protectionScheme>>>0),s.srmRequirement!=null&&(typeof s.srmRequirement=="string"?S.base64.decode(s.srmRequirement,u.srmRequirement=S.newBuffer(S.base64.length(s.srmRequirement)),0):s.srmRequirement.length>=0&&(u.srmRequirement=s.srmRequirement)),s.srmUpdate!=null&&(typeof s.srmUpdate=="string"?S.base64.decode(s.srmUpdate,u.srmUpdate=S.newBuffer(S.base64.length(s.srmUpdate)),0):s.srmUpdate.length>=0&&(u.srmUpdate=s.srmUpdate)),s.platformVerificationStatus){case"PLATFORM_UNVERIFIED":case 0:u.platformVerificationStatus=0;break;case"PLATFORM_TAMPERED":case 1:u.platformVerificationStatus=1;break;case"PLATFORM_SOFTWARE_VERIFIED":case 2:u.platformVerificationStatus=2;break;case"PLATFORM_HARDWARE_VERIFIED":case 3:u.platformVerificationStatus=3;break;default:if(typeof s.platformVerificationStatus=="number"){u.platformVerificationStatus=s.platformVerificationStatus;break}break;case"PLATFORM_NO_VERIFICATION":case 4:u.platformVerificationStatus=4;break;case"PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED":case 5:u.platformVerificationStatus=5;break}if(s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.License.groupIds: array expected");u.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?S.base64.decode(s.groupIds[p],u.groupIds[p]=S.newBuffer(S.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(u.groupIds[p]=s.groupIds[p])}return u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.key=[],p.groupIds=[]),u.defaults){if(p.id=null,p.policy=null,S.Long){var v=new S.Long(0,0,!1);p.licenseStartTime=u.longs===String?v.toString():u.longs===Number?v.toNumber():v}else p.licenseStartTime=u.longs===String?"0":0;p.remoteAttestationVerified=!1,u.bytes===String?p.providerClientToken="":(p.providerClientToken=[],u.bytes!==Array&&(p.providerClientToken=S.newBuffer(p.providerClientToken))),p.protectionScheme=0,u.bytes===String?p.srmRequirement="":(p.srmRequirement=[],u.bytes!==Array&&(p.srmRequirement=S.newBuffer(p.srmRequirement))),u.bytes===String?p.srmUpdate="":(p.srmUpdate=[],u.bytes!==Array&&(p.srmUpdate=S.newBuffer(p.srmUpdate))),p.platformVerificationStatus=u.enums===String?"PLATFORM_NO_VERIFICATION":4}if(s.id!=null&&s.hasOwnProperty("id")&&(p.id=x.license_protocol.LicenseIdentification.toObject(s.id,u)),s.policy!=null&&s.hasOwnProperty("policy")&&(p.policy=x.license_protocol.License.Policy.toObject(s.policy,u)),s.key&&s.key.length){p.key=[];for(var N=0;N<s.key.length;N+=1)p.key[N]=x.license_protocol.License.KeyContainer.toObject(s.key[N],u)}if(s.licenseStartTime!=null&&s.hasOwnProperty("licenseStartTime")&&(typeof s.licenseStartTime=="number"?p.licenseStartTime=u.longs===String?String(s.licenseStartTime):s.licenseStartTime:p.licenseStartTime=u.longs===String?S.Long.prototype.toString.call(s.licenseStartTime):u.longs===Number?new S.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=u.bytes===String?S.base64.encode(s.providerClientToken,0,s.providerClientToken.length):u.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=u.bytes===String?S.base64.encode(s.srmRequirement,0,s.srmRequirement.length):u.bytes===Array?Array.prototype.slice.call(s.srmRequirement):s.srmRequirement),s.srmUpdate!=null&&s.hasOwnProperty("srmUpdate")&&(p.srmUpdate=u.bytes===String?S.base64.encode(s.srmUpdate,0,s.srmUpdate.length):u.bytes===Array?Array.prototype.slice.call(s.srmUpdate):s.srmUpdate),s.platformVerificationStatus!=null&&s.hasOwnProperty("platformVerificationStatus")&&(p.platformVerificationStatus=u.enums===String?x.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]===void 0?s.platformVerificationStatus:x.license_protocol.PlatformVerificationStatus[s.platformVerificationStatus]:s.platformVerificationStatus),s.groupIds&&s.groupIds.length){p.groupIds=[];for(var N=0;N<s.groupIds.length;N+=1)p.groupIds[N]=u.bytes===String?S.base64.encode(s.groupIds[N],0,s.groupIds[N].length):u.bytes===Array?Array.prototype.slice.call(s.groupIds[N]):s.groupIds[N]}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.License"},O.Policy=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.canPlay=!1,h.prototype.canPersist=!1,h.prototype.canRenew=!1,h.prototype.rentalDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.playbackDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.licenseDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalRecoveryDurationSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalServerUrl="",h.prototype.renewalDelaySeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewalRetryIntervalSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.renewWithUsage=!1,h.prototype.alwaysIncludeClientId=!1,h.prototype.playStartGracePeriodSeconds=S.Long?S.Long.fromBits(0,0,!1):0,h.prototype.softEnforcePlaybackDuration=!1,h.prototype.softEnforceRentalDuration=!0,h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.canPlay!=null&&Object.hasOwnProperty.call(u,"canPlay")&&p.uint32(8).bool(u.canPlay),u.canPersist!=null&&Object.hasOwnProperty.call(u,"canPersist")&&p.uint32(16).bool(u.canPersist),u.canRenew!=null&&Object.hasOwnProperty.call(u,"canRenew")&&p.uint32(24).bool(u.canRenew),u.rentalDurationSeconds!=null&&Object.hasOwnProperty.call(u,"rentalDurationSeconds")&&p.uint32(32).int64(u.rentalDurationSeconds),u.playbackDurationSeconds!=null&&Object.hasOwnProperty.call(u,"playbackDurationSeconds")&&p.uint32(40).int64(u.playbackDurationSeconds),u.licenseDurationSeconds!=null&&Object.hasOwnProperty.call(u,"licenseDurationSeconds")&&p.uint32(48).int64(u.licenseDurationSeconds),u.renewalRecoveryDurationSeconds!=null&&Object.hasOwnProperty.call(u,"renewalRecoveryDurationSeconds")&&p.uint32(56).int64(u.renewalRecoveryDurationSeconds),u.renewalServerUrl!=null&&Object.hasOwnProperty.call(u,"renewalServerUrl")&&p.uint32(66).string(u.renewalServerUrl),u.renewalDelaySeconds!=null&&Object.hasOwnProperty.call(u,"renewalDelaySeconds")&&p.uint32(72).int64(u.renewalDelaySeconds),u.renewalRetryIntervalSeconds!=null&&Object.hasOwnProperty.call(u,"renewalRetryIntervalSeconds")&&p.uint32(80).int64(u.renewalRetryIntervalSeconds),u.renewWithUsage!=null&&Object.hasOwnProperty.call(u,"renewWithUsage")&&p.uint32(88).bool(u.renewWithUsage),u.alwaysIncludeClientId!=null&&Object.hasOwnProperty.call(u,"alwaysIncludeClientId")&&p.uint32(96).bool(u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&Object.hasOwnProperty.call(u,"playStartGracePeriodSeconds")&&p.uint32(104).int64(u.playStartGracePeriodSeconds),u.softEnforcePlaybackDuration!=null&&Object.hasOwnProperty.call(u,"softEnforcePlaybackDuration")&&p.uint32(112).bool(u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&Object.hasOwnProperty.call(u,"softEnforceRentalDuration")&&p.uint32(120).bool(u.softEnforceRentalDuration),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.License.Policy;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.canPlay=u.bool();break}case 2:{N.canPersist=u.bool();break}case 3:{N.canRenew=u.bool();break}case 4:{N.rentalDurationSeconds=u.int64();break}case 5:{N.playbackDurationSeconds=u.int64();break}case 6:{N.licenseDurationSeconds=u.int64();break}case 7:{N.renewalRecoveryDurationSeconds=u.int64();break}case 8:{N.renewalServerUrl=u.string();break}case 9:{N.renewalDelaySeconds=u.int64();break}case 10:{N.renewalRetryIntervalSeconds=u.int64();break}case 11:{N.renewWithUsage=u.bool();break}case 12:{N.alwaysIncludeClientId=u.bool();break}case 13:{N.playStartGracePeriodSeconds=u.int64();break}case 14:{N.softEnforcePlaybackDuration=u.bool();break}case 15:{N.softEnforceRentalDuration=u.bool();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.canPlay!=null&&u.hasOwnProperty("canPlay")&&typeof u.canPlay!="boolean"?"canPlay: boolean expected":u.canPersist!=null&&u.hasOwnProperty("canPersist")&&typeof u.canPersist!="boolean"?"canPersist: boolean expected":u.canRenew!=null&&u.hasOwnProperty("canRenew")&&typeof u.canRenew!="boolean"?"canRenew: boolean expected":u.rentalDurationSeconds!=null&&u.hasOwnProperty("rentalDurationSeconds")&&!S.isInteger(u.rentalDurationSeconds)&&!(u.rentalDurationSeconds&&S.isInteger(u.rentalDurationSeconds.low)&&S.isInteger(u.rentalDurationSeconds.high))?"rentalDurationSeconds: integer|Long expected":u.playbackDurationSeconds!=null&&u.hasOwnProperty("playbackDurationSeconds")&&!S.isInteger(u.playbackDurationSeconds)&&!(u.playbackDurationSeconds&&S.isInteger(u.playbackDurationSeconds.low)&&S.isInteger(u.playbackDurationSeconds.high))?"playbackDurationSeconds: integer|Long expected":u.licenseDurationSeconds!=null&&u.hasOwnProperty("licenseDurationSeconds")&&!S.isInteger(u.licenseDurationSeconds)&&!(u.licenseDurationSeconds&&S.isInteger(u.licenseDurationSeconds.low)&&S.isInteger(u.licenseDurationSeconds.high))?"licenseDurationSeconds: integer|Long expected":u.renewalRecoveryDurationSeconds!=null&&u.hasOwnProperty("renewalRecoveryDurationSeconds")&&!S.isInteger(u.renewalRecoveryDurationSeconds)&&!(u.renewalRecoveryDurationSeconds&&S.isInteger(u.renewalRecoveryDurationSeconds.low)&&S.isInteger(u.renewalRecoveryDurationSeconds.high))?"renewalRecoveryDurationSeconds: integer|Long expected":u.renewalServerUrl!=null&&u.hasOwnProperty("renewalServerUrl")&&!S.isString(u.renewalServerUrl)?"renewalServerUrl: string expected":u.renewalDelaySeconds!=null&&u.hasOwnProperty("renewalDelaySeconds")&&!S.isInteger(u.renewalDelaySeconds)&&!(u.renewalDelaySeconds&&S.isInteger(u.renewalDelaySeconds.low)&&S.isInteger(u.renewalDelaySeconds.high))?"renewalDelaySeconds: integer|Long expected":u.renewalRetryIntervalSeconds!=null&&u.hasOwnProperty("renewalRetryIntervalSeconds")&&!S.isInteger(u.renewalRetryIntervalSeconds)&&!(u.renewalRetryIntervalSeconds&&S.isInteger(u.renewalRetryIntervalSeconds.low)&&S.isInteger(u.renewalRetryIntervalSeconds.high))?"renewalRetryIntervalSeconds: integer|Long expected":u.renewWithUsage!=null&&u.hasOwnProperty("renewWithUsage")&&typeof u.renewWithUsage!="boolean"?"renewWithUsage: boolean expected":u.alwaysIncludeClientId!=null&&u.hasOwnProperty("alwaysIncludeClientId")&&typeof u.alwaysIncludeClientId!="boolean"?"alwaysIncludeClientId: boolean expected":u.playStartGracePeriodSeconds!=null&&u.hasOwnProperty("playStartGracePeriodSeconds")&&!S.isInteger(u.playStartGracePeriodSeconds)&&!(u.playStartGracePeriodSeconds&&S.isInteger(u.playStartGracePeriodSeconds.low)&&S.isInteger(u.playStartGracePeriodSeconds.high))?"playStartGracePeriodSeconds: integer|Long expected":u.softEnforcePlaybackDuration!=null&&u.hasOwnProperty("softEnforcePlaybackDuration")&&typeof u.softEnforcePlaybackDuration!="boolean"?"softEnforcePlaybackDuration: boolean expected":u.softEnforceRentalDuration!=null&&u.hasOwnProperty("softEnforceRentalDuration")&&typeof u.softEnforceRentalDuration!="boolean"?"softEnforceRentalDuration: boolean expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.License.Policy)return u;var p=new x.license_protocol.License.Policy;return u.canPlay!=null&&(p.canPlay=!!u.canPlay),u.canPersist!=null&&(p.canPersist=!!u.canPersist),u.canRenew!=null&&(p.canRenew=!!u.canRenew),u.rentalDurationSeconds!=null&&(S.Long?(p.rentalDurationSeconds=S.Long.fromValue(u.rentalDurationSeconds)).unsigned=!1:typeof u.rentalDurationSeconds=="string"?p.rentalDurationSeconds=parseInt(u.rentalDurationSeconds,10):typeof u.rentalDurationSeconds=="number"?p.rentalDurationSeconds=u.rentalDurationSeconds:typeof u.rentalDurationSeconds=="object"&&(p.rentalDurationSeconds=new S.LongBits(u.rentalDurationSeconds.low>>>0,u.rentalDurationSeconds.high>>>0).toNumber())),u.playbackDurationSeconds!=null&&(S.Long?(p.playbackDurationSeconds=S.Long.fromValue(u.playbackDurationSeconds)).unsigned=!1:typeof u.playbackDurationSeconds=="string"?p.playbackDurationSeconds=parseInt(u.playbackDurationSeconds,10):typeof u.playbackDurationSeconds=="number"?p.playbackDurationSeconds=u.playbackDurationSeconds:typeof u.playbackDurationSeconds=="object"&&(p.playbackDurationSeconds=new S.LongBits(u.playbackDurationSeconds.low>>>0,u.playbackDurationSeconds.high>>>0).toNumber())),u.licenseDurationSeconds!=null&&(S.Long?(p.licenseDurationSeconds=S.Long.fromValue(u.licenseDurationSeconds)).unsigned=!1:typeof u.licenseDurationSeconds=="string"?p.licenseDurationSeconds=parseInt(u.licenseDurationSeconds,10):typeof u.licenseDurationSeconds=="number"?p.licenseDurationSeconds=u.licenseDurationSeconds:typeof u.licenseDurationSeconds=="object"&&(p.licenseDurationSeconds=new S.LongBits(u.licenseDurationSeconds.low>>>0,u.licenseDurationSeconds.high>>>0).toNumber())),u.renewalRecoveryDurationSeconds!=null&&(S.Long?(p.renewalRecoveryDurationSeconds=S.Long.fromValue(u.renewalRecoveryDurationSeconds)).unsigned=!1:typeof u.renewalRecoveryDurationSeconds=="string"?p.renewalRecoveryDurationSeconds=parseInt(u.renewalRecoveryDurationSeconds,10):typeof u.renewalRecoveryDurationSeconds=="number"?p.renewalRecoveryDurationSeconds=u.renewalRecoveryDurationSeconds:typeof u.renewalRecoveryDurationSeconds=="object"&&(p.renewalRecoveryDurationSeconds=new S.LongBits(u.renewalRecoveryDurationSeconds.low>>>0,u.renewalRecoveryDurationSeconds.high>>>0).toNumber())),u.renewalServerUrl!=null&&(p.renewalServerUrl=String(u.renewalServerUrl)),u.renewalDelaySeconds!=null&&(S.Long?(p.renewalDelaySeconds=S.Long.fromValue(u.renewalDelaySeconds)).unsigned=!1:typeof u.renewalDelaySeconds=="string"?p.renewalDelaySeconds=parseInt(u.renewalDelaySeconds,10):typeof u.renewalDelaySeconds=="number"?p.renewalDelaySeconds=u.renewalDelaySeconds:typeof u.renewalDelaySeconds=="object"&&(p.renewalDelaySeconds=new S.LongBits(u.renewalDelaySeconds.low>>>0,u.renewalDelaySeconds.high>>>0).toNumber())),u.renewalRetryIntervalSeconds!=null&&(S.Long?(p.renewalRetryIntervalSeconds=S.Long.fromValue(u.renewalRetryIntervalSeconds)).unsigned=!1:typeof u.renewalRetryIntervalSeconds=="string"?p.renewalRetryIntervalSeconds=parseInt(u.renewalRetryIntervalSeconds,10):typeof u.renewalRetryIntervalSeconds=="number"?p.renewalRetryIntervalSeconds=u.renewalRetryIntervalSeconds:typeof u.renewalRetryIntervalSeconds=="object"&&(p.renewalRetryIntervalSeconds=new S.LongBits(u.renewalRetryIntervalSeconds.low>>>0,u.renewalRetryIntervalSeconds.high>>>0).toNumber())),u.renewWithUsage!=null&&(p.renewWithUsage=!!u.renewWithUsage),u.alwaysIncludeClientId!=null&&(p.alwaysIncludeClientId=!!u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&(S.Long?(p.playStartGracePeriodSeconds=S.Long.fromValue(u.playStartGracePeriodSeconds)).unsigned=!1:typeof u.playStartGracePeriodSeconds=="string"?p.playStartGracePeriodSeconds=parseInt(u.playStartGracePeriodSeconds,10):typeof u.playStartGracePeriodSeconds=="number"?p.playStartGracePeriodSeconds=u.playStartGracePeriodSeconds:typeof u.playStartGracePeriodSeconds=="object"&&(p.playStartGracePeriodSeconds=new S.LongBits(u.playStartGracePeriodSeconds.low>>>0,u.playStartGracePeriodSeconds.high>>>0).toNumber())),u.softEnforcePlaybackDuration!=null&&(p.softEnforcePlaybackDuration=!!u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&(p.softEnforceRentalDuration=!!u.softEnforceRentalDuration),p},h.toObject=function(u,p){p||(p={});var v={};if(p.defaults){if(v.canPlay=!1,v.canPersist=!1,v.canRenew=!1,S.Long){var N=new S.Long(0,0,!1);v.rentalDurationSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.rentalDurationSeconds=p.longs===String?"0":0;if(S.Long){var N=new S.Long(0,0,!1);v.playbackDurationSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.playbackDurationSeconds=p.longs===String?"0":0;if(S.Long){var N=new S.Long(0,0,!1);v.licenseDurationSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.licenseDurationSeconds=p.longs===String?"0":0;if(S.Long){var N=new S.Long(0,0,!1);v.renewalRecoveryDurationSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.renewalRecoveryDurationSeconds=p.longs===String?"0":0;if(v.renewalServerUrl="",S.Long){var N=new S.Long(0,0,!1);v.renewalDelaySeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.renewalDelaySeconds=p.longs===String?"0":0;if(S.Long){var N=new S.Long(0,0,!1);v.renewalRetryIntervalSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.renewalRetryIntervalSeconds=p.longs===String?"0":0;if(v.renewWithUsage=!1,v.alwaysIncludeClientId=!1,S.Long){var N=new S.Long(0,0,!1);v.playStartGracePeriodSeconds=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.playStartGracePeriodSeconds=p.longs===String?"0":0;v.softEnforcePlaybackDuration=!1,v.softEnforceRentalDuration=!0}return u.canPlay!=null&&u.hasOwnProperty("canPlay")&&(v.canPlay=u.canPlay),u.canPersist!=null&&u.hasOwnProperty("canPersist")&&(v.canPersist=u.canPersist),u.canRenew!=null&&u.hasOwnProperty("canRenew")&&(v.canRenew=u.canRenew),u.rentalDurationSeconds!=null&&u.hasOwnProperty("rentalDurationSeconds")&&(typeof u.rentalDurationSeconds=="number"?v.rentalDurationSeconds=p.longs===String?String(u.rentalDurationSeconds):u.rentalDurationSeconds:v.rentalDurationSeconds=p.longs===String?S.Long.prototype.toString.call(u.rentalDurationSeconds):p.longs===Number?new S.LongBits(u.rentalDurationSeconds.low>>>0,u.rentalDurationSeconds.high>>>0).toNumber():u.rentalDurationSeconds),u.playbackDurationSeconds!=null&&u.hasOwnProperty("playbackDurationSeconds")&&(typeof u.playbackDurationSeconds=="number"?v.playbackDurationSeconds=p.longs===String?String(u.playbackDurationSeconds):u.playbackDurationSeconds:v.playbackDurationSeconds=p.longs===String?S.Long.prototype.toString.call(u.playbackDurationSeconds):p.longs===Number?new S.LongBits(u.playbackDurationSeconds.low>>>0,u.playbackDurationSeconds.high>>>0).toNumber():u.playbackDurationSeconds),u.licenseDurationSeconds!=null&&u.hasOwnProperty("licenseDurationSeconds")&&(typeof u.licenseDurationSeconds=="number"?v.licenseDurationSeconds=p.longs===String?String(u.licenseDurationSeconds):u.licenseDurationSeconds:v.licenseDurationSeconds=p.longs===String?S.Long.prototype.toString.call(u.licenseDurationSeconds):p.longs===Number?new S.LongBits(u.licenseDurationSeconds.low>>>0,u.licenseDurationSeconds.high>>>0).toNumber():u.licenseDurationSeconds),u.renewalRecoveryDurationSeconds!=null&&u.hasOwnProperty("renewalRecoveryDurationSeconds")&&(typeof u.renewalRecoveryDurationSeconds=="number"?v.renewalRecoveryDurationSeconds=p.longs===String?String(u.renewalRecoveryDurationSeconds):u.renewalRecoveryDurationSeconds:v.renewalRecoveryDurationSeconds=p.longs===String?S.Long.prototype.toString.call(u.renewalRecoveryDurationSeconds):p.longs===Number?new S.LongBits(u.renewalRecoveryDurationSeconds.low>>>0,u.renewalRecoveryDurationSeconds.high>>>0).toNumber():u.renewalRecoveryDurationSeconds),u.renewalServerUrl!=null&&u.hasOwnProperty("renewalServerUrl")&&(v.renewalServerUrl=u.renewalServerUrl),u.renewalDelaySeconds!=null&&u.hasOwnProperty("renewalDelaySeconds")&&(typeof u.renewalDelaySeconds=="number"?v.renewalDelaySeconds=p.longs===String?String(u.renewalDelaySeconds):u.renewalDelaySeconds:v.renewalDelaySeconds=p.longs===String?S.Long.prototype.toString.call(u.renewalDelaySeconds):p.longs===Number?new S.LongBits(u.renewalDelaySeconds.low>>>0,u.renewalDelaySeconds.high>>>0).toNumber():u.renewalDelaySeconds),u.renewalRetryIntervalSeconds!=null&&u.hasOwnProperty("renewalRetryIntervalSeconds")&&(typeof u.renewalRetryIntervalSeconds=="number"?v.renewalRetryIntervalSeconds=p.longs===String?String(u.renewalRetryIntervalSeconds):u.renewalRetryIntervalSeconds:v.renewalRetryIntervalSeconds=p.longs===String?S.Long.prototype.toString.call(u.renewalRetryIntervalSeconds):p.longs===Number?new S.LongBits(u.renewalRetryIntervalSeconds.low>>>0,u.renewalRetryIntervalSeconds.high>>>0).toNumber():u.renewalRetryIntervalSeconds),u.renewWithUsage!=null&&u.hasOwnProperty("renewWithUsage")&&(v.renewWithUsage=u.renewWithUsage),u.alwaysIncludeClientId!=null&&u.hasOwnProperty("alwaysIncludeClientId")&&(v.alwaysIncludeClientId=u.alwaysIncludeClientId),u.playStartGracePeriodSeconds!=null&&u.hasOwnProperty("playStartGracePeriodSeconds")&&(typeof u.playStartGracePeriodSeconds=="number"?v.playStartGracePeriodSeconds=p.longs===String?String(u.playStartGracePeriodSeconds):u.playStartGracePeriodSeconds:v.playStartGracePeriodSeconds=p.longs===String?S.Long.prototype.toString.call(u.playStartGracePeriodSeconds):p.longs===Number?new S.LongBits(u.playStartGracePeriodSeconds.low>>>0,u.playStartGracePeriodSeconds.high>>>0).toNumber():u.playStartGracePeriodSeconds),u.softEnforcePlaybackDuration!=null&&u.hasOwnProperty("softEnforcePlaybackDuration")&&(v.softEnforcePlaybackDuration=u.softEnforcePlaybackDuration),u.softEnforceRentalDuration!=null&&u.hasOwnProperty("softEnforceRentalDuration")&&(v.softEnforceRentalDuration=u.softEnforceRentalDuration),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.License.Policy"},h}(),O.KeyContainer=function(){function h(s){if(this.videoResolutionConstraints=[],s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.id=S.newBuffer([]),h.prototype.iv=S.newBuffer([]),h.prototype.key=S.newBuffer([]),h.prototype.type=1,h.prototype.level=1,h.prototype.requiredProtection=null,h.prototype.requestedProtection=null,h.prototype.keyControl=null,h.prototype.operatorSessionKeyPermissions=null,h.prototype.videoResolutionConstraints=S.emptyArray,h.prototype.antiRollbackUsageTable=!1,h.prototype.trackLabel="",h.create=function(u){return new h(u)},h.encode=function(u,p){if(p||(p=R.create()),u.id!=null&&Object.hasOwnProperty.call(u,"id")&&p.uint32(10).bytes(u.id),u.iv!=null&&Object.hasOwnProperty.call(u,"iv")&&p.uint32(18).bytes(u.iv),u.key!=null&&Object.hasOwnProperty.call(u,"key")&&p.uint32(26).bytes(u.key),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&p.uint32(32).int32(u.type),u.level!=null&&Object.hasOwnProperty.call(u,"level")&&p.uint32(40).int32(u.level),u.requiredProtection!=null&&Object.hasOwnProperty.call(u,"requiredProtection")&&x.license_protocol.License.KeyContainer.OutputProtection.encode(u.requiredProtection,p.uint32(50).fork()).ldelim(),u.requestedProtection!=null&&Object.hasOwnProperty.call(u,"requestedProtection")&&x.license_protocol.License.KeyContainer.OutputProtection.encode(u.requestedProtection,p.uint32(58).fork()).ldelim(),u.keyControl!=null&&Object.hasOwnProperty.call(u,"keyControl")&&x.license_protocol.License.KeyContainer.KeyControl.encode(u.keyControl,p.uint32(66).fork()).ldelim(),u.operatorSessionKeyPermissions!=null&&Object.hasOwnProperty.call(u,"operatorSessionKeyPermissions")&&x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.encode(u.operatorSessionKeyPermissions,p.uint32(74).fork()).ldelim(),u.videoResolutionConstraints!=null&&u.videoResolutionConstraints.length)for(var v=0;v<u.videoResolutionConstraints.length;v+=1)x.license_protocol.License.KeyContainer.VideoResolutionConstraint.encode(u.videoResolutionConstraints[v],p.uint32(82).fork()).ldelim();return u.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(u,"antiRollbackUsageTable")&&p.uint32(88).bool(u.antiRollbackUsageTable),u.trackLabel!=null&&Object.hasOwnProperty.call(u,"trackLabel")&&p.uint32(98).string(u.trackLabel),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.License.KeyContainer;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.id=u.bytes();break}case 2:{N.iv=u.bytes();break}case 3:{N.key=u.bytes();break}case 4:{N.type=u.int32();break}case 5:{N.level=u.int32();break}case 6:{N.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.decode(u,u.uint32());break}case 7:{N.requestedProtection=x.license_protocol.License.KeyContainer.OutputProtection.decode(u,u.uint32());break}case 8:{N.keyControl=x.license_protocol.License.KeyContainer.KeyControl.decode(u,u.uint32());break}case 9:{N.operatorSessionKeyPermissions=x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.decode(u,u.uint32());break}case 10:{N.videoResolutionConstraints&&N.videoResolutionConstraints.length||(N.videoResolutionConstraints=[]),N.videoResolutionConstraints.push(x.license_protocol.License.KeyContainer.VideoResolutionConstraint.decode(u,u.uint32()));break}case 11:{N.antiRollbackUsageTable=u.bool();break}case 12:{N.trackLabel=u.string();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.id!=null&&u.hasOwnProperty("id")&&!(u.id&&typeof u.id.length=="number"||S.isString(u.id)))return"id: buffer expected";if(u.iv!=null&&u.hasOwnProperty("iv")&&!(u.iv&&typeof u.iv.length=="number"||S.isString(u.iv)))return"iv: buffer expected";if(u.key!=null&&u.hasOwnProperty("key")&&!(u.key&&typeof u.key.length=="number"||S.isString(u.key)))return"key: buffer expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:break}if(u.level!=null&&u.hasOwnProperty("level"))switch(u.level){default:return"level: enum value expected";case 1:case 2:case 3:case 4:case 5:break}if(u.requiredProtection!=null&&u.hasOwnProperty("requiredProtection")){var p=x.license_protocol.License.KeyContainer.OutputProtection.verify(u.requiredProtection);if(p)return"requiredProtection."+p}if(u.requestedProtection!=null&&u.hasOwnProperty("requestedProtection")){var p=x.license_protocol.License.KeyContainer.OutputProtection.verify(u.requestedProtection);if(p)return"requestedProtection."+p}if(u.keyControl!=null&&u.hasOwnProperty("keyControl")){var p=x.license_protocol.License.KeyContainer.KeyControl.verify(u.keyControl);if(p)return"keyControl."+p}if(u.operatorSessionKeyPermissions!=null&&u.hasOwnProperty("operatorSessionKeyPermissions")){var p=x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.verify(u.operatorSessionKeyPermissions);if(p)return"operatorSessionKeyPermissions."+p}if(u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")){if(!Array.isArray(u.videoResolutionConstraints))return"videoResolutionConstraints: array expected";for(var v=0;v<u.videoResolutionConstraints.length;v+=1){var p=x.license_protocol.License.KeyContainer.VideoResolutionConstraint.verify(u.videoResolutionConstraints[v]);if(p)return"videoResolutionConstraints."+p}}return u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&typeof u.antiRollbackUsageTable!="boolean"?"antiRollbackUsageTable: boolean expected":u.trackLabel!=null&&u.hasOwnProperty("trackLabel")&&!S.isString(u.trackLabel)?"trackLabel: string expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.License.KeyContainer)return u;var p=new x.license_protocol.License.KeyContainer;switch(u.id!=null&&(typeof u.id=="string"?S.base64.decode(u.id,p.id=S.newBuffer(S.base64.length(u.id)),0):u.id.length>=0&&(p.id=u.id)),u.iv!=null&&(typeof u.iv=="string"?S.base64.decode(u.iv,p.iv=S.newBuffer(S.base64.length(u.iv)),0):u.iv.length>=0&&(p.iv=u.iv)),u.key!=null&&(typeof u.key=="string"?S.base64.decode(u.key,p.key=S.newBuffer(S.base64.length(u.key)),0):u.key.length>=0&&(p.key=u.key)),u.type){default:if(typeof u.type=="number"){p.type=u.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(u.level){default:if(typeof u.level=="number"){p.level=u.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(u.requiredProtection!=null){if(typeof u.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requiredProtection: object expected");p.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.fromObject(u.requiredProtection)}if(u.requestedProtection!=null){if(typeof u.requestedProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.requestedProtection: object expected");p.requestedProtection=x.license_protocol.License.KeyContainer.OutputProtection.fromObject(u.requestedProtection)}if(u.keyControl!=null){if(typeof u.keyControl!="object")throw TypeError(".license_protocol.License.KeyContainer.keyControl: object expected");p.keyControl=x.license_protocol.License.KeyContainer.KeyControl.fromObject(u.keyControl)}if(u.operatorSessionKeyPermissions!=null){if(typeof u.operatorSessionKeyPermissions!="object")throw TypeError(".license_protocol.License.KeyContainer.operatorSessionKeyPermissions: object expected");p.operatorSessionKeyPermissions=x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.fromObject(u.operatorSessionKeyPermissions)}if(u.videoResolutionConstraints){if(!Array.isArray(u.videoResolutionConstraints))throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: array expected");p.videoResolutionConstraints=[];for(var v=0;v<u.videoResolutionConstraints.length;v+=1){if(typeof u.videoResolutionConstraints[v]!="object")throw TypeError(".license_protocol.License.KeyContainer.videoResolutionConstraints: object expected");p.videoResolutionConstraints[v]=x.license_protocol.License.KeyContainer.VideoResolutionConstraint.fromObject(u.videoResolutionConstraints[v])}}return u.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!u.antiRollbackUsageTable),u.trackLabel!=null&&(p.trackLabel=String(u.trackLabel)),p},h.toObject=function(u,p){p||(p={});var v={};if((p.arrays||p.defaults)&&(v.videoResolutionConstraints=[]),p.defaults&&(p.bytes===String?v.id="":(v.id=[],p.bytes!==Array&&(v.id=S.newBuffer(v.id))),p.bytes===String?v.iv="":(v.iv=[],p.bytes!==Array&&(v.iv=S.newBuffer(v.iv))),p.bytes===String?v.key="":(v.key=[],p.bytes!==Array&&(v.key=S.newBuffer(v.key))),v.type=p.enums===String?"SIGNING":1,v.level=p.enums===String?"SW_SECURE_CRYPTO":1,v.requiredProtection=null,v.requestedProtection=null,v.keyControl=null,v.operatorSessionKeyPermissions=null,v.antiRollbackUsageTable=!1,v.trackLabel=""),u.id!=null&&u.hasOwnProperty("id")&&(v.id=p.bytes===String?S.base64.encode(u.id,0,u.id.length):p.bytes===Array?Array.prototype.slice.call(u.id):u.id),u.iv!=null&&u.hasOwnProperty("iv")&&(v.iv=p.bytes===String?S.base64.encode(u.iv,0,u.iv.length):p.bytes===Array?Array.prototype.slice.call(u.iv):u.iv),u.key!=null&&u.hasOwnProperty("key")&&(v.key=p.bytes===String?S.base64.encode(u.key,0,u.key.length):p.bytes===Array?Array.prototype.slice.call(u.key):u.key),u.type!=null&&u.hasOwnProperty("type")&&(v.type=p.enums===String?x.license_protocol.License.KeyContainer.KeyType[u.type]===void 0?u.type:x.license_protocol.License.KeyContainer.KeyType[u.type]:u.type),u.level!=null&&u.hasOwnProperty("level")&&(v.level=p.enums===String?x.license_protocol.License.KeyContainer.SecurityLevel[u.level]===void 0?u.level:x.license_protocol.License.KeyContainer.SecurityLevel[u.level]:u.level),u.requiredProtection!=null&&u.hasOwnProperty("requiredProtection")&&(v.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.toObject(u.requiredProtection,p)),u.requestedProtection!=null&&u.hasOwnProperty("requestedProtection")&&(v.requestedProtection=x.license_protocol.License.KeyContainer.OutputProtection.toObject(u.requestedProtection,p)),u.keyControl!=null&&u.hasOwnProperty("keyControl")&&(v.keyControl=x.license_protocol.License.KeyContainer.KeyControl.toObject(u.keyControl,p)),u.operatorSessionKeyPermissions!=null&&u.hasOwnProperty("operatorSessionKeyPermissions")&&(v.operatorSessionKeyPermissions=x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions.toObject(u.operatorSessionKeyPermissions,p)),u.videoResolutionConstraints&&u.videoResolutionConstraints.length){v.videoResolutionConstraints=[];for(var N=0;N<u.videoResolutionConstraints.length;N+=1)v.videoResolutionConstraints[N]=x.license_protocol.License.KeyContainer.VideoResolutionConstraint.toObject(u.videoResolutionConstraints[N],p)}return u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=u.antiRollbackUsageTable),u.trackLabel!=null&&u.hasOwnProperty("trackLabel")&&(v.trackLabel=u.trackLabel),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.License.KeyContainer"},h.KeyType=function(){var s={},u=Object.create(s);return u[s[1]="SIGNING"]=1,u[s[2]="CONTENT"]=2,u[s[3]="KEY_CONTROL"]=3,u[s[4]="OPERATOR_SESSION"]=4,u[s[5]="ENTITLEMENT"]=5,u[s[6]="OEM_CONTENT"]=6,u}(),h.SecurityLevel=function(){var s={},u=Object.create(s);return u[s[1]="SW_SECURE_CRYPTO"]=1,u[s[2]="SW_SECURE_DECODE"]=2,u[s[3]="HW_SECURE_CRYPTO"]=3,u[s[4]="HW_SECURE_DECODE"]=4,u[s[5]="HW_SECURE_ALL"]=5,u}(),h.KeyControl=function(){function s(u){if(u)for(var p=Object.keys(u),v=0;v<p.length;v+=1)u[p[v]]!=null&&(this[p[v]]=u[p[v]])}return s.prototype.keyControlBlock=S.newBuffer([]),s.prototype.iv=S.newBuffer([]),s.create=function(p){return new s(p)},s.encode=function(p,v){return v||(v=R.create()),p.keyControlBlock!=null&&Object.hasOwnProperty.call(p,"keyControlBlock")&&v.uint32(10).bytes(p.keyControlBlock),p.iv!=null&&Object.hasOwnProperty.call(p,"iv")&&v.uint32(18).bytes(p.iv),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof b||(p=b.create(p));for(var N=v===void 0?p.len:p.pos+v,Z=new x.license_protocol.License.KeyContainer.KeyControl;p.pos<N;){var C=p.uint32();switch(C>>>3){case 1:{Z.keyControlBlock=p.bytes();break}case 2:{Z.iv=p.bytes();break}default:p.skipType(C&7);break}}return Z},s.decodeDelimited=function(p){return p instanceof b||(p=new b(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"||S.isString(p.keyControlBlock))?"keyControlBlock: buffer expected":p.iv!=null&&p.hasOwnProperty("iv")&&!(p.iv&&typeof p.iv.length=="number"||S.isString(p.iv))?"iv: buffer expected":null},s.fromObject=function(p){if(p instanceof x.license_protocol.License.KeyContainer.KeyControl)return p;var v=new x.license_protocol.License.KeyContainer.KeyControl;return p.keyControlBlock!=null&&(typeof p.keyControlBlock=="string"?S.base64.decode(p.keyControlBlock,v.keyControlBlock=S.newBuffer(S.base64.length(p.keyControlBlock)),0):p.keyControlBlock.length>=0&&(v.keyControlBlock=p.keyControlBlock)),p.iv!=null&&(typeof p.iv=="string"?S.base64.decode(p.iv,v.iv=S.newBuffer(S.base64.length(p.iv)),0):p.iv.length>=0&&(v.iv=p.iv)),v},s.toObject=function(p,v){v||(v={});var N={};return v.defaults&&(v.bytes===String?N.keyControlBlock="":(N.keyControlBlock=[],v.bytes!==Array&&(N.keyControlBlock=S.newBuffer(N.keyControlBlock))),v.bytes===String?N.iv="":(N.iv=[],v.bytes!==Array&&(N.iv=S.newBuffer(N.iv)))),p.keyControlBlock!=null&&p.hasOwnProperty("keyControlBlock")&&(N.keyControlBlock=v.bytes===String?S.base64.encode(p.keyControlBlock,0,p.keyControlBlock.length):v.bytes===Array?Array.prototype.slice.call(p.keyControlBlock):p.keyControlBlock),p.iv!=null&&p.hasOwnProperty("iv")&&(N.iv=v.bytes===String?S.base64.encode(p.iv,0,p.iv.length):v.bytes===Array?Array.prototype.slice.call(p.iv):p.iv),N},s.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.KeyControl"},s}(),h.OutputProtection=function(){function s(u){if(u)for(var p=Object.keys(u),v=0;v<p.length;v+=1)u[p[v]]!=null&&(this[p[v]]=u[p[v]])}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,v){return v||(v=R.create()),p.hdcp!=null&&Object.hasOwnProperty.call(p,"hdcp")&&v.uint32(8).int32(p.hdcp),p.cgmsFlags!=null&&Object.hasOwnProperty.call(p,"cgmsFlags")&&v.uint32(16).int32(p.cgmsFlags),p.hdcpSrmRule!=null&&Object.hasOwnProperty.call(p,"hdcpSrmRule")&&v.uint32(24).int32(p.hdcpSrmRule),p.disableAnalogOutput!=null&&Object.hasOwnProperty.call(p,"disableAnalogOutput")&&v.uint32(32).bool(p.disableAnalogOutput),p.disableDigitalOutput!=null&&Object.hasOwnProperty.call(p,"disableDigitalOutput")&&v.uint32(40).bool(p.disableDigitalOutput),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof b||(p=b.create(p));for(var N=v===void 0?p.len:p.pos+v,Z=new x.license_protocol.License.KeyContainer.OutputProtection;p.pos<N;){var C=p.uint32();switch(C>>>3){case 1:{Z.hdcp=p.int32();break}case 2:{Z.cgmsFlags=p.int32();break}case 3:{Z.hdcpSrmRule=p.int32();break}case 4:{Z.disableAnalogOutput=p.bool();break}case 5:{Z.disableDigitalOutput=p.bool();break}default:p.skipType(C&7);break}}return Z},s.decodeDelimited=function(p){return p instanceof b||(p=new b(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 x.license_protocol.License.KeyContainer.OutputProtection)return p;var v=new x.license_protocol.License.KeyContainer.OutputProtection;switch(p.hdcp){default:if(typeof p.hdcp=="number"){v.hdcp=p.hdcp;break}break;case"HDCP_NONE":case 0:v.hdcp=0;break;case"HDCP_V1":case 1:v.hdcp=1;break;case"HDCP_V2":case 2:v.hdcp=2;break;case"HDCP_V2_1":case 3:v.hdcp=3;break;case"HDCP_V2_2":case 4:v.hdcp=4;break;case"HDCP_V2_3":case 5:v.hdcp=5;break;case"HDCP_NO_DIGITAL_OUTPUT":case 255:v.hdcp=255;break}switch(p.cgmsFlags){default:if(typeof p.cgmsFlags=="number"){v.cgmsFlags=p.cgmsFlags;break}break;case"CGMS_NONE":case 42:v.cgmsFlags=42;break;case"COPY_FREE":case 0:v.cgmsFlags=0;break;case"COPY_ONCE":case 2:v.cgmsFlags=2;break;case"COPY_NEVER":case 3:v.cgmsFlags=3;break}switch(p.hdcpSrmRule){default:if(typeof p.hdcpSrmRule=="number"){v.hdcpSrmRule=p.hdcpSrmRule;break}break;case"HDCP_SRM_RULE_NONE":case 0:v.hdcpSrmRule=0;break;case"CURRENT_SRM":case 1:v.hdcpSrmRule=1;break}return p.disableAnalogOutput!=null&&(v.disableAnalogOutput=!!p.disableAnalogOutput),p.disableDigitalOutput!=null&&(v.disableDigitalOutput=!!p.disableDigitalOutput),v},s.toObject=function(p,v){v||(v={});var N={};return v.defaults&&(N.hdcp=v.enums===String?"HDCP_NONE":0,N.cgmsFlags=v.enums===String?"CGMS_NONE":42,N.hdcpSrmRule=v.enums===String?"HDCP_SRM_RULE_NONE":0,N.disableAnalogOutput=!1,N.disableDigitalOutput=!1),p.hdcp!=null&&p.hasOwnProperty("hdcp")&&(N.hdcp=v.enums===String?x.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]===void 0?p.hdcp:x.license_protocol.License.KeyContainer.OutputProtection.HDCP[p.hdcp]:p.hdcp),p.cgmsFlags!=null&&p.hasOwnProperty("cgmsFlags")&&(N.cgmsFlags=v.enums===String?x.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]===void 0?p.cgmsFlags:x.license_protocol.License.KeyContainer.OutputProtection.CGMS[p.cgmsFlags]:p.cgmsFlags),p.hdcpSrmRule!=null&&p.hasOwnProperty("hdcpSrmRule")&&(N.hdcpSrmRule=v.enums===String?x.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]===void 0?p.hdcpSrmRule:x.license_protocol.License.KeyContainer.OutputProtection.HdcpSrmRule[p.hdcpSrmRule]:p.hdcpSrmRule),p.disableAnalogOutput!=null&&p.hasOwnProperty("disableAnalogOutput")&&(N.disableAnalogOutput=p.disableAnalogOutput),p.disableDigitalOutput!=null&&p.hasOwnProperty("disableDigitalOutput")&&(N.disableDigitalOutput=p.disableDigitalOutput),N},s.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OutputProtection"},s.HDCP=function(){var u={},p=Object.create(u);return p[u[0]="HDCP_NONE"]=0,p[u[1]="HDCP_V1"]=1,p[u[2]="HDCP_V2"]=2,p[u[3]="HDCP_V2_1"]=3,p[u[4]="HDCP_V2_2"]=4,p[u[5]="HDCP_V2_3"]=5,p[u[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,p}(),s.CGMS=function(){var u={},p=Object.create(u);return p[u[42]="CGMS_NONE"]=42,p[u[0]="COPY_FREE"]=0,p[u[2]="COPY_ONCE"]=2,p[u[3]="COPY_NEVER"]=3,p}(),s.HdcpSrmRule=function(){var u={},p=Object.create(u);return p[u[0]="HDCP_SRM_RULE_NONE"]=0,p[u[1]="CURRENT_SRM"]=1,p}(),s}(),h.VideoResolutionConstraint=function(){function s(u){if(u)for(var p=Object.keys(u),v=0;v<p.length;v+=1)u[p[v]]!=null&&(this[p[v]]=u[p[v]])}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,v){return v||(v=R.create()),p.minResolutionPixels!=null&&Object.hasOwnProperty.call(p,"minResolutionPixels")&&v.uint32(8).uint32(p.minResolutionPixels),p.maxResolutionPixels!=null&&Object.hasOwnProperty.call(p,"maxResolutionPixels")&&v.uint32(16).uint32(p.maxResolutionPixels),p.requiredProtection!=null&&Object.hasOwnProperty.call(p,"requiredProtection")&&x.license_protocol.License.KeyContainer.OutputProtection.encode(p.requiredProtection,v.uint32(26).fork()).ldelim(),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof b||(p=b.create(p));for(var N=v===void 0?p.len:p.pos+v,Z=new x.license_protocol.License.KeyContainer.VideoResolutionConstraint;p.pos<N;){var C=p.uint32();switch(C>>>3){case 1:{Z.minResolutionPixels=p.uint32();break}case 2:{Z.maxResolutionPixels=p.uint32();break}case 3:{Z.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.decode(p,p.uint32());break}default:p.skipType(C&7);break}}return Z},s.decodeDelimited=function(p){return p instanceof b||(p=new b(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")&&!S.isInteger(p.minResolutionPixels))return"minResolutionPixels: integer expected";if(p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&!S.isInteger(p.maxResolutionPixels))return"maxResolutionPixels: integer expected";if(p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")){var v=x.license_protocol.License.KeyContainer.OutputProtection.verify(p.requiredProtection);if(v)return"requiredProtection."+v}return null},s.fromObject=function(p){if(p instanceof x.license_protocol.License.KeyContainer.VideoResolutionConstraint)return p;var v=new x.license_protocol.License.KeyContainer.VideoResolutionConstraint;if(p.minResolutionPixels!=null&&(v.minResolutionPixels=p.minResolutionPixels>>>0),p.maxResolutionPixels!=null&&(v.maxResolutionPixels=p.maxResolutionPixels>>>0),p.requiredProtection!=null){if(typeof p.requiredProtection!="object")throw TypeError(".license_protocol.License.KeyContainer.VideoResolutionConstraint.requiredProtection: object expected");v.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.fromObject(p.requiredProtection)}return v},s.toObject=function(p,v){v||(v={});var N={};return v.defaults&&(N.minResolutionPixels=0,N.maxResolutionPixels=0,N.requiredProtection=null),p.minResolutionPixels!=null&&p.hasOwnProperty("minResolutionPixels")&&(N.minResolutionPixels=p.minResolutionPixels),p.maxResolutionPixels!=null&&p.hasOwnProperty("maxResolutionPixels")&&(N.maxResolutionPixels=p.maxResolutionPixels),p.requiredProtection!=null&&p.hasOwnProperty("requiredProtection")&&(N.requiredProtection=x.license_protocol.License.KeyContainer.OutputProtection.toObject(p.requiredProtection,v)),N},s.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.VideoResolutionConstraint"},s}(),h.OperatorSessionKeyPermissions=function(){function s(u){if(u)for(var p=Object.keys(u),v=0;v<p.length;v+=1)u[p[v]]!=null&&(this[p[v]]=u[p[v]])}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,v){return v||(v=R.create()),p.allowEncrypt!=null&&Object.hasOwnProperty.call(p,"allowEncrypt")&&v.uint32(8).bool(p.allowEncrypt),p.allowDecrypt!=null&&Object.hasOwnProperty.call(p,"allowDecrypt")&&v.uint32(16).bool(p.allowDecrypt),p.allowSign!=null&&Object.hasOwnProperty.call(p,"allowSign")&&v.uint32(24).bool(p.allowSign),p.allowSignatureVerify!=null&&Object.hasOwnProperty.call(p,"allowSignatureVerify")&&v.uint32(32).bool(p.allowSignatureVerify),v},s.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},s.decode=function(p,v){p instanceof b||(p=b.create(p));for(var N=v===void 0?p.len:p.pos+v,Z=new x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;p.pos<N;){var C=p.uint32();switch(C>>>3){case 1:{Z.allowEncrypt=p.bool();break}case 2:{Z.allowDecrypt=p.bool();break}case 3:{Z.allowSign=p.bool();break}case 4:{Z.allowSignatureVerify=p.bool();break}default:p.skipType(C&7);break}}return Z},s.decodeDelimited=function(p){return p instanceof b||(p=new b(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 x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions)return p;var v=new x.license_protocol.License.KeyContainer.OperatorSessionKeyPermissions;return p.allowEncrypt!=null&&(v.allowEncrypt=!!p.allowEncrypt),p.allowDecrypt!=null&&(v.allowDecrypt=!!p.allowDecrypt),p.allowSign!=null&&(v.allowSign=!!p.allowSign),p.allowSignatureVerify!=null&&(v.allowSignatureVerify=!!p.allowSignatureVerify),v},s.toObject=function(p,v){v||(v={});var N={};return v.defaults&&(N.allowEncrypt=!1,N.allowDecrypt=!1,N.allowSign=!1,N.allowSignatureVerify=!1),p.allowEncrypt!=null&&p.hasOwnProperty("allowEncrypt")&&(N.allowEncrypt=p.allowEncrypt),p.allowDecrypt!=null&&p.hasOwnProperty("allowDecrypt")&&(N.allowDecrypt=p.allowDecrypt),p.allowSign!=null&&p.hasOwnProperty("allowSign")&&(N.allowSign=p.allowSign),p.allowSignatureVerify!=null&&p.hasOwnProperty("allowSignatureVerify")&&(N.allowSignatureVerify=p.allowSignatureVerify),N},s.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},s.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.License.KeyContainer.OperatorSessionKeyPermissions"},s}(),h}(),O}(),U.ProtocolVersion=function(){var O={},h=Object.create(O);return h[O[20]="VERSION_2_0"]=20,h[O[21]="VERSION_2_1"]=21,h[O[22]="VERSION_2_2"]=22,h}(),U.LicenseRequest=function(){function O(h){if(h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.clientId=null,O.prototype.contentId=null,O.prototype.type=1,O.prototype.requestTime=S.Long?S.Long.fromBits(0,0,!1):0,O.prototype.keyControlNonceDeprecated=S.newBuffer([]),O.prototype.protocolVersion=20,O.prototype.keyControlNonce=0,O.prototype.encryptedClientId=null,O.create=function(s){return new O(s)},O.encode=function(s,u){return u||(u=R.create()),s.clientId!=null&&Object.hasOwnProperty.call(s,"clientId")&&x.license_protocol.ClientIdentification.encode(s.clientId,u.uint32(10).fork()).ldelim(),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&x.license_protocol.LicenseRequest.ContentIdentification.encode(s.contentId,u.uint32(18).fork()).ldelim(),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(24).int32(s.type),s.requestTime!=null&&Object.hasOwnProperty.call(s,"requestTime")&&u.uint32(32).int64(s.requestTime),s.keyControlNonceDeprecated!=null&&Object.hasOwnProperty.call(s,"keyControlNonceDeprecated")&&u.uint32(42).bytes(s.keyControlNonceDeprecated),s.protocolVersion!=null&&Object.hasOwnProperty.call(s,"protocolVersion")&&u.uint32(48).int32(s.protocolVersion),s.keyControlNonce!=null&&Object.hasOwnProperty.call(s,"keyControlNonce")&&u.uint32(56).uint32(s.keyControlNonce),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&x.license_protocol.EncryptedClientIdentification.encode(s.encryptedClientId,u.uint32(66).fork()).ldelim(),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.LicenseRequest;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.clientId=x.license_protocol.ClientIdentification.decode(s,s.uint32());break}case 2:{v.contentId=x.license_protocol.LicenseRequest.ContentIdentification.decode(s,s.uint32());break}case 3:{v.type=s.int32();break}case 4:{v.requestTime=s.int64();break}case 5:{v.keyControlNonceDeprecated=s.bytes();break}case 6:{v.protocolVersion=s.int32();break}case 7:{v.keyControlNonce=s.uint32();break}case 8:{v.encryptedClientId=x.license_protocol.EncryptedClientIdentification.decode(s,s.uint32());break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.clientId!=null&&s.hasOwnProperty("clientId")){var u=x.license_protocol.ClientIdentification.verify(s.clientId);if(u)return"clientId."+u}if(s.contentId!=null&&s.hasOwnProperty("contentId")){var u=x.license_protocol.LicenseRequest.ContentIdentification.verify(s.contentId);if(u)return"contentId."+u}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")&&!S.isInteger(s.requestTime)&&!(s.requestTime&&S.isInteger(s.requestTime.low)&&S.isInteger(s.requestTime.high)))return"requestTime: integer|Long expected";if(s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&!(s.keyControlNonceDeprecated&&typeof s.keyControlNonceDeprecated.length=="number"||S.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")&&!S.isInteger(s.keyControlNonce))return"keyControlNonce: integer expected";if(s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")){var u=x.license_protocol.EncryptedClientIdentification.verify(s.encryptedClientId);if(u)return"encryptedClientId."+u}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.LicenseRequest)return s;var u=new x.license_protocol.LicenseRequest;if(s.clientId!=null){if(typeof s.clientId!="object")throw TypeError(".license_protocol.LicenseRequest.clientId: object expected");u.clientId=x.license_protocol.ClientIdentification.fromObject(s.clientId)}if(s.contentId!=null){if(typeof s.contentId!="object")throw TypeError(".license_protocol.LicenseRequest.contentId: object expected");u.contentId=x.license_protocol.LicenseRequest.ContentIdentification.fromObject(s.contentId)}switch(s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"NEW":case 1:u.type=1;break;case"RENEWAL":case 2:u.type=2;break;case"RELEASE":case 3:u.type=3;break}switch(s.requestTime!=null&&(S.Long?(u.requestTime=S.Long.fromValue(s.requestTime)).unsigned=!1:typeof s.requestTime=="string"?u.requestTime=parseInt(s.requestTime,10):typeof s.requestTime=="number"?u.requestTime=s.requestTime:typeof s.requestTime=="object"&&(u.requestTime=new S.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber())),s.keyControlNonceDeprecated!=null&&(typeof s.keyControlNonceDeprecated=="string"?S.base64.decode(s.keyControlNonceDeprecated,u.keyControlNonceDeprecated=S.newBuffer(S.base64.length(s.keyControlNonceDeprecated)),0):s.keyControlNonceDeprecated.length>=0&&(u.keyControlNonceDeprecated=s.keyControlNonceDeprecated)),s.protocolVersion){default:if(typeof s.protocolVersion=="number"){u.protocolVersion=s.protocolVersion;break}break;case"VERSION_2_0":case 20:u.protocolVersion=20;break;case"VERSION_2_1":case 21:u.protocolVersion=21;break;case"VERSION_2_2":case 22:u.protocolVersion=22;break}if(s.keyControlNonce!=null&&(u.keyControlNonce=s.keyControlNonce>>>0),s.encryptedClientId!=null){if(typeof s.encryptedClientId!="object")throw TypeError(".license_protocol.LicenseRequest.encryptedClientId: object expected");u.encryptedClientId=x.license_protocol.EncryptedClientIdentification.fromObject(s.encryptedClientId)}return u},O.toObject=function(s,u){u||(u={});var p={};if(u.defaults){if(p.clientId=null,p.contentId=null,p.type=u.enums===String?"NEW":1,S.Long){var v=new S.Long(0,0,!1);p.requestTime=u.longs===String?v.toString():u.longs===Number?v.toNumber():v}else p.requestTime=u.longs===String?"0":0;u.bytes===String?p.keyControlNonceDeprecated="":(p.keyControlNonceDeprecated=[],u.bytes!==Array&&(p.keyControlNonceDeprecated=S.newBuffer(p.keyControlNonceDeprecated))),p.protocolVersion=u.enums===String?"VERSION_2_0":20,p.keyControlNonce=0,p.encryptedClientId=null}return s.clientId!=null&&s.hasOwnProperty("clientId")&&(p.clientId=x.license_protocol.ClientIdentification.toObject(s.clientId,u)),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=x.license_protocol.LicenseRequest.ContentIdentification.toObject(s.contentId,u)),s.type!=null&&s.hasOwnProperty("type")&&(p.type=u.enums===String?x.license_protocol.LicenseRequest.RequestType[s.type]===void 0?s.type:x.license_protocol.LicenseRequest.RequestType[s.type]:s.type),s.requestTime!=null&&s.hasOwnProperty("requestTime")&&(typeof s.requestTime=="number"?p.requestTime=u.longs===String?String(s.requestTime):s.requestTime:p.requestTime=u.longs===String?S.Long.prototype.toString.call(s.requestTime):u.longs===Number?new S.LongBits(s.requestTime.low>>>0,s.requestTime.high>>>0).toNumber():s.requestTime),s.keyControlNonceDeprecated!=null&&s.hasOwnProperty("keyControlNonceDeprecated")&&(p.keyControlNonceDeprecated=u.bytes===String?S.base64.encode(s.keyControlNonceDeprecated,0,s.keyControlNonceDeprecated.length):u.bytes===Array?Array.prototype.slice.call(s.keyControlNonceDeprecated):s.keyControlNonceDeprecated),s.protocolVersion!=null&&s.hasOwnProperty("protocolVersion")&&(p.protocolVersion=u.enums===String?x.license_protocol.ProtocolVersion[s.protocolVersion]===void 0?s.protocolVersion:x.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=x.license_protocol.EncryptedClientIdentification.toObject(s.encryptedClientId,u)),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.LicenseRequest"},O.ContentIdentification=function(){function h(u){if(u)for(var p=Object.keys(u),v=0;v<p.length;v+=1)u[p[v]]!=null&&(this[p[v]]=u[p[v]])}h.prototype.widevinePsshData=null,h.prototype.webmKeyId=null,h.prototype.existingLicense=null,h.prototype.initData=null;var s;return Object.defineProperty(h.prototype,"contentIdVariant",{get:S.oneOfGetter(s=["widevinePsshData","webmKeyId","existingLicense","initData"]),set:S.oneOfSetter(s)}),h.create=function(p){return new h(p)},h.encode=function(p,v){return v||(v=R.create()),p.widevinePsshData!=null&&Object.hasOwnProperty.call(p,"widevinePsshData")&&x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.encode(p.widevinePsshData,v.uint32(10).fork()).ldelim(),p.webmKeyId!=null&&Object.hasOwnProperty.call(p,"webmKeyId")&&x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.encode(p.webmKeyId,v.uint32(18).fork()).ldelim(),p.existingLicense!=null&&Object.hasOwnProperty.call(p,"existingLicense")&&x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.encode(p.existingLicense,v.uint32(26).fork()).ldelim(),p.initData!=null&&Object.hasOwnProperty.call(p,"initData")&&x.license_protocol.LicenseRequest.ContentIdentification.InitData.encode(p.initData,v.uint32(34).fork()).ldelim(),v},h.encodeDelimited=function(p,v){return this.encode(p,v).ldelim()},h.decode=function(p,v){p instanceof b||(p=b.create(p));for(var N=v===void 0?p.len:p.pos+v,Z=new x.license_protocol.LicenseRequest.ContentIdentification;p.pos<N;){var C=p.uint32();switch(C>>>3){case 1:{Z.widevinePsshData=x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.decode(p,p.uint32());break}case 2:{Z.webmKeyId=x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.decode(p,p.uint32());break}case 3:{Z.existingLicense=x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.decode(p,p.uint32());break}case 4:{Z.initData=x.license_protocol.LicenseRequest.ContentIdentification.InitData.decode(p,p.uint32());break}default:p.skipType(C&7);break}}return Z},h.decodeDelimited=function(p){return p instanceof b||(p=new b(p)),this.decode(p,p.uint32())},h.verify=function(p){if(typeof p!="object"||p===null)return"object expected";var v={};if(p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")){v.contentIdVariant=1;{var N=x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.verify(p.widevinePsshData);if(N)return"widevinePsshData."+N}}if(p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var N=x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.verify(p.webmKeyId);if(N)return"webmKeyId."+N}}if(p.existingLicense!=null&&p.hasOwnProperty("existingLicense")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var N=x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.verify(p.existingLicense);if(N)return"existingLicense."+N}}if(p.initData!=null&&p.hasOwnProperty("initData")){if(v.contentIdVariant===1)return"contentIdVariant: multiple values";v.contentIdVariant=1;{var N=x.license_protocol.LicenseRequest.ContentIdentification.InitData.verify(p.initData);if(N)return"initData."+N}}return null},h.fromObject=function(p){if(p instanceof x.license_protocol.LicenseRequest.ContentIdentification)return p;var v=new x.license_protocol.LicenseRequest.ContentIdentification;if(p.widevinePsshData!=null){if(typeof p.widevinePsshData!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.widevinePsshData: object expected");v.widevinePsshData=x.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");v.webmKeyId=x.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");v.existingLicense=x.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");v.initData=x.license_protocol.LicenseRequest.ContentIdentification.InitData.fromObject(p.initData)}return v},h.toObject=function(p,v){v||(v={});var N={};return p.widevinePsshData!=null&&p.hasOwnProperty("widevinePsshData")&&(N.widevinePsshData=x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.toObject(p.widevinePsshData,v),v.oneofs&&(N.contentIdVariant="widevinePsshData")),p.webmKeyId!=null&&p.hasOwnProperty("webmKeyId")&&(N.webmKeyId=x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId.toObject(p.webmKeyId,v),v.oneofs&&(N.contentIdVariant="webmKeyId")),p.existingLicense!=null&&p.hasOwnProperty("existingLicense")&&(N.existingLicense=x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.toObject(p.existingLicense,v),v.oneofs&&(N.contentIdVariant="existingLicense")),p.initData!=null&&p.hasOwnProperty("initData")&&(N.initData=x.license_protocol.LicenseRequest.ContentIdentification.InitData.toObject(p.initData,v),v.oneofs&&(N.contentIdVariant="initData")),N},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(p){return p===void 0&&(p="type.googleapis.com"),p+"/license_protocol.LicenseRequest.ContentIdentification"},h.WidevinePsshData=function(){function u(p){if(this.psshData=[],p)for(var v=Object.keys(p),N=0;N<v.length;N+=1)p[v[N]]!=null&&(this[v[N]]=p[v[N]])}return u.prototype.psshData=S.emptyArray,u.prototype.licenseType=1,u.prototype.requestId=S.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,N){if(N||(N=R.create()),v.psshData!=null&&v.psshData.length)for(var Z=0;Z<v.psshData.length;Z+=1)N.uint32(10).bytes(v.psshData[Z]);return v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&N.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&N.uint32(26).bytes(v.requestId),N},u.encodeDelimited=function(v,N){return this.encode(v,N).ldelim()},u.decode=function(v,N){v instanceof b||(v=b.create(v));for(var Z=N===void 0?v.len:v.pos+N,C=new x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;v.pos<Z;){var $=v.uint32();switch($>>>3){case 1:{C.psshData&&C.psshData.length||(C.psshData=[]),C.psshData.push(v.bytes());break}case 2:{C.licenseType=v.int32();break}case 3:{C.requestId=v.bytes();break}default:v.skipType($&7);break}}return C},u.decodeDelimited=function(v){return v instanceof b||(v=new b(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.psshData!=null&&v.hasOwnProperty("psshData")){if(!Array.isArray(v.psshData))return"psshData: array expected";for(var N=0;N<v.psshData.length;N+=1)if(!(v.psshData[N]&&typeof v.psshData[N].length=="number"||S.isString(v.psshData[N])))return"psshData: buffer[] expected"}if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData)return v;var N=new x.license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData;if(v.psshData){if(!Array.isArray(v.psshData))throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData.psshData: array expected");N.psshData=[];for(var Z=0;Z<v.psshData.length;Z+=1)typeof v.psshData[Z]=="string"?S.base64.decode(v.psshData[Z],N.psshData[Z]=S.newBuffer(S.base64.length(v.psshData[Z])),0):v.psshData[Z].length>=0&&(N.psshData[Z]=v.psshData[Z])}switch(v.licenseType){default:if(typeof v.licenseType=="number"){N.licenseType=v.licenseType;break}break;case"STREAMING":case 1:N.licenseType=1;break;case"OFFLINE":case 2:N.licenseType=2;break;case"AUTOMATIC":case 3:N.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,N.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(N.requestId=v.requestId)),N},u.toObject=function(v,N){N||(N={});var Z={};if((N.arrays||N.defaults)&&(Z.psshData=[]),N.defaults&&(Z.licenseType=N.enums===String?"STREAMING":1,N.bytes===String?Z.requestId="":(Z.requestId=[],N.bytes!==Array&&(Z.requestId=S.newBuffer(Z.requestId)))),v.psshData&&v.psshData.length){Z.psshData=[];for(var C=0;C<v.psshData.length;C+=1)Z.psshData[C]=N.bytes===String?S.base64.encode(v.psshData[C],0,v.psshData[C].length):N.bytes===Array?Array.prototype.slice.call(v.psshData[C]):v.psshData[C]}return v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(Z.licenseType=N.enums===String?x.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:x.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(Z.requestId=N.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):N.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),Z},u.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WidevinePsshData"},u}(),h.WebmKeyId=function(){function u(p){if(p)for(var v=Object.keys(p),N=0;N<v.length;N+=1)p[v[N]]!=null&&(this[v[N]]=p[v[N]])}return u.prototype.header=S.newBuffer([]),u.prototype.licenseType=1,u.prototype.requestId=S.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,N){return N||(N=R.create()),v.header!=null&&Object.hasOwnProperty.call(v,"header")&&N.uint32(10).bytes(v.header),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&N.uint32(16).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&N.uint32(26).bytes(v.requestId),N},u.encodeDelimited=function(v,N){return this.encode(v,N).ldelim()},u.decode=function(v,N){v instanceof b||(v=b.create(v));for(var Z=N===void 0?v.len:v.pos+N,C=new x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;v.pos<Z;){var $=v.uint32();switch($>>>3){case 1:{C.header=v.bytes();break}case 2:{C.licenseType=v.int32();break}case 3:{C.requestId=v.bytes();break}default:v.skipType($&7);break}}return C},u.decodeDelimited=function(v){return v instanceof b||(v=new b(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.header!=null&&v.hasOwnProperty("header")&&!(v.header&&typeof v.header.length=="number"||S.isString(v.header)))return"header: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId)return v;var N=new x.license_protocol.LicenseRequest.ContentIdentification.WebmKeyId;switch(v.header!=null&&(typeof v.header=="string"?S.base64.decode(v.header,N.header=S.newBuffer(S.base64.length(v.header)),0):v.header.length>=0&&(N.header=v.header)),v.licenseType){default:if(typeof v.licenseType=="number"){N.licenseType=v.licenseType;break}break;case"STREAMING":case 1:N.licenseType=1;break;case"OFFLINE":case 2:N.licenseType=2;break;case"AUTOMATIC":case 3:N.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,N.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(N.requestId=v.requestId)),N},u.toObject=function(v,N){N||(N={});var Z={};return N.defaults&&(N.bytes===String?Z.header="":(Z.header=[],N.bytes!==Array&&(Z.header=S.newBuffer(Z.header))),Z.licenseType=N.enums===String?"STREAMING":1,N.bytes===String?Z.requestId="":(Z.requestId=[],N.bytes!==Array&&(Z.requestId=S.newBuffer(Z.requestId)))),v.header!=null&&v.hasOwnProperty("header")&&(Z.header=N.bytes===String?S.base64.encode(v.header,0,v.header.length):N.bytes===Array?Array.prototype.slice.call(v.header):v.header),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(Z.licenseType=N.enums===String?x.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:x.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(Z.requestId=N.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):N.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),Z},u.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.WebmKeyId"},u}(),h.ExistingLicense=function(){function u(p){if(p)for(var v=Object.keys(p),N=0;N<v.length;N+=1)p[v[N]]!=null&&(this[v[N]]=p[v[N]])}return u.prototype.licenseId=null,u.prototype.secondsSinceStarted=S.Long?S.Long.fromBits(0,0,!1):0,u.prototype.secondsSinceLastPlayed=S.Long?S.Long.fromBits(0,0,!1):0,u.prototype.sessionUsageTableEntry=S.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,N){return N||(N=R.create()),v.licenseId!=null&&Object.hasOwnProperty.call(v,"licenseId")&&x.license_protocol.LicenseIdentification.encode(v.licenseId,N.uint32(10).fork()).ldelim(),v.secondsSinceStarted!=null&&Object.hasOwnProperty.call(v,"secondsSinceStarted")&&N.uint32(16).int64(v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&Object.hasOwnProperty.call(v,"secondsSinceLastPlayed")&&N.uint32(24).int64(v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&Object.hasOwnProperty.call(v,"sessionUsageTableEntry")&&N.uint32(34).bytes(v.sessionUsageTableEntry),N},u.encodeDelimited=function(v,N){return this.encode(v,N).ldelim()},u.decode=function(v,N){v instanceof b||(v=b.create(v));for(var Z=N===void 0?v.len:v.pos+N,C=new x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;v.pos<Z;){var $=v.uint32();switch($>>>3){case 1:{C.licenseId=x.license_protocol.LicenseIdentification.decode(v,v.uint32());break}case 2:{C.secondsSinceStarted=v.int64();break}case 3:{C.secondsSinceLastPlayed=v.int64();break}case 4:{C.sessionUsageTableEntry=v.bytes();break}default:v.skipType($&7);break}}return C},u.decodeDelimited=function(v){return v instanceof b||(v=new b(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.licenseId!=null&&v.hasOwnProperty("licenseId")){var N=x.license_protocol.LicenseIdentification.verify(v.licenseId);if(N)return"licenseId."+N}return v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&!S.isInteger(v.secondsSinceStarted)&&!(v.secondsSinceStarted&&S.isInteger(v.secondsSinceStarted.low)&&S.isInteger(v.secondsSinceStarted.high))?"secondsSinceStarted: integer|Long expected":v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&!S.isInteger(v.secondsSinceLastPlayed)&&!(v.secondsSinceLastPlayed&&S.isInteger(v.secondsSinceLastPlayed.low)&&S.isInteger(v.secondsSinceLastPlayed.high))?"secondsSinceLastPlayed: integer|Long expected":v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&!(v.sessionUsageTableEntry&&typeof v.sessionUsageTableEntry.length=="number"||S.isString(v.sessionUsageTableEntry))?"sessionUsageTableEntry: buffer expected":null},u.fromObject=function(v){if(v instanceof x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense)return v;var N=new x.license_protocol.LicenseRequest.ContentIdentification.ExistingLicense;if(v.licenseId!=null){if(typeof v.licenseId!="object")throw TypeError(".license_protocol.LicenseRequest.ContentIdentification.ExistingLicense.licenseId: object expected");N.licenseId=x.license_protocol.LicenseIdentification.fromObject(v.licenseId)}return v.secondsSinceStarted!=null&&(S.Long?(N.secondsSinceStarted=S.Long.fromValue(v.secondsSinceStarted)).unsigned=!1:typeof v.secondsSinceStarted=="string"?N.secondsSinceStarted=parseInt(v.secondsSinceStarted,10):typeof v.secondsSinceStarted=="number"?N.secondsSinceStarted=v.secondsSinceStarted:typeof v.secondsSinceStarted=="object"&&(N.secondsSinceStarted=new S.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber())),v.secondsSinceLastPlayed!=null&&(S.Long?(N.secondsSinceLastPlayed=S.Long.fromValue(v.secondsSinceLastPlayed)).unsigned=!1:typeof v.secondsSinceLastPlayed=="string"?N.secondsSinceLastPlayed=parseInt(v.secondsSinceLastPlayed,10):typeof v.secondsSinceLastPlayed=="number"?N.secondsSinceLastPlayed=v.secondsSinceLastPlayed:typeof v.secondsSinceLastPlayed=="object"&&(N.secondsSinceLastPlayed=new S.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber())),v.sessionUsageTableEntry!=null&&(typeof v.sessionUsageTableEntry=="string"?S.base64.decode(v.sessionUsageTableEntry,N.sessionUsageTableEntry=S.newBuffer(S.base64.length(v.sessionUsageTableEntry)),0):v.sessionUsageTableEntry.length>=0&&(N.sessionUsageTableEntry=v.sessionUsageTableEntry)),N},u.toObject=function(v,N){N||(N={});var Z={};if(N.defaults){if(Z.licenseId=null,S.Long){var C=new S.Long(0,0,!1);Z.secondsSinceStarted=N.longs===String?C.toString():N.longs===Number?C.toNumber():C}else Z.secondsSinceStarted=N.longs===String?"0":0;if(S.Long){var C=new S.Long(0,0,!1);Z.secondsSinceLastPlayed=N.longs===String?C.toString():N.longs===Number?C.toNumber():C}else Z.secondsSinceLastPlayed=N.longs===String?"0":0;N.bytes===String?Z.sessionUsageTableEntry="":(Z.sessionUsageTableEntry=[],N.bytes!==Array&&(Z.sessionUsageTableEntry=S.newBuffer(Z.sessionUsageTableEntry)))}return v.licenseId!=null&&v.hasOwnProperty("licenseId")&&(Z.licenseId=x.license_protocol.LicenseIdentification.toObject(v.licenseId,N)),v.secondsSinceStarted!=null&&v.hasOwnProperty("secondsSinceStarted")&&(typeof v.secondsSinceStarted=="number"?Z.secondsSinceStarted=N.longs===String?String(v.secondsSinceStarted):v.secondsSinceStarted:Z.secondsSinceStarted=N.longs===String?S.Long.prototype.toString.call(v.secondsSinceStarted):N.longs===Number?new S.LongBits(v.secondsSinceStarted.low>>>0,v.secondsSinceStarted.high>>>0).toNumber():v.secondsSinceStarted),v.secondsSinceLastPlayed!=null&&v.hasOwnProperty("secondsSinceLastPlayed")&&(typeof v.secondsSinceLastPlayed=="number"?Z.secondsSinceLastPlayed=N.longs===String?String(v.secondsSinceLastPlayed):v.secondsSinceLastPlayed:Z.secondsSinceLastPlayed=N.longs===String?S.Long.prototype.toString.call(v.secondsSinceLastPlayed):N.longs===Number?new S.LongBits(v.secondsSinceLastPlayed.low>>>0,v.secondsSinceLastPlayed.high>>>0).toNumber():v.secondsSinceLastPlayed),v.sessionUsageTableEntry!=null&&v.hasOwnProperty("sessionUsageTableEntry")&&(Z.sessionUsageTableEntry=N.bytes===String?S.base64.encode(v.sessionUsageTableEntry,0,v.sessionUsageTableEntry.length):N.bytes===Array?Array.prototype.slice.call(v.sessionUsageTableEntry):v.sessionUsageTableEntry),Z},u.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.ExistingLicense"},u}(),h.InitData=function(){function u(p){if(p)for(var v=Object.keys(p),N=0;N<v.length;N+=1)p[v[N]]!=null&&(this[v[N]]=p[v[N]])}return u.prototype.initDataType=1,u.prototype.initData=S.newBuffer([]),u.prototype.licenseType=1,u.prototype.requestId=S.newBuffer([]),u.create=function(v){return new u(v)},u.encode=function(v,N){return N||(N=R.create()),v.initDataType!=null&&Object.hasOwnProperty.call(v,"initDataType")&&N.uint32(8).int32(v.initDataType),v.initData!=null&&Object.hasOwnProperty.call(v,"initData")&&N.uint32(18).bytes(v.initData),v.licenseType!=null&&Object.hasOwnProperty.call(v,"licenseType")&&N.uint32(24).int32(v.licenseType),v.requestId!=null&&Object.hasOwnProperty.call(v,"requestId")&&N.uint32(34).bytes(v.requestId),N},u.encodeDelimited=function(v,N){return this.encode(v,N).ldelim()},u.decode=function(v,N){v instanceof b||(v=b.create(v));for(var Z=N===void 0?v.len:v.pos+N,C=new x.license_protocol.LicenseRequest.ContentIdentification.InitData;v.pos<Z;){var $=v.uint32();switch($>>>3){case 1:{C.initDataType=v.int32();break}case 2:{C.initData=v.bytes();break}case 3:{C.licenseType=v.int32();break}case 4:{C.requestId=v.bytes();break}default:v.skipType($&7);break}}return C},u.decodeDelimited=function(v){return v instanceof b||(v=new b(v)),this.decode(v,v.uint32())},u.verify=function(v){if(typeof v!="object"||v===null)return"object expected";if(v.initDataType!=null&&v.hasOwnProperty("initDataType"))switch(v.initDataType){default:return"initDataType: enum value expected";case 1:case 2:break}if(v.initData!=null&&v.hasOwnProperty("initData")&&!(v.initData&&typeof v.initData.length=="number"||S.isString(v.initData)))return"initData: buffer expected";if(v.licenseType!=null&&v.hasOwnProperty("licenseType"))switch(v.licenseType){default:return"licenseType: enum value expected";case 1:case 2:case 3:break}return v.requestId!=null&&v.hasOwnProperty("requestId")&&!(v.requestId&&typeof v.requestId.length=="number"||S.isString(v.requestId))?"requestId: buffer expected":null},u.fromObject=function(v){if(v instanceof x.license_protocol.LicenseRequest.ContentIdentification.InitData)return v;var N=new x.license_protocol.LicenseRequest.ContentIdentification.InitData;switch(v.initDataType){default:if(typeof v.initDataType=="number"){N.initDataType=v.initDataType;break}break;case"CENC":case 1:N.initDataType=1;break;case"WEBM":case 2:N.initDataType=2;break}switch(v.initData!=null&&(typeof v.initData=="string"?S.base64.decode(v.initData,N.initData=S.newBuffer(S.base64.length(v.initData)),0):v.initData.length>=0&&(N.initData=v.initData)),v.licenseType){default:if(typeof v.licenseType=="number"){N.licenseType=v.licenseType;break}break;case"STREAMING":case 1:N.licenseType=1;break;case"OFFLINE":case 2:N.licenseType=2;break;case"AUTOMATIC":case 3:N.licenseType=3;break}return v.requestId!=null&&(typeof v.requestId=="string"?S.base64.decode(v.requestId,N.requestId=S.newBuffer(S.base64.length(v.requestId)),0):v.requestId.length>=0&&(N.requestId=v.requestId)),N},u.toObject=function(v,N){N||(N={});var Z={};return N.defaults&&(Z.initDataType=N.enums===String?"CENC":1,N.bytes===String?Z.initData="":(Z.initData=[],N.bytes!==Array&&(Z.initData=S.newBuffer(Z.initData))),Z.licenseType=N.enums===String?"STREAMING":1,N.bytes===String?Z.requestId="":(Z.requestId=[],N.bytes!==Array&&(Z.requestId=S.newBuffer(Z.requestId)))),v.initDataType!=null&&v.hasOwnProperty("initDataType")&&(Z.initDataType=N.enums===String?x.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]===void 0?v.initDataType:x.license_protocol.LicenseRequest.ContentIdentification.InitData.InitDataType[v.initDataType]:v.initDataType),v.initData!=null&&v.hasOwnProperty("initData")&&(Z.initData=N.bytes===String?S.base64.encode(v.initData,0,v.initData.length):N.bytes===Array?Array.prototype.slice.call(v.initData):v.initData),v.licenseType!=null&&v.hasOwnProperty("licenseType")&&(Z.licenseType=N.enums===String?x.license_protocol.LicenseType[v.licenseType]===void 0?v.licenseType:x.license_protocol.LicenseType[v.licenseType]:v.licenseType),v.requestId!=null&&v.hasOwnProperty("requestId")&&(Z.requestId=N.bytes===String?S.base64.encode(v.requestId,0,v.requestId.length):N.bytes===Array?Array.prototype.slice.call(v.requestId):v.requestId),Z},u.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},u.getTypeUrl=function(v){return v===void 0&&(v="type.googleapis.com"),v+"/license_protocol.LicenseRequest.ContentIdentification.InitData"},u.InitDataType=function(){var p={},v=Object.create(p);return v[p[1]="CENC"]=1,v[p[2]="WEBM"]=2,v}(),u}(),h}(),O.RequestType=function(){var h={},s=Object.create(h);return s[h[1]="NEW"]=1,s[h[2]="RENEWAL"]=2,s[h[3]="RELEASE"]=3,s}(),O}(),U.MetricData=function(){function O(h){if(this.metricData=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.stageName="",O.prototype.metricData=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.stageName!=null&&Object.hasOwnProperty.call(s,"stageName")&&u.uint32(10).string(s.stageName),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)x.license_protocol.MetricData.TypeValue.encode(s.metricData[p],u.uint32(18).fork()).ldelim();return u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.MetricData;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.stageName=s.string();break}case 2:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(x.license_protocol.MetricData.TypeValue.decode(s,s.uint32()));break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.verify=function(s){if(typeof s!="object"||s===null)return"object expected";if(s.stageName!=null&&s.hasOwnProperty("stageName")&&!S.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 u=0;u<s.metricData.length;u+=1){var p=x.license_protocol.MetricData.TypeValue.verify(s.metricData[u]);if(p)return"metricData."+p}}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.MetricData)return s;var u=new x.license_protocol.MetricData;if(s.stageName!=null&&(u.stageName=String(s.stageName)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.MetricData.metricData: array expected");u.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");u.metricData[p]=x.license_protocol.MetricData.TypeValue.fromObject(s.metricData[p])}}return u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.metricData=[]),u.defaults&&(p.stageName=""),s.stageName!=null&&s.hasOwnProperty("stageName")&&(p.stageName=s.stageName),s.metricData&&s.metricData.length){p.metricData=[];for(var v=0;v<s.metricData.length;v+=1)p.metricData[v]=x.license_protocol.MetricData.TypeValue.toObject(s.metricData[v],u)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.MetricData"},O.MetricType=function(){var h={},s=Object.create(h);return s[h[1]="LATENCY"]=1,s[h[2]="TIMESTAMP"]=2,s}(),O.TypeValue=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.type=1,h.prototype.value=S.Long?S.Long.fromBits(0,0,!1):0,h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&p.uint32(8).int32(u.type),u.value!=null&&Object.hasOwnProperty.call(u,"value")&&p.uint32(16).int64(u.value),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.MetricData.TypeValue;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.type=u.int32();break}case 2:{N.value=u.int64();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 1:case 2:break}return u.value!=null&&u.hasOwnProperty("value")&&!S.isInteger(u.value)&&!(u.value&&S.isInteger(u.value.low)&&S.isInteger(u.value.high))?"value: integer|Long expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.MetricData.TypeValue)return u;var p=new x.license_protocol.MetricData.TypeValue;switch(u.type){default:if(typeof u.type=="number"){p.type=u.type;break}break;case"LATENCY":case 1:p.type=1;break;case"TIMESTAMP":case 2:p.type=2;break}return u.value!=null&&(S.Long?(p.value=S.Long.fromValue(u.value)).unsigned=!1:typeof u.value=="string"?p.value=parseInt(u.value,10):typeof u.value=="number"?p.value=u.value:typeof u.value=="object"&&(p.value=new S.LongBits(u.value.low>>>0,u.value.high>>>0).toNumber())),p},h.toObject=function(u,p){p||(p={});var v={};if(p.defaults)if(v.type=p.enums===String?"LATENCY":1,S.Long){var N=new S.Long(0,0,!1);v.value=p.longs===String?N.toString():p.longs===Number?N.toNumber():N}else v.value=p.longs===String?"0":0;return u.type!=null&&u.hasOwnProperty("type")&&(v.type=p.enums===String?x.license_protocol.MetricData.MetricType[u.type]===void 0?u.type:x.license_protocol.MetricData.MetricType[u.type]:u.type),u.value!=null&&u.hasOwnProperty("value")&&(typeof u.value=="number"?v.value=p.longs===String?String(u.value):u.value:v.value=p.longs===String?S.Long.prototype.toString.call(u.value):p.longs===Number?new S.LongBits(u.value.low>>>0,u.value.high>>>0).toNumber():u.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.MetricData.TypeValue"},h}(),O}(),U.VersionInfo=function(){function O(h){if(h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.licenseSdkVersion="",O.prototype.licenseServiceVersion="",O.create=function(s){return new O(s)},O.encode=function(s,u){return u||(u=R.create()),s.licenseSdkVersion!=null&&Object.hasOwnProperty.call(s,"licenseSdkVersion")&&u.uint32(10).string(s.licenseSdkVersion),s.licenseServiceVersion!=null&&Object.hasOwnProperty.call(s,"licenseServiceVersion")&&u.uint32(18).string(s.licenseServiceVersion),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.VersionInfo;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.licenseSdkVersion=s.string();break}case 2:{v.licenseServiceVersion=s.string();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.verify=function(s){return typeof s!="object"||s===null?"object expected":s.licenseSdkVersion!=null&&s.hasOwnProperty("licenseSdkVersion")&&!S.isString(s.licenseSdkVersion)?"licenseSdkVersion: string expected":s.licenseServiceVersion!=null&&s.hasOwnProperty("licenseServiceVersion")&&!S.isString(s.licenseServiceVersion)?"licenseServiceVersion: string expected":null},O.fromObject=function(s){if(s instanceof x.license_protocol.VersionInfo)return s;var u=new x.license_protocol.VersionInfo;return s.licenseSdkVersion!=null&&(u.licenseSdkVersion=String(s.licenseSdkVersion)),s.licenseServiceVersion!=null&&(u.licenseServiceVersion=String(s.licenseServiceVersion)),u},O.toObject=function(s,u){u||(u={});var p={};return u.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},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.VersionInfo"},O}(),U.SignedMessage=function(){function O(h){if(this.metricData=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.type=1,O.prototype.msg=S.newBuffer([]),O.prototype.signature=S.newBuffer([]),O.prototype.sessionKey=S.newBuffer([]),O.prototype.remoteAttestation=S.newBuffer([]),O.prototype.metricData=S.emptyArray,O.prototype.serviceVersionInfo=null,O.prototype.sessionKeyType=1,O.prototype.oemcryptoCoreMessage=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(8).int32(s.type),s.msg!=null&&Object.hasOwnProperty.call(s,"msg")&&u.uint32(18).bytes(s.msg),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&u.uint32(26).bytes(s.signature),s.sessionKey!=null&&Object.hasOwnProperty.call(s,"sessionKey")&&u.uint32(34).bytes(s.sessionKey),s.remoteAttestation!=null&&Object.hasOwnProperty.call(s,"remoteAttestation")&&u.uint32(42).bytes(s.remoteAttestation),s.metricData!=null&&s.metricData.length)for(var p=0;p<s.metricData.length;p+=1)x.license_protocol.MetricData.encode(s.metricData[p],u.uint32(50).fork()).ldelim();return s.serviceVersionInfo!=null&&Object.hasOwnProperty.call(s,"serviceVersionInfo")&&x.license_protocol.VersionInfo.encode(s.serviceVersionInfo,u.uint32(58).fork()).ldelim(),s.sessionKeyType!=null&&Object.hasOwnProperty.call(s,"sessionKeyType")&&u.uint32(64).int32(s.sessionKeyType),s.oemcryptoCoreMessage!=null&&Object.hasOwnProperty.call(s,"oemcryptoCoreMessage")&&u.uint32(74).bytes(s.oemcryptoCoreMessage),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.SignedMessage;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.type=s.int32();break}case 2:{v.msg=s.bytes();break}case 3:{v.signature=s.bytes();break}case 4:{v.sessionKey=s.bytes();break}case 5:{v.remoteAttestation=s.bytes();break}case 6:{v.metricData&&v.metricData.length||(v.metricData=[]),v.metricData.push(x.license_protocol.MetricData.decode(s,s.uint32()));break}case 7:{v.serviceVersionInfo=x.license_protocol.VersionInfo.decode(s,s.uint32());break}case 8:{v.sessionKeyType=s.int32();break}case 9:{v.oemcryptoCoreMessage=s.bytes();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.isString(s.msg)))return"msg: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||S.isString(s.signature)))return"signature: buffer expected";if(s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&!(s.sessionKey&&typeof s.sessionKey.length=="number"||S.isString(s.sessionKey)))return"sessionKey: buffer expected";if(s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&!(s.remoteAttestation&&typeof s.remoteAttestation.length=="number"||S.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 u=0;u<s.metricData.length;u+=1){var p=x.license_protocol.MetricData.verify(s.metricData[u]);if(p)return"metricData."+p}}if(s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")){var p=x.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"||S.isString(s.oemcryptoCoreMessage))?"oemcryptoCoreMessage: buffer expected":null},O.fromObject=function(s){if(s instanceof x.license_protocol.SignedMessage)return s;var u=new x.license_protocol.SignedMessage;switch(s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"LICENSE_REQUEST":case 1:u.type=1;break;case"LICENSE":case 2:u.type=2;break;case"ERROR_RESPONSE":case 3:u.type=3;break;case"SERVICE_CERTIFICATE_REQUEST":case 4:u.type=4;break;case"SERVICE_CERTIFICATE":case 5:u.type=5;break;case"SUB_LICENSE":case 6:u.type=6;break;case"CAS_LICENSE_REQUEST":case 7:u.type=7;break;case"CAS_LICENSE":case 8:u.type=8;break;case"EXTERNAL_LICENSE_REQUEST":case 9:u.type=9;break;case"EXTERNAL_LICENSE":case 10:u.type=10;break}if(s.msg!=null&&(typeof s.msg=="string"?S.base64.decode(s.msg,u.msg=S.newBuffer(S.base64.length(s.msg)),0):s.msg.length>=0&&(u.msg=s.msg)),s.signature!=null&&(typeof s.signature=="string"?S.base64.decode(s.signature,u.signature=S.newBuffer(S.base64.length(s.signature)),0):s.signature.length>=0&&(u.signature=s.signature)),s.sessionKey!=null&&(typeof s.sessionKey=="string"?S.base64.decode(s.sessionKey,u.sessionKey=S.newBuffer(S.base64.length(s.sessionKey)),0):s.sessionKey.length>=0&&(u.sessionKey=s.sessionKey)),s.remoteAttestation!=null&&(typeof s.remoteAttestation=="string"?S.base64.decode(s.remoteAttestation,u.remoteAttestation=S.newBuffer(S.base64.length(s.remoteAttestation)),0):s.remoteAttestation.length>=0&&(u.remoteAttestation=s.remoteAttestation)),s.metricData){if(!Array.isArray(s.metricData))throw TypeError(".license_protocol.SignedMessage.metricData: array expected");u.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");u.metricData[p]=x.license_protocol.MetricData.fromObject(s.metricData[p])}}if(s.serviceVersionInfo!=null){if(typeof s.serviceVersionInfo!="object")throw TypeError(".license_protocol.SignedMessage.serviceVersionInfo: object expected");u.serviceVersionInfo=x.license_protocol.VersionInfo.fromObject(s.serviceVersionInfo)}switch(s.sessionKeyType){case"UNDEFINED":case 0:u.sessionKeyType=0;break;default:if(typeof s.sessionKeyType=="number"){u.sessionKeyType=s.sessionKeyType;break}break;case"WRAPPED_AES_KEY":case 1:u.sessionKeyType=1;break;case"EPHERMERAL_ECC_PUBLIC_KEY":case 2:u.sessionKeyType=2;break}return s.oemcryptoCoreMessage!=null&&(typeof s.oemcryptoCoreMessage=="string"?S.base64.decode(s.oemcryptoCoreMessage,u.oemcryptoCoreMessage=S.newBuffer(S.base64.length(s.oemcryptoCoreMessage)),0):s.oemcryptoCoreMessage.length>=0&&(u.oemcryptoCoreMessage=s.oemcryptoCoreMessage)),u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.metricData=[]),u.defaults&&(p.type=u.enums===String?"LICENSE_REQUEST":1,u.bytes===String?p.msg="":(p.msg=[],u.bytes!==Array&&(p.msg=S.newBuffer(p.msg))),u.bytes===String?p.signature="":(p.signature=[],u.bytes!==Array&&(p.signature=S.newBuffer(p.signature))),u.bytes===String?p.sessionKey="":(p.sessionKey=[],u.bytes!==Array&&(p.sessionKey=S.newBuffer(p.sessionKey))),u.bytes===String?p.remoteAttestation="":(p.remoteAttestation=[],u.bytes!==Array&&(p.remoteAttestation=S.newBuffer(p.remoteAttestation))),p.serviceVersionInfo=null,p.sessionKeyType=u.enums===String?"WRAPPED_AES_KEY":1,u.bytes===String?p.oemcryptoCoreMessage="":(p.oemcryptoCoreMessage=[],u.bytes!==Array&&(p.oemcryptoCoreMessage=S.newBuffer(p.oemcryptoCoreMessage)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=u.enums===String?x.license_protocol.SignedMessage.MessageType[s.type]===void 0?s.type:x.license_protocol.SignedMessage.MessageType[s.type]:s.type),s.msg!=null&&s.hasOwnProperty("msg")&&(p.msg=u.bytes===String?S.base64.encode(s.msg,0,s.msg.length):u.bytes===Array?Array.prototype.slice.call(s.msg):s.msg),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=u.bytes===String?S.base64.encode(s.signature,0,s.signature.length):u.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.sessionKey!=null&&s.hasOwnProperty("sessionKey")&&(p.sessionKey=u.bytes===String?S.base64.encode(s.sessionKey,0,s.sessionKey.length):u.bytes===Array?Array.prototype.slice.call(s.sessionKey):s.sessionKey),s.remoteAttestation!=null&&s.hasOwnProperty("remoteAttestation")&&(p.remoteAttestation=u.bytes===String?S.base64.encode(s.remoteAttestation,0,s.remoteAttestation.length):u.bytes===Array?Array.prototype.slice.call(s.remoteAttestation):s.remoteAttestation),s.metricData&&s.metricData.length){p.metricData=[];for(var v=0;v<s.metricData.length;v+=1)p.metricData[v]=x.license_protocol.MetricData.toObject(s.metricData[v],u)}return s.serviceVersionInfo!=null&&s.hasOwnProperty("serviceVersionInfo")&&(p.serviceVersionInfo=x.license_protocol.VersionInfo.toObject(s.serviceVersionInfo,u)),s.sessionKeyType!=null&&s.hasOwnProperty("sessionKeyType")&&(p.sessionKeyType=u.enums===String?x.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]===void 0?s.sessionKeyType:x.license_protocol.SignedMessage.SessionKeyType[s.sessionKeyType]:s.sessionKeyType),s.oemcryptoCoreMessage!=null&&s.hasOwnProperty("oemcryptoCoreMessage")&&(p.oemcryptoCoreMessage=u.bytes===String?S.base64.encode(s.oemcryptoCoreMessage,0,s.oemcryptoCoreMessage.length):u.bytes===Array?Array.prototype.slice.call(s.oemcryptoCoreMessage):s.oemcryptoCoreMessage),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedMessage"},O.MessageType=function(){var h={},s=Object.create(h);return s[h[1]="LICENSE_REQUEST"]=1,s[h[2]="LICENSE"]=2,s[h[3]="ERROR_RESPONSE"]=3,s[h[4]="SERVICE_CERTIFICATE_REQUEST"]=4,s[h[5]="SERVICE_CERTIFICATE"]=5,s[h[6]="SUB_LICENSE"]=6,s[h[7]="CAS_LICENSE_REQUEST"]=7,s[h[8]="CAS_LICENSE"]=8,s[h[9]="EXTERNAL_LICENSE_REQUEST"]=9,s[h[10]="EXTERNAL_LICENSE"]=10,s}(),O.SessionKeyType=function(){var h={},s=Object.create(h);return s[h[0]="UNDEFINED"]=0,s[h[1]="WRAPPED_AES_KEY"]=1,s[h[2]="EPHERMERAL_ECC_PUBLIC_KEY"]=2,s}(),O}(),U.HashAlgorithmProto=function(){var O={},h=Object.create(O);return h[O[0]="HASH_ALGORITHM_UNSPECIFIED"]=0,h[O[1]="HASH_ALGORITHM_SHA_1"]=1,h[O[2]="HASH_ALGORITHM_SHA_256"]=2,h[O[3]="HASH_ALGORITHM_SHA_384"]=3,h}(),U.ClientIdentification=function(){function O(h){if(this.clientInfo=[],this.deviceCredentials=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.type=0,O.prototype.token=S.newBuffer([]),O.prototype.clientInfo=S.emptyArray,O.prototype.providerClientToken=S.newBuffer([]),O.prototype.licenseCounter=0,O.prototype.clientCapabilities=null,O.prototype.vmpData=S.newBuffer([]),O.prototype.deviceCredentials=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(8).int32(s.type),s.token!=null&&Object.hasOwnProperty.call(s,"token")&&u.uint32(18).bytes(s.token),s.clientInfo!=null&&s.clientInfo.length)for(var p=0;p<s.clientInfo.length;p+=1)x.license_protocol.ClientIdentification.NameValue.encode(s.clientInfo[p],u.uint32(26).fork()).ldelim();if(s.providerClientToken!=null&&Object.hasOwnProperty.call(s,"providerClientToken")&&u.uint32(34).bytes(s.providerClientToken),s.licenseCounter!=null&&Object.hasOwnProperty.call(s,"licenseCounter")&&u.uint32(40).uint32(s.licenseCounter),s.clientCapabilities!=null&&Object.hasOwnProperty.call(s,"clientCapabilities")&&x.license_protocol.ClientIdentification.ClientCapabilities.encode(s.clientCapabilities,u.uint32(50).fork()).ldelim(),s.vmpData!=null&&Object.hasOwnProperty.call(s,"vmpData")&&u.uint32(58).bytes(s.vmpData),s.deviceCredentials!=null&&s.deviceCredentials.length)for(var p=0;p<s.deviceCredentials.length;p+=1)x.license_protocol.ClientIdentification.ClientCredentials.encode(s.deviceCredentials[p],u.uint32(66).fork()).ldelim();return u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.ClientIdentification;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.type=s.int32();break}case 2:{v.token=s.bytes();break}case 3:{v.clientInfo&&v.clientInfo.length||(v.clientInfo=[]),v.clientInfo.push(x.license_protocol.ClientIdentification.NameValue.decode(s,s.uint32()));break}case 4:{v.providerClientToken=s.bytes();break}case 5:{v.licenseCounter=s.uint32();break}case 6:{v.clientCapabilities=x.license_protocol.ClientIdentification.ClientCapabilities.decode(s,s.uint32());break}case 7:{v.vmpData=s.bytes();break}case 8:{v.deviceCredentials&&v.deviceCredentials.length||(v.deviceCredentials=[]),v.deviceCredentials.push(x.license_protocol.ClientIdentification.ClientCredentials.decode(s,s.uint32()));break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.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 u=0;u<s.clientInfo.length;u+=1){var p=x.license_protocol.ClientIdentification.NameValue.verify(s.clientInfo[u]);if(p)return"clientInfo."+p}}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&!(s.providerClientToken&&typeof s.providerClientToken.length=="number"||S.isString(s.providerClientToken)))return"providerClientToken: buffer expected";if(s.licenseCounter!=null&&s.hasOwnProperty("licenseCounter")&&!S.isInteger(s.licenseCounter))return"licenseCounter: integer expected";if(s.clientCapabilities!=null&&s.hasOwnProperty("clientCapabilities")){var p=x.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"||S.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 u=0;u<s.deviceCredentials.length;u+=1){var p=x.license_protocol.ClientIdentification.ClientCredentials.verify(s.deviceCredentials[u]);if(p)return"deviceCredentials."+p}}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.ClientIdentification)return s;var u=new x.license_protocol.ClientIdentification;switch(s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"KEYBOX":case 0:u.type=0;break;case"DRM_DEVICE_CERTIFICATE":case 1:u.type=1;break;case"REMOTE_ATTESTATION_CERTIFICATE":case 2:u.type=2;break;case"OEM_DEVICE_CERTIFICATE":case 3:u.type=3;break}if(s.token!=null&&(typeof s.token=="string"?S.base64.decode(s.token,u.token=S.newBuffer(S.base64.length(s.token)),0):s.token.length>=0&&(u.token=s.token)),s.clientInfo){if(!Array.isArray(s.clientInfo))throw TypeError(".license_protocol.ClientIdentification.clientInfo: array expected");u.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");u.clientInfo[p]=x.license_protocol.ClientIdentification.NameValue.fromObject(s.clientInfo[p])}}if(s.providerClientToken!=null&&(typeof s.providerClientToken=="string"?S.base64.decode(s.providerClientToken,u.providerClientToken=S.newBuffer(S.base64.length(s.providerClientToken)),0):s.providerClientToken.length>=0&&(u.providerClientToken=s.providerClientToken)),s.licenseCounter!=null&&(u.licenseCounter=s.licenseCounter>>>0),s.clientCapabilities!=null){if(typeof s.clientCapabilities!="object")throw TypeError(".license_protocol.ClientIdentification.clientCapabilities: object expected");u.clientCapabilities=x.license_protocol.ClientIdentification.ClientCapabilities.fromObject(s.clientCapabilities)}if(s.vmpData!=null&&(typeof s.vmpData=="string"?S.base64.decode(s.vmpData,u.vmpData=S.newBuffer(S.base64.length(s.vmpData)),0):s.vmpData.length>=0&&(u.vmpData=s.vmpData)),s.deviceCredentials){if(!Array.isArray(s.deviceCredentials))throw TypeError(".license_protocol.ClientIdentification.deviceCredentials: array expected");u.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");u.deviceCredentials[p]=x.license_protocol.ClientIdentification.ClientCredentials.fromObject(s.deviceCredentials[p])}}return u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.clientInfo=[],p.deviceCredentials=[]),u.defaults&&(p.type=u.enums===String?"KEYBOX":0,u.bytes===String?p.token="":(p.token=[],u.bytes!==Array&&(p.token=S.newBuffer(p.token))),u.bytes===String?p.providerClientToken="":(p.providerClientToken=[],u.bytes!==Array&&(p.providerClientToken=S.newBuffer(p.providerClientToken))),p.licenseCounter=0,p.clientCapabilities=null,u.bytes===String?p.vmpData="":(p.vmpData=[],u.bytes!==Array&&(p.vmpData=S.newBuffer(p.vmpData)))),s.type!=null&&s.hasOwnProperty("type")&&(p.type=u.enums===String?x.license_protocol.ClientIdentification.TokenType[s.type]===void 0?s.type:x.license_protocol.ClientIdentification.TokenType[s.type]:s.type),s.token!=null&&s.hasOwnProperty("token")&&(p.token=u.bytes===String?S.base64.encode(s.token,0,s.token.length):u.bytes===Array?Array.prototype.slice.call(s.token):s.token),s.clientInfo&&s.clientInfo.length){p.clientInfo=[];for(var v=0;v<s.clientInfo.length;v+=1)p.clientInfo[v]=x.license_protocol.ClientIdentification.NameValue.toObject(s.clientInfo[v],u)}if(s.providerClientToken!=null&&s.hasOwnProperty("providerClientToken")&&(p.providerClientToken=u.bytes===String?S.base64.encode(s.providerClientToken,0,s.providerClientToken.length):u.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=x.license_protocol.ClientIdentification.ClientCapabilities.toObject(s.clientCapabilities,u)),s.vmpData!=null&&s.hasOwnProperty("vmpData")&&(p.vmpData=u.bytes===String?S.base64.encode(s.vmpData,0,s.vmpData.length):u.bytes===Array?Array.prototype.slice.call(s.vmpData):s.vmpData),s.deviceCredentials&&s.deviceCredentials.length){p.deviceCredentials=[];for(var v=0;v<s.deviceCredentials.length;v+=1)p.deviceCredentials[v]=x.license_protocol.ClientIdentification.ClientCredentials.toObject(s.deviceCredentials[v],u)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.ClientIdentification"},O.TokenType=function(){var h={},s=Object.create(h);return s[h[0]="KEYBOX"]=0,s[h[1]="DRM_DEVICE_CERTIFICATE"]=1,s[h[2]="REMOTE_ATTESTATION_CERTIFICATE"]=2,s[h[3]="OEM_DEVICE_CERTIFICATE"]=3,s}(),O.NameValue=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.name="",h.prototype.value="",h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.name!=null&&Object.hasOwnProperty.call(u,"name")&&p.uint32(10).string(u.name),u.value!=null&&Object.hasOwnProperty.call(u,"value")&&p.uint32(18).string(u.value),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.ClientIdentification.NameValue;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.name=u.string();break}case 2:{N.value=u.string();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.name!=null&&u.hasOwnProperty("name")&&!S.isString(u.name)?"name: string expected":u.value!=null&&u.hasOwnProperty("value")&&!S.isString(u.value)?"value: string expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.ClientIdentification.NameValue)return u;var p=new x.license_protocol.ClientIdentification.NameValue;return u.name!=null&&(p.name=String(u.name)),u.value!=null&&(p.value=String(u.value)),p},h.toObject=function(u,p){p||(p={});var v={};return p.defaults&&(v.name="",v.value=""),u.name!=null&&u.hasOwnProperty("name")&&(v.name=u.name),u.value!=null&&u.hasOwnProperty("value")&&(v.value=u.value),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.NameValue"},h}(),O.ClientCapabilities=function(){function h(s){if(this.supportedCertificateKeyType=[],s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.clientToken=!1,h.prototype.sessionToken=!1,h.prototype.videoResolutionConstraints=!1,h.prototype.maxHdcpVersion=0,h.prototype.oemCryptoApiVersion=0,h.prototype.antiRollbackUsageTable=!1,h.prototype.srmVersion=0,h.prototype.canUpdateSrm=!1,h.prototype.supportedCertificateKeyType=S.emptyArray,h.prototype.analogOutputCapabilities=0,h.prototype.canDisableAnalogOutput=!1,h.prototype.resourceRatingTier=0,h.create=function(u){return new h(u)},h.encode=function(u,p){if(p||(p=R.create()),u.clientToken!=null&&Object.hasOwnProperty.call(u,"clientToken")&&p.uint32(8).bool(u.clientToken),u.sessionToken!=null&&Object.hasOwnProperty.call(u,"sessionToken")&&p.uint32(16).bool(u.sessionToken),u.videoResolutionConstraints!=null&&Object.hasOwnProperty.call(u,"videoResolutionConstraints")&&p.uint32(24).bool(u.videoResolutionConstraints),u.maxHdcpVersion!=null&&Object.hasOwnProperty.call(u,"maxHdcpVersion")&&p.uint32(32).int32(u.maxHdcpVersion),u.oemCryptoApiVersion!=null&&Object.hasOwnProperty.call(u,"oemCryptoApiVersion")&&p.uint32(40).uint32(u.oemCryptoApiVersion),u.antiRollbackUsageTable!=null&&Object.hasOwnProperty.call(u,"antiRollbackUsageTable")&&p.uint32(48).bool(u.antiRollbackUsageTable),u.srmVersion!=null&&Object.hasOwnProperty.call(u,"srmVersion")&&p.uint32(56).uint32(u.srmVersion),u.canUpdateSrm!=null&&Object.hasOwnProperty.call(u,"canUpdateSrm")&&p.uint32(64).bool(u.canUpdateSrm),u.supportedCertificateKeyType!=null&&u.supportedCertificateKeyType.length)for(var v=0;v<u.supportedCertificateKeyType.length;v+=1)p.uint32(72).int32(u.supportedCertificateKeyType[v]);return u.analogOutputCapabilities!=null&&Object.hasOwnProperty.call(u,"analogOutputCapabilities")&&p.uint32(80).int32(u.analogOutputCapabilities),u.canDisableAnalogOutput!=null&&Object.hasOwnProperty.call(u,"canDisableAnalogOutput")&&p.uint32(88).bool(u.canDisableAnalogOutput),u.resourceRatingTier!=null&&Object.hasOwnProperty.call(u,"resourceRatingTier")&&p.uint32(96).uint32(u.resourceRatingTier),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.ClientIdentification.ClientCapabilities;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.clientToken=u.bool();break}case 2:{N.sessionToken=u.bool();break}case 3:{N.videoResolutionConstraints=u.bool();break}case 4:{N.maxHdcpVersion=u.int32();break}case 5:{N.oemCryptoApiVersion=u.uint32();break}case 6:{N.antiRollbackUsageTable=u.bool();break}case 7:{N.srmVersion=u.uint32();break}case 8:{N.canUpdateSrm=u.bool();break}case 9:{if(N.supportedCertificateKeyType&&N.supportedCertificateKeyType.length||(N.supportedCertificateKeyType=[]),(Z&7)===2)for(var C=u.uint32()+u.pos;u.pos<C;)N.supportedCertificateKeyType.push(u.int32());else N.supportedCertificateKeyType.push(u.int32());break}case 10:{N.analogOutputCapabilities=u.int32();break}case 11:{N.canDisableAnalogOutput=u.bool();break}case 12:{N.resourceRatingTier=u.uint32();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.clientToken!=null&&u.hasOwnProperty("clientToken")&&typeof u.clientToken!="boolean")return"clientToken: boolean expected";if(u.sessionToken!=null&&u.hasOwnProperty("sessionToken")&&typeof u.sessionToken!="boolean")return"sessionToken: boolean expected";if(u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")&&typeof u.videoResolutionConstraints!="boolean")return"videoResolutionConstraints: boolean expected";if(u.maxHdcpVersion!=null&&u.hasOwnProperty("maxHdcpVersion"))switch(u.maxHdcpVersion){default:return"maxHdcpVersion: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 255:break}if(u.oemCryptoApiVersion!=null&&u.hasOwnProperty("oemCryptoApiVersion")&&!S.isInteger(u.oemCryptoApiVersion))return"oemCryptoApiVersion: integer expected";if(u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&typeof u.antiRollbackUsageTable!="boolean")return"antiRollbackUsageTable: boolean expected";if(u.srmVersion!=null&&u.hasOwnProperty("srmVersion")&&!S.isInteger(u.srmVersion))return"srmVersion: integer expected";if(u.canUpdateSrm!=null&&u.hasOwnProperty("canUpdateSrm")&&typeof u.canUpdateSrm!="boolean")return"canUpdateSrm: boolean expected";if(u.supportedCertificateKeyType!=null&&u.hasOwnProperty("supportedCertificateKeyType")){if(!Array.isArray(u.supportedCertificateKeyType))return"supportedCertificateKeyType: array expected";for(var p=0;p<u.supportedCertificateKeyType.length;p+=1)switch(u.supportedCertificateKeyType[p]){default:return"supportedCertificateKeyType: enum value[] expected";case 0:case 1:case 2:case 3:case 4:break}}if(u.analogOutputCapabilities!=null&&u.hasOwnProperty("analogOutputCapabilities"))switch(u.analogOutputCapabilities){default:return"analogOutputCapabilities: enum value expected";case 0:case 1:case 2:case 3:break}return u.canDisableAnalogOutput!=null&&u.hasOwnProperty("canDisableAnalogOutput")&&typeof u.canDisableAnalogOutput!="boolean"?"canDisableAnalogOutput: boolean expected":u.resourceRatingTier!=null&&u.hasOwnProperty("resourceRatingTier")&&!S.isInteger(u.resourceRatingTier)?"resourceRatingTier: integer expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.ClientIdentification.ClientCapabilities)return u;var p=new x.license_protocol.ClientIdentification.ClientCapabilities;switch(u.clientToken!=null&&(p.clientToken=!!u.clientToken),u.sessionToken!=null&&(p.sessionToken=!!u.sessionToken),u.videoResolutionConstraints!=null&&(p.videoResolutionConstraints=!!u.videoResolutionConstraints),u.maxHdcpVersion){default:if(typeof u.maxHdcpVersion=="number"){p.maxHdcpVersion=u.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(u.oemCryptoApiVersion!=null&&(p.oemCryptoApiVersion=u.oemCryptoApiVersion>>>0),u.antiRollbackUsageTable!=null&&(p.antiRollbackUsageTable=!!u.antiRollbackUsageTable),u.srmVersion!=null&&(p.srmVersion=u.srmVersion>>>0),u.canUpdateSrm!=null&&(p.canUpdateSrm=!!u.canUpdateSrm),u.supportedCertificateKeyType){if(!Array.isArray(u.supportedCertificateKeyType))throw TypeError(".license_protocol.ClientIdentification.ClientCapabilities.supportedCertificateKeyType: array expected");p.supportedCertificateKeyType=[];for(var v=0;v<u.supportedCertificateKeyType.length;v+=1)switch(u.supportedCertificateKeyType[v]){default:if(typeof u.supportedCertificateKeyType[v]=="number"){p.supportedCertificateKeyType[v]=u.supportedCertificateKeyType[v];break}case"RSA_2048":case 0:p.supportedCertificateKeyType[v]=0;break;case"RSA_3072":case 1:p.supportedCertificateKeyType[v]=1;break;case"ECC_SECP256R1":case 2:p.supportedCertificateKeyType[v]=2;break;case"ECC_SECP384R1":case 3:p.supportedCertificateKeyType[v]=3;break;case"ECC_SECP521R1":case 4:p.supportedCertificateKeyType[v]=4;break}}switch(u.analogOutputCapabilities){default:if(typeof u.analogOutputCapabilities=="number"){p.analogOutputCapabilities=u.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 u.canDisableAnalogOutput!=null&&(p.canDisableAnalogOutput=!!u.canDisableAnalogOutput),u.resourceRatingTier!=null&&(p.resourceRatingTier=u.resourceRatingTier>>>0),p},h.toObject=function(u,p){p||(p={});var v={};if((p.arrays||p.defaults)&&(v.supportedCertificateKeyType=[]),p.defaults&&(v.clientToken=!1,v.sessionToken=!1,v.videoResolutionConstraints=!1,v.maxHdcpVersion=p.enums===String?"HDCP_NONE":0,v.oemCryptoApiVersion=0,v.antiRollbackUsageTable=!1,v.srmVersion=0,v.canUpdateSrm=!1,v.analogOutputCapabilities=p.enums===String?"ANALOG_OUTPUT_UNKNOWN":0,v.canDisableAnalogOutput=!1,v.resourceRatingTier=0),u.clientToken!=null&&u.hasOwnProperty("clientToken")&&(v.clientToken=u.clientToken),u.sessionToken!=null&&u.hasOwnProperty("sessionToken")&&(v.sessionToken=u.sessionToken),u.videoResolutionConstraints!=null&&u.hasOwnProperty("videoResolutionConstraints")&&(v.videoResolutionConstraints=u.videoResolutionConstraints),u.maxHdcpVersion!=null&&u.hasOwnProperty("maxHdcpVersion")&&(v.maxHdcpVersion=p.enums===String?x.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[u.maxHdcpVersion]===void 0?u.maxHdcpVersion:x.license_protocol.ClientIdentification.ClientCapabilities.HdcpVersion[u.maxHdcpVersion]:u.maxHdcpVersion),u.oemCryptoApiVersion!=null&&u.hasOwnProperty("oemCryptoApiVersion")&&(v.oemCryptoApiVersion=u.oemCryptoApiVersion),u.antiRollbackUsageTable!=null&&u.hasOwnProperty("antiRollbackUsageTable")&&(v.antiRollbackUsageTable=u.antiRollbackUsageTable),u.srmVersion!=null&&u.hasOwnProperty("srmVersion")&&(v.srmVersion=u.srmVersion),u.canUpdateSrm!=null&&u.hasOwnProperty("canUpdateSrm")&&(v.canUpdateSrm=u.canUpdateSrm),u.supportedCertificateKeyType&&u.supportedCertificateKeyType.length){v.supportedCertificateKeyType=[];for(var N=0;N<u.supportedCertificateKeyType.length;N+=1)v.supportedCertificateKeyType[N]=p.enums===String?x.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[u.supportedCertificateKeyType[N]]===void 0?u.supportedCertificateKeyType[N]:x.license_protocol.ClientIdentification.ClientCapabilities.CertificateKeyType[u.supportedCertificateKeyType[N]]:u.supportedCertificateKeyType[N]}return u.analogOutputCapabilities!=null&&u.hasOwnProperty("analogOutputCapabilities")&&(v.analogOutputCapabilities=p.enums===String?x.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[u.analogOutputCapabilities]===void 0?u.analogOutputCapabilities:x.license_protocol.ClientIdentification.ClientCapabilities.AnalogOutputCapabilities[u.analogOutputCapabilities]:u.analogOutputCapabilities),u.canDisableAnalogOutput!=null&&u.hasOwnProperty("canDisableAnalogOutput")&&(v.canDisableAnalogOutput=u.canDisableAnalogOutput),u.resourceRatingTier!=null&&u.hasOwnProperty("resourceRatingTier")&&(v.resourceRatingTier=u.resourceRatingTier),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.ClientCapabilities"},h.HdcpVersion=function(){var s={},u=Object.create(s);return u[s[0]="HDCP_NONE"]=0,u[s[1]="HDCP_V1"]=1,u[s[2]="HDCP_V2"]=2,u[s[3]="HDCP_V2_1"]=3,u[s[4]="HDCP_V2_2"]=4,u[s[5]="HDCP_V2_3"]=5,u[s[255]="HDCP_NO_DIGITAL_OUTPUT"]=255,u}(),h.CertificateKeyType=function(){var s={},u=Object.create(s);return u[s[0]="RSA_2048"]=0,u[s[1]="RSA_3072"]=1,u[s[2]="ECC_SECP256R1"]=2,u[s[3]="ECC_SECP384R1"]=3,u[s[4]="ECC_SECP521R1"]=4,u}(),h.AnalogOutputCapabilities=function(){var s={},u=Object.create(s);return u[s[0]="ANALOG_OUTPUT_UNKNOWN"]=0,u[s[1]="ANALOG_OUTPUT_NONE"]=1,u[s[2]="ANALOG_OUTPUT_SUPPORTED"]=2,u[s[3]="ANALOG_OUTPUT_SUPPORTS_CGMS_A"]=3,u}(),h}(),O.ClientCredentials=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.type=0,h.prototype.token=S.newBuffer([]),h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&p.uint32(8).int32(u.type),u.token!=null&&Object.hasOwnProperty.call(u,"token")&&p.uint32(18).bytes(u.token),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.ClientIdentification.ClientCredentials;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.type=u.int32();break}case 2:{N.token=u.bytes();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return u.token!=null&&u.hasOwnProperty("token")&&!(u.token&&typeof u.token.length=="number"||S.isString(u.token))?"token: buffer expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.ClientIdentification.ClientCredentials)return u;var p=new x.license_protocol.ClientIdentification.ClientCredentials;switch(u.type){default:if(typeof u.type=="number"){p.type=u.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 u.token!=null&&(typeof u.token=="string"?S.base64.decode(u.token,p.token=S.newBuffer(S.base64.length(u.token)),0):u.token.length>=0&&(p.token=u.token)),p},h.toObject=function(u,p){p||(p={});var v={};return p.defaults&&(v.type=p.enums===String?"KEYBOX":0,p.bytes===String?v.token="":(v.token=[],p.bytes!==Array&&(v.token=S.newBuffer(v.token)))),u.type!=null&&u.hasOwnProperty("type")&&(v.type=p.enums===String?x.license_protocol.ClientIdentification.TokenType[u.type]===void 0?u.type:x.license_protocol.ClientIdentification.TokenType[u.type]:u.type),u.token!=null&&u.hasOwnProperty("token")&&(v.token=p.bytes===String?S.base64.encode(u.token,0,u.token.length):p.bytes===Array?Array.prototype.slice.call(u.token):u.token),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.ClientIdentification.ClientCredentials"},h}(),O}(),U.EncryptedClientIdentification=function(){function O(h){if(h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.providerId="",O.prototype.serviceCertificateSerialNumber=S.newBuffer([]),O.prototype.encryptedClientId=S.newBuffer([]),O.prototype.encryptedClientIdIv=S.newBuffer([]),O.prototype.encryptedPrivacyKey=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,u){return u||(u=R.create()),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&u.uint32(10).string(s.providerId),s.serviceCertificateSerialNumber!=null&&Object.hasOwnProperty.call(s,"serviceCertificateSerialNumber")&&u.uint32(18).bytes(s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&Object.hasOwnProperty.call(s,"encryptedClientId")&&u.uint32(26).bytes(s.encryptedClientId),s.encryptedClientIdIv!=null&&Object.hasOwnProperty.call(s,"encryptedClientIdIv")&&u.uint32(34).bytes(s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&Object.hasOwnProperty.call(s,"encryptedPrivacyKey")&&u.uint32(42).bytes(s.encryptedPrivacyKey),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.EncryptedClientIdentification;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.providerId=s.string();break}case 2:{v.serviceCertificateSerialNumber=s.bytes();break}case 3:{v.encryptedClientId=s.bytes();break}case 4:{v.encryptedClientIdIv=s.bytes();break}case 5:{v.encryptedPrivacyKey=s.bytes();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.verify=function(s){return typeof s!="object"||s===null?"object expected":s.providerId!=null&&s.hasOwnProperty("providerId")&&!S.isString(s.providerId)?"providerId: string expected":s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&!(s.serviceCertificateSerialNumber&&typeof s.serviceCertificateSerialNumber.length=="number"||S.isString(s.serviceCertificateSerialNumber))?"serviceCertificateSerialNumber: buffer expected":s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&!(s.encryptedClientId&&typeof s.encryptedClientId.length=="number"||S.isString(s.encryptedClientId))?"encryptedClientId: buffer expected":s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&!(s.encryptedClientIdIv&&typeof s.encryptedClientIdIv.length=="number"||S.isString(s.encryptedClientIdIv))?"encryptedClientIdIv: buffer expected":s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&!(s.encryptedPrivacyKey&&typeof s.encryptedPrivacyKey.length=="number"||S.isString(s.encryptedPrivacyKey))?"encryptedPrivacyKey: buffer expected":null},O.fromObject=function(s){if(s instanceof x.license_protocol.EncryptedClientIdentification)return s;var u=new x.license_protocol.EncryptedClientIdentification;return s.providerId!=null&&(u.providerId=String(s.providerId)),s.serviceCertificateSerialNumber!=null&&(typeof s.serviceCertificateSerialNumber=="string"?S.base64.decode(s.serviceCertificateSerialNumber,u.serviceCertificateSerialNumber=S.newBuffer(S.base64.length(s.serviceCertificateSerialNumber)),0):s.serviceCertificateSerialNumber.length>=0&&(u.serviceCertificateSerialNumber=s.serviceCertificateSerialNumber)),s.encryptedClientId!=null&&(typeof s.encryptedClientId=="string"?S.base64.decode(s.encryptedClientId,u.encryptedClientId=S.newBuffer(S.base64.length(s.encryptedClientId)),0):s.encryptedClientId.length>=0&&(u.encryptedClientId=s.encryptedClientId)),s.encryptedClientIdIv!=null&&(typeof s.encryptedClientIdIv=="string"?S.base64.decode(s.encryptedClientIdIv,u.encryptedClientIdIv=S.newBuffer(S.base64.length(s.encryptedClientIdIv)),0):s.encryptedClientIdIv.length>=0&&(u.encryptedClientIdIv=s.encryptedClientIdIv)),s.encryptedPrivacyKey!=null&&(typeof s.encryptedPrivacyKey=="string"?S.base64.decode(s.encryptedPrivacyKey,u.encryptedPrivacyKey=S.newBuffer(S.base64.length(s.encryptedPrivacyKey)),0):s.encryptedPrivacyKey.length>=0&&(u.encryptedPrivacyKey=s.encryptedPrivacyKey)),u},O.toObject=function(s,u){u||(u={});var p={};return u.defaults&&(p.providerId="",u.bytes===String?p.serviceCertificateSerialNumber="":(p.serviceCertificateSerialNumber=[],u.bytes!==Array&&(p.serviceCertificateSerialNumber=S.newBuffer(p.serviceCertificateSerialNumber))),u.bytes===String?p.encryptedClientId="":(p.encryptedClientId=[],u.bytes!==Array&&(p.encryptedClientId=S.newBuffer(p.encryptedClientId))),u.bytes===String?p.encryptedClientIdIv="":(p.encryptedClientIdIv=[],u.bytes!==Array&&(p.encryptedClientIdIv=S.newBuffer(p.encryptedClientIdIv))),u.bytes===String?p.encryptedPrivacyKey="":(p.encryptedPrivacyKey=[],u.bytes!==Array&&(p.encryptedPrivacyKey=S.newBuffer(p.encryptedPrivacyKey)))),s.providerId!=null&&s.hasOwnProperty("providerId")&&(p.providerId=s.providerId),s.serviceCertificateSerialNumber!=null&&s.hasOwnProperty("serviceCertificateSerialNumber")&&(p.serviceCertificateSerialNumber=u.bytes===String?S.base64.encode(s.serviceCertificateSerialNumber,0,s.serviceCertificateSerialNumber.length):u.bytes===Array?Array.prototype.slice.call(s.serviceCertificateSerialNumber):s.serviceCertificateSerialNumber),s.encryptedClientId!=null&&s.hasOwnProperty("encryptedClientId")&&(p.encryptedClientId=u.bytes===String?S.base64.encode(s.encryptedClientId,0,s.encryptedClientId.length):u.bytes===Array?Array.prototype.slice.call(s.encryptedClientId):s.encryptedClientId),s.encryptedClientIdIv!=null&&s.hasOwnProperty("encryptedClientIdIv")&&(p.encryptedClientIdIv=u.bytes===String?S.base64.encode(s.encryptedClientIdIv,0,s.encryptedClientIdIv.length):u.bytes===Array?Array.prototype.slice.call(s.encryptedClientIdIv):s.encryptedClientIdIv),s.encryptedPrivacyKey!=null&&s.hasOwnProperty("encryptedPrivacyKey")&&(p.encryptedPrivacyKey=u.bytes===String?S.base64.encode(s.encryptedPrivacyKey,0,s.encryptedPrivacyKey.length):u.bytes===Array?Array.prototype.slice.call(s.encryptedPrivacyKey):s.encryptedPrivacyKey),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.EncryptedClientIdentification"},O}(),U.DrmCertificate=function(){function O(h){if(this.serviceTypes=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.type=0,O.prototype.serialNumber=S.newBuffer([]),O.prototype.creationTimeSeconds=0,O.prototype.expirationTimeSeconds=0,O.prototype.publicKey=S.newBuffer([]),O.prototype.systemId=0,O.prototype.testDeviceDeprecated=!1,O.prototype.providerId="",O.prototype.serviceTypes=S.emptyArray,O.prototype.algorithm=1,O.prototype.rotId=S.newBuffer([]),O.prototype.encryptionKey=null,O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(8).int32(s.type),s.serialNumber!=null&&Object.hasOwnProperty.call(s,"serialNumber")&&u.uint32(18).bytes(s.serialNumber),s.creationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"creationTimeSeconds")&&u.uint32(24).uint32(s.creationTimeSeconds),s.publicKey!=null&&Object.hasOwnProperty.call(s,"publicKey")&&u.uint32(34).bytes(s.publicKey),s.systemId!=null&&Object.hasOwnProperty.call(s,"systemId")&&u.uint32(40).uint32(s.systemId),s.testDeviceDeprecated!=null&&Object.hasOwnProperty.call(s,"testDeviceDeprecated")&&u.uint32(48).bool(s.testDeviceDeprecated),s.providerId!=null&&Object.hasOwnProperty.call(s,"providerId")&&u.uint32(58).string(s.providerId),s.serviceTypes!=null&&s.serviceTypes.length)for(var p=0;p<s.serviceTypes.length;p+=1)u.uint32(64).int32(s.serviceTypes[p]);return s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&u.uint32(72).int32(s.algorithm),s.rotId!=null&&Object.hasOwnProperty.call(s,"rotId")&&u.uint32(82).bytes(s.rotId),s.encryptionKey!=null&&Object.hasOwnProperty.call(s,"encryptionKey")&&x.license_protocol.DrmCertificate.EncryptionKey.encode(s.encryptionKey,u.uint32(90).fork()).ldelim(),s.expirationTimeSeconds!=null&&Object.hasOwnProperty.call(s,"expirationTimeSeconds")&&u.uint32(96).uint32(s.expirationTimeSeconds),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.DrmCertificate;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.type=s.int32();break}case 2:{v.serialNumber=s.bytes();break}case 3:{v.creationTimeSeconds=s.uint32();break}case 12:{v.expirationTimeSeconds=s.uint32();break}case 4:{v.publicKey=s.bytes();break}case 5:{v.systemId=s.uint32();break}case 6:{v.testDeviceDeprecated=s.bool();break}case 7:{v.providerId=s.string();break}case 8:{if(v.serviceTypes&&v.serviceTypes.length||(v.serviceTypes=[]),(N&7)===2)for(var Z=s.uint32()+s.pos;s.pos<Z;)v.serviceTypes.push(s.int32());else v.serviceTypes.push(s.int32());break}case 9:{v.algorithm=s.int32();break}case 10:{v.rotId=s.bytes();break}case 11:{v.encryptionKey=x.license_protocol.DrmCertificate.EncryptionKey.decode(s,s.uint32());break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.isString(s.serialNumber)))return"serialNumber: buffer expected";if(s.creationTimeSeconds!=null&&s.hasOwnProperty("creationTimeSeconds")&&!S.isInteger(s.creationTimeSeconds))return"creationTimeSeconds: integer expected";if(s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&!S.isInteger(s.expirationTimeSeconds))return"expirationTimeSeconds: integer expected";if(s.publicKey!=null&&s.hasOwnProperty("publicKey")&&!(s.publicKey&&typeof s.publicKey.length=="number"||S.isString(s.publicKey)))return"publicKey: buffer expected";if(s.systemId!=null&&s.hasOwnProperty("systemId")&&!S.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")&&!S.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 u=0;u<s.serviceTypes.length;u+=1)switch(s.serviceTypes[u]){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"||S.isString(s.rotId)))return"rotId: buffer expected";if(s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")){var p=x.license_protocol.DrmCertificate.EncryptionKey.verify(s.encryptionKey);if(p)return"encryptionKey."+p}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.DrmCertificate)return s;var u=new x.license_protocol.DrmCertificate;switch(s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"ROOT":case 0:u.type=0;break;case"DEVICE_MODEL":case 1:u.type=1;break;case"DEVICE":case 2:u.type=2;break;case"SERVICE":case 3:u.type=3;break;case"PROVISIONER":case 4:u.type=4;break}if(s.serialNumber!=null&&(typeof s.serialNumber=="string"?S.base64.decode(s.serialNumber,u.serialNumber=S.newBuffer(S.base64.length(s.serialNumber)),0):s.serialNumber.length>=0&&(u.serialNumber=s.serialNumber)),s.creationTimeSeconds!=null&&(u.creationTimeSeconds=s.creationTimeSeconds>>>0),s.expirationTimeSeconds!=null&&(u.expirationTimeSeconds=s.expirationTimeSeconds>>>0),s.publicKey!=null&&(typeof s.publicKey=="string"?S.base64.decode(s.publicKey,u.publicKey=S.newBuffer(S.base64.length(s.publicKey)),0):s.publicKey.length>=0&&(u.publicKey=s.publicKey)),s.systemId!=null&&(u.systemId=s.systemId>>>0),s.testDeviceDeprecated!=null&&(u.testDeviceDeprecated=!!s.testDeviceDeprecated),s.providerId!=null&&(u.providerId=String(s.providerId)),s.serviceTypes){if(!Array.isArray(s.serviceTypes))throw TypeError(".license_protocol.DrmCertificate.serviceTypes: array expected");u.serviceTypes=[];for(var p=0;p<s.serviceTypes.length;p+=1)switch(s.serviceTypes[p]){default:if(typeof s.serviceTypes[p]=="number"){u.serviceTypes[p]=s.serviceTypes[p];break}case"UNKNOWN_SERVICE_TYPE":case 0:u.serviceTypes[p]=0;break;case"LICENSE_SERVER_SDK":case 1:u.serviceTypes[p]=1;break;case"LICENSE_SERVER_PROXY_SDK":case 2:u.serviceTypes[p]=2;break;case"PROVISIONING_SDK":case 3:u.serviceTypes[p]=3;break;case"CAS_PROXY_SDK":case 4:u.serviceTypes[p]=4;break}}switch(s.algorithm){case"UNKNOWN_ALGORITHM":case 0:u.algorithm=0;break;default:if(typeof s.algorithm=="number"){u.algorithm=s.algorithm;break}break;case"RSA":case 1:u.algorithm=1;break;case"ECC_SECP256R1":case 2:u.algorithm=2;break;case"ECC_SECP384R1":case 3:u.algorithm=3;break;case"ECC_SECP521R1":case 4:u.algorithm=4;break}if(s.rotId!=null&&(typeof s.rotId=="string"?S.base64.decode(s.rotId,u.rotId=S.newBuffer(S.base64.length(s.rotId)),0):s.rotId.length>=0&&(u.rotId=s.rotId)),s.encryptionKey!=null){if(typeof s.encryptionKey!="object")throw TypeError(".license_protocol.DrmCertificate.encryptionKey: object expected");u.encryptionKey=x.license_protocol.DrmCertificate.EncryptionKey.fromObject(s.encryptionKey)}return u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.serviceTypes=[]),u.defaults&&(p.type=u.enums===String?"ROOT":0,u.bytes===String?p.serialNumber="":(p.serialNumber=[],u.bytes!==Array&&(p.serialNumber=S.newBuffer(p.serialNumber))),p.creationTimeSeconds=0,u.bytes===String?p.publicKey="":(p.publicKey=[],u.bytes!==Array&&(p.publicKey=S.newBuffer(p.publicKey))),p.systemId=0,p.testDeviceDeprecated=!1,p.providerId="",p.algorithm=u.enums===String?"RSA":1,u.bytes===String?p.rotId="":(p.rotId=[],u.bytes!==Array&&(p.rotId=S.newBuffer(p.rotId))),p.encryptionKey=null,p.expirationTimeSeconds=0),s.type!=null&&s.hasOwnProperty("type")&&(p.type=u.enums===String?x.license_protocol.DrmCertificate.Type[s.type]===void 0?s.type:x.license_protocol.DrmCertificate.Type[s.type]:s.type),s.serialNumber!=null&&s.hasOwnProperty("serialNumber")&&(p.serialNumber=u.bytes===String?S.base64.encode(s.serialNumber,0,s.serialNumber.length):u.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=u.bytes===String?S.base64.encode(s.publicKey,0,s.publicKey.length):u.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 v=0;v<s.serviceTypes.length;v+=1)p.serviceTypes[v]=u.enums===String?x.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[v]]===void 0?s.serviceTypes[v]:x.license_protocol.DrmCertificate.ServiceType[s.serviceTypes[v]]:s.serviceTypes[v]}return s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=u.enums===String?x.license_protocol.DrmCertificate.Algorithm[s.algorithm]===void 0?s.algorithm:x.license_protocol.DrmCertificate.Algorithm[s.algorithm]:s.algorithm),s.rotId!=null&&s.hasOwnProperty("rotId")&&(p.rotId=u.bytes===String?S.base64.encode(s.rotId,0,s.rotId.length):u.bytes===Array?Array.prototype.slice.call(s.rotId):s.rotId),s.encryptionKey!=null&&s.hasOwnProperty("encryptionKey")&&(p.encryptionKey=x.license_protocol.DrmCertificate.EncryptionKey.toObject(s.encryptionKey,u)),s.expirationTimeSeconds!=null&&s.hasOwnProperty("expirationTimeSeconds")&&(p.expirationTimeSeconds=s.expirationTimeSeconds),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.DrmCertificate"},O.Type=function(){var h={},s=Object.create(h);return s[h[0]="ROOT"]=0,s[h[1]="DEVICE_MODEL"]=1,s[h[2]="DEVICE"]=2,s[h[3]="SERVICE"]=3,s[h[4]="PROVISIONER"]=4,s}(),O.ServiceType=function(){var h={},s=Object.create(h);return s[h[0]="UNKNOWN_SERVICE_TYPE"]=0,s[h[1]="LICENSE_SERVER_SDK"]=1,s[h[2]="LICENSE_SERVER_PROXY_SDK"]=2,s[h[3]="PROVISIONING_SDK"]=3,s[h[4]="CAS_PROXY_SDK"]=4,s}(),O.Algorithm=function(){var h={},s=Object.create(h);return s[h[0]="UNKNOWN_ALGORITHM"]=0,s[h[1]="RSA"]=1,s[h[2]="ECC_SECP256R1"]=2,s[h[3]="ECC_SECP384R1"]=3,s[h[4]="ECC_SECP521R1"]=4,s}(),O.EncryptionKey=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.publicKey=S.newBuffer([]),h.prototype.algorithm=1,h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.publicKey!=null&&Object.hasOwnProperty.call(u,"publicKey")&&p.uint32(10).bytes(u.publicKey),u.algorithm!=null&&Object.hasOwnProperty.call(u,"algorithm")&&p.uint32(16).int32(u.algorithm),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.DrmCertificate.EncryptionKey;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.publicKey=u.bytes();break}case 2:{N.algorithm=u.int32();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.publicKey!=null&&u.hasOwnProperty("publicKey")&&!(u.publicKey&&typeof u.publicKey.length=="number"||S.isString(u.publicKey)))return"publicKey: buffer expected";if(u.algorithm!=null&&u.hasOwnProperty("algorithm"))switch(u.algorithm){default:return"algorithm: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return null},h.fromObject=function(u){if(u instanceof x.license_protocol.DrmCertificate.EncryptionKey)return u;var p=new x.license_protocol.DrmCertificate.EncryptionKey;switch(u.publicKey!=null&&(typeof u.publicKey=="string"?S.base64.decode(u.publicKey,p.publicKey=S.newBuffer(S.base64.length(u.publicKey)),0):u.publicKey.length>=0&&(p.publicKey=u.publicKey)),u.algorithm){case"UNKNOWN_ALGORITHM":case 0:p.algorithm=0;break;default:if(typeof u.algorithm=="number"){p.algorithm=u.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},h.toObject=function(u,p){p||(p={});var v={};return p.defaults&&(p.bytes===String?v.publicKey="":(v.publicKey=[],p.bytes!==Array&&(v.publicKey=S.newBuffer(v.publicKey))),v.algorithm=p.enums===String?"RSA":1),u.publicKey!=null&&u.hasOwnProperty("publicKey")&&(v.publicKey=p.bytes===String?S.base64.encode(u.publicKey,0,u.publicKey.length):p.bytes===Array?Array.prototype.slice.call(u.publicKey):u.publicKey),u.algorithm!=null&&u.hasOwnProperty("algorithm")&&(v.algorithm=p.enums===String?x.license_protocol.DrmCertificate.Algorithm[u.algorithm]===void 0?u.algorithm:x.license_protocol.DrmCertificate.Algorithm[u.algorithm]:u.algorithm),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.DrmCertificate.EncryptionKey"},h}(),O}(),U.SignedDrmCertificate=function(){function O(h){if(h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.drmCertificate=S.newBuffer([]),O.prototype.signature=S.newBuffer([]),O.prototype.signer=null,O.prototype.hashAlgorithm=0,O.create=function(s){return new O(s)},O.encode=function(s,u){return u||(u=R.create()),s.drmCertificate!=null&&Object.hasOwnProperty.call(s,"drmCertificate")&&u.uint32(10).bytes(s.drmCertificate),s.signature!=null&&Object.hasOwnProperty.call(s,"signature")&&u.uint32(18).bytes(s.signature),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&x.license_protocol.SignedDrmCertificate.encode(s.signer,u.uint32(26).fork()).ldelim(),s.hashAlgorithm!=null&&Object.hasOwnProperty.call(s,"hashAlgorithm")&&u.uint32(32).int32(s.hashAlgorithm),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.SignedDrmCertificate;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.drmCertificate=s.bytes();break}case 2:{v.signature=s.bytes();break}case 3:{v.signer=x.license_protocol.SignedDrmCertificate.decode(s,s.uint32());break}case 4:{v.hashAlgorithm=s.int32();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.isString(s.drmCertificate)))return"drmCertificate: buffer expected";if(s.signature!=null&&s.hasOwnProperty("signature")&&!(s.signature&&typeof s.signature.length=="number"||S.isString(s.signature)))return"signature: buffer expected";if(s.signer!=null&&s.hasOwnProperty("signer")){var u=x.license_protocol.SignedDrmCertificate.verify(s.signer);if(u)return"signer."+u}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},O.fromObject=function(s){if(s instanceof x.license_protocol.SignedDrmCertificate)return s;var u=new x.license_protocol.SignedDrmCertificate;if(s.drmCertificate!=null&&(typeof s.drmCertificate=="string"?S.base64.decode(s.drmCertificate,u.drmCertificate=S.newBuffer(S.base64.length(s.drmCertificate)),0):s.drmCertificate.length>=0&&(u.drmCertificate=s.drmCertificate)),s.signature!=null&&(typeof s.signature=="string"?S.base64.decode(s.signature,u.signature=S.newBuffer(S.base64.length(s.signature)),0):s.signature.length>=0&&(u.signature=s.signature)),s.signer!=null){if(typeof s.signer!="object")throw TypeError(".license_protocol.SignedDrmCertificate.signer: object expected");u.signer=x.license_protocol.SignedDrmCertificate.fromObject(s.signer)}switch(s.hashAlgorithm){default:if(typeof s.hashAlgorithm=="number"){u.hashAlgorithm=s.hashAlgorithm;break}break;case"HASH_ALGORITHM_UNSPECIFIED":case 0:u.hashAlgorithm=0;break;case"HASH_ALGORITHM_SHA_1":case 1:u.hashAlgorithm=1;break;case"HASH_ALGORITHM_SHA_256":case 2:u.hashAlgorithm=2;break;case"HASH_ALGORITHM_SHA_384":case 3:u.hashAlgorithm=3;break}return u},O.toObject=function(s,u){u||(u={});var p={};return u.defaults&&(u.bytes===String?p.drmCertificate="":(p.drmCertificate=[],u.bytes!==Array&&(p.drmCertificate=S.newBuffer(p.drmCertificate))),u.bytes===String?p.signature="":(p.signature=[],u.bytes!==Array&&(p.signature=S.newBuffer(p.signature))),p.signer=null,p.hashAlgorithm=u.enums===String?"HASH_ALGORITHM_UNSPECIFIED":0),s.drmCertificate!=null&&s.hasOwnProperty("drmCertificate")&&(p.drmCertificate=u.bytes===String?S.base64.encode(s.drmCertificate,0,s.drmCertificate.length):u.bytes===Array?Array.prototype.slice.call(s.drmCertificate):s.drmCertificate),s.signature!=null&&s.hasOwnProperty("signature")&&(p.signature=u.bytes===String?S.base64.encode(s.signature,0,s.signature.length):u.bytes===Array?Array.prototype.slice.call(s.signature):s.signature),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=x.license_protocol.SignedDrmCertificate.toObject(s.signer,u)),s.hashAlgorithm!=null&&s.hasOwnProperty("hashAlgorithm")&&(p.hashAlgorithm=u.enums===String?x.license_protocol.HashAlgorithmProto[s.hashAlgorithm]===void 0?s.hashAlgorithm:x.license_protocol.HashAlgorithmProto[s.hashAlgorithm]:s.hashAlgorithm),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.SignedDrmCertificate"},O}(),U.WidevinePsshData=function(){function O(h){if(this.keyIds=[],this.groupIds=[],this.entitledKeys=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.keyIds=S.emptyArray,O.prototype.contentId=S.newBuffer([]),O.prototype.cryptoPeriodIndex=0,O.prototype.protectionScheme=0,O.prototype.cryptoPeriodSeconds=0,O.prototype.type=0,O.prototype.keySequence=0,O.prototype.groupIds=S.emptyArray,O.prototype.entitledKeys=S.emptyArray,O.prototype.videoFeature="",O.prototype.algorithm=0,O.prototype.provider="",O.prototype.trackType="",O.prototype.policy="",O.prototype.groupedLicense=S.newBuffer([]),O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.algorithm!=null&&Object.hasOwnProperty.call(s,"algorithm")&&u.uint32(8).int32(s.algorithm),s.keyIds!=null&&s.keyIds.length)for(var p=0;p<s.keyIds.length;p+=1)u.uint32(18).bytes(s.keyIds[p]);if(s.provider!=null&&Object.hasOwnProperty.call(s,"provider")&&u.uint32(26).string(s.provider),s.contentId!=null&&Object.hasOwnProperty.call(s,"contentId")&&u.uint32(34).bytes(s.contentId),s.trackType!=null&&Object.hasOwnProperty.call(s,"trackType")&&u.uint32(42).string(s.trackType),s.policy!=null&&Object.hasOwnProperty.call(s,"policy")&&u.uint32(50).string(s.policy),s.cryptoPeriodIndex!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodIndex")&&u.uint32(56).uint32(s.cryptoPeriodIndex),s.groupedLicense!=null&&Object.hasOwnProperty.call(s,"groupedLicense")&&u.uint32(66).bytes(s.groupedLicense),s.protectionScheme!=null&&Object.hasOwnProperty.call(s,"protectionScheme")&&u.uint32(72).uint32(s.protectionScheme),s.cryptoPeriodSeconds!=null&&Object.hasOwnProperty.call(s,"cryptoPeriodSeconds")&&u.uint32(80).uint32(s.cryptoPeriodSeconds),s.type!=null&&Object.hasOwnProperty.call(s,"type")&&u.uint32(88).int32(s.type),s.keySequence!=null&&Object.hasOwnProperty.call(s,"keySequence")&&u.uint32(96).uint32(s.keySequence),s.groupIds!=null&&s.groupIds.length)for(var p=0;p<s.groupIds.length;p+=1)u.uint32(106).bytes(s.groupIds[p]);if(s.entitledKeys!=null&&s.entitledKeys.length)for(var p=0;p<s.entitledKeys.length;p+=1)x.license_protocol.WidevinePsshData.EntitledKey.encode(s.entitledKeys[p],u.uint32(114).fork()).ldelim();return s.videoFeature!=null&&Object.hasOwnProperty.call(s,"videoFeature")&&u.uint32(122).string(s.videoFeature),u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.WidevinePsshData;s.pos<p;){var N=s.uint32();switch(N>>>3){case 2:{v.keyIds&&v.keyIds.length||(v.keyIds=[]),v.keyIds.push(s.bytes());break}case 4:{v.contentId=s.bytes();break}case 7:{v.cryptoPeriodIndex=s.uint32();break}case 9:{v.protectionScheme=s.uint32();break}case 10:{v.cryptoPeriodSeconds=s.uint32();break}case 11:{v.type=s.int32();break}case 12:{v.keySequence=s.uint32();break}case 13:{v.groupIds&&v.groupIds.length||(v.groupIds=[]),v.groupIds.push(s.bytes());break}case 14:{v.entitledKeys&&v.entitledKeys.length||(v.entitledKeys=[]),v.entitledKeys.push(x.license_protocol.WidevinePsshData.EntitledKey.decode(s,s.uint32()));break}case 15:{v.videoFeature=s.string();break}case 1:{v.algorithm=s.int32();break}case 3:{v.provider=s.string();break}case 5:{v.trackType=s.string();break}case 6:{v.policy=s.string();break}case 8:{v.groupedLicense=s.bytes();break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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 u=0;u<s.keyIds.length;u+=1)if(!(s.keyIds[u]&&typeof s.keyIds[u].length=="number"||S.isString(s.keyIds[u])))return"keyIds: buffer[] expected"}if(s.contentId!=null&&s.hasOwnProperty("contentId")&&!(s.contentId&&typeof s.contentId.length=="number"||S.isString(s.contentId)))return"contentId: buffer expected";if(s.cryptoPeriodIndex!=null&&s.hasOwnProperty("cryptoPeriodIndex")&&!S.isInteger(s.cryptoPeriodIndex))return"cryptoPeriodIndex: integer expected";if(s.protectionScheme!=null&&s.hasOwnProperty("protectionScheme")&&!S.isInteger(s.protectionScheme))return"protectionScheme: integer expected";if(s.cryptoPeriodSeconds!=null&&s.hasOwnProperty("cryptoPeriodSeconds")&&!S.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")&&!S.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 u=0;u<s.groupIds.length;u+=1)if(!(s.groupIds[u]&&typeof s.groupIds[u].length=="number"||S.isString(s.groupIds[u])))return"groupIds: buffer[] expected"}if(s.entitledKeys!=null&&s.hasOwnProperty("entitledKeys")){if(!Array.isArray(s.entitledKeys))return"entitledKeys: array expected";for(var u=0;u<s.entitledKeys.length;u+=1){var p=x.license_protocol.WidevinePsshData.EntitledKey.verify(s.entitledKeys[u]);if(p)return"entitledKeys."+p}}if(s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&!S.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")&&!S.isString(s.provider)?"provider: string expected":s.trackType!=null&&s.hasOwnProperty("trackType")&&!S.isString(s.trackType)?"trackType: string expected":s.policy!=null&&s.hasOwnProperty("policy")&&!S.isString(s.policy)?"policy: string expected":s.groupedLicense!=null&&s.hasOwnProperty("groupedLicense")&&!(s.groupedLicense&&typeof s.groupedLicense.length=="number"||S.isString(s.groupedLicense))?"groupedLicense: buffer expected":null},O.fromObject=function(s){if(s instanceof x.license_protocol.WidevinePsshData)return s;var u=new x.license_protocol.WidevinePsshData;if(s.keyIds){if(!Array.isArray(s.keyIds))throw TypeError(".license_protocol.WidevinePsshData.keyIds: array expected");u.keyIds=[];for(var p=0;p<s.keyIds.length;p+=1)typeof s.keyIds[p]=="string"?S.base64.decode(s.keyIds[p],u.keyIds[p]=S.newBuffer(S.base64.length(s.keyIds[p])),0):s.keyIds[p].length>=0&&(u.keyIds[p]=s.keyIds[p])}switch(s.contentId!=null&&(typeof s.contentId=="string"?S.base64.decode(s.contentId,u.contentId=S.newBuffer(S.base64.length(s.contentId)),0):s.contentId.length>=0&&(u.contentId=s.contentId)),s.cryptoPeriodIndex!=null&&(u.cryptoPeriodIndex=s.cryptoPeriodIndex>>>0),s.protectionScheme!=null&&(u.protectionScheme=s.protectionScheme>>>0),s.cryptoPeriodSeconds!=null&&(u.cryptoPeriodSeconds=s.cryptoPeriodSeconds>>>0),s.type){default:if(typeof s.type=="number"){u.type=s.type;break}break;case"SINGLE":case 0:u.type=0;break;case"ENTITLEMENT":case 1:u.type=1;break;case"ENTITLED_KEY":case 2:u.type=2;break}if(s.keySequence!=null&&(u.keySequence=s.keySequence>>>0),s.groupIds){if(!Array.isArray(s.groupIds))throw TypeError(".license_protocol.WidevinePsshData.groupIds: array expected");u.groupIds=[];for(var p=0;p<s.groupIds.length;p+=1)typeof s.groupIds[p]=="string"?S.base64.decode(s.groupIds[p],u.groupIds[p]=S.newBuffer(S.base64.length(s.groupIds[p])),0):s.groupIds[p].length>=0&&(u.groupIds[p]=s.groupIds[p])}if(s.entitledKeys){if(!Array.isArray(s.entitledKeys))throw TypeError(".license_protocol.WidevinePsshData.entitledKeys: array expected");u.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");u.entitledKeys[p]=x.license_protocol.WidevinePsshData.EntitledKey.fromObject(s.entitledKeys[p])}}switch(s.videoFeature!=null&&(u.videoFeature=String(s.videoFeature)),s.algorithm){default:if(typeof s.algorithm=="number"){u.algorithm=s.algorithm;break}break;case"UNENCRYPTED":case 0:u.algorithm=0;break;case"AESCTR":case 1:u.algorithm=1;break}return s.provider!=null&&(u.provider=String(s.provider)),s.trackType!=null&&(u.trackType=String(s.trackType)),s.policy!=null&&(u.policy=String(s.policy)),s.groupedLicense!=null&&(typeof s.groupedLicense=="string"?S.base64.decode(s.groupedLicense,u.groupedLicense=S.newBuffer(S.base64.length(s.groupedLicense)),0):s.groupedLicense.length>=0&&(u.groupedLicense=s.groupedLicense)),u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.keyIds=[],p.groupIds=[],p.entitledKeys=[]),u.defaults&&(p.algorithm=u.enums===String?"UNENCRYPTED":0,p.provider="",u.bytes===String?p.contentId="":(p.contentId=[],u.bytes!==Array&&(p.contentId=S.newBuffer(p.contentId))),p.trackType="",p.policy="",p.cryptoPeriodIndex=0,u.bytes===String?p.groupedLicense="":(p.groupedLicense=[],u.bytes!==Array&&(p.groupedLicense=S.newBuffer(p.groupedLicense))),p.protectionScheme=0,p.cryptoPeriodSeconds=0,p.type=u.enums===String?"SINGLE":0,p.keySequence=0,p.videoFeature=""),s.algorithm!=null&&s.hasOwnProperty("algorithm")&&(p.algorithm=u.enums===String?x.license_protocol.WidevinePsshData.Algorithm[s.algorithm]===void 0?s.algorithm:x.license_protocol.WidevinePsshData.Algorithm[s.algorithm]:s.algorithm),s.keyIds&&s.keyIds.length){p.keyIds=[];for(var v=0;v<s.keyIds.length;v+=1)p.keyIds[v]=u.bytes===String?S.base64.encode(s.keyIds[v],0,s.keyIds[v].length):u.bytes===Array?Array.prototype.slice.call(s.keyIds[v]):s.keyIds[v]}if(s.provider!=null&&s.hasOwnProperty("provider")&&(p.provider=s.provider),s.contentId!=null&&s.hasOwnProperty("contentId")&&(p.contentId=u.bytes===String?S.base64.encode(s.contentId,0,s.contentId.length):u.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=u.bytes===String?S.base64.encode(s.groupedLicense,0,s.groupedLicense.length):u.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=u.enums===String?x.license_protocol.WidevinePsshData.Type[s.type]===void 0?s.type:x.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 v=0;v<s.groupIds.length;v+=1)p.groupIds[v]=u.bytes===String?S.base64.encode(s.groupIds[v],0,s.groupIds[v].length):u.bytes===Array?Array.prototype.slice.call(s.groupIds[v]):s.groupIds[v]}if(s.entitledKeys&&s.entitledKeys.length){p.entitledKeys=[];for(var v=0;v<s.entitledKeys.length;v+=1)p.entitledKeys[v]=x.license_protocol.WidevinePsshData.EntitledKey.toObject(s.entitledKeys[v],u)}return s.videoFeature!=null&&s.hasOwnProperty("videoFeature")&&(p.videoFeature=s.videoFeature),p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.WidevinePsshData"},O.Type=function(){var h={},s=Object.create(h);return s[h[0]="SINGLE"]=0,s[h[1]="ENTITLEMENT"]=1,s[h[2]="ENTITLED_KEY"]=2,s}(),O.EntitledKey=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.entitlementKeyId=S.newBuffer([]),h.prototype.keyId=S.newBuffer([]),h.prototype.key=S.newBuffer([]),h.prototype.iv=S.newBuffer([]),h.prototype.entitlementKeySizeBytes=32,h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.entitlementKeyId!=null&&Object.hasOwnProperty.call(u,"entitlementKeyId")&&p.uint32(10).bytes(u.entitlementKeyId),u.keyId!=null&&Object.hasOwnProperty.call(u,"keyId")&&p.uint32(18).bytes(u.keyId),u.key!=null&&Object.hasOwnProperty.call(u,"key")&&p.uint32(26).bytes(u.key),u.iv!=null&&Object.hasOwnProperty.call(u,"iv")&&p.uint32(34).bytes(u.iv),u.entitlementKeySizeBytes!=null&&Object.hasOwnProperty.call(u,"entitlementKeySizeBytes")&&p.uint32(40).uint32(u.entitlementKeySizeBytes),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.WidevinePsshData.EntitledKey;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.entitlementKeyId=u.bytes();break}case 2:{N.keyId=u.bytes();break}case 3:{N.key=u.bytes();break}case 4:{N.iv=u.bytes();break}case 5:{N.entitlementKeySizeBytes=u.uint32();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.entitlementKeyId!=null&&u.hasOwnProperty("entitlementKeyId")&&!(u.entitlementKeyId&&typeof u.entitlementKeyId.length=="number"||S.isString(u.entitlementKeyId))?"entitlementKeyId: buffer expected":u.keyId!=null&&u.hasOwnProperty("keyId")&&!(u.keyId&&typeof u.keyId.length=="number"||S.isString(u.keyId))?"keyId: buffer expected":u.key!=null&&u.hasOwnProperty("key")&&!(u.key&&typeof u.key.length=="number"||S.isString(u.key))?"key: buffer expected":u.iv!=null&&u.hasOwnProperty("iv")&&!(u.iv&&typeof u.iv.length=="number"||S.isString(u.iv))?"iv: buffer expected":u.entitlementKeySizeBytes!=null&&u.hasOwnProperty("entitlementKeySizeBytes")&&!S.isInteger(u.entitlementKeySizeBytes)?"entitlementKeySizeBytes: integer expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.WidevinePsshData.EntitledKey)return u;var p=new x.license_protocol.WidevinePsshData.EntitledKey;return u.entitlementKeyId!=null&&(typeof u.entitlementKeyId=="string"?S.base64.decode(u.entitlementKeyId,p.entitlementKeyId=S.newBuffer(S.base64.length(u.entitlementKeyId)),0):u.entitlementKeyId.length>=0&&(p.entitlementKeyId=u.entitlementKeyId)),u.keyId!=null&&(typeof u.keyId=="string"?S.base64.decode(u.keyId,p.keyId=S.newBuffer(S.base64.length(u.keyId)),0):u.keyId.length>=0&&(p.keyId=u.keyId)),u.key!=null&&(typeof u.key=="string"?S.base64.decode(u.key,p.key=S.newBuffer(S.base64.length(u.key)),0):u.key.length>=0&&(p.key=u.key)),u.iv!=null&&(typeof u.iv=="string"?S.base64.decode(u.iv,p.iv=S.newBuffer(S.base64.length(u.iv)),0):u.iv.length>=0&&(p.iv=u.iv)),u.entitlementKeySizeBytes!=null&&(p.entitlementKeySizeBytes=u.entitlementKeySizeBytes>>>0),p},h.toObject=function(u,p){p||(p={});var v={};return p.defaults&&(p.bytes===String?v.entitlementKeyId="":(v.entitlementKeyId=[],p.bytes!==Array&&(v.entitlementKeyId=S.newBuffer(v.entitlementKeyId))),p.bytes===String?v.keyId="":(v.keyId=[],p.bytes!==Array&&(v.keyId=S.newBuffer(v.keyId))),p.bytes===String?v.key="":(v.key=[],p.bytes!==Array&&(v.key=S.newBuffer(v.key))),p.bytes===String?v.iv="":(v.iv=[],p.bytes!==Array&&(v.iv=S.newBuffer(v.iv))),v.entitlementKeySizeBytes=32),u.entitlementKeyId!=null&&u.hasOwnProperty("entitlementKeyId")&&(v.entitlementKeyId=p.bytes===String?S.base64.encode(u.entitlementKeyId,0,u.entitlementKeyId.length):p.bytes===Array?Array.prototype.slice.call(u.entitlementKeyId):u.entitlementKeyId),u.keyId!=null&&u.hasOwnProperty("keyId")&&(v.keyId=p.bytes===String?S.base64.encode(u.keyId,0,u.keyId.length):p.bytes===Array?Array.prototype.slice.call(u.keyId):u.keyId),u.key!=null&&u.hasOwnProperty("key")&&(v.key=p.bytes===String?S.base64.encode(u.key,0,u.key.length):p.bytes===Array?Array.prototype.slice.call(u.key):u.key),u.iv!=null&&u.hasOwnProperty("iv")&&(v.iv=p.bytes===String?S.base64.encode(u.iv,0,u.iv.length):p.bytes===Array?Array.prototype.slice.call(u.iv):u.iv),u.entitlementKeySizeBytes!=null&&u.hasOwnProperty("entitlementKeySizeBytes")&&(v.entitlementKeySizeBytes=u.entitlementKeySizeBytes),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.WidevinePsshData.EntitledKey"},h}(),O.Algorithm=function(){var h={},s=Object.create(h);return s[h[0]="UNENCRYPTED"]=0,s[h[1]="AESCTR"]=1,s}(),O}(),U.FileHashes=function(){function O(h){if(this.signatures=[],h)for(var s=Object.keys(h),u=0;u<s.length;u+=1)h[s[u]]!=null&&(this[s[u]]=h[s[u]])}return O.prototype.signer=S.newBuffer([]),O.prototype.signatures=S.emptyArray,O.create=function(s){return new O(s)},O.encode=function(s,u){if(u||(u=R.create()),s.signer!=null&&Object.hasOwnProperty.call(s,"signer")&&u.uint32(10).bytes(s.signer),s.signatures!=null&&s.signatures.length)for(var p=0;p<s.signatures.length;p+=1)x.license_protocol.FileHashes.Signature.encode(s.signatures[p],u.uint32(18).fork()).ldelim();return u},O.encodeDelimited=function(s,u){return this.encode(s,u).ldelim()},O.decode=function(s,u){s instanceof b||(s=b.create(s));for(var p=u===void 0?s.len:s.pos+u,v=new x.license_protocol.FileHashes;s.pos<p;){var N=s.uint32();switch(N>>>3){case 1:{v.signer=s.bytes();break}case 2:{v.signatures&&v.signatures.length||(v.signatures=[]),v.signatures.push(x.license_protocol.FileHashes.Signature.decode(s,s.uint32()));break}default:s.skipType(N&7);break}}return v},O.decodeDelimited=function(s){return s instanceof b||(s=new b(s)),this.decode(s,s.uint32())},O.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"||S.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 u=0;u<s.signatures.length;u+=1){var p=x.license_protocol.FileHashes.Signature.verify(s.signatures[u]);if(p)return"signatures."+p}}return null},O.fromObject=function(s){if(s instanceof x.license_protocol.FileHashes)return s;var u=new x.license_protocol.FileHashes;if(s.signer!=null&&(typeof s.signer=="string"?S.base64.decode(s.signer,u.signer=S.newBuffer(S.base64.length(s.signer)),0):s.signer.length>=0&&(u.signer=s.signer)),s.signatures){if(!Array.isArray(s.signatures))throw TypeError(".license_protocol.FileHashes.signatures: array expected");u.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");u.signatures[p]=x.license_protocol.FileHashes.Signature.fromObject(s.signatures[p])}}return u},O.toObject=function(s,u){u||(u={});var p={};if((u.arrays||u.defaults)&&(p.signatures=[]),u.defaults&&(u.bytes===String?p.signer="":(p.signer=[],u.bytes!==Array&&(p.signer=S.newBuffer(p.signer))),s.signer!=null&&s.hasOwnProperty("signer")&&(p.signer=u.bytes===String?S.base64.encode(s.signer,0,s.signer.length):u.bytes===Array?Array.prototype.slice.call(s.signer):s.signer)),s.signatures&&s.signatures.length){p.signatures=[];for(var v=0;v<s.signatures.length;v+=1)p.signatures[v]=x.license_protocol.FileHashes.Signature.toObject(s.signatures[v],u)}return p},O.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},O.getTypeUrl=function(s){return s===void 0&&(s="type.googleapis.com"),s+"/license_protocol.FileHashes"},O.Signature=function(){function h(s){if(s)for(var u=Object.keys(s),p=0;p<u.length;p+=1)s[u[p]]!=null&&(this[u[p]]=s[u[p]])}return h.prototype.filename="",h.prototype.testSigning=!1,h.prototype.SHA512Hash=S.newBuffer([]),h.prototype.mainExe=!1,h.prototype.signature=S.newBuffer([]),h.create=function(u){return new h(u)},h.encode=function(u,p){return p||(p=R.create()),u.filename!=null&&Object.hasOwnProperty.call(u,"filename")&&p.uint32(10).string(u.filename),u.testSigning!=null&&Object.hasOwnProperty.call(u,"testSigning")&&p.uint32(16).bool(u.testSigning),u.SHA512Hash!=null&&Object.hasOwnProperty.call(u,"SHA512Hash")&&p.uint32(26).bytes(u.SHA512Hash),u.mainExe!=null&&Object.hasOwnProperty.call(u,"mainExe")&&p.uint32(32).bool(u.mainExe),u.signature!=null&&Object.hasOwnProperty.call(u,"signature")&&p.uint32(42).bytes(u.signature),p},h.encodeDelimited=function(u,p){return this.encode(u,p).ldelim()},h.decode=function(u,p){u instanceof b||(u=b.create(u));for(var v=p===void 0?u.len:u.pos+p,N=new x.license_protocol.FileHashes.Signature;u.pos<v;){var Z=u.uint32();switch(Z>>>3){case 1:{N.filename=u.string();break}case 2:{N.testSigning=u.bool();break}case 3:{N.SHA512Hash=u.bytes();break}case 4:{N.mainExe=u.bool();break}case 5:{N.signature=u.bytes();break}default:u.skipType(Z&7);break}}return N},h.decodeDelimited=function(u){return u instanceof b||(u=new b(u)),this.decode(u,u.uint32())},h.verify=function(u){return typeof u!="object"||u===null?"object expected":u.filename!=null&&u.hasOwnProperty("filename")&&!S.isString(u.filename)?"filename: string expected":u.testSigning!=null&&u.hasOwnProperty("testSigning")&&typeof u.testSigning!="boolean"?"testSigning: boolean expected":u.SHA512Hash!=null&&u.hasOwnProperty("SHA512Hash")&&!(u.SHA512Hash&&typeof u.SHA512Hash.length=="number"||S.isString(u.SHA512Hash))?"SHA512Hash: buffer expected":u.mainExe!=null&&u.hasOwnProperty("mainExe")&&typeof u.mainExe!="boolean"?"mainExe: boolean expected":u.signature!=null&&u.hasOwnProperty("signature")&&!(u.signature&&typeof u.signature.length=="number"||S.isString(u.signature))?"signature: buffer expected":null},h.fromObject=function(u){if(u instanceof x.license_protocol.FileHashes.Signature)return u;var p=new x.license_protocol.FileHashes.Signature;return u.filename!=null&&(p.filename=String(u.filename)),u.testSigning!=null&&(p.testSigning=!!u.testSigning),u.SHA512Hash!=null&&(typeof u.SHA512Hash=="string"?S.base64.decode(u.SHA512Hash,p.SHA512Hash=S.newBuffer(S.base64.length(u.SHA512Hash)),0):u.SHA512Hash.length>=0&&(p.SHA512Hash=u.SHA512Hash)),u.mainExe!=null&&(p.mainExe=!!u.mainExe),u.signature!=null&&(typeof u.signature=="string"?S.base64.decode(u.signature,p.signature=S.newBuffer(S.base64.length(u.signature)),0):u.signature.length>=0&&(p.signature=u.signature)),p},h.toObject=function(u,p){p||(p={});var v={};return p.defaults&&(v.filename="",v.testSigning=!1,p.bytes===String?v.SHA512Hash="":(v.SHA512Hash=[],p.bytes!==Array&&(v.SHA512Hash=S.newBuffer(v.SHA512Hash))),v.mainExe=!1,p.bytes===String?v.signature="":(v.signature=[],p.bytes!==Array&&(v.signature=S.newBuffer(v.signature)))),u.filename!=null&&u.hasOwnProperty("filename")&&(v.filename=u.filename),u.testSigning!=null&&u.hasOwnProperty("testSigning")&&(v.testSigning=u.testSigning),u.SHA512Hash!=null&&u.hasOwnProperty("SHA512Hash")&&(v.SHA512Hash=p.bytes===String?S.base64.encode(u.SHA512Hash,0,u.SHA512Hash.length):p.bytes===Array?Array.prototype.slice.call(u.SHA512Hash):u.SHA512Hash),u.mainExe!=null&&u.hasOwnProperty("mainExe")&&(v.mainExe=u.mainExe),u.signature!=null&&u.hasOwnProperty("signature")&&(v.signature=p.bytes===String?S.base64.encode(u.signature,0,u.signature.length):p.bytes===Array?Array.prototype.slice.call(u.signature):u.signature),v},h.prototype.toJSON=function(){return this.constructor.toObject(this,A.util.toJSONOptions)},h.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/license_protocol.FileHashes.Signature"},h}(),O}(),U}(),x})(protobuf);const{SignedMessage:uR,LicenseRequest:aR}=protobuf.roots.default.license_protocol;function CC(A){const b=Array.from(A).map(R=>String.fromCharCode(R)).join("");return btoa(b)}function sR(A){A=A.replace(/^await\s+/,"");const b=/fetch\(['"](.+?)['"],\s*(\{.+?\})\)/s;A.split(`
`).map(O=>O.trim()).filter(Boolean);const R={method:"UNDEFINED",url:"",headers:{},body:null},S=A.match(b);if(!S)throw console.log(A),new Error("Invalid 'Copy as fetch' string.");R.url=S[1];const x=S[2],U=JSON.parse(x);return U.method&&(R.method=U.method),U.headers&&(R.headers=U.headers),U.body&&(R.body=U.body),R}const cR=new Uint8Array([237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237]),fR=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),dR=new Uint8Array([112,115,115,104]);function x2(A,b){const R=new ArrayBuffer(4);return new DataView(R).setUint32(0,A,b),new Uint8Array(R)}function y2(A,b){const R=new ArrayBuffer(2);return new DataView(R).setUint16(0,A,b),new Uint8Array(R)}function zA(A,b){const R=A.length,S=R+32,x=new Uint8Array([...x2(S,!1),...dR,...new Uint8Array(4),...b,...x2(R,!1),...A]);return CC(x)}function pR(A){const b=new Uint8Array([...y2(1,!0),...y2(A.length,!0),...A]);return new Uint8Array([...x2(b.length+2+4,!0),...y2(1,!0),...b])}function hR(A){const b=new Uint8Array(A.length*2);for(let R=0;R<A.length;R++){const S=A.charCodeAt(R);b[R*2]=S&255,b[R*2+1]=S>>8}return b}function yR(A){return Uint8Array.from(A.split("").map(b=>b.charCodeAt()))}async function gR(){try{const A=await navigator.clipboard.readText(),b=sR(A);let R,S;if(b.body.startsWith("<")){S=b.body;const x=S.match(/.*(<WRMHEADER.*<\/WRMHEADER>).*/),U=x?x[1]:null,O=hR(U),h=pR(O);R=zA(h,fR)}else{const x=yR(b.body);let U,O;try{U=uR.decode(x),O=aR.decode(U.msg)}catch(h){console.error("Decoding failed, returning empty pssh",h),R=""}if(O&&O.contentId&&O.contentId.widevinePsshData){const h=O.contentId.widevinePsshData.psshData[0];R=zA(h,cR)}mR(x)?S=CC(x):S=b.body}document.getElementById("licurl").value=b.url,document.getElementById("headers").value=JSON.stringify(b.headers),document.getElementById("pssh").value=R,document.getElementById("data").value=S}catch(A){console.error("Failed to read clipboard contents:",A)}}function mR(A){return A.some(b=>b>127)}function vR(){const[A,b]=Se.useState(""),[R,S]=Se.useState(""),[x,U]=Se.useState(""),[O,h]=Se.useState(""),[s,u]=Se.useState(""),[p,v]=Se.useState(""),[N,Z]=Se.useState(""),[C,$]=Se.useState(!1),[oe,me]=Se.useState([]),[Ve,ue]=Se.useState("default");Se.useEffect(()=>{document.title="Home | CDRM-Project"},[]);const Ne=Se.useRef(null),Re=Se.useRef(null),$e=()=>{C&&$(!1),b(""),S(""),U(""),h(""),u(""),v("")},it=_=>{_.preventDefault(),fetch("/api/decrypt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pssh:A,licurl:R,proxy:x,headers:O,cookies:s,data:p,device:Ve})}).then(ce=>ce.json()).then(ce=>{const he=ce.message.replace(/\n/g,"<br />");Z(he),$(!0)}).catch(ce=>{console.error("Error during decryption request:",ce),Z("Error: Unable to process request."),$(!0)})},Dt=_=>{if(_.preventDefault(),Re.current){const ce=Re.current.innerText;navigator.clipboard.writeText(ce).catch(he=>{alert("Failed to copy!"),console.error(he)})}},_t=()=>{event.preventDefault(),gR().then(()=>{b(document.getElementById("pssh").value),S(document.getElementById("licurl").value),h(document.getElementById("headers").value),v(document.getElementById("data").value)}).catch(_=>{alert("Failed to paste from fetch!")})};return Se.useEffect(()=>{C&&Ne.current&&Ne.current.scrollIntoView({behavior:"smooth"})},[N,C]),Se.useEffect(()=>{fetch("/login/status",{method:"POST"}).then(_=>_.json()).then(_=>{if(_.message==="True")return fetch("/userinfo",{method:"POST"});throw new Error("Not logged in")}).then(_=>_.json()).then(_=>{const he=["CDRM-Project Public Widevine CDM","CDRM-Project Public PlayReady CDM",...[..._.Widevine_Devices,..._.Playready_Devices]];me(he.length>0?he:[]),ue(he.length>0?he[0]:"default")}).catch(()=>{me([]),ue("default")})},[]),re.jsxs(re.Fragment,{children:[re.jsx("div",{className:"flex flex-col w-full overflow-y-auto p-4 min-h-full",children:re.jsxs("form",{className:"flex flex-col w-full h-full bg-black/5 p-4 overflow-y-auto",children:[re.jsxs("label",{htmlFor:"pssh",className:"text-white w-8/10 self-center",children:["PSSH:"," "]}),re.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:A,onChange:_=>b(_.target.value)}),re.jsxs("label",{htmlFor:"licurl",className:"text-white w-8/10 self-center",children:["License URL:"," "]}),re.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:R,onChange:_=>S(_.target.value)}),re.jsxs("label",{htmlFor:"proxy",className:"text-white w-8/10 self-center",children:["Proxy:"," "]}),re.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:x,onChange:_=>U(_.target.value)}),re.jsxs("label",{htmlFor:"headers",className:"text-white w-8/10 self-center",children:["Headers:"," "]}),re.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:O,onChange:_=>h(_.target.value)}),re.jsxs("label",{htmlFor:"cookies",className:"text-white w-8/10 self-center",children:["Cookies:"," "]}),re.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:_=>u(_.target.value)}),re.jsxs("label",{htmlFor:"data",className:"text-white w-8/10 self-center",children:["Data:"," "]}),re.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:_=>v(_.target.value)}),oe.length>0&&re.jsxs(re.Fragment,{children:[re.jsx("label",{htmlFor:"device",className:"text-white w-8/10 self-center",children:"Select Device:"}),re.jsx("select",{id:"device",className:"w-8/10 border-2 border-sky-500/25 rounded-xl h-10 self-center m-2 text-white bg-black p-1",value:Ve,onChange:_=>ue(_.target.value),children:oe.map((_,ce)=>re.jsx("option",{value:_,children:_},ce))})]}),re.jsxs("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:[re.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:it,children:"Submit"}),re.jsx("button",{onClick:_t,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"}),re.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:$e,children:"Reset"})]})]})}),C&&re.jsxs("div",{id:"main_content",className:"flex-col w-full h-full p-10 items-center justify-center self-center",children:[re.jsx("div",{className:"flex flex-col w-full h-full overflow-y-auto items-center",children:re.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:[re.jsx("p",{className:"w-full border-b-2 border-white/75 pb-2",children:"Results:"}),re.jsx("p",{className:"w-full grow pt-10 break-words overflow-y-auto",ref:Re,dangerouslySetInnerHTML:{__html:N}}),re.jsx("div",{ref:Ne})]})}),re.jsx("div",{className:"flex flex-col lg:flex-row w-full self-center mt-5 items-center lg:justify-around lg:items-stretch",children:re.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:Dt,children:"Copy Results"})})]})]})}function SR(){const[A,b]=Se.useState(""),[R,S]=Se.useState([]),[x,U]=Se.useState(0),O=Se.useRef(null);Se.useEffect(()=>{(async()=>{try{const v=await(await fetch("/api/cache/keycount")).json();U(v.count)}catch(p){console.error("Error fetching key count:",p)}})()},[]);const h=u=>{const p=u.target.value;b(p),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{p.trim()!==""?s(p):S([])},1e3)},s=u=>{fetch("/api/cache/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:u})}).then(p=>p.json()).then(p=>S(p)).catch(p=>console.error("Error:",p))};return Se.useEffect(()=>{document.title="Cache | CDRM-Project"},[]),re.jsxs("div",{className:"flex flex-col w-full h-full overflow-y-auto p-4",children:[re.jsxs("div",{className:"flex flex-col lg:flex-row w-full lg:h-12 items-center",children:[re.jsx("input",{type:"text",value:A,onChange:h,placeholder:`Search ${x} 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"}),re.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"})]}),re.jsx("div",{className:"w-full grow p-4 border-2 border-emerald-500/50 rounded-2xl mt-5 overflow-y-auto",children:re.jsxs("table",{className:"min-w-full text-white",children:[re.jsx("thead",{children:re.jsxs("tr",{children:[re.jsx("th",{className:"p-2 border border-black",children:"PSSH"}),re.jsx("th",{className:"p-2 border border-black",children:"KID"}),re.jsx("th",{className:"p-2 border border-black",children:"Key"})]})}),re.jsx("tbody",{children:R.length>0?R.map((u,p)=>re.jsxs("tr",{children:[re.jsx("td",{className:"p-2 border border-black",children:u.PSSH}),re.jsx("td",{className:"p-2 border border-black",children:u.KID}),re.jsx("td",{className:"p-2 border border-black",children:u.Key})]},p)):re.jsx("tr",{children:re.jsx("td",{colSpan:"3",className:"p-2 border border-black text-center",children:"No data found"})})})]})})]})}const{protocol:E2,hostname:wR,port:iv}=window.location;let lg=`${E2}//${wR}`;(E2==="http:"&&iv!=="80"||E2==="https:"&&iv!=="443"&&iv!=="")&&(lg+=`:${iv}`);function TR(){const[A,b]=Se.useState({device_type:"",system_id:"",security_level:"",host:"",secret:"",device_name:""}),[R,S]=Se.useState({security_level:"",host:"",secret:"",device_name:""});return Se.useEffect(()=>{fetch("/remotecdm/widevine/deviceinfo").then(x=>x.json()).then(x=>{b({device_type:x.device_type,system_id:x.system_id,security_level:x.security_level,host:x.host,secret:x.secret,device_name:x.device_name})}).catch(x=>console.error("Error fetching Widevine info:",x)),fetch("/remotecdm/playready/deviceinfo").then(x=>x.json()).then(x=>{S({security_level:x.security_level,host:x.host,secret:x.secret,device_name:x.device_name})}).catch(x=>console.error("Error fetching PlayReady info:",x))},[]),Se.useEffect(()=>{document.title="API | CDRM-Project"},[]),re.jsxs("div",{className:"flex flex-col w-full overflow-y-auto p-4 text-white",children:[re.jsxs("details",{open:!0,className:"w-full list-none",children:[re.jsx("summary",{className:"text-2xl",children:"Sending a decryption request"}),re.jsx("div",{className:"mt-5 p-5 rounded-lg border-2 border-indigo-500/50",children:re.jsx("pre",{className:"rounded-lg font-mono whitespace-pre-wrap text-white overflow-auto",children:`import requests

print(requests.post(
    url='${lg}/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'])`})})]}),re.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[re.jsx("summary",{className:"text-2xl",children:"Sending a search request"}),re.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg",children:re.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='${lg}/api/cache/search',
    json={
        'input': 'AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA=='
    }
).json())`})})]}),re.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[re.jsx("summary",{className:"text-2xl",children:"PyWidevine RemoteCDM info"}),re.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg overflow-x-auto",children:re.jsxs("p",{children:[re.jsx("strong",{children:"Device Type:"})," '",A.device_type,"'",re.jsx("br",{}),re.jsx("strong",{children:"System ID:"})," ",A.system_id,re.jsx("br",{}),re.jsx("strong",{children:"Security Level:"})," ",A.security_level,re.jsx("br",{}),re.jsx("strong",{children:"Host:"})," ",lg,"/remotecdm/widevine",re.jsx("br",{}),re.jsx("strong",{children:"Secret:"})," '",A.secret,"'",re.jsx("br",{}),re.jsx("strong",{children:"Device Name:"})," ",A.device_name]})})]}),re.jsxs("details",{open:!0,className:"w-full list-none mt-5",children:[re.jsx("summary",{className:"text-2xl",children:"PyPlayready RemoteCDM info"}),re.jsx("div",{className:"mt-5 border-2 border-indigo-500/50 p-5 rounded-lg overflow-x-auto",children:re.jsxs("p",{children:[re.jsx("strong",{children:"Security Level:"})," ",R.security_level,re.jsx("br",{}),re.jsx("strong",{children:"Host:"})," ",lg,"/remotecdm/playready",re.jsx("br",{}),re.jsx("strong",{children:"Secret:"})," '",R.secret,"'",re.jsx("br",{}),re.jsx("strong",{children:"Device Name:"})," ",R.device_name]})})]})]})}var g2={};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/var XA;function xR(){return XA||(XA=1,function(A){(function(){var b=typeof window<"u"?window:I4,R={};(function(x,U,O){var h;function s(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var u=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 x=="object"&&x,typeof self=="object"&&self,typeof U=="object"&&U];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 v=p(this);function N(e,t){if(t)e:{var n=v;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&&u(n,e,{configurable:!0,writable:!0,value:t})}}N("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,u(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}),N("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=v[t[n]];typeof i=="function"&&typeof i.prototype[e]!="function"&&u(i.prototype,e,{configurable:!0,writable:!0,value:function(){return Z(s(this))}})}return e});function Z(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function C(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 $(e){if(!(e instanceof Array)){e=C(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var oe=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},me;if(typeof Object.setPrototypeOf=="function")me=Object.setPrototypeOf;else{var Ve;e:{var ue={a:!0},Ne={};try{Ne.__proto__=ue,Ve=Ne.a;break e}catch{}Ve=!1}me=Ve?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Re=me;function $e(e,t){if(e.prototype=oe(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.zm=t.prototype}function it(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function Dt(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}it.prototype.s=function(e){this.h=e};function _t(e,t){e.i={Sh:t,di:!0},e.g=e.m||e.j}it.prototype.return=function(e){this.i={return:e},this.g=this.j};function _(e,t,n){return e.g=n,{value:t}}it.prototype.u=function(e){this.g=e};function ce(e){e.g=0}function he(e,t,n){e.m=t,n!=null&&(e.j=n)}function ot(e,t){e.m=0,e.j=t||0}function _e(e,t,n){e.g=t,e.m=n||0}function De(e,t){return e.m=t||0,t=e.i.Sh,e.i=null,t}function xe(e){e.A=[e.i],e.m=0,e.j=0}function Ue(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.di?e.g=e.m||e.j:n.u!=null&&e.j<n.u?(e.g=n.u,e.i=null):e.g=e.j:e.g=t}function gt(e){this.g=new it,this.h=e}function wn(e,t){Dt(e.g);var n=e.g.l;return n?ae(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),Oe(e))}function ae(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,_t(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,_t(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.di)throw t.Sh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function et(e){this.next=function(t){return Dt(e.g),e.g.l?t=ae(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=Oe(e)),t},this.throw=function(t){return Dt(e.g),e.g.l?t=ae(e,e.g.l.throw,t,e.g.s):(_t(e.g,t),t=Oe(e)),t},this.return=function(t){return wn(e,t)},this[Symbol.iterator]=function(){return this}}function ze(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 ze(new et(new gt(e)))}function vt(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}N("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(y){f.reject(y)}}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=v.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 y=c[f];c[f]=null;try{y()}catch(m){this.j(m)}}}this.g=null},n.prototype.j=function(c){this.i(function(){throw c})},t.prototype.j=function(){function c(m){return function(w){y||(y=!0,m.call(f,w))}}var f=this,y=!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(y){this.l(y);return}typeof f=="function"?this.I(f,c):this.m(c)},t.prototype.l=function(c){this.s(2,c)},t.prototype.m=function(c){this.s(1,c)},t.prototype.s=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=v.console;typeof f<"u"&&f.error(c.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var c=v.CustomEvent,f=v.Event,y=v.dispatchEvent;return typeof y>"u"?!0:(typeof c=="function"?c=new c("unhandledrejection",{cancelable:!0}):typeof f=="function"?c=new f("unhandledrejection",{cancelable:!0}):(c=v.document.createEvent("CustomEvent"),c.initCustomEvent("unhandledrejection",!1,!0,c)),c.promise=this,c.reason=this.i,y(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.Le(f.resolve,f.reject)},t.prototype.I=function(c,f){var y=this.j();try{c.call(f,y.resolve,y.reject)}catch(m){y.reject(m)}},t.prototype.then=function(c,f){function y(I,D){return typeof I=="function"?function(M){try{m(I(M))}catch(L){w(L)}}:D}var m,w,T=new t(function(I,D){m=I,w=D});return this.Le(y(c,m),y(f,w)),T},t.prototype.catch=function(c){return this.then(void 0,c)},t.prototype.Le=function(c,f){function y(){switch(m.h){case 1:c(m.i);break;case 2:f(m.i);break;default:throw Error("Unexpected state: "+m.h)}}var m=this;this.g==null?l.h(y):this.g.push(y),this.o=!0},t.resolve=i,t.reject=function(c){return new t(function(f,y){y(c)})},t.race=function(c){return new t(function(f,y){for(var m=C(c),w=m.next();!w.done;w=m.next())i(w.value).Le(f,y)})},t.all=function(c){var f=C(c),y=f.next();return y.done?i([]):new t(function(m,w){function T(M){return function(L){I[M]=L,D--,D==0&&m(I)}}var I=[],D=0;do I.push(void 0),D++,i(y.value).Le(T(I.length-1),w),y=f.next();while(!y.done)})},t});function mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}N("WeakMap",function(e){function t(y){if(this.g=(f+=Math.random()+1).toString(),y){y=C(y);for(var m;!(m=y.next()).done;)m=m.value,this.set(m[0],m[1])}}function n(){}function i(y){var m=typeof y;return m==="object"&&y!==null||m==="function"}function r(y){if(!mt(y,c)){var m=new n;u(y,c,{value:m})}}function l(y){var m=Object[y];m&&(Object[y]=function(w){return w instanceof n?w:(Object.isExtensible(w)&&r(w),m(w))})}if(function(){if(!e||!Object.seal)return!1;try{var y=Object.seal({}),m=Object.seal({}),w=new e([[y,2],[m,3]]);return w.get(y)!=2||w.get(m)!=3?!1:(w.delete(y),w.set(m,4),!w.has(y)&&w.get(m)==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(y,m){if(!i(y))throw Error("Invalid WeakMap key");if(r(y),!mt(y,c))throw Error("WeakMap key fail: "+y);return y[c][this.g]=m,this},t.prototype.get=function(y){return i(y)&&mt(y,c)?y[c][this.g]:void 0},t.prototype.has=function(y){return i(y)&&mt(y,c)&&mt(y[c],this.g)},t.prototype.delete=function(y){return i(y)&&mt(y,c)&&mt(y[c],this.g)?delete y[c][this.g]:!1},t}),N("Map",function(e){function t(){var f={};return f.sc=f.next=f.head=f}function n(f,y){var m=f[1];return Z(function(){if(m){for(;m.head!=f[1];)m=m.sc;for(;m.next!=m.head;)return m=m.next,{done:!1,value:y(m)};m=null}return{done:!0,value:void 0}})}function i(f,y){var m=y&&typeof y;m=="object"||m=="function"?l.has(y)?m=l.get(y):(m=""+ ++c,l.set(y,m)):m="p_"+y;var w=f[0][m];if(w&&mt(f[0],m))for(f=0;f<w.length;f++){var T=w[f];if(y!==y&&T.key!==T.key||y===T.key)return{id:m,list:w,index:f,entry:T}}return{id:m,list:w,index:-1,entry:void 0}}function r(f){if(this[0]={},this[1]=t(),this.size=0,f){f=C(f);for(var y;!(y=f.next()).done;)y=y.value,this.set(y[0],y[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var f=Object.seal({x:4}),y=new e(C([[f,"s"]]));if(y.get(f)!="s"||y.size!=1||y.get({x:4})||y.set({x:4},"t")!=y||y.size!=2)return!1;var m=y.entries(),w=m.next();return w.done||w.value[0]!=f||w.value[1]!="s"?!1:(w=m.next(),!(w.done||w.value[0].x!=4||w.value[1]!="t"||!m.next().done))}catch{return!1}}())return e;var l=new WeakMap;r.prototype.set=function(f,y){f=f===0?0:f;var m=i(this,f);return m.list||(m.list=this[0][m.id]=[]),m.entry?m.entry.value=y:(m.entry={next:this[1],sc:this[1].sc,head:this[1],key:f,value:y},m.list.push(m.entry),this[1].sc.next=m.entry,this[1].sc=m.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.sc.next=f.entry.next,f.entry.next.sc=f.entry.sc,f.entry.head=null,this.size--,!0):!1},r.prototype.clear=function(){this[0]={},this[1]=this[1].sc=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,y){for(var m=this.entries(),w;!(w=m.next()).done;)w=w.value,f.call(y,w[1],w[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var c=0;return r}),N("Set",function(e){function t(n){if(this.g=new Map,n){n=C(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(C([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 Gi(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}N("Array.prototype.values",function(e){return e||function(){return Gi(this,function(t,n){return n})}}),N("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}}),N("Array.prototype.keys",function(e){return e||function(){return Gi(this,function(t){return t})}}),N("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),N("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+""}N("String.prototype.includes",function(e){return e||function(t,n){return Tn(this,t,"includes").indexOf(t,n||0)!==-1}}),N("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 pl(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{ai:r,v:l}}return{ai:-1,v:void 0}}N("Array.prototype.findIndex",function(e){return e||function(t,n){return pl(this,t,n).ai}}),N("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=C(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)}),N("Array.prototype.find",function(e){return e||function(t,n){return pl(this,t,n).v}}),N("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}}),N("Object.entries",function(e){return e||function(t){var n=[],i;for(i in t)mt(t,i)&&n.push([i,t[i]]);return n}});var Up=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)mt(i,r)&&(e[r]=i[r])}return e};N("Object.assign",function(e){return e||Up}),N("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})})}}),N("Array.prototype.entries",function(e){return e||function(){return Gi(this,function(t,n){return[t,n]})}}),N("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),N("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}}),N("Number.EPSILON",function(){return Math.pow(2,-52)}),N("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),N("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),N("Object.values",function(e){return e||function(t){var n=[],i;for(i in t)mt(t,i)&&n.push(t[i]);return n}}),N("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),N("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}}),N("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 Uf=this||self;function Pe(e,t){e=e.split(".");var n=Uf;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 Ql(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}Ql.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 os(e){return e.h/(1-Math.pow(e.g,e.i))}function bc(){this.h=new Ql(2),this.j=new Ql(5),this.g=0,this.i=128e3,this.l=16e3}bc.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)},bc.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)}},bc.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(os(this.h),os(this.j))};function Tv(){}function ui(){}function Ct(){}function Jl(e){var t=vt.apply(1,arguments);Bp.has(e)||(Bp.add(e),Ct.apply(Tv,$(t)))}function yg(){}function jp(){}function B2(){}var Bp=new Set;x.console&&(new Map().set(1,function(){return console.error.apply(console,$(vt.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,$(vt.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,$(vt.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,$(vt.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,$(vt.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,$(vt.apply(0,arguments)))}),Ct=function(){return console.warn.apply(console,$(vt.apply(0,arguments)))},ui=function(){console.error.apply(console,$(vt.apply(0,arguments)))});function jf(){this.g=new Map}h=jf.prototype,h.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},h.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},h.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)}},h.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},h.size=function(){return this.g.size},h.keys=function(){return Array.from(this.g.keys())};function Mt(){this.g=new jf}h=Mt.prototype,h.release=function(){this.Ra(),this.g=null},h.D=function(e,t,n,i){this.g&&(e=new ls(e,t,n,i),this.g.push(t,e))},h.Aa=function(e,t,n,i){function r(c){l.Ja(e,t,r),n(c)}var l=this;this.D(e,t,r,i)},h.Ja=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=C(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))}},h.Ra=function(){if(this.g){for(var e=[],t=C(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,$(n.value));for(e=C(e),t=e.next();!t.done;t=e.next())t.value.Ja();this.g.g.clear()}},Pe("shaka.util.EventManager",Mt),Mt.prototype.removeAll=Mt.prototype.Ra,Mt.prototype.unlisten=Mt.prototype.Ja,Mt.prototype.listenOnce=Mt.prototype.Aa,Mt.prototype.listen=Mt.prototype.D,Mt.prototype.release=Mt.prototype.release;function ls(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=yr(e,i),this.target.addEventListener(t,n,this.g)}ls.prototype.Ja=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function yr(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)}),Zl(e)?t:t.capture||!1}function Zl(e){var t=nr;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}nr=t}return t||!1}var nr=void 0;Pe("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Jn(e){this.h=e,this.g=void 0}Jn.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};/*
 @license
 Shaka Player
 Copyright 2025 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function yt(){return Bf.value()}var io=null,us=null,Bf=new Jn(function(){var e=void 0;return io&&(e=io()),!e&&us&&(e=us()),e});function hl(e,t){this.g=e,this.h=t}hl.prototype.toString=function(){return"v"+this.g+"."+this.h};function Et(e,t){var n=new hl(5,0),i=Vp,r=i.g,l=n.h-r.h;(0<(n.g-r.g||l)?i.i:i.h)(i.g,n,e,t)}function Ic(e,t,n,i){Ct([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function xv(e,t,n,i){ui([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}var Vp=null;/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/var gg=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/function dn(e){var t;e instanceof dn?($l(this,e.cc),this.ed=e.ed,Vf(this,e.Cb),Hf(this,e.vd),this.ob=e.ob,eu(this,e.g.clone()),this.Nc=e.Nc):e&&(t=String(e).match(gg))?($l(this,t[1]||"",!0),this.ed=tu(t[2]||""),Vf(this,t[3]||"",!0),Hf(this,t[4]),this.ob=tu(t[5]||"",!0),eu(this,t[6]||"",!0),this.Nc=tu(t[7]||"")):this.g=new iu(null)}h=dn.prototype,h.cc="",h.ed="",h.Cb="",h.vd=null,h.ob="",h.Nc="",h.toString=function(){var e=[],t=this.cc;if(t&&e.push(Qu(t,vg,!0),":"),t=this.Cb){e.push("//");var n=this.ed;n&&e.push(Qu(n,vg,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.vd,t!=null&&e.push(":",String(t))}return(t=this.ob)&&(this.Cb&&t.charAt(0)!="/"&&e.push("/"),e.push(Qu(t,t.charAt(0)=="/"?Di:nu,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Nc)&&e.push("#",Qu(t,as)),e.join("")},h.resolve=function(e){var t=this.clone();t.cc==="data"&&(t=new dn);var n=!!e.cc;n?$l(t,e.cc):n=!!e.ed,n?t.ed=e.ed:n=!!e.Cb,n?Vf(t,e.Cb):n=e.vd!=null;var i=e.ob;if(n)Hf(t,e.vd);else if(n=!!e.ob){if(i.charAt(0)!="/")if(this.Cb&&!this.ob)i="/"+i;else{var r=t.ob.lastIndexOf("/");r!=-1&&(i=t.ob.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.ob=i:n=e.g.toString()!=="",n?eu(t,e.g.clone()):n=!!e.Nc,n&&(t.Nc=e.Nc),t},h.clone=function(){return new dn(this)};function $l(e,t,n){e.cc=n?tu(t,!0):t,e.cc&&(e.cc=e.cc.replace(/:$/,""))}function Vf(e,t,n){e.Cb=n?tu(t,!0):t}function Hf(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.vd=t}else e.vd=null}function eu(e,t,n){t instanceof iu?e.g=t:(n||(t=Qu(t,ir)),e.g=new iu(t))}function tu(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Qu(e,t,n){return e!=null?(e=encodeURI(e).replace(t,mg),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function mg(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var vg=/[#\/\?@]/g,nu=/[#\?:]/g,Di=/[#\?]/g,ir=/[#\?@]/g,as=/#/g;function iu(e){this.g=e||null}function Kf(e){if(!e.fb&&(e.fb=new Map,e.Ld=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," ")))}}h=iu.prototype,h.fb=null,h.Ld=null;function Sg(e){return Kf(e),e.Ld}h.add=function(e,t){Kf(this),this.g=null;var n=this.fb.has(e)?this.fb.get(e):null;return n||this.fb.set(e,n=[]),n.push(t),this.Ld++,this},h.set=function(e,t){return Kf(this),this.g=null,this.fb.has(e)?this.fb.set(e,[t]):this.add(e,t),this},h.get=function(e){return Kf(this),this.fb.get(e)||[]},h.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var e=[],t=C(this.fb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.fb.get(i);for(var r=0;r<i.length;r++){var l=n;i[r]!==""&&(l+="="+encodeURIComponent(i[r])),e.push(l)}}return this.g=e.join("&")},h.clone=function(){var e=new iu;if(e.g=this.g,this.fb){for(var t=new Map,n=C(this.fb),i=n.next();!i.done;i=n.next()){var r=C(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.fb=t,e.Ld=this.Ld}return e};function Ju(){}function gr(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=Ge(e);t=Ge(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function Fi(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function Ge(e,t,n){return n=n===void 0?1/0:n,ru(e,t===void 0?0:t,n,Uint8Array)}function Zu(e,t,n){return n=n===void 0?1/0:n,ru(e,t===void 0?0:t,n,Uint16Array)}function Zn(e,t,n){return n=n===void 0?1/0:n,ru(e,t===void 0?0:t,n,DataView)}function ru(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)}Pe("shaka.util.BufferUtils",Ju),Ju.toDataView=Zn,Ju.toUint16=Zu,Ju.toUint8=Ge,Ju.toArrayBuffer=Fi,Ju.equal=gr;function Y(e,t,n){var i=vt.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,"  ")},Pe("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,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM: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,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,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 ou(){}function ln(e){if(!e)return"";if(e=Ge(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),x.TextDecoder&&!yt().ph())return e=new TextDecoder().decode(e),e.includes("�")&&ui('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 rr(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=Zn(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return Ff(i)}function qi(e){function t(i){return n.byteLength<=i||9<=n[i]&&126>=n[i]}if(!e)return"";var n=Ge(e);if(n[0]==239&&n[1]==187&&n[2]==191)return ln(n);if(n[0]==254&&n[1]==255)return rr(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return rr(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return rr(e,!1);if(n[1]==0&&n[3]==0)return rr(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return ln(e);throw new Y(2,2,2003)}function Br(e){if(x.TextEncoder&&!yt().ph()){var t=new TextEncoder;return Fi(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 Fi(t)}function Gf(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 Ff(e){return kc.value()(e)}function Oi(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(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||""}Pe("shaka.util.StringUtils",ou),ou.resetFromCharCode=function(){kc.g=void 0},ou.toUTF16=Gf,ou.toUTF8=Br,ou.fromBytesAutoDetect=qi,ou.fromUTF16=rr,ou.fromUTF8=ln;var kc=new Jn(function(){function e(n){try{var i=new Uint8Array(n);return 0<String.fromCharCode.apply(null,i).length}catch{return!1}}for(var t={Hc:65536};0<t.Hc;t={Hc:t.Hc},t.Hc/=2)if(e(t.Hc))return function(n){return function(i){for(var r="",l=0;l<i.length;l+=n.Hc)r+=String.fromCharCode.apply(null,i.subarray(l,l+n.Hc));return r}}(t);return null});function Bn(){}function Vr(e){return e=Ff(Ge(e)),btoa(e)}function ro(e,t){return t=t??!0,e=Vr(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function or(e){e=x.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 Hr(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=x.parseInt(e.substr(2*i,2),16);return n}function oo(e){var t=Ge(e);e="",t=C(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 an(){for(var e=vt.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(Ge(r),n),n+=r.byteLength}return t}Pe("shaka.util.Uint8ArrayUtils",Bn),Bn.concat=an,Bn.toHex=oo,Bn.fromHex=Hr,Bn.fromBase64=or,Bn.toBase64=ro,Bn.toStandardBase64=Vr;function Vn(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var i=new dn(e[0]);return t=new dn(t[0]),t=i.resolve(t),n&&eu(t,n),[t.toString()]}t=t.map(function(f){return new dn(f)}),i=[],e=C(e);for(var r=e.next();!r.done;r=e.next()){r=new dn(r.value);for(var l=C(t),c=l.next();!c.done;c=l.next())c=r.resolve(c.value),n&&eu(c,n),i.push(c.toString())}return i}function Oo(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 mr(e,t){t=t===void 0?"cenc":t;var n=[],i=[],r=[];e.forEach(function(c,f){var y=f;y.length!=22&&(y=ro(Hr(f),!1));var m=c;m.length!=22&&(m=ro(Hr(c),!1)),c={kty:"oct",kid:y,k:m},n.push(c),i.push(c.kid),r.push(f)}),e=JSON.stringify({keys:n});var l=JSON.stringify({kids:i});return l=[{initData:Ge(Br(l)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+x.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:l,keyIds:new Set(r)}}function $u(e,t){if(t.length==1)return t[0];if(e=Ri(e,t),e!=null)return e;throw new Y(2,4,4025,t)}function Ri(e,t){var n=vr.get(e);n=C(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=C(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.test(l.trim()))return l.trim()}return e==ut?"":null}function ss(e,t){var n=[];e=vr.get(e),e=C(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=C(t),l=r.next();!l.done;l=r.next())l=l.value,i.test(l.trim())&&n.push(l.trim())}return n}var ut="text",Dn={Ca:"video",ea:"audio",Ta:ut,Tf:"image",hl:"application"},wg=1/15,vr=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function ea(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"&&Ct("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,Et("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ct("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(Ct("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Ct(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 qf(e,t,n,i){i.type!=="video"||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function zf(e){e.g&&e.i.classList.add("shaka-hidden")}ea.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ta(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Pe("shaka.lcevc.Dec",ea),ea.prototype.release=ea.prototype.release;function ai(e){if(Hp.has(e))return Hp.get(e);var t=x.ManagedMediaSource||x.MediaSource;return t?(t=t.isTypeSupported(e),Hp.set(e,t),t):!1}function na(){var e=x.ManagedSourceBuffer||x.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function ia(){var e=x.ManagedMediaSource||x.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var Hp=new Map;function cs(){}cs.prototype.extract=function(){},cs.prototype.decode=function(){return[]},cs.prototype.clear=function(){},cs.prototype.getStreams=function(){return[]};function Xf(){}Xf.prototype.init=function(){},Xf.prototype.parse=function(){return[]};function Yf(){}h=Yf.prototype,h.init=function(){},h.vf=function(){},h.Fd=function(){},h.remove=function(){},h.Uf=function(){},Pe("shaka.media.IClosedCaptionParser",Yf);function lo(e){this.h=new Map,this.i=0,this.j=new Xf,(e=Dc(e.toLowerCase()))&&(this.j=e()),this.g=new cs,(e=yl)&&(this.g=e(),this.h.set(this.i,this.g))}h=lo.prototype,h.init=function(e,t,n){if(t=t===void 0?!1:t,n=n===void 0?-1:n,n!=-1&&this.i!=n){t=n;var i=this.h.get(t);this.h.set(this.i,this.g),i?this.g=i:((i=yl)&&(this.g=i()),this.h.set(t,this.g))}else t||this.Fd();this.j.init(e),n!=-1&&(this.i=n)},h.vf=function(e){e=this.j.parse(e),e=C(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=Ge(t.packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},h.Fd=function(){this.g.clear()},h.remove=function(e){e=e===void 0?[]:e,e=new Set(e);for(var t=C(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},h.Uf=function(){return this.g.getStreams()};function Kp(e,t){Oc.set(e,t)}function Dc(e){return Oc.get(e)}Pe("shaka.media.ClosedCaptionParser",lo),lo.findDecoder=function(){return yl},lo.unregisterDecoder=function(){yl=null},lo.registerDecoder=function(e){yl=e},lo.findParser=Dc,lo.unregisterParser=function(e){Oc.delete(e)},lo.registerParser=Kp;var Oc=new Map,yl=null;function Kr(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=$n,this.scroll=Gp}Pe("shaka.text.CueRegion",Kr);var $n=1;Kr.units={PX:0,PERCENTAGE:$n,LINES:2};var Gp="";Kr.scrollMode={NONE:Gp,UP:"up"};function Wf(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function Sr(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function ra(e,t,n){if(n||(n=Wf),e.length!=t.length)return!1;t=t.slice(),e=C(e);for(var i=e.next(),r={};!i.done;r={ei:void 0},i=e.next()){if(r.ei=i.value,i=t.findIndex(function(l){return function(c){return n(l.ei,c)}}(r)),i==-1)return!1;t[i]=t[t.length-1],t.pop()}return t.length==0}function wr(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Wf),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 lu(e){this.h=e||"",this.g=0}function Ro(e){lr(e,/[ \t]+/gm)}function lr(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 gl(e){return e.g==e.h.length?null:(e=lr(e,/[^ \t\n]*/gm))?e[0]:null}function uu(e){if(e=lr(e,Qf),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 oa(e){return e?uu(new lu(e)):null}var Qf=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function la(){}function Tr(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=Array.isArray(i);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 Gn(e){var t={},n;for(n in e)t[n]=e[n];return t}function Mo(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=Mo(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=C(n),i=n.next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),r=e[r],r!==void 0&&(r=Mo(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}Pe("shaka.util.ObjectUtils",la),la.alphabeticalKeyOrderStringify=Mo,la.shallowCloneObject=Gn,la.cloneObject=Tr;/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/function au(e,t){var n=n===void 0?!1:n;return e=qi(e),uo(e,t,n)}function uo(e,t,n){return e=qp(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 Fp(e){return Yp.has(e)?Yp.get(e):""}function qp(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 y=c.indexOf(l);if(y==-1){var m=l.indexOf(".");0<m&&(y=c.indexOf(l.substring(0,m)))}if(y==-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"){y=e.indexOf("]]>",r),y==-1?(f.push(e.substr(r+9)),r=e.length):(f.push(e.substring(r+9,y)),r=y+3);continue}r++;continue}e:{m=c,r++;var w=i(),T={};for(y=[];e.charCodeAt(r)!==62&&e[r];){var I=e.charCodeAt(r);if(64<I&&91>I||96<I&&123>I){I=i();for(var D=e.charCodeAt(r);D&&D!==39&&D!==34&&!(64<D&&91>D||96<D&&123>D)&&D!==62;)r++,D=e.charCodeAt(r);var M=r+1;if(r=e.indexOf(e[r],M),M=e.slice(M,r),D===39||D===34){if(r===-1){if(m={tagName:w,attributes:T,children:y,parent:null},t)for(w=0;w<y.length;w++)typeof y[w]!="string"&&(y[w].parent=m);y=m;break e}}else M=null,r--;if(I.startsWith("xmlns:")){D=M;var L=I.split(":")[1];Yp.set(D,L),Wp.set(L,D)}w==="tt"&&I==="xml:space"&&M==="preserve"&&(m=!0),T[I]=M}r++}for(e.charCodeAt(r-1)!==47?(r++,y=n(w,m)):r++,m={tagName:w,attributes:T,children:y,parent:null},w=y.length,T=0;T<w;T++)I=y[T],typeof I!="string"?t&&(I.parent=m):T==w-1&&I==`
`&&y.pop();y=m}if(f.push(y),typeof y=="string")break;y.tagName[0]==="?"&&y.children&&(f.push.apply(f,$(y.children)),y.children=[])}else y=r,r=e.indexOf("<",r)-1,r===-2&&(r=e.length),y=e.slice(y,r+1),c?0<y.length&&f.push(y):(f.length&&y.length==1&&y[0]==`
`||0<y.trim().length)&&f.push(y),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 fs(e){return typeof e=="string"}function ds(e){var t=[];if(!e.children)return[];e=C(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Rt(e,t){var n=[];if(!e.children)return[];e=C(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"?Oi(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:Oi(e))}function zi(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=Cn(e))&&(e=e.trim()),e):null}function ao(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=C(e.children);for(var i=e.next();!i.done;i=e.next())ao(i.value,t,n)}return n}function sn(e,t){return e=Rt(e,t),e.length!=1?null:e[0]}function ur(e,t,n){return e=Tg(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 ml(e,t,n){return t=Fp(t),e.attributes[t+":"+n]||null}function Tg(e,t,n){var i=Fp(t);if(t=[],e.children)for(n=i?i+":"+n:n,e=C(e.children),i=e.next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function No(e,t,n){t=C(t);for(var i=t.next();!i.done;i=t.next())if(i=ml(e,i.value,n))return i;return null}function vl(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 so(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 Jf(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 Fn(e){return e=Number(e),e%1===0?e:null}function Sl(e){return e=Number(e),e%1===0&&0<e?e:null}function ei(e){return e=Number(e),e%1===0&&0<=e?e:null}function ps(e){return e=Number(e),isNaN(e)?null:e}function Zf(e){return e?e.toLowerCase()==="true":!1}function Ev(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function $f(e){var t=[];e=Oi(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=C(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,wc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].wc=n.slice(1))}return t}function zp(e,t){var n=$f(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=xg(e,"t",i.t)),i.n!==null&&(n=xg(e,"n",i.n))),n===null?n=r==="prepend"?0:e.length:r==="prepend"?--n:r==="after"&&++n,r=t.tagName,(i=i.wc)&&e[n]?Eg(e[n],r,i,zi(t)||""):(r!=="remove"&&r!=="replace"||e.splice(n,1),r!=="add"&&r!=="replace"||e.splice.apply(e,[n,0].concat($(t.children))))}}function xg(e,t,n){var i=0;e=C(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function Eg(e,t,n,i){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=i)}function Ag(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=Wp.has(t)?Wp.get(t):""),t=document.createElementNS(t,e.tagName);for(var i in e.attributes)t.setAttribute(i,e.attributes[i]);for(e=C(e.children),i=e.next();!i.done;i=e.next())i=i.value,n=void 0,typeof i=="string"?n=new Text(i):n=Ag(i),t.appendChild(n);return t}function Xp(e){if(!e)return null;var t={tagName:e.tagName,attributes:Gn(e.attributes),children:[],parent:null};e=C(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=Xp(n),n.parent=t),t.children.push(n);return t}var Yp=new Map,Wp=new Map;function Zt(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Kr,this.position=null,this.positionAlign=Rc,this.size=0,this.textAlign=co,this.direction=Mc,this.writingMode=ua,this.lineInterpretation=ms,this.line=null,this.lineHeight="",this.lineAlign=su,this.displayAlign=Po,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Nc,this.fontStyle=nd,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={Lc:32,rows:15}}function Cg(e,t){return e=new Zt(e,t,""),e.lineBreak=!0,e}Zt.prototype.clone=function(){var e=new Zt(0,0,""),t;for(t in this)e[t]=this[t],Array.isArray(e[t])&&(e[t]=e[t].slice());return e};function ed(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(!wr(e.nestedCues,t.nestedCues,ed))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(!wr(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function hs(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&ys(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(kg)&&n.push(r),r=-1);for(n=C(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 y=l.indexOf(">",f);if(y===-1){n=l;break e}if((y=l.substring(f+1,y))&&y=="v"){i=!0;var m=null;if(r.length&&(m=r[r.length-1]),m){if(m===y)n+="/"+y+">";else{if(!m.startsWith("v")){n+=l[f];continue}n+="/"+m+">"}f+=y.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=C(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=Av(n),e.payload="";try{var w=uo("<span>"+n+"</span>","span")}catch{}if(w)if(w=w.children,w.length!=1||w[0].tagName)for(w=C(w),n=w.next();!n.done;n=w.next())Qp(n.value,e,t);else e.payload=Oi(n);else e.payload=Oi(n)}else e.payload=Oi(n)}function ys(e){for(var t=C(Object.entries(vs)),n=t.next();!n.done;n=t.next()){var i=C(n.value);n=i.next().value,i=i.next().value;var r=new Zt(0,0,"");r.color=i,e.set("."+n,r)}for(t=C(Object.entries(Ig)),n=t.next();!n.done;n=t.next())i=C(n.value),n=i.next().value,i=i.next().value,r=new Zt(0,0,""),r.backgroundColor=i,e.set("."+n,r)}function Av(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}function Qp(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new Kr,i.position=null,i.size=0,i.textAlign=co,e.tagName)for(var r=C(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=gs(c.backgroundColor,f.backgroundColor),f.color=gs(c.color,f.color),f.fontFamily=gs(c.fontFamily,f.fontFamily),f.fontSize=gs(c.fontSize,f.fontSize),f.textShadow=gs(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=Cg(i.startTime,i.endTime),t.nestedCues.push(i);return;case"b":i.fontWeight=sa;break;case"i":i.fontStyle=cu;break;case"u":i.textDecoration.push(Lo);break;case"font":(l=e.attributes.color)&&(i.color=l);break;case"div":if(l=e.attributes.time,!l)break;(l=oa(l))&&(i.startTime=l);break;case"ruby":case"rp":case"rt":i.rubyTag=l}}if(r=e.children,fs(e)||r.length==1&&fs(r[0]))for(n=Cn(e).split(`
`),e=!0,n=C(n),r=n.next();!r.done;r=n.next())r=r.value,e||(e=Cg(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&(e=i.clone(),e.payload=Oi(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),t=C(r),e=t.next();!e.done;e=t.next())Qp(e.value,i,n)}function gs(e,t){return e&&0<e.length?e:t}Pe("shaka.text.Cue",Zt),Zt.parseCuePayload=hs,Zt.equal=ed,Zt.prototype.clone=Zt.prototype.clone;var Rc="auto";Zt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Rc};var co="center",td={LEFT:"left",RIGHT:"right",CENTER:co,START:"start",END:"end"};Zt.textAlign=td;var Po="after",bg={BEFORE:"before",CENTER:"center",AFTER:Po};Zt.displayAlign=bg;var Mc="ltr";Zt.direction={HORIZONTAL_LEFT_TO_RIGHT:Mc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ua="horizontal-tb";Zt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ua,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ms=0;Zt.lineInterpretation={LINE_NUMBER:ms,PERCENTAGE:1};var su="start",aa={CENTER:"center",START:su,END:"end"};Zt.lineAlign=aa;var vs={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Zt.defaultTextColor=vs;var Ig={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Zt.defaultTextBackgroundColor=Ig;var Nc=400,sa=700;Zt.fontWeight={NORMAL:Nc,BOLD:sa};var nd="normal",cu="italic",id={NORMAL:nd,ITALIC:cu,OBLIQUE:"oblique"};Zt.fontStyle=id;var Lo="underline";Zt.textDecoration={UNDERLINE:Lo,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var kg=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function wl(){}wl.prototype.destroy=function(){};function Tl(e,t,n){Jp.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,wf:t})}function Ss(e,t){for(var n=e.toLowerCase().split(";")[0],i=C([ws,Xi,Zp,fu]),r=i.next();!r.done;r=i.next())if(r=Jp.get(n+"-"+r.value)){var l=r.wf(),c=l.isSupported(e,t);if(l.destroy(),c)return r.wf}return null}Pe("shaka.transmuxer.TransmuxerEngine",wl),wl.findTransmuxer=Ss,wl.unregisterTransmuxer=function(e,t){Jp.delete(e.toLowerCase().split(";")[0]+"-"+t)},wl.registerTransmuxer=Tl,wl.prototype.destroy=wl.prototype.destroy;var Jp=new Map,fu=1,Zp=2,Xi=3,ws=4;wl.PluginPriority={FALLBACK:fu,PREFERRED_SECONDARY:Zp,PREFERRED:Xi,APPLICATION:ws};function rd(){}function xn(e,t){var n=e;return t&&!ar.includes(e)&&(n+='; codecs="'+t+'"'),n}function Pc(e,t){return t&&(e+='; codecs="'+t+'"'),e}function od(e,t,n){var i=xn(e,t);return t=Pc(e,t),Ss(t)?(e=Ss(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 Ts(e){return e.split(";")[0].split("/")[1]}function Ti(e){var t=$p(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 xr(e){var t=[];e=C(e.split(","));for(var n=e.next();!n.done;n=e.next())n=$p(n.value),t.push(n[0]);return t.sort().join(",")}function Mi(e){return e.split(";")[0]}function xi(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function ca(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function $p(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Pe("shaka.util.MimeUtils",rd),rd.getFullTypeWithAllCodecs=Pc,rd.getFullType=xn,new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var ar=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function sr(e){this.i=null,this.j=e,this.B=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function Hn(e,t){Lc.set(e,t)}function xs(e){return Lc.get(e)}function fo(e){return Lc.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!yl:!1}sr.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function Dg(e,t,n,i,r){var l,c,f,y,m,w,T;return G(function(I){if(I.g==1)return _(I,Promise.resolve(),2);if(!e.i||!e.j)return I.return();if(n==null||i==null)return e.i.parseInit(Ge(t)),I.return();for(l=e.B?n:e.s,c={periodStart:e.s,segmentStart:n,segmentEnd:i,vttOffset:l},f=e.i.parseMedia(Ge(t),c,r,[]),y=C(f),m=y.next();!m.done;m=y.next())w=m.value,e.A(w,r||null,c);T=f.filter(function(D){return D.startTime>=e.l&&D.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(I)})}sr.prototype.remove=function(e,t){var n=this;return G(function(i){if(i.g==1)return _(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 Og(e,t,n){e.l=t,e.m=n}function eh(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=C(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 Rg(e,t,n){t.startTime+=n,t.endTime+=n,t=C(t.nestedCues);for(var i=t.next();!i.done;i=t.next())Rg(e,i.value,n)}function Cv(e,t,n,i,r){var l=n+" "+i,c=new Map;t=C(t);for(var f=t.next();!f.done;f=t.next()){var y=f.value;f=y.stream,y=y.cue,c.has(f)||c.set(f,new Map),c.get(f).has(l)||c.get(f).set(l,[]),Rg(e,y,r),y.startTime>=e.l&&y.startTime<e.m&&(c.get(f).get(l).push(y),f==e.C&&e.j.append([y]))}for(r=C(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=C(c.get(l).keys()),f=t.next();!f.done;f=t.next())f=f.value,y=c.get(l).get(f),e.o.get(l).set(f,y);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))}Pe("shaka.text.TextEngine",sr),sr.prototype.destroy=sr.prototype.destroy,sr.findParser=xs,sr.unregisterParser=function(e){Lc.delete(e)},sr.registerParser=Hn;var Lc=new Map;function Es(e){this.h=e,this.g=null}Es.prototype.ia=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){x.clearTimeout(i),n=!1},i=x.setTimeout(function(){n&&t.h()},1e3*e),this},Es.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function dt(e){this.h=e,this.g=null}dt.prototype.Jb=function(){return this.stop(),this.h(),this},dt.prototype.ia=function(e){var t=this;return this.stop(),this.g=new Es(function(){t.h()}).ia(e),this},dt.prototype.Fa=function(e){var t=this;return this.stop(),this.g=new Es(function(){t.g.ia(e),t.h()}).ia(e),this},dt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Pe("shaka.util.Timer",dt),dt.prototype.stop=dt.prototype.stop,dt.prototype.tickEvery=dt.prototype.Fa,dt.prototype.tickAfter=dt.prototype.ia,dt.prototype.tickNow=dt.prototype.Jb;function th(e,t){return e.concat(t)}function po(){}function xl(e){return e!=null}function Ni(e,t){return Promise.race([t,new Promise(function(n,i){new dt(i).ia(e)})])}function Ln(){}function ho(e,t){return e=Ot(e),t=Ot(t),e.split("-")[0]==t.split("-")[0]}function fa(e,t){return e=Ot(e),t=Ot(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function As(e,t){return e=Ot(e),t=Ot(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Ot(e){e=C(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=C(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=pa.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function El(e,t){return e=Ot(e),t=Ot(t),t==e?4:fa(t,e)?3:As(t,e)?2:fa(e,t)?1:0}function Al(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=pa.get(e)||e}function ld(e){return e.language?Ot(e.language):e.audio&&e.audio.language?Ot(e.audio.language):e.video&&e.video.language?Ot(e.video.language):"und"}function da(e,t){e=Ot(e);var n=new Set;t=C(t);for(var i=t.next();!i.done;i=t.next())n.add(Ot(i.value));for(t=C(n),i=t.next();!i.done;i=t.next())if(i=i.value,i==e)return i;for(t=C(n),i=t.next();!i.done;i=t.next())if(i=i.value,fa(i,e))return i;for(t=C(n),i=t.next();!i.done;i=t.next())if(i=i.value,As(i,e))return i;for(n=C(n),t=n.next();!t.done;t=n.next())if(t=t.value,fa(e,t))return t;return null}Pe("shaka.util.LanguageUtils",Ln),Ln.findClosestLocale=da,Ln.getLocaleForVariant=ld,Ln.getLocaleForText=function(e){return Ot(e.language||"und")},Ln.getBase=Al,Ln.relatedness=El,Ln.areSiblings=function(e,t){var n=Al(e),i=Al(t);return e!=n&&t!=i&&n==i},Ln.normalize=Ot,Ln.isSiblingOf=As,Ln.isParentOf=fa,Ln.areLanguageCompatible=ho,Ln.areLocaleCompatible=function(e,t){return e=Ot(e),t=Ot(t),e==t};var pa=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 Mg(){}function cr(e,t,n,i,r){function l(j){var V=String(j.width||"")+String(j.height||"")+String(Math.round(j.frameRate||0))+(j.hdr||"")+j.fastSwitching;return j.dependencyStream&&(V+=j.dependencyStream.baseOriginalId||""),V}function c(j){var V=j.language+(j.channelsCount||0)+(j.audioSamplingRate||0)+j.roles.join(",")+j.label+j.groupId+j.fastSwitching;return j.dependencyStream&&(V+=j.dependencyStream.baseOriginalId||""),V}if(r.length){var f=e.textStreams;r=C(r);for(var y=r.next(),m={};!y.done;m={xh:void 0},y=r.next())if(m.xh=y.value,y=f.filter(function(j){return function(V){return!!(V.codecs.startsWith(j.xh)||V.mimeType.startsWith(j.xh))}}(m)),y.length){f=y;break}e.textStreams=f}if(f=e.variants,(t.length||n.length)&&(f=nh(f,t,n)),i.length){for(t=new jf,n=C(f),f=n.next();!f.done;f=n.next())f=f.value,t.push(String(f.video.width||0),f);var w=[];t.forEach(function(j,V){j=0;var K=[];V=C(V);for(var q=V.next(),Q={};!q.done;Q={Rf:void 0},q=V.next())Q.Rf=q.value,q=i.filter(function(z){return function(X){return z.Rf.decodingInfos[0][X]}}(Q)).length,q>j?(j=q,K=[Q.Rf]):q==j&&K.push(Q.Rf);w.push.apply(w,$(K))}),f=w}for(n=new Set,t=new Set,f=C(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(j,V){return j.bandwidth-V.bandwidth});var T=[];for(n=new Map,f=C(f),r=f.next();!r.done;r=f.next()){if(r=r.value,y=c(r),m=n.get(y)||[],m.length){var I=m[m.length-1],D=Ti(I.codecs),M=Ti(r.codecs);D!=M||r.bandwidth&&I.bandwidth&&!(r.bandwidth>I.bandwidth)||(m.push(r),T.push(r.id))}else m.push(r),T.push(r.id);n.set(y,m)}var L={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};f=Array.from(t).sort(function(j,V){if(!j.bandwidth||!V.bandwidth||j.bandwidth==V.bandwidth){if(j.codecs&&V.codecs&&j.codecs!=V.codecs&&j.width==V.width){var K=Ti(j.codecs),q=Ti(V.codecs);if(K!=q)return(L[K]||1)-(L[q]||1)}return j.width-V.width}return j.bandwidth-V.bandwidth}),t=na();var P=[];for(n=new Map,f=C(f),r=f.next();!r.done;r=f.next()){if(r=r.value,y=l(r),m=n.get(y)||[],m.length){if(I=m[m.length-1],!t&&(D=Ti(I.codecs),M=Ti(r.codecs),D!==M))continue;D=Ti(I.codecs),M=Ti(r.codecs),D!=M||r.bandwidth&&I.bandwidth&&!(r.bandwidth>I.bandwidth)||(m.push(r),P.push(r.id))}else m.push(r),P.push(r.id);n.set(y,m)}e.variants=e.variants.filter(function(j){var V=j.audio;return j=j.video,!(V&&!T.includes(V.id)||j&&!P.includes(j.id))})}function nh(e,t,n){t=C(t);for(var i=t.next(),r={};!i.done;r={videoCodec:void 0},i=t.next())if(r.videoCodec=i.value,i=e.filter(function(l){return function(c){return c.video&&c.video.codecs.startsWith(l.videoCodec)}}(r)),i.length){e=i;break}for(n=C(n),t=n.next(),i={};!t.done;i={audioCodec:void 0},t=n.next())if(i.audioCodec=t.value,t=e.filter(function(l){return function(c){return c.audio&&c.audio.codecs.startsWith(l.audioCodec)}}(i)),t.length){e=t;break}return e}function Cl(e,t,n){e.variants=e.variants.filter(function(i){return _c(i,t,n)})}function _c(e,t,n){function i(f,y,m){return f>=y&&f<=m}var r=e.video;if(r&&r.width&&r.height){var l=r.width,c=r.height;if(c>l&&(c=C([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 ud(e,t,n,i){return n=n===void 0?[]:n,i=i===void 0?{}:i,G(function(r){return r.g==1?_(r,du(e,t,0<t.offlineSessionIds.length,n,i),2):(ya(t),_(r,bl(t),0))})}function du(e,t,n,i,r){var l,c;return G(function(f){if(f.g==1)return yt().Pi()&&ih(t.variants),_(f,Uc(t.variants,n,!1,i),2);l=null,e&&(c=e.g)&&(l=c.keySystem),t.variants=t.variants.filter(function(y){var m=rh(y,l,r);if(!m){var w=[];y.audio&&w.push(oh(y.audio)),y.video&&w.push(oh(y.video))}return m}),ce(f)})}function ih(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=C(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&n.add(i.video);for(n=C(n),e=n.next();!e.done;e=n.next()){e=e.value,i=C(t);for(var r=i.next();!r.done;r=i.next()){var l=C(r.value);if(r=l.next().value,l=l.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,l);break}}}}function rh(e,t,n){if(!e.decodingInfos.some(function(y){return!(!y.supported||t&&(y=y.keySystemAccess)&&(n[y.keySystem]||y.keySystem)!=t)}))return!1;var i=yt(),r=i.Ob()==="Xbox";i=i.La()==="MOBILE"&&i.Da()==="GECKO";var l=e.video,c=l&&l.width||0,f=l&&l.height||0;return r&&l&&(1920<c||1080<f)&&(l.codecs.includes("avc1.")||l.codecs.includes("avc3."))||(r=l&&l.dependencyStream)&&!ta(r)?!1:(e=e.audio,!(i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function ha(e,t){var n,i,r,l,c,f,y;return G(function(m){if(m.g==1){for(n=function(w,T){if(w){var I=Gn(w);return I.supported=w.supported&&T.supported,I.powerEfficient=w.powerEfficient&&T.powerEfficient,I.smooth=w.smooth&&T.smooth,T.keySystemAccess&&!I.keySystemAccess&&(I.keySystemAccess=T.keySystemAccess),I}return T},i=null,r=[],l=C(t),c=l.next(),f={};!c.done;f={cache:void 0,Ke:void 0},c=l.next())y=c.value,f.Ke=Mo(y),f.cache=yu,f.cache.has(f.Ke)?i=n(i,f.cache.get(f.Ke)):r.push(Cs(y).then(function(w){return function(T){var I=null;T=C(T||[]);for(var D=T.next();!D.done;D=T.next())I=n(I,D.value);I&&(w.cache.set(w.Ke,I),i=n(i,I))}}(f)));return _(m,Promise.all(r),2)}i&&e.decodingInfos.push(i),ce(m)})}function Cs(e){var t=[""];e.video&&(t=xi(e.video.contentType).split(","));var n=[""];e.audio&&(n=xi(e.audio.contentType).split(","));var i=[];t=C(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var l=C(n),c=l.next(),f={};!c.done;f={Mc:void 0},c=l.next())c=c.value,f.Mc=Tr(e),e.video&&(f.Mc.video.contentType=xn(Mi(f.Mc.video.contentType),r)),e.audio&&(f.Mc.audio.contentType=xn(Mi(f.Mc.audio.contentType),c)),i.push(new Promise(function(y){return function(m,w){(yt().La()=="MOBILE"?Ni(5,navigator.mediaCapabilities.decodingInfo(y.Mc)):navigator.mediaCapabilities.decodingInfo(y.Mc)).then(function(T){m(T)}).catch(w)}}(f)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Uc(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q;return G(function(z){switch(z.g){case 1:if(e.some(function(X){return X.decodingInfos.length}))return z.return();r=C(i),l=r.next(),c={};case 2:if(l.done){z.u(4);break}c.ui=l.value,f=!1,y=C(e),m=y.next();case 5:if(m.done){z.u(7);break}w=m.value,T=jc(w,t,n).filter(function(X){return function(W){return W=W[0],(W.keySystemConfiguration&&W.keySystemConfiguration.keySystem)===X.ui}}(c)),I=C(T),D=I.next();case 8:if(D.done){z.u(10);break}return M=D.value,_(z,ha(w,M),9);case 9:D=I.next(),z.u(8);break;case 10:w.decodingInfos.some(function(X){return X.supported})&&(f=!0),m=y.next(),z.u(5);break;case 7:if(f)return z.return();c={ui:void 0},l=r.next(),z.u(2);break;case 4:L=C(e),P=L.next();case 12:if(P.done){z.u(0);break}j=P.value,V=jc(j,t,n).filter(function(X){return X=X[0],X=X.keySystemConfiguration&&X.keySystemConfiguration.keySystem,!X||!i.includes(X)}),K=C(V),q=K.next();case 15:if(q.done){P=L.next(),z.u(12);break}return Q=q.value,_(z,ha(j,Q),16);case 16:q=K.next(),z.u(15)}})}function jc(e,t,n){var i=e.audio,r=e.video,l=[],c=[];if(r)for(var f=C(r.fullMimeTypes),y=f.next();!y.done;y=f.next()){y=y.value;var m=xi(y);if(m.includes(",")&&!i){var w=m.split(","),T=Mi(y);m=$u("video",w),w=$u("audio",w),w=Yi(w,T),T=od(T,w,"audio"),c.push({contentType:T,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(m=Er(m),y={contentType:od(Mi(y),m,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":y.transferFunction="pq";break;case"HLG":y.transferFunction="hlg"}r.colorGamut&&(y.colorGamut=r.colorGamut),l.push(y)}if(i)for(f=C(i.fullMimeTypes),y=f.next();!y.done;y=f.next())m=y.value,y=Mi(m),m=Yi(xi(m),y),y=od(y,m,"audio"),c.push({contentType:y,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=C(l),y=l.next();!y.done;y=l.next())for(y=y.value,m=C(c),T=m.next();!T.done;T=m.next())T=T.value,w={type:n?"file":"media-source"},y&&(w.video=y),T&&(w.audio=T),f.push(w);if(c=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!c.length)return[f];for(e=[],n=new Map,c=C(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=C(n.keys()),y=l.next();!y.done;y=l.next()){for(y=y.value,T=n.get(y),m=new Map,T=C(T),w=T.next();!w.done;w=T.next()){w=w.value;var I=w.videoRobustness+","+w.audioRobustness;m.get(I)||m.set(I,[]),m.get(I).push(w)}for(m=C(m.values()),T=m.next();!T.done;T=m.next()){T=T.value,w=[],I=C(f);for(var D=I.next();!D.done;D=I.next()){D=Object.assign({},D.value);for(var M={keySystem:y,initDataType:"cenc",persistentState:c,distinctiveIdentifier:"optional",sessionTypes:t},L=C(T),P=L.next();!P.done;P=L.next()){if(P=P.value,P.initData&&P.initData.length){for(var j=new Set,V=C(P.initData),K=V.next();!K.done;K=V.next())j.add(K.value.initDataType);M.initDataType=P.initData[0].initDataType}P.distinctiveIdentifierRequired&&(M.distinctiveIdentifier="required"),P.persistentStateRequired&&(M.persistentState="required"),P.sessionType&&(M.sessionTypes=[P.sessionType]),i&&(M.audio?(P.encryptionScheme&&(M.audio.encryptionScheme=M.audio.encryptionScheme||P.encryptionScheme),M.audio.robustness=M.audio.robustness||P.audioRobustness):(M.audio={robustness:P.audioRobustness},P.encryptionScheme&&(M.audio.encryptionScheme=P.encryptionScheme)),M.audio.robustness==""&&delete M.audio.robustness),r&&(M.video?(P.encryptionScheme&&(M.video.encryptionScheme=M.video.encryptionScheme||P.encryptionScheme),M.video.robustness=M.video.robustness||P.videoRobustness):(M.video={robustness:P.videoRobustness},P.encryptionScheme&&(M.video.encryptionScheme=P.encryptionScheme)),M.video.robustness==""&&delete M.video.robustness)}D.keySystemConfiguration=M,w.push(D)}e.push(w)}}return e}function Yi(e,t){var n=yt();return e.toLowerCase()=="flac"?n.Da()!="WEBKIT"?"flac":"fLaC":e.toLowerCase()==="opus"?n.Da()!="WEBKIT"?"opus":Ts(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&n.ee()?"ec-3":e}function Er(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 ya(e){e.textStreams=e.textStreams.filter(function(t){return t=xn(t.mimeType,t.codecs),fo(t)})}function bl(e){var t,n,i,r,l,c,f;return G(function(y){switch(y.g){case 1:t=[],n=C(e.imageStreams),i=n.next();case 2:if(i.done){y.u(4);break}if(r=i.value,l=r.mimeType,l=="application/mp4"&&r.codecs=="mjpg"&&(l="image/jpg"),gu.has(l)){y.u(5);break}if(c=uh.get(l),!c){gu.set(l,!1),y.u(5);break}return _(y,Il(c),7);case 7:f=y.h,gu.set(l,f);case 5:gu.get(l)&&t.push(r),i=n.next(),y.u(2);break;case 4:e.imageStreams=t,ce(y)}})}function Il(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 Ar(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,y=[];n&&y.push(n.mimeType),t&&y.push(t.mimeType),y=y[0]||null;var m=[];t&&m.push(t.kind),n&&m.push(n.kind),m=m[0]||null;var w=new Set;if(t)for(var T=C(t.roles),I=T.next();!I.done;I=T.next())w.add(I.value);if(n)for(T=C(n.roles),I=T.next();!I.done;I=T.next())w.add(I.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:m,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:y,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:l,videoCodec:c,primary:e.primary,roles:Array.from(w),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=$u("video",n),e.audioCodec=$u("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 pu(e){return{id:e.id,active:!1,type:ut,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function Bc(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=Si(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,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function bs(e){return e.__shaka_id||(e.__shaka_id=Ng++),e.__shaka_id}function Pi(e){var t={id:bs(e),active:e.mode!="disabled",type:ut,bandwidth:0,language:Ot(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:e.kind=="forced",originalTextId:e.id,originalLanguage:e.language};return e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function On(e,t){var n=e?e.language:null;if(n={id:bs(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:Ot(n||"und"),label:e?e.label:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:e?e.kind=="main":!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:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+(","+n.videoCodec):n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function $t(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function _o(e){return e.filter(function(t){return $t(t)})}function Wi(e,t,n,i){var r=e,l=e.filter(function(y){return y.primary});l.length&&(r=l);var c=r.length?r[0].language:"";if(r=r.filter(function(y){return y.language==c}),t){var f=da(Ot(t),e.map(function(y){return y.language}));f&&(r=e.filter(function(y){return Ot(y.language)==f}))}if(r=r.filter(function(y){return y.forced==i}),n){if(e=ad(r,n),e.length)return e}else if(e=r.filter(function(y){return y.roles.length==0}),e.length)return e;return e=r.map(function(y){return y.roles}).reduce(th,[]),e.length?ad(r,e[0]):r}function ad(e,t){return e.filter(function(n){return n.roles.includes(t)})}function hu(e,t){t.length&&(t=t.filter(function(n){return Ti(e.codecs)==Ti(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 oh(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 lh(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var i=Ot(n.preferredTextLanguage);return t=Ot(t.language),n.autoShowText==2?ho(t,i):n.autoShowText==3?e?(e=Ot(e.language),ho(t,i)&&!ho(e,t)):!1:(Ct("Invalid autoShowText setting!"),!1)}function Is(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=C(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?Mi(n):"",codecs:n?xi(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};i.fullMimeTypes.add(xn(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}Pe("shaka.util.StreamUtils",Mg),Mg.meetsRestrictions=_c;var yu=new Map,Ng=0,gu=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),uh=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Yt(){var e=this;this.G=null,this.o=!1,this.m=new bc,this.j=new Mt,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new bc,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.s=null,this.A=new dt(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=x,"documentPictureInPicture"in x&&this.j.D(x.documentPictureInPicture,"enter",function(){e.B=x.documentPictureInPicture.window,e.A&&e.A.Jb(),e.j.Aa(e.B,"pagehide",function(){e.B=x,e.A&&e.A.Jb()})}),this.C=this.i=null}h=Yt.prototype,h.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.s=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},h.release=function(){this.j.release(),this.A=null},h.init=function(e){this.G=e},h.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(m){return m&&!(m.audio&&m.audio.fastSwitching||m.video&&m.video.fastSwitching)}),n.length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(m){return m&&!!(m.audio&&m.audio.fastSwitching||m.video&&m.video.fastSwitching)})),n=jo(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=kl(n),n=C(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=jo(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=jo(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},y=i+1;y<n.length;y++)if(r.bandwidth!=n[y].bandwidth){f=n[y];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.s=Date.now(),t},h.enable=function(){this.o=!0},h.disable=function(){this.o=!1},h.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&i.packetNumber===1&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r>=this.g.cacheLoadThreshold&&this.m.sample(r,t),n&&this.s!=null&&this.o&&Uo(this)},h.trySuggestStreams=function(){this.s!=null&&this.o&&Uo(this)},h.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)},h.setVariants=function(e){this.F=e},h.playbackRateChanged=function(e){this.H=e},h.setMediaElement=function(e){function t(){n.A.ia(ah)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in x&&(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})},h.setCmsdManager=function(e){this.C=e},h.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function Uo(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.s-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.s<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function jo(e,t,n,i,r){if(e.C){var l=e.C.Yh();l&&(n=n.filter(function(c){return c.bandwidth&&l?c.bandwidth<=l:!0}))}return t&&(n=n.filter(function(c){return _c(c,t,{width:r,height:i})})),n.sort(function(c,f){return c.bandwidth-f.bandwidth})}function kl(e){var t=[];e=C(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})}Pe("shaka.abr.SimpleAbrManager",Yt),Yt.prototype.configure=Yt.prototype.configure,Yt.prototype.setCmsdManager=Yt.prototype.setCmsdManager,Yt.prototype.setMediaElement=Yt.prototype.setMediaElement,Yt.prototype.playbackRateChanged=Yt.prototype.playbackRateChanged,Yt.prototype.setVariants=Yt.prototype.setVariants,Yt.prototype.getBandwidthEstimate=Yt.prototype.getBandwidthEstimate,Yt.prototype.trySuggestStreams=Yt.prototype.trySuggestStreams,Yt.prototype.segmentDownloaded=Yt.prototype.segmentDownloaded,Yt.prototype.disable=Yt.prototype.disable,Yt.prototype.enable=Yt.prototype.enable,Yt.prototype.chooseVariant=Yt.prototype.chooseVariant,Yt.prototype.init=Yt.prototype.init,Yt.prototype.release=Yt.prototype.release,Yt.prototype.stop=Yt.prototype.stop;var ah=1;Pe("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function sd(e,t){if(e===t||!e.length||!t.length)return!0;e=C(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,si(n))return!0;for(var i=C(t),r=i.next();!r.done;r=i.next())if(r=r.value,n.keySystem===r.keySystem||si(r))return!0}return!1}function ks(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=C(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=C(t),l=r.next();!l.done;l=r.next())if(l=l.value,i.keySystem==l.keySystem){r=new Map;for(var c=C((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($(i.keyIds),$(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}else si(i)?n.push(i):si(l)&&n.push(l)}return n}function Ds(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Bo(e){return e?!!e.match(/^com\.apple\.fps/):!1}function si(e){return(e=e.licenseServerUri)?e.startsWith("data:application/json;base64,"):!1}var ga=new Jn(function(){return Fi(new Uint8Array([0]))}),ma=new Map;function Pg(e,t){var n=yo();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 Lg(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),_(i,new Promise(function(r){new dt(r).ia(n/1e3)}),2))}e.h*=e.m,ce(i)})}function yo(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function ct(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}ct.prototype.resolve=function(){},ct.prototype.reject=function(){};function vn(e,t){this.promise=e,this.i=t,this.g=null}function go(e){return new vn(Promise.reject(e),function(){return Promise.resolve()})}function va(){var e=Promise.reject(new Y(2,7,7001));return e.catch(function(){}),new vn(e,function(){return Promise.resolve()})}function mu(e){return new vn(Promise.resolve(e),function(){return Promise.resolve()})}function Sa(e){return new vn(e,function(){return e.catch(function(){})})}vn.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function wa(e){return new vn(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}vn.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},vn.prototype.Va=function(e,t){function n(f){return function(y){if(r.g&&f)l.reject(c);else{var m=f?e:t;m?i=bv(m,y,l):(f?l.resolve:l.reject)(y)}}}function i(){return l.reject(c),r.abort()}var r=this,l=new ct;l.catch(function(){});var c=new Y(2,7,7001);return this.promise.then(n(!0),n(!1)),new vn(l,function(){return i()})};function bv(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()}}}v.Object.defineProperties(vn.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Pe("shaka.util.AbortableOperation",vn),vn.prototype.chain=vn.prototype.Va,vn.prototype.finally=vn.prototype.finally,vn.all=wa,vn.prototype.abort=vn.prototype.abort,vn.notAbortable=Sa,vn.completed=mu,vn.aborted=va,vn.failed=go;function ke(e,t){if(t)if(t instanceof Map)for(var n=C(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=x.performance&&x.performance.now?x.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function _g(e){var t=new ke(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}ke.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},ke.prototype.stopImmediatePropagation=function(){this.g=!0},ke.prototype.stopPropagation=function(){},Pe("shaka.util.FakeEvent",ke);var Vc={jl:"abrstatuschanged",kl:"adaptation",ll:"audiotrackchanged",ol:"audiotrackschanged",ql:"boundarycrossed",rl:"buffering",ul:"canupdatestarttime",vl:"complete",wl:"currentitemchanged",xl:"downloadcompleted",yl:"downloadfailed",zl:"downloadheadersreceived",Al:"drmsessionupdate",Cl:"emsg",Il:"itemsinserted",Jl:"itemsremoved",Zl:"prft",Error:"error",Dl:"expirationupdated",El:"firstquartile",Fl:"gapjumped",Kl:"keystatuschanged",Ol:"loaded",Pl:"loading",Rl:"manifestparsed",Sl:"manifestupdated",Tl:"mediaqualitychanged",Ul:"mediasourcerecovered",Vl:"metadataadded",Metadata:"metadata",Wl:"midpoint",Xl:"nospatialvideoinfo",Yl:"onstatechange",$l:"ratechange",cm:"segmentappended",dm:"sessiondata",em:"spatialvideoinfo",fm:"stalldetected",gm:"started",hm:"statechanged",im:"streaming",jm:"textchanged",lm:"texttrackvisibility",mm:"thirdquartile",nm:"timelineregionadded",om:"timelineregionenter",pm:"timelineregionexit",qm:"trackschanged",sm:"unloading",um:"variantchanged"};function It(){this.Ya=new jf,this.ze=this}It.prototype.addEventListener=function(e,t){this.Ya&&this.Ya.push(e,t)},It.prototype.removeEventListener=function(e,t){this.Ya&&this.Ya.remove(e,t)},It.prototype.dispatchEvent=function(e){if(!this.Ya)return!0;var t=this.Ya.get(e.type)||[],n=this.Ya.get("All");for(n&&(t=t.concat(n)),t=C(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.ze,e.currentTarget=this.ze;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},It.prototype.release=function(){this.Ya=null};function vu(){this.g=[]}function Vo(e,t){e.g.push(t.finally(function(){Sr(e.g,t)}))}vu.prototype.destroy=function(){for(var e=[],t=C(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 en(e,t,n,i,r,l,c){It.call(this),this.i=null,this.j=!1,this.s=new vu,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.A=n||null,this.B=i||null,this.C=r||null,this.G=l||null,this.F=c||null,this.l=new Map}$e(en,It),h=en.prototype,h.configure=function(e){this.i=e};function Cr(e,t,n,i){i=i===void 0?!1:i,n=n||Dl;var r=Rs.get(e);(!r||n>=r.priority)&&Rs.set(e,{priority:n,wf:t,Ak:i})}function sh(e,t){for(var n=C(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(e=C(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}h.Dk=function(e){this.g.add(e)},h.Zk=function(e){this.g.delete(e)},h.kj=function(){this.g.clear()},h.Ek=function(e){this.h.add(e)},h.$k=function(e){this.h.delete(e)},h.lj=function(){this.h.clear()},h.Mh=function(){this.l.clear()};function bn(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}}h.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),It.prototype.release.call(this),this.s.destroy()},h.request=function(e,t,n){var i=this,r=new Os;if(this.j){var l=Promise.reject(new Y(2,7,7001));return l.catch(function(){}),new Hc(l,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Tr(t.retryParameters):yo(),t.uris=Tr(t.uris),l=ch(this,e,t,n);var c=l.Va(function(){return fh(i,e,t,n,new Pg(t.retryParameters,!1),0,null,r)}),f=c.Va(function(I){return cd(i,e,I,n)}),y=Date.now(),m=0;l.promise.then(function(){m=Date.now()-y},function(){});var w=0;c.promise.then(function(){w=Date.now()},function(){});var T=f.Va(function(I){var D=Date.now()-w,M=I.response;return M.timeMs+=m,M.timeMs+=D,I.$j||!i.o||M.fromCache||t.method=="HEAD"||e!=br||i.o(M.timeMs,M.data.byteLength,dh(n),t,n),i.F&&i.F(e,M,n),M},function(I){throw I&&(I.severity=2),I});return l=new Hc(T.promise,function(){return T.abort()},r),Vo(this.s,l),l};function ch(e,t,n,i){function r(f){l=l.Va(function(){return n.body&&(n.body=Fi(n.body)),f(t,n,i)})}var l=mu(void 0);e.C&&r(e.C),e=C(e.g);for(var c=e.next();!c.done;c=e.next())r(c.value);return l.Va(void 0,function(f){throw f instanceof Y&&f.code==7001?f:new Y(2,1,1006,f)})}function fh(e,t,n,i,r,l,c,f){e.i.forceHTTP&&(n.uris[l]=n.uris[l].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[l]=n.uris[l].replace("http://","https://")),0<l&&e.G&&e.G(t,i,n.uris[l],n.uris[l-1]);var y=new dn(n.uris[l]),m=y.cc,w=!1;m||(m=location.protocol,m=m.slice(0,-1),$l(y,m),n.uris[l]=y.toString()),m=m.toLowerCase();var T=(m=Rs.get(m))?m.wf:null;if(!T)return go(new Y(2,1,1e3,y));var I=m.Ak;(y=e.l.get(y.Cb))&&(n.headers["common-access-token"]=y);var D=null,M=null,L=!1,P=!1,j;return Sa(Lg(r)).Va(function(){if(e.j)return va();j=Date.now();var V=0;n.requestStartTime=Date.now();var K=T(n.uris[l],n,t,function(z,X,W){D&&D.stop(),M&&M.ia(Q/1e3),e.o&&t==br&&(V++,n.packetNumber=V,e.o(z,X,dh(i),n,i),w=!0,f.g=W)},function(z){P=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(z,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!I)return K;var q=n.retryParameters.connectionTimeout;q&&(D=new dt(function(){L=!0,K.abort()}),D.ia(q/1e3));var Q=n.retryParameters.stallTimeout;return Q&&(M=new dt(function(){L=!0,K.abort()})),K}).Va(function(V){D&&D.stop(),M&&M.stop(),V.timeMs==null&&(V.timeMs=Date.now()-j);var K=V.headers["common-access-token"];if(K){var q=new dn(V.uri);e.l.set(q.Cb,K)}return K={response:V,$j:w},!P&&e.m&&e.m(V.headers,n,t),e.A&&e.A(n,V),K},function(V){if(D&&D.stop(),M&&M.stop(),e.B){var K=null,q=0;V instanceof Y&&(K=V,V.code==1001&&(q=V.data[1])),e.B(n,K,q,L)}if(e.j)return va();if(L&&(V=new Y(1,1,1003,n.uris[l],t)),V instanceof Y){if(V.code==7001)throw V;if(V.code==1010)throw c;if(V.severity==1){if(K=new Map().set("error",V),K=new ke("retry",K),K.cancelable=!0,e.dispatchEvent(K),K.defaultPrevented)throw V;return l=(l+1)%n.uris.length,fh(e,t,n,i,r,l,V,f)}}throw V})}function cd(e,t,n,i){var r=mu(void 0);e=C(e.h);for(var l=e.next(),c={};!l.done;c={Di:void 0},l=e.next())c.Di=l.value,r=r.Va(function(f){return function(){var y=n.response;return y.data&&(y.data=Fi(y.data)),(0,f.Di)(t,y,i)}}(c));return r.Va(function(){return n},function(f){var y=2;if(f instanceof Y){if(f.code==7001)throw f;y=f.severity}throw new Y(y,1,1007,f)})}function dh(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Pe("shaka.net.NetworkingEngine",en),en.prototype.request=en.prototype.request,en.prototype.destroy=en.prototype.destroy,en.makeRequest=bn,en.defaultRetryParameters=function(){return yo()},en.prototype.clearCommonAccessTokenMap=en.prototype.Mh,en.prototype.clearAllResponseFilters=en.prototype.lj,en.prototype.unregisterResponseFilter=en.prototype.$k,en.prototype.registerResponseFilter=en.prototype.Ek,en.prototype.clearAllRequestFilters=en.prototype.kj,en.prototype.unregisterRequestFilter=en.prototype.Zk,en.prototype.registerRequestFilter=en.prototype.Dk,en.unregisterScheme=function(e){Rs.delete(e)},en.registerScheme=Cr,en.prototype.configure=en.prototype.configure;function Os(){this.g=0}en.NumBytesRemainingClass=Os;function Hc(e,t,n){vn.call(this,e,t),this.h=n}$e(Hc,vn),en.PendingRequest=Hc;var br=1;en.RequestType={MANIFEST:0,SEGMENT:br,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},en.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 Dl=3;en.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Dl};var Rs=new Map;function Su(e){this.g=!1,this.h=new ct,this.i=e}Su.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 Pt(e,t){if(e.g)throw t instanceof Y&&t.code==7003?t:new Y(2,7,7003,t)}function Ho(e,t){var n=[];e=C(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function Kc(e,t){e=C(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function wu(e){for(var t=new Map,n=C(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function Gc(e){var t={};return e.forEach(function(n,i){t[i]=n}),t}function Bt(e,t){this.h=Zn(e),this.i=t==ph,this.g=0}h=Bt.prototype,h.Ga=function(){return this.g<this.h.byteLength},h.Ma=function(){return this.g},h.getLength=function(){return this.h.byteLength},h.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw Ir()}},h.Ba=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw Ir()}},h.T=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw Ir()}},h.Yg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw Ir()}},h.yd=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 Ir()}if(2097151<t)throw new Y(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},h.Ub=function(e){if(this.g+e>this.h.byteLength)throw Ir();var t=Ge(this.h,this.g,e);return this.g+=e,t},h.skip=function(e){if(this.g+e>this.h.byteLength)throw Ir();this.g+=e},h.Ei=function(e){if(this.g<e)throw Ir();this.g-=e},h.seek=function(e){if(0>e||e>this.h.byteLength)throw Ir();this.g=e},h.Vc=function(){for(var e=this.g;this.Ga()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=Ge(this.h,e,this.g-e),this.g+=1,ln(e)};function Ir(){return new Y(2,3,3e3)}Pe("shaka.util.DataViewReader",Bt),Bt.prototype.readTerminatedString=Bt.prototype.Vc,Bt.prototype.seek=Bt.prototype.seek,Bt.prototype.rewind=Bt.prototype.Ei,Bt.prototype.skip=Bt.prototype.skip,Bt.prototype.readBytes=Bt.prototype.Ub,Bt.prototype.readUint64=Bt.prototype.yd,Bt.prototype.readInt32=Bt.prototype.Yg,Bt.prototype.readUint32=Bt.prototype.T,Bt.prototype.readUint16=Bt.prototype.Ba,Bt.prototype.readUint8=Bt.prototype.X,Bt.prototype.getLength=Bt.prototype.getLength,Bt.prototype.getPosition=Bt.prototype.Ma,Bt.prototype.hasMoreData=Bt.prototype.Ga;var ph=1;Bt.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ph};function Ut(){this.i=new Map,this.h=new Map,this.g=!1}h=Ut.prototype,h.box=function(e,t){return e=Ol(e),this.i.set(e,ti),this.h.set(e,t),this},h.R=function(e,t){return e=Ol(e),this.i.set(e,Fc),this.h.set(e,t),this},h.stop=function(){this.g=!0},h.parse=function(e,t,n){for(e=new Bt(e,0),this.g=!1;e.Ga()&&!this.g;)this.td(0,e,t,n)},h.td=function(e,t,n,i){var r=t.Ma();if(i&&r+8>t.getLength())this.g=!0;else{var l=t.T(),c=t.T(),f=Lt(c),y=!1;switch(l){case 0:l=t.getLength()-r;break;case 1:if(i&&t.Ma()+8>t.getLength()){this.g=!0;return}l=t.yd(),y=!0}var m=this.h.get(c);if(m){var w=null,T=null;if(this.i.get(c)==Fc){if(i&&t.Ma()+4>t.getLength()){this.g=!0;return}T=t.T(),w=T>>>24,T&=16777215}c=r+l,n&&c>t.getLength()&&(c=t.getLength()),i&&c>t.getLength()?this.g=!0:(c-=t.Ma(),t=0<c?t.Ub(c):new Uint8Array(0),t=new Bt(t,0),m({name:f,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:w,flags:T,reader:t,size:l,start:r+e,has64BitSize:y}))}else t.skip(Math.min(r+l-t.Ma(),t.getLength()-t.Ma()))}};function nt(e){for(var t=tn(e);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Gr(e){for(var t=tn(e),n=e.reader.T(),i=0;i<n&&(e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function Li(e){var t=tn(e);for(e.reader.skip(78);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Ms(e){var t=tn(e);e.reader.skip(8);var n=e.reader.Ba();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.Ga()&&!e.parser.g;)e.parser.td(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Tu(e){return function(t){e(t.reader.Ub(t.reader.getLength()-t.reader.Ma()))}}function Ol(e){var t=0;e=C(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Lt(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function tn(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Pe("shaka.util.Mp4Parser",Ut),Ut.headerSize=tn,Ut.typeToString=Lt,Ut.allData=Tu,Ut.audioSampleEntry=Ms,Ut.visualSampleEntry=Li,Ut.sampleDescription=Gr,Ut.children=nt,Ut.prototype.parseNext=Ut.prototype.td,Ut.prototype.parse=Ut.prototype.parse,Ut.prototype.stop=Ut.prototype.stop,Ut.prototype.fullBox=Ut.prototype.R,Ut.prototype.box=Ut.prototype.box;var ti=0,Fc=1;function xu(e){var t=this;this.g=[],this.h=[],this.data=[],new Ut().box("moov",nt).box("moof",nt).R("pssh",function(n){if(!(1<n.version)){var i=Ge(n.reader.h,-12,n.size);if(t.data.push(i),t.g.push(oo(n.reader.Ub(16))),0<n.version){i=n.reader.T();for(var r=0;r<i;r++){var l=oo(n.reader.Ub(16));t.h.push(l)}}}}).parse(e)}function Ko(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=Zn(c),y=0;if(f.setUint32(y,l),y+=4,f.setUint32(y,1886614376),y+=4,1>i?f.setUint32(y,0):f.setUint32(y,16777216),y+=4,c.set(t,y),y+=t.length,0<i)for(f.setUint32(y,n.size),y+=4,t=C(n),n=t.next();!n.done;n=t.next())n=Hr(n.value),c.set(n,y),y+=n.length;return f.setUint32(y,r),c.set(e,y+4),c}function Ta(e){var t=this;this.C=e,this.j=this.A=null,this.na=this.P=!1,this.I=0,this.g=null,this.o=new Mt,this.i=new Map,this.U=[],this.B=new Map,this.K=!1,this.l=new ct,this.h=null,this.s=function(n){n.severity==2&&t.l.reject(n),e.onError(n)},this.ba=new Map,this.ka=new Map,this.L=new dt(function(){return Vg(t)}),this.N=!1,this.M=[],this.W=!1,this.F=new dt(function(){Kg(t)}),this.l.catch(function(){}),this.m=new Su(function(){return qc(t)}),this.ha=!1,this.G=this.H=null,this.S=function(){return!1}}h=Ta.prototype,h.destroy=function(){return this.m.destroy()};function qc(e){return G(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.l.reject(),e.F.stop(),e.F=null,e.L.stop(),e.L=null,_(t,Ps(e),2);case 2:if(!e.j){t.u(3);break}return he(t,4),_(t,e.j.setMediaKeys(null),6);case 6:_e(t,5);break;case 4:De(t);case 5:e.j=null;case 3:e.g=null,e.A=null,e.B=new Map,e.h=null,e.s=function(){},e.C=null,e.ha=!1,e.H=null,ce(t)}})}h.configure=function(e,t){this.h=e,t&&(this.S=t),this.F&&this.P&&this.g&&this.F.Fa(this.h.updateExpirationTime)};function Ns(e,t,n){return e.na=!0,e.B=new Map,e.N=n,fd(e,t,!1)}function Ug(e,t,n,i){i=i===void 0?!0:i,e.B=new Map,n=C(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=C(e.h.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.N=0<e.B.size,fd(e,t,i)}function qn(e,t,n,i,r,l){function c(y){return y=Oo(t,y,null),y.licenseServerUri=n,y.serverCertificate=i,y.persistentStateRequired=!0,y.sessionType="persistent-license",y}var f=[];return l.length&&f.push(l[0].contentType),r.length&&f.push(r[0].contentType),f=Is(f),f.video&&(l=c(l[0].encryptionScheme||""),f.video.drmInfos.push(l)),f.audio&&(r=c(r[0].encryptionScheme||""),f.audio.drmInfos.push(r)),zn(e,[f])}function fd(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q;return G(function(Q){if(Q.g==1){for(mh(e.h.clearKeys,t),i=t.some(function(z){return!!(z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length)}),r=wu(e.h.servers),l=wu(e.h.advanced||{}),!i&&n&&kv(t,r),c=new WeakSet,f=C(t),y=f.next();!y.done;y=f.next())for(m=y.value,w=gh(m),T=C(w),I=T.next();!I.done;I=T.next())D=I.value,c.has(D)||(c.add(D),qg(D,r,l,e.h.keySystemsMapping));for(M=function(z,X){var W=[];z=C(z);for(var J=z.next();!J.done;J=z.next()){J=J.value;var ne=J[X]||l.has(J.keySystem)&&l.get(J.keySystem)[X]||"",te;if((te=ne=="")&&(te=(te=J.keySystem)?!!te.match(/^com\.widevine\.alpha/):!1),te&&(X=="audioRobustness"?ne=[e.h.defaultAudioRobustnessForWidevine]:X=="videoRobustness"&&(ne=[e.h.defaultVideoRobustnessForWidevine])),typeof ne=="string")W.push(J);else if(Array.isArray(ne))for(ne.length===0&&(ne=[""]),ne=C(ne),te=ne.next();!te.done;te=ne.next()){var ee={};W.push(Object.assign({},J,(ee[X]=te.value,ee)))}}return W},L=new WeakSet,P=C(t),j=P.next();!j.done;j=P.next())V=j.value,V.video&&!L.has(V.video)&&(V.video.drmInfos=M(V.video.drmInfos,"videoRobustness"),V.video.drmInfos=M(V.video.drmInfos,"audioRobustness"),L.add(V.video)),V.audio&&!L.has(V.audio)&&(V.audio.drmInfos=M(V.audio.drmInfos,"videoRobustness"),V.audio.drmInfos=M(V.audio.drmInfos,"audioRobustness"),L.add(V.audio));return _(Q,Uc(t,e.N,e.ha,e.h.preferredKeySystems),2)}return Pt(e.m),K=i||0<r.size,K?(q=zn(e,t),Q.return(i?q:q.catch(function(){}))):(e.P=!0,Q.return(Promise.resolve()))})}function dd(e){var t;return G(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.H){n.u(2);break}return _(n,e.H,3);case 3:return Pt(e.m),n.return();case 2:return he(n,4),e.H=e.j.setMediaKeys(e.A),_(n,e.H,6);case 6:_e(n,5);break;case 4:t=De(n),e.s(new Y(2,6,6003,t.message));case 5:Pt(e.m),ce(n)}})}function jg(e,t){return G(function(n){if(n.g==1)return _(n,dd(e),2);xa(e,t.initDataType,Ge(t.initData)),ce(n)})}h.fc=function(e){var t=this,n;return G(function(i){if(i.g==1)return t.j===e?i.return():t.A?(t.j=e,t.o.Aa(t.j,"play",function(){for(var r=C(t.M),l=r.next();!l.done;l=r.next())Xc(t,l.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return Ps(t)}),t.o.D(t.j.remote,"connecting",function(){return Ps(t)}),t.o.D(t.j.remote,"disconnect",function(){return Ps(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ps(t)}),t.G=t.g&&t.g.initData.find(function(r){return 0<r.initData.length})||null,n=t.g.keySystem,yt().Qg(n)||!(t.G||t.B.size||t.h.parseInbandPsshEnabled)?(t.o.D(t.j,"encrypted",function(r){return jg(t,r)}),i.u(2)):_(i,dd(t),2)):(t.o.Aa(e,"encrypted",function(){t.s(new Y(2,6,6010))}),i.return());pd(t).catch(function(){}),ce(i)})};function Bg(e){var t,n,i,r,l;return G(function(c){switch(c.g){case 1:if(!e.A||!e.g)return c.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){c.u(2);break}return t=bn([e.g.serverCertificateUri],e.h.retryParameters),he(c,3),n=e.C.pc.request(5,t,{isPreload:e.S()}),_(c,n.promise,5);case 5:i=c.h,e.g.serverCertificate=Ge(i.data),_e(c,4);break;case 3:throw r=De(c),new Y(2,6,6017,r);case 4:if(e.m.g)return c.return();case 2:return!e.g.serverCertificate||!e.g.serverCertificate.length?c.return():(he(c,6),_(c,e.A.setServerCertificate(e.g.serverCertificate),8));case 8:_e(c,0);break;case 6:throw l=De(c),new Y(2,6,6004,l.message)}})}function Iv(e,t){var n,i,r;return G(function(l){if(l.g==1)return _(l,yd(e,t,{initData:null,initDataType:null}),2);if(l.g!=3)return n=l.h,n?(i=[],(r=e.i.get(n))&&(r.Kb=new ct,i.push(r.Kb)),i.push(n.remove()),_(l,Promise.all(i),3)):l.return();e.i.delete(n),ce(l)})}function pd(e){var t,n,i,r,l;return G(function(c){if(c.g==1)return e.B.size?(e.B.forEach(function(f,y){yd(e,y,f)}),_(c,e.l,3)):c.u(2);if(c.g!=2){if(t=e.g&&e.g.keyIds||new Set([]),0<t.size&&Gg(e))return c.return(e.l);e.K=!1,e.l=new ct,e.l.catch(function(){})}for(n=(e.g?e.g.initData:[])||[],i=C(n),r=i.next();!r.done;r=i.next())l=r.value,xa(e,l.initDataType,l.initData);return Aa(e)&&e.l.resolve(),c.return(e.l)})}function xa(e,t,n){if(n.length){if(e.h.ignoreDuplicateInitData){var i=e.i.values();i=C(i);for(var r=i.next();!r.done;r=i.next())if(gr(n,r.value.initData))return;var l=!1;if(e.B.forEach(function(c){!l&&gr(n,c.initData)&&(l=!0)}),l)return}e.K=!0,0<e.i.size&&Aa(e)&&(e.l.resolve(),e.K=!1,e.l=new ct,e.l.catch(function(){})),Rl(e,t,n,e.g.sessionType)}}function hd(e){return e=e.i.keys(),e=Ho(e,function(t){return t.sessionId}),Array.from(e)}h.Eg=function(){var e=this,t=this.i.keys();return t=Ho(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)},h.Pd=function(){var e=1/0,t=this.i.keys();t=C(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};function fr(e){return e.I?e.I:NaN}h.Te=function(){return Gc(this.ka)};function zn(e,t){var n,i,r,l,c,f,y;return G(function(m){switch(m.g){case 1:if(n=new Map,i=hh(e,t,n),!i)throw navigator.requestMediaKeySystemAccess?new Y(2,6,6001):new Y(2,6,6020);Pt(e.m),he(m,2),i.getConfiguration();var w=r=e.h.keySystemsMapping[i.keySystem]||i.keySystem,T=n.get(r),I=[],D=[],M=[],L=[],P=[],j=new Set,V=new Set;Fg(T,I,D,L,M,P,j,V);var K=e.N?"persistent-license":"temporary";for(w={keySystem:w,encryptionScheme:I[0],licenseServerUri:D[0],distinctiveIdentifierRequired:T[0].distinctiveIdentifierRequired,persistentStateRequired:T[0].persistentStateRequired,sessionType:T[0].sessionType||K,audioRobustness:T[0].audioRobustness||"",videoRobustness:T[0].videoRobustness||"",serverCertificate:L[0],serverCertificateUri:M[0],initData:P,keyIds:j},0<V.size&&(w.keySystemUris=V),T=C(T),V=T.next();!V.done;V=T.next())V=V.value,V.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=V.distinctiveIdentifierRequired),V.persistentStateRequired&&(w.persistentStateRequired=V.persistentStateRequired);if(e.g=w,!e.g.licenseServerUri)throw new Y(2,6,6012,e.g.keySystem);return _(m,i.createMediaKeys(),4);case 4:if(l=m.h,Pt(e.m),e.A=l,!(e.h.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){m.u(5);break}return he(m,6),_(m,e.A.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if(c=m.h,c!="usable")throw new Y(2,6,6018);Pt(e.m),_e(m,5,2);break;case 6:throw f=De(m,2),f instanceof Y?f:new Y(2,6,6019,f.message);case 5:return e.P=!0,e.F.Fa(e.h.updateExpirationTime),_(m,Bg(e),9);case 9:Pt(e.m),_e(m,0);break;case 2:throw y=De(m),Pt(e.m,y),e.g=null,y instanceof Y?y:new Y(2,6,6002,y.message)}})}function hh(e,t,n){for(var i=C(t),r=i.next();!r.done;r=i.next()){r=C(gh(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.h.preferredKeySystems,i.length||(r=wu(e.h.servers),r.size==1&&(i=Array.from(r.keys()))),r=C(i);var c=r.next();for(l={};!c.done;l={wi:void 0},c=r.next()){l.wi=c.value,c=C(t);for(var f=c.next();!f.done;f=c.next())if(f=f.value.decodingInfos.find(function(T){return function(I){return I.supported&&I.keySystemAccess!=null&&I.keySystemAccess.keySystem==T.wi}}(l)))return f.keySystemAccess}for(r=C([!0,!1]),l=r.next();!l.done;l=r.next())for(l=l.value,c=C(t),f=c.next();!f.done;f=c.next()){f=C(f.value.decodingInfos);for(var y=f.next();!y.done;y=f.next())if(y=y.value,y.supported&&y.keySystemAccess){var m=y.keySystemAccess.keySystem;if(!i.includes(m)){var w=n.get(m);for(!w&&e.h.keySystemsMapping[m]&&(w=n.get(e.h.keySystemsMapping[m])),m=C(w),w=m.next();!w.done;w=m.next())if(!!w.value.licenseServerUri==l)return y.keySystemAccess}}}return null}function Ea(e){Aa(e)&&e.l.resolve()}function zc(e,t){new dt(function(){t.loaded=!0,Ea(e)}).ia(zg)}function yd(e,t,n){var i,r,l,c,f,y,m;return G(function(w){switch(w.g){case 1:try{i=e.A.createSession("persistent-license")}catch(T){return r=new Y(2,6,6005,T.message),e.s(r),w.return(Promise.reject(r))}return e.o.D(i,"message",function(T){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(T):Xc(e,T)}),e.o.D(i,"keystatuseschange",function(T){return md(e,T)}),l={initData:n.initData,initDataType:n.initDataType,loaded:!1,Tg:1/0,Kb:null,type:"persistent-license"},e.i.set(i,l),he(w,2),_(w,i.load(t),4);case 4:return c=w.h,Pt(e.m),c||(e.i.delete(i),f=e.h.persistentSessionOnlinePlayback?1:2,e.s(new Y(f,6,6013)),l.loaded=!0),zc(e,l),Ea(e),w.return(i);case 2:y=De(w),Pt(e.m,y),e.i.delete(i),m=e.h.persistentSessionOnlinePlayback?1:2,e.s(new Y(m,6,6005,y.message)),l.loaded=!0,Ea(e);case 3:return w.return(Promise.resolve())}})}function Rl(e,t,n,i){try{var r=e.A.createSession(i)}catch(l){e.s(new Y(2,6,6005,l.message));return}e.o.D(r,"message",function(l){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(l):Xc(e,l)}),e.o.D(r,"keystatuseschange",function(l){return md(e,l)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Tg:1/0,Kb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(l){t=l,l instanceof Y||(t=new Y(2,6,6016,l)),e.s(t);return}e.h.logLicenseExchange&&ro(n),r.generateRequest(t,n).catch(function(l){if(!e.m.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.s(new Y(2,6,6006,l.message,l,f))}})}function gd(e){return G(function(t){return t.g==1?e.K?_(t,e.l,3):t.u(0):_(t,Promise.all(e.U.map(function(n){return n.promise})),0)})}function Xc(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L;G(function(P){switch(P.g){case 1:if(n=t.target,e.h.logLicenseExchange&&ro(t.message),i=e.i.get(n),r=e.g.licenseServerUri,l=e.h.advanced[e.g.keySystem],t.messageType=="individualization-request"&&l&&l.individualizationServer&&(r=l.individualizationServer),c=bn([r],e.h.retryParameters),c.body=t.message,c.method="POST",c.licenseRequestType=t.messageType,c.sessionId=n.sessionId,c.drmInfo=e.g,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.g.keySystem==="org.w3.clearkey"){var j=c,V=e.g;try{var K=qi(j.body);if(K){var q=JSON.parse(K);q.type||(q.type=V.sessionType,j.body=Br(JSON.stringify(q)))}}catch{}}if(Ds(e.g.keySystem))if(j=rr(c.body,!0,!0),j.includes("PlayReadyKeyMessage")){for(j=uo(j,"PlayReadyKeyMessage"),V=ao(j,"HttpHeader"),V=C(V),K=V.next();!K.done;K=V.next())q=K.value,K=ao(q,"name")[0],q=ao(q,"value")[0],c.headers[Cn(K)]=Cn(q);j=ao(j,"Challenge")[0],c.body=or(Cn(j))}else c.headers["Content-Type"]="text/xml; charset=utf-8";return y=Date.now(),he(P,2),w=e.C.pc.request(2,c,{isPreload:e.S()}),e.U.push(w),_(P,w.promise,4);case 4:m=P.h,Sr(e.U,w),_e(P,3);break;case 2:return T=De(P),e.m.g||(I=new Y(2,6,6007,T),e.i.size==1?(e.s(I),i&&i.Kb&&i.Kb.reject(I)):(i&&i.Kb&&i.Kb.reject(I),e.i.delete(n),Aa(e)&&(e.l.resolve(),e.L.ia(.1)))),P.return();case 3:return e.m.g?P.return():(e.I+=(Date.now()-y)/1e3,e.h.logLicenseExchange&&ro(m.data),he(P,5),_(P,n.update(m.data),7));case 7:_e(P,6);break;case 5:return D=De(P),M=new Y(2,6,6008,D.message),e.s(M),i&&i.Kb&&i.Kb.reject(M),P.return();case 6:if(e.m.g)return P.return();L=new ke("drmsessionupdate"),e.C.onEvent(L),i&&(i.Kb&&i.Kb.resolve(),zc(e,i)),ce(P)}})}function md(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(f=yt(),Ds(e.g.keySystem)&&c.byteLength==16&&f.fh()){f=Zn(c);var y=f.getUint32(0,!0),m=f.getUint16(4,!0),w=f.getUint16(6,!0);f.setUint32(0,y,!1),f.setUint16(4,m,!1),f.setUint16(6,w,!1)}l!="status-pending"&&(n.loaded=!0),l=="expired"&&(i=!0),c=oo(c).slice(0,32),e.ba.set(c,l)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.Kb&&(e.i.delete(t),yh(t)),Aa(e)&&(e.l.resolve(),e.L.ia(Xg))}function Vg(e){var t=e.ba,n=e.ka;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.s(new Y(2,6,6014)),e.C.rf(Gc(n))}function Hg(){var e,t,n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce;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.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(x.MediaKeys&&x.navigator&&x.navigator.requestMediaKeySystemAccess&&x.MediaKeySystemAccess&&x.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=C(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"],y={"com.widevine.alpha":c,"com.widevine.alpha.experiment":c,"com.microsoft.playready.recommendation":f},m=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],w=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],T={videoCapabilities:m,audioCapabilities:w,initDataTypes:["cenc","sinf","skd","keyids"]},I=[null,"cenc","cbcs"],D=new Map,M=yt(),L=function(Le,kt){var xt,Kt,st,tt,zt,ft,lt,ht,gn,hn,mn,Wn,Pn;return G(function(Xt){switch(Xt.g){case 1:return he(Xt,2),_(Xt,kt.createMediaKeys(),5);case 5:xt=Xt.h;case 4:_e(Xt,3);break;case 2:return De(Xt),Xt.return();case 3:if(st=(Kt=kt.getConfiguration().sessionTypes)?Kt.includes("persistent-license"):!1,M.mi()&&(st=!1),tt=kt.getConfiguration().videoCapabilities,zt=kt.getConfiguration().audioCapabilities,ft={persistentState:st,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},D.has(Le)&&D.get(Le)?ft=D.get(Le):D.set(Le,ft),(lt=tt[0].encryptionScheme)&&!ft.encryptionSchemes.includes(lt)&&ft.encryptionSchemes.push(lt),(ht=tt[0].robustness)&&!ft.videoRobustnessLevels.includes(ht)&&ft.videoRobustnessLevels.push(ht),(gn=zt[0].robustness)&&!ft.audioRobustnessLevels.includes(gn)&&ft.audioRobustnessLevels.push(gn),"getStatusForPolicy"in xt){for(hn=[],mn=C(l),Wn=mn.next(),Pn={};!Wn.done;Pn={Td:void 0},Wn=mn.next())Pn.Td=Wn.value,ft.minHdcpVersions.includes(Pn.Td)||hn.push(xt.getStatusForPolicy({minHdcpVersion:Pn.Td}).then(function(xc){return function(jr){jr!="usable"||ft.minHdcpVersions.includes(xc.Td)||ft.minHdcpVersions.push(xc.Td)}}(Pn)));return _(Xt,Promise.all(hn),0)}Xt.u(0)}})},P=function(Le,kt,xt,Kt){var st,tt,zt,ft,lt,ht,gn,hn,mn,Wn,Pn;return G(function(Xt){switch(Xt.g){case 1:for(he(Xt,2),st=Tr(T),tt=C(st.videoCapabilities),zt=tt.next();!zt.done;zt=tt.next())ft=zt.value,ft.encryptionScheme=kt,ft.robustness=xt;for(lt=C(st.audioCapabilities),ht=lt.next();!ht.done;ht=lt.next())gn=ht.value,gn.encryptionScheme=kt,gn.robustness=Kt;return hn=Tr(st),hn.persistentState="required",hn.sessionTypes=["persistent-license"],mn=[hn,st],Pn=yt(),Pn.La()=="MOBILE"?_(Xt,Ni(5,navigator.requestMediaKeySystemAccess(Le,mn)),7):_(Xt,navigator.requestMediaKeySystemAccess(Le,mn),6);case 6:Wn=Xt.h,Xt.u(5);break;case 7:Wn=Xt.h;case 5:return _(Xt,L(Le,Wn),8);case 8:_e(Xt,0);break;case 2:De(Xt),ce(Xt)}})},j=function(Le,kt,xt,Kt){var st,tt,zt,ft;return G(function(lt){switch(lt.g){case 1:return he(lt,2),st={type:"media-source",video:{contentType:m[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:w[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:Le,video:{encryptionScheme:kt,robustness:xt},audio:{encryptionScheme:kt,robustness:Kt}}},zt=yt(),zt.La()=="MOBILE"?_(lt,Ni(5,navigator.mediaCapabilities.decodingInfo(st)),7):_(lt,navigator.mediaCapabilities.decodingInfo(st),6);case 6:tt=lt.h,lt.u(5);break;case 7:tt=lt.h;case 5:return ft=tt.keySystemAccess,_(lt,L(Le,ft),8);case 8:_e(lt,0);break;case 2:De(lt),ce(lt)}})},V=C(e),K=V.next();!K.done;K=V.next())q=K.value,D.set(q,null);for(Q=function(Le){return!(yt().Da()==="WEBKIT"&&Le==="org.w3.clearkey")},z=[],X=C(I),W=X.next();!W.done;W=X.next())for(J=W.value,ne=C(e),te=ne.next();!te.done;te=ne.next())ee=te.value,Q(ee)&&(z.push(P(ee,J,"","")),z.push(j(ee,J,"","")));for(ge=C(e),fe=ge.next();!fe.done;fe=ge.next())for(le=fe.value,pe=C(y[le]||[]),Ee=pe.next();!Ee.done;Ee=pe.next())Ce=Ee.value,Q(le)&&(z.push(P(le,null,Ce,"")),z.push(P(le,null,"",Ce)),z.push(j(le,null,Ce,"")),z.push(j(le,null,"",Ce)));return _(Be,Promise.all(z),2)}return Be.return(Gc(D))})}function yh(e){return G(function(t){if(t.g==1)return he(t,2),_(t,Ni(vh,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return _e(t,0);De(t),ce(t)})}function Ps(e){var t;return G(function(n){return t=Array.from(e.i.entries()),e.i.clear(),_(n,Promise.all(t.map(function(i){i=C(i);var r=i.next().value,l=i.next().value;return G(function(c){if(c.g==1)return he(c,2),e.na||e.B.has(r.sessionId)||l.type!=="persistent-license"||e.h.persistentSessionOnlinePlayback?_(c,yh(r),5):_(c,r.remove(),5);if(c.g!=2)return _e(c,0);De(c),ce(c)})})),0)})}function gh(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Kg(e){e.i.forEach(function(t,n){var i=t.Tg,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Tg=r)})}function Aa(e){return e=e.i.values(),Kc(e,function(t){return t.loaded})}function Gg(e){for(var t=C(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function kv(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=C(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 Fg(e,t,n,i,r,l,c,f){var y=[];e=C(e);for(var m=e.next(),w={};!m.done;w={Ha:void 0},m=e.next()){if(w.Ha=m.value,t.includes(w.Ha.encryptionScheme)||t.push(w.Ha.encryptionScheme),w.Ha.keySystem=="org.w3.clearkey"&&w.Ha.licenseServerUri.startsWith("data:application/json;base64,")?y.includes(w.Ha.licenseServerUri)||y.push(w.Ha.licenseServerUri):n.includes(w.Ha.licenseServerUri)||n.push(w.Ha.licenseServerUri),r.includes(w.Ha.serverCertificateUri)||r.push(w.Ha.serverCertificateUri),w.Ha.serverCertificate&&(i.some(function(D){return function(M){return gr(M,D.Ha.serverCertificate)}}(w))||i.push(w.Ha.serverCertificate)),w.Ha.initData){m=C(w.Ha.initData);for(var T=m.next(),I={};!T.done;I={Kg:void 0},T=m.next())I.Kg=T.value,l.some(function(D){return function(M){var L=D.Kg;return M.keyId&&M.keyId==L.keyId?!0:M.initDataType==L.initDataType&&gr(M.initData,L.initData)}}(I))||l.push(I.Kg)}if(w.Ha.keyIds)for(m=C(w.Ha.keyIds),T=m.next();!T.done;T=m.next())c.add(T.value);if(w.Ha.keySystemUris&&f)for(w=C(w.Ha.keySystemUris),m=w.next();!m.done;m=w.next())f.add(m.value)}if(y.length==1)n.push(y[0]);else if(0<y.length){for(t=[],y=C(y),i=y.next();!i.done;i=y.next())i=x.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,$(i.keys));y=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+x.btoa(y))}}function qg(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]),x.cast&&x.cast.__platform__&&r=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function mh(e,t){if(e=wu(e),e.size!=0){e=mr(e),t=C(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 vh=1,zg=5,Xg=.5;function Yc(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=C(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}Yc.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&&!Sh(i,r))&&wh(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||Sh(n,i))&&wh(n.roles,i.roles))),i?!1:(this.g.add(e),!0)},Yc.prototype.values=function(){return this.g.values()};function Sh(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return xr(i)}),t=t.codecs.split(",").map(function(i){return xr(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 wh(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=C(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Pe("shaka.media.AdaptationSet",Yc),Pe("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function vd(){}vd.prototype.create=function(){},vd.prototype.configure=function(){},vd.prototype.getConfiguration=function(){},Pe("shaka.media.AdaptationSetCriteria",vd);function Yg(){this.g=Eu,this.i=new Map().set(Eu,2).set(mo,1),this.h=0}var mo=0,Eu=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function Sd(e,t,n){this.g=e,this.i=t,this.h=n}function Wc(e,t){return G(function(n){if(n.g==1)return _(n,ud(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||cr(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some($t))throw new Y(2,4,4032);return n.return(Th(e,t))})}function Ls(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=C(t.variants);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=r.allowedByApplication;r.allowedByApplication=_c(r,n,e),l!=r.allowedByApplication&&(i=!0)}return i}function Th(e,t){var n=Ls(e,t);if(t){var i=e.h?e.h.g:null;if(i&&e.h.A){for(var r=new Set,l=C(t.variants),c=l.next();!c.done;c=l.next())c=c.value,c.audio&&r.add(c.audio),c.video&&r.add(c.video);for(r=C(r),l=r.next();!l.done;l=r.next())xh(e,i.keySystem,l.value)}Eh(e,t)}return n}function xh(e,t,n){n=C(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if(i=i.value,i.keySystem==t){i=C(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,xa(e.h,r.initDataType,r.initData)}}function Eh(e,t){e=e.h?e.h.Te():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var i=!1,r=!1,l=new Set,c=new Set,f=new Set;t=C(t.variants);for(var y=t.next();!y.done;y=t.next())y=y.value,y.audio&&f.add(y.audio),y.video&&f.add(y.video),y.allowedByApplication?y.allowedByKeySystem&&(i=!0):r=!0;for(f=C(f),t=f.next();!t.done;t=f.next())if(t=t.value,t.keyIds.size)for(t=C(t.keyIds),y=t.next();!y.done;y=t.next()){y=y.value;var m=e[n?"00":y];m?wd.includes(m)&&c.add(m):l.add(y)}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(l),restrictedKeyStatuses:Array.from(c)},new Y(2,4,4012,e)}var wd=["output-restricted","internal-error"];function _s(){}function Au(e,t){Ca.set(e,t)}function Ah(){var e={};if(yt(),Fu())for(var t=C(Ca.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=C(["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]=Fu()?Ca.has(n):ku().canPlayType(n)!="";return e}function Ch(e,t){if(t){var n=Ca.get(t.toLowerCase());if(n)return n}throw new Y(2,4,4e3,e,t)}Pe("shaka.media.ManifestParser",_s),_s.unregisterParserByMime=function(e){Ca.delete(e)},_s.registerParserByMime=Au,_s.registerParserByExtension=function(){Et("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},_s.AccessibilityPurpose={tm:"visually impaired",Gl:"hard of hearing",bm:"spoken subtitles"};var Ca=new Map;function Us(e,t){var n=null,i=null,r=null,l=null,c=e.T();return t&1&&(r=e.yd()),t&2&&(l=e.T()),t&8&&(n=e.T()),t&16&&(i=e.T()),{trackId:c,Md:n,Nd:i,gj:r,Fi:l}}function Qc(e,t){return t==1?(t=e.T(),e=e.T(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.T()}}function Jc(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.T(),e.skip(4),e=e.Ba(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function Td(e,t,n){var i=e.T(),r=[],l=null;n&1&&(l=e.Yg()),n&4&&e.skip(4);for(var c=0;c<i;c++){var f={hh:null,sampleSize:null,Bf:null};n&256&&(f.hh=e.T()),n&512&&(f.sampleSize=e.T()),n&1024&&e.skip(4),n&2048&&(f.Bf=t==0?e.T():e.Yg()),r.push(f)}return{ym:i,gh:r,mg:l}}function xd(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Ba();return e.skip(2),e.skip(2),e.skip(2),e=e.Ba()+e.Ba()/65536,{channelCount:t,sampleRate:e}}function Ed(e){return e=e.T(),{codec:Lt(e)}}function Wg(e){var t=null,n=null,i=e.Ub(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.Ba()){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.Ba(),e.Ba(),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,oe:n}}function ba(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function _i(e){return(10>e?"0":"")+e}function Cu(e){if(!Zg){Zg=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);vo=wt("ftyp",t,i,t,n),t=wt("dref",nm),Fo=wt("dinf",t)}this.g=e}function js(e){for(var t=[],n=C(e.g),i=n.next();!i.done;i=n.next()){var r=t,l=r.push,c=i.value;i=wt;var f=c.id+1,y=c.stream.width||0,m=c.stream.height||0;c.type=="audio"&&(m=y=0);var w=c.duration*c.timescale,T=Math.floor(w/(kr+1));switch(w=Math.floor(w%(kr+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($(un(f,4)),[0,0,0,0],$(un(T,4)),$(un(w,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],$(un(y,2)),[0,0],$(un(m,2)),[0,0])),f=wt("tkhd",f),y=wt,T=c.duration*c.timescale,m=Math.floor(T/(kr+1)),T=Math.floor(T%(kr+1)),w=c.stream.language,w=w.charCodeAt(0)-96<<10|w.charCodeAt(1)-96<<5|w.charCodeAt(2)-96,m=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat($(un(c.timescale,4)),$(un(m,4)),$(un(T,4)),$(un(w,2)),[0,0])),m=wt("mdhd",m),T=c,w=new Uint8Array([]),T.type){case"video":w=Ad;break;case"audio":w=$c}T=wt("hdlr",w);e:{switch(c.type){case"video":c=wt("minf",wt("vmhd",tm),Fo,Qg(c));break e;case"audio":c=wt("minf",wt("smhd",Fr),Fo,Qg(c));break e}c=new Uint8Array([])}c=y("mdia",m,T,c),i=i("trak",f,c),l.call(r,i)}for(t=an.apply(Bn,$(t)),l=e.g[0],n=wt,i=l.duration*l.timescale,r=Math.floor(i/(kr+1)),i=Math.floor(i%(kr+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($(un(l.timescale,4)),$(un(r,4)),$(un(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=wt("mvhd",r),i=[],e=C(e.g),y=e.next();!y.done;y=e.next())c=i,f=c.push,y=new Uint8Array([0,0,0,0].concat($(un(y.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),y=wt("trex",y),f.call(c,y);if(e=an.apply(Bn,$(i)),e=wt("mvex",e),i=[],l.encrypted){for(l=C(l.stream.drmInfos),c=l.next();!c.done;c=l.next())if(c=c.value,c.initData)for(c=C(c.initData),f=c.next();!f.done;f=c.next())i.push(f.value.initData);l=an.apply(Bn,$(i))}else l=new Uint8Array([]);return e=n("moov",r,t,e,l),t=new Uint8Array(vo.byteLength+e.byteLength),t.set(vo),t.set(e,vo.byteLength),t}function Qg(e){var t=wt,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=yt().ee()?"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.Na.byteLength)var r=wt("avcC",e.Na);else{r=wt;for(var l=7,c=[],f=[],y=0,m=0,w=0,T=0;T<e.Ab.length;T++){var I=Zc(e.Ab[T]);switch(I[0]&31){case 7:c.push(I),l+=I.length+2;break;case 8:f.push(I),l+=I.length+2}}for(0<c.length&&(y=c[0][1],w=c[0][2],m=c[0][3]),l=new Uint8Array(l),T=0,l[T++]=1,l[T++]=y,l[T++]=w,l[T++]=m,l[T++]=255,l[T++]=224|c.length,y=0;y<c.length;y++)l[T++]=(c[y].length&65280)>>8,l[T++]=c[y].length&255,l.set(c[y],T),T+=c[y].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($(un(n,2)),$(un(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=bh(e),c=new Uint8Array([]),e.encrypted&&(c=Nl(0,e.stream,e.codecs),i="encv"),i=wt(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.Na.byteLength&&(n=wt("hvcC",e.Na)),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($(un(i,2)),$(un(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=bh(e),c=new Uint8Array([]),e.encrypted&&(c=Nl(0,e.stream,e.codecs),r="encv"),i=wt(r,i,n,f,c));break;case"audio":n=="mp3"?e=wt(".mp3",Ml(e)):n=="ac-3"?(n=wt("dac3",e.Ea),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=Nl(0,e.stream,e.codecs),i="enca"),e=wt(i,Ml(e),n,r)):n=="ec-3"?(n=wt("dec3",e.Ea),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=Nl(0,e.stream,e.codecs),i="enca"),e=wt(i,Ml(e),n,r)):n=="opus"?(n=wt("dOps",e.Ea),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=Nl(0,e.stream,e.codecs),i="enca"),e=wt(i,Ml(e),n,r)):(0<e.Ea.byteLength?n=wt("esds",e.Ea):(n=wt,i=e.id+1,r=e.stream.channelsCount||2,c=e.stream.audioSamplingRate||44100,y=$u("audio",e.codecs.split(",")),m={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=m[c],(y==="mp4a.40.5"||y==="mp4a.40.29")&&(f=m[2*c]),c=parseInt(y.split(".").pop(),10),i=new Uint8Array([0,0,0,0,3,25].concat($(un(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=Nl(0,e.stream,e.codecs),i="enca"),e=wt(i,Ml(e),n,r)),i=e}return e=wt("stsd",Go,i),t("stbl",e,wt("stts",Cd),wt("stsc",$g),wt("stsz",Vs),wt("stco",em))}function bh(e){if(!e.Wa&&!e.Xa)return new Uint8Array([]);var t=e.Xa;return e=new Uint8Array([].concat($(un(e.Wa,4)),$(un(t,4)))),wt("pasp",e)}function Ml(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($(un(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Nl(e,t,n){e=wt,n=new Uint8Array([].concat($(un(Ih(n.split(".")[0]),4)))),n=wt("frma",n);var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=new Uint8Array([0,0,0,0].concat($(un(Ih(i),4)),[0,1,0,0])),i=wt("schm",i),r=wt;var l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=C(t.drmInfos);for(var c=t.next();!c.done;c=t.next())if((c=c.value)&&c.keyIds&&c.keyIds.size){c=C(c.keyIds);for(var f=c.next();!f.done;f=c.next())l=Zc(f.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=wt("tenc",t,l),e("sinf",n,i,r("schi",t))}function bu(e){var t=[];e=C(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,l=wt,c=new Uint8Array([0,0,0,0].concat($(un(n.data?n.data.Vb:0,4))));c=wt("mfhd",c);var f,y=n.data?n.data.yb:[],m=new Uint8Array(4+y.length);for(f=0;f<y.length;f++){var w=y[f].flags;m[f+4]=w.ib<<4|w.kb<<2|w.jb}y=wt("sdtp",m);var T=y.length+92;m=wt,f=new Uint8Array([0,0,0,58].concat($(un(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),f=wt("tfhd",f),w=n.data?n.data.baseMediaDecodeTime:0;var I=Math.floor(w%(kr+1));w=new Uint8Array([1,0,0,0].concat($(un(Math.floor(w/(kr+1)),4)),$(un(I,4)))),w=wt("tfdt",w);var D=T;T=n.data?n.data.yb:[],I=T.length;var M=12+16*I,L=new Uint8Array(M);for(D+=8+M,L.set([n.type==="video"?1:0,0,15,1].concat($(un(I,4)),$(un(D,4))),0),D=0;D<I;D++){var P=T[D];M=un(P.duration,4);var j=un(P.size,4),V=P.flags;P=un(P.rb,4),L.set([].concat($(M),$(j),[V.wb<<2|V.ib,V.kb<<6|V.jb<<4|V.xb,V.hb&61440,V.hb&15],$(P)),12+16*D)}T=wt("trun",L),y=m("traf",f,w,T,y),l=l("moof",c,y),r.call(i,t,[l,Jg(n)])}return an.apply(Bn,$(t))}function Jg(e){return e=(e.data?e.data.yb:[]).map(function(t){return t.data}),e=an.apply(Bn,$(e)),wt("mdat",e)}function un(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function Zc(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 Ih(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function wt(e){var t=vt.apply(1,arguments),n=Bs.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Bs.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 Zg=!1,kr=Math.pow(2,32)-1,Bs=new Map,Ad=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]),$c=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]),Cd=new Uint8Array([0,0,0,0,0,0,0,0]),$g=new Uint8Array([0,0,0,0,0,0,0,0]),em=new Uint8Array([0,0,0,0,0,0,0,0]),Vs=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),tm=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Fr=new Uint8Array([0,0,0,0,0,0,0,0]),Go=new Uint8Array([0,0,0,0,0,0,0,1]),vo=new Uint8Array([]),nm=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Fo=new Uint8Array([]);function Pl(e){e=Ge(e);var t=null;return new Ut().box("moov",nt).box("trak",nt).box("mdia",nt).box("minf",nt).box("stbl",nt).R("stsd",Gr).box("enca",function(n){return t=n.reader.h,Ms(n)}).box("sinf",nt).box("frma",function(n){n.parser.stop(),Ed(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}function ci(e,t,n){function i(D){T.push({box:D,oi:1701733217})}function r(D){T.push({box:D,oi:1701733238})}function l(D){y=!0,D.parser.stop()}function c(D){w.push(D),nt(D)}var f=t=Ge(t),y=!1,m,w=[],T=[];if(new Ut().box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(D){m=D,w.push(D),Gr(D)}).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),y)return t;if(T.length==0||!m)throw oo(t),new Y(2,3,3019,n);T.reverse(),n=C(T);for(var I=n.next();!I.done;I=n.next())I=I.value,f=Dh(e,f,m,I.box,w,I.oi);return yt().Ai()?(e=new Uint8Array(t.byteLength+f.byteLength),e.set(f),e.set(t,f.byteLength),e):f}function bd(e){e=Ge(e);var t=[];new Ut().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(kh(e.subarray(r?r.start+r.size:0,l.start+l.size)))}return an.apply(Bn,$(n))}function kh(e){function t(T){c.push(T),nt(T)}var n,i,r,l,c=[];if(new Ut().box("moof",t).box("traf",t).R("tfhd",function(T){n=T,r=Us(T.reader,T.flags)}).R("trun",function(T){i=T,l=Td(T.reader,T.version,T.flags)}).parse(e),r&&r.Fi!==2){var f=n.start+tn(n)+4+(r.gj!==null?8:0),y=Zn(e);if(r.Fi!==null)y.setUint32(f,2);else{ef(e,n.start,n.size+4);var m=y.getUint32(n.start+8);y.setUint32(n.start+8,m|2),l&&l.mg!==null&&y.setInt32(i.start+tn(i)+4,l.mg+4),m=e.subarray(0,f),y=e.subarray(f),e=new Uint8Array(e.byteLength+4),e.set(m),m=[];for(var w=3;0<=w;w--)m.push(2>>8*w&255);for(e.set(new Uint8Array(m),f),e.set(y,f+4),f=C(c),y=f.next();!y.done;y=f.next())y=y.value,ef(e,y.start,y.size+4)}}return e}function Dh(e,t,n,i,r,l){var c=Nl(new Cu([]),e,i.name),f=t.subarray(i.start,i.start+i.size);for(e=new Uint8Array(i.size+c.byteLength),e.set(f,0),Zn(e).setUint32(4,l),e.set(c,i.size),ef(e,0,e.byteLength),l=new Uint8Array(t.byteLength+e.byteLength),i=yt().$e()?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=C(r),r=t.next();!r.done;r=t.next())r=r.value,ef(l,r.start,r.size+e.byteLength);return e=Zn(l,n.start),n=tn(n),t=e.getUint32(n),e.setUint32(n,t+1),l}function ef(e,t,n){e=Zn(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 im(e){function t(r){i.push({start:r.start,size:r.size}),nt(r)}var n=Ge(e),i=[];return new Ut().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=Zn(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 Kn(e,t,n,i,r,l,c,f){this.O=e,this.startByte=t,this.endByte=n,this.rd=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}Kn.prototype.Bc=function(){return this.startByte},Kn.prototype.zc=function(){return this.endByte},Kn.prototype.ge=function(e){this.h=e},Kn.prototype.Yb=function(){return this.h};function Iu(e,t){return e===t?!0:e&&t?e.Bc()==t.Bc()&&e.zc()==t.zc()&&wr(e.O().sort(),t.O().sort())&&gr(e.Yb(),t.Yb()):e==t}Pe("shaka.media.InitSegmentReference",Kn),Kn.prototype.getEndByte=Kn.prototype.zc,Kn.prototype.getStartByte=Kn.prototype.Bc;function Fe(e,t,n,i,r,l,c,f,y,m,w,T,I,D,M,L){for(m=m===void 0?[]:m,D=D===void 0?qo:D,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=i,this.endByte=r,this.Y=l,this.timestampOffset=c,this.appendWindowStart=f,this.appendWindowEnd=y,this.g=m,this.tilesLayout=w===void 0?"":w,this.B=T===void 0?null:T,this.h=I===void 0?null:I,this.status=D,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=M===void 0?null:M,this.thumbnailSprite=null,this.i=-1,this.A=L===void 0?!1:L,this.F=this.o=!1,e=C(this.g),t=e.next();!t.done;t=e.next())t.value.ki();this.A&&this.g.length&&this.g[this.g.length-1].ji(),this.s=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}h=Fe.prototype,h.O=function(){return this.C()},h.getStartTime=function(){return this.startTime},h.zj=function(){return this.endTime},h.Bc=function(){return this.startByte},h.zc=function(){return this.endByte},h.Vj=function(){return this.tilesLayout},h.Uj=function(){return this.B},h.Cc=function(){return this.status},h.qk=function(){this.status=tf},h.Pg=function(){this.preload=!0},h.isPreload=function(){return this.preload},h.qd=function(){this.l=!1},h.fk=function(){return this.l},h.ki=function(){this.o=!0},h.hk=function(){return this.o},h.ji=function(){this.F=!0},h.gk=function(){return this.F},h.ii=function(){this.m=!0},h.bk=function(){return this.m},h.Hf=function(e){this.thumbnailSprite=e},h.Sj=function(){return this.thumbnailSprite},h.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=C(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},h.vh=function(e){this.h==null?ui("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},h.ge=function(e,t){this.s=e,this.G=t===void 0?!1:t},h.Yb=function(e){var t=this.s;return(e===void 0||e)&&this.G&&(this.s=null),t};function Oh(e,t){e.Y=t,e=C(e.g);for(var n=e.next();!n.done;n=e.next())Oh(n.value,t)}Pe("shaka.media.SegmentReference",Fe),Fe.prototype.getSegmentData=Fe.prototype.Yb,Fe.prototype.setSegmentData=Fe.prototype.ge,Fe.prototype.syncAgainst=Fe.prototype.vh,Fe.prototype.offset=Fe.prototype.offset,Fe.prototype.getThumbnailSprite=Fe.prototype.Sj,Fe.prototype.setThumbnailSprite=Fe.prototype.Hf,Fe.prototype.hasByterangeOptimization=Fe.prototype.bk,Fe.prototype.markAsByterangeOptimization=Fe.prototype.ii,Fe.prototype.isLastPartial=Fe.prototype.gk,Fe.prototype.markAsLastPartial=Fe.prototype.ji,Fe.prototype.isPartial=Fe.prototype.hk,Fe.prototype.markAsPartial=Fe.prototype.ki,Fe.prototype.isIndependent=Fe.prototype.fk,Fe.prototype.markAsNonIndependent=Fe.prototype.qd,Fe.prototype.isPreload=Fe.prototype.isPreload,Fe.prototype.markAsPreload=Fe.prototype.Pg,Fe.prototype.markAsUnavailable=Fe.prototype.qk,Fe.prototype.getStatus=Fe.prototype.Cc,Fe.prototype.getTileDuration=Fe.prototype.Uj,Fe.prototype.getTilesLayout=Fe.prototype.Vj,Fe.prototype.getEndByte=Fe.prototype.zc,Fe.prototype.getStartByte=Fe.prototype.Bc,Fe.prototype.getEndTime=Fe.prototype.zj,Fe.prototype.getStartTime=Fe.prototype.getStartTime,Fe.prototype.getUris=Fe.prototype.O;var qo=0,tf=1;Fe.Status={il:qo,rm:tf,Ql:2};function Hs(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function nf(e){return!e||Hs(e)?null:e.length?e.end(e.length-1):null}function Id(e,t){return!e||!e.length||Hs(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Rh(e,t){if(!e||!e.length||Hs(e))return 0;var n=0;e=C(zo(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 Dv(e,t,n){return!e||!e.length||Hs(e)?null:(e=zo(e).findIndex(function(i,r,l){return i.start>t&&(r==0||l[r-1].end-t<=n)}),0<=e?e:null)}function zo(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 ni(){}function gi(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function rf(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;0<=i;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function Ks(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ku(){return Ll||(kd||(kd=new dt(function(){Ll=null})),(Ll=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ll=document.createElement("video")),kd.ia(1),Ll)}function rm(e,t){var n,i,r,l,c;return G(function(f){if(f.g==1)return"fonts"in document&&"FontFace"in x?_(f,document.fonts.ready,2):f.return();if(!("entries"in document.fonts))return f.return();for(n=function(y){y=y.entries();for(var m=[],w=y.next();w.done===!1;)m.push(w.value),w=y.next();return m},i=C(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)})}Pe("shaka.util.Dom",ni),ni.removeAllChildren=Ks,ni.clearSourceFromVideo=rf;var kd=null,Ll=null;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/function of(){}function Mh(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 Nh(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 Dd(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 Ph(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=ln(Ge(e.data,1,n)),r=e.data[2+n],l=e.data.subarray(3+n).indexOf(0);if(l===-1)return null;var c=ln(Ge(e.data,3+n,l)),f;return i==="-->"?f=ln(Ge(e.data,4+n+l)):f=Fi(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=ln(Ge(e.data,1,i)),e=ln(Ge(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=ln(Ge(e.data,1,i)),e=ln(Ge(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=ln(Ge(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=Fi(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=ln(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=ln(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Fi(e.data),t):null}function _l(e){for(var t=0,n=[];Mh(e,t);){var i=Dd(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=Dd(r,4);r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:l,data:r.subarray(10,10+l)},(l=Ph(r))&&n.push(l),t+=r.size+10}Nh(e,t)&&(t+=10)}return n}function Du(e,t){for(var n=t=t===void 0?0:t,i=0;Mh(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=Dd(e,t+6),Nh(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}Pe("shaka.util.Id3Utils",of),of.getID3Data=Du,of.getID3Frames=_l;function Lh(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function So(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=Ge(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Gs(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 Bt(n,0).T(),e.g=8*i,e.i-=i)}function Ei(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Gs(e)}e.h<<=t,e.g-=t}function St(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&&Gs(e),n=t-n,0<n?i<<n|St(e,n):i}function lf(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 Gs(e),t+lf(e)}function Ai(e){Ei(e,1+lf(e))}function Me(e){var t=lf(e);return St(e,t+1)-1}function Ou(e){return e=Me(e),1&e?1+e>>>1:-1*(e>>>1)}function Ke(e){return St(e,1)===1}function Nt(e){return St(e,8)}function qr(e,t){for(var n=8,i=8,r=0;r<t;r++)i!==0&&(i=Ou(e),i=(n+i+256)%256),n=i===0?n:i}function om(e){return Nt(e),Me(e),Me(e)}Pe("shaka.util.ExpGolomb",So);function Vt(){this.H=null,this.I=!1,this.m=this.K=null,this.j=[],this.g=[],this.B=this.C=null,this.i=[],this.h=[],this.F=null,this.l=[],this.A=this.G=this.o=this.s=null}h=Vt.prototype,h.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},h.Ff=function(e){this.A!=null&&this.A!=e&&(this.o=this.s=null),this.A=e},h.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Yo(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.H=(e[f+10]&31)<<8|e[f+11];break;case 17:case 8191:break;case this.H:l&&(f+=e[f]+1),l=e,c={audio:-1,video:-1,Ye:-1,audioCodec:"",videoCodec:""};var y=f+3+((l[f+1]&15)<<8|l[f+2])-4;for(f+=12+((l[f+10]&15)<<8|l[f+11]);f<y;){var m=(l[f+1]&31)<<8|l[f+2],w=(l[f+3]&15)<<8|l[f+4];switch(l[f]){case 6:if(0<w)for(var T=f+5,I=w;2<I;){var D=l[T+1]+2;switch(l[T]){case 5:var M=Ff(l.subarray(T+2,T+D));c.audio==-1&&M==="Opus"?(c.audio=m,c.audioCodec="opus"):c.video==-1&&M==="AV01"&&(c.video=m,c.videoCodec="av1");break;case 106:c.audio==-1&&(c.audio=m,c.audioCodec="ac3");break;case 122:c.audio==-1&&(c.audio=m,c.audioCodec="ec3");break;case 124:c.audio==-1&&(c.audio=m,c.audioCodec="aac");break;case 127:c.audioCodec=="opus"&&(M=null,l[T+2]===128&&(M=l[T+3]),M!=null&&(this.G={channelCount:(M&15)===0?2:M&15,jj:M,sampleRate:48e3}))}T+=D,I-=D}break;case 15:c.audio==-1&&(c.audio=m,c.audioCodec="aac");break;case 17:c.audio==-1&&(c.audio=m,c.audioCodec="aac-loas");break;case 21:c.Ye==-1&&(c.Ye=m);break;case 27:c.video==-1&&(c.video=m,c.videoCodec="avc");break;case 3:case 4:c.audio==-1&&(c.audio=m,c.audioCodec="mp3");break;case 36:c.video==-1&&(c.video=m,c.videoCodec="hvc");break;case 129:c.audio==-1&&(c.audio=m,c.audioCodec="ac3");break;case 132:case 135:c.audio==-1&&(c.audio=m,c.audioCodec="ec3")}f+=w+5}l=c,l.video!=-1&&(this.K=l.video,this.m=l.videoCodec),l.audio!=-1&&(this.C=l.audio,this.B=l.audioCodec),l.Ye!=-1&&(this.F=l.Ye),i&&!this.I&&(i=!1,r=t-188),this.I=!0;break;case this.K: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.C: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.F: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 Ia(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.s==null&&(e.s=r),n.pts=_h(r,e.s),e.s=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=n.pts!=r?_h(i,e.o):i),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}h.zk=function(e){return Et("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Vg(e,{Zd:null,state:null})},h.Vg=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,y=[],m=-1,w=0;for(l==-1&&(m=0,w=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<=m?y.push({data:e.subarray(m+r,T),fullData:e.subarray(m,T),type:w,time:n,state:null}):(l=y.length?y[y.length-1]:t.Zd)&&(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=an(l.data,T),l.fullData=an(l.fullData,T),l.state=0)),f<i?(w=this.m=="hvc"?e[f]>>1&63:e[f]&31,m=f,l=0):l=-1):l=0:l=3:l=T?0:1}return 0<=m&&0<=l&&y.push({data:e.subarray(m+r,i),fullData:e.subarray(m,i),type:w,time:n,state:l}),!y.length&&t.Zd&&(n=y.length?y[y.length-1]:t.Zd)&&(n.data=an(n.data,e),n.fullData=an(n.fullData,e)),t.state=l,y},h.getMetadata=function(){for(var e=[],t=C(this.l),n=t.next();!n.done;n=t.next())n=an.apply(Bn,$(n.value)),(n=Ia(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:_l(n.data),dts:n.dts,pts:n.pts});return e},h.sb=function(){if(this.i.length&&!this.h.length)for(var e=C(this.i),t=e.next();!t.done;t=e.next()){var n=an.apply(Bn,$(t.value)),i=Ia(this,n);t=this.h.length?this.h[this.h.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!t||t.pts!=i.pts&&t.dts!=i.dts)?this.h.push(i):this.h.length&&(n=i?i.data:n)&&(t=this.h.pop(),t.data=an(t.data,n),this.h.push(t))}return this.h},h.Rc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=C(this.j),n=t.next();!n.done;n=t.next()){var i=an.apply(Bn,$(n.value)),r=Ia(this,i);n=this.g.length?this.g[this.g.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?this.g.push(r):this.g.length&&(i=r?r.data:i)&&(n=this.g.pop(),n.data=an(n.data,i),this.g.push(n))}if(e){for(t={Zd:null,state:null},n=[],i=C(this.g),r=i.next();!r.done;r=i.next())r=r.value,r.nalus=this.Vg(r,t),r.nalus.length&&(n.push(r),t.Zd=r.nalus[r.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},h.getStartTime=function(e){if(e=="audio"){e=null;var t=this.sb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.Rc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},h.Od=function(){return{audio:this.B,video:this.m}},h.Xe=function(){for(var e=[],t=C(this.Rc()),n=t.next();!n.done;n=t.next())e.push.apply(e,$(n.value.nalus));return e},h.Yj=function(){Et("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Ig();return{height:e.height,width:e.width}},h.Ig=function(){return this.m=="hvc"?Rv(this):Ov(this)};function Mn(e){var t=e.Rc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function Ov(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||(n=n.find(function(D){return D.type==7}),!n))return t;n=new So(n.data);var i=Nt(n),r=Nt(n),l=Nt(n);if(Ai(n),lm.includes(i)){var c=Me(n);if(c===3&&Ei(n,1),Ai(n),Ai(n),Ei(n,1),Ke(n)){c=c!==3?8:12;for(var f=0;f<c;f++)Ke(n)&&(6>f?qr(n,16):qr(n,64))}}if(Ai(n),c=Me(n),c===0)Me(n);else if(c===1)for(Ei(n,1),Ai(n),Ai(n),c=Me(n),f=0;f<c;f++)Ai(n);Ai(n),Ei(n,1),c=Me(n),f=Me(n);var y=St(n,1);y===0&&Ei(n,1),Ei(n,1);var m=0,w=0,T=0,I=0;return Ke(n)&&(m=Me(n),w=Me(n),T=Me(n),I=Me(n)),t.height=String((2-y)*(f+1)*16-2*T-2*I),t.width=String(16*(c+1)-2*m-2*w),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=Mn(e),t}function Rv(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Xe();if(!n.length||(n=n.find(function(Q){return Q.type==33}),!n))return t;var i=new So(n.fullData,!0);Nt(i),Nt(i),St(i,4);var r=St(i,3);Ke(i);var l=St(i,2),c=St(i,1),f=St(i,5),y=St(i,32);n=Nt(i);for(var m=Nt(i),w=Nt(i),T=Nt(i),I=Nt(i),D=Nt(i),M=Nt(i),L=[],P=[],j=0;j<r;j++)L.push(Ke(i)),P.push(Ke(i));if(0<r)for(j=r;8>j;j++)St(i,2);for(j=0;j<r;j++)L[j]&&St(i,88),P[j]&&Nt(i);Me(i),r=Me(i),r==3&&St(i,1),L=Me(i),P=Me(i);var V=j=0,K=0,q=0;return Ke(i)&&(j+=Me(i),V+=Me(i),K+=Me(i),q+=Me(i)),t.width=String(L-(j+V)*(r===1||r===2?2:1)),t.height=String(P-(K+q)*(r===1?2:1)),i=function(Q){for(var z=0,X=0;32>X;X++)z|=(Q>>X&1)<<31-X;return z>>>0}(y),c=c==1?"H":"L",l="hvc1"+("."+["","A","B","C"][l]+f),l+="."+i.toString(16).toUpperCase(),l+="."+c+M,D&&(l+="."+D.toString(16).toUpperCase()),I&&(l+="."+I.toString(16).toUpperCase()),T&&(l+="."+T.toString(16).toUpperCase()),w&&(l+="."+w.toString(16).toUpperCase()),m&&(l+="."+m.toString(16).toUpperCase()),n&&(l+="."+n.toString(16).toUpperCase()),t.codec=l,t.frameRate=Mn(e),t}function _h(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function Xo(e){return!(0>Yo(e))}function Yo(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}Pe("shaka.util.TsParser",Vt),Vt.syncOffset=Yo,Vt.probe=Xo,Vt.prototype.getVideoInfo=Vt.prototype.Ig,Vt.prototype.getVideoResolution=Vt.prototype.Yj,Vt.prototype.getVideoNalus=Vt.prototype.Xe,Vt.prototype.getCodecs=Vt.prototype.Od,Vt.prototype.getStartTime=Vt.prototype.getStartTime,Vt.prototype.getVideoData=Vt.prototype.Rc,Vt.prototype.getAudioData=Vt.prototype.sb,Vt.prototype.getMetadata=Vt.prototype.getMetadata,Vt.prototype.parseNalus=Vt.prototype.Vg,Vt.prototype.parseAvcNalus=Vt.prototype.zk,Vt.prototype.parse=Vt.prototype.parse,Vt.prototype.setDiscontinuitySequence=Vt.prototype.Ff,Vt.prototype.clearData=Vt.prototype.clearData,Vt.Timescale=9e4;var lm=[100,110,122,244,44,83,86,118,128,138,139,134];function Uh(e,t,n,i,r){var l=this;this.g=e,this.N=n,this.A=i,this.ha=t,this.l=new Map,this.C=new Map,this.Oa=new Map,this.h=null,this.Ka=!1,this.M=r||null,this.o=new Map,this.s=new Mt,this.j=new Map,this.I=null,this.K=new ct,this.za="",this.eb=!1,this.ya=!0,this.L=!1,this.B=this.P=null,this.i=ka(this,this.K),this.Ya=this.F=!1,this.H=new Su(function(){return jh(l)}),this.G=!1,this.W="UNKNOWN",this.Za=this.ab=!1,this.Pa=new ct,this.m=!1,this.wa=null,this.ba=new Map,this.na=this.S=this.va=this.U=null,this.ka=new ct,this.g.remote&&(this.L=this.g.remote.state!="disconnected",this.s.D(this.g.remote,"connect",function(){l.L=l.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"connecting",function(){l.L=l.g.remote.state!="disconnected"}),this.s.D(this.g.remote,"disconnect",function(){l.L=l.g.remote.state!="disconnected"}))}function ka(e,t){if(e.ya=!0,x.ManagedMediaSource){e.B||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.s.D(n,"startstreaming",function(){e.ya=!0}),e.s.D(n,"endstreaming",function(){e.ya=!1})}else n=new MediaSource;return e.s.Aa(n,"sourceopen",function(){URL.revokeObjectURL(e.za),t.resolve()}),e.s.Aa(e.g,"playing",function(){e.eb=!0}),e.za=Pd(n),e.A.useSourceElements?(e.g.removeAttribute("src"),e.P&&e.g.removeChild(e.P),e.B&&e.g.removeChild(e.B),e.P=gi(e.za),e.g.appendChild(e.P),e.B&&e.g.appendChild(e.B),e.g.load()):e.g.src=e.za,n}function Wo(e,t,n){e.g&&x.ManagedMediaSource&&e.i&&e.A.useSourceElements&&(e.B&&e.g.removeChild(e.B),e.B=gi(t,n),e.g.appendChild(e.B),e.g.disableRemotePlayback=!1)}function um(){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",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat($(ar)),t={};yt(),e=C(e);for(var n=e.next();!n.done;n=e.next()){n=n.value,fo(n)?t[n]=!0:t[n]=Fu()?ai(n)||!!Ss(n):ku().canPlayType(n)!="";var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}h=Uh.prototype,h.destroy=function(){return this.H.destroy()};function jh(e){var t,n,i,r,l,c,f,y,m,w,T,I,D,M,L;return G(function(P){if(P.g==1){for(t=[],n=C(e.o),i=n.next();!i.done;i=n.next())for(r=i.value,l=C(r),c=l.next().value,f=l.next().value,y=f[0],m=c,e.o.set(m,f.slice(0,1)),y&&t.push(y.p.catch(po)),w=C(f.slice(1)),T=w.next();!T.done;T=w.next())I=T.value,I.p.reject(new Y(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),_(P,Promise.all(t),2)}for(D=C(e.j.values()),M=D.next();!M.done;M=D.next())L=M.value,L.destroy();e.s&&(e.s.release(),e.s=null),e.g&&e.B&&e.g.removeChild(e.B),e.g&&e.P&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.B=null,e.A=null,e.i=null,e.h=null,e.ha=null,e.l.clear(),e.Oa.clear(),e.j.clear(),e.I=null,e.o.clear(),e.M=null,e.ba.clear(),e.N=null,ce(P)})}h.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,y,m,w;return G(function(T){if(T.g==1)return l=Dn,_(T,r.K,2);if(T.g!=3)return!Qo(r)&&!Da(r)?T.u(3):(ui("Expected MediaSource to be open during init(); reopening the media source."),r.K=new ct,r.i=ka(r,r.K),_(T,r.K,3));for(r.G=t,r.W=n,r.ab=i,r.Za=!r.G&&r.W=="HLS"&&!r.ab,r.ba.clear(),r.U=null,r.va=null,r.S=null,r.na=null,r.ka=new ct,c=C(e.keys()),f=c.next();!f.done;f=c.next())y=f.value,m=e.get(y),uf(r,y,m,m.codecs),r.m?(r.o.set(l.ea,[]),r.o.set(l.Ca,[])):r.o.set(y,[]);(w=e.get(l.ea))&&w.isAudioMuxedInVideo&&(r.m=!0),ce(T)})};function uf(e,t,n,i){t=="audio"&&i&&(i=Yi(i,n.mimeType));var r=xn(n.mimeType,i);if(t==ut)Fs(e,r,e.G,n.external);else{var l=e.A.forceTransmux;(!ai(r)||!e.G&&ar.includes(r))&&(l=!0);var c=Pc(n.mimeType,i);if(l){if(l=Ri("audio",(i||"").split(",")),i=Ri("video",(i||"").split(",")),l&&i){e.m=!0,uf(e,"audio",n,l),uf(e,"video",n,i);return}(i=Ss(c))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,c))}c=r+e.A.addExtraFeaturesToSourceBuffer(r),Pt(e.H);try{var f=e.i.addSourceBuffer(c)}catch(y){throw new Y(2,3,3015,y,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.G&&(f.mode=fm),e.s.D(f,"error",function(){var y=e.o.get(t)[0];y.p.reject(new Y(2,3,3014,e.g.error?e.g.error.code:0,y.uri))}),e.s.D(f,"updateend",function(){return jl(e,t)}),e.l.set(t,f),e.C.set(t,r),e.Oa.set(t,!!n.drmInfos.length)}}h.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function Od(e){return e.ya&&!e.L&&!e.F}function Fs(e,t,n,i){e.h||(e.h=new sr(e.ha),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ka,e=e.W,t=="application/cea-608"||t=="application/cea-708"?r.i=null:(r.i=Lc.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):Et("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):Et("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function Qo(e){return e.F?!1:e.i?e.i.readyState=="ended":!0}function Da(e){return e.F?!1:e.i?e.i.readyState=="closed":!0}function wo(e,t){return e.l.size?t==ut?e=e.h.g:(e=Oa(e,t),e=!e||Hs(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function In(e,t){return e.l.size?t==ut?e.h.h:nf(Oa(e,t)):null}function Bh(e,t,n){return t==ut?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Oa(e,t),Rh(e,n))}h.Nb=function(){var e={total:this.F?[]:zo(this.g.buffered),audio:zo(Oa(this,"audio")),video:zo(Oa(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 Oa(e,t){if(e.F||e.L)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function mi(e,t,n,i,r,l){var c=null,f=[],y=Ge(n);if(ar.includes(l))t=_l(y),t.length&&i&&((n=t.find(function(D){return D.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof n.data=="number"&&(c=Math.round(n.data)/1e3),e.N.onMetadata([{cueTime:i.startTime,data:y,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(l.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var m=i.Y.timescale;if(!isNaN(m)){var w=r.emsgSchemeIdUris!=null&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,T=0,I=!1;y=new Ut,w&&y.R("emsg",function(D){var M=r.emsgSchemeIdUris;if(D.version===0)var L=D.reader.Vc(),P=D.reader.Vc(),j=D.reader.T(),V=D.reader.T(),K=D.reader.T(),q=D.reader.T(),Q=i.startTime+V/j;else j=D.reader.T(),Q=D.reader.yd()/j+i.timestampOffset,V=Q-i.startTime,K=D.reader.T(),q=D.reader.T(),L=D.reader.Vc(),P=D.reader.Vc();D=D.reader.Ub(D.reader.getLength()-D.reader.Ma()),(M&&M.includes(L)||e.A.dispatchAllEmsgBoxes)&&(L=="urn:mpeg:dash:event:2012"?e.N.yk():(M=Q+K/j,e.N.wk({startTime:Q,endTime:M,schemeIdUri:L,value:P,timescale:j,presentationTimeDelta:V,eventDuration:K,id:q,messageData:D}),(L=="https://aomedia.org/emsg/ID3"||L=="https://developer.apple.com/streaming/emsg-id3")&&(j=_l(D),j.length&&e.N.onMetadata([{cueTime:Q,data:D,frames:j,dts:Q,pts:Q}],0,M))))}),y.R("prft",function(D){var M=D.reader,L=D.version;M.T(),D=M.T();var P=M.T();D=1e3*D+P/Math.pow(2,32)*1e3,L===0?M=M.T():(L=M.T(),M=M.T(),M=L*Math.pow(2,32)+M),D=Lh(D),M=new Map().set("detail",{wallClockTime:D,programStartDate:new Date(D-M/m*1e3)}),M=new ke("prft",M),e.N.onEvent(M)}).box("moof",nt).box("traf",nt).R("tfdt",function(D){I||(T=Qc(D.reader,D.version).baseMediaDecodeTime/m,I=!0,w||D.parser.stop())}).parse(n,!0),I&&i.timestampOffset==0&&(c=T)}}else l.includes("/mp4")||l.includes("/webm")||!Xo(y)||(e.ba.has(t)||e.ba.set(t,new Vt),f=e.ba.get(t),f.clearData(),f.Ff(i.i),f.parse(y),y=f.getStartTime(t),y!=null&&(c=y),f=f.getMetadata());return{timestamp:c,metadata:f}}function Rd(e,t,n,i,r,l,c,f,y,m,w){c=c===void 0?!1:c,f=f===void 0?!1:f,y=y===void 0?!1:y,m=m===void 0?!1:m;var T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te;return G(function(ee){switch(ee.g){case 1:if(T=Dn,t!=T.Ta){ee.u(2);break}if(e.W!="HLS"){ee.u(3);break}return _(ee,e.Pa,4);case 4:I=ee.h,e.h.s=I;case 3:return _(ee,Dg(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.O()[0]:null),5);case 5:return ee.return();case 2:if(m||!e.m){ee.u(6);break}return _(ee,Rd(e,T.ea,n,i,r,l,c,f,y,!0),7);case 7:return _(ee,Rd(e,T.Ca,n,i,r,l,c,f,y,!0),8);case 8:return ee.return();case 6:if(!e.l.has(t))return ee.return();if(D=e.l.get(t).timestampOffset,M=e.C.get(t),e.j.has(t)&&(M=e.j.get(t).getOriginalMimeType()),i&&(L=mi(e,t,n,i,r,M),P=L.timestamp,j=L.metadata,P!=null&&(e.U==null&&t==T.Ca&&(e.U=P,e.va=i.startTime,e.S!=null&&(V=0,e.va==e.na&&(V=e.U-e.S),e.ka.resolve(V))),e.S==null&&t==T.ea&&(e.S=P,e.na=i.startTime,e.U!=null&&(K=0,e.va==e.na&&(K=e.U-e.S),e.ka.resolve(K))),q=P,Q=ar,!e.G&&Q.includes(e.C.get(t))&&(q=0),z=i.startTime-q,X=Math.abs(D-z),(.001<=X||c||f)&&(!y||0<z||!D)&&(D=z,e.Za&&(rn(e,t,function(){return Ru(e,t)},null),rn(e,t,function(){return vi(e,t,D)},null))),(t==T.Ca||!e.l.has(T.Ca))&&e.Pa.resolve(D)),j.length)&&e.N.onMetadata(j,D,i?i.endTime:null),l&&t==T.Ca&&(e.h||Fs(e,"application/cea-608",e.G,!1),e.I||(W=M.split(";",1)[0],e.I=new lo(W)),i?(J=e.I.vf(n),J.length&&Cv(e.h,J,i.startTime,i.endTime,D)):e.I.init(n,f,w)),!e.j.has(t)){ee.u(9);break}return _(ee,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=ee.h;case 9:if(n=Vh(e,r,n,i,t),!i||!e.G||t==T.Ta){ee.u(11);break}if(!c&&!f){ee.u(11);break}if(ne=i.startTime,e.W!="HLS"||e.m||t!=T.ea||!e.l.has(T.Ca)){ee.u(13);break}return _(ee,e.ka,14);case 14:te=ee.h,.15<Math.abs(te)&&(ne-=te);case 13:rn(e,t,function(){return Ru(e,t)},null),rn(e,t,function(){return vi(e,t,ne)},null);case 11:return _(ee,rn(e,t,function(){var ge=n;e.M&&qf(e.M,ge,D,r),e.l.get(t).appendBuffer(ge)},i?i.O()[0]:null),15);case 15:ce(ee)}})}function am(e,t){var n=In(e,"video")||0;eh(e.h,t,n)}function sm(e){e.h&&eh(e.h,"",0)}h.remove=function(e,t,n,i){var r=this,l;return G(function(c){return c.g==1?(l=Dn,e==l.Ca&&r.I&&r.I.remove(i),e==l.Ta?_(c,r.h.remove(t,n),0):n>t?_(c,rn(r,e,function(){return Nd(r,e,t,n)},null),5):c.u(0)):r.m?_(c,rn(r,l.ea,function(){return Nd(r,l.ea,t,n)},null),0):c.u(0)})};function Rn(e,t){var n;return G(function(i){return i.g==1?(n=Dn,t==n.Ta?e.h?_(i,e.h.remove(0,1/0),0):i.return():_(i,rn(e,t,function(){return Nd(e,t,0,e.i.duration)},null),4)):e.m?_(i,rn(e,n.ea,function(){return Nd(e,n.ea,0,e.i.duration)},null),0):i.u(0)})}h.flush=function(e){var t=this,n;return G(function(i){return i.g==1?(n=Dn,e==n.Ta?i.return():_(i,rn(t,e,function(){t.g.currentTime-=.001,jl(t,e)},null),2)):t.m?_(i,rn(t,n.ea,function(){var r=n.ea;t.g.currentTime-=.001,jl(t,r)},null),0):i.u(0)})};function Qi(e,t,n,i,r,l,c,f,y){var m,w,T;return G(function(I){return I.g==1?(m=Dn,t==m.Ta?(l||(e.h.s=n),Og(e.h,i,r),I.return()):(w=[],_(I,af(e,t,c,f,y),2))):(T=I.h,T||(w.push(rn(e,t,function(){return Ru(e,t)},null)),e.m&&w.push(rn(e,m.ea,function(){return Ru(e,m.ea)},null))),l||(w.push(rn(e,t,function(){return vi(e,t,n)},null)),e.m&&w.push(rn(e,m.ea,function(){return vi(e,m.ea,n)},null))),(i!=0||r!=1/0)&&(w.push(rn(e,t,function(){return zr(e,t,i,r)},null)),e.m&&w.push(rn(e,m.ea,function(){return zr(e,m.ea,i,r)},null))),w.length?_(I,Promise.all(w),0):I.u(0))})}function Ul(e,t,n){var i,r;return G(function(l){return l.g==1?(i=Dn,t==i.Ta||(t==i.Ca&&(e.Pa=new ct),!e.G||(r=In(e,t))&&.15>Math.abs(r-n))?l.return():(rn(e,t,function(){return Ru(e,t)},null),e.m&&rn(e,i.ea,function(){return Ru(e,i.ea)},null),_(l,rn(e,t,function(){return vi(e,t,n)},null),2))):e.m?_(l,rn(e,i.ea,function(){return vi(e,i.ea,n)},null),0):l.u(0)})}h.endOfStream=function(e){var t=this;return G(function(n){return _(n,qs(t,function(){Qo(t)||Da(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},h.pb=function(e){var t=this;return G(function(n){return _(n,qs(t,function(){if(t.A.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var i=C(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var l={start:function(){},p:new ct,uri:null};t.o.get(r).unshift(l)}t.i.duration=e,t.wa=e}),0)})},h.getDuration=function(){return this.i.duration};function cm(e,t,n){G(function(i){return e.H.g||e.g.error||e.L||e.F||Qo(e)||Da(e)?i.return():_(i,qs(e,function(){Qo(e)||Da(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function Md(e){G(function(t){return e.H.g||e.g.error||e.L||e.F||Qo(e)||Da(e)?t.return():_(t,qs(e,function(){Qo(e)||Da(e)||e.i.clearLiveSeekableRange()}),0)})}function Nd(e,t,n,i){i<=n?jl(e,t):e.l.get(t).remove(n,i)}function Ru(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,jl(e,t)}function vi(e,t,n){0>n&&(n+=.001),e.l.get(t).timestampOffset=n,jl(e,t)}function zr(e,t,n,i){var r=e.l.get(t);(r.appendWindowEnd!==i||r.appendWindowStart!==n)&&(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),jl(e,t)}function jl(e,t){if(e.F||e.H.g){var n=e.o.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.o.set(t,[]))}else(n=e.o.get(t)[0])&&(n.p.resolve(),Jo(e,t))}function rn(e,t,n,i){return Pt(e.H),n={start:n,p:new ct,uri:i},e.o.get(t).push(n),e.o.get(t).length==1&&Mu(e,t),n.p}function qs(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M;return G(function(L){switch(L.g){case 1:for(Pt(e.H),n=[],i=Array.from(e.l.keys()),r=C(i),l=r.next(),c={};!l.done;c={ready:void 0},l=r.next())f=l.value,c.ready=new ct,y={start:function(P){return function(){return P.ready.resolve()}}(c),p:c.ready,uri:null},m=e.o.get(f),m.push(y),n.push(c.ready),m.length==1&&y.start();return he(L,2),_(L,Promise.all(n),4);case 4:_e(L,3);break;case 2:throw w=De(L),w;case 3:return he(L,5,6),_(L,t(),6);case 6:for(xe(L),T=C(i),I=T.next();!I.done;I=T.next())D=I.value,Jo(e,D);Ue(L,0);break;case 5:throw M=De(L),new Y(2,3,3015,M,e.g.error||"No error in the media element",null)}})}function Jo(e,t){e.o.get(t).shift(),Mu(e,t)}function Mu(e,t){var n=e.o.get(t)[0];if(n)try{n.start()}catch(i){i.name=="QuotaExceededError"?n.p.reject(new Y(2,3,3017,t)):Od(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)),Jo(e,t)}}function Nu(e,t){e.ha=t,e.h&&(e.h.j=t)}function Vh(e,t,n,i,r){if(Ts(e.C.get(r))!="mp4")return n;var l=i===null,c=e.Oa.get(r),f=e.N.Ej(),y=!1;i&&i.Y&&(y=i.Y.encrypted),i=i?i.O()[0]:null;var m=yt();return e.A.correctEc3Enca&&l&&r==="audio"&&(n=Pl(n)),e.A.insertFakeEncryptionInInit&&c&&m.fe(f,r)&&(l?n=ci(t,n,i):!y&&m.Bi(r)&&(n=bd(n))),l&&m.ee()&&(n=im(n)),n}function Hh(e,t,n,i){return rn(e,t,function(){if(t!==ut){if(e.C.get(t),na()){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.C.set(t,n)}jl(e,t)}},null)}function Zo(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q;return G(function(z){if(z.g==1){if(e.F||e.L)return z.return();for(n=Dn,e.F=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.Ya=!0),e.eb&&(e.g.autoplay=!1),ot(z,2),e.s.Ra(),l=C(e.j.values()),c=l.next();!c.done;c=l.next())f=c.value,f.destroy();for(y=C(e.l.values()),m=y.next();!m.done;m=y.next()){w=m.value;try{e.i.removeSourceBuffer(w)}catch{}}return e.j.clear(),e.l.clear(),T=e.i.duration,e.K=new ct,e.i=ka(e,e.K),_(z,e.K,4)}if(z.g!=2){for(!isNaN(T)&&T?e.i.duration=T:!isNaN(e.wa)&&e.wa&&(e.i.duration=e.wa),I=new ct,D=e.i.sourceBuffers,M=t.size,L=0,P=function(){L++,L===M&&(I.resolve(),e.s.Ja(D,"addsourcebuffer",P))},e.s.D(D,"addsourcebuffer",P),j=C(t.keys()),V=j.next();!V.done;V=j.next())K=V.value,q=t.get(K),uf(e,K,q,q.codecs);return(Q=t.get(n.ea))&&Q.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.o.has(n.ea)&&e.o.set(n.ea,[]),e.g.currentTime=i,_(z,I,2)}return xe(z),e.F=!1,Pt(e.H),e.s.Aa(e.g,"canplaythrough",function(){e.H.g||(e.g.autoplay=r,e.Ya&&(e.Ya=!1,e.g.play()))}),Ue(z,0)})}function Kh(e,t){return qs(e,function(){return Zo(e,t)})}function Ra(e,t,n,i){var r=!1,l=Ri("audio",(i||"").split(",")),c=Ri("video",(i||"").split(",")),f=c;t=="audio"&&(f=l),f||(f=i),i=xn(n,f);var y=Mi(e.C.get(t)),m=e.A.forceTransmux;if(!ai(i)||!e.G&&ar.includes(i)?m=!0:m||n==y||(m=yt().Da()==="WEBKIT"&&ar.includes(n)),m&&(e=Pc(n,f),n=Ss(e))){var w=n();l&&c&&(r=!0),i=w.convertCodecs(t,e)}return t=Ti(xi(i)),{ec:w,Xk:r,Jh:Mi(i),codec:t,mimeType:i}}function zs(e,t,n,i,r){if(t==ut)return{type:Ma,nf:n,ec:null};var l=Ti(xi(e.C.get(t))),c=Mi(e.C.get(t)),f=Ra(e,t,n,i),y=f.ec,m=f.Xk,w=f.Jh,T=f.codec;f=f.mimeType;var I=!0;return m&&e.C.has("audio")&&(n=Ra(e,"audio",n,i),i=Ti(xi(e.C.get("audio"))),I=Mi(e.C.get("audio")),I=i==n.codec&&I==n.Jh,n.ec&&n.ec.destroy()),l===T&&c===w&&I?{type:Ma,nf:f,ec:y}:(l=!0,(e.m&&!r.has("audio")||m&&y&&!e.j.has(t))&&(l=!1),l&&e.A.codecSwitchingStrategy==="smooth"&&na()?{type:sf,nf:f,ec:y}:(y&&y.destroy(),{type:Ld,nf:f,ec:null}))}function af(e,t,n,i,r){var l,c,f,y,m,w;return G(function(T){return T.g==1?(l=Dn,c=zs(e,t,n,i,r),f=c.type,y=c.ec,m=c.nf,(w=r.get(l.ea))&&(e.m=w.isAudioMuxedInVideo),f==Ma?(e.j.has(t)&&!y?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&y?e.j.set(t,y):y&&(e.j.has(t)&&e.j.get(t).transmux!==y.transmux?(e.j.get(t).destroy(),e.j.set(t,y)):y.destroy()),T.return(!1)):f==sf?_(T,Hh(e,t,m,y),3):f!=Ld?T.u(3):(y&&y.destroy(),_(T,Kh(e,r),3))):T.return(!0)})}function Xs(e,t,n,i,r){return e=zs(e,t,n,i,r),e.ec&&e.ec.destroy(),e.type==Ld}var Pd=x.URL.createObjectURL,fm="sequence",Ma="none",Ld="reset",sf="changeType";function qe(e,t,n){this.i=e,this.C=t,this.s=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.o=!1,this.m=e}h=qe.prototype,h.getDuration=function(){return this.l},h.Hj=function(){return this.h},h.Li=function(e){this.i=e},h.pb=function(e){this.l=e},h.Nj=function(){return this.i},h.Ki=function(e){this.A=e},h.Zc=function(e){e&&!this.B&&(this.I=!0),this.B=e},h.Gf=function(e){this.s=e},h.We=function(){return this.s},h.lh=function(e){this.C=e},h.yj=function(){return this.C},h.si=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.pf(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.o&&(this.i=n-this.g-this.h)}}},h.$d=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=C(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.pf(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.o&&(this.i=i-this.g-this.h)}},h.ri=function(e,t){this.pf(e),t==1/0||this.V()||(this.g=Math.max(this.g,t))},h.Ij=function(){return this.g},h.hf=function(){this.o=!0},h.ik=function(){return this.o},h.mh=function(e){this.m=e},h.Dj=function(){return this.m},h.pf=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},h.Rg=function(e){this.h=Math.max(this.h,e)},h.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},h.V=function(){return this.l==1/0&&!this.B},h.Tc=function(){return this.l!=1/0&&!this.B},h.Gb=function(){return Math.max(this.H,this.Ac()-this.s)},h.Ni=function(e){this.H=e},h.Ac=function(){return this.V()||this.Tc()?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},h.Qd=function(e){var t=Math.max(this.j,this.H);return this.s==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Ac()-this.s+e,this.Fb()))},h.Xb=function(){return this.Qd(0)},h.Fb=function(){return Math.max(0,this.Ac()-(this.V()||this.Tc()?this.C:0))},h.Zi=function(){return!(this.i==null||this.g!=null&&this.F)},h.Ji=function(e){this.G=e},h.tj=function(){return this.G},Pe("shaka.media.PresentationTimeline",qe),qe.prototype.getAvailabilityTimeOffset=qe.prototype.tj,qe.prototype.setAvailabilityTimeOffset=qe.prototype.Ji,qe.prototype.usingPresentationStartTime=qe.prototype.Zi,qe.prototype.getSeekRangeEnd=qe.prototype.Fb,qe.prototype.getSeekRangeStart=qe.prototype.Xb,qe.prototype.getSafeSeekRangeStart=qe.prototype.Qd,qe.prototype.getSegmentAvailabilityEnd=qe.prototype.Ac,qe.prototype.setUserSeekStart=qe.prototype.Ni,qe.prototype.getSegmentAvailabilityStart=qe.prototype.Gb,qe.prototype.isInProgress=qe.prototype.Tc,qe.prototype.isLive=qe.prototype.V,qe.prototype.offset=qe.prototype.offset,qe.prototype.notifyMaxSegmentDuration=qe.prototype.Rg,qe.prototype.notifyMinSegmentStartTime=qe.prototype.pf,qe.prototype.getInitialProgramDateTime=qe.prototype.Dj,qe.prototype.setInitialProgramDateTime=qe.prototype.mh,qe.prototype.isStartTimeLocked=qe.prototype.ik,qe.prototype.lockStartTime=qe.prototype.hf,qe.prototype.getMaxSegmentEndTime=qe.prototype.Ij,qe.prototype.notifyPeriodDuration=qe.prototype.ri,qe.prototype.notifySegments=qe.prototype.$d,qe.prototype.notifyTimeRange=qe.prototype.si,qe.prototype.getDelay=qe.prototype.yj,qe.prototype.setDelay=qe.prototype.lh,qe.prototype.getSegmentAvailabilityDuration=qe.prototype.We,qe.prototype.setSegmentAvailabilityDuration=qe.prototype.Gf,qe.prototype.setStatic=qe.prototype.Zc,qe.prototype.setClockOffset=qe.prototype.Ki,qe.prototype.getPresentationStartTime=qe.prototype.Nj,qe.prototype.setDuration=qe.prototype.pb,qe.prototype.setPresentationStartTime=qe.prototype.Li,qe.prototype.getMaxSegmentDuration=qe.prototype.Hj,qe.prototype.getDuration=qe.prototype.getDuration;function Gh(e,t,n,i){var r=this;this.s=i,this.g=e,this.B=t,this.h=n,this.o=new Mt,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=Sn(this),this.A=!1,this.o.D(e,"waiting",function(){return cf(r)}),this.i=new dt(function(){cf(r)}).Fa(this.h.gapJumpTimerTime)}Gh.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.s=null},Gh.prototype.tf=function(){this.A=!0,this.i&&this.i.Fa(this.h.gapJumpTimerTime),cf(this)};function cf(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.h,i=nn(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.i=!1),r=l-t.l,(i=r>=t.o&&i&&!t.i)&&(t.j&&t.j(t.g,r),t.i=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,n=e.g.buffered,i=Dv(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.Fb()||.001>r-t||(i!=0&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.C++,e.s(new ke("gapjumped")))))}}}function Sn(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new En(new Ft(e.g),t,function(){var i;return G(function(r){if(r.g==1)return i=zo(e.g.buffered),i.length?n?(e.g.currentTime+=n,r.u(2)):_(r,e.g.play(),3):r.return();if(r.g!=2){if(!e.g)return r.return();e.g.pause(),e.g.play()}e.G++,e.s(new ke("stalldetected")),ce(r)})})}function En(e,t,n){this.h=e,this.m=nn(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}En.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null};function Ft(e){var t=this;this.g=e,this.h=new Mt,this.i=!1,this.h.D(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.D(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.D(this.g,"audiofocuslost",function(){t.i=!0})}function nn(e){if(e.g.paused||e.g.playbackRate==0||e.i||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=C(zo(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}Ft.prototype.release=function(){this.h&&this.h.release(),this.h=null};function on(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=Dr.value().get(t),n.Aa(e,t,i))}var Dr=new Jn(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bl(e,t,n,i){var r=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return r.l==null&&(r.l=i()),r.l},this.o=!1,this.h=new Mt,this.i=new Vl(e),on(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){$o(r,r.j())})}Bl.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 Pu(e){return e.o?e.g.currentTime:e.j()}function _d(e,t){0<e.g.readyState?Lu(e.i,t):on(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){$o(e,e.j())})}function $o(e,t){.001>Math.abs(e.g.currentTime-t)?_n(e):(e.h.Aa(e.g,"seeking",function(){_n(e)}),Lu(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function _n(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.s(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 dt(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 Lu(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Fa(.1)}function Ud(e){this.g=e,this.i=!1,this.h=null,this.j=new Mt}h=Ud.prototype,h.ready=function(){function e(){if(t.h==null||t.h==0&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,i=null;if(typeof t.h=="number")i=t.h;else if(t.h instanceof Date){var r=Or(t);r!==null&&(i=t.h.getTime()/1e3-r,i=Na(t,i))}i==null?t.i=!0:(0>i&&(i=Math.max(0,n+i)),n!=i?(t.j.Aa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=i):t.i=!0)}}var t=this;on(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){e()})},h.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},h.Vf=function(e){this.h=this.i?this.h:e},h.De=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=e.getTime()/1e3-(Or(this)||0),e=Na(this,e)),e||0},h.Eh=function(){return 0},h.Dh=function(){return 0},h.pi=function(){},h.ci=function(){var e=nf(this.g.buffered);return e!=null&&e>=this.g.duration-1};function Or(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Na(e,t){return e=e.g.seekable,0<e.length&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function Ys(e,t,n,i,r,l){var c=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.s=r,this.o=null,this.j=new Gh(e,t.presentationTimeline,n,l),this.i=new Bl(e,function(){e:{var f=c.j;f.l=!0,f.A=!1,f.i&&f.i.Fa(f.h.gapJumpTimerTime),cf(f);var y=Pu(c.i);if(f=Bd(c,y),!ia()&&.001<Math.abs(f-y)){y=!1;var m=yt().Gi();if(m){var w=Date.now()/1e3;(!c.o||c.o<w-m)&&(c.o=w,y=!0)}else y=!0;if(y){_d(c.i,f),f=void 0;break e}}c.s(),f=void 0}return f},function(f){var y=c.j;y.g.seeking&&!y.l&&(y.l=!0,y.j=f),y.i&&y.i.Fa(y.h.gapJumpTimerTime),cf(y)},function(){return Ji(c,i)}),this.m=new dt(function(){if(c.h.readyState!=0&&!c.h.paused){var f=Pu(c.i),y=c.g.Xb(),m=c.g.Fb();3>m-y&&(y=m-3),f<y&&(f=Bd(c,f),c.h.currentTime=f)}})}h=Ys.prototype,h.ready=function(){this.m.Fa(.25)},h.release=function(){this.i&&(this.i.release(),this.i=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.h=this.i=this.g=this.l=null,this.s=function(){}},h.Vf=function(e){_d(this.i,Ji(this,e))},h.De=function(){var e=Pu(this.i);return 0<this.h.readyState&&!this.h.paused?ff(this,e):e},h.Eh=function(){return this.j.G},h.Dh=function(){return this.j.C};function Ji(e,t){return t==null?t=1/0>e.g.getDuration()?e.g.Xb():e.g.Fb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):0>t&&(t=e.g.Fb()+t),jd(e,ff(e,t))}h.pi=function(){this.j.tf()},h.ci=function(){if(this.g.V()){var e=this.g.Ac(),t=nf(this.h.buffered);if(t!=null&&t>=e)return!0}return!1};function jd(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Bd(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Xb(),l=e.g.Fb(),c=e.g.getDuration();3>l-r&&(r=l-3);var f=e.g.Qd(n),y=e.g.Qd(i);return n=e.g.Qd(n+i),t>=c?jd(e,t):t>l?l-e.l.safeSeekEndOffset:t<r?e.g.V()&&e.l.returnToEndOfLiveWindowWhenOutside?l-e.l.safeSeekEndOffset:Id(e.h.buffered,y)?y:n:t>=f||Id(e.h.buffered,t)?t:n}function ff(e,t){var n=e.g.Xb();return t<n?n:(e=e.g.Fb(),t>e?e:t)}function At(e){this.g=e,this.m=null,this.i=0,this.o=!1}h=At.prototype,h.getNumReferences=function(){return this.g.length},h.getNumEvicted=function(){return this.i},h.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},h.rk=function(){this.o=!0},h.Eb=function(e){for(var t=C(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Si(e){return e.g[0]||null}h.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},h.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},h.offset=function(e){if(!this.o)for(var t=C(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},h.kf=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,$(e))}},h.Yd=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.kf(e),this.$a(t)},h.$a=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}},h.ld=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 Fe(e.startTime,t,e.C,e.startByte,e.endByte,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)}},h.Lf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new dt(function(){var i=t();i?n.g.push.apply(n.g,$(i)):(n.m.stop(),n.m=null)}),this.m.Fa(e))},At.prototype[Symbol.iterator]=function(){return this.Wb(0)},At.prototype.Wb=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 ui("No independent partial segment found!"),null}n?i--:i++,l=c-1;break}}return new ri(this,i,l,n)},At.prototype.Pe=function(){return-1};function ii(e,t,n){return e=new Fe(e,e+t,function(){return n},0,null,null,e,e,e+t),new At([e])}Pe("shaka.media.SegmentIndex",At),At.forSingleSegment=ii,At.prototype.getIteratorForTime=At.prototype.Wb,At.prototype.updateEvery=At.prototype.Lf,At.prototype.fit=At.prototype.ld,At.prototype.evict=At.prototype.$a,At.prototype.mergeAndEvict=At.prototype.Yd,At.prototype.offset=At.prototype.offset,At.prototype.get=At.prototype.get,At.prototype.find=At.prototype.find,At.prototype.markImmutable=At.prototype.rk,At.prototype.release=At.prototype.release,At.prototype.getNumEvicted=At.prototype.getNumEvicted,At.prototype.getNumReferences=At.prototype.getNumReferences;function ri(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}h=ri.prototype,h.Dd=function(e){this.reverse=e},h.oj=function(){return this.h},h.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},h.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}},h.dh=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]},Pe("shaka.media.SegmentIterator",ri),ri.prototype.resetToLastIndependent=ri.prototype.dh,ri.prototype.next=ri.prototype.next,ri.prototype.current=ri.prototype.current,ri.prototype.currentPosition=ri.prototype.oj,ri.prototype.setReverse=ri.prototype.Dd;function Jt(){At.call(this,[]),this.h=[]}$e(Jt,At),h=Jt.prototype,h.clone=function(){var e=new Jt;return e.h=this.h.slice(),e.i=this.i,e},h.release=function(){for(var e=C(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},h.Eb=function(e){for(var t=C(this.h),n=t.next();!n.done;n=t.next())n.value.Eb(e)};function Ws(e,t){e=C(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}h.find=function(e){for(var t=this.i,n=C(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};function Fh(e,t){e=C(e.h);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.find(t)!=null)return n.Pe();return-1}h.get=function(e){for(var t=this.i,n=C(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},h.offset=function(){},h.kf=function(){},h.$a=function(e){for(var t=C(this.h),n=t.next();!n.done;n=t.next())n.value.$a(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},h.Yd=function(){},h.ld=function(){},h.Lf=function(){},Pe("shaka.media.MetaSegmentIndex",Jt),Jt.prototype.updateEvery=Jt.prototype.Lf,Jt.prototype.fit=Jt.prototype.ld,Jt.prototype.mergeAndEvict=Jt.prototype.Yd,Jt.prototype.evict=Jt.prototype.$a,Jt.prototype.merge=Jt.prototype.kf,Jt.prototype.offset=Jt.prototype.offset,Jt.prototype.get=Jt.prototype.get,Jt.prototype.find=Jt.prototype.find,Jt.prototype.forEachTopLevelReference=Jt.prototype.Eb,Jt.prototype.release=Jt.prototype.release;function Pa(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Ve(),this.h=new dt(function(){t.g.ni(.25*t.i)})}Pa.prototype.release=function(){this.set(this.Pc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Pa.prototype.set=function(e){this.i=e,Vd(this)},Pa.prototype.Pc=function(){return this.g.Pc()};function Vd(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.Ve()!=t&&e.g.nh(t);return}catch{}e.h.Fa(.25),e.g.Ve()!=0&&e.g.nh(0)}function La(e){var t=this;this.j=e,this.h=new Mt,this.g=new Set,this.i=new dt(function(){Hd(t,!1)}).Jb(),e.paused||this.i.Fa(.25),this.h.D(e,"playing",function(){t.i.Jb().Fa(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}La.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=C(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function Hd(e,t){var n=e.j.currentTime;e=C(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function Ui(e){It.call(this),this.g=new Map,this.h=e}$e(Ui,It),Ui.prototype.release=function(){this.g.clear(),It.prototype.release.call(this)};function dm(e,t){var n=e.g.get(t);return n||(n={ce:[],lg:null,contentType:t},e.g.set(t,n)),n}function Rr(e,t,n){var i=dm(e,t.contentType);pm(e,i),e={rd:t,position:n},i=i.ce,t=i.findIndex(function(r){return r.position>=n}),0<=t?i.splice(t,i[t].position==n?1:0,e):i.push(e)}Ui.prototype.j=function(e){for(var t=C(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var i=n.lg;e:{for(var r=n.ce,l=r.length-1;0<=l;l--){var c=r[l];if(c.position<=e){r=c.rd;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&&!wr(i.roles,r.roles),(c||f||i)&&qh(this,e,r.contentType)&&(n.lg=r,i=new ke("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),l&&qh(this,e,r.contentType)&&(n.lg=r,JSON.stringify(r),n=new ke("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}};function qh(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function pm(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.ce;t.ce=r.filter(function(l,c){return!(l.position<=n&&c+1<r.length&&r[c+1].position<=n||l.position>=i)})}else t.ce=[]}function Kd(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 Xr(e){It.call(this),this.h=new Map,this.i=e,this.g=null}$e(Xr,It),Xr.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),It.prototype.release.call(this)};function Qs(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 ke("regionadd",new Map([["region",t]])),e.dispatchEvent(t),zh(e))}function zh(e){e.g||(e.g=new dt(function(){for(var t=e.i(),n=C(e.h),i=n.next();!i.done;i=n.next()){var r=C(i.value);i=r.next().value,r=r.next().value,r.endTime<t.start&&(e.h.delete(i),i=new ke("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Fa(2))}function Hl(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 hm(e,t){e.l=t,e=C(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function Js(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Wb(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.endByte!=null&&(i=!1),n.Cc()==2&&(i=!1),n.Yb(!1)&&(i=!1),i&&n.Y&&t.push(Xh(e,n.Y)),i&&!e.h.has(n)&&(i=new Fd(e.l),t.push(_a(i,n,e.i)),e.h.set(n,i))}return Yh(e),Promise.all(t)}function Xh(e,t){if(!e.i.segmentIndex||t.Yb()||Array.from(e.j.keys()).some(function(r){return Iu(r,t)}))return Promise.resolve();var n=new Fd(e.l),i=_a(n,t,e.i);return e.j.set(t,n),i}function Gd(e,t){t=C(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&Zs(e,n)}function Mr(e){Gd(e,e.h),Gd(e,e.j),e.g=null}Hl.prototype.$a=function(e,t){t=t===void 0?!1:t;for(var n=C(this.h.keys()),i=n.next();!i.done;i=n.next())i=i.value,e>i.endTime&&Zs(this,i);t&&Yh(this)},Hl.prototype.Dd=function(e){this.o=e,this.g&&this.g.Dd(e)};function Yh(e){for(var t=Array.from(e.h.keys()),n=C(e.j.keys()),i=n.next(),r={};!i.done;r={Lg:void 0},i=n.next())r.Lg=i.value,t.some(function(l){return function(c){return Iu(c.Y,l.Lg)}}(r))||Zs(e,r.Lg)}function ym(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&Zs(e,i)}Yh(e)}function Mv(e,t){t&&t!==e.i&&(Mr(e),e.i=t)}function Zs(e,t){var n=e.h;t instanceof Kn&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function Fd(e){this.g=e,this.ae=this.sh=null}function _a(e,t,n){var i=new Uint8Array(0);return e.ae=e.g(t,n,function(r){return G(function(l){if(l.g==1)return 0<i.byteLength?i=an(i,r):i=r,e.sh?_(l,e.sh(i),3):l.u(0);i=new Uint8Array(0),ce(l)})}),e.ae.promise.catch(function(r){return r instanceof Y&&r.code==7001?Promise.resolve():Promise.reject(r)})}Fd.prototype.abort=function(){this.ae&&this.ae.abort()};function $s(e){var t=Mi(e),n=t.split("/")[0];return e=xi(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,oe:null,colorGamut:null,frameRate:null}}function gm(e,t,n){function i(X){j=X.name;var W=X.reader;W.skip(24);var J=W.Ba(),ne=W.Ba();W.skip(50),I=String(J),T=String(ne),X.reader.Ga()&&nt(X)}function r(X){var W=xd(X.reader);D=W.channelCount,M=W.sampleRate,l(X.name)}function l(X){switch(X=X.toLowerCase(),X){case"avc1":case"avc3":f.push(X+".42E01E"),m=!0;break;case"hev1":case"hvc1":f.push(X+".1.6.L93.90"),m=!0;break;case"dvh1":case"dvhe":f.push(X+".05.04"),m=!0;break;case"vp09":f.push(X+".00.10.08"),m=!0;break;case"av01":f.push(X+".0.01M.08"),m=!0;break;case"mp4a":c.push("mp4a.40.2"),y=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":c.push(X),y=!0;break;case"apac":c.push("apac.31.00"),y=!0}}var c=[],f=[],y=!1,m=!1,w=null,T=null,I=null,D=null,M=null,L=null,P=null,j;if(new Ut().box("moov",nt).box("trak",nt).box("mdia",nt).R("mdhd",function(X){w=Jc(X.reader,X.version).language}).box("minf",nt).box("stbl",nt).R("stsd",Gr).box("mp4a",function(X){var W=xd(X.reader);D=W.channelCount,M=W.sampleRate,X.reader.Ga()?nt(X):l(X.name)}).box("esds",function(X){X=X.reader;for(var W="mp4a",J,ne;X.Ga();){J=X.X();for(var te=X.X();te&128;)te=X.X();if(J==3)X.Ba(),te=X.X(),te&128&&X.Ba(),te&64&&X.skip(X.X()),te&32&&X.Ba();else if(J==4)ne=X.X(),X.skip(12);else if(J==5)break}ne&&(W+="."+ba(ne),J==5&&X.Ga()&&(J=X.X(),ne=(J&248)>>3,ne===31&&X.Ga()&&(ne=32+((J&7)<<3)+((X.X()&224)>>5)),W+="."+ne)),c.push(W),y=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(X){var W=j||"";switch(j){case"dvav":W="avc3";break;case"dva1":W="avc1"}X=X.reader,X.skip(1),X=W+"."+ba(X.X())+ba(X.X())+ba(X.X()),f.push(X),m=!0}).box("hvcC",function(X){var W=j||"";switch(j){case"dvh1":W="hvc1";break;case"dvhe":W="hev1"}var J=X.reader;J.skip(1),X=J.X();var ne=["","A","B","C"][X>>6],te=X&31,ee=J.T(),ge=(X&32)>>5?"H":"L";X=[J.X(),J.X(),J.X(),J.X(),J.X(),J.X()],J=J.X();for(var fe=0,le=0;32>le&&(fe|=ee&1,le!=31);le++)fe<<=1,ee>>=1;for(W=W+("."+ne+te)+("."+ba(fe,!0)),W+="."+ge+J,ne="",te=X.length;te--;)((ge=X[te])||ne)&&(ne="."+ge.toString(16).toUpperCase()+ne);W+=ne,f.push(W),m=!0}).box("dvcC",function(X){var W=j||"";switch(j){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 J=X.reader;J.skip(2),X=J.X(),J=J.X(),f.push(W+"."+_i(X>>1&127)+"."+_i(X<<5&32|J>>3&31)),m=!0}).box("dvvC",function(X){var W=j||"";switch(j){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 J=X.reader;J.skip(2),X=J.X(),J=J.X(),f.push(W+"."+_i(X>>1&127)+"."+_i(X<<5&32|J>>3&31)),m=!0}).R("vpcC",function(X){var W=j||"",J=X.reader;X=J.X();var ne=J.X();J=J.X()>>4&15,f.push(W+"."+_i(X)+"."+_i(ne)+"."+_i(J)),m=!0}).box("av1C",function(X){var W=j||"";switch(j){case"dav1":W="av01"}var J=X.reader;J.skip(1),X=J.X(),J=J.X();var ne=X>>>5,te=(J&64)>>6;f.push(W+"."+ne+"."+_i(X&31)+(J>>>7?"H":"M")+"."+_i(ne===2&&te?(J&32)>>5?12:10:te?10:8)+"."+((J&16)>>4)+"."+((J&8)>>3)+((J&4)>>2)+(J&3)+"."+_i(1)+"."+_i(1)+"."+_i(1)+".0"),m=!0}).box("enca",Ms).box("encv",Li).box("sinf",nt).box("frma",function(X){X=Ed(X.reader).codec,l(X)}).box("colr",function(X){f=f.map(function(ne){if(ne.startsWith("av01.")){var te=X.reader,ee=te.Ma(),ge=te.Ub(4),fe=String.fromCharCode(ge[0]);if(fe+=String.fromCharCode(ge[1]),fe+=String.fromCharCode(ge[2]),fe+=String.fromCharCode(ge[3]),fe==="nclx"){ge=te.Ba(),fe=te.Ba();var le=te.Ba(),pe=te.X()>>7,Ee=ne.split(".");Ee.length==10&&(Ee[6]=_i(ge),Ee[7]=_i(fe),Ee[8]=_i(le),Ee[9]=String(pe),ne=Ee.join("."))}te.seek(ee)}return ne});var W=Wg(X.reader),J=W.colorGamut;L=W.oe,P=J}).parse(e||t,!0,!0),!c.length&&!f.length)return null;var V=y&&!m,K=new Map;if(m&&!n){n=new lo("video/mp4"),e&&n.init(e);try{n.vf(t);for(var q=C(n.Uf()),Q=q.next();!Q.done;Q=q.next()){var z=Q.value;K.set(z,z)}}catch{}n.Fd()}return{type:V?"audio":"video",mimeType:V?"audio/mp4":"video/mp4",codecs:qd(c.concat(f)).join(", "),language:w,height:T,width:I,channelCount:D,sampleRate:M,closedCaptions:K,oe:L,colorGamut:P,frameRate:null}}function qd(e){var t=new Set,n=[];e=C(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=xr(i);t.has(r)||(n.push(i),t.add(r))}return t=ss("audio",n),i=ss("video",n),e=ss(ut,n),i=mm(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function mm(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?ai('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function vm(e){var t=null;return new Ut().box("moov",nt).box("trak",nt).box("mdia",nt).box("minf",nt).box("stbl",nt).R("stsd",Gr).box("encv",Li).box("enca",Ms).box("sinf",nt).box("schi",nt).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=oo(n.Ub(16))}).parse(e,!0),t}function zd(e,t,n){var i,r,l,c,f;return G(function(y){if(y.g==1)return i=t,i.cryptoKey?y.u(2):_(y,i.fetchKey(),3);if(r=i.iv,!r)for(r=Ge(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},y.return(x.crypto.subtle.decrypt(f,i.cryptoKey,e))})}function ec(e,t,n,i,r){return e=bn(e,i,r),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function df(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.K=new Map,this.C=1,this.A=this.o=null,this.P=0,this.h=new Map,this.I=!1,this.S=null,this.B=!1,this.l=new Su(function(){return Sm(n)}),this.M=Date.now()/1e3,this.m=new Map,this.N={projection:null,hfov:null},this.W=0,this.U=1/0,this.F=null,this.L=[],this.s=new dt(function(){if(n.j&&n.g)if(n.j.presentationTimeline.V()){var i=n.j.presentationTimeline.Xb(),r=n.j.presentationTimeline.Fb();1<r-i?cm(n.g.Z,i,r):Md(n.g.Z)}else Md(n.g.Z),n.s&&n.s.stop();else n.s&&n.s.stop()}),this.G=null,this.H=new dt(function(){var i=n.g.video;!i.ended&&n.G&&(i.currentTime=n.G,n.G=null)})}h=df.prototype,h.destroy=function(){return this.l.destroy()};function Sm(e){var t,n,i,r,l,c,f;return G(function(y){if(y.g==1){for(e.s&&e.s.stop(),e.s=null,e.H&&e.H.stop(),e.H=null,t=[],n=C(e.h.values()),i=n.next();!i.done;i=n.next())r=i.value,Nr(r),t.push(ic(r)),r.$&&(Mr(r.$),r.$=null);for(l=C(e.m.values()),c=l.next();!c.done;c=l.next())f=c.value,Mr(f);return _(y,Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.G=null,ce(y)})}h.configure=function(e){if(this.i=e,this.S=new Pg({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.h.get("audio");t&&t.$&&(Mr(t.$),t.$=null),t=C(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Mr(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(ut))&&t.$&&(Mr(t.$),t.$=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.$&&(Mr(t.$),t.$=null),t=C(this.h.keys()),n=t.next();!n.done;n=t.next())n=this.h.get(n.value),n.$?(ym(n.$,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(Mr(n.$),n.$=null)):0<e.segmentPrefetchLimit&&(n.$=Gl(this,n.stream));e.disableAudioPrefetch||el(this)};function wm(e,t,n){e.j.presentationTimeline.V()||(e.W=t,e.U=n)}h.start=function(e){var t=this;return G(function(n){if(n.g==1)return _(n,Yd(t,e||new Map),2);Pt(t.l),t.I=!0,ce(n)})};function An(e,t){var n,i,r,l,c,f;G(function(y){switch(y.g){case 1:return n=Dn,e.P++,i=e.P,he(y,2),_(y,Rn(e.g.Z,n.Ta),4);case 4:_e(y,3);break;case 2:r=De(y),e.g&&e.g.onError(r);case 3:l=xn(t.mimeType,t.codecs),Fs(e.g.Z,l,e.j.sequenceMode,t.external),c=e.g.Z.ha,(c.isTextVisible()||e.i.alwaysStreamText)&&e.P==i&&(f=tc(e,t),e.h.set(n.Ta,f),Ci(e,f,0)),ce(y)}})}function Wh(e){var t=e.h.get(ut);t&&(Nr(t),ic(t).catch(function(){}),e.F=e.h.get(ut),e.h.delete(ut),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.A=null}function Tm(e,t){for(var n=0>e.g.ub(),i=C(e.h.values()),r=i.next();!r.done;r=i.next())r=r.value,r.sa&&r.sa.Dd(n),r.$&&r.$.Dd(n);for(i=C(e.m.values()),r=i.next();!r.done;r=i.next())r.value.Dd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Fc&&(Kl(e,t,!1,0,!1),n.Fc=i):(t=n.Fc)&&(n.Fc=null,Kl(e,t,!0,0,!1)))}function Qh(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.o=t,e.I&&(t.video&&Kl(e,t.video,n,i,r,l),t.audio&&Kl(e,t.audio,n,i,r,l))}function Xd(e,t){G(function(n){if(n.g==1)return e.F=null,e.A=t,e.I?t.segmentIndex?n.u(2):_(n,t.createSegmentIndex(),2):n.return();Kl(e,t,!0,0,!1),ce(n)})}function Nv(e){var t=e.h.get(ut);t&&Kl(e,t.stream,!0,0,!0)}function Pv(e,t){for(var n=C(e.K.entries()),i=n.next();!i.done;i=n.next()){var r=C(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.K.delete(i))}}function Kl(e,t,n,i,r,l){var c=e.h.get(t.type);c||t.type!=ut?c&&(c.Fc&&(t.trickModeVideo?(c.Fc=t,t=t.trickModeVideo):c.Fc=null),c.stream!=t||r)&&(e.m.has(t)?c.$=e.m.get(t):c.$&&Mv(c.$,t),t.type==ut&&c.stream!=t&&(r=xn(t.mimeType,t.codecs),Fs(e.g.Z,r,e.j.sequenceMode,t.external)),!e.m.has(c.stream)&&c.stream.closeSegmentIndex&&(c.Qa?(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.sa=null,c.ag=!!l,t.dependencyStream?c.yc=tc(e,t.dependencyStream):c.yc=null,r&&(c.mb=null,c.lc=null,c.kc=null,t.isAudioMuxedInVideo&&(t=null,c.type==="video"?t=e.h.get("audio"):c.type==="audio"&&(t=e.h.get("video")),t&&(ic(t).catch(function(){}),t.mb=null,t.lc=null,t.kc=null,ja(e,t),Ua(e,t).catch(function(f){e.g&&e.g.onError(f)})))),n?c.Kc?c.Sf=!0:c.Qa?(c.Ic=!0,c.Oe=i,c.Sf=!0):(Nr(c),$h(e,c,!0,i).catch(function(f){e.g&&e.g.onError(f)})):c.Qa||c.zb||Ci(e,c,0),Ua(e,c).catch(function(f){e.g&&e.g.onError(f)})):An(e,t)}function Ua(e,t){var n,i,r;return G(function(l){if(l.g==1)return t.Hb?(n=t.stream,i=t.Hb,n.segmentIndex?l.u(2):_(l,n.createSegmentIndex(),2)):l.return();if(l.g!=4)return r=n.dependencyStream,!r||r.segmentIndex?l.u(4):_(l,r.createSegmentIndex(),4);if(t.Hb!=i||t.stream!=n)return l.return();var c=e.g.Qc(),f=In(e.g.Z,t.type),y=t.stream.segmentIndex.find(t.Ia?t.Ia.endTime:c),m=y==null?null:t.stream.segmentIndex.get(y);y=m&&m.endByte?m.endByte-m.startByte:null,m&&!y&&(y=(m.endTime-m.getStartTime())*(t.stream.bandwidth||0)/8),y?((m=m.Y)&&(y+=(m.endByte?m.endByte-m.startByte:null)||0),m=e.g.getBandwidthEstimate(),c=8*y/m<(f||0)-c-e.i.rebufferingGoal||t.Hb.h.g>y):c=!1,c&&t.Hb.abort(),ce(l)})}h.Yc=function(){if(this.g){for(var e=this.g.Qc(),t=C(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.Z;if(i==ut?(r=r.h,r=r.g==null||r.h==null?!1:e>=r.g&&e<r.h):(r=Oa(r,i),r=Id(r,e)),!r){if(this.M=0,n.$&&(n.$.g=null),n.type==="audio"){r=C(this.m.values());for(var l=r.next();!l.done;l=r.next())l.value.g=null}n.sa=null,(In(this.g.Z,i)!=null||n.Qa)&&ja(this,n),n.Hb&&(n.Hb.abort(),n.Hb=null),i===ut&&(i=this.g.Z,i.I&&i.I.Fd()),n.Yc=!0}}Va(this)&&hf(this)}};function ja(e,t){t.Kc||t.Ic||(t.Qa?(t.Ic=!0,t.Oe=0):wo(e.g.Z,t.type)==null?t.zb==null&&Ci(e,t,0):(Nr(t),$h(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function Yd(e,t){var n,i,r,l,c,f,y,m;return G(function(w){if(w.g==1){if(!e.o)throw new Y(2,5,5006);return n=rc(e,!0),i=e.g.Z,_(w,i.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(Pt(e.l),e.updateDuration(),r=C(n.keys()),l=r.next();!l.done;l=r.next())c=l.value,f=n.get(c),e.h.has(c)||(y=tc(e,f),t.has(f.id)&&(m=t.get(f.id),hm(m,function(T,I,D){return nc(T,I,D||null,e.i.retryParameters,e.g.pc)}),y.$=m),e.h.set(c,y),Ci(e,y,0));ce(w)})}function tc(e,t){var n={stream:t,type:t.type,sa:null,$:Gl(e,t),Ia:null,mb:null,gf:null,lc:null,kc:null,df:null,ef:null,Fc:null,endOfStream:!1,Qa:!1,zb:null,Ic:!1,Oe:0,Sf:!1,Kc:!1,Yc:!0,ag:!1,$g:!1,Sd:!1,Hb:null,yc:null};return t.dependencyStream&&(n.yc=tc(e,t.dependencyStream)),n}function Gl(e,t){if(t.type==="video"&&e.i.disableVideoPrefetch||t.type==="audio"&&e.i.disableAudioPrefetch||t.type===ut&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===ut&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.$)&&t===n.i?n:0<e.i.segmentPrefetchLimit?new Hl(e.i.segmentPrefetchLimit,t,function(i,r,l){return nc(i,r,l||null,e.i.retryParameters,e.g.pc)},0>e.g.ub()):null}function el(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=C(e.j.variants),r=i.next(),l={};!r.done;l={Mb:void 0},r=i.next())if(l.Mb=r.value,l.Mb.audio)if(e.m.has(l.Mb.audio)){if(r=e.m.get(l.Mb.audio),ym(r,t),!(0<t&&n.some(function(f){return function(y){return ho(f.Mb.audio.language,y)}}(l)))){var c=e.h.get(l.Mb.audio.type);r!==(c&&c.$)&&Mr(r),e.m.delete(l.Mb.audio)}}else 0>=t||!n.some(function(f){return function(y){return ho(f.Mb.audio.language,y)}}(l))||!(r=Gl(e,l.Mb.audio))||(l.Mb.audio.segmentIndex||l.Mb.audio.createSegmentIndex(),e.m.set(l.Mb.audio,r))}h.updateDuration=function(){var e=ia(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.s&&this.s.stop(),Md(this.g.Z)),this.g.Z.pb(t)):e?(this.s&&this.s.Fa(.5),this.g.Z.pb(1/0)):this.g.Z.pb(Math.pow(2,32))};function pf(e,t){var n,i,r,l,c,f,y,m,w;return G(function(T){switch(T.g){case 1:if(Pt(e.l),n=Dn,t.Qa||t.zb==null||t.Kc)return T.return();if(t.zb=null,!t.Ic){T.u(2);break}return _(T,$h(e,t,t.Sf,t.Oe),3);case 3:return T.return();case 2:if(Pv(e,t),t.stream.segmentIndex){T.u(4);break}return i=t.stream,he(T,5),_(T,t.stream.createSegmentIndex(),7);case 7:_e(T,6);break;case 5:return r=De(T),_(T,Zd(e,t,r),8);case 8:return T.return();case 6:if(i!=t.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),t.Qa||t.zb||Ci(e,t,0),T.return();case 4:if(!t.yc){T.u(9);break}if(t.yc.stream.segmentIndex){T.u(9);break}return he(T,11),_(T,t.yc.stream.createSegmentIndex(),13);case 13:_e(T,9);break;case 11:De(T);case 9:he(T,14),l=Lv(e,t),l!=null&&(Ci(e,t,l),t.Sd=!1),_e(T,15);break;case 14:return c=De(T),_(T,Zd(e,t,c),16);case 16:return T.return();case 15:if(t.type===n.Ta)return T.return();if(f=[t],y=t.type===n.ea?n.Ca:n.ea,(m=e.h.get(y))&&f.push(m),!e.I||!f.every(function(I){return I.endOfStream})){T.u(0);break}return _(T,e.g.Z.endOfStream(),18);case 18:Pt(e.l),w=e.g.Z.getDuration(),w!=0&&w<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.pb(w),ce(T)}})}function Lv(e,t){if(Zh(t))return am(e.g.Z,t.stream.originalId||""),null;if(t.type==ut&&sm(e.g.Z),t.stream.isAudioMuxedInVideo)return null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.ub()));if(!Od(e.g.Z)&&t.type!=ut)return n/2;var i=e.g.Qc();if(t.type==="audio")for(var r=C(e.m.keys()),l=r.next();!l.done;l=r.next())l=e.m.get(l.value),l.$a(i,!0),Js(l,i);r=t.Ia?t.Ia.endTime:i;var c=Bh(e.g.Z,t.type,i);l=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.C);var f=e.j.presentationTimeline.getDuration()-r,y=In(e.g.Z,t.type);if(1e-6>f&&y)return t.endOfStream=!0,t.type=="video"&&(e=e.h.get(ut))&&Zh(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,c>=l)return n/2;if(f=!t.sa,y=xm(e,t,i,y),!y)return n;c=t.mb;var m=y.Y;c&&m&&Iu(m,c)&&(c.g=m.g),c=!1,f&&t.ag&&(c=!0,t.ag=!1),f=1/0,m=Array.from(e.h.values()),m=C(m);for(var w=m.next();!w.done;w=m.next())w=w.value,Zh(w)||w.sa&&!w.sa.current()||(f=Math.min(f,w.Ia?w.Ia.endTime:i));return r>=f+e.j.presentationTimeline.h?n:(t.$&&t.sa&&!e.m.has(t.stream)&&(t.$.$a(y.startTime+.001),Js(t.$,y.startTime).catch(function(){})),Va(e)&&Cm(e,t,y)||(Em(e,t,i,y,c).catch(function(){}),t.yc&&Jh(e,t.yc,i,l)),null)}function xm(e,t,n,i){if(t.sa)return(n=t.sa.current())&&t.Ia&&.001>Math.abs(t.Ia.startTime-n.startTime)&&(n=t.sa.next().value),n;if(t.Ia||i)return n=t.Ia?t.Ia.endTime:i,e=0>e.g.ub(),t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(n,!1,e)),t.sa&&t.sa.next().value;i=e.j.sequenceMode||Va(e)?0:e.i.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.ub();var l=null;return i&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(r,!1,e)),l=t.sa&&t.sa.next().value),l||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Wb(n,!1,e)),l=t.sa&&t.sa.next().value),l}function Em(e,t,n,i,r){var l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q;return G(function(z){switch(z.g){case 1:if(l=Dn,c=t.stream,f=t.sa,t.Qa=!0,he(z,2),i.Cc()==2)throw new Y(1,1,1011);return _(z,_v(e,t,i,r),4);case 4:return Pt(e.l),e.B?z.return():(y=c.mimeType=="video/mp4"||c.mimeType=="audio/mp4",m=x.ReadableStream,e.i.lowLatencyMode&&e.j.isLowLatency&&m&&y&&(e.j.type!="HLS"||i.m)?(I=new Uint8Array(0),M=D=!1,P=function(X){var W,J,ne;return G(function(te){switch(te.g){case 1:if(D||(M=!0,Pt(e.l),e.B))return te.return();if(he(te,2),I=an(I,X),W=!1,J=0,new Ut().box("mdat",function(ee){J=ee.size+ee.start,W=!0}).parse(I,!1,!0),!W){te.u(4);break}return ne=I.subarray(0,J),I=I.subarray(J),_(te,Qd(e,t,n,c,i,ne,!0,r),5);case 5:t.$&&t.sa&&Js(t.$,i.startTime,!0);case 4:_e(te,0);break;case 2:L=De(te),ce(te)}})},_(z,Ba(e,t,i,P),9)):(w=Ba(e,t,i),_(z,w,7)));case 7:return T=z.h,Pt(e.l),e.B?z.return():(Pt(e.l),t.Ic?(t.Qa=!1,Ci(e,t,0),z.return()):_(z,Qd(e,t,n,c,i,T,!1,r),6));case 9:if(j=z.h,L)throw L;if(M){z.u(10);break}return D=!0,Pt(e.l),e.B?z.return():t.Ic?(t.Qa=!1,Ci(e,t,0),z.return()):_(z,Qd(e,t,n,c,i,j,!1,r),10);case 10:t.$&&t.sa&&Js(t.$,i.startTime,!0);case 6:if(Pt(e.l),e.B)return z.return();t.Ia=i,f.next(),t.Qa=!1,t.$g=!1,V=e.g.Z.Nb(),K=V[t.type],JSON.stringify(K),t.Ic||(q=null,t.type===l.Ca?q=e.h.get(l.ea):t.type===l.ea&&(q=e.h.get(l.Ca)),q&&q.type==l.ea?e.g.tf(i,t.stream,q.stream.isAudioMuxedInVideo):e.g.tf(i,t.stream,t.stream.codecs.includes(","))),Nr(t),Ci(e,t,0),_e(z,0);break;case 2:if(Q=De(z),Pt(e.l,Q),e.B)return z.return();if(t.Qa=!1,Q.code==7001)t.Qa=!1,Nr(t),Ci(e,t,0),z.u(0);else if(t.type==l.Ta&&e.i.ignoreTextStreamFailures)e.h.delete(l.Ta),z.u(0);else return Q.code==3017?_(z,Am(e,t,Q),0):(t.Sd=!0,Q.category==1&&t.$&&Zs(t.$,i),Q.severity=2,_(z,Zd(e,t,Q),0))}})}function Jh(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M;return G(function(L){switch(L.g){case 1:for(r=t.stream,f=(c=(l=r.segmentIndex)&&l.Wb(n))&&c.next().value;f&&e.L.includes(f.startTime);)f=c&&c.next().value;if(!f){L.u(0);break}if(y=f.Y,!y||Iu(y,t.mb)){L.u(3);break}return t.mb=y,he(L,4),_(L,Ba(e,t,y),6);case 6:m=L.h;var P=e.g.Z;P.M&&qf(P.M,m,0,r),e.L=[],_e(L,3);break;case 4:throw w=De(L),t.mb=null,w;case 3:if(t.Ia&&t.Ia==f){L.u(0);break}return t.Ia=f,he(L,8),_(L,Ba(e,t,f),10);case 10:T=L.h,P=e.g.Z,P.M&&qf(P.M,T,0,r),e.L.push(f.startTime),_e(L,9);break;case 8:throw I=De(L),t.Ia=null,I;case 9:if(D=Math.max.apply(Math,[0].concat($(e.L))),M=e.g.Qc(),M+i>D)return _(L,Jh(e,t,f.startTime,i),0);L.u(0)}})}function Am(e,t,n){var i,r,l,c;return G(function(f){if(f.g==1){if(i=Array.from(e.h.values()),i.some(function(y){return y!=t&&y.$g}))return f.u(2);if(r=e.i.maxDisabledTime===0&&n.code==1011?1:e.i.maxDisabledTime,e.g.disableStream(t.stream,r))return f.return();if(e.i.avoidEvictionOnQuotaExceededError)return Ci(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.$g=!0,c=e.g.Qc(),_(f,Jd(e,t,c),2)}Ci(e,t,4),ce(f)})}function _v(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K;return G(function(q){switch(q.g){case 1:if(r=Dn,l=t.Ia==null,c=[],f=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),y=Math.min(n.appendWindowEnd,e.U)+.1,m=n.codecs||t.stream.codecs,w=xr(m),T=Mi(n.mimeType||t.stream.mimeType),I=n.timestampOffset,I==t.gf&&f==t.lc&&y==t.kc&&w==t.df&&T==t.ef){q.u(2);break}if(D=t.df&&t.ef&&Xs(e.g.Z,t.type,T,m,rc(e)),!D){q.u(3);break}if(M=null,t.type===r.Ca?M=e.h.get(r.ea):t.type===r.ea&&(M=e.h.get(r.Ca)),!M){q.u(3);break}return _(q,ic(M).catch(function(){}),5);case 5:M.mb=null,M.lc=null,M.kc=null,ja(e,M);case 3:return _(q,Wd(e,t,I,f,y,n,w,T),2);case 2:return Iu(n.Y,t.mb)||(t.mb=n.Y,n.l&&n.Y&&(L=Ba(e,t,n.Y),P=function(){var Q,z,X,W,J,ne,te,ee,ge;return G(function(fe){switch(fe.g){case 1:return he(fe,2),_(fe,L,4);case 4:return Q=fe.h,Pt(e.l),z=null,X=new Map,W={projection:null,hfov:null},J=new Ut,J.box("moov",nt).box("trak",nt).box("mdia",nt).R("mdhd",function(le){z=Jc(le.reader,le.version).timescale}).box("hdlr",function(le){switch(le=le.reader,le.skip(8),le.Vc()){case"soun":X.set(r.ea,z);break;case"vide":X.set(r.Ca,z)}z=null}),t.type===r.Ca&&J.box("minf",nt).box("stbl",nt).R("stsd",Gr).box("encv",Li).box("avc1",Li).box("avc3",Li).box("hev1",Li).box("hvc1",Li).box("dvav",Li).box("dva1",Li).box("dvh1",Li).box("dvhe",Li).box("dvc1",Li).box("dvi1",Li).box("vexu",nt).box("proj",nt).R("prji",function(le){le=le.reader.Vc(),W.projection=le}).box("hfov",function(le){le=le.reader.T()/1e3,W.hfov=le}),J.parse(Q,!0,!0),t.type===r.Ca&&ey(e,W),X.has(t.type)?n.Y.timescale=X.get(t.type):z!=null&&(n.Y.timescale=z),ne=t.stream.segmentIndex,ne instanceof Jt&&(te=Fh(ne,n.startTime)),ee=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,_(fe,e.g.Kh(t.type,Q),5);case 5:return _(fe,Rd(e.g.Z,t.type,Q,null,t.stream,ee,t.Yc,i,!1,!1,te),6);case 6:_e(fe,0);break;case 2:throw ge=De(fe),t.mb=null,ge}})},j=n.startTime,l&&(V=In(e.g.Z,t.type),V!=null&&(j=V)),e.g.xk(j,n.Y),c.push(P()))),K=t.Ia?t.Ia.i:-1,n.i!=K&&c.push(Ul(e.g.Z,t.type,n.startTime)),_(q,Promise.all(c),0)}})}function Wd(e,t,n,i,r,l,c,f){var y,m,w,T,I;return G(function(D){switch(D.g){case 1:if(y=Dn,m=rc(e),he(D,2),t.lc=i,t.kc=r,c&&(t.df=c),f&&(t.ef=f),t.gf=n,w=e.j.sequenceMode||e.j.type=="HLS",T=null,t.type===y.Ca?T=e.h.get(y.ea):t.type===y.ea&&(T=e.h.get(y.Ca)),!(T&&T.stream&&T.stream.isAudioMuxedInVideo)){D.u(4);break}return _(D,Qi(e.g.Z,T.type,n,i,r,w,T.stream.mimeType,T.stream.codecs,m),4);case 4:return _(D,Qi(e.g.Z,t.type,n,i,r,w,l.mimeType||t.stream.mimeType,l.codecs||t.stream.codecs,m),6);case 6:_e(D,0);break;case 2:throw I=De(D),t.lc=null,t.kc=null,t.df=null,t.ef=null,t.gf=null,I}})}function Qd(e,t,n,i,r,l,c,f){c=c===void 0?!1:c,f=f===void 0?!1:f;var y,m,w,T;return G(function(I){switch(I.g){case 1:return y=i.closedCaptions&&0<i.closedCaptions.size,e.i.shouldFixTimestampOffset&&(m=i.mimeType=="video/mp4"||i.mimeType=="audio/mp4",w=null,r.Y&&(w=r.Y.timescale),m&&w&&i.type==="video"&&e.j.type=="DASH"&&new Ut().box("moof",nt).box("traf",nt).R("tfdt",function(D){var M,L,P,j,V,K;return G(function(q){return M=Qc(D.reader,D.version),L=M.baseMediaDecodeTime,L?(P=-L/w,j=Number(t.gf)||0,j<P?(V=t.lc,K=t.kc,_(q,Wd(e,t,P,V,K,r),0)):q.u(0)):q.return()})}).parse(l,!1,c)),_(I,Jd(e,t,n),2);case 2:return Pt(e.l),T=t.Yc,t.Yc=!1,_(I,e.g.Kh(t.type,l),3);case 3:return _(I,Rd(e.g.Z,t.type,l,r,i,y,T,f,c),4);case 4:Pt(e.l),ce(I)}})}function Jd(e,t,n){var i,r,l,c,f,y,m,w,T;return G(function(I){if(I.g==1)return i=t.stream.segmentIndex,i instanceof Jt&&(i.$a(e.j.presentationTimeline.Gb()),r=[],Ws(i,function(D){r.push(D.Pe())})),l=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),c=wo(e.g.Z,t.type),c==null?(e.F==t&&(e.F=null),I.return()):(f=n-c,y=e.i.evictionGoal,m=e.j.presentationTimeline.Xb(),w=e.j.presentationTimeline.Fb(),T=f-l,w-m>y&&(T=Math.max(f-l,m-y-c)),T<=y?I.return():_(I,e.g.Z.remove(t.type,c,c+T,r),2));if(I.g!=4)return Pt(e.l),e.F?_(I,Jd(e,e.F,n),4):I.u(0);Pt(e.l),ce(I)})}function Zh(e){return e&&e.type==ut&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function Ba(e,t,n,i){var r,l,c,f,y;return G(function(m){switch(m.g){case 1:if(r=n.Yb())return m.return(r);if(l=null,t.$){var w=t.$,T=w.h;n instanceof Kn&&(T=w.j),T.has(n)?(w=T.get(n),i&&(w.sh=i),l=w.ae):l=null}return l||(l=nc(n,t.stream,i||null,e.i.retryParameters,e.g.pc)),c=0,t.sa&&(c=t.sa.h),t.Hb=l,_(m,l.promise,2);case 2:if(f=m.h,t.Hb=null,y=f.data,!n.aesKey){m.u(3);break}return _(m,zd(y,n.aesKey,c),4);case 4:y=m.h;case 3:return m.return(y)}})}function nc(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e instanceof Fe?e:void 0,f=c?1:0;return e=ec(e.O(),e.startByte,e.endByte,i,n),e.contentType=t.type,r.request(br,e,{type:f,stream:t,segment:c,isPreload:l})}function $h(e,t,n,i){var r,l;return G(function(c){if(c.g==1)return t.Ic=!1,t.Sf=!1,t.Oe=0,t.Kc=!0,t.Ia=null,t.sa=null,t.$&&!e.m.has(t.stream)&&Mr(t.$),i?(r=e.g.Qc(),l=e.g.Z.getDuration(),_(c,e.g.Z.remove(t.type,r+i,l),3)):_(c,Rn(e.g.Z,t.type),4);if(c.g!=3)return Pt(e.l),n?_(c,e.g.Z.flush(t.type),3):c.u(3);Pt(e.l),t.Kc=!1,t.endOfStream=!1,t.Qa||t.zb||Ci(e,t,0),ce(c)})}function Ci(e,t,n){var i=t.type;(i!=ut||e.h.has(i))&&(t.zb=new Es(function(){var r;return G(function(l){if(l.g==1)return he(l,2),_(l,pf(e,t),4);if(l.g!=2)return _e(l,0);r=De(l),e.g&&e.g.onError(r),ce(l)})}).ia(n))}function Nr(e){e.zb!=null&&(e.zb.stop(),e.zb=null)}function ic(e){return G(function(t){return e.Hb?_(t,e.Hb.abort(),0):t.u(0)})}function Zd(e,t,n){var i;return G(function(r){if(r.g==1)return n.code==3024?(t.Qa=!1,Nr(t),Ci(e,t,0),r.return()):_(r,Lg(e.S),2);if(Pt(e.l),n.category===1&&n.code!=1003){if(t.Fc)return Tm(e,!1),r.return();i=e.i.maxDisabledTime===0&&n.code==1011?1:e.i.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.i.failureCallback(n),ce(r)})}function Ht(e,t){t=t===void 0?!1:t;var n=n===void 0?!0:n,i,r,l,c,f;return G(function(y){if(y.g==1){if(i=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t){if(!e.i.allowMediaSourceRecoveries||i-e.M<r)return y.return(!1);e.M=i}return l=Dn,(c=e.h.get(l.ea))&&(c.mb=null,c.lc=null,c.kc=null,n&&ja(e,c),ic(c).catch(function(){}),c.sa&&c.sa.dh(),Nr(c)),(f=e.h.get(l.Ca))&&(f.mb=null,f.lc=null,f.kc=null,n&&ja(e,f),ic(f).catch(function(){}),f.sa&&f.sa.dh(),Nr(f)),_(y,Kh(e.g.Z,rc(e)),2)}return!f||f.Kc||f.Qa||f.zb||Ci(e,f,0),!c||c.Kc||c.Qa||c.zb||Ci(e,c,0),y.return(!0)})}function ey(e,t){if(e.N.projection!=t.projection||e.N.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new ke("spatialvideoinfo",n)}else n=new ke("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.N=t}}function Va(e){return e.i.crossBoundaryStrategy!=="keep"}function hf(e){if(Va(e)){e.H.stop();var t=e.g.Qc(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.mb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.1,e.H.ia(t)))}}function Cm(e,t,n){if(t.type===ut)return!1;var i=t.mb;if(!i)return!1;var r=n.Y;if(n=i.g!==r.g,e.i.crossBoundaryStrategy==="reset_to_encrypted"&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),e.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&i.encrypted==r.encrypted&&(n=!1),n&&t.Yc){var l=e.g.video,c=l.paused;Ht(e,!0).then(function(){var f=new Map().set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new ke("boundarycrossed",f)),c||l.play()})}return n}function rc(e,t){t=t===void 0?!1:t;var n=new Map;return e.o.audio&&n.set("audio",e.o.audio),e.o.video&&n.set("video",e.o.video),t&&e.A&&n.set(ut,e.A),n}function _u(){}function oc(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,y=!0,m;for(m in t){var w=r+"."+m,T=l?i[r]:n[m];f||m in n?t[m]===void 0?T===void 0||f?delete e[m]:e[m]=Tr(T):c?e[m]=t[m]:T.constructor==Object&&t[m]&&t[m].constructor==Object?(e[m]||(e[m]=Tr(T)),w=oc(e[m],t[m],T,i,w),y=y&&w):typeof t[m]!=typeof T||t[m]==null||typeof t[m]!="function"&&t[m].constructor!=T.constructor?(ui("Invalid config, wrong type for "+w),y=!1):typeof n[m]=="function"&&n[m].length!=t[m].length?(Ct("Unexpected number of arguments for "+w),e[m]=t[m]):e[m]=Array.isArray(e[m])?t[m].slice():t[m]:(ui("Invalid config, unrecognized key "+w),y=!1)}return y}function Fl(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 Ha(e,t){return e&&t}function bm(e,t){function n(l){for(var c=C(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 y=l[f];Array.isArray(y)&&y.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,y){var m=l[y];return c.hasOwnProperty(y)?m instanceof HTMLElement&&c[y]instanceof HTMLElement?m.isEqualNode(c[y])||(f[y]=m):r(m)&&r(c[y])?(m=i(m,c[y]),(0<Object.keys(m).length||!r(m))&&(f[y]=m)):Array.isArray(m)&&Array.isArray(c[y])?ra(m,c[y])||(f[y]=m):Number.isNaN(m)&&Number.isNaN(c[y])||m!==c[y]&&(f[y]=m):f[y]=m,f},{})}function r(l){return l&&typeof l=="object"&&!Array.isArray(l)}return e=i(e,t),n(e),e}Pe("shaka.util.ConfigUtils",_u),_u.getDifferenceFromConfigObjects=bm,_u.convertToConfigObject=Fl,_u.mergeConfigObjects=oc,Pe("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function ji(){}function ty(e){return e=qi(e),new dn(e).Cb}function lc(e,t,n){function i(f){Zn(l).setUint32(c,f.byteLength,!0),c+=4,l.set(Ge(f),c),c+=f.byteLength}if(!n||!n.byteLength)throw new Y(2,6,6015);var r;typeof t=="string"?r=Gf(t,!0):r=t,e=qi(e),e=Gf(e,!0);var l=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),c=0;return i(e),i(r),i(n),l}function uc(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=qi(e).split("skd://").pop(),lc(e,n,t))}function pn(e,t){e===2&&(e=t.drmInfo)&&Bo(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Pe("shaka.drm.FairPlay",ji),ji.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&Bo(e.keySystem)){try{var n=ln(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=Fi(or(n)))}},ji.muxFairPlayRequest=function(e,t){pn(e,t)},ji.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&Bo(n.keySystem)&&pn(e,t)}},ji.conaxFairPlayRequest=function(e,t){pn(e,t)},ji.ezdrmFairPlayRequest=function(e,t){pn(e,t)},ji.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&Bo(e.keySystem)&&(e=Ge(t.body),e=ro(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Br("spc="+e))},ji.muxInitDataTransform=function(e,t,n){return uc(e,t,n)},ji.expressplayInitDataTransform=function(e,t,n){return uc(e,t,n)},ji.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=qi(e).split("skd://").pop().split("?").shift(),n=x.atob(n);var i=new ArrayBuffer(2*n.length);i=Zu(i);for(var r=0,l=n.length;r<l;r++)i[r]=n.charCodeAt(r);return lc(e,i,t)},ji.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=qi(e).split(";").pop(),lc(e,n,t))},ji.verimatrixInitDataTransform=function(e,t,n){return uc(e,t,n)},ji.initDataTransform=lc,ji.defaultGetContentId=ty,ji.isFairPlaySupported=function(){var e;return G(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},he(t,2),_(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(De(t),t.return(!1))})};function ac(){this.g=null}ac.prototype.configure=function(e){this.g=e},ac.prototype.getConfiguration=function(){return this.g},ac.prototype.create=function(e){var t;if(this.g.language){var n=bi(e,this.g.language);n.length&&(t=n)}t||(t=e.filter(function(l){return l.primary}),t=t.length?t:e),e=Uv(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=km(t,this.g.videoLayout),e.length&&(t=e)),this.g.Ec&&(e=Im(t,this.g.Ec),e.length&&(t=e));var i=[this.g.channelCount,this.g.preferredAudioChannelCount];if(e=i.filter(function(l,c){return l&&i.indexOf(l)===c}),e.length){for(e=C(e),n=e.next();!n.done;n=e.next())if(n=$d(t,n.value),n.length){t=n;break}}this.g.Jc&&(e=ny(t,this.g.Jc),e.length&&(t=e)),this.g.Ed&&(e=iy(t,this.g.Ed),e.length&&(t=e)),e=ry(t,this.g.spatialAudio),e.length&&(t=e);var r=[this.g.audioCodec,this.g.Gd].concat($(this.g.preferredAudioCodecs));if(e=r.filter(function(l,c){return l&&r.indexOf(l)===c}),e.length){for(e=C(e),n=e.next();!n.done;n=e.next())if(n=oy(t,n.value),n.length){t=n;break}}return new Yc(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&na()))};function bi(e,t){t=Ot(t);var n=da(t,e.map(function(i){return ld(i)}));return n?e.filter(function(i){return n==ld(i)}):[]}function Uv(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function ny(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function iy(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function $d(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 Im(e,t){if(t=="AUTO"){var n=e.some(function(i){return!!(i.video&&i.video.hdr&&i.video.hdr=="HLG")});t=VT(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}function km(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function ry(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function oy(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function ep(){}function Ka(){var e=1/0,t=yt();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:yo(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(f,y,m){return x.shakaMediaKeysPolyfill==="apple"&&y=="skd"&&(y=m.serverCertificate,m=ty(f),f=lc(f,m,y)),f},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},i="reload",r=!1;na()&&t.cd()&&(i="smooth",r=!0),r={retryParameters:yo(),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:tp,manifestPreprocessorTXml:To,sequenceMode:!1,multiTypeVariantsAllowed:r,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:t.bd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:tp,manifestPreprocessorTXml:To,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var l={trackSelectionCallback:function(f){return G(function(y){return y.return(f)})},downloadSizeCallback:function(f){var y;return G(function(m){return m.g==1?navigator.storage&&navigator.storage.estimate?_(m,navigator.storage.estimate(),3):m.return(!0):(y=m.h,m.return(y.usage+f<.95*y.quota))})},progressCallback:function(f,y){return Ha([f,y])},usePersistentLicense:!0,numberOfParallelDownloads:5},c={drm:n,manifest:r,streaming:{retryParameters:yo(),failureCallback:function(f){return Ha([f])},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,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:i,addExtraFeaturesToSourceBuffer:function(f){return Ha([f],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(f,y){return Ha([f,y])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:l,abrFactory:function(){return new Yt},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(ac,[null].concat($(vt.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight: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:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!0},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:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:30,repeatMode:0}};return l.trackSelectionCallback=function(f){return G(function(y){return y.return(jv(f,c.preferredAudioLanguage,c.preferredVideoHdrLevel))})},t.Ua(c)}function Dm(){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 tl(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 oc(e,t,n||Ka(),i,"")}function jv(e,t,n){var i=n;i=="AUTO"&&(n=e.some(function(f){return!!(f.hdr&&f.hdr=="HLG")}),i=VT(n));var r=e.filter(function(f){return!(f.type!="variant"||f.hdr&&f.hdr!=i)});n=[];var l=da(t,r.map(function(f){return f.language}));l&&(n=r.filter(function(f){return Ot(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,y){return y.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,y){return f.bandwidth-y.bandwidth}),t.push(n[r])),e=C(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=ut&&n.type!="image"||t.push(n);return t}function tp(e){return Ha([e],e)}function To(e){return Ha([e],e)}Pe("shaka.util.PlayerConfiguration",ep),ep.mergeConfigObjects=tl,ep.createDefaultForLL=Dm,ep.createDefault=Ka;function Om(){this.g=null,this.h=[]}function yf(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=C(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 Bv(e){function t(l){return{timestamp:l.timestamp,state:l.state,duration:l.duration}}for(var n=[],i=C(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 Vv(){this.i=this.h=null,this.g=[]}function gf(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 np(){this.B=this.W=NaN,this.l="",this.j=this.gi=this.s=this.A=this.K=this.C=this.o=this.m=this.I=this.F=this.i=this.S=this.U=this.M=this.N=this.P=NaN,this.L=0,this.G=this.H=NaN,this.g=new Om,this.h=new Vv}function xo(e,t,n){e.P=t,e.N=n}function ip(e,t,n){e.W=t,e.B=n}function Rm(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}function ly(e,t){e.j=isNaN(e.j)?t:e.j+t}function mf(e){var t=e.W,n=e.B,i=e.l,r=e.A,l=e.N,c=e.P,f=e.M,y=e.U,m=e.S,w=e.s,T=e.i,I=e.F,D=e.I,M=e.m,L=yf(e.g,"playing"),P=yf(e.g,"paused"),j=yf(e.g,"buffering"),V=e.o,K=e.C,q=e.K,Q=e.gi,z=e.j,X=e.L,W=e.H,J=e.G,ne=Bv(e.g),te=[];e=C(e.h.g);for(var ee=e.next();!ee.done;ee=e.next())ee=ee.value,te.push({timestamp:ee.timestamp,id:ee.id,type:ee.type,fromAdaptation:ee.fromAdaptation,bandwidth:ee.bandwidth});return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:l,droppedFrames:c,corruptedFrames:f,stallsDetected:y,gapsJumped:m,estimatedBandwidth:w,completionPercent:T,loadLatency:I,manifestTimeSeconds:D,drmTimeSeconds:M,playTime:L,pauseTime:P,bufferingTime:j,licenseTime:V,liveLatency:K,maxSegmentDuration:q,manifestSizeBytes:Q,bytesDownloaded:z,nonFatalErrorCount:X,manifestPeriodCount:W,manifestGapCount:J,stateHistory:ne,switchHistory:te}}function Nn(e,t,n,i){It.call(this),this.N=e,this.W=t,this.Oa=i.networkingEngine,this.m=n,this.A=null,this.Ka=0,this.ab=i.hd,this.F=i.nk,this.eb=i.pk,this.g=i.config,this.l=this.G=this.h=null,this.wa=!1,this.H=i.Ck,this.ya=!1,this.i=null,this.na=!1,this.j=this.C=null,this.ha=!1,this.M=new Map,this.za=!1,this.Pa=i.Bk,this.ba=new np,this.va=new ct,this.s=new ct,this.P=null,this.o=!1,this.ka=i.ej,this.U=this.K=null,this.Za=i.dj,this.S=!1,this.L=[],this.I=[],this.B=!0}$e(Nn,It);function sc(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function rp(e){if(e.I)for(var t=C(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function nl(e,t){if(e.P=t,e.S=!0,e.L){t=C(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}h=Nn.prototype,h.getStartTime=function(){return this.m},h.nd=function(){return this.N},h.Fg=function(){return this.h};function Hv(e){return e.ha=!0,e.j}function Kv(e){return e.ya=!0,e.H}h.getStats=function(){return this.ba};function cc(e){return e.na=!0,e.i}h.Mj=function(){return this.K?Ar(this.K):null},h.Lj=function(){return this.U?pu(this.U):null};function Mm(e){return e.za=!0,e.M}function Gv(e,t,n){e.j=t,e.C=n}h.start=function(){var e=this;(function(){var t;return G(function(n){switch(n.g){case 1:return _(n,Promise.resolve(),2);case 2:return he(n,3),_(n,Fv(e),5);case 5:if(Ga(e),x.shakaMediaKeysPolyfill==="webkit"){n.u(6);break}return _(n,Nm(e),7);case 7:Ga(e);case 6:if(!e.ka){n.u(8);break}return _(n,zv(e),9);case 9:Ga(e);case 8:if(!e.ka||!e.i){n.u(10);break}return _(n,gd(e.i),11);case 11:Ga(e);case 10:e.s.resolve(),_e(n,0);break;case 3:t=De(n),t instanceof Y&&(t.code==7001||t.code==7003)||e.s.reject(t),ce(n)}})})()},h.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):It.prototype.dispatchEvent.call(this,e)},h.onError=function(e){e.severity===2&&(this.s.reject(e),this.destroy());var t=new Map().set("detail",e);t=new ke("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Ga(e){if(e.o)throw new Y(2,7,7003)}function uy(e,t){e.dispatchEvent(new ke("onstatechange",new Map().set("state",t)))}function Fv(e){var t,n,i,r,l,c;return G(function(f){switch(f.g){case 1:if(uy(e,"manifest-parser"),e.l||(e.G=Ch(e.N,e.W),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.B})),t=Date.now()/1e3,uy(e,"manifest"),e.h){f.u(2);break}return _(f,e.l.start(e.N,e.eb),3);case 3:return e.h=f.h,_(f,qv(e),2);case 2:return e.va.resolve(),n=new ke("manifestparsed",void 0),_(f,Promise.resolve(),5);case 5:if(e.dispatchEvent(n),e.h.variants.length==0)throw new Y(2,4,4036);if(vf(e.h),i=Ls(e.F,e.h),!i){f.u(6);break}return r=new ke("trackschanged",void 0),_(f,Promise.resolve(),7);case 7:Ga(e),e.dispatchEvent(r);case 6:l=Date.now()/1e3,c=l-t,e.ba.I=c,ce(f)}})}function Nm(e,t){var n,i,r,l;return G(function(c){switch(c.g){case 1:return!e.h||e.i?c.return():(uy(e,"drm-engine"),e.Ka=Date.now()/1e3,e.i=e.ab(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.B}),n=_o(e.h.variants),i=!0,e.h&&e.h.presentationTimeline&&(i=e.h.presentationTimeline.V()),_(c,Ug(e.i,n,e.h.offlineSessionIds,i),2));case 2:if(Ga(e),!t){c.u(3);break}return _(c,e.i.fc(t),4);case 4:Ga(e);case 3:return _(c,Wc(e.F,e.h),5);case 5:if(r=c.h,!r){c.u(0);break}return l=new ke("trackschanged",void 0),_(c,Promise.resolve(),7);case 7:e.dispatchEvent(l),ce(c)}})}h.configure=function(e,t){e=Fl(e,t),tl(this.g,e)},h.getConfiguration=function(){return Tr(this.g)};function qv(e){var t,n,i,r,l,c;return G(function(f){if(e.A||(e.A=e.g.adaptationSetCriteriaFactory(),e.A.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Ec:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Jc:e.g.preferredAudioLabel,Ed:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.Za&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),n=ay(e),!n||e.h.variants.length!=1&&e.h.type!="HLS")return f.u(0);for(i=[],r=C([n.video,n.audio]),l=r.next();!l.done;l=r.next())(c=l.value)&&!c.segmentIndex&&i.push(c.createSegmentIndex());return 0<i.length?_(f,Promise.all(i),0):f.u(0)})}function zv(e){var t,n,i,r;return G(function(l){return t=ay(e),t?(n=e.h.presentationTimeline.V(),i=[],e.K=t,t.video&&i.push(Uu(e,t.video,n)),t.audio&&i.push(Uu(e,t.audio,n)),(r=Wi(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&lh(t.audio,r,e.g)&&(i.push(Uu(e,r,n)),e.U=r),_(l,Promise.all(i),0)):l.u(0)})}function ay(e){var t=_o(e.h.variants);return t=e.A.create(t),e.j.configure(e.g.abr),e.j.setVariants(Array.from(t.values())),e.j.chooseVariant()}function Uu(e,t,n){var i,r,l,c,f;return G(function(y){return y.g==1?(i=e.g.streaming.segmentPrefetchLimit||2,r=new Hl(i,t,function(m,w,T){return nc(m,w,T||null,e.g.streaming.retryParameters,e.Oa,e.B)},!1),e.M.set(t.id,r),t.segmentIndex?y.u(2):_(y,t.createSegmentIndex(),2)):(l=typeof e.m=="number"?e.m:0,c=t.segmentIndex.Wb(l),f=null,c&&(f=c.current(),f||(f=c.next().value)),f||(f=Si(t.segmentIndex)),f?n?f.Y?_(y,Xh(r,f.Y),0):y.u(0):_(y,Js(r,f.startTime),0):y.u(0))})}h.fl=function(){return this.s},h.destroy=function(){var e=this,t,n,i;return G(function(r){switch(r.g){case 1:if(e.o=!0,!e.l||e.wa){r.u(2);break}return _(r,e.l.stop(),2);case 2:if(!e.j||e.ha){r.u(4);break}return _(r,e.j.stop(),4);case 4:if(e.H&&!e.ya&&e.H.release(),!e.i||e.na){r.u(6);break}return _(r,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.za)for(t=C(e.M.values()),n=t.next();!n.done;n=t.next())i=n.value,Mr(i);ce(r)}})};function vf(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))}Pe("shaka.media.PreloadManager",Nn),Nn.prototype.destroy=Nn.prototype.destroy,Nn.prototype.waitForFinish=Nn.prototype.fl,Nn.prototype.getPrefetchedTextTrack=Nn.prototype.Lj,Nn.prototype.getPrefetchedVariantTrack=Nn.prototype.Mj;function ju(e,t){It.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{gd:null,fd:rl,Sc:function(i,r){return ql(n,"enter",i,r)}},{gd:il,fd:rl,Sc:function(i,r){return ql(n,"enter",i,r)}},{gd:fc,fd:rl,Sc:function(i,r){return ql(n,"enter",i,r)}},{gd:rl,fd:il,Sc:function(i,r){return ql(n,"exit",i,r)}},{gd:rl,fd:fc,Sc:function(i,r){return ql(n,"exit",i,r)}},{gd:il,fd:fc,Sc:function(i,r){r?ql(n,"skip",i,r):(ql(n,"enter",i,r),ql(n,"exit",i,r))}},{gd:fc,fd:il,Sc:function(i,r){return ql(n,"skip",i,r)}}],this.h=new Mt,this.h.D(this.i,"regionremove",function(i){n.g.delete(i.region)})}$e(ju,It),ju.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,It.prototype.release.call(this)},ju.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=C(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?il:e>i.endTime?fc:rl;this.g.set(i,l);for(var c=C(this.m),f=c.next();!f.done;f=c.next())f=f.value,f.gd==r&&f.fd==l&&f.Sc(i,t)}}};function ql(e,t,n,i){t=new ke(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}var il=1,rl=2,fc=3;function ol(e,t,n){var i,r,l,c,f,y,m;return G(function(w){switch(w.g){case 1:var T=new dn(e).ob.split("/").pop().split(".");return i=T.length==1?"":T.pop().toLowerCase(),(r=sy.get(i))?w.return(r):(l=0,c=bn([e],n),he(w,2),c.method="HEAD",_(w,t.request(l,c).promise,4));case 4:f=w.h,r=f.headers["content-type"],_e(w,3);break;case 2:if(y=De(w),!y||y.code!=1002&&y.code!=1001){w.u(3);break}return c.method="GET",_(w,t.request(l,c).promise,6);case 6:m=w.h,r=m.headers["content-type"];case 3:return w.return(r?r.toLowerCase().split(";").shift():"")}})}var sy=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");/*
		 @license
		 Copyright 2013 Ali Al Dallal

		 Licensed under the MIT license.

		 Permission is hereby granted, free of charge, to any person obtaining a copy
		 of this software and associated documentation files (the "Software"), to deal
		 in the Software without restriction, including without limitation the rights
		 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
		 copies of the Software, and to permit persons to whom the Software is
		 furnished to do so, subject to the following conditions:

		 The above copyright notice and this permission notice shall be included in
		 all copies or substantial portions of the Software.

		 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
		 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
		 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
		 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
		 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
		 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
		 SOFTWARE.
		*/for(var ll={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA":"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文（中国）","zh-HK":"中文（香港）","zh-SG":"中文（新加坡）","zh-TW":"中文（台灣）","zu-ZA":"isiZulu"},Sf=C(Object.keys(ll)),op=Sf.next();!op.done;op=Sf.next()){var cy=op.value;ll[cy.toLowerCase()]=ll[cy]}function Pm(e,t){if(e.lineBreak)return`
`;if(e.nestedCues.length)return e.nestedCues.map(function(c){return Pm(c,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=sa,r=e.fontStyle==cu,l=e.textDecoration.includes(Lo);return i&&n.push(["b"]),r&&n.push(["i"]),l&&n.push(["u"]),r=e.color,r==""&&t&&(r=t.color),i="",(r=fy(r))&&(i+="."+r),r=e.backgroundColor,r==""&&t&&(r=t.backgroundColor),(t=fy(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(c,f){var y=C(f);return f=y.next().value,y=y.next().value,"<"+f+(y===void 0?"":y)+">"+c+"</"+f+">"},e.payload)}function fy(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 Fa(e,t){var n=[];e=C(Lm(e));for(var i=e.next();!i.done;i=e.next())if(i=i.value,i.isContainer)n.push.apply(n,$(Fa(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=Pm(i,t),n.push(r)}return n}function Lm(e){var t=[];e=C(e);for(var n=e.next(),i={};!n.done;i={ig:void 0},n=e.next())i.ig=n.value,t.some(function(r){return function(l){return ed(r.ig,l)}}(i))||t.push(i.ig);return t}function Xv(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 _m(e,t){var n=Fa(t),i=[];t=e.cues?Array.from(e.cues):[],n=C(n);for(var r=n.next(),l={};!r.done;l={pd:void 0},r=n.next())l.pd=r.value,!t.some(function(c){return function(f){return f.startTime==c.pd.startTime&&f.endTime==c.pd.endTime&&f.text==c.pd.payload}}(l))&&l.pd.payload&&(r=Xv(l.pd))&&i.push(r);for(t=i.slice().sort(function(c,f){return c.startTime!=f.startTime?c.startTime-f.startTime:c.endTime!=f.endTime?c.endTime-f.startTime:"line"in VTTCue.prototype?i.indexOf(f)-i.indexOf(c):i.indexOf(c)-i.indexOf(f)}),t=C(t),n=t.next();!n.done;n=t.next())e.addCue(n.value)}function dc(e,t){var n=!1;e.mode==="disabled"&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function kn(e){var t=this;this.i=e,this.l=new Mt,this.j=null,this.h=new Map,this.g=-1,this.s=!1,this.o=null,this.B=function(){t.l.Ja(t.i,"textchanged",t.m),t.l.Ja(t.j.textTracks,"change",t.A);for(var n=C(t.h.values()),i=n.next();!i.done;i=n.next())i.value.remove();t.h.clear(),t.g=-1,t.j=null},this.m=function(){var n=new Map,i=t.i.Dc();i=C(i);for(var r=i.next();!r.done;r=i.next()){if(r=r.value,t.h.has(r.id)){var l=t.h.get(r.id);r.active||l.track.mode==="disabled"||(l.track.mode="disabled"),t.h.delete(r.id)}else{l=t.j.ownerDocument.createElement("track"),l.kind=dy(r);var c=l,f=void 0;if(r.label)f=r.label;else if(r.language)if(r.language in ll)f=ll[r.language];else{var y=Al(r.language);y in ll&&(f=ll[y]+" ("+r.language+")")}f||(f=r.originalTextId,r.language&&r.language!==r.originalTextId&&(f+=" ("+r.language+")")),c.label=f,r.language in ll&&(l.srclang=r.language),yt().Da()==="CHROMIUM"&&(l.src="data:,WEBVTT"),l.track.mode="disabled",t.j.appendChild(l)}n.set(r.id,l),r.active&&(t.g=r.id)}for(i=C(t.h.values()),r=i.next();!r.done;r=i.next())r.value.remove();-1<t.g&&(n.has(t.g)?(i=n.get(t.g).track,i.mode==="disabled"&&(i.mode=t.s?"showing":"hidden")):t.g=-1),t.h=n},this.A=function(){if(!t.o){var n=t.j;t.o=new dt(function(){if(t.o=null,t.j===n){var i=-1,r=!1;if(t.h.has(t.g)){var l=t.h.get(t.g);l.track.mode==="showing"?(i=t.g,r=!0):l.track.mode==="hidden"&&(i=t.g)}if(!r)for(r=C(t.h),l=r.next();!l.done;l=r.next()){var c=C(l.value);if(l=c.next().value,c=c.next().value,c.track.mode==="showing"){i=l;break}else 0>i&&c.track.mode==="hidden"&&(i=l)}for(r=C(t.h),l=r.next();!l.done;l=r.next())c=C(l.value),l=c.next().value,c=c.next().value,l!==i&&c.track.mode!=="disabled"&&(c.track.mode="disabled");t.g!==i&&(t.g=i,-1<i&&t.i.jh({id:i})),t.i.oh(-1<i&&t.h.get(i).track.mode==="showing")}}).ia(0)}},this.l.D(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}h=kn.prototype,h.configure=function(){},h.remove=function(e,t){if(this.i)this.h.has(this.g)&&dc(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e});else return!1;return!0},h.append=function(e){this.h.has(this.g)&&_m(this.h.get(this.g).track,e)},h.destroy=function(){return this.i&&(this.j&&this.B(),this.i=null),this.l&&(this.l.release(),this.l=null),Promise.resolve()},h.isTextVisible=function(){return this.s},h.setTextVisibility=function(e){if(this.s=e,this.h.has(this.g)){var t=this.h.get(this.g).track;t.mode!=="disabled"&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&this.i.m===3)if(t=Array.from(this.i.h.textTracks).filter(function(i){return["captions","subtitles","forced"].includes(i.kind)}),e){e=null,t=C(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value,n.mode==="showing"){e=null;break}else e||n.mode!=="hidden"||(e=n);e&&(e.mode="showing")}else for(e=C(t),t=e.next();!t.done;t=e.next())t=t.value,t.mode==="showing"&&(t.mode="hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){!this.j&&this.i&&this.i.m===2&&(this.j=this.i.h,this.l.Aa(this.i,"unloading",this.B),this.l.D(this.i,"textchanged",this.m),this.l.D(this.j.textTracks,"change",this.A),this.m())};function dy(e){var t=yt();return e.forced&&t.Da()==="WEBKIT"?"forced":e.kind==="caption"||e.roles&&e.roles.some(function(n){return n.includes("transcribes-spoken-dialog")})&&e.roles.some(function(n){return n.includes("describes-music-and-sound")})?"captions":"subtitles"}Pe("shaka.text.NativeTextDisplayer",kn),kn.prototype.enableTextDisplayer=kn.prototype.enableTextDisplayer,kn.prototype.setTextLanguage=kn.prototype.setTextLanguage,kn.prototype.setTextVisibility=kn.prototype.setTextVisibility,kn.prototype.isTextVisible=kn.prototype.isTextVisible,kn.prototype.destroy=kn.prototype.destroy,kn.prototype.append=kn.prototype.append,kn.prototype.remove=kn.prototype.remove,kn.prototype.configure=kn.prototype.configure;function fi(e,t){for(Et("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,e=C(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")}h=fi.prototype,h.configure=function(){},h.remove=function(e,t){return this.g?(dc(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},h.append=function(e){this.g&&_m(this.g,e)},h.destroy=function(){return this.g&&(dc(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},h.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},h.setTextVisibility=function(e){e&&!this.g&&pc(this),this.g&&(this.g.mode=e?"showing":"hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){pc(this)};function pc(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}Pe("shaka.text.SimpleTextDisplayer",fi),fi.prototype.enableTextDisplayer=fi.prototype.enableTextDisplayer,fi.prototype.setTextLanguage=fi.prototype.setTextLanguage,fi.prototype.setTextVisibility=fi.prototype.setTextVisibility,fi.prototype.isTextVisible=fi.prototype.isTextVisible,fi.prototype.destroy=fi.prototype.destroy,fi.prototype.append=fi.prototype.append,fi.prototype.remove=fi.prototype.remove,fi.prototype.configure=fi.prototype.configure;function di(){}h=di.prototype,h.configure=function(){},h.remove=function(){},h.append=function(){},h.destroy=function(){},h.isTextVisible=function(){return!1},h.setTextVisibility=function(){},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){},Pe("shaka.text.StubTextDisplayer",di),di.prototype.enableTextDisplayer=di.prototype.enableTextDisplayer,di.prototype.setTextLanguage=di.prototype.setTextLanguage,di.prototype.setTextVisibility=di.prototype.setTextVisibility,di.prototype.isTextVisible=di.prototype.isTextVisible,di.prototype.destroy=di.prototype.destroy,di.prototype.append=di.prototype.append,di.prototype.remove=di.prototype.remove,di.prototype.configure=di.prototype.configure;function oi(e,t){var n=this;this.m=!1,this.h=[],this.j=e,this.o=t,this.B=this.s=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.A=new dt(function(){n.j.paused||ul(n)}),hc(this),this.l=new Map,this.i=new Mt,this.i.D(document,"fullscreenchange",function(){ul(n,!0)}),this.i.D(this.j,"seeking",function(){ul(n,!0)}),this.i.D(this.j,"ratechange",function(){hc(n)}),this.i.D(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,r&&i?n.s=r/i:n.s=null}),this.C=null,"ResizeObserver"in x&&(this.C=new ResizeObserver(function(){ul(n,!0)}),this.C.observe(this.g)),this.F=new Map}h=oi.prototype,h.configure=function(e){this.B=e,hc(this),ul(this,!0)},h.append=function(e){var t=[].concat($(this.h));e=C(Lm(e));for(var n=e.next(),i={};!n.done;i={jg:void 0},n=e.next())i.jg=n.value,t.some(function(r){return function(l){return ed(l,r.jg)}}(i))||this.h.push(i.jg);this.h.length&&hc(this),ul(this)},h.destroy=function(){return this.g&&(this.g.parentElement&&this.o.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.A&&(this.A.stop(),this.A=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.C&&(this.C.disconnect(),this.C=null)),Promise.resolve()},h.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}),ul(this,n>this.h.length),this.h.length||hc(this),!0},h.isTextVisible=function(){return this.m},h.setTextVisibility=function(e){(this.m=e)?(this.g.parentElement||this.o.appendChild(this.g),ul(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)},h.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},h.enableTextDisplayer=function(){};function hc(e){e.A&&(e.h.length?e.A.Fa((e.B?e.B.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.A.stop())}function Um(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function py(e,t,n,i,r){var l=!1,c=[],f=[];t=C(t);for(var y=t.next();!y.done;y=t.next()){y=y.value,r.push(y);var m=e.l.get(y),w=y.startTime<=i&&y.endTime>i,T=m?m.aj:null;m&&(c.push(m.kg),m.Xc&&c.push(m.Xc),w||(l=!0,e.l.delete(y),m=null)),w&&(f.push(y),m?Um(e,T)||(l=!0):(jm(e,y,r),m=e.l.get(y),T=m.aj,l=!0)),0<y.nestedCues.length&&T&&py(e,y.nestedCues,T,i,r),r.pop()}if(l){for(i=C(c),r=i.next();!r.done;r=i.next())r=r.value,r.parentElement&&r.parentElement.removeChild(r);for(f.sort(function(I,D){return I.startTime!=D.startTime?I.startTime-D.startTime:I.endTime-D.endTime}),f=C(f),i=f.next();!i.done;i=f.next())i=e.l.get(i.value),i.Xc?(i.Xc.contains(n)&&i.Xc.removeChild(n),n.appendChild(i.Xc),i.Xc.appendChild(i.kg)):n.appendChild(i.kg)}}function ul(e,t){if(e.g){var n=e.j.currentTime;if(!e.m||t!==void 0&&t){t=C(e.F.values());for(var i=t.next();!i.done;i=t.next())Ks(i.value);Ks(e.g),e.l.clear(),e.F.clear()}e.m&&py(e,e.h,e.g,n,[])}}function jm(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"&&Yv(e,l,t,n,i),n=null,t.region&&t.region.id){var c=t.region,f=e.s===4/3?2.5:1.9;if(n=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==$n?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==$n?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var y=c.heightUnits==$n?"%":"px",m=c.widthUnits==$n?"%":"px",w=c.viewportAnchorUnits==$n?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var T=c.height,I=c.width;c.heightUnits===2&&(T=5.33*c.height,y="%"),c.widthUnits===2&&(I=c.width*f,m="%"),r.style.height=T+y,r.style.width=I+m,c.viewportAnchorUnits===2?(f=c.viewportAnchorY/75*100,y=c.viewportAnchorX/(e.s===4/3?160:210)*100,f-=c.regionAnchorY*T/100,y-=c.regionAnchorX*I/100,r.style.top=f+"%",r.style.left=y+"%"):(r.style.top=c.viewportAnchorY-c.regionAnchorY*T/100+w,r.style.left=c.viewportAnchorX-c.regionAnchorX*I/100+w),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,{kg:l,aj:r,Xc:n})}function lp(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Rc?n:e==="left"||e==="start"&&t===Mc||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===Mc?"line-right":"center"}function Yv(e,t,n,i,r){var l=t.style,c=n.nestedCues.length==0,f=1<i.length;l.whiteSpace="pre-wrap";var y=n.payload.replace(/\s+$/g,function(w){return" ".repeat(w.length)});if(l.webkitTextStrokeColor=n.textStrokeColor,l.webkitTextStrokeWidth=n.textStrokeWidth,l.color=n.color,l.direction=n.direction,l.opacity=n.opacity,l.paddingLeft=hy(n.linePadding,n,e.o),l.paddingRight=hy(n.linePadding,n,e.o),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 m=t;else m=document.createElement("span"),t.appendChild(m);n.border&&(m.style.border=n.border),r||((t=yy(i,function(w){return w.backgroundColor}))?m.style.backgroundColor=t:y&&(m.style.backgroundColor="rgba(0, 0, 0, 0.8)")),y&&(m.setAttribute("translate","no"),m.textContent=y)}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=hy(n.fontSize,n,e.o,e.B?e.B.fontScaleFactor:1),i=n.line,i!=null&&(c=n.lineInterpretation,c==ms&&(c=1,f=16,e.s&&1>e.s&&(f=32),i=0>i?100+i/f*100:i/f*100),c==1&&(l.position="absolute",n.writingMode==ua?(l.width="100%",n.lineAlign==su?l.top=i+"%":n.lineAlign=="end"&&(l.bottom=100-i+"%")):n.writingMode=="vertical-lr"?(l.height="100%",n.lineAlign==su?l.left=i+"%":n.lineAlign=="end"&&(l.right=100-i+"%")):(l.height="100%",n.lineAlign==su?l.right=i+"%":n.lineAlign=="end"&&(l.left=100-i+"%")))),l.lineHeight=n.lineHeight,e=lp(n),e=="line-left"?(l.cssFloat="left",n.position!==null&&(l.position="absolute",n.writingMode==ua?(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==ua?(l.right=100-n.position+"%",l.width="auto"):l.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(l.position="absolute",n.writingMode==ua?(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==ua?l.width=n.size+"%":l.height=n.size+"%")}function hy(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 yy(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||i===0)return i}return null}Pe("shaka.text.UITextDisplayer",oi),oi.prototype.enableTextDisplayer=oi.prototype.enableTextDisplayer,oi.prototype.setTextLanguage=oi.prototype.setTextLanguage,oi.prototype.setTextVisibility=oi.prototype.setTextVisibility,oi.prototype.isTextVisible=oi.prototype.isTextVisible,oi.prototype.remove=oi.prototype.remove,oi.prototype.destroy=oi.prototype.destroy,oi.prototype.append=oi.prototype.append,oi.prototype.configure=oi.prototype.configure;function gy(e,t){function n(l){for(var c=l,f=C(t),y=f.next();!y.done;y=f.next())y=y.value,y.end&&y.start<l&&(c+=y.end-y.start);return l=Math.floor(c/3600),f=Math.floor(c/60%60),y=Math.floor(c%60),c=Math.floor(1e3*c%1e3),(10>l?"0":"")+l+":"+(10>f?"0":"")+f+":"+(10>y?"0":"")+y+"."+(100>c?10>c?"00":"0":"")+c}var i=Fa(e);e=`WEBVTT

`,i=C(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 co: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}Pe("shaka.text.WebVttGenerator",function(){});function yc(e,t){this.h=e,this.g=t,this.i=void 0,this.s=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new Mt,this.j=null}yc.prototype.setMediaElement=function(e){this.j=e,Vu(this)},yc.prototype.configure=function(e){this.g=e};function my(e){e.s=!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.Ra()}function Bm(e,t){e.l=t,e.l?e.i==sp?e.i=Ya:e.i==o&&(e.i=a):e.i==Ya?e.i=sp:e.i==a&&(e.i=o)}function vy(e,t){if(e.g&&e.g.enabled&&e.g.version==wy&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function Bu(e,t,n){try{if(!e.g.enabled)return t;var i=al(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=qa;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=Ef;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=Vm;break e}r=void 0}i.ot=r,i.su=!0;var l=xf(i);return ap(t,l)}catch(c){return Jl("CMCD_SRC_ERROR","Could not generate src CMCD data.",c),t}}function Vu(e){e.C.Aa(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.Aa(e.j,"playing",function(){e.o||(e.o=Date.now())})}function al(e){return e.g.sessionId||(e.g.sessionId=x.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function sl(e,t,n){n=n===void 0?{}:n;var i=i===void 0?e.g.useHeaders:i;if(e.g.enabled)if(e=Qv(e,n),i)i=up(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var r=xf(e);r&&(t.uris=t.uris.map(function(l){return ap(l,r)}))}}function wf(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 Hu(e){if(e.type===0)return Af;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?Ef:za;if(t=="audio")return qa;if(t=="text")return e.mimeType==="application/mp4"?Xa:Cf}}function Wv(e,t){if(t=e.h.Nb()[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 Sy(e,t){if(t=e.h.Nb()[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 Tf(e,t){var n=e.h.Qb();if(!n.length)return NaN;e=n[0],n=C(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 za:return e.videoBandwidth||NaN;case qa:return e.audioBandwidth||NaN;default:return e.bandwidth}}function Qv(e,t){t=t===void 0?{}:t,Object.assign(t,al(e)),t.pr=e.h.ub();var n=t.ot===za||t.ot===Ef;return e.B&&n&&(t.bs=!0,t.su=!0,e.B=!1),t.su==null&&(t.su=e.F),t.v===wy&&(e.h.V()&&(t.ltc=e.h.Ue()),n=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,n!=null&&(t.msd=n,e.G=!0)),wf(e,t)}function xf(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=C(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var y=e[f];if(i(y)&&(f!=="v"||y!==1)&&(f!="pr"||y!==1)){var m=l[f];m&&(y=m(y)),m=typeof y;var w=void 0;w=m==="string"&&f!=="ot"&&f!=="sf"&&f!=="st"?f+"="+JSON.stringify(y):m==="boolean"?f:m==="symbol"?f+"="+y.description:f+"="+y,r.push(w)}}return r.join(",")}function up(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=C(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=xf(r[e]))&&(n["CMCD-"+i[e]]=l);return n}function ap(e,t){return!t||e.includes("offline:")?e:(e=new dn(e),e.g.set("CMCD",t),e.toString())}var Vm="m",qa="a",za="v",Ef="av",Af="i",Cf="c",Xa="tt",wy=2,sp="d",Ya="ld",o="h",a="lh";Pe("shaka.util.CmcdManager.StreamingFormat",{DASH:sp,Ml:Ya,HLS:o,Nl:a,am:"s",OTHER:"o"});function d(e){this.h=e,this.g=null}h=d.prototype,h.configure=function(e){this.h=e},h.Yh=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(k)?1e3*this.g.get(k):null},h.Wh=function(){return this.h.enabled&&this.g&&this.g.has(E)?1e3*this.g.get(E):null},h.Oj=function(){return this.h.enabled&&this.g&&this.g.has(B)?this.g.get(B):null},h.Pj=function(){return this.h.enabled&&this.g&&this.g.has(H)?this.g.get(H):null},h.getBandwidthEstimate=function(e){var t=this.Wh();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function g(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Pe("shaka.util.CmsdManager",d),d.prototype.getBandwidthEstimate=d.prototype.getBandwidthEstimate,d.prototype.getRoundTripTime=d.prototype.Pj,d.prototype.getResponseDelay=d.prototype.Oj,d.prototype.getEstimatedThroughput=d.prototype.Wh,d.prototype.getMaxBitrate=d.prototype.Yh;var E="etp",k="mb",B="rd",H="rtt";function ie(){this.g=null,this.h=[]}function we(e,t){return G(function(n){if(n.g==1)return e.g?_(n,new Promise(function(i){return e.h.push(i)}),2):n.u(2);e.g=t,ce(n)})}ie.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function F(e,t,n){t=t===void 0?null:t,It.call(this);var i=this;this.m=qm,this.h=null,this.we=t,this.ba=!1,this.Be=new Mt,this.pe=new Mt,this.j=new Mt,this.bc=new Mt,this.wd=new Mt,this.F=this.G=this.C=this.I=null,this.Ce=0,this.ka=new ie,this.N=this.ha=this.W=this.i=this.qc=this.H=this.l=this.le=this.S=this.Gh=this.va=this.L=this.ab=this.ya=this.me=this.P=this.Ka=this.K=this.Zb=null,this.Oa=!1,this.Za=this.s=null,this.ve=1e9,this.Ae=[],this.eb=[],this.Wf=-1,this.g=zl(this),this.Yf=Dm(),this.U=null,this.Ee=-1,this.$b=null,this.wa={width:1/0,height:1/0},this.ue=new Sd(this.g,this.wa,null),this.ye=[],this.A=null,this.M=this.g.adaptationSetCriteriaFactory(),this.M.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Ec:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Jc:this.g.preferredAudioLabel,Ed:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.xd=this.g.preferredTextLanguage,this.se=this.g.preferredTextRole,this.re=this.g.preferForcedSubs,this.qe=[],n&&n(this),this.L=pb(this),this.va=new d(this.g.cmsd),this.I=V2(this),this.zd=this.na=this.za=this.B=null,this.$f=!1,this.Xf=[],this.Zf=new dt(function(){return G(function(r){if(r.g==1)return i.na?_(r,i.fc(i.zd,!0),3):r.u(0);if(r.g!=4)return _(r,i.load(i.na),4);i.$f?i.zd.pause():i.zd.play(),i.na=null,i.$f=!1,ce(r)})}),zm&&(this.B=zm(),this.B.configure(this.g.ads),this.wd.D(this.B,"ad-content-pause-requested",function(r){var l;return G(function(c){if(c.g==1)return i.Zf.stop(),i.na?c.u(0):(i.zd=i.h,i.$f=i.Wd(),l=r.saveLivePosition||!1,_(c,i.Qh(!0,l),3));i.na=c.h,ce(c)})}),this.wd.D(this.B,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.na){var l=i.na;l.m&&r&&(typeof l.m=="number"?l.m+=r:l.m.setTime(l.m.getTime()+1e3*r))}i.Zf.ia(.1)}),this.wd.D(this.B,"ad-content-attach-requested",function(){return G(function(r){return i.h||!i.zd?r.u(0):_(r,i.fc(i.zd,!0),0)})})),Xm&&(this.za=Xm(this),this.za.configure(this.g.queue)),this.Be.D(x,"online",function(){i1(i),i.eh()}),this.xe=new dt(function(){for(var r=Date.now()/1e3,l=!1,c=!0,f=C(i.i.variants),y=f.next();!y.done;y=f.next())y=y.value,0<y.disabledUntilTime&&y.disabledUntilTime<=r&&(y.disabledUntilTime=0,l=!0),0<y.disabledUntilTime&&(c=!1);c&&i.xe.stop(),l&&bf(i,!1,void 0,!1,!1)}),this.Pa=null,e&&(Et("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.fc(e,!0)),this.o=null}$e(F,It);function Ie(e){e.S!=null&&(zf(e.S),e.S.release(),e.S=null)}function Te(e,t,n){n||t.lcevc.enabled?(Ie(e),e.S==null&&(e.S=new ea(e.h,e.Gh,t.lcevc,n),e.G&&(e.G.M=e.S))):Ie(e)}function de(e,t){return new ke(e,t)}h=F.prototype,h.destroy=function(){var e=this,t;return G(function(n){switch(n.g){case 1:return e.m==cl?n.return():(Ie(e),t=e.detach(),e.m=cl,_(n,t,2));case 2:return _(n,e.ng(),3);case 3:if(e.Be&&(e.Be.release(),e.Be=null),e.pe&&(e.pe.release(),e.pe=null),e.j&&(e.j.release(),e.j=null),e.bc&&(e.bc.release(),e.bc=null),e.wd&&(e.wd.release(),e.wd=null),e.Za=null,e.g=null,e.A=null,e.we=null,e.L=null,e.va=null,!e.I){n.u(4);break}return _(n,e.I.destroy(),5);case 5:e.I=null;case 4:e.s&&(e.s.release(),e.s=null),e.za&&(e.za.destroy(),e.za=null),It.prototype.release.call(e),ce(n)}})};function bt(e,t){uw.set(e,t)}function pt(e,t){e.dispatchEvent(de("onstatechange",new Map().set("state",t)))}h.fc=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==cl)throw new Y(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){c.u(2);break}return _(c,n.detach(),2);case 2:return _(c,yn(n,"attach"),4);case 4:if(c.h)return c.return();if(he(c,5,6),i||(pt(n,"attach"),r=function(){var f=r1(n,!1);f&&cp(n,f)},n.pe.D(e,"error",r),n.h=e,n.L&&n.L.setMediaElement(e)),yt(),!t||!Fu()||n.G){c.u(6);break}return _(c,Tt(n),6);case 6:xe(c),n.ka.release(),Ue(c,0);break;case 5:return l=De(c),_(c,n.detach(),10);case 10:throw l}})},h.fj=function(e){this.Gh=e},h.detach=function(e){e=e===void 0?!1:e;var t=this;return G(function(n){if(n.g==1){if(t.m==cl)throw new Y(2,7,7e3);return _(n,t.vc(!1,e),2)}if(n.g!=3)return _(n,yn(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.pe.Ra(),t.h=null),pt(t,"detach"),t.B&&!e&&t.B.release()}finally{t.ka.release()}ce(n)})};function yn(e,t){var n;return G(function(i){return i.g==1?(n=++e.Ce,_(i,we(e.ka,t),2)):n!=e.Ce?(e.ka.release(),i.return(!0)):i.return(!1)})}h.vc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i,r,l,c,f,y,m,w,T,I,D,M,L;return G(function(P){switch(P.g){case 1:return n.m!=cl&&(n.m=qm),_(P,yn(n,"unload"),2);case 2:return P.h?P.return():(ot(P,3),n.Oa=!1,pt(n,"unload"),Ie(n),i=n.qe.map(function(j){return j()}),n.qe=[],_(P,Promise.all(i),5));case 5:if(n.dispatchEvent(de("unloading")),n.me&&(n.me.release(),n.me=null),n.ya&&(n.ya.release(),n.ya=null),n.ab&&(n.ab.release(),n.ab=null),n.h&&(n.j.Ra(),n.bc.Ra()),n.xe.stop(),n.Zb&&(n.Zb.release(),n.Zb=null),n.Ka&&(n.Ka.stop(),n.Ka=null),!n.H){P.u(6);break}return _(P,n.H.stop(),7);case 7:n.H=null,n.qc=null;case 6:if(!n.s){P.u(8);break}return _(P,n.s.stop(),8);case 8:if(!n.l){P.u(10);break}return _(P,n.l.destroy(),11);case 11:n.l=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.F&&(n.F.release(),n.F=null),x.shakaMediaKeysPolyfill!=="webkit"||!n.C){P.u(12);break}return _(P,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.G){P.u(14);break}return _(P,n.G.destroy(),15);case 15:n.G=null;case 14:if(n.B&&!t&&n.B.onAssetUnload(),n.na&&!t&&(n.na.destroy(),n.na=null),t||n.Zf.stop(),n.L&&my(n.L),n.va&&(n.va.g=null),!n.o){P.u(16);break}return _(P,n.o.destroy(),17);case 17:n.o=null;case 16:if(n.ba=!1,n.h){for(r=C(n.Xf),l=r.next();!l.done;l=r.next())c=l.value,c.src.startsWith("blob:")&&URL.revokeObjectURL(c.src),c.remove();n.Xf=[],rf(n.h)&&n.h.load()}if(!n.C){P.u(18);break}return _(P,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.Pa&&n.W!=n.Pa.nd()&&(n.Pa.o||n.Pa.destroy(),n.Pa=null),n.W=null,n.ha=null,n.P=null,n.i){for(f=C(n.i.variants),y=f.next();!y.done;y=f.next())for(m=y.value,w=C([m.audio,m.video]),T=w.next();!T.done;T=w.next())(I=T.value)&&I.segmentIndex&&I.segmentIndex.release();for(D=C(n.i.textStreams),M=D.next();!M.done;M=D.next())L=M.value,L.segmentIndex&&L.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(yu.clear(),ma.clear()),n.i=null,n.A=new np,n.Fh=null,n.$b=null,n.U=null,n.Ee=-1,n.Ae=[],n.eb=[],n.Wf=-1,n.I&&n.I.Mh(),Gm(n);case 3:xe(P),n.ka.release(),Ue(P,4);break;case 4:if(yt(),e&&Fu()&&!n.G&&n.h)return _(P,Tt(n),0);P.u(0)}})},h.cl=function(e){this.N=e},h.load=function(e,t,n){t=t===void 0?null:t;var i=this,r,l,c,f,y,m,w,T,I,D,M,L,P,j;return G(function(V){switch(V.g){case 1:if(i.m==cl)throw new Y(2,7,7e3);if(r=null,l="",e instanceof Nn){if(e.o)throw new Y(2,7,7006);r=e,l=r.nd()||""}else l=e||"";return _(V,we(i.ka,"load"),2);case 2:if(i.ka.release(),!i.h)throw new Y(2,7,7002);if(!i.W){V.u(3);break}return i.W=l,_(V,i.vc(!1),3);case 3:if(c=++i.Ce,f=function(){return G(function(K){if(K.g==1)return i.Ce==c?K.u(0):r?_(K,r.destroy(),3):K.u(3);throw new Y(2,7,7e3)})},y=function(K,q){return G(function(Q){switch(Q.g){case 1:return ot(Q,2),_(Q,we(i.ka,q),4);case 4:return _(Q,f(),5);case 5:return _(Q,K(),6);case 6:return _(Q,f(),7);case 7:r&&i.g&&(r.g=i.g);case 2:xe(Q),i.ka.release(),Ue(Q,0)}})},he(V,5,6),t==null&&r&&(t=r.getStartTime()),i.N=t,i.Oa=!1,i.dispatchEvent(de("loading")),r){n=r.W,V.u(8);break}if(n){V.u(8);break}return _(V,y(function(){return G(function(K){if(K.g==1)return _(K,rt(i,l),2);n=K.h,ce(K)})},"guessMimeType_"),8);case 8:if(m=!!r,r){nl(r,i),i.A=r.getStats(),V.u(11);break}return _(V,ve(i,l,t,n,!0,i.g),12);case 12:(r=V.h)?(r.B=!1,nl(r,i),i.A=r.getStats(),r.start(),r.s.catch(function(){})):i.A=new np;case 11:return w=!r,T=Date.now()/1e3,i.A=r?r.getStats():new np,i.W=l,i.ha=n||null,Gm(i),I=function(){var K=i.Nb(),q={start:0,end:0};if(K.total.length){q.start=1/0,K=C(K.total);for(var Q=K.next();!Q.done;Q=K.next())Q=Q.value,Q.start<q.start&&(q.start=Q.start),Q.end>q.end&&(q.end=Q.end)}return q},i.ya=new Xr(I),i.ya.addEventListener("regionadd",function(K){Zv(i,K.region,"metadataadded")}),w?_(V,y(function(){return G(function(K){return _(K,Ku(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.ab=new Xr(I),_(V,y(function(){return G(function(K){if(K.g==1)return _(K,Promise.race([r.va,r.s]),2);i.qc=r.G;var q=r;q.wa=!0,i.H=q.l,i.i=r.Fg(),ce(K)})},"waitForFinish"),15));case 15:if(i.G){V.u(16);break}return _(V,y(function(){return G(function(K){return _(K,Tt(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.o.enableTextDisplayer?i.o.enableTextDisplayer():Et("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),_(V,y(function(){return G(function(K){return _(K,r.s,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.ue=r.F,i.H&&i.H.setMediaElement&&i.h&&i.H.setMediaElement(i.h),i.me=Kv(r),i.le=r.Pa,(D=r.A)&&(i.M=D),m&&i.h&&i.h.nodeName==="AUDIO"&&(ye(i),i.configure("manifest.disableVideo",!0)),r.i){V.u(19);break}return _(V,y(function(){return G(function(K){return _(K,Nm(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.C=cc(r),_(V,y(function(){return G(function(K){return _(K,i.C.fc(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(M=r.C)||i.Za&&i.Za==M||(i.s=Hv(r),i.Za=r.C,typeof i.s.setMediaElement!="function"&&(Et("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.s.setMediaElement=function(){}),typeof i.s.setCmsdManager!="function"&&(Et("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.s.setCmsdManager=function(){}),typeof i.s.trySuggestStreams!="function"&&(Et("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.s.trySuggestStreams=function(){})),L=Mm(r),P=r.K,_(V,y(function(){return G(function(K){return _(K,cn(i,T,P,L),0)})},"loadInner_"),22);case 22:rp(r),i.ha&&yt().Wi()&&ca(i.ha)&&Wo(i.G,i.W,i.ha),V.u(14);break;case 23:return _(V,y(function(){return G(function(K){return _(K,Jv(i,T,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(de("loaded"));case 6:if(xe(V),!r){V.u(25);break}return _(V,r.destroy(),25);case 25:i.Pa=null,Ue(V,0);break;case 5:if(j=De(V),!j||j.code==7e3){V.u(27);break}return _(V,i.vc(!1),27);case 27:throw j}})};function ye(e){for(var t=C(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})}h.Yk=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?_(r,se(n),2):r.g!=3?(i=r.h,_(r,n.vc(e,t),3)):r.return(i)})},h.Qh=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?_(r,se(n,t),2):r.g!=3?(i=r.h,_(r,n.detach(e),3)):r.return(i)})};function se(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.qc&&e.W&&e.g?(i=e.h.currentTime,e.V()&&!t&&(i=null),_(r,be(e,e.W,i,e.ha,e.g,!0,!1,!1),3)):r.u(2);if(r.g!=2){n=r.h,e.ye.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var l=n,c=e.H,f=e.qc;l.h=e.i,l.l=c,l.G=f,n.A=e.M,n.start(),e.i=null,e.H=null,e.qc=null,e.s=null,e.Za=null}return r.return(n)})}h.preload=function(e,t,n,i){t=t===void 0?null:t;var r=this,l,c;return G(function(f){return f.g==1?(l=zl(r),tl(l,i||r.g,zl(r)),_(f,ve(r,e,t,n,!1,l),2)):((c=f.h)?c.start():cp(r,new Y(2,7,7005)),f.return(c))})},h.ng=function(){var e=this,t,n,i,r;return G(function(l){for(t=[],n=C(e.ye),i=n.next();!i.done;i=n.next())r=i.value,r.o||t.push(r.destroy());return e.ye=[],_(l,Promise.all(t),0)})};function ve(e,t,n,i,r,l){r=r===void 0?!1:r;var c,f,y,m;return G(function(w){return w.g==1?i?w.u(2):_(w,rt(e,t),3):(w.g!=2&&(i=w.h),qt(e,i)?w.return(null):(c=l||e.g,f=!1,y=!0,r&&(e.s&&e.Za==c.abrFactory&&(y=!1),e.h&&e.h.nodeName==="AUDIO"&&(f=!0)),m=be(e,t,n,i||null,c,!r,f,y),m=r?m.then(function(T){return T.B=!1,T}):m.then(function(T){return e.ye.push(T),T}),w.return(m)))})}function be(e,t,n,i,r,l,c,f){l=l===void 0?!0:l,c=c===void 0?!1:c,f=f===void 0?!0:f;var y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z;return G(function(X){return X.g==1?(y=null,m=Tr(r),c&&(m.manifest.disableVideo=!0),w=function(){return y.S&&y.o?null:y},T=function(){return w()?w().getConfiguration():e.g},e.wa.width!=1/0||e.wa.height!=1/0||e.g.ignoreHardwareResolution?X.u(2):(I=yt(),_(X,I.ic(),3))):(X.g!=2&&(D=X.h,e.wa.width=D.width,e.wa.height=D.height),M=new Sd(m,e.wa,null),L={networkingEngine:e.I,filter:function(W){var J,ne;return G(function(te){if(te.g==1)return _(te,Wc(M,W),2);if(te.g!=4)return J=te.h,J?(ne=de("trackschanged"),_(te,Promise.resolve(),4)):te.u(0);y.dispatchEvent(ne),ce(te)})},makeTextStreamsForClosedCaptions:function(W){return vb(e,W)},onTimelineRegionAdded:function(W){Qs(y.H,W)},onEvent:function(W){return y.dispatchEvent(W)},onError:function(W){return y.onError(W)},isLowLatencyMode:function(){return T().streaming.lowLatencyMode},updateDuration:function(){e.l&&y.S&&e.l.updateDuration()},newDrmInfo:function(W){var J=y.i,ne=J?J.g:null;ne&&J.A&&xh(M,ne.keySystem,W)},onManifestUpdated:function(){var W=new Map().set("isLive",e.V());y.dispatchEvent(de("manifestupdated",W)),sc(y,!1,function(){e.B&&e.B.onManifestUpdated(e.V())})},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},onMetadata:function(W,J,ne,te){var ee=W;W=="com.apple.hls.interstitial"&&(ee="com.apple.quicktime.HLS",W={startTime:J,endTime:ne,values:te},e.B)&&e.B.onHLSInterstitialMetadata(e,e.h,W),te=C(te),W=te.next();for(var ge={};!W.done;ge={Xg:void 0},W=te.next())ge.Xg=W.value,ge.Xg.name!="ID"&&sc(y,!1,function(fe){return function(){$v(e,J,ne,ee,fe.Xg)}}(ge))},disableStream:function(W){return e.disableStream(W,e.g.streaming.maxDisabledTime)},addFont:function(W,J){return e.addFont(W,J)}},P=new Xr(function(){return e.Sa()}),P.addEventListener("regionadd",function(W){var J=W.region;Ey(e,"timelineregionadded",J,y),sc(y,!1,function(){e.B&&(e.B.onDashTimedMetadata(J),e.B.onDASHInterstitialMetadata(e,e.h,J))})}),j=null,m.streaming.observeQualityChanges&&(j=new Ui(function(){return e.Nb()}),j.addEventListener("qualitychange",function(W){iw(e,W.quality,W.position)}),j.addEventListener("audiotrackchange",function(W){iw(e,W.quality,W.position,!0)})),V=!0,K={pc:e.I,onError:function(W){return y.onError(W)},rf:function(W){sc(y,!0,function(){if(e.C)e:{var J=W,ne=de("keystatuschanged");e.dispatchEvent(ne);var te=Object.keys(J);te.length==1&&te[0]==""&&(te=["00"],J={"00":J[""]}),ne=te.length==1&&te[0]=="00";var ee=!1;if(te.length){te=e.keySystem();for(var ge=wu(e.g.drm.clearKeys),fe=C(e.i.variants),le=fe.next();!le.done;le=fe.next()){le=le.value;var pe=[];le.audio&&pe.push(le.audio),le.video&&pe.push(le.video),pe=C(pe);for(var Ee=pe.next();!Ee.done;Ee=pe.next()){var Ce=Ee.value;if(Ee=le.allowedByKeySystem,Ce.keyIds.size)if(Ce.drmInfos.length&&!ge.size){Ce=C(Ce.drmInfos);for(var Be=Ce.next();!Be.done;Be=Ce.next())if(Be=Be.value,Be.keyIds.size&&Be.keySystem==te){le.allowedByKeySystem=!0,Be=C(Be.keyIds);for(var Le=Be.next();!Le.done;Le=Be.next())Le=Le.value,((Le=J[ne?"00":Le])||e.C.G)&&(le.allowedByKeySystem=le.allowedByKeySystem&&!!Le&&!wd.includes(Le))}}else for(le.allowedByKeySystem=!0,Ce=C(Ce.keyIds),Be=Ce.next();!Be.done;Be=Ce.next())Be=Be.value,((Be=J[ne?"00":Be])||e.C.G)&&(le.allowedByKeySystem=le.allowedByKeySystem&&!!Be&&!wd.includes(Be));Ee!=le.allowedByKeySystem&&(ee=!0)}}}if(ee&&(Zi(e),!Wa(e)))break e;(J=e.l.o)&&!J.allowedByKeySystem&&bf(e)}})},onExpirationUpdated:function(W,J){var ne=de("expirationupdated");y.dispatchEvent(ne),(ne=y.l)&&ne.onExpirationUpdated&&ne.onExpirationUpdated(W,J)},onEvent:function(W){y.dispatchEvent(W),W.type=="drmsessionupdate"&&V&&(V=!1,W=Date.now()/1e3-y.Ka,(e.A||y.getStats()).m=W,e.S&&zf(e.S))}},q=V2(e,w),sh(e.I,q),Q=function(){return e.hd(K)},z={config:m,pk:L,Ck:P,Bk:j,hd:Q,nk:M,networkingEngine:q,ej:l,dj:f},y=new Nn(t,i,n,z),f||Gv(y,e.s,e.Za),X.return(y))})}function rt(e,t){var n,i,r;return G(function(l){return l.g==1?(n=e.g.manifest.retryParameters,_(l,ol(t,e.I,n),2)):(i=l.h,i=="application/x-mpegurl"&&(r=yt(),r.Da()==="WEBKIT"&&(i="application/vnd.apple.mpegurl")),l.return(i))})}function qt(e,t){if(!Fu(yt()))return!0;if(t){if((e.h||ku()).canPlayType(t)=="")return!1;if(!Fu(yt())||!Ca.has(t))return!0;if(ca(t))return yt().Da()==="WEBKIT"&&(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 at(e){var t=e.g.textDisplayFactory;if(e.Fh!==t){var n=e.o;e.o=t(),e.o.configure?e.o.configure(e.g.textDisplayer):Et("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.o.setTextLanguage||Et("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),n?(e.o.setTextVisibility(n.isTextVisible()),n.destroy().catch(function(){})):e.o.setTextVisibility(e.ba),e.G&&Nu(e.G,e.o),e.Fh=t,e.l&&Nv(e.l)}else e.o&&e.o.configure&&e.o.configure(e.g.textDisplayer)}function Tt(e){var t,n,i;return G(function(r){if(r.g==1)return yt(),pt(e,"media-source"),e.g.mediaSource.useSourceElements&&rf(e.h),at(e),t=db(e.h,e.o,{Ej:function(){return e.keySystem()},onMetadata:function(l,c,f){l=C(l);for(var y=l.next();!y.done;y=l.next())if(y=y.value,y.data&&typeof y.cueTime=="number"&&y.frames){var m=y.cueTime+c,w=f;w&&m>w&&(w=m);for(var T=C(y.frames),I=T.next();!I.done;I=T.next())$v(e,m,w,"org.id3",I.value);e.B&&e.B.onHlsTimedMetadata(y,m)}},wk:function(l){e.ab&&Qs(e.ab,{schemeIdUri:l.schemeIdUri,startTime:l.startTime,endTime:l.endTime,id:String(l.id),emsg:l})},onEvent:function(l){return e.dispatchEvent(l)},yk:function(){e.H&&e.H.update&&e.H.update()}},e.S,e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ka=i,_(r,t.K,2);e.G=t,ce(r)})}function pi(e,t,n){function i(){return t1(e)}if(e.j.D(t,"playing",i),e.j.D(t,"pause",i),e.j.D(t,"ended",i),e.j.D(t,"ratechange",function(){var l=e.h.playbackRate;l!=0&&(e.K&&(e.K.set(l),e.m==Bi&&e.s.playbackRateChanged(l),W2(e,l)),l=de("ratechange"),e.dispatchEvent(l))}),t.remote&&(e.j.D(t.remote,"connect",function(){e.l&&t.remote.state=="connected"&&If(e),Zi(e)}),e.j.D(t.remote,"connecting",function(){return Zi(e)}),e.j.D(t.remote,"disconnect",function(){return G(function(l){if(l.g==1)return e.l&&t.remote.state=="disconnected"?_(l,Ht(e.l),3):l.u(2);l.g!=2&&If(e),Zi(e),ce(l)})})),t.audioTracks&&(e.j.D(t.audioTracks,"addtrack",function(){return Zi(e)}),e.j.D(t.audioTracks,"removetrack",function(){return Zi(e)}),e.j.D(t.audioTracks,"change",function(){return Zi(e)})),t.videoTracks&&(e.j.D(t.videoTracks,"addtrack",function(){return Zi(e)}),e.j.D(t.videoTracks,"removetrack",function(){return Zi(e)}),e.j.D(t.videoTracks,"change",function(){return Zi(e)})),t.textTracks){var r=function(){e.m===Pr&&e.o instanceof kn&&If(e),Zi(e)};e.j.D(t.textTracks,"addtrack",function(l){if(l.track)switch(l=l.track,l.kind){case"metadata":ub(e,l);break;case"chapters":ab(e,l);break;default:r()}}),e.j.D(t.textTracks,"removetrack",r),e.j.D(t.textTracks,"change",r),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.j.D(t,"waiting",function(){e.l&&hf(e.l)}),e.j.D(t,"timeupdate",function(){e.l&&hf(e.l)}))}t.preload!="none"&&e.j.Aa(t,"loadedmetadata",function(){e.A.F=Date.now()/1e3-n})}function cn(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le;return G(function(pe){switch(pe.g){case 1:for(pt(e,"load"),r=e.h,e.K=new Pa({Ve:function(){return r.playbackRate},Pc:function(){return r.defaultPlaybackRate},nh:function(Ee){r.playbackRate=Ee},ni:function(Ee){r.currentTime+=Ee}}),pi(e,r,t),("onchange"in x.screen)&&e.j.D(x.screen,"change",function(){if(e.M.getConfiguration){var Ee=e.M.getConfiguration();Ee.Ec=="AUTO"?Wa(e):e.g.preferredVideoHdrLevel=="AUTO"&&e.g.abr.enabled&&(Ee.Ec="AUTO",e.M.configure(Ee),Wa(e))}}),l=!1,c=C(e.i.variants),f=c.next();!f.done;f=c.next())y=f.value,(m=y.video&&y.video.dependencyStream)&&(l=ta(m));Te(e,e.g,l),e.xd=e.g.preferredTextLanguage,e.se=e.g.preferredTextRole,e.re=e.g.preferForcedSubs,o1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.s.init(function(Ee,Ce,Be){e.i&&e.l&&Ee!=e.l.o&&Ty(e,Ee,!0,Ce===void 0?!1:Ce,Be===void 0?0:Be)}),e.s.setMediaElement(r),e.s.setCmsdManager(e.va),e.l=hb(e),e.l.configure(e.g.streaming),e.m=Bi,e.dispatchEvent(de("streaming")),w=n;case 2:for((I=e.l.o)||w||(w=Wa(e)?e.s.chooseVariant():null),D=[],T=I||w,M=C([T.video,T.audio]),L=M.next();!L.done;L=M.next())(P=L.value)&&!P.segmentIndex&&(D.push(P.createSegmentIndex()),P.dependencyStream&&D.push(P.dependencyStream.createSegmentIndex()));if(!(0<D.length)){pe.u(4);break}return _(pe,Promise.all(D),4);case 4:if(!T||T.disabledUntilTime!=0){pe.u(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(T),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Yf):Ct("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&&(Bm(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),vy(e.L,1e3*t)),o1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),wm(e.l,e.g.playRangeStart,e.g.playRangeEnd),e.Oa=!0,e.dispatchEvent(de("canupdatestarttime")),j=function(Ee){e.F=sb(e,Ee),e.Zb=cb(e,Ee),H2(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(V=e.N,V==null&&e.i.startTime&&(V=e.i.startTime),j(V)),I){pe.u(7);break}if(!e.g.streaming.startAtSegmentBoundary){pe.u(8);break}return K=e.i.presentationTimeline,e.N instanceof Date&&(Q=K.m||K.i,z=e.N.getTime()/1e3-Q,z!=null&&(q=z)),q==null&&(q=typeof e.N=="number"?e.N:e.h.currentTime),e.N==null&&e.i.startTime&&(q=e.i.startTime),X=K.Xb(),W=K.Fb(),q<X?q=X:q>W&&(q=W),_(pe,Sb(w,q),9);case 9:J=pe.h,j(J);case 8:Ty(e,w,!0,!1,0);case 7:return e.F.ready(),ne=e.Dc().find(function(Ee){return Ee.active}),ne||((te=Wi(e.i.textStreams,e.xd,e.se,e.re)[0]||null)&&gf(e.A.h,te,!0),w&&(te?(lh(w.audio,te,e.g)&&(e.ba=!0),e.ba&&e.o.setTextVisibility(!0)):(e.ba=!1,e.o.setTextVisibility(!1)),tw(e)),te&&(e.g.streaming.alwaysStreamText||e.Ng())&&(Xd(e.l,te),xy(e))),_(pe,e.l.start(i),10);case 10:e.g.abr.enabled&&(e.s.enable(),nw(e)),Zi(e),Wa(e),e.i.variants.some(function(Ee){return Ee.primary}),((ee=e.V())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(ge=function(){return Q2(e)},e.j.D(r,"timeupdate",ge)),ee||(fe=function(){return Fm(e)},e.j.D(r,"timeupdate",fe),Fm(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(le=function(){var Ee;return G(function(Ce){if(Ce.g==1)return Ee=e.Sa().end-e.h.currentTime,isNaN(Ee)||!(Ee<=e.g.streaming.preloadNextUrlWindow)?Ce.u(0):(e.j.Ja(r,"timeupdate",le),_(Ce,e.preload(e.i.nextUrl),4));e.Pa=Ce.h,ce(Ce)})},e.j.D(r,"timeupdate",le)),e.j.D(r,"ended",function(){e.load(e.Pa||e.i.nextUrl)}))),e.B&&e.B.onManifestUpdated(ee),ce(pe)}})}function Ku(e,t){var n,i,r;return G(function(l){return l.g==1?(n=Date.now()/1e3,i=!0,e.C=e.hd({pc:e.I,onError:function(c){cp(e,c)},rf:function(){},onExpirationUpdated:function(){var c=de("expirationupdated");e.dispatchEvent(c)},onEvent:function(c){e.dispatchEvent(c),c.type=="drmsessionupdate"&&i&&(i=!1,e.A.m=Date.now()/1e3-n)}}),e.C.configure(e.g.drm),r=Is([t]),e.C.ha=!0,_(l,Ug(e.C,[r],[]),2)):_(l,e.C.fc(e.h),0)})}function Jv(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M;return G(function(L){switch(L.g){case 1:if(pt(e,"src-equals"),i=e.h,e.F=new Ud(i),r=!1,e.qe.push(function(){r=!0}),e.dispatchEvent(de("canupdatestarttime")),e.N!=null&&e.F.Vf(e.N),e.Zb=fb(e,e.N||0),e.K=new Pa({Ve:function(){return i.playbackRate},Pc:function(){return i.defaultPlaybackRate},nh:function(P){i.playbackRate=P},ni:function(P){i.currentTime+=P}}),H2(e,i,!0),i.textTracks&&(at(e),l=function(P){if(!(e.o instanceof kn)){var j=Hm(e).find(function(V){return V.mode!=="disabled"});j&&(j.mode=P?"showing":"hidden"),e.o instanceof fi&&(j=yb(e))&&(j.mode=!P&&e.o.isTextVisible()?"showing":"hidden")}},e.j.D(i,"enterpictureinpicture",function(){return l(!0)}),e.j.D(i,"leavepictureinpicture",function(){return l(!1)}),i.remote?(e.j.D(i.remote,"connect",function(){return l(!1)}),e.j.D(i.remote,"connecting",function(){return l(!1)}),e.j.D(i.remote,"disconnect",function(){return l(!1)})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.j.D(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return l(!1)}),c=i,c.webkitSupportsFullscreen&&e.j.D(c,"webkitpresentationmodechanged",function(){return l(c.webkitPresentationMode!=="inline")})),pi(e,i,t),f=Bu(e.L,e.W,n),!f.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(f+="#t=",0<e.g.playRangeStart&&(f+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(f+=","+e.g.playRangeEnd)),!e.G){L.u(2);break}return _(L,e.G.destroy(),3);case 3:e.G=null;case 2:return rf(i),i.src=f,y=yt(),y.La()=="TV"&&i.load(),i.preload!="none"&&!i.autoplay&&ca(n)&&y.Da()==="WEBKIT"&&i.load(),e.m=Pr,e.dispatchEvent(de("streaming")),m=new ct,on(i,HTMLMediaElement.HAVE_METADATA,e.j,function(){e.F.ready(),e.ha&&ca(e.ha)||m.resolve()}),w=function(){return new Promise(function(P){var j=new dt(P);e.j.D(i.textTracks,"change",function(){return j.ia(.5)}),j.ia(.5)})},on(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var P,j,V,K,q;return G(function(Q){if(Q.g==1)return _(Q,w(),2);if(r)return Q.return();if(ob(e),P=Hm(e),P.some(function(z){return z.mode==="showing"})&&(e.ba=!0,e.o.setTextVisibility(!0)),!(e.o instanceof kn))for(P.length&&(e.o.enableTextDisplayer?e.o.enableTextDisplayer():Et("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),j=!1,V=C(P),K=V.next();!K.done;K=V.next())q=K.value,q.mode!=="disabled"&&(j?(q.mode="disabled",Ct("Found more than one enabled text track, disabling it",q)):(X2(e,q),j=!0));lb(e),e.ha&&ca(e.ha)&&m.resolve(),ce(Q)})}),i.error?m.reject(r1(e)):i.preload=="none"&&(Ct('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.'),m.resolve()),e.j.Aa(i,"error",function(){m.reject(r1(e))}),_(L,Ni(e.g.streaming.loadTimeout,m),4);case 4:((T=e.V())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(I=function(){return Q2(e)},e.j.D(i,"timeupdate",I)),T||(D=function(){return Fm(e)},e.j.D(i,"timeupdate",D),Fm(e)),e.B&&(e.B.onManifestUpdated(T),T&&(M=e.Sa().end,e.j.D(i,"progress",function(){var P=e.Sa().end;M!=P&&(e.B.onManifestUpdated(e.V()),M=P)}))),e.Oa=!0,ce(L)}})}function ob(e){var t=e.g.preferredAudioLanguage;t!=""&&e.Hi(t,e.g.preferredVariantRole)}function lb(e){var t=e.g.preferredTextLanguage;t!=""&&e.ih(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function ub(e,t){if(t.kind=="metadata"){t.mode="hidden",e.j.D(t,"cuechange",function(){if(t.activeCues)for(var i=C(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,$v(e,r.startTime,r.endTime,r.type,r.value),e.B&&e.B.onCueMetadataChange(r.value);if(t.cues){i=[],r=C(t.cues);for(var l=r.next(),c={};!l.done;c={xc:void 0},l=r.next())c.xc=l.value,c.xc.type=="com.apple.quicktime.HLS"&&c.xc.startTime!=null&&(l=i.find(function(f){return function(y){return y.startTime==f.xc.startTime&&y.endTime==f.xc.endTime}}(c)),l||(l={startTime:c.xc.startTime,endTime:c.xc.endTime,values:[]},i.push(l)),l.values.push(c.xc.value));for(i=C(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.B&&(r.values.push({key:"CUE",description:"",data:r.startTime!=0||e.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.B.onHLSInterstitialMetadata(e,e.h,r))}});var n=new dt(function(){var i=gb(e);i=C(i);for(var r=i.next();!r.done;r=i.next())r.value.mode="hidden"}).Jb().ia(.5);e.qe.push(function(){n.stop()})}}function Zv(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(de(n,t))}function $v(e,t,n,i,r){e.ya&&(t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r},t.id=JSON.stringify(t),Qs(e.ya,t))}function ab(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new dt(function(){t.mode="hidden"}).Jb().ia(.5);e.qe.push(function(){n.stop()})}}h.Gk=function(){for(var e=this.ka;e.g;)e.release()},h.hd=function(e){return new Ta(e)};function V2(e,t){function n(l){t()?t().dispatchEvent(l):e.dispatchEvent(l)}function i(l){t()?sc(t(),!0,l):l()}t||(t=function(){return null});var r=new en(function(l,c,f,y,m){var w=t()?t().j:e.s;w&&w.segmentDownloaded(l,c,f,y,m)},function(l,c,f){c=new Map().set("headers",l).set("request",c).set("requestType",f),n(de("downloadheadersreceived",c)),i(function(){if(e.va){var y=e.va;if(y.h.enabled){var m=l["cmsd-static"];if(m)try{var w=new Map,T=m.split(",");for(m=0;m<T.length;m++){var I=T[m].split("=");w.set(I[0],g(I[1]))}}catch{}if(w=l["cmsd-dynamic"]){try{var D=new Map,M=w.split(";");for(w=1;w<M.length;w++){var L=M[w].split("=");D.set(L[0],g(L[1]))}var P=D}catch{P=null}P&&(y.g=P)}}}})},function(l,c){l=new Map().set("request",l).set("response",c),n(de("downloadcompleted",l))},function(l,c,f,y){l=new Map().set("request",l).set("error",c).set("httpResponseCode",f).set("aborted",y),n(de("downloadfailed",l))},function(l,c,f){i(function(){var y=e.L,m=f;if(m=m===void 0?{}:m,y.g.enabled)if(c.method==="HEAD")sl(y,c);else switch(l){case 0:try{if(y.g.enabled){if(m.type){e:{switch(m.type){case 4:var w=y.l?Ya:sp;break e;case 3:case 2:w=y.l?a:o;break e;case 5:w="s";break e}w=void 0}y.i=w}sl(y,c,{ot:Vm,su:!y.s})}}catch(le){Jl("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",le)}break;case br:try{if(y.g.enabled){var T=c.uris[0],I=m.segment;w=0,I&&(w=I.endTime-I.startTime);var D={d:1e3*w,st:y.h.V()?"l":"v"};D.ot=Hu(m);var M=D.ot===za||D.ot===qa||D.ot===Ef||D.ot===Xa,L=m.stream;if(L){var P=y.h.ub();if(M&&(D.bl=Wv(y,L.type),D.ot!==Xa)){var j=Sy(y,L.type);D.dl=P?j/Math.abs(P):j}if(L.bandwidth&&(D.br=L.bandwidth/1e3),L.segmentIndex&&I){var V=L.segmentIndex.Wb(I.endTime,!0,0>P);if(V){var K=V.next().value;if(K&&K!=I){if(T&&!wr(I.O(),K.O())){var q=K.O()[0],Q=new URL(q),z=new URL(T);if(Q.origin!==z.origin)var X=q;else{for(var W=Q.pathname.split("/").slice(1),J=z.pathname.split("/").slice(1,-1);W[0]===J[0];)W.shift(),J.shift();for(;J.length;)J.shift(),W.unshift("..");X=W.join("/")}D.nor=X}if((K.startByte||K.endByte)&&(I.startByte!=K.startByte||I.endByte!=K.endByte)){var ne=K.startByte+"-";K.endByte&&(ne+=K.endByte),D.nrr=ne}}}var te=y.h.ub()||1,ee=Sy(y,L.type)||500,ge=L.bandwidth,fe=ge?ge*(I.endTime-I.startTime)/1e3/(ee/te/1e3)*y.g.rtpSafetyFactor:NaN;isNaN(fe)||(D.rtp=fe)}}M&&D.ot!==Xa&&(D.tb=Tf(y,D.ot)/1e3),sl(y,c,D)}}catch(le){Jl("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",le)}break;case 2:case 5:case 6:sl(y,c,{ot:"k"});break;case 4:sl(y,c,{ot:"o"})}})},function(l,c,f,y){(l=t()?t().l:e.H)&&l.banLocation&&l.banLocation(y)},function(l,c){if(c.data){c=c.data.byteLength;var f=t()?t().getStats():e.A;f&&(ly(f,c),l===0&&(f.gi=c))}});return r.configure(e.g.networking),r}function sb(e,t){return new Ys(e.h,e.i,e.g.streaming,t,function(){e.Zb&&Hd(e.Zb,!0),e.l&&e.l.Yc(),e.P&&Gu(e)},function(n){return e.dispatchEvent(n)})}function cb(e,t){var n=e.V()||typeof t=="number"&&0<t;t=new ju(e.me,n),t.addEventListener("enter",function(l){Ey(e,"timelineregionenter",l.region)}),t.addEventListener("exit",function(l){Ey(e,"timelineregionexit",l.region)}),t.addEventListener("skip",function(l){var c=l.region;l.seeking||(Ey(e,"timelineregionenter",c),Ey(e,"timelineregionexit",c))});var i=new ju(e.ya,n);i.addEventListener("enter",function(l){Zv(e,l.region,"metadata")}),n=new ju(e.ab,n),n.addEventListener("enter",function(l){l=new Map().set("detail",l.region.emsg),e.dispatchEvent(de("emsg",l))});var r=new La(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.le&&r.g.add(e.le),r}function fb(e,t){t=new ju(e.ya,t instanceof Date||0<t),t.addEventListener("enter",function(i){Zv(e,i.region,"metadata")});var n=new La(e.h);return n.g.add(t),n}function H2(e,t,n){e.P=new Yg,e.P.g=mo,K2(e),Gm(e),e.Ka=new dt(function(){Gu(e)}),e.g.streaming.rebufferingGoal&&e.Ka.Fa(.25),e.j.D(t,"waiting",function(){return Gu(e)}),e.j.D(t,"canplaythrough",function(){return Gu(e)}),e.j.D(t,"playing",function(){return Gu(e)}),e.j.D(t,"seeked",function(){return Gu(e)}),n&&(e.j.D(t,"stalled",function(){return Gu(e)}),e.j.D(t,"progress",function(){return Gu(e)}),e.j.D(t,"timeupdate",function(){return Gu(e)}))}function K2(e){var t=e.g.streaming.rebufferingGoal;e.P.i.set(Eu,Math.min(.5,t/2)).set(mo,t)}function Gu(e){var t=e.G?Qo(e.G):!1,n=e.Wd()||t||e.F.ci(),i=Rh(e.h.buffered,e.h.currentTime);t=e.P;var r=t.i.get(t.g),l=t.g;n=n||i>=r&&0<i?Eu:mo,t.g=n,(l=l!=n)&&n===Eu&&(t.h=Date.now()),l&&Gm(e)}function db(e,t,n,i,r){return new Uh(e,t,n,r,i)}function pb(e){return new yc({getBandwidthEstimate:function(){return e.s?e.s.getBandwidthEstimate():NaN},Nb:function(){return e.Nb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},ub:function(){return e.ub()},Pb:function(){return e.Pb()},Qb:function(){return e.Qb()},V:function(){return e.V()},Ue:function(){return e.Ue()}},e.g.cmcd)}function hb(e){return new df(e.i,{Qc:function(){return e.F?e.F.De():0},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},ub:function(){return e.ub()},video:e.h,Z:e.G,pc:e.I,onError:function(t){return cp(e,t)},onEvent:function(t){return e.dispatchEvent(t)},tf:function(t,n,i){var r=t.startTime;if(t=t.endTime,n=n.type,n!=ut){if(e.F){e.F.pi();var l=wo(e.G,n);!e.V()&&e.h.paused&&!e.h.seeking&&l!=null&&0<l&&e.F.De()<l&&e.F.Vf(l)}Gu(e)}i=new Map().set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(de("segmentappended",i))},xk:function(t,n){(n=n.rd)&&e.le&&Rr(e.le,n,t)},Kh:function(t,n){var i=e.C;if(i.h.parseInbandPsshEnabled&&!i.G&&["audio","video"].includes(t)){t=new xu(Ge(n)),n=0;for(var r=C(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=C(t.data),l=t.next();!l.done;l=t.next())l=l.value,n.set(l,r),r+=l.length;xa(i,"cenc",n),i=i.l}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}h.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=Fl(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Et("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Et("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){Et("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var n=yt();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&n.Da()==="WEBKIT",delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&typeof e.streaming.liveSync=="boolean"&&(Et("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),n=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=n),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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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){Et("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&&(Et("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&&(Et("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Et("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&&(Et("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&(Et("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&&Et("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(Et("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(Et("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(Et("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),l=tl(this.g,e,zl(this)),G2(this),l},h.nj=function(e){this.Yf=e};function G2(e){if(e.ue=new Sd(e.g,e.wa,e.C),e.H){var t=Tr(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.l){e.l.configure(e.g.streaming);try{e.m!=cl&&Th(e.ue,e.i)&&Zi(e)}catch(n){cp(e,n)}e.s&&Wa(e),t=e.l.o,!t||t.allowedByApplication&&t.allowedByKeySystem||bf(e)}e.I&&e.I.configure(e.g.networking),e.G&&(e.G.configure(e.g.mediaSource),e.G.Ka=e.g.manifest.segmentRelativeVttTiming),e.o&&at(e),e.s&&(e.s.configure(e.g.abr),e.g.abr.enabled?e.s.enable():e.s.disable(),nw(e)),e.P&&K2(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Fa(.25):e.Ka.stop()),e.i&&o1(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.B&&e.B.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.va&&e.va.configure(e.g.cmsd),e.za&&e.za.configure(e.g.queue)}h.getConfiguration=function(){var e=zl(this);return tl(e,this.g,zl(this)),e},h.xj=function(){return this.Yf},h.Zh=function(){var e=zl(this);return tl(e,this.g,zl(this)),bm(this.g,zl(this))},h.Vh=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.Sa().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},h.Ci=function(){for(var e in this.g)delete this.g[e];tl(this.g,zl(this),zl(this)),G2(this)},h.Fj=function(){return this.m},h.Xh=function(){return this.i?this.i.type:null},h.Jj=function(){return this.h},h.Pb=function(){return this.I},h.nd=function(){return this.W},h.Uh=function(){return this.B?this.B:null},h.$h=function(){return this.za?this.za:null},h.V=function(){return this.i&&!this.ua()?this.i.presentationTimeline.V():this.h&&(this.h.src||this.ua())?this.h.duration==1/0:!1},h.Tc=function(){return this.i?this.i.presentationTimeline.Tc():!1},h.ck=function(){if(this.i&&!this.ua()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&(this.h.src||this.ua())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},h.jk=function(){if(this.i&&!this.ua()){var e=this.i.variants;return e.length?(e=e[0],e.audio||!e.video?!1:!e.video.codecs.includes(",")):!1}return this.h&&(this.h.src||this.ua())&&this.h.audioTracks?this.h.audioTracks.length==0:!1},h.Sa=function(){if(this.i&&!this.ua()){if(!this.Oa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Xb(),end:e.Fb()}}if(this.h&&(this.h.src||this.ua())&&(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}},h.Zj=function(){this.V()&&(this.h.currentTime=this.Sa().end)},h.dk=function(){return this.Oa},h.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},h.drmInfo=function(){return this.C?this.C.g:null},h.Pd=function(){return this.C?this.C.Pd():1/0},h.Eg=function(){return this.C?this.C.Eg():[]},h.Te=function(){return this.C?this.C.Te():{}},h.Mg=function(){return this.P?this.P.g==mo:!!this.W},h.ub=function(){return this.h?this.K?this.K.i:1:0},h.Ch=function(e){this.m==Bi&&this.l&&Tm(this.l,e)},h.ke=function(e,t){t=t===void 0?!0:t,e==0?Ct("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==Bi&&(this.s.playbackRateChanged(e),this.Ch(t&&e!=1)),W2(this,e))},h.Id=function(){var e=this.K.Pc();this.m==Pr&&this.K.set(e),this.m==Bi&&(this.K.set(e),this.s.playbackRateChanged(e),this.Ch(!1)),this.bc.Ra()},h.Qb=function(){if(this.i&&!this.ua()){for(var e=this.l?this.l.o:null,t=[],n=0,i=C(this.i.variants),r=i.next();!r.done;r=i.next())if(r=r.value,$t(r)){var l=Ar(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}if(this.h&&this.h.audioTracks){var c=J2(this);return e=Array.from(this.h.audioTracks),e.length?e.map(function(f){return On(f,c)}):c?[On(null,c)]:[]}return[]},h.Dc=function(){if(this.i){if(this.ua())return[];for(var e=this.l?this.l.A:null,t=[],n=C(this.i.textStreams),i=n.next();!i.done;i=n.next()){i=i.value;var r=pu(i);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Hm(this).map(function(l){return Pi(l)}):[]},h.Cj=function(){var e=this.Ae;return this.i&&(e=this.i.imageStreams),e.map(function(t){return Bc(t)})},h.qj=function(e){var t=this,n,i;return G(function(r){return r.g==1?_(r,q2(t,e),2):(n=r.h,n?(i=[],n.segmentIndex.Eb(function(l){var c=F2(l.tilesLayout||n.tilesLayout);if(c)for(var f=c.rows*c.Lc,y=l.j-l.startTime,m=0;m<f;m++){var w=z2(l,n,l.startTime+y*m/f,c);i.push(w)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null))})};function F2(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{Lc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}h.Tj=function(e,t){var n=this,i,r,l,c;return G(function(f){return f.g==1?_(f,q2(n,e),2):(i=f.h,!i||(r=i.segmentIndex.find(t),r==null)?f.return(null):(l=i.segmentIndex.get(r),(c=F2(l.tilesLayout||i.tilesLayout))?f.return(z2(l,i,t,c)):f.return(null)))})};function q2(e,t){var n,i;return G(function(r){return r.g==1?e.m!=Bi&&e.m!=Pr||(n=e.Ae,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.u(2):_(r,i.createSegmentIndex(),2):r.return(null)):r.return(i)})}function z2(e,t,n,i){var r=t.width||0,l=t.height||0,c=r/i.Lc,f=l/i.rows,y=i.Lc*i.rows,m=e.j-e.startTime;m=e.B||m/y;var w=e.startTime,T=0,I=0;return 1<y&&(I=Math.floor((n-e.startTime)/m),w=e.startTime+I*m,T=I%i.Lc*c,I=Math.floor(I/i.Lc)*f),i=!1,(n=e.thumbnailSprite)&&(i=!0,f=n.height,T=n.positionX,I=n.positionY,c=n.width),{segment:e,imageHeight:l,imageWidth:r,height:f,positionX:T,positionY:I,startTime:w,duration:m,uris:e.O(),startByte:e.Bc(),endByte:e.zc(),width:c,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}h.jh=function(e){function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.l.A&&(gf(n.A.h,i,!1),Xd(n.l,i),If(n),xy(n),n.xd=i.language)}var n=this;this.i&&this.F&&(t(),!this.ua())||function(){if(n.h&&n.h.textTracks){var i=Hm(n),r=i.find(function(f){return bs(f)===e.id});if(r){if(n.o instanceof kn){i=C(i);for(var l=i.next();!l.done;l=i.next()){l=l.value;var c=l===r?n.ba?"showing":"hidden":"disabled";l.mode!==c&&(l.mode=c)}}else i=i.find(function(f){return f.mode!=="disabled"}),i!==r&&(i&&(i.mode="disabled",n.j.Ja(i,"cuechange"),n.o.remove(0,1/0)),r&&X2(n,r));If(n),xy(n)}}}()};function X2(e,t){e.j.D(t,"cuechange",function(){e.o.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=C(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 Zt(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?ms: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=$n,c.region.width=l.region.width,c.region.widthUnits=$n),hs(c),l=c}l&&((c=e.g.mediaSource.modifyCueCallback)&&c(l,null,n),i.push(l))}e.o.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}h.Ef=function(e,t,n){function i(){var l=r.i.variants.find(function(f){return f.id==e.id});if(l&&$t(l)){var c=r.l.o;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)&&Ct("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.ua()?Ty(r,l,!1,!1,0):Ty(r,l,!1,t||!1,n||0),r.M.configure({language:l.language,role:l.audio&&l.audio.roles&&l.audio.roles[0]||"",channelCount:l.audio&&l.audio.channelsCount?l.audio.channelsCount:0,Ec: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:"",Jc:l.audio&&l.audio.label?l.audio.label:"",Ed:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:l.audio&&l.audio.codecs?l.audio.codecs:"",Gd:c.audio&&c.audio.codecs?c.audio.codecs:"",Fe:c.audio&&c.audio.channelsCount?c.audio.channelsCount:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),Wa(r)}}var r=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){if(e.originalAudioId&&r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks);l=C(l);for(var c=l.next();!c.done;c=l.next())if(c=c.value,bs(c)==e.id){n1(r,c);break}}}()},h.Ok=function(e,t){function n(){var r=i.M.getConfiguration();r.audioCodec=e.codecs||"",r.Jc=e.label||"",r.channelCount=e.channelsCount||0,r.language=e.language,r.role=e.roles[0]||"",r.spatialAudio=e.spatialAudio,i.M.configure(r),bf(i,!0,t,!1,!1)}var i=this;t=t===void 0?0:t,!(this.i&&this.F&&(n(),!this.ua()))&&function(){if(i.h&&i.h.audioTracks){var r=Ot(e.language),l=Array.from(i.h.audioTracks),c=null;l=C(l);for(var f=l.next();!f.done;f=l.next()){f=f.value;var y=f.language||"und";if(f.label==e.label&&Ot(y)==r&&f.kind==e.roles[0]){c=f;break}}c&&n1(i,c)}}()},h.getAudioTracks=function(){if(this.i&&!this.ua()){var e=this.Qb();if(!e.length)return[];var t=e.find(function(l){return l.active});if(!t)return[];var n=e;if(this.m!=Bi||this.ua()||(n=e.filter(function(l){return l.originalVideoId===t.originalVideoId&&l.audioCodec})),!n.length)return[];e=new Map,n=C(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())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(l){var c=l.language;return c={active:l.enabled,language:Ot(c||"und"),label:l.label,mimeType:null,codecs:null,primary:l.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:c},l.kind&&c.roles.push(l.kind),l.configuration&&(l.configuration.codec&&(c.codecs=l.configuration.codec),l.configuration.sampleRate&&(c.audioSamplingRate=l.configuration.sampleRate),l.configuration.numberOfChannels&&(c.channelsCount=l.configuration.numberOfChannels)),c}):[]},h.Qk=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?0:n;var i=this.Qb();if(i.length){var r=i.find(function(l){return l.active});r&&(i=i.find(function(l){return l.audioId===r.audioId&&(l.videoBandwidth||l.bandwidth)==e.bandwidth&&l.width==e.width&&l.height==e.height&&l.frameRate==e.frameRate&&l.pixelAspectRatio==e.pixelAspectRatio&&l.hdr==e.hdr&&l.colorGamut==e.colorGamut&&l.videoLayout==e.videoLayout&&l.videoMimeType==e.mimeType&&l.videoCodec==e.codecs}))&&!i.active&&this.Ef(i,t,n)}},h.getVideoTracks=function(){if(this.m==Pr||this.ua())return[];var e=this.Qb();if(!e.length)return[];var t=e.find(function(l){return l.active});if(!t)return[];var n=e.filter(function(l){return l.originalAudioId===t.originalAudioId&&l.audioId===t.audioId&&l.audioGroupId===t.audioGroupId&&l.videoCodec});if(!n.length)return[];e=new Map,n=C(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalVideoId;r||i.videoId==null||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec})}return Array.from(e.values())},h.sj=function(){return ow(this.Qb())},h.Rj=function(){return ow(this.Dc())},h.rj=function(){return Array.from(rw(this.Qb()))},h.Qj=function(){return Array.from(rw(this.Dc()))},h.Hi=function(e,t,n,i,r,l,c){function f(){function m(M,L){return M.video||L.video?M.video&&L.video?Math.abs((M.video.height||0)-(L.video.height||0))+Math.abs((M.video.width||0)-(L.video.width||0)):1/0:0}var w=y.l.o;y.M=y.g.adaptationSetCriteriaFactory(),y.M.configure({language:e,role:t||"",channelCount:n||0,Ec:"",spatialAudio:l||!1,videoLayout:"",Jc:c||"",Ed:"",codecSwitchingStrategy:y.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",Gd:w.audio&&w.audio.codecs?w.audio.codecs:"",Fe:w.audio&&w.audio.channelsCount?w.audio.channelsCount:0,preferredAudioCodecs:y.g.preferredAudioCodecs,preferredAudioChannelCount:y.g.preferredAudioChannelCount});var T=y.M.create(y.i.variants),I=null;T=C(T.values());for(var D=T.next();!D.done;D=T.next())D=D.value,$t(D)&&(!I||m(I,w)>m(D,w))&&(I=D);I!=w&&(I?(w=Ar(I),y.Ef(w,!0,i||0)):bf(y))}var y=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.F&&(f(),!this.ua()))&&function(){if(y.h&&y.h.audioTracks){var m=Wi(y.Qb(),e,t||"",!1)[0];m&&y.Ef(m)}}()},h.ih=function(e,t,n){function i(){r.xd=e,r.se=t||"",r.re=n||!1;var l=Wi(r.i.textStreams,r.xd,r.se,r.re)[0]||null;l&&l!=r.l.A&&(gf(r.A.h,l,!1),r.g.streaming.alwaysStreamText||r.Ng())&&(Xd(r.l,l),If(r),xy(r))}var r=this;n=n===void 0?!1:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){var l=Wi(r.Dc(),e,t||"",n||!1)[0];l&&r.jh(l)}()},h.Pk=function(e,t,n){function i(){for(var l=null,c=C(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.M=r.g.adaptationSetCriteriaFactory(),r.M.configure({language:l.language,role:"",channelCount:0,Ec:"",spatialAudio:!1,videoLayout:"",Ed:"",Jc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Gd:"",Fe:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),bf(r,t,n))}var r=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.F&&(i(),!this.ua()))&&function(){if(r.h&&r.h.audioTracks){var l=Array.from(r.h.audioTracks),c=null;l=C(l);for(var f=l.next();!f.done;f=l.next())f=f.value,f.label==e&&(c=f);c&&n1(r,c)}}()},h.Ng=function(){var e=this.ba;return this.o?this.o.isTextVisible():e},h.wj=function(){return this.eb.map(function(e){return pu(e)})},h.uj=function(e){if(Et("getChapters","Please use an getChaptersAsync."),!this.eb.length)return[];var t=Ot(e);if(e=this.eb.filter(function(l){return Ot(l.language)==t}),!e.length)return[];var n=[],i=new Set;e=C(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.segmentIndex&&r.segmentIndex.Eb(function(l){var c=l.O()[0],f=l.startTime+"-"+l.endTime+"-"+c;l={id:f,title:c,startTime:l.startTime,endTime:l.endTime},i.has(f)||(n.push(l),i.add(f))});return n},h.vj=function(e){var t=this,n,i,r,l,c,f,y;return G(function(m){switch(m.g){case 1:if(!t.eb.length)return m.return([]);if(n=Ot(e),i=t.eb.filter(function(w){return Ot(w.language)==n}),!i.length)return m.return([]);r=[],l=new Set,c=C(i),f=c.next();case 2:if(f.done){m.u(4);break}if(y=f.value,y.segmentIndex){m.u(5);break}return _(m,y.createSegmentIndex(),5);case 5:y.segmentIndex.Eb(function(w){var T=w.O()[0],I=w.startTime+"-"+w.endTime+"-"+T;w={id:I,title:T,startTime:w.startTime,endTime:w.endTime},l.has(I)||(r.push(w),l.add(I))}),f=c.next(),m.u(2);break;case 4:return m.return(r)}})};function Hm(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function yb(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function gb(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}h.oh=function(e){e=!!e,this.ba!=e&&(this.ba=e,this.m==Bi?(this.o.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.A||(e=Wi(this.i.textStreams,this.xd,this.se,this.re),0<e.length&&(Xd(this.l,e[0]),If(this),xy(this))):Wh(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.o.setTextVisibility(e),tw(this))},h.Kj=function(){if(this.F)var e=this.F.De();else{if(this.N==null)return new Date;if(this.N instanceof Date)return this.N;e=this.N}if(this.i&&!this.ua()){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},h.Gg=function(){if(this.i&&!this.ua()){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},h.We=function(){return this.V()&&this.i?this.i.presentationTimeline.We():null},h.Nb=function(){if(this.m==Bi)return this.G.Nb();var e={total:[],audio:[],video:[],text:[]};return this.m==Pr&&(e.total=zo(this.h.buffered)),e},h.Ue=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Gg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},h.getStats=function(){if(this.m!=Bi&&this.m!=Pr)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};t1(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.V()||Rm(this.A,Math.round(100*t)),this.F&&(this.A.S=this.F.Dh(),this.A.U=this.F.Eh()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),xo(this.A,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.A.M=Number(t.corruptedVideoFrames)),this.A.o=this.C?fr(this.C):NaN,ip(this.A,e.videoWidth||NaN,e.videoHeight||NaN),this.A.l="",this.V()&&this.Gg()!=null&&(e=this.Ue()||0,this.A.C=e/1e3),t=this.Qb().find(function(r){return r.active}),e=this.Dc().find(function(r){return r.active}),t){if(t.bandwidth){var n=this.K?this.K.i:1,i=n*t.bandwidth;e&&e.bandwidth&&(i+=n*e.bandwidth),this.A.A=i}t.width&&t.height&&ip(this.A,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.A.l=t)}return this.m!=Bi||this.ua()||(this.i&&(this.A.H=this.i.periodCount,this.A.G=this.i.gapCount,this.i.presentationTimeline&&(this.A.K=this.i.presentationTimeline.h)),e=this.s.getBandwidthEstimate(),this.A.s=e),this.m==Pr&&ly(this.A,NaN),mf(this.A)},h.Hd=function(e,t,n,i,r,l,c){c=c===void 0?!1:c;var f=this,y,m,w,T,I,D,M,L,P,j,V,K;return G(function(q){switch(q.g){case 1:if(f.m!=Bi&&f.m!=Pr)throw new Y(1,7,7004);if(n!="subtitles"&&n!="captions"&&Ct("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){q.u(2);break}return _(q,e1(f,e),3);case 3:i=q.h;case 2:if(y=[],f.B&&(y=f.B.getCuePoints()),f.m!=Pr){q.u(4);break}return m=yt(),c&&m.Da()==="WEBKIT"&&(n="forced"),_(q,mb(f,e,t,n,i,l||"",y),5);case 5:if(w=q.h,w.track)return Zi(f),q.return(Pi(w.track));throw new Y(1,2,2012);case 4:if(T=Dn,I=f.Sa(),D=I.end-I.start,f.i&&(D=f.i.presentationTimeline.getDuration()),D==1/0)throw new Y(1,4,4033);if(!y.length){q.u(6);break}return _(q,Km(f,e,f.I,f.g.streaming.retryParameters),7);case 7:M=q.h,L=Y2(f,M,i,y),P=new Blob([L],{type:"text/vtt"}),e=Pd(P),i="text/vtt";case 6:if(j={id:f.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ii(0,D,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:l||null,type:T.Ta,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([xn(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},V=xn(j.mimeType,j.codecs),K=fo(V),!K)throw new Y(2,2,2014,i);return f.i.textStreams.push(j),Zi(f),q.return(pu(j))}})},h.He=function(e,t){var n=this,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q;return G(function(Q){switch(Q.g){case 1:if(n.m!=Bi&&n.m!=Pr)throw new Y(1,7,7004);if(t){Q.u(2);break}return _(Q,e1(n,e),3);case 3:t=Q.h;case 2:if(t!="text/vtt")throw new Y(1,2,2017,e);if(i=Dn,r=n.Sa(),l=r.end-r.start,n.i&&(l=n.i.presentationTimeline.getDuration()),l==1/0)throw new Y(1,4,4045);return _(Q,Km(n,e,n.I,n.g.streaming.retryParameters),4);case 4:if(c=Q.h,f=xs(t),!f)throw new Y(2,2,2014,t);for(y=f(),m={periodStart:0,segmentStart:0,segmentEnd:l,vttOffset:0},w=Ge(c),T=y.parseMedia(w,m,e,[]),I=[],D=C(T),M=D.next(),L={};!M.done;L={Qf:void 0,jd:void 0},M=D.next())L.jd=M.value,L.Qf=null,P=function(z){return function(){return z.Qf==null&&(z.Qf=Vn([e],[z.jd.payload])),z.Qf||[]}}(L),j=new Fe(L.jd.startTime,L.jd.endTime,P,0,null,null,0,0,1/0),L.jd.payload.includes("#xywh")&&(V=L.jd.payload.split("#xywh=")[1].split(","),V.length===4&&j.Hf({height:parseInt(V[3],10),positionX:parseInt(V[0],10),positionY:parseInt(V[1],10),width:parseInt(V[2],10)})),I.push(j);if(K=t,!I.length){Q.u(5);break}return _(Q,ol(I[0].O()[0],n.I,n.g.manifest.retryParameters),6);case 6:K=Q.h;case 5:return q={id:n.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new At(I),mimeType:K||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.Tf,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([xn(K||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==Pr?n.Ae.push(q):n.i.imageStreams.push(q),Zi(n),Q.return(Bc(q))}})},h.Ge=function(e,t,n){var i=this,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V;return G(function(K){switch(K.g){case 1:if(i.m!=Bi&&i.m!=Pr)throw new Y(1,7,7004);if(n){K.u(2);break}return _(K,e1(i,e),3);case 3:n=K.h;case 2:if(r=Dn,l=i.Sa(),c=l.end-l.start,i.i&&(c=i.i.presentationTimeline.getDuration()),c==1/0)throw new Y(1,4,4054);return _(K,Km(i,e,i.I,i.g.streaming.retryParameters),4);case 4:if(f=K.h,y=xs(n),!y)throw new Y(2,2,2014,n);for(m=y(),w={periodStart:0,segmentStart:0,segmentEnd:c,vttOffset:0},T=Ge(f),I=m.parseMedia(T,w,e,[]),D=[],M=C(I),L=M.next(),P={};!L.done;P={Qe:void 0},L=M.next())P.Qe=L.value,j=new Fe(P.Qe.startTime,P.Qe.endTime,function(q){return function(){return[q.Qe.payload]}}(P),0,null,null,0,0,1/0),D.push(j);return V={id:i.ve++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new At(D),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:r.Ta,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([xn("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},i.eb.push(V),Zi(i),K.return(pu(V))}})};function e1(e,t){var n;return G(function(i){switch(i.g){case 1:return he(i,2),_(i,ol(t,e.I,e.g.streaming.retryParameters),4);case 4:n=i.h,_e(i,3);break;case 2:De(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function mb(e,t,n,i,r,l,c){var f,y,m,w;return G(function(T){if(T.g==1)return r!="text/vtt"||c.length?_(T,Km(e,t,e.I,e.g.streaming.retryParameters),3):T.u(2);T.g!=2&&(f=T.h,y=Y2(e,f,r,c),m=new Blob([y],{type:"text/vtt"}),t=Pd(m),r="text/vtt"),w=document.createElement("track");var I=e.L,D=t;try{if(I.g.enabled){var M=al(I);M.ot=Cf,M.su=!0;var L=xf(M),P=ap(D,L)}else P=D}catch(j){Jl("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",j),P=D}return w.src=P,w.label=l,w.kind=i,w.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(w),e.Xf.push(w),T.return(w)})}function Km(e,t,n,i){var r,l,c;return G(function(f){if(f.g==1){r=br,l=bn([t],i),l.method="GET";var y=e.L;try{y.g.enabled&&sl(y,l,{ot:Cf,su:!0})}catch(m){Jl("CMCD_TEXT_ERROR","Could not generate text CMCD data.",m)}return _(f,n.request(r,l).promise,2)}return c=f.h,f.return(c.data)})}function Y2(e,t,n,i){var r=xs(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=Ge(t),t=n.parseMedia(t,e,null,[]),gy(t,i);throw new Y(2,2,2014,n)}h.Vk=function(e,t){this.wa.width=e,this.wa.height=t},h.eh=function(e){if(this.m==Bi){var t=this.l;if(e=e===void 0?.1:e,t.l.g)t=!1;else if(t.B)t=!1;else{for(var n=C(t.h.values()),i=n.next();!i.done;i=n.next())i=i.value,!i.Sd||i.Qa||i.zb||(i.Sd=!1,Ci(t,i,e));t=!0}}else t=!1;return t},h.Fg=function(){return Ct("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},h.Gj=function(){return this.qc},h.Aj=function(){var e={video:null,audio:null,text:null};if(this.m!=Bi)return e;var t=this.l.o,n=this.h.currentTime;t=C([t.video,t.audio,this.l.A]);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==ut&&(e.text=r)}return e};function zl(e){var t=Ka();return t.streaming.failureCallback=function(n){if(e.V()){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.eh(i))}},t.textDisplayFactory=function(){var n=yt();return e.we&&(document.fullscreenEnabled||n.Da()!=="WEBKIT")?new oi(e.h,e.we):"track"in document.createElement("track")?new kn(e):new di},t}h.Oi=function(e){this.we=e};function vb(e,t){for(var n=new Set,i=C(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=C(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var l=C(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",y=new Jt,m=r.closedCaptions.get(c);f={id:e.ve++,originalId:c,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:y,mimeType:f,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:m,originalLanguage:m,label:null,type:ut,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([xn(f,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(f),n.add(c)}}}function Sb(e,t){var n,i,r,l,c;return G(function(f){return f.g==1?(n=e.audio,i=e.video,r=function(y,m){var w,T,I;return G(function(D){return D.g==1?y?y.segmentIndex?D.u(2):_(D,y.createSegmentIndex(),2):D.return(null):(T=(w=y.segmentIndex.Wb(m))?w.next().value:null,T?(I=T.startTime,D.return(I)):D.return(null))})},_(f,r(n,t),2)):f.g!=3?(l=f.h,_(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 Gm(e){var t=e.Mg();if(e.A&&e.P&&e.F){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,Vd(n)}else n=e.K,n.j=t,Vd(n);if(e.L&&(n=e.L,t||n.s||(n.s=!0),n.s&&t&&(n.B=!0),n.F=t),t1(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ee<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.U&&(e.U=Math.min(e.U+ ++e.Ee*r,n-i))}}t=new Map().set("buffering",t),e.dispatchEvent(de("buffering",t))}function W2(e,t){e.bc.Ra(),e.bc.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Sa(),r=e.V(),l=r?e.g.streaming.safeSeekOffset:0;0<t?(!r||1<=t)&&Math.floor(n)>=Math.floor(i.end)&&e.Id():Math.floor(n)<=Math.floor(i.start+l)&&e.Id()})}function t1(e){if(e.A&&e.P){var t=e.A.g,n="playing";e.P.g==mo?n="buffering":e.Wd()?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(de("statechanged",n)))}}function Q2(e){var t=e.h.playbackRate,n=e.V();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Vh();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.ke(i,!1):r==1&&t!==e.K.Pc()&&e.Id()}if(n&&(n=e.Sa(),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,y=Math.max(0,c-i),m=e.g.streaming.liveSync.maxPlaybackRate,w=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?y=Math.max(0,e.i.serviceDescription.targetLatency-i):e.i.serviceDescription.minLatency!=null&&(y=e.i.serviceDescription.minLatency),m=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,w=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.U||typeof c!="number"||(e.U=c);var T=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.$b&&e.U!==null&&typeof c=="number"&&e.Ee<T&&Date.now()-e.$b>1e3*l&&(l=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.U=Math.max(e.U-(c-l)/2,l+i),e.$b=Date.now()),r&&e.U!==null&&(f=e.U+i,y=e.U-i),c=n.end-e.h.currentTime,i=0,e.m==Pr&&(r=e.h.buffered,0<r.length&&(i=r.end(r.length-1),i=Math.max(m,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,l=Date.now()-e.P.h,n&&!w&&(w=e.g.streaming.liveSync.minPlaybackRate),n&&w&&l<=r?t!=w&&e.ke(w,!1):f!=null&&m&&c-i>f?(t!=m&&e.ke(m,!1),e.$b=null):y!=null&&w&&c-i<y?(t!=w&&e.ke(w,!1),e.$b=null):t!==e.K.Pc()&&(e.Id(),e.$b=Date.now())}}function Fm(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.Wf<r?(e.Wf=r,!0):!1},n=e.Sa();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var i=de("started");else t(25,n)?i=de("firstquartile"):t(50,n)?i=de("midpoint"):t(75,n)?i=de("thirdquartile"):((t(100,n)||100<n)&&(i=de("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Wd()&&e.h.pause());i&&e.dispatchEvent(i)}}}function Wa(e){try{Eh(e.ue,e.i)}catch(n){return cp(e,n),!1}var t=_o(e.i.variants);return t=e.M.create(t),e.s.setVariants(Array.from(t.values())),!0}function bf(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=Wa(e)?e.s.chooseVariant():null)&&Ty(e,l,r,t,n,i)}function Ty(e,t,n,i,r,l){l=l===void 0?!1:l;var c=e.l.o;if(t==c)i&&Qh(e.l,t,i,r,!0);else{var f=e.A.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})),Qh(e.l,t,i,r,l,n),i=null,c&&(i=Ar(c)),c=Ar(t),c.active=!0,e.S&&(r=e.S,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.Xh()){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=de("adaptation",n),kf(e,n)):Z2(e,i,c),$2(e,i,c)}}function n1(e,t){var n=Array.from(e.h.audioTracks).find(function(r){return r.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=J2(e);n=On(n,i),t=On(t,i),Z2(e,n,t),$2(e,n,t)}}function J2(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function Zi(e){var t=de("trackschanged");kf(e,t),ew(e)}function Z2(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=de("variantchanged",t),kf(e,t)}function $2(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&ew(e)}function ew(e){var t=de("audiotrackschanged");kf(e,t)}function If(e){var t=de("textchanged");kf(e,t)}function tw(e){var t=de("texttrackvisibility");kf(e,t)}function nw(e){e.g.abr.enabled||i1(e);var t=new Map().set("newStatus",e.g.abr.enabled);kf(e,de("abrstatuschanged",t))}function xy(e){var t=e.Dc().find(function(n){return n.active});t&&e.o&&e.o.setTextLanguage&&e.o.setTextLanguage(t.language)}function i1(e,t){if(t=t===void 0?!0:t,e.m==Bi){e.xe.stop();for(var n=C(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&Wa(e)}}h.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===cl||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(f){var y=f[e.type];return y&&y.id!==e.id&&!f.disabledUntilTime?e.type=="audio"?e.language===y.language:!0:!1})){for(var n=!1,i=!1,r=C(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.Fa(1),t=this.Nb().video.reduce(function(f,y){return f+y.end-y.start},0),bf(this,!1,t,!0,!1),!0)}return!1};function cp(e,t){var n,i,r,l,c;return G(function(f){switch(f.g){case 1:if(e.m==cl)return f.return();if(t.severity===1&&e.A.L++,n=!0,!(e.Oa&&e.i&&e.l)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3024&&t.code!=3018){f.u(2);break}return i=yt(),i.Da()==="WEBKIT"&&t.code==3016?f.return():(he(f,3),_(f,Ht(e.l),5));case 5:r=f.h,n=!r,r&&(l=de("mediasourcerecovered"),e.dispatchEvent(l)),_e(f,2);break;case 3:De(f),n=!0;case 2:if(!n)return f.return();t.severity===2&&i1(e,!1),c=de("error",new Map().set("detail",t)),e.dispatchEvent(c),c.defaultPrevented&&(t.handled=!0),ce(f)}})}h.addFont=function(e,t){return rm(e,t)};function Ey(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(de(t,e))}function iw(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(de(i?"audiotrackchanged":"mediaqualitychanged",t))}function r1(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 o1(e,t,n){0<t&&(e.V()||e.Ni(t)),t=e.getDuration(),n<t&&(e.V()||e.pb(n))}function kf(e,t){G(function(n){if(n.g==1)return _(n,Promise.resolve(),2);e.m!=cl&&e.dispatchEvent(t),ce(n)})}function rw(e){var t=new Set;e=C(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(Ot(n.language)):t.add("und");return t}function ow(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],l="und",c=[];r.language&&(l=Ot(r.language)),r.type=="variant"?c=r.audioRoles:c=r.roles,c&&c.length||(c=[""]),t.has(l)||t.set(l,new Set),c=C(c);for(var f=c.next();!f.done;f=c.next())f=f.value,t.get(l).add(f),r.label&&(n.has(l)||n.set(l,new Map),n.get(l).set(f,r.label))}var y=[];return t.forEach(function(m,w){m=C(m);for(var T=m.next();!T.done;T=m.next()){T=T.value;var I=null;n.has(w)&&n.get(w).has(T)&&(I=n.get(w).get(T)),y.push({language:w,role:T,label:I})}}),y}h.ua=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},h.Wd=function(){return!this.h||this.h.ended?!0:this.Oa&&!this.V()&&this.h.currentTime>=this.Sa().end},Pe("shaka.Player",F),F.prototype.isEnded=F.prototype.Wd,F.prototype.isRemotePlayback=F.prototype.ua,F.prototype.addFont=F.prototype.addFont,F.prototype.setVideoContainer=F.prototype.Oi,F.prototype.getFetchedPlaybackInfo=F.prototype.Aj,F.prototype.getManifestParserFactory=F.prototype.Gj,F.prototype.getManifest=F.prototype.Fg,F.prototype.retryStreaming=F.prototype.eh,F.prototype.setMaxHardwareResolution=F.prototype.Vk,F.prototype.addChaptersTrack=F.prototype.Ge,F.prototype.addThumbnailsTrack=F.prototype.He,F.prototype.addTextTrackAsync=F.prototype.Hd,F.prototype.getStats=F.prototype.getStats,F.prototype.getBufferedInfo=F.prototype.Nb,F.prototype.getSegmentAvailabilityDuration=F.prototype.We,F.prototype.getPresentationStartTimeAsDate=F.prototype.Gg,F.prototype.getPlayheadTimeAsDate=F.prototype.Kj,F.prototype.setTextTrackVisibility=F.prototype.oh,F.prototype.getChaptersAsync=F.prototype.vj,F.prototype.getChapters=F.prototype.uj,F.prototype.getChaptersTracks=F.prototype.wj,F.prototype.isTextTrackVisible=F.prototype.Ng,F.prototype.selectVariantsByLabel=F.prototype.Pk,F.prototype.selectTextLanguage=F.prototype.ih,F.prototype.selectAudioLanguage=F.prototype.Hi,F.prototype.getTextLanguages=F.prototype.Qj,F.prototype.getAudioLanguages=F.prototype.rj,F.prototype.getTextLanguagesAndRoles=F.prototype.Rj,F.prototype.getAudioLanguagesAndRoles=F.prototype.sj,F.prototype.getVideoTracks=F.prototype.getVideoTracks,F.prototype.selectVideoTrack=F.prototype.Qk,F.prototype.getAudioTracks=F.prototype.getAudioTracks,F.prototype.selectAudioTrack=F.prototype.Ok,F.prototype.selectVariantTrack=F.prototype.Ef,F.prototype.selectTextTrack=F.prototype.jh,F.prototype.getThumbnails=F.prototype.Tj,F.prototype.getAllThumbnails=F.prototype.qj,F.prototype.getImageTracks=F.prototype.Cj,F.prototype.getTextTracks=F.prototype.Dc,F.prototype.getVariantTracks=F.prototype.Qb,F.prototype.cancelTrickPlay=F.prototype.Id,F.prototype.trickPlay=F.prototype.ke,F.prototype.useTrickPlayTrackIfAvailable=F.prototype.Ch,F.prototype.getPlaybackRate=F.prototype.ub,F.prototype.isBuffering=F.prototype.Mg,F.prototype.getKeyStatuses=F.prototype.Te,F.prototype.getActiveSessionsMetadata=F.prototype.Eg,F.prototype.getExpiration=F.prototype.Pd,F.prototype.drmInfo=F.prototype.drmInfo,F.prototype.keySystem=F.prototype.keySystem,F.prototype.isFullyLoaded=F.prototype.dk,F.prototype.goToLive=F.prototype.Zj,F.prototype.seekRange=F.prototype.Sa,F.prototype.isVideoOnly=F.prototype.jk,F.prototype.isAudioOnly=F.prototype.ck,F.prototype.isInProgress=F.prototype.Tc,F.prototype.isLive=F.prototype.V,F.prototype.getQueueManager=F.prototype.$h,F.prototype.getAdManager=F.prototype.Uh,F.prototype.getAssetUri=F.prototype.nd,F.prototype.getNetworkingEngine=F.prototype.Pb,F.prototype.getMediaElement=F.prototype.Jj,F.prototype.getManifestType=F.prototype.Xh,F.prototype.getLoadMode=F.prototype.Fj,F.prototype.resetConfiguration=F.prototype.Ci,F.prototype.getBufferFullness=F.prototype.Vh,F.prototype.getNonDefaultConfiguration=F.prototype.Zh,F.prototype.getConfigurationForLowLatency=F.prototype.xj,F.prototype.getConfiguration=F.prototype.getConfiguration,F.prototype.configurationForLowLatency=F.prototype.nj,F.prototype.configure=F.prototype.configure,F.prototype.releaseAllMutexes=F.prototype.Gk,F.prototype.destroyAllPreloads=F.prototype.ng,F.prototype.preload=F.prototype.preload,F.prototype.detachAndSavePreload=F.prototype.Qh,F.prototype.unloadAndSavePreload=F.prototype.Yk,F.prototype.load=F.prototype.load,F.prototype.updateStartTime=F.prototype.cl,F.prototype.unload=F.prototype.vc,F.prototype.detach=F.prototype.detach,F.prototype.attachCanvas=F.prototype.fj,F.prototype.attach=F.prototype.fc,F.probeSupport=function(e){e=e===void 0?!0:e;var t,n,i,r,l,c,f;return G(function(y){switch(y.g){case 1:if(t={},!e){y.u(2);break}return _(y,Hg(),3);case 3:t=y.h;case 2:return n=Ah(),i=um(),r=yt(),_(y,r.ic(),4);case 4:return l=y.h,c={manifest:n,media:i,drm:t,hardwareResolution:l},f=uw,f.forEach(function(m,w){c[w]=m()}),y.return(c)}})},F.isBrowserSupported=function(){return x.Promise||Ct("A Promise implementation or polyfill is required"),!(x.Promise&&x.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")?!1:(yt(),Fu()?!0:ku().canPlayType("application/x-mpegurl")!="")},F.setQueueManagerFactory=function(e){Xm=e},F.setAdManagerFactory=function(e){zm=e},F.registerSupportPlugin=bt,F.prototype.destroy=F.prototype.destroy;var cl=0,qm=1,Bi=2,Pr=3;F.LoadMode={DESTROYED:cl,NOT_LOADED:qm,MEDIA_SOURCE:Bi,SRC_EQUALS:Pr},F.version="v4.15.8";var lw=["4","15"];Vp=new function(e){this.g=e,this.i=Ic,this.h=xv}(new hl(Number(lw[0]),Number(lw[1])));var uw=new Map,zm=null,Xm=null;function aw(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function wb(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Ye(e,t,n){var i=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new Mt,this.l.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.l.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}h=Ye.prototype,h.needsSkipUI=function(){return!1},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!0},h.getDuration=function(){return this.g.getDuration()},h.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},h.getRemainingTime=function(){return this.h.getRemainingTime()},h.isPaused=function(){return this.i},h.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.h.getAdSkippableState()},h.skip=function(){return this.h.skip()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.resume()},h.getVolume=function(){return this.h.getVolume()},h.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},h.isMuted=function(){return this.h.getVolume()==0},h.isLinear=function(){return this.g.isLinear()},h.resize=function(e,t){this.h.resize(e,t)},h.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return this.g.getMediaUrl()},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.g=null},Pe("shaka.ads.ClientSideAd",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.getVastAdId=Ye.prototype.getVastAdId,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 fn(){}function sw(e,t){var n=[];e=C(Rt(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=sn(i.value,"InLine"))&&(i=sn(i,"Creatives"))){i=C(Rt(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){r=r.value;var l=sn(r,"Linear");if(l&&Tb(n,t,l),r=sn(r,"NonLinearAds")){r=Rt(r,"NonLinear"),r=C(r);for(var c=r.next();!c.done;c=r.next())e:{l=n;var f=t,y=c.value,m=sn(y,"StaticResource");if(m)c=m.attributes.creativeType;else{if(m=sn(y,"HTMLResource"),!m)break e;c="text/html"}if(m=zi(m)){c==="text/html"&&(m="data:text/html;charset=UTF-8,"+encodeURIComponent(m));var w=Ze(y,"width",Fn)||Ze(y,"expandedWidth",Fn),T=Ze(y,"height",Fn)||Ze(y,"expandedHeight",Fn);if(w||T){var I=null;(y=y.attributes.minSuggestedDuration)&&(I=oa(y)),y=0,f!=null&&(y=f),l.push({id:null,groupId:null,startTime:y,endTime:null,uri:m,mimeType:c,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:I,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:w||0,y:T||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function Tb(e,t,n){var i=0;t!=null&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=oa(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=sn(n,"MediaFiles")){var l=Rt(n,"MediaFile");for(n=l,l=l.filter(function(f){return f.attributes.delivery=="streaming"}),l.length&&(n=l),n=n.sort(function(f,y){return(parseInt(y.attributes.height,10)||0)-(parseInt(f.attributes.height,10)||0)}),n=C(n),l=n.next();!l.done;l=n.next())if(l=l.value,!l.attributes.apiFramework){var c=zi(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}}}}Pe("shaka.ads.Utils",fn),fn.ADS_LOADED="ads-loaded",fn.AD_STARTED="ad-started",fn.AD_FIRST_QUARTILE="ad-first-quartile",fn.AD_MIDPOINT="ad-midpoint",fn.AD_THIRD_QUARTILE="ad-third-quartile",fn.AD_COMPLETE="ad-complete",fn.AD_STOPPED="ad-stopped",fn.AD_SKIPPED="ad-skipped",fn.AD_VOLUME_CHANGED="ad-volume-changed",fn.AD_MUTED="ad-muted",fn.AD_PAUSED="ad-paused",fn.AD_RESUMED="ad-resumed",fn.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",fn.CUEPOINTS_CHANGED="ad-cue-points-changed",fn.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",fn.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",fn.AD_CLICKED="ad-clicked",fn.AD_PROGRESS="ad-progress",fn.AD_BUFFERING="ad-buffering",fn.AD_IMPRESSION="ad-impression",fn.AD_DURATION_CHANGED="ad-duration-changed",fn.AD_CLOSED="ad-closed",fn.AD_LOADED="ad-loaded",fn.ALL_ADS_COMPLETED="all-ads-completed",fn.AD_LINEAR_CHANGED="ad-linear-changed",fn.AD_METADATA="ad-metadata",fn.AD_RECOVERABLE_ERROR="ad-recoverable-error",fn.AD_ERROR="ad-error",fn.AD_BREAK_READY="ad-break-ready",fn.AD_INTERACTION="ad-interaction",fn.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",fn.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",fn.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Ym(e,t,n,i,r){var l=this;this.s=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=r,this.j=null,this.h=new Mt,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.s,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.15.8"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(c){xb(l,c)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){cw(l,c)}),this.h.D(this.i,"ended",function(){l.m.contentComplete()}),this.h.Aa(this.i,"play",function(){l.F=!0})}Ym.prototype.configure=function(e){this.o=e},Ym.prototype.stop=function(){this.g&&this.g.stop(),this.s&&Ks(this.s)},Ym.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 cw(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new ke("ad-error",t)),Wm(e,null),e.l(new ke("ad-cue-points-changed",new Map().set("cuepoints",[])))}function xb(e,t){if(e.l(new ke("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 ke("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[],i=C(i);for(var r=i.next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new ke("ad-cue-points-changed",new Map().set("cuepoints",t)))}Eb(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),"ResizeObserver"in x?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.Aa(e.i,"play",function(){e.F=!0,e.g.start()})}catch{Wm(e,null)}}function Eb(e){function t(n,i){n=new Map().set("originalEvent",n),e.l(new ke(i,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){cw(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){fw(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){fw(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){Wm(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){Wm(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 fw(e,t){var n=t.getAd();n?(e.j=new Ye(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new ke("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new ke("ad-started",t)),e.j.isLinear()&&(e.s.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Ct("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Wm(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new ke("ad-content-resume-requested")),e.l(new ke("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.s.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function We(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.s=l,this.B=t.overlay}h=We.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return this.s},h.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},h.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},h.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},h.skip=function(){this.canSkipNow()&&this.A()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.B==null},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.o},h.getPositionInSequence=function(){return this.m},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return""},h.getAdId=function(){return this.i.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.i.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.g=null},Pe("shaka.ads.InterstitialAd",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.getVastAdId=We.prototype.getVastAdId,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 Qe(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}h=Qe.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return-1},h.isPaused=function(){return!1},h.isSkippable=function(){return!1},h.getTimeUntilSkippable=function(){return 0},h.canSkipNow=function(){return!1},h.skip=function(){},h.pause=function(){},h.play=function(){},h.getVolume=function(){return 1},h.setVolume=function(){},h.isMuted=function(){return!1},h.isLinear=function(){return this.i},h.resize=function(){},h.setMuted=function(){},h.getSequenceLength=function(){return this.j},h.getPositionInSequence=function(){return this.h},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.g.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){},Pe("shaka.ads.InterstitialStaticAd",Qe),Qe.prototype.release=Qe.prototype.release,Qe.prototype.getPodIndex=Qe.prototype.getPodIndex,Qe.prototype.getTimeOffset=Qe.prototype.getTimeOffset,Qe.prototype.getMediaUrl=Qe.prototype.getMediaUrl,Qe.prototype.getAdvertiserName=Qe.prototype.getAdvertiserName,Qe.prototype.getCreativeAdId=Qe.prototype.getCreativeAdId,Qe.prototype.getAdId=Qe.prototype.getAdId,Qe.prototype.getVastAdId=Qe.prototype.getVastAdId,Qe.prototype.getVastMediaWidth=Qe.prototype.getVastMediaWidth,Qe.prototype.getVastMediaHeight=Qe.prototype.getVastMediaHeight,Qe.prototype.getVastMediaBitrate=Qe.prototype.getVastMediaBitrate,Qe.prototype.getDescription=Qe.prototype.getDescription,Qe.prototype.getTitle=Qe.prototype.getTitle,Qe.prototype.getPositionInSequence=Qe.prototype.getPositionInSequence,Qe.prototype.getSequenceLength=Qe.prototype.getSequenceLength,Qe.prototype.setMuted=Qe.prototype.setMuted,Qe.prototype.resize=Qe.prototype.resize,Qe.prototype.isLinear=Qe.prototype.isLinear,Qe.prototype.isMuted=Qe.prototype.isMuted,Qe.prototype.setVolume=Qe.prototype.setVolume,Qe.prototype.getVolume=Qe.prototype.getVolume,Qe.prototype.play=Qe.prototype.play,Qe.prototype.pause=Qe.prototype.pause,Qe.prototype.skip=Qe.prototype.skip,Qe.prototype.canSkipNow=Qe.prototype.canSkipNow,Qe.prototype.getTimeUntilSkippable=Qe.prototype.getTimeUntilSkippable,Qe.prototype.isSkippable=Qe.prototype.isSkippable,Qe.prototype.isPaused=Qe.prototype.isPaused,Qe.prototype.getRemainingTime=Qe.prototype.getRemainingTime,Qe.prototype.getMinSuggestedDuration=Qe.prototype.getMinSuggestedDuration,Qe.prototype.getDuration=Qe.prototype.getDuration,Qe.prototype.isUsingAnotherMediaElement=Qe.prototype.isUsingAnotherMediaElement,Qe.prototype.hasCustomClick=Qe.prototype.hasCustomClick,Qe.prototype.isClientRendering=Qe.prototype.isClientRendering,Qe.prototype.needsSkipUI=Qe.prototype.needsSkipUI;function dw(e,t,n,i){var r=this;this.M=null,this.B=e,this.C=t,this.g=n,this.G=null,this.A=!0,this.h=this.g,this.i=i,this.U=new Set,this.H=new Set,this.F=new Map,this.L=new Map,this.j=new F,s1(this),this.I=new Mt,this.l=new Mt,this.K=!1,this.ha=this.o=this.s=this.m=null,this.ka=!1,this.P=-1,this.ba=function(){if(!r.K&&r.m&&!r.C.ua()){r.m=r.g.currentTime;var l=Cy(r);l&&Qm(r,l,1,1,Date.now())}},this.W=function(){if(!(r.K||r.m||r.C.ua())){r.m=r.g.currentTime;var l=Cy(r,!0);l&&Qm(r,l,1,1,Date.now())}},this.na=function(){if(!r.K&&r.m&&!r.C.ua()){var l=r.g.currentTime;r.s&&!r.s.pre&&!r.s.post&&l<(r.s.endTime||r.s.startTime)&&(r.s=null)}},this.S=new dt(this.ba),this.N=new dt(function(){var l,c,f,y,m,w,T,I,D,M,L;return G(function(P){switch(P.g){case 1:if(!r.H.size||r.m==null){P.u(0);break}if(l=r.C.m,l==cl||l==qm)return P.return();c=!1,f=Array.from(r.H),y=r.C.Sa(),m=C(f),w=m.next();case 3:if(w.done){P.u(5);break}if(T=w.value,T==r.s){P.u(4);break}if(I=T.endTime||T.startTime,!(1<=y.start-I)){D=T.startTime-r.m,0<D&&10>=D&&(!r.F.has(T)&&hw(T)&&r.F.set(T,r.j.preload(T.uri,null,T.mimeType||void 0)),gw(r,T)),P.u(4);break}if(!r.F.has(T)){P.u(7);break}return _(P,r.F.get(T),8);case 8:(M=P.h)&&M.destroy(),r.F.delete(T);case 7:mw(r,T),L=JSON.stringify(T),r.U.has(L)&&r.U.delete(L),r.H.delete(T),l1(r),T.overlay||(c=!0);case 4:w=m.next(),P.u(3);break;case 5:c&&Jm(r),ce(P)}})}),this.configure(this.C.getConfiguration().ads)}h=dw.prototype,h.configure=function(e){this.M=e,u1(this)};function Ab(e){if(!e.ka&&e.H.size){if(e.I.D(e.g,"playing",e.W),e.I.D(e.g,"timeupdate",e.W),e.I.D(e.g,"seeked",e.na),e.I.D(e.g,"ended",e.ba),"requestVideoFrameCallback"in e.g&&!yw()){var t=e.g,n=function(){e.P!=-1&&(e.ba(),e.P!=-1&&(e.P=t.requestVideoFrameCallback(n)))};e.P=t.requestVideoFrameCallback(n)}else e.S.Fa(.025);e.N&&e.N.Fa(1),e.ka=!0}}function l1(e){e.ka&&!e.H.size&&(e.I.Ja(e.g,"playing",e.W),e.I.Ja(e.g,"timeupdate",e.W),e.I.Ja(e.g,"seeked",e.na),e.I.Ja(e.g,"ended",e.ba),e.P!=-1&&(e.g.cancelVideoFrameCallback(e.P),e.P=-1),e.S&&e.S.stop(),e.N&&e.N.stop(),e.ka=!1)}function u1(e){if(e.B&&e.M&&!e.K){var t=e.M.supportsMultipleMediaElements,n=e.g;n.webkitPresentationMode&&n.webkitPresentationMode!=="inline"&&(t=!1),e.A==t&&(e.A=!t,e.A?(e.h=e.g,e.G&&(e.G.parentElement&&e.B.removeChild(e.G),e.G=null)):(e.G||(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.G=t),e.h=e.G))}else e.A=!0}h.stop=function(){if(this.l&&this.l.Ra(),this.U.clear(),this.H.clear(),this.j.ng(),this.F.size){var e=Array.from(this.F.values());e=C(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.F.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=C(e),t=e.next();!t.done;t=e.next())mw(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.s=this.m=null,this.A=!0,this.h=this.g,this.G=null,a1(this),l1(this),this.B&&Ks(this.B),this.o&&(this.o.stop(),this.o=null)},h.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.S&&(this.S.stop(),this.S=null),this.N&&(this.N.stop(),this.N=null),this.j.destroy()},h.od=function(){return this.j};function Cb(e,t){var n;G(function(i){if(i.g==1)return s1(e),_(i,Db(e,t),2);n=i.h,n.length?Ay(e,n):Ct("Unsupported HLS interstitial",t),ce(i)})}function bb(e,t){var n=sn(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,l=n.attributes.loop=="true",c=Ze(n,"z",Fn);if(i&&c!=0){var f=null,y=sn(n,"Background");if(y){var m=y.attributes.uri;m?f="center / contain no-repeat url('"+m+"')":f=zi(y)}y=1920,m=1080;var w=sn(n,"Viewport");if(w&&(y=Ze(w,"x",Fn),y==null||(m=Ze(w,"y",Fn),m==null)))return;var T={viewport:{x:y,y:m},topLeft:{x:0,y:0},size:{x:y,y:m}},I=sn(n,"Overlay");if(w&&I){var D=sn(I,"TopLeft"),M=sn(I,"Size");if(D&&M){if(I=Ze(D,"x",Fn),I==null||(D=Ze(D,"y",Fn),D==null))return;var L=Ze(M,"x",Fn);if(L==null||(M=Ze(M,"y",Fn),M==null))return;T.topLeft.x=I,T.topLeft.y=D,T.size.x=L,T.size.y=M}}if(I=null,n=sn(n,"Squeeze"),w&&n&&(M=sn(n,"TopLeft"),n=sn(n,"Size"),M&&n)){if(w=Ze(M,"x",Fn),w==null||(I=Ze(M,"y",Fn),I==null)||(M=Ze(n,"x",Fn),M==null)||(n=Ze(n,"y",Fn),n==null))return;I={viewport:{x:y,y:m},topLeft:{x:w,y:I},size:{x:M,y:n}}}Ay(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:T,displayOnBackground:c==-1,currentVideo:I,background:f}])}}h.addAdUrlInterstitial=function(e){var t=this,n,i,r,l,c,f,y,m,w;return G(function(T){switch(T.g){case 1:return n={type:12},_(T,c1(t,e,n),2);case 2:if(i=T.h,r=au(i,"VAST,vmap:VMAP"),!r)throw new Y(2,10,10007);if(l=[],r.tagName=="VAST"){l=sw(r,t.m),T.u(3);break}if(r.tagName!="vmap:VMAP"){T.u(3);break}for(var I=[],D=C(Rt(r,"vmap:AdBreak")),M=D.next();!M.done;M=D.next()){var L=M.value,P=L.attributes.timeOffset;P&&(M=null,P=="start"?M=0:P=="end"?M=1/0:M=oa(P),(L=sn(L,"vmap:AdSource"))&&(L=sn(L,"vmap:AdTagURI"))&&(L=Cn(L))&&I.push({time:M,uri:L}))}c=C(I),f=c.next();case 5:if(f.done){T.u(3);break}return y=f.value,_(T,c1(t,y.uri,n),8);case 8:if(m=T.h,w=au(m,"VAST"),!w)throw new Y(2,10,10007);l.push.apply(l,$(sw(w,y.time))),f=c.next(),T.u(5);break;case 3:Ay(t,l),ce(T)}})};function Ay(e,t){var n,i,r,l,c,f,y,m;G(function(w){switch(w.g){case 1:n=!1,i=C(t),r=i.next();case 2:if(r.done){w.u(4);break}if(l=r.value,!l.uri){Ct("Missing URL in interstitial",l),w.u(3);break}if(l.mimeType){w.u(5);break}return he(w,6),c=e.j.Pb(),_(w,ol(l.uri,c,e.C.getConfiguration().streaming.retryParameters),8);case 8:l.mimeType=w.h,_e(w,5);break;case 6:De(w);case 5:if(f=l.id||JSON.stringify(l),e.U.has(f)){w.u(3);break}l.loop&&!l.overlay&&Ct("Loop is only supported in overlay interstitials",l),l.overlay||(n=!0),e.U.add(f),e.H.add(l),y=!1,l.pre&&e.m==null?y=!0:l.startTime!=0||l.canJump?e.m!=null&&(m=l.startTime-e.m,0<m&&10>=m&&(y=!0)):y=!0,y&&(!e.F.has(l)&&hw(l)&&e.F.set(l,e.j.preload(l.uri,null,l.mimeType||void 0)),gw(e,l));case 3:r=i.next(),w.u(2);break;case 4:n&&Jm(e),Ab(e),ce(w)}})}function Cy(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var i=0,r=null;if(e.H.size&&e.m!=null){var l=e.g.ended,c=Array.from(e.H).sort(function(T,I){return I.startTime-T.startTime}),f=c;for(f=t?c.filter(function(T){return T.pre}):l?c.filter(function(T){return T.post}):c.filter(function(T){return!T.pre&&!T.post}),c=C(f),f=c.next();!f.done;f=c.next()){f=f.value;var y=!1;if(t)y=f.pre;else if(l)y=f.post;else if(!f.pre&&!f.post){var m=e.m-Math.round(1e3*f.startTime)/1e3,w=1;e.M.allowStartInMiddleOfInterstitial&&f.endTime&&f.endTime!=1/0&&(w=f.endTime-f.startTime),0<m&&(m<=w||!f.canJump)&&(y=!(n==null&&e.s&&!e.s.pre&&!e.s.post&&e.s.startTime>=f.startTime))}y&&(!e.s||f.startTime>=e.s.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 Qm(e,t,n,i,r,l){l=l===void 0?0:l,e.s=t,u1(e),e.A||!e.B||e.h.parentElement||e.B.appendChild(e.h),i==1&&n==1&&(n=Array.from(e.H).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.H.delete(t),l1(e),t.overlay||Jm(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?Ib(e,t,n,i,l):Ct("Unsupported interstitial",t):e.A&&t.overlay?Ct("Unsupported interstitial",t):kb(e,t,n,i,r,l)}function Ib(e,t,n,i,r){function l(){e.o&&(e.o.stop(),e.o=null),e.B.removeChild(y),a1(e,t),e.i(new ke("ad-stopped")),e.l.Ra();var I=Cy(e,t.pre,i-r);I?Qm(e,I,n,++i,Date.now(),r):e.K=!1}e.K=!0;var c=t.overlay,f=t.mimeType=="text/html"?"iframe":"img",y=document.createElement(f);y.style.objectFit="contain",y.style.position="absolute",y.style.border="none",pw(e,t),e.i(new ke("ad-started",new Map().set("ad",new Qe(t,n,i)))),f=="iframe"?y.src=t.uri:(y.src=t.uri,y.onerror=function(I){e.i(new ke("ad-error",new Map().set("originalEvent",I))),l()});var m=c.viewport,w=c.topLeft;c=c.size,m.x==0&&m.y==0?(y.width=t.overlay.size.x,y.height=t.overlay.size.y,y.style.bottom="10%",y.style.left="0",y.style.right="0",y.style.width="100%",t.overlay.size.y||f!="iframe"||(y.style.height="auto")):(y.style.height=c.y/m.y*100+"%",y.style.left=w.x/m.x*100+"%",y.style.top=w.y/m.y*100+"%",y.style.width=c.x/m.x*100+"%"),e.B.appendChild(y);var T=Date.now();e.o&&e.o.stop(),e.o=new dt(function(){t.playoutLimit&&(Date.now()-T)/1e3>t.playoutLimit?(e.i(new ke("ad-complete")),l()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new ke("ad-complete")),l()):e.g.currentTime<t.startTime&&(e.i(new ke("ad-skipped")),l())}),t.playoutLimit&&!t.endTime?e.o.ia(t.playoutLimit):t.endTime&&e.o.Fa(.025),e.l.D(e.g,"seeked",function(){var I=e.g.currentTime;(I<t.startTime||t.endTime&&I>t.endTime)&&(e.o&&e.o.stop(),e.i(new ke("ad-skipped")),l())})}function kb(e,t,n,i,r,l){var c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J;G(function(ne){switch(ne.g){case 1:if(c=Date.now(),e.K=!0,f=!1,y=function(){if(!e.A&&!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 te=Date.now();e.g.currentTime+=(te-r)/1e3,r=te}},m=function(te){var ee,ge;return G(function(fe){if(fe.g==1){if(y(),ee=Cy(e,t.pre,i-l),te&&t.groupId)for(;ee&&ee.groupId==t.groupId;)i++,ee=Cy(e,t.pre,i-l);return e.o&&(!t.groupId||ee&&ee.groupId!=t.groupId)&&(e.o.stop(),e.o=null),a1(e,t),ee&&!ee.overlay?fe.u(2):(t.post&&(e.m=null,e.s=null),e.A?_(fe,e.j.detach(),4):_(fe,e.j.vc(),4))}fe.g!=2&&(e.A&&(ge=t.resumeOffset,ge==null&&(ge=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.m||0):(Date.now()-r)/1e3),e.i(new ke("ad-content-resume-requested",new Map().set("offset",ge)))),e.i(new ke("ad-stopped")),e.l.Ra(),e.K=!1,e.A?Jm(e):(e.h.style.display="none",y(),e.g.ended||e.g.play())),u1(e),ee&&(e.i(new ke("ad-stopped")),e.l.Ra(),Qm(e,ee,n,++i,r,l)),ce(fe)})},w=function(te){return G(function(ee){return f?ee.return():(f=!0,e.i(new ke("ad-error",new Map().set("originalEvent",te))),_(ee,m(!1),0))})},T=function(){return G(function(te){if(te.g==1)return f?te.return():(f=!0,_(te,m(!1),2));e.i(new ke("ad-complete")),ce(te)})},e.ha=function(){return G(function(te){return f?te.return():(f=!0,e.i(new ke("ad-skipped")),_(te,m(!0),0))})},I=new We(e.h,t,e.ha,n,i,!e.A),e.A||(I.setMuted(e.g.muted),I.setVolume(e.g.volume)),e.i(new ke("ad-started",new Map().set("ad",I))),(D=I.canSkipNow())&&e.i(new ke("ad-skip-state-changed")),e.l.Aa(e.j,"error",w),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var te=I.canSkipNow();D!=te&&0<I.getRemainingTime()&&0<I.getDuration()&&e.i(new ke("ad-skip-state-changed")),D=te}}),e.l.Aa(e.j,"firstquartile",function(){y(),e.i(new ke("ad-first-quartile"))}),e.l.Aa(e.j,"midpoint",function(){y(),e.i(new ke("ad-midpoint"))}),e.l.Aa(e.j,"thirdquartile",function(){y(),e.i(new ke("ad-third-quartile"))}),e.l.Aa(e.j,"complete",T),e.l.D(e.h,"play",function(){e.i(new ke("ad-resumed"))}),e.l.D(e.h,"pause",function(){var te=e.j.getConfiguration();e.h.currentTime>=te.playRangeEnd?T():e.i(new ke("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new ke("ad-muted")):e.i(new ke("ad-volume-changed"))}),!e.A||i!=1){ne.u(2);break}return e.i(new ke("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),M=new ct,L=function(te){return G(function(ee){if(ee.g==1)return te.state!="detach"?ee.u(0):yw()?_(ee,new Promise(function(ge){return new dt(ge).ia(.1)}),3):ee.u(3);M.resolve(),e.l.Ja(e.C,"onstatechange",L),ce(ee)})},e.l.D(e.C,"onstatechange",L),_(ne,M,2);case 2:return pw(e,t),e.A||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,P=t.overlay.viewport,j=t.overlay.topLeft,V=t.overlay.size,e.h.style.height=V.y/P.y*100+"%",e.h.style.left=j.x/P.x*100+"%",e.h.style.top=j.y/P.y*100+"%",e.h.style.width=V.x/P.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%")),he(ne,4),s1(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(K=t.endTime-t.startTime,0<K&&e.j.configure("playRangeEnd",K)),t.playoutLimit&&!e.o&&(e.o=new dt(function(){e.ha()}).ia(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),_(ne,e.j.fc(e.h),6);case 6:return q=null,e.M.allowStartInMiddleOfInterstitial&&e.m!=null&&(Q=e.m-t.startTime,.25<Math.abs(Q)&&(q=Q)),e.F.has(t)?_(ne,e.F.get(t),10):_(ne,e.j.load(t.uri,q,t.mimeType||void 0),8);case 10:return z=ne.h,e.F.delete(t),z?_(ne,e.j.load(z),8):_(ne,e.j.load(t.uri,q,t.mimeType||void 0),8);case 8:e.h.play(),X=(Date.now()-c)/1e3,e.i(new ke("ads-loaded",new Map().set("loadTime",X))),e.A&&e.g.play(),t.overlay&&(W=function(){var te=e.g.currentTime-t.startTime;.1<Math.abs(te-e.h.currentTime)&&(e.h.currentTime=te)},e.l.Aa(e.h,"playing",W),e.l.D(e.g,"seeking",W),e.l.D(e.g,"seeked",function(){var te=e.g.currentTime;(te<t.startTime||t.endTime&&te>t.endTime)&&e.ha()})),_e(ne,0);break;case 4:if(J=De(ne),!e.K)return ne.return();w(J),ce(ne)}})}function pw(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.B&&(e.B.style.pointerEvents="none",t.background&&(e.B.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function a1(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.B&&(e.B.style.pointerEvents="",!t||t.background)&&(e.B.style.background=""),e.G&&(e.G.style.background="")}function Db(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st,tt,zt,ft;return G(function(lt){switch(lt.g){case 1:if(n=[],!t||(i=t.values.find(function(ht){return ht.key=="X-ASSET-URI"}),r=t.values.find(function(ht){return ht.key=="X-ASSET-LIST"}),!i&&!r))return lt.return(n);if(l=null,(c=t.values.find(function(ht){return ht.key=="ID"}))&&(l=c.data),f=l==null?Math.floor(10*t.startTime)/10:t.startTime,(y=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(y=l==null?Math.floor(10*t.endTime)/10:t.endTime),m=t.values.find(function(ht){return ht.key=="X-RESTRICT"}),T=w=!0,m&&m.data&&(I=m.data,w=!I.includes("SKIP"),T=!I.includes("JUMP")),D=w?0:null,(M=t.values.find(function(ht){return ht.key=="X-ENABLE-SKIP-AFTER"}))&&(L=M.data,D=parseFloat(L),isNaN(D)&&(D=w?0:null)),P=null,(j=t.values.find(function(ht){return ht.key=="X-ENABLE-SKIP-FOR"}))&&(V=j.data,P=parseFloat(V),isNaN(D)&&(P=null)),K=null,(q=t.values.find(function(ht){return ht.key=="X-RESUME-OFFSET"}))&&(Q=q.data,K=parseFloat(Q),isNaN(K)&&(K=null)),z=null,(X=t.values.find(function(ht){return ht.key=="X-PLAYOUT-LIMIT"}))&&(W=X.data,z=parseFloat(W),isNaN(z)&&(z=null)),te=ne=J=!1,(ee=t.values.find(function(ht){return ht.key=="CUE"}))&&(ge=ee.data,J=ge.includes("ONCE"),ne=ge.includes("PRE"),te=ge.includes("POST")),fe=!1,(le=t.values.find(function(ht){return ht.key=="X-TIMELINE-OCCUPIES"}))?(pe=le.data,fe=pe.includes("RANGE")):!q&&e.C.V()&&(fe=!ne&&!te),i){if(Ee=i.data,!Ee)return lt.return(n);n.push({id:l,groupId:null,startTime:f,endTime:y,uri:Ee,mimeType:null,isSkippable:w,skipOffset:D,skipFor:P,canJump:T,resumeOffset:K,playoutLimit:z,once:J,pre:ne,post:te,timelineRange:fe,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),lt.u(2);break}if(!r){lt.u(2);break}return Ce=r.data,Ce?(he(lt,4),Be={type:11},_(lt,c1(e,Ce,Be),6)):lt.return(n);case 6:for(Le=lt.h,kt=ln(Le),xt=JSON.parse(kt),(Kt=xt["SKIP-CONTROL"])&&(st=Kt["ENABLE-SKIP-AFTER"],typeof st=="number"&&(D=parseFloat(st),isNaN(st)&&(D=w?0:null)),tt=Kt["ENABLE-SKIP-FOR"],typeof tt=="number"&&(P=parseFloat(tt),isNaN(tt)&&(P=null))),zt=0;zt<xt.ASSETS.length;zt++)ft=xt.ASSETS[zt],ft.URI&&n.push({id:l+"_shaka_asset_"+zt,groupId:l,startTime:f,endTime:y,uri:ft.URI,mimeType:null,isSkippable:w,skipOffset:D,skipFor:P,canJump:T,resumeOffset:K,playoutLimit:z,once:J,pre:ne,post:te,timelineRange:fe,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});_e(lt,2);break;case 4:De(lt);case 2:return lt.return(n)}})}function Jm(e){for(var t=[],n=C(e.H),i=n.next(),r={};!i.done;r={uc:void 0},i=n.next())i=i.value,i.overlay||(r.uc={start:i.startTime,end:null},i.pre?(r.uc.start=0,r.uc.end=null):i.post?(r.uc.start=-1,r.uc.end=null):i.timelineRange&&(r.uc.end=i.endTime),t.find(function(l){return function(c){return l.uc.start==c.start&&l.uc.end==c.end}}(r))||t.push(r.uc));e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",t)))}function s1(e){e.j.configure(e.C.Zh()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),sh(e.C.Pb(),e.j.Pb())}function c1(e,t,n){var i,r,l;return G(function(c){return c.g==1?(i=bn([t],yo()),r=e.C.Pb().request(7,i,n),_(c,r.promise,2)):(l=c.h,c.return(l.data))})}function hw(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function yw(){var e=yt().La();return e=="TV"||e=="CONSOLE"||e=="CAST"}function gw(e,t){if(!(e.L.has(t)||e.M&&!e.M.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 mw(e,t){if(e.L.has(t)){var n=e.L.get(t);n=C(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.parentNode.removeChild(i);e.L.delete(t)}}function Xe(e,t,n,i,r){this.h=e,this.j=oa(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}h=Xe.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.h.durationInSeconds},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return typeof this.j=="number"},h.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.o},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.l?this.l:1},h.getPositionInSequence=function(){return this.i?this.i:1},h.getTitle=function(){return this.h.adTitle},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return this.h.vastAdId||""},h.getAdId=function(){return this.h.adId},h.getCreativeAdId=function(){return this.h.creativeId},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.l=this.i=this.g=this.h=null},Pe("shaka.ads.MediaTailorAd",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.getVastAdId=Xe.prototype.getVastAdId,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 by(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.s=[],this.G="",this.N=!0,this.H="",this.o=new Mt}by.prototype.stop=function(){for(var e=C(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ja(t.target,t.type,t.listener);fp(this),this.m=[],this.s=[],this.G="",this.N=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},by.prototype.release=function(){this.stop(),this.o&&this.o.release()},by.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(Rb(this,this.G,this.N),this.N=!1)},by.prototype.getCuePoints=function(){for(var e=[],t=C(this.j),n=t.next();!n.done;n=t.next()){n=C(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 Ob(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M;G(function(L){if(L.g==1)return i={type:7},r=bn([t],yo()),r.method="POST",n&&(l=JSON.stringify(n),r.body=Br(l)),c=e.K.request(7,r,i),he(L,2),_(L,c.promise,4);if(L.g!=2){if(f=L.h,y=ln(f.data),m=JSON.parse(y),m.manifestUrl&&m.trackingUrl)w=new dn(t),T=new dn(m.trackingUrl),e.G=w.resolve(T).toString(),I=Date.now()/1e3,D=I-e.P,e.i(new ke("ads-loaded",new Map().set("loadTime",D))),M=new dn(m.manifestUrl),e.l.resolve(w.resolve(M).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return _e(L,0)}if(De(L),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,L.return();e.l.resolve(e.H),e.l=null,ce(L)})}function Rb(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V;G(function(K){if(K.g==1)return i={type:8},r=bn([t],yo()),l=e.K.request(7,r,i),he(K,2),_(K,l.promise,4);if(K.g!=2){if(c=K.h,f=[],y=ln(c.data),m=JSON.parse(y),0<m.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(m.avails)){for(e.j=m.avails,w=C(e.j),T=w.next();!T.done;T=w.next())for(I=T.value,D=C(I.nonLinearAdsList),M=D.next();!M.done;M=D.next())for(L=M.value,P=C(L.nonLinearAdList),j=P.next();!j.done;j=P.next())V=j.value,Mb(e,V);f=e.getCuePoints(),e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",f)))}}else e.j.length&&e.i(new ke("ad-cue-points-changed",new Map().set("cuepoints",f))),fp(e),e.j=[];return n&&(e.I||0<f.length)&&Nb(e),_e(K,0)}De(K),ce(K)})}function Mb(e,t){var n,i,r,l,c,f,y,m;G(function(w){if(w.g==1)return!t.staticResource||(n=vw(t),e.F.get(n))?w.return():(i={type:9},r=bn([t.staticResource],yo()),l=e.K.request(7,r,i),he(w,2),e.F.set(n,[]),_(w,l.promise,4));if(w.g!=2)return c=w.h,f=ln(c.data),y=JSON.parse(f),m=y.apps,e.F.set(n,m),_e(w,0);De(w),e.F.delete(n),ce(w)})}function vw(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function Nb(e){ww(e),e.I||(Sw(e),e.o.D(e.h,"seeked",function(){Sw(e)}),e.o.D(e.h,"ended",function(){fp(e)})),e.o.D(e.h,"timeupdate",function(){ww(e)})}function Sw(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,i,r=C(e.j),l=r.next();!l.done;l=r.next()){l=l.value;for(var c=C(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 ww(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.s.includes("firstQuartile")?(e.s.push("firstQuartile"),$i(e,"firstQuartile")):t>=r&&!e.s.includes("midpoint")?(e.s.push("midpoint"),$i(e,"midpoint")):t>=l&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),$i(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&$i(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&fp(e)}if(!e.g||!e.g.isLinear()){e:for(i=C(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}fp(e),e.L=r,e.g=new Xe(c,l+1,r.ads.length,!0,e.h),e.C=c,l===0&&$i(e,"breakStart"),Tw(e);break}}if(!e.g){for(i=C(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 y=e.F.get(vw(c.nonLinearAdList[0]));if(f<=t&&y&&y.length){fp(e),f=e,y=C(y);for(var m=y.next();!m.done;m=y.next())if(m=m.value,m.data.source.length){var w=document.createElement("img");w.src=m.data.source[0].url,w.style.top=(m.placeholder.top||0)+"%",w.style.height=100-(m.placeholder.top||0)+"%",w.style.left=(m.placeholder.left||0)+"%",w.style.maxWidth=100-(m.placeholder.left||0)+"%",w.style.objectFit="contain",w.style.position="absolute",f.B.appendChild(w)}e.L=r,e.g=new Xe(c,l+1,r.ads.length,!1,e.h),e.C=c,l===0&&$i(e,"breakStart"),Tw(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function fp(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?$i(e,"skip"):$i(e,"complete"),t=C(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.s=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&$i(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function Tw(e){var t=!1;e.h.paused?t=!0:($i(e,"impression"),$i(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&$i(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||$i(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?($i(e,"impression"),$i(e,"start"),t=!1):$i(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){$i(e,"pause")}});for(var n=C(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function $i(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=C(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&r!=""&&(r=bn([r],yo()),r.method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new ke("ad-impression"));break;case"start":e.i(new ke("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new ke("ad-muted"));break;case"unmute":e.i(new ke("ad-volume-changed"));break;case"resume":e.i(new ke("ad-resumed"));break;case"pause":e.i(new ke("ad-paused"));break;case"firstQuartile":e.i(new ke("ad-first-quartile"));break;case"midpoint":e.i(new ke("ad-midpoint"));break;case"thirdQuartile":e.i(new ke("ad-third-quartile"));break;case"complete":e.i(new ke("ad-complete")),e.i(new ke("ad-stopped"));break;case"skip":e.i(new ke("ad-skipped")),e.i(new ke("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 ke("ad-skip-state-changed"))}}function Je(e,t){this.g=e,this.i=null,this.h=t}h=Je.prototype,h.needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.i?this.i.duration:-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},h.isPaused=function(){return this.h.paused},h.isSkippable=function(){return this.g.isSkippable()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.getTimeUntilSkippable()==0},h.skip=function(){this.h.currentTime+=this.getRemainingTime()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.play()},h.getVolume=function(){return this.h.volume},h.setVolume=function(e){this.h.volume=e},h.isMuted=function(){return this.h.muted},h.isLinear=function(){return!0},h.resize=function(){},h.setMuted=function(e){this.h.muted=e},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},h.release=function(){this.h=this.i=this.g=null},Pe("shaka.ads.ServerSideAd",Je),Je.prototype.release=Je.prototype.release,Je.prototype.getPodIndex=Je.prototype.getPodIndex,Je.prototype.getTimeOffset=Je.prototype.getTimeOffset,Je.prototype.getMediaUrl=Je.prototype.getMediaUrl,Je.prototype.getAdvertiserName=Je.prototype.getAdvertiserName,Je.prototype.getCreativeAdId=Je.prototype.getCreativeAdId,Je.prototype.getAdId=Je.prototype.getAdId,Je.prototype.getVastAdId=Je.prototype.getVastAdId,Je.prototype.getVastMediaWidth=Je.prototype.getVastMediaWidth,Je.prototype.getVastMediaHeight=Je.prototype.getVastMediaHeight,Je.prototype.getVastMediaBitrate=Je.prototype.getVastMediaBitrate,Je.prototype.getDescription=Je.prototype.getDescription,Je.prototype.getTitle=Je.prototype.getTitle,Je.prototype.getPositionInSequence=Je.prototype.getPositionInSequence,Je.prototype.getSequenceLength=Je.prototype.getSequenceLength,Je.prototype.setMuted=Je.prototype.setMuted,Je.prototype.resize=Je.prototype.resize,Je.prototype.isLinear=Je.prototype.isLinear,Je.prototype.isMuted=Je.prototype.isMuted,Je.prototype.setVolume=Je.prototype.setVolume,Je.prototype.getVolume=Je.prototype.getVolume,Je.prototype.play=Je.prototype.play,Je.prototype.pause=Je.prototype.pause,Je.prototype.skip=Je.prototype.skip,Je.prototype.canSkipNow=Je.prototype.canSkipNow,Je.prototype.getTimeUntilSkippable=Je.prototype.getTimeUntilSkippable,Je.prototype.isSkippable=Je.prototype.isSkippable,Je.prototype.isPaused=Je.prototype.isPaused,Je.prototype.getRemainingTime=Je.prototype.getRemainingTime,Je.prototype.getMinSuggestedDuration=Je.prototype.getMinSuggestedDuration,Je.prototype.getDuration=Je.prototype.getDuration,Je.prototype.isUsingAnotherMediaElement=Je.prototype.isUsingAnotherMediaElement,Je.prototype.hasCustomClick=Je.prototype.hasCustomClick,Je.prototype.isClientRendering=Je.prototype.isClientRendering,Je.prototype.needsSkipUI=Je.prototype.needsSkipUI;function xw(e,t,n,i){var r=this;this.s=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 Mt,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new ke("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(l){Pb(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 Je(l,r.l),r.A&&(r.m.i=r.A),r.i(new ke("ad-started",new Map().set("ad",r.m))),r.s.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.s.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 ke("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new ke("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new ke("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new ke("ad-complete")),r.i(new ke("ad-stopped")),r.s.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new ke("ad-skipped")),r.i(new ke("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(l){var c=l.getStreamData();l=[],c=C(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 ke("ad-cue-points-changed",new Map().set("cuepoints",l)))})}h=xw.prototype,h.configure=function(){},h.stop=function(){this.B="",this.o=null,this.C=[]},h.release=function(){this.stop(),this.h&&this.h.release()},h.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},h.getCuePoints=function(){return this.C};function Pb(e,t){e.i(new ke("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 je(){It.call(this),this.h=this.i=this.j=this.g=null,this.m=new aw,this.o=navigator.language,this.l=null}$e(je,It),h=je.prototype,h.setLocale=function(e){this.o=e},h.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)},h.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new dw(e,t,n,function(r){return Zm(i,r)}),this.g.configure(this.l)},h.initClientSide=function(e,t,n){var i=this;if(!x.google||!google.ima||!google.ima.AdsLoader)throw new Y(2,10,1e4);this.j&&this.j.release(),this.j=new Ym(e,t,this.o,n,function(r){return Zm(i,r)}),this.j.configure(this.l)},h.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),It.prototype.release.call(this)},h.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 ke("ad-stopped")),this.dispatchEvent(new ke("ad-content-attach-requested")),this.m=new aw},h.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)},h.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)},h.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new by(e,t,n,function(r){return Zm(i,r)})},h.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 ct,Ob(i,e,t),i.H=n||"",i.P=Date.now()/1e3,e=i.l),e},h.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new Y(1,10,10005);var t=this.i;t.G=e,t.i(new ke("ads-loaded",new Map().set("loadTime",0)))},h.initServerSide=function(e,t){var n=this;if(!x.google||!google.ima||!google.ima.dai)throw new Y(2,10,10002);this.h&&this.h.release(),this.h=new xw(e,t,this.o,function(i){return Zm(n,i)}),this.h.configure(this.l)},h.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)&&Ct('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.15.8",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 ct,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},h.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new Y(1,10,10003);(e.mpt||e.mpv)&&Ct('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.15.8",this.h.g.replaceAdTagParameters(e)},h.getServerSideCuePoints=function(){return Et("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},h.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},h.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:wb(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},h.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},h.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)},h.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},h.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},h.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&Cb(this.g,n))},h.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,y,m=C(n.eventNode.children),w=m.next();!w.done;w=m.next())if(w=w.value,w.tagName=="AlternativeMPD"){if(w=w.attributes.uri){y=w;break}}else if(w.tagName=="InsertPresentation"||w.tagName=="ReplacePresentation"){var T=w.attributes.url;if(T){y=T,(m=Ze(w,"maxDuration",Fn))&&(c=m/n.timescale),(m=Ze(w,"returnOffset",Fn))&&(f=m/n.timescale),t&&f&&(l=r+f);break}}y&&Ay(e,[{id:n.id,groupId:null,startTime:r,endTime:l,uri:y,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&&sn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&bb(this.g,n))}},h.addCustomInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);Ay(this.g,[e])},h.addAdUrlInterstitial=function(e){if(!this.g)throw new Y(1,10,10006);return this.g.addAdUrlInterstitial(e)},h.getInterstitialPlayer=function(){if(!this.g)throw new Y(1,10,10006);return this.g.od()};function Zm(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)}Pe("shaka.ads.AdManager",je),je.prototype.getInterstitialPlayer=je.prototype.getInterstitialPlayer,je.prototype.addAdUrlInterstitial=je.prototype.addAdUrlInterstitial,je.prototype.addCustomInterstitial=je.prototype.addCustomInterstitial,je.prototype.onDASHInterstitialMetadata=je.prototype.onDASHInterstitialMetadata,je.prototype.onHLSInterstitialMetadata=je.prototype.onHLSInterstitialMetadata,je.prototype.onCueMetadataChange=je.prototype.onCueMetadataChange,je.prototype.onHlsTimedMetadata=je.prototype.onHlsTimedMetadata,je.prototype.onDashTimedMetadata=je.prototype.onDashTimedMetadata,je.prototype.onManifestUpdated=je.prototype.onManifestUpdated,je.prototype.getStats=je.prototype.getStats,je.prototype.getCuePoints=je.prototype.getCuePoints,je.prototype.getServerSideCuePoints=je.prototype.getServerSideCuePoints,je.prototype.replaceServerSideAdTagParameters=je.prototype.replaceServerSideAdTagParameters,je.prototype.requestServerSideStream=je.prototype.requestServerSideStream,je.prototype.initServerSide=je.prototype.initServerSide,je.prototype.addMediaTailorTrackingUrl=je.prototype.addMediaTailorTrackingUrl,je.prototype.requestMediaTailorStream=je.prototype.requestMediaTailorStream,je.prototype.initMediaTailor=je.prototype.initMediaTailor,je.prototype.updateClientSideAdsRenderingSettings=je.prototype.updateClientSideAdsRenderingSettings,je.prototype.requestClientSideAds=je.prototype.requestClientSideAds,je.prototype.onAssetUnload=je.prototype.onAssetUnload,je.prototype.release=je.prototype.release,je.prototype.initClientSide=je.prototype.initClientSide,je.prototype.initInterstitial=je.prototype.initInterstitial,je.prototype.configure=je.prototype.configure,je.prototype.setLocale=je.prototype.setLocale,je.ADS_LOADED="ads-loaded",je.AD_STARTED="ad-started",je.AD_FIRST_QUARTILE="ad-first-quartile",je.AD_MIDPOINT="ad-midpoint",je.AD_THIRD_QUARTILE="ad-third-quartile",je.AD_COMPLETE="ad-complete",je.AD_STOPPED="ad-stopped",je.AD_SKIPPED="ad-skipped",je.AD_VOLUME_CHANGED="ad-volume-changed",je.AD_MUTED="ad-muted",je.AD_PAUSED="ad-paused",je.AD_RESUMED="ad-resumed",je.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",je.CUEPOINTS_CHANGED="ad-cue-points-changed",je.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",je.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",je.AD_CLICKED="ad-clicked",je.AD_PROGRESS="ad-progress",je.AD_BUFFERING="ad-buffering",je.AD_IMPRESSION="ad-impression",je.AD_DURATION_CHANGED="ad-duration-changed",je.AD_CLOSED="ad-closed",je.AD_LOADED="ad-loaded",je.ALL_ADS_COMPLETED="all-ads-completed",je.AD_LINEAR_CHANGED="ad-linear-changed",je.AD_METADATA="ad-metadata",je.AD_RECOVERABLE_ERROR="ad-recoverable-error",je.AD_ERROR="ad-error",je.AD_BREAK_READY="ad-break-ready",je.AD_INTERACTION="ad-interaction",je.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",je.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",je.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",zm=function(){return new je};function Ew(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof ke){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=C(Object.getOwnPropertyNames(n)),t=i.next();!t.done;t=i.next())r.add(t.value);for(i={},r=C(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=C(zo(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 f1(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=Lb(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 Lb(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var Aw="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),_b="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),d1=["loop","playbackRate"],Ub=["pause","play"],p1=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),h1=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),Cw=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),bw=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Iw=[["isTextTrackVisible","setTextTrackVisibility"]],jb="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),Bb="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function y1(e,t,n,i,r,l,c){var f=this;this.G=e,this.K=c,this.l=new dt(t),this.L=n,this.s=!1,this.A=i,this.F=r,this.M=l,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return g1(f)},this.C=function(y,m){switch(y=f1(m),y.type){case"event":var w=y.targetName,T=_g(y.event);f.A(w,T);break;case"update":w=y.update;for(T in w){y=f.g[T]||{};for(var I in w[T])y[I]=w[T][I]}f.s&&(f.L(),f.s=!1);break;case"asyncComplete":if(I=y.id,T=y.error,m=y.res,y=f.h.get(I),f.h.delete(I),y)if(T){I=new Y(T.severity,T.category,T.code);for(w in T)I[w]=T[w];y.reject(I)}else y.resolve(m)}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,ky.add(this)}h=y1.prototype,h.destroy=function(){return ky.delete(this),m1(this),fl&&Dw(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()},h.vb=function(){return this.i},h.Zg=function(){return this.I},h.init=function(){if(this.G.length)if(x.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Jb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=C(ky),i=n.next();!i.done;i=n.next()){i=i.value;var r=t;i.j=new ct,i.s=!0,$m(i,r)}},function(t){for(var n=C(ky),i=n.next();!i.done;i=n.next())i=i.value,e0=t=="available",i.l.Jb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),e0&&this.l.ia(Hb),(e=fl)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ct,this.s=!0,$m(this,e)):fl=null}else x.__onGCastApiAvailable!==Ow&&(t0=x.__onGCastApiAvailable||null,x.__onGCastApiAvailable=Ow)},h.kh=function(e){this.o=e,this.i&&Iy(this,{type:"appData",appData:this.o})},h.cast=function(){var e=this;return G(function(t){if(!e.m)throw new Y(1,8,8e3);if(!e0)throw new Y(1,8,8001);if(e.i)throw new Y(1,8,8002);return e.j=new ct,chrome.cast.requestSession(function(n){return $m(e,n)},function(n){return kw(e,n)}),_(t,e.j,0)})};function Vb(e){e.i&&chrome.cast.requestSession(function(t){return $m(e,t)},function(t){return kw(e,t)})}h.md=function(){if(this.i){if(m1(this),fl){Dw(this);try{fl.stop(function(){},function(){})}catch{}fl=null}g1(this)}},h.get=function(e,t){var n=this;if(e=="video"){if(Ub.includes(t))return function(){return n.zi.apply(n,[e,t].concat($(vt.apply(0,arguments))))}}else if(e=="player"){if(Cw.has(t)&&!this.get("player","isLive")())return function(){};if(jb.includes(t))return function(){return n.zi.apply(n,[e,t].concat($(vt.apply(0,arguments))))};if(Bb.includes(t))return function(){return n.Hk.apply(n,[e,t].concat($(vt.apply(0,arguments))))};if(p1.has(t)||h1.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},h.set=function(e,t,n){this.g[e][t]=n,Iy(this,{type:"set",targetName:e,property:t,value:n})};function $m(e,t){var n=e.M();fl=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),g1(e),Iy(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function kw(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))}h.zi=function(e,t){Iy(this,{type:"call",targetName:e,methodName:t,args:vt.apply(2,arguments)})},h.Hk=function(e,t){var n=vt.apply(2,arguments),i=new ct,r=this.H.toString();this.H++,this.h.set(r,i);try{Iy(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(l){i.reject(l)}return i};function Dw(e){var t=fl;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function g1(e){var t=fl?fl.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};m1(e)}e.i=t,e.I=t?fl.receiver.friendlyName:"",e.l.Jb()}function m1(e){if(e.h)for(var t=C(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 Iy(e,t){t=Ew(t);var n=fl;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},yg)}catch(i){throw t=new Y(2,8,8005,i),n=new ke("error",new Map().set("detail",t)),e.A("player",n),e.md(),t}}var Hb=.02,e0=!1,fl=null,t0=null,ky=new Set;function Ow(e){if(t0?x.__onGCastApiAvailable=t0:delete x.__onGCastApiAvailable,t0=null,e)for(var t=C(ky),n=t.next();!n.done;n=t.next())n.value.init();typeof x.__onGCastApiAvailable=="function"&&x.__onGCastApiAvailable(e)}function Un(e,t,n,i){i=i===void 0?!1:i,It.call(this);var r=this;this.i=e,this.h=t,this.l=this.o=this.m=this.s=this.j=null,this.H=n,this.G=i,this.C=[],this.B=[],this.A=[],this.F=new Map,this.g=null,x.chrome?(this.g=new y1(n,function(){return Nw(r)},function(){return Pw(r)},function(l,c){return _w(r,l,c)},function(){return Lw(r)},function(){return Mw(r)},i),Kb(this)):(this.j=this.i,this.s=this.h)}$e(Un,It),h=Un.prototype,h.destroy=function(e){return this.g&&(e!==void 0&&e)&&this.g.md(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.j=this.i=null,It.prototype.release.call(this),Promise.all(e)},h.Xj=function(){return this.j},h.od=function(){return this.s},h.hj=function(){return this.g?this.g.m&&e0:!1},h.vb=function(){return this.g?this.g.vb():!1},h.Zg=function(){return this.g?this.g.Zg():""},h.cast=function(){var e=this;return G(function(t){return t.g==1?e.g?_(t,e.g.cast(),2):t.return():e.h?_(t,e.h.vc(),0):t.return()})},h.kh=function(e){this.g&&this.g.kh(e)},h.Wk=function(){this.g&&Vb(this.g)},h.md=function(){this.g&&this.g.md()},h.ij=function(e,t){t=t===void 0?!1:t;var n=this;return G(function(i){if(i.g==1)return e==n.H&&t==n.G||(n.H=e,n.G=t,!n.g)?i.return():(n.g.md(),_(i,n.g.destroy(),2));n.g=null,n.g=new y1(e,function(){return Nw(n)},function(){return Pw(n)},function(r,l){return _w(n,r,l)},function(){return Lw(n)},function(){return Mw(n)},t),n.g.init(),ce(i)})};function Kb(e){e.g.init(),e.l=new Mt;for(var t=C(Aw),n=t.next();!n.done;n=t.next())e.l.D(e.i,n.value,function(l){e.g.vb()||(l=_g(l),e.m.dispatchEvent(l))});for(var i in Vc)e.l.D(e.h,Vc[i],function(l){e.g.vb()||e.o.dispatchEvent(l)});e.j={},t={};for(var r in e.i)t={Xd:t.Xd},t.Xd=r,Object.defineProperty(e.j,t.Xd,{configurable:!1,enumerable:!0,get:function(l){return function(){return Fb(e,l.Xd)}}(t),set:function(l){return function(c){var f=l.Xd;e.g.vb()?e.g.set("video",f,c):e.i[f]=c}}(t)});e.s={},Rw(e,function(l){Object.defineProperty(e.s,l,{configurable:!1,enumerable:!0,get:function(){return n0(e,l)}})}),Gb(e),e.m=new It,e.m.ze=e.j,e.o=new It,e.o.ze=e.s,e.l.D(e.h,"unloading",function(){e.g&&e.g.vb()||v1(e)})}function Gb(e){var t=new Map;Rw(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.F.set(n,i):e.F.set(i,n)):t.set(i,n)})}function Rw(e,t){function n(y){return y=="constructor"||typeof i[y]!="function"?!1:!r.has(y)}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=C(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 Mw(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.nd(),startTime:null,addThumbnailsTrackCalls:e.C,addTextTrackAsyncCalls:e.B,addChaptersTrackCalls:e.A};e.i.pause();for(var n=C(d1),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=C(bw),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=C(Iw),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 Nw(e){var t=new ke("caststatuschanged");e.dispatchEvent(t)}function Pw(e){var t=new ke(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function Lw(e){for(var t=C(bw),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.C,l=e.B,c=e.A;v1(e);var f=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var y=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime"));var m;(i=e.g.get("player","getTextTracks")())&&i.length&&(m=i.find(function(I){return I.active}));var w=e.g.get("player","isTextTrackVisible")();f&&(e.i.autoplay=!1,t=e.h.load(f,n));var T={};for(n=C(d1),i=n.next();!i.done;i=n.next())i=i.value,T[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var I=C(r),D=I.next();!D.done;D=I.next()){D=D.value;var M;(M=e.od()).He.apply(M,$(D))}for(I=C(l),M=I.next();!M.done;M=I.next()){M=M.value;var L;(L=e.od()).Hd.apply(L,$(M))}for(L=C(c),I=L.next();!I.done;I=L.next()){I=I.value;var P;(P=e.od()).Ge.apply(P,$(I))}for(P=C(d1),L=P.next();!L.done;L=P.next())L=L.value,e.i[L]=T[L];for(P=C(Iw),L=P.next();!L.done;L=P.next())I=L.value,L=I[1],I=e.g.get("player",I[0])(),e.h[L](I);e.h.oh(w),m&&e.h.ih(m.language,m.roles,m.forced),e.i.autoplay=y,f&&e.i.play()}},function(I){I=new Map().set("detail",I),I=new ke("error",I),e.h.dispatchEvent(I)})}function Fb(e,t){if(t=="addEventListener")return function(i,r,l){return e.m.addEventListener(i,r,l)};if(t=="removeEventListener")return function(i,r,l){return e.m.removeEventListener(i,r,l)};if(e.g.vb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.vb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function n0(e,t,n){if(n=n===void 0?!1:n,e.F.has(t)&&(t=e.F.get(t)),t=="addEventListener")return function(i,r,l){return e.o.addEventListener(i,r,l)};if(t=="removeEventListener")return function(i,r,l){return e.o.removeEventListener(i,r,l)};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.Pb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Uh()};if(t=="getQueueManager")return function(){return e.h.$h()};if(t=="setVideoContainer")return function(i){return e.h.Oi(i)};if(!n){if(t=="addThumbnailsTrack")return function(){var i=vt.apply(0,arguments);return e.C.push(i),n0(e,t,!0).apply(null,$(i))};if(t=="addTextTrackAsync")return function(){var i=vt.apply(0,arguments);return e.B.push(i),n0(e,t,!0).apply(null,$(i))};if(t=="addChaptersTrack")return function(){var i=vt.apply(0,arguments);return e.A.push(i),n0(e,t,!0).apply(null,$(i))}}if(e.g.vb()){if(t=="getManifest"||t=="drmInfo")return function(){return Ct(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return Ct(t+"() does not work while casting!"),Promise.resolve()};if(t=="getChapters")return function(){return Ct(t+"() does not work while casting!"),[]}}return e.g.vb()&&Object.keys(e.g.g.video).length==0&&(p1.has(t)||h1.has(t))||!e.g.vb()?e.h[t].bind(e.h):e.g.get("player",t)}function _w(e,t,n){e.g.vb()&&(t=="video"?e.m.dispatchEvent(n):t=="player"&&(n.type=="unloading"&&v1(e),e.o.dispatchEvent(n)))}function v1(e){e.C=[],e.B=[],e.A=[]}Pe("shaka.cast.CastProxy",Un),Un.prototype.changeReceiverId=Un.prototype.ij,Un.prototype.forceDisconnect=Un.prototype.md,Un.prototype.suggestDisconnect=Un.prototype.Wk,Un.prototype.setAppData=Un.prototype.kh,Un.prototype.cast=Un.prototype.cast,Un.prototype.receiverName=Un.prototype.Zg,Un.prototype.isCasting=Un.prototype.vb,Un.prototype.canCast=Un.prototype.hj,Un.prototype.getPlayer=Un.prototype.od,Un.prototype.getVideo=Un.prototype.Xj,Un.prototype.destroy=Un.prototype.destroy;function Ii(e,t,n,i){It.call(this);var r=this;this.h=e,this.g=t,this.j=new Mt,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.s=this.l=null,this.C=new dt(function(){S1(r)}),qb(this)}$e(Ii,It),h=Ii.prototype,h.isConnected=function(){return this.G},h.ek=function(){return this.o},h.Tk=function(e){this.i=e},h.mj=function(){this.i=null},h.Uk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},h.Sk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},h.Rk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},h.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.g&&(t.push(e.g.destroy()),e.g=null),e.C&&(e.C.stop(),e.C=null),e.h=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.s=null,It.prototype.release.call(e),_(i,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),ce(i)})};function qb(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return Uw(e)},t.onSenderDisconnected=function(){return Uw(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&Qa(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),Qa(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(r){return Yb(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return Xb(e,r)},t.start(),t=C(Aw);for(var n=t.next();!n.done;n=t.next())e.j.D(e.h,n.value,function(r){return jw(e,"video",r)});for(var i in Vc)e.j.D(e.g,Vc[i],function(r){return jw(e,"player",r)});e.j.D(e.h,"loadeddata",function(){e.B=!0}),e.j.D(e.g,"loading",function(){e.o=!1,dp(e)}),e.j.D(e.h,"playing",function(){e.o=!1,dp(e)}),e.j.D(e.h,"pause",function(){dp(e)}),e.j.D(e.g,"unloading",function(){e.o=!0,dp(e)}),e.j.D(e.h,"ended",function(){new dt(function(){e.h&&e.h.ended&&(e.o=!0,dp(e))}).ia(Qb)})}function Uw(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,dp(e)}function dp(e){var t;G(function(n){if(n.g==1)return _(n,Promise.resolve(),2);if(!e.g)return n.return();t=new ke("caststatuschanged"),e.dispatchEvent(t),Bw(e)||Ja(e),ce(n)})}function zb(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q;G(function(z){switch(z.g){case 1:for(i in t.player)r=t.player[i],e.g[i](r);return e.F(n),l=e.h.autoplay,t.manifest?(e.h.autoplay=!1,he(z,5),_(z,e.g.load(t.manifest,t.startTime),7)):_(z,Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(c=C(t.addThumbnailsTrackCalls),f=c.next();!f.done;f=c.next())y=f.value,e.g.He.apply(e.g,$(y));if(t.addTextTrackAsyncCalls)for(m=C(t.addTextTrackAsyncCalls),w=m.next();!w.done;w=m.next())T=w.value,e.g.Hd.apply(e.g,$(T));if(t.addChaptersTrackCalls)for(I=C(t.addChaptersTrackCalls),D=I.next();!D.done;D=I.next())M=D.value,e.g.Ge.apply(e.g,$(M));_e(z,3);break;case 5:return L=De(z),P=new Map().set("detail",L),j=new ke("error",P),e.g&&e.g.dispatchEvent(j),z.return();case 3:if(!e.g)return z.return();for(V in t.video)K=t.video[V],e.h[V]=K;for(q in t.playerAfterLoad)Q=t.playerAfterLoad[q],e.g[q](Q);e.h.autoplay=l,t.manifest&&(e.h.play(),Ja(e)),ce(z)}})}function jw(e,t,n){e.g&&(S1(e),Qa(e,{type:"event",targetName:t,event:n},e.l))}function S1(e){e.C.ia(Wb);for(var t={video:{},player:{}},n=C(_b),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.h[i];e.g.V()&&Cw.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.g[l]())}),p1.forEach(function(r,l){e.m%r==0&&(t.player[l]=e.g[l]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Qa(e,{type:"update",update:t},e.l),h1.forEach(function(r,l){e.m%r==0&&(r={player:{}},r.player[l]=e.g[l](),Qa(e,{type:"update",update:r},e.l))}),e.B&&(e.m+=1),Bw(e)}function Bw(e){return e.A&&(e.h.duration||e.g.V())?(w1(e),e.A=!1,!0):!1}function w1(e,t){var n={contentId:e.g.nd(),streamType:e.g.V()?"LIVE":"BUFFERED",contentType:""};e.g.V()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),Ja(e,t===void 0?0:t,n)}function Xb(e,t){var n=f1(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,zb(e,n.initState,n.appData),S1(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(f){return Vw(e,c,l,null,f)},function(f){return Vw(e,c,l,f,null)})}}function Yb(e,t){var n=f1(t.data);switch(n.type){case"PLAY":e.h.play(),Ja(e);break;case"PAUSE":e.h.pause(),Ja(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;t!=null&&(e.h.currentTime=Number(t)),i&&i=="PLAYBACK_START"?(e.h.play(),Ja(e)):i&&i=="PLAYBACK_PAUSE"&&(e.h.pause(),Ja(e));break;case"STOP":e.g.vc().then(function(){e.g&&Ja(e)});break;case"GET_STATUS":w1(e,Number(n.requestId));break;case"VOLUME":i=n.volume,t=i.level,i=i.muted;var r=e.h.volume,l=e.h.muted;t!=null&&(e.h.volume=Number(t)),i!=null&&(e.h.muted=i),r==e.h.volume&&l==e.h.muted||Ja(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.h.autoplay=!0),e.g.load(r,i).then(function(){e.g&&w1(e)}).catch(function(c){var f="LOAD_FAILED";c.category==7&&c.code==7e3&&(f="LOAD_CANCELLED"),Qa(e,{requestId:Number(n.requestId),type:f},e.s)});break;default:Qa(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}function Vw(e,t,n,i,r){e.g&&Qa(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function Qa(e,t,n,i){e.G&&(e=Ew(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Ja(e,t,n){n=n===void 0?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?Jb:e.g.Mg()?$b:e.h.paused?e3:Zb,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),Qa(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[i]},e.s)}Pe("shaka.cast.CastReceiver",Ii),Ii.prototype.destroy=Ii.prototype.destroy,Ii.prototype.setContentArtist=Ii.prototype.Rk,Ii.prototype.setContentImage=Ii.prototype.Sk,Ii.prototype.setContentTitle=Ii.prototype.Uk,Ii.prototype.clearContentMetadata=Ii.prototype.mj,Ii.prototype.setContentMetadata=Ii.prototype.Tk,Ii.prototype.isIdle=Ii.prototype.ek,Ii.prototype.isConnected=Ii.prototype.isConnected;var Wb=.5,Qb=5,Jb="IDLE",Zb="PLAYING",$b="BUFFERING",e3="PAUSED";function Hw(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(q){return q!=null&&q.g.trim()!=""})){l=f;break}for(f=n.length-1;0<=f;f--)if(n[f].some(function(q){return q!=null&&q.g.trim()!=""})){c=f;break}if(l===-1||c===-1)return null;for(var y=f=!1,m="white",w="black",T=T1(i,r,f,y,m,w);l<=c;l++){for(var I=n[l],D=-1,M=-1,L=0;L<I.length;L++)if(I[L]!=null&&I[L].g.trim()!==""){D=L;break}for(L=I.length-1;0<=L;L--)if(I[L]!=null&&I[L].g.trim()!==""){M=L;break}if(D===-1||M===-1)I=Kw(i,r),e.nestedCues.push(I);else{for(;D<=M;D++)if(L=I[D]){var P=L.l,j=L.i,V=L.j,K=L.h;(P!=f||j!=y||V!=m||K!=w)&&(T.payload&&e.nestedCues.push(T),T=T1(i,r,P,j,V,K),f=P,y=j,m=V,w=K),T.payload+=L.g}else T.payload+=" ";T.payload&&e.nestedCues.push(T),l!==c&&(T=Kw(i,r),e.nestedCues.push(T)),T=T1(i,r,f,y,m,w)}}return e.nestedCues.length?{cue:e,stream:t}:null}function T1(e,t,n,i,r,l){return e=new Zt(e,t,""),n&&e.textDecoration.push(Lo),i&&(e.fontStyle=cu),e.color=r,e.backgroundColor=l,e}function Kw(e,t){return e=new Zt(e,t,""),e.lineBreak=!0,e}function Gw(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function x1(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.s=this.A=null,Dy(this)}function i0(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new Zt(t,n,"");r.lineInterpretation=1;var l=zw.get(e.g);return l&&(r.line=l),e.s!=null&&e.A!=null&&(r.position=10+Math.min(70,10*e.s)+2.5*e.A),(t=Hw(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(l=zw.get(e.g+3-t.cue.nestedCues.length))&&(r.line=l),t}function Dy(e){Za(e,0,15),e.g=1}function pp(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=qw.has(n)?qw.get(n):String.fromCharCode(n);break;case 1:i=t3.get(n);break;case 2:e.i[e.g].pop(),i=n3.get(n);break;case 3:e.i[e.g].pop(),i=i3.get(n)}i&&e.i[e.g].push(new Gw(i,e.m,e.j,e.o,e.l))}}function Fw(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 Za(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var qw=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),t3=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),n3=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,"»"]]),i3=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,"┘"]]),zw=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 r0(e,t){this.h=0,this.o=new x1(e,t),this.i=new x1(e,t),this.g=this.j=new x1(e,t),this.l=0,this.m=null}function E1(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==3&&e.h!==4&&(r=i0(i,e.l,n),n=e.i,n.g=0<n.h?n.h:0,Za(n,0,15),n=e.j,n.g=0<n.h?n.h:0,Za(n,0,15),i.g=15),e.h=3,i.h=t,r}function Xw(e){e.h=1,e.g=e.j,e.g.h=0}function Yw(e){Jl("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var r3="black green blue cyan red yellow magenta black".split(" "),Ww="white green blue cyan red yellow magenta white_italics".split(" ");function A1(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.s="black",C1(this)}function C1(e){e.i=[];for(var t=0;16>t;t++)e.i.push(b1())}function b1(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function gc(e,t){Qw(e)&&(e.i[e.h][e.g]=new Gw(t,e.C,e.A,e.s,e.B),e.g++)}function Qw(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}A1.prototype.isVisible=function(){return this.l};function o3(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]=b1()}function Df(e,t,n){var i=new Zt(e.j,t,"");i.textAlign=e.F===0?"left":e.F===1?"right":co;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?$n: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=Hw(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}A1.prototype.display=function(){this.l=!0};function l3(){this.i=[],this.h=null,this.g=0}function u3(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 Oy(e.h)),e.h=null,e.g=0))}function Oy(e){this.g=0,this.h=e}Oy.prototype.Ga=function(){return this.g<this.h.length},Oy.prototype.Ma=function(){return this.g};function Xn(e){if(!e.Ga())throw new Y(2,2,3e3);return e.h[e.g++]}Oy.prototype.skip=function(e){if(this.g+e>this.h.length)throw new Y(2,2,3e3);this.g+=e},Oy.prototype.Ei=function(e){if(0>this.g-e)throw new Y(2,2,3e3);this.g-=e};function a3(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function s3(e,t,n,i){if(!e.g)return[];if(n==24)return n=Xn(t).value,i=Xn(t).value,n=function(l){return l.map(function(c){return("0"+(c&255).toString(16)).slice(-2)}).join("")}([n,i]),gc(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!Qw(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?o3(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=Df(t,i,e.i)),t.i[t.h]=b1(),t.g=0;break;case 12:t.isVisible()&&(r=Df(t,i,e.i)),C1(t),t.h=0,t.g=0}return r?[r]:[]}function c3(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=Xn(t).value,t=[],n=C(Ry(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)}C1(r)}return t}if(n===137)for(t=Xn(t).value,t=C(Ry(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=Xn(t).value,t=null,n=C(Ry(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=Xn(t).value,t=null,n=C(Ry(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=Xn(t).value,Jw(e,t,i);if(n===143)return i=Jw(e,255,i),Zw(e),i;if(n===144)t.skip(1),i=Xn(t).value,e.g&&(e.g.A=0<(i&128),e.g.C=0<(i&64));else if(n===145)i=Xn(t).value,n=Xn(t).value,t.skip(1),e.g&&(t=$w((n&48)>>4,(n&12)>>2,n&3),e.g.B=$w((i&48)>>4,(i&12)>>2,i&3),e.g.s=t);else if(n===146)i=Xn(t).value,t=Xn(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=Xn(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 A1(n,e.i),l.j=i,e.h[n]=l),i=Xn(t).value,l=Xn(t).value;var c=Xn(t).value,f=Xn(t).value,y=Xn(t).value;t=Xn(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.s="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=(y&63)+1,e.g=e.h[n]}}}return[]}function Ry(e,t){for(var n=[],i=0;8>i;i++)(t&1)===1&&e.h[i]&&n.push(i),t>>=1;return n}function Jw(e,t,n){var i=[];t=C(Ry(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 Zw(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function $w(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],n=i[n],f3[e<<2|t<<1|n]}var eT=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,"┌"]]),f3="black blue green cyan red magenta yellow white".split(" ");function hp(){this.h=[],this.g=[],this.i=new l3,this.l=0,this.m=new Map([["CC1",new r0(0,0)],["CC2",new r0(0,1)],["CC3",new r0(1,0)],["CC4",new r0(1,1)]]),this.s=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,I1(this)}hp.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,I1(this),e=C(this.j.values());for(var t=e.next();!t.done;t=e.next())Zw(t.value)};function I1(e){e.o=0,e.s=0;for(var t=C(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Dy(n.i),Dy(n.j),Dy(n.o);e.B=!0}hp.prototype.extract=function(e,t){if(this.B){for(var n=C(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(e=new Bt(e,0),!(8>e.getLength())&&e.X()===181&&e.Ba()===49&&e.T()===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,Bb:c,hc: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})))}},hp.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=C(this.h),i=n.next();!i.done;i=n.next())(i=d3(this,i.value))&&t.push(i);for(n=C(this.g),i=n.next();!i.done;i=n.next())u3(this.i,i.value);for(n=C(this.i.i),i=n.next();!i.done;i=n.next())i=p3(this,i.value),t.push.apply(t,$(i));return this.i.i=[],this.h=[],this.g=[],t};function d3(e,t){var n=t.type;if((t.Bb&112)===16){var i=t.Bb>>3&1;n===0?e.o=i:e.s=i}if(i="CC"+((n<<1|(n?e.s:e.o))+1),n=e.m.get(i),t.Bb===255&&t.hc===255||!t.Bb&&!t.hc||!tT(t.Bb)||!tT(t.hc))return 45<=++e.l&&I1(e),null;e.l=0,t.Bb&=127,t.hc&=127;var r=t.Bb;if(1<=r&&15>=r||!t.Bb&&!t.hc)return null;if(r=null,(t.Bb&112)===16)e:{if(e.A.add(i),i=t.Bb,e=t.hc,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=Ww[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,Fw(c,n,1+c.g-c.h,c.h),Za(c,0,n-1),Za(c,t+1,15-t)),c.g=t,c.m=e,c.j=r,c.l=i,c.s=l,c.o="black")}else if((i&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",pp(n.g,0,32),i=!1,t=Ww[(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=r3[(e&14)>>1]),n.g.o=t;else if((i&247)===17&&(e&240)===48)pp(n.g,1,e);else if((i&246)===18&&(e&224)===32)pp(n.g,i&1?3:2,e);else{if((i&246)===20&&(e&240)===32){switch(e=t.pts,i=null,t.hc){case 32:Xw(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:i=E1(n,2,e);break;case 38:i=E1(n,3,e);break;case 39:i=E1(n,4,e);break;case 40:pp(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Dy(n.o),Yw(n);break;case 43:Yw(n);break;case 44:t=n.i,i=null,n.h!==4&&(i=i0(t,n.l,e)),Za(t,0,15);break;case 45:t=n.g,n.h!==3?i=null:(i=i0(t,n.l,e),r=t.g-t.h+1,Fw(t,r-1,r,t.h),Za(t,0,r-1),Za(t,t.g,15-t.g),n.l=e);break;case 46:Za(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=i0(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,Xw(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.hc,pp(n.g,0,t.Bb),pp(n.g,0,e);return r}function p3(e,t){var n=[];try{for(;t.Ga();){var i=Xn(t).value,r=(i&224)>>5,l=i&31;if(r===7&&l!=0&&(r=Xn(t).value&63),r!=0){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new a3(r));for(var c=e.j.get(r),f=t.Ma();t.Ma()-f<l;){r=c;var y=t,m=Xn(y),w=m.value,T=m.pts;if(w===16){var I=Xn(y);w=w<<16|I.value}if(0<=w&&31>=w)var D=s3(r,y,w,T);else if(128<=w&&159>=w)D=c3(r,y,w,T);else{if(4096<=w&&4127>=w)r=y,y=w&255,8<=y&&15>=y?r.skip(1):16<=y&&23>=y?r.skip(2):24<=y&&31>=y&&r.skip(3);else if(4224<=w&&4255>=w)r=y,y=w&255,128<=y&&135>=y?r.skip(4):136<=y&&143>=y&&r.skip(5);else if(32<=w&&127>=w)y=w,r.g&&(y===127?gc(r.g,"♪"):gc(r.g,String.fromCharCode(y)));else if(160<=w&&255>=w)r.g&&gc(r.g,String.fromCharCode(w));else if(4128<=w&&4223>=w){if(y=w&255,r.g)if(eT.has(y)){var M=eT.get(y);gc(r.g,M)}else gc(r.g,"_")}else 4256<=w&&4351>=w&&r.g&&((w&255)!=160?gc(r.g,"_"):gc(r.g,"[CC]"));D=[]}n.push.apply(n,$(D))}}}}catch(L){if(L instanceof Y&&L.code===3e3)Jl("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw L}return n}function tT(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}hp.prototype.getStreams=function(){return Array.from(this.A)},Pe("shaka.cea.CeaDecoder",hp),yl=function(){return new hp};function nT(e){for(var t=[],n=e,i=e=0;i<n.length;)e==2&&n[i]==3?(e=0,n=[].concat($(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 o0(){this.j=new Map,this.i=this.h=0,this.g=k1}o0.prototype.init=function(e){function t(l){l=l.name,l0.has(l)&&(n.g=l0.get(l))}var n=this,i=[],r=[];if(new Ut().box("moov",nt).box("mvex",nt).R("trex",function(l){var c=l.reader;c.skip(4),c.skip(4),l=c.T(),c=c.T(),n.h=l,n.i=c}).box("trak",nt).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.T();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.Ba(),c.Ba(),c.Ba(),c.Ba(),i.push(f)}).box("mdia",nt).R("mdhd",function(l){l=Jc(l.reader,l.version),r.push(l.timescale)}).box("minf",nt).box("stbl",nt).R("stsd",Gr).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",Li).box("sinf",nt).box("frma",function(l){l=Ed(l.reader).codec,l0.has(l)&&(n.g=l0.get(l))}).parse(e,!0,!0),!i.length||!r.length||i.length!=r.length)throw new Y(2,2,2010);this.g==k1&&Ct("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(l,c){n.j.set(l,r[c])})},o0.prototype.parse=function(e){var t=this;if(this.g==k1)return[];var n=[],i=0,r=[];return new Ut().box("moof",function(l){i=l.start,r=[],nt(l)}).box("traf",function(l){r.push({baseMediaDecodeTime:null,Md:t.h,Nd:t.i,ti:[],timescale:9e4}),nt(l)}).R("trun",function(l){var c=r[r.length-1];l=Td(l.reader,l.version,l.flags),c.ti.push(l)}).R("tfhd",function(l){var c=r[r.length-1];l=Us(l.reader,l.flags),c.Md=l.Md||t.h,c.Nd=l.Nd||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=Qc(l.reader,l.version),c.baseMediaDecodeTime=l.baseMediaDecodeTime}).box("mdat",function(l){for(var c=i-l.start-8,f=l.reader.Ma(),y=C(r),m=y.next();!m.done;m=y.next())m=m.value,m.baseMediaDecodeTime===null?Ct("Unable to find base media decode time for CEA captions!"):(l.reader.seek(f),h3(t,l.reader,m.baseMediaDecodeTime,m.timescale,m.Md,m.Nd,c,m.ti,n))}).parse(e,!1,!0),n};function h3(e,t,n,i,r,l,c,f,y){var m=0,w=l,T=f.map(function(M){return M.gh});for(T=[].concat.apply([],$(T)),T.length&&(w=T[0].sampleSize||l),t.skip(c+f[0].mg);t.Ga();){c=t.T();var I=t.X(),D=null;switch(D=!1,f=1,e.g){case My:D=I&31,D=D==6;break;case Ny:f=2,t.skip(1),D=I>>1&63,D=D==39||D==40;break;case Py:f=2,t.skip(1),D=I>>1&63,D=D==23||D==24;break;default:return}if(D)for(I=0,m<T.length&&(I=T[m].Bf||0),I=(n+I)/i,f=C(nT(t.Ub(c-f))),D=f.next();!D.done;D=f.next())y.push({packet:D.value,pts:I});else try{t.skip(c-f)}catch{break}w-=c+4,w==0&&(n=m<T.length?n+(T[m].hh||r):n+r,m++,m<T.length?w=T[m].sampleSize||l:w=l)}}Pe("shaka.cea.Mp4CeaParser",o0);var k1=0,My=1,Ny=2,Py=3,l0=new Map().set("avc1",My).set("avc3",My).set("dvav",My).set("dva1",My).set("hev1",Ny).set("hvc1",Ny).set("dvh1",Ny).set("dvhe",Ny).set("vvc1",Py).set("vvi1",Py).set("dvc1",Py).set("dvi1",Py);Kp("video/mp4",function(){return new o0});function u0(){this.g=null}u0.prototype.init=function(){},u0.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Vt;var t=[];if(e=Ge(e),!Xo(e))return t;e=this.g.parse(e);var n=e.Od(),i=e.Xe();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=C(i),i=n.next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&i.time!=null)for(var r=C(nT(i.data)),l=r.next();!l.done;l=r.next())t.push({packet:l.value,pts:i.time});return t},Pe("shaka.cea.TsCeaParser",u0),Kp("video/mp2t",function(){return new u0});function y3(e){var t=0,n=Zn(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=Ge(n,e,r);t.push({type:i,value:l}),e+=r}n=t}return n}function iT(e){return e=or(Cn(e)),e=y3(e).filter(function(t){return t.type===g3})[0],e?(e=rr(e.value,!0),(e=uo(e,"WRMHEADER"))?e:null):null}function a0(e){try{var t=iT(e);if(t)e:{for(var n=C(ao(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var l=C(r.children),c=l.next();!c.done;c=l.next()){var f=c.value;if(f.tagName=="LA_URL"){var y=Cn(f);break e}}}y=""}else y="";return y}catch{return""}}var g3=1;function rT(e,t,n){var i=S3(e),r=null;e=[];var l=[],c=null,f=new Set(i.map(function(m){return m.keyId}));f.delete(null);var y="cenc";if(1<f.size)throw new Y(2,4,4010);if(!t){if(l=i.filter(function(m){return m.Bd=="urn:mpeg:dash:sea:2012"}),1<l.length)throw new Y(2,4,4050);l.length&&(c=T3(l[0])),(l=i.find(function(m){return m.Bd=="urn:mpeg:dash:mp4protection:2011"}))&&l.encryptionScheme&&(y=l.encryptionScheme),l=i.filter(function(m){return m.Bd=="urn:mpeg:dash:mp4protection:2011"?(r=m.init||r,!1):m.Bd!="urn:mpeg:dash:sea:2012"}),l.length&&(e=v3(r,y,l,n,f),e.length==0&&(e=[Oo("",y,r)]))}if(i.length&&!c&&(t||!l.length))for(e=[],t=C(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(Oo(n,y,r));if(f=Array.from(f)[0]||null)for(y=C(e),t=y.next();!t.done;t=y.next())for(t=C(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=f;return{Oh:f,vm:r,drmInfos:e,cg:c,Th:!0}}function m3(e,t,n,i){var r=rT(e,n,i);if(t.Th)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.Th=!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.Oh||t.Oh}function s0(e){var t=ur(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=Cn(t)))return t;if((t=ur(e.node,"urn:microsoft:playready","pro"))&&Cn(t))return a0(t);if((e=ur(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=Cn(e))){t=or(e),e=8,t=Zn(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=Ge(t,e+4),e=Vr(e),e=uo("<pro>"+e+"</pro>"),a0(e)}return""}function v3(e,t,n,i,r){var l=[];n=C(n);for(var c=n.next();!c.done;c=n.next()){c=c.value;var f=i[c.Bd];if(f){var y;if((y=ur(c.node,"urn:microsoft:playready","pro"))&&Cn(y)){y=Cn(y),y=or(y);var m=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);y=[{initData:Ko(y,m,new Set,0),initDataType:"cenc",keyId:c.keyId}]}else y=null;if(m=null,c.Bd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){m=c;var w=r;if(w.size==0)m=null;else{var T=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),I=new Uint8Array([]);m=[{initData:Ko(I,T,w,1),initDataType:"cenc",keyId:m.keyId}]}}y=Oo(f,t,c.init||e||y||m),(f=x3.get(f))&&(y.licenseServerUri=f(c)),l.push(y)}}return l}function S3(e){var t=[];e=C(e);for(var n=e.next();!n.done;n=e.next())(n=w3(n.value))&&t.push(n);return t}function w3(e){var t=e.attributes.schemeIdUri,n=ml(e,"urn:mpeg:cenc:2013","default_KID"),i=Tg(e,"urn:mpeg:cenc:2013","pssh").map(zi),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:or(c),keyId:null}})}catch{throw new Y(2,4,4007)}return{node:e,Bd:t,keyId:n,init:0<l.length?l:null,encryptionScheme:r}}function T3(e){if(!x.crypto||!x.crypto.subtle)throw Ct("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=ur(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=ur(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new Y(2,4,4051);if(e=t.attributes.IV,t=Oi(t.attributes.keyUriTemplate),!e||!t)throw new Y(2,4,4051);if(e=Hr(e.substr(2)),e.byteLength!=16)throw new Y(2,4,4048);return{kk:t,iv:e}}var x3=new Map().set("com.apple.fps",function(e){if(x.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4054);return(e=ur(e.node,"https://dashif.org/CPS","Laurl"))&&(e=Cn(e))?e:""}).set("com.widevine.alpha",function(e){var t=ur(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Cn(t))?t:(e=ur(e.node,"urn:microsoft","laurl"))&&Oi(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",s0).set("com.microsoft.playready.recommendation",s0).set("com.microsoft.playready.software",s0).set("com.microsoft.playready.hardware",s0).set("org.w3.clearkey",function(e){var t=ur(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Cn(t))?t:(e=ur(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=Cn(e))?e:""});function Ly(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,y,m,w){if(f=="$$")return"$";var T=c.get(y);if(T==null)return f;switch(y=="RepresentationID"&&m&&(m=void 0),y=="Time"&&typeof T!="bigint"&&(.2<=Math.abs(T-Math.round(T))&&Ct("Calculated $Time$ values must be close to integers"),T=Math.round(T)),w){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 m=x.parseInt(m,10)||1,Array(Math.max(0,m-f.length)+1).join("0")+f})}function oT(e,t){var n=dl(e,t,"timescale"),i=1;n&&(i=Sl(n)||1),n=dl(e,t,"duration");var r=(n=Sl(n||""))?n/i:null,l=dl(e,t,"startNumber"),c=Number(dl(e,t,"presentationTimeOffset"))||0,f=ei(l||"");if((l==null||f==null)&&(f=1),l=null,t=yp(e,t,"SegmentTimeline")){t=Rt(t,"S"),l=i,e=e.ma.duration||1/0;for(var y=f,m=[],w=-c,T=0;T<t.length;++T){var I=t[T],D=t[T+1],M=Ze(I,"t",ei),L=Ze(I,"d",ei),P=Ze(I,"r",Fn);if(I=Ze(I,"k",Fn)||0,M!=null&&(M-=c),L){if(M=M??w,P=P||0,0>P)if(D){if(D=Ze(D,"t",ei),D==null)break;if(M>=D)break;P=Math.ceil((D-M)/L)-1}else{if(e==1/0)break;if(M/l>=e)break;P=Math.ceil((e*l-M)/L)-1}for(0<m.length&&M!=w&&(m[m.length-1].end=M/l),D=0;D<=P;++D)w=M+L,m.push({start:M/l,end:w/l,Bh:M,rc:I,Nk:m.length+y}),M=w}}l=m}return{timescale:i,Kf:n,gb:r,ie:f,Ib:c/i||0,dd:c,timeline:l}}function lT(e,t){return[t(e.J),t(e.oa),t(e.ra)].filter(xl)}function dl(e,t,n){t=lT(e,t),e=null,t=C(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function yp(e,t,n){t=lT(e,t),e=null,t=C(t);for(var i=t.next();!i.done&&!(e=sn(i.value,n));i=t.next());return e}function E3(e,t,n,i,r,l){for(var c=ml(e,"http://www.w3.org/1999/xlink","href"),f=ml(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",y=C(Object.keys(e.attributes)),m=y.next();!m.done;m=y.next()){m=m.value;var w=m.split(":"),T=Fp("http://www.w3.org/1999/xlink");w[0]==T&&delete e.attributes[m]}if(5<=l)return go(new Y(2,4,4028));if(f!="onLoad")return go(new Y(2,4,4027));var I=Vn([i],[c]);return r.request(0,bn(I,t)).Va(function(D){if(D=au(D.data,e.tagName),!D)return go(new Y(2,4,4001,c));for(e.children=[];D.children.length;){var M=D.children.shift();e.children.push(M)}M=C(Object.keys(D.attributes));for(var L=M.next();!L.done;L=M.next())L=L.value,e.attributes[L]=D.attributes[L];return c0(e,t,n,I[0],r,l+1)})}function c0(e,t,n,i,r,l){if(l=l===void 0?0:l,ml(e,"http://www.w3.org/1999/xlink","href")){var c=E3(e,t,n,i,r,l);return n&&(c=c.Va(void 0,function(){return c0(e,t,n,i,r,l)})),c}c=[];for(var f=C(ds(e)),y=f.next(),m={};!y.done;m={Jd:void 0},y=f.next())m.Jd=y.value,ml(m.Jd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(w){return function(T){return T!==w.Jd}}(m)):m.Jd.tagName!="SegmentTimeline"&&c.push(c0(m.Jd,t,n,i,r,l));return wa(c).Va(function(){return e})}function A3(e,t,n,i,r,l,c){var f,y=new Ut().R("sidx",function(m){f=C3(t,i,r,l,c,n,m)});if(e&&y.parse(e),f)return f;throw new Y(2,3,3004)}function C3(e,t,n,i,r,l,c){var f=[];c.reader.skip(4);var y=c.reader.T();if(y==0)throw new Y(2,3,3005);if(c.version==0)var m=c.reader.T(),w=c.reader.T();else m=c.reader.yd(),w=c.reader.yd();c.reader.skip(2);var T=c.reader.Ba();for(e=e+c.size+w,w=0;w<T;w++){var I=c.reader.T(),D=(I&2147483648)>>>31;I&=2147483647;var M=c.reader.T();if(c.reader.skip(4),D==1)throw new Y(2,3,3006);f.push(new Fe(m/y+n,(m+M)/y+n,function(){return l},e,e+I-1,t,n,i,r)),m+=M,e+=I}return c.parser.stop(),f}function mc(e){this.h=Zn(e),this.g=new Bt(this.h,0)}mc.prototype.Ga=function(){return this.g.Ga()};function $a(e){var t=uT(e);if(7<t.length)throw new Y(2,3,3002);var n=0;t=C(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=uT(e);e:{i=C(b3);for(var r=i.next();!r.done;r=i.next())if(gr(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ma();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.Ma()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ma(),i=Zn(e.h,e.g.Ma(),t),e.g.skip(t),new I3(n,i)}function uT(e){var t=e.g.Ma(),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),Ge(e.h,t,n)}var b3=[[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 I3(e,t){this.id=e,this.g=t}function D1(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 k3(e,t,n,i,r,l,c,f,y){function m(){return r}var w=[];e=new mc(e.g);for(var T=null,I=null;e.Ga();){var D=$a(e);if(D.id==187){var M=D3(D);M&&(D=n*M.al,M=t+M.Fk,T!=null&&w.push(new Fe(T+c,D+c,m,I,M-1,l,c,f,y)),T=D,I=M)}}return T!=null&&w.push(new Fe(T+c,i+c,m,I,null,l,c,f,y)),w}function D3(e){var t=new mc(e.g);if(e=$a(t),e.id!=179)throw new Y(2,3,3013);if(e=D1(e),t=$a(t),t.id!=183)throw new Y(2,3,3012);t=new mc(t.g);for(var n=0;t.Ga();){var i=$a(t);if(i.id==241){n=D1(i);break}}return{al:e,Fk:n}}function aT(e,t,n){if(t=yp(e,t,"Initialization"),!t)return null;var i=e.J.cb(),r=t.attributes.sourceURL;r&&(i=Vn(i,[Oi(r)],e.Lb())),r=0;var l=null;return(t=Ze(t,"range",Jf))&&(r=t.start,l=t.end),n=new Kn(function(){return i},r,l,dT(e),null,null,n,e.oa.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ma&&!e.ma.bf&&(n.g=e.ma.start+e.ma.duration),n}function O3(e,t,n){var i=Number(dl(e,gp,"presentationTimeOffset"))||0,r=dl(e,gp,"timescale"),l=1;r&&(l=Sl(r)||1);var c=i/l||0,f=aT(e,gp,n);R3(e,f);var y=Gn(e);return{endTime:-1,timeline:-1,Oc:function(){var m=yp(y,gp,"RepresentationIndex"),w=y.J.cb();return m&&(m=Oi(m.attributes.sourceURL))&&(w=Vn(w,[m],y.Lb())),m=cT(y),sT(y,t,f,w,m.start,m.end,c)},timescale:l}}function sT(e,t,n,i,r,l,c){var f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W;return G(function(J){if(J.g==1)return f=e.presentationTimeline,y=!e.Db||!e.ma.bf,m=e.ma.start,w=e.ma.duration,T=e.J.mimeType.split("/")[1],I=t,D=null,M=[I(i,r,l,!1),T=="webm"?I(n.O(),n.startByte,n.endByte,!0):null],I=null,_(J,Promise.all(M),2);if(L=J.h,P=L[0],j=L[1]||null,V=null,K=m-c,q=m,Q=w?m+w:1/0,T=="mp4")var ne=A3(P,r,i,n,K,q,Q);else{ne=P;var te=new mc(j);if($a(te).id!=440786851)throw new Y(2,3,3008);var ee=$a(te);if(ee.id!=408125543)throw new Y(2,3,3009);te=ee.g.byteOffset,ee=new mc(ee.g);for(var ge=null;ee.Ga();){var fe=$a(ee);if(fe.id==357149030){ge=fe;break}}if(!ge)throw new Y(2,3,3010);for(ge=new mc(ge.g),fe=1e6,ee=null;ge.Ga();){var le=$a(ge);if(le.id==2807729)fe=D1(le);else if(le.id==17545)if(le.g.byteLength==4)ee=le.g.getFloat32(0);else if(le.g.byteLength==8)ee=le.g.getFloat64(0);else throw new Y(2,3,3003)}if(ee==null)throw new Y(2,3,3011);if(ge=fe/1e9,ee*=ge,ne=$a(new mc(ne)),ne.id!=475249515)throw new Y(2,3,3007);ne=k3(ne,te,ge,ee,i,n,K,q,Q)}for(V=ne,z=C(V),X=z.next();!X.done;X=z.next())W=X.value,W.codecs=e.J.codecs,W.mimeType=e.J.mimeType,W.bandwidth=e.bandwidth;return f.$d(V),D=new At(V),y&&D.ld(q,Q,!0),J.return(D)})}function gp(e){return e.Cd}function cT(e){var t=yp(e,gp,"RepresentationIndex");return e=dl(e,gp,"indexRange"),e=Jf(e||""),t&&(e=Ze(t,"range",Jf,e)),e}function R3(e,t){if(fT(e,t),!cT(e))throw new Y(2,4,4002)}function fT(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=ut&&n!="mp4"&&n!="webm")throw new Y(2,4,4006);if(n=="webm"&&!t)throw new Y(2,4,4005)}function dT(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.qf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.oa.label||null,roles:e.roles||null,language:e.oa.language||null}}function M3(e,t,n){var i=aT(e,pT,n),r=N3(e);if(!r.gb&&!r.timeline&&1<r.sd.length)throw new Y(2,4,4002);if(!r.gb&&!e.ma.duration&&!r.timeline&&r.sd.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.ra.id&&e.J.id&&(c=t.get(e.ra.id+","+e.J.id))&&(l=c.segmentIndex);var f=P3(e.ma.start,e.ma.duration,e.J.cb,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.Lb);return t=!l,l?l.Yd(f,e.presentationTimeline.Gb()):l=new At(f),e.presentationTimeline.$d(f),e.Db&&e.ma.bf||l.ld(e.ma.start,e.ma.duration?e.ma.start+e.ma.duration:1/0,t),c&&(c.segmentIndex=l),{endTime:-1,timeline:-1,Oc:function(){return l&&l.getNumReferences()!=0||l.kf(f),Promise.resolve(l)},timescale:r.timescale}}function pT(e){return e.tc}function N3(e){var t=L3(e);e=oT(e,pT);var n=e.ie;n==0&&(n=1);var i=0;return e.gb?i=e.gb*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{gb:e.gb,startTime:i,ie:n,Ib:e.Ib,timescale:e.timescale,timeline:e.timeline,sd:t}}function P3(e,t,n,i,r,l,c,f,y,m){var w=i.sd.length;i.timeline&&i.timeline.length!=i.sd.length&&(w=Math.min(i.timeline.length,i.sd.length));for(var T=e-i.Ib,I=t?e+t:1/0,D=[],M=i.startTime,L={},P=0;P<w;L={Mf:void 0,Cf:void 0},P++){L.Cf=i.sd[P];var j=M;M=void 0,M=i.gb!=null?j+i.gb:i.timeline?i.timeline[P].end:j+t,L.Mf=null,L=new Fe(e+j,e+M,function(V){return function(){return V.Mf==null&&(V.Mf=Vn(n(),[V.Cf.tk],m())),V.Mf}}(L),L.Cf.start,L.Cf.end,r,T,e,I,[],"",null,null,qo,l),L.codecs=f,L.mimeType=c,L.bandwidth=y,D.push(L)}return D}function L3(e){return[e.J.tc,e.oa.tc,e.ra.tc].filter(xl).map(function(t){return Rt(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Jg&&(e.Jg=!0);var n=Oi(t.attributes.media);return t=Ze(t,"mediaRange",Jf,{start:0,end:null}),{tk:n,start:t.start,end:t.end}})}function hT(e,t,n,i,r,l,c,f,y,m){y||e.J.Ze||(e.J.Ze=dl(e,vc,"initialization"));var w=e.J.Ze?B3(e,c):null,T=_3(e);U3(T);var I=Gn(e);if(T.Vd)return fT(e,w),{endTime:-1,timeline:-1,Oc:function(){var j=Ly(T.Vd,I.J.originalId,null,null,I.bandwidth||null,null);return j=Vn(I.J.cb(),[j]),sT(I,t,w,j,0,null,T.Ib)},timescale:T.timescale};if(T.gb)return i||e.oa.contentType==="image"||e.oa.contentType==="text"||(i=e.ma.start,m=e.ra.id,n=e.ma.duration,m=(m=m!=null&&l.get(m)||n)?i+m:1/0,e.presentationTimeline.Rg(T.gb),e.presentationTimeline.ri(i,m)),{endTime:-1,timeline:-1,Oc:function(){return j3(I,T,r,w,l,c,f,e.J.Df)},timescale:T.timescale};var D=null;i=i=null,e.ra.id&&e.J.id&&(i=e.ra.id+","+e.J.id,i=n.get(i))&&(D=i.segmentIndex);var M=e.ma.start,L=e.ma.duration?M+e.ma.duration:1/0;if(D)m=D,yT(m,T,M,L,w,e.Db),m.$a(e.presentationTimeline.Gb());else{if(n=0,y=-1,e.ra.id!=null&&e.J.id!=null){var P=m.get(e.ra.id);if(P)y=P.timeline;else for(m=C(m.values()),P=m.next();!P.done;P=m.next())if(P=P.value,Math.abs(T.Ib-P.endTime)<=wg&&P.ah.includes(e.J.id)){y=P.timeline;break}else P.timeline>=n&&(n=P.timeline+1)}y==-1&&(y=n),D=new _y(e.Db,T,e.J.originalId,e.bandwidth,e.J.cb,e.Lb,M,L,w,c,e.J.Df,y)}return T.timeline&&e.oa.contentType!=="image"&&e.oa.contentType!=="text"&&e.presentationTimeline.si(D.h?D.h.timeline:[],M),i&&e.Db&&(i.segmentIndex=D),i=(i=(i=T.timeline)&&i[i.length-1])?i.end+T.Ib:-1,m=-1,D instanceof _y&&(m=D.Pe()),{endTime:i,timeline:m,Oc:function(){return D instanceof _y&&D.getNumReferences()==0&&yT(D,T,M,L,w,e.Db),Promise.resolve(D)},timescale:T.timescale}}function vc(e){return e.Gc}function _3(e){var t=oT(e,vc),n=dl(e,vc,"media"),i=dl(e,vc,"index"),r=dl(e,vc,"k"),l=0;return r&&(l=parseInt(r,10)),{Kf:t.Kf,gb:t.gb,timescale:t.timescale,ie:t.ie,Ib:t.Ib,dd:t.dd,timeline:t.timeline,ac:n&&Oi(n),Vd:i,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,vk:l}}function U3(e){var t=e.Vd?1:0;if(t+=e.timeline?1:0,t+=e.gb?1:0,t==0)throw new Y(2,4,4002);if(t!=1&&(e.Vd&&(e.timeline=null),e.Kf=null,e.gb=null),!e.Vd&&!e.ac)throw new Y(2,4,4002)}function j3(e,t,n,i,r,l,c,f){function y(ee){var ge=ee-P,fe=ge*L,le=t.Kf,pe=ge*le;"BigInt"in x&&pe>Number.MAX_SAFE_INTEGER&&(pe=BigInt(ge)*BigInt(le)),fe+=I,ge=fe+L,le=Math.min(ge,w());var Ee=[],Ce=t.vk;if(Ce)for(var Be=(le-fe)/Ce,Le={},kt=0;kt<Ce;Le={Ri:void 0},kt++){var xt=fe+Be*kt,Kt=xt+Be;Le.Ri=kt,Le=new Fe(xt,Kt,function(st){return function(){var tt=Ly(j,K,ee,st.Ri,V,pe);return Vn(q(),[tt],Q())}}(Le),0,null,i,z,I,w(),[],"",null,null,qo,l),Le.codecs=e.J.codecs,Le.mimeType=e.J.mimeType,f==0?0<kt&&Le.qd():kt%f!=0&&Le.qd(),Ee.push(Le)}return fe=new Fe(fe,le,function(){if(Ce)return[];var st=Ly(j,K,ee,null,V,pe);return Vn(q(),[st],Q())},0,null,i,z,I,w(),Ee,"",null,null,qo,l,0<Ee.length),fe.codecs=e.J.codecs,fe.mimeType=e.J.mimeType,fe.bandwidth=e.bandwidth,fe.j=ge,fe}function m(){var ee=[Math.max(T.Gb(),I),Math.min(T.Ac(),w())].map(function(ge){return ge-I});return ee=[Math.ceil(ee[0]/L),Math.ceil(ee[1]/L)-1],e.J.qb&&ee[1]++,ee.map(function(ge){return ge+P})}function w(){var ee=D!=null&&r.get(D)||M;return ee?I+ee:1/0}var T=e.presentationTimeline,I=e.ma.start,D=e.ra.id,M=e.ma.duration,L=t.gb,P=t.ie,j=t.ac,V=e.bandwidth||null,K=e.J.originalId,q=e.J.cb,Q=e.Lb,z=I-t.Ib,X=m();n=e.Db?Math.max(X[0],X[1]-n+1):X[0],c=c||X[1],X=[];for(var W=n;W<=c;++W){var J=y(W);X.push(J)}var ne=new At(X);if(X=T.Ac()<w(),W=T.V(),X||W){var te=Math.max(n,c+1);n=L,e.J.qb&&(n=.1),ne.Lf(n,function(){var ee=T.Gb();ne.$a(ee);var ge=C(m());ge.next(),ge=ge.next().value;for(var fe=[];te<=ge;){var le=y(te);fe.push(le),te++}return ee>w()&&!fe.length?null:fe})}return Promise.resolve(ne)}function B3(e,t){var n=e.J.Ze;if(n||(n=dl(e,vc,"initialization")),!n)return null;n=Oi(n);var i=e.J.originalId,r=e.bandwidth||null,l=e.J.cb,c=e.Lb;return t=new Kn(function(){var f=Ly(n,i,null,null,r,null);return Vn(l(),[f],c())},0,null,dT(e),null,null,t,e.oa.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ma&&!e.ma.bf&&(t.g=e.ma.start+e.ma.duration),t}function _y(e,t,n,i,r,l,c,f,y,m,w,T){At.call(this,[]),this.C=e,this.h=t,this.G=n,this.B=i,this.F=r,this.I=l,this.j=c,this.l=f,this.s=y,this.A=m,this.H=w,this.K=T,O1(this)}$e(_y,At),h=_y.prototype,h.getNumReferences=function(){return this.h?this.h.timeline.length:0},h.release=function(){At.prototype.release.call(this),this.h=null},h.$a=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 yT(e,t,n,i,r,l){if(V3(e,r),e.C=l,e.h){if(e.h.dd!==t.dd&&(e.h.timeline=t.timeline,e.h.dd=t.dd,e.h.Ib=t.Ib),e.h.ac!==t.ac&&(e.h.ac=t.ac),n=e.h.timeline,n.length){var c=n[n.length-1];t=t.timeline.filter(function(f){return f.end>c.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,$(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;O1(e)}function V3(e,t){if(e.s!==t){e.s=t,e=C(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&Oh(n,t)}}function O1(e){if(e.h&&!e.o){for(var t=[],n=C(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.$a(e.j)}}h.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},h.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){n=this.h.timeline[e];var i=n.Nk,r=n.Bh+this.h.dd,l=this.j-this.h.Ib,c=this.j+n.end,f=c;e===this.getNumReferences()-1&&this.l!==1/0&&(f=this.C&&.1<Math.abs(f-this.l)?Math.min(f,this.l):this.l);var y=this.h.codecs,m=this.h.mimeType,w=this.h.bandwidth,T=[],I=!1;if(n.rc&&this.h&&this.h.ac&&(I=this.h.ac.includes("$SubNumber$")),I){I=(n.end-n.start)/n.rc;for(var D={},M=0;M<n.rc;D={Nf:void 0,Si:void 0},M++){var L=n.start+I*M,P=L+I;D.Si=M,D.Nf=null,D=new Fe(this.j+L,this.j+P,function(j){return function(){return t.h?(j.Nf==null&&(j.Nf=gT(t.h.ac,t.G,i,t.B,r,j.Si,t.F,t.I)),j.Nf):[]}}(D),0,null,this.s,l,this.j,this.l,[],"",null,null,qo,this.A),D.codecs=y,D.mimeType=m,D.bandwidth=w,this.H==0?0<M&&D.qd():M%this.H!=0&&D.qd(),T.push(D)}}n=new Fe(this.j+n.start,f,function(){return 0<T.length||!t.h?[]:gT(t.h.ac,t.G,i,t.B,r,null,t.F,t.I)},0,null,this.s,l,this.j,this.l,T,"",null,null,qo,this.A,0<T.length),n.codecs=y,n.mimeType=m,n.j=c,n.bandwidth=w,this.g[e]=n}return n},h.Eb=function(e){O1(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function gT(e,t,n,i,r,l,c,f){return e=Ly(e,t,n,l,i||null,r),Vn(c(),[e],f()).map(function(y){return y.toString()})}h.Pe=function(){return this.K};function mp(e){this.o=null,this.A=e,this.G=new vu,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.s="UNKNOWN"}mp.prototype.configure=function(e){this.o=e},mp.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()},mp.prototype.setManifestType=function(e){this.s=e};function Uy(e,t){var n,i,r,l,c,f,y;return G(function(m){if(m.g==1)return n=Vn(e.i,[H3(e,t)]),i=bn(n,e.o.retryParameters),r=e.A.networkingEngine.request(8,i),Vo(e.G,r),he(m,2),_(m,r.promise,4);if(m.g!=2)return l=m.h,c=ln(l.data),f=JSON.parse(c),f.VERSION==1&&K3(e,f,l.uri),_e(m,0);if((y=De(m))&&y.code==7001)return m.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new dt(function(){Uy(e,t)}),e.g.ia(e.C),ce(m)})}function H3(e,t){if(!e.m.length)return t;t=new dn(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return e.s=="DASH"?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):e.s=="HLS"&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),Sg(r)&&eu(t,r),t.toString()}function K3(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new dt(function(){Uy(e,i)}),(n=t.TTL)&&(e.C=n),e.g.ia(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function vp(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}mp.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function jy(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var i=[],r=C(e.m),l=r.next(),c={};!l.done;c={ud:void 0},l=r.next())if(c.ud=l.value,l=t.get(c.ud))i.push({Wg:c.ud,location:l});else if(l=e.F.find(function(y){return function(m){return m.Hl==y.ud}}(c))){var f=t.get(l["BASE-ID"]);f&&(l["URI-REPLACEMENT"].bj?(f=new dn(f),Vf(f,l["URI-REPLACEMENT"].bj),i.push({Wg:c.ud,location:f.toString()})):i.push({Wg:c.ud,location:f}))}for(r=Date.now(),c=C(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(y){for(var m=C(e.j.keys()),w=m.next();!w.done;w=m.next())if(w.value.includes(new dn(y.location).Cb))return!1;return!0}),i.length&&(e.B=i[0].Wg),i=i.map(function(y){return y.location}),!i.length&&e.h)for(r=C(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=C(t.values()),r=t.next();!r.done;r=t.next())i.push(r.value);return n?i:Vn(e.i,i)}function Vi(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.s=this.o=!1,this.m=new Set}h=Vi.prototype,h.release=function(){for(var e=C(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.s=this.o=!1,this.m.clear()},h.Wj=function(){return this.l},h.Hg=function(){return this.j.slice()},h.Bj=function(){return this.i},h.Ph=function(e,t){if(e){if(e.type=="audio")for(var n=C(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=C(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==ut)for(n=C(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=C(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 mT(e,t){var n=[],i=[],r=[],l=[];e=C(e);for(var c=e.next();!c.done;c=e.next()){var f=c.value;c=new Map(f.audioStreams.map(function(T){return[L1(T),T]}));var y=new Map(f.videoStreams.map(function(T){return[P1(T),T]})),m=new Map(f.textStreams.map(function(T){return[Vy(T),T]}));if(f=new Map(f.imageStreams.map(function(T){return[Hy(T),T]})),t){var w=ET(ut);m.set(Vy(w),w),w=ET("image"),f.set(Hy(w),w)}n.push(c),i.push(y),r.push(m),l.push(f)}return{Ih:n,$i:i,Xi:r,bi:l}}h.gg=function(e,t,n){n=n===void 0?!1:n;var i=this,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be;return G(function(Le){if(Le.g==1){if(r=Dn,!t&&e.length==1)return l=mT(e,!1),c=l.Ih,f=l.$i,y=l.Xi,m=l.bi,i.h=Array.from(c[0].values()),i.g=Array.from(f[0].values()),i.j=Array.from(y[0].values()),i.i=Array.from(m[0].values()),Le.u(2);for(w=n?i.m.size:0,T=-1,I=0;I<e.length;I++)D=e[I],i.m.has(D.id)||(i.m.add(D.id),T==-1&&(T=I));return T==-1?Le.return():(M=mT(e,!0),L=M.Ih,P=M.$i,j=M.Xi,V=M.bi,_(Le,Promise.all([Sc(i,i.h,L,T,Sp,wc,w),Sc(i,i.g,P,T,Sp,wc,w),Sc(i,i.j,j,T,Sp,wc,w),Sc(i,i.i,V,T,Sp,wc,w)]),2))}if(K=0,q=[],i.g.length&&i.h.length)for(te=C(i.h),ee=te.next();!ee.done;ee=te.next())for(ge=ee.value,fe=C(i.g),le=fe.next();!le.done;le=fe.next())pe=le.value,Ee=ks(ge.drmInfos,pe.drmInfos),ge.drmInfos.length&&pe.drmInfos.length&&!Ee.length||(Ce=(ge.bandwidth||0)+(pe.bandwidth||0),ge.dependencyStream&&(Ce+=ge.dependencyStream.bandwidth||0),pe.dependencyStream&&(Ce+=pe.dependencyStream.bandwidth||0),Be=K++,q.push({id:Be,language:ge.language,disabledUntilTime:0,primary:ge.primary,audio:ge,video:pe,bandwidth:Ce,drmInfos:Ee,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(Q=i.g.length?i.g:i.h,z=C(Q),X=z.next();!X.done;X=z.next())W=X.value,J=K++,ne=W.bandwidth||0,W.dependencyStream&&(ne+=W.dependencyStream.bandwidth||0),q.push({id:J,language:W.language,disabledUntilTime:0,primary:W.primary,audio:W.type==r.ea?W:null,video:W.type==r.Ca?W:null,bandwidth:ne,drmInfos:W.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=q,ce(Le)})};function vT(e){var t,n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe;return G(function(le){switch(le.g){case 1:if(t=Dn,e.length==1)return le.return(e[0]);for(n=e.map(function(pe){return new Map(pe.filter(function(Ee){return Ee.type===t.ea}).map(function(Ee){return[L1(Ee),Ee]}))}),i=e.map(function(pe){return new Map(pe.filter(function(Ee){return Ee.type===t.Ca}).map(function(Ee){return[P1(Ee),Ee]}))}),r=e.map(function(pe){return new Map(pe.filter(function(Ee){return Ee.type===t.Ta}).map(function(Ee){return[Vy(Ee),Ee]}))}),l=e.map(function(pe){return new Map(pe.filter(function(Ee){return Ee.type===t.Tf}).map(function(Ee){return[Hy(Ee),Ee]}))}),c=C(r),f=c.next();!f.done;f=c.next())y=f.value,m=xT(t.Ta),y.set(Vy(m),m);for(w=C(l),T=w.next();!T.done;T=w.next())I=T.value,D=xT(t.Tf),I.set(Hy(D),D);return M=new Vi,_(le,Sc(M,[],n,0,f0,d0,0),2);case 2:return L=le.h,_(le,Sc(M,[],i,0,f0,d0,0),3);case 3:return P=le.h,_(le,Sc(M,[],r,0,f0,d0,0),4);case 4:return j=le.h,_(le,Sc(M,[],l,0,f0,d0,0),5);case 5:if(V=le.h,K=0,P.length&&L.length)for(W=C(L),J=W.next();!J.done;J=W.next())for(ne=J.value,te=C(P),ee=te.next();!ee.done;ee=te.next())ge=ee.value,fe=K++,ge.variantIds.push(fe),ne.variantIds.push(fe);else for(q=P.concat(L),Q=C(q),z=Q.next();!z.done;z=Q.next())X=z.value,X.variantIds=[K++];return le.return(P.concat(L).concat(j).concat(V))}})}function Sc(e,t,n,i,r,l,c){var f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J;return G(function(ne){switch(ne.g){case 1:for(f=[],y=0;y<n.length;y++)y>=i?f.push(new Set(n[y].values())):f.push(new Set);m=C(t),w=m.next();case 2:if(w.done){ne.u(4);break}return T=w.value,_(ne,G3(e,T,n,i,l,f,c),5);case 5:if(I=ne.h,!I)throw new Y(2,4,4037);w=m.next(),ne.u(2);break;case 4:for(D=C(f),M=D.next();!M.done;M=D.next())for(L=M.value,P=C(L),j=P.next();!j.done;j=P.next())V=j.value,(K=F3(e,V,n,r,l,f))&&t.push(K);for(q=C(f),Q=q.next();!Q.done;Q=q.next())for(z=Q.value,X=C(z),W=X.next(),J={};!W.done;J={qh:void 0},W=X.next())if(J.qh=W.value,!N1(J.qh)&&t.some(function(te){return function(ee){return M1(e,te.qh,ee)}}(J)))throw new Y(2,4,4037);return ne.return(t)}})}function G3(e,t,n,i,r,l,c){return G(function(f){return f.g==1?(TT(e,n,t,0<c),t.matchedStreams?t.segmentIndex?_(f,ST(t,i+c),2):f.u(2):f.return(!1)):(wT(t,i,r,l,c),f.return(!0))})}function ST(e,t){var n,i,r,l,c,f;return G(function(y){if(y.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 _(y,Promise.all(n),2)}if(e.segmentIndex instanceof Jt)for(c=t;c<i.length;c++)f=i[c],f.segmentIndex&&e.segmentIndex.h.push(f.segmentIndex);ce(y)})}function F3(e,t,n,i,r,l){if(N1(t))return null;var c=i(t);return TT(e,n,c),c.createSegmentIndex&&(c.createSegmentIndex=function(){return G(function(f){return c.segmentIndex?f.u(0):(c.segmentIndex=new Jt,_(f,ST(c,0),0))})}),!c.matchedStreams||!c.matchedStreams.length?null:(wT(c,0,r,l,0),c)}function wT(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"&&El(e.language,c.language)==0&&(f=!1),f&&(i[t-r].delete(c),c.fullMimeTypes))for(c=C(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=C(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 f0(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 wc(e,t){function n(c,f){c||(c=[]),f=C(f);for(var y=f.next();!y.done;y=f.next())y=y.value,c.includes(y)||c.push(y);return c}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=C(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=ks(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=C(t.closedCaptions),r=i.next();!r.done;r=i.next()){var l=C(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 Jt,f=C(e.trickModeVideo.matchedStreams),y=f.next();!y.done;y=f.next())c.h.push(y.value.segmentIndex);return e.trickModeVideo.segmentIndex=c,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),wc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),wc(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 Jt,f=C(e.dependencyStream.matchedStreams),y=f.next();!y.done;y=f.next())c.h.push(y.value.segmentIndex);return e.dependencyStream.segmentIndex=c,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),wc(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),wc(e.dependencyStream,t))}function d0(e,t){var n=e.roles;n||(n=[]);for(var i=C(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,n=C(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,$(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=C(t.closedCaptions),n=t.next();!n.done;n=t.next())i=C(n.value),n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}function TT(e,t,n,i){i=i!==void 0&&i?n.matchedStreams:[],t=C(t);for(var r=t.next();!r.done;r=t.next()){if(r=q3(e,r.value,n),!r)return;i.push(r)}n.matchedStreams=i}function q3(e,t,n){var i={audio:L1,video:P1,text:Vy,image:Hy}[n.type],r=null,l=i(n);if(t.has(l))r=t.get(l);else{l={audio:function(m,w){return M1(e,m,w)},video:function(m,w){return M1(e,m,w)},text:z3,image:X3}[n.type];for(var c={audio:Y3,video:W3,text:Q3,image:J3}[n.type],f=C(t.values()),y=f.next();!y.done;y=f.next())y=y.value,!l(n,y)||n.fastSwitching!=y.fastSwitching||r&&!c(n,r,y)||(r=y)}return e.s&&!N1(r)&&t.delete(i(r)),r}function R1(e,t){return e.mimeType!=t.mimeType?!1:bT(e.codecs)===bT(t.codecs)}h.Ii=function(e){this.o=e},h.Mi=function(e){this.s=e};function M1(e,t,n){return!(!R1(t,n)&&!e.o||t.drmInfos&&!sd(t.drmInfos,n.drmInfos))}function z3(e,t){return t.language?!(e.forced!==t.forced||El(e.language,t.language)==0||t.kind!=e.kind):!0}function X3(){return!0}function Y3(e,t,n){var i=AT(e,t,n);if(i===Lr)return!0;if(i===Eo)return!1;i=El(e.language,t.language);var r=El(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(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=By(e.channelsCount,t.channelsCount,n.channelsCount),i==Lr?!0:i==Eo?!1:(i=By(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),i==Lr?!0:i==Eo?!1:!!(e.bandwidth&&CT(e.bandwidth,t.bandwidth,n.bandwidth)==Lr)))}function W3(e,t,n){var i=AT(e,t,n);if(i===Lr)return!0;if(i===Eo)return!1;if(i=By(e.width*e.height,t.width*t.height,n.width*n.height),i==Lr)return!0;if(i==Eo)return!1;if(e.frameRate){if(i=By(e.frameRate,t.frameRate,n.frameRate),i==Lr)return!0;if(i==Eo)return!1}return!!(e.bandwidth&&CT(e.bandwidth,t.bandwidth,n.bandwidth)==Lr)}function Q3(e,t,n){var i=El(e.language,t.language),r=El(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 J3(e,t,n){return By(e.width*e.height,t.width*t.height,n.width*n.height)==Lr}function xT(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 ET(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new At([]),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 By(e,t,n){if(t==e&&e!=n)return Eo;if(n==e&&e!=t)return Lr;if(t>e){if(n<=e||n-e<t-e)return Lr;if(n-e>t-e)return Eo}else{if(n>e)return Eo;if(e-n<e-t)return Lr;if(e-n>e-t)return Eo}return _1}function AT(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?Eo:!i&&r?Lr:(t=R1(e,t),e=R1(e,n),t&&!e?Eo:!t&&e?Lr:_1)}function CT(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?Lr:t<e?Eo:_1}function N1(e){switch(e.type){case ut:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function P1(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function L1(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Vy(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Hy(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function bT(e){if(!U1.has(e)){var t=Ti(e);U1.set(e,t)}return U1.get(e)}Pe("shaka.util.PeriodCombiner",Vi),Vi.prototype.setUseStreamOnce=Vi.prototype.Mi,Vi.prototype.setAllowMultiTypeVariants=Vi.prototype.Ii,Vi.prototype.combinePeriods=Vi.prototype.gg,Vi.prototype.deleteStream=Vi.prototype.Ph,Vi.prototype.getImageStreams=Vi.prototype.Bj,Vi.prototype.getTextStreams=Vi.prototype.Hg,Vi.prototype.getVariants=Vi.prototype.Wj;var Lr=1,_1=0,Eo=-1,U1=new Map;function Z3(e,t){var n=new DOMParser,i=$3.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 IT(e,t){try{var n=qi(e);return Z3(n,t)}catch{return null}}var $3=new Jn(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 p0(){var e=this;this.j=this.g=null,this.A=[],this.h=null,this.za=1,this.G=[],this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0},this.s=new Map,this.B=new Map,this.o=new Map,this.C=new Map,this.wa=new Map,this.m=new Vi,this.K=0,this.ya=new Ql(5),this.L=new dt(function(){if(e.I&&!e.g.continueLoadingWhenPaused&&(e.H.Ja(e.I,"timeupdate"),e.I.paused)){e.H.Aa(e.I,"timeupdate",function(){return PT(e)});return}PT(e)}),this.P=new vu,this.N=null,this.F=[],this.ha=1/0,this.va=!1,this.i=null,this.M=0,this.S=!1,this.H=new Mt,this.I=null,this.U=!1,this.ba="",this.na=function(){return!1},this.W=[],this.ka=new Set}h=p0.prototype,h.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.na=t),n&&this.h&&this.h.presentationTimeline.V()&&this.L.Jb(),this.i&&this.i.configure(this.g),this.m&&(this.m.Ii(this.g.dash.multiTypeVariantsAllowed&&na()),this.m.Mi(this.g.dash.useStreamOnceInPeriodFlattening))},h.start=function(e,t){var n=this,i;return G(function(r){if(r.g==1)return n.va=t.isLowLatencyMode(),n.A=[e],n.j=t,_(r,j1(n),2);if(i=r.h,n.j&&B1(n,i),!n.j)throw new Y(2,7,7001);return r.return(n.h)})},h.stop=function(){for(var e=C(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.h=null,this.o.clear(),this.C.clear(),this.s.clear(),this.B.clear(),this.l={mf:"",type:"",profiles:[],nc:null,qb:0,cb:null,be:0},this.m=null,this.L!=null&&(this.L.stop(),this.L=null),this.i&&this.i.destroy(),this.H&&(this.H.release(),this.H=null),this.ka.clear(),this.P.destroy()},h.update=function(){var e=this,t;return G(function(n){if(n.g==1)return he(n,2),_(n,j1(e),4);if(n.g!=2)return _e(n,0);if(t=De(n),!e.j||!t)return n.return();e.j.onError(t),ce(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.V()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Ac();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.K=t.endTime-e,B1(this,0))}}},h.banLocation=function(e){this.i&&this.i.banLocation(e)},h.setMediaElement=function(e){this.I=e};function j1(e){var t,n,i,r,l,c,f,y,m,w,T;return G(function(I){return I.g==1?(t=4,n="MPD",i=mI(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.i&&(l=jy(e.i,"Location",!0),l.length&&(r=l)),c=bn(r,e.g.retryParameters),f=Date.now(),_(I,H1(e,c,0,{type:t}),2)):I.g!=3?(y=I.h,e.j?(y.uri&&y.uri!=y.originalUri&&!e.A.includes(y.uri)&&e.A.unshift(y.uri),m=new dn(y.uri),e.ba=m.g.toString(),_(I,eI(e,y.data,y.uri,n),3)):I.return(0)):(w=Date.now(),T=(w-f)/1e3,e.ya.sample(1,T),e.ka.clear(),I.return(T))})}function eI(e,t,n,i){var r,l,c,f,y,m,w,T,I,D;return G(function(M){if(M.g==1){if(r=t,l=e.g.dash.manifestPreprocessor,c=tp,l!=c){if(Et("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),f=IT(r,i),!f)throw new Y(2,4,4001,n);l(f),r=Br(f.outerHTML)}if(y=au(r,i),!y)throw new Y(2,4,4001,n);return m=e.g.dash.manifestPreprocessorTXml,w=To,m!=w&&m(y),i==="Patch"?M.return(tI(e,y)):e.g.dash.disableXlinkProcessing?M.return(kT(e,y,n)):(T=e.g.dash.xlinkFailGracefully,I=c0(y,e.g.retryParameters,T,n,e.j.networkingEngine),Vo(e.P,I),_(M,I.promise,2))}return D=M.h,M.return(kT(e,D,n))})}function kT(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st,tt,zt,ft,lt,ht,gn,hn,mn,Wn,Pn,Xt,xc,jr,Ec,bp,Ip;return G(function(Xl){switch(Xl.g){case 1:for(e.i&&e.i.l.clear(),i=[n],r=[],l=new Map,c=Rt(t,"Location"),f=C(c),y=f.next();!y.done;y=f.next())m=y.value,w=m.attributes.serviceLocation,(T=zi(m))&&(I=Vn(i,[T])[0],w&&(e.i?vp(e.i,"Location",w,I):l.set(w,I)),r.push(I));if(e.i?(D=jy(e.i,"Location",!0),0<D.length&&(i=e.A=D)):r.length&&(i=e.A=r),e.l.mf=t.attributes.id||"",e.l.be=Ze(t,"publishTime",vl)||0,e.G=Rt(t,"PatchLocation"),M=Promise.resolve(),(L=sn(t,"ContentSteering"))&&e.j)for(P=L.attributes.defaultServiceLocation,e.i?(e.i.i=i,e.i.h=P):(e.i=new mp(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=i,e.i.h=P,(j=zi(L))&&(Ze(L,"queryBeforeStart",Zf,!1)?M=Uy(e.i,j):Uy(e.i,j))),V=C(l.keys()),K=V.next();!K.done;K=V.next())q=K.value,Q=l.get(q),vp(e.i,"Location",q,Q);if(z=Rt(t,"BaseURL"),X=!1,e.i)for(W=C(z),J=W.next();!J.done;J=W.next())ne=J.value,te=ne.attributes.serviceLocation,ee=zi(ne),te&&ee&&(vp(e.i,"BaseURL",te,ee),X=!0);if(e.W.splice(0),X&&e.i||(ge=z.map(zi),e.W.push.apply(e.W,$(Vn(i,ge)))),fe=e.i,le=e.W,pe=function(){return fe&&X?jy(fe,"BaseURL"):le.slice()},e.l.cb=pe,Ee=0,z&&z.length&&(Ee=Ze(z[0],"availabilityTimeOffset",ps)||0),e.l.qb=Ee,e.K=Ze(t,"minimumUpdatePeriod",so,-1),Ce=Ze(t,"availabilityStartTime",vl),Be=Ze(t,"timeShiftBufferDepth",so),Le=e.g.dash.ignoreSuggestedPresentationDelay,kt=null,Le||(kt=Ze(t,"suggestedPresentationDelay",so)),xt=e.g.dash.ignoreMaxSegmentDuration,Kt=null,xt||(Kt=Ze(t,"maxSegmentDuration",so)),st=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.U=e.h.presentationTimeline.V()&&st=="static"),e.l.type=st,e.h)for(tt=e.h.presentationTimeline,zt=tt.Gb(),ft=C(e.o.values()),lt=ft.next();!lt.done;lt=ft.next())ht=lt.value,ht.segmentIndex&&ht.segmentIndex.$a(zt);else gn=e.g.dash.ignoreMinBufferTime,hn=0,gn||(hn=Ze(t,"minBufferTime",so)||0),mn=0,mn=kt!=null?Math.min(kt,Be||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*hn,Be||1/0),tt=new qe(Ce,mn,e.g.dash.autoCorrectDrift);return tt.Zc(st=="static"),tt.V()&&!isNaN(e.g.availabilityWindowOverride)&&(Be=e.g.availabilityWindowOverride),Be==null&&(Be=1/0),tt.Gf(Be),Wn=t.attributes.profiles||"",e.l.profiles=Wn.split(","),Pn={Db:st!="static",presentationTimeline:tt,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:Ee,nc:null,profiles:Wn.split(","),roles:null,Lb:function(){return""}},_(Xl,M,2);case 2:return e.M=0,Xt=MT(e,Pn,pe,t,!1),xc=Xt.duration,jr=Xt.periods,(st!="static"||e.U)&&Xt.Rh||tt.pb(xc||1/0),e.S&&e.va&&tt.Ji(e.ha),tt.Rg(Kt||1),e.S&&e.va&&(Ec=kt??e.g.defaultPresentationDelay,tt.lh(Ec)),e.h?(e.h.periodCount=jr.length,e.h.gapCount=e.M,_(Xl,DT(e,jr,!1),4)):_(Xl,e.m.gg(jr,Pn.Db),6);case 6:if(e.h={presentationTimeline:tt,variants:e.m.l,textStreams:e.m.Hg(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:rI(t),nextUrl:oI(t),periodCount:jr.length,gapCount:e.M,isLowLatency:e.S,startTime:null},!tt.Zi()){Xl.u(7);break}return bp=Rt(t,"UTCTiming"),_(Xl,yI(e,pe,bp),8);case 8:if(Ip=Xl.h,!e.j)return Xl.return();tt.Ki(Ip);case 7:tt.hf(),e.m&&!e.h.presentationTimeline.V()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),lI(e),uI(e,jr),ce(Xl)}})}function DT(e,t,n){var i;return G(function(r){if(r.g==1)return _(r,e.m.gg(t,!0,n),2);e.h.variants=e.m.l,i=e.m.Hg(),0<i.length&&(e.h.textStreams=i),e.h.imageStreams=e.m.i,e.j.filter(e.h),ce(r)})}function tI(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee;return G(function(ge){if(ge.g==1){if(n=t.attributes.mpdId,i=Ze(t,"originalPublishTime",vl),!n||n!==e.l.mf||i!==e.l.be)throw e.G=[],new Y(1,4,4052);for(r=[],l=[],c=new Set,f=C(ds(t)),y=f.next();!y.done;y=f.next())if(m=y.value,w=$f(m.attributes.sel||""),T=w[w.length-1],I=zi(m)||"",T.name==="MPD")if(T.wc==="mediaPresentationDuration"){D=zi(m)||"";var fe=so(D);if(fe!=null){e.l.nc=fe;for(var le=C(e.s.values()),pe=le.next();!pe.done;pe=le.next())pe.value.nc=fe}}else if(T.wc==="type"){for(e.h.presentationTimeline.Zc(I=="static"),e.l.type=I,fe=C(e.s.values()),le=fe.next();!le.done;le=fe.next())le.value.Db=I=="dynamic";I=="static"&&(e.K=-1)}else T.wc==="publishTime"?e.l.be=vl(I)||0:T.wc===null&&m.tagName==="add"&&l.push(m);else if(T.name==="PatchLocation")zp(e.G,m);else if(T.name==="Period")m.tagName==="add"?l.push(m):m.tagName==="remove"&&T.id&&iI(e,T.id);else if(T.name==="SegmentTemplate"){if(le=$f(m.attributes.sel||""),fe=le[le.length-1],fe.wc){le=OT(e,le),pe=zi(m)||"";for(var Ee=C(le),Ce=Ee.next();!Ce.done;Ce=Ee.next())Ce=e.s.get(Ce.value),Eg(Ce.J.Gc,m.tagName,fe.wc,pe);fe=le}else fe=[];for(M=fe,L=C(M),P=L.next();!P.done;P=L.next())j=P.value,c.add(j)}else if(T.name==="SegmentTimeline"||T.name==="S"){for(fe=$f(m.attributes.sel||""),fe=OT(e,fe),le=C(fe),pe=le.next();!pe.done;pe=le.next())pe=e.s.get(pe.value),pe=yp(pe,vc,"SegmentTimeline"),Ee=Rt(pe,"S"),zp(Ee,m),pe.children=Ee;for(V=fe,K=C(V),q=K.next();!q.done;q=K.next())Q=q.value,c.add(Q)}for(z=C(c),X=z.next();!X.done;X=z.next())W=X.value,RT(e,W);for(J=C(l),ne=J.next();!ne.done;ne=J.next())te=ne.value,r.push.apply(r,$(nI(e,te)));return r.length?(e.h.periodCount+=r.length,e.h.gapCount=e.M,_(ge,DT(e,r,!0),2)):ge.u(2)}e.l.type=="static"&&(ee=e.l.nc,e.h.presentationTimeline.pb(ee||1/0)),ce(ge)})}function nI(e,t){return MT(e,{Db:e.l.type=="dynamic",presentationTimeline:e.h.presentationTimeline,ra:null,ma:null,oa:null,J:null,bandwidth:0,Jg:!1,qb:e.l.qb,profiles:e.l.profiles,nc:e.l.nc,roles:null,Lb:function(){return""}},e.l.cb,t,!0).periods}function iI(e,t){e.h.periodCount--;for(var n=C(e.s.keys()),i=n.next();!i.done;i=n.next())if(i=i.value,i.startsWith(t)){var r=e.s.get(i);yp(r,vc,"SegmentTimeline").children=[],RT(e,i),e.s.delete(i)}e.F=e.F.filter(function(l){return l!==t})}function OT(e,t){var n="",i="",r=-1,l="";t=C(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=C(e.s.values()),e=r.next();!e.done;e=r.next())e=e.value,e.ra.id===n&&e.oa.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(i=C(e.s.values()),e=i.next();!e.done;e=i.next())e=e.value,e.ra.id===n&&e.oa.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function RT(e,t){var n=e.s.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.$a(e.h.presentationTimeline.Gb());try{var r=hT(n,function(l,c,f,y){return _T(e,l,c,f,y)},e.o,!0,e.g.dash.initialSegmentLimit,e.wa,n.J.aesKey,null,!0,e.B);i.createSegmentIndex=function(){return G(function(l){if(l.g==1)return i.segmentIndex?l.u(0):_(l,r.Oc(),3);i.segmentIndex=l.h,ce(l)})}}catch(l){if(t=n.J.contentType,t!=ut&&t!="application"&&t!="image"||l.code!=4002)throw l}}function rI(e){var t=sn(e,"ServiceDescription");if(!t||(e=sn(t,"Latency"),t=sn(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 oI(e){if(e=Rt(e,"SupplementalProperty"),!e.length)return null;e=C(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 MT(e,t,n,i,r){var l=t.nc;l||(l=Ze(i,"mediaPresentationDuration",so),e.l.nc=l);var c=0;e.h&&e.h.presentationTimeline&&e.U&&(c=e.h.presentationTimeline.Xb());var f=[],y=c;i=Rt(i,"Period");for(var m=0;m<i.length;m++){var w=i[m],T=i[m+1],I=Ze(w,"start",so,y),D=w.attributes.id,M=Ze(w,"duration",so);I=m==0&&I==0&&e.U?c:I;var L=null;if(T){var P=Ze(T,"start",so);P!=null&&(L=P-I+c)}else l!=null&&(L=l-I+c);if(P=wg,L&&M&&Math.abs(L-M)>P&&L>M&&e.M++,L==null&&(L=M),!(e.N!==null&&D!==null&&I!==null&&I<e.N)||e.F.includes(D)||m+1==i.length){if(I!==null&&(e.N===null||I>e.N)&&(e.N=I),y=aI(e,t,n,{start:I,duration:L,node:w,bf:L==null||!T}),f.push(y),t.ra.id&&L&&e.wa.set(t.ra.id,L),L==null){y=null;break}y=I+L}}if(r)for(t=C(f),n=t.next();!n.done;n=t.next())n=n.value.id,e.F.includes(n)||e.F.push(n);else e.F=f.map(function(j){return j.id});return l!=null?{periods:f,duration:l+c,Rh:!1}:{periods:f,duration:y,Rh:!0}}function lI(e){var t=Array.from(e.C.keys()).filter(function(f){return!e.F.includes(f)});t=C(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var i=!0,r=C(e.C.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.Ph(c,n),e.o.delete(l)))}i&&e.C.delete(n)}}function uI(e,t){t=new Set(t.map(function(r){return r.id}));for(var n=C(e.B.keys()),i=n.next();!i.done;i=n.next())i=i.value,t.has(i)||e.B.delete(i)}function aI(e,t,n,i){t.ra=V1(e,i.node,null,n),t.ma=i,t.ra.qb=t.qb,t.ra.id||(t.ra.id="__shaka_period_"+i.start);var r=Rt(i.node,"EventStream");n=t.presentationTimeline.Gb(),r=C(r);for(var l=r.next();!l.done;l=r.next())gI(e,i.start,i.duration,l.value,n);for(n=Rt(i.node,"SupplementalProperty"),n=C(n),r=n.next();!r.done;r=n.next())r=r.value,r.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(r=Ky(e,r))&&(t.Lb=r);if(n=Rt(i.node,"AdaptationSet").map(function(D,M){return NT(e,t,M,D)}).filter(xl),t.Db){r=[],l=C(n);for(var c=l.next();!c.done;c=l.next()){c=C(c.value.Jk);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=C(n),c=l.next();!c.done;c=l.next())for(c=C(c.value.pj),f=c.next();!f.done;f=c.next()){var y=C(f.value);f=y.next().value,y=y.next().value,r.set(f,y)}if(r.size)for(l=null,c=C(n),f=c.next();!f.done;f=c.next()){f=f.value,y=[];for(var m=C(f.streams),w=m.next(),T={};!w.done;T={rh:void 0},w=m.next())if(T.rh=w.value,r.has(T.rh.originalId)){l||(l=Rt(i.node,"AdaptationSet").map(function(D,M){return NT(e,t,M,D)}).filter(xl)),w=C(l);for(var I=w.next();!I.done;I=w.next())(I=I.value.streams.find(function(D){return function(M){return M.originalId==D.rh.originalId}}(T)))&&(I.dependencyStream=r.get(I.originalId),I.originalId+=I.dependencyStream.originalId,y.push(I))}y.length&&f.streams.push.apply(f.streams,$(y))}if(i=n.filter(function(D){return!D.Ah}),n=n.filter(function(D){return D.Ah}),!e.g.disableIFrames){for(n=C(n),r=n.next();!r.done;r=n.next())for(r=r.value,l=r.Ah.split(" "),c=C(i),f=c.next();!f.done;f=c.next())if(f=f.value,l.includes(f.id))for(f=C(f.streams),y=f.next();!y.done;y=f.next())hu(y.value,r.streams)}if(n=h0(e.g.disableAudio,i,"audio"),r=h0(e.g.disableVideo,i,"video"),l=h0(e.g.disableText,i,ut),i=h0(e.g.disableThumbnails,i,"image"),r.length===0&&n.length===0)throw new Y(2,4,4004);return{id:t.ra.id,audioStreams:n,videoStreams:r,textStreams:l,imageStreams:i}}function h0(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,$(r.streams)),i},[])}function NT(e,t,n,i){function r(ee){var ge=ee.attributes["dvb:fontFamily"];ee=ee.attributes["dvb:url"],ge&&ee&&(ee=Vn(t.oa.cb(),[ee],t.Lb()),e.j.addFont(ge,ee[0]))}function l(ee){switch(ee){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function c(ee){switch(ee){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.oa=V1(e,i,t.ra,null),t.oa.position=n;var f=!1;n=Rt(i,"Role");var y=n.map(function(ee){return ee.attributes.value}).filter(xl),m=void 0,w=t.oa.contentType==ut;w&&(m="subtitle"),n=C(n);for(var T=n.next();!T.done;T=n.next()){T=T.value;var I=T.attributes.schemeIdUri;if(I==null||I=="urn:mpeg:dash:role:2011")switch(T=T.attributes.value,T){case"main":f=!0;break;case"caption":case"subtitle":m=T}}var D=Rt(i,"EssentialProperty");n=null;var M=!1;T=null,I=!1,D=C(D);for(var L=D.next();!L.done;L=D.next()){L=L.value;var P=L.attributes.schemeIdUri;if(P=="http://dashif.org/guidelines/trickmode")n=L.attributes.value;else if(P=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var j=c(parseInt(L.attributes.value,10));else if(P=="urn:mpeg:mpegB:cicp:ColourPrimaries")var V=l(parseInt(L.attributes.value,10));else P!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(P=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?M=!0:P=="urn:dvb:dash:fontdownload:2014"?r(L):P=="urn:mpeg:dash:urlparam:2014"&&(T=Ky(e,L))||(I=!0))}if(I)return null;var K=null;for(I=Rt(i,"SupplementalProperty"),I=C(I),D=I.next();!D.done;D=I.next())D=D.value,L=D.attributes.schemeIdUri,L=="http://dashif.org/guidelines/last-segment-number"?K=parseInt(D.attributes.value,10)-1:L=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?j=c(parseInt(D.attributes.value,10)):L=="urn:mpeg:mpegB:cicp:ColourPrimaries"?V=l(parseInt(D.attributes.value,10)):L=="urn:dvb:dash:fontdownload:2014"?r(D):L=="urn:mpeg:dash:urlparam:2014"&&(T=Ky(e,D));T&&(t.Lb=T),T=Rt(i,"Accessibility");var q=new Map,Q;for(T=C(T),I=T.next();!I.done;I=T.next())if(D=I.value,I=D.attributes.schemeIdUri,D=D.attributes.value,I!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(I!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)I=="urn:mpeg:dash:role:2011"?D!=null&&(y.push(D),D=="captions"&&(m="caption")):I=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(D=="1"?Q="visually impaired":D=="2"?Q="hard of hearing":D=="9"&&(Q="spoken subtitles"));else if(I=1,D!=null)for(D=C(D.split(";")),L=D.next();!L.done;L=D.next()){P=L.value;var z=L=void 0;P.includes("=")?(P=P.split("="),L="svc"+P[0],z=P[1].split(",")[0].split(":").pop()):(L="svc"+I,I++,z=P),q.set(L,Ot(z))}else q.set("svc1","und");else if(I=1,D!=null)for(D=D.split(";"),L=C(D),P=L.next();!P.done;P=L.next()){z=P.value;var X=P=void 0;z.includes("=")?(z=z.split("="),P=z[0].startsWith("CC")?z[0]:"CC"+z[0],X=z[1]||"und"):(P="CC"+I,D.length==2?I+=2:I++,X=z),q.set(P,Ot(X))}else q.set("CC1","und");T=Rt(i,"ContentProtection");var W=rT(T,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.oa.encrypted=0<T.length;var J=Ot(t.oa.language||"und"),ne=t.oa.label,te=new Map;if(i=Rt(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(T=[],I=C(i),D=I.next();!D.done;D=I.next())L=D.value,(D=ml(L,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(L=Tr(L),L.attributes.codecs=D.split(" ").join(","),L.attributes.id&&(L.attributes.supplementalId=L.attributes.id+"_supplementalCodecs"),T.push(L));i.push.apply(i,$(T))}if(T=i.map(function(ee){var ge=sI(e,t,W,m,J,ne,f,y,q,ee,Q,K);return ge&&(ge.hdr=ge.hdr||j,ge.colorGamut=ge.colorGamut||V,ge.fastSwitching=M,ee=ee.attributes.dependencyId)?(ge.baseOriginalId=ee,te.set(ee,ge),null):ge}).filter(function(ee){return!!ee}),T.length==0&&te.size==0){if(n=t.oa.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||w||n)return null;throw new Y(2,4,4003)}if(!t.oa.contentType||t.oa.contentType=="application")for(t.oa.contentType=UT(T[0].mimeType,T[0].codecs),w=C(T),I=w.next();!I.done;I=w.next())I.value.type=t.oa.contentType;for(w=t.oa.id||"__fake__"+e.za++,I=C(T),D=I.next();!D.done;D=I.next()){for(D=D.value,L=C(W.drmInfos),P=L.next();!P.done;P=L.next())P=P.value,P.keyIds=P.keyIds&&D.keyIds?new Set([].concat($(P.keyIds),$(D.keyIds))):P.keyIds||D.keyIds;D.groupId=w}return i=i.map(function(ee){return ee.attributes.supplementalId||ee.attributes.id}).filter(xl),{id:w,contentType:t.oa.contentType,language:J,wm:f,streams:T,drmInfos:W.drmInfos,Ah:n,Jk:i,pj:te}}function Ky(e,t){if((t=ur(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Ze(t,"useMPDUrlQuery",Zf,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.ba:n.split("&").map(function(i){if(i=="$querypart$")return e.ba;var r=/\$query:(.*?)\$/g.exec(i);if(r&&r.length==2){r=r[1];var l=new iu(e.ba).get(r);if(l.length)return r+"="+l[0]}return i}).join("&")}}return null}function sI(e,t,n,i,r,l,c,f,y,m,w,T){t.J=V1(e,m,t.oa,null);var I=t.J.id;if(e.ha=Math.min(e.ha,t.J.qb),e.S=0<e.ha,!hI(t.J))return null;var D=t.ma.start;t.bandwidth=Ze(m,"bandwidth",Sl)||0,t.roles=f;var M=Rt(m,"SupplementalProperty"),L=Rt(m,"EssentialProperty"),P=Rt(m,"ContentProtection");m=null;var j=L.find(function(le){return le.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(j||(j=M.find(function(le){return le.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(m=Ky(e,j)),m&&(t.Lb=m),j=t.J.contentType,m=j==ut||j=="application",j=j=="image",P.length&&(t.oa.encrypted=!0);try{var V=void 0;if(n.cg){var K=t.J.cb,q=t.Lb,Q=Vn(K(),[n.cg.kk],q()),z=bn(Q,e.g.retryParameters);V={bitsKey:128,blockCipherMode:"CBC",iv:n.cg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var le,pe,Ee;return G(function(Ce){if(Ce.g==1)return _(Ce,H1(e,z,6),2);if(Ce.g!=3){if(le=Ce.h,!le.data||le.data.byteLength!=16)throw new Y(2,4,4049);return pe={name:"AES-CBC"},Ee=V,_(Ce,x.crypto.subtle.importKey("raw",le.data,pe,!0,["decrypt"]),3)}Ee.cryptoKey=Ce.h,V.fetchKey=void 0,ce(Ce)})}}}if(t.J.aesKey=V,K=function(le,pe,Ee,Ce){return _T(e,le,pe,Ee,Ce)},t.J.Cd)var X=O3(t,K,V);else if(t.J.tc)X=M3(t,e.o,V);else if(t.J.Gc)X=hT(t,K,e.o,!!e.h,e.g.dash.initialSegmentLimit,e.wa,V,T,!1,e.B);else{var W=t.ma.duration||0,J=t.J.cb,ne=t.J.mimeType,te=t.J.codecs;X={endTime:-1,timeline:-1,Oc:function(){var le=ii(D,W,J());return le.Eb(function(pe){pe.mimeType=ne,pe.codecs=te}),Promise.resolve(le)},timescale:1}}}catch(le){if((m||j)&&le.code==4002)return null;throw le}T=m3(P,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),T=new Set(T?[T]:[]),P=!1,M.some(function(le){return le.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&le.attributes.value=="JOC"})&&(P=!0),M=!1,m&&(M=f.includes("forced_subtitle")||f.includes("forced-subtitle"));var ee;if(j&&((L=L.find(function(le){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(le.attributes.schemeIdUri)}))&&(ee=L.attributes.value),!ee))return null;var ge;m=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(m.includes("hvc1.2.4.L153.B0")||m.includes("hev1.2.4.L153.B0"))&&(ge="PQ"),L=t.J.id?t.ra.id+","+t.J.id:"",e.G.length&&I&&e.s.set(t.ra.id+","+I,fI(t)),t.J.yf&&cI(e,t.J.yf,X,t.presentationTimeline),X.endTime!=-1&&t.ra.id!=null&&t.J.id!=null&&((I=e.B.get(t.ra.id))?(I.endTime=X.endTime,I.ah.includes(t.J.id)||I.ah.push(t.J.id),e.B.set(t.ra.id,I)):e.B.set(t.ra.id,{endTime:X.endTime,timeline:X.timeline,ah:[t.J.id]}));var fe=L&&e.o.has(L)?e.o.get(L):{id:e.za++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){fe.segmentIndex&&(fe.segmentIndex.release(),fe.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:m,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.oa.language,label:l,type:t.oa.contentType,primary:c,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:f,forced:M,channelsCount:t.J.qf,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:P,closedCaptions:y,hdr:ge,colorGamut:void 0,videoLayout:void 0,tilesLayout:ee,accessibilityPurpose:w,external:!1,fastSwitching:!1,fullMimeTypes:new Set([xn(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return fe.createSegmentIndex=function(){var le;return G(function(pe){if(pe.g==1)return fe.segmentIndex?pe.u(0):(le=fe,_(pe,X.Oc(),3));le.segmentIndex=pe.h,ce(pe)})},L&&t.Db&&!e.o.has(L)&&(t=t.ra.id||"",e.C.has(t)||e.C.set(t,[]),e.o.set(L,fe),e.C.get(t).push(L)),fe}function cI(e,t,n,i){if(!e.ka.has(t)){e.ka.add(t);var r=Ze(t,"presentationTime",ei)||0,l=sn(t,"UTCTiming"),c;(c=l&&l.attributes.schemeIdUri)&&(l=l.attributes.schemeIdUri,c=!(l==="urn:mpeg:dash:utc:http-ntp:2014"||l==="urn:mpeg:dash:utc:ntp:2014"||l==="urn:mpeg:dash:utc:sntp:2014")),c?t=1e3*(Ze(t,"wallClockTime",vl)||0):(t=Ze(t,"wallClockTime",ei)||0,t=Lh(t)),n=new Date(t-r/n.timescale*1e3),r=n.getTime()/1e3,isNaN(r)||(i.o||i.mh(r),i=new Map().set("detail",{wallClockTime:t,programStartDate:n}),i=new ke("prft",i),e.j.onEvent(i))}}function fI(e){function t(n){return n?(n=Gn(n),n.Cd=null,n.tc=null,n.Gc=Xp(n.Gc),n.yf=null,n):null}return e=Gn(e),e.ra=t(e.ra),e.oa=t(e.oa),e.J=t(e.J),e.ma&&(e.ma=Gn(e.ma),e.ma.node=null),e}function PT(e){var t,n;return G(function(i){switch(i.g){case 1:return t=0,he(i,2),_(i,j1(e),4);case 4:t=i.h,_e(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(),B1(e,t),ce(i)}})}function B1(e,t){if(!(0>e.K)){var n=e.K;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.L.ia(Math.max(n-t,os(e.ya)))}}function V1(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,qf:null,audioSamplingRate:null,qb:0,Df:1,encrypted:!1},i=i||n.cb;var r=t.attributes.id,l=t.attributes.supplementalId,c=Rt(t,"BaseURL"),f,y=!1;if(e.i)for(var m=C(c),w=m.next();!w.done;w=m.next()){var T=w.value;w=T.attributes.serviceLocation,T=zi(T),w&&T&&(vp(e.i,r,w,T),y=!0)}y&&e.i||(f=c.map(zi));var I=e.i;e=t.attributes.contentType||n.contentType,m=t.attributes.mimeType||n.mimeType,w=qd([t.attributes.codecs||n.codecs]).join(","),T=Ze(t,"frameRate",Ev)||n.frameRate;var D=t.attributes.sar||n.pixelAspectRatio,M=dI(Rt(t,"InbandEventStream"),n.emsgSchemeIdUris),L=Rt(t,"AudioChannelConfiguration");L=pI(L)||n.qf;var P=Ze(t,"audioSamplingRate",ei)||n.audioSamplingRate;e||(e=UT(m,w));var j=sn(t,"SegmentBase"),V=sn(t,"SegmentTemplate"),K=j&&Ze(j,"availabilityTimeOffset",ps)||0,q=V&&Ze(V,"availabilityTimeOffset",ps)||0,Q=c&&c.length&&Ze(c[0],"availabilityTimeOffset",ps)||0;K=n.qb+Q+K+q,q=null,(Q=sn(t,"SegmentSequenceProperties"))&&(Q=sn(Q,"SAP"))&&(q=Ze(Q,"cadence",Fn)),Q=t.attributes.label;var z=Rt(t,"Label");return z&&z.length&&(z=z[0],Cn(z)&&(Q=Cn(z))),{cb:function(){return Vn(i(),c.length?I&&y?jy(I,r):f||[]:[])},Cd:j||n.Cd,tc:sn(t,"SegmentList")||n.tc,Gc:V||n.Gc,yf:sn(t,"ProducerReferenceTime")||n.yf,width:Ze(t,"width",ei)||n.width,height:Ze(t,"height",ei)||n.height,contentType:e,mimeType:m,codecs:w,frameRate:T,pixelAspectRatio:D,emsgSchemeIdUris:M,id:l||r,originalId:r,language:t.attributes.lang,qf:L,audioSamplingRate:P,qb:K,Ze:null,Df:q||n.Df,label:Q||null,encrypted:!1}}function dI(e,t){t=t.slice(),e=C(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 pI(e){e=C(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 hI(e){var t=e.Cd?1:0;return t+=e.tc?1:0,t+=e.Gc?1:0,t==0?e.contentType==ut||e.contentType=="application":(t!=1&&(e.Cd&&(e.tc=null),e.Gc=null),!0)}function LT(e,t,n,i){var r,l,c,f,y,m,w;return G(function(T){if(T.g==1)return r=[Oi(n)],l=Vn(t(),r),c=bn(l,e.g.retryParameters),c.method=i,f=e.j.networkingEngine.request(4,c,{isPreload:e.na()}),Vo(e.P,f),_(T,f.promise,2);if(y=T.h,i=="HEAD"){if(!y.headers||!y.headers.date)return T.return(0);m=y.headers.date}else m=ln(y.data);return w=Date.parse(m),isNaN(w)?T.return(0):T.return(w-Date.now())})}function yI(e,t,n){var i,r,l,c,f,y,m,w;return G(function(T){switch(T.g){case 1:i=n.map(function(I){return{scheme:I.attributes.schemeIdUri,value:I.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),l=C(i),c=l.next();case 2:if(c.done){T.u(4);break}switch(f=c.value,he(T,5),y=f.scheme,m=f.value,y){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return T.u(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.u(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return w=Date.parse(m),T.return(isNaN(w)?0:w-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Ct("NTP UTCTiming scheme is not supported");break;default:Ct("Unrecognized scheme in UTCTiming element",y)}T.u(9);break;case 7:return _(T,LT(e,t,m,"HEAD"),10);case 10:return T.return(T.h);case 8:return _(T,LT(e,t,m,"GET"),11);case 11:return T.return(T.h);case 9:_e(T,3);break;case 5:De(T);case 3:c=l.next(),T.u(2);break;case 4:return Ct("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),T.return(0)}})}function gI(e,t,n,i,r){var l=i.attributes.schemeIdUri||"",c=i.attributes.value||"",f=Ze(i,"timescale",ei)||1,y=Ze(i,"presentationTimeOffset",ei)||0;i=C(Rt(i,"Event"));for(var m=i.next();!m.done;m=i.next()){m=m.value;var w=Ze(m,"presentationTime",ei)||0,T=Ze(m,"duration",ei)||0;w=Math.max((w-y)/f+t,t),T=w+T/f,n!=null&&(w=Math.min(w,t+n),T=Math.min(T,t+n)),T<r||(m={schemeIdUri:l,value:c,startTime:w,endTime:T,id:m.attributes.id||"",timescale:f,eventElement:Ag(m),eventNode:Xp(m)},e.j.onTimelineRegionAdded(m))}}function _T(e,t,n,i,r){var l,c,f,y;return G(function(m){return m.g==1?(l=br,c=r?0:1,f=ec(t,n,i,e.g.retryParameters),_(m,H1(e,f,l,{type:c}),2)):(y=m.h,m.return(y.data))})}function UT(e,t){return t=xn(e,t),fo(t)?ut:e.split("/")[0]}function H1(e,t,n,i){return i||(i={}),i.isPreload=e.na(),t=e.j.networkingEngine.request(n,t,i),Vo(e.P,t),t.promise}function mI(e){var t=e.l.be;if(!e.l.mf||!t||!e.G.length)return[];var n=Date.now()/1e3,i=e.G.filter(function(r){return r=ei(r.attributes.ttl),!r||t+r>n}).map(zi).filter(xl);return i.length?Vn(e.A,i):[]}Pe("shaka.dash.DashParser",p0),Au("application/dash+xml",function(){return new p0}),Au("video/vnd.mpeg.dash.mpd",function(){return new p0});function y0(){}Pe("shaka.dependencies",y0),y0.has=function(e){return K1.has(e)},y0.add=function(e,t){if(!BT[e])throw Error(e+" is not supported");e==jT?Et("mux.js","mux.js is no longer used in Shaka Player."):K1.set(e,function(){return t})};var jT="muxjs",BT={xm:jT,ISOBoxer:"ISOBoxer"};y0.Allowed=BT;var K1=new Map([["ISOBoxer",function(){return x.ISOBoxer}]]);function Wt(){this.j=new Jn(function(){return["Oculus","Quest"].some(function(e){return navigator.userAgent.includes(e.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android"?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"}),this.l=new Jn(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Fu(){var e=x.ManagedMediaSource||x.MediaSource;return!!(e&&e.isTypeSupported)}h=Wt.prototype,h.dc=function(){return!!navigator.mediaCapabilities},h.La=function(){return this.j.value()},h.Da=function(){return this.l.value()},h.fe=function(){return!1},h.Ai=function(){return!1},h.$e=function(){return!1},h.Bi=function(){return!1},h.ee=function(){return!1},h.bd=function(){return!0},h.cd=function(){return!0},h.je=function(){return!0},h.Gi=function(){return 0},h.ic=function(){return Promise.resolve({width:1/0,height:1/0})},h.Pi=function(){return!1},h.ph=function(){return!1},h.Ua=function(e){var t=this.La();return(t==="TV"||t==="CONSOLE"||t==="CAST")&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},h.uh=function(){return!!x.indexedDB},h.xi=function(){return[]};function VT(e){return yt(),x.matchMedia!==void 0&&x.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}h.Wi=function(){return!1},h.li=function(){return!1},h.fh=function(){return!1},h.If=function(){return!0},h.mi=function(){return!1},h.Vi=function(){return!0},h.$c=function(){return!1},h.Qg=function(e){return e==="com.apple.fps"},h.toString=function(){return"Device: "+this.Ob()+" v"+this.xa()+"; Type: "+this.La()};function G1(){Wt.call(this),this.g=new Jn(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new Jn(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}$e(G1,Wt),h=G1.prototype,h.xa=function(){return this.g.value()},h.Ob=function(){return"Apple Browser"},h.La=function(){return this.h.value()},h.Da=function(){return"WEBKIT"},h.dc=function(){return!1},h.fe=function(e,t){return t==="audio"},h.$e=function(){return!0},h.Bi=function(e){return e==="audio"},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),e.abr.minTimeToSwitch=.5,e},h.Wi=function(){return!0},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(io=function(){return new G1});function F1(){if(!HT())throw Error("Not a Chromecast device!");Wt.call(this),this.h=new Jn(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new Jn(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return e=e.toLowerCase(),e.includes("android")?KT:e.includes("fuchsia")?GT:q1})}$e(F1,Wt),h=F1.prototype,h.xa=function(){return this.h.value()},h.Ob=function(){return"Chromecast with "+this.g.value()},h.La=function(){return"CAST"},h.Da=function(){return"CHROMIUM"},h.dc=function(){return Wt.prototype.dc.call(this)&&this.g.value()!==q1},h.cd=function(){return this.g.value()!==q1},h.Gi=function(){switch(this.g.value()){case KT:return 0;case GT:return 3;default:return 1}},h.ic=function(){var e,t,n,i,r;return G(function(l){switch(l.g){case 1:if(e=x.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},he(l,2),!(n=e)){l.u(4);break}return _(l,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=l.h;case 4:if(n){t.width=3840,t.height=2160,l.u(6);break}if(!(i=e)){l.u(7);break}return _(l,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:i=l.h;case 7:i&&(t.width=1920,t.height=1080);case 6:_e(l,3);break;case 2:r=De(l),ui("Failed to check canDisplayType:",r);case 3:return l.return(t)}})},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),e.streaming.stallSkip=0,e},h.uh=function(){return!1},h.$c=function(){return!0};function HT(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var KT="Android",GT="Fuchsia",q1="Linux";HT()&&(io=function(){return new F1});function z1(){Wt.call(this);var e=this;this.i=new Jn(function(){var t=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return t?parseInt(t[2],10):null}),this.g=new Jn(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new Jn(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}),this.o=new Jn(function(){return navigator.userAgent.match(/Edge?\//)?!e.h.value():!0}),this.m=new Jn(function(){return navigator.userAgent.includes("sony.hbbtv.tv")})}$e(z1,Wt),h=z1.prototype,h.xa=function(){return this.i.value()},h.Ob=function(){return this.g.value()},h.fe=function(e){return Ds(e)?this.g.value()==="Edge"&&this.h.value():!1},h.Ai=function(){return this.g.value()==="Edge"&&this.h.value()},h.$e=function(){return this.g.value()==="Edge"&&this.h.value()},h.cd=function(){return this.o.value()},h.Ua=function(e){if(Wt.prototype.Ua.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return e},h.fh=function(){return this.g.value()==="Edge"||this.m.value()},h.$c=function(){if(this.Da()==="GECKO"){var e=this.xa();return e!==null?100<=e:Wt.prototype.$c.call(this)}return Wt.prototype.$c.call(this)},h.Qg=function(e){return this.Da()==="GECKO"?e.startsWith("com.microsoft.playready.recommendation"):Wt.prototype.Qg.call(this,e)},us=function(){return new z1};function X1(){Wt.apply(this,arguments)}$e(X1,Wt),h=X1.prototype,h.xa=function(){return null},h.Ob=function(){return"Hisense"},h.La=function(){return"TV"},h.dc=function(){return!1},h.ic=function(){var e={width:1920,height:1080},t=null;if(x.Hisense_Get4KSupportState)try{t=x.Hisense_Get4KSupportState()}catch{}return t==null&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(io=function(){return new X1});function Y1(){Wt.call(this),this.g=new Jn(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}$e(Y1,Wt),h=Y1.prototype,h.Ob=function(){return"PlayStation"},h.La=function(){return"CONSOLE"},h.Da=function(){return"WEBKIT"},h.xa=function(){return this.g.value()},h.dc=function(){return!1},h.bd=function(){return!1},h.cd=function(){return!1},h.ph=function(){return this.xa()===4},h.ic=function(){var e,t,n,i,r;return G(function(l){switch(l.g){case 1:return e={width:1920,height:1080},t=!1,he(l,2),_(l,x.msdk.device.getDisplayInfo(),4);case 4:n=l.h,t=n.resolution==="4K",_e(l,3);break;case 2:return De(l),he(l,5),_(l,x.msdk.device.getDisplayInfoImmediate(),7);case 7:i=l.h,t=i.resolution==="4K",_e(l,3);break;case 5:r=De(l),Ct("PlayStation: Failed to get the display info:",r);case 3:return t&&(e.width=3840,e.height=2160),l.return(e)}})},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),this.xa()===4&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},h.fh=function(){return this.xa()===4},h.If=function(){return this.xa()!==4},navigator.userAgent.includes("PlayStation")&&(io=function(){return new Y1});function W1(){Wt.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}$e(W1,Wt),h=W1.prototype,h.xa=function(){return this.g},h.Ob=function(){return"Tizen"},h.Da=function(){return"CHROMIUM"},h.La=function(){return"TV"},h.fe=function(){return!0},h.ee=function(){return this.xa()===3},h.dc=function(){return!1},h.bd=function(){var e=this.xa();return e!==null?4<=e:Wt.prototype.bd.call(this)},h.cd=function(){return!1},h.je=function(){return this.g&&this.h?this.g===5?5<=this.h:5<this.g:Wt.prototype.je.call(this)},h.ic=function(){var e=x.devicePixelRatio;e={width:1920<x.screen.width*e?3840:1920,height:1080<x.screen.height*e?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else 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{Ct("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),e.drm.ignoreDuplicateInitData=this.xa()!==2,this.xa()===3&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},h.xi=function(){var e=[];return this.g!==null&&5>this.g&&e.push("opus"),e},h.li=function(){return!0},h.mi=function(){return this.xa()===3},navigator.userAgent.includes("Tizen")&&(io=function(){return new W1});function wp(){Wt.apply(this,arguments)}$e(wp,Wt),wp.prototype.xa=function(){return null},wp.prototype.Ob=function(){return"Vizio"},wp.prototype.La=function(){return"TV"},wp.prototype.dc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(io=function(){return new wp});function Q1(){Wt.call(this),this.h=new Jn(function(){return navigator.userAgent.includes("DT_STB_BCM")}),this.g=new Jn(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}$e(Q1,Wt),h=Q1.prototype,h.xa=function(){return this.g.value()},h.Ob=function(){return"WebKit STB"},h.La=function(){return"TV"},h.Da=function(){return"WEBKIT"},h.dc=function(){return!1},h.bd=function(){var e=this.g.value();return e!==null?15<=e:!0},h.ic=function(){return Promise.resolve({width:x.screen.width*x.devicePixelRatio,height:x.screen.height*x.devicePixelRatio})},h.If=function(){return!this.h.value()},(navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("DT_STB_BCM")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||1<navigator.maxTouchPoints||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(io=function(){return new Q1});function J1(){Wt.call(this),this.g=vI()}$e(J1,Wt),h=J1.prototype,h.xa=function(){return this.g},h.Ob=function(){return"WebOS"},h.La=function(){return"TV"},h.Da=function(){return"CHROMIUM"},h.dc=function(){return!1},h.bd=function(){var e=this.xa();return e!==null?3<e:Wt.prototype.bd.call(this)},h.cd=function(){var e=this.xa();return e!==null?6<e:Wt.prototype.cd.call(this)},h.je=function(){var e=this.xa();return e!==null?3<e:Wt.prototype.je.call(this)},h.ic=function(){var e={width:1920,height:1080};try{var t=JSON.parse(x.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{Ct("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),this.xa()===3&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e};function vI(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}h.Vi=function(){return!1},h.$c=function(){var e=this.xa();return e!==null?6<=e:Wt.prototype.$c.call(this)},navigator.userAgent.includes("Web0S")&&(io=function(){return new J1});function Z1(){Wt.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}$e(Z1,Wt),h=Z1.prototype,h.xa=function(){return this.h},h.Ob=function(){return"Xbox"},h.La=function(){return"CONSOLE"},h.Da=function(){return this.g?"EDGE":"CHROMIUM"},h.fe=function(){return!0},h.$e=function(){return!0},h.Pi=function(){return this.g},h.ic=function(){var e={width:1920,height:1080},t=FT();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch{Ct("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Ua=function(e){return Wt.prototype.Ua.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},h.uh=function(){return!1};function FT(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}(navigator.userAgent.includes("Xbox One")||FT()!==null)&&(io=function(){return new Z1});function qT(e,t,n){this.type=e,this.aa=t,this.segments=n||null}function g0(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=i===void 0?null:i}g0.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 zT(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 Tp(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function He(e,t,n){return(e=Tp(e,t))?e.value:n||null}function Qt(e,t){if(e=Tp(e,t),!e)throw new Y(2,4,4023,t);return e.value}function XT(e,t,n){n=n===void 0?[]:n,this.aa=t,this.g=e,this.rc=n}function m0(e,t){this.name=e,this.value=t}function Ao(e,t){return e.filter(function(n){return n.name==t})}function YT(e,t){return e.filter(function(n){return Qt(n,"TYPE")==t})}function hi(e,t){e=C(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function xp(e,t,n){return n=n===void 0?0:n,(e=hi(e,t))?Number(e.value):n}function Tc(e,t,n){return t?WT(e,[t],n):[]}function WT(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return QT(r,n)})),Vn(e,i)}function QT(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=C(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 SI(){this.g=0}function $1(e,t){t=ln(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=C(n),l=r.next();!l.done;l=r.next())if(l=l.value,/^#(?!EXT)/m.test(l)||i)i=!1;else if(l=eS(e,l),--e.g,JT.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=eS(e,c),wI.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=C(c);for(var y=c.next();!y.done;y=c.next())y=y.value,/^(#EXT)/.test(y)?(y=eS(e,y),JT.includes(y.name)?r.push(y):y.name=="EXT-X-MAP"?f=y:y.name=="EXT-X-PART"?l.push(y):y.name=="EXT-X-PRELOAD-HINT"?He(y,"TYPE")=="PART"?l.push(y):He(y,"TYPE")=="MAP"&&(y.name="EXT-X-MAP",f=y):i.push(y)):/^#(?!EXT)/m.test(y)||(y=y.trim(),f&&i.push(f),n.push(new XT(y,i,l)),i=[],l=[]);return l.length&&(f&&i.push(f),n.push(new XT("",i,l))),new qT(t,r,n)}r.push(c),c.name=="EXT-X-STREAM-INF"&&(c.attributes.push(new m0("URI",f)),i=!0)}}return new qT(t,r)}function eS(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 lu(i);var l;(l=lr(i,/^([^,=]+)(?:,|$)/g))&&(r=l[1]);for(var c=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;l=lr(i,c);)n.push(new m0(l[1],l[2]||l[3])),Ro(i)}return new g0(e,t,n,r)}var JT="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(" "),wI="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 ZT(){}function $T(e,t){try{var n=v0(e);return mu({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return go(i)}}function v0(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=x.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=or(e):r=Br(e),{data:r,contentType:n}}Pe("shaka.net.DataUriPlugin",ZT),ZT.parse=$T,Cr("data",$T);function S0(){var e=this;this.g=this.h=null,this.G=1,this.A=new Map,this.K=new Map,this.B=new Map,this.B.set("video",new Map),this.B.set("audio",new Map),this.B.set(ut,new Map),this.B.set("image",new Map),this.$b=new Map().set("com.apple.streamingkeydelivery",function(t,n,i){return FI(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Qt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Qt(t,"URI"),n=v0(n.split("?")[0]),n=Ge(n.data),i=Oo("com.widevine.alpha",i,[{initDataType:"cenc",initData:n}]),(t=He(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=Qt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),t=Qt(t,"URI"),t=v0(t.split("?")[0]),t=Ge(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=Ko(t,n,new Set,0),i=Oo("com.microsoft.playready",i,[{initDataType:"cenc",initData:n}]),(t=uo(["<PLAYREADY>",ro(t),"</PLAYREADY>"].join(`
`)))&&(i.licenseServerUri=a0(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Qt(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Qt(t,"URI"),n=v0(n.split("?")[0]),n=Ge(n.data),i=Oo("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:n}]),(t=He(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.ab=new Set,this.i=new Map,this.l=null,this.F="",this.Ya=new SI,this.L=-1,this.ha=1/0,this.ba=this.qc=this.Za=!1,this.C=new dt(function(){if(e.U&&!e.g.continueLoadingWhenPaused&&(e.S.Ja(e.U,"timeupdate"),e.U.paused)){e.S.Aa(e.U,"timeupdate",function(){return wx(e)});return}wx(e)}),this.za=A0,this.m=null,this.Pa=0,this.o=1/0,this.Oa=this.Ka=this.P=0,this.W=new vu,this.H=new Map,this.I=new Map,this.ya=new Map,this.na=new Map,this.M=new Map,this.va=new Map,this.wa=new Map,this.bc=this.ka=!1,this.eb=new Ql(5),this.j=null,this.N=!0,this.S=new Mt,this.s=this.U=null,this.Zb=function(){return!1}}h=S0.prototype,h.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Zb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.V()&&this.C.Jb()},h.start=function(e,t){var n=this,i;return G(function(r){return r.g==1?(n.h=t,n.ka=t.isLowLatencyMode(),_(r,aS(n,[e]).promise,2)):r.g!=3?(i=r.h,n.F=i.uri,_(r,EI(n,i.data),3)):r.return(n.m)})},h.stop=function(){this.C&&(this.C.stop(),this.C=null);var e=[];return this.W&&(e.push(this.W.destroy()),this.W=null),this.g=this.h=null,this.ab.clear(),this.m=null,this.i.clear(),this.K.clear(),this.I.clear(),this.A.clear(),this.ya.clear(),this.na.clear(),this.M.clear(),this.va.clear(),this.wa.clear(),this.j&&this.j.destroy(),this.S&&(this.S.release(),this.S=null),Promise.all(e)},h.update=function(){var e=this,t,n,i,r,l,c,f,y,m,w,T,I;return G(function(D){if(D.g==1){if(!Hi(e))return D.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(M){return M.stream.segmentIndex}),r=C(i),l=r.next();!l.done;l=r.next())c=l.value,t.push(TI(e,c));return _(D,Promise.all(t),2)}for(ux(e,i.map(function(M){return M.stream})),f=i.some(function(M){return M.Rd==0}),i.length&&!f&&(y=WI,x0(e,y.cj),m=i.map(function(M){return M.mc}),e.l.pb(Math.min.apply(Math,$(m))),e.h.updateDuration()),f&&nS(e),w=C(i),T=w.next();!T.done;T=w.next())I=T.value,I.stream.isAudioMuxedInVideo||!I.stream.segmentIndex||Si(I.stream.segmentIndex)||e.h.disableStream(I.stream);ce(D)})};function tS(e,t){return Hi(e)?e.B.get(t.type):t.jf}function TI(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt;return G(function(xt){switch(xt.g){case 1:if(t.stream.isAudioMuxedInVideo)return xt.return();for(n=[],i=C(t.O()),r=i.next();!r.done;r=i.next())l=r.value,c=new dn(l),f=c.g,t.Me&&(0<=t.Sb&&f.add("_HLS_msn",String(t.Sb)),0<=t.Tb&&f.add("_HLS_part",String(t.Tb))),t.Ne&&f.add("_HLS_skip","YES"),Sg(f)&&eu(c,tu(f.toString())),n.push(c.toString());return he(xt,2),_(xt,aS(e,n,!0).promise,4);case 4:y=xt.h,_e(xt,3);break;case 2:throw m=De(xt),e.h&&e.h.disableStream(t.stream),m;case 3:if(!t.stream.segmentIndex)return xt.return();if(w=$1(e.Ya,y.data),w.type!=1)throw new Y(2,4,4017);return T=y.uri,T==y.originalUri||t.O().includes(T)||t.zf.push(T),I=Ao(w.aa,"EXT-X-DEFINE"),D=iS(e,I,T),M=t.stream,L=tS(e,t),_(xt,fx(e,w,M.mimeType,t.O,D),5);case 5:for(P=xt.h,j=P.keyIds,V=P.drmInfos,K=P.encrypted,q=P.Hh,M.encrypted||!K||q||(M.encrypted=!0),Q=function(Kt,st){return Kt.size===st.size&&[].concat($(Kt)).every(function(tt){return st.has(tt)})},Q(M.keyIds,j)||(M.keyIds=j,M.drmInfos=V,e.h.newDrmInfo(M)),z=mx(e,w,L,D,t.O,t.type),X=z.segments,(W=z.bandwidth)&&(M.bandwidth=W),J=Kd(M),ne=C(X),te=ne.next();!te.done;te=ne.next())ee=te.value,ee.Y&&(ee.Y.rd=J);M.segmentIndex.Yd(X,e.l.Gb()),X.length&&(ge=xp(w.aa,"EXT-X-MEDIA-SEQUENCE",0),le=(fe=hi(w.aa,"EXT-X-SKIP"))?Number(He(fe,"SKIPPED-SEGMENTS")):0,pe=sx(ge,X),Ee=pe.Sb,Ce=pe.Tb,t.Sb=Ee+le,t.Tb=Ce,Be=L.get(ge),M.segmentIndex.$a(Be)),(Le=Si(M.segmentIndex))&&(t.Uc=Le.startTime,kt=X[X.length-1],t.mc=kt.endTime),hi(w.aa,"EXT-X-ENDLIST")&&(t.Rd=!0),oS(e,w),lS(e,w.aa,M.type,D,t.O),ce(xt)}})}h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(e){this.j&&this.j.banLocation(e)},h.setMediaElement=function(e){this.U=e};function ex(e,t,n){n=n===void 0?!1:n;for(var i=e.L==-1,r=C(t),l=r.next();!l.done;l=r.next()){l=l.value;var c=l.stream.segmentIndex,f=tS(e,l);if(c=Si(c)){f=C(f);for(var y=f.next();!y.done;y=f.next()){y=C(y.value);var m=y.next().value;if(y.next().value==c.startTime){i&&(e.L=Math.max(e.L,m)),l.og=m;break}}}}if(!(0>e.L))for(t=C(t),i=t.next();!i.done;i=t.next())i=i.value,(Gy(e,i.type)||n)&&(r=i.stream.segmentIndex)&&(l=e.L-i.og,0<l&&(r.g.splice(0,l),r=Si(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),tx(e,i,r)))}function xI(e,t){if(e.ha==1/0){t=C(t);for(var n=t.next();!n.done;n=t.next())n=Si(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ha=Math.min(e.ha,n.h))}if(t=e.ha,t!=1/0){n=C(e.i.values());for(var i=n.next();!i.done;i=n.next())if(i=i.value,!Gy(e,i.type)){var r=i.stream.segmentIndex;if(r!=null){var l=Si(r);if(l)if(l.h==null)ui("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.O(),"Expect AV sync issues!");else for(tx(e,i,l.h-t-l.startTime),i=C(r),r=i.next();!r.done;r=i.next())r.value.vh(t)}}}}function tx(e,t,n){if(!(.001>Math.abs(n))){t.Uc+=n,t.mc+=n,e=tS(e,t);for(var i=C(e),r=i.next();!r.done;r=i.next()){var l=C(r.value);r=l.next().value,l=l.next().value,e.set(r,l+n)}t.O()}}function EI(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st,tt,zt,ft,lt;return G(function(ht){switch(ht.g){case 1:return n=Dn,i=$1(e.Ya,t),r=Ao(i.aa,"EXT-X-DEFINE"),l=[],c=[],f=[],e.l=new qe(null,0),e.l.Zc(!0),y=function(){return[e.F]},m=null,w=new Map,i.type==1?(e.N=!1,Ee=Ao(i.aa,"EXT-X-DEFINE"),w=iS(e,Ee,e.F),m=n.Ca,Ce="",Be=new Map,_(ht,ax(e,e.G++,w,i,y,"",m,Ce,!0,"Media Playlist",null,Be,null,!1,null,!1),7)):(CI(e,r),T=Ao(i.aa,"EXT-X-MEDIA"),I=Ao(i.aa,"EXT-X-STREAM-INF"),D=Ao(i.aa,"EXT-X-IMAGE-STREAM-INF"),M=Ao(i.aa,"EXT-X-I-FRAME-STREAM-INF"),L=Ao(i.aa,"EXT-X-SESSION-KEY"),P=Ao(i.aa,"EXT-X-SESSION-DATA"),j=Ao(i.aa,"EXT-X-CONTENT-STEERING"),II(e,P),_(ht,kI(e,j),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(V=[],K=C(I),q=K.next(),Q={};!q.done;Q={Ti:void 0},q=K.next())z=q.value,(X=He(z,"SUPPLEMENTAL-CODECS"))&&(Q.Ti=X.split(/\s*,\s*/).map(function(gn){return gn.split("/")[0]}),W=z.attributes.map(function(gn){return function(hn){var mn=hn.name,Wn=hn.value;return mn=="CODECS"&&(Wn=gn.Ti.join(","),hn=hn.value.split(","),1<hn.length&&(hn=Ri("audio",hn))&&(Wn+=","+hn)),new m0(mn,Wn)}}(Q)),V.push(new g0(z.id,z.name,W,null)));for(I.push.apply(I,$(V)),J=[],ne=C(M),te=ne.next(),ee={};!te.done;ee={Ui:void 0},te=ne.next())ge=te.value,(fe=He(ge,"SUPPLEMENTAL-CODECS"))&&(ee.Ui=fe.split(/\s*,\s*/).map(function(gn){return gn.split("/")[0]}),le=ge.attributes.map(function(gn){return function(hn){var mn=hn.name;return hn=hn.value,mn=="CODECS"&&(hn=gn.Ui.join(",")),new m0(mn,hn)}}(ee)),J.push(new g0(ge.id,ge.name,le,null)));M.push.apply(M,$(J))}return bI(e,I),_I(e,T),pe=MI(e,M),_(ht,NI(e,I,L,T,y,e.A,pe),5);case 5:return l=ht.h,c=DI(e,T),_(ht,OI(e,D,M),6);case 6:f=ht.h,ht.u(3);break;case 7:Le=ht.h,e.i.set(e.F,Le),Le.stream&&(kt=Kd(Le.stream),Le.stream.segmentIndex.Eb(function(gn){gn.Y&&(gn.Y.rd=kt)})),m=Le.stream.type,xt=!0,(e.g.disableAudio&&Le.type=="audio"||e.g.disableVideo&&Le.type=="video"&&!Le.stream.codecs.includes(","))&&(xt=!1),xt&&l.push({id:0,language:Ot(Ce||"und"),disabledUntilTime:0,primary:!0,audio:Le.type=="audio"?Le.stream:null,video:Le.type=="video"?Le.stream:null,bandwidth:Le.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new Y(2,7,7001);if(px(e,i),i.type==1&&(Hi(e)&&(hx(e,i),Kt=e.o,e.C.ia(Kt)),st=Array.from(e.i.values()),rS(e,st),nS(e),lS(e,i.aa,m,w,y)),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.s},e.ba||!e.g.hls.disableCodecGuessing){ht.u(8);break}for(tt=[],zt=C(e.m.variants),ft=zt.next();!ft.done;ft=zt.next())lt=ft.value,lt.audio&&lt.audio.codecs===""&&tt.push(lt.audio.createSegmentIndex()),lt.video&&lt.video.codecs===""&&tt.push(lt.video.createSegmentIndex());return _(ht,Promise.all(tt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),ce(ht)}})}function AI(e,t){var n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K;return G(function(q){if(q.g==1)return n=$s(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=vx(e,t),r=i.segment,l=i.segmentIndex,c=r.O(),f=c[0],y=new dn(f),m=y.ob.split(".").pop(),(w=sS.get(m))?q.return($s(w)):_(q,Promise.all([nx(e,r.Y,0),nx(e,r,l)]),2)):q.return(n);if(T=q.h,I=T[1].mimeType,D=T[0].data,M=T[1].data,L="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),P=["audio/mp4","video/mp4","video/iso.segment"],j=r.Y||P.includes(I),!j&&Xo(Ge(M))){var Q=M,z=e.g.disableAudio,X=e.g.disableVideo,W=e.g.disableText,J=Ge(Q),ne=new Vt().parse(J),te=ne.Od();J=ne.Ig();var ee=[],ge=!1,fe=!1;if(!z)switch(te.audio){case"aac":case"aac-loas":ne.sb().length&&(ee.push("mp4a.40.2"),ge=!0);break;case"mp3":ne.sb().length&&(ee.push("mp4a.40.34"),ge=!0);break;case"ac3":ne.sb().length&&(ee.push("ac-3"),ge=!0);break;case"ec3":ne.sb().length&&(ee.push("ec-3"),ge=!0);break;case"opus":ne.sb().length&&(ee.push("opus"),ge=!0)}if(!X)switch(te.video){case"avc":J.codec?ee.push(J.codec):ee.push("avc1.42E01E"),fe=!0;break;case"hvc":J.codec?ee.push(J.codec):ee.push("hvc1.1.6.L93.90"),fe=!0;break;case"av1":ee.push("av01.0.01M.08"),fe=!0}if(ee.length){if(z=ge&&!fe,X=new Map,fe&&!W){for(W=new lo("video/mp2t"),W.vf(Q),Q=C(W.Uf()),fe=Q.next();!fe.done;fe=Q.next())fe=fe.value,X.set(fe,fe);W.Fd()}J={type:z?"audio":"video",mimeType:"video/mp2t",codecs:ee.join(", "),language:null,height:J.height,width:J.width,channelCount:null,sampleRate:null,closedCaptions:X,oe:null,colorGamut:null,frameRate:J.frameRate}}else J=null;if(V=J)return q.return(V)}else if((j||L.includes(m))&&(K=gm(D,M,e.g.disableText)))return q.return(K);return I?q.return($s(I)):q.return(n)})}function nx(e,t,n){var i,r,l,c,f,y;return G(function(m){switch(m.g){case 1:return t?(i=br,r=ec(t.O(),t.Bc(),t.zc(),e.g.retryParameters),l=t instanceof Fe?1:0,_(m,es(e,r,i,{type:l}).promise,2)):m.return({mimeType:null,data:null});case 2:if(c=m.h,f=c.data,!t.aesKey){m.u(3);break}return _(m,zd(f,t.aesKey,n),4);case 4:f=m.h;case 3:return t instanceof Fe?t.ge(f,!0):t.ge(f),(y=c.headers["content-type"])&&(y=y.split(";")[0].toLowerCase()),m.return({mimeType:y,data:f})}})}function nS(e){if(Hi(e)){if(e.za==C0){for(var t=1/0,n=1/0,i=C(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.mc),n=Math.min(n,r.Uc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Gf(t)}}else e.l.pb(lx(e));if(!e.l.o)for(t=C(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Si(n.stream.segmentIndex))&&n.h&&e.l.mh(n.h);e.l.hf()}function CI(e,t){var n=new dn(e.F).g;t=C(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=He(r,"NAME");var l=He(r,"VALUE");r=He(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 iS(e,t,n){n=new dn(n).g;var i=new Map;t=C(t);for(var r=t.next();!r.done;r=t.next()){var l=r.value,c=He(l,"NAME"),f=He(l,"VALUE");r=He(l,"QUERYPARAM"),l=He(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 bI(e,t){t=C(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"AUDIO");n=He(i,"VIDEO");var l=He(i,"SUBTITLES");if(i=ix(e,i),l){var c=Ri(ut,i);e.I.set(l,c),Sr(i,c)}r&&(l=Ri("audio",i),l||(l=e.g.hls.defaultAudioCodec),e.I.set(r,l)),n&&(r=Ri("video",i),r||(r=e.g.hls.defaultVideoCodec),e.I.set(n,r))}}function II(e,t){t=C(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"DATA-ID");n=He(i,"URI");var l=He(i,"LANGUAGE");i=He(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",Tc([e.F],n,e.A)[0]),l&&r.set("language",l),i&&r.set("value",i),n=new ke("sessiondata",r),e.h&&e.h.onEvent(n)}}function kI(e,t){var n,i,r,l,c,f;return G(function(y){if(!e.h||!e.g)return y.return();for(i=C(t),r=i.next();!r.done;r=i.next())if(l=r.value,c=He(l,"PATHWAY-ID"),f=He(l,"SERVER-URI"),c&&f){e.j=new mp(e.h),e.j.configure(e.g),e.j.i=[e.F],e.j.setManifestType("HLS"),e.j.h=c,n=Uy(e.j,f);break}return _(y,n,0)})}function DI(e,t){var n=YT(t,"SUBTITLES");t=n.map(function(c){if(e.g.disableText)return null;try{return rx(e,[c],new Map).stream}catch(f){if(e.g.hls.ignoreTextStreamFailures)return null;throw f}}),n=C(n);for(var i=n.next();!i.done;i=n.next()){var r=Qt(i.value,"GROUP-ID");if((i=e.I.get(r))&&(r=e.K.get(r))){r=C(r);for(var l=r.next();!l.done;l=r.next())l=l.value,l.stream.codecs=i,l.stream.mimeType=uS(ut,i)||T0(ut),Ep(l.stream)}}return t.filter(function(c){return c})}function Ep(e){var t=new Set([xn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Eb(function(n){n.mimeType&&t.add(xn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function OI(e,t,n){var i,r;return G(function(l){return l.g==1?(i=t.map(function(c){var f,y;return G(function(m){if(m.g==1)return e.g.disableThumbnails?m.return(null):(he(m,2),_(m,UI(e,c),4));if(m.g!=2)return f=m.h,m.return(f.stream);if(y=De(m),e.g.hls.ignoreImageStreamFailures)return m.return(null);throw y})}).concat(n.map(function(c){if(e.g.disableThumbnails)return null;try{var f=ox(e,c);return f.stream.type!=="image"?null:f.stream}catch(y){if(e.g.hls.ignoreImageStreamFailures)return null;throw y}})),_(l,Promise.all(i),2)):(r=l.h,l.return(r.filter(function(c){return c})))})}function RI(e,t,n){t=t.filter(function(f){var y=He(f,"URI")||"";return f=He(f,"TYPE"),f!="SUBTITLES"&&(y!=""||f=="AUDIO")});var i={};t=C(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var l=zT(r,!e.j);i[l]?i[l].push(r):i[l]=[r]}for(var c in i)rx(e,i[c],n,!1)}function MI(e,t){return t.map(function(n){return n=ox(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function NI(e,t,n,i,r,l,c){var f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st,tt,zt;return G(function(ft){switch(ft.g){case 1:if(f=[],y=new Set,e.g.ignoreDrmInfo||!(0<n.length)){ft.u(2);break}m=C(n),w=m.next();case 3:if(w.done){ft.u(2);break}if(T=w.value,I=Qt(T,"METHOD"),D=He(T,"KEYFORMAT")||"identity",M=null,I=="NONE"){ft.u(4);break}if(E0(I)){L=Tc(r(),Qt(T,"URI"),l),P=L.sort().join(""),e.M.has(P)||(j=bn(L,e.g.retryParameters),V=es(e,j,6).promise,e.M.set(P,V)),ft.u(4);break}if(D=="identity")return _(ft,Tx(e,T,"",r,null,l),12);if(K=e.$b.get(D),!K){q=null,ft.u(10);break}return _(ft,K(T,"",null),11);case 11:q=ft.h;case 10:M=q,ft.u(6);break;case 12:M=ft.h;case 6:if(M){if(M.keyIds)for(Q=C(M.keyIds),z=Q.next();!z.done;z=Q.next())X=z.value,y.add(X);f.push(M)}case 4:w=m.next(),ft.u(3);break;case 2:for(W={},J=C(t),ne=J.next();!ne.done;ne=J.next())te=ne.value,ee=zT(te,!e.j),W[ee]?W[ee].push(te):W[ee]=[te];ge=[];for(fe in W)le=W[fe],pe=le[0],Ee=He(pe,"FRAME-RATE"),Ce=Number(He(pe,"AVERAGE-BANDWIDTH"))||Number(Qt(pe,"BANDWIDTH")),Be=He(pe,"RESOLUTION"),Le=C(Be?Be.split("x"):[null,null]),kt=Le.next().value,xt=Le.next().value,Kt=He(pe,"VIDEO-RANGE"),(st=He(pe,"REQ-VIDEO-LAYOUT"))&&st.includes(",")&&(tt=st.split(",").filter(function(lt){return lt=="CH-STEREO"||lt=="CH-MONO"}),st=tt[0]),st=st||"CH-MONO",zt=PI(e,le,i),ge.push.apply(ge,$(LI(e,zt.audio,zt.video,Ce,kt,xt,Ee,Kt,st,f,y,c)));return ft.return(ge.filter(function(lt){return lt!=null}))}})}function PI(e,t,n){for(var i={audio:[],video:[]},r=new Map,l=[],c=!1,f=!1,y=C(t),m=y.next();!m.done;m=y.next()){var w=m.value;m=He(w,"AUDIO");var T=He(w,"VIDEO"),I=m||T;I&&(l.includes(I)||l.push(I),(w=He(w,"PATHWAY-ID"))&&r.set(I,w),m?c=!0:T&&(f=!0))}l.length&&n.length&&(n=n.filter(function(M){return l.includes(Qt(M,"GROUP-ID"))}),RI(e,n,r)),n=(r=l.sort().join(","))&&e.K.has(r)?e.K.get(r):[],c?i.audio.push.apply(i.audio,$(n)):f&&i.video.push.apply(i.video,$(n)),c=!1;var D=t.map(function(M){return Qt(M,"URI")});return m=i.audio.find(function(M){return M&&M.O().find(function(L){return D.includes(L)})}),f=ix(e,t[0]),n=Ri("video",f),(y=Ri("audio",f))&&!n?(m="audio",c=0<i.audio.length):!i.audio.length&&!i.video.length&&y&&n?(m="video",f=[[n,y].join()]):i.audio.length&&m?(m="audio",c=!0):m=i.video.length&&!i.audio.length?"audio":"video",c||(e=jI(e,t,f,m),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function ix(e,t){return t=He(t,"CODECS")||"",e.ba=0<t.length,e.ba||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(",")),qd(t.split(/\s*,\s*/))}function LI(e,t,n,i,r,l,c,f,y,m,w,T){for(var I=C(n),D=I.next();!D.done;D=I.next())Sx(D.value.stream,r,l,c,f,y,null);for(r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r&&(t=t.filter(function(j){return!j.stream.isAudioMuxedInVideo})),r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=[],t=C(t),l=t.next();!l.done;l=t.next())for(l=l.value,c=C(n),f=c.next();!f.done;f=c.next()){var M=f.value;(f=l?l.stream:null)&&(f.drmInfos=m,f.keyIds=w),(y=M?M.stream:null)&&(y.drmInfos=m,y.keyIds=w,e.g.disableIFrames||hu(y,T)),y&&!f&&(y.bandwidth=i),!y&&f&&(f.bandwidth=i),I=l?l.stream.drmInfos:null,D=M?M.stream.drmInfos:null,M=M?M.O().sort().join(","):"";var L=l?l.O().sort().join(","):"",P=[];f&&f.codecs&&P.push(f.codecs),y&&y.codecs&&P.push(y.codecs),M=[M,L,P.sort()].join("-"),f&&y&&!sd(I,D)||e.ab.has(M)||(f={id:e.G++,language:f?f.language:"und",disabledUntilTime:0,primary:!!f&&f.primary||!!y&&y.primary,audio:f,video:y,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(f),e.ab.add(M))}return r}function _I(e,t){t=YT(t,"CLOSED-CAPTIONS"),e.N=t.length==0,t=C(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=He(i,"LANGUAGE");n=Ot(r||"und"),r||(r=He(i,"NAME"))&&(n=r),r=Qt(i,"GROUP-ID"),i=Qt(i,"INSTREAM-ID").replace("SERVICE","svc"),e.H.get(r)||e.H.set(r,new Map),e.H.get(r).set(i,n)}}function rx(e,t,n,i){i=i===void 0?!0:i;for(var r=[],l=[],c=new Map,f=C(t),y=f.next();!y.done;y=f.next()){var m=y.value;y=i?Qt(m,"URI"):He(m,"URI")||"shaka://hls-muxed",m=Qt(m,"GROUP-ID"),r.push(y),l.push(m),c.set(m,y)}if(i=l.sort().join(","),y=t[0],t="",f=Qt(y,"TYPE").toLowerCase(),f=="subtitles"&&(f=ut),f==ut)t=He(y,"CODECS")||"";else for(l=C(l),m=l.next();!m.done;m=l.next())if(m=m.value,e.I.has(m)){t=e.I.get(m);break}if(l=r.sort().join(","),e.i.has(l))return e.i.get(l);if(m=e.G++,e.j){c=C(c);for(var w=c.next();!w.done;w=c.next()){var T=C(w.value);w=T.next().value,T=T.next().value,(w=n.get(w))&&vp(e.j,m,w,T)}}n=He(y,"LANGUAGE"),c=He(y,"NAME"),w=He(y,"DEFAULT")=="YES",f=="audio"?T=(T=He(y,"CHANNELS"))?parseInt(T.split("/")[0],10):null:T=null;var I;f=="audio"&&(I=He(y,"CHANNELS"))?(I=I.split("/"),I=I.length!=2?!1:I[1]==="JOC"||I[1].includes("ATMOS")):I=!1;var D=He(y,"CHARACTERISTICS"),M=He(y,"FORCED")=="YES";return f=="audio"?y=(y=He(y,"SAMPLE-RATE"))?parseInt(y,10):null:y=null,r=w0(e,m,r,t,f,n,w,c,T,null,D,M,y,I),r.stream&&(r.stream.groupId=i),e.K.has(i)?e.K.get(i).push(r):e.K.set(i,[r]),e.i.set(l,r),r}function UI(e,t){var n,i,r,l,c,f,y,m,w,T;return G(function(I){return I.g==1?(n=Qt(t,"URI"),i=He(t,"CODECS","jpeg")||"",e.i.has(n)?I.return(e.i.get(n)):(r=He(t,"LANGUAGE"),l=He(t,"NAME"),c=He(t,"CHARACTERISTICS"),f=w0(e,e.G++,[n],i,"image",r,!1,l,null,null,c,!1,null,!1),(y=He(t,"RESOLUTION"))?_(I,f.stream.createSegmentIndex(),3):I.u(2))):(I.g!=2&&(m=Si(f.stream.segmentIndex),w=m.tilesLayout)&&(f.stream.width=Number(y.split("x")[0])*Number(w.split("x")[0]),f.stream.height=Number(y.split("x")[1])*Number(w.split("x")[1])),(T=He(t,"BANDWIDTH"))&&(f.stream.bandwidth=Number(T)),e.i.set(n,f),I.return(f))})}function ox(e,t){var n="video",i=Qt(t,"URI"),r=He(t,"CODECS")||"";if(r=="mjpg"&&(n="image"),e.i.has(i))return e.i.get(i);var l=He(t,"LANGUAGE"),c=He(t,"NAME"),f=He(t,"CHARACTERISTICS");return n=w0(e,e.G++,[i],r,n,l,!1,c,null,null,f,!1,null,!1),r=He(t,"RESOLUTION"),l=C(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=He(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function jI(e,t,n,i){for(var r=e.G++,l=[],c=C(t),f=c.next();!f.done;f=c.next()){var y=f.value;f=Qt(y,"URI"),y=He(y,"PATHWAY-ID"),e.j&&y&&vp(e.j,r,y,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=He(t[0],"CLOSED-CAPTIONS"),i=="video"){if(e.g.disableText){e.N=!1,t=null;break e}if(t){if(t!="NONE"){t=e.H.get(t);break e}e.N=!1}else if(!t&&e.H.size)for(t=C(e.H.keys()).next();!t.done;){t=e.H.get(t.value);break e}}t=null}return n=$u(i,n),i=w0(e,r,l,n,i,null,!1,f,null,t,null,!1,null,!1),e.i.set(c,i),i}function w0(e,t,n,i,r,l,c,f,y,m,w,T,I,D){function M(q){var Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st;return G(function(tt){switch(tt.g){case 1:return Q=Dn,he(tt,2),_(tt,q.promise,4);case 4:if(z=tt.h,q.aborted)return tt.return();if(X=z.uri,X!=z.originalUri&&(W=j.O(),W.includes(X)||j.zf.push(X)),J=$1(e.Ya,z.data),J.type!=1)throw new Y(2,4,4017);return ne=Ao(J.aa,"EXT-X-DEFINE"),te=iS(e,ne,X),ee=!1,(!e.ba&&e.g.hls.disableCodecGuessing||e.N&&r==Q.Ca&&!e.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&(e.N=!1,ee=!0),ge=!e.ba&&e.g.hls.disableCodecGuessing,fe=Hi(e),_(tt,ax(e,0,te,J,L,i,r,l,c,f,y,m,w,T,I,D,void 0,ee,ge),5);case 5:if(le=tt.h,q.aborted)return tt.return();pe=le.stream,px(e,J),Hi(e)&&!fe&&hx(e,J),j.Uc=le.Uc,j.mc=le.mc,j.Ne=le.Ne,j.Me=le.Me,j.Rd=le.Rd,j.jf=le.jf,j.Sb=le.Sb,j.Tb=le.Tb,P.segmentIndex=pe.segmentIndex,P.encrypted=pe.encrypted,P.drmInfos=pe.drmInfos,P.keyIds=pe.keyIds,P.mimeType=pe.mimeType,P.bandwidth=P.bandwidth||pe.bandwidth,P.codecs=P.codecs||pe.codecs,P.closedCaptions=P.closedCaptions||pe.closedCaptions,P.width=P.width||pe.width,P.height=P.height||pe.height,P.hdr=P.hdr||pe.hdr,P.colorGamut=P.colorGamut||pe.colorGamut,P.frameRate=P.frameRate||pe.frameRate,P.language=="und"&&pe.language!="und"&&(P.language=pe.language),P.language=P.language||pe.language,P.channelsCount=P.channelsCount||pe.channelsCount,P.audioSamplingRate=P.audioSamplingRate||pe.audioSamplingRate,Ep(P),P.drmInfos.length&&e.h.newDrmInfo(P),Ee=!1,(!m&&P.closedCaptions||m&&P.closedCaptions&&m.size!=P.closedCaptions.size)&&(Ee=!0),e.m&&Ee&&e.h.makeTextStreamsForClosedCaptions(e.m),r==Q.Ta&&(Ce=Si(pe.segmentIndex))&&Ce.Y&&(P.mimeType="application/mp4",Ep(P)),Be=Kd(P),P.segmentIndex.Eb(function(zt){zt.Y&&(zt.Y.rd=Be)}),BI(e)&&(e.qc?rS(e,[j]):(e.qc=!0,Le=Array.from(e.i.values()),kt=Le.filter(function(zt){return zt.stream.segmentIndex}),rS(e,kt),nS(e),xt=e.o,0<xt&&e.C.ia(xt))),lS(e,J.aa,P.type,te,L),e.m&&(e.m.startTime=e.s),_e(tt,0);break;case 2:if(Kt=De(tt),P.closeSegmentIndex(),Kt.code===7001)return tt.return();if(st=e.h.disableStream(P),!st)throw Kt;ce(tt)}})}function L(){return e.j&&1<n.length?jy(e.j,t):j.zf.concat(WT([e.F],n,e.A))}var P=cx(e,i,r,l,c,f,y,m,w,T,I,D);n.includes("shaka://hls-muxed")&&(P.isAudioMuxedInVideo=!0,P.mimeType="video/mp2t",Ep(P));var j={stream:P,type:r,zf:[],Uc:0,mc:0,jf:new Map,Ne:!1,Me:!1,Rd:!1,og:-1,Sb:-1,Tb:-1,O:L},V=null,K;return P.createSegmentIndex=function(){return V||(P.isAudioMuxedInVideo?(P.segmentIndex=new At([]),Promise.resolve()):(K=aS(e,j.O(),!0),V=new Promise(function(q){q(M(K))})))},P.closeSegmentIndex=function(){V&&!P.segmentIndex&&K.abort(),P.segmentIndex&&(P.segmentIndex.release(),P.segmentIndex=null),V=null},j}function lx(e){var t=1/0;e=C(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.mc));return t}function ux(e,t){var n=[];t=C(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.$d(n)}function rS(e,t){if(!Hi(e))for(var n=lx(e),i=C(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.ld(0,n);ux(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=Hi(e)&&!e.Za,n=!Hi(e)&&e.Za&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?ex(e,t,i):(xI(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&ex(e,t))}function Gy(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function BI(e){if(!e.m)return!1;var t=[],n=[];e=C(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 ax(e,t,n,i,r,l,c,f,y,m,w,T,I,D,M,L,P,j,V){j=j===void 0?!0:j,V=V===void 0?!0:V;var K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee,Ce,Be,Le,kt,xt,Kt,st,tt,zt,ft,lt,ht,gn,hn;return G(function(mn){switch(mn.g){case 1:if(K=i.segments||[],q=K.every(function(Wn){return!!hi(Wn.aa,"EXT-X-GAP")}),!K.length||q)throw new Y(2,4,4053);if(VI(e,i),Hi(e)&&oS(e,i),Q=Hi(e)?e.B.get(c):new Map,z=mx(e,i,Q,n,r,c),X=z.segments,W=z.bandwidth,ge=ee=te=ne=J=null,!(0<X.length&&j)){mn.u(2);break}return _(mn,AI(e,X),3);case 3:fe=mn.h,c!=fe.type&&Hi(e)&&(e.B.set(fe.type,e.B.get(c)),e.B.set(c,new Map)),c=fe.type,f=fe.language,w=fe.channelCount,M=fe.sampleRate,e.g.disableText||(T=fe.closedCaptions),ne=fe.height,J=fe.width,te=fe.oe,ee=fe.colorGamut,ge=fe.frameRate,V&&(P=fe.mimeType,l=fe.codecs);case 2:if(P){mn.u(4);break}return _(mn,GI(e,c,l,X),5);case 5:P=mn.h,c!=ut||l||P!="application/mp4"||!X[0]||X[0].Y||(P="text/vtt");case 4:return _(mn,fx(e,i,P,r,n),6);case 6:if(le=mn.h,pe=le.drmInfos,Ee=le.keyIds,Ce=le.encrypted,Be=le.Hh,Ce&&!pe.length&&!Be)throw new Y(2,4,4026);return Le=cx(e,l,c,f,y,m,w,T,I,D,M,L),Le.encrypted=Ce&&!Be,Le.drmInfos=pe,Le.keyIds=Ee,Le.mimeType=P,W&&(Le.bandwidth=W),Ep(Le),c=="video"&&(J||ne||te||ee)&&Sx(Le,J,ne,ge,te,null,ee),Hi(e)&&oS(e,i),kt=X[0].startTime,xt=X[X.length-1],Kt=xt.endTime,st=new At(X),Le.segmentIndex=st,zt=(tt=hi(i.aa,"EXT-X-SERVER-CONTROL"))?Tp(tt,"CAN-SKIP-UNTIL")!=null:!1,ft=tt?Tp(tt,"CAN-BLOCK-RELOAD")!=null:!1,lt=xp(i.aa,"EXT-X-MEDIA-SEQUENCE",0),ht=sx(lt,X),gn=ht.Sb,hn=ht.Tb,mn.return({stream:Le,type:c,zf:[],O:r,Uc:kt,mc:Kt,Ne:zt,Me:ft,Rd:!1,og:-1,Sb:gn,Tb:hn,jf:Q})}})}function sx(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Sb:e,Tb: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),{Sb:e,Tb:n}):(e++,t.m&&(n=0),{Sb:e,Tb:n})}function cx(e,t,n,i,r,l,c,f,y,m,w,T){var I=uS(n,t)||T0(n),D=[];if(y){y=C(y.split(","));for(var M=y.next();!M.done;M=y.next())D.push(M.value)}return y=void 0,M=null,n==ut?y=D.includes("public.accessibility.transcribes-spoken-dialog")&&D.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":D.includes("public.accessibility.describes-video")&&(M="visually impaired"),D.length||y!=="subtitle"||D.push("subtitle"),e={id:e.G++,originalId:l,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:I,codecs:t,kind:n==ut?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ot(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:D,forced:m,channelsCount:c,audioSamplingRate:w,spatialAudio:T,closedCaptions:f,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:M,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},Ep(e),e}function fx(e,t,n,i,r){var l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee;return G(function(Ce){switch(Ce.g){case 1:if(l=new Map,!e.g.ignoreDrmInfo&&t.segments){for(c=C(t.segments),f=c.next();!f.done;f=c.next())if(y=f.value,m=Ao(y.aa,"EXT-X-KEY"),w=null,m.length)for(w=yx(e,t,y.aa,i,r),T=C(m),I=T.next();!I.done;I=T.next())D=I.value,l.set(D,w)}L=M=!1,P=[],j=new Set,V=C(l),K=V.next();case 2:if(K.done){Ce.u(4);break}if(q=K.value,Q=C(q),z=Q.next().value,X=Q.next().value,W=z,J=X,ne=Qt(W,"METHOD"),ne=="NONE"){Ce.u(3);break}if(M=!0,te=He(W,"KEYFORMAT")||"identity",ee=null,E0(ne)){L=!0,Ce.u(3);break}if(te=="identity")return _(Ce,Tx(e,W,n,i,J,r),11);if(ge=e.$b.get(te),!ge){fe=null,Ce.u(9);break}return _(Ce,ge(W,n,J),10);case 10:fe=Ce.h;case 9:ee=fe,Ce.u(6);break;case 11:ee=Ce.h;case 6:if(ee){if(ee.keyIds)for(le=C(ee.keyIds),pe=le.next();!pe.done;pe=le.next())Ee=pe.value,j.add(Ee);P.push(ee)}case 3:K=V.next(),Ce.u(2);break;case 4:return Ce.return({drmInfos:P,keyIds:j,encrypted:M,Hh:L})}})}function dx(e,t,n,i,r){if(!x.crypto||!x.crypto.subtle)throw Ct("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=He(t,"IV","");if(c){var f=Hr(c.substr(2));if(f.byteLength!=16)throw new Y(2,4,4048)}else l=xp(n.aa,"EXT-X-MEDIA-SEQUENCE",0);var y=Tc(i(),Qt(t,"URI"),r),m=y.sort().join("");if(n=t.toString()+"-"+l+"-"+m,!e.na.has(n)){var w={bitsKey:128,blockCipherMode:"CBC",iv:f,firstMediaSequenceNumber:l};switch(Qt(t,"METHOD")){case"AES-256":w.bitsKey=256;break;case"AES-256-CTR":w.bitsKey=256,w.blockCipherMode="CTR"}w.fetchKey=function(){var T,I,D,M;return G(function(L){if(L.g==1)return e.M.has(m)||(T=bn(y,e.g.retryParameters),I=es(e,T,6).promise,e.M.set(m,I)),_(L,e.M.get(m),2);if(L.g!=3){if(D=L.h,!D.data||D.data.byteLength!=w.bitsKey/8)throw new Y(2,4,4049);return M={name:w.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:w.bitsKey},_(L,x.crypto.subtle.importKey("raw",D.data,M,!0,["decrypt"]),3)}w.cryptoKey=L.h,w.fetchKey=void 0,ce(L)})},e.na.set(n,w)}return e.na.get(n)}function px(e,t){e.s==null&&(t=hi(t.aa,"EXT-X-START"))&&(e.s=Number(Qt(t,"TIME-OFFSET")))}function VI(e,t){var n=hi(t.aa,"EXT-X-PLAYLIST-TYPE");t=hi(t.aa,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?x0(e,A0):n?x0(e,C0):x0(e,Ax)}function oS(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var l=hi(i[r].aa,"EXTINF");if(l){n=Number(l.value.split(",")[0]);break}r--}if(i=hi(t.aa,"EXT-X-TARGETDURATION"),!i)throw new Y(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=hi(t.aa,"EXT-X-PART-INF"))&&(e.P=Number(Qt(r,"PART-TARGET"))),t=hi(t.aa,"EXT-X-SERVER-CONTROL"),e.ka&&e.P?(e.o=e.bc?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Oa=t?Number(Qt(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?Tp(t,"HOLD-BACK"):null,e.Ka=n?Number(n.value):0),e.Pa=Math.max(i,e.Pa)}function hx(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Oa)n=e.Oa;else if(e.Ka)n=e.Ka;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var l=hi(t.segments[r].aa,"EXTINF");n=l?n+Number(l.value.split(",")[0]):n+e.Pa}e.s&&0>e.s&&(n=Math.min(-e.s,n),e.s+=n),e.l.Li(0),e.l.lh(n),e.l.Zc(!1)}function yx(e,t,n,i,r){var l=hi(n,"EXT-X-MAP");if(!l)return null;var c=Qt(l,"URI"),f=Tc(i(),c,r);if(c=[f.toString(),He(l,"BYTERANGE","")].join("-"),!e.ya.has(c)){var y=void 0,m=null,w=!1;n=C(n);for(var T=n.next();!T.done;T=n.next())T=T.value,T.name=="EXT-X-KEY"?(w=Qt(T,"METHOD"),E0(w)&&T.id<l.id?(w=!1,y=dx(e,T,t,i,r)):w=w!="NONE"):T.name=="EXT-X-BYTERANGE"&&T.id<l.id&&(m=T);t=HI(f,l,m,y,w),e.ya.set(c,t)}return e.ya.get(c)}function HI(e,t,n,i,r){var l=0,c=null;return t=He(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 Kn(function(){return e},l,c,null,null,null,i,r)}function KI(e,t,n,i,r,l,c,f,y){function m(Ce){Ce=new dn(Ce).ob.split(".").pop();var Be=cS.get(c).get(Ce);return Be||(Be=sS.get(Ce)),Be}var w=i.aa,T=hi(w,"EXTINF"),I=0,D=0,M=null;i.rc.length&&(e.m.isLowLatency=!0);var L=null;if(!e.g.hls.ignoreManifestProgramDateTime){var P=hi(w,"EXT-X-PROGRAM-DATE-TIME");P&&P.value&&(L=vl(P.value),e.Za=!0)}var j=qo;if(hi(w,"EXT-X-GAP")&&(e.m.gapCount++,j=2),!T){if(i.rc.length==0)throw new Y(2,4,4024,"EXTINF");if(!e.ka)return null}var V=[];P=!1;var K=null,q=!1,Q=!1;if(e.ka&&i.rc.length){I=t&&x.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var z=L,X={},W=0;W<i.rc.length;X={Of:void 0,uf:void 0},W++){var J=i.rc[W],ne=W==0?n:V[V.length-1],te=W==0?r:ne.endTime,ee=Number(He(J,"DURATION"))||e.P;if(ee){var ge=te+ee,fe=0,le=null;if(J.name=="EXT-X-PRELOAD-HINT"?(fe=(fe=He(J,"BYTERANGE-START"))?Number(fe):0,(ne=He(J,"BYTERANGE-LENGTH"))?le=fe+Number(ne)-1:fe&&(le=Number.MAX_SAFE_INTEGER)):(fe=He(J,"BYTERANGE"),le=C(gx(ne,fe)),fe=le.next().value,le=le.next().value),X.uf=He(J,"URI"),X.uf){ne=qo,He(J,"GAP")=="YES"&&(e.m.gapCount++,ne=2,q=!0),X.Of=null;var pe=function(Ce){return function(){return Ce.Of==null&&(Ce.Of=Tc(f(),Ce.uf,l)),Ce.Of}}(X);I&&0<=fe&&le!=null&&(K=pe,P=!0),te=new Fe(te,ge,pe,fe,le,t,0,0,1/0,[],"",null,z,ne,y),J.name=="EXT-X-PRELOAD-HINT"&&(te.Pg(),Q=!0),He(J,"INDEPENDENT")!="YES"&&0<W&&te.qd(),(X=m(X.uf))&&(te.mimeType=X,Ex.has(X)&&(te.Y=null)),V.push(te),z&&(z+=ee)}}}}if(T){if(T=Number(T.value.split(",")[0]),T==0)return null;I=r+T}else if(V.length)I=V[V.length-1].endTime;else return null;P&&(q||V[0].startByte!=0?(P=!1,K=null):V=[]),(T=hi(w,"EXT-X-BYTERANGE"))?(M=C(gx(n,T.value)),D=M.next().value,M=M.next().value):V.length&&(D=V[0].startByte,M=V[V.length-1].endByte),n="",T=null,c=="image"&&(n="1x1",w=hi(w,"EXT-X-TILES"))&&(n=Qt(w,"LAYOUT"),(w=He(w,"DURATION"))&&(T=Number(w)));var Ee=null;return t=new Fe(r,I,function(){return K?K():(Ee==null&&(Ee=Tc(f(),i.g,l)),Ee||[])},D,M,t,0,0,1/0,V,n,T,L,j,y,0<V.length&&!!i.g),(r=m(i.g))&&(t.mimeType=r,Ex.has(r)&&(t.Y=null)),P&&(e.bc=!0,t.ii(),Q&&t.Pg()),t}function gx(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.endByte+1,i=n+t-1),[n,i]}function lS(e,t,n,i,r){if(n=="video"||n=="audio"){var l=e.l.m;if(l&&!Gy(e,n))for(t=Ao(t,"EXT-X-DATERANGE"),t=t.filter(function(ne){return Tp(ne,"START-DATE")!=null}).sort(function(ne,te){return ne=Qt(ne,"START-DATE"),te=Qt(te,"START-DATE"),ne<te?-1:ne>te?1:0}),n=0;n<t.length;n++){var c=t[n];try{var f=Qt(c,"START-DATE"),y=vl(f);if(!isNaN(y)){var m=Math.max(0,y-l),w=null,T=He(c,"END-DATE");if(T){var I=vl(T);if(!isNaN(I)&&(w=I-l,0>w))continue}if(w==null){var D=He(c,"DURATION")||He(c,"PLANNED-DURATION");if(D){var M=parseFloat(D);if(isNaN(M)||(w=m+M),0>y-l+M)continue}}var L=He(c,"CLASS")||"com.apple.quicktime.HLS",P=He(c,"END-ON-NEXT")=="YES";if(w==null&&P){for(var j=n+1;j<t.length;j++){var V=He(t[j],"CLASS")||"com.apple.quicktime.HLS";if(L==V){var K=Qt(t[j],"START-DATE"),q=vl(K);if(!isNaN(q)&&q&&q>y){w=Math.max(0,q-l);break}}}if(w==null)continue}j=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var Q=[],z=C(c.attributes),X=z.next();!X.done;X=z.next()){var W=X.value;if(!j.includes(W.name)){var J=QT(W.value,i);(W.name=="X-ASSET-URI"||W.name=="X-ASSET-LIST")&&(J=Tc(r(),W.value,i)[0]),Q.push({key:W.name,description:"",data:J,mimeType:null,pictureType:null})}}1<Q.length&&e.h.onMetadata(L,m,w,Q)}}catch{}}}}function mx(e,t,n,i,r,l){var c=t.segments,f=void 0,y=xp(t.aa,"EXT-X-DISCONTINUITY-SEQUENCE",-1),m=xp(t.aa,"EXT-X-MEDIA-SEQUENCE",0),w=hi(t.aa,"EXT-X-SKIP"),T=w?Number(He(w,"SKIPPED-SEGMENTS")):0,I=m+T,D=0;Hi(e)&&n.has(I)&&(D=n.get(I)),D===0&&e.za==C0&&0<n.size&&!n.has(I)&&e.l.i!=null&&(D=e.l.Gb());var M=[],L=null;w=[];for(var P=0;P<c.length;P++){var j=c[P],V=P==0?D:L.endTime;I=m+T+P,hi(j.aa,"EXT-X-DISCONTINUITY")&&(y++,L&&L.Y&&(L.Y.g=V));for(var K=C(j.aa),q=K.next();!q.done;q=K.next())q=q.value,q.name=="EXT-X-KEY"&&(E0(Qt(q,"METHOD"))?f=dx(e,q,t,r,i):f=void 0);n.set(I,V),K=yx(e,t,j.aa,r,i),(V=KI(e,K,L,j,V,i,l,r,f))&&((L=xp(j.aa,"EXT-X-BITRATE"))?w.push({bitrate:L,duration:V.endTime-V.startTime}):w.length&&(L=w.pop(),L.duration+=V.endTime-V.startTime,w.push(L)),L=V,V.i=y,Gy(e,l)&&e.L!=null&&I<e.L||M.push(V))}if(t=void 0,w.length&&(t=w.reduce(function(Q,z){return Q+z.duration},0),t=Math.round(w.reduce(function(Q,z){return Q+z.bitrate*z.duration},0)/t*1e3)),w=M.some(function(Q){return Q.h!=null})){for(n={},i=0;i<M.length;n={Se:void 0,Re:void 0,Je:void 0,Wc:void 0,Ie:void 0},i++)if(n.Wc=M[i],n.Wc.h==null)for(n.Re=0,n.Se=i,r=function(Q){return function(){var z=M[Q.Se];if(z){if(z.h!=null)return z.h+Q.Re;Q.Re-=z.endTime-z.startTime,Q.Se+=1}return null}}(n),n.Ie=0,n.Je=i,c=function(Q){return function(){var z=M[Q.Je];if(z){if(z!=Q.Wc&&(Q.Ie+=z.endTime-z.startTime),z.h!=null)return z.h+Q.Ie;--Q.Je}return null}}(n);n.Wc.h==null;)n.Wc.h=c(),n.Wc.h==null&&(n.Wc.h=r())}if(w)for(n=C(M),i=n.next();!i.done;i=n.next())for(r=i.value,i=r.h,r=C(r.g),c=r.next();!c.done;c=r.next())c=c.value,c.h=i,i+=c.endTime-c.startTime;if(n=e.ha,w&&n!=1/0&&!Gy(e,l))for(e=C(M),l=e.next();!l.done;l=e.next())l.value.vh(n);return{segments:M,bandwidth:t}}function uS(e,t){if(e==ut){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 T0(e){return e==ut?"text/vtt":cS.get(e).get("mp4")}function vx(e,t){e=Hi(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.Cc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function GI(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M,L,P;return G(function(j){switch(j.g){case 1:return r=br,l=vx(e,i),c=l.segment,c.status==2?j.return(T0(t)):(f=c.O(),y=new dn(f[0]),m=y.ob.split(".").pop(),w=cS.get(t),(T=w.get(m))||(T=sS.get(m))||(T=uS(t,n))?j.return(T):(D=1,M=bn(f,e.g.retryParameters),he(j,2),M.method="HEAD",_(j,es(e,M,r,{type:D}).promise,4)));case 4:L=j.h,I=L.headers["content-type"],_e(j,3);break;case 2:if(P=De(j),!P||P.code!=1002&&P.code!=1001){j.u(3);break}return M.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(M.headers.Range="bytes=0-0"),_(j,es(e,M,r,{type:D}).promise,6);case 6:L=j.h,I=L.headers["content-type"];case 3:if(!I){j.u(7);break}if(T=I.toLowerCase().split(";")[0],T!="application/octet-stream"){j.u(8);break}if(L.data.byteLength){j.u(9);break}return M.method="GET",_(j,es(e,M,r,{type:D}).promise,10);case 10:L=j.h;case 9:Xo(Ge(L.data))&&(T="video/mp2t");case 8:if(T!="application/octet-stream")return j.return(T);case 7:return j.return(T0(t))}})}function Sx(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 aS(e,t,n){return es(e,bn(t,e.g.retryParameters),0,{type:n?2:3})}function wx(e){var t,n,i,r,l,c;return G(function(f){switch(f.g){case 1:return e.h?(he(f,2),t=Date.now(),_(f,e.update(),4)):f.return();case 4:n=Date.now(),Hi(e)&&(i=(n-t)/1e3,e.eb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.o,l=Math.max(0,r-os(e.eb)),e.C.ia(l)),_e(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.C.ia(.1);case 3:if(!e.h)return f.return();e.h.onManifestUpdated(),ce(f)}})}function Hi(e){return e.za!=A0}function x0(e,t){e.za=t,e.l&&e.l.Zc(!Hi(e)),Hi(e)||e.C.stop()}function es(e,t,n,i){if(!e.W)throw new Y(2,7,7001);return i||(i={}),i.isPreload=e.Zb(),t=e.h.networkingEngine.request(n,t,i),Vo(e.W,t),t}function E0(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function FI(e,t,n,i){var r,l,c,f,y,m;return G(function(w){if(w.g==1){if(n=="video/mp2t")throw new Y(2,4,4040);if(x.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(r=Qt(t,"METHOD"),l=["SAMPLE-AES","SAMPLE-AES-CTR"],!l.includes(r))return w.return(null);c="cenc",r=="SAMPLE-AES"&&(c="cbcs"),f=Qt(t,"URI"),y=Oo("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],f);var T=new dn(f).Cb.replace(/-/g,"").toLowerCase();return(m=T.length===32&&/^[0-9a-f]+$/.test(T)?T:null)||!i?w.u(2):_(w,xx(e,i),3)}return w.g!=2&&(m=w.h),m&&y.keyIds.add(m),w.return(y)})}function Tx(e,t,n,i,r,l){var c,f,y,m,w,T,I,D,M,L,P,j;return G(function(V){switch(V.g){case 1:if(n=="video/mp2t")throw new Y(2,4,4040);if(x.shakaMediaKeysPolyfill==="apple")throw new Y(2,4,4041);if(c=Qt(t,"METHOD"),f=["SAMPLE-AES","SAMPLE-AES-CTR"],!f.includes(c))return V.return(null);if(y=Tc(i(),Qt(t,"URI"),l),y[0].startsWith("data:text/plain;base64,")){m=oo(or(y[0].split("data:text/plain;base64,").pop())),V.u(2);break}return w=y.sort().join(""),e.va.has(w)||(T=bn(y,e.g.retryParameters),I=es(e,T,6).promise,e.va.set(w,I)),_(V,e.va.get(w),3);case 3:D=V.h,m=oo(D.data);case 2:if(M="00000000000000000000000000000000",!r){V.u(4);break}return _(V,xx(e,r),5);case 5:(L=V.h)&&(M=L);case 4:return P=new Map,P.set(M,m),j="cenc",c=="SAMPLE-AES"&&(j="cbcs"),V.return(mr(P,j))}})}function xx(e,t){var n,i,r,l;return G(function(c){return c.g==1?(n=null,e.wa.has(t)?(n=e.wa.get(t),c.u(2)):(i=ec(t.O(),t.Bc(),t.zc(),e.g.retryParameters),r=br,_(c,es(e,i,r,{type:0}).promise,3))):(c.g!=2&&(l=c.h,t.ge(l.data),n=vm(l.data),e.wa.set(t,n)),c.return(n))})}Pe("shaka.hls.HlsParser",S0);var sS=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),qI=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"),zI=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"),XI=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"),YI=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),cS=new Map().set("audio",qI).set("video",zI).set("text",XI).set("image",YI),Ex=new Set(["video/mp2t"].concat($(ar))),A0="VOD",Ax="EVENT",C0="LIVE",WI={cj:A0,Bl:Ax,Ll:C0};Au("application/x-mpegurl",function(){return new S0}),Au("application/vnd.apple.mpegurl",function(){return new S0});function b0(e){return a0(e)}var QI=new Map().set("com.microsoft.playready",b0).set("com.microsoft.playready.recommendation",b0).set("com.microsoft.playready.software",b0).set("com.microsoft.playready.hardware",b0);function fS(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.C=new Ql(5),this.o=new dt(function(){JI(e)}),this.B=new vu,this.m=new Map,this.A=function(){return!1}}h=fS.prototype,h.configure=function(e,t){this.g=e,t&&(this.A=t)},h.start=function(e,t){var n=this;return G(function(i){if(i.g==1)return n.l=[e],n.h=t,_(i,dS(n),2);if(!n.h)throw new Y(2,7,7001);return i.return(n.j)})};function JI(e){var t;G(function(n){switch(n.g){case 1:return he(n,2),_(n,dS(e),4);case 4:_e(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)}})}h.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()},h.update=function(){var e=this,t;return G(function(n){if(n.g==1)return he(n,2),_(n,dS(e),4);if(n.g!=2)return _e(n,0);if(t=De(n),!e.h||!t)return n.return();e.h.onError(t),ce(n)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){};function dS(e){var t,n,i,r,l,c,f;return G(function(y){if(y.g==1)return t=bn(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),Vo(e.B,r),_(y,r.promise,2);if(l=y.h,!e.h)return y.return();l.uri&&!e.l.includes(l.uri)&&e.l.unshift(l.uri);var m=l.uri,w=l.data,T=e.g.mss.manifestPreprocessor;if(T!=tp){if(Et("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),w=IT(w,"SmoothStreamingMedia"),!w)throw new Y(2,4,4046,m);T(w),w=Br(w.outerHTML)}var I=au(w,"SmoothStreamingMedia");if(!I)throw new Y(2,4,4046,m);if(m=e.g.mss.manifestPreprocessorTXml,m!=To&&m(I),e.i||(e.i=new qe(null,0)),m=Ze(I,"IsLive",Zf,!1))throw new Y(2,4,4047);e.i.Zc(!m),T=Ze(I,"TimeScale",ei,1e7),w=Ze(I,"DVRWindowLength",ei),m&&(w===0||isNaN(w))&&(w=1/0);var D=Ze(I,"CanSeek",Zf,!1);w===0&&D&&(w=1/0),D=null,w&&0<w&&(D=w/T),m&&!isNaN(e.g.availabilityWindowOverride)&&(D=e.g.availabilityWindowOverride),D==null&&(D=1/0),e.i.Gf(D),w=Ze(I,"Duration",ei,1/0),m||e.i.pb(w/T),m={variants:[],textStreams:[],timescale:T,duration:w/T};var M;for(D=Rt(I,"Protection"),T=e.g.mss.keySystemsBySystemId,w=[],D=C(D),M=D.next();!M.done;M=D.next())w=w.concat(Rt(M.value,"ProtectionHeader"));if(w.length){for(D=[],M=0;M<w.length;M++){var L=w[M],P=L.attributes.SystemID.toLowerCase(),j=T[P];if(j){var V;e:{if(V=iT(L)){V=C(ao(V,"DATA"));for(var K=V.next();!K.done;K=V.next())if(K=sn(K.value,"KID")){V=or(Cn(K)),V=new Uint8Array([V[3],V[2],V[1],V[0],V[5],V[4],V[7],V[6]].concat($(V.slice(8)))),V=oo(V);break e}}V=null}K=or(Cn(L)),P=Hr(P.replace(/-/g,"")),P=[{initData:Ko(K,P,new Set,0),initDataType:"cenc",keyId:V}],P=Oo(j,"cenc",P),V&&P.keyIds.add(V),(j=QI.get(j))&&(P.licenseServerUri=j(L)),D.push(P)}}T=D}else T=[];for(M=T,D=[],T=[],w=[],I=Rt(I,"StreamIndex"),I=C(I),L=I.next();!L.done;L=I.next()){L=L.value,j=Rt(L,"QualityLevel"),P=m.timescale,V=m.duration,K=Rt(L,"c");for(var q=[],Q=0,z=0;z<K.length;++z){var X=K[z],W=K[z+1],J=Ze(X,"t",ei),ne=Ze(X,"d",ei);if(X=Ze(X,"r",Fn),!ne)break;if(J=J??Q,(X=X||0)&&X--,0>X)if(W){if(W=Ze(W,"t",ei),W==null)break;if(J>=W)break;X=Math.ceil((W-J)/ne)-1}else{if(V==1/0)break;if(J/P>=V)break;X=Math.ceil((V*P-J)/ne)-1}for(W=0;W<=X;++W)Q=J+ne,q.push({start:J/P,end:Q/P,Bh:J}),J=Q}for(P=q,j=C(j),V=j.next();!V.done;V=j.next())(V=ZI(e,L,V.value,P,M,m))&&(V.type!="audio"||e.g.disableAudio?V.type!="video"||e.g.disableVideo?V.type!=ut||e.g.disableText||w.push(V):T.push(V):D.push(V))}for(I=[],D=C(0<D.length?D:[null]),M=D.next();!M.done;M=D.next())for(M=M.value,L=C(0<T.length?T:[null]),q=L.next();!q.done;q=L.next())j=I,P=j.push,V=e,K=M,q=q.value,z=0,K&&K.bandwidth&&0<K.bandwidth&&(z+=K.bandwidth),q&&q.bandwidth&&0<q.bandwidth&&(z+=q.bandwidth),V={id:V.s++,language:K?K.language:"und",disabledUntilTime:0,primary:!!K&&K.primary||!!q&&q.primary,audio:K,video:q,bandwidth:z,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},P.call(j,V);m.variants=I,m.textStreams=w,e.j?(e.j.variants=m.variants,e.j.textStreams=m.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:m.variants,textStreams:m.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.hf()),Promise.resolve(),c=Date.now(),f=(c-i)/1e3,e.C.sample(1,f),ce(y)})}function ZI(e,t,n,i,r,l){var c=t.attributes.Type;if(c!=="audio"&&c!=="video"&&c!=="text")return Ct("Ignoring unrecognized type:",c),null;var f=t.attributes.Language,y=e.s++,m=Ze(n,"Bitrate",Sl),w=Ze(n,"MaxWidth",Sl),T=Ze(n,"MaxHeight",Sl),I=Ze(n,"Channels",Sl),D=Ze(n,"SamplingRate",Sl),M=l.duration;i.length&&(M=i[i.length-1].end-i[0].start);var L=e.i.getDuration();e.i.pb(Math.min(M,L));var P={id:y,originalId:t.attributes.Name||String(y),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:m||0,width:w||void 0,height:T||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:Ot(f||"und"),originalLanguage:f,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:I,audioSamplingRate:D,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:M,timescale:l.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=rk.get(r))&&P.roles.push(r),r==="main"&&(P.primary=!0)),r=n.attributes.FourCC,(r===null||r==="")&&(r=t.attributes.FourCC),!r){if(c==="audio")r="AAC";else if(c==="video")return Ct('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!ik.includes(r.toUpperCase()))return Ct("Codec not supported:",r),null;switch(n=$I(n,c,r,P),P.mssPrivateData.codecPrivateData=n,c){case"audio":if(!n)return Ct("Quality unsupported without CodecPrivateData",c),null;P.type="audio",P.mimeType="mss/audio/mp4",P.codecs=ek(r,n);break;case"video":if(!n)return Ct("Quality unsupported without CodecPrivateData",c),null;P.type="video",P.mimeType="mss/video/mp4",P.codecs=tk(n);break;case"text":P.type=ut,P.mimeType="application/mp4",(r==="TTML"||r==="DFXP")&&(P.codecs="stpp")}return P.fullMimeTypes.add(xn(P.mimeType,P.codecs)),P.createSegmentIndex=function(){if(P.segmentIndex)return Promise.resolve();if(e.m.has(P.id))var j=e.m.get(P.id);else j=[],P.type=="video"&&(j=P.mssPrivateData.codecPrivateData.split("00000001").slice(1)),j={id:P.id,type:P.type,codecs:P.codecs,encrypted:P.encrypted,timescale:P.mssPrivateData.timescale,duration:P.mssPrivateData.duration,Ab:j,Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:null,stream:P},j=js(new Cu([j])),e.m.set(P.id,j);return j=nk(e,new Kn(function(){return[]},0,null,Kd(P),P.mssPrivateData.timescale,j,null,P.encrypted),P,t,i),P.segmentIndex=new At(j),Promise.resolve()},P.closeSegmentIndex=function(){P.segmentIndex&&(P.segmentIndex.release(),P.segmentIndex=null)},P}function $I(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 ek(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 tk(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function nk(e,t,n,i,r){var l=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=C(r);for(var c=r.next(),f={};!c.done;f={Jf:void 0},c=r.next())f.Jf=c.value,i.push(new Fe(f.Jf.start,f.Jf.end,function(y){return function(){return Vn(e.l,[l.replace("{start time}",String(y.Jf.Bh))])}}(f),0,null,t,0,0,n.mssPrivateData.duration));return i}Pe("shaka.mss.MssParser",fS);var ik="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),rk=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");Au("application/vnd.ms-sstr+xml",function(){return new fS});function Cx(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=qi(t)}catch{}throw new Y(n==401||n==403?2:1,1,1001,i,n,l,e,c,r||i)}function pS(){}function I0(e,t,n,i,r,l){var c=new ck;wu(t.headers).forEach(function(w,T){c.append(T,w)});var f=new ak,y={Lh:!1,Yi:!1};if(e=ok(e,t,n,{body:t.body||void 0,headers:c,method:t.method,signal:f.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},y,i,r,t.streamDataCallback,l.minBytesForProgressEvents||0),e=new vn(e,function(){return y.Lh=!0,f.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var m=new dt(function(){y.Yi=!0,f.abort()});m.ia(t/1e3),e.finally(function(){m.stop()})}return e}function ok(e,t,n,i,r,l,c,f,y){var m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X;return G(function(W){switch(W.g){case 1:return m=uk,w=sk,I=new ArrayBuffer(0),M=D=0,L={},P=Date.now(),he(W,2),_(W,m(e,i),4);case 4:if(T=W.h,L=lk(T.headers),c(L),i.method=="HEAD"){W.u(5);break}return V=(j=T.headers.get("Content-Length"))?parseInt(j,10):0,T.body?(K=T.clone().body.getReader(),q=function(J){function ne(){var te,ee,ge,fe;return G(function(le){switch(le.g){case 1:return he(le,2),_(le,K.read(),4);case 4:te=le.h,_e(le,3);break;case 2:return De(le),le.return();case 3:if(te.done){le.u(5);break}if(D+=te.value.byteLength,!f){le.u(5);break}return _(le,f(te.value),5);case 5:ee=Date.now(),ge=D-M,(100<ee-P&&ge>=y||te.done)&&(fe=te.done?0:V-D,l(ee-P,ge,fe),M=D,P=ee),te.done?J.close():(J.enqueue(te.value),ne()),ce(le)}})}ne()},new w({start:q}),_(W,T.arrayBuffer(),8)):_(W,T.arrayBuffer(),9);case 8:I=W.h,W.u(5);break;case 9:I=W.h,Q=Date.now(),l(Q-P,I.byteLength,0);case 5:t.headers.Range&&(z=t.headers.Range.replace("bytes=","").split("-").filter(function(J){return J}).map(function(J){return parseInt(J,10)}),z.length==2&&I.byteLength!=z[1]-z[0]+1&&Ct("Payload length does not match range requested bytes",t,T)),_e(W,3);break;case 2:throw X=De(W),r.Lh?new Y(1,1,7001,e,n):r.Yi?new Y(1,1,1003,e,n):new Y(1,1,1002,e,X,n);case 3:return W.return(Cx(L,I,T.status,e,T.url,t,n))}})}function lk(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}function bx(){if(x.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(x.Response){if(!new Response("").body)return!1}else return!1;return!(!x.fetch||"polyfill"in x.fetch||!x.AbortController)}Pe("shaka.net.HttpFetchPlugin",pS),pS.isSupported=bx,pS.parse=I0;var uk=x.fetch,ak=x.AbortController,sk=x.ReadableStream,ck=x.Headers;bx()&&(Cr("http",I0,2,!0),Cr("https",I0,2,!0),Cr("blob",I0,2,!0));function Ix(){}function k0(e,t,n,i,r,l){var c=new fk,f=Date.now(),y=0,m=new Promise(function(w,T){c.open(t.method,e,!0),c.responseType="arraybuffer",c.timeout=t.retryParameters.timeout,c.withCredentials=t.allowCrossSiteCredentials;var I={};c.onabort=function(){T(new Y(1,1,7001,e,n))},c.onreadystatechange=function(){if(c.readyState===XMLHttpRequest.HEADERS_RECEIVED){var M=c.getAllResponseHeaders().trim().split(`\r
`),L={};M=C(M);for(var P=M.next();!P.done;P=M.next())P=P.value.split(": "),L[P[0].toLowerCase()]=P.slice(1).join(": ");I=L,r(I)}},c.onload=function(M){var L=c.response;try{i(Date.now()-f,M.loaded-y,0);var P=Cx(I,L,c.status,e,c.responseURL,t,n);w(P)}catch(j){T(j)}},c.onerror=function(M){T(new Y(1,1,1002,e,M,n))},c.ontimeout=function(){T(new Y(1,1,1003,e,n))},c.onprogress=function(M){var L=Date.now(),P=l.minBytesForProgressEvents||0,j=M.loaded-y;(100<L-f&&j>=P||M.lengthComputable&&M.loaded==M.total)&&(i(L-f,j,c.readyState==4?0:M.total-M.loaded),y=M.loaded,f=L)};for(var D in t.headers)c.setRequestHeader(D.toLowerCase(),t.headers[D]);c.send(t.body)});return new vn(m,function(){return c.abort(),Promise.resolve()})}Pe("shaka.net.HttpXHRPlugin",Ix),Ix.parse=k0;var fk=x.XMLHttpRequest;Cr("http",k0,1,!0),Cr("https",k0,1,!0),Cr("blob",k0,1,!0);function kx(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function hS(e){var t=e.Yb(!1);return t?ro(t):e.O().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function dk(e,t){return ec(e.g.O(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function Dx(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function Ox(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}Dx.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 Rx(e){return e.i==0?0:e.j/e.i}function yS(e){var t=this;this.s=e,this.i=new Map,this.h=new Su(function(){return gS(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new Dx,this.l=!1}yS.prototype.destroy=function(){return this.h.destroy()};function pk(e,t,n){e.o=t,e.m=n}function gS(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}yS.prototype.queue=function(e,t,n,i,r){var l=this;Pt(this.h);var c=(this.i.get(e)||Promise.resolve()).then(function(){var f,y,m,w,T,I,D;return G(function(M){if(M.g==1)return _(M,gk(l,t),2);if(f=M.h,l.h.g)throw new Y(2,9,7001);if(i)for(w in y=Ge(f),m=new xu(y),m.data)T=Number(w),I=m.data[T],D=m.g[T],l.m(I,D);return l.g.close(n,f.byteLength),l.o(Rx(l.g),l.g.g),M.return(r(f))})});return this.i.set(e,c),c};function hk(e,t,n,i,r,l){Pt(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=Ge(n);f=new xu(f);for(var y in f.data){var m=Number(y);e.m(f.data[m],f.g[m])}}return e.g.close(i,n.byteLength),e.o(Rx(e.g),e.g.g),l(n)});e.i.set(t,c)}function yk(e){return G(function(t){return t.g==1?_(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function gk(e,t){var n,i,r,l;return G(function(c){return c.g==1?(n=br,i=e.s.request(n,t),r=function(){return i.abort()},e.j.push(r),_(c,i.promise,2)):(l=c.h,Sr(e.j,r),c.return(l.data))})}function D0(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new ct,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}D0.prototype.abort=function(){var e=this;return G(function(t){if(t.g==1){try{e.i.abort()}catch{}return he(t,2),_(t,e.g,4)}if(t.g!=2)return _e(t,0);De(t),ce(t)})};function mS(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,_(c,t(l.key,l.value,l),2));l.continue(),ce(c)})}})}D0.prototype.store=function(){return this.h},D0.prototype.promise=function(){return this.g};function vS(e){this.h=e,this.g=[]}vS.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Of(e,t){return O0(e,t,"readwrite")}function O0(e,t,n){n=e.h.transaction([t],n);var i=new D0(n,t);return e.g.push(i),i.promise().then(function(){Sr(e.g,i)},function(){Sr(e.g,i)}),i}function Rf(e,t,n){this.h=new vS(e),this.i=t,this.g=n}h=Rf.prototype,h.destroy=function(){return this.h.destroy()},h.hasFixedKeySpace=function(){return!0},h.addSegments=function(){return Mx(this.i)},h.removeSegments=function(e,t){return Nx(this,this.i,e,t)},h.getSegments=function(e){var t=this,n;return G(function(i){return i.g==1?_(i,Px(t,t.i,e),2):(n=i.h,i.return(n.map(function(r){return t.Nh(r)})))})},h.addManifests=function(){return Mx(this.g)},h.updateManifest=function(){return Promise.reject(new Y(2,9,9016,"Cannot modify values in "+this.g))};function mk(e,t,n){e=Of(e.h,e.g);var i=e.store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}h.updateManifestExpiration=function(e,t){var n=Of(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()},h.removeManifests=function(e,t){return Nx(this,this.g,e,t)},h.getManifests=function(e){var t=this,n;return G(function(i){return i.g==1?_(i,Px(t,t.g,e),2):(n=i.h,i.return(Promise.all(n.map(function(r){return t.Kd(r)}))))})},h.getAllManifests=function(){var e=this,t,n;return G(function(i){return i.g==1?(t=O0(e.h,e.g,"readonly"),n=new Map,_(i,mS(t,function(r,l){var c;return G(function(f){if(f.g==1)return _(f,e.Kd(l),2);c=f.h,n.set(r,c),ce(f)})}),2)):i.g!=3?_(i,t.promise(),3):i.return(n)})},h.Nh=function(e){return e},h.Kd=function(e){return Promise.resolve(e)};function Mx(e){return Promise.reject(new Y(2,9,9011,"Cannot add new value to "+e))}h.add=function(e,t){var n=this,i,r,l,c,f,y,m;return G(function(w){if(w.g==1){for(i=Of(n.h,e),r=i.store(),l=[],c=C(t),f=c.next(),y={};!f.done;y={bh:void 0},f=c.next())m=f.value,y.bh=r.add(m),y.bh.onsuccess=function(T){return function(){l.push(T.bh.result)}}(y);return _(w,i.promise(),2)}return w.return(l)})};function Nx(e,t,n,i){e=Of(e.h,t),t=e.store(),n=C(n);for(var r=n.next(),l={};!r.done;l={Og:void 0},r=n.next())l.Og=r.value,t.delete(l.Og).onsuccess=function(c){return function(){return i(c.Og)}}(l);return e.promise()}function Px(e,t,n){var i,r,l,c,f,y,m;return G(function(w){if(w.g==1){for(i=O0(e.h,t,"readonly"),r=i.store(),l={},c=[],f=C(n),y=f.next(),m={};!y.done;m={Af:void 0,cf:void 0},y=f.next())m.cf=y.value,m.Af=r.get(m.cf),m.Af.onsuccess=function(T){return function(){T.Af.result==null&&c.push(T.cf),l[T.cf]=T.Af.result}}(m);return _(w,i.promise(),2)}if(c.length)throw new Y(2,9,9012,"Could not find values for "+c);return w.return(n.map(function(T){return l[T]}))})}function Fy(e){this.g=new vS(e)}Fy.prototype.destroy=function(){return this.g.destroy()},Fy.prototype.getAll=function(){var e=this,t,n;return G(function(i){return i.g==1?(t=O0(e.g,"session-ids","readonly"),n=[],_(i,mS(t,function(r,l){n.push(l)}),2)):i.g!=3?_(i,t.promise(),3):i.return(n)})},Fy.prototype.add=function(e){var t=Of(this.g,"session-ids"),n=t.store();e=C(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},Fy.prototype.remove=function(e){var t=this,n;return G(function(i){return i.g==1?(n=Of(t.g,"session-ids"),_(i,mS(n,function(r,l,c){e.includes(l.sessionId)&&c.delete()}),2)):_(i,n.promise(),0)})};function dr(){this.g=new Map}dr.prototype.destroy=function(){for(var e=[],t=C(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},dr.prototype.init=function(){var e=this;qy.forEach(function(r,l){(r=r())&&e.g.set(l,r)});for(var t=[],n=C(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)};function Lx(e){var t=null;if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){r.hasFixedKeySpace()||t||(t={path:{Rb:i,bb:l},bb:r})})}),t)return t;throw new Y(2,9,9013,"Could not find a cell that supports add-operations")}function vk(e,t){e.g.forEach(function(n,i){n.getCells().forEach(function(r,l){t({Rb:i,bb:l},r)})})}function R0(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 Sk(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function wk(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 Tk(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=qy,i.forEach(function(l){(l=l())&&t.push(l)})),_(r,Promise.all(t.map(function(l){return l.erase()})),2)):n?r.u(0):_(r,Promise.all(t.map(function(l){return l.destroy()})),0)})}function _x(e,t){qy.set(e,t)}Pe("shaka.offline.StorageMuxer",dr),dr.unregister=function(e){qy.delete(e)},dr.register=_x,dr.prototype.destroy=dr.prototype.destroy;var qy=new Map;function zy(){Rf.apply(this,arguments)}$e(zy,Rf),zy.prototype.updateManifestExpiration=function(e,t){var n=this,i,r,l;return G(function(c){return i=Of(n.h,n.g),r=i.store(),l=new ct,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))},_(c,Promise.all([i.promise(),l]),0)})},zy.prototype.Kd=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=xk(e.periods[n],r),t.push(l);return _(f,vT(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 xk(e,t){Ak(e);for(var n=C(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return Ek(r,e.startTime,t)})}function Ek(e,t,n){var i=e.initSegmentUri?Ux(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=Ux(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}}zy.prototype.Nh=function(e){return{data:e.data}};function Ux(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 Ak(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=C(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=C(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=C(e),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=C(t),l=r.next();!l.done;l=r.next())l.value.variantIds.push(i);if(e.length&&t.length)for(t=C(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=C(e),l=r.next();!l.done;l=r.next()){l=l.value;var c=n++;i.variantIds.push(c),l.variantIds.push(c)}}}function M0(){Rf.apply(this,arguments)}$e(M0,Rf),M0.prototype.Kd=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 y=e.periods[n],m=[],w=C(y.streams),T=w.next();!T.done;T=w.next())T=T.value,T.variantIds.length!=0&&m.push(Ck(T,y.startTime,y.startTime+r));l=m,t.push(l)}return _(f,vT(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 Ck(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 SS(){Rf.apply(this,arguments)}$e(SS,Rf),h=SS.prototype,h.hasFixedKeySpace=function(){return!1},h.addSegments=function(e){return this.add(this.i,e)},h.addManifests=function(e){return this.add(this.g,e)},h.updateManifest=function(e,t){return mk(this,e,t)},h.Kd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function jx(){this.m=this.j=this.i=this.h=this.g=this.l=null}h=jx.prototype,h.init=function(){var e=this,t=new ct,n=!1,i=new dt(function(){n=!0,t.reject(new Y(2,9,9017))});typeof N0=="number"&&0<N0&&i.ia(N0);var r=x.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){i.stop();var l=r.result;e.l=l;var c=l.objectStoreNames;c=c.contains("manifest")&&c.contains("segment")?new zy(l,"segment","manifest"):null,e.g=c,c=l.objectStoreNames,c=c.contains("manifest-v2")&&c.contains("segment-v2")?new M0(l,"segment-v2","manifest-v2"):null,e.h=c,c=l.objectStoreNames,c=c.contains("manifest-v3")&&c.contains("segment-v3")?new M0(l,"segment-v3","manifest-v3"):null,e.i=c,c=l.objectStoreNames,c=c.contains("manifest-v5")&&c.contains("segment-v5")?new SS(l,"segment-v5","manifest-v5"):null,e.j=c,l=l.objectStoreNames.contains("session-ids")?new Fy(l):null,e.m=l,t.resolve()}},r.onupgradeneeded=function(){for(var l=r.result,c=C(["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||(i.stop(),t.reject(new Y(2,9,9001,r.error)),l.preventDefault())},t},h.destroy=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return _(t,e.j.destroy(),8);case 8:if(!e.m){t.u(10);break}return _(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),ce(t)}})},h.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},h.getEmeSessionCell=function(){return this.m},h.erase=function(){var e=this;return G(function(t){switch(t.g){case 1:if(!e.g){t.u(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.u(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.u(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.u(8);break}return _(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),_(t,bk(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,_(t,e.init(),0)}})};function bk(){var e=new ct,t=x.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}var N0=5;Pe("shaka.offline.indexeddb.StorageMechanismOpenTimeout",N0),_x("idb",function(){return yt().uh()?new jx:null});function qu(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}qu.prototype.Rb=function(){return this.i},qu.prototype.bb=function(){return this.h},qu.prototype.key=function(){return this.l},qu.prototype.toString=function(){return this.j};function wS(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 qu(t,n,i,Number(e[4])):null}function Bx(e,t){this.h=e,this.g=t}function Vx(e,t){var n=new qe(null,0);n.pb(t.duration);var i=t.streams.filter(function(m){return m.type=="audio"}),r=t.streams.filter(function(m){return m.type=="video"});i=Ik(e,i,r,n),r=t.streams.filter(function(m){return m.type==ut}).map(function(m){return P0(e,m,n)});var l=t.streams.filter(function(m){return m.type=="image"}).map(function(m){return P0(e,m,n)}),c=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var f=C(i.values()),y=f.next();!y.done;y=f.next())y=y.value,y.audio&&y.audio.encrypted&&(y.audio.drmInfos=c),y.video&&y.video.encrypted&&(y.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 Ik(e,t,n,i){for(var r=new Set,l=C(t),c=l.next();!c.done;c=l.next()){c=C(c.value.variantIds);for(var f=c.next();!f.done;f=c.next())r.add(f.value)}for(l=C(n),c=l.next();!c.done;c=l.next())for(c=C(c.value.variantIds),f=c.next();!f.done;f=c.next())r.add(f.value);for(l=new Map,r=C(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=C(t),r=t.next();!r.done;r=t.next())for(c=r.value,r=P0(e,c,i),c=C(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=C(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=P0(e,r,i),r=C(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 P0(e,t,n){var i=t.segments.map(function(r){return kk(e,r,t)});return n.$d(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new At(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([xn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function kk(e,t,n){var i=new qu("segment",e.h,e.g,t.dataKey);return e=new Fe(t.startTime,t.endTime,function(){return[i.toString()]},0,null,t.initSegmentKey!=null?Dk(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.Hf(t.thumbnailSprite),e}function Dk(e,t){var n=new qu("segment",e.h,e.g,t);return new Kn(function(){return[n.toString()]},0,null)}function Hx(){this.g=null}h=Hx.prototype,h.configure=function(){},h.start=function(e,t){var n=this,i,r,l,c,f,y,m;return G(function(w){switch(w.g){case 1:if(i=wS(e),n.g=i,i==null||i.g!="manifest")throw new Y(2,1,9004,e);return r=new dr,ot(w,2),_(w,r.init(),4);case 4:return _(w,R0(r,i.Rb(),i.bb()),5);case 5:return l=w.h,_(w,l.getManifests([i.key()]),6);case 6:return c=w.h,f=c[0],y=new Bx(i.Rb(),i.bb()),m=Vx(y,f),t.makeTextStreamsForClosedCaptions(m),w.return(m);case 2:return xe(w),_(w,r.destroy(),7);case 7:Ue(w,0)}})},h.stop=function(){return Promise.resolve()},h.update=function(){},h.onExpirationUpdated=function(e,t){var n=this,i,r,l,c,f,y,m;return G(function(w){switch(w.g){case 1:return i=n.g,r=new dr,he(w,2,3),_(w,r.init(),5);case 5:return _(w,R0(r,i.Rb(),i.bb()),6);case 6:return l=w.h,_(w,l.getManifests([i.key()]),7);case 7:if(c=w.h,f=c[0],y=f.sessionIds.includes(e),m=f.expiration==null||f.expiration>t,!y||!m){w.u(3);break}return _(w,l.updateManifestExpiration(i.key(),t),3);case 3:return xe(w),_(w,r.destroy(),10);case 10:Ue(w,0);break;case 2:De(w),w.u(3)}})},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){},Au("application/x-offline-manifest",function(){return new Hx});function Kx(){}function Gx(e,t){var n=wS(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=mu(e)):e=n&&n.g=="segment"?Ok(n.key(),n,t):go(new Y(2,1,9004,e)),e}function Ok(e,t,n){var i=new dr;return mu(void 0).Va(function(){return i.init()}).Va(function(){return R0(i,t.Rb(),t.bb())}).Va(function(r){return r.getSegments([t.key()])}).Va(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}Pe("shaka.offline.OfflineScheme",Kx),Kx.plugin=Gx,Cr("offline",Gx);function Fx(e,t,n){var i,r,l,c,f,y;return G(function(m){switch(m.g){case 1:i=[];for(var w=[],T=C(n),I=T.next();!I.done;I=T.next()){I=I.value;for(var D=!1,M=C(w),L=M.next();!L.done;L=M.next())if(L=L.value,Mk(L.info,I)){L.sessionIds.push(I.sessionId),D=!0;break}D||w.push({info:I,sessionIds:[I.sessionId]})}r=C(w),l=r.next();case 2:if(l.done){m.u(4);break}return c=l.value,f=Rk(e,t,c),_(m,f,5);case 5:y=m.h,i=i.concat(y),l=r.next(),m.u(2);break;case 4:return m.return(i)}})}function Rk(e,t,n){var i,r;return G(function(l){switch(l.g){case 1:return i=new Ta({pc:t,onError:function(){},rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),he(l,2),i.configure(e),_(l,qn(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:_e(l,3);break;case 2:return De(l),_(l,i.destroy(),5);case 5:return l.return([]);case 3:return r=[],_(l,Promise.all(n.sessionIds.map(function(c){return G(function(f){if(f.g==1)return he(f,2),_(f,Iv(i,c),4);if(f.g!=2)return r.push(c),_e(f,0);De(f),ce(f)})})),6);case 6:return _(l,i.destroy(),7);case 7:return l.return(r)}})}function Mk(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&ra(e.audioCapabilities,t.audioCapabilities,n)&&ra(e.videoCapabilities,t.videoCapabilities,n)}function Nk(e,t,n){var i=t.presentationTimeline.getDuration();return t=qx(t),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function TS(e,t){var n=Vx(new Bx(e.Rb(),e.bb()),t),i=t.appMetadata||{};return n=qx(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 qx(e){var t=[],n=_o(e.variants);n=C(n);for(var i=n.next();!i.done;i=n.next())t.push(Ar(i.value));for(e=C(e.textStreams),n=e.next();!n.done;n=e.next())t.push(pu(n.value));return t}function Pk(){this.g=new Map}function Lk(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 _k(e,t){e.g.set(t.id,t.bandwidth||2048)}function zx(e,t){return e=e.g.get(t),e==null&&(e=0),e}function yi(e){var t=this;if(e&&e.constructor!=F)throw new Y(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Pb()):(this.h=Ka(),this.g=new en,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new Su(function(){var i,r,l,c,f;return G(function(y){switch(y.g){case 1:return _(y,Promise.all(t.l.map(function(m){return gS(m)})),2);case 2:for(i=function(){},r=[],l=C(t.i),c=l.next();!c.done;c=l.next())f=c.value,r.push(f.then(i,i));return _(y,Promise.all(r),3);case 3:if(!n){y.u(4);break}return _(y,t.g.destroy(),4);case 4:t.h=null,t.g=null,ce(y)}})}),this.m=1e9}function xS(){if(Fu(yt()))e:{for(var e=C(qy.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}h=yi.prototype,h.destroy=function(){return this.j.destroy()},h.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Fl(e,t)),tl(this.h,e)},h.getConfiguration=function(){var e=Ka();return tl(e,this.h,Ka()),e},h.Pb=function(){return this.g},h.store=function(e,t,n,i,r){var l=this,c=this.getConfiguration(),f=new yS(this.g);return this.l.push(f),t=Uk(this,e,t||{},i||[],r||[],function(){var y;return G(function(m){return m.g==1?n?m.u(2):_(m,ol(e,l.g,c.manifest.retryParameters),3):(m.g!=2&&(n=m.h),y=Ch(e,n||null),m.return(y()))})},c,f),t=new vn(t,function(){return gS(f)}),t.finally(function(){Sr(l.l,f)}),$k(this,t)};function Uk(e,t,n,i,r,l,c,f){var y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le;return G(function(pe){switch(pe.g){case 1:return L0(),m=y=null,w=new dr,D=I=T=null,he(pe,2,3),_(pe,l(),5);case 5:return y=pe.h,_(pe,zk(e,t,y,c),6);case 6:if(M=pe.h,Yr(e),L=!M.presentationTimeline.V()&&!M.presentationTimeline.Tc(),!L)throw new Y(2,9,9005,t);P=C(i),j=P.next();case 7:if(j.done){pe.u(9);break}return V=j.value,_(pe,Xk(e,V,M),10);case 10:K=pe.h,M.imageStreams.push(K),Yr(e),j=P.next(),pe.u(7);break;case 9:q=C(r),Q=q.next();case 11:return Q.done?(mh(c.drm.clearKeys,M.variants),W=M.variants.some(function(Ee){if(Ee.audio){for(var Ce=C(Ee.audio.drmInfos),Be=Ce.next();!Be.done;Be=Ce.next())if(Be.value.licenseServerUri.startsWith("data:"))return!0}if(Ee.video){for(Ee=C(Ee.video.drmInfos),Ce=Ee.next();!Ce.done;Ce=Ee.next())if(Ce.value.licenseServerUri.startsWith("data:"))return!0}return!1}),J=c.offline.usePersistentLicense,W&&(J=!1),_(pe,e.hd(M,function(Ee){D=D||Ee},c,J),15)):(z=Q.value,_(pe,Yk(e,M,z.uri,z.language,z.kind,z.mime,z.codecs),14));case 14:X=pe.h,M.textStreams.push(X),Yr(e),Q=q.next(),pe.u(11);break;case 15:if(m=pe.h,Yr(e),D)throw D;return _(pe,Bk(M,m,c,J),16);case 16:return _(pe,w.init(),17);case 17:return Yr(e),_(pe,Lx(w),18);case 18:return T=pe.h,Yr(e),ne=Vk(m,M,t,n,c,f,J),te=ne.lk,ee=ne.yh,_(pe,T.bb.addManifests([te]),19);case 19:if(ge=pe.h,Yr(e),I=ge[0],Yr(e),D)throw D;return _(pe,jk(e,ee,I,te,f,c,T.bb,M,m,J),20);case 20:return Yr(e),Qx(M,te,m,J),_(pe,T.bb.updateManifest(I,te),21);case 21:return Yr(e),fe=new qu("manifest",T.path.Rb,T.path.bb,I),pe.return(TS(fe,te));case 3:return xe(pe),_(pe,w.destroy(),22);case 22:if(!y){pe.u(23);break}return _(pe,y.stop(),23);case 23:if(!m){pe.u(25);break}return _(pe,m.destroy(),25);case 25:Ue(pe,0);break;case 2:if(le=De(pe),I==null){pe.u(27);break}return _(pe,Xx(I),27);case 27:throw D||le}})}function jk(e,t,n,i,r,l,c,f,y,m){var w,T,I,D,M,L,P,j,V,K,q;return G(function(Q){switch(Q.g){case 1:if(w={},T=0,I=function(){if(e.j.g||r.l)throw new Y(2,9,7001)},D=function(z,X){var W,J,ne,te,ee,ge,fe,le,pe;return G(function(Ee){if(Ee.g==1){for(W=C(z),J=W.next(),ne={};!J.done;ne={jc:void 0},J=W.next())ne.jc=J.value,I(),te=dk(ne.jc,l),ee=ne.jc.i,ge=ne.jc.h,fe=function(Ce){return function(Be){var Le,kt,xt,Kt;return G(function(st){switch(st.g){case 1:if(Le=Ce.jc.g,kt=Le.Yb(!1),!Le.aesKey||kt){st.u(2);break}return _(st,zd(Be,Le.aesKey,Ce.jc.j),3);case 3:Be=st.h;case 2:return xt=hS(Le),_(st,c.addSegments([{data:Be}]),4);case 4:Kt=st.h,I(),w[xt]=Kt[0],T+=Be.byteLength,ce(st)}})}}(ne),le=ne.jc.g,(pe=le.Yb(!1))?hk(r,ne.jc.groupId,pe,ee,ge,fe):r.queue(ne.jc.groupId,te,ee,ge,fe);return _(Ee,yk(r),2)}return I(),!X||r.l?Ee.u(0):(Qx(f,i,y,m),_(Ee,c.updateManifest(n,i),0))})},M=!1,he(Q,2),!ES(f)||!M||Wx(f)){Q.u(4);break}return _(Q,D(t.filter(function(z){return z.h}),!0),5);case 5:return I(),t=t.filter(function(z){return!z.h}),L=w,P=T,w={},T=0,_(Q,Yx(c,n,i,L,P,function(){return Yr(e)}),6);case 6:I();case 4:if(M){Q.u(7);break}return _(Q,D(t,!1),8);case 8:return I(),j=w,V=T,w={},T=0,_(Q,Yx(c,n,i,j,V,function(){return I()}),9);case 9:I();case 7:_e(Q,0);break;case 2:return K=De(Q),q=Object.values(w),_(Q,c.removeSegments(q,function(){}),10);case 10:throw K}})}function Xx(e){var t,n,i,r;return G(function(l){switch(l.g){case 1:return t=new dr,_(l,t.init(),2);case 2:return _(l,Lx(t),3);case 3:return n=l.h,i=new qu("manifest",n.path.Rb,n.path.bb,e),_(l,t.destroy(),4);case 4:return r=new yi,_(l,r.remove(i.toString()),0)}})}function Yx(e,t,n,i,r,l){var c,f,y,m,w,T,I,D,M,L,P;return G(function(j){switch(j.g){case 1:for(c=!1,he(j,2),f=!0,y=C(n.streams),m=y.next();!m.done;m=y.next())for(w=m.value,T=C(w.segments),I=T.next();!I.done;I=T.next())D=I.value,M=D.pendingSegmentRefId?i[D.pendingSegmentRefId]:null,M!=null&&(D.dataKey=M,D.pendingSegmentRefId=void 0),M=D.pendingInitSegmentRefId?i[D.pendingInitSegmentRefId]:null,M!=null&&(D.initSegmentKey=M,D.pendingInitSegmentRefId=void 0),D.pendingSegmentRefId&&(f=!1),D.pendingInitSegmentRefId&&(f=!1);return n.size+=r,f&&(n.isIncomplete=!1),_(j,e.updateManifest(t,n),4);case 4:c=!0,l(),_e(j,0);break;case 2:return L=De(j),_(j,Xx(t),5);case 5:if(c){j.u(6);break}return P=Object.values(i),_(j,e.removeSegments(P,function(){}),6);case 6:throw L}})}function Bk(e,t,n,i){var r,l,c,f,y,m,w,T,I,D,M,L,P,j,V,K,q,Q,z,X,W,J,ne,te,ee,ge,fe,le,pe,Ee;return G(function(Ce){switch(Ce.g){case 1:return r={width:1/0,height:1/0},Cl(e,n.restrictions,r),_(Ce,du(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(l=[],c=n.preferredDecodingAttributes,f=n.preferredVideoCodecs,y=n.preferredAudioCodecs,m=n.preferredTextFormats,cr(e,f,y,c,m),w=C(e.variants),T=w.next();!T.done;T=w.next())I=T.value,l.push(Ar(I));for(D=C(e.textStreams),M=D.next();!M.done;M=D.next())L=M.value,l.push(pu(L));for(P=C(e.imageStreams),j=P.next();!j.done;j=P.next())V=j.value,l.push(Bc(V));return _(Ce,n.offline.trackSelectionCallback(l),3);case 3:for(K=Ce.h,q=e.presentationTimeline.getDuration(),Q=0,z=C(K),X=z.next();!X.done;X=z.next())W=X.value,J=W.bandwidth*q/8,Q+=J;return he(Ce,4),_(Ce,n.offline.downloadSizeCallback(Q),6);case 6:if(ne=Ce.h,!ne)throw new Y(2,9,9014);_e(Ce,5);break;case 4:throw te=De(Ce),te instanceof Y?te:new Y(2,9,9015);case 5:for(ee=new Set,ge=new Set,fe=new Set,le=C(K),pe=le.next();!pe.done;pe=le.next())Ee=pe.value,Ee.type=="variant"&&ee.add(Ee.id),Ee.type=="text"&&ge.add(Ee.id),Ee.type=="image"&&fe.add(Ee.id);e.variants=e.variants.filter(function(Be){return ee.has(Be.id)}),e.textStreams=e.textStreams.filter(function(Be){return ge.has(Be.id)}),e.imageStreams=e.imageStreams.filter(function(Be){return fe.has(Be.id)}),nD(e),ce(Ce)}})}function Vk(e,t,n,i,r,l,c){var f=Nk(n,t,i),y=r.offline.progressCallback;pk(l,function(M,L){f.size=L,y(f,M)},function(M,L){m&&c&&w==L&&xa(e,"cenc",M)});var m=ES(t)&&!Wx(t),w=null;m&&(w=iD.get(e.g.keySystem));for(var T=new Pk,I=C(t.textStreams),D=I.next();!D.done;D=I.next())T.g.set(D.value.id,52);for(I=C(t.imageStreams),D=I.next();!D.done;D=I.next())_k(T,D.value);for(I=C(t.variants),D=I.next();!D.done;D=I.next())Lk(T,D.value);return l=Qk(l,T,t,r),r=l.streams,l=l.yh,(T=e.g)&&c&&(T.initData=[]),{lk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Pd(),streams:r,sessionIds:c?hd(e):[],drmInfo:T,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},yh:l}}function ES(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function Wx(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 Qx(e,t,n,i){if(t.expiration=n.Pd(),n=hd(n),t.sessionIds=i?n:[],ES(e)&&i&&!n.length)throw new Y(2,9,9007)}h.remove=function(e){return AS(this,Hk(this,e))};function Hk(e,t){var n,i,r,l,c,f;return G(function(y){switch(y.g){case 1:if(L0(),n=wS(t),n==null||n.g!="manifest")throw new Y(2,9,9004,t);return i=n,r=new dr,ot(y,2),_(y,r.init(),4);case 4:return _(y,R0(r,i.Rb(),i.bb()),5);case 5:return l=y.h,_(y,l.getManifests([i.key()]),6);case 6:return c=y.h,f=c[0],_(y,Promise.all([Kk(e,f,r),Gk(l,i,f)]),2);case 2:return xe(y),_(y,r.destroy(),8);case 8:Ue(y,0)}})}function Jx(e,t){for(var n=[],i=C(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&r.type=="video"?n.push({contentType:xn(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||r.type!="audio"||n.push({contentType:xn(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function Kk(e,t,n){return G(function(i){return _(i,tD(e.g,e.h.drm,n,t),0)})}function Gk(e,t,n){function i(){}var r=eD(n);return TS(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}h.Ik=function(){return AS(this,Fk(this))};function Fk(e){var t,n,i,r,l,c,f,y,m,w;return G(function(T){switch(T.g){case 1:return L0(),t=e.g,n=e.h.drm,i=new dr,r=!1,ot(T,2),_(T,i.init(),4);case 4:l=[],Sk(i,function(I){return l.push(I)}),c=C(l),f=c.next();case 5:if(f.done){T.u(2);break}return y=f.value,_(T,y.getAll(),8);case 8:return m=T.h,_(T,Fx(n,t,m),9);case 9:return w=T.h,_(T,y.remove(w),10);case 10:w.length!=m.length&&(r=!0),f=c.next(),T.u(5);break;case 2:return xe(T),_(T,i.destroy(),11);case 11:Ue(T,3);break;case 3:return T.return(!r)}})}h.list=function(){return AS(this,qk())};function qk(){var e,t,n;return G(function(i){switch(i.g){case 1:return L0(),e=[],t=new dr,ot(i,2),_(i,t.init(),4);case 4:return n=Promise.resolve(),vk(t,function(r,l){n=n.then(function(){var c;return G(function(f){if(f.g==1)return _(f,l.getAllManifests(),2);c=f.h,c.forEach(function(y,m){y=TS(new qu("manifest",r.Rb,r.bb,m),y),e.push(y)}),ce(f)})})}),_(i,n,2);case 2:return xe(i),_(i,t.destroy(),6);case 6:Ue(i,3);break;case 3:return i.return(e)}})}function zk(e,t,n,i){var r,l,c,f,y;return G(function(m){if(m.g==1)return r=null,l=e.g,c={networkingEngine:l,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(w){r=w},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),Yr(e),_(m,n.start(t,c),2);if(m.g!=3)return f=m.h,Yr(e),y=$x(f),_(m,Promise.all(Ho(y,function(w){return w.createSegmentIndex()})),3);if(Yr(e),r)throw r;return m.return(f)})}function Xk(e,t,n){var i,r,l,c,f,y,m,w,T,I,D,M,L,P,j;return G(function(V){switch(V.g){case 1:return _(V,Zx(e,t),2);case 2:if(i=V.h,i!="text/vtt")throw new Y(1,2,2017,t);return _(V,Wk(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=V.h,l=xs(i),!l)throw new Y(2,2,2014,i);for(c=l(),f={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},y=Ge(r),m=c.parseMedia(y,f,t,[]),w=[],T=C(m),I=T.next(),D={};!I.done;D={Pf:void 0,kd:void 0},I=T.next())D.kd=I.value,D.Pf=null,M=function(K){return function(){return K.Pf==null&&(K.Pf=Vn([t],[K.kd.payload])),K.Pf||[]}}(D),L=new Fe(D.kd.startTime,D.kd.endTime,M,0,null,null,0,0,1/0),D.kd.payload.includes("#xywh")&&(P=D.kd.payload.split("#xywh=")[1].split(","),P.length===4&&L.Hf({height:parseInt(P[3],10),positionX:parseInt(P[0],10),positionY:parseInt(P[1],10),width:parseInt(P[2],10)})),w.push(L);if(j=i,!w.length){V.u(4);break}return _(V,ol(w[0].O()[0],e.g,e.h.manifest.retryParameters),5);case 5:j=V.h;case 4:return V.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new At(w),mimeType:j||"",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([xn(j||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function Yk(e,t,n,i,r,l,c){var f,y,m;return G(function(w){if(w.g==1)return l?w.u(2):_(w,Zx(e,n),3);if(w.g!=2&&(l=w.h),f={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ii(0,t.presentationTimeline.getDuration(),[n]),mimeType:l||"",codecs:c||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:ut,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([xn(l||"",c||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},y=xn(f.mimeType,f.codecs),m=fo(y),!m)throw new Y(2,2,2014,l);return w.return(f)})}function Zx(e,t){var n;return G(function(i){switch(i.g){case 1:return he(i,2),_(i,ol(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,_e(i,3);break;case 2:De(i);case 3:if(n)return i.return(n);throw new Y(1,2,2011,t)}})}function Wk(e,t,n){var i,r,l;return G(function(c){return c.g==1?(i=br,r=bn([e],n),r.method="GET",_(c,t.request(i,r).promise,2)):(l=c.h,c.return(l.data))})}h.hd=function(e,t,n,i){var r=this,l;return G(function(c){return c.g==1?(l=new Ta({pc:r.g,onError:t,rf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),l.configure(n.drm),_(c,Ns(l,e.variants,i),2)):c.g!=3?_(c,pd(l),3):c.return(l)})};function Qk(e,t,n,i){var r=new Map,l=$x(n),c=new Map;l=C(l);for(var f=l.next();!f.done;f=l.next()){f=f.value;var y=Jk(e,t,n,f,i,r);c.set(f.id,y)}for(e=C(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()),yh:Array.from(r.values())}}function Jk(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,y=f===0?i.id:0;return Zk(i,n.presentationTimeline.Gb(),function(m,w){var T=hS(m),I=void 0;if(!l.has(T)){var D=m.endTime-m.startTime;D=zx(t,i.id)*D,D=Ox(e.g,D),l.set(T,new kx(m,D,y,!1,w))}m.Y&&(I=hS(m.Y),l.has(I)||(D=.5*zx(t,i.id),D=Ox(e.g,D),l.set(I,new kx(m.Y,D,y,!0,w)))),c.segments.push({pendingInitSegmentRefId:I,initSegmentKey:I?0:null,startTime:m.startTime,endTime:m.endTime,appendWindowStart:m.appendWindowStart,appendWindowEnd:m.appendWindowEnd,timestampOffset:m.timestampOffset,tilesLayout:m.tilesLayout,pendingSegmentRefId:T,dataKey:0,mimeType:m.mimeType,codecs:m.codecs,thumbnailSprite:m.thumbnailSprite}),f!==0&&(y=(y+1)%f)}),c}function Zk(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 Yr(e){if(e.j.g)throw new Y(2,9,7001)}function L0(){if(!xS())throw new Y(2,9,9e3)}function AS(e,t){return G(function(n){return n.g==1?(e.i.push(t),ot(n,2),_(n,t,4)):n.g!=2?n.return(n.h):(xe(n),Sr(e.i,t),Ue(n,0))})}function $k(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Sr(e.i,n)})}function eD(e){var t=new Set;e=C(e.streams);for(var n=e.next();!n.done;n=e.next()){n=C(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 tD(e,t,n,i){var r,l,c;return G(function(f){return f.g==1?i.drmInfo?(r=wk(n),l=i.sessionIds.map(function(y){return{sessionId:y,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:Jx(i,!1),videoCapabilities:Jx(i,!0)}}),_(f,Fx(t,e,l),2)):f.return():f.g!=3?(c=f.h,_(f,r.remove(c),3)):_(f,r.add(l.filter(function(y){return!c.includes(y.sessionId)})),0)})}function $x(e){for(var t=new Set,n=C(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=C(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(e=C(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function nD(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=C(t),i=n.next();!i.done;i=n.next()){i=C(t);for(var r=i.next();!r.done;r=i.next());}for(t=C(e),n=t.next();!n.done;n=t.next())for(n=C(e),i=n.next();!i.done;i=n.next());}Pe("shaka.offline.Storage",yi),yi.deleteAll=function(){var e;return G(function(t){return t.g==1?(e=new dr,ot(t,2),_(t,Tk(e),2)):t.g!=5?(xe(t),_(t,e.destroy(),5)):Ue(t,0)})},yi.prototype.list=yi.prototype.list,yi.prototype.removeEmeSessions=yi.prototype.Ik,yi.prototype.remove=yi.prototype.remove,yi.prototype.store=yi.prototype.store,yi.prototype.getNetworkingEngine=yi.prototype.Pb,yi.prototype.getConfiguration=yi.prototype.getConfiguration,yi.prototype.configure=yi.prototype.configure,yi.prototype.destroy=yi.prototype.destroy,yi.support=xS;var iD=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");bt("offline",xS);function wi(){}function Ki(e,t){for(e={priority:t||0,callback:e},t=0;t<Xy.length;t++)if(Xy[t].priority<e.priority){Xy.splice(t,0,e);return}Xy.push(e)}Pe("shaka.polyfill",wi),wi.register=Ki,wi.installAll=function(){for(var e=C(Xy),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Ct("Error installing polyfill!",n)}}};var Xy=[];function eE(){}function tE(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=C(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())rD(t.value)}function rD(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)}})}wi.Aria=eE,eE.install=tE,Ki(tE);function _0(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}_0.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=C(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=C(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},_0.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function nE(e){return e.startsWith("com.apple")?"cbcs":e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("org.w3")||e.startsWith("com.huawei")?"cenc":(Ct("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function iE(e){if(!e)return!1;e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function CS(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&yt().$c())}function rE(){}var Yy;function oE(){yt().If()&&!Yy&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(Yy=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=oD,navigator.emeEncryptionSchemePolyfilled=!0)}function oD(e,t){var n=this,i;return G(function(r){return r.g==1?_(r,Yy.call(n,e,t),2):(i=r.h,iE(i)?(navigator.requestMediaKeySystemAccess=Yy,r.return(i)):(navigator.requestMediaKeySystemAccess=lE,r.return(lE.call(n,e,t))))})}function lE(e,t){var n=this,i,r,l,c,f,y,m,w,T,I,D,M;return G(function(L){if(L.g==1){for(i=nE(e),r=[],l=C(t),c=l.next();!c.done;c=l.next())f=c.value,y=uE(f.videoCapabilities,i),m=uE(f.audioCapabilities,i),f.videoCapabilities&&f.videoCapabilities.length&&!y.length||f.audioCapabilities&&f.audioCapabilities.length&&!m.length||(w=Object.assign({},f),w.videoCapabilities=y,w.audioCapabilities=m,r.push(w));if(!r.length)throw T=Error("Unsupported keySystem or supportedConfigurations."),T.name="NotSupportedError",T.code=DOMException.NOT_SUPPORTED_ERR,T;return _(L,Yy.call(n,e,r),2)}return I=L.h,M=D=null,r[0]&&(r[0].videoCapabilities&&(D=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(M=r[0].audioCapabilities[0].encryptionScheme)),L.return(new _0(I,D,M))})}function uE(e,t){return e&&e.filter(function(n){return CS(n.encryptionScheme,t)})}wi.EmeEncryptionScheme=rE,rE.install=oE,Ki(oE);function aE(){}function sE(){if(x.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",Ap),document.addEventListener("webkitfullscreenerror",Ap),document.addEventListener("mozfullscreenchange",Ap),document.addEventListener("mozfullscreenerror",Ap),document.addEventListener("MSFullscreenChange",Ap),document.addEventListener("MSFullscreenError",Ap)}}function Ap(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)}wi.Fullscreen=aE,aE.install=sE,Ki(sE);function cE(){}var Wy;function fE(){yt().If()&&!Wy&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Wy=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=lD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function lD(e){var t=this,n,i;return G(function(r){switch(r.g){case 1:return _(r,Wy.call(t,e),2);case 2:if(n=r.h,!n.supported||!e.keySystemConfiguration)return r.return(n);if(i=n.keySystemAccess,iE(i))return navigator.mediaCapabilities.decodingInfo=Wy,r.return(n);if(navigator.mediaCapabilities.decodingInfo=dE,i){r.u(3);break}return _(r,pE(e),4);case 4:return n.keySystemAccess=r.h,r.return(n);case 3:return r.return(dE.call(t,e))}})}function dE(e){var t=this,n,i,r,l,c,f,y;return G(function(m){switch(m.g){case 1:return i=n=null,!e.keySystemConfiguration||(r=e.keySystemConfiguration,l=r.keySystem,i=r.audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,c=nE(l),f={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},CS(i,c)&&CS(n,c))?_(m,Wy.call(t,e),2):m.return(f);case 2:if(y=m.h,y.keySystemAccess){y.keySystemAccess=new _0(y.keySystemAccess,n,i),m.u(3);break}if(!e.keySystemConfiguration){m.u(3);break}return _(m,pE(e),5);case 5:y.keySystemAccess=m.h;case 3:return m.return(y)}})}function pE(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,_(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}wi.MCapEncryptionScheme=cE,cE.install=fE,Ki(fE,-2);function U0(){}function hE(){yt().dc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),U0.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=uD)}function uD(e){var t,n,i,r,l,c,f,y,m,w,T;return G(function(I){switch(I.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},yt(),n=e.video,i=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(r=n.contentType,l=ku().canPlayType(r)!="",!l)||i&&(c=i.contentType,f=ku().canPlayType(c)!="",!f))return I.return(t)}else return I.return(t);I.u(2);break}if(!Fu())return I.return(t);if(!n){I.u(3);break}return _(I,aD(n),4);case 4:if(y=I.h,!y)return I.return(t);case 3:if(i){var D=yt().La(),M=i.contentType;if(D==="CAST"&&i.spatialRendering&&(M+="; spatialRendering=true"),m=ai(M),!m)return I.return(t)}case 2:return e.keySystemConfiguration?(w=e.keySystemConfiguration,_(I,sD(n,i,w),6)):(t.supported=!0,I.return(t));case 6:(T=I.h)&&(t.supported=!0,t.keySystemAccess=T);case 5:return I.return(t)}})}function aD(e){var t,n,i;return G(function(r){return r.g==1?(t=yt(),n=t.La(),n!=="CAST"?r.u(2):_(r,cD(e),3)):r.g!=2?(i=r.h,r.return(i)):r.return(ai(e.contentType))})}function sD(e,t,n){var i,r,l,c,f,y,m,w,T,I,D;return G(function(M){switch(M.g){case 1:if(i=[],r=[],n.audio&&(l={robustness:n.audio.robustness||"",contentType:t.contentType},yt().li()&&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),y=e?e.contentType:"",m=t?t.contentType:"",w=Mi(y)+";"+xr(y),T=Mi(m)+";"+xr(m),I=n.keySystem,D=null,he(M,2),ma.has(w+"#"+T+"#"+I)){D=ma.get(w+"#"+T+"#"+I)||null,M.u(4);break}return _(M,navigator.requestMediaKeySystemAccess(n.keySystem,[f]),5);case 5:D=M.h,ma.set(w+"#"+T+"#"+I,D);case 4:_e(M,3);break;case 2:De(M);case 3:return M.return(D)}})}function cD(e){var t,n,i,r,l;return G(function(c){if(c.g==1){if(!(x.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return c.return(ai(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=fD,l.has(t)?(r=l.get(t),c.u(2)):_(c,cast.__platform__.canDisplayType(t),3)}return c.g!=2&&(r=c.h,l.set(t,r)),c.return(r)})}wi.MediaCapabilities=U0,U0.install=hE,U0.originalMcap=null;var fD=new Map;Ki(hE,-1);function yE(){}function gE(){var e=yt(),t=e.Da()==="WEBKIT"?e.xa():null;for((x.MediaSource||x.ManagedMediaSource)&&t&&x.MediaSource&&(12>=t?(mE(),dD()):15>=t&&mE()),e=C(e.xi()),t=e.next();!t.done;t=e.next())hD(t.value);(x.MediaSource||x.ManagedMediaSource)&&pD(),x.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&yD()}function mE(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,vt.apply(0,arguments));return t.abort=function(){},t}}function dD(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function pD(){if(x.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return Ts(n)!="mp2t"&&e(n)}}if(x.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);x.ManagedMediaSource.isTypeSupported=function(n){return Ts(n)!="mp2t"&&t(n)}}}function hD(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(i){return xr(i)!=e&&t(i)},x.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);x.ManagedMediaSource.isTypeSupported=function(i){return xr(i)!=e&&n(i)}}}function yD(){var e=MediaSource.isTypeSupported;yt().Vi()&&(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)})}wi.MediaSource=yE,yE.install=gE,Ki(gE);function vE(){}function SE(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?gD():x.orientation!=null&&mD())}function gD(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function mD(){function e(){switch(x.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 j0;screen.orientation=t,e(),x.addEventListener("orientationchange",function(){e();var n=new ke("change");t.dispatchEvent(n)})}wi.Orientation=vE,vE.install=SE;function j0(){It.call(this),this.type="",this.angle=0}$e(j0,It),j0.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))},j0.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Ki(SE);function bS(){}var IS,kS,DS,OS,RS,MS;function wE(e){x.HTMLVideoElement&&x.WebKitMediaKeys&&x.shakaMediaKeysPolyfill!=PS&&(e!==void 0&&e&&(IS=!0,kS=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),DS=HTMLMediaElement.prototype.setMediaKeys,OS=x.MediaKeys,RS=x.MediaKeySystemAccess,MS=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=SD,x.MediaKeys=Qy,x.MediaKeySystemAccess=B0,navigator.requestMediaKeySystemAccess=vD,x.shakaMediaKeysPolyfill=PS,yu.clear(),ma.clear())}function vD(e,t){try{var n=new B0(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function SD(e){var t=this.mediaKeys;return t&&t!=e&&TE(t,null),delete this.mediaKeys,(this.mediaKeys=e)?TE(e,this):Promise.resolve()}function wD(e){if(e=Ge(e.initData),Zn(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=rr(e.subarray(4),!0),e=Br(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=Fi(e),this.dispatchEvent(t)}wi.PatchedMediaKeysApple=bS,bS.uninstall=function(){x.shakaMediaKeysPolyfill==PS&&IS&&(IS=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",kS),HTMLMediaElement.prototype.setMediaKeys=DS,x.MediaKeys=OS,x.MediaKeySystemAccess=RS,navigator.requestMediaKeySystemAccess=MS,kS=MS=DS=RS=OS=null,x.shakaMediaKeysPolyfill="",yu.clear(),ma.clear())},bS.install=wE;function B0(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=C(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=C(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=C(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}B0.prototype.createMediaKeys=function(){var e=new Qy(this.keySystem);return Promise.resolve(e)},B0.prototype.getConfiguration=function(){return this.g};function Qy(e){this.h=new WebKitMediaKeys(e),this.g=new Mt}Qy.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new NS(this.h)},Qy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function TE(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",wD);try{return on(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}Qy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function NS(e){It.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Mt,this.sessionId="",this.expiration=NaN,this.closed=new ct,this.keyStatuses=new xE}$e(NS,It),h=NS.prototype,h.generateRequest=function(e,t){var n=this;this.h=new ct;try{var i=this.l.createSession("video/mp4",Ge(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.Cc()==null?"license-request":"license-renewal").set("message",Fi(r.message)),r=new ke("message",r),n.dispatchEvent(r)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(V0(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:V0(n,"output-not-allowed");break;default:V0(n,"internal-error")}}),V0(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},h.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},h.update=function(e){this.g=new ct;try{this.i.update(Ge(e))}catch(t){this.g.reject(t)}return this.g},h.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},h.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function V0(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new ke("keystatuseschange"),e.dispatchEvent(t)}function xE(){this.size=0,this.g=void 0}h=xE.prototype,h.Cc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,ga.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=ga.value();return!!(this.g&&gr(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var PS="apple";Ki(function(){x.HTMLVideoElement&&x.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||wE())});function EE(){}function AE(){if(x.MediaKeys){var e=yt();MediaKeys.prototype.setServerCertificate&&e.je()||(MediaKeys.prototype.setServerCertificate=TD)}}function TD(){return Promise.resolve(!1)}wi.PatchedMediaKeysCert=EE,EE.install=AE,Ki(AE);function CE(){}function bE(){if(!(!x.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)BS="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xD,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ED,x.MediaKeys=Jy,x.MediaKeySystemAccess=H0,x.shakaMediaKeysPolyfill=AD}}function LS(e){var t=BS;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function xD(e,t){try{var n=new H0(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function ED(e){var t=this.mediaKeys;return t&&t!=e&&IE(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&IE(e,this),Promise.resolve()}wi.PatchedMediaKeysWebkit=CE,CE.install=bE;function H0(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=C(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 y=C(l.audioCapabilities),m=y.next();!m.done;m=y.next())m=m.value,m.contentType&&(f=!0,r.canPlayType(m.contentType.split(";")[0],this.g)&&(c.audioCapabilities.push(m),i=!0));if(l.videoCapabilities)for(y=C(l.videoCapabilities),m=y.next();!m.done;m=y.next())m=m.value,m.contentType&&(f=!0,r.canPlayType(m.contentType,this.g)&&(c.videoCapabilities.push(m),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}H0.prototype.createMediaKeys=function(){var e=new Jy(this.g);return Promise.resolve(e)},H0.prototype.getConfiguration=function(){return this.h};function Jy(e){this.l=e,this.h=null,this.g=new Mt,this.i=[],this.j=new Map}function IE(e,t){e.h=t,e.g.Ra();var n=BS;t&&(e.g.D(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=Fi(i.initData),e.h.dispatchEvent(r)}),e.g.D(t,n+"keymessage",function(i){var r=_S(e,i.sessionId);r&&(i=new Map().set("messageType",r.keyStatuses.Cc()==null?"licenserequest":"licenserenewal").set("message",i.message),i=new ke("message",i),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}),e.g.D(t,n+"keyadded",function(i){(i=_S(e,i.sessionId))&&i.ready()}),e.g.D(t,n+"keyerror",function(i){var r=_S(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?K0(r,"output-restricted"):l==1?K0(r,"expired"):K0(r,"internal-error"))}}))}Jy.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 US(t,this.l,e),this.i.push(e),e},Jy.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Jy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function _S(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 US(e,t,n){It.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 ct,this.keyStatuses=new DE}$e(US,It),h=US.prototype,h.ready=function(){K0(this,"usable"),this.g&&this.g.resolve(),this.g=null};function kE(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=Ge(Br("LOAD_SESSION|"+n));else{var r=Br("PERSISTENT|");i=an(r,t)}else i=Ge(t)}catch(c){return Promise.reject(c)}e.h=new ct;var l=LS("generateKeyRequest");try{e.j[l](e.i,i)}catch(c){if(c.name!="InvalidStateError")return e.h=null,Promise.reject(c);new dt(function(){try{e.j[l](e.i,i)}catch(f){e.h.reject(f),e.h=null}}).ia(.01)}return e.h}function jS(e,t,n){if(e.g)e.g.then(function(){return jS(e,t,n)}).catch(function(){return jS(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var i=ln(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=or(r.keys[0].k),r=or(r.keys[0].kid)}else i=Ge(n),r=null;var l=LS("addKey");try{e.j[l](e.i,i,r,e.sessionId)}catch(c){e.g.reject(c),e.g=null}}}function K0(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new ke("keystatuseschange"),e.dispatchEvent(t)}h.generateRequest=function(e,t){return kE(this,t,null)},h.load=function(e){return this.l=="persistent-license"?kE(this,null,e):Promise.reject(Error("Not a persistent session."))},h.update=function(e){var t=new ct;return jS(this,t,e),t},h.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=LS("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},h.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function DE(){this.size=0,this.g=void 0}h=DE.prototype,h.Cc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,ga.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=ga.value();return!!(this.g&&gr(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var BS="",AD="webkit";Ki(bE);function OE(){}function RE(){if(x.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=bD,Object.defineProperty(e,"disablePictureInPicture",{get:kD,set:DD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ID,document.addEventListener("webkitpresentationmodechanged",CD,!0))}}function CD(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 bD(){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 ID(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function kD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function DD(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}wi.PiPWebkit=OE,OE.install=RE,Ki(RE);function ME(){}function NE(){x.crypto&&("randomUUID"in x.crypto||(x.crypto.randomUUID=OD))}function OD(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}wi.RandomUUID=ME,ME.install=NE,Ki(NE);function PE(){}function LE(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:RD})}function RD(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}wi.Symbol=PE,PE.install=LE,Ki(LE);function _E(){}function UE(){for(var e=C([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())t=t.value,t.prototype.indexOf||(t.prototype.indexOf=MD),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=ND),t.prototype.includes||(t.prototype.includes=PD)}function MD(e,t){return Array.prototype.indexOf.call(this,e,t)}function ND(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function PD(e,t){return this.indexOf(e,t)!==-1}wi.TypedArray=_E,_E.install=UE,Ki(UE);function jE(){}function BE(){if(x.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}wi.VideoPlayPromise=jE,jE.install=BE,Ki(BE);function VE(){}function HE(){if(x.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||typeof ku().webkitDroppedFrameCount=="number")&&(e.getVideoPlaybackQuality=LD)}}function LD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}wi.VideoPlaybackQuality=VE,VE.install=HE,Ki(HE);function KE(){}function GE(){if(!x.VTTCue&&x.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=VS;else if(t==6)e=_D;else{try{var n=!!VS(1,2,"")}catch{n=!1}n&&(e=VS)}e&&(x.VTTCue=function(i,r,l){return e(i,r,l)})}}function VS(e,t,n){return new x.TextTrackCue(e,t,n)}function _D(e,t,n){return new x.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}wi.VTTCue=KE,KE.install=GE,Ki(GE);function li(e){It.call(this),this.h=e,this.l=null,this.g=[],this.i=-1,this.j=null,this.m=new Mt}$e(li,It),h=li.prototype,h.destroy=function(){var e=this;return G(function(t){if(t.g==1)return _(t,e.removeAllItems(),2);e.h=null,e.m&&(e.m.release(),e.m=null),It.prototype.release.call(e),ce(t)})},h.configure=function(e){this.l=e},h.getConfiguration=function(){return this.l},h.getCurrentItem=function(){return this.g.length&&0<=this.i&&this.i<this.g.length?this.g[this.i]:null},h.getCurrentItemIndex=function(){return this.i},h.getItems=function(){return this.g.slice()},h.insertItems=function(e){this.g.push.apply(this.g,$(e)),this.dispatchEvent(new ke("itemsinserted"))},h.removeAllItems=function(){var e=this;return G(function(t){switch(t.g){case 1:if(e.m.Ra(),!(e.g.length&&0<=e.i)){t.u(2);break}return _(t,e.h.vc(),2);case 2:if(!e.j){t.u(4);break}if(e.j.xf.o){t.u(5);break}return _(t,e.j.xf.destroy(),5);case 5:e.j=null;case 4:e.g=[],e.i=-1,e.dispatchEvent(new ke("itemsremoved")),ce(t)}})},h.playItem=function(e){var t=this,n,i,r,l,c,f,y,m,w,T,I,D,M,L;return G(function(P){if(P.g==1){if(t.m.Ra(),!t.g.length||e>=t.g.length)throw new Y(2,7,7007);return n=t.g[e],t.i!=e&&(t.i=e,t.dispatchEvent(new ke("currentitemchanged"))),i=t.h.h,r=t.l?t.l.preloadNextUrlWindow:0,0<r&&(l=!1,t.m.D(i,"timeupdate",function(){var j,V,K,q;return G(function(Q){switch(Q.g){case 1:if(t.j||1>=t.g.length||l||t.h.V()||!i.duration)return Q.return();if(j=t.h.Sa().end-i.currentTime,isNaN(j)){Q.u(0);break}if(!(j<=r)){Q.u(0);break}if(V=t.l&&t.l.repeatMode,K=null,t.i+1<t.g.length?K=t.g[t.i+1]:V==1&&(K=t.g[0]),!K){Q.u(0);break}return l=!0,q=null,he(Q,5),_(Q,t.h.preload(K.manifestUri,K.startTime,K.mimeType,K.config),7);case 7:q=Q.h,_e(Q,6);break;case 5:De(Q),q=null;case 6:t.j={item:K,xf:q},l=!1,ce(Q)}})})),t.m.D(t.h,"complete",function(){var j=t.l&&t.l.repeatMode,V=!1;if(j==2)V=!0;else{var K=t.i+1;K<t.g.length?t.playItem(K):j==1&&(t.g.length==1?V=!0:t.playItem(0))}V&&(i.paused?(i.currentTime=t.h.Sa().start,i.play()):t.m.D(i,"paused",function(){i.currentTime=t.h.Sa().start,i.play()}))}),n.config&&(t.h.Ci(),t.h.configure(n.config)),c=n.manifestUri,t.j&&t.j.item==n&&t.j.xf&&(c=t.j.xf),_(P,t.h.load(c,n.startTime,n.mimeType),2)}if(t.j=null,n.extraText)for(f=C(n.extraText),y=f.next();!y.done;y=f.next())m=y.value,m.mime?t.h.Hd(m.uri,m.language,m.kind,m.mime,m.codecs):t.h.Hd(m.uri,m.language,m.kind);if(n.extraThumbnail)for(w=C(n.extraThumbnail),T=w.next();!T.done;T=w.next())I=T.value,t.h.He(I);if(n.extraChapter)for(D=C(n.extraChapter),M=D.next();!M.done;M=D.next())L=M.value,t.h.Ge(L.uri,L.language,L.mime);ce(P)})},Pe("shaka.queue.QueueManager",li),li.prototype.playItem=li.prototype.playItem,li.prototype.removeAllItems=li.prototype.removeAllItems,li.prototype.insertItems=li.prototype.insertItems,li.prototype.getItems=li.prototype.getItems,li.prototype.getCurrentItemIndex=li.prototype.getCurrentItemIndex,li.prototype.getCurrentItem=li.prototype.getCurrentItem,li.prototype.getConfiguration=li.prototype.getConfiguration,li.prototype.configure=li.prototype.configure,li.prototype.destroy=li.prototype.destroy,Xm=function(e){return new li(e)};function Wr(){}Wr.prototype.parseInit=function(){},Wr.prototype.setSequenceMode=function(){},Wr.prototype.setManifestType=function(){},Wr.prototype.parseMedia=function(e,t){var n=null,i=[];e=ln(e).split(/\r?\n/),e=C(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=UD.exec(r))){var l=jD.exec(r[1]);l=60*parseInt(l[1],10)+parseFloat(l[2].replace(",",".")),r=new Zt(l,t.segmentEnd?t.segmentEnd:l+2,r[2]),n&&(n.endTime=l,i.push(n)),n=r}return n&&i.push(n),i},Pe("shaka.text.LrcTextParser",Wr),Wr.prototype.parseMedia=Wr.prototype.parseMedia,Wr.prototype.setManifestType=Wr.prototype.setManifestType,Wr.prototype.setSequenceMode=Wr.prototype.setSequenceMode,Wr.prototype.parseInit=Wr.prototype.parseInit;var UD=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,jD=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Hn("application/x-subtitle-lrc",function(){return new Wr});function _r(){}_r.prototype.parseInit=function(){},_r.prototype.setSequenceMode=function(){},_r.prototype.setManifestType=function(){},_r.prototype.parseMedia=function(e,t,n,i){var r=ln(e);if(e=[],r=="")return e;var l=uo(r,"tt",!0);if(!l)throw new Y(2,2,2005,"Failed to parse TTML.");if(r=ao(l,"body")[0],!r)return[];var c=No(l,Zy,"frameRate"),f=No(l,Zy,"subFrameRate"),y=No(l,Zy,"frameRateMultiplier"),m=No(l,Zy,"tickRate"),w=No(l,Zy,"cellResolution"),T=l.attributes["xml:space"]||"default",I=No(l,q0,"extent");if(T!="default"&&T!="preserve")throw new Y(2,2,2005,"Invalid xml:space value: "+T);T=T=="default",c=new GD(c,f,y,m),w=KD(w),f=ao(l,"metadata")[0],f=(f?f.children:[]).filter(function(L){return L!=`
`}),y=ao(l,"style"),l=ao(l,"region"),m=[];for(var D=C(l),M=D.next();!M.done;M=D.next())(M=BD(M.value,y,I))&&m.push(M);if(Rt(r,"p").length)throw new Y(2,2,2001,"<p> can only be inside <div> in TTML");for(I=C(Rt(r,"div")),D=I.next();!D.done;D=I.next())if(Rt(D.value,"span").length)throw new Y(2,2,2001,"<span> can only be inside <p> in TTML");return(t=FE(r,t,c,f,y,l,m,T,w,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function FE(e,t,n,i,r,l,c,f,y,m,w,T,I){var D=m;if(fs(e)){if(!w)return null;var M={tagName:"span",children:[Cn(e)],attributes:{},parent:null}}else M=e;for(var L=null,P=C(eA),j=P.next();!j.done&&!(L=F0(M,"backgroundImage",i,"#",j.value)[0]);j=P.next());P=null,j=No(M,eA,"backgroundImage");var V=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(j&&V.test(j)){if(P=parseInt(j.split(":").pop(),10)-1,P>=I.length)return null;P=I[P]}else T&&j&&!j.startsWith("#")&&(V=new dn(T),j=new dn(j),(j=V.resolve(j).toString())&&(P=j));if((e.tagName=="p"||L||P)&&(w=!0),e=w,j=(M.attributes["xml:space"]||(f?"default":"preserve"))=="default",V=M.children.every(fs),f=[],!V)for(var K=C(M.children),q=K.next();!q.done;q=K.next())(q=FE(q.value,t,n,i,r,l,c,j,y,M,w,T,I))&&f.push(q);if(i=m!=null,T=Cn(M),T=M.children.length&&T&&/\S/.test(T),K=M.attributes.begin||M.attributes.end||M.attributes.dur,!(K||T||M.tagName=="br"||f.length!=0||i&&!j))return null;for(I=XE(M,n),T=I.start,I=I.end;D&&D.tagName&&D.tagName!="tt";)I=HD(D,n,T,I),T=I.start,I=I.end,D=D.parent;if(T==null&&(T=0),T+=t.periodStart,I=I==null?1/0:I+t.periodStart,T=Math.max(T,t.segmentStart),I=Math.min(I,t.segmentEnd),!K&&0<f.length)for(T=1/0,I=0,t=C(f),n=t.next();!n.done;n=t.next())n=n.value,T=Math.min(T,n.startTime),I=Math.max(I,n.endTime);if(M.tagName=="br")return r=new Zt(T,I,""),r.lineBreak=!0,r;if(t="",V&&(t=Oi(Cn(M)||""),j&&(t=t.replace(/\s+/g," "))),t=new Zt(T,I,t),t.nestedCues=f,w||(t.isContainer=!0),y&&(t.cellResolution=y),y=F0(M,"region",l,"")[0],M.attributes.region&&y&&y.attributes["xml:id"]){var Q=y.attributes["xml:id"];t.region=c.filter(function(z){return z.id==Q})[0]}return c=y,m&&i&&!M.attributes.region&&!M.attributes.style&&(c=F0(m,"region",l,"")[0]),VD(t,M,c,L,P,r,e,f.length==0),t}function BD(e,t,n){var i=new Kr,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=qS.exec(n)||zS.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var l,c=G0(e,t,"extent");if(c){var f=(l=qS.exec(c))||zS.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?$n:0,i.heightUnits=l||r!=null?$n:0)}return(e=G0(e,t,"origin"))&&(f=(l=qS.exec(e))||zS.exec(e),f!=null&&(i.viewportAnchorX=Number(f[1]),i.viewportAnchorY=Number(f[2]),l?c||(i.width=100-i.viewportAnchorX,i.widthUnits=$n,i.height=100-i.viewportAnchorY,i.heightUnits=$n):(r!=null&&(i.viewportAnchorY=100*i.viewportAnchorY/r),n!=null&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=l||n!=null?$n:0)),i}function HS(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 VD(e,t,n,i,r,l,c,f){if(c=c||f,ki(t,n,l,"direction",c)=="rtl"&&(e.direction="rtl"),f=ki(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=Mc),(f=ki(t,n,l,"textAlign",!0))?(e.positionAlign=zD.get(f),e.lineAlign=qD.get(f),e.textAlign=td[f.toUpperCase()]):e.textAlign=co,(f=ki(t,n,l,"displayAlign",!0))&&(e.displayAlign=bg[f.toUpperCase()]),(f=ki(t,n,l,"color",c))&&(e.color=HS(f)),(f=ki(t,n,l,"backgroundColor",c))&&(e.backgroundColor=HS(f)),(f=ki(t,n,l,"border",c))&&(e.border=f),f=ki(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(y){return y!="default"}).join(",")}switch((f=ki(t,n,l,"fontWeight",c))&&f=="bold"&&(e.fontWeight=sa),f=ki(t,n,l,"wrapOption",c),e.wrapLine=!(f&&f=="noWrap"),(f=ki(t,n,l,"lineHeight",c))&&f.match(Cp)&&(e.lineHeight=f),(f=ki(t,n,l,"fontSize",c))&&(f.match(Cp)||f.match(FD))&&(e.fontSize=f),(f=ki(t,n,l,"fontStyle",c))&&(e.fontStyle=id[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=ki(t,n,l,"textOutline",c))&&(i=i.split(" "),i[0].match(Cp)?e.textStrokeColor=e.color:(e.textStrokeColor=HS(i[0]),i.shift()),i[0]&&i[0].match(Cp)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=ki(t,n,l,"letterSpacing",c))&&i.match(Cp)&&(e.letterSpacing=i),(i=ki(t,n,l,"linePadding",c))&&i.match(Cp)&&(e.linePadding=i),(i=ki(t,n,l,"opacity",c))&&(e.opacity=parseFloat(i)),(i=G0(n,l,"textDecoration"))&&qE(e,i),(i=KS(t,l,"textDecoration"))&&qE(e,i),(i=ki(t,n,l,"textCombine",c))&&(e.textCombineUpright=i),ki(t,n,l,"ruby",c)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function qE(e,t){t=C(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Lo)||e.textDecoration.push(Lo);break;case"noUnderline":e.textDecoration.includes(Lo)&&Sr(e.textDecoration,Lo);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Sr(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Sr(e.textDecoration,"overline")}}function ki(e,t,n,i,r){return r=r===void 0?!0:r,(e=KS(e,n,i))?e:r?G0(t,n,i):null}function G0(e,t,n){if(!e)return null;var i=No(e,q0,n);return i||zE(e,t,n)}function KS(e,t,n){var i=No(e,q0,n);return i||zE(e,t,n)}function zE(e,t,n){e=F0(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var l=ml(e[r],"urn:ebu:tt:style",n);l||(l=No(e[r],q0,n)),l||(l=KS(e[r],t,n)),l&&(i=l)}return i}function F0(e,t,n,i,r){var l=[];if(!e||1>n.length)return l;var c=e;for(e=null;!e&&!(e=r?ml(c,r,t):c.attributes[t])&&(c=c.parent,c););if(t=e){for(t=C(t.split(" ")),r=t.next();!r.done;r=t.next())for(r=r.value,e=C(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 HD(e,t,n,i){return e=XE(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 XE(e,t){var n=GS(e.attributes.begin,t),i=GS(e.attributes.end,t);return e=GS(e.attributes.dur,t),i==null&&e!=null&&(i=n+e),{start:n,end:i}}function GS(e,t){var n=null;if(YE.test(e)){e=YE.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(WE.test(e))n=FS(WE,e);else if(QE.test(e))n=FS(QE,e);else if(JE.test(e))e=JE.exec(e),n=Number(e[1])/t.frameRate;else if(ZE.test(e))e=ZE.exec(e),n=Number(e[1])/t.g;else if($E.test(e))n=FS($E,e);else if(e)throw new Y(2,2,2001,"Could not parse cue time range in TTML");return n}function FS(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 KD(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{Lc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Pe("shaka.text.TtmlTextParser",_r),_r.prototype.parseMedia=_r.prototype.parseMedia,_r.prototype.setManifestType=_r.prototype.setManifestType,_r.prototype.setSequenceMode=_r.prototype.setSequenceMode,_r.prototype.parseInit=_r.prototype.parseInit;function GD(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 qS=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,FD=/^(\d{1,4}(?:\.\d+)?|100)%$/,Cp=/^(\d+px|\d+em|\d*\.?\d+c)$/,zS=/^(\d+)px (\d+)px$/,YE=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,WE=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,QE=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,JE=/^(\d*(?:\.\d*)?)f$/,ZE=/^(\d*(?:\.\d*)?)t$/,$E=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),qD=new Map().set("left",su).set("center","center").set("right","end").set("start",su).set("end","end"),zD=new Map().set("left","line-left").set("center","center").set("right","line-right"),Zy=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],q0=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],eA=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Hn("application/ttml+xml",function(){return new _r});function Yn(){this.g=new _r}Yn.prototype.parseInit=function(e){var t=!1;if(new Ut().box("moov",nt).box("trak",nt).box("mdia",nt).box("minf",nt).box("stbl",nt).R("stsd",Gr).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new Y(2,2,2007)},Yn.prototype.setSequenceMode=function(){},Yn.prototype.setManifestType=function(){},Yn.prototype.parseMedia=function(e,t,n){var i=[],r=null,l=[],c=new Map,f=[];if(new Ut().box("moof",nt).box("traf",nt).R("tfhd",function(j){r=Us(j.reader,j.flags).Nd}).R("trun",function(j){j=Td(j.reader,j.version,j.flags),j=C(j.gh);for(var V=j.next();!V.done;V=j.next())f.push(V.value.sampleSize||r||0)}).R("subs",function(j){for(var V=j.reader,K=V.T(),q=-1,Q=0;Q<K;Q++){var z=V.T();q+=z,z=V.Ba();for(var X=[],W=0;W<z;W++)j.version==1?X.push(V.T()):X.push(V.Ba()),V.X(),V.X(),V.T();c.set(q,X)}}).box("mdat",Tu(function(j){l.push(j)})).parse(e,!1),l.length==0)throw new Y(2,2,2007);for(var y=an.apply(Bn,$(l)),m=0,w=0;w<f.length;w++){var T=Ge(y,m,f[w]);m+=f[w];var I=c.get(w);if(I&&I.length){T=Ge(T,0,I[0]);for(var D=[],M=I[0],L=1;L<I.length;L++){var P=Ge(e,M,I[L]);P=Vr(P),D.push("data:image/png;base64,"+P),M+=I[L]}i=i.concat(this.g.parseMedia(T,t,n,D))}else i=i.concat(this.g.parseMedia(T,t,n,[]))}return i},Pe("shaka.text.Mp4TtmlParser",Yn),Yn.prototype.parseMedia=Yn.prototype.parseMedia,Yn.prototype.setManifestType=Yn.prototype.setManifestType,Yn.prototype.setSequenceMode=Yn.prototype.setSequenceMode,Yn.prototype.parseInit=Yn.prototype.parseInit,Hn('application/mp4; codecs="stpp"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Yn}),Hn('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Yn});function er(){this.g="UNKNOWN"}er.prototype.parseInit=function(){},er.prototype.setSequenceMode=function(){},er.prototype.setManifestType=function(e){this.g=e},er.prototype.parseMedia=function(e,t){e=ln(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=oa(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=C(n[0].split(`
`)),r=i.next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new lu(r);var l=new Kr;gl(r),Ro(r);for(var c=gl(r);c;){var f=l,y=c;(c=/^id=(.*)$/.exec(y))?f.id=c[1]:(c=/^width=(\d{1,2}|100)%$/.exec(y))?f.width=Number(c[1]):(c=/^lines=(\d+)$/.exec(y))?(f.height=Number(c[1]),f.heightUnits=2):(c=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(y))?(f.regionAnchorX=Number(c[1]),f.regionAnchorY=Number(c[2])):(c=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(y))?(f.viewportAnchorX=Number(c[1]),f.viewportAnchorY=Number(c[2])):/^scroll=up$/.exec(y)&&(f.scroll="up"),Ro(r),c=gl(r)}t.push(l)}for(i=new Map,ys(i),r=[],n=C(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,y=1;y<l.length;y++)l[y].includes("::cue")&&(f.push([]),c=f.length-1),c!=-1&&(f[c].push(l[y]),l[y].includes("}")&&(c=-1));for(f=C(f),c=f.next();!c.done;c=f.next()){var m=c.value;c="global",(y=m[0].match(/\((.*)\)/))&&(c=y.pop()),y=m.slice(1,-1),m[0].includes("}")&&(m=/\{(.*?)\}/.exec(m[0]))&&(y=m[1].split(";")),(m=i.get(c))||(m=new Zt(0,0,""));for(var w=!1,T=0;T<y.length;T++){var I=/^\s*([^:]+):\s*(.*)/.exec(y[T]);if(I){var D=I[2].trim().replace(";","");switch(I[1].trim()){case"background-color":case"background":w=!0,m.backgroundColor=D;break;case"color":w=!0,m.color=D;break;case"font-family":w=!0,m.fontFamily=D;break;case"font-size":w=!0,m.fontSize=D;break;case"font-weight":(700<=parseInt(D,10)||D=="bold")&&(w=!0,m.fontWeight=sa);break;case"font-style":switch(D){case"normal":w=!0,m.fontStyle=nd;break;case"italic":w=!0,m.fontStyle=cu;break;case"oblique":w=!0,m.fontStyle="oblique"}break;case"opacity":w=!0,m.opacity=parseFloat(D);break;case"text-combine-upright":w=!0,m.textCombineUpright=D;break;case"text-shadow":w=!0,m.textShadow=D;break;case"white-space":w=!0,m.wrapLine=D!="noWrap"}}}w&&i.set(c,m)}}if(m=l,w=e,m.length==1&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||m[0]=="STYLE"||m[0]=="REGION")l=null;else if(l=null,m[0].includes("-->")||(l=m[0],m.splice(0,1)),f=new lu(m[0]),c=uu(f),T=lr(f,/[ \t]+--\x3e[ \t]+/g),y=uu(f),c==null||T==null||y==null)Ct("Failed to parse VTT time code. Cue skipped:",l,m),l=null;else{for(c+=w,y+=w,w=m.slice(1).join(`
`).trim(),i.has("global")?(m=i.get("global").clone(),m.startTime=c,m.endTime=y,m.payload=w):m=new Zt(c,y,w),Ro(f),c=gl(f);c;)tA(m,c,t),Ro(f),c=gl(f);hs(m,i),l!=null&&(m.id=l),l=m}l&&r.push(l)}return r};function tA(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],t=="middle"?e.textAlign=co:e.textAlign=td[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":Rc)):(i=/^region:(.*)$/.exec(t))?(t=XD(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=aa[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ms,e.line=Number(n[1]),n[2]&&(e.lineAlign=aa[n[2].toUpperCase()]))}function XD(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Pe("shaka.text.VttTextParser",er),er.prototype.parseMedia=er.prototype.parseMedia,er.prototype.setManifestType=er.prototype.setManifestType,er.prototype.setSequenceMode=er.prototype.setSequenceMode,er.prototype.parseInit=er.prototype.parseInit,Hn("text/vtt",function(){return new er}),Hn('text/vtt; codecs="vtt"',function(){return new er}),Hn('text/vtt; codecs="wvtt"',function(){return new er});function Qr(){this.g=null}Qr.prototype.parseInit=function(e){var t=this,n=!1;if(new Ut().box("moov",nt).box("trak",nt).box("mdia",nt).R("mdhd",function(i){i=Jc(i.reader,i.version),t.g=i.timescale}).box("minf",nt).box("stbl",nt).R("stsd",Gr).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new Y(2,2,2008);if(!n)throw new Y(2,2,2008)},Qr.prototype.setSequenceMode=function(){},Qr.prototype.setManifestType=function(){},Qr.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,y=!1,m=null;if(new Ut().box("moof",nt).box("traf",nt).R("tfdt",function(K){c=!0,n=Qc(K.reader,K.version).baseMediaDecodeTime}).R("tfhd",function(K){m=Us(K.reader,K.flags).Md}).R("trun",function(K){f=!0,i=Td(K.reader,K.version,K.flags).gh}).box("mdat",Tu(function(K){y=!0,r=K})).parse(e,!1),!y&&!c&&!f)throw new Y(2,2,2008);e=n;for(var w=new Bt(r,0),T=C(i),I=T.next();!I.done;I=T.next()){I=I.value;var D=I.hh||m,M=I.Bf?n+I.Bf:e;e=M+(D||0);var L=0;do{var P=w.T();L+=P;var j=w.T(),V=null;Lt(j)=="vttc"?8<P&&(V=w.Ub(P-8)):w.skip(P-8),D&&V&&(P=YD(V,t.periodStart+M/this.g,t.periodStart+e/this.g),l.push(P))}while(I.sampleSize&&L<I.sampleSize)}return l.filter(xl)};function YD(e,t,n){var i,r,l;return new Ut().box("payl",Tu(function(c){i=ln(c)})).box("iden",Tu(function(c){r=ln(c)})).box("sttg",Tu(function(c){l=ln(c)})).parse(e),i?WD(i,r,l,t,n):null}function WD(e,t,n,i,r){if(e=new Zt(i,r,e),hs(e),t&&(e.id=t),n)for(t=new lu(n),n=gl(t);n;)tA(e,n,[]),Ro(t),n=gl(t);return e}Pe("shaka.text.Mp4VttParser",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,Hn('application/mp4; codecs="wvtt"',function(){return new Qr});function Jr(){}Jr.prototype.parseInit=function(){},Jr.prototype.setSequenceMode=function(){},Jr.prototype.setManifestType=function(){},Jr.prototype.parseMedia=function(e){var t=ln(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=C(t.split(`

`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
`);var i=new lu(n[0]),r=uu(i),l=lr(i,/,/g);if(i=uu(i),r==null||l==null||i==null)throw new Y(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Zt(r,i,n.slice(1).join(`
`).trim()))}return e},Pe("shaka.text.SbvTextParser",Jr),Jr.prototype.parseMedia=Jr.prototype.parseMedia,Jr.prototype.setManifestType=Jr.prototype.setManifestType,Jr.prototype.setSequenceMode=Jr.prototype.setSequenceMode,Jr.prototype.parseInit=Jr.prototype.parseInit,Hn("text/x-subviewer",function(){return new Jr});function Ur(){this.g=new er}Ur.prototype.parseInit=function(){},Ur.prototype.setSequenceMode=function(){},Ur.prototype.setManifestType=function(){},Ur.prototype.parseMedia=function(e,t,n){return e=ln(e),e=nA(e),e=Ge(Br(e)),this.g.parseMedia(e,t,n,[])};function nA(e){var t=`WEBVTT

`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=C(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}Pe("shaka.text.SrtTextParser",Ur),Ur.srt2webvtt=nA,Ur.prototype.parseMedia=Ur.prototype.parseMedia,Ur.prototype.setManifestType=Ur.prototype.setManifestType,Ur.prototype.setSequenceMode=Ur.prototype.setSequenceMode,Ur.prototype.parseInit=Ur.prototype.parseInit,Hn("text/srt",function(){return new Ur});function Zr(){}Zr.prototype.parseInit=function(){},Zr.prototype.setSequenceMode=function(){},Zr.prototype.setManifestType=function(){},Zr.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=ln(e).split(/\r?\n\s*\r?\n/),e=C(r),r=e.next();!r.done;r=e.next()){var l=r.value;r=l,(l=JD.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=C(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(l=oA.exec(e))){if(e=l[1].trim(),l=l[2].trim(),e=="Format")r=l.split(z0);else if(e=="Style"){e=l.split(z0),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=C(n.split(/\r?\n/)),l=n.next(),e={};!l.done;e={Qi:void 0},l=n.next())if(l=l.value,!/^\s*;/.test(l)&&(c=oA.exec(l))){if(l=c[1].trim(),c=c[2].trim(),l=="Format")t=c.split(z0);else if(l=="Dialogue"){c=c.split(z0),l={};for(var f=0;f<t.length&&f<c.length;f++)l[t[f]]=c[f];f=rA(l.Start);var y=rA(l.End);c=new Zt(f,y,c.slice(t.length-1).join(",").replace(/\\N/g,`
`).replace(/\{[^}]+\}/g,"")),e.Qi=l.Style,(e=i.find(function(m){return function(w){return w.Name==m.Qi}}(e)))&&QD(c,e),r.push(c)}}return r};function QD(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=iA(n))&&(e.color=n),(n=t.BackColour)&&(n=iA(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=sa),t.Italic&&(e.fontStyle=cu),t.Underline&&e.textDecoration.push(Lo),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Po,e.textAlign="start";break;case 2:e.displayAlign=Po,e.textAlign=co;break;case 3:e.displayAlign=Po,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=co;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=co;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function iA(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 rA(e){return e=ZD.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Pe("shaka.text.SsaTextParser",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;var JD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,oA=/^\s*([^:]+):\s*(.*)/,z0=/\s*,\s*/,ZD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Hn("text/x-ssa",function(){return new Zr});function lA(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,qa:e}:null}function uA(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 aA(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 $D(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 $r(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=$r.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?ai(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(xi(t)||"mp4a.40.2")+'"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=Ge(e),l=Du(r),c=l.length;c<r.length&&!aA(r,c);c++);if(e=1e3*n.endTime,l=_l(l),l.length&&n&&(l=l.find(function(w){return w.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=l.data),l=uA(r,c),!l)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount;for(var f=[];c<r.length;){var y=lA(r,c);if(!y)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));var m=y.Ud+y.qa;c+m<=r.length&&f.push({data:r.subarray(c+y.Ud,c+m),size:y.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),c+=m}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,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:f},stream:t},i=new Cu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=js(i),this.g.set(n,t)),n=this.i!==t,i=bu(i),this.i=t,this.h++,n?(t=an(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.AacTransmuxer",$r),$r.prototype.transmux=$r.prototype.transmux,$r.prototype.getOriginalMimeType=$r.prototype.getOriginalMimeType,$r.prototype.convertCodecs=$r.prototype.convertCodecs,$r.prototype.isSupported=$r.prototype.isSupported,$r.prototype.destroy=$r.prototype.destroy,Tl("audio/aac",function(){return new $r("audio/aac")},fu);function sA(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,Ea:e,qa:r}}function e4(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 Co(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=Co.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?ai(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?yt().ee()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){e=Ge(e);for(var r=Du(e),l=r.length;l<e.length&&!e4(e,l);l++);var c=1e3*n.endTime;r=_l(r),r.length&&n&&(r=r.find(function(w){return w.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),y=[];l<e.length;){var m=sA(e,l);if(!m)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=m.sampleRate,t.channelsCount=m.channelCount,r=m.sampleRate,f=m.Ea,y.push({data:e.subarray(l,l+m.qa),size:m.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),l+=m.qa}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,Ab:[],Ea:f,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:y},stream:t},i=new Cu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=js(i),this.g.set(n,t)),n=this.i!==t,i=bu(i),this.i=t,this.h++,n?(t=an(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.Ac3Transmuxer",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,Tl("audio/ac3",function(){return new Co("audio/ac3")},fu);function cA(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new So(e.subarray(t+2));Ei(n,2),Ei(n,3);var i=St(n,11)+1<<1,r=St(n,2);if(r==3){r=St(n,2),r=[24e3,22060,16e3][r];var l=3}else r=[48e3,44100,32e3][r],l=St(n,2);var c=St(n,3),f=St(n,1);return n=St(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,Ea:e,qa:i})}function bo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=bo.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?ai(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){e=Ge(e);for(var r=Du(e),l=r.length;l<e.length&&(e[l]<<8|e[l+1]<<0)!==2935;l++);var c=1e3*n.endTime;r=_l(r),r.length&&n&&(r=r.find(function(w){return w.description==="com.apple.streaming.transportStreamTimestamp"}))&&(c=r.data),r=0;for(var f=new Uint8Array([]),y=[];l<e.length;){var m=cA(e,l);if(!m)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));t.audioSamplingRate=m.sampleRate,t.channelsCount=m.channelCount,r=m.sampleRate,f=m.Ea,y.push({data:e.subarray(l,l+m.qa),size:m.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),l+=m.qa}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,Ab:[],Ea:f,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:e,yb:y},stream:t},i=new Cu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=js(i),this.g.set(n,t)),n=this.i!==t,i=bu(i),this.i=t,this.h++,n?(t=an(t,i),Promise.resolve(t)):Promise.resolve(i)},Pe("shaka.transmuxer.Ec3Transmuxer",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,Tl("audio/ec3",function(){return new bo("audio/ec3")},fu);function t4(e){if(!e.length)return null;var t=e.find(function(L){return L.type==7});if(e=e.find(function(L){return L.type==8}),!t||!e)return null;var n=new So(t.data),i=Nt(n);if(Nt(n),Nt(n),Ai(n),i4.includes(i)&&(i=Me(n),i===3&&Ei(n,1),Ai(n),Ai(n),Ei(n,1),Ke(n))){i=i!==3?8:12;for(var r=0;r<i;r++)Ke(n)&&(6>r?qr(n,16):qr(n,64))}if(Ai(n),i=Me(n),i===0)Me(n);else if(i===1)for(Ei(n,1),Ai(n),Ai(n),i=Me(n),r=0;r<i;r++)Ai(n);Ai(n),Ei(n,1);var l=Me(n),c=Me(n),f=St(n,1);f===0&&Ei(n,1),Ei(n,1);var y=0,m=0,w=0,T=0;if(Ke(n)&&(y=Me(n),m=Me(n),w=Me(n),T=Me(n)),r=i=1,Ke(n)&&Ke(n)){var I=Nt(n),D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<I&&16>=I?(i=D[I-1],r=M[I-1]):I===255&&(i=St(n,16),r=St(n,16))}return n=(2-f)*(c+1)*16-2*w-2*T,l=16*(l+1)-2*y-2*m,y=[],t=t.fullData,y.push(t.byteLength>>>8&255),y.push(t.byteLength&255),y=y.concat.apply(y,$(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,$(e)),e=new Uint8Array([1,y[3],y[4],y[5],255,225].concat(y,[1],t)),{height:n,width:l,Na:e,Wa:i,Xa:r}}function n4(e){function t(M){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:M.pts,dts:M.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var M=[],L=C(r.nalus),P=L.next();!P.done;P=L.next()){P=P.value;var j=P.fullData.byteLength,V=new Uint8Array(4);V[0]=j>>24&255,V[1]=j>>16&255,V[2]=j>>8&255,V[3]=j&255,M.push(V),M.push(P.fullData)}r.data=an.apply(Bn,$(M)),i.push(r)}}for(var i=[],r=null,l=!1,c=0;c<e.length;c++){var f=e[c],y=f.nalus,m=!1;r&&y.length&&!l&&(n(),t(f)),y=C(f.nalus);for(var w=y.next();!w.done;w=y.next()){w=w.value;var T=!1;switch(w.type){case 1:var I=!1;T=!0;var D=w.data;m&&4<D.length&&(D=om(new So(D)),D===2||D===4||D===7||D===9)&&(I=!0),I&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(f),r.frame=!0,r.isKeyframe=I;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:m=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(w)}}return n(),i}var i4=[100,110,122,244,44,83,86,118,128,138,139,134];function r4(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=o4(t.fullData);e=l4(n.fullData);var l=u4(i.fullData);return t=a4(t.fullData,n.fullData,i.fullData,{Sg:r.Sg,wh:r.wh,Cg:e.Cg,Dg:e.Dg,wg:e.wg,Bg:e.Bg,xg:e.xg,yg:e.yg,zg:e.zg,Ag:e.Ag,pg:e.pg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,hg:e.hg,lf:e.lf,fg:e.fg,eg:e.eg,dg:e.dg,Ug:l.Ug}),{height:e.height,width:e.width,Na:t,Wa:e.Mk,Xa:e.Lk}}function o4(e){var t=new So(e,!0);return Nt(t),Nt(t),St(t,4),St(t,2),St(t,6),e=St(t,3),t=Ke(t),{Sg:e+1,wh:t}}function l4(e){e=new So(e,!0),Nt(e),Nt(e);var t=0,n=0,i=0,r=0;St(e,4);var l=St(e,3);Ke(e);for(var c=St(e,2),f=St(e,1),y=St(e,5),m=Nt(e),w=Nt(e),T=Nt(e),I=Nt(e),D=Nt(e),M=Nt(e),L=Nt(e),P=Nt(e),j=Nt(e),V=Nt(e),K=Nt(e),q=[],Q=[],z=0;z<l;z++)q.push(Ke(e)),Q.push(Ke(e));if(0<l)for(z=l;8>z;z++)St(e,2);for(z=0;z<l;z++)q[z]&&St(e,88),Q[z]&&Nt(e);Me(e),q=Me(e),q==3&&St(e,1),Q=Me(e),z=Me(e),Ke(e)&&(t+=Me(e),n+=Me(e),i+=Me(e),r+=Me(e));var X=Me(e),W=Me(e),J=Me(e);if(Ke(e))for(var ne=0;ne<=l;ne++)Me(e),Me(e),Me(e);else Me(e),Me(e),Me(e);if(Me(e),Me(e),Me(e),Me(e),Me(e),Me(e),Ke(e)&&Ke(e))for(ne=0;4>ne;ne++)for(var te=0;te<(ne===3?2:6);te++)if(Ke(e)){var ee=Math.min(64,1<<4+(ne<<1));1<ne&&Ou(e);for(var ge=0;ge<ee;ge++)Ou(e)}else Me(e);for(Ke(e),Ke(e),Ke(e)&&(Nt(e),Me(e),Me(e),Ke(e)),ne=Me(e),ee=te=0;ee<ne;ee++)if(ge=!1,ee!==0&&(ge=Ke(e)),ge){ee===ne&&Me(e),Ke(e),Me(e);for(var fe=ge=0;fe<=te;fe++){var le=Ke(e),pe=!1;le||(pe=Ke(e)),(le||pe)&&ge++}te=ge}else{for(fe=Me(e),ge=Me(e),te=fe+ge,le=0;le<fe;le++)Me(e),Ke(e);for(fe=0;fe<ge;fe++)Me(e),Ke(e)}if(Ke(e))for(ne=Me(e),te=0;te<ne;te++){for(ee=0;ee<J+4;ee++)St(e,1);St(e,1)}if(ne=J=1,te=0,Ke(e),Ke(e),Ke(e)){if(Ke(e)&&(ee=Nt(e),ge=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],fe=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<ee&&16>=ee?(J=ge[ee-1],ne=fe[ee-1]):ee===255&&(J=St(e,16),ne=St(e,16))),Ke(e)&&Ke(e),Ke(e)&&(St(e,3),Ke(e),Ke(e)&&(Nt(e),Nt(e),Nt(e))),Ke(e)&&(Me(e),Me(e)),Ke(e),Ke(e),Ke(e),(ee=Ke(e))&&(Me(e),Me(e),Me(e),Me(e)),Ke(e)&&(St(e,32),St(e,32),Ke(e)&&Me(e),Ke(e)))for(fe=!1,ee=Ke(e),ge=Ke(e),(ee||ge)&&((fe=Ke(e))&&(Nt(e),St(e,5),Ke(e),St(e,5)),St(e,4),St(e,4),fe&&St(e,4),St(e,5),St(e,5),St(e,5)),le=0;le<=l;le++){var Ee=!0;pe=1,Ke(e)||(Ee=Ke(e));var Ce=!1;if(Ee?Me(e):Ce=Ke(e),Ce||(pe=Me(e)+1),ee){for(Ee=0;Ee<pe;Ee++)Me(e),Me(e),fe&&(Me(e),Me(e));Ke(e)}if(ge){for(Ee=0;Ee<pe;Ee++)Me(e),Me(e),fe&&(Me(e),Me(e));Ke(e)}}Ke(e)&&(Ke(e),Ke(e),Ke(e),te=Me(e),Me(e),Me(e),Me(e),Me(e))}return{wg:K,Cg:c,Dg:f,Bg:y,xg:m,yg:w,zg:T,Ag:I,pg:D,qg:M,rg:L,sg:P,ug:j,vg:V,lf:te,hg:0,fg:q,eg:X,dg:W,width:Q-(t+n)*(q===1||q===2?2:1),height:z-(i+r)*(q===1?2:1),Mk:J,Lk:ne}}function u4(e){var t=new So(e,!0);Nt(t),Nt(t),Me(t),Me(t),Ke(t),Ke(t),St(t,3),Ke(t),Ke(t),Me(t),Me(t),Ou(t),Ke(t),Ke(t),Ke(t)&&Me(t),Ou(t),Ou(t),Ke(t),Ke(t),Ke(t),Ke(t),e=Ke(t),t=Ke(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Ug:n}}function a4(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.Cg&3)<<6|(i.Dg?1:0)<<5|i.Bg&31,r[2]=i.xg,r[3]=i.yg,r[4]=i.zg,r[5]=i.Ag,r[6]=i.pg,r[7]=i.qg,r[8]=i.rg,r[9]=i.sg,r[10]=i.ug,r[11]=i.vg,r[12]=i.wg,r[13]=240|(i.lf&3840)>>8,r[14]=i.lf&255,r[15]=252|i.Ug&3,r[16]=252|i.fg&3,r[17]=248|i.eg&7,r[18]=248|i.dg&7,r[19]=0,r[20]=0,r[21]=(i.hg&3)<<6|(i.Sg&7)<<3|(i.wh?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 X0(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*s4[14*(n===3?3-i:i===3?3:4)+r-1],l=c4[3*(n===3?0:n===2?1:2)+l],n=f4[n][i];var f=d4[i],y=Math.floor(n*r/l+(e[t+2]>>1&1))*f,m=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(m=m?parseInt(m[1],10):0)&&87>=m&&i===2&&224e3<=r&&c===0&&(e[t+3]|=128),{sampleRate:l,channelCount:c===3?1:2,qa:y,Kk:8*n*f}}return null}function fA(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function dA(e,t){if(t+1<e.length&&fA(e,t)){var n=X0(e,t),i=4;return n&&n.qa&&(i=n.qa),t+=i,t===e.length||t+1<e.length&&fA(e,t)}return!1}var s4=[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],c4=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],f4=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d4=[0,1,1,4];function Io(e){this.j=e,this.h=0,this.g=new Map,this.i=null}h=Io.prototype,h.destroy=function(){this.g.clear()},h.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?ai(this.convertCodecs("audio",e)):!1},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=Ge(e),l=Du(r).length;l<r.length&&!dA(r,l);l++);var c;for(e=[];l<r.length;){var f=X0(r,l);if(!f)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));c||(c=f),l+f.qa<=r.length&&e.push({data:r.subarray(l,l+f.qa),size:f.qa,duration:1152,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),l+=f.qa}return c?(r=9e4*c.Kk/c.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:c.sampleRate,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.h,baseMediaDecodeTime:r,yb:e},stream:t},i=new Cu([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=js(i),this.g.set(n,t)),n=this.i!==t,i=bu(i),this.i=t,this.h++,n?(t=an(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new Y(2,3,3018,n?n.O()[0]:null))},Pe("shaka.transmuxer.Mp3Transmuxer",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,Tl("audio/mpeg",function(){return new Io("audio/mpeg")},fu);function ko(e){this.h=e,this.g=null}h=ko.prototype,h.destroy=function(){},h.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=xi(e).split(","),n=Ri("audio",t);return t=Ri("video",t),!n||t||Ti(n)!="mp3"?!1:ai(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Vt,this.g.Ff(n.i),e=Ge(e),e=this.g.parse(e),e.Od().audio!="mp3"||r!="audio")return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));for(n=new Uint8Array([]),r=C(e.sb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=X0(e,t))?(t+i.qa<=e.length&&(n=an(n,e.subarray(t,t+i.qa))),t+=i.qa):t++;return Promise.resolve(n)},Pe("shaka.transmuxer.MpegTsTransmuxer",ko),ko.prototype.transmux=ko.prototype.transmux,ko.prototype.getOriginalMimeType=ko.prototype.getOriginalMimeType,ko.prototype.convertCodecs=ko.prototype.convertCodecs,ko.prototype.isSupported=ko.prototype.isSupported,ko.prototype.destroy=ko.prototype.destroy,Tl("video/mp2t",function(){return new ko("video/mp2t")},Zp);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/function eo(e){this.h=e,(this.g=K1.get("ISOBoxer")())&&p4(this)}function p4(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]!==h4[i]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}h=eo.prototype,h.destroy=function(){},h.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?ai(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ai(t)||ai(e))},h.convertCodecs=function(e,t){return t.replace("mss/","")},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n){if(!n)return Promise.resolve(Ge(e));if(!t.mssPrivateData)return Promise.reject(new Y(2,3,3020,n?n.O()[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 y=r.fetch("trun"),m=r.fetch("tfxd");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var w=r.fetch("tfrf");w&&w._parent.boxes.splice(w._parent.boxes.indexOf(w),1);var T=r.fetch("sepiff");if(T!==null){T.type="senc",T.usertype=void 0;var I=r.fetch("saio");if(I===null){I=this.g.createFullBox("saio",f),I.version=0,I.flags=0,I.entry_count=1,I.offset=[0];var D=this.g.createFullBox("saiz",f);if(D.version=0,D.flags=0,D.sample_count=T.sample_count,D.default_sample_info_size=0,D.sample_info_size=[],T.flags&2)for(i=0;i<T.sample_count;i+=1)D.sample_info_size[i]=10+6*T.entry[i].NumberOfEntries;else D.default_sample_info_size=8}}l.flags&=16777214,l.flags|=131072,y.flags|=1;var M=r.fetch("moof");y.data_offset=M.getLength()+8;var L=r.fetch("saio");L!==null&&(L.offset[0]=pA(M,"traf")+pA(f,"senc")+16);var P=Ge(r.write());return Promise.resolve(P)}catch(j){return j instanceof Y?Promise.reject(j):Promise.reject(new Y(2,3,3022,n?n.O()[0]:null))}};function pA(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}Pe("shaka.transmuxer.MssTransmuxer",eo),eo.prototype.transmux=eo.prototype.transmux,eo.prototype.getOriginalMimeType=eo.prototype.getOriginalMimeType,eo.prototype.convertCodecs=eo.prototype.convertCodecs,eo.prototype.isSupported=eo.prototype.isSupported,eo.prototype.destroy=eo.prototype.destroy;var h4=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Tl("mss/audio/mp4",function(){return new eo("mss/audio/mp4")},fu),Tl("mss/video/mp4",function(){return new eo("mss/video/mp4")},fu);function Do(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}h=Do.prototype,h.destroy=function(){this.j.clear(),this.i&&this.i.destroy()},h.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=xi(n).split(",");return n=Ri("audio",i),i=Ri("video",i),n&&(n=Ti(n),!y4.includes(n))||i&&(n=Ti(i),!g4.includes(n))?!1:t?ai(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),ai(t)||ai(e))},h.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=xi(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return Yi(n,"audio/mp4")}).map(Er).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},h.getOriginalMimeType=function(){return this.m},h.transmux=function(e,t,n,i,r){var l=Ge(e);if(r=="audio"&&!Xo(l)){for(var c=Du(l),f=c.length;f<l.length;f++)if(dA(l,f))return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));for(f=c.length;f<l.length;f++)if(aA(l,f))return this.i||(this.i=new $r("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null))}this.h?this.h.clearData():this.h=new Vt,this.h.Ff(n.i);var y=this.h.parse(l),m=[],w=y.Od();try{var T=null;if(r=="video"){switch(w.video){case"avc":var I=[],D=null,M=y.Rc(),L=n4(M);if(!L.length)throw new Y(2,3,3023,n?n.O()[0]:null);for(var P=0;P<L.length;P++){var j=L[P];D==null&&(D=j.dts);var V=void 0;V=P+1<L.length?(L[P+1].dts||0)-(j.dts||0):1<L.length?(j.dts||0)-(L[P-1].dts||0):9e4*(n.endTime-n.startTime),I.push({data:j.data,size:j.data.byteLength,duration:V,rb:Math.round((j.pts||0)-(j.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:j.isKeyframe?2:1,xb:j.isKeyframe?0:1}})}for(var K=[],q=C(M),Q=q.next();!Q.done;Q=q.next())K.push.apply(K,$(Q.value.nalus));var z=t4(K);if(!z||D==null)throw new Y(2,3,3018,n?n.O()[0]:null);t.height=z.height,t.width=z.width,T={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ab:[],Ea:new Uint8Array([]),Na:z.Na,Wa:z.Wa,Xa:z.Xa,data:{Vb:this.g,baseMediaDecodeTime:D,yb:I},stream:t};break;case"hvc":var X=[],W=null,J=[],ne=y.Rc();if(!ne.length)throw new Y(2,3,3023,n?n.O()[0]:null);for(var te=0;te<ne.length;te++){var ee=ne[te],ge=ee.nalus;J.push.apply(J,$(ge));for(var fe=!1,le=[],pe=!1,Ee=C(ge),Ce=Ee.next();!Ce.done;Ce=Ee.next()){var Be=Ce.value;switch(Be.type){case 1:case 0:var Le=pe=!0;break;case 19:case 20:case 21:fe=Le=pe=!0;break;case 32:Le=!0;break;case 33:Le=!0;break;case 34:Le=!0;break;case 35:pe=Le=!0;break;case 39:case 40:Le=!0;break;default:Le=!1}if(pe&&Le){var kt=Be.fullData.byteLength,xt=new Uint8Array(4);xt[0]=kt>>24&255,xt[1]=kt>>16&255,xt[2]=kt>>8&255,xt[3]=kt&255,le.push(xt),le.push(Be.fullData)}}var Kt=le.length?{data:an.apply(Bn,$(le)),isKeyframe:fe}:null;if(Kt){W==null&&ee.dts!=null&&(W=ee.dts);var st=void 0;st=te+1<ne.length?(ne[te+1].dts||0)-(ee.dts||0):1<ne.length?(ee.dts||0)-(ne[te-1].dts||0):9e4*(n.endTime-n.startTime),X.push({data:Kt.data,size:Kt.data.byteLength,duration:st,rb:Math.round((ee.pts||0)-(ee.dts||0)),flags:{wb:0,kb:0,jb:0,hb:0,ib:Kt.isKeyframe?2:1,xb:Kt.isKeyframe?0:1}})}}var tt=r4(J);if(!tt||W==null)throw new Y(2,3,3018,n?n.O()[0]:null);t.height=tt.height,t.width=tt.width,T={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,Ab:[],Ea:new Uint8Array([]),Na:tt.Na,Wa:tt.Wa,Xa:tt.Xa,data:{Vb:this.g,baseMediaDecodeTime:W,yb:X},stream:t}}T&&(m.push(T),T=null)}if(r=="audio"){switch(w.audio){case"aac":for(var zt=[],ft,lt=null,ht=null,gn=null,hn=C(y.sb()),mn=hn.next();!mn.done;mn=hn.next()){var Wn=mn.value,Pn=Wn.data;if(Pn){var Xt=0;if(ht==-1&&gn)Pn=an(gn,Wn.data),ht=null;else if(ht!=null&&gn){Xt=Math.max(0,ht);var xc=an(gn,Pn.subarray(0,Xt));zt.push({data:xc,size:xc.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),ht=gn=null}if(ft=uA(Pn,Xt),!ft)throw new Y(2,3,3018,n?n.O()[0]:null);for(t.audioSamplingRate=ft.sampleRate,t.channelsCount=ft.channelCount,lt==null&&Wn.pts!==null&&(lt=Wn.pts);Xt<Pn.length;){var jr=lA(Pn,Xt);if(!jr){gn=Pn.subarray(Xt,Pn.length),ht=-1;break}var Ec=jr.Ud+jr.qa;ht=Math.max(0,Xt+Ec-Pn.length),ht!=0?gn=Pn.subarray(Xt+jr.Ud,Xt+Ec):Xt+Ec<=Pn.length&&zt.push({data:Pn.subarray(Xt+jr.Ud,Xt+Ec),size:jr.qa,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Xt+=Ec}}}if(!ft||lt==null){if(!y.Rc().length)throw new Y(2,3,3018,n?n.O()[0]:null);lt=9e4*n.startTime;var bp=Ri("audio",t.codecs.split(","));if(!bp||!t.channelsCount||!t.audioSamplingRate)throw new Y(2,3,3018,n?n.O()[0]:null);ft={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:bp};var Ip=$D(bp,t.channelsCount);if(!Ip)throw new Y(2,3,3018,n?n.O()[0]:null);for(var Xl=lt+9e4*(n.endTime-n.startTime),yA=lt;yA<Xl;)zt.push({data:Ip,size:Ip.byteLength,duration:1024,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),yA+=1024/ft.sampleRate*9e4}var gA=ft.sampleRate,m4=lt/9e4*gA;T={id:t.id,type:"audio",codecs:ft.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:gA,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:m4,yb:zt},stream:t};break;case"ac3":for(var mA=[],Y0=0,XS=new Uint8Array([]),W0=null,vA=C(y.sb()),YS=vA.next();!YS.done;YS=vA.next()){var WS=YS.value,QS=WS.data;W0==null&&WS.pts!==null&&(W0=WS.pts);for(var kp=0;kp<QS.length;){var Ac=sA(QS,kp);Ac?(t.audioSamplingRate=Ac.sampleRate,t.channelsCount=Ac.channelCount,Y0=Ac.sampleRate,XS=Ac.Ea,mA.push({data:QS.subarray(kp,kp+Ac.qa),size:Ac.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),kp+=Ac.qa):kp++}}if(Y0==0||XS.byteLength==0||W0==null)throw new Y(2,3,3018,n?n.O()[0]:null);var v4=W0/9e4*Y0;T={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Y0,duration:i,Ab:[],Ea:XS,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:v4,yb:mA},stream:t};break;case"ec3":for(var SA=[],Q0=0,JS=new Uint8Array([]),J0=null,wA=C(y.sb()),ZS=wA.next();!ZS.done;ZS=wA.next()){var $S=ZS.value,e2=$S.data;J0==null&&$S.pts!==null&&(J0=$S.pts);for(var Dp=0;Dp<e2.length;){var Cc=cA(e2,Dp);Cc?(t.audioSamplingRate=Cc.sampleRate,t.channelsCount=Cc.channelCount,Q0=Cc.sampleRate,JS=Cc.Ea,SA.push({data:e2.subarray(Dp,Dp+Cc.qa),size:Cc.qa,duration:1536,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Dp+=Cc.qa):Dp++}}if(Q0==0||JS.byteLength==0||J0==null)throw new Y(2,3,3018,n?n.O()[0]:null);var S4=J0/9e4*Q0;T={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Q0,duration:i,Ab:[],Ea:JS,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:S4,yb:SA},stream:t};break;case"mp3":for(var TA=[],Z0,$0=null,xA=C(y.sb()),t2=xA.next();!t2.done;t2=xA.next()){var n2=t2.value,$y=n2.data;if($y){$0==null&&n2.pts!==null&&($0=n2.pts);for(var Mf=0;Mf<$y.length;){var Op=X0($y,Mf);Op?(Z0||(Z0=Op),Mf+Op.qa<=$y.length&&TA.push({data:$y.subarray(Mf,Mf+Op.qa),size:Op.qa,duration:1152,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),Mf+=Op.qa):Mf++}}}if(!Z0||$0==null)throw new Y(2,3,3018,n?n.O()[0]:null);var EA=Z0.sampleRate,w4=$0/9e4*EA;T={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:EA,duration:i,Ab:[],Ea:new Uint8Array([]),Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:w4,yb:TA},stream:t};break;case"opus":var AA=[],ev=null,zu=y.G;if(!zu)throw new Y(2,3,3018,n?n.O()[0]:null);var tr=[];switch(zu.jj){case 1:case 2:tr=[0];break;case 0:tr=[255,1,1,0,1];break;case 128:tr=[255,2,0,0,1];break;case 3:tr=[1,2,1,0,2,1];break;case 4:tr=[1,2,2,0,1,2,3];break;case 5:tr=[1,3,2,0,4,1,2,3];break;case 6:tr=[1,4,2,0,4,1,2,3,5];break;case 7:tr=[1,4,2,0,4,1,2,3,5,6];break;case 8:tr=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:tr=[1,1,2,0,1];break;case 131:tr=[1,1,3,0,1,2];break;case 132:tr=[1,1,4,0,1,2,3];break;case 133:tr=[1,1,5,0,1,2,3,4];break;case 134:tr=[1,1,6,0,1,2,3,4,5];break;case 135:tr=[1,1,7,0,1,2,3,4,5,6];break;case 136:tr=[1,1,8,0,1,2,3,4,5,6,7]}for(var CA=new Uint8Array([0,zu.channelCount,0,0,zu.sampleRate>>>24&255,zu.sampleRate>>>17&255,zu.sampleRate>>>8&255,zu.sampleRate>>>0&255,0,0].concat($(tr))),bA=zu.sampleRate,IA=C(y.sb()),i2=IA.next();!i2.done;i2=IA.next()){var r2=i2.value,Rp=r2.data;ev==null&&r2.pts!==null&&(ev=r2.pts);for(var eg=0;eg<Rp.length;){for(var T4=(Rp[eg+1]&16)!==0,x4=(Rp[eg+1]&8)!==0,ts=eg+2,tv=0;Rp[ts]===255;)tv+=255,ts+=1;tv+=Rp[ts],ts+=1,ts+=T4?2:0,ts+=x4?2:0;var kA=Rp.slice(ts,ts+tv);AA.push({data:kA,size:kA.byteLength,duration:960,rb:0,flags:{wb:0,kb:0,jb:0,hb:0,ib:2,xb:0}}),eg=ts+tv}}if(CA.byteLength==0||ev==null)throw new Y(2,3,3018,n?n.O()[0]:null);t.audioSamplingRate=zu.sampleRate,t.channelsCount=zu.channelCount;var E4=ev/9e4*bA;T={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:bA,duration:i,Ab:[],Ea:CA,Na:new Uint8Array([]),Wa:0,Xa:0,data:{Vb:this.g,baseMediaDecodeTime:E4,yb:AA},stream:t}}T&&(m.push(T),T=null)}}catch(l2){return l2&&l2.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(l2)}if(!m.length)return Promise.reject(new Y(2,3,3018,n?n.O()[0]:null));var DA=new Cu(m),o2=t.id+"_"+n.i;if(this.j.has(o2))var tg=this.j.get(o2);else tg=js(DA),this.j.set(o2,tg);var A4=this.l!==tg,OA=bu(DA);if(this.l=tg,this.g++,A4){var C4=an(tg,OA);return Promise.resolve(C4)}return Promise.resolve(OA)},Pe("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 y4=["aac","ac-3","ec-3","mp3","opus"],g4=["avc","hevc"];Tl("video/mp2t",function(){return new Do("video/mp2t")},Xi);function hA(){}$e(hA,ji),Pe("shaka.util.FairPlayUtils",hA)}).call(R,b,b,void 0);for(var S in R.shaka)A[S]=R.shaka[S]})()}(g2)),g2}var ER=xR();const YA=k4(ER);function AR(){const[A,b]=Se.useState(""),[R,S]=Se.useState(""),[x,U]=Se.useState(""),[O,h]=Se.useState(""),s=Se.useRef(null),u=Se.useRef(null),p=oe=>{b(oe.target.value)},v=oe=>{S(oe.target.value)},N=oe=>{U(oe.target.value)},Z=oe=>{h(oe.target.value)},C=()=>{if(s.current&&!u.current){const oe=new YA.Player(s.current);u.current=oe,oe.addEventListener("error",me=>{console.error("Error code",me.detail.code,"object",me.detail)})}},$=()=>{if(A&&R&&x){const oe=R.split(`
`).map(Ne=>Ne.trim()),me=x.split(`
`).map(Ne=>Ne.trim());if(oe.length!==me.length){console.error("The number of KIDs and Keys must be the same.");return}const Ve=new YA.Player(s.current),ue={drm:{clearKeys:{}}};oe.forEach((Ne,Re)=>{ue.drm.clearKeys[Ne]=me[Re]}),console.log("Configuring player with the following DRM config and headers:",ue),Ve.configure(ue),Ve.load(A).then(()=>{console.log("Video loaded")}).catch(Ne=>{console.error("Error loading the video",Ne)})}else console.error("MPD URL, KIDs, and Keys are required.")};return Se.useEffect(()=>{C()},[]),Se.useEffect(()=>{document.title="Test player | CDRM-Project"},[]),re.jsx("div",{className:"flex flex-col items-center w-full p-4",children:re.jsxs("div",{className:"w-full flex flex-col",children:[re.jsx("video",{ref:s,width:"100%",height:"auto",controls:!0,className:"h-96"}),re.jsx("input",{type:"text",value:A,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"}),re.jsx("textarea",{placeholder:"KIDs (one per line)",value:R,onChange:v,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"}),re.jsx("textarea",{placeholder:"Keys (one per line)",value:x,onChange:N,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"}),re.jsx("textarea",{placeholder:"Headers (one per line)",value:O,onChange:Z,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"}),re.jsx("button",{onClick:$,className:"mt-4 p-2 bg-blue-500 text-white rounded",children:"Submit"})]})})}const bC="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",IC="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",kC="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",DC="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",OC="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'%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%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%3cdefs%3e%3cstyle%3e.cls-1{fill:none;stroke:%23ffffff;stroke-miterlimit:10;stroke-width:1.91px;}%3c/style%3e%3c/defs%3e%3ccircle%20class='cls-1'%20cx='12'%20cy='7.25'%20r='5.73'/%3e%3cpath%20class='cls-1'%20d='M1.5,23.48l.37-2.05A10.3,10.3,0,0,1,12,13h0a10.3,10.3,0,0,1,10.13,8.45l.37,2.05'/%3e%3c/g%3e%3c/svg%3e",RC="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",MC="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",NC="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 CR(){const[A,b]=Se.useState({discord:"#",telegram:"#",gitea:"#"});return Se.useEffect(()=>{fetch("/api/links").then(R=>R.json()).then(R=>b(R)).catch(R=>console.error("Error fetching links:",R))},[]),re.jsxs("div",{className:"flex flex-col w-full h-full bg-white/1",children:[re.jsx("div",{children:re.jsx("p",{className:"text-white text-2xl font-bold p-3 text-center mb-5",children:re.jsx("a",{href:"/",children:"CDRM-Project"})})}),re.jsxs("div",{className:"overflow-y-auto grow flex flex-col",children:[re.jsxs(Yl,{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:[re.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:re.jsx("img",{src:bC,alt:"Home",className:"w-1/2 cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Home"})]}),re.jsxs(Yl,{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:[re.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:re.jsx("img",{src:IC,alt:"Cache",className:"w-1/2 cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Cache"})]}),re.jsxs(Yl,{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:[re.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:re.jsx("img",{src:kC,alt:"API",className:"w-1/2 cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"API"})]}),re.jsxs(Yl,{to:"/testplayer",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-rose-500/50 bg-black/50":"hover:border-l-rose-500/50 hover:bg-white/5"}`,children:[re.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:re.jsx("img",{src:DC,alt:"Test Player",className:"w-1/2 cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"Test Player"})]}),re.jsx("div",{className:"mt-auto",children:re.jsxs(Yl,{to:"/account",className:({isActive:R})=>`flex flex-row p-3 border-l-3 ${R?"border-l-yellow-500/50 bg-black/50":"hover:border-l-yellow-500/50 hover:bg-white/5"}`,children:[re.jsx("button",{className:"w-1/3 p-3 flex flex-col items-center justify-center cursor-pointer",children:re.jsx("img",{src:OC,alt:"Account",className:"w-1/2 cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold flex items-center justify-start",children:"My Account"})]})})]}),re.jsxs("div",{className:"flex flex-row w-full h-16 bg-black/25",children:[re.jsx("a",{href:A.discord,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:re.jsx("img",{src:RC,alt:"Discord",className:"w-1/2 group-hover:animate-bounce"})}),re.jsx("a",{href:A.telegram,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:re.jsx("img",{src:MC,alt:"Telegram",className:"w-1/2 group-hover:animate-bounce"})}),re.jsx("a",{href:A.gitea,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:re.jsx("img",{src:NC,alt:"Gitea",className:"w-1/2 group-hover:animate-bounce"})})]})]})}const bR="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 IR({setIsMenuOpen:A}){const b=()=>{A(R=>!R)};return re.jsxs("div",{className:"flex flex-row w-full h-full bg-white/1",children:[re.jsx("button",{className:"w-24 p-4",onClick:b,children:re.jsx("img",{src:bR,alt:"Menu",className:"w-full h-full cursor-pointer"})}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),re.jsx("div",{className:"w-24 p-4"})]})}const kR="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 DR({isMenuOpen:A,setIsMenuOpen:b}){const[R,S]=Se.useState({discord:"#",telegram:"#",gitea:"#"});return Se.useEffect(()=>{fetch("/api/links").then(x=>x.json()).then(x=>S(x)).catch(x=>console.error("Failed to fetch links:",x))},[]),re.jsx("div",{className:`flex flex-col fixed top-0 left-0 w-full h-full bg-black transition-transform transform ${A?"translate-x-0":"-translate-x-full"} z-50`,style:{transitionDuration:"0.3s"},children:re.jsxs("div",{className:"flex flex-col bg-gray-950/55 h-full",children:[re.jsxs("div",{className:"h-16 w-full border-b-2 border-white/5 flex flex-row",children:[re.jsx("div",{className:"w-1/4 h-full"}),re.jsx("p",{className:"grow text-white md:text-2xl font-bold text-center flex items-center justify-center p-4",children:"CDRM-Project"}),re.jsx("div",{className:"w-1/4 h-full",children:re.jsx("button",{className:"w-full h-full flex items-center justify-center",onClick:()=>b(!1),children:re.jsx("img",{src:kR,alt:"Close",className:"w-1/2 h-1/2 cursor-pointer"})})})]}),re.jsxs("div",{className:"overflow-y-auto flex flex-col p-5 w-full flex-grow",children:[re.jsxs("div",{className:"flex flex-col space-y-2",children:[re.jsxs(Yl,{to:"/",className:({isActive:x})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${x?"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:()=>b(!1),children:[re.jsx("img",{src:bC,alt:"Home",className:"w-5 h-5"}),re.jsx("span",{className:"text-lg",children:"Home"})]}),re.jsxs(Yl,{to:"/cache",className:({isActive:x})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${x?"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:()=>b(!1),children:[re.jsx("img",{src:IC,alt:"Cache",className:"w-5 h-5"}),re.jsx("span",{className:"text-lg",children:"Cache"})]}),re.jsxs(Yl,{to:"/api",className:({isActive:x})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${x?"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:()=>b(!1),children:[re.jsx("img",{src:kC,alt:"API",className:"w-5 h-5"}),re.jsx("span",{className:"text-lg",children:"API"})]}),re.jsxs(Yl,{to:"/testplayer",className:({isActive:x})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${x?"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:()=>b(!1),children:[re.jsx("img",{src:DC,alt:"Test Player",className:"w-5 h-5"}),re.jsx("span",{className:"text-lg",children:"Test Player"})]})]}),re.jsx("div",{className:"mt-auto pt-4",children:re.jsxs(Yl,{to:"/account",className:({isActive:x})=>`flex flex-row items-center gap-3 p-3 border-l-4 ${x?"border-l-yellow-500/50 bg-black/50 text-white":"border-transparent hover:border-l-yellow-500/50 hover:bg-white/5 text-white/80"}`,onClick:()=>b(!1),children:[re.jsx("img",{src:OC,alt:"My Account",className:"w-5 h-5"}),re.jsx("span",{className:"text-lg",children:"My Account"})]})})]}),re.jsxs("div",{className:"h-16 w-full flex flex-row bg-black/5",children:[re.jsx("a",{href:R.discord,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-950 group",children:re.jsx("img",{src:RC,alt:"Discord",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),re.jsx("a",{href:R.telegram,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-blue-400 group",children:re.jsx("img",{src:MC,alt:"Telegram",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})}),re.jsx("a",{href:R.gitea,target:"_blank",rel:"noopener noreferrer",className:"w-1/3 h-full flex items-center justify-center hover:bg-green-700 group",children:re.jsx("img",{src:NC,alt:"Gitea",className:"w-full h-2/3 p-1 cursor-pointer group-hover:animate-bounce"})})]})]})})}function OR(){const[A,b]=Se.useState(""),[R,S]=Se.useState(""),[x,U]=Se.useState(""),O=p=>/^[A-Za-z0-9_-]+$/.test(p),h=p=>/^\S+$/.test(p);Se.useEffect(()=>{document.title="Register | CDRM-Project"},[]);const s=async()=>{if(!O(A)){U("Invalid username. Use only letters, numbers, hyphens, or underscores.");return}if(!h(R)){U("Invalid password. Spaces are not allowed.");return}try{const v=await(await fetch("/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:A,password:R})})).json();v.message?U(v.message):v.error&&U(v.error)}catch{U("An error occurred while registering.")}},u=async()=>{if(!O(A)){U("Invalid username. Use only letters, numbers, hyphens, or underscores.");return}if(!h(R)){U("Invalid password. Spaces are not allowed.");return}try{const v=await(await fetch("/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:A,password:R})})).json();v.message?window.location.reload():v.error&&U(v.error)}catch{U("An error occurred while logging in.")}};return re.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center p-4",children:re.jsxs("div",{className:"flex flex-col w-full h-full lg:w-1/2 lg:h-96 border-2 border-yellow-500/50 rounded-2xl p-4 overflow-x-auto justify-center items-center",children:[re.jsxs("div",{className:"flex flex-col w-full",children:[re.jsx("label",{htmlFor:"username",className:"text-lg font-bold mb-2 text-white",children:"Username:"}),re.jsx("input",{type:"text",value:A,onChange:p=>b(p.target.value),placeholder:"Username",className:"mb-4 p-2 border border-gray-300 rounded text-white bg-transparent"}),re.jsx("label",{htmlFor:"password",className:"text-lg font-bold mb-2 text-white",children:"Password:"}),re.jsx("input",{type:"password",value:R,onChange:p=>S(p.target.value),placeholder:"Password",className:"mb-4 p-2 border border-gray-300 rounded text-white bg-transparent"})]}),re.jsxs("div",{className:"flex flex-col lg:flex-row w-8/10 items-center lg:justify-between mt-4",children:[re.jsx("button",{onClick:u,className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded mt-4 w-1/3",children:"Login"}),re.jsx("button",{onClick:s,className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded mt-4 w-1/3",children:"Register"})]}),x&&re.jsx("p",{className:"text-sm text-white mt-4 p-4",children:x})]})})}function PC(A,b){return function(){return A.apply(b,arguments)}}const{toString:RR}=Object.prototype,{getPrototypeOf:_2}=Object,{iterator:hv,toStringTag:LC}=Symbol,yv=(A=>b=>{const R=RR.call(b);return A[R]||(A[R]=R.slice(8,-1).toLowerCase())})(Object.create(null)),Wl=A=>(A=A.toLowerCase(),b=>yv(b)===A),gv=A=>b=>typeof b===A,{isArray:Lp}=Array,sg=gv("undefined");function MR(A){return A!==null&&!sg(A)&&A.constructor!==null&&!sg(A.constructor)&&to(A.constructor.isBuffer)&&A.constructor.isBuffer(A)}const _C=Wl("ArrayBuffer");function NR(A){let b;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?b=ArrayBuffer.isView(A):b=A&&A.buffer&&_C(A.buffer),b}const PR=gv("string"),to=gv("function"),UC=gv("number"),mv=A=>A!==null&&typeof A=="object",LR=A=>A===!0||A===!1,lv=A=>{if(yv(A)!=="object")return!1;const b=_2(A);return(b===null||b===Object.prototype||Object.getPrototypeOf(b)===null)&&!(LC in A)&&!(hv in A)},_R=Wl("Date"),UR=Wl("File"),jR=Wl("Blob"),BR=Wl("FileList"),VR=A=>mv(A)&&to(A.pipe),HR=A=>{let b;return A&&(typeof FormData=="function"&&A instanceof FormData||to(A.append)&&((b=yv(A))==="formdata"||b==="object"&&to(A.toString)&&A.toString()==="[object FormData]"))},KR=Wl("URLSearchParams"),[GR,FR,qR,zR]=["ReadableStream","Request","Response","Headers"].map(Wl),XR=A=>A.trim?A.trim():A.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pg(A,b,{allOwnKeys:R=!1}={}){if(A===null||typeof A>"u")return;let S,x;if(typeof A!="object"&&(A=[A]),Lp(A))for(S=0,x=A.length;S<x;S++)b.call(null,A[S],S,A);else{const U=R?Object.getOwnPropertyNames(A):Object.keys(A),O=U.length;let h;for(S=0;S<O;S++)h=U[S],b.call(null,A[h],h,A)}}function jC(A,b){b=b.toLowerCase();const R=Object.keys(A);let S=R.length,x;for(;S-- >0;)if(x=R[S],b===x.toLowerCase())return x;return null}const Nf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BC=A=>!sg(A)&&A!==Nf;function A2(){const{caseless:A}=BC(this)&&this||{},b={},R=(S,x)=>{const U=A&&jC(b,x)||x;lv(b[U])&&lv(S)?b[U]=A2(b[U],S):lv(S)?b[U]=A2({},S):Lp(S)?b[U]=S.slice():b[U]=S};for(let S=0,x=arguments.length;S<x;S++)arguments[S]&&pg(arguments[S],R);return b}const YR=(A,b,R,{allOwnKeys:S}={})=>(pg(b,(x,U)=>{R&&to(x)?A[U]=PC(x,R):A[U]=x},{allOwnKeys:S}),A),WR=A=>(A.charCodeAt(0)===65279&&(A=A.slice(1)),A),QR=(A,b,R,S)=>{A.prototype=Object.create(b.prototype,S),A.prototype.constructor=A,Object.defineProperty(A,"super",{value:b.prototype}),R&&Object.assign(A.prototype,R)},JR=(A,b,R,S)=>{let x,U,O;const h={};if(b=b||{},A==null)return b;do{for(x=Object.getOwnPropertyNames(A),U=x.length;U-- >0;)O=x[U],(!S||S(O,A,b))&&!h[O]&&(b[O]=A[O],h[O]=!0);A=R!==!1&&_2(A)}while(A&&(!R||R(A,b))&&A!==Object.prototype);return b},ZR=(A,b,R)=>{A=String(A),(R===void 0||R>A.length)&&(R=A.length),R-=b.length;const S=A.indexOf(b,R);return S!==-1&&S===R},$R=A=>{if(!A)return null;if(Lp(A))return A;let b=A.length;if(!UC(b))return null;const R=new Array(b);for(;b-- >0;)R[b]=A[b];return R},eM=(A=>b=>A&&b instanceof A)(typeof Uint8Array<"u"&&_2(Uint8Array)),tM=(A,b)=>{const S=(A&&A[hv]).call(A);let x;for(;(x=S.next())&&!x.done;){const U=x.value;b.call(A,U[0],U[1])}},nM=(A,b)=>{let R;const S=[];for(;(R=A.exec(b))!==null;)S.push(R);return S},iM=Wl("HTMLFormElement"),rM=A=>A.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(R,S,x){return S.toUpperCase()+x}),WA=(({hasOwnProperty:A})=>(b,R)=>A.call(b,R))(Object.prototype),oM=Wl("RegExp"),VC=(A,b)=>{const R=Object.getOwnPropertyDescriptors(A),S={};pg(R,(x,U)=>{let O;(O=b(x,U,A))!==!1&&(S[U]=O||x)}),Object.defineProperties(A,S)},lM=A=>{VC(A,(b,R)=>{if(to(A)&&["arguments","caller","callee"].indexOf(R)!==-1)return!1;const S=A[R];if(to(S)){if(b.enumerable=!1,"writable"in b){b.writable=!1;return}b.set||(b.set=()=>{throw Error("Can not rewrite read-only method '"+R+"'")})}})},uM=(A,b)=>{const R={},S=x=>{x.forEach(U=>{R[U]=!0})};return Lp(A)?S(A):S(String(A).split(b)),R},aM=()=>{},sM=(A,b)=>A!=null&&Number.isFinite(A=+A)?A:b;function cM(A){return!!(A&&to(A.append)&&A[LC]==="FormData"&&A[hv])}const fM=A=>{const b=new Array(10),R=(S,x)=>{if(mv(S)){if(b.indexOf(S)>=0)return;if(!("toJSON"in S)){b[x]=S;const U=Lp(S)?[]:{};return pg(S,(O,h)=>{const s=R(O,x+1);!sg(s)&&(U[h]=s)}),b[x]=void 0,U}}return S};return R(A,0)},dM=Wl("AsyncFunction"),pM=A=>A&&(mv(A)||to(A))&&to(A.then)&&to(A.catch),HC=((A,b)=>A?setImmediate:b?((R,S)=>(Nf.addEventListener("message",({source:x,data:U})=>{x===Nf&&U===R&&S.length&&S.shift()()},!1),x=>{S.push(x),Nf.postMessage(R,"*")}))(`axios@${Math.random()}`,[]):R=>setTimeout(R))(typeof setImmediate=="function",to(Nf.postMessage)),hM=typeof queueMicrotask<"u"?queueMicrotask.bind(Nf):typeof process<"u"&&process.nextTick||HC,yM=A=>A!=null&&to(A[hv]),Ae={isArray:Lp,isArrayBuffer:_C,isBuffer:MR,isFormData:HR,isArrayBufferView:NR,isString:PR,isNumber:UC,isBoolean:LR,isObject:mv,isPlainObject:lv,isReadableStream:GR,isRequest:FR,isResponse:qR,isHeaders:zR,isUndefined:sg,isDate:_R,isFile:UR,isBlob:jR,isRegExp:oM,isFunction:to,isStream:VR,isURLSearchParams:KR,isTypedArray:eM,isFileList:BR,forEach:pg,merge:A2,extend:YR,trim:XR,stripBOM:WR,inherits:QR,toFlatObject:JR,kindOf:yv,kindOfTest:Wl,endsWith:ZR,toArray:$R,forEachEntry:tM,matchAll:nM,isHTMLForm:iM,hasOwnProperty:WA,hasOwnProp:WA,reduceDescriptors:VC,freezeMethods:lM,toObjectSet:uM,toCamelCase:rM,noop:aM,toFiniteNumber:sM,findKey:jC,global:Nf,isContextDefined:BC,isSpecCompliantForm:cM,toJSONObject:fM,isAsyncFn:dM,isThenable:pM,setImmediate:HC,asap:hM,isIterable:yM};function jt(A,b,R,S,x){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=A,this.name="AxiosError",b&&(this.code=b),R&&(this.config=R),S&&(this.request=S),x&&(this.response=x,this.status=x.status?x.status:null)}Ae.inherits(jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const KC=jt.prototype,GC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(A=>{GC[A]={value:A}});Object.defineProperties(jt,GC);Object.defineProperty(KC,"isAxiosError",{value:!0});jt.from=(A,b,R,S,x,U)=>{const O=Object.create(KC);return Ae.toFlatObject(A,O,function(s){return s!==Error.prototype},h=>h!=="isAxiosError"),jt.call(O,A.message,b,R,S,x),O.cause=A,O.name=A.name,U&&Object.assign(O,U),O};const gM=null;function C2(A){return Ae.isPlainObject(A)||Ae.isArray(A)}function FC(A){return Ae.endsWith(A,"[]")?A.slice(0,-2):A}function QA(A,b,R){return A?A.concat(b).map(function(x,U){return x=FC(x),!R&&U?"["+x+"]":x}).join(R?".":""):b}function mM(A){return Ae.isArray(A)&&!A.some(C2)}const vM=Ae.toFlatObject(Ae,{},null,function(b){return/^is[A-Z]/.test(b)});function vv(A,b,R){if(!Ae.isObject(A))throw new TypeError("target must be an object");b=b||new FormData,R=Ae.toFlatObject(R,{metaTokens:!0,dots:!1,indexes:!1},!1,function($,oe){return!Ae.isUndefined(oe[$])});const S=R.metaTokens,x=R.visitor||p,U=R.dots,O=R.indexes,s=(R.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(b);if(!Ae.isFunction(x))throw new TypeError("visitor must be a function");function u(C){if(C===null)return"";if(Ae.isDate(C))return C.toISOString();if(Ae.isBoolean(C))return C.toString();if(!s&&Ae.isBlob(C))throw new jt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(C)||Ae.isTypedArray(C)?s&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function p(C,$,oe){let me=C;if(C&&!oe&&typeof C=="object"){if(Ae.endsWith($,"{}"))$=S?$:$.slice(0,-2),C=JSON.stringify(C);else if(Ae.isArray(C)&&mM(C)||(Ae.isFileList(C)||Ae.endsWith($,"[]"))&&(me=Ae.toArray(C)))return $=FC($),me.forEach(function(ue,Ne){!(Ae.isUndefined(ue)||ue===null)&&b.append(O===!0?QA([$],Ne,U):O===null?$:$+"[]",u(ue))}),!1}return C2(C)?!0:(b.append(QA(oe,$,U),u(C)),!1)}const v=[],N=Object.assign(vM,{defaultVisitor:p,convertValue:u,isVisitable:C2});function Z(C,$){if(!Ae.isUndefined(C)){if(v.indexOf(C)!==-1)throw Error("Circular reference detected in "+$.join("."));v.push(C),Ae.forEach(C,function(me,Ve){(!(Ae.isUndefined(me)||me===null)&&x.call(b,me,Ae.isString(Ve)?Ve.trim():Ve,$,N))===!0&&Z(me,$?$.concat(Ve):[Ve])}),v.pop()}}if(!Ae.isObject(A))throw new TypeError("data must be an object");return Z(A),b}function JA(A){const b={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(A).replace(/[!'()~]|%20|%00/g,function(S){return b[S]})}function U2(A,b){this._pairs=[],A&&vv(A,this,b)}const qC=U2.prototype;qC.append=function(b,R){this._pairs.push([b,R])};qC.toString=function(b){const R=b?function(S){return b.call(this,S,JA)}:JA;return this._pairs.map(function(x){return R(x[0])+"="+R(x[1])},"").join("&")};function SM(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zC(A,b,R){if(!b)return A;const S=R&&R.encode||SM;Ae.isFunction(R)&&(R={serialize:R});const x=R&&R.serialize;let U;if(x?U=x(b,R):U=Ae.isURLSearchParams(b)?b.toString():new U2(b,R).toString(S),U){const O=A.indexOf("#");O!==-1&&(A=A.slice(0,O)),A+=(A.indexOf("?")===-1?"?":"&")+U}return A}class ZA{constructor(){this.handlers=[]}use(b,R,S){return this.handlers.push({fulfilled:b,rejected:R,synchronous:S?S.synchronous:!1,runWhen:S?S.runWhen:null}),this.handlers.length-1}eject(b){this.handlers[b]&&(this.handlers[b]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(b){Ae.forEach(this.handlers,function(S){S!==null&&b(S)})}}const XC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wM=typeof URLSearchParams<"u"?URLSearchParams:U2,TM=typeof FormData<"u"?FormData:null,xM=typeof Blob<"u"?Blob:null,EM={isBrowser:!0,classes:{URLSearchParams:wM,FormData:TM,Blob:xM},protocols:["http","https","file","blob","url","data"]},j2=typeof window<"u"&&typeof document<"u",b2=typeof navigator=="object"&&navigator||void 0,AM=j2&&(!b2||["ReactNative","NativeScript","NS"].indexOf(b2.product)<0),CM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bM=j2&&window.location.href||"http://localhost",IM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:j2,hasStandardBrowserEnv:AM,hasStandardBrowserWebWorkerEnv:CM,navigator:b2,origin:bM},Symbol.toStringTag,{value:"Module"})),hr={...IM,...EM};function kM(A,b){return vv(A,new hr.classes.URLSearchParams,Object.assign({visitor:function(R,S,x,U){return hr.isNode&&Ae.isBuffer(R)?(this.append(S,R.toString("base64")),!1):U.defaultVisitor.apply(this,arguments)}},b))}function DM(A){return Ae.matchAll(/\w+|\[(\w*)]/g,A).map(b=>b[0]==="[]"?"":b[1]||b[0])}function OM(A){const b={},R=Object.keys(A);let S;const x=R.length;let U;for(S=0;S<x;S++)U=R[S],b[U]=A[U];return b}function YC(A){function b(R,S,x,U){let O=R[U++];if(O==="__proto__")return!0;const h=Number.isFinite(+O),s=U>=R.length;return O=!O&&Ae.isArray(x)?x.length:O,s?(Ae.hasOwnProp(x,O)?x[O]=[x[O],S]:x[O]=S,!h):((!x[O]||!Ae.isObject(x[O]))&&(x[O]=[]),b(R,S,x[O],U)&&Ae.isArray(x[O])&&(x[O]=OM(x[O])),!h)}if(Ae.isFormData(A)&&Ae.isFunction(A.entries)){const R={};return Ae.forEachEntry(A,(S,x)=>{b(DM(S),x,R,0)}),R}return null}function RM(A,b,R){if(Ae.isString(A))try{return(b||JSON.parse)(A),Ae.trim(A)}catch(S){if(S.name!=="SyntaxError")throw S}return(R||JSON.stringify)(A)}const hg={transitional:XC,adapter:["xhr","http","fetch"],transformRequest:[function(b,R){const S=R.getContentType()||"",x=S.indexOf("application/json")>-1,U=Ae.isObject(b);if(U&&Ae.isHTMLForm(b)&&(b=new FormData(b)),Ae.isFormData(b))return x?JSON.stringify(YC(b)):b;if(Ae.isArrayBuffer(b)||Ae.isBuffer(b)||Ae.isStream(b)||Ae.isFile(b)||Ae.isBlob(b)||Ae.isReadableStream(b))return b;if(Ae.isArrayBufferView(b))return b.buffer;if(Ae.isURLSearchParams(b))return R.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),b.toString();let h;if(U){if(S.indexOf("application/x-www-form-urlencoded")>-1)return kM(b,this.formSerializer).toString();if((h=Ae.isFileList(b))||S.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return vv(h?{"files[]":b}:b,s&&new s,this.formSerializer)}}return U||x?(R.setContentType("application/json",!1),RM(b)):b}],transformResponse:[function(b){const R=this.transitional||hg.transitional,S=R&&R.forcedJSONParsing,x=this.responseType==="json";if(Ae.isResponse(b)||Ae.isReadableStream(b))return b;if(b&&Ae.isString(b)&&(S&&!this.responseType||x)){const O=!(R&&R.silentJSONParsing)&&x;try{return JSON.parse(b)}catch(h){if(O)throw h.name==="SyntaxError"?jt.from(h,jt.ERR_BAD_RESPONSE,this,null,this.response):h}}return b}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:hr.classes.FormData,Blob:hr.classes.Blob},validateStatus:function(b){return b>=200&&b<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],A=>{hg.headers[A]={}});const MM=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),NM=A=>{const b={};let R,S,x;return A&&A.split(`
`).forEach(function(O){x=O.indexOf(":"),R=O.substring(0,x).trim().toLowerCase(),S=O.substring(x+1).trim(),!(!R||b[R]&&MM[R])&&(R==="set-cookie"?b[R]?b[R].push(S):b[R]=[S]:b[R]=b[R]?b[R]+", "+S:S)}),b},$A=Symbol("internals");function og(A){return A&&String(A).trim().toLowerCase()}function uv(A){return A===!1||A==null?A:Ae.isArray(A)?A.map(uv):String(A)}function PM(A){const b=Object.create(null),R=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let S;for(;S=R.exec(A);)b[S[1]]=S[2];return b}const LM=A=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(A.trim());function m2(A,b,R,S,x){if(Ae.isFunction(S))return S.call(this,b,R);if(x&&(b=R),!!Ae.isString(b)){if(Ae.isString(S))return b.indexOf(S)!==-1;if(Ae.isRegExp(S))return S.test(b)}}function _M(A){return A.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(b,R,S)=>R.toUpperCase()+S)}function UM(A,b){const R=Ae.toCamelCase(" "+b);["get","set","has"].forEach(S=>{Object.defineProperty(A,S+R,{value:function(x,U,O){return this[S].call(this,b,x,U,O)},configurable:!0})})}let no=class{constructor(b){b&&this.set(b)}set(b,R,S){const x=this;function U(h,s,u){const p=og(s);if(!p)throw new Error("header name must be a non-empty string");const v=Ae.findKey(x,p);(!v||x[v]===void 0||u===!0||u===void 0&&x[v]!==!1)&&(x[v||s]=uv(h))}const O=(h,s)=>Ae.forEach(h,(u,p)=>U(u,p,s));if(Ae.isPlainObject(b)||b instanceof this.constructor)O(b,R);else if(Ae.isString(b)&&(b=b.trim())&&!LM(b))O(NM(b),R);else if(Ae.isObject(b)&&Ae.isIterable(b)){let h={},s,u;for(const p of b){if(!Ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");h[u=p[0]]=(s=h[u])?Ae.isArray(s)?[...s,p[1]]:[s,p[1]]:p[1]}O(h,R)}else b!=null&&U(R,b,S);return this}get(b,R){if(b=og(b),b){const S=Ae.findKey(this,b);if(S){const x=this[S];if(!R)return x;if(R===!0)return PM(x);if(Ae.isFunction(R))return R.call(this,x,S);if(Ae.isRegExp(R))return R.exec(x);throw new TypeError("parser must be boolean|regexp|function")}}}has(b,R){if(b=og(b),b){const S=Ae.findKey(this,b);return!!(S&&this[S]!==void 0&&(!R||m2(this,this[S],S,R)))}return!1}delete(b,R){const S=this;let x=!1;function U(O){if(O=og(O),O){const h=Ae.findKey(S,O);h&&(!R||m2(S,S[h],h,R))&&(delete S[h],x=!0)}}return Ae.isArray(b)?b.forEach(U):U(b),x}clear(b){const R=Object.keys(this);let S=R.length,x=!1;for(;S--;){const U=R[S];(!b||m2(this,this[U],U,b,!0))&&(delete this[U],x=!0)}return x}normalize(b){const R=this,S={};return Ae.forEach(this,(x,U)=>{const O=Ae.findKey(S,U);if(O){R[O]=uv(x),delete R[U];return}const h=b?_M(U):String(U).trim();h!==U&&delete R[U],R[h]=uv(x),S[h]=!0}),this}concat(...b){return this.constructor.concat(this,...b)}toJSON(b){const R=Object.create(null);return Ae.forEach(this,(S,x)=>{S!=null&&S!==!1&&(R[x]=b&&Ae.isArray(S)?S.join(", "):S)}),R}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([b,R])=>b+": "+R).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(b){return b instanceof this?b:new this(b)}static concat(b,...R){const S=new this(b);return R.forEach(x=>S.set(x)),S}static accessor(b){const S=(this[$A]=this[$A]={accessors:{}}).accessors,x=this.prototype;function U(O){const h=og(O);S[h]||(UM(x,O),S[h]=!0)}return Ae.isArray(b)?b.forEach(U):U(b),this}};no.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ae.reduceDescriptors(no.prototype,({value:A},b)=>{let R=b[0].toUpperCase()+b.slice(1);return{get:()=>A,set(S){this[R]=S}}});Ae.freezeMethods(no);function v2(A,b){const R=this||hg,S=b||R,x=no.from(S.headers);let U=S.data;return Ae.forEach(A,function(h){U=h.call(R,U,x.normalize(),b?b.status:void 0)}),x.normalize(),U}function WC(A){return!!(A&&A.__CANCEL__)}function _p(A,b,R){jt.call(this,A??"canceled",jt.ERR_CANCELED,b,R),this.name="CanceledError"}Ae.inherits(_p,jt,{__CANCEL__:!0});function QC(A,b,R){const S=R.config.validateStatus;!R.status||!S||S(R.status)?A(R):b(new jt("Request failed with status code "+R.status,[jt.ERR_BAD_REQUEST,jt.ERR_BAD_RESPONSE][Math.floor(R.status/100)-4],R.config,R.request,R))}function jM(A){const b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(A);return b&&b[1]||""}function BM(A,b){A=A||10;const R=new Array(A),S=new Array(A);let x=0,U=0,O;return b=b!==void 0?b:1e3,function(s){const u=Date.now(),p=S[U];O||(O=u),R[x]=s,S[x]=u;let v=U,N=0;for(;v!==x;)N+=R[v++],v=v%A;if(x=(x+1)%A,x===U&&(U=(U+1)%A),u-O<b)return;const Z=p&&u-p;return Z?Math.round(N*1e3/Z):void 0}}function VM(A,b){let R=0,S=1e3/b,x,U;const O=(u,p=Date.now())=>{R=p,x=null,U&&(clearTimeout(U),U=null),A.apply(null,u)};return[(...u)=>{const p=Date.now(),v=p-R;v>=S?O(u,p):(x=u,U||(U=setTimeout(()=>{U=null,O(x)},S-v)))},()=>x&&O(x)]}const cv=(A,b,R=3)=>{let S=0;const x=BM(50,250);return VM(U=>{const O=U.loaded,h=U.lengthComputable?U.total:void 0,s=O-S,u=x(s),p=O<=h;S=O;const v={loaded:O,total:h,progress:h?O/h:void 0,bytes:s,rate:u||void 0,estimated:u&&h&&p?(h-O)/u:void 0,event:U,lengthComputable:h!=null,[b?"download":"upload"]:!0};A(v)},R)},eC=(A,b)=>{const R=A!=null;return[S=>b[0]({lengthComputable:R,total:A,loaded:S}),b[1]]},tC=A=>(...b)=>Ae.asap(()=>A(...b)),HM=hr.hasStandardBrowserEnv?((A,b)=>R=>(R=new URL(R,hr.origin),A.protocol===R.protocol&&A.host===R.host&&(b||A.port===R.port)))(new URL(hr.origin),hr.navigator&&/(msie|trident)/i.test(hr.navigator.userAgent)):()=>!0,KM=hr.hasStandardBrowserEnv?{write(A,b,R,S,x,U){const O=[A+"="+encodeURIComponent(b)];Ae.isNumber(R)&&O.push("expires="+new Date(R).toGMTString()),Ae.isString(S)&&O.push("path="+S),Ae.isString(x)&&O.push("domain="+x),U===!0&&O.push("secure"),document.cookie=O.join("; ")},read(A){const b=document.cookie.match(new RegExp("(^|;\\s*)("+A+")=([^;]*)"));return b?decodeURIComponent(b[3]):null},remove(A){this.write(A,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function GM(A){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(A)}function FM(A,b){return b?A.replace(/\/?\/$/,"")+"/"+b.replace(/^\/+/,""):A}function JC(A,b,R){let S=!GM(b);return A&&(S||R==!1)?FM(A,b):b}const nC=A=>A instanceof no?{...A}:A;function Lf(A,b){b=b||{};const R={};function S(u,p,v,N){return Ae.isPlainObject(u)&&Ae.isPlainObject(p)?Ae.merge.call({caseless:N},u,p):Ae.isPlainObject(p)?Ae.merge({},p):Ae.isArray(p)?p.slice():p}function x(u,p,v,N){if(Ae.isUndefined(p)){if(!Ae.isUndefined(u))return S(void 0,u,v,N)}else return S(u,p,v,N)}function U(u,p){if(!Ae.isUndefined(p))return S(void 0,p)}function O(u,p){if(Ae.isUndefined(p)){if(!Ae.isUndefined(u))return S(void 0,u)}else return S(void 0,p)}function h(u,p,v){if(v in b)return S(u,p);if(v in A)return S(void 0,u)}const s={url:U,method:U,data:U,baseURL:O,transformRequest:O,transformResponse:O,paramsSerializer:O,timeout:O,timeoutMessage:O,withCredentials:O,withXSRFToken:O,adapter:O,responseType:O,xsrfCookieName:O,xsrfHeaderName:O,onUploadProgress:O,onDownloadProgress:O,decompress:O,maxContentLength:O,maxBodyLength:O,beforeRedirect:O,transport:O,httpAgent:O,httpsAgent:O,cancelToken:O,socketPath:O,responseEncoding:O,validateStatus:h,headers:(u,p,v)=>x(nC(u),nC(p),v,!0)};return Ae.forEach(Object.keys(Object.assign({},A,b)),function(p){const v=s[p]||x,N=v(A[p],b[p],p);Ae.isUndefined(N)&&v!==h||(R[p]=N)}),R}const ZC=A=>{const b=Lf({},A);let{data:R,withXSRFToken:S,xsrfHeaderName:x,xsrfCookieName:U,headers:O,auth:h}=b;b.headers=O=no.from(O),b.url=zC(JC(b.baseURL,b.url,b.allowAbsoluteUrls),A.params,A.paramsSerializer),h&&O.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):"")));let s;if(Ae.isFormData(R)){if(hr.hasStandardBrowserEnv||hr.hasStandardBrowserWebWorkerEnv)O.setContentType(void 0);else if((s=O.getContentType())!==!1){const[u,...p]=s?s.split(";").map(v=>v.trim()).filter(Boolean):[];O.setContentType([u||"multipart/form-data",...p].join("; "))}}if(hr.hasStandardBrowserEnv&&(S&&Ae.isFunction(S)&&(S=S(b)),S||S!==!1&&HM(b.url))){const u=x&&U&&KM.read(U);u&&O.set(x,u)}return b},qM=typeof XMLHttpRequest<"u",zM=qM&&function(A){return new Promise(function(R,S){const x=ZC(A);let U=x.data;const O=no.from(x.headers).normalize();let{responseType:h,onUploadProgress:s,onDownloadProgress:u}=x,p,v,N,Z,C;function $(){Z&&Z(),C&&C(),x.cancelToken&&x.cancelToken.unsubscribe(p),x.signal&&x.signal.removeEventListener("abort",p)}let oe=new XMLHttpRequest;oe.open(x.method.toUpperCase(),x.url,!0),oe.timeout=x.timeout;function me(){if(!oe)return;const ue=no.from("getAllResponseHeaders"in oe&&oe.getAllResponseHeaders()),Re={data:!h||h==="text"||h==="json"?oe.responseText:oe.response,status:oe.status,statusText:oe.statusText,headers:ue,config:A,request:oe};QC(function(it){R(it),$()},function(it){S(it),$()},Re),oe=null}"onloadend"in oe?oe.onloadend=me:oe.onreadystatechange=function(){!oe||oe.readyState!==4||oe.status===0&&!(oe.responseURL&&oe.responseURL.indexOf("file:")===0)||setTimeout(me)},oe.onabort=function(){oe&&(S(new jt("Request aborted",jt.ECONNABORTED,A,oe)),oe=null)},oe.onerror=function(){S(new jt("Network Error",jt.ERR_NETWORK,A,oe)),oe=null},oe.ontimeout=function(){let Ne=x.timeout?"timeout of "+x.timeout+"ms exceeded":"timeout exceeded";const Re=x.transitional||XC;x.timeoutErrorMessage&&(Ne=x.timeoutErrorMessage),S(new jt(Ne,Re.clarifyTimeoutError?jt.ETIMEDOUT:jt.ECONNABORTED,A,oe)),oe=null},U===void 0&&O.setContentType(null),"setRequestHeader"in oe&&Ae.forEach(O.toJSON(),function(Ne,Re){oe.setRequestHeader(Re,Ne)}),Ae.isUndefined(x.withCredentials)||(oe.withCredentials=!!x.withCredentials),h&&h!=="json"&&(oe.responseType=x.responseType),u&&([N,C]=cv(u,!0),oe.addEventListener("progress",N)),s&&oe.upload&&([v,Z]=cv(s),oe.upload.addEventListener("progress",v),oe.upload.addEventListener("loadend",Z)),(x.cancelToken||x.signal)&&(p=ue=>{oe&&(S(!ue||ue.type?new _p(null,A,oe):ue),oe.abort(),oe=null)},x.cancelToken&&x.cancelToken.subscribe(p),x.signal&&(x.signal.aborted?p():x.signal.addEventListener("abort",p)));const Ve=jM(x.url);if(Ve&&hr.protocols.indexOf(Ve)===-1){S(new jt("Unsupported protocol "+Ve+":",jt.ERR_BAD_REQUEST,A));return}oe.send(U||null)})},XM=(A,b)=>{const{length:R}=A=A?A.filter(Boolean):[];if(b||R){let S=new AbortController,x;const U=function(u){if(!x){x=!0,h();const p=u instanceof Error?u:this.reason;S.abort(p instanceof jt?p:new _p(p instanceof Error?p.message:p))}};let O=b&&setTimeout(()=>{O=null,U(new jt(`timeout ${b} of ms exceeded`,jt.ETIMEDOUT))},b);const h=()=>{A&&(O&&clearTimeout(O),O=null,A.forEach(u=>{u.unsubscribe?u.unsubscribe(U):u.removeEventListener("abort",U)}),A=null)};A.forEach(u=>u.addEventListener("abort",U));const{signal:s}=S;return s.unsubscribe=()=>Ae.asap(h),s}},YM=function*(A,b){let R=A.byteLength;if(R<b){yield A;return}let S=0,x;for(;S<R;)x=S+b,yield A.slice(S,x),S=x},WM=async function*(A,b){for await(const R of QM(A))yield*YM(R,b)},QM=async function*(A){if(A[Symbol.asyncIterator]){yield*A;return}const b=A.getReader();try{for(;;){const{done:R,value:S}=await b.read();if(R)break;yield S}}finally{await b.cancel()}},iC=(A,b,R,S)=>{const x=WM(A,b);let U=0,O,h=s=>{O||(O=!0,S&&S(s))};return new ReadableStream({async pull(s){try{const{done:u,value:p}=await x.next();if(u){h(),s.close();return}let v=p.byteLength;if(R){let N=U+=v;R(N)}s.enqueue(new Uint8Array(p))}catch(u){throw h(u),u}},cancel(s){return h(s),x.return()}},{highWaterMark:2})},Sv=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$C=Sv&&typeof ReadableStream=="function",JM=Sv&&(typeof TextEncoder=="function"?(A=>b=>A.encode(b))(new TextEncoder):async A=>new Uint8Array(await new Response(A).arrayBuffer())),eb=(A,...b)=>{try{return!!A(...b)}catch{return!1}},ZM=$C&&eb(()=>{let A=!1;const b=new Request(hr.origin,{body:new ReadableStream,method:"POST",get duplex(){return A=!0,"half"}}).headers.has("Content-Type");return A&&!b}),rC=64*1024,I2=$C&&eb(()=>Ae.isReadableStream(new Response("").body)),fv={stream:I2&&(A=>A.body)};Sv&&(A=>{["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!fv[b]&&(fv[b]=Ae.isFunction(A[b])?R=>R[b]():(R,S)=>{throw new jt(`Response type '${b}' is not supported`,jt.ERR_NOT_SUPPORT,S)})})})(new Response);const $M=async A=>{if(A==null)return 0;if(Ae.isBlob(A))return A.size;if(Ae.isSpecCompliantForm(A))return(await new Request(hr.origin,{method:"POST",body:A}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(A)||Ae.isArrayBuffer(A))return A.byteLength;if(Ae.isURLSearchParams(A)&&(A=A+""),Ae.isString(A))return(await JM(A)).byteLength},eN=async(A,b)=>{const R=Ae.toFiniteNumber(A.getContentLength());return R??$M(b)},tN=Sv&&(async A=>{let{url:b,method:R,data:S,signal:x,cancelToken:U,timeout:O,onDownloadProgress:h,onUploadProgress:s,responseType:u,headers:p,withCredentials:v="same-origin",fetchOptions:N}=ZC(A);u=u?(u+"").toLowerCase():"text";let Z=XM([x,U&&U.toAbortSignal()],O),C;const $=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let oe;try{if(s&&ZM&&R!=="get"&&R!=="head"&&(oe=await eN(p,S))!==0){let Re=new Request(b,{method:"POST",body:S,duplex:"half"}),$e;if(Ae.isFormData(S)&&($e=Re.headers.get("content-type"))&&p.setContentType($e),Re.body){const[it,Dt]=eC(oe,cv(tC(s)));S=iC(Re.body,rC,it,Dt)}}Ae.isString(v)||(v=v?"include":"omit");const me="credentials"in Request.prototype;C=new Request(b,{...N,signal:Z,method:R.toUpperCase(),headers:p.normalize().toJSON(),body:S,duplex:"half",credentials:me?v:void 0});let Ve=await fetch(C,N);const ue=I2&&(u==="stream"||u==="response");if(I2&&(h||ue&&$)){const Re={};["status","statusText","headers"].forEach(_t=>{Re[_t]=Ve[_t]});const $e=Ae.toFiniteNumber(Ve.headers.get("content-length")),[it,Dt]=h&&eC($e,cv(tC(h),!0))||[];Ve=new Response(iC(Ve.body,rC,it,()=>{Dt&&Dt(),$&&$()}),Re)}u=u||"text";let Ne=await fv[Ae.findKey(fv,u)||"text"](Ve,A);return!ue&&$&&$(),await new Promise((Re,$e)=>{QC(Re,$e,{data:Ne,headers:no.from(Ve.headers),status:Ve.status,statusText:Ve.statusText,config:A,request:C})})}catch(me){throw $&&$(),me&&me.name==="TypeError"&&/Load failed|fetch/i.test(me.message)?Object.assign(new jt("Network Error",jt.ERR_NETWORK,A,C),{cause:me.cause||me}):jt.from(me,me&&me.code,A,C)}}),k2={http:gM,xhr:zM,fetch:tN};Ae.forEach(k2,(A,b)=>{if(A){try{Object.defineProperty(A,"name",{value:b})}catch{}Object.defineProperty(A,"adapterName",{value:b})}});const oC=A=>`- ${A}`,nN=A=>Ae.isFunction(A)||A===null||A===!1,tb={getAdapter:A=>{A=Ae.isArray(A)?A:[A];const{length:b}=A;let R,S;const x={};for(let U=0;U<b;U++){R=A[U];let O;if(S=R,!nN(R)&&(S=k2[(O=String(R)).toLowerCase()],S===void 0))throw new jt(`Unknown adapter '${O}'`);if(S)break;x[O||"#"+U]=S}if(!S){const U=Object.entries(x).map(([h,s])=>`adapter ${h} `+(s===!1?"is not supported by the environment":"is not available in the build"));let O=b?U.length>1?`since :
`+U.map(oC).join(`
`):" "+oC(U[0]):"as no adapter specified";throw new jt("There is no suitable adapter to dispatch the request "+O,"ERR_NOT_SUPPORT")}return S},adapters:k2};function S2(A){if(A.cancelToken&&A.cancelToken.throwIfRequested(),A.signal&&A.signal.aborted)throw new _p(null,A)}function lC(A){return S2(A),A.headers=no.from(A.headers),A.data=v2.call(A,A.transformRequest),["post","put","patch"].indexOf(A.method)!==-1&&A.headers.setContentType("application/x-www-form-urlencoded",!1),tb.getAdapter(A.adapter||hg.adapter)(A).then(function(S){return S2(A),S.data=v2.call(A,A.transformResponse,S),S.headers=no.from(S.headers),S},function(S){return WC(S)||(S2(A),S&&S.response&&(S.response.data=v2.call(A,A.transformResponse,S.response),S.response.headers=no.from(S.response.headers))),Promise.reject(S)})}const nb="1.10.0",wv={};["object","boolean","number","function","string","symbol"].forEach((A,b)=>{wv[A]=function(S){return typeof S===A||"a"+(b<1?"n ":" ")+A}});const uC={};wv.transitional=function(b,R,S){function x(U,O){return"[Axios v"+nb+"] Transitional option '"+U+"'"+O+(S?". "+S:"")}return(U,O,h)=>{if(b===!1)throw new jt(x(O," has been removed"+(R?" in "+R:"")),jt.ERR_DEPRECATED);return R&&!uC[O]&&(uC[O]=!0,console.warn(x(O," has been deprecated since v"+R+" and will be removed in the near future"))),b?b(U,O,h):!0}};wv.spelling=function(b){return(R,S)=>(console.warn(`${S} is likely a misspelling of ${b}`),!0)};function iN(A,b,R){if(typeof A!="object")throw new jt("options must be an object",jt.ERR_BAD_OPTION_VALUE);const S=Object.keys(A);let x=S.length;for(;x-- >0;){const U=S[x],O=b[U];if(O){const h=A[U],s=h===void 0||O(h,U,A);if(s!==!0)throw new jt("option "+U+" must be "+s,jt.ERR_BAD_OPTION_VALUE);continue}if(R!==!0)throw new jt("Unknown option "+U,jt.ERR_BAD_OPTION)}}const av={assertOptions:iN,validators:wv},Xu=av.validators;let Pf=class{constructor(b){this.defaults=b||{},this.interceptors={request:new ZA,response:new ZA}}async request(b,R){try{return await this._request(b,R)}catch(S){if(S instanceof Error){let x={};Error.captureStackTrace?Error.captureStackTrace(x):x=new Error;const U=x.stack?x.stack.replace(/^.+\n/,""):"";try{S.stack?U&&!String(S.stack).endsWith(U.replace(/^.+\n.+\n/,""))&&(S.stack+=`
`+U):S.stack=U}catch{}}throw S}}_request(b,R){typeof b=="string"?(R=R||{},R.url=b):R=b||{},R=Lf(this.defaults,R);const{transitional:S,paramsSerializer:x,headers:U}=R;S!==void 0&&av.assertOptions(S,{silentJSONParsing:Xu.transitional(Xu.boolean),forcedJSONParsing:Xu.transitional(Xu.boolean),clarifyTimeoutError:Xu.transitional(Xu.boolean)},!1),x!=null&&(Ae.isFunction(x)?R.paramsSerializer={serialize:x}:av.assertOptions(x,{encode:Xu.function,serialize:Xu.function},!0)),R.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?R.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:R.allowAbsoluteUrls=!0),av.assertOptions(R,{baseUrl:Xu.spelling("baseURL"),withXsrfToken:Xu.spelling("withXSRFToken")},!0),R.method=(R.method||this.defaults.method||"get").toLowerCase();let O=U&&Ae.merge(U.common,U[R.method]);U&&Ae.forEach(["delete","get","head","post","put","patch","common"],C=>{delete U[C]}),R.headers=no.concat(O,U);const h=[];let s=!0;this.interceptors.request.forEach(function($){typeof $.runWhen=="function"&&$.runWhen(R)===!1||(s=s&&$.synchronous,h.unshift($.fulfilled,$.rejected))});const u=[];this.interceptors.response.forEach(function($){u.push($.fulfilled,$.rejected)});let p,v=0,N;if(!s){const C=[lC.bind(this),void 0];for(C.unshift.apply(C,h),C.push.apply(C,u),N=C.length,p=Promise.resolve(R);v<N;)p=p.then(C[v++],C[v++]);return p}N=h.length;let Z=R;for(v=0;v<N;){const C=h[v++],$=h[v++];try{Z=C(Z)}catch(oe){$.call(this,oe);break}}try{p=lC.call(this,Z)}catch(C){return Promise.reject(C)}for(v=0,N=u.length;v<N;)p=p.then(u[v++],u[v++]);return p}getUri(b){b=Lf(this.defaults,b);const R=JC(b.baseURL,b.url,b.allowAbsoluteUrls);return zC(R,b.params,b.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(b){Pf.prototype[b]=function(R,S){return this.request(Lf(S||{},{method:b,url:R,data:(S||{}).data}))}});Ae.forEach(["post","put","patch"],function(b){function R(S){return function(U,O,h){return this.request(Lf(h||{},{method:b,headers:S?{"Content-Type":"multipart/form-data"}:{},url:U,data:O}))}}Pf.prototype[b]=R(),Pf.prototype[b+"Form"]=R(!0)});let rN=class ib{constructor(b){if(typeof b!="function")throw new TypeError("executor must be a function.");let R;this.promise=new Promise(function(U){R=U});const S=this;this.promise.then(x=>{if(!S._listeners)return;let U=S._listeners.length;for(;U-- >0;)S._listeners[U](x);S._listeners=null}),this.promise.then=x=>{let U;const O=new Promise(h=>{S.subscribe(h),U=h}).then(x);return O.cancel=function(){S.unsubscribe(U)},O},b(function(U,O,h){S.reason||(S.reason=new _p(U,O,h),R(S.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(b){if(this.reason){b(this.reason);return}this._listeners?this._listeners.push(b):this._listeners=[b]}unsubscribe(b){if(!this._listeners)return;const R=this._listeners.indexOf(b);R!==-1&&this._listeners.splice(R,1)}toAbortSignal(){const b=new AbortController,R=S=>{b.abort(S)};return this.subscribe(R),b.signal.unsubscribe=()=>this.unsubscribe(R),b.signal}static source(){let b;return{token:new ib(function(x){b=x}),cancel:b}}};function oN(A){return function(R){return A.apply(null,R)}}function lN(A){return Ae.isObject(A)&&A.isAxiosError===!0}const D2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(D2).forEach(([A,b])=>{D2[b]=A});function rb(A){const b=new Pf(A),R=PC(Pf.prototype.request,b);return Ae.extend(R,Pf.prototype,b,{allOwnKeys:!0}),Ae.extend(R,b,null,{allOwnKeys:!0}),R.create=function(x){return rb(Lf(A,x))},R}const jn=rb(hg);jn.Axios=Pf;jn.CanceledError=_p;jn.CancelToken=rN;jn.isCancel=WC;jn.VERSION=nb;jn.toFormData=vv;jn.AxiosError=jt;jn.Cancel=jn.CanceledError;jn.all=function(b){return Promise.all(b)};jn.spread=oN;jn.isAxiosError=lN;jn.mergeConfig=Lf;jn.AxiosHeaders=no;jn.formToJSON=A=>YC(Ae.isHTMLForm(A)?new FormData(A):A);jn.getAdapter=tb.getAdapter;jn.HttpStatusCode=D2;jn.default=jn;const{Axios:hN,AxiosError:yN,CanceledError:gN,isCancel:mN,CancelToken:vN,VERSION:SN,all:wN,Cancel:TN,isAxiosError:xN,spread:EN,toFormData:AN,AxiosHeaders:CN,HttpStatusCode:bN,formToJSON:IN,getAdapter:kN,mergeConfig:DN}=jn;function uN(){const[A,b]=Se.useState([]),[R,S]=Se.useState([]),[x,U]=Se.useState(!1),[O,h]=Se.useState(""),[s,u]=Se.useState(""),[p,v]=Se.useState(""),[N,Z]=Se.useState(""),[C,$]=Se.useState(""),[oe,me]=Se.useState(""),Ve=async()=>{try{const it=await jn.post("/userinfo");b(it.data.Widevine_Devices||[]),S(it.data.Playready_Devices||[]),h(it.data.Styled_Username||""),u(it.data.API_Key||"")}catch(it){console.error("Failed to fetch user info",it)}};Se.useEffect(()=>{Ve()},[]),Se.useEffect(()=>{document.title="My account | CDRM-Project"},[]);const ue=async(it,Dt)=>{const _t=it.target.files[0];if(!_t)return;const _=_t.name.split(".").pop();if(Dt==="PR"&&_!=="prd"||Dt==="WV"&&_!=="wvd"){alert(`Please upload a .${Dt==="PR"?"prd":"wvd"} file.`);return}const ce=new FormData;ce.append("file",_t),U(!0);try{await jn.post(`/upload/${Dt}`,ce),await Ve()}catch(he){console.error("Upload failed",he),alert("Upload failed")}finally{U(!1)}},Ne=async()=>{try{await jn.post("/logout"),window.location.reload()}catch(it){console.error("Logout failed:",it),alert("Logout failed!")}},Re=async()=>{if(N||p===""){alert("Please enter a valid password.");return}try{(await jn.post("/user/change_password",{new_password:p})).data.message==="True"?(alert("Password changed successfully."),v("")):alert("Failed to change password.")}catch(it){it.response&&it.response.data?.message==="Invalid password format"?alert("Password format is invalid. Please try again."):alert("Error occurred while changing password.")}},$e=async()=>{if(oe||C===""){alert("Please enter a valid API key.");return}try{(await jn.post("/user/change_api_key",{new_api_key:C})).data.message==="True"?(alert("API key changed successfully."),u(C),$("")):alert("Failed to change API key.")}catch(it){alert("Error occurred while changing API key."),console.error(it)}};return re.jsxs("div",{id:"myaccount",className:"flex flex-col lg:flex-row gap-4 w-full min-h-full overflow-y-auto p-4",children:[re.jsxs("div",{className:"flex-col w-full min-h-164 lg:h-full lg:w-96 border-2 border-yellow-500/50 rounded-2xl p-4 flex items-center overflow-y-auto",children:[re.jsx("h1",{className:"text-2xl font-bold text-white border-b-2 border-white p-2 w-full text-center mb-2",children:O?`${O}`:"My Account"}),re.jsxs("div",{className:"w-full flex flex-col items-center",children:[re.jsx("label",{htmlFor:"apiKey",className:"text-white font-semibold mb-1",children:"API Key"}),re.jsx("input",{id:"apiKey",type:"text",value:s,readOnly:!0,className:"w-full p-2 mb-4 rounded bg-gray-800 text-white border border-gray-600 text-center"}),re.jsx("label",{htmlFor:"newApiKey",className:"text-white font-semibold mt-4 mb-1",children:"New API Key"}),re.jsx("input",{id:"newApiKey",type:"text",value:C,onChange:it=>{const Dt=it.target.value,_t=/^[^\s]+$/.test(Dt);me(_t?"":"API key must not contain spaces."),$(Dt)},placeholder:"Enter new API key",className:"w-full p-2 mb-1 rounded bg-gray-800 text-white border border-gray-600 text-center"}),oe&&re.jsx("p",{className:"text-red-500 text-sm mb-3",children:oe}),re.jsx("button",{className:"w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",onClick:$e,children:"Change API Key"}),re.jsx("label",{htmlFor:"password",className:"text-white font-semibold mt-4 mb-1",children:"Change Password"}),re.jsx("input",{id:"password",type:"password",value:p,onChange:it=>{const Dt=it.target.value,_t=/^[A-Za-z0-9!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]*$/.test(Dt);Z(_t?"":"Password must not contain spaces or invalid characters."),v(Dt)},placeholder:"New Password",className:"w-full p-2 mb-1 rounded bg-gray-800 text-white border border-gray-600 text-center"}),N&&re.jsx("p",{className:"text-red-500 text-sm mb-3",children:N}),re.jsx("button",{className:"w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",onClick:Re,children:"Change Password"})]}),re.jsx("button",{onClick:Ne,className:"mt-auto w-full h-12 bg-yellow-500/50 rounded-2xl text-2xl text-white",children:"Log out"})]}),re.jsxs("div",{className:"flex flex-col w-full lg:ml-2 mt-2 lg:mt-0",children:[re.jsxs("div",{className:"border-2 border-yellow-500/50 flex flex-col w-full min-h-1/2 text-center rounded-2xl lg:p-4 p-2 overflow-y-auto",children:[re.jsx("h1",{className:"bg-black text-2xl font-bold text-white border-b-2 border-white p-2",children:"Widevine CDMs"}),re.jsx("div",{className:"flex flex-col w-full grow p-2 bg-white/5 rounded-2xl mt-2 text-white text-left",children:A.length===0?re.jsx("div",{className:"text-white text-center font-bold",children:"No Widevine CDMs uploaded."}):A.map((it,Dt)=>re.jsx("div",{className:`text-center font-bold text-white p-2 rounded ${Dt%2===0?"bg-black/30":"bg-black/60"}`,children:it},Dt))}),re.jsxs("label",{className:"bg-yellow-500 text-white w-full min-h-16 lg:min-h-16 mt-4 rounded-2xl flex items-center justify-center cursor-pointer",children:[x?"Uploading...":"Upload CDM",re.jsx("input",{type:"file",accept:".wvd",hidden:!0,onChange:it=>ue(it,"WV")})]})]}),re.jsxs("div",{className:"border-2 border-yellow-500/50 flex flex-col w-full min-h-1/2 text-center rounded-2xl p-2 mt-2 lg:mt-2 overflow-y-auto",children:[re.jsx("h1",{className:"text-2xl font-bold text-white border-b-2 border-white p-2 bg-black",children:"Playready CDMs"}),re.jsx("div",{className:"flex flex-col w-full bg-white/5 grow rounded-2xl mt-2 text-white text-left p-2",children:R.length===0?re.jsx("div",{className:"text-white text-center font-bold",children:"No Playready CDMs uploaded."}):R.map((it,Dt)=>re.jsx("div",{className:`text-center font-bold text-white p-2 rounded ${Dt%2===0?"bg-black/30":"bg-black/60"}`,children:it},Dt))}),re.jsxs("label",{className:"bg-yellow-500 text-white w-full min-h-16 lg:min-h-16 mt-4 rounded-2xl flex items-center justify-center cursor-pointer",children:[x?"Uploading...":"Upload CDM",re.jsx("input",{type:"file",accept:".prd",hidden:!0,onChange:it=>ue(it,"PR")})]})]})]})]})}function aN(){const[A,b]=Se.useState(null);return Se.useEffect(()=>{fetch("/login/status",{method:"POST",credentials:"include"}).then(R=>R.json()).then(R=>{R.message==="True"?b(!0):b(!1)}).catch(R=>{console.error("Error checking login status:",R),b(!1)})},[]),A===null?re.jsx("div",{children:"Loading..."}):re.jsx("div",{id:"accountpage",className:"w-full h-full flex",children:A?re.jsx(uN,{}):re.jsx(OR,{})})}function sN(){const[A,b]=Se.useState(!1);return re.jsxs("div",{id:"appcontainer",className:"flex flex-row w-full h-full bg-black",children:[re.jsx(DR,{isMenuOpen:A,setIsMenuOpen:b}),re.jsx("div",{id:"navbarcontainer",className:"hidden lg:flex lg:w-2xs bg-gray-950/55 border-r border-white/5 shrink-0",children:re.jsx(CR,{})}),re.jsxs("div",{id:"maincontainer",className:"w-full lg:w-5/6 bg-gray-950/50 flex flex-col grow",children:[re.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:re.jsx(IR,{setIsMenuOpen:b})}),re.jsx("div",{id:"maincontentcontainer",className:"w-full grow overflow-y-auto",children:re.jsxs(DO,{children:[re.jsx(Mp,{path:"/",element:re.jsx(vR,{})}),re.jsx(Mp,{path:"/cache",element:re.jsx(SR,{})}),re.jsx(Mp,{path:"/api",element:re.jsx(TR,{})}),re.jsx(Mp,{path:"/testplayer",element:re.jsx(AR,{})}),re.jsx(Mp,{path:"/account",element:re.jsx(aN,{})})]})})]})]})}j4.createRoot(document.getElementById("root")).render(re.jsx(Se.StrictMode,{children:re.jsx(ZO,{children:re.jsx(sN,{})})}))});export default cN();
