mediacms/static/video_js/video-js.js

795 lines
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){"use strict";var Rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function C_(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var i=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(s).forEach(function(a){var o=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(i,a,o.get?o:{enumerable:!0,get:function(){return s[a]}})}),i}var A_={exports:{}},Wc={},w_={exports:{}},Qc={exports:{}};/**
* @license React
* react.development.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.
*/Qc.exports;var D_;function wD(){return D_||(D_=1,function(s,e){(function(){function i(D,X){Object.defineProperty(u.prototype,D,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",X[0],X[1])}})}function a(D){return D===null||typeof D!="object"?null:(D=ji&&D[ji]||D["@@iterator"],typeof D=="function"?D:null)}function o(D,X){D=(D=D.constructor)&&(D.displayName||D.name)||"ReactClass";var ve=D+"."+X;jt[ve]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",X,D),jt[ve]=!0)}function u(D,X,ve){this.props=D,this.context=X,this.refs=Kt,this.updater=ve||li}function c(){}function f(D,X,ve){this.props=D,this.context=X,this.refs=Kt,this.updater=ve||li}function m(D){return""+D}function b(D){try{m(D);var X=!1}catch{X=!0}if(X){X=console;var ve=X.error,Se=typeof Symbol=="function"&&Symbol.toStringTag&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ve.call(X,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Se),m(D)}}function S(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===Fo?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case W:return"Fragment";case me:return"Profiler";case pe:return"StrictMode";case Ye:return"Suspense";case Ji:return"SuspenseList";case mt:return"Activity"}if(typeof D=="object")switch(typeof D.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),D.$$typeof){case he:return"Portal";case Ue:return(D.displayName||"Context")+".Provider";case De:return(D._context.displayName||"Context")+".Consumer";case ot:var X=D.render;return D=D.displayName,D||(D=X.displayName||X.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case Et:return X=D.displayName||null,X!==null?X:S(D.type)||"Memo";case ut:X=D._payload,D=D._init;try{return S(D(X))}catch{}}return null}function E(D){if(D===W)return"<>";if(typeof D=="object"&&D!==null&&D.$$typeof===ut)return"<...>";try{var X=S(D);return X?"<"+X+">":"<...>"}catch{return"<...>"}}function A(){var D=we.A;return D===null?null:D.getOwner()}function R(){return Error("react-stack-top-frame")}function N(D){if(Ba.call(D,"key")){var X=Object.getOwnPropertyDescriptor(D,"key").get;if(X&&X.isReactWarning)return!1}return D.key!==void 0}function w(D,X){function ve(){Qs||(Qs=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",X))}ve.isReactWarning=!0,Object.defineProperty(D,"key",{get:ve,configurable:!0})}function H(){var D=S(this.type);return Fa[D]||(Fa[D]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),D=this.props.ref,D!==void 0?D:null}function I(D,X,ve,Se,Le,Qe,Ve,at){return ve=Qe.ref,D={$$typeof:Me,type:D,key:X,props:Qe,_owner:Le},(ve!==void 0?ve:null)!==null?Object.defineProperty(D,"ref",{enumerable:!1,get:H}):Object.defineProperty(D,"ref",{enumerable:!1,value:null}),D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(D,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(D,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ve}),Object.defineProperty(D,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:at}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D}function G(D,X){return X=I(D.type,X,void 0,void 0,D._owner,D.props,D._debugStack,D._debugTask),D._store&&(X._store.validated=D._store.validated),X}function F(D){return typeof D=="object"&&D!==null&&D.$$typeof===Me}function Y(D){var X={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ve){return X[ve]})}function K(D,X){return typeof D=="object"&&D!==null&&D.key!=null?(b(D.key),Y(""+D.key)):X.toString(36)}function se(){}function Q(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(se,se):(D.status="pending",D.then(function(X){D.status==="pending"&&(D.status="fulfilled",D.value=X)},function(X){D.status==="pending"&&(D.status="rejected",D.reason=X)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function le(D,X,ve,Se,Le){var Qe=typeof D;(Qe==="undefined"||Qe==="boolean")&&(D=null);var Ve=!1;if(D===null)Ve=!0;else switch(Qe){case"bigint":case"string":case"number":Ve=!0;break;case"object":switch(D.$$typeof){case Me:case he:Ve=!0;break;case ut:return Ve=D._init,le(Ve(D._payload),X,ve,Se,Le)}}if(Ve){Ve=D,Le=Le(Ve);var at=Se===""?"."+K(Ve,0):Se;return Ei(Le)?(ve="",at!=null&&(ve=at.replace(Nr,"$&/")+"/"),le(Le,X,ve,"",function(Zt){return Zt})):Le!=null&&(F(Le)&&(Le.key!=null&&(Ve&&Ve.key===Le.key||b(Le.key)),ve=G(Le,ve+(Le.key==null||Ve&&Ve.key===Le.key?"":(""+Le.key).replace(Nr,"$&/")+"/")+at),Se!==""&&Ve!=null&&F(Ve)&&Ve.key==null&&Ve._store&&!Ve._store.validated&&(ve._store.validated=2),Le=ve),X.push(Le)),1}if(Ve=0,at=Se===""?".":Se+":",Ei(D))for(var qe=0;qe<D.length;qe++)Se=D[qe],Qe=at+K(Se,qe),Ve+=le(Se,X,ve,Qe,Le);else if(qe=a(D),typeof qe=="function")for(qe===D.entries&&(Ha||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Ha=!0),D=qe.call(D),qe=0;!(Se=D.next()).done;)Se=Se.value,Qe=at+K(Se,qe++),Ve+=le(Se,X,ve,Qe,Le);else if(Qe==="object"){if(typeof D.then=="function")return le(Q(D),X,ve,Se,Le);throw X=String(D),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ve}function ue(D,X,ve){if(D==null)return D;var Se=[],Le=0;return le(D,Se,"","",function(Qe){return X.call(ve,Qe,Le++)}),Se}function Ie(D){if(D._status===-1){var X=D._result;X=X(),X.then(function(ve){(D._status===0||D._status===-1)&&(D._status=1,D._result=ve)},function(ve){(D._status===0||D._status===-1)&&(D._status=2,D._result=ve)}),D._status===-1&&(D._status=0,D._result=X)}if(D._status===1)return X=D._result,X===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))
Did you accidentally put curly braces around the import?`,X),"default"in X||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
Your code should look like:
const MyComponent = lazy(() => import('./MyComponent'))`,X),X.default;throw D._result}function be(){var D=we.H;return D===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),D}function Ae(){}function fe(D){if(dt===null)try{var X=("require"+Math.random()).slice(0,7);dt=(s&&s[X]).call(s,"timers").setImmediate}catch{dt=function(Se){Ur===!1&&(Ur=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Le=new MessageChannel;Le.port1.onmessage=Se,Le.port2.postMessage(void 0)}}return dt(D)}function Pe(D){return 1<D.length&&typeof AggregateError=="function"?new AggregateError(D):D[0]}function rt(D,X){X!==Zs-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Zs=X}function de(D,X,ve){var Se=we.actQueue;if(Se!==null)if(Se.length!==0)try{xe(Se),fe(function(){return de(D,X,ve)});return}catch(Le){we.thrownErrors.push(Le)}else we.actQueue=null;0<we.thrownErrors.length?(Se=Pe(we.thrownErrors),we.thrownErrors.length=0,ve(Se)):X(D)}function xe(D){if(!Ln){Ln=!0;var X=0;try{for(;X<D.length;X++){var ve=D[X];do{we.didUsePromise=!1;var Se=ve(!1);if(Se!==null){if(we.didUsePromise){D[X]=ve,D.splice(0,X);return}ve=Se}else break}while(1)}D.length=0}catch(Le){D.splice(0,X+1),we.thrownErrors.push(Le)}finally{Ln=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Me=Symbol.for("react.transitional.element"),he=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),De=Symbol.for("react.consumer"),Ue=Symbol.for("react.context"),ot=Symbol.for("react.forward_ref"),Ye=Symbol.for("react.suspense"),Ji=Symbol.for("react.suspense_list"),Et=Symbol.for("react.memo"),ut=Symbol.for("react.lazy"),mt=Symbol.for("react.activity"),ji=Symbol.iterator,jt={},li={isMounted:function(){return!1},enqueueForceUpdate:function(D){o(D,"forceUpdate")},enqueueReplaceState:function(D){o(D,"replaceState")},enqueueSetState:function(D){o(D,"setState")}},zi=Object.assign,Kt={};Object.freeze(Kt),u.prototype.isReactComponent={},u.prototype.setState=function(D,X){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,X,"setState")},u.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};var ct={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},_s;for(_s in ct)ct.hasOwnProperty(_s)&&i(_s,ct[_s]);c.prototype=u.prototype,ct=f.prototype=new c,ct.constructor=f,zi(ct,u.prototype),ct.isPureReactComponent=!0;var Ei=Array.isArray,Fo=Symbol.for("react.client.reference"),we={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Ba=Object.prototype.hasOwnProperty,Ws=console.createTask?console.createTask:function(){return null};ct={"react-stack-bottom-frame":function(D){return D()}};var Qs,Ir,Fa={},Pr=ct["react-stack-bottom-frame"].bind(ct,R)(),Ks=Ws(E(R)),Ha=!1,Nr=/\/+/g,ja=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},Ur=!1,dt=null,Zs=0,Vi=!1,Ln=!1,Js=typeof queueMicrotask=="function"?function(D){queueMicrotask(function(){return queueMicrotask(D)})}:fe;ct=Object.freeze({__proto__:null,c:function(D){return be().useMemoCache(D)}}),e.Children={map:ue,forEach:function(D,X,ve){ue(D,function(){X.apply(this,arguments)},ve)},count:function(D){var X=0;return ue(D,function(){X++}),X},toArray:function(D){return ue(D,function(X){return X})||[]},only:function(D){if(!F(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},e.Component=u,e.Fragment=W,e.Profiler=me,e.PureComponent=f,e.StrictMode=pe,e.Suspense=Ye,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=we,e.__COMPILER_RUNTIME=ct,e.act=function(D){var X=we.actQueue,ve=Zs;Zs++;var Se=we.actQueue=X!==null?X:[],Le=!1;try{var Qe=D()}catch(qe){we.thrownErrors.push(qe)}if(0<we.thrownErrors.length)throw rt(X,ve),D=Pe(we.thrownErrors),we.thrownErrors.length=0,D;if(Qe!==null&&typeof Qe=="object"&&typeof Qe.then=="function"){var Ve=Qe;return Js(function(){Le||Vi||(Vi=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(qe,Zt){Le=!0,Ve.then(function(Ts){if(rt(X,ve),ve===0){try{xe(Se),fe(function(){return de(Ts,qe,Zt)})}catch(Ud){we.thrownErrors.push(Ud)}if(0<we.thrownErrors.length){var Nd=Pe(we.thrownErrors);we.thrownErrors.length=0,Zt(Nd)}}else qe(Ts)},function(Ts){rt(X,ve),0<we.thrownErrors.length&&(Ts=Pe(we.thrownErrors),we.thrownErrors.length=0),Zt(Ts)})}}}var at=Qe;if(rt(X,ve),ve===0&&(xe(Se),Se.length!==0&&Js(function(){Le||Vi||(Vi=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),we.actQueue=null),0<we.thrownErrors.length)throw D=Pe(we.thrownErrors),we.thrownErrors.length=0,D;return{then:function(qe,Zt){Le=!0,ve===0?(we.actQueue=Se,fe(function(){return de(at,qe,Zt)})):qe(at)}}},e.cache=function(D){return function(){return D.apply(null,arguments)}},e.captureOwnerStack=function(){var D=we.getCurrentStack;return D===null?null:D()},e.cloneElement=function(D,X,ve){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var Se=zi({},D.props),Le=D.key,Qe=D._owner;if(X!=null){var Ve;e:{if(Ba.call(X,"ref")&&(Ve=Object.getOwnPropertyDescriptor(X,"ref").get)&&Ve.isReactWarning){Ve=!1;break e}Ve=X.ref!==void 0}Ve&&(Qe=A()),N(X)&&(b(X.key),Le=""+X.key);for(at in X)!Ba.call(X,at)||at==="key"||at==="__self"||at==="__source"||at==="ref"&&X.ref===void 0||(Se[at]=X[at])}var at=arguments.length-2;if(at===1)Se.children=ve;else if(1<at){Ve=Array(at);for(var qe=0;qe<at;qe++)Ve[qe]=arguments[qe+2];Se.children=Ve}for(Se=I(D.type,Le,void 0,void 0,Qe,Se,D._debugStack,D._debugTask),Le=2;Le<arguments.length;Le++)Qe=arguments[Le],F(Qe)&&Qe._store&&(Qe._store.validated=1);return Se},e.createContext=function(D){return D={$$typeof:Ue,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:De,_context:D},D._currentRenderer=null,D._currentRenderer2=null,D},e.createElement=function(D,X,ve){for(var Se=2;Se<arguments.length;Se++){var Le=arguments[Se];F(Le)&&Le._store&&(Le._store.validated=1)}if(Se={},Le=null,X!=null)for(qe in Ir||!("__self"in X)||"key"in X||(Ir=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),N(X)&&(b(X.key),Le=""+X.key),X)Ba.call(X,qe)&&qe!=="key"&&qe!=="__self"&&qe!=="__source"&&(Se[qe]=X[qe]);var Qe=arguments.length-2;if(Qe===1)Se.children=ve;else if(1<Qe){for(var Ve=Array(Qe),at=0;at<Qe;at++)Ve[at]=arguments[at+2];Object.freeze&&Object.freeze(Ve),Se.children=Ve}if(D&&D.defaultProps)for(qe in Qe=D.defaultProps,Qe)Se[qe]===void 0&&(Se[qe]=Qe[qe]);Le&&w(Se,typeof D=="function"?D.displayName||D.name||"Unknown":D);var qe=1e4>we.recentlyCreatedOwnerStacks++;return I(D,Le,void 0,void 0,A(),Se,qe?Error("react-stack-top-frame"):Pr,qe?Ws(E(D)):Ks)},e.createRef=function(){var D={current:null};return Object.seal(D),D},e.forwardRef=function(D){D!=null&&D.$$typeof===Et?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof D!="function"?console.error("forwardRef requires a render function but was given %s.",D===null?"null":typeof D):D.length!==0&&D.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",D.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),D!=null&&D.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var X={$$typeof:ot,render:D},ve;return Object.defineProperty(X,"displayName",{enumerable:!1,configurable:!0,get:function(){return ve},set:function(Se){ve=Se,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Se}),D.displayName=Se)}}),X},e.isValidElement=F,e.lazy=function(D){return{$$typeof:ut,_payload:{_status:-1,_result:D},_init:Ie}},e.memo=function(D,X){D==null&&console.error("memo: The first argument must be a component. Instead received: %s",D===null?"null":typeof D),X={$$typeof:Et,type:D,compare:X===void 0?null:X};var ve;return Object.defineProperty(X,"displayName",{enumerable:!1,configurable:!0,get:function(){return ve},set:function(Se){ve=Se,D.name||D.displayName||(Object.defineProperty(D,"name",{value:Se}),D.displayName=Se)}}),X},e.startTransition=function(D){var X=we.T,ve={};we.T=ve,ve._updatedFibers=new Set;try{var Se=D(),Le=we.S;Le!==null&&Le(ve,Se),typeof Se=="object"&&Se!==null&&typeof Se.then=="function"&&Se.then(Ae,ja)}catch(Qe){ja(Qe)}finally{X===null&&ve._updatedFibers&&(D=ve._updatedFibers.size,ve._updatedFibers.clear(),10<D&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),we.T=X}},e.unstable_useCacheRefresh=function(){return be().useCacheRefresh()},e.use=function(D){return be().use(D)},e.useActionState=function(D,X,ve){return be().useActionState(D,X,ve)},e.useCallback=function(D,X){return be().useCallback(D,X)},e.useContext=function(D){var X=be();return D.$$typeof===De&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),X.useContext(D)},e.useDebugValue=function(D,X){return be().useDebugValue(D,X)},e.useDeferredValue=function(D,X){return be().useDeferredValue(D,X)},e.useEffect=function(D,X,ve){D==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Se=be();if(typeof ve=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Se.useEffect(D,X)},e.useId=function(){return be().useId()},e.useImperativeHandle=function(D,X,ve){return be().useImperativeHandle(D,X,ve)},e.useInsertionEffect=function(D,X){return D==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),be().useInsertionEffect(D,X)},e.useLayoutEffect=function(D,X){return D==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),be().useLayoutEffect(D,X)},e.useMemo=function(D,X){return be().useMemo(D,X)},e.useOptimistic=function(D,X){return be().useOptimistic(D,X)},e.useReducer=function(D,X,ve){return be().useReducer(D,X,ve)},e.useRef=function(D){return be().useRef(D)},e.useState=function(D){return be().useState(D)},e.useSyncExternalStore=function(D,X,ve){return be().useSyncExternalStore(D,X,ve)},e.useTransition=function(){return be().useTransition()},e.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Qc,Qc.exports)),Qc.exports}w_.exports=wD();var cn=w_.exports;/**
* @license React
* react-jsx-runtime.development.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 k_;function DD(){return k_||(k_=1,function(){function s(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===Ie?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case w:return"Fragment";case I:return"Profiler";case H:return"StrictMode";case K:return"Suspense";case se:return"SuspenseList";case ue:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case N:return"Portal";case F:return(W.displayName||"Context")+".Provider";case G:return(W._context.displayName||"Context")+".Consumer";case Y:var pe=W.render;return W=W.displayName,W||(W=pe.displayName||pe.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case Q:return pe=W.displayName||null,pe!==null?pe:s(W.type)||"Memo";case le:pe=W._payload,W=W._init;try{return s(W(pe))}catch{}}return null}function e(W){return""+W}function i(W){try{e(W);var pe=!1}catch{pe=!0}if(pe){pe=console;var me=pe.error,De=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return me.call(pe,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",De),e(W)}}function a(W){if(W===w)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===le)return"<...>";try{var pe=s(W);return pe?"<"+pe+">":"<...>"}catch{return"<...>"}}function o(){var W=be.A;return W===null?null:W.getOwner()}function u(){return Error("react-stack-top-frame")}function c(W){if(Ae.call(W,"key")){var pe=Object.getOwnPropertyDescriptor(W,"key").get;if(pe&&pe.isReactWarning)return!1}return W.key!==void 0}function f(W,pe){function me(){rt||(rt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",pe))}me.isReactWarning=!0,Object.defineProperty(W,"key",{get:me,configurable:!0})}function m(){var W=s(this.type);return de[W]||(de[W]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),W=this.props.ref,W!==void 0?W:null}function b(W,pe,me,De,Ue,ot,Ye,Ji){return me=ot.ref,W={$$typeof:R,type:W,key:pe,props:ot,_owner:Ue},(me!==void 0?me:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:m}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ye}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ji}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function S(W,pe,me,De,Ue,ot,Ye,Ji){var Et=pe.children;if(Et!==void 0)if(De)if(fe(Et)){for(De=0;De<Et.length;De++)E(Et[De]);Object.freeze&&Object.freeze(Et)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else E(Et);if(Ae.call(pe,"key")){Et=s(W);var ut=Object.keys(pe).filter(function(ji){return ji!=="key"});De=0<ut.length?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}",he[Et+De]||(ut=0<ut.length?"{"+ut.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,De,Et,ut,Et),he[Et+De]=!0)}if(Et=null,me!==void 0&&(i(me),Et=""+me),c(pe)&&(i(pe.key),Et=""+pe.key),"key"in pe){me={};for(var mt in pe)mt!=="key"&&(me[mt]=pe[mt])}else me=pe;return Et&&f(me,typeof W=="function"?W.displayName||W.name||"Unknown":W),b(W,Et,ot,Ue,o(),me,Ye,Ji)}function E(W){typeof W=="object"&&W!==null&&W.$$typeof===R&&W._store&&(W._store.validated=1)}var A=cn,R=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),F=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),Ie=Symbol.for("react.client.reference"),be=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ae=Object.prototype.hasOwnProperty,fe=Array.isArray,Pe=console.createTask?console.createTask:function(){return null};A={"react-stack-bottom-frame":function(W){return W()}};var rt,de={},xe=A["react-stack-bottom-frame"].bind(A,u)(),Me=Pe(a(u)),he={};Wc.Fragment=w,Wc.jsx=function(W,pe,me,De,Ue){var ot=1e4>be.recentlyCreatedOwnerStacks++;return S(W,pe,me,!1,De,Ue,ot?Error("react-stack-top-frame"):xe,ot?Pe(a(W)):Me)},Wc.jsxs=function(W,pe,me,De,Ue){var ot=1e4>be.recentlyCreatedOwnerStacks++;return S(W,pe,me,!0,De,Ue,ot?Error("react-stack-top-frame"):xe,ot?Pe(a(W)):Me)}}()),Wc}A_.exports=DD();var Hl=A_.exports,O_={exports:{}},Ig={exports:{}},Pg={};/**
* @license React
* scheduler.development.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 R_;function kD(){return R_||(R_=1,function(s){(function(){function e(){if(K=!1,ue){var de=s.unstable_now();Ae=de;var xe=!0;try{e:{F=!1,Y&&(Y=!1,Q(Ie),Ie=-1),G=!0;var Me=I;try{t:{for(c(de),H=a(R);H!==null&&!(H.expirationTime>de&&m());){var he=H.callback;if(typeof he=="function"){H.callback=null,I=H.priorityLevel;var W=he(H.expirationTime<=de);if(de=s.unstable_now(),typeof W=="function"){H.callback=W,c(de),xe=!0;break t}H===a(R)&&o(R),c(de)}else o(R);H=a(R)}if(H!==null)xe=!0;else{var pe=a(N);pe!==null&&b(f,pe.startTime-de),xe=!1}}break e}finally{H=null,I=Me,G=!1}xe=void 0}}finally{xe?fe():ue=!1}}}function i(de,xe){var Me=de.length;de.push(xe);e:for(;0<Me;){var he=Me-1>>>1,W=de[he];if(0<u(W,xe))de[he]=xe,de[Me]=W,Me=he;else break e}}function a(de){return de.length===0?null:de[0]}function o(de){if(de.length===0)return null;var xe=de[0],Me=de.pop();if(Me!==xe){de[0]=Me;e:for(var he=0,W=de.length,pe=W>>>1;he<pe;){var me=2*(he+1)-1,De=de[me],Ue=me+1,ot=de[Ue];if(0>u(De,Me))Ue<W&&0>u(ot,De)?(de[he]=ot,de[Ue]=Me,he=Ue):(de[he]=De,de[me]=Me,he=me);else if(Ue<W&&0>u(ot,Me))de[he]=ot,de[Ue]=Me,he=Ue;else break e}}return xe}function u(de,xe){var Me=de.sortIndex-xe.sortIndex;return Me!==0?Me:de.id-xe.id}function c(de){for(var xe=a(N);xe!==null;){if(xe.callback===null)o(N);else if(xe.startTime<=de)o(N),xe.sortIndex=xe.expirationTime,i(R,xe);else break;xe=a(N)}}function f(de){if(Y=!1,c(de),!F)if(a(R)!==null)F=!0,ue||(ue=!0,fe());else{var xe=a(N);xe!==null&&b(f,xe.startTime-de)}}function m(){return K?!0:!(s.unstable_now()-Ae<be)}function b(de,xe){Ie=se(function(){de(s.unstable_now())},xe)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var S=performance;s.unstable_now=function(){return S.now()}}else{var E=Date,A=E.now();s.unstable_now=function(){return E.now()-A}}var R=[],N=[],w=1,H=null,I=3,G=!1,F=!1,Y=!1,K=!1,se=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null,ue=!1,Ie=-1,be=5,Ae=-1;if(typeof le=="function")var fe=function(){le(e)};else if(typeof MessageChannel<"u"){var Pe=new MessageChannel,rt=Pe.port2;Pe.port1.onmessage=e,fe=function(){rt.postMessage(null)}}else fe=function(){se(e,0)};s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(de){de.callback=null},s.unstable_forceFrameRate=function(de){0>de||125<de?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<de?Math.floor(1e3/de):5},s.unstable_getCurrentPriorityLevel=function(){return I},s.unstable_next=function(de){switch(I){case 1:case 2:case 3:var xe=3;break;default:xe=I}var Me=I;I=xe;try{return de()}finally{I=Me}},s.unstable_requestPaint=function(){K=!0},s.unstable_runWithPriority=function(de,xe){switch(de){case 1:case 2:case 3:case 4:case 5:break;default:de=3}var Me=I;I=de;try{return xe()}finally{I=Me}},s.unstable_scheduleCallback=function(de,xe,Me){var he=s.unstable_now();switch(typeof Me=="object"&&Me!==null?(Me=Me.delay,Me=typeof Me=="number"&&0<Me?he+Me:he):Me=he,de){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=Me+W,de={id:w++,callback:xe,priorityLevel:de,startTime:Me,expirationTime:W,sortIndex:-1},Me>he?(de.sortIndex=Me,i(N,de),a(R)===null&&de===a(N)&&(Y?(Q(Ie),Ie=-1):Y=!0,b(f,Me-he))):(de.sortIndex=W,i(R,de),F||G||(F=!0,ue||(ue=!0,fe()))),de},s.unstable_shouldYield=m,s.unstable_wrapCallback=function(de){var xe=I;return function(){var Me=I;I=xe;try{return de.apply(this,arguments)}finally{I=Me}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Pg)),Pg}var M_;function OD(){return M_||(M_=1,Ig.exports=kD()),Ig.exports}var Ng={exports:{}},Ni={};/**
* @license React
* react-dom.development.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 L_;function RD(){return L_||(L_=1,function(){function s(){}function e(E){return""+E}function i(E,A,R){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{e(N);var w=!1}catch{w=!0}return w&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&N[Symbol.toStringTag]||N.constructor.name||"Object"),e(N)),{$$typeof:b,key:N==null?null:""+N,children:E,containerInfo:A,implementation:R}}function a(E,A){if(E==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}function o(E){return E===null?"`null`":E===void 0?"`undefined`":E===""?"an empty string":'something with type "'+typeof E+'"'}function u(E){return E===null?"`null`":E===void 0?"`undefined`":E===""?"an empty string":typeof E=="string"?JSON.stringify(E):typeof E=="number"?"`"+E+"`":'something with type "'+typeof E+'"'}function c(){var E=S.H;return E===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),E}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var f=cn,m={d:{f:s,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},b=Symbol.for("react.portal"),S=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Ni.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,Ni.createPortal=function(E,A){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error("Target container is not a DOM element.");return i(E,A,null,R)},Ni.flushSync=function(E){var A=S.T,R=m.p;try{if(S.T=null,m.p=2,E)return E()}finally{S.T=A,m.p=R,m.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},Ni.preconnect=function(E,A){typeof E=="string"&&E?A!=null&&typeof A!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",u(A)):A!=null&&typeof A.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",o(A.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E)),typeof E=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,m.d.C(E,A))},Ni.prefetchDNS=function(E){if(typeof E!="string"||!E)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E));else if(1<arguments.length){var A=arguments[1];typeof A=="object"&&A.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(A)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(A))}typeof E=="string"&&m.d.D(E)},Ni.preinit=function(E,A){if(typeof E=="string"&&E?A==null||typeof A!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",u(A)):A.as!=="style"&&A.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',u(A.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(E)),typeof E=="string"&&A&&typeof A.as=="string"){var R=A.as,N=a(R,A.crossOrigin),w=typeof A.integrity=="string"?A.integrity:void 0,H=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;R==="style"?m.d.S(E,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:N,integrity:w,fetchPriority:H}):R==="script"&&m.d.X(E,{crossOrigin:N,integrity:w,fetchPriority:H,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},Ni.preinitModule=function(E,A){var R="";if(typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A!==void 0&&typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":A&&"as"in A&&A.as!=="script"&&(R+=" The `as` option encountered was "+u(A.as)+"."),R)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",R);else switch(R=A&&typeof A.as=="string"?A.as:"script",R){case"script":break;default:R=u(R),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',R,E)}typeof E=="string"&&(typeof A=="object"&&A!==null?(A.as==null||A.as==="script")&&(R=a(A.as,A.crossOrigin),m.d.M(E,{crossOrigin:R,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})):A==null&&m.d.M(E))},Ni.preload=function(E,A){var R="";if(typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A==null||typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":typeof A.as=="string"&&A.as||(R+=" The `as` option encountered was "+o(A.as)+"."),R&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',R),typeof E=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){R=A.as;var N=a(R,A.crossOrigin);m.d.L(E,R,{crossOrigin:N,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0,type:typeof A.type=="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority=="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy=="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet=="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes=="string"?A.imageSizes:void 0,media:typeof A.media=="string"?A.media:void 0})}},Ni.preloadModule=function(E,A){var R="";typeof E=="string"&&E||(R+=" The `href` argument encountered was "+o(E)+"."),A!==void 0&&typeof A!="object"?R+=" The `options` argument encountered was "+o(A)+".":A&&"as"in A&&typeof A.as!="string"&&(R+=" The `as` option encountered was "+o(A.as)+"."),R&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',R),typeof E=="string"&&(A?(R=a(A.as,A.crossOrigin),m.d.m(E,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:R,integrity:typeof A.integrity=="string"?A.integrity:void 0})):m.d.m(E))},Ni.requestFormReset=function(E){m.d.r(E)},Ni.unstable_batchedUpdates=function(E,A){return E(A)},Ni.useFormState=function(E,A,R){return c().useFormState(E,A,R)},Ni.useFormStatus=function(){return c().useHostTransitionStatus()},Ni.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ni}var I_;function MD(){return I_||(I_=1,Ng.exports=RD()),Ng.exports}var Kc={};/**
* @license React
* react-dom-client.development.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 P_;function LD(){return P_||(P_=1,function(){function s(t,n){for(t=t.memoizedState;t!==null&&0<n;)t=t.next,n--;return t}function e(t,n,r,l){if(r>=n.length)return l;var d=n[r],p=Mi(t)?t.slice():Je({},t);return p[d]=e(t[d],n,r+1,l),p}function i(t,n,r){if(n.length!==r.length)console.warn("copyWithRename() expects paths of the same length");else{for(var l=0;l<r.length-1;l++)if(n[l]!==r[l]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return a(t,n,r,0)}}function a(t,n,r,l){var d=n[l],p=Mi(t)?t.slice():Je({},t);return l+1===n.length?(p[r[l]]=p[d],Mi(p)?p.splice(d,1):delete p[d]):p[d]=a(t[d],n,r,l+1),p}function o(t,n,r){var l=n[r],d=Mi(t)?t.slice():Je({},t);return r+1===n.length?(Mi(d)?d.splice(l,1):delete d[l],d):(d[l]=o(t[l],n,r+1),d)}function u(){return!1}function c(){return null}function f(){}function m(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function b(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function S(){}function E(t){var n=[];return t.forEach(function(r){n.push(r)}),n.sort().join(", ")}function A(t,n,r,l){return new Zy(t,n,r,l)}function R(t,n){t.context===co&&(Kv(t.current,2,n,t,null,null),sc())}function N(t,n){if(rs!==null){var r=n.staleFamilies;n=n.updatedFamilies,Lh(),Xd(t.current,n,r),sc()}}function w(t){rs=t}function H(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function I(t){var n=t,r=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,n.flags&4098&&(r=n.return),t=n.return;while(t)}return n.tag===3?r:null}function G(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function F(t){if(I(t)!==t)throw Error("Unable to find node on an unmounted component.")}function Y(t){var n=t.alternate;if(!n){if(n=I(t),n===null)throw Error("Unable to find node on an unmounted component.");return n!==t?null:t}for(var r=t,l=n;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(l=d.return,l!==null){r=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return F(d),t;if(p===l)return F(d),n;p=p.sibling}throw Error("Unable to find node on an unmounted component.")}if(r.return!==l.return)r=d,l=p;else{for(var T=!1,C=d.child;C;){if(C===r){T=!0,r=d,l=p;break}if(C===l){T=!0,l=d,r=p;break}C=C.sibling}if(!T){for(C=p.child;C;){if(C===r){T=!0,r=p,l=d;break}if(C===l){T=!0,l=p,r=d;break}C=C.sibling}if(!T)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==l)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==3)throw Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?t:n}function K(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=K(t),n!==null)return n;t=t.sibling}return null}function se(t){return t===null||typeof t!="object"?null:(t=WC&&t[WC]||t["@@iterator"],typeof t=="function"?t:null)}function Q(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===iL?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dc:return"Fragment";case sb:return"Profiler";case Hm:return"StrictMode";case rb:return"Suspense";case ob:return"SuspenseList";case lb:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case cc:return"Portal";case ba:return(t.displayName||"Context")+".Provider";case ab:return(t._context.displayName||"Context")+".Consumer";case zh:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case jm:return n=t.displayName||null,n!==null?n:Q(t.type)||"Memo";case zn:n=t._payload,t=t._init;try{return Q(t(n))}catch{}}return null}function le(t){return typeof t.tag=="number"?ue(t):typeof t.name=="string"?t.name:null}function ue(t){var n=t.type;switch(t.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return(n.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Q(n);case 8:return n===Hm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;break;case 29:if(n=t._debugInfo,n!=null){for(var r=n.length-1;0<=r;r--)if(typeof n[r].name=="string")return n[r].name}if(t.return!==null)return ue(t.return)}return null}function Ie(t){return{current:t}}function be(t,n){0>lr?console.error("Unexpected pop."):(n!==cb[lr]&&console.error("Unexpected Fiber popped."),t.current=ub[lr],ub[lr]=null,cb[lr]=null,lr--)}function Ae(t,n,r){lr++,ub[lr]=t.current,cb[lr]=r,t.current=n}function fe(t){return t===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),t}function Pe(t,n){Ae(ro,n,t),Ae(Vh,t,t),Ae(ao,null,t);var r=n.nodeType;switch(r){case 9:case 11:r=r===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?xC(n):_r;break;default:if(r=n.tagName,n=n.namespaceURI)n=xC(n),n=EC(n,r);else switch(r){case"svg":n=Gc;break;case"math":n=wg;break;default:n=_r}}r=r.toLowerCase(),r=bn(null,r),r={context:n,ancestorInfo:r},be(ao,t),Ae(ao,r,t)}function rt(t){be(ao,t),be(Vh,t),be(ro,t)}function de(){return fe(ao.current)}function xe(t){t.memoizedState!==null&&Ae(zm,t,t);var n=fe(ao.current),r=t.type,l=EC(n.context,r);r=bn(n.ancestorInfo,r),l={context:l,ancestorInfo:r},n!==l&&(Ae(Vh,t,t),Ae(ao,l,t))}function Me(t){Vh.current===t&&(be(ao,t),be(Vh,t)),zm.current===t&&(be(zm,t),Df._currentValue=Fl)}function he(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}function W(t){try{return pe(t),!1}catch{return!0}}function pe(t){return""+t}function me(t,n){if(W(t))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",n,he(t)),pe(t)}function De(t,n){if(W(t))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",n,he(t)),pe(t)}function Ue(t){if(W(t))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",he(t)),pe(t)}function ot(t){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled)return!0;if(!n.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{fc=n.inject(t),$i=n}catch(r){console.error("React instrumentation encountered an error: %s.",r)}return!!n.checkDCE}function Ye(t){if(typeof uL=="function"&&cL(t),$i&&typeof $i.setStrictMode=="function")try{$i.setStrictMode(fc,t)}catch(n){Ta||(Ta=!0,console.error("React instrumentation encountered an error: %s",n))}}function Ji(t){Ee=t}function Et(){Ee!==null&&typeof Ee.markCommitStopped=="function"&&Ee.markCommitStopped()}function ut(t){Ee!==null&&typeof Ee.markComponentRenderStarted=="function"&&Ee.markComponentRenderStarted(t)}function mt(){Ee!==null&&typeof Ee.markComponentRenderStopped=="function"&&Ee.markComponentRenderStopped()}function ji(t){Ee!==null&&typeof Ee.markRenderStarted=="function"&&Ee.markRenderStarted(t)}function jt(){Ee!==null&&typeof Ee.markRenderStopped=="function"&&Ee.markRenderStopped()}function li(t,n){Ee!==null&&typeof Ee.markStateUpdateScheduled=="function"&&Ee.markStateUpdateScheduled(t,n)}function zi(t){return t>>>=0,t===0?32:31-(dL(t)/hL|0)|0}function Kt(t){if(t&1)return"SyncHydrationLane";if(t&2)return"Sync";if(t&4)return"InputContinuousHydration";if(t&8)return"InputContinuous";if(t&16)return"DefaultHydration";if(t&32)return"Default";if(t&128)return"TransitionHydration";if(t&4194048)return"Transition";if(t&62914560)return"Retry";if(t&67108864)return"SelectiveHydration";if(t&134217728)return"IdleHydration";if(t&268435456)return"Idle";if(t&536870912)return"Offscreen";if(t&1073741824)return"Deferred"}function ct(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),t}}function _s(t,n,r){var l=t.pendingLanes;if(l===0)return 0;var d=0,p=t.suspendedLanes,T=t.pingedLanes;t=t.warmLanes;var C=l&134217727;return C!==0?(l=C&~p,l!==0?d=ct(l):(T&=C,T!==0?d=ct(T):r||(r=C&~t,r!==0&&(d=ct(r))))):(C=l&~p,C!==0?d=ct(C):T!==0?d=ct(T):r||(r=l&~t,r!==0&&(d=ct(r)))),d===0?0:n!==0&&n!==d&&!(n&p)&&(p=d&-d,r=n&-n,p>=r||p===32&&(r&4194048)!==0)?n:d}function Ei(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Fo(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 console.error("Should have found matching lanes. This is a bug in React."),-1}}function we(){var t=Vm;return Vm<<=1,!(Vm&4194048)&&(Vm=256),t}function Ba(){var t=qm;return qm<<=1,!(qm&62914560)&&(qm=4194304),t}function Ws(t){for(var n=[],r=0;31>r;r++)n.push(t);return n}function Qs(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ir(t,n,r,l,d,p){var T=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var C=t.entanglements,O=t.expirationTimes,L=t.hiddenUpdates;for(r=T&~r;0<r;){var J=31-nn(r),ne=1<<J;C[J]=0,O[J]=-1;var Z=L[J];if(Z!==null)for(L[J]=null,J=0;J<Z.length;J++){var ae=Z[J];ae!==null&&(ae.lane&=-536870913)}r&=~ne}l!==0&&Fa(t,l,0),p!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=p&~(T&~n))}function Fa(t,n,r){t.pendingLanes|=n,t.suspendedLanes&=~n;var l=31-nn(n);t.entangledLanes|=n,t.entanglements[l]=t.entanglements[l]|1073741824|r&4194090}function Pr(t,n){var r=t.entangledLanes|=n;for(t=t.entanglements;r;){var l=31-nn(r),d=1<<l;d&n|t[l]&n&&(t[l]|=n),r&=~d}}function Ks(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ha(t,n,r){if(Rs)for(t=t.pendingUpdatersLaneMap;0<r;){var l=31-nn(r),d=1<<l;t[l].add(n),r&=~d}}function Nr(t,n){if(Rs)for(var r=t.pendingUpdatersLaneMap,l=t.memoizedUpdaters;0<n;){var d=31-nn(n);t=1<<d,d=r[d],0<d.size&&(d.forEach(function(p){var T=p.alternate;T!==null&&l.has(T)||l.add(p)}),d.clear()),n&=~t}}function ja(t){return t&=-t,ss<t?Sa<t?t&134217727?cr:$m:Sa:ss}function Ur(){var t=gt.p;return t!==0?t:(t=window.event,t===void 0?cr:VC(t.type))}function dt(t,n){var r=gt.p;try{return gt.p=t,n()}finally{gt.p=r}}function Zs(t){delete t[Gi],delete t[xn],delete t[mb],delete t[fL],delete t[pL]}function Vi(t){var n=t[Gi];if(n)return n;for(var r=t.parentNode;r;){if(n=r[lo]||r[Gi]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(t=OC(t);t!==null;){if(r=t[Gi])return r;t=OC(t)}return n}t=r,r=t.parentNode}return null}function Ln(t){if(t=t[Gi]||t[lo]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function Js(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function D(t){var n=t[QC];return n||(n=t[QC]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function X(t){t[qh]=!0}function ve(t,n){Se(t,n),Se(t+"Capture",n)}function Se(t,n){_l[t]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",t),_l[t]=n;var r=t.toLowerCase();for(gb[r]=t,t==="onDoubleClick"&&(gb.ondblclick=t),t=0;t<n.length;t++)KC.add(n[t])}function Le(t,n){mL[n.type]||n.onChange||n.onInput||n.readOnly||n.disabled||n.value==null||console.error(t==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),n.onChange||n.readOnly||n.disabled||n.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Qe(t){return ur.call(JC,t)?!0:ur.call(ZC,t)?!1:gL.test(t)?JC[t]=!0:(ZC[t]=!0,console.error("Invalid attribute name: `%s`",t),!1)}function Ve(t,n,r){if(Qe(n)){if(!t.hasAttribute(n)){switch(typeof r){case"symbol":case"object":return r;case"function":return r;case"boolean":if(r===!1)return r}return r===void 0?void 0:null}return t=t.getAttribute(n),t===""&&r===!0?!0:(me(r,n),t===""+r?r:t)}}function at(t,n,r){if(Qe(n))if(r===null)t.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(n);return}}me(r,n),t.setAttribute(n,""+r)}}function qe(t,n,r){if(r===null)t.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}me(r,n),t.setAttribute(n,""+r)}}function Zt(t,n,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}me(l,r),t.setAttributeNS(n,r,""+l)}}function Ts(){}function Nd(){if($h===0){eA=console.log,tA=console.info,iA=console.warn,nA=console.error,sA=console.group,aA=console.groupCollapsed,rA=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Ts,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}$h++}function Ud(){if($h--,$h===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Je({},t,{value:eA}),info:Je({},t,{value:tA}),warn:Je({},t,{value:iA}),error:Je({},t,{value:nA}),group:Je({},t,{value:sA}),groupCollapsed:Je({},t,{value:aA}),groupEnd:Je({},t,{value:rA})})}0>$h&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function vn(t){if(yb===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);yb=n&&n[1]||"",oA=-1<r.stack.indexOf(`
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
`+yb+t+oA}function Bd(t,n){if(!t||vb)return"";var r=bb.get(t);if(r!==void 0)return r;vb=!0,r=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var l=null;l=ie.H,ie.H=null,Nd();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ke){var ae=ke}Reflect.construct(t,[],Z)}else{try{Z.call()}catch(ke){ae=ke}t.call(Z.prototype)}}else{try{throw Error()}catch(ke){ae=ke}(Z=t())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(ke){if(ke&&ae&&typeof ke.stack=="string")return[ke.stack,ae.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=d.DetermineComponentFrameRoot(),C=T[0],O=T[1];if(C&&O){var L=C.split(`
`),J=O.split(`
`);for(T=p=0;p<L.length&&!L[p].includes("DetermineComponentFrameRoot");)p++;for(;T<J.length&&!J[T].includes("DetermineComponentFrameRoot");)T++;if(p===L.length||T===J.length)for(p=L.length-1,T=J.length-1;1<=p&&0<=T&&L[p]!==J[T];)T--;for(;1<=p&&0<=T;p--,T--)if(L[p]!==J[T]){if(p!==1||T!==1)do if(p--,T--,0>T||L[p]!==J[T]){var ne=`
`+L[p].replace(" at new "," at ");return t.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",t.displayName)),typeof t=="function"&&bb.set(t,ne),ne}while(1<=p&&0<=T);break}}}finally{vb=!1,ie.H=l,Ud(),Error.prepareStackTrace=r}return L=(L=t?t.displayName||t.name:"")?vn(L):"",typeof t=="function"&&bb.set(t,L),L}function Fd(t){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,t=t.stack,Error.prepareStackTrace=n,t.startsWith(`Error: react-stack-top-frame
`)&&(t=t.slice(29)),n=t.indexOf(`
`),n!==-1&&(t=t.slice(n+1)),n=t.indexOf("react-stack-bottom-frame"),n!==-1&&(n=t.lastIndexOf(`
`,n)),n!==-1)t=t.slice(0,n);else return"";return t}function Hd(t){switch(t.tag){case 26:case 27:case 5:return vn(t.type);case 16:return vn("Lazy");case 13:return vn("Suspense");case 19:return vn("SuspenseList");case 0:case 15:return Bd(t.type,!1);case 11:return Bd(t.type.render,!1);case 1:return Bd(t.type,!0);case 31:return vn("Activity");default:return""}}function Ho(t){try{var n="";do{n+=Hd(t);var r=t._debugInfo;if(r)for(var l=r.length-1;0<=l;l--){var d=r[l];if(typeof d.name=="string"){var p=n,T=d.env,C=vn(d.name+(T?" ["+T+"]":""));n=p+C}}t=t.return}while(t);return n}catch(O){return`
Error generating stack: `+O.message+`
`+O.stack}}function Ci(t){return(t=t?t.displayName||t.name:"")?vn(t):""}function wu(){if(Vn===null)return null;var t=Vn._debugOwner;return t!=null?le(t):null}function Hy(){if(Vn===null)return"";var t=Vn;try{var n="";switch(t.tag===6&&(t=t.return),t.tag){case 26:case 27:case 5:n+=vn(t.type);break;case 13:n+=vn("Suspense");break;case 19:n+=vn("SuspenseList");break;case 31:n+=vn("Activity");break;case 30:case 0:case 15:case 1:t._debugOwner||n!==""||(n+=Ci(t.type));break;case 11:t._debugOwner||n!==""||(n+=Ci(t.type.render))}for(;t;)if(typeof t.tag=="number"){var r=t;t=r._debugOwner;var l=r._debugStack;t&&l&&(typeof l!="string"&&(r._debugStack=l=Fd(l)),l!==""&&(n+=`
`+l))}else if(t.debugStack!=null){var d=t.debugStack;(t=t.owner)&&d&&(n+=`
`+Fd(d))}else break;var p=n}catch(T){p=`
Error generating stack: `+T.message+`
`+T.stack}return p}function Re(t,n,r,l,d,p,T){var C=Vn;In(t);try{return t!==null&&t._debugTask?t._debugTask.run(n.bind(null,r,l,d,p,T)):n(r,l,d,p,T)}finally{In(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function In(t){ie.getCurrentStack=t===null?null:Hy,xa=!1,Vn=t}function Ai(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return Ue(t),t;default:return""}}function _t(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function jy(t){var n=_t(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);Ue(t[n]);var l=""+t[n];if(!t.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var d=r.get,p=r.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(T){Ue(T),l=""+T,p.call(this,T)}}),Object.defineProperty(t,n,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(T){Ue(T),l=""+T},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function za(t){t._valueTracker||(t._valueTracker=jy(t))}function jo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var r=n.getValue(),l="";return t&&(l=_t(t)?t.checked?"true":"false":t.value),t=l,t!==r?(n.setValue(t),!0):!1}function Du(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function si(t){return t.replace(yL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function kt(t,n){n.checked===void 0||n.defaultChecked===void 0||uA||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",wu()||"A component",n.type),uA=!0),n.value===void 0||n.defaultValue===void 0||lA||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",wu()||"A component",n.type),lA=!0)}function ku(t,n,r,l,d,p,T,C){t.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?(me(T,"type"),t.type=T):t.removeAttribute("type"),n!=null?T==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Ai(n)):t.value!==""+Ai(n)&&(t.value=""+Ai(n)):T!=="submit"&&T!=="reset"||t.removeAttribute("value"),n!=null?jd(t,T,Ai(n)):r!=null?jd(t,T,Ai(r)):l!=null&&t.removeAttribute("value"),d==null&&p!=null&&(t.defaultChecked=!!p),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?(me(C,"name"),t.name=""+Ai(C)):t.removeAttribute("name")}function zo(t,n,r,l,d,p,T,C){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(me(p,"type"),t.type=p),n!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||n!=null))return;r=r!=null?""+Ai(r):"",n=n!=null?""+Ai(n):r,C||n===t.value||(t.value=n),t.defaultValue=n}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=C?t.checked:!!l,t.defaultChecked=!!l,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(me(T,"name"),t.name=T)}function jd(t,n,r){n==="number"&&Du(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function Fp(t,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?nb.Children.forEach(n.children,function(r){r==null||typeof r=="string"||typeof r=="number"||typeof r=="bigint"||dA||(dA=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):n.dangerouslySetInnerHTML==null||hA||(hA=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||cA||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),cA=!0)}function Hp(){var t=wu();return t?`
Check the render method of \``+t+"`.":""}function Va(t,n,r,l){if(t=t.options,n){n={};for(var d=0;d<r.length;d++)n["$"+r[d]]=!0;for(r=0;r<t.length;r++)d=n.hasOwnProperty("$"+t[r].value),t[r].selected!==d&&(t[r].selected=d),d&&l&&(t[r].defaultSelected=!0)}else{for(r=""+Ai(r),n=null,d=0;d<t.length;d++){if(t[d].value===r){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Ou(t,n){for(t=0;t<pA.length;t++){var r=pA[t];if(n[r]!=null){var l=Mi(n[r]);n.multiple&&!l?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",r,Hp()):!n.multiple&&l&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",r,Hp())}}n.value===void 0||n.defaultValue===void 0||fA||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),fA=!0)}function Ru(t,n){n.value===void 0||n.defaultValue===void 0||mA||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",wu()||"A component"),mA=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function zd(t,n,r){if(n!=null&&(n=""+Ai(n),n!==t.value&&(t.value=n),r==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=r!=null?""+Ai(r):""}function jp(t,n,r,l){if(n==null){if(l!=null){if(r!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Mi(l)){if(1<l.length)throw Error("<textarea> can only have at most one child.");l=l[0]}r=l}r==null&&(r=""),n=r}r=Ai(n),t.defaultValue=r,l=t.textContent,l===r&&l!==""&&l!==null&&(t.value=l)}function zp(t,n){return t.serverProps===void 0&&t.serverTail.length===0&&t.children.length===1&&3<t.distanceFromLeaf&&t.distanceFromLeaf>15-n?zp(t.children[0],n):t}function vi(t){return" "+" ".repeat(t)}function Ss(t){return"+ "+" ".repeat(t)}function ea(t){return"- "+" ".repeat(t)}function Br(t){switch(t.tag){case 26:case 27:case 5:return t.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return t=t.type,t.displayName||t.name||null;case 11:return t=t.type.render,t.displayName||t.name||null;case 1:return t=t.type,t.displayName||t.name||null;default:return null}}function xs(t,n){return gA.test(t)?(t=JSON.stringify(t),t.length>n-2?8>n?'{"..."}':"{"+t.slice(0,n-7)+'..."}':"{"+t+"}"):t.length>n?5>n?'{"..."}':t.slice(0,n-3)+"...":t}function ta(t,n,r){var l=120-2*r;if(n===null)return Ss(r)+xs(t,l)+`
`;if(typeof n=="string"){for(var d=0;d<n.length&&d<t.length&&n.charCodeAt(d)===t.charCodeAt(d);d++);return d>l-8&&10<d&&(t="..."+t.slice(d-8),n="..."+n.slice(d-8)),Ss(r)+xs(t,l)+`
`+ea(r)+xs(n,l)+`
`}return vi(r)+xs(t,l)+`
`}function qa(t){return Object.prototype.toString.call(t).replace(/^\[object (.*)\]$/,function(n,r){return r})}function Vo(t,n){switch(typeof t){case"string":return t=JSON.stringify(t),t.length>n?5>n?'"..."':t.slice(0,n-4)+'..."':t;case"object":if(t===null)return"null";if(Mi(t))return"[...]";if(t.$$typeof===so)return(n=Q(t.type))?"<"+n+">":"<...>";var r=qa(t);if(r==="Object"){r="",n-=2;for(var l in t)if(t.hasOwnProperty(l)){var d=JSON.stringify(l);if(d!=='"'+l+'"'&&(l=d),n-=l.length-2,d=Vo(t[l],15>n?n:15),n-=d.length,0>n){r+=r===""?"...":", ...";break}r+=(r===""?"":",")+l+":"+d}return"{"+r+"}"}return r;case"function":return(n=t.displayName||t.name)?"function "+n:"function";default:return String(t)}}function $a(t,n){return typeof t!="string"||gA.test(t)?"{"+Vo(t,n-2)+"}":t.length>n-2?5>n?'"..."':'"'+t.slice(0,n-5)+'..."':'"'+t+'"'}function Vd(t,n,r){var l=120-r.length-t.length,d=[],p;for(p in n)if(n.hasOwnProperty(p)&&p!=="children"){var T=$a(n[p],120-r.length-p.length-1);l-=p.length+T.length+2,d.push(p+"="+T)}return d.length===0?r+"<"+t+`>
`:0<l?r+"<"+t+" "+d.join(" ")+`>
`:r+"<"+t+`
`+r+" "+d.join(`
`+r+" ")+`
`+r+`>
`}function zy(t,n,r){var l="",d=Je({},n),p;for(p in t)if(t.hasOwnProperty(p)){delete d[p];var T=120-2*r-p.length-2,C=Vo(t[p],T);n.hasOwnProperty(p)?(T=Vo(n[p],T),l+=Ss(r)+p+": "+C+`
`,l+=ea(r)+p+": "+T+`
`):l+=Ss(r)+p+": "+C+`
`}for(var O in d)d.hasOwnProperty(O)&&(t=Vo(d[O],120-2*r-O.length-2),l+=ea(r)+O+": "+t+`
`);return l}function ia(t,n,r,l){var d="",p=new Map;for(L in r)r.hasOwnProperty(L)&&p.set(L.toLowerCase(),L);if(p.size===1&&p.has("children"))d+=Vd(t,n,vi(l));else{for(var T in n)if(n.hasOwnProperty(T)&&T!=="children"){var C=120-2*(l+1)-T.length-1,O=p.get(T.toLowerCase());if(O!==void 0){p.delete(T.toLowerCase());var L=n[T];O=r[O];var J=$a(L,C);C=$a(O,C),typeof L=="object"&&L!==null&&typeof O=="object"&&O!==null&&qa(L)==="Object"&&qa(O)==="Object"&&(2<Object.keys(L).length||2<Object.keys(O).length||-1<J.indexOf("...")||-1<C.indexOf("..."))?d+=vi(l+1)+T+`={{
`+zy(L,O,l+2)+vi(l+1)+`}}
`:(d+=Ss(l+1)+T+"="+J+`
`,d+=ea(l+1)+T+"="+C+`
`)}else d+=vi(l+1)+T+"="+$a(n[T],C)+`
`}p.forEach(function(ne){if(ne!=="children"){var Z=120-2*(l+1)-ne.length-1;d+=ea(l+1)+ne+"="+$a(r[ne],Z)+`
`}}),d=d===""?vi(l)+"<"+t+`>
`:vi(l)+"<"+t+`
`+d+vi(l)+`>
`}return t=r.children,n=n.children,typeof t=="string"||typeof t=="number"||typeof t=="bigint"?(p="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(p=""+n),d+=ta(p,""+t,l+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=t==null?d+ta(""+n,null,l+1):d+ta(""+n,void 0,l+1)),d}function qo(t,n){var r=Br(t);if(r===null){for(r="",t=t.child;t;)r+=qo(t,n),t=t.sibling;return r}return vi(n)+"<"+r+`>
`}function qd(t,n){var r=zp(t,n);if(r!==t&&(t.children.length!==1||t.children[0]!==r))return vi(n)+`...
`+qd(r,n+1);r="";var l=t.fiber._debugInfo;if(l)for(var d=0;d<l.length;d++){var p=l[d].name;typeof p=="string"&&(r+=vi(n)+"<"+p+`>
`,n++)}if(l="",d=t.fiber.pendingProps,t.fiber.tag===6)l=ta(d,t.serverProps,n),n++;else if(p=Br(t.fiber),p!==null)if(t.serverProps===void 0){l=n;var T=120-2*l-p.length-2,C="";for(L in d)if(d.hasOwnProperty(L)&&L!=="children"){var O=$a(d[L],15);if(T-=L.length+O.length+2,0>T){C+=" ...";break}C+=" "+L+"="+O}l=vi(l)+"<"+p+C+`>
`,n++}else t.serverProps===null?(l=Vd(p,d,Ss(n)),n++):typeof t.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(l=ia(p,d,t.serverProps,n),n++);var L="";for(d=t.fiber.child,p=0;d&&p<t.children.length;)T=t.children[p],T.fiber===d?(L+=qd(T,n),p++):L+=qo(d,n),d=d.sibling;for(d&&0<t.children.length&&(L+=vi(n)+`...
`),d=t.serverTail,t.serverProps===null&&n--,t=0;t<d.length;t++)p=d[t],L=typeof p=="string"?L+(ea(n)+xs(p,120-2*n)+`
`):L+Vd(p.type,p.props,ea(n));return r+l+L}function $o(t){try{return`
`+qd(t,0)}catch{return""}}function Mu(t,n,r){for(var l=n,d=null,p=0;l;)l===t&&(p=0),d={fiber:l,children:d!==null?[d]:[],serverProps:l===n?r:l===t?null:void 0,serverTail:[],distanceFromLeaf:p},p++,l=l.return;return d!==null?$o(d).replaceAll(/^[+-]/gm,">"):""}function bn(t,n){var r=Je({},t||vA),l={tag:n};return yA.indexOf(n)!==-1&&(r.aTagInScope=null,r.buttonTagInScope=null,r.nobrTagInScope=null),bL.indexOf(n)!==-1&&(r.pTagInButtonScope=null),vL.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(r.listItemTagAutoclosing=null,r.dlItemTagAutoclosing=null),r.current=l,n==="form"&&(r.formTag=l),n==="a"&&(r.aTagInScope=l),n==="button"&&(r.buttonTagInScope=l),n==="nobr"&&(r.nobrTagInScope=l),n==="p"&&(r.pTagInButtonScope=l),n==="li"&&(r.listItemTagAutoclosing=l),(n==="dd"||n==="dt")&&(r.dlItemTagAutoclosing=l),n==="#document"||n==="html"?r.containerTagInScope=null:r.containerTagInScope||(r.containerTagInScope=l),t!==null||n!=="#document"&&n!=="html"&&n!=="body"?r.implicitRootScope===!0&&(r.implicitRootScope=!1):r.implicitRootScope=!0,r}function Vp(t,n,r){switch(n){case"select":return t==="hr"||t==="option"||t==="optgroup"||t==="script"||t==="template"||t==="#text";case"optgroup":return t==="option"||t==="#text";case"option":return t==="#text";case"tr":return t==="th"||t==="td"||t==="style"||t==="script"||t==="template";case"tbody":case"thead":case"tfoot":return t==="tr"||t==="style"||t==="script"||t==="template";case"colgroup":return t==="col"||t==="template";case"table":return t==="caption"||t==="colgroup"||t==="tbody"||t==="tfoot"||t==="thead"||t==="style"||t==="script"||t==="template";case"head":return t==="base"||t==="basefont"||t==="bgsound"||t==="link"||t==="meta"||t==="title"||t==="noscript"||t==="noframes"||t==="style"||t==="script"||t==="template";case"html":if(r)break;return t==="head"||t==="body"||t==="frameset";case"frameset":return t==="frame";case"#document":if(!r)return t==="html"}switch(t){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n!=="h1"&&n!=="h2"&&n!=="h3"&&n!=="h4"&&n!=="h5"&&n!=="h6";case"rp":case"rt":return _L.indexOf(n)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return n==null;case"head":return r||n===null;case"html":return r&&n==="#document"||n===null;case"body":return r&&(n==="#document"||n==="html")||n===null}return!0}function Lu(t,n){switch(t){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return n.pTagInButtonScope;case"form":return n.formTag||n.pTagInButtonScope;case"li":return n.listItemTagAutoclosing;case"dd":case"dt":return n.dlItemTagAutoclosing;case"button":return n.buttonTagInScope;case"a":return n.aTagInScope;case"nobr":return n.nobrTagInScope}return null}function Fr(t,n){for(;t;){switch(t.tag){case 5:case 26:case 27:if(t.type===n)return t}t=t.return}return null}function Hr(t,n){n=n||vA;var r=n.current;if(n=(r=Vp(t,r&&r.tag,n.implicitRootScope)?null:r)?null:Lu(t,n),n=r||n,!n)return!0;var l=n.tag;if(n=String(!!r)+"|"+t+"|"+l,Gm[n])return!1;Gm[n]=!0;var d=(n=Vn)?Fr(n.return,l):null,p=n!==null&&d!==null?Mu(d,n,null):"",T="<"+t+">";return r?(r="",l==="table"&&t==="tr"&&(r+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
This will cause a hydration error.%s`,T,l,r,p)):console.error(`In HTML, %s cannot be a descendant of <%s>.
This will cause a hydration error.%s`,T,l,p),n&&(t=n.return,d===null||t===null||d===t&&t._debugOwner===n._debugOwner||Re(d,function(){console.error(`<%s> cannot contain a nested %s.
See this log for the ancestor stack trace.`,l,T)})),!1}function Es(t,n,r){if(r||Vp("#text",n,!1))return!0;if(r="#text|"+n,Gm[r])return!1;Gm[r]=!0;var l=(r=Vn)?Fr(r,n):null;return r=r!==null&&l!==null?Mu(l,r,r.tag!==6?{children:null}:null):"",/\S/.test(t)?console.error(`In HTML, text nodes cannot be a child of <%s>.
This will cause a hydration error.%s`,n,r):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
This will cause a hydration error.%s`,n,r),!1}function Ga(t,n){if(n){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=n;return}}t.textContent=n}function qp(t){return t.replace(xL,function(n,r){return r.toUpperCase()})}function Iu(t,n,r){var l=n.indexOf("--")===0;l||(-1<n.indexOf("-")?pc.hasOwnProperty(n)&&pc[n]||(pc[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,qp(n.replace(SL,"ms-")))):TL.test(n)?pc.hasOwnProperty(n)&&pc[n]||(pc[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!TA.test(r)||Tb.hasOwnProperty(r)&&Tb[r]||(Tb[r]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,r.replace(TA,""))),typeof r=="number"&&(isNaN(r)?SA||(SA=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(r)||xA||(xA=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),r==null||typeof r=="boolean"||r===""?l?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":l?t.setProperty(n,r):typeof r!="number"||r===0||EA.has(n)?n==="float"?t.cssFloat=r:(De(r,n),t[n]=(""+r).trim()):t[n]=r+"px"}function $p(t,n,r){if(n!=null&&typeof n!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(n&&Object.freeze(n),t=t.style,r!=null){if(n){var l={};if(r){for(var d in r)if(r.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var p=_b[d]||[d],T=0;T<p.length;T++)l[p[T]]=d}for(var C in n)if(n.hasOwnProperty(C)&&(!r||r[C]!==n[C]))for(d=_b[C]||[C],p=0;p<d.length;p++)l[d[p]]=C;C={};for(var O in n)for(d=_b[O]||[O],p=0;p<d.length;p++)C[d[p]]=O;O={};for(var L in l)if(d=l[L],(p=C[L])&&d!==p&&(T=d+","+p,!O[T])){O[T]=!0,T=console;var J=n[d];T.error.call(T,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",J==null||typeof J=="boolean"||J===""?"Removing":"Updating",d,p)}}for(var ne in r)!r.hasOwnProperty(ne)||n!=null&&n.hasOwnProperty(ne)||(ne.indexOf("--")===0?t.setProperty(ne,""):ne==="float"?t.cssFloat="":t[ne]="");for(var Z in n)L=n[Z],n.hasOwnProperty(Z)&&r[Z]!==L&&Iu(t,Z,L)}else for(l in n)n.hasOwnProperty(l)&&Iu(t,l,n[l])}function Go(t){if(t.indexOf("-")===-1)return!1;switch(t){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}}function Gp(t){return EL.get(t)||t}function Pu(t,n){if(ur.call(gc,n)&&gc[n])return!0;if(AL.test(n)){if(t="aria-"+n.slice(4).toLowerCase(),t=CA.hasOwnProperty(t)?t:null,t==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),gc[n]=!0;if(n!==t)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,t),gc[n]=!0}if(CL.test(n)){if(t=n.toLowerCase(),t=CA.hasOwnProperty(t)?t:null,t==null)return gc[n]=!0,!1;n!==t&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,t),gc[n]=!0)}return!0}function Xp(t,n){var r=[],l;for(l in n)Pu(t,l)||r.push(l);n=r.map(function(d){return"`"+d+"`"}).join(", "),r.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t):1<r.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t)}function Vy(t,n,r,l){if(ur.call(sn,n)&&sn[n])return!0;var d=n.toLowerCase();if(d==="onfocusin"||d==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),sn[n]=!0;if(typeof r=="function"&&(t==="form"&&n==="action"||t==="input"&&n==="formAction"||t==="button"&&n==="formAction"))return!0;if(l!=null){if(t=l.possibleRegistrationNames,l.registrationNameDependencies.hasOwnProperty(n))return!0;if(l=t.hasOwnProperty(d)?t[d]:null,l!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,l),sn[n]=!0;if(wA.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),sn[n]=!0}else if(wA.test(n))return wL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),sn[n]=!0;if(DL.test(n)||kL.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),sn[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),sn[n]=!0;if(d==="is"&&r!==null&&r!==void 0&&typeof r!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof r),sn[n]=!0;if(typeof r=="number"&&isNaN(r))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),sn[n]=!0;if(Ym.hasOwnProperty(d)){if(d=Ym[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),sn[n]=!0}else if(n!==d)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",n,d),sn[n]=!0;switch(n){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof r){case"boolean":switch(n){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":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":case"capture":case"download":case"inert":return!0;default:return d=n.toLowerCase().slice(0,5),d==="data-"||d==="aria-"?!0:(r?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',r,n,n,r,n):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',r,n,n,r,n,n,n),sn[n]=!0)}case"function":case"symbol":return sn[n]=!0,!1;case"string":if(r==="false"||r==="true"){switch(n){case"checked":case"selected":case"multiple":case"muted":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":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",r,n,r==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',n,r),sn[n]=!0}}return!0}function Yp(t,n,r){var l=[],d;for(d in n)Vy(t,d,n[d],r)||l.push(d);n=l.map(function(p){return"`"+p+"`"}).join(", "),l.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t):1<l.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",n,t)}function Xo(t){return OL.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Nu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function Wp(t){var n=Ln(t);if(n&&(t=n.stateNode)){var r=t[xn]||null;e:switch(t=n.stateNode,n.type){case"input":if(ku(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=t;r.parentNode;)r=r.parentNode;for(me(n,"name"),r=r.querySelectorAll('input[name="'+si(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var l=r[n];if(l!==t&&l.form===t.form){var d=l[xn]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");ku(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<r.length;n++)l=r[n],l.form===t.form&&jo(l)}break e;case"textarea":zd(t,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&Va(t,!!r.multiple,n,!1)}}}function Yo(t,n,r){if(Sb)return t(n,r);Sb=!0;try{var l=t(n);return l}finally{if(Sb=!1,(yc!==null||vc!==null)&&(sc(),yc&&(n=yc,t=vc,vc=yc=null,Wp(n),t)))for(n=0;n<t.length;n++)Wp(t[n])}}function Cs(t,n){var r=t.stateNode;if(r===null)return null;var l=r[xn]||null;if(l===null)return null;r=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof r+"` type.");return r}function $d(){if(Wm)return Wm;var t,n=Eb,r=n.length,l,d="value"in uo?uo.value:uo.textContent,p=d.length;for(t=0;t<r&&n[t]===d[t];t++);var T=r-t;for(l=1;l<=T&&n[r-l]===d[p-l];l++);return Wm=d.slice(t,1<l?1-l:void 0)}function Uu(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Bu(){return!0}function Gd(){return!1}function wi(t){function n(r,l,d,p,T){this._reactName=r,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=T,this.currentTarget=null;for(var C in t)t.hasOwnProperty(C)&&(r=t[C],this[C]=r?r(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Bu:Gd,this.isPropagationStopped=Gd,this}return Je(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Bu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Bu)},persist:function(){},isPersistent:Bu}),n}function qy(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=VL[t])?!!n[t]:!1}function Fu(){return qy}function Qp(t,n){switch(t){case"keyup":return t6.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==RA;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}function $y(t,n){switch(t){case"compositionend":return Kp(n);case"keypress":return n.which!==LA?null:(PA=!0,IA);case"textInput":return t=n.data,t===IA&&PA?null:t;default:return null}}function Gy(t,n){if(bc)return t==="compositionend"||!Db&&Qp(t,n)?(t=$d(),Wm=Eb=uo=null,bc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return MA&&n.locale!=="ko"?null:n.data;default:return null}}function Zp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!n6[t.type]:n==="textarea"}function Xy(t){if(!Ea)return!1;t="on"+t;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n=typeof n[t]=="function"),n}function Hu(t,n,r,l){yc?vc?vc.push(l):vc=[l]:yc=l,n=Om(n,"onChange"),0<n.length&&(r=new Qm("onChange","change",null,r,l),t.push({event:r,listeners:n}))}function Yy(t){fC(t,0)}function Wo(t){var n=Js(t);if(jo(n))return t}function Qo(t,n){if(t==="change")return n}function Jp(){Kh&&(Kh.detachEvent("onpropertychange",em),Zh=Kh=null)}function em(t){if(t.propertyName==="value"&&Wo(Zh)){var n=[];Hu(n,Zh,t,Nu(t)),Yo(Yy,n)}}function Wy(t,n,r){t==="focusin"?(Jp(),Kh=n,Zh=r,Kh.attachEvent("onpropertychange",em)):t==="focusout"&&Jp()}function Qy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Wo(Zh)}function Ky(t,n){if(t==="click")return Wo(n)}function ju(t,n){if(t==="input"||t==="change")return Wo(n)}function Ko(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}function As(t,n){if(an(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var r=Object.keys(t),l=Object.keys(n);if(r.length!==l.length)return!1;for(l=0;l<r.length;l++){var d=r[l];if(!ur.call(n,d)||!an(t[d],n[d]))return!1}return!0}function Zo(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function _n(t,n){var r=Zo(t);t=0;for(var l;r;){if(r.nodeType===3){if(l=t+r.textContent.length,t<=n&&l>=n)return{node:r,offset:n-t};t=l}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Zo(r)}}function Zn(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Zn(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Jo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Du(t.document);n instanceof t.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)t=n.contentWindow;else break;n=Du(t.document)}return n}function zu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function tm(t,n,r){var l=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ob||_c==null||_c!==Du(l)||(l=_c,"selectionStart"in l&&zu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Jh&&As(Jh,l)||(Jh=l,l=Om(kb,"onSelect"),0<l.length&&(n=new Qm("onSelect","select",null,n,r),t.push({event:n,listeners:l}),n.target=_c)))}function Xa(t,n){var r={};return r[t.toLowerCase()]=n.toLowerCase(),r["Webkit"+t]="webkit"+n,r["Moz"+t]="moz"+n,r}function Ya(t){if(Rb[t])return Rb[t];if(!Tc[t])return t;var n=Tc[t],r;for(r in n)if(n.hasOwnProperty(r)&&r in UA)return Rb[t]=n[r];return t}function Pn(t,n){zA.set(t,n),ve(n,[t])}function Di(t,n){if(typeof t=="object"&&t!==null){var r=Lb.get(t);return r!==void 0?r:(n={value:t,source:n,stack:Ho(n)},Lb.set(t,n),n)}return{value:t,source:n,stack:Ho(n)}}function jr(){for(var t=Sc,n=Ib=Sc=0;n<t;){var r=as[n];as[n++]=null;var l=as[n];as[n++]=null;var d=as[n];as[n++]=null;var p=as[n];if(as[n++]=null,l!==null&&d!==null){var T=l.pending;T===null?d.next=d:(d.next=T.next,T.next=d),l.pending=d}p!==0&&aa(r,d,p)}}function na(t,n,r,l){as[Sc++]=t,as[Sc++]=n,as[Sc++]=r,as[Sc++]=l,Ib|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function sa(t,n,r,l){return na(t,n,r,l),Vu(t)}function ui(t,n){return na(t,null,null,n),Vu(t)}function aa(t,n,r){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r);for(var d=!1,p=t.return;p!==null;)p.childLanes|=r,l=p.alternate,l!==null&&(l.childLanes|=r),p.tag===22&&(t=p.stateNode,t===null||t._visibility&Zm||(d=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,d&&n!==null&&(d=31-nn(r),t=p.hiddenUpdates,l=t[d],l===null?t[d]=[n]:l.push(n),n.lane=r|536870912),p):null}function Vu(t){if(Sf>A6)throw Il=Sf=0,xf=c_=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Il>w6&&(Il=0,xf=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),t.alternate===null&&t.flags&4098&&rC(t);for(var n=t,r=n.return;r!==null;)n.alternate===null&&n.flags&4098&&rC(t),n=r,r=n.return;return n.tag===3?n.stateNode:null}function ra(t){if(rs===null)return t;var n=rs(t);return n===void 0?t:n.current}function qu(t){if(rs===null)return t;var n=rs(t);return n===void 0?t!=null&&typeof t.render=="function"&&(n=ra(t.render),t.render!==n)?(n={$$typeof:zh,render:n},t.displayName!==void 0&&(n.displayName=t.displayName),n):t:n.current}function $u(t,n){if(rs===null)return!1;var r=t.elementType;n=n.type;var l=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(t.tag){case 1:typeof n=="function"&&(l=!0);break;case 0:(typeof n=="function"||d===zn)&&(l=!0);break;case 11:(d===zh||d===zn)&&(l=!0);break;case 14:case 15:(d===jm||d===zn)&&(l=!0);break;default:return!1}return!!(l&&(t=rs(r),t!==void 0&&t===rs(n)))}function im(t){rs!==null&&typeof WeakSet=="function"&&(xc===null&&(xc=new WeakSet),xc.add(t))}function Xd(t,n,r){var l=t.alternate,d=t.child,p=t.sibling,T=t.tag,C=t.type,O=null;switch(T){case 0:case 15:case 1:O=C;break;case 11:O=C.render}if(rs===null)throw Error("Expected resolveFamily to be set during hot reload.");var L=!1;C=!1,O!==null&&(O=rs(O),O!==void 0&&(r.has(O)?C=!0:n.has(O)&&(T===1?C=!0:L=!0))),xc!==null&&(xc.has(t)||l!==null&&xc.has(l))&&(C=!0),C&&(t._debugNeedsRemount=!0),(C||L)&&(l=ui(t,2),l!==null&&ei(l,t,2)),d===null||C||Xd(d,n,r),p!==null&&Xd(p,n,r)}function Zy(t,n,r,l){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,qA||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function zr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ws(t,n){var r=t.alternate;switch(r===null?(r=A(t.tag,n,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r._debugOwner=t._debugOwner,r._debugStack=t._debugStack,r._debugTask=t._debugTask,r._debugHookTypes=t._debugHookTypes,r.alternate=t,t.alternate=r):(r.pendingProps=n,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null,r.actualDuration=-0,r.actualStartTime=-1.1),r.flags=t.flags&65011712,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,n=t.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r.selfBaseDuration=t.selfBaseDuration,r.treeBaseDuration=t.treeBaseDuration,r._debugInfo=t._debugInfo,r._debugNeedsRemount=t._debugNeedsRemount,r.tag){case 0:case 15:r.type=ra(t.type);break;case 1:r.type=ra(t.type);break;case 11:r.type=qu(t.type)}return r}function Gu(t,n){t.flags&=65011714;var r=t.alternate;return r===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null,t.selfBaseDuration=0,t.treeBaseDuration=0):(t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,n=r.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},t.selfBaseDuration=r.selfBaseDuration,t.treeBaseDuration=r.treeBaseDuration),t}function Yd(t,n,r,l,d,p){var T=0,C=t;if(typeof t=="function")zr(t)&&(T=1),C=ra(C);else if(typeof t=="string")T=de(),T=HM(t,r,T)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case lb:return n=A(31,r,n,d),n.elementType=lb,n.lanes=p,n;case dc:return oa(r.children,d,p,n);case Hm:T=8,d|=Xi,d|=Ms;break;case sb:return t=r,l=d,typeof t.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof t.id),n=A(12,t,n,l|Li),n.elementType=sb,n.lanes=p,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case rb:return n=A(13,r,n,d),n.elementType=rb,n.lanes=p,n;case ob:return n=A(19,r,n,d),n.elementType=ob,n.lanes=p,n;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case eL:case ba:T=10;break e;case ab:T=9;break e;case zh:T=11,C=qu(C);break e;case jm:T=14;break e;case zn:T=16,C=null;break e}C="",(t===void 0||typeof t=="object"&&t!==null&&Object.keys(t).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),t===null?r="null":Mi(t)?r="array":t!==void 0&&t.$$typeof===so?(r="<"+(Q(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):r=typeof t,(T=l?le(l):null)&&(C+=`
Check the render method of \``+T+"`."),T=29,r=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(r+"."+C)),C=null}return n=A(T,r,n,d),n.elementType=t,n.type=C,n.lanes=p,n._debugOwner=l,n}function Xu(t,n,r){return n=Yd(t.type,t.key,t.props,t._owner,n,r),n._debugOwner=t._owner,n._debugStack=t._debugStack,n._debugTask=t._debugTask,n}function oa(t,n,r,l){return t=A(7,t,l,n),t.lanes=r,t}function Vr(t,n,r){return t=A(6,t,null,n),t.lanes=r,t}function Wd(t,n,r){return n=A(4,t.children!==null?t.children:[],t.key,n),n.lanes=r,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function Wa(t,n){Ds(),Ec[Cc++]=eg,Ec[Cc++]=Jm,Jm=t,eg=n}function nm(t,n,r){Ds(),os[ls++]=hr,os[ls++]=fr,os[ls++]=Sl,Sl=t;var l=hr;t=fr;var d=32-nn(l)-1;l&=~(1<<d),r+=1;var p=32-nn(n)+d;if(30<p){var T=d-d%5;p=(l&(1<<T)-1).toString(32),l>>=T,d-=T,hr=1<<32-nn(n)+d|r<<d|l,fr=p+t}else hr=1<<p|r<<d|l,fr=t}function el(t){Ds(),t.return!==null&&(Wa(t,1),nm(t,1,0))}function Qd(t){for(;t===Jm;)Jm=Ec[--Cc],Ec[Cc]=null,eg=Ec[--Cc],Ec[Cc]=null;for(;t===Sl;)Sl=os[--ls],os[ls]=null,fr=os[--ls],os[ls]=null,hr=os[--ls],os[ls]=null}function Ds(){lt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function la(t,n){if(t.return===null){if(us===null)us={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(us.fiber!==t)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");us.distanceFromLeaf>n&&(us.distanceFromLeaf=n)}return us}var r=la(t.return,n+1).children;return 0<r.length&&r[r.length-1].fiber===t?(r=r[r.length-1],r.distanceFromLeaf>n&&(r.distanceFromLeaf=n),r):(n={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},r.push(n),n)}function Kd(t,n){pr||(t=la(t,0),t.serverProps=null,n!==null&&(n=wC(n),t.serverTail.push(n)))}function Qa(t){var n="",r=us;throw r!==null&&(us=null,n=$o(r)),il(Di(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
https://react.dev/link/hydration-mismatch`+n),t)),Pb}function sm(t){var n=t.stateNode,r=t.type,l=t.memoizedProps;switch(n[Gi]=t,n[xn]=l,Hv(r,l),r){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(r=0;r<Ef.length;r++)nt(Ef[r],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":Le("input",l),nt("invalid",n),kt(n,l),zo(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),za(n);break;case"option":Fp(n,l);break;case"select":Le("select",l),nt("invalid",n),Ou(n,l);break;case"textarea":Le("textarea",l),nt("invalid",n),Ru(n,l),jp(n,l.value,l.defaultValue,l.children),za(n)}r=l.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||l.suppressHydrationWarning===!0||yC(n.textContent,r)?(l.popover!=null&&(nt("beforetoggle",n),nt("toggle",n)),l.onScroll!=null&&nt("scroll",n),l.onScrollEnd!=null&&nt("scrollend",n),l.onClick!=null&&(n.onclick=Rm),n=!0):n=!1,n||Qa(t)}function am(t){for(rn=t.return;rn;)switch(rn.tag){case 5:case 13:Ca=!1;return;case 27:case 3:Ca=!0;return;default:rn=rn.return}}function qr(t){if(t!==rn)return!1;if(!lt)return am(t),lt=!0,!1;var n=t.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||$v(t.type,t.memoizedProps)),r=!r),r&&Xt){for(r=Xt;r;){var l=la(t,0),d=wC(r);l.serverTail.push(d),r=d.type==="Suspense"?kC(r):ns(r.nextSibling)}Qa(t)}if(am(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Xt=kC(t)}else n===27?(n=Xt,no(t.type)?(t=S_,S_=null,Xt=t):Xt=n):Xt=rn?ns(t.stateNode.nextSibling):null;return!0}function tl(){Xt=rn=null,pr=lt=!1}function Zd(){var t=xl;return t!==null&&(un===null?un=t:un.push.apply(un,t),xl=null),t}function il(t){xl===null?xl=[t]:xl.push(t)}function Jd(){var t=us;if(t!==null){us=null;for(var n=$o(t);0<t.children.length;)t=t.children[0];Re(t.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
%s%s`,"https://react.dev/link/hydration-mismatch",n)})}}function Jt(){Ac=tg=null,wc=!1}function Jn(t,n,r){Ae(Nb,n._currentValue,t),n._currentValue=r,Ae(Ub,n._currentRenderer,t),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==YA&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=YA}function $t(t,n){t._currentValue=Nb.current;var r=Ub.current;be(Ub,n),t._currentRenderer=r,be(Nb,n)}function Ka(t,n,r){for(;t!==null;){var l=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),t===r)break;t=t.return}t!==r&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function eh(t,n,r,l){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var p=d.dependencies;if(p!==null){var T=d.child;p=p.firstContext;e:for(;p!==null;){var C=p;p=d;for(var O=0;O<n.length;O++)if(C.context===n[O]){p.lanes|=r,C=p.alternate,C!==null&&(C.lanes|=r),Ka(p.return,r,t),l||(T=null);break e}p=C.next}}else if(d.tag===18){if(T=d.return,T===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");T.lanes|=r,p=T.alternate,p!==null&&(p.lanes|=r),Ka(T,r,t),T=null}else T=d.child;if(T!==null)T.return=d;else for(T=d;T!==null;){if(T===t){T=null;break}if(d=T.sibling,d!==null){d.return=T.return,T=d;break}T=T.return}d=T}}function nl(t,n,r,l){t=null;for(var d=n,p=!1;d!==null;){if(!p){if(d.flags&524288)p=!0;else if(d.flags&262144)break}if(d.tag===10){var T=d.alternate;if(T===null)throw Error("Should have a current fiber. This is a bug in React.");if(T=T.memoizedProps,T!==null){var C=d.type;an(d.pendingProps.value,T.value)||(t!==null?t.push(C):t=[C])}}else if(d===zm.current){if(T=d.alternate,T===null)throw Error("Should have a current fiber. This is a bug in React.");T.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Df):t=[Df])}d=d.return}t!==null&&eh(n,t,r,l),n.flags|=262144}function Nn(t){for(t=t.firstContext;t!==null;){if(!an(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ua(t){tg=t,Ac=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Lt(t){return wc&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),sl(tg,t)}function Yu(t,n){return tg===null&&ua(t),sl(t,n)}function sl(t,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},Ac===null){if(t===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Ac=n,t.dependencies={lanes:0,firstContext:n,_debugThenableState:null},t.flags|=524288}else Ac=Ac.next=n;return r}function th(){return{controller:new d6,data:new Map,refCount:0}}function Za(t){t.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),t.refCount++}function al(t){t.refCount--,0>t.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),t.refCount===0&&h6(f6,function(){t.controller.abort()})}function ks(){var t=El;return El=0,t}function rl(t){var n=El;return El=t,n}function ol(t){var n=El;return El+=t,n}function Ja(t){En=Dc(),0>t.actualStartTime&&(t.actualStartTime=En)}function Wu(t){if(0<=En){var n=Dc()-En;t.actualDuration+=n,t.selfBaseDuration=n,En=-1}}function ll(t){if(0<=En){var n=Dc()-En;t.actualDuration+=n,En=-1}}function qi(){if(0<=En){var t=Dc()-En;En=-1,El+=t}}function ht(){En=Dc()}function Os(t){for(var n=t.child;n;)t.actualDuration+=n.actualDuration,n=n.sibling}function ih(t,n){if(ef===null){var r=ef=[];Bb=0,Cl=Nv(),kc={status:"pending",value:void 0,then:function(l){r.push(l)}}}return Bb++,n.then(rm,rm),n}function rm(){if(--Bb===0&&ef!==null){kc!==null&&(kc.status="fulfilled");var t=ef;ef=null,Cl=0,kc=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Jy(t,n){var r=[],l={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return t.then(function(){l.status="fulfilled",l.value=n;for(var d=0;d<r.length;d++)(0,r[d])(n)},function(d){for(l.status="rejected",l.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),l}function nh(){var t=Al.current;return t!==null?t:Ot.pooledCache}function Qu(t,n){n===null?Ae(Al,Al.current,t):Ae(Al,n.pool,t)}function sh(){var t=nh();return t===null?null:{parent:di._currentValue,pool:t}}function ah(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function rh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ul(){}function oh(t,n,r){ie.actQueue!==null&&(ie.didUsePromise=!0);var l=t.thenables;switch(r=l[r],r===void 0?l.push(n):r!==n&&(t.didWarnAboutUncachedPromise||(t.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),n.then(ul,ul),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,lh(t),t;default:if(typeof n.status=="string")n.then(ul,ul);else{if(t=Ot,t!==null&&100<t.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");t=n,t.status="pending",t.then(function(d){if(n.status==="pending"){var p=n;p.status="fulfilled",p.value=d}},function(d){if(n.status==="pending"){var p=n;p.status="rejected",p.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,lh(t),t}throw uf=n,og=!0,lf}}function Ku(){if(uf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var t=uf;return uf=null,og=!1,t}function lh(t){if(t===lf||t===rg)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function cl(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uh(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Tn(t){return{lane:t,tag:JA,payload:null,callback:null,next:null}}function ca(t,n,r){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,jb===l&&!iw){var d=ue(t);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
Please update the following component: %s`,d),iw=!0}return(yt&ln)!==qn?(d=l.pending,d===null?n.next=n:(n.next=d.next,d.next=n),l.pending=n,n=Vu(t),aa(t,null,r),n):(na(t,l,n,r),Vu(t))}function $r(t,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var l=n.lanes;l&=t.pendingLanes,r|=l,n.lanes=r,Pr(t,r)}}function dl(t,n){var r=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,r===l)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var T={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=T:p=p.next=T,r=r.next}while(r!==null);p===null?d=p=n:p=p.next=n}else d=p=n;r={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:l.shared,callbacks:l.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=n:t.next=n,r.lastBaseUpdate=n}function hl(){if(zb){var t=kc;if(t!==null)throw t}}function fl(t,n,r,l){zb=!1;var d=t.updateQueue;ho=!1,jb=d.shared;var p=d.firstBaseUpdate,T=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var O=C,L=O.next;O.next=null,T===null?p=L:T.next=L,T=O;var J=t.alternate;J!==null&&(J=J.updateQueue,C=J.lastBaseUpdate,C!==T&&(C===null?J.firstBaseUpdate=L:C.next=L,J.lastBaseUpdate=O))}if(p!==null){var ne=d.baseState;T=0,J=L=O=null,C=p;do{var Z=C.lane&-536870913,ae=Z!==C.lane;if(ae?(it&Z)===Z:(l&Z)===Z){Z!==0&&Z===Cl&&(zb=!0),J!==null&&(J=J.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{Z=t;var ke=C,je=n,Rt=r;switch(ke.tag){case ew:if(ke=ke.payload,typeof ke=="function"){wc=!0;var st=ke.call(Rt,ne,je);if(Z.mode&Xi){Ye(!0);try{ke.call(Rt,ne,je)}finally{Ye(!1)}}wc=!1,ne=st;break e}ne=ke;break e;case Hb:Z.flags=Z.flags&-65537|128;case JA:if(st=ke.payload,typeof st=="function"){if(wc=!0,ke=st.call(Rt,ne,je),Z.mode&Xi){Ye(!0);try{st.call(Rt,ne,je)}finally{Ye(!1)}}wc=!1}else ke=st;if(ke==null)break e;ne=Je({},ne,ke);break e;case tw:ho=!0}}Z=C.callback,Z!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[Z]:ae.push(Z))}else ae={lane:Z,tag:C.tag,payload:C.payload,callback:C.callback,next:null},J===null?(L=J=ae,O=ne):J=J.next=ae,T|=Z;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;ae=C,C=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(1);J===null&&(O=ne),d.baseState=O,d.firstBaseUpdate=L,d.lastBaseUpdate=J,p===null&&(d.shared.lanes=0),go|=T,t.lanes=T,t.memoizedState=ne}jb=null}function ch(t,n){if(typeof t!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+t);t.call(n)}function ev(t,n){var r=t.shared.hiddenCallbacks;if(r!==null)for(t.shared.hiddenCallbacks=null,t=0;t<r.length;t++)ch(r[t],n)}function om(t,n){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)ch(r[t],n)}function Zu(t,n){var r=Da;Ae(lg,r,t),Ae(Oc,n,t),Da=r|n.baseLanes}function dh(t){Ae(lg,Da,t),Ae(Oc,Oc.current,t)}function hh(t){Da=lg.current,be(Oc,t),be(lg,t)}function Ze(){var t=te;hs===null?hs=[t]:hs.push(t)}function ge(){var t=te;if(hs!==null&&(gr++,hs[gr]!==t)){var n=ue(ze);if(!nw.has(n)&&(nw.add(n),hs!==null)){for(var r="",l=0;l<=gr;l++){var d=hs[l],p=l===gr?t:d;for(d=l+1+". "+d;30>d.length;)d+=" ";d+=p+`
`,r+=d}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
Previous render Next render
------------------------------------------------------
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`,n,r)}}}function Gr(t){t==null||Mi(t)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",te,typeof t)}function Ju(){var t=ue(ze);aw.has(t)||(aw.add(t),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",t))}function zt(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function fh(t,n){if(df)return!1;if(n===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",te),!1;t.length!==n.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
Previous: %s
Incoming: %s`,te,"["+n.join(", ")+"]","["+t.join(", ")+"]");for(var r=0;r<n.length&&r<t.length;r++)if(!an(t[r],n[r]))return!1;return!0}function ph(t,n,r,l,d,p){fo=p,ze=n,hs=t!==null?t._debugHookTypes:null,gr=-1,df=t!==null&&t.type!==n.type,(Object.prototype.toString.call(r)==="[object AsyncFunction]"||Object.prototype.toString.call(r)==="[object AsyncGeneratorFunction]")&&(p=ue(ze),Vb.has(p)||(Vb.add(p),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",p===null?"An unknown Component":"<"+p+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,ie.H=t!==null&&t.memoizedState!==null?$b:hs!==null?rw:qb,Dl=p=(n.mode&Xi)!==It;var T=Gb(r,l,d);if(Dl=!1,Mc&&(T=mh(n,r,l,d)),p){Ye(!0);try{T=mh(n,r,l,d)}finally{Ye(!1)}}return lm(t,n),T}function lm(t,n){n._debugHookTypes=hs,n.dependencies===null?mr!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:mr}):n.dependencies._debugThenableState=mr,ie.H=dg;var r=Dt!==null&&Dt.next!==null;if(fo=0,hs=te=ri=Dt=ze=null,gr=-1,t!==null&&(t.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ug=!1,cf=0,mr=null,r)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");t===null||Ti||(t=t.dependencies,t!==null&&Nn(t)&&(Ti=!0)),og?(og=!1,t=!0):t=!1,t&&(n=ue(n)||"Unknown",sw.has(n)||Vb.has(n)||(sw.add(n),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function mh(t,n,r,l){ze=t;var d=0;do{if(Mc&&(mr=null),cf=0,Mc=!1,d>=m6)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,df=!1,ri=Dt=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}gr=-1,ie.H=ow,p=Gb(n,r,l)}while(Mc);return p}function da(){var t=ie.H,n=t.useState()[0];return n=typeof n.then=="function"?Xr(n):n,t=t.useState()[0],(Dt!==null?Dt.memoizedState:null)!==t&&(ze.flags|=1024),n}function gh(){var t=cg!==0;return cg=0,t}function yh(t,n,r){n.updateQueue=t.updateQueue,n.flags=(n.mode&Ms)!==It?n.flags&-402655237:n.flags&-2053,t.lanes&=~r}function vh(t){if(ug){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}ug=!1}fo=0,hs=ri=Dt=ze=null,gr=-1,te=null,Mc=!1,cf=cg=0,mr=null}function en(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?ze.memoizedState=ri=t:ri=ri.next=t,ri}function ft(){if(Dt===null){var t=ze.alternate;t=t!==null?t.memoizedState:null}else t=Dt.next;var n=ri===null?ze.memoizedState:ri.next;if(n!==null)ri=n,Dt=t;else{if(t===null)throw ze.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Dt=t,t={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},ri===null?ze.memoizedState=ri=t:ri=ri.next=t}return ri}function pl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xr(t){var n=cf;return cf+=1,mr===null&&(mr=ah()),t=oh(mr,t,n),n=ze,(ri===null?n.memoizedState:ri.next)===null&&(n=n.alternate,ie.H=n!==null&&n.memoizedState!==null?$b:qb),t}function Un(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xr(t);if(t.$$typeof===ba)return Lt(t)}throw Error("An unsupported type was passed to use(): "+String(t))}function es(t){var n=null,r=ze.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=pl(),ze.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0||df)for(r=n.data[n.index]=Array(t),l=0;l<t;l++)r[l]=tL;else r.length!==t&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",r.length,t);return n.index++,r}function Bn(t,n){return typeof n=="function"?n(t):n}function bh(t,n,r){var l=en();if(r!==void 0){var d=r(n);if(Dl){Ye(!0);try{r(n)}finally{Ye(!1)}}}else d=n;return l.memoizedState=l.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},l.queue=t,t=t.dispatch=Y5.bind(null,ze,t),[l.memoizedState,t]}function Yr(t){var n=ft();return _h(n,Dt,t)}function _h(t,n,r){var l=t.queue;if(l===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");l.lastRenderedReducer=r;var d=t.baseQueue,p=l.pending;if(p!==null){if(d!==null){var T=d.next;d.next=p.next,p.next=T}n.baseQueue!==d&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),n.baseQueue=d=p,l.pending=null}if(p=t.baseState,d===null)t.memoizedState=p;else{n=d.next;var C=T=null,O=null,L=n,J=!1;do{var ne=L.lane&-536870913;if(ne!==L.lane?(it&ne)===ne:(fo&ne)===ne){var Z=L.revertLane;if(Z===0)O!==null&&(O=O.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),ne===Cl&&(J=!0);else if((fo&Z)===Z){L=L.next,Z===Cl&&(J=!0);continue}else ne={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},O===null?(C=O=ne,T=p):O=O.next=ne,ze.lanes|=Z,go|=Z;ne=L.action,Dl&&r(p,ne),p=L.hasEagerState?L.eagerState:r(p,ne)}else Z={lane:ne,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},O===null?(C=O=Z,T=p):O=O.next=Z,ze.lanes|=ne,go|=ne;L=L.next}while(L!==null&&L!==n);if(O===null?T=p:O.next=C,!an(p,t.memoizedState)&&(Ti=!0,J&&(r=kc,r!==null)))throw r;t.memoizedState=p,t.baseState=T,t.baseQueue=O,l.lastRenderedState=p}return d===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function ml(t){var n=ft(),r=n.queue;if(r===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");r.lastRenderedReducer=t;var l=r.dispatch,d=r.pending,p=n.memoizedState;if(d!==null){r.pending=null;var T=d=d.next;do p=t(p,T.action),T=T.next;while(T!==d);an(p,n.memoizedState)||(Ti=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),r.lastRenderedState=p}return[p,l]}function gl(t,n,r){var l=ze,d=en();if(lt){if(r===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var p=r();Rc||p===r()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Rc=!0)}else{if(p=n(),Rc||(r=n(),an(p,r)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Rc=!0)),Ot===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");it&124||um(l,n,p)}return d.memoizedState=p,r={value:p,getSnapshot:n},d.queue=r,ee(er.bind(null,l,r,t),[t]),l.flags|=2048,k(ds|hi,M(),Th.bind(null,l,r,p,n),null),p}function ec(t,n,r){var l=ze,d=ft(),p=lt;if(p){if(r===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=r()}else if(r=n(),!Rc){var T=n();an(r,T)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Rc=!0)}(T=!an((Dt||d).memoizedState,r))&&(d.memoizedState=r,Ti=!0),d=d.queue;var C=er.bind(null,l,d,t);if(V(2048,hi,C,[t]),d.getSnapshot!==n||T||ri!==null&&ri.memoizedState.tag&ds){if(l.flags|=2048,k(ds|hi,M(),Th.bind(null,l,d,r,n),null),Ot===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");p||fo&124||um(l,n,r)}return r}function um(t,n,r){t.flags|=16384,t={getSnapshot:n,value:r},n=ze.updateQueue,n===null?(n=pl(),ze.updateQueue=n,n.stores=[t]):(r=n.stores,r===null?n.stores=[t]:r.push(t))}function Th(t,n,r,l){n.value=r,n.getSnapshot=l,pt(n)&&ha(t)}function er(t,n,r){return r(function(){pt(n)&&ha(t)})}function pt(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!an(t,r)}catch{return!0}}function ha(t){var n=ui(t,2);n!==null&&ei(n,t,2)}function ci(t){var n=en();if(typeof t=="function"){var r=t;if(t=r(),Dl){Ye(!0);try{r()}finally{Ye(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:t},n}function Sn(t){t=ci(t);var n=t.queue,r=Gx.bind(null,ze,n);return n.dispatch=r,[t.memoizedState,r]}function Sh(t){var n=en();n.memoizedState=n.baseState=t;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=av.bind(null,ze,!0,r),r.dispatch=n,[t,n]}function xh(t,n){var r=ft();return cm(r,Dt,t,n)}function cm(t,n,r,l){return t.baseState=r,_h(t,Dt,typeof l=="function"?l:Bn)}function dm(t,n){var r=ft();return Dt!==null?cm(r,Dt,t,n):(r.baseState=t,[t,r.queue.dispatch])}function tv(t,n,r,l,d){if(mm(t))throw Error("Cannot update form state while rendering.");if(t=n.action,t!==null){var p={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){p.listeners.push(T)}};ie.T!==null?r(!0):p.isTransition=!1,l(p),r=n.pending,r===null?(p.next=n.pending=p,hm(n,p)):(p.next=r.next,n.pending=r.next=p)}}function hm(t,n){var r=n.action,l=n.payload,d=t.state;if(n.isTransition){var p=ie.T,T={};ie.T=T,ie.T._updatedFibers=new Set;try{var C=r(d,l),O=ie.S;O!==null&&O(T,C),fm(t,n,C)}catch(L){Eh(t,n,L)}finally{ie.T=p,p===null&&T._updatedFibers&&(t=T._updatedFibers.size,T._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{T=r(d,l),fm(t,n,T)}catch(L){Eh(t,n,L)}}function fm(t,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?(r.then(function(l){pm(t,n,l)},function(l){return Eh(t,n,l)}),n.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):pm(t,n,r)}function pm(t,n,r){n.status="fulfilled",n.value=r,Ch(n),t.state=r,n=t.pending,n!==null&&(r=n.next,r===n?t.pending=null:(r=r.next,n.next=r,hm(t,r)))}function Eh(t,n,r){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=r,Ch(n),n=n.next;while(n!==l)}t.action=null}function Ch(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function h(t,n){return n}function g(t,n){if(lt){var r=Ot.formState;if(r!==null){e:{var l=ze;if(lt){if(Xt){t:{for(var d=Xt,p=Ca;d.nodeType!==8;){if(!p){d=null;break t}if(d=ns(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p===v_||p===aD?d:null}if(d){Xt=ns(d.nextSibling),l=d.data===v_;break e}}Qa(l)}l=!1}l&&(n=r[0])}}return r=en(),r.memoizedState=r.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:n},r.queue=l,r=Gx.bind(null,ze,l),l.dispatch=r,l=ci(!1),p=av.bind(null,ze,!1,l.queue),l=en(),d={state:n,dispatch:null,action:t,pending:null},l.queue=d,r=tv.bind(null,ze,d,p,r),d.dispatch=r,l.memoizedState=t,[n,r,!1]}function y(t){var n=ft();return v(n,Dt,t)}function v(t,n,r){if(n=_h(t,n,h)[0],t=Yr(Bn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Xr(n)}catch(T){throw T===lf?rg:T}else l=n;n=ft();var d=n.queue,p=d.dispatch;return r!==n.memoizedState&&(ze.flags|=2048,k(ds|hi,M(),_.bind(null,d,r),null)),[l,p,t]}function _(t,n){t.action=n}function x(t){var n=ft(),r=Dt;if(r!==null)return v(n,r,t);ft(),n=n.memoizedState,r=ft();var l=r.queue.dispatch;return r.memoizedState=t,[n,l,!1]}function k(t,n,r,l){return t={tag:t,create:r,deps:l,inst:n,next:null},n=ze.updateQueue,n===null&&(n=pl(),ze.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=t.next=t:(l=r.next,r.next=t,t.next=l,n.lastEffect=t),t}function M(){return{destroy:void 0,resource:void 0}}function P(t){var n=en();return t={current:t},n.memoizedState=t}function U(t,n,r,l){var d=en();l=l===void 0?null:l,ze.flags|=t,d.memoizedState=k(ds|n,M(),r,l)}function V(t,n,r,l){var d=ft();l=l===void 0?null:l;var p=d.memoizedState.inst;Dt!==null&&l!==null&&fh(l,Dt.memoizedState.deps)?d.memoizedState=k(n,p,r,l):(ze.flags|=t,d.memoizedState=k(ds|n,p,r,l))}function ee(t,n){(ze.mode&Ms)!==It&&(ze.mode&VA)===It?U(276826112,hi,t,n):U(8390656,hi,t,n)}function _e(t,n){var r=4194308;return(ze.mode&Ms)!==It&&(r|=134217728),U(r,Ii,t,n)}function oe(t,n){if(typeof n=="function"){t=t();var r=n(t);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return n.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(n).join(", ")+"}"),t=t(),n.current=t,function(){n.current=null}}function Ne(t,n,r){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),r=r!=null?r.concat([t]):null;var l=4194308;(ze.mode&Ms)!==It&&(l|=134217728),U(l,Ii,oe.bind(null,n,t),r)}function Fe(t,n,r){typeof n!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",n!==null?typeof n:"null"),r=r!=null?r.concat([t]):null,V(4,Ii,oe.bind(null,n,t),r)}function Gt(t,n){return en().memoizedState=[t,n===void 0?null:n],t}function bi(t,n){var r=ft();n=n===void 0?null:n;var l=r.memoizedState;return n!==null&&fh(n,l[1])?l[0]:(r.memoizedState=[t,n],t)}function ts(t,n){var r=en();n=n===void 0?null:n;var l=t();if(Dl){Ye(!0);try{t()}finally{Ye(!1)}}return r.memoizedState=[l,n],l}function fa(t,n){var r=ft();n=n===void 0?null:n;var l=r.memoizedState;if(n!==null&&fh(n,l[1]))return l[0];if(l=t(),Dl){Ye(!0);try{t()}finally{Ye(!1)}}return r.memoizedState=[l,n],l}function tr(t,n){var r=en();return Kr(r,t,n)}function Wr(t,n){var r=ft();return Ct(r,Dt.memoizedState,t,n)}function Qr(t,n){var r=ft();return Dt===null?Kr(r,t,n):Ct(r,Dt.memoizedState,t,n)}function Kr(t,n,r){return r===void 0||fo&1073741824?t.memoizedState=n:(t.memoizedState=r,t=jE(),ze.lanes|=t,go|=t,r)}function Ct(t,n,r,l){return an(r,n)?r:Oc.current!==null?(t=Kr(t,r,l),an(t,n)||(Ti=!0),t):fo&42?(t=jE(),ze.lanes|=t,go|=t,n):(Ti=!0,t.memoizedState=r)}function Zr(t,n,r,l,d){var p=gt.p;gt.p=p!==0&&p<Sa?p:Sa;var T=ie.T,C={};ie.T=C,av(t,!1,n,r),C._updatedFibers=new Set;try{var O=d(),L=ie.S;if(L!==null&&L(C,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var J=Jy(O,l);Ah(t,n,J,jn(t))}else Ah(t,n,l,jn(t))}catch(ne){Ah(t,n,{then:function(){},status:"rejected",reason:ne},jn(t))}finally{gt.p=p,ie.T=T,T===null&&C._updatedFibers&&(t=C._updatedFibers.size,C._updatedFibers.clear(),10<t&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function tn(t,n,r,l){if(t.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=zx(t).queue;Zr(t,d,n,Fl,r===null?S:function(){return Vx(t),r(l)})}function zx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Fl,baseState:Fl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:Fl},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:r},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Vx(t){ie.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=zx(t).next.queue;Ah(t,n,{},jn(t))}function iv(){var t=ci(!1);return t=Zr.bind(null,ze,t.queue,!0,!1),en().memoizedState=t,[!1,t]}function qx(){var t=Yr(Bn)[0],n=ft().memoizedState;return[typeof t=="boolean"?t:Xr(t),n]}function $x(){var t=ml(Bn)[0],n=ft().memoizedState;return[typeof t=="boolean"?t:Xr(t),n]}function yl(){return Lt(Df)}function nv(){var t=en(),n=Ot.identifierPrefix;if(lt){var r=fr,l=hr;r=(l&~(1<<32-nn(l)-1)).toString(32)+r,n="«"+n+"R"+r,r=cg++,0<r&&(n+="H"+r.toString(32)),n+="»"}else r=p6++,n="«"+n+"r"+r.toString(32)+"»";return t.memoizedState=n}function sv(){return en().memoizedState=X5.bind(null,ze)}function X5(t,n){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=jn(r);t=Tn(l);var d=ca(r,t,l);d!==null&&(ei(d,r,l),$r(d,r,l)),r=th(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),t.payload={cache:r};return}r=r.return}}function Y5(t,n,r){var l=arguments;typeof l[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),l=jn(t);var d={lane:l,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};mm(t)?Xx(n,d):(d=sa(t,n,d,l),d!==null&&(ei(d,t,l),Yx(d,n,l))),li(t,l)}function Gx(t,n,r){var l=arguments;typeof l[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),l=jn(t),Ah(t,n,r,l),li(t,l)}function Ah(t,n,r,l){var d={lane:l,revertLane:0,action:r,hasEagerState:!1,eagerState:null,next:null};if(mm(t))Xx(n,d);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null)){var T=ie.H;ie.H=Is;try{var C=n.lastRenderedState,O=p(C,r);if(d.hasEagerState=!0,d.eagerState=O,an(O,C))return na(t,n,d,0),Ot===null&&jr(),!1}catch{}finally{ie.H=T}}if(r=sa(t,n,d,l),r!==null)return ei(r,t,l),Yx(r,n,l),!0}return!1}function av(t,n,r,l){if(ie.T===null&&Cl===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),l={lane:2,revertLane:Nv(),action:l,hasEagerState:!1,eagerState:null,next:null},mm(t)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=sa(t,r,l,2),n!==null&&ei(n,t,2);li(t,2)}function mm(t){var n=t.alternate;return t===ze||n!==null&&n===ze}function Xx(t,n){Mc=ug=!0;var r=t.pending;r===null?n.next=n:(n.next=r.next,r.next=n),t.pending=n}function Yx(t,n,r){if(r&4194048){var l=n.lanes;l&=t.pendingLanes,r|=l,n.lanes=r,Pr(t,r)}}function ki(t){var n=Ke;return t!=null&&(Ke=n===null?t:n.concat(t)),n}function gm(t,n,r){for(var l=Object.keys(t.props),d=0;d<l.length;d++){var p=l[d];if(p!=="children"&&p!=="key"){n===null&&(n=Xu(t,r.mode,0),n._debugInfo=Ke,n.return=r),Re(n,function(T){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T)},p);break}}}function ym(t){var n=hf;return hf+=1,Lc===null&&(Lc=ah()),oh(Lc,t,n)}function wh(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function vm(t,n){throw n.$$typeof===JM?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.`):(t=Object.prototype.toString.call(n),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead."))}function bm(t,n){var r=ue(t)||"Component";Sw[r]||(Sw[r]=!0,n=n.displayName||n.name||"Component",t.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
root.render(%s)`,n,n,n):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
<%s>{%s}</%s>`,n,n,r,n,r))}function _m(t,n){var r=ue(t)||"Component";xw[r]||(xw[r]=!0,n=String(n),t.tag===3?console.error(`Symbols are not valid as a React child.
root.render(%s)`,n):console.error(`Symbols are not valid as a React child.
<%s>%s</%s>`,r,n,r))}function Wx(t){function n(j,z){if(t){var q=j.deletions;q===null?(j.deletions=[z],j.flags|=16):q.push(z)}}function r(j,z){if(!t)return null;for(;z!==null;)n(j,z),z=z.sibling;return null}function l(j){for(var z=new Map;j!==null;)j.key!==null?z.set(j.key,j):z.set(j.index,j),j=j.sibling;return z}function d(j,z){return j=ws(j,z),j.index=0,j.sibling=null,j}function p(j,z,q){return j.index=q,t?(q=j.alternate,q!==null?(q=q.index,q<z?(j.flags|=67108866,z):q):(j.flags|=67108866,z)):(j.flags|=1048576,z)}function T(j){return t&&j.alternate===null&&(j.flags|=67108866),j}function C(j,z,q,re){return z===null||z.tag!==6?(z=Vr(q,j.mode,re),z.return=j,z._debugOwner=j,z._debugTask=j._debugTask,z._debugInfo=Ke,z):(z=d(z,q),z.return=j,z._debugInfo=Ke,z)}function O(j,z,q,re){var Te=q.type;return Te===dc?(z=J(j,z,q.props.children,re,q.key),gm(q,z,j),z):z!==null&&(z.elementType===Te||$u(z,q)||typeof Te=="object"&&Te!==null&&Te.$$typeof===zn&&po(Te)===z.type)?(z=d(z,q.props),wh(z,q),z.return=j,z._debugOwner=q._owner,z._debugInfo=Ke,z):(z=Xu(q,j.mode,re),wh(z,q),z.return=j,z._debugInfo=Ke,z)}function L(j,z,q,re){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=Wd(q,j.mode,re),z.return=j,z._debugInfo=Ke,z):(z=d(z,q.children||[]),z.return=j,z._debugInfo=Ke,z)}function J(j,z,q,re,Te){return z===null||z.tag!==7?(z=oa(q,j.mode,re,Te),z.return=j,z._debugOwner=j,z._debugTask=j._debugTask,z._debugInfo=Ke,z):(z=d(z,q),z.return=j,z._debugInfo=Ke,z)}function ne(j,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Vr(""+z,j.mode,q),z.return=j,z._debugOwner=j,z._debugTask=j._debugTask,z._debugInfo=Ke,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case so:return q=Xu(z,j.mode,q),wh(q,z),q.return=j,j=ki(z._debugInfo),q._debugInfo=Ke,Ke=j,q;case cc:return z=Wd(z,j.mode,q),z.return=j,z._debugInfo=Ke,z;case zn:var re=ki(z._debugInfo);return z=po(z),j=ne(j,z,q),Ke=re,j}if(Mi(z)||se(z))return q=oa(z,j.mode,q,null),q.return=j,q._debugOwner=j,q._debugTask=j._debugTask,j=ki(z._debugInfo),q._debugInfo=Ke,Ke=j,q;if(typeof z.then=="function")return re=ki(z._debugInfo),j=ne(j,ym(z),q),Ke=re,j;if(z.$$typeof===ba)return ne(j,Yu(j,z),q);vm(j,z)}return typeof z=="function"&&bm(j,z),typeof z=="symbol"&&_m(j,z),null}function Z(j,z,q,re){var Te=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return Te!==null?null:C(j,z,""+q,re);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case so:return q.key===Te?(Te=ki(q._debugInfo),j=O(j,z,q,re),Ke=Te,j):null;case cc:return q.key===Te?L(j,z,q,re):null;case zn:return Te=ki(q._debugInfo),q=po(q),j=Z(j,z,q,re),Ke=Te,j}if(Mi(q)||se(q))return Te!==null?null:(Te=ki(q._debugInfo),j=J(j,z,q,re,null),Ke=Te,j);if(typeof q.then=="function")return Te=ki(q._debugInfo),j=Z(j,z,ym(q),re),Ke=Te,j;if(q.$$typeof===ba)return Z(j,z,Yu(j,q),re);vm(j,q)}return typeof q=="function"&&bm(j,q),typeof q=="symbol"&&_m(j,q),null}function ae(j,z,q,re,Te){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return j=j.get(q)||null,C(z,j,""+re,Te);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case so:return q=j.get(re.key===null?q:re.key)||null,j=ki(re._debugInfo),z=O(z,q,re,Te),Ke=j,z;case cc:return j=j.get(re.key===null?q:re.key)||null,L(z,j,re,Te);case zn:var $e=ki(re._debugInfo);return re=po(re),z=ae(j,z,q,re,Te),Ke=$e,z}if(Mi(re)||se(re))return q=j.get(q)||null,j=ki(re._debugInfo),z=J(z,q,re,Te,null),Ke=j,z;if(typeof re.then=="function")return $e=ki(re._debugInfo),z=ae(j,z,q,ym(re),Te),Ke=$e,z;if(re.$$typeof===ba)return ae(j,z,q,Yu(z,re),Te);vm(z,re)}return typeof re=="function"&&bm(z,re),typeof re=="symbol"&&_m(z,re),null}function ke(j,z,q,re){if(typeof q!="object"||q===null)return re;switch(q.$$typeof){case so:case cc:f(j,z,q);var Te=q.key;if(typeof Te!="string")break;if(re===null){re=new Set,re.add(Te);break}if(!re.has(Te)){re.add(Te);break}Re(z,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Te)});break;case zn:q=po(q),ke(j,z,q,re)}return re}function je(j,z,q,re){for(var Te=null,$e=null,Oe=null,Ge=z,We=z=0,Pt=null;Ge!==null&&We<q.length;We++){Ge.index>We?(Pt=Ge,Ge=null):Pt=Ge.sibling;var ii=Z(j,Ge,q[We],re);if(ii===null){Ge===null&&(Ge=Pt);break}Te=ke(j,ii,q[We],Te),t&&Ge&&ii.alternate===null&&n(j,Ge),z=p(ii,z,We),Oe===null?$e=ii:Oe.sibling=ii,Oe=ii,Ge=Pt}if(We===q.length)return r(j,Ge),lt&&Wa(j,We),$e;if(Ge===null){for(;We<q.length;We++)Ge=ne(j,q[We],re),Ge!==null&&(Te=ke(j,Ge,q[We],Te),z=p(Ge,z,We),Oe===null?$e=Ge:Oe.sibling=Ge,Oe=Ge);return lt&&Wa(j,We),$e}for(Ge=l(Ge);We<q.length;We++)Pt=ae(Ge,j,We,q[We],re),Pt!==null&&(Te=ke(j,Pt,q[We],Te),t&&Pt.alternate!==null&&Ge.delete(Pt.key===null?We:Pt.key),z=p(Pt,z,We),Oe===null?$e=Pt:Oe.sibling=Pt,Oe=Pt);return t&&Ge.forEach(function(Sr){return n(j,Sr)}),lt&&Wa(j,We),$e}function Rt(j,z,q,re){if(q==null)throw Error("An iterable object provided no iterator.");for(var Te=null,$e=null,Oe=z,Ge=z=0,We=null,Pt=null,ii=q.next();Oe!==null&&!ii.done;Ge++,ii=q.next()){Oe.index>Ge?(We=Oe,Oe=null):We=Oe.sibling;var Sr=Z(j,Oe,ii.value,re);if(Sr===null){Oe===null&&(Oe=We);break}Pt=ke(j,Sr,ii.value,Pt),t&&Oe&&Sr.alternate===null&&n(j,Oe),z=p(Sr,z,Ge),$e===null?Te=Sr:$e.sibling=Sr,$e=Sr,Oe=We}if(ii.done)return r(j,Oe),lt&&Wa(j,Ge),Te;if(Oe===null){for(;!ii.done;Ge++,ii=q.next())Oe=ne(j,ii.value,re),Oe!==null&&(Pt=ke(j,Oe,ii.value,Pt),z=p(Oe,z,Ge),$e===null?Te=Oe:$e.sibling=Oe,$e=Oe);return lt&&Wa(j,Ge),Te}for(Oe=l(Oe);!ii.done;Ge++,ii=q.next())We=ae(Oe,j,Ge,ii.value,re),We!==null&&(Pt=ke(j,We,ii.value,Pt),t&&We.alternate!==null&&Oe.delete(We.key===null?Ge:We.key),z=p(We,z,Ge),$e===null?Te=We:$e.sibling=We,$e=We);return t&&Oe.forEach(function(j6){return n(j,j6)}),lt&&Wa(j,Ge),Te}function st(j,z,q,re){if(typeof q=="object"&&q!==null&&q.type===dc&&q.key===null&&(gm(q,null,j),q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case so:var Te=ki(q._debugInfo);e:{for(var $e=q.key;z!==null;){if(z.key===$e){if($e=q.type,$e===dc){if(z.tag===7){r(j,z.sibling),re=d(z,q.props.children),re.return=j,re._debugOwner=q._owner,re._debugInfo=Ke,gm(q,re,j),j=re;break e}}else if(z.elementType===$e||$u(z,q)||typeof $e=="object"&&$e!==null&&$e.$$typeof===zn&&po($e)===z.type){r(j,z.sibling),re=d(z,q.props),wh(re,q),re.return=j,re._debugOwner=q._owner,re._debugInfo=Ke,j=re;break e}r(j,z);break}else n(j,z);z=z.sibling}q.type===dc?(re=oa(q.props.children,j.mode,re,q.key),re.return=j,re._debugOwner=j,re._debugTask=j._debugTask,re._debugInfo=Ke,gm(q,re,j),j=re):(re=Xu(q,j.mode,re),wh(re,q),re.return=j,re._debugInfo=Ke,j=re)}return j=T(j),Ke=Te,j;case cc:e:{for(Te=q,q=Te.key;z!==null;){if(z.key===q)if(z.tag===4&&z.stateNode.containerInfo===Te.containerInfo&&z.stateNode.implementation===Te.implementation){r(j,z.sibling),re=d(z,Te.children||[]),re.return=j,j=re;break e}else{r(j,z);break}else n(j,z);z=z.sibling}re=Wd(Te,j.mode,re),re.return=j,j=re}return T(j);case zn:return Te=ki(q._debugInfo),q=po(q),j=st(j,z,q,re),Ke=Te,j}if(Mi(q))return Te=ki(q._debugInfo),j=je(j,z,q,re),Ke=Te,j;if(se(q)){if(Te=ki(q._debugInfo),$e=se(q),typeof $e!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Oe=$e.call(q);return Oe===q?(j.tag!==0||Object.prototype.toString.call(j.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Oe)!=="[object Generator]")&&(_w||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),_w=!0):q.entries!==$e||Yb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Yb=!0),j=Rt(j,z,Oe,re),Ke=Te,j}if(typeof q.then=="function")return Te=ki(q._debugInfo),j=st(j,z,ym(q),re),Ke=Te,j;if(q.$$typeof===ba)return st(j,z,Yu(j,q),re);vm(j,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(Te=""+q,z!==null&&z.tag===6?(r(j,z.sibling),re=d(z,Te),re.return=j,j=re):(r(j,z),re=Vr(Te,j.mode,re),re.return=j,re._debugOwner=j,re._debugTask=j._debugTask,re._debugInfo=Ke,j=re),T(j)):(typeof q=="function"&&bm(j,q),typeof q=="symbol"&&_m(j,q),r(j,z))}return function(j,z,q,re){var Te=Ke;Ke=null;try{hf=0;var $e=st(j,z,q,re);return Lc=null,$e}catch(Pt){if(Pt===lf||Pt===rg)throw Pt;var Oe=A(29,Pt,null,j.mode);Oe.lanes=re,Oe.return=j;var Ge=Oe._debugInfo=Ke;if(Oe._debugOwner=j._debugOwner,Oe._debugTask=j._debugTask,Ge!=null){for(var We=Ge.length-1;0<=We;We--)if(typeof Ge[We].stack=="string"){Oe._debugOwner=Ge[We],Oe._debugTask=Ge[We].debugTask;break}}return Oe}finally{Ke=Te}}}function Jr(t){var n=t.alternate;Ae(fi,fi.current&Pc,t),Ae(fs,t,t),wa===null&&(n===null||Oc.current!==null||n.memoizedState!==null)&&(wa=t)}function Qx(t){if(t.tag===22){if(Ae(fi,fi.current,t),Ae(fs,t,t),wa===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(wa=t)}}else eo(t)}function eo(t){Ae(fi,fi.current,t),Ae(fs,fs.current,t)}function ir(t){be(fs,t),wa===t&&(wa=null),be(fi,t)}function Tm(t){for(var n=t;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data===br||Xv(r)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function rv(t){if(t!==null&&typeof t!="function"){var n=String(t);Pw.has(n)||(Pw.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",t))}}function ov(t,n,r,l){var d=t.memoizedState,p=r(l,d);if(t.mode&Xi){Ye(!0);try{p=r(l,d)}finally{Ye(!1)}}p===void 0&&(n=Q(n)||"Component",Rw.has(n)||(Rw.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=p==null?d:Je({},d,p),t.memoizedState=d,t.lanes===0&&(t.updateQueue.baseState=d)}function Kx(t,n,r,l,d,p,T){var C=t.stateNode;if(typeof C.shouldComponentUpdate=="function"){if(r=C.shouldComponentUpdate(l,p,T),t.mode&Xi){Ye(!0);try{r=C.shouldComponentUpdate(l,p,T)}finally{Ye(!1)}}return r===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Q(n)||"Component"),r}return n.prototype&&n.prototype.isPureReactComponent?!As(r,l)||!As(d,p):!0}function Zx(t,n,r,l){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,l),n.state!==d&&(t=ue(t)||"Component",Aw.has(t)||(Aw.add(t),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",t)),Wb.enqueueReplaceState(n,n.state,null))}function vl(t,n){var r=n;if("ref"in n){r={};for(var l in n)l!=="ref"&&(r[l]=n[l])}if(t=t.defaultProps){r===n&&(r=Je({},r));for(var d in t)r[d]===void 0&&(r[d]=t[d])}return r}function Jx(t){Qb(t),console.warn(`%s
%s
`,Nc?"An error occurred in the <"+Nc+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function eE(t){var n=Nc?"The above error occurred in the <"+Nc+"> component.":"The above error occurred in one of your React components.",r="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Kb||"Anonymous")+".");if(typeof t=="object"&&t!==null&&typeof t.environmentName=="string"){var l=t.environmentName;t=[`%o
%s
%s
`,t,n,r].slice(0),typeof t[0]=="string"?t.splice(0,1,fD+t[0],pD,Og+l+Og,mD):t.splice(0,0,fD,pD,Og+l+Og,mD),t.unshift(console),l=F6.apply(console.error,t),l()}else console.error(`%o
%s
%s
`,t,n,r)}function tE(t){Qb(t)}function Sm(t,n){try{Nc=n.source?ue(n.source):null,Kb=null;var r=n.value;if(ie.actQueue!==null)ie.thrownErrors.push(r);else{var l=t.onUncaughtError;l(r,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function iE(t,n,r){try{Nc=r.source?ue(r.source):null,Kb=ue(n);var l=t.onCaughtError;l(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function lv(t,n,r){return r=Tn(r),r.tag=Hb,r.payload={element:null},r.callback=function(){Re(n.source,Sm,t,n)},r}function uv(t){return t=Tn(t),t.tag=Hb,t}function cv(t,n,r,l){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=l.value;t.payload=function(){return d(p)},t.callback=function(){im(r),Re(l.source,iE,n,r,l)}}var T=r.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(t.callback=function(){im(r),Re(l.source,iE,n,r,l),typeof d!="function"&&(vo===null?vo=new Set([this]):vo.add(this)),g6(this,l),typeof d=="function"||!(r.lanes&2)&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",ue(r)||"Unknown")})}function W5(t,n,r,l,d){if(r.flags|=32768,Rs&&Ih(t,d),l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=r.alternate,n!==null&&nl(n,r,d,!0),lt&&(pr=!0),r=fs.current,r!==null){switch(r.tag){case 13:return wa===null?kv():r.alternate===null&&Yt===vr&&(Yt=t_),r.flags&=-257,r.flags|=65536,r.lanes=d,l===Fb?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([l]):n.add(l),Mv(t,l,d)),!1;case 22:return r.flags|=65536,l===Fb?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([l]):r.add(l)),Mv(t,l,d)),!1}throw Error("Unexpected Suspense handler tag ("+r.tag+"). This is a bug in React.")}return Mv(t,l,d),kv(),!1}if(lt)return pr=!0,n=fs.current,n!==null?(!(n.flags&65536)&&(n.flags|=256),n.flags|=65536,n.lanes=d,l!==Pb&&il(Di(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:l}),r))):(l!==Pb&&il(Di(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:l}),r)),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,l=Di(l,r),d=lv(t.stateNode,l,d),dl(t,d),Yt!==kl&&(Yt=Hc)),!1;var p=Di(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:l}),r);if(_f===null?_f=[p]:_f.push(p),Yt!==kl&&(Yt=Hc),n===null)return!0;l=Di(l,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,t=d&-d,r.lanes|=t,t=lv(r.stateNode,l,t),dl(r,t),!1;case 1:if(n=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(vo===null||!vo.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=uv(d),cv(d,t,r,l),dl(r,d),!1}r=r.return}while(r!==null);return!1}function Oi(t,n,r,l){n.child=t===null?Ew(n,null,r,l):Ic(n,t.child,r,l)}function nE(t,n,r,l,d){r=r.render;var p=n.ref;if("ref"in l){var T={};for(var C in l)C!=="ref"&&(T[C]=l[C])}else T=l;return ua(n),ut(n),l=ph(t,n,r,T,p,d),C=gh(),mt(),t!==null&&!Ti?(yh(t,n,d),nr(t,n,d)):(lt&&C&&el(n),n.flags|=1,Oi(t,n,l,d),n.child)}function sE(t,n,r,l,d){if(t===null){var p=r.type;return typeof p=="function"&&!zr(p)&&p.defaultProps===void 0&&r.compare===null?(r=ra(p),n.tag=15,n.type=r,hv(n,p),aE(t,n,r,l,d)):(t=Yd(r.type,null,l,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(p=t.child,!vv(t,d)){var T=p.memoizedProps;if(r=r.compare,r=r!==null?r:As,r(T,l)&&t.ref===n.ref)return nr(t,n,d)}return n.flags|=1,t=ws(p,l),t.ref=n.ref,t.return=n,n.child=t}function aE(t,n,r,l,d){if(t!==null){var p=t.memoizedProps;if(As(p,l)&&t.ref===n.ref&&n.type===t.type)if(Ti=!1,n.pendingProps=l=p,vv(t,d))t.flags&131072&&(Ti=!0);else return n.lanes=t.lanes,nr(t,n,d)}return dv(t,n,r,l,d)}function rE(t,n,r){var l=n.pendingProps,d=l.children,p=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if(n.flags&128){if(l=p!==null?p.baseLanes|r:r,t!==null){for(d=n.child=t.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;n.childLanes=p&~l}else n.childLanes=0,n.child=null;return oE(t,n,l,r)}if(r&536870912)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Qu(n,p!==null?p.cachePool:null),p!==null?Zu(n,p):dh(n),Qx(n);else return n.lanes=n.childLanes=536870912,oE(t,n,p!==null?p.baseLanes|r:r,r)}else p!==null?(Qu(n,p.cachePool),Zu(n,p),eo(n),n.memoizedState=null):(t!==null&&Qu(n,null),dh(n),eo(n));return Oi(t,n,d,r),n.child}function oE(t,n,r,l){var d=nh();return d=d===null?null:{parent:di._currentValue,pool:d},n.memoizedState={baseLanes:r,cachePool:d},t!==null&&Qu(n,null),dh(n),Qx(n),t!==null&&nl(t,n,l,!0),null}function xm(t,n){var r=n.ref;if(r===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(t===null||t.ref!==r)&&(n.flags|=4194816)}}function dv(t,n,r,l,d){if(r.prototype&&typeof r.prototype.render=="function"){var p=Q(r)||"Unknown";Uw[p]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",p,p),Uw[p]=!0)}return n.mode&Xi&&Ls.recordLegacyContextWarning(n,null),t===null&&(hv(n,n.type),r.contextTypes&&(p=Q(r)||"Unknown",Fw[p]||(Fw[p]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",p)))),ua(n),ut(n),r=ph(t,n,r,l,void 0,d),l=gh(),mt(),t!==null&&!Ti?(yh(t,n,d),nr(t,n,d)):(lt&&l&&el(n),n.flags|=1,Oi(t,n,r,d),n.child)}function lE(t,n,r,l,d,p){return ua(n),ut(n),gr=-1,df=t!==null&&t.type!==n.type,n.updateQueue=null,r=mh(n,l,r,d),lm(t,n),l=gh(),mt(),t!==null&&!Ti?(yh(t,n,p),nr(t,n,p)):(lt&&l&&el(n),n.flags|=1,Oi(t,n,r,p),n.child)}function uE(t,n,r,l,d){switch(c(n)){case!1:var p=n.stateNode,T=new n.type(n.memoizedProps,p.context).state;p.updater.enqueueSetState(p,T,null);break;case!0:n.flags|=128,n.flags|=65536,p=Error("Simulated error coming from DevTools");var C=d&-d;if(n.lanes|=C,T=Ot,T===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=uv(C),cv(C,T,n,Di(p,n)),dl(n,C)}if(ua(n),n.stateNode===null){if(T=co,p=r.contextType,"contextType"in r&&p!==null&&(p===void 0||p.$$typeof!==ba)&&!Iw.has(r)&&(Iw.add(r),C=p===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof p!="object"?" However, it is set to a "+typeof p+".":p.$$typeof===ab?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(p).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Q(r)||"Component",C)),typeof p=="object"&&p!==null&&(T=Lt(p)),p=new r(l,T),n.mode&Xi){Ye(!0);try{p=new r(l,T)}finally{Ye(!1)}}if(T=n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Wb,n.stateNode=p,p._reactInternals=n,p._reactInternalInstance=Cw,typeof r.getDerivedStateFromProps=="function"&&T===null&&(T=Q(r)||"Component",ww.has(T)||(ww.add(T),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",T,p.state===null?"null":"undefined",T))),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"){var O=C=T=null;if(typeof p.componentWillMount=="function"&&p.componentWillMount.__suppressDeprecationWarning!==!0?T="componentWillMount":typeof p.UNSAFE_componentWillMount=="function"&&(T="UNSAFE_componentWillMount"),typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof p.UNSAFE_componentWillReceiveProps=="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof p.componentWillUpdate=="function"&&p.componentWillUpdate.__suppressDeprecationWarning!==!0?O="componentWillUpdate":typeof p.UNSAFE_componentWillUpdate=="function"&&(O="UNSAFE_componentWillUpdate"),T!==null||C!==null||O!==null){p=Q(r)||"Component";var L=typeof r.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";kw.has(p)||(kw.add(p),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
%s uses %s but also contains the following legacy lifecycles:%s%s%s
The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`,p,L,T!==null?`
`+T:"",C!==null?`
`+C:"",O!==null?`
`+O:""))}}p=n.stateNode,T=Q(r)||"Component",p.render||(r.prototype&&typeof r.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",T):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",T)),!p.getInitialState||p.getInitialState.isReactClassApproved||p.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",T),p.getDefaultProps&&!p.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",T),p.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",T),r.childContextTypes&&!Lw.has(r)&&(Lw.add(r),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",T)),r.contextTypes&&!Mw.has(r)&&(Mw.add(r),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",T)),typeof p.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",T),r.prototype&&r.prototype.isPureReactComponent&&typeof p.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Q(r)||"A pure component"),typeof p.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",T),typeof p.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",T),typeof p.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",T),typeof p.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",T),C=p.props!==l,p.props!==void 0&&C&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",T),p.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",T,T),typeof p.getSnapshotBeforeUpdate!="function"||typeof p.componentDidUpdate=="function"||Dw.has(r)||(Dw.add(r),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Q(r))),typeof p.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),typeof p.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",T),typeof r.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",T),(C=p.state)&&(typeof C!="object"||Mi(C))&&console.error("%s.state: must be set to an object or null",T),typeof p.getChildContext=="function"&&typeof r.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",T),p=n.stateNode,p.props=l,p.state=n.memoizedState,p.refs={},cl(n),T=r.contextType,p.context=typeof T=="object"&&T!==null?Lt(T):co,p.state===l&&(T=Q(r)||"Component",Ow.has(T)||(Ow.add(T),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",T))),n.mode&Xi&&Ls.recordLegacyContextWarning(n,p),Ls.recordUnsafeLifecycleWarnings(n,p),p.state=n.memoizedState,T=r.getDerivedStateFromProps,typeof T=="function"&&(ov(n,r,T,l),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(T=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),T!==p.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ue(n)||"Component"),Wb.enqueueReplaceState(p,p.state,null)),fl(n,l,p,d),hl(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ms)!==It&&(n.flags|=134217728),p=!0}else if(t===null){p=n.stateNode;var J=n.memoizedProps;C=vl(r,J),p.props=C;var ne=p.context;O=r.contextType,T=co,typeof O=="object"&&O!==null&&(T=Lt(O)),L=r.getDerivedStateFromProps,O=typeof L=="function"||typeof p.getSnapshotBeforeUpdate=="function",J=n.pendingProps!==J,O||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(J||ne!==T)&&Zx(n,p,l,T),ho=!1;var Z=n.memoizedState;p.state=Z,fl(n,l,p,d),hl(),ne=n.memoizedState,J||Z!==ne||ho?(typeof L=="function"&&(ov(n,r,L,l),ne=n.memoizedState),(C=ho||Kx(n,r,C,l,Z,ne,T))?(O||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ms)!==It&&(n.flags|=134217728)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ms)!==It&&(n.flags|=134217728),n.memoizedProps=l,n.memoizedState=ne),p.props=l,p.state=ne,p.context=T,p=C):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&Ms)!==It&&(n.flags|=134217728),p=!1)}else{p=n.stateNode,uh(t,n),T=n.memoizedProps,O=vl(r,T),p.props=O,L=n.pendingProps,Z=p.context,ne=r.contextType,C=co,typeof ne=="object"&&ne!==null&&(C=Lt(ne)),J=r.getDerivedStateFromProps,(ne=typeof J=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T!==L||Z!==C)&&Zx(n,p,l,C),ho=!1,Z=n.memoizedState,p.state=Z,fl(n,l,p,d),hl();var ae=n.memoizedState;T!==L||Z!==ae||ho||t!==null&&t.dependencies!==null&&Nn(t.dependencies)?(typeof J=="function"&&(ov(n,r,J,l),ae=n.memoizedState),(O=ho||Kx(n,r,O,l,Z,ae,C)||t!==null&&t.dependencies!==null&&Nn(t.dependencies))?(ne||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(l,ae,C),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(l,ae,C)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||T===t.memoizedProps&&Z===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Z===t.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=ae),p.props=l,p.state=ae,p.context=C,p=O):(typeof p.componentDidUpdate!="function"||T===t.memoizedProps&&Z===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||T===t.memoizedProps&&Z===t.memoizedState||(n.flags|=1024),p=!1)}if(C=p,xm(t,n),T=(n.flags&128)!==0,C||T){if(C=n.stateNode,In(n),T&&typeof r.getDerivedStateFromError!="function")r=null,En=-1;else{if(ut(n),r=cw(C),n.mode&Xi){Ye(!0);try{cw(C)}finally{Ye(!1)}}mt()}n.flags|=1,t!==null&&T?(n.child=Ic(n,t.child,null,d),n.child=Ic(n,null,r,d)):Oi(t,n,r,d),n.memoizedState=C.state,t=n.child}else t=nr(t,n,d);return d=n.stateNode,p&&d.props!==l&&(Uc||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ue(n)||"a component"),Uc=!0),t}function cE(t,n,r,l){return tl(),n.flags|=256,Oi(t,n,r,l),n.child}function hv(t,n){n&&n.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
%s.childContextTypes = ...`,n.displayName||n.name||"Component"),typeof n.getDerivedStateFromProps=="function"&&(t=Q(n)||"Unknown",Hw[t]||(console.error("%s: Function components do not support getDerivedStateFromProps.",t),Hw[t]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=Q(n)||"Unknown",Bw[n]||(console.error("%s: Function components do not support contextType.",n),Bw[n]=!0))}function fv(t){return{baseLanes:t,cachePool:sh()}}function pv(t,n,r){return t=t!==null?t.childLanes&~r:0,n&&(t|=Gn),t}function dE(t,n,r){var l,d=n.pendingProps;u(n)&&(n.flags|=128);var p=!1,T=(n.flags&128)!==0;if((l=T)||(l=t!==null&&t.memoizedState===null?!1:(fi.current&ff)!==0),l&&(p=!0,n.flags&=-129),l=(n.flags&32)!==0,n.flags&=-33,t===null){if(lt){if(p?Jr(n):eo(n),lt){var C=Xt,O;if(!(O=!C)){e:{var L=C;for(O=Ca;L.nodeType!==8;){if(!O){O=null;break e}if(L=ns(L.nextSibling),L===null){O=null;break e}}O=L}O!==null?(Ds(),n.memoizedState={dehydrated:O,treeContext:Sl!==null?{id:hr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},L=A(18,null,null,It),L.stateNode=O,L.return=n,n.child=L,rn=n,Xt=null,O=!0):O=!1,O=!O}O&&(Kd(n,C),Qa(n))}if(C=n.memoizedState,C!==null&&(C=C.dehydrated,C!==null))return Xv(C)?n.lanes=32:n.lanes=536870912,null;ir(n)}return C=d.children,d=d.fallback,p?(eo(n),p=n.mode,C=Em({mode:"hidden",children:C},p),d=oa(d,p,r,null),C.return=n,d.return=n,C.sibling=d,n.child=C,p=n.child,p.memoizedState=fv(r),p.childLanes=pv(t,l,r),n.memoizedState=Jb,d):(Jr(n),mv(n,C))}var J=t.memoizedState;if(J!==null&&(C=J.dehydrated,C!==null)){if(T)n.flags&256?(Jr(n),n.flags&=-257,n=gv(t,n,r)):n.memoizedState!==null?(eo(n),n.child=t.child,n.flags|=128,n=null):(eo(n),p=d.fallback,C=n.mode,d=Em({mode:"visible",children:d.children},C),p=oa(p,C,r,null),p.flags|=2,d.return=n,p.return=n,d.sibling=p,n.child=d,Ic(n,t.child,null,r),d=n.child,d.memoizedState=fv(r),d.childLanes=pv(t,l,r),n.memoizedState=Jb,n=p);else if(Jr(n),lt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),Xv(C)){if(l=C.nextSibling&&C.nextSibling.dataset,l){O=l.dgst;var ne=l.msg;L=l.stck;var Z=l.cstck}C=ne,l=O,d=L,O=p=Z,p=Error(C||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),p.stack=d||"",p.digest=l,l=O===void 0?null:O,d={value:p,source:null,stack:l},typeof l=="string"&&Lb.set(p,d),il(d),n=gv(t,n,r)}else if(Ti||nl(t,n,r,!1),l=(r&t.childLanes)!==0,Ti||l){if(l=Ot,l!==null&&(d=r&-r,d=d&42?1:Ks(d),d=d&(l.suspendedLanes|r)?0:d,d!==0&&d!==J.retryLane))throw J.retryLane=d,ui(t,d),ei(l,t,d),Nw;C.data===br||kv(),n=gv(t,n,r)}else C.data===br?(n.flags|=192,n.child=t.child,n=null):(t=J.treeContext,Xt=ns(C.nextSibling),rn=n,lt=!0,xl=null,pr=!1,us=null,Ca=!1,t!==null&&(Ds(),os[ls++]=hr,os[ls++]=fr,os[ls++]=Sl,hr=t.id,fr=t.overflow,Sl=n),n=mv(n,d.children),n.flags|=4096);return n}return p?(eo(n),p=d.fallback,C=n.mode,O=t.child,L=O.sibling,d=ws(O,{mode:"hidden",children:d.children}),d.subtreeFlags=O.subtreeFlags&65011712,L!==null?p=ws(L,p):(p=oa(p,C,r,null),p.flags|=2),p.return=n,d.return=n,d.sibling=p,n.child=d,d=p,p=n.child,C=t.child.memoizedState,C===null?C=fv(r):(O=C.cachePool,O!==null?(L=di._currentValue,O=O.parent!==L?{parent:L,pool:L}:O):O=sh(),C={baseLanes:C.baseLanes|r,cachePool:O}),p.memoizedState=C,p.childLanes=pv(t,l,r),n.memoizedState=Jb,d):(Jr(n),r=t.child,t=r.sibling,r=ws(r,{mode:"visible",children:d.children}),r.return=n,r.sibling=null,t!==null&&(l=n.deletions,l===null?(n.deletions=[t],n.flags|=16):l.push(t)),n.child=r,n.memoizedState=null,r)}function mv(t,n){return n=Em({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Em(t,n){return t=A(22,t,null,n),t.lanes=0,t.stateNode={_visibility:Zm,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function gv(t,n,r){return Ic(n,t.child,null,r),t=mv(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function hE(t,n,r){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n),Ka(t.return,n,r)}function fE(t,n){var r=Mi(t);return t=!r&&typeof se(t)=="function",r||t?(r=r?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",r,n,r),!1):!0}function yv(t,n,r,l,d){var p=t.memoizedState;p===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:r,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=r,p.tailMode=d)}function pE(t,n,r){var l=n.pendingProps,d=l.revealOrder,p=l.tail;if(l=l.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!jw[d])if(jw[d]=!0,typeof d=="string")switch(d.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',d,d.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',d,d.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',d);p===void 0||Zb[p]||(p!=="collapsed"&&p!=="hidden"?(Zb[p]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',p)):d!=="forwards"&&d!=="backwards"&&(Zb[p]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',p)));e:if((d==="forwards"||d==="backwards")&&l!==void 0&&l!==null&&l!==!1)if(Mi(l)){for(var T=0;T<l.length;T++)if(!fE(l[T],T))break e}else if(T=se(l),typeof T=="function"){if(T=T.call(l))for(var C=T.next(),O=0;!C.done;C=T.next()){if(!fE(C.value,O))break e;O++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',d);if(Oi(t,n,l,r),l=fi.current,l&ff)l=l&Pc|ff,n.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hE(t,r,n);else if(t.tag===19)hE(t,r,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=Pc}switch(Ae(fi,l,n),d){case"forwards":for(r=n.child,d=null;r!==null;)t=r.alternate,t!==null&&Tm(t)===null&&(d=r),r=r.sibling;r=d,r===null?(d=n.child,n.child=null):(d=r.sibling,r.sibling=null),yv(n,!1,d,r,p);break;case"backwards":for(r=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Tm(t)===null){n.child=d;break}t=d.sibling,d.sibling=r,r=d,d=t}yv(n,!0,r,null,p);break;case"together":yv(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function nr(t,n,r){if(t!==null&&(n.dependencies=t.dependencies),En=-1,go|=n.lanes,!(r&n.childLanes))if(t!==null){if(nl(t,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error("Resuming work not yet implemented.");if(n.child!==null){for(t=n.child,r=ws(t,t.pendingProps),n.child=r,r.return=n;t.sibling!==null;)t=t.sibling,r=r.sibling=ws(t,t.pendingProps),r.return=n;r.sibling=null}return n.child}function vv(t,n){return t.lanes&n?!0:(t=t.dependencies,!!(t!==null&&Nn(t)))}function Q5(t,n,r){switch(n.tag){case 3:Pe(n,n.stateNode.containerInfo),Jn(n,di,t.memoizedState.cache),tl();break;case 27:case 5:xe(n);break;case 4:Pe(n,n.stateNode.containerInfo);break;case 10:Jn(n,n.type,n.memoizedProps.value);break;case 12:r&n.childLanes&&(n.flags|=4),n.flags|=2048;var l=n.stateNode;l.effectDuration=-0,l.passiveEffectDuration=-0;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(Jr(n),n.flags|=128,null):r&n.child.childLanes?dE(t,n,r):(Jr(n),t=nr(t,n,r),t!==null?t.sibling:null);Jr(n);break;case 19:var d=(t.flags&128)!==0;if(l=(r&n.childLanes)!==0,l||(nl(t,n,r,!1),l=(r&n.childLanes)!==0),d){if(l)return pE(t,n,r);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Ae(fi,fi.current,n),l)break;return null;case 22:case 23:return n.lanes=0,rE(t,n,r);case 24:Jn(n,di,t.memoizedState.cache)}return nr(t,n,r)}function bv(t,n,r){if(n._debugNeedsRemount&&t!==null){r=Yd(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),r._debugStack=n._debugStack,r._debugTask=n._debugTask;var l=n.return;if(l===null)throw Error("Cannot swap the root fiber.");if(t.alternate=null,n.alternate=null,r.index=n.index,r.sibling=n.sibling,r.return=n.return,r.ref=n.ref,r._debugInfo=n._debugInfo,n===l.child)l.child=r;else{var d=l.child;if(d===null)throw Error("Expected parent to have a child.");for(;d.sibling!==n;)if(d=d.sibling,d===null)throw Error("Expected to find the previous sibling.");d.sibling=r}return n=l.deletions,n===null?(l.deletions=[t],l.flags|=16):n.push(t),r.flags|=2,r}if(t!==null)if(t.memoizedProps!==n.pendingProps||n.type!==t.type)Ti=!0;else{if(!vv(t,r)&&!(n.flags&128))return Ti=!1,Q5(t,n,r);Ti=!!(t.flags&131072)}else Ti=!1,(l=lt)&&(Ds(),l=(n.flags&1048576)!==0),l&&(l=n.index,Ds(),nm(n,eg,l));switch(n.lanes=0,n.tag){case 16:e:if(l=n.pendingProps,t=po(n.elementType),n.type=t,typeof t=="function")zr(t)?(l=vl(t,l),n.tag=1,n.type=t=ra(t),n=uE(null,n,t,l,r)):(n.tag=0,hv(n,t),n.type=t=ra(t),n=dv(null,n,t,l,r));else{if(t!=null){if(d=t.$$typeof,d===zh){n.tag=11,n.type=t=qu(t),n=nE(null,n,t,l,r);break e}else if(d===jm){n.tag=14,n=sE(null,n,t,l,r);break e}}throw n="",t!==null&&typeof t=="object"&&t.$$typeof===zn&&(n=" Did you wrap a component in React.lazy() more than once?"),t=Q(t)||t,Error("Element type is invalid. Received a promise that resolves to: "+t+". Lazy element type must resolve to a class or function."+n)}return n;case 0:return dv(t,n,n.type,n.pendingProps,r);case 1:return l=n.type,d=vl(l,n.pendingProps),uE(t,n,l,d,r);case 3:e:{if(Pe(n,n.stateNode.containerInfo),t===null)throw Error("Should have a current fiber. This is a bug in React.");l=n.pendingProps;var p=n.memoizedState;d=p.element,uh(t,n),fl(n,l,null,r);var T=n.memoizedState;if(l=T.cache,Jn(n,di,l),l!==p.cache&&eh(n,[di],r,!0),hl(),l=T.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:T.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=cE(t,n,l,r);break e}else if(l!==d){d=Di(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),il(d),n=cE(t,n,l,r);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Xt=ns(t.firstChild),rn=n,lt=!0,xl=null,pr=!1,us=null,Ca=!0,t=Ew(n,null,l,r),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(tl(),l===d){n=nr(t,n,r);break e}Oi(t,n,l,r)}n=n.child}return n;case 26:return xm(t,n),t===null?(t=LC(n.type,null,n.pendingProps,null))?n.memoizedState=t:lt||(t=n.type,r=n.pendingProps,l=fe(ro.current),l=Mm(l).createElement(t),l[Gi]=n,l[xn]=r,Ri(l,t,r),X(l),n.stateNode=l):n.memoizedState=LC(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return xe(n),t===null&&lt&&(l=fe(ro.current),d=de(),l=n.stateNode=RC(n.type,n.pendingProps,l,d,!1),pr||(d=SC(l,n.type,n.pendingProps,d),d!==null&&(la(n,0).serverProps=d)),rn=n,Ca=!0,d=Xt,no(n.type)?(S_=d,Xt=ns(l.firstChild)):Xt=d),Oi(t,n,n.pendingProps.children,r),xm(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&lt&&(p=de(),l=Hr(n.type,p.ancestorInfo),d=Xt,(T=!d)||(T=LM(d,n.type,n.pendingProps,Ca),T!==null?(n.stateNode=T,pr||(p=SC(T,n.type,n.pendingProps,p),p!==null&&(la(n,0).serverProps=p)),rn=n,Xt=ns(T.firstChild),Ca=!1,p=!0):p=!1,T=!p),T&&(l&&Kd(n,d),Qa(n))),xe(n),d=n.type,p=n.pendingProps,T=t!==null?t.memoizedProps:null,l=p.children,$v(d,p)?l=null:T!==null&&$v(d,T)&&(n.flags|=32),n.memoizedState!==null&&(d=ph(t,n,da,null,null,r),Df._currentValue=d),xm(t,n),Oi(t,n,l,r),n.child;case 6:return t===null&&lt&&(t=n.pendingProps,r=de(),l=r.ancestorInfo.current,t=l!=null?Es(t,l.tag,r.ancestorInfo.implicitRootScope):!0,r=Xt,(l=!r)||(l=IM(r,n.pendingProps,Ca),l!==null?(n.stateNode=l,rn=n,Xt=null,l=!0):l=!1,l=!l),l&&(t&&Kd(n,r),Qa(n))),null;case 13:return dE(t,n,r);case 4:return Pe(n,n.stateNode.containerInfo),l=n.pendingProps,t===null?n.child=Ic(n,null,l,r):Oi(t,n,l,r),n.child;case 11:return nE(t,n,n.type,n.pendingProps,r);case 7:return Oi(t,n,n.pendingProps,r),n.child;case 8:return Oi(t,n,n.pendingProps.children,r),n.child;case 12:return n.flags|=4,n.flags|=2048,l=n.stateNode,l.effectDuration=-0,l.passiveEffectDuration=-0,Oi(t,n,n.pendingProps.children,r),n.child;case 10:return l=n.type,d=n.pendingProps,p=d.value,"value"in d||zw||(zw=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Jn(n,l,p),Oi(t,n,d.children,r),n.child;case 9:return d=n.type._context,l=n.pendingProps.children,typeof l!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),ua(n),d=Lt(d),ut(n),l=Gb(l,d,void 0),mt(),n.flags|=1,Oi(t,n,l,r),n.child;case 14:return sE(t,n,n.type,n.pendingProps,r);case 15:return aE(t,n,n.type,n.pendingProps,r);case 19:return pE(t,n,r);case 31:return l=n.pendingProps,r=n.mode,l={mode:l.mode,children:l.children},t===null?(t=Em(l,r),t.ref=n.ref,n.child=t,t.return=n,n=t):(t=ws(t.child,l),t.ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return rE(t,n,r);case 24:return ua(n),l=Lt(di),t===null?(d=nh(),d===null&&(d=Ot,p=th(),d.pooledCache=p,Za(p),p!==null&&(d.pooledCacheLanes|=r),d=p),n.memoizedState={parent:l,cache:d},cl(n),Jn(n,di,d)):(t.lanes&r&&(uh(t,n),fl(n,null,null,r),hl()),d=t.memoizedState,p=n.memoizedState,d.parent!==l?(d={parent:l,cache:l},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Jn(n,di,l)):(l=p.cache,Jn(n,di,l),l!==d.cache&&eh(n,[di],r,!0))),Oi(t,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function sr(t){t.flags|=4}function mE(t,n){if(n.type!=="stylesheet"||(n.state.loading&ps)!==Bl)t.flags&=-16777217;else if(t.flags|=16777216,!BC(n)){if(n=fs.current,n!==null&&((it&4194048)===it?wa!==null:(it&62914560)!==it&&!(it&536870912)||n!==wa))throw uf=Fb,ZA;t.flags|=8192}}function Cm(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ba():536870912,t.lanes|=n,Ml|=n)}function Dh(t,n){if(!lt)switch(t.tailMode){case"hidden":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Bt(t){var n=t.alternate!==null&&t.alternate.child===t.child,r=0,l=0;if(n)if((t.mode&Li)!==It){for(var d=t.selfBaseDuration,p=t.child;p!==null;)r|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,d+=p.treeBaseDuration,p=p.sibling;t.treeBaseDuration=d}else for(d=t.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=t,d=d.sibling;else if((t.mode&Li)!==It){d=t.actualDuration,p=t.selfBaseDuration;for(var T=t.child;T!==null;)r|=T.lanes|T.childLanes,l|=T.subtreeFlags,l|=T.flags,d+=T.actualDuration,p+=T.treeBaseDuration,T=T.sibling;t.actualDuration=d,t.treeBaseDuration=p}else for(d=t.child;d!==null;)r|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=r,n}function K5(t,n,r){var l=n.pendingProps;switch(Qd(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(n),null;case 1:return Bt(n),null;case 3:return r=n.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),$t(di,n),rt(n),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(qr(n)?(Jd(),sr(n)):t===null||t.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Zd())),Bt(n),null;case 26:return r=n.memoizedState,t===null?(sr(n),r!==null?(Bt(n),mE(n,r)):(Bt(n),n.flags&=-16777217)):r?r!==t.memoizedState?(sr(n),Bt(n),mE(n,r)):(Bt(n),n.flags&=-16777217):(t.memoizedProps!==l&&sr(n),Bt(n),n.flags&=-16777217),null;case 27:Me(n),r=fe(ro.current);var d=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Bt(n),null}t=de(),qr(n)?sm(n):(t=RC(d,l,r,t,!0),n.stateNode=t,sr(n))}return Bt(n),null;case 5:if(Me(n),r=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==l&&sr(n);else{if(!l){if(n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Bt(n),null}if(d=de(),qr(n))sm(n);else{switch(t=fe(ro.current),Hr(r,d.ancestorInfo),d=d.context,t=Mm(t),d){case Gc:t=t.createElementNS(mc,r);break;case wg:t=t.createElementNS(Xm,r);break;default:switch(r){case"svg":t=t.createElementNS(mc,r);break;case"math":t=t.createElementNS(Xm,r);break;case"script":t=t.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?t.createElement("select",{is:l.is}):t.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?t.createElement(r,{is:l.is}):t.createElement(r),r.indexOf("-")===-1&&(r!==r.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",r),Object.prototype.toString.call(t)!=="[object HTMLUnknownElement]"||ur.call(oD,r)||(oD[r]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",r)))}}t[Gi]=n,t[xn]=l;e:for(d=n.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===n)break e;for(;d.sibling===null;){if(d.return===null||d.return===n)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}n.stateNode=t;e:switch(Ri(t,r,l),r){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&sr(n)}}return Bt(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==l&&sr(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(t=fe(ro.current),r=de(),qr(n)){t=n.stateNode,r=n.memoizedProps,d=!pr,l=null;var p=rn;if(p!==null)switch(p.tag){case 3:d&&(d=DC(t,r,l),d!==null&&(la(n,0).serverProps=d));break;case 27:case 5:l=p.memoizedProps,d&&(d=DC(t,r,l),d!==null&&(la(n,0).serverProps=d))}t[Gi]=n,t=!!(t.nodeValue===r||l!==null&&l.suppressHydrationWarning===!0||yC(t.nodeValue,r)),t||Qa(n)}else d=r.ancestorInfo.current,d!=null&&Es(l,d.tag,r.ancestorInfo.implicitRootScope),t=Mm(t).createTextNode(l),t[Gi]=n,n.stateNode=t}return Bt(n),null;case 13:if(l=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=qr(n),l!==null&&l.dehydrated!==null){if(t===null){if(!d)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");d[Gi]=n,Bt(n),(n.mode&Li)!==It&&l!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else Jd(),tl(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4,Bt(n),(n.mode&Li)!==It&&l!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=Zd(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(ir(n),n):(ir(n),null)}return ir(n),n.flags&128?(n.lanes=r,(n.mode&Li)!==It&&Os(n),n):(r=l!==null,t=t!==null&&t.memoizedState!==null,r&&(l=n.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048)),r!==t&&r&&(n.child.flags|=8192),Cm(n,n.updateQueue),Bt(n),(n.mode&Li)!==It&&r&&(t=n.child,t!==null&&(n.treeBaseDuration-=t.treeBaseDuration)),null);case 4:return rt(n),t===null&&Bv(n.stateNode.containerInfo),Bt(n),null;case 10:return $t(n.type,n),Bt(n),null;case 19:if(be(fi,n),d=n.memoizedState,d===null)return Bt(n),null;if(l=(n.flags&128)!==0,p=d.rendering,p===null)if(l)Dh(d,!1);else{if(Yt!==vr||t!==null&&t.flags&128)for(t=n.child;t!==null;){if(p=Tm(t),p!==null){for(n.flags|=128,Dh(d,!1),t=p.updateQueue,n.updateQueue=t,Cm(n,t),n.subtreeFlags=0,t=r,r=n.child;r!==null;)Gu(r,t),r=r.sibling;return Ae(fi,fi.current&Pc|ff,n),n.child}t=t.sibling}d.tail!==null&&_a()>mg&&(n.flags|=128,l=!0,Dh(d,!1),n.lanes=4194304)}else{if(!l)if(t=Tm(p),t!==null){if(n.flags|=128,l=!0,t=t.updateQueue,n.updateQueue=t,Cm(n,t),Dh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!p.alternate&&!lt)return Bt(n),null}else 2*_a()-d.renderingStartTime>mg&&r!==536870912&&(n.flags|=128,l=!0,Dh(d,!1),n.lanes=4194304);d.isBackwards?(p.sibling=n.child,n.child=p):(t=d.last,t!==null?t.sibling=p:n.child=p,d.last=p)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=_a(),t.sibling=null,r=fi.current,r=l?r&Pc|ff:r&Pc,Ae(fi,r,n),t):(Bt(n),null);case 22:case 23:return ir(n),hh(n),l=n.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?r&536870912&&!(n.flags&128)&&(Bt(n),n.subtreeFlags&6&&(n.flags|=8192)):Bt(n),r=n.updateQueue,r!==null&&Cm(n,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==r&&(n.flags|=2048),t!==null&&be(Al,n),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),$t(di,n),Bt(n),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+n.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Z5(t,n){switch(Qd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Li)!==It&&Os(n),n):null;case 3:return $t(di,n),rt(n),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Me(n),null;case 13:if(ir(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");tl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Li)!==It&&Os(n),n):null;case 19:return be(fi,n),null;case 4:return rt(n),null;case 10:return $t(n.type,n),null;case 22:case 23:return ir(n),hh(n),t!==null&&be(Al,n),t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&Li)!==It&&Os(n),n):null;case 24:return $t(di,n),null;case 25:return null;default:return null}}function gE(t,n){switch(Qd(n),n.tag){case 3:$t(di,n),rt(n);break;case 26:case 27:case 5:Me(n);break;case 4:rt(n);break;case 13:ir(n);break;case 19:be(fi,n);break;case 10:$t(n.type,n);break;case 22:case 23:ir(n),hh(n),t!==null&&be(Al,n);break;case 24:$t(di,n)}}function pa(t){return(t.mode&Li)!==It}function yE(t,n){pa(t)?(ht(),kh(n,t),qi()):kh(n,t)}function _v(t,n,r){pa(t)?(ht(),tc(r,t,n),qi()):tc(r,t,n)}function kh(t,n){try{var r=n.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var d=l.next;r=d;do{if((r.tag&t)===t&&((t&hi)!==cs?Ee!==null&&typeof Ee.markComponentPassiveEffectMountStarted=="function"&&Ee.markComponentPassiveEffectMountStarted(n):(t&Ii)!==cs&&Ee!==null&&typeof Ee.markComponentLayoutEffectMountStarted=="function"&&Ee.markComponentLayoutEffectMountStarted(n),l=void 0,(t&on)!==cs&&(qc=!0),l=Re(n,y6,r),(t&on)!==cs&&(qc=!1),(t&hi)!==cs?Ee!==null&&typeof Ee.markComponentPassiveEffectMountStopped=="function"&&Ee.markComponentPassiveEffectMountStopped():(t&Ii)!==cs&&Ee!==null&&typeof Ee.markComponentLayoutEffectMountStopped=="function"&&Ee.markComponentLayoutEffectMountStopped(),l!==void 0&&typeof l!="function")){var p=void 0;p=r.tag&Ii?"useLayoutEffect":r.tag&on?"useInsertionEffect":"useEffect";var T=void 0;T=l===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof l.then=="function"?`
It looks like you wrote `+p+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
`+p+`(() => {
async function fetchData() {
// You can await here
const response = await MyAPI.getData(someId);
// ...
}
fetchData();
}, [someId]); // Or [] if effect doesn't need props or state
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+l,Re(n,function(C,O){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,O)},p,T)}r=r.next}while(r!==d)}}catch(C){At(n,n.return,C)}}function tc(t,n,r){try{var l=n.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var p=d.next;l=p;do{if((l.tag&t)===t){var T=l.inst,C=T.destroy;C!==void 0&&(T.destroy=void 0,(t&hi)!==cs?Ee!==null&&typeof Ee.markComponentPassiveEffectUnmountStarted=="function"&&Ee.markComponentPassiveEffectUnmountStarted(n):(t&Ii)!==cs&&Ee!==null&&typeof Ee.markComponentLayoutEffectUnmountStarted=="function"&&Ee.markComponentLayoutEffectUnmountStarted(n),(t&on)!==cs&&(qc=!0),d=n,Re(d,v6,d,r,C),(t&on)!==cs&&(qc=!1),(t&hi)!==cs?Ee!==null&&typeof Ee.markComponentPassiveEffectUnmountStopped=="function"&&Ee.markComponentPassiveEffectUnmountStopped():(t&Ii)!==cs&&Ee!==null&&typeof Ee.markComponentLayoutEffectUnmountStopped=="function"&&Ee.markComponentLayoutEffectUnmountStopped())}l=l.next}while(l!==p)}}catch(O){At(n,n.return,O)}}function vE(t,n){pa(t)?(ht(),kh(n,t),qi()):kh(n,t)}function Tv(t,n,r){pa(t)?(ht(),tc(r,t,n),qi()):tc(r,t,n)}function bE(t){var n=t.updateQueue;if(n!==null){var r=t.stateNode;t.type.defaultProps||"ref"in t.memoizedProps||Uc||(r.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ue(t)||"instance"),r.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ue(t)||"instance"));try{Re(t,om,n,r)}catch(l){At(t,t.return,l)}}}function J5(t,n,r){return t.getSnapshotBeforeUpdate(n,r)}function eM(t,n){var r=n.memoizedProps,l=n.memoizedState;n=t.stateNode,t.type.defaultProps||"ref"in t.memoizedProps||Uc||(n.props!==t.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ue(t)||"instance"),n.state!==t.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ue(t)||"instance"));try{var d=vl(t.type,r,t.elementType===t.type),p=Re(t,J5,n,d,l);r=Vw,p!==void 0||r.has(t.type)||(r.add(t.type),Re(t,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ue(t))})),n.__reactInternalSnapshotBeforeUpdate=p}catch(T){At(t,t.return,T)}}function _E(t,n,r){r.props=vl(t.type,t.memoizedProps),r.state=t.memoizedState,pa(t)?(ht(),Re(t,gw,t,n,r),qi()):Re(t,gw,t,n,r)}function tM(t){var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}if(typeof n=="function")if(pa(t))try{ht(),t.refCleanup=n(r)}finally{qi()}else t.refCleanup=n(r);else typeof n=="string"?console.error("String refs are no longer supported."):n.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",ue(t)),n.current=r}}function Oh(t,n){try{Re(t,tM,t)}catch(r){At(t,n,r)}}function ma(t,n){var r=t.ref,l=t.refCleanup;if(r!==null)if(typeof l=="function")try{if(pa(t))try{ht(),Re(t,l)}finally{qi(t)}else Re(t,l)}catch(d){At(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{if(pa(t))try{ht(),Re(t,r,null)}finally{qi(t)}else Re(t,r,null)}catch(d){At(t,n,d)}else r.current=null}function TE(t,n,r,l){var d=t.memoizedProps,p=d.id,T=d.onCommit;d=d.onRender,n=n===null?"mount":"update",ng&&(n="nested-update"),typeof d=="function"&&d(p,n,t.actualDuration,t.treeBaseDuration,t.actualStartTime,r),typeof T=="function"&&T(t.memoizedProps.id,n,l,r)}function iM(t,n,r,l){var d=t.memoizedProps;t=d.id,d=d.onPostCommit,n=n===null?"mount":"update",ng&&(n="nested-update"),typeof d=="function"&&d(t,n,l,r)}function SE(t){var n=t.type,r=t.memoizedProps,l=t.stateNode;try{Re(t,EM,l,n,r,t)}catch(d){At(t,t.return,d)}}function Sv(t,n,r){try{Re(t,CM,t.stateNode,t.type,r,n,t)}catch(l){At(t,t.return,l)}}function xE(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&no(t.type)||t.tag===4}function xv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xE(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&no(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ev(t,n,r){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(t),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=Rm));else if(l!==4&&(l===27&&no(t.type)&&(r=t.stateNode,n=null),t=t.child,t!==null))for(Ev(t,n,r),t=t.sibling;t!==null;)Ev(t,n,r),t=t.sibling}function Am(t,n,r){var l=t.tag;if(l===5||l===6)t=t.stateNode,n?r.insertBefore(t,n):r.appendChild(t);else if(l!==4&&(l===27&&no(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(Am(t,n,r),t=t.sibling;t!==null;)Am(t,n,r),t=t.sibling}function nM(t){for(var n,r=t.return;r!==null;){if(xE(r)){n=r;break}r=r.return}if(n==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(n.tag){case 27:n=n.stateNode,r=xv(t),Am(t,r,n);break;case 5:r=n.stateNode,n.flags&32&&(CC(r),n.flags&=-33),n=xv(t),Am(t,n,r);break;case 3:case 4:n=n.stateNode.containerInfo,r=xv(t),Ev(t,r,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function EE(t){var n=t.stateNode,r=t.memoizedProps;try{Re(t,BM,t.type,r,n,t)}catch(l){At(t,t.return,l)}}function sM(t,n){if(t=t.containerInfo,b_=Rg,t=Jo(t),zu(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var l=r.getSelection&&r.getSelection();if(l&&l.rangeCount!==0){r=l.anchorNode;var d=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var T=0,C=-1,O=-1,L=0,J=0,ne=t,Z=null;t:for(;;){for(var ae;ne!==r||d!==0&&ne.nodeType!==3||(C=T+d),ne!==p||l!==0&&ne.nodeType!==3||(O=T+l),ne.nodeType===3&&(T+=ne.nodeValue.length),(ae=ne.firstChild)!==null;)Z=ne,ne=ae;for(;;){if(ne===t)break t;if(Z===r&&++L===d&&(C=T),Z===p&&++J===l&&(O=T),(ae=ne.nextSibling)!==null)break;ne=Z,Z=ne.parentNode}ne=ae}r=C===-1||O===-1?null:{start:C,end:O}}else r=null}r=r||{start:0,end:0}}else r=null;for(__={focusedElem:t,selectionRange:r},Rg=!1,Si=n;Si!==null;)if(n=Si,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,Si=t;else for(;Si!==null;){switch(t=n=Si,r=t.alternate,d=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:d&1024&&r!==null&&eM(t,r);break;case 3:if(d&1024){if(t=t.stateNode.containerInfo,r=t.nodeType,r===9)Gv(t);else if(r===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Gv(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(d&1024)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(t=n.sibling,t!==null){t.return=n.return,Si=t;break}Si=n.return}}function CE(t,n,r){var l=r.flags;switch(r.tag){case 0:case 11:case 15:rr(t,r),l&4&&yE(r,Ii|ds);break;case 1:if(rr(t,r),l&4)if(t=r.stateNode,n===null)r.type.defaultProps||"ref"in r.memoizedProps||Uc||(t.props!==r.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ue(r)||"instance"),t.state!==r.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ue(r)||"instance")),pa(r)?(ht(),Re(r,Xb,r,t),qi()):Re(r,Xb,r,t);else{var d=vl(r.type,n.memoizedProps);n=n.memoizedState,r.type.defaultProps||"ref"in r.memoizedProps||Uc||(t.props!==r.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",ue(r)||"instance"),t.state!==r.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",ue(r)||"instance")),pa(r)?(ht(),Re(r,fw,r,t,d,n,t.__reactInternalSnapshotBeforeUpdate),qi()):Re(r,fw,r,t,d,n,t.__reactInternalSnapshotBeforeUpdate)}l&64&&bE(r),l&512&&Oh(r,r.return);break;case 3:if(n=ks(),rr(t,r),l&64&&(l=r.updateQueue,l!==null)){if(d=null,r.child!==null)switch(r.child.tag){case 27:case 5:d=r.child.stateNode;break;case 1:d=r.child.stateNode}try{Re(r,om,l,d)}catch(T){At(r,r.return,T)}}t.effectDuration+=rl(n);break;case 27:n===null&&l&4&&EE(r);case 26:case 5:rr(t,r),n===null&&l&4&&SE(r),l&512&&Oh(r,r.return);break;case 12:if(l&4){l=ks(),rr(t,r),t=r.stateNode,t.effectDuration+=ol(l);try{Re(r,TE,r,n,ig,t.effectDuration)}catch(T){At(r,r.return,T)}}else rr(t,r);break;case 13:rr(t,r),l&4&&DE(t,r),l&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=fM.bind(null,r),PM(t,r))));break;case 22:if(l=r.memoizedState!==null||yr,!l){n=n!==null&&n.memoizedState!==null||ti,d=yr;var p=ti;yr=l,(ti=n)&&!p?or(t,r,(r.subtreeFlags&8772)!==0):rr(t,r),yr=d,ti=p}break;case 30:break;default:rr(t,r)}}function AE(t){var n=t.alternate;n!==null&&(t.alternate=null,AE(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Zs(n)),t.stateNode=null,t._debugOwner=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ar(t,n,r){for(r=r.child;r!==null;)wE(t,n,r),r=r.sibling}function wE(t,n,r){if($i&&typeof $i.onCommitFiberUnmount=="function")try{$i.onCommitFiberUnmount(fc,r)}catch(p){Ta||(Ta=!0,console.error("React instrumentation encountered an error: %s",p))}switch(r.tag){case 26:ti||ma(r,n),ar(t,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:ti||ma(r,n);var l=oi,d=Cn;no(r.type)&&(oi=r.stateNode,Cn=!1),ar(t,n,r),Re(r,Uh,r.stateNode),oi=l,Cn=d;break;case 5:ti||ma(r,n);case 6:if(l=oi,d=Cn,oi=null,ar(t,n,r),oi=l,Cn=d,oi!==null)if(Cn)try{Re(r,DM,oi,r.stateNode)}catch(p){At(r,n,p)}else try{Re(r,wM,oi,r.stateNode)}catch(p){At(r,n,p)}break;case 18:oi!==null&&(Cn?(t=oi,AC(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),jh(t)):AC(oi,r.stateNode));break;case 4:l=oi,d=Cn,oi=r.stateNode.containerInfo,Cn=!0,ar(t,n,r),oi=l,Cn=d;break;case 0:case 11:case 14:case 15:ti||tc(on,r,n),ti||_v(r,n,Ii),ar(t,n,r);break;case 1:ti||(ma(r,n),l=r.stateNode,typeof l.componentWillUnmount=="function"&&_E(r,n,l)),ar(t,n,r);break;case 21:ar(t,n,r);break;case 22:ti=(l=ti)||r.memoizedState!==null,ar(t,n,r),ti=l;break;default:ar(t,n,r)}}function DE(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Re(n,UM,t)}catch(r){At(n,n.return,r)}}function aM(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new qw),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new qw),n;default:throw Error("Unexpected Suspense handler tag ("+t.tag+"). This is a bug in React.")}}function Cv(t,n){var r=aM(t);n.forEach(function(l){var d=pM.bind(null,t,l);if(!r.has(l)){if(r.add(l),Rs)if(Bc!==null&&Fc!==null)Ih(Fc,Bc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");l.then(d,d)}})}function Fn(t,n){var r=n.deletions;if(r!==null)for(var l=0;l<r.length;l++){var d=t,p=n,T=r[l],C=p;e:for(;C!==null;){switch(C.tag){case 27:if(no(C.type)){oi=C.stateNode,Cn=!1;break e}break;case 5:oi=C.stateNode,Cn=!1;break e;case 3:case 4:oi=C.stateNode.containerInfo,Cn=!0;break e}C=C.return}if(oi===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");wE(d,p,T),oi=null,Cn=!1,d=T,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)kE(n,t),n=n.sibling}function kE(t,n){var r=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Fn(n,t),Hn(t),l&4&&(tc(on|ds,t,t.return),kh(on|ds,t),_v(t,t.return,Ii|ds));break;case 1:Fn(n,t),Hn(t),l&512&&(ti||r===null||ma(r,r.return)),l&64&&yr&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?l:r.concat(l))));break;case 26:var d=Ps;if(Fn(n,t),Hn(t),l&512&&(ti||r===null||ma(r,r.return)),l&4)if(n=r!==null?r.memoizedState:null,l=t.memoizedState,r===null)if(l===null)if(t.stateNode===null){e:{l=t.type,r=t.memoizedProps,n=d.ownerDocument||d;t:switch(l){case"title":d=n.getElementsByTagName("title")[0],(!d||d[qh]||d[Gi]||d.namespaceURI===mc||d.hasAttribute("itemprop"))&&(d=n.createElement(l),n.head.insertBefore(d,n.querySelector("head > title"))),Ri(d,l,r),d[Gi]=t,X(d),l=d;break e;case"link":var p=NC("link","href",n).get(l+(r.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],d.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&d.getAttribute("rel")===(r.rel==null?null:r.rel)&&d.getAttribute("title")===(r.title==null?null:r.title)&&d.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){p.splice(T,1);break t}}d=n.createElement(l),Ri(d,l,r),n.head.appendChild(d);break;case"meta":if(p=NC("meta","content",n).get(l+(r.content||""))){for(T=0;T<p.length;T++)if(d=p[T],me(r.content,"content"),d.getAttribute("content")===(r.content==null?null:""+r.content)&&d.getAttribute("name")===(r.name==null?null:r.name)&&d.getAttribute("property")===(r.property==null?null:r.property)&&d.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&d.getAttribute("charset")===(r.charSet==null?null:r.charSet)){p.splice(T,1);break t}}d=n.createElement(l),Ri(d,l,r),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+l+'". This is a bug in React.')}d[Gi]=t,X(d),l=d}t.stateNode=l}else UC(d,t.type,t.stateNode);else t.stateNode=PC(d,l,t.memoizedProps);else n!==l?(n===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):n.count--,l===null?UC(d,t.type,t.stateNode):PC(d,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Sv(t,t.memoizedProps,r.memoizedProps);break;case 27:Fn(n,t),Hn(t),l&512&&(ti||r===null||ma(r,r.return)),r!==null&&l&4&&Sv(t,t.memoizedProps,r.memoizedProps);break;case 5:if(Fn(n,t),Hn(t),l&512&&(ti||r===null||ma(r,r.return)),t.flags&32){n=t.stateNode;try{Re(t,CC,n)}catch(J){At(t,t.return,J)}}l&4&&t.stateNode!=null&&(n=t.memoizedProps,Sv(t,n,r!==null?r.memoizedProps:n)),l&1024&&(e_=!0,t.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Fn(n,t),Hn(t),l&4){if(t.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");l=t.memoizedProps,r=r!==null?r.memoizedProps:l,n=t.stateNode;try{Re(t,AM,n,r,l)}catch(J){At(t,t.return,J)}}break;case 3:if(d=ks(),Dg=null,p=Ps,Ps=Lm(n.containerInfo),Fn(n,t),Ps=p,Hn(t),l&4&&r!==null&&r.memoizedState.isDehydrated)try{Re(t,NM,n.containerInfo)}catch(J){At(t,t.return,J)}e_&&(e_=!1,OE(t)),n.effectDuration+=rl(d);break;case 4:l=Ps,Ps=Lm(t.stateNode.containerInfo),Fn(n,t),Hn(t),Ps=l;break;case 12:l=ks(),Fn(n,t),Hn(t),t.stateNode.effectDuration+=ol(l);break;case 13:Fn(n,t),Hn(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(r_=_a()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Cv(t,l)));break;case 22:d=t.memoizedState!==null;var C=r!==null&&r.memoizedState!==null,O=yr,L=ti;if(yr=O||d,ti=L||C,Fn(n,t),ti=L,yr=O,Hn(t),l&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&~Zm:n._visibility|Zm,d&&(r===null||C||yr||ti||bl(t)),r=null,n=t;;){if(n.tag===5||n.tag===26){if(r===null){C=r=n;try{p=C.stateNode,d?Re(C,kM,p):Re(C,RM,C.stateNode,C.memoizedProps)}catch(J){At(C,C.return,J)}}}else if(n.tag===6){if(r===null){C=n;try{T=C.stateNode,d?Re(C,OM,T):Re(C,MM,T,C.memoizedProps)}catch(J){At(C,C.return,J)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=t.updateQueue,l!==null&&(r=l.retryQueue,r!==null&&(l.retryQueue=null,Cv(t,r))));break;case 19:Fn(n,t),Hn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Cv(t,l)));break;case 30:break;case 21:break;default:Fn(n,t),Hn(t)}}function Hn(t){var n=t.flags;if(n&2){try{Re(t,nM,t)}catch(r){At(t,t.return,r)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function OE(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;OE(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function rr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)CE(t,n.alternate,n),n=n.sibling}function RE(t){switch(t.tag){case 0:case 11:case 14:case 15:_v(t,t.return,Ii),bl(t);break;case 1:ma(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&_E(t,t.return,n),bl(t);break;case 27:Re(t,Uh,t.stateNode);case 26:case 5:ma(t,t.return),bl(t);break;case 22:t.memoizedState===null&&bl(t);break;case 30:bl(t);break;default:bl(t)}}function bl(t){for(t=t.child;t!==null;)RE(t),t=t.sibling}function ME(t,n,r,l){var d=r.flags;switch(r.tag){case 0:case 11:case 15:or(t,r,l),yE(r,Ii);break;case 1:if(or(t,r,l),n=r.stateNode,typeof n.componentDidMount=="function"&&Re(r,Xb,r,n),n=r.updateQueue,n!==null){t=r.stateNode;try{Re(r,ev,n,t)}catch(p){At(r,r.return,p)}}l&&d&64&&bE(r),Oh(r,r.return);break;case 27:EE(r);case 26:case 5:or(t,r,l),l&&n===null&&d&4&&SE(r),Oh(r,r.return);break;case 12:if(l&&d&4){d=ks(),or(t,r,l),l=r.stateNode,l.effectDuration+=ol(d);try{Re(r,TE,r,n,ig,l.effectDuration)}catch(p){At(r,r.return,p)}}else or(t,r,l);break;case 13:or(t,r,l),l&&d&4&&DE(t,r);break;case 22:r.memoizedState===null&&or(t,r,l),Oh(r,r.return);break;case 30:break;default:or(t,r,l)}}function or(t,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)ME(t,n.alternate,n,r),n=n.sibling}function Av(t,n){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==r&&(t!=null&&Za(t),r!=null&&al(r))}function wv(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(Za(n),t!=null&&al(t))}function ga(t,n,r,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)LE(t,n,r,l),n=n.sibling}function LE(t,n,r,l){var d=n.flags;switch(n.tag){case 0:case 11:case 15:ga(t,n,r,l),d&2048&&vE(n,hi|ds);break;case 1:ga(t,n,r,l);break;case 3:var p=ks();ga(t,n,r,l),d&2048&&(r=null,n.alternate!==null&&(r=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==r&&(Za(n),r!=null&&al(r))),t.passiveEffectDuration+=rl(p);break;case 12:if(d&2048){d=ks(),ga(t,n,r,l),t=n.stateNode,t.passiveEffectDuration+=ol(d);try{Re(n,iM,n,n.alternate,ig,t.passiveEffectDuration)}catch(C){At(n,n.return,C)}}else ga(t,n,r,l);break;case 13:ga(t,n,r,l);break;case 23:break;case 22:p=n.stateNode;var T=n.alternate;n.memoizedState!==null?p._visibility&dr?ga(t,n,r,l):Rh(t,n):p._visibility&dr?ga(t,n,r,l):(p._visibility|=dr,ic(t,n,r,l,(n.subtreeFlags&10256)!==0)),d&2048&&Av(T,n);break;case 24:ga(t,n,r,l),d&2048&&wv(n.alternate,n);break;default:ga(t,n,r,l)}}function ic(t,n,r,l,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)IE(t,n,r,l,d),n=n.sibling}function IE(t,n,r,l,d){var p=n.flags;switch(n.tag){case 0:case 11:case 15:ic(t,n,r,l,d),vE(n,hi);break;case 23:break;case 22:var T=n.stateNode;n.memoizedState!==null?T._visibility&dr?ic(t,n,r,l,d):Rh(t,n):(T._visibility|=dr,ic(t,n,r,l,d)),d&&p&2048&&Av(n.alternate,n);break;case 24:ic(t,n,r,l,d),d&&p&2048&&wv(n.alternate,n);break;default:ic(t,n,r,l,d)}}function Rh(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=t,l=n,d=l.flags;switch(l.tag){case 22:Rh(r,l),d&2048&&Av(l.alternate,l);break;case 24:Rh(r,l),d&2048&&wv(l.alternate,l);break;default:Rh(r,l)}n=n.sibling}}function nc(t){if(t.subtreeFlags&pf)for(t=t.child;t!==null;)PE(t),t=t.sibling}function PE(t){switch(t.tag){case 26:nc(t),t.flags&pf&&t.memoizedState!==null&&zM(Ps,t.memoizedState,t.memoizedProps);break;case 5:nc(t);break;case 3:case 4:var n=Ps;Ps=Lm(t.stateNode.containerInfo),nc(t),Ps=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=pf,pf=16777216,nc(t),pf=n):nc(t));break;default:nc(t)}}function NE(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Mh(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];Si=l,FE(l,t)}NE(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)UE(t),t=t.sibling}function UE(t){switch(t.tag){case 0:case 11:case 15:Mh(t),t.flags&2048&&Tv(t,t.return,hi|ds);break;case 3:var n=ks();Mh(t),t.stateNode.passiveEffectDuration+=rl(n);break;case 12:n=ks(),Mh(t),t.stateNode.passiveEffectDuration+=ol(n);break;case 22:n=t.stateNode,t.memoizedState!==null&&n._visibility&dr&&(t.return===null||t.return.tag!==13)?(n._visibility&=~dr,wm(t)):Mh(t);break;default:Mh(t)}}function wm(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];Si=l,FE(l,t)}NE(t)}for(t=t.child;t!==null;)BE(t),t=t.sibling}function BE(t){switch(t.tag){case 0:case 11:case 15:Tv(t,t.return,hi),wm(t);break;case 22:var n=t.stateNode;n._visibility&dr&&(n._visibility&=~dr,wm(t));break;default:wm(t)}}function FE(t,n){for(;Si!==null;){var r=Si,l=r;switch(l.tag){case 0:case 11:case 15:Tv(l,n,hi);break;case 23:case 22:l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(l=l.memoizedState.cachePool.pool,l!=null&&Za(l));break;case 24:al(l.memoizedState.cache)}if(l=r.child,l!==null)l.return=r,Si=l;else e:for(r=t;Si!==null;){l=Si;var d=l.sibling,p=l.return;if(AE(l),l===r){Si=null;break e}if(d!==null){d.return=p,Si=d;break e}Si=p}}}function rM(){_6.forEach(function(t){return t()})}function HE(){var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return t||ie.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),t}function jn(t){if((yt&ln)!==qn&&it!==0)return it&-it;var n=ie.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(t),t=Cl,t!==0?t:Nv()):Ur()}function jE(){Gn===0&&(Gn=!(it&536870912)||lt?we():536870912);var t=fs.current;return t!==null&&(t.flags|=32),Gn}function ei(t,n,r){if(qc&&console.error("useInsertionEffect must not schedule updates."),d_&&(gg=!0),(t===Ot&&(Tt===Ol||Tt===Rl)||t.cancelPendingCommit!==null)&&(ac(t,0),to(t,it,Gn,!1)),Qs(t,r),yt&ln&&t===Ot){if(xa)switch(n.tag){case 0:case 11:case 15:t=tt&&ue(tt)||"Unknown",eD.has(t)||(eD.add(t),n=ue(n)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",n,t,t));break;case 1:Jw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Jw=!0)}}else Rs&&Ha(t,n,r),gM(n),t===Ot&&((yt&ln)===qn&&(yo|=r),Yt===kl&&to(t,it,Gn,!1)),ya(t)}function zE(t,n,r){if((yt&(ln|Ns))!==qn)throw Error("Should not already be working.");var l=!r&&(n&124)===0&&(n&t.expiredLanes)===0||Ei(t,n),d=l?lM(t,n):Ov(t,n,!0),p=l;do{if(d===vr){zc&&!l&&to(t,n,0,!1);break}else{if(r=t.current.alternate,p&&!oM(r)){d=Ov(t,n,!1),p=!1;continue}if(d===Hc){if(p=n,t.errorRecoveryDisabledLanes&p)var T=0;else T=t.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){n=T;e:{d=t;var C=T;T=_f;var O=d.current.memoizedState.isDehydrated;if(O&&(ac(d,C).flags|=256),C=Ov(d,C,!1),C!==Hc){if(s_&&!O){d.errorRecoveryDisabledLanes|=p,yo|=p,d=kl;break e}d=un,un=T,d!==null&&(un===null?un=d:un.push.apply(un,d))}d=C}if(p=!1,d!==Hc)continue}}if(d===gf){ac(t,0),to(t,n,0,!0);break}e:{switch(l=t,d){case vr:case gf:throw Error("Root did not complete. This is a bug in React.");case kl:if((n&4194048)!==n)break;case fg:to(l,n,Gn,!mo);break e;case Hc:un=null;break;case t_:case $w:break;default:throw Error("Unknown root exit status.")}if(ie.actQueue!==null)Rv(l,r,n,un,Tf,pg,Gn,yo,Ml);else{if((n&62914560)===n&&(p=r_+Xw-_a(),10<p)){if(to(l,n,Gn,!mo),_s(l,0,!0)!==0)break e;l.timeoutHandle=lD(VE.bind(null,l,r,un,Tf,pg,n,Gn,yo,Ml,mo,d,E6,WA,0),p);break e}VE(l,r,un,Tf,pg,n,Gn,yo,Ml,mo,d,S6,WA,0)}}}break}while(1);ya(t)}function VE(t,n,r,l,d,p,T,C,O,L,J,ne,Z,ae){if(t.timeoutHandle=Ul,ne=n.subtreeFlags,(ne&8192||(ne&16785408)===16785408)&&(wf={stylesheets:null,count:0,unsuspend:jM},PE(n),ne=VM(),ne!==null)){t.cancelPendingCommit=ne(Rv.bind(null,t,n,p,r,l,d,T,C,O,J,x6,Z,ae)),to(t,p,T,!L);return}Rv(t,n,p,r,l,d,T,C,O)}function oM(t){for(var n=t;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var l=0;l<r.length;l++){var d=r[l],p=d.getSnapshot;d=d.value;try{if(!an(p(),d))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function to(t,n,r,l){n&=~a_,n&=~yo,t.suspendedLanes|=n,t.pingedLanes&=~n,l&&(t.warmLanes|=n),l=t.expirationTimes;for(var d=n;0<d;){var p=31-nn(d),T=1<<p;l[p]=-1,d&=~T}r!==0&&Fa(t,r,n)}function sc(){return(yt&(ln|Ns))===qn?(Ph(0,!1),!1):!0}function Dv(){if(tt!==null){if(Tt===An)var t=tt.return;else t=tt,Jt(),vh(t),Lc=null,hf=0,t=tt;for(;t!==null;)gE(t.alternate,t),t=t.return;tt=null}}function ac(t,n){var r=t.timeoutHandle;r!==Ul&&(t.timeoutHandle=Ul,U6(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),Dv(),Ot=t,tt=r=ws(t.current,null),it=n,Tt=An,$n=null,mo=!1,zc=Ei(t,n),s_=!1,Yt=vr,Ml=Gn=a_=yo=go=0,un=_f=null,pg=!1,n&8&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var d=31-nn(l),p=1<<d;n|=t[d],l&=~p}return Da=n,jr(),n=XA(),1e3<n-GA&&(ie.recentlyCreatedOwnerStacks=0,GA=n),Ls.discardPendingWarnings(),r}function qE(t,n){ze=null,ie.H=dg,ie.getCurrentStack=null,xa=!1,Vn=null,n===lf||n===rg?(n=Ku(),Tt=vf):n===ZA?(n=Ku(),Tt=Gw):Tt=n===Nw?n_:n!==null&&typeof n=="object"&&typeof n.then=="function"?jc:yf,$n=n;var r=tt;if(r===null)Yt=gf,Sm(t,Di(n,t.current));else switch(r.mode&Li&&Wu(r),mt(),Tt){case yf:Ee!==null&&typeof Ee.markComponentErrored=="function"&&Ee.markComponentErrored(r,n,it);break;case Ol:case Rl:case vf:case jc:case bf:Ee!==null&&typeof Ee.markComponentSuspended=="function"&&Ee.markComponentSuspended(r,n,it)}}function $E(){var t=ie.H;return ie.H=dg,t===null?dg:t}function GE(){var t=ie.A;return ie.A=b6,t}function kv(){Yt=kl,mo||(it&4194048)!==it&&fs.current!==null||(zc=!0),!(go&134217727)&&!(yo&134217727)||Ot===null||to(Ot,it,Gn,!1)}function Ov(t,n,r){var l=yt;yt|=ln;var d=$E(),p=GE();if(Ot!==t||it!==n){if(Rs){var T=t.memoizedUpdaters;0<T.size&&(Ih(t,it),T.clear()),Nr(t,n)}Tf=null,ac(t,n)}ji(n),n=!1,T=Yt;e:do try{if(Tt!==An&&tt!==null){var C=tt,O=$n;switch(Tt){case n_:Dv(),T=fg;break e;case vf:case Ol:case Rl:case jc:fs.current===null&&(n=!0);var L=Tt;if(Tt=An,$n=null,rc(t,C,O,L),r&&zc){T=vr;break e}break;default:L=Tt,Tt=An,$n=null,rc(t,C,O,L)}}XE(),T=Yt;break}catch(J){qE(t,J)}while(1);return n&&t.shellSuspendCounter++,Jt(),yt=l,ie.H=d,ie.A=p,jt(),tt===null&&(Ot=null,it=0,jr()),T}function XE(){for(;tt!==null;)YE(tt)}function lM(t,n){var r=yt;yt|=ln;var l=$E(),d=GE();if(Ot!==t||it!==n){if(Rs){var p=t.memoizedUpdaters;0<p.size&&(Ih(t,it),p.clear()),Nr(t,n)}Tf=null,mg=_a()+Yw,ac(t,n)}else zc=Ei(t,n);ji(n);e:do try{if(Tt!==An&&tt!==null)t:switch(n=tt,p=$n,Tt){case yf:Tt=An,$n=null,rc(t,n,p,yf);break;case Ol:case Rl:if(rh(p)){Tt=An,$n=null,WE(n);break}n=function(){Tt!==Ol&&Tt!==Rl||Ot!==t||(Tt=bf),ya(t)},p.then(n,n);break e;case vf:Tt=bf;break e;case Gw:Tt=i_;break e;case bf:rh(p)?(Tt=An,$n=null,WE(n)):(Tt=An,$n=null,rc(t,n,p,bf));break;case i_:var T=null;switch(tt.tag){case 26:T=tt.memoizedState;case 5:case 27:var C=tt;if(!T||BC(T)){Tt=An,$n=null;var O=C.sibling;if(O!==null)tt=O;else{var L=C.return;L!==null?(tt=L,Dm(L)):tt=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Tt=An,$n=null,rc(t,n,p,i_);break;case jc:Tt=An,$n=null,rc(t,n,p,jc);break;case n_:Dv(),Yt=fg;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}ie.actQueue!==null?XE():uM();break}catch(J){qE(t,J)}while(1);return Jt(),ie.H=l,ie.A=d,yt=r,tt!==null?(Ee!==null&&typeof Ee.markRenderYielded=="function"&&Ee.markRenderYielded(),vr):(jt(),Ot=null,it=0,jr(),Yt)}function uM(){for(;tt!==null&&!aL();)YE(tt)}function YE(t){var n=t.alternate;(t.mode&Li)!==It?(Ja(t),n=Re(t,bv,n,t,Da),Wu(t)):n=Re(t,bv,n,t,Da),t.memoizedProps=t.pendingProps,n===null?Dm(t):tt=n}function WE(t){var n=Re(t,cM,t);t.memoizedProps=t.pendingProps,n===null?Dm(t):tt=n}function cM(t){var n=t.alternate,r=(t.mode&Li)!==It;switch(r&&Ja(t),t.tag){case 15:case 0:n=lE(n,t,t.pendingProps,t.type,void 0,it);break;case 11:n=lE(n,t,t.pendingProps,t.type.render,t.ref,it);break;case 5:vh(t);default:gE(n,t),t=tt=Gu(t,Da),n=bv(n,t,Da)}return r&&Wu(t),n}function rc(t,n,r,l){Jt(),vh(n),Lc=null,hf=0;var d=n.return;try{if(W5(t,d,n,r,it)){Yt=gf,Sm(t,Di(r,t.current)),tt=null;return}}catch(p){if(d!==null)throw tt=d,p;Yt=gf,Sm(t,Di(r,t.current)),tt=null;return}n.flags&32768?(lt||l===yf?t=!0:zc||it&536870912?t=!1:(mo=t=!0,(l===Ol||l===Rl||l===vf||l===jc)&&(l=fs.current,l!==null&&l.tag===13&&(l.flags|=16384))),QE(n,t)):Dm(n)}function Dm(t){var n=t;do{if(n.flags&32768){QE(n,mo);return}var r=n.alternate;if(t=n.return,Ja(n),r=Re(n,K5,r,n,Da),(n.mode&Li)!==It&&ll(n),r!==null){tt=r;return}if(n=n.sibling,n!==null){tt=n;return}tt=n=t}while(n!==null);Yt===vr&&(Yt=$w)}function QE(t,n){do{var r=Z5(t.alternate,t);if(r!==null){r.flags&=32767,tt=r;return}if((t.mode&Li)!==It){ll(t),r=t.actualDuration;for(var l=t.child;l!==null;)r+=l.actualDuration,l=l.sibling;t.actualDuration=r}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(t=t.sibling,t!==null)){tt=t;return}tt=t=r}while(t!==null);Yt=fg,tt=null}function Rv(t,n,r,l,d,p,T,C,O){t.cancelPendingCommit=null;do Lh();while(Pi!==Ll);if(Ls.flushLegacyContextWarning(),Ls.flushPendingUnsafeLifecycleWarnings(),(yt&(ln|Ns))!==qn)throw Error("Should not already be working.");if(Ee!==null&&typeof Ee.markCommitStarted=="function"&&Ee.markCommitStarted(r),n===null)Et();else{if(r===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),n===t.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(p=n.lanes|n.childLanes,p|=Ib,Ir(t,r,p,T,C,O),t===Ot&&(tt=Ot=null,it=0),Vc=n,bo=t,_o=r,l_=p,u_=d,Zw=l,n.subtreeFlags&10256||n.flags&10256?(t.callbackNode=null,t.callbackPriority=0,mM(hc,function(){return tC(),null})):(t.callbackNode=null,t.callbackPriority=0),ig=Dc(),l=(n.flags&13878)!==0,n.subtreeFlags&13878||l){l=ie.T,ie.T=null,d=gt.p,gt.p=ss,T=yt,yt|=Ns;try{sM(t,n,r)}finally{yt=T,gt.p=d,ie.T=l}}Pi=Ww,KE(),ZE(),JE()}}function KE(){if(Pi===Ww){Pi=Ll;var t=bo,n=Vc,r=_o,l=(n.flags&13878)!==0;if(n.subtreeFlags&13878||l){l=ie.T,ie.T=null;var d=gt.p;gt.p=ss;var p=yt;yt|=Ns;try{Bc=r,Fc=t,kE(n,t),Fc=Bc=null,r=__;var T=Jo(t.containerInfo),C=r.focusedElem,O=r.selectionRange;if(T!==C&&C&&C.ownerDocument&&Zn(C.ownerDocument.documentElement,C)){if(O!==null&&zu(C)){var L=O.start,J=O.end;if(J===void 0&&(J=L),"selectionStart"in C)C.selectionStart=L,C.selectionEnd=Math.min(J,C.value.length);else{var ne=C.ownerDocument||document,Z=ne&&ne.defaultView||window;if(Z.getSelection){var ae=Z.getSelection(),ke=C.textContent.length,je=Math.min(O.start,ke),Rt=O.end===void 0?je:Math.min(O.end,ke);!ae.extend&&je>Rt&&(T=Rt,Rt=je,je=T);var st=_n(C,je),j=_n(C,Rt);if(st&&j&&(ae.rangeCount!==1||ae.anchorNode!==st.node||ae.anchorOffset!==st.offset||ae.focusNode!==j.node||ae.focusOffset!==j.offset)){var z=ne.createRange();z.setStart(st.node,st.offset),ae.removeAllRanges(),je>Rt?(ae.addRange(z),ae.extend(j.node,j.offset)):(z.setEnd(j.node,j.offset),ae.addRange(z))}}}}for(ne=[],ae=C;ae=ae.parentNode;)ae.nodeType===1&&ne.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ne.length;C++){var q=ne[C];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Rg=!!b_,__=b_=null}finally{yt=p,gt.p=d,ie.T=l}}t.current=n,Pi=Qw}}function ZE(){if(Pi===Qw){Pi=Ll;var t=bo,n=Vc,r=_o,l=(n.flags&8772)!==0;if(n.subtreeFlags&8772||l){l=ie.T,ie.T=null;var d=gt.p;gt.p=ss;var p=yt;yt|=Ns;try{Ee!==null&&typeof Ee.markLayoutEffectsStarted=="function"&&Ee.markLayoutEffectsStarted(r),Bc=r,Fc=t,CE(t,n.alternate,n),Fc=Bc=null,Ee!==null&&typeof Ee.markLayoutEffectsStopped=="function"&&Ee.markLayoutEffectsStopped()}finally{yt=p,gt.p=d,ie.T=l}}Pi=Kw}}function JE(){if(Pi===C6||Pi===Kw){Pi=Ll,rL();var t=bo,n=Vc,r=_o,l=Zw,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?Pi=o_:(Pi=Ll,Vc=bo=null,eC(t,t.pendingLanes),Il=0,xf=null);var p=t.pendingLanes;if(p===0&&(vo=null),d||aC(t),d=ja(r),n=n.stateNode,$i&&typeof $i.onCommitFiberRoot=="function")try{var T=(n.current.flags&128)===128;switch(d){case ss:var C=hb;break;case Sa:C=fb;break;case cr:C=hc;break;case $m:C=pb;break;default:C=hc}$i.onCommitFiberRoot(fc,n,C,T)}catch(ne){Ta||(Ta=!0,console.error("React instrumentation encountered an error: %s",ne))}if(Rs&&t.memoizedUpdaters.clear(),rM(),l!==null){T=ie.T,C=gt.p,gt.p=ss,ie.T=null;try{var O=t.onRecoverableError;for(n=0;n<l.length;n++){var L=l[n],J=dM(L.stack);Re(L.source,O,L.value,J)}}finally{ie.T=T,gt.p=C}}_o&3&&Lh(),ya(t),p=t.pendingLanes,r&4194090&&p&42?(sg=!0,t===c_?Sf++:(Sf=0,c_=t)):Sf=0,Ph(0,!1),Et()}}function dM(t){return t={componentStack:t},Object.defineProperty(t,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),t}function eC(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,al(n)))}function Lh(t){return KE(),ZE(),JE(),tC()}function tC(){if(Pi!==o_)return!1;var t=bo,n=l_;l_=0;var r=ja(_o),l=cr>r?cr:r;r=ie.T;var d=gt.p;try{gt.p=l,ie.T=null,l=u_,u_=null;var p=bo,T=_o;if(Pi=Ll,Vc=bo=null,_o=0,(yt&(ln|Ns))!==qn)throw Error("Cannot flush passive effects while already rendering.");d_=!0,gg=!1,Ee!==null&&typeof Ee.markPassiveEffectsStarted=="function"&&Ee.markPassiveEffectsStarted(T);var C=yt;if(yt|=Ns,UE(p.current),LE(p,p.current,T,l),Ee!==null&&typeof Ee.markPassiveEffectsStopped=="function"&&Ee.markPassiveEffectsStopped(),aC(p),yt=C,Ph(0,!1),gg?p===xf?Il++:(Il=0,xf=p):Il=0,gg=d_=!1,$i&&typeof $i.onPostCommitFiberRoot=="function")try{$i.onPostCommitFiberRoot(fc,p)}catch(L){Ta||(Ta=!0,console.error("React instrumentation encountered an error: %s",L))}var O=p.current.stateNode;return O.effectDuration=0,O.passiveEffectDuration=0,!0}finally{gt.p=d,ie.T=r,eC(t,n)}}function iC(t,n,r){n=Di(r,n),n=lv(t.stateNode,n,2),t=ca(t,n,2),t!==null&&(Qs(t,2),ya(t))}function At(t,n,r){if(qc=!1,t.tag===3)iC(t,t,r);else{for(;n!==null;){if(n.tag===3){iC(n,t,r);return}if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(vo===null||!vo.has(l))){t=Di(r,t),r=uv(2),l=ca(n,r,2),l!==null&&(cv(r,l,n,t),Qs(l,2),ya(l));return}}n=n.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
Error message:
%s`,r)}}function Mv(t,n,r){var l=t.pingCache;if(l===null){l=t.pingCache=new T6;var d=new Set;l.set(n,d)}else d=l.get(n),d===void 0&&(d=new Set,l.set(n,d));d.has(r)||(s_=!0,d.add(r),l=hM.bind(null,t,n,r),Rs&&Ih(t,r),n.then(l,l))}function hM(t,n,r){var l=t.pingCache;l!==null&&l.delete(n),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,HE()&&ie.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
When testing, code that resolves suspended data should be wrapped into act(...):
act(() => {
/* finish loading suspended data */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Ot===t&&(it&r)===r&&(Yt===kl||Yt===t_&&(it&62914560)===it&&_a()-r_<Xw?(yt&ln)===qn&&ac(t,0):a_|=r,Ml===it&&(Ml=0)),ya(t)}function nC(t,n){n===0&&(n=Ba()),t=ui(t,n),t!==null&&(Qs(t,n),ya(t))}function fM(t){var n=t.memoizedState,r=0;n!==null&&(r=n.retryLane),nC(t,r)}function pM(t,n){var r=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(r=d.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}l!==null&&l.delete(n),nC(t,r)}function Lv(t,n,r){if(n.subtreeFlags&67117056)for(n=n.child;n!==null;){var l=t,d=n,p=d.type===Hm;p=r||p,d.tag!==22?d.flags&67108864?p&&Re(d,sC,l,d,(d.mode&VA)===It):Lv(l,d,p):d.memoizedState===null&&(p&&d.flags&8192?Re(d,sC,l,d):d.subtreeFlags&67108864&&Re(d,Lv,l,d,p)),n=n.sibling}}function sC(t,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;Ye(!0);try{RE(n),r&&BE(n),ME(t,n.alternate,n,!1),r&&IE(t,n,0,null,!1,0)}finally{Ye(!1)}}function aC(t){var n=!0;t.current.mode&(Xi|Ms)||(n=!1),Lv(t,t.current,n)}function rC(t){if((yt&ln)===qn){var n=t.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=ue(t)||"ReactComponent",yg!==null){if(yg.has(n))return;yg.add(n)}else yg=new Set([n]);Re(t,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Ih(t,n){Rs&&t.memoizedUpdaters.forEach(function(r){Ha(t,r,n)})}function mM(t,n){var r=ie.actQueue;return r!==null?(r.push(n),D6):db(t,n)}function gM(t){HE()&&ie.actQueue===null&&Re(t,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,ue(t))})}function ya(t){t!==$c&&t.next===null&&($c===null?vg=$c=t:$c=$c.next=t),bg=!0,ie.actQueue!==null?f_||(f_=!0,cC()):h_||(h_=!0,cC())}function Ph(t,n){if(!p_&&bg){p_=!0;do for(var r=!1,l=vg;l!==null;){if(!n)if(t!==0){var d=l.pendingLanes;if(d===0)var p=0;else{var T=l.suspendedLanes,C=l.pingedLanes;p=(1<<31-nn(42|t)+1)-1,p&=d&~(T&~C),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,uC(l,p))}else p=it,p=_s(l,l===Ot?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==Ul),!(p&3)||Ei(l,p)||(r=!0,uC(l,p));l=l.next}while(r);p_=!1}}function yM(){Iv()}function Iv(){bg=f_=h_=!1;var t=0;Pl!==0&&(SM()&&(t=Pl),Pl=0);for(var n=_a(),r=null,l=vg;l!==null;){var d=l.next,p=oC(l,n);p===0?(l.next=null,r===null?vg=d:r.next=d,d===null&&($c=r)):(r=l,(t!==0||p&3)&&(bg=!0)),l=d}Ph(t,!1)}function oC(t,n){for(var r=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var T=31-nn(p),C=1<<T,O=d[T];O===-1?(!(C&r)||C&l)&&(d[T]=Fo(C,n)):O<=n&&(t.expiredLanes|=C),p&=~C}if(n=Ot,r=it,r=_s(t,t===n?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Ul),l=t.callbackNode,r===0||t===n&&(Tt===Ol||Tt===Rl)||t.cancelPendingCommit!==null)return l!==null&&Pv(l),t.callbackNode=null,t.callbackPriority=0;if(!(r&3)||Ei(t,r)){if(n=r&-r,n!==t.callbackPriority||ie.actQueue!==null&&l!==m_)Pv(l);else return n;switch(ja(r)){case ss:case Sa:r=fb;break;case cr:r=hc;break;case $m:r=pb;break;default:r=hc}return l=lC.bind(null,t),ie.actQueue!==null?(ie.actQueue.push(l),r=m_):r=db(r,l),t.callbackPriority=n,t.callbackNode=r,n}return l!==null&&Pv(l),t.callbackPriority=2,t.callbackNode=null,2}function lC(t,n){if(sg=ng=!1,Pi!==Ll&&Pi!==o_)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(Lh()&&t.callbackNode!==r)return null;var l=it;return l=_s(t,t===Ot?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==Ul),l===0?null:(zE(t,l,n),oC(t,_a()),t.callbackNode!=null&&t.callbackNode===r?lC.bind(null,t):null)}function uC(t,n){if(Lh())return null;ng=sg,sg=!1,zE(t,n,!0)}function Pv(t){t!==m_&&t!==null&&sL(t)}function cC(){ie.actQueue!==null&&ie.actQueue.push(function(){return Iv(),null}),B6(function(){(yt&(ln|Ns))!==qn?db(hb,yM):Iv()})}function Nv(){return Pl===0&&(Pl=we()),Pl}function dC(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:(me(t,"action"),Xo(""+t))}function hC(t,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,t.id&&r.setAttribute("form",t.id),n.parentNode.insertBefore(r,n),t=new FormData(t),r.parentNode.removeChild(r),t}function vM(t,n,r,l,d){if(n==="submit"&&r&&r.stateNode===d){var p=dC((d[xn]||null).action),T=l.submitter;T&&(n=(n=T[xn]||null)?dC(n.formAction):T.getAttribute("formAction"),n!==null&&(p=n,T=null));var C=new Qm("action","action",null,l,d);t.push({event:C,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Pl!==0){var O=T?hC(d,T):new FormData(d),L={pending:!0,data:O,method:d.method,action:p};Object.freeze(L),tn(r,L,null,O)}}else typeof p=="function"&&(C.preventDefault(),O=T?hC(d,T):new FormData(d),L={pending:!0,data:O,method:d.method,action:p},Object.freeze(L),tn(r,L,p,O))},currentTarget:d}]})}}function km(t,n,r){t.currentTarget=r;try{n(t)}catch(l){Qb(l)}t.currentTarget=null}function fC(t,n){n=(n&4)!==0;for(var r=0;r<t.length;r++){var l=t[r];e:{var d=void 0,p=l.event;if(l=l.listeners,n)for(var T=l.length-1;0<=T;T--){var C=l[T],O=C.instance,L=C.currentTarget;if(C=C.listener,O!==d&&p.isPropagationStopped())break e;O!==null?Re(O,km,p,C,L):km(p,C,L),d=O}else for(T=0;T<l.length;T++){if(C=l[T],O=C.instance,L=C.currentTarget,C=C.listener,O!==d&&p.isPropagationStopped())break e;O!==null?Re(O,km,p,C,L):km(p,C,L),d=O}}}}function nt(t,n){g_.has(t)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',t);var r=n[mb];r===void 0&&(r=n[mb]=new Set);var l=t+"__bubble";r.has(l)||(pC(n,t,2,!1),r.add(l))}function Uv(t,n,r){g_.has(t)&&!n&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',t);var l=0;n&&(l|=4),pC(r,t,l,n)}function Bv(t){if(!t[_g]){t[_g]=!0,KC.forEach(function(r){r!=="selectionchange"&&(g_.has(r)||Uv(r,!1,t),Uv(r,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[_g]||(n[_g]=!0,Uv("selectionchange",!1,n))}}function pC(t,n,r,l){switch(VC(n)){case ss:var d=YM;break;case Sa:d=WM;break;default:d=Jv}r=d.bind(null,n,r,t),d=void 0,!xb||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(n,r,{capture:!0,passive:d}):t.addEventListener(n,r,!0):d!==void 0?t.addEventListener(n,r,{passive:d}):t.addEventListener(n,r,!1)}function Fv(t,n,r,l,d){var p=l;if(!(n&1)&&!(n&2)&&l!==null)e:for(;;){if(l===null)return;var T=l.tag;if(T===3||T===4){var C=l.stateNode.containerInfo;if(C===d)break;if(T===4)for(T=l.return;T!==null;){var O=T.tag;if((O===3||O===4)&&T.stateNode.containerInfo===d)return;T=T.return}for(;C!==null;){if(T=Vi(C),T===null)return;if(O=T.tag,O===5||O===6||O===26||O===27){l=p=T;continue e}C=C.parentNode}}l=l.return}Yo(function(){var L=p,J=Nu(r),ne=[];e:{var Z=zA.get(t);if(Z!==void 0){var ae=Qm,ke=t;switch(t){case"keypress":if(Uu(r)===0)break e;case"keydown":case"keyup":ae=$L;break;case"focusin":ke="focus",ae=wb;break;case"focusout":ke="blur",ae=wb;break;case"beforeblur":case"afterblur":ae=wb;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=DA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=LL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=YL;break;case BA:case FA:case HA:ae=NL;break;case jA:ae=QL;break;case"scroll":case"scrollend":ae=RL;break;case"wheel":ae=ZL;break;case"copy":case"cut":case"paste":ae=BL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=OA;break;case"toggle":case"beforetoggle":ae=e6}var je=(n&4)!==0,Rt=!je&&(t==="scroll"||t==="scrollend"),st=je?Z!==null?Z+"Capture":null:Z;je=[];for(var j=L,z;j!==null;){var q=j;if(z=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||z===null||st===null||(q=Cs(j,st),q!=null&&je.push(Nh(j,q,z))),Rt)break;j=j.return}0<je.length&&(Z=new ae(Z,ke,null,r,J),ne.push({event:Z,listeners:je}))}}if(!(n&7)){e:{if(Z=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",Z&&r!==Gh&&(ke=r.relatedTarget||r.fromElement)&&(Vi(ke)||ke[lo]))break e;if((ae||Z)&&(Z=J.window===J?J:(Z=J.ownerDocument)?Z.defaultView||Z.parentWindow:window,ae?(ke=r.relatedTarget||r.toElement,ae=L,ke=ke?Vi(ke):null,ke!==null&&(Rt=I(ke),je=ke.tag,ke!==Rt||je!==5&&je!==27&&je!==6)&&(ke=null)):(ae=null,ke=L),ae!==ke)){if(je=DA,q="onMouseLeave",st="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(je=OA,q="onPointerLeave",st="onPointerEnter",j="pointer"),Rt=ae==null?Z:Js(ae),z=ke==null?Z:Js(ke),Z=new je(q,j+"leave",ae,r,J),Z.target=Rt,Z.relatedTarget=z,q=null,Vi(J)===L&&(je=new je(st,j+"enter",ke,r,J),je.target=z,je.relatedTarget=Rt,q=je),Rt=q,ae&&ke)t:{for(je=ae,st=ke,j=0,z=je;z;z=oc(z))j++;for(z=0,q=st;q;q=oc(q))z++;for(;0<j-z;)je=oc(je),j--;for(;0<z-j;)st=oc(st),z--;for(;j--;){if(je===st||st!==null&&je===st.alternate)break t;je=oc(je),st=oc(st)}je=null}else je=null;ae!==null&&mC(ne,Z,ae,je,!1),ke!==null&&Rt!==null&&mC(ne,Rt,ke,je,!0)}}e:{if(Z=L?Js(L):window,ae=Z.nodeName&&Z.nodeName.toLowerCase(),ae==="select"||ae==="input"&&Z.type==="file")var re=Qo;else if(Zp(Z))if(NA)re=ju;else{re=Qy;var Te=Wy}else ae=Z.nodeName,!ae||ae.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?L&&Go(L.elementType)&&(re=Qo):re=Ky;if(re&&(re=re(t,L))){Hu(ne,re,r,J);break e}Te&&Te(t,Z,L),t==="focusout"&&L&&Z.type==="number"&&L.memoizedProps.value!=null&&jd(Z,"number",Z.value)}switch(Te=L?Js(L):window,t){case"focusin":(Zp(Te)||Te.contentEditable==="true")&&(_c=Te,kb=L,Jh=null);break;case"focusout":Jh=kb=_c=null;break;case"mousedown":Ob=!0;break;case"contextmenu":case"mouseup":case"dragend":Ob=!1,tm(ne,r,J);break;case"selectionchange":if(s6)break;case"keydown":case"keyup":tm(ne,r,J)}var $e;if(Db)e:{switch(t){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else bc?Qp(t,r)&&(Oe="onCompositionEnd"):t==="keydown"&&r.keyCode===RA&&(Oe="onCompositionStart");Oe&&(MA&&r.locale!=="ko"&&(bc||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&bc&&($e=$d()):(uo=J,Eb="value"in uo?uo.value:uo.textContent,bc=!0)),Te=Om(L,Oe),0<Te.length&&(Oe=new kA(Oe,t,null,r,J),ne.push({event:Oe,listeners:Te}),$e?Oe.data=$e:($e=Kp(r),$e!==null&&(Oe.data=$e)))),($e=i6?$y(t,r):Gy(t,r))&&(Oe=Om(L,"onBeforeInput"),0<Oe.length&&(Te=new HL("onBeforeInput","beforeinput",null,r,J),ne.push({event:Te,listeners:Oe}),Te.data=$e)),vM(ne,t,L,r,J)}fC(ne,n)})}function Nh(t,n,r){return{instance:t,listener:n,currentTarget:r}}function Om(t,n){for(var r=n+"Capture",l=[];t!==null;){var d=t,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Cs(t,r),d!=null&&l.unshift(Nh(t,d,p)),d=Cs(t,n),d!=null&&l.push(Nh(t,d,p))),t.tag===3)return l;t=t.return}return[]}function oc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function mC(t,n,r,l,d){for(var p=n._reactName,T=[];r!==null&&r!==l;){var C=r,O=C.alternate,L=C.stateNode;if(C=C.tag,O!==null&&O===l)break;C!==5&&C!==26&&C!==27||L===null||(O=L,d?(L=Cs(r,p),L!=null&&T.unshift(Nh(r,L,O))):d||(L=Cs(r,p),L!=null&&T.push(Nh(r,L,O)))),r=r.return}T.length!==0&&t.push({event:n,listeners:T})}function Hv(t,n){Xp(t,n),t!=="input"&&t!=="textarea"&&t!=="select"||n==null||n.value!==null||AA||(AA=!0,t==="select"&&n.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",t):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",t));var r={registrationNameDependencies:_l,possibleRegistrationNames:gb};Go(t)||typeof n.is=="string"||Yp(t,n,r),n.contentEditable&&!n.suppressContentEditableWarning&&n.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function _i(t,n,r,l){n!==r&&(r=io(r),io(n)!==r&&(l[t]=n))}function bM(t,n,r){n.forEach(function(l){r[vC(l)]=l==="style"?zv(t):t.getAttribute(l)})}function va(t,n){n===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",t,t,t):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",t,typeof n)}function gC(t,n){return t=t.namespaceURI===Xm||t.namespaceURI===mc?t.ownerDocument.createElementNS(t.namespaceURI,t.tagName):t.ownerDocument.createElement(t.tagName),t.innerHTML=n,t.innerHTML}function io(t){return W(t)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",he(t)),pe(t)),(typeof t=="string"?t:""+t).replace(k6,`
`).replace(O6,"")}function yC(t,n){return n=io(n),io(t)===n}function Rm(){}function wt(t,n,r,l,d,p){switch(r){case"children":typeof l=="string"?(Es(l,n,!1),n==="body"||n==="textarea"&&l===""||Ga(t,l)):(typeof l=="number"||typeof l=="bigint")&&(Es(""+l,n,!1),n!=="body"&&Ga(t,""+l));break;case"className":qe(t,"class",l);break;case"tabIndex":qe(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":qe(t,r,l);break;case"style":$p(t,l,p);break;case"data":if(n!=="object"){qe(t,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||r!=="href")){console.error(r==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',r,r),t.removeAttribute(r);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(r);break}me(l,r),l=Xo(""+l),t.setAttribute(r,l);break;case"action":case"formAction":if(l!=null&&(n==="form"?r==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof l=="function"&&(d.encType==null&&d.method==null||xg||(xg=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),d.target==null||Sg||(Sg=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):n==="input"||n==="button"?r==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):n!=="input"||d.type==="submit"||d.type==="image"||Tg?n!=="button"||d.type==null||d.type==="submit"||Tg?typeof l=="function"&&(d.name==null||nD||(nD=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),d.formEncType==null&&d.formMethod==null||xg||(xg=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),d.formTarget==null||Sg||(Sg=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Tg=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Tg=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(r==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof l=="function"){t.setAttribute(r,"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 p=="function"&&(r==="formAction"?(n!=="input"&&wt(t,n,"name",d.name,d,null),wt(t,n,"formEncType",d.formEncType,d,null),wt(t,n,"formMethod",d.formMethod,d,null),wt(t,n,"formTarget",d.formTarget,d,null)):(wt(t,n,"encType",d.encType,d,null),wt(t,n,"method",d.method,d,null),wt(t,n,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(r);break}me(l,r),l=Xo(""+l),t.setAttribute(r,l);break;case"onClick":l!=null&&(typeof l!="function"&&va(r,l),t.onclick=Rm);break;case"onScroll":l!=null&&(typeof l!="function"&&va(r,l),nt("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&va(r,l),nt("scrollend",t));break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(r=l.__html,r!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=r}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}me(l,r),r=Xo(""+l),t.setAttributeNS(Nl,"xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?(me(l,r),t.setAttribute(r,""+l)):t.removeAttribute(r);break;case"inert":l!==""||Eg[r]||(Eg[r]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",r));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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(r,""):t.removeAttribute(r);break;case"capture":case"download":l===!0?t.setAttribute(r,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?(me(l,r),t.setAttribute(r,l)):t.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?(me(l,r),t.setAttribute(r,l)):t.removeAttribute(r);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(r):(me(l,r),t.setAttribute(r,l));break;case"popover":nt("beforetoggle",t),nt("toggle",t),at(t,"popover",l);break;case"xlinkActuate":Zt(t,Nl,"xlink:actuate",l);break;case"xlinkArcrole":Zt(t,Nl,"xlink:arcrole",l);break;case"xlinkRole":Zt(t,Nl,"xlink:role",l);break;case"xlinkShow":Zt(t,Nl,"xlink:show",l);break;case"xlinkTitle":Zt(t,Nl,"xlink:title",l);break;case"xlinkType":Zt(t,Nl,"xlink:type",l);break;case"xmlBase":Zt(t,y_,"xml:base",l);break;case"xmlLang":Zt(t,y_,"xml:lang",l);break;case"xmlSpace":Zt(t,y_,"xml:space",l);break;case"is":p!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),at(t,"is",l);break;case"innerText":case"textContent":break;case"popoverTarget":sD||l==null||typeof l!="object"||(sD=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",l));default:!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N"?(r=Gp(r),at(t,r,l)):_l.hasOwnProperty(r)&&l!=null&&typeof l!="function"&&va(r,l)}}function jv(t,n,r,l,d,p){switch(r){case"style":$p(t,l,p);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(r=l.__html,r!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=r}}break;case"children":typeof l=="string"?Ga(t,l):(typeof l=="number"||typeof l=="bigint")&&Ga(t,""+l);break;case"onScroll":l!=null&&(typeof l!="function"&&va(r,l),nt("scroll",t));break;case"onScrollEnd":l!=null&&(typeof l!="function"&&va(r,l),nt("scrollend",t));break;case"onClick":l!=null&&(typeof l!="function"&&va(r,l),t.onclick=Rm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(_l.hasOwnProperty(r))l!=null&&typeof l!="function"&&va(r,l);else e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),n=r.slice(2,d?r.length-7:void 0),p=t[xn]||null,p=p!=null?p[r]:null,typeof p=="function"&&t.removeEventListener(n,p,d),typeof l=="function")){typeof p!="function"&&p!==null&&(r in t?t[r]=null:t.hasAttribute(r)&&t.removeAttribute(r)),t.addEventListener(n,l,d);break e}r in t?t[r]=l:l===!0?t.setAttribute(r,""):at(t,r,l)}}}function Ri(t,n,r){switch(Hv(n,r),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",t),nt("load",t);var l=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var T=r[p];if(T!=null)switch(p){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:wt(t,n,p,T,r,null)}}d&&wt(t,n,"srcSet",r.srcSet,r,null),l&&wt(t,n,"src",r.src,r,null);return;case"input":Le("input",r),nt("invalid",t);var C=p=T=d=null,O=null,L=null;for(l in r)if(r.hasOwnProperty(l)){var J=r[l];if(J!=null)switch(l){case"name":d=J;break;case"type":T=J;break;case"checked":O=J;break;case"defaultChecked":L=J;break;case"value":p=J;break;case"defaultValue":C=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:wt(t,n,l,J,r,null)}}kt(t,r),zo(t,p,C,O,L,T,d,!1),za(t);return;case"select":Le("select",r),nt("invalid",t),l=T=p=null;for(d in r)if(r.hasOwnProperty(d)&&(C=r[d],C!=null))switch(d){case"value":p=C;break;case"defaultValue":T=C;break;case"multiple":l=C;default:wt(t,n,d,C,r,null)}Ou(t,r),n=p,r=T,t.multiple=!!l,n!=null?Va(t,!!l,n,!1):r!=null&&Va(t,!!l,r,!0);return;case"textarea":Le("textarea",r),nt("invalid",t),p=d=l=null;for(T in r)if(r.hasOwnProperty(T)&&(C=r[T],C!=null))switch(T){case"value":l=C;break;case"defaultValue":d=C;break;case"children":p=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:wt(t,n,T,C,r,null)}Ru(t,r),jp(t,l,d,p),za(t);return;case"option":Fp(t,r);for(O in r)if(r.hasOwnProperty(O)&&(l=r[O],l!=null))switch(O){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:wt(t,n,O,l,r,null)}return;case"dialog":nt("beforetoggle",t),nt("toggle",t),nt("cancel",t),nt("close",t);break;case"iframe":case"object":nt("load",t);break;case"video":case"audio":for(l=0;l<Ef.length;l++)nt(Ef[l],t);break;case"image":nt("error",t),nt("load",t);break;case"details":nt("toggle",t);break;case"embed":case"source":case"link":nt("error",t),nt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in r)if(r.hasOwnProperty(L)&&(l=r[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:wt(t,n,L,l,r,null)}return;default:if(Go(n)){for(J in r)r.hasOwnProperty(J)&&(l=r[J],l!==void 0&&jv(t,n,J,l,r,void 0));return}}for(C in r)r.hasOwnProperty(C)&&(l=r[C],l!=null&&wt(t,n,C,l,r,null))}function _M(t,n,r,l){switch(Hv(n,l),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,T=null,C=null,O=null,L=null,J=null;for(ae in r){var ne=r[ae];if(r.hasOwnProperty(ae)&&ne!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=ne;default:l.hasOwnProperty(ae)||wt(t,n,ae,null,l,ne)}}for(var Z in l){var ae=l[Z];if(ne=r[Z],l.hasOwnProperty(Z)&&(ae!=null||ne!=null))switch(Z){case"type":p=ae;break;case"name":d=ae;break;case"checked":L=ae;break;case"defaultChecked":J=ae;break;case"value":T=ae;break;case"defaultValue":C=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ae!==ne&&wt(t,n,Z,ae,l,ne)}}n=r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null,l=l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null,n||!l||iD||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),iD=!0),!n||l||tD||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),tD=!0),ku(t,T,C,O,L,J,p,d);return;case"select":ae=T=C=Z=null;for(p in r)if(O=r[p],r.hasOwnProperty(p)&&O!=null)switch(p){case"value":break;case"multiple":ae=O;default:l.hasOwnProperty(p)||wt(t,n,p,null,l,O)}for(d in l)if(p=l[d],O=r[d],l.hasOwnProperty(d)&&(p!=null||O!=null))switch(d){case"value":Z=p;break;case"defaultValue":C=p;break;case"multiple":T=p;default:p!==O&&wt(t,n,d,p,l,O)}l=C,n=T,r=ae,Z!=null?Va(t,!!n,Z,!1):!!r!=!!n&&(l!=null?Va(t,!!n,l,!0):Va(t,!!n,n?[]:"",!1));return;case"textarea":ae=Z=null;for(C in r)if(d=r[C],r.hasOwnProperty(C)&&d!=null&&!l.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:wt(t,n,C,null,l,d)}for(T in l)if(d=l[T],p=r[T],l.hasOwnProperty(T)&&(d!=null||p!=null))switch(T){case"value":Z=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==p&&wt(t,n,T,d,l,p)}zd(t,Z,ae);return;case"option":for(var ke in r)if(Z=r[ke],r.hasOwnProperty(ke)&&Z!=null&&!l.hasOwnProperty(ke))switch(ke){case"selected":t.selected=!1;break;default:wt(t,n,ke,null,l,Z)}for(O in l)if(Z=l[O],ae=r[O],l.hasOwnProperty(O)&&Z!==ae&&(Z!=null||ae!=null))switch(O){case"selected":t.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:wt(t,n,O,Z,l,ae)}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 je in r)Z=r[je],r.hasOwnProperty(je)&&Z!=null&&!l.hasOwnProperty(je)&&wt(t,n,je,null,l,Z);for(L in l)if(Z=l[L],ae=r[L],l.hasOwnProperty(L)&&Z!==ae&&(Z!=null||ae!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:wt(t,n,L,Z,l,ae)}return;default:if(Go(n)){for(var Rt in r)Z=r[Rt],r.hasOwnProperty(Rt)&&Z!==void 0&&!l.hasOwnProperty(Rt)&&jv(t,n,Rt,void 0,l,Z);for(J in l)Z=l[J],ae=r[J],!l.hasOwnProperty(J)||Z===ae||Z===void 0&&ae===void 0||jv(t,n,J,Z,l,ae);return}}for(var st in r)Z=r[st],r.hasOwnProperty(st)&&Z!=null&&!l.hasOwnProperty(st)&&wt(t,n,st,null,l,Z);for(ne in l)Z=l[ne],ae=r[ne],!l.hasOwnProperty(ne)||Z===ae||Z==null&&ae==null||wt(t,n,ne,Z,l,ae)}function vC(t){switch(t){case"class":return"className";case"for":return"htmlFor";default:return t}}function zv(t){var n={};t=t.style;for(var r=0;r<t.length;r++){var l=t[r];n[l]=t.getPropertyValue(l)}return n}function bC(t,n,r){if(n!=null&&typeof n!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var l,d=l="",p;for(p in n)if(n.hasOwnProperty(p)){var T=n[p];T!=null&&typeof T!="boolean"&&T!==""&&(p.indexOf("--")===0?(De(T,p),l+=d+p+":"+(""+T).trim()):typeof T!="number"||T===0||EA.has(p)?(De(T,p),l+=d+p.replace(bA,"-$1").toLowerCase().replace(_A,"-ms-")+":"+(""+T).trim()):l+=d+p.replace(bA,"-$1").toLowerCase().replace(_A,"-ms-")+":"+T+"px",d=";")}l=l||null,n=t.getAttribute("style"),n!==l&&(l=io(l),io(n)!==l&&(r.style=zv(t)))}}function is(t,n,r,l,d,p){if(d.delete(r),t=t.getAttribute(r),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(me(l,n),t===""+l)return}_i(n,t,l,p)}function _C(t,n,r,l,d,p){if(d.delete(r),t=t.getAttribute(r),t===null){switch(typeof l){case"function":case"symbol":return}if(!l)return}else switch(typeof l){case"function":case"symbol":break;default:if(l)return}_i(n,t,l,p)}function Vv(t,n,r,l,d,p){if(d.delete(r),t=t.getAttribute(r),t===null)switch(typeof l){case"undefined":case"function":case"symbol":return}else if(l!=null)switch(typeof l){case"function":case"symbol":break;default:if(me(l,r),t===""+l)return}_i(n,t,l,p)}function TC(t,n,r,l,d,p){if(d.delete(r),t=t.getAttribute(r),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(l))return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(!isNaN(l)&&(me(l,n),t===""+l))return}_i(n,t,l,p)}function qv(t,n,r,l,d,p){if(d.delete(r),t=t.getAttribute(r),t===null)switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":return}else if(l!=null)switch(typeof l){case"function":case"symbol":case"boolean":break;default:if(me(l,n),r=Xo(""+l),t===r)return}_i(n,t,l,p)}function SC(t,n,r,l){for(var d={},p=new Set,T=t.attributes,C=0;C<T.length;C++)switch(T[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:p.add(T[C].name)}if(Go(n)){for(var O in r)if(r.hasOwnProperty(O)){var L=r[O];if(L!=null){if(_l.hasOwnProperty(O))typeof L!="function"&&va(O,L);else if(r.suppressHydrationWarning!==!0)switch(O){case"children":typeof L!="string"&&typeof L!="number"||_i("children",t.textContent,L,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,L=L?L.__html:void 0,L!=null&&(L=gC(t,L),_i(O,T,L,d));continue;case"style":p.delete(O),bC(t,L,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":p.delete(O.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",O);continue;case"className":p.delete("class"),T=Ve(t,"class",L),_i("className",T,L,d);continue;default:l.context===_r&&n!=="svg"&&n!=="math"?p.delete(O.toLowerCase()):p.delete(O),T=Ve(t,O,L),_i(O,T,L,d)}}}}else for(L in r)if(r.hasOwnProperty(L)&&(O=r[L],O!=null)){if(_l.hasOwnProperty(L))typeof O!="function"&&va(L,O);else if(r.suppressHydrationWarning!==!0)switch(L){case"children":typeof O!="string"&&typeof O!="number"||_i("children",t.textContent,O,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":T=t.innerHTML,O=O?O.__html:void 0,O!=null&&(O=gC(t,O),T!==O&&(d[L]={__html:T}));continue;case"className":is(t,L,"class",O,p,d);continue;case"tabIndex":is(t,L,"tabindex",O,p,d);continue;case"style":p.delete(L),bC(t,O,d);continue;case"multiple":p.delete(L),_i(L,t.multiple,O,d);continue;case"muted":p.delete(L),_i(L,t.muted,O,d);continue;case"autoFocus":p.delete("autofocus"),_i(L,t.autofocus,O,d);continue;case"data":if(n!=="object"){p.delete(L),T=t.getAttribute("data"),_i(L,T,O,d);continue}case"src":case"href":if(!(O!==""||n==="a"&&L==="href"||n==="object"&&L==="data")){console.error(L==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',L,L);continue}qv(t,L,L,O,p,d);continue;case"action":case"formAction":if(T=t.getAttribute(L),typeof O=="function"){p.delete(L.toLowerCase()),L==="formAction"?(p.delete("name"),p.delete("formenctype"),p.delete("formmethod"),p.delete("formtarget")):(p.delete("enctype"),p.delete("method"),p.delete("target"));continue}else if(T===R6){p.delete(L.toLowerCase()),_i(L,"function",O,d);continue}qv(t,L,L.toLowerCase(),O,p,d);continue;case"xlinkHref":qv(t,L,"xlink:href",O,p,d);continue;case"contentEditable":Vv(t,L,"contenteditable",O,p,d);continue;case"spellCheck":Vv(t,L,"spellcheck",O,p,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Vv(t,L,L,O,p,d);continue;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":_C(t,L,L.toLowerCase(),O,p,d);continue;case"capture":case"download":e:{C=t;var J=T=L,ne=d;if(p.delete(J),C=C.getAttribute(J),C===null)switch(typeof O){case"undefined":case"function":case"symbol":break e;default:if(O===!1)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":break;case"boolean":if(O===!0&&C==="")break e;break;default:if(me(O,T),C===""+O)break e}_i(T,C,O,ne)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=t,J=T=L,ne=d,p.delete(J),C=C.getAttribute(J),C===null)switch(typeof O){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(O)||1>O)break e}else if(O!=null)switch(typeof O){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(O)||1>O)&&(me(O,T),C===""+O))break e}_i(T,C,O,ne)}continue;case"rowSpan":TC(t,L,"rowspan",O,p,d);continue;case"start":TC(t,L,L,O,p,d);continue;case"xHeight":is(t,L,"x-height",O,p,d);continue;case"xlinkActuate":is(t,L,"xlink:actuate",O,p,d);continue;case"xlinkArcrole":is(t,L,"xlink:arcrole",O,p,d);continue;case"xlinkRole":is(t,L,"xlink:role",O,p,d);continue;case"xlinkShow":is(t,L,"xlink:show",O,p,d);continue;case"xlinkTitle":is(t,L,"xlink:title",O,p,d);continue;case"xlinkType":is(t,L,"xlink:type",O,p,d);continue;case"xmlBase":is(t,L,"xml:base",O,p,d);continue;case"xmlLang":is(t,L,"xml:lang",O,p,d);continue;case"xmlSpace":is(t,L,"xml:space",O,p,d);continue;case"inert":O!==""||Eg[L]||(Eg[L]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",L)),_C(t,L,L,O,p,d);continue;default:if(!(2<L.length)||L[0]!=="o"&&L[0]!=="O"||L[1]!=="n"&&L[1]!=="N"){C=Gp(L),T=!1,l.context===_r&&n!=="svg"&&n!=="math"?p.delete(C.toLowerCase()):(J=L.toLowerCase(),J=Ym.hasOwnProperty(J)&&Ym[J]||null,J!==null&&J!==L&&(T=!0,p.delete(J)),p.delete(C));e:if(J=t,ne=C,C=O,Qe(ne))if(J.hasAttribute(ne))J=J.getAttribute(ne),me(C,ne),C=J===""+C?C:J;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(J=ne.toLowerCase().slice(0,5),J!=="data-"&&J!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;T||_i(L,C,O,d)}}}return 0<p.size&&r.suppressHydrationWarning!==!0&&bM(t,p,d),Object.keys(d).length===0?null:d}function TM(t,n){switch(t.length){case 0:return"";case 1:return t[0];case 2:return t[0]+" "+n+" "+t[1];default:return t.slice(0,-1).join(", ")+", "+n+" "+t[t.length-1]}}function Mm(t){return t.nodeType===9?t:t.ownerDocument}function xC(t){switch(t){case mc:return Gc;case Xm:return wg;default:return _r}}function EC(t,n){if(t===_r)switch(n){case"svg":return Gc;case"math":return wg;default:return _r}return t===Gc&&n==="foreignObject"?_r:t}function $v(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}function SM(){var t=window.event;return t&&t.type==="popstate"?t===T_?!1:(T_=t,!0):(T_=null,!1)}function xM(t){setTimeout(function(){throw t})}function EM(t,n,r){switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&t.focus();break;case"img":r.src?t.src=r.src:r.srcSet&&(t.srcset=r.srcSet)}}function CM(t,n,r,l){_M(t,n,r,l),t[xn]=l}function CC(t){Ga(t,"")}function AM(t,n,r){t.nodeValue=r}function no(t){return t==="head"}function wM(t,n){t.removeChild(n)}function DM(t,n){(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).removeChild(n)}function AC(t,n){var r=n,l=0,d=0;do{var p=r.nextSibling;if(t.removeChild(r),p&&p.nodeType===8)if(r=p.data,r===Ag){if(0<l&&8>l){r=l;var T=t.ownerDocument;if(r&L6&&Uh(T.documentElement),r&I6&&Uh(T.body),r&P6)for(r=T.head,Uh(r),T=r.firstChild;T;){var C=T.nextSibling,O=T.nodeName;T[qh]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&T.rel.toLowerCase()==="stylesheet"||r.removeChild(T),T=C}}if(d===0){t.removeChild(p),jh(n);return}d--}else r===Cg||r===br||r===Cf?d++:l=r.charCodeAt(0)-48;else l=0;r=p}while(r);jh(n)}function kM(t){t=t.style,typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function OM(t){t.nodeValue=""}function RM(t,n){n=n[N6],n=n!=null&&n.hasOwnProperty("display")?n.display:null,t.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function MM(t,n){t.nodeValue=n}function Gv(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Gv(r),Zs(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function LM(t,n,r,l){for(;t.nodeType===1;){var d=r;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[qh])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){me(d.name,"name");var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=ns(t.nextSibling),t===null)break}return null}function IM(t,n,r){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=ns(t.nextSibling),t===null))return null;return t}function Xv(t){return t.data===Cf||t.data===br&&t.ownerDocument.readyState===rD}function PM(t,n){var r=t.ownerDocument;if(t.data!==br||r.readyState===rD)n();else{var l=function(){n(),r.removeEventListener("DOMContentLoaded",l)};r.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function ns(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n===Cg||n===Cf||n===br||n===v_||n===aD)break;if(n===Ag)return null}}return t}function wC(t){if(t.nodeType===1){for(var n=t.nodeName.toLowerCase(),r={},l=t.attributes,d=0;d<l.length;d++){var p=l[d];r[vC(p.name)]=p.name.toLowerCase()==="style"?zv(t):p.value}return{type:n,props:r}}return t.nodeType===8?{type:"Suspense",props:{}}:t.nodeValue}function DC(t,n,r){return r===null||r[M6]!==!0?(t.nodeValue===n?t=null:(n=io(n),t=io(t.nodeValue)===n?null:t.nodeValue),t):null}function kC(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var r=t.data;if(r===Ag){if(n===0)return ns(t.nextSibling);n--}else r!==Cg&&r!==Cf&&r!==br||n++}t=t.nextSibling}return null}function OC(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var r=t.data;if(r===Cg||r===Cf||r===br){if(n===0)return t;n--}else r===Ag&&n++}t=t.previousSibling}return null}function NM(t){jh(t)}function UM(t){jh(t)}function RC(t,n,r,l,d){switch(d&&Hr(t,l.ancestorInfo),n=Mm(r),t){case"html":if(t=n.documentElement,!t)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"head":if(t=n.head,!t)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return t;case"body":if(t=n.body,!t)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return t;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function BM(t,n,r,l){if(!r[lo]&&Ln(r)){var d=r.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",d,d,d)}switch(t){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(d=r.attributes;d.length;)r.removeAttributeNode(d[0]);Ri(r,t,n),r[Gi]=l,r[xn]=n}function Uh(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Zs(t)}function Lm(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function MC(t,n,r){var l=Xc;if(l&&typeof n=="string"&&n){var d=si(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),hD.has(d)||(hD.add(d),t={rel:t,crossOrigin:r,href:n},l.querySelector(d)===null&&(n=l.createElement("link"),Ri(n,"link",t),X(n),l.head.appendChild(n)))}}function LC(t,n,r,l){var d=(d=ro.current)?Lm(d):null;if(!d)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(r=lc(r.href),n=D(d).hoistableStyles,l=n.get(r),l||(l={type:"style",instance:null,count:0,state:null},n.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=lc(r.href);var p=D(d).hoistableStyles,T=p.get(t);if(!T&&(d=d.ownerDocument||d,T={type:"stylesheet",instance:null,count:0,state:{loading:Bl,preload:null}},p.set(t,T),(p=d.querySelector(Bh(t)))&&!p._p&&(T.instance=p,T.state.loading=Af|ps),!ms.has(t))){var C={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy};ms.set(t,C),p||FM(d,t,C,T.state)}if(n&&l===null)throw r=`
- `+Im(n)+`
+ `+Im(r),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+r);return T}if(n&&l!==null)throw r=`
- `+Im(n)+`
+ `+Im(r),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+r);return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(r=uc(r),n=D(d).hoistableScripts,l=n.get(r),l||(l={type:"script",instance:null,count:0,state:null},n.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+t+'". this is a bug in React.')}}function Im(t){var n=0,r="<link";return typeof t.rel=="string"?(n++,r+=' rel="'+t.rel+'"'):ur.call(t,"rel")&&(n++,r+=' rel="'+(t.rel===null?"null":"invalid type "+typeof t.rel)+'"'),typeof t.href=="string"?(n++,r+=' href="'+t.href+'"'):ur.call(t,"href")&&(n++,r+=' href="'+(t.href===null?"null":"invalid type "+typeof t.href)+'"'),typeof t.precedence=="string"?(n++,r+=' precedence="'+t.precedence+'"'):ur.call(t,"precedence")&&(n++,r+=" precedence={"+(t.precedence===null?"null":"invalid type "+typeof t.precedence)+"}"),Object.getOwnPropertyNames(t).length>n&&(r+=" ..."),r+" />"}function lc(t){return'href="'+si(t)+'"'}function Bh(t){return'link[rel="stylesheet"]['+t+"]"}function IC(t){return Je({},t,{"data-precedence":t.precedence,precedence:null})}function FM(t,n,r,l){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=Af:(n=t.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=Af}),n.addEventListener("error",function(){return l.loading|=cD}),Ri(n,"link",r),X(n),t.head.appendChild(n))}function uc(t){return'[src="'+si(t)+'"]'}function Fh(t){return"script[async]"+t}function PC(t,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var l=t.querySelector('style[data-href~="'+si(r.href)+'"]');if(l)return n.instance=l,X(l),l;var d=Je({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),X(l),Ri(l,"style",d),Pm(l,r.precedence,t),n.instance=l;case"stylesheet":d=lc(r.href);var p=t.querySelector(Bh(d));if(p)return n.state.loading|=ps,n.instance=p,X(p),p;l=IC(r),(d=ms.get(d))&&Yv(l,d),p=(t.ownerDocument||t).createElement("link"),X(p);var T=p;return T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),Ri(p,"link",l),n.state.loading|=ps,Pm(p,r.precedence,t),n.instance=p;case"script":return p=uc(r.src),(d=t.querySelector(Fh(p)))?(n.instance=d,X(d),d):(l=r,(d=ms.get(p))&&(l=Je({},r),Wv(l,d)),t=t.ownerDocument||t,d=t.createElement("script"),X(d),Ri(d,"link",l),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+n.type+'". this is a bug in React.')}else n.type==="stylesheet"&&(n.state.loading&ps)===Bl&&(l=n.instance,n.state.loading|=ps,Pm(l,r.precedence,t));return n.instance}function Pm(t,n,r){for(var l=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,p=d,T=0;T<l.length;T++){var C=l[T];if(C.dataset.precedence===n)p=C;else if(p!==d)break}p?p.parentNode.insertBefore(t,p.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(t,n.firstChild))}function Yv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Wv(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}function NC(t,n,r){if(Dg===null){var l=new Map,d=Dg=new Map;d.set(r,l)}else d=Dg,l=d.get(r),l||(l=new Map,d.set(r,l));if(l.has(t))return l;for(l.set(t,null),r=r.getElementsByTagName(t),d=0;d<r.length;d++){var p=r[d];if(!(p[qh]||p[Gi]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!==mc){var T=p.getAttribute(n)||"";T=t+T;var C=l.get(T);C?C.push(p):l.set(T,[p])}}return l}function UC(t,n,r){t=t.ownerDocument||t,t.head.insertBefore(r,n==="title"?t.querySelector("head > title"):null)}function HM(t,n,r){var l=!r.ancestorInfo.containerTagInScope;if(r.context===Gc||n.itemProp!=null)return!l||n.itemProp==null||t!=="meta"&&t!=="title"&&t!=="style"&&t!=="link"&&t!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",t,t),!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href===""){l&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError){if(n.rel==="stylesheet"&&typeof n.precedence=="string"){t=n.href;var d=n.onError,p=n.disabled;r=[],n.onLoad&&r.push("`onLoad`"),d&&r.push("`onError`"),p!=null&&r.push("`disabled`"),d=TM(r,"and"),d+=r.length===1?" prop":" props",p=r.length===1?"an "+d:"the "+d,r.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',t,p,d)}l&&(typeof n.rel!="string"||typeof n.href!="string"||n.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(n.onError||n.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(n.rel){case"stylesheet":return t=n.precedence,n=n.disabled,typeof t!="string"&&l&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof t=="string"&&n==null;default:return!0}case"script":if(t=n.async&&typeof n.async!="function"&&typeof n.async!="symbol",!t||n.onLoad||n.onError||!n.src||typeof n.src!="string"){l&&(t?n.onLoad||n.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":l&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",t)}return!1}function BC(t){return!(t.type==="stylesheet"&&(t.state.loading&dD)===Bl)}function jM(){}function zM(t,n,r){if(wf===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var l=wf;if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&ps)===Bl){if(n.instance===null){var d=lc(r.href),p=t.querySelector(Bh(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Nm.bind(l),t.then(l,l)),n.state.loading|=ps,n.instance=p,X(p);return}p=t.ownerDocument||t,r=IC(r),(d=ms.get(d))&&Yv(r,d),p=p.createElement("link"),X(p);var T=p;T._p=new Promise(function(C,O){T.onload=C,T.onerror=O}),Ri(p,"link",r),n.instance=p}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&dD)===Bl&&(l.count++,n=Nm.bind(l),t.addEventListener("load",n),t.addEventListener("error",n))}}function VM(){if(wf===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var t=wf;return t.stylesheets&&t.count===0&&Qv(t,t.stylesheets),0<t.count?function(n){var r=setTimeout(function(){if(t.stylesheets&&Qv(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(r)}}:null}function Nm(){if(this.count--,this.count===0){if(this.stylesheets)Qv(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function Qv(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,kg=new Map,n.forEach(qM,t),kg=null,Nm.call(t))}function qM(t,n){if(!(n.state.loading&ps)){var r=kg.get(t);if(r)var l=r.get(x_);else{r=new Map,kg.set(t,r);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var T=d[p];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(r.set(T.dataset.precedence,T),l=T)}l&&r.set(x_,l)}d=n.instance,T=d.getAttribute("data-precedence"),p=r.get(T)||l,p===l&&r.set(x_,d),r.set(T,d),this.count++,l=Nm.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),p?p.parentNode.insertBefore(d,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=ps}}function $M(t,n,r,l,d,p,T,C){for(this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ul,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ws(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ws(0),this.hiddenUpdates=Ws(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,t=this.pendingUpdatersLaneMap=[],n=0;31>n;n++)t.push(new Set);this._debugRootType=r?"hydrateRoot()":"createRoot()"}function FC(t,n,r,l,d,p,T,C,O,L,J,ne){return t=new $M(t,n,r,T,C,O,L,ne),n=l6,p===!0&&(n|=Xi|Ms),Rs&&(n|=Li),p=A(3,null,null,n),t.current=p,p.stateNode=t,n=th(),Za(n),t.pooledCache=n,Za(n),p.memoizedState={element:l,isDehydrated:r,cache:n},cl(p),t}function HC(t){return t?(t=co,t):co}function Kv(t,n,r,l,d,p){if($i&&typeof $i.onScheduleFiberRoot=="function")try{$i.onScheduleFiberRoot(fc,l,r)}catch(T){Ta||(Ta=!0,console.error("React instrumentation encountered an error: %s",T))}Ee!==null&&typeof Ee.markRenderScheduled=="function"&&Ee.markRenderScheduled(n),d=HC(d),l.context===null?l.context=d:l.pendingContext=d,xa&&Vn!==null&&!gD&&(gD=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
Check the render method of %s.`,ue(Vn)||"Unknown")),l=Tn(n),l.payload={element:r},p=p===void 0?null:p,p!==null&&(typeof p!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",p),l.callback=p),r=ca(t,l,n),r!==null&&(ei(r,t,n),$r(r,t,n))}function jC(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<n?r:n}}function Zv(t,n){jC(t,n),(t=t.alternate)&&jC(t,n)}function zC(t){if(t.tag===13){var n=ui(t,67108864);n!==null&&ei(n,t,67108864),Zv(t,67108864)}}function GM(){return Vn}function XM(){for(var t=new Map,n=1,r=0;31>r;r++){var l=Kt(n);t.set(n,l),n*=2}return t}function YM(t,n,r,l){var d=ie.T;ie.T=null;var p=gt.p;try{gt.p=ss,Jv(t,n,r,l)}finally{gt.p=p,ie.T=d}}function WM(t,n,r,l){var d=ie.T;ie.T=null;var p=gt.p;try{gt.p=Sa,Jv(t,n,r,l)}finally{gt.p=p,ie.T=d}}function Jv(t,n,r,l){if(Rg){var d=eb(l);if(d===null)Fv(t,n,l,Mg,r),qC(t,l);else if(QM(d,t,n,r,l))l.stopPropagation();else if(qC(t,l),n&4&&-1<H6.indexOf(t)){for(;d!==null;){var p=Ln(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var T=ct(p.pendingLanes);if(T!==0){var C=p;for(C.pendingLanes|=2,C.entangledLanes|=2;T;){var O=1<<31-nn(T);C.entanglements[1]|=O,T&=~O}ya(p),(yt&(ln|Ns))===qn&&(mg=_a()+Yw,Ph(0,!1))}}break;case 13:C=ui(p,2),C!==null&&ei(C,p,2),sc(),Zv(p,2)}if(p=eb(l),p===null&&Fv(t,n,l,Mg,r),p===d)break;d=p}d!==null&&l.stopPropagation()}else Fv(t,n,l,null,r)}}function eb(t){return t=Nu(t),tb(t)}function tb(t){if(Mg=null,t=Vi(t),t!==null){var n=I(t);if(n===null)t=null;else{var r=n.tag;if(r===13){if(t=G(n),t!==null)return t;t=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Mg=t,null}function VC(t){switch(t){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 ss;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 Sa;case"message":switch(oL()){case hb:return ss;case fb:return Sa;case hc:case lL:return cr;case pb:return $m;default:return cr}default:return cr}}function qC(t,n){switch(t){case"focusin":case"focusout":To=null;break;case"dragenter":case"dragleave":So=null;break;case"mouseover":case"mouseout":xo=null;break;case"pointerover":case"pointerout":kf.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Of.delete(n.pointerId)}}function Hh(t,n,r,l,d,p){return t===null||t.nativeEvent!==p?(t={blockedOn:n,domEventName:r,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},n!==null&&(n=Ln(n),n!==null&&zC(n)),t):(t.eventSystemFlags|=l,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function QM(t,n,r,l,d){switch(n){case"focusin":return To=Hh(To,t,n,r,l,d),!0;case"dragenter":return So=Hh(So,t,n,r,l,d),!0;case"mouseover":return xo=Hh(xo,t,n,r,l,d),!0;case"pointerover":var p=d.pointerId;return kf.set(p,Hh(kf.get(p)||null,t,n,r,l,d)),!0;case"gotpointercapture":return p=d.pointerId,Of.set(p,Hh(Of.get(p)||null,t,n,r,l,d)),!0}return!1}function $C(t){var n=Vi(t.target);if(n!==null){var r=I(n);if(r!==null){if(n=r.tag,n===13){if(n=G(r),n!==null){t.blockedOn=n,dt(t.priority,function(){if(r.tag===13){var l=jn(r);l=Ks(l);var d=ui(r,l);d!==null&&ei(d,r,l),Zv(r,l)}});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Um(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var r=eb(t.nativeEvent);if(r===null){r=t.nativeEvent;var l=new r.constructor(r.type,r),d=l;Gh!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Gh=d,r.target.dispatchEvent(l),Gh===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),Gh=null}else return n=Ln(r),n!==null&&zC(n),t.blockedOn=r,!1;n.shift()}return!0}function GC(t,n,r){Um(t)&&r.delete(n)}function KM(){E_=!1,To!==null&&Um(To)&&(To=null),So!==null&&Um(So)&&(So=null),xo!==null&&Um(xo)&&(xo=null),kf.forEach(GC),Of.forEach(GC)}function Bm(t,n){t.blockedOn===n&&(t.blockedOn=null,E_||(E_=!0,ai.unstable_scheduleCallback(ai.unstable_NormalPriority,KM)))}function XC(t){Lg!==t&&(Lg=t,ai.unstable_scheduleCallback(ai.unstable_NormalPriority,function(){Lg===t&&(Lg=null);for(var n=0;n<t.length;n+=3){var r=t[n],l=t[n+1],d=t[n+2];if(typeof l!="function"){if(tb(l||r)===null)continue;break}var p=Ln(r);p!==null&&(t.splice(n,3),n-=3,r={pending:!0,data:d,method:r.method,action:l},Object.freeze(r),tn(p,r,l,d))}}))}function jh(t){function n(O){return Bm(O,t)}To!==null&&Bm(To,t),So!==null&&Bm(So,t),xo!==null&&Bm(xo,t),kf.forEach(n),Of.forEach(n);for(var r=0;r<Eo.length;r++){var l=Eo[r];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Eo.length&&(r=Eo[0],r.blockedOn===null);)$C(r),r.blockedOn===null&&Eo.shift();if(r=(t.ownerDocument||t).$$reactFormReplay,r!=null)for(l=0;l<r.length;l+=3){var d=r[l],p=r[l+1],T=d[xn]||null;if(typeof p=="function")T||XC(r);else if(T){var C=null;if(p&&p.hasAttribute("formAction")){if(d=p,T=p[xn]||null)C=T.formAction;else if(tb(d)!==null)continue}else C=T.action;typeof C=="function"?r[l+1]=C:(r.splice(l,3),l-=3),XC(r)}}}function ib(t){this._internalRoot=t}function Fm(t){this._internalRoot=t}function YC(t){t[lo]&&(t._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ai=OD(),nb=cn,ZM=MD(),Je=Object.assign,JM=Symbol.for("react.element"),so=Symbol.for("react.transitional.element"),cc=Symbol.for("react.portal"),dc=Symbol.for("react.fragment"),Hm=Symbol.for("react.strict_mode"),sb=Symbol.for("react.profiler"),eL=Symbol.for("react.provider"),ab=Symbol.for("react.consumer"),ba=Symbol.for("react.context"),zh=Symbol.for("react.forward_ref"),rb=Symbol.for("react.suspense"),ob=Symbol.for("react.suspense_list"),jm=Symbol.for("react.memo"),zn=Symbol.for("react.lazy"),lb=Symbol.for("react.activity"),tL=Symbol.for("react.memo_cache_sentinel"),WC=Symbol.iterator,iL=Symbol.for("react.client.reference"),Mi=Array.isArray,ie=nb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,gt=ZM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,nL=Object.freeze({pending:!1,data:null,method:null,action:null}),ub=[],cb=[],lr=-1,ao=Ie(null),Vh=Ie(null),ro=Ie(null),zm=Ie(null),ur=Object.prototype.hasOwnProperty,db=ai.unstable_scheduleCallback,sL=ai.unstable_cancelCallback,aL=ai.unstable_shouldYield,rL=ai.unstable_requestPaint,_a=ai.unstable_now,oL=ai.unstable_getCurrentPriorityLevel,hb=ai.unstable_ImmediatePriority,fb=ai.unstable_UserBlockingPriority,hc=ai.unstable_NormalPriority,lL=ai.unstable_LowPriority,pb=ai.unstable_IdlePriority,uL=ai.log,cL=ai.unstable_setDisableYieldValue,fc=null,$i=null,Ee=null,Ta=!1,Rs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",nn=Math.clz32?Math.clz32:zi,dL=Math.log,hL=Math.LN2,Vm=256,qm=4194304,ss=2,Sa=8,cr=32,$m=268435456,oo=Math.random().toString(36).slice(2),Gi="__reactFiber$"+oo,xn="__reactProps$"+oo,lo="__reactContainer$"+oo,mb="__reactEvents$"+oo,fL="__reactListeners$"+oo,pL="__reactHandles$"+oo,QC="__reactResources$"+oo,qh="__reactMarker$"+oo,KC=new Set,_l={},gb={},mL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},gL=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]*$"),ZC={},JC={},$h=0,eA,tA,iA,nA,sA,aA,rA;Ts.__reactDisabledLog=!0;var yb,oA,vb=!1,bb=new(typeof WeakMap=="function"?WeakMap:Map),Vn=null,xa=!1,yL=/[\n"\\]/g,lA=!1,uA=!1,cA=!1,dA=!1,hA=!1,fA=!1,pA=["value","defaultValue"],mA=!1,gA=/["'&<>\n\t]|^\s|\s$/,vL="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),yA="applet caption html table td th marquee object template foreignObject desc title".split(" "),bL=yA.concat(["button"]),_L="dd dt li option optgroup p rp rt".split(" "),vA={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Gm={},_b={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},bA=/([A-Z])/g,_A=/^ms-/,TL=/^(?:webkit|moz|o)[A-Z]/,SL=/^-ms-/,xL=/-(.)/g,TA=/;\s*$/,pc={},Tb={},SA=!1,xA=!1,EA=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(" ")),Xm="http://www.w3.org/1998/Math/MathML",mc="http://www.w3.org/2000/svg",EL=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"]]),Ym={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},CA={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},gc={},CL=RegExp("^(aria)-[: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]*$"),AL=RegExp("^(aria)[A-Z][: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]*$"),AA=!1,sn={},wA=/^on./,wL=/^on[^A-Z]/,DL=RegExp("^(aria)-[: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]*$"),kL=RegExp("^(aria)[A-Z][: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]*$"),OL=/^[\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,Gh=null,yc=null,vc=null,Sb=!1,Ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xb=!1;if(Ea)try{var Xh={};Object.defineProperty(Xh,"passive",{get:function(){xb=!0}}),window.addEventListener("test",Xh,Xh),window.removeEventListener("test",Xh,Xh)}catch{xb=!1}var uo=null,Eb=null,Wm=null,Tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qm=wi(Tl),Yh=Je({},Tl,{view:0,detail:0}),RL=wi(Yh),Cb,Ab,Wh,Km=Je({},Yh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Wh&&(Wh&&t.type==="mousemove"?(Cb=t.screenX-Wh.screenX,Ab=t.screenY-Wh.screenY):Ab=Cb=0,Wh=t),Cb)},movementY:function(t){return"movementY"in t?t.movementY:Ab}}),DA=wi(Km),ML=Je({},Km,{dataTransfer:0}),LL=wi(ML),IL=Je({},Yh,{relatedTarget:0}),wb=wi(IL),PL=Je({},Tl,{animationName:0,elapsedTime:0,pseudoElement:0}),NL=wi(PL),UL=Je({},Tl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),BL=wi(UL),FL=Je({},Tl,{data:0}),kA=wi(FL),HL=kA,jL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zL={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"},VL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},qL=Je({},Yh,{key:function(t){if(t.key){var n=jL[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Uu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?zL[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(t){return t.type==="keypress"?Uu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Uu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),$L=wi(qL),GL=Je({},Km,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OA=wi(GL),XL=Je({},Yh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),YL=wi(XL),WL=Je({},Tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),QL=wi(WL),KL=Je({},Km,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),ZL=wi(KL),JL=Je({},Tl,{newState:0,oldState:0}),e6=wi(JL),t6=[9,13,27,32],RA=229,Db=Ea&&"CompositionEvent"in window,Qh=null;Ea&&"documentMode"in document&&(Qh=document.documentMode);var i6=Ea&&"TextEvent"in window&&!Qh,MA=Ea&&(!Db||Qh&&8<Qh&&11>=Qh),LA=32,IA=String.fromCharCode(LA),PA=!1,bc=!1,n6={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},Kh=null,Zh=null,NA=!1;Ea&&(NA=Xy("input")&&(!document.documentMode||9<document.documentMode));var an=typeof Object.is=="function"?Object.is:Ko,s6=Ea&&"documentMode"in document&&11>=document.documentMode,_c=null,kb=null,Jh=null,Ob=!1,Tc={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionrun:Xa("Transition","TransitionRun"),transitionstart:Xa("Transition","TransitionStart"),transitioncancel:Xa("Transition","TransitionCancel"),transitionend:Xa("Transition","TransitionEnd")},Rb={},UA={};Ea&&(UA=document.createElement("div").style,"AnimationEvent"in window||(delete Tc.animationend.animation,delete Tc.animationiteration.animation,delete Tc.animationstart.animation),"TransitionEvent"in window||delete Tc.transitionend.transition);var BA=Ya("animationend"),FA=Ya("animationiteration"),HA=Ya("animationstart"),a6=Ya("transitionrun"),r6=Ya("transitionstart"),o6=Ya("transitioncancel"),jA=Ya("transitionend"),zA=new Map,Mb="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(" ");Mb.push("scrollEnd");var Lb=new WeakMap,Zm=1,dr=2,as=[],Sc=0,Ib=0,co={};Object.freeze(co);var rs=null,xc=null,It=0,l6=1,Li=2,Xi=8,Ms=16,VA=64,qA=!1;try{var $A=Object.preventExtensions({})}catch{qA=!0}var Ec=[],Cc=0,Jm=null,eg=0,os=[],ls=0,Sl=null,hr=1,fr="",rn=null,Xt=null,lt=!1,pr=!1,us=null,xl=null,Ca=!1,Pb=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),GA=0;if(typeof performance=="object"&&typeof performance.now=="function")var u6=performance,XA=function(){return u6.now()};else{var c6=Date;XA=function(){return c6.now()}}var Nb=Ie(null),Ub=Ie(null),YA={},tg=null,Ac=null,wc=!1,d6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(r,l){t.push(l)}};this.abort=function(){n.aborted=!0,t.forEach(function(r){return r()})}},h6=ai.unstable_scheduleCallback,f6=ai.unstable_NormalPriority,di={$$typeof:ba,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Dc=ai.unstable_now,WA=-0,ig=-0,En=-1.1,El=-0,ng=!1,sg=!1,ef=null,Bb=0,Cl=0,kc=null,QA=ie.S;ie.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&ih(t,n),QA!==null&&QA(t,n)};var Al=Ie(null),Ls={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},tf=[],nf=[],sf=[],af=[],rf=[],of=[],wl=new Set;Ls.recordUnsafeLifecycleWarnings=function(t,n){wl.has(t.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&tf.push(t),t.mode&Xi&&typeof n.UNSAFE_componentWillMount=="function"&&nf.push(t),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&sf.push(t),t.mode&Xi&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&af.push(t),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&rf.push(t),t.mode&Xi&&typeof n.UNSAFE_componentWillUpdate=="function"&&of.push(t))},Ls.flushPendingUnsafeLifecycleWarnings=function(){var t=new Set;0<tf.length&&(tf.forEach(function(C){t.add(ue(C)||"Component"),wl.add(C.type)}),tf=[]);var n=new Set;0<nf.length&&(nf.forEach(function(C){n.add(ue(C)||"Component"),wl.add(C.type)}),nf=[]);var r=new Set;0<sf.length&&(sf.forEach(function(C){r.add(ue(C)||"Component"),wl.add(C.type)}),sf=[]);var l=new Set;0<af.length&&(af.forEach(function(C){l.add(ue(C)||"Component"),wl.add(C.type)}),af=[]);var d=new Set;0<rf.length&&(rf.forEach(function(C){d.add(ue(C)||"Component"),wl.add(C.type)}),rf=[]);var p=new Set;if(0<of.length&&(of.forEach(function(C){p.add(ue(C)||"Component"),wl.add(C.type)}),of=[]),0<n.size){var T=E(n);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
Please update the following components: %s`,T)}0<l.size&&(T=E(l),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
Please update the following components: %s`,T)),0<p.size&&(T=E(p),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
Please update the following components: %s`,T)),0<t.size&&(T=E(t),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,T)),0<r.size&&(T=E(r),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,T)),0<d.size&&(T=E(d),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
Please update the following components: %s`,T))};var ag=new Map,KA=new Set;Ls.recordLegacyContextWarning=function(t,n){for(var r=null,l=t;l!==null;)l.mode&Xi&&(r=l),l=l.return;r===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!KA.has(t.type)&&(l=ag.get(r),t.type.contextTypes!=null||t.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(l===void 0&&(l=[],ag.set(r,l)),l.push(t))},Ls.flushLegacyContextWarning=function(){ag.forEach(function(t){if(t.length!==0){var n=t[0],r=new Set;t.forEach(function(d){r.add(ue(d)||"Component"),KA.add(d.type)});var l=E(r);Re(n,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
Please update the following components: %s
Learn more about this warning here: https://react.dev/link/legacy-context`,l)})}})},Ls.discardPendingWarnings=function(){tf=[],nf=[],sf=[],af=[],rf=[],of=[],ag=new Map};var lf=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),ZA=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),rg=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Fb={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},uf=null,og=!1,cs=0,ds=1,on=2,Ii=4,hi=8,JA=0,ew=1,tw=2,Hb=3,ho=!1,iw=!1,jb=null,zb=!1,Oc=Ie(null),lg=Ie(0),Rc,nw=new Set,sw=new Set,Vb=new Set,aw=new Set,fo=0,ze=null,Dt=null,ri=null,ug=!1,Mc=!1,Dl=!1,cg=0,cf=0,mr=null,p6=0,m6=25,te=null,hs=null,gr=-1,df=!1,dg={readContext:Lt,use:Un,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt},qb=null,rw=null,$b=null,ow=null,Aa=null,Is=null,hg=null;qb={readContext:function(t){return Lt(t)},use:Un,useCallback:function(t,n){return te="useCallback",Ze(),Gr(n),Gt(t,n)},useContext:function(t){return te="useContext",Ze(),Lt(t)},useEffect:function(t,n){return te="useEffect",Ze(),Gr(n),ee(t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",Ze(),Gr(r),Ne(t,n,r)},useInsertionEffect:function(t,n){te="useInsertionEffect",Ze(),Gr(n),U(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",Ze(),Gr(n),_e(t,n)},useMemo:function(t,n){te="useMemo",Ze(),Gr(n);var r=ie.H;ie.H=Aa;try{return ts(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",Ze();var l=ie.H;ie.H=Aa;try{return bh(t,n,r)}finally{ie.H=l}},useRef:function(t){return te="useRef",Ze(),P(t)},useState:function(t){te="useState",Ze();var n=ie.H;ie.H=Aa;try{return Sn(t)}finally{ie.H=n}},useDebugValue:function(){te="useDebugValue",Ze()},useDeferredValue:function(t,n){return te="useDeferredValue",Ze(),tr(t,n)},useTransition:function(){return te="useTransition",Ze(),iv()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",Ze(),gl(t,n,r)},useId:function(){return te="useId",Ze(),nv()},useFormState:function(t,n){return te="useFormState",Ze(),Ju(),g(t,n)},useActionState:function(t,n){return te="useActionState",Ze(),g(t,n)},useOptimistic:function(t){return te="useOptimistic",Ze(),Sh(t)},useHostTransitionStatus:yl,useMemoCache:es,useCacheRefresh:function(){return te="useCacheRefresh",Ze(),sv()}},rw={readContext:function(t){return Lt(t)},use:Un,useCallback:function(t,n){return te="useCallback",ge(),Gt(t,n)},useContext:function(t){return te="useContext",ge(),Lt(t)},useEffect:function(t,n){return te="useEffect",ge(),ee(t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",ge(),Ne(t,n,r)},useInsertionEffect:function(t,n){te="useInsertionEffect",ge(),U(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",ge(),_e(t,n)},useMemo:function(t,n){te="useMemo",ge();var r=ie.H;ie.H=Aa;try{return ts(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",ge();var l=ie.H;ie.H=Aa;try{return bh(t,n,r)}finally{ie.H=l}},useRef:function(t){return te="useRef",ge(),P(t)},useState:function(t){te="useState",ge();var n=ie.H;ie.H=Aa;try{return Sn(t)}finally{ie.H=n}},useDebugValue:function(){te="useDebugValue",ge()},useDeferredValue:function(t,n){return te="useDeferredValue",ge(),tr(t,n)},useTransition:function(){return te="useTransition",ge(),iv()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",ge(),gl(t,n,r)},useId:function(){return te="useId",ge(),nv()},useActionState:function(t,n){return te="useActionState",ge(),g(t,n)},useFormState:function(t,n){return te="useFormState",ge(),Ju(),g(t,n)},useOptimistic:function(t){return te="useOptimistic",ge(),Sh(t)},useHostTransitionStatus:yl,useMemoCache:es,useCacheRefresh:function(){return te="useCacheRefresh",ge(),sv()}},$b={readContext:function(t){return Lt(t)},use:Un,useCallback:function(t,n){return te="useCallback",ge(),bi(t,n)},useContext:function(t){return te="useContext",ge(),Lt(t)},useEffect:function(t,n){te="useEffect",ge(),V(2048,hi,t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",ge(),Fe(t,n,r)},useInsertionEffect:function(t,n){return te="useInsertionEffect",ge(),V(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",ge(),V(4,Ii,t,n)},useMemo:function(t,n){te="useMemo",ge();var r=ie.H;ie.H=Is;try{return fa(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",ge();var l=ie.H;ie.H=Is;try{return Yr(t,n,r)}finally{ie.H=l}},useRef:function(){return te="useRef",ge(),ft().memoizedState},useState:function(){te="useState",ge();var t=ie.H;ie.H=Is;try{return Yr(Bn)}finally{ie.H=t}},useDebugValue:function(){te="useDebugValue",ge()},useDeferredValue:function(t,n){return te="useDeferredValue",ge(),Wr(t,n)},useTransition:function(){return te="useTransition",ge(),qx()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",ge(),ec(t,n,r)},useId:function(){return te="useId",ge(),ft().memoizedState},useFormState:function(t){return te="useFormState",ge(),Ju(),y(t)},useActionState:function(t){return te="useActionState",ge(),y(t)},useOptimistic:function(t,n){return te="useOptimistic",ge(),xh(t,n)},useHostTransitionStatus:yl,useMemoCache:es,useCacheRefresh:function(){return te="useCacheRefresh",ge(),ft().memoizedState}},ow={readContext:function(t){return Lt(t)},use:Un,useCallback:function(t,n){return te="useCallback",ge(),bi(t,n)},useContext:function(t){return te="useContext",ge(),Lt(t)},useEffect:function(t,n){te="useEffect",ge(),V(2048,hi,t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",ge(),Fe(t,n,r)},useInsertionEffect:function(t,n){return te="useInsertionEffect",ge(),V(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",ge(),V(4,Ii,t,n)},useMemo:function(t,n){te="useMemo",ge();var r=ie.H;ie.H=hg;try{return fa(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",ge();var l=ie.H;ie.H=hg;try{return ml(t,n,r)}finally{ie.H=l}},useRef:function(){return te="useRef",ge(),ft().memoizedState},useState:function(){te="useState",ge();var t=ie.H;ie.H=hg;try{return ml(Bn)}finally{ie.H=t}},useDebugValue:function(){te="useDebugValue",ge()},useDeferredValue:function(t,n){return te="useDeferredValue",ge(),Qr(t,n)},useTransition:function(){return te="useTransition",ge(),$x()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",ge(),ec(t,n,r)},useId:function(){return te="useId",ge(),ft().memoizedState},useFormState:function(t){return te="useFormState",ge(),Ju(),x(t)},useActionState:function(t){return te="useActionState",ge(),x(t)},useOptimistic:function(t,n){return te="useOptimistic",ge(),dm(t,n)},useHostTransitionStatus:yl,useMemoCache:es,useCacheRefresh:function(){return te="useCacheRefresh",ge(),ft().memoizedState}},Aa={readContext:function(t){return b(),Lt(t)},use:function(t){return m(),Un(t)},useCallback:function(t,n){return te="useCallback",m(),Ze(),Gt(t,n)},useContext:function(t){return te="useContext",m(),Ze(),Lt(t)},useEffect:function(t,n){return te="useEffect",m(),Ze(),ee(t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",m(),Ze(),Ne(t,n,r)},useInsertionEffect:function(t,n){te="useInsertionEffect",m(),Ze(),U(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",m(),Ze(),_e(t,n)},useMemo:function(t,n){te="useMemo",m(),Ze();var r=ie.H;ie.H=Aa;try{return ts(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",m(),Ze();var l=ie.H;ie.H=Aa;try{return bh(t,n,r)}finally{ie.H=l}},useRef:function(t){return te="useRef",m(),Ze(),P(t)},useState:function(t){te="useState",m(),Ze();var n=ie.H;ie.H=Aa;try{return Sn(t)}finally{ie.H=n}},useDebugValue:function(){te="useDebugValue",m(),Ze()},useDeferredValue:function(t,n){return te="useDeferredValue",m(),Ze(),tr(t,n)},useTransition:function(){return te="useTransition",m(),Ze(),iv()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",m(),Ze(),gl(t,n,r)},useId:function(){return te="useId",m(),Ze(),nv()},useFormState:function(t,n){return te="useFormState",m(),Ze(),g(t,n)},useActionState:function(t,n){return te="useActionState",m(),Ze(),g(t,n)},useOptimistic:function(t){return te="useOptimistic",m(),Ze(),Sh(t)},useMemoCache:function(t){return m(),es(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return te="useCacheRefresh",Ze(),sv()}},Is={readContext:function(t){return b(),Lt(t)},use:function(t){return m(),Un(t)},useCallback:function(t,n){return te="useCallback",m(),ge(),bi(t,n)},useContext:function(t){return te="useContext",m(),ge(),Lt(t)},useEffect:function(t,n){te="useEffect",m(),ge(),V(2048,hi,t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",m(),ge(),Fe(t,n,r)},useInsertionEffect:function(t,n){return te="useInsertionEffect",m(),ge(),V(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",m(),ge(),V(4,Ii,t,n)},useMemo:function(t,n){te="useMemo",m(),ge();var r=ie.H;ie.H=Is;try{return fa(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",m(),ge();var l=ie.H;ie.H=Is;try{return Yr(t,n,r)}finally{ie.H=l}},useRef:function(){return te="useRef",m(),ge(),ft().memoizedState},useState:function(){te="useState",m(),ge();var t=ie.H;ie.H=Is;try{return Yr(Bn)}finally{ie.H=t}},useDebugValue:function(){te="useDebugValue",m(),ge()},useDeferredValue:function(t,n){return te="useDeferredValue",m(),ge(),Wr(t,n)},useTransition:function(){return te="useTransition",m(),ge(),qx()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",m(),ge(),ec(t,n,r)},useId:function(){return te="useId",m(),ge(),ft().memoizedState},useFormState:function(t){return te="useFormState",m(),ge(),y(t)},useActionState:function(t){return te="useActionState",m(),ge(),y(t)},useOptimistic:function(t,n){return te="useOptimistic",m(),ge(),xh(t,n)},useMemoCache:function(t){return m(),es(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return te="useCacheRefresh",ge(),ft().memoizedState}},hg={readContext:function(t){return b(),Lt(t)},use:function(t){return m(),Un(t)},useCallback:function(t,n){return te="useCallback",m(),ge(),bi(t,n)},useContext:function(t){return te="useContext",m(),ge(),Lt(t)},useEffect:function(t,n){te="useEffect",m(),ge(),V(2048,hi,t,n)},useImperativeHandle:function(t,n,r){return te="useImperativeHandle",m(),ge(),Fe(t,n,r)},useInsertionEffect:function(t,n){return te="useInsertionEffect",m(),ge(),V(4,on,t,n)},useLayoutEffect:function(t,n){return te="useLayoutEffect",m(),ge(),V(4,Ii,t,n)},useMemo:function(t,n){te="useMemo",m(),ge();var r=ie.H;ie.H=Is;try{return fa(t,n)}finally{ie.H=r}},useReducer:function(t,n,r){te="useReducer",m(),ge();var l=ie.H;ie.H=Is;try{return ml(t,n,r)}finally{ie.H=l}},useRef:function(){return te="useRef",m(),ge(),ft().memoizedState},useState:function(){te="useState",m(),ge();var t=ie.H;ie.H=Is;try{return ml(Bn)}finally{ie.H=t}},useDebugValue:function(){te="useDebugValue",m(),ge()},useDeferredValue:function(t,n){return te="useDeferredValue",m(),ge(),Qr(t,n)},useTransition:function(){return te="useTransition",m(),ge(),$x()},useSyncExternalStore:function(t,n,r){return te="useSyncExternalStore",m(),ge(),ec(t,n,r)},useId:function(){return te="useId",m(),ge(),ft().memoizedState},useFormState:function(t){return te="useFormState",m(),ge(),x(t)},useActionState:function(t){return te="useActionState",m(),ge(),x(t)},useOptimistic:function(t,n){return te="useOptimistic",m(),ge(),dm(t,n)},useMemoCache:function(t){return m(),es(t)},useHostTransitionStatus:yl,useCacheRefresh:function(){return te="useCacheRefresh",ge(),ft().memoizedState}};var lw={"react-stack-bottom-frame":function(t,n,r){var l=xa;xa=!0;try{return t(n,r)}finally{xa=l}}},Gb=lw["react-stack-bottom-frame"].bind(lw),uw={"react-stack-bottom-frame":function(t){var n=xa;xa=!0;try{return t.render()}finally{xa=n}}},cw=uw["react-stack-bottom-frame"].bind(uw),dw={"react-stack-bottom-frame":function(t,n){try{n.componentDidMount()}catch(r){At(t,t.return,r)}}},Xb=dw["react-stack-bottom-frame"].bind(dw),hw={"react-stack-bottom-frame":function(t,n,r,l,d){try{n.componentDidUpdate(r,l,d)}catch(p){At(t,t.return,p)}}},fw=hw["react-stack-bottom-frame"].bind(hw),pw={"react-stack-bottom-frame":function(t,n){var r=n.stack;t.componentDidCatch(n.value,{componentStack:r!==null?r:""})}},g6=pw["react-stack-bottom-frame"].bind(pw),mw={"react-stack-bottom-frame":function(t,n,r){try{r.componentWillUnmount()}catch(l){At(t,n,l)}}},gw=mw["react-stack-bottom-frame"].bind(mw),yw={"react-stack-bottom-frame":function(t){t.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",t.resourceKind);var n=t.create;return t=t.inst,n=n(),t.destroy=n}},y6=yw["react-stack-bottom-frame"].bind(yw),vw={"react-stack-bottom-frame":function(t,n,r){try{r()}catch(l){At(t,n,l)}}},v6=vw["react-stack-bottom-frame"].bind(vw),bw={"react-stack-bottom-frame":function(t){var n=t._init;return n(t._payload)}},po=bw["react-stack-bottom-frame"].bind(bw),Lc=null,hf=0,Ke=null,Yb,_w=Yb=!1,Tw={},Sw={},xw={};f=function(t,n,r){if(r!==null&&typeof r=="object"&&r._store&&(!r._store.validated&&r.key==null||r._store.validated===2)){if(typeof r._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");r._store.validated=1;var l=ue(t),d=l||"null";if(!Tw[d]){Tw[d]=!0,r=r._owner,t=t._debugOwner;var p="";t&&typeof t.tag=="number"&&(d=ue(t))&&(p=`
Check the render method of \``+d+"`."),p||l&&(p=`
Check the top-level render call using <`+l+">.");var T="";r!=null&&t!==r&&(l=null,typeof r.tag=="number"?l=ue(r):typeof r.name=="string"&&(l=r.name),l&&(T=" It was passed a child from "+l+".")),Re(n,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',p,T)})}}};var Ic=Wx(!0),Ew=Wx(!1),fs=Ie(null),wa=null,Pc=1,ff=2,fi=Ie(0),Cw={},Aw=new Set,ww=new Set,Dw=new Set,kw=new Set,Ow=new Set,Rw=new Set,Mw=new Set,Lw=new Set,Iw=new Set,Pw=new Set;Object.freeze(Cw);var Wb={enqueueSetState:function(t,n,r){t=t._reactInternals;var l=jn(t),d=Tn(l);d.payload=n,r!=null&&(rv(r),d.callback=r),n=ca(t,d,l),n!==null&&(ei(n,t,l),$r(n,t,l)),li(t,l)},enqueueReplaceState:function(t,n,r){t=t._reactInternals;var l=jn(t),d=Tn(l);d.tag=ew,d.payload=n,r!=null&&(rv(r),d.callback=r),n=ca(t,d,l),n!==null&&(ei(n,t,l),$r(n,t,l)),li(t,l)},enqueueForceUpdate:function(t,n){t=t._reactInternals;var r=jn(t),l=Tn(r);l.tag=tw,n!=null&&(rv(n),l.callback=n),n=ca(t,l,r),n!==null&&(ei(n,t,r),$r(n,t,r)),Ee!==null&&typeof Ee.markForceUpdateScheduled=="function"&&Ee.markForceUpdateScheduled(t,r)}},Qb=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Nc=null,Kb=null,Nw=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Ti=!1,Uw={},Bw={},Fw={},Hw={},Uc=!1,jw={},Zb={},Jb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},zw=!1,Vw=null;Vw=new Set;var yr=!1,ti=!1,e_=!1,qw=typeof WeakSet=="function"?WeakSet:Set,Si=null,Bc=null,Fc=null,oi=null,Cn=!1,Ps=null,pf=8192,b6={getCacheForType:function(t){var n=Lt(di),r=n.data.get(t);return r===void 0&&(r=t(),n.data.set(t,r)),r},getOwner:function(){return Vn}};if(typeof Symbol=="function"&&Symbol.for){var mf=Symbol.for;mf("selector.component"),mf("selector.has_pseudo_class"),mf("selector.role"),mf("selector.test_id"),mf("selector.text")}var _6=[],T6=typeof WeakMap=="function"?WeakMap:Map,qn=0,ln=2,Ns=4,vr=0,gf=1,Hc=2,t_=3,kl=4,fg=6,$w=5,yt=qn,Ot=null,tt=null,it=0,An=0,yf=1,Ol=2,vf=3,Gw=4,i_=5,jc=6,bf=7,n_=8,Rl=9,Tt=An,$n=null,mo=!1,zc=!1,s_=!1,Da=0,Yt=vr,go=0,yo=0,a_=0,Gn=0,Ml=0,_f=null,un=null,pg=!1,r_=0,Xw=300,mg=1/0,Yw=500,Tf=null,vo=null,S6=0,x6=1,E6=2,Ll=0,Ww=1,Qw=2,Kw=3,C6=4,o_=5,Pi=0,bo=null,Vc=null,_o=0,l_=0,u_=null,Zw=null,A6=50,Sf=0,c_=null,d_=!1,gg=!1,w6=50,Il=0,xf=null,qc=!1,yg=null,Jw=!1,eD=new Set,D6={},vg=null,$c=null,h_=!1,f_=!1,bg=!1,p_=!1,Pl=0,m_={};(function(){for(var t=0;t<Mb.length;t++){var n=Mb[t],r=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),Pn(r,"on"+n)}Pn(BA,"onAnimationEnd"),Pn(FA,"onAnimationIteration"),Pn(HA,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(a6,"onTransitionRun"),Pn(r6,"onTransitionStart"),Pn(o6,"onTransitionCancel"),Pn(jA,"onTransitionEnd")})(),Se("onMouseEnter",["mouseout","mouseover"]),Se("onMouseLeave",["mouseout","mouseover"]),Se("onPointerEnter",["pointerout","pointerover"]),Se("onPointerLeave",["pointerout","pointerover"]),ve("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ve("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ve("onBeforeInput",["compositionend","keypress","textInput","paste"]),ve("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ve("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ve("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ef="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(" "),g_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ef)),_g="_reactListening"+Math.random().toString(36).slice(2),tD=!1,iD=!1,Tg=!1,nD=!1,Sg=!1,xg=!1,sD=!1,Eg={},k6=/\r\n?/g,O6=/\u0000|\uFFFD/g,Nl="http://www.w3.org/1999/xlink",y_="http://www.w3.org/XML/1998/namespace",R6="javascript:throw new Error('React form unexpectedly submitted.')",M6="suppressHydrationWarning",Cg="$",Ag="/$",br="$?",Cf="$!",L6=1,I6=2,P6=4,v_="F!",aD="F",rD="complete",N6="style",_r=0,Gc=1,wg=2,b_=null,__=null,oD={dialog:!0,webview:!0},T_=null,lD=typeof setTimeout=="function"?setTimeout:void 0,U6=typeof clearTimeout=="function"?clearTimeout:void 0,Ul=-1,uD=typeof Promise=="function"?Promise:void 0,B6=typeof queueMicrotask=="function"?queueMicrotask:typeof uD<"u"?function(t){return uD.resolve(null).then(t).catch(xM)}:lD,S_=null,Bl=0,Af=1,cD=2,dD=3,ps=4,ms=new Map,hD=new Set,Tr=gt.d;gt.d={f:function(){var t=Tr.f(),n=sc();return t||n},r:function(t){var n=Ln(t);n!==null&&n.tag===5&&n.type==="form"?Vx(n):Tr.r(t)},D:function(t){Tr.D(t),MC("dns-prefetch",t,null)},C:function(t,n){Tr.C(t,n),MC("preconnect",t,n)},L:function(t,n,r){Tr.L(t,n,r);var l=Xc;if(l&&t&&n){var d='link[rel="preload"][as="'+si(n)+'"]';n==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+si(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+si(r.imageSizes)+'"]')):d+='[href="'+si(t)+'"]';var p=d;switch(n){case"style":p=lc(t);break;case"script":p=uc(t)}ms.has(p)||(t=Je({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:t,as:n},r),ms.set(p,t),l.querySelector(d)!==null||n==="style"&&l.querySelector(Bh(p))||n==="script"&&l.querySelector(Fh(p))||(n=l.createElement("link"),Ri(n,"link",t),X(n),l.head.appendChild(n)))}},m:function(t,n){Tr.m(t,n);var r=Xc;if(r&&t){var l=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+si(l)+'"][href="'+si(t)+'"]',p=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=uc(t)}if(!ms.has(p)&&(t=Je({rel:"modulepreload",href:t},n),ms.set(p,t),r.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Fh(p)))return}l=r.createElement("link"),Ri(l,"link",t),X(l),r.head.appendChild(l)}}},X:function(t,n){Tr.X(t,n);var r=Xc;if(r&&t){var l=D(r).hoistableScripts,d=uc(t),p=l.get(d);p||(p=r.querySelector(Fh(d)),p||(t=Je({src:t,async:!0},n),(n=ms.get(d))&&Wv(t,n),p=r.createElement("script"),X(p),Ri(p,"link",t),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}},S:function(t,n,r){Tr.S(t,n,r);var l=Xc;if(l&&t){var d=D(l).hoistableStyles,p=lc(t);n=n||"default";var T=d.get(p);if(!T){var C={loading:Bl,preload:null};if(T=l.querySelector(Bh(p)))C.loading=Af|ps;else{t=Je({rel:"stylesheet",href:t,"data-precedence":n},r),(r=ms.get(p))&&Yv(t,r);var O=T=l.createElement("link");X(O),Ri(O,"link",t),O._p=new Promise(function(L,J){O.onload=L,O.onerror=J}),O.addEventListener("load",function(){C.loading|=Af}),O.addEventListener("error",function(){C.loading|=cD}),C.loading|=ps,Pm(T,n,l)}T={type:"stylesheet",instance:T,count:1,state:C},d.set(p,T)}}},M:function(t,n){Tr.M(t,n);var r=Xc;if(r&&t){var l=D(r).hoistableScripts,d=uc(t),p=l.get(d);p||(p=r.querySelector(Fh(d)),p||(t=Je({src:t,async:!0,type:"module"},n),(n=ms.get(d))&&Wv(t,n),p=r.createElement("script"),X(p),Ri(p,"link",t),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},l.set(d,p))}}};var Xc=typeof document>"u"?null:document,Dg=null,wf=null,x_=null,kg=null,Fl=nL,Df={$$typeof:ba,Provider:null,Consumer:null,_currentValue:Fl,_currentValue2:Fl,_threadCount:0},fD="%c%s%c ",pD="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",mD="",Og=" ",F6=Function.prototype.bind,gD=!1,yD=null,vD=null,bD=null,_D=null,TD=null,SD=null,xD=null,ED=null,CD=null;yD=function(t,n,r,l){n=s(t,n),n!==null&&(r=e(n.memoizedState,r,0,l),n.memoizedState=r,n.baseState=r,t.memoizedProps=Je({},t.memoizedProps),r=ui(t,2),r!==null&&ei(r,t,2))},vD=function(t,n,r){n=s(t,n),n!==null&&(r=o(n.memoizedState,r,0),n.memoizedState=r,n.baseState=r,t.memoizedProps=Je({},t.memoizedProps),r=ui(t,2),r!==null&&ei(r,t,2))},bD=function(t,n,r,l){n=s(t,n),n!==null&&(r=i(n.memoizedState,r,l),n.memoizedState=r,n.baseState=r,t.memoizedProps=Je({},t.memoizedProps),r=ui(t,2),r!==null&&ei(r,t,2))},_D=function(t,n,r){t.pendingProps=e(t.memoizedProps,n,0,r),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ui(t,2),n!==null&&ei(n,t,2)},TD=function(t,n){t.pendingProps=o(t.memoizedProps,n,0),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ui(t,2),n!==null&&ei(n,t,2)},SD=function(t,n,r){t.pendingProps=i(t.memoizedProps,n,r),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=ui(t,2),n!==null&&ei(n,t,2)},xD=function(t){var n=ui(t,2);n!==null&&ei(n,t,2)},ED=function(t){c=t},CD=function(t){u=t};var Rg=!0,Mg=null,E_=!1,To=null,So=null,xo=null,kf=new Map,Of=new Map,Eo=[],H6="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(" "),Lg=null;if(Fm.prototype.render=ib.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var r=arguments;typeof r[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):H(r[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof r[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),r=t;var l=n.current,d=jn(l);Kv(l,d,r,n,null,null)},Fm.prototype.unmount=ib.prototype.unmount=function(){var t=arguments;if(typeof t[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),t=this._internalRoot,t!==null){this._internalRoot=null;var n=t.containerInfo;(yt&(ln|Ns))!==qn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Kv(t.current,2,null,t,null,null),sc(),n[lo]=null}},Fm.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ur();t={blockedOn:null,target:t,priority:n};for(var r=0;r<Eo.length&&n!==0&&n<Eo[r].priority;r++);Eo.splice(r,0,t),r===0&&$C(t)}},function(){var t=nb.version;if(t!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
- react: `+(t+`
- react-dom: 19.1.0
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),gt.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error("Unable to find node on an unmounted component."):(t=Object.keys(t).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+t));return t=Y(n),t=t!==null?K(t):null,t=t===null?null:t.stateNode,t},!function(){var t={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:ie,reconcilerVersion:"19.1.0"};return t.overrideHookState=yD,t.overrideHookStateDeletePath=vD,t.overrideHookStateRenamePath=bD,t.overrideProps=_D,t.overridePropsDeletePath=TD,t.overridePropsRenamePath=SD,t.scheduleUpdate=xD,t.setErrorHandler=ED,t.setSuspenseHandler=CD,t.scheduleRefresh=N,t.scheduleRoot=R,t.setRefreshHandler=w,t.getCurrentFiber=GM,t.getLaneLabelMap=XM,t.injectProfilingHooks=Ji,ot(t)}()&&Ea&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var AD=window.location.protocol;/^(https?|file):$/.test(AD)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(AD==="file:"?`
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Kc.createRoot=function(t,n){if(!H(t))throw Error("Target container is not a DOM element.");YC(t);var r=!1,l="",d=Jx,p=eE,T=tE,C=null;return n!=null&&(n.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof n=="object"&&n!==null&&n.$$typeof===so&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
let root = createRoot(domContainer);
root.render(<App />);`),n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(T=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(C=n.unstable_transitionCallbacks)),n=FC(t,1,!1,null,null,r,l,d,p,T,C,null),t[lo]=n.current,Bv(t),new ib(n)},Kc.hydrateRoot=function(t,n,r){if(!H(t))throw Error("Target container is not a DOM element.");YC(t),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var l=!1,d="",p=Jx,T=eE,C=tE,O=null,L=null;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(T=r.onCaughtError),r.onRecoverableError!==void 0&&(C=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(O=r.unstable_transitionCallbacks),r.formState!==void 0&&(L=r.formState)),n=FC(t,1,!0,n,r??null,l,d,p,T,C,O,L),n.context=HC(null),r=n.current,l=jn(r),l=Ks(l),d=Tn(l),d.callback=null,ca(r,d,l),r=l,n.current.lanes=r,Qs(n,r),ya(n),t[lo]=n.current,Bv(t),new Fm(n)},Kc.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Kc}O_.exports=LD();var ID=O_.exports;const z6="";var Zc;typeof window<"u"?Zc=window:typeof Rf<"u"?Zc=Rf:typeof self<"u"?Zc=self:Zc={};var Mf=Zc;const B=Yc(Mf),PD=C_(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var N_=typeof Rf<"u"?Rf:typeof window<"u"?window:{},ND=PD,Jc;typeof document<"u"?Jc=document:(Jc=N_["__GLOBAL_DOCUMENT_CACHE@4"],Jc||(Jc=N_["__GLOBAL_DOCUMENT_CACHE@4"]=ND));var U_=Jc;const ye=Yc(U_);var Ug={exports:{}};function Vt(){return Vt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},Vt.apply(null,arguments)}const UD=C_(Object.freeze(Object.defineProperty({__proto__:null,get default(){return Vt}},Symbol.toStringTag,{value:"Module"})));var BD=HD,FD=Object.prototype.toString;function HD(s){if(!s)return!1;var e=FD.call(s);return e==="[object Function]"||typeof s=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(s===window.setTimeout||s===window.alert||s===window.confirm||s===window.prompt)}function jD(s,e){var i=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i)return(i=i.call(s)).next.bind(i);if(Array.isArray(s)||(i=zD(s))||e&&s&&typeof s.length=="number"){i&&(s=i);var a=0;return function(){return a>=s.length?{done:!0}:{done:!1,value:s[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zD(s,e){if(s){if(typeof s=="string")return B_(s,e);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return B_(s,e)}}function B_(s,e){(e==null||e>s.length)&&(e=s.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=s[i];return a}var VD=function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},e.addInterceptor=function(a,o){this.typeToInterceptorsMap_.has(a)||this.typeToInterceptorsMap_.set(a,new Set);var u=this.typeToInterceptorsMap_.get(a);return u.has(o)?!1:(u.add(o),!0)},e.removeInterceptor=function(a,o){var u=this.typeToInterceptorsMap_.get(a);return u&&u.has(o)?(u.delete(o),!0):!1},e.clearInterceptorsByType=function(a){var o=this.typeToInterceptorsMap_.get(a);return o?(this.typeToInterceptorsMap_.delete(a),this.typeToInterceptorsMap_.set(a,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(a){return this.typeToInterceptorsMap_.get(a)||new Set},e.execute=function(a,o){for(var u=this.getForType(a),c=jD(u),f;!(f=c()).done;){var m=f.value;try{o=m(o)}catch{}}return o},s}(),qD=VD,$D=function(){function s(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=s.prototype;return e.getIsEnabled=function(){return this.enabled_},e.enable=function(){this.enabled_=!0},e.disable=function(){this.enabled_=!1},e.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},e.getMaxAttempts=function(){return this.maxAttempts_},e.setMaxAttempts=function(a){this.maxAttempts_=a},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(a){this.delayFactor_=a},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(a){this.fuzzFactor_=a},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(a){this.initialDelay_=a},e.createRetry=function(a){var o=a===void 0?{}:a,u=o.maxAttempts,c=o.delayFactor,f=o.fuzzFactor,m=o.initialDelay;return new GD({maxAttempts:u||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},s}(),GD=function(){function s(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1}var e=s.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},e.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},e.getCurrentDelay=function(){return this.currentDelay_},e.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},e.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},e.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return a+Math.random()*(o-a)},s}(),XD=$D,YD=Mf,WD=function(e,i){return i===void 0&&(i=!1),function(a,o,u){if(a){e(a);return}if(o.statusCode>=400&&o.statusCode<=599){var c=u;if(i)if(YD.TextDecoder){var f=QD(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(f).decode(u)}catch{}}else c=String.fromCharCode.apply(null,new Uint8Array(u));e({cause:c});return}e(null,u)}};function QD(s){return s===void 0&&(s=""),s.toLowerCase().split(";").reduce(function(e,i){var a=i.split("="),o=a[0],u=a[1];return o.trim()==="charset"?u.trim():e},"utf-8")}var KD=WD,F_=Mf,ZD=UD,JD=BD,H_=qD,ek=XD;Wt.httpHandler=KD,Wt.requestInterceptorsStorage=new H_,Wt.responseInterceptorsStorage=new H_,Wt.retryManager=new ek;/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/var tk=function(e){var i={};return e&&e.trim().split(`
`).forEach(function(a){var o=a.indexOf(":"),u=a.slice(0,o).trim().toLowerCase(),c=a.slice(o+1).trim();typeof i[u]>"u"?i[u]=c:Array.isArray(i[u])?i[u].push(c):i[u]=[i[u],c]}),i};Ug.exports=Wt,Ug.exports.default=Wt,Wt.XMLHttpRequest=F_.XMLHttpRequest||ak,Wt.XDomainRequest="withCredentials"in new Wt.XMLHttpRequest?Wt.XMLHttpRequest:F_.XDomainRequest,ik(["get","put","post","patch","head","delete"],function(s){Wt[s==="delete"?"del":s]=function(e,i,a){return i=j_(e,i,a),i.method=s.toUpperCase(),Bg(i)}});function ik(s,e){for(var i=0;i<s.length;i++)e(s[i])}function nk(s){for(var e in s)if(s.hasOwnProperty(e))return!1;return!0}function j_(s,e,i){var a=s;return JD(e)?(i=e,typeof s=="string"&&(a={uri:s})):a=ZD({},e,{uri:s}),a.callback=i,a}function Wt(s,e,i){return e=j_(s,e,i),Bg(e)}function Bg(s){if(typeof s.callback>"u")throw new Error("callback argument missing");if(s.requestType&&Wt.requestInterceptorsStorage.getIsEnabled()){var e={uri:s.uri||s.url,headers:s.headers||{},body:s.body,metadata:s.metadata||{},retry:s.retry,timeout:s.timeout},i=Wt.requestInterceptorsStorage.execute(s.requestType,e);s.uri=i.uri,s.headers=i.headers,s.body=i.body,s.metadata=i.metadata,s.retry=i.retry,s.timeout=i.timeout}var a=!1,o=function(K,se,Q){a||(a=!0,s.callback(K,se,Q))};function u(){b.readyState===4&&!Wt.responseInterceptorsStorage.getIsEnabled()&&setTimeout(m,0)}function c(){var Y=void 0;if(b.response?Y=b.response:Y=b.responseText||sk(b),I)try{Y=JSON.parse(Y)}catch{}return Y}function f(Y){if(clearTimeout(G),clearTimeout(s.retryTimeout),Y instanceof Error||(Y=new Error(""+(Y||"Unknown XMLHttpRequest Error"))),Y.statusCode=0,!E&&Wt.retryManager.getIsEnabled()&&s.retry&&s.retry.shouldRetry()){s.retryTimeout=setTimeout(function(){s.retry.moveToNextAttempt(),s.xhr=b,Bg(s)},s.retry.getCurrentFuzzedDelay());return}if(s.requestType&&Wt.responseInterceptorsStorage.getIsEnabled()){var K={headers:F.headers||{},body:F.body,responseUrl:b.responseURL,responseType:b.responseType},se=Wt.responseInterceptorsStorage.execute(s.requestType,K);F.body=se.body,F.headers=se.headers}return o(Y,F)}function m(){if(!E){var Y;clearTimeout(G),clearTimeout(s.retryTimeout),s.useXDR&&b.status===void 0?Y=200:Y=b.status===1223?204:b.status;var K=F,se=null;if(Y!==0?(K={body:c(),statusCode:Y,method:R,headers:{},url:A,rawRequest:b},b.getAllResponseHeaders&&(K.headers=tk(b.getAllResponseHeaders()))):se=new Error("Internal XMLHttpRequest Error"),s.requestType&&Wt.responseInterceptorsStorage.getIsEnabled()){var Q={headers:K.headers||{},body:K.body,responseUrl:b.responseURL,responseType:b.responseType},le=Wt.responseInterceptorsStorage.execute(s.requestType,Q);K.body=le.body,K.headers=le.headers}return o(se,K,K.body)}}var b=s.xhr||null;b||(s.cors||s.useXDR?b=new Wt.XDomainRequest:b=new Wt.XMLHttpRequest);var S,E,A=b.url=s.uri||s.url,R=b.method=s.method||"GET",N=s.body||s.data,w=b.headers=s.headers||{},H=!!s.sync,I=!1,G,F={body:void 0,headers:{},statusCode:0,method:R,url:A,rawRequest:b};if("json"in s&&s.json!==!1&&(I=!0,w.accept||w.Accept||(w.Accept="application/json"),R!=="GET"&&R!=="HEAD"&&(w["content-type"]||w["Content-Type"]||(w["Content-Type"]="application/json"),N=JSON.stringify(s.json===!0?N:s.json))),b.onreadystatechange=u,b.onload=m,b.onerror=f,b.onprogress=function(){},b.onabort=function(){E=!0,clearTimeout(s.retryTimeout)},b.ontimeout=f,b.open(R,A,!H,s.username,s.password),H||(b.withCredentials=!!s.withCredentials),!H&&s.timeout>0&&(G=setTimeout(function(){if(!E){E=!0,b.abort("timeout");var Y=new Error("XMLHttpRequest timeout");Y.code="ETIMEDOUT",f(Y)}},s.timeout)),b.setRequestHeader)for(S in w)w.hasOwnProperty(S)&&b.setRequestHeader(S,w[S]);else if(s.headers&&!nk(s.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in s&&(b.responseType=s.responseType),"beforeSend"in s&&typeof s.beforeSend=="function"&&s.beforeSend(b),b.send(N||null),b}function sk(s){try{if(s.responseType==="document")return s.responseXML;var e=s.responseXML&&s.responseXML.documentElement.nodeName==="parsererror";if(s.responseType===""&&!e)return s.responseXML}catch{}return null}function ak(){}var rk=Ug.exports;const z_=Yc(rk);var V_={exports:{}},q_=U_,Fg=Object.create||function(){function s(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return s.prototype=e,new s}}();function Dn(s,e){this.name="ParsingError",this.code=s.code,this.message=e||s.message}Dn.prototype=Fg(Error.prototype),Dn.prototype.constructor=Dn,Dn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Hg(s){function e(a,o,u,c){return(a|0)*3600+(o|0)*60+(u|0)+(c|0)/1e3}var i=s.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function ed(){this.values=Fg(null)}ed.prototype={set:function(s,e){!this.get(s)&&e!==""&&(this.values[s]=e)},get:function(s,e,i){return i?this.has(s)?this.values[s]:e[i]:this.has(s)?this.values[s]:e},has:function(s){return s in this.values},alt:function(s,e,i){for(var a=0;a<i.length;++a)if(e===i[a]){this.set(s,e);break}},integer:function(s,e){/^-?\d+$/.test(e)&&this.set(s,parseInt(e,10))},percent:function(s,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(s,e),!0):!1}};function td(s,e,i,a){var o=a?s.split(a):[s];for(var u in o)if(typeof o[u]=="string"){var c=o[u].split(i);if(c.length===2){var f=c[0].trim(),m=c[1].trim();e(f,m)}}}function ok(s,e,i){var a=s;function o(){var f=Hg(s);if(f===null)throw new Dn(Dn.Errors.BadTimeStamp,"Malformed timestamp: "+a);return s=s.replace(/^[^\sa-zA-Z-]+/,""),f}function u(f,m){var b=new ed;td(f,function(S,E){switch(S){case"region":for(var A=i.length-1;A>=0;A--)if(i[A].id===E){b.set(S,i[A].region);break}break;case"vertical":b.alt(S,E,["rl","lr"]);break;case"line":var R=E.split(","),N=R[0];b.integer(S,N),b.percent(S,N)&&b.set("snapToLines",!1),b.alt(S,N,["auto"]),R.length===2&&b.alt("lineAlign",R[1],["start","center","end"]);break;case"position":R=E.split(","),b.percent(S,R[0]),R.length===2&&b.alt("positionAlign",R[1],["start","center","end"]);break;case"size":b.percent(S,E);break;case"align":b.alt(S,E,["start","center","end","left","right"]);break}},/:/,/\s/),m.region=b.get("region",null),m.vertical=b.get("vertical","");try{m.line=b.get("line","auto")}catch{}m.lineAlign=b.get("lineAlign","start"),m.snapToLines=b.get("snapToLines",!0),m.size=b.get("size",100);try{m.align=b.get("align","center")}catch{m.align=b.get("align","middle")}try{m.position=b.get("position","auto")}catch{m.position=b.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},m.align)}m.positionAlign=b.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},m.align)}function c(){s=s.replace(/^\s+/,"")}if(c(),e.startTime=o(),c(),s.substr(0,3)!=="-->")throw new Dn(Dn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+a);s=s.substr(3),c(),e.endTime=o(),c(),u(s,e)}var jg=q_.createElement&&q_.createElement("textarea"),lk={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},$_={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},uk={v:"title",lang:"lang"},G_={rt:"ruby"};function X_(s,e){function i(){if(!e)return null;function N(H){return e=e.substr(H.length),H}var w=e.match(/^([^<]*)(<[^>]*>?)?/);return N(w[1]?w[1]:w[2])}function a(N){return jg.innerHTML=N,N=jg.textContent,jg.textContent="",N}function o(N,w){return!G_[w.localName]||G_[w.localName]===N.localName}function u(N,w){var H=lk[N];if(!H)return null;var I=s.document.createElement(H),G=uk[N];return G&&w&&(I[G]=w.trim()),I}for(var c=s.document.createElement("div"),f=c,m,b=[];(m=i())!==null;){if(m[0]==="<"){if(m[1]==="/"){b.length&&b[b.length-1]===m.substr(2).replace(">","")&&(b.pop(),f=f.parentNode);continue}var S=Hg(m.substr(1,m.length-2)),E;if(S){E=s.document.createProcessingInstruction("timestamp",S),f.appendChild(E);continue}var A=m.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!A||(E=u(A[1],A[3]),!E)||!o(f,E))continue;if(A[2]){var R=A[2].split(".");R.forEach(function(N){var w=/^bg_/.test(N),H=w?N.slice(3):N;if($_.hasOwnProperty(H)){var I=w?"background-color":"color",G=$_[H];E.style[I]=G}}),E.className=R.join(" ")}b.push(A[1]),f.appendChild(E),f=E;continue}f.appendChild(s.document.createTextNode(a(m)))}return c}var Y_=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function ck(s){for(var e=0;e<Y_.length;e++){var i=Y_[e];if(s>=i[0]&&s<=i[1])return!0}return!1}function dk(s){var e=[],i="",a;if(!s||!s.childNodes)return"ltr";function o(f,m){for(var b=m.childNodes.length-1;b>=0;b--)f.push(m.childNodes[b])}function u(f){if(!f||!f.length)return null;var m=f.pop(),b=m.textContent||m.innerText;if(b){var S=b.match(/^.*(\n|\r)/);return S?(f.length=0,S[0]):b}if(m.tagName==="ruby")return u(f);if(m.childNodes)return o(f,m),u(f)}for(o(e,s);i=u(e);)for(var c=0;c<i.length;c++)if(a=i.charCodeAt(c),ck(a))return"rtl";return"ltr"}function hk(s){if(typeof s.line=="number"&&(s.snapToLines||s.line>=0&&s.line<=100))return s.line;if(!s.track||!s.track.textTrackList||!s.track.textTrackList.mediaElement)return-1;for(var e=s.track,i=e.textTrackList,a=0,o=0;o<i.length&&i[o]!==e;o++)i[o].mode==="showing"&&a++;return++a*-1}function Lf(){}Lf.prototype.applyStyles=function(s,e){e=e||this.div;for(var i in s)s.hasOwnProperty(i)&&(e.style[i]=s[i])},Lf.prototype.formatStyle=function(s,e){return s===0?0:s+e};function If(s,e,i){Lf.call(this),this.cue=e,this.cueDiv=X_(s,e.text);var a={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(a,this.cueDiv),this.div=s.document.createElement("div"),a={direction:dk(this.cueDiv),writingMode:e.vertical===""?"horizontal-tb":e.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:e.align==="middle"?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(a),this.div.appendChild(this.cueDiv);var o=0;switch(e.positionAlign){case"start":case"line-left":o=e.position;break;case"center":o=e.position-e.size/2;break;case"end":case"line-right":o=e.position-e.size;break}e.vertical===""?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(u){this.applyStyles({top:this.formatStyle(u.top,"px"),bottom:this.formatStyle(u.bottom,"px"),left:this.formatStyle(u.left,"px"),right:this.formatStyle(u.right,"px"),height:this.formatStyle(u.height,"px"),width:this.formatStyle(u.width,"px")})}}If.prototype=Fg(Lf.prototype),If.prototype.constructor=If;function Yi(s){var e,i,a,o;if(s.div){i=s.div.offsetHeight,a=s.div.offsetWidth,o=s.div.offsetTop;var u=(u=s.div.childNodes)&&(u=u[0])&&u.getClientRects&&u.getClientRects();s=s.div.getBoundingClientRect(),e=u?Math.max(u[0]&&u[0].height||0,s.height/u.length):0}this.left=s.left,this.right=s.right,this.top=s.top||o,this.height=s.height||i,this.bottom=s.bottom||o+(s.height||i),this.width=s.width||a,this.lineHeight=e!==void 0?e:s.lineHeight}Yi.prototype.move=function(s,e){switch(e=e!==void 0?e:this.lineHeight,s){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}},Yi.prototype.overlaps=function(s){return this.left<s.right&&this.right>s.left&&this.top<s.bottom&&this.bottom>s.top},Yi.prototype.overlapsAny=function(s){for(var e=0;e<s.length;e++)if(this.overlaps(s[e]))return!0;return!1},Yi.prototype.within=function(s){return this.top>=s.top&&this.bottom<=s.bottom&&this.left>=s.left&&this.right<=s.right},Yi.prototype.overlapsOppositeAxis=function(s,e){switch(e){case"+x":return this.left<s.left;case"-x":return this.right>s.right;case"+y":return this.top<s.top;case"-y":return this.bottom>s.bottom}},Yi.prototype.intersectPercentage=function(s){var e=Math.max(0,Math.min(this.right,s.right)-Math.max(this.left,s.left)),i=Math.max(0,Math.min(this.bottom,s.bottom)-Math.max(this.top,s.top)),a=e*i;return a/(this.height*this.width)},Yi.prototype.toCSSCompatValues=function(s){return{top:this.top-s.top,bottom:s.bottom-this.bottom,left:this.left-s.left,right:s.right-this.right,height:this.height,width:this.width}},Yi.getSimpleBoxPosition=function(s){var e=s.div?s.div.offsetHeight:s.tagName?s.offsetHeight:0,i=s.div?s.div.offsetWidth:s.tagName?s.offsetWidth:0,a=s.div?s.div.offsetTop:s.tagName?s.offsetTop:0;s=s.div?s.div.getBoundingClientRect():s.tagName?s.getBoundingClientRect():s;var o={left:s.left,right:s.right,top:s.top||a,height:s.height||e,bottom:s.bottom||a+(s.height||e),width:s.width||i};return o};function fk(s,e,i,a){function o(H,I){for(var G,F=new Yi(H),Y=1,K=0;K<I.length;K++){for(;H.overlapsOppositeAxis(i,I[K])||H.within(i)&&H.overlapsAny(a);)H.move(I[K]);if(H.within(i))return H;var se=H.intersectPercentage(i);Y>se&&(G=new Yi(H),Y=se),H=new Yi(F)}return G||F}var u=new Yi(e),c=e.cue,f=hk(c),m=[];if(c.snapToLines){var b;switch(c.vertical){case"":m=["+y","-y"],b="height";break;case"rl":m=["+x","-x"],b="width";break;case"lr":m=["-x","+x"],b="width";break}var S=u.lineHeight,E=S*Math.round(f),A=i[b]+S,R=m[0];Math.abs(E)>A&&(E=E<0?-1:1,E*=Math.ceil(A/S)*S),f<0&&(E+=c.vertical===""?i.height:i.width,m=m.reverse()),u.move(R,E)}else{var N=u.lineHeight/i.height*100;switch(c.lineAlign){case"center":f-=N/2;break;case"end":f-=N;break}switch(c.vertical){case"":e.applyStyles({top:e.formatStyle(f,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(f,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(f,"%")});break}m=["+y","-x","+x","-y"],u=new Yi(e)}var w=o(u,m);e.move(w.toCSSCompatValues(i))}function jl(){}jl.StringDecoder=function(){return{decode:function(s){if(!s)return"";if(typeof s!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(s))}}},jl.convertCueToDOMTree=function(s,e){return!s||!e?null:X_(s,e)};var pk=.05,mk="sans-serif",gk="1.5%";jl.processCues=function(s,e,i){if(!s||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var a=s.document.createElement("div");a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin=gk,i.appendChild(a);function o(S){for(var E=0;E<S.length;E++)if(S[E].hasBeenReset||!S[E].displayState)return!0;return!1}if(!o(e)){for(var u=0;u<e.length;u++)a.appendChild(e[u].displayState);return}var c=[],f=Yi.getSimpleBoxPosition(a),m=Math.round(f.height*pk*100)/100,b={font:m+"px "+mk};(function(){for(var S,E,A=0;A<e.length;A++)E=e[A],S=new If(s,E,b),a.appendChild(S.div),fk(s,S,f,c),E.displayState=S.div,c.push(Yi.getSimpleBoxPosition(S))})()},jl.Parser=function(s,e,i){i||(i=e,e={}),e||(e={}),this.window=s,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},jl.Parser.prototype={reportOrThrowError:function(s){if(s instanceof Dn)this.onparsingerror&&this.onparsingerror(s);else throw s},parse:function(s){var e=this;s&&(e.buffer+=e.decoder.decode(s,{stream:!0}));function i(){for(var S=e.buffer,E=0;E<S.length&&S[E]!=="\r"&&S[E]!==`
`;)++E;var A=S.substr(0,E);return S[E]==="\r"&&++E,S[E]===`
`&&++E,e.buffer=S.substr(E),A}function a(S){var E=new ed;if(td(S,function(R,N){switch(R){case"id":E.set(R,N);break;case"width":E.percent(R,N);break;case"lines":E.integer(R,N);break;case"regionanchor":case"viewportanchor":var w=N.split(",");if(w.length!==2)break;var H=new ed;if(H.percent("x",w[0]),H.percent("y",w[1]),!H.has("x")||!H.has("y"))break;E.set(R+"X",H.get("x")),E.set(R+"Y",H.get("y"));break;case"scroll":E.alt(R,N,["up"]);break}},/=/,/\s/),E.has("id")){var A=new(e.vttjs.VTTRegion||e.window.VTTRegion);A.width=E.get("width",100),A.lines=E.get("lines",3),A.regionAnchorX=E.get("regionanchorX",0),A.regionAnchorY=E.get("regionanchorY",100),A.viewportAnchorX=E.get("viewportanchorX",0),A.viewportAnchorY=E.get("viewportanchorY",100),A.scroll=E.get("scroll",""),e.onregion&&e.onregion(A),e.regionList.push({id:E.get("id"),region:A})}}function o(S){var E=new ed;td(S,function(A,R){switch(A){case"MPEGT":E.integer(A+"S",R);break;case"LOCA":E.set(A+"L",Hg(R));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:E.get("MPEGTS"),LOCAL:E.get("LOCAL")})}function u(S){S.match(/X-TIMESTAMP-MAP/)?td(S,function(E,A){switch(E){case"X-TIMESTAMP-MAP":o(A);break}},/=/):td(S,function(E,A){switch(E){case"Region":a(A);break}},/:/)}try{var c;if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;c=i();var f=c.match(/^WEBVTT([ \t].*)?$/);if(!f||!f[0])throw new Dn(Dn.Errors.BadSignature);e.state="HEADER"}for(var m=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(m?m=!1:c=i(),e.state){case"HEADER":/:/.test(c)?u(c):c||(e.state="ID");continue;case"NOTE":c||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(c)){e.state="NOTE";break}if(!c)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch{e.cue.align="middle"}if(e.state="CUE",c.indexOf("-->")===-1){e.cue.id=c;continue}case"CUE":try{ok(c,e.cue,e.regionList)}catch(S){e.reportOrThrowError(S),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var b=c.indexOf("-->")!==-1;if(!c||b&&(m=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+=`
`),e.cue.text+=c.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":c||(e.state="ID");continue}}}catch(S){e.reportOrThrowError(S),e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var s=this;try{if(s.buffer+=s.decoder.decode(),(s.cue||s.state==="HEADER")&&(s.buffer+=`
`,s.parse()),s.state==="INITIAL")throw new Dn(Dn.Errors.BadSignature)}catch(e){s.reportOrThrowError(e)}return s.onflush&&s.onflush(),this}};var yk=jl,vk="auto",bk={"":1,lr:1,rl:1},_k={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Tk(s){if(typeof s!="string")return!1;var e=bk[s.toLowerCase()];return e?s.toLowerCase():!1}function zg(s){if(typeof s!="string")return!1;var e=_k[s.toLowerCase()];return e?s.toLowerCase():!1}function W_(s,e,i){this.hasBeenReset=!1;var a="",o=!1,u=s,c=e,f=i,m=null,b="",S=!0,E="auto",A="start",R="auto",N="auto",w=100,H="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(I){a=""+I}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(I){o=!!I}},startTime:{enumerable:!0,get:function(){return u},set:function(I){if(typeof I!="number")throw new TypeError("Start time must be set to a number.");u=I,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(I){if(typeof I!="number")throw new TypeError("End time must be set to a number.");c=I,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return f},set:function(I){f=""+I,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return m},set:function(I){m=I,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return b},set:function(I){var G=Tk(I);if(G===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");b=G,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return S},set:function(I){S=!!I,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return E},set:function(I){if(typeof I!="number"&&I!==vk)throw new SyntaxError("Line: an invalid number or illegal string was specified.");E=I,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return A},set:function(I){var G=zg(I);G?(A=G,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return R},set:function(I){if(I<0||I>100)throw new Error("Position must be between 0 and 100.");R=I,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return N},set:function(I){var G=zg(I);G?(N=G,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return w},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");w=I,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return H},set:function(I){var G=zg(I);if(!G)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");H=G,this.hasBeenReset=!0}}}),this.displayState=void 0}W_.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Sk=W_,xk={"":!0,up:!0};function Ek(s){if(typeof s!="string")return!1;var e=xk[s.toLowerCase()];return e?s.toLowerCase():!1}function id(s){return typeof s=="number"&&s>=0&&s<=100}function Ck(){var s=100,e=3,i=0,a=100,o=0,u=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(f){if(!id(f))throw new Error("Width must be between 0 and 100.");s=f}},lines:{enumerable:!0,get:function(){return e},set:function(f){if(typeof f!="number")throw new TypeError("Lines must be set to a number.");e=f}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(f){if(!id(f))throw new Error("RegionAnchorX must be between 0 and 100.");a=f}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(f){if(!id(f))throw new Error("RegionAnchorY must be between 0 and 100.");i=f}},viewportAnchorY:{enumerable:!0,get:function(){return u},set:function(f){if(!id(f))throw new Error("ViewportAnchorY must be between 0 and 100.");u=f}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(f){if(!id(f))throw new Error("ViewportAnchorX must be between 0 and 100.");o=f}},scroll:{enumerable:!0,get:function(){return c},set:function(f){var m=Ek(f);m===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=m}}})}var Ak=Ck,ka=Mf,Co=V_.exports={WebVTT:yk,VTTCue:Sk,VTTRegion:Ak};ka.vttjs=Co,ka.WebVTT=Co.WebVTT;var wk=Co.VTTCue,Dk=Co.VTTRegion,kk=ka.VTTCue,Ok=ka.VTTRegion;Co.shim=function(){ka.VTTCue=wk,ka.VTTRegion=Dk},Co.restore=function(){ka.VTTCue=kk,ka.VTTRegion=Ok},ka.VTTCue||Co.shim();var Rk=V_.exports;const Q_=Yc(Rk);var K_="https://example.com",Pf=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=B.location&&B.location.href||"");var a=/^\/\//.test(e),o=!B.location&&!/\/\//i.test(e);e=new B.URL(e,B.location||K_);var u=new URL(i,e);return o?u.href.slice(K_.length):a?u.href.slice(u.protocol.length):u.href},Vg=function(){function s(){this.listeners={}}var e=s.prototype;return e.on=function(a,o){this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push(o)},e.off=function(a,o){if(!this.listeners[a])return!1;var u=this.listeners[a].indexOf(o);return this.listeners[a]=this.listeners[a].slice(0),this.listeners[a].splice(u,1),u>-1},e.trigger=function(a){var o=this.listeners[a];if(o)if(arguments.length===2)for(var u=o.length,c=0;c<u;++c)o[c].call(this,arguments[1]);else for(var f=Array.prototype.slice.call(arguments,1),m=o.length,b=0;b<m;++b)o[b].apply(this,f)},e.dispose=function(){this.listeners={}},e.pipe=function(a){this.on("data",function(o){a.push(o)})},s}(),Mk=function(e){return B.atob?B.atob(e):Buffer.from(e,"base64").toString("binary")};function Z_(s){for(var e=Mk(s),i=new Uint8Array(e.length),a=0;a<e.length;a++)i[a]=e.charCodeAt(a);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class Lk extends Vg{constructor(){super(),this.buffer=""}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
`);i>-1;i=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}}const Ik=String.fromCharCode(9),qg=function(s){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(s||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},Pk=function(){const s="[^=]*",e='"[^"]*"|[^,]*',i="(?:"+s+")=(?:"+e+")";return new RegExp("(?:^|,)("+i+")")},Wi=function(s){const e={};if(!s)return e;const i=s.split(Pk());let a=i.length,o;for(;a--;)i[a]!==""&&(o=/([^=]*)=(.*)/.exec(i[a]).slice(1),o[0]=o[0].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^\s+|\s+$/g,""),o[1]=o[1].replace(/^['"](.*)['"]$/g,"$1"),e[o[0]]=o[1]);return e},J_=s=>{const e=s.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class Nk extends Vg{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,a;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((u,c)=>{const f=c(e);return f===e?u:u.concat([f])},[e]).forEach(u=>{for(let c=0;c<this.customParsers.length;c++)if(this.customParsers[c].call(this,u))return;if(u.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:u.slice(1)});return}if(u=u.replace("\r",""),i=/^#EXTM3U/.exec(u),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(u),i){a={type:"tag",tagType:"inf"},i[1]&&(a.duration=parseFloat(i[1])),i[2]&&(a.title=i[2]),this.trigger("data",a);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(u),i){a={type:"tag",tagType:"targetduration"},i[1]&&(a.duration=parseInt(i[1],10)),this.trigger("data",a);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(u),i){a={type:"tag",tagType:"version"},i[1]&&(a.version=parseInt(i[1],10)),this.trigger("data",a);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(u),i){a={type:"tag",tagType:"media-sequence"},i[1]&&(a.number=parseInt(i[1],10)),this.trigger("data",a);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(u),i){a={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(a.number=parseInt(i[1],10)),this.trigger("data",a);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(u),i){a={type:"tag",tagType:"playlist-type"},i[1]&&(a.playlistType=i[1]),this.trigger("data",a);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(u),i){a=Vt(qg(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",a);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(u),i){a={type:"tag",tagType:"allow-cache"},i[1]&&(a.allowed=!/NO/.test(i[1])),this.trigger("data",a);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(u),i){if(a={type:"tag",tagType:"map"},i[1]){const c=Wi(i[1]);c.URI&&(a.uri=c.URI),c.BYTERANGE&&(a.byterange=qg(c.BYTERANGE))}this.trigger("data",a);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(u),i){a={type:"tag",tagType:"stream-inf"},i[1]&&(a.attributes=Wi(i[1]),a.attributes.RESOLUTION&&(a.attributes.RESOLUTION=J_(a.attributes.RESOLUTION)),a.attributes.BANDWIDTH&&(a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10)),a.attributes["FRAME-RATE"]&&(a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"])),a.attributes["PROGRAM-ID"]&&(a.attributes["PROGRAM-ID"]=parseInt(a.attributes["PROGRAM-ID"],10))),this.trigger("data",a);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(u),i){a={type:"tag",tagType:"media"},i[1]&&(a.attributes=Wi(i[1])),this.trigger("data",a);return}if(i=/^#EXT-X-ENDLIST/.exec(u),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(u),i){a={type:"tag",tagType:"program-date-time"},i[1]&&(a.dateTimeString=i[1],a.dateTimeObject=new Date(i[1])),this.trigger("data",a);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(u),i){a={type:"tag",tagType:"key"},i[1]&&(a.attributes=Wi(i[1]),a.attributes.IV&&(a.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(a.attributes.IV=a.attributes.IV.substring(2)),a.attributes.IV=a.attributes.IV.match(/.{8}/g),a.attributes.IV[0]=parseInt(a.attributes.IV[0],16),a.attributes.IV[1]=parseInt(a.attributes.IV[1],16),a.attributes.IV[2]=parseInt(a.attributes.IV[2],16),a.attributes.IV[3]=parseInt(a.attributes.IV[3],16),a.attributes.IV=new Uint32Array(a.attributes.IV))),this.trigger("data",a);return}if(i=/^#EXT-X-START:(.*)$/.exec(u),i){a={type:"tag",tagType:"start"},i[1]&&(a.attributes=Wi(i[1]),a.attributes["TIME-OFFSET"]=parseFloat(a.attributes["TIME-OFFSET"]),a.attributes.PRECISE=/YES/.test(a.attributes.PRECISE)),this.trigger("data",a);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(u),i){a={type:"tag",tagType:"cue-out-cont"},i[1]?a.data=i[1]:a.data="",this.trigger("data",a);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(u),i){a={type:"tag",tagType:"cue-out"},i[1]?a.data=i[1]:a.data="",this.trigger("data",a);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(u),i){a={type:"tag",tagType:"cue-in"},i[1]?a.data=i[1]:a.data="",this.trigger("data",a);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"skip"},a.attributes=Wi(i[1]),a.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(a.attributes["SKIPPED-SEGMENTS"]=parseInt(a.attributes["SKIPPED-SEGMENTS"],10)),a.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(a.attributes["RECENTLY-REMOVED-DATERANGES"]=a.attributes["RECENTLY-REMOVED-DATERANGES"].split(Ik)),this.trigger("data",a);return}if(i=/^#EXT-X-PART:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"part"},a.attributes=Wi(i[1]),["DURATION"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=parseFloat(a.attributes[c]))}),["INDEPENDENT","GAP"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=/YES/.test(a.attributes[c]))}),a.attributes.hasOwnProperty("BYTERANGE")&&(a.attributes.byterange=qg(a.attributes.BYTERANGE)),this.trigger("data",a);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"server-control"},a.attributes=Wi(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=parseFloat(a.attributes[c]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=/YES/.test(a.attributes[c]))}),this.trigger("data",a);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"part-inf"},a.attributes=Wi(i[1]),["PART-TARGET"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=parseFloat(a.attributes[c]))}),this.trigger("data",a);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"preload-hint"},a.attributes=Wi(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(c){if(a.attributes.hasOwnProperty(c)){a.attributes[c]=parseInt(a.attributes[c],10);const f=c==="BYTERANGE-LENGTH"?"length":"offset";a.attributes.byterange=a.attributes.byterange||{},a.attributes.byterange[f]=a.attributes[c],delete a.attributes[c]}}),this.trigger("data",a);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"rendition-report"},a.attributes=Wi(i[1]),["LAST-MSN","LAST-PART"].forEach(function(c){a.attributes.hasOwnProperty(c)&&(a.attributes[c]=parseInt(a.attributes[c],10))}),this.trigger("data",a);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(u),i&&i[1]){a={type:"tag",tagType:"daterange"},a.attributes=Wi(i[1]),["ID","CLASS"].forEach(function(f){a.attributes.hasOwnProperty(f)&&(a.attributes[f]=String(a.attributes[f]))}),["START-DATE","END-DATE"].forEach(function(f){a.attributes.hasOwnProperty(f)&&(a.attributes[f]=new Date(a.attributes[f]))}),["DURATION","PLANNED-DURATION"].forEach(function(f){a.attributes.hasOwnProperty(f)&&(a.attributes[f]=parseFloat(a.attributes[f]))}),["END-ON-NEXT"].forEach(function(f){a.attributes.hasOwnProperty(f)&&(a.attributes[f]=/YES/i.test(a.attributes[f]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(f){a.attributes.hasOwnProperty(f)&&(a.attributes[f]=a.attributes[f].toString(16))});const c=/^X-([A-Z]+-)+[A-Z]+$/;for(const f in a.attributes){if(!c.test(f))continue;const m=/[0-9A-Fa-f]{6}/g.test(a.attributes[f]),b=/^\d+(\.\d+)?$/.test(a.attributes[f]);a.attributes[f]=m?a.attributes[f].toString(16):b?parseFloat(a.attributes[f]):String(a.attributes[f])}this.trigger("data",a);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(u),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(u),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(u),i){a={type:"tag",tagType:"content-steering"},a.attributes=Wi(i[1]),this.trigger("data",a);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(u),i){a={type:"tag",tagType:"i-frame-playlist"},a.attributes=Wi(i[1]),a.attributes.URI&&(a.uri=a.attributes.URI),a.attributes.BANDWIDTH&&(a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10)),a.attributes.RESOLUTION&&(a.attributes.RESOLUTION=J_(a.attributes.RESOLUTION)),a.attributes["AVERAGE-BANDWIDTH"]&&(a.attributes["AVERAGE-BANDWIDTH"]=parseInt(a.attributes["AVERAGE-BANDWIDTH"],10)),a.attributes["FRAME-RATE"]&&(a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"])),this.trigger("data",a);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(u),i){a={type:"tag",tagType:"define"},a.attributes=Wi(i[1]),this.trigger("data",a);return}this.trigger("data",{type:"tag",data:u.slice(4)})})}addParser({expression:e,customType:i,dataParser:a,segment:o}){typeof a!="function"&&(a=u=>u),this.customParsers.push(u=>{if(e.exec(u))return this.trigger("data",{type:"custom",data:a(u),customType:i,segment:o}),!0})}addTagMapper({expression:e,map:i}){const a=o=>e.test(o)?i(o):o;this.tagMappers.push(a)}}const Uk=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),xr=function(s){const e={};return Object.keys(s).forEach(function(i){e[Uk(i)]=s[i]}),e},$g=function(s){const{serverControl:e,targetDuration:i,partTargetDuration:a}=s;if(!e)return;const o="#EXT-X-SERVER-CONTROL",u="holdBack",c="partHoldBack",f=i&&i*3,m=a&&a*2;i&&!e.hasOwnProperty(u)&&(e[u]=f,this.trigger("info",{message:`${o} defaulting HOLD-BACK to targetDuration * 3 (${f}).`})),f&&e[u]<f&&(this.trigger("warn",{message:`${o} clamping HOLD-BACK (${e[u]}) to targetDuration * 3 (${f})`}),e[u]=f),a&&!e.hasOwnProperty(c)&&(e[c]=a*3,this.trigger("info",{message:`${o} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[c]}).`})),a&&e[c]<m&&(this.trigger("warn",{message:`${o} clamping PART-HOLD-BACK (${e[c]}) to partTargetDuration * 2 (${m}).`}),e[c]=m)};class Bk extends Vg{constructor(e={}){super(),this.lineStream=new Lk,this.parseStream=new Nk,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const i=this,a=[];let o={},u,c,f=!1;const m=function(){},b={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},S="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let E=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let A=0,R=0;const N={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&u&&(o.map=u),!o.key&&c&&(o.key=c),!o.timeline&&typeof E=="number"&&(o.timeline=E),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(w){let H,I;if(i.manifest.definitions){for(const G in i.manifest.definitions)if(w.uri&&(w.uri=w.uri.replace(`{$${G}}`,i.manifest.definitions[G])),w.attributes)for(const F in w.attributes)typeof w.attributes[F]=="string"&&(w.attributes[F]=w.attributes[F].replace(`{$${G}}`,i.manifest.definitions[G]))}({tag(){({version(){w.version&&(this.manifest.version=w.version)},"allow-cache"(){this.manifest.allowCache=w.allowed,"allowed"in w||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const G={};"length"in w&&(o.byterange=G,G.length=w.length,"offset"in w||(w.offset=A)),"offset"in w&&(o.byterange=G,G.offset=w.offset),A=G.offset+G.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),w.title&&(o.title=w.title),w.duration>0&&(o.duration=w.duration),w.duration===0&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key(){if(!w.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(w.attributes.METHOD==="NONE"){c=null;return}if(!w.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(w.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:w.attributes};return}if(w.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:w.attributes.URI};return}if(w.attributes.KEYFORMAT===S){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(w.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(w.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),w.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(w.attributes.KEYID&&w.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:w.attributes.KEYFORMAT,keyId:w.attributes.KEYID.substring(2)},pssh:Z_(w.attributes.URI.split(",")[1])};return}w.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:w.attributes.METHOD||"AES-128",uri:w.attributes.URI},typeof w.attributes.IV<"u"&&(c.iv=w.attributes.IV)},"media-sequence"(){if(!isFinite(w.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+w.number});return}this.manifest.mediaSequence=w.number},"discontinuity-sequence"(){if(!isFinite(w.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+w.number});return}this.manifest.discontinuitySequence=w.number,E=w.number},"playlist-type"(){if(!/VOD|EVENT/.test(w.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+w.playlist});return}this.manifest.playlistType=w.playlistType},map(){u={},w.uri&&(u.uri=w.uri),w.byterange&&(u.byterange=w.byterange),c&&(u.key=c)},"stream-inf"(){if(this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||b,!w.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}o.attributes||(o.attributes={}),Vt(o.attributes,w.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||b,!(w.attributes&&w.attributes.TYPE&&w.attributes["GROUP-ID"]&&w.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const G=this.manifest.mediaGroups[w.attributes.TYPE];G[w.attributes["GROUP-ID"]]=G[w.attributes["GROUP-ID"]]||{},H=G[w.attributes["GROUP-ID"]],I={default:/yes/i.test(w.attributes.DEFAULT)},I.default?I.autoselect=!0:I.autoselect=/yes/i.test(w.attributes.AUTOSELECT),w.attributes.LANGUAGE&&(I.language=w.attributes.LANGUAGE),w.attributes.URI&&(I.uri=w.attributes.URI),w.attributes["INSTREAM-ID"]&&(I.instreamId=w.attributes["INSTREAM-ID"]),w.attributes.CHARACTERISTICS&&(I.characteristics=w.attributes.CHARACTERISTICS),w.attributes.FORCED&&(I.forced=/yes/i.test(w.attributes.FORCED)),H[w.attributes.NAME]=I},discontinuity(){E+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=w.dateTimeString,this.manifest.dateTimeObject=w.dateTimeObject),o.dateTimeString=w.dateTimeString,o.dateTimeObject=w.dateTimeObject;const{lastProgramDateTime:G}=this;this.lastProgramDateTime=new Date(w.dateTimeString).getTime(),G===null&&this.manifest.segments.reduceRight((F,Y)=>(Y.programDateTime=F-Y.duration*1e3,Y.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(w.duration)||w.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+w.duration});return}this.manifest.targetDuration=w.duration,$g.call(this,this.manifest)},start(){if(!w.attributes||isNaN(w.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:w.attributes["TIME-OFFSET"],precise:w.attributes.PRECISE}},"cue-out"(){o.cueOut=w.data},"cue-out-cont"(){o.cueOutCont=w.data},"cue-in"(){o.cueIn=w.data},skip(){this.manifest.skip=xr(w.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",w.attributes,["SKIPPED-SEGMENTS"])},part(){f=!0;const G=this.manifest.segments.length,F=xr(w.attributes);o.parts=o.parts||[],o.parts.push(F),F.byterange&&(F.byterange.hasOwnProperty("offset")||(F.byterange.offset=R),R=F.byterange.offset+F.byterange.length);const Y=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${Y} for segment #${G}`,w.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((K,se)=>{K.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${se} lacks required attribute(s): LAST-PART`})})},"server-control"(){const G=this.manifest.serverControl=xr(w.attributes);G.hasOwnProperty("canBlockReload")||(G.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),$g.call(this,this.manifest),G.canSkipDateranges&&!G.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const G=this.manifest.segments.length,F=xr(w.attributes),Y=F.type&&F.type==="PART";o.preloadHints=o.preloadHints||[],o.preloadHints.push(F),F.byterange&&(F.byterange.hasOwnProperty("offset")||(F.byterange.offset=Y?R:0,Y&&(R=F.byterange.offset+F.byterange.length)));const K=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${K} for segment #${G}`,w.attributes,["TYPE","URI"]),!!F.type)for(let se=0;se<o.preloadHints.length-1;se++){const Q=o.preloadHints[se];Q.type&&Q.type===F.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${K} for segment #${G} has the same TYPE ${F.type} as preload hint #${se}`})}},"rendition-report"(){const G=xr(w.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(G);const F=this.manifest.renditionReports.length-1,Y=["LAST-MSN","URI"];f&&Y.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${F}`,w.attributes,Y)},"part-inf"(){this.manifest.partInf=xr(w.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",w.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),$g.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(xr(w.attributes));const G=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${G}`,w.attributes,["ID","START-DATE"]);const F=this.manifest.dateRanges[G];F.endDate&&F.startDate&&new Date(F.endDate)<new Date(F.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),F.duration&&F.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),F.plannedDuration&&F.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const Y=!!F.endOnNext;if(Y&&!F.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),Y&&(F.duration||F.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),F.duration&&F.endDate){const se=F.startDate.getTime()+F.duration*1e3;this.manifest.dateRanges[G].endDate=new Date(se)}if(!N[F.id])N[F.id]=F;else{for(const se in N[F.id])if(F[se]&&JSON.stringify(N[F.id][se])!==JSON.stringify(F[se])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const K=this.manifest.dateRanges.findIndex(se=>se.id===F.id);this.manifest.dateRanges[K]=Vt(this.manifest.dateRanges[K],F),N[F.id]=Vt(N[F.id],F),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=xr(w.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",w.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const G=(F,Y)=>{if(F in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${F}`});return}this.manifest.definitions[F]=Y};if("QUERYPARAM"in w.attributes){if("NAME"in w.attributes||"IMPORT"in w.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const F=this.params.get(w.attributes.QUERYPARAM);if(!F){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${w.attributes.QUERYPARAM}`});return}G(w.attributes.QUERYPARAM,decodeURIComponent(F));return}if("NAME"in w.attributes){if("IMPORT"in w.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in w.attributes)||typeof w.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${w.attributes.NAME}`});return}G(w.attributes.NAME,w.attributes.VALUE);return}if("IMPORT"in w.attributes){if(!this.mainDefinitions[w.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${w.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}G(w.attributes.IMPORT,this.mainDefinitions[w.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:w.attributes,uri:w.uri,timeline:E}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",w.attributes,["BANDWIDTH","URI"])}}[w.tagType]||m).call(i)},uri(){o.uri=w.uri,a.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),c&&(o.key=c),o.timeline=E,u&&(o.map=u),R=0,this.lastProgramDateTime!==null&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=o.duration*1e3),o={}},comment(){},custom(){w.segment?(o.custom=o.custom||{},o.custom[w.customType]=w.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[w.customType]=w.data)}})[w.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,a){const o=[];a.forEach(function(u){i.hasOwnProperty(u)||o.push(u)}),o.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${o.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
`),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Ao={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},Fk=["video","audio","text"],eT=["Video","Audio","Text"],tT=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,a,o){var u=("00"+Number(a).toString(16)).slice(-2),c=("00"+Number(o).toString(16)).slice(-2);return"avc1."+u+"00"+c})},Us=function(e){e===void 0&&(e="");var i=e.split(","),a=[];return i.forEach(function(o){o=o.trim();var u;Fk.forEach(function(c){var f=Ao[c].exec(o.toLowerCase());if(!(!f||f.length<=1)){u=c;var m=o.substring(0,f[1].length),b=o.replace(m,"");a.push({type:m,details:b,mediaType:c})}}),u||a.push({type:o,details:"",mediaType:"unknown"})}),a},Hk=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var a=e.mediaGroups.AUDIO[i];if(!a)return null;for(var o in a){var u=a[o];if(u.default&&u.playlists)return Us(u.playlists[0].attributes.CODECS)}return null},iT=function(e){return e===void 0&&(e=""),Ao.audio.test(e.trim().toLowerCase())},jk=function(e){return e===void 0&&(e=""),Ao.text.test(e.trim().toLowerCase())},zl=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(u){return tT(u.trim())}),a="video";i.length===1&&iT(i[0])?a="audio":i.length===1&&jk(i[0])&&(a="application");var o="mp4";return i.every(function(u){return Ao.mp4.test(u)})?o="mp4":i.every(function(u){return Ao.webm.test(u)})?o="webm":i.every(function(u){return Ao.ogg.test(u)})&&(o="ogg"),a+"/"+o+';codecs="'+e+'"'}},nd=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),B.MediaSource&&B.MediaSource.isTypeSupported&&B.MediaSource.isTypeSupported(zl(e))||i&&B.ManagedMediaSource&&B.ManagedMediaSource.isTypeSupported&&B.ManagedMediaSource.isTypeSupported(zl(e))||!1},Gg=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var a=0;a<eT.length;a++){var o=eT[a];if(Ao["muxer"+o].test(i))return!0}return!1})},nT="mp4a.40.2",zk="avc1.4d400d",Vk=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,qk=/^application\/dash\+xml/i,sT=function(e){return Vk.test(e)?"hls":qk.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},$k=function(e){return e.toString(2).length},Gk=function(e){return Math.ceil($k(e)/8)},aT=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Xk=function(e){return aT(e)},Be=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!Xk(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},xi=B.BigInt||Number,Xg=[xi("0x1"),xi("0x100"),xi("0x10000"),xi("0x1000000"),xi("0x100000000"),xi("0x10000000000"),xi("0x1000000000000"),xi("0x100000000000000"),xi("0x10000000000000000")];(function(){var s=new Uint16Array([65484]),e=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var Yk=function(e,i){var a=i===void 0?{}:i,o=a.signed,u=o===void 0?!1:o,c=a.le,f=c===void 0?!1:c;e=Be(e);var m=f?"reduce":"reduceRight",b=e[m]?e[m]:Array.prototype[m],S=b.call(e,function(A,R,N){var w=f?N:Math.abs(N+1-e.length);return A+xi(R)*Xg[w]},xi(0));if(u){var E=Xg[e.length]/xi(2)-xi(1);S=xi(S),S>E&&(S-=E,S-=E,S-=xi(2))}return Number(S)},Wk=function(e,i){var a=i===void 0?{}:i,o=a.le,u=o===void 0?!1:o;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=xi(e);for(var c=Gk(e),f=new Uint8Array(new ArrayBuffer(c)),m=0;m<c;m++){var b=u?m:Math.abs(m+1-f.length);f[b]=Number(e/Xg[m]&xi(255)),e<0&&(f[b]=Math.abs(~f[b]),f[b]-=m===0?1:2)}return f},rT=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var a=new Uint8Array(e.length),o=0;o<e.length;o++)a[o]=e.charCodeAt(o);return a},Qk=function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];if(i=i.filter(function(f){return f&&(f.byteLength||f.length)&&typeof f!="string"}),i.length<=1)return Be(i[0]);var o=i.reduce(function(f,m,b){return f+(m.byteLength||m.length)},0),u=new Uint8Array(o),c=0;return i.forEach(function(f){f=Be(f),u.set(f,c),c+=f.byteLength}),u},Nt=function(e,i,a){var o=a===void 0?{}:a,u=o.offset,c=u===void 0?0:u,f=o.mask,m=f===void 0?[]:f;e=Be(e),i=Be(i);var b=i.every?i.every:Array.prototype.every;return i.length&&e.length-c>=i.length&&b.call(i,function(S,E){var A=m[E]?m[E]&e[c+E]:e[c+E];return S===A})},Kk=function(e,i,a){i.forEach(function(o){for(var u in e.mediaGroups[o])for(var c in e.mediaGroups[o][u]){var f=e.mediaGroups[o][u][c];a(f,o,u,c)}})},Er={},Oa={};function Zk(s,e,i){if(i===void 0&&(i=Array.prototype),s&&typeof i.find=="function")return i.find.call(s,e);for(var a=0;a<s.length;a++)if(Object.prototype.hasOwnProperty.call(s,a)){var o=s[a];if(e.call(void 0,o,a,s))return o}}function Yg(s,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(s):s}function Jk(s,e){if(s===null||typeof s!="object")throw new TypeError("target is not an object");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=e[i]);return s}var oT=Yg({HTML:"text/html",isHTML:function(s){return s===oT.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),lT=Yg({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(s){return s===lT.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Oa.assign=Jk,Oa.find=Zk,Oa.freeze=Yg,Oa.MIME_TYPE=oT,Oa.NAMESPACE=lT;var uT=Oa,Bs=uT.find,sd=uT.NAMESPACE;function e4(s){return s!==""}function t4(s){return s?s.split(/[\t\n\f\r ]+/).filter(e4):[]}function i4(s,e){return s.hasOwnProperty(e)||(s[e]=!0),s}function cT(s){if(!s)return[];var e=t4(s);return Object.keys(e.reduce(i4,{}))}function n4(s){return function(e){return s&&s.indexOf(e)!==-1}}function ad(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function dn(s,e){var i=s.prototype;if(!(i instanceof e)){let a=function(){};a.prototype=e.prototype,a=new a,ad(i,a),s.prototype=i=a}i.constructor!=s&&(typeof s!="function"&&console.error("unknown Class:"+s),i.constructor=s)}var hn={},gs=hn.ELEMENT_NODE=1,Vl=hn.ATTRIBUTE_NODE=2,Nf=hn.TEXT_NODE=3,dT=hn.CDATA_SECTION_NODE=4,hT=hn.ENTITY_REFERENCE_NODE=5,s4=hn.ENTITY_NODE=6,fT=hn.PROCESSING_INSTRUCTION_NODE=7,pT=hn.COMMENT_NODE=8,mT=hn.DOCUMENT_NODE=9,gT=hn.DOCUMENT_TYPE_NODE=10,Ra=hn.DOCUMENT_FRAGMENT_NODE=11,a4=hn.NOTATION_NODE=12,Ui={},pi={};Ui.INDEX_SIZE_ERR=(pi[1]="Index size error",1),Ui.DOMSTRING_SIZE_ERR=(pi[2]="DOMString size error",2);var fn=Ui.HIERARCHY_REQUEST_ERR=(pi[3]="Hierarchy request error",3);Ui.WRONG_DOCUMENT_ERR=(pi[4]="Wrong document",4),Ui.INVALID_CHARACTER_ERR=(pi[5]="Invalid character",5),Ui.NO_DATA_ALLOWED_ERR=(pi[6]="No data allowed",6),Ui.NO_MODIFICATION_ALLOWED_ERR=(pi[7]="No modification allowed",7);var yT=Ui.NOT_FOUND_ERR=(pi[8]="Not found",8);Ui.NOT_SUPPORTED_ERR=(pi[9]="Not supported",9);var vT=Ui.INUSE_ATTRIBUTE_ERR=(pi[10]="Attribute in use",10);Ui.INVALID_STATE_ERR=(pi[11]="Invalid state",11),Ui.SYNTAX_ERR=(pi[12]="Syntax error",12),Ui.INVALID_MODIFICATION_ERR=(pi[13]="Invalid modification",13),Ui.NAMESPACE_ERR=(pi[14]="Invalid namespace",14),Ui.INVALID_ACCESS_ERR=(pi[15]="Invalid access",15);function Qt(s,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,pi[s]),this.message=pi[s],Error.captureStackTrace&&Error.captureStackTrace(this,Qt);return i.code=s,e&&(this.message=this.message+": "+e),i}Qt.prototype=Error.prototype,ad(Ui,Qt);function Ma(){}Ma.prototype={length:0,item:function(s){return s>=0&&s<this.length?this[s]:null},toString:function(s,e){for(var i=[],a=0;a<this.length;a++)$l(this[a],i,s,e);return i.join("")},filter:function(s){return Array.prototype.filter.call(this,s)},indexOf:function(s){return Array.prototype.indexOf.call(this,s)}};function ql(s,e){this._node=s,this._refresh=e,Wg(this)}function Wg(s){var e=s._node._inc||s._node.ownerDocument._inc;if(s._inc!==e){var i=s._refresh(s._node);if(PT(s,"length",i.length),!s.$$length||i.length<s.$$length)for(var a=i.length;a in s;a++)Object.prototype.hasOwnProperty.call(s,a)&&delete s[a];ad(i,s),s._inc=e}}ql.prototype.item=function(s){return Wg(this),this[s]||null},dn(ql,Ma);function Uf(){}function bT(s,e){for(var i=s.length;i--;)if(s[i]===e)return i}function _T(s,e,i,a){if(a?e[bT(e,a)]=i:e[e.length++]=i,s){i.ownerElement=s;var o=s.ownerDocument;o&&(a&&ET(o,s,a),r4(o,s,i))}}function TT(s,e,i){var a=bT(e,i);if(a>=0){for(var o=e.length-1;a<o;)e[a]=e[++a];if(e.length=o,s){var u=s.ownerDocument;u&&(ET(u,s,i),i.ownerElement=null)}}else throw new Qt(yT,new Error(s.tagName+"@"+i))}Uf.prototype={length:0,item:Ma.prototype.item,getNamedItem:function(s){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==s)return i}},setNamedItem:function(s){var e=s.ownerElement;if(e&&e!=this._ownerElement)throw new Qt(vT);var i=this.getNamedItem(s.nodeName);return _T(this._ownerElement,this,s,i),i},setNamedItemNS:function(s){var e=s.ownerElement,i;if(e&&e!=this._ownerElement)throw new Qt(vT);return i=this.getNamedItemNS(s.namespaceURI,s.localName),_T(this._ownerElement,this,s,i),i},removeNamedItem:function(s){var e=this.getNamedItem(s);return TT(this._ownerElement,this,e),e},removeNamedItemNS:function(s,e){var i=this.getNamedItemNS(s,e);return TT(this._ownerElement,this,i),i},getNamedItemNS:function(s,e){for(var i=this.length;i--;){var a=this[i];if(a.localName==e&&a.namespaceURI==s)return a}return null}};function ST(){}ST.prototype={hasFeature:function(s,e){return!0},createDocument:function(s,e,i){var a=new od;if(a.implementation=this,a.childNodes=new Ma,a.doctype=i||null,i&&a.appendChild(i),e){var o=a.createElementNS(s,e);a.appendChild(o)}return a},createDocumentType:function(s,e,i){var a=new Hf;return a.name=s,a.nodeName=s,a.publicId=e||"",a.systemId=i||"",a}};function St(){}St.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(s,e){return Bf(this,s,e)},replaceChild:function(s,e){Bf(this,s,e,DT),e&&this.removeChild(e)},removeChild:function(s){return CT(this,s)},appendChild:function(s){return this.insertBefore(s,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(s){return s0(this.ownerDocument||this,this,s)},normalize:function(){for(var s=this.firstChild;s;){var e=s.nextSibling;e&&e.nodeType==Nf&&s.nodeType==Nf?(this.removeChild(e),s.appendData(e.data)):(s.normalize(),s=e)}},isSupported:function(s,e){return this.ownerDocument.implementation.hasFeature(s,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(s){for(var e=this;e;){var i=e._nsMap;if(i){for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&i[a]===s)return a}e=e.nodeType==Vl?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(s){for(var e=this;e;){var i=e._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,s))return i[s];e=e.nodeType==Vl?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(s){var e=this.lookupPrefix(s);return e==null}};function xT(s){return s=="<"&&"&lt;"||s==">"&&"&gt;"||s=="&"&&"&amp;"||s=='"'&&"&quot;"||"&#"+s.charCodeAt()+";"}ad(hn,St),ad(hn,St.prototype);function rd(s,e){if(e(s))return!0;if(s=s.firstChild)do if(rd(s,e))return!0;while(s=s.nextSibling)}function od(){this.ownerDocument=this}function r4(s,e,i){s&&s._inc++;var a=i.namespaceURI;a===sd.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function ET(s,e,i,a){s&&s._inc++;var o=i.namespaceURI;o===sd.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function Qg(s,e,i){if(s&&s._inc){s._inc++;var a=e.childNodes;if(i)a[a.length++]=i;else{for(var o=e.firstChild,u=0;o;)a[u++]=o,o=o.nextSibling;a.length=u,delete a[a.length]}}}function CT(s,e){var i=e.previousSibling,a=e.nextSibling;return i?i.nextSibling=a:s.firstChild=a,a?a.previousSibling=i:s.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,Qg(s.ownerDocument,s),e}function o4(s){return s&&(s.nodeType===St.DOCUMENT_NODE||s.nodeType===St.DOCUMENT_FRAGMENT_NODE||s.nodeType===St.ELEMENT_NODE)}function l4(s){return s&&(Fs(s)||Kg(s)||La(s)||s.nodeType===St.DOCUMENT_FRAGMENT_NODE||s.nodeType===St.COMMENT_NODE||s.nodeType===St.PROCESSING_INSTRUCTION_NODE)}function La(s){return s&&s.nodeType===St.DOCUMENT_TYPE_NODE}function Fs(s){return s&&s.nodeType===St.ELEMENT_NODE}function Kg(s){return s&&s.nodeType===St.TEXT_NODE}function AT(s,e){var i=s.childNodes||[];if(Bs(i,Fs)||La(e))return!1;var a=Bs(i,La);return!(e&&a&&i.indexOf(a)>i.indexOf(e))}function wT(s,e){var i=s.childNodes||[];function a(u){return Fs(u)&&u!==e}if(Bs(i,a))return!1;var o=Bs(i,La);return!(e&&o&&i.indexOf(o)>i.indexOf(e))}function u4(s,e,i){if(!o4(s))throw new Qt(fn,"Unexpected parent node type "+s.nodeType);if(i&&i.parentNode!==s)throw new Qt(yT,"child not in parent");if(!l4(e)||La(e)&&s.nodeType!==St.DOCUMENT_NODE)throw new Qt(fn,"Unexpected node type "+e.nodeType+" for parent node type "+s.nodeType)}function c4(s,e,i){var a=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===St.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Fs);if(u.length>1||Bs(o,Kg))throw new Qt(fn,"More than one element or text in fragment");if(u.length===1&&!AT(s,i))throw new Qt(fn,"Element in fragment can not be inserted before doctype")}if(Fs(e)&&!AT(s,i))throw new Qt(fn,"Only one element can be added and only after doctype");if(La(e)){if(Bs(a,La))throw new Qt(fn,"Only one doctype is allowed");var c=Bs(a,Fs);if(i&&a.indexOf(c)<a.indexOf(i))throw new Qt(fn,"Doctype can only be inserted before an element");if(!i&&c)throw new Qt(fn,"Doctype can not be appended since element is present")}}function DT(s,e,i){var a=s.childNodes||[],o=e.childNodes||[];if(e.nodeType===St.DOCUMENT_FRAGMENT_NODE){var u=o.filter(Fs);if(u.length>1||Bs(o,Kg))throw new Qt(fn,"More than one element or text in fragment");if(u.length===1&&!wT(s,i))throw new Qt(fn,"Element in fragment can not be inserted before doctype")}if(Fs(e)&&!wT(s,i))throw new Qt(fn,"Only one element can be added and only after doctype");if(La(e)){if(Bs(a,function(m){return La(m)&&m!==i}))throw new Qt(fn,"Only one doctype is allowed");var c=Bs(a,Fs);if(i&&a.indexOf(c)<a.indexOf(i))throw new Qt(fn,"Doctype can only be inserted before an element")}}function Bf(s,e,i,a){u4(s,e,i),s.nodeType===St.DOCUMENT_NODE&&(a||c4)(s,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===Ra){var u=e.firstChild;if(u==null)return e;var c=e.lastChild}else u=c=e;var f=i?i.previousSibling:s.lastChild;u.previousSibling=f,c.nextSibling=i,f?f.nextSibling=u:s.firstChild=u,i==null?s.lastChild=c:i.previousSibling=c;do u.parentNode=s;while(u!==c&&(u=u.nextSibling));return Qg(s.ownerDocument||s,s),e.nodeType==Ra&&(e.firstChild=e.lastChild=null),e}function d4(s,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=s,e.previousSibling=s.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,s.lastChild=e,Qg(s.ownerDocument,s,e),e}od.prototype={nodeName:"#document",nodeType:mT,doctype:null,documentElement:null,_inc:1,insertBefore:function(s,e){if(s.nodeType==Ra){for(var i=s.firstChild;i;){var a=i.nextSibling;this.insertBefore(i,e),i=a}return s}return Bf(this,s,e),s.ownerDocument=this,this.documentElement===null&&s.nodeType===gs&&(this.documentElement=s),s},removeChild:function(s){return this.documentElement==s&&(this.documentElement=null),CT(this,s)},replaceChild:function(s,e){Bf(this,s,e,DT),s.ownerDocument=this,e&&this.removeChild(e),Fs(s)&&(this.documentElement=s)},importNode:function(s,e){return IT(this,s,e)},getElementById:function(s){var e=null;return rd(this.documentElement,function(i){if(i.nodeType==gs&&i.getAttribute("id")==s)return e=i,!0}),e},getElementsByClassName:function(s){var e=cT(s);return new ql(this,function(i){var a=[];return e.length>0&&rd(i.documentElement,function(o){if(o!==i&&o.nodeType===gs){var u=o.getAttribute("class");if(u){var c=s===u;if(!c){var f=cT(u);c=e.every(n4(f))}c&&a.push(o)}}}),a})},createElement:function(s){var e=new wo;e.ownerDocument=this,e.nodeName=s,e.tagName=s,e.localName=s,e.childNodes=new Ma;var i=e.attributes=new Uf;return i._ownerElement=e,e},createDocumentFragment:function(){var s=new jf;return s.ownerDocument=this,s.childNodes=new Ma,s},createTextNode:function(s){var e=new Zg;return e.ownerDocument=this,e.appendData(s),e},createComment:function(s){var e=new Jg;return e.ownerDocument=this,e.appendData(s),e},createCDATASection:function(s){var e=new e0;return e.ownerDocument=this,e.appendData(s),e},createProcessingInstruction:function(s,e){var i=new i0;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=s,i.nodeValue=i.data=e,i},createAttribute:function(s){var e=new Ff;return e.ownerDocument=this,e.name=s,e.nodeName=s,e.localName=s,e.specified=!0,e},createEntityReference:function(s){var e=new t0;return e.ownerDocument=this,e.nodeName=s,e},createElementNS:function(s,e){var i=new wo,a=e.split(":"),o=i.attributes=new Uf;return i.childNodes=new Ma,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=s,a.length==2?(i.prefix=a[0],i.localName=a[1]):i.localName=e,o._ownerElement=i,i},createAttributeNS:function(s,e){var i=new Ff,a=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=s,i.specified=!0,a.length==2?(i.prefix=a[0],i.localName=a[1]):i.localName=e,i}},dn(od,St);function wo(){this._nsMap={}}wo.prototype={nodeType:gs,hasAttribute:function(s){return this.getAttributeNode(s)!=null},getAttribute:function(s){var e=this.getAttributeNode(s);return e&&e.value||""},getAttributeNode:function(s){return this.attributes.getNamedItem(s)},setAttribute:function(s,e){var i=this.ownerDocument.createAttribute(s);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(s){var e=this.getAttributeNode(s);e&&this.removeAttributeNode(e)},appendChild:function(s){return s.nodeType===Ra?this.insertBefore(s,null):d4(this,s)},setAttributeNode:function(s){return this.attributes.setNamedItem(s)},setAttributeNodeNS:function(s){return this.attributes.setNamedItemNS(s)},removeAttributeNode:function(s){return this.attributes.removeNamedItem(s.nodeName)},removeAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(s,e){return this.getAttributeNodeNS(s,e)!=null},getAttributeNS:function(s,e){var i=this.getAttributeNodeNS(s,e);return i&&i.value||""},setAttributeNS:function(s,e,i){var a=this.ownerDocument.createAttributeNS(s,e);a.value=a.nodeValue=""+i,this.setAttributeNode(a)},getAttributeNodeNS:function(s,e){return this.attributes.getNamedItemNS(s,e)},getElementsByTagName:function(s){return new ql(this,function(e){var i=[];return rd(e,function(a){a!==e&&a.nodeType==gs&&(s==="*"||a.tagName==s)&&i.push(a)}),i})},getElementsByTagNameNS:function(s,e){return new ql(this,function(i){var a=[];return rd(i,function(o){o!==i&&o.nodeType===gs&&(s==="*"||o.namespaceURI===s)&&(e==="*"||o.localName==e)&&a.push(o)}),a})}},od.prototype.getElementsByTagName=wo.prototype.getElementsByTagName,od.prototype.getElementsByTagNameNS=wo.prototype.getElementsByTagNameNS,dn(wo,St);function Ff(){}Ff.prototype.nodeType=Vl,dn(Ff,St);function ld(){}ld.prototype={data:"",substringData:function(s,e){return this.data.substring(s,s+e)},appendData:function(s){s=this.data+s,this.nodeValue=this.data=s,this.length=s.length},insertData:function(s,e){this.replaceData(s,0,e)},appendChild:function(s){throw new Error(pi[fn])},deleteData:function(s,e){this.replaceData(s,e,"")},replaceData:function(s,e,i){var a=this.data.substring(0,s),o=this.data.substring(s+e);i=a+i+o,this.nodeValue=this.data=i,this.length=i.length}},dn(ld,St);function Zg(){}Zg.prototype={nodeName:"#text",nodeType:Nf,splitText:function(s){var e=this.data,i=e.substring(s);e=e.substring(0,s),this.data=this.nodeValue=e,this.length=e.length;var a=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling),a}},dn(Zg,ld);function Jg(){}Jg.prototype={nodeName:"#comment",nodeType:pT},dn(Jg,ld);function e0(){}e0.prototype={nodeName:"#cdata-section",nodeType:dT},dn(e0,ld);function Hf(){}Hf.prototype.nodeType=gT,dn(Hf,St);function kT(){}kT.prototype.nodeType=a4,dn(kT,St);function OT(){}OT.prototype.nodeType=s4,dn(OT,St);function t0(){}t0.prototype.nodeType=hT,dn(t0,St);function jf(){}jf.prototype.nodeName="#document-fragment",jf.prototype.nodeType=Ra,dn(jf,St);function i0(){}i0.prototype.nodeType=fT,dn(i0,St);function RT(){}RT.prototype.serializeToString=function(s,e,i){return MT.call(s,e,i)},St.prototype.toString=MT;function MT(s,e){var i=[],a=this.nodeType==9&&this.documentElement||this,o=a.prefix,u=a.namespaceURI;if(u&&o==null){var o=a.lookupPrefix(u);if(o==null)var c=[{namespace:u,prefix:null}]}return $l(this,i,s,e,c),i.join("")}function LT(s,e,i){var a=s.prefix||"",o=s.namespaceURI;if(!o||a==="xml"&&o===sd.XML||o===sd.XMLNS)return!1;for(var u=i.length;u--;){var c=i[u];if(c.prefix===a)return c.namespace!==o}return!0}function n0(s,e,i){s.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,xT),'"')}function $l(s,e,i,a,o){if(o||(o=[]),a)if(s=a(s),s){if(typeof s=="string"){e.push(s);return}}else return;switch(s.nodeType){case gs:var u=s.attributes,c=u.length,I=s.firstChild,f=s.tagName;i=sd.isHTML(s.namespaceURI)||i;var m=f;if(!i&&!s.prefix&&s.namespaceURI){for(var b,S=0;S<u.length;S++)if(u.item(S).name==="xmlns"){b=u.item(S).value;break}if(!b)for(var E=o.length-1;E>=0;E--){var A=o[E];if(A.prefix===""&&A.namespace===s.namespaceURI){b=A.namespace;break}}if(b!==s.namespaceURI)for(var E=o.length-1;E>=0;E--){var A=o[E];if(A.namespace===s.namespaceURI){A.prefix&&(m=A.prefix+":"+f);break}}}e.push("<",m);for(var R=0;R<c;R++){var N=u.item(R);N.prefix=="xmlns"?o.push({prefix:N.localName,namespace:N.value}):N.nodeName=="xmlns"&&o.push({prefix:"",namespace:N.value})}for(var R=0;R<c;R++){var N=u.item(R);if(LT(N,i,o)){var w=N.prefix||"",H=N.namespaceURI;n0(e,w?"xmlns:"+w:"xmlns",H),o.push({prefix:w,namespace:H})}$l(N,e,i,a,o)}if(f===m&&LT(s,i,o)){var w=s.prefix||"",H=s.namespaceURI;n0(e,w?"xmlns:"+w:"xmlns",H),o.push({prefix:w,namespace:H})}if(I||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(f)){if(e.push(">"),i&&/^script$/i.test(f))for(;I;)I.data?e.push(I.data):$l(I,e,i,a,o.slice()),I=I.nextSibling;else for(;I;)$l(I,e,i,a,o.slice()),I=I.nextSibling;e.push("</",m,">")}else e.push("/>");return;case mT:case Ra:for(var I=s.firstChild;I;)$l(I,e,i,a,o.slice()),I=I.nextSibling;return;case Vl:return n0(e,s.name,s.value);case Nf:return e.push(s.data.replace(/[<&>]/g,xT));case dT:return e.push("<![CDATA[",s.data,"]]>");case pT:return e.push("<!--",s.data,"-->");case gT:var G=s.publicId,F=s.systemId;if(e.push("<!DOCTYPE ",s.name),G)e.push(" PUBLIC ",G),F&&F!="."&&e.push(" ",F),e.push(">");else if(F&&F!=".")e.push(" SYSTEM ",F,">");else{var Y=s.internalSubset;Y&&e.push(" [",Y,"]"),e.push(">")}return;case fT:return e.push("<?",s.target," ",s.data,"?>");case hT:return e.push("&",s.nodeName,";");default:e.push("??",s.nodeName)}}function IT(s,e,i){var a;switch(e.nodeType){case gs:a=e.cloneNode(!1),a.ownerDocument=s;case Ra:break;case Vl:i=!0;break}if(a||(a=e.cloneNode(!1)),a.ownerDocument=s,a.parentNode=null,i)for(var o=e.firstChild;o;)a.appendChild(IT(s,o,i)),o=o.nextSibling;return a}function s0(s,e,i){var a=new e.constructor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=e[o];typeof u!="object"&&u!=a[o]&&(a[o]=u)}switch(e.childNodes&&(a.childNodes=new Ma),a.ownerDocument=s,a.nodeType){case gs:var c=e.attributes,f=a.attributes=new Uf,m=c.length;f._ownerElement=a;for(var b=0;b<m;b++)a.setAttributeNode(s0(s,c.item(b),!0));break;case Vl:i=!0}if(i)for(var S=e.firstChild;S;)a.appendChild(s0(s,S,i)),S=S.nextSibling;return a}function PT(s,e,i){s[e]=i}try{if(Object.defineProperty){let s=function(e){switch(e.nodeType){case gs:case Ra:var i=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&i.push(s(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}};Object.defineProperty(ql.prototype,"length",{get:function(){return Wg(this),this.$$length}}),Object.defineProperty(St.prototype,"textContent",{get:function(){return s(this)},set:function(e){switch(this.nodeType){case gs:case Ra:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),PT=function(e,i,a){e["$$"+i]=a}}}catch{}Er.DocumentType=Hf,Er.DOMException=Qt,Er.DOMImplementation=ST,Er.Element=wo,Er.Node=St,Er.NodeList=Ma,Er.XMLSerializer=RT;var zf={},NT={};(function(s){var e=Oa.freeze;s.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),s.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"",dd:"",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:"",emsp13:"",emsp14:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"",escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",ExponentialE:"",exponentiale:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",Fscr:"",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"",hfr:"𝔥",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",Lscr:"",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"",midast:"*",midcir:"⫰",middot:"·",minus:"",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",Or:"⩔",or:"",orarr:"↻",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",Popf:"",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"",rationals:"",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"",real:"",realine:"",realpart:"",reals:"",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",Rscr:"",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",thinsp:"",ThinSpace:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",Tilde:"",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"",vee:"",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),s.entityMap=s.HTML_ENTITIES})(NT);var a0={},ud=Oa.NAMESPACE,r0=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,UT=new RegExp("[\\-\\.0-9"+r0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),BT=new RegExp("^"+r0.source+UT.source+"*(?::"+r0.source+UT.source+"*)?$"),cd=0,Cr=1,Gl=2,dd=3,Xl=4,Yl=5,hd=6,Vf=7;function Wl(s,e){this.message=s,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Wl)}Wl.prototype=new Error,Wl.prototype.name=Wl.name;function FT(){}FT.prototype={parse:function(s,e,i){var a=this.domBuilder;a.startDocument(),zT(e,e={}),h4(s,e,i,a,this.errorHandler),a.endDocument()}};function h4(s,e,i,a,o){function u(de){if(de>65535){de-=65536;var xe=55296+(de>>10),Me=56320+(de&1023);return String.fromCharCode(xe,Me)}else return String.fromCharCode(de)}function c(de){var xe=de.slice(1,-1);return Object.hasOwnProperty.call(i,xe)?i[xe]:xe.charAt(0)==="#"?u(parseInt(xe.substr(1).replace("x","0x"))):(o.error("entity not found:"+de),de)}function f(de){if(de>w){var xe=s.substring(w,de).replace(/&#?\w+;/g,c);A&&m(w),a.characters(xe,0,de-w),w=de}}function m(de,xe){for(;de>=S&&(xe=E.exec(s));)b=xe.index,S=b+xe[0].length,A.lineNumber++;A.columnNumber=de-b+1}for(var b=0,S=0,E=/.*(?:\r\n?|\n)|.*$/g,A=a.locator,R=[{currentNSMap:e}],N={},w=0;;){try{var H=s.indexOf("<",w);if(H<0){if(!s.substr(w).match(/^\s*$/)){var I=a.doc,G=I.createTextNode(s.substr(w));I.appendChild(G),a.currentElement=G}return}switch(H>w&&f(H),s.charAt(H+1)){case"/":var be=s.indexOf(">",H+3),F=s.substring(H+2,be).replace(/[ \t\n\r]+$/g,""),Y=R.pop();be<0?(F=s.substring(H+2).replace(/[\s<].*/,""),o.error("end tag name: "+F+" is not complete:"+Y.tagName),be=H+1+F.length):F.match(/\s</)&&(F=F.replace(/[\s<].*/,""),o.error("end tag name: "+F+" maybe not complete"),be=H+1+F.length);var K=Y.localNSMap,se=Y.tagName==F,Q=se||Y.tagName&&Y.tagName.toLowerCase()==F.toLowerCase();if(Q){if(a.endElement(Y.uri,Y.localName,F),K)for(var le in K)Object.prototype.hasOwnProperty.call(K,le)&&a.endPrefixMapping(le);se||o.fatalError("end tag name: "+F+" is not match the current start tagName:"+Y.tagName)}else R.push(Y);be++;break;case"?":A&&m(H),be=y4(s,H,a);break;case"!":A&&m(H),be=g4(s,H,a,o);break;default:A&&m(H);var ue=new VT,Ie=R[R.length-1].currentNSMap,be=f4(s,H,ue,Ie,c,o),Ae=ue.length;if(!ue.closed&&m4(s,be,ue.tagName,N)&&(ue.closed=!0,i.nbsp||o.warning("unclosed xml attribute")),A&&Ae){for(var fe=HT(A,{}),Pe=0;Pe<Ae;Pe++){var rt=ue[Pe];m(rt.offset),rt.locator=HT(A,{})}a.locator=fe,jT(ue,a,Ie)&&R.push(ue),a.locator=A}else jT(ue,a,Ie)&&R.push(ue);ud.isHTML(ue.uri)&&!ue.closed?be=p4(s,be,ue.tagName,c,a):be++}}catch(de){if(de instanceof Wl)throw de;o.error("element parse error: "+de),be=-1}be>w?w=be:f(Math.max(H,w)+1)}}function HT(s,e){return e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber,e}function f4(s,e,i,a,o,u){function c(A,R,N){i.attributeNames.hasOwnProperty(A)&&u.fatalError("Attribute "+A+" redefined"),i.addValue(A,R.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),N)}for(var f,m,b=++e,S=cd;;){var E=s.charAt(b);switch(E){case"=":if(S===Cr)f=s.slice(e,b),S=dd;else if(S===Gl)S=dd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(S===dd||S===Cr)if(S===Cr&&(u.warning('attribute value must after "="'),f=s.slice(e,b)),e=b+1,b=s.indexOf(E,e),b>0)m=s.slice(e,b),c(f,m,e-1),S=Yl;else throw new Error("attribute value no end '"+E+"' match");else if(S==Xl)m=s.slice(e,b),c(f,m,e),u.warning('attribute "'+f+'" missed start quot('+E+")!!"),e=b+1,S=Yl;else throw new Error('attribute value must after "="');break;case"/":switch(S){case cd:i.setTagName(s.slice(e,b));case Yl:case hd:case Vf:S=Vf,i.closed=!0;case Xl:case Cr:break;case Gl:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),S==cd&&i.setTagName(s.slice(e,b)),b;case">":switch(S){case cd:i.setTagName(s.slice(e,b));case Yl:case hd:case Vf:break;case Xl:case Cr:m=s.slice(e,b),m.slice(-1)==="/"&&(i.closed=!0,m=m.slice(0,-1));case Gl:S===Gl&&(m=f),S==Xl?(u.warning('attribute "'+m+'" missed quot(")!'),c(f,m,e)):((!ud.isHTML(a[""])||!m.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+m+'" missed value!! "'+m+'" instead!!'),c(m,m,e));break;case dd:throw new Error("attribute value missed!!")}return b;case"€":E=" ";default:if(E<=" ")switch(S){case cd:i.setTagName(s.slice(e,b)),S=hd;break;case Cr:f=s.slice(e,b),S=Gl;break;case Xl:var m=s.slice(e,b);u.warning('attribute "'+m+'" missed quot(")!!'),c(f,m,e);case Yl:S=hd;break}else switch(S){case Gl:i.tagName,(!ud.isHTML(a[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),c(f,f,e),e=b,S=Cr;break;case Yl:u.warning('attribute space is required"'+f+'"!!');case hd:S=Cr,e=b;break;case dd:S=Xl,e=b;break;case Vf:throw new Error("elements closed character '/' and '>' must be connected to")}}b++}}function jT(s,e,i){for(var a=s.tagName,o=null,E=s.length;E--;){var u=s[E],c=u.qName,f=u.value,A=c.indexOf(":");if(A>0)var m=u.prefix=c.slice(0,A),b=c.slice(A+1),S=m==="xmlns"&&b;else b=c,m=null,S=c==="xmlns"&&"";u.localName=b,S!==!1&&(o==null&&(o={},zT(i,i={})),i[S]=o[S]=f,u.uri=ud.XMLNS,e.startPrefixMapping(S,f))}for(var E=s.length;E--;){u=s[E];var m=u.prefix;m&&(m==="xml"&&(u.uri=ud.XML),m!=="xmlns"&&(u.uri=i[m||""]))}var A=a.indexOf(":");A>0?(m=s.prefix=a.slice(0,A),b=s.localName=a.slice(A+1)):(m=null,b=s.localName=a);var R=s.uri=i[m||""];if(e.startElement(R,b,a,s),s.closed){if(e.endElement(R,b,a),o)for(m in o)Object.prototype.hasOwnProperty.call(o,m)&&e.endPrefixMapping(m)}else return s.currentNSMap=i,s.localNSMap=o,!0}function p4(s,e,i,a,o){if(/^(?:script|textarea)$/i.test(i)){var u=s.indexOf("</"+i+">",e),c=s.substring(e+1,u);if(/[&<]/.test(c))return/^script$/i.test(i)?(o.characters(c,0,c.length),u):(c=c.replace(/&#?\w+;/g,a),o.characters(c,0,c.length),u)}return e+1}function m4(s,e,i,a){var o=a[i];return o==null&&(o=s.lastIndexOf("</"+i+">"),o<e&&(o=s.lastIndexOf("</"+i)),a[i]=o),o<e}function zT(s,e){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}function g4(s,e,i,a){var o=s.charAt(e+2);switch(o){case"-":if(s.charAt(e+3)==="-"){var u=s.indexOf("-->",e+4);return u>e?(i.comment(s,e+4,u-e-4),u+3):(a.error("Unclosed comment"),-1)}else return-1;default:if(s.substr(e+3,6)=="CDATA["){var u=s.indexOf("]]>",e+9);return i.startCDATA(),i.characters(s,e+9,u-e-9),i.endCDATA(),u+3}var c=v4(s,e),f=c.length;if(f>1&&/!doctype/i.test(c[0][0])){var m=c[1][0],b=!1,S=!1;f>3&&(/^public$/i.test(c[2][0])?(b=c[3][0],S=f>4&&c[4][0]):/^system$/i.test(c[2][0])&&(S=c[3][0]));var E=c[f-1];return i.startDTD(m,b,S),i.endDTD(),E.index+E[0].length}}return-1}function y4(s,e,i){var a=s.indexOf("?>",e);if(a){var o=s.substring(e,a).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,i.processingInstruction(o[1],o[2]),a+2):-1}return-1}function VT(){this.attributeNames={}}VT.prototype={setTagName:function(s){if(!BT.test(s))throw new Error("invalid tagName:"+s);this.tagName=s},addValue:function(s,e,i){if(!BT.test(s))throw new Error("invalid attribute:"+s);this.attributeNames[s]=this.length,this[this.length++]={qName:s,value:e,offset:i}},length:0,getLocalName:function(s){return this[s].localName},getLocator:function(s){return this[s].locator},getQName:function(s){return this[s].qName},getURI:function(s){return this[s].uri},getValue:function(s){return this[s].value}};function v4(s,e){var i,a=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=e,o.exec(s);i=o.exec(s);)if(a.push(i),i[1])return a}a0.XMLReader=FT,a0.ParseError=Wl;var b4=Oa,_4=Er,qT=NT,$T=a0,T4=_4.DOMImplementation,GT=b4.NAMESPACE,S4=$T.ParseError,x4=$T.XMLReader;function XT(s){return s.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function YT(s){this.options=s||{locator:{}}}YT.prototype.parseFromString=function(s,e){var i=this.options,a=new x4,o=i.domBuilder||new fd,u=i.errorHandler,c=i.locator,f=i.xmlns||{},m=/\/x?html?$/.test(e),b=m?qT.HTML_ENTITIES:qT.XML_ENTITIES;c&&o.setDocumentLocator(c),a.errorHandler=E4(u,o,c),a.domBuilder=i.domBuilder||o,m&&(f[""]=GT.HTML),f.xml=f.xml||GT.XML;var S=i.normalizeLineEndings||XT;return s&&typeof s=="string"?a.parse(S(s),f,b):a.errorHandler.error("invalid doc source"),o.doc};function E4(s,e,i){if(!s){if(e instanceof fd)return e;s=e}var a={},o=s instanceof Function;i=i||{};function u(c){var f=s[c];!f&&o&&(f=s.length==2?function(m){s(c,m)}:s),a[c]=f&&function(m){f("[xmldom "+c+"] "+m+o0(i))}||function(){}}return u("warning"),u("error"),u("fatalError"),a}function fd(){this.cdata=!1}function Ql(s,e){e.lineNumber=s.lineNumber,e.columnNumber=s.columnNumber}fd.prototype={startDocument:function(){this.doc=new T4().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(s,e,i,a){var o=this.doc,u=o.createElementNS(s,i||e),c=a.length;qf(this,u),this.currentElement=u,this.locator&&Ql(this.locator,u);for(var f=0;f<c;f++){var s=a.getURI(f),m=a.getValue(f),i=a.getQName(f),b=o.createAttributeNS(s,i);this.locator&&Ql(a.getLocator(f),b),b.value=b.nodeValue=m,u.setAttributeNode(b)}},endElement:function(s,e,i){var a=this.currentElement;a.tagName,this.currentElement=a.parentNode},startPrefixMapping:function(s,e){},endPrefixMapping:function(s){},processingInstruction:function(s,e){var i=this.doc.createProcessingInstruction(s,e);this.locator&&Ql(this.locator,i),qf(this,i)},ignorableWhitespace:function(s,e,i){},characters:function(s,e,i){if(s=WT.apply(this,arguments),s){if(this.cdata)var a=this.doc.createCDATASection(s);else var a=this.doc.createTextNode(s);this.currentElement?this.currentElement.appendChild(a):/^\s*$/.test(s)&&this.doc.appendChild(a),this.locator&&Ql(this.locator,a)}},skippedEntity:function(s){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(s){(this.locator=s)&&(s.lineNumber=0)},comment:function(s,e,i){s=WT.apply(this,arguments);var a=this.doc.createComment(s);this.locator&&Ql(this.locator,a),qf(this,a)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(s,e,i){var a=this.doc.implementation;if(a&&a.createDocumentType){var o=a.createDocumentType(s,e,i);this.locator&&Ql(this.locator,o),qf(this,o),this.doc.doctype=o}},warning:function(s){console.warn("[xmldom warning] "+s,o0(this.locator))},error:function(s){console.error("[xmldom error] "+s,o0(this.locator))},fatalError:function(s){throw new S4(s,this.locator)}};function o0(s){if(s)return`
@`+(s.systemId||"")+"#[line:"+s.lineNumber+",col:"+s.columnNumber+"]"}function WT(s,e,i){return typeof s=="string"?s.substr(e,i):s.length>=e+i||e?new java.lang.String(s,e,i)+"":s}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(s){fd.prototype[s]=function(){return null}});function qf(s,e){s.currentElement?s.currentElement.appendChild(e):s.doc.appendChild(e)}zf.__DOMHandler=fd,zf.normalizeLineEndings=XT,zf.DOMParser=YT;var C4=zf.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const QT=s=>!!s&&typeof s=="object",mi=(...s)=>s.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(a=>{Array.isArray(e[a])&&Array.isArray(i[a])?e[a]=e[a].concat(i[a]):QT(e[a])&&QT(i[a])?e[a]=mi(e[a],i[a]):e[a]=i[a]}),e),{}),KT=s=>Object.keys(s).map(e=>s[e]),A4=(s,e)=>{const i=[];for(let a=s;a<e;a++)i.push(a);return i},Kl=s=>s.reduce((e,i)=>e.concat(i),[]),ZT=s=>{if(!s.length)return[];const e=[];for(let i=0;i<s.length;i++)e.push(s[i]);return e},w4=(s,e)=>s.reduce((i,a,o)=>(a[e]&&i.push(o),i),[]),D4=(s,e)=>KT(s.reduce((i,a)=>(a.forEach(o=>{i[e(o)]=o}),i),{}));var Zl={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const pd=({baseUrl:s="",source:e="",range:i="",indexRange:a=""})=>{const o={uri:e,resolvedUri:Pf(s||"",e)};if(i||a){const c=(i||a).split("-");let f=B.BigInt?B.BigInt(c[0]):parseInt(c[0],10),m=B.BigInt?B.BigInt(c[1]):parseInt(c[1],10);f<Number.MAX_SAFE_INTEGER&&typeof f=="bigint"&&(f=Number(f)),m<Number.MAX_SAFE_INTEGER&&typeof m=="bigint"&&(m=Number(m));let b;typeof m=="bigint"||typeof f=="bigint"?b=B.BigInt(m)-B.BigInt(f)+B.BigInt(1):b=m-f+1,typeof b=="bigint"&&b<Number.MAX_SAFE_INTEGER&&(b=Number(b)),o.byterange={length:b,offset:f}}return o},k4=s=>{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=B.BigInt(s.offset)+B.BigInt(s.length)-B.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},JT=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),O4={static(s){const{duration:e,timescale:i=1,sourceDuration:a,periodDuration:o}=s,u=JT(s.endNumber),c=e/i;return typeof u=="number"?{start:0,end:u}:typeof o=="number"?{start:0,end:o/c}:{start:0,end:a/c}},dynamic(s){const{NOW:e,clientOffset:i,availabilityStartTime:a,timescale:o=1,duration:u,periodStart:c=0,minimumUpdatePeriod:f=0,timeShiftBufferDepth:m=1/0}=s,b=JT(s.endNumber),S=(e+i)/1e3,E=a+c,R=S+f-E,N=Math.ceil(R*o/u),w=Math.floor((S-E-m)*o/u),H=Math.floor((S-E)*o/u);return{start:Math.max(0,w),end:typeof b=="number"?b:Math.min(N,H)}}},R4=s=>e=>{const{duration:i,timescale:a=1,periodStart:o,startNumber:u=1}=s;return{number:u+e,duration:i/a,timeline:o,time:e*i}},l0=s=>{const{type:e,duration:i,timescale:a=1,periodDuration:o,sourceDuration:u}=s,{start:c,end:f}=O4[e](s),m=A4(c,f).map(R4(s));if(e==="static"){const b=m.length-1,S=typeof o=="number"?o:u;m[b].duration=S-i/a*b}return m},e1=s=>{const{baseUrl:e,initialization:i={},sourceDuration:a,indexRange:o="",periodStart:u,presentationTime:c,number:f=0,duration:m}=s;if(!e)throw new Error(Zl.NO_BASE_URL);const b=pd({baseUrl:e,source:i.sourceURL,range:i.range}),S=pd({baseUrl:e,source:e,indexRange:o});if(S.map=b,m){const E=l0(s);E.length&&(S.duration=E[0].duration,S.timeline=E[0].timeline)}else a&&(S.duration=a,S.timeline=u);return S.presentationTime=c||u,S.number=f,[S]},u0=(s,e,i)=>{const a=s.sidx.map?s.sidx.map:null,o=s.sidx.duration,u=s.timeline||0,c=s.sidx.byterange,f=c.offset+c.length,m=e.timescale,b=e.references.filter(H=>H.referenceType!==1),S=[],E=s.endList?"static":"dynamic",A=s.sidx.timeline;let R=A,N=s.mediaSequence||0,w;typeof e.firstOffset=="bigint"?w=B.BigInt(f)+e.firstOffset:w=f+e.firstOffset;for(let H=0;H<b.length;H++){const I=e.references[H],G=I.referencedSize,F=I.subsegmentDuration;let Y;typeof w=="bigint"?Y=w+B.BigInt(G)-B.BigInt(1):Y=w+G-1;const K=`${w}-${Y}`,Q=e1({baseUrl:i,timescale:m,timeline:u,periodStart:A,presentationTime:R,number:N,duration:F,sourceDuration:o,indexRange:K,type:E})[0];a&&(Q.map=a),S.push(Q),typeof w=="bigint"?w+=B.BigInt(G):w+=G,R+=F/m,N++}return s.segments=S,s},M4=["AUDIO","SUBTITLES"],L4=1/60,t1=s=>D4(s,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),I4=(s,e)=>{for(let i=0;i<s.length;i++)if(s[i].attributes.NAME===e)return s[i];return null},i1=s=>{let e=[];return Kk(s,M4,(i,a,o,u)=>{e=e.concat(i.playlists||[])}),e},n1=({playlist:s,mediaSequence:e})=>{s.mediaSequence=e,s.segments.forEach((i,a)=>{i.number=s.mediaSequence+a})},P4=({oldPlaylists:s,newPlaylists:e,timelineStarts:i})=>{e.forEach(a=>{a.discontinuitySequence=i.findIndex(function({timeline:m}){return m===a.timeline});const o=I4(s,a.attributes.NAME);if(!o||a.sidx)return;const u=a.segments[0],c=o.segments.findIndex(function(m){return Math.abs(m.presentationTime-u.presentationTime)<L4});if(c===-1){n1({playlist:a,mediaSequence:o.mediaSequence+o.segments.length}),a.segments[0].discontinuity=!0,a.discontinuityStarts.unshift(0),(!o.segments.length&&a.timeline>o.timeline||o.segments.length&&a.timeline>o.segments[o.segments.length-1].timeline)&&a.discontinuitySequence--;return}o.segments[c].discontinuity&&!u.discontinuity&&(u.discontinuity=!0,a.discontinuityStarts.unshift(0),a.discontinuitySequence--),n1({playlist:a,mediaSequence:o.segments[c].number})})},N4=({oldManifest:s,newManifest:e})=>{const i=s.playlists.concat(i1(s)),a=e.playlists.concat(i1(e));return e.timelineStarts=t1([s.timelineStarts,e.timelineStarts]),P4({oldPlaylists:i,newPlaylists:a,timelineStarts:e.timelineStarts}),e},$f=s=>s&&s.uri+"-"+k4(s.byterange),c0=s=>{const e=s.reduce(function(a,o){return a[o.attributes.baseUrl]||(a[o.attributes.baseUrl]=[]),a[o.attributes.baseUrl].push(o),a},{});let i=[];return Object.values(e).forEach(a=>{const o=KT(a.reduce((u,c)=>{const f=c.attributes.id+(c.attributes.lang||"");return u[f]?(c.segments&&(c.segments[0]&&(c.segments[0].discontinuity=!0),u[f].segments.push(...c.segments)),c.attributes.contentProtection&&(u[f].attributes.contentProtection=c.attributes.contentProtection)):(u[f]=c,u[f].attributes.timelineStarts=[]),u[f].attributes.timelineStarts.push({start:c.attributes.periodStart,timeline:c.attributes.periodStart}),u},{}));i=i.concat(o)}),i.map(a=>(a.discontinuityStarts=w4(a.segments||[],"discontinuity"),a))},d0=(s,e)=>{const i=$f(s.sidx),a=i&&e[i]&&e[i].sidx;return a&&u0(s,a,s.sidx.resolvedUri),s},U4=(s,e={})=>{if(!Object.keys(e).length)return s;for(const i in s)s[i]=d0(s[i],e);return s},B4=({attributes:s,segments:e,sidx:i,mediaSequence:a,discontinuitySequence:o,discontinuityStarts:u},c)=>{const f={attributes:{NAME:s.id,BANDWIDTH:s.bandwidth,CODECS:s.codecs,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:s.timelineStarts,mediaSequence:a,segments:e};return s.contentProtection&&(f.contentProtection=s.contentProtection),s.serviceLocation&&(f.attributes.serviceLocation=s.serviceLocation),i&&(f.sidx=i),c&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f},F4=({attributes:s,segments:e,mediaSequence:i,discontinuityStarts:a,discontinuitySequence:o})=>{typeof e>"u"&&(e=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);const u={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(u.CODECS=s.codecs);const c={attributes:u,uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:e};return s.serviceLocation&&(c.attributes.serviceLocation=s.serviceLocation),c},H4=(s,e={},i=!1)=>{let a;const o=s.reduce((u,c)=>{const f=c.attributes.role&&c.attributes.role.value||"",m=c.attributes.lang||"";let b=c.attributes.label||"main";if(m&&!c.attributes.label){const E=f?` (${f})`:"";b=`${c.attributes.lang}${E}`}u[b]||(u[b]={language:m,autoselect:!0,default:f==="main",playlists:[],uri:""});const S=d0(B4(c,i),e);return u[b].playlists.push(S),typeof a>"u"&&f==="main"&&(a=c,a.default=!0),u},{});if(!a){const u=Object.keys(o)[0];o[u].default=!0}return o},j4=(s,e={})=>s.reduce((i,a)=>{const o=a.attributes.label||a.attributes.lang||"text",u=a.attributes.lang||"und";return i[o]||(i[o]={language:u,default:!1,autoselect:!1,playlists:[],uri:""}),i[o].playlists.push(d0(F4(a),e)),i},{}),z4=s=>s.reduce((e,i)=>(i&&i.forEach(a=>{const{channel:o,language:u}=a;e[u]={autoselect:!1,default:!1,instreamId:o,language:u},a.hasOwnProperty("aspectRatio")&&(e[u].aspectRatio=a.aspectRatio),a.hasOwnProperty("easyReader")&&(e[u].easyReader=a.easyReader),a.hasOwnProperty("3D")&&(e[u]["3D"]=a["3D"])}),e),{}),V4=({attributes:s,segments:e,sidx:i,discontinuityStarts:a})=>{const o={attributes:{NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuityStarts:a,timelineStarts:s.timelineStarts,segments:e};return s.frameRate&&(o.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(o.contentProtection=s.contentProtection),s.serviceLocation&&(o.attributes.serviceLocation=s.serviceLocation),i&&(o.sidx=i),o},q4=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",$4=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",G4=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",X4=(s,e)=>{s.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:a}){return a===i.timeline}),i.segments&&i.segments.forEach((a,o)=>{a.number=o})})},s1=s=>s?Object.keys(s).reduce((e,i)=>{const a=s[i];return e.concat(a.playlists)},[]):[],Y4=({dashPlaylists:s,locations:e,contentSteering:i,sidxMapping:a={},previousManifest:o,eventStream:u})=>{if(!s.length)return{};const{sourceDuration:c,type:f,suggestedPresentationDelay:m,minimumUpdatePeriod:b}=s[0].attributes,S=c0(s.filter(q4)).map(V4),E=c0(s.filter($4)),A=c0(s.filter(G4)),R=s.map(Y=>Y.attributes.captionServices).filter(Boolean),N={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:c,playlists:U4(S,a)};b>=0&&(N.minimumUpdatePeriod=b*1e3),e&&(N.locations=e),i&&(N.contentSteering=i),f==="dynamic"&&(N.suggestedPresentationDelay=m),u&&u.length>0&&(N.eventStream=u);const w=N.playlists.length===0,H=E.length?H4(E,a,w):null,I=A.length?j4(A,a):null,G=S.concat(s1(H),s1(I)),F=G.map(({timelineStarts:Y})=>Y);return N.timelineStarts=t1(F),X4(G,N.timelineStarts),H&&(N.mediaGroups.AUDIO.audio=H),I&&(N.mediaGroups.SUBTITLES.subs=I),R.length&&(N.mediaGroups["CLOSED-CAPTIONS"].cc=z4(R)),o?N4({oldManifest:o,newManifest:N}):N},W4=(s,e,i)=>{const{NOW:a,clientOffset:o,availabilityStartTime:u,timescale:c=1,periodStart:f=0,minimumUpdatePeriod:m=0}=s,b=(a+o)/1e3,S=u+f,A=b+m-S;return Math.ceil((A*c-e)/i)},a1=(s,e)=>{const{type:i,minimumUpdatePeriod:a=0,media:o="",sourceDuration:u,timescale:c=1,startNumber:f=1,periodStart:m}=s,b=[];let S=-1;for(let E=0;E<e.length;E++){const A=e[E],R=A.d,N=A.r||0,w=A.t||0;S<0&&(S=w),w&&w>S&&(S=w);let H;if(N<0){const F=E+1;F===e.length?i==="dynamic"&&a>0&&o.indexOf("$Number$")>0?H=W4(s,S,R):H=(u*c-S)/R:H=(e[F].t-S)/R}else H=N+1;const I=f+b.length+H;let G=f+b.length;for(;G<I;)b.push({number:G,duration:R/c,time:S,timeline:m}),S+=R,G++}return b},Q4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,K4=s=>(e,i,a,o)=>{if(e==="$$")return"$";if(typeof s[i]>"u")return e;const u=""+s[i];return i==="RepresentationID"||(a?o=parseInt(o,10):o=1,u.length>=o)?u:`${new Array(o-u.length+1).join("0")}${u}`},r1=(s,e)=>s.replace(Q4,K4(e)),Z4=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?l0(s):a1(s,e),J4=(s,e)=>{const i={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:a={sourceURL:"",range:""}}=s,o=pd({baseUrl:s.baseUrl,source:r1(a.sourceURL,i),range:a.range});return Z4(s,e).map(c=>{i.Number=c.number,i.Time=c.time;const f=r1(s.media||"",i),m=s.timescale||1,b=s.presentationTimeOffset||0,S=s.periodStart+(c.time-b)/m;return{uri:f,timeline:c.timeline,duration:c.duration,resolvedUri:Pf(s.baseUrl||"",f),map:o,number:c.number,presentationTime:S}})},e3=(s,e)=>{const{baseUrl:i,initialization:a={}}=s,o=pd({baseUrl:i,source:a.sourceURL,range:a.range}),u=pd({baseUrl:i,source:e.media,range:e.mediaRange});return u.map=o,u},t3=(s,e)=>{const{duration:i,segmentUrls:a=[],periodStart:o}=s;if(!i&&!e||i&&e)throw new Error(Zl.SEGMENT_TIME_UNSPECIFIED);const u=a.map(m=>e3(s,m));let c;return i&&(c=l0(s)),e&&(c=a1(s,e)),c.map((m,b)=>{if(u[b]){const S=u[b],E=s.timescale||1,A=s.presentationTimeOffset||0;return S.timeline=m.timeline,S.duration=m.duration,S.number=m.number,S.presentationTime=o+(m.time-A)/E,S}}).filter(m=>m)},i3=({attributes:s,segmentInfo:e})=>{let i,a;e.template?(a=J4,i=mi(s,e.template)):e.base?(a=e1,i=mi(s,e.base)):e.list&&(a=t3,i=mi(s,e.list));const o={attributes:s};if(!a)return o;const u=a(i,e.segmentTimeline);if(i.duration){const{duration:c,timescale:f=1}=i;i.duration=c/f}else u.length?i.duration=u.reduce((c,f)=>Math.max(c,Math.ceil(f.duration)),0):i.duration=0;return o.attributes=i,o.segments=u,e.base&&i.indexRange&&(o.sidx=u[0],o.segments=[]),o},n3=s=>s.map(i3),Ut=(s,e)=>ZT(s.childNodes).filter(({tagName:i})=>i===e),md=s=>s.textContent.trim(),s3=s=>parseFloat(s.split("/").reduce((e,i)=>e/i)),Jl=s=>{const f=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(s);if(!f)return 0;const[m,b,S,E,A,R]=f.slice(1);return parseFloat(m||0)*31536e3+parseFloat(b||0)*2592e3+parseFloat(S||0)*86400+parseFloat(E||0)*3600+parseFloat(A||0)*60+parseFloat(R||0)},a3=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),o1={mediaPresentationDuration(s){return Jl(s)},availabilityStartTime(s){return a3(s)/1e3},minimumUpdatePeriod(s){return Jl(s)},suggestedPresentationDelay(s){return Jl(s)},type(s){return s},timeShiftBufferDepth(s){return Jl(s)},start(s){return Jl(s)},width(s){return parseInt(s,10)},height(s){return parseInt(s,10)},bandwidth(s){return parseInt(s,10)},frameRate(s){return s3(s)},startNumber(s){return parseInt(s,10)},timescale(s){return parseInt(s,10)},presentationTimeOffset(s){return parseInt(s,10)},duration(s){const e=parseInt(s,10);return isNaN(e)?Jl(s):e},d(s){return parseInt(s,10)},t(s){return parseInt(s,10)},r(s){return parseInt(s,10)},presentationTime(s){return parseInt(s,10)},DEFAULT(s){return s}},ni=s=>s&&s.attributes?ZT(s.attributes).reduce((e,i)=>{const a=o1[i.name]||o1.DEFAULT;return e[i.name]=a(i.value),e},{}):{},r3={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Gf=(s,e)=>e.length?Kl(s.map(function(i){return e.map(function(a){const o=md(a),u=Pf(i.baseUrl,o),c=mi(ni(a),{baseUrl:u});return u!==o&&!c.serviceLocation&&i.serviceLocation&&(c.serviceLocation=i.serviceLocation),c})})):s,h0=s=>{const e=Ut(s,"SegmentTemplate")[0],i=Ut(s,"SegmentList")[0],a=i&&Ut(i,"SegmentURL").map(E=>mi({tag:"SegmentURL"},ni(E))),o=Ut(s,"SegmentBase")[0],u=i||e,c=u&&Ut(u,"SegmentTimeline")[0],f=i||o||e,m=f&&Ut(f,"Initialization")[0],b=e&&ni(e);b&&m?b.initialization=m&&ni(m):b&&b.initialization&&(b.initialization={sourceURL:b.initialization});const S={template:b,segmentTimeline:c&&Ut(c,"S").map(E=>ni(E)),list:i&&mi(ni(i),{segmentUrls:a,initialization:ni(m)}),base:o&&mi(ni(o),{initialization:ni(m)})};return Object.keys(S).forEach(E=>{S[E]||delete S[E]}),S},o3=(s,e,i)=>a=>{const o=Ut(a,"BaseURL"),u=Gf(e,o),c=mi(s,ni(a)),f=h0(a);return u.map(m=>({segmentInfo:mi(i,f),attributes:mi(c,m)}))},l3=s=>s.reduce((e,i)=>{const a=ni(i);a.schemeIdUri&&(a.schemeIdUri=a.schemeIdUri.toLowerCase());const o=r3[a.schemeIdUri];if(o){e[o]={attributes:a};const u=Ut(i,"cenc:pssh")[0];if(u){const c=md(u);e[o].pssh=c&&Z_(c)}}return e},{}),u3=s=>{if(s.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{let a,o;return o=i,/^CC\d=/.test(i)?[a,o]=i.split("="):/^CC\d$/.test(i)&&(a=i),{channel:a,language:o}});if(s.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{const a={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[o,u=""]=i.split("=");a.channel=o,a.language=i,u.split(",").forEach(c=>{const[f,m]=c.split(":");f==="lang"?a.language=m:f==="er"?a.easyReader=Number(m):f==="war"?a.aspectRatio=Number(m):f==="3D"&&(a["3D"]=Number(m))})}else a.language=i;return a.channel&&(a.channel="SERVICE"+a.channel),a})},c3=s=>Kl(Ut(s.node,"EventStream").map(e=>{const i=ni(e),a=i.schemeIdUri;return Ut(e,"Event").map(o=>{const u=ni(o),c=u.presentationTime||0,f=i.timescale||1,m=u.duration||0,b=c/f+s.attributes.start;return{schemeIdUri:a,value:i.value,id:u.id,start:b,end:b+m/f,messageData:md(o)||u.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),d3=(s,e,i)=>a=>{const o=ni(a),u=Gf(e,Ut(a,"BaseURL")),c=Ut(a,"Role")[0],f={role:ni(c)};let m=mi(s,o,f);const b=Ut(a,"Accessibility")[0],S=u3(ni(b));S&&(m=mi(m,{captionServices:S}));const E=Ut(a,"Label")[0];if(E&&E.childNodes.length){const H=E.childNodes[0].nodeValue.trim();m=mi(m,{label:H})}const A=l3(Ut(a,"ContentProtection"));Object.keys(A).length&&(m=mi(m,{contentProtection:A}));const R=h0(a),N=Ut(a,"Representation"),w=mi(i,R);return Kl(N.map(o3(m,u,w)))},h3=(s,e)=>(i,a)=>{const o=Gf(e,Ut(i.node,"BaseURL")),u=mi(s,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(u.periodDuration=i.attributes.duration);const c=Ut(i.node,"AdaptationSet"),f=h0(i.node);return Kl(c.map(d3(u,o,f)))},f3=(s,e)=>{if(s.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!s.length)return null;const i=mi({serverURL:md(s[0])},ni(s[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},p3=({attributes:s,priorPeriodAttributes:e,mpdType:i})=>typeof s.start=="number"?s.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,m3=(s,e={})=>{const{manifestUri:i="",NOW:a=Date.now(),clientOffset:o=0,eventHandler:u=function(){}}=e,c=Ut(s,"Period");if(!c.length)throw new Error(Zl.INVALID_NUMBER_OF_PERIOD);const f=Ut(s,"Location"),m=ni(s),b=Gf([{baseUrl:i}],Ut(s,"BaseURL")),S=Ut(s,"ContentSteering");m.type=m.type||"static",m.sourceDuration=m.mediaPresentationDuration||0,m.NOW=a,m.clientOffset=o,f.length&&(m.locations=f.map(md));const E=[];return c.forEach((A,R)=>{const N=ni(A),w=E[R-1];N.start=p3({attributes:N,priorPeriodAttributes:w?w.attributes:null,mpdType:m.type}),E.push({node:A,attributes:N})}),{locations:m.locations,contentSteeringInfo:f3(S,u),representationInfo:Kl(E.map(h3(m,b))),eventStream:Kl(E.map(c3))}},l1=s=>{if(s==="")throw new Error(Zl.DASH_EMPTY_MANIFEST);const e=new C4;let i,a;try{i=e.parseFromString(s,"application/xml"),a=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!a||a&&a.getElementsByTagName("parsererror").length>0)throw new Error(Zl.DASH_INVALID_XML);return a},g3=s=>{const e=Ut(s,"UTCTiming")[0];if(!e)return null;const i=ni(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Zl.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},y3=(s,e={})=>{const i=m3(l1(s),e),a=n3(i.representationInfo);return Y4({dashPlaylists:a,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},v3=s=>g3(l1(s));var u1=Math.pow(2,32),b3=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i;return e.getBigUint64?(i=e.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?Number(i):i):e.getUint32(0)*u1+e.getUint32(4)},_3={getUint64:b3,MAX_UINT32:u1},c1=_3.getUint64,T3=function(s){var e=new DataView(s.buffer,s.byteOffset,s.byteLength),i={version:s[0],flags:new Uint8Array(s.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},a=12;i.version===0?(i.earliestPresentationTime=e.getUint32(a),i.firstOffset=e.getUint32(a+4),a+=8):(i.earliestPresentationTime=c1(s.subarray(a)),i.firstOffset=c1(s.subarray(a+8)),a+=16),a+=2;var o=e.getUint16(a);for(a+=2;o>0;a+=12,o--)i.references.push({referenceType:(s[a]&128)>>>7,referencedSize:e.getUint32(a)&2147483647,subsegmentDuration:e.getUint32(a+4),startsWithSap:!!(s[a+8]&128),sapType:(s[a+8]&112)>>>4,sapDeltaTime:e.getUint32(a+8)&268435455});return i},S3=T3;const x3=Yc(S3);var E3=Be([73,68,51]),C3=function(e,i){i===void 0&&(i=0),e=Be(e);var a=e[i+5],o=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],u=(a&16)>>4;return u?o+20:o+10},gd=function s(e,i){return i===void 0&&(i=0),e=Be(e),e.length-i<10||!Nt(e,E3,{offset:i})?i:(i+=C3(e,i),s(e,i))},d1=function(e){return typeof e=="string"?rT(e):e},A3=function(e){return Array.isArray(e)?e.map(function(i){return d1(i)}):[d1(e)]},w3=function s(e,i,a){a===void 0&&(a=!1),i=A3(i),e=Be(e);var o=[];if(!i.length)return o;for(var u=0;u<e.length;){var c=(e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3])>>>0,f=e.subarray(u+4,u+8);if(c===0)break;var m=u+c;if(m>e.length){if(a)break;m=e.length}var b=e.subarray(u+8,m);Nt(f,i[0])&&(i.length===1?o.push(b):o.push.apply(o,s(b,i.slice(1),a))),u=m}return o},Xf={EBML:Be([26,69,223,163]),DocType:Be([66,130]),Segment:Be([24,83,128,103]),SegmentInfo:Be([21,73,169,102]),Tracks:Be([22,84,174,107]),Track:Be([174]),TrackNumber:Be([215]),DefaultDuration:Be([35,227,131]),TrackEntry:Be([174]),TrackType:Be([131]),FlagDefault:Be([136]),CodecID:Be([134]),CodecPrivate:Be([99,162]),VideoTrack:Be([224]),AudioTrack:Be([225]),Cluster:Be([31,67,182,117]),Timestamp:Be([231]),TimestampScale:Be([42,215,177]),BlockGroup:Be([160]),BlockDuration:Be([155]),Block:Be([161]),SimpleBlock:Be([163])},f0=[128,64,32,16,8,4,2,1],D3=function(e){for(var i=1,a=0;a<f0.length&&!(e&f0[a]);a++)i++;return i},Yf=function(e,i,a,o){a===void 0&&(a=!0),o===void 0&&(o=!1);var u=D3(e[i]),c=e.subarray(i,i+u);return a&&(c=Array.prototype.slice.call(e,i,i+u),c[0]^=f0[u-1]),{length:u,value:Yk(c,{signed:o}),bytes:c}},h1=function s(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return s(i)}):typeof e=="number"?Wk(e):e},k3=function(e){return Array.isArray(e)?e.map(function(i){return h1(i)}):[h1(e)]},O3=function s(e,i,a){if(a>=i.length)return i.length;var o=Yf(i,a,!1);if(Nt(e.bytes,o.bytes))return a;var u=Yf(i,a+o.length);return s(e,i,a+u.length+u.value+o.length)},f1=function s(e,i){i=k3(i),e=Be(e);var a=[];if(!i.length)return a;for(var o=0;o<e.length;){var u=Yf(e,o,!1),c=Yf(e,o+u.length),f=o+u.length+c.length;c.value===127&&(c.value=O3(u,e,f),c.value!==e.length&&(c.value-=f));var m=f+c.value>e.length?e.length:f+c.value,b=e.subarray(f,m);Nt(i[0],u.bytes)&&(i.length===1?a.push(b):a=a.concat(s(b,i.slice(1))));var S=u.length+c.length+b.length;o+=S}return a},R3=Be([0,0,0,1]),M3=Be([0,0,1]),L3=Be([0,0,3]),I3=function(e){for(var i=[],a=1;a<e.length-2;)Nt(e.subarray(a,a+3),L3)&&(i.push(a+2),a++),a++;if(i.length===0)return e;var o=e.length-i.length,u=new Uint8Array(o),c=0;for(a=0;a<o;c++,a++)c===i[0]&&(c++,i.shift()),u[a]=e[c];return u},p1=function(e,i,a,o){o===void 0&&(o=1/0),e=Be(e),a=[].concat(a);for(var u=0,c,f=0;u<e.length&&(f<o||c);){var m=void 0;if(Nt(e.subarray(u),R3)?m=4:Nt(e.subarray(u),M3)&&(m=3),!m){u++;continue}if(f++,c)return I3(e.subarray(c,u));var b=void 0;i==="h264"?b=e[u+m]&31:i==="h265"&&(b=e[u+m]>>1&63),a.indexOf(b)!==-1&&(c=u+m),u+=m+(i==="h264"?1:2)}return e.subarray(0,0)},P3=function(e,i,a){return p1(e,"h264",i,a)},N3=function(e,i,a){return p1(e,"h265",i,a)},Qi={webm:Be([119,101,98,109]),matroska:Be([109,97,116,114,111,115,107,97]),flac:Be([102,76,97,67]),ogg:Be([79,103,103,83]),ac3:Be([11,119]),riff:Be([82,73,70,70]),avi:Be([65,86,73]),wav:Be([87,65,86,69]),"3gp":Be([102,116,121,112,51,103]),mp4:Be([102,116,121,112]),fmp4:Be([115,116,121,112]),mov:Be([102,116,121,112,113,116]),moov:Be([109,111,111,118]),moof:Be([109,111,111,102])},eu={aac:function(e){var i=gd(e);return Nt(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=gd(e);return Nt(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=f1(e,[Xf.EBML,Xf.DocType])[0];return Nt(i,Qi.webm)},mkv:function(e){var i=f1(e,[Xf.EBML,Xf.DocType])[0];return Nt(i,Qi.matroska)},mp4:function(e){if(eu["3gp"](e)||eu.mov(e))return!1;if(Nt(e,Qi.mp4,{offset:4})||Nt(e,Qi.fmp4,{offset:4})||Nt(e,Qi.moof,{offset:4})||Nt(e,Qi.moov,{offset:4}))return!0},mov:function(e){return Nt(e,Qi.mov,{offset:4})},"3gp":function(e){return Nt(e,Qi["3gp"],{offset:4})},ac3:function(e){var i=gd(e);return Nt(e,Qi.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=gd(e);return Nt(e,Qi.flac,{offset:i})},ogg:function(e){return Nt(e,Qi.ogg)},avi:function(e){return Nt(e,Qi.riff)&&Nt(e,Qi.avi,{offset:8})},wav:function(e){return Nt(e,Qi.riff)&&Nt(e,Qi.wav,{offset:8})},h264:function(e){return P3(e,7,3).length},h265:function(e){return N3(e,[32,33],3).length}},p0=Object.keys(eu).filter(function(s){return s!=="ts"&&s!=="h264"&&s!=="h265"}).concat(["ts","h264","h265"]);p0.forEach(function(s){var e=eu[s];eu[s]=function(i){return e(Be(i))}});var U3=eu,m0=function(e){e=Be(e);for(var i=0;i<p0.length;i++){var a=p0[i];if(U3[a](e))return a}return""},B3=function(e){return w3(e,["moof"]).length>0},g0=9e4,y0,v0,Wf,b0,m1,g1,y1;y0=function(s){return s*g0},v0=function(s,e){return s*e},Wf=function(s){return s/g0},b0=function(s,e){return s/e},m1=function(s,e){return y0(b0(s,e))},g1=function(s,e){return v0(Wf(s),e)},y1=function(s,e,i){return Wf(i?s:s-e)};var Do={ONE_SECOND_IN_TS:g0,secondsToVideoTs:y0,secondsToAudioTs:v0,videoTsToSeconds:Wf,audioTsToSeconds:b0,audioTsToVideoTs:m1,videoTsToAudioTs:g1,metadataTsToSeconds:y1};/**
* @license
* Video.js 8.23.3 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
*/var _0="8.23.3";const Ia={},Ar=function(s,e){return Ia[s]=Ia[s]||[],e&&(Ia[s]=Ia[s].concat(e)),Ia[s]},F3=function(s,e){Ar(s,e)},v1=function(s,e){const i=Ar(s).indexOf(e);return i<=-1?!1:(Ia[s]=Ia[s].slice(),Ia[s].splice(i,1),!0)},H3=function(s,e){Ar(s,[].concat(e).map(i=>{const a=(...o)=>(v1(s,a),i(...o));return a}))},Qf={prefixed:!0},Kf=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],b1=Kf[0];let yd;for(let s=0;s<Kf.length;s++)if(Kf[s][1]in ye){yd=Kf[s];break}if(yd){for(let s=0;s<yd.length;s++)Qf[b1[s]]=yd[s];Qf.prefixed=yd[0]!==b1[0]}let pn=[];const j3=(s,e,i)=>(a,o,u)=>{const c=e.levels[o],f=new RegExp(`^(${c})$`);let m=s;if(a!=="log"&&u.unshift(a.toUpperCase()+":"),i&&(m=`%c${s}`,u.unshift(i)),u.unshift(m+":"),pn){pn.push([].concat(u));const S=pn.length-1e3;pn.splice(0,S>0?S:0)}if(!B.console)return;let b=B.console[a];!b&&a==="debug"&&(b=B.console.info||B.console.log),!(!b||!c||!f.test(a))&&b[Array.isArray(u)?"apply":"call"](B.console,u)};function T0(s,e=":",i=""){let a="info",o;function u(...c){o("log",a,c)}return o=j3(s,u,i),u.createLogger=(c,f,m)=>{const b=f!==void 0?f:e,S=m!==void 0?m:i,E=`${s} ${b} ${c}`;return T0(E,b,S)},u.createNewLogger=(c,f,m)=>T0(c,f,m),u.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},u.level=c=>{if(typeof c=="string"){if(!u.levels.hasOwnProperty(c))throw new Error(`"${c}" in not a valid log level`);a=c}return a},u.history=()=>pn?[].concat(pn):[],u.history.filter=c=>(pn||[]).filter(f=>new RegExp(`.*${c}.*`).test(f[0])),u.history.clear=()=>{pn&&(pn.length=0)},u.history.disable=()=>{pn!==null&&(pn.length=0,pn=null)},u.history.enable=()=>{pn===null&&(pn=[])},u.error=(...c)=>o("error",a,c),u.warn=(...c)=>o("warn",a,c),u.debug=(...c)=>o("debug",a,c),u}const et=T0("VIDEOJS"),_1=et.createLogger,z3=Object.prototype.toString,T1=function(s){return Hs(s)?Object.keys(s):[]};function tu(s,e){T1(s).forEach(i=>e(s[i],i))}function S1(s,e,i=0){return T1(s).reduce((a,o)=>e(a,s[o],o),i)}function Hs(s){return!!s&&typeof s=="object"}function iu(s){return Hs(s)&&z3.call(s)==="[object Object]"&&s.constructor===Object}function xt(...s){const e={};return s.forEach(i=>{i&&tu(i,(a,o)=>{if(!iu(a)){e[o]=a;return}iu(e[o])||(e[o]={}),e[o]=xt(e[o],a)})}),e}function x1(s={}){const e=[];for(const i in s)if(s.hasOwnProperty(i)){const a=s[i];e.push(a)}return e}function Zf(s,e,i,a=!0){const o=c=>Object.defineProperty(s,e,{value:c,enumerable:!0,writable:!0}),u={configurable:!0,enumerable:!0,get(){const c=i();return o(c),c}};return a&&(u.set=o),Object.defineProperty(s,e,u)}var V3=Object.freeze({__proto__:null,each:tu,reduce:S1,isObject:Hs,isPlain:iu,merge:xt,values:x1,defineLazyProperty:Zf});let S0=!1,E1=null,ys=!1,C1,A1=!1,nu=!1,su=!1,js=!1,x0=null,Jf=null;const q3=!!(B.cast&&B.cast.framework&&B.cast.framework.CastReceiverContext);let w1=null,ep=!1,tp=!1,ip=!1,np=!1,sp=!1,ap=!1,rp=!1;const vd=!!(au()&&("ontouchstart"in B||B.navigator.maxTouchPoints||B.DocumentTouch&&B.document instanceof B.DocumentTouch)),wr=B.navigator&&B.navigator.userAgentData;if(wr&&wr.platform&&wr.brands&&(ys=wr.platform==="Android",nu=!!wr.brands.find(s=>s.brand==="Microsoft Edge"),su=!!wr.brands.find(s=>s.brand==="Chromium"),js=!nu&&su,x0=Jf=(wr.brands.find(s=>s.brand==="Chromium")||{}).version||null,tp=wr.platform==="Windows"),!su){const s=B.navigator&&B.navigator.userAgent||"";S0=/iPod/i.test(s),E1=function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),ys=/Android/i.test(s),C1=function(){const e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),a=e[2]&&parseFloat(e[2]);return i&&a?parseFloat(e[1]+"."+e[2]):i||null}(),A1=/Firefox/i.test(s),nu=/Edg/i.test(s),su=/Chrome/i.test(s)||/CriOS/i.test(s),js=!nu&&su,x0=Jf=function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),w1=function(){const e=/MSIE\s(\d+)\.\d/.exec(s);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(i=11),i}(),sp=/Tizen/i.test(s),ap=/Web0S/i.test(s),rp=sp||ap,ep=/Safari/i.test(s)&&!js&&!ys&&!nu&&!rp,tp=/Windows/i.test(s),ip=/iPad/i.test(s)||ep&&vd&&!/iPhone/i.test(s),np=/iPhone/i.test(s)&&!ip}const Bi=np||ip||S0,op=(ep||Bi)&&!js;var D1=Object.freeze({__proto__:null,get IS_IPOD(){return S0},get IOS_VERSION(){return E1},get IS_ANDROID(){return ys},get ANDROID_VERSION(){return C1},get IS_FIREFOX(){return A1},get IS_EDGE(){return nu},get IS_CHROMIUM(){return su},get IS_CHROME(){return js},get CHROMIUM_VERSION(){return x0},get CHROME_VERSION(){return Jf},IS_CHROMECAST_RECEIVER:q3,get IE_VERSION(){return w1},get IS_SAFARI(){return ep},get IS_WINDOWS(){return tp},get IS_IPAD(){return ip},get IS_IPHONE(){return np},get IS_TIZEN(){return sp},get IS_WEBOS(){return ap},get IS_SMART_TV(){return rp},TOUCH_ENABLED:vd,IS_IOS:Bi,IS_ANY_SAFARI:op});function k1(s){return typeof s=="string"&&!!s.trim()}function $3(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function au(){return ye===B.document}function ru(s){return Hs(s)&&s.nodeType===1}function O1(){try{return B.parent!==B.self}catch{return!0}}function R1(s){return function(e,i){if(!k1(e))return ye[s](null);k1(i)&&(i=ye.querySelector(i));const a=ru(i)?i:ye;return a[s]&&a[s](e)}}function He(s="div",e={},i={},a){const o=ye.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(u){const c=e[u];u==="textContent"?Dr(o,c):(o[u]!==c||u==="tabIndex")&&(o[u]=c)}),Object.getOwnPropertyNames(i).forEach(function(u){o.setAttribute(u,i[u])}),a&&C0(o,a),o}function Dr(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function E0(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function bd(s,e){return $3(e),s.classList.contains(e)}function ko(s,...e){return s.classList.add(...e.reduce((i,a)=>i.concat(a.split(/\s+/)),[])),s}function lp(s,...e){return s?(s.classList.remove(...e.reduce((i,a)=>i.concat(a.split(/\s+/)),[])),s):(et.warn("removeClass was called with an element that doesn't exist"),null)}function M1(s,e,i){return typeof i=="function"&&(i=i(s,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(a=>s.classList.toggle(a,i)),s}function L1(s,e){Object.getOwnPropertyNames(e).forEach(function(i){const a=e[i];a===null||typeof a>"u"||a===!1?s.removeAttribute(i):s.setAttribute(i,a===!0?"":a)})}function kr(s){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(s&&s.attributes&&s.attributes.length>0){const a=s.attributes;for(let o=a.length-1;o>=0;o--){const u=a[o].name;let c=a[o].value;i.includes(u)&&(c=c!==null),e[u]=c}}return e}function I1(s,e){return s.getAttribute(e)}function ou(s,e,i){s.setAttribute(e,i)}function up(s,e){s.removeAttribute(e)}function P1(){ye.body.focus(),ye.onselectstart=function(){return!1}}function N1(){ye.onselectstart=function(){return!0}}function lu(s){if(s&&s.getBoundingClientRect&&s.parentNode){const e=s.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(a=>{e[a]!==void 0&&(i[a]=e[a])}),i.height||(i.height=parseFloat(uu(s,"height"))),i.width||(i.width=parseFloat(uu(s,"width"))),i}}function _d(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};const e=s.offsetWidth,i=s.offsetHeight;let a=0,o=0;for(;s.offsetParent&&s!==ye[Qf.fullscreenElement];)a+=s.offsetLeft,o+=s.offsetTop,s=s.offsetParent;return{left:a,top:o,width:e,height:i}}function cp(s,e){const i={x:0,y:0};if(Bi){let S=s;for(;S&&S.nodeName.toLowerCase()!=="html";){const E=uu(S,"transform");if(/^matrix/.test(E)){const A=E.slice(7,-1).split(/,\s/).map(Number);i.x+=A[4],i.y+=A[5]}else if(/^matrix3d/.test(E)){const A=E.slice(9,-1).split(/,\s/).map(Number);i.x+=A[12],i.y+=A[13]}if(S.assignedSlot&&S.assignedSlot.parentElement&&B.WebKitCSSMatrix){const A=B.getComputedStyle(S.assignedSlot.parentElement).transform,R=new B.WebKitCSSMatrix(A);i.x+=R.m41,i.y+=R.m42}S=S.parentNode||S.host}}const a={},o=_d(e.target),u=_d(s),c=u.width,f=u.height;let m=e.offsetY-(u.top-o.top),b=e.offsetX-(u.left-o.left);return e.changedTouches&&(b=e.changedTouches[0].pageX-u.left,m=e.changedTouches[0].pageY+u.top,Bi&&(b-=i.x,m-=i.y)),a.y=1-Math.max(0,Math.min(1,m/f)),a.x=Math.max(0,Math.min(1,b/c)),a}function U1(s){return Hs(s)&&s.nodeType===3}function dp(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function B1(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),ru(e)||U1(e))return e;if(typeof e=="string"&&/\S/.test(e))return ye.createTextNode(e)}).filter(e=>e)}function C0(s,e){return B1(e).forEach(i=>s.appendChild(i)),s}function F1(s,e){return C0(dp(s),e)}function Td(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0||s.type==="mousedown"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}const Or=R1("querySelector"),H1=R1("querySelectorAll");function uu(s,e){if(!s||!e)return"";if(typeof B.getComputedStyle=="function"){let i;try{i=B.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function j1(s){[...ye.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(o=>o.cssText).join(""),a=ye.createElement("style");a.textContent=i,s.document.head.appendChild(a)}catch{const a=ye.createElement("link");a.rel="stylesheet",a.type=e.type,a.media=e.media.mediaText,a.href=e.href,s.document.head.appendChild(a)}})}var z1=Object.freeze({__proto__:null,isReal:au,isEl:ru,isInFrame:O1,createEl:He,textContent:Dr,prependTo:E0,hasClass:bd,addClass:ko,removeClass:lp,toggleClass:M1,setAttributes:L1,getAttributes:kr,getAttribute:I1,setAttribute:ou,removeAttribute:up,blockTextSelection:P1,unblockTextSelection:N1,getBoundingClientRect:lu,findPosition:_d,getPointerPosition:cp,isTextNode:U1,emptyEl:dp,normalizeContent:B1,appendContent:C0,insertContent:F1,isSingleLeftClick:Td,$:Or,$$:H1,computedStyle:uu,copyStyleSheetsToWindow:j1});let V1=!1,A0;const G3=function(){if(A0.options.autoSetup===!1)return;const s=Array.prototype.slice.call(ye.getElementsByTagName("video")),e=Array.prototype.slice.call(ye.getElementsByTagName("audio")),i=Array.prototype.slice.call(ye.getElementsByTagName("video-js")),a=s.concat(e,i);if(a&&a.length>0)for(let o=0,u=a.length;o<u;o++){const c=a[o];if(c&&c.getAttribute)c.player===void 0&&c.getAttribute("data-setup")!==null&&A0(c);else{w0(1);break}}else V1||w0(1)};function w0(s,e){au()&&(e&&(A0=e),B.setTimeout(G3,s))}function D0(){V1=!0,B.removeEventListener("load",D0)}au()&&(ye.readyState==="complete"?D0():B.addEventListener("load",D0));const q1=function(s){const e=ye.createElement("style");return e.className=s,e},$1=function(s,e){s.styleSheet?s.styleSheet.cssText=e:s.textContent=e};var Ki=new WeakMap;let X3=3;function Xn(){return X3++}function G1(s,e){if(!Ki.has(s))return;const i=Ki.get(s);i.handlers[e].length===0&&(delete i.handlers[e],s.removeEventListener?s.removeEventListener(e,i.dispatcher,!1):s.detachEvent&&s.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&Ki.delete(s)}function k0(s,e,i,a){i.forEach(function(o){s(e,o,a)})}function hp(s){if(s.fixed_)return s;function e(){return!0}function i(){return!1}if(!s||!s.isPropagationStopped||!s.isImmediatePropagationStopped){const a=s||B.event;s={};const o=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const u in a)o.includes(u)||u==="returnValue"&&a.preventDefault||(s[u]=a[u]);if(s.target||(s.target=s.srcElement||ye),s.relatedTarget||(s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement),s.preventDefault=function(){a.preventDefault&&a.preventDefault(),s.returnValue=!1,a.returnValue=!1,s.defaultPrevented=!0},s.defaultPrevented=!1,s.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),s.cancelBubble=!0,a.cancelBubble=!0,s.isPropagationStopped=e},s.isPropagationStopped=i,s.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),s.isImmediatePropagationStopped=e,s.stopPropagation()},s.isImmediatePropagationStopped=i,s.clientX!==null&&s.clientX!==void 0){const u=ye.documentElement,c=ye.body;s.pageX=s.clientX+(u&&u.scrollLeft||c&&c.scrollLeft||0)-(u&&u.clientLeft||c&&c.clientLeft||0),s.pageY=s.clientY+(u&&u.scrollTop||c&&c.scrollTop||0)-(u&&u.clientTop||c&&c.clientTop||0)}s.which=s.charCode||s.keyCode,s.button!==null&&s.button!==void 0&&(s.button=s.button&1?0:s.button&4?1:s.button&2?2:0)}return s.fixed_=!0,s}let fp;const Y3=function(){if(typeof fp!="boolean"){fp=!1;try{const s=Object.defineProperty({},"passive",{get(){fp=!0}});B.addEventListener("test",null,s),B.removeEventListener("test",null,s)}catch{}}return fp},W3=["touchstart","touchmove"];function kn(s,e,i){if(Array.isArray(e))return k0(kn,s,e,i);Ki.has(s)||Ki.set(s,{});const a=Ki.get(s);if(a.handlers||(a.handlers={}),a.handlers[e]||(a.handlers[e]=[]),i.guid||(i.guid=Xn()),a.handlers[e].push(i),a.dispatcher||(a.disabled=!1,a.dispatcher=function(o,u){if(a.disabled)return;o=hp(o);const c=a.handlers[o.type];if(c){const f=c.slice(0);for(let m=0,b=f.length;m<b&&!o.isImmediatePropagationStopped();m++)try{f[m].call(s,o,u)}catch(S){et.error(S)}}}),a.handlers[e].length===1)if(s.addEventListener){let o=!1;Y3()&&W3.indexOf(e)>-1&&(o={passive:!0}),s.addEventListener(e,a.dispatcher,o)}else s.attachEvent&&s.attachEvent("on"+e,a.dispatcher)}function Fi(s,e,i){if(!Ki.has(s))return;const a=Ki.get(s);if(!a.handlers)return;if(Array.isArray(e))return k0(Fi,s,e,i);const o=function(c,f){a.handlers[f]=[],G1(c,f)};if(e===void 0){for(const c in a.handlers)Object.prototype.hasOwnProperty.call(a.handlers||{},c)&&o(s,c);return}const u=a.handlers[e];if(u){if(!i){o(s,e);return}if(i.guid)for(let c=0;c<u.length;c++)u[c].guid===i.guid&&u.splice(c--,1);G1(s,e)}}function cu(s,e,i){const a=Ki.has(s)?Ki.get(s):{},o=s.parentNode||s.ownerDocument;if(typeof e=="string"?e={type:e,target:s}:e.target||(e.target=s),e=hp(e),a.dispatcher&&a.dispatcher.call(s,e,i),o&&!e.isPropagationStopped()&&e.bubbles===!0)cu.call(null,o,e,i);else if(!o&&!e.defaultPrevented&&e.target&&e.target[e.type]){Ki.has(e.target)||Ki.set(e.target,{});const u=Ki.get(e.target);e.target[e.type]&&(u.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),u.disabled=!1)}return!e.defaultPrevented}function pp(s,e,i){if(Array.isArray(e))return k0(pp,s,e,i);const a=function(){Fi(s,e,a),i.apply(this,arguments)};a.guid=i.guid=i.guid||Xn(),kn(s,e,a)}function O0(s,e,i){const a=function(){Fi(s,e,a),i.apply(this,arguments)};a.guid=i.guid=i.guid||Xn(),kn(s,e,a)}var Q3=Object.freeze({__proto__:null,fixEvent:hp,on:kn,off:Fi,trigger:cu,one:pp,any:O0});const Yn=30,Mt=function(s,e,i){e.guid||(e.guid=Xn());const a=e.bind(s);return a.guid=i?i+"_"+e.guid:e.guid,a},zs=function(s,e){let i=B.performance.now();return function(...o){const u=B.performance.now();u-i>=e&&(s(...o),i=u)}},X1=function(s,e,i,a=B){let o;const u=()=>{a.clearTimeout(o),o=null},c=function(){const f=this,m=arguments;let b=function(){o=null,b=null,i||s.apply(f,m)};!o&&i&&s.apply(f,m),a.clearTimeout(o),o=a.setTimeout(b,e)};return c.cancel=u,c};var K3=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Yn,bind_:Mt,throttle:zs,debounce:X1});let Sd;class On{on(e,i){const a=this.addEventListener;this.addEventListener=()=>{},kn(this,e,i),this.addEventListener=a}off(e,i){Fi(this,e,i)}one(e,i){const a=this.addEventListener;this.addEventListener=()=>{},pp(this,e,i),this.addEventListener=a}any(e,i){const a=this.addEventListener;this.addEventListener=()=>{},O0(this,e,i),this.addEventListener=a}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=hp(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),cu(this,e)}queueTrigger(e){Sd||(Sd=new Map);const i=e.type||e;let a=Sd.get(this);a||(a=new Map,Sd.set(this,a));const o=a.get(i);a.delete(i),B.clearTimeout(o);const u=B.setTimeout(()=>{a.delete(i),a.size===0&&(a=null,Sd.delete(this)),this.trigger(e)},0);a.set(i,u)}}On.prototype.allowedEvents_={},On.prototype.addEventListener=On.prototype.on,On.prototype.removeEventListener=On.prototype.off,On.prototype.dispatchEvent=On.prototype.trigger;const mp=s=>typeof s.name=="function"?s.name():typeof s.name=="string"?s.name:s.name_?s.name_:s.constructor&&s.constructor.name?s.constructor.name:typeof s,Pa=s=>s instanceof On||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),Z3=(s,e)=>{Pa(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},R0=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,gp=(s,e,i)=>{if(!s||!s.nodeName&&!Pa(s))throw new Error(`Invalid target for ${mp(e)}#${i}; must be a DOM node or evented object.`)},Y1=(s,e,i)=>{if(!R0(s))throw new Error(`Invalid event type for ${mp(e)}#${i}; must be a non-empty string or array.`)},W1=(s,e,i)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${mp(e)}#${i}; must be a function.`)},M0=(s,e,i)=>{const a=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let o,u,c;return a?(o=s.eventBusEl_,e.length>=3&&e.shift(),[u,c]=e):(o=e[0],u=e[1],c=e[2]),gp(o,s,i),Y1(u,s,i),W1(c,s,i),c=Mt(s,c),{isTargetingSelf:a,target:o,type:u,listener:c}},Oo=(s,e,i,a)=>{gp(s,s,e),s.nodeName?Q3[e](s,i,a):s[e](i,a)},J3={on(...s){const{isTargetingSelf:e,target:i,type:a,listener:o}=M0(this,s,"on");if(Oo(i,"on",a,o),!e){const u=()=>this.off(i,a,o);u.guid=o.guid;const c=()=>this.off("dispose",u);c.guid=o.guid,Oo(this,"on","dispose",u),Oo(i,"on","dispose",c)}},one(...s){const{isTargetingSelf:e,target:i,type:a,listener:o}=M0(this,s,"one");if(e)Oo(i,"one",a,o);else{const u=(...c)=>{this.off(i,a,u),o.apply(null,c)};u.guid=o.guid,Oo(i,"one",a,u)}},any(...s){const{isTargetingSelf:e,target:i,type:a,listener:o}=M0(this,s,"any");if(e)Oo(i,"any",a,o);else{const u=(...c)=>{this.off(i,a,u),o.apply(null,c)};u.guid=o.guid,Oo(i,"any",a,u)}},off(s,e,i){if(!s||R0(s))Fi(this.eventBusEl_,s,e);else{const a=s,o=e;gp(a,this,"off"),Y1(o,this,"off"),W1(i,this,"off"),i=Mt(this,i),this.off("dispose",i),a.nodeName?(Fi(a,o,i),Fi(a,"dispose",i)):Pa(a)&&(a.off(o,i),a.off("dispose",i))}},trigger(s,e){gp(this.eventBusEl_,this,"trigger");const i=s&&typeof s!="string"?s.type:s;if(!R0(i))throw new Error(`Invalid event type for ${mp(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return cu(this.eventBusEl_,s,e)}};function L0(s,e={}){const{eventBusKey:i}=e;if(i){if(!s[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);s.eventBusEl_=s[i]}else s.eventBusEl_=He("span",{className:"vjs-event-bus"});return Object.assign(s,J3),s.eventedCallbacks&&s.eventedCallbacks.forEach(a=>{a()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(a){a&&Ki.has(a)&&Ki.delete(a)}),B.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const eO={state:{},setState(s){typeof s=="function"&&(s=s());let e;return tu(s,(i,a)=>{this.state[a]!==i&&(e=e||{},e[a]={from:this.state[a],to:i}),this.state[a]=i}),e&&Pa(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function Q1(s,e){return Object.assign(s,eO),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&Pa(s)&&s.on("statechanged",s.handleStateChanged),s}const xd=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},qt=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},K1=function(s,e){return qt(s)===qt(e)};var tO=Object.freeze({__proto__:null,toLowerCase:xd,toTitleCase:qt,titleCaseEquals:K1});let ce=class wn{constructor(e,i,a){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=xt({},this.options_),i=this.options_=xt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const o=e&&e.id&&e.id()||"no_player";this.id_=`${o}_component_${Xn()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(o=>this.addClass(o)),["on","off","one","any","trigger"].forEach(o=>{this[o]=void 0}),i.evented!==!1&&(L0(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Q1(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(a),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=xt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,a){return He(e,i,a)}localize(e,i,a=e){const o=this.player_.language&&this.player_.language(),u=this.player_.languages&&this.player_.languages(),c=u&&u[o],f=o&&o.split("-")[0],m=u&&u[f];let b=a;return c&&c[e]?b=c[e]:m&&m[e]&&(b=m[e]),i&&(b=b.replace(/\{(\d+)\}/g,function(S,E){const A=i[E-1];let R=A;return typeof A>"u"&&(R=S),R})),b}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((a,o)=>a.concat(o),[]);let i=this;for(let a=0;a<e.length;a++)if(i=i.getChild(e[a]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const a="http://www.w3.org/2000/svg",o=He("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),u=ye.createElementNS(a,"svg");u.setAttributeNS(null,"viewBox","0 0 512 512");const c=ye.createElementNS(a,"use");return u.appendChild(c),c.setAttributeNS(null,"href",`#vjs-icon-${e}`),o.appendChild(u),this.iconIsSet_?i.replaceChild(o,i.querySelector(".vjs-icon-placeholder")):i.appendChild(o),this.iconIsSet_=!0,o}addChild(e,i={},a=this.children_.length){let o,u;if(typeof e=="string"){u=qt(e);const c=i.componentClass||u;i.name=u;const f=wn.getComponent(c);if(!f)throw new Error(`Component ${c} does not exist`);if(typeof f!="function")return null;o=new f(this.player_||this,i)}else o=e;if(o.parentComponent_&&o.parentComponent_.removeChild(o),this.children_.splice(a,0,o),o.parentComponent_=this,typeof o.id=="function"&&(this.childIndex_[o.id()]=o),u=u||o.name&&qt(o.name()),u&&(this.childNameIndex_[u]=o,this.childNameIndex_[xd(u)]=o),typeof o.el=="function"&&o.el()){let c=null;this.children_[a+1]&&(this.children_[a+1].el_?c=this.children_[a+1].el_:ru(this.children_[a+1])&&(c=this.children_[a+1])),this.contentEl().insertBefore(o.el(),c)}return o}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let o=this.children_.length-1;o>=0;o--)if(this.children_[o]===e){i=!0,this.children_.splice(o,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[qt(e.name())]=null,this.childNameIndex_[xd(e.name())]=null;const a=e.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,a=c=>{const f=c.name;let m=c.opts;if(i[f]!==void 0&&(m=i[f]),m===!1)return;m===!0&&(m={}),m.playerOptions=this.options_.playerOptions;const b=this.addChild(f,m);b&&(this[f]=b)};let o;const u=wn.getComponent("Tech");Array.isArray(e)?o=e:o=Object.keys(e),o.concat(Object.keys(this.options_).filter(function(c){return!o.some(function(f){return typeof f=="string"?c===f:c===f.name})})).map(c=>{let f,m;return typeof c=="string"?(f=c,m=e[f]||this.options_[f]||{}):(f=c.name,m=c),{name:f,opts:m}}).filter(c=>{const f=wn.getComponent(c.opts.componentClass||qt(c.name));return f&&!u.isTech(f)}).forEach(a)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return Or(e,i||this.contentEl())}$$(e,i){return H1(e,i||this.contentEl())}hasClass(e){return bd(this.el_,e)}addClass(...e){ko(this.el_,...e)}removeClass(...e){lp(this.el_,...e)}toggleClass(e,i){M1(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return I1(this.el_,e)}setAttribute(e,i){ou(this.el_,e,i)}removeAttribute(e){up(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,a){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",a||this.trigger("componentresize");return}if(!this.el_)return 0;const o=this.el_.style[e],u=o.indexOf("px");return parseInt(u!==-1?o.slice(0,u):this.el_["offset"+qt(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=uu(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const a=`offset${qt(e)}`;i=this.el_[a]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},a={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:a}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const a=10,o=200;let u;this.on("touchstart",function(f){f.touches.length===1&&(i={pageX:f.touches[0].pageX,pageY:f.touches[0].pageY},e=B.performance.now(),u=!0)}),this.on("touchmove",function(f){if(f.touches.length>1)u=!1;else if(i){const m=f.touches[0].pageX-i.pageX,b=f.touches[0].pageY-i.pageY;Math.sqrt(m*m+b*b)>a&&(u=!1)}});const c=function(){u=!1};this.on("touchleave",c),this.on("touchcancel",c),this.on("touchend",function(f){i=null,u===!0&&B.performance.now()-e<o&&(f.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=Mt(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const a=function(o){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",a),this.on("touchcancel",a)}setTimeout(e,i){var a;return e=Mt(this,e),this.clearTimersOnDispose_(),a=B.setTimeout(()=>{this.setTimeoutIds_.has(a)&&this.setTimeoutIds_.delete(a),e()},i),this.setTimeoutIds_.add(a),a}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),B.clearTimeout(e)),e}setInterval(e,i){e=Mt(this,e),this.clearTimersOnDispose_();const a=B.setInterval(e,i);return this.setIntervalIds_.add(a),a}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),B.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=Mt(this,e),i=B.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=Mt(this,i);const a=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,a),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),B.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((a,o)=>this[i](o))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(u){const c=B.getComputedStyle(u,null),f=c.getPropertyValue("visibility");return c.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(f)}function a(u){return!(!i(u.parentElement)||!i(u)||u.style.opacity==="0"||B.getComputedStyle(u).height==="0px"||B.getComputedStyle(u).width==="0px")}function o(u){if(u.offsetWidth+u.offsetHeight+u.getBoundingClientRect().height+u.getBoundingClientRect().width===0)return!1;const c={x:u.getBoundingClientRect().left+u.offsetWidth/2,y:u.getBoundingClientRect().top+u.offsetHeight/2};if(c.x<0||c.x>(ye.documentElement.clientWidth||B.innerWidth)||c.y<0||c.y>(ye.documentElement.clientHeight||B.innerHeight))return!1;let f=ye.elementFromPoint(c.x,c.y);for(;f;){if(f===u)return!0;if(f.parentNode)f=f.parentNode;else return!1}}return e||(e=this.el()),!!(o(e)&&a(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const a=wn.getComponent("Tech"),o=a&&a.isTech(i),u=wn===i||wn.prototype.isPrototypeOf(i.prototype);if(o||!u){let f;throw o?f="techs must be registered using Tech.registerTech()":f="must be a Component subclass",new Error(`Illegal component, "${e}"; ${f}.`)}e=qt(e),wn.components_||(wn.components_={});const c=wn.getComponent("Player");if(e==="Player"&&c&&c.players){const f=c.players,m=Object.keys(f);if(f&&m.length>0){for(let b=0;b<m.length;b++)if(f[m[b]]!==null)throw new Error("Can not register Player component after player has been created.")}}return wn.components_[e]=i,wn.components_[xd(e)]=i,i}static getComponent(e){if(!(!e||!wn.components_))return wn.components_[e]}};ce.registerComponent("Component",ce);function iO(s,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${s}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function Z1(s,e,i,a){return iO(s,a,i.length-1),i[a][e]}function I0(s){let e;return s===void 0||s.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:s.length,start:Z1.bind(null,"start",0,s),end:Z1.bind(null,"end",1,s)},B.Symbol&&B.Symbol.iterator&&(e[B.Symbol.iterator]=()=>(s||[]).values()),e}function vs(s,e){return Array.isArray(s)?I0(s):s===void 0||e===void 0?I0():I0([[s,e]])}const J1=function(s,e){s=s<0?0:s;let i=Math.floor(s%60),a=Math.floor(s/60%60),o=Math.floor(s/3600);const u=Math.floor(e/60%60),c=Math.floor(e/3600);return(isNaN(s)||s===1/0)&&(o=a=i="-"),o=o>0||c>0?o+":":"",a=((o||u>=10)&&a<10?"0"+a:a)+":",i=i<10?"0"+i:i,o+a+i};let P0=J1;function e2(s){P0=s}function t2(){P0=J1}function Ro(s,e=s){return P0(s,e)}var nO=Object.freeze({__proto__:null,createTimeRanges:vs,createTimeRange:vs,setFormatTime:e2,resetFormatTime:t2,formatTime:Ro});function i2(s,e){let i=0,a,o;if(!e)return 0;(!s||!s.length)&&(s=vs(0,0));for(let u=0;u<s.length;u++)a=s.start(u),o=s.end(u),o>e&&(o=e),i+=o-a;return i/e}function Ft(s){if(s instanceof Ft)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:Hs(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=Ft.defaultMessages[this.code]||"")}Ft.prototype.code=0,Ft.prototype.message="",Ft.prototype.status=null,Ft.prototype.metadata=null,Ft.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ft.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Ft.MEDIA_ERR_CUSTOM=0,Ft.prototype.MEDIA_ERR_CUSTOM=0,Ft.MEDIA_ERR_ABORTED=1,Ft.prototype.MEDIA_ERR_ABORTED=1,Ft.MEDIA_ERR_NETWORK=2,Ft.prototype.MEDIA_ERR_NETWORK=2,Ft.MEDIA_ERR_DECODE=3,Ft.prototype.MEDIA_ERR_DECODE=3,Ft.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Ft.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Ft.MEDIA_ERR_ENCRYPTED=5,Ft.prototype.MEDIA_ERR_ENCRYPTED=5;function Ed(s){return s!=null&&typeof s.then=="function"}function Vs(s){Ed(s)&&s.then(null,e=>{})}const N0=function(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,a,o)=>(s[a]&&(i[a]=s[a]),i),{cues:s.cues&&Array.prototype.map.call(s.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})};var U0={textTracksToJson:function(s){const e=s.$$("track"),i=Array.prototype.map.call(e,o=>o.track);return Array.prototype.map.call(e,function(o){const u=N0(o.track);return o.src&&(u.src=o.src),u}).concat(Array.prototype.filter.call(s.textTracks(),function(o){return i.indexOf(o)===-1}).map(N0))},jsonToTextTracks:function(s,e){return s.forEach(function(i){const a=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(o=>a.addCue(o))}),e.textTracks()},trackToJson:N0};const B0="vjs-modal-dialog";class du extends ce{constructor(e,i){super(e,i),this.handleKeyDown_=a=>this.handleKeyDown(a),this.close_=a=>this.close(a),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=He("div",{className:`${B0}-content`},{role:"document"}),this.descEl_=He("p",{className:`${B0}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Dr(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${B0} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let a=this.getChild("closeButton");if(i&&!a){const o=this.contentEl_;this.contentEl_=this.el_,a=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(a,"close",this.close_)}!i&&a&&(this.off(a,"close",this.close_),this.removeChild(a),a.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),a=i.parentNode,o=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,a.removeChild(i),this.empty(),F1(i,e),this.trigger("modalfill"),o?a.insertBefore(i,o):a.appendChild(i);const u=this.getChild("closeButton");u&&a.appendChild(u.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),dp(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=ye.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),a=this.el_.querySelector(":focus");let o;for(let u=0;u<i.length;u++)if(a===i[u]){o=u;break}ye.activeElement===this.el_&&(o=0),e.shiftKey&&o===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&o===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof B.HTMLAnchorElement||i instanceof B.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof B.HTMLInputElement||i instanceof B.HTMLSelectElement||i instanceof B.HTMLTextAreaElement||i instanceof B.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof B.HTMLIFrameElement||i instanceof B.HTMLObjectElement||i instanceof B.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}du.prototype.options_={pauseOnOpen:!0,temporary:!0},ce.registerComponent("ModalDialog",du);class Mo extends On{constructor(e=[]){super(),this.tracks_=[],Object.defineProperty(this,"length",{get(){return this.tracks_.length}});for(let i=0;i<e.length;i++)this.addTrack(e[i])}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Pa(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let a=0,o=this.length;a<o;a++)if(this[a]===e){i=this[a],i.off&&i.off(),this.tracks_.splice(a,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let a=0,o=this.length;a<o;a++){const u=this[a];if(u.id===e){i=u;break}}return i}}Mo.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const s in Mo.prototype.allowedEvents_)Mo.prototype["on"+s]=null;const F0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].enabled=!1)};class n2 extends Mo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){F0(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&F0(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,F0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const H0=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].selected=!1)};class s2 extends Mo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){H0(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&H0(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,H0(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class j0 extends Mo{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class sO{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,a=e.length;i<a;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let a=0,o=this.trackElements_.length;a<o;a++)if(e===this.trackElements_[a].track){i=this.trackElements_[a];break}return i}removeTrackElement_(e){for(let i=0,a=this.trackElements_.length;i<a;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class yp{constructor(e){yp.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let a=0;const o=e.length;this.cues_=e,this.length_=e.length;const u=function(c){""+c in this||Object.defineProperty(this,""+c,{get(){return this.cues_[c]}})};if(i<o)for(a=i;a<o;a++)u.call(this,a)}getCueById(e){let i=null;for(let a=0,o=this.length;a<o;a++){const u=this[a];if(u.id===e){i=u;break}}return i}}const aO={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},rO={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},oO={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},a2={disabled:"disabled",hidden:"hidden",showing:"showing"};class z0 extends On{constructor(e={}){super();const i={id:e.id||"vjs_track_"+Xn(),kind:e.kind||"",language:e.language||""};let a=e.label||"";for(const o in i)Object.defineProperty(this,o,{get(){return i[o]},set(){}});Object.defineProperty(this,"label",{get(){return a},set(o){o!==a&&(a=o,this.trigger("labelchange"))}})}}const V0=function(s){return new URL(s,ye.baseURI)},r2=function(s){return new URL(s,ye.baseURI).href},q0=function(s){if(typeof s=="string"){const i=s.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},vp=function(s,e=B.location){return V0(s).origin!==e.origin};var lO=Object.freeze({__proto__:null,parseUrl:V0,getAbsoluteURL:r2,getFileExtension:q0,isCrossOrigin:vp});const o2=function(s,e){const i=new B.WebVTT.Parser(B,B.vttjs,B.WebVTT.StringDecoder()),a=[];i.oncue=function(o){e.addCue(o)},i.onparsingerror=function(o){a.push(o)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(s),a.length>0&&(B.console&&B.console.groupCollapsed&&B.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),a.forEach(o=>et.error(o)),B.console&&B.console.groupEnd&&B.console.groupEnd()),i.flush()},l2=function(s,e){const i={uri:s},a=vp(s);a&&(i.cors=a);const o=e.tech_.crossOrigin()==="use-credentials";o&&(i.withCredentials=o),z_(i,Mt(this,function(u,c,f){if(u)return et.error(u,c);e.loaded_=!0,typeof B.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],m=>{if(m.type==="vttjserror"){et.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return o2(f,e)}):o2(f,e)}))};class Cd extends z0{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=xt(e,{kind:oO[e.kind]||"subtitles",language:e.language||e.srclang||""});let a=a2[i.mode]||"disabled";const o=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(a="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const u=new yp(this.cues_),c=new yp(this.activeCues_);let f=!1;this.timeupdateHandler=Mt(this,function(b={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1),b.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const m=()=>{this.stopTracking()};this.tech_.one("dispose",m),a!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return o},set(){}},mode:{get(){return a},set(b){a2[b]&&a!==b&&(a=b,!this.preload_&&a!=="disabled"&&this.cues.length===0&&l2(this.src,this),this.stopTracking(),a!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?u:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return c;const b=this.tech_.currentTime(),S=[];for(let E=0,A=this.cues.length;E<A;E++){const R=this.cues[E];R.startTime<=b&&R.endTime>=b&&S.push(R)}if(f=!1,S.length!==this.activeCues_.length)f=!0;else for(let E=0;E<S.length;E++)this.activeCues_.indexOf(S[E])===-1&&(f=!0);return this.activeCues_=S,c.setCues_(this.activeCues_),c},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&l2(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new B.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const o in e)o in i||(i[o]=e[o]);i.id=e.id,i.originalCue_=e}const a=this.tech_.textTracks();for(let o=0;o<a.length;o++)a[o]!==this&&a[o].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return U0.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const a=this.cues_[i];if(a===e||a.originalCue_&&a.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}Cd.prototype.allowedEvents_={cuechange:"cuechange"};class u2 extends z0{constructor(e={}){const i=xt(e,{kind:rO[e.kind]||""});super(i);let a=!1;Object.defineProperty(this,"enabled",{get(){return a},set(o){typeof o!="boolean"||o===a||(a=o,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class c2 extends z0{constructor(e={}){const i=xt(e,{kind:aO[e.kind]||""});super(i);let a=!1;Object.defineProperty(this,"selected",{get(){return a},set(o){typeof o!="boolean"||o===a||(a=o,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class Na extends On{constructor(e={}){super();let i;const a=new Cd(e);this.kind=a.kind,this.src=a.src,this.srclang=a.language,this.label=a.label,this.default=a.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return a}}}),i=Na.NONE,a.addEventListener("loadeddata",()=>{i=Na.LOADED,this.trigger({type:"load",target:this})})}}Na.prototype.allowedEvents_={load:"load"},Na.NONE=0,Na.LOADING=1,Na.LOADED=2,Na.ERROR=3;const Wn={audio:{ListClass:n2,TrackClass:u2,capitalName:"Audio"},video:{ListClass:s2,TrackClass:c2,capitalName:"Video"},text:{ListClass:j0,TrackClass:Cd,capitalName:"Text"}};Object.keys(Wn).forEach(function(s){Wn[s].getterName=`${s}Tracks`,Wn[s].privateName=`${s}Tracks_`});const hu={remoteText:{ListClass:j0,TrackClass:Cd,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:sO,TrackClass:Na,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Zi=Object.assign({},Wn,hu);hu.names=Object.keys(hu),Wn.names=Object.keys(Wn),Zi.names=[].concat(hu.names).concat(Wn.names);function uO(s,e,i,a,o={}){const u=s.textTracks();o.kind=e,i&&(o.label=i),a&&(o.language=a),o.tech=s;const c=new Zi.text.TrackClass(o);return u.addTrack(c),c}class Xe extends ce{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=a=>this.onDurationChange(a),this.trackProgress_=a=>this.trackProgress(a),this.trackCurrentTime_=a=>this.trackCurrentTime(a),this.stopTrackingCurrentTime_=a=>this.stopTrackingCurrentTime(a),this.disposeSourceHandler_=a=>this.disposeSourceHandler(a),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Zi.names.forEach(a=>{const o=Zi[a];e&&e[o.getterName]&&(this[o.privateName]=e[o.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(a=>{e[`native${a}Tracks`]===!1&&(this[`featuresNative${a}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Zi.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Mt(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return vs(0,0)}bufferedPercent(){return i2(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Wn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const a=this[`${i}Tracks`]()||[];let o=a.length;for(;o--;){const u=a[o];i==="text"&&this.removeRemoteTextTrack(u),a.removeTrack(u)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const a=e[i];this.removeRemoteTextTrack(a)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Ft(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?vs(0,0):vs()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Wn.names.forEach(e=>{const i=Wn[e],a=()=>{this.trigger(`${e}trackchange`)},o=this[i.getterName]();o.addEventListener("removetrack",a),o.addEventListener("addtrack",a),this.on("dispose",()=>{o.removeEventListener("removetrack",a),o.removeEventListener("addtrack",a)})})}addWebVttScript_(){if(!B.WebVTT)if(ye.body.contains(this.el())){if(!this.options_["vtt.js"]&&iu(Q_)&&Object.keys(Q_).length>0){this.trigger("vttjsloaded");return}const e=ye.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),B.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),a=f=>e.addTrack(f.track),o=f=>e.removeTrack(f.track);i.on("addtrack",a),i.on("removetrack",o),this.addWebVttScript_();const u=()=>this.trigger("texttrackchange"),c=()=>{u();for(let f=0;f<e.length;f++){const m=e[f];m.removeEventListener("cuechange",u),m.mode==="showing"&&m.addEventListener("cuechange",u)}};c(),e.addEventListener("change",c),e.addEventListener("addtrack",c),e.addEventListener("removetrack",c),this.on("dispose",function(){i.off("addtrack",a),i.off("removetrack",o),e.removeEventListener("change",c),e.removeEventListener("addtrack",c),e.removeEventListener("removetrack",c);for(let f=0;f<e.length;f++)e[f].removeEventListener("cuechange",u)})}addTextTrack(e,i,a){if(!e)throw new Error("TextTrack kind is required but was not provided");return uO(this,e,i,a)}createRemoteTextTrack(e){const i=xt(e,{tech:this});return new hu.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const a=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(a),this.remoteTextTracks().addTrack(a.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(a.track)),a}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=Xn();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return Xe.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Xe||e instanceof Xe||e===Xe}static registerTech(e,i){if(Xe.techs_||(Xe.techs_={}),!Xe.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!Xe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Xe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=qt(e),Xe.techs_[e]=i,Xe.techs_[xd(e)]=i,e!=="Tech"&&Xe.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(Xe.techs_&&Xe.techs_[e])return Xe.techs_[e];if(e=qt(e),B&&B.videojs&&B.videojs[e])return et.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),B.videojs[e]}}}Zi.names.forEach(function(s){const e=Zi[s];Xe.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Xe.prototype.featuresVolumeControl=!0,Xe.prototype.featuresMuteControl=!0,Xe.prototype.featuresFullscreenResize=!1,Xe.prototype.featuresPlaybackRate=!1,Xe.prototype.featuresProgressEvents=!1,Xe.prototype.featuresSourceset=!1,Xe.prototype.featuresTimeupdateEvents=!1,Xe.prototype.featuresNativeTextTracks=!1,Xe.prototype.featuresVideoFrameCallback=!1,Xe.withSourceHandlers=function(s){s.registerSourceHandler=function(i,a){let o=s.sourceHandlers;o||(o=s.sourceHandlers=[]),a===void 0&&(a=o.length),o.splice(a,0,i)},s.canPlayType=function(i){const a=s.sourceHandlers||[];let o;for(let u=0;u<a.length;u++)if(o=a[u].canPlayType(i),o)return o;return""},s.selectSourceHandler=function(i,a){const o=s.sourceHandlers||[];let u;for(let c=0;c<o.length;c++)if(u=o[c].canHandleSource(i,a),u)return o[c];return null},s.canPlaySource=function(i,a){const o=s.selectSourceHandler(i,a);return o?o.canHandleSource(i,a):""},["seekable","seeking","duration"].forEach(function(i){const a=this[i];typeof a=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):a.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(i){let a=s.selectSourceHandler(i,this.options_);a||(s.nativeSourceHandler?a=s.nativeSourceHandler:et.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),a!==s.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=a.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},s.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ce.registerComponent("Tech",Xe),Xe.registerTech("Tech",Xe),Xe.defaultTechOrder_=[];const Lo={},bp={},_p={};function cO(s,e){Lo[s]=Lo[s]||[],Lo[s].push(e)}function dO(s,e,i){s.setTimeout(()=>Io(e,Lo[e.type],i,s),1)}function hO(s,e){s.forEach(i=>i.setTech&&i.setTech(e))}function fO(s,e,i){return s.reduceRight($0(i),e[i]())}function pO(s,e,i,a){return e[i](s.reduce($0(i),a))}function d2(s,e,i,a=null){const o="call"+qt(i),u=s.reduce($0(o),a),c=u===_p,f=c?null:e[i](u);return yO(s,i,f,c),f}const mO={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},gO={setCurrentTime:1,setMuted:1,setVolume:1},h2={play:1,pause:1};function $0(s){return(e,i)=>e===_p?_p:i[s]?i[s](e):e}function yO(s,e,i,a){for(let o=s.length-1;o>=0;o--){const u=s[o];u[e]&&u[e](a,i)}}function vO(s){bp.hasOwnProperty(s.id())&&delete bp[s.id()]}function bO(s,e){const i=bp[s.id()];let a=null;if(i==null)return a=e(s),bp[s.id()]=[[e,a]],a;for(let o=0;o<i.length;o++){const[u,c]=i[o];u===e&&(a=c)}return a===null&&(a=e(s),i.push([e,a])),a}function Io(s={},e=[],i,a,o=[],u=!1){const[c,...f]=e;if(typeof c=="string")Io(s,Lo[c],i,a,o,u);else if(c){const m=bO(a,c);if(!m.setSource)return o.push(m),Io(s,f,i,a,o,u);m.setSource(Object.assign({},s),function(b,S){if(b)return Io(s,f,i,a,o,u);o.push(m),Io(S,s.type===S.type?f:Lo[S.type],i,a,o,u)})}else f.length?Io(s,f,i,a,o,u):u?i(s,o):Io(s,Lo["*"],i,a,o,!0)}const _O={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Tp=function(s=""){const e=q0(s);return _O[e.toLowerCase()]||""},TO=(s,e)=>{if(!e)return"";if(s.cache_.source.src===e&&s.cache_.source.type)return s.cache_.source.type;const i=s.cache_.sources.filter(o=>o.src===e);if(i.length)return i[0].type;const a=s.$$("source");for(let o=0;o<a.length;o++){const u=a[o];if(u.type&&u.src&&u.src===e)return u.type}return Tp(e)},f2=function(s){if(Array.isArray(s)){let e=[];s.forEach(function(i){i=f2(i),Array.isArray(i)?e=e.concat(i):Hs(i)&&e.push(i)}),s=e}else typeof s=="string"&&s.trim()?s=[p2({src:s})]:Hs(s)&&typeof s.src=="string"&&s.src&&s.src.trim()?s=[p2(s)]:s=[];return s};function p2(s){if(!s.type){const e=Tp(s.src);e&&(s.type=e)}return s}var SO=`<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol viewBox="0 0 48 48" id="vjs-icon-play">
<path d="M16 10v28l22-14z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-pause">
<path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-audio">
<path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-captions">
<path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
<path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
<path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
<path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
<path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
<path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
<path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
<path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
<path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
<path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
</symbol>
<symbol viewBox="0 0 24 24" id="vjs-icon-hd">
<path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
<path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
</symbol>
<symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
<path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
<path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
<path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
<path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-share">
<path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cog">
<path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-square">
<path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle">
<circle cx="24" cy="24" r="20"></circle>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
<path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
<path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-replay">
<path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
<path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
<path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
<path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
<path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
<path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
<path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
</symbol>
<symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
<path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
</symbol>
<symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
<g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
<path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
<path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
<path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-cast">
<path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
</symbol>
<symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
<path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
</symbol>
<symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
<path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
<path fill="none" d="M-1-3h24v24H-1z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
<path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
<path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
</symbol>
<symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
<path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
</symbol>
<symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
<path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
</symbol>
</defs>
</svg>`;const m2=sp?10009:ap?461:8,fu={codes:{play:415,pause:19,ff:417,rw:412,back:m2},names:{415:"play",19:"pause",417:"ff",412:"rw",[m2]:"back"},isEventKey(s,e){return e=e.toLowerCase(),!!(this.names[s.keyCode]&&this.names[s.keyCode]===e)},getEventName(s){if(this.names[s.keyCode])return this.names[s.keyCode];if(this.codes[s.code]){const e=this.codes[s.code];return this.names[e]}return null}},g2=5;class xO extends On{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const a=i.key.substring(5).toLowerCase();this.move(a)}else if(fu.isEventKey(i,"play")||fu.isEventKey(i,"pause")||fu.isEventKey(i,"ff")||fu.isEventKey(i,"rw")){i.preventDefault();const a=fu.getEventName(i);this.performMediaAction_(a)}else fu.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+g2);break;case"rw":this.userSeek_(this.player_.currentTime()-g2);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let a=null;const o=this.getCurrentComponent(e.target);i&&(a=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!a||!i)&&(o&&o.name()==="CloseButton"?this.refocusComponent():(this.pause(),o&&o.el()&&(this.lastFocusedComponent_=o)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function a(o){for(const u of o)u.hasOwnProperty("el_")&&u.getIsFocusable()&&u.getIsAvailableToBeFocused(u.el())&&i.push(u),u.hasOwnProperty("children_")&&u.children_.length>0&&a(u.children_)}return e.children_.forEach(o=>{if(o.hasOwnProperty("el_"))if(o.getIsFocusable&&o.getIsAvailableToBeFocused&&o.getIsFocusable()&&o.getIsAvailableToBeFocused(o.el())){i.push(o);return}else o.hasOwnProperty("children_")&&o.children_.length>0?a(o.children_):o.hasOwnProperty("items")&&o.items.length>0?a(o.items):this.findSuitableDOMChild(o)&&i.push(o);if(o.name_==="ErrorDisplay"&&o.opened_){const u=o.el_.querySelector(".vjs-errors-ok-button-container");u&&u.querySelectorAll("button").forEach((f,m)=>{i.push({name:()=>"ModalButton"+(m+1),el:()=>f,getPositions:()=>{const b=f.getBoundingClientRect(),S={x:b.x,y:b.y,width:b.width,height:b.height,top:b.top,right:b.right,bottom:b.bottom,left:b.left},E={x:b.left+b.width/2,y:b.top+b.height/2,width:0,height:0,top:b.top+b.height/2,right:b.left+b.width/2,bottom:b.top+b.height/2,left:b.left+b.width/2};return{boundingClientRect:S,center:E}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:b=>!0,focus:()=>f.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(a){if(e.getIsFocusable(a)&&e.getIsAvailableToBeFocused(a))return a;for(let o=0;o<a.children.length;o++){const u=a.children[o],c=i(u);if(c)return c}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const a of this.focusableComponents)if(a.el()===i)return a}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const a=i.getPositions(),o=this.focusableComponents.filter(c=>c!==i&&this.isInDirection_(a.boundingClientRect,c.getPositions().boundingClientRect,e)),u=this.findBestCandidate_(a.center,o,e);u?this.focus(u):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,a){let o=1/0,u=null;for(const c of i){const f=c.getPositions().center,m=this.calculateDistance_(e,f,a);m<o&&(o=m,u=c)}return u}isInDirection_(e,i,a){switch(a){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,a){const o=Math.abs(e.x-i.x),u=Math.abs(e.y-i.y);let c;switch(a){case"right":case"left":c=o+u*100;break;case"up":c=u*2+o*.5;break;case"down":c=u*5+o;break;default:c=o+u}return c}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class EO extends ce{constructor(e,i,a){const o=xt({createEl:!1},i);if(super(e,o,a),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let u=0,c=i.playerOptions.techOrder;u<c.length;u++){const f=qt(c[u]);let m=Xe.getTech(f);if(f||(m=ce.getComponent(f)),m&&m.isSupported()){e.loadTech_(f);break}}else e.src(i.playerOptions.sources)}}ce.registerComponent("MediaLoader",EO);class Sp extends ce{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=a=>this.handleMouseOver(a),this.handleMouseOut_=a=>this.handleMouseOut(a),this.handleClick_=a=>this.handleClick(a),this.handleKeyDown_=a=>this.handleKeyDown(a),this.emitTapEvents(),this.enable()}createEl(e="div",i={},a={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&et.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),a=Object.assign({role:"button"},a),this.tabIndex_=i.tabIndex;const o=He(e,i,a);return this.player_.options_.experimentalSvgIcons||o.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=He("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const a=this.localize(e);this.controlText_=e,Dr(this.controlTextEl_,a),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",a)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("ClickableComponent",Sp);class G0 extends Sp{constructor(e,i){super(e,i),this.update(),this.update_=a=>this.update(a),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return He("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(He("picture",{className:"vjs-poster",tabIndex:-1},{},He("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Vs(this.player_.play()):this.player_.pause())}}G0.prototype.crossorigin=G0.prototype.crossOrigin,ce.registerComponent("PosterImage",G0);const Qn="#222",y2="#ccc",CO={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function X0(s,e){let i;if(s.length===4)i=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)i=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function qs(s,e,i){try{s.style[e]=i}catch{return}}function v2(s){return s?`${s}px`:""}class AO extends ce{constructor(e,i,a){super(e,i,a);const o=c=>this.updateDisplay(c),u=c=>{this.updateDisplayOverlay(),this.updateDisplay(c)};e.on("loadstart",c=>this.toggleDisplay(c)),e.on("useractive",o),e.on("userinactive",o),e.on("texttrackchange",o),e.on("loadedmetadata",c=>{this.updateDisplayOverlay(),this.preselectTrack(c)}),e.ready(Mt(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",u),e.on("playerresize",u);const c=B.screen.orientation||B,f=B.screen.orientation?"change":"orientationchange";c.addEventListener(f,u),e.on("dispose",()=>c.removeEventListener(f,u));const m=this.options_.playerOptions.tracks||[];for(let b=0;b<m.length;b++)this.player_.addRemoteTextTrack(m[b],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage;let o,u,c;for(let f=0;f<i.length;f++){const m=i[f];a&&a.enabled&&a.language&&a.language===m.language&&m.kind in e?m.kind===a.kind?c=m:c||(c=m):a&&!a.enabled?(c=null,o=null,u=null):m.default&&(m.kind==="descriptions"&&!o?o=m:m.kind in e&&!u&&(u=m))}c?c.mode="showing":u?u.mode="showing":o&&(o.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof B.WebVTT=="function"&&B.WebVTT.processCues(B,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const c=[];for(let f=0;f<e.length;++f){const m=e[f];m.mode==="showing"&&c.push(m)}this.updateForTrack(c);return}let a=null,o=null,u=e.length;for(;u--;){const c=e[u];c.mode==="showing"&&(c.kind==="descriptions"?a=c:o=c)}if(o?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):a&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a)),!B.CSS.supports("inset","10px")){const c=this.el_,f=c.querySelectorAll(".vjs-text-track-cue"),m=this.player_.controlBar.el_.getBoundingClientRect().height,b=this.player_.el_.getBoundingClientRect().height;c.style="",qs(c,"position","relative"),qs(c,"height",b-m+"px"),qs(c,"top","unset"),rp?qs(c,"bottom",b+"px"):qs(c,"bottom","0px"),f.length>0&&f.forEach(S=>{if(S.style.inset){const E=S.style.inset.split(" ");E.length===3&&Object.assign(S.style,{top:E[0],right:E[1],bottom:E[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!B.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),a=e/i,o=this.player_.videoWidth()/this.player_.videoHeight();let u=0,c=0;Math.abs(a-o)>.1&&(a>o?u=Math.round((e-i*o)/2):c=Math.round((i-e/o)/2)),qs(this.el_,"insetInline",v2(u)),qs(this.el_,"insetBlock",v2(c))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),a=e.activeCues;let o=a.length;for(;o--;){const u=a[o];if(!u)continue;const c=u.displayState;if(i.color&&(c.firstChild.style.color=i.color),i.textOpacity&&qs(c.firstChild,"color",X0(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(c.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&qs(c.firstChild,"backgroundColor",X0(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?qs(c,"backgroundColor",X0(i.windowColor,i.windowOpacity)):c.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?c.firstChild.style.textShadow=`2px 2px 3px ${Qn}, 2px 2px 4px ${Qn}, 2px 2px 5px ${Qn}`:i.edgeStyle==="raised"?c.firstChild.style.textShadow=`1px 1px ${Qn}, 2px 2px ${Qn}, 3px 3px ${Qn}`:i.edgeStyle==="depressed"?c.firstChild.style.textShadow=`1px 1px ${y2}, 0 1px ${y2}, -1px -1px ${Qn}, 0 -1px ${Qn}`:i.edgeStyle==="uniform"&&(c.firstChild.style.textShadow=`0 0 4px ${Qn}, 0 0 4px ${Qn}, 0 0 4px ${Qn}, 0 0 4px ${Qn}`)),i.fontPercent&&i.fontPercent!==1){const f=B.parseFloat(c.style.fontSize);c.style.fontSize=f*i.fontPercent+"px",c.style.height="auto",c.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?c.firstChild.style.fontVariant="small-caps":c.firstChild.style.fontFamily=CO[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof B.WebVTT!="function"||e.every(a=>!a.activeCues))return;const i=[];for(let a=0;a<e.length;++a){const o=e[a];for(let u=0;u<o.activeCues.length;++u)i.push(o.activeCues[u])}B.WebVTT.processCues(B,i,this.el_);for(let a=0;a<e.length;++a){const o=e[a];for(let u=0;u<o.activeCues.length;++u){const c=o.activeCues[u].displayState;ko(c,"vjs-text-track-cue","vjs-text-track-cue-"+(o.language?o.language:a)),o.language&&ou(c,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}}ce.registerComponent("TextTrackDisplay",AO);class wO extends ce{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),a=He("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),o=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(a),o}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}ce.registerComponent("LoadingSpinner",wO);let Hi=class extends Sp{createEl(e,i={},a={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),a=Object.assign({type:"button"},a);const o=He(e,i,a);return this.player_.options_.experimentalSvgIcons||o.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}addChild(e,i={}){const a=this.constructor.name;return et.warn(`Adding an actionable (user controllable) child to a Button (${a}) is not supported; use a ClickableComponent instead.`),ce.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}};ce.registerComponent("Button",Hi);class b2 extends Hi{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",a=>this.handleMouseDown(a))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Vs(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const a=this.player_.getChild("controlBar"),o=a&&a.getChild("playToggle");if(!o){this.player_.tech(!0).focus();return}const u=()=>o.focus();Ed(i)?i.then(u,()=>{}):this.setTimeout(u,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}b2.prototype.controlText_="Play Video",ce.registerComponent("BigPlayButton",b2);class DO extends Hi{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}ce.registerComponent("CloseButton",DO);class _2 extends Hi{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",a=>this.handlePlay(a)),this.on(e,"pause",a=>this.handlePause(a)),i.replay&&this.on(e,"ended",a=>this.handleEnded(a))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Vs(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}_2.prototype.controlText_="Play",ce.registerComponent("PlayToggle",_2);class pu extends ce{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],a=>this.update(a)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),a=He("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(a),this.contentEl_=He("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Ro(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,et.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=ye.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}pu.prototype.labelText_="Time",pu.prototype.controlText_="Time",ce.registerComponent("TimeDisplay",pu);class Y0 extends pu{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}Y0.prototype.labelText_="Current Time",Y0.prototype.controlText_="Current Time",ce.registerComponent("CurrentTimeDisplay",Y0);class W0 extends pu{constructor(e,i){super(e,i);const a=o=>this.updateContent(o);this.on(e,"durationchange",a),this.on(e,"loadstart",a),this.on(e,"loadedmetadata",a)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}W0.prototype.labelText_="Duration",W0.prototype.controlText_="Duration",ce.registerComponent("DurationDisplay",W0);class kO extends ce{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),a=super.createEl("span",{textContent:"/"});return i.appendChild(a),e.appendChild(i),e}}ce.registerComponent("TimeDivider",kO);class Q0 extends pu{constructor(e,i){super(e,i),this.on(e,"durationchange",a=>this.updateContent(a))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(He("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}Q0.prototype.labelText_="Remaining Time",Q0.prototype.controlText_="Remaining Time",ce.registerComponent("RemainingTimeDisplay",Q0);class OO extends ce{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",a=>this.updateShowing(a))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=He("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(He("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(ye.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}ce.registerComponent("LiveDisplay",OO);class T2 extends Hi{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=a=>this.updateLiveEdgeStatus(a),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=He("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}T2.prototype.controlText_="Seek to live, currently playing live",ce.registerComponent("SeekToLive",T2);function Ad(s,e,i){return s=Number(s),Math.min(i,Math.max(e,isNaN(s)?e:s))}var RO=Object.freeze({__proto__:null,clamp:Ad});class K0 extends ce{constructor(e,i){super(e,i),this.handleMouseDown_=a=>this.handleMouseDown(a),this.handleMouseUp_=a=>this.handleMouseUp(a),this.handleKeyDown_=a=>this.handleKeyDown(a),this.handleClick_=a=>this.handleClick(a),this.handleMouseMove_=a=>this.handleMouseMove(a),this.update_=a=>this.update(a),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},a={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),a=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},a),super.createEl(e,i,a)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!js&&e.preventDefault(),P1(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;N1(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(Ad(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=cp(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,a=i&&i.enabled,o=i&&i.horizontalSeek;a?o&&e.key==="ArrowLeft"||!o&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):o&&e.key==="ArrowRight"||!o&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}ce.registerComponent("Slider",K0);const Z0=(s,e)=>Ad(s/e*100,0,100).toFixed(2)+"%";class MO extends ce{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",a=>this.update(a))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=He("span",{className:"vjs-control-text"}),a=He("span",{textContent:this.localize("Loaded")}),o=ye.createTextNode(": ");return this.percentageEl_=He("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(a),i.appendChild(o),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,a=this.player_.buffered(),o=i&&i.isLive()?i.seekableEnd():this.player_.duration(),u=this.player_.bufferedEnd(),c=this.partEls_,f=Z0(u,o);this.percent_!==f&&(this.el_.style.width=f,Dr(this.percentageEl_,f),this.percent_=f);for(let m=0;m<a.length;m++){const b=a.start(m),S=a.end(m);let E=c[m];E||(E=this.el_.appendChild(He()),c[m]=E),!(E.dataset.start===b&&E.dataset.end===S)&&(E.dataset.start=b,E.dataset.end=S,E.style.left=Z0(b,u),E.style.width=Z0(S-b,u))}for(let m=c.length;m>a.length;m--)this.el_.removeChild(c[m-1]);c.length=a.length})}}ce.registerComponent("LoadProgressBar",MO);class LO extends ce{constructor(e,i){super(e,i),this.update=zs(Mt(this,this.update),Yn)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,a){const o=_d(this.el_),u=lu(this.player_.el()),c=e.width*i;if(!u||!o)return;let f=e.left-u.left+c,m=e.width-c+(u.right-e.right);m||(m=e.width-c,f=c);let b=o.width/2;f<b?b+=b-f:m<b&&(b=m),b<0?b=0:b>o.width&&(b=o.width),b=Math.round(b),this.el_.style.right=`-${b}px`,this.write(a)}write(e){Dr(this.el_,e)}updateTime(e,i,a,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let u;const c=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const f=this.player_.liveTracker.liveWindow(),m=f-i*f;u=(m<1?"":"-")+Ro(m,f)}else u=Ro(a,c);this.update(e,i,u),o&&o()})}}ce.registerComponent("TimeTooltip",LO);class J0 extends ce{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=zs(Mt(this,this.update),Yn)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,a){const o=this.getChild("timeTooltip");if(!o)return;const u=a&&a.target&&typeof a.target.pendingSeekTime=="function"?a.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();o.updateTime(e,i,u)}}J0.prototype.options_={children:[]},!Bi&&!ys&&J0.prototype.options_.children.push("timeTooltip"),ce.registerComponent("PlayProgressBar",J0);class S2 extends ce{constructor(e,i){super(e,i),this.update=zs(Mt(this,this.update),Yn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const a=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,a,()=>{this.el_.style.left=`${e.width*i}px`})}}S2.prototype.options_={children:["timeTooltip"]},ce.registerComponent("MouseTimeDisplay",S2);class xp extends K0{constructor(e,i){i=xt(xp.prototype.options_,i),i.children=[...i.children];const a=e.options_.disableSeekWhileScrubbingOnMobile&&(Bi||ys)||e.options_.disableSeekWhileScrubbingOnSTV;(!Bi&&!ys||a)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=a,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=Mt(this,this.update),this.update=zs(this.update_,Yn),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ye&&"visibilityState"in ye&&this.on(ye,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){ye.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Yn))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(ye.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const a=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),o=this.player_.liveTracker;let u=this.player_.duration();o&&o.isLive()&&(u=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==a||this.duration_!==u)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Ro(a,u),Ro(u,u)],"{1} of {2}")),this.currentTime_=a,this.duration_=u),this.bar&&this.bar.update(lu(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const a=this.player_.liveTracker;return a&&a.isLive()?(i=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){Td(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!Td(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let a;const o=this.calculateDistance(e),u=this.player_.liveTracker;if(!u||!u.isLive())a=o*this.player_.duration(),a===this.player_.duration()&&(a=a-.1);else{if(o>=.99){u.seekToLiveEdge();return}const c=u.seekableStart(),f=u.liveCurrentTime();if(a=c+o*u.liveWindow(),a>=f&&(a=f),a<=c&&(a=c+.1),a===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(a):this.userSeek_(a),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Vs(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const a=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in ye&&"visibilityState"in ye&&this.off(ye,"visibilitychange",this.toggleVisibility_),super.dispose()}}xp.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},ce.registerComponent("SeekBar",xp);class x2 extends ce{constructor(e,i){super(e,i),this.handleMouseMove=zs(Mt(this,this.handleMouseMove),Yn),this.throttledHandleMouseSeek=zs(Mt(this,this.handleMouseSeek),Yn),this.handleMouseUpHandler_=a=>this.handleMouseUp(a),this.handleMouseDownHandler_=a=>this.handleMouseDown(a),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const a=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(!a&&!o)return;const u=i.el(),c=_d(u);let f=cp(u,e).x;f=Ad(f,0,1),o&&o.update(c,f),a&&a.update(c,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Vs(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}x2.prototype.options_={children:["seekBar"]},ce.registerComponent("ProgressControl",x2);class E2 extends Hi{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],a=>this.handlePictureInPictureChange(a)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],a=>this.handlePictureInPictureEnabledChange(a)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){ye.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in B?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof ye.exitPictureInPicture=="function"&&super.show()}}E2.prototype.controlText_="Picture-in-Picture",ce.registerComponent("PictureInPictureToggle",E2);class C2 extends Hi{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",a=>this.handleFullscreenChange(a)),ye[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}C2.prototype.controlText_="Fullscreen",ce.registerComponent("FullscreenToggle",C2);const IO=function(s,e){e.tech_&&!e.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class PO extends ce{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}ce.registerComponent("VolumeLevel",PO);class NO extends ce{constructor(e,i){super(e,i),this.update=zs(Mt(this,this.update),Yn)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,a,o){if(!a){const u=lu(this.el_),c=lu(this.player_.el()),f=e.width*i;if(!c||!u)return;const m=e.left-c.left+f,b=e.width-f+(c.right-e.right);let S=u.width/2;m<S?S+=S-m:b<S&&(S=b),S<0?S=0:S>u.width&&(S=u.width),this.el_.style.right=`-${S}px`}this.write(`${o}%`)}write(e){Dr(this.el_,e)}updateVolume(e,i,a,o,u){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,a,o.toFixed(0)),u&&u()})}}ce.registerComponent("VolumeLevelTooltip",NO);class A2 extends ce{constructor(e,i){super(e,i),this.update=zs(Mt(this,this.update),Yn)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,a){const o=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,a,o,()=>{a?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}A2.prototype.options_={children:["volumeLevelTooltip"]},ce.registerComponent("MouseVolumeLevelDisplay",A2);class Ep extends K0{constructor(e,i){super(e,i),this.on("slideractive",a=>this.updateLastVolume_(a)),this.on(e,"volumechange",a=>this.updateARIAAttributes(a)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Td(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const a=this.el(),o=lu(a),u=this.vertical();let c=cp(a,e);c=u?c.y:c.x,c=Ad(c,0,1),i.update(o,c,u)}Td(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Ep.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Bi&&!ys&&Ep.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ep.prototype.playerEvent="volumechange",ce.registerComponent("VolumeBar",Ep);class w2 extends ce{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||iu(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),IO(this,e),this.throttledHandleMouseMove=zs(Mt(this,this.handleMouseMove),Yn),this.handleMouseUpHandler_=a=>this.handleMouseUp(a),this.on("mousedown",a=>this.handleMouseDown(a)),this.on("touchstart",a=>this.handleMouseDown(a)),this.on("mousemove",a=>this.handleMouseMove(a)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}w2.prototype.options_={children:["volumeBar"]},ce.registerComponent("VolumeControl",w2);const UO=function(s,e){e.tech_&&!e.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class D2 extends Hi{constructor(e,i){super(e,i),UO(this,e),this.on(e,["loadstart","volumechange"],a=>this.update(a))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),a=this.player_.lastVolume_();if(i===0){const o=a<.1?.1:a;this.player_.volume(o),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),Bi&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),lp(this.el_,[0,1,2,3].reduce((a,o)=>a+`${o?" ":""}vjs-vol-${o}`,"")),ko(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}D2.prototype.controlText_="Mute",ce.registerComponent("MuteToggle",D2);class k2 extends ce{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||iu(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=a=>this.handleKeyPress(a),this.on(e,["loadstart"],a=>this.volumePanelState_(a)),this.on(this.muteToggle,"keyup",a=>this.handleKeyPress(a)),this.on(this.volumeControl,"keyup",a=>this.handleVolumeControlKeyUp(a)),this.on("keydown",a=>this.handleKeyPress(a)),this.on("mouseover",a=>this.handleMouseOver(a)),this.on("mouseout",a=>this.handleMouseOut(a)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),kn(ye,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Fi(ye,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}k2.prototype.options_={children:["muteToggle","volumeControl"]},ce.registerComponent("VolumePanel",k2);class O2 extends Hi{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),a=this.player_.liveTracker,o=a&&a.isLive()?a.seekableEnd():this.player_.duration();let u;i+this.skipTime<=o?u=i+this.skipTime:u=o,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}O2.prototype.controlText_="Skip Forward",ce.registerComponent("SkipForward",O2);class R2 extends Hi{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),a=this.player_.liveTracker,o=a&&a.isLive()&&a.seekableStart();let u;o&&i-this.skipTime<=o?u=o:i>=this.skipTime?u=i-this.skipTime:u=0,this.player_.currentTime(u)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}R2.prototype.controlText_="Skip Backward",ce.registerComponent("SkipBackward",R2);class M2 extends ce{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",a=>this.handleKeyDown(a)),this.boundHandleBlur_=a=>this.handleBlur(a),this.boundHandleTapClick_=a=>this.handleTapClick(a)}addEventListenerForItem(e){e instanceof ce&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof ce&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=He(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),kn(i,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||ye.activeElement;if(!this.children().some(a=>a.el()===i)){const a=this.menuButton_;a&&a.buttonPressed_&&i!==a.el().firstChild&&a.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const a=i.filter(o=>o.el()===e.target)[0];if(!a)return;a.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}ce.registerComponent("Menu",M2);class ey extends ce{constructor(e,i={}){super(e,i),this.menuButton_=new Hi(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const a=Hi.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+a,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const o=u=>this.handleClick(u);this.handleMenuKeyUp_=u=>this.handleMenuKeyUp(u),this.on(this.menuButton_,"tap",o),this.on(this.menuButton_,"click",o),this.on(this.menuButton_,"keydown",u=>this.handleKeyDown(u)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),kn(ye,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",u=>this.handleMouseLeave(u)),this.on("keydown",u=>this.handleSubmenuKeyDown(u))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new M2(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=He("li",{className:"vjs-menu-title",textContent:qt(this.options_.title),tabIndex:-1}),a=new ce(this.player_,{el:i});e.addItem(a)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=Hi.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),Fi(ye,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Bi&&O1())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}ce.registerComponent("MenuButton",ey);class ty extends ey{constructor(e,i){const a=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!a)return;const o=Mt(this,this.update);a.addEventListener("removetrack",o),a.addEventListener("addtrack",o),a.addEventListener("labelchange",o),this.player_.on("ready",o),this.player_.on("dispose",function(){a.removeEventListener("removetrack",o),a.removeEventListener("addtrack",o),a.removeEventListener("labelchange",o)})}}ce.registerComponent("TrackButton",ty);class wd extends Sp{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,a){this.nonIconControl=!0;const o=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),a),u=He("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?o.appendChild(u):o.replaceChild(u,o.querySelector(".vjs-icon-placeholder")),o}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}ce.registerComponent("MenuItem",wd);class Dd extends wd{constructor(e,i){const a=i.track,o=e.textTracks();i.label=a.label||a.language||"Unknown",i.selected=a.mode==="showing",super(e,i),this.track=a,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const u=(...f)=>{this.handleTracksChange.apply(this,f)},c=(...f)=>{this.handleSelectedLanguageChange.apply(this,f)};if(e.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",c),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===void 0){let f;this.on(["tap","click"],function(){if(typeof B.Event!="object")try{f=new B.Event("change")}catch{}f||(f=ye.createEvent("Event"),f.initEvent("change",!0,!0)),o.dispatchEvent(f)})}this.handleTracksChange()}handleClick(e){const i=this.track,a=this.player_.textTracks();if(super.handleClick(e),!!a)for(let o=0;o<a.length;o++){const u=a[o];this.kinds.indexOf(u.kind)!==-1&&(u===i?u.mode!=="showing"&&(u.mode="showing"):u.mode!=="disabled"&&(u.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}ce.registerComponent("TextTrackMenuItem",Dd);class L2 extends Dd{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let a=!0;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(this.options_.kinds.indexOf(c.kind)>-1&&c.mode==="showing"){a=!1;break}}a!==this.isSelected_&&this.selected(a)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let a=!0;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(["captions","descriptions","subtitles"].indexOf(c.kind)>-1&&c.mode==="showing"){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}ce.registerComponent("OffTextTrackMenuItem",L2);class mu extends ty{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=Dd){let a;this.label_&&(a=`${this.label_} off`),e.push(new L2(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;const o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let u=0;u<o.length;u++){const c=o[u];if(this.kinds_.indexOf(c.kind)>-1){const f=new i(this.player_,{track:c,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass(`vjs-${c.kind}-menu-item`),e.push(f)}}return e}}ce.registerComponent("TextTrackButton",mu);class I2 extends wd{constructor(e,i){const a=i.track,o=i.cue,u=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=o.text,i.selected=o.startTime<=u&&u<o.endTime,super(e,i),this.track=a,this.cue=o}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}ce.registerComponent("ChaptersTrackMenuItem",I2);class iy extends mu{constructor(e,i,a){super(e,i,a),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(o=>{o.selected(this.track_.activeCues[0]===o.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const a=e[i];if(a.kind===this.kind_)return a}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let a=0,o=i.length;a<o;a++){const u=i[a],c=new I2(this.player_,{track:this.track_,cue:u});e.push(c)}return e}}iy.prototype.kind_="chapters",iy.prototype.controlText_="Chapters",ce.registerComponent("ChaptersButton",iy);class ny extends mu{constructor(e,i,a){super(e,i,a),this.setIcon("audio-description");const o=e.textTracks(),u=Mt(this,this.handleTracksChange);o.addEventListener("change",u),this.on("dispose",function(){o.removeEventListener("change",u)})}handleTracksChange(e){const i=this.player().textTracks();let a=!1;for(let o=0,u=i.length;o<u;o++){const c=i[o];if(c.kind!==this.kind_&&c.mode==="showing"){a=!0;break}}a?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}ny.prototype.kind_="descriptions",ny.prototype.controlText_="Descriptions",ce.registerComponent("DescriptionsButton",ny);class sy extends mu{constructor(e,i,a){super(e,i,a),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}sy.prototype.kind_="subtitles",sy.prototype.controlText_="Subtitles",ce.registerComponent("SubtitlesButton",sy);class ay extends Dd{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}ce.registerComponent("CaptionSettingsMenuItem",ay);class ry extends mu{constructor(e,i,a){super(e,i,a),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ay(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}ry.prototype.kind_="captions",ry.prototype.controlText_="Captions",ce.registerComponent("CaptionsButton",ry);class P2 extends Dd{createEl(e,i,a){const o=super.createEl(e,i,a),u=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",o):u.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(He("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),o}}ce.registerComponent("SubsCapsMenuItem",P2);class oy extends mu{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(qt(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new ay(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,P2),e}}oy.prototype.kinds_=["captions","subtitles"],oy.prototype.controlText_="Subtitles",ce.registerComponent("SubsCapsButton",oy);class N2 extends wd{constructor(e,i){const a=i.track,o=e.audioTracks();i.label=a.label||a.language||"Unknown",i.selected=a.enabled,super(e,i),this.track=a,this.addClass(`vjs-${a.kind}-menu-item`);const u=(...c)=>{this.handleTracksChange.apply(this,c)};o.addEventListener("change",u),this.on("dispose",()=>{o.removeEventListener("change",u)})}createEl(e,i,a){const o=super.createEl(e,i,a),u=o.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(u.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(He("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let a=0;a<i.length;a++){const o=i[a];o!==this.track&&(o.enabled=o===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}ce.registerComponent("AudioTrackMenuItem",N2);class U2 extends ty{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let a=0;a<i.length;a++){const o=i[a];e.push(new N2(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e}}U2.prototype.controlText_="Audio Track",ce.registerComponent("AudioTrackButton",U2);class ly extends wd{constructor(e,i){const a=i.rate,o=parseFloat(a,10);i.label=a,i.selected=o===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=a,this.rate=o,this.on(e,"ratechange",u=>this.update(u))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}ly.prototype.contentElType="button",ce.registerComponent("PlaybackRateMenuItem",ly);class B2 extends ey{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",a=>this.updateVisibility(a)),this.on(e,"ratechange",a=>this.updateLabel(a)),this.on(e,"playbackrateschange",a=>this.handlePlaybackRateschange(a))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=He("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let a=e.length-1;a>=0;a--)i.push(new ly(this.player(),{rate:e[a]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}B2.prototype.controlText_="Playback Rate",ce.registerComponent("PlaybackRateMenuButton",B2);class F2 extends ce{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},a={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,a)}}ce.registerComponent("Spacer",F2);class BO extends F2{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}ce.registerComponent("CustomControlSpacer",BO);class H2 extends ce{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}H2.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},ce.registerComponent("ControlBar",H2);class j2 extends du{constructor(e,i){super(e,i),this.on(e,"error",a=>{this.open(a)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}j2.prototype.options_=Object.assign({},du.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ce.registerComponent("ErrorDisplay",j2);class z2 extends ce{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),He("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const a=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${Xn()}`)+"-"+i[1].replace(/\W+/g,""),o=He("option",{id:a,value:this.localize(i[0]),textContent:this.localize(i[1])});return o.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${a}`),o}))}}ce.registerComponent("TextTrackSelect",z2);class Po extends ce{constructor(e,i={}){super(e,i);const a=He("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(a);const o=this.options_.selects;for(const u of o){const c=this.options_.selectConfigs[u],f=c.className,m=c.id.replace("%s",this.options_.id_);let b=null;const S=`vjs_select_${Xn()}`;if(this.options_.type==="colors"){b=He("span",{className:f});const A=He("label",{id:m,className:"vjs-label",textContent:this.localize(c.label)});A.setAttribute("for",S),b.appendChild(A)}const E=new z2(e,{SelectOptions:c.options,legendId:this.options_.legendId,id:S,labelId:m});this.addChild(E),this.options_.type==="colors"&&(b.appendChild(E.el()),this.el().appendChild(b))}}createEl(){return He("fieldset",{className:this.options_.className})}}ce.registerComponent("TextTrackFieldset",Po);class V2 extends ce{constructor(e,i={}){super(e,i);const a=this.options_.textTrackComponentid,o=new Po(e,{id_:a,legendId:`captions-text-legend-${a}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o);const u=new Po(e,{id_:a,legendId:`captions-background-${a}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(u);const c=new Po(e,{id_:a,legendId:`captions-window-${a}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(c)}createEl(){return He("div",{className:"vjs-track-settings-colors"})}}ce.registerComponent("TextTrackSettingsColors",V2);class q2 extends ce{constructor(e,i={}){super(e,i);const a=this.options_.textTrackComponentid,o=new Po(e,{id_:a,legendId:`captions-font-size-${a}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o);const u=new Po(e,{id_:a,legendId:`captions-edge-style-${a}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(u);const c=new Po(e,{id_:a,legendId:`captions-font-family-${a}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(c)}createEl(){return He("div",{className:"vjs-track-settings-font"})}}ce.registerComponent("TextTrackSettingsFont",q2);class $2 extends ce{constructor(e,i={}){super(e,i);const a=new Hi(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=this.localize("Reset"),this.addChild(a);const o=this.localize("Done"),u=new Hi(e,{controlText:o,className:"vjs-done-button"});u.el().classList.remove("vjs-control","vjs-button"),u.el().textContent=o,this.addChild(u)}createEl(){return He("div",{className:"vjs-track-settings-controls"})}}ce.registerComponent("TrackSettingsControls",$2);const uy="vjs-text-track-settings",G2=["#000","Black"],X2=["#00F","Blue"],Y2=["#0FF","Cyan"],W2=["#0F0","Green"],Q2=["#F0F","Magenta"],K2=["#F00","Red"],Z2=["#FFF","White"],J2=["#FF0","Yellow"],cy=["1","Opaque"],dy=["0.5","Semi-Transparent"],eS=["0","Transparent"],Rr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[G2,Z2,K2,W2,X2,J2,Q2,Y2],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[cy,dy,eS],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Z2,G2,K2,W2,X2,J2,Q2,Y2],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:s=>s==="1.00"?null:Number(s)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[cy,dy],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[eS,dy,cy],className:"vjs-window-opacity vjs-opacity"}};Rr.windowColor.options=Rr.backgroundColor.options;function tS(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function FO(s,e){const i=s.options[s.options.selectedIndex].value;return tS(i,e)}function HO(s,e,i){if(e){for(let a=0;a<s.options.length;a++)if(tS(s.options[a].value,i)===e){s.selectedIndex=a;break}}}class jO extends du{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=He("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new V2(e,{textTrackComponentid:this.id_,selectConfigs:Rr,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const a=new q2(e,{textTrackComponentid:this.id_,selectConfigs:Rr,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(a);const o=new $2(e);this.addChild(o)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),tu(Rr,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return S1(Rr,(e,i,a)=>{const o=FO(this.$(i.selector),i.parser);return o!==void 0&&(e[a]=o),e},{})}setValues(e){tu(Rr,(i,a)=>{HO(this.$(i.selector),e[a],i.parser)})}setDefaults(){tu(Rr,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(B.localStorage.getItem(uy))}catch(i){et.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?B.localStorage.setItem(uy,JSON.stringify(e)):B.localStorage.removeItem(uy)}catch(i){et.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}ce.registerComponent("TextTrackSettings",jO);class zO extends ce{constructor(e,i){let a=i.ResizeObserver||B.ResizeObserver;i.ResizeObserver===null&&(a=!1);const o=xt({createEl:!a,reportTouchActivity:!1},i);super(e,o),this.ResizeObserver=i.ResizeObserver||B.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=X1(()=>{this.resizeHandler()},100,!1,this),a?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const u=this.debouncedHandler_;let c=this.unloadListener_=function(){Fi(this,"resize",u),Fi(this,"unload",c),c=null};kn(this.el_.contentWindow,"unload",c),kn(this.el_.contentWindow,"resize",u)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}ce.registerComponent("ResizeManager",zO);const VO={trackingThreshold:20,liveTolerance:15};class qO extends ce{constructor(e,i){const a=xt(VO,i,{createEl:!1});super(e,a),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=o=>this.handlePlay(o),this.handleFirstTimeupdate_=o=>this.handleFirstTimeupdate(o),this.handleSeeked_=o=>this.handleSeeked(o),this.seekToLiveEdge_=o=>this.seekToLiveEdge(o),this.reset_(),this.on(this.player_,"durationchange",o=>this.handleDurationchange(o)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(B.performance.now().toFixed(4)),a=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+a;const o=this.liveCurrentTime(),u=this.player_.currentTime();let c=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-u)>this.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(c=!1),c!==this.behindLiveEdge_&&(this.behindLiveEdge_=c,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Yn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let a=e?e.length:0;for(;a--;)i.push(e.end(a));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let a=e?e.length:0;for(;a--;)i.push(e.start(a));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}ce.registerComponent("LiveTracker",qO);class $O extends ce{constructor(e,i){super(e,i),this.on("statechanged",a=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:He("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${Xn()}`}),description:He("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${Xn()}`})},He("div",{className:"vjs-title-bar"},{},x1(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,a={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(o=>{const u=this.state[o],c=this.els[o],f=a[o];dp(c),u&&Dr(c,u),i&&(i.removeAttribute(f),u&&i.setAttribute(f,c.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}ce.registerComponent("TitleBar",$O);const GO={initialDisplay:4e3,position:[],takeFocus:!1};class XO extends Hi{constructor(e,i){i=xt(GO,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],a=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=He("button",{},{type:"button",class:this.buildCSSClass()},He("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}ce.registerComponent("TransientButton",XO);const hy=s=>{const e=s.el();if(e.hasAttribute("src"))return s.triggerSourceset(e.src),!0;const i=s.$$("source"),a=[];let o="";if(!i.length)return!1;for(let u=0;u<i.length;u++){const c=i[u].src;c&&a.indexOf(c)===-1&&a.push(c)}return a.length?(a.length===1&&(o=a[0]),s.triggerSourceset(o),!0):!1},YO=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(s){const e=ye.createElement(this.nodeName.toLowerCase());e.innerHTML=s;const i=ye.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",B.Element.prototype.appendChild.call(this,i),this.innerHTML}}),iS=(s,e)=>{let i={};for(let a=0;a<s.length&&(i=Object.getOwnPropertyDescriptor(s[a],e),!(i&&i.set&&i.get));a++);return i.enumerable=!0,i.configurable=!0,i},WO=s=>iS([s.el(),B.HTMLMediaElement.prototype,B.Element.prototype,YO],"innerHTML"),nS=function(s){const e=s.el();if(e.resetSourceWatch_)return;const i={},a=WO(s),o=u=>(...c)=>{const f=u.apply(e,c);return hy(s),f};["append","appendChild","insertAdjacentHTML"].forEach(u=>{e[u]&&(i[u]=e[u],e[u]=o(i[u]))}),Object.defineProperty(e,"innerHTML",xt(a,{set:o(a.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(u=>{e[u]=i[u]}),Object.defineProperty(e,"innerHTML",a)},s.one("sourceset",e.resetSourceWatch_)},QO=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?r2(B.Element.prototype.getAttribute.call(this,"src")):""},set(s){return B.Element.prototype.setAttribute.call(this,"src",s),s}}),KO=s=>iS([s.el(),B.HTMLMediaElement.prototype,QO],"src"),ZO=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const i=KO(s),a=e.setAttribute,o=e.load;Object.defineProperty(e,"src",xt(i,{set:u=>{const c=i.set.call(e,u);return s.triggerSourceset(e.src),c}})),e.setAttribute=(u,c)=>{const f=a.call(e,u,c);return/src/i.test(u)&&s.triggerSourceset(e.src),f},e.load=()=>{const u=o.call(e);return hy(s)||(s.triggerSourceset(""),nS(s)),u},e.currentSrc?s.triggerSourceset(e.currentSrc):hy(s)||nS(s),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=o,e.setAttribute=a,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class Ce extends Xe{constructor(e,i){super(e,i);const a=e.source;let o=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",a&&(this.el_.currentSrc!==a.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(a):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const u=this.el_.childNodes;let c=u.length;const f=[];for(;c--;){const m=u[c];m.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(m),this.remoteTextTracks().addTrack(m.track),this.textTracks().addTrack(m.track),!o&&!this.el_.hasAttribute("crossorigin")&&vp(m.src)&&(o=!0)):f.push(m))}for(let m=0;m<f.length;m++)this.el_.removeChild(f[m])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&o&&et.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(vd||np)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Ce.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){ZO(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const a=()=>{i=[];for(let u=0;u<e.length;u++){const c=e[u];c.kind==="metadata"&&i.push({track:c,storedMode:c.mode})}};a(),e.addEventListener("change",a),this.on("dispose",()=>e.removeEventListener("change",a));const o=()=>{for(let u=0;u<i.length;u++){const c=i[u];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}e.removeEventListener("change",o)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",a),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",a),e.addEventListener("change",a),e.removeEventListener("change",o)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const a=e.toLowerCase();this[`${a}TracksListeners_`]&&Object.keys(this[`${a}TracksListeners_`]).forEach(o=>{this.el()[`${a}Tracks`].removeEventListener(o,this[`${a}TracksListeners_`][o])}),this[`featuresNative${e}Tracks`]=!i,this[`${a}TracksListeners_`]=null,this.proxyNativeTracksForType_(a)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=Wn[e],a=this.el()[i.getterName],o=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!a||!a.addEventListener)return;const u={change:f=>{const m={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(m),e==="text"&&this[hu.remoteText.getterName]().trigger(m)},addtrack(f){o.addTrack(f.track)},removetrack(f){o.removeTrack(f.track)}},c=function(){const f=[];for(let m=0;m<o.length;m++){let b=!1;for(let S=0;S<a.length;S++)if(a[S]===o[m]){b=!0;break}b||f.push(o[m])}for(;f.length;)o.removeTrack(f.shift())};this[i.getterName+"Listeners_"]=u,Object.keys(u).forEach(f=>{const m=u[f];a.addEventListener(f,m),this.on("dispose",b=>a.removeEventListener(f,m))}),this.on("loadstart",c),this.on("dispose",f=>this.off("loadstart",c))}proxyNativeTracks_(){Wn.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const a=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(a,e),Ce.disposeMediaElement(e),e=a}else{e=ye.createElement("video");const a=this.options_.tag&&kr(this.options_.tag),o=xt({},a);(!vd||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,L1(e,Object.assign(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ou(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let a=0;a<i.length;a++){const o=i[a],u=this.options_[o];typeof u<"u"&&(u?ou(e,o,o):up(e,o),e[o]=u)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let a=!1;const o=function(){a=!0};this.on("loadstart",o);const u=function(){a||this.trigger("loadstart")};this.on("loadedmetadata",u),this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",u),a||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(a){this.trigger(a)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&op?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){et(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&ys&&js&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Vs(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return et.error("Invalid source URL."),!1;const a={src:e};i&&(a.type=i);const o=He("source",{},a);return this.el_.appendChild(o),!0}removeSourceElement(e){if(!e)return et.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const a of i)if(a.src===e)return this.el_.removeChild(a),!0;return et.warn(`No matching source element found with src: ${e}`),!1}reset(){Ce.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,a):super.addTextTrack(e,i,a)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=ye.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const a=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(a),a}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let a=i.length;for(;a--;)(e===i[a]||e===i[a].track)&&this.el().removeChild(i[a])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),B.performance&&(e.creationTime=B.performance.now()),e}}Zf(Ce,"TEST_VID",function(){if(!au())return;const s=ye.createElement("video"),e=ye.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s}),Ce.isSupported=function(){try{Ce.TEST_VID.volume=.5}catch{return!1}return!!(Ce.TEST_VID&&Ce.TEST_VID.canPlayType)},Ce.canPlayType=function(s){return Ce.TEST_VID.canPlayType(s)},Ce.canPlaySource=function(s,e){return Ce.canPlayType(s.type)},Ce.canControlVolume=function(){try{const s=Ce.TEST_VID.volume;Ce.TEST_VID.volume=s/2+.1;const e=s!==Ce.TEST_VID.volume;return e&&Bi?(B.setTimeout(()=>{Ce&&Ce.prototype&&(Ce.prototype.featuresVolumeControl=s!==Ce.TEST_VID.volume)}),!1):e}catch{return!1}},Ce.canMuteVolume=function(){try{const s=Ce.TEST_VID.muted;return Ce.TEST_VID.muted=!s,Ce.TEST_VID.muted?ou(Ce.TEST_VID,"muted","muted"):up(Ce.TEST_VID,"muted","muted"),s!==Ce.TEST_VID.muted}catch{return!1}},Ce.canControlPlaybackRate=function(){if(ys&&js&&Jf<58)return!1;try{const s=Ce.TEST_VID.playbackRate;return Ce.TEST_VID.playbackRate=s/2+.1,s!==Ce.TEST_VID.playbackRate}catch{return!1}},Ce.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty(ye.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(ye.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(ye.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(ye.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0},Ce.supportsNativeTextTracks=function(){return op||Bi&&js},Ce.supportsNativeVideoTracks=function(){return!!(Ce.TEST_VID&&Ce.TEST_VID.videoTracks)},Ce.supportsNativeAudioTracks=function(){return!!(Ce.TEST_VID&&Ce.TEST_VID.audioTracks)},Ce.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([s,e]){Zf(Ce.prototype,s,()=>Ce[e](),!0)}),Ce.prototype.featuresVolumeControl=Ce.canControlVolume(),Ce.prototype.movingMediaElementInDOM=!Bi,Ce.prototype.featuresFullscreenResize=!0,Ce.prototype.featuresProgressEvents=!0,Ce.prototype.featuresTimeupdateEvents=!0,Ce.prototype.featuresVideoFrameCallback=!!(Ce.TEST_VID&&Ce.TEST_VID.requestVideoFrameCallback),Ce.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()}},Ce.resetMediaElement=function(s){if(!s)return;const e=s.querySelectorAll("source");let i=e.length;for(;i--;)s.removeChild(e[i]);s.removeAttribute("src"),typeof s.load=="function"&&function(){try{s.load()}catch{}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){Ce.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){Ce.prototype["set"+qt(s)]=function(e){this.el_[s]=e,e?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){Ce.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){Ce.prototype["set"+qt(s)]=function(e){this.el_[s]=e}}),["pause","load","play"].forEach(function(s){Ce.prototype[s]=function(){return this.el_[s]()}}),Xe.withSourceHandlers(Ce),Ce.nativeSourceHandler={},Ce.nativeSourceHandler.canPlayType=function(s){try{return Ce.TEST_VID.canPlayType(s)}catch{return""}},Ce.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return Ce.nativeSourceHandler.canPlayType(s.type);if(s.src){const i=q0(s.src);return Ce.nativeSourceHandler.canPlayType(`video/${i}`)}return""},Ce.nativeSourceHandler.handleSource=function(s,e,i){e.setSrc(s.src)},Ce.nativeSourceHandler.dispose=function(){},Ce.registerSourceHandler(Ce.nativeSourceHandler),Xe.registerTech("Html5",Ce);const sS=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],fy={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},py=["tiny","xsmall","small","medium","large","xlarge","huge"],Cp={};py.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;Cp[s]=`vjs-layout-${e}`});const JO={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class vt extends ce{constructor(e,i,a){if(e.id=e.id||i.id||`vjs_video_${Xn()}`,i=Object.assign(vt.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const c=e.closest("[lang]");c&&(i.language=c.getAttribute("lang"))}if(super(null,i,a),this.boundDocumentFullscreenChange_=c=>this.documentFullscreenChange_(c),this.boundFullWindowOnEscKey_=c=>this.fullWindowOnEscKey(c),this.boundUpdateStyleEl_=c=>this.updateStyleEl_(c),this.boundApplyInitTime_=c=>this.applyInitTime_(c),this.boundUpdateCurrentBreakpoint_=c=>this.updateCurrentBreakpoint_(c),this.boundHandleTechClick_=c=>this.handleTechClick_(c),this.boundHandleTechDoubleClick_=c=>this.handleTechDoubleClick_(c),this.boundHandleTechTouchStart_=c=>this.handleTechTouchStart_(c),this.boundHandleTechTouchMove_=c=>this.handleTechTouchMove_(c),this.boundHandleTechTouchEnd_=c=>this.handleTechTouchEnd_(c),this.boundHandleTechTap_=c=>this.handleTechTap_(c),this.boundUpdatePlayerHeightOnAudioOnlyMode_=c=>this.updatePlayerHeightOnAudioOnlyMode_(c),this.isFullscreen_=!1,this.log=_1(this.id_),this.fsApi_=Qf,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&kr(e),this.language(this.options_.language),i.languages){const c={};Object.getOwnPropertyNames(i.languages).forEach(function(f){c[f.toLowerCase()]=i.languages[f]}),this.languages_=c}else this.languages_=vt.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(c=>{if(typeof this[c]!="function")throw new Error(`plugin "${c}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),L0(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(kn(ye,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const o=xt(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(c=>{this[c](i.plugins[c])}),i.debug&&this.debug(!0),this.options_.playerOptions=o,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const f=new B.DOMParser().parseFromString(SO,"image/svg+xml");if(f.querySelector("parsererror"))et.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const b=f.documentElement;b.style.display="none",this.el_.appendChild(b),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new xO(this),this.addClass("vjs-spatial-navigation-enabled")),vd&&this.addClass("vjs-touch-enabled"),Bi||this.addClass("vjs-workinghover"),vt.players[this.id_]=this;const u=_0.split(".")[0];this.addClass(`vjs-v${u}`),this.userActive(!0),this.reportUserActivity(),this.one("play",c=>this.listenForUserActivity_(c)),this.on("keydown",c=>this.handleKeyDown(c)),this.on("languagechange",c=>this.handleLanguagechange(c)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),Fi(ye,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Fi(ye,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),vt.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),vO(this),Zi.names.forEach(e=>{const i=Zi[e],a=this[i.getterName]();a&&a.off&&a.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const o=this.tag.tagName.toLowerCase()==="video-js";a?i=this.el_=e.parentNode:o||(i=this.el_=super.createEl("div"));const u=kr(e);if(o){for(i=this.el_=e,e=this.tag=ye.createElement("video");i.children.length;)e.appendChild(i.firstChild);bd(i,"video-js")||ko(i,"video-js"),i.appendChild(e),a=this.playerElIngest_=i,Object.keys(i).forEach(m=>{try{e[m]=i[m]}catch{}})}e.setAttribute("tabindex","-1"),u.tabindex="-1",js&&tp&&(e.setAttribute("role","application"),u.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in u&&delete u.width,"height"in u&&delete u.height,Object.getOwnPropertyNames(u).forEach(function(m){o&&m==="class"||i.setAttribute(m,u[m]),o&&e.setAttribute(m,u[m])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const c=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(m=>D1[m]).map(m=>"vjs-device-"+m.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...c),B.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=q1("vjs-styles-dimensions");const m=Or(".vjs-styles-defaults"),b=Or("head");b.insertBefore(this.styleEl_,m?m.nextSibling:b.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const f=e.getElementsByTagName("a");for(let m=0;m<f.length;m++){const b=f.item(m);ko(b,"vjs-hidden"),b.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!a&&e.parentNode.insertBefore(i,e),E0(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){et.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const a=e+"_";if(i===void 0)return this[a]||0;if(i===""||i==="auto"){this[a]=void 0,this.updateStyleEl_();return}const o=parseFloat(i);if(isNaN(o)){et.error(`Improper value "${i}" supplied for for ${e}`);return}this[a]=o,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Pa(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Z3(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(B.VIDEOJS_NO_DYNAMIC_STYLE===!0){const f=typeof this.width_=="number"?this.width_:this.options_.width,m=typeof this.height_=="number"?this.height_:this.options_.height,b=this.tech_&&this.tech_.el();b&&(f>=0&&(b.width=f),m>=0&&(b.height=m));return}let e,i,a,o;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?a=this.aspectRatio_:this.videoWidth()>0?a=this.videoWidth()+":"+this.videoHeight():a="16:9";const u=a.split(":"),c=u[1]/u[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/c:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*c,/^[^a-zA-Z]/.test(this.id())?o="dimensions-"+this.id():o=this.id()+"-dimensions",this.addClass(o),$1(this.styleEl_,`
.${o} {
width: ${e}px;
height: ${i}px;
}
.${o}.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: ${c*100}%;
}
`)}loadTech_(e,i){this.tech_&&this.unloadTech_();const a=qt(e),o=e.charAt(0).toLowerCase()+e.slice(1);a!=="Html5"&&this.tag&&(Xe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=a,this.isReady_=!1;let u=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(u=!1);const c={source:i,autoplay:u,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${o}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Zi.names.forEach(m=>{const b=Zi[m];c[b.getterName]=this[b.privateName]}),Object.assign(c,this.options_[a]),Object.assign(c,this.options_[o]),Object.assign(c,this.options_[e.toLowerCase()]),this.tag&&(c.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime);const f=Xe.getTech(e);if(!f)throw new Error(`No Tech named '${a}' exists! '${a}' should be registered using videojs.registerTech()'`);this.tech_=new f(c),this.tech_.ready(Mt(this,this.handleTechReady_),!0),U0.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sS.forEach(m=>{this.on(this.tech_,m,b=>this[`handleTech${qt(m)}_`](b))}),Object.keys(fy).forEach(m=>{this.on(this.tech_,m,b=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${fy[m]}_`].bind(this),event:b});return}this[`handleTech${fy[m]}_`](b)})}),this.on(this.tech_,"loadstart",m=>this.handleTechLoadStart_(m)),this.on(this.tech_,"sourceset",m=>this.handleTechSourceset_(m)),this.on(this.tech_,"waiting",m=>this.handleTechWaiting_(m)),this.on(this.tech_,"ended",m=>this.handleTechEnded_(m)),this.on(this.tech_,"seeking",m=>this.handleTechSeeking_(m)),this.on(this.tech_,"play",m=>this.handleTechPlay_(m)),this.on(this.tech_,"pause",m=>this.handleTechPause_(m)),this.on(this.tech_,"durationchange",m=>this.handleTechDurationChange_(m)),this.on(this.tech_,"fullscreenchange",(m,b)=>this.handleTechFullscreenChange_(m,b)),this.on(this.tech_,"fullscreenerror",(m,b)=>this.handleTechFullscreenError_(m,b)),this.on(this.tech_,"enterpictureinpicture",m=>this.handleTechEnterPictureInPicture_(m)),this.on(this.tech_,"leavepictureinpicture",m=>this.handleTechLeavePictureInPicture_(m)),this.on(this.tech_,"error",m=>this.handleTechError_(m)),this.on(this.tech_,"posterchange",m=>this.handleTechPosterChange_(m)),this.on(this.tech_,"textdata",m=>this.handleTechTextData_(m)),this.on(this.tech_,"ratechange",m=>this.handleTechRateChange_(m)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(a!=="Html5"||!this.tag)&&E0(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Zi.names.forEach(e=>{const i=Zi[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=U0.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&et.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_}version(){return{"video.js":_0}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const o=this.muted();this.muted(!0);const u=()=>{this.muted(o)};this.playTerminatedQueue_.push(u);const c=this.play();if(Ed(c))return c.catch(f=>{throw u(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${f||""}`)})};let a;if(e==="any"&&!this.muted()?(a=this.play(),Ed(a)&&(a=a.catch(i))):e==="muted"&&!this.muted()?a=i():a=this.play(),!!Ed(a))return a.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,a="";typeof i!="string"&&(i=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!a&&(a=TO(this,i)),this.cache_.source=xt({},e,{src:i,type:a});const o=this.cache_.sources.filter(m=>m.src&&m.src===i),u=[],c=this.$$("source"),f=[];for(let m=0;m<c.length;m++){const b=kr(c[m]);u.push(b),b.src&&b.src===i&&f.push(b.src)}f.length&&!o.length?this.cache_.sources=u:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=u=>this.updateSourceCaches_(u);const a=this.currentSource().src,o=e.src;a&&!/^blob:/.test(a)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==a)&&(i=()=>{}),i(o),e.src||this.tech_.any(["sourceset","loadstart"],u=>{if(u.type==="sourceset")return;const c=this.techGet_("currentSrc");this.lastSource_.tech=c,this.updateSourceCaches_(c)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Vs(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),a=>a.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!ye.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const a=this.el();let o=ye[this.fsApi_.fullscreenElement]===a;!o&&a.matches&&(o=a.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in gO)return pO(this.middleware_,this.tech_,e,i);if(e in h2)return d2(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(a){throw et(a),a}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in mO)return fO(this.middleware_,this.tech_,e);if(e in h2)return d2(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(et(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(et(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(et(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Vs){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),a=!!(op||Bi);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=c=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&a&&this.load();return}const o=this.techGet_("play");a&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),o===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(a){a(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||vs(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=vs(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=vs(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return i2(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let a=e.end(e.length-1);return a>i&&(a=i),a}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((a,o)=>{function u(){i.off("fullscreenerror",f),i.off("fullscreenchange",c)}function c(){u(),a()}function f(b,S){u(),o(S)}i.one("fullscreenchange",c),i.one("fullscreenerror",f);const m=i.requestFullscreenHelper_(e);m&&(m.then(u,u),m.then(a,o))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const a=this.el_[this.fsApi_.requestFullscreen](i);return a&&a.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),a}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,a)=>{function o(){e.off("fullscreenerror",c),e.off("fullscreenchange",u)}function u(){o(),i()}function c(m,b){o(),a(b)}e.one("fullscreenchange",u),e.one("fullscreenerror",c);const f=e.exitFullscreenHelper_();f&&(f.then(o,o),f.then(i,a))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=ye[this.fsApi_.exitFullscreen]();return e&&Vs(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=ye.documentElement.style.overflow,kn(ye,"keydown",this.boundFullWindowOnEscKey_),ye.documentElement.style.overflow="hidden",ko(ye.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,Fi(ye,"keydown",this.boundFullWindowOnEscKey_),ye.documentElement.style.overflow=this.docOrigOverflow,lp(ye.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&B.documentPictureInPicture){const e=ye.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(He("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),B.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(j1(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",a=>{const o=a.target.querySelector(".video-js");e.parentNode.replaceChild(o,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in ye&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(B.documentPictureInPicture&&B.documentPictureInPicture.window)return B.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in ye)return ye.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(o=>{const u=o.tagName.toLowerCase();if(o.isContentEditable)return!0;const c=["button","checkbox","hidden","radio","reset","submit"];return u==="input"?c.indexOf(o.type)===-1:["textarea"].indexOf(u)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:a=c=>e.key.toLowerCase()==="f",muteKey:o=c=>e.key.toLowerCase()==="m",playPauseKey:u=c=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(a.call(this,e)){e.preventDefault(),e.stopPropagation();const c=ce.getComponent("FullscreenToggle");ye[this.fsApi_.fullscreenEnabled]!==!1&&c.prototype.handleClick.call(this,e)}else o.call(this,e)?(e.preventDefault(),e.stopPropagation(),ce.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ce.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let a=0,o=this.options_.techOrder;a<o.length;a++){const u=o[a];let c=Xe.getTech(u);if(c||(c=ce.getComponent(u)),!c){et.error(`The "${u}" tech is undefined. Skipped browser support check for that tech.`);continue}if(c.isSupported()&&(i=c.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(f=>[f,Xe.getTech(f)]).filter(([f,m])=>m?m.isSupported():(et.error(`The "${f}" tech is undefined. Skipped browser support check for that tech.`),!1)),a=function(f,m,b){let S;return f.some(E=>m.some(A=>{if(S=b(E,A),S)return!0})),S};let o;const u=f=>(m,b)=>f(b,m),c=([f,m],b)=>{if(m.canPlaySource(b,this.options_[f.toLowerCase()]))return{source:b,tech:f}};return this.options_.sourceOrder?o=a(e,i,u(c)):o=a(i,e,c),o||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const a=f2(e);if(!a.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=a),this.updateSourceCaches_(a[0]),dO(this,a[0],(o,u)=>{if(this.middleware_=u,i||(this.cache_.sources=a),this.updateSourceCaches_(o),this.src_(o)){if(a.length>1)return this.handleSrc_(a.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}hO(u,this.tech_)}),a.length>1){const o=()=>{this.error(null),this.handleSrc_(a.slice(1),!0)},u=()=>{this.off("error",o)};this.one("error",o),this.one("playing",u),this.resetRetryOnError_=()=>{this.off("error",o),this.off("playing",u)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?K1(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Vs(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),Pa(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:a,remainingTimeDisplay:o}=this.controlBar||{},{seekBar:u}=a||{};e&&e.updateContent(),i&&i.updateContent(),o&&o.updateContent(),u&&(u.update(),u.loadProgressBar&&u.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(Ar("beforeerror").forEach(i=>{const a=i(this,e);if(!(Hs(a)&&!Array.isArray(a)||typeof a=="string"||typeof a=="number"||a===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=a}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new Ft(e),this.addClass("vjs-error"),et.error(`(CODE:${this.error_.code} ${Ft.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),Ar("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,a;const o=Mt(this,this.reportUserActivity),u=function(E){(E.screenX!==i||E.screenY!==a)&&(i=E.screenX,a=E.screenY,o())},c=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},f=function(E){o(),this.clearInterval(e)};this.on("mousedown",c),this.on("mousemove",u),this.on("mouseup",f),this.on("mouseleave",f);const m=this.getChild("controlBar");m&&!Bi&&!ys&&(m.on("mouseenter",function(E){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),m.on("mouseleave",function(E){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);let b;const S=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(b);const E=this.options_.inactivityTimeout;E<=0||(b=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},E))};this.setInterval(S,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),a=i&&i.currentHeight();e.forEach(o=>{o!==i&&o.el_&&!o.hasClass("vjs-hidden")&&(o.hide(),this.audioOnlyCache_.hiddenChildren.push(o))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=a,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(a),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,a){if(this.tech_)return this.tech_.addTextTrack(e,i,a)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Pa(this)&&this.trigger("languagechange"))}languages(){return xt(vt.prototype.options_.languages,this.languages_)}toJSON(){const e=xt(this.options_),i=e.tracks;e.tracks=[];for(let a=0;a<i.length;a++){let o=i[a];o=xt(o),o.player=void 0,e.tracks[a]=o}return e}createModal(e,i){i=i||{},i.content=e||"";const a=new du(this,i);return this.addChild(a),a.on("dispose",()=>{this.removeChild(a)}),a.open(),a}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let a=0;a<py.length;a++){const o=py[a],u=this.breakpoints_[o];if(i<=u){if(e===o)return;e&&this.removeClass(Cp[e]),this.addClass(Cp[o]),this.breakpoint_=o;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},JO,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Cp[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const a=this.crossOrigin();this.reset(),this.cache_.media=xt(e);const{artist:o,artwork:u,description:c,poster:f,src:m,textTracks:b,title:S}=this.cache_.media;!u&&f&&(this.cache_.media.artwork=[{src:f,type:Tp(f)}]),a&&this.crossOrigin(a),m&&this.src(m),f&&this.poster(f),Array.isArray(b)&&b.forEach(E=>this.addRemoteTextTrack(E,!1)),this.titleBar&&this.titleBar.update({title:S,description:c||o||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),a=Array.prototype.map.call(this.remoteTextTracks(),u=>({kind:u.kind,label:u.label,language:u.language,src:u.src})),o={src:i,textTracks:a};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:Tp(o.poster)}]),o}return xt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},a=kr(e),o=a["data-setup"];if(bd(e,"vjs-fill")&&(a.fill=!0),bd(e,"vjs-fluid")&&(a.fluid=!0),o!==null)try{Object.assign(a,JSON.parse(o||"{}"))}catch(u){et.error("data-setup",u)}if(Object.assign(i,a),e.hasChildNodes()){const u=e.childNodes;for(let c=0,f=u.length;c<f;c++){const m=u[c],b=m.nodeName.toLowerCase();b==="source"?i.sources.push(kr(m)):b==="track"&&i.tracks.push(kr(m))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}vt.prototype.videoTracks=()=>{},vt.prototype.audioTracks=()=>{},vt.prototype.textTracks=()=>{},vt.prototype.remoteTextTracks=()=>{},vt.prototype.remoteTextTrackEls=()=>{},Zi.names.forEach(function(s){const e=Zi[s];vt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),vt.prototype.crossorigin=vt.prototype.crossOrigin,vt.players={};const kd=B.navigator;vt.prototype.options_={techOrder:Xe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:kd&&(kd.languages&&kd.languages[0]||kd.userLanguage||kd.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},sS.forEach(function(s){vt.prototype[`handleTech${qt(s)}_`]=function(){return this.trigger(s)}}),ce.registerComponent("Player",vt);const Ap="plugin",gu="activePlugins_",yu={},wp=s=>yu.hasOwnProperty(s),Dp=s=>wp(s)?yu[s]:void 0,aS=(s,e)=>{s[gu]=s[gu]||{},s[gu][e]=!0},kp=(s,e,i)=>{const a=(i?"before":"")+"pluginsetup";s.trigger(a,e),s.trigger(a+":"+e.name,e)},eR=function(s,e){const i=function(){kp(this,{name:s,plugin:e,instance:null},!0);const a=e.apply(this,arguments);return aS(this,s),kp(this,{name:s,plugin:e,instance:a}),a};return Object.keys(e).forEach(function(a){i[a]=e[a]}),i},rS=(s,e)=>(e.prototype.name=s,function(...i){kp(this,{name:s,plugin:e,instance:null},!0);const a=new e(this,...i);return this[s]=()=>a,kp(this,a.getEventHash()),a});class mn{constructor(e){if(this.constructor===mn)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),L0(this),delete this.trigger,Q1(this,this.constructor.defaultState),aS(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return cu(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[gu][e]=!1,this.player=this.state=null,i[e]=rS(e,yu[e])}static isBasic(e){const i=typeof e=="string"?Dp(e):e;return typeof i=="function"&&!mn.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(wp(e))et.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(vt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return yu[e]=i,e!==Ap&&(mn.isBasic(i)?vt.prototype[e]=eR(e,i):vt.prototype[e]=rS(e,i)),i}static deregisterPlugin(e){if(e===Ap)throw new Error("Cannot de-register base plugin.");wp(e)&&(delete yu[e],delete vt.prototype[e])}static getPlugins(e=Object.keys(yu)){let i;return e.forEach(a=>{const o=Dp(a);o&&(i=i||{},i[a]=o)}),i}static getPluginVersion(e){const i=Dp(e);return i&&i.VERSION||""}}mn.getPlugin=Dp,mn.BASE_PLUGIN_NAME=Ap,mn.registerPlugin(Ap,mn),vt.prototype.usingPlugin=function(s){return!!this[gu]&&this[gu][s]===!0},vt.prototype.hasPlugin=function(s){return!!wp(s)};function tR(s,e){let i=!1;return function(...a){return i||et.warn(s),i=!0,e.apply(this,a)}}function bs(s,e,i,a){return tR(`${e} is deprecated and will be removed in ${s}.0; please use ${i} instead.`,a)}var iR={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const oS=s=>s.indexOf("#")===0?s.slice(1):s;function $(s,e,i){let a=$.getPlayer(s);if(a)return e&&et.warn(`Player "${s}" is already initialised. Options will not be applied.`),i&&a.ready(i),a;const o=typeof s=="string"?Or("#"+oS(s)):s;if(!ru(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");const c=("getRootNode"in o?o.getRootNode()instanceof B.ShadowRoot:!1)?o.getRootNode():o.ownerDocument.body;(!o.ownerDocument.defaultView||!c.contains(o))&&et.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(o.parentNode&&o.parentNode.hasAttribute&&o.parentNode.hasAttribute("data-vjs-player")?o.parentNode:o).cloneNode(!0)),Ar("beforesetup").forEach(m=>{const b=m(o,xt(e));if(!Hs(b)||Array.isArray(b)){et.error("please return an object in beforesetup hooks");return}e=xt(e,b)});const f=ce.getComponent("Player");return a=new f(o,e,i),Ar("setup").forEach(m=>m(a)),a}if($.hooks_=Ia,$.hooks=Ar,$.hook=F3,$.hookOnce=H3,$.removeHook=v1,B.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&au()){let s=Or(".vjs-styles-defaults");if(!s){s=q1("vjs-styles-defaults");const e=Or("head");e&&e.insertBefore(s,e.firstChild),$1(s,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}w0(1,$),$.VERSION=_0,$.options=vt.prototype.options_,$.getPlayers=()=>vt.players,$.getPlayer=s=>{const e=vt.players;let i;if(typeof s=="string"){const a=oS(s),o=e[a];if(o)return o;i=Or("#"+a)}else i=s;if(ru(i)){const{player:a,playerId:o}=i;if(a||e[o])return a||e[o]}},$.getAllPlayers=()=>Object.keys(vt.players).map(s=>vt.players[s]).filter(Boolean),$.players=vt.players,$.getComponent=ce.getComponent,$.registerComponent=(s,e)=>(Xe.isTech(e)&&et.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ce.registerComponent.call(ce,s,e)),$.getTech=Xe.getTech,$.registerTech=Xe.registerTech,$.use=cO,Object.defineProperty($,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty($.middleware,"TERMINATOR",{value:_p,writeable:!1,enumerable:!0}),$.browser=D1,$.obj=V3,$.mergeOptions=bs(9,"videojs.mergeOptions","videojs.obj.merge",xt),$.defineLazyProperty=bs(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Zf),$.bind=bs(9,"videojs.bind","native Function.prototype.bind",Mt),$.registerPlugin=mn.registerPlugin,$.deregisterPlugin=mn.deregisterPlugin,$.plugin=(s,e)=>(et.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),mn.registerPlugin(s,e)),$.getPlugins=mn.getPlugins,$.getPlugin=mn.getPlugin,$.getPluginVersion=mn.getPluginVersion,$.addLanguage=function(s,e){return s=(""+s).toLowerCase(),$.options.languages=xt($.options.languages,{[s]:e}),$.options.languages[s]},$.log=et,$.createLogger=_1,$.time=nO,$.createTimeRange=bs(9,"videojs.createTimeRange","videojs.time.createTimeRanges",vs),$.createTimeRanges=bs(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",vs),$.formatTime=bs(9,"videojs.formatTime","videojs.time.formatTime",Ro),$.setFormatTime=bs(9,"videojs.setFormatTime","videojs.time.setFormatTime",e2),$.resetFormatTime=bs(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",t2),$.parseUrl=bs(9,"videojs.parseUrl","videojs.url.parseUrl",V0),$.isCrossOrigin=bs(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",vp),$.EventTarget=On,$.any=O0,$.on=kn,$.one=pp,$.off=Fi,$.trigger=cu,$.xhr=z_,$.TrackList=Mo,$.TextTrack=Cd,$.TextTrackList=j0,$.AudioTrack=u2,$.AudioTrackList=n2,$.VideoTrack=c2,$.VideoTrackList=s2,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{$[s]=function(){return et.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),z1[s].apply(null,arguments)}}),$.computedStyle=bs(9,"videojs.computedStyle","videojs.dom.computedStyle",uu),$.dom=z1,$.fn=K3,$.num=RO,$.str=tO,$.url=lO,$.Error=iR;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class nR{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(a){i.enabled_(a)}}),i}}class Op extends $.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const a=this.levels_.length;return i=new nR(e),""+a in this||Object.defineProperty(this,a,{get(){return this.levels_[a]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let a=0,o=this.length;a<o;a++)if(this[a]===e){i=this.levels_.splice(a,1)[0],this.selectedIndex_===a?this.selectedIndex_=-1:this.selectedIndex_>a&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,a=this.length;i<a;i++){const o=this[i];if(o.id===e)return o}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Op.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const s in Op.prototype.allowedEvents_)Op.prototype["on"+s]=null;var lS="4.1.0";const sR=function(s,e){const i=s.qualityLevels,a=new Op,o=function(){a.dispose(),s.qualityLevels=i,s.off("dispose",o)};return s.on("dispose",o),s.qualityLevels=()=>a,s.qualityLevels.VERSION=lS,a},uS=function(s){return sR(this,$.obj.merge({},s))};$.registerPlugin("qualityLevels",uS),uS.VERSION=lS;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const gn=Pf,Rp=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,Kn=s=>$.log.debug?$.log.debug.bind($,"VHS:",`${s} >`):function(){};function bt(...s){const e=$.obj||$;return(e.merge||e.mergeOptions).apply(e,s)}function gi(...s){const e=$.time||$;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}function aR(s){if(s.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
`;for(let i=0;i<s.length;i++){const a=s.start(i),o=s.end(i);e+=`${a} --> ${o}. Duration (${o-a})
`}return e}const $s=1/30,Gs=$s*3,cS=function(s,e){const i=[];let a;if(s&&s.length)for(a=0;a<s.length;a++)e(s.start(a),s.end(a))&&i.push([s.start(a),s.end(a)]);return gi(i)},vu=function(s,e){return cS(s,function(i,a){return i-Gs<=e&&a+Gs>=e})},Mp=function(s,e){return cS(s,function(i){return i-$s>=e})},rR=function(s){if(s.length<2)return gi();const e=[];for(let i=1;i<s.length;i++){const a=s.end(i-1),o=s.start(i);e.push([a,o])}return gi(e)},oR=function(s,e){let i=null,a=null,o=0;const u=[],c=[];if(!s||!s.length||!e||!e.length)return gi();let f=s.length;for(;f--;)u.push({time:s.start(f),type:"start"}),u.push({time:s.end(f),type:"end"});for(f=e.length;f--;)u.push({time:e.start(f),type:"start"}),u.push({time:e.end(f),type:"end"});for(u.sort(function(m,b){return m.time-b.time}),f=0;f<u.length;f++)u[f].type==="start"?(o++,o===2&&(i=u[f].time)):u[f].type==="end"&&(o--,o===1&&(a=u[f].time)),i!==null&&a!==null&&(c.push([i,a]),i=null,a=null);return gi(c)},dS=s=>{const e=[];if(!s||!s.length)return"";for(let i=0;i<s.length;i++)e.push(s.start(i)+" => "+s.end(i));return e.join(", ")},lR=function(s,e,i=1){return((s.length?s.end(s.length-1):0)-e)/i},No=s=>{const e=[];for(let i=0;i<s.length;i++)e.push({start:s.start(i),end:s.end(i)});return e},uR=function(s,e){if(s===e)return!1;if(!s&&e||!e&&s||s.length!==e.length)return!0;for(let i=0;i<s.length;i++)if(s.start(i)!==e.start(i)||s.end(i)!==e.end(i))return!0;return!1},my=function(s){if(!(!s||!s.length||!s.end))return s.end(s.length-1)},gy=function(s,e){let i=0;if(!s||!s.length)return i;for(let a=0;a<s.length;a++){const o=s.start(a),u=s.end(a);if(!(e>u)){if(e>o&&e<=u){i+=u-e;continue}i+=u-o}}return i},yy=(s,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(a){i+=a.duration}),(e.preloadHints||[]).forEach(function(a){a.type==="PART"&&(i+=s.partTargetDuration)}),i},vy=s=>(s.segments||[]).reduce((e,i,a)=>(i.parts?i.parts.forEach(function(o,u){e.push({duration:o.duration,segmentIndex:a,partIndex:u,part:o,segment:i})}):e.push({duration:i.duration,segmentIndex:a,partIndex:null,segment:i,part:null}),e),[]),hS=s=>{const e=s.segments&&s.segments.length&&s.segments[s.segments.length-1];return e&&e.parts||[]},fS=({preloadSegment:s})=>{if(!s)return;const{parts:e,preloadHints:i}=s;let a=(i||[]).reduce((o,u)=>o+(u.type==="PART"?1:0),0);return a+=e&&e.length?e.length:0,a},pS=(s,e)=>{if(e.endList)return 0;if(s&&s.suggestedPresentationDelay)return s.suggestedPresentationDelay;const i=hS(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},cR=function(s,e){let i=0,a=e-s.mediaSequence,o=s.segments[a];if(o){if(typeof o.start<"u")return{result:o.start,precise:!0};if(typeof o.end<"u")return{result:o.end-o.duration,precise:!0}}for(;a--;){if(o=s.segments[a],typeof o.end<"u")return{result:i+o.end,precise:!0};if(i+=yy(s,o),typeof o.start<"u")return{result:i+o.start,precise:!0}}return{result:i,precise:!1}},dR=function(s,e){let i=0,a,o=e-s.mediaSequence;for(;o<s.segments.length;o++){if(a=s.segments[o],typeof a.start<"u")return{result:a.start-i,precise:!0};if(i+=yy(s,a),typeof a.end<"u")return{result:a.end-i,precise:!0}}return{result:-1,precise:!1}},mS=function(s,e,i){if(typeof e>"u"&&(e=s.mediaSequence+s.segments.length),e<s.mediaSequence)return 0;const a=cR(s,e);if(a.precise)return a.result;const o=dR(s,e);return o.precise?o.result:a.result+i},gS=function(s,e,i){if(!s)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(s.totalDuration)return s.totalDuration;if(!s.endList)return B.Infinity}return mS(s,e,i)},Od=function({defaultDuration:s,durationList:e,startIndex:i,endIndex:a}){let o=0;if(i>a&&([i,a]=[a,i]),i<0){for(let u=i;u<Math.min(0,a);u++)o+=s;i=0}for(let u=i;u<a;u++)o+=e[u].duration;return o},yS=function(s,e,i,a){if(!s||!s.segments)return null;if(s.endList)return gS(s);if(e===null)return null;e=e||0;let o=mS(s,s.mediaSequence+s.segments.length,e);return i&&(a=typeof a=="number"?a:pS(null,s),o-=a),Math.max(0,o)},hR=function(s,e,i){const o=e||0;let u=yS(s,e,!0,i);return u===null?gi():(u<o&&(u=o),gi(o,u))},fR=function({playlist:s,currentTime:e,startingSegmentIndex:i,startingPartIndex:a,startTime:o,exactManifestTimings:u}){let c=e-o;const f=vy(s);let m=0;for(let b=0;b<f.length;b++){const S=f[b];if(i===S.segmentIndex&&!(typeof a=="number"&&typeof S.partIndex=="number"&&a!==S.partIndex)){m=b;break}}if(c<0){if(m>0)for(let b=m-1;b>=0;b--){const S=f[b];if(c+=S.duration,u){if(c<0)continue}else if(c+$s<=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o-Od({defaultDuration:s.targetDuration,durationList:f,startIndex:m,endIndex:b})}}return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e}}if(m<0){for(let b=m;b<0;b++)if(c-=s.targetDuration,c<0)return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e};m=0}for(let b=m;b<f.length;b++){const S=f[b];c-=S.duration;const E=S.duration>$s,A=c===0,R=E&&c+$s>=0;if(!((A||R)&&b!==f.length-1)){if(u){if(c>0)continue}else if(c-$s>=0)continue;return{partIndex:S.partIndex,segmentIndex:S.segmentIndex,startTime:o+Od({defaultDuration:s.targetDuration,durationList:f,startIndex:m,endIndex:b})}}}return{segmentIndex:f[f.length-1].segmentIndex,partIndex:f[f.length-1].partIndex,startTime:e}},vS=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},by=function(s){return s.excludeUntil&&s.excludeUntil===1/0},Lp=function(s){const e=vS(s);return!s.disabled&&!e},pR=function(s){return s.disabled},mR=function(s){for(let e=0;e<s.segments.length;e++)if(s.segments[e].key)return!0;return!1},bS=function(s,e){return e.attributes&&e.attributes[s]},gR=function(s,e,i,a=0){return bS("BANDWIDTH",i)?(s*i.attributes.BANDWIDTH-a*8)/e:NaN},_y=(s,e)=>{if(s.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(a=>Lp(a)?(a.attributes.BANDWIDTH||0)<i:!1).length===0},Ty=(s,e)=>!s&&!e||!s&&e||s&&!e?!1:!!(s===e||s.id&&e.id&&s.id===e.id||s.resolvedUri&&e.resolvedUri&&s.resolvedUri===e.resolvedUri||s.uri&&e.uri&&s.uri===e.uri),_S=function(s,e){const i=s&&s.mediaGroups&&s.mediaGroups.AUDIO||{};let a=!1;for(const o in i){for(const u in i[o])if(a=e(i[o][u]),a)break;if(a)break}return!!a},Rd=s=>{if(!s||!s.playlists||!s.playlists.length)return _S(s,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<s.playlists.length;e++){const i=s.playlists[e],a=i.attributes&&i.attributes.CODECS;if(!(a&&a.split(",").every(u=>iT(u))||_S(s,u=>Ty(i,u))))return!1}return!0};var yn={liveEdgeDelay:pS,duration:gS,seekable:hR,getMediaInfoForTime:fR,isEnabled:Lp,isDisabled:pR,isExcluded:vS,isIncompatible:by,playlistEnd:yS,isAes:mR,hasAttribute:bS,estimateSegmentRequestTime:gR,isLowestEnabledRendition:_y,isAudioOnly:Rd,playlistMatch:Ty,segmentDurationWithParts:yy};const{log:TS}=$,bu=(s,e)=>`${s}-${e}`,SS=(s,e,i)=>`placeholder-uri-${s}-${e}-${i}`,yR=({onwarn:s,oninfo:e,manifestString:i,customTagParsers:a=[],customTagMappers:o=[],llhls:u})=>{const c=new Bk;s&&c.on("warn",s),e&&c.on("info",e),a.forEach(b=>c.addParser(b)),o.forEach(b=>c.addTagMapper(b)),c.push(i),c.end();const f=c.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(b){f.hasOwnProperty(b)&&delete f[b]}),f.segments&&f.segments.forEach(function(b){["parts","preloadHints"].forEach(function(S){b.hasOwnProperty(S)&&delete b[S]})})),!f.targetDuration){let b=10;f.segments&&f.segments.length&&(b=f.segments.reduce((S,E)=>Math.max(S,E.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${b}`}),f.targetDuration=b}const m=hS(f);if(m.length&&!f.partTargetDuration){const b=m.reduce((S,E)=>Math.max(S,E.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${b}`}),TS.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),f.partTargetDuration=b}return f},_u=(s,e)=>{s.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(s.mediaGroups[i])for(const a in s.mediaGroups[i])for(const o in s.mediaGroups[i][a]){const u=s.mediaGroups[i][a][o];e(u,i,a,o)}})},xS=({playlist:s,uri:e,id:i})=>{s.id=i,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},vR=s=>{let e=s.playlists.length;for(;e--;){const i=s.playlists[e];xS({playlist:i,id:bu(e,i.uri)}),i.resolvedUri=gn(s.uri,i.uri),s.playlists[i.id]=i,s.playlists[i.uri]=i,i.attributes.BANDWIDTH||TS.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},bR=s=>{_u(s,e=>{e.uri&&(e.resolvedUri=gn(s.uri,e.uri))})},_R=(s,e)=>{const i=bu(0,e),a={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:B.location.href,resolvedUri:B.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return a.playlists[i]=a.playlists[0],a.playlists[e]=a.playlists[0],a},ES=(s,e,i=SS)=>{s.uri=e;for(let o=0;o<s.playlists.length;o++)if(!s.playlists[o].uri){const u=`placeholder-uri-${o}`;s.playlists[o].uri=u}const a=Rd(s);_u(s,(o,u,c,f)=>{if(!o.playlists||!o.playlists.length){if(a&&u==="AUDIO"&&!o.uri)for(let m=0;m<s.playlists.length;m++){const b=s.playlists[m];if(b.attributes&&b.attributes.AUDIO&&b.attributes.AUDIO===c)return}o.playlists=[Vt({},o)]}o.playlists.forEach(function(m,b){const S=i(u,c,f,m),E=bu(b,S);m.uri?m.resolvedUri=m.resolvedUri||gn(s.uri,m.uri):(m.uri=b===0?S:E,m.resolvedUri=m.uri),m.id=m.id||E,m.attributes=m.attributes||{},s.playlists[m.id]=m,s.playlists[m.uri]=m})}),vR(s),bR(s)};class CS{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[i]=e,a=i.startDate.getTime();this.trimProcessedDateRanges_(a),this.pendingDateRanges_=e.reduce((o,u)=>(o.set(u.id,u),o),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},i=[];this.pendingDateRanges_.forEach((a,o)=>{if(!this.processedDateRanges_.has(o)&&(a.startTime=a.startDate.getTime()/1e3-this.offset_,a.processDateRange=()=>this.processDateRange(a),i.push(a),!!a.class))if(e[a.class]){const u=e[a.class].push(a);a.classListIndex=u-1}else e[a.class]=[a],a.classListIndex=0});for(const a of i){const o=e[a.class]||[];a.endDate?a.endTime=a.endDate.getTime()/1e3-this.offset_:a.endOnNext&&o[a.classListIndex+1]?a.endTime=o[a.classListIndex+1].startTime:a.duration?a.endTime=a.startTime+a.duration:a.plannedDuration?a.endTime=a.startTime+a.plannedDuration:a.endTime=a.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((a,o)=>{a.startDate.getTime()<e&&this.processedDateRanges_.delete(o)})}}const AS=22,Uo=({requestType:s,request:e,error:i,parseFailure:a})=>{const o=e.status<200||e.status>299,u=e.status>=400&&e.status<=499,c={uri:e.uri,requestType:s},f=o&&!u||a;if(i&&u)c.error=Vt({},i),c.errorType=$.Error.NetworkRequestFailed;else if(e.aborted)c.errorType=$.Error.NetworkRequestAborted;else if(e.timedout)c.erroType=$.Error.NetworkRequestTimeout;else if(f){const m=a?$.Error.NetworkBodyParserFailed:$.Error.NetworkBadStatus;c.errorType=m,c.status=e.status,c.headers=e.headers}return c},TR=Kn("CodecUtils"),wS=function(s){const e=s.attributes||{};if(e.CODECS)return Us(e.CODECS)},DS=(s,e)=>{const i=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&i.AUDIO&&s.mediaGroups.AUDIO[i.AUDIO]},SR=(s,e)=>{if(!DS(s,e))return!0;const i=e.attributes||{},a=s.mediaGroups.AUDIO[i.AUDIO];for(const o in a)if(!a[o].uri&&!a[o].playlists)return!0;return!1},Md=function(s){const e={};return s.forEach(({mediaType:i,type:a,details:o})=>{e[i]=e[i]||[],e[i].push(tT(`${a}${o}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){TR(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return}e[i]=e[i][0]}),e},kS=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},Ld=function(s,e){const i=e.attributes||{},a=Md(wS(e)||[]);if(DS(s,e)&&!a.audio&&!SR(s,e)){const o=Md(Hk(s,i.AUDIO)||[]);o.audio&&(a.audio=o.audio)}return a},{EventTarget:xR}=$,ER=(s,e)=>{if(e.endList||!e.serverControl)return s;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:a}=e;let o=e.mediaSequence+e.segments.length;if(a){const u=a.parts||[],c=fS(e)-1;c>-1&&c!==u.length-1&&(i._HLS_part=c),(c>-1||u.length)&&o--}i._HLS_msn=o}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const a=new B.URL(s);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(o){i.hasOwnProperty(o)&&a.searchParams.set(o,i[o])}),s=a.toString()}return s},CR=(s,e)=>{if(!s)return e;const i=bt(s,e);if(s.preloadHints&&!e.preloadHints&&delete i.preloadHints,s.parts&&!e.parts)delete i.parts;else if(s.parts&&e.parts)for(let a=0;a<e.parts.length;a++)s.parts&&s.parts[a]&&(i.parts[a]=bt(s.parts[a],e.parts[a]));return!s.skipped&&e.skipped&&(i.skipped=!1),s.preload&&!e.preload&&(i.preload=!1),i},AR=(s,e,i)=>{const a=s.slice(),o=e.slice();i=i||0;const u=[];let c;for(let f=0;f<o.length;f++){const m=a[f+i],b=o[f];m?(c=m.map||c,u.push(CR(m,b))):(c&&!b.map&&(b.map=c),u.push(b))}return u},OS=(s,e)=>{!s.resolvedUri&&s.uri&&(s.resolvedUri=gn(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=gn(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=gn(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=gn(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=gn(e,i.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=gn(e,i.uri))})},RS=function(s){const e=s.segments||[],i=s.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let a=0;a<i.preloadHints.length;a++)if(i.preloadHints[a].type==="MAP")return e}i.duration=s.targetDuration,i.preload=!0,e.push(i)}return e},MS=(s,e)=>s===e||s.segments&&e.segments&&s.segments.length===e.segments.length&&s.endList===e.endList&&s.mediaSequence===e.mediaSequence&&s.preloadSegment===e.preloadSegment,Sy=(s,e,i=MS)=>{const a=bt(s,{}),o=a.playlists[e.id];if(!o||i(o,e))return null;e.segments=RS(e);const u=bt(o,e);if(u.preloadSegment&&!e.preloadSegment&&delete u.preloadSegment,o.segments){if(e.skip){e.segments=e.segments||[];for(let c=0;c<e.skip.skippedSegments;c++)e.segments.unshift({skipped:!0})}u.segments=AR(o.segments,e.segments,e.mediaSequence-o.mediaSequence)}u.segments.forEach(c=>{OS(c,u.resolvedUri)});for(let c=0;c<a.playlists.length;c++)a.playlists[c].id===e.id&&(a.playlists[c]=u);return a.playlists[e.id]=u,a.playlists[e.uri]=u,_u(s,(c,f,m,b)=>{if(c.playlists)for(let S=0;S<c.playlists.length;S++)e.id===c.playlists[S].id&&(c.playlists[S]=u)}),a},xy=(s,e)=>{const i=s.segments||[],a=i[i.length-1],o=a&&a.parts&&a.parts[a.parts.length-1],u=o&&o.duration||a&&a.duration;return e&&u?u*1e3:(s.partTargetDuration||s.targetDuration||10)*500},LS=(s,e,i)=>{if(!s)return;const a=[];return s.forEach(o=>{if(!o.attributes)return;const{BANDWIDTH:u,RESOLUTION:c,CODECS:f}=o.attributes;a.push({id:o.id,bandwidth:u,resolution:c,codecs:f})}),{type:e,isLive:i,renditions:a}};class Tu extends xR{constructor(e,i,a={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Kn("PlaylistLoader");const{withCredentials:o=!1}=a;this.src=e,this.vhs_=i,this.withCredentials=o,this.addDateRangesToTextTrack_=a.addDateRangesToTextTrack;const u=i.options_;this.customTagParsers=u&&u.customTagParsers||[],this.customTagMappers=u&&u.customTagMappers||[],this.llhls=u&&u.llhls,this.dateRangesStorage_=new CS,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let i=gn(this.main.uri,e.uri);this.llhls&&(i=ER(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(a,o)=>{if(this.request){if(a)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,i,a){const{uri:o,id:u}=i;this.request=null,a&&(this.state=a),this.error={playlist:this.main.playlists[u],status:e.status,message:`HLS playlist request error at URL: ${o}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Uo({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const a=yR({onwarn:({message:o})=>this.logger_(`m3u8-parser warn for ${e}: ${o}`),oninfo:({message:o})=>this.logger_(`m3u8-parser info for ${e}: ${o}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!a.playlists||!a.playlists.length||this.excludeAudioOnlyVariants(a.playlists),a}catch(a){this.error=a,this.error.metadata={errorType:$.Error.StreamingHlsPlaylistParserError,error:a}}}excludeAudioOnlyVariants(e){const i=a=>{const o=a.attributes||{},{width:u,height:c}=o.RESOLUTION||{};if(u&&c)return!0;const f=wS(a)||[];return!!Md(f).video};e.some(i)&&e.forEach(a=>{i(a)||(a.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:a,id:o}){this.request=null,this.state="HAVE_METADATA";const u={playlistInfo:{type:"media",uri:a}};this.trigger({type:"playlistparsestart",metadata:u});const c=i||this.parseManifest_({url:a,manifestString:e});c.lastRequest=Date.now(),xS({playlist:c,uri:a,id:o});const f=Sy(this.main,c);this.targetDuration=c.partTargetDuration||c.targetDuration,this.pendingMedia_=null,f?(this.main=f,this.media_=this.main.playlists[o]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(xy(this.media(),!!f)),u.parsedPlaylist=LS(this.main.playlists,u.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:u}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),B.clearTimeout(this.mediaUpdateTimeout),B.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new CS,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(B.clearTimeout(this.finalRenditionTimeout),i){const f=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=B.setTimeout(this.media.bind(this,e,!1),f);return}const a=this.state,o=!this.media_||e.id!==this.media_.id,u=this.main.playlists[e.id];if(u&&u.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,o&&(this.trigger("mediachanging"),a==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(xy(e,!0)),!o)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const c={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:c}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(f,m)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Rp(e.resolvedUri,m),f)return this.playlistRequestError(this.request,e,a);this.trigger({type:"playlistrequestcomplete",metadata:c}),this.haveMetadata({playlistString:m.responseText,url:e.uri,id:e.id}),a==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const a=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=B.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},a);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=B.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=B.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,a)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:a.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:a.responseText,code:2,metadata:Uo({requestType:a.requestType,request:a,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Rp(this.src,a),this.trigger({type:"playlistparsestart",metadata:e});const o=this.parseManifest_({manifestString:a.responseText,url:this.src});e.parsedPlaylist=LS(o.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(o)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,ES(this.main,this.srcUri()),e.playlists.forEach(a=>{a.segments=RS(a),a.segments.forEach(o=>{OS(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||B.location.href;this.main=_R(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const a=this.main,o=e.ID;let u=a.playlists.length;for(;u--;){const c=a.playlists[u];if(c.attributes["PATHWAY-ID"]===o){const f=c.resolvedUri,m=c.id;if(i){const b=this.createCloneURI_(c.resolvedUri,e),S=bu(o,b),E=this.createCloneAttributes_(o,c.attributes),A=this.createClonePlaylist_(c,S,e,E);a.playlists[u]=A,a.playlists[S]=A,a.playlists[b]=A}else a.playlists.splice(u,1);delete a.playlists[m],delete a.playlists[f]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const a=this.main,o=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!a.mediaGroups[u]||!a.mediaGroups[u][o])){for(const c in a.mediaGroups[u])if(c===o){for(const f in a.mediaGroups[u][c])a.mediaGroups[u][c][f].playlists.forEach((b,S)=>{const E=a.playlists[b.id],A=E.id,R=E.resolvedUri;delete a.playlists[A],delete a.playlists[R]});delete a.mediaGroups[u][c]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const a=this.main,o=a.playlists.length,u=this.createCloneURI_(i.resolvedUri,e),c=bu(e.ID,u),f=this.createCloneAttributes_(e.ID,i.attributes),m=this.createClonePlaylist_(i,c,e,f);a.playlists[o]=m,a.playlists[c]=m,a.playlists[u]=m,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,a=e["BASE-ID"],o=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(u=>{if(!(!o.mediaGroups[u]||o.mediaGroups[u][i]))for(const c in o.mediaGroups[u]){if(c===a)o.mediaGroups[u][i]={};else continue;for(const f in o.mediaGroups[u][c]){const m=o.mediaGroups[u][c][f];o.mediaGroups[u][i][f]=Vt({},m);const b=o.mediaGroups[u][i][f],S=this.createCloneURI_(m.resolvedUri,e);b.resolvedUri=S,b.uri=S,b.playlists=[],m.playlists.forEach((E,A)=>{const R=o.playlists[E.id],N=SS(u,i,f),w=bu(i,N);if(R&&!o.playlists[w]){const H=this.createClonePlaylist_(R,w,e),I=H.resolvedUri;o.playlists[w]=H,o.playlists[I]=H}b.playlists[A]=this.createClonePlaylist_(E,w,e)})}}})}createClonePlaylist_(e,i,a,o){const u=this.createCloneURI_(e.resolvedUri,a),c={resolvedUri:u,uri:u,id:i};return e.segments&&(c.segments=[]),o&&(c.attributes=o),bt(e,c)}createCloneURI_(e,i){const a=new URL(e);a.hostname=i["URI-REPLACEMENT"].HOST;const o=i["URI-REPLACEMENT"].PARAMS;for(const u of Object.keys(o))a.searchParams.set(u,o[u]);return a.href}createCloneAttributes_(e,i){const a={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{i[o]&&(a[o]=e)}),a}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const a in e.contentProtection){const o=e.contentProtection[a].attributes.keyId;o&&i.add(o.toLowerCase())}return i}}}const Ey=function(s,e,i,a){const o=s.responseType==="arraybuffer"?s.response:s.responseText;!e&&o&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=o.byteLength||o.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),i.headers&&(s.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(s.timedout=!0),!e&&!s.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(s&&(o||s.responseText)))),a(e,s)},wR=(s,e)=>{if(!s||!s.size)return;let i=e;return s.forEach(a=>{i=a(i)}),i},DR=(s,e,i,a)=>{!s||!s.size||s.forEach(o=>{o(e,i,a)})},IS=function(){const s=function e(i,a){i=bt({timeout:45e3},i);const o=e.beforeRequest||$.Vhs.xhr.beforeRequest,u=e._requestCallbackSet||$.Vhs.xhr._requestCallbackSet||new Set,c=e._responseCallbackSet||$.Vhs.xhr._responseCallbackSet;o&&typeof o=="function"&&($.log.warn("beforeRequest is deprecated, use onRequest instead."),u.add(o));const f=$.Vhs.xhr.original===!0?$.xhr:$.Vhs.xhr,m=wR(u,i);u.delete(o);const b=f(m||i,function(E,A){return DR(c,b,E,A),Ey(b,E,A,a)}),S=b.abort;return b.abort=function(){return b.aborted=!0,S.apply(b,arguments)},b.uri=i.uri,b.requestType=i.requestType,b.requestTime=Date.now(),b};return s.original=!0,s},kR=function(s){let e;const i=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=B.BigInt(s.offset)+B.BigInt(s.length)-B.BigInt(1):e=s.offset+s.length-1,"bytes="+i+"-"+e},Cy=function(s){const e={};return s.byterange&&(e.Range=kR(s.byterange)),e},OR=function(s,e){return s.start(e)+"-"+s.end(e)},RR=function(s,e){const i=s.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},MR=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},PS=function(s){const e={};return Object.keys(s).forEach(i=>{const a=s[i];aT(a)?e[i]={bytes:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength}:e[i]=a}),e},Ip=function(s){const e=s.byterange||{length:1/0,offset:0};return[e.length,e.offset,s.resolvedUri].join(",")},NS=function(s){return s.resolvedUri},US=s=>{const e=Array.prototype.slice.call(s),i=16;let a="",o,u;for(let c=0;c<e.length/i;c++)o=e.slice(c*i,c*i+i).map(RR).join(""),u=e.slice(c*i,c*i+i).map(MR).join(""),a+=o+" "+u+`
`;return a};var LR=Object.freeze({__proto__:null,createTransferableMessage:PS,initSegmentId:Ip,segmentKeyId:NS,hexDump:US,tagDump:({bytes:s})=>US(s),textRanges:s=>{let e="",i;for(i=0;i<s.length;i++)e+=OR(s,i)+" ";return e}});const BS=.25,IR=(s,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,o=e.videoTimingInfo.transmuxedPresentationStart+i,u=s-o;return new Date(e.dateTimeObject.getTime()+u*1e3)},PR=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,NR=(s,e)=>{let i;try{i=new Date(s)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let a=e.segments[0];if(i<new Date(a.dateTimeObject))return null;for(let m=0;m<e.segments.length-1;m++){a=e.segments[m];const b=new Date(e.segments[m+1].dateTimeObject);if(i<b)break}const o=e.segments[e.segments.length-1],u=o.dateTimeObject,c=o.videoTimingInfo?PR(o.videoTimingInfo):o.duration+o.duration*BS,f=new Date(u.getTime()+c*1e3);return i>f?null:(i>new Date(u)&&(a=o),{segment:a,estimatedStart:a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationStart:yn.duration(e,e.mediaSequence+e.segments.indexOf(a)),type:a.videoTimingInfo?"accurate":"estimate"})},UR=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,a;for(let u=0;u<e.segments.length&&(a=e.segments[u],i=a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationEnd:i+a.duration,!(s<=i));u++);const o=e.segments[e.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<s)return null;if(s>i){if(s>i+o.duration*BS)return null;a=o}return{segment:a,estimatedStart:a.videoTimingInfo?a.videoTimingInfo.transmuxedPresentationStart:i-a.duration,type:a.videoTimingInfo?"accurate":"estimate"}},BR=(s,e)=>{let i,a;try{i=new Date(s),a=new Date(e)}catch{}const o=i.getTime();return(a.getTime()-o)/1e3},FR=s=>{if(!s.segments||s.segments.length===0)return!1;for(let e=0;e<s.segments.length;e++)if(!s.segments[e].dateTimeObject)return!1;return!0},HR=({playlist:s,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!s||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const a=UR(e,s);if(!a)return i({message:"valid programTime was not found"});if(a.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});const o={mediaSeconds:e},u=IR(e,a.segment);return u&&(o.programDateTime=u.toISOString()),i(null,o)},FS=({programTime:s,playlist:e,retryCount:i=2,seekTo:a,pauseAfterSeek:o=!0,tech:u,callback:c})=>{if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof s>"u"||!e||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!u.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!FR(e))return c({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const f=NR(s,e);if(!f)return c({message:`${s} was not found in the stream`});const m=f.segment,b=BR(m.dateTimeObject,s);if(f.type==="estimate"){if(i===0)return c({message:`${s} is not buffered yet. Try again`});a(f.estimatedStart+b),u.one("seeked",()=>{FS({programTime:s,playlist:e,retryCount:i-1,seekTo:a,pauseAfterSeek:o,tech:u,callback:c})});return}const S=m.start+b,E=()=>c(null,u.currentTime());u.one("seeked",E),o&&u.pause(),a(S)},Ay=(s,e)=>{if(s.readyState===4)return e()},jR=(s,e,i,a)=>{let o=[],u,c=!1;const f=function(E,A,R,N){return A.abort(),c=!0,i(E,A,R,N)},m=function(E,A){if(c)return;if(E)return E.metadata=Uo({requestType:a,request:A,error:E}),f(E,A,"",o);const R=A.responseText.substring(o&&o.byteLength||0,A.responseText.length);if(o=Qk(o,rT(R,!0)),u=u||gd(o),o.length<10||u&&o.length<u+2)return Ay(A,()=>f(E,A,"",o));const N=m0(o);return N==="ts"&&o.length<188?Ay(A,()=>f(E,A,"",o)):!N&&o.length<376?Ay(A,()=>f(E,A,"",o)):f(null,A,N,o)},S=e({uri:s,beforeSend(E){E.overrideMimeType("text/plain; charset=x-user-defined"),E.addEventListener("progress",function({total:A,loaded:R}){return Ey(E,null,{statusCode:E.status},m)})}},function(E,A){return Ey(S,E,A,m)});return S},{EventTarget:zR}=$,HS=function(s,e){if(!MS(s,e)||s.sidx&&e.sidx&&(s.sidx.offset!==e.sidx.offset||s.sidx.length!==e.sidx.length))return!1;if(!s.sidx&&e.sidx||s.sidx&&!e.sidx||s.segments&&!e.segments||!s.segments&&e.segments)return!1;if(!s.segments&&!e.segments)return!0;for(let i=0;i<s.segments.length;i++){const a=s.segments[i],o=e.segments[i];if(a.uri!==o.uri)return!1;if(!a.byterange&&!o.byterange)continue;const u=a.byterange,c=o.byterange;if(u&&!c||!u&&c||u.offset!==c.offset||u.length!==c.length)return!1}return!0},VR=(s,e,i,a)=>{const o=a.attributes.NAME||i;return`placeholder-uri-${s}-${e}-${o}`},qR=({mainXml:s,srcUrl:e,clientOffset:i,sidxMapping:a,previousManifest:o})=>{const u=y3(s,{manifestUri:e,clientOffset:i,sidxMapping:a,previousManifest:o});return ES(u,e,VR),u},$R=(s,e)=>{_u(s,(i,a,o,u)=>{(!e.mediaGroups[a][o]||!(u in e.mediaGroups[a][o]))&&delete s.mediaGroups[a][o][u]})},GR=(s,e,i)=>{let a=!0,o=bt(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let u=0;u<e.playlists.length;u++){const c=e.playlists[u];if(c.sidx){const m=$f(c.sidx);i&&i[m]&&i[m].sidx&&u0(c,i[m].sidx,c.sidx.resolvedUri)}const f=Sy(o,c,HS);f&&(o=f,a=!1)}return _u(e,(u,c,f,m)=>{if(u.playlists&&u.playlists.length){const b=u.playlists[0].id,S=Sy(o,u.playlists[0],HS);S&&(o=S,m in o.mediaGroups[c][f]||(o.mediaGroups[c][f][m]=u),o.mediaGroups[c][f][m].playlists[0]=o.playlists[b],a=!1)}}),$R(o,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(a=!1),a?null:o},XR=(s,e)=>(!s.map&&!e.map||!!(s.map&&e.map&&s.map.byterange.offset===e.map.byterange.offset&&s.map.byterange.length===e.map.byterange.length))&&s.uri===e.uri&&s.byterange.offset===e.byterange.offset&&s.byterange.length===e.byterange.length,jS=(s,e)=>{const i={};for(const a in s){const u=s[a].sidx;if(u){const c=$f(u);if(!e[c])break;const f=e[c].sidxInfo;XR(f,u)&&(i[c]=e[c])}}return i},YR=(s,e)=>{let a=jS(s.playlists,e);return _u(s,(o,u,c,f)=>{if(o.playlists&&o.playlists.length){const m=o.playlists;a=bt(a,jS(m,e))}}),a};class wy extends zR{constructor(e,i,a={},o){super(),this.isPaused_=!0,this.mainPlaylistLoader_=o||this,o||(this.isMain_=!0);const{withCredentials:u=!1}=a;if(this.vhs_=i,this.withCredentials=u,this.addMetadataToTextTrack=a.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Kn("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,a){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},a&&(this.state=a),this.trigger("error"),!0}addSidxSegments_(e,i,a){const o=e.sidx&&$f(e.sidx);if(!e.sidx||!o||this.mainPlaylistLoader_.sidxMapping_[o]){B.clearTimeout(this.mediaRequest_),this.mediaRequest_=B.setTimeout(()=>a(!1),0);return}const u=Rp(e.sidx.resolvedUri),c=(m,b)=>{if(this.requestErrored_(m,b,i))return;const S=this.mainPlaylistLoader_.sidxMapping_,{requestType:E}=b;let A;try{A=x3(Be(b.response).subarray(8))}catch(R){R.metadata=Uo({requestType:E,request:b,parseFailure:!0}),this.requestErrored_(R,b,i);return}return S[o]={sidxInfo:e.sidx,sidx:A},u0(e,A,e.sidx.resolvedUri),a(!0)},f="dash-sidx";this.request=jR(u,this.vhs_.xhr,(m,b,S,E)=>{if(m)return c(m,b);if(!S||S!=="mp4"){const N=S||"unknown";return c({status:b.status,message:`Unsupported ${N} container type for sidx segment at URL: ${u}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},b)}const{offset:A,length:R}=e.sidx.byterange;if(E.length>=R+A)return c(m,{response:E.subarray(A,A+R),status:b.status,uri:b.uri});this.request=this.vhs_.xhr({uri:u,responseType:"arraybuffer",requestType:"dash-sidx",headers:Cy({byterange:e.sidx.byterange})},c)},f)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},B.clearTimeout(this.minimumUpdatePeriodTimeout_),B.clearTimeout(this.mediaRequest_),B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const a=!this.media_||e.id!==this.media_.id;if(a&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,a&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}a&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,o=>{this.haveMetadata({startingState:i,playlist:e})}))}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,B.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(B.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,B.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const a=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=B.setTimeout(()=>this.load(),a);return}if(!this.started){this.start();return}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){B.clearTimeout(this.mediaRequest_),this.mediaRequest_=B.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(a,o)=>{if(a){const{requestType:c}=o;a.metadata=Uo({requestType:c,request:o,error:a})}if(this.requestErrored_(a,o)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const u=o.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=o.responseText,o.responseHeaders&&o.responseHeaders.date?this.mainLoaded_=Date.parse(o.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Rp(this.mainPlaylistLoader_.srcUrl,o),u){this.handleMain_(),this.syncClientServerClock_(()=>e(o,u));return}return e(o,u)})}syncClientServerClock_(e){const i=v3(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:gn(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(a,o)=>{if(!this.request)return;if(a){const{requestType:c}=o;return this.error.metadata=Uo({requestType:c,request:o,error:a}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let u;i.method==="HEAD"?!o.responseHeaders||!o.responseHeaders.date?u=this.mainLoaded_:u=Date.parse(o.responseHeaders.date):u=Date.parse(o.responseText),this.mainPlaylistLoader_.clientOffset_=u-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){B.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let a;try{a=qR({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(u){this.error=u,this.error.metadata={errorType:$.Error.StreamingDashManifestParserError,error:u},this.trigger("error")}e&&(a=GR(e,a,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=a||e;const o=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(o&&o!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=o),(!e||a&&a.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(a),a){const{duration:u,endList:c}=a,f=[];a.playlists.forEach(b=>{f.push({id:b.id,bandwidth:b.attributes.BANDWIDTH,resolution:b.attributes.RESOLUTION,codecs:b.attributes.CODECS})});const m={duration:u,isLive:!c,renditions:f};i.parsedManifest=m,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!a}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(B.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return}this.createMUPTimeout_(i)}createMUPTimeout_(e){const i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=B.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=YR(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,a=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const i=this.mainPlaylistLoader_.main.playlists,a=!this.media_||this.media_!==i[e];if(a?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const o=()=>{this.media().endList||(this.mediaUpdateTimeout=B.setTimeout(()=>{this.trigger("mediaupdatetimeout"),o()},xy(this.media(),!!a)))};o()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(a=>({cueTime:a.start,frames:[{data:a.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const a in e.contentProtection){const o=e.contentProtection[a].attributes["cenc:default_KID"];o&&i.add(o.replace(/-/g,"").toLowerCase())}return i}}}var yi={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const WR=s=>{const e=new Uint8Array(new ArrayBuffer(s.length));for(let i=0;i<s.length;i++)e[i]=s.charCodeAt(i);return e.buffer},zS=function(s){return s.on=s.addEventListener,s.off=s.removeEventListener,s},QR=function(s){try{return URL.createObjectURL(new Blob([s],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(s),URL.createObjectURL(i.getBlob())}},VS=function(s){return function(){const e=QR(s),i=zS(new Worker(e));i.objURL=e;const a=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),a.call(this)},i}},qS=function(s){return`var browserWorkerPolyFill = ${zS.toString()};
browserWorkerPolyFill(self);
`+s},$S=function(s){return s.toString().replace(/^function.+?{/,"").slice(0,-1)},KR=qS($S(function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var h={};this.on=function(g,y){h[g]||(h[g]=[]),h[g]=h[g].concat(y)},this.off=function(g,y){var v;return h[g]?(v=h[g].indexOf(y),h[g]=h[g].slice(),h[g].splice(v,1),v>-1):!1},this.trigger=function(g){var y,v,_,x;if(y=h[g],!!y)if(arguments.length===2)for(_=y.length,v=0;v<_;++v)y[v].call(this,arguments[1]);else{for(x=[],v=arguments.length,v=1;v<arguments.length;++v)x.push(arguments[v]);for(_=y.length,v=0;v<_;++v)y[v].apply(this,x)}},this.dispose=function(){h={}}}};e.prototype.pipe=function(h){return this.on("data",function(g){h.push(g)}),this.on("done",function(g){h.flush(g)}),this.on("partialdone",function(g){h.partialFlush(g)}),this.on("endedtimeline",function(g){h.endTimeline(g)}),this.on("reset",function(g){h.reset(g)}),h},e.prototype.push=function(h){this.trigger("data",h)},e.prototype.flush=function(h){this.trigger("done",h)},e.prototype.partialFlush=function(h){this.trigger("partialdone",h)},e.prototype.endTimeline=function(h){this.trigger("endedtimeline",h)},e.prototype.reset=function(h){this.trigger("reset",h)};var i=e,a=Math.pow(2,32),o=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y;return g.getBigUint64?(y=g.getBigUint64(0),y<Number.MAX_SAFE_INTEGER?Number(y):y):g.getUint32(0)*a+g.getUint32(4)},u={getUint64:o,MAX_UINT32:a},c=u.MAX_UINT32,f,m,b,S,E,A,R,N,w,H,I,G,F,Y,K,se,Q,le,ue,Ie,be,Ae,fe,Pe,rt,de,xe,Me,he,W,pe,me,De,Ue,ot,Ye;(function(){var h;if(fe={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(h in fe)fe.hasOwnProperty(h)&&(fe[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);Pe=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),de=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),rt=new Uint8Array([0,0,0,1]),xe=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]),Me=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]),he={video:xe,audio:Me},me=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),pe=new Uint8Array([0,0,0,0,0,0,0,0]),De=new Uint8Array([0,0,0,0,0,0,0,0]),Ue=De,ot=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ye=De,W=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),f=function(h){var g=[],y=0,v,_,x;for(v=1;v<arguments.length;v++)g.push(arguments[v]);for(v=g.length;v--;)y+=g[v].byteLength;for(_=new Uint8Array(y+8),x=new DataView(_.buffer,_.byteOffset,_.byteLength),x.setUint32(0,_.byteLength),_.set(h,4),v=0,y=8;v<g.length;v++)_.set(g[v],y),y+=g[v].byteLength;return _},m=function(){return f(fe.dinf,f(fe.dref,me))},b=function(h){return f(fe.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,h.audioobjecttype<<3|h.samplingfrequencyindex>>>1,h.samplingfrequencyindex<<7|h.channelcount<<3,6,1,2]))},S=function(){return f(fe.ftyp,Pe,rt,Pe,de)},se=function(h){return f(fe.hdlr,he[h])},E=function(h){return f(fe.mdat,h)},K=function(h){var g=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,h.duration>>>24&255,h.duration>>>16&255,h.duration>>>8&255,h.duration&255,85,196,0,0]);return h.samplerate&&(g[12]=h.samplerate>>>24&255,g[13]=h.samplerate>>>16&255,g[14]=h.samplerate>>>8&255,g[15]=h.samplerate&255),f(fe.mdhd,g)},Y=function(h){return f(fe.mdia,K(h),se(h.type),R(h))},A=function(h){return f(fe.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},R=function(h){return f(fe.minf,h.type==="video"?f(fe.vmhd,W):f(fe.smhd,pe),m(),le(h))},N=function(h,g){for(var y=[],v=g.length;v--;)y[v]=Ie(g[v]);return f.apply(null,[fe.moof,A(h)].concat(y))},w=function(h){for(var g=h.length,y=[];g--;)y[g]=G(h[g]);return f.apply(null,[fe.moov,I(4294967295)].concat(y).concat(H(h)))},H=function(h){for(var g=h.length,y=[];g--;)y[g]=be(h[g]);return f.apply(null,[fe.mvex].concat(y))},I=function(h){var g=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255,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]);return f(fe.mvhd,g)},Q=function(h){var g=h.samples||[],y=new Uint8Array(4+g.length),v,_;for(_=0;_<g.length;_++)v=g[_].flags,y[_+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return f(fe.sdtp,y)},le=function(h){return f(fe.stbl,ue(h),f(fe.stts,Ye),f(fe.stsc,Ue),f(fe.stsz,ot),f(fe.stco,De))},function(){var h,g;ue=function(y){return f(fe.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),y.type==="video"?h(y):g(y))},h=function(y){var v=y.sps||[],_=y.pps||[],x=[],k=[],M,P;for(M=0;M<v.length;M++)x.push((v[M].byteLength&65280)>>>8),x.push(v[M].byteLength&255),x=x.concat(Array.prototype.slice.call(v[M]));for(M=0;M<_.length;M++)k.push((_[M].byteLength&65280)>>>8),k.push(_[M].byteLength&255),k=k.concat(Array.prototype.slice.call(_[M]));if(P=[fe.avc1,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,(y.width&65280)>>8,y.width&255,(y.height&65280)>>8,y.height&255,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]),f(fe.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([v.length],x,[_.length],k))),f(fe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var U=y.sarRatio[0],V=y.sarRatio[1];P.push(f(fe.pasp,new Uint8Array([(U&4278190080)>>24,(U&16711680)>>16,(U&65280)>>8,U&255,(V&4278190080)>>24,(V&16711680)>>16,(V&65280)>>8,V&255])))}return f.apply(null,P)},g=function(y){return f(fe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(y.channelcount&65280)>>8,y.channelcount&255,(y.samplesize&65280)>>8,y.samplesize&255,0,0,0,0,(y.samplerate&65280)>>8,y.samplerate&255,0,0]),b(y))}}(),F=function(h){var g=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,0,(h.duration&4278190080)>>24,(h.duration&16711680)>>16,(h.duration&65280)>>8,h.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(h.width&65280)>>8,h.width&255,0,0,(h.height&65280)>>8,h.height&255,0,0]);return f(fe.tkhd,g)},Ie=function(h){var g,y,v,_,x,k,M;return g=f(fe.tfhd,new Uint8Array([0,0,0,58,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(h.baseMediaDecodeTime/c),M=Math.floor(h.baseMediaDecodeTime%c),y=f(fe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,k&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255])),x=32+20+8+16+8+8,h.type==="audio"?(v=Ae(h,x),f(fe.traf,g,y,v)):(_=Q(h),v=Ae(h,_.length+x),f(fe.traf,g,y,v,_))},G=function(h){return h.duration=h.duration||4294967295,f(fe.trak,F(h),Y(h))},be=function(h){var g=new Uint8Array([0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.type!=="video"&&(g[g.length-1]=0),f(fe.trex,g)},function(){var h,g,y;y=function(v,_){var x=0,k=0,M=0,P=0;return v.length&&(v[0].duration!==void 0&&(x=1),v[0].size!==void 0&&(k=2),v[0].flags!==void 0&&(M=4),v[0].compositionTimeOffset!==void 0&&(P=8)),[0,0,x|k|M|P,1,(v.length&4278190080)>>>24,(v.length&16711680)>>>16,(v.length&65280)>>>8,v.length&255,(_&4278190080)>>>24,(_&16711680)>>>16,(_&65280)>>>8,_&255]},g=function(v,_){var x,k,M,P,U,V;for(P=v.samples||[],_+=8+12+16*P.length,M=y(P,_),k=new Uint8Array(M.length+P.length*16),k.set(M),x=M.length,V=0;V<P.length;V++)U=P[V],k[x++]=(U.duration&4278190080)>>>24,k[x++]=(U.duration&16711680)>>>16,k[x++]=(U.duration&65280)>>>8,k[x++]=U.duration&255,k[x++]=(U.size&4278190080)>>>24,k[x++]=(U.size&16711680)>>>16,k[x++]=(U.size&65280)>>>8,k[x++]=U.size&255,k[x++]=U.flags.isLeading<<2|U.flags.dependsOn,k[x++]=U.flags.isDependedOn<<6|U.flags.hasRedundancy<<4|U.flags.paddingValue<<1|U.flags.isNonSyncSample,k[x++]=U.flags.degradationPriority&61440,k[x++]=U.flags.degradationPriority&15,k[x++]=(U.compositionTimeOffset&4278190080)>>>24,k[x++]=(U.compositionTimeOffset&16711680)>>>16,k[x++]=(U.compositionTimeOffset&65280)>>>8,k[x++]=U.compositionTimeOffset&255;return f(fe.trun,k)},h=function(v,_){var x,k,M,P,U,V;for(P=v.samples||[],_+=8+12+8*P.length,M=y(P,_),x=new Uint8Array(M.length+P.length*8),x.set(M),k=M.length,V=0;V<P.length;V++)U=P[V],x[k++]=(U.duration&4278190080)>>>24,x[k++]=(U.duration&16711680)>>>16,x[k++]=(U.duration&65280)>>>8,x[k++]=U.duration&255,x[k++]=(U.size&4278190080)>>>24,x[k++]=(U.size&16711680)>>>16,x[k++]=(U.size&65280)>>>8,x[k++]=U.size&255;return f(fe.trun,x)},Ae=function(v,_){return v.type==="audio"?h(v,_):g(v,_)}}();var Ji={ftyp:S,mdat:E,moof:N,moov:w,initSegment:function(h){var g=S(),y=w(h),v;return v=new Uint8Array(g.byteLength+y.byteLength),v.set(g),v.set(y,g.byteLength),v}},Et=function(h){var g,y,v=[],_=[];for(_.byteLength=0,_.nalCount=0,_.duration=0,v.byteLength=0,g=0;g<h.length;g++)y=h[g],y.nalUnitType==="access_unit_delimiter_rbsp"?(v.length&&(v.duration=y.dts-v.dts,_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v)),v=[y],v.byteLength=y.data.byteLength,v.pts=y.pts,v.dts=y.dts):(y.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(v.keyFrame=!0),v.duration=y.dts-v.dts,v.byteLength+=y.data.byteLength,v.push(y));return _.length&&(!v.duration||v.duration<=0)&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.length,_.duration+=v.duration,_.push(v),_},ut=function(h){var g,y,v=[],_=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=h[0].pts,v.dts=h[0].dts,_.byteLength=0,_.nalCount=0,_.duration=0,_.pts=h[0].pts,_.dts=h[0].dts,g=0;g<h.length;g++)y=h[g],y.keyFrame?(v.length&&(_.push(v),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration),v=[y],v.nalCount=y.length,v.byteLength=y.byteLength,v.pts=y.pts,v.dts=y.dts,v.duration=y.duration):(v.duration+=y.duration,v.nalCount+=y.length,v.byteLength+=y.byteLength,v.push(y));return _.length&&v.duration<=0&&(v.duration=_[_.length-1].duration),_.byteLength+=v.byteLength,_.nalCount+=v.nalCount,_.duration+=v.duration,_.push(v),_},mt=function(h){var g;return!h[0][0].keyFrame&&h.length>1&&(g=h.shift(),h.byteLength-=g.byteLength,h.nalCount-=g.nalCount,h[0][0].dts=g.dts,h[0][0].pts=g.pts,h[0][0].duration+=g.duration),h},ji=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},jt=function(h,g){var y=ji();return y.dataOffset=g,y.compositionTimeOffset=h.pts-h.dts,y.duration=h.duration,y.size=4*h.length,y.size+=h.byteLength,h.keyFrame&&(y.flags.dependsOn=2,y.flags.isNonSyncSample=0),y},li=function(h,g){var y,v,_,x,k,M=g||0,P=[];for(y=0;y<h.length;y++)for(x=h[y],v=0;v<x.length;v++)k=x[v],_=jt(k,M),M+=_.size,P.push(_);return P},zi=function(h){var g,y,v,_,x,k,M=0,P=h.byteLength,U=h.nalCount,V=P+4*U,ee=new Uint8Array(V),_e=new DataView(ee.buffer);for(g=0;g<h.length;g++)for(_=h[g],y=0;y<_.length;y++)for(x=_[y],v=0;v<x.length;v++)k=x[v],_e.setUint32(M,k.data.byteLength),M+=4,ee.set(k.data,M),M+=k.data.byteLength;return ee},Kt=function(h,g){var y,v=g||0,_=[];return y=jt(h,v),_.push(y),_},ct=function(h){var g,y,v=0,_=h.byteLength,x=h.length,k=_+4*x,M=new Uint8Array(k),P=new DataView(M.buffer);for(g=0;g<h.length;g++)y=h[g],P.setUint32(v,y.data.byteLength),v+=4,M.set(y.data,v),v+=y.data.byteLength;return M},_s={groupNalsIntoFrames:Et,groupFramesIntoGops:ut,extendFirstKeyFrame:mt,generateSampleTable:li,concatenateNalData:zi,generateSampleTableForFrame:Kt,concatenateNalDataForFrame:ct},Ei=[33,16,5,32,164,27],Fo=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],we=function(h){for(var g=[];h--;)g.push(0);return g},Ba=function(h){return Object.keys(h).reduce(function(g,y){return g[y]=new Uint8Array(h[y].reduce(function(v,_){return v.concat(_)},[])),g},{})},Ws,Qs=function(){if(!Ws){var h={96e3:[Ei,[227,64],we(154),[56]],88200:[Ei,[231],we(170),[56]],64e3:[Ei,[248,192],we(240),[56]],48e3:[Ei,[255,192],we(268),[55,148,128],we(54),[112]],44100:[Ei,[255,192],we(268),[55,163,128],we(84),[112]],32e3:[Ei,[255,192],we(268),[55,234],we(226),[112]],24e3:[Ei,[255,192],we(268),[55,255,128],we(268),[111,112],we(126),[224]],16e3:[Ei,[255,192],we(268),[55,255,128],we(268),[111,255],we(269),[223,108],we(195),[1,192]],12e3:[Fo,we(268),[3,127,248],we(268),[6,255,240],we(268),[13,255,224],we(268),[27,253,128],we(259),[56]],11025:[Fo,we(268),[3,127,248],we(268),[6,255,240],we(268),[13,255,224],we(268),[27,255,192],we(268),[55,175,128],we(108),[112]],8e3:[Fo,we(268),[3,121,16],we(47),[7]]};Ws=Ba(h)}return Ws},Ir=9e4,Fa,Pr,Ks,Ha,Nr,ja,Ur;Fa=function(h){return h*Ir},Pr=function(h,g){return h*g},Ks=function(h){return h/Ir},Ha=function(h,g){return h/g},Nr=function(h,g){return Fa(Ha(h,g))},ja=function(h,g){return Pr(Ks(h),g)},Ur=function(h,g,y){return Ks(y?h:h-g)};var dt={ONE_SECOND_IN_TS:Ir,secondsToVideoTs:Fa,secondsToAudioTs:Pr,videoTsToSeconds:Ks,audioTsToSeconds:Ha,audioTsToVideoTs:Nr,videoTsToAudioTs:ja,metadataTsToSeconds:Ur},Zs=Qs,Vi=dt,Ln=function(h){var g,y,v=0;for(g=0;g<h.length;g++)y=h[g],v+=y.data.byteLength;return v},Js=function(h,g,y,v){var _,x=0,k=0,M=0,P=0,U,V,ee;if(g.length&&(_=Vi.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),x=Math.ceil(Vi.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&v&&(k=_-Math.max(y,v),M=Math.floor(k/x),P=M*x),!(M<1||P>Vi.ONE_SECOND_IN_TS/2))){for(U=Zs()[h.samplerate],U||(U=g[0].data),V=0;V<M;V++)ee=g[0],g.splice(0,0,{data:U,dts:ee.dts-x,pts:ee.pts-x});return h.baseMediaDecodeTime-=Math.floor(Vi.videoTsToAudioTs(P,h.samplerate)),P}},D=function(h,g,y){return g.minSegmentDts>=y?h:(g.minSegmentDts=1/0,h.filter(function(v){return v.dts>=y?(g.minSegmentDts=Math.min(g.minSegmentDts,v.dts),g.minSegmentPts=g.minSegmentDts,!0):!1}))},X=function(h){var g,y,v=[];for(g=0;g<h.length;g++)y=h[g],v.push({size:y.data.byteLength,duration:1024});return v},ve=function(h){var g,y,v=0,_=new Uint8Array(Ln(h));for(g=0;g<h.length;g++)y=h[g],_.set(y.data,v),v+=y.data.byteLength;return _},Se={prefixWithSilence:Js,trimAdtsFramesByEarliestDts:D,generateSampleTable:X,concatenateFrameData:ve},Le=dt.ONE_SECOND_IN_TS,Qe=function(h,g){typeof g.pts=="number"&&(h.timelineStartInfo.pts===void 0&&(h.timelineStartInfo.pts=g.pts),h.minSegmentPts===void 0?h.minSegmentPts=g.pts:h.minSegmentPts=Math.min(h.minSegmentPts,g.pts),h.maxSegmentPts===void 0?h.maxSegmentPts=g.pts:h.maxSegmentPts=Math.max(h.maxSegmentPts,g.pts)),typeof g.dts=="number"&&(h.timelineStartInfo.dts===void 0&&(h.timelineStartInfo.dts=g.dts),h.minSegmentDts===void 0?h.minSegmentDts=g.dts:h.minSegmentDts=Math.min(h.minSegmentDts,g.dts),h.maxSegmentDts===void 0?h.maxSegmentDts=g.dts:h.maxSegmentDts=Math.max(h.maxSegmentDts,g.dts))},Ve=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},at=function(h,g){var y,v,_=h.minSegmentDts;return g||(_-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=_,y=Math.max(0,y),h.type==="audio"&&(v=h.samplerate/Le,y*=v,y=Math.floor(y)),y},qe={clearDtsInfo:Ve,calculateTrackBaseMediaDecodeTime:at,collectDtsInfo:Qe},Zt=4,Ts=128,Nd=function(h){for(var g=0,y={payloadType:-1,payloadSize:0},v=0,_=0;g<h.byteLength&&h[g]!==Ts;){for(;h[g]===255;)v+=255,g++;for(v+=h[g++];h[g]===255;)_+=255,g++;if(_+=h[g++],!y.payload&&v===Zt){var x=String.fromCharCode(h[g+3],h[g+4],h[g+5],h[g+6]);if(x==="GA94"){y.payloadType=v,y.payloadSize=_,y.payload=h.subarray(g,g+_);break}else y.payload=void 0}g+=_,v=0,_=0}return y},Ud=function(h){return h.payload[0]!==181||(h.payload[1]<<8|h.payload[2])!==49||String.fromCharCode(h.payload[3],h.payload[4],h.payload[5],h.payload[6])!=="GA94"||h.payload[7]!==3?null:h.payload.subarray(8,h.payload.length-1)},vn=function(h,g){var y=[],v,_,x,k;if(!(g[0]&64))return y;for(_=g[0]&31,v=0;v<_;v++)x=v*3,k={type:g[x+2]&3,pts:h},g[x+2]&4&&(k.ccData=g[x+3]<<8|g[x+4],y.push(k));return y},Bd=function(h){for(var g=h.byteLength,y=[],v=1,_,x;v<g-2;)h[v]===0&&h[v+1]===0&&h[v+2]===3?(y.push(v+2),v+=2):v++;if(y.length===0)return h;_=g-y.length,x=new Uint8Array(_);var k=0;for(v=0;v<_;k++,v++)k===y[0]&&(k++,y.shift()),x[v]=h[k];return x},Fd={parseSei:Nd,parseUserData:Ud,parseCaptionPackets:vn,discardEmulationPreventionBytes:Bd,USER_DATA_REGISTERED_ITU_T_T35:Zt},Hd=i,Ho=Fd,Ci=function(h){h=h||{},Ci.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new kt(0,0),new kt(0,1),new kt(1,0),new kt(1,1)],this.parse708captions_&&(this.cc708Stream_=new _t({captionServices:h.captionServices})),this.reset(),this.ccStreams_.forEach(function(g){g.on("data",this.trigger.bind(this,"data")),g.on("partialdone",this.trigger.bind(this,"partialdone")),g.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ci.prototype=new Hd,Ci.prototype.push=function(h){var g,y,v;if(h.nalUnitType==="sei_rbsp"&&(g=Ho.parseSei(h.escapedRBSP),!!g.payload&&g.payloadType===Ho.USER_DATA_REGISTERED_ITU_T_T35&&(y=Ho.parseUserData(g),!!y))){if(h.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(h.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}v=Ho.parseCaptionPackets(h.pts,y),this.captionPackets_=this.captionPackets_.concat(v),this.latestDts_!==h.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=h.dts}},Ci.prototype.flushCCStreams=function(h){this.ccStreams_.forEach(function(g){return h==="flush"?g.flush():g.partialFlush()},this)},Ci.prototype.flushStream=function(h){if(!this.captionPackets_.length){this.flushCCStreams(h);return}this.captionPackets_.forEach(function(g,y){g.presortIndex=y}),this.captionPackets_.sort(function(g,y){return g.pts===y.pts?g.presortIndex-y.presortIndex:g.pts-y.pts}),this.captionPackets_.forEach(function(g){g.type<2?this.dispatchCea608Packet(g):this.dispatchCea708Packet(g)},this),this.captionPackets_.length=0,this.flushCCStreams(h)},Ci.prototype.flush=function(){return this.flushStream("flush")},Ci.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ci.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(h){h.reset()})},Ci.prototype.dispatchCea608Packet=function(h){this.setsTextOrXDSActive(h)?this.activeCea608Channel_[h.type]=null:this.setsChannel1Active(h)?this.activeCea608Channel_[h.type]=0:this.setsChannel2Active(h)&&(this.activeCea608Channel_[h.type]=1),this.activeCea608Channel_[h.type]!==null&&this.ccStreams_[(h.type<<1)+this.activeCea608Channel_[h.type]].push(h)},Ci.prototype.setsChannel1Active=function(h){return(h.ccData&30720)===4096},Ci.prototype.setsChannel2Active=function(h){return(h.ccData&30720)===6144},Ci.prototype.setsTextOrXDSActive=function(h){return(h.ccData&28928)===256||(h.ccData&30974)===4138||(h.ccData&30974)===6186},Ci.prototype.dispatchCea708Packet=function(h){this.parse708captions_&&this.cc708Stream_.push(h)};var wu={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Hy=function(h){var g=wu[h]||h;return h&4096&&h===g?"":String.fromCharCode(g)},Re=function(h){return 32<=h&&h<=127||160<=h&&h<=255},In=function(h){this.windowNum=h,this.reset()};In.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},In.prototype.getText=function(){return this.rows.join(`
`)},In.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},In.prototype.newLine=function(h){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(h),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},In.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},In.prototype.addText=function(h){this.rows[this.rowIdx]+=h},In.prototype.backspace=function(){if(!this.isEmpty()){var h=this.rows[this.rowIdx];this.rows[this.rowIdx]=h.substr(0,h.length-1)}};var Ai=function(h,g,y){this.serviceNum=h,this.text="",this.currentWindow=new In(-1),this.windows=[],this.stream=y,typeof g=="string"&&this.createTextDecoder(g)};Ai.prototype.init=function(h,g){this.startPts=h;for(var y=0;y<8;y++)this.windows[y]=new In(y),typeof g=="function"&&(this.windows[y].beforeRowOverflow=g)},Ai.prototype.setCurrentWindow=function(h){this.currentWindow=this.windows[h]},Ai.prototype.createTextDecoder=function(h){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(h)}catch(g){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+h+" encoding. "+g})}};var _t=function(h){h=h||{},_t.prototype.init.call(this);var g=this,y=h.captionServices||{},v={},_;Object.keys(y).forEach(x=>{_=y[x],/^SERVICE/.test(x)&&(v[x]=_.encoding)}),this.serviceEncodings=v,this.current708Packet=null,this.services={},this.push=function(x){x.type===3?(g.new708Packet(),g.add708Bytes(x)):(g.current708Packet===null&&g.new708Packet(),g.add708Bytes(x))}};_t.prototype=new Hd,_t.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},_t.prototype.add708Bytes=function(h){var g=h.ccData,y=g>>>8,v=g&255;this.current708Packet.ptsVals.push(h.pts),this.current708Packet.data.push(y),this.current708Packet.data.push(v)},_t.prototype.push708Packet=function(){var h=this.current708Packet,g=h.data,y=null,v=null,_=0,x=g[_++];for(h.seq=x>>6,h.sizeCode=x&63;_<g.length;_++)x=g[_++],y=x>>5,v=x&31,y===7&&v>0&&(x=g[_++],y=x),this.pushServiceBlock(y,_,v),v>0&&(_+=v-1)},_t.prototype.pushServiceBlock=function(h,g,y){var v,_=g,x=this.current708Packet.data,k=this.services[h];for(k||(k=this.initService(h,_));_<g+y&&_<x.length;_++)v=x[_],Re(v)?_=this.handleText(_,k):v===24?_=this.multiByteCharacter(_,k):v===16?_=this.extendedCommands(_,k):128<=v&&v<=135?_=this.setCurrentWindow(_,k):152<=v&&v<=159?_=this.defineWindow(_,k):v===136?_=this.clearWindows(_,k):v===140?_=this.deleteWindows(_,k):v===137?_=this.displayWindows(_,k):v===138?_=this.hideWindows(_,k):v===139?_=this.toggleWindows(_,k):v===151?_=this.setWindowAttributes(_,k):v===144?_=this.setPenAttributes(_,k):v===145?_=this.setPenColor(_,k):v===146?_=this.setPenLocation(_,k):v===143?k=this.reset(_,k):v===8?k.currentWindow.backspace():v===12?k.currentWindow.clearText():v===13?k.currentWindow.pendingNewLine=!0:v===14?k.currentWindow.clearText():v===141&&_++},_t.prototype.extendedCommands=function(h,g){var y=this.current708Packet.data,v=y[++h];return Re(v)&&(h=this.handleText(h,g,{isExtended:!0})),h},_t.prototype.getPts=function(h){return this.current708Packet.ptsVals[Math.floor(h/2)]},_t.prototype.initService=function(h,g){var v="SERVICE"+h,y=this,v,_;return v in this.serviceEncodings&&(_=this.serviceEncodings[v]),this.services[h]=new Ai(h,_,y),this.services[h].init(this.getPts(g),function(x){y.flushDisplayed(x,y.services[h])}),this.services[h]},_t.prototype.handleText=function(h,g,y){var v=y&&y.isExtended,_=y&&y.isMultiByte,x=this.current708Packet.data,k=v?4096:0,M=x[h],P=x[h+1],U=g.currentWindow,V,ee;function _e(oe){return oe.map(Ne=>("0"+(Ne&255).toString(16)).slice(-2)).join("")}if(_?(ee=[M,P],h++):ee=[M],g.textDecoder_&&!v)V=g.textDecoder_.decode(new Uint8Array(ee));else if(_){const oe=_e(ee);V=String.fromCharCode(parseInt(oe,16))}else V=Hy(k|M);return U.pendingNewLine&&!U.isEmpty()&&U.newLine(this.getPts(h)),U.pendingNewLine=!1,U.addText(V),h},_t.prototype.multiByteCharacter=function(h,g){var y=this.current708Packet.data,v=y[h+1],_=y[h+2];return Re(v)&&Re(_)&&(h=this.handleText(++h,g,{isMultiByte:!0})),h},_t.prototype.setCurrentWindow=function(h,g){var y=this.current708Packet.data,v=y[h],_=v&7;return g.setCurrentWindow(_),h},_t.prototype.defineWindow=function(h,g){var y=this.current708Packet.data,v=y[h],_=v&7;g.setCurrentWindow(_);var x=g.currentWindow;return v=y[++h],x.visible=(v&32)>>5,x.rowLock=(v&16)>>4,x.columnLock=(v&8)>>3,x.priority=v&7,v=y[++h],x.relativePositioning=(v&128)>>7,x.anchorVertical=v&127,v=y[++h],x.anchorHorizontal=v,v=y[++h],x.anchorPoint=(v&240)>>4,x.rowCount=v&15,v=y[++h],x.columnCount=v&63,v=y[++h],x.windowStyle=(v&56)>>3,x.penStyle=v&7,x.virtualRowCount=x.rowCount+1,h},_t.prototype.setWindowAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.winAttr;return v=y[++h],_.fillOpacity=(v&192)>>6,_.fillRed=(v&48)>>4,_.fillGreen=(v&12)>>2,_.fillBlue=v&3,v=y[++h],_.borderType=(v&192)>>6,_.borderRed=(v&48)>>4,_.borderGreen=(v&12)>>2,_.borderBlue=v&3,v=y[++h],_.borderType+=(v&128)>>5,_.wordWrap=(v&64)>>6,_.printDirection=(v&48)>>4,_.scrollDirection=(v&12)>>2,_.justify=v&3,v=y[++h],_.effectSpeed=(v&240)>>4,_.effectDirection=(v&12)>>2,_.displayEffect=v&3,h},_t.prototype.flushDisplayed=function(h,g){for(var y=[],v=0;v<8;v++)g.windows[v].visible&&!g.windows[v].isEmpty()&&y.push(g.windows[v].getText());g.endPts=h,g.text=y.join(`
`),this.pushCaption(g),g.startPts=h},_t.prototype.pushCaption=function(h){h.text!==""&&(this.trigger("data",{startPts:h.startPts,endPts:h.endPts,text:h.text,stream:"cc708_"+h.serviceNum}),h.text="",h.startPts=h.endPts)},_t.prototype.displayWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var x=0;x<8;x++)v&1<<x&&(g.windows[x].visible=1);return h},_t.prototype.hideWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var x=0;x<8;x++)v&1<<x&&(g.windows[x].visible=0);return h},_t.prototype.toggleWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var x=0;x<8;x++)v&1<<x&&(g.windows[x].visible^=1);return h},_t.prototype.clearWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var x=0;x<8;x++)v&1<<x&&g.windows[x].clearText();return h},_t.prototype.deleteWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],_=this.getPts(h);this.flushDisplayed(_,g);for(var x=0;x<8;x++)v&1<<x&&g.windows[x].reset();return h},_t.prototype.setPenAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penAttr;return v=y[++h],_.textTag=(v&240)>>4,_.offset=(v&12)>>2,_.penSize=v&3,v=y[++h],_.italics=(v&128)>>7,_.underline=(v&64)>>6,_.edgeType=(v&56)>>3,_.fontStyle=v&7,h},_t.prototype.setPenColor=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penColor;return v=y[++h],_.fgOpacity=(v&192)>>6,_.fgRed=(v&48)>>4,_.fgGreen=(v&12)>>2,_.fgBlue=v&3,v=y[++h],_.bgOpacity=(v&192)>>6,_.bgRed=(v&48)>>4,_.bgGreen=(v&12)>>2,_.bgBlue=v&3,v=y[++h],_.edgeRed=(v&48)>>4,_.edgeGreen=(v&12)>>2,_.edgeBlue=v&3,h},_t.prototype.setPenLocation=function(h,g){var y=this.current708Packet.data,v=y[h],_=g.currentWindow.penLoc;return g.currentWindow.pendingNewLine=!0,v=y[++h],_.row=v&15,v=y[++h],_.column=v&63,h},_t.prototype.reset=function(h,g){var y=this.getPts(h);return this.flushDisplayed(y,g),this.initService(g.serviceNum,h)};var jy={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},za=function(h){return h===null?"":(h=jy[h]||h,String.fromCharCode(h))},jo=14,Du=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],si=function(){for(var h=[],g=jo+1;g--;)h.push({text:"",indent:0,offset:0});return h},kt=function(h,g){kt.prototype.init.call(this),this.field_=h||0,this.dataChannel_=g||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(y){var v,_,x,k,M;if(v=y.ccData&32639,v===this.lastControlCode_){this.lastControlCode_=null;return}if((v&61440)===4096?this.lastControlCode_=v:v!==this.PADDING_&&(this.lastControlCode_=null),x=v>>>8,k=v&255,v!==this.PADDING_)if(v===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(v===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(y.pts),this.flushDisplayed(y.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=y.pts;else if(v===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(y.pts);else if(v===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(y.pts);else if(v===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(y.pts);else if(v===this.CARRIAGE_RETURN_)this.clearFormatting(y.pts),this.flushDisplayed(y.pts),this.shiftRowsUp_(),this.startPts_=y.pts;else if(v===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(v===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(y.pts),this.displayed_=si();else if(v===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=si();else if(v===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=si()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(x,k))x=(x&3)<<8,M=za(x|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isExtCharacter(x,k))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),x=(x&3)<<8,M=za(x|k),this[this.mode_](y.pts,M),this.column_++;else if(this.isMidRowCode(x,k))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(k&14)===14&&this.addFormatting(y.pts,["i"]),(k&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(x,k)){const U=k&3;this.nonDisplayed_[this.row_].offset=U,this.column_+=U}else if(this.isPAC(x,k)){var P=Du.indexOf(v&7968);if(this.mode_==="rollUp"&&(P-this.rollUpRows_+1<0&&(P=this.rollUpRows_-1),this.setRollUp(y.pts,P)),P!==this.row_&&P>=0&&P<=14&&(this.clearFormatting(y.pts),this.row_=P),k&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(v&16)===16){const U=(v&14)>>1;this.column_=U*4,this.nonDisplayed_[this.row_].indent+=U}this.isColorPAC(k)&&(k&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(x)&&(k===0&&(k=null),M=za(x),M+=za(k),this[this.mode_](y.pts,M),this.column_+=M.length)}};kt.prototype=new Hd,kt.prototype.flushDisplayed=function(h){const g=v=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+v+"."})},y=[];this.displayed_.forEach((v,_)=>{if(v&&v.text&&v.text.length){try{v.text=v.text.trim()}catch{g(_)}v.text.length&&y.push({text:v.text,line:_+1,position:10+Math.min(70,v.indent*10)+v.offset*2.5})}else v==null&&g(_)}),y.length&&this.trigger("data",{startPts:this.startPts_,endPts:h,content:y,stream:this.name_})},kt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=si(),this.nonDisplayed_=si(),this.lastControlCode_=null,this.column_=0,this.row_=jo,this.rollUpRows_=2,this.formatting_=[]},kt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},kt.prototype.isSpecialCharacter=function(h,g){return h===this.EXT_&&g>=48&&g<=63},kt.prototype.isExtCharacter=function(h,g){return(h===this.EXT_+1||h===this.EXT_+2)&&g>=32&&g<=63},kt.prototype.isMidRowCode=function(h,g){return h===this.EXT_&&g>=32&&g<=47},kt.prototype.isOffsetControlCode=function(h,g){return h===this.OFFSET_&&g>=33&&g<=35},kt.prototype.isPAC=function(h,g){return h>=this.BASE_&&h<this.BASE_+8&&g>=64&&g<=127},kt.prototype.isColorPAC=function(h){return h>=64&&h<=79||h>=96&&h<=127},kt.prototype.isNormalChar=function(h){return h>=32&&h<=127},kt.prototype.setRollUp=function(h,g){if(this.mode_!=="rollUp"&&(this.row_=jo,this.mode_="rollUp",this.flushDisplayed(h),this.nonDisplayed_=si(),this.displayed_=si()),g!==void 0&&g!==this.row_)for(var y=0;y<this.rollUpRows_;y++)this.displayed_[g-y]=this.displayed_[this.row_-y],this.displayed_[this.row_-y]={text:"",indent:0,offset:0};g===void 0&&(g=this.row_),this.topRow_=g-this.rollUpRows_+1},kt.prototype.addFormatting=function(h,g){this.formatting_=this.formatting_.concat(g);var y=g.reduce(function(v,_){return v+"<"+_+">"},"");this[this.mode_](h,y)},kt.prototype.clearFormatting=function(h){if(this.formatting_.length){var g=this.formatting_.reverse().reduce(function(y,v){return y+"</"+v+">"},"");this.formatting_=[],this[this.mode_](h,g)}},kt.prototype.popOn=function(h,g){var y=this.nonDisplayed_[this.row_].text;y+=g,this.nonDisplayed_[this.row_].text=y},kt.prototype.rollUp=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y},kt.prototype.shiftRowsUp_=function(){var h;for(h=0;h<this.topRow_;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.row_+1;h<jo+1;h++)this.displayed_[h]={text:"",indent:0,offset:0};for(h=this.topRow_;h<this.row_;h++)this.displayed_[h]=this.displayed_[h+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},kt.prototype.paintOn=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y};var ku={CaptionStream:Ci,Cea608Stream:kt,Cea708Stream:_t},zo={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},jd=i,Fp=8589934592,Hp=4294967296,Va="shared",Ou=function(h,g){var y=1;for(h>g&&(y=-1);Math.abs(g-h)>Hp;)h+=y*Fp;return h},Ru=function(h){var g,y;Ru.prototype.init.call(this),this.type_=h||Va,this.push=function(v){if(v.type==="metadata"){this.trigger("data",v);return}this.type_!==Va&&v.type!==this.type_||(y===void 0&&(y=v.dts),v.dts=Ou(v.dts,y),v.pts=Ou(v.pts,y),g=v.dts,this.trigger("data",v))},this.flush=function(){y=g,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){y=void 0,g=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ru.prototype=new jd;var zd={TimestampRolloverStream:Ru,handleRollover:Ou},jp=(h,g,y)=>{if(!h)return-1;for(var v=y;v<h.length;v++)if(h[v]===g)return v;return-1},zp={typedArrayIndexOf:jp},vi=zp.typedArrayIndexOf,Ss={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},ea=function(h,g,y){var v,_="";for(v=g;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},Br=function(h,g,y){return decodeURIComponent(ea(h,g,y))},xs=function(h,g,y){return unescape(ea(h,g,y))},ta=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},qa={APIC:function(h){var g=1,y,v,_="-->";h.data[0]===Ss.Utf8&&(y=vi(h.data,0,g),!(y<0)&&(h.mimeType=xs(h.data,g,y),g=y+1,h.pictureType=h.data[g],g++,v=vi(h.data,0,g),!(v<0)&&(h.description=Br(h.data,g,v),g=v+1,h.mimeType===_?h.url=xs(h.data,g,h.data.length):h.pictureData=h.data.subarray(g,h.data.length))))},"T*":function(h){h.data[0]===Ss.Utf8&&(h.value=Br(h.data,1,h.data.length).replace(/\0*$/,""),h.values=h.value.split("\0"))},TXXX:function(h){var g;h.data[0]===Ss.Utf8&&(g=vi(h.data,0,1),g!==-1&&(h.description=Br(h.data,1,g),h.value=Br(h.data,g+1,h.data.length).replace(/\0*$/,""),h.data=h.value))},"W*":function(h){h.url=xs(h.data,0,h.data.length).replace(/\0.*$/,"")},WXXX:function(h){var g;h.data[0]===Ss.Utf8&&(g=vi(h.data,0,1),g!==-1&&(h.description=Br(h.data,1,g),h.url=xs(h.data,g+1,h.data.length).replace(/\0.*$/,"")))},PRIV:function(h){var g;for(g=0;g<h.data.length;g++)if(h.data[g]===0){h.owner=xs(h.data,0,g);break}h.privateData=h.data.subarray(g+1),h.data=h.privateData}},Vo=function(h){var g,y,v=10,_=0,x=[];if(!(h.length<10||h[0]!=="I".charCodeAt(0)||h[1]!=="D".charCodeAt(0)||h[2]!=="3".charCodeAt(0))){_=ta(h.subarray(6,10)),_+=10;var k=h[5]&64;k&&(v+=4,v+=ta(h.subarray(10,14)),_-=ta(h.subarray(16,20)));do{if(g=ta(h.subarray(v+4,v+8)),g<1)break;y=String.fromCharCode(h[v],h[v+1],h[v+2],h[v+3]);var M={id:y,data:h.subarray(v+10,v+g+10)};M.key=M.id,qa[M.id]?qa[M.id](M):M.id[0]==="T"?qa["T*"](M):M.id[0]==="W"&&qa["W*"](M),x.push(M),v+=10,v+=g}while(v<_);return x}},$a={parseId3Frames:Vo,parseSyncSafeInteger:ta,frameParsers:qa},Vd=i,zy=zo,ia=$a,qo;qo=function(h){var g={descriptor:h&&h.descriptor},y=0,v=[],_=0,x;if(qo.prototype.init.call(this),this.dispatchType=zy.METADATA_STREAM_TYPE.toString(16),g.descriptor)for(x=0;x<g.descriptor.length;x++)this.dispatchType+=("00"+g.descriptor[x].toString(16)).slice(-2);this.push=function(k){var M,P,U,V,ee,_e;if(k.type==="timed-metadata"){if(k.dataAlignmentIndicator&&(_=0,v.length=0),v.length===0&&(k.data.length<10||k.data[0]!=="I".charCodeAt(0)||k.data[1]!=="D".charCodeAt(0)||k.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(v.push(k),_+=k.data.byteLength,v.length===1&&(y=ia.parseSyncSafeInteger(k.data.subarray(6,10)),y+=10),!(_<y)){for(M={data:new Uint8Array(y),frames:[],pts:v[0].pts,dts:v[0].dts},ee=0;ee<y;)M.data.set(v[0].data.subarray(0,y-ee),ee),ee+=v[0].data.byteLength,_-=v[0].data.byteLength,v.shift();P=10,M.data[5]&64&&(P+=4,P+=ia.parseSyncSafeInteger(M.data.subarray(10,14)),y-=ia.parseSyncSafeInteger(M.data.subarray(16,20)));do{if(U=ia.parseSyncSafeInteger(M.data.subarray(P+4,P+8)),U<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(_e=String.fromCharCode(M.data[P],M.data[P+1],M.data[P+2],M.data[P+3]),V={id:_e,data:M.data.subarray(P+10,P+U+10)},V.key=V.id,ia.frameParsers[V.id]?ia.frameParsers[V.id](V):V.id[0]==="T"?ia.frameParsers["T*"](V):V.id[0]==="W"&&ia.frameParsers["W*"](V),V.owner==="com.apple.streaming.transportStreamTimestamp"){var oe=V.data,Ne=(oe[3]&1)<<30|oe[4]<<22|oe[5]<<14|oe[6]<<6|oe[7]>>>2;Ne*=4,Ne+=oe[7]&3,V.timeStamp=Ne,M.pts===void 0&&M.dts===void 0&&(M.pts=V.timeStamp,M.dts=V.timeStamp),this.trigger("timestamp",V)}M.frames.push(V),P+=10,P+=U}while(P<y);this.trigger("data",M)}}}},qo.prototype=new Vd;var qd=qo,$o=i,Mu=ku,bn=zo,Vp=zd.TimestampRolloverStream,Lu,Fr,Hr,Es=188,Ga=71;Lu=function(){var h=new Uint8Array(Es),g=0;Lu.prototype.init.call(this),this.push=function(y){var v=0,_=Es,x;for(g?(x=new Uint8Array(y.byteLength+g),x.set(h.subarray(0,g)),x.set(y,g),g=0):x=y;_<x.byteLength;){if(x[v]===Ga&&x[_]===Ga){this.trigger("data",x.subarray(v,_)),v+=Es,_+=Es;continue}v++,_++}v<x.byteLength&&(h.set(x.subarray(v),0),g=x.byteLength-v)},this.flush=function(){g===Es&&h[0]===Ga&&(this.trigger("data",h),g=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){g=0,this.trigger("reset")}},Lu.prototype=new $o,Fr=function(){var h,g,y,v;Fr.prototype.init.call(this),v=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(_,x){var k=0;x.payloadUnitStartIndicator&&(k+=_[k]+1),x.type==="pat"?g(_.subarray(k),x):y(_.subarray(k),x)},g=function(_,x){x.section_number=_[7],x.last_section_number=_[8],v.pmtPid=(_[10]&31)<<8|_[11],x.pmtPid=v.pmtPid},y=function(_,x){var k,M,P,U;if(_[5]&1){for(v.programMapTable={video:null,audio:null,"timed-metadata":{}},k=(_[1]&15)<<8|_[2],M=3+k-4,P=(_[10]&15)<<8|_[11],U=12+P;U<M;){var V=_[U],ee=(_[U+1]&31)<<8|_[U+2];V===bn.H264_STREAM_TYPE&&v.programMapTable.video===null?v.programMapTable.video=ee:V===bn.ADTS_STREAM_TYPE&&v.programMapTable.audio===null?v.programMapTable.audio=ee:V===bn.METADATA_STREAM_TYPE&&(v.programMapTable["timed-metadata"][ee]=V),U+=((_[U+3]&15)<<8|_[U+4])+5}x.programMapTable=v.programMapTable}},this.push=function(_){var x={},k=4;if(x.payloadUnitStartIndicator=!!(_[1]&64),x.pid=_[1]&31,x.pid<<=8,x.pid|=_[2],(_[3]&48)>>>4>1&&(k+=_[k]+1),x.pid===0)x.type="pat",h(_.subarray(k),x),this.trigger("data",x);else if(x.pid===this.pmtPid)for(x.type="pmt",h(_.subarray(k),x),this.trigger("data",x);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([_,k,x]):this.processPes_(_,k,x)},this.processPes_=function(_,x,k){k.pid===this.programMapTable.video?k.streamType=bn.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?k.streamType=bn.ADTS_STREAM_TYPE:k.streamType=this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(x),this.trigger("data",k)}},Fr.prototype=new $o,Fr.STREAM_TYPES={h264:27,adts:15},Hr=function(){var h=this,g=!1,y={data:[],size:0},v={data:[],size:0},_={data:[],size:0},x,k=function(P,U){var V;const ee=P[0]<<16|P[1]<<8|P[2];U.data=new Uint8Array,ee===1&&(U.packetLength=6+(P[4]<<8|P[5]),U.dataAlignmentIndicator=(P[6]&4)!==0,V=P[7],V&192&&(U.pts=(P[9]&14)<<27|(P[10]&255)<<20|(P[11]&254)<<12|(P[12]&255)<<5|(P[13]&254)>>>3,U.pts*=4,U.pts+=(P[13]&6)>>>1,U.dts=U.pts,V&64&&(U.dts=(P[14]&14)<<27|(P[15]&255)<<20|(P[16]&254)<<12|(P[17]&255)<<5|(P[18]&254)>>>3,U.dts*=4,U.dts+=(P[18]&6)>>>1)),U.data=P.subarray(9+P[8]))},M=function(P,U,V){var ee=new Uint8Array(P.size),_e={type:U},oe=0,Ne=0,Fe=!1,Gt;if(!(!P.data.length||P.size<9)){for(_e.trackId=P.data[0].pid,oe=0;oe<P.data.length;oe++)Gt=P.data[oe],ee.set(Gt.data,Ne),Ne+=Gt.data.byteLength;k(ee,_e),Fe=U==="video"||_e.packetLength<=P.size,(V||Fe)&&(P.size=0,P.data.length=0),Fe&&h.trigger("data",_e)}};Hr.prototype.init.call(this),this.push=function(P){({pat:function(){},pes:function(){var U,V;switch(P.streamType){case bn.H264_STREAM_TYPE:U=y,V="video";break;case bn.ADTS_STREAM_TYPE:U=v,V="audio";break;case bn.METADATA_STREAM_TYPE:U=_,V="timed-metadata";break;default:return}P.payloadUnitStartIndicator&&M(U,V,!0),U.data.push(P),U.size+=P.data.byteLength},pmt:function(){var U={type:"metadata",tracks:[]};x=P.programMapTable,x.video!==null&&U.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.video,codec:"avc",type:"video"}),x.audio!==null&&U.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.audio,codec:"adts",type:"audio"}),g=!0,h.trigger("data",U)}})[P.type]()},this.reset=function(){y.size=0,y.data.length=0,v.size=0,v.data.length=0,this.trigger("reset")},this.flushStreams_=function(){M(y,"video"),M(v,"audio"),M(_,"timed-metadata")},this.flush=function(){if(!g&&x){var P={type:"metadata",tracks:[]};x.video!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.video,codec:"avc",type:"video"}),x.audio!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+x.audio,codec:"adts",type:"audio"}),h.trigger("data",P)}g=!1,this.flushStreams_(),this.trigger("done")}},Hr.prototype=new $o;var qp={PAT_PID:0,MP2T_PACKET_LENGTH:Es,TransportPacketStream:Lu,TransportParseStream:Fr,ElementaryStream:Hr,TimestampRolloverStream:Vp,CaptionStream:Mu.CaptionStream,Cea608Stream:Mu.Cea608Stream,Cea708Stream:Mu.Cea708Stream,MetadataStream:qd};for(var Iu in bn)bn.hasOwnProperty(Iu)&&(qp[Iu]=bn[Iu]);var $p=qp,Go=i,Gp=dt.ONE_SECOND_IN_TS,Pu,Xp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Pu=function(h){var g,y=0;Pu.prototype.init.call(this),this.skipWarn_=function(v,_){this.trigger("log",{level:"warn",message:`adts skiping bytes ${v} to ${_} in frame ${y} outside syncword`})},this.push=function(v){var _=0,x,k,M,P,U;if(h||(y=0),v.type==="audio"){g&&g.length?(M=g,g=new Uint8Array(M.byteLength+v.data.byteLength),g.set(M),g.set(v.data,M.byteLength)):g=v.data;for(var V;_+7<g.length;){if(g[_]!==255||(g[_+1]&246)!==240){typeof V!="number"&&(V=_),_++;continue}if(typeof V=="number"&&(this.skipWarn_(V,_),V=null),k=(~g[_+1]&1)*2,x=(g[_+3]&3)<<11|g[_+4]<<3|(g[_+5]&224)>>5,P=((g[_+6]&3)+1)*1024,U=P*Gp/Xp[(g[_+2]&60)>>>2],g.byteLength-_<x)break;this.trigger("data",{pts:v.pts+y*U,dts:v.dts+y*U,sampleCount:P,audioobjecttype:(g[_+2]>>>6&3)+1,channelcount:(g[_+2]&1)<<2|(g[_+3]&192)>>>6,samplerate:Xp[(g[_+2]&60)>>>2],samplingfrequencyindex:(g[_+2]&60)>>>2,samplesize:16,data:g.subarray(_+7+k,_+x)}),y++,_+=x}typeof V=="number"&&(this.skipWarn_(V,_),V=null),g=g.subarray(_)}},this.flush=function(){y=0,this.trigger("done")},this.reset=function(){g=void 0,this.trigger("reset")},this.endTimeline=function(){g=void 0,this.trigger("endedtimeline")}},Pu.prototype=new Go;var Vy=Pu,Yp;Yp=function(h){var g=h.byteLength,y=0,v=0;this.length=function(){return 8*g},this.bitsAvailable=function(){return 8*g+v},this.loadWord=function(){var _=h.byteLength-g,x=new Uint8Array(4),k=Math.min(4,g);if(k===0)throw new Error("no bytes available");x.set(h.subarray(_,_+k)),y=new DataView(x.buffer).getUint32(0),v=k*8,g-=k},this.skipBits=function(_){var x;v>_?(y<<=_,v-=_):(_-=v,x=Math.floor(_/8),_-=x*8,g-=x,this.loadWord(),y<<=_,v-=_)},this.readBits=function(_){var x=Math.min(v,_),k=y>>>32-x;return v-=x,v>0?y<<=x:g>0&&this.loadWord(),x=_-x,x>0?k<<x|this.readBits(x):k},this.skipLeadingZeros=function(){var _;for(_=0;_<v;++_)if(y&2147483648>>>_)return y<<=_,v-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Xo=Yp,Nu=i,Wp=Xo,Yo,Cs,$d;Cs=function(){var h=0,g,y;Cs.prototype.init.call(this),this.push=function(v){var _;y?(_=new Uint8Array(y.byteLength+v.data.byteLength),_.set(y),_.set(v.data,y.byteLength),y=_):y=v.data;for(var x=y.byteLength;h<x-3;h++)if(y[h+2]===1){g=h+5;break}for(;g<x;)switch(y[g]){case 0:if(y[g-1]!==0){g+=2;break}else if(y[g-2]!==0){g++;break}h+3!==g-2&&this.trigger("data",y.subarray(h+3,g-2));do g++;while(y[g]!==1&&g<x);h=g-2,g+=3;break;case 1:if(y[g-1]!==0||y[g-2]!==0){g+=3;break}this.trigger("data",y.subarray(h+3,g-2)),h=g-2,g+=3;break;default:g+=3;break}y=y.subarray(h),g-=h,h=0},this.reset=function(){y=null,h=0,this.trigger("reset")},this.flush=function(){y&&y.byteLength>3&&this.trigger("data",y.subarray(h+3)),y=null,h=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Cs.prototype=new Nu,$d={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Yo=function(){var h=new Cs,g,y,v,_,x,k,M;Yo.prototype.init.call(this),g=this,this.push=function(P){P.type==="video"&&(y=P.trackId,v=P.pts,_=P.dts,h.push(P))},h.on("data",function(P){var U={trackId:y,pts:v,dts:_,data:P,nalUnitTypeCode:P[0]&31};switch(U.nalUnitTypeCode){case 5:U.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:U.nalUnitType="sei_rbsp",U.escapedRBSP=x(P.subarray(1));break;case 7:U.nalUnitType="seq_parameter_set_rbsp",U.escapedRBSP=x(P.subarray(1)),U.config=k(U.escapedRBSP);break;case 8:U.nalUnitType="pic_parameter_set_rbsp";break;case 9:U.nalUnitType="access_unit_delimiter_rbsp";break}g.trigger("data",U)}),h.on("done",function(){g.trigger("done")}),h.on("partialdone",function(){g.trigger("partialdone")}),h.on("reset",function(){g.trigger("reset")}),h.on("endedtimeline",function(){g.trigger("endedtimeline")}),this.flush=function(){h.flush()},this.partialFlush=function(){h.partialFlush()},this.reset=function(){h.reset()},this.endTimeline=function(){h.endTimeline()},M=function(P,U){var V=8,ee=8,_e,oe;for(_e=0;_e<P;_e++)ee!==0&&(oe=U.readExpGolomb(),ee=(V+oe+256)%256),V=ee===0?V:ee},x=function(P){for(var U=P.byteLength,V=[],ee=1,_e,oe;ee<U-2;)P[ee]===0&&P[ee+1]===0&&P[ee+2]===3?(V.push(ee+2),ee+=2):ee++;if(V.length===0)return P;_e=U-V.length,oe=new Uint8Array(_e);var Ne=0;for(ee=0;ee<_e;Ne++,ee++)Ne===V[0]&&(Ne++,V.shift()),oe[ee]=P[Ne];return oe},k=function(P){var U=0,V=0,ee=0,_e=0,oe,Ne,Fe,Gt,bi,ts,fa,tr,Wr,Qr,Kr,Ct=[1,1],Zr,tn;if(oe=new Wp(P),Ne=oe.readUnsignedByte(),Gt=oe.readUnsignedByte(),Fe=oe.readUnsignedByte(),oe.skipUnsignedExpGolomb(),$d[Ne]&&(bi=oe.readUnsignedExpGolomb(),bi===3&&oe.skipBits(1),oe.skipUnsignedExpGolomb(),oe.skipUnsignedExpGolomb(),oe.skipBits(1),oe.readBoolean()))for(Kr=bi!==3?8:12,tn=0;tn<Kr;tn++)oe.readBoolean()&&(tn<6?M(16,oe):M(64,oe));if(oe.skipUnsignedExpGolomb(),ts=oe.readUnsignedExpGolomb(),ts===0)oe.readUnsignedExpGolomb();else if(ts===1)for(oe.skipBits(1),oe.skipExpGolomb(),oe.skipExpGolomb(),fa=oe.readUnsignedExpGolomb(),tn=0;tn<fa;tn++)oe.skipExpGolomb();if(oe.skipUnsignedExpGolomb(),oe.skipBits(1),tr=oe.readUnsignedExpGolomb(),Wr=oe.readUnsignedExpGolomb(),Qr=oe.readBits(1),Qr===0&&oe.skipBits(1),oe.skipBits(1),oe.readBoolean()&&(U=oe.readUnsignedExpGolomb(),V=oe.readUnsignedExpGolomb(),ee=oe.readUnsignedExpGolomb(),_e=oe.readUnsignedExpGolomb()),oe.readBoolean()&&oe.readBoolean()){switch(Zr=oe.readUnsignedByte(),Zr){case 1:Ct=[1,1];break;case 2:Ct=[12,11];break;case 3:Ct=[10,11];break;case 4:Ct=[16,11];break;case 5:Ct=[40,33];break;case 6:Ct=[24,11];break;case 7:Ct=[20,11];break;case 8:Ct=[32,11];break;case 9:Ct=[80,33];break;case 10:Ct=[18,11];break;case 11:Ct=[15,11];break;case 12:Ct=[64,33];break;case 13:Ct=[160,99];break;case 14:Ct=[4,3];break;case 15:Ct=[3,2];break;case 16:Ct=[2,1];break;case 255:{Ct=[oe.readUnsignedByte()<<8|oe.readUnsignedByte(),oe.readUnsignedByte()<<8|oe.readUnsignedByte()];break}}Ct&&Ct[0]/Ct[1]}return{profileIdc:Ne,levelIdc:Fe,profileCompatibility:Gt,width:(tr+1)*16-U*2-V*2,height:(2-Qr)*(Wr+1)*16-ee*2-_e*2,sarRatio:Ct}}},Yo.prototype=new Nu;var Uu={H264Stream:Yo,NalByteStream:Cs},Bu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Gd=function(h,g){var y=h[g+6]<<21|h[g+7]<<14|h[g+8]<<7|h[g+9],v=h[g+5],_=(v&16)>>4;return y=y>=0?y:0,_?y+20:y+10},wi=function(h,g){return h.length-g<10||h[g]!=="I".charCodeAt(0)||h[g+1]!=="D".charCodeAt(0)||h[g+2]!=="3".charCodeAt(0)?g:(g+=Gd(h,g),wi(h,g))},qy=function(h){var g=wi(h,0);return h.length>=g+2&&(h[g]&255)===255&&(h[g+1]&240)===240&&(h[g+1]&22)===16},Fu=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Qp=function(h,g,y){var v,_="";for(v=g;v<y;v++)_+="%"+("00"+h[v].toString(16)).slice(-2);return _},Kp=function(h,g,y){return unescape(Qp(h,g,y))},$y=function(h,g){var y=(h[g+5]&224)>>5,v=h[g+4]<<3,_=h[g+3]&6144;return _|v|y},Gy=function(h,g){return h[g]==="I".charCodeAt(0)&&h[g+1]==="D".charCodeAt(0)&&h[g+2]==="3".charCodeAt(0)?"timed-metadata":h[g]&!0&&(h[g+1]&240)===240?"audio":null},Zp=function(h){for(var g=0;g+5<h.length;){if(h[g]!==255||(h[g+1]&246)!==240){g++;continue}return Bu[(h[g+2]&60)>>>2]}return null},Xy=function(h){var g,y,v,_;g=10,h[5]&64&&(g+=4,g+=Fu(h.subarray(10,14)));do{if(y=Fu(h.subarray(g+4,g+8)),y<1)return null;if(_=String.fromCharCode(h[g],h[g+1],h[g+2],h[g+3]),_==="PRIV"){v=h.subarray(g+10,g+y+10);for(var x=0;x<v.byteLength;x++)if(v[x]===0){var k=Kp(v,0,x);if(k==="com.apple.streaming.transportStreamTimestamp"){var M=v.subarray(x+1),P=(M[3]&1)<<30|M[4]<<22|M[5]<<14|M[6]<<6|M[7]>>>2;return P*=4,P+=M[7]&3,P}break}}g+=10,g+=y}while(g<h.byteLength);return null},Hu={isLikelyAacData:qy,parseId3TagSize:Gd,parseAdtsSize:$y,parseType:Gy,parseSampleRate:Zp,parseAacTimestamp:Xy},Yy=i,Wo=Hu,Qo;Qo=function(){var h=new Uint8Array,g=0;Qo.prototype.init.call(this),this.setTimestamp=function(y){g=y},this.push=function(y){var v=0,_=0,x,k,M,P;for(h.length?(P=h.length,h=new Uint8Array(y.byteLength+P),h.set(h.subarray(0,P)),h.set(y,P)):h=y;h.length-_>=3;){if(h[_]==="I".charCodeAt(0)&&h[_+1]==="D".charCodeAt(0)&&h[_+2]==="3".charCodeAt(0)){if(h.length-_<10||(v=Wo.parseId3TagSize(h,_),_+v>h.length))break;k={type:"timed-metadata",data:h.subarray(_,_+v)},this.trigger("data",k),_+=v;continue}else if((h[_]&255)===255&&(h[_+1]&240)===240){if(h.length-_<7||(v=Wo.parseAdtsSize(h,_),_+v>h.length))break;M={type:"audio",data:h.subarray(_,_+v),pts:g,dts:g},this.trigger("data",M),_+=v;continue}_++}x=h.length-_,x>0?h=h.subarray(_):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},Qo.prototype=new Yy;var Jp=Qo,em=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Wy=em,Qy=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ky=Qy,ju=i,Ko=Ji,As=_s,Zo=Se,_n=qe,Zn=$p,Jo=dt,zu=Vy,tm=Uu.H264Stream,Xa=Jp,Ya=Hu.isLikelyAacData,Pn=dt.ONE_SECOND_IN_TS,Di=Wy,jr=Ky,na,sa,ui,aa,Vu=function(h,g){g.stream=h,this.trigger("log",g)},ra=function(h,g){for(var y=Object.keys(g),v=0;v<y.length;v++){var _=y[v];_==="headOfPipeline"||!g[_].on||g[_].on("log",Vu.bind(h,_))}},qu=function(h,g){var y;if(h.length!==g.length)return!1;for(y=0;y<h.length;y++)if(h[y]!==g[y])return!1;return!0},$u=function(h,g,y,v,_,x){var k=y-g,M=v-g,P=_-y;return{start:{dts:h,pts:h+k},end:{dts:h+M,pts:h+P},prependedContentDuration:x,baseMediaDecodeTime:h}};sa=function(h,g){var y=[],v,_=0,x=0,k=1/0;g=g||{},v=g.firstSequenceNumber||0,sa.prototype.init.call(this),this.push=function(M){_n.collectDtsInfo(h,M),h&&Di.forEach(function(P){h[P]=M[P]}),y.push(M)},this.setEarliestDts=function(M){_=M},this.setVideoBaseMediaDecodeTime=function(M){k=M},this.setAudioAppendStart=function(M){x=M},this.flush=function(){var M,P,U,V,ee,_e,oe;if(y.length===0){this.trigger("done","AudioSegmentStream");return}M=Zo.trimAdtsFramesByEarliestDts(y,h,_),h.baseMediaDecodeTime=_n.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),oe=Zo.prefixWithSilence(h,M,x,k),h.samples=Zo.generateSampleTable(M),U=Ko.mdat(Zo.concatenateFrameData(M)),y=[],P=Ko.moof(v,[h]),V=new Uint8Array(P.byteLength+U.byteLength),v++,V.set(P),V.set(U,P.byteLength),_n.clearDtsInfo(h),ee=Math.ceil(Pn*1024/h.samplerate),M.length&&(_e=M.length*ee,this.trigger("segmentTimingInfo",$u(Jo.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),M[0].dts,M[0].pts,M[0].dts+_e,M[0].pts+_e,oe||0)),this.trigger("timingInfo",{start:M[0].pts,end:M[0].pts+_e})),this.trigger("data",{track:h,boxes:V}),this.trigger("done","AudioSegmentStream")},this.reset=function(){_n.clearDtsInfo(h),y=[],this.trigger("reset")}},sa.prototype=new ju,na=function(h,g){var y,v=[],_=[],x,k;g=g||{},y=g.firstSequenceNumber||0,na.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(M){_n.collectDtsInfo(h,M),M.nalUnitType==="seq_parameter_set_rbsp"&&!x&&(x=M.config,h.sps=[M.data],jr.forEach(function(P){h[P]=x[P]},this)),M.nalUnitType==="pic_parameter_set_rbsp"&&!k&&(k=M.data,h.pps=[M.data]),v.push(M)},this.flush=function(){for(var M,P,U,V,ee,_e,oe=0,Ne,Fe;v.length&&v[0].nalUnitType!=="access_unit_delimiter_rbsp";)v.shift();if(v.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(M=As.groupNalsIntoFrames(v),U=As.groupFramesIntoGops(M),U[0][0].keyFrame||(P=this.getGopForFusion_(v[0],h),P?(oe=P.duration,U.unshift(P),U.byteLength+=P.byteLength,U.nalCount+=P.nalCount,U.pts=P.pts,U.dts=P.dts,U.duration+=P.duration):U=As.extendFirstKeyFrame(U)),_.length){var Gt;if(g.alignGopsAtEnd?Gt=this.alignGopsAtEnd_(U):Gt=this.alignGopsAtStart_(U),!Gt){this.gopCache_.unshift({gop:U.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}_n.clearDtsInfo(h),U=Gt}_n.collectDtsInfo(h,U),h.samples=As.generateSampleTable(U),ee=Ko.mdat(As.concatenateNalData(U)),h.baseMediaDecodeTime=_n.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),this.trigger("processedGopsInfo",U.map(function(bi){return{pts:bi.pts,dts:bi.dts,byteLength:bi.byteLength}})),Ne=U[0],Fe=U[U.length-1],this.trigger("segmentTimingInfo",$u(h.baseMediaDecodeTime,Ne.dts,Ne.pts,Fe.dts+Fe.duration,Fe.pts+Fe.duration,oe)),this.trigger("timingInfo",{start:U[0].pts,end:U[U.length-1].pts+U[U.length-1].duration}),this.gopCache_.unshift({gop:U.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.trigger("baseMediaDecodeTime",h.baseMediaDecodeTime),this.trigger("timelineStartInfo",h.timelineStartInfo),V=Ko.moof(y,[h]),_e=new Uint8Array(V.byteLength+ee.byteLength),y++,_e.set(V),_e.set(ee,V.byteLength),this.trigger("data",{track:h,boxes:_e}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),v=[],this.gopCache_.length=0,_.length=0,this.trigger("reset")},this.resetStream_=function(){_n.clearDtsInfo(h),x=void 0,k=void 0},this.getGopForFusion_=function(M){var P=45e3,U=1e4,V=1/0,ee,_e,oe,Ne,Fe;for(Fe=0;Fe<this.gopCache_.length;Fe++)Ne=this.gopCache_[Fe],oe=Ne.gop,!(!(h.pps&&qu(h.pps[0],Ne.pps[0]))||!(h.sps&&qu(h.sps[0],Ne.sps[0])))&&(oe.dts<h.timelineStartInfo.dts||(ee=M.dts-oe.dts-oe.duration,ee>=-U&&ee<=P&&(!_e||V>ee)&&(_e=Ne,V=ee)));return _e?_e.gop:null},this.alignGopsAtStart_=function(M){var P,U,V,ee,_e,oe,Ne,Fe;for(_e=M.byteLength,oe=M.nalCount,Ne=M.duration,P=U=0;P<_.length&&U<M.length&&(V=_[P],ee=M[U],V.pts!==ee.pts);){if(ee.pts>V.pts){P++;continue}U++,_e-=ee.byteLength,oe-=ee.nalCount,Ne-=ee.duration}return U===0?M:U===M.length?null:(Fe=M.slice(U),Fe.byteLength=_e,Fe.duration=Ne,Fe.nalCount=oe,Fe.pts=Fe[0].pts,Fe.dts=Fe[0].dts,Fe)},this.alignGopsAtEnd_=function(M){var P,U,V,ee,_e,oe;for(P=_.length-1,U=M.length-1,_e=null,oe=!1;P>=0&&U>=0;){if(V=_[P],ee=M[U],V.pts===ee.pts){oe=!0;break}if(V.pts>ee.pts){P--;continue}P===_.length-1&&(_e=U),U--}if(!oe&&_e===null)return null;var Ne;if(oe?Ne=U:Ne=_e,Ne===0)return M;var Fe=M.slice(Ne),Gt=Fe.reduce(function(bi,ts){return bi.byteLength+=ts.byteLength,bi.duration+=ts.duration,bi.nalCount+=ts.nalCount,bi},{byteLength:0,duration:0,nalCount:0});return Fe.byteLength=Gt.byteLength,Fe.duration=Gt.duration,Fe.nalCount=Gt.nalCount,Fe.pts=Fe[0].pts,Fe.dts=Fe[0].dts,Fe},this.alignGopsWith=function(M){_=M}},na.prototype=new ju,aa=function(h,g){this.numberOfTracks=0,this.metadataStream=g,h=h||{},typeof h.remux<"u"?this.remuxTracks=!!h.remux:this.remuxTracks=!0,typeof h.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=h.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,aa.prototype.init.call(this),this.push=function(y){if(y.content||y.text)return this.pendingCaptions.push(y);if(y.frames)return this.pendingMetadata.push(y);this.pendingTracks.push(y.track),this.pendingBytes+=y.boxes.byteLength,y.track.type==="video"&&(this.videoTrack=y.track,this.pendingBoxes.push(y.boxes)),y.track.type==="audio"&&(this.audioTrack=y.track,this.pendingBoxes.unshift(y.boxes))}},aa.prototype=new ju,aa.prototype.flush=function(h){var g=0,y={captions:[],captionStreams:{},metadata:[],info:{}},v,_,x,k=0,M;if(this.pendingTracks.length<this.numberOfTracks){if(h!=="VideoSegmentStream"&&h!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(k=this.videoTrack.timelineStartInfo.pts,jr.forEach(function(P){y.info[P]=this.videoTrack[P]},this)):this.audioTrack&&(k=this.audioTrack.timelineStartInfo.pts,Di.forEach(function(P){y.info[P]=this.audioTrack[P]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?y.type=this.pendingTracks[0].type:y.type="combined",this.emittedTracks+=this.pendingTracks.length,x=Ko.initSegment(this.pendingTracks),y.initSegment=new Uint8Array(x.byteLength),y.initSegment.set(x),y.data=new Uint8Array(this.pendingBytes),M=0;M<this.pendingBoxes.length;M++)y.data.set(this.pendingBoxes[M],g),g+=this.pendingBoxes[M].byteLength;for(M=0;M<this.pendingCaptions.length;M++)v=this.pendingCaptions[M],v.startTime=Jo.metadataTsToSeconds(v.startPts,k,this.keepOriginalTimestamps),v.endTime=Jo.metadataTsToSeconds(v.endPts,k,this.keepOriginalTimestamps),y.captionStreams[v.stream]=!0,y.captions.push(v);for(M=0;M<this.pendingMetadata.length;M++)_=this.pendingMetadata[M],_.cueTime=Jo.metadataTsToSeconds(_.pts,k,this.keepOriginalTimestamps),y.metadata.push(_);for(y.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",y),M=0;M<y.captions.length;M++)v=y.captions[M],this.trigger("caption",v);for(M=0;M<y.metadata.length;M++)_=y.metadata[M],this.trigger("id3Frame",_)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},aa.prototype.setRemux=function(h){this.remuxTracks=h},ui=function(h){var g=this,y=!0,v,_;ui.prototype.init.call(this),h=h||{},this.baseMediaDecodeTime=h.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var x={};this.transmuxPipeline_=x,x.type="aac",x.metadataStream=new Zn.MetadataStream,x.aacStream=new Xa,x.audioTimestampRolloverStream=new Zn.TimestampRolloverStream("audio"),x.timedMetadataTimestampRolloverStream=new Zn.TimestampRolloverStream("timed-metadata"),x.adtsStream=new zu,x.coalesceStream=new aa(h,x.metadataStream),x.headOfPipeline=x.aacStream,x.aacStream.pipe(x.audioTimestampRolloverStream).pipe(x.adtsStream),x.aacStream.pipe(x.timedMetadataTimestampRolloverStream).pipe(x.metadataStream).pipe(x.coalesceStream),x.metadataStream.on("timestamp",function(k){x.aacStream.setTimestamp(k.timeStamp)}),x.aacStream.on("data",function(k){k.type!=="timed-metadata"&&k.type!=="audio"||x.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:g.baseMediaDecodeTime},codec:"adts",type:"audio"},x.coalesceStream.numberOfTracks++,x.audioSegmentStream=new sa(_,h),x.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),x.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),x.adtsStream.pipe(x.audioSegmentStream).pipe(x.coalesceStream),g.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!v}))}),x.coalesceStream.on("data",this.trigger.bind(this,"data")),x.coalesceStream.on("done",this.trigger.bind(this,"done")),ra(this,x)},this.setupTsPipeline=function(){var x={};this.transmuxPipeline_=x,x.type="ts",x.metadataStream=new Zn.MetadataStream,x.packetStream=new Zn.TransportPacketStream,x.parseStream=new Zn.TransportParseStream,x.elementaryStream=new Zn.ElementaryStream,x.timestampRolloverStream=new Zn.TimestampRolloverStream,x.adtsStream=new zu,x.h264Stream=new tm,x.captionStream=new Zn.CaptionStream(h),x.coalesceStream=new aa(h,x.metadataStream),x.headOfPipeline=x.packetStream,x.packetStream.pipe(x.parseStream).pipe(x.elementaryStream).pipe(x.timestampRolloverStream),x.timestampRolloverStream.pipe(x.h264Stream),x.timestampRolloverStream.pipe(x.adtsStream),x.timestampRolloverStream.pipe(x.metadataStream).pipe(x.coalesceStream),x.h264Stream.pipe(x.captionStream).pipe(x.coalesceStream),x.elementaryStream.on("data",function(k){var M;if(k.type==="metadata"){for(M=k.tracks.length;M--;)!v&&k.tracks[M].type==="video"?(v=k.tracks[M],v.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime):!_&&k.tracks[M].type==="audio"&&(_=k.tracks[M],_.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime);v&&!x.videoSegmentStream&&(x.coalesceStream.numberOfTracks++,x.videoSegmentStream=new na(v,h),x.videoSegmentStream.on("log",g.getLogTrigger_("videoSegmentStream")),x.videoSegmentStream.on("timelineStartInfo",function(P){_&&!h.keepOriginalTimestamps&&(_.timelineStartInfo=P,x.audioSegmentStream.setEarliestDts(P.dts-g.baseMediaDecodeTime))}),x.videoSegmentStream.on("processedGopsInfo",g.trigger.bind(g,"gopInfo")),x.videoSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"videoSegmentTimingInfo")),x.videoSegmentStream.on("baseMediaDecodeTime",function(P){_&&x.audioSegmentStream.setVideoBaseMediaDecodeTime(P)}),x.videoSegmentStream.on("timingInfo",g.trigger.bind(g,"videoTimingInfo")),x.h264Stream.pipe(x.videoSegmentStream).pipe(x.coalesceStream)),_&&!x.audioSegmentStream&&(x.coalesceStream.numberOfTracks++,x.audioSegmentStream=new sa(_,h),x.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),x.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),x.audioSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"audioSegmentTimingInfo")),x.adtsStream.pipe(x.audioSegmentStream).pipe(x.coalesceStream)),g.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!v})}}),x.coalesceStream.on("data",this.trigger.bind(this,"data")),x.coalesceStream.on("id3Frame",function(k){k.dispatchType=x.metadataStream.dispatchType,g.trigger("id3Frame",k)}),x.coalesceStream.on("caption",this.trigger.bind(this,"caption")),x.coalesceStream.on("done",this.trigger.bind(this,"done")),ra(this,x)},this.setBaseMediaDecodeTime=function(x){var k=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=x),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,_n.clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),v&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,_n.clearDtsInfo(v),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(x){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(x)},this.setRemux=function(x){var k=this.transmuxPipeline_;h.remux=x,k&&k.coalesceStream&&k.coalesceStream.setRemux(x)},this.alignGopsWith=function(x){v&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(x)},this.getLogTrigger_=function(x){var k=this;return function(M){M.stream=x,k.trigger("log",M)}},this.push=function(x){if(y){var k=Ya(x);k&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!k&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),y=!1}this.transmuxPipeline_.headOfPipeline.push(x)},this.flush=function(){y=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ui.prototype=new ju;var im={Transmuxer:ui,VideoSegmentStream:na,AudioSegmentStream:sa,AUDIO_PROPERTIES:Di,VIDEO_PROPERTIES:jr,generateSegmentTimingInfo:$u},Xd=function(h){return h>>>0},Zy=function(h){return("00"+h.toString(16)).slice(-2)},zr={toUnsigned:Xd,toHexString:Zy},ws=function(h){var g="";return g+=String.fromCharCode(h[0]),g+=String.fromCharCode(h[1]),g+=String.fromCharCode(h[2]),g+=String.fromCharCode(h[3]),g},Gu=ws,Yd=zr.toUnsigned,Xu=Gu,oa=function(h,g){var y=[],v,_,x,k,M;if(!g.length)return null;for(v=0;v<h.byteLength;)_=Yd(h[v]<<24|h[v+1]<<16|h[v+2]<<8|h[v+3]),x=Xu(h.subarray(v+4,v+8)),k=_>1?v+_:h.byteLength,x===g[0]&&(g.length===1?y.push(h.subarray(v+8,k)):(M=oa(h.subarray(v+8,k),g.slice(1)),M.length&&(y=y.concat(M)))),v=k;return y},Vr=oa,Wd=zr.toUnsigned,Wa=u.getUint64,nm=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return g.version===1?g.baseMediaDecodeTime=Wa(h.subarray(4)):g.baseMediaDecodeTime=Wd(h[4]<<24|h[5]<<16|h[6]<<8|h[7]),g},el=nm,Qd=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:g.getUint32(4)},v=y.flags[2]&1,_=y.flags[2]&2,x=y.flags[2]&8,k=y.flags[2]&16,M=y.flags[2]&32,P=y.flags[0]&65536,U=y.flags[0]&131072,V;return V=8,v&&(V+=4,y.baseDataOffset=g.getUint32(12),V+=4),_&&(y.sampleDescriptionIndex=g.getUint32(V),V+=4),x&&(y.defaultSampleDuration=g.getUint32(V),V+=4),k&&(y.defaultSampleSize=g.getUint32(V),V+=4),M&&(y.defaultSampleFlags=g.getUint32(V)),P&&(y.durationIsEmpty=!0),!v&&U&&(y.baseDataOffsetIsMoof=!0),y},Ds=Qd,la=u.getUint64,Kd=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),references:[],referenceId:g.getUint32(4),timescale:g.getUint32(8)},v=12;y.version===0?(y.earliestPresentationTime=g.getUint32(v),y.firstOffset=g.getUint32(v+4),v+=8):(y.earliestPresentationTime=la(h.subarray(v)),y.firstOffset=la(h.subarray(v+8)),v+=16),v+=2;var _=g.getUint16(v);for(v+=2;_>0;v+=12,_--)y.references.push({referenceType:(h[v]&128)>>>7,referencedSize:g.getUint32(v)&2147483647,subsegmentDuration:g.getUint32(v+4),startsWithSap:!!(h[v+8]&128),sapType:(h[v+8]&112)>>>4,sapDeltaTime:g.getUint32(v+8)&268435455});return y},Qa=Kd,sm=function(h){return{isLeading:(h[0]&12)>>>2,dependsOn:h[0]&3,isDependedOn:(h[1]&192)>>>6,hasRedundancy:(h[1]&48)>>>4,paddingValue:(h[1]&14)>>>1,isNonSyncSample:h[1]&1,degradationPriority:h[2]<<8|h[3]}},am=sm,qr=am,tl=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y=new DataView(h.buffer,h.byteOffset,h.byteLength),v=g.flags[2]&1,_=g.flags[2]&4,x=g.flags[1]&1,k=g.flags[1]&2,M=g.flags[1]&4,P=g.flags[1]&8,U=y.getUint32(4),V=8,ee;for(v&&(g.dataOffset=y.getInt32(V),V+=4),_&&U&&(ee={flags:qr(h.subarray(V,V+4))},V+=4,x&&(ee.duration=y.getUint32(V),V+=4),k&&(ee.size=y.getUint32(V),V+=4),P&&(g.version===1?ee.compositionTimeOffset=y.getInt32(V):ee.compositionTimeOffset=y.getUint32(V),V+=4),g.samples.push(ee),U--);U--;)ee={},x&&(ee.duration=y.getUint32(V),V+=4),k&&(ee.size=y.getUint32(V),V+=4),M&&(ee.flags=qr(h.subarray(V,V+4)),V+=4),P&&(g.version===1?ee.compositionTimeOffset=y.getInt32(V):ee.compositionTimeOffset=y.getUint32(V),V+=4),g.samples.push(ee);return g},Zd=tl,il=u,Jd=il.getUint64,Jt,Jn,$t=function(h){return new Date(h*1e3-20828448e5)},Ka=Gu,eh=Vr,nl=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=[],v,_;for(v=0;v+4<h.length;v+=_){if(_=g.getUint32(v),v+=4,_<=0){y.push("<span style='color:red;'>MALFORMED DATA</span>");continue}switch(h[v]&31){case 1:y.push("slice_layer_without_partitioning_rbsp");break;case 5:y.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:y.push("sei_rbsp");break;case 7:y.push("seq_parameter_set_rbsp");break;case 8:y.push("pic_parameter_set_rbsp");break;case 9:y.push("access_unit_delimiter_rbsp");break;default:y.push("UNKNOWN NAL - "+h[v]&31);break}}return y},Nn={avc1:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{dataReferenceIndex:g.getUint16(6),width:g.getUint16(24),height:g.getUint16(26),horizresolution:g.getUint16(28)+g.getUint16(30)/16,vertresolution:g.getUint16(32)+g.getUint16(34)/16,frameCount:g.getUint16(40),depth:g.getUint16(74),config:Jt(h.subarray(78,h.byteLength))}},avcC:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={configurationVersion:h[0],avcProfileIndication:h[1],profileCompatibility:h[2],avcLevelIndication:h[3],lengthSizeMinusOne:h[4]&3,sps:[],pps:[]},v=h[5]&31,_,x,k,M;for(k=6,M=0;M<v;M++)x=g.getUint16(k),k+=2,y.sps.push(new Uint8Array(h.subarray(k,k+x))),k+=x;for(_=h[k],k++,M=0;M<_;M++)x=g.getUint16(k),k+=2,y.pps.push(new Uint8Array(h.subarray(k,k+x))),k+=x;return y},btrt:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{bufferSizeDB:g.getUint32(0),maxBitrate:g.getUint32(4),avgBitrate:g.getUint32(8)}},edts:function(g){return{boxes:Jt(g)}},elst:function(g){var y=new DataView(g.buffer,g.byteOffset,g.byteLength),v={version:y.getUint8(0),flags:new Uint8Array(g.subarray(1,4)),edits:[]},_=y.getUint32(4),x;for(x=8;_;_--)v.version===0?(v.edits.push({segmentDuration:y.getUint32(x),mediaTime:y.getInt32(x+4),mediaRate:y.getUint16(x+8)+y.getUint16(x+10)/(256*256)}),x+=12):(v.edits.push({segmentDuration:Jd(g.subarray(x)),mediaTime:Jd(g.subarray(x+8)),mediaRate:y.getUint16(x+16)+y.getUint16(x+18)/(256*256)}),x+=20);return v},esds:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),esId:h[6]<<8|h[7],streamPriority:h[8]&31,decoderConfig:{objectProfileIndication:h[11],streamType:h[12]>>>2&63,bufferSize:h[13]<<16|h[14]<<8|h[15],maxBitrate:h[16]<<24|h[17]<<16|h[18]<<8|h[19],avgBitrate:h[20]<<24|h[21]<<16|h[22]<<8|h[23],decoderConfigDescriptor:{tag:h[24],length:h[25],audioObjectType:h[26]>>>3&31,samplingFrequencyIndex:(h[26]&7)<<1|h[27]>>>7&1,channelConfiguration:h[27]>>>3&15}}}},ftyp:function(h){for(var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={majorBrand:Ka(h.subarray(0,4)),minorVersion:g.getUint32(4),compatibleBrands:[]},v=8;v<h.byteLength;)y.compatibleBrands.push(Ka(h.subarray(v,v+4))),v+=4;return y},dinf:function(h){return{boxes:Jt(h)}},dref:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),dataReferences:Jt(h.subarray(8))}},hdlr:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),handlerType:Ka(h.subarray(8,12)),name:""},v=8;for(v=24;v<h.byteLength;v++){if(h[v]===0){v++;break}y.name+=String.fromCharCode(h[v])}return y.name=decodeURIComponent(escape(y.name)),y},mdat:function(h){return{byteLength:h.byteLength,nals:nl(h)}},mdhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v,_={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),language:""};return _.version===1?(y+=4,_.creationTime=$t(g.getUint32(y)),y+=8,_.modificationTime=$t(g.getUint32(y)),y+=4,_.timescale=g.getUint32(y),y+=8,_.duration=g.getUint32(y)):(_.creationTime=$t(g.getUint32(y)),y+=4,_.modificationTime=$t(g.getUint32(y)),y+=4,_.timescale=g.getUint32(y),y+=4,_.duration=g.getUint32(y)),y+=4,v=g.getUint16(y),_.language+=String.fromCharCode((v>>10)+96),_.language+=String.fromCharCode(((v&992)>>5)+96),_.language+=String.fromCharCode((v&31)+96),_},mdia:function(h){return{boxes:Jt(h)}},mfhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sequenceNumber:h[4]<<24|h[5]<<16|h[6]<<8|h[7]}},minf:function(h){return{boxes:Jt(h)}},mp4a:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={dataReferenceIndex:g.getUint16(6),channelcount:g.getUint16(16),samplesize:g.getUint16(18),samplerate:g.getUint16(24)+g.getUint16(26)/65536};return h.byteLength>28&&(y.streamDescriptor=Jt(h.subarray(28))[0]),y},moof:function(h){return{boxes:Jt(h)}},moov:function(h){return{boxes:Jt(h)}},mvex:function(h){return{boxes:Jt(h)}},mvhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=$t(g.getUint32(y)),y+=8,v.modificationTime=$t(g.getUint32(y)),y+=4,v.timescale=g.getUint32(y),y+=8,v.duration=g.getUint32(y)):(v.creationTime=$t(g.getUint32(y)),y+=4,v.modificationTime=$t(g.getUint32(y)),y+=4,v.timescale=g.getUint32(y),y+=4,v.duration=g.getUint32(y)),y+=4,v.rate=g.getUint16(y)+g.getUint16(y+2)/16,y+=4,v.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,y+=2*4,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,y+=6*4,v.nextTrackId=g.getUint32(y),v},pdin:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),rate:g.getUint32(4),initialDelay:g.getUint32(8)}},sdtp:function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y;for(y=4;y<h.byteLength;y++)g.samples.push({dependsOn:(h[y]&48)>>4,isDependedOn:(h[y]&12)>>2,hasRedundancy:h[y]&3});return g},sidx:Qa,smhd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),balance:h[4]+h[5]/256}},stbl:function(h){return{boxes:Jt(h)}},ctts:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),compositionOffsets:[]},v=g.getUint32(4),_;for(_=8;v;_+=8,v--)y.compositionOffsets.push({sampleCount:g.getUint32(_),sampleOffset:g[y.version===0?"getUint32":"getInt32"](_+4)});return y},stss:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),syncSamples:[]},v=g.getUint32(4),_;for(_=8;v;_+=4,v--)y.syncSamples.push(g.getUint32(_));return y},stco:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),chunkOffsets:[]},v=g.getUint32(4),_;for(_=8;v;_+=4,v--)y.chunkOffsets.push(g.getUint32(_));return y},stsc:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=g.getUint32(4),v={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleToChunks:[]},_;for(_=8;y;_+=12,y--)v.sampleToChunks.push({firstChunk:g.getUint32(_),samplesPerChunk:g.getUint32(_+4),sampleDescriptionIndex:g.getUint32(_+8)});return v},stsd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleDescriptions:Jt(h.subarray(8))}},stsz:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleSize:g.getUint32(4),entries:[]},v;for(v=12;v<h.byteLength;v+=4)y.entries.push(g.getUint32(v));return y},stts:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),timeToSamples:[]},v=g.getUint32(4),_;for(_=8;v;_+=8,v--)y.timeToSamples.push({sampleCount:g.getUint32(_),sampleDelta:g.getUint32(_+4)});return y},styp:function(h){return Nn.ftyp(h)},tfdt:el,tfhd:Ds,tkhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4))};return v.version===1?(y+=4,v.creationTime=$t(g.getUint32(y)),y+=8,v.modificationTime=$t(g.getUint32(y)),y+=4,v.trackId=g.getUint32(y),y+=4,y+=8,v.duration=g.getUint32(y)):(v.creationTime=$t(g.getUint32(y)),y+=4,v.modificationTime=$t(g.getUint32(y)),y+=4,v.trackId=g.getUint32(y),y+=4,y+=4,v.duration=g.getUint32(y)),y+=4,y+=2*4,v.layer=g.getUint16(y),y+=2,v.alternateGroup=g.getUint16(y),y+=2,v.volume=g.getUint8(y)+g.getUint8(y+1)/8,y+=2,y+=2,v.matrix=new Uint32Array(h.subarray(y,y+9*4)),y+=9*4,v.width=g.getUint16(y)+g.getUint16(y+2)/65536,y+=4,v.height=g.getUint16(y)+g.getUint16(y+2)/65536,v},traf:function(h){return{boxes:Jt(h)}},trak:function(h){return{boxes:Jt(h)}},trex:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:g.getUint32(4),defaultSampleDescriptionIndex:g.getUint32(8),defaultSampleDuration:g.getUint32(12),defaultSampleSize:g.getUint32(16),sampleDependsOn:h[20]&3,sampleIsDependedOn:(h[21]&192)>>6,sampleHasRedundancy:(h[21]&48)>>4,samplePaddingValue:(h[21]&14)>>1,sampleIsDifferenceSample:!!(h[21]&1),sampleDegradationPriority:g.getUint16(22)}},trun:Zd,"url ":function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4))}},vmhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength);return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),graphicsmode:g.getUint16(4),opcolor:new Uint16Array([g.getUint16(6),g.getUint16(8),g.getUint16(10)])}}};Jt=function(h){for(var g=0,y=[],v,_,x,k,M,P=new ArrayBuffer(h.length),U=new Uint8Array(P),V=0;V<h.length;++V)U[V]=h[V];for(v=new DataView(P);g<h.byteLength;)_=v.getUint32(g),x=Ka(h.subarray(g+4,g+8)),k=_>1?g+_:h.byteLength,M=(Nn[x]||function(ee){return{data:ee}})(h.subarray(g+8,k)),M.size=_,M.type=x,y.push(M),g=k;return y},Jn=function(h,g){var y;return g=g||0,y=new Array(g*2+1).join(" "),h.map(function(v,_){return y+v.type+`
`+Object.keys(v).filter(function(x){return x!=="type"&&x!=="boxes"}).map(function(x){var k=y+" "+x+": ",M=v[x];if(M instanceof Uint8Array||M instanceof Uint32Array){var P=Array.prototype.slice.call(new Uint8Array(M.buffer,M.byteOffset,M.byteLength)).map(function(U){return" "+("00"+U.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return P?P.length===1?k+"<"+P.join("").slice(1)+">":k+`<
`+P.map(function(U){return y+" "+U}).join(`
`)+`
`+y+" >":k+"<>"}return k+JSON.stringify(M,null,2).split(`
`).map(function(U,V){return V===0?U:y+" "+U}).join(`
`)}).join(`
`)+(v.boxes?`
`+Jn(v.boxes,g+1):"")}).join(`
`)};var ua={inspect:Jt,textify:Jn,parseType:Ka,findBox:eh,parseTraf:Nn.traf,parseTfdt:Nn.tfdt,parseHdlr:Nn.hdlr,parseTfhd:Nn.tfhd,parseTrun:Nn.trun,parseSidx:Nn.sidx},Lt=function(h){for(var g=0,y=String.fromCharCode(h[g]),v="";y!=="\0";)v+=y,g++,y=String.fromCharCode(h[g]);return v+=y,v},Yu={uint8ToCString:Lt},sl=Yu.uint8ToCString,th=u.getUint64,Za=function(h){var g=4,y=h[0],v,_,x,k,M,P,U,V;if(y===0){v=sl(h.subarray(g)),g+=v.length,_=sl(h.subarray(g)),g+=_.length;var ee=new DataView(h.buffer);x=ee.getUint32(g),g+=4,M=ee.getUint32(g),g+=4,P=ee.getUint32(g),g+=4,U=ee.getUint32(g),g+=4}else if(y===1){var ee=new DataView(h.buffer);x=ee.getUint32(g),g+=4,k=th(h.subarray(g)),g+=8,P=ee.getUint32(g),g+=4,U=ee.getUint32(g),g+=4,v=sl(h.subarray(g)),g+=v.length,_=sl(h.subarray(g)),g+=_.length}V=new Uint8Array(h.subarray(g,h.byteLength));var _e={scheme_id_uri:v,value:_,timescale:x||1,presentation_time:k,presentation_time_delta:M,event_duration:P,id:U,message_data:V};return ks(y,_e)?_e:void 0},al=function(h,g,y,v){return h||h===0?h/g:v+y/g},ks=function(h,g){var y=g.scheme_id_uri!=="\0",v=h===0&&rl(g.presentation_time_delta)&&y,_=h===1&&rl(g.presentation_time)&&y;return!(h>1)&&v||_},rl=function(h){return h!==void 0||h!==null},ol={parseEmsgBox:Za,scaleTime:al},Ja;typeof window<"u"?Ja=window:typeof s<"u"?Ja=s:typeof self<"u"?Ja=self:Ja={};var Wu=Ja,ll=zr.toUnsigned,qi=zr.toHexString,ht=Vr,Os=Gu,ih=ol,rm=Ds,Jy=Zd,nh=el,Qu=u.getUint64,sh,ah,rh,ul,oh,Ku,lh,cl=Wu,uh=$a.parseId3Frames;sh=function(h){var g={},y=ht(h,["moov","trak"]);return y.reduce(function(v,_){var x,k,M,P,U;return x=ht(_,["tkhd"])[0],!x||(k=x[0],M=k===0?12:20,P=ll(x[M]<<24|x[M+1]<<16|x[M+2]<<8|x[M+3]),U=ht(_,["mdia","mdhd"])[0],!U)?null:(k=U[0],M=k===0?12:20,v[P]=ll(U[M]<<24|U[M+1]<<16|U[M+2]<<8|U[M+3]),v)},g)},ah=function(h,g){var y;y=ht(g,["moof","traf"]);var v=y.reduce(function(_,x){var k=ht(x,["tfhd"])[0],M=ll(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),P=h[M]||9e4,U=ht(x,["tfdt"])[0],V=new DataView(U.buffer,U.byteOffset,U.byteLength),ee;U[0]===1?ee=Qu(U.subarray(4,12)):ee=V.getUint32(4);let _e;return typeof ee=="bigint"?_e=ee/cl.BigInt(P):typeof ee=="number"&&!isNaN(ee)&&(_e=ee/P),_e<Number.MAX_SAFE_INTEGER&&(_e=Number(_e)),_e<_&&(_=_e),_},1/0);return typeof v=="bigint"||isFinite(v)?v:0},rh=function(h,g){var y=ht(g,["moof","traf"]),v=0,_=0,x;if(y&&y.length){var k=ht(y[0],["tfhd"])[0],M=ht(y[0],["trun"])[0],P=ht(y[0],["tfdt"])[0];if(k){var U=rm(k);x=U.trackId}if(P){var V=nh(P);v=V.baseMediaDecodeTime}if(M){var ee=Jy(M);ee.samples&&ee.samples.length&&(_=ee.samples[0].compositionTimeOffset||0)}}var _e=h[x]||9e4;typeof v=="bigint"&&(_=cl.BigInt(_),_e=cl.BigInt(_e));var oe=(v+_)/_e;return typeof oe=="bigint"&&oe<Number.MAX_SAFE_INTEGER&&(oe=Number(oe)),oe},ul=function(h){var g=ht(h,["moov","trak"]),y=[];return g.forEach(function(v){var _=ht(v,["mdia","hdlr"]),x=ht(v,["tkhd"]);_.forEach(function(k,M){var P=Os(k.subarray(8,12)),U=x[M],V,ee,_e;P==="vide"&&(V=new DataView(U.buffer,U.byteOffset,U.byteLength),ee=V.getUint8(0),_e=ee===0?V.getUint32(12):V.getUint32(20),y.push(_e))})}),y},Ku=function(h){var g=h[0],y=g===0?12:20;return ll(h[y]<<24|h[y+1]<<16|h[y+2]<<8|h[y+3])},oh=function(h){var g=ht(h,["moov","trak"]),y=[];return g.forEach(function(v){var _={},x=ht(v,["tkhd"])[0],k,M;x&&(k=new DataView(x.buffer,x.byteOffset,x.byteLength),M=k.getUint8(0),_.id=M===0?k.getUint32(12):k.getUint32(20));var P=ht(v,["mdia","hdlr"])[0];if(P){var U=Os(P.subarray(8,12));U==="vide"?_.type="video":U==="soun"?_.type="audio":_.type=U}var V=ht(v,["mdia","minf","stbl","stsd"])[0];if(V){var ee=V.subarray(8);_.codec=Os(ee.subarray(4,8));var _e=ht(ee,[_.codec])[0],oe,Ne;_e&&(/^[asm]vc[1-9]$/i.test(_.codec)?(oe=_e.subarray(78),Ne=Os(oe.subarray(4,8)),Ne==="avcC"&&oe.length>11?(_.codec+=".",_.codec+=qi(oe[9]),_.codec+=qi(oe[10]),_.codec+=qi(oe[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(oe=_e.subarray(28),Ne=Os(oe.subarray(4,8)),Ne==="esds"&&oe.length>20&&oe[19]!==0?(_.codec+="."+qi(oe[19]),_.codec+="."+qi(oe[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Fe=ht(v,["mdia","mdhd"])[0];Fe&&(_.timescale=Ku(Fe)),y.push(_)}),y},lh=function(h,g=0){var y=ht(h,["emsg"]);return y.map(v=>{var _=ih.parseEmsgBox(new Uint8Array(v)),x=uh(_.message_data);return{cueTime:ih.scaleTime(_.presentation_time,_.timescale,_.presentation_time_delta,g),duration:ih.scaleTime(_.event_duration,_.timescale),frames:x}})};var Tn={findBox:ht,parseType:Os,timescale:sh,startTime:ah,compositionStartTime:rh,videoTrackIds:ul,tracks:oh,getTimescaleFromMediaHeader:Ku,getEmsgID3:lh};const{parseTrun:ca}=ua,{findBox:$r}=Tn;var dl=Wu,hl=function(h){var g=$r(h,["moof","traf"]),y=$r(h,["mdat"]),v=[];return y.forEach(function(_,x){var k=g[x];v.push({mdat:_,traf:k})}),v},fl=function(h,g,y){var v=g,_=y.defaultSampleDuration||0,x=y.defaultSampleSize||0,k=y.trackId,M=[];return h.forEach(function(P){var U=ca(P),V=U.samples;V.forEach(function(ee){ee.duration===void 0&&(ee.duration=_),ee.size===void 0&&(ee.size=x),ee.trackId=k,ee.dts=v,ee.compositionTimeOffset===void 0&&(ee.compositionTimeOffset=0),typeof v=="bigint"?(ee.pts=v+dl.BigInt(ee.compositionTimeOffset),v+=dl.BigInt(ee.duration)):(ee.pts=v+ee.compositionTimeOffset,v+=ee.duration)}),M=M.concat(V)}),M},ch={getMdatTrafPairs:hl,parseSamples:fl},ev=Fd.discardEmulationPreventionBytes,om=ku.CaptionStream,Zu=Vr,dh=el,hh=Ds,{getMdatTrafPairs:Ze,parseSamples:ge}=ch,Gr=function(h,g){for(var y=h,v=0;v<g.length;v++){var _=g[v];if(y<_.size)return _;y-=_.size}return null},Ju=function(h,g,y){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),_={logs:[],seiNals:[]},x,k,M,P;for(k=0;k+4<h.length;k+=M)if(M=v.getUint32(k),k+=4,!(M<=0))switch(h[k]&31){case 6:var U=h.subarray(k+1,k+1+M),V=Gr(k,g);if(x={nalUnitType:"sei_rbsp",size:M,data:U,escapedRBSP:ev(U),trackId:y},V)x.pts=V.pts,x.dts=V.dts,P=V;else if(P)x.pts=P.pts,x.dts=P.dts;else{_.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+k+" for trackId "+y+". See mux.js#223."});break}_.seiNals.push(x);break}return _},zt=function(h,g){var y={},v=Ze(h);return v.forEach(function(_){var x=_.mdat,k=_.traf,M=Zu(k,["tfhd"]),P=hh(M[0]),U=P.trackId,V=Zu(k,["tfdt"]),ee=V.length>0?dh(V[0]).baseMediaDecodeTime:0,_e=Zu(k,["trun"]),oe,Ne;g===U&&_e.length>0&&(oe=ge(_e,ee,P),Ne=Ju(x,oe,U),y[U]||(y[U]={seiNals:[],logs:[]}),y[U].seiNals=y[U].seiNals.concat(Ne.seiNals),y[U].logs=y[U].logs.concat(Ne.logs))}),y},fh=function(h,g,y){var v;if(g===null)return null;v=zt(h,g);var _=v[g]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:y}},ph=function(){var h=!1,g,y,v,_,x,k;this.isInitialized=function(){return h},this.init=function(M){g=new om,h=!0,k=M?M.isPartial:!1,g.on("data",function(P){P.startTime=P.startPts/_,P.endTime=P.endPts/_,x.captions.push(P),x.captionStreams[P.stream]=!0}),g.on("log",function(P){x.logs.push(P)})},this.isNewInit=function(M,P){return M&&M.length===0||P&&typeof P=="object"&&Object.keys(P).length===0?!1:v!==M[0]||_!==P[v]},this.parse=function(M,P,U){var V;if(this.isInitialized()){if(!P||!U)return null;if(this.isNewInit(P,U))v=P[0],_=U[v];else if(v===null||!_)return y.push(M),null}else return null;for(;y.length>0;){var ee=y.shift();this.parse(ee,P,U)}return V=fh(M,v,_),V&&V.logs&&(x.logs=x.logs.concat(V.logs)),V===null||!V.seiNals?x.logs.length?{logs:x.logs,captions:[],captionStreams:[]}:null:(this.pushNals(V.seiNals),this.flushStream(),x)},this.pushNals=function(M){if(!this.isInitialized()||!M||M.length===0)return null;M.forEach(function(P){g.push(P)})},this.flushStream=function(){if(!this.isInitialized())return null;k?g.partialFlush():g.flush()},this.clearParsedCaptions=function(){x.captions=[],x.captionStreams={},x.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;g.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){y=[],v=null,_=null,x?this.clearParsedCaptions():x={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},lm=ph;const{parseTfdt:mh}=ua,da=Vr,{getTimescaleFromMediaHeader:gh}=Tn,{parseSamples:yh,getMdatTrafPairs:vh}=ch;var ft=function(){let h=9e4;this.init=function(g){const y=da(g,["moov","trak","mdia","mdhd"])[0];y&&(h=gh(y))},this.parseSegment=function(g){const y=[],v=vh(g);let _=0;return v.forEach(function(x){const k=x.mdat,M=x.traf,P=da(M,["tfdt"])[0],U=da(M,["tfhd"])[0],V=da(M,["trun"]);if(P&&(_=mh(P).baseMediaDecodeTime),V.length&&U){const ee=yh(V,_,U);let _e=0;ee.forEach(function(oe){const Ne="utf-8",Fe=new TextDecoder(Ne),Gt=k.slice(_e,_e+oe.size);if(da(Gt,["vtte"])[0]){_e+=oe.size;return}da(Gt,["vttc"]).forEach(function(fa){const tr=da(fa,["payl"])[0],Wr=da(fa,["sttg"])[0],Qr=oe.pts/h,Kr=(oe.pts+oe.duration)/h;let Ct,Zr;if(tr)try{Ct=Fe.decode(tr)}catch(tn){console.error(tn)}if(Wr)try{Zr=Fe.decode(Wr)}catch(tn){console.error(tn)}oe.duration&&Ct&&y.push({cueText:Ct,start:Qr,end:Kr,settings:Zr})}),_e+=oe.size})}}),y}},pl=zo,Xr=function(h){var g=h[1]&31;return g<<=8,g|=h[2],g},Un=function(h){return!!(h[1]&64)},es=function(h){var g=0;return(h[3]&48)>>>4>1&&(g+=h[4]+1),g},Bn=function(h,g){var y=Xr(h);return y===0?"pat":y===g?"pmt":g?"pes":null},bh=function(h){var g=Un(h),y=4+es(h);return g&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},Yr=function(h){var g={},y=Un(h),v=4+es(h);if(y&&(v+=h[v]+1),!!(h[v+5]&1)){var _,x,k;_=(h[v+1]&15)<<8|h[v+2],x=3+_-4,k=(h[v+10]&15)<<8|h[v+11];for(var M=12+k;M<x;){var P=v+M;g[(h[P+1]&31)<<8|h[P+2]]=h[P],M+=((h[P+3]&15)<<8|h[P+4])+5}return g}},_h=function(h,g){var y=Xr(h),v=g[y];switch(v){case pl.H264_STREAM_TYPE:return"video";case pl.ADTS_STREAM_TYPE:return"audio";case pl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},ml=function(h){var g=Un(h);if(!g)return null;var y=4+es(h);if(y>=h.byteLength)return null;var v=null,_;return _=h[y+7],_&192&&(v={},v.pts=(h[y+9]&14)<<27|(h[y+10]&255)<<20|(h[y+11]&254)<<12|(h[y+12]&255)<<5|(h[y+13]&254)>>>3,v.pts*=4,v.pts+=(h[y+13]&6)>>>1,v.dts=v.pts,_&64&&(v.dts=(h[y+14]&14)<<27|(h[y+15]&255)<<20|(h[y+16]&254)<<12|(h[y+17]&255)<<5|(h[y+18]&254)>>>3,v.dts*=4,v.dts+=(h[y+18]&6)>>>1)),v},gl=function(h){switch(h){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},ec=function(h){for(var g=4+es(h),y=h.subarray(g),v=0,_=0,x=!1,k;_<y.byteLength-3;_++)if(y[_+2]===1){v=_+5;break}for(;v<y.byteLength;)switch(y[v]){case 0:if(y[v-1]!==0){v+=2;break}else if(y[v-2]!==0){v++;break}_+3!==v-2&&(k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0));do v++;while(y[v]!==1&&v<y.length);_=v-2,v+=3;break;case 1:if(y[v-1]!==0||y[v-2]!==0){v+=3;break}k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0),_=v-2,v+=3;break;default:v+=3;break}return y=y.subarray(_),v-=_,_=0,y&&y.byteLength>3&&(k=gl(y[_+3]&31),k==="slice_layer_without_partitioning_rbsp_idr"&&(x=!0)),x},um={parseType:Bn,parsePat:bh,parsePmt:Yr,parsePayloadUnitStartIndicator:Un,parsePesType:_h,parsePesTime:ml,videoPacketContainsKeyFrame:ec},Th=zo,er=zd.handleRollover,pt={};pt.ts=um,pt.aac=Hu;var ha=dt.ONE_SECOND_IN_TS,ci=188,Sn=71,Sh=function(h,g){for(var y=0,v=ci,_,x;v<h.byteLength;){if(h[y]===Sn&&h[v]===Sn){switch(_=h.subarray(y,v),x=pt.ts.parseType(_,g.pid),x){case"pat":g.pid=pt.ts.parsePat(_);break;case"pmt":var k=pt.ts.parsePmt(_);g.table=g.table||{},Object.keys(k).forEach(function(M){g.table[M]=k[M]});break}y+=ci,v+=ci;continue}y++,v++}},xh=function(h,g,y){for(var v=0,_=ci,x,k,M,P,U,V=!1;_<=h.byteLength;){if(h[v]===Sn&&(h[_]===Sn||_===h.byteLength)){switch(x=h.subarray(v,_),k=pt.ts.parseType(x,g.pid),k){case"pes":M=pt.ts.parsePesType(x,g.table),P=pt.ts.parsePayloadUnitStartIndicator(x),M==="audio"&&P&&(U=pt.ts.parsePesTime(x),U&&(U.type="audio",y.audio.push(U),V=!0));break}if(V)break;v+=ci,_+=ci;continue}v++,_++}for(_=h.byteLength,v=_-ci,V=!1;v>=0;){if(h[v]===Sn&&(h[_]===Sn||_===h.byteLength)){switch(x=h.subarray(v,_),k=pt.ts.parseType(x,g.pid),k){case"pes":M=pt.ts.parsePesType(x,g.table),P=pt.ts.parsePayloadUnitStartIndicator(x),M==="audio"&&P&&(U=pt.ts.parsePesTime(x),U&&(U.type="audio",y.audio.push(U),V=!0));break}if(V)break;v-=ci,_-=ci;continue}v--,_--}},cm=function(h,g,y){for(var v=0,_=ci,x,k,M,P,U,V,ee,_e,oe=!1,Ne={data:[],size:0};_<h.byteLength;){if(h[v]===Sn&&h[_]===Sn){switch(x=h.subarray(v,_),k=pt.ts.parseType(x,g.pid),k){case"pes":if(M=pt.ts.parsePesType(x,g.table),P=pt.ts.parsePayloadUnitStartIndicator(x),M==="video"&&(P&&!oe&&(U=pt.ts.parsePesTime(x),U&&(U.type="video",y.video.push(U),oe=!0)),!y.firstKeyFrame)){if(P&&Ne.size!==0){for(V=new Uint8Array(Ne.size),ee=0;Ne.data.length;)_e=Ne.data.shift(),V.set(_e,ee),ee+=_e.byteLength;if(pt.ts.videoPacketContainsKeyFrame(V)){var Fe=pt.ts.parsePesTime(V);Fe?(y.firstKeyFrame=Fe,y.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Ne.size=0}Ne.data.push(x),Ne.size+=x.byteLength}break}if(oe&&y.firstKeyFrame)break;v+=ci,_+=ci;continue}v++,_++}for(_=h.byteLength,v=_-ci,oe=!1;v>=0;){if(h[v]===Sn&&h[_]===Sn){switch(x=h.subarray(v,_),k=pt.ts.parseType(x,g.pid),k){case"pes":M=pt.ts.parsePesType(x,g.table),P=pt.ts.parsePayloadUnitStartIndicator(x),M==="video"&&P&&(U=pt.ts.parsePesTime(x),U&&(U.type="video",y.video.push(U),oe=!0));break}if(oe)break;v-=ci,_-=ci;continue}v--,_--}},dm=function(h,g){if(h.audio&&h.audio.length){var y=g;(typeof y>"u"||isNaN(y))&&(y=h.audio[0].dts),h.audio.forEach(function(x){x.dts=er(x.dts,y),x.pts=er(x.pts,y),x.dtsTime=x.dts/ha,x.ptsTime=x.pts/ha})}if(h.video&&h.video.length){var v=g;if((typeof v>"u"||isNaN(v))&&(v=h.video[0].dts),h.video.forEach(function(x){x.dts=er(x.dts,v),x.pts=er(x.pts,v),x.dtsTime=x.dts/ha,x.ptsTime=x.pts/ha}),h.firstKeyFrame){var _=h.firstKeyFrame;_.dts=er(_.dts,v),_.pts=er(_.pts,v),_.dtsTime=_.dts/ha,_.ptsTime=_.pts/ha}}},tv=function(h){for(var g=!1,y=0,v=null,_=null,x=0,k=0,M;h.length-k>=3;){var P=pt.aac.parseType(h,k);switch(P){case"timed-metadata":if(h.length-k<10){g=!0;break}if(x=pt.aac.parseId3TagSize(h,k),x>h.length){g=!0;break}_===null&&(M=h.subarray(k,k+x),_=pt.aac.parseAacTimestamp(M)),k+=x;break;case"audio":if(h.length-k<7){g=!0;break}if(x=pt.aac.parseAdtsSize(h,k),x>h.length){g=!0;break}v===null&&(M=h.subarray(k,k+x),v=pt.aac.parseSampleRate(M)),y++,k+=x;break;default:k++;break}if(g)return null}if(v===null||_===null)return null;var U=ha/v,V={audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+y*1024*U,pts:_+y*1024*U}]};return V},hm=function(h){var g={pid:null,table:null},y={};Sh(h,g);for(var v in g.table)if(g.table.hasOwnProperty(v)){var _=g.table[v];switch(_){case Th.H264_STREAM_TYPE:y.video=[],cm(h,g,y),y.video.length===0&&delete y.video;break;case Th.ADTS_STREAM_TYPE:y.audio=[],xh(h,g,y),y.audio.length===0&&delete y.audio;break}}return y},fm=function(h,g){var y=pt.aac.isLikelyAacData(h),v;return y?v=tv(h):v=hm(h),!v||!v.audio&&!v.video?null:(dm(v,g),v)},pm={inspect:fm,parseAudioPes_:xh};const Eh=function(h,g){g.on("data",function(y){const v=y.initSegment;y.initSegment={data:v.buffer,byteOffset:v.byteOffset,byteLength:v.byteLength};const _=y.data;y.data=_.buffer,h.postMessage({action:"data",segment:y,byteOffset:_.byteOffset,byteLength:_.byteLength},[y.data])}),g.on("done",function(y){h.postMessage({action:"done"})}),g.on("gopInfo",function(y){h.postMessage({action:"gopInfo",gopInfo:y})}),g.on("videoSegmentTimingInfo",function(y){const v={start:{decode:dt.videoTsToSeconds(y.start.dts),presentation:dt.videoTsToSeconds(y.start.pts)},end:{decode:dt.videoTsToSeconds(y.end.dts),presentation:dt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:dt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=dt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:v})}),g.on("audioSegmentTimingInfo",function(y){const v={start:{decode:dt.videoTsToSeconds(y.start.dts),presentation:dt.videoTsToSeconds(y.start.pts)},end:{decode:dt.videoTsToSeconds(y.end.dts),presentation:dt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:dt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=dt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:v})}),g.on("id3Frame",function(y){h.postMessage({action:"id3Frame",id3Frame:y})}),g.on("caption",function(y){h.postMessage({action:"caption",caption:y})}),g.on("trackinfo",function(y){h.postMessage({action:"trackinfo",trackInfo:y})}),g.on("audioTimingInfo",function(y){h.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:dt.videoTsToSeconds(y.start),end:dt.videoTsToSeconds(y.end)}})}),g.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:dt.videoTsToSeconds(y.start),end:dt.videoTsToSeconds(y.end)}})}),g.on("log",function(y){h.postMessage({action:"log",log:y})})};class Ch{constructor(g,y){this.options=y||{},this.self=g,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new im.Transmuxer(this.options),Eh(this.self,this.transmuxer)}pushMp4Captions(g){this.captionParser||(this.captionParser=new lm,this.captionParser.init());const y=new Uint8Array(g.data,g.byteOffset,g.byteLength),v=this.captionParser.parse(y,g.trackIds,g.timescales);this.self.postMessage({action:"mp4Captions",captions:v&&v.captions||[],logs:v&&v.logs||[],data:y.buffer},[y.buffer])}initMp4WebVttParser(g){this.webVttParser||(this.webVttParser=new ft);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.webVttParser.init(y)}getMp4WebVttText(g){this.webVttParser||(this.webVttParser=new ft);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength),v=this.webVttParser.parseSegment(y);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:v||[],data:y.buffer},[y.buffer])}probeMp4StartTime({timescales:g,data:y}){const v=Tn.startTime(g,y);this.self.postMessage({action:"probeMp4StartTime",startTime:v,data:y},[y.buffer])}probeMp4Tracks({data:g}){const y=Tn.tracks(g);this.self.postMessage({action:"probeMp4Tracks",tracks:y,data:g},[g.buffer])}probeEmsgID3({data:g,offset:y}){const v=Tn.getEmsgID3(g,y);this.self.postMessage({action:"probeEmsgID3",id3Frames:v,emsgData:g},[g.buffer])}probeTs({data:g,baseStartTime:y}){const v=typeof y=="number"&&!isNaN(y)?y*dt.ONE_SECOND_IN_TS:void 0,_=pm.inspect(g,v);let x=null;_&&(x={hasVideo:_.video&&_.video.length===2||!1,hasAudio:_.audio&&_.audio.length===2||!1},x.hasVideo&&(x.videoStart=_.video[0].ptsTime),x.hasAudio&&(x.audioStart=_.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:x,data:g},[g.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(g){const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.transmuxer.push(y)}reset(){this.transmuxer.reset()}setTimestampOffset(g){const y=g.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(dt.secondsToVideoTs(y)))}setAudioAppendStart(g){this.transmuxer.setAudioAppendStart(Math.ceil(dt.secondsToVideoTs(g.appendStart)))}setRemux(g){this.transmuxer.setRemux(g.remux)}flush(g){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(g){this.transmuxer.alignGopsWith(g.gopsToAlignWith.slice())}}self.onmessage=function(h){if(h.data.action==="init"&&h.data.options){this.messageHandlers=new Ch(self,h.data.options);return}this.messageHandlers||(this.messageHandlers=new Ch(self)),h.data&&h.data.action&&h.data.action!=="init"&&this.messageHandlers[h.data.action]&&this.messageHandlers[h.data.action](h.data)}}));var ZR=VS(KR);const JR=(s,e,i)=>{const{type:a,initSegment:o,captions:u,captionStreams:c,metadata:f,videoFrameDtsTime:m,videoFramePtsTime:b}=s.data.segment;e.buffer.push({captions:u,captionStreams:c,metadata:f});const S=s.data.segment.boxes||{data:s.data.segment.data},E={type:a,data:new Uint8Array(S.data,S.data.byteOffset,S.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};typeof m<"u"&&(E.videoFrameDtsTime=m),typeof b<"u"&&(E.videoFramePtsTime=b),i(E)},e8=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},t8=(s,e)=>{e.gopInfo=s.data.gopInfo},GS=s=>{const{transmuxer:e,bytes:i,audioAppendStart:a,gopsToAlignWith:o,remux:u,onData:c,onTrackInfo:f,onAudioTimingInfo:m,onVideoTimingInfo:b,onVideoSegmentTimingInfo:S,onAudioSegmentTimingInfo:E,onId3:A,onCaptions:R,onDone:N,onEndedTimeline:w,onTransmuxerLog:H,isEndOfTimeline:I,segment:G,triggerSegmentEventFn:F}=s,Y={buffer:[]};let K=I;const se=le=>{e.currentTransmux===s&&(le.data.action==="data"&&JR(le,Y,c),le.data.action==="trackinfo"&&f(le.data.trackInfo),le.data.action==="gopInfo"&&t8(le,Y),le.data.action==="audioTimingInfo"&&m(le.data.audioTimingInfo),le.data.action==="videoTimingInfo"&&b(le.data.videoTimingInfo),le.data.action==="videoSegmentTimingInfo"&&S(le.data.videoSegmentTimingInfo),le.data.action==="audioSegmentTimingInfo"&&E(le.data.audioSegmentTimingInfo),le.data.action==="id3Frame"&&A([le.data.id3Frame],le.data.id3Frame.dispatchType),le.data.action==="caption"&&R(le.data.caption),le.data.action==="endedtimeline"&&(K=!1,w()),le.data.action==="log"&&H(le.data.log),le.data.type==="transmuxed"&&(K||(e.onmessage=null,e8({transmuxedData:Y,callback:N}),XS(e))))},Q=()=>{const le={message:"Received an error message from the transmuxer worker",metadata:{errorType:$.Error.StreamingFailedToTransmuxSegment,segmentInfo:Bo({segment:G})}};N(null,le)};if(e.onmessage=se,e.onerror=Q,a&&e.postMessage({action:"setAudioAppendStart",appendStart:a}),Array.isArray(o)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof u<"u"&&e.postMessage({action:"setRemux",remux:u}),i.byteLength){const le=i instanceof ArrayBuffer?i:i.buffer,ue=i instanceof ArrayBuffer?0:i.byteOffset;F({type:"segmenttransmuxingstart",segment:G}),e.postMessage({action:"push",data:le,byteOffset:ue,byteLength:i.byteLength},[le])}I&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},XS=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():GS(s.currentTransmux))},YS=(s,e)=>{s.postMessage({action:e}),XS(s)},WS=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,YS(e,s);return}e.transmuxQueue.push(YS.bind(null,e,s))},i8=s=>{WS("reset",s)},n8=s=>{WS("endTimeline",s)},QS=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,GS(s);return}s.transmuxer.transmuxQueue.push(s)};var Dy={reset:i8,endTimeline:n8,transmux:QS,createTransmuxer:s=>{const e=new ZR;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:s}),e}};const Su=function(s){const e=s.transmuxer,i=s.endAction||s.action,a=s.callback,o=Vt({},s,{endAction:null,transmuxer:null,callback:null}),u=c=>{c.data.action===i&&(e.removeEventListener("message",u),c.data.data&&(c.data.data=new Uint8Array(c.data.data,s.byteOffset||0,s.byteLength||c.data.data.byteLength),s.data&&(s.data=c.data.data)),a(c.data))};if(e.addEventListener("message",u),s.data){const c=s.data instanceof ArrayBuffer;o.byteOffset=c?0:s.data.byteOffset,o.byteLength=s.data.byteLength;const f=[c?s.data:s.data.buffer];e.postMessage(o,f)}else e.postMessage(o)},Xs={FAILURE:2,TIMEOUT:-101,ABORTED:-102},KS="wvtt",ky=s=>{s.forEach(e=>{e.abort()})},s8=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),a8=s=>{const e=s.target,a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return a.bytesReceived=s.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a},Oy=(s,e)=>{const{requestType:i}=e,a=Uo({requestType:i,request:e,error:s});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Xs.TIMEOUT,xhr:e,metadata:a}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Xs.ABORTED,xhr:e,metadata:a}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Xs.FAILURE,xhr:e,metadata:a}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Xs.FAILURE,xhr:e,metadata:a}:null},ZS=(s,e,i,a)=>(o,u)=>{const c=u.response,f=Oy(o,u);if(f)return i(f,s);if(c.byteLength!==16)return i({status:u.status,message:"Invalid HLS key at URL: "+u.uri,code:Xs.FAILURE,xhr:u},s);const m=new DataView(c),b=new Uint32Array([m.getUint32(0),m.getUint32(4),m.getUint32(8),m.getUint32(12)]);for(let E=0;E<e.length;E++)e[E].bytes=b;const S={uri:u.uri};return a({type:"segmentkeyloadcomplete",segment:s,keyInfo:S}),i(null,s)},r8=(s,e)=>{e===KS&&s.transmuxer.postMessage({action:"initMp4WebVttParser",data:s.map.bytes})},o8=(s,e,i)=>{e===KS&&Su({action:"getMp4WebVttText",data:s.bytes,transmuxer:s.transmuxer,callback:({data:a,mp4VttCues:o})=>{s.bytes=a,i(null,s,{mp4VttCues:o})}})},JS=(s,e)=>{const i=m0(s.map.bytes);if(i!=="mp4"){const a=s.map.resolvedUri||s.map.uri,o=i||"unknown";return e({internal:!0,message:`Found unsupported ${o} container for initialization segment at URL: ${a}`,code:Xs.FAILURE,metadata:{mediaType:o}})}Su({action:"probeMp4Tracks",data:s.map.bytes,transmuxer:s.transmuxer,callback:({tracks:a,data:o})=>(s.map.bytes=o,a.forEach(function(u){s.map.tracks=s.map.tracks||{},!s.map.tracks[u.type]&&(s.map.tracks[u.type]=u,typeof u.id=="number"&&u.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[u.id]=u.timescale),u.type==="text"&&r8(s,u.codec))}),e(null))})},l8=({segment:s,finishProcessingFn:e,triggerSegmentEventFn:i})=>(a,o)=>{const u=Oy(a,o);if(u)return e(u,s);const c=new Uint8Array(o.response);if(i({type:"segmentloaded",segment:s}),s.map.key)return s.map.encryptedBytes=c,e(null,s);s.map.bytes=c,JS(s,function(f){if(f)return f.xhr=o,f.status=o.status,e(f,s);e(null,s)})},u8=({segment:s,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:a})=>(o,u)=>{const c=Oy(o,u);if(c)return e(c,s);a({type:"segmentloaded",segment:s});const f=i==="arraybuffer"||!u.responseText?u.response:WR(u.responseText.substring(s.lastReachedChar||0));return s.stats=s8(u),s.key?s.encryptedBytes=new Uint8Array(f):s.bytes=new Uint8Array(f),e(null,s)},c8=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{const N=s.map&&s.map.tracks||{},w=!!(N.audio&&N.video);let H=a.bind(null,s,"audio","start");const I=a.bind(null,s,"audio","end");let G=a.bind(null,s,"video","start");const F=a.bind(null,s,"video","end"),Y=()=>QS({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:w,onData:K=>{K.type=K.type==="combined"?"video":K.type,S(s,K)},onTrackInfo:K=>{i&&(w&&(K.isMuxed=!0),i(s,K))},onAudioTimingInfo:K=>{H&&typeof K.start<"u"&&(H(K.start),H=null),I&&typeof K.end<"u"&&I(K.end)},onVideoTimingInfo:K=>{G&&typeof K.start<"u"&&(G(K.start),G=null),F&&typeof K.end<"u"&&F(K.end)},onVideoSegmentTimingInfo:K=>{const se={pts:{start:K.start.presentation,end:K.end.presentation},dts:{start:K.start.decode,end:K.end.decode}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:se}),o(K)},onAudioSegmentTimingInfo:K=>{const se={pts:{start:K.start.pts,end:K.end.pts},dts:{start:K.start.dts,end:K.end.dts}};R({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:se}),u(K)},onId3:(K,se)=>{c(s,K,se)},onCaptions:K=>{f(s,[K])},isEndOfTimeline:m,onEndedTimeline:()=>{b()},onTransmuxerLog:A,onDone:(K,se)=>{E&&(K.type=K.type==="combined"?"video":K.type,R({type:"segmenttransmuxingcomplete",segment:s}),E(se,s,K))},segment:s,triggerSegmentEventFn:R});Su({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:K=>{s.bytes=e=K.data;const se=K.result;se&&(i(s,{hasAudio:se.hasAudio,hasVideo:se.hasVideo,isMuxed:w}),i=null),Y()}})},ex=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{let N=new Uint8Array(e);if(B3(N)){s.isFmp4=!0;const{tracks:w}=s.map;if(w.text&&(!w.audio||!w.video)){S(s,{data:N,type:"text"}),o8(s,w.text.codec,E);return}const I={isFmp4:!0,hasVideo:!!w.video,hasAudio:!!w.audio};w.audio&&w.audio.codec&&w.audio.codec!=="enca"&&(I.audioCodec=w.audio.codec),w.video&&w.video.codec&&w.video.codec!=="encv"&&(I.videoCodec=w.video.codec),w.video&&w.audio&&(I.isMuxed=!0),i(s,I);const G=(F,Y)=>{S(s,{data:N,type:I.hasAudio&&!I.isMuxed?"audio":"video"}),Y&&Y.length&&c(s,Y),F&&F.length&&f(s,F),E(null,s,{})};Su({action:"probeMp4StartTime",timescales:s.map.timescales,data:N,transmuxer:s.transmuxer,callback:({data:F,startTime:Y})=>{e=F.buffer,s.bytes=N=F,I.hasAudio&&!I.isMuxed&&a(s,"audio","start",Y),I.hasVideo&&a(s,"video","start",Y),Su({action:"probeEmsgID3",data:N,transmuxer:s.transmuxer,offset:Y,callback:({emsgData:K,id3Frames:se})=>{if(e=K.buffer,s.bytes=N=K,!w.video||!K.byteLength||!s.transmuxer){G(void 0,se);return}Su({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:N,timescales:s.map.timescales,trackIds:[w.video.id],callback:Q=>{e=Q.data.buffer,s.bytes=N=Q.data,Q.logs.forEach(function(le){A(bt(le,{stream:"mp4CaptionParser"}))}),G(Q.captions,se)}})}})}});return}if(!s.transmuxer){E(null,s,{});return}if(typeof s.container>"u"&&(s.container=m0(N)),s.container!=="ts"&&s.container!=="aac"){i(s,{hasAudio:!1,hasVideo:!1}),E(null,s,{});return}c8({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})},tx=function({id:s,key:e,encryptedBytes:i,decryptionWorker:a,segment:o,doneFn:u},c){const f=b=>{if(b.data.source===s){a.removeEventListener("message",f);const S=b.data.decrypted;c(new Uint8Array(S.bytes,S.byteOffset,S.byteLength))}};a.onerror=()=>{const b="An error occurred in the decryption worker",S=Bo({segment:o}),E={message:b,metadata:{error:new Error(b),errorType:$.Error.StreamingFailedToDecryptSegment,segmentInfo:S,keyInfo:{uri:o.key.resolvedUri||o.map.key.resolvedUri}}};u(E,o)},a.addEventListener("message",f);let m;e.bytes.slice?m=e.bytes.slice():m=new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(PS({source:s,encrypted:i,key:m,iv:e.iv}),[i.buffer,m.buffer])},d8=({decryptionWorker:s,segment:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{R({type:"segmentdecryptionstart"}),tx({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s,segment:e,doneFn:E},N=>{e.bytes=N,R({type:"segmentdecryptioncomplete",segment:e}),ex({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})})},h8=({activeXhrs:s,decryptionWorker:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})=>{let N=0,w=!1;return(H,I)=>{if(!w){if(H)return w=!0,ky(s),E(H,I);if(N+=1,N===s.length){const G=function(){if(I.encryptedBytes)return d8({decryptionWorker:e,segment:I,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R});ex({segment:I,bytes:I.bytes,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S,doneFn:E,onTransmuxerLog:A,triggerSegmentEventFn:R})};if(I.endOfAllRequests=Date.now(),I.map&&I.map.encryptedBytes&&!I.map.bytes)return R({type:"segmentdecryptionstart",segment:I}),tx({decryptionWorker:e,id:I.requestId+"-init",encryptedBytes:I.map.encryptedBytes,key:I.map.key,segment:I,doneFn:E},F=>{I.map.bytes=F,R({type:"segmentdecryptioncomplete",segment:I}),JS(I,Y=>{if(Y)return ky(s),E(Y,I);G()})});G()}}}},f8=({loadendState:s,abortFn:e})=>i=>{i.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},p8=({segment:s,progressFn:e,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:f,isEndOfTimeline:m,endedTimelineFn:b,dataFn:S})=>E=>{if(!E.target.aborted)return s.stats=bt(s.stats,a8(E)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(E,s)},m8=({xhr:s,xhrOptions:e,decryptionWorker:i,segment:a,abortFn:o,progressFn:u,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:N,doneFn:w,onTransmuxerLog:H,triggerSegmentEventFn:I})=>{const G=[],F=h8({activeXhrs:G,decryptionWorker:i,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:N,doneFn:w,onTransmuxerLog:H,triggerSegmentEventFn:I});if(a.key&&!a.key.bytes){const le=[a.key];a.map&&!a.map.bytes&&a.map.key&&a.map.key.resolvedUri===a.key.resolvedUri&&le.push(a.map.key);const ue=bt(e,{uri:a.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Ie=ZS(a,le,F,I),be={uri:a.key.resolvedUri};I({type:"segmentkeyloadstart",segment:a,keyInfo:be});const Ae=s(ue,Ie);G.push(Ae)}if(a.map&&!a.map.bytes){if(a.map.key&&(!a.key||a.key.resolvedUri!==a.map.key.resolvedUri)){const Ae=bt(e,{uri:a.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),fe=ZS(a,[a.map.key],F,I),Pe={uri:a.map.key.resolvedUri};I({type:"segmentkeyloadstart",segment:a,keyInfo:Pe});const rt=s(Ae,fe);G.push(rt)}const ue=bt(e,{uri:a.map.resolvedUri,responseType:"arraybuffer",headers:Cy(a.map),requestType:"segment-media-initialization"}),Ie=l8({segment:a,finishProcessingFn:F,triggerSegmentEventFn:I});I({type:"segmentloadstart",segment:a});const be=s(ue,Ie);G.push(be)}const Y=bt(e,{uri:a.part&&a.part.resolvedUri||a.resolvedUri,responseType:"arraybuffer",headers:Cy(a),requestType:"segment"}),K=u8({segment:a,finishProcessingFn:F,responseType:Y.responseType,triggerSegmentEventFn:I});I({type:"segmentloadstart",segment:a});const se=s(Y,K);se.addEventListener("progress",p8({segment:a,progressFn:u,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:m,audioSegmentTimingInfoFn:b,id3Fn:S,captionsFn:E,isEndOfTimeline:A,endedTimelineFn:R,dataFn:N})),G.push(se);const Q={};return G.forEach(le=>{le.addEventListener("loadend",f8({loadendState:Q,abortFn:o}))}),()=>ky(G)},Pp=Kn("PlaylistSelector"),ix=function(s){if(!s||!s.playlist)return;const e=s.playlist;return JSON.stringify({id:e.id,bandwidth:s.bandwidth,width:s.width,height:s.height,codecs:e.attributes&&e.attributes.CODECS||""})},xu=function(s,e){if(!s)return"";const i=B.getComputedStyle(s);return i?i[e]:""},Eu=function(s,e){const i=s.slice();s.sort(function(a,o){const u=e(a,o);return u===0?i.indexOf(a)-i.indexOf(o):u})},Ry=function(s,e){let i,a;return s.attributes.BANDWIDTH&&(i=s.attributes.BANDWIDTH),i=i||B.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(a=e.attributes.BANDWIDTH),a=a||B.Number.MAX_VALUE,i-a},g8=function(s,e){let i,a;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(i=s.attributes.RESOLUTION.width),i=i||B.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(a=e.attributes.RESOLUTION.width),a=a||B.Number.MAX_VALUE,i===a&&s.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?s.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-a};let nx=function(s){const{main:e,bandwidth:i,playerWidth:a,playerHeight:o,playerObjectFit:u,limitRenditionByPlayerDimensions:c,playlistController:f}=s;if(!e)return;const m={bandwidth:i,width:a,height:o,limitRenditionByPlayerDimensions:c};let b=e.playlists;yn.isAudioOnly(e)&&(b=f.getAudioTrackPlaylists_(),m.audioOnly=!0);let S=b.map(Q=>{let le;const ue=Q.attributes&&Q.attributes.RESOLUTION&&Q.attributes.RESOLUTION.width,Ie=Q.attributes&&Q.attributes.RESOLUTION&&Q.attributes.RESOLUTION.height;return le=Q.attributes&&Q.attributes.BANDWIDTH,le=le||B.Number.MAX_VALUE,{bandwidth:le,width:ue,height:Ie,playlist:Q}});Eu(S,(Q,le)=>Q.bandwidth-le.bandwidth),S=S.filter(Q=>!yn.isIncompatible(Q.playlist));let E=S.filter(Q=>yn.isEnabled(Q.playlist));E.length||(E=S.filter(Q=>!yn.isDisabled(Q.playlist)));const A=E.filter(Q=>Q.bandwidth*yi.BANDWIDTH_VARIANCE<i);let R=A[A.length-1];const N=A.filter(Q=>Q.bandwidth===R.bandwidth)[0];if(c===!1){const Q=N||E[0]||S[0];if(Q&&Q.playlist){let le="sortedPlaylistReps";return N&&(le="bandwidthBestRep"),E[0]&&(le="enabledPlaylistReps"),Pp(`choosing ${ix(Q)} using ${le} with options`,m),Q.playlist}return Pp("could not choose a playlist with options",m),null}const w=A.filter(Q=>Q.width&&Q.height);Eu(w,(Q,le)=>Q.width-le.width);const H=w.filter(Q=>Q.width===a&&Q.height===o);R=H[H.length-1];const I=H.filter(Q=>Q.bandwidth===R.bandwidth)[0];let G,F,Y;I||(G=w.filter(Q=>u==="cover"?Q.width>a&&Q.height>o:Q.width>a||Q.height>o),F=G.filter(Q=>Q.width===G[0].width&&Q.height===G[0].height),R=F[F.length-1],Y=F.filter(Q=>Q.bandwidth===R.bandwidth)[0]);let K;if(f.leastPixelDiffSelector){const Q=w.map(le=>(le.pixelDiff=Math.abs(le.width-a)+Math.abs(le.height-o),le));Eu(Q,(le,ue)=>le.pixelDiff===ue.pixelDiff?ue.bandwidth-le.bandwidth:le.pixelDiff-ue.pixelDiff),K=Q[0]}const se=K||Y||I||N||E[0]||S[0];if(se&&se.playlist){let Q="sortedPlaylistReps";return K?Q="leastPixelDiffRep":Y?Q="resolutionPlusOneRep":I?Q="resolutionBestRep":N?Q="bandwidthBestRep":E[0]&&(Q="enabledPlaylistReps"),Pp(`choosing ${ix(se)} using ${Q} with options`,m),se.playlist}return Pp("could not choose a playlist with options",m),null};const sx=function(){let s=this.useDevicePixelRatio&&B.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),nx({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(xu(this.tech_.el(),"width"),10)*s,playerHeight:parseInt(xu(this.tech_.el(),"height"),10)*s,playerObjectFit:this.usePlayerObjectFit?xu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},y8=function(s){let e=-1,i=-1;if(s<0||s>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let a=this.useDevicePixelRatio&&B.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(a=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=s*this.systemBandwidth+(1-s)*e,i=this.systemBandwidth),nx({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(xu(this.tech_.el(),"width"),10)*a,playerHeight:parseInt(xu(this.tech_.el(),"height"),10)*a,playerObjectFit:this.usePlayerObjectFit?xu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},v8=function(s){const{main:e,currentTime:i,bandwidth:a,duration:o,segmentDuration:u,timeUntilRebuffer:c,currentTimeline:f,syncController:m}=s,b=e.playlists.filter(N=>!yn.isIncompatible(N));let S=b.filter(yn.isEnabled);S.length||(S=b.filter(N=>!yn.isDisabled(N)));const A=S.filter(yn.hasAttribute.bind(null,"BANDWIDTH")).map(N=>{const H=m.getSyncPoint(N,o,f,i)?1:2,G=yn.estimateSegmentRequestTime(u,a,N)*H-c;return{playlist:N,rebufferingImpact:G}}),R=A.filter(N=>N.rebufferingImpact<=0);return Eu(R,(N,w)=>Ry(w.playlist,N.playlist)),R.length?R[0]:(Eu(A,(N,w)=>N.rebufferingImpact-w.rebufferingImpact),A[0]||null)},b8=function(){const s=this.playlists.main.playlists.filter(yn.isEnabled);return Eu(s,(i,a)=>Ry(i,a)),s.filter(i=>!!Ld(this.playlists.main,i).video)[0]||null},_8=s=>{let e=0,i;return s.bytes&&(i=new Uint8Array(s.bytes),s.segments.forEach(a=>{i.set(a,e),e+=a.byteLength})),i};function ax(s){try{return new URL(s).pathname.split("/").slice(-2).join("/")}catch{return""}}const T8=function(s,e,i){if(!s[i]){e.trigger({type:"usage",name:"vhs-608"});let a=i;/^cc708_/.test(i)&&(a="SERVICE"+i.split("_")[1]);const o=e.textTracks().getTrackById(a);if(o)s[i]=o;else{const u=e.options_.vhs&&e.options_.vhs.captionServices||{};let c=i,f=i,m=!1;const b=u[a];b&&(c=b.label,f=b.language,m=b.default),s[i]=e.addRemoteTextTrack({kind:"captions",id:a,default:m,label:c,language:f},!1).track}}},S8=function({inbandTextTracks:s,captionArray:e,timestampOffset:i}){if(!e)return;const a=B.WebKitDataCue||B.VTTCue;e.forEach(o=>{const u=o.stream;o.content?o.content.forEach(c=>{const f=new a(o.startTime+i,o.endTime+i,c.text);f.line=c.line,f.align="left",f.position=c.position,f.positionAlign="line-left",s[u].addCue(f)}):s[u].addCue(new a(o.startTime+i,o.endTime+i,o.text))})},x8=function(s){Object.defineProperties(s.frame,{id:{get(){return $.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return $.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return $.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},E8=({inbandTextTracks:s,metadataArray:e,timestampOffset:i,videoDuration:a})=>{if(!e)return;const o=B.WebKitDataCue||B.VTTCue,u=s.metadataTrack_;if(!u||(e.forEach(S=>{const E=S.cueTime+i;typeof E!="number"||B.isNaN(E)||E<0||!(E<1/0)||!S.frames||!S.frames.length||S.frames.forEach(A=>{const R=new o(E,E,A.value||A.url||A.data||"");R.frame=A,R.value=A,x8(R),u.addCue(R)})}),!u.cues||!u.cues.length))return;const c=u.cues,f=[];for(let S=0;S<c.length;S++)c[S]&&f.push(c[S]);const m=f.reduce((S,E)=>{const A=S[E.startTime]||[];return A.push(E),S[E.startTime]=A,S},{}),b=Object.keys(m).sort((S,E)=>Number(S)-Number(E));b.forEach((S,E)=>{const A=m[S],R=isFinite(a)?a:S,N=Number(b[E+1])||R;A.forEach(w=>{w.endTime=N})})},C8={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},A8=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),w8=({inbandTextTracks:s,dateRanges:e})=>{const i=s.metadataTrack_;if(!i)return;const a=B.WebKitDataCue||B.VTTCue;e.forEach(o=>{for(const u of Object.keys(o)){if(A8.has(u))continue;const c=new a(o.startTime,o.endTime,"");c.id=o.id,c.type="com.apple.quicktime.HLS",c.value={key:C8[u],data:o[u]},(u==="scte35Out"||u==="scte35In")&&(c.value.data=new Uint8Array(c.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(c)}o.processDateRange()})},rx=(s,e,i)=>{s.metadataTrack_||(s.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,$.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},Id=function(s,e,i){let a,o;if(i&&i.cues)for(a=i.cues.length;a--;)o=i.cues[a],o.startTime>=s&&o.endTime<=e&&i.removeCue(o)},D8=function(s){const e=s.cues;if(!e)return;const i={};for(let a=e.length-1;a>=0;a--){const o=e[a],u=`${o.startTime}-${o.endTime}-${o.text}`;i[u]?s.removeCue(o):i[u]=o}},k8=(s,e,i)=>{if(typeof e>"u"||e===null||!s.length)return[];const a=Math.ceil((e-i+3)*Do.ONE_SECOND_IN_TS);let o;for(o=0;o<s.length&&!(s[o].pts>a);o++);return s.slice(o)},O8=(s,e,i)=>{if(!e.length)return s;if(i)return e.slice();const a=e[0].pts;let o=0;for(o;o<s.length&&!(s[o].pts>=a);o++);return s.slice(0,o).concat(e)},R8=(s,e,i,a)=>{const o=Math.ceil((e-a)*Do.ONE_SECOND_IN_TS),u=Math.ceil((i-a)*Do.ONE_SECOND_IN_TS),c=s.slice();let f=s.length;for(;f--&&!(s[f].pts<=u););if(f===-1)return c;let m=f+1;for(;m--&&!(s[m].pts<=o););return m=Math.max(m,0),c.splice(m,f-m+1),c},M8=function(s,e){if(!s&&!e||!s&&e||s&&!e)return!1;if(s===e)return!0;const i=Object.keys(s).sort(),a=Object.keys(e).sort();if(i.length!==a.length)return!1;for(let o=0;o<i.length;o++){const u=i[o];if(u!==a[o]||s[u]!==e[u])return!1}return!0},L8=function(s,e,i){e=e||[];const a=[];let o=0;for(let u=0;u<e.length;u++){const c=e[u];if(s===c.timeline&&(a.push(u),o+=c.duration,o>i))return u}return a.length===0?0:a[a.length-1]},Pd=1,I8=500,ox=s=>typeof s=="number"&&isFinite(s),Np=1/60,P8=(s,e,i)=>s!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,N8=(s,e,i)=>{let a=e-yi.BACK_BUFFER_LENGTH;s.length&&(a=Math.max(a,s.start(0)));const o=e-i;return Math.min(o,a)},Cu=s=>{const{startOfSegment:e,duration:i,segment:a,part:o,playlist:{mediaSequence:u,id:c,segments:f=[]},mediaIndex:m,partIndex:b,timeline:S}=s,E=f.length-1;let A="mediaIndex/partIndex increment";s.getMediaInfoForTime?A=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(A="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(A+=` with independent ${s.independent}`);const R=typeof b=="number",N=s.segment.uri?"segment":"pre-segment",w=R?fS({preloadSegment:a})-1:0;return`${N} [${u+m}/${u+E}]`+(R?` part [${b}/${w}]`:"")+` segment start/end [${a.start} => ${a.end}]`+(R?` part start/end [${o.start} => ${o.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${S}] selected by [${A}] playlist [${c}]`},lx=s=>`${s}TimingInfo`,U8=({segmentTimeline:s,currentTimeline:e,startOfSegment:i,buffered:a,overrideCheck:o})=>!o&&s===e?null:s<e?i:a.length?a.end(a.length-1):i,My=({timelineChangeController:s,currentTimeline:e,segmentTimeline:i,loaderType:a,audioDisabled:o})=>{if(e===i)return!1;if(a==="audio"){const u=s.lastTimelineChange({type:"main"});return!u||u.to!==i}if(a==="main"&&o){const u=s.pendingTimelineChange({type:"audio"});return!(u&&u.to===i)}return!1},B8=s=>{if(!s)return!1;const e=s.pendingTimelineChange({type:"audio"}),i=s.pendingTimelineChange({type:"main"}),a=e&&i,o=a&&e.to!==i.to;return!!(a&&e.from!==-1&&i.from!==-1&&o)},F8=s=>{const e=s.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=s.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},Mr=s=>{const e=s.pendingSegment_;if(!e)return;if(My({timelineChangeController:s.timelineChangeController_,currentTimeline:s.currentTimeline_,segmentTimeline:e.timeline,loaderType:s.loaderType_,audioDisabled:s.audioDisabled_})&&B8(s.timelineChangeController_)){if(F8(s)){s.timelineChangeController_.trigger("audioTimelineBehind");return}s.timelineChangeController_.trigger("fixBadTimelineChange")}},H8=s=>{let e=0;return["video","audio"].forEach(function(i){const a=s[`${i}TimingInfo`];if(!a)return;const{start:o,end:u}=a;let c;typeof o=="bigint"||typeof u=="bigint"?c=B.BigInt(u)-B.BigInt(o):typeof o=="number"&&typeof u=="number"&&(c=u-o),typeof c<"u"&&c>e&&(e=c)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},ux=({segmentDuration:s,maxDuration:e})=>s?Math.round(s)>e+$s:!1,j8=(s,e)=>{if(e!=="hls")return null;const i=H8({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!i)return null;const a=s.playlist.targetDuration,o=ux({segmentDuration:i,maxDuration:a*2}),u=ux({segmentDuration:i,maxDuration:a}),c=`Segment with index ${s.mediaIndex} from playlist ${s.playlist.id} has a duration of ${i} when the reported duration is ${s.duration} and the target duration is ${a}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return o||u?{severity:o?"warn":"info",message:c}:null},Bo=({type:s,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),a=!!(e.map&&!e.map.bytes),o=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:s||e.type,uri:e.resolvedUri||e.uri,start:o,duration:e.duration,isEncrypted:i,isMediaInitialization:a}};class Ly extends $.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=Kn(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(a){a!==this.state_&&(this.logger_(`${this.state_} -> ${a}`),this.state_=a,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mr(this)}),this.sourceUpdater_.on("codecschange",a=>{this.trigger(Vt({type:"codecschange"},a))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mr(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",a=>{this.trigger(Vt({type:"timelinechange"},a)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Mr(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mr(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Dy.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&B.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,B.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Dy.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return gi();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:a,isMuxed:o}=e;if(a&&i&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const a=Ip(e);let o=this.initSegments_[a];return i&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e}segmentKey(e,i=!1){if(!e)return null;const a=NS(e);let o=this.keyCache_[a];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});const u={resolvedUri:(o||e).resolvedUri};return o&&(u.bytes=o.bytes),u}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let u=null;if(a&&(a.id?u=a.id:a.uri&&(u=a.uri)),this.logger_(`playlist update [${u} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
currentTime: ${this.currentTime_()}
bufferedEnd: ${my(this.buffered_())}
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const c=e.mediaSequence-a.mediaSequence;if(this.logger_(`live window shift [${c}]`),this.mediaIndex!==null)if(this.mediaIndex-=c,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){const m=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=m}}o&&(o.mediaIndex-=c,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}pause(){this.checkBufferTimeout_&&(B.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Dy.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,i,a=()=>{},o=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let u=1;const c=()=>{u--,u===0&&a()};(o||!this.audioDisabled_)&&(u++,this.sourceUpdater_.removeAudio(e,i,c)),(o||this.loaderType_==="main")&&(this.gopBuffer_=R8(this.gopBuffer_,e,i,this.timeMapping_),u++,this.sourceUpdater_.removeVideo(e,i,c));for(const f in this.inbandTextTracks_)Id(e,i,this.inbandTextTracks_[f]);Id(e,i,this.segmentMetadataTrack_),c()}monitorBuffer_(){this.checkBufferTimeout_&&B.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=B.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&B.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=B.setTimeout(this.monitorBufferTick_.bind(this),I8)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:Bo({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,a=this.partIndex){if(!i||!this.mediaSource_)return!1;const o=typeof e=="number"&&i.segments[e],u=e+1===i.segments.length,c=!o||!o.parts||a+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&u&&c}chooseNextRequest_(){const e=this.buffered_(),i=my(e)||0,a=gy(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,u=a>=this.goalBufferLength_(),c=this.playlist_.segments;if(!c.length||o||u)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(f.isSyncRequest)f.mediaIndex=L8(this.currentTimeline_,c,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${f.mediaIndex}`);else if(this.mediaIndex!==null){const A=c[this.mediaIndex],R=typeof this.partIndex=="number"?this.partIndex:-1;f.startOfSegment=A.end?A.end:i,A.parts&&A.parts[R+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=R+1):f.mediaIndex=this.mediaIndex+1}else{let A,R,N;const w=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
For TargetTime: ${w}.
CurrentTime: ${this.currentTime_()}
BufferedEnd: ${i}
Fetch At Buffer: ${this.fetchAtBuffer_}
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const H=this.getSyncInfoFromMediaSequenceSync_(w);if(!H){const I="No sync info found while using media sequence sync";return this.error({message:I,metadata:{errorType:$.Error.StreamingFailedToSelectNextSegment,error:new Error(I)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${H.start} --> ${H.end})`),A=H.segmentIndex,R=H.partIndex,N=H.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const H=yn.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:w,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});A=H.segmentIndex,R=H.partIndex,N=H.startTime}f.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${w}`:`currentTime ${w}`,f.mediaIndex=A,f.startOfSegment=N,f.partIndex=R,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${f.mediaIndex} `)}const m=c[f.mediaIndex];let b=m&&typeof f.partIndex=="number"&&m.parts&&m.parts[f.partIndex];if(!m||typeof f.partIndex=="number"&&!b)return null;typeof f.partIndex!="number"&&m.parts&&(f.partIndex=0,b=m.parts[0]);const S=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!a&&b&&!S&&!b.independent)if(f.partIndex===0){const A=c[f.mediaIndex-1],R=A.parts&&A.parts.length&&A.parts[A.parts.length-1];R&&R.independent&&(f.mediaIndex-=1,f.partIndex=A.parts.length-1,f.independent="previous segment")}else m.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");const E=this.mediaSource_&&this.mediaSource_.readyState==="ended";return f.mediaIndex>=c.length-1&&E&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,f.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(f))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const i=Math.max(e,this.mediaSequenceSync_.start);e!==i&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${i}`);const a=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!a)return null;if(!a.isAppended)return a;const o=this.mediaSequenceSync_.getSyncInfoForTime(a.end);return o?(o.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),o):null}generateSegmentInfo_(e){const{independent:i,playlist:a,mediaIndex:o,startOfSegment:u,isSyncRequest:c,partIndex:f,forceTimestampOffset:m,getMediaInfoForTime:b}=e,S=a.segments[o],E=typeof f=="number"&&S.parts[f],A={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||S.resolvedUri,mediaIndex:o,partIndex:E?f:null,isSyncRequest:c,startOfSegment:u,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:S.timeline,duration:E&&E.duration||S.duration,segment:S,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:b,independent:i},R=typeof m<"u"?m:this.isPendingTimestampOffset_;A.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:S.timeline,currentTimeline:this.currentTimeline_,startOfSegment:u,buffered:this.buffered_(),overrideCheck:R});const N=my(this.sourceUpdater_.audioBuffered());return typeof N=="number"&&(A.audioAppendStart=N-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(A.gopsToAlignWith=k8(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),A}timestampOffsetForSegment_(e){return U8(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const i=this.currentTime_(),a=e.bandwidth,o=this.pendingSegment_.duration,u=yn.estimateSegmentRequestTime(o,a,this.playlist_,e.bytesReceived),c=lR(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(u<=c)return;const f=v8({main:this.vhs_.playlists.main,currentTime:i,bandwidth:a,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:c,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!f)return;const b=u-c-f.rebufferingImpact;let S=.5;c<=$s&&(S=1),!(!f.playlist||f.playlist.uri===this.playlist_.uri||b<S)&&(this.bandwidth=f.playlist.attributes.BANDWIDTH*yi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Cu(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:a,hasVideo:o}=i,u={segmentInfo:Bo({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:a,hasVideo:o}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:u}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},M8(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mr(this))))}handleTimingInfo_(e,i,a,o){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const u=this.pendingSegment_,c=lx(i);u[c]=u[c]||{},u[c][a]=o,this.logger_(`timinginfo: ${i} - ${a} - ${o}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Mr(this)}handleCaptions_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return}const o=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),u={};i.forEach(c=>{u[c.stream]=u[c.stream]||{startTime:1/0,captions:[],endTime:0};const f=u[c.stream];f.startTime=Math.min(f.startTime,c.startTime+o),f.endTime=Math.max(f.endTime,c.endTime+o),f.captions.push(c)}),Object.keys(u).forEach(c=>{const{startTime:f,endTime:m,captions:b}=u[c],S=this.inbandTextTracks_;this.logger_(`adding cues from ${f} -> ${m} for ${c}`),T8(S,this.vhs_.tech_,c),Id(f,m,S[c]),S8({captionArray:b,inbandTextTracks:S,timestampOffset:o})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,a){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,a));return}this.addMetadataToTextTrack(a,i,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(i=>i())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(i=>i())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!My({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;const{hasAudio:a,hasVideo:o,isMuxed:u}=i;return!(o&&!e.videoTimingInfo||a&&!this.audioDisabled_&&!u&&!e.audioTimingInfo||My({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){Mr(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return}const a=this.pendingSegment_;if(this.setTimeMapping_(a.timeline),this.updateMediaSecondsLoaded_(a.part||a.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),a.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),a.isFmp4=e.isFmp4,a.timingInfo=a.timingInfo||{},a.isFmp4)this.trigger("fmp4"),a.timingInfo.start=a[lx(i.type)].start;else{const o=this.getCurrentMediaInfo_(),u=this.loaderType_==="main"&&o&&o.hasVideo;let c;u&&(c=a.videoTimingInfo.start),a.timingInfo.start=this.trueSegmentStart_({currentStart:a.timingInfo.start,playlist:a.playlist,mediaIndex:a.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:u,firstVideoFrameTimeForData:c,videoTimingInfo:a.videoTimingInfo,audioTimingInfo:a.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(a,i.type),this.updateSourceBufferTimestampOffset_(a),a.isSyncRequest){this.updateTimingInfoEnd_(a),this.syncController_.saveSegmentTimingInfo({segmentInfo:a,shouldSaveTimelineMapping:this.loaderType_==="main"});const o=this.chooseNextRequest_();if(o.mediaIndex!==a.mediaIndex||o.partIndex!==a.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}a.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(a,i)}}updateAppendInitSegmentStatus(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:i,map:a,playlist:o}){if(a){const u=Ip(a);if(this.activeInitSegmentId_===u)return null;i=this.initSegmentForMap(a,!0).bytes,this.activeInitSegmentId_=u}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=o,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:a},o){const u=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+No(u).join(", ")),c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+No(c).join(", "));const f=u.length?u.start(0):0,m=u.length?u.end(u.length-1):0,b=c.length?c.start(0):0,S=c.length?c.end(c.length-1):0;if(m-f<=Pd&&S-b<=Pd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${a.byteLength}, audio buffer: ${No(u).join(", ")}, video buffer: ${No(c).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:i,bytes:a}));const A=this.currentTime_()-Pd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${A}`),this.remove(0,A,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Pd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=B.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Pd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:a},o){if(o){if(o.code===AS){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:a});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",o),this.error({message:`${i} append of ${a.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:$.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:a,data:o,bytes:u}){if(!u){const f=[o];let m=o.byteLength;a&&(f.unshift(a),m+=a.byteLength),u=_8({bytes:m,segments:f})}const c={segmentInfo:Bo({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:c}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:u}))}handleSegmentTimingInfo_(e,i,a){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const o=this.pendingSegment_.segment,u=`${e}TimingInfo`;o[u]||(o[u]={}),o[u].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[u].transmuxedPresentationStart=a.start.presentation,o[u].transmuxedDecodeStart=a.start.decode,o[u].transmuxedPresentationEnd=a.end.presentation,o[u].transmuxedDecodeEnd=a.end.decode,o[u].baseMediaDecodeTime=a.baseMediaDecodeTime}appendData_(e,i){const{type:a,data:o}=i;if(!o||!o.byteLength||a==="audio"&&this.audioDisabled_)return;const u=this.getInitSegmentAndUpdateState_({type:a,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:u,data:o})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){Mr(this),this.loadQueue_.push(()=>{const i=Vt({},e,{forceTimestampOffset:!0});Vt(e,this.generateSegmentInfo_(i)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const i=this.createSimplifiedSegmentObj_(e),a=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),o=this.mediaIndex!==null,u=e.timeline!==this.currentTimeline_&&e.timeline>0,c=a||o&&u;this.logger_(`Requesting
${ax(e.uri)}
${Cu(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=m8({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:f,level:m,stream:b})=>{this.logger_(`${Cu(e)} logged from transmuxer stream ${b} as a ${m}: ${f}`)},triggerSegmentEventFn:({type:f,segment:m,keyInfo:b,trackInfo:S,timingInfo:E})=>{const R={segmentInfo:Bo({segment:m})};b&&(R.keyInfo=b),S&&(R.trackInfo=S),E&&(R.timingInfo=E),this.trigger({type:f,metadata:R})}})}trimBackBuffer_(e){const i=N8(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,a=e.part,o=e.segment.key||e.segment.map&&e.segment.map.key,u=e.segment.map&&!e.segment.map.bytes,c={resolvedUri:a?a.resolvedUri:i.resolvedUri,byterange:a?a.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:o,isMediaInitialization:u},f=e.playlist.segments[e.mediaIndex-1];if(f&&f.timeline===i.timeline&&(f.videoTimingInfo?c.baseStartTime=f.videoTimingInfo.transmuxedDecodeEnd:f.audioTimingInfo&&(c.baseStartTime=f.audioTimingInfo.transmuxedDecodeEnd)),i.key){const m=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);c.key=this.segmentKey(i.key),c.key.iv=m}return i.map&&(c.map=this.initSegmentForMap(i.map)),c}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<Np){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${Np}`);return}const a={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:a}),this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,i,a){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,a));return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Xs.ABORTED)return;if(this.pause(),e.code===Xs.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,i.stats),o.endOfAllRequests=i.endOfAllRequests,a.gopInfo&&(this.gopBuffer_=O8(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}setTimeMapping_(e){const i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:i,mediaIndex:a,firstVideoFrameTimeForData:o,currentVideoTimestampOffset:u,useVideoTimingInfo:c,videoTimingInfo:f,audioTimingInfo:m}){if(typeof e<"u")return e;if(!c)return m.start;const b=i.segments[a-1];return a===0||!b||typeof b.start>"u"||b.end!==o+u?o:f.start}waitForAppendsToComplete_(e){const i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:a,hasVideo:o,isMuxed:u}=i,c=this.loaderType_==="main"&&o,f=!this.audioDisabled_&&a&&!u;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}c&&e.waitingOnAppends++,f&&e.waitingOnAppends++,c&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const i=P8(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:i,timingInfo:a}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:a.start:a.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const i=this.getMediaInfo_(),o=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;o&&(e.timingInfo.end=typeof o.end=="number"?o.end:o.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const m={segmentInfo:Bo({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:m})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=j8(e,this.sourceType_);if(i&&(i.severity==="warn"?$.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Cu(e)}`);return}this.logger_(`Appended ${Cu(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const a=e.segment,o=e.part,u=a.end&&this.currentTime_()-a.end>e.playlist.targetDuration*3,c=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(u||c){this.logger_(`bad ${u?"segment":"part"} ${Cu(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<Np){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${Np}`);return}const i=this.throughput.rate,a=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/a*8*1e3);this.throughput.rate+=(o-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,a=i.start,o=i.end;if(!ox(a)||!ox(o))return;Id(a,o,this.segmentMetadataTrack_);const u=B.WebKitDataCue||B.VTTCue,c={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,programDateTime:i.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:a,end:o},f=JSON.stringify(c),m=new u(a,o,f);m.value=c,this.segmentMetadataTrack_.addCue(m)}}function Ua(){}const cx=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},z8=["video","audio"],Iy=(s,e)=>{const i=e[`${s}Buffer`];return i&&i.updating||e.queuePending[s]},V8=(s,e)=>{for(let i=0;i<e.length;i++){const a=e[i];if(a.type==="mediaSource")return null;if(a.type===s)return i}return null},Au=(s,e)=>{if(e.queue.length===0)return;let i=0,a=e.queue[i];if(a.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),a.action(e),a.doneFn&&a.doneFn(),Au("audio",e),Au("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Iy(s,e))){if(a.type!==s){if(i=V8(s,e.queue),i===null)return;a=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[s]=a,a.action(s,e),!a.doneFn){e.queuePending[s]=null,Au(s,e);return}}},dx=(s,e)=>{const i=e[`${s}Buffer`],a=cx(s);i&&(i.removeEventListener("updateend",e[`on${a}UpdateEnd_`]),i.removeEventListener("error",e[`on${a}Error_`]),e.codecs[s]=null,e[`${s}Buffer`]=null)},Ys=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,Rn={appendBuffer:(s,e,i)=>(a,o)=>{const u=o[`${a}Buffer`];if(Ys(o.mediaSource,u)){o.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${a}Buffer`);try{u.appendBuffer(s)}catch(c){o.logger_(`Error with code ${c.code} `+(c.code===AS?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${a}Buffer`),o.queuePending[a]=null,i(c)}}},remove:(s,e)=>(i,a)=>{const o=a[`${i}Buffer`];if(Ys(a.mediaSource,o)){a.logger_(`Removing ${s} to ${e} from ${i}Buffer`);try{o.remove(s,e)}catch{a.logger_(`Remove ${s} to ${e} from ${i}Buffer failed`)}}},timestampOffset:s=>(e,i)=>{const a=i[`${e}Buffer`];Ys(i.mediaSource,a)&&(i.logger_(`Setting ${e}timestampOffset to ${s}`),a.timestampOffset=s)},callback:s=>(e,i)=>{s()},endOfStream:s=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${s||""})`);try{e.mediaSource.endOfStream(s)}catch(i){$.log.warn("Failed to call media source endOfStream",i)}}},duration:s=>e=>{e.logger_(`Setting mediaSource duration to ${s}`);try{e.mediaSource.duration=s}catch(i){$.log.warn("Failed to set media source duration",i)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${s}Buffer`];if(Ys(e.mediaSource,i)){e.logger_(`calling abort on ${s}Buffer`);try{i.abort()}catch(a){$.log.warn(`Failed to abort on ${s}Buffer`,a)}}},addSourceBuffer:(s,e)=>i=>{const a=cx(s),o=zl(e);i.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const u=i.mediaSource.addSourceBuffer(o);u.addEventListener("updateend",i[`on${a}UpdateEnd_`]),u.addEventListener("error",i[`on${a}Error_`]),i.codecs[s]=e,i[`${s}Buffer`]=u},removeSourceBuffer:s=>e=>{const i=e[`${s}Buffer`];if(dx(s,e),!!Ys(e.mediaSource,i)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(a){$.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,a)}}},changeType:s=>(e,i)=>{const a=i[`${e}Buffer`],o=zl(s);if(!Ys(i.mediaSource,a))return;const u=s.substring(0,s.indexOf(".")),c=i.codecs[e];if(c.substring(0,c.indexOf("."))===u)return;const m={codecsChangeInfo:{from:c,to:s}};i.trigger({type:"codecschange",metadata:m}),i.logger_(`changing ${e}Buffer codec from ${c} to ${s}`);try{a.changeType(o),i.codecs[e]=s}catch(b){m.errorType=$.Error.StreamingCodecsChangeError,m.error=b,b.metadata=m,i.error_=b,i.trigger("error"),$.log.warn(`Failed to changeType on ${e}Buffer`,b)}}},Mn=({type:s,sourceUpdater:e,action:i,doneFn:a,name:o})=>{e.queue.push({type:s,action:i,doneFn:a,name:o}),Au(s,e)},hx=(s,e)=>i=>{const a=e[`${s}Buffered`](),o=aR(a);if(e.logger_(`received "updateend" event for ${s} Source Buffer: `,o),e.queuePending[s]){const u=e.queuePending[s].doneFn;e.queuePending[s]=null,u&&u(e[`${s}Error_`])}Au(s,e)};class fx extends $.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Au("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Kn("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=hx("video",this),this.onAudioUpdateEnd_=hx("audio",this),this.onVideoError_=i=>{this.videoError_=i},this.onAudioError_=i=>{this.audioError_=i},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,i){Mn({type:"mediaSource",sourceUpdater:this,action:Rn.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){Mn({type:e,sourceUpdater:this,action:Rn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){$.log.error("removeSourceBuffer is not supported!");return}Mn({type:"mediaSource",sourceUpdater:this,action:Rn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!$.browser.IS_FIREFOX&&B.MediaSource&&B.MediaSource.prototype&&typeof B.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return B.SourceBuffer&&B.SourceBuffer.prototype&&typeof B.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){$.log.error("changeType is not supported!");return}Mn({type:e,sourceUpdater:this,action:Rn.changeType(i),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(i=>{const a=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,a);this.canChangeType()&&this.changeType(i,a)})}appendBuffer(e,i){const{segmentInfo:a,type:o,bytes:u}=e;if(this.processedAppend_=!0,o==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${u.length} until video append`);return}const c=i;if(Mn({type:o,sourceUpdater:this,action:Rn.appendBuffer(u,a||{mediaIndex:-1},c),doneFn:i,name:"appendBuffer"}),o==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const f=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${f.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,f.forEach(m=>{this.appendBuffer.apply(this,m)})}}audioBuffered(){return Ys(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:gi()}videoBuffered(){return Ys(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:gi()}buffered(){const e=Ys(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=Ys(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():oR(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=Ua){Mn({type:"mediaSource",sourceUpdater:this,action:Rn.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=Ua){typeof e!="string"&&(e=void 0),Mn({type:"mediaSource",sourceUpdater:this,action:Rn.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,a=Ua){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){a();return}Mn({type:"audio",sourceUpdater:this,action:Rn.remove(e,i),doneFn:a,name:"remove"})}removeVideo(e,i,a=Ua){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){a();return}Mn({type:"video",sourceUpdater:this,action:Rn.remove(e,i),doneFn:a,name:"remove"})}updating(){return!!(Iy("audio",this)||Iy("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Mn({type:"audio",sourceUpdater:this,action:Rn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(Mn({type:"video",sourceUpdater:this,action:Rn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&Mn({type:"audio",sourceUpdater:this,action:Rn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&Mn({type:"video",sourceUpdater:this,action:Rn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),z8.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>dx(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const px=s=>decodeURIComponent(escape(String.fromCharCode.apply(null,s))),q8=s=>{const e=new Uint8Array(s);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},mx=new Uint8Array(`
`.split("").map(s=>s.charCodeAt(0)));class $8 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class G8 extends Ly{constructor(e,i={}){super(e,i),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return gi();const e=this.subtitlesTrack_.cues,i=e[0].startTime,a=e[e.length-1].startTime;return gi([[i,a]])}initSegmentForMap(e,i=!1){if(!e)return null;const a=Ip(e);let o=this.initSegments_[a];if(i&&!o&&e.bytes){const u=mx.byteLength+e.bytes.byteLength,c=new Uint8Array(u);c.set(e.bytes),c.set(mx,e.bytes.byteLength),this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:c}}return o||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,i){Id(e,i,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const i=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",i),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,i,a){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Xs.TIMEOUT&&this.handleTimeout_(),e.code===Xs.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const o=this.pendingSegment_,u=a.mp4VttCues&&a.mp4VttCues.length;u&&(o.mp4VttCues=a.mp4VttCues),this.saveBandwidthRelatedStats_(o.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");const c=o.segment;if(c.map&&(c.map.bytes=i.map.bytes),o.bytes=i.bytes,typeof B.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,a),()=>this.stopForError({message:"Error loading vtt.js"}));return}c.requested=!0;try{this.parseVTTCues_(o)}catch(f){this.stopForError({message:f.message,metadata:{errorType:$.Error.StreamingVttParserError,error:f}});return}if(u||this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=c.duration,o.cues.forEach(f=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new B.VTTCue(f.startTime,f.endTime,f.text):f)}),D8(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const a=e&&e.type==="vtt",o=i&&i.type==="text";a&&o&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(a=>{const o=a.start+i,u=a.end+i,c=new B.VTTCue(o,u,a.cueText);a.settings&&a.settings.split(" ").forEach(f=>{const m=f.split(":"),b=m[0],S=m[1];c[b]=isNaN(S)?S:Number(S)}),e.cues.push(c)})}parseVTTCues_(e){let i,a=!1;if(typeof B.WebVTT!="function")throw new $8;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof B.TextDecoder=="function"?i=new B.TextDecoder("utf8"):(i=B.WebVTT.StringDecoder(),a=!0);const o=new B.WebVTT.Parser(B,B.vttjs,i);if(o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=c=>{e.timestampmap=c},o.onparsingerror=c=>{$.log.warn("Error encountered when parsing cues: "+c.message)},e.segment.map){let c=e.segment.map.bytes;a&&(c=px(c)),o.parse(c)}let u=e.bytes;a&&(u=px(u)),o.parse(u),o.flush()}updateTimeMapping_(e,i,a){const o=e.segment;if(!i)return;if(!e.cues.length){o.empty=!0;return}const{MPEGTS:u,LOCAL:c}=e.timestampmap,m=u/Do.ONE_SECOND_IN_TS-c+i.mapping;if(e.cues.forEach(b=>{const S=b.endTime-b.startTime,E=this.handleRollover_(b.startTime+m,i.time);b.startTime=Math.max(E,0),b.endTime=Math.max(E+S,0)}),!a.syncInfo){const b=e.cues[0].startTime,S=e.cues[e.cues.length-1].startTime;a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(b,S-o.duration)}}}handleRollover_(e,i){if(i===null)return e;let a=e*Do.ONE_SECOND_IN_TS;const o=i*Do.ONE_SECOND_IN_TS;let u;for(o<a?u=-8589934592:u=8589934592;Math.abs(a-o)>4294967296;)a+=u;return a/Do.ONE_SECOND_IN_TS}}const X8=function(s,e){const i=s.cues;for(let a=0;a<i.length;a++){const o=i[a];if(e>=o.adStartTime&&e<=o.adEndTime)return o}return null},Y8=function(s,e,i=0){if(!s.segments)return;let a=i,o;for(let u=0;u<s.segments.length;u++){const c=s.segments[u];if(o||(o=X8(e,a+c.duration/2)),o){if("cueIn"in c){o.endTime=a,o.adEndTime=a,a+=c.duration,o=null;continue}if(a<o.endTime){a+=c.duration;continue}o.endTime+=c.duration}else if("cueOut"in c&&(o=new B.VTTCue(a,a+c.duration,c.cueOut),o.adStartTime=a,o.adEndTime=a+parseFloat(c.cueOut),e.addCue(o)),"cueOutCont"in c){const[f,m]=c.cueOutCont.split("/").map(parseFloat);o=new B.VTTCue(a,a+c.duration,""),o.adStartTime=a-f,o.adEndTime=o.adStartTime+m,e.addCue(o)}a+=c.duration}};class gx{constructor({start:e,end:i,segmentIndex:a,partIndex:o=null,appended:u=!1}){this.start_=e,this.end_=i,this.segmentIndex_=a,this.partIndex_=o,this.appended_=u}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class W8{constructor(e,i=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=i}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class yx{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,i){const{mediaSequence:a,segments:o}=e;if(this.isReliable_=this.isReliablePlaylist_(a,o),!!this.isReliable_)return this.updateStorage_(o,a,this.calculateBaseTime_(a,o,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:a}of this.storage_.values())if(a.length){for(const o of a)if(o.isInRange(e))return o}else if(i.isInRange(e))return i;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,i,a){const o=new Map;let u=`
`,c=a,f=i;this.start_=c,e.forEach((m,b)=>{const S=this.storage_.get(f),E=c,A=E+m.duration,R=!!(S&&S.segmentSyncInfo&&S.segmentSyncInfo.isAppended),N=new gx({start:E,end:A,appended:R,segmentIndex:b});m.syncInfo=N;let w=c;const H=(m.parts||[]).map((I,G)=>{const F=w,Y=w+I.duration,K=!!(S&&S.partsSyncInfo&&S.partsSyncInfo[G]&&S.partsSyncInfo[G].isAppended),se=new gx({start:F,end:Y,appended:K,segmentIndex:b,partIndex:G});return w=Y,u+=`Media Sequence: ${f}.${G} | Range: ${F} --> ${Y} | Appended: ${K}
`,I.syncInfo=se,se});o.set(f,new W8(N,H)),u+=`${ax(m.resolvedUri)} | Media Sequence: ${f} | Range: ${E} --> ${A} | Appended: ${R}
`,f++,c=A}),this.end_=c,this.storage_=o,this.diagnostics_=u}calculateBaseTime_(e,i,a){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const o=Math.min(...this.storage_.keys());if(e<o){const u=o-e;let c=this.storage_.get(o).segmentSyncInfo.start;for(let f=0;f<u;f++){const m=i[f];c-=m.duration}return c}return a}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class vx extends yx{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,a){if(!this.storage_.size){const o=this.parent_.getSyncInfoForMediaSequence(e);return o?o.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,a)}}const Q8=86400,Py=[{name:"VOD",run:(s,e,i,a,o)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(s,e,i,a,o,u)=>{const c=s.getMediaSequenceSync(u);if(!c||!c.isReliable)return null;const f=c.getSyncInfoForTime(o);return f?{time:f.start,partIndex:f.partIndex,segmentIndex:f.segmentIndex}:null}},{name:"ProgramDateTime",run:(s,e,i,a,o)=>{if(!Object.keys(s.timelineToDatetimeMappings).length)return null;let u=null,c=null;const f=vy(e);o=o||0;for(let m=0;m<f.length;m++){const b=e.endList||o===0?m:f.length-(m+1),S=f[b],E=S.segment,A=s.timelineToDatetimeMappings[E.timeline];if(!A||!E.dateTimeObject)continue;let N=E.dateTimeObject.getTime()/1e3+A;if(E.parts&&typeof S.partIndex=="number")for(let H=0;H<S.partIndex;H++)N+=E.parts[H].duration;const w=Math.abs(o-N);if(c!==null&&(w===0||c<w))break;c=w,u={time:N,segmentIndex:S.segmentIndex,partIndex:S.partIndex}}return u}},{name:"Segment",run:(s,e,i,a,o)=>{let u=null,c=null;o=o||0;const f=vy(e);for(let m=0;m<f.length;m++){const b=e.endList||o===0?m:f.length-(m+1),S=f[b],E=S.segment,A=S.part&&S.part.start||E&&E.start;if(E.timeline===a&&typeof A<"u"){const R=Math.abs(o-A);if(c!==null&&c<R)break;(!u||c===null||c>=R)&&(c=R,u={time:A,segmentIndex:S.segmentIndex,partIndex:S.partIndex})}}return u}},{name:"Discontinuity",run:(s,e,i,a,o)=>{let u=null;if(o=o||0,e.discontinuityStarts&&e.discontinuityStarts.length){let c=null;for(let f=0;f<e.discontinuityStarts.length;f++){const m=e.discontinuityStarts[f],b=e.discontinuitySequence+f+1,S=s.discontinuities[b];if(S){const E=Math.abs(o-S.time);if(c!==null&&c<E)break;(!u||c===null||c>=E)&&(c=E,u={time:S.time,segmentIndex:m,partIndex:null})}}}return u}},{name:"Playlist",run:(s,e,i,a,o)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class K8 extends $.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new yx,a=new vx(i),o=new vx(i);this.mediaSequenceStorage_={main:i,audio:a,vtt:o},this.logger_=Kn("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,a,o,u){if(i!==1/0)return Py.find(({name:m})=>m==="VOD").run(this,e,i);const c=this.runStrategies_(e,i,a,o,u);if(!c.length)return null;for(const f of c){const{syncPoint:m,strategy:b}=f,{segmentIndex:S,time:E}=m;if(S<0)continue;const A=e.segments[S],R=E,N=R+A.duration;if(this.logger_(`Strategy: ${b}. Current time: ${o}. selected segment: ${S}. Time: [${R} -> ${N}]}`),o>=R&&o<N)return this.logger_("Found sync point with exact match: ",m),m}return this.selectSyncPoint_(c,{key:"time",value:o})}getExpiredTime(e,i){if(!e||!e.segments)return null;const a=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!a.length)return null;const o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+Od({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))}runStrategies_(e,i,a,o,u){const c=[];for(let f=0;f<Py.length;f++){const m=Py[f],b=m.run(this,e,i,a,o,u);b&&(b.strategy=m.name,c.push({strategy:m.name,syncPoint:b}))}return c}selectSyncPoint_(e,i){let a=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),u=e[0].strategy;for(let c=1;c<e.length;c++){const f=Math.abs(e[c].syncPoint[i.key]-i.value);f<o&&(o=f,a=e[c].syncPoint,u=e[c].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${u}]: [time:${a.time}, segmentIndex:${a.segmentIndex}`+(typeof a.partIndex=="number"?`,partIndex:${a.partIndex}`:"")+"]"),a}saveExpiredSegmentInfo(e,i){const a=i.mediaSequence-e.mediaSequence;if(a>Q8){$.log.warn(`Not saving expired segment info. Media sequence gap ${a} is too large.`);return}for(let o=a-1;o>=0;o--){const u=e.segments[o];if(u&&typeof u.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:u.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const i=e.segments[0],a=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-a}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const a=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),o=e.segment;a&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:o.start}));const u=o.dateTimeObject;o.discontinuity&&i&&u&&(this.timelineToDatetimeMappings[o.timeline]=-(u.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,i,a){const o=e.segment,u=e.part;let c=this.timelines[e.timeline],f,m;if(typeof e.timestampOffset=="number")c={time:e.startOfSegment,mapping:e.startOfSegment-i.start},a&&(this.timelines[e.timeline]=c,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${c.time}] [mapping: ${c.mapping}]`)),f=e.startOfSegment,m=i.end+c.mapping;else if(c)f=i.start+c.mapping,m=i.end+c.mapping;else return!1;return u&&(u.start=f,u.end=m),(!o.start||f<o.start)&&(o.start=f),o.end=m,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,a=e.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let o=0;o<i.discontinuityStarts.length;o++){const u=i.discontinuityStarts[o],c=i.discontinuitySequence+o+1,f=u-e.mediaIndex,m=Math.abs(f);if(!this.discontinuities[c]||this.discontinuities[c].accuracy>m){let b;f<0?b=a.start-Od({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:u}):b=a.end+Od({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:u}),this.discontinuities[c]={time:b,accuracy:m}}}}dispose(){this.trigger("dispose"),this.off()}}class Z8 extends $.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:a}){return typeof i=="number"&&typeof a=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:a},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:a}){if(typeof i=="number"&&typeof a=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:a},delete this.pendingTimelineChanges_[e];const o={timelineChangeInfo:{from:i,to:a}};this.trigger({type:"timelinechange",metadata:o})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const J8=qS($S(function(){var s=function(){function w(){this.listeners={}}var H=w.prototype;return H.on=function(G,F){this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push(F)},H.off=function(G,F){if(!this.listeners[G])return!1;var Y=this.listeners[G].indexOf(F);return this.listeners[G]=this.listeners[G].slice(0),this.listeners[G].splice(Y,1),Y>-1},H.trigger=function(G){var F=this.listeners[G];if(F)if(arguments.length===2)for(var Y=F.length,K=0;K<Y;++K)F[K].call(this,arguments[1]);else for(var se=Array.prototype.slice.call(arguments,1),Q=F.length,le=0;le<Q;++le)F[le].apply(this,se)},H.dispose=function(){this.listeners={}},H.pipe=function(G){this.on("data",function(F){G.push(F)})},w}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(w){return w.subarray(0,w.byteLength-w[w.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const w=[[[],[],[],[],[]],[[],[],[],[],[]]],H=w[0],I=w[1],G=H[4],F=I[4];let Y,K,se;const Q=[],le=[];let ue,Ie,be,Ae,fe,Pe;for(Y=0;Y<256;Y++)le[(Q[Y]=Y<<1^(Y>>7)*283)^Y]=Y;for(K=se=0;!G[K];K^=ue||1,se=le[se]||1)for(Ae=se^se<<1^se<<2^se<<3^se<<4,Ae=Ae>>8^Ae&255^99,G[K]=Ae,F[Ae]=K,be=Q[Ie=Q[ue=Q[K]]],Pe=be*16843009^Ie*65537^ue*257^K*16843008,fe=Q[Ae]*257^Ae*16843008,Y=0;Y<4;Y++)H[Y][K]=fe=fe<<24^fe>>>8,I[Y][Ae]=Pe=Pe<<24^Pe>>>8;for(Y=0;Y<5;Y++)H[Y]=H[Y].slice(0),I[Y]=I[Y].slice(0);return w};let a=null;class o{constructor(H){a||(a=i()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];let I,G,F;const Y=this._tables[0][4],K=this._tables[1],se=H.length;let Q=1;if(se!==4&&se!==6&&se!==8)throw new Error("Invalid aes key size");const le=H.slice(0),ue=[];for(this._key=[le,ue],I=se;I<4*se+28;I++)F=le[I-1],(I%se===0||se===8&&I%se===4)&&(F=Y[F>>>24]<<24^Y[F>>16&255]<<16^Y[F>>8&255]<<8^Y[F&255],I%se===0&&(F=F<<8^F>>>24^Q<<24,Q=Q<<1^(Q>>7)*283)),le[I]=le[I-se]^F;for(G=0;I;G++,I--)F=le[G&3?I:I-4],I<=4||G<4?ue[G]=F:ue[G]=K[0][Y[F>>>24]]^K[1][Y[F>>16&255]]^K[2][Y[F>>8&255]]^K[3][Y[F&255]]}decrypt(H,I,G,F,Y,K){const se=this._key[1];let Q=H^se[0],le=F^se[1],ue=G^se[2],Ie=I^se[3],be,Ae,fe;const Pe=se.length/4-2;let rt,de=4;const xe=this._tables[1],Me=xe[0],he=xe[1],W=xe[2],pe=xe[3],me=xe[4];for(rt=0;rt<Pe;rt++)be=Me[Q>>>24]^he[le>>16&255]^W[ue>>8&255]^pe[Ie&255]^se[de],Ae=Me[le>>>24]^he[ue>>16&255]^W[Ie>>8&255]^pe[Q&255]^se[de+1],fe=Me[ue>>>24]^he[Ie>>16&255]^W[Q>>8&255]^pe[le&255]^se[de+2],Ie=Me[Ie>>>24]^he[Q>>16&255]^W[le>>8&255]^pe[ue&255]^se[de+3],de+=4,Q=be,le=Ae,ue=fe;for(rt=0;rt<4;rt++)Y[(3&-rt)+K]=me[Q>>>24]<<24^me[le>>16&255]<<16^me[ue>>8&255]<<8^me[Ie&255]^se[de++],be=Q,Q=le,le=ue,ue=Ie,Ie=be}}class u extends s{constructor(){super(s),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(H){this.jobs.push(H),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const c=function(w){return w<<24|(w&65280)<<8|(w&16711680)>>8|w>>>24},f=function(w,H,I){const G=new Int32Array(w.buffer,w.byteOffset,w.byteLength>>2),F=new o(Array.prototype.slice.call(H)),Y=new Uint8Array(w.byteLength),K=new Int32Array(Y.buffer);let se,Q,le,ue,Ie,be,Ae,fe,Pe;for(se=I[0],Q=I[1],le=I[2],ue=I[3],Pe=0;Pe<G.length;Pe+=4)Ie=c(G[Pe]),be=c(G[Pe+1]),Ae=c(G[Pe+2]),fe=c(G[Pe+3]),F.decrypt(Ie,be,Ae,fe,K,Pe),K[Pe]=c(K[Pe]^se),K[Pe+1]=c(K[Pe+1]^Q),K[Pe+2]=c(K[Pe+2]^le),K[Pe+3]=c(K[Pe+3]^ue),se=Ie,Q=be,le=Ae,ue=fe;return Y};class m{constructor(H,I,G,F){const Y=m.STEP,K=new Int32Array(H.buffer),se=new Uint8Array(H.byteLength);let Q=0;for(this.asyncStream_=new u,this.asyncStream_.push(this.decryptChunk_(K.subarray(Q,Q+Y),I,G,se)),Q=Y;Q<K.length;Q+=Y)G=new Uint32Array([c(K[Q-4]),c(K[Q-3]),c(K[Q-2]),c(K[Q-1])]),this.asyncStream_.push(this.decryptChunk_(K.subarray(Q,Q+Y),I,G,se));this.asyncStream_.push(function(){F(null,e(se))})}static get STEP(){return 32e3}decryptChunk_(H,I,G,F){return function(){const Y=f(H,I,G);F.set(Y,H.byteOffset)}}}var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S;typeof window<"u"?S=window:typeof b<"u"?S=b:typeof self<"u"?S=self:S={};var E=S,A=function(H){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(H):H&&H.buffer instanceof ArrayBuffer},R=E.BigInt||Number;R("0x1"),R("0x100"),R("0x10000"),R("0x1000000"),R("0x100000000"),R("0x10000000000"),R("0x1000000000000"),R("0x100000000000000"),R("0x10000000000000000"),function(){var w=new Uint16Array([65484]),H=new Uint8Array(w.buffer,w.byteOffset,w.byteLength);return H[0]===255?"big":H[0]===204?"little":"unknown"}();const N=function(w){const H={};return Object.keys(w).forEach(I=>{const G=w[I];A(G)?H[I]={bytes:G.buffer,byteOffset:G.byteOffset,byteLength:G.byteLength}:H[I]=G}),H};self.onmessage=function(w){const H=w.data,I=new Uint8Array(H.encrypted.bytes,H.encrypted.byteOffset,H.encrypted.byteLength),G=new Uint32Array(H.key.bytes,H.key.byteOffset,H.key.byteLength/4),F=new Uint32Array(H.iv.bytes,H.iv.byteOffset,H.iv.byteLength/4);new m(I,G,F,function(Y,K){self.postMessage(N({source:H.source,decrypted:K}),[K.buffer])})}}));var e5=VS(J8);const t5=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},bx=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Ny=(s,e)=>{e.activePlaylistLoader=s,s.load()},i5=(s,e)=>()=>{const{segmentLoaders:{[s]:i,main:a},mediaTypes:{[s]:o}}=e,u=o.activeTrack(),c=o.getActiveGroup(),f=o.activePlaylistLoader,m=o.lastGroup_;if(!(c&&m&&c.id===m.id)&&(o.lastGroup_=c,o.lastTrack_=u,bx(i,o),!(!c||c.isMainPlaylist))){if(!c.playlistLoader){f&&a.resetEverything();return}i.resyncLoader(),Ny(c.playlistLoader,o)}},n5=(s,e)=>()=>{const{segmentLoaders:{[s]:i},mediaTypes:{[s]:a}}=e;a.lastGroup_=null,i.abort(),i.pause()},s5=(s,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[s]:a,main:o},mediaTypes:{[s]:u}}=e,c=u.activeTrack(),f=u.getActiveGroup(),m=u.activePlaylistLoader,b=u.lastTrack_;if(!(b&&c&&b.id===c.id)&&(u.lastGroup_=f,u.lastTrack_=c,bx(a,u),!!f)){if(f.isMainPlaylist){if(!c||!b||c.id===b.id)return;const S=e.vhs.playlistController_,E=S.selectPlaylist();if(S.media()===E)return;u.logger_(`track change. Switching main audio from ${b.id} to ${c.id}`),i.pause(),o.resetEverything(),S.fastQualityChange_(E);return}if(s==="AUDIO"){if(!f.playlistLoader){o.setAudio(!0),o.resetEverything();return}a.setAudio(!0),o.setAudio(!1)}if(m===f.playlistLoader){Ny(f.playlistLoader,u);return}a.track&&a.track(c),a.resetEverything(),Ny(f.playlistLoader,u)}},Up={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:i},excludePlaylist:a}=e,o=i.activeTrack(),u=i.activeGroup(),c=(u.filter(m=>m.default)[0]||u[0]).id,f=i.tracks[c];if(o===f){a({error:{message:"Problem encountered loading the default audio track."}});return}$.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const m in i.tracks)i.tracks[m].enabled=i.tracks[m]===f;i.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:i}}=e;$.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const a=i.activeTrack();a&&(a.mode="disabled"),i.onTrackChanged()}},_x={AUDIO:(s,e,i)=>{if(!e)return;const{tech:a,requestOptions:o,segmentLoaders:{[s]:u}}=i;e.on("loadedmetadata",()=>{const c=e.media();u.playlist(c,o),(!a.paused()||c.endList&&a.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),a.paused()||u.load()}),e.on("error",Up[s](s,i))},SUBTITLES:(s,e,i)=>{const{tech:a,requestOptions:o,segmentLoaders:{[s]:u},mediaTypes:{[s]:c}}=i;e.on("loadedmetadata",()=>{const f=e.media();u.playlist(f,o),u.track(c.activeTrack()),(!a.paused()||f.endList&&a.preload()!=="none")&&u.load()}),e.on("loadedplaylist",()=>{u.playlist(e.media(),o),a.paused()||u.load()}),e.on("error",Up[s](s,i))}},a5={AUDIO:(s,e)=>{const{vhs:i,sourceType:a,segmentLoaders:{[s]:o},requestOptions:u,main:{mediaGroups:c},mediaTypes:{[s]:{groups:f,tracks:m,logger_:b}},mainPlaylistLoader:S}=e,E=Rd(S.main);(!c[s]||Object.keys(c[s]).length===0)&&(c[s]={main:{default:{default:!0}}},E&&(c[s].main.default.playlists=S.main.playlists));for(const A in c[s]){f[A]||(f[A]=[]);for(const R in c[s][A]){let N=c[s][A][R],w;if(E?(b(`AUDIO group '${A}' label '${R}' is a main playlist`),N.isMainPlaylist=!0,w=null):a==="vhs-json"&&N.playlists?w=new Tu(N.playlists[0],i,u):N.resolvedUri?w=new Tu(N.resolvedUri,i,u):N.playlists&&a==="dash"?w=new wy(N.playlists[0],i,u,S):w=null,N=bt({id:R,playlistLoader:w},N),_x[s](s,N.playlistLoader,e),f[A].push(N),typeof m[R]>"u"){const H=new $.AudioTrack({id:R,kind:t5(N),enabled:!1,language:N.language,default:N.default,label:R});m[R]=H}}}o.on("error",Up[s](s,e))},SUBTITLES:(s,e)=>{const{tech:i,vhs:a,sourceType:o,segmentLoaders:{[s]:u},requestOptions:c,main:{mediaGroups:f},mediaTypes:{[s]:{groups:m,tracks:b}},mainPlaylistLoader:S}=e;for(const E in f[s]){m[E]||(m[E]=[]);for(const A in f[s][E]){if(!a.options_.useForcedSubtitles&&f[s][E][A].forced)continue;let R=f[s][E][A],N;if(o==="hls")N=new Tu(R.resolvedUri,a,c);else if(o==="dash"){if(!R.playlists.filter(H=>H.excludeUntil!==1/0).length)return;N=new wy(R.playlists[0],a,c,S)}else o==="vhs-json"&&(N=new Tu(R.playlists?R.playlists[0]:R.resolvedUri,a,c));if(R=bt({id:A,playlistLoader:N},R),_x[s](s,R.playlistLoader,e),m[E].push(R),typeof b[A]>"u"){const w=i.addRemoteTextTrack({id:A,kind:"subtitles",default:R.default&&R.autoselect,language:R.language,label:A},!1).track;b[A]=w}}}u.on("error",Up[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:i,main:{mediaGroups:a},mediaTypes:{[s]:{groups:o,tracks:u}}}=e;for(const c in a[s]){o[c]||(o[c]=[]);for(const f in a[s][c]){const m=a[s][c][f];if(!/^(?:CC|SERVICE)/.test(m.instreamId))continue;const b=i.options_.vhs&&i.options_.vhs.captionServices||{};let S={label:f,language:m.language,instreamId:m.instreamId,default:m.default&&m.autoselect};if(b[S.instreamId]&&(S=bt(S,b[S.instreamId])),S.default===void 0&&delete S.default,o[c].push(bt({id:f},m)),typeof u[f]>"u"){const E=i.addRemoteTextTrack({id:S.instreamId,kind:"captions",default:S.default,language:S.language,label:S.label},!1).track;u[f]=E}}}}},Tx=(s,e)=>{for(let i=0;i<s.length;i++)if(Ty(e,s[i])||s[i].playlists&&Tx(s[i].playlists,e))return!0;return!1},r5=(s,e)=>i=>{const{mainPlaylistLoader:a,mediaTypes:{[s]:{groups:o}}}=e,u=a.media();if(!u)return null;let c=null;u.attributes[s]&&(c=o[u.attributes[s]]);const f=Object.keys(o);if(!c)if(s==="AUDIO"&&f.length>1&&Rd(e.main))for(let m=0;m<f.length;m++){const b=o[f[m]];if(Tx(b,u)){c=b;break}}else o.main?c=o.main:f.length===1&&(c=o[f[0]]);return typeof i>"u"?c:i===null||!c?null:c.filter(m=>m.id===i.id)[0]||null},o5={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const a in i)if(i[a].enabled)return i[a];return null},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const a in i)if(i[a].mode==="showing"||i[a].mode==="hidden")return i[a];return null}},l5=(s,{mediaTypes:e})=>()=>{const i=e[s].activeTrack();return i?e[s].activeGroup(i):null},u5=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(b=>{a5[b](b,s)});const{mediaTypes:e,mainPlaylistLoader:i,tech:a,vhs:o,segmentLoaders:{["AUDIO"]:u,main:c}}=s;["AUDIO","SUBTITLES"].forEach(b=>{e[b].activeGroup=r5(b,s),e[b].activeTrack=o5[b](b,s),e[b].onGroupChanged=i5(b,s),e[b].onGroupChanging=n5(b,s),e[b].onTrackChanged=s5(b,s),e[b].getActiveGroup=l5(b,s)});const f=e.AUDIO.activeGroup();if(f){const b=(f.filter(E=>E.default)[0]||f[0]).id;e.AUDIO.tracks[b].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(c.setAudio(!1),u.setAudio(!0)):c.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(b=>e[b].onGroupChanging())});const m=()=>{e.AUDIO.onTrackChanged(),a.trigger({type:"usage",name:"vhs-audio-change"})};a.audioTracks().addEventListener("change",m),a.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),o.on("dispose",()=>{a.audioTracks().removeEventListener("change",m),a.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),a.clearTracks("audio");for(const b in e.AUDIO.tracks)a.audioTracks().addTrack(e.AUDIO.tracks[b])},c5=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ua,activeTrack:Ua,getActiveGroup:Ua,onGroupChanged:Ua,onTrackChanged:Ua,lastTrack_:null,logger_:Kn(`MediaGroups[${e}]`)}}),s};class Sx{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=gn(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class d5 extends $.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Sx,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Kn("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const a=i.serverUri||i.serverURL;if(!a){this.logger_(`steering manifest URL is ${a}, cannot request steering manifest.`),this.trigger("error");return}if(a.startsWith("data:")){this.decodeDataUriManifest_(a.substring(a.indexOf(",")+1));return}this.steeringManifest.reloadUri=gn(e,a),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const i=this.steeringManifest.reloadUri;if(!i)return;const a=e?i:this.getRequestURI(i);if(!a){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const o={contentSteeringInfo:{uri:a}};this.trigger({type:"contentsteeringloadstart",metadata:o}),this.request_=this.xhr_({uri:a,requestType:"content-steering-manifest"},(u,c)=>{if(u){if(c.status===410){this.logger_(`manifest request 410 ${u}.`),this.logger_(`There will be no more content steering requests to ${a} this session.`),this.excludedSteeringManifestURLs.add(a);return}if(c.status===429){const b=c.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${u}.`),this.logger_(`content steering will retry in ${b} seconds.`),this.startTTLTimeout_(parseInt(b,10));return}this.logger_(`manifest failed to load ${u}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:o});let f;try{f=JSON.parse(this.request_.responseText)}catch(b){const S={errorType:$.Error.StreamingContentSteeringParserError,error:b};this.trigger({type:"error",metadata:S})}this.assignSteeringProperties_(f);const m={contentSteeringInfo:o.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:m}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new B.URL(e),a=new B.URL(this.proxyServerUrl_);return a.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(a.toString())}decodeDataUriManifest_(e){const i=JSON.parse(B.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new B.URL(e),a=this.getPathway(),o=this.getBandwidth_();if(a){const u=`_${this.manifestType_}_pathway`;i.searchParams.set(u,a)}if(o){const u=`_${this.manifestType_}_throughput`;i.searchParams.set(u,o)}return i.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const a=(o=>{for(const u of o)if(this.availablePathways_.has(u))return u;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==a&&(this.currentPathway=a,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=o=>this.excludedSteeringManifestURLs.has(o);if(this.proxyServerUrl_){const o=this.setProxyServerUrl_(e);if(!i(o))return o}const a=this.setSteeringParams_(e);return i(a)?null:a}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=B.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){B.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Sx}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(gn(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const h5=(s,e)=>{let i=null;return(...a)=>{clearTimeout(i),i=setTimeout(()=>{s.apply(null,a)},e)}},f5=10;let Lr;const p5=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],m5=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},g5=function({currentPlaylist:s,buffered:e,currentTime:i,nextPlaylist:a,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:c,bufferBasedABR:f,log:m}){if(!a)return $.log.warn("We received no playlist to switch to. Please check your stream."),!1;const b=`allowing switch ${s&&s.id||"null"} -> ${a.id}`;if(!s)return m(`${b} as current playlist is not set`),!0;if(a.id===s.id)return!1;const S=!!vu(e,i).length;if(!s.endList)return!S&&typeof s.partTargetDuration=="number"?(m(`not ${b} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(m(`${b} as current playlist is live`),!0);const E=gy(e,i),A=f?yi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:yi.MAX_BUFFER_LOW_WATER_LINE;if(c<A)return m(`${b} as duration < max low water line (${c} < ${A})`),!0;const R=a.attributes.BANDWIDTH,N=s.attributes.BANDWIDTH;if(R<N&&(!f||E<u)){let w=`${b} as next bandwidth < current bandwidth (${R} < ${N})`;return f&&(w+=` and forwardBuffer < bufferHighWaterLine (${E} < ${u})`),m(w),!0}if((!f||R>N)&&E>=o){let w=`${b} as forwardBuffer >= bufferLowWaterLine (${E} >= ${o})`;return f&&(w+=` and next bandwidth > current bandwidth (${R} > ${N})`),m(w),!0}return m(`not ${b} as no switching criteria met`),!1};class y5 extends $.EventTarget{constructor(e){super(),this.fastQualityChange_=h5(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:a,tech:o,bandwidth:u,externVhs:c,useCueTags:f,playlistExclusionDuration:m,enableLowInitialPlaylist:b,sourceType:S,cacheEncryptionKeys:E,bufferBasedABR:A,leastPixelDiffSelector:R,captionServices:N,experimentalUseMMS:w}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:H}=e;(H===null||typeof H>"u")&&(H=1/0),Lr=c,this.bufferBasedABR=!!A,this.leastPixelDiffSelector=!!R,this.withCredentials=a,this.tech_=o,this.vhs_=o.vhs,this.player_=e.player_,this.sourceType_=S,this.useCueTags_=f,this.playlistExclusionDuration=m,this.maxPlaylistRetries=H,this.enableLowInitialPlaylist=b,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:a,maxPlaylistRetries:H,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=c5(),w&&B.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new B.ManagedMediaSource,this.usingManagedMediaSource_=!0,$.log("Using ManagedMediaSource")):B.MediaSource&&(this.mediaSource=new B.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=gi(),this.hasPlayed_=!1,this.syncController_=new K8(e),this.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new e5,this.sourceUpdater_=new fx(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Z8,this.keyStatusMap_=new Map;const I={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:N,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:u,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:E,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new wy(i,this.vhs_,bt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Tu(i,this.vhs_,bt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Ly(bt(I,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Ly(bt(I,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new G8(bt(I,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((Y,K)=>{function se(){o.off("vttjserror",Q),Y()}function Q(){o.off("vttjsloaded",se),K()}o.one("vttjsloaded",se),o.one("vttjserror",Q),o.addWebVttScript_()})}),e);const G=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new d5(this.vhs_.xhr,G),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),p5.forEach(Y=>{this[Y+"_"]=m5.bind(this,Y)}),this.logger_=Kn("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const F=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(F,()=>{const Y=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-Y,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)}switchMedia_(e,i,a){const o=this.media(),u=o&&(o.id||o.uri),c=e&&(e.id||e.uri);if(u&&u!==c){this.logger_(`switch media ${u} -> ${c} from ${i}`);const f={renditionInfo:{id:c,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:f}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,a)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],a=i?i.activeGroup():null,o=this.contentSteeringController_.getPathway();if(a&&o){const c=(a.length?a[0].playlists:a.playlists).filter(f=>f.attributes.serviceLocation===o);c.length&&this.mediaTypes_[e].activePlaylistLoader.media(c[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=B.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(B.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;const a=e.mediaGroups.AUDIO,o=Object.keys(a);let u;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)u=this.mediaTypes_.AUDIO.activeTrack();else{const f=a.main||o.length&&a[o[0]];for(const m in f)if(f[m].default){u={label:m};break}}if(!u)return i;const c=[];for(const f in a)if(a[f][u.label]){const m=a[f][u.label];if(m.playlists&&m.playlists.length)c.push.apply(c,m.playlists);else if(m.uri)c.push(m);else if(e.playlists.length)for(let b=0;b<e.playlists.length;b++){const S=e.playlists[b];S.attributes&&S.attributes.AUDIO&&S.attributes.AUDIO===f&&c.push(S)}}return c.length?c:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),a=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),u5({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let a;if(this.enableLowInitialPlaylist&&(a=this.selectInitialPlaylist()),a||(a=this.selectPlaylist()),!a||!this.shouldSwitchToMedia_(a)||(this.initialMedia_=a,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_}this.handleUpdatedMediaPlaylist(i)}),this.mainPlaylistLoader_.on("error",()=>{const i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const i=this.mainPlaylistLoader_.media(),a=i.targetDuration*1.5*1e3;_y(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=a,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>{this.mainPlaylistLoader_.on(i,a=>{this.player_.trigger(Vt({},a))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,i){const a=e.mediaGroups||{};let o=!0;const u=Object.keys(a.AUDIO);for(const c in a.AUDIO)for(const f in a.AUDIO[c])a.AUDIO[c][f].uri||(o=!1);o&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(a.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Lr.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),u.length&&Object.keys(a.AUDIO[u[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),u=this.bufferHighWaterLine(),c=this.tech_.buffered();return g5({buffered:c,currentTime:a,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const a=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:a.playlist,error:a})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const a=this.audioSegmentLoader_.pendingSegment_;if(!a||!a.segment||!a.segment.syncInfo)return;const o=a.segment.syncInfo.end+.01;this.tech_.setCurrentTime(o)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",a=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:f5}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const a=this.getCodecsOrExclude_();a&&this.sourceUpdater_.addOrChangeSourceBuffers(a)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(a=>{this.mainSegmentLoader_.on(a,o=>{this.player_.trigger(Vt({},o))}),this.audioSegmentLoader_.on(a,o=>{this.player_.trigger(Vt({},o))}),this.subtitleSegmentLoader_.on(a,o=>{this.player_.trigger(Vt({},o))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const i=this.seekable();if(!i.length)return!1;const a=i.end(0);let o=a;if(e.start){const u=e.start.timeOffset;u<0?o=Math.max(a+u,i.start(0)):o=Math.min(a,u)}this.trigger("firstplay"),this.tech_.setCurrentTime(o)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const a=this.syncController_.getExpiredTime(e,this.duration());if(a===null)return!1;const o=Lr.Playlist.playlistEnd(e,a),u=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return o-u<=Gs;const f=c.end(c.length-1);return f-u<=Gs&&o-f<=Gs}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:a}){if(e=e||this.mainPlaylistLoader_.media(),a=a||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const o=this.mainPlaylistLoader_.main.playlists,u=o.filter(Lp),c=u.length===1&&u[0]===e;if(o.length===1&&a!==1/0)return $.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(c);if(c){if(this.main().contentSteering){const N=this.pathwayAttribute_(e),w=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(N),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(N)},w);return}let R=!1;o.forEach(N=>{if(N===e)return;const w=N.excludeUntil;typeof w<"u"&&w!==1/0&&(R=!0,delete N.excludeUntil)}),R&&($.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let f;e.playlistErrors_>this.maxPlaylistRetries?f=1/0:f=Date.now()+a*1e3,e.excludeUntil=f,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const m=this.selectPlaylist();if(!m){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const b=i.internal?this.logger_:$.log.warn,S=i.message?" "+i.message:"";b(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${S} Switching to playlist ${m.id}.`),m.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),m.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const E=m.targetDuration/2*1e3||5*1e3,A=typeof m.lastRequest=="number"&&Date.now()-m.lastRequest<=E;return this.switchMedia_(m,"exclude",c||A)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const a=[],o=e==="all";(o||e==="main")&&a.push(this.mainPlaylistLoader_);const u=[];(o||e==="audio")&&u.push("AUDIO"),(o||e==="subtitle")&&(u.push("CLOSED-CAPTIONS"),u.push("SUBTITLES")),u.forEach(c=>{const f=this.mediaTypes_[c]&&this.mediaTypes_[c].activePlaylistLoader;f&&a.push(f)}),["main","audio","subtitle"].forEach(c=>{const f=this[`${c}SegmentLoader_`];f&&(e===c||e==="all")&&a.push(f)}),a.forEach(c=>i.forEach(f=>{typeof c[f]=="function"&&c[f]()}))}setCurrentTime(e){const i=vu(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Lr.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const a=e.media();if(!a)return null;const o=this.syncController_.getMediaSequenceSync(i);if(o&&o.isReliable){const f=o.start,m=o.end;if(!isFinite(f)||!isFinite(m))return null;const b=Lr.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a),S=Math.max(f,m-b);return gi([[f,S]])}const u=this.syncController_.getExpiredTime(a,this.duration());if(u===null)return null;const c=Lr.Playlist.seekable(a,u,Lr.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,a));return c.length?c:null}computeFinalSeekable_(e,i){if(!i)return e;const a=e.start(0),o=e.end(0),u=i.start(0),c=i.end(0);return u>o||a>c?e:gi([[Math.max(a,u),Math.min(o,c)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;const a=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||a&&a.length&&this.seekable_.length&&a.start(0)===this.seekable_.start(0)&&a.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${dS(this.seekable_)}]`);const o={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:o}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const o=this.seekable();if(!o.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<o.end(o.length-1))&&this.sourceUpdater_.setDuration(o.end(o.length-1));return}const i=this.tech_.buffered();let a=Lr.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(a=Math.max(a,i.end(i.length-1))),this.mediaSource.duration!==a&&this.sourceUpdater_.setDuration(a)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const i=this.mediaTypes_[e].groups;for(const a in i)i[a].forEach(o=>{o.playlistLoader&&o.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!a)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const a=Ld(this.main(),i),o={},u=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(o.video=a.video||e.main.videoCodec||zk),e.main.isMuxed&&(o.video+=`,${a.audio||e.main.audioCodec||nT}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||u)&&(o.audio=a.audio||e.main.audioCodec||e.audio.audioCodec||nT,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!o.audio&&!o.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const c=(b,S)=>b?nd(S,this.usingManagedMediaSource_):Gg(S),f={};let m;if(["video","audio"].forEach(function(b){if(o.hasOwnProperty(b)&&!c(e[b].isFmp4,o[b])){const S=e[b].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[b]),b==="audio"&&(m=S)}}),u&&m&&i.attributes.AUDIO){const b=i.attributes.AUDIO;this.main().playlists.forEach(S=>{(S.attributes&&S.attributes.AUDIO)===b&&S!==i&&(S.excludeUntil=1/0)}),this.logger_(`excluding audio group ${b} as ${m} does not support codec(s): "${o.audio}"`)}if(Object.keys(f).length){const b=Object.keys(f).reduce((S,E)=>(S&&(S+=", "),S+=`${E} does not support codec(s): "${f[E].join(",")}"`,S),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:b},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const b=[];if(["video","audio"].forEach(S=>{const E=(Us(this.sourceUpdater_.codecs[S]||"")[0]||{}).type,A=(Us(o[S]||"")[0]||{}).type;E&&A&&E.toLowerCase()!==A.toLowerCase()&&b.push(`"${this.sourceUpdater_.codecs[S]}" -> "${o[S]}"`)}),b.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${b.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return o}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}excludeUnsupportedVariants_(){const e=this.main().playlists,i=[];Object.keys(e).forEach(a=>{const o=e[a];if(i.indexOf(o.id)!==-1)return;i.push(o.id);const u=Ld(this.main,o),c=[];u.audio&&!Gg(u.audio)&&!nd(u.audio,this.usingManagedMediaSource_)&&c.push(`audio codec ${u.audio}`),u.video&&!Gg(u.video)&&!nd(u.video,this.usingManagedMediaSource_)&&c.push(`video codec ${u.video}`),u.text&&u.text==="stpp.ttml.im1t"&&c.push(`text codec ${u.text}`),c.length&&(o.excludeUntil=1/0,this.logger_(`excluding ${o.id} for unsupported: ${c.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],a=this.main().playlists,o=Md(Us(e)),u=kS(o),c=o.video&&Us(o.video)[0]||null,f=o.audio&&Us(o.audio)[0]||null;Object.keys(a).forEach(m=>{const b=a[m];if(i.indexOf(b.id)!==-1||b.excludeUntil===1/0)return;i.push(b.id);const S=[],E=Ld(this.mainPlaylistLoader_.main,b),A=kS(E);if(!(!E.audio&&!E.video)){if(A!==u&&S.push(`codec count "${A}" !== "${u}"`),!this.sourceUpdater_.canChangeType()){const R=E.video&&Us(E.video)[0]||null,N=E.audio&&Us(E.audio)[0]||null;R&&c&&R.type.toLowerCase()!==c.type.toLowerCase()&&S.push(`video codec "${R.type}" !== "${c.type}"`),N&&f&&N.type.toLowerCase()!==f.type.toLowerCase()&&S.push(`audio codec "${N.type}" !== "${f.type}"`)}S.length&&(b.excludeUntil=1/0,this.logger_(`excluding ${b.id}: ${S.join(" && ")}`))}})}updateAdCues_(e){let i=0;const a=this.seekable();a.length&&(i=a.start(0)),Y8(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=yi.GOAL_BUFFER_LENGTH,a=yi.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,yi.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*a,o)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=yi.BUFFER_LOW_WATER_LINE,a=yi.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,yi.MAX_BUFFER_LOW_WATER_LINE),u=Math.max(i,yi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*a,this.bufferBasedABR?u:o)}bufferHighWaterLine(){return yi.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){rx(this.inbandTextTracks_,"com.apple.streaming",this.tech_),w8({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,a){const o=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();rx(this.inbandTextTracks_,e,this.tech_),E8({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:o,videoDuration:a})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,a=>{this.trigger(Vt({},a))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const u=this.contentSteeringController_.getAvailablePathways(),c=[];for(const f of i.playlists){const m=f.attributes.serviceLocation;if(m&&(c.push(m),!u.has(m)))return!0}return!!(!c.length&&u.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const a=this.main().playlists,o=new Set;let u=!1;Object.keys(a).forEach(c=>{const f=a[c],m=this.pathwayAttribute_(f),b=m&&e!==m;f.excludeUntil===1/0&&f.lastExcludeReason_==="content-steering"&&!b&&(delete f.excludeUntil,delete f.lastExcludeReason_,u=!0);const E=!f.excludeUntil&&f.excludeUntil!==1/0;!o.has(f.id)&&b&&E&&(o.add(f.id),f.excludeUntil=1/0,f.lastExcludeReason_="content-steering",this.logger_(`excluding ${f.id} for ${f.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(c=>{const f=this.mediaTypes_[c];if(f.activePlaylistLoader){const m=f.activePlaylistLoader.media_;m&&m.attributes.serviceLocation!==e&&(u=!0)}}),u&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,a=this.contentSteeringController_.currentPathwayClones,o=this.contentSteeringController_.nextPathwayClones;if(a&&a.size||o&&o.size){for(const[c,f]of a.entries())o.get(c)||(this.mainPlaylistLoader_.updateOrDeleteClone(f),this.contentSteeringController_.excludePathway(c));for(const[c,f]of o.entries()){const m=a.get(c);if(!m){i.filter(S=>S.attributes["PATHWAY-ID"]===f["BASE-ID"]).forEach(S=>{this.mainPlaylistLoader_.addClonePathway(f,S)}),this.contentSteeringController_.addAvailablePathway(c);continue}this.equalPathwayClones_(m,f)||(this.mainPlaylistLoader_.updateOrDeleteClone(f,!0),this.contentSteeringController_.addAvailablePathway(c))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...o])))}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;const a=e["URI-REPLACEMENT"].PARAMS,o=i["URI-REPLACEMENT"].PARAMS;for(const u in a)if(a[u]!==o[u])return!1;for(const u in o)if(a[u]!==o[u])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const i="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(a=>{const o=this.mainPlaylistLoader_.getKeyIdSet(a);!o||!o.size||o.forEach(u=>{const c="usable",f=this.keyStatusMap_.has(u)&&this.keyStatusMap_.get(u)===c,m=a.lastExcludeReason_===i&&a.excludeUntil===1/0;f?f&&m&&(delete a.excludeUntil,delete a.lastExcludeReason_,this.logger_(`enabling playlist ${a.id} because key ID ${u} is ${c}`)):(a.excludeUntil!==1/0&&a.lastExcludeReason_!==i&&(a.excludeUntil=1/0,a.lastExcludeReason_=i,this.logger_(`excluding playlist ${a.id} because the key ID ${u} doesn't exist in the keyStatusMap or is not ${c}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(a=>{const o=a&&a.attributes&&a.attributes.RESOLUTION&&a.attributes.RESOLUTION.height<720,u=a.excludeUntil===1/0&&a.lastExcludeReason_===i;o&&u&&(delete a.excludeUntil,$.log.warn(`enabling non-HD playlist ${a.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const u=(typeof e=="string"?e:q8(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${u} added to the keyStatusMap`),this.keyStatusMap_.set(u,i)}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const v5=(s,e,i)=>a=>{const o=s.main.playlists[e],u=by(o),c=Lp(o);if(typeof a>"u")return c;a?delete o.disabled:o.disabled=!0;const f={renditionInfo:{id:e,bandwidth:o.attributes.BANDWIDTH,resolution:o.attributes.RESOLUTION,codecs:o.attributes.CODECS},cause:"fast-quality"};return a!==c&&!u&&(a?(i(o),s.trigger({type:"renditionenabled",metadata:f})):s.trigger({type:"renditiondisabled",metadata:f})),a};class b5{constructor(e,i,a){const{playlistController_:o}=e,u=o.fastQualityChange_.bind(o);if(i.attributes){const c=i.attributes.RESOLUTION;this.width=c&&c.width,this.height=c&&c.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=Ld(o.main(),i),this.playlist=i,this.id=a,this.enabled=v5(e.playlists,i.id,u)}}const _5=function(s){s.representations=()=>{const e=s.playlistController_.main(),i=Rd(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(a=>!by(a)).map((a,o)=>new b5(s,a,a.id)):[]}},xx=["seeking","seeked","pause","playing","error"];class T5 extends $.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Kn("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),a=()=>this.monitorCurrentTime_(),o=()=>this.techWaiting_(),u=()=>this.resetTimeUpdate_(),c=this.playlistController_,f=["main","subtitle","audio"],m={};f.forEach(S=>{m[S]={reset:()=>this.resetSegmentDownloads_(S),updateend:()=>this.checkSegmentDownloads_(S)},c[`${S}SegmentLoader_`].on("appendsdone",m[S].updateend),c[`${S}SegmentLoader_`].on("playlistupdate",m[S].reset),this.tech_.on(["seeked","seeking"],m[S].reset)});const b=S=>{["main","audio"].forEach(E=>{c[`${E}SegmentLoader_`][S]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),b("off"))},this.clearSeekingAppendCheck_=()=>b("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),b("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",o),this.tech_.on(xx,u),this.tech_.on("canplay",a),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",o),this.tech_.off(xx,u),this.tech_.off("canplay",a),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),f.forEach(S=>{c[`${S}SegmentLoader_`].off("appendsdone",m[S].updateend),c[`${S}SegmentLoader_`].off("playlistupdate",m[S].reset),this.tech_.off(["seeked","seeking"],m[S].reset)}),this.checkCurrentTimeTimeout_&&B.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&B.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=B.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_()}checkSegmentDownloads_(e){const i=this.playlistController_,a=i[`${e}SegmentLoader_`],o=a.buffered_(),u=uR(this[`${e}Buffered_`],o);if(this[`${e}Buffered_`]=o,u){const c={bufferedRanges:o};i.trigger({type:"bufferedrangeschanged",metadata:c}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:a.playlist_&&a.playlist_.id,buffered:No(o)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+Gs>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(gi([this.lastRecordedTime,e]));const a={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:a}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),a=this.tech_.currentTime(),o=this.afterSeekableWindow_(i,a,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let u;if(o&&(u=i.end(i.length-1)),this.beforeSeekableWindow_(i,a)){const N=i.start(0);u=N+(N===i.end(0)?0:Gs)}if(typeof u<"u")return this.logger_(`Trying to seek outside of seekable at time ${a} with seekable range ${dS(i)}. Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0;const c=this.playlistController_.sourceUpdater_,f=this.tech_.buffered(),m=c.audioBuffer?c.audioBuffered():null,b=c.videoBuffer?c.videoBuffered():null,S=this.media(),E=S.partTargetDuration?S.partTargetDuration:(S.targetDuration-$s)*2,A=[m,b];for(let N=0;N<A.length;N++){if(!A[N])continue;if(gy(A[N],a)<E)return!1}const R=Mp(f,a);return R.length===0?!1:(u=R.start(0)+Gs,this.logger_(`Buffered region starts (${R.start(0)}) just beyond seek point (${a}). Seeking to ${u}.`),this.tech_.setCurrentTime(u),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),a=vu(i,e);if(a.length&&e+3<=a.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${a.start(0)} -> ${a.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){const f=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${f}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(f),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const a=this.tech_.vhs.playlistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const c=Mp(o,i);return c.length>0?(this.logger_(`Stopped at ${i} and seeking to ${c.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,a,o=!1){if(!e.length)return!1;let u=e.end(e.length-1)+Gs;const c=!a.endList,f=typeof a.partTargetDuration=="number";return c&&(f||o)&&(u=e.end(e.length-1)+a.targetDuration*3),i>u}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:a}){if(!e)return;let o;if(e.length&&i.length){const u=vu(e,a-3),c=vu(e,a),f=vu(i,a);f.length&&!c.length&&u.length&&(o={start:u.end(0),end:f.end(0)})}else Mp(e,a).length||(o=this.gapFromVideoUnderflow_(e,a));return o?(this.logger_(`Encountered a gap in video from ${o.start} to ${o.end}. Seeking to current time ${a}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),a=this.tech_.currentTime(),o=Mp(i,a);if(this.resetTimeUpdate_(),o.length===0||a!==e)return;this.logger_("skipTheGap_:","currentTime:",a,"scheduled currentTime:",e,"nextRange start:",o.start(0)),this.tech_.setCurrentTime(o.start(0)+$s);const u={gapInfo:{from:a,to:o.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:u}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const a=rR(e);for(let o=0;o<a.length;o++){const u=a.start(o),c=a.end(o);if(i-u<4&&i-u>2)return{start:u,end:c}}return null}}const S5={errorInterval:30,getSource(s){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(i)}},Ex=function(s,e){let i=0,a=0;const o=bt(S5,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const u=function(){a&&s.currentTime(a)},c=function(S){S!=null&&(a=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",u),s.src(S),s.trigger({type:"usage",name:"vhs-error-reload"}),s.play())},f=function(){if(Date.now()-i<o.errorInterval*1e3){s.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!o.getSource||typeof o.getSource!="function"){$.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),o.getSource.call(s,c)},m=function(){s.off("loadedmetadata",u),s.off("error",f),s.off("dispose",m)},b=function(S){m(),Ex(s,S)};s.on("error",f),s.on("dispose",m),s.reloadSourceOnError=b},x5=function(s){Ex(this,s)};var Cx="3.17.0",E5="7.1.0",C5="1.3.1",A5="7.2.0",w5="4.0.2";const Ht={PlaylistLoader:Tu,Playlist:yn,utils:LR,STANDARD_PLAYLIST_SELECTOR:sx,INITIAL_PLAYLIST_SELECTOR:b8,lastBandwidthSelector:sx,movingAverageBandwidthSelector:y8,comparePlaylistBandwidth:Ry,comparePlaylistResolution:g8,xhr:IS()};Object.keys(yi).forEach(s=>{Object.defineProperty(Ht,s,{get(){return $.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),yi[s]},set(e){if($.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){$.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}yi[s]=e}})});const Ax="videojs-vhs",wx=function(s,e){const i=e.media();let a=-1;for(let o=0;o<s.length;o++)if(s[o].id===i.id){a=o;break}s.selectedIndex_=a,s.trigger({selectedIndex:a,type:"change"})},D5=function(s,e){e.representations().forEach(i=>{s.addQualityLevel(i)}),wx(s,e.playlists)};Ht.canPlaySource=function(){return $.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const k5=(s,e,i)=>{if(!s)return s;let a={};e&&e.attributes&&e.attributes.CODECS&&(a=Md(Us(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(a.audio=i.attributes.CODECS);const o=zl(a.video),u=zl(a.audio),c={};for(const f in s)c[f]={},u&&(c[f].audioContentType=u),o&&(c[f].videoContentType=o),e.contentProtection&&e.contentProtection[f]&&e.contentProtection[f].pssh&&(c[f].pssh=e.contentProtection[f].pssh),typeof s[f]=="string"&&(c[f].url=s[f]);return bt(s,c)},O5=(s,e)=>s.reduce((i,a)=>{if(!a.contentProtection)return i;const o=e.reduce((u,c)=>{const f=a.contentProtection[c];return f&&f.pssh&&(u[c]={pssh:f.pssh}),u},{});return Object.keys(o).length&&i.push(o),i},[]),R5=({player:s,sourceKeySystems:e,audioMedia:i,mainPlaylists:a})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const o=i?a.concat([i]):a,u=O5(o,Object.keys(e)),c=[],f=[];return u.forEach(m=>{f.push(new Promise((b,S)=>{s.tech_.one("keysessioncreated",b)})),c.push(new Promise((b,S)=>{s.eme.initializeMediaKeys({keySystems:m},E=>{if(E){S(E);return}b()})}))}),Promise.race([Promise.all(c),Promise.race(f)])},M5=({player:s,sourceKeySystems:e,media:i,audioMedia:a})=>{const o=k5(e,i,a);return o?(s.currentSource().keySystems=o,o&&!s.eme?($.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Dx=()=>{if(!B.localStorage)return null;const s=B.localStorage.getItem(Ax);if(!s)return null;try{return JSON.parse(s)}catch{return null}},L5=s=>{if(!B.localStorage)return!1;let e=Dx();e=e?bt(e,s):s;try{B.localStorage.setItem(Ax,JSON.stringify(e))}catch{return!1}return e},I5=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,kx=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},Ox=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},Rx=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},Mx=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};Ht.supportsNativeHls=function(){if(!ye||!ye.createElement)return!1;const s=ye.createElement("video");return $.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return/maybe|probably/i.test(s.canPlayType(i))}):!1}(),Ht.supportsNativeDash=function(){return!ye||!ye.createElement||!$.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ye.createElement("video").canPlayType("application/dash+xml"))}(),Ht.supportsTypeNatively=s=>s==="hls"?Ht.supportsNativeHls:s==="dash"?Ht.supportsNativeDash:!1,Ht.isSupported=function(){return $.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Ht.xhr.onRequest=function(s){kx(Ht.xhr,s)},Ht.xhr.onResponse=function(s){Ox(Ht.xhr,s)},Ht.xhr.offRequest=function(s){Rx(Ht.xhr,s)},Ht.xhr.offResponse=function(s){Mx(Ht.xhr,s)};const P5=$.getComponent("Component");class Lx extends P5{constructor(e,i,a){if(super(i,a.vhs),typeof a.initialBandwidth=="number"&&(this.options_.bandwidth=a.initialBandwidth),this.logger_=Kn("VhsHandler"),i.options_&&i.options_.playerId){const o=$.getPlayer(i.options_.playerId);this.player_=o}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ye,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],o=>{const u=ye.fullscreenElement||ye.webkitFullscreenElement||ye.mozFullScreenElement||ye.msFullscreenElement;u&&u.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=bt(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const a=Dx();a&&a.bandwidth&&(this.options_.bandwidth=a.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),a&&a.throughput&&(this.options_.throughput=a.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=yi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===yi.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(a=>{typeof this.source_[a]<"u"&&(this.options_[a]=this.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i)}setOptions(e={}){this.setOptions_(e)}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=I5(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Ht,this.options_.sourceType=sT(i),this.options_.seekTo=u=>{this.tech_.setCurrentTime(u)},this.options_.player_=this.player_,this.playlistController_=new y5(this.options_);const a=bt({liveRangeSafeTimeDelta:Gs},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new T5(a),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const u=$.players[this.tech_.options_.playerId];let c=this.playlistController_.error;typeof c=="object"&&!c.code?c.code=3:typeof c=="string"&&(c={message:c,code:3}),u.error(c)});const o=this.options_.bufferBasedABR?Ht.movingAverageBandwidthSelector(.55):Ht.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.playlistController_.selectInitialPlaylist=Ht.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(u){this.playlistController_.selectPlaylist=u.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(u){this.playlistController_.mainSegmentLoader_.throughput.rate=u,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let u=this.playlistController_.mainSegmentLoader_.bandwidth;const c=B.navigator.connection||B.navigator.mozConnection||B.navigator.webkitConnection,f=1e7;if(this.options_.useNetworkInformationApi&&c){const m=c.downlink*1e3*1e3;m>=f&&u>=f?u=Math.max(u,m):u=m}return u},set(u){this.playlistController_.mainSegmentLoader_.bandwidth=u,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const u=1/(this.bandwidth||1);let c;return this.throughput>0?c=1/this.throughput:c=0,Math.floor(1/(u+c))},set(){$.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>No(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>No(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&L5({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{_5(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=B.URL.createObjectURL(this.playlistController_.mediaSource),($.browser.IS_ANY_SAFARI||$.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),R5({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=M5({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",a=>{this.playlistController_.updatePlaylistByKeyStatus(a.keyId,a.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=$.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{D5(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{wx(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Cx,"mux.js":E5,"mpd-parser":C5,"m3u8-parser":A5,"aes-decrypter":w5}}version(){return this.constructor.version()}canChangeType(){return fx.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&B.URL.revokeObjectURL&&(B.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return HR({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,a=!0,o=2){return FS({programTime:e,playlist:this.playlistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{kx(this.xhr,e)},this.xhr.onResponse=e=>{Ox(this.xhr,e)},this.xhr.offRequest=e=>{Rx(this.xhr,e)},this.xhr.offResponse=e=>{Mx(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(a=>{this.playlistController_.on(a,o=>{this.player_.trigger(Vt({},o))})}),i.forEach(a=>{this.playbackWatcher_.on(a,o=>{this.player_.trigger(Vt({},o))})})}}const Bp={name:"videojs-http-streaming",VERSION:Cx,canHandleSource(s,e={}){const i=bt($.options,e);return!i.vhs.experimentalUseMMS&&!nd("avc1.4d400d,mp4a.40.2",!1)?!1:Bp.canPlayType(s.type,i)},handleSource(s,e,i={}){const a=bt($.options,i);return e.vhs=new Lx(s,e,a),e.vhs.xhr=IS(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const i=sT(s);if(!i)return"";const a=Bp.getOverrideNative(e);return!Ht.supportsTypeNatively(i)||a?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,i=!($.browser.IS_ANY_SAFARI||$.browser.IS_IOS),{overrideNative:a=i}=e;return a}};(()=>nd("avc1.4d400d,mp4a.40.2",!0))()&&$.getTech("Html5").registerSourceHandler(Bp,0),$.VhsHandler=Lx,$.VhsSourceHandler=Bp,$.Vhs=Ht,$.use||$.registerComponent("Vhs",Ht),$.options.vhs=$.options.vhs||{},(!$.getPlugin||!$.getPlugin("reloadSourceOnError"))&&$.registerPlugin("reloadSourceOnError",x5);const J6="",N5=$.getComponent("Component");class Ix extends N5{constructor(e,i){i&&i.relatedVideos&&(i._relatedVideos=i.relatedVideos),super(e,i),this.relatedVideos=i&&i.relatedVideos?i.relatedVideos:[]}createEl(){const e=this.options_&&this.options_._relatedVideos?this.options_._relatedVideos:[],i=this.getMaxVideosForScreen(),a=e.slice(0,i),o=super.createEl("div",{className:"vjs-end-screen-overlay"}),u=$.dom.createEl("div",{className:"vjs-related-videos-title"});u.textContent="More Videos";const c=$.dom.createEl("div",{className:"vjs-related-videos-grid"});return a&&Array.isArray(a)&&a.length>0?a.forEach(f=>{const m=this.createVideoItem(f);c.appendChild(m)}):this.createSampleVideos().slice(0,this.getMaxVideosForScreen()).forEach(m=>{const b=this.createVideoItem(m);c.appendChild(b)}),o.appendChild(u),o.appendChild(c),o}createVideoItem(e){const i=$.dom.createEl("div",{className:"vjs-related-video-item"}),a=e.thumbnail||this.getPlaceholderImage(e.title),o=$.dom.createEl("img",{className:"vjs-related-video-thumbnail",src:a,alt:e.title,loading:"lazy",onerror:()=>{o.src=this.getPlaceholderImage(e.title)}}),u=$.dom.createEl("div",{className:"vjs-related-video-overlay"}),c=$.dom.createEl("div",{className:"vjs-related-video-title"});c.textContent=e.title;const f=$.dom.createEl("div",{className:"vjs-related-video-meta"}),m=$.dom.createEl("div",{className:"vjs-related-video-author"});m.textContent=e.author;const b=$.dom.createEl("div",{className:"vjs-related-video-views"});b.textContent=e.views,f.appendChild(m),f.appendChild(b);const S=$.dom.createEl("div",{className:"vjs-related-video-duration"}),E=A=>{if(!A||A===0)return"";const R=Math.floor(A/60),N=Math.floor(A%60);return`${R}:${N.toString().padStart(2,"0")}`};return S.textContent=E(e.duration),u.appendChild(c),u.appendChild(f),i.appendChild(o),i.appendChild(u),e.duration&&e.duration>0&&i.appendChild(S),i.addEventListener("click",()=>{window.location.href=`/view?m=${e.id}`}),i}getPlaceholderImage(e){const i=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];let a=0;for(let b=0;b<e.length;b++)a=e.charCodeAt(b)+((a<<5)-a);const o=Math.abs(a)%i.length,u=i[o],c=e.charAt(0).toUpperCase(),f=document.createElement("canvas");f.width=320,f.height=180;const m=f.getContext("2d");m.fillStyle=u,m.fillRect(0,0,320,180),m.fillStyle="rgba(255, 255, 255, 0.1)";for(let b=0;b<20;b++)m.fillRect(Math.random()*320,Math.random()*180,2,2);return m.fillStyle="white",m.font="bold 48px Arial",m.textAlign="center",m.textBaseline="middle",m.fillText(c,160,90),f.toDataURL()}getMaxVideosForScreen(){const e=window.innerWidth;return e>=1200?12:e>=1024?9:e>=768?6:4}createSampleVideos(){return[{id:"sample1",title:"React Full Course for Beginners",author:"Bro Code",views:"2.1M views",duration:1800,thumbnail:"https://img.youtube.com/vi/dGcsHMXbSOA/maxresdefault.jpg"},{id:"sample2",title:"JavaScript ES6+ Features",author:"Tech Tutorials",views:"850K views",duration:1200,thumbnail:"https://img.youtube.com/vi/WZQc7RUAg18/maxresdefault.jpg"},{id:"sample3",title:"CSS Grid Layout Masterclass",author:"Web Dev Academy",views:"1.2M views",duration:2400,thumbnail:"https://img.youtube.com/vi/0xMQfnTU6oo/maxresdefault.jpg"},{id:"sample4",title:"Node.js Backend Development",author:"Code Master",views:"650K views",duration:3600,thumbnail:"https://img.youtube.com/vi/fBNz6F-Cowg/maxresdefault.jpg"},{id:"sample5",title:"Vue.js Complete Guide",author:"Frontend Pro",views:"980K views",duration:2800,thumbnail:"https://img.youtube.com/vi/qZXt1Aom3Cs/maxresdefault.jpg"},{id:"sample6",title:"Python Data Science",author:"Data Academy",views:"1.5M views",duration:4200,thumbnail:"https://img.youtube.com/vi/ua-CiDNNj30/maxresdefault.jpg"},{id:"sample7",title:"TypeScript Fundamentals",author:"TypeScript Expert",views:"720K views",duration:2100,thumbnail:"https://img.youtube.com/vi/BwuLxPH8IDs/maxresdefault.jpg"},{id:"sample8",title:"MongoDB Database Tutorial",author:"Database Pro",views:"890K views",duration:1800,thumbnail:"https://img.youtube.com/vi/-56x56UppqQ/maxresdefault.jpg"},{id:"sample9",title:"Docker Containerization",author:"DevOps Master",views:"1.1M views",duration:3200,thumbnail:"https://img.youtube.com/vi/pTFZFxd4hOI/maxresdefault.jpg"},{id:"sample10",title:"AWS Cloud Services",author:"Cloud Expert",views:"1.3M views",duration:4500,thumbnail:"https://img.youtube.com/vi/ITcXLS3h2qU/maxresdefault.jpg"},{id:"sample11",title:"GraphQL API Design",author:"API Specialist",views:"680K views",duration:2600,thumbnail:"https://img.youtube.com/vi/ed8SzALpx1Q/maxresdefault.jpg"},{id:"sample12",title:"Machine Learning Basics",author:"AI Academy",views:"2.3M views",duration:5400,thumbnail:"https://img.youtube.com/vi/i_LwzRVP7bg/maxresdefault.jpg"}]}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}}$.registerComponent("EndScreenOverlay",Ix);const eI="",U5=$.getComponent("Component");class Px extends U5{constructor(e,i){super(e,i),this.nextVideoData=i.nextVideoData||null,this.countdownSeconds=i.countdownSeconds||5,this.onPlayNext=i.onPlayNext||(()=>{}),this.onCancel=i.onCancel||(()=>{}),this.currentCountdown=this.countdownSeconds,this.countdownInterval=null,this.isActive=!1,this.startCountdown=this.startCountdown.bind(this),this.stopCountdown=this.stopCountdown.bind(this),this.handlePlayNext=this.handlePlayNext.bind(this),this.handleCancel=this.handleCancel.bind(this),this.updateCountdownDisplay=this.updateCountdownDisplay.bind(this)}createEl(){var c,f,m,b;const e=super.createEl("div",{className:"vjs-autoplay-countdown-overlay"}),i=((c=this.nextVideoData)==null?void 0:c.title)||"Next Video",a=((f=this.nextVideoData)==null?void 0:f.thumbnail)||"";e.innerHTML=`
<div class="autoplay-countdown-content">
<div class="autoplay-countdown-header">
<h3>Up next in <span class="countdown-timer">${this.countdownSeconds}</span></h3>
</div>
<div class="autoplay-countdown-video-info">
${a?`<div class="next-video-thumbnail">
<img src="${a}" alt="${i}" />
<div class="play-overlay">
<svg viewBox="0 0 24 24" width="28" height="28" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>`:""}
<div class="next-video-details">
<h4 class="next-video-title">${i}</h4>
${(m=this.nextVideoData)!=null&&m.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
${(b=this.nextVideoData)!=null&&b.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
</div>
</div>
<div class="autoplay-countdown-actions">
<button class="autoplay-play-button" type="button">
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
Play Now
</button>
<button class="autoplay-cancel-button" type="button">
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" fill="currentColor">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
Cancel
</button>
</div>
</div>
`;const o=e.querySelector(".autoplay-play-button"),u=e.querySelector(".autoplay-cancel-button");return o&&o.addEventListener("click",S=>{S.preventDefault(),this.handlePlayNext()}),u&&u.addEventListener("click",S=>{S.preventDefault(),this.handleCancel()}),e.style.display="none",e}startCountdown(){this.isActive=!0,this.currentCountdown=this.countdownSeconds,this.show(),this.updateCountdownDisplay(),this.countdownInterval=setInterval(()=>{this.currentCountdown--,this.updateCountdownDisplay(),this.currentCountdown<=0&&(this.stopCountdown(),this.handlePlayNext())},1e3),console.log("Autoplay countdown started:",this.countdownSeconds,"seconds")}stopCountdown(){this.isActive=!1,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),this.hide(),console.log("Autoplay countdown stopped")}updateCountdownDisplay(){const e=this.el().querySelector(".countdown-timer");e&&(e.textContent=this.currentCountdown)}handlePlayNext(){console.log("Autoplay: Playing next video immediately");try{this.stopCountdown(),this.onPlayNext()}catch(e){console.error("Error in handlePlayNext:",e)}}handleCancel(){console.log("Autoplay: Cancelled by user");try{this.stopCountdown(),this.onCancel()}catch(e){console.error("Error in handleCancel:",e)}}show(){this.el()&&(this.el().style.display="flex",this.el().classList.add("autoplay-countdown-show"))}hide(){this.el()&&(this.el().style.display="none",this.el().classList.remove("autoplay-countdown-show"))}formatDuration(e){if(!e||e===0)return"";const i=Math.floor(e/3600),a=Math.floor(e%3600/60),o=e%60;return i>0?`${i}:${a.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${a}:${o.toString().padStart(2,"0")}`}updateNextVideoData(e){var i,a,o,u;if(this.nextVideoData=e,this.el()){const c=((i=this.nextVideoData)==null?void 0:i.title)||"Next Video",f=((a=this.nextVideoData)==null?void 0:a.thumbnail)||"",m=this.el().querySelector(".autoplay-countdown-video-info");m&&(m.innerHTML=`
${f?`<div class="next-video-thumbnail">
<img src="${f}" alt="${c}" />
<div class="play-overlay">
<svg viewBox="0 0 24 24" width="28" height="28" fill="currentColor">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>`:""}
<div class="next-video-details">
<h4 class="next-video-title">${c}</h4>
${(o=this.nextVideoData)!=null&&o.author?`<p class="next-video-author">${this.nextVideoData.author}</p>`:""}
${(u=this.nextVideoData)!=null&&u.duration?`<p class="next-video-duration">${this.formatDuration(this.nextVideoData.duration)}</p>`:""}
</div>
`)}}dispose(){this.stopCountdown(),super.dispose()}}$.registerComponent("AutoplayCountdownOverlay",Px);const B5=$.getComponent("Component");class Nx extends B5{constructor(e,i){super(e,i),this.on(e,"loadedmetadata",this.updateChapterMarkers),this.on(e,"texttrackchange",this.updateChapterMarkers),this.chaptersData=[],this.tooltip=null,this.isHovering=!1,this.previewSprite=i.previewSprite||null}createEl(){const e=super.createEl("div",{className:"vjs-chapter-markers-track"});return this.tooltip=null,e}updateChapterMarkers(){const e=this.player(),i=e.textTracks();let a=null;for(let u=0;u<i.length;u++)if(i[u].kind==="chapters"){a=i[u];break}if(!a||!a.cues)return;this.chaptersData=[];for(let u=0;u<a.cues.length;u++){const c=a.cues[u];this.chaptersData.push({startTime:c.startTime,endTime:c.endTime,text:c.text})}this.el().innerHTML="";const o=e.duration();if(!(!o||o===1/0)){for(let u=0;u<a.cues.length;u++){const c=a.cues[u],f=this.createMarker(c,o);this.el().appendChild(f)}this.setupProgressBarHover()}}setupProgressBarHover(){const e=this.player().getChild("controlBar").getChild("progressControl");if(!e)return;const i=e.getChild("seekBar");if(!i)return;const a=i.el();if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=$.dom.createEl("div",{className:"vjs-chapter-floating-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",zIndex:"1000",bottom:"45px",transform:"translateX(-50%)",display:"none",minWidth:"160px",maxWidth:"200px",width:"auto"}),this.chapterTitle=$.dom.createEl("div",{className:"chapter-title"}),this.chapterInfo=$.dom.createEl("div",{className:"chapter-info"}),this.positionInfo=$.dom.createEl("div",{className:"position-info"}),this.chapterImage=$.dom.createEl("div",{className:"chapter-image-sprite"}),Object.assign(this.chapterImage.style,{display:"block",overflow:"hidden"}),this.tooltip.appendChild(this.chapterTitle),this.tooltip.appendChild(this.chapterImage),this.tooltip.appendChild(this.chapterInfo),this.tooltip.appendChild(this.positionInfo)),!a.querySelector(".vjs-chapter-floating-tooltip"))try{a.appendChild(this.tooltip)}catch{return}const o=e.el();o.removeEventListener("mouseenter",this.handleMouseEnter),o.removeEventListener("mouseleave",this.handleMouseLeave),o.removeEventListener("mousemove",this.handleMouseMove),this.handleMouseEnter=()=>{this.isHovering=!0,this.tooltip.style.display="block"},this.handleMouseLeave=()=>{this.isHovering=!1,this.tooltip.style.display="none"},this.handleMouseMove=u=>{this.isHovering&&this.updateChapterTooltip(u,a,o)},o.addEventListener("mouseenter",this.handleMouseEnter),o.addEventListener("mouseleave",this.handleMouseLeave),o.addEventListener("mousemove",this.handleMouseMove)}updateChapterTooltip(e,i,a){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const u=i.getBoundingClientRect(),c=a.getBoundingClientRect(),f=e.clientX-u.left,b=Math.max(0,Math.min(1,f/u.width))*o,S=e.clientX-c.left,E=this.findChapterAtTime(b);if(E){const H=Y=>{const K=Math.floor(Y/60),se=Math.floor(Y%60);return`${K}:${se.toString().padStart(2,"0")}`},I=H(E.startTime),G=H(E.endTime),F=H(b);this.chapterTitle.textContent=E.text,this.chapterInfo.textContent=`Chapter: ${I} - ${G}`,this.positionInfo.textContent=`Position: ${F}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}else{const H=this.formatTime(b);this.chapterTitle.textContent="No Chapter",this.chapterInfo.textContent="",this.positionInfo.textContent=`Position: ${H}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const A=this.tooltip.offsetWidth||240,R=c.width,N=A/2;let w=S;w-N<0?w=N+5:w+N>R&&(w=R-N-5),this.tooltip.style.left=`${w}px`,this.tooltip.style.visibility="visible",this.tooltip.style.display="block"}findChapterAtTime(e){for(const i of this.chaptersData)if(e>=i.startTime&&e<i.endTime)return i;return null}updateSpriteThumbnail(e){if(!this.previewSprite||!this.previewSprite.url){this.chapterImage.style.display="none",console.log("No sprite data available:",this.previewSprite);return}const{url:i,frame:a}=this.previewSprite,{width:o,height:u}=a,c=a.seconds||10,f=this.player().duration()||45,m=Math.ceil(f/c),b=Math.min(m,6);let S=Math.floor(e/c);S=Math.min(S,b-1);const E=S,A=0,R=-(A*o),N=-(E*u);if(console.log(`Time: ${e}s, Duration: ${this.player().duration()}s, Interval: ${c}s, Frame: ${S}/${b-1}, Row: ${E}, Col: ${A}, Pos: ${R}px ${N}px, URL: ${i}`),this.chapterImage.style.backgroundImage=`url("${i}")`,this.chapterImage.style.backgroundPosition=`${R}px ${N}px`,this.chapterImage.style.backgroundSize="auto",this.chapterImage.style.backgroundRepeat="no-repeat",this.chapterImage.style.display="block",S>=3&&e>30){const w=-(2*u);this.chapterImage.style.backgroundPosition=`${R}px ${w}px`,console.log(`Fallback: Using frame 2 instead of frame ${S} for time ${e}s`)}}formatTime(e){const i=Math.floor(e/60),a=Math.floor(e%60);return`${i}:${a.toString().padStart(2,"0")}`}createMarker(e,i){const a=$.dom.createEl("div",{className:"vjs-chapter-marker"}),o=e.startTime/i*100;a.style.left=o+"%";const u=$.dom.createEl("div",{className:"vjs-chapter-marker-tooltip"});return u.textContent=e.text,a.appendChild(u),a.addEventListener("click",c=>{c.stopPropagation(),this.player().currentTime(e.startTime)}),a.style.pointerEvents="auto",a.style.cursor="pointer",a}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const a=e.el();a.removeEventListener("mouseenter",this.handleMouseEnter),a.removeEventListener("mouseleave",this.handleMouseLeave),a.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}$.registerComponent("ChapterMarkers",Nx);const F5=$.getComponent("Button");class Ux extends F5{constructor(e,i){super(e,i)}createEl(){const e=super.createEl("button",{className:"vjs-next-video-control vjs-control vjs-button",type:"button",title:"Next Video","aria-label":"Next Video"}),i=$.dom.createEl("span",{"aria-hidden":"true"});i.innerHTML=`
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 34L28.1667 24L14 14V34ZM30.6667 14V34H34V14H30.6667Z" fill="currentColor"/>
</svg>
`;const a=$.dom.createEl("span",{className:"vjs-control-text"});return a.textContent="Next Video",e.appendChild(i),e.appendChild(a),e}handleClick(){this.player().trigger("nextVideo")}}$.registerComponent("NextVideoButton",Ux);const H5=$.getComponent("Button");class Bx extends H5{constructor(e,i){if(super(e,i),this.userPreferences=i.userPreferences,this.userPreferences){const a=this.userPreferences.getPreference("autoplay");this.isAutoplayEnabled=a===!0,console.log("Autoplay button initialized with saved preference:",this.isAutoplayEnabled)}else this.isAutoplayEnabled=!1,console.log("Autoplay button initialized with default (no userPreferences):",this.isAutoplayEnabled);this.updateIcon=this.updateIcon.bind(this),this.handleClick=this.handleClick.bind(this)}createEl(){const e=super.createEl("button",{className:"vjs-autoplay-toggle vjs-control vjs-button",type:"button",title:this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off","aria-label":this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off"});this.iconSpan=$.dom.createEl("span",{"aria-hidden":"true",className:"vjs-autoplay-icon"}),console.log("AutoplayToggleButton createEl: isAutoplayEnabled =",this.isAutoplayEnabled),this.isAutoplayEnabled?(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ff4444;">●</span>',console.log("Setting RED icon (autoplay ON)")):(this.iconSpan.innerHTML='<span style="font-size: 1.2em; color: #ccc;">○</span>',console.log("Setting GRAY icon (autoplay OFF)"));const i=$.dom.createEl("span",{className:"vjs-control-text"});return i.textContent=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off",console.log("✓ Autoplay button created with initial tooltip:",this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off"),e.appendChild(this.iconSpan),e.appendChild(i),this.addTouchSupport(e),e}updateIcon(){this.iconSpan.style.transition="opacity 0.1s ease",this.iconSpan.style.opacity="0",setTimeout(()=>{if(this.isAutoplayEnabled){if(this.iconSpan.innerHTML=`<span style="transform: inherit !important; margin: 20px 0 0; font-size: 1.2em; color: #ff4444;">
<svg width="198" height="100" viewBox="0 0 198 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="18" width="180" height="64" rx="32" fill="white"/>
<rect x="98" width="100" height="100" rx="50" fill="white"/>
<path d="M133 69L163 50L133 31V69ZM138.455 59.0929V40.9071L152.773 50L138.455 59.0929Z" fill="#1C1B1F"/>
</svg>
</span>`,this.el()){this.el().title="Autoplay is on",this.el().setAttribute("aria-label","Autoplay is on");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is on"),console.log('✓ Autoplay tooltip updated to: "Autoplay is on"')}}else if(this.iconSpan.innerHTML=`<span style="transform: inherit !important; margin: 20px 0 0; font-size: 1.2em; color: #ccc;">
<svg width="198" height="100" viewBox="0 0 198 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="18" y="18" width="180" height="64" rx="32" fill="white"/>
<rect width="100" height="100" rx="50" fill="white"/>
<path d="M52.1429 65V35H65V65H52.1429ZM35 65V35H47.8571V65H35ZM56.4286 60.7143H60.7143V39.2857H56.4286V60.7143ZM39.2857 60.7143H43.5714V39.2857H39.2857V60.7143Z" fill="#1C1B1F"/>
</svg>
</span>`,this.el()){this.el().title="Autoplay is off",this.el().setAttribute("aria-label","Autoplay is off");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent="Autoplay is off"),console.log('✓ Autoplay tooltip updated to: "Autoplay is off"')}this.iconSpan.style.opacity="1"},100)}handleClick(){this.isAutoplayEnabled=!this.isAutoplayEnabled,this.userPreferences&&(this.userPreferences.setAutoplayPreference(this.isAutoplayEnabled),console.log("Autoplay preference saved to localStorage:",this.isAutoplayEnabled)),this.updateIcon(),console.log("Autoplay toggled:",this.isAutoplayEnabled?"ON":"OFF"),console.log("✓ Tooltip should now show:",this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off"),this.player().trigger("autoplayToggle",{autoplay:this.isAutoplayEnabled})}setAutoplayState(e){this.isAutoplayEnabled=e,this.updateIcon()}addTouchSupport(e){let i=0,a=!1;e.addEventListener("touchstart",o=>{i=Date.now(),a=!1},{passive:!0}),e.addEventListener("touchend",o=>{Date.now()-i<500&&(o.preventDefault(),o.stopPropagation(),e.classList.add("touch-active"),a=!0,setTimeout(()=>{e.classList.remove("touch-active")},2e3))},{passive:!1}),e.addEventListener("click",o=>{a||console.log("Desktop click on autoplay button")})}}$.registerComponent("AutoplayToggleButton",Bx);const j5=$.getComponent("Component");class Uy extends j5{constructor(e,i){super(e,i),this.updateContent=this.updateContent.bind(this),this.on(e,"timeupdate",this.updateContent),this.on(e,"durationchange",this.updateContent),this.on(e,"loadedmetadata",this.updateContent),this.options_={displayNegative:!1,customPrefix:"",customSuffix:"",...i}}createEl(){const e=$.dom.createEl("div",{className:"vjs-remaining-time vjs-time-control vjs-control custom-remaining-time"});return e.innerHTML=`
<span class="vjs-control-text" role="presentation">Time Display&nbsp;</span>
<span class="vjs-remaining-time-display" role="presentation">0:00 / 0:00</span>
`,e}updateContent(){const e=this.player(),i=e.currentTime(),a=e.duration(),o=this.el().querySelector(".vjs-remaining-time-display");if(o){const u=this.formatTime(isNaN(i)?0:i),c=this.formatTime(isNaN(a)?0:a);o.textContent=`${u} / ${c}`}}formatTime(e){const{customPrefix:i,customSuffix:a}=this.options_,o=Math.floor(e/3600),u=Math.floor(e%3600/60),c=Math.floor(e%60);let f;return o>0?f=`${o}:${u.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`:f=`${u}:${c.toString().padStart(2,"0")}`,`${i}${f}${a}`}handleClick(){console.log("Time display clicked")}dispose(){super.dispose()}}Uy.prototype.controlText_="Time Display",$.registerComponent("CustomRemainingTime",Uy);const z5=$.getComponent("Component");class By extends z5{constructor(e,i){super(e,i),this.chaptersData=i.chaptersData||[],this.overlay=null,this.chaptersList=null,this.seriesTitle=i.seriesTitle||"Chapters",this.channelName=i.channelName||"",this.thumbnail=i.thumbnail||"",this.createOverlay=this.createOverlay.bind(this),this.updateCurrentChapter=this.updateCurrentChapter.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.player().ready(()=>{this.createOverlay(),this.setupChaptersButton()})}createOverlay(){if(!this.chaptersData||this.chaptersData.length===0){console.log("⚠ No chapters data available for overlay");return}const e=this.player().el();this.overlay=document.createElement("div"),this.overlay.className="custom-chapters-overlay",this.overlay.style.cssText=`
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 9999;
display: none;
pointer-events: none;
background: rgba(0, 0, 0, 0.35);
`;const i=document.createElement("div");i.className="video-chapter",i.style.cssText=`
pointer-events: auto;
z-index: 9999999;
`,this.overlay.appendChild(i);const a=document.createElement("div");a.className="chapter-head",i.appendChild(a);const o=document.createElement("div");o.className="playlist-title",a.appendChild(o);const u=document.createElement("div");u.className="chapter-title",u.innerHTML=`
<h3><a href="#">${this.seriesTitle}</a></h3>
<p><a href="#">${this.channelName}</a> <span>1 / ${this.chaptersData.length}</span></p>
`,o.appendChild(u);const c=document.createElement("div");c.className="chapter-close";const f=document.createElement("button");f.setAttribute("aria-label","Close chapters"),f.innerHTML=`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.7096 12L20.8596 20.15L20.1496 20.86L11.9996 12.71L3.84965 20.86L3.13965 20.15L11.2896 12L3.14965 3.85001L3.85965 3.14001L11.9996 11.29L20.1496 3.14001L20.8596 3.85001L12.7096 12Z" fill="currentColor"/>
</svg>
`,f.onclick=()=>{this.overlay.style.display="none";const S=this.player().el();S&&S.classList.remove("chapters-open")},c.appendChild(f),o.appendChild(c);const m=document.createElement("div");m.className="chapter-body",i.appendChild(m);const b=document.createElement("ul");m.appendChild(b),this.chaptersList=b,this.chaptersData.forEach((S,E)=>{const A=document.createElement("li"),R=document.createElement("div");R.className=`playlist-items ${E===0?"selected":""}`;const N=document.createElement("a");N.href="#",N.onclick=Ae=>Ae.preventDefault();const w=document.createElement("div");w.className="playlist-drag-handle",w.textContent=E===0?"▶":String(E+1);const H=document.createElement("div");H.className="thumbnail-meta";const I=Math.max(0,Math.floor((S.endTime||S.startTime)-S.startTime)),G=Math.floor(I/3600),F=Math.floor(I%3600/60),Y=I%60,K=G>0?`${String(G).padStart(2,"0")}:${String(F).padStart(2,"0")}:${String(Y).padStart(2,"0")}`:`${String(F).padStart(2,"0")}:${String(Y).padStart(2,"0")}`,se=document.createElement("h4");se.textContent=S.text;const Q=document.createElement("div");Q.className="meta-sub";const le=document.createElement("span");le.className="meta-dynamic",le.textContent=this.channelName,le.setAttribute("data-duration",K),Q.appendChild(le),H.appendChild(se),H.appendChild(Q);const ue=document.createElement("div");ue.className="thumbnail-action";const Ie=document.createElement("button");Ie.innerHTML=`
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 16.5C12.83 16.5 13.5 17.17 13.5 18C13.5 18.83 12.83 19.5 12 19.5C11.17 19.5 10.5 18.83 10.5 18C10.5 17.17 11.17 16.5 12 16.5ZM10.5 12C10.5 12.83 11.17 13.5 12 13.5C12.83 13.5 13.5 12.83 13.5 12C13.5 11.17 12.83 10.5 12 10.5C11.17 10.5 10.5 11.17 10.5 12ZM10.5 6C10.5 6.83 11.17 7.5 12 7.5C12.83 7.5 13.5 6.83 13.5 6C13.5 5.17 12.83 4.5 12 4.5C11.17 4.5 10.5 5.17 10.5 6Z" fill="currentColor"/>
</svg>`,ue.appendChild(Ie);const be=()=>{this.player().currentTime(S.startTime),this.overlay.style.display="none",this.updateActiveItem(E)};R.addEventListener("click",be),R.addEventListener("touchstart",be),N.appendChild(w),N.appendChild(H),N.appendChild(ue),R.appendChild(N),A.appendChild(R),this.chaptersList.appendChild(A)}),e.appendChild(this.overlay),this.player().on("timeupdate",this.updateCurrentChapter),console.log("✓ Custom chapters overlay created")}setupChaptersButton(){const e=this.player().getChild("controlBar").getChild("chaptersButton");e&&(e.off("click"),e.on("click",this.toggleOverlay),e.on("touchstart",this.toggleOverlay))}toggleOverlay(){if(!this.overlay)return;const e=this.player().el(),i=this.overlay.style.display==="none"||!this.overlay.style.display;this.overlay.style.display=i?"block":"none",e&&e.classList.toggle("chapters-open",i);try{this.player().el().querySelectorAll(".vjs-menu").forEach(a=>{a.classList.remove("vjs-lock-showing"),a.style.display="none"})}catch{}}updateCurrentChapter(){if(!this.chaptersList||!this.chaptersData)return;const e=this.player().currentTime();this.chaptersList.querySelectorAll(".playlist-items").forEach((a,o)=>{const u=this.chaptersData[o],c=e>=u.startTime&&(o===this.chaptersData.length-1||e<this.chaptersData[o+1].startTime),f=a.querySelector(".playlist-drag-handle"),m=a.querySelector(".meta-dynamic");c?(a.classList.add("selected"),f&&(f.textContent="▶"),m&&(m.textContent=m.getAttribute("data-duration")||"")):(a.classList.remove("selected"),f&&(f.textContent=String(o+1)),m&&(m.textContent=this.channelName))})}updateActiveItem(e){this.chaptersList.querySelectorAll(".playlist-items").forEach((a,o)=>{const u=a.querySelector(".playlist-drag-handle"),c=a.querySelector(".meta-dynamic");o===e?(a.classList.add("selected"),u&&(u.textContent="▶"),c&&(c.textContent=c.getAttribute("data-duration")||"")):(a.classList.remove("selected"),u&&(u.textContent=String(o+1)),c&&(c.textContent=this.channelName))})}dispose(){this.overlay&&this.overlay.remove();const e=this.player().el();e&&e.classList.remove("chapters-open"),super.dispose()}}By.prototype.controlText_="Chapters Overlay",$.registerComponent("CustomChaptersOverlay",By);const tI="";class Fx{constructor(){this.storageKey="videojs_user_preferences",this.isRestoringSubtitles=!1,this.subtitleAutoSaveDisabled=!1,this.defaultPreferences={volume:1,playbackRate:1,quality:"auto",subtitleLanguage:null,subtitleEnabled:!1,muted:!1,autoplay:!1}}getPreferences(){try{const e=localStorage.getItem(this.storageKey);if(e){const i=JSON.parse(e);return{...this.defaultPreferences,...i}}}catch(e){console.warn("Error reading user preferences from localStorage:",e)}return{...this.defaultPreferences}}savePreferences(e){try{const a={...this.getPreferences(),...e};localStorage.setItem(this.storageKey,JSON.stringify(a)),console.log("User preferences saved:",a)}catch(i){console.warn("Error saving user preferences to localStorage:",i)}}getPreference(e){return this.getPreferences()[e]}setPreference(e,i,a=!1){if(e==="subtitleLanguage"){if(console.log(`🔄 Setting subtitleLanguage: ${i} (restoring: ${this.isRestoringSubtitles}, autoSaveDisabled: ${this.subtitleAutoSaveDisabled}, forceSet: ${a})`),this.isRestoringSubtitles){console.log("🚫 BLOCKED: Subtitle language change during restoration");return}if(this.subtitleAutoSaveDisabled&&!a){console.log("🚫 BLOCKED: Subtitle language change during auto-save disabled period (use forceSet=true to override)");return}console.trace("Subtitle preference change stack trace")}this.savePreferences({[e]:i})}resetPreferences(){try{localStorage.removeItem(this.storageKey),console.log("User preferences reset to defaults")}catch(e){console.warn("Error resetting user preferences:",e)}}applyToPlayer(e){const i=this.getPreferences();this.subtitleAutoSaveDisabled=!0,console.log("🔒 Subtitle auto-save DISABLED during initial load"),setTimeout(()=>{this.subtitleAutoSaveDisabled=!1,console.log("🔓 Subtitle auto-save RE-ENABLED after initial load period")},3e3),typeof i.volume=="number"&&i.volume>=0&&i.volume<=1&&e.volume(i.volume),typeof i.muted=="boolean"&&e.muted(i.muted),typeof i.playbackRate=="number"&&i.playbackRate>0&&e.playbackRate(i.playbackRate),console.log("Applied user preferences to player:",i)}setupAutoSave(e){e.on("volumechange",()=>{this.setPreference("volume",e.volume()),this.setPreference("muted",e.muted())}),e.on("ratechange",()=>{this.setPreference("playbackRate",e.playbackRate())}),e.on("texttrackchange",()=>{if(this.isRestoringSubtitles){console.log("Skipping subtitle save - currently restoring preferences");return}setTimeout(()=>{const i=e.textTracks();let a=null;for(let o=0;o<i.length;o++){const u=i[o];if(u.kind==="subtitles"&&u.mode==="showing"){a=u.language,console.log("Active subtitle language detected:",a);break}}a||console.log("No subtitles active, saving null"),this.setPreference("subtitleLanguage",a)},100)}),this.setupSubtitleMenuListeners(e),console.log("Auto-save preferences listeners set up")}setupSubtitleMenuListeners(e){setTimeout(()=>{const i=e.getChild("controlBar");console.log("=== Searching for subtitle controls ===");const a=["subtitlesButton","captionsButton","subsCapsButton","textTrackButton"];let o=null;for(const u of a){const c=i.getChild(u);if(c){console.log(`Found subtitle button: ${u}`),o=c;break}}o||(console.log("Scanning all control bar children..."),i.children().forEach((c,f)=>{const m=c.name_||c.constructor.name||"Unknown";console.log(`Child ${f}: ${m}`),(m.toLowerCase().includes("subtitle")||m.toLowerCase().includes("caption")||m.toLowerCase().includes("text"))&&(console.log(`Potential subtitle button found: ${m}`),o=c)})),o?(console.log("Found subtitles button, setting up menu listeners"),setTimeout(()=>{this.attachMenuItemListeners(e,o)},500),setTimeout(()=>{this.attachMenuItemListeners(e,o)},2e3)):(console.log("No subtitles button found after exhaustive search"),this.setupDOMBasedListeners(e))},1e3)}setupDOMBasedListeners(e){console.log("Setting up DOM-based subtitle listeners as fallback"),setTimeout(()=>{const i=e.el();i&&(i.addEventListener("click",a=>{const o=a.target;(o.closest(".vjs-subtitles-menu-item")||o.closest(".vjs-captions-menu-item")||o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("subtitle"))&&(console.log("Subtitle menu item clicked via DOM listener:",o.textContent),setTimeout(()=>{this.detectActiveSubtitleFromDOM(e,!0)},200)),o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("off")&&(console.log("Captions off clicked via DOM listener"),setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},200))}),console.log("DOM-based subtitle listeners attached"))},1500)}detectActiveSubtitleFromDOM(e,i=!1){if(this.isRestoringSubtitles){console.log("Skipping DOM subtitle save - currently restoring preferences");return}const a=e.textTracks();let o=null;for(let u=0;u<a.length;u++){const c=a[u];if(c.kind==="subtitles"&&c.mode==="showing"){o=c.language,console.log("DOM detection - Active subtitle language:",o,c.label);break}}this.setPreference("subtitleLanguage",o,i)}attachMenuItemListeners(e,i){try{const a=i.menu;a&&a.children_?(console.log("Found subtitle menu with",a.children_.length,"items"),a.children_.forEach((o,u)=>{if(o.track){const c=o.track;console.log(`Menu item ${u}: ${c.label} (${c.language})`);const f=o.handleClick.bind(o);o.handleClick=()=>{console.log("Subtitle menu item clicked:",c.label,c.language),f(),setTimeout(()=>{c.mode==="showing"?(console.log("Saving subtitle preference:",c.language),this.setPreference("subtitleLanguage",c.language,!0)):(console.log("Subtitle disabled, saving null"),this.setPreference("subtitleLanguage",null,!0))},100)}}else if(o.label&&o.label.toLowerCase().includes("off")){console.log("Found captions off menu item");const c=o.handleClick.bind(o);o.handleClick=()=>{console.log("Captions off clicked"),c(),setTimeout(()=>{console.log("Saving subtitle preference: null (off)"),this.setPreference("subtitleLanguage",null,!0)},100)}}})):console.log("Could not find subtitle menu or menu items")}catch(a){console.error("Error setting up subtitle menu listeners:",a)}}applySubtitlePreference(e){const i=this.getPreference("subtitleLanguage"),a=this.getPreference("subtitleEnabled");if(i&&a){this.isRestoringSubtitles=!0,console.log("isRestoringSubtitles",this.isRestoringSubtitles);const o=(u=1)=>{const c=e.textTracks();console.log(`Subtitle application attempt ${u}, found ${c.length} text tracks`);for(let m=0;m<c.length;m++){const b=c[m];console.log(`Track ${m}: kind=${b.kind}, language=${b.language}, label=${b.label}, mode=${b.mode}`)}for(let m=0;m<c.length;m++){const b=c[m];b.kind==="subtitles"&&(b.mode="disabled")}let f=!1;for(let m=0;m<c.length;m++){const b=c[m];if(b.kind==="subtitles"&&b.language===i){b.mode="showing",console.log("✓ Applied saved subtitle language:",i,b.label),f=!0,this.updateSubtitleMenuUI(e,b),this.updateSubtitleButtonVisualState(e,!0);break}}setTimeout(()=>{this.isRestoringSubtitles=!1,console.log("✅ Subtitle restoration complete, auto-save re-enabled")},600),!f&&u<5?(console.log(`Subtitle language ${i} not found, retrying in ${u*50}ms...`),setTimeout(()=>o(u+1),u*50)):f||(console.warn("Could not find subtitle track for language:",i),this.isRestoringSubtitles=!1)};o()}else{try{const o=e.textTracks();for(let u=0;u<o.length;u++){const c=o[u];c.kind==="subtitles"&&(c.mode="disabled")}this.updateSubtitleButtonVisualState(e,!1),this.updateCustomSettingsMenuUI(e)}catch{}console.log("No subtitle auto-apply on load (disabled or no language).")}}updateSubtitleButtonVisualState(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");if(o&&o.el()){const u=o.el();i?(u.classList.add("vjs-subs-active"),console.log("✓ Added vjs-subs-active class to subtitle button")):(u.classList.remove("vjs-subs-active"),console.log("✓ Removed vjs-subs-active class from subtitle button"))}else console.log("Subtitle button not found for visual state update")}catch(a){console.error("Error updating subtitle button visual state:",a)}}updateSubtitleMenuUI(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");o&&o.menu&&o.menu.children_.forEach(c=>{c.track?c.track===i?(c.selected(!0),console.log("Updated menu UI for:",c.track.label)):c.selected(!1):c.label&&c.label.toLowerCase().includes("off")&&c.selected(!1)}),this.updateCustomSettingsMenuUI(e)}catch(a){console.error("Error updating subtitle menu UI:",a)}}updateCustomSettingsMenuUI(e){const i=(a=1)=>{try{const u=e.getChild("controlBar").getChild("CustomSettingsMenu");u&&u.refreshSubtitlesSubmenu?(console.log("Updating custom settings menu UI..."),u.refreshSubtitlesSubmenu()):a<5?(console.log(`Custom settings menu not found, retrying in ${a*200}ms... (attempt ${a})`),setTimeout(()=>i(a+1),a*200)):console.log("Custom settings menu not found after multiple attempts")}catch(o){console.error("Error updating custom settings menu UI:",o)}};i()}getQualityPreference(){return this.getPreference("quality")}setQualityPreference(e){this.setPreference("quality",e)}forceSetSubtitleLanguage(e){console.log(`🚀 FORCE SAVING subtitle language: ${e}`);const a={...this.getPreferences(),subtitleLanguage:e};try{localStorage.setItem(this.storageKey,JSON.stringify(a)),console.log("✅ Force saved subtitle language:",e)}catch(o){console.error("❌ Error force saving subtitle language:",o)}}getAutoplayPreference(){return this.getPreference("autoplay")}setAutoplayPreference(e){this.setPreference("autoplay",e),console.log("Autoplay preference saved:",e)}}const V5=$.getComponent("Component");class Fy extends V5{constructor(e,i){super(e,i),this.settingsButton=null,this.settingsOverlay=null,this.speedSubmenu=null,this.qualitySubmenu=null,this.subtitlesSubmenu=null,this.userPreferences=(i==null?void 0:i.userPreferences)||new Fx,this.providedQualities=(i==null?void 0:i.qualities)||null,this.createSettingsButton=this.createSettingsButton.bind(this),this.createSettingsOverlay=this.createSettingsOverlay.bind(this),this.positionButton=this.positionButton.bind(this),this.toggleSettings=this.toggleSettings.bind(this),this.handleSpeedChange=this.handleSpeedChange.bind(this),this.handleQualityChange=this.handleQualityChange.bind(this),this.getAvailableQualities=this.getAvailableQualities.bind(this),this.createSubtitlesSubmenu=this.createSubtitlesSubmenu.bind(this),this.refreshSubtitlesSubmenu=this.refreshSubtitlesSubmenu.bind(this),this.handleSubtitleChange=this.handleSubtitleChange.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.player().ready(()=>{this.createSettingsButton(),this.createSettingsOverlay(),this.setupEventListeners()})}createSettingsButton(){const e=this.player().getChild("controlBar");this.settingsButton=e.addChild("button",{controlText:"Settings",className:"vjs-settings-button settings-clicked"});const i=this.settingsButton.el();i.innerHTML=`
<span><svg height="100%" version="1.1" viewBox="0 0 36 36" width="100%"><use class="ytp-svg-shadow" xlink:href="#ytp-id-19"></use><path d="m 23.94,18.78 c .03,-0.25 .05,-0.51 .05,-0.78 0,-0.27 -0.02,-0.52 -0.05,-0.78 l 1.68,-1.32 c .15,-0.12 .19,-0.33 .09,-0.51 l -1.6,-2.76 c -0.09,-0.17 -0.31,-0.24 -0.48,-0.17 l -1.99,.8 c -0.41,-0.32 -0.86,-0.58 -1.35,-0.78 l -0.30,-2.12 c -0.02,-0.19 -0.19,-0.33 -0.39,-0.33 l -3.2,0 c -0.2,0 -0.36,.14 -0.39,.33 l -0.30,2.12 c -0.48,.2 -0.93,.47 -1.35,.78 l -1.99,-0.8 c -0.18,-0.07 -0.39,0 -0.48,.17 l -1.6,2.76 c -0.10,.17 -0.05,.39 .09,.51 l 1.68,1.32 c -0.03,.25 -0.05,.52 -0.05,.78 0,.26 .02,.52 .05,.78 l -1.68,1.32 c -0.15,.12 -0.19,.33 -0.09,.51 l 1.6,2.76 c .09,.17 .31,.24 .48,.17 l 1.99,-0.8 c .41,.32 .86,.58 1.35,.78 l .30,2.12 c .02,.19 .19,.33 .39,.33 l 3.2,0 c .2,0 .36,-0.14 .39,-0.33 l .30,-2.12 c .48,-0.2 .93,-0.47 1.35,-0.78 l 1.99,.8 c .18,.07 .39,0 .48,-0.17 l 1.6,-2.76 c .09,-0.17 .05,-0.39 -0.09,-0.51 l -1.68,-1.32 0,0 z m -5.94,2.01 c -1.54,0 -2.8,-1.25 -2.8,-2.8 0,-1.54 1.25,-2.8 2.8,-2.8 1.54,0 2.8,1.25 2.8,2.8 0,1.54 -1.25,2.8 -2.8,2.8 l 0,0 z" fill="#fff" id="ytp-id-19"></path></svg></span>
<span class="vjs-control-text">Settings</span>
`,this.positionButton();const a=this.settingsButton.el();if(a){a.style.pointerEvents="auto",a.style.cursor="pointer",a.style.touchAction="manipulation",a.style.webkitTapHighlightColor="transparent";let o=0,u={x:0,y:0},c=!1;a.addEventListener("touchstart",f=>{o=Date.now(),c=!1;const m=f.touches[0];u={x:m.clientX,y:m.clientY}},{passive:!0}),a.addEventListener("touchend",f=>{if(Date.now()-o<500){const S=f.changedTouches[0],E={x:S.clientX,y:S.clientY};Math.sqrt(Math.pow(E.x-u.x,2)+Math.pow(E.y-u.y,2))<50&&(f.preventDefault(),f.stopPropagation(),c=!0,this.toggleSettings(f))}},{passive:!1}),a.addEventListener("click",f=>{c||(f.preventDefault(),f.stopPropagation(),this.toggleSettings(f)),c=!1})}}createSettingsOverlay(){this.player().getChild("controlBar"),this.settingsOverlay=document.createElement("div"),this.settingsOverlay.className="custom-settings-overlay";const e=this.userPreferences.getPreference("playbackRate"),i=this.userPreferences.getPreference("quality");let a="Off";try{const m=this.player().textTracks();for(let b=0;b<m.length;b++){const S=m[b];if(S.kind==="subtitles"&&S.mode==="showing"){a=S.label||S.language||"Subtitles";break}}}catch{}const o=e===1?"Normal":`${e}`,u=this.getAvailableQualities(),c=u.find(m=>m.value===i)||u[0],f=(c==null?void 0:c.displayLabel)||(c==null?void 0:c.label)||(i?String(i):"Auto");this.settingsOverlay.innerHTML=`
<div class="settings-header">Settings</div>
<div class="settings-item" data-setting="playback-speed">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg height="24" viewBox="0 0 24 24" width="24"><path d="M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z" fill="white"></path></svg>
</span>
<span>Playback speed</span></span>
<span class="settings-right">
<span class="current-speed">${o}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>
<div class="settings-item" data-setting="quality">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg height="24" viewBox="0 0 24 24" width="24"><path d="M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z" fill="white"></path></svg>
</span>
<span>Quality</span></span>
<span class="settings-right">
<span class="current-quality">${f}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>
<div class="settings-item" data-setting="subtitles">
<span class="settings-left">
<span class="vjs-icon-placeholder settings-item-svg">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 4H5C3.9 4 3 4.9 3 6V18C3 19.1 3.9 20 5 20H19C20.1 20 21 19.1 21 18V6C21 4.9 20.1 4 19 4ZM11 17H5V15H11V17ZM19 13H5V11H19V13ZM19 9H5V7H19V9Z" fill="white"/></svg>
</span>
<span>Subtitles</span></span>
<span class="settings-right">
<span class="current-subtitles">${a}</span>
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
</span>
</div>
`,this.createSpeedSubmenu(),this.createQualitySubmenu(u,c==null?void 0:c.value),this.createSubtitlesSubmenu(),this.player().el().appendChild(this.settingsOverlay)}createSpeedSubmenu(){const e=[{label:"0.25",value:.25},{label:"0.5",value:.5},{label:"0.75",value:.75},{label:"Normal",value:1},{label:"1.25",value:1.25},{label:"1.5",value:1.5},{label:"1.75",value:1.75},{label:"2",value:2}];this.speedSubmenu=document.createElement("div"),this.speedSubmenu.className="speed-submenu";const i=this.userPreferences.getPreference("playbackRate");this.speedSubmenu.innerHTML=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Playback speed</span>
</div>
${e.map(a=>`
<div class="speed-option ${a.value===i?"active":""}" data-speed="${a.value}">
<span>${a.label}</span>
${a.value===i?'<span class="checkmark">✓</span>':""}
</div>
`).join("")}
`,this.settingsOverlay.appendChild(this.speedSubmenu)}createQualitySubmenu(e,i){this.qualitySubmenu=document.createElement("div"),this.qualitySubmenu.className="quality-submenu";const a=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Quality</span>
</div>
`,o=e.map(u=>`
<div class="quality-option ${u.value===i?"active":""}" data-quality="${u.value}">
<span class="quality-label">${u.displayLabel||u.label}</span>
${u.value===i?'<span class="checkmark">✓</span>':""}
</div>
`).join("");this.qualitySubmenu.innerHTML=a+o,this.settingsOverlay.appendChild(this.qualitySubmenu)}createSubtitlesSubmenu(){this.subtitlesSubmenu=document.createElement("div"),this.subtitlesSubmenu.className="subtitles-submenu";const e=`
<div class="submenu-header">
<span style="margin-right: 8px;">←</span>
<span>Subtitles/CC</span>
</div>
`;this.subtitlesSubmenu.innerHTML=e+'<div class="submenu-body"></div>',this.settingsOverlay.appendChild(this.subtitlesSubmenu),this.refreshSubtitlesSubmenu()}refreshSubtitlesSubmenu(){if(!this.subtitlesSubmenu)return;const e=this.subtitlesSubmenu.querySelector(".submenu-body");if(!e)return;const a=this.player().textTracks();let o=null;for(let c=0;c<a.length;c++){const f=a[c];if(f.kind==="subtitles"&&f.mode==="showing"){o=f.language;break}}const u=[];u.push({label:"Off",lang:null});for(let c=0;c<a.length;c++){const f=a[c];f.kind==="subtitles"&&u.push({label:f.label||f.language||`Track ${c}`,lang:f.language,track:f})}e.innerHTML=u.map(c=>`
<div class="subtitle-option ${c.lang===o?"active":""}" data-lang="${c.lang||""}">
<span>${c.label}</span>
${c.lang===o?'<span class="checkmark">✓</span>':""}
</div>
`).join(""),this.updateCurrentSubtitleDisplay()}updateCurrentSubtitleDisplay(){try{const i=this.player().textTracks();let a="Off",o=null;for(let c=0;c<i.length;c++){const f=i[c];if(f.kind==="subtitles"&&f.mode==="showing"){a=f.label||f.language||"Subtitles",o=f;break}}const u=this.settingsOverlay.querySelector(".current-subtitles");if(u){const c=u.textContent;u.textContent=a,c!==a&&(console.log(`Updated current subtitle display: "${c}" → "${a}"`),o&&console.log(`Active track details: language="${o.language}", label="${o.label}", mode="${o.mode}"`))}else console.warn("Could not find .current-subtitles element in settings overlay")}catch(e){console.error("Error updating current subtitle display:",e)}}startSubtitleSync(){this.updateCurrentSubtitleDisplay(),this.player().on("texttrackchange",()=>{console.log("Text track changed - updating subtitle display"),this.updateCurrentSubtitleDisplay(),this.refreshSubtitlesSubmenu()}),this.subtitleSyncInterval=setInterval(()=>{this.updateCurrentSubtitleDisplay()},2e3)}stopSubtitleSync(){this.subtitleSyncInterval&&(clearInterval(this.subtitleSyncInterval),this.subtitleSyncInterval=null)}dispose(){this.stopSubtitleSync(),document.removeEventListener("click",this.handleClickOutside),this.player()&&this.player().off("texttrackchange")}getAvailableQualities(){var o;const e=["auto","144p","240p","360p","480p","720p","1080p"];if(Array.isArray(this.providedQualities)&&this.providedQualities.length)return this.sortAndDecorateQualities(this.providedQualities,e);try{const u=typeof window<"u"?window.MEDIA_DATA:null,c=(o=u==null?void 0:u.data)==null?void 0:o.qualities;if(Array.isArray(c)&&c.length){const f=c.map(m=>({label:m.label||m.value||"Auto",value:(m.value||m.label||"auto").toString().toLowerCase(),src:m.src||m.url||m.href,type:m.type||"video/mp4"}));return this.sortAndDecorateQualities(f,e)}}catch{}const i=this.player().currentSources?this.player().currentSources():this.player().currentSrc();if(Array.isArray(i)&&i.length>0){const u=i.map((c,f)=>{const m=c.label||c.res||this.inferLabelFromSrc(c.src)||(f===0?"Auto":`Source ${f+1}`),b=String(m).toLowerCase();return{label:m,value:b,src:c.src,type:c.type||"video/mp4"}});return this.sortAndDecorateQualities(u,e)}const a=e.map(u=>({label:u==="auto"?"Auto":u,value:u}));return this.sortAndDecorateQualities(a,e)}sortAndDecorateQualities(e,i){const a=c=>{const f=i.indexOf(String(c).toLowerCase());return f===-1?999:f},o=e.map(c=>{const f=(c.value||c.label||"").toString().toLowerCase(),m=c.label||c.value||"",S=f==="1080p"?`${m} <sup class="hd-badge">HD</sup>`:m;return{...c,value:f,label:m,displayLabel:S}}).sort((c,f)=>a(c.value)-a(f.value)),u=new Set(o.map(c=>c.value));return i.forEach(c=>{if(!u.has(c)){const f=c==="auto"?"Auto":c,m=c==="1080p"?`${f} <sup class="hd-badge">HD</sup>`:f;o.push({label:f,value:c,displayLabel:m})}}),o.sort((c,f)=>a(c.value)-a(f.value)),o}inferLabelFromSrc(e){if(!e)return null;const i=/(?:_|\.|\/)\D*(1440p|1080p|720p|480p|360p|240p|144p)/i.exec(e);if(i&&i[1])return i[1].toUpperCase();const a=/(\b\d{3,4})p\b/i.exec(e);return a&&a[1]?`${a[1]}p`:null}positionButton(){const e=this.player().getChild("controlBar"),i=e.getChild("fullscreenToggle");this.settingsButton&&i&&setTimeout(()=>{const a=e.children().indexOf(i);e.removeChild(this.settingsButton),e.addChild(this.settingsButton,{},a+1),console.log("✓ Settings button positioned after fullscreen toggle")},50)}setupEventListeners(){this.settingsOverlay.addEventListener("click",o=>{o.stopPropagation(),o.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),o.target.closest('[data-setting="quality"]')&&(this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),o.target.closest('[data-setting="subtitles"]')&&(this.refreshSubtitlesSubmenu(),this.subtitlesSubmenu.style.display="flex",this.speedSubmenu.style.display="none",this.qualitySubmenu.style.display="none")}),this.settingsOverlay.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation(),o.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),o.target.closest('[data-setting="quality"]')&&(this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),o.target.closest('[data-setting="subtitles"]')&&(this.refreshSubtitlesSubmenu(),this.subtitlesSubmenu.style.display="flex",this.speedSubmenu.style.display="none",this.qualitySubmenu.style.display="none")},{passive:!1});const e=this.speedSubmenu.querySelector(".submenu-header");e.addEventListener("click",()=>{this.speedSubmenu.style.display="none"}),e.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation(),this.speedSubmenu.style.display="none"},{passive:!1});const i=this.qualitySubmenu.querySelector(".submenu-header");i.addEventListener("click",()=>{this.qualitySubmenu.style.display="none"}),i.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation(),this.qualitySubmenu.style.display="none"},{passive:!1});const a=this.subtitlesSubmenu.querySelector(".submenu-header");a.addEventListener("click",()=>{this.subtitlesSubmenu.style.display="none"}),a.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation(),this.subtitlesSubmenu.style.display="none"},{passive:!1}),this.speedSubmenu.addEventListener("click",o=>{const u=o.target.closest(".speed-option");if(u){const c=parseFloat(u.dataset.speed);this.handleSpeedChange(c,u)}}),this.speedSubmenu.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation();const u=o.target.closest(".speed-option");if(u){const c=parseFloat(u.dataset.speed);this.handleSpeedChange(c,u)}},{passive:!1}),this.qualitySubmenu.addEventListener("click",o=>{const u=o.target.closest(".quality-option");if(u){const c=u.dataset.quality;this.handleQualityChange(c,u)}}),this.qualitySubmenu.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation();const u=o.target.closest(".quality-option");if(u){const c=u.dataset.quality;this.handleQualityChange(c,u)}},{passive:!1}),this.subtitlesSubmenu.addEventListener("click",o=>{const u=o.target.closest(".subtitle-option");if(u){const c=u.dataset.lang||null;this.handleSubtitleChange(c,u)}}),this.subtitlesSubmenu.addEventListener("touchend",o=>{o.preventDefault(),o.stopPropagation();const u=o.target.closest(".subtitle-option");if(u){const c=u.dataset.lang||null;this.handleSubtitleChange(c,u)}},{passive:!1}),document.addEventListener("click",this.handleClickOutside),this.settingsOverlay.addEventListener("mouseover",o=>{const u=o.target.closest(".settings-item, .speed-option");u&&!u.style.background.includes("0.1")&&(u.style.background="rgba(255, 255, 255, 0.05)")}),this.settingsOverlay.addEventListener("mouseout",o=>{const u=o.target.closest(".settings-item, .speed-option");u&&!u.style.background.includes("0.1")&&(u.style.background="transparent")}),this.startSubtitleSync()}toggleSettings(e){var o;e.stopPropagation();const i=this.settingsOverlay.classList.contains("show");i?(this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none"):(this.settingsOverlay.classList.add("show"),this.settingsOverlay.style.display="block"),this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none");const a=(o=this.settingsButton)==null?void 0:o.el();a&&(i?a.classList.remove("settings-clicked"):a.classList.add("settings-clicked"))}handleSpeedChange(e,i){this.player().playbackRate(e),this.userPreferences.setPreference("playbackRate",e),this.speedSubmenu.querySelectorAll(".speed-option").forEach(u=>{u.classList.remove("active"),u.style.background="transparent";const c=u.querySelector(".checkmark");c&&c.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const a=this.settingsOverlay.querySelector(".current-speed"),o=e===1?"Normal":`${e}`;a.textContent=o,this.speedSubmenu.style.display="none",console.log("Playback speed preference saved:",e)}handleQualityChange(e,i){const o=this.getAvailableQualities().find(c=>String(c.value)===String(e));this.userPreferences.setQualityPreference(e),this.qualitySubmenu.querySelectorAll(".quality-option").forEach(c=>{c.classList.remove("active"),c.style.background="transparent";const f=c.querySelector(".checkmark");f&&f.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const u=this.settingsOverlay.querySelector(".current-quality");if(u.innerHTML=(o==null?void 0:o.displayLabel)||(o==null?void 0:o.label)||String(e),o!=null&&o.src){const c=this.player(),f=c.paused(),m=c.currentTime(),b=c.playbackRate(),S=c.textTracks();let E=null;for(let R=0;R<S.length;R++){const N=S[R];if(N.kind==="subtitles"&&N.mode==="showing"){E=N.language;break}}c.addClass("vjs-changing-resolution"),c.isChangingQuality=!0,c.src({src:o.src,type:o.type||"video/mp4"}),f&&c.pause();const A=()=>{try{c.playbackRate(b)}catch{}try{isNaN(m)||c.currentTime(m)}catch{}if(f?c.pause():c.play().catch(()=>{}),E){const R=c.textTracks();for(let N=0;N<R.length;N++){const w=R[N];w.kind==="subtitles"&&(w.mode=w.language===E?"showing":"disabled")}}try{const R=c.getChild("controlBar"),N=["subtitlesButton","textTrackButton","subsCapsButton"];for(const w of N){const H=R&&R.getChild(w);if(H){typeof H.show=="function"&&H.show();const I=H.el&&H.el();I&&(I.style.display="",I.style.visibility="")}}}catch{}c.removeClass("vjs-changing-resolution"),c.off("loadedmetadata",A)};c.on("loadedmetadata",A)}this.qualitySubmenu&&(this.qualitySubmenu.style.display="none"),console.log("Quality preference saved:",e)}handleSubtitleChange(e,i){var f;const o=this.player().textTracks();for(let m=0;m<o.length;m++){const b=o[m];b.kind==="subtitles"&&(b.mode=e&&b.language===e?"showing":"disabled")}this.userPreferences.setPreference("subtitleLanguage",e||null,!0),this.subtitlesSubmenu.querySelectorAll(".subtitle-option").forEach(m=>{m.classList.remove("active"),m.style.background="transparent";const b=m.querySelector(".checkmark");b&&b.remove()}),i.classList.add("active"),i.style.background="rgba(255, 255, 255, 0.1)",i.insertAdjacentHTML("beforeend",'<span class="checkmark">✓</span>');const u=e?((f=i.querySelector("span"))==null?void 0:f.textContent)||e:"Off",c=this.settingsOverlay.querySelector(".current-subtitles");c&&(c.textContent=u),this.subtitlesSubmenu.style.display="none"}handleClickOutside(e){var i;if(this.settingsOverlay&&this.settingsButton&&!this.settingsOverlay.contains(e.target)&&!this.settingsButton.el().contains(e.target)){this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none");const a=(i=this.settingsButton)==null?void 0:i.el();a&&a.classList.remove("settings-clicked")}}dispose(){document.removeEventListener("click",this.handleClickOutside),this.settingsOverlay&&this.settingsOverlay.remove(),super.dispose()}}Fy.prototype.controlText_="Settings Menu",$.registerComponent("CustomSettingsMenu",Fy);const q5=$.getComponent("Component");class Hx extends q5{constructor(e,i){super(e,i),this.seekAmount=i.seekAmount||5,this.showTimeout=null}createEl(){const e=super.createEl("div",{className:"vjs-seek-indicator"});return e.innerHTML=`
<div class="vjs-seek-indicator-content">
<div class="vjs-seek-indicator-icon"></div>
<div class="vjs-seek-indicator-text"></div>
</div>
`,e.style.display="none",e.style.opacity="0",e.style.visibility="hidden",e}show(e,i=this.seekAmount){const a=this.el(),o=a.querySelector(".vjs-seek-indicator-icon"),u=a.querySelector(".vjs-seek-indicator-text");this.showTimeout&&clearTimeout(this.showTimeout),e==="forward"?o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
">
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
<svg viewBox="0 0 24 24" width="24" height="24" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M8 5v14l11-7z"/>
<path d="M13 5v14l11-7z" opacity="0.6"/>
</svg>
</div>
<div style="
color: white;
font-size: 10px;
font-weight: 500;
text-align: center;
line-height: 1.2;
opacity: 0.9;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
">${i} seconds</div>
</div>
</div>
`:e==="backward"?o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
">
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 4px;">
<svg viewBox="0 0 24 24" width="24" height="24" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M16 19V5l-11 7z"/>
<path d="M11 19V5L0 12z" opacity="0.6"/>
</svg>
</div>
<div style="
color: white;
font-size: 10px;
font-weight: 500;
text-align: center;
line-height: 1.2;
opacity: 0.9;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
">${i} seconds</div>
</div>
</div>
`:e==="play"?(o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
">
<svg viewBox="0 0 24 24" width="32" height="32" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M8 5v14l11-7z"/>
</svg>
</div>
</div>
`,u.textContent="Play"):e==="pause"&&(o.innerHTML=`
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
<div style="
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
border: none;
outline: none;
box-sizing: border-box;
overflow: hidden;
">
<svg viewBox="0 0 24 24" width="32" height="32" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
</svg>
</div>
</div>
`,u.textContent="Pause"),u.textContent="",a.style.cssText=`
position: absolute !important;
top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
z-index: 99999 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
visibility: visible !important;
opacity: 1 !important;
pointer-events: none !important;
width: auto !important;
height: auto !important;
`,this.showTimeout=setTimeout(()=>{this.hide()},1e3)}hide(){const e=this.el();e.style.opacity="0",setTimeout(()=>{e.style.display="none",e.style.visibility="hidden"},200)}dispose(){this.showTimeout&&clearTimeout(this.showTimeout),super.dispose()}}$.registerComponent("SeekIndicator",Hx);function $5(){var w;const s=cn.useRef(null),e=cn.useRef(null),i=cn.useRef(new Fx),a=cn.useRef({}),o=cn.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{related_media:[{friendly_token:"jgLkic37V",url:"http://localhost/view?m=jgLkic37V",api_url:"http://localhost/api/v1/media/jgLkic37V",user:"admin",title:"Screenshot20250312at15.58.35.png",description:"",add_date:"2025-03-12T14:28:24.757807Z",views:5,media_type:"image",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ad827f53568c4565b69ee59da88966c8.Screenshot20250312at15.58.35.png.jpg",is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"54Ip78oPK",url:"http://localhost/view?m=54Ip78oPK",api_url:"http://localhost/api/v1/media/54Ip78oPK",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 2",description:"",add_date:"2025-05-19T01:22:10.354407+01:00",views:8,media_type:"video",state:"public",duration:1,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ca19044d26af4eada1669c3373c771cb_nhCvKcl.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"0.6MB"},{friendly_token:"0VpZtWduU",url:"http://localhost/view?m=0VpZtWduU",api_url:"http://localhost/api/v1/media/0VpZtWduU",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed)",description:"",add_date:"2025-05-19T01:30:55.374863+01:00",views:13,media_type:"video",state:"public",duration:6,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/46b2bec8d79f496682640ce99b5c53af_RA16Oba.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/46b2bec8d79f496682640ce99b5c53af.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.0MB"},{friendly_token:"efM2aLP4P",url:"http://localhost/view?m=efM2aLP4P",api_url:"http://localhost/api/v1/media/efM2aLP4P",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 1",description:"",add_date:"2025-05-19T01:22:08.117300+01:00",views:11,media_type:"video",state:"public",duration:8,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/c27f570a84d64cdc857f87c50dace993_Ma3ap4p.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/c27f570a84d64cdc857f87c50dace993.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.8MB"},{friendly_token:"8RUHRjnji",url:"http://localhost/view?m=8RUHRjnji",api_url:"http://localhost/api/v1/media/8RUHRjnji",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed)",description:"",add_date:"2025-05-19T01:29:48.308159+01:00",views:7,media_type:"video",state:"public",duration:7,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/884cac6a306e4ae9995726fcd3c7aa49_fT7pnM4.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.6MB"},{friendly_token:"N5Vpnqfpf",url:"http://localhost/view?m=N5Vpnqfpf",api_url:"http://localhost/api/v1/media/N5Vpnqfpf",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov",description:"",add_date:"2025-05-19T01:15:03.594646+01:00",views:11,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/e549ebb4b1dc41a48cf76ebccf592836_1xqZHHc.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/e549ebb4b1dc41a48cf76ebccf592836.tmpu6x4f3js.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.3MB"},{friendly_token:"MmyuYCEfC",url:"http://localhost/view?m=MmyuYCEfC",api_url:"http://localhost/api/v1/media/MmyuYCEfC",user:"admin",title:"JmailLogIdeasforYiannis.mp4",description:"check the 00:12 and then the 00:39",add_date:"2025-03-12T02:37:42Z",views:49,media_type:"video",state:"public",duration:112,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/3d4e6f1c7e014720bc6390ed9d61aba5_BppzBiz.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"40.6MB"},{friendly_token:"E8ia0lfir",url:"http://localhost/view?m=E8ia0lfir",api_url:"http://localhost/api/v1/media/E8ia0lfir",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed)",description:"",add_date:"2025-05-19T01:22:27.251447+01:00",views:12,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/8572a325a9d649f79cc60181fbece78c_0H5arHy.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/8572a325a9d649f79cc60181fbece78c.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.4MB"},{friendly_token:"eZAl84zg6",url:"http://localhost/view?m=eZAl84zg6",api_url:"http://localhost/api/v1/media/eZAl84zg6",user:"admin",title:"20257855hd_1920_1080_60fps.mp4",description:"",add_date:"2025-03-12T02:35:59.779098Z",views:29,media_type:"video",state:"public",duration:90,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/ed9c61a72c0445debfbedee011b6eba1_8HjWGZX.20257855hd_1920_1080_60fps.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/ed9c61a72c0445debfbedee011b6eba1.tmpil72jnbv.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"64.4MB"},{friendly_token:"6WShYNxZx",url:"http://localhost/view?m=6WShYNxZx",api_url:"http://localhost/api/v1/media/6WShYNxZx",user:"admin",title:"SampleVideo_1280x720_30mb.mp4 test abc",description:"test 123 yiannis",add_date:"2025-04-14T00:00:00+01:00",views:43,media_type:"video",state:"public",duration:171,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/c868df836ac34688b876e741b58ada93_LRvu388.SampleVideo_1280x720_30mb.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/c868df836ac34688b876e741b58ada93.tmpyl_r01_l.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:3,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"31.5MB"},{friendly_token:"SOgLTsrAH",url:"http://localhost/view?m=SOgLTsrAH",api_url:"http://localhost/api/v1/media/SOgLTsrAH",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed) 1",description:"",add_date:"2025-05-19T01:31:11.057879+01:00",views:8,media_type:"video",state:"public",duration:2,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/46c75315947e4a5f9dd464c1721206fd_6KJzqBH.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/46c75315947e4a5f9dd464c1721206fd.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"1.5MB"},{friendly_token:"PoDk009ue",url:"http://localhost/view?m=PoDk009ue",api_url:"http://localhost/api/v1/media/PoDk009ue",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov",description:"",add_date:"2025-05-19T01:17:44.296445+01:00",views:12,media_type:"video",state:"public",duration:37,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/fd1d31460e614ca9b4645228e62c9eec_DB8nan8.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"22.4MB"},{friendly_token:"b7e06rUz5",url:"http://localhost/view?m=b7e06rUz5",api_url:"http://localhost/api/v1/media/b7e06rUz5",user:"admin",title:"Proto.cyTimesheet03_03_202507_03_2025.pdf",description:"",add_date:"2025-03-12T14:29:15.245599Z",views:16,media_type:"pdf",state:"public",duration:0,thumbnail_url:null,is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"wUu76zL5a",url:"http://localhost/view?m=wUu76zL5a",api_url:"http://localhost/api/v1/media/wUu76zL5a",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) 2 (Trimmed)",description:"",add_date:"2025-05-19T01:28:52.829907+01:00",views:2,media_type:"video",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/1b3e7dc2431b46a5b7e40b297662137a_1V0DJz5.ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/1b3e7dc2431b46a5b7e40b297662137a.ca19044d26af4eada1669c3373c771cb.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"0.3MB"},{friendly_token:"JBjMHLfLZ",url:"http://localhost/view?m=JBjMHLfLZ",api_url:"http://localhost/api/v1/media/JBjMHLfLZ",user:"admin",title:"att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov (Trimmed) (Trimmed) 2",description:"",add_date:"2025-05-19T01:31:11.848403+01:00",views:19,media_type:"video",state:"public",duration:4,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/7759ca3e0ba1482aa9149201bd14139d_ISBMqD4.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.att.24Cz35hRdjJ9FV0RlxCPVVtc6XVAdJvrU4eb8Gkykc.mov.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/7759ca3e0ba1482aa9149201bd14139d.884cac6a306e4ae9995726fcd3c7aa49.fd1d31460e614ca9b4645228e62c9eec.tmpjohj96hu.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"2.5MB"},{friendly_token:"w13x5uUXc",url:"http://localhost/view?m=w13x5uUXc",api_url:"http://localhost/api/v1/media/w13x5uUXc",user:"admin",title:"Web357202503112025_05_33_AM.png",description:"",add_date:"2025-03-12T14:27:55.078360Z",views:3,media_type:"image",state:"public",duration:0,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/1da967bcdca540efa1d2362af2f3a34b.Web357202503112025_05_33_AM.png.jpg",is_reviewed:!0,preview_url:null,author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"sZxPpdon5",url:"http://localhost/view?m=sZxPpdon5",api_url:"http://localhost/api/v1/media/sZxPpdon5",user:"admin",title:"JmailLogIdeasforYiannis.mp4 (Trimmed)",description:"check the 00:12 and then the 00:39",add_date:"2025-05-15T02:16:19.580745+01:00",views:9,media_type:"video",state:"public",duration:17,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/7191a59cbfcd402ebed400e604a76840_5WRh0cp.3d4e6f1c7e014720bc6390ed9d61aba5.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/7191a59cbfcd402ebed400e604a76840.3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"4.5MB"},{friendly_token:"TCycDZROI",url:"http://localhost/view?m=TCycDZROI",api_url:"http://localhost/api/v1/media/TCycDZROI",user:"admin",title:"JmailLogIdeasforYiannis.mp4 (Trimmed)",description:"check the 00:12 and then the 00:39",add_date:"2025-05-15T02:14:58.855935+01:00",views:8,media_type:"video",state:"public",duration:112,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/5cbfbe93d06c453487c65d9d54749318_CUIZl8y.3d4e6f1c7e014720bc6390ed9d61aba5.JmailLogIdeasforYiannis.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/5cbfbe93d06c453487c65d9d54749318.3d4e6f1c7e014720bc6390ed9d61aba5.tmpcjd0bvr5.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:1,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"40.6MB"},{friendly_token:"YjGJafibO",url:"http://localhost/view?m=YjGJafibO",api_url:"http://localhost/api/v1/media/YjGJafibO",user:"admin",title:"file_example_MP4_480_1_5MG.mp4",description:"",add_date:"2025-04-14T00:07:11.074523+01:00",views:18,media_type:"video",state:"public",duration:30,thumbnail_url:"http://localhost/media/original/thumbnails/user/admin/e76f4fff2b3d42adbadb0f1204b21b81_s8EEvSE.file_example_MP4_480_1_5MG.mp4.jpg",is_reviewed:!0,preview_url:"/media/encoded/1/admin/e76f4fff2b3d42adbadb0f1204b21b81.tmp04azp_tc.gif",author_name:"",author_profile:"http://localhost/user/admin/",author_thumbnail:"http://localhost/media/userlogos/user.jpg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"1.6MB"}]},previewSprite:{url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"",nextLink:"https://demo.mediacms.io/view?m=YjGJafibO",chapter_data:[{startTime:0,endTime:3,text:"Introduction"},{startTime:3,endTime:5,text:"Overview of Marine Life"},{startTime:5,endTime:10,text:"Coral Reef Ecosystems"},{startTime:10,endTime:14,text:"Deep Sea Creatures"}],chaptersData:[{startTime:0,endTime:3,text:"Introduction"},{startTime:3,endTime:5,text:"Overview of Marine Life"},{startTime:5,endTime:10,text:"Coral Reef Ecosystems"},{startTime:10,endTime:14,text:"Deep Sea Creatures"},{startTime:240,endTime:320,text:"Ocean Conservation"},{startTime:320,endTime:400,text:"Climate Change Impact"},{startTime:400,endTime:480,text:"Marine Protected Areas"},{startTime:480,endTime:560,text:"Sustainable Fishing"},{startTime:560,endTime:640,text:"Research Methods"},{startTime:640,endTime:720,text:"Future Challenges"},{startTime:720,endTime:800,text:"Conclusion"},{startTime:800,endTime:880,text:"Marine Biodiversity Hotspots"},{startTime:880,endTime:960,text:"Underwater Photography"},{startTime:960,endTime:1040,text:"Whale Migration Patterns"},{startTime:1040,endTime:1120,text:"Plastic Pollution Crisis"},{startTime:1120,endTime:1200,text:"Seagrass Meadows"},{startTime:1200,endTime:1280,text:"Ocean Acidification"},{startTime:1280,endTime:1360,text:"Marine Archaeology"},{startTime:1360,endTime:1440,text:"Tidal Pool Ecosystems"},{startTime:1440,endTime:1520,text:"Commercial Aquaculture"},{startTime:1520,endTime:1600,text:"Ocean Exploration Technology"}]},[]),u=o.chaptersData??[{startTime:0,endTime:30,text:"Introduction"},{startTime:30,endTime:90,text:"Overview of Marine Life"},{startTime:90,endTime:180,text:"Coral Reef Ecosystems"},{startTime:180,endTime:240,text:"Deep Sea Creatures"},{startTime:240,endTime:320,text:"Ocean Conservation"},{startTime:320,endTime:400,text:"Climate Change Impact"},{startTime:400,endTime:480,text:"Marine Protected Areas"},{startTime:480,endTime:560,text:"Sustainable Fishing"},{startTime:560,endTime:640,text:"Research Methods"},{startTime:640,endTime:720,text:"Future Challenges"},{startTime:720,endTime:800,text:"Conclusion"},{startTime:800,endTime:880,text:"Marine Biodiversity Hotspots"},{startTime:880,endTime:960,text:"Underwater Photography"},{startTime:960,endTime:1040,text:"Whale Migration Patterns"},{startTime:1040,endTime:1120,text:"Plastic Pollution Crisis"},{startTime:1120,endTime:1200,text:"Seagrass Meadows"},{startTime:1200,endTime:1280,text:"Ocean Acidification"},{startTime:1280,endTime:1360,text:"Marine Archaeology"},{startTime:1360,endTime:1440,text:"Tidal Pool Ecosystems"},{startTime:1440,endTime:1520,text:"Commercial Aquaculture"},{startTime:1520,endTime:1600,text:"Ocean Exploration Technology"}],c=cn.useMemo(()=>{var H,I,G,F,Y;return{id:((H=o.data)==null?void 0:H.friendly_token)||"default-video",title:((I=o.data)==null?void 0:I.title)||"Video",poster:o.siteUrl+((G=o.data)==null?void 0:G.poster_url)||"",previewSprite:(o==null?void 0:o.previewSprite)||{},related_media:((F=o.data)==null?void 0:F.related_media)||[],nextLink:(o==null?void 0:o.nextLink)||null,sources:(Y=o.data)!=null&&Y.original_media_url?[{src:o.siteUrl+o.data.original_media_url,type:"video/mp4"}]:[{src:"/videos/sample-video.mp4",type:"video/mp4"}]}},[o]),f=cn.useMemo(()=>{var se,Q,le;const H=["auto","144p","240p","360p","480p","720p","1080p"],I=ue=>{const Ie=ue.map(fe=>({label:fe.label||fe.value||"Auto",value:(fe.value||fe.label||"auto").toString().toLowerCase(),src:fe.src||fe.url||fe.href,type:fe.type||"video/mp4"})),be=new Set(Ie.map(fe=>fe.value));H.forEach(fe=>{be.has(fe)||Ie.push({label:fe==="auto"?"Auto":fe,value:fe})});const Ae=fe=>{const Pe=H.indexOf(String(fe).toLowerCase());return Pe===-1?999:Pe};return Ie.sort((fe,Pe)=>Ae(fe.value)-Ae(Pe.value)),Ie},G=(se=o==null?void 0:o.data)==null?void 0:se.qualities;if(Array.isArray(G)&&G.length)return I(G);const F=(c==null?void 0:c.sources)&&((Q=c.sources[0])==null?void 0:Q.src)||null,Y=(c==null?void 0:c.sources)&&((le=c.sources[0])==null?void 0:le.type)||"video/mp4",K=H.map(ue=>({label:ue==="auto"?"Auto":ue,value:ue,src:F||void 0,type:Y}));return I(K)},[o,c]),m=cn.useMemo(()=>{var H;return(H=o==null?void 0:o.data)!=null&&H.related_media?o.data.related_media.slice(0,12).map(I=>({id:I.friendly_token,title:I.title,author:I.user||I.author_name||"Unknown",views:`${I.views} views`,thumbnail:I.thumbnail_url||I.author_thumbnail,category:I.media_type,url:I.url,duration:I.duration,size:I.size,likes:I.likes,dislikes:I.dislikes,add_date:I.add_date,description:I.description})):[]},[o]),b=[{kind:"subtitles",src:"/sample-subtitles.vtt",srclang:"en",label:"English Subtitles",default:!1},{kind:"subtitles",src:"/sample-subtitles-greek.vtt",srclang:"el",label:"Greek Subtitles (Ελληνικά)",default:!1}],S=((w=o==null?void 0:o.data)==null?void 0:w.subtitles_info)||[],E=window.location.hostname==="localhost",A=S.length>0||E,R=A?S.map(H=>({kind:"subtitles",src:H.src,srclang:H.srclang,label:H.label,default:!1})):E?b:[],N=()=>{console.log("Next video functionality disabled for single video mode"),o.onClickNextCallback&&typeof o.onClickNextCallback=="function"&&o.onClickNextCallback()};return cn.useEffect(()=>{if(s.current&&!e.current){if(s.current.player)return;const H=setTimeout(()=>{if(!e.current&&s.current&&!s.current.player){e.current=$(s.current,{controls:!0,autoplay:"muted",loop:!1,muted:!1,poster:c.poster,preload:"auto",sources:c.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:!1,autoSetup:void 0,breakpoints:{tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:2561},disablePictureInPicture:!1,enableDocumentPictureInPicture:!1,enableSmoothSeeking:!1,experimentalSvgIcons:!1,fluid:!0,fullscreen:{options:{navigationUI:"hide"}},id:void 0,inactivityTimeout:2e3,language:"en",languages:{},liveui:!1,liveTracker:{trackingThreshold:20,liveTolerance:15},nativeControlsForTouch:!1,normalizeAutoplay:!1,notSupportedMessage:void 0,noUITitleAttributes:!1,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playsinline:!0,plugins:{},posterImage:!0,preferFullWindow:!1,responsive:!0,restoreEl:!1,suppressNotSupportedError:!1,techCanOverridePoster:!1,techOrder:["html5"],userActions:{click:!0,doubleClick:!0,hotkeys:{fullscreenKey:function(F){return F.which===70},muteKey:function(F){return F.which===77},playPauseKey:function(F){return F.which===75||F.which===32},seekForwardKey:function(F){return F.which===39},seekBackwardKey:function(F){return F.which===37}}},"vtt.js":void 0,spatialNavigation:{enabled:!1,horizontalSeek:!1},controlBar:{progressControl:{seekBar:{timeTooltip:{displayNegative:!1}}},remainingTimeDisplay:!1,volumePanel:{inline:!0,vertical:!1},fullscreenToggle:!0,pictureInPictureToggle:!0,playbackRateMenuButton:!1,descriptionsButton:!0,subtitlesButton:!!A,captionsButton:!1,audioTrackButton:!0,liveDisplay:!0,seekToLive:!0,customControlSpacer:!0,chaptersButton:!0},html5:{nativeControlsForTouch:!1,nativeAudioTracks:!0,nativeTextTracks:!0,nativeVideoTracks:!0,preloadTextTracks:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),e.current.ready(()=>{var Pe,rt,de,xe,Me;i.current.applyToPlayer(e.current),i.current.setupAutoSave(e.current);const F=e.current.getChild("controlBar"),Y=F.getChild("playToggle"),K=F.getChild("currentTimeDisplay"),se=F.getChild("progressControl"),Q=se.getChild("seekBar"),le=F.getChild("chaptersButton"),ue=F.getChild("fullscreenToggle");if(new URLSearchParams(window.location.search).get("m")&&setTimeout(()=>{e.current&&!e.current.isDisposed()&&e.current.play().catch(he=>{console.log(" Browser prevented autoplay (normal behavior):",he.message)})},100),A&&R.forEach(he=>{e.current.addRemoteTextTrack(he,!1)}),i.current.applySubtitlePreference(e.current),console.log("chaptersData1",u),u&&u.length>0){const he=e.current.addTextTrack("chapters","Chapters","en");u.forEach(W=>{const pe=new(window.VTTCue||window.TextTrackCue)(W.startTime,W.endTime,W.text);he.addCue(pe)})}const Ae=new Uy(e.current,{displayNegative:!1,customPrefix:"",customSuffix:""});if(K){const he=F.children().indexOf(K);F.addChild(Ae,{},he+1)}else F.addChild(Ae,{},2);o!=null&&o.nextLink;{console.log("mediaData.nextLink edw",o.nextLink);const he=new Ux(e.current,{nextLink:o.nextLink}),W=F.children().indexOf(Y);F.addChild(he,{},W+1)}try{const he=new Bx(e.current,{userPreferences:i.current}),W=F.children().indexOf(ue);F.addChild(he,{},W-1),a.current.autoplayToggleButton=he,setTimeout(()=>{he.updateIcon(),console.log("✓ Autoplay toggle button icon updated after DOM insertion")},100),console.log("✓ Autoplay toggle button added successfully")}catch(he){console.error("✗ Failed to add autoplay toggle button:",he)}if(setTimeout(()=>{(()=>{["subtitlesButton","playbackRateMenuButton"].forEach(me=>{const De=F.getChild(me);if(De&&De.menuButton_){const Ue=De.menuButton_;Ue.off("mouseenter"),Ue.off("mouseleave"),Ue.on("click",function(){this.menu.hasClass("vjs-lock-showing")?(this.menu.removeClass("vjs-lock-showing"),this.menu.hide()):(this.menu.addClass("vjs-lock-showing"),this.menu.show())}),console.log(`✓ Made ${me} clickable`)}else if(De){const Ue=De.el();Ue&&(Ue.addEventListener("click",function(ot){ot.preventDefault(),ot.stopPropagation();const Ye=Ue.querySelector(".vjs-menu");Ye&&(Ye.style.display==="block"?Ye.style.display="none":(document.querySelectorAll(".vjs-menu").forEach(Ji=>{Ji!==Ye&&(Ji.style.display="none")}),Ye.style.display="block"))}),console.log(`✓ Added click handler to ${me}`))}});const pe=["subtitlesButton","captionsButton","subsCapsButton"];for(const me of pe){const De=F.getChild(me);if(De&&De.el()){const Ue=De.el(),ot=Ue.querySelector(".vjs-menu");ot&&(ot.style.display="none");const Ye=ut=>{ut.preventDefault(),ut.stopPropagation();const mt=e.current.textTracks();let ji=!1;for(let jt=0;jt<mt.length;jt++){const li=mt[jt];if(li.kind==="subtitles"&&li.mode==="showing"){ji=!0;break}}if(ji){for(let jt=0;jt<mt.length;jt++){const li=mt[jt];li.kind==="subtitles"&&(li.mode="disabled")}Ue.classList.remove("vjs-subs-active");try{i.current.setPreference("subtitleEnabled",!1,!0)}catch{}}else{const jt=i.current.getPreference("subtitleLanguage");if(!jt){let zi=null;for(let Kt=0;Kt<mt.length;Kt++){const ct=mt[Kt];if(ct.kind==="subtitles"){zi=ct.language;break}}if(zi){for(let Kt=0;Kt<mt.length;Kt++){const ct=mt[Kt];ct.kind==="subtitles"&&(ct.mode=ct.language===zi?"showing":"disabled")}try{i.current.setPreference("subtitleLanguage",zi,!0)}catch{}try{i.current.setPreference("subtitleEnabled",!0,!0)}catch{}Ue.classList.add("vjs-subs-active")}return}let li=!1;for(let zi=0;zi<mt.length;zi++){const Kt=mt[zi];if(Kt.kind==="subtitles"){const ct=Kt.language===jt;Kt.mode=ct?"showing":"disabled",ct&&(li=!0)}}if(li){Ue.classList.add("vjs-subs-active");try{i.current.setPreference("subtitleEnabled",!0,!0)}catch{}}}};Ue.addEventListener("click",Ye,{capture:!0}),Ue.addEventListener("touchend",ut=>{ut.preventDefault(),ut.stopPropagation(),Ye(ut)},{passive:!1}),e.current.on("texttrackchange",()=>{const ut=e.current.textTracks();let mt=!1;for(let ji=0;ji<ut.length;ji++){const jt=ut[ji];if(jt.kind==="subtitles"&&jt.mode==="showing"){mt=!0;break}}mt?Ue.classList.add("vjs-subs-active"):Ue.classList.remove("vjs-subs-active")});const Ji=e.current.textTracks();let Et=!1;for(let ut=0;ut<Ji.length;ut++){const mt=Ji[ut];if(mt.kind==="subtitles"&&mt.mode==="showing"){Et=!0;break}}Et&&Ue.classList.add("vjs-subs-active");break}}})()},1500),se&&Q){const he=new Nx(e.current,{previewSprite:o.previewSprite});Q.addChild(he)}if(setTimeout(()=>{console.log("Setting up simplified button layout...");const he=document.createElement("div");he.className="vjs-spacer-control vjs-control",he.style.flex="1",he.style.minWidth="1px",he.style.height="100%";const W=F.getChild("durationDisplay");if(W&&W.el()){const pe=F.el(),De=W.el().nextSibling;pe.insertBefore(he,De),console.log("✓ Simple spacer added after duration display")}},300),le&&ue)try{const he=F.children().indexOf(ue);F.addChild(le,{},he+1),console.log("✓ Chapters button moved after fullscreen toggle")}catch(he){console.log("✗ Failed to move chapters button:",he)}console.log("chaptersData",u),u&&u.length>0?a.current.chaptersOverlay=new By(e.current,{chaptersData:u,seriesTitle:((Pe=o==null?void 0:o.data)==null?void 0:Pe.title)||"Chapters",channelName:((rt=o==null?void 0:o.data)==null?void 0:rt.user)||((de=o==null?void 0:o.data)==null?void 0:de.author_name)||"Channel",thumbnail:((xe=o==null?void 0:o.data)==null?void 0:xe.thumbnail_url)||((Me=o==null?void 0:o.data)==null?void 0:Me.author_thumbnail)||""}):console.log("⚠ No chapters data available for overlay"),a.current.settingsMenu=new Fy(e.current,{userPreferences:i.current,qualities:f});try{e.current.on("loadedmetadata",()=>{var he;if(a.current.settingsMenu&&a.current.settingsMenu.setQualities){const W=typeof window<"u"?window.MEDIA_DATA:null,pe=((he=W==null?void 0:W.data)==null?void 0:he.qualities)||f;a.current.settingsMenu.setQualities(pe)}})}catch{}a.current.seekIndicator=new Hx(e.current,{seekAmount:5}),e.current.addChild(a.current.seekIndicator),a.current.seekIndicator.hide();const fe=he=>{const W=document.activeElement;if(W&&(W.tagName==="INPUT"||W.tagName==="TEXTAREA"||W.contentEditable==="true"))return;const me=5;if(he.key==="ArrowRight"||he.keyCode===39){he.preventDefault();const De=e.current.currentTime(),Ue=e.current.duration(),ot=Math.min(De+me,Ue);e.current.currentTime(ot),a.current.seekIndicator.show("forward",me)}else if(he.key==="ArrowLeft"||he.keyCode===37){he.preventDefault();const De=e.current.currentTime(),Ue=Math.max(De-me,0);e.current.currentTime(Ue),a.current.seekIndicator.show("backward",me)}};document.addEventListener("keydown",fe),a.current.cleanupKeyboardHandler=()=>{document.removeEventListener("keydown",fe)},console.log("Current user preferences:",i.current.getPreferences()),window.debugSubtitles={showTracks:()=>{const he=e.current.textTracks();console.log("=== Available Text Tracks ===");for(let W=0;W<he.length;W++){const pe=he[W];console.log(`${W}: ${pe.kind} | ${pe.language} | ${pe.label} | mode: ${pe.mode}`)}},enableEnglish:()=>{const he=e.current.textTracks();for(let W=0;W<he.length;W++){const pe=he[W];if(pe.kind==="subtitles"&&pe.language==="en"){pe.mode="showing",console.log("Enabled English subtitles");break}}},enableGreek:()=>{const he=e.current.textTracks();for(let W=0;W<he.length;W++){const pe=he[W];if(pe.kind==="subtitles"&&pe.language==="el"){pe.mode="showing",console.log("Enabled Greek subtitles");break}}},disableAll:()=>{const he=e.current.textTracks();for(let W=0;W<he.length;W++){const pe=he[W];pe.kind==="subtitles"&&(pe.mode="disabled")}console.log("Disabled all subtitles")},getPrefs:()=>{console.log("Saved preferences:",i.current.getPreferences())},reapplyPrefs:()=>{i.current.applySubtitlePreference(e.current)},showMenu:()=>{const he=e.current.getChild("controlBar"),W=["subtitlesButton","captionsButton","subsCapsButton"];let pe=null;for(const me of W){const De=he.getChild(me);if(De){console.log(`Found subtitle button: ${me}`),pe=De;break}}if(pe&&pe.menu)console.log("=== Subtitle Menu Items ==="),pe.menu.children_.forEach((me,De)=>{me.track?console.log(`${De}: ${me.track.label} (${me.track.language}) - selected: ${me.selected()}`):console.log(`${De}: ${me.label||"Unknown"} - selected: ${me.selected()}`)});else{console.log("No subtitle menu found, checking DOM...");const me=e.current.el().querySelectorAll(".vjs-menu-item");console.log(`Found ${me.length} menu items in DOM`),me.forEach((De,Ue)=>{(De.textContent.toLowerCase().includes("subtitle")||De.textContent.toLowerCase().includes("caption")||De.textContent.toLowerCase().includes("off"))&&console.log(`DOM item ${Ue}: ${De.textContent} - classes: ${De.className}`)})}},testMenuClick:he=>{const W=e.current.getChild("controlBar"),pe=["subtitlesButton","captionsButton","subsCapsButton"];let me=null;for(const De of pe){const Ue=W.getChild(De);if(Ue){me=Ue;break}}if(me&&me.menu&&me.menu.children_[he]){const De=me.menu.children_[he];console.log("Simulating click on menu item:",he),De.handleClick()}else{console.log("Menu item not found at index:",he,"trying DOM approach...");const De=e.current.el().querySelectorAll(".vjs-menu-item"),Ue=Array.from(De).filter(ot=>ot.textContent.toLowerCase().includes("subtitle")||ot.textContent.toLowerCase().includes("caption")||ot.textContent.toLowerCase().includes("off"));Ue[he]?(console.log("Clicking DOM element:",Ue[he].textContent),Ue[he].click()):console.log("No DOM subtitle item found at index:",he)}},forceEnableEnglish:()=>{console.log("Force enabling English subtitles...");const he=e.current.textTracks();for(let W=0;W<he.length;W++){const pe=he[W];pe.kind==="subtitles"&&(pe.mode=pe.language==="en"?"showing":"disabled")}i.current.setPreference("subtitleLanguage","en"),console.log("English subtitles enabled and saved")},watchSubtitleChanges:()=>{console.log("👀 Watching subtitle preference changes...");const he=i.current.setPreference;i.current.setPreference=function(W,pe){return W==="subtitleLanguage"&&(console.log(`🎯 SUBTITLE CHANGE: ${pe} at ${new Date().toISOString()}`),console.trace("Change origin:")),he.call(this,W,pe)},console.log("Subtitle change monitoring activated")},checkRestorationFlag:()=>{console.log("Restoration flag:",i.current.isRestoringSubtitles),console.log("Auto-save disabled:",i.current.subtitleAutoSaveDisabled)},forceSaveGreek:()=>{console.log("🚀 Force saving Greek subtitle preference..."),i.current.forceSetSubtitleLanguage("el"),console.log("Check result:",i.current.getPreferences())},forceSaveEnglish:()=>{console.log("🚀 Force saving English subtitle preference..."),i.current.forceSetSubtitleLanguage("en"),console.log("Check result:",i.current.getPreferences())},forceSaveNull:()=>{console.log("🚀 Force saving null subtitle preference..."),i.current.forceSetSubtitleLanguage(null),console.log("Check result:",i.current.getPreferences())}}}),e.current.on("nextVideo",()=>{console.log("Next video requested"),N()}),e.current.on("play",()=>{console.log("Video started playing"),e.current.isChangingQuality||a.current.seekIndicator.show("play")}),e.current.on("pause",()=>{console.log("Video paused"),e.current.isChangingQuality||a.current.seekIndicator.show("pause")});let I=null,G=null;e.current.on("ended",()=>{console.log("Video ended"),console.log("Available relatedVideos:",m),setTimeout(()=>{if(e.current&&!e.current.isDisposed()&&e.current.el()){const Q=e.current.getChild("controlBar");Q&&(Q.show(),Q.el().style.opacity="1",Q.el().style.pointerEvents="auto")}},50),console.log("mediaData.previewSprite",o.previewSprite),console.log("mediaData.nextLink",o.nextLink),console.log("userPreferences",i);const F=i.current.getAutoplayPreference(),Y=o.nextLink!==null;if(console.log("isAutoplayEnabled",F),console.log("hasNextVideo",Y),F&&Y){let se={title:"Next Video",author:"",duration:0,thumbnail:""};if(m.length>0){const Q=m[0];se={title:Q.title||"Next Video",author:Q.author||"",duration:Q.duration||0,thumbnail:Q.thumbnail||""}}I&&(e.current.removeChild(I),I=null),G&&(e.current.removeChild(G),G=null),G=new Px(e.current,{nextVideoData:se,countdownSeconds:5,onPlayNext:()=>{console.log("Autoplay: Navigating to next video"),N()},onCancel:()=>{console.log("Autoplay: User cancelled, showing related videos"),G&&(e.current.removeChild(G),G=null),K()}}),e.current.addChild(G),G.startCountdown()}else K();function K(){I&&(console.log("End screen already exists, removing previous one"),e.current.removeChild(I),I=null),I=new Ix(e.current,{relatedVideos:m}),I.relatedVideos=m,e.current.addChild(I),I.show()}}),e.current.on("play",()=>{I&&I.hide(),G&&G.stopCountdown()}),e.current.on("seeking",()=>{I&&I.hide(),G&&G.stopCountdown()}),e.current.on("replay",()=>{I&&I.hide(),e.current.currentTime(0),e.current.play()}),e.current.on("error",F=>{console.error("Video.js error:",F)}),e.current.on("fullscreenchange",()=>{console.log("Fullscreen changed:",e.current.isFullscreen())}),e.current.on("volumechange",()=>{console.log("Volume changed:",e.current.volume(),"Muted:",e.current.muted())}),e.current.on("ratechange",()=>{console.log("Playback rate changed:",e.current.playbackRate())}),e.current.on("texttrackchange",()=>{console.log("Text track changed");const F=e.current.textTracks();for(let Y=0;Y<F.length;Y++)console.log("Track",Y,":",F[Y].kind,F[Y].label,"Mode:",F[Y].mode)}),e.current.ready(()=>{e.current.el()&&(e.current.el().focus(),console.log("Video player focused for keyboard controls")),e.current.autoplay()&&e.current.play().catch(F=>{console.log(" Browser prevented autoplay (normal behavior):",F.message)})})}},0);return()=>{clearTimeout(H)}}return()=>{a.current&&a.current.cleanupKeyboardHandler&&a.current.cleanupKeyboardHandler(),e.current&&!e.current.isDisposed()&&(e.current.dispose(),e.current=null)}},[]),cn.useEffect(()=>{const H=()=>{e.current&&e.current.el()&&(e.current.el().focus(),console.log("Video element focused for keyboard controls"))},I=()=>{document.hidden||setTimeout(H,100)},G=()=>{setTimeout(H,100)};return document.addEventListener("visibilitychange",I),window.addEventListener("focus",G),setTimeout(H,500),()=>{document.removeEventListener("visibilitychange",I),window.removeEventListener("focus",G)}},[]),Hl.jsx("video",{ref:s,className:"video-js vjs-default-skin",tabIndex:"0"})}function G5(){return Hl.jsx($5,{})}const jx=()=>{const s=document.getElementById("video-js-root");s&&ID.createRoot(s).render(Hl.jsx(cn.StrictMode,{children:Hl.jsx("div",{className:"video-wrapper",children:Hl.jsx("div",{className:"video-box",children:Hl.jsx(G5,{})})})}))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",jx):jx()})();
//# sourceMappingURL=video-js.js.map