mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-06 07:28:53 -05:00
836 lines
1.2 MiB
836 lines
1.2 MiB
var sI=Object.defineProperty;var rI=(Xs,Un,Da)=>Un in Xs?sI(Xs,Un,{enumerable:!0,configurable:!0,writable:!0,value:Da}):Xs[Un]=Da;var Fg=(Xs,Un,Da)=>(rI(Xs,typeof Un!="symbol"?Un+"":Un,Da),Da);(function(){"use strict";var Xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Un(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Da(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var i=function s(){return this instanceof s?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(r).forEach(function(s){var o=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(i,s,o.get?o:{enumerable:!0,get:function(){return r[s]}})}),i}var U_={exports:{}},Kc={},q_={exports:{}},Zc={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.
|
||
*/Zc.exports;var F_;function Ik(){return F_||(F_=1,function(r,e){(function(){function i(k,Y){Object.defineProperty(l.prototype,k,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Y[0],Y[1])}})}function s(k){return k===null||typeof k!="object"?null:(k=Oe&&k[Oe]||k["@@iterator"],typeof k=="function"?k:null)}function o(k,Y){k=(k=k.constructor)&&(k.displayName||k.name)||"ReactClass";var Ce=k+"."+Y;Ye[Ce]||(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.",Y,k),Ye[Ce]=!0)}function l(k,Y,Ce){this.props=k,this.context=Y,this.refs=Mt,this.updater=Ce||Ie}function c(){}function f(k,Y,Ce){this.props=k,this.context=Y,this.refs=Mt,this.updater=Ce||Ie}function p(k){return""+k}function b(k){try{p(k);var Y=!1}catch{Y=!0}if(Y){Y=console;var Ce=Y.error,Re=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return Ce.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Re),p(k)}}function _(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===qt?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case te:return"Fragment";case Ae:return"Profiler";case Me:return"StrictMode";case Pe:return"Suspense";case be:return"SuspenseList";case Te:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case Ue:return"Portal";case Xe:return(k.displayName||"Context")+".Provider";case ze:return(k._context.displayName||"Context")+".Consumer";case qe:var Y=k.render;return k=k.displayName,k||(k=Y.displayName||Y.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case Le:return Y=k.displayName||null,Y!==null?Y:_(k.type)||"Memo";case ie:Y=k._payload,k=k._init;try{return _(k(Y))}catch{}}return null}function x(k){if(k===te)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===ie)return"<...>";try{var Y=_(k);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function w(){var k=we.A;return k===null?null:k.getOwner()}function D(){return Error("react-stack-top-frame")}function M(k){if(gi.call(k,"key")){var Y=Object.getOwnPropertyDescriptor(k,"key").get;if(Y&&Y.isReactWarning)return!1}return k.key!==void 0}function A(k,Y){function Ce(){ui||(ui=!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)",Y))}Ce.isReactWarning=!0,Object.defineProperty(k,"key",{get:Ce,configurable:!0})}function q(){var k=_(this.type);return kt[k]||(kt[k]=!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.")),k=this.props.ref,k!==void 0?k:null}function N(k,Y,Ce,Re,Ve,ot,tt,yt){return Ce=ot.ref,k={$$typeof:ge,type:k,key:Y,props:ot,_owner:Ve},(Ce!==void 0?Ce:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:q}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:tt}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:yt}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function G(k,Y){return Y=N(k.type,Y,void 0,void 0,k._owner,k.props,k._debugStack,k._debugTask),k._store&&(Y._store.validated=k._store.validated),Y}function $(k){return typeof k=="object"&&k!==null&&k.$$typeof===ge}function X(k){var Y={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Ce){return Y[Ce]})}function W(k,Y){return typeof k=="object"&&k!==null&&k.key!=null?(b(k.key),X(""+k.key)):Y.toString(36)}function oe(){}function K(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(oe,oe):(k.status="pending",k.then(function(Y){k.status==="pending"&&(k.status="fulfilled",k.value=Y)},function(Y){k.status==="pending"&&(k.status="rejected",k.reason=Y)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function pe(k,Y,Ce,Re,Ve){var ot=typeof k;(ot==="undefined"||ot==="boolean")&&(k=null);var tt=!1;if(k===null)tt=!0;else switch(ot){case"bigint":case"string":case"number":tt=!0;break;case"object":switch(k.$$typeof){case ge:case Ue:tt=!0;break;case ie:return tt=k._init,pe(tt(k._payload),Y,Ce,Re,Ve)}}if(tt){tt=k,Ve=Ve(tt);var yt=Re===""?"."+W(tt,0):Re;return At(Ve)?(Ce="",yt!=null&&(Ce=yt.replace(ja,"$&/")+"/"),pe(Ve,Y,Ce,"",function(ci){return ci})):Ve!=null&&($(Ve)&&(Ve.key!=null&&(tt&&tt.key===Ve.key||b(Ve.key)),Ce=G(Ve,Ce+(Ve.key==null||tt&&tt.key===Ve.key?"":(""+Ve.key).replace(ja,"$&/")+"/")+yt),Re!==""&&tt!=null&&$(tt)&&tt.key==null&&tt._store&&!tt._store.validated&&(Ce._store.validated=2),Ve=Ce),Y.push(Ve)),1}if(tt=0,yt=Re===""?".":Re+":",At(k))for(var it=0;it<k.length;it++)Re=k[it],ot=yt+W(Re,it),tt+=pe(Re,Y,Ce,ot,Ve);else if(it=s(k),typeof it=="function")for(it===k.entries&&(An||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),An=!0),k=it.call(k),it=0;!(Re=k.next()).done;)Re=Re.value,ot=yt+W(Re,it++),tt+=pe(Re,Y,Ce,ot,Ve);else if(ot==="object"){if(typeof k.then=="function")return pe(K(k),Y,Ce,Re,Ve);throw Y=String(k),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return tt}function ye(k,Y,Ce){if(k==null)return k;var Re=[],Ve=0;return pe(k,Re,"","",function(ot){return Y.call(Ce,ot,Ve++)}),Re}function _e(k){if(k._status===-1){var Y=k._result;Y=Y(),Y.then(function(Ce){(k._status===0||k._status===-1)&&(k._status=1,k._result=Ce)},function(Ce){(k._status===0||k._status===-1)&&(k._status=2,k._result=Ce)}),k._status===-1&&(k._status=0,k._result=Y)}if(k._status===1)return Y=k._result,Y===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?`,Y),"default"in Y||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
||
|
||
Your code should look like:
|
||
const MyComponent = lazy(() => import('./MyComponent'))`,Y),Y.default;throw k._result}function de(){var k=we.H;return k===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.`),k}function le(){}function Z(k){if(bt===null)try{var Y=("require"+Math.random()).slice(0,7);bt=(r&&r[Y]).call(r,"timers").setImmediate}catch{bt=function(Re){Ha===!1&&(Ha=!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 Ve=new MessageChannel;Ve.port1.onmessage=Re,Ve.port2.postMessage(void 0)}}return bt(k)}function fe(k){return 1<k.length&&typeof AggregateError=="function"?new AggregateError(k):k[0]}function Ee(k,Y){Y!==or-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. "),or=Y}function J(k,Y,Ce){var Re=we.actQueue;if(Re!==null)if(Re.length!==0)try{ve(Re),Z(function(){return J(k,Y,Ce)});return}catch(Ve){we.thrownErrors.push(Ve)}else we.actQueue=null;0<we.thrownErrors.length?(Re=fe(we.thrownErrors),we.thrownErrors.length=0,Ce(Re)):Y(k)}function ve(k){if(!$n){$n=!0;var Y=0;try{for(;Y<k.length;Y++){var Ce=k[Y];do{we.didUsePromise=!1;var Re=Ce(!1);if(Re!==null){if(we.didUsePromise){k[Y]=Ce,k.splice(0,Y);return}Ce=Re}else break}while(1)}k.length=0}catch(Ve){k.splice(0,Y+1),we.thrownErrors.push(Ve)}finally{$n=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ge=Symbol.for("react.transitional.element"),Ue=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),Me=Symbol.for("react.strict_mode"),Ae=Symbol.for("react.profiler"),ze=Symbol.for("react.consumer"),Xe=Symbol.for("react.context"),qe=Symbol.for("react.forward_ref"),Pe=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),Le=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Te=Symbol.for("react.activity"),Oe=Symbol.iterator,Ye={},Ie={isMounted:function(){return!1},enqueueForceUpdate:function(k){o(k,"forceUpdate")},enqueueReplaceState:function(k){o(k,"replaceState")},enqueueSetState:function(k){o(k,"setState")}},Ge=Object.assign,Mt={};Object.freeze(Mt),l.prototype.isReactComponent={},l.prototype.setState=function(k,Y){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,Y,"setState")},l.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};var Ze={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)."]},ii;for(ii in Ze)Ze.hasOwnProperty(ii)&&i(ii,Ze[ii]);c.prototype=l.prototype,Ze=f.prototype=new c,Ze.constructor=f,Ge(Ze,l.prototype),Ze.isPureReactComponent=!0;var At=Array.isArray,qt=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},gi=Object.prototype.hasOwnProperty,Lt=console.createTask?console.createTask:function(){return null};Ze={"react-stack-bottom-frame":function(k){return k()}};var ui,Zt,kt={},yi=Ze["react-stack-bottom-frame"].bind(Ze,D)(),Vn=Lt(x(D)),An=!1,ja=/\/+/g,Yr=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Ha=!1,bt=null,or=0,Ji=!1,$n=!1,lr=typeof queueMicrotask=="function"?function(k){queueMicrotask(function(){return queueMicrotask(k)})}:Z;Ze=Object.freeze({__proto__:null,c:function(k){return de().useMemoCache(k)}}),e.Children={map:ye,forEach:function(k,Y,Ce){ye(k,function(){Y.apply(this,arguments)},Ce)},count:function(k){var Y=0;return ye(k,function(){Y++}),Y},toArray:function(k){return ye(k,function(Y){return Y})||[]},only:function(k){if(!$(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},e.Component=l,e.Fragment=te,e.Profiler=Ae,e.PureComponent=f,e.StrictMode=Me,e.Suspense=Pe,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=we,e.__COMPILER_RUNTIME=Ze,e.act=function(k){var Y=we.actQueue,Ce=or;or++;var Re=we.actQueue=Y!==null?Y:[],Ve=!1;try{var ot=k()}catch(it){we.thrownErrors.push(it)}if(0<we.thrownErrors.length)throw Ee(Y,Ce),k=fe(we.thrownErrors),we.thrownErrors.length=0,k;if(ot!==null&&typeof ot=="object"&&typeof ot.then=="function"){var tt=ot;return lr(function(){Ve||Ji||(Ji=!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(it,ci){Ve=!0,tt.then(function(Ms){if(Ee(Y,Ce),Ce===0){try{ve(Re),Z(function(){return J(Ms,it,ci)})}catch(Fd){we.thrownErrors.push(Fd)}if(0<we.thrownErrors.length){var qd=fe(we.thrownErrors);we.thrownErrors.length=0,ci(qd)}}else it(Ms)},function(Ms){Ee(Y,Ce),0<we.thrownErrors.length&&(Ms=fe(we.thrownErrors),we.thrownErrors.length=0),ci(Ms)})}}}var yt=ot;if(Ee(Y,Ce),Ce===0&&(ve(Re),Re.length!==0&&lr(function(){Ve||Ji||(Ji=!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 k=fe(we.thrownErrors),we.thrownErrors.length=0,k;return{then:function(it,ci){Ve=!0,Ce===0?(we.actQueue=Re,Z(function(){return J(yt,it,ci)})):it(yt)}}},e.cache=function(k){return function(){return k.apply(null,arguments)}},e.captureOwnerStack=function(){var k=we.getCurrentStack;return k===null?null:k()},e.cloneElement=function(k,Y,Ce){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var Re=Ge({},k.props),Ve=k.key,ot=k._owner;if(Y!=null){var tt;e:{if(gi.call(Y,"ref")&&(tt=Object.getOwnPropertyDescriptor(Y,"ref").get)&&tt.isReactWarning){tt=!1;break e}tt=Y.ref!==void 0}tt&&(ot=w()),M(Y)&&(b(Y.key),Ve=""+Y.key);for(yt in Y)!gi.call(Y,yt)||yt==="key"||yt==="__self"||yt==="__source"||yt==="ref"&&Y.ref===void 0||(Re[yt]=Y[yt])}var yt=arguments.length-2;if(yt===1)Re.children=Ce;else if(1<yt){tt=Array(yt);for(var it=0;it<yt;it++)tt[it]=arguments[it+2];Re.children=tt}for(Re=N(k.type,Ve,void 0,void 0,ot,Re,k._debugStack,k._debugTask),Ve=2;Ve<arguments.length;Ve++)ot=arguments[Ve],$(ot)&&ot._store&&(ot._store.validated=1);return Re},e.createContext=function(k){return k={$$typeof:Xe,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:ze,_context:k},k._currentRenderer=null,k._currentRenderer2=null,k},e.createElement=function(k,Y,Ce){for(var Re=2;Re<arguments.length;Re++){var Ve=arguments[Re];$(Ve)&&Ve._store&&(Ve._store.validated=1)}if(Re={},Ve=null,Y!=null)for(it in Zt||!("__self"in Y)||"key"in Y||(Zt=!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")),M(Y)&&(b(Y.key),Ve=""+Y.key),Y)gi.call(Y,it)&&it!=="key"&&it!=="__self"&&it!=="__source"&&(Re[it]=Y[it]);var ot=arguments.length-2;if(ot===1)Re.children=Ce;else if(1<ot){for(var tt=Array(ot),yt=0;yt<ot;yt++)tt[yt]=arguments[yt+2];Object.freeze&&Object.freeze(tt),Re.children=tt}if(k&&k.defaultProps)for(it in ot=k.defaultProps,ot)Re[it]===void 0&&(Re[it]=ot[it]);Ve&&A(Re,typeof k=="function"?k.displayName||k.name||"Unknown":k);var it=1e4>we.recentlyCreatedOwnerStacks++;return N(k,Ve,void 0,void 0,w(),Re,it?Error("react-stack-top-frame"):yi,it?Lt(x(k)):Vn)},e.createRef=function(){var k={current:null};return Object.seal(k),k},e.forwardRef=function(k){k!=null&&k.$$typeof===Le?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof k!="function"?console.error("forwardRef requires a render function but was given %s.",k===null?"null":typeof k):k.length!==0&&k.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",k.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),k!=null&&k.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var Y={$$typeof:qe,render:k},Ce;return Object.defineProperty(Y,"displayName",{enumerable:!1,configurable:!0,get:function(){return Ce},set:function(Re){Ce=Re,k.name||k.displayName||(Object.defineProperty(k,"name",{value:Re}),k.displayName=Re)}}),Y},e.isValidElement=$,e.lazy=function(k){return{$$typeof:ie,_payload:{_status:-1,_result:k},_init:_e}},e.memo=function(k,Y){k==null&&console.error("memo: The first argument must be a component. Instead received: %s",k===null?"null":typeof k),Y={$$typeof:Le,type:k,compare:Y===void 0?null:Y};var Ce;return Object.defineProperty(Y,"displayName",{enumerable:!1,configurable:!0,get:function(){return Ce},set:function(Re){Ce=Re,k.name||k.displayName||(Object.defineProperty(k,"name",{value:Re}),k.displayName=Re)}}),Y},e.startTransition=function(k){var Y=we.T,Ce={};we.T=Ce,Ce._updatedFibers=new Set;try{var Re=k(),Ve=we.S;Ve!==null&&Ve(Ce,Re),typeof Re=="object"&&Re!==null&&typeof Re.then=="function"&&Re.then(le,Yr)}catch(ot){Yr(ot)}finally{Y===null&&Ce._updatedFibers&&(k=Ce._updatedFibers.size,Ce._updatedFibers.clear(),10<k&&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=Y}},e.unstable_useCacheRefresh=function(){return de().useCacheRefresh()},e.use=function(k){return de().use(k)},e.useActionState=function(k,Y,Ce){return de().useActionState(k,Y,Ce)},e.useCallback=function(k,Y){return de().useCallback(k,Y)},e.useContext=function(k){var Y=de();return k.$$typeof===ze&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),Y.useContext(k)},e.useDebugValue=function(k,Y){return de().useDebugValue(k,Y)},e.useDeferredValue=function(k,Y){return de().useDeferredValue(k,Y)},e.useEffect=function(k,Y,Ce){k==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Re=de();if(typeof Ce=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Re.useEffect(k,Y)},e.useId=function(){return de().useId()},e.useImperativeHandle=function(k,Y,Ce){return de().useImperativeHandle(k,Y,Ce)},e.useInsertionEffect=function(k,Y){return k==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),de().useInsertionEffect(k,Y)},e.useLayoutEffect=function(k,Y){return k==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),de().useLayoutEffect(k,Y)},e.useMemo=function(k,Y){return de().useMemo(k,Y)},e.useOptimistic=function(k,Y){return de().useOptimistic(k,Y)},e.useReducer=function(k,Y,Ce){return de().useReducer(k,Y,Ce)},e.useRef=function(k){return de().useRef(k)},e.useState=function(k){return de().useState(k)},e.useSyncExternalStore=function(k,Y,Ce){return de().useSyncExternalStore(k,Y,Ce)},e.useTransition=function(){return de().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())})()}(Zc,Zc.exports)),Zc.exports}q_.exports=Ik();var gt=q_.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 j_;function Pk(){return j_||(j_=1,function(){function r(te){if(te==null)return null;if(typeof te=="function")return te.$$typeof===_e?null:te.displayName||te.name||null;if(typeof te=="string")return te;switch(te){case A:return"Fragment";case N:return"Profiler";case q:return"StrictMode";case W:return"Suspense";case oe:return"SuspenseList";case ye:return"Activity"}if(typeof te=="object")switch(typeof te.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),te.$$typeof){case M:return"Portal";case $:return(te.displayName||"Context")+".Provider";case G:return(te._context.displayName||"Context")+".Consumer";case X:var Me=te.render;return te=te.displayName,te||(te=Me.displayName||Me.name||"",te=te!==""?"ForwardRef("+te+")":"ForwardRef"),te;case K:return Me=te.displayName||null,Me!==null?Me:r(te.type)||"Memo";case pe:Me=te._payload,te=te._init;try{return r(te(Me))}catch{}}return null}function e(te){return""+te}function i(te){try{e(te);var Me=!1}catch{Me=!0}if(Me){Me=console;var Ae=Me.error,ze=typeof Symbol=="function"&&Symbol.toStringTag&&te[Symbol.toStringTag]||te.constructor.name||"Object";return Ae.call(Me,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ze),e(te)}}function s(te){if(te===A)return"<>";if(typeof te=="object"&&te!==null&&te.$$typeof===pe)return"<...>";try{var Me=r(te);return Me?"<"+Me+">":"<...>"}catch{return"<...>"}}function o(){var te=de.A;return te===null?null:te.getOwner()}function l(){return Error("react-stack-top-frame")}function c(te){if(le.call(te,"key")){var Me=Object.getOwnPropertyDescriptor(te,"key").get;if(Me&&Me.isReactWarning)return!1}return te.key!==void 0}function f(te,Me){function Ae(){Ee||(Ee=!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)",Me))}Ae.isReactWarning=!0,Object.defineProperty(te,"key",{get:Ae,configurable:!0})}function p(){var te=r(this.type);return J[te]||(J[te]=!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.")),te=this.props.ref,te!==void 0?te:null}function b(te,Me,Ae,ze,Xe,qe,Pe,be){return Ae=qe.ref,te={$$typeof:D,type:te,key:Me,props:qe,_owner:Xe},(Ae!==void 0?Ae:null)!==null?Object.defineProperty(te,"ref",{enumerable:!1,get:p}):Object.defineProperty(te,"ref",{enumerable:!1,value:null}),te._store={},Object.defineProperty(te._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(te,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(te,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.defineProperty(te,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:be}),Object.freeze&&(Object.freeze(te.props),Object.freeze(te)),te}function _(te,Me,Ae,ze,Xe,qe,Pe,be){var Le=Me.children;if(Le!==void 0)if(ze)if(Z(Le)){for(ze=0;ze<Le.length;ze++)x(Le[ze]);Object.freeze&&Object.freeze(Le)}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 x(Le);if(le.call(Me,"key")){Le=r(te);var ie=Object.keys(Me).filter(function(Oe){return Oe!=="key"});ze=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",Ue[Le+ze]||(ie=0<ie.length?"{"+ie.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} />`,ze,Le,ie,Le),Ue[Le+ze]=!0)}if(Le=null,Ae!==void 0&&(i(Ae),Le=""+Ae),c(Me)&&(i(Me.key),Le=""+Me.key),"key"in Me){Ae={};for(var Te in Me)Te!=="key"&&(Ae[Te]=Me[Te])}else Ae=Me;return Le&&f(Ae,typeof te=="function"?te.displayName||te.name||"Unknown":te),b(te,Le,qe,Xe,o(),Ae,Pe,be)}function x(te){typeof te=="object"&&te!==null&&te.$$typeof===D&&te._store&&(te._store.validated=1)}var w=gt,D=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),$=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ye=Symbol.for("react.activity"),_e=Symbol.for("react.client.reference"),de=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,Z=Array.isArray,fe=console.createTask?console.createTask:function(){return null};w={"react-stack-bottom-frame":function(te){return te()}};var Ee,J={},ve=w["react-stack-bottom-frame"].bind(w,l)(),ge=fe(s(l)),Ue={};Kc.Fragment=A,Kc.jsx=function(te,Me,Ae,ze,Xe){var qe=1e4>de.recentlyCreatedOwnerStacks++;return _(te,Me,Ae,!1,ze,Xe,qe?Error("react-stack-top-frame"):ve,qe?fe(s(te)):ge)},Kc.jsxs=function(te,Me,Ae,ze,Xe){var qe=1e4>de.recentlyCreatedOwnerStacks++;return _(te,Me,Ae,!0,ze,Xe,qe?Error("react-stack-top-frame"):ve,qe?fe(s(te)):ge)}}()),Kc}U_.exports=Pk();var bn=U_.exports,H_={exports:{}},jg={exports:{}},Hg={};/**
|
||
* @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 z_;function Nk(){return z_||(z_=1,function(r){(function(){function e(){if(W=!1,ye){var J=r.unstable_now();le=J;var ve=!0;try{e:{$=!1,X&&(X=!1,K(_e),_e=-1),G=!0;var ge=N;try{t:{for(c(J),q=s(D);q!==null&&!(q.expirationTime>J&&p());){var Ue=q.callback;if(typeof Ue=="function"){q.callback=null,N=q.priorityLevel;var te=Ue(q.expirationTime<=J);if(J=r.unstable_now(),typeof te=="function"){q.callback=te,c(J),ve=!0;break t}q===s(D)&&o(D),c(J)}else o(D);q=s(D)}if(q!==null)ve=!0;else{var Me=s(M);Me!==null&&b(f,Me.startTime-J),ve=!1}}break e}finally{q=null,N=ge,G=!1}ve=void 0}}finally{ve?Z():ye=!1}}}function i(J,ve){var ge=J.length;J.push(ve);e:for(;0<ge;){var Ue=ge-1>>>1,te=J[Ue];if(0<l(te,ve))J[Ue]=ve,J[ge]=te,ge=Ue;else break e}}function s(J){return J.length===0?null:J[0]}function o(J){if(J.length===0)return null;var ve=J[0],ge=J.pop();if(ge!==ve){J[0]=ge;e:for(var Ue=0,te=J.length,Me=te>>>1;Ue<Me;){var Ae=2*(Ue+1)-1,ze=J[Ae],Xe=Ae+1,qe=J[Xe];if(0>l(ze,ge))Xe<te&&0>l(qe,ze)?(J[Ue]=qe,J[Xe]=ge,Ue=Xe):(J[Ue]=ze,J[Ae]=ge,Ue=Ae);else if(Xe<te&&0>l(qe,ge))J[Ue]=qe,J[Xe]=ge,Ue=Xe;else break e}}return ve}function l(J,ve){var ge=J.sortIndex-ve.sortIndex;return ge!==0?ge:J.id-ve.id}function c(J){for(var ve=s(M);ve!==null;){if(ve.callback===null)o(M);else if(ve.startTime<=J)o(M),ve.sortIndex=ve.expirationTime,i(D,ve);else break;ve=s(M)}}function f(J){if(X=!1,c(J),!$)if(s(D)!==null)$=!0,ye||(ye=!0,Z());else{var ve=s(M);ve!==null&&b(f,ve.startTime-J)}}function p(){return W?!0:!(r.unstable_now()-le<de)}function b(J,ve){_e=oe(function(){J(r.unstable_now())},ve)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;r.unstable_now=function(){return _.now()}}else{var x=Date,w=x.now();r.unstable_now=function(){return x.now()-w}}var D=[],M=[],A=1,q=null,N=3,G=!1,$=!1,X=!1,W=!1,oe=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,pe=typeof setImmediate<"u"?setImmediate:null,ye=!1,_e=-1,de=5,le=-1;if(typeof pe=="function")var Z=function(){pe(e)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,Ee=fe.port2;fe.port1.onmessage=e,Z=function(){Ee.postMessage(null)}}else Z=function(){oe(e,0)};r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(J){J.callback=null},r.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<J?Math.floor(1e3/J):5},r.unstable_getCurrentPriorityLevel=function(){return N},r.unstable_next=function(J){switch(N){case 1:case 2:case 3:var ve=3;break;default:ve=N}var ge=N;N=ve;try{return J()}finally{N=ge}},r.unstable_requestPaint=function(){W=!0},r.unstable_runWithPriority=function(J,ve){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var ge=N;N=J;try{return ve()}finally{N=ge}},r.unstable_scheduleCallback=function(J,ve,ge){var Ue=r.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Ue+ge:Ue):ge=Ue,J){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=ge+te,J={id:A++,callback:ve,priorityLevel:J,startTime:ge,expirationTime:te,sortIndex:-1},ge>Ue?(J.sortIndex=ge,i(M,J),s(D)===null&&J===s(M)&&(X?(K(_e),_e=-1):X=!0,b(f,ge-Ue))):(J.sortIndex=te,i(D,J),$||G||($=!0,ye||(ye=!0,Z()))),J},r.unstable_shouldYield=p,r.unstable_wrapCallback=function(J){var ve=N;return function(){var ge=N;N=ve;try{return J.apply(this,arguments)}finally{N=ge}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}(Hg)),Hg}var V_;function Bk(){return V_||(V_=1,jg.exports=Nk()),jg.exports}var zg={exports:{}},Xi={};/**
|
||
* @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 $_;function Uk(){return $_||($_=1,function(){function r(){}function e(x){return""+x}function i(x,w,D){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{e(M);var A=!1}catch{A=!0}return A&&(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&&M[Symbol.toStringTag]||M.constructor.name||"Object"),e(M)),{$$typeof:b,key:M==null?null:""+M,children:x,containerInfo:w,implementation:D}}function s(x,w){if(x==="font")return"";if(typeof w=="string")return w==="use-credentials"?w:""}function o(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":'something with type "'+typeof x+'"'}function l(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":typeof x=="string"?JSON.stringify(x):typeof x=="number"?"`"+x+"`":'something with type "'+typeof x+'"'}function c(){var x=_.H;return x===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.`),x}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var f=gt,p={d:{f:r,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},b=Symbol.for("react.portal"),_=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"),Xi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,Xi.createPortal=function(x,w){var D=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w||w.nodeType!==1&&w.nodeType!==9&&w.nodeType!==11)throw Error("Target container is not a DOM element.");return i(x,w,null,D)},Xi.flushSync=function(x){var w=_.T,D=p.p;try{if(_.T=null,p.p=2,x)return x()}finally{_.T=w,p.p=D,p.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.")}},Xi.preconnect=function(x,w){typeof x=="string"&&x?w!=null&&typeof w!="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.",l(w)):w!=null&&typeof w.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(w.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x)),typeof x=="string"&&(w?(w=w.crossOrigin,w=typeof w=="string"?w==="use-credentials"?w:"":void 0):w=null,p.d.C(x,w))},Xi.prefetchDNS=function(x){if(typeof x!="string"||!x)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x));else if(1<arguments.length){var w=arguments[1];typeof w=="object"&&w.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`.",l(w)):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`.",l(w))}typeof x=="string"&&p.d.D(x)},Xi.preinit=function(x,w){if(typeof x=="string"&&x?w==null||typeof w!="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.",l(w)):w.as!=="style"&&w.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".',l(w.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",o(x)),typeof x=="string"&&w&&typeof w.as=="string"){var D=w.as,M=s(D,w.crossOrigin),A=typeof w.integrity=="string"?w.integrity:void 0,q=typeof w.fetchPriority=="string"?w.fetchPriority:void 0;D==="style"?p.d.S(x,typeof w.precedence=="string"?w.precedence:void 0,{crossOrigin:M,integrity:A,fetchPriority:q}):D==="script"&&p.d.X(x,{crossOrigin:M,integrity:A,fetchPriority:q,nonce:typeof w.nonce=="string"?w.nonce:void 0})}},Xi.preinitModule=function(x,w){var D="";if(typeof x=="string"&&x||(D+=" The `href` argument encountered was "+o(x)+"."),w!==void 0&&typeof w!="object"?D+=" The `options` argument encountered was "+o(w)+".":w&&"as"in w&&w.as!=="script"&&(D+=" The `as` option encountered was "+l(w.as)+"."),D)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",D);else switch(D=w&&typeof w.as=="string"?w.as:"script",D){case"script":break;default:D=l(D),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)',D,x)}typeof x=="string"&&(typeof w=="object"&&w!==null?(w.as==null||w.as==="script")&&(D=s(w.as,w.crossOrigin),p.d.M(x,{crossOrigin:D,integrity:typeof w.integrity=="string"?w.integrity:void 0,nonce:typeof w.nonce=="string"?w.nonce:void 0})):w==null&&p.d.M(x))},Xi.preload=function(x,w){var D="";if(typeof x=="string"&&x||(D+=" The `href` argument encountered was "+o(x)+"."),w==null||typeof w!="object"?D+=" The `options` argument encountered was "+o(w)+".":typeof w.as=="string"&&w.as||(D+=" The `as` option encountered was "+o(w.as)+"."),D&&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',D),typeof x=="string"&&typeof w=="object"&&w!==null&&typeof w.as=="string"){D=w.as;var M=s(D,w.crossOrigin);p.d.L(x,D,{crossOrigin:M,integrity:typeof w.integrity=="string"?w.integrity:void 0,nonce:typeof w.nonce=="string"?w.nonce:void 0,type:typeof w.type=="string"?w.type:void 0,fetchPriority:typeof w.fetchPriority=="string"?w.fetchPriority:void 0,referrerPolicy:typeof w.referrerPolicy=="string"?w.referrerPolicy:void 0,imageSrcSet:typeof w.imageSrcSet=="string"?w.imageSrcSet:void 0,imageSizes:typeof w.imageSizes=="string"?w.imageSizes:void 0,media:typeof w.media=="string"?w.media:void 0})}},Xi.preloadModule=function(x,w){var D="";typeof x=="string"&&x||(D+=" The `href` argument encountered was "+o(x)+"."),w!==void 0&&typeof w!="object"?D+=" The `options` argument encountered was "+o(w)+".":w&&"as"in w&&typeof w.as!="string"&&(D+=" The `as` option encountered was "+o(w.as)+"."),D&&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',D),typeof x=="string"&&(w?(D=s(w.as,w.crossOrigin),p.d.m(x,{as:typeof w.as=="string"&&w.as!=="script"?w.as:void 0,crossOrigin:D,integrity:typeof w.integrity=="string"?w.integrity:void 0})):p.d.m(x))},Xi.requestFormReset=function(x){p.d.r(x)},Xi.unstable_batchedUpdates=function(x,w){return x(w)},Xi.useFormState=function(x,w,D){return c().useFormState(x,w,D)},Xi.useFormStatus=function(){return c().useHostTransitionStatus()},Xi.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xi}var G_;function qk(){return G_||(G_=1,zg.exports=Uk()),zg.exports}var Jc={};/**
|
||
* @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 Y_;function Fk(){return Y_||(Y_=1,function(){function r(t,n){for(t=t.memoizedState;t!==null&&0<n;)t=t.next,n--;return t}function e(t,n,a,u){if(a>=n.length)return u;var d=n[a],m=Vi(t)?t.slice():ct({},t);return m[d]=e(t[d],n,a+1,u),m}function i(t,n,a){if(n.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var u=0;u<a.length-1;u++)if(n[u]!==a[u]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(t,n,a,0)}}function s(t,n,a,u){var d=n[u],m=Vi(t)?t.slice():ct({},t);return u+1===n.length?(m[a[u]]=m[d],Vi(m)?m.splice(d,1):delete m[d]):m[d]=s(t[d],n,a,u+1),m}function o(t,n,a){var u=n[a],d=Vi(t)?t.slice():ct({},t);return a+1===n.length?(Vi(d)?d.splice(u,1):delete d[u],d):(d[u]=o(t[u],n,a+1),d)}function l(){return!1}function c(){return null}function f(){}function p(){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 _(){}function x(t){var n=[];return t.forEach(function(a){n.push(a)}),n.sort().join(", ")}function w(t,n,a,u){return new dv(t,n,a,u)}function D(t,n){t.context===go&&(cb(t.current,2,n,t,null,null),oc())}function M(t,n){if(vs!==null){var a=n.staleFamilies;n=n.updatedFamilies,Nh(),Qd(t.current,n,a),oc()}}function A(t){vs=t}function q(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function N(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,n.flags&4098&&(a=n.return),t=n.return;while(t)}return n.tag===3?a: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 $(t){if(N(t)!==t)throw Error("Unable to find node on an unmounted component.")}function X(t){var n=t.alternate;if(!n){if(n=N(t),n===null)throw Error("Unable to find node on an unmounted component.");return n!==t?null:t}for(var a=t,u=n;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(u=d.return,u!==null){a=u;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return $(d),t;if(m===u)return $(d),n;m=m.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==u.return)a=d,u=m;else{for(var S=!1,C=d.child;C;){if(C===a){S=!0,a=d,u=m;break}if(C===u){S=!0,u=d,a=m;break}C=C.sibling}if(!S){for(C=m.child;C;){if(C===a){S=!0,a=m,u=d;break}if(C===u){S=!0,u=m,a=d;break}C=C.sibling}if(!S)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(a.alternate!==u)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(a.tag!==3)throw Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?t:n}function W(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=W(t),n!==null)return n;t=t.sibling}return null}function oe(t){return t===null||typeof t!="object"?null:(t=iw&&t[iw]||t["@@iterator"],typeof t=="function"?t:null)}function K(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===vL?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case pc:return"Fragment";case yb:return"Profiler";case Gm:return"StrictMode";case bb:return"Suspense";case _b:return"SuspenseList";case Tb: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 fc:return"Portal";case kr:return(t.displayName||"Context")+".Provider";case vb:return(t._context.displayName||"Context")+".Consumer";case $h:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ym:return n=t.displayName||null,n!==null?n:K(t.type)||"Memo";case es:n=t._payload,t=t._init;try{return K(t(n))}catch{}}return null}function pe(t){return typeof t.tag=="number"?ye(t):typeof t.name=="string"?t.name:null}function ye(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 K(n);case 8:return n===Gm?"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 a=n.length-1;0<=a;a--)if(typeof n[a].name=="string")return n[a].name}if(t.return!==null)return ye(t.return)}return null}function _e(t){return{current:t}}function de(t,n){0>pa?console.error("Unexpected pop."):(n!==xb[pa]&&console.error("Unexpected Fiber popped."),t.current=Sb[pa],Sb[pa]=null,xb[pa]=null,pa--)}function le(t,n,a){pa++,Sb[pa]=t.current,xb[pa]=a,t.current=n}function Z(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 fe(t,n){le(ho,n,t),le(Gh,t,t),le(co,null,t);var a=n.nodeType;switch(a){case 9:case 11:a=a===9?"#document":"#fragment",n=(n=n.documentElement)&&(n=n.namespaceURI)?OC(n):wa;break;default:if(a=n.tagName,n=n.namespaceURI)n=OC(n),n=RC(n,a);else switch(a){case"svg":n=Wc;break;case"math":n=Lg;break;default:n=wa}}a=a.toLowerCase(),a=Dn(null,a),a={context:n,ancestorInfo:a},de(co,t),le(co,a,t)}function Ee(t){de(co,t),de(Gh,t),de(ho,t)}function J(){return Z(co.current)}function ve(t){t.memoizedState!==null&&le(Xm,t,t);var n=Z(co.current),a=t.type,u=RC(n.context,a);a=Dn(n.ancestorInfo,a),u={context:u,ancestorInfo:a},n!==u&&(le(Gh,t,t),le(co,u,t))}function ge(t){Gh.current===t&&(de(co,t),de(Gh,t)),Xm.current===t&&(de(Xm,t),Rf._currentValue=zl)}function Ue(t){return typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object"}function te(t){try{return Me(t),!1}catch{return!0}}function Me(t){return""+t}function Ae(t,n){if(te(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,Ue(t)),Me(t)}function ze(t,n){if(te(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,Ue(t)),Me(t)}function Xe(t){if(te(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.",Ue(t)),Me(t)}function qe(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{gc=n.inject(t),tn=n}catch(a){console.error("React instrumentation encountered an error: %s.",a)}return!!n.checkDCE}function Pe(t){if(typeof CL=="function"&&wL(t),tn&&typeof tn.setStrictMode=="function")try{tn.setStrictMode(gc,t)}catch(n){Or||(Or=!0,console.error("React instrumentation encountered an error: %s",n))}}function be(t){Ne=t}function Le(){Ne!==null&&typeof Ne.markCommitStopped=="function"&&Ne.markCommitStopped()}function ie(t){Ne!==null&&typeof Ne.markComponentRenderStarted=="function"&&Ne.markComponentRenderStarted(t)}function Te(){Ne!==null&&typeof Ne.markComponentRenderStopped=="function"&&Ne.markComponentRenderStopped()}function Oe(t){Ne!==null&&typeof Ne.markRenderStarted=="function"&&Ne.markRenderStarted(t)}function Ye(){Ne!==null&&typeof Ne.markRenderStopped=="function"&&Ne.markRenderStopped()}function Ie(t,n){Ne!==null&&typeof Ne.markStateUpdateScheduled=="function"&&Ne.markStateUpdateScheduled(t,n)}function Ge(t){return t>>>=0,t===0?32:31-(AL(t)/kL|0)|0}function Mt(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 Ze(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 ii(t,n,a){var u=t.pendingLanes;if(u===0)return 0;var d=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var C=u&134217727;return C!==0?(u=C&~m,u!==0?d=Ze(u):(S&=C,S!==0?d=Ze(S):a||(a=C&~t,a!==0&&(d=Ze(a))))):(C=u&~m,C!==0?d=Ze(C):S!==0?d=Ze(S):a||(a=u&~t,a!==0&&(d=Ze(a)))),d===0?0:n!==0&&n!==d&&!(n&m)&&(m=d&-d,a=n&-n,m>=a||m===32&&(a&4194048)!==0)?n:d}function At(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function qt(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=Wm;return Wm<<=1,!(Wm&4194048)&&(Wm=256),t}function gi(){var t=Qm;return Qm<<=1,!(Qm&62914560)&&(Qm=4194304),t}function Lt(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function ui(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Zt(t,n,a,u,d,m){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var C=t.entanglements,R=t.expirationTimes,I=t.hiddenUpdates;for(a=S&~a;0<a;){var ee=31-hn(a),ae=1<<ee;C[ee]=0,R[ee]=-1;var Q=I[ee];if(Q!==null)for(I[ee]=null,ee=0;ee<Q.length;ee++){var ue=Q[ee];ue!==null&&(ue.lane&=-536870913)}a&=~ae}u!==0&&kt(t,u,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~n))}function kt(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-hn(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|a&4194090}function yi(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var u=31-hn(a),d=1<<u;d&n|t[u]&n&&(t[u]|=n),a&=~d}}function Vn(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 An(t,n,a){if(Hs)for(t=t.pendingUpdatersLaneMap;0<a;){var u=31-hn(a),d=1<<u;t[u].add(n),a&=~d}}function ja(t,n){if(Hs)for(var a=t.pendingUpdatersLaneMap,u=t.memoizedUpdaters;0<n;){var d=31-hn(n);t=1<<d,d=a[d],0<d.size&&(d.forEach(function(m){var S=m.alternate;S!==null&&u.has(S)||u.add(m)}),d.clear()),n&=~t}}function Yr(t){return t&=-t,gs<t?Rr<t?t&134217727?ga:Km:Rr:gs}function Ha(){var t=xt.p;return t!==0?t:(t=window.event,t===void 0?ga:QC(t.type))}function bt(t,n){var a=xt.p;try{return xt.p=t,n()}finally{xt.p=a}}function or(t){delete t[nn],delete t[Ln],delete t[kb],delete t[DL],delete t[OL]}function Ji(t){var n=t[nn];if(n)return n;for(var a=t.parentNode;a;){if(n=a[po]||a[nn]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=BC(t);t!==null;){if(a=t[nn])return a;t=BC(t)}return n}t=a,a=t.parentNode}return null}function $n(t){if(t=t[nn]||t[po]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function lr(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function k(t){var n=t[nw];return n||(n=t[nw]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Y(t){t[Yh]=!0}function Ce(t,n){Re(t,n),Re(t+"Capture",n)}function Re(t,n){El[t]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",t),El[t]=n;var a=t.toLowerCase();for(Db[a]=t,t==="onDoubleClick"&&(Db.ondblclick=t),t=0;t<n.length;t++)sw.add(n[t])}function Ve(t,n){RL[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 ot(t){return ma.call(aw,t)?!0:ma.call(rw,t)?!1:ML.test(t)?aw[t]=!0:(rw[t]=!0,console.error("Invalid attribute name: `%s`",t),!1)}function tt(t,n,a){if(ot(n)){if(!t.hasAttribute(n)){switch(typeof a){case"symbol":case"object":return a;case"function":return a;case"boolean":if(a===!1)return a}return a===void 0?void 0:null}return t=t.getAttribute(n),t===""&&a===!0?!0:(Ae(a,n),t===""+a?a:t)}}function yt(t,n,a){if(ot(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}Ae(a,n),t.setAttribute(n,""+a)}}function it(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}Ae(a,n),t.setAttribute(n,""+a)}}function ci(t,n,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}Ae(u,a),t.setAttributeNS(n,a,""+u)}}function Ms(){}function qd(){if(Xh===0){ow=console.log,lw=console.info,uw=console.warn,cw=console.error,dw=console.group,hw=console.groupCollapsed,fw=console.groupEnd;var t={configurable:!0,enumerable:!0,value:Ms,writable:!0};Object.defineProperties(console,{info:t,log:t,warn:t,error:t,group:t,groupCollapsed:t,groupEnd:t})}Xh++}function Fd(){if(Xh--,Xh===0){var t={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ct({},t,{value:ow}),info:ct({},t,{value:lw}),warn:ct({},t,{value:uw}),error:ct({},t,{value:cw}),group:ct({},t,{value:dw}),groupCollapsed:ct({},t,{value:hw}),groupEnd:ct({},t,{value:fw})})}0>Xh&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function kn(t){if(Ob===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Ob=n&&n[1]||"",pw=-1<a.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Ob+t+pw}function jd(t,n){if(!t||Rb)return"";var a=Mb.get(t);if(a!==void 0)return a;Rb=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var u=null;u=re.H,re.H=null,qd();try{var d={DetermineComponentFrameRoot:function(){try{if(n){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(Fe){var ue=Fe}Reflect.construct(t,[],Q)}else{try{Q.call()}catch(Fe){ue=Fe}t.call(Q.prototype)}}else{try{throw Error()}catch(Fe){ue=Fe}(Q=t())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(Fe){if(Fe&&ue&&typeof Fe.stack=="string")return[Fe.stack,ue.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=d.DetermineComponentFrameRoot(),C=S[0],R=S[1];if(C&&R){var I=C.split(`
|
||
`),ee=R.split(`
|
||
`);for(S=m=0;m<I.length&&!I[m].includes("DetermineComponentFrameRoot");)m++;for(;S<ee.length&&!ee[S].includes("DetermineComponentFrameRoot");)S++;if(m===I.length||S===ee.length)for(m=I.length-1,S=ee.length-1;1<=m&&0<=S&&I[m]!==ee[S];)S--;for(;1<=m&&0<=S;m--,S--)if(I[m]!==ee[S]){if(m!==1||S!==1)do if(m--,S--,0>S||I[m]!==ee[S]){var ae=`
|
||
`+I[m].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),typeof t=="function"&&Mb.set(t,ae),ae}while(1<=m&&0<=S);break}}}finally{Rb=!1,re.H=u,Fd(),Error.prepareStackTrace=a}return I=(I=t?t.displayName||t.name:"")?kn(I):"",typeof t=="function"&&Mb.set(t,I),I}function Hd(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 zd(t){switch(t.tag){case 26:case 27:case 5:return kn(t.type);case 16:return kn("Lazy");case 13:return kn("Suspense");case 19:return kn("SuspenseList");case 0:case 15:return jd(t.type,!1);case 11:return jd(t.type.render,!1);case 1:return jd(t.type,!0);case 31:return kn("Activity");default:return""}}function Vo(t){try{var n="";do{n+=zd(t);var a=t._debugInfo;if(a)for(var u=a.length-1;0<=u;u--){var d=a[u];if(typeof d.name=="string"){var m=n,S=d.env,C=kn(d.name+(S?" ["+S+"]":""));n=m+C}}t=t.return}while(t);return n}catch(R){return`
|
||
Error generating stack: `+R.message+`
|
||
`+R.stack}}function Bi(t){return(t=t?t.displayName||t.name:"")?kn(t):""}function Ou(){if(ts===null)return null;var t=ts._debugOwner;return t!=null?pe(t):null}function Jy(){if(ts===null)return"";var t=ts;try{var n="";switch(t.tag===6&&(t=t.return),t.tag){case 26:case 27:case 5:n+=kn(t.type);break;case 13:n+=kn("Suspense");break;case 19:n+=kn("SuspenseList");break;case 31:n+=kn("Activity");break;case 30:case 0:case 15:case 1:t._debugOwner||n!==""||(n+=Bi(t.type));break;case 11:t._debugOwner||n!==""||(n+=Bi(t.type.render))}for(;t;)if(typeof t.tag=="number"){var a=t;t=a._debugOwner;var u=a._debugStack;t&&u&&(typeof u!="string"&&(a._debugStack=u=Hd(u)),u!==""&&(n+=`
|
||
`+u))}else if(t.debugStack!=null){var d=t.debugStack;(t=t.owner)&&d&&(n+=`
|
||
`+Hd(d))}else break;var m=n}catch(S){m=`
|
||
Error generating stack: `+S.message+`
|
||
`+S.stack}return m}function He(t,n,a,u,d,m,S){var C=ts;Gn(t);try{return t!==null&&t._debugTask?t._debugTask.run(n.bind(null,a,u,d,m,S)):n(a,u,d,m,S)}finally{Gn(C)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Gn(t){re.getCurrentStack=t===null?null:Jy,Mr=!1,ts=t}function Ui(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return Xe(t),t;default:return""}}function Dt(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ev(t){var n=Dt(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);Xe(t[n]);var u=""+t[n];if(!t.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,m=a.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){Xe(S),u=""+S,m.call(this,S)}}),Object.defineProperty(t,n,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(S){Xe(S),u=""+S},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Xr(t){t._valueTracker||(t._valueTracker=ev(t))}function $o(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return t&&(u=Dt(t)?t.checked?"true":"false":t.value),t=u,t!==a?(n.setValue(t),!0):!1}function Ru(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 vi(t){return t.replace(LL,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ft(t,n){n.checked===void 0||n.defaultChecked===void 0||gw||(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",Ou()||"A component",n.type),gw=!0),n.value===void 0||n.defaultValue===void 0||mw||(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",Ou()||"A component",n.type),mw=!0)}function Mu(t,n,a,u,d,m,S,C){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?(Ae(S,"type"),t.type=S):t.removeAttribute("type"),n!=null?S==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Ui(n)):t.value!==""+Ui(n)&&(t.value=""+Ui(n)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),n!=null?Vd(t,S,Ui(n)):a!=null?Vd(t,S,Ui(a)):u!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?(Ae(C,"name"),t.name=""+Ui(C)):t.removeAttribute("name")}function Go(t,n,a,u,d,m,S,C){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(Ae(m,"type"),t.type=m),n!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||n!=null))return;a=a!=null?""+Ui(a):"",n=n!=null?""+Ui(n):a,C||n===t.value||(t.value=n),t.defaultValue=n}u=u??d,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=C?t.checked:!!u,t.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(Ae(S,"name"),t.name=S)}function Vd(t,n,a){n==="number"&&Ru(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function $p(t,n){n.value==null&&(typeof n.children=="object"&&n.children!==null?gb.Children.forEach(n.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||vw||(vw=!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||bw||(bw=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),n.selected==null||yw||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),yw=!0)}function Gp(){var t=Ou();return t?`
|
||
|
||
Check the render method of \``+t+"`.":""}function Wr(t,n,a,u){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&u&&(t[a].defaultSelected=!0)}else{for(a=""+Ui(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,u&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Lu(t,n){for(t=0;t<Tw.length;t++){var a=Tw[t];if(n[a]!=null){var u=Vi(n[a]);n.multiple&&!u?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,Gp()):!n.multiple&&u&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,Gp())}}n.value===void 0||n.defaultValue===void 0||_w||(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"),_w=!0)}function Iu(t,n){n.value===void 0||n.defaultValue===void 0||Sw||(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",Ou()||"A component"),Sw=!0),n.children!=null&&n.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function $d(t,n,a){if(n!=null&&(n=""+Ui(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Ui(a):""}function Yp(t,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Vi(u)){if(1<u.length)throw Error("<textarea> can only have at most one child.");u=u[0]}a=u}a==null&&(a=""),n=a}a=Ui(n),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u)}function Xp(t,n){return t.serverProps===void 0&&t.serverTail.length===0&&t.children.length===1&&3<t.distanceFromLeaf&&t.distanceFromLeaf>15-n?Xp(t.children[0],n):t}function Ri(t){return" "+" ".repeat(t)}function Ls(t){return"+ "+" ".repeat(t)}function ur(t){return"- "+" ".repeat(t)}function za(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 Is(t,n){return xw.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 cr(t,n,a){var u=120-2*a;if(n===null)return Ls(a)+Is(t,u)+`
|
||
`;if(typeof n=="string"){for(var d=0;d<n.length&&d<t.length&&n.charCodeAt(d)===t.charCodeAt(d);d++);return d>u-8&&10<d&&(t="..."+t.slice(d-8),n="..."+n.slice(d-8)),Ls(a)+Is(t,u)+`
|
||
`+ur(a)+Is(n,u)+`
|
||
`}return Ri(a)+Is(t,u)+`
|
||
`}function Qr(t){return Object.prototype.toString.call(t).replace(/^\[object (.*)\]$/,function(n,a){return a})}function Yo(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(Vi(t))return"[...]";if(t.$$typeof===uo)return(n=K(t.type))?"<"+n+">":"<...>";var a=Qr(t);if(a==="Object"){a="",n-=2;for(var u in t)if(t.hasOwnProperty(u)){var d=JSON.stringify(u);if(d!=='"'+u+'"'&&(u=d),n-=u.length-2,d=Yo(t[u],15>n?n:15),n-=d.length,0>n){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+u+":"+d}return"{"+a+"}"}return a;case"function":return(n=t.displayName||t.name)?"function "+n:"function";default:return String(t)}}function Kr(t,n){return typeof t!="string"||xw.test(t)?"{"+Yo(t,n-2)+"}":t.length>n-2?5>n?'"..."':'"'+t.slice(0,n-5)+'..."':'"'+t+'"'}function Gd(t,n,a){var u=120-a.length-t.length,d=[],m;for(m in n)if(n.hasOwnProperty(m)&&m!=="children"){var S=Kr(n[m],120-a.length-m.length-1);u-=m.length+S.length+2,d.push(m+"="+S)}return d.length===0?a+"<"+t+`>
|
||
`:0<u?a+"<"+t+" "+d.join(" ")+`>
|
||
`:a+"<"+t+`
|
||
`+a+" "+d.join(`
|
||
`+a+" ")+`
|
||
`+a+`>
|
||
`}function tv(t,n,a){var u="",d=ct({},n),m;for(m in t)if(t.hasOwnProperty(m)){delete d[m];var S=120-2*a-m.length-2,C=Yo(t[m],S);n.hasOwnProperty(m)?(S=Yo(n[m],S),u+=Ls(a)+m+": "+C+`
|
||
`,u+=ur(a)+m+": "+S+`
|
||
`):u+=Ls(a)+m+": "+C+`
|
||
`}for(var R in d)d.hasOwnProperty(R)&&(t=Yo(d[R],120-2*a-R.length-2),u+=ur(a)+R+": "+t+`
|
||
`);return u}function dr(t,n,a,u){var d="",m=new Map;for(I in a)a.hasOwnProperty(I)&&m.set(I.toLowerCase(),I);if(m.size===1&&m.has("children"))d+=Gd(t,n,Ri(u));else{for(var S in n)if(n.hasOwnProperty(S)&&S!=="children"){var C=120-2*(u+1)-S.length-1,R=m.get(S.toLowerCase());if(R!==void 0){m.delete(S.toLowerCase());var I=n[S];R=a[R];var ee=Kr(I,C);C=Kr(R,C),typeof I=="object"&&I!==null&&typeof R=="object"&&R!==null&&Qr(I)==="Object"&&Qr(R)==="Object"&&(2<Object.keys(I).length||2<Object.keys(R).length||-1<ee.indexOf("...")||-1<C.indexOf("..."))?d+=Ri(u+1)+S+`={{
|
||
`+tv(I,R,u+2)+Ri(u+1)+`}}
|
||
`:(d+=Ls(u+1)+S+"="+ee+`
|
||
`,d+=ur(u+1)+S+"="+C+`
|
||
`)}else d+=Ri(u+1)+S+"="+Kr(n[S],C)+`
|
||
`}m.forEach(function(ae){if(ae!=="children"){var Q=120-2*(u+1)-ae.length-1;d+=ur(u+1)+ae+"="+Kr(a[ae],Q)+`
|
||
`}}),d=d===""?Ri(u)+"<"+t+`>
|
||
`:Ri(u)+"<"+t+`
|
||
`+d+Ri(u)+`>
|
||
`}return t=a.children,n=n.children,typeof t=="string"||typeof t=="number"||typeof t=="bigint"?(m="",(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(m=""+n),d+=cr(m,""+t,u+1)):(typeof n=="string"||typeof n=="number"||typeof n=="bigint")&&(d=t==null?d+cr(""+n,null,u+1):d+cr(""+n,void 0,u+1)),d}function Xo(t,n){var a=za(t);if(a===null){for(a="",t=t.child;t;)a+=Xo(t,n),t=t.sibling;return a}return Ri(n)+"<"+a+`>
|
||
`}function Yd(t,n){var a=Xp(t,n);if(a!==t&&(t.children.length!==1||t.children[0]!==a))return Ri(n)+`...
|
||
`+Yd(a,n+1);a="";var u=t.fiber._debugInfo;if(u)for(var d=0;d<u.length;d++){var m=u[d].name;typeof m=="string"&&(a+=Ri(n)+"<"+m+`>
|
||
`,n++)}if(u="",d=t.fiber.pendingProps,t.fiber.tag===6)u=cr(d,t.serverProps,n),n++;else if(m=za(t.fiber),m!==null)if(t.serverProps===void 0){u=n;var S=120-2*u-m.length-2,C="";for(I in d)if(d.hasOwnProperty(I)&&I!=="children"){var R=Kr(d[I],15);if(S-=I.length+R.length+2,0>S){C+=" ...";break}C+=" "+I+"="+R}u=Ri(u)+"<"+m+C+`>
|
||
`,n++}else t.serverProps===null?(u=Gd(m,d,Ls(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."):(u=dr(m,d,t.serverProps,n),n++);var I="";for(d=t.fiber.child,m=0;d&&m<t.children.length;)S=t.children[m],S.fiber===d?(I+=Yd(S,n),m++):I+=Xo(d,n),d=d.sibling;for(d&&0<t.children.length&&(I+=Ri(n)+`...
|
||
`),d=t.serverTail,t.serverProps===null&&n--,t=0;t<d.length;t++)m=d[t],I=typeof m=="string"?I+(ur(n)+Is(m,120-2*n)+`
|
||
`):I+Gd(m.type,m.props,ur(n));return a+u+I}function Wo(t){try{return`
|
||
|
||
`+Yd(t,0)}catch{return""}}function Pu(t,n,a){for(var u=n,d=null,m=0;u;)u===t&&(m=0),d={fiber:u,children:d!==null?[d]:[],serverProps:u===n?a:u===t?null:void 0,serverTail:[],distanceFromLeaf:m},m++,u=u.return;return d!==null?Wo(d).replaceAll(/^[+-]/gm,">"):""}function Dn(t,n){var a=ct({},t||Cw),u={tag:n};return Ew.indexOf(n)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),PL.indexOf(n)!==-1&&(a.pTagInButtonScope=null),IL.indexOf(n)!==-1&&n!=="address"&&n!=="div"&&n!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=u,n==="form"&&(a.formTag=u),n==="a"&&(a.aTagInScope=u),n==="button"&&(a.buttonTagInScope=u),n==="nobr"&&(a.nobrTagInScope=u),n==="p"&&(a.pTagInButtonScope=u),n==="li"&&(a.listItemTagAutoclosing=u),(n==="dd"||n==="dt")&&(a.dlItemTagAutoclosing=u),n==="#document"||n==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=u),t!==null||n!=="#document"&&n!=="html"&&n!=="body"?a.implicitRootScope===!0&&(a.implicitRootScope=!1):a.implicitRootScope=!0,a}function Wp(t,n,a){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(a)break;return t==="head"||t==="body"||t==="frameset";case"frameset":return t==="frame";case"#document":if(!a)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 NL.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 a||n===null;case"html":return a&&n==="#document"||n===null;case"body":return a&&(n==="#document"||n==="html")||n===null}return!0}function Nu(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 Va(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 $a(t,n){n=n||Cw;var a=n.current;if(n=(a=Wp(t,a&&a.tag,n.implicitRootScope)?null:a)?null:Nu(t,n),n=a||n,!n)return!0;var u=n.tag;if(n=String(!!a)+"|"+t+"|"+u,Zm[n])return!1;Zm[n]=!0;var d=(n=ts)?Va(n.return,u):null,m=n!==null&&d!==null?Pu(d,n,null):"",S="<"+t+">";return a?(a="",u==="table"&&t==="tr"&&(a+=" 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`,S,u,a,m)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
||
This will cause a hydration error.%s`,S,u,m),n&&(t=n.return,d===null||t===null||d===t&&t._debugOwner===n._debugOwner||He(d,function(){console.error(`<%s> cannot contain a nested %s.
|
||
See this log for the ancestor stack trace.`,u,S)})),!1}function Ps(t,n,a){if(a||Wp("#text",n,!1))return!0;if(a="#text|"+n,Zm[a])return!1;Zm[a]=!0;var u=(a=ts)?Va(a,n):null;return a=a!==null&&u!==null?Pu(u,a,a.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,a):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,a),!1}function Zr(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}function Qp(t){return t.replace(qL,function(n,a){return a.toUpperCase()})}function Bu(t,n,a){var u=n.indexOf("--")===0;u||(-1<n.indexOf("-")?yc.hasOwnProperty(n)&&yc[n]||(yc[n]=!0,console.error("Unsupported style property %s. Did you mean %s?",n,Qp(n.replace(UL,"ms-")))):BL.test(n)?yc.hasOwnProperty(n)&&yc[n]||(yc[n]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",n,n.charAt(0).toUpperCase()+n.slice(1))):!kw.test(a)||Ib.hasOwnProperty(a)&&Ib[a]||(Ib[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,n,a.replace(kw,""))),typeof a=="number"&&(isNaN(a)?Dw||(Dw=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",n)):isFinite(a)||Ow||(Ow=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",n)))),a==null||typeof a=="boolean"||a===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,a):typeof a!="number"||a===0||Rw.has(n)?n==="float"?t.cssFloat=a:(ze(a,n),t[n]=(""+a).trim()):t[n]=a+"px"}function Kp(t,n,a){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,a!=null){if(n){var u={};if(a){for(var d in a)if(a.hasOwnProperty(d)&&!n.hasOwnProperty(d))for(var m=Lb[d]||[d],S=0;S<m.length;S++)u[m[S]]=d}for(var C in n)if(n.hasOwnProperty(C)&&(!a||a[C]!==n[C]))for(d=Lb[C]||[C],m=0;m<d.length;m++)u[d[m]]=C;C={};for(var R in n)for(d=Lb[R]||[R],m=0;m<d.length;m++)C[d[m]]=R;R={};for(var I in u)if(d=u[I],(m=C[I])&&d!==m&&(S=d+","+m,!R[S])){R[S]=!0,S=console;var ee=n[d];S.error.call(S,"%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.",ee==null||typeof ee=="boolean"||ee===""?"Removing":"Updating",d,m)}}for(var ae in a)!a.hasOwnProperty(ae)||n!=null&&n.hasOwnProperty(ae)||(ae.indexOf("--")===0?t.setProperty(ae,""):ae==="float"?t.cssFloat="":t[ae]="");for(var Q in n)I=n[Q],n.hasOwnProperty(Q)&&a[Q]!==I&&Bu(t,Q,I)}else for(u in n)n.hasOwnProperty(u)&&Bu(t,u,n[u])}function Qo(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 Zp(t){return FL.get(t)||t}function Uu(t,n){if(ma.call(bc,n)&&bc[n])return!0;if(HL.test(n)){if(t="aria-"+n.slice(4).toLowerCase(),t=Mw.hasOwnProperty(t)?t:null,t==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",n),bc[n]=!0;if(n!==t)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",n,t),bc[n]=!0}if(jL.test(n)){if(t=n.toLowerCase(),t=Mw.hasOwnProperty(t)?t:null,t==null)return bc[n]=!0,!1;n!==t&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",n,t),bc[n]=!0)}return!0}function Jp(t,n){var a=[],u;for(u in n)Uu(t,u)||a.push(u);n=a.map(function(d){return"`"+d+"`"}).join(", "),a.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t):1<a.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",n,t)}function iv(t,n,a,u){if(ma.call(fn,n)&&fn[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."),fn[n]=!0;if(typeof a=="function"&&(t==="form"&&n==="action"||t==="input"&&n==="formAction"||t==="button"&&n==="formAction"))return!0;if(u!=null){if(t=u.possibleRegistrationNames,u.registrationNameDependencies.hasOwnProperty(n))return!0;if(u=t.hasOwnProperty(d)?t[d]:null,u!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",n,u),fn[n]=!0;if(Iw.test(n))return console.error("Unknown event handler property `%s`. It will be ignored.",n),fn[n]=!0}else if(Iw.test(n))return zL.test(n)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",n),fn[n]=!0;if(VL.test(n)||$L.test(n))return!0;if(d==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),fn[n]=!0;if(d==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),fn[n]=!0;if(d==="is"&&a!==null&&a!==void 0&&typeof a!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof a),fn[n]=!0;if(typeof a=="number"&&isNaN(a))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",n),fn[n]=!0;if(eg.hasOwnProperty(d)){if(d=eg[d],d!==n)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",n,d),fn[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),fn[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 a){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:(a?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()}.',a,n,n,a,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.',a,n,n,a,n,n,n),fn[n]=!0)}case"function":case"symbol":return fn[n]=!0,!1;case"string":if(a==="false"||a==="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}?",a,n,a==="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,a),fn[n]=!0}}return!0}function em(t,n,a){var u=[],d;for(d in n)iv(t,d,n[d],a)||u.push(d);n=u.map(function(m){return"`"+m+"`"}).join(", "),u.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<u.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 Ko(t){return GL.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function qu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function tm(t){var n=$n(t);if(n&&(t=n.stateNode)){var a=t[Ln]||null;e:switch(t=n.stateNode,n.type){case"input":if(Mu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(Ae(n,"name"),a=a.querySelectorAll('input[name="'+vi(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==t&&u.form===t.form){var d=u[Ln]||null;if(!d)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Mu(u,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===t.form&&$o(u)}break e;case"textarea":$d(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Wr(t,!!a.multiple,n,!1)}}}function Zo(t,n,a){if(Pb)return t(n,a);Pb=!0;try{var u=t(n);return u}finally{if(Pb=!1,(_c!==null||Tc!==null)&&(oc(),_c&&(n=_c,t=Tc,Tc=_c=null,tm(n),t)))for(n=0;n<t.length;n++)tm(t[n])}}function Ns(t,n){var a=t.stateNode;if(a===null)return null;var u=a[Ln]||null;if(u===null)return null;a=u[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":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error("Expected `"+n+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}function Xd(){if(tg)return tg;var t,n=Bb,a=n.length,u,d="value"in mo?mo.value:mo.textContent,m=d.length;for(t=0;t<a&&n[t]===d[t];t++);var S=a-t;for(u=1;u<=S&&n[a-u]===d[m-u];u++);return tg=d.slice(t,1<u?1-u:void 0)}function Fu(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 ju(){return!0}function Wd(){return!1}function qi(t){function n(a,u,d,m,S){this._reactName=a,this._targetInst=d,this.type=u,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var C in t)t.hasOwnProperty(C)&&(a=t[C],this[C]=a?a(m):m[C]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ju:Wd,this.isPropagationStopped=Wd,this}return ct(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ju)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ju)},persist:function(){},isPersistent:ju}),n}function nv(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=r6[t])?!!n[t]:!1}function Hu(){return nv}function im(t,n){switch(t){case"keyup":return y6.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==Uw;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}function sv(t,n){switch(t){case"compositionend":return nm(n);case"keypress":return n.which!==Fw?null:(Hw=!0,jw);case"textInput":return t=n.data,t===jw&&Hw?null:t;default:return null}}function rv(t,n){if(Sc)return t==="compositionend"||!jb&&im(t,n)?(t=Xd(),tg=Bb=mo=null,Sc=!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 qw&&n.locale!=="ko"?null:n.data;default:return null}}function sm(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!b6[t.type]:n==="textarea"}function av(t){if(!Lr)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 zu(t,n,a,u){_c?Tc?Tc.push(u):Tc=[u]:_c=u,n=Nm(n,"onChange"),0<n.length&&(a=new ig("onChange","change",null,a,u),t.push({event:a,listeners:n}))}function ov(t){_C(t,0)}function Jo(t){var n=lr(t);if($o(n))return t}function el(t,n){if(t==="change")return n}function rm(){ef&&(ef.detachEvent("onpropertychange",am),tf=ef=null)}function am(t){if(t.propertyName==="value"&&Jo(tf)){var n=[];zu(n,tf,t,qu(t)),Zo(ov,n)}}function lv(t,n,a){t==="focusin"?(rm(),ef=n,tf=a,ef.attachEvent("onpropertychange",am)):t==="focusout"&&rm()}function uv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Jo(tf)}function cv(t,n){if(t==="click")return Jo(n)}function Vu(t,n){if(t==="input"||t==="change")return Jo(n)}function tl(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}function Bs(t,n){if(pn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var d=a[u];if(!ma.call(n,d)||!pn(t[d],n[d]))return!1}return!0}function il(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function On(t,n){var a=il(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=n&&u>=n)return{node:a,offset:n-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=il(a)}}function cs(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?cs(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function nl(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Ru(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=Ru(t.document)}return n}function $u(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 om(t,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;zb||xc==null||xc!==Ru(u)||(u=xc,"selectionStart"in u&&$u(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),nf&&Bs(nf,u)||(nf=u,u=Nm(Hb,"onSelect"),0<u.length&&(n=new ig("onSelect","select",null,n,a),t.push({event:n,listeners:u}),n.target=xc)))}function Jr(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}function ea(t){if(Vb[t])return Vb[t];if(!Ec[t])return t;var n=Ec[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Vw)return Vb[t]=n[a];return t}function Yn(t,n){Ww.set(t,n),Ce(n,[t])}function Fi(t,n){if(typeof t=="object"&&t!==null){var a=Gb.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Vo(n)},Gb.set(t,n),n)}return{value:t,source:n,stack:Vo(n)}}function Ga(){for(var t=Cc,n=Yb=Cc=0;n<t;){var a=ys[n];ys[n++]=null;var u=ys[n];ys[n++]=null;var d=ys[n];ys[n++]=null;var m=ys[n];if(ys[n++]=null,u!==null&&d!==null){var S=u.pending;S===null?d.next=d:(d.next=S.next,S.next=d),u.pending=d}m!==0&&pr(a,d,m)}}function hr(t,n,a,u){ys[Cc++]=t,ys[Cc++]=n,ys[Cc++]=a,ys[Cc++]=u,Yb|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function fr(t,n,a,u){return hr(t,n,a,u),Gu(t)}function Si(t,n){return hr(t,null,null,n),Gu(t)}function pr(t,n,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var d=!1,m=t.return;m!==null;)m.childLanes|=a,u=m.alternate,u!==null&&(u.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&sg||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&n!==null&&(d=31-hn(a),t=m.hiddenUpdates,u=t[d],u===null?t[d]=[n]:u.push(n),n.lane=a|536870912),m):null}function Gu(t){if(Cf>H6)throw Ul=Cf=0,wf=x_=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.");Ul>z6&&(Ul=0,wf=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&&fC(t);for(var n=t,a=n.return;a!==null;)n.alternate===null&&n.flags&4098&&fC(t),n=a,a=n.return;return n.tag===3?n.stateNode:null}function mr(t){if(vs===null)return t;var n=vs(t);return n===void 0?t:n.current}function Yu(t){if(vs===null)return t;var n=vs(t);return n===void 0?t!=null&&typeof t.render=="function"&&(n=mr(t.render),t.render!==n)?(n={$$typeof:$h,render:n},t.displayName!==void 0&&(n.displayName=t.displayName),n):t:n.current}function Xu(t,n){if(vs===null)return!1;var a=t.elementType;n=n.type;var u=!1,d=typeof n=="object"&&n!==null?n.$$typeof:null;switch(t.tag){case 1:typeof n=="function"&&(u=!0);break;case 0:(typeof n=="function"||d===es)&&(u=!0);break;case 11:(d===$h||d===es)&&(u=!0);break;case 14:case 15:(d===Ym||d===es)&&(u=!0);break;default:return!1}return!!(u&&(t=vs(a),t!==void 0&&t===vs(n)))}function lm(t){vs!==null&&typeof WeakSet=="function"&&(wc===null&&(wc=new WeakSet),wc.add(t))}function Qd(t,n,a){var u=t.alternate,d=t.child,m=t.sibling,S=t.tag,C=t.type,R=null;switch(S){case 0:case 15:case 1:R=C;break;case 11:R=C.render}if(vs===null)throw Error("Expected resolveFamily to be set during hot reload.");var I=!1;C=!1,R!==null&&(R=vs(R),R!==void 0&&(a.has(R)?C=!0:n.has(R)&&(S===1?C=!0:I=!0))),wc!==null&&(wc.has(t)||u!==null&&wc.has(u))&&(C=!0),C&&(t._debugNeedsRemount=!0),(C||I)&&(u=Si(t,2),u!==null&&hi(u,t,2)),d===null||C||Qd(d,n,a),m!==null&&Qd(m,n,a)}function dv(t,n,a,u){this.tag=t,this.key=a,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=u,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,Kw||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Ya(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Us(t,n){var a=t.alternate;switch(a===null?(a=w(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a._debugOwner=t._debugOwner,a._debugStack=t._debugStack,a._debugTask=t._debugTask,a._debugHookTypes=t._debugHookTypes,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null,a.actualDuration=-0,a.actualStartTime=-1.1),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a.selfBaseDuration=t.selfBaseDuration,a.treeBaseDuration=t.treeBaseDuration,a._debugInfo=t._debugInfo,a._debugNeedsRemount=t._debugNeedsRemount,a.tag){case 0:case 15:a.type=mr(t.type);break;case 1:a.type=mr(t.type);break;case 11:a.type=Yu(t.type)}return a}function Wu(t,n){t.flags&=65011714;var a=t.alternate;return a===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=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext,_debugThenableState:n._debugThenableState},t.selfBaseDuration=a.selfBaseDuration,t.treeBaseDuration=a.treeBaseDuration),t}function Kd(t,n,a,u,d,m){var S=0,C=t;if(typeof t=="function")Ya(t)&&(S=1),C=mr(C);else if(typeof t=="string")S=J(),S=iL(t,a,S)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Tb:return n=w(31,a,n,d),n.elementType=Tb,n.lanes=m,n;case pc:return gr(a.children,d,m,n);case Gm:S=8,d|=sn,d|=zs;break;case yb:return t=a,u=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=w(12,t,n,u|$i),n.elementType=yb,n.lanes=m,n.stateNode={effectDuration:0,passiveEffectDuration:0},n;case bb:return n=w(13,a,n,d),n.elementType=bb,n.lanes=m,n;case _b:return n=w(19,a,n,d),n.elementType=_b,n.lanes=m,n;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case gL:case kr:S=10;break e;case vb:S=9;break e;case $h:S=11,C=Yu(C);break e;case Ym:S=14;break e;case es:S=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?a="null":Vi(t)?a="array":t!==void 0&&t.$$typeof===uo?(a="<"+(K(t.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,(S=u?pe(u):null)&&(C+=`
|
||
|
||
Check the render method of \``+S+"`."),S=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+C)),C=null}return n=w(S,a,n,d),n.elementType=t,n.type=C,n.lanes=m,n._debugOwner=u,n}function Qu(t,n,a){return n=Kd(t.type,t.key,t.props,t._owner,n,a),n._debugOwner=t._owner,n._debugStack=t._debugStack,n._debugTask=t._debugTask,n}function gr(t,n,a,u){return t=w(7,t,u,n),t.lanes=a,t}function Xa(t,n,a){return t=w(6,t,null,n),t.lanes=a,t}function Zd(t,n,a){return n=w(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function ta(t,n){qs(),Ac[kc++]=ag,Ac[kc++]=rg,rg=t,ag=n}function um(t,n,a){qs(),bs[_s++]=va,bs[_s++]=ba,bs[_s++]=wl,wl=t;var u=va;t=ba;var d=32-hn(u)-1;u&=~(1<<d),a+=1;var m=32-hn(n)+d;if(30<m){var S=d-d%5;m=(u&(1<<S)-1).toString(32),u>>=S,d-=S,va=1<<32-hn(n)+d|a<<d|u,ba=m+t}else va=1<<m|a<<d|u,ba=t}function sl(t){qs(),t.return!==null&&(ta(t,1),um(t,1,0))}function Jd(t){for(;t===rg;)rg=Ac[--kc],Ac[kc]=null,ag=Ac[--kc],Ac[kc]=null;for(;t===wl;)wl=bs[--_s],bs[_s]=null,ba=bs[--_s],bs[_s]=null,va=bs[--_s],bs[_s]=null}function qs(){vt||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function yr(t,n){if(t.return===null){if(Ts===null)Ts={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n};else{if(Ts.fiber!==t)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Ts.distanceFromLeaf>n&&(Ts.distanceFromLeaf=n)}return Ts}var a=yr(t.return,n+1).children;return 0<a.length&&a[a.length-1].fiber===t?(a=a[a.length-1],a.distanceFromLeaf>n&&(a.distanceFromLeaf=n),a):(n={fiber:t,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:n},a.push(n),n)}function eh(t,n){_a||(t=yr(t,0),t.serverProps=null,n!==null&&(n=IC(n),t.serverTail.push(n)))}function ia(t){var n="",a=Ts;throw a!==null&&(Ts=null,n=Wo(a)),al(Fi(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)),Xb}function cm(t){var n=t.stateNode,a=t.type,u=t.memoizedProps;switch(n[nn]=t,n[Ln]=u,Jv(a,u),a){case"dialog":pt("cancel",n),pt("close",n);break;case"iframe":case"object":case"embed":pt("load",n);break;case"video":case"audio":for(a=0;a<Af.length;a++)pt(Af[a],n);break;case"source":pt("error",n);break;case"img":case"image":case"link":pt("error",n),pt("load",n);break;case"details":pt("toggle",n);break;case"input":Ve("input",u),pt("invalid",n),Ft(n,u),Go(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Xr(n);break;case"option":$p(n,u);break;case"select":Ve("select",u),pt("invalid",n),Lu(n,u);break;case"textarea":Ve("textarea",u),pt("invalid",n),Iu(n,u),Yp(n,u.value,u.defaultValue,u.children),Xr(n)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||EC(n.textContent,a)?(u.popover!=null&&(pt("beforetoggle",n),pt("toggle",n)),u.onScroll!=null&&pt("scroll",n),u.onScrollEnd!=null&&pt("scrollend",n),u.onClick!=null&&(n.onclick=Bm),n=!0):n=!1,n||ia(t)}function dm(t){for(mn=t.return;mn;)switch(mn.tag){case 5:case 13:Ir=!1;return;case 27:case 3:Ir=!0;return;default:mn=mn.return}}function Wa(t){if(t!==mn)return!1;if(!vt)return dm(t),vt=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||sb(t.type,t.memoizedProps)),a=!a),a&&ri){for(a=ri;a;){var u=yr(t,0),d=IC(a);u.serverTail.push(d),a=d.type==="Suspense"?NC(a):ms(a.nextSibling)}ia(t)}if(dm(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.");ri=NC(t)}else n===27?(n=ri,lo(t.type)?(t=P_,P_=null,ri=t):ri=n):ri=mn?ms(t.stateNode.nextSibling):null;return!0}function rl(){ri=mn=null,_a=vt=!1}function th(){var t=Al;return t!==null&&(vn===null?vn=t:vn.push.apply(vn,t),Al=null),t}function al(t){Al===null?Al=[t]:Al.push(t)}function ih(){var t=Ts;if(t!==null){Ts=null;for(var n=Wo(t);0<t.children.length;)t=t.children[0];He(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 di(){Dc=og=null,Oc=!1}function ds(t,n,a){le(Wb,n._currentValue,t),n._currentValue=a,le(Qb,n._currentRenderer,t),n._currentRenderer!==void 0&&n._currentRenderer!==null&&n._currentRenderer!==tA&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),n._currentRenderer=tA}function ni(t,n){t._currentValue=Wb.current;var a=Qb.current;de(Qb,n),t._currentRenderer=a,de(Wb,n)}function na(t,n,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===a)break;t=t.return}t!==a&&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 nh(t,n,a,u){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var S=d.child;m=m.firstContext;e:for(;m!==null;){var C=m;m=d;for(var R=0;R<n.length;R++)if(C.context===n[R]){m.lanes|=a,C=m.alternate,C!==null&&(C.lanes|=a),na(m.return,a,t),u||(S=null);break e}m=C.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");S.lanes|=a,m=S.alternate,m!==null&&(m.lanes|=a),na(S,a,t),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===t){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function ol(t,n,a,u){t=null;for(var d=n,m=!1;d!==null;){if(!m){if(d.flags&524288)m=!0;else if(d.flags&262144)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error("Should have a current fiber. This is a bug in React.");if(S=S.memoizedProps,S!==null){var C=d.type;pn(d.pendingProps.value,S.value)||(t!==null?t.push(C):t=[C])}}else if(d===Xm.current){if(S=d.alternate,S===null)throw Error("Should have a current fiber. This is a bug in React.");S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Rf):t=[Rf])}d=d.return}t!==null&&nh(n,t,a,u),n.flags|=262144}function Xn(t){for(t=t.firstContext;t!==null;){if(!pn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function vr(t){og=t,Dc=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return Oc&&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()."),ll(og,t)}function Ku(t,n){return og===null&&vr(t),ll(t,n)}function ll(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Dc===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().");Dc=n,t.dependencies={lanes:0,firstContext:n,_debugThenableState:null},t.flags|=524288}else Dc=Dc.next=n;return a}function sh(){return{controller:new A6,data:new Map,refCount:0}}function sa(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 ul(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&&k6(D6,function(){t.controller.abort()})}function Fs(){var t=kl;return kl=0,t}function cl(t){var n=kl;return kl=t,n}function dl(t){var n=kl;return kl+=t,n}function ra(t){In=Rc(),0>t.actualStartTime&&(t.actualStartTime=In)}function Zu(t){if(0<=In){var n=Rc()-In;t.actualDuration+=n,t.selfBaseDuration=n,In=-1}}function hl(t){if(0<=In){var n=Rc()-In;t.actualDuration+=n,In=-1}}function en(){if(0<=In){var t=Rc()-In;In=-1,kl+=t}}function _t(){In=Rc()}function js(t){for(var n=t.child;n;)t.actualDuration+=n.actualDuration,n=n.sibling}function rh(t,n){if(sf===null){var a=sf=[];Kb=0,Dl=Wv(),Mc={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Kb++,n.then(hm,hm),n}function hm(){if(--Kb===0&&sf!==null){Mc!==null&&(Mc.status="fulfilled");var t=sf;sf=null,Dl=0,Mc=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function hv(t,n){var a=[],u={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(u.status="rejected",u.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),u}function ah(){var t=Ol.current;return t!==null?t:jt.pooledCache}function Ju(t,n){n===null?le(Ol,Ol.current,t):le(Ol,n.pool,t)}function oh(){var t=ah();return t===null?null:{parent:Ei._currentValue,pool:t}}function lh(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function uh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function fl(){}function ch(t,n,a){re.actQueue!==null&&(re.didUsePromise=!0);var u=t.thenables;switch(a=u[a],a===void 0?u.push(n):a!==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(fl,fl),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,dh(t),t;default:if(typeof n.status=="string")n.then(fl,fl);else{if(t=jt,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 m=n;m.status="fulfilled",m.value=d}},function(d){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=d}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,dh(t),t}throw hf=n,fg=!0,df}}function ec(){if(hf===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var t=hf;return hf=null,fg=!1,t}function dh(t){if(t===df||t===hg)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 pl(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hh(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 Rn(t){return{lane:t,tag:aA,payload:null,callback:null,next:null}}function br(t,n,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,e_===u&&!uA){var d=ye(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),uA=!0}return(Et&yn)!==is?(d=u.pending,d===null?n.next=n:(n.next=d.next,d.next=n),u.pending=n,n=Gu(t),pr(t,null,a),n):(hr(t,u,n,a),Gu(t))}function Qa(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,a|=u,n.lanes=a,yi(t,a)}}function ml(t,n){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=S:m=m.next=S,a=a.next}while(a!==null);m===null?d=m=n:m=m.next=n}else d=m=n;a={baseState:u.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}function gl(){if(t_){var t=Mc;if(t!==null)throw t}}function yl(t,n,a,u){t_=!1;var d=t.updateQueue;yo=!1,e_=d.shared;var m=d.firstBaseUpdate,S=d.lastBaseUpdate,C=d.shared.pending;if(C!==null){d.shared.pending=null;var R=C,I=R.next;R.next=null,S===null?m=I:S.next=I,S=R;var ee=t.alternate;ee!==null&&(ee=ee.updateQueue,C=ee.lastBaseUpdate,C!==S&&(C===null?ee.firstBaseUpdate=I:C.next=I,ee.lastBaseUpdate=R))}if(m!==null){var ae=d.baseState;S=0,ee=I=R=null,C=m;do{var Q=C.lane&-536870913,ue=Q!==C.lane;if(ue?(ft&Q)===Q:(u&Q)===Q){Q!==0&&Q===Dl&&(t_=!0),ee!==null&&(ee=ee.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{Q=t;var Fe=C,Je=n,Ht=a;switch(Fe.tag){case oA:if(Fe=Fe.payload,typeof Fe=="function"){Oc=!0;var mt=Fe.call(Ht,ae,Je);if(Q.mode&sn){Pe(!0);try{Fe.call(Ht,ae,Je)}finally{Pe(!1)}}Oc=!1,ae=mt;break e}ae=Fe;break e;case Jb:Q.flags=Q.flags&-65537|128;case aA:if(mt=Fe.payload,typeof mt=="function"){if(Oc=!0,Fe=mt.call(Ht,ae,Je),Q.mode&sn){Pe(!0);try{mt.call(Ht,ae,Je)}finally{Pe(!1)}}Oc=!1}else Fe=mt;if(Fe==null)break e;ae=ct({},ae,Fe);break e;case lA:yo=!0}}Q=C.callback,Q!==null&&(t.flags|=64,ue&&(t.flags|=8192),ue=d.callbacks,ue===null?d.callbacks=[Q]:ue.push(Q))}else ue={lane:Q,tag:C.tag,payload:C.payload,callback:C.callback,next:null},ee===null?(I=ee=ue,R=ae):ee=ee.next=ue,S|=Q;if(C=C.next,C===null){if(C=d.shared.pending,C===null)break;ue=C,C=ue.next,ue.next=null,d.lastBaseUpdate=ue,d.shared.pending=null}}while(1);ee===null&&(R=ae),d.baseState=R,d.firstBaseUpdate=I,d.lastBaseUpdate=ee,m===null&&(d.shared.lanes=0),To|=S,t.lanes=S,t.memoizedState=ae}e_=null}function fh(t,n){if(typeof t!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+t);t.call(n)}function fv(t,n){var a=t.shared.hiddenCallbacks;if(a!==null)for(t.shared.hiddenCallbacks=null,t=0;t<a.length;t++)fh(a[t],n)}function fm(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)fh(a[t],n)}function tc(t,n){var a=Br;le(pg,a,t),le(Lc,n,t),Br=a|n.baseLanes}function ph(t){le(pg,Br,t),le(Lc,Lc.current,t)}function mh(t){Br=pg.current,de(Lc,t),de(pg,t)}function ut(){var t=se;Es===null?Es=[t]:Es.push(t)}function Se(){var t=se;if(Es!==null&&(Sa++,Es[Sa]!==t)){var n=ye(et);if(!cA.has(n)&&(cA.add(n),Es!==null)){for(var a="",u=0;u<=Sa;u++){var d=Es[u],m=u===Sa?t:d;for(d=u+1+". "+d;30>d.length;)d+=" ";d+=m+`
|
||
`,a+=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,a)}}}function Ka(t){t==null||Vi(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.",se,typeof t)}function ic(){var t=ye(et);hA.has(t)||(hA.add(t),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",t))}function Jt(){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 gh(t,n){if(pf)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.",se),!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`,se,"["+n.join(", ")+"]","["+t.join(", ")+"]");for(var a=0;a<n.length&&a<t.length;a++)if(!pn(t[a],n[a]))return!1;return!0}function yh(t,n,a,u,d,m){vo=m,et=n,Es=t!==null?t._debugHookTypes:null,Sa=-1,pf=t!==null&&t.type!==n.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(m=ye(et),i_.has(m)||(i_.add(m),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.",m===null?"An unknown Component":"<"+m+">"))),n.memoizedState=null,n.updateQueue=null,n.lanes=0,re.H=t!==null&&t.memoizedState!==null?s_:Es!==null?fA:n_,Ml=m=(n.mode&sn)!==$t;var S=r_(a,u,d);if(Ml=!1,Pc&&(S=vh(n,a,u,d)),m){Pe(!0);try{S=vh(n,a,u,d)}finally{Pe(!1)}}return pm(t,n),S}function pm(t,n){n._debugHookTypes=Es,n.dependencies===null?Ta!==null&&(n.dependencies={lanes:0,firstContext:null,_debugThenableState:Ta}):n.dependencies._debugThenableState=Ta,re.H=yg;var a=Ut!==null&&Ut.next!==null;if(vo=0,Es=se=_i=Ut=et=null,Sa=-1,t!==null&&(t.flags&65011712)!==(n.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),mg=!1,ff=0,Ta=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");t===null||Ii||(t=t.dependencies,t!==null&&Xn(t)&&(Ii=!0)),fg?(fg=!1,t=!0):t=!1,t&&(n=ye(n)||"Unknown",dA.has(n)||i_.has(n)||(dA.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 vh(t,n,a,u){et=t;var d=0;do{if(Pc&&(Ta=null),ff=0,Pc=!1,d>=R6)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(d+=1,pf=!1,_i=Ut=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}Sa=-1,re.H=pA,m=r_(n,a,u)}while(Pc);return m}function _r(){var t=re.H,n=t.useState()[0];return n=typeof n.then=="function"?Za(n):n,t=t.useState()[0],(Ut!==null?Ut.memoizedState:null)!==t&&(et.flags|=1024),n}function bh(){var t=gg!==0;return gg=0,t}function _h(t,n,a){n.updateQueue=t.updateQueue,n.flags=(n.mode&zs)!==$t?n.flags&-402655237:n.flags&-2053,t.lanes&=~a}function Th(t){if(mg){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}mg=!1}vo=0,Es=_i=Ut=et=null,Sa=-1,se=null,Pc=!1,ff=gg=0,Ta=null}function cn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _i===null?et.memoizedState=_i=t:_i=_i.next=t,_i}function Tt(){if(Ut===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=Ut.next;var n=_i===null?et.memoizedState:_i.next;if(n!==null)_i=n,Ut=t;else{if(t===null)throw et.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.");Ut=t,t={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},_i===null?et.memoizedState=_i=t:_i=_i.next=t}return _i}function vl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Za(t){var n=ff;return ff+=1,Ta===null&&(Ta=lh()),t=ch(Ta,t,n),n=et,(_i===null?n.memoizedState:_i.next)===null&&(n=n.alternate,re.H=n!==null&&n.memoizedState!==null?s_:n_),t}function Wn(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Za(t);if(t.$$typeof===kr)return Vt(t)}throw Error("An unsupported type was passed to use(): "+String(t))}function hs(t){var n=null,a=et.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=et.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=vl(),et.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0||pf)for(a=n.data[n.index]=Array(t),u=0;u<t;u++)a[u]=yL;else a.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.",a.length,t);return n.index++,a}function Qn(t,n){return typeof n=="function"?n(t):n}function Sh(t,n,a){var u=cn();if(a!==void 0){var d=a(n);if(Ml){Pe(!0);try{a(n)}finally{Pe(!1)}}}else d=n;return u.memoizedState=u.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},u.queue=t,t=t.dispatch=cM.bind(null,et,t),[u.memoizedState,t]}function Ja(t){var n=Tt();return xh(n,Ut,t)}function xh(t,n,a){var u=t.queue;if(u===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");u.lastRenderedReducer=a;var d=t.baseQueue,m=u.pending;if(m!==null){if(d!==null){var S=d.next;d.next=m.next,m.next=S}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=m,u.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{n=d.next;var C=S=null,R=null,I=n,ee=!1;do{var ae=I.lane&-536870913;if(ae!==I.lane?(ft&ae)===ae:(vo&ae)===ae){var Q=I.revertLane;if(Q===0)R!==null&&(R=R.next={lane:0,revertLane:0,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),ae===Dl&&(ee=!0);else if((vo&Q)===Q){I=I.next,Q===Dl&&(ee=!0);continue}else ae={lane:0,revertLane:I.revertLane,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},R===null?(C=R=ae,S=m):R=R.next=ae,et.lanes|=Q,To|=Q;ae=I.action,Ml&&a(m,ae),m=I.hasEagerState?I.eagerState:a(m,ae)}else Q={lane:ae,revertLane:I.revertLane,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},R===null?(C=R=Q,S=m):R=R.next=Q,et.lanes|=ae,To|=ae;I=I.next}while(I!==null&&I!==n);if(R===null?S=m:R.next=C,!pn(m,t.memoizedState)&&(Ii=!0,ee&&(a=Mc,a!==null)))throw a;t.memoizedState=m,t.baseState=S,t.baseQueue=R,u.lastRenderedState=m}return d===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function bl(t){var n=Tt(),a=n.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=t;var u=a.dispatch,d=a.pending,m=n.memoizedState;if(d!==null){a.pending=null;var S=d=d.next;do m=t(m,S.action),S=S.next;while(S!==d);pn(m,n.memoizedState)||(Ii=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),a.lastRenderedState=m}return[m,u]}function _l(t,n,a){var u=et,d=cn();if(vt){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var m=a();Ic||m===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Ic=!0)}else{if(m=n(),Ic||(a=n(),pn(m,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ic=!0)),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");ft&124||mm(u,n,m)}return d.memoizedState=m,a={value:m,getSnapshot:n},d.queue=a,ne(aa.bind(null,u,a,t),[t]),u.flags|=2048,O(xs|Ci,L(),Eh.bind(null,u,a,m,n),null),m}function nc(t,n,a){var u=et,d=Tt(),m=vt;if(m){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");a=a()}else if(a=n(),!Ic){var S=n();pn(a,S)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Ic=!0)}(S=!pn((Ut||d).memoizedState,a))&&(d.memoizedState=a,Ii=!0),d=d.queue;var C=aa.bind(null,u,d,t);if(z(2048,Ci,C,[t]),d.getSnapshot!==n||S||_i!==null&&_i.memoizedState.tag&xs){if(u.flags|=2048,O(xs|Ci,L(),Eh.bind(null,u,d,a,n),null),jt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");m||vo&124||mm(u,n,a)}return a}function mm(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=et.updateQueue,n===null?(n=vl(),et.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function Eh(t,n,a,u){n.value=a,n.getSnapshot=u,St(n)&&Tr(t)}function aa(t,n,a){return a(function(){St(n)&&Tr(t)})}function St(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!pn(t,a)}catch{return!0}}function Tr(t){var n=Si(t,2);n!==null&&hi(n,t,2)}function xi(t){var n=cn();if(typeof t=="function"){var a=t;if(t=a(),Ml){Pe(!0);try{a()}finally{Pe(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:t},n}function Mn(t){t=xi(t);var n=t.queue,a=Jx.bind(null,et,n);return n.dispatch=a,[t.memoizedState,a]}function Ch(t){var n=cn();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=vv.bind(null,et,!0,a),a.dispatch=n,[t,n]}function wh(t,n){var a=Tt();return gm(a,Ut,t,n)}function gm(t,n,a,u){return t.baseState=a,xh(t,Ut,typeof u=="function"?u:Qn)}function ym(t,n){var a=Tt();return Ut!==null?gm(a,Ut,t,n):(a.baseState=t,[t,a.queue.dispatch])}function pv(t,n,a,u,d){if(Tm(t))throw Error("Cannot update form state while rendering.");if(t=n.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};re.T!==null?a(!0):m.isTransition=!1,u(m),a=n.pending,a===null?(m.next=n.pending=m,vm(n,m)):(m.next=a.next,n.pending=a.next=m)}}function vm(t,n){var a=n.action,u=n.payload,d=t.state;if(n.isTransition){var m=re.T,S={};re.T=S,re.T._updatedFibers=new Set;try{var C=a(d,u),R=re.S;R!==null&&R(S,C),bm(t,n,C)}catch(I){Ah(t,n,I)}finally{re.T=m,m===null&&S._updatedFibers&&(t=S._updatedFibers.size,S._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{S=a(d,u),bm(t,n,S)}catch(I){Ah(t,n,I)}}function bm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(a.then(function(u){_m(t,n,u)},function(u){return Ah(t,n,u)}),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.")):_m(t,n,a)}function _m(t,n,a){n.status="fulfilled",n.value=a,kh(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,vm(t,a)))}function Ah(t,n,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,kh(n),n=n.next;while(n!==u)}t.action=null}function kh(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(vt){var a=jt.formState;if(a!==null){e:{var u=et;if(vt){if(ri){t:{for(var d=ri,m=Ir;d.nodeType!==8;){if(!m){d=null;break t}if(d=ms(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m===R_||m===hk?d:null}if(d){ri=ms(d.nextSibling),u=d.data===R_;break e}}ia(u)}u=!1}u&&(n=a[0])}}return a=cn(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:n},a.queue=u,a=Jx.bind(null,et,u),u.dispatch=a,u=xi(!1),m=vv.bind(null,et,!1,u.queue),u=cn(),d={state:n,dispatch:null,action:t,pending:null},u.queue=d,a=pv.bind(null,et,d,m,a),d.dispatch=a,u.memoizedState=t,[n,a,!1]}function y(t){var n=Tt();return v(n,Ut,t)}function v(t,n,a){if(n=xh(t,n,h)[0],t=Ja(Qn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Za(n)}catch(S){throw S===df?hg:S}else u=n;n=Tt();var d=n.queue,m=d.dispatch;return a!==n.memoizedState&&(et.flags|=2048,O(xs|Ci,L(),T.bind(null,d,a),null)),[u,m,t]}function T(t,n){t.action=n}function E(t){var n=Tt(),a=Ut;if(a!==null)return v(n,a,t);Tt(),n=n.memoizedState,a=Tt();var u=a.queue.dispatch;return a.memoizedState=t,[n,u,!1]}function O(t,n,a,u){return t={tag:t,create:a,deps:u,inst:n,next:null},n=et.updateQueue,n===null&&(n=vl(),et.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,n.lastEffect=t),t}function L(){return{destroy:void 0,resource:void 0}}function P(t){var n=cn();return t={current:t},n.memoizedState=t}function B(t,n,a,u){var d=cn();u=u===void 0?null:u,et.flags|=t,d.memoizedState=O(xs|n,L(),a,u)}function z(t,n,a,u){var d=Tt();u=u===void 0?null:u;var m=d.memoizedState.inst;Ut!==null&&u!==null&&gh(u,Ut.memoizedState.deps)?d.memoizedState=O(n,m,a,u):(et.flags|=t,d.memoizedState=O(xs|n,m,a,u))}function ne(t,n){(et.mode&zs)!==$t&&(et.mode&Qw)===$t?B(276826112,Ci,t,n):B(8390656,Ci,t,n)}function ke(t,n){var a=4194308;return(et.mode&zs)!==$t&&(a|=134217728),B(a,Gi,t,n)}function he(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():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 $e(t,n,a){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"),a=a!=null?a.concat([t]):null;var u=4194308;(et.mode&zs)!==$t&&(u|=134217728),B(u,Gi,he.bind(null,n,t),a)}function Qe(t,n,a){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"),a=a!=null?a.concat([t]):null,z(4,Gi,he.bind(null,n,t),a)}function si(t,n){return cn().memoizedState=[t,n===void 0?null:n],t}function Mi(t,n){var a=Tt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&gh(n,u[1])?u[0]:(a.memoizedState=[t,n],t)}function fs(t,n){var a=cn();n=n===void 0?null:n;var u=t();if(Ml){Pe(!0);try{t()}finally{Pe(!1)}}return a.memoizedState=[u,n],u}function Sr(t,n){var a=Tt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&gh(n,u[1]))return u[0];if(u=t(),Ml){Pe(!0);try{t()}finally{Pe(!1)}}return a.memoizedState=[u,n],u}function oa(t,n){var a=cn();return io(a,t,n)}function eo(t,n){var a=Tt();return Pt(a,Ut.memoizedState,t,n)}function to(t,n){var a=Tt();return Ut===null?io(a,t,n):Pt(a,Ut.memoizedState,t,n)}function io(t,n,a){return a===void 0||vo&1073741824?t.memoizedState=n:(t.memoizedState=a,t=XE(),et.lanes|=t,To|=t,a)}function Pt(t,n,a,u){return pn(a,n)?a:Lc.current!==null?(t=io(t,a,u),pn(t,n)||(Ii=!0),t):vo&42?(t=XE(),et.lanes|=t,To|=t,n):(Ii=!0,t.memoizedState=a)}function no(t,n,a,u,d){var m=xt.p;xt.p=m!==0&&m<Rr?m:Rr;var S=re.T,C={};re.T=C,vv(t,!1,n,a),C._updatedFibers=new Set;try{var R=d(),I=re.S;if(I!==null&&I(C,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var ee=hv(R,u);Dh(t,n,ee,Jn(t))}else Dh(t,n,u,Jn(t))}catch(ae){Dh(t,n,{then:function(){},status:"rejected",reason:ae},Jn(t))}finally{xt.p=m,re.T=S,S===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 dn(t,n,a,u){if(t.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var d=Wx(t).queue;no(t,d,n,zl,a===null?_:function(){return Qx(t),a(u)})}function Wx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:zl,baseState:zl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:zl},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Qx(t){re.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var n=Wx(t).next.queue;Dh(t,n,{},Jn(t))}function mv(){var t=xi(!1);return t=no.bind(null,et,t.queue,!0,!1),cn().memoizedState=t,[!1,t]}function Kx(){var t=Ja(Qn)[0],n=Tt().memoizedState;return[typeof t=="boolean"?t:Za(t),n]}function Zx(){var t=bl(Qn)[0],n=Tt().memoizedState;return[typeof t=="boolean"?t:Za(t),n]}function Tl(){return Vt(Rf)}function gv(){var t=cn(),n=jt.identifierPrefix;if(vt){var a=ba,u=va;a=(u&~(1<<32-hn(u)-1)).toString(32)+a,n="«"+n+"R"+a,a=gg++,0<a&&(n+="H"+a.toString(32)),n+="»"}else a=O6++,n="«"+n+"r"+a.toString(32)+"»";return t.memoizedState=n}function yv(){return cn().memoizedState=uM.bind(null,et)}function uM(t,n){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var u=Jn(a);t=Rn(u);var d=br(a,t,u);d!==null&&(hi(d,a,u),Qa(d,a,u)),a=sh(),n!=null&&d!==null&&console.error("The seed argument is not enabled outside experimental channels."),t.payload={cache:a};return}a=a.return}}function cM(t,n,a){var u=arguments;typeof u[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()."),u=Jn(t);var d={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};Tm(t)?eE(n,d):(d=fr(t,n,d,u),d!==null&&(hi(d,t,u),tE(d,n,u))),Ie(t,u)}function Jx(t,n,a){var u=arguments;typeof u[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()."),u=Jn(t),Dh(t,n,a,u),Ie(t,u)}function Dh(t,n,a,u){var d={lane:u,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Tm(t))eE(n,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null)){var S=re.H;re.H=$s;try{var C=n.lastRenderedState,R=m(C,a);if(d.hasEagerState=!0,d.eagerState=R,pn(R,C))return hr(t,n,d,0),jt===null&&Ga(),!1}catch{}finally{re.H=S}}if(a=fr(t,n,d,u),a!==null)return hi(a,t,u),tE(a,n,u),!0}return!1}function vv(t,n,a,u){if(re.T===null&&Dl===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."),u={lane:2,revertLane:Wv(),action:u,hasEagerState:!1,eagerState:null,next:null},Tm(t)){if(n)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else n=fr(t,a,u,2),n!==null&&hi(n,t,2);Ie(t,2)}function Tm(t){var n=t.alternate;return t===et||n!==null&&n===et}function eE(t,n){Pc=mg=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function tE(t,n,a){if(a&4194048){var u=n.lanes;u&=t.pendingLanes,a|=u,n.lanes=a,yi(t,a)}}function ji(t){var n=lt;return t!=null&&(lt=n===null?t:n.concat(t)),n}function Sm(t,n,a){for(var u=Object.keys(t.props),d=0;d<u.length;d++){var m=u[d];if(m!=="children"&&m!=="key"){n===null&&(n=Qu(t,a.mode,0),n._debugInfo=lt,n.return=a),He(n,function(S){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S)},m);break}}}function xm(t){var n=mf;return mf+=1,Nc===null&&(Nc=lh()),ch(Nc,t,n)}function Oh(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Em(t,n){throw n.$$typeof===mL?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 Cm(t,n){var a=ye(t)||"Component";DA[a]||(DA[a]=!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,a,n,a))}function wm(t,n){var a=ye(t)||"Component";OA[a]||(OA[a]=!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>`,a,n,a))}function iE(t){function n(F,j){if(t){var V=F.deletions;V===null?(F.deletions=[j],F.flags|=16):V.push(j)}}function a(F,j){if(!t)return null;for(;j!==null;)n(F,j),j=j.sibling;return null}function u(F){for(var j=new Map;F!==null;)F.key!==null?j.set(F.key,F):j.set(F.index,F),F=F.sibling;return j}function d(F,j){return F=Us(F,j),F.index=0,F.sibling=null,F}function m(F,j,V){return F.index=V,t?(V=F.alternate,V!==null?(V=V.index,V<j?(F.flags|=67108866,j):V):(F.flags|=67108866,j)):(F.flags|=1048576,j)}function S(F){return t&&F.alternate===null&&(F.flags|=67108866),F}function C(F,j,V,ce){return j===null||j.tag!==6?(j=Xa(V,F.mode,ce),j.return=F,j._debugOwner=F,j._debugTask=F._debugTask,j._debugInfo=lt,j):(j=d(j,V),j.return=F,j._debugInfo=lt,j)}function R(F,j,V,ce){var De=V.type;return De===pc?(j=ee(F,j,V.props.children,ce,V.key),Sm(V,j,F),j):j!==null&&(j.elementType===De||Xu(j,V)||typeof De=="object"&&De!==null&&De.$$typeof===es&&bo(De)===j.type)?(j=d(j,V.props),Oh(j,V),j.return=F,j._debugOwner=V._owner,j._debugInfo=lt,j):(j=Qu(V,F.mode,ce),Oh(j,V),j.return=F,j._debugInfo=lt,j)}function I(F,j,V,ce){return j===null||j.tag!==4||j.stateNode.containerInfo!==V.containerInfo||j.stateNode.implementation!==V.implementation?(j=Zd(V,F.mode,ce),j.return=F,j._debugInfo=lt,j):(j=d(j,V.children||[]),j.return=F,j._debugInfo=lt,j)}function ee(F,j,V,ce,De){return j===null||j.tag!==7?(j=gr(V,F.mode,ce,De),j.return=F,j._debugOwner=F,j._debugTask=F._debugTask,j._debugInfo=lt,j):(j=d(j,V),j.return=F,j._debugInfo=lt,j)}function ae(F,j,V){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Xa(""+j,F.mode,V),j.return=F,j._debugOwner=F,j._debugTask=F._debugTask,j._debugInfo=lt,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case uo:return V=Qu(j,F.mode,V),Oh(V,j),V.return=F,F=ji(j._debugInfo),V._debugInfo=lt,lt=F,V;case fc:return j=Zd(j,F.mode,V),j.return=F,j._debugInfo=lt,j;case es:var ce=ji(j._debugInfo);return j=bo(j),F=ae(F,j,V),lt=ce,F}if(Vi(j)||oe(j))return V=gr(j,F.mode,V,null),V.return=F,V._debugOwner=F,V._debugTask=F._debugTask,F=ji(j._debugInfo),V._debugInfo=lt,lt=F,V;if(typeof j.then=="function")return ce=ji(j._debugInfo),F=ae(F,xm(j),V),lt=ce,F;if(j.$$typeof===kr)return ae(F,Ku(F,j),V);Em(F,j)}return typeof j=="function"&&Cm(F,j),typeof j=="symbol"&&wm(F,j),null}function Q(F,j,V,ce){var De=j!==null?j.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return De!==null?null:C(F,j,""+V,ce);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case uo:return V.key===De?(De=ji(V._debugInfo),F=R(F,j,V,ce),lt=De,F):null;case fc:return V.key===De?I(F,j,V,ce):null;case es:return De=ji(V._debugInfo),V=bo(V),F=Q(F,j,V,ce),lt=De,F}if(Vi(V)||oe(V))return De!==null?null:(De=ji(V._debugInfo),F=ee(F,j,V,ce,null),lt=De,F);if(typeof V.then=="function")return De=ji(V._debugInfo),F=Q(F,j,xm(V),ce),lt=De,F;if(V.$$typeof===kr)return Q(F,j,Ku(F,V),ce);Em(F,V)}return typeof V=="function"&&Cm(F,V),typeof V=="symbol"&&wm(F,V),null}function ue(F,j,V,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return F=F.get(V)||null,C(j,F,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case uo:return V=F.get(ce.key===null?V:ce.key)||null,F=ji(ce._debugInfo),j=R(j,V,ce,De),lt=F,j;case fc:return F=F.get(ce.key===null?V:ce.key)||null,I(j,F,ce,De);case es:var nt=ji(ce._debugInfo);return ce=bo(ce),j=ue(F,j,V,ce,De),lt=nt,j}if(Vi(ce)||oe(ce))return V=F.get(V)||null,F=ji(ce._debugInfo),j=ee(j,V,ce,De,null),lt=F,j;if(typeof ce.then=="function")return nt=ji(ce._debugInfo),j=ue(F,j,V,xm(ce),De),lt=nt,j;if(ce.$$typeof===kr)return ue(F,j,V,Ku(j,ce),De);Em(j,ce)}return typeof ce=="function"&&Cm(j,ce),typeof ce=="symbol"&&wm(j,ce),null}function Fe(F,j,V,ce){if(typeof V!="object"||V===null)return ce;switch(V.$$typeof){case uo:case fc:f(F,j,V);var De=V.key;if(typeof De!="string")break;if(ce===null){ce=new Set,ce.add(De);break}if(!ce.has(De)){ce.add(De);break}He(j,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.",De)});break;case es:V=bo(V),Fe(F,j,V,ce)}return ce}function Je(F,j,V,ce){for(var De=null,nt=null,je=null,st=j,at=j=0,Gt=null;st!==null&&at<V.length;at++){st.index>at?(Gt=st,st=null):Gt=st.sibling;var pi=Q(F,st,V[at],ce);if(pi===null){st===null&&(st=Gt);break}De=Fe(F,pi,V[at],De),t&&st&&pi.alternate===null&&n(F,st),j=m(pi,j,at),je===null?nt=pi:je.sibling=pi,je=pi,st=Gt}if(at===V.length)return a(F,st),vt&&ta(F,at),nt;if(st===null){for(;at<V.length;at++)st=ae(F,V[at],ce),st!==null&&(De=Fe(F,st,V[at],De),j=m(st,j,at),je===null?nt=st:je.sibling=st,je=st);return vt&&ta(F,at),nt}for(st=u(st);at<V.length;at++)Gt=ue(st,F,at,V[at],ce),Gt!==null&&(De=Fe(F,Gt,V[at],De),t&&Gt.alternate!==null&&st.delete(Gt.key===null?at:Gt.key),j=m(Gt,j,at),je===null?nt=Gt:je.sibling=Gt,je=Gt);return t&&st.forEach(function(ka){return n(F,ka)}),vt&&ta(F,at),nt}function Ht(F,j,V,ce){if(V==null)throw Error("An iterable object provided no iterator.");for(var De=null,nt=null,je=j,st=j=0,at=null,Gt=null,pi=V.next();je!==null&&!pi.done;st++,pi=V.next()){je.index>st?(at=je,je=null):at=je.sibling;var ka=Q(F,je,pi.value,ce);if(ka===null){je===null&&(je=at);break}Gt=Fe(F,ka,pi.value,Gt),t&&je&&ka.alternate===null&&n(F,je),j=m(ka,j,st),nt===null?De=ka:nt.sibling=ka,nt=ka,je=at}if(pi.done)return a(F,je),vt&&ta(F,st),De;if(je===null){for(;!pi.done;st++,pi=V.next())je=ae(F,pi.value,ce),je!==null&&(Gt=Fe(F,je,pi.value,Gt),j=m(je,j,st),nt===null?De=je:nt.sibling=je,nt=je);return vt&&ta(F,st),De}for(je=u(je);!pi.done;st++,pi=V.next())at=ue(je,F,st,pi.value,ce),at!==null&&(Gt=Fe(F,at,pi.value,Gt),t&&at.alternate!==null&&je.delete(at.key===null?st:at.key),j=m(at,j,st),nt===null?De=at:nt.sibling=at,nt=at);return t&&je.forEach(function(nI){return n(F,nI)}),vt&&ta(F,st),De}function mt(F,j,V,ce){if(typeof V=="object"&&V!==null&&V.type===pc&&V.key===null&&(Sm(V,null,F),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case uo:var De=ji(V._debugInfo);e:{for(var nt=V.key;j!==null;){if(j.key===nt){if(nt=V.type,nt===pc){if(j.tag===7){a(F,j.sibling),ce=d(j,V.props.children),ce.return=F,ce._debugOwner=V._owner,ce._debugInfo=lt,Sm(V,ce,F),F=ce;break e}}else if(j.elementType===nt||Xu(j,V)||typeof nt=="object"&&nt!==null&&nt.$$typeof===es&&bo(nt)===j.type){a(F,j.sibling),ce=d(j,V.props),Oh(ce,V),ce.return=F,ce._debugOwner=V._owner,ce._debugInfo=lt,F=ce;break e}a(F,j);break}else n(F,j);j=j.sibling}V.type===pc?(ce=gr(V.props.children,F.mode,ce,V.key),ce.return=F,ce._debugOwner=F,ce._debugTask=F._debugTask,ce._debugInfo=lt,Sm(V,ce,F),F=ce):(ce=Qu(V,F.mode,ce),Oh(ce,V),ce.return=F,ce._debugInfo=lt,F=ce)}return F=S(F),lt=De,F;case fc:e:{for(De=V,V=De.key;j!==null;){if(j.key===V)if(j.tag===4&&j.stateNode.containerInfo===De.containerInfo&&j.stateNode.implementation===De.implementation){a(F,j.sibling),ce=d(j,De.children||[]),ce.return=F,F=ce;break e}else{a(F,j);break}else n(F,j);j=j.sibling}ce=Zd(De,F.mode,ce),ce.return=F,F=ce}return S(F);case es:return De=ji(V._debugInfo),V=bo(V),F=mt(F,j,V,ce),lt=De,F}if(Vi(V))return De=ji(V._debugInfo),F=Je(F,j,V,ce),lt=De,F;if(oe(V)){if(De=ji(V._debugInfo),nt=oe(V),typeof nt!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var je=nt.call(V);return je===V?(F.tag!==0||Object.prototype.toString.call(F.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(je)!=="[object Generator]")&&(AA||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."),AA=!0):V.entries!==nt||o_||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),o_=!0),F=Ht(F,j,je,ce),lt=De,F}if(typeof V.then=="function")return De=ji(V._debugInfo),F=mt(F,j,xm(V),ce),lt=De,F;if(V.$$typeof===kr)return mt(F,j,Ku(F,V),ce);Em(F,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(De=""+V,j!==null&&j.tag===6?(a(F,j.sibling),ce=d(j,De),ce.return=F,F=ce):(a(F,j),ce=Xa(De,F.mode,ce),ce.return=F,ce._debugOwner=F,ce._debugTask=F._debugTask,ce._debugInfo=lt,F=ce),S(F)):(typeof V=="function"&&Cm(F,V),typeof V=="symbol"&&wm(F,V),a(F,j))}return function(F,j,V,ce){var De=lt;lt=null;try{mf=0;var nt=mt(F,j,V,ce);return Nc=null,nt}catch(Gt){if(Gt===df||Gt===hg)throw Gt;var je=w(29,Gt,null,F.mode);je.lanes=ce,je.return=F;var st=je._debugInfo=lt;if(je._debugOwner=F._debugOwner,je._debugTask=F._debugTask,st!=null){for(var at=st.length-1;0<=at;at--)if(typeof st[at].stack=="string"){je._debugOwner=st[at],je._debugTask=st[at].debugTask;break}}return je}finally{lt=De}}}function so(t){var n=t.alternate;le(wi,wi.current&Uc,t),le(Cs,t,t),Nr===null&&(n===null||Lc.current!==null||n.memoizedState!==null)&&(Nr=t)}function nE(t){if(t.tag===22){if(le(wi,wi.current,t),le(Cs,t,t),Nr===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(Nr=t)}}else ro(t)}function ro(t){le(wi,wi.current,t),le(Cs,Cs.current,t)}function la(t){de(Cs,t),Nr===t&&(Nr=null),de(wi,t)}function Am(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data===Ca||ab(a)))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 bv(t){if(t!==null&&typeof t!="function"){var n=String(t);HA.has(n)||(HA.add(n),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",t))}}function _v(t,n,a,u){var d=t.memoizedState,m=a(u,d);if(t.mode&sn){Pe(!0);try{m=a(u,d)}finally{Pe(!1)}}m===void 0&&(n=K(n)||"Component",UA.has(n)||(UA.add(n),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))),d=m==null?d:ct({},d,m),t.memoizedState=d,t.lanes===0&&(t.updateQueue.baseState=d)}function sE(t,n,a,u,d,m,S){var C=t.stateNode;if(typeof C.shouldComponentUpdate=="function"){if(a=C.shouldComponentUpdate(u,m,S),t.mode&sn){Pe(!0);try{a=C.shouldComponentUpdate(u,m,S)}finally{Pe(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",K(n)||"Component"),a}return n.prototype&&n.prototype.isPureReactComponent?!Bs(a,u)||!Bs(d,m):!0}function rE(t,n,a,u){var d=n.state;typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==d&&(t=ye(t)||"Component",LA.has(t)||(LA.add(t),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",t)),l_.enqueueReplaceState(n,n.state,null))}function Sl(t,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(t=t.defaultProps){a===n&&(a=ct({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function aE(t){u_(t),console.warn(`%s
|
||
|
||
%s
|
||
`,qc?"An error occurred in the <"+qc+"> 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 oE(t){var n=qc?"The above error occurred in the <"+qc+"> component.":"The above error occurred in one of your React components.",a="React will try to recreate this component tree from scratch using the error boundary you provided, "+((c_||"Anonymous")+".");if(typeof t=="object"&&t!==null&&typeof t.environmentName=="string"){var u=t.environmentName;t=[`%o
|
||
|
||
%s
|
||
|
||
%s
|
||
`,t,n,a].slice(0),typeof t[0]=="string"?t.splice(0,1,_k+t[0],Tk,Ng+u+Ng,Sk):t.splice(0,0,_k,Tk,Ng+u+Ng,Sk),t.unshift(console),u=tI.apply(console.error,t),u()}else console.error(`%o
|
||
|
||
%s
|
||
|
||
%s
|
||
`,t,n,a)}function lE(t){u_(t)}function km(t,n){try{qc=n.source?ye(n.source):null,c_=null;var a=n.value;if(re.actQueue!==null)re.thrownErrors.push(a);else{var u=t.onUncaughtError;u(a,{componentStack:n.stack})}}catch(d){setTimeout(function(){throw d})}}function uE(t,n,a){try{qc=a.source?ye(a.source):null,c_=ye(n);var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Tv(t,n,a){return a=Rn(a),a.tag=Jb,a.payload={element:null},a.callback=function(){He(n.source,km,t,n)},a}function Sv(t){return t=Rn(t),t.tag=Jb,t}function xv(t,n,a,u){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=u.value;t.payload=function(){return d(m)},t.callback=function(){lm(a),He(u.source,uE,n,a,u)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){lm(a),He(u.source,uE,n,a,u),typeof d!="function"&&(xo===null?xo=new Set([this]):xo.add(this)),M6(this,u),typeof d=="function"||!(a.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.",ye(a)||"Unknown")})}function dM(t,n,a,u,d){if(a.flags|=32768,Hs&&Bh(t,d),u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&ol(n,a,d,!0),vt&&(_a=!0),a=Cs.current,a!==null){switch(a.tag){case 13:return Nr===null?Hv():a.alternate===null&&ai===Ea&&(ai=p_),a.flags&=-257,a.flags|=65536,a.lanes=d,u===Zb?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),$v(t,u,d)),!1;case 22:return a.flags|=65536,u===Zb?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),$v(t,u,d)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return $v(t,u,d),Hv(),!1}if(vt)return _a=!0,n=Cs.current,n!==null?(!(n.flags&65536)&&(n.flags|=256),n.flags|=65536,n.lanes=d,u!==Xb&&al(Fi(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:u}),a))):(u!==Xb&&al(Fi(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:u}),a)),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,u=Fi(u,a),d=Tv(t.stateNode,u,d),ml(t,d),ai!==Ll&&(ai=zc)),!1;var m=Fi(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:u}),a);if(xf===null?xf=[m]:xf.push(m),ai!==Ll&&(ai=zc),n===null)return!0;u=Fi(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Tv(a.stateNode,u,t),ml(a,t),!1;case 1:if(n=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(xo===null||!xo.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Sv(d),xv(d,t,a,u),ml(a,d),!1}a=a.return}while(a!==null);return!1}function Hi(t,n,a,u){n.child=t===null?RA(n,null,a,u):Bc(n,t.child,a,u)}function cE(t,n,a,u,d){a=a.render;var m=n.ref;if("ref"in u){var S={};for(var C in u)C!=="ref"&&(S[C]=u[C])}else S=u;return vr(n),ie(n),u=yh(t,n,a,S,m,d),C=bh(),Te(),t!==null&&!Ii?(_h(t,n,d),ua(t,n,d)):(vt&&C&&sl(n),n.flags|=1,Hi(t,n,u,d),n.child)}function dE(t,n,a,u,d){if(t===null){var m=a.type;return typeof m=="function"&&!Ya(m)&&m.defaultProps===void 0&&a.compare===null?(a=mr(m),n.tag=15,n.type=a,Cv(n,m),hE(t,n,a,u,d)):(t=Kd(a.type,null,u,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(m=t.child,!Rv(t,d)){var S=m.memoizedProps;if(a=a.compare,a=a!==null?a:Bs,a(S,u)&&t.ref===n.ref)return ua(t,n,d)}return n.flags|=1,t=Us(m,u),t.ref=n.ref,t.return=n,n.child=t}function hE(t,n,a,u,d){if(t!==null){var m=t.memoizedProps;if(Bs(m,u)&&t.ref===n.ref&&n.type===t.type)if(Ii=!1,n.pendingProps=u=m,Rv(t,d))t.flags&131072&&(Ii=!0);else return n.lanes=t.lanes,ua(t,n,d)}return Ev(t,n,a,u,d)}function fE(t,n,a){var u=n.pendingProps,d=u.children,m=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if(n.flags&128){if(u=m!==null?m.baseLanes|a:a,t!==null){for(d=n.child=t.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;n.childLanes=m&~u}else n.childLanes=0,n.child=null;return pE(t,n,u,a)}if(a&536870912)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ju(n,m!==null?m.cachePool:null),m!==null?tc(n,m):ph(n),nE(n);else return n.lanes=n.childLanes=536870912,pE(t,n,m!==null?m.baseLanes|a:a,a)}else m!==null?(Ju(n,m.cachePool),tc(n,m),ro(n),n.memoizedState=null):(t!==null&&Ju(n,null),ph(n),ro(n));return Hi(t,n,d,a),n.child}function pE(t,n,a,u){var d=ah();return d=d===null?null:{parent:Ei._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},t!==null&&Ju(n,null),ph(n),nE(n),t!==null&&ol(t,n,u,!0),null}function Dm(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Ev(t,n,a,u,d){if(a.prototype&&typeof a.prototype.render=="function"){var m=K(a)||"Unknown";VA[m]||(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.",m,m),VA[m]=!0)}return n.mode&sn&&Vs.recordLegacyContextWarning(n,null),t===null&&(Cv(n,n.type),a.contextTypes&&(m=K(a)||"Unknown",GA[m]||(GA[m]=!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)",m)))),vr(n),ie(n),a=yh(t,n,a,u,void 0,d),u=bh(),Te(),t!==null&&!Ii?(_h(t,n,d),ua(t,n,d)):(vt&&u&&sl(n),n.flags|=1,Hi(t,n,a,d),n.child)}function mE(t,n,a,u,d,m){return vr(n),ie(n),Sa=-1,pf=t!==null&&t.type!==n.type,n.updateQueue=null,a=vh(n,u,a,d),pm(t,n),u=bh(),Te(),t!==null&&!Ii?(_h(t,n,m),ua(t,n,m)):(vt&&u&&sl(n),n.flags|=1,Hi(t,n,a,m),n.child)}function gE(t,n,a,u,d){switch(c(n)){case!1:var m=n.stateNode,S=new n.type(n.memoizedProps,m.context).state;m.updater.enqueueSetState(m,S,null);break;case!0:n.flags|=128,n.flags|=65536,m=Error("Simulated error coming from DevTools");var C=d&-d;if(n.lanes|=C,S=jt,S===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");C=Sv(C),xv(C,S,n,Fi(m,n)),ml(n,C)}if(vr(n),n.stateNode===null){if(S=go,m=a.contextType,"contextType"in a&&m!==null&&(m===void 0||m.$$typeof!==kr)&&!jA.has(a)&&(jA.add(a),C=m===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 m!="object"?" However, it is set to a "+typeof m+".":m.$$typeof===vb?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(m).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",K(a)||"Component",C)),typeof m=="object"&&m!==null&&(S=Vt(m)),m=new a(u,S),n.mode&sn){Pe(!0);try{m=new a(u,S)}finally{Pe(!1)}}if(S=n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=l_,n.stateNode=m,m._reactInternals=n,m._reactInternalInstance=MA,typeof a.getDerivedStateFromProps=="function"&&S===null&&(S=K(a)||"Component",IA.has(S)||(IA.add(S),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.",S,m.state===null?"null":"undefined",S))),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"){var R=C=S=null;if(typeof m.componentWillMount=="function"&&m.componentWillMount.__suppressDeprecationWarning!==!0?S="componentWillMount":typeof m.UNSAFE_componentWillMount=="function"&&(S="UNSAFE_componentWillMount"),typeof m.componentWillReceiveProps=="function"&&m.componentWillReceiveProps.__suppressDeprecationWarning!==!0?C="componentWillReceiveProps":typeof m.UNSAFE_componentWillReceiveProps=="function"&&(C="UNSAFE_componentWillReceiveProps"),typeof m.componentWillUpdate=="function"&&m.componentWillUpdate.__suppressDeprecationWarning!==!0?R="componentWillUpdate":typeof m.UNSAFE_componentWillUpdate=="function"&&(R="UNSAFE_componentWillUpdate"),S!==null||C!==null||R!==null){m=K(a)||"Component";var I=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";NA.has(m)||(NA.add(m),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`,m,I,S!==null?`
|
||
`+S:"",C!==null?`
|
||
`+C:"",R!==null?`
|
||
`+R:""))}}m=n.stateNode,S=K(a)||"Component",m.render||(a.prototype&&typeof a.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",S):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",S)),!m.getInitialState||m.getInitialState.isReactClassApproved||m.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?",S),m.getDefaultProps&&!m.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.",S),m.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",S),a.childContextTypes&&!FA.has(a)&&(FA.add(a),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",S)),a.contextTypes&&!qA.has(a)&&(qA.add(a),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)",S)),typeof m.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.",S),a.prototype&&a.prototype.isPureReactComponent&&typeof m.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.",K(a)||"A pure component"),typeof m.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",S),typeof m.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().",S),typeof m.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",S),typeof m.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",S),C=m.props!==u,m.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.",S),m.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.",S,S),typeof m.getSnapshotBeforeUpdate!="function"||typeof m.componentDidUpdate=="function"||PA.has(a)||(PA.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",K(a))),typeof m.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",S),typeof m.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",S),typeof a.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",S),(C=m.state)&&(typeof C!="object"||Vi(C))&&console.error("%s.state: must be set to an object or null",S),typeof m.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",S),m=n.stateNode,m.props=u,m.state=n.memoizedState,m.refs={},pl(n),S=a.contextType,m.context=typeof S=="object"&&S!==null?Vt(S):go,m.state===u&&(S=K(a)||"Component",BA.has(S)||(BA.add(S),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.",S))),n.mode&sn&&Vs.recordLegacyContextWarning(n,m),Vs.recordUnsafeLifecycleWarnings(n,m),m.state=n.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(_v(n,a,S,u),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",ye(n)||"Component"),l_.enqueueReplaceState(m,m.state,null)),yl(n,u,m,d),gl(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&zs)!==$t&&(n.flags|=134217728),m=!0}else if(t===null){m=n.stateNode;var ee=n.memoizedProps;C=Sl(a,ee),m.props=C;var ae=m.context;R=a.contextType,S=go,typeof R=="object"&&R!==null&&(S=Vt(R)),I=a.getDerivedStateFromProps,R=typeof I=="function"||typeof m.getSnapshotBeforeUpdate=="function",ee=n.pendingProps!==ee,R||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(ee||ae!==S)&&rE(n,m,u,S),yo=!1;var Q=n.memoizedState;m.state=Q,yl(n,u,m,d),gl(),ae=n.memoizedState,ee||Q!==ae||yo?(typeof I=="function"&&(_v(n,a,I,u),ae=n.memoizedState),(C=yo||sE(n,a,C,u,Q,ae,S))?(R||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&zs)!==$t&&(n.flags|=134217728)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&zs)!==$t&&(n.flags|=134217728),n.memoizedProps=u,n.memoizedState=ae),m.props=u,m.state=ae,m.context=S,m=C):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),(n.mode&zs)!==$t&&(n.flags|=134217728),m=!1)}else{m=n.stateNode,hh(t,n),S=n.memoizedProps,R=Sl(a,S),m.props=R,I=n.pendingProps,Q=m.context,ae=a.contextType,C=go,typeof ae=="object"&&ae!==null&&(C=Vt(ae)),ee=a.getDerivedStateFromProps,(ae=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==I||Q!==C)&&rE(n,m,u,C),yo=!1,Q=n.memoizedState,m.state=Q,yl(n,u,m,d),gl();var ue=n.memoizedState;S!==I||Q!==ue||yo||t!==null&&t.dependencies!==null&&Xn(t.dependencies)?(typeof ee=="function"&&(_v(n,a,ee,u),ue=n.memoizedState),(R=yo||sE(n,a,R,u,Q,ue,C)||t!==null&&t.dependencies!==null&&Xn(t.dependencies))?(ae||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(u,ue,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(u,ue,C)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=ue),m.props=u,m.state=ue,m.context=C,m=R):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&Q===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&Q===t.memoizedState||(n.flags|=1024),m=!1)}if(C=m,Dm(t,n),S=(n.flags&128)!==0,C||S){if(C=n.stateNode,Gn(n),S&&typeof a.getDerivedStateFromError!="function")a=null,In=-1;else{if(ie(n),a=yA(C),n.mode&sn){Pe(!0);try{yA(C)}finally{Pe(!1)}}Te()}n.flags|=1,t!==null&&S?(n.child=Bc(n,t.child,null,d),n.child=Bc(n,null,a,d)):Hi(t,n,a,d),n.memoizedState=C.state,t=n.child}else t=ua(t,n,d);return d=n.stateNode,m&&d.props!==u&&(Fc||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",ye(n)||"a component"),Fc=!0),t}function yE(t,n,a,u){return rl(),n.flags|=256,Hi(t,n,a,u),n.child}function Cv(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=K(n)||"Unknown",YA[t]||(console.error("%s: Function components do not support getDerivedStateFromProps.",t),YA[t]=!0)),typeof n.contextType=="object"&&n.contextType!==null&&(n=K(n)||"Unknown",$A[n]||(console.error("%s: Function components do not support contextType.",n),$A[n]=!0))}function wv(t){return{baseLanes:t,cachePool:oh()}}function Av(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=ss),t}function vE(t,n,a){var u,d=n.pendingProps;l(n)&&(n.flags|=128);var m=!1,S=(n.flags&128)!==0;if((u=S)||(u=t!==null&&t.memoizedState===null?!1:(wi.current&gf)!==0),u&&(m=!0,n.flags&=-129),u=(n.flags&32)!==0,n.flags&=-33,t===null){if(vt){if(m?so(n):ro(n),vt){var C=ri,R;if(!(R=!C)){e:{var I=C;for(R=Ir;I.nodeType!==8;){if(!R){R=null;break e}if(I=ms(I.nextSibling),I===null){R=null;break e}}R=I}R!==null?(qs(),n.memoizedState={dehydrated:R,treeContext:wl!==null?{id:va,overflow:ba}:null,retryLane:536870912,hydrationErrors:null},I=w(18,null,null,$t),I.stateNode=R,I.return=n,n.child=I,mn=n,ri=null,R=!0):R=!1,R=!R}R&&(eh(n,C),ia(n))}if(C=n.memoizedState,C!==null&&(C=C.dehydrated,C!==null))return ab(C)?n.lanes=32:n.lanes=536870912,null;la(n)}return C=d.children,d=d.fallback,m?(ro(n),m=n.mode,C=Om({mode:"hidden",children:C},m),d=gr(d,m,a,null),C.return=n,d.return=n,C.sibling=d,n.child=C,m=n.child,m.memoizedState=wv(a),m.childLanes=Av(t,u,a),n.memoizedState=h_,d):(so(n),kv(n,C))}var ee=t.memoizedState;if(ee!==null&&(C=ee.dehydrated,C!==null)){if(S)n.flags&256?(so(n),n.flags&=-257,n=Dv(t,n,a)):n.memoizedState!==null?(ro(n),n.child=t.child,n.flags|=128,n=null):(ro(n),m=d.fallback,C=n.mode,d=Om({mode:"visible",children:d.children},C),m=gr(m,C,a,null),m.flags|=2,d.return=n,m.return=n,d.sibling=m,n.child=d,Bc(n,t.child,null,a),d=n.child,d.memoizedState=wv(a),d.childLanes=Av(t,u,a),n.memoizedState=h_,n=m);else if(so(n),vt&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),ab(C)){if(u=C.nextSibling&&C.nextSibling.dataset,u){R=u.dgst;var ae=u.msg;I=u.stck;var Q=u.cstck}C=ae,u=R,d=I,R=m=Q,m=Error(C||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),m.stack=d||"",m.digest=u,u=R===void 0?null:R,d={value:m,source:null,stack:u},typeof u=="string"&&Gb.set(m,d),al(d),n=Dv(t,n,a)}else if(Ii||ol(t,n,a,!1),u=(a&t.childLanes)!==0,Ii||u){if(u=jt,u!==null&&(d=a&-a,d=d&42?1:Vn(d),d=d&(u.suspendedLanes|a)?0:d,d!==0&&d!==ee.retryLane))throw ee.retryLane=d,Si(t,d),hi(u,t,d),zA;C.data===Ca||Hv(),n=Dv(t,n,a)}else C.data===Ca?(n.flags|=192,n.child=t.child,n=null):(t=ee.treeContext,ri=ms(C.nextSibling),mn=n,vt=!0,Al=null,_a=!1,Ts=null,Ir=!1,t!==null&&(qs(),bs[_s++]=va,bs[_s++]=ba,bs[_s++]=wl,va=t.id,ba=t.overflow,wl=n),n=kv(n,d.children),n.flags|=4096);return n}return m?(ro(n),m=d.fallback,C=n.mode,R=t.child,I=R.sibling,d=Us(R,{mode:"hidden",children:d.children}),d.subtreeFlags=R.subtreeFlags&65011712,I!==null?m=Us(I,m):(m=gr(m,C,a,null),m.flags|=2),m.return=n,d.return=n,d.sibling=m,n.child=d,d=m,m=n.child,C=t.child.memoizedState,C===null?C=wv(a):(R=C.cachePool,R!==null?(I=Ei._currentValue,R=R.parent!==I?{parent:I,pool:I}:R):R=oh(),C={baseLanes:C.baseLanes|a,cachePool:R}),m.memoizedState=C,m.childLanes=Av(t,u,a),n.memoizedState=h_,d):(so(n),a=t.child,t=a.sibling,a=Us(a,{mode:"visible",children:d.children}),a.return=n,a.sibling=null,t!==null&&(u=n.deletions,u===null?(n.deletions=[t],n.flags|=16):u.push(t)),n.child=a,n.memoizedState=null,a)}function kv(t,n){return n=Om({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Om(t,n){return t=w(22,t,null,n),t.lanes=0,t.stateNode={_visibility:sg,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Dv(t,n,a){return Bc(n,t.child,null,a),t=kv(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function bE(t,n,a){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),na(t.return,n,a)}function _E(t,n){var a=Vi(t);return t=!a&&typeof oe(t)=="function",a||t?(a=a?"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>",a,n,a),!1):!0}function Ov(t,n,a,u,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:d}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=u,m.tail=a,m.tailMode=d)}function TE(t,n,a){var u=n.pendingProps,d=u.revealOrder,m=u.tail;if(u=u.children,d!==void 0&&d!=="forwards"&&d!=="backwards"&&d!=="together"&&!XA[d])if(XA[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);m===void 0||d_[m]||(m!=="collapsed"&&m!=="hidden"?(d_[m]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',m)):d!=="forwards"&&d!=="backwards"&&(d_[m]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',m)));e:if((d==="forwards"||d==="backwards")&&u!==void 0&&u!==null&&u!==!1)if(Vi(u)){for(var S=0;S<u.length;S++)if(!_E(u[S],S))break e}else if(S=oe(u),typeof S=="function"){if(S=S.call(u))for(var C=S.next(),R=0;!C.done;C=S.next()){if(!_E(C.value,R))break e;R++}}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(Hi(t,n,u,a),u=wi.current,u&gf)u=u&Uc|gf,n.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bE(t,a,n);else if(t.tag===19)bE(t,a,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}u&=Uc}switch(le(wi,u,n),d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Am(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),Ov(n,!1,d,a,m);break;case"backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Am(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}Ov(n,!0,a,null,m);break;case"together":Ov(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ua(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),In=-1,To|=n.lanes,!(a&n.childLanes))if(t!==null){if(ol(t,n,a,!1),(a&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,a=Us(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Us(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function Rv(t,n){return t.lanes&n?!0:(t=t.dependencies,!!(t!==null&&Xn(t)))}function hM(t,n,a){switch(n.tag){case 3:fe(n,n.stateNode.containerInfo),ds(n,Ei,t.memoizedState.cache),rl();break;case 27:case 5:ve(n);break;case 4:fe(n,n.stateNode.containerInfo);break;case 10:ds(n,n.type,n.memoizedProps.value);break;case 12:a&n.childLanes&&(n.flags|=4),n.flags|=2048;var u=n.stateNode;u.effectDuration=-0,u.passiveEffectDuration=-0;break;case 13:if(u=n.memoizedState,u!==null)return u.dehydrated!==null?(so(n),n.flags|=128,null):a&n.child.childLanes?vE(t,n,a):(so(n),t=ua(t,n,a),t!==null?t.sibling:null);so(n);break;case 19:var d=(t.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(ol(t,n,a,!1),u=(a&n.childLanes)!==0),d){if(u)return TE(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),le(wi,wi.current,n),u)break;return null;case 22:case 23:return n.lanes=0,fE(t,n,a);case 24:ds(n,Ei,t.memoizedState.cache)}return ua(t,n,a)}function Mv(t,n,a){if(n._debugNeedsRemount&&t!==null){a=Kd(n.type,n.key,n.pendingProps,n._debugOwner||null,n.mode,n.lanes),a._debugStack=n._debugStack,a._debugTask=n._debugTask;var u=n.return;if(u===null)throw Error("Cannot swap the root fiber.");if(t.alternate=null,n.alternate=null,a.index=n.index,a.sibling=n.sibling,a.return=n.return,a.ref=n.ref,a._debugInfo=n._debugInfo,n===u.child)u.child=a;else{var d=u.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=a}return n=u.deletions,n===null?(u.deletions=[t],u.flags|=16):n.push(t),a.flags|=2,a}if(t!==null)if(t.memoizedProps!==n.pendingProps||n.type!==t.type)Ii=!0;else{if(!Rv(t,a)&&!(n.flags&128))return Ii=!1,hM(t,n,a);Ii=!!(t.flags&131072)}else Ii=!1,(u=vt)&&(qs(),u=(n.flags&1048576)!==0),u&&(u=n.index,qs(),um(n,ag,u));switch(n.lanes=0,n.tag){case 16:e:if(u=n.pendingProps,t=bo(n.elementType),n.type=t,typeof t=="function")Ya(t)?(u=Sl(t,u),n.tag=1,n.type=t=mr(t),n=gE(null,n,t,u,a)):(n.tag=0,Cv(n,t),n.type=t=mr(t),n=Ev(null,n,t,u,a));else{if(t!=null){if(d=t.$$typeof,d===$h){n.tag=11,n.type=t=Yu(t),n=cE(null,n,t,u,a);break e}else if(d===Ym){n.tag=14,n=dE(null,n,t,u,a);break e}}throw n="",t!==null&&typeof t=="object"&&t.$$typeof===es&&(n=" Did you wrap a component in React.lazy() more than once?"),t=K(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 Ev(t,n,n.type,n.pendingProps,a);case 1:return u=n.type,d=Sl(u,n.pendingProps),gE(t,n,u,d,a);case 3:e:{if(fe(n,n.stateNode.containerInfo),t===null)throw Error("Should have a current fiber. This is a bug in React.");u=n.pendingProps;var m=n.memoizedState;d=m.element,hh(t,n),yl(n,u,null,a);var S=n.memoizedState;if(u=S.cache,ds(n,Ei,u),u!==m.cache&&nh(n,[Ei],a,!0),gl(),u=S.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:S.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=yE(t,n,u,a);break e}else if(u!==d){d=Fi(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),n),al(d),n=yE(t,n,u,a);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(ri=ms(t.firstChild),mn=n,vt=!0,Al=null,_a=!1,Ts=null,Ir=!0,t=RA(n,null,u,a),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(rl(),u===d){n=ua(t,n,a);break e}Hi(t,n,u,a)}n=n.child}return n;case 26:return Dm(t,n),t===null?(t=FC(n.type,null,n.pendingProps,null))?n.memoizedState=t:vt||(t=n.type,a=n.pendingProps,u=Z(ho.current),u=Um(u).createElement(t),u[nn]=n,u[Ln]=a,zi(u,t,a),Y(u),n.stateNode=u):n.memoizedState=FC(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ve(n),t===null&&vt&&(u=Z(ho.current),d=J(),u=n.stateNode=UC(n.type,n.pendingProps,u,d,!1),_a||(d=DC(u,n.type,n.pendingProps,d),d!==null&&(yr(n,0).serverProps=d)),mn=n,Ir=!0,d=ri,lo(n.type)?(P_=d,ri=ms(u.firstChild)):ri=d),Hi(t,n,n.pendingProps.children,a),Dm(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&vt&&(m=J(),u=$a(n.type,m.ancestorInfo),d=ri,(S=!d)||(S=WM(d,n.type,n.pendingProps,Ir),S!==null?(n.stateNode=S,_a||(m=DC(S,n.type,n.pendingProps,m),m!==null&&(yr(n,0).serverProps=m)),mn=n,ri=ms(S.firstChild),Ir=!1,m=!0):m=!1,S=!m),S&&(u&&eh(n,d),ia(n))),ve(n),d=n.type,m=n.pendingProps,S=t!==null?t.memoizedProps:null,u=m.children,sb(d,m)?u=null:S!==null&&sb(d,S)&&(n.flags|=32),n.memoizedState!==null&&(d=yh(t,n,_r,null,null,a),Rf._currentValue=d),Dm(t,n),Hi(t,n,u,a),n.child;case 6:return t===null&&vt&&(t=n.pendingProps,a=J(),u=a.ancestorInfo.current,t=u!=null?Ps(t,u.tag,a.ancestorInfo.implicitRootScope):!0,a=ri,(u=!a)||(u=QM(a,n.pendingProps,Ir),u!==null?(n.stateNode=u,mn=n,ri=null,u=!0):u=!1,u=!u),u&&(t&&eh(n,a),ia(n))),null;case 13:return vE(t,n,a);case 4:return fe(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=Bc(n,null,u,a):Hi(t,n,u,a),n.child;case 11:return cE(t,n,n.type,n.pendingProps,a);case 7:return Hi(t,n,n.pendingProps,a),n.child;case 8:return Hi(t,n,n.pendingProps.children,a),n.child;case 12:return n.flags|=4,n.flags|=2048,u=n.stateNode,u.effectDuration=-0,u.passiveEffectDuration=-0,Hi(t,n,n.pendingProps.children,a),n.child;case 10:return u=n.type,d=n.pendingProps,m=d.value,"value"in d||WA||(WA=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),ds(n,u,m),Hi(t,n,d.children,a),n.child;case 9:return d=n.type._context,u=n.pendingProps.children,typeof u!="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."),vr(n),d=Vt(d),ie(n),u=r_(u,d,void 0),Te(),n.flags|=1,Hi(t,n,u,a),n.child;case 14:return dE(t,n,n.type,n.pendingProps,a);case 15:return hE(t,n,n.type,n.pendingProps,a);case 19:return TE(t,n,a);case 31:return u=n.pendingProps,a=n.mode,u={mode:u.mode,children:u.children},t===null?(t=Om(u,a),t.ref=n.ref,n.child=t,t.return=n,n=t):(t=Us(t.child,u),t.ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return fE(t,n,a);case 24:return vr(n),u=Vt(Ei),t===null?(d=ah(),d===null&&(d=jt,m=sh(),d.pooledCache=m,sa(m),m!==null&&(d.pooledCacheLanes|=a),d=m),n.memoizedState={parent:u,cache:d},pl(n),ds(n,Ei,d)):(t.lanes&a&&(hh(t,n),yl(n,null,null,a),gl()),d=t.memoizedState,m=n.memoizedState,d.parent!==u?(d={parent:u,cache:u},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),ds(n,Ei,u)):(u=m.cache,ds(n,Ei,u),u!==d.cache&&nh(n,[Ei],a,!0))),Hi(t,n,n.pendingProps.children,a),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 ca(t){t.flags|=4}function SE(t,n){if(n.type!=="stylesheet"||(n.state.loading&ws)!==Hl)t.flags&=-16777217;else if(t.flags|=16777216,!$C(n)){if(n=Cs.current,n!==null&&((ft&4194048)===ft?Nr!==null:(ft&62914560)!==ft&&!(ft&536870912)||n!==Nr))throw hf=Zb,rA;t.flags|=8192}}function Rm(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?gi():536870912,t.lanes|=n,Nl|=n)}function Rh(t,n){if(!vt)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function Wt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(n)if((t.mode&$i)!==$t){for(var d=t.selfBaseDuration,m=t.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,d+=m.treeBaseDuration,m=m.sibling;t.treeBaseDuration=d}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags&65011712,u|=d.flags&65011712,d.return=t,d=d.sibling;else if((t.mode&$i)!==$t){d=t.actualDuration,m=t.selfBaseDuration;for(var S=t.child;S!==null;)a|=S.lanes|S.childLanes,u|=S.subtreeFlags,u|=S.flags,d+=S.actualDuration,m+=S.treeBaseDuration,S=S.sibling;t.actualDuration=d,t.treeBaseDuration=m}else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,u|=d.subtreeFlags,u|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=u,t.childLanes=a,n}function fM(t,n,a){var u=n.pendingProps;switch(Jd(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(n),null;case 1:return Wt(n),null;case 3:return a=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),ni(Ei,n),Ee(n),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Wa(n)?(ih(),ca(n)):t===null||t.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,th())),Wt(n),null;case 26:return a=n.memoizedState,t===null?(ca(n),a!==null?(Wt(n),SE(n,a)):(Wt(n),n.flags&=-16777217)):a?a!==t.memoizedState?(ca(n),Wt(n),SE(n,a)):(Wt(n),n.flags&=-16777217):(t.memoizedProps!==u&&ca(n),Wt(n),n.flags&=-16777217),null;case 27:ge(n),a=Z(ho.current);var d=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==u&&ca(n);else{if(!u){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 Wt(n),null}t=J(),Wa(n)?cm(n):(t=UC(d,u,a,t,!0),n.stateNode=t,ca(n))}return Wt(n),null;case 5:if(ge(n),a=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&ca(n);else{if(!u){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 Wt(n),null}if(d=J(),Wa(n))cm(n);else{switch(t=Z(ho.current),$a(a,d.ancestorInfo),d=d.context,t=Um(t),d){case Wc:t=t.createElementNS(vc,a);break;case Lg:t=t.createElementNS(Jm,a);break;default:switch(a){case"svg":t=t.createElementNS(vc,a);break;case"math":t=t.createElementNS(Jm,a);break;case"script":t=t.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?t.createElement("select",{is:u.is}):t.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?t.createElement(a,{is:u.is}):t.createElement(a),a.indexOf("-")===-1&&(a!==a.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",a),Object.prototype.toString.call(t)!=="[object HTMLUnknownElement]"||ma.call(pk,a)||(pk[a]=!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.",a)))}}t[nn]=n,t[Ln]=u;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(zi(t,a,u),a){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&ca(n)}}return Wt(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&ca(n);else{if(typeof u!="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=Z(ho.current),a=J(),Wa(n)){t=n.stateNode,a=n.memoizedProps,d=!_a,u=null;var m=mn;if(m!==null)switch(m.tag){case 3:d&&(d=PC(t,a,u),d!==null&&(yr(n,0).serverProps=d));break;case 27:case 5:u=m.memoizedProps,d&&(d=PC(t,a,u),d!==null&&(yr(n,0).serverProps=d))}t[nn]=n,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||EC(t.nodeValue,a)),t||ia(n)}else d=a.ancestorInfo.current,d!=null&&Ps(u,d.tag,a.ancestorInfo.implicitRootScope),t=Um(t).createTextNode(u),t[nn]=n,n.stateNode=t}return Wt(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Wa(n),u!==null&&u.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[nn]=n,Wt(n),(n.mode&$i)!==$t&&u!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration))}else ih(),rl(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4,Wt(n),(n.mode&$i)!==$t&&u!==null&&(d=n.child,d!==null&&(n.treeBaseDuration-=d.treeBaseDuration));d=!1}else d=th(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(la(n),n):(la(n),null)}return la(n),n.flags&128?(n.lanes=a,(n.mode&$i)!==$t&&js(n),n):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=n.child,d=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(d=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==d&&(u.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Rm(n,n.updateQueue),Wt(n),(n.mode&$i)!==$t&&a&&(t=n.child,t!==null&&(n.treeBaseDuration-=t.treeBaseDuration)),null);case 4:return Ee(n),t===null&&Kv(n.stateNode.containerInfo),Wt(n),null;case 10:return ni(n.type,n),Wt(n),null;case 19:if(de(wi,n),d=n.memoizedState,d===null)return Wt(n),null;if(u=(n.flags&128)!==0,m=d.rendering,m===null)if(u)Rh(d,!1);else{if(ai!==Ea||t!==null&&t.flags&128)for(t=n.child;t!==null;){if(m=Am(t),m!==null){for(n.flags|=128,Rh(d,!1),t=m.updateQueue,n.updateQueue=t,Rm(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Wu(a,t),a=a.sibling;return le(wi,wi.current&Uc|gf,n),n.child}t=t.sibling}d.tail!==null&&Dr()>Tg&&(n.flags|=128,u=!0,Rh(d,!1),n.lanes=4194304)}else{if(!u)if(t=Am(m),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Rm(n,t),Rh(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!vt)return Wt(n),null}else 2*Dr()-d.renderingStartTime>Tg&&a!==536870912&&(n.flags|=128,u=!0,Rh(d,!1),n.lanes=4194304);d.isBackwards?(m.sibling=n.child,n.child=m):(t=d.last,t!==null?t.sibling=m:n.child=m,d.last=m)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Dr(),t.sibling=null,a=wi.current,a=u?a&Uc|gf:a&Uc,le(wi,a,n),t):(Wt(n),null);case 22:case 23:return la(n),mh(n),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?a&536870912&&!(n.flags&128)&&(Wt(n),n.subtreeFlags&6&&(n.flags|=8192)):Wt(n),a=n.updateQueue,a!==null&&Rm(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),t!==null&&de(Ol,n),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ni(Ei,n),Wt(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 pM(t,n){switch(Jd(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&$i)!==$t&&js(n),n):null;case 3:return ni(Ei,n),Ee(n),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return ge(n),null;case 13:if(la(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.");rl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&$i)!==$t&&js(n),n):null;case 19:return de(wi,n),null;case 4:return Ee(n),null;case 10:return ni(n.type,n),null;case 22:case 23:return la(n),mh(n),t!==null&&de(Ol,n),t=n.flags,t&65536?(n.flags=t&-65537|128,(n.mode&$i)!==$t&&js(n),n):null;case 24:return ni(Ei,n),null;case 25:return null;default:return null}}function xE(t,n){switch(Jd(n),n.tag){case 3:ni(Ei,n),Ee(n);break;case 26:case 27:case 5:ge(n);break;case 4:Ee(n);break;case 13:la(n);break;case 19:de(wi,n);break;case 10:ni(n.type,n);break;case 22:case 23:la(n),mh(n),t!==null&&de(Ol,n);break;case 24:ni(Ei,n)}}function xr(t){return(t.mode&$i)!==$t}function EE(t,n){xr(t)?(_t(),Mh(n,t),en()):Mh(n,t)}function Lv(t,n,a){xr(t)?(_t(),sc(a,t,n),en()):sc(a,t,n)}function Mh(t,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var d=u.next;a=d;do{if((a.tag&t)===t&&((t&Ci)!==Ss?Ne!==null&&typeof Ne.markComponentPassiveEffectMountStarted=="function"&&Ne.markComponentPassiveEffectMountStarted(n):(t&Gi)!==Ss&&Ne!==null&&typeof Ne.markComponentLayoutEffectMountStarted=="function"&&Ne.markComponentLayoutEffectMountStarted(n),u=void 0,(t&gn)!==Ss&&(Yc=!0),u=He(n,L6,a),(t&gn)!==Ss&&(Yc=!1),(t&Ci)!==Ss?Ne!==null&&typeof Ne.markComponentPassiveEffectMountStopped=="function"&&Ne.markComponentPassiveEffectMountStopped():(t&Gi)!==Ss&&Ne!==null&&typeof Ne.markComponentLayoutEffectMountStopped=="function"&&Ne.markComponentLayoutEffectMountStopped(),u!==void 0&&typeof u!="function")){var m=void 0;m=a.tag&Gi?"useLayoutEffect":a.tag&gn?"useInsertionEffect":"useEffect";var S=void 0;S=u===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof u.then=="function"?`
|
||
|
||
It looks like you wrote `+m+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
||
|
||
`+m+`(() => {
|
||
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: "+u,He(n,function(C,R){console.error("%s must not return anything besides a function, which is used for clean-up.%s",C,R)},m,S)}a=a.next}while(a!==d)}}catch(C){Nt(n,n.return,C)}}function sc(t,n,a){try{var u=n.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var m=d.next;u=m;do{if((u.tag&t)===t){var S=u.inst,C=S.destroy;C!==void 0&&(S.destroy=void 0,(t&Ci)!==Ss?Ne!==null&&typeof Ne.markComponentPassiveEffectUnmountStarted=="function"&&Ne.markComponentPassiveEffectUnmountStarted(n):(t&Gi)!==Ss&&Ne!==null&&typeof Ne.markComponentLayoutEffectUnmountStarted=="function"&&Ne.markComponentLayoutEffectUnmountStarted(n),(t&gn)!==Ss&&(Yc=!0),d=n,He(d,I6,d,a,C),(t&gn)!==Ss&&(Yc=!1),(t&Ci)!==Ss?Ne!==null&&typeof Ne.markComponentPassiveEffectUnmountStopped=="function"&&Ne.markComponentPassiveEffectUnmountStopped():(t&Gi)!==Ss&&Ne!==null&&typeof Ne.markComponentLayoutEffectUnmountStopped=="function"&&Ne.markComponentLayoutEffectUnmountStopped())}u=u.next}while(u!==m)}}catch(R){Nt(n,n.return,R)}}function CE(t,n){xr(t)?(_t(),Mh(n,t),en()):Mh(n,t)}function Iv(t,n,a){xr(t)?(_t(),sc(a,t,n),en()):sc(a,t,n)}function wE(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;t.type.defaultProps||"ref"in t.memoizedProps||Fc||(a.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.",ye(t)||"instance"),a.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.",ye(t)||"instance"));try{He(t,fm,n,a)}catch(u){Nt(t,t.return,u)}}}function mM(t,n,a){return t.getSnapshotBeforeUpdate(n,a)}function gM(t,n){var a=n.memoizedProps,u=n.memoizedState;n=t.stateNode,t.type.defaultProps||"ref"in t.memoizedProps||Fc||(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.",ye(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.",ye(t)||"instance"));try{var d=Sl(t.type,a,t.elementType===t.type),m=He(t,mM,n,d,u);a=QA,m!==void 0||a.has(t.type)||(a.add(t.type),He(t,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",ye(t))})),n.__reactInternalSnapshotBeforeUpdate=m}catch(S){Nt(t,t.return,S)}}function AE(t,n,a){a.props=Sl(t.type,t.memoizedProps),a.state=t.memoizedState,xr(t)?(_t(),He(t,xA,t,n,a),en()):He(t,xA,t,n,a)}function yM(t){var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}if(typeof n=="function")if(xr(t))try{_t(),t.refCleanup=n(a)}finally{en()}else t.refCleanup=n(a);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().",ye(t)),n.current=a}}function Lh(t,n){try{He(t,yM,t)}catch(a){Nt(t,n,a)}}function Er(t,n){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{if(xr(t))try{_t(),He(t,u)}finally{en(t)}else He(t,u)}catch(d){Nt(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{if(xr(t))try{_t(),He(t,a,null)}finally{en(t)}else He(t,a,null)}catch(d){Nt(t,n,d)}else a.current=null}function kE(t,n,a,u){var d=t.memoizedProps,m=d.id,S=d.onCommit;d=d.onRender,n=n===null?"mount":"update",ug&&(n="nested-update"),typeof d=="function"&&d(m,n,t.actualDuration,t.treeBaseDuration,t.actualStartTime,a),typeof S=="function"&&S(t.memoizedProps.id,n,u,a)}function vM(t,n,a,u){var d=t.memoizedProps;t=d.id,d=d.onPostCommit,n=n===null?"mount":"update",ug&&(n="nested-update"),typeof d=="function"&&d(t,n,u,a)}function DE(t){var n=t.type,a=t.memoizedProps,u=t.stateNode;try{He(t,FM,u,n,a,t)}catch(d){Nt(t,t.return,d)}}function Pv(t,n,a){try{He(t,jM,t.stateNode,t.type,a,n,t)}catch(u){Nt(t,t.return,u)}}function OE(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&lo(t.type)||t.tag===4}function Nv(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||OE(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&&lo(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 Bv(t,n,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Bm));else if(u!==4&&(u===27&&lo(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(Bv(t,n,a),t=t.sibling;t!==null;)Bv(t,n,a),t=t.sibling}function Mm(t,n,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(u!==4&&(u===27&&lo(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Mm(t,n,a),t=t.sibling;t!==null;)Mm(t,n,a),t=t.sibling}function bM(t){for(var n,a=t.return;a!==null;){if(OE(a)){n=a;break}a=a.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,a=Nv(t),Mm(t,a,n);break;case 5:a=n.stateNode,n.flags&32&&(MC(a),n.flags&=-33),n=Nv(t),Mm(t,n,a);break;case 3:case 4:n=n.stateNode.containerInfo,a=Nv(t),Bv(t,a,n);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function RE(t){var n=t.stateNode,a=t.memoizedProps;try{He(t,eL,t.type,a,n,t)}catch(u){Nt(t,t.return,u)}}function _M(t,n){if(t=t.containerInfo,M_=Bg,t=nl(t),$u(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var d=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var S=0,C=-1,R=-1,I=0,ee=0,ae=t,Q=null;t:for(;;){for(var ue;ae!==a||d!==0&&ae.nodeType!==3||(C=S+d),ae!==m||u!==0&&ae.nodeType!==3||(R=S+u),ae.nodeType===3&&(S+=ae.nodeValue.length),(ue=ae.firstChild)!==null;)Q=ae,ae=ue;for(;;){if(ae===t)break t;if(Q===a&&++I===d&&(C=S),Q===m&&++ee===u&&(R=S),(ue=ae.nextSibling)!==null)break;ae=Q,Q=ae.parentNode}ae=ue}a=C===-1||R===-1?null:{start:C,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(L_={focusedElem:t,selectionRange:a},Bg=!1,Pi=n;Pi!==null;)if(n=Pi,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,Pi=t;else for(;Pi!==null;){switch(t=n=Pi,a=t.alternate,d=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:d&1024&&a!==null&&gM(t,a);break;case 3:if(d&1024){if(t=t.stateNode.containerInfo,a=t.nodeType,a===9)rb(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":rb(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,Pi=t;break}Pi=n.return}}function ME(t,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:ha(t,a),u&4&&EE(a,Gi|xs);break;case 1:if(ha(t,a),u&4)if(t=a.stateNode,n===null)a.type.defaultProps||"ref"in a.memoizedProps||Fc||(t.props!==a.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.",ye(a)||"instance"),t.state!==a.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.",ye(a)||"instance")),xr(a)?(_t(),He(a,a_,a,t),en()):He(a,a_,a,t);else{var d=Sl(a.type,n.memoizedProps);n=n.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||Fc||(t.props!==a.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.",ye(a)||"instance"),t.state!==a.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.",ye(a)||"instance")),xr(a)?(_t(),He(a,_A,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate),en()):He(a,_A,a,t,d,n,t.__reactInternalSnapshotBeforeUpdate)}u&64&&wE(a),u&512&&Lh(a,a.return);break;case 3:if(n=Fs(),ha(t,a),u&64&&(u=a.updateQueue,u!==null)){if(d=null,a.child!==null)switch(a.child.tag){case 27:case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}try{He(a,fm,u,d)}catch(S){Nt(a,a.return,S)}}t.effectDuration+=cl(n);break;case 27:n===null&&u&4&&RE(a);case 26:case 5:ha(t,a),n===null&&u&4&&DE(a),u&512&&Lh(a,a.return);break;case 12:if(u&4){u=Fs(),ha(t,a),t=a.stateNode,t.effectDuration+=dl(u);try{He(a,kE,a,n,lg,t.effectDuration)}catch(S){Nt(a,a.return,S)}}else ha(t,a);break;case 13:ha(t,a),u&4&&PE(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=DM.bind(null,a),KM(t,a))));break;case 22:if(u=a.memoizedState!==null||xa,!u){n=n!==null&&n.memoizedState!==null||fi,d=xa;var m=fi;xa=u,(fi=n)&&!m?fa(t,a,(a.subtreeFlags&8772)!==0):ha(t,a),xa=d,fi=m}break;case 30:break;default:ha(t,a)}}function LE(t){var n=t.alternate;n!==null&&(t.alternate=null,LE(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&or(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 da(t,n,a){for(a=a.child;a!==null;)IE(t,n,a),a=a.sibling}function IE(t,n,a){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(gc,a)}catch(m){Or||(Or=!0,console.error("React instrumentation encountered an error: %s",m))}switch(a.tag){case 26:fi||Er(a,n),da(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:fi||Er(a,n);var u=Ti,d=Pn;lo(a.type)&&(Ti=a.stateNode,Pn=!1),da(t,n,a),He(a,Fh,a.stateNode),Ti=u,Pn=d;break;case 5:fi||Er(a,n);case 6:if(u=Ti,d=Pn,Ti=null,da(t,n,a),Ti=u,Pn=d,Ti!==null)if(Pn)try{He(a,VM,Ti,a.stateNode)}catch(m){Nt(a,n,m)}else try{He(a,zM,Ti,a.stateNode)}catch(m){Nt(a,n,m)}break;case 18:Ti!==null&&(Pn?(t=Ti,LC(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Vh(t)):LC(Ti,a.stateNode));break;case 4:u=Ti,d=Pn,Ti=a.stateNode.containerInfo,Pn=!0,da(t,n,a),Ti=u,Pn=d;break;case 0:case 11:case 14:case 15:fi||sc(gn,a,n),fi||Lv(a,n,Gi),da(t,n,a);break;case 1:fi||(Er(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&AE(a,n,u)),da(t,n,a);break;case 21:da(t,n,a);break;case 22:fi=(u=fi)||a.memoizedState!==null,da(t,n,a),fi=u;break;default:da(t,n,a)}}function PE(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{He(n,JM,t)}catch(a){Nt(n,n.return,a)}}function TM(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new KA),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new KA),n;default:throw Error("Unexpected Suspense handler tag ("+t.tag+"). This is a bug in React.")}}function Uv(t,n){var a=TM(t);n.forEach(function(u){var d=OM.bind(null,t,u);if(!a.has(u)){if(a.add(u),Hs)if(jc!==null&&Hc!==null)Bh(Hc,jc);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");u.then(d,d)}})}function Kn(t,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var d=t,m=n,S=a[u],C=m;e:for(;C!==null;){switch(C.tag){case 27:if(lo(C.type)){Ti=C.stateNode,Pn=!1;break e}break;case 5:Ti=C.stateNode,Pn=!1;break e;case 3:case 4:Ti=C.stateNode.containerInfo,Pn=!0;break e}C=C.return}if(Ti===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");IE(d,m,S),Ti=null,Pn=!1,d=S,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)NE(n,t),n=n.sibling}function NE(t,n){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Kn(n,t),Zn(t),u&4&&(sc(gn|xs,t,t.return),Mh(gn|xs,t),Lv(t,t.return,Gi|xs));break;case 1:Kn(n,t),Zn(t),u&512&&(fi||a===null||Er(a,a.return)),u&64&&xa&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var d=Gs;if(Kn(n,t),Zn(t),u&512&&(fi||a===null||Er(a,a.return)),u&4)if(n=a!==null?a.memoizedState:null,u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,n=d.ownerDocument||d;t:switch(u){case"title":d=n.getElementsByTagName("title")[0],(!d||d[Yh]||d[nn]||d.namespaceURI===vc||d.hasAttribute("itemprop"))&&(d=n.createElement(u),n.head.insertBefore(d,n.querySelector("head > title"))),zi(d,u,a),d[nn]=t,Y(d),u=d;break e;case"link":var m=zC("link","href",n).get(u+(a.href||""));if(m){for(var S=0;S<m.length;S++)if(d=m[S],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(S,1);break t}}d=n.createElement(u),zi(d,u,a),n.head.appendChild(d);break;case"meta":if(m=zC("meta","content",n).get(u+(a.content||""))){for(S=0;S<m.length;S++)if(d=m[S],Ae(a.content,"content"),d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(S,1);break t}}d=n.createElement(u),zi(d,u,a),n.head.appendChild(d);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+u+'". This is a bug in React.')}d[nn]=t,Y(d),u=d}t.stateNode=u}else VC(d,t.type,t.stateNode);else t.stateNode=HC(d,u,t.memoizedProps);else n!==u?(n===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):n.count--,u===null?VC(d,t.type,t.stateNode):HC(d,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Pv(t,t.memoizedProps,a.memoizedProps);break;case 27:Kn(n,t),Zn(t),u&512&&(fi||a===null||Er(a,a.return)),a!==null&&u&4&&Pv(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Kn(n,t),Zn(t),u&512&&(fi||a===null||Er(a,a.return)),t.flags&32){n=t.stateNode;try{He(t,MC,n)}catch(ee){Nt(t,t.return,ee)}}u&4&&t.stateNode!=null&&(n=t.memoizedProps,Pv(t,n,a!==null?a.memoizedProps:n)),u&1024&&(f_=!0,t.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Kn(n,t),Zn(t),u&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.");u=t.memoizedProps,a=a!==null?a.memoizedProps:u,n=t.stateNode;try{He(t,HM,n,a,u)}catch(ee){Nt(t,t.return,ee)}}break;case 3:if(d=Fs(),Ig=null,m=Gs,Gs=qm(n.containerInfo),Kn(n,t),Gs=m,Zn(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{He(t,ZM,n.containerInfo)}catch(ee){Nt(t,t.return,ee)}f_&&(f_=!1,BE(t)),n.effectDuration+=cl(d);break;case 4:u=Gs,Gs=qm(t.stateNode.containerInfo),Kn(n,t),Zn(t),Gs=u;break;case 12:u=Fs(),Kn(n,t),Zn(t),t.stateNode.effectDuration+=dl(u);break;case 13:Kn(n,t),Zn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(b_=Dr()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Uv(t,u)));break;case 22:d=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,R=xa,I=fi;if(xa=R||d,fi=I||C,Kn(n,t),fi=I,xa=R,Zn(t),u&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&~sg:n._visibility|sg,d&&(a===null||C||xa||fi||xl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{m=C.stateNode,d?He(C,$M,m):He(C,YM,C.stateNode,C.memoizedProps)}catch(ee){Nt(C,C.return,ee)}}}else if(n.tag===6){if(a===null){C=n;try{S=C.stateNode,d?He(C,GM,S):He(C,XM,S,C.memoizedProps)}catch(ee){Nt(C,C.return,ee)}}}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;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,Uv(t,a))));break;case 19:Kn(n,t),Zn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Uv(t,u)));break;case 30:break;case 21:break;default:Kn(n,t),Zn(t)}}function Zn(t){var n=t.flags;if(n&2){try{He(t,bM,t)}catch(a){Nt(t,t.return,a)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function BE(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;BE(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function ha(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)ME(t,n.alternate,n),n=n.sibling}function UE(t){switch(t.tag){case 0:case 11:case 14:case 15:Lv(t,t.return,Gi),xl(t);break;case 1:Er(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&AE(t,t.return,n),xl(t);break;case 27:He(t,Fh,t.stateNode);case 26:case 5:Er(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}}function xl(t){for(t=t.child;t!==null;)UE(t),t=t.sibling}function qE(t,n,a,u){var d=a.flags;switch(a.tag){case 0:case 11:case 15:fa(t,a,u),EE(a,Gi);break;case 1:if(fa(t,a,u),n=a.stateNode,typeof n.componentDidMount=="function"&&He(a,a_,a,n),n=a.updateQueue,n!==null){t=a.stateNode;try{He(a,fv,n,t)}catch(m){Nt(a,a.return,m)}}u&&d&64&&wE(a),Lh(a,a.return);break;case 27:RE(a);case 26:case 5:fa(t,a,u),u&&n===null&&d&4&&DE(a),Lh(a,a.return);break;case 12:if(u&&d&4){d=Fs(),fa(t,a,u),u=a.stateNode,u.effectDuration+=dl(d);try{He(a,kE,a,n,lg,u.effectDuration)}catch(m){Nt(a,a.return,m)}}else fa(t,a,u);break;case 13:fa(t,a,u),u&&d&4&&PE(t,a);break;case 22:a.memoizedState===null&&fa(t,a,u),Lh(a,a.return);break;case 30:break;default:fa(t,a,u)}}function fa(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;)qE(t,n.alternate,n,a),n=n.sibling}function qv(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&sa(t),a!=null&&ul(a))}function Fv(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(sa(n),t!=null&&ul(t))}function Cr(t,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)FE(t,n,a,u),n=n.sibling}function FE(t,n,a,u){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Cr(t,n,a,u),d&2048&&CE(n,Ci|xs);break;case 1:Cr(t,n,a,u);break;case 3:var m=Fs();Cr(t,n,a,u),d&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(sa(n),a!=null&&ul(a))),t.passiveEffectDuration+=cl(m);break;case 12:if(d&2048){d=Fs(),Cr(t,n,a,u),t=n.stateNode,t.passiveEffectDuration+=dl(d);try{He(n,vM,n,n.alternate,lg,t.passiveEffectDuration)}catch(C){Nt(n,n.return,C)}}else Cr(t,n,a,u);break;case 13:Cr(t,n,a,u);break;case 23:break;case 22:m=n.stateNode;var S=n.alternate;n.memoizedState!==null?m._visibility&ya?Cr(t,n,a,u):Ih(t,n):m._visibility&ya?Cr(t,n,a,u):(m._visibility|=ya,rc(t,n,a,u,(n.subtreeFlags&10256)!==0)),d&2048&&qv(S,n);break;case 24:Cr(t,n,a,u),d&2048&&Fv(n.alternate,n);break;default:Cr(t,n,a,u)}}function rc(t,n,a,u,d){for(d=d&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;)jE(t,n,a,u,d),n=n.sibling}function jE(t,n,a,u,d){var m=n.flags;switch(n.tag){case 0:case 11:case 15:rc(t,n,a,u,d),CE(n,Ci);break;case 23:break;case 22:var S=n.stateNode;n.memoizedState!==null?S._visibility&ya?rc(t,n,a,u,d):Ih(t,n):(S._visibility|=ya,rc(t,n,a,u,d)),d&&m&2048&&qv(n.alternate,n);break;case 24:rc(t,n,a,u,d),d&&m&2048&&Fv(n.alternate,n);break;default:rc(t,n,a,u,d)}}function Ih(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,u=n,d=u.flags;switch(u.tag){case 22:Ih(a,u),d&2048&&qv(u.alternate,u);break;case 24:Ih(a,u),d&2048&&Fv(u.alternate,u);break;default:Ih(a,u)}n=n.sibling}}function ac(t){if(t.subtreeFlags&yf)for(t=t.child;t!==null;)HE(t),t=t.sibling}function HE(t){switch(t.tag){case 26:ac(t),t.flags&yf&&t.memoizedState!==null&&sL(Gs,t.memoizedState,t.memoizedProps);break;case 5:ac(t);break;case 3:case 4:var n=Gs;Gs=qm(t.stateNode.containerInfo),ac(t),Gs=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=yf,yf=16777216,ac(t),yf=n):ac(t));break;default:ac(t)}}function zE(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 Ph(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Pi=u,GE(u,t)}zE(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)VE(t),t=t.sibling}function VE(t){switch(t.tag){case 0:case 11:case 15:Ph(t),t.flags&2048&&Iv(t,t.return,Ci|xs);break;case 3:var n=Fs();Ph(t),t.stateNode.passiveEffectDuration+=cl(n);break;case 12:n=Fs(),Ph(t),t.stateNode.passiveEffectDuration+=dl(n);break;case 22:n=t.stateNode,t.memoizedState!==null&&n._visibility&ya&&(t.return===null||t.return.tag!==13)?(n._visibility&=~ya,Lm(t)):Ph(t);break;default:Ph(t)}}function Lm(t){var n=t.deletions;if(t.flags&16){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Pi=u,GE(u,t)}zE(t)}for(t=t.child;t!==null;)$E(t),t=t.sibling}function $E(t){switch(t.tag){case 0:case 11:case 15:Iv(t,t.return,Ci),Lm(t);break;case 22:var n=t.stateNode;n._visibility&ya&&(n._visibility&=~ya,Lm(t));break;default:Lm(t)}}function GE(t,n){for(;Pi!==null;){var a=Pi,u=a;switch(u.tag){case 0:case 11:case 15:Iv(u,n,Ci);break;case 23:case 22:u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(u=u.memoizedState.cachePool.pool,u!=null&&sa(u));break;case 24:ul(u.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Pi=u;else e:for(a=t;Pi!==null;){u=Pi;var d=u.sibling,m=u.return;if(LE(u),u===a){Pi=null;break e}if(d!==null){d.return=m,Pi=d;break e}Pi=m}}}function SM(){N6.forEach(function(t){return t()})}function YE(){var t=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return t||re.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),t}function Jn(t){if((Et&yn)!==is&&ft!==0)return ft&-ft;var n=re.T;return n!==null?(n._updatedFibers||(n._updatedFibers=new Set),n._updatedFibers.add(t),t=Dl,t!==0?t:Wv()):Ha()}function XE(){ss===0&&(ss=!(ft&536870912)||vt?we():536870912);var t=Cs.current;return t!==null&&(t.flags|=32),ss}function hi(t,n,a){if(Yc&&console.error("useInsertionEffect must not schedule updates."),E_&&(Sg=!0),(t===jt&&(Ot===Il||Ot===Pl)||t.cancelPendingCommit!==null)&&(lc(t,0),ao(t,ft,ss,!1)),ui(t,a),Et&yn&&t===jt){if(Mr)switch(n.tag){case 0:case 11:case 15:t=ht&&ye(ht)||"Unknown",ok.has(t)||(ok.add(t),n=ye(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:ak||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),ak=!0)}}else Hs&&An(t,n,a),MM(n),t===jt&&((Et&yn)===is&&(So|=a),ai===Ll&&ao(t,ft,ss,!1)),wr(t)}function WE(t,n,a){if((Et&(yn|Ys))!==is)throw Error("Should not already be working.");var u=!a&&(n&124)===0&&(n&t.expiredLanes)===0||At(t,n),d=u?EM(t,n):zv(t,n,!0),m=u;do{if(d===Ea){$c&&!u&&ao(t,n,0,!1);break}else{if(a=t.current.alternate,m&&!xM(a)){d=zv(t,n,!1),m=!1;continue}if(d===zc){if(m=n,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){n=S;e:{d=t;var C=S;S=xf;var R=d.current.memoizedState.isDehydrated;if(R&&(lc(d,C).flags|=256),C=zv(d,C,!1),C!==zc){if(y_&&!R){d.errorRecoveryDisabledLanes|=m,So|=m,d=Ll;break e}d=vn,vn=S,d!==null&&(vn===null?vn=d:vn.push.apply(vn,d))}d=C}if(m=!1,d!==zc)continue}}if(d===bf){lc(t,0),ao(t,n,0,!0);break}e:{switch(u=t,d){case Ea:case bf:throw Error("Root did not complete. This is a bug in React.");case Ll:if((n&4194048)!==n)break;case bg:ao(u,n,ss,!_o);break e;case zc:vn=null;break;case p_:case ZA:break;default:throw Error("Unknown root exit status.")}if(re.actQueue!==null)Vv(u,a,n,vn,Ef,_g,ss,So,Nl);else{if((n&62914560)===n&&(m=b_+ek-Dr(),10<m)){if(ao(u,n,ss,!_o),ii(u,0,!0)!==0)break e;u.timeoutHandle=mk(QE.bind(null,u,a,vn,Ef,_g,n,ss,So,Nl,_o,d,F6,iA,0),m);break e}QE(u,a,vn,Ef,_g,n,ss,So,Nl,_o,d,U6,iA,0)}}}break}while(1);wr(t)}function QE(t,n,a,u,d,m,S,C,R,I,ee,ae,Q,ue){if(t.timeoutHandle=jl,ae=n.subtreeFlags,(ae&8192||(ae&16785408)===16785408)&&(Of={stylesheets:null,count:0,unsuspend:nL},HE(n),ae=rL(),ae!==null)){t.cancelPendingCommit=ae(Vv.bind(null,t,n,m,a,u,d,S,C,R,ee,q6,Q,ue)),ao(t,m,S,!I);return}Vv(t,n,m,a,u,d,S,C,R)}function xM(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var d=a[u],m=d.getSnapshot;d=d.value;try{if(!pn(m(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 ao(t,n,a,u){n&=~v_,n&=~So,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var d=n;0<d;){var m=31-hn(d),S=1<<m;u[m]=-1,d&=~S}a!==0&&kt(t,a,n)}function oc(){return(Et&(yn|Ys))===is?(Uh(0,!1),!1):!0}function jv(){if(ht!==null){if(Ot===Nn)var t=ht.return;else t=ht,di(),Th(t),Nc=null,mf=0,t=ht;for(;t!==null;)xE(t.alternate,t),t=t.return;ht=null}}function lc(t,n){var a=t.timeoutHandle;a!==jl&&(t.timeoutHandle=jl,J6(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),jv(),jt=t,ht=a=Us(t.current,null),ft=n,Ot=Nn,ns=null,_o=!1,$c=At(t,n),y_=!1,ai=Ea,Nl=ss=v_=So=To=0,vn=xf=null,_g=!1,n&8&&(n|=n&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=n;0<u;){var d=31-hn(u),m=1<<d;n|=t[d],u&=~m}return Br=n,Ga(),n=eA(),1e3<n-Jw&&(re.recentlyCreatedOwnerStacks=0,Jw=n),Vs.discardPendingWarnings(),a}function KE(t,n){et=null,re.H=yg,re.getCurrentStack=null,Mr=!1,ts=null,n===df||n===hg?(n=ec(),Ot=Tf):n===rA?(n=ec(),Ot=JA):Ot=n===zA?g_:n!==null&&typeof n=="object"&&typeof n.then=="function"?Vc:_f,ns=n;var a=ht;if(a===null)ai=bf,km(t,Fi(n,t.current));else switch(a.mode&$i&&Zu(a),Te(),Ot){case _f:Ne!==null&&typeof Ne.markComponentErrored=="function"&&Ne.markComponentErrored(a,n,ft);break;case Il:case Pl:case Tf:case Vc:case Sf:Ne!==null&&typeof Ne.markComponentSuspended=="function"&&Ne.markComponentSuspended(a,n,ft)}}function ZE(){var t=re.H;return re.H=yg,t===null?yg:t}function JE(){var t=re.A;return re.A=P6,t}function Hv(){ai=Ll,_o||(ft&4194048)!==ft&&Cs.current!==null||($c=!0),!(To&134217727)&&!(So&134217727)||jt===null||ao(jt,ft,ss,!1)}function zv(t,n,a){var u=Et;Et|=yn;var d=ZE(),m=JE();if(jt!==t||ft!==n){if(Hs){var S=t.memoizedUpdaters;0<S.size&&(Bh(t,ft),S.clear()),ja(t,n)}Ef=null,lc(t,n)}Oe(n),n=!1,S=ai;e:do try{if(Ot!==Nn&&ht!==null){var C=ht,R=ns;switch(Ot){case g_:jv(),S=bg;break e;case Tf:case Il:case Pl:case Vc:Cs.current===null&&(n=!0);var I=Ot;if(Ot=Nn,ns=null,uc(t,C,R,I),a&&$c){S=Ea;break e}break;default:I=Ot,Ot=Nn,ns=null,uc(t,C,R,I)}}eC(),S=ai;break}catch(ee){KE(t,ee)}while(1);return n&&t.shellSuspendCounter++,di(),Et=u,re.H=d,re.A=m,Ye(),ht===null&&(jt=null,ft=0,Ga()),S}function eC(){for(;ht!==null;)tC(ht)}function EM(t,n){var a=Et;Et|=yn;var u=ZE(),d=JE();if(jt!==t||ft!==n){if(Hs){var m=t.memoizedUpdaters;0<m.size&&(Bh(t,ft),m.clear()),ja(t,n)}Ef=null,Tg=Dr()+tk,lc(t,n)}else $c=At(t,n);Oe(n);e:do try{if(Ot!==Nn&&ht!==null)t:switch(n=ht,m=ns,Ot){case _f:Ot=Nn,ns=null,uc(t,n,m,_f);break;case Il:case Pl:if(uh(m)){Ot=Nn,ns=null,iC(n);break}n=function(){Ot!==Il&&Ot!==Pl||jt!==t||(Ot=Sf),wr(t)},m.then(n,n);break e;case Tf:Ot=Sf;break e;case JA:Ot=m_;break e;case Sf:uh(m)?(Ot=Nn,ns=null,iC(n)):(Ot=Nn,ns=null,uc(t,n,m,Sf));break;case m_:var S=null;switch(ht.tag){case 26:S=ht.memoizedState;case 5:case 27:var C=ht;if(!S||$C(S)){Ot=Nn,ns=null;var R=C.sibling;if(R!==null)ht=R;else{var I=C.return;I!==null?(ht=I,Im(I)):ht=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Ot=Nn,ns=null,uc(t,n,m,m_);break;case Vc:Ot=Nn,ns=null,uc(t,n,m,Vc);break;case g_:jv(),ai=bg;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}re.actQueue!==null?eC():CM();break}catch(ee){KE(t,ee)}while(1);return di(),re.H=u,re.A=d,Et=a,ht!==null?(Ne!==null&&typeof Ne.markRenderYielded=="function"&&Ne.markRenderYielded(),Ea):(Ye(),jt=null,ft=0,Ga(),ai)}function CM(){for(;ht!==null&&!TL();)tC(ht)}function tC(t){var n=t.alternate;(t.mode&$i)!==$t?(ra(t),n=He(t,Mv,n,t,Br),Zu(t)):n=He(t,Mv,n,t,Br),t.memoizedProps=t.pendingProps,n===null?Im(t):ht=n}function iC(t){var n=He(t,wM,t);t.memoizedProps=t.pendingProps,n===null?Im(t):ht=n}function wM(t){var n=t.alternate,a=(t.mode&$i)!==$t;switch(a&&ra(t),t.tag){case 15:case 0:n=mE(n,t,t.pendingProps,t.type,void 0,ft);break;case 11:n=mE(n,t,t.pendingProps,t.type.render,t.ref,ft);break;case 5:Th(t);default:xE(n,t),t=ht=Wu(t,Br),n=Mv(n,t,Br)}return a&&Zu(t),n}function uc(t,n,a,u){di(),Th(n),Nc=null,mf=0;var d=n.return;try{if(dM(t,d,n,a,ft)){ai=bf,km(t,Fi(a,t.current)),ht=null;return}}catch(m){if(d!==null)throw ht=d,m;ai=bf,km(t,Fi(a,t.current)),ht=null;return}n.flags&32768?(vt||u===_f?t=!0:$c||ft&536870912?t=!1:(_o=t=!0,(u===Il||u===Pl||u===Tf||u===Vc)&&(u=Cs.current,u!==null&&u.tag===13&&(u.flags|=16384))),nC(n,t)):Im(n)}function Im(t){var n=t;do{if(n.flags&32768){nC(n,_o);return}var a=n.alternate;if(t=n.return,ra(n),a=He(n,fM,a,n,Br),(n.mode&$i)!==$t&&hl(n),a!==null){ht=a;return}if(n=n.sibling,n!==null){ht=n;return}ht=n=t}while(n!==null);ai===Ea&&(ai=ZA)}function nC(t,n){do{var a=pM(t.alternate,t);if(a!==null){a.flags&=32767,ht=a;return}if((t.mode&$i)!==$t){hl(t),a=t.actualDuration;for(var u=t.child;u!==null;)a+=u.actualDuration,u=u.sibling;t.actualDuration=a}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){ht=t;return}ht=t=a}while(t!==null);ai=bg,ht=null}function Vv(t,n,a,u,d,m,S,C,R){t.cancelPendingCommit=null;do Nh();while(Yi!==Bl);if(Vs.flushLegacyContextWarning(),Vs.flushPendingUnsafeLifecycleWarnings(),(Et&(yn|Ys))!==is)throw Error("Should not already be working.");if(Ne!==null&&typeof Ne.markCommitStarted=="function"&&Ne.markCommitStarted(a),n===null)Le();else{if(a===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(m=n.lanes|n.childLanes,m|=Yb,Zt(t,a,m,S,C,R),t===jt&&(ht=jt=null,ft=0),Gc=n,Eo=t,Co=a,T_=m,S_=d,rk=u,n.subtreeFlags&10256||n.flags&10256?(t.callbackNode=null,t.callbackPriority=0,RM(mc,function(){return lC(),null})):(t.callbackNode=null,t.callbackPriority=0),lg=Rc(),u=(n.flags&13878)!==0,n.subtreeFlags&13878||u){u=re.T,re.T=null,d=xt.p,xt.p=gs,S=Et,Et|=Ys;try{_M(t,n,a)}finally{Et=S,xt.p=d,re.T=u}}Yi=ik,sC(),rC(),aC()}}function sC(){if(Yi===ik){Yi=Bl;var t=Eo,n=Gc,a=Co,u=(n.flags&13878)!==0;if(n.subtreeFlags&13878||u){u=re.T,re.T=null;var d=xt.p;xt.p=gs;var m=Et;Et|=Ys;try{jc=a,Hc=t,NE(n,t),Hc=jc=null,a=L_;var S=nl(t.containerInfo),C=a.focusedElem,R=a.selectionRange;if(S!==C&&C&&C.ownerDocument&&cs(C.ownerDocument.documentElement,C)){if(R!==null&&$u(C)){var I=R.start,ee=R.end;if(ee===void 0&&(ee=I),"selectionStart"in C)C.selectionStart=I,C.selectionEnd=Math.min(ee,C.value.length);else{var ae=C.ownerDocument||document,Q=ae&&ae.defaultView||window;if(Q.getSelection){var ue=Q.getSelection(),Fe=C.textContent.length,Je=Math.min(R.start,Fe),Ht=R.end===void 0?Je:Math.min(R.end,Fe);!ue.extend&&Je>Ht&&(S=Ht,Ht=Je,Je=S);var mt=On(C,Je),F=On(C,Ht);if(mt&&F&&(ue.rangeCount!==1||ue.anchorNode!==mt.node||ue.anchorOffset!==mt.offset||ue.focusNode!==F.node||ue.focusOffset!==F.offset)){var j=ae.createRange();j.setStart(mt.node,mt.offset),ue.removeAllRanges(),Je>Ht?(ue.addRange(j),ue.extend(F.node,F.offset)):(j.setEnd(F.node,F.offset),ue.addRange(j))}}}}for(ae=[],ue=C;ue=ue.parentNode;)ue.nodeType===1&&ae.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ae.length;C++){var V=ae[C];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Bg=!!M_,L_=M_=null}finally{Et=m,xt.p=d,re.T=u}}t.current=n,Yi=nk}}function rC(){if(Yi===nk){Yi=Bl;var t=Eo,n=Gc,a=Co,u=(n.flags&8772)!==0;if(n.subtreeFlags&8772||u){u=re.T,re.T=null;var d=xt.p;xt.p=gs;var m=Et;Et|=Ys;try{Ne!==null&&typeof Ne.markLayoutEffectsStarted=="function"&&Ne.markLayoutEffectsStarted(a),jc=a,Hc=t,ME(t,n.alternate,n),Hc=jc=null,Ne!==null&&typeof Ne.markLayoutEffectsStopped=="function"&&Ne.markLayoutEffectsStopped()}finally{Et=m,xt.p=d,re.T=u}}Yi=sk}}function aC(){if(Yi===j6||Yi===sk){Yi=Bl,SL();var t=Eo,n=Gc,a=Co,u=rk,d=(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0;d?Yi=__:(Yi=Bl,Gc=Eo=null,oC(t,t.pendingLanes),Ul=0,wf=null);var m=t.pendingLanes;if(m===0&&(xo=null),d||hC(t),d=Yr(a),n=n.stateNode,tn&&typeof tn.onCommitFiberRoot=="function")try{var S=(n.current.flags&128)===128;switch(d){case gs:var C=Cb;break;case Rr:C=wb;break;case ga:C=mc;break;case Km:C=Ab;break;default:C=mc}tn.onCommitFiberRoot(gc,n,C,S)}catch(ae){Or||(Or=!0,console.error("React instrumentation encountered an error: %s",ae))}if(Hs&&t.memoizedUpdaters.clear(),SM(),u!==null){S=re.T,C=xt.p,xt.p=gs,re.T=null;try{var R=t.onRecoverableError;for(n=0;n<u.length;n++){var I=u[n],ee=AM(I.stack);He(I.source,R,I.value,ee)}}finally{re.T=S,xt.p=C}}Co&3&&Nh(),wr(t),m=t.pendingLanes,a&4194090&&m&42?(cg=!0,t===x_?Cf++:(Cf=0,x_=t)):Cf=0,Uh(0,!1),Le()}}function AM(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 oC(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,ul(n)))}function Nh(t){return sC(),rC(),aC(),lC()}function lC(){if(Yi!==__)return!1;var t=Eo,n=T_;T_=0;var a=Yr(Co),u=ga>a?ga:a;a=re.T;var d=xt.p;try{xt.p=u,re.T=null,u=S_,S_=null;var m=Eo,S=Co;if(Yi=Bl,Gc=Eo=null,Co=0,(Et&(yn|Ys))!==is)throw Error("Cannot flush passive effects while already rendering.");E_=!0,Sg=!1,Ne!==null&&typeof Ne.markPassiveEffectsStarted=="function"&&Ne.markPassiveEffectsStarted(S);var C=Et;if(Et|=Ys,VE(m.current),FE(m,m.current,S,u),Ne!==null&&typeof Ne.markPassiveEffectsStopped=="function"&&Ne.markPassiveEffectsStopped(),hC(m),Et=C,Uh(0,!1),Sg?m===wf?Ul++:(Ul=0,wf=m):Ul=0,Sg=E_=!1,tn&&typeof tn.onPostCommitFiberRoot=="function")try{tn.onPostCommitFiberRoot(gc,m)}catch(I){Or||(Or=!0,console.error("React instrumentation encountered an error: %s",I))}var R=m.current.stateNode;return R.effectDuration=0,R.passiveEffectDuration=0,!0}finally{xt.p=d,re.T=a,oC(t,n)}}function uC(t,n,a){n=Fi(a,n),n=Tv(t.stateNode,n,2),t=br(t,n,2),t!==null&&(ui(t,2),wr(t))}function Nt(t,n,a){if(Yc=!1,t.tag===3)uC(t,t,a);else{for(;n!==null;){if(n.tag===3){uC(n,t,a);return}if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(xo===null||!xo.has(u))){t=Fi(a,t),a=Sv(2),u=br(n,a,2),u!==null&&(xv(a,u,n,t),ui(u,2),wr(u));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`,a)}}function $v(t,n,a){var u=t.pingCache;if(u===null){u=t.pingCache=new B6;var d=new Set;u.set(n,d)}else d=u.get(n),d===void 0&&(d=new Set,u.set(n,d));d.has(a)||(y_=!0,d.add(a),u=kM.bind(null,t,n,a),Hs&&Bh(t,a),n.then(u,u))}function kM(t,n,a){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,YE()&&re.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`),jt===t&&(ft&a)===a&&(ai===Ll||ai===p_&&(ft&62914560)===ft&&Dr()-b_<ek?(Et&yn)===is&&lc(t,0):v_|=a,Nl===ft&&(Nl=0)),wr(t)}function cC(t,n){n===0&&(n=gi()),t=Si(t,n),t!==null&&(ui(t,n),wr(t))}function DM(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),cC(t,a)}function OM(t,n){var a=0;switch(t.tag){case 13:var u=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}u!==null&&u.delete(n),cC(t,a)}function Gv(t,n,a){if(n.subtreeFlags&67117056)for(n=n.child;n!==null;){var u=t,d=n,m=d.type===Gm;m=a||m,d.tag!==22?d.flags&67108864?m&&He(d,dC,u,d,(d.mode&Qw)===$t):Gv(u,d,m):d.memoizedState===null&&(m&&d.flags&8192?He(d,dC,u,d):d.subtreeFlags&67108864&&He(d,Gv,u,d,m)),n=n.sibling}}function dC(t,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;Pe(!0);try{UE(n),a&&$E(n),qE(t,n.alternate,n,!1),a&&jE(t,n,0,null,!1,0)}finally{Pe(!1)}}function hC(t){var n=!0;t.current.mode&(sn|zs)||(n=!1),Gv(t,t.current,n)}function fC(t){if((Et&yn)===is){var n=t.tag;if(n===3||n===1||n===0||n===11||n===14||n===15){if(n=ye(t)||"ReactComponent",xg!==null){if(xg.has(n))return;xg.add(n)}else xg=new Set([n]);He(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 Bh(t,n){Hs&&t.memoizedUpdaters.forEach(function(a){An(t,a,n)})}function RM(t,n){var a=re.actQueue;return a!==null?(a.push(n),V6):Eb(t,n)}function MM(t){YE()&&re.actQueue===null&&He(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`,ye(t))})}function wr(t){t!==Xc&&t.next===null&&(Xc===null?Eg=Xc=t:Xc=Xc.next=t),Cg=!0,re.actQueue!==null?w_||(w_=!0,yC()):C_||(C_=!0,yC())}function Uh(t,n){if(!A_&&Cg){A_=!0;do for(var a=!1,u=Eg;u!==null;){if(!n)if(t!==0){var d=u.pendingLanes;if(d===0)var m=0;else{var S=u.suspendedLanes,C=u.pingedLanes;m=(1<<31-hn(42|t)+1)-1,m&=d&~(S&~C),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,gC(u,m))}else m=ft,m=ii(u,u===jt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==jl),!(m&3)||At(u,m)||(a=!0,gC(u,m));u=u.next}while(a);A_=!1}}function LM(){Yv()}function Yv(){Cg=w_=C_=!1;var t=0;ql!==0&&(UM()&&(t=ql),ql=0);for(var n=Dr(),a=null,u=Eg;u!==null;){var d=u.next,m=pC(u,n);m===0?(u.next=null,a===null?Eg=d:a.next=d,d===null&&(Xc=a)):(a=u,(t!==0||m&3)&&(Cg=!0)),u=d}Uh(t,!1)}function pC(t,n){for(var a=t.suspendedLanes,u=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-hn(m),C=1<<S,R=d[S];R===-1?(!(C&a)||C&u)&&(d[S]=qt(C,n)):R<=n&&(t.expiredLanes|=C),m&=~C}if(n=jt,a=ft,a=ii(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==jl),u=t.callbackNode,a===0||t===n&&(Ot===Il||Ot===Pl)||t.cancelPendingCommit!==null)return u!==null&&Xv(u),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||At(t,a)){if(n=a&-a,n!==t.callbackPriority||re.actQueue!==null&&u!==k_)Xv(u);else return n;switch(Yr(a)){case gs:case Rr:a=wb;break;case ga:a=mc;break;case Km:a=Ab;break;default:a=mc}return u=mC.bind(null,t),re.actQueue!==null?(re.actQueue.push(u),a=k_):a=Eb(a,u),t.callbackPriority=n,t.callbackNode=a,n}return u!==null&&Xv(u),t.callbackPriority=2,t.callbackNode=null,2}function mC(t,n){if(cg=ug=!1,Yi!==Bl&&Yi!==__)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Nh()&&t.callbackNode!==a)return null;var u=ft;return u=ii(t,t===jt?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==jl),u===0?null:(WE(t,u,n),pC(t,Dr()),t.callbackNode!=null&&t.callbackNode===a?mC.bind(null,t):null)}function gC(t,n){if(Nh())return null;ug=cg,cg=!1,WE(t,n,!0)}function Xv(t){t!==k_&&t!==null&&_L(t)}function yC(){re.actQueue!==null&&re.actQueue.push(function(){return Yv(),null}),eI(function(){(Et&(yn|Ys))!==is?Eb(Cb,LM):Yv()})}function Wv(){return ql===0&&(ql=we()),ql}function vC(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:(Ae(t,"action"),Ko(""+t))}function bC(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function IM(t,n,a,u,d){if(n==="submit"&&a&&a.stateNode===d){var m=vC((d[Ln]||null).action),S=u.submitter;S&&(n=(n=S[Ln]||null)?vC(n.formAction):S.getAttribute("formAction"),n!==null&&(m=n,S=null));var C=new ig("action","action",null,u,d);t.push({event:C,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ql!==0){var R=S?bC(d,S):new FormData(d),I={pending:!0,data:R,method:d.method,action:m};Object.freeze(I),dn(a,I,null,R)}}else typeof m=="function"&&(C.preventDefault(),R=S?bC(d,S):new FormData(d),I={pending:!0,data:R,method:d.method,action:m},Object.freeze(I),dn(a,I,m,R))},currentTarget:d}]})}}function Pm(t,n,a){t.currentTarget=a;try{n(t)}catch(u){u_(u)}t.currentTarget=null}function _C(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var u=t[a];e:{var d=void 0,m=u.event;if(u=u.listeners,n)for(var S=u.length-1;0<=S;S--){var C=u[S],R=C.instance,I=C.currentTarget;if(C=C.listener,R!==d&&m.isPropagationStopped())break e;R!==null?He(R,Pm,m,C,I):Pm(m,C,I),d=R}else for(S=0;S<u.length;S++){if(C=u[S],R=C.instance,I=C.currentTarget,C=C.listener,R!==d&&m.isPropagationStopped())break e;R!==null?He(R,Pm,m,C,I):Pm(m,C,I),d=R}}}}function pt(t,n){D_.has(t)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',t);var a=n[kb];a===void 0&&(a=n[kb]=new Set);var u=t+"__bubble";a.has(u)||(TC(n,t,2,!1),a.add(u))}function Qv(t,n,a){D_.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 u=0;n&&(u|=4),TC(a,t,u,n)}function Kv(t){if(!t[wg]){t[wg]=!0,sw.forEach(function(a){a!=="selectionchange"&&(D_.has(a)||Qv(a,!1,t),Qv(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[wg]||(n[wg]=!0,Qv("selectionchange",!1,n))}}function TC(t,n,a,u){switch(QC(n)){case gs:var d=cL;break;case Rr:d=dL;break;default:d=hb}a=d.bind(null,n,a,t),d=void 0,!Nb||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),u?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function Zv(t,n,a,u,d){var m=u;if(!(n&1)&&!(n&2)&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var C=u.stateNode.containerInfo;if(C===d)break;if(S===4)for(S=u.return;S!==null;){var R=S.tag;if((R===3||R===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;C!==null;){if(S=Ji(C),S===null)return;if(R=S.tag,R===5||R===6||R===26||R===27){u=m=S;continue e}C=C.parentNode}}u=u.return}Zo(function(){var I=m,ee=qu(a),ae=[];e:{var Q=Ww.get(t);if(Q!==void 0){var ue=ig,Fe=t;switch(t){case"keypress":if(Fu(a)===0)break e;case"keydown":case"keyup":ue=o6;break;case"focusin":Fe="focus",ue=Fb;break;case"focusout":Fe="blur",ue=Fb;break;case"beforeblur":case"afterblur":ue=Fb;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=Pw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=WL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=c6;break;case $w:case Gw:case Yw:ue=ZL;break;case Xw:ue=h6;break;case"scroll":case"scrollend":ue=YL;break;case"wheel":ue=p6;break;case"copy":case"cut":case"paste":ue=e6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Bw;break;case"toggle":case"beforetoggle":ue=g6}var Je=(n&4)!==0,Ht=!Je&&(t==="scroll"||t==="scrollend"),mt=Je?Q!==null?Q+"Capture":null:Q;Je=[];for(var F=I,j;F!==null;){var V=F;if(j=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||j===null||mt===null||(V=Ns(F,mt),V!=null&&Je.push(qh(F,V,j))),Ht)break;F=F.return}0<Je.length&&(Q=new ue(Q,Fe,null,a,ee),ae.push({event:Q,listeners:Je}))}}if(!(n&7)){e:{if(Q=t==="mouseover"||t==="pointerover",ue=t==="mouseout"||t==="pointerout",Q&&a!==Wh&&(Fe=a.relatedTarget||a.fromElement)&&(Ji(Fe)||Fe[po]))break e;if((ue||Q)&&(Q=ee.window===ee?ee:(Q=ee.ownerDocument)?Q.defaultView||Q.parentWindow:window,ue?(Fe=a.relatedTarget||a.toElement,ue=I,Fe=Fe?Ji(Fe):null,Fe!==null&&(Ht=N(Fe),Je=Fe.tag,Fe!==Ht||Je!==5&&Je!==27&&Je!==6)&&(Fe=null)):(ue=null,Fe=I),ue!==Fe)){if(Je=Pw,V="onMouseLeave",mt="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(Je=Bw,V="onPointerLeave",mt="onPointerEnter",F="pointer"),Ht=ue==null?Q:lr(ue),j=Fe==null?Q:lr(Fe),Q=new Je(V,F+"leave",ue,a,ee),Q.target=Ht,Q.relatedTarget=j,V=null,Ji(ee)===I&&(Je=new Je(mt,F+"enter",Fe,a,ee),Je.target=j,Je.relatedTarget=Ht,V=Je),Ht=V,ue&&Fe)t:{for(Je=ue,mt=Fe,F=0,j=Je;j;j=cc(j))F++;for(j=0,V=mt;V;V=cc(V))j++;for(;0<F-j;)Je=cc(Je),F--;for(;0<j-F;)mt=cc(mt),j--;for(;F--;){if(Je===mt||mt!==null&&Je===mt.alternate)break t;Je=cc(Je),mt=cc(mt)}Je=null}else Je=null;ue!==null&&SC(ae,Q,ue,Je,!1),Fe!==null&&Ht!==null&&SC(ae,Ht,Fe,Je,!0)}}e:{if(Q=I?lr(I):window,ue=Q.nodeName&&Q.nodeName.toLowerCase(),ue==="select"||ue==="input"&&Q.type==="file")var ce=el;else if(sm(Q))if(zw)ce=Vu;else{ce=uv;var De=lv}else ue=Q.nodeName,!ue||ue.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?I&&Qo(I.elementType)&&(ce=el):ce=cv;if(ce&&(ce=ce(t,I))){zu(ae,ce,a,ee);break e}De&&De(t,Q,I),t==="focusout"&&I&&Q.type==="number"&&I.memoizedProps.value!=null&&Vd(Q,"number",Q.value)}switch(De=I?lr(I):window,t){case"focusin":(sm(De)||De.contentEditable==="true")&&(xc=De,Hb=I,nf=null);break;case"focusout":nf=Hb=xc=null;break;case"mousedown":zb=!0;break;case"contextmenu":case"mouseup":case"dragend":zb=!1,om(ae,a,ee);break;case"selectionchange":if(_6)break;case"keydown":case"keyup":om(ae,a,ee)}var nt;if(jb)e:{switch(t){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Sc?im(t,a)&&(je="onCompositionEnd"):t==="keydown"&&a.keyCode===Uw&&(je="onCompositionStart");je&&(qw&&a.locale!=="ko"&&(Sc||je!=="onCompositionStart"?je==="onCompositionEnd"&&Sc&&(nt=Xd()):(mo=ee,Bb="value"in mo?mo.value:mo.textContent,Sc=!0)),De=Nm(I,je),0<De.length&&(je=new Nw(je,t,null,a,ee),ae.push({event:je,listeners:De}),nt?je.data=nt:(nt=nm(a),nt!==null&&(je.data=nt)))),(nt=v6?sv(t,a):rv(t,a))&&(je=Nm(I,"onBeforeInput"),0<je.length&&(De=new i6("onBeforeInput","beforeinput",null,a,ee),ae.push({event:De,listeners:je}),De.data=nt)),IM(ae,t,I,a,ee)}_C(ae,n)})}function qh(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Nm(t,n){for(var a=n+"Capture",u=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ns(t,a),d!=null&&u.unshift(qh(t,d,m)),d=Ns(t,n),d!=null&&u.push(qh(t,d,m))),t.tag===3)return u;t=t.return}return[]}function cc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function SC(t,n,a,u,d){for(var m=n._reactName,S=[];a!==null&&a!==u;){var C=a,R=C.alternate,I=C.stateNode;if(C=C.tag,R!==null&&R===u)break;C!==5&&C!==26&&C!==27||I===null||(R=I,d?(I=Ns(a,m),I!=null&&S.unshift(qh(a,I,R))):d||(I=Ns(a,m),I!=null&&S.push(qh(a,I,R)))),a=a.return}S.length!==0&&t.push({event:n,listeners:S})}function Jv(t,n){Jp(t,n),t!=="input"&&t!=="textarea"&&t!=="select"||n==null||n.value!==null||Lw||(Lw=!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 a={registrationNameDependencies:El,possibleRegistrationNames:Db};Qo(t)||typeof n.is=="string"||em(t,n,a),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 Li(t,n,a,u){n!==a&&(a=oo(a),oo(n)!==a&&(u[t]=n))}function PM(t,n,a){n.forEach(function(u){a[CC(u)]=u==="style"?tb(t):t.getAttribute(u)})}function Ar(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 xC(t,n){return t=t.namespaceURI===Jm||t.namespaceURI===vc?t.ownerDocument.createElementNS(t.namespaceURI,t.tagName):t.ownerDocument.createElement(t.tagName),t.innerHTML=n,t.innerHTML}function oo(t){return te(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.",Ue(t)),Me(t)),(typeof t=="string"?t:""+t).replace($6,`
|
||
`).replace(G6,"")}function EC(t,n){return n=oo(n),oo(t)===n}function Bm(){}function Bt(t,n,a,u,d,m){switch(a){case"children":typeof u=="string"?(Ps(u,n,!1),n==="body"||n==="textarea"&&u===""||Zr(t,u)):(typeof u=="number"||typeof u=="bigint")&&(Ps(""+u,n,!1),n!=="body"&&Zr(t,""+u));break;case"className":it(t,"class",u);break;case"tabIndex":it(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":it(t,a,u);break;case"style":Kp(t,u,m);break;case"data":if(n!=="object"){it(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){console.error(a==="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.',a,a),t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}Ae(u,a),u=Ko(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(u!=null&&(n==="form"?a==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof u=="function"&&(d.encType==null&&d.method==null||Dg||(Dg=!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||kg||(kg=!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"?a==="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"||Ag?n!=="button"||d.type==null||d.type==="submit"||Ag?typeof u=="function"&&(d.name==null||ck||(ck=!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||Dg||(Dg=!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||kg||(kg=!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."))):(Ag=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Ag=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(a==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof u=="function"){t.setAttribute(a,"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 m=="function"&&(a==="formAction"?(n!=="input"&&Bt(t,n,"name",d.name,d,null),Bt(t,n,"formEncType",d.formEncType,d,null),Bt(t,n,"formMethod",d.formMethod,d,null),Bt(t,n,"formTarget",d.formTarget,d,null)):(Bt(t,n,"encType",d.encType,d,null),Bt(t,n,"method",d.method,d,null),Bt(t,n,"target",d.target,d,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}Ae(u,a),u=Ko(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(typeof u!="function"&&Ar(a,u),t.onclick=Bm);break;case"onScroll":u!=null&&(typeof u!="function"&&Ar(a,u),pt("scroll",t));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&Ar(a,u),pt("scrollend",t));break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}Ae(u,a),a=Ko(""+u),t.setAttributeNS(Fl,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?(Ae(u,a),t.setAttribute(a,""+u)):t.removeAttribute(a);break;case"inert":u!==""||Og[a]||(Og[a]=!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.",a));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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?(Ae(u,a),t.setAttribute(a,u)):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?(Ae(u,a),t.setAttribute(a,u)):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):(Ae(u,a),t.setAttribute(a,u));break;case"popover":pt("beforetoggle",t),pt("toggle",t),yt(t,"popover",u);break;case"xlinkActuate":ci(t,Fl,"xlink:actuate",u);break;case"xlinkArcrole":ci(t,Fl,"xlink:arcrole",u);break;case"xlinkRole":ci(t,Fl,"xlink:role",u);break;case"xlinkShow":ci(t,Fl,"xlink:show",u);break;case"xlinkTitle":ci(t,Fl,"xlink:title",u);break;case"xlinkType":ci(t,Fl,"xlink:type",u);break;case"xmlBase":ci(t,O_,"xml:base",u);break;case"xmlLang":ci(t,O_,"xml:lang",u);break;case"xmlSpace":ci(t,O_,"xml:space",u);break;case"is":m!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),yt(t,"is",u);break;case"innerText":case"textContent":break;case"popoverTarget":dk||u==null||typeof u!="object"||(dk=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",u));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Zp(a),yt(t,a,u)):El.hasOwnProperty(a)&&u!=null&&typeof u!="function"&&Ar(a,u)}}function eb(t,n,a,u,d,m){switch(a){case"style":Kp(t,u,m);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=u.__html,a!=null){if(d.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");t.innerHTML=a}}break;case"children":typeof u=="string"?Zr(t,u):(typeof u=="number"||typeof u=="bigint")&&Zr(t,""+u);break;case"onScroll":u!=null&&(typeof u!="function"&&Ar(a,u),pt("scroll",t));break;case"onScrollEnd":u!=null&&(typeof u!="function"&&Ar(a,u),pt("scrollend",t));break;case"onClick":u!=null&&(typeof u!="function"&&Ar(a,u),t.onclick=Bm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(El.hasOwnProperty(a))u!=null&&typeof u!="function"&&Ar(a,u);else e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),m=t[Ln]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(n,m,d),typeof u=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,u,d);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):yt(t,a,u)}}}function zi(t,n,a){switch(Jv(n,a),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pt("error",t),pt("load",t);var u=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var S=a[m];if(S!=null)switch(m){case"src":u=!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:Bt(t,n,m,S,a,null)}}d&&Bt(t,n,"srcSet",a.srcSet,a,null),u&&Bt(t,n,"src",a.src,a,null);return;case"input":Ve("input",a),pt("invalid",t);var C=m=S=d=null,R=null,I=null;for(u in a)if(a.hasOwnProperty(u)){var ee=a[u];if(ee!=null)switch(u){case"name":d=ee;break;case"type":S=ee;break;case"checked":R=ee;break;case"defaultChecked":I=ee;break;case"value":m=ee;break;case"defaultValue":C=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Bt(t,n,u,ee,a,null)}}Ft(t,a),Go(t,m,C,R,I,S,d,!1),Xr(t);return;case"select":Ve("select",a),pt("invalid",t),u=S=m=null;for(d in a)if(a.hasOwnProperty(d)&&(C=a[d],C!=null))switch(d){case"value":m=C;break;case"defaultValue":S=C;break;case"multiple":u=C;default:Bt(t,n,d,C,a,null)}Lu(t,a),n=m,a=S,t.multiple=!!u,n!=null?Wr(t,!!u,n,!1):a!=null&&Wr(t,!!u,a,!0);return;case"textarea":Ve("textarea",a),pt("invalid",t),m=d=u=null;for(S in a)if(a.hasOwnProperty(S)&&(C=a[S],C!=null))switch(S){case"value":u=C;break;case"defaultValue":d=C;break;case"children":m=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:Bt(t,n,S,C,a,null)}Iu(t,a),Yp(t,u,d,m),Xr(t);return;case"option":$p(t,a);for(R in a)if(a.hasOwnProperty(R)&&(u=a[R],u!=null))switch(R){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Bt(t,n,R,u,a,null)}return;case"dialog":pt("beforetoggle",t),pt("toggle",t),pt("cancel",t),pt("close",t);break;case"iframe":case"object":pt("load",t);break;case"video":case"audio":for(u=0;u<Af.length;u++)pt(Af[u],t);break;case"image":pt("error",t),pt("load",t);break;case"details":pt("toggle",t);break;case"embed":case"source":case"link":pt("error",t),pt("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(I in a)if(a.hasOwnProperty(I)&&(u=a[I],u!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Bt(t,n,I,u,a,null)}return;default:if(Qo(n)){for(ee in a)a.hasOwnProperty(ee)&&(u=a[ee],u!==void 0&&eb(t,n,ee,u,a,void 0));return}}for(C in a)a.hasOwnProperty(C)&&(u=a[C],u!=null&&Bt(t,n,C,u,a,null))}function NM(t,n,a,u){switch(Jv(n,u),n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,S=null,C=null,R=null,I=null,ee=null;for(ue in a){var ae=a[ue];if(a.hasOwnProperty(ue)&&ae!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":R=ae;default:u.hasOwnProperty(ue)||Bt(t,n,ue,null,u,ae)}}for(var Q in u){var ue=u[Q];if(ae=a[Q],u.hasOwnProperty(Q)&&(ue!=null||ae!=null))switch(Q){case"type":m=ue;break;case"name":d=ue;break;case"checked":I=ue;break;case"defaultChecked":ee=ue;break;case"value":S=ue;break;case"defaultValue":C=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ue!==ae&&Bt(t,n,Q,ue,u,ae)}}n=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,u=u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null,n||!u||uk||(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"),uk=!0),!n||u||lk||(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"),lk=!0),Mu(t,S,C,R,I,ee,m,d);return;case"select":ue=S=C=Q=null;for(m in a)if(R=a[m],a.hasOwnProperty(m)&&R!=null)switch(m){case"value":break;case"multiple":ue=R;default:u.hasOwnProperty(m)||Bt(t,n,m,null,u,R)}for(d in u)if(m=u[d],R=a[d],u.hasOwnProperty(d)&&(m!=null||R!=null))switch(d){case"value":Q=m;break;case"defaultValue":C=m;break;case"multiple":S=m;default:m!==R&&Bt(t,n,d,m,u,R)}u=C,n=S,a=ue,Q!=null?Wr(t,!!n,Q,!1):!!a!=!!n&&(u!=null?Wr(t,!!n,u,!0):Wr(t,!!n,n?[]:"",!1));return;case"textarea":ue=Q=null;for(C in a)if(d=a[C],a.hasOwnProperty(C)&&d!=null&&!u.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Bt(t,n,C,null,u,d)}for(S in u)if(d=u[S],m=a[S],u.hasOwnProperty(S)&&(d!=null||m!=null))switch(S){case"value":Q=d;break;case"defaultValue":ue=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:d!==m&&Bt(t,n,S,d,u,m)}$d(t,Q,ue);return;case"option":for(var Fe in a)if(Q=a[Fe],a.hasOwnProperty(Fe)&&Q!=null&&!u.hasOwnProperty(Fe))switch(Fe){case"selected":t.selected=!1;break;default:Bt(t,n,Fe,null,u,Q)}for(R in u)if(Q=u[R],ue=a[R],u.hasOwnProperty(R)&&Q!==ue&&(Q!=null||ue!=null))switch(R){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Bt(t,n,R,Q,u,ue)}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 a)Q=a[Je],a.hasOwnProperty(Je)&&Q!=null&&!u.hasOwnProperty(Je)&&Bt(t,n,Je,null,u,Q);for(I in u)if(Q=u[I],ue=a[I],u.hasOwnProperty(I)&&Q!==ue&&(Q!=null||ue!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(n+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Bt(t,n,I,Q,u,ue)}return;default:if(Qo(n)){for(var Ht in a)Q=a[Ht],a.hasOwnProperty(Ht)&&Q!==void 0&&!u.hasOwnProperty(Ht)&&eb(t,n,Ht,void 0,u,Q);for(ee in u)Q=u[ee],ue=a[ee],!u.hasOwnProperty(ee)||Q===ue||Q===void 0&&ue===void 0||eb(t,n,ee,Q,u,ue);return}}for(var mt in a)Q=a[mt],a.hasOwnProperty(mt)&&Q!=null&&!u.hasOwnProperty(mt)&&Bt(t,n,mt,null,u,Q);for(ae in u)Q=u[ae],ue=a[ae],!u.hasOwnProperty(ae)||Q===ue||Q==null&&ue==null||Bt(t,n,ae,Q,u,ue)}function CC(t){switch(t){case"class":return"className";case"for":return"htmlFor";default:return t}}function tb(t){var n={};t=t.style;for(var a=0;a<t.length;a++){var u=t[a];n[u]=t.getPropertyValue(u)}return n}function wC(t,n,a){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 u,d=u="",m;for(m in n)if(n.hasOwnProperty(m)){var S=n[m];S!=null&&typeof S!="boolean"&&S!==""&&(m.indexOf("--")===0?(ze(S,m),u+=d+m+":"+(""+S).trim()):typeof S!="number"||S===0||Rw.has(m)?(ze(S,m),u+=d+m.replace(ww,"-$1").toLowerCase().replace(Aw,"-ms-")+":"+(""+S).trim()):u+=d+m.replace(ww,"-$1").toLowerCase().replace(Aw,"-ms-")+":"+S+"px",d=";")}u=u||null,n=t.getAttribute("style"),n!==u&&(u=oo(u),oo(n)!==u&&(a.style=tb(t)))}}function ps(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(Ae(u,n),t===""+u)return}Li(n,t,u,m)}function AC(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null){switch(typeof u){case"function":case"symbol":return}if(!u)return}else switch(typeof u){case"function":case"symbol":break;default:if(u)return}Li(n,t,u,m)}function ib(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":return}else if(u!=null)switch(typeof u){case"function":case"symbol":break;default:if(Ae(u,a),t===""+u)return}Li(n,t,u,m)}function kC(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(u))return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(!isNaN(u)&&(Ae(u,n),t===""+u))return}Li(n,t,u,m)}function nb(t,n,a,u,d,m){if(d.delete(a),t=t.getAttribute(a),t===null)switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":return}else if(u!=null)switch(typeof u){case"function":case"symbol":case"boolean":break;default:if(Ae(u,n),a=Ko(""+u),t===a)return}Li(n,t,u,m)}function DC(t,n,a,u){for(var d={},m=new Set,S=t.attributes,C=0;C<S.length;C++)switch(S[C].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:m.add(S[C].name)}if(Qo(n)){for(var R in a)if(a.hasOwnProperty(R)){var I=a[R];if(I!=null){if(El.hasOwnProperty(R))typeof I!="function"&&Ar(R,I);else if(a.suppressHydrationWarning!==!0)switch(R){case"children":typeof I!="string"&&typeof I!="number"||Li("children",t.textContent,I,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":S=t.innerHTML,I=I?I.__html:void 0,I!=null&&(I=xC(t,I),Li(R,S,I,d));continue;case"style":m.delete(R),wC(t,I,d);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":m.delete(R.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",R);continue;case"className":m.delete("class"),S=tt(t,"class",I),Li("className",S,I,d);continue;default:u.context===wa&&n!=="svg"&&n!=="math"?m.delete(R.toLowerCase()):m.delete(R),S=tt(t,R,I),Li(R,S,I,d)}}}}else for(I in a)if(a.hasOwnProperty(I)&&(R=a[I],R!=null)){if(El.hasOwnProperty(I))typeof R!="function"&&Ar(I,R);else if(a.suppressHydrationWarning!==!0)switch(I){case"children":typeof R!="string"&&typeof R!="number"||Li("children",t.textContent,R,d);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":S=t.innerHTML,R=R?R.__html:void 0,R!=null&&(R=xC(t,R),S!==R&&(d[I]={__html:S}));continue;case"className":ps(t,I,"class",R,m,d);continue;case"tabIndex":ps(t,I,"tabindex",R,m,d);continue;case"style":m.delete(I),wC(t,R,d);continue;case"multiple":m.delete(I),Li(I,t.multiple,R,d);continue;case"muted":m.delete(I),Li(I,t.muted,R,d);continue;case"autoFocus":m.delete("autofocus"),Li(I,t.autofocus,R,d);continue;case"data":if(n!=="object"){m.delete(I),S=t.getAttribute("data"),Li(I,S,R,d);continue}case"src":case"href":if(!(R!==""||n==="a"&&I==="href"||n==="object"&&I==="data")){console.error(I==="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.',I,I);continue}nb(t,I,I,R,m,d);continue;case"action":case"formAction":if(S=t.getAttribute(I),typeof R=="function"){m.delete(I.toLowerCase()),I==="formAction"?(m.delete("name"),m.delete("formenctype"),m.delete("formmethod"),m.delete("formtarget")):(m.delete("enctype"),m.delete("method"),m.delete("target"));continue}else if(S===Y6){m.delete(I.toLowerCase()),Li(I,"function",R,d);continue}nb(t,I,I.toLowerCase(),R,m,d);continue;case"xlinkHref":nb(t,I,"xlink:href",R,m,d);continue;case"contentEditable":ib(t,I,"contenteditable",R,m,d);continue;case"spellCheck":ib(t,I,"spellcheck",R,m,d);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":ib(t,I,I,R,m,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":AC(t,I,I.toLowerCase(),R,m,d);continue;case"capture":case"download":e:{C=t;var ee=S=I,ae=d;if(m.delete(ee),C=C.getAttribute(ee),C===null)switch(typeof R){case"undefined":case"function":case"symbol":break e;default:if(R===!1)break e}else if(R!=null)switch(typeof R){case"function":case"symbol":break;case"boolean":if(R===!0&&C==="")break e;break;default:if(Ae(R,S),C===""+R)break e}Li(S,C,R,ae)}continue;case"cols":case"rows":case"size":case"span":e:{if(C=t,ee=S=I,ae=d,m.delete(ee),C=C.getAttribute(ee),C===null)switch(typeof R){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(R)||1>R)break e}else if(R!=null)switch(typeof R){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(R)||1>R)&&(Ae(R,S),C===""+R))break e}Li(S,C,R,ae)}continue;case"rowSpan":kC(t,I,"rowspan",R,m,d);continue;case"start":kC(t,I,I,R,m,d);continue;case"xHeight":ps(t,I,"x-height",R,m,d);continue;case"xlinkActuate":ps(t,I,"xlink:actuate",R,m,d);continue;case"xlinkArcrole":ps(t,I,"xlink:arcrole",R,m,d);continue;case"xlinkRole":ps(t,I,"xlink:role",R,m,d);continue;case"xlinkShow":ps(t,I,"xlink:show",R,m,d);continue;case"xlinkTitle":ps(t,I,"xlink:title",R,m,d);continue;case"xlinkType":ps(t,I,"xlink:type",R,m,d);continue;case"xmlBase":ps(t,I,"xml:base",R,m,d);continue;case"xmlLang":ps(t,I,"xml:lang",R,m,d);continue;case"xmlSpace":ps(t,I,"xml:space",R,m,d);continue;case"inert":R!==""||Og[I]||(Og[I]=!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.",I)),AC(t,I,I,R,m,d);continue;default:if(!(2<I.length)||I[0]!=="o"&&I[0]!=="O"||I[1]!=="n"&&I[1]!=="N"){C=Zp(I),S=!1,u.context===wa&&n!=="svg"&&n!=="math"?m.delete(C.toLowerCase()):(ee=I.toLowerCase(),ee=eg.hasOwnProperty(ee)&&eg[ee]||null,ee!==null&&ee!==I&&(S=!0,m.delete(ee)),m.delete(C));e:if(ee=t,ae=C,C=R,ot(ae))if(ee.hasAttribute(ae))ee=ee.getAttribute(ae),Ae(C,ae),C=ee===""+C?C:ee;else{switch(typeof C){case"function":case"symbol":break e;case"boolean":if(ee=ae.toLowerCase().slice(0,5),ee!=="data-"&&ee!=="aria-")break e}C=C===void 0?void 0:null}else C=void 0;S||Li(I,C,R,d)}}}return 0<m.size&&a.suppressHydrationWarning!==!0&&PM(t,m,d),Object.keys(d).length===0?null:d}function BM(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 Um(t){return t.nodeType===9?t:t.ownerDocument}function OC(t){switch(t){case vc:return Wc;case Jm:return Lg;default:return wa}}function RC(t,n){if(t===wa)switch(n){case"svg":return Wc;case"math":return Lg;default:return wa}return t===Wc&&n==="foreignObject"?wa:t}function sb(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 UM(){var t=window.event;return t&&t.type==="popstate"?t===I_?!1:(I_=t,!0):(I_=null,!1)}function qM(t){setTimeout(function(){throw t})}function FM(t,n,a){switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&t.focus();break;case"img":a.src?t.src=a.src:a.srcSet&&(t.srcset=a.srcSet)}}function jM(t,n,a,u){NM(t,n,a,u),t[Ln]=u}function MC(t){Zr(t,"")}function HM(t,n,a){t.nodeValue=a}function lo(t){return t==="head"}function zM(t,n){t.removeChild(n)}function VM(t,n){(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).removeChild(n)}function LC(t,n){var a=n,u=0,d=0;do{var m=a.nextSibling;if(t.removeChild(a),m&&m.nodeType===8)if(a=m.data,a===Mg){if(0<u&&8>u){a=u;var S=t.ownerDocument;if(a&W6&&Fh(S.documentElement),a&Q6&&Fh(S.body),a&K6)for(a=S.head,Fh(a),S=a.firstChild;S;){var C=S.nextSibling,R=S.nodeName;S[Yh]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&S.rel.toLowerCase()==="stylesheet"||a.removeChild(S),S=C}}if(d===0){t.removeChild(m),Vh(n);return}d--}else a===Rg||a===Ca||a===kf?d++:u=a.charCodeAt(0)-48;else u=0;a=m}while(a);Vh(n)}function $M(t){t=t.style,typeof t.setProperty=="function"?t.setProperty("display","none","important"):t.display="none"}function GM(t){t.nodeValue=""}function YM(t,n){n=n[Z6],n=n!=null&&n.hasOwnProperty("display")?n.display:null,t.style.display=n==null||typeof n=="boolean"?"":(""+n).trim()}function XM(t,n){t.nodeValue=n}function rb(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":rb(a),or(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function WM(t,n,a,u){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Yh])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==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(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){Ae(d.name,"name");var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=ms(t.nextSibling),t===null)break}return null}function QM(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=ms(t.nextSibling),t===null))return null;return t}function ab(t){return t.data===kf||t.data===Ca&&t.ownerDocument.readyState===fk}function KM(t,n){var a=t.ownerDocument;if(t.data!==Ca||a.readyState===fk)n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function ms(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===Rg||n===kf||n===Ca||n===R_||n===hk)break;if(n===Mg)return null}}return t}function IC(t){if(t.nodeType===1){for(var n=t.nodeName.toLowerCase(),a={},u=t.attributes,d=0;d<u.length;d++){var m=u[d];a[CC(m.name)]=m.name.toLowerCase()==="style"?tb(t):m.value}return{type:n,props:a}}return t.nodeType===8?{type:"Suspense",props:{}}:t.nodeValue}function PC(t,n,a){return a===null||a[X6]!==!0?(t.nodeValue===n?t=null:(n=oo(n),t=oo(t.nodeValue)===n?null:t.nodeValue),t):null}function NC(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Mg){if(n===0)return ms(t.nextSibling);n--}else a!==Rg&&a!==kf&&a!==Ca||n++}t=t.nextSibling}return null}function BC(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a===Rg||a===kf||a===Ca){if(n===0)return t;n--}else a===Mg&&n++}t=t.previousSibling}return null}function ZM(t){Vh(t)}function JM(t){Vh(t)}function UC(t,n,a,u,d){switch(d&&$a(t,u.ancestorInfo),n=Um(a),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 eL(t,n,a,u){if(!a[po]&&$n(a)){var d=a.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=a.attributes;d.length;)a.removeAttributeNode(d[0]);zi(a,t,n),a[nn]=u,a[Ln]=n}function Fh(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);or(t)}function qm(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function qC(t,n,a){var u=Qc;if(u&&typeof n=="string"&&n){var d=vi(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),bk.has(d)||(bk.add(d),t={rel:t,crossOrigin:a,href:n},u.querySelector(d)===null&&(n=u.createElement("link"),zi(n,"link",t),Y(n),u.head.appendChild(n)))}}function FC(t,n,a,u){var d=(d=ho.current)?qm(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 a.precedence=="string"&&typeof a.href=="string"?(a=dc(a.href),n=k(d).hoistableStyles,u=n.get(a),u||(u={type:"style",instance:null,count:0,state:null},n.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=dc(a.href);var m=k(d).hoistableStyles,S=m.get(t);if(!S&&(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:Hl,preload:null}},m.set(t,S),(m=d.querySelector(jh(t)))&&!m._p&&(S.instance=m,S.state.loading=Df|ws),!As.has(t))){var C={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};As.set(t,C),m||tL(d,t,C,S.state)}if(n&&u===null)throw a=`
|
||
|
||
- `+Fm(n)+`
|
||
+ `+Fm(a),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."+a);return S}if(n&&u!==null)throw a=`
|
||
|
||
- `+Fm(n)+`
|
||
+ `+Fm(a),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."+a);return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=hc(a),n=k(d).hoistableScripts,u=n.get(a),u||(u={type:"script",instance:null,count:0,state:null},n.set(a,u)),u):{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 Fm(t){var n=0,a="<link";return typeof t.rel=="string"?(n++,a+=' rel="'+t.rel+'"'):ma.call(t,"rel")&&(n++,a+=' rel="'+(t.rel===null?"null":"invalid type "+typeof t.rel)+'"'),typeof t.href=="string"?(n++,a+=' href="'+t.href+'"'):ma.call(t,"href")&&(n++,a+=' href="'+(t.href===null?"null":"invalid type "+typeof t.href)+'"'),typeof t.precedence=="string"?(n++,a+=' precedence="'+t.precedence+'"'):ma.call(t,"precedence")&&(n++,a+=" precedence={"+(t.precedence===null?"null":"invalid type "+typeof t.precedence)+"}"),Object.getOwnPropertyNames(t).length>n&&(a+=" ..."),a+" />"}function dc(t){return'href="'+vi(t)+'"'}function jh(t){return'link[rel="stylesheet"]['+t+"]"}function jC(t){return ct({},t,{"data-precedence":t.precedence,precedence:null})}function tL(t,n,a,u){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=Df:(n=t.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=Df}),n.addEventListener("error",function(){return u.loading|=yk}),zi(n,"link",a),Y(n),t.head.appendChild(n))}function hc(t){return'[src="'+vi(t)+'"]'}function Hh(t){return"script[async]"+t}function HC(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+vi(a.href)+'"]');if(u)return n.instance=u,Y(u),u;var d=ct({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),Y(u),zi(u,"style",d),jm(u,a.precedence,t),n.instance=u;case"stylesheet":d=dc(a.href);var m=t.querySelector(jh(d));if(m)return n.state.loading|=ws,n.instance=m,Y(m),m;u=jC(a),(d=As.get(d))&&ob(u,d),m=(t.ownerDocument||t).createElement("link"),Y(m);var S=m;return S._p=new Promise(function(C,R){S.onload=C,S.onerror=R}),zi(m,"link",u),n.state.loading|=ws,jm(m,a.precedence,t),n.instance=m;case"script":return m=hc(a.src),(d=t.querySelector(Hh(m)))?(n.instance=d,Y(d),d):(u=a,(d=As.get(m))&&(u=ct({},a),lb(u,d)),t=t.ownerDocument||t,d=t.createElement("script"),Y(d),zi(d,"link",u),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&ws)===Hl&&(u=n.instance,n.state.loading|=ws,jm(u,a.precedence,t));return n.instance}function jm(t,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=u.length?u[u.length-1]:null,m=d,S=0;S<u.length;S++){var C=u[S];if(C.dataset.precedence===n)m=C;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function ob(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function lb(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}function zC(t,n,a){if(Ig===null){var u=new Map,d=Ig=new Map;d.set(a,u)}else d=Ig,u=d.get(a),u||(u=new Map,d.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var m=a[d];if(!(m[Yh]||m[nn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!==vc){var S=m.getAttribute(n)||"";S=t+S;var C=u.get(S);C?C.push(m):u.set(S,[m])}}return u}function VC(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function iL(t,n,a){var u=!a.ancestorInfo.containerTagInScope;if(a.context===Wc||n.itemProp!=null)return!u||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===""){u&&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,m=n.disabled;a=[],n.onLoad&&a.push("`onLoad`"),d&&a.push("`onError`"),m!=null&&a.push("`disabled`"),d=BM(a,"and"),d+=a.length===1?" prop":" props",m=a.length===1?"an "+d:"the "+d,a.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,m,d)}u&&(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"&&u&&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"){u&&(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":u&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",t)}return!1}function $C(t){return!(t.type==="stylesheet"&&(t.state.loading&vk)===Hl)}function nL(){}function sL(t,n,a){if(Of===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var u=Of;if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&ws)===Hl){if(n.instance===null){var d=dc(a.href),m=t.querySelector(jh(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=Hm.bind(u),t.then(u,u)),n.state.loading|=ws,n.instance=m,Y(m);return}m=t.ownerDocument||t,a=jC(a),(d=As.get(d))&&ob(a,d),m=m.createElement("link"),Y(m);var S=m;S._p=new Promise(function(C,R){S.onload=C,S.onerror=R}),zi(m,"link",a),n.instance=m}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&vk)===Hl&&(u.count++,n=Hm.bind(u),t.addEventListener("load",n),t.addEventListener("error",n))}}function rL(){if(Of===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var t=Of;return t.stylesheets&&t.count===0&&ub(t,t.stylesheets),0<t.count?function(n){var a=setTimeout(function(){if(t.stylesheets&&ub(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(a)}}:null}function Hm(){if(this.count--,this.count===0){if(this.stylesheets)ub(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function ub(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Pg=new Map,n.forEach(aL,t),Pg=null,Hm.call(t))}function aL(t,n){if(!(n.state.loading&ws)){var a=Pg.get(t);if(a)var u=a.get(N_);else{a=new Map,Pg.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var S=d[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),u=S)}u&&a.set(N_,u)}d=n.instance,S=d.getAttribute("data-precedence"),m=a.get(S)||u,m===u&&a.set(N_,d),a.set(S,d),this.count++,u=Hm.bind(this),d.addEventListener("load",u),d.addEventListener("error",u),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=ws}}function oL(t,n,a,u,d,m,S,C){for(this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=jl,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=u,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=S,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=a?"hydrateRoot()":"createRoot()"}function GC(t,n,a,u,d,m,S,C,R,I,ee,ae){return t=new oL(t,n,a,S,C,R,I,ae),n=E6,m===!0&&(n|=sn|zs),Hs&&(n|=$i),m=w(3,null,null,n),t.current=m,m.stateNode=t,n=sh(),sa(n),t.pooledCache=n,sa(n),m.memoizedState={element:u,isDehydrated:a,cache:n},pl(m),t}function YC(t){return t?(t=go,t):go}function cb(t,n,a,u,d,m){if(tn&&typeof tn.onScheduleFiberRoot=="function")try{tn.onScheduleFiberRoot(gc,u,a)}catch(S){Or||(Or=!0,console.error("React instrumentation encountered an error: %s",S))}Ne!==null&&typeof Ne.markRenderScheduled=="function"&&Ne.markRenderScheduled(n),d=YC(d),u.context===null?u.context=d:u.pendingContext=d,Mr&&ts!==null&&!xk&&(xk=!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.`,ye(ts)||"Unknown")),u=Rn(n),u.payload={element:a},m=m===void 0?null:m,m!==null&&(typeof m!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",m),u.callback=m),a=br(t,u,n),a!==null&&(hi(a,t,n),Qa(a,t,n))}function XC(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function db(t,n){XC(t,n),(t=t.alternate)&&XC(t,n)}function WC(t){if(t.tag===13){var n=Si(t,67108864);n!==null&&hi(n,t,67108864),db(t,67108864)}}function lL(){return ts}function uL(){for(var t=new Map,n=1,a=0;31>a;a++){var u=Mt(n);t.set(n,u),n*=2}return t}function cL(t,n,a,u){var d=re.T;re.T=null;var m=xt.p;try{xt.p=gs,hb(t,n,a,u)}finally{xt.p=m,re.T=d}}function dL(t,n,a,u){var d=re.T;re.T=null;var m=xt.p;try{xt.p=Rr,hb(t,n,a,u)}finally{xt.p=m,re.T=d}}function hb(t,n,a,u){if(Bg){var d=fb(u);if(d===null)Zv(t,n,u,Ug,a),KC(t,u);else if(hL(d,t,n,a,u))u.stopPropagation();else if(KC(t,u),n&4&&-1<iI.indexOf(t)){for(;d!==null;){var m=$n(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=Ze(m.pendingLanes);if(S!==0){var C=m;for(C.pendingLanes|=2,C.entangledLanes|=2;S;){var R=1<<31-hn(S);C.entanglements[1]|=R,S&=~R}wr(m),(Et&(yn|Ys))===is&&(Tg=Dr()+tk,Uh(0,!1))}}break;case 13:C=Si(m,2),C!==null&&hi(C,m,2),oc(),db(m,2)}if(m=fb(u),m===null&&Zv(t,n,u,Ug,a),m===d)break;d=m}d!==null&&u.stopPropagation()}else Zv(t,n,u,null,a)}}function fb(t){return t=qu(t),pb(t)}function pb(t){if(Ug=null,t=Ji(t),t!==null){var n=N(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=G(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Ug=t,null}function QC(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 gs;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 Rr;case"message":switch(xL()){case Cb:return gs;case wb:return Rr;case mc:case EL:return ga;case Ab:return Km;default:return ga}default:return ga}}function KC(t,n){switch(t){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":Ao=null;break;case"mouseover":case"mouseout":ko=null;break;case"pointerover":case"pointerout":Mf.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lf.delete(n.pointerId)}}function zh(t,n,a,u,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:m,targetContainers:[d]},n!==null&&(n=$n(n),n!==null&&WC(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function hL(t,n,a,u,d){switch(n){case"focusin":return wo=zh(wo,t,n,a,u,d),!0;case"dragenter":return Ao=zh(Ao,t,n,a,u,d),!0;case"mouseover":return ko=zh(ko,t,n,a,u,d),!0;case"pointerover":var m=d.pointerId;return Mf.set(m,zh(Mf.get(m)||null,t,n,a,u,d)),!0;case"gotpointercapture":return m=d.pointerId,Lf.set(m,zh(Lf.get(m)||null,t,n,a,u,d)),!0}return!1}function ZC(t){var n=Ji(t.target);if(n!==null){var a=N(n);if(a!==null){if(n=a.tag,n===13){if(n=G(a),n!==null){t.blockedOn=n,bt(t.priority,function(){if(a.tag===13){var u=Jn(a);u=Vn(u);var d=Si(a,u);d!==null&&hi(d,a,u),db(a,u)}});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function zm(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=fb(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a),d=u;Wh!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),Wh=d,a.target.dispatchEvent(u),Wh===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."),Wh=null}else return n=$n(a),n!==null&&WC(n),t.blockedOn=a,!1;n.shift()}return!0}function JC(t,n,a){zm(t)&&a.delete(n)}function fL(){B_=!1,wo!==null&&zm(wo)&&(wo=null),Ao!==null&&zm(Ao)&&(Ao=null),ko!==null&&zm(ko)&&(ko=null),Mf.forEach(JC),Lf.forEach(JC)}function Vm(t,n){t.blockedOn===n&&(t.blockedOn=null,B_||(B_=!0,bi.unstable_scheduleCallback(bi.unstable_NormalPriority,fL)))}function ew(t){qg!==t&&(qg=t,bi.unstable_scheduleCallback(bi.unstable_NormalPriority,function(){qg===t&&(qg=null);for(var n=0;n<t.length;n+=3){var a=t[n],u=t[n+1],d=t[n+2];if(typeof u!="function"){if(pb(u||a)===null)continue;break}var m=$n(a);m!==null&&(t.splice(n,3),n-=3,a={pending:!0,data:d,method:a.method,action:u},Object.freeze(a),dn(m,a,u,d))}}))}function Vh(t){function n(R){return Vm(R,t)}wo!==null&&Vm(wo,t),Ao!==null&&Vm(Ao,t),ko!==null&&Vm(ko,t),Mf.forEach(n),Lf.forEach(n);for(var a=0;a<Do.length;a++){var u=Do[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Do.length&&(a=Do[0],a.blockedOn===null);)ZC(a),a.blockedOn===null&&Do.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var d=a[u],m=a[u+1],S=d[Ln]||null;if(typeof m=="function")S||ew(a);else if(S){var C=null;if(m&&m.hasAttribute("formAction")){if(d=m,S=m[Ln]||null)C=S.formAction;else if(pb(d)!==null)continue}else C=S.action;typeof C=="function"?a[u+1]=C:(a.splice(u,3),u-=3),ew(a)}}}function mb(t){this._internalRoot=t}function $m(t){this._internalRoot=t}function tw(t){t[po]&&(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 bi=Bk(),gb=gt,pL=qk(),ct=Object.assign,mL=Symbol.for("react.element"),uo=Symbol.for("react.transitional.element"),fc=Symbol.for("react.portal"),pc=Symbol.for("react.fragment"),Gm=Symbol.for("react.strict_mode"),yb=Symbol.for("react.profiler"),gL=Symbol.for("react.provider"),vb=Symbol.for("react.consumer"),kr=Symbol.for("react.context"),$h=Symbol.for("react.forward_ref"),bb=Symbol.for("react.suspense"),_b=Symbol.for("react.suspense_list"),Ym=Symbol.for("react.memo"),es=Symbol.for("react.lazy"),Tb=Symbol.for("react.activity"),yL=Symbol.for("react.memo_cache_sentinel"),iw=Symbol.iterator,vL=Symbol.for("react.client.reference"),Vi=Array.isArray,re=gb.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xt=pL.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,bL=Object.freeze({pending:!1,data:null,method:null,action:null}),Sb=[],xb=[],pa=-1,co=_e(null),Gh=_e(null),ho=_e(null),Xm=_e(null),ma=Object.prototype.hasOwnProperty,Eb=bi.unstable_scheduleCallback,_L=bi.unstable_cancelCallback,TL=bi.unstable_shouldYield,SL=bi.unstable_requestPaint,Dr=bi.unstable_now,xL=bi.unstable_getCurrentPriorityLevel,Cb=bi.unstable_ImmediatePriority,wb=bi.unstable_UserBlockingPriority,mc=bi.unstable_NormalPriority,EL=bi.unstable_LowPriority,Ab=bi.unstable_IdlePriority,CL=bi.log,wL=bi.unstable_setDisableYieldValue,gc=null,tn=null,Ne=null,Or=!1,Hs=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",hn=Math.clz32?Math.clz32:Ge,AL=Math.log,kL=Math.LN2,Wm=256,Qm=4194304,gs=2,Rr=8,ga=32,Km=268435456,fo=Math.random().toString(36).slice(2),nn="__reactFiber$"+fo,Ln="__reactProps$"+fo,po="__reactContainer$"+fo,kb="__reactEvents$"+fo,DL="__reactListeners$"+fo,OL="__reactHandles$"+fo,nw="__reactResources$"+fo,Yh="__reactMarker$"+fo,sw=new Set,El={},Db={},RL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},ML=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]*$"),rw={},aw={},Xh=0,ow,lw,uw,cw,dw,hw,fw;Ms.__reactDisabledLog=!0;var Ob,pw,Rb=!1,Mb=new(typeof WeakMap=="function"?WeakMap:Map),ts=null,Mr=!1,LL=/[\n"\\]/g,mw=!1,gw=!1,yw=!1,vw=!1,bw=!1,_w=!1,Tw=["value","defaultValue"],Sw=!1,xw=/["'&<>\n\t]|^\s|\s$/,IL="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(" "),Ew="applet caption html table td th marquee object template foreignObject desc title".split(" "),PL=Ew.concat(["button"]),NL="dd dt li option optgroup p rp rt".split(" "),Cw={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Zm={},Lb={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"]},ww=/([A-Z])/g,Aw=/^ms-/,BL=/^(?:webkit|moz|o)[A-Z]/,UL=/^-ms-/,qL=/-(.)/g,kw=/;\s*$/,yc={},Ib={},Dw=!1,Ow=!1,Rw=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(" ")),Jm="http://www.w3.org/1998/Math/MathML",vc="http://www.w3.org/2000/svg",FL=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"]]),eg={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"},Mw={"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},bc={},jL=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]*$"),HL=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]*$"),Lw=!1,fn={},Iw=/^on./,zL=/^on[^A-Z]/,VL=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]*$"),$L=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]*$"),GL=/^[\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,Wh=null,_c=null,Tc=null,Pb=!1,Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nb=!1;if(Lr)try{var Qh={};Object.defineProperty(Qh,"passive",{get:function(){Nb=!0}}),window.addEventListener("test",Qh,Qh),window.removeEventListener("test",Qh,Qh)}catch{Nb=!1}var mo=null,Bb=null,tg=null,Cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ig=qi(Cl),Kh=ct({},Cl,{view:0,detail:0}),YL=qi(Kh),Ub,qb,Zh,ng=ct({},Kh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hu,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!==Zh&&(Zh&&t.type==="mousemove"?(Ub=t.screenX-Zh.screenX,qb=t.screenY-Zh.screenY):qb=Ub=0,Zh=t),Ub)},movementY:function(t){return"movementY"in t?t.movementY:qb}}),Pw=qi(ng),XL=ct({},ng,{dataTransfer:0}),WL=qi(XL),QL=ct({},Kh,{relatedTarget:0}),Fb=qi(QL),KL=ct({},Cl,{animationName:0,elapsedTime:0,pseudoElement:0}),ZL=qi(KL),JL=ct({},Cl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),e6=qi(JL),t6=ct({},Cl,{data:0}),Nw=qi(t6),i6=Nw,n6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s6={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"},r6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},a6=ct({},Kh,{key:function(t){if(t.key){var n=n6[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Fu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?s6[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hu,charCode:function(t){return t.type==="keypress"?Fu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Fu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),o6=qi(a6),l6=ct({},ng,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bw=qi(l6),u6=ct({},Kh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hu}),c6=qi(u6),d6=ct({},Cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),h6=qi(d6),f6=ct({},ng,{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}),p6=qi(f6),m6=ct({},Cl,{newState:0,oldState:0}),g6=qi(m6),y6=[9,13,27,32],Uw=229,jb=Lr&&"CompositionEvent"in window,Jh=null;Lr&&"documentMode"in document&&(Jh=document.documentMode);var v6=Lr&&"TextEvent"in window&&!Jh,qw=Lr&&(!jb||Jh&&8<Jh&&11>=Jh),Fw=32,jw=String.fromCharCode(Fw),Hw=!1,Sc=!1,b6={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},ef=null,tf=null,zw=!1;Lr&&(zw=av("input")&&(!document.documentMode||9<document.documentMode));var pn=typeof Object.is=="function"?Object.is:tl,_6=Lr&&"documentMode"in document&&11>=document.documentMode,xc=null,Hb=null,nf=null,zb=!1,Ec={animationend:Jr("Animation","AnimationEnd"),animationiteration:Jr("Animation","AnimationIteration"),animationstart:Jr("Animation","AnimationStart"),transitionrun:Jr("Transition","TransitionRun"),transitionstart:Jr("Transition","TransitionStart"),transitioncancel:Jr("Transition","TransitionCancel"),transitionend:Jr("Transition","TransitionEnd")},Vb={},Vw={};Lr&&(Vw=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);var $w=ea("animationend"),Gw=ea("animationiteration"),Yw=ea("animationstart"),T6=ea("transitionrun"),S6=ea("transitionstart"),x6=ea("transitioncancel"),Xw=ea("transitionend"),Ww=new Map,$b="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(" ");$b.push("scrollEnd");var Gb=new WeakMap,sg=1,ya=2,ys=[],Cc=0,Yb=0,go={};Object.freeze(go);var vs=null,wc=null,$t=0,E6=1,$i=2,sn=8,zs=16,Qw=64,Kw=!1;try{var Zw=Object.preventExtensions({})}catch{Kw=!0}var Ac=[],kc=0,rg=null,ag=0,bs=[],_s=0,wl=null,va=1,ba="",mn=null,ri=null,vt=!1,_a=!1,Ts=null,Al=null,Ir=!1,Xb=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."),Jw=0;if(typeof performance=="object"&&typeof performance.now=="function")var C6=performance,eA=function(){return C6.now()};else{var w6=Date;eA=function(){return w6.now()}}var Wb=_e(null),Qb=_e(null),tA={},og=null,Dc=null,Oc=!1,A6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},k6=bi.unstable_scheduleCallback,D6=bi.unstable_NormalPriority,Ei={$$typeof:kr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},Rc=bi.unstable_now,iA=-0,lg=-0,In=-1.1,kl=-0,ug=!1,cg=!1,sf=null,Kb=0,Dl=0,Mc=null,nA=re.S;re.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&rh(t,n),nA!==null&&nA(t,n)};var Ol=_e(null),Vs={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},rf=[],af=[],of=[],lf=[],uf=[],cf=[],Rl=new Set;Vs.recordUnsafeLifecycleWarnings=function(t,n){Rl.has(t.type)||(typeof n.componentWillMount=="function"&&n.componentWillMount.__suppressDeprecationWarning!==!0&&rf.push(t),t.mode&sn&&typeof n.UNSAFE_componentWillMount=="function"&&af.push(t),typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&of.push(t),t.mode&sn&&typeof n.UNSAFE_componentWillReceiveProps=="function"&&lf.push(t),typeof n.componentWillUpdate=="function"&&n.componentWillUpdate.__suppressDeprecationWarning!==!0&&uf.push(t),t.mode&sn&&typeof n.UNSAFE_componentWillUpdate=="function"&&cf.push(t))},Vs.flushPendingUnsafeLifecycleWarnings=function(){var t=new Set;0<rf.length&&(rf.forEach(function(C){t.add(ye(C)||"Component"),Rl.add(C.type)}),rf=[]);var n=new Set;0<af.length&&(af.forEach(function(C){n.add(ye(C)||"Component"),Rl.add(C.type)}),af=[]);var a=new Set;0<of.length&&(of.forEach(function(C){a.add(ye(C)||"Component"),Rl.add(C.type)}),of=[]);var u=new Set;0<lf.length&&(lf.forEach(function(C){u.add(ye(C)||"Component"),Rl.add(C.type)}),lf=[]);var d=new Set;0<uf.length&&(uf.forEach(function(C){d.add(ye(C)||"Component"),Rl.add(C.type)}),uf=[]);var m=new Set;if(0<cf.length&&(cf.forEach(function(C){m.add(ye(C)||"Component"),Rl.add(C.type)}),cf=[]),0<n.size){var S=x(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`,S)}0<u.size&&(S=x(u),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`,S)),0<m.size&&(S=x(m),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`,S)),0<t.size&&(S=x(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`,S)),0<a.size&&(S=x(a),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`,S)),0<d.size&&(S=x(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`,S))};var dg=new Map,sA=new Set;Vs.recordLegacyContextWarning=function(t,n){for(var a=null,u=t;u!==null;)u.mode&sn&&(a=u),u=u.return;a===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."):!sA.has(t.type)&&(u=dg.get(a),t.type.contextTypes!=null||t.type.childContextTypes!=null||n!==null&&typeof n.getChildContext=="function")&&(u===void 0&&(u=[],dg.set(a,u)),u.push(t))},Vs.flushLegacyContextWarning=function(){dg.forEach(function(t){if(t.length!==0){var n=t[0],a=new Set;t.forEach(function(d){a.add(ye(d)||"Component"),sA.add(d.type)});var u=x(a);He(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`,u)})}})},Vs.discardPendingWarnings=function(){rf=[],af=[],of=[],lf=[],uf=[],cf=[],dg=new Map};var df=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`."),rA=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."),hg=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."),Zb={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.')}},hf=null,fg=!1,Ss=0,xs=1,gn=2,Gi=4,Ci=8,aA=0,oA=1,lA=2,Jb=3,yo=!1,uA=!1,e_=null,t_=!1,Lc=_e(null),pg=_e(0),Ic,cA=new Set,dA=new Set,i_=new Set,hA=new Set,vo=0,et=null,Ut=null,_i=null,mg=!1,Pc=!1,Ml=!1,gg=0,ff=0,Ta=null,O6=0,R6=25,se=null,Es=null,Sa=-1,pf=!1,yg={readContext:Vt,use:Wn,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt},n_=null,fA=null,s_=null,pA=null,Pr=null,$s=null,vg=null;n_={readContext:function(t){return Vt(t)},use:Wn,useCallback:function(t,n){return se="useCallback",ut(),Ka(n),si(t,n)},useContext:function(t){return se="useContext",ut(),Vt(t)},useEffect:function(t,n){return se="useEffect",ut(),Ka(n),ne(t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",ut(),Ka(a),$e(t,n,a)},useInsertionEffect:function(t,n){se="useInsertionEffect",ut(),Ka(n),B(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",ut(),Ka(n),ke(t,n)},useMemo:function(t,n){se="useMemo",ut(),Ka(n);var a=re.H;re.H=Pr;try{return fs(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",ut();var u=re.H;re.H=Pr;try{return Sh(t,n,a)}finally{re.H=u}},useRef:function(t){return se="useRef",ut(),P(t)},useState:function(t){se="useState",ut();var n=re.H;re.H=Pr;try{return Mn(t)}finally{re.H=n}},useDebugValue:function(){se="useDebugValue",ut()},useDeferredValue:function(t,n){return se="useDeferredValue",ut(),oa(t,n)},useTransition:function(){return se="useTransition",ut(),mv()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",ut(),_l(t,n,a)},useId:function(){return se="useId",ut(),gv()},useFormState:function(t,n){return se="useFormState",ut(),ic(),g(t,n)},useActionState:function(t,n){return se="useActionState",ut(),g(t,n)},useOptimistic:function(t){return se="useOptimistic",ut(),Ch(t)},useHostTransitionStatus:Tl,useMemoCache:hs,useCacheRefresh:function(){return se="useCacheRefresh",ut(),yv()}},fA={readContext:function(t){return Vt(t)},use:Wn,useCallback:function(t,n){return se="useCallback",Se(),si(t,n)},useContext:function(t){return se="useContext",Se(),Vt(t)},useEffect:function(t,n){return se="useEffect",Se(),ne(t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",Se(),$e(t,n,a)},useInsertionEffect:function(t,n){se="useInsertionEffect",Se(),B(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",Se(),ke(t,n)},useMemo:function(t,n){se="useMemo",Se();var a=re.H;re.H=Pr;try{return fs(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",Se();var u=re.H;re.H=Pr;try{return Sh(t,n,a)}finally{re.H=u}},useRef:function(t){return se="useRef",Se(),P(t)},useState:function(t){se="useState",Se();var n=re.H;re.H=Pr;try{return Mn(t)}finally{re.H=n}},useDebugValue:function(){se="useDebugValue",Se()},useDeferredValue:function(t,n){return se="useDeferredValue",Se(),oa(t,n)},useTransition:function(){return se="useTransition",Se(),mv()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",Se(),_l(t,n,a)},useId:function(){return se="useId",Se(),gv()},useActionState:function(t,n){return se="useActionState",Se(),g(t,n)},useFormState:function(t,n){return se="useFormState",Se(),ic(),g(t,n)},useOptimistic:function(t){return se="useOptimistic",Se(),Ch(t)},useHostTransitionStatus:Tl,useMemoCache:hs,useCacheRefresh:function(){return se="useCacheRefresh",Se(),yv()}},s_={readContext:function(t){return Vt(t)},use:Wn,useCallback:function(t,n){return se="useCallback",Se(),Mi(t,n)},useContext:function(t){return se="useContext",Se(),Vt(t)},useEffect:function(t,n){se="useEffect",Se(),z(2048,Ci,t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",Se(),Qe(t,n,a)},useInsertionEffect:function(t,n){return se="useInsertionEffect",Se(),z(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",Se(),z(4,Gi,t,n)},useMemo:function(t,n){se="useMemo",Se();var a=re.H;re.H=$s;try{return Sr(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",Se();var u=re.H;re.H=$s;try{return Ja(t,n,a)}finally{re.H=u}},useRef:function(){return se="useRef",Se(),Tt().memoizedState},useState:function(){se="useState",Se();var t=re.H;re.H=$s;try{return Ja(Qn)}finally{re.H=t}},useDebugValue:function(){se="useDebugValue",Se()},useDeferredValue:function(t,n){return se="useDeferredValue",Se(),eo(t,n)},useTransition:function(){return se="useTransition",Se(),Kx()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",Se(),nc(t,n,a)},useId:function(){return se="useId",Se(),Tt().memoizedState},useFormState:function(t){return se="useFormState",Se(),ic(),y(t)},useActionState:function(t){return se="useActionState",Se(),y(t)},useOptimistic:function(t,n){return se="useOptimistic",Se(),wh(t,n)},useHostTransitionStatus:Tl,useMemoCache:hs,useCacheRefresh:function(){return se="useCacheRefresh",Se(),Tt().memoizedState}},pA={readContext:function(t){return Vt(t)},use:Wn,useCallback:function(t,n){return se="useCallback",Se(),Mi(t,n)},useContext:function(t){return se="useContext",Se(),Vt(t)},useEffect:function(t,n){se="useEffect",Se(),z(2048,Ci,t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",Se(),Qe(t,n,a)},useInsertionEffect:function(t,n){return se="useInsertionEffect",Se(),z(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",Se(),z(4,Gi,t,n)},useMemo:function(t,n){se="useMemo",Se();var a=re.H;re.H=vg;try{return Sr(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",Se();var u=re.H;re.H=vg;try{return bl(t,n,a)}finally{re.H=u}},useRef:function(){return se="useRef",Se(),Tt().memoizedState},useState:function(){se="useState",Se();var t=re.H;re.H=vg;try{return bl(Qn)}finally{re.H=t}},useDebugValue:function(){se="useDebugValue",Se()},useDeferredValue:function(t,n){return se="useDeferredValue",Se(),to(t,n)},useTransition:function(){return se="useTransition",Se(),Zx()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",Se(),nc(t,n,a)},useId:function(){return se="useId",Se(),Tt().memoizedState},useFormState:function(t){return se="useFormState",Se(),ic(),E(t)},useActionState:function(t){return se="useActionState",Se(),E(t)},useOptimistic:function(t,n){return se="useOptimistic",Se(),ym(t,n)},useHostTransitionStatus:Tl,useMemoCache:hs,useCacheRefresh:function(){return se="useCacheRefresh",Se(),Tt().memoizedState}},Pr={readContext:function(t){return b(),Vt(t)},use:function(t){return p(),Wn(t)},useCallback:function(t,n){return se="useCallback",p(),ut(),si(t,n)},useContext:function(t){return se="useContext",p(),ut(),Vt(t)},useEffect:function(t,n){return se="useEffect",p(),ut(),ne(t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",p(),ut(),$e(t,n,a)},useInsertionEffect:function(t,n){se="useInsertionEffect",p(),ut(),B(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",p(),ut(),ke(t,n)},useMemo:function(t,n){se="useMemo",p(),ut();var a=re.H;re.H=Pr;try{return fs(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",p(),ut();var u=re.H;re.H=Pr;try{return Sh(t,n,a)}finally{re.H=u}},useRef:function(t){return se="useRef",p(),ut(),P(t)},useState:function(t){se="useState",p(),ut();var n=re.H;re.H=Pr;try{return Mn(t)}finally{re.H=n}},useDebugValue:function(){se="useDebugValue",p(),ut()},useDeferredValue:function(t,n){return se="useDeferredValue",p(),ut(),oa(t,n)},useTransition:function(){return se="useTransition",p(),ut(),mv()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",p(),ut(),_l(t,n,a)},useId:function(){return se="useId",p(),ut(),gv()},useFormState:function(t,n){return se="useFormState",p(),ut(),g(t,n)},useActionState:function(t,n){return se="useActionState",p(),ut(),g(t,n)},useOptimistic:function(t){return se="useOptimistic",p(),ut(),Ch(t)},useMemoCache:function(t){return p(),hs(t)},useHostTransitionStatus:Tl,useCacheRefresh:function(){return se="useCacheRefresh",ut(),yv()}},$s={readContext:function(t){return b(),Vt(t)},use:function(t){return p(),Wn(t)},useCallback:function(t,n){return se="useCallback",p(),Se(),Mi(t,n)},useContext:function(t){return se="useContext",p(),Se(),Vt(t)},useEffect:function(t,n){se="useEffect",p(),Se(),z(2048,Ci,t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",p(),Se(),Qe(t,n,a)},useInsertionEffect:function(t,n){return se="useInsertionEffect",p(),Se(),z(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",p(),Se(),z(4,Gi,t,n)},useMemo:function(t,n){se="useMemo",p(),Se();var a=re.H;re.H=$s;try{return Sr(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",p(),Se();var u=re.H;re.H=$s;try{return Ja(t,n,a)}finally{re.H=u}},useRef:function(){return se="useRef",p(),Se(),Tt().memoizedState},useState:function(){se="useState",p(),Se();var t=re.H;re.H=$s;try{return Ja(Qn)}finally{re.H=t}},useDebugValue:function(){se="useDebugValue",p(),Se()},useDeferredValue:function(t,n){return se="useDeferredValue",p(),Se(),eo(t,n)},useTransition:function(){return se="useTransition",p(),Se(),Kx()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",p(),Se(),nc(t,n,a)},useId:function(){return se="useId",p(),Se(),Tt().memoizedState},useFormState:function(t){return se="useFormState",p(),Se(),y(t)},useActionState:function(t){return se="useActionState",p(),Se(),y(t)},useOptimistic:function(t,n){return se="useOptimistic",p(),Se(),wh(t,n)},useMemoCache:function(t){return p(),hs(t)},useHostTransitionStatus:Tl,useCacheRefresh:function(){return se="useCacheRefresh",Se(),Tt().memoizedState}},vg={readContext:function(t){return b(),Vt(t)},use:function(t){return p(),Wn(t)},useCallback:function(t,n){return se="useCallback",p(),Se(),Mi(t,n)},useContext:function(t){return se="useContext",p(),Se(),Vt(t)},useEffect:function(t,n){se="useEffect",p(),Se(),z(2048,Ci,t,n)},useImperativeHandle:function(t,n,a){return se="useImperativeHandle",p(),Se(),Qe(t,n,a)},useInsertionEffect:function(t,n){return se="useInsertionEffect",p(),Se(),z(4,gn,t,n)},useLayoutEffect:function(t,n){return se="useLayoutEffect",p(),Se(),z(4,Gi,t,n)},useMemo:function(t,n){se="useMemo",p(),Se();var a=re.H;re.H=$s;try{return Sr(t,n)}finally{re.H=a}},useReducer:function(t,n,a){se="useReducer",p(),Se();var u=re.H;re.H=$s;try{return bl(t,n,a)}finally{re.H=u}},useRef:function(){return se="useRef",p(),Se(),Tt().memoizedState},useState:function(){se="useState",p(),Se();var t=re.H;re.H=$s;try{return bl(Qn)}finally{re.H=t}},useDebugValue:function(){se="useDebugValue",p(),Se()},useDeferredValue:function(t,n){return se="useDeferredValue",p(),Se(),to(t,n)},useTransition:function(){return se="useTransition",p(),Se(),Zx()},useSyncExternalStore:function(t,n,a){return se="useSyncExternalStore",p(),Se(),nc(t,n,a)},useId:function(){return se="useId",p(),Se(),Tt().memoizedState},useFormState:function(t){return se="useFormState",p(),Se(),E(t)},useActionState:function(t){return se="useActionState",p(),Se(),E(t)},useOptimistic:function(t,n){return se="useOptimistic",p(),Se(),ym(t,n)},useMemoCache:function(t){return p(),hs(t)},useHostTransitionStatus:Tl,useCacheRefresh:function(){return se="useCacheRefresh",Se(),Tt().memoizedState}};var mA={"react-stack-bottom-frame":function(t,n,a){var u=Mr;Mr=!0;try{return t(n,a)}finally{Mr=u}}},r_=mA["react-stack-bottom-frame"].bind(mA),gA={"react-stack-bottom-frame":function(t){var n=Mr;Mr=!0;try{return t.render()}finally{Mr=n}}},yA=gA["react-stack-bottom-frame"].bind(gA),vA={"react-stack-bottom-frame":function(t,n){try{n.componentDidMount()}catch(a){Nt(t,t.return,a)}}},a_=vA["react-stack-bottom-frame"].bind(vA),bA={"react-stack-bottom-frame":function(t,n,a,u,d){try{n.componentDidUpdate(a,u,d)}catch(m){Nt(t,t.return,m)}}},_A=bA["react-stack-bottom-frame"].bind(bA),TA={"react-stack-bottom-frame":function(t,n){var a=n.stack;t.componentDidCatch(n.value,{componentStack:a!==null?a:""})}},M6=TA["react-stack-bottom-frame"].bind(TA),SA={"react-stack-bottom-frame":function(t,n,a){try{a.componentWillUnmount()}catch(u){Nt(t,n,u)}}},xA=SA["react-stack-bottom-frame"].bind(SA),EA={"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}},L6=EA["react-stack-bottom-frame"].bind(EA),CA={"react-stack-bottom-frame":function(t,n,a){try{a()}catch(u){Nt(t,n,u)}}},I6=CA["react-stack-bottom-frame"].bind(CA),wA={"react-stack-bottom-frame":function(t){var n=t._init;return n(t._payload)}},bo=wA["react-stack-bottom-frame"].bind(wA),Nc=null,mf=0,lt=null,o_,AA=o_=!1,kA={},DA={},OA={};f=function(t,n,a){if(a!==null&&typeof a=="object"&&a._store&&(!a._store.validated&&a.key==null||a._store.validated===2)){if(typeof a._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.");a._store.validated=1;var u=ye(t),d=u||"null";if(!kA[d]){kA[d]=!0,a=a._owner,t=t._debugOwner;var m="";t&&typeof t.tag=="number"&&(d=ye(t))&&(m=`
|
||
|
||
Check the render method of \``+d+"`."),m||u&&(m=`
|
||
|
||
Check the top-level render call using <`+u+">.");var S="";a!=null&&t!==a&&(u=null,typeof a.tag=="number"?u=ye(a):typeof a.name=="string"&&(u=a.name),u&&(S=" It was passed a child from "+u+".")),He(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.',m,S)})}}};var Bc=iE(!0),RA=iE(!1),Cs=_e(null),Nr=null,Uc=1,gf=2,wi=_e(0),MA={},LA=new Set,IA=new Set,PA=new Set,NA=new Set,BA=new Set,UA=new Set,qA=new Set,FA=new Set,jA=new Set,HA=new Set;Object.freeze(MA);var l_={enqueueSetState:function(t,n,a){t=t._reactInternals;var u=Jn(t),d=Rn(u);d.payload=n,a!=null&&(bv(a),d.callback=a),n=br(t,d,u),n!==null&&(hi(n,t,u),Qa(n,t,u)),Ie(t,u)},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var u=Jn(t),d=Rn(u);d.tag=oA,d.payload=n,a!=null&&(bv(a),d.callback=a),n=br(t,d,u),n!==null&&(hi(n,t,u),Qa(n,t,u)),Ie(t,u)},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=Jn(t),u=Rn(a);u.tag=lA,n!=null&&(bv(n),u.callback=n),n=br(t,u,a),n!==null&&(hi(n,t,a),Qa(n,t,a)),Ne!==null&&typeof Ne.markForceUpdateScheduled=="function"&&Ne.markForceUpdateScheduled(t,a)}},u_=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)},qc=null,c_=null,zA=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."),Ii=!1,VA={},$A={},GA={},YA={},Fc=!1,XA={},d_={},h_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},WA=!1,QA=null;QA=new Set;var xa=!1,fi=!1,f_=!1,KA=typeof WeakSet=="function"?WeakSet:Set,Pi=null,jc=null,Hc=null,Ti=null,Pn=!1,Gs=null,yf=8192,P6={getCacheForType:function(t){var n=Vt(Ei),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},getOwner:function(){return ts}};if(typeof Symbol=="function"&&Symbol.for){var vf=Symbol.for;vf("selector.component"),vf("selector.has_pseudo_class"),vf("selector.role"),vf("selector.test_id"),vf("selector.text")}var N6=[],B6=typeof WeakMap=="function"?WeakMap:Map,is=0,yn=2,Ys=4,Ea=0,bf=1,zc=2,p_=3,Ll=4,bg=6,ZA=5,Et=is,jt=null,ht=null,ft=0,Nn=0,_f=1,Il=2,Tf=3,JA=4,m_=5,Vc=6,Sf=7,g_=8,Pl=9,Ot=Nn,ns=null,_o=!1,$c=!1,y_=!1,Br=0,ai=Ea,To=0,So=0,v_=0,ss=0,Nl=0,xf=null,vn=null,_g=!1,b_=0,ek=300,Tg=1/0,tk=500,Ef=null,xo=null,U6=0,q6=1,F6=2,Bl=0,ik=1,nk=2,sk=3,j6=4,__=5,Yi=0,Eo=null,Gc=null,Co=0,T_=0,S_=null,rk=null,H6=50,Cf=0,x_=null,E_=!1,Sg=!1,z6=50,Ul=0,wf=null,Yc=!1,xg=null,ak=!1,ok=new Set,V6={},Eg=null,Xc=null,C_=!1,w_=!1,Cg=!1,A_=!1,ql=0,k_={};(function(){for(var t=0;t<$b.length;t++){var n=$b[t],a=n.toLowerCase();n=n[0].toUpperCase()+n.slice(1),Yn(a,"on"+n)}Yn($w,"onAnimationEnd"),Yn(Gw,"onAnimationIteration"),Yn(Yw,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(T6,"onTransitionRun"),Yn(S6,"onTransitionStart"),Yn(x6,"onTransitionCancel"),Yn(Xw,"onTransitionEnd")})(),Re("onMouseEnter",["mouseout","mouseover"]),Re("onMouseLeave",["mouseout","mouseover"]),Re("onPointerEnter",["pointerout","pointerover"]),Re("onPointerLeave",["pointerout","pointerover"]),Ce("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ce("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ce("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ce("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ce("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ce("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Af="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(" "),D_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Af)),wg="_reactListening"+Math.random().toString(36).slice(2),lk=!1,uk=!1,Ag=!1,ck=!1,kg=!1,Dg=!1,dk=!1,Og={},$6=/\r\n?/g,G6=/\u0000|\uFFFD/g,Fl="http://www.w3.org/1999/xlink",O_="http://www.w3.org/XML/1998/namespace",Y6="javascript:throw new Error('React form unexpectedly submitted.')",X6="suppressHydrationWarning",Rg="$",Mg="/$",Ca="$?",kf="$!",W6=1,Q6=2,K6=4,R_="F!",hk="F",fk="complete",Z6="style",wa=0,Wc=1,Lg=2,M_=null,L_=null,pk={dialog:!0,webview:!0},I_=null,mk=typeof setTimeout=="function"?setTimeout:void 0,J6=typeof clearTimeout=="function"?clearTimeout:void 0,jl=-1,gk=typeof Promise=="function"?Promise:void 0,eI=typeof queueMicrotask=="function"?queueMicrotask:typeof gk<"u"?function(t){return gk.resolve(null).then(t).catch(qM)}:mk,P_=null,Hl=0,Df=1,yk=2,vk=3,ws=4,As=new Map,bk=new Set,Aa=xt.d;xt.d={f:function(){var t=Aa.f(),n=oc();return t||n},r:function(t){var n=$n(t);n!==null&&n.tag===5&&n.type==="form"?Qx(n):Aa.r(t)},D:function(t){Aa.D(t),qC("dns-prefetch",t,null)},C:function(t,n){Aa.C(t,n),qC("preconnect",t,n)},L:function(t,n,a){Aa.L(t,n,a);var u=Qc;if(u&&t&&n){var d='link[rel="preload"][as="'+vi(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+vi(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+vi(a.imageSizes)+'"]')):d+='[href="'+vi(t)+'"]';var m=d;switch(n){case"style":m=dc(t);break;case"script":m=hc(t)}As.has(m)||(t=ct({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),As.set(m,t),u.querySelector(d)!==null||n==="style"&&u.querySelector(jh(m))||n==="script"&&u.querySelector(Hh(m))||(n=u.createElement("link"),zi(n,"link",t),Y(n),u.head.appendChild(n)))}},m:function(t,n){Aa.m(t,n);var a=Qc;if(a&&t){var u=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+vi(u)+'"][href="'+vi(t)+'"]',m=d;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=hc(t)}if(!As.has(m)&&(t=ct({rel:"modulepreload",href:t},n),As.set(m,t),a.querySelector(d)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Hh(m)))return}u=a.createElement("link"),zi(u,"link",t),Y(u),a.head.appendChild(u)}}},X:function(t,n){Aa.X(t,n);var a=Qc;if(a&&t){var u=k(a).hoistableScripts,d=hc(t),m=u.get(d);m||(m=a.querySelector(Hh(d)),m||(t=ct({src:t,async:!0},n),(n=As.get(d))&&lb(t,n),m=a.createElement("script"),Y(m),zi(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(d,m))}},S:function(t,n,a){Aa.S(t,n,a);var u=Qc;if(u&&t){var d=k(u).hoistableStyles,m=dc(t);n=n||"default";var S=d.get(m);if(!S){var C={loading:Hl,preload:null};if(S=u.querySelector(jh(m)))C.loading=Df|ws;else{t=ct({rel:"stylesheet",href:t,"data-precedence":n},a),(a=As.get(m))&&ob(t,a);var R=S=u.createElement("link");Y(R),zi(R,"link",t),R._p=new Promise(function(I,ee){R.onload=I,R.onerror=ee}),R.addEventListener("load",function(){C.loading|=Df}),R.addEventListener("error",function(){C.loading|=yk}),C.loading|=ws,jm(S,n,u)}S={type:"stylesheet",instance:S,count:1,state:C},d.set(m,S)}}},M:function(t,n){Aa.M(t,n);var a=Qc;if(a&&t){var u=k(a).hoistableScripts,d=hc(t),m=u.get(d);m||(m=a.querySelector(Hh(d)),m||(t=ct({src:t,async:!0,type:"module"},n),(n=As.get(d))&&lb(t,n),m=a.createElement("script"),Y(m),zi(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(d,m))}}};var Qc=typeof document>"u"?null:document,Ig=null,Of=null,N_=null,Pg=null,zl=bL,Rf={$$typeof:kr,Provider:null,Consumer:null,_currentValue:zl,_currentValue2:zl,_threadCount:0},_k="%c%s%c ",Tk="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",Sk="",Ng=" ",tI=Function.prototype.bind,xk=!1,Ek=null,Ck=null,wk=null,Ak=null,kk=null,Dk=null,Ok=null,Rk=null,Mk=null;Ek=function(t,n,a,u){n=r(t,n),n!==null&&(a=e(n.memoizedState,a,0,u),n.memoizedState=a,n.baseState=a,t.memoizedProps=ct({},t.memoizedProps),a=Si(t,2),a!==null&&hi(a,t,2))},Ck=function(t,n,a){n=r(t,n),n!==null&&(a=o(n.memoizedState,a,0),n.memoizedState=a,n.baseState=a,t.memoizedProps=ct({},t.memoizedProps),a=Si(t,2),a!==null&&hi(a,t,2))},wk=function(t,n,a,u){n=r(t,n),n!==null&&(a=i(n.memoizedState,a,u),n.memoizedState=a,n.baseState=a,t.memoizedProps=ct({},t.memoizedProps),a=Si(t,2),a!==null&&hi(a,t,2))},Ak=function(t,n,a){t.pendingProps=e(t.memoizedProps,n,0,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=Si(t,2),n!==null&&hi(n,t,2)},kk=function(t,n){t.pendingProps=o(t.memoizedProps,n,0),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=Si(t,2),n!==null&&hi(n,t,2)},Dk=function(t,n,a){t.pendingProps=i(t.memoizedProps,n,a),t.alternate&&(t.alternate.pendingProps=t.pendingProps),n=Si(t,2),n!==null&&hi(n,t,2)},Ok=function(t){var n=Si(t,2);n!==null&&hi(n,t,2)},Rk=function(t){c=t},Mk=function(t){l=t};var Bg=!0,Ug=null,B_=!1,wo=null,Ao=null,ko=null,Mf=new Map,Lf=new Map,Do=[],iI="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(" "),qg=null;if($m.prototype.render=mb.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error("Cannot update an unmounted root.");var a=arguments;typeof a[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()."):q(a[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 a[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),a=t;var u=n.current,d=Jn(u);cb(u,d,a,n,null,null)},$m.prototype.unmount=mb.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;(Et&(yn|Ys))!==is&&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."),cb(t.current,2,null,t,null,null),oc(),n[po]=null}},$m.prototype.unstable_scheduleHydration=function(t){if(t){var n=Ha();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Do.length&&n!==0&&n<Do[a].priority;a++);Do.splice(a,0,t),a===0&&ZC(t)}},function(){var t=gb.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"),xt.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=X(n),t=t!==null?W(t):null,t=t===null?null:t.stateNode,t},!function(){var t={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.1.0"};return t.overrideHookState=Ek,t.overrideHookStateDeletePath=Ck,t.overrideHookStateRenamePath=wk,t.overrideProps=Ak,t.overridePropsDeletePath=kk,t.overridePropsRenamePath=Dk,t.scheduleUpdate=Ok,t.setErrorHandler=Rk,t.setSuspenseHandler=Mk,t.scheduleRefresh=M,t.scheduleRoot=D,t.setRefreshHandler=A,t.getCurrentFiber=lL,t.getLaneLabelMap=uL,t.injectProfilingHooks=be,qe(t)}()&&Lr&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Lk=window.location.protocol;/^(https?|file):$/.test(Lk)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Lk==="file:"?`
|
||
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}Jc.createRoot=function(t,n){if(!q(t))throw Error("Target container is not a DOM element.");tw(t);var a=!1,u="",d=aE,m=oE,S=lE,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===uo&&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&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(C=n.unstable_transitionCallbacks)),n=GC(t,1,!1,null,null,a,u,d,m,S,C,null),t[po]=n.current,Kv(t),new mb(n)},Jc.hydrateRoot=function(t,n,a){if(!q(t))throw Error("Target container is not a DOM element.");tw(t),n===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var u=!1,d="",m=aE,S=oE,C=lE,R=null,I=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(R=a.unstable_transitionCallbacks),a.formState!==void 0&&(I=a.formState)),n=GC(t,1,!0,n,a??null,u,d,m,S,C,R,I),n.context=YC(null),a=n.current,u=Jn(a),u=Vn(u),d=Rn(u),d.callback=null,br(a,d,u),a=u,n.current.lanes=a,ui(n,a),wr(n),t[po]=n.current,Kv(t),new $m(n)},Jc.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Jc}H_.exports=Fk();var If=H_.exports,ed;typeof window<"u"?ed=window:typeof Xs<"u"?ed=Xs:typeof self<"u"?ed=self:ed={};var Pf=ed;const U=Un(Pf),jk=Da(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var X_=typeof Xs<"u"?Xs:typeof window<"u"?window:{},Hk=jk,td;typeof document<"u"?td=document:(td=X_["__GLOBAL_DOCUMENT_CACHE@4"],td||(td=X_["__GLOBAL_DOCUMENT_CACHE@4"]=Hk));var W_=td;const xe=Un(W_);var Vg={exports:{}};function ei(){return ei=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)({}).hasOwnProperty.call(i,s)&&(r[s]=i[s])}return r},ei.apply(null,arguments)}const zk=Da(Object.freeze(Object.defineProperty({__proto__:null,get default(){return ei}},Symbol.toStringTag,{value:"Module"})));var Vk=Gk,$k=Object.prototype.toString;function Gk(r){if(!r)return!1;var e=$k.call(r);return e==="[object Function]"||typeof r=="function"&&e!=="[object RegExp]"||typeof window<"u"&&(r===window.setTimeout||r===window.alert||r===window.confirm||r===window.prompt)}function Yk(r,e){var i=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i)return(i=i.call(r)).next.bind(i);if(Array.isArray(r)||(i=Xk(r))||e&&r&&typeof r.length=="number"){i&&(r=i);var s=0;return function(){return s>=r.length?{done:!0}:{done:!1,value:r[s++]}}}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 Xk(r,e){if(r){if(typeof r=="string")return Q_(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Q_(r,e)}}function Q_(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=r[i];return s}var Wk=function(){function r(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var e=r.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(s,o){this.typeToInterceptorsMap_.has(s)||this.typeToInterceptorsMap_.set(s,new Set);var l=this.typeToInterceptorsMap_.get(s);return l.has(o)?!1:(l.add(o),!0)},e.removeInterceptor=function(s,o){var l=this.typeToInterceptorsMap_.get(s);return l&&l.has(o)?(l.delete(o),!0):!1},e.clearInterceptorsByType=function(s){var o=this.typeToInterceptorsMap_.get(s);return o?(this.typeToInterceptorsMap_.delete(s),this.typeToInterceptorsMap_.set(s,new Set),!0):!1},e.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},e.getForType=function(s){return this.typeToInterceptorsMap_.get(s)||new Set},e.execute=function(s,o){for(var l=this.getForType(s),c=Yk(l),f;!(f=c()).done;){var p=f.value;try{o=p(o)}catch{}}return o},r}(),Qk=Wk,Kk=function(){function r(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var e=r.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(s){this.maxAttempts_=s},e.getDelayFactor=function(){return this.delayFactor_},e.setDelayFactor=function(s){this.delayFactor_=s},e.getFuzzFactor=function(){return this.fuzzFactor_},e.setFuzzFactor=function(s){this.fuzzFactor_=s},e.getInitialDelay=function(){return this.initialDelay_},e.setInitialDelay=function(s){this.initialDelay_=s},e.createRetry=function(s){var o=s===void 0?{}:s,l=o.maxAttempts,c=o.delayFactor,f=o.fuzzFactor,p=o.initialDelay;return new Zk({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:p||this.initialDelay_})},r}(),Zk=function(){function r(i){this.maxAttempts_=i.maxAttempts,this.delayFactor_=i.delayFactor,this.fuzzFactor_=i.fuzzFactor,this.currentDelay_=i.initialDelay,this.currentAttempt_=1}var e=r.prototype;return e.moveToNextAttempt=function(){this.currentAttempt_++;var s=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+s},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 s=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return s+Math.random()*(o-s)},r}(),Jk=Kk,eD=Pf,tD=function(e,i){return i===void 0&&(i=!1),function(s,o,l){if(s){e(s);return}if(o.statusCode>=400&&o.statusCode<=599){var c=l;if(i)if(eD.TextDecoder){var f=iD(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(f).decode(l)}catch{}}else c=String.fromCharCode.apply(null,new Uint8Array(l));e({cause:c});return}e(null,l)}};function iD(r){return r===void 0&&(r=""),r.toLowerCase().split(";").reduce(function(e,i){var s=i.split("="),o=s[0],l=s[1];return o.trim()==="charset"?l.trim():e},"utf-8")}var nD=tD,K_=Pf,sD=zk,rD=Vk,Z_=Qk,aD=Jk;oi.httpHandler=nD,oi.requestInterceptorsStorage=new Z_,oi.responseInterceptorsStorage=new Z_,oi.retryManager=new aD;/**
|
||
* @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 oD=function(e){var i={};return e&&e.trim().split(`
|
||
`).forEach(function(s){var o=s.indexOf(":"),l=s.slice(0,o).trim().toLowerCase(),c=s.slice(o+1).trim();typeof i[l]>"u"?i[l]=c:Array.isArray(i[l])?i[l].push(c):i[l]=[i[l],c]}),i};Vg.exports=oi,Vg.exports.default=oi,oi.XMLHttpRequest=K_.XMLHttpRequest||dD,oi.XDomainRequest="withCredentials"in new oi.XMLHttpRequest?oi.XMLHttpRequest:K_.XDomainRequest,lD(["get","put","post","patch","head","delete"],function(r){oi[r==="delete"?"del":r]=function(e,i,s){return i=J_(e,i,s),i.method=r.toUpperCase(),$g(i)}});function lD(r,e){for(var i=0;i<r.length;i++)e(r[i])}function uD(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0}function J_(r,e,i){var s=r;return rD(e)?(i=e,typeof r=="string"&&(s={uri:r})):s=sD({},e,{uri:r}),s.callback=i,s}function oi(r,e,i){return e=J_(r,e,i),$g(e)}function $g(r){if(typeof r.callback>"u")throw new Error("callback argument missing");if(r.requestType&&oi.requestInterceptorsStorage.getIsEnabled()){var e={uri:r.uri||r.url,headers:r.headers||{},body:r.body,metadata:r.metadata||{},retry:r.retry,timeout:r.timeout},i=oi.requestInterceptorsStorage.execute(r.requestType,e);r.uri=i.uri,r.headers=i.headers,r.body=i.body,r.metadata=i.metadata,r.retry=i.retry,r.timeout=i.timeout}var s=!1,o=function(W,oe,K){s||(s=!0,r.callback(W,oe,K))};function l(){b.readyState===4&&!oi.responseInterceptorsStorage.getIsEnabled()&&setTimeout(p,0)}function c(){var X=void 0;if(b.response?X=b.response:X=b.responseText||cD(b),N)try{X=JSON.parse(X)}catch{}return X}function f(X){if(clearTimeout(G),clearTimeout(r.retryTimeout),X instanceof Error||(X=new Error(""+(X||"Unknown XMLHttpRequest Error"))),X.statusCode=0,!x&&oi.retryManager.getIsEnabled()&&r.retry&&r.retry.shouldRetry()){r.retryTimeout=setTimeout(function(){r.retry.moveToNextAttempt(),r.xhr=b,$g(r)},r.retry.getCurrentFuzzedDelay());return}if(r.requestType&&oi.responseInterceptorsStorage.getIsEnabled()){var W={headers:$.headers||{},body:$.body,responseUrl:b.responseURL,responseType:b.responseType},oe=oi.responseInterceptorsStorage.execute(r.requestType,W);$.body=oe.body,$.headers=oe.headers}return o(X,$)}function p(){if(!x){var X;clearTimeout(G),clearTimeout(r.retryTimeout),r.useXDR&&b.status===void 0?X=200:X=b.status===1223?204:b.status;var W=$,oe=null;if(X!==0?(W={body:c(),statusCode:X,method:D,headers:{},url:w,rawRequest:b},b.getAllResponseHeaders&&(W.headers=oD(b.getAllResponseHeaders()))):oe=new Error("Internal XMLHttpRequest Error"),r.requestType&&oi.responseInterceptorsStorage.getIsEnabled()){var K={headers:W.headers||{},body:W.body,responseUrl:b.responseURL,responseType:b.responseType},pe=oi.responseInterceptorsStorage.execute(r.requestType,K);W.body=pe.body,W.headers=pe.headers}return o(oe,W,W.body)}}var b=r.xhr||null;b||(r.cors||r.useXDR?b=new oi.XDomainRequest:b=new oi.XMLHttpRequest);var _,x,w=b.url=r.uri||r.url,D=b.method=r.method||"GET",M=r.body||r.data,A=b.headers=r.headers||{},q=!!r.sync,N=!1,G,$={body:void 0,headers:{},statusCode:0,method:D,url:w,rawRequest:b};if("json"in r&&r.json!==!1&&(N=!0,A.accept||A.Accept||(A.Accept="application/json"),D!=="GET"&&D!=="HEAD"&&(A["content-type"]||A["Content-Type"]||(A["Content-Type"]="application/json"),M=JSON.stringify(r.json===!0?M:r.json))),b.onreadystatechange=l,b.onload=p,b.onerror=f,b.onprogress=function(){},b.onabort=function(){x=!0,clearTimeout(r.retryTimeout)},b.ontimeout=f,b.open(D,w,!q,r.username,r.password),q||(b.withCredentials=!!r.withCredentials),!q&&r.timeout>0&&(G=setTimeout(function(){if(!x){x=!0,b.abort("timeout");var X=new Error("XMLHttpRequest timeout");X.code="ETIMEDOUT",f(X)}},r.timeout)),b.setRequestHeader)for(_ in A)A.hasOwnProperty(_)&&b.setRequestHeader(_,A[_]);else if(r.headers&&!uD(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(b.responseType=r.responseType),"beforeSend"in r&&typeof r.beforeSend=="function"&&r.beforeSend(b),b.send(M||null),b}function cD(r){try{if(r.responseType==="document")return r.responseXML;var e=r.responseXML&&r.responseXML.documentElement.nodeName==="parsererror";if(r.responseType===""&&!e)return r.responseXML}catch{}return null}function dD(){}var hD=Vg.exports;const e1=Un(hD);var t1={exports:{}},i1=W_,Gg=Object.create||function(){function r(){}return function(e){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return r.prototype=e,new r}}();function qn(r,e){this.name="ParsingError",this.code=r.code,this.message=e||r.message}qn.prototype=Gg(Error.prototype),qn.prototype.constructor=qn,qn.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Yg(r){function e(s,o,l,c){return(s|0)*3600+(o|0)*60+(l|0)+(c|0)/1e3}var i=r.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 id(){this.values=Gg(null)}id.prototype={set:function(r,e){!this.get(r)&&e!==""&&(this.values[r]=e)},get:function(r,e,i){return i?this.has(r)?this.values[r]:e[i]:this.has(r)?this.values[r]:e},has:function(r){return r in this.values},alt:function(r,e,i){for(var s=0;s<i.length;++s)if(e===i[s]){this.set(r,e);break}},integer:function(r,e){/^-?\d+$/.test(e)&&this.set(r,parseInt(e,10))},percent:function(r,e){return e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e),e>=0&&e<=100)?(this.set(r,e),!0):!1}};function nd(r,e,i,s){var o=s?r.split(s):[r];for(var l in o)if(typeof o[l]=="string"){var c=o[l].split(i);if(c.length===2){var f=c[0].trim(),p=c[1].trim();e(f,p)}}}function fD(r,e,i){var s=r;function o(){var f=Yg(r);if(f===null)throw new qn(qn.Errors.BadTimeStamp,"Malformed timestamp: "+s);return r=r.replace(/^[^\sa-zA-Z-]+/,""),f}function l(f,p){var b=new id;nd(f,function(_,x){switch(_){case"region":for(var w=i.length-1;w>=0;w--)if(i[w].id===x){b.set(_,i[w].region);break}break;case"vertical":b.alt(_,x,["rl","lr"]);break;case"line":var D=x.split(","),M=D[0];b.integer(_,M),b.percent(_,M)&&b.set("snapToLines",!1),b.alt(_,M,["auto"]),D.length===2&&b.alt("lineAlign",D[1],["start","center","end"]);break;case"position":D=x.split(","),b.percent(_,D[0]),D.length===2&&b.alt("positionAlign",D[1],["start","center","end"]);break;case"size":b.percent(_,x);break;case"align":b.alt(_,x,["start","center","end","left","right"]);break}},/:/,/\s/),p.region=b.get("region",null),p.vertical=b.get("vertical","");try{p.line=b.get("line","auto")}catch{}p.lineAlign=b.get("lineAlign","start"),p.snapToLines=b.get("snapToLines",!0),p.size=b.get("size",100);try{p.align=b.get("align","center")}catch{p.align=b.get("align","middle")}try{p.position=b.get("position","auto")}catch{p.position=b.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},p.align)}p.positionAlign=b.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},p.align)}function c(){r=r.replace(/^\s+/,"")}if(c(),e.startTime=o(),c(),r.substr(0,3)!=="-->")throw new qn(qn.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+s);r=r.substr(3),c(),e.endTime=o(),c(),l(r,e)}var Xg=i1.createElement&&i1.createElement("textarea"),pD={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},n1={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)"},mD={v:"title",lang:"lang"},s1={rt:"ruby"};function r1(r,e){function i(){if(!e)return null;function M(q){return e=e.substr(q.length),q}var A=e.match(/^([^<]*)(<[^>]*>?)?/);return M(A[1]?A[1]:A[2])}function s(M){return Xg.innerHTML=M,M=Xg.textContent,Xg.textContent="",M}function o(M,A){return!s1[A.localName]||s1[A.localName]===M.localName}function l(M,A){var q=pD[M];if(!q)return null;var N=r.document.createElement(q),G=mD[M];return G&&A&&(N[G]=A.trim()),N}for(var c=r.document.createElement("div"),f=c,p,b=[];(p=i())!==null;){if(p[0]==="<"){if(p[1]==="/"){b.length&&b[b.length-1]===p.substr(2).replace(">","")&&(b.pop(),f=f.parentNode);continue}var _=Yg(p.substr(1,p.length-2)),x;if(_){x=r.document.createProcessingInstruction("timestamp",_),f.appendChild(x);continue}var w=p.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!w||(x=l(w[1],w[3]),!x)||!o(f,x))continue;if(w[2]){var D=w[2].split(".");D.forEach(function(M){var A=/^bg_/.test(M),q=A?M.slice(3):M;if(n1.hasOwnProperty(q)){var N=A?"background-color":"color",G=n1[q];x.style[N]=G}}),x.className=D.join(" ")}b.push(w[1]),f.appendChild(x),f=x;continue}f.appendChild(r.document.createTextNode(s(p)))}return c}var a1=[[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 gD(r){for(var e=0;e<a1.length;e++){var i=a1[e];if(r>=i[0]&&r<=i[1])return!0}return!1}function yD(r){var e=[],i="",s;if(!r||!r.childNodes)return"ltr";function o(f,p){for(var b=p.childNodes.length-1;b>=0;b--)f.push(p.childNodes[b])}function l(f){if(!f||!f.length)return null;var p=f.pop(),b=p.textContent||p.innerText;if(b){var _=b.match(/^.*(\n|\r)/);return _?(f.length=0,_[0]):b}if(p.tagName==="ruby")return l(f);if(p.childNodes)return o(f,p),l(f)}for(o(e,r);i=l(e);)for(var c=0;c<i.length;c++)if(s=i.charCodeAt(c),gD(s))return"rtl";return"ltr"}function vD(r){if(typeof r.line=="number"&&(r.snapToLines||r.line>=0&&r.line<=100))return r.line;if(!r.track||!r.track.textTrackList||!r.track.textTrackList.mediaElement)return-1;for(var e=r.track,i=e.textTrackList,s=0,o=0;o<i.length&&i[o]!==e;o++)i[o].mode==="showing"&&s++;return++s*-1}function Nf(){}Nf.prototype.applyStyles=function(r,e){e=e||this.div;for(var i in r)r.hasOwnProperty(i)&&(e.style[i]=r[i])},Nf.prototype.formatStyle=function(r,e){return r===0?0:r+e};function Bf(r,e,i){Nf.call(this),this.cue=e,this.cueDiv=r1(r,e.text);var s={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(s,this.cueDiv),this.div=r.document.createElement("div"),s={direction:yD(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(s),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(l){this.applyStyles({top:this.formatStyle(l.top,"px"),bottom:this.formatStyle(l.bottom,"px"),left:this.formatStyle(l.left,"px"),right:this.formatStyle(l.right,"px"),height:this.formatStyle(l.height,"px"),width:this.formatStyle(l.width,"px")})}}Bf.prototype=Gg(Nf.prototype),Bf.prototype.constructor=Bf;function rn(r){var e,i,s,o;if(r.div){i=r.div.offsetHeight,s=r.div.offsetWidth,o=r.div.offsetTop;var l=(l=r.div.childNodes)&&(l=l[0])&&l.getClientRects&&l.getClientRects();r=r.div.getBoundingClientRect(),e=l?Math.max(l[0]&&l[0].height||0,r.height/l.length):0}this.left=r.left,this.right=r.right,this.top=r.top||o,this.height=r.height||i,this.bottom=r.bottom||o+(r.height||i),this.width=r.width||s,this.lineHeight=e!==void 0?e:r.lineHeight}rn.prototype.move=function(r,e){switch(e=e!==void 0?e:this.lineHeight,r){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}},rn.prototype.overlaps=function(r){return this.left<r.right&&this.right>r.left&&this.top<r.bottom&&this.bottom>r.top},rn.prototype.overlapsAny=function(r){for(var e=0;e<r.length;e++)if(this.overlaps(r[e]))return!0;return!1},rn.prototype.within=function(r){return this.top>=r.top&&this.bottom<=r.bottom&&this.left>=r.left&&this.right<=r.right},rn.prototype.overlapsOppositeAxis=function(r,e){switch(e){case"+x":return this.left<r.left;case"-x":return this.right>r.right;case"+y":return this.top<r.top;case"-y":return this.bottom>r.bottom}},rn.prototype.intersectPercentage=function(r){var e=Math.max(0,Math.min(this.right,r.right)-Math.max(this.left,r.left)),i=Math.max(0,Math.min(this.bottom,r.bottom)-Math.max(this.top,r.top)),s=e*i;return s/(this.height*this.width)},rn.prototype.toCSSCompatValues=function(r){return{top:this.top-r.top,bottom:r.bottom-this.bottom,left:this.left-r.left,right:r.right-this.right,height:this.height,width:this.width}},rn.getSimpleBoxPosition=function(r){var e=r.div?r.div.offsetHeight:r.tagName?r.offsetHeight:0,i=r.div?r.div.offsetWidth:r.tagName?r.offsetWidth:0,s=r.div?r.div.offsetTop:r.tagName?r.offsetTop:0;r=r.div?r.div.getBoundingClientRect():r.tagName?r.getBoundingClientRect():r;var o={left:r.left,right:r.right,top:r.top||s,height:r.height||e,bottom:r.bottom||s+(r.height||e),width:r.width||i};return o};function bD(r,e,i,s){function o(q,N){for(var G,$=new rn(q),X=1,W=0;W<N.length;W++){for(;q.overlapsOppositeAxis(i,N[W])||q.within(i)&&q.overlapsAny(s);)q.move(N[W]);if(q.within(i))return q;var oe=q.intersectPercentage(i);X>oe&&(G=new rn(q),X=oe),q=new rn($)}return G||$}var l=new rn(e),c=e.cue,f=vD(c),p=[];if(c.snapToLines){var b;switch(c.vertical){case"":p=["+y","-y"],b="height";break;case"rl":p=["+x","-x"],b="width";break;case"lr":p=["-x","+x"],b="width";break}var _=l.lineHeight,x=_*Math.round(f),w=i[b]+_,D=p[0];Math.abs(x)>w&&(x=x<0?-1:1,x*=Math.ceil(w/_)*_),f<0&&(x+=c.vertical===""?i.height:i.width,p=p.reverse()),l.move(D,x)}else{var M=l.lineHeight/i.height*100;switch(c.lineAlign){case"center":f-=M/2;break;case"end":f-=M;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}p=["+y","-x","+x","-y"],l=new rn(e)}var A=o(l,p);e.move(A.toCSSCompatValues(i))}function Vl(){}Vl.StringDecoder=function(){return{decode:function(r){if(!r)return"";if(typeof r!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(r))}}},Vl.convertCueToDOMTree=function(r,e){return!r||!e?null:r1(r,e)};var _D=.05,TD="sans-serif",SD="1.5%";Vl.processCues=function(r,e,i){if(!r||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var s=r.document.createElement("div");s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin=SD,i.appendChild(s);function o(_){for(var x=0;x<_.length;x++)if(_[x].hasBeenReset||!_[x].displayState)return!0;return!1}if(!o(e)){for(var l=0;l<e.length;l++)s.appendChild(e[l].displayState);return}var c=[],f=rn.getSimpleBoxPosition(s),p=Math.round(f.height*_D*100)/100,b={font:p+"px "+TD};(function(){for(var _,x,w=0;w<e.length;w++)x=e[w],_=new Bf(r,x,b),s.appendChild(_.div),bD(r,_,f,c),x.displayState=_.div,c.push(rn.getSimpleBoxPosition(_))})()},Vl.Parser=function(r,e,i){i||(i=e,e={}),e||(e={}),this.window=r,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},Vl.Parser.prototype={reportOrThrowError:function(r){if(r instanceof qn)this.onparsingerror&&this.onparsingerror(r);else throw r},parse:function(r){var e=this;r&&(e.buffer+=e.decoder.decode(r,{stream:!0}));function i(){for(var _=e.buffer,x=0;x<_.length&&_[x]!=="\r"&&_[x]!==`
|
||
`;)++x;var w=_.substr(0,x);return _[x]==="\r"&&++x,_[x]===`
|
||
`&&++x,e.buffer=_.substr(x),w}function s(_){var x=new id;if(nd(_,function(D,M){switch(D){case"id":x.set(D,M);break;case"width":x.percent(D,M);break;case"lines":x.integer(D,M);break;case"regionanchor":case"viewportanchor":var A=M.split(",");if(A.length!==2)break;var q=new id;if(q.percent("x",A[0]),q.percent("y",A[1]),!q.has("x")||!q.has("y"))break;x.set(D+"X",q.get("x")),x.set(D+"Y",q.get("y"));break;case"scroll":x.alt(D,M,["up"]);break}},/=/,/\s/),x.has("id")){var w=new(e.vttjs.VTTRegion||e.window.VTTRegion);w.width=x.get("width",100),w.lines=x.get("lines",3),w.regionAnchorX=x.get("regionanchorX",0),w.regionAnchorY=x.get("regionanchorY",100),w.viewportAnchorX=x.get("viewportanchorX",0),w.viewportAnchorY=x.get("viewportanchorY",100),w.scroll=x.get("scroll",""),e.onregion&&e.onregion(w),e.regionList.push({id:x.get("id"),region:w})}}function o(_){var x=new id;nd(_,function(w,D){switch(w){case"MPEGT":x.integer(w+"S",D);break;case"LOCA":x.set(w+"L",Yg(D));break}},/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:x.get("MPEGTS"),LOCAL:x.get("LOCAL")})}function l(_){_.match(/X-TIMESTAMP-MAP/)?nd(_,function(x,w){switch(x){case"X-TIMESTAMP-MAP":o(w);break}},/=/):nd(_,function(x,w){switch(x){case"Region":s(w);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 qn(qn.Errors.BadSignature);e.state="HEADER"}for(var p=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(p?p=!1:c=i(),e.state){case"HEADER":/:/.test(c)?l(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{fD(c,e.cue,e.regionList)}catch(_){e.reportOrThrowError(_),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var b=c.indexOf("-->")!==-1;if(!c||b&&(p=!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(_){e.reportOrThrowError(_),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 r=this;try{if(r.buffer+=r.decoder.decode(),(r.cue||r.state==="HEADER")&&(r.buffer+=`
|
||
|
||
`,r.parse()),r.state==="INITIAL")throw new qn(qn.Errors.BadSignature)}catch(e){r.reportOrThrowError(e)}return r.onflush&&r.onflush(),this}};var xD=Vl,ED="auto",CD={"":1,lr:1,rl:1},wD={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function AD(r){if(typeof r!="string")return!1;var e=CD[r.toLowerCase()];return e?r.toLowerCase():!1}function Wg(r){if(typeof r!="string")return!1;var e=wD[r.toLowerCase()];return e?r.toLowerCase():!1}function o1(r,e,i){this.hasBeenReset=!1;var s="",o=!1,l=r,c=e,f=i,p=null,b="",_=!0,x="auto",w="start",D="auto",M="auto",A=100,q="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(N){s=""+N}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(N){o=!!N}},startTime:{enumerable:!0,get:function(){return l},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");l=N,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return c},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");c=N,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return f},set:function(N){f=""+N,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return p},set:function(N){p=N,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return b},set:function(N){var G=AD(N);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 _},set:function(N){_=!!N,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return x},set:function(N){if(typeof N!="number"&&N!==ED)throw new SyntaxError("Line: an invalid number or illegal string was specified.");x=N,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return w},set:function(N){var G=Wg(N);G?(w=G,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return D},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");D=N,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return M},set:function(N){var G=Wg(N);G?(M=G,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return A},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");A=N,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return q},set:function(N){var G=Wg(N);if(!G)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");q=G,this.hasBeenReset=!0}}}),this.displayState=void 0}o1.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var kD=o1,DD={"":!0,up:!0};function OD(r){if(typeof r!="string")return!1;var e=DD[r.toLowerCase()];return e?r.toLowerCase():!1}function sd(r){return typeof r=="number"&&r>=0&&r<=100}function RD(){var r=100,e=3,i=0,s=100,o=0,l=100,c="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return r},set:function(f){if(!sd(f))throw new Error("Width must be between 0 and 100.");r=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 s},set:function(f){if(!sd(f))throw new Error("RegionAnchorX must be between 0 and 100.");s=f}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(f){if(!sd(f))throw new Error("RegionAnchorY must be between 0 and 100.");i=f}},viewportAnchorY:{enumerable:!0,get:function(){return l},set:function(f){if(!sd(f))throw new Error("ViewportAnchorY must be between 0 and 100.");l=f}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(f){if(!sd(f))throw new Error("ViewportAnchorX must be between 0 and 100.");o=f}},scroll:{enumerable:!0,get:function(){return c},set:function(f){var p=OD(f);p===!1?console.warn("Scroll: an invalid or illegal string was specified."):c=p}}})}var MD=RD,Ur=Pf,Oo=t1.exports={WebVTT:xD,VTTCue:kD,VTTRegion:MD};Ur.vttjs=Oo,Ur.WebVTT=Oo.WebVTT;var LD=Oo.VTTCue,ID=Oo.VTTRegion,PD=Ur.VTTCue,ND=Ur.VTTRegion;Oo.shim=function(){Ur.VTTCue=LD,Ur.VTTRegion=ID},Oo.restore=function(){Ur.VTTCue=PD,Ur.VTTRegion=ND},Ur.VTTCue||Oo.shim();var BD=t1.exports;const l1=Un(BD);var u1="https://example.com",Uf=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=U.location&&U.location.href||"");var s=/^\/\//.test(e),o=!U.location&&!/\/\//i.test(e);e=new U.URL(e,U.location||u1);var l=new URL(i,e);return o?l.href.slice(u1.length):s?l.href.slice(l.protocol.length):l.href},Qg=function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(s,o){this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push(o)},e.off=function(s,o){if(!this.listeners[s])return!1;var l=this.listeners[s].indexOf(o);return this.listeners[s]=this.listeners[s].slice(0),this.listeners[s].splice(l,1),l>-1},e.trigger=function(s){var o=this.listeners[s];if(o)if(arguments.length===2)for(var l=o.length,c=0;c<l;++c)o[c].call(this,arguments[1]);else for(var f=Array.prototype.slice.call(arguments,1),p=o.length,b=0;b<p;++b)o[b].apply(this,f)},e.dispose=function(){this.listeners={}},e.pipe=function(s){this.on("data",function(o){s.push(o)})},r}(),UD=function(e){return U.atob?U.atob(e):Buffer.from(e,"base64").toString("binary")};function c1(r){for(var e=UD(r),i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class qD extends Qg{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 FD=String.fromCharCode(9),Kg=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},jD=function(){const r="[^=]*",e='"[^"]*"|[^,]*',i="(?:"+r+")=(?:"+e+")";return new RegExp("(?:^|,)("+i+")")},an=function(r){const e={};if(!r)return e;const i=r.split(jD());let s=i.length,o;for(;s--;)i[s]!==""&&(o=/([^=]*)=(.*)/.exec(i[s]).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},d1=r=>{const e=r.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class HD extends Qg{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,s;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((l,c)=>{const f=c(e);return f===e?l:l.concat([f])},[e]).forEach(l=>{for(let c=0;c<this.customParsers.length;c++)if(this.customParsers[c].call(this,l))return;if(l.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:l.slice(1)});return}if(l=l.replace("\r",""),i=/^#EXTM3U/.exec(l),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(l),i){s={type:"tag",tagType:"inf"},i[1]&&(s.duration=parseFloat(i[1])),i[2]&&(s.title=i[2]),this.trigger("data",s);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(l),i){s={type:"tag",tagType:"targetduration"},i[1]&&(s.duration=parseInt(i[1],10)),this.trigger("data",s);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(l),i){s={type:"tag",tagType:"version"},i[1]&&(s.version=parseInt(i[1],10)),this.trigger("data",s);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(l),i){s={type:"tag",tagType:"media-sequence"},i[1]&&(s.number=parseInt(i[1],10)),this.trigger("data",s);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(l),i){s={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(s.number=parseInt(i[1],10)),this.trigger("data",s);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(l),i){s={type:"tag",tagType:"playlist-type"},i[1]&&(s.playlistType=i[1]),this.trigger("data",s);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(l),i){s=ei(Kg(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",s);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(l),i){s={type:"tag",tagType:"allow-cache"},i[1]&&(s.allowed=!/NO/.test(i[1])),this.trigger("data",s);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(l),i){if(s={type:"tag",tagType:"map"},i[1]){const c=an(i[1]);c.URI&&(s.uri=c.URI),c.BYTERANGE&&(s.byterange=Kg(c.BYTERANGE))}this.trigger("data",s);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(l),i){s={type:"tag",tagType:"stream-inf"},i[1]&&(s.attributes=an(i[1]),s.attributes.RESOLUTION&&(s.attributes.RESOLUTION=d1(s.attributes.RESOLUTION)),s.attributes.BANDWIDTH&&(s.attributes.BANDWIDTH=parseInt(s.attributes.BANDWIDTH,10)),s.attributes["FRAME-RATE"]&&(s.attributes["FRAME-RATE"]=parseFloat(s.attributes["FRAME-RATE"])),s.attributes["PROGRAM-ID"]&&(s.attributes["PROGRAM-ID"]=parseInt(s.attributes["PROGRAM-ID"],10))),this.trigger("data",s);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(l),i){s={type:"tag",tagType:"media"},i[1]&&(s.attributes=an(i[1])),this.trigger("data",s);return}if(i=/^#EXT-X-ENDLIST/.exec(l),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(l),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(l),i){s={type:"tag",tagType:"program-date-time"},i[1]&&(s.dateTimeString=i[1],s.dateTimeObject=new Date(i[1])),this.trigger("data",s);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(l),i){s={type:"tag",tagType:"key"},i[1]&&(s.attributes=an(i[1]),s.attributes.IV&&(s.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(s.attributes.IV=s.attributes.IV.substring(2)),s.attributes.IV=s.attributes.IV.match(/.{8}/g),s.attributes.IV[0]=parseInt(s.attributes.IV[0],16),s.attributes.IV[1]=parseInt(s.attributes.IV[1],16),s.attributes.IV[2]=parseInt(s.attributes.IV[2],16),s.attributes.IV[3]=parseInt(s.attributes.IV[3],16),s.attributes.IV=new Uint32Array(s.attributes.IV))),this.trigger("data",s);return}if(i=/^#EXT-X-START:(.*)$/.exec(l),i){s={type:"tag",tagType:"start"},i[1]&&(s.attributes=an(i[1]),s.attributes["TIME-OFFSET"]=parseFloat(s.attributes["TIME-OFFSET"]),s.attributes.PRECISE=/YES/.test(s.attributes.PRECISE)),this.trigger("data",s);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(l),i){s={type:"tag",tagType:"cue-out-cont"},i[1]?s.data=i[1]:s.data="",this.trigger("data",s);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(l),i){s={type:"tag",tagType:"cue-out"},i[1]?s.data=i[1]:s.data="",this.trigger("data",s);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(l),i){s={type:"tag",tagType:"cue-in"},i[1]?s.data=i[1]:s.data="",this.trigger("data",s);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"skip"},s.attributes=an(i[1]),s.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(s.attributes["SKIPPED-SEGMENTS"]=parseInt(s.attributes["SKIPPED-SEGMENTS"],10)),s.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(s.attributes["RECENTLY-REMOVED-DATERANGES"]=s.attributes["RECENTLY-REMOVED-DATERANGES"].split(FD)),this.trigger("data",s);return}if(i=/^#EXT-X-PART:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"part"},s.attributes=an(i[1]),["DURATION"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=parseFloat(s.attributes[c]))}),["INDEPENDENT","GAP"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=/YES/.test(s.attributes[c]))}),s.attributes.hasOwnProperty("BYTERANGE")&&(s.attributes.byterange=Kg(s.attributes.BYTERANGE)),this.trigger("data",s);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"server-control"},s.attributes=an(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=parseFloat(s.attributes[c]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=/YES/.test(s.attributes[c]))}),this.trigger("data",s);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"part-inf"},s.attributes=an(i[1]),["PART-TARGET"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=parseFloat(s.attributes[c]))}),this.trigger("data",s);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"preload-hint"},s.attributes=an(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(c){if(s.attributes.hasOwnProperty(c)){s.attributes[c]=parseInt(s.attributes[c],10);const f=c==="BYTERANGE-LENGTH"?"length":"offset";s.attributes.byterange=s.attributes.byterange||{},s.attributes.byterange[f]=s.attributes[c],delete s.attributes[c]}}),this.trigger("data",s);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"rendition-report"},s.attributes=an(i[1]),["LAST-MSN","LAST-PART"].forEach(function(c){s.attributes.hasOwnProperty(c)&&(s.attributes[c]=parseInt(s.attributes[c],10))}),this.trigger("data",s);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(l),i&&i[1]){s={type:"tag",tagType:"daterange"},s.attributes=an(i[1]),["ID","CLASS"].forEach(function(f){s.attributes.hasOwnProperty(f)&&(s.attributes[f]=String(s.attributes[f]))}),["START-DATE","END-DATE"].forEach(function(f){s.attributes.hasOwnProperty(f)&&(s.attributes[f]=new Date(s.attributes[f]))}),["DURATION","PLANNED-DURATION"].forEach(function(f){s.attributes.hasOwnProperty(f)&&(s.attributes[f]=parseFloat(s.attributes[f]))}),["END-ON-NEXT"].forEach(function(f){s.attributes.hasOwnProperty(f)&&(s.attributes[f]=/YES/i.test(s.attributes[f]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(f){s.attributes.hasOwnProperty(f)&&(s.attributes[f]=s.attributes[f].toString(16))});const c=/^X-([A-Z]+-)+[A-Z]+$/;for(const f in s.attributes){if(!c.test(f))continue;const p=/[0-9A-Fa-f]{6}/g.test(s.attributes[f]),b=/^\d+(\.\d+)?$/.test(s.attributes[f]);s.attributes[f]=p?s.attributes[f].toString(16):b?parseFloat(s.attributes[f]):String(s.attributes[f])}this.trigger("data",s);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(l),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(l),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(l),i){s={type:"tag",tagType:"content-steering"},s.attributes=an(i[1]),this.trigger("data",s);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(l),i){s={type:"tag",tagType:"i-frame-playlist"},s.attributes=an(i[1]),s.attributes.URI&&(s.uri=s.attributes.URI),s.attributes.BANDWIDTH&&(s.attributes.BANDWIDTH=parseInt(s.attributes.BANDWIDTH,10)),s.attributes.RESOLUTION&&(s.attributes.RESOLUTION=d1(s.attributes.RESOLUTION)),s.attributes["AVERAGE-BANDWIDTH"]&&(s.attributes["AVERAGE-BANDWIDTH"]=parseInt(s.attributes["AVERAGE-BANDWIDTH"],10)),s.attributes["FRAME-RATE"]&&(s.attributes["FRAME-RATE"]=parseFloat(s.attributes["FRAME-RATE"])),this.trigger("data",s);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(l),i){s={type:"tag",tagType:"define"},s.attributes=an(i[1]),this.trigger("data",s);return}this.trigger("data",{type:"tag",data:l.slice(4)})})}addParser({expression:e,customType:i,dataParser:s,segment:o}){typeof s!="function"&&(s=l=>l),this.customParsers.push(l=>{if(e.exec(l))return this.trigger("data",{type:"custom",data:s(l),customType:i,segment:o}),!0})}addTagMapper({expression:e,map:i}){const s=o=>e.test(o)?i(o):o;this.tagMappers.push(s)}}const zD=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),Oa=function(r){const e={};return Object.keys(r).forEach(function(i){e[zD(i)]=r[i]}),e},Zg=function(r){const{serverControl:e,targetDuration:i,partTargetDuration:s}=r;if(!e)return;const o="#EXT-X-SERVER-CONTROL",l="holdBack",c="partHoldBack",f=i&&i*3,p=s&&s*2;i&&!e.hasOwnProperty(l)&&(e[l]=f,this.trigger("info",{message:`${o} defaulting HOLD-BACK to targetDuration * 3 (${f}).`})),f&&e[l]<f&&(this.trigger("warn",{message:`${o} clamping HOLD-BACK (${e[l]}) to targetDuration * 3 (${f})`}),e[l]=f),s&&!e.hasOwnProperty(c)&&(e[c]=s*3,this.trigger("info",{message:`${o} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[c]}).`})),s&&e[c]<p&&(this.trigger("warn",{message:`${o} clamping PART-HOLD-BACK (${e[c]}) to partTargetDuration * 2 (${p}).`}),e[c]=p)};class VD extends Qg{constructor(e={}){super(),this.lineStream=new qD,this.parseStream=new HD,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,s=[];let o={},l,c,f=!1;const p=function(){},b={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},_="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let x=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let w=0,D=0;const M={};this.on("end",()=>{o.uri||!o.parts&&!o.preloadHints||(!o.map&&l&&(o.map=l),!o.key&&c&&(o.key=c),!o.timeline&&typeof x=="number"&&(o.timeline=x),this.manifest.preloadSegment=o)}),this.parseStream.on("data",function(A){let q,N;if(i.manifest.definitions){for(const G in i.manifest.definitions)if(A.uri&&(A.uri=A.uri.replace(`{$${G}}`,i.manifest.definitions[G])),A.attributes)for(const $ in A.attributes)typeof A.attributes[$]=="string"&&(A.attributes[$]=A.attributes[$].replace(`{$${G}}`,i.manifest.definitions[G]))}({tag(){({version(){A.version&&(this.manifest.version=A.version)},"allow-cache"(){this.manifest.allowCache=A.allowed,"allowed"in A||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const G={};"length"in A&&(o.byterange=G,G.length=A.length,"offset"in A||(A.offset=w)),"offset"in A&&(o.byterange=G,G.offset=A.offset),w=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"})),A.title&&(o.title=A.title),A.duration>0&&(o.duration=A.duration),A.duration===0&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key(){if(!A.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(A.attributes.METHOD==="NONE"){c=null;return}if(!A.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(A.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:A.attributes};return}if(A.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:A.attributes.URI};return}if(A.attributes.KEYFORMAT===_){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(A.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(A.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),A.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(A.attributes.KEYID&&A.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:A.attributes.KEYFORMAT,keyId:A.attributes.KEYID.substring(2)},pssh:c1(A.attributes.URI.split(",")[1])};return}A.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),c={method:A.attributes.METHOD||"AES-128",uri:A.attributes.URI},typeof A.attributes.IV<"u"&&(c.iv=A.attributes.IV)},"media-sequence"(){if(!isFinite(A.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+A.number});return}this.manifest.mediaSequence=A.number},"discontinuity-sequence"(){if(!isFinite(A.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+A.number});return}this.manifest.discontinuitySequence=A.number,x=A.number},"playlist-type"(){if(!/VOD|EVENT/.test(A.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+A.playlist});return}this.manifest.playlistType=A.playlistType},map(){l={},A.uri&&(l.uri=A.uri),A.byterange&&(l.byterange=A.byterange),c&&(l.key=c)},"stream-inf"(){if(this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||b,!A.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}o.attributes||(o.attributes={}),ei(o.attributes,A.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||b,!(A.attributes&&A.attributes.TYPE&&A.attributes["GROUP-ID"]&&A.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const G=this.manifest.mediaGroups[A.attributes.TYPE];G[A.attributes["GROUP-ID"]]=G[A.attributes["GROUP-ID"]]||{},q=G[A.attributes["GROUP-ID"]],N={default:/yes/i.test(A.attributes.DEFAULT)},N.default?N.autoselect=!0:N.autoselect=/yes/i.test(A.attributes.AUTOSELECT),A.attributes.LANGUAGE&&(N.language=A.attributes.LANGUAGE),A.attributes.URI&&(N.uri=A.attributes.URI),A.attributes["INSTREAM-ID"]&&(N.instreamId=A.attributes["INSTREAM-ID"]),A.attributes.CHARACTERISTICS&&(N.characteristics=A.attributes.CHARACTERISTICS),A.attributes.FORCED&&(N.forced=/yes/i.test(A.attributes.FORCED)),q[A.attributes.NAME]=N},discontinuity(){x+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=A.dateTimeString,this.manifest.dateTimeObject=A.dateTimeObject),o.dateTimeString=A.dateTimeString,o.dateTimeObject=A.dateTimeObject;const{lastProgramDateTime:G}=this;this.lastProgramDateTime=new Date(A.dateTimeString).getTime(),G===null&&this.manifest.segments.reduceRight(($,X)=>(X.programDateTime=$-X.duration*1e3,X.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(A.duration)||A.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+A.duration});return}this.manifest.targetDuration=A.duration,Zg.call(this,this.manifest)},start(){if(!A.attributes||isNaN(A.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:A.attributes["TIME-OFFSET"],precise:A.attributes.PRECISE}},"cue-out"(){o.cueOut=A.data},"cue-out-cont"(){o.cueOutCont=A.data},"cue-in"(){o.cueIn=A.data},skip(){this.manifest.skip=Oa(A.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",A.attributes,["SKIPPED-SEGMENTS"])},part(){f=!0;const G=this.manifest.segments.length,$=Oa(A.attributes);o.parts=o.parts||[],o.parts.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=D),D=$.byterange.offset+$.byterange.length);const X=o.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${X} for segment #${G}`,A.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((W,oe)=>{W.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${oe} lacks required attribute(s): LAST-PART`})})},"server-control"(){const G=this.manifest.serverControl=Oa(A.attributes);G.hasOwnProperty("canBlockReload")||(G.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Zg.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,$=Oa(A.attributes),X=$.type&&$.type==="PART";o.preloadHints=o.preloadHints||[],o.preloadHints.push($),$.byterange&&($.byterange.hasOwnProperty("offset")||($.byterange.offset=X?D:0,X&&(D=$.byterange.offset+$.byterange.length)));const W=o.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${W} for segment #${G}`,A.attributes,["TYPE","URI"]),!!$.type)for(let oe=0;oe<o.preloadHints.length-1;oe++){const K=o.preloadHints[oe];K.type&&K.type===$.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${W} for segment #${G} has the same TYPE ${$.type} as preload hint #${oe}`})}},"rendition-report"(){const G=Oa(A.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(G);const $=this.manifest.renditionReports.length-1,X=["LAST-MSN","URI"];f&&X.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${$}`,A.attributes,X)},"part-inf"(){this.manifest.partInf=Oa(A.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",A.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Zg.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Oa(A.attributes));const G=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${G}`,A.attributes,["ID","START-DATE"]);const $=this.manifest.dateRanges[G];$.endDate&&$.startDate&&new Date($.endDate)<new Date($.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),$.duration&&$.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),$.plannedDuration&&$.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const X=!!$.endOnNext;if(X&&!$.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),X&&($.duration||$.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),$.duration&&$.endDate){const oe=$.startDate.getTime()+$.duration*1e3;this.manifest.dateRanges[G].endDate=new Date(oe)}if(!M[$.id])M[$.id]=$;else{for(const oe in M[$.id])if($[oe]&&JSON.stringify(M[$.id][oe])!==JSON.stringify($[oe])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const W=this.manifest.dateRanges.findIndex(oe=>oe.id===$.id);this.manifest.dateRanges[W]=ei(this.manifest.dateRanges[W],$),M[$.id]=ei(M[$.id],$),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=Oa(A.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",A.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const G=($,X)=>{if($ in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${$}`});return}this.manifest.definitions[$]=X};if("QUERYPARAM"in A.attributes){if("NAME"in A.attributes||"IMPORT"in A.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const $=this.params.get(A.attributes.QUERYPARAM);if(!$){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${A.attributes.QUERYPARAM}`});return}G(A.attributes.QUERYPARAM,decodeURIComponent($));return}if("NAME"in A.attributes){if("IMPORT"in A.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in A.attributes)||typeof A.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${A.attributes.NAME}`});return}G(A.attributes.NAME,A.attributes.VALUE);return}if("IMPORT"in A.attributes){if(!this.mainDefinitions[A.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${A.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}G(A.attributes.IMPORT,this.mainDefinitions[A.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:A.attributes,uri:A.uri,timeline:x}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",A.attributes,["BANDWIDTH","URI"])}}[A.tagType]||p).call(i)},uri(){o.uri=A.uri,s.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=x,l&&(o.map=l),D=0,this.lastProgramDateTime!==null&&(o.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=o.duration*1e3),o={}},comment(){},custom(){A.segment?(o.custom=o.custom||{},o.custom[A.customType]=A.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[A.customType]=A.data)}})[A.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,s){const o=[];s.forEach(function(l){i.hasOwnProperty(l)||o.push(l)}),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 Ro={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^/},$D=["video","audio","text"],h1=["Video","Audio","Text"],f1=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,s,o){var l=("00"+Number(s).toString(16)).slice(-2),c=("00"+Number(o).toString(16)).slice(-2);return"avc1."+l+"00"+c})},Ws=function(e){e===void 0&&(e="");var i=e.split(","),s=[];return i.forEach(function(o){o=o.trim();var l;$D.forEach(function(c){var f=Ro[c].exec(o.toLowerCase());if(!(!f||f.length<=1)){l=c;var p=o.substring(0,f[1].length),b=o.replace(p,"");s.push({type:p,details:b,mediaType:c})}}),l||s.push({type:o,details:"",mediaType:"unknown"})}),s},GD=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var s=e.mediaGroups.AUDIO[i];if(!s)return null;for(var o in s){var l=s[o];if(l.default&&l.playlists)return Ws(l.playlists[0].attributes.CODECS)}return null},p1=function(e){return e===void 0&&(e=""),Ro.audio.test(e.trim().toLowerCase())},YD=function(e){return e===void 0&&(e=""),Ro.text.test(e.trim().toLowerCase())},$l=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(l){return f1(l.trim())}),s="video";i.length===1&&p1(i[0])?s="audio":i.length===1&&YD(i[0])&&(s="application");var o="mp4";return i.every(function(l){return Ro.mp4.test(l)})?o="mp4":i.every(function(l){return Ro.webm.test(l)})?o="webm":i.every(function(l){return Ro.ogg.test(l)})&&(o="ogg"),s+"/"+o+';codecs="'+e+'"'}},rd=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),U.MediaSource&&U.MediaSource.isTypeSupported&&U.MediaSource.isTypeSupported($l(e))||i&&U.ManagedMediaSource&&U.ManagedMediaSource.isTypeSupported&&U.ManagedMediaSource.isTypeSupported($l(e))||!1},Jg=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var s=0;s<h1.length;s++){var o=h1[s];if(Ro["muxer"+o].test(i))return!0}return!1})},m1="mp4a.40.2",XD="avc1.4d400d",WD=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,QD=/^application\/dash\+xml/i,g1=function(e){return WD.test(e)?"hls":QD.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},KD=function(e){return e.toString(2).length},ZD=function(e){return Math.ceil(KD(e)/8)},y1=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},JD=function(e){return y1(e)},We=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!JD(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))},Ni=U.BigInt||Number,e0=[Ni("0x1"),Ni("0x100"),Ni("0x10000"),Ni("0x1000000"),Ni("0x100000000"),Ni("0x10000000000"),Ni("0x1000000000000"),Ni("0x100000000000000"),Ni("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var e4=function(e,i){var s=i===void 0?{}:i,o=s.signed,l=o===void 0?!1:o,c=s.le,f=c===void 0?!1:c;e=We(e);var p=f?"reduce":"reduceRight",b=e[p]?e[p]:Array.prototype[p],_=b.call(e,function(w,D,M){var A=f?M:Math.abs(M+1-e.length);return w+Ni(D)*e0[A]},Ni(0));if(l){var x=e0[e.length]/Ni(2)-Ni(1);_=Ni(_),_>x&&(_-=x,_-=x,_-=Ni(2))}return Number(_)},t4=function(e,i){var s=i===void 0?{}:i,o=s.le,l=o===void 0?!1:o;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Ni(e);for(var c=ZD(e),f=new Uint8Array(new ArrayBuffer(c)),p=0;p<c;p++){var b=l?p:Math.abs(p+1-f.length);f[b]=Number(e/e0[p]&Ni(255)),e<0&&(f[b]=Math.abs(~f[b]),f[b]-=p===0?1:2)}return f},v1=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 s=new Uint8Array(e.length),o=0;o<e.length;o++)s[o]=e.charCodeAt(o);return s},i4=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];if(i=i.filter(function(f){return f&&(f.byteLength||f.length)&&typeof f!="string"}),i.length<=1)return We(i[0]);var o=i.reduce(function(f,p,b){return f+(p.byteLength||p.length)},0),l=new Uint8Array(o),c=0;return i.forEach(function(f){f=We(f),l.set(f,c),c+=f.byteLength}),l},Yt=function(e,i,s){var o=s===void 0?{}:s,l=o.offset,c=l===void 0?0:l,f=o.mask,p=f===void 0?[]:f;e=We(e),i=We(i);var b=i.every?i.every:Array.prototype.every;return i.length&&e.length-c>=i.length&&b.call(i,function(_,x){var w=p[x]?p[x]&e[c+x]:e[c+x];return _===w})},n4=function(e,i,s){i.forEach(function(o){for(var l in e.mediaGroups[o])for(var c in e.mediaGroups[o][l]){var f=e.mediaGroups[o][l][c];s(f,o,l,c)}})},Ra={},qr={};function s4(r,e,i){if(i===void 0&&(i=Array.prototype),r&&typeof i.find=="function")return i.find.call(r,e);for(var s=0;s<r.length;s++)if(Object.prototype.hasOwnProperty.call(r,s)){var o=r[s];if(e.call(void 0,o,s,r))return o}}function t0(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}function r4(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r}var b1=t0({HTML:"text/html",isHTML:function(r){return r===b1.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_1=t0({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(r){return r===_1.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});qr.assign=r4,qr.find=s4,qr.freeze=t0,qr.MIME_TYPE=b1,qr.NAMESPACE=_1;var T1=qr,Qs=T1.find,ad=T1.NAMESPACE;function a4(r){return r!==""}function o4(r){return r?r.split(/[\t\n\f\r ]+/).filter(a4):[]}function l4(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}function S1(r){if(!r)return[];var e=o4(r);return Object.keys(e.reduce(l4,{}))}function u4(r){return function(e){return r&&r.indexOf(e)!==-1}}function od(r,e){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}function _n(r,e){var i=r.prototype;if(!(i instanceof e)){let s=function(){};s.prototype=e.prototype,s=new s,od(i,s),r.prototype=i=s}i.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),i.constructor=r)}var Tn={},ks=Tn.ELEMENT_NODE=1,Gl=Tn.ATTRIBUTE_NODE=2,qf=Tn.TEXT_NODE=3,x1=Tn.CDATA_SECTION_NODE=4,E1=Tn.ENTITY_REFERENCE_NODE=5,c4=Tn.ENTITY_NODE=6,C1=Tn.PROCESSING_INSTRUCTION_NODE=7,w1=Tn.COMMENT_NODE=8,A1=Tn.DOCUMENT_NODE=9,k1=Tn.DOCUMENT_TYPE_NODE=10,Fr=Tn.DOCUMENT_FRAGMENT_NODE=11,d4=Tn.NOTATION_NODE=12,Wi={},Ai={};Wi.INDEX_SIZE_ERR=(Ai[1]="Index size error",1),Wi.DOMSTRING_SIZE_ERR=(Ai[2]="DOMString size error",2);var Sn=Wi.HIERARCHY_REQUEST_ERR=(Ai[3]="Hierarchy request error",3);Wi.WRONG_DOCUMENT_ERR=(Ai[4]="Wrong document",4),Wi.INVALID_CHARACTER_ERR=(Ai[5]="Invalid character",5),Wi.NO_DATA_ALLOWED_ERR=(Ai[6]="No data allowed",6),Wi.NO_MODIFICATION_ALLOWED_ERR=(Ai[7]="No modification allowed",7);var D1=Wi.NOT_FOUND_ERR=(Ai[8]="Not found",8);Wi.NOT_SUPPORTED_ERR=(Ai[9]="Not supported",9);var O1=Wi.INUSE_ATTRIBUTE_ERR=(Ai[10]="Attribute in use",10);Wi.INVALID_STATE_ERR=(Ai[11]="Invalid state",11),Wi.SYNTAX_ERR=(Ai[12]="Syntax error",12),Wi.INVALID_MODIFICATION_ERR=(Ai[13]="Invalid modification",13),Wi.NAMESPACE_ERR=(Ai[14]="Invalid namespace",14),Wi.INVALID_ACCESS_ERR=(Ai[15]="Invalid access",15);function li(r,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,Ai[r]),this.message=Ai[r],Error.captureStackTrace&&Error.captureStackTrace(this,li);return i.code=r,e&&(this.message=this.message+": "+e),i}li.prototype=Error.prototype,od(Wi,li);function jr(){}jr.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r,e){for(var i=[],s=0;s<this.length;s++)Xl(this[s],i,r,e);return i.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};function Yl(r,e){this._node=r,this._refresh=e,i0(this)}function i0(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var i=r._refresh(r._node);if(Y1(r,"length",i.length),!r.$$length||i.length<r.$$length)for(var s=i.length;s in r;s++)Object.prototype.hasOwnProperty.call(r,s)&&delete r[s];od(i,r),r._inc=e}}Yl.prototype.item=function(r){return i0(this),this[r]||null},_n(Yl,jr);function Ff(){}function R1(r,e){for(var i=r.length;i--;)if(r[i]===e)return i}function M1(r,e,i,s){if(s?e[R1(e,s)]=i:e[e.length++]=i,r){i.ownerElement=r;var o=r.ownerDocument;o&&(s&&N1(o,r,s),h4(o,r,i))}}function L1(r,e,i){var s=R1(e,i);if(s>=0){for(var o=e.length-1;s<o;)e[s]=e[++s];if(e.length=o,r){var l=r.ownerDocument;l&&(N1(l,r,i),i.ownerElement=null)}}else throw new li(D1,new Error(r.tagName+"@"+i))}Ff.prototype={length:0,item:jr.prototype.item,getNamedItem:function(r){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==r)return i}},setNamedItem:function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new li(O1);var i=this.getNamedItem(r.nodeName);return M1(this._ownerElement,this,r,i),i},setNamedItemNS:function(r){var e=r.ownerElement,i;if(e&&e!=this._ownerElement)throw new li(O1);return i=this.getNamedItemNS(r.namespaceURI,r.localName),M1(this._ownerElement,this,r,i),i},removeNamedItem:function(r){var e=this.getNamedItem(r);return L1(this._ownerElement,this,e),e},removeNamedItemNS:function(r,e){var i=this.getNamedItemNS(r,e);return L1(this._ownerElement,this,i),i},getNamedItemNS:function(r,e){for(var i=this.length;i--;){var s=this[i];if(s.localName==e&&s.namespaceURI==r)return s}return null}};function I1(){}I1.prototype={hasFeature:function(r,e){return!0},createDocument:function(r,e,i){var s=new ud;if(s.implementation=this,s.childNodes=new jr,s.doctype=i||null,i&&s.appendChild(i),e){var o=s.createElementNS(r,e);s.appendChild(o)}return s},createDocumentType:function(r,e,i){var s=new zf;return s.name=r,s.nodeName=r,s.publicId=e||"",s.systemId=i||"",s}};function Rt(){}Rt.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(r,e){return jf(this,r,e)},replaceChild:function(r,e){jf(this,r,e,F1),e&&this.removeChild(e)},removeChild:function(r){return B1(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return d0(this.ownerDocument||this,this,r)},normalize:function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==qf&&r.nodeType==qf?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},isSupported:function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(r){for(var e=this;e;){var i=e._nsMap;if(i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&i[s]===r)return s}e=e.nodeType==Gl?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(r){for(var e=this;e;){var i=e._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r];e=e.nodeType==Gl?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(r){var e=this.lookupPrefix(r);return e==null}};function P1(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}od(Tn,Rt),od(Tn,Rt.prototype);function ld(r,e){if(e(r))return!0;if(r=r.firstChild)do if(ld(r,e))return!0;while(r=r.nextSibling)}function ud(){this.ownerDocument=this}function h4(r,e,i){r&&r._inc++;var s=i.namespaceURI;s===ad.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}function N1(r,e,i,s){r&&r._inc++;var o=i.namespaceURI;o===ad.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function n0(r,e,i){if(r&&r._inc){r._inc++;var s=e.childNodes;if(i)s[s.length++]=i;else{for(var o=e.firstChild,l=0;o;)s[l++]=o,o=o.nextSibling;s.length=l,delete s[s.length]}}}function B1(r,e){var i=e.previousSibling,s=e.nextSibling;return i?i.nextSibling=s:r.firstChild=s,s?s.previousSibling=i:r.lastChild=i,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,n0(r.ownerDocument,r),e}function f4(r){return r&&(r.nodeType===Rt.DOCUMENT_NODE||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.ELEMENT_NODE)}function p4(r){return r&&(Ks(r)||s0(r)||Hr(r)||r.nodeType===Rt.DOCUMENT_FRAGMENT_NODE||r.nodeType===Rt.COMMENT_NODE||r.nodeType===Rt.PROCESSING_INSTRUCTION_NODE)}function Hr(r){return r&&r.nodeType===Rt.DOCUMENT_TYPE_NODE}function Ks(r){return r&&r.nodeType===Rt.ELEMENT_NODE}function s0(r){return r&&r.nodeType===Rt.TEXT_NODE}function U1(r,e){var i=r.childNodes||[];if(Qs(i,Ks)||Hr(e))return!1;var s=Qs(i,Hr);return!(e&&s&&i.indexOf(s)>i.indexOf(e))}function q1(r,e){var i=r.childNodes||[];function s(l){return Ks(l)&&l!==e}if(Qs(i,s))return!1;var o=Qs(i,Hr);return!(e&&o&&i.indexOf(o)>i.indexOf(e))}function m4(r,e,i){if(!f4(r))throw new li(Sn,"Unexpected parent node type "+r.nodeType);if(i&&i.parentNode!==r)throw new li(D1,"child not in parent");if(!p4(e)||Hr(e)&&r.nodeType!==Rt.DOCUMENT_NODE)throw new li(Sn,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}function g4(r,e,i){var s=r.childNodes||[],o=e.childNodes||[];if(e.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var l=o.filter(Ks);if(l.length>1||Qs(o,s0))throw new li(Sn,"More than one element or text in fragment");if(l.length===1&&!U1(r,i))throw new li(Sn,"Element in fragment can not be inserted before doctype")}if(Ks(e)&&!U1(r,i))throw new li(Sn,"Only one element can be added and only after doctype");if(Hr(e)){if(Qs(s,Hr))throw new li(Sn,"Only one doctype is allowed");var c=Qs(s,Ks);if(i&&s.indexOf(c)<s.indexOf(i))throw new li(Sn,"Doctype can only be inserted before an element");if(!i&&c)throw new li(Sn,"Doctype can not be appended since element is present")}}function F1(r,e,i){var s=r.childNodes||[],o=e.childNodes||[];if(e.nodeType===Rt.DOCUMENT_FRAGMENT_NODE){var l=o.filter(Ks);if(l.length>1||Qs(o,s0))throw new li(Sn,"More than one element or text in fragment");if(l.length===1&&!q1(r,i))throw new li(Sn,"Element in fragment can not be inserted before doctype")}if(Ks(e)&&!q1(r,i))throw new li(Sn,"Only one element can be added and only after doctype");if(Hr(e)){if(Qs(s,function(p){return Hr(p)&&p!==i}))throw new li(Sn,"Only one doctype is allowed");var c=Qs(s,Ks);if(i&&s.indexOf(c)<s.indexOf(i))throw new li(Sn,"Doctype can only be inserted before an element")}}function jf(r,e,i,s){m4(r,e,i),r.nodeType===Rt.DOCUMENT_NODE&&(s||g4)(r,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===Fr){var l=e.firstChild;if(l==null)return e;var c=e.lastChild}else l=c=e;var f=i?i.previousSibling:r.lastChild;l.previousSibling=f,c.nextSibling=i,f?f.nextSibling=l:r.firstChild=l,i==null?r.lastChild=c:i.previousSibling=c;do l.parentNode=r;while(l!==c&&(l=l.nextSibling));return n0(r.ownerDocument||r,r),e.nodeType==Fr&&(e.firstChild=e.lastChild=null),e}function y4(r,e){return e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,n0(r.ownerDocument,r,e),e}ud.prototype={nodeName:"#document",nodeType:A1,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,e){if(r.nodeType==Fr){for(var i=r.firstChild;i;){var s=i.nextSibling;this.insertBefore(i,e),i=s}return r}return jf(this,r,e),r.ownerDocument=this,this.documentElement===null&&r.nodeType===ks&&(this.documentElement=r),r},removeChild:function(r){return this.documentElement==r&&(this.documentElement=null),B1(this,r)},replaceChild:function(r,e){jf(this,r,e,F1),r.ownerDocument=this,e&&this.removeChild(e),Ks(r)&&(this.documentElement=r)},importNode:function(r,e){return G1(this,r,e)},getElementById:function(r){var e=null;return ld(this.documentElement,function(i){if(i.nodeType==ks&&i.getAttribute("id")==r)return e=i,!0}),e},getElementsByClassName:function(r){var e=S1(r);return new Yl(this,function(i){var s=[];return e.length>0&&ld(i.documentElement,function(o){if(o!==i&&o.nodeType===ks){var l=o.getAttribute("class");if(l){var c=r===l;if(!c){var f=S1(l);c=e.every(u4(f))}c&&s.push(o)}}}),s})},createElement:function(r){var e=new Mo;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new jr;var i=e.attributes=new Ff;return i._ownerElement=e,e},createDocumentFragment:function(){var r=new Vf;return r.ownerDocument=this,r.childNodes=new jr,r},createTextNode:function(r){var e=new r0;return e.ownerDocument=this,e.appendData(r),e},createComment:function(r){var e=new a0;return e.ownerDocument=this,e.appendData(r),e},createCDATASection:function(r){var e=new o0;return e.ownerDocument=this,e.appendData(r),e},createProcessingInstruction:function(r,e){var i=new u0;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=r,i.nodeValue=i.data=e,i},createAttribute:function(r){var e=new Hf;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},createEntityReference:function(r){var e=new l0;return e.ownerDocument=this,e.nodeName=r,e},createElementNS:function(r,e){var i=new Mo,s=e.split(":"),o=i.attributes=new Ff;return i.childNodes=new jr,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=r,s.length==2?(i.prefix=s[0],i.localName=s[1]):i.localName=e,o._ownerElement=i,i},createAttributeNS:function(r,e){var i=new Hf,s=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=r,i.specified=!0,s.length==2?(i.prefix=s[0],i.localName=s[1]):i.localName=e,i}},_n(ud,Rt);function Mo(){this._nsMap={}}Mo.prototype={nodeType:ks,hasAttribute:function(r){return this.getAttributeNode(r)!=null},getAttribute:function(r){var e=this.getAttributeNode(r);return e&&e.value||""},getAttributeNode:function(r){return this.attributes.getNamedItem(r)},setAttribute:function(r,e){var i=this.ownerDocument.createAttribute(r);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},appendChild:function(r){return r.nodeType===Fr?this.insertBefore(r,null):y4(this,r)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,e){var i=this.getAttributeNodeNS(r,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(r,e){return this.getAttributeNodeNS(r,e)!=null},getAttributeNS:function(r,e){var i=this.getAttributeNodeNS(r,e);return i&&i.value||""},setAttributeNS:function(r,e,i){var s=this.ownerDocument.createAttributeNS(r,e);s.value=s.nodeValue=""+i,this.setAttributeNode(s)},getAttributeNodeNS:function(r,e){return this.attributes.getNamedItemNS(r,e)},getElementsByTagName:function(r){return new Yl(this,function(e){var i=[];return ld(e,function(s){s!==e&&s.nodeType==ks&&(r==="*"||s.tagName==r)&&i.push(s)}),i})},getElementsByTagNameNS:function(r,e){return new Yl(this,function(i){var s=[];return ld(i,function(o){o!==i&&o.nodeType===ks&&(r==="*"||o.namespaceURI===r)&&(e==="*"||o.localName==e)&&s.push(o)}),s})}},ud.prototype.getElementsByTagName=Mo.prototype.getElementsByTagName,ud.prototype.getElementsByTagNameNS=Mo.prototype.getElementsByTagNameNS,_n(Mo,Rt);function Hf(){}Hf.prototype.nodeType=Gl,_n(Hf,Rt);function cd(){}cd.prototype={data:"",substringData:function(r,e){return this.data.substring(r,r+e)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,e){this.replaceData(r,0,e)},appendChild:function(r){throw new Error(Ai[Sn])},deleteData:function(r,e){this.replaceData(r,e,"")},replaceData:function(r,e,i){var s=this.data.substring(0,r),o=this.data.substring(r+e);i=s+i+o,this.nodeValue=this.data=i,this.length=i.length}},_n(cd,Rt);function r0(){}r0.prototype={nodeName:"#text",nodeType:qf,splitText:function(r){var e=this.data,i=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var s=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(s,this.nextSibling),s}},_n(r0,cd);function a0(){}a0.prototype={nodeName:"#comment",nodeType:w1},_n(a0,cd);function o0(){}o0.prototype={nodeName:"#cdata-section",nodeType:x1},_n(o0,cd);function zf(){}zf.prototype.nodeType=k1,_n(zf,Rt);function j1(){}j1.prototype.nodeType=d4,_n(j1,Rt);function H1(){}H1.prototype.nodeType=c4,_n(H1,Rt);function l0(){}l0.prototype.nodeType=E1,_n(l0,Rt);function Vf(){}Vf.prototype.nodeName="#document-fragment",Vf.prototype.nodeType=Fr,_n(Vf,Rt);function u0(){}u0.prototype.nodeType=C1,_n(u0,Rt);function z1(){}z1.prototype.serializeToString=function(r,e,i){return V1.call(r,e,i)},Rt.prototype.toString=V1;function V1(r,e){var i=[],s=this.nodeType==9&&this.documentElement||this,o=s.prefix,l=s.namespaceURI;if(l&&o==null){var o=s.lookupPrefix(l);if(o==null)var c=[{namespace:l,prefix:null}]}return Xl(this,i,r,e,c),i.join("")}function $1(r,e,i){var s=r.prefix||"",o=r.namespaceURI;if(!o||s==="xml"&&o===ad.XML||o===ad.XMLNS)return!1;for(var l=i.length;l--;){var c=i[l];if(c.prefix===s)return c.namespace!==o}return!0}function c0(r,e,i){r.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,P1),'"')}function Xl(r,e,i,s,o){if(o||(o=[]),s)if(r=s(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case ks:var l=r.attributes,c=l.length,N=r.firstChild,f=r.tagName;i=ad.isHTML(r.namespaceURI)||i;var p=f;if(!i&&!r.prefix&&r.namespaceURI){for(var b,_=0;_<l.length;_++)if(l.item(_).name==="xmlns"){b=l.item(_).value;break}if(!b)for(var x=o.length-1;x>=0;x--){var w=o[x];if(w.prefix===""&&w.namespace===r.namespaceURI){b=w.namespace;break}}if(b!==r.namespaceURI)for(var x=o.length-1;x>=0;x--){var w=o[x];if(w.namespace===r.namespaceURI){w.prefix&&(p=w.prefix+":"+f);break}}}e.push("<",p);for(var D=0;D<c;D++){var M=l.item(D);M.prefix=="xmlns"?o.push({prefix:M.localName,namespace:M.value}):M.nodeName=="xmlns"&&o.push({prefix:"",namespace:M.value})}for(var D=0;D<c;D++){var M=l.item(D);if($1(M,i,o)){var A=M.prefix||"",q=M.namespaceURI;c0(e,A?"xmlns:"+A:"xmlns",q),o.push({prefix:A,namespace:q})}Xl(M,e,i,s,o)}if(f===p&&$1(r,i,o)){var A=r.prefix||"",q=r.namespaceURI;c0(e,A?"xmlns:"+A:"xmlns",q),o.push({prefix:A,namespace:q})}if(N||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(f)){if(e.push(">"),i&&/^script$/i.test(f))for(;N;)N.data?e.push(N.data):Xl(N,e,i,s,o.slice()),N=N.nextSibling;else for(;N;)Xl(N,e,i,s,o.slice()),N=N.nextSibling;e.push("</",p,">")}else e.push("/>");return;case A1:case Fr:for(var N=r.firstChild;N;)Xl(N,e,i,s,o.slice()),N=N.nextSibling;return;case Gl:return c0(e,r.name,r.value);case qf:return e.push(r.data.replace(/[<&>]/g,P1));case x1:return e.push("<![CDATA[",r.data,"]]>");case w1:return e.push("<!--",r.data,"-->");case k1:var G=r.publicId,$=r.systemId;if(e.push("<!DOCTYPE ",r.name),G)e.push(" PUBLIC ",G),$&&$!="."&&e.push(" ",$),e.push(">");else if($&&$!=".")e.push(" SYSTEM ",$,">");else{var X=r.internalSubset;X&&e.push(" [",X,"]"),e.push(">")}return;case C1:return e.push("<?",r.target," ",r.data,"?>");case E1:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}function G1(r,e,i){var s;switch(e.nodeType){case ks:s=e.cloneNode(!1),s.ownerDocument=r;case Fr:break;case Gl:i=!0;break}if(s||(s=e.cloneNode(!1)),s.ownerDocument=r,s.parentNode=null,i)for(var o=e.firstChild;o;)s.appendChild(G1(r,o,i)),o=o.nextSibling;return s}function d0(r,e,i){var s=new e.constructor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=e[o];typeof l!="object"&&l!=s[o]&&(s[o]=l)}switch(e.childNodes&&(s.childNodes=new jr),s.ownerDocument=r,s.nodeType){case ks:var c=e.attributes,f=s.attributes=new Ff,p=c.length;f._ownerElement=s;for(var b=0;b<p;b++)s.setAttributeNode(d0(r,c.item(b),!0));break;case Gl:i=!0}if(i)for(var _=e.firstChild;_;)s.appendChild(d0(r,_,i)),_=_.nextSibling;return s}function Y1(r,e,i){r[e]=i}try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case ks:case Fr:var i=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&i.push(r(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}};Object.defineProperty(Yl.prototype,"length",{get:function(){return i0(this),this.$$length}}),Object.defineProperty(Rt.prototype,"textContent",{get:function(){return r(this)},set:function(e){switch(this.nodeType){case ks:case Fr: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}}}),Y1=function(e,i,s){e["$$"+i]=s}}}catch{}Ra.DocumentType=zf,Ra.DOMException=li,Ra.DOMImplementation=I1,Ra.Element=Mo,Ra.Node=Rt,Ra.NodeList=jr,Ra.XMLSerializer=z1;var $f={},X1={};(function(r){var e=qr.freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.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:""}),r.entityMap=r.HTML_ENTITIES})(X1);var h0={},dd=qr.NAMESPACE,f0=/[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]/,W1=new RegExp("[\\-\\.0-9"+f0.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Q1=new RegExp("^"+f0.source+W1.source+"*(?::"+f0.source+W1.source+"*)?$"),hd=0,Ma=1,Wl=2,fd=3,Ql=4,Kl=5,pd=6,Gf=7;function Zl(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,Zl)}Zl.prototype=new Error,Zl.prototype.name=Zl.name;function K1(){}K1.prototype={parse:function(r,e,i){var s=this.domBuilder;s.startDocument(),eT(e,e={}),v4(r,e,i,s,this.errorHandler),s.endDocument()}};function v4(r,e,i,s,o){function l(J){if(J>65535){J-=65536;var ve=55296+(J>>10),ge=56320+(J&1023);return String.fromCharCode(ve,ge)}else return String.fromCharCode(J)}function c(J){var ve=J.slice(1,-1);return Object.hasOwnProperty.call(i,ve)?i[ve]:ve.charAt(0)==="#"?l(parseInt(ve.substr(1).replace("x","0x"))):(o.error("entity not found:"+J),J)}function f(J){if(J>A){var ve=r.substring(A,J).replace(/&#?\w+;/g,c);w&&p(A),s.characters(ve,0,J-A),A=J}}function p(J,ve){for(;J>=_&&(ve=x.exec(r));)b=ve.index,_=b+ve[0].length,w.lineNumber++;w.columnNumber=J-b+1}for(var b=0,_=0,x=/.*(?:\r\n?|\n)|.*$/g,w=s.locator,D=[{currentNSMap:e}],M={},A=0;;){try{var q=r.indexOf("<",A);if(q<0){if(!r.substr(A).match(/^\s*$/)){var N=s.doc,G=N.createTextNode(r.substr(A));N.appendChild(G),s.currentElement=G}return}switch(q>A&&f(q),r.charAt(q+1)){case"/":var de=r.indexOf(">",q+3),$=r.substring(q+2,de).replace(/[ \t\n\r]+$/g,""),X=D.pop();de<0?($=r.substring(q+2).replace(/[\s<].*/,""),o.error("end tag name: "+$+" is not complete:"+X.tagName),de=q+1+$.length):$.match(/\s</)&&($=$.replace(/[\s<].*/,""),o.error("end tag name: "+$+" maybe not complete"),de=q+1+$.length);var W=X.localNSMap,oe=X.tagName==$,K=oe||X.tagName&&X.tagName.toLowerCase()==$.toLowerCase();if(K){if(s.endElement(X.uri,X.localName,$),W)for(var pe in W)Object.prototype.hasOwnProperty.call(W,pe)&&s.endPrefixMapping(pe);oe||o.fatalError("end tag name: "+$+" is not match the current start tagName:"+X.tagName)}else D.push(X);de++;break;case"?":w&&p(q),de=x4(r,q,s);break;case"!":w&&p(q),de=S4(r,q,s,o);break;default:w&&p(q);var ye=new tT,_e=D[D.length-1].currentNSMap,de=b4(r,q,ye,_e,c,o),le=ye.length;if(!ye.closed&&T4(r,de,ye.tagName,M)&&(ye.closed=!0,i.nbsp||o.warning("unclosed xml attribute")),w&&le){for(var Z=Z1(w,{}),fe=0;fe<le;fe++){var Ee=ye[fe];p(Ee.offset),Ee.locator=Z1(w,{})}s.locator=Z,J1(ye,s,_e)&&D.push(ye),s.locator=w}else J1(ye,s,_e)&&D.push(ye);dd.isHTML(ye.uri)&&!ye.closed?de=_4(r,de,ye.tagName,c,s):de++}}catch(J){if(J instanceof Zl)throw J;o.error("element parse error: "+J),de=-1}de>A?A=de:f(Math.max(q,A)+1)}}function Z1(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}function b4(r,e,i,s,o,l){function c(w,D,M){i.attributeNames.hasOwnProperty(w)&&l.fatalError("Attribute "+w+" redefined"),i.addValue(w,D.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,o),M)}for(var f,p,b=++e,_=hd;;){var x=r.charAt(b);switch(x){case"=":if(_===Ma)f=r.slice(e,b),_=fd;else if(_===Wl)_=fd;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(_===fd||_===Ma)if(_===Ma&&(l.warning('attribute value must after "="'),f=r.slice(e,b)),e=b+1,b=r.indexOf(x,e),b>0)p=r.slice(e,b),c(f,p,e-1),_=Kl;else throw new Error("attribute value no end '"+x+"' match");else if(_==Ql)p=r.slice(e,b),c(f,p,e),l.warning('attribute "'+f+'" missed start quot('+x+")!!"),e=b+1,_=Kl;else throw new Error('attribute value must after "="');break;case"/":switch(_){case hd:i.setTagName(r.slice(e,b));case Kl:case pd:case Gf:_=Gf,i.closed=!0;case Ql:case Ma:break;case Wl:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return l.error("unexpected end of input"),_==hd&&i.setTagName(r.slice(e,b)),b;case">":switch(_){case hd:i.setTagName(r.slice(e,b));case Kl:case pd:case Gf:break;case Ql:case Ma:p=r.slice(e,b),p.slice(-1)==="/"&&(i.closed=!0,p=p.slice(0,-1));case Wl:_===Wl&&(p=f),_==Ql?(l.warning('attribute "'+p+'" missed quot(")!'),c(f,p,e)):((!dd.isHTML(s[""])||!p.match(/^(?:disabled|checked|selected)$/i))&&l.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),c(p,p,e));break;case fd:throw new Error("attribute value missed!!")}return b;case"":x=" ";default:if(x<=" ")switch(_){case hd:i.setTagName(r.slice(e,b)),_=pd;break;case Ma:f=r.slice(e,b),_=Wl;break;case Ql:var p=r.slice(e,b);l.warning('attribute "'+p+'" missed quot(")!!'),c(f,p,e);case Kl:_=pd;break}else switch(_){case Wl:i.tagName,(!dd.isHTML(s[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&l.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!'),c(f,f,e),e=b,_=Ma;break;case Kl:l.warning('attribute space is required"'+f+'"!!');case pd:_=Ma,e=b;break;case fd:_=Ql,e=b;break;case Gf:throw new Error("elements closed character '/' and '>' must be connected to")}}b++}}function J1(r,e,i){for(var s=r.tagName,o=null,x=r.length;x--;){var l=r[x],c=l.qName,f=l.value,w=c.indexOf(":");if(w>0)var p=l.prefix=c.slice(0,w),b=c.slice(w+1),_=p==="xmlns"&&b;else b=c,p=null,_=c==="xmlns"&&"";l.localName=b,_!==!1&&(o==null&&(o={},eT(i,i={})),i[_]=o[_]=f,l.uri=dd.XMLNS,e.startPrefixMapping(_,f))}for(var x=r.length;x--;){l=r[x];var p=l.prefix;p&&(p==="xml"&&(l.uri=dd.XML),p!=="xmlns"&&(l.uri=i[p||""]))}var w=s.indexOf(":");w>0?(p=r.prefix=s.slice(0,w),b=r.localName=s.slice(w+1)):(p=null,b=r.localName=s);var D=r.uri=i[p||""];if(e.startElement(D,b,s,r),r.closed){if(e.endElement(D,b,s),o)for(p in o)Object.prototype.hasOwnProperty.call(o,p)&&e.endPrefixMapping(p)}else return r.currentNSMap=i,r.localNSMap=o,!0}function _4(r,e,i,s,o){if(/^(?:script|textarea)$/i.test(i)){var l=r.indexOf("</"+i+">",e),c=r.substring(e+1,l);if(/[&<]/.test(c))return/^script$/i.test(i)?(o.characters(c,0,c.length),l):(c=c.replace(/&#?\w+;/g,s),o.characters(c,0,c.length),l)}return e+1}function T4(r,e,i,s){var o=s[i];return o==null&&(o=r.lastIndexOf("</"+i+">"),o<e&&(o=r.lastIndexOf("</"+i)),s[i]=o),o<e}function eT(r,e){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}function S4(r,e,i,s){var o=r.charAt(e+2);switch(o){case"-":if(r.charAt(e+3)==="-"){var l=r.indexOf("-->",e+4);return l>e?(i.comment(r,e+4,l-e-4),l+3):(s.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var l=r.indexOf("]]>",e+9);return i.startCDATA(),i.characters(r,e+9,l-e-9),i.endCDATA(),l+3}var c=E4(r,e),f=c.length;if(f>1&&/!doctype/i.test(c[0][0])){var p=c[1][0],b=!1,_=!1;f>3&&(/^public$/i.test(c[2][0])?(b=c[3][0],_=f>4&&c[4][0]):/^system$/i.test(c[2][0])&&(_=c[3][0]));var x=c[f-1];return i.startDTD(p,b,_),i.endDTD(),x.index+x[0].length}}return-1}function x4(r,e,i){var s=r.indexOf("?>",e);if(s){var o=r.substring(e,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,i.processingInstruction(o[1],o[2]),s+2):-1}return-1}function tT(){this.attributeNames={}}tT.prototype={setTagName:function(r){if(!Q1.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,e,i){if(!Q1.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:i}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};function E4(r,e){var i,s=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(o.lastIndex=e,o.exec(r);i=o.exec(r);)if(s.push(i),i[1])return s}h0.XMLReader=K1,h0.ParseError=Zl;var C4=qr,w4=Ra,iT=X1,nT=h0,A4=w4.DOMImplementation,sT=C4.NAMESPACE,k4=nT.ParseError,D4=nT.XMLReader;function rT(r){return r.replace(/\r[\n\u0085]/g,`
|
||
`).replace(/[\r\u0085\u2028]/g,`
|
||
`)}function aT(r){this.options=r||{locator:{}}}aT.prototype.parseFromString=function(r,e){var i=this.options,s=new D4,o=i.domBuilder||new md,l=i.errorHandler,c=i.locator,f=i.xmlns||{},p=/\/x?html?$/.test(e),b=p?iT.HTML_ENTITIES:iT.XML_ENTITIES;c&&o.setDocumentLocator(c),s.errorHandler=O4(l,o,c),s.domBuilder=i.domBuilder||o,p&&(f[""]=sT.HTML),f.xml=f.xml||sT.XML;var _=i.normalizeLineEndings||rT;return r&&typeof r=="string"?s.parse(_(r),f,b):s.errorHandler.error("invalid doc source"),o.doc};function O4(r,e,i){if(!r){if(e instanceof md)return e;r=e}var s={},o=r instanceof Function;i=i||{};function l(c){var f=r[c];!f&&o&&(f=r.length==2?function(p){r(c,p)}:r),s[c]=f&&function(p){f("[xmldom "+c+"] "+p+p0(i))}||function(){}}return l("warning"),l("error"),l("fatalError"),s}function md(){this.cdata=!1}function Jl(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}md.prototype={startDocument:function(){this.doc=new A4().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(r,e,i,s){var o=this.doc,l=o.createElementNS(r,i||e),c=s.length;Yf(this,l),this.currentElement=l,this.locator&&Jl(this.locator,l);for(var f=0;f<c;f++){var r=s.getURI(f),p=s.getValue(f),i=s.getQName(f),b=o.createAttributeNS(r,i);this.locator&&Jl(s.getLocator(f),b),b.value=b.nodeValue=p,l.setAttributeNode(b)}},endElement:function(r,e,i){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(r,e){},endPrefixMapping:function(r){},processingInstruction:function(r,e){var i=this.doc.createProcessingInstruction(r,e);this.locator&&Jl(this.locator,i),Yf(this,i)},ignorableWhitespace:function(r,e,i){},characters:function(r,e,i){if(r=oT.apply(this,arguments),r){if(this.cdata)var s=this.doc.createCDATASection(r);else var s=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(s):/^\s*$/.test(r)&&this.doc.appendChild(s),this.locator&&Jl(this.locator,s)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){(this.locator=r)&&(r.lineNumber=0)},comment:function(r,e,i){r=oT.apply(this,arguments);var s=this.doc.createComment(r);this.locator&&Jl(this.locator,s),Yf(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,e,i){var s=this.doc.implementation;if(s&&s.createDocumentType){var o=s.createDocumentType(r,e,i);this.locator&&Jl(this.locator,o),Yf(this,o),this.doc.doctype=o}},warning:function(r){console.warn("[xmldom warning] "+r,p0(this.locator))},error:function(r){console.error("[xmldom error] "+r,p0(this.locator))},fatalError:function(r){throw new k4(r,this.locator)}};function p0(r){if(r)return`
|
||
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}function oT(r,e,i){return typeof r=="string"?r.substr(e,i):r.length>=e+i||e?new java.lang.String(r,e,i)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){md.prototype[r]=function(){return null}});function Yf(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}$f.__DOMHandler=md,$f.normalizeLineEndings=rT,$f.DOMParser=aT;var R4=$f.DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const lT=r=>!!r&&typeof r=="object",ki=(...r)=>r.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(s=>{Array.isArray(e[s])&&Array.isArray(i[s])?e[s]=e[s].concat(i[s]):lT(e[s])&&lT(i[s])?e[s]=ki(e[s],i[s]):e[s]=i[s]}),e),{}),uT=r=>Object.keys(r).map(e=>r[e]),M4=(r,e)=>{const i=[];for(let s=r;s<e;s++)i.push(s);return i},eu=r=>r.reduce((e,i)=>e.concat(i),[]),cT=r=>{if(!r.length)return[];const e=[];for(let i=0;i<r.length;i++)e.push(r[i]);return e},L4=(r,e)=>r.reduce((i,s,o)=>(s[e]&&i.push(o),i),[]),I4=(r,e)=>uT(r.reduce((i,s)=>(s.forEach(o=>{i[e(o)]=o}),i),{}));var tu={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 gd=({baseUrl:r="",source:e="",range:i="",indexRange:s=""})=>{const o={uri:e,resolvedUri:Uf(r||"",e)};if(i||s){const c=(i||s).split("-");let f=U.BigInt?U.BigInt(c[0]):parseInt(c[0],10),p=U.BigInt?U.BigInt(c[1]):parseInt(c[1],10);f<Number.MAX_SAFE_INTEGER&&typeof f=="bigint"&&(f=Number(f)),p<Number.MAX_SAFE_INTEGER&&typeof p=="bigint"&&(p=Number(p));let b;typeof p=="bigint"||typeof f=="bigint"?b=U.BigInt(p)-U.BigInt(f)+U.BigInt(1):b=p-f+1,typeof b=="bigint"&&b<Number.MAX_SAFE_INTEGER&&(b=Number(b)),o.byterange={length:b,offset:f}}return o},P4=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=U.BigInt(r.offset)+U.BigInt(r.length)-U.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},dT=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),N4={static(r){const{duration:e,timescale:i=1,sourceDuration:s,periodDuration:o}=r,l=dT(r.endNumber),c=e/i;return typeof l=="number"?{start:0,end:l}:typeof o=="number"?{start:0,end:o/c}:{start:0,end:s/c}},dynamic(r){const{NOW:e,clientOffset:i,availabilityStartTime:s,timescale:o=1,duration:l,periodStart:c=0,minimumUpdatePeriod:f=0,timeShiftBufferDepth:p=1/0}=r,b=dT(r.endNumber),_=(e+i)/1e3,x=s+c,D=_+f-x,M=Math.ceil(D*o/l),A=Math.floor((_-x-p)*o/l),q=Math.floor((_-x)*o/l);return{start:Math.max(0,A),end:typeof b=="number"?b:Math.min(M,q)}}},B4=r=>e=>{const{duration:i,timescale:s=1,periodStart:o,startNumber:l=1}=r;return{number:l+e,duration:i/s,timeline:o,time:e*i}},m0=r=>{const{type:e,duration:i,timescale:s=1,periodDuration:o,sourceDuration:l}=r,{start:c,end:f}=N4[e](r),p=M4(c,f).map(B4(r));if(e==="static"){const b=p.length-1,_=typeof o=="number"?o:l;p[b].duration=_-i/s*b}return p},hT=r=>{const{baseUrl:e,initialization:i={},sourceDuration:s,indexRange:o="",periodStart:l,presentationTime:c,number:f=0,duration:p}=r;if(!e)throw new Error(tu.NO_BASE_URL);const b=gd({baseUrl:e,source:i.sourceURL,range:i.range}),_=gd({baseUrl:e,source:e,indexRange:o});if(_.map=b,p){const x=m0(r);x.length&&(_.duration=x[0].duration,_.timeline=x[0].timeline)}else s&&(_.duration=s,_.timeline=l);return _.presentationTime=c||l,_.number=f,[_]},g0=(r,e,i)=>{const s=r.sidx.map?r.sidx.map:null,o=r.sidx.duration,l=r.timeline||0,c=r.sidx.byterange,f=c.offset+c.length,p=e.timescale,b=e.references.filter(q=>q.referenceType!==1),_=[],x=r.endList?"static":"dynamic",w=r.sidx.timeline;let D=w,M=r.mediaSequence||0,A;typeof e.firstOffset=="bigint"?A=U.BigInt(f)+e.firstOffset:A=f+e.firstOffset;for(let q=0;q<b.length;q++){const N=e.references[q],G=N.referencedSize,$=N.subsegmentDuration;let X;typeof A=="bigint"?X=A+U.BigInt(G)-U.BigInt(1):X=A+G-1;const W=`${A}-${X}`,K=hT({baseUrl:i,timescale:p,timeline:l,periodStart:w,presentationTime:D,number:M,duration:$,sourceDuration:o,indexRange:W,type:x})[0];s&&(K.map=s),_.push(K),typeof A=="bigint"?A+=U.BigInt(G):A+=G,D+=$/p,M++}return r.segments=_,r},U4=["AUDIO","SUBTITLES"],q4=1/60,fT=r=>I4(r,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),F4=(r,e)=>{for(let i=0;i<r.length;i++)if(r[i].attributes.NAME===e)return r[i];return null},pT=r=>{let e=[];return n4(r,U4,(i,s,o,l)=>{e=e.concat(i.playlists||[])}),e},mT=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((i,s)=>{i.number=r.mediaSequence+s})},j4=({oldPlaylists:r,newPlaylists:e,timelineStarts:i})=>{e.forEach(s=>{s.discontinuitySequence=i.findIndex(function({timeline:p}){return p===s.timeline});const o=F4(r,s.attributes.NAME);if(!o||s.sidx)return;const l=s.segments[0],c=o.segments.findIndex(function(p){return Math.abs(p.presentationTime-l.presentationTime)<q4});if(c===-1){mT({playlist:s,mediaSequence:o.mediaSequence+o.segments.length}),s.segments[0].discontinuity=!0,s.discontinuityStarts.unshift(0),(!o.segments.length&&s.timeline>o.timeline||o.segments.length&&s.timeline>o.segments[o.segments.length-1].timeline)&&s.discontinuitySequence--;return}o.segments[c].discontinuity&&!l.discontinuity&&(l.discontinuity=!0,s.discontinuityStarts.unshift(0),s.discontinuitySequence--),mT({playlist:s,mediaSequence:o.segments[c].number})})},H4=({oldManifest:r,newManifest:e})=>{const i=r.playlists.concat(pT(r)),s=e.playlists.concat(pT(e));return e.timelineStarts=fT([r.timelineStarts,e.timelineStarts]),j4({oldPlaylists:i,newPlaylists:s,timelineStarts:e.timelineStarts}),e},Xf=r=>r&&r.uri+"-"+P4(r.byterange),y0=r=>{const e=r.reduce(function(s,o){return s[o.attributes.baseUrl]||(s[o.attributes.baseUrl]=[]),s[o.attributes.baseUrl].push(o),s},{});let i=[];return Object.values(e).forEach(s=>{const o=uT(s.reduce((l,c)=>{const f=c.attributes.id+(c.attributes.lang||"");return l[f]?(c.segments&&(c.segments[0]&&(c.segments[0].discontinuity=!0),l[f].segments.push(...c.segments)),c.attributes.contentProtection&&(l[f].attributes.contentProtection=c.attributes.contentProtection)):(l[f]=c,l[f].attributes.timelineStarts=[]),l[f].attributes.timelineStarts.push({start:c.attributes.periodStart,timeline:c.attributes.periodStart}),l},{}));i=i.concat(o)}),i.map(s=>(s.discontinuityStarts=L4(s.segments||[],"discontinuity"),s))},v0=(r,e)=>{const i=Xf(r.sidx),s=i&&e[i]&&e[i].sidx;return s&&g0(r,s,r.sidx.resolvedUri),r},z4=(r,e={})=>{if(!Object.keys(e).length)return r;for(const i in r)r[i]=v0(r[i],e);return r},V4=({attributes:r,segments:e,sidx:i,mediaSequence:s,discontinuitySequence:o,discontinuityStarts:l},c)=>{const f={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:r.timelineStarts,mediaSequence:s,segments:e};return r.contentProtection&&(f.contentProtection=r.contentProtection),r.serviceLocation&&(f.attributes.serviceLocation=r.serviceLocation),i&&(f.sidx=i),c&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f},$4=({attributes:r,segments:e,mediaSequence:i,discontinuityStarts:s,discontinuitySequence:o})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const l={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(l.CODECS=r.codecs);const c={attributes:l,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:s,discontinuitySequence:o,mediaSequence:i,segments:e};return r.serviceLocation&&(c.attributes.serviceLocation=r.serviceLocation),c},G4=(r,e={},i=!1)=>{let s;const o=r.reduce((l,c)=>{const f=c.attributes.role&&c.attributes.role.value||"",p=c.attributes.lang||"";let b=c.attributes.label||"main";if(p&&!c.attributes.label){const x=f?` (${f})`:"";b=`${c.attributes.lang}${x}`}l[b]||(l[b]={language:p,autoselect:!0,default:f==="main",playlists:[],uri:""});const _=v0(V4(c,i),e);return l[b].playlists.push(_),typeof s>"u"&&f==="main"&&(s=c,s.default=!0),l},{});if(!s){const l=Object.keys(o)[0];o[l].default=!0}return o},Y4=(r,e={})=>r.reduce((i,s)=>{const o=s.attributes.label||s.attributes.lang||"text",l=s.attributes.lang||"und";return i[o]||(i[o]={language:l,default:!1,autoselect:!1,playlists:[],uri:""}),i[o].playlists.push(v0($4(s),e)),i},{}),X4=r=>r.reduce((e,i)=>(i&&i.forEach(s=>{const{channel:o,language:l}=s;e[l]={autoselect:!1,default:!1,instreamId:o,language:l},s.hasOwnProperty("aspectRatio")&&(e[l].aspectRatio=s.aspectRatio),s.hasOwnProperty("easyReader")&&(e[l].easyReader=s.easyReader),s.hasOwnProperty("3D")&&(e[l]["3D"]=s["3D"])}),e),{}),W4=({attributes:r,segments:e,sidx:i,discontinuityStarts:s})=>{const o={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:s,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(o.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(o.contentProtection=r.contentProtection),r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),i&&(o.sidx=i),o},Q4=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",K4=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",Z4=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",J4=(r,e)=>{r.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:s}){return s===i.timeline}),i.segments&&i.segments.forEach((s,o)=>{s.number=o})})},gT=r=>r?Object.keys(r).reduce((e,i)=>{const s=r[i];return e.concat(s.playlists)},[]):[],e3=({dashPlaylists:r,locations:e,contentSteering:i,sidxMapping:s={},previousManifest:o,eventStream:l})=>{if(!r.length)return{};const{sourceDuration:c,type:f,suggestedPresentationDelay:p,minimumUpdatePeriod:b}=r[0].attributes,_=y0(r.filter(Q4)).map(W4),x=y0(r.filter(K4)),w=y0(r.filter(Z4)),D=r.map(X=>X.attributes.captionServices).filter(Boolean),M={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:c,playlists:z4(_,s)};b>=0&&(M.minimumUpdatePeriod=b*1e3),e&&(M.locations=e),i&&(M.contentSteering=i),f==="dynamic"&&(M.suggestedPresentationDelay=p),l&&l.length>0&&(M.eventStream=l);const A=M.playlists.length===0,q=x.length?G4(x,s,A):null,N=w.length?Y4(w,s):null,G=_.concat(gT(q),gT(N)),$=G.map(({timelineStarts:X})=>X);return M.timelineStarts=fT($),J4(G,M.timelineStarts),q&&(M.mediaGroups.AUDIO.audio=q),N&&(M.mediaGroups.SUBTITLES.subs=N),D.length&&(M.mediaGroups["CLOSED-CAPTIONS"].cc=X4(D)),o?H4({oldManifest:o,newManifest:M}):M},t3=(r,e,i)=>{const{NOW:s,clientOffset:o,availabilityStartTime:l,timescale:c=1,periodStart:f=0,minimumUpdatePeriod:p=0}=r,b=(s+o)/1e3,_=l+f,w=b+p-_;return Math.ceil((w*c-e)/i)},yT=(r,e)=>{const{type:i,minimumUpdatePeriod:s=0,media:o="",sourceDuration:l,timescale:c=1,startNumber:f=1,periodStart:p}=r,b=[];let _=-1;for(let x=0;x<e.length;x++){const w=e[x],D=w.d,M=w.r||0,A=w.t||0;_<0&&(_=A),A&&A>_&&(_=A);let q;if(M<0){const $=x+1;$===e.length?i==="dynamic"&&s>0&&o.indexOf("$Number$")>0?q=t3(r,_,D):q=(l*c-_)/D:q=(e[$].t-_)/D}else q=M+1;const N=f+b.length+q;let G=f+b.length;for(;G<N;)b.push({number:G,duration:D/c,time:_,timeline:p}),_+=D,G++}return b},i3=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,n3=r=>(e,i,s,o)=>{if(e==="$$")return"$";if(typeof r[i]>"u")return e;const l=""+r[i];return i==="RepresentationID"||(s?o=parseInt(o,10):o=1,l.length>=o)?l:`${new Array(o-l.length+1).join("0")}${l}`},vT=(r,e)=>r.replace(i3,n3(e)),s3=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?m0(r):yT(r,e),r3=(r,e)=>{const i={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:s={sourceURL:"",range:""}}=r,o=gd({baseUrl:r.baseUrl,source:vT(s.sourceURL,i),range:s.range});return s3(r,e).map(c=>{i.Number=c.number,i.Time=c.time;const f=vT(r.media||"",i),p=r.timescale||1,b=r.presentationTimeOffset||0,_=r.periodStart+(c.time-b)/p;return{uri:f,timeline:c.timeline,duration:c.duration,resolvedUri:Uf(r.baseUrl||"",f),map:o,number:c.number,presentationTime:_}})},a3=(r,e)=>{const{baseUrl:i,initialization:s={}}=r,o=gd({baseUrl:i,source:s.sourceURL,range:s.range}),l=gd({baseUrl:i,source:e.media,range:e.mediaRange});return l.map=o,l},o3=(r,e)=>{const{duration:i,segmentUrls:s=[],periodStart:o}=r;if(!i&&!e||i&&e)throw new Error(tu.SEGMENT_TIME_UNSPECIFIED);const l=s.map(p=>a3(r,p));let c;return i&&(c=m0(r)),e&&(c=yT(r,e)),c.map((p,b)=>{if(l[b]){const _=l[b],x=r.timescale||1,w=r.presentationTimeOffset||0;return _.timeline=p.timeline,_.duration=p.duration,_.number=p.number,_.presentationTime=o+(p.time-w)/x,_}}).filter(p=>p)},l3=({attributes:r,segmentInfo:e})=>{let i,s;e.template?(s=r3,i=ki(r,e.template)):e.base?(s=hT,i=ki(r,e.base)):e.list&&(s=o3,i=ki(r,e.list));const o={attributes:r};if(!s)return o;const l=s(i,e.segmentTimeline);if(i.duration){const{duration:c,timescale:f=1}=i;i.duration=c/f}else l.length?i.duration=l.reduce((c,f)=>Math.max(c,Math.ceil(f.duration)),0):i.duration=0;return o.attributes=i,o.segments=l,e.base&&i.indexRange&&(o.sidx=l[0],o.segments=[]),o},u3=r=>r.map(l3),Xt=(r,e)=>cT(r.childNodes).filter(({tagName:i})=>i===e),yd=r=>r.textContent.trim(),c3=r=>parseFloat(r.split("/").reduce((e,i)=>e/i)),iu=r=>{const f=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!f)return 0;const[p,b,_,x,w,D]=f.slice(1);return parseFloat(p||0)*31536e3+parseFloat(b||0)*2592e3+parseFloat(_||0)*86400+parseFloat(x||0)*3600+parseFloat(w||0)*60+parseFloat(D||0)},d3=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),bT={mediaPresentationDuration(r){return iu(r)},availabilityStartTime(r){return d3(r)/1e3},minimumUpdatePeriod(r){return iu(r)},suggestedPresentationDelay(r){return iu(r)},type(r){return r},timeShiftBufferDepth(r){return iu(r)},start(r){return iu(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return c3(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?iu(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},mi=r=>r&&r.attributes?cT(r.attributes).reduce((e,i)=>{const s=bT[i.name]||bT.DEFAULT;return e[i.name]=s(i.value),e},{}):{},h3={"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"},Wf=(r,e)=>e.length?eu(r.map(function(i){return e.map(function(s){const o=yd(s),l=Uf(i.baseUrl,o),c=ki(mi(s),{baseUrl:l});return l!==o&&!c.serviceLocation&&i.serviceLocation&&(c.serviceLocation=i.serviceLocation),c})})):r,b0=r=>{const e=Xt(r,"SegmentTemplate")[0],i=Xt(r,"SegmentList")[0],s=i&&Xt(i,"SegmentURL").map(x=>ki({tag:"SegmentURL"},mi(x))),o=Xt(r,"SegmentBase")[0],l=i||e,c=l&&Xt(l,"SegmentTimeline")[0],f=i||o||e,p=f&&Xt(f,"Initialization")[0],b=e&&mi(e);b&&p?b.initialization=p&&mi(p):b&&b.initialization&&(b.initialization={sourceURL:b.initialization});const _={template:b,segmentTimeline:c&&Xt(c,"S").map(x=>mi(x)),list:i&&ki(mi(i),{segmentUrls:s,initialization:mi(p)}),base:o&&ki(mi(o),{initialization:mi(p)})};return Object.keys(_).forEach(x=>{_[x]||delete _[x]}),_},f3=(r,e,i)=>s=>{const o=Xt(s,"BaseURL"),l=Wf(e,o),c=ki(r,mi(s)),f=b0(s);return l.map(p=>({segmentInfo:ki(i,f),attributes:ki(c,p)}))},p3=r=>r.reduce((e,i)=>{const s=mi(i);s.schemeIdUri&&(s.schemeIdUri=s.schemeIdUri.toLowerCase());const o=h3[s.schemeIdUri];if(o){e[o]={attributes:s};const l=Xt(i,"cenc:pssh")[0];if(l){const c=yd(l);e[o].pssh=c&&c1(c)}}return e},{}),m3=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{let s,o;return o=i,/^CC\d=/.test(i)?[s,o]=i.split("="):/^CC\d$/.test(i)&&(s=i),{channel:s,language:o}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{const s={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[o,l=""]=i.split("=");s.channel=o,s.language=i,l.split(",").forEach(c=>{const[f,p]=c.split(":");f==="lang"?s.language=p:f==="er"?s.easyReader=Number(p):f==="war"?s.aspectRatio=Number(p):f==="3D"&&(s["3D"]=Number(p))})}else s.language=i;return s.channel&&(s.channel="SERVICE"+s.channel),s})},g3=r=>eu(Xt(r.node,"EventStream").map(e=>{const i=mi(e),s=i.schemeIdUri;return Xt(e,"Event").map(o=>{const l=mi(o),c=l.presentationTime||0,f=i.timescale||1,p=l.duration||0,b=c/f+r.attributes.start;return{schemeIdUri:s,value:i.value,id:l.id,start:b,end:b+p/f,messageData:yd(o)||l.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),y3=(r,e,i)=>s=>{const o=mi(s),l=Wf(e,Xt(s,"BaseURL")),c=Xt(s,"Role")[0],f={role:mi(c)};let p=ki(r,o,f);const b=Xt(s,"Accessibility")[0],_=m3(mi(b));_&&(p=ki(p,{captionServices:_}));const x=Xt(s,"Label")[0];if(x&&x.childNodes.length){const q=x.childNodes[0].nodeValue.trim();p=ki(p,{label:q})}const w=p3(Xt(s,"ContentProtection"));Object.keys(w).length&&(p=ki(p,{contentProtection:w}));const D=b0(s),M=Xt(s,"Representation"),A=ki(i,D);return eu(M.map(f3(p,l,A)))},v3=(r,e)=>(i,s)=>{const o=Wf(e,Xt(i.node,"BaseURL")),l=ki(r,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(l.periodDuration=i.attributes.duration);const c=Xt(i.node,"AdaptationSet"),f=b0(i.node);return eu(c.map(y3(l,o,f)))},b3=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const i=ki({serverURL:yd(r[0])},mi(r[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},_3=({attributes:r,priorPeriodAttributes:e,mpdType:i})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,T3=(r,e={})=>{const{manifestUri:i="",NOW:s=Date.now(),clientOffset:o=0,eventHandler:l=function(){}}=e,c=Xt(r,"Period");if(!c.length)throw new Error(tu.INVALID_NUMBER_OF_PERIOD);const f=Xt(r,"Location"),p=mi(r),b=Wf([{baseUrl:i}],Xt(r,"BaseURL")),_=Xt(r,"ContentSteering");p.type=p.type||"static",p.sourceDuration=p.mediaPresentationDuration||0,p.NOW=s,p.clientOffset=o,f.length&&(p.locations=f.map(yd));const x=[];return c.forEach((w,D)=>{const M=mi(w),A=x[D-1];M.start=_3({attributes:M,priorPeriodAttributes:A?A.attributes:null,mpdType:p.type}),x.push({node:w,attributes:M})}),{locations:p.locations,contentSteeringInfo:b3(_,l),representationInfo:eu(x.map(v3(p,b))),eventStream:eu(x.map(g3))}},_T=r=>{if(r==="")throw new Error(tu.DASH_EMPTY_MANIFEST);const e=new R4;let i,s;try{i=e.parseFromString(r,"application/xml"),s=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!s||s&&s.getElementsByTagName("parsererror").length>0)throw new Error(tu.DASH_INVALID_XML);return s},S3=r=>{const e=Xt(r,"UTCTiming")[0];if(!e)return null;const i=mi(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(tu.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},x3=(r,e={})=>{const i=T3(_T(r),e),s=u3(i.representationInfo);return e3({dashPlaylists:s,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},E3=r=>S3(_T(r));var TT=Math.pow(2,32),C3=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),i;return e.getBigUint64?(i=e.getBigUint64(0),i<Number.MAX_SAFE_INTEGER?Number(i):i):e.getUint32(0)*TT+e.getUint32(4)},w3={getUint64:C3,MAX_UINT32:TT},ST=w3.getUint64,A3=function(r){var e=new DataView(r.buffer,r.byteOffset,r.byteLength),i={version:r[0],flags:new Uint8Array(r.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},s=12;i.version===0?(i.earliestPresentationTime=e.getUint32(s),i.firstOffset=e.getUint32(s+4),s+=8):(i.earliestPresentationTime=ST(r.subarray(s)),i.firstOffset=ST(r.subarray(s+8)),s+=16),s+=2;var o=e.getUint16(s);for(s+=2;o>0;s+=12,o--)i.references.push({referenceType:(r[s]&128)>>>7,referencedSize:e.getUint32(s)&2147483647,subsegmentDuration:e.getUint32(s+4),startsWithSap:!!(r[s+8]&128),sapType:(r[s+8]&112)>>>4,sapDeltaTime:e.getUint32(s+8)&268435455});return i},k3=A3;const D3=Un(k3);var O3=We([73,68,51]),R3=function(e,i){i===void 0&&(i=0),e=We(e);var s=e[i+5],o=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],l=(s&16)>>4;return l?o+20:o+10},vd=function r(e,i){return i===void 0&&(i=0),e=We(e),e.length-i<10||!Yt(e,O3,{offset:i})?i:(i+=R3(e,i),r(e,i))},xT=function(e){return typeof e=="string"?v1(e):e},M3=function(e){return Array.isArray(e)?e.map(function(i){return xT(i)}):[xT(e)]},L3=function r(e,i,s){s===void 0&&(s=!1),i=M3(i),e=We(e);var o=[];if(!i.length)return o;for(var l=0;l<e.length;){var c=(e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3])>>>0,f=e.subarray(l+4,l+8);if(c===0)break;var p=l+c;if(p>e.length){if(s)break;p=e.length}var b=e.subarray(l+8,p);Yt(f,i[0])&&(i.length===1?o.push(b):o.push.apply(o,r(b,i.slice(1),s))),l=p}return o},Qf={EBML:We([26,69,223,163]),DocType:We([66,130]),Segment:We([24,83,128,103]),SegmentInfo:We([21,73,169,102]),Tracks:We([22,84,174,107]),Track:We([174]),TrackNumber:We([215]),DefaultDuration:We([35,227,131]),TrackEntry:We([174]),TrackType:We([131]),FlagDefault:We([136]),CodecID:We([134]),CodecPrivate:We([99,162]),VideoTrack:We([224]),AudioTrack:We([225]),Cluster:We([31,67,182,117]),Timestamp:We([231]),TimestampScale:We([42,215,177]),BlockGroup:We([160]),BlockDuration:We([155]),Block:We([161]),SimpleBlock:We([163])},_0=[128,64,32,16,8,4,2,1],I3=function(e){for(var i=1,s=0;s<_0.length&&!(e&_0[s]);s++)i++;return i},Kf=function(e,i,s,o){s===void 0&&(s=!0),o===void 0&&(o=!1);var l=I3(e[i]),c=e.subarray(i,i+l);return s&&(c=Array.prototype.slice.call(e,i,i+l),c[0]^=_0[l-1]),{length:l,value:e4(c,{signed:o}),bytes:c}},ET=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return r(i)}):typeof e=="number"?t4(e):e},P3=function(e){return Array.isArray(e)?e.map(function(i){return ET(i)}):[ET(e)]},N3=function r(e,i,s){if(s>=i.length)return i.length;var o=Kf(i,s,!1);if(Yt(e.bytes,o.bytes))return s;var l=Kf(i,s+o.length);return r(e,i,s+l.length+l.value+o.length)},CT=function r(e,i){i=P3(i),e=We(e);var s=[];if(!i.length)return s;for(var o=0;o<e.length;){var l=Kf(e,o,!1),c=Kf(e,o+l.length),f=o+l.length+c.length;c.value===127&&(c.value=N3(l,e,f),c.value!==e.length&&(c.value-=f));var p=f+c.value>e.length?e.length:f+c.value,b=e.subarray(f,p);Yt(i[0],l.bytes)&&(i.length===1?s.push(b):s=s.concat(r(b,i.slice(1))));var _=l.length+c.length+b.length;o+=_}return s},B3=We([0,0,0,1]),U3=We([0,0,1]),q3=We([0,0,3]),F3=function(e){for(var i=[],s=1;s<e.length-2;)Yt(e.subarray(s,s+3),q3)&&(i.push(s+2),s++),s++;if(i.length===0)return e;var o=e.length-i.length,l=new Uint8Array(o),c=0;for(s=0;s<o;c++,s++)c===i[0]&&(c++,i.shift()),l[s]=e[c];return l},wT=function(e,i,s,o){o===void 0&&(o=1/0),e=We(e),s=[].concat(s);for(var l=0,c,f=0;l<e.length&&(f<o||c);){var p=void 0;if(Yt(e.subarray(l),B3)?p=4:Yt(e.subarray(l),U3)&&(p=3),!p){l++;continue}if(f++,c)return F3(e.subarray(c,l));var b=void 0;i==="h264"?b=e[l+p]&31:i==="h265"&&(b=e[l+p]>>1&63),s.indexOf(b)!==-1&&(c=l+p),l+=p+(i==="h264"?1:2)}return e.subarray(0,0)},j3=function(e,i,s){return wT(e,"h264",i,s)},H3=function(e,i,s){return wT(e,"h265",i,s)},on={webm:We([119,101,98,109]),matroska:We([109,97,116,114,111,115,107,97]),flac:We([102,76,97,67]),ogg:We([79,103,103,83]),ac3:We([11,119]),riff:We([82,73,70,70]),avi:We([65,86,73]),wav:We([87,65,86,69]),"3gp":We([102,116,121,112,51,103]),mp4:We([102,116,121,112]),fmp4:We([115,116,121,112]),mov:We([102,116,121,112,113,116]),moov:We([109,111,111,118]),moof:We([109,111,111,102])},nu={aac:function(e){var i=vd(e);return Yt(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=vd(e);return Yt(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=CT(e,[Qf.EBML,Qf.DocType])[0];return Yt(i,on.webm)},mkv:function(e){var i=CT(e,[Qf.EBML,Qf.DocType])[0];return Yt(i,on.matroska)},mp4:function(e){if(nu["3gp"](e)||nu.mov(e))return!1;if(Yt(e,on.mp4,{offset:4})||Yt(e,on.fmp4,{offset:4})||Yt(e,on.moof,{offset:4})||Yt(e,on.moov,{offset:4}))return!0},mov:function(e){return Yt(e,on.mov,{offset:4})},"3gp":function(e){return Yt(e,on["3gp"],{offset:4})},ac3:function(e){var i=vd(e);return Yt(e,on.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=vd(e);return Yt(e,on.flac,{offset:i})},ogg:function(e){return Yt(e,on.ogg)},avi:function(e){return Yt(e,on.riff)&&Yt(e,on.avi,{offset:8})},wav:function(e){return Yt(e,on.riff)&&Yt(e,on.wav,{offset:8})},h264:function(e){return j3(e,7,3).length},h265:function(e){return H3(e,[32,33],3).length}},T0=Object.keys(nu).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);T0.forEach(function(r){var e=nu[r];nu[r]=function(i){return e(We(i))}});var z3=nu,S0=function(e){e=We(e);for(var i=0;i<T0.length;i++){var s=T0[i];if(z3[s](e))return s}return""},V3=function(e){return L3(e,["moof"]).length>0},x0=9e4,E0,C0,Zf,w0,AT,kT,DT;E0=function(r){return r*x0},C0=function(r,e){return r*e},Zf=function(r){return r/x0},w0=function(r,e){return r/e},AT=function(r,e){return E0(w0(r,e))},kT=function(r,e){return C0(Zf(r),e)},DT=function(r,e,i){return Zf(i?r:r-e)};var Lo={ONE_SECOND_IN_TS:x0,secondsToVideoTs:E0,secondsToAudioTs:C0,videoTsToSeconds:Zf,audioTsToSeconds:w0,audioTsToVideoTs:AT,videoTsToAudioTs:kT,metadataTsToSeconds:DT};/**
|
||
* @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 A0="8.23.3";const zr={},La=function(r,e){return zr[r]=zr[r]||[],e&&(zr[r]=zr[r].concat(e)),zr[r]},$3=function(r,e){La(r,e)},OT=function(r,e){const i=La(r).indexOf(e);return i<=-1?!1:(zr[r]=zr[r].slice(),zr[r].splice(i,1),!0)},G3=function(r,e){La(r,[].concat(e).map(i=>{const s=(...o)=>(OT(r,s),i(...o));return s}))},Jf={prefixed:!0},ep=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],RT=ep[0];let bd;for(let r=0;r<ep.length;r++)if(ep[r][1]in xe){bd=ep[r];break}if(bd){for(let r=0;r<bd.length;r++)Jf[RT[r]]=bd[r];Jf.prefixed=bd[0]!==RT[0]}let xn=[];const Y3=(r,e,i)=>(s,o,l)=>{const c=e.levels[o],f=new RegExp(`^(${c})$`);let p=r;if(s!=="log"&&l.unshift(s.toUpperCase()+":"),i&&(p=`%c${r}`,l.unshift(i)),l.unshift(p+":"),xn){xn.push([].concat(l));const _=xn.length-1e3;xn.splice(0,_>0?_:0)}if(!U.console)return;let b=U.console[s];!b&&s==="debug"&&(b=U.console.info||U.console.log),!(!b||!c||!f.test(s))&&b[Array.isArray(l)?"apply":"call"](U.console,l)};function k0(r,e=":",i=""){let s="info",o;function l(...c){o("log",s,c)}return o=Y3(r,l,i),l.createLogger=(c,f,p)=>{const b=f!==void 0?f:e,_=p!==void 0?p:i,x=`${r} ${b} ${c}`;return k0(x,b,_)},l.createNewLogger=(c,f,p)=>k0(c,f,p),l.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:s},l.level=c=>{if(typeof c=="string"){if(!l.levels.hasOwnProperty(c))throw new Error(`"${c}" in not a valid log level`);s=c}return s},l.history=()=>xn?[].concat(xn):[],l.history.filter=c=>(xn||[]).filter(f=>new RegExp(`.*${c}.*`).test(f[0])),l.history.clear=()=>{xn&&(xn.length=0)},l.history.disable=()=>{xn!==null&&(xn.length=0,xn=null)},l.history.enable=()=>{xn===null&&(xn=[])},l.error=(...c)=>o("error",s,c),l.warn=(...c)=>o("warn",s,c),l.debug=(...c)=>o("debug",s,c),l}const dt=k0("VIDEOJS"),MT=dt.createLogger,X3=Object.prototype.toString,LT=function(r){return Zs(r)?Object.keys(r):[]};function su(r,e){LT(r).forEach(i=>e(r[i],i))}function IT(r,e,i=0){return LT(r).reduce((s,o)=>e(s,r[o],o),i)}function Zs(r){return!!r&&typeof r=="object"}function ru(r){return Zs(r)&&X3.call(r)==="[object Object]"&&r.constructor===Object}function It(...r){const e={};return r.forEach(i=>{i&&su(i,(s,o)=>{if(!ru(s)){e[o]=s;return}ru(e[o])||(e[o]={}),e[o]=It(e[o],s)})}),e}function PT(r={}){const e=[];for(const i in r)if(r.hasOwnProperty(i)){const s=r[i];e.push(s)}return e}function tp(r,e,i,s=!0){const o=c=>Object.defineProperty(r,e,{value:c,enumerable:!0,writable:!0}),l={configurable:!0,enumerable:!0,get(){const c=i();return o(c),c}};return s&&(l.set=o),Object.defineProperty(r,e,l)}var W3=Object.freeze({__proto__:null,each:su,reduce:IT,isObject:Zs,isPlain:ru,merge:It,values:PT,defineLazyProperty:tp});let D0=!1,NT=null,Ds=!1,BT,UT=!1,au=!1,ou=!1,Js=!1,O0=null,ip=null;const Q3=!!(U.cast&&U.cast.framework&&U.cast.framework.CastReceiverContext);let qT=null,np=!1,sp=!1,rp=!1,ap=!1,op=!1,lp=!1,up=!1;const _d=!!(lu()&&("ontouchstart"in U||U.navigator.maxTouchPoints||U.DocumentTouch&&U.document instanceof U.DocumentTouch)),Ia=U.navigator&&U.navigator.userAgentData;if(Ia&&Ia.platform&&Ia.brands&&(Ds=Ia.platform==="Android",au=!!Ia.brands.find(r=>r.brand==="Microsoft Edge"),ou=!!Ia.brands.find(r=>r.brand==="Chromium"),Js=!au&&ou,O0=ip=(Ia.brands.find(r=>r.brand==="Chromium")||{}).version||null,sp=Ia.platform==="Windows"),!ou){const r=U.navigator&&U.navigator.userAgent||"";D0=/iPod/i.test(r),NT=function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),Ds=/Android/i.test(r),BT=function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),s=e[2]&&parseFloat(e[2]);return i&&s?parseFloat(e[1]+"."+e[2]):i||null}(),UT=/Firefox/i.test(r),au=/Edg/i.test(r),ou=/Chrome/i.test(r)||/CriOS/i.test(r),Js=!au&&ou,O0=ip=function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),qT=function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(i=11),i}(),op=/Tizen/i.test(r),lp=/Web0S/i.test(r),up=op||lp,np=/Safari/i.test(r)&&!Js&&!Ds&&!au&&!up,sp=/Windows/i.test(r),rp=/iPad/i.test(r)||np&&_d&&!/iPhone/i.test(r),ap=/iPhone/i.test(r)&&!rp}const Qi=ap||rp||D0,cp=(np||Qi)&&!Js;var FT=Object.freeze({__proto__:null,get IS_IPOD(){return D0},get IOS_VERSION(){return NT},get IS_ANDROID(){return Ds},get ANDROID_VERSION(){return BT},get IS_FIREFOX(){return UT},get IS_EDGE(){return au},get IS_CHROMIUM(){return ou},get IS_CHROME(){return Js},get CHROMIUM_VERSION(){return O0},get CHROME_VERSION(){return ip},IS_CHROMECAST_RECEIVER:Q3,get IE_VERSION(){return qT},get IS_SAFARI(){return np},get IS_WINDOWS(){return sp},get IS_IPAD(){return rp},get IS_IPHONE(){return ap},get IS_TIZEN(){return op},get IS_WEBOS(){return lp},get IS_SMART_TV(){return up},TOUCH_ENABLED:_d,IS_IOS:Qi,IS_ANY_SAFARI:cp});function jT(r){return typeof r=="string"&&!!r.trim()}function K3(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function lu(){return xe===U.document}function uu(r){return Zs(r)&&r.nodeType===1}function HT(){try{return U.parent!==U.self}catch{return!0}}function zT(r){return function(e,i){if(!jT(e))return xe[r](null);jT(i)&&(i=xe.querySelector(i));const s=uu(i)?i:xe;return s[r]&&s[r](e)}}function Ke(r="div",e={},i={},s){const o=xe.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(l){const c=e[l];l==="textContent"?Pa(o,c):(o[l]!==c||l==="tabIndex")&&(o[l]=c)}),Object.getOwnPropertyNames(i).forEach(function(l){o.setAttribute(l,i[l])}),s&&M0(o,s),o}function Pa(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function R0(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Td(r,e){return K3(e),r.classList.contains(e)}function Io(r,...e){return r.classList.add(...e.reduce((i,s)=>i.concat(s.split(/\s+/)),[])),r}function dp(r,...e){return r?(r.classList.remove(...e.reduce((i,s)=>i.concat(s.split(/\s+/)),[])),r):(dt.warn("removeClass was called with an element that doesn't exist"),null)}function VT(r,e,i){return typeof i=="function"&&(i=i(r,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(s=>r.classList.toggle(s,i)),r}function $T(r,e){Object.getOwnPropertyNames(e).forEach(function(i){const s=e[i];s===null||typeof s>"u"||s===!1?r.removeAttribute(i):r.setAttribute(i,s===!0?"":s)})}function Na(r){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const s=r.attributes;for(let o=s.length-1;o>=0;o--){const l=s[o].name;let c=s[o].value;i.includes(l)&&(c=c!==null),e[l]=c}}return e}function GT(r,e){return r.getAttribute(e)}function cu(r,e,i){r.setAttribute(e,i)}function hp(r,e){r.removeAttribute(e)}function YT(){xe.body.focus(),xe.onselectstart=function(){return!1}}function XT(){xe.onselectstart=function(){return!0}}function du(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(s=>{e[s]!==void 0&&(i[s]=e[s])}),i.height||(i.height=parseFloat(hu(r,"height"))),i.width||(i.width=parseFloat(hu(r,"width"))),i}}function Sd(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,i=r.offsetHeight;let s=0,o=0;for(;r.offsetParent&&r!==xe[Jf.fullscreenElement];)s+=r.offsetLeft,o+=r.offsetTop,r=r.offsetParent;return{left:s,top:o,width:e,height:i}}function fp(r,e){const i={x:0,y:0};if(Qi){let _=r;for(;_&&_.nodeName.toLowerCase()!=="html";){const x=hu(_,"transform");if(/^matrix/.test(x)){const w=x.slice(7,-1).split(/,\s/).map(Number);i.x+=w[4],i.y+=w[5]}else if(/^matrix3d/.test(x)){const w=x.slice(9,-1).split(/,\s/).map(Number);i.x+=w[12],i.y+=w[13]}if(_.assignedSlot&&_.assignedSlot.parentElement&&U.WebKitCSSMatrix){const w=U.getComputedStyle(_.assignedSlot.parentElement).transform,D=new U.WebKitCSSMatrix(w);i.x+=D.m41,i.y+=D.m42}_=_.parentNode||_.host}}const s={},o=Sd(e.target),l=Sd(r),c=l.width,f=l.height;let p=e.offsetY-(l.top-o.top),b=e.offsetX-(l.left-o.left);return e.changedTouches&&(b=e.changedTouches[0].pageX-l.left,p=e.changedTouches[0].pageY+l.top,Qi&&(b-=i.x,p-=i.y)),s.y=1-Math.max(0,Math.min(1,p/f)),s.x=Math.max(0,Math.min(1,b/c)),s}function WT(r){return Zs(r)&&r.nodeType===3}function pp(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function QT(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),uu(e)||WT(e))return e;if(typeof e=="string"&&/\S/.test(e))return xe.createTextNode(e)}).filter(e=>e)}function M0(r,e){return QT(e).forEach(i=>r.appendChild(i)),r}function KT(r,e){return M0(pp(r),e)}function xd(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const Ba=zT("querySelector"),ZT=zT("querySelectorAll");function hu(r,e){if(!r||!e)return"";if(typeof U.getComputedStyle=="function"){let i;try{i=U.getComputedStyle(r)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function JT(r){[...xe.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(o=>o.cssText).join(""),s=xe.createElement("style");s.textContent=i,r.document.head.appendChild(s)}catch{const s=xe.createElement("link");s.rel="stylesheet",s.type=e.type,s.media=e.media.mediaText,s.href=e.href,r.document.head.appendChild(s)}})}var e2=Object.freeze({__proto__:null,isReal:lu,isEl:uu,isInFrame:HT,createEl:Ke,textContent:Pa,prependTo:R0,hasClass:Td,addClass:Io,removeClass:dp,toggleClass:VT,setAttributes:$T,getAttributes:Na,getAttribute:GT,setAttribute:cu,removeAttribute:hp,blockTextSelection:YT,unblockTextSelection:XT,getBoundingClientRect:du,findPosition:Sd,getPointerPosition:fp,isTextNode:WT,emptyEl:pp,normalizeContent:QT,appendContent:M0,insertContent:KT,isSingleLeftClick:xd,$:Ba,$$:ZT,computedStyle:hu,copyStyleSheetsToWindow:JT});let t2=!1,L0;const Z3=function(){if(L0.options.autoSetup===!1)return;const r=Array.prototype.slice.call(xe.getElementsByTagName("video")),e=Array.prototype.slice.call(xe.getElementsByTagName("audio")),i=Array.prototype.slice.call(xe.getElementsByTagName("video-js")),s=r.concat(e,i);if(s&&s.length>0)for(let o=0,l=s.length;o<l;o++){const c=s[o];if(c&&c.getAttribute)c.player===void 0&&c.getAttribute("data-setup")!==null&&L0(c);else{I0(1);break}}else t2||I0(1)};function I0(r,e){lu()&&(e&&(L0=e),U.setTimeout(Z3,r))}function P0(){t2=!0,U.removeEventListener("load",P0)}lu()&&(xe.readyState==="complete"?P0():U.addEventListener("load",P0));const i2=function(r){const e=xe.createElement("style");return e.className=r,e},n2=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ln=new WeakMap;let J3=3;function rs(){return J3++}function s2(r,e){if(!ln.has(r))return;const i=ln.get(r);i.handlers[e].length===0&&(delete i.handlers[e],r.removeEventListener?r.removeEventListener(e,i.dispatcher,!1):r.detachEvent&&r.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&&ln.delete(r)}function N0(r,e,i,s){i.forEach(function(o){r(e,o,s)})}function mp(r){if(r.fixed_)return r;function e(){return!0}function i(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const s=r||U.event;r={};const o=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const l in s)o.includes(l)||l==="returnValue"&&s.preventDefault||(r[l]=s[l]);if(r.target||(r.target=r.srcElement||xe),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){s.preventDefault&&s.preventDefault(),r.returnValue=!1,s.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){s.stopPropagation&&s.stopPropagation(),r.cancelBubble=!0,s.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=i,r.stopImmediatePropagation=function(){s.stopImmediatePropagation&&s.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=i,r.clientX!==null&&r.clientX!==void 0){const l=xe.documentElement,c=xe.body;r.pageX=r.clientX+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),r.pageY=r.clientY+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let gp;const eO=function(){if(typeof gp!="boolean"){gp=!1;try{const r=Object.defineProperty({},"passive",{get(){gp=!0}});U.addEventListener("test",null,r),U.removeEventListener("test",null,r)}catch{}}return gp},tO=["touchstart","touchmove"];function Fn(r,e,i){if(Array.isArray(e))return N0(Fn,r,e,i);ln.has(r)||ln.set(r,{});const s=ln.get(r);if(s.handlers||(s.handlers={}),s.handlers[e]||(s.handlers[e]=[]),i.guid||(i.guid=rs()),s.handlers[e].push(i),s.dispatcher||(s.disabled=!1,s.dispatcher=function(o,l){if(s.disabled)return;o=mp(o);const c=s.handlers[o.type];if(c){const f=c.slice(0);for(let p=0,b=f.length;p<b&&!o.isImmediatePropagationStopped();p++)try{f[p].call(r,o,l)}catch(_){dt.error(_)}}}),s.handlers[e].length===1)if(r.addEventListener){let o=!1;eO()&&tO.indexOf(e)>-1&&(o={passive:!0}),r.addEventListener(e,s.dispatcher,o)}else r.attachEvent&&r.attachEvent("on"+e,s.dispatcher)}function Ki(r,e,i){if(!ln.has(r))return;const s=ln.get(r);if(!s.handlers)return;if(Array.isArray(e))return N0(Ki,r,e,i);const o=function(c,f){s.handlers[f]=[],s2(c,f)};if(e===void 0){for(const c in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},c)&&o(r,c);return}const l=s.handlers[e];if(l){if(!i){o(r,e);return}if(i.guid)for(let c=0;c<l.length;c++)l[c].guid===i.guid&&l.splice(c--,1);s2(r,e)}}function fu(r,e,i){const s=ln.has(r)?ln.get(r):{},o=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=mp(e),s.dispatcher&&s.dispatcher.call(r,e,i),o&&!e.isPropagationStopped()&&e.bubbles===!0)fu.call(null,o,e,i);else if(!o&&!e.defaultPrevented&&e.target&&e.target[e.type]){ln.has(e.target)||ln.set(e.target,{});const l=ln.get(e.target);e.target[e.type]&&(l.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),l.disabled=!1)}return!e.defaultPrevented}function yp(r,e,i){if(Array.isArray(e))return N0(yp,r,e,i);const s=function(){Ki(r,e,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||rs(),Fn(r,e,s)}function B0(r,e,i){const s=function(){Ki(r,e,s),i.apply(this,arguments)};s.guid=i.guid=i.guid||rs(),Fn(r,e,s)}var iO=Object.freeze({__proto__:null,fixEvent:mp,on:Fn,off:Ki,trigger:fu,one:yp,any:B0});const as=30,zt=function(r,e,i){e.guid||(e.guid=rs());const s=e.bind(r);return s.guid=i?i+"_"+e.guid:e.guid,s},er=function(r,e){let i=U.performance.now();return function(...o){const l=U.performance.now();l-i>=e&&(r(...o),i=l)}},r2=function(r,e,i,s=U){let o;const l=()=>{s.clearTimeout(o),o=null},c=function(){const f=this,p=arguments;let b=function(){o=null,b=null,i||r.apply(f,p)};!o&&i&&r.apply(f,p),s.clearTimeout(o),o=s.setTimeout(b,e)};return c.cancel=l,c};var nO=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:as,bind_:zt,throttle:er,debounce:r2});let Ed;class jn{on(e,i){const s=this.addEventListener;this.addEventListener=()=>{},Fn(this,e,i),this.addEventListener=s}off(e,i){Ki(this,e,i)}one(e,i){const s=this.addEventListener;this.addEventListener=()=>{},yp(this,e,i),this.addEventListener=s}any(e,i){const s=this.addEventListener;this.addEventListener=()=>{},B0(this,e,i),this.addEventListener=s}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=mp(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),fu(this,e)}queueTrigger(e){Ed||(Ed=new Map);const i=e.type||e;let s=Ed.get(this);s||(s=new Map,Ed.set(this,s));const o=s.get(i);s.delete(i),U.clearTimeout(o);const l=U.setTimeout(()=>{s.delete(i),s.size===0&&(s=null,Ed.delete(this)),this.trigger(e)},0);s.set(i,l)}}jn.prototype.allowedEvents_={},jn.prototype.addEventListener=jn.prototype.on,jn.prototype.removeEventListener=jn.prototype.off,jn.prototype.dispatchEvent=jn.prototype.trigger;const vp=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,Vr=r=>r instanceof jn||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),sO=(r,e)=>{Vr(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},U0=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,bp=(r,e,i)=>{if(!r||!r.nodeName&&!Vr(r))throw new Error(`Invalid target for ${vp(e)}#${i}; must be a DOM node or evented object.`)},a2=(r,e,i)=>{if(!U0(r))throw new Error(`Invalid event type for ${vp(e)}#${i}; must be a non-empty string or array.`)},o2=(r,e,i)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${vp(e)}#${i}; must be a function.`)},q0=(r,e,i)=>{const s=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let o,l,c;return s?(o=r.eventBusEl_,e.length>=3&&e.shift(),[l,c]=e):(o=e[0],l=e[1],c=e[2]),bp(o,r,i),a2(l,r,i),o2(c,r,i),c=zt(r,c),{isTargetingSelf:s,target:o,type:l,listener:c}},Po=(r,e,i,s)=>{bp(r,r,e),r.nodeName?iO[e](r,i,s):r[e](i,s)},rO={on(...r){const{isTargetingSelf:e,target:i,type:s,listener:o}=q0(this,r,"on");if(Po(i,"on",s,o),!e){const l=()=>this.off(i,s,o);l.guid=o.guid;const c=()=>this.off("dispose",l);c.guid=o.guid,Po(this,"on","dispose",l),Po(i,"on","dispose",c)}},one(...r){const{isTargetingSelf:e,target:i,type:s,listener:o}=q0(this,r,"one");if(e)Po(i,"one",s,o);else{const l=(...c)=>{this.off(i,s,l),o.apply(null,c)};l.guid=o.guid,Po(i,"one",s,l)}},any(...r){const{isTargetingSelf:e,target:i,type:s,listener:o}=q0(this,r,"any");if(e)Po(i,"any",s,o);else{const l=(...c)=>{this.off(i,s,l),o.apply(null,c)};l.guid=o.guid,Po(i,"any",s,l)}},off(r,e,i){if(!r||U0(r))Ki(this.eventBusEl_,r,e);else{const s=r,o=e;bp(s,this,"off"),a2(o,this,"off"),o2(i,this,"off"),i=zt(this,i),this.off("dispose",i),s.nodeName?(Ki(s,o,i),Ki(s,"dispose",i)):Vr(s)&&(s.off(o,i),s.off("dispose",i))}},trigger(r,e){bp(this.eventBusEl_,this,"trigger");const i=r&&typeof r!="string"?r.type:r;if(!U0(i))throw new Error(`Invalid event type for ${vp(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return fu(this.eventBusEl_,r,e)}};function F0(r,e={}){const{eventBusKey:i}=e;if(i){if(!r[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);r.eventBusEl_=r[i]}else r.eventBusEl_=Ke("span",{className:"vjs-event-bus"});return Object.assign(r,rO),r.eventedCallbacks&&r.eventedCallbacks.forEach(s=>{s()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(s){s&&ln.has(s)&&ln.delete(s)}),U.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const aO={state:{},setState(r){typeof r=="function"&&(r=r());let e;return su(r,(i,s)=>{this.state[s]!==i&&(e=e||{},e[s]={from:this.state[s],to:i}),this.state[s]=i}),e&&Vr(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function l2(r,e){return Object.assign(r,aO),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&Vr(r)&&r.on("statechanged",r.handleStateChanged),r}const Cd=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},ti=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},u2=function(r,e){return ti(r)===ti(e)};var oO=Object.freeze({__proto__:null,toLowerCase:Cd,toTitleCase:ti,titleCaseEquals:u2});let me=class Bn{constructor(e,i,s){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=It({},this.options_),i=this.options_=It(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_${rs()}`}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&&(F0(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),l2(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(s),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_=It(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,s){return Ke(e,i,s)}localize(e,i,s=e){const o=this.player_.language&&this.player_.language(),l=this.player_.languages&&this.player_.languages(),c=l&&l[o],f=o&&o.split("-")[0],p=l&&l[f];let b=s;return c&&c[e]?b=c[e]:p&&p[e]&&(b=p[e]),i&&(b=b.replace(/\{(\d+)\}/g,function(_,x){const w=i[x-1];let D=w;return typeof w>"u"&&(D=_),D})),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((s,o)=>s.concat(o),[]);let i=this;for(let s=0;s<e.length;s++)if(i=i.getChild(e[s]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const s="http://www.w3.org/2000/svg",o=Ke("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),l=xe.createElementNS(s,"svg");l.setAttributeNS(null,"viewBox","0 0 512 512");const c=xe.createElementNS(s,"use");return l.appendChild(c),c.setAttributeNS(null,"href",`#vjs-icon-${e}`),o.appendChild(l),this.iconIsSet_?i.replaceChild(o,i.querySelector(".vjs-icon-placeholder")):i.appendChild(o),this.iconIsSet_=!0,o}addChild(e,i={},s=this.children_.length){let o,l;if(typeof e=="string"){l=ti(e);const c=i.componentClass||l;i.name=l;const f=Bn.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(s,0,o),o.parentComponent_=this,typeof o.id=="function"&&(this.childIndex_[o.id()]=o),l=l||o.name&&ti(o.name()),l&&(this.childNameIndex_[l]=o,this.childNameIndex_[Cd(l)]=o),typeof o.el=="function"&&o.el()){let c=null;this.children_[s+1]&&(this.children_[s+1].el_?c=this.children_[s+1].el_:uu(this.children_[s+1])&&(c=this.children_[s+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_[ti(e.name())]=null,this.childNameIndex_[Cd(e.name())]=null;const s=e.el();s&&s.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,s=c=>{const f=c.name;let p=c.opts;if(i[f]!==void 0&&(p=i[f]),p===!1)return;p===!0&&(p={}),p.playerOptions=this.options_.playerOptions;const b=this.addChild(f,p);b&&(this[f]=b)};let o;const l=Bn.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,p;return typeof c=="string"?(f=c,p=e[f]||this.options_[f]||{}):(f=c.name,p=c),{name:f,opts:p}}).filter(c=>{const f=Bn.getComponent(c.opts.componentClass||ti(c.name));return f&&!l.isTech(f)}).forEach(s)}}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 Ba(e,i||this.contentEl())}$$(e,i){return ZT(e,i||this.contentEl())}hasClass(e){return Td(this.el_,e)}addClass(...e){Io(this.el_,...e)}removeClass(...e){dp(this.el_,...e)}toggleClass(e,i){VT(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 GT(this.el_,e)}setAttribute(e,i){cu(this.el_,e,i)}removeAttribute(e){hp(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,s){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",s||this.trigger("componentresize");return}if(!this.el_)return 0;const o=this.el_.style[e],l=o.indexOf("px");return parseInt(l!==-1?o.slice(0,l):this.el_["offset"+ti(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=hu(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const s=`offset${ti(e)}`;i=this.el_[s]}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},s={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:s}}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 s=10,o=200;let l;this.on("touchstart",function(f){f.touches.length===1&&(i={pageX:f.touches[0].pageX,pageY:f.touches[0].pageY},e=U.performance.now(),l=!0)}),this.on("touchmove",function(f){if(f.touches.length>1)l=!1;else if(i){const p=f.touches[0].pageX-i.pageX,b=f.touches[0].pageY-i.pageY;Math.sqrt(p*p+b*b)>s&&(l=!1)}});const c=function(){l=!1};this.on("touchleave",c),this.on("touchcancel",c),this.on("touchend",function(f){i=null,l===!0&&U.performance.now()-e<o&&(f.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=zt(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const s=function(o){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",s),this.on("touchcancel",s)}setTimeout(e,i){var s;return e=zt(this,e),this.clearTimersOnDispose_(),s=U.setTimeout(()=>{this.setTimeoutIds_.has(s)&&this.setTimeoutIds_.delete(s),e()},i),this.setTimeoutIds_.add(s),s}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),U.clearTimeout(e)),e}setInterval(e,i){e=zt(this,e),this.clearTimersOnDispose_();const s=U.setInterval(e,i);return this.setIntervalIds_.add(s),s}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),U.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=zt(this,e),i=U.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=zt(this,i);const s=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,s),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),U.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((s,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(l){const c=U.getComputedStyle(l,null),f=c.getPropertyValue("visibility");return c.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(f)}function s(l){return!(!i(l.parentElement)||!i(l)||l.style.opacity==="0"||U.getComputedStyle(l).height==="0px"||U.getComputedStyle(l).width==="0px")}function o(l){if(l.offsetWidth+l.offsetHeight+l.getBoundingClientRect().height+l.getBoundingClientRect().width===0)return!1;const c={x:l.getBoundingClientRect().left+l.offsetWidth/2,y:l.getBoundingClientRect().top+l.offsetHeight/2};if(c.x<0||c.x>(xe.documentElement.clientWidth||U.innerWidth)||c.y<0||c.y>(xe.documentElement.clientHeight||U.innerHeight))return!1;let f=xe.elementFromPoint(c.x,c.y);for(;f;){if(f===l)return!0;if(f.parentNode)f=f.parentNode;else return!1}}return e||(e=this.el()),!!(o(e)&&s(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 s=Bn.getComponent("Tech"),o=s&&s.isTech(i),l=Bn===i||Bn.prototype.isPrototypeOf(i.prototype);if(o||!l){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=ti(e),Bn.components_||(Bn.components_={});const c=Bn.getComponent("Player");if(e==="Player"&&c&&c.players){const f=c.players,p=Object.keys(f);if(f&&p.length>0){for(let b=0;b<p.length;b++)if(f[p[b]]!==null)throw new Error("Can not register Player component after player has been created.")}}return Bn.components_[e]=i,Bn.components_[Cd(e)]=i,i}static getComponent(e){if(!(!e||!Bn.components_))return Bn.components_[e]}};me.registerComponent("Component",me);function lO(r,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function c2(r,e,i,s){return lO(r,s,i.length-1),i[s][e]}function j0(r){let e;return r===void 0||r.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:r.length,start:c2.bind(null,"start",0,r),end:c2.bind(null,"end",1,r)},U.Symbol&&U.Symbol.iterator&&(e[U.Symbol.iterator]=()=>(r||[]).values()),e}function Os(r,e){return Array.isArray(r)?j0(r):r===void 0||e===void 0?j0():j0([[r,e]])}const d2=function(r,e){r=r<0?0:r;let i=Math.floor(r%60),s=Math.floor(r/60%60),o=Math.floor(r/3600);const l=Math.floor(e/60%60),c=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(o=s=i="-"),o=o>0||c>0?o+":":"",s=((o||l>=10)&&s<10?"0"+s:s)+":",i=i<10?"0"+i:i,o+s+i};let H0=d2;function h2(r){H0=r}function f2(){H0=d2}function No(r,e=r){return H0(r,e)}var uO=Object.freeze({__proto__:null,createTimeRanges:Os,createTimeRange:Os,setFormatTime:h2,resetFormatTime:f2,formatTime:No});function p2(r,e){let i=0,s,o;if(!e)return 0;(!r||!r.length)&&(r=Os(0,0));for(let l=0;l<r.length;l++)s=r.start(l),o=r.end(l),o>e&&(o=e),i+=o-s;return i/e}function Qt(r){if(r instanceof Qt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Zs(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=Qt.defaultMessages[this.code]||"")}Qt.prototype.code=0,Qt.prototype.message="",Qt.prototype.status=null,Qt.prototype.metadata=null,Qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qt.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."},Qt.MEDIA_ERR_CUSTOM=0,Qt.prototype.MEDIA_ERR_CUSTOM=0,Qt.MEDIA_ERR_ABORTED=1,Qt.prototype.MEDIA_ERR_ABORTED=1,Qt.MEDIA_ERR_NETWORK=2,Qt.prototype.MEDIA_ERR_NETWORK=2,Qt.MEDIA_ERR_DECODE=3,Qt.prototype.MEDIA_ERR_DECODE=3,Qt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.MEDIA_ERR_ENCRYPTED=5,Qt.prototype.MEDIA_ERR_ENCRYPTED=5;function wd(r){return r!=null&&typeof r.then=="function"}function tr(r){wd(r)&&r.then(null,e=>{})}const z0=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,s,o)=>(r[s]&&(i[s]=r[s]),i),{cues:r.cues&&Array.prototype.map.call(r.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})};var V0={textTracksToJson:function(r){const e=r.$$("track"),i=Array.prototype.map.call(e,o=>o.track);return Array.prototype.map.call(e,function(o){const l=z0(o.track);return o.src&&(l.src=o.src),l}).concat(Array.prototype.filter.call(r.textTracks(),function(o){return i.indexOf(o)===-1}).map(z0))},jsonToTextTracks:function(r,e){return r.forEach(function(i){const s=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(o=>s.addCue(o))}),e.textTracks()},trackToJson:z0};const $0="vjs-modal-dialog";class pu extends me{constructor(e,i){super(e,i),this.handleKeyDown_=s=>this.handleKeyDown(s),this.close_=s=>this.close(s),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Ke("div",{className:`${$0}-content`},{role:"document"}),this.descEl_=Ke("p",{className:`${$0}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Pa(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`${$0} 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 s=this.getChild("closeButton");if(i&&!s){const o=this.contentEl_;this.contentEl_=this.el_,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(s,"close",this.close_)}!i&&s&&(this.off(s,"close",this.close_),this.removeChild(s),s.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),s=i.parentNode,o=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,s.removeChild(i),this.empty(),KT(i,e),this.trigger("modalfill"),o?s.insertBefore(i,o):s.appendChild(i);const l=this.getChild("closeButton");l&&s.appendChild(l.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),pp(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=xe.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_(),s=this.el_.querySelector(":focus");let o;for(let l=0;l<i.length;l++)if(s===i[l]){o=l;break}xe.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 U.HTMLAnchorElement||i instanceof U.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof U.HTMLInputElement||i instanceof U.HTMLSelectElement||i instanceof U.HTMLTextAreaElement||i instanceof U.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof U.HTMLIFrameElement||i instanceof U.HTMLObjectElement||i instanceof U.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}pu.prototype.options_={pauseOnOpen:!0,temporary:!0},me.registerComponent("ModalDialog",pu);class Bo extends jn{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})},Vr(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let s=0,o=this.length;s<o;s++)if(this[s]===e){i=this[s],i.off&&i.off(),this.tracks_.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let s=0,o=this.length;s<o;s++){const l=this[s];if(l.id===e){i=l;break}}return i}}Bo.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Bo.prototype.allowedEvents_)Bo.prototype["on"+r]=null;const G0=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].enabled=!1)};class m2 extends Bo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){G0(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&G0(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,G0(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 Y0=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].selected=!1)};class g2 extends Bo{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Y0(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&&Y0(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Y0(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 X0 extends Bo{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 cO{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,s=e.length;i<s;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 s=0,o=this.trackElements_.length;s<o;s++)if(e===this.trackElements_[s].track){i=this.trackElements_[s];break}return i}removeTrackElement_(e){for(let i=0,s=this.trackElements_.length;i<s;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 _p{constructor(e){_p.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let s=0;const o=e.length;this.cues_=e,this.length_=e.length;const l=function(c){""+c in this||Object.defineProperty(this,""+c,{get(){return this.cues_[c]}})};if(i<o)for(s=i;s<o;s++)l.call(this,s)}getCueById(e){let i=null;for(let s=0,o=this.length;s<o;s++){const l=this[s];if(l.id===e){i=l;break}}return i}}const dO={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},hO={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},fO={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},y2={disabled:"disabled",hidden:"hidden",showing:"showing"};class W0 extends jn{constructor(e={}){super();const i={id:e.id||"vjs_track_"+rs(),kind:e.kind||"",language:e.language||""};let s=e.label||"";for(const o in i)Object.defineProperty(this,o,{get(){return i[o]},set(){}});Object.defineProperty(this,"label",{get(){return s},set(o){o!==s&&(s=o,this.trigger("labelchange"))}})}}const Q0=function(r){return new URL(r,xe.baseURI)},v2=function(r){return new URL(r,xe.baseURI).href},K0=function(r){if(typeof r=="string"){const i=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},Tp=function(r,e=U.location){return Q0(r).origin!==e.origin};var pO=Object.freeze({__proto__:null,parseUrl:Q0,getAbsoluteURL:v2,getFileExtension:K0,isCrossOrigin:Tp});const b2=function(r,e){const i=new U.WebVTT.Parser(U,U.vttjs,U.WebVTT.StringDecoder()),s=[];i.oncue=function(o){e.addCue(o)},i.onparsingerror=function(o){s.push(o)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(r),s.length>0&&(U.console&&U.console.groupCollapsed&&U.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),s.forEach(o=>dt.error(o)),U.console&&U.console.groupEnd&&U.console.groupEnd()),i.flush()},_2=function(r,e){const i={uri:r},s=Tp(r);s&&(i.cors=s);const o=e.tech_.crossOrigin()==="use-credentials";o&&(i.withCredentials=o),e1(i,zt(this,function(l,c,f){if(l)return dt.error(l,c);e.loaded_=!0,typeof U.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],p=>{if(p.type==="vttjserror"){dt.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return b2(f,e)}):b2(f,e)}))};class Ad extends W0{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=It(e,{kind:fO[e.kind]||"subtitles",language:e.language||e.srclang||""});let s=y2[i.mode]||"disabled";const o=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(s="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const l=new _p(this.cues_),c=new _p(this.activeCues_);let f=!1;this.timeupdateHandler=zt(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 p=()=>{this.stopTracking()};this.tech_.one("dispose",p),s!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return o},set(){}},mode:{get(){return s},set(b){y2[b]&&s!==b&&(s=b,!this.preload_&&s!=="disabled"&&this.cues.length===0&&_2(this.src,this),this.stopTracking(),s!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?l:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return c;const b=this.tech_.currentTime(),_=[];for(let x=0,w=this.cues.length;x<w;x++){const D=this.cues[x];D.startTime<=b&&D.endTime>=b&&_.push(D)}if(f=!1,_.length!==this.activeCues_.length)f=!0;else for(let x=0;x<_.length;x++)this.activeCues_.indexOf(_[x])===-1&&(f=!0);return this.activeCues_=_,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")&&_2(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 U.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 s=this.tech_.textTracks();for(let o=0;o<s.length;o++)s[o]!==this&&s[o].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return V0.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const s=this.cues_[i];if(s===e||s.originalCue_&&s.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}Ad.prototype.allowedEvents_={cuechange:"cuechange"};class T2 extends W0{constructor(e={}){const i=It(e,{kind:hO[e.kind]||""});super(i);let s=!1;Object.defineProperty(this,"enabled",{get(){return s},set(o){typeof o!="boolean"||o===s||(s=o,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class S2 extends W0{constructor(e={}){const i=It(e,{kind:dO[e.kind]||""});super(i);let s=!1;Object.defineProperty(this,"selected",{get(){return s},set(o){typeof o!="boolean"||o===s||(s=o,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class $r extends jn{constructor(e={}){super();let i;const s=new Ad(e);this.kind=s.kind,this.src=s.src,this.srclang=s.language,this.label=s.label,this.default=s.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return s}}}),i=$r.NONE,s.addEventListener("loadeddata",()=>{i=$r.LOADED,this.trigger({type:"load",target:this})})}}$r.prototype.allowedEvents_={load:"load"},$r.NONE=0,$r.LOADING=1,$r.LOADED=2,$r.ERROR=3;const os={audio:{ListClass:m2,TrackClass:T2,capitalName:"Audio"},video:{ListClass:g2,TrackClass:S2,capitalName:"Video"},text:{ListClass:X0,TrackClass:Ad,capitalName:"Text"}};Object.keys(os).forEach(function(r){os[r].getterName=`${r}Tracks`,os[r].privateName=`${r}Tracks_`});const mu={remoteText:{ListClass:X0,TrackClass:Ad,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:cO,TrackClass:$r,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},un=Object.assign({},os,mu);mu.names=Object.keys(mu),os.names=Object.keys(os),un.names=[].concat(mu.names).concat(os.names);function mO(r,e,i,s,o={}){const l=r.textTracks();o.kind=e,i&&(o.label=i),s&&(o.language=s),o.tech=r;const c=new un.text.TrackClass(o);return l.addTrack(c),c}class rt extends me{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=s=>this.onDurationChange(s),this.trackProgress_=s=>this.trackProgress(s),this.trackCurrentTime_=s=>this.trackCurrentTime(s),this.stopTrackingCurrentTime_=s=>this.stopTrackingCurrentTime(s),this.disposeSourceHandler_=s=>this.disposeSourceHandler(s),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),un.names.forEach(s=>{const o=un[s];e&&e[o.getterName]&&(this[o.privateName]=e[o.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(s=>{e[`native${s}Tracks`]===!1&&(this[`featuresNative${s}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 un.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(zt(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 Os(0,0)}bufferedPercent(){return p2(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(os.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const s=this[`${i}Tracks`]()||[];let o=s.length;for(;o--;){const l=s[o];i==="text"&&this.removeRemoteTextTrack(l),s.removeTrack(l)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const s=e[i];this.removeRemoteTextTrack(s)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new Qt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Os(0,0):Os()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){os.names.forEach(e=>{const i=os[e],s=()=>{this.trigger(`${e}trackchange`)},o=this[i.getterName]();o.addEventListener("removetrack",s),o.addEventListener("addtrack",s),this.on("dispose",()=>{o.removeEventListener("removetrack",s),o.removeEventListener("addtrack",s)})})}addWebVttScript_(){if(!U.WebVTT)if(xe.body.contains(this.el())){if(!this.options_["vtt.js"]&&ru(l1)&&Object.keys(l1).length>0){this.trigger("vttjsloaded");return}const e=xe.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}),U.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),s=f=>e.addTrack(f.track),o=f=>e.removeTrack(f.track);i.on("addtrack",s),i.on("removetrack",o),this.addWebVttScript_();const l=()=>this.trigger("texttrackchange"),c=()=>{l();for(let f=0;f<e.length;f++){const p=e[f];p.removeEventListener("cuechange",l),p.mode==="showing"&&p.addEventListener("cuechange",l)}};c(),e.addEventListener("change",c),e.addEventListener("addtrack",c),e.addEventListener("removetrack",c),this.on("dispose",function(){i.off("addtrack",s),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",l)})}addTextTrack(e,i,s){if(!e)throw new Error("TextTrack kind is required but was not provided");return mO(this,e,i,s)}createRemoteTextTrack(e){const i=It(e,{tech:this});return new mu.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const s=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(s.track)),s}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=rs();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 rt.canPlayType(e.type)}static isTech(e){return e.prototype instanceof rt||e instanceof rt||e===rt}static registerTech(e,i){if(rt.techs_||(rt.techs_={}),!rt.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!rt.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!rt.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ti(e),rt.techs_[e]=i,rt.techs_[Cd(e)]=i,e!=="Tech"&&rt.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(rt.techs_&&rt.techs_[e])return rt.techs_[e];if(e=ti(e),U&&U.videojs&&U.videojs[e])return dt.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),U.videojs[e]}}}un.names.forEach(function(r){const e=un[r];rt.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),rt.prototype.featuresVolumeControl=!0,rt.prototype.featuresMuteControl=!0,rt.prototype.featuresFullscreenResize=!1,rt.prototype.featuresPlaybackRate=!1,rt.prototype.featuresProgressEvents=!1,rt.prototype.featuresSourceset=!1,rt.prototype.featuresTimeupdateEvents=!1,rt.prototype.featuresNativeTextTracks=!1,rt.prototype.featuresVideoFrameCallback=!1,rt.withSourceHandlers=function(r){r.registerSourceHandler=function(i,s){let o=r.sourceHandlers;o||(o=r.sourceHandlers=[]),s===void 0&&(s=o.length),o.splice(s,0,i)},r.canPlayType=function(i){const s=r.sourceHandlers||[];let o;for(let l=0;l<s.length;l++)if(o=s[l].canPlayType(i),o)return o;return""},r.selectSourceHandler=function(i,s){const o=r.sourceHandlers||[];let l;for(let c=0;c<o.length;c++)if(l=o[c].canHandleSource(i,s),l)return o[c];return null},r.canPlaySource=function(i,s){const o=r.selectSourceHandler(i,s);return o?o.canHandleSource(i,s):""},["seekable","seeking","duration"].forEach(function(i){const s=this[i];typeof s=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):s.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(i){let s=r.selectSourceHandler(i,this.options_);s||(r.nativeSourceHandler?s=r.nativeSourceHandler:dt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),s!==r.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=s.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.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)}},me.registerComponent("Tech",rt),rt.registerTech("Tech",rt),rt.defaultTechOrder_=[];const Uo={},Sp={},xp={};function gO(r,e){Uo[r]=Uo[r]||[],Uo[r].push(e)}function yO(r,e,i){r.setTimeout(()=>qo(e,Uo[e.type],i,r),1)}function vO(r,e){r.forEach(i=>i.setTech&&i.setTech(e))}function bO(r,e,i){return r.reduceRight(Z0(i),e[i]())}function _O(r,e,i,s){return e[i](r.reduce(Z0(i),s))}function x2(r,e,i,s=null){const o="call"+ti(i),l=r.reduce(Z0(o),s),c=l===xp,f=c?null:e[i](l);return xO(r,i,f,c),f}const TO={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},SO={setCurrentTime:1,setMuted:1,setVolume:1},E2={play:1,pause:1};function Z0(r){return(e,i)=>e===xp?xp:i[r]?i[r](e):e}function xO(r,e,i,s){for(let o=r.length-1;o>=0;o--){const l=r[o];l[e]&&l[e](s,i)}}function EO(r){Sp.hasOwnProperty(r.id())&&delete Sp[r.id()]}function CO(r,e){const i=Sp[r.id()];let s=null;if(i==null)return s=e(r),Sp[r.id()]=[[e,s]],s;for(let o=0;o<i.length;o++){const[l,c]=i[o];l===e&&(s=c)}return s===null&&(s=e(r),i.push([e,s])),s}function qo(r={},e=[],i,s,o=[],l=!1){const[c,...f]=e;if(typeof c=="string")qo(r,Uo[c],i,s,o,l);else if(c){const p=CO(s,c);if(!p.setSource)return o.push(p),qo(r,f,i,s,o,l);p.setSource(Object.assign({},r),function(b,_){if(b)return qo(r,f,i,s,o,l);o.push(p),qo(_,r.type===_.type?f:Uo[_.type],i,s,o,l)})}else f.length?qo(r,f,i,s,o,l):l?i(r,o):qo(r,Uo["*"],i,s,o,!0)}const wO={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"},Ep=function(r=""){const e=K0(r);return wO[e.toLowerCase()]||""},AO=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const i=r.cache_.sources.filter(o=>o.src===e);if(i.length)return i[0].type;const s=r.$$("source");for(let o=0;o<s.length;o++){const l=s[o];if(l.type&&l.src&&l.src===e)return l.type}return Ep(e)},C2=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(i){i=C2(i),Array.isArray(i)?e=e.concat(i):Zs(i)&&e.push(i)}),r=e}else typeof r=="string"&&r.trim()?r=[w2({src:r})]:Zs(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[w2(r)]:r=[];return r};function w2(r){if(!r.type){const e=Ep(r.src);e&&(r.type=e)}return r}var kO=`<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 A2=op?10009:lp?461:8,gu={codes:{play:415,pause:19,ff:417,rw:412,back:A2},names:{415:"play",19:"pause",417:"ff",412:"rw",[A2]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},k2=5;class DO extends jn{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 s=i.key.substring(5).toLowerCase();this.move(s)}else if(gu.isEventKey(i,"play")||gu.isEventKey(i,"pause")||gu.isEventKey(i,"ff")||gu.isEventKey(i,"rw")){i.preventDefault();const s=gu.getEventName(i);this.performMediaAction_(s)}else gu.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()+k2);break;case"rw":this.userSeek_(this.player_.currentTime()-k2);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 s=null;const o=this.getCurrentComponent(e.target);i&&(s=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!s||!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 s(o){for(const l of o)l.hasOwnProperty("el_")&&l.getIsFocusable()&&l.getIsAvailableToBeFocused(l.el())&&i.push(l),l.hasOwnProperty("children_")&&l.children_.length>0&&s(l.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?s(o.children_):o.hasOwnProperty("items")&&o.items.length>0?s(o.items):this.findSuitableDOMChild(o)&&i.push(o);if(o.name_==="ErrorDisplay"&&o.opened_){const l=o.el_.querySelector(".vjs-errors-ok-button-container");l&&l.querySelectorAll("button").forEach((f,p)=>{i.push({name:()=>"ModalButton"+(p+1),el:()=>f,getPositions:()=>{const b=f.getBoundingClientRect(),_={x:b.x,y:b.y,width:b.width,height:b.height,top:b.top,right:b.right,bottom:b.bottom,left:b.left},x={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:_,center:x}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:b=>!0,focus:()=>f.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(s){if(e.getIsFocusable(s)&&e.getIsAvailableToBeFocused(s))return s;for(let o=0;o<s.children.length;o++){const l=s.children[o],c=i(l);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 s of this.focusableComponents)if(s.el()===i)return s}}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 s=i.getPositions(),o=this.focusableComponents.filter(c=>c!==i&&this.isInDirection_(s.boundingClientRect,c.getPositions().boundingClientRect,e)),l=this.findBestCandidate_(s.center,o,e);l?this.focus(l):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,s){let o=1/0,l=null;for(const c of i){const f=c.getPositions().center,p=this.calculateDistance_(e,f,s);p<o&&(o=p,l=c)}return l}isInDirection_(e,i,s){switch(s){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,s){const o=Math.abs(e.x-i.x),l=Math.abs(e.y-i.y);let c;switch(s){case"right":case"left":c=o+l*100;break;case"up":c=l*2+o*.5;break;case"down":c=l*5+o;break;default:c=o+l}return c}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class OO extends me{constructor(e,i,s){const o=It({createEl:!1},i);if(super(e,o,s),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let l=0,c=i.playerOptions.techOrder;l<c.length;l++){const f=ti(c[l]);let p=rt.getTech(f);if(f||(p=me.getComponent(f)),p&&p.isSupported()){e.loadTech_(f);break}}else e.src(i.playerOptions.sources)}}me.registerComponent("MediaLoader",OO);class Cp extends me{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=s=>this.handleMouseOver(s),this.handleMouseOut_=s=>this.handleMouseOut(s),this.handleClick_=s=>this.handleClick(s),this.handleKeyDown_=s=>this.handleKeyDown(s),this.emitTapEvents(),this.enable()}createEl(e="div",i={},s={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&dt.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),s=Object.assign({role:"button"},s),this.tabIndex_=i.tabIndex;const o=Ke(e,i,s);return this.player_.options_.experimentalSvgIcons||o.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Ke("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 s=this.localize(e);this.controlText_=e,Pa(this.controlTextEl_,s),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",s)}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)}}me.registerComponent("ClickableComponent",Cp);class J0 extends Cp{constructor(e,i){super(e,i),this.update(),this.update_=s=>this.update(s),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Ke("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(Ke("picture",{className:"vjs-poster",tabIndex:-1},{},Ke("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()?tr(this.player_.play()):this.player_.pause())}}J0.prototype.crossorigin=J0.prototype.crossOrigin,me.registerComponent("PosterImage",J0);const ls="#222",D2="#ccc",RO={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 ey(r,e){let i;if(r.length===4)i=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)i=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; 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 ir(r,e,i){try{r.style[e]=i}catch{return}}function O2(r){return r?`${r}px`:""}class MO extends me{constructor(e,i,s){super(e,i,s);const o=c=>this.updateDisplay(c),l=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(zt(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",l),e.on("playerresize",l);const c=U.screen.orientation||U,f=U.screen.orientation?"change":"orientationchange";c.addEventListener(f,l),e.on("dispose",()=>c.removeEventListener(f,l));const p=this.options_.playerOptions.tracks||[];for(let b=0;b<p.length;b++)this.player_.addRemoteTextTrack(p[b],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage;let o,l,c;for(let f=0;f<i.length;f++){const p=i[f];s&&s.enabled&&s.language&&s.language===p.language&&p.kind in e?p.kind===s.kind?c=p:c||(c=p):s&&!s.enabled?(c=null,o=null,l=null):p.default&&(p.kind==="descriptions"&&!o?o=p:p.kind in e&&!l&&(l=p))}c?c.mode="showing":l?l.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 U.WebVTT=="function"&&U.WebVTT.processCues(U,[],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 p=e[f];p.mode==="showing"&&c.push(p)}this.updateForTrack(c);return}let s=null,o=null,l=e.length;for(;l--;){const c=e[l];c.mode==="showing"&&(c.kind==="descriptions"?s=c:o=c)}if(o?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(o)):s&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(s)),!U.CSS.supports("inset","10px")){const c=this.el_,f=c.querySelectorAll(".vjs-text-track-cue"),p=this.player_.controlBar.el_.getBoundingClientRect().height,b=this.player_.el_.getBoundingClientRect().height;c.style="",ir(c,"position","relative"),ir(c,"height",b-p+"px"),ir(c,"top","unset"),up?ir(c,"bottom",b+"px"):ir(c,"bottom","0px"),f.length>0&&f.forEach(_=>{if(_.style.inset){const x=_.style.inset.split(" ");x.length===3&&Object.assign(_.style,{top:x[0],right:x[1],bottom:x[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!U.CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),s=e/i,o=this.player_.videoWidth()/this.player_.videoHeight();let l=0,c=0;Math.abs(s-o)>.1&&(s>o?l=Math.round((e-i*o)/2):c=Math.round((i-e/o)/2)),ir(this.el_,"insetInline",O2(l)),ir(this.el_,"insetBlock",O2(c))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),s=e.activeCues;let o=s.length;for(;o--;){const l=s[o];if(!l)continue;const c=l.displayState;if(i.color&&(c.firstChild.style.color=i.color),i.textOpacity&&ir(c.firstChild,"color",ey(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(c.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&ir(c.firstChild,"backgroundColor",ey(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?ir(c,"backgroundColor",ey(i.windowColor,i.windowOpacity)):c.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?c.firstChild.style.textShadow=`2px 2px 3px ${ls}, 2px 2px 4px ${ls}, 2px 2px 5px ${ls}`:i.edgeStyle==="raised"?c.firstChild.style.textShadow=`1px 1px ${ls}, 2px 2px ${ls}, 3px 3px ${ls}`:i.edgeStyle==="depressed"?c.firstChild.style.textShadow=`1px 1px ${D2}, 0 1px ${D2}, -1px -1px ${ls}, 0 -1px ${ls}`:i.edgeStyle==="uniform"&&(c.firstChild.style.textShadow=`0 0 4px ${ls}, 0 0 4px ${ls}, 0 0 4px ${ls}, 0 0 4px ${ls}`)),i.fontPercent&&i.fontPercent!==1){const f=U.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=RO[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof U.WebVTT!="function"||e.every(s=>!s.activeCues))return;const i=[];for(let s=0;s<e.length;++s){const o=e[s];for(let l=0;l<o.activeCues.length;++l)i.push(o.activeCues[l])}U.WebVTT.processCues(U,i,this.el_);for(let s=0;s<e.length;++s){const o=e[s];for(let l=0;l<o.activeCues.length;++l){const c=o.activeCues[l].displayState;Io(c,"vjs-text-track-cue","vjs-text-track-cue-"+(o.language?o.language:s)),o.language&&cu(c,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}}me.registerComponent("TextTrackDisplay",MO);class LO extends me{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),s=Ke("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(s),o}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}me.registerComponent("LoadingSpinner",LO);let Zi=class extends Cp{createEl(e,i={},s={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),s=Object.assign({type:"button"},s);const o=Ke(e,i,s);return this.player_.options_.experimentalSvgIcons||o.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o}addChild(e,i={}){const s=this.constructor.name;return dt.warn(`Adding an actionable (user controllable) child to a Button (${s}) is not supported; use a ClickableComponent instead.`),me.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)}};me.registerComponent("Button",Zi);class R2 extends Zi{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",s=>this.handleMouseDown(s))}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){tr(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const s=this.player_.getChild("controlBar"),o=s&&s.getChild("playToggle");if(!o){this.player_.tech(!0).focus();return}const l=()=>o.focus();wd(i)?i.then(l,()=>{}):this.setTimeout(l,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}R2.prototype.controlText_="Play Video",me.registerComponent("BigPlayButton",R2);class IO extends Zi{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)}}me.registerComponent("CloseButton",IO);class M2 extends Zi{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",s=>this.handlePlay(s)),this.on(e,"pause",s=>this.handlePause(s)),i.replay&&this.on(e,"ended",s=>this.handleEnded(s))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?tr(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))}}M2.prototype.controlText_="Play",me.registerComponent("PlayToggle",M2);class yu extends me{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],s=>this.update(s)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),s=Ke("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(s),this.contentEl_=Ke("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=No(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,dt.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_=xe.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}yu.prototype.labelText_="Time",yu.prototype.controlText_="Time",me.registerComponent("TimeDisplay",yu);class ty extends yu{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)}}ty.prototype.labelText_="Current Time",ty.prototype.controlText_="Current Time",me.registerComponent("CurrentTimeDisplay",ty);class iy extends yu{constructor(e,i){super(e,i);const s=o=>this.updateContent(o);this.on(e,"durationchange",s),this.on(e,"loadstart",s),this.on(e,"loadedmetadata",s)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}iy.prototype.labelText_="Duration",iy.prototype.controlText_="Duration",me.registerComponent("DurationDisplay",iy);class PO extends me{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),s=super.createEl("span",{textContent:"/"});return i.appendChild(s),e.appendChild(i),e}}me.registerComponent("TimeDivider",PO);class ny extends yu{constructor(e,i){super(e,i),this.on(e,"durationchange",s=>this.updateContent(s))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Ke("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)}}ny.prototype.labelText_="Remaining Time",ny.prototype.controlText_="Remaining Time",me.registerComponent("RemainingTimeDisplay",ny);class NO extends me{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",s=>this.updateShowing(s))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ke("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ke("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(xe.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()}}me.registerComponent("LiveDisplay",NO);class L2 extends Zi{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=s=>this.updateLiveEdgeStatus(s),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_=Ke("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()}}L2.prototype.controlText_="Seek to live, currently playing live",me.registerComponent("SeekToLive",L2);function kd(r,e,i){return r=Number(r),Math.min(i,Math.max(e,isNaN(r)?e:r))}var BO=Object.freeze({__proto__:null,clamp:kd});class sy extends me{constructor(e,i){super(e,i),this.handleMouseDown_=s=>this.handleMouseDown(s),this.handleMouseUp_=s=>this.handleMouseUp(s),this.handleKeyDown_=s=>this.handleKeyDown(s),this.handleClick_=s=>this.handleClick(s),this.handleMouseMove_=s=>this.handleMouseMove(s),this.update_=s=>this.update(s),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={},s={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),s=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},s),super.createEl(e,i,s)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Js&&e.preventDefault(),YT(),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;XT(),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(kd(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=fp(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,s=i&&i.enabled,o=i&&i.horizontalSeek;s?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")}}me.registerComponent("Slider",sy);const ry=(r,e)=>kd(r/e*100,0,100).toFixed(2)+"%";class UO extends me{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",s=>this.update(s))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Ke("span",{className:"vjs-control-text"}),s=Ke("span",{textContent:this.localize("Loaded")}),o=xe.createTextNode(": ");return this.percentageEl_=Ke("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(s),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,s=this.player_.buffered(),o=i&&i.isLive()?i.seekableEnd():this.player_.duration(),l=this.player_.bufferedEnd(),c=this.partEls_,f=ry(l,o);this.percent_!==f&&(this.el_.style.width=f,Pa(this.percentageEl_,f),this.percent_=f);for(let p=0;p<s.length;p++){const b=s.start(p),_=s.end(p);let x=c[p];x||(x=this.el_.appendChild(Ke()),c[p]=x),!(x.dataset.start===b&&x.dataset.end===_)&&(x.dataset.start=b,x.dataset.end=_,x.style.left=ry(b,l),x.style.width=ry(_-b,l))}for(let p=c.length;p>s.length;p--)this.el_.removeChild(c[p-1]);c.length=s.length})}}me.registerComponent("LoadProgressBar",UO);class qO extends me{constructor(e,i){super(e,i),this.update=er(zt(this,this.update),as)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,s){const o=Sd(this.el_),l=du(this.player_.el()),c=e.width*i;if(!l||!o)return;let f=e.left-l.left+c,p=e.width-c+(l.right-e.right);p||(p=e.width-c,f=c);let b=o.width/2;f<b?b+=b-f:p<b&&(b=p),b<0?b=0:b>o.width&&(b=o.width),b=Math.round(b),this.el_.style.right=`-${b}px`,this.write(s)}write(e){Pa(this.el_,e)}updateTime(e,i,s,o){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let l;const c=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const f=this.player_.liveTracker.liveWindow(),p=f-i*f;l=(p<1?"":"-")+No(p,f)}else l=No(s,c);this.update(e,i,l),o&&o()})}}me.registerComponent("TimeTooltip",qO);class ay extends me{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=er(zt(this,this.update),as)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,s){const o=this.getChild("timeTooltip");if(!o)return;const l=s&&s.target&&typeof s.target.pendingSeekTime=="function"?s.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();o.updateTime(e,i,l)}}ay.prototype.options_={children:[]},!Qi&&!Ds&&ay.prototype.options_.children.push("timeTooltip"),me.registerComponent("PlayProgressBar",ay);class I2 extends me{constructor(e,i){super(e,i),this.update=er(zt(this,this.update),as)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const s=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,s,()=>{this.el_.style.left=`${e.width*i}px`})}}I2.prototype.options_={children:["timeTooltip"]},me.registerComponent("MouseTimeDisplay",I2);class wp extends sy{constructor(e,i){i=It(wp.prototype.options_,i),i.children=[...i.children];const s=e.options_.disableSeekWhileScrubbingOnMobile&&(Qi||Ds)||e.options_.disableSeekWhileScrubbingOnSTV;(!Qi&&!Ds||s)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=s,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=zt(this,this.update),this.update=er(this.update_,as),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 xe&&"visibilityState"in xe&&this.on(xe,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){xe.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,as))}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(xe.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const s=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),o=this.player_.liveTracker;let l=this.player_.duration();o&&o.isLive()&&(l=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==s||this.duration_!==l)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[No(s,l),No(l,l)],"{1} of {2}")),this.currentTime_=s,this.duration_=l),this.bar&&this.bar.update(du(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 s=this.player_.liveTracker;return s&&s.isLive()?(i=(e-s.seekableStart())/s.liveWindow(),s.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){xd(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!xd(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let s;const o=this.calculateDistance(e),l=this.player_.liveTracker;if(!l||!l.isLive())s=o*this.player_.duration(),s===this.player_.duration()&&(s=s-.1);else{if(o>=.99){l.seekToLiveEdge();return}const c=l.seekableStart(),f=l.liveCurrentTime();if(s=c+o*l.liveWindow(),s>=f&&(s=f),s<=c&&(s=c+.1),s===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(s):this.userSeek_(s),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?tr(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 s=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*s):this.userSeek_(this.player_.duration()*s)}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 xe&&"visibilityState"in xe&&this.off(xe,"visibilitychange",this.toggleVisibility_),super.dispose()}}wp.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},me.registerComponent("SeekBar",wp);class P2 extends me{constructor(e,i){super(e,i),this.handleMouseMove=er(zt(this,this.handleMouseMove),as),this.throttledHandleMouseSeek=er(zt(this,this.handleMouseSeek),as),this.handleMouseUpHandler_=s=>this.handleMouseUp(s),this.handleMouseDownHandler_=s=>this.handleMouseDown(s),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const s=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(!s&&!o)return;const l=i.el(),c=Sd(l);let f=fp(l,e).x;f=kd(f,0,1),o&&o.update(c,f),s&&s.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&&tr(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,s=this.getChild("seekBar");s&&s.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()}}P2.prototype.options_={children:["seekBar"]},me.registerComponent("ProgressControl",P2);class N2 extends Zi{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],s=>this.handlePictureInPictureChange(s)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],s=>this.handlePictureInPictureEnabledChange(s)),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(){xe.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in U?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 xe.exitPictureInPicture=="function"&&super.show()}}N2.prototype.controlText_="Picture-in-Picture",me.registerComponent("PictureInPictureToggle",N2);class B2 extends Zi{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",s=>this.handleFullscreenChange(s)),xe[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()}}B2.prototype.controlText_="Fullscreen",me.registerComponent("FullscreenToggle",B2);const FO=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class jO extends me{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}}me.registerComponent("VolumeLevel",jO);class HO extends me{constructor(e,i){super(e,i),this.update=er(zt(this,this.update),as)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,s,o){if(!s){const l=du(this.el_),c=du(this.player_.el()),f=e.width*i;if(!c||!l)return;const p=e.left-c.left+f,b=e.width-f+(c.right-e.right);let _=l.width/2;p<_?_+=_-p:b<_&&(_=b),_<0?_=0:_>l.width&&(_=l.width),this.el_.style.right=`-${_}px`}this.write(`${o}%`)}write(e){Pa(this.el_,e)}updateVolume(e,i,s,o,l){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,s,o.toFixed(0)),l&&l()})}}me.registerComponent("VolumeLevelTooltip",HO);class U2 extends me{constructor(e,i){super(e,i),this.update=er(zt(this,this.update),as)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,s){const o=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,s,o,()=>{s?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}U2.prototype.options_={children:["volumeLevelTooltip"]},me.registerComponent("MouseVolumeLevelDisplay",U2);class Ap extends sy{constructor(e,i){super(e,i),this.on("slideractive",s=>this.updateLastVolume_(s)),this.on(e,"volumechange",s=>this.updateARIAAttributes(s)),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){xd(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const s=this.el(),o=du(s),l=this.vertical();let c=fp(s,e);c=l?c.y:c.x,c=kd(c,0,1),i.update(o,c,l)}xd(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)})}}Ap.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Qi&&!Ds&&Ap.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ap.prototype.playerEvent="volumechange",me.registerComponent("VolumeBar",Ap);class q2 extends me{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||ru(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),FO(this,e),this.throttledHandleMouseMove=er(zt(this,this.handleMouseMove),as),this.handleMouseUpHandler_=s=>this.handleMouseUp(s),this.on("mousedown",s=>this.handleMouseDown(s)),this.on("touchstart",s=>this.handleMouseDown(s)),this.on("mousemove",s=>this.handleMouseMove(s)),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)}}q2.prototype.options_={children:["volumeBar"]},me.registerComponent("VolumeControl",q2);const zO=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class F2 extends Zi{constructor(e,i){super(e,i),zO(this,e),this.on(e,["loadstart","volumechange"],s=>this.update(s))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),s=this.player_.lastVolume_();if(i===0){const o=s<.1?.1:s;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"),Qi&&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),dp(this.el_,[0,1,2,3].reduce((s,o)=>s+`${o?" ":""}vjs-vol-${o}`,"")),Io(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}F2.prototype.controlText_="Mute",me.registerComponent("MuteToggle",F2);class j2 extends me{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||ru(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=s=>this.handleKeyPress(s),this.on(e,["loadstart"],s=>this.volumePanelState_(s)),this.on(this.muteToggle,"keyup",s=>this.handleKeyPress(s)),this.on(this.volumeControl,"keyup",s=>this.handleVolumeControlKeyUp(s)),this.on("keydown",s=>this.handleKeyPress(s)),this.on("mouseover",s=>this.handleMouseOver(s)),this.on("mouseout",s=>this.handleMouseOut(s)),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"),Fn(xe,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Ki(xe,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}j2.prototype.options_={children:["muteToggle","volumeControl"]},me.registerComponent("VolumePanel",j2);class H2 extends Zi{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(),s=this.player_.liveTracker,o=s&&s.isLive()?s.seekableEnd():this.player_.duration();let l;i+this.skipTime<=o?l=i+this.skipTime:l=o,this.player_.currentTime(l)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}H2.prototype.controlText_="Skip Forward",me.registerComponent("SkipForward",H2);class z2 extends Zi{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(),s=this.player_.liveTracker,o=s&&s.isLive()&&s.seekableStart();let l;o&&i-this.skipTime<=o?l=o:i>=this.skipTime?l=i-this.skipTime:l=0,this.player_.currentTime(l)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}z2.prototype.controlText_="Skip Backward",me.registerComponent("SkipBackward",z2);class V2 extends me{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",s=>this.handleKeyDown(s)),this.boundHandleBlur_=s=>this.handleBlur(s),this.boundHandleTapClick_=s=>this.handleTapClick(s)}addEventListenerForItem(e){e instanceof me&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof me&&(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_=Ke(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_),Fn(i,"click",function(s){s.preventDefault(),s.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||xe.activeElement;if(!this.children().some(s=>s.el()===i)){const s=this.menuButton_;s&&s.buttonPressed_&&i!==s.el().firstChild&&s.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const s=i.filter(o=>o.el()===e.target)[0];if(!s)return;s.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())}}me.registerComponent("Menu",V2);class oy extends me{constructor(e,i={}){super(e,i),this.menuButton_=new Zi(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const s=Zi.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+s,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const o=l=>this.handleClick(l);this.handleMenuKeyUp_=l=>this.handleMenuKeyUp(l),this.on(this.menuButton_,"tap",o),this.on(this.menuButton_,"click",o),this.on(this.menuButton_,"keydown",l=>this.handleKeyDown(l)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),Fn(xe,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",l=>this.handleMouseLeave(l)),this.on("keydown",l=>this.handleSubmenuKeyDown(l))}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 V2(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Ke("li",{className:"vjs-menu-title",textContent:ti(this.options_.title),tabIndex:-1}),s=new me(this.player_,{el:i});e.addItem(s)}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=Zi.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"),Ki(xe,"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"),Qi&&HT())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()}}me.registerComponent("MenuButton",oy);class ly extends oy{constructor(e,i){const s=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!s)return;const o=zt(this,this.update);s.addEventListener("removetrack",o),s.addEventListener("addtrack",o),s.addEventListener("labelchange",o),this.player_.on("ready",o),this.player_.on("dispose",function(){s.removeEventListener("removetrack",o),s.removeEventListener("addtrack",o),s.removeEventListener("labelchange",o)})}}me.registerComponent("TrackButton",ly);class Dd extends Cp{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,s){this.nonIconControl=!0;const o=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),s),l=Ke("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?o.appendChild(l):o.replaceChild(l,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))}}me.registerComponent("MenuItem",Dd);class Od extends Dd{constructor(e,i){const s=i.track,o=e.textTracks();i.label=s.label||s.language||"Unknown",i.selected=s.mode==="showing",super(e,i),this.track=s,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const l=(...f)=>{this.handleTracksChange.apply(this,f)},c=(...f)=>{this.handleSelectedLanguageChange.apply(this,f)};if(e.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",c),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",c)}),o.onchange===void 0){let f;this.on(["tap","click"],function(){if(typeof U.Event!="object")try{f=new U.Event("change")}catch{}f||(f=xe.createEvent("Event"),f.initEvent("change",!0,!0)),o.dispatchEvent(f)})}this.handleTracksChange()}handleClick(e){const i=this.track,s=this.player_.textTracks();if(super.handleClick(e),!!s)for(let o=0;o<s.length;o++){const l=s[o];this.kinds.indexOf(l.kind)!==-1&&(l===i?l.mode!=="showing"&&(l.mode="showing"):l.mode!=="disabled"&&(l.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()}}me.registerComponent("TextTrackMenuItem",Od);class $2 extends Od{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 s=!0;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(this.options_.kinds.indexOf(c.kind)>-1&&c.mode==="showing"){s=!1;break}}s!==this.isSelected_&&this.selected(s)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let s=!0;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(["captions","descriptions","subtitles"].indexOf(c.kind)>-1&&c.mode==="showing"){s=!1;break}}s&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}me.registerComponent("OffTextTrackMenuItem",$2);class vu extends ly{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=Od){let s;this.label_&&(s=`${this.label_} off`),e.push(new $2(this.player_,{kinds:this.kinds_,kind:this.kind_,label:s})),this.hideThreshold_+=1;const o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let l=0;l<o.length;l++){const c=o[l];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}}me.registerComponent("TextTrackButton",vu);class G2 extends Dd{constructor(e,i){const s=i.track,o=i.cue,l=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=o.text,i.selected=o.startTime<=l&&l<o.endTime,super(e,i),this.track=s,this.cue=o}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}me.registerComponent("ChaptersTrackMenuItem",G2);class uy extends vu{constructor(e,i,s){super(e,i,s),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 s=e[i];if(s.kind===this.kind_)return s}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(ti(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 s=0,o=i.length;s<o;s++){const l=i[s],c=new G2(this.player_,{track:this.track_,cue:l});e.push(c)}return e}}uy.prototype.kind_="chapters",uy.prototype.controlText_="Chapters",me.registerComponent("ChaptersButton",uy);class cy extends vu{constructor(e,i,s){super(e,i,s),this.setIcon("audio-description");const o=e.textTracks(),l=zt(this,this.handleTracksChange);o.addEventListener("change",l),this.on("dispose",function(){o.removeEventListener("change",l)})}handleTracksChange(e){const i=this.player().textTracks();let s=!1;for(let o=0,l=i.length;o<l;o++){const c=i[o];if(c.kind!==this.kind_&&c.mode==="showing"){s=!0;break}}s?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}cy.prototype.kind_="descriptions",cy.prototype.controlText_="Descriptions",me.registerComponent("DescriptionsButton",cy);class dy extends vu{constructor(e,i,s){super(e,i,s),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}dy.prototype.kind_="subtitles",dy.prototype.controlText_="Subtitles",me.registerComponent("SubtitlesButton",dy);class hy extends Od{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()}}me.registerComponent("CaptionSettingsMenuItem",hy);class fy extends vu{constructor(e,i,s){super(e,i,s),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 hy(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}fy.prototype.kind_="captions",fy.prototype.controlText_="Captions",me.registerComponent("CaptionsButton",fy);class Y2 extends Od{createEl(e,i,s){const o=super.createEl(e,i,s),l=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",o):l.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Ke("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),o}}me.registerComponent("SubsCapsMenuItem",Y2);class py extends vu{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(ti(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 hy(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,Y2),e}}py.prototype.kinds_=["captions","subtitles"],py.prototype.controlText_="Subtitles",me.registerComponent("SubsCapsButton",py);class X2 extends Dd{constructor(e,i){const s=i.track,o=e.audioTracks();i.label=s.label||s.language||"Unknown",i.selected=s.enabled,super(e,i),this.track=s,this.addClass(`vjs-${s.kind}-menu-item`);const l=(...c)=>{this.handleTracksChange.apply(this,c)};o.addEventListener("change",l),this.on("dispose",()=>{o.removeEventListener("change",l)})}createEl(e,i,s){const o=super.createEl(e,i,s),l=o.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(l.appendChild(Ke("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Ke("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 s=0;s<i.length;s++){const o=i[s];o!==this.track&&(o.enabled=o===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}me.registerComponent("AudioTrackMenuItem",X2);class W2 extends ly{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 s=0;s<i.length;s++){const o=i[s];e.push(new X2(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e}}W2.prototype.controlText_="Audio Track",me.registerComponent("AudioTrackButton",W2);class my extends Dd{constructor(e,i){const s=i.rate,o=parseFloat(s,10);i.label=s,i.selected=o===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=s,this.rate=o,this.on(e,"ratechange",l=>this.update(l))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}my.prototype.contentElType="button",me.registerComponent("PlaybackRateMenuItem",my);class Q2 extends oy{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",s=>this.updateVisibility(s)),this.on(e,"ratechange",s=>this.updateLabel(s)),this.on(e,"playbackrateschange",s=>this.handlePlaybackRateschange(s))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ke("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 s=e.length-1;s>=0;s--)i.push(new my(this.player(),{rate:e[s]+"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")}}Q2.prototype.controlText_="Playback Rate",me.registerComponent("PlaybackRateMenuButton",Q2);class K2 extends me{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},s={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,s)}}me.registerComponent("Spacer",K2);class VO extends K2{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}me.registerComponent("CustomControlSpacer",VO);class Z2 extends me{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Z2.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},me.registerComponent("ControlBar",Z2);class J2 extends pu{constructor(e,i){super(e,i),this.on(e,"error",s=>{this.open(s)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}J2.prototype.options_=Object.assign({},pu.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),me.registerComponent("ErrorDisplay",J2);class eS extends me{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(),Ke("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const s=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${rs()}`)+"-"+i[1].replace(/\W+/g,""),o=Ke("option",{id:s,value:this.localize(i[0]),textContent:this.localize(i[1])});return o.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${s}`),o}))}}me.registerComponent("TextTrackSelect",eS);class Fo extends me{constructor(e,i={}){super(e,i);const s=Ke("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(s);const o=this.options_.selects;for(const l of o){const c=this.options_.selectConfigs[l],f=c.className,p=c.id.replace("%s",this.options_.id_);let b=null;const _=`vjs_select_${rs()}`;if(this.options_.type==="colors"){b=Ke("span",{className:f});const w=Ke("label",{id:p,className:"vjs-label",textContent:this.localize(c.label)});w.setAttribute("for",_),b.appendChild(w)}const x=new eS(e,{SelectOptions:c.options,legendId:this.options_.legendId,id:_,labelId:p});this.addChild(x),this.options_.type==="colors"&&(b.appendChild(x.el()),this.el().appendChild(b))}}createEl(){return Ke("fieldset",{className:this.options_.className})}}me.registerComponent("TextTrackFieldset",Fo);class tS extends me{constructor(e,i={}){super(e,i);const s=this.options_.textTrackComponentid,o=new Fo(e,{id_:s,legendId:`captions-text-legend-${s}`,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 l=new Fo(e,{id_:s,legendId:`captions-background-${s}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(l);const c=new Fo(e,{id_:s,legendId:`captions-window-${s}`,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 Ke("div",{className:"vjs-track-settings-colors"})}}me.registerComponent("TextTrackSettingsColors",tS);class iS extends me{constructor(e,i={}){super(e,i);const s=this.options_.textTrackComponentid,o=new Fo(e,{id_:s,legendId:`captions-font-size-${s}`,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 l=new Fo(e,{id_:s,legendId:`captions-edge-style-${s}`,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(l);const c=new Fo(e,{id_:s,legendId:`captions-font-family-${s}`,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 Ke("div",{className:"vjs-track-settings-font"})}}me.registerComponent("TextTrackSettingsFont",iS);class nS extends me{constructor(e,i={}){super(e,i);const s=new Zi(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=this.localize("Reset"),this.addChild(s);const o=this.localize("Done"),l=new Zi(e,{controlText:o,className:"vjs-done-button"});l.el().classList.remove("vjs-control","vjs-button"),l.el().textContent=o,this.addChild(l)}createEl(){return Ke("div",{className:"vjs-track-settings-controls"})}}me.registerComponent("TrackSettingsControls",nS);const gy="vjs-text-track-settings",sS=["#000","Black"],rS=["#00F","Blue"],aS=["#0FF","Cyan"],oS=["#0F0","Green"],lS=["#F0F","Magenta"],uS=["#F00","Red"],cS=["#FFF","White"],dS=["#FF0","Yellow"],yy=["1","Opaque"],vy=["0.5","Semi-Transparent"],hS=["0","Transparent"],Ua={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[sS,cS,uS,oS,rS,dS,lS,aS],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[yy,vy,hS],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[cS,sS,uS,oS,rS,dS,lS,aS],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:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[yy,vy],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:[hS,vy,yy],className:"vjs-window-opacity vjs-opacity"}};Ua.windowColor.options=Ua.backgroundColor.options;function fS(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function $O(r,e){const i=r.options[r.options.selectedIndex].value;return fS(i,e)}function GO(r,e,i){if(e){for(let s=0;s<r.options.length;s++)if(fS(r.options[s].value,i)===e){r.selectedIndex=s;break}}}class YO extends pu{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=Ke("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 tS(e,{textTrackComponentid:this.id_,selectConfigs:Ua,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const s=new iS(e,{textTrackComponentid:this.id_,selectConfigs:Ua,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(s);const o=new nS(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()}),su(Ua,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 IT(Ua,(e,i,s)=>{const o=$O(this.$(i.selector),i.parser);return o!==void 0&&(e[s]=o),e},{})}setValues(e){su(Ua,(i,s)=>{GO(this.$(i.selector),e[s],i.parser)})}setDefaults(){su(Ua,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(U.localStorage.getItem(gy))}catch(i){dt.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?U.localStorage.setItem(gy,JSON.stringify(e)):U.localStorage.removeItem(gy)}catch(i){dt.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}me.registerComponent("TextTrackSettings",YO);class XO extends me{constructor(e,i){let s=i.ResizeObserver||U.ResizeObserver;i.ResizeObserver===null&&(s=!1);const o=It({createEl:!s,reportTouchActivity:!1},i);super(e,o),this.ResizeObserver=i.ResizeObserver||U.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=r2(()=>{this.resizeHandler()},100,!1,this),s?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const l=this.debouncedHandler_;let c=this.unloadListener_=function(){Ki(this,"resize",l),Ki(this,"unload",c),c=null};Fn(this.el_.contentWindow,"unload",c),Fn(this.el_.contentWindow,"resize",l)},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()}}me.registerComponent("ResizeManager",XO);const WO={trackingThreshold:20,liveTolerance:15};class QO extends me{constructor(e,i){const s=It(WO,i,{createEl:!1});super(e,s),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(U.performance.now().toFixed(4)),s=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+s;const o=this.liveCurrentTime(),l=this.player_.currentTime();let c=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-l)>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_,as),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 s=e?e.length:0;for(;s--;)i.push(e.end(s));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let s=e?e.length:0;for(;s--;)i.push(e.start(s));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()}}me.registerComponent("LiveTracker",QO);class KO extends me{constructor(e,i){super(e,i),this.on("statechanged",s=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Ke("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${rs()}`}),description:Ke("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${rs()}`})},Ke("div",{className:"vjs-title-bar"},{},PT(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,s={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(o=>{const l=this.state[o],c=this.els[o],f=s[o];pp(c),l&&Pa(c,l),i&&(i.removeAttribute(f),l&&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}}me.registerComponent("TitleBar",KO);const ZO={initialDisplay:4e3,position:[],takeFocus:!1};let JO=class extends Zi{constructor(e,i){i=It(ZO,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],s=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Ke("button",{},{type:"button",class:this.buildCSSClass()},Ke("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()}};me.registerComponent("TransientButton",JO);const by=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const i=r.$$("source"),s=[];let o="";if(!i.length)return!1;for(let l=0;l<i.length;l++){const c=i[l].src;c&&s.indexOf(c)===-1&&s.push(c)}return s.length?(s.length===1&&(o=s[0]),r.triggerSourceset(o),!0):!1},e8=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=xe.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const i=xe.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",U.Element.prototype.appendChild.call(this,i),this.innerHTML}}),pS=(r,e)=>{let i={};for(let s=0;s<r.length&&(i=Object.getOwnPropertyDescriptor(r[s],e),!(i&&i.set&&i.get));s++);return i.enumerable=!0,i.configurable=!0,i},t8=r=>pS([r.el(),U.HTMLMediaElement.prototype,U.Element.prototype,e8],"innerHTML"),mS=function(r){const e=r.el();if(e.resetSourceWatch_)return;const i={},s=t8(r),o=l=>(...c)=>{const f=l.apply(e,c);return by(r),f};["append","appendChild","insertAdjacentHTML"].forEach(l=>{e[l]&&(i[l]=e[l],e[l]=o(i[l]))}),Object.defineProperty(e,"innerHTML",It(s,{set:o(s.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(l=>{e[l]=i[l]}),Object.defineProperty(e,"innerHTML",s)},r.one("sourceset",e.resetSourceWatch_)},i8=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?v2(U.Element.prototype.getAttribute.call(this,"src")):""},set(r){return U.Element.prototype.setAttribute.call(this,"src",r),r}}),n8=r=>pS([r.el(),U.HTMLMediaElement.prototype,i8],"src"),s8=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const i=n8(r),s=e.setAttribute,o=e.load;Object.defineProperty(e,"src",It(i,{set:l=>{const c=i.set.call(e,l);return r.triggerSourceset(e.src),c}})),e.setAttribute=(l,c)=>{const f=s.call(e,l,c);return/src/i.test(l)&&r.triggerSourceset(e.src),f},e.load=()=>{const l=o.call(e);return by(r)||(r.triggerSourceset(""),mS(r)),l},e.currentSrc?r.triggerSourceset(e.currentSrc):by(r)||mS(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=o,e.setAttribute=s,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class Be extends rt{constructor(e,i){super(e,i);const s=e.source;let o=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",s&&(this.el_.currentSrc!==s.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(s):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const l=this.el_.childNodes;let c=l.length;const f=[];for(;c--;){const p=l[c];p.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(p),this.remoteTextTracks().addTrack(p.track),this.textTracks().addTrack(p.track),!o&&!this.el_.hasAttribute("crossorigin")&&Tp(p.src)&&(o=!0)):f.push(p))}for(let p=0;p<f.length;p++)this.el_.removeChild(f[p])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&o&&dt.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_(),(_d||ap)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Be.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){s8(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const s=()=>{i=[];for(let l=0;l<e.length;l++){const c=e[l];c.kind==="metadata"&&i.push({track:c,storedMode:c.mode})}};s(),e.addEventListener("change",s),this.on("dispose",()=>e.removeEventListener("change",s));const o=()=>{for(let l=0;l<i.length;l++){const c=i[l];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}e.removeEventListener("change",o)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",s),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",s),e.addEventListener("change",s),e.removeEventListener("change",o)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const s=e.toLowerCase();this[`${s}TracksListeners_`]&&Object.keys(this[`${s}TracksListeners_`]).forEach(o=>{this.el()[`${s}Tracks`].removeEventListener(o,this[`${s}TracksListeners_`][o])}),this[`featuresNative${e}Tracks`]=!i,this[`${s}TracksListeners_`]=null,this.proxyNativeTracksForType_(s)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=os[e],s=this.el()[i.getterName],o=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!s||!s.addEventListener)return;const l={change:f=>{const p={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(p),e==="text"&&this[mu.remoteText.getterName]().trigger(p)},addtrack(f){o.addTrack(f.track)},removetrack(f){o.removeTrack(f.track)}},c=function(){const f=[];for(let p=0;p<o.length;p++){let b=!1;for(let _=0;_<s.length;_++)if(s[_]===o[p]){b=!0;break}b||f.push(o[p])}for(;f.length;)o.removeTrack(f.shift())};this[i.getterName+"Listeners_"]=l,Object.keys(l).forEach(f=>{const p=l[f];s.addEventListener(f,p),this.on("dispose",b=>s.removeEventListener(f,p))}),this.on("loadstart",c),this.on("dispose",f=>this.off("loadstart",c))}proxyNativeTracks_(){os.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const s=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(s,e),Be.disposeMediaElement(e),e=s}else{e=xe.createElement("video");const s=this.options_.tag&&Na(this.options_.tag),o=It({},s);(!_d||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,$T(e,Object.assign(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&cu(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let s=0;s<i.length;s++){const o=i[s],l=this.options_[o];typeof l<"u"&&(l?cu(e,o,o):hp(e,o),e[o]=l)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let s=!1;const o=function(){s=!0};this.on("loadstart",o);const l=function(){s||this.trigger("loadstart")};this.on("loadedmetadata",l),this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",l),s||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(s){this.trigger(s)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&cp?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){dt(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Ds&&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)tr(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 dt.error("Invalid source URL."),!1;const s={src:e};i&&(s.type=i);const o=Ke("source",{},s);return this.el_.appendChild(o),!0}removeSourceElement(e){if(!e)return dt.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const s of i)if(s.src===e)return this.el_.removeChild(s),!0;return dt.warn(`No matching source element found with src: ${e}`),!1}reset(){Be.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,s){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,s):super.addTextTrack(e,i,s)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=xe.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 s=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(s),s}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let s=i.length;for(;s--;)(e===i[s]||e===i[s].track)&&this.el().removeChild(i[s])}}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),U.performance&&(e.creationTime=U.performance.now()),e}}tp(Be,"TEST_VID",function(){if(!lu())return;const r=xe.createElement("video"),e=xe.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r}),Be.isSupported=function(){try{Be.TEST_VID.volume=.5}catch{return!1}return!!(Be.TEST_VID&&Be.TEST_VID.canPlayType)},Be.canPlayType=function(r){return Be.TEST_VID.canPlayType(r)},Be.canPlaySource=function(r,e){return Be.canPlayType(r.type)},Be.canControlVolume=function(){try{const r=Be.TEST_VID.volume;Be.TEST_VID.volume=r/2+.1;const e=r!==Be.TEST_VID.volume;return e&&Qi?(U.setTimeout(()=>{Be&&Be.prototype&&(Be.prototype.featuresVolumeControl=r!==Be.TEST_VID.volume)}),!1):e}catch{return!1}},Be.canMuteVolume=function(){try{const r=Be.TEST_VID.muted;return Be.TEST_VID.muted=!r,Be.TEST_VID.muted?cu(Be.TEST_VID,"muted","muted"):hp(Be.TEST_VID,"muted","muted"),r!==Be.TEST_VID.muted}catch{return!1}},Be.canControlPlaybackRate=function(){if(Ds&&Js&&ip<58)return!1;try{const r=Be.TEST_VID.playbackRate;return Be.TEST_VID.playbackRate=r/2+.1,r!==Be.TEST_VID.playbackRate}catch{return!1}},Be.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(xe.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(xe.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(xe.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(xe.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0},Be.supportsNativeTextTracks=function(){return cp||Qi&&Js},Be.supportsNativeVideoTracks=function(){return!!(Be.TEST_VID&&Be.TEST_VID.videoTracks)},Be.supportsNativeAudioTracks=function(){return!!(Be.TEST_VID&&Be.TEST_VID.audioTracks)},Be.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([r,e]){tp(Be.prototype,r,()=>Be[e](),!0)}),Be.prototype.featuresVolumeControl=Be.canControlVolume(),Be.prototype.movingMediaElementInDOM=!Qi,Be.prototype.featuresFullscreenResize=!0,Be.prototype.featuresProgressEvents=!0,Be.prototype.featuresTimeupdateEvents=!0,Be.prototype.featuresVideoFrameCallback=!!(Be.TEST_VID&&Be.TEST_VID.requestVideoFrameCallback),Be.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()}},Be.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let i=e.length;for(;i--;)r.removeChild(e[i]);r.removeAttribute("src"),typeof r.load=="function"&&function(){try{r.load()}catch{}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){Be.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){Be.prototype["set"+ti(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){Be.prototype[r]=function(){return this.el_[r]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){Be.prototype["set"+ti(r)]=function(e){this.el_[r]=e}}),["pause","load","play"].forEach(function(r){Be.prototype[r]=function(){return this.el_[r]()}}),rt.withSourceHandlers(Be),Be.nativeSourceHandler={},Be.nativeSourceHandler.canPlayType=function(r){try{return Be.TEST_VID.canPlayType(r)}catch{return""}},Be.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return Be.nativeSourceHandler.canPlayType(r.type);if(r.src){const i=K0(r.src);return Be.nativeSourceHandler.canPlayType(`video/${i}`)}return""},Be.nativeSourceHandler.handleSource=function(r,e,i){e.setSrc(r.src)},Be.nativeSourceHandler.dispose=function(){},Be.registerSourceHandler(Be.nativeSourceHandler),rt.registerTech("Html5",Be);const gS=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],_y={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ty=["tiny","xsmall","small","medium","large","xlarge","huge"],kp={};Ty.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;kp[r]=`vjs-layout-${e}`});const r8={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Ct extends me{constructor(e,i,s){if(e.id=e.id||i.id||`vjs_video_${rs()}`,i=Object.assign(Ct.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,s),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=MT(this.id_),this.fsApi_=Jf,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&&Na(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_=Ct.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(),F0(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(Fn(xe,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const o=It(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 U.DOMParser().parseFromString(kO,"image/svg+xml");if(f.querySelector("parsererror"))dt.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 DO(this),this.addClass("vjs-spatial-navigation-enabled")),_d&&this.addClass("vjs-touch-enabled"),Qi||this.addClass("vjs-workinghover"),Ct.players[this.id_]=this;const l=A0.split(".")[0];this.addClass(`vjs-v${l}`),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"),Ki(xe,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ki(xe,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Ct.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),EO(this),un.names.forEach(e=>{const i=un[e],s=this[i.getterName]();s&&s.off&&s.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,s=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const o=this.tag.tagName.toLowerCase()==="video-js";s?i=this.el_=e.parentNode:o||(i=this.el_=super.createEl("div"));const l=Na(e);if(o){for(i=this.el_=e,e=this.tag=xe.createElement("video");i.children.length;)e.appendChild(i.firstChild);Td(i,"video-js")||Io(i,"video-js"),i.appendChild(e),s=this.playerElIngest_=i,Object.keys(i).forEach(p=>{try{e[p]=i[p]}catch{}})}e.setAttribute("tabindex","-1"),l.tabindex="-1",Js&&sp&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(p){o&&p==="class"||i.setAttribute(p,l[p]),o&&e.setAttribute(p,l[p])}),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(p=>FT[p]).map(p=>"vjs-device-"+p.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...c),U.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=i2("vjs-styles-dimensions");const p=Ba(".vjs-styles-defaults"),b=Ba("head");b.insertBefore(this.styleEl_,p?p.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 p=0;p<f.length;p++){const b=f.item(p);Io(b,"vjs-hidden"),b.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!s&&e.parentNode.insertBefore(i,e),R0(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"){dt.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 s=e+"_";if(i===void 0)return this[s]||0;if(i===""||i==="auto"){this[s]=void 0,this.updateStyleEl_();return}const o=parseFloat(i);if(isNaN(o)){dt.error(`Improper value "${i}" supplied for for ${e}`);return}this[s]=o,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Vr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),sO(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(U.VIDEOJS_NO_DYNAMIC_STYLE===!0){const f=typeof this.width_=="number"?this.width_:this.options_.width,p=typeof this.height_=="number"?this.height_:this.options_.height,b=this.tech_&&this.tech_.el();b&&(f>=0&&(b.width=f),p>=0&&(b.height=p));return}let e,i,s,o;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?s=this.aspectRatio_:this.videoWidth()>0?s=this.videoWidth()+":"+this.videoHeight():s="16:9";const l=s.split(":"),c=l[1]/l[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),n2(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 s=ti(e),o=e.charAt(0).toLowerCase()+e.slice(1);s!=="Html5"&&this.tag&&(rt.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=s,this.isReady_=!1;let l=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(l=!1);const c={source:i,autoplay:l,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};un.names.forEach(p=>{const b=un[p];c[b.getterName]=this[b.privateName]}),Object.assign(c,this.options_[s]),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=rt.getTech(e);if(!f)throw new Error(`No Tech named '${s}' exists! '${s}' should be registered using videojs.registerTech()'`);this.tech_=new f(c),this.tech_.ready(zt(this,this.handleTechReady_),!0),V0.jsonToTextTracks(this.textTracksJson_||[],this.tech_),gS.forEach(p=>{this.on(this.tech_,p,b=>this[`handleTech${ti(p)}_`](b))}),Object.keys(_y).forEach(p=>{this.on(this.tech_,p,b=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${_y[p]}_`].bind(this),event:b});return}this[`handleTech${_y[p]}_`](b)})}),this.on(this.tech_,"loadstart",p=>this.handleTechLoadStart_(p)),this.on(this.tech_,"sourceset",p=>this.handleTechSourceset_(p)),this.on(this.tech_,"waiting",p=>this.handleTechWaiting_(p)),this.on(this.tech_,"ended",p=>this.handleTechEnded_(p)),this.on(this.tech_,"seeking",p=>this.handleTechSeeking_(p)),this.on(this.tech_,"play",p=>this.handleTechPlay_(p)),this.on(this.tech_,"pause",p=>this.handleTechPause_(p)),this.on(this.tech_,"durationchange",p=>this.handleTechDurationChange_(p)),this.on(this.tech_,"fullscreenchange",(p,b)=>this.handleTechFullscreenChange_(p,b)),this.on(this.tech_,"fullscreenerror",(p,b)=>this.handleTechFullscreenError_(p,b)),this.on(this.tech_,"enterpictureinpicture",p=>this.handleTechEnterPictureInPicture_(p)),this.on(this.tech_,"leavepictureinpicture",p=>this.handleTechLeavePictureInPicture_(p)),this.on(this.tech_,"error",p=>this.handleTechError_(p)),this.on(this.tech_,"posterchange",p=>this.handleTechPosterChange_(p)),this.on(this.tech_,"textdata",p=>this.handleTechTextData_(p)),this.on(this.tech_,"ratechange",p=>this.handleTechRateChange_(p)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(s!=="Html5"||!this.tag)&&R0(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){un.names.forEach(e=>{const i=un[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=V0.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&&dt.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":A0}}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 l=()=>{this.muted(o)};this.playTerminatedQueue_.push(l);const c=this.play();if(wd(c))return c.catch(f=>{throw l(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${f||""}`)})};let s;if(e==="any"&&!this.muted()?(s=this.play(),wd(s)&&(s=s.catch(i))):e==="muted"&&!this.muted()?s=i():s=this.play(),!!wd(s))return s.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,s="";typeof i!="string"&&(i=e.src,s=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!s&&(s=AO(this,i)),this.cache_.source=It({},e,{src:i,type:s});const o=this.cache_.sources.filter(p=>p.src&&p.src===i),l=[],c=this.$$("source"),f=[];for(let p=0;p<c.length;p++){const b=Na(c[p]);l.push(b),b.src&&b.src===i&&f.push(b.src)}f.length&&!o.length?this.cache_.sources=l:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=l=>this.updateSourceCaches_(l);const s=this.currentSource().src,o=e.src;s&&!/^blob:/.test(s)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==s)&&(i=()=>{}),i(o),e.src||this.tech_.any(["sourceset","loadstart"],l=>{if(l.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()?tr(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),s=>s.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()&&!xe.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 s=this.el();let o=xe[this.fsApi_.fullscreenElement]===s;!o&&s.matches&&(o=s.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 SO)return _O(this.middleware_,this.tech_,e,i);if(e in E2)return x2(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(s){throw dt(s),s}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in TO)return bO(this.middleware_,this.tech_,e);if(e in E2)return x2(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(dt(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(dt(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(dt(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=tr){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),s=!!(cp||Qi);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&&s&&this.load();return}const o=this.techGet_("play");s&&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(s){s(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Os(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=Os(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Os(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 p2(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let s=e.end(e.length-1);return s>i&&(s=i),s}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((s,o)=>{function l(){i.off("fullscreenerror",f),i.off("fullscreenchange",c)}function c(){l(),s()}function f(b,_){l(),o(_)}i.one("fullscreenchange",c),i.one("fullscreenerror",f);const p=i.requestFullscreenHelper_(e);p&&(p.then(l,l),p.then(s,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 s=this.el_[this.fsApi_.requestFullscreen](i);return s&&s.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),s}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,s)=>{function o(){e.off("fullscreenerror",c),e.off("fullscreenchange",l)}function l(){o(),i()}function c(p,b){o(),s(b)}e.one("fullscreenchange",l),e.one("fullscreenerror",c);const f=e.exitFullscreenHelper_();f&&(f.then(o,o),f.then(i,s))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=xe[this.fsApi_.exitFullscreen]();return e&&tr(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=xe.documentElement.style.overflow,Fn(xe,"keydown",this.boundFullWindowOnEscKey_),xe.documentElement.style.overflow="hidden",Io(xe.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,Ki(xe,"keydown",this.boundFullWindowOnEscKey_),xe.documentElement.style.overflow=this.docOrigOverflow,dp(xe.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&&U.documentPictureInPicture){const e=xe.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(Ke("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),U.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(JT(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",s=>{const o=s.target.querySelector(".video-js");e.parentNode.replaceChild(o,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in xe&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(U.documentPictureInPicture&&U.documentPictureInPicture.window)return U.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in xe)return xe.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(o=>{const l=o.tagName.toLowerCase();if(o.isContentEditable)return!0;const c=["button","checkbox","hidden","radio","reset","submit"];return l==="input"?c.indexOf(o.type)===-1:["textarea"].indexOf(l)!==-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:s=c=>e.key.toLowerCase()==="f",muteKey:o=c=>e.key.toLowerCase()==="m",playPauseKey:l=c=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(s.call(this,e)){e.preventDefault(),e.stopPropagation();const c=me.getComponent("FullscreenToggle");xe[this.fsApi_.fullscreenEnabled]!==!1&&c.prototype.handleClick.call(this,e)}else o.call(this,e)?(e.preventDefault(),e.stopPropagation(),me.getComponent("MuteToggle").prototype.handleClick.call(this,e)):l.call(this,e)&&(e.preventDefault(),e.stopPropagation(),me.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let s=0,o=this.options_.techOrder;s<o.length;s++){const l=o[s];let c=rt.getTech(l);if(c||(c=me.getComponent(l)),!c){dt.error(`The "${l}" 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,rt.getTech(f)]).filter(([f,p])=>p?p.isSupported():(dt.error(`The "${f}" tech is undefined. Skipped browser support check for that tech.`),!1)),s=function(f,p,b){let _;return f.some(x=>p.some(w=>{if(_=b(x,w),_)return!0})),_};let o;const l=f=>(p,b)=>f(b,p),c=([f,p],b)=>{if(p.canPlaySource(b,this.options_[f.toLowerCase()]))return{source:b,tech:f}};return this.options_.sourceOrder?o=s(e,i,l(c)):o=s(i,e,c),o||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const s=C2(e);if(!s.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=s),this.updateSourceCaches_(s[0]),yO(this,s[0],(o,l)=>{if(this.middleware_=l,i||(this.cache_.sources=s),this.updateSourceCaches_(o),this.src_(o)){if(s.length>1)return this.handleSrc_(s.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}vO(l,this.tech_)}),s.length>1){const o=()=>{this.error(null),this.handleSrc_(s.slice(1),!0)},l=()=>{this.off("error",o)};this.one("error",o),this.one("playing",l),this.resetRetryOnError_=()=>{this.off("error",o),this.off("playing",l)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?u2(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();tr(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}),Vr(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:s,remainingTimeDisplay:o}=this.controlBar||{},{seekBar:l}=s||{};e&&e.updateContent(),i&&i.updateContent(),o&&o.updateContent(),l&&(l.update(),l.loadProgressBar&&l.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(La("beforeerror").forEach(i=>{const s=i(this,e);if(!(Zs(s)&&!Array.isArray(s)||typeof s=="string"||typeof s=="number"||s===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=s}),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 Qt(e),this.addClass("vjs-error"),dt.error(`(CODE:${this.error_.code} ${Qt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),La("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,s;const o=zt(this,this.reportUserActivity),l=function(x){(x.screenX!==i||x.screenY!==s)&&(i=x.screenX,s=x.screenY,o())},c=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},f=function(x){o(),this.clearInterval(e)};this.on("mousedown",c),this.on("mousemove",l),this.on("mouseup",f),this.on("mouseleave",f);const p=this.getChild("controlBar");p&&!Qi&&!Ds&&(p.on("mouseenter",function(x){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),p.on("mouseleave",function(x){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);let b;const _=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(b);const x=this.options_.inactivityTimeout;x<=0||(b=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},x))};this.setInterval(_,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"),s=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=s,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(s),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,s){if(this.tech_)return this.tech_.addTextTrack(e,i,s)}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(),Vr(this)&&this.trigger("languagechange"))}languages(){return It(Ct.prototype.options_.languages,this.languages_)}toJSON(){const e=It(this.options_),i=e.tracks;e.tracks=[];for(let s=0;s<i.length;s++){let o=i[s];o=It(o),o.player=void 0,e.tracks[s]=o}return e}createModal(e,i){i=i||{},i.content=e||"";const s=new pu(this,i);return this.addChild(s),s.on("dispose",()=>{this.removeChild(s)}),s.open(),s}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let s=0;s<Ty.length;s++){const o=Ty[s],l=this.breakpoints_[o];if(i<=l){if(e===o)return;e&&this.removeClass(kp[e]),this.addClass(kp[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({},r8,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 kp[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const s=this.crossOrigin();this.reset(),this.cache_.media=It(e);const{artist:o,artwork:l,description:c,poster:f,src:p,textTracks:b,title:_}=this.cache_.media;!l&&f&&(this.cache_.media.artwork=[{src:f,type:Ep(f)}]),s&&this.crossOrigin(s),p&&this.src(p),f&&this.poster(f),Array.isArray(b)&&b.forEach(x=>this.addRemoteTextTrack(x,!1)),this.titleBar&&this.titleBar.update({title:_,description:c||o||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),s=Array.prototype.map.call(this.remoteTextTracks(),l=>({kind:l.kind,label:l.label,language:l.language,src:l.src})),o={src:i,textTracks:s};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:Ep(o.poster)}]),o}return It(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},s=Na(e),o=s["data-setup"];if(Td(e,"vjs-fill")&&(s.fill=!0),Td(e,"vjs-fluid")&&(s.fluid=!0),o!==null)try{Object.assign(s,JSON.parse(o||"{}"))}catch(l){dt.error("data-setup",l)}if(Object.assign(i,s),e.hasChildNodes()){const l=e.childNodes;for(let c=0,f=l.length;c<f;c++){const p=l[c],b=p.nodeName.toLowerCase();b==="source"?i.sources.push(Na(p)):b==="track"&&i.tracks.push(Na(p))}}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"))}}Ct.prototype.videoTracks=()=>{},Ct.prototype.audioTracks=()=>{},Ct.prototype.textTracks=()=>{},Ct.prototype.remoteTextTracks=()=>{},Ct.prototype.remoteTextTrackEls=()=>{},un.names.forEach(function(r){const e=un[r];Ct.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Ct.prototype.crossorigin=Ct.prototype.crossOrigin,Ct.players={};const Rd=U.navigator;Ct.prototype.options_={techOrder:rt.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Rd&&(Rd.languages&&Rd.languages[0]||Rd.userLanguage||Rd.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},gS.forEach(function(r){Ct.prototype[`handleTech${ti(r)}_`]=function(){return this.trigger(r)}}),me.registerComponent("Player",Ct);const Dp="plugin",bu="activePlugins_",_u={},Op=r=>_u.hasOwnProperty(r),Rp=r=>Op(r)?_u[r]:void 0,yS=(r,e)=>{r[bu]=r[bu]||{},r[bu][e]=!0},Mp=(r,e,i)=>{const s=(i?"before":"")+"pluginsetup";r.trigger(s,e),r.trigger(s+":"+e.name,e)},a8=function(r,e){const i=function(){Mp(this,{name:r,plugin:e,instance:null},!0);const s=e.apply(this,arguments);return yS(this,r),Mp(this,{name:r,plugin:e,instance:s}),s};return Object.keys(e).forEach(function(s){i[s]=e[s]}),i},vS=(r,e)=>(e.prototype.name=r,function(...i){Mp(this,{name:r,plugin:e,instance:null},!0);const s=new e(this,...i);return this[r]=()=>s,Mp(this,s.getEventHash()),s});class En{constructor(e){if(this.constructor===En)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),F0(this),delete this.trigger,l2(this,this.constructor.defaultState),yS(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 fu(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[bu][e]=!1,this.player=this.state=null,i[e]=vS(e,_u[e])}static isBasic(e){const i=typeof e=="string"?Rp(e):e;return typeof i=="function"&&!En.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(Op(e))dt.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Ct.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 _u[e]=i,e!==Dp&&(En.isBasic(i)?Ct.prototype[e]=a8(e,i):Ct.prototype[e]=vS(e,i)),i}static deregisterPlugin(e){if(e===Dp)throw new Error("Cannot de-register base plugin.");Op(e)&&(delete _u[e],delete Ct.prototype[e])}static getPlugins(e=Object.keys(_u)){let i;return e.forEach(s=>{const o=Rp(s);o&&(i=i||{},i[s]=o)}),i}static getPluginVersion(e){const i=Rp(e);return i&&i.VERSION||""}}En.getPlugin=Rp,En.BASE_PLUGIN_NAME=Dp,En.registerPlugin(Dp,En),Ct.prototype.usingPlugin=function(r){return!!this[bu]&&this[bu][r]===!0},Ct.prototype.hasPlugin=function(r){return!!Op(r)};function o8(r,e){let i=!1;return function(...s){return i||dt.warn(r),i=!0,e.apply(this,s)}}function Rs(r,e,i,s){return o8(`${e} is deprecated and will be removed in ${r}.0; please use ${i} instead.`,s)}var l8={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 bS=r=>r.indexOf("#")===0?r.slice(1):r;function H(r,e,i){let s=H.getPlayer(r);if(s)return e&&dt.warn(`Player "${r}" is already initialised. Options will not be applied.`),i&&s.ready(i),s;const o=typeof r=="string"?Ba("#"+bS(r)):r;if(!uu(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");const c=("getRootNode"in o?o.getRootNode()instanceof U.ShadowRoot:!1)?o.getRootNode():o.ownerDocument.body;(!o.ownerDocument.defaultView||!c.contains(o))&&dt.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)),La("beforesetup").forEach(p=>{const b=p(o,It(e));if(!Zs(b)||Array.isArray(b)){dt.error("please return an object in beforesetup hooks");return}e=It(e,b)});const f=me.getComponent("Player");return s=new f(o,e,i),La("setup").forEach(p=>p(s)),s}if(H.hooks_=zr,H.hooks=La,H.hook=$3,H.hookOnce=G3,H.removeHook=OT,U.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&lu()){let r=Ba(".vjs-styles-defaults");if(!r){r=i2("vjs-styles-defaults");const e=Ba("head");e&&e.insertBefore(r,e.firstChild),n2(r,`
|
||
.video-js {
|
||
width: 300px;
|
||
height: 150px;
|
||
}
|
||
|
||
.vjs-fluid:not(.vjs-audio-only-mode) {
|
||
padding-top: 56.25%
|
||
}
|
||
`)}}I0(1,H),H.VERSION=A0,H.options=Ct.prototype.options_,H.getPlayers=()=>Ct.players,H.getPlayer=r=>{const e=Ct.players;let i;if(typeof r=="string"){const s=bS(r),o=e[s];if(o)return o;i=Ba("#"+s)}else i=r;if(uu(i)){const{player:s,playerId:o}=i;if(s||e[o])return s||e[o]}},H.getAllPlayers=()=>Object.keys(Ct.players).map(r=>Ct.players[r]).filter(Boolean),H.players=Ct.players,H.getComponent=me.getComponent,H.registerComponent=(r,e)=>(rt.isTech(e)&&dt.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),me.registerComponent.call(me,r,e)),H.getTech=rt.getTech,H.registerTech=rt.registerTech,H.use=gO,Object.defineProperty(H,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(H.middleware,"TERMINATOR",{value:xp,writeable:!1,enumerable:!0}),H.browser=FT,H.obj=W3,H.mergeOptions=Rs(9,"videojs.mergeOptions","videojs.obj.merge",It),H.defineLazyProperty=Rs(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",tp),H.bind=Rs(9,"videojs.bind","native Function.prototype.bind",zt),H.registerPlugin=En.registerPlugin,H.deregisterPlugin=En.deregisterPlugin,H.plugin=(r,e)=>(dt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),En.registerPlugin(r,e)),H.getPlugins=En.getPlugins,H.getPlugin=En.getPlugin,H.getPluginVersion=En.getPluginVersion,H.addLanguage=function(r,e){return r=(""+r).toLowerCase(),H.options.languages=It(H.options.languages,{[r]:e}),H.options.languages[r]},H.log=dt,H.createLogger=MT,H.time=uO,H.createTimeRange=Rs(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Os),H.createTimeRanges=Rs(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Os),H.formatTime=Rs(9,"videojs.formatTime","videojs.time.formatTime",No),H.setFormatTime=Rs(9,"videojs.setFormatTime","videojs.time.setFormatTime",h2),H.resetFormatTime=Rs(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",f2),H.parseUrl=Rs(9,"videojs.parseUrl","videojs.url.parseUrl",Q0),H.isCrossOrigin=Rs(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Tp),H.EventTarget=jn,H.any=B0,H.on=Fn,H.one=yp,H.off=Ki,H.trigger=fu,H.xhr=e1,H.TrackList=Bo,H.TextTrack=Ad,H.TextTrackList=X0,H.AudioTrack=T2,H.AudioTrackList=m2,H.VideoTrack=S2,H.VideoTrackList=g2,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{H[r]=function(){return dt.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),e2[r].apply(null,arguments)}}),H.computedStyle=Rs(9,"videojs.computedStyle","videojs.dom.computedStyle",hu),H.dom=e2,H.fn=nO,H.num=BO,H.str=oO,H.url=pO,H.Error=l8;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class u8{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(s){i.enabled_(s)}}),i}}class Lp extends H.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 s=this.levels_.length;return i=new u8(e),""+s in this||Object.defineProperty(this,s,{get(){return this.levels_[s]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let s=0,o=this.length;s<o;s++)if(this[s]===e){i=this.levels_.splice(s,1)[0],this.selectedIndex_===s?this.selectedIndex_=-1:this.selectedIndex_>s&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,s=this.length;i<s;i++){const o=this[i];if(o.id===e)return o}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Lp.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in Lp.prototype.allowedEvents_)Lp.prototype["on"+r]=null;var _S="4.1.0";const c8=function(r,e){const i=r.qualityLevels,s=new Lp,o=function(){s.dispose(),r.qualityLevels=i,r.off("dispose",o)};return r.on("dispose",o),r.qualityLevels=()=>s,r.qualityLevels.VERSION=_S,s},TS=function(r){return c8(this,H.obj.merge({},r))};H.registerPlugin("qualityLevels",TS),TS.VERSION=_S;/*! @name @videojs/http-streaming @version 3.17.0 @license Apache-2.0 */const Cn=Uf,Ip=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,us=r=>H.log.debug?H.log.debug.bind(H,"VHS:",`${r} >`):function(){};function wt(...r){const e=H.obj||H;return(e.merge||e.mergeOptions).apply(e,r)}function Di(...r){const e=H.time||H;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function d8(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
|
||
`;for(let i=0;i<r.length;i++){const s=r.start(i),o=r.end(i);e+=`${s} --> ${o}. Duration (${o-s})
|
||
`}return e}const nr=1/30,sr=nr*3,SS=function(r,e){const i=[];let s;if(r&&r.length)for(s=0;s<r.length;s++)e(r.start(s),r.end(s))&&i.push([r.start(s),r.end(s)]);return Di(i)},Tu=function(r,e){return SS(r,function(i,s){return i-sr<=e&&s+sr>=e})},Pp=function(r,e){return SS(r,function(i){return i-nr>=e})},h8=function(r){if(r.length<2)return Di();const e=[];for(let i=1;i<r.length;i++){const s=r.end(i-1),o=r.start(i);e.push([s,o])}return Di(e)},f8=function(r,e){let i=null,s=null,o=0;const l=[],c=[];if(!r||!r.length||!e||!e.length)return Di();let f=r.length;for(;f--;)l.push({time:r.start(f),type:"start"}),l.push({time:r.end(f),type:"end"});for(f=e.length;f--;)l.push({time:e.start(f),type:"start"}),l.push({time:e.end(f),type:"end"});for(l.sort(function(p,b){return p.time-b.time}),f=0;f<l.length;f++)l[f].type==="start"?(o++,o===2&&(i=l[f].time)):l[f].type==="end"&&(o--,o===1&&(s=l[f].time)),i!==null&&s!==null&&(c.push([i,s]),i=null,s=null);return Di(c)},xS=r=>{const e=[];if(!r||!r.length)return"";for(let i=0;i<r.length;i++)e.push(r.start(i)+" => "+r.end(i));return e.join(", ")},p8=function(r,e,i=1){return((r.length?r.end(r.length-1):0)-e)/i},jo=r=>{const e=[];for(let i=0;i<r.length;i++)e.push({start:r.start(i),end:r.end(i)});return e},m8=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let i=0;i<r.length;i++)if(r.start(i)!==e.start(i)||r.end(i)!==e.end(i))return!0;return!1},Sy=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},xy=function(r,e){let i=0;if(!r||!r.length)return i;for(let s=0;s<r.length;s++){const o=r.start(s),l=r.end(s);if(!(e>l)){if(e>o&&e<=l){i+=l-e;continue}i+=l-o}}return i},Ey=(r,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(s){i+=s.duration}),(e.preloadHints||[]).forEach(function(s){s.type==="PART"&&(i+=r.partTargetDuration)}),i},Cy=r=>(r.segments||[]).reduce((e,i,s)=>(i.parts?i.parts.forEach(function(o,l){e.push({duration:o.duration,segmentIndex:s,partIndex:l,part:o,segment:i})}):e.push({duration:i.duration,segmentIndex:s,partIndex:null,segment:i,part:null}),e),[]),ES=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},CS=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:i}=r;let s=(i||[]).reduce((o,l)=>o+(l.type==="PART"?1:0),0);return s+=e&&e.length?e.length:0,s},wS=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const i=ES(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},g8=function(r,e){let i=0,s=e-r.mediaSequence,o=r.segments[s];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(;s--;){if(o=r.segments[s],typeof o.end<"u")return{result:i+o.end,precise:!0};if(i+=Ey(r,o),typeof o.start<"u")return{result:i+o.start,precise:!0}}return{result:i,precise:!1}},y8=function(r,e){let i=0,s,o=e-r.mediaSequence;for(;o<r.segments.length;o++){if(s=r.segments[o],typeof s.start<"u")return{result:s.start-i,precise:!0};if(i+=Ey(r,s),typeof s.end<"u")return{result:s.end-i,precise:!0}}return{result:-1,precise:!1}},AS=function(r,e,i){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const s=g8(r,e);if(s.precise)return s.result;const o=y8(r,e);return o.precise?o.result:s.result+i},kS=function(r,e,i){if(!r)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return U.Infinity}return AS(r,e,i)},Md=function({defaultDuration:r,durationList:e,startIndex:i,endIndex:s}){let o=0;if(i>s&&([i,s]=[s,i]),i<0){for(let l=i;l<Math.min(0,s);l++)o+=r;i=0}for(let l=i;l<s;l++)o+=e[l].duration;return o},DS=function(r,e,i,s){if(!r||!r.segments)return null;if(r.endList)return kS(r);if(e===null)return null;e=e||0;let o=AS(r,r.mediaSequence+r.segments.length,e);return i&&(s=typeof s=="number"?s:wS(null,r),o-=s),Math.max(0,o)},v8=function(r,e,i){const o=e||0;let l=DS(r,e,!0,i);return l===null?Di():(l<o&&(l=o),Di(o,l))},b8=function({playlist:r,currentTime:e,startingSegmentIndex:i,startingPartIndex:s,startTime:o,exactManifestTimings:l}){let c=e-o;const f=Cy(r);let p=0;for(let b=0;b<f.length;b++){const _=f[b];if(i===_.segmentIndex&&!(typeof s=="number"&&typeof _.partIndex=="number"&&s!==_.partIndex)){p=b;break}}if(c<0){if(p>0)for(let b=p-1;b>=0;b--){const _=f[b];if(c+=_.duration,l){if(c<0)continue}else if(c+nr<=0)continue;return{partIndex:_.partIndex,segmentIndex:_.segmentIndex,startTime:o-Md({defaultDuration:r.targetDuration,durationList:f,startIndex:p,endIndex:b})}}return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e}}if(p<0){for(let b=p;b<0;b++)if(c-=r.targetDuration,c<0)return{partIndex:f[0]&&f[0].partIndex||null,segmentIndex:f[0]&&f[0].segmentIndex||0,startTime:e};p=0}for(let b=p;b<f.length;b++){const _=f[b];c-=_.duration;const x=_.duration>nr,w=c===0,D=x&&c+nr>=0;if(!((w||D)&&b!==f.length-1)){if(l){if(c>0)continue}else if(c-nr>=0)continue;return{partIndex:_.partIndex,segmentIndex:_.segmentIndex,startTime:o+Md({defaultDuration:r.targetDuration,durationList:f,startIndex:p,endIndex:b})}}}return{segmentIndex:f[f.length-1].segmentIndex,partIndex:f[f.length-1].partIndex,startTime:e}},OS=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},wy=function(r){return r.excludeUntil&&r.excludeUntil===1/0},Np=function(r){const e=OS(r);return!r.disabled&&!e},_8=function(r){return r.disabled},T8=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},RS=function(r,e){return e.attributes&&e.attributes[r]},S8=function(r,e,i,s=0){return RS("BANDWIDTH",i)?(r*i.attributes.BANDWIDTH-s*8)/e:NaN},Ay=(r,e)=>{if(r.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(s=>Np(s)?(s.attributes.BANDWIDTH||0)<i:!1).length===0},ky=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),MS=function(r,e){const i=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let s=!1;for(const o in i){for(const l in i[o])if(s=e(i[o][l]),s)break;if(s)break}return!!s},Ld=r=>{if(!r||!r.playlists||!r.playlists.length)return MS(r,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<r.playlists.length;e++){const i=r.playlists[e],s=i.attributes&&i.attributes.CODECS;if(!(s&&s.split(",").every(l=>p1(l))||MS(r,l=>ky(i,l))))return!1}return!0};var wn={liveEdgeDelay:wS,duration:kS,seekable:v8,getMediaInfoForTime:b8,isEnabled:Np,isDisabled:_8,isExcluded:OS,isIncompatible:wy,playlistEnd:DS,isAes:T8,hasAttribute:RS,estimateSegmentRequestTime:S8,isLowestEnabledRendition:Ay,isAudioOnly:Ld,playlistMatch:ky,segmentDurationWithParts:Ey};const{log:LS}=H,Su=(r,e)=>`${r}-${e}`,IS=(r,e,i)=>`placeholder-uri-${r}-${e}-${i}`,x8=({onwarn:r,oninfo:e,manifestString:i,customTagParsers:s=[],customTagMappers:o=[],llhls:l})=>{const c=new VD;r&&c.on("warn",r),e&&c.on("info",e),s.forEach(b=>c.addParser(b)),o.forEach(b=>c.addTagMapper(b)),c.push(i),c.end();const f=c.manifest;if(l||(["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(_){b.hasOwnProperty(_)&&delete b[_]})})),!f.targetDuration){let b=10;f.segments&&f.segments.length&&(b=f.segments.reduce((_,x)=>Math.max(_,x.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${b}`}),f.targetDuration=b}const p=ES(f);if(p.length&&!f.partTargetDuration){const b=p.reduce((_,x)=>Math.max(_,x.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${b}`}),LS.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},xu=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(r.mediaGroups[i])for(const s in r.mediaGroups[i])for(const o in r.mediaGroups[i][s]){const l=r.mediaGroups[i][s][o];e(l,i,s,o)}})},PS=({playlist:r,uri:e,id:i})=>{r.id=i,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},E8=r=>{let e=r.playlists.length;for(;e--;){const i=r.playlists[e];PS({playlist:i,id:Su(e,i.uri)}),i.resolvedUri=Cn(r.uri,i.uri),r.playlists[i.id]=i,r.playlists[i.uri]=i,i.attributes.BANDWIDTH||LS.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},C8=r=>{xu(r,e=>{e.uri&&(e.resolvedUri=Cn(r.uri,e.uri))})},w8=(r,e)=>{const i=Su(0,e),s={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:U.location.href,resolvedUri:U.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return s.playlists[i]=s.playlists[0],s.playlists[e]=s.playlists[0],s},NS=(r,e,i=IS)=>{r.uri=e;for(let o=0;o<r.playlists.length;o++)if(!r.playlists[o].uri){const l=`placeholder-uri-${o}`;r.playlists[o].uri=l}const s=Ld(r);xu(r,(o,l,c,f)=>{if(!o.playlists||!o.playlists.length){if(s&&l==="AUDIO"&&!o.uri)for(let p=0;p<r.playlists.length;p++){const b=r.playlists[p];if(b.attributes&&b.attributes.AUDIO&&b.attributes.AUDIO===c)return}o.playlists=[ei({},o)]}o.playlists.forEach(function(p,b){const _=i(l,c,f,p),x=Su(b,_);p.uri?p.resolvedUri=p.resolvedUri||Cn(r.uri,p.uri):(p.uri=b===0?_:x,p.resolvedUri=p.uri),p.id=p.id||x,p.attributes=p.attributes||{},r.playlists[p.id]=p,r.playlists[p.uri]=p})}),E8(r),C8(r)};class BS{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,s=i.startDate.getTime();this.trimProcessedDateRanges_(s),this.pendingDateRanges_=e.reduce((o,l)=>(o.set(l.id,l),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((s,o)=>{if(!this.processedDateRanges_.has(o)&&(s.startTime=s.startDate.getTime()/1e3-this.offset_,s.processDateRange=()=>this.processDateRange(s),i.push(s),!!s.class))if(e[s.class]){const l=e[s.class].push(s);s.classListIndex=l-1}else e[s.class]=[s],s.classListIndex=0});for(const s of i){const o=e[s.class]||[];s.endDate?s.endTime=s.endDate.getTime()/1e3-this.offset_:s.endOnNext&&o[s.classListIndex+1]?s.endTime=o[s.classListIndex+1].startTime:s.duration?s.endTime=s.startTime+s.duration:s.plannedDuration?s.endTime=s.startTime+s.plannedDuration:s.endTime=s.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((s,o)=>{s.startDate.getTime()<e&&this.processedDateRanges_.delete(o)})}}const US=22,Ho=({requestType:r,request:e,error:i,parseFailure:s})=>{const o=e.status<200||e.status>299,l=e.status>=400&&e.status<=499,c={uri:e.uri,requestType:r},f=o&&!l||s;if(i&&l)c.error=ei({},i),c.errorType=H.Error.NetworkRequestFailed;else if(e.aborted)c.errorType=H.Error.NetworkRequestAborted;else if(e.timedout)c.erroType=H.Error.NetworkRequestTimeout;else if(f){const p=s?H.Error.NetworkBodyParserFailed:H.Error.NetworkBadStatus;c.errorType=p,c.status=e.status,c.headers=e.headers}return c},A8=us("CodecUtils"),qS=function(r){const e=r.attributes||{};if(e.CODECS)return Ws(e.CODECS)},FS=(r,e)=>{const i=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&i.AUDIO&&r.mediaGroups.AUDIO[i.AUDIO]},k8=(r,e)=>{if(!FS(r,e))return!0;const i=e.attributes||{},s=r.mediaGroups.AUDIO[i.AUDIO];for(const o in s)if(!s[o].uri&&!s[o].playlists)return!0;return!1},Id=function(r){const e={};return r.forEach(({mediaType:i,type:s,details:o})=>{e[i]=e[i]||[],e[i].push(f1(`${s}${o}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){A8(`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},jS=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},Pd=function(r,e){const i=e.attributes||{},s=Id(qS(e)||[]);if(FS(r,e)&&!s.audio&&!k8(r,e)){const o=Id(GD(r,i.AUDIO)||[]);o.audio&&(s.audio=o.audio)}return s},{EventTarget:D8}=H,O8=(r,e)=>{if(e.endList||!e.serverControl)return r;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:s}=e;let o=e.mediaSequence+e.segments.length;if(s){const l=s.parts||[],c=CS(e)-1;c>-1&&c!==l.length-1&&(i._HLS_part=c),(c>-1||l.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 s=new U.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(o){i.hasOwnProperty(o)&&s.searchParams.set(o,i[o])}),r=s.toString()}return r},R8=(r,e)=>{if(!r)return e;const i=wt(r,e);if(r.preloadHints&&!e.preloadHints&&delete i.preloadHints,r.parts&&!e.parts)delete i.parts;else if(r.parts&&e.parts)for(let s=0;s<e.parts.length;s++)r.parts&&r.parts[s]&&(i.parts[s]=wt(r.parts[s],e.parts[s]));return!r.skipped&&e.skipped&&(i.skipped=!1),r.preload&&!e.preload&&(i.preload=!1),i},M8=(r,e,i)=>{const s=r.slice(),o=e.slice();i=i||0;const l=[];let c;for(let f=0;f<o.length;f++){const p=s[f+i],b=o[f];p?(c=p.map||c,l.push(R8(p,b))):(c&&!b.map&&(b.map=c),l.push(b))}return l},HS=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=Cn(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=Cn(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=Cn(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=Cn(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=Cn(e,i.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=Cn(e,i.uri))})},zS=function(r){const e=r.segments||[],i=r.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let s=0;s<i.preloadHints.length;s++)if(i.preloadHints[s].type==="MAP")return e}i.duration=r.targetDuration,i.preload=!0,e.push(i)}return e},VS=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,Dy=(r,e,i=VS)=>{const s=wt(r,{}),o=s.playlists[e.id];if(!o||i(o,e))return null;e.segments=zS(e);const l=wt(o,e);if(l.preloadSegment&&!e.preloadSegment&&delete l.preloadSegment,o.segments){if(e.skip){e.segments=e.segments||[];for(let c=0;c<e.skip.skippedSegments;c++)e.segments.unshift({skipped:!0})}l.segments=M8(o.segments,e.segments,e.mediaSequence-o.mediaSequence)}l.segments.forEach(c=>{HS(c,l.resolvedUri)});for(let c=0;c<s.playlists.length;c++)s.playlists[c].id===e.id&&(s.playlists[c]=l);return s.playlists[e.id]=l,s.playlists[e.uri]=l,xu(r,(c,f,p,b)=>{if(c.playlists)for(let _=0;_<c.playlists.length;_++)e.id===c.playlists[_].id&&(c.playlists[_]=l)}),s},Oy=(r,e)=>{const i=r.segments||[],s=i[i.length-1],o=s&&s.parts&&s.parts[s.parts.length-1],l=o&&o.duration||s&&s.duration;return e&&l?l*1e3:(r.partTargetDuration||r.targetDuration||10)*500},$S=(r,e,i)=>{if(!r)return;const s=[];return r.forEach(o=>{if(!o.attributes)return;const{BANDWIDTH:l,RESOLUTION:c,CODECS:f}=o.attributes;s.push({id:o.id,bandwidth:l,resolution:c,codecs:f})}),{type:e,isLive:i,renditions:s}};class Eu extends D8{constructor(e,i,s={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=us("PlaylistLoader");const{withCredentials:o=!1}=s;this.src=e,this.vhs_=i,this.withCredentials=o,this.addDateRangesToTextTrack_=s.addDateRangesToTextTrack;const l=i.options_;this.customTagParsers=l&&l.customTagParsers||[],this.customTagMappers=l&&l.customTagMappers||[],this.llhls=l&&l.llhls,this.dateRangesStorage_=new BS,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=Cn(this.main.uri,e.uri);this.llhls&&(i=O8(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(s,o)=>{if(this.request){if(s)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,s){const{uri:o,id:l}=i;this.request=null,s&&(this.state=s),this.error={playlist:this.main.playlists[l],status:e.status,message:`HLS playlist request error at URL: ${o}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Ho({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const s=x8({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!s.playlists||!s.playlists.length||this.excludeAudioOnlyVariants(s.playlists),s}catch(s){this.error=s,this.error.metadata={errorType:H.Error.StreamingHlsPlaylistParserError,error:s}}}excludeAudioOnlyVariants(e){const i=s=>{const o=s.attributes||{},{width:l,height:c}=o.RESOLUTION||{};if(l&&c)return!0;const f=qS(s)||[];return!!Id(f).video};e.some(i)&&e.forEach(s=>{i(s)||(s.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:s,id:o}){this.request=null,this.state="HAVE_METADATA";const l={playlistInfo:{type:"media",uri:s}};this.trigger({type:"playlistparsestart",metadata:l});const c=i||this.parseManifest_({url:s,manifestString:e});c.lastRequest=Date.now(),PS({playlist:c,uri:s,id:o});const f=Dy(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_(Oy(this.media(),!!f)),l.parsedPlaylist=$S(this.main.playlists,l.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:l}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),U.clearTimeout(this.mediaUpdateTimeout),U.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new BS,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(U.clearTimeout(this.finalRenditionTimeout),i){const f=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=U.setTimeout(this.media.bind(this,e,!1),f);return}const s=this.state,o=!this.media_||e.id!==this.media_.id,l=this.main.playlists[e.id];if(l&&l.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"),s==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Oy(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,p)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ip(e.resolvedUri,p),f)return this.playlistRequestError(this.request,e,s);this.trigger({type:"playlistrequestcomplete",metadata:c}),this.haveMetadata({playlistString:p.responseText,url:e.uri,id:e.id}),s==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(U.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&&(U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const s=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=U.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},s);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=U.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=U.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,s)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:s.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:s.responseText,code:2,metadata:Ho({requestType:s.requestType,request:s,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Ip(this.src,s),this.trigger({type:"playlistparsestart",metadata:e});const o=this.parseManifest_({manifestString:s.responseText,url:this.src});e.parsedPlaylist=$S(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,NS(this.main,this.srcUri()),e.playlists.forEach(s=>{s.segments=zS(s),s.segments.forEach(o=>{HS(o,s.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||U.location.href;this.main=w8(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const s=this.main,o=e.ID;let l=s.playlists.length;for(;l--;){const c=s.playlists[l];if(c.attributes["PATHWAY-ID"]===o){const f=c.resolvedUri,p=c.id;if(i){const b=this.createCloneURI_(c.resolvedUri,e),_=Su(o,b),x=this.createCloneAttributes_(o,c.attributes),w=this.createClonePlaylist_(c,_,e,x);s.playlists[l]=w,s.playlists[_]=w,s.playlists[b]=w}else s.playlists.splice(l,1);delete s.playlists[p],delete s.playlists[f]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const s=this.main,o=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(l=>{if(!(!s.mediaGroups[l]||!s.mediaGroups[l][o])){for(const c in s.mediaGroups[l])if(c===o){for(const f in s.mediaGroups[l][c])s.mediaGroups[l][c][f].playlists.forEach((b,_)=>{const x=s.playlists[b.id],w=x.id,D=x.resolvedUri;delete s.playlists[w],delete s.playlists[D]});delete s.mediaGroups[l][c]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const s=this.main,o=s.playlists.length,l=this.createCloneURI_(i.resolvedUri,e),c=Su(e.ID,l),f=this.createCloneAttributes_(e.ID,i.attributes),p=this.createClonePlaylist_(i,c,e,f);s.playlists[o]=p,s.playlists[c]=p,s.playlists[l]=p,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,s=e["BASE-ID"],o=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(l=>{if(!(!o.mediaGroups[l]||o.mediaGroups[l][i]))for(const c in o.mediaGroups[l]){if(c===s)o.mediaGroups[l][i]={};else continue;for(const f in o.mediaGroups[l][c]){const p=o.mediaGroups[l][c][f];o.mediaGroups[l][i][f]=ei({},p);const b=o.mediaGroups[l][i][f],_=this.createCloneURI_(p.resolvedUri,e);b.resolvedUri=_,b.uri=_,b.playlists=[],p.playlists.forEach((x,w)=>{const D=o.playlists[x.id],M=IS(l,i,f),A=Su(i,M);if(D&&!o.playlists[A]){const q=this.createClonePlaylist_(D,A,e),N=q.resolvedUri;o.playlists[A]=q,o.playlists[N]=q}b.playlists[w]=this.createClonePlaylist_(x,A,e)})}}})}createClonePlaylist_(e,i,s,o){const l=this.createCloneURI_(e.resolvedUri,s),c={resolvedUri:l,uri:l,id:i};return e.segments&&(c.segments=[]),o&&(c.attributes=o),wt(e,c)}createCloneURI_(e,i){const s=new URL(e);s.hostname=i["URI-REPLACEMENT"].HOST;const o=i["URI-REPLACEMENT"].PARAMS;for(const l of Object.keys(o))s.searchParams.set(l,o[l]);return s.href}createCloneAttributes_(e,i){const s={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{i[o]&&(s[o]=e)}),s}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const s in e.contentProtection){const o=e.contentProtection[s].attributes.keyId;o&&i.add(o.toLowerCase())}return i}}}const Ry=function(r,e,i,s){const o=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&o&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=o.byteLength||o.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),i.headers&&(r.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(o||r.responseText)))),s(e,r)},L8=(r,e)=>{if(!r||!r.size)return;let i=e;return r.forEach(s=>{i=s(i)}),i},I8=(r,e,i,s)=>{!r||!r.size||r.forEach(o=>{o(e,i,s)})},GS=function(){const r=function e(i,s){i=wt({timeout:45e3},i);const o=e.beforeRequest||H.Vhs.xhr.beforeRequest,l=e._requestCallbackSet||H.Vhs.xhr._requestCallbackSet||new Set,c=e._responseCallbackSet||H.Vhs.xhr._responseCallbackSet;o&&typeof o=="function"&&(H.log.warn("beforeRequest is deprecated, use onRequest instead."),l.add(o));const f=H.Vhs.xhr.original===!0?H.xhr:H.Vhs.xhr,p=L8(l,i);l.delete(o);const b=f(p||i,function(x,w){return I8(c,b,x,w),Ry(b,x,w,s)}),_=b.abort;return b.abort=function(){return b.aborted=!0,_.apply(b,arguments)},b.uri=i.uri,b.requestType=i.requestType,b.requestTime=Date.now(),b};return r.original=!0,r},P8=function(r){let e;const i=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=U.BigInt(r.offset)+U.BigInt(r.length)-U.BigInt(1):e=r.offset+r.length-1,"bytes="+i+"-"+e},My=function(r){const e={};return r.byterange&&(e.Range=P8(r.byterange)),e},N8=function(r,e){return r.start(e)+"-"+r.end(e)},B8=function(r,e){const i=r.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},U8=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},YS=function(r){const e={};return Object.keys(r).forEach(i=>{const s=r[i];y1(s)?e[i]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:e[i]=s}),e},Bp=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},XS=function(r){return r.resolvedUri},WS=r=>{const e=Array.prototype.slice.call(r),i=16;let s="",o,l;for(let c=0;c<e.length/i;c++)o=e.slice(c*i,c*i+i).map(B8).join(""),l=e.slice(c*i,c*i+i).map(U8).join(""),s+=o+" "+l+`
|
||
`;return s};var q8=Object.freeze({__proto__:null,createTransferableMessage:YS,initSegmentId:Bp,segmentKeyId:XS,hexDump:WS,tagDump:({bytes:r})=>WS(r),textRanges:r=>{let e="",i;for(i=0;i<r.length;i++)e+=N8(r,i)+" ";return e}});const QS=.25,F8=(r,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,o=e.videoTimingInfo.transmuxedPresentationStart+i,l=r-o;return new Date(e.dateTimeObject.getTime()+l*1e3)},j8=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,H8=(r,e)=>{let i;try{i=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let s=e.segments[0];if(i<new Date(s.dateTimeObject))return null;for(let p=0;p<e.segments.length-1;p++){s=e.segments[p];const b=new Date(e.segments[p+1].dateTimeObject);if(i<b)break}const o=e.segments[e.segments.length-1],l=o.dateTimeObject,c=o.videoTimingInfo?j8(o.videoTimingInfo):o.duration+o.duration*QS,f=new Date(l.getTime()+c*1e3);return i>f?null:(i>new Date(l)&&(s=o),{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:wn.duration(e,e.mediaSequence+e.segments.indexOf(s)),type:s.videoTimingInfo?"accurate":"estimate"})},z8=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,s;for(let l=0;l<e.segments.length&&(s=e.segments[l],i=s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationEnd:i+s.duration,!(r<=i));l++);const o=e.segments[e.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>i){if(r>i+o.duration*QS)return null;s=o}return{segment:s,estimatedStart:s.videoTimingInfo?s.videoTimingInfo.transmuxedPresentationStart:i-s.duration,type:s.videoTimingInfo?"accurate":"estimate"}},V8=(r,e)=>{let i,s;try{i=new Date(r),s=new Date(e)}catch{}const o=i.getTime();return(s.getTime()-o)/1e3},$8=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},G8=({playlist:r,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const s=z8(e,r);if(!s)return i({message:"valid programTime was not found"});if(s.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});const o={mediaSeconds:e},l=F8(e,s.segment);return l&&(o.programDateTime=l.toISOString()),i(null,o)},KS=({programTime:r,playlist:e,retryCount:i=2,seekTo:s,pauseAfterSeek:o=!0,tech:l,callback:c})=>{if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!$8(e))return c({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const f=H8(r,e);if(!f)return c({message:`${r} was not found in the stream`});const p=f.segment,b=V8(p.dateTimeObject,r);if(f.type==="estimate"){if(i===0)return c({message:`${r} is not buffered yet. Try again`});s(f.estimatedStart+b),l.one("seeked",()=>{KS({programTime:r,playlist:e,retryCount:i-1,seekTo:s,pauseAfterSeek:o,tech:l,callback:c})});return}const _=p.start+b,x=()=>c(null,l.currentTime());l.one("seeked",x),o&&l.pause(),s(_)},Ly=(r,e)=>{if(r.readyState===4)return e()},Y8=(r,e,i,s)=>{let o=[],l,c=!1;const f=function(x,w,D,M){return w.abort(),c=!0,i(x,w,D,M)},p=function(x,w){if(c)return;if(x)return x.metadata=Ho({requestType:s,request:w,error:x}),f(x,w,"",o);const D=w.responseText.substring(o&&o.byteLength||0,w.responseText.length);if(o=i4(o,v1(D,!0)),l=l||vd(o),o.length<10||l&&o.length<l+2)return Ly(w,()=>f(x,w,"",o));const M=S0(o);return M==="ts"&&o.length<188?Ly(w,()=>f(x,w,"",o)):!M&&o.length<376?Ly(w,()=>f(x,w,"",o)):f(null,w,M,o)},_=e({uri:r,beforeSend(x){x.overrideMimeType("text/plain; charset=x-user-defined"),x.addEventListener("progress",function({total:w,loaded:D}){return Ry(x,null,{statusCode:x.status},p)})}},function(x,w){return Ry(_,x,w,p)});return _},{EventTarget:X8}=H,ZS=function(r,e){if(!VS(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let i=0;i<r.segments.length;i++){const s=r.segments[i],o=e.segments[i];if(s.uri!==o.uri)return!1;if(!s.byterange&&!o.byterange)continue;const l=s.byterange,c=o.byterange;if(l&&!c||!l&&c||l.offset!==c.offset||l.length!==c.length)return!1}return!0},W8=(r,e,i,s)=>{const o=s.attributes.NAME||i;return`placeholder-uri-${r}-${e}-${o}`},Q8=({mainXml:r,srcUrl:e,clientOffset:i,sidxMapping:s,previousManifest:o})=>{const l=x3(r,{manifestUri:e,clientOffset:i,sidxMapping:s,previousManifest:o});return NS(l,e,W8),l},K8=(r,e)=>{xu(r,(i,s,o,l)=>{(!e.mediaGroups[s][o]||!(l in e.mediaGroups[s][o]))&&delete r.mediaGroups[s][o][l]})},Z8=(r,e,i)=>{let s=!0,o=wt(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let l=0;l<e.playlists.length;l++){const c=e.playlists[l];if(c.sidx){const p=Xf(c.sidx);i&&i[p]&&i[p].sidx&&g0(c,i[p].sidx,c.sidx.resolvedUri)}const f=Dy(o,c,ZS);f&&(o=f,s=!1)}return xu(e,(l,c,f,p)=>{if(l.playlists&&l.playlists.length){const b=l.playlists[0].id,_=Dy(o,l.playlists[0],ZS);_&&(o=_,p in o.mediaGroups[c][f]||(o.mediaGroups[c][f][p]=l),o.mediaGroups[c][f][p].playlists[0]=o.playlists[b],s=!1)}}),K8(o,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(s=!1),s?null:o},J8=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,JS=(r,e)=>{const i={};for(const s in r){const l=r[s].sidx;if(l){const c=Xf(l);if(!e[c])break;const f=e[c].sidxInfo;J8(f,l)&&(i[c]=e[c])}}return i},e5=(r,e)=>{let s=JS(r.playlists,e);return xu(r,(o,l,c,f)=>{if(o.playlists&&o.playlists.length){const p=o.playlists;s=wt(s,JS(p,e))}}),s};class Iy extends X8{constructor(e,i,s={},o){super(),this.isPaused_=!0,this.mainPlaylistLoader_=o||this,o||(this.isMain_=!0);const{withCredentials:l=!1}=s;if(this.vhs_=i,this.withCredentials=l,this.addMetadataToTextTrack=s.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_=us("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,s){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},s&&(this.state=s),this.trigger("error"),!0}addSidxSegments_(e,i,s){const o=e.sidx&&Xf(e.sidx);if(!e.sidx||!o||this.mainPlaylistLoader_.sidxMapping_[o]){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=U.setTimeout(()=>s(!1),0);return}const l=Ip(e.sidx.resolvedUri),c=(p,b)=>{if(this.requestErrored_(p,b,i))return;const _=this.mainPlaylistLoader_.sidxMapping_,{requestType:x}=b;let w;try{w=D3(We(b.response).subarray(8))}catch(D){D.metadata=Ho({requestType:x,request:b,parseFailure:!0}),this.requestErrored_(D,b,i);return}return _[o]={sidxInfo:e.sidx,sidx:w},g0(e,w,e.sidx.resolvedUri),s(!0)},f="dash-sidx";this.request=Y8(l,this.vhs_.xhr,(p,b,_,x)=>{if(p)return c(p,b);if(!_||_!=="mp4"){const M=_||"unknown";return c({status:b.status,message:`Unsupported ${M} container type for sidx segment at URL: ${l}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},b)}const{offset:w,length:D}=e.sidx.byterange;if(x.length>=D+w)return c(p,{response:x.subarray(w,w+D),status:b.status,uri:b.uri});this.request=this.vhs_.xhr({uri:l,responseType:"arraybuffer",requestType:"dash-sidx",headers:My({byterange:e.sidx.byterange})},c)},f)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},U.clearTimeout(this.minimumUpdatePeriodTimeout_),U.clearTimeout(this.mediaRequest_),U.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 s=!this.media_||e.id!==this.media_.id;if(s&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,s&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}s&&(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,U.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(),U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(U.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,U.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const s=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=U.setTimeout(()=>this.load(),s);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_){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=U.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"},(s,o)=>{if(s){const{requestType:c}=o;s.metadata=Ho({requestType:c,request:o,error:s})}if(this.requestErrored_(s,o)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const l=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=Ip(this.mainPlaylistLoader_.srcUrl,o),l){this.handleMain_(),this.syncClientServerClock_(()=>e(o,l));return}return e(o,l)})}syncClientServerClock_(e){const i=E3(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:Cn(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(s,o)=>{if(!this.request)return;if(s){const{requestType:c}=o;return this.error.metadata=Ho({requestType:c,request:o,error:s}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let l;i.method==="HEAD"?!o.responseHeaders||!o.responseHeaders.date?l=this.mainLoaded_:l=Date.parse(o.responseHeaders.date):l=Date.parse(o.responseText),this.mainPlaylistLoader_.clientOffset_=l-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){U.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let s;try{s=Q8({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(l){this.error=l,this.error.metadata={errorType:H.Error.StreamingDashManifestParserError,error:l},this.trigger("error")}e&&(s=Z8(e,s,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=s||e;const o=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(o&&o!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=o),(!e||s&&s.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(s),s){const{duration:l,endList:c}=s,f=[];s.playlists.forEach(b=>{f.push({id:b.id,bandwidth:b.attributes.BANDWIDTH,resolution:b.attributes.RESOLUTION,codecs:b.attributes.CODECS})});const p={duration:l,isLive:!c,renditions:f};i.parsedManifest=p,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!s}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(U.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_=U.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_=e5(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,s=>{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,s=!this.media_||this.media_!==i[e];if(s?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const o=()=>{this.media().endList||(this.mediaUpdateTimeout=U.setTimeout(()=>{this.trigger("mediaupdatetimeout"),o()},Oy(this.media(),!!s)))};o()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(s=>({cueTime:s.start,frames:[{data:s.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const s in e.contentProtection){const o=e.contentProtection[s].attributes["cenc:default_KID"];o&&i.add(o.replace(/-/g,"").toLowerCase())}return i}}}var Oi={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 t5=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let i=0;i<r.length;i++)e[i]=r.charCodeAt(i);return e.buffer},ex=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},i5=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(r),URL.createObjectURL(i.getBlob())}},tx=function(r){return function(){const e=i5(r),i=ex(new Worker(e));i.objURL=e;const s=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),s.call(this)},i}},ix=function(r){return`var browserWorkerPolyFill = ${ex.toString()};
|
||
browserWorkerPolyFill(self);
|
||
`+r},nx=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},n5=ix(nx(function(){var r=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,T,E;if(y=h[g],!!y)if(arguments.length===2)for(T=y.length,v=0;v<T;++v)y[v].call(this,arguments[1]);else{for(E=[],v=arguments.length,v=1;v<arguments.length;++v)E.push(arguments[v]);for(T=y.length,v=0;v<T;++v)y[v].apply(this,E)}},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,s=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)*s+g.getUint32(4)},l={getUint64:o,MAX_UINT32:s},c=l.MAX_UINT32,f,p,b,_,x,w,D,M,A,q,N,G,$,X,W,oe,K,pe,ye,_e,de,le,Z,fe,Ee,J,ve,ge,Ue,te,Me,Ae,ze,Xe,qe,Pe;(function(){var h;if(Z={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 Z)Z.hasOwnProperty(h)&&(Z[h]=[h.charCodeAt(0),h.charCodeAt(1),h.charCodeAt(2),h.charCodeAt(3)]);fe=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),J=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ee=new Uint8Array([0,0,0,1]),ve=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]),ge=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]),Ue={video:ve,audio:ge},Ae=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Me=new Uint8Array([0,0,0,0,0,0,0,0]),ze=new Uint8Array([0,0,0,0,0,0,0,0]),Xe=ze,qe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Pe=ze,te=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),f=function(h){var g=[],y=0,v,T,E;for(v=1;v<arguments.length;v++)g.push(arguments[v]);for(v=g.length;v--;)y+=g[v].byteLength;for(T=new Uint8Array(y+8),E=new DataView(T.buffer,T.byteOffset,T.byteLength),E.setUint32(0,T.byteLength),T.set(h,4),v=0,y=8;v<g.length;v++)T.set(g[v],y),y+=g[v].byteLength;return T},p=function(){return f(Z.dinf,f(Z.dref,Ae))},b=function(h){return f(Z.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]))},_=function(){return f(Z.ftyp,fe,Ee,fe,J)},oe=function(h){return f(Z.hdlr,Ue[h])},x=function(h){return f(Z.mdat,h)},W=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(Z.mdhd,g)},X=function(h){return f(Z.mdia,W(h),oe(h.type),D(h))},w=function(h){return f(Z.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},D=function(h){return f(Z.minf,h.type==="video"?f(Z.vmhd,te):f(Z.smhd,Me),p(),pe(h))},M=function(h,g){for(var y=[],v=g.length;v--;)y[v]=_e(g[v]);return f.apply(null,[Z.moof,w(h)].concat(y))},A=function(h){for(var g=h.length,y=[];g--;)y[g]=G(h[g]);return f.apply(null,[Z.moov,N(4294967295)].concat(y).concat(q(h)))},q=function(h){for(var g=h.length,y=[];g--;)y[g]=de(h[g]);return f.apply(null,[Z.mvex].concat(y))},N=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(Z.mvhd,g)},K=function(h){var g=h.samples||[],y=new Uint8Array(4+g.length),v,T;for(T=0;T<g.length;T++)v=g[T].flags,y[T+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return f(Z.sdtp,y)},pe=function(h){return f(Z.stbl,ye(h),f(Z.stts,Pe),f(Z.stsc,Xe),f(Z.stsz,qe),f(Z.stco,ze))},function(){var h,g;ye=function(y){return f(Z.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||[],T=y.pps||[],E=[],O=[],L,P;for(L=0;L<v.length;L++)E.push((v[L].byteLength&65280)>>>8),E.push(v[L].byteLength&255),E=E.concat(Array.prototype.slice.call(v[L]));for(L=0;L<T.length;L++)O.push((T[L].byteLength&65280)>>>8),O.push(T[L].byteLength&255),O=O.concat(Array.prototype.slice.call(T[L]));if(P=[Z.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(Z.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([v.length],E,[T.length],O))),f(Z.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var B=y.sarRatio[0],z=y.sarRatio[1];P.push(f(Z.pasp,new Uint8Array([(B&4278190080)>>24,(B&16711680)>>16,(B&65280)>>8,B&255,(z&4278190080)>>24,(z&16711680)>>16,(z&65280)>>8,z&255])))}return f.apply(null,P)},g=function(y){return f(Z.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))}}(),$=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(Z.tkhd,g)},_e=function(h){var g,y,v,T,E,O,L;return g=f(Z.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])),O=Math.floor(h.baseMediaDecodeTime/c),L=Math.floor(h.baseMediaDecodeTime%c),y=f(Z.tfdt,new Uint8Array([1,0,0,0,O>>>24&255,O>>>16&255,O>>>8&255,O&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255])),E=32+20+8+16+8+8,h.type==="audio"?(v=le(h,E),f(Z.traf,g,y,v)):(T=K(h),v=le(h,T.length+E),f(Z.traf,g,y,v,T))},G=function(h){return h.duration=h.duration||4294967295,f(Z.trak,$(h),X(h))},de=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(Z.trex,g)},function(){var h,g,y;y=function(v,T){var E=0,O=0,L=0,P=0;return v.length&&(v[0].duration!==void 0&&(E=1),v[0].size!==void 0&&(O=2),v[0].flags!==void 0&&(L=4),v[0].compositionTimeOffset!==void 0&&(P=8)),[0,0,E|O|L|P,1,(v.length&4278190080)>>>24,(v.length&16711680)>>>16,(v.length&65280)>>>8,v.length&255,(T&4278190080)>>>24,(T&16711680)>>>16,(T&65280)>>>8,T&255]},g=function(v,T){var E,O,L,P,B,z;for(P=v.samples||[],T+=8+12+16*P.length,L=y(P,T),O=new Uint8Array(L.length+P.length*16),O.set(L),E=L.length,z=0;z<P.length;z++)B=P[z],O[E++]=(B.duration&4278190080)>>>24,O[E++]=(B.duration&16711680)>>>16,O[E++]=(B.duration&65280)>>>8,O[E++]=B.duration&255,O[E++]=(B.size&4278190080)>>>24,O[E++]=(B.size&16711680)>>>16,O[E++]=(B.size&65280)>>>8,O[E++]=B.size&255,O[E++]=B.flags.isLeading<<2|B.flags.dependsOn,O[E++]=B.flags.isDependedOn<<6|B.flags.hasRedundancy<<4|B.flags.paddingValue<<1|B.flags.isNonSyncSample,O[E++]=B.flags.degradationPriority&61440,O[E++]=B.flags.degradationPriority&15,O[E++]=(B.compositionTimeOffset&4278190080)>>>24,O[E++]=(B.compositionTimeOffset&16711680)>>>16,O[E++]=(B.compositionTimeOffset&65280)>>>8,O[E++]=B.compositionTimeOffset&255;return f(Z.trun,O)},h=function(v,T){var E,O,L,P,B,z;for(P=v.samples||[],T+=8+12+8*P.length,L=y(P,T),E=new Uint8Array(L.length+P.length*8),E.set(L),O=L.length,z=0;z<P.length;z++)B=P[z],E[O++]=(B.duration&4278190080)>>>24,E[O++]=(B.duration&16711680)>>>16,E[O++]=(B.duration&65280)>>>8,E[O++]=B.duration&255,E[O++]=(B.size&4278190080)>>>24,E[O++]=(B.size&16711680)>>>16,E[O++]=(B.size&65280)>>>8,E[O++]=B.size&255;return f(Z.trun,E)},le=function(v,T){return v.type==="audio"?h(v,T):g(v,T)}}();var be={ftyp:_,mdat:x,moof:M,moov:A,initSegment:function(h){var g=_(),y=A(h),v;return v=new Uint8Array(g.byteLength+y.byteLength),v.set(g),v.set(y,g.byteLength),v}},Le=function(h){var g,y,v=[],T=[];for(T.byteLength=0,T.nalCount=0,T.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,T.byteLength+=v.byteLength,T.nalCount+=v.length,T.duration+=v.duration,T.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 T.length&&(!v.duration||v.duration<=0)&&(v.duration=T[T.length-1].duration),T.byteLength+=v.byteLength,T.nalCount+=v.length,T.duration+=v.duration,T.push(v),T},ie=function(h){var g,y,v=[],T=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=h[0].pts,v.dts=h[0].dts,T.byteLength=0,T.nalCount=0,T.duration=0,T.pts=h[0].pts,T.dts=h[0].dts,g=0;g<h.length;g++)y=h[g],y.keyFrame?(v.length&&(T.push(v),T.byteLength+=v.byteLength,T.nalCount+=v.nalCount,T.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 T.length&&v.duration<=0&&(v.duration=T[T.length-1].duration),T.byteLength+=v.byteLength,T.nalCount+=v.nalCount,T.duration+=v.duration,T.push(v),T},Te=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},Oe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ye=function(h,g){var y=Oe();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},Ie=function(h,g){var y,v,T,E,O,L=g||0,P=[];for(y=0;y<h.length;y++)for(E=h[y],v=0;v<E.length;v++)O=E[v],T=Ye(O,L),L+=T.size,P.push(T);return P},Ge=function(h){var g,y,v,T,E,O,L=0,P=h.byteLength,B=h.nalCount,z=P+4*B,ne=new Uint8Array(z),ke=new DataView(ne.buffer);for(g=0;g<h.length;g++)for(T=h[g],y=0;y<T.length;y++)for(E=T[y],v=0;v<E.length;v++)O=E[v],ke.setUint32(L,O.data.byteLength),L+=4,ne.set(O.data,L),L+=O.data.byteLength;return ne},Mt=function(h,g){var y,v=g||0,T=[];return y=Ye(h,v),T.push(y),T},Ze=function(h){var g,y,v=0,T=h.byteLength,E=h.length,O=T+4*E,L=new Uint8Array(O),P=new DataView(L.buffer);for(g=0;g<h.length;g++)y=h[g],P.setUint32(v,y.data.byteLength),v+=4,L.set(y.data,v),v+=y.data.byteLength;return L},ii={groupNalsIntoFrames:Le,groupFramesIntoGops:ie,extendFirstKeyFrame:Te,generateSampleTable:Ie,concatenateNalData:Ge,generateSampleTableForFrame:Mt,concatenateNalDataForFrame:Ze},At=[33,16,5,32,164,27],qt=[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},gi=function(h){return Object.keys(h).reduce(function(g,y){return g[y]=new Uint8Array(h[y].reduce(function(v,T){return v.concat(T)},[])),g},{})},Lt,ui=function(){if(!Lt){var h={96e3:[At,[227,64],we(154),[56]],88200:[At,[231],we(170),[56]],64e3:[At,[248,192],we(240),[56]],48e3:[At,[255,192],we(268),[55,148,128],we(54),[112]],44100:[At,[255,192],we(268),[55,163,128],we(84),[112]],32e3:[At,[255,192],we(268),[55,234],we(226),[112]],24e3:[At,[255,192],we(268),[55,255,128],we(268),[111,112],we(126),[224]],16e3:[At,[255,192],we(268),[55,255,128],we(268),[111,255],we(269),[223,108],we(195),[1,192]],12e3:[qt,we(268),[3,127,248],we(268),[6,255,240],we(268),[13,255,224],we(268),[27,253,128],we(259),[56]],11025:[qt,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:[qt,we(268),[3,121,16],we(47),[7]]};Lt=gi(h)}return Lt},Zt=9e4,kt,yi,Vn,An,ja,Yr,Ha;kt=function(h){return h*Zt},yi=function(h,g){return h*g},Vn=function(h){return h/Zt},An=function(h,g){return h/g},ja=function(h,g){return kt(An(h,g))},Yr=function(h,g){return yi(Vn(h),g)},Ha=function(h,g,y){return Vn(y?h:h-g)};var bt={ONE_SECOND_IN_TS:Zt,secondsToVideoTs:kt,secondsToAudioTs:yi,videoTsToSeconds:Vn,audioTsToSeconds:An,audioTsToVideoTs:ja,videoTsToAudioTs:Yr,metadataTsToSeconds:Ha},or=ui,Ji=bt,$n=function(h){var g,y,v=0;for(g=0;g<h.length;g++)y=h[g],v+=y.data.byteLength;return v},lr=function(h,g,y,v){var T,E=0,O=0,L=0,P=0,B,z,ne;if(g.length&&(T=Ji.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),E=Math.ceil(Ji.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&v&&(O=T-Math.max(y,v),L=Math.floor(O/E),P=L*E),!(L<1||P>Ji.ONE_SECOND_IN_TS/2))){for(B=or()[h.samplerate],B||(B=g[0].data),z=0;z<L;z++)ne=g[0],g.splice(0,0,{data:B,dts:ne.dts-E,pts:ne.pts-E});return h.baseMediaDecodeTime-=Math.floor(Ji.videoTsToAudioTs(P,h.samplerate)),P}},k=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}))},Y=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},Ce=function(h){var g,y,v=0,T=new Uint8Array($n(h));for(g=0;g<h.length;g++)y=h[g],T.set(y.data,v),v+=y.data.byteLength;return T},Re={prefixWithSilence:lr,trimAdtsFramesByEarliestDts:k,generateSampleTable:Y,concatenateFrameData:Ce},Ve=bt.ONE_SECOND_IN_TS,ot=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))},tt=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},yt=function(h,g){var y,v,T=h.minSegmentDts;return g||(T-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=T,y=Math.max(0,y),h.type==="audio"&&(v=h.samplerate/Ve,y*=v,y=Math.floor(y)),y},it={clearDtsInfo:tt,calculateTrackBaseMediaDecodeTime:yt,collectDtsInfo:ot},ci=4,Ms=128,qd=function(h){for(var g=0,y={payloadType:-1,payloadSize:0},v=0,T=0;g<h.byteLength&&h[g]!==Ms;){for(;h[g]===255;)v+=255,g++;for(v+=h[g++];h[g]===255;)T+=255,g++;if(T+=h[g++],!y.payload&&v===ci){var E=String.fromCharCode(h[g+3],h[g+4],h[g+5],h[g+6]);if(E==="GA94"){y.payloadType=v,y.payloadSize=T,y.payload=h.subarray(g,g+T);break}else y.payload=void 0}g+=T,v=0,T=0}return y},Fd=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)},kn=function(h,g){var y=[],v,T,E,O;if(!(g[0]&64))return y;for(T=g[0]&31,v=0;v<T;v++)E=v*3,O={type:g[E+2]&3,pts:h},g[E+2]&4&&(O.ccData=g[E+3]<<8|g[E+4],y.push(O));return y},jd=function(h){for(var g=h.byteLength,y=[],v=1,T,E;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;T=g-y.length,E=new Uint8Array(T);var O=0;for(v=0;v<T;O++,v++)O===y[0]&&(O++,y.shift()),E[v]=h[O];return E},Hd={parseSei:qd,parseUserData:Fd,parseCaptionPackets:kn,discardEmulationPreventionBytes:jd,USER_DATA_REGISTERED_ITU_T_T35:ci},zd=i,Vo=Hd,Bi=function(h){h=h||{},Bi.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Ft(0,0),new Ft(0,1),new Ft(1,0),new Ft(1,1)],this.parse708captions_&&(this.cc708Stream_=new Dt({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")))};Bi.prototype=new zd,Bi.prototype.push=function(h){var g,y,v;if(h.nalUnitType==="sei_rbsp"&&(g=Vo.parseSei(h.escapedRBSP),!!g.payload&&g.payloadType===Vo.USER_DATA_REGISTERED_ITU_T_T35&&(y=Vo.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=Vo.parseCaptionPackets(h.pts,y),this.captionPackets_=this.captionPackets_.concat(v),this.latestDts_!==h.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=h.dts}},Bi.prototype.flushCCStreams=function(h){this.ccStreams_.forEach(function(g){return h==="flush"?g.flush():g.partialFlush()},this)},Bi.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)},Bi.prototype.flush=function(){return this.flushStream("flush")},Bi.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Bi.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(h){h.reset()})},Bi.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)},Bi.prototype.setsChannel1Active=function(h){return(h.ccData&30720)===4096},Bi.prototype.setsChannel2Active=function(h){return(h.ccData&30720)===6144},Bi.prototype.setsTextOrXDSActive=function(h){return(h.ccData&28928)===256||(h.ccData&30974)===4138||(h.ccData&30974)===6186},Bi.prototype.dispatchCea708Packet=function(h){this.parse708captions_&&this.cc708Stream_.push(h)};var Ou={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},Jy=function(h){var g=Ou[h]||h;return h&4096&&h===g?"":String.fromCharCode(g)},He=function(h){return 32<=h&&h<=127||160<=h&&h<=255},Gn=function(h){this.windowNum=h,this.reset()};Gn.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},Gn.prototype.getText=function(){return this.rows.join(`
|
||
`)},Gn.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Gn.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--},Gn.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Gn.prototype.addText=function(h){this.rows[this.rowIdx]+=h},Gn.prototype.backspace=function(){if(!this.isEmpty()){var h=this.rows[this.rowIdx];this.rows[this.rowIdx]=h.substr(0,h.length-1)}};var Ui=function(h,g,y){this.serviceNum=h,this.text="",this.currentWindow=new Gn(-1),this.windows=[],this.stream=y,typeof g=="string"&&this.createTextDecoder(g)};Ui.prototype.init=function(h,g){this.startPts=h;for(var y=0;y<8;y++)this.windows[y]=new Gn(y),typeof g=="function"&&(this.windows[y].beforeRowOverflow=g)},Ui.prototype.setCurrentWindow=function(h){this.currentWindow=this.windows[h]},Ui.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 Dt=function(h){h=h||{},Dt.prototype.init.call(this);var g=this,y=h.captionServices||{},v={},T;Object.keys(y).forEach(E=>{T=y[E],/^SERVICE/.test(E)&&(v[E]=T.encoding)}),this.serviceEncodings=v,this.current708Packet=null,this.services={},this.push=function(E){E.type===3?(g.new708Packet(),g.add708Bytes(E)):(g.current708Packet===null&&g.new708Packet(),g.add708Bytes(E))}};Dt.prototype=new zd,Dt.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Dt.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)},Dt.prototype.push708Packet=function(){var h=this.current708Packet,g=h.data,y=null,v=null,T=0,E=g[T++];for(h.seq=E>>6,h.sizeCode=E&63;T<g.length;T++)E=g[T++],y=E>>5,v=E&31,y===7&&v>0&&(E=g[T++],y=E),this.pushServiceBlock(y,T,v),v>0&&(T+=v-1)},Dt.prototype.pushServiceBlock=function(h,g,y){var v,T=g,E=this.current708Packet.data,O=this.services[h];for(O||(O=this.initService(h,T));T<g+y&&T<E.length;T++)v=E[T],He(v)?T=this.handleText(T,O):v===24?T=this.multiByteCharacter(T,O):v===16?T=this.extendedCommands(T,O):128<=v&&v<=135?T=this.setCurrentWindow(T,O):152<=v&&v<=159?T=this.defineWindow(T,O):v===136?T=this.clearWindows(T,O):v===140?T=this.deleteWindows(T,O):v===137?T=this.displayWindows(T,O):v===138?T=this.hideWindows(T,O):v===139?T=this.toggleWindows(T,O):v===151?T=this.setWindowAttributes(T,O):v===144?T=this.setPenAttributes(T,O):v===145?T=this.setPenColor(T,O):v===146?T=this.setPenLocation(T,O):v===143?O=this.reset(T,O):v===8?O.currentWindow.backspace():v===12?O.currentWindow.clearText():v===13?O.currentWindow.pendingNewLine=!0:v===14?O.currentWindow.clearText():v===141&&T++},Dt.prototype.extendedCommands=function(h,g){var y=this.current708Packet.data,v=y[++h];return He(v)&&(h=this.handleText(h,g,{isExtended:!0})),h},Dt.prototype.getPts=function(h){return this.current708Packet.ptsVals[Math.floor(h/2)]},Dt.prototype.initService=function(h,g){var v="SERVICE"+h,y=this,v,T;return v in this.serviceEncodings&&(T=this.serviceEncodings[v]),this.services[h]=new Ui(h,T,y),this.services[h].init(this.getPts(g),function(E){y.flushDisplayed(E,y.services[h])}),this.services[h]},Dt.prototype.handleText=function(h,g,y){var v=y&&y.isExtended,T=y&&y.isMultiByte,E=this.current708Packet.data,O=v?4096:0,L=E[h],P=E[h+1],B=g.currentWindow,z,ne;function ke(he){return he.map($e=>("0"+($e&255).toString(16)).slice(-2)).join("")}if(T?(ne=[L,P],h++):ne=[L],g.textDecoder_&&!v)z=g.textDecoder_.decode(new Uint8Array(ne));else if(T){const he=ke(ne);z=String.fromCharCode(parseInt(he,16))}else z=Jy(O|L);return B.pendingNewLine&&!B.isEmpty()&&B.newLine(this.getPts(h)),B.pendingNewLine=!1,B.addText(z),h},Dt.prototype.multiByteCharacter=function(h,g){var y=this.current708Packet.data,v=y[h+1],T=y[h+2];return He(v)&&He(T)&&(h=this.handleText(++h,g,{isMultiByte:!0})),h},Dt.prototype.setCurrentWindow=function(h,g){var y=this.current708Packet.data,v=y[h],T=v&7;return g.setCurrentWindow(T),h},Dt.prototype.defineWindow=function(h,g){var y=this.current708Packet.data,v=y[h],T=v&7;g.setCurrentWindow(T);var E=g.currentWindow;return v=y[++h],E.visible=(v&32)>>5,E.rowLock=(v&16)>>4,E.columnLock=(v&8)>>3,E.priority=v&7,v=y[++h],E.relativePositioning=(v&128)>>7,E.anchorVertical=v&127,v=y[++h],E.anchorHorizontal=v,v=y[++h],E.anchorPoint=(v&240)>>4,E.rowCount=v&15,v=y[++h],E.columnCount=v&63,v=y[++h],E.windowStyle=(v&56)>>3,E.penStyle=v&7,E.virtualRowCount=E.rowCount+1,h},Dt.prototype.setWindowAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],T=g.currentWindow.winAttr;return v=y[++h],T.fillOpacity=(v&192)>>6,T.fillRed=(v&48)>>4,T.fillGreen=(v&12)>>2,T.fillBlue=v&3,v=y[++h],T.borderType=(v&192)>>6,T.borderRed=(v&48)>>4,T.borderGreen=(v&12)>>2,T.borderBlue=v&3,v=y[++h],T.borderType+=(v&128)>>5,T.wordWrap=(v&64)>>6,T.printDirection=(v&48)>>4,T.scrollDirection=(v&12)>>2,T.justify=v&3,v=y[++h],T.effectSpeed=(v&240)>>4,T.effectDirection=(v&12)>>2,T.displayEffect=v&3,h},Dt.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},Dt.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)},Dt.prototype.displayWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],T=this.getPts(h);this.flushDisplayed(T,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible=1);return h},Dt.prototype.hideWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],T=this.getPts(h);this.flushDisplayed(T,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible=0);return h},Dt.prototype.toggleWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],T=this.getPts(h);this.flushDisplayed(T,g);for(var E=0;E<8;E++)v&1<<E&&(g.windows[E].visible^=1);return h},Dt.prototype.clearWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],T=this.getPts(h);this.flushDisplayed(T,g);for(var E=0;E<8;E++)v&1<<E&&g.windows[E].clearText();return h},Dt.prototype.deleteWindows=function(h,g){var y=this.current708Packet.data,v=y[++h],T=this.getPts(h);this.flushDisplayed(T,g);for(var E=0;E<8;E++)v&1<<E&&g.windows[E].reset();return h},Dt.prototype.setPenAttributes=function(h,g){var y=this.current708Packet.data,v=y[h],T=g.currentWindow.penAttr;return v=y[++h],T.textTag=(v&240)>>4,T.offset=(v&12)>>2,T.penSize=v&3,v=y[++h],T.italics=(v&128)>>7,T.underline=(v&64)>>6,T.edgeType=(v&56)>>3,T.fontStyle=v&7,h},Dt.prototype.setPenColor=function(h,g){var y=this.current708Packet.data,v=y[h],T=g.currentWindow.penColor;return v=y[++h],T.fgOpacity=(v&192)>>6,T.fgRed=(v&48)>>4,T.fgGreen=(v&12)>>2,T.fgBlue=v&3,v=y[++h],T.bgOpacity=(v&192)>>6,T.bgRed=(v&48)>>4,T.bgGreen=(v&12)>>2,T.bgBlue=v&3,v=y[++h],T.edgeRed=(v&48)>>4,T.edgeGreen=(v&12)>>2,T.edgeBlue=v&3,h},Dt.prototype.setPenLocation=function(h,g){var y=this.current708Packet.data,v=y[h],T=g.currentWindow.penLoc;return g.currentWindow.pendingNewLine=!0,v=y[++h],T.row=v&15,v=y[++h],T.column=v&63,h},Dt.prototype.reset=function(h,g){var y=this.getPts(h);return this.flushDisplayed(y,g),this.initService(g.serviceNum,h)};var ev={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},Xr=function(h){return h===null?"":(h=ev[h]||h,String.fromCharCode(h))},$o=14,Ru=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],vi=function(){for(var h=[],g=$o+1;g--;)h.push({text:"",indent:0,offset:0});return h},Ft=function(h,g){Ft.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,T,E,O,L;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),E=v>>>8,O=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),T=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=T,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_=vi();else if(v===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=vi();else if(v===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=vi()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(E,O))E=(E&3)<<8,L=Xr(E|O),this[this.mode_](y.pts,L),this.column_++;else if(this.isExtCharacter(E,O))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),E=(E&3)<<8,L=Xr(E|O),this[this.mode_](y.pts,L),this.column_++;else if(this.isMidRowCode(E,O))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(O&14)===14&&this.addFormatting(y.pts,["i"]),(O&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(E,O)){const B=O&3;this.nonDisplayed_[this.row_].offset=B,this.column_+=B}else if(this.isPAC(E,O)){var P=Ru.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),O&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(v&16)===16){const B=(v&14)>>1;this.column_=B*4,this.nonDisplayed_[this.row_].indent+=B}this.isColorPAC(O)&&(O&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(E)&&(O===0&&(O=null),L=Xr(E),L+=Xr(O),this[this.mode_](y.pts,L),this.column_+=L.length)}};Ft.prototype=new zd,Ft.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,T)=>{if(v&&v.text&&v.text.length){try{v.text=v.text.trim()}catch{g(T)}v.text.length&&y.push({text:v.text,line:T+1,position:10+Math.min(70,v.indent*10)+v.offset*2.5})}else v==null&&g(T)}),y.length&&this.trigger("data",{startPts:this.startPts_,endPts:h,content:y,stream:this.name_})},Ft.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=vi(),this.nonDisplayed_=vi(),this.lastControlCode_=null,this.column_=0,this.row_=$o,this.rollUpRows_=2,this.formatting_=[]},Ft.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},Ft.prototype.isSpecialCharacter=function(h,g){return h===this.EXT_&&g>=48&&g<=63},Ft.prototype.isExtCharacter=function(h,g){return(h===this.EXT_+1||h===this.EXT_+2)&&g>=32&&g<=63},Ft.prototype.isMidRowCode=function(h,g){return h===this.EXT_&&g>=32&&g<=47},Ft.prototype.isOffsetControlCode=function(h,g){return h===this.OFFSET_&&g>=33&&g<=35},Ft.prototype.isPAC=function(h,g){return h>=this.BASE_&&h<this.BASE_+8&&g>=64&&g<=127},Ft.prototype.isColorPAC=function(h){return h>=64&&h<=79||h>=96&&h<=127},Ft.prototype.isNormalChar=function(h){return h>=32&&h<=127},Ft.prototype.setRollUp=function(h,g){if(this.mode_!=="rollUp"&&(this.row_=$o,this.mode_="rollUp",this.flushDisplayed(h),this.nonDisplayed_=vi(),this.displayed_=vi()),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},Ft.prototype.addFormatting=function(h,g){this.formatting_=this.formatting_.concat(g);var y=g.reduce(function(v,T){return v+"<"+T+">"},"");this[this.mode_](h,y)},Ft.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)}},Ft.prototype.popOn=function(h,g){var y=this.nonDisplayed_[this.row_].text;y+=g,this.nonDisplayed_[this.row_].text=y},Ft.prototype.rollUp=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y},Ft.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<$o+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}},Ft.prototype.paintOn=function(h,g){var y=this.displayed_[this.row_].text;y+=g,this.displayed_[this.row_].text=y};var Mu={CaptionStream:Bi,Cea608Stream:Ft,Cea708Stream:Dt},Go={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Vd=i,$p=8589934592,Gp=4294967296,Wr="shared",Lu=function(h,g){var y=1;for(h>g&&(y=-1);Math.abs(g-h)>Gp;)h+=y*$p;return h},Iu=function(h){var g,y;Iu.prototype.init.call(this),this.type_=h||Wr,this.push=function(v){if(v.type==="metadata"){this.trigger("data",v);return}this.type_!==Wr&&v.type!==this.type_||(y===void 0&&(y=v.dts),v.dts=Lu(v.dts,y),v.pts=Lu(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")}};Iu.prototype=new Vd;var $d={TimestampRolloverStream:Iu,handleRollover:Lu},Yp=(h,g,y)=>{if(!h)return-1;for(var v=y;v<h.length;v++)if(h[v]===g)return v;return-1},Xp={typedArrayIndexOf:Yp},Ri=Xp.typedArrayIndexOf,Ls={Iso88591:0,Utf16:1,Utf16be:2,Utf8:3},ur=function(h,g,y){var v,T="";for(v=g;v<y;v++)T+="%"+("00"+h[v].toString(16)).slice(-2);return T},za=function(h,g,y){return decodeURIComponent(ur(h,g,y))},Is=function(h,g,y){return unescape(ur(h,g,y))},cr=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},Qr={APIC:function(h){var g=1,y,v,T="-->";h.data[0]===Ls.Utf8&&(y=Ri(h.data,0,g),!(y<0)&&(h.mimeType=Is(h.data,g,y),g=y+1,h.pictureType=h.data[g],g++,v=Ri(h.data,0,g),!(v<0)&&(h.description=za(h.data,g,v),g=v+1,h.mimeType===T?h.url=Is(h.data,g,h.data.length):h.pictureData=h.data.subarray(g,h.data.length))))},"T*":function(h){h.data[0]===Ls.Utf8&&(h.value=za(h.data,1,h.data.length).replace(/\0*$/,""),h.values=h.value.split("\0"))},TXXX:function(h){var g;h.data[0]===Ls.Utf8&&(g=Ri(h.data,0,1),g!==-1&&(h.description=za(h.data,1,g),h.value=za(h.data,g+1,h.data.length).replace(/\0*$/,""),h.data=h.value))},"W*":function(h){h.url=Is(h.data,0,h.data.length).replace(/\0.*$/,"")},WXXX:function(h){var g;h.data[0]===Ls.Utf8&&(g=Ri(h.data,0,1),g!==-1&&(h.description=za(h.data,1,g),h.url=Is(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=Is(h.data,0,g);break}h.privateData=h.data.subarray(g+1),h.data=h.privateData}},Yo=function(h){var g,y,v=10,T=0,E=[];if(!(h.length<10||h[0]!=="I".charCodeAt(0)||h[1]!=="D".charCodeAt(0)||h[2]!=="3".charCodeAt(0))){T=cr(h.subarray(6,10)),T+=10;var O=h[5]&64;O&&(v+=4,v+=cr(h.subarray(10,14)),T-=cr(h.subarray(16,20)));do{if(g=cr(h.subarray(v+4,v+8)),g<1)break;y=String.fromCharCode(h[v],h[v+1],h[v+2],h[v+3]);var L={id:y,data:h.subarray(v+10,v+g+10)};L.key=L.id,Qr[L.id]?Qr[L.id](L):L.id[0]==="T"?Qr["T*"](L):L.id[0]==="W"&&Qr["W*"](L),E.push(L),v+=10,v+=g}while(v<T);return E}},Kr={parseId3Frames:Yo,parseSyncSafeInteger:cr,frameParsers:Qr},Gd=i,tv=Go,dr=Kr,Xo;Xo=function(h){var g={descriptor:h&&h.descriptor},y=0,v=[],T=0,E;if(Xo.prototype.init.call(this),this.dispatchType=tv.METADATA_STREAM_TYPE.toString(16),g.descriptor)for(E=0;E<g.descriptor.length;E++)this.dispatchType+=("00"+g.descriptor[E].toString(16)).slice(-2);this.push=function(O){var L,P,B,z,ne,ke;if(O.type==="timed-metadata"){if(O.dataAlignmentIndicator&&(T=0,v.length=0),v.length===0&&(O.data.length<10||O.data[0]!=="I".charCodeAt(0)||O.data[1]!=="D".charCodeAt(0)||O.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(v.push(O),T+=O.data.byteLength,v.length===1&&(y=dr.parseSyncSafeInteger(O.data.subarray(6,10)),y+=10),!(T<y)){for(L={data:new Uint8Array(y),frames:[],pts:v[0].pts,dts:v[0].dts},ne=0;ne<y;)L.data.set(v[0].data.subarray(0,y-ne),ne),ne+=v[0].data.byteLength,T-=v[0].data.byteLength,v.shift();P=10,L.data[5]&64&&(P+=4,P+=dr.parseSyncSafeInteger(L.data.subarray(10,14)),y-=dr.parseSyncSafeInteger(L.data.subarray(16,20)));do{if(B=dr.parseSyncSafeInteger(L.data.subarray(P+4,P+8)),B<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(ke=String.fromCharCode(L.data[P],L.data[P+1],L.data[P+2],L.data[P+3]),z={id:ke,data:L.data.subarray(P+10,P+B+10)},z.key=z.id,dr.frameParsers[z.id]?dr.frameParsers[z.id](z):z.id[0]==="T"?dr.frameParsers["T*"](z):z.id[0]==="W"&&dr.frameParsers["W*"](z),z.owner==="com.apple.streaming.transportStreamTimestamp"){var he=z.data,$e=(he[3]&1)<<30|he[4]<<22|he[5]<<14|he[6]<<6|he[7]>>>2;$e*=4,$e+=he[7]&3,z.timeStamp=$e,L.pts===void 0&&L.dts===void 0&&(L.pts=z.timeStamp,L.dts=z.timeStamp),this.trigger("timestamp",z)}L.frames.push(z),P+=10,P+=B}while(P<y);this.trigger("data",L)}}}},Xo.prototype=new Gd;var Yd=Xo,Wo=i,Pu=Mu,Dn=Go,Wp=$d.TimestampRolloverStream,Nu,Va,$a,Ps=188,Zr=71;Nu=function(){var h=new Uint8Array(Ps),g=0;Nu.prototype.init.call(this),this.push=function(y){var v=0,T=Ps,E;for(g?(E=new Uint8Array(y.byteLength+g),E.set(h.subarray(0,g)),E.set(y,g),g=0):E=y;T<E.byteLength;){if(E[v]===Zr&&E[T]===Zr){this.trigger("data",E.subarray(v,T)),v+=Ps,T+=Ps;continue}v++,T++}v<E.byteLength&&(h.set(E.subarray(v),0),g=E.byteLength-v)},this.flush=function(){g===Ps&&h[0]===Zr&&(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")}},Nu.prototype=new Wo,Va=function(){var h,g,y,v;Va.prototype.init.call(this),v=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(T,E){var O=0;E.payloadUnitStartIndicator&&(O+=T[O]+1),E.type==="pat"?g(T.subarray(O),E):y(T.subarray(O),E)},g=function(T,E){E.section_number=T[7],E.last_section_number=T[8],v.pmtPid=(T[10]&31)<<8|T[11],E.pmtPid=v.pmtPid},y=function(T,E){var O,L,P,B;if(T[5]&1){for(v.programMapTable={video:null,audio:null,"timed-metadata":{}},O=(T[1]&15)<<8|T[2],L=3+O-4,P=(T[10]&15)<<8|T[11],B=12+P;B<L;){var z=T[B],ne=(T[B+1]&31)<<8|T[B+2];z===Dn.H264_STREAM_TYPE&&v.programMapTable.video===null?v.programMapTable.video=ne:z===Dn.ADTS_STREAM_TYPE&&v.programMapTable.audio===null?v.programMapTable.audio=ne:z===Dn.METADATA_STREAM_TYPE&&(v.programMapTable["timed-metadata"][ne]=z),B+=((T[B+3]&15)<<8|T[B+4])+5}E.programMapTable=v.programMapTable}},this.push=function(T){var E={},O=4;if(E.payloadUnitStartIndicator=!!(T[1]&64),E.pid=T[1]&31,E.pid<<=8,E.pid|=T[2],(T[3]&48)>>>4>1&&(O+=T[O]+1),E.pid===0)E.type="pat",h(T.subarray(O),E),this.trigger("data",E);else if(E.pid===this.pmtPid)for(E.type="pmt",h(T.subarray(O),E),this.trigger("data",E);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([T,O,E]):this.processPes_(T,O,E)},this.processPes_=function(T,E,O){O.pid===this.programMapTable.video?O.streamType=Dn.H264_STREAM_TYPE:O.pid===this.programMapTable.audio?O.streamType=Dn.ADTS_STREAM_TYPE:O.streamType=this.programMapTable["timed-metadata"][O.pid],O.type="pes",O.data=T.subarray(E),this.trigger("data",O)}},Va.prototype=new Wo,Va.STREAM_TYPES={h264:27,adts:15},$a=function(){var h=this,g=!1,y={data:[],size:0},v={data:[],size:0},T={data:[],size:0},E,O=function(P,B){var z;const ne=P[0]<<16|P[1]<<8|P[2];B.data=new Uint8Array,ne===1&&(B.packetLength=6+(P[4]<<8|P[5]),B.dataAlignmentIndicator=(P[6]&4)!==0,z=P[7],z&192&&(B.pts=(P[9]&14)<<27|(P[10]&255)<<20|(P[11]&254)<<12|(P[12]&255)<<5|(P[13]&254)>>>3,B.pts*=4,B.pts+=(P[13]&6)>>>1,B.dts=B.pts,z&64&&(B.dts=(P[14]&14)<<27|(P[15]&255)<<20|(P[16]&254)<<12|(P[17]&255)<<5|(P[18]&254)>>>3,B.dts*=4,B.dts+=(P[18]&6)>>>1)),B.data=P.subarray(9+P[8]))},L=function(P,B,z){var ne=new Uint8Array(P.size),ke={type:B},he=0,$e=0,Qe=!1,si;if(!(!P.data.length||P.size<9)){for(ke.trackId=P.data[0].pid,he=0;he<P.data.length;he++)si=P.data[he],ne.set(si.data,$e),$e+=si.data.byteLength;O(ne,ke),Qe=B==="video"||ke.packetLength<=P.size,(z||Qe)&&(P.size=0,P.data.length=0),Qe&&h.trigger("data",ke)}};$a.prototype.init.call(this),this.push=function(P){({pat:function(){},pes:function(){var B,z;switch(P.streamType){case Dn.H264_STREAM_TYPE:B=y,z="video";break;case Dn.ADTS_STREAM_TYPE:B=v,z="audio";break;case Dn.METADATA_STREAM_TYPE:B=T,z="timed-metadata";break;default:return}P.payloadUnitStartIndicator&&L(B,z,!0),B.data.push(P),B.size+=P.data.byteLength},pmt:function(){var B={type:"metadata",tracks:[]};E=P.programMapTable,E.video!==null&&B.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&B.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),g=!0,h.trigger("data",B)}})[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(){L(y,"video"),L(v,"audio"),L(T,"timed-metadata")},this.flush=function(){if(!g&&E){var P={type:"metadata",tracks:[]};E.video!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.video,codec:"avc",type:"video"}),E.audio!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+E.audio,codec:"adts",type:"audio"}),h.trigger("data",P)}g=!1,this.flushStreams_(),this.trigger("done")}},$a.prototype=new Wo;var Qp={PAT_PID:0,MP2T_PACKET_LENGTH:Ps,TransportPacketStream:Nu,TransportParseStream:Va,ElementaryStream:$a,TimestampRolloverStream:Wp,CaptionStream:Pu.CaptionStream,Cea608Stream:Pu.Cea608Stream,Cea708Stream:Pu.Cea708Stream,MetadataStream:Yd};for(var Bu in Dn)Dn.hasOwnProperty(Bu)&&(Qp[Bu]=Dn[Bu]);var Kp=Qp,Qo=i,Zp=bt.ONE_SECOND_IN_TS,Uu,Jp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Uu=function(h){var g,y=0;Uu.prototype.init.call(this),this.skipWarn_=function(v,T){this.trigger("log",{level:"warn",message:`adts skiping bytes ${v} to ${T} in frame ${y} outside syncword`})},this.push=function(v){var T=0,E,O,L,P,B;if(h||(y=0),v.type==="audio"){g&&g.length?(L=g,g=new Uint8Array(L.byteLength+v.data.byteLength),g.set(L),g.set(v.data,L.byteLength)):g=v.data;for(var z;T+7<g.length;){if(g[T]!==255||(g[T+1]&246)!==240){typeof z!="number"&&(z=T),T++;continue}if(typeof z=="number"&&(this.skipWarn_(z,T),z=null),O=(~g[T+1]&1)*2,E=(g[T+3]&3)<<11|g[T+4]<<3|(g[T+5]&224)>>5,P=((g[T+6]&3)+1)*1024,B=P*Zp/Jp[(g[T+2]&60)>>>2],g.byteLength-T<E)break;this.trigger("data",{pts:v.pts+y*B,dts:v.dts+y*B,sampleCount:P,audioobjecttype:(g[T+2]>>>6&3)+1,channelcount:(g[T+2]&1)<<2|(g[T+3]&192)>>>6,samplerate:Jp[(g[T+2]&60)>>>2],samplingfrequencyindex:(g[T+2]&60)>>>2,samplesize:16,data:g.subarray(T+7+O,T+E)}),y++,T+=E}typeof z=="number"&&(this.skipWarn_(z,T),z=null),g=g.subarray(T)}},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")}},Uu.prototype=new Qo;var iv=Uu,em;em=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 T=h.byteLength-g,E=new Uint8Array(4),O=Math.min(4,g);if(O===0)throw new Error("no bytes available");E.set(h.subarray(T,T+O)),y=new DataView(E.buffer).getUint32(0),v=O*8,g-=O},this.skipBits=function(T){var E;v>T?(y<<=T,v-=T):(T-=v,E=Math.floor(T/8),T-=E*8,g-=E,this.loadWord(),y<<=T,v-=T)},this.readBits=function(T){var E=Math.min(v,T),O=y>>>32-E;return v-=E,v>0?y<<=E:g>0&&this.loadWord(),E=T-E,E>0?O<<E|this.readBits(E):O},this.skipLeadingZeros=function(){var T;for(T=0;T<v;++T)if(y&2147483648>>>T)return y<<=T,v-=T,T;return this.loadWord(),T+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var T=this.skipLeadingZeros();return this.readBits(T+1)-1},this.readExpGolomb=function(){var T=this.readUnsignedExpGolomb();return 1&T?1+T>>>1:-1*(T>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Ko=em,qu=i,tm=Ko,Zo,Ns,Xd;Ns=function(){var h=0,g,y;Ns.prototype.init.call(this),this.push=function(v){var T;y?(T=new Uint8Array(y.byteLength+v.data.byteLength),T.set(y),T.set(v.data,y.byteLength),y=T):y=v.data;for(var E=y.byteLength;h<E-3;h++)if(y[h+2]===1){g=h+5;break}for(;g<E;)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<E);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")}},Ns.prototype=new qu,Xd={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Zo=function(){var h=new Ns,g,y,v,T,E,O,L;Zo.prototype.init.call(this),g=this,this.push=function(P){P.type==="video"&&(y=P.trackId,v=P.pts,T=P.dts,h.push(P))},h.on("data",function(P){var B={trackId:y,pts:v,dts:T,data:P,nalUnitTypeCode:P[0]&31};switch(B.nalUnitTypeCode){case 5:B.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:B.nalUnitType="sei_rbsp",B.escapedRBSP=E(P.subarray(1));break;case 7:B.nalUnitType="seq_parameter_set_rbsp",B.escapedRBSP=E(P.subarray(1)),B.config=O(B.escapedRBSP);break;case 8:B.nalUnitType="pic_parameter_set_rbsp";break;case 9:B.nalUnitType="access_unit_delimiter_rbsp";break}g.trigger("data",B)}),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()},L=function(P,B){var z=8,ne=8,ke,he;for(ke=0;ke<P;ke++)ne!==0&&(he=B.readExpGolomb(),ne=(z+he+256)%256),z=ne===0?z:ne},E=function(P){for(var B=P.byteLength,z=[],ne=1,ke,he;ne<B-2;)P[ne]===0&&P[ne+1]===0&&P[ne+2]===3?(z.push(ne+2),ne+=2):ne++;if(z.length===0)return P;ke=B-z.length,he=new Uint8Array(ke);var $e=0;for(ne=0;ne<ke;$e++,ne++)$e===z[0]&&($e++,z.shift()),he[ne]=P[$e];return he},O=function(P){var B=0,z=0,ne=0,ke=0,he,$e,Qe,si,Mi,fs,Sr,oa,eo,to,io,Pt=[1,1],no,dn;if(he=new tm(P),$e=he.readUnsignedByte(),si=he.readUnsignedByte(),Qe=he.readUnsignedByte(),he.skipUnsignedExpGolomb(),Xd[$e]&&(Mi=he.readUnsignedExpGolomb(),Mi===3&&he.skipBits(1),he.skipUnsignedExpGolomb(),he.skipUnsignedExpGolomb(),he.skipBits(1),he.readBoolean()))for(io=Mi!==3?8:12,dn=0;dn<io;dn++)he.readBoolean()&&(dn<6?L(16,he):L(64,he));if(he.skipUnsignedExpGolomb(),fs=he.readUnsignedExpGolomb(),fs===0)he.readUnsignedExpGolomb();else if(fs===1)for(he.skipBits(1),he.skipExpGolomb(),he.skipExpGolomb(),Sr=he.readUnsignedExpGolomb(),dn=0;dn<Sr;dn++)he.skipExpGolomb();if(he.skipUnsignedExpGolomb(),he.skipBits(1),oa=he.readUnsignedExpGolomb(),eo=he.readUnsignedExpGolomb(),to=he.readBits(1),to===0&&he.skipBits(1),he.skipBits(1),he.readBoolean()&&(B=he.readUnsignedExpGolomb(),z=he.readUnsignedExpGolomb(),ne=he.readUnsignedExpGolomb(),ke=he.readUnsignedExpGolomb()),he.readBoolean()&&he.readBoolean()){switch(no=he.readUnsignedByte(),no){case 1:Pt=[1,1];break;case 2:Pt=[12,11];break;case 3:Pt=[10,11];break;case 4:Pt=[16,11];break;case 5:Pt=[40,33];break;case 6:Pt=[24,11];break;case 7:Pt=[20,11];break;case 8:Pt=[32,11];break;case 9:Pt=[80,33];break;case 10:Pt=[18,11];break;case 11:Pt=[15,11];break;case 12:Pt=[64,33];break;case 13:Pt=[160,99];break;case 14:Pt=[4,3];break;case 15:Pt=[3,2];break;case 16:Pt=[2,1];break;case 255:{Pt=[he.readUnsignedByte()<<8|he.readUnsignedByte(),he.readUnsignedByte()<<8|he.readUnsignedByte()];break}}Pt&&Pt[0]/Pt[1]}return{profileIdc:$e,levelIdc:Qe,profileCompatibility:si,width:(oa+1)*16-B*2-z*2,height:(2-to)*(eo+1)*16-ne*2-ke*2,sarRatio:Pt}}},Zo.prototype=new qu;var Fu={H264Stream:Zo,NalByteStream:Ns},ju=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Wd=function(h,g){var y=h[g+6]<<21|h[g+7]<<14|h[g+8]<<7|h[g+9],v=h[g+5],T=(v&16)>>4;return y=y>=0?y:0,T?y+20:y+10},qi=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+=Wd(h,g),qi(h,g))},nv=function(h){var g=qi(h,0);return h.length>=g+2&&(h[g]&255)===255&&(h[g+1]&240)===240&&(h[g+1]&22)===16},Hu=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},im=function(h,g,y){var v,T="";for(v=g;v<y;v++)T+="%"+("00"+h[v].toString(16)).slice(-2);return T},nm=function(h,g,y){return unescape(im(h,g,y))},sv=function(h,g){var y=(h[g+5]&224)>>5,v=h[g+4]<<3,T=h[g+3]&6144;return T|v|y},rv=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},sm=function(h){for(var g=0;g+5<h.length;){if(h[g]!==255||(h[g+1]&246)!==240){g++;continue}return ju[(h[g+2]&60)>>>2]}return null},av=function(h){var g,y,v,T;g=10,h[5]&64&&(g+=4,g+=Hu(h.subarray(10,14)));do{if(y=Hu(h.subarray(g+4,g+8)),y<1)return null;if(T=String.fromCharCode(h[g],h[g+1],h[g+2],h[g+3]),T==="PRIV"){v=h.subarray(g+10,g+y+10);for(var E=0;E<v.byteLength;E++)if(v[E]===0){var O=nm(v,0,E);if(O==="com.apple.streaming.transportStreamTimestamp"){var L=v.subarray(E+1),P=(L[3]&1)<<30|L[4]<<22|L[5]<<14|L[6]<<6|L[7]>>>2;return P*=4,P+=L[7]&3,P}break}}g+=10,g+=y}while(g<h.byteLength);return null},zu={isLikelyAacData:nv,parseId3TagSize:Wd,parseAdtsSize:sv,parseType:rv,parseSampleRate:sm,parseAacTimestamp:av},ov=i,Jo=zu,el;el=function(){var h=new Uint8Array,g=0;el.prototype.init.call(this),this.setTimestamp=function(y){g=y},this.push=function(y){var v=0,T=0,E,O,L,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-T>=3;){if(h[T]==="I".charCodeAt(0)&&h[T+1]==="D".charCodeAt(0)&&h[T+2]==="3".charCodeAt(0)){if(h.length-T<10||(v=Jo.parseId3TagSize(h,T),T+v>h.length))break;O={type:"timed-metadata",data:h.subarray(T,T+v)},this.trigger("data",O),T+=v;continue}else if((h[T]&255)===255&&(h[T+1]&240)===240){if(h.length-T<7||(v=Jo.parseAdtsSize(h,T),T+v>h.length))break;L={type:"audio",data:h.subarray(T,T+v),pts:g,dts:g},this.trigger("data",L),T+=v;continue}T++}E=h.length-T,E>0?h=h.subarray(T):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},el.prototype=new ov;var rm=el,am=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],lv=am,uv=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],cv=uv,Vu=i,tl=be,Bs=ii,il=Re,On=it,cs=Kp,nl=bt,$u=iv,om=Fu.H264Stream,Jr=rm,ea=zu.isLikelyAacData,Yn=bt.ONE_SECOND_IN_TS,Fi=lv,Ga=cv,hr,fr,Si,pr,Gu=function(h,g){g.stream=h,this.trigger("log",g)},mr=function(h,g){for(var y=Object.keys(g),v=0;v<y.length;v++){var T=y[v];T==="headOfPipeline"||!g[T].on||g[T].on("log",Gu.bind(h,T))}},Yu=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},Xu=function(h,g,y,v,T,E){var O=y-g,L=v-g,P=T-y;return{start:{dts:h,pts:h+O},end:{dts:h+L,pts:h+P},prependedContentDuration:E,baseMediaDecodeTime:h}};fr=function(h,g){var y=[],v,T=0,E=0,O=1/0;g=g||{},v=g.firstSequenceNumber||0,fr.prototype.init.call(this),this.push=function(L){On.collectDtsInfo(h,L),h&&Fi.forEach(function(P){h[P]=L[P]}),y.push(L)},this.setEarliestDts=function(L){T=L},this.setVideoBaseMediaDecodeTime=function(L){O=L},this.setAudioAppendStart=function(L){E=L},this.flush=function(){var L,P,B,z,ne,ke,he;if(y.length===0){this.trigger("done","AudioSegmentStream");return}L=il.trimAdtsFramesByEarliestDts(y,h,T),h.baseMediaDecodeTime=On.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),he=il.prefixWithSilence(h,L,E,O),h.samples=il.generateSampleTable(L),B=tl.mdat(il.concatenateFrameData(L)),y=[],P=tl.moof(v,[h]),z=new Uint8Array(P.byteLength+B.byteLength),v++,z.set(P),z.set(B,P.byteLength),On.clearDtsInfo(h),ne=Math.ceil(Yn*1024/h.samplerate),L.length&&(ke=L.length*ne,this.trigger("segmentTimingInfo",Xu(nl.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),L[0].dts,L[0].pts,L[0].dts+ke,L[0].pts+ke,he||0)),this.trigger("timingInfo",{start:L[0].pts,end:L[0].pts+ke})),this.trigger("data",{track:h,boxes:z}),this.trigger("done","AudioSegmentStream")},this.reset=function(){On.clearDtsInfo(h),y=[],this.trigger("reset")}},fr.prototype=new Vu,hr=function(h,g){var y,v=[],T=[],E,O;g=g||{},y=g.firstSequenceNumber||0,hr.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(L){On.collectDtsInfo(h,L),L.nalUnitType==="seq_parameter_set_rbsp"&&!E&&(E=L.config,h.sps=[L.data],Ga.forEach(function(P){h[P]=E[P]},this)),L.nalUnitType==="pic_parameter_set_rbsp"&&!O&&(O=L.data,h.pps=[L.data]),v.push(L)},this.flush=function(){for(var L,P,B,z,ne,ke,he=0,$e,Qe;v.length&&v[0].nalUnitType!=="access_unit_delimiter_rbsp";)v.shift();if(v.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(L=Bs.groupNalsIntoFrames(v),B=Bs.groupFramesIntoGops(L),B[0][0].keyFrame||(P=this.getGopForFusion_(v[0],h),P?(he=P.duration,B.unshift(P),B.byteLength+=P.byteLength,B.nalCount+=P.nalCount,B.pts=P.pts,B.dts=P.dts,B.duration+=P.duration):B=Bs.extendFirstKeyFrame(B)),T.length){var si;if(g.alignGopsAtEnd?si=this.alignGopsAtEnd_(B):si=this.alignGopsAtStart_(B),!si){this.gopCache_.unshift({gop:B.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),v=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}On.clearDtsInfo(h),B=si}On.collectDtsInfo(h,B),h.samples=Bs.generateSampleTable(B),ne=tl.mdat(Bs.concatenateNalData(B)),h.baseMediaDecodeTime=On.calculateTrackBaseMediaDecodeTime(h,g.keepOriginalTimestamps),this.trigger("processedGopsInfo",B.map(function(Mi){return{pts:Mi.pts,dts:Mi.dts,byteLength:Mi.byteLength}})),$e=B[0],Qe=B[B.length-1],this.trigger("segmentTimingInfo",Xu(h.baseMediaDecodeTime,$e.dts,$e.pts,Qe.dts+Qe.duration,Qe.pts+Qe.duration,he)),this.trigger("timingInfo",{start:B[0].pts,end:B[B.length-1].pts+B[B.length-1].duration}),this.gopCache_.unshift({gop:B.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),z=tl.moof(y,[h]),ke=new Uint8Array(z.byteLength+ne.byteLength),y++,ke.set(z),ke.set(ne,z.byteLength),this.trigger("data",{track:h,boxes:ke}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),v=[],this.gopCache_.length=0,T.length=0,this.trigger("reset")},this.resetStream_=function(){On.clearDtsInfo(h),E=void 0,O=void 0},this.getGopForFusion_=function(L){var P=45e3,B=1e4,z=1/0,ne,ke,he,$e,Qe;for(Qe=0;Qe<this.gopCache_.length;Qe++)$e=this.gopCache_[Qe],he=$e.gop,!(!(h.pps&&Yu(h.pps[0],$e.pps[0]))||!(h.sps&&Yu(h.sps[0],$e.sps[0])))&&(he.dts<h.timelineStartInfo.dts||(ne=L.dts-he.dts-he.duration,ne>=-B&&ne<=P&&(!ke||z>ne)&&(ke=$e,z=ne)));return ke?ke.gop:null},this.alignGopsAtStart_=function(L){var P,B,z,ne,ke,he,$e,Qe;for(ke=L.byteLength,he=L.nalCount,$e=L.duration,P=B=0;P<T.length&&B<L.length&&(z=T[P],ne=L[B],z.pts!==ne.pts);){if(ne.pts>z.pts){P++;continue}B++,ke-=ne.byteLength,he-=ne.nalCount,$e-=ne.duration}return B===0?L:B===L.length?null:(Qe=L.slice(B),Qe.byteLength=ke,Qe.duration=$e,Qe.nalCount=he,Qe.pts=Qe[0].pts,Qe.dts=Qe[0].dts,Qe)},this.alignGopsAtEnd_=function(L){var P,B,z,ne,ke,he;for(P=T.length-1,B=L.length-1,ke=null,he=!1;P>=0&&B>=0;){if(z=T[P],ne=L[B],z.pts===ne.pts){he=!0;break}if(z.pts>ne.pts){P--;continue}P===T.length-1&&(ke=B),B--}if(!he&&ke===null)return null;var $e;if(he?$e=B:$e=ke,$e===0)return L;var Qe=L.slice($e),si=Qe.reduce(function(Mi,fs){return Mi.byteLength+=fs.byteLength,Mi.duration+=fs.duration,Mi.nalCount+=fs.nalCount,Mi},{byteLength:0,duration:0,nalCount:0});return Qe.byteLength=si.byteLength,Qe.duration=si.duration,Qe.nalCount=si.nalCount,Qe.pts=Qe[0].pts,Qe.dts=Qe[0].dts,Qe},this.alignGopsWith=function(L){T=L}},hr.prototype=new Vu,pr=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,pr.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))}},pr.prototype=new Vu,pr.prototype.flush=function(h){var g=0,y={captions:[],captionStreams:{},metadata:[],info:{}},v,T,E,O=0,L;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?(O=this.videoTrack.timelineStartInfo.pts,Ga.forEach(function(P){y.info[P]=this.videoTrack[P]},this)):this.audioTrack&&(O=this.audioTrack.timelineStartInfo.pts,Fi.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,E=tl.initSegment(this.pendingTracks),y.initSegment=new Uint8Array(E.byteLength),y.initSegment.set(E),y.data=new Uint8Array(this.pendingBytes),L=0;L<this.pendingBoxes.length;L++)y.data.set(this.pendingBoxes[L],g),g+=this.pendingBoxes[L].byteLength;for(L=0;L<this.pendingCaptions.length;L++)v=this.pendingCaptions[L],v.startTime=nl.metadataTsToSeconds(v.startPts,O,this.keepOriginalTimestamps),v.endTime=nl.metadataTsToSeconds(v.endPts,O,this.keepOriginalTimestamps),y.captionStreams[v.stream]=!0,y.captions.push(v);for(L=0;L<this.pendingMetadata.length;L++)T=this.pendingMetadata[L],T.cueTime=nl.metadataTsToSeconds(T.pts,O,this.keepOriginalTimestamps),y.metadata.push(T);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),L=0;L<y.captions.length;L++)v=y.captions[L],this.trigger("caption",v);for(L=0;L<y.metadata.length;L++)T=y.metadata[L],this.trigger("id3Frame",T)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},pr.prototype.setRemux=function(h){this.remuxTracks=h},Si=function(h){var g=this,y=!0,v,T;Si.prototype.init.call(this),h=h||{},this.baseMediaDecodeTime=h.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var E={};this.transmuxPipeline_=E,E.type="aac",E.metadataStream=new cs.MetadataStream,E.aacStream=new Jr,E.audioTimestampRolloverStream=new cs.TimestampRolloverStream("audio"),E.timedMetadataTimestampRolloverStream=new cs.TimestampRolloverStream("timed-metadata"),E.adtsStream=new $u,E.coalesceStream=new pr(h,E.metadataStream),E.headOfPipeline=E.aacStream,E.aacStream.pipe(E.audioTimestampRolloverStream).pipe(E.adtsStream),E.aacStream.pipe(E.timedMetadataTimestampRolloverStream).pipe(E.metadataStream).pipe(E.coalesceStream),E.metadataStream.on("timestamp",function(O){E.aacStream.setTimestamp(O.timeStamp)}),E.aacStream.on("data",function(O){O.type!=="timed-metadata"&&O.type!=="audio"||E.audioSegmentStream||(T=T||{timelineStartInfo:{baseMediaDecodeTime:g.baseMediaDecodeTime},codec:"adts",type:"audio"},E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new fr(T,h),E.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),E.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),E.adtsStream.pipe(E.audioSegmentStream).pipe(E.coalesceStream),g.trigger("trackinfo",{hasAudio:!!T,hasVideo:!!v}))}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),mr(this,E)},this.setupTsPipeline=function(){var E={};this.transmuxPipeline_=E,E.type="ts",E.metadataStream=new cs.MetadataStream,E.packetStream=new cs.TransportPacketStream,E.parseStream=new cs.TransportParseStream,E.elementaryStream=new cs.ElementaryStream,E.timestampRolloverStream=new cs.TimestampRolloverStream,E.adtsStream=new $u,E.h264Stream=new om,E.captionStream=new cs.CaptionStream(h),E.coalesceStream=new pr(h,E.metadataStream),E.headOfPipeline=E.packetStream,E.packetStream.pipe(E.parseStream).pipe(E.elementaryStream).pipe(E.timestampRolloverStream),E.timestampRolloverStream.pipe(E.h264Stream),E.timestampRolloverStream.pipe(E.adtsStream),E.timestampRolloverStream.pipe(E.metadataStream).pipe(E.coalesceStream),E.h264Stream.pipe(E.captionStream).pipe(E.coalesceStream),E.elementaryStream.on("data",function(O){var L;if(O.type==="metadata"){for(L=O.tracks.length;L--;)!v&&O.tracks[L].type==="video"?(v=O.tracks[L],v.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime):!T&&O.tracks[L].type==="audio"&&(T=O.tracks[L],T.timelineStartInfo.baseMediaDecodeTime=g.baseMediaDecodeTime);v&&!E.videoSegmentStream&&(E.coalesceStream.numberOfTracks++,E.videoSegmentStream=new hr(v,h),E.videoSegmentStream.on("log",g.getLogTrigger_("videoSegmentStream")),E.videoSegmentStream.on("timelineStartInfo",function(P){T&&!h.keepOriginalTimestamps&&(T.timelineStartInfo=P,E.audioSegmentStream.setEarliestDts(P.dts-g.baseMediaDecodeTime))}),E.videoSegmentStream.on("processedGopsInfo",g.trigger.bind(g,"gopInfo")),E.videoSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"videoSegmentTimingInfo")),E.videoSegmentStream.on("baseMediaDecodeTime",function(P){T&&E.audioSegmentStream.setVideoBaseMediaDecodeTime(P)}),E.videoSegmentStream.on("timingInfo",g.trigger.bind(g,"videoTimingInfo")),E.h264Stream.pipe(E.videoSegmentStream).pipe(E.coalesceStream)),T&&!E.audioSegmentStream&&(E.coalesceStream.numberOfTracks++,E.audioSegmentStream=new fr(T,h),E.audioSegmentStream.on("log",g.getLogTrigger_("audioSegmentStream")),E.audioSegmentStream.on("timingInfo",g.trigger.bind(g,"audioTimingInfo")),E.audioSegmentStream.on("segmentTimingInfo",g.trigger.bind(g,"audioSegmentTimingInfo")),E.adtsStream.pipe(E.audioSegmentStream).pipe(E.coalesceStream)),g.trigger("trackinfo",{hasAudio:!!T,hasVideo:!!v})}}),E.coalesceStream.on("data",this.trigger.bind(this,"data")),E.coalesceStream.on("id3Frame",function(O){O.dispatchType=E.metadataStream.dispatchType,g.trigger("id3Frame",O)}),E.coalesceStream.on("caption",this.trigger.bind(this,"caption")),E.coalesceStream.on("done",this.trigger.bind(this,"done")),mr(this,E)},this.setBaseMediaDecodeTime=function(E){var O=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=E),T&&(T.timelineStartInfo.dts=void 0,T.timelineStartInfo.pts=void 0,On.clearDtsInfo(T),O.audioTimestampRolloverStream&&O.audioTimestampRolloverStream.discontinuity()),v&&(O.videoSegmentStream&&(O.videoSegmentStream.gopCache_=[]),v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,On.clearDtsInfo(v),O.captionStream.reset()),O.timestampRolloverStream&&O.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(E){T&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(E)},this.setRemux=function(E){var O=this.transmuxPipeline_;h.remux=E,O&&O.coalesceStream&&O.coalesceStream.setRemux(E)},this.alignGopsWith=function(E){v&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(E)},this.getLogTrigger_=function(E){var O=this;return function(L){L.stream=E,O.trigger("log",L)}},this.push=function(E){if(y){var O=ea(E);O&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!O&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),y=!1}this.transmuxPipeline_.headOfPipeline.push(E)},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()}},Si.prototype=new Vu;var lm={Transmuxer:Si,VideoSegmentStream:hr,AudioSegmentStream:fr,AUDIO_PROPERTIES:Fi,VIDEO_PROPERTIES:Ga,generateSegmentTimingInfo:Xu},Qd=function(h){return h>>>0},dv=function(h){return("00"+h.toString(16)).slice(-2)},Ya={toUnsigned:Qd,toHexString:dv},Us=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},Wu=Us,Kd=Ya.toUnsigned,Qu=Wu,gr=function(h,g){var y=[],v,T,E,O,L;if(!g.length)return null;for(v=0;v<h.byteLength;)T=Kd(h[v]<<24|h[v+1]<<16|h[v+2]<<8|h[v+3]),E=Qu(h.subarray(v+4,v+8)),O=T>1?v+T:h.byteLength,E===g[0]&&(g.length===1?y.push(h.subarray(v+8,O)):(L=gr(h.subarray(v+8,O),g.slice(1)),L.length&&(y=y.concat(L)))),v=O;return y},Xa=gr,Zd=Ya.toUnsigned,ta=l.getUint64,um=function(h){var g={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return g.version===1?g.baseMediaDecodeTime=ta(h.subarray(4)):g.baseMediaDecodeTime=Zd(h[4]<<24|h[5]<<16|h[6]<<8|h[7]),g},sl=um,Jd=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,T=y.flags[2]&2,E=y.flags[2]&8,O=y.flags[2]&16,L=y.flags[2]&32,P=y.flags[0]&65536,B=y.flags[0]&131072,z;return z=8,v&&(z+=4,y.baseDataOffset=g.getUint32(12),z+=4),T&&(y.sampleDescriptionIndex=g.getUint32(z),z+=4),E&&(y.defaultSampleDuration=g.getUint32(z),z+=4),O&&(y.defaultSampleSize=g.getUint32(z),z+=4),L&&(y.defaultSampleFlags=g.getUint32(z)),P&&(y.durationIsEmpty=!0),!v&&B&&(y.baseDataOffsetIsMoof=!0),y},qs=Jd,yr=l.getUint64,eh=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=yr(h.subarray(v)),y.firstOffset=yr(h.subarray(v+8)),v+=16),v+=2;var T=g.getUint16(v);for(v+=2;T>0;v+=12,T--)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},ia=eh,cm=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]}},dm=cm,Wa=dm,rl=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,T=g.flags[2]&4,E=g.flags[1]&1,O=g.flags[1]&2,L=g.flags[1]&4,P=g.flags[1]&8,B=y.getUint32(4),z=8,ne;for(v&&(g.dataOffset=y.getInt32(z),z+=4),T&&B&&(ne={flags:Wa(h.subarray(z,z+4))},z+=4,E&&(ne.duration=y.getUint32(z),z+=4),O&&(ne.size=y.getUint32(z),z+=4),P&&(g.version===1?ne.compositionTimeOffset=y.getInt32(z):ne.compositionTimeOffset=y.getUint32(z),z+=4),g.samples.push(ne),B--);B--;)ne={},E&&(ne.duration=y.getUint32(z),z+=4),O&&(ne.size=y.getUint32(z),z+=4),L&&(ne.flags=Wa(h.subarray(z,z+4)),z+=4),P&&(g.version===1?ne.compositionTimeOffset=y.getInt32(z):ne.compositionTimeOffset=y.getUint32(z),z+=4),g.samples.push(ne);return g},th=rl,al=l,ih=al.getUint64,di,ds,ni=function(h){return new Date(h*1e3-20828448e5)},na=Wu,nh=Xa,ol=function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=[],v,T;for(v=0;v+4<h.length;v+=T){if(T=g.getUint32(v),v+=4,T<=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},Xn={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:di(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,T,E,O,L;for(O=6,L=0;L<v;L++)E=g.getUint16(O),O+=2,y.sps.push(new Uint8Array(h.subarray(O,O+E))),O+=E;for(T=h[O],O++,L=0;L<T;L++)E=g.getUint16(O),O+=2,y.pps.push(new Uint8Array(h.subarray(O,O+E))),O+=E;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:di(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:[]},T=y.getUint32(4),E;for(E=8;T;T--)v.version===0?(v.edits.push({segmentDuration:y.getUint32(E),mediaTime:y.getInt32(E+4),mediaRate:y.getUint16(E+8)+y.getUint16(E+10)/(256*256)}),E+=12):(v.edits.push({segmentDuration:ih(g.subarray(E)),mediaTime:ih(g.subarray(E+8)),mediaRate:y.getUint16(E+16)+y.getUint16(E+18)/(256*256)}),E+=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:na(h.subarray(0,4)),minorVersion:g.getUint32(4),compatibleBrands:[]},v=8;v<h.byteLength;)y.compatibleBrands.push(na(h.subarray(v,v+4))),v+=4;return y},dinf:function(h){return{boxes:di(h)}},dref:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),dataReferences:di(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:na(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:ol(h)}},mdhd:function(h){var g=new DataView(h.buffer,h.byteOffset,h.byteLength),y=4,v,T={version:g.getUint8(0),flags:new Uint8Array(h.subarray(1,4)),language:""};return T.version===1?(y+=4,T.creationTime=ni(g.getUint32(y)),y+=8,T.modificationTime=ni(g.getUint32(y)),y+=4,T.timescale=g.getUint32(y),y+=8,T.duration=g.getUint32(y)):(T.creationTime=ni(g.getUint32(y)),y+=4,T.modificationTime=ni(g.getUint32(y)),y+=4,T.timescale=g.getUint32(y),y+=4,T.duration=g.getUint32(y)),y+=4,v=g.getUint16(y),T.language+=String.fromCharCode((v>>10)+96),T.language+=String.fromCharCode(((v&992)>>5)+96),T.language+=String.fromCharCode((v&31)+96),T},mdia:function(h){return{boxes:di(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:di(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=di(h.subarray(28))[0]),y},moof:function(h){return{boxes:di(h)}},moov:function(h){return{boxes:di(h)}},mvex:function(h){return{boxes:di(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=ni(g.getUint32(y)),y+=8,v.modificationTime=ni(g.getUint32(y)),y+=4,v.timescale=g.getUint32(y),y+=8,v.duration=g.getUint32(y)):(v.creationTime=ni(g.getUint32(y)),y+=4,v.modificationTime=ni(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:ia,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:di(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),T;for(T=8;v;T+=8,v--)y.compositionOffsets.push({sampleCount:g.getUint32(T),sampleOffset:g[y.version===0?"getUint32":"getInt32"](T+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),T;for(T=8;v;T+=4,v--)y.syncSamples.push(g.getUint32(T));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),T;for(T=8;v;T+=4,v--)y.chunkOffsets.push(g.getUint32(T));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:[]},T;for(T=8;y;T+=12,y--)v.sampleToChunks.push({firstChunk:g.getUint32(T),samplesPerChunk:g.getUint32(T+4),sampleDescriptionIndex:g.getUint32(T+8)});return v},stsd:function(h){return{version:h[0],flags:new Uint8Array(h.subarray(1,4)),sampleDescriptions:di(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),T;for(T=8;v;T+=8,v--)y.timeToSamples.push({sampleCount:g.getUint32(T),sampleDelta:g.getUint32(T+4)});return y},styp:function(h){return Xn.ftyp(h)},tfdt:sl,tfhd:qs,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=ni(g.getUint32(y)),y+=8,v.modificationTime=ni(g.getUint32(y)),y+=4,v.trackId=g.getUint32(y),y+=4,y+=8,v.duration=g.getUint32(y)):(v.creationTime=ni(g.getUint32(y)),y+=4,v.modificationTime=ni(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:di(h)}},trak:function(h){return{boxes:di(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:th,"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)])}}};di=function(h){for(var g=0,y=[],v,T,E,O,L,P=new ArrayBuffer(h.length),B=new Uint8Array(P),z=0;z<h.length;++z)B[z]=h[z];for(v=new DataView(P);g<h.byteLength;)T=v.getUint32(g),E=na(h.subarray(g+4,g+8)),O=T>1?g+T:h.byteLength,L=(Xn[E]||function(ne){return{data:ne}})(h.subarray(g+8,O)),L.size=T,L.type=E,y.push(L),g=O;return y},ds=function(h,g){var y;return g=g||0,y=new Array(g*2+1).join(" "),h.map(function(v,T){return y+v.type+`
|
||
`+Object.keys(v).filter(function(E){return E!=="type"&&E!=="boxes"}).map(function(E){var O=y+" "+E+": ",L=v[E];if(L instanceof Uint8Array||L instanceof Uint32Array){var P=Array.prototype.slice.call(new Uint8Array(L.buffer,L.byteOffset,L.byteLength)).map(function(B){return" "+("00"+B.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return P?P.length===1?O+"<"+P.join("").slice(1)+">":O+`<
|
||
`+P.map(function(B){return y+" "+B}).join(`
|
||
`)+`
|
||
`+y+" >":O+"<>"}return O+JSON.stringify(L,null,2).split(`
|
||
`).map(function(B,z){return z===0?B:y+" "+B}).join(`
|
||
`)}).join(`
|
||
`)+(v.boxes?`
|
||
`+ds(v.boxes,g+1):"")}).join(`
|
||
`)};var vr={inspect:di,textify:ds,parseType:na,findBox:nh,parseTraf:Xn.traf,parseTfdt:Xn.tfdt,parseHdlr:Xn.hdlr,parseTfhd:Xn.tfhd,parseTrun:Xn.trun,parseSidx:Xn.sidx},Vt=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},Ku={uint8ToCString:Vt},ll=Ku.uint8ToCString,sh=l.getUint64,sa=function(h){var g=4,y=h[0],v,T,E,O,L,P,B,z;if(y===0){v=ll(h.subarray(g)),g+=v.length,T=ll(h.subarray(g)),g+=T.length;var ne=new DataView(h.buffer);E=ne.getUint32(g),g+=4,L=ne.getUint32(g),g+=4,P=ne.getUint32(g),g+=4,B=ne.getUint32(g),g+=4}else if(y===1){var ne=new DataView(h.buffer);E=ne.getUint32(g),g+=4,O=sh(h.subarray(g)),g+=8,P=ne.getUint32(g),g+=4,B=ne.getUint32(g),g+=4,v=ll(h.subarray(g)),g+=v.length,T=ll(h.subarray(g)),g+=T.length}z=new Uint8Array(h.subarray(g,h.byteLength));var ke={scheme_id_uri:v,value:T,timescale:E||1,presentation_time:O,presentation_time_delta:L,event_duration:P,id:B,message_data:z};return Fs(y,ke)?ke:void 0},ul=function(h,g,y,v){return h||h===0?h/g:v+y/g},Fs=function(h,g){var y=g.scheme_id_uri!=="\0",v=h===0&&cl(g.presentation_time_delta)&&y,T=h===1&&cl(g.presentation_time)&&y;return!(h>1)&&v||T},cl=function(h){return h!==void 0||h!==null},dl={parseEmsgBox:sa,scaleTime:ul},ra;typeof window<"u"?ra=window:typeof r<"u"?ra=r:typeof self<"u"?ra=self:ra={};var Zu=ra,hl=Ya.toUnsigned,en=Ya.toHexString,_t=Xa,js=Wu,rh=dl,hm=qs,hv=th,ah=sl,Ju=l.getUint64,oh,lh,uh,fl,ch,ec,dh,pl=Zu,hh=Kr.parseId3Frames;oh=function(h){var g={},y=_t(h,["moov","trak"]);return y.reduce(function(v,T){var E,O,L,P,B;return E=_t(T,["tkhd"])[0],!E||(O=E[0],L=O===0?12:20,P=hl(E[L]<<24|E[L+1]<<16|E[L+2]<<8|E[L+3]),B=_t(T,["mdia","mdhd"])[0],!B)?null:(O=B[0],L=O===0?12:20,v[P]=hl(B[L]<<24|B[L+1]<<16|B[L+2]<<8|B[L+3]),v)},g)},lh=function(h,g){var y;y=_t(g,["moof","traf"]);var v=y.reduce(function(T,E){var O=_t(E,["tfhd"])[0],L=hl(O[4]<<24|O[5]<<16|O[6]<<8|O[7]),P=h[L]||9e4,B=_t(E,["tfdt"])[0],z=new DataView(B.buffer,B.byteOffset,B.byteLength),ne;B[0]===1?ne=Ju(B.subarray(4,12)):ne=z.getUint32(4);let ke;return typeof ne=="bigint"?ke=ne/pl.BigInt(P):typeof ne=="number"&&!isNaN(ne)&&(ke=ne/P),ke<Number.MAX_SAFE_INTEGER&&(ke=Number(ke)),ke<T&&(T=ke),T},1/0);return typeof v=="bigint"||isFinite(v)?v:0},uh=function(h,g){var y=_t(g,["moof","traf"]),v=0,T=0,E;if(y&&y.length){var O=_t(y[0],["tfhd"])[0],L=_t(y[0],["trun"])[0],P=_t(y[0],["tfdt"])[0];if(O){var B=hm(O);E=B.trackId}if(P){var z=ah(P);v=z.baseMediaDecodeTime}if(L){var ne=hv(L);ne.samples&&ne.samples.length&&(T=ne.samples[0].compositionTimeOffset||0)}}var ke=h[E]||9e4;typeof v=="bigint"&&(T=pl.BigInt(T),ke=pl.BigInt(ke));var he=(v+T)/ke;return typeof he=="bigint"&&he<Number.MAX_SAFE_INTEGER&&(he=Number(he)),he},fl=function(h){var g=_t(h,["moov","trak"]),y=[];return g.forEach(function(v){var T=_t(v,["mdia","hdlr"]),E=_t(v,["tkhd"]);T.forEach(function(O,L){var P=js(O.subarray(8,12)),B=E[L],z,ne,ke;P==="vide"&&(z=new DataView(B.buffer,B.byteOffset,B.byteLength),ne=z.getUint8(0),ke=ne===0?z.getUint32(12):z.getUint32(20),y.push(ke))})}),y},ec=function(h){var g=h[0],y=g===0?12:20;return hl(h[y]<<24|h[y+1]<<16|h[y+2]<<8|h[y+3])},ch=function(h){var g=_t(h,["moov","trak"]),y=[];return g.forEach(function(v){var T={},E=_t(v,["tkhd"])[0],O,L;E&&(O=new DataView(E.buffer,E.byteOffset,E.byteLength),L=O.getUint8(0),T.id=L===0?O.getUint32(12):O.getUint32(20));var P=_t(v,["mdia","hdlr"])[0];if(P){var B=js(P.subarray(8,12));B==="vide"?T.type="video":B==="soun"?T.type="audio":T.type=B}var z=_t(v,["mdia","minf","stbl","stsd"])[0];if(z){var ne=z.subarray(8);T.codec=js(ne.subarray(4,8));var ke=_t(ne,[T.codec])[0],he,$e;ke&&(/^[asm]vc[1-9]$/i.test(T.codec)?(he=ke.subarray(78),$e=js(he.subarray(4,8)),$e==="avcC"&&he.length>11?(T.codec+=".",T.codec+=en(he[9]),T.codec+=en(he[10]),T.codec+=en(he[11])):T.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(T.codec)?(he=ke.subarray(28),$e=js(he.subarray(4,8)),$e==="esds"&&he.length>20&&he[19]!==0?(T.codec+="."+en(he[19]),T.codec+="."+en(he[20]>>>2&63).replace(/^0/,"")):T.codec="mp4a.40.2"):T.codec=T.codec.toLowerCase())}var Qe=_t(v,["mdia","mdhd"])[0];Qe&&(T.timescale=ec(Qe)),y.push(T)}),y},dh=function(h,g=0){var y=_t(h,["emsg"]);return y.map(v=>{var T=rh.parseEmsgBox(new Uint8Array(v)),E=hh(T.message_data);return{cueTime:rh.scaleTime(T.presentation_time,T.timescale,T.presentation_time_delta,g),duration:rh.scaleTime(T.event_duration,T.timescale),frames:E}})};var Rn={findBox:_t,parseType:js,timescale:oh,startTime:lh,compositionStartTime:uh,videoTrackIds:fl,tracks:ch,getTimescaleFromMediaHeader:ec,getEmsgID3:dh};const{parseTrun:br}=vr,{findBox:Qa}=Rn;var ml=Zu,gl=function(h){var g=Qa(h,["moof","traf"]),y=Qa(h,["mdat"]),v=[];return y.forEach(function(T,E){var O=g[E];v.push({mdat:T,traf:O})}),v},yl=function(h,g,y){var v=g,T=y.defaultSampleDuration||0,E=y.defaultSampleSize||0,O=y.trackId,L=[];return h.forEach(function(P){var B=br(P),z=B.samples;z.forEach(function(ne){ne.duration===void 0&&(ne.duration=T),ne.size===void 0&&(ne.size=E),ne.trackId=O,ne.dts=v,ne.compositionTimeOffset===void 0&&(ne.compositionTimeOffset=0),typeof v=="bigint"?(ne.pts=v+ml.BigInt(ne.compositionTimeOffset),v+=ml.BigInt(ne.duration)):(ne.pts=v+ne.compositionTimeOffset,v+=ne.duration)}),L=L.concat(z)}),L},fh={getMdatTrafPairs:gl,parseSamples:yl},fv=Hd.discardEmulationPreventionBytes,fm=Mu.CaptionStream,tc=Xa,ph=sl,mh=qs,{getMdatTrafPairs:ut,parseSamples:Se}=fh,Ka=function(h,g){for(var y=h,v=0;v<g.length;v++){var T=g[v];if(y<T.size)return T;y-=T.size}return null},ic=function(h,g,y){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),T={logs:[],seiNals:[]},E,O,L,P;for(O=0;O+4<h.length;O+=L)if(L=v.getUint32(O),O+=4,!(L<=0))switch(h[O]&31){case 6:var B=h.subarray(O+1,O+1+L),z=Ka(O,g);if(E={nalUnitType:"sei_rbsp",size:L,data:B,escapedRBSP:fv(B),trackId:y},z)E.pts=z.pts,E.dts=z.dts,P=z;else if(P)E.pts=P.pts,E.dts=P.dts;else{T.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+O+" for trackId "+y+". See mux.js#223."});break}T.seiNals.push(E);break}return T},Jt=function(h,g){var y={},v=ut(h);return v.forEach(function(T){var E=T.mdat,O=T.traf,L=tc(O,["tfhd"]),P=mh(L[0]),B=P.trackId,z=tc(O,["tfdt"]),ne=z.length>0?ph(z[0]).baseMediaDecodeTime:0,ke=tc(O,["trun"]),he,$e;g===B&&ke.length>0&&(he=Se(ke,ne,P),$e=ic(E,he,B),y[B]||(y[B]={seiNals:[],logs:[]}),y[B].seiNals=y[B].seiNals.concat($e.seiNals),y[B].logs=y[B].logs.concat($e.logs))}),y},gh=function(h,g,y){var v;if(g===null)return null;v=Jt(h,g);var T=v[g]||{};return{seiNals:T.seiNals,logs:T.logs,timescale:y}},yh=function(){var h=!1,g,y,v,T,E,O;this.isInitialized=function(){return h},this.init=function(L){g=new fm,h=!0,O=L?L.isPartial:!1,g.on("data",function(P){P.startTime=P.startPts/T,P.endTime=P.endPts/T,E.captions.push(P),E.captionStreams[P.stream]=!0}),g.on("log",function(P){E.logs.push(P)})},this.isNewInit=function(L,P){return L&&L.length===0||P&&typeof P=="object"&&Object.keys(P).length===0?!1:v!==L[0]||T!==P[v]},this.parse=function(L,P,B){var z;if(this.isInitialized()){if(!P||!B)return null;if(this.isNewInit(P,B))v=P[0],T=B[v];else if(v===null||!T)return y.push(L),null}else return null;for(;y.length>0;){var ne=y.shift();this.parse(ne,P,B)}return z=gh(L,v,T),z&&z.logs&&(E.logs=E.logs.concat(z.logs)),z===null||!z.seiNals?E.logs.length?{logs:E.logs,captions:[],captionStreams:[]}:null:(this.pushNals(z.seiNals),this.flushStream(),E)},this.pushNals=function(L){if(!this.isInitialized()||!L||L.length===0)return null;L.forEach(function(P){g.push(P)})},this.flushStream=function(){if(!this.isInitialized())return null;O?g.partialFlush():g.flush()},this.clearParsedCaptions=function(){E.captions=[],E.captionStreams={},E.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;g.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){y=[],v=null,T=null,E?this.clearParsedCaptions():E={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},pm=yh;const{parseTfdt:vh}=vr,_r=Xa,{getTimescaleFromMediaHeader:bh}=Rn,{parseSamples:_h,getMdatTrafPairs:Th}=fh;var Tt=function(){let h=9e4;this.init=function(g){const y=_r(g,["moov","trak","mdia","mdhd"])[0];y&&(h=bh(y))},this.parseSegment=function(g){const y=[],v=Th(g);let T=0;return v.forEach(function(E){const O=E.mdat,L=E.traf,P=_r(L,["tfdt"])[0],B=_r(L,["tfhd"])[0],z=_r(L,["trun"]);if(P&&(T=vh(P).baseMediaDecodeTime),z.length&&B){const ne=_h(z,T,B);let ke=0;ne.forEach(function(he){const $e="utf-8",Qe=new TextDecoder($e),si=O.slice(ke,ke+he.size);if(_r(si,["vtte"])[0]){ke+=he.size;return}_r(si,["vttc"]).forEach(function(Sr){const oa=_r(Sr,["payl"])[0],eo=_r(Sr,["sttg"])[0],to=he.pts/h,io=(he.pts+he.duration)/h;let Pt,no;if(oa)try{Pt=Qe.decode(oa)}catch(dn){console.error(dn)}if(eo)try{no=Qe.decode(eo)}catch(dn){console.error(dn)}he.duration&&Pt&&y.push({cueText:Pt,start:to,end:io,settings:no})}),ke+=he.size})}}),y}},vl=Go,Za=function(h){var g=h[1]&31;return g<<=8,g|=h[2],g},Wn=function(h){return!!(h[1]&64)},hs=function(h){var g=0;return(h[3]&48)>>>4>1&&(g+=h[4]+1),g},Qn=function(h,g){var y=Za(h);return y===0?"pat":y===g?"pmt":g?"pes":null},Sh=function(h){var g=Wn(h),y=4+hs(h);return g&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},Ja=function(h){var g={},y=Wn(h),v=4+hs(h);if(y&&(v+=h[v]+1),!!(h[v+5]&1)){var T,E,O;T=(h[v+1]&15)<<8|h[v+2],E=3+T-4,O=(h[v+10]&15)<<8|h[v+11];for(var L=12+O;L<E;){var P=v+L;g[(h[P+1]&31)<<8|h[P+2]]=h[P],L+=((h[P+3]&15)<<8|h[P+4])+5}return g}},xh=function(h,g){var y=Za(h),v=g[y];switch(v){case vl.H264_STREAM_TYPE:return"video";case vl.ADTS_STREAM_TYPE:return"audio";case vl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},bl=function(h){var g=Wn(h);if(!g)return null;var y=4+hs(h);if(y>=h.byteLength)return null;var v=null,T;return T=h[y+7],T&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,T&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},_l=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}},nc=function(h){for(var g=4+hs(h),y=h.subarray(g),v=0,T=0,E=!1,O;T<y.byteLength-3;T++)if(y[T+2]===1){v=T+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}T+3!==v-2&&(O=_l(y[T+3]&31),O==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0));do v++;while(y[v]!==1&&v<y.length);T=v-2,v+=3;break;case 1:if(y[v-1]!==0||y[v-2]!==0){v+=3;break}O=_l(y[T+3]&31),O==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0),T=v-2,v+=3;break;default:v+=3;break}return y=y.subarray(T),v-=T,T=0,y&&y.byteLength>3&&(O=_l(y[T+3]&31),O==="slice_layer_without_partitioning_rbsp_idr"&&(E=!0)),E},mm={parseType:Qn,parsePat:Sh,parsePmt:Ja,parsePayloadUnitStartIndicator:Wn,parsePesType:xh,parsePesTime:bl,videoPacketContainsKeyFrame:nc},Eh=Go,aa=$d.handleRollover,St={};St.ts=mm,St.aac=zu;var Tr=bt.ONE_SECOND_IN_TS,xi=188,Mn=71,Ch=function(h,g){for(var y=0,v=xi,T,E;v<h.byteLength;){if(h[y]===Mn&&h[v]===Mn){switch(T=h.subarray(y,v),E=St.ts.parseType(T,g.pid),E){case"pat":g.pid=St.ts.parsePat(T);break;case"pmt":var O=St.ts.parsePmt(T);g.table=g.table||{},Object.keys(O).forEach(function(L){g.table[L]=O[L]});break}y+=xi,v+=xi;continue}y++,v++}},wh=function(h,g,y){for(var v=0,T=xi,E,O,L,P,B,z=!1;T<=h.byteLength;){if(h[v]===Mn&&(h[T]===Mn||T===h.byteLength)){switch(E=h.subarray(v,T),O=St.ts.parseType(E,g.pid),O){case"pes":L=St.ts.parsePesType(E,g.table),P=St.ts.parsePayloadUnitStartIndicator(E),L==="audio"&&P&&(B=St.ts.parsePesTime(E),B&&(B.type="audio",y.audio.push(B),z=!0));break}if(z)break;v+=xi,T+=xi;continue}v++,T++}for(T=h.byteLength,v=T-xi,z=!1;v>=0;){if(h[v]===Mn&&(h[T]===Mn||T===h.byteLength)){switch(E=h.subarray(v,T),O=St.ts.parseType(E,g.pid),O){case"pes":L=St.ts.parsePesType(E,g.table),P=St.ts.parsePayloadUnitStartIndicator(E),L==="audio"&&P&&(B=St.ts.parsePesTime(E),B&&(B.type="audio",y.audio.push(B),z=!0));break}if(z)break;v-=xi,T-=xi;continue}v--,T--}},gm=function(h,g,y){for(var v=0,T=xi,E,O,L,P,B,z,ne,ke,he=!1,$e={data:[],size:0};T<h.byteLength;){if(h[v]===Mn&&h[T]===Mn){switch(E=h.subarray(v,T),O=St.ts.parseType(E,g.pid),O){case"pes":if(L=St.ts.parsePesType(E,g.table),P=St.ts.parsePayloadUnitStartIndicator(E),L==="video"&&(P&&!he&&(B=St.ts.parsePesTime(E),B&&(B.type="video",y.video.push(B),he=!0)),!y.firstKeyFrame)){if(P&&$e.size!==0){for(z=new Uint8Array($e.size),ne=0;$e.data.length;)ke=$e.data.shift(),z.set(ke,ne),ne+=ke.byteLength;if(St.ts.videoPacketContainsKeyFrame(z)){var Qe=St.ts.parsePesTime(z);Qe?(y.firstKeyFrame=Qe,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.")}$e.size=0}$e.data.push(E),$e.size+=E.byteLength}break}if(he&&y.firstKeyFrame)break;v+=xi,T+=xi;continue}v++,T++}for(T=h.byteLength,v=T-xi,he=!1;v>=0;){if(h[v]===Mn&&h[T]===Mn){switch(E=h.subarray(v,T),O=St.ts.parseType(E,g.pid),O){case"pes":L=St.ts.parsePesType(E,g.table),P=St.ts.parsePayloadUnitStartIndicator(E),L==="video"&&P&&(B=St.ts.parsePesTime(E),B&&(B.type="video",y.video.push(B),he=!0));break}if(he)break;v-=xi,T-=xi;continue}v--,T--}},ym=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(E){E.dts=aa(E.dts,y),E.pts=aa(E.pts,y),E.dtsTime=E.dts/Tr,E.ptsTime=E.pts/Tr})}if(h.video&&h.video.length){var v=g;if((typeof v>"u"||isNaN(v))&&(v=h.video[0].dts),h.video.forEach(function(E){E.dts=aa(E.dts,v),E.pts=aa(E.pts,v),E.dtsTime=E.dts/Tr,E.ptsTime=E.pts/Tr}),h.firstKeyFrame){var T=h.firstKeyFrame;T.dts=aa(T.dts,v),T.pts=aa(T.pts,v),T.dtsTime=T.dts/Tr,T.ptsTime=T.pts/Tr}}},pv=function(h){for(var g=!1,y=0,v=null,T=null,E=0,O=0,L;h.length-O>=3;){var P=St.aac.parseType(h,O);switch(P){case"timed-metadata":if(h.length-O<10){g=!0;break}if(E=St.aac.parseId3TagSize(h,O),E>h.length){g=!0;break}T===null&&(L=h.subarray(O,O+E),T=St.aac.parseAacTimestamp(L)),O+=E;break;case"audio":if(h.length-O<7){g=!0;break}if(E=St.aac.parseAdtsSize(h,O),E>h.length){g=!0;break}v===null&&(L=h.subarray(O,O+E),v=St.aac.parseSampleRate(L)),y++,O+=E;break;default:O++;break}if(g)return null}if(v===null||T===null)return null;var B=Tr/v,z={audio:[{type:"audio",dts:T,pts:T},{type:"audio",dts:T+y*1024*B,pts:T+y*1024*B}]};return z},vm=function(h){var g={pid:null,table:null},y={};Ch(h,g);for(var v in g.table)if(g.table.hasOwnProperty(v)){var T=g.table[v];switch(T){case Eh.H264_STREAM_TYPE:y.video=[],gm(h,g,y),y.video.length===0&&delete y.video;break;case Eh.ADTS_STREAM_TYPE:y.audio=[],wh(h,g,y),y.audio.length===0&&delete y.audio;break}}return y},bm=function(h,g){var y=St.aac.isLikelyAacData(h),v;return y?v=pv(h):v=vm(h),!v||!v.audio&&!v.video?null:(ym(v,g),v)},_m={inspect:bm,parseAudioPes_:wh};const Ah=function(h,g){g.on("data",function(y){const v=y.initSegment;y.initSegment={data:v.buffer,byteOffset:v.byteOffset,byteLength:v.byteLength};const T=y.data;y.data=T.buffer,h.postMessage({action:"data",segment:y,byteOffset:T.byteOffset,byteLength:T.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:bt.videoTsToSeconds(y.start.dts),presentation:bt.videoTsToSeconds(y.start.pts)},end:{decode:bt.videoTsToSeconds(y.end.dts),presentation:bt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:bt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=bt.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:v})}),g.on("audioSegmentTimingInfo",function(y){const v={start:{decode:bt.videoTsToSeconds(y.start.dts),presentation:bt.videoTsToSeconds(y.start.pts)},end:{decode:bt.videoTsToSeconds(y.end.dts),presentation:bt.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:bt.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(v.prependedContentDuration=bt.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:bt.videoTsToSeconds(y.start),end:bt.videoTsToSeconds(y.end)}})}),g.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:bt.videoTsToSeconds(y.start),end:bt.videoTsToSeconds(y.end)}})}),g.on("log",function(y){h.postMessage({action:"log",log:y})})};class kh{constructor(g,y){this.options=y||{},this.self=g,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new lm.Transmuxer(this.options),Ah(this.self,this.transmuxer)}pushMp4Captions(g){this.captionParser||(this.captionParser=new pm,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 Tt);const y=new Uint8Array(g.data,g.byteOffset,g.byteLength);this.webVttParser.init(y)}getMp4WebVttText(g){this.webVttParser||(this.webVttParser=new Tt);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=Rn.startTime(g,y);this.self.postMessage({action:"probeMp4StartTime",startTime:v,data:y},[y.buffer])}probeMp4Tracks({data:g}){const y=Rn.tracks(g);this.self.postMessage({action:"probeMp4Tracks",tracks:y,data:g},[g.buffer])}probeEmsgID3({data:g,offset:y}){const v=Rn.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*bt.ONE_SECOND_IN_TS:void 0,T=_m.inspect(g,v);let E=null;T&&(E={hasVideo:T.video&&T.video.length===2||!1,hasAudio:T.audio&&T.audio.length===2||!1},E.hasVideo&&(E.videoStart=T.video[0].ptsTime),E.hasAudio&&(E.audioStart=T.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:E,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(bt.secondsToVideoTs(y)))}setAudioAppendStart(g){this.transmuxer.setAudioAppendStart(Math.ceil(bt.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 kh(self,h.data.options);return}this.messageHandlers||(this.messageHandlers=new kh(self)),h.data&&h.data.action&&h.data.action!=="init"&&this.messageHandlers[h.data.action]&&this.messageHandlers[h.data.action](h.data)}}));var s5=tx(n5);const r5=(r,e,i)=>{const{type:s,initSegment:o,captions:l,captionStreams:c,metadata:f,videoFrameDtsTime:p,videoFramePtsTime:b}=r.data.segment;e.buffer.push({captions:l,captionStreams:c,metadata:f});const _=r.data.segment.boxes||{data:r.data.segment.data},x={type:s,data:new Uint8Array(_.data,_.data.byteOffset,_.data.byteLength),initSegment:new Uint8Array(o.data,o.byteOffset,o.byteLength)};typeof p<"u"&&(x.videoFrameDtsTime=p),typeof b<"u"&&(x.videoFramePtsTime=b),i(x)},a5=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},o5=(r,e)=>{e.gopInfo=r.data.gopInfo},sx=r=>{const{transmuxer:e,bytes:i,audioAppendStart:s,gopsToAlignWith:o,remux:l,onData:c,onTrackInfo:f,onAudioTimingInfo:p,onVideoTimingInfo:b,onVideoSegmentTimingInfo:_,onAudioSegmentTimingInfo:x,onId3:w,onCaptions:D,onDone:M,onEndedTimeline:A,onTransmuxerLog:q,isEndOfTimeline:N,segment:G,triggerSegmentEventFn:$}=r,X={buffer:[]};let W=N;const oe=pe=>{e.currentTransmux===r&&(pe.data.action==="data"&&r5(pe,X,c),pe.data.action==="trackinfo"&&f(pe.data.trackInfo),pe.data.action==="gopInfo"&&o5(pe,X),pe.data.action==="audioTimingInfo"&&p(pe.data.audioTimingInfo),pe.data.action==="videoTimingInfo"&&b(pe.data.videoTimingInfo),pe.data.action==="videoSegmentTimingInfo"&&_(pe.data.videoSegmentTimingInfo),pe.data.action==="audioSegmentTimingInfo"&&x(pe.data.audioSegmentTimingInfo),pe.data.action==="id3Frame"&&w([pe.data.id3Frame],pe.data.id3Frame.dispatchType),pe.data.action==="caption"&&D(pe.data.caption),pe.data.action==="endedtimeline"&&(W=!1,A()),pe.data.action==="log"&&q(pe.data.log),pe.data.type==="transmuxed"&&(W||(e.onmessage=null,a5({transmuxedData:X,callback:M}),rx(e))))},K=()=>{const pe={message:"Received an error message from the transmuxer worker",metadata:{errorType:H.Error.StreamingFailedToTransmuxSegment,segmentInfo:zo({segment:G})}};M(null,pe)};if(e.onmessage=oe,e.onerror=K,s&&e.postMessage({action:"setAudioAppendStart",appendStart:s}),Array.isArray(o)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),typeof l<"u"&&e.postMessage({action:"setRemux",remux:l}),i.byteLength){const pe=i instanceof ArrayBuffer?i:i.buffer,ye=i instanceof ArrayBuffer?0:i.byteOffset;$({type:"segmenttransmuxingstart",segment:G}),e.postMessage({action:"push",data:pe,byteOffset:ye,byteLength:i.byteLength},[pe])}N&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},rx=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():sx(r.currentTransmux))},ax=(r,e)=>{r.postMessage({action:e}),rx(r)},ox=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,ax(e,r);return}e.transmuxQueue.push(ax.bind(null,e,r))},l5=r=>{ox("reset",r)},u5=r=>{ox("endTimeline",r)},lx=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,sx(r);return}r.transmuxer.transmuxQueue.push(r)};var Py={reset:l5,endTimeline:u5,transmux:lx,createTransmuxer:r=>{const e=new s5;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:r}),e}};const Cu=function(r){const e=r.transmuxer,i=r.endAction||r.action,s=r.callback,o=ei({},r,{endAction:null,transmuxer:null,callback:null}),l=c=>{c.data.action===i&&(e.removeEventListener("message",l),c.data.data&&(c.data.data=new Uint8Array(c.data.data,r.byteOffset||0,r.byteLength||c.data.data.byteLength),r.data&&(r.data=c.data.data)),s(c.data))};if(e.addEventListener("message",l),r.data){const c=r.data instanceof ArrayBuffer;o.byteOffset=c?0:r.data.byteOffset,o.byteLength=r.data.byteLength;const f=[c?r.data:r.data.buffer];e.postMessage(o,f)}else e.postMessage(o)},rr={FAILURE:2,TIMEOUT:-101,ABORTED:-102},ux="wvtt",Ny=r=>{r.forEach(e=>{e.abort()})},c5=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),d5=r=>{const e=r.target,s={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return s.bytesReceived=r.loaded,s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3),s},By=(r,e)=>{const{requestType:i}=e,s=Ho({requestType:i,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:rr.TIMEOUT,xhr:e,metadata:s}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:rr.ABORTED,xhr:e,metadata:s}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:rr.FAILURE,xhr:e,metadata:s}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:rr.FAILURE,xhr:e,metadata:s}:null},cx=(r,e,i,s)=>(o,l)=>{const c=l.response,f=By(o,l);if(f)return i(f,r);if(c.byteLength!==16)return i({status:l.status,message:"Invalid HLS key at URL: "+l.uri,code:rr.FAILURE,xhr:l},r);const p=new DataView(c),b=new Uint32Array([p.getUint32(0),p.getUint32(4),p.getUint32(8),p.getUint32(12)]);for(let x=0;x<e.length;x++)e[x].bytes=b;const _={uri:l.uri};return s({type:"segmentkeyloadcomplete",segment:r,keyInfo:_}),i(null,r)},h5=(r,e)=>{e===ux&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},f5=(r,e,i)=>{e===ux&&Cu({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:s,mp4VttCues:o})=>{r.bytes=s,i(null,r,{mp4VttCues:o})}})},dx=(r,e)=>{const i=S0(r.map.bytes);if(i!=="mp4"){const s=r.map.resolvedUri||r.map.uri,o=i||"unknown";return e({internal:!0,message:`Found unsupported ${o} container for initialization segment at URL: ${s}`,code:rr.FAILURE,metadata:{mediaType:o}})}Cu({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:s,data:o})=>(r.map.bytes=o,s.forEach(function(l){r.map.tracks=r.map.tracks||{},!r.map.tracks[l.type]&&(r.map.tracks[l.type]=l,typeof l.id=="number"&&l.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[l.id]=l.timescale),l.type==="text"&&h5(r,l.codec))}),e(null))})},p5=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:i})=>(s,o)=>{const l=By(s,o);if(l)return e(l,r);const c=new Uint8Array(o.response);if(i({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=c,e(null,r);r.map.bytes=c,dx(r,function(f){if(f)return f.xhr=o,f.status=o.status,e(f,r);e(null,r)})},m5=({segment:r,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:s})=>(o,l)=>{const c=By(o,l);if(c)return e(c,r);s({type:"segmentloaded",segment:r});const f=i==="arraybuffer"||!l.responseText?l.response:t5(l.responseText.substring(r.lastReachedChar||0));return r.stats=c5(l),r.key?r.encryptedBytes=new Uint8Array(f):r.bytes=new Uint8Array(f),e(null,r)},g5=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})=>{const M=r.map&&r.map.tracks||{},A=!!(M.audio&&M.video);let q=s.bind(null,r,"audio","start");const N=s.bind(null,r,"audio","end");let G=s.bind(null,r,"video","start");const $=s.bind(null,r,"video","end"),X=()=>lx({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:A,onData:W=>{W.type=W.type==="combined"?"video":W.type,_(r,W)},onTrackInfo:W=>{i&&(A&&(W.isMuxed=!0),i(r,W))},onAudioTimingInfo:W=>{q&&typeof W.start<"u"&&(q(W.start),q=null),N&&typeof W.end<"u"&&N(W.end)},onVideoTimingInfo:W=>{G&&typeof W.start<"u"&&(G(W.start),G=null),$&&typeof W.end<"u"&&$(W.end)},onVideoSegmentTimingInfo:W=>{const oe={pts:{start:W.start.presentation,end:W.end.presentation},dts:{start:W.start.decode,end:W.end.decode}};D({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:oe}),o(W)},onAudioSegmentTimingInfo:W=>{const oe={pts:{start:W.start.pts,end:W.end.pts},dts:{start:W.start.dts,end:W.end.dts}};D({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:oe}),l(W)},onId3:(W,oe)=>{c(r,W,oe)},onCaptions:W=>{f(r,[W])},isEndOfTimeline:p,onEndedTimeline:()=>{b()},onTransmuxerLog:w,onDone:(W,oe)=>{x&&(W.type=W.type==="combined"?"video":W.type,D({type:"segmenttransmuxingcomplete",segment:r}),x(oe,r,W))},segment:r,triggerSegmentEventFn:D});Cu({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:W=>{r.bytes=e=W.data;const oe=W.result;oe&&(i(r,{hasAudio:oe.hasAudio,hasVideo:oe.hasVideo,isMuxed:A}),i=null),X()}})},hx=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})=>{let M=new Uint8Array(e);if(V3(M)){r.isFmp4=!0;const{tracks:A}=r.map;if(A.text&&(!A.audio||!A.video)){_(r,{data:M,type:"text"}),f5(r,A.text.codec,x);return}const N={isFmp4:!0,hasVideo:!!A.video,hasAudio:!!A.audio};A.audio&&A.audio.codec&&A.audio.codec!=="enca"&&(N.audioCodec=A.audio.codec),A.video&&A.video.codec&&A.video.codec!=="encv"&&(N.videoCodec=A.video.codec),A.video&&A.audio&&(N.isMuxed=!0),i(r,N);const G=($,X)=>{_(r,{data:M,type:N.hasAudio&&!N.isMuxed?"audio":"video"}),X&&X.length&&c(r,X),$&&$.length&&f(r,$),x(null,r,{})};Cu({action:"probeMp4StartTime",timescales:r.map.timescales,data:M,transmuxer:r.transmuxer,callback:({data:$,startTime:X})=>{e=$.buffer,r.bytes=M=$,N.hasAudio&&!N.isMuxed&&s(r,"audio","start",X),N.hasVideo&&s(r,"video","start",X),Cu({action:"probeEmsgID3",data:M,transmuxer:r.transmuxer,offset:X,callback:({emsgData:W,id3Frames:oe})=>{if(e=W.buffer,r.bytes=M=W,!A.video||!W.byteLength||!r.transmuxer){G(void 0,oe);return}Cu({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:M,timescales:r.map.timescales,trackIds:[A.video.id],callback:K=>{e=K.data.buffer,r.bytes=M=K.data,K.logs.forEach(function(pe){w(wt(pe,{stream:"mp4CaptionParser"}))}),G(K.captions,oe)}})}})}});return}if(!r.transmuxer){x(null,r,{});return}if(typeof r.container>"u"&&(r.container=S0(M)),r.container!=="ts"&&r.container!=="aac"){i(r,{hasAudio:!1,hasVideo:!1}),x(null,r,{});return}g5({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})},fx=function({id:r,key:e,encryptedBytes:i,decryptionWorker:s,segment:o,doneFn:l},c){const f=b=>{if(b.data.source===r){s.removeEventListener("message",f);const _=b.data.decrypted;c(new Uint8Array(_.bytes,_.byteOffset,_.byteLength))}};s.onerror=()=>{const b="An error occurred in the decryption worker",_=zo({segment:o}),x={message:b,metadata:{error:new Error(b),errorType:H.Error.StreamingFailedToDecryptSegment,segmentInfo:_,keyInfo:{uri:o.key.resolvedUri||o.map.key.resolvedUri}}};l(x,o)},s.addEventListener("message",f);let p;e.bytes.slice?p=e.bytes.slice():p=new Uint32Array(Array.prototype.slice.call(e.bytes)),s.postMessage(YS({source:r,encrypted:i,key:p,iv:e.iv}),[i.buffer,p.buffer])},y5=({decryptionWorker:r,segment:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})=>{D({type:"segmentdecryptionstart"}),fx({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:x},M=>{e.bytes=M,D({type:"segmentdecryptioncomplete",segment:e}),hx({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})})},v5=({activeXhrs:r,decryptionWorker:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})=>{let M=0,A=!1;return(q,N)=>{if(!A){if(q)return A=!0,Ny(r),x(q,N);if(M+=1,M===r.length){const G=function(){if(N.encryptedBytes)return y5({decryptionWorker:e,segment:N,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D});hx({segment:N,bytes:N.bytes,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_,doneFn:x,onTransmuxerLog:w,triggerSegmentEventFn:D})};if(N.endOfAllRequests=Date.now(),N.map&&N.map.encryptedBytes&&!N.map.bytes)return D({type:"segmentdecryptionstart",segment:N}),fx({decryptionWorker:e,id:N.requestId+"-init",encryptedBytes:N.map.encryptedBytes,key:N.map.key,segment:N,doneFn:x},$=>{N.map.bytes=$,D({type:"segmentdecryptioncomplete",segment:N}),dx(N,X=>{if(X)return Ny(r),x(X,N);G()})});G()}}}},b5=({loadendState:r,abortFn:e})=>i=>{i.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},_5=({segment:r,progressFn:e,trackInfoFn:i,timingInfoFn:s,videoSegmentTimingInfoFn:o,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:f,isEndOfTimeline:p,endedTimelineFn:b,dataFn:_})=>x=>{if(!x.target.aborted)return r.stats=wt(r.stats,d5(x)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(x,r)},T5=({xhr:r,xhrOptions:e,decryptionWorker:i,segment:s,abortFn:o,progressFn:l,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:b,id3Fn:_,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:D,dataFn:M,doneFn:A,onTransmuxerLog:q,triggerSegmentEventFn:N})=>{const G=[],$=v5({activeXhrs:G,decryptionWorker:i,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:b,id3Fn:_,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:D,dataFn:M,doneFn:A,onTransmuxerLog:q,triggerSegmentEventFn:N});if(s.key&&!s.key.bytes){const pe=[s.key];s.map&&!s.map.bytes&&s.map.key&&s.map.key.resolvedUri===s.key.resolvedUri&&pe.push(s.map.key);const ye=wt(e,{uri:s.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),_e=cx(s,pe,$,N),de={uri:s.key.resolvedUri};N({type:"segmentkeyloadstart",segment:s,keyInfo:de});const le=r(ye,_e);G.push(le)}if(s.map&&!s.map.bytes){if(s.map.key&&(!s.key||s.key.resolvedUri!==s.map.key.resolvedUri)){const le=wt(e,{uri:s.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),Z=cx(s,[s.map.key],$,N),fe={uri:s.map.key.resolvedUri};N({type:"segmentkeyloadstart",segment:s,keyInfo:fe});const Ee=r(le,Z);G.push(Ee)}const ye=wt(e,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:My(s.map),requestType:"segment-media-initialization"}),_e=p5({segment:s,finishProcessingFn:$,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:s});const de=r(ye,_e);G.push(de)}const X=wt(e,{uri:s.part&&s.part.resolvedUri||s.resolvedUri,responseType:"arraybuffer",headers:My(s),requestType:"segment"}),W=m5({segment:s,finishProcessingFn:$,responseType:X.responseType,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:s});const oe=r(X,W);oe.addEventListener("progress",_5({segment:s,progressFn:l,trackInfoFn:c,timingInfoFn:f,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:b,id3Fn:_,captionsFn:x,isEndOfTimeline:w,endedTimelineFn:D,dataFn:M})),G.push(oe);const K={};return G.forEach(pe=>{pe.addEventListener("loadend",b5({loadendState:K,abortFn:o}))}),()=>Ny(G)},Up=us("PlaylistSelector"),px=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},wu=function(r,e){if(!r)return"";const i=U.getComputedStyle(r);return i?i[e]:""},Au=function(r,e){const i=r.slice();r.sort(function(s,o){const l=e(s,o);return l===0?i.indexOf(s)-i.indexOf(o):l})},Uy=function(r,e){let i,s;return r.attributes.BANDWIDTH&&(i=r.attributes.BANDWIDTH),i=i||U.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(s=e.attributes.BANDWIDTH),s=s||U.Number.MAX_VALUE,i-s},S5=function(r,e){let i,s;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(i=r.attributes.RESOLUTION.width),i=i||U.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(s=e.attributes.RESOLUTION.width),s=s||U.Number.MAX_VALUE,i===s&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-s};let mx=function(r){const{main:e,bandwidth:i,playerWidth:s,playerHeight:o,playerObjectFit:l,limitRenditionByPlayerDimensions:c,playlistController:f}=r;if(!e)return;const p={bandwidth:i,width:s,height:o,limitRenditionByPlayerDimensions:c};let b=e.playlists;wn.isAudioOnly(e)&&(b=f.getAudioTrackPlaylists_(),p.audioOnly=!0);let _=b.map(K=>{let pe;const ye=K.attributes&&K.attributes.RESOLUTION&&K.attributes.RESOLUTION.width,_e=K.attributes&&K.attributes.RESOLUTION&&K.attributes.RESOLUTION.height;return pe=K.attributes&&K.attributes.BANDWIDTH,pe=pe||U.Number.MAX_VALUE,{bandwidth:pe,width:ye,height:_e,playlist:K}});Au(_,(K,pe)=>K.bandwidth-pe.bandwidth),_=_.filter(K=>!wn.isIncompatible(K.playlist));let x=_.filter(K=>wn.isEnabled(K.playlist));x.length||(x=_.filter(K=>!wn.isDisabled(K.playlist)));const w=x.filter(K=>K.bandwidth*Oi.BANDWIDTH_VARIANCE<i);let D=w[w.length-1];const M=w.filter(K=>K.bandwidth===D.bandwidth)[0];if(c===!1){const K=M||x[0]||_[0];if(K&&K.playlist){let pe="sortedPlaylistReps";return M&&(pe="bandwidthBestRep"),x[0]&&(pe="enabledPlaylistReps"),Up(`choosing ${px(K)} using ${pe} with options`,p),K.playlist}return Up("could not choose a playlist with options",p),null}const A=w.filter(K=>K.width&&K.height);Au(A,(K,pe)=>K.width-pe.width);const q=A.filter(K=>K.width===s&&K.height===o);D=q[q.length-1];const N=q.filter(K=>K.bandwidth===D.bandwidth)[0];let G,$,X;N||(G=A.filter(K=>l==="cover"?K.width>s&&K.height>o:K.width>s||K.height>o),$=G.filter(K=>K.width===G[0].width&&K.height===G[0].height),D=$[$.length-1],X=$.filter(K=>K.bandwidth===D.bandwidth)[0]);let W;if(f.leastPixelDiffSelector){const K=A.map(pe=>(pe.pixelDiff=Math.abs(pe.width-s)+Math.abs(pe.height-o),pe));Au(K,(pe,ye)=>pe.pixelDiff===ye.pixelDiff?ye.bandwidth-pe.bandwidth:pe.pixelDiff-ye.pixelDiff),W=K[0]}const oe=W||X||N||M||x[0]||_[0];if(oe&&oe.playlist){let K="sortedPlaylistReps";return W?K="leastPixelDiffRep":X?K="resolutionPlusOneRep":N?K="resolutionBestRep":M?K="bandwidthBestRep":x[0]&&(K="enabledPlaylistReps"),Up(`choosing ${px(oe)} using ${K} with options`,p),oe.playlist}return Up("could not choose a playlist with options",p),null};const gx=function(){let r=this.useDevicePixelRatio&&U.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),mx({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(wu(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(wu(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?wu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},x5=function(r){let e=-1,i=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let s=this.useDevicePixelRatio&&U.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=r*this.systemBandwidth+(1-r)*e,i=this.systemBandwidth),mx({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(wu(this.tech_.el(),"width"),10)*s,playerHeight:parseInt(wu(this.tech_.el(),"height"),10)*s,playerObjectFit:this.usePlayerObjectFit?wu(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},E5=function(r){const{main:e,currentTime:i,bandwidth:s,duration:o,segmentDuration:l,timeUntilRebuffer:c,currentTimeline:f,syncController:p}=r,b=e.playlists.filter(M=>!wn.isIncompatible(M));let _=b.filter(wn.isEnabled);_.length||(_=b.filter(M=>!wn.isDisabled(M)));const w=_.filter(wn.hasAttribute.bind(null,"BANDWIDTH")).map(M=>{const q=p.getSyncPoint(M,o,f,i)?1:2,G=wn.estimateSegmentRequestTime(l,s,M)*q-c;return{playlist:M,rebufferingImpact:G}}),D=w.filter(M=>M.rebufferingImpact<=0);return Au(D,(M,A)=>Uy(A.playlist,M.playlist)),D.length?D[0]:(Au(w,(M,A)=>M.rebufferingImpact-A.rebufferingImpact),w[0]||null)},C5=function(){const r=this.playlists.main.playlists.filter(wn.isEnabled);return Au(r,(i,s)=>Uy(i,s)),r.filter(i=>!!Pd(this.playlists.main,i).video)[0]||null},w5=r=>{let e=0,i;return r.bytes&&(i=new Uint8Array(r.bytes),r.segments.forEach(s=>{i.set(s,e),e+=s.byteLength})),i};function yx(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const A5=function(r,e,i){if(!r[i]){e.trigger({type:"usage",name:"vhs-608"});let s=i;/^cc708_/.test(i)&&(s="SERVICE"+i.split("_")[1]);const o=e.textTracks().getTrackById(s);if(o)r[i]=o;else{const l=e.options_.vhs&&e.options_.vhs.captionServices||{};let c=i,f=i,p=!1;const b=l[s];b&&(c=b.label,f=b.language,p=b.default),r[i]=e.addRemoteTextTrack({kind:"captions",id:s,default:p,label:c,language:f},!1).track}}},k5=function({inbandTextTracks:r,captionArray:e,timestampOffset:i}){if(!e)return;const s=U.WebKitDataCue||U.VTTCue;e.forEach(o=>{const l=o.stream;o.content?o.content.forEach(c=>{const f=new s(o.startTime+i,o.endTime+i,c.text);f.line=c.line,f.align="left",f.position=c.position,f.positionAlign="line-left",r[l].addCue(f)}):r[l].addCue(new s(o.startTime+i,o.endTime+i,o.text))})},D5=function(r){Object.defineProperties(r.frame,{id:{get(){return H.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return H.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return H.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},O5=({inbandTextTracks:r,metadataArray:e,timestampOffset:i,videoDuration:s})=>{if(!e)return;const o=U.WebKitDataCue||U.VTTCue,l=r.metadataTrack_;if(!l||(e.forEach(_=>{const x=_.cueTime+i;typeof x!="number"||U.isNaN(x)||x<0||!(x<1/0)||!_.frames||!_.frames.length||_.frames.forEach(w=>{const D=new o(x,x,w.value||w.url||w.data||"");D.frame=w,D.value=w,D5(D),l.addCue(D)})}),!l.cues||!l.cues.length))return;const c=l.cues,f=[];for(let _=0;_<c.length;_++)c[_]&&f.push(c[_]);const p=f.reduce((_,x)=>{const w=_[x.startTime]||[];return w.push(x),_[x.startTime]=w,_},{}),b=Object.keys(p).sort((_,x)=>Number(_)-Number(x));b.forEach((_,x)=>{const w=p[_],D=isFinite(s)?s:_,M=Number(b[x+1])||D;w.forEach(A=>{A.endTime=M})})},R5={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"},M5=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),L5=({inbandTextTracks:r,dateRanges:e})=>{const i=r.metadataTrack_;if(!i)return;const s=U.WebKitDataCue||U.VTTCue;e.forEach(o=>{for(const l of Object.keys(o)){if(M5.has(l))continue;const c=new s(o.startTime,o.endTime,"");c.id=o.id,c.type="com.apple.quicktime.HLS",c.value={key:R5[l],data:o[l]},(l==="scte35Out"||l==="scte35In")&&(c.value.data=new Uint8Array(c.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(c)}o.processDateRange()})},vx=(r,e,i)=>{r.metadataTrack_||(r.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,H.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Nd=function(r,e,i){let s,o;if(i&&i.cues)for(s=i.cues.length;s--;)o=i.cues[s],o.startTime>=r&&o.endTime<=e&&i.removeCue(o)},I5=function(r){const e=r.cues;if(!e)return;const i={};for(let s=e.length-1;s>=0;s--){const o=e[s],l=`${o.startTime}-${o.endTime}-${o.text}`;i[l]?r.removeCue(o):i[l]=o}},P5=(r,e,i)=>{if(typeof e>"u"||e===null||!r.length)return[];const s=Math.ceil((e-i+3)*Lo.ONE_SECOND_IN_TS);let o;for(o=0;o<r.length&&!(r[o].pts>s);o++);return r.slice(o)},N5=(r,e,i)=>{if(!e.length)return r;if(i)return e.slice();const s=e[0].pts;let o=0;for(o;o<r.length&&!(r[o].pts>=s);o++);return r.slice(0,o).concat(e)},B5=(r,e,i,s)=>{const o=Math.ceil((e-s)*Lo.ONE_SECOND_IN_TS),l=Math.ceil((i-s)*Lo.ONE_SECOND_IN_TS),c=r.slice();let f=r.length;for(;f--&&!(r[f].pts<=l););if(f===-1)return c;let p=f+1;for(;p--&&!(r[p].pts<=o););return p=Math.max(p,0),c.splice(p,f-p+1),c},U5=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const i=Object.keys(r).sort(),s=Object.keys(e).sort();if(i.length!==s.length)return!1;for(let o=0;o<i.length;o++){const l=i[o];if(l!==s[o]||r[l]!==e[l])return!1}return!0},q5=function(r,e,i){e=e||[];const s=[];let o=0;for(let l=0;l<e.length;l++){const c=e[l];if(r===c.timeline&&(s.push(l),o+=c.duration,o>i))return l}return s.length===0?0:s[s.length-1]},Bd=1,F5=500,bx=r=>typeof r=="number"&&isFinite(r),qp=1/60,j5=(r,e,i)=>r!=="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,H5=(r,e,i)=>{let s=e-Oi.BACK_BUFFER_LENGTH;r.length&&(s=Math.max(s,r.start(0)));const o=e-i;return Math.min(o,s)},ku=r=>{const{startOfSegment:e,duration:i,segment:s,part:o,playlist:{mediaSequence:l,id:c,segments:f=[]},mediaIndex:p,partIndex:b,timeline:_}=r,x=f.length-1;let w="mediaIndex/partIndex increment";r.getMediaInfoForTime?w=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(w="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(w+=` with independent ${r.independent}`);const D=typeof b=="number",M=r.segment.uri?"segment":"pre-segment",A=D?CS({preloadSegment:s})-1:0;return`${M} [${l+p}/${l+x}]`+(D?` part [${b}/${A}]`:"")+` segment start/end [${s.start} => ${s.end}]`+(D?` part start/end [${o.start} => ${o.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${_}] selected by [${w}] playlist [${c}]`},_x=r=>`${r}TimingInfo`,z5=({segmentTimeline:r,currentTimeline:e,startOfSegment:i,buffered:s,overrideCheck:o})=>!o&&r===e?null:r<e?i:s.length?s.end(s.length-1):i,qy=({timelineChangeController:r,currentTimeline:e,segmentTimeline:i,loaderType:s,audioDisabled:o})=>{if(e===i)return!1;if(s==="audio"){const l=r.lastTimelineChange({type:"main"});return!l||l.to!==i}if(s==="main"&&o){const l=r.pendingTimelineChange({type:"audio"});return!(l&&l.to===i)}return!1},V5=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),i=r.pendingTimelineChange({type:"main"}),s=e&&i,o=s&&e.to!==i.to;return!!(s&&e.from!==-1&&i.from!==-1&&o)},$5=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},qa=r=>{const e=r.pendingSegment_;if(!e)return;if(qy({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&V5(r.timelineChangeController_)){if($5(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},G5=r=>{let e=0;return["video","audio"].forEach(function(i){const s=r[`${i}TimingInfo`];if(!s)return;const{start:o,end:l}=s;let c;typeof o=="bigint"||typeof l=="bigint"?c=U.BigInt(l)-U.BigInt(o):typeof o=="number"&&typeof l=="number"&&(c=l-o),typeof c<"u"&&c>e&&(e=c)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},Tx=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+nr:!1,Y5=(r,e)=>{if(e!=="hls")return null;const i=G5({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!i)return null;const s=r.playlist.targetDuration,o=Tx({segmentDuration:i,maxDuration:s*2}),l=Tx({segmentDuration:i,maxDuration:s}),c=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${i} when the reported duration is ${r.duration} and the target duration is ${s}. 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||l?{severity:o?"warn":"info",message:c}:null},zo=({type:r,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),s=!!(e.map&&!e.map.bytes),o=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:o,duration:e.duration,isEncrypted:i,isMediaInitialization:s}};class Fy extends H.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_=us(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(s){s!==this.state_&&(this.logger_(`${this.state_} -> ${s}`),this.state_=s,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qa(this)}),this.sourceUpdater_.on("codecschange",s=>{this.trigger(ei({type:"codecschange"},s))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():qa(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",s=>{this.trigger(ei({type:"timelinechange"},s)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():qa(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qa(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Py.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_&&U.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,U.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_&&Py.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Di();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:s,isMuxed:o}=e;if(s&&i&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(s)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const s=Bp(e);let o=this.initSegments_[s];return i&&!o&&e.bytes&&(this.initSegments_[s]=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 s=XS(e);let o=this.keyCache_[s];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[s]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});const l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l}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 s=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 l=null;if(s&&(s.id?l=s.id:s.uri&&(l=s.uri)),this.logger_(`playlist update [${l} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
|
||
currentTime: ${this.currentTime_()}
|
||
bufferedEnd: ${Sy(this.buffered_())}
|
||
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!s||s.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-s.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 p=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=p}}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(s,e)}pause(){this.checkBufferTimeout_&&(U.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_&&Py.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,s=()=>{},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 l=1;const c=()=>{l--,l===0&&s()};(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,i,c)),(o||this.loaderType_==="main")&&(this.gopBuffer_=B5(this.gopBuffer_,e,i,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,i,c));for(const f in this.inbandTextTracks_)Nd(e,i,this.inbandTextTracks_[f]);Nd(e,i,this.segmentMetadataTrack_),c()}monitorBuffer_(){this.checkBufferTimeout_&&U.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=U.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&U.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=U.setTimeout(this.monitorBufferTick_.bind(this),F5)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:zo({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_,s=this.partIndex){if(!i||!this.mediaSource_)return!1;const o=typeof e=="number"&&i.segments[e],l=e+1===i.segments.length,c=!o||!o.parts||s+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&l&&c}chooseNextRequest_(){const e=this.buffered_(),i=Sy(e)||0,s=xy(e,this.currentTime_()),o=!this.hasPlayed_()&&s>=1,l=s>=this.goalBufferLength_(),c=this.playlist_.segments;if(!c.length||o||l)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=q5(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 w=c[this.mediaIndex],D=typeof this.partIndex=="number"?this.partIndex:-1;f.startOfSegment=w.end?w.end:i,w.parts&&w.parts[D+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=D+1):f.mediaIndex=this.mediaIndex+1}else{let w,D,M;const A=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
||
For TargetTime: ${A}.
|
||
CurrentTime: ${this.currentTime_()}
|
||
BufferedEnd: ${i}
|
||
Fetch At Buffer: ${this.fetchAtBuffer_}
|
||
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const q=this.getSyncInfoFromMediaSequenceSync_(A);if(!q){const N="No sync info found while using media sequence sync";return this.error({message:N,metadata:{errorType:H.Error.StreamingFailedToSelectNextSegment,error:new Error(N)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${q.start} --> ${q.end})`),w=q.segmentIndex,D=q.partIndex,M=q.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const q=wn.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:A,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});w=q.segmentIndex,D=q.partIndex,M=q.startTime}f.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${A}`:`currentTime ${A}`,f.mediaIndex=w,f.startOfSegment=M,f.partIndex=D,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${f.mediaIndex} `)}const p=c[f.mediaIndex];let b=p&&typeof f.partIndex=="number"&&p.parts&&p.parts[f.partIndex];if(!p||typeof f.partIndex=="number"&&!b)return null;typeof f.partIndex!="number"&&p.parts&&(f.partIndex=0,b=p.parts[0]);const _=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!s&&b&&!_&&!b.independent)if(f.partIndex===0){const w=c[f.mediaIndex-1],D=w.parts&&w.parts.length&&w.parts[w.parts.length-1];D&&D.independent&&(f.mediaIndex-=1,f.partIndex=w.parts.length-1,f.independent="previous segment")}else p.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");const x=this.mediaSource_&&this.mediaSource_.readyState==="ended";return f.mediaIndex>=c.length-1&&x&&!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 s=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!s)return null;if(!s.isAppended)return s;const o=this.mediaSequenceSync_.getSyncInfoForTime(s.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:s,mediaIndex:o,startOfSegment:l,isSyncRequest:c,partIndex:f,forceTimestampOffset:p,getMediaInfoForTime:b}=e,_=s.segments[o],x=typeof f=="number"&&_.parts[f],w={requestId:"segment-loader-"+Math.random(),uri:x&&x.resolvedUri||_.resolvedUri,mediaIndex:o,partIndex:x?f:null,isSyncRequest:c,startOfSegment:l,playlist:s,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:_.timeline,duration:x&&x.duration||_.duration,segment:_,part:x,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:b,independent:i},D=typeof p<"u"?p:this.isPendingTimestampOffset_;w.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:_.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:D});const M=Sy(this.sourceUpdater_.audioBuffered());return typeof M=="number"&&(w.audioAppendStart=M-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(w.gopsToAlignWith=P5(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),w}timestampOffsetForSegment_(e){return z5(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_(),s=e.bandwidth,o=this.pendingSegment_.duration,l=wn.estimateSegmentRequestTime(o,s,this.playlist_,e.bytesReceived),c=p8(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(l<=c)return;const f=E5({main:this.vhs_.playlists.main,currentTime:i,bandwidth:s,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:c,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!f)return;const b=l-c-f.rebufferingImpact;let _=.5;c<=nr&&(_=1),!(!f.playlist||f.playlist.uri===this.playlist_.uri||b<_)&&(this.bandwidth=f.playlist.attributes.BANDWIDTH*Oi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${ku(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:s,hasVideo:o}=i,l={segmentInfo:zo({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:s,hasVideo:o}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:l}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},U5(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_():qa(this))))}handleTimingInfo_(e,i,s,o){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const l=this.pendingSegment_,c=_x(i);l[c]=l[c]||{},l[c][s]=o,this.logger_(`timinginfo: ${i} - ${s} - ${o}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():qa(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(),l={};i.forEach(c=>{l[c.stream]=l[c.stream]||{startTime:1/0,captions:[],endTime:0};const f=l[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(l).forEach(c=>{const{startTime:f,endTime:p,captions:b}=l[c],_=this.inbandTextTracks_;this.logger_(`adding cues from ${f} -> ${p} for ${c}`),A5(_,this.vhs_.tech_,c),Nd(f,p,_[c]),k5({captionArray:b,inbandTextTracks:_,timestampOffset:o})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,s));return}this.addMetadataToTextTrack(s,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_()?!qy({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:s,hasVideo:o,isMuxed:l}=i;return!(o&&!e.videoTimingInfo||s&&!this.audioDisabled_&&!l&&!e.audioTimingInfo||qy({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_()){qa(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return}const s=this.pendingSegment_;if(this.setTimeMapping_(s.timeline),this.updateMediaSecondsLoaded_(s.part||s.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),s.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),s.isFmp4=e.isFmp4,s.timingInfo=s.timingInfo||{},s.isFmp4)this.trigger("fmp4"),s.timingInfo.start=s[_x(i.type)].start;else{const o=this.getCurrentMediaInfo_(),l=this.loaderType_==="main"&&o&&o.hasVideo;let c;l&&(c=s.videoTimingInfo.start),s.timingInfo.start=this.trueSegmentStart_({currentStart:s.timingInfo.start,playlist:s.playlist,mediaIndex:s.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:l,firstVideoFrameTimeForData:c,videoTimingInfo:s.videoTimingInfo,audioTimingInfo:s.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(s,i.type),this.updateSourceBufferTimestampOffset_(s),s.isSyncRequest){this.updateTimingInfoEnd_(s),this.syncController_.saveSegmentTimingInfo({segmentInfo:s,shouldSaveTimelineMapping:this.loaderType_==="main"});const o=this.chooseNextRequest_();if(o.mediaIndex!==s.mediaIndex||o.partIndex!==s.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}s.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(s,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:s,playlist:o}){if(s){const l=Bp(s);if(this.activeInitSegmentId_===l)return null;i=this.initSegmentForMap(s,!0).bytes,this.activeInitSegmentId_=l}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=o,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:s},o){const l=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+jo(l).join(", ")),c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+jo(c).join(", "));const f=l.length?l.start(0):0,p=l.length?l.end(l.length-1):0,b=c.length?c.start(0):0,_=c.length?c.end(c.length-1):0;if(p-f<=Bd&&_-b<=Bd){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${s.byteLength}, audio buffer: ${jo(l).join(", ")}, video buffer: ${jo(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:s}));const w=this.currentTime_()-Bd;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${w}`),this.remove(0,w,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Bd}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=U.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Bd*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:s},o){if(o){if(o.code===US){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:s});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",o),this.error({message:`${i} append of ${s.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:H.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:o,bytes:l}){if(!l){const f=[o];let p=o.byteLength;s&&(f.unshift(s),p+=s.byteLength),l=w5({bytes:p,segments:f})}const c={segmentInfo:zo({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:c}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:l}))}handleSegmentTimingInfo_(e,i,s){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const o=this.pendingSegment_.segment,l=`${e}TimingInfo`;o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=s.prependedContentDuration||0,o[l].transmuxedPresentationStart=s.start.presentation,o[l].transmuxedDecodeStart=s.start.decode,o[l].transmuxedPresentationEnd=s.end.presentation,o[l].transmuxedDecodeEnd=s.end.decode,o[l].baseMediaDecodeTime=s.baseMediaDecodeTime}appendData_(e,i){const{type:s,data:o}=i;if(!o||!o.byteLength||s==="audio"&&this.audioDisabled_)return;const l=this.getInitSegmentAndUpdateState_({type:s,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:s,initSegment:l,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_()){qa(this),this.loadQueue_.push(()=>{const i=ei({},e,{forceTimestampOffset:!0});ei(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),s=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),o=this.mediaIndex!==null,l=e.timeline!==this.currentTimeline_&&e.timeline>0,c=s||o&&l;this.logger_(`Requesting
|
||
${yx(e.uri)}
|
||
${ku(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=T5({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:p,stream:b})=>{this.logger_(`${ku(e)} logged from transmuxer stream ${b} as a ${p}: ${f}`)},triggerSegmentEventFn:({type:f,segment:p,keyInfo:b,trackInfo:_,timingInfo:x})=>{const D={segmentInfo:zo({segment:p})};b&&(D.keyInfo=b),_&&(D.trackInfo=_),x&&(D.timingInfo=x),this.trigger({type:f,metadata:D})}})}trimBackBuffer_(e){const i=H5(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,s=e.part,o=e.segment.key||e.segment.map&&e.segment.map.key,l=e.segment.map&&!e.segment.map.bytes,c={resolvedUri:s?s.resolvedUri:i.resolvedUri,byterange:s?s.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:l},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 p=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);c.key=this.segmentKey(i.key),c.key.iv=p}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<qp){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${qp}`);return}const s={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:s}),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,s){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,s));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===rr.ABORTED)return;if(this.pause(),e.code===rr.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,s.gopInfo&&(this.gopBuffer_=N5(this.gopBuffer_,s.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:s,firstVideoFrameTimeForData:o,currentVideoTimestampOffset:l,useVideoTimingInfo:c,videoTimingInfo:f,audioTimingInfo:p}){if(typeof e<"u")return e;if(!c)return p.start;const b=i.segments[s-1];return s===0||!b||typeof b.start>"u"||b.end!==o+l?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:s,hasVideo:o,isMuxed:l}=i,c=this.loaderType_==="main"&&o,f=!this.audioDisabled_&&s&&!l;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=j5(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:s}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:s.start:s.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 p={segmentInfo:zo({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:p})}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=Y5(e,this.sourceType_);if(i&&(i.severity==="warn"?H.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 ${ku(e)}`);return}this.logger_(`Appended ${ku(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 s=e.segment,o=e.part,l=s.end&&this.currentTime_()-s.end>e.playlist.targetDuration*3,c=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(l||c){this.logger_(`bad ${l?"segment":"part"} ${ku(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<qp){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${qp}`);return}const i=this.throughput.rate,s=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/s*8*1e3);this.throughput.rate+=(o-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,s=i.start,o=i.end;if(!bx(s)||!bx(o))return;Nd(s,o,this.segmentMetadataTrack_);const l=U.WebKitDataCue||U.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:s,end:o},f=JSON.stringify(c),p=new l(s,o,f);p.value=c,this.segmentMetadataTrack_.addCue(p)}}function Gr(){}const Sx=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},X5=["video","audio"],jy=(r,e)=>{const i=e[`${r}Buffer`];return i&&i.updating||e.queuePending[r]},W5=(r,e)=>{for(let i=0;i<e.length;i++){const s=e[i];if(s.type==="mediaSource")return null;if(s.type===r)return i}return null},Du=(r,e)=>{if(e.queue.length===0)return;let i=0,s=e.queue[i];if(s.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),s.action(e),s.doneFn&&s.doneFn(),Du("audio",e),Du("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||jy(r,e))){if(s.type!==r){if(i=W5(r,e.queue),i===null)return;s=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[r]=s,s.action(r,e),!s.doneFn){e.queuePending[r]=null,Du(r,e);return}}},xx=(r,e)=>{const i=e[`${r}Buffer`],s=Sx(r);i&&(i.removeEventListener("updateend",e[`on${s}UpdateEnd_`]),i.removeEventListener("error",e[`on${s}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},ar=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,Hn={appendBuffer:(r,e,i)=>(s,o)=>{const l=o[`${s}Buffer`];if(ar(o.mediaSource,l)){o.logger_(`Appending segment ${e.mediaIndex}'s ${r.length} bytes to ${s}Buffer`);try{l.appendBuffer(r)}catch(c){o.logger_(`Error with code ${c.code} `+(c.code===US?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${s}Buffer`),o.queuePending[s]=null,i(c)}}},remove:(r,e)=>(i,s)=>{const o=s[`${i}Buffer`];if(ar(s.mediaSource,o)){s.logger_(`Removing ${r} to ${e} from ${i}Buffer`);try{o.remove(r,e)}catch{s.logger_(`Remove ${r} to ${e} from ${i}Buffer failed`)}}},timestampOffset:r=>(e,i)=>{const s=i[`${e}Buffer`];ar(i.mediaSource,s)&&(i.logger_(`Setting ${e}timestampOffset to ${r}`),s.timestampOffset=r)},callback:r=>(e,i)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(i){H.log.warn("Failed to call media source endOfStream",i)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(i){H.log.warn("Failed to set media source duration",i)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${r}Buffer`];if(ar(e.mediaSource,i)){e.logger_(`calling abort on ${r}Buffer`);try{i.abort()}catch(s){H.log.warn(`Failed to abort on ${r}Buffer`,s)}}},addSourceBuffer:(r,e)=>i=>{const s=Sx(r),o=$l(e);i.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const l=i.mediaSource.addSourceBuffer(o);l.addEventListener("updateend",i[`on${s}UpdateEnd_`]),l.addEventListener("error",i[`on${s}Error_`]),i.codecs[r]=e,i[`${r}Buffer`]=l},removeSourceBuffer:r=>e=>{const i=e[`${r}Buffer`];if(xx(r,e),!!ar(e.mediaSource,i)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(s){H.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,s)}}},changeType:r=>(e,i)=>{const s=i[`${e}Buffer`],o=$l(r);if(!ar(i.mediaSource,s))return;const l=r.substring(0,r.indexOf(".")),c=i.codecs[e];if(c.substring(0,c.indexOf("."))===l)return;const p={codecsChangeInfo:{from:c,to:r}};i.trigger({type:"codecschange",metadata:p}),i.logger_(`changing ${e}Buffer codec from ${c} to ${r}`);try{s.changeType(o),i.codecs[e]=r}catch(b){p.errorType=H.Error.StreamingCodecsChangeError,p.error=b,b.metadata=p,i.error_=b,i.trigger("error"),H.log.warn(`Failed to changeType on ${e}Buffer`,b)}}},zn=({type:r,sourceUpdater:e,action:i,doneFn:s,name:o})=>{e.queue.push({type:r,action:i,doneFn:s,name:o}),Du(r,e)},Ex=(r,e)=>i=>{const s=e[`${r}Buffered`](),o=d8(s);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,o),e.queuePending[r]){const l=e.queuePending[r].doneFn;e.queuePending[r]=null,l&&l(e[`${r}Error_`])}Du(r,e)};class Cx extends H.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>Du("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=us("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Ex("video",this),this.onAudioUpdateEnd_=Ex("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){zn({type:"mediaSource",sourceUpdater:this,action:Hn.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){zn({type:e,sourceUpdater:this,action:Hn.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){H.log.error("removeSourceBuffer is not supported!");return}zn({type:"mediaSource",sourceUpdater:this,action:Hn.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!H.browser.IS_FIREFOX&&U.MediaSource&&U.MediaSource.prototype&&typeof U.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return U.SourceBuffer&&U.SourceBuffer.prototype&&typeof U.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){H.log.error("changeType is not supported!");return}zn({type:e,sourceUpdater:this,action:Hn.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 s=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,s);this.canChangeType()&&this.changeType(i,s)})}appendBuffer(e,i){const{segmentInfo:s,type:o,bytes:l}=e;if(this.processedAppend_=!0,o==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${l.length} until video append`);return}const c=i;if(zn({type:o,sourceUpdater:this,action:Hn.appendBuffer(l,s||{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(p=>{this.appendBuffer.apply(this,p)})}}audioBuffered(){return ar(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Di()}videoBuffered(){return ar(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Di()}buffered(){const e=ar(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=ar(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():f8(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=Gr){zn({type:"mediaSource",sourceUpdater:this,action:Hn.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=Gr){typeof e!="string"&&(e=void 0),zn({type:"mediaSource",sourceUpdater:this,action:Hn.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,s=Gr){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){s();return}zn({type:"audio",sourceUpdater:this,action:Hn.remove(e,i),doneFn:s,name:"remove"})}removeVideo(e,i,s=Gr){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){s();return}zn({type:"video",sourceUpdater:this,action:Hn.remove(e,i),doneFn:s,name:"remove"})}updating(){return!!(jy("audio",this)||jy("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(zn({type:"audio",sourceUpdater:this,action:Hn.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(zn({type:"video",sourceUpdater:this,action:Hn.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&zn({type:"audio",sourceUpdater:this,action:Hn.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&zn({type:"video",sourceUpdater:this,action:Hn.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),X5.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>xx(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const wx=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),Q5=r=>{const e=new Uint8Array(r);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},Ax=new Uint8Array(`
|
||
|
||
`.split("").map(r=>r.charCodeAt(0)));class K5 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class Z5 extends Fy{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 Di();const e=this.subtitlesTrack_.cues,i=e[0].startTime,s=e[e.length-1].startTime;return Di([[i,s]])}initSegmentForMap(e,i=!1){if(!e)return null;const s=Bp(e);let o=this.initSegments_[s];if(i&&!o&&e.bytes){const l=Ax.byteLength+e.bytes.byteLength,c=new Uint8Array(l);c.set(e.bytes),c.set(Ax,e.bytes.byteLength),this.initSegments_[s]=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){Nd(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,s){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===rr.TIMEOUT&&this.handleTimeout_(),e.code===rr.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const o=this.pendingSegment_,l=s.mp4VttCues&&s.mp4VttCues.length;l&&(o.mp4VttCues=s.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 U.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,s),()=>this.stopForError({message:"Error loading vtt.js"}));return}c.requested=!0;try{this.parseVTTCues_(o)}catch(f){this.stopForError({message:f.message,metadata:{errorType:H.Error.StreamingVttParserError,error:f}});return}if(l||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 U.VTTCue(f.startTime,f.endTime,f.text):f)}),I5(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const s=e&&e.type==="vtt",o=i&&i.type==="text";s&&o&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(s=>{const o=s.start+i,l=s.end+i,c=new U.VTTCue(o,l,s.cueText);s.settings&&s.settings.split(" ").forEach(f=>{const p=f.split(":"),b=p[0],_=p[1];c[b]=isNaN(_)?_:Number(_)}),e.cues.push(c)})}parseVTTCues_(e){let i,s=!1;if(typeof U.WebVTT!="function")throw new K5;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof U.TextDecoder=="function"?i=new U.TextDecoder("utf8"):(i=U.WebVTT.StringDecoder(),s=!0);const o=new U.WebVTT.Parser(U,U.vttjs,i);if(o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=c=>{e.timestampmap=c},o.onparsingerror=c=>{H.log.warn("Error encountered when parsing cues: "+c.message)},e.segment.map){let c=e.segment.map.bytes;s&&(c=wx(c)),o.parse(c)}let l=e.bytes;s&&(l=wx(l)),o.parse(l),o.flush()}updateTimeMapping_(e,i,s){const o=e.segment;if(!i)return;if(!e.cues.length){o.empty=!0;return}const{MPEGTS:l,LOCAL:c}=e.timestampmap,p=l/Lo.ONE_SECOND_IN_TS-c+i.mapping;if(e.cues.forEach(b=>{const _=b.endTime-b.startTime,x=this.handleRollover_(b.startTime+p,i.time);b.startTime=Math.max(x,0),b.endTime=Math.max(x+_,0)}),!s.syncInfo){const b=e.cues[0].startTime,_=e.cues[e.cues.length-1].startTime;s.syncInfo={mediaSequence:s.mediaSequence+e.mediaIndex,time:Math.min(b,_-o.duration)}}}handleRollover_(e,i){if(i===null)return e;let s=e*Lo.ONE_SECOND_IN_TS;const o=i*Lo.ONE_SECOND_IN_TS;let l;for(o<s?l=-8589934592:l=8589934592;Math.abs(s-o)>4294967296;)s+=l;return s/Lo.ONE_SECOND_IN_TS}}const J5=function(r,e){const i=r.cues;for(let s=0;s<i.length;s++){const o=i[s];if(e>=o.adStartTime&&e<=o.adEndTime)return o}return null},eR=function(r,e,i=0){if(!r.segments)return;let s=i,o;for(let l=0;l<r.segments.length;l++){const c=r.segments[l];if(o||(o=J5(e,s+c.duration/2)),o){if("cueIn"in c){o.endTime=s,o.adEndTime=s,s+=c.duration,o=null;continue}if(s<o.endTime){s+=c.duration;continue}o.endTime+=c.duration}else if("cueOut"in c&&(o=new U.VTTCue(s,s+c.duration,c.cueOut),o.adStartTime=s,o.adEndTime=s+parseFloat(c.cueOut),e.addCue(o)),"cueOutCont"in c){const[f,p]=c.cueOutCont.split("/").map(parseFloat);o=new U.VTTCue(s,s+c.duration,""),o.adStartTime=s-f,o.adEndTime=o.adStartTime+p,e.addCue(o)}s+=c.duration}};class kx{constructor({start:e,end:i,segmentIndex:s,partIndex:o=null,appended:l=!1}){this.start_=e,this.end_=i,this.segmentIndex_=s,this.partIndex_=o,this.appended_=l}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 tR{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 Dx{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:s,segments:o}=e;if(this.isReliable_=this.isReliablePlaylist_(s,o),!!this.isReliable_)return this.updateStorage_(o,s,this.calculateBaseTime_(s,o,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:s}of this.storage_.values())if(s.length){for(const o of s)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,s){const o=new Map;let l=`
|
||
`,c=s,f=i;this.start_=c,e.forEach((p,b)=>{const _=this.storage_.get(f),x=c,w=x+p.duration,D=!!(_&&_.segmentSyncInfo&&_.segmentSyncInfo.isAppended),M=new kx({start:x,end:w,appended:D,segmentIndex:b});p.syncInfo=M;let A=c;const q=(p.parts||[]).map((N,G)=>{const $=A,X=A+N.duration,W=!!(_&&_.partsSyncInfo&&_.partsSyncInfo[G]&&_.partsSyncInfo[G].isAppended),oe=new kx({start:$,end:X,appended:W,segmentIndex:b,partIndex:G});return A=X,l+=`Media Sequence: ${f}.${G} | Range: ${$} --> ${X} | Appended: ${W}
|
||
`,N.syncInfo=oe,oe});o.set(f,new tR(M,q)),l+=`${yx(p.resolvedUri)} | Media Sequence: ${f} | Range: ${x} --> ${w} | Appended: ${D}
|
||
`,f++,c=w}),this.end_=c,this.storage_=o,this.diagnostics_=l}calculateBaseTime_(e,i,s){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 l=o-e;let c=this.storage_.get(o).segmentSyncInfo.start;for(let f=0;f<l;f++){const p=i[f];c-=p.duration}return c}return s}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class Ox extends Dx{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,s){if(!this.storage_.size){const o=this.parent_.getSyncInfoForMediaSequence(e);return o?o.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,s)}}const iR=86400,Hy=[{name:"VOD",run:(r,e,i,s,o)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,i,s,o,l)=>{const c=r.getMediaSequenceSync(l);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:(r,e,i,s,o)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let l=null,c=null;const f=Cy(e);o=o||0;for(let p=0;p<f.length;p++){const b=e.endList||o===0?p:f.length-(p+1),_=f[b],x=_.segment,w=r.timelineToDatetimeMappings[x.timeline];if(!w||!x.dateTimeObject)continue;let M=x.dateTimeObject.getTime()/1e3+w;if(x.parts&&typeof _.partIndex=="number")for(let q=0;q<_.partIndex;q++)M+=x.parts[q].duration;const A=Math.abs(o-M);if(c!==null&&(A===0||c<A))break;c=A,l={time:M,segmentIndex:_.segmentIndex,partIndex:_.partIndex}}return l}},{name:"Segment",run:(r,e,i,s,o)=>{let l=null,c=null;o=o||0;const f=Cy(e);for(let p=0;p<f.length;p++){const b=e.endList||o===0?p:f.length-(p+1),_=f[b],x=_.segment,w=_.part&&_.part.start||x&&x.start;if(x.timeline===s&&typeof w<"u"){const D=Math.abs(o-w);if(c!==null&&c<D)break;(!l||c===null||c>=D)&&(c=D,l={time:w,segmentIndex:_.segmentIndex,partIndex:_.partIndex})}}return l}},{name:"Discontinuity",run:(r,e,i,s,o)=>{let l=null;if(o=o||0,e.discontinuityStarts&&e.discontinuityStarts.length){let c=null;for(let f=0;f<e.discontinuityStarts.length;f++){const p=e.discontinuityStarts[f],b=e.discontinuitySequence+f+1,_=r.discontinuities[b];if(_){const x=Math.abs(o-_.time);if(c!==null&&c<x)break;(!l||c===null||c>=x)&&(c=x,l={time:_.time,segmentIndex:p,partIndex:null})}}}return l}},{name:"Playlist",run:(r,e,i,s,o)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class nR extends H.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new Dx,s=new Ox(i),o=new Ox(i);this.mediaSequenceStorage_={main:i,audio:s,vtt:o},this.logger_=us("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,s,o,l){if(i!==1/0)return Hy.find(({name:p})=>p==="VOD").run(this,e,i);const c=this.runStrategies_(e,i,s,o,l);if(!c.length)return null;for(const f of c){const{syncPoint:p,strategy:b}=f,{segmentIndex:_,time:x}=p;if(_<0)continue;const w=e.segments[_],D=x,M=D+w.duration;if(this.logger_(`Strategy: ${b}. Current time: ${o}. selected segment: ${_}. Time: [${D} -> ${M}]}`),o>=D&&o<M)return this.logger_("Found sync point with exact match: ",p),p}return this.selectSyncPoint_(c,{key:"time",value:o})}getExpiredTime(e,i){if(!e||!e.segments)return null;const s=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!s.length)return null;const o=this.selectSyncPoint_(s,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+Md({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))}runStrategies_(e,i,s,o,l){const c=[];for(let f=0;f<Hy.length;f++){const p=Hy[f],b=p.run(this,e,i,s,o,l);b&&(b.strategy=p.name,c.push({strategy:p.name,syncPoint:b}))}return c}selectSyncPoint_(e,i){let s=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),l=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,s=e[c].syncPoint,l=e[c].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${l}]: [time:${s.time}, segmentIndex:${s.segmentIndex}`+(typeof s.partIndex=="number"?`,partIndex:${s.partIndex}`:"")+"]"),s}saveExpiredSegmentInfo(e,i){const s=i.mediaSequence-e.mediaSequence;if(s>iR){H.log.warn(`Not saving expired segment info. Media sequence gap ${s} is too large.`);return}for(let o=s-1;o>=0;o--){const l=e.segments[o];if(l&&typeof l.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:l.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],s=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-s}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const s=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),o=e.segment;s&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:o.start}));const l=o.dateTimeObject;o.discontinuity&&i&&l&&(this.timelineToDatetimeMappings[o.timeline]=-(l.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,s){const o=e.segment,l=e.part;let c=this.timelines[e.timeline],f,p;if(typeof e.timestampOffset=="number")c={time:e.startOfSegment,mapping:e.startOfSegment-i.start},s&&(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,p=i.end+c.mapping;else if(c)f=i.start+c.mapping,p=i.end+c.mapping;else return!1;return l&&(l.start=f,l.end=p),(!o.start||f<o.start)&&(o.start=f),o.end=p,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,s=e.segment;if(s.discontinuity)this.discontinuities[s.timeline]={time:s.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let o=0;o<i.discontinuityStarts.length;o++){const l=i.discontinuityStarts[o],c=i.discontinuitySequence+o+1,f=l-e.mediaIndex,p=Math.abs(f);if(!this.discontinuities[c]||this.discontinuities[c].accuracy>p){let b;f<0?b=s.start-Md({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:l}):b=s.end+Md({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[c]={time:b,accuracy:p}}}}dispose(){this.trigger("dispose"),this.off()}}class sR extends H.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:s}){return typeof i=="number"&&typeof s=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:s},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:s}){if(typeof i=="number"&&typeof s=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:s},delete this.pendingTimelineChanges_[e];const o={timelineChangeInfo:{from:i,to:s}};this.trigger({type:"timelinechange",metadata:o})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const rR=ix(nx(function(){var r=function(){function A(){this.listeners={}}var q=A.prototype;return q.on=function(G,$){this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push($)},q.off=function(G,$){if(!this.listeners[G])return!1;var X=this.listeners[G].indexOf($);return this.listeners[G]=this.listeners[G].slice(0),this.listeners[G].splice(X,1),X>-1},q.trigger=function(G){var $=this.listeners[G];if($)if(arguments.length===2)for(var X=$.length,W=0;W<X;++W)$[W].call(this,arguments[1]);else for(var oe=Array.prototype.slice.call(arguments,1),K=$.length,pe=0;pe<K;++pe)$[pe].apply(this,oe)},q.dispose=function(){this.listeners={}},q.pipe=function(G){this.on("data",function($){G.push($)})},A}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(A){return A.subarray(0,A.byteLength-A[A.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const A=[[[],[],[],[],[]],[[],[],[],[],[]]],q=A[0],N=A[1],G=q[4],$=N[4];let X,W,oe;const K=[],pe=[];let ye,_e,de,le,Z,fe;for(X=0;X<256;X++)pe[(K[X]=X<<1^(X>>7)*283)^X]=X;for(W=oe=0;!G[W];W^=ye||1,oe=pe[oe]||1)for(le=oe^oe<<1^oe<<2^oe<<3^oe<<4,le=le>>8^le&255^99,G[W]=le,$[le]=W,de=K[_e=K[ye=K[W]]],fe=de*16843009^_e*65537^ye*257^W*16843008,Z=K[le]*257^le*16843008,X=0;X<4;X++)q[X][W]=Z=Z<<24^Z>>>8,N[X][le]=fe=fe<<24^fe>>>8;for(X=0;X<5;X++)q[X]=q[X].slice(0),N[X]=N[X].slice(0);return A};let s=null;class o{constructor(q){s||(s=i()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];let N,G,$;const X=this._tables[0][4],W=this._tables[1],oe=q.length;let K=1;if(oe!==4&&oe!==6&&oe!==8)throw new Error("Invalid aes key size");const pe=q.slice(0),ye=[];for(this._key=[pe,ye],N=oe;N<4*oe+28;N++)$=pe[N-1],(N%oe===0||oe===8&&N%oe===4)&&($=X[$>>>24]<<24^X[$>>16&255]<<16^X[$>>8&255]<<8^X[$&255],N%oe===0&&($=$<<8^$>>>24^K<<24,K=K<<1^(K>>7)*283)),pe[N]=pe[N-oe]^$;for(G=0;N;G++,N--)$=pe[G&3?N:N-4],N<=4||G<4?ye[G]=$:ye[G]=W[0][X[$>>>24]]^W[1][X[$>>16&255]]^W[2][X[$>>8&255]]^W[3][X[$&255]]}decrypt(q,N,G,$,X,W){const oe=this._key[1];let K=q^oe[0],pe=$^oe[1],ye=G^oe[2],_e=N^oe[3],de,le,Z;const fe=oe.length/4-2;let Ee,J=4;const ve=this._tables[1],ge=ve[0],Ue=ve[1],te=ve[2],Me=ve[3],Ae=ve[4];for(Ee=0;Ee<fe;Ee++)de=ge[K>>>24]^Ue[pe>>16&255]^te[ye>>8&255]^Me[_e&255]^oe[J],le=ge[pe>>>24]^Ue[ye>>16&255]^te[_e>>8&255]^Me[K&255]^oe[J+1],Z=ge[ye>>>24]^Ue[_e>>16&255]^te[K>>8&255]^Me[pe&255]^oe[J+2],_e=ge[_e>>>24]^Ue[K>>16&255]^te[pe>>8&255]^Me[ye&255]^oe[J+3],J+=4,K=de,pe=le,ye=Z;for(Ee=0;Ee<4;Ee++)X[(3&-Ee)+W]=Ae[K>>>24]<<24^Ae[pe>>16&255]<<16^Ae[ye>>8&255]<<8^Ae[_e&255]^oe[J++],de=K,K=pe,pe=ye,ye=_e,_e=de}}class l extends r{constructor(){super(r),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(q){this.jobs.push(q),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const c=function(A){return A<<24|(A&65280)<<8|(A&16711680)>>8|A>>>24},f=function(A,q,N){const G=new Int32Array(A.buffer,A.byteOffset,A.byteLength>>2),$=new o(Array.prototype.slice.call(q)),X=new Uint8Array(A.byteLength),W=new Int32Array(X.buffer);let oe,K,pe,ye,_e,de,le,Z,fe;for(oe=N[0],K=N[1],pe=N[2],ye=N[3],fe=0;fe<G.length;fe+=4)_e=c(G[fe]),de=c(G[fe+1]),le=c(G[fe+2]),Z=c(G[fe+3]),$.decrypt(_e,de,le,Z,W,fe),W[fe]=c(W[fe]^oe),W[fe+1]=c(W[fe+1]^K),W[fe+2]=c(W[fe+2]^pe),W[fe+3]=c(W[fe+3]^ye),oe=_e,K=de,pe=le,ye=Z;return X};class p{constructor(q,N,G,$){const X=p.STEP,W=new Int32Array(q.buffer),oe=new Uint8Array(q.byteLength);let K=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(W.subarray(K,K+X),N,G,oe)),K=X;K<W.length;K+=X)G=new Uint32Array([c(W[K-4]),c(W[K-3]),c(W[K-2]),c(W[K-1])]),this.asyncStream_.push(this.decryptChunk_(W.subarray(K,K+X),N,G,oe));this.asyncStream_.push(function(){$(null,e(oe))})}static get STEP(){return 32e3}decryptChunk_(q,N,G,$){return function(){const X=f(q,N,G);$.set(X,q.byteOffset)}}}var b=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_;typeof window<"u"?_=window:typeof b<"u"?_=b:typeof self<"u"?_=self:_={};var x=_,w=function(q){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(q):q&&q.buffer instanceof ArrayBuffer},D=x.BigInt||Number;D("0x1"),D("0x100"),D("0x10000"),D("0x1000000"),D("0x100000000"),D("0x10000000000"),D("0x1000000000000"),D("0x100000000000000"),D("0x10000000000000000"),function(){var A=new Uint16Array([65484]),q=new Uint8Array(A.buffer,A.byteOffset,A.byteLength);return q[0]===255?"big":q[0]===204?"little":"unknown"}();const M=function(A){const q={};return Object.keys(A).forEach(N=>{const G=A[N];w(G)?q[N]={bytes:G.buffer,byteOffset:G.byteOffset,byteLength:G.byteLength}:q[N]=G}),q};self.onmessage=function(A){const q=A.data,N=new Uint8Array(q.encrypted.bytes,q.encrypted.byteOffset,q.encrypted.byteLength),G=new Uint32Array(q.key.bytes,q.key.byteOffset,q.key.byteLength/4),$=new Uint32Array(q.iv.bytes,q.iv.byteOffset,q.iv.byteLength/4);new p(N,G,$,function(X,W){self.postMessage(M({source:q.source,decrypted:W}),[W.buffer])})}}));var aR=tx(rR);const oR=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Rx=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},zy=(r,e)=>{e.activePlaylistLoader=r,r.load()},lR=(r,e)=>()=>{const{segmentLoaders:{[r]:i,main:s},mediaTypes:{[r]:o}}=e,l=o.activeTrack(),c=o.getActiveGroup(),f=o.activePlaylistLoader,p=o.lastGroup_;if(!(c&&p&&c.id===p.id)&&(o.lastGroup_=c,o.lastTrack_=l,Rx(i,o),!(!c||c.isMainPlaylist))){if(!c.playlistLoader){f&&s.resetEverything();return}i.resyncLoader(),zy(c.playlistLoader,o)}},uR=(r,e)=>()=>{const{segmentLoaders:{[r]:i},mediaTypes:{[r]:s}}=e;s.lastGroup_=null,i.abort(),i.pause()},cR=(r,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[r]:s,main:o},mediaTypes:{[r]:l}}=e,c=l.activeTrack(),f=l.getActiveGroup(),p=l.activePlaylistLoader,b=l.lastTrack_;if(!(b&&c&&b.id===c.id)&&(l.lastGroup_=f,l.lastTrack_=c,Rx(s,l),!!f)){if(f.isMainPlaylist){if(!c||!b||c.id===b.id)return;const _=e.vhs.playlistController_,x=_.selectPlaylist();if(_.media()===x)return;l.logger_(`track change. Switching main audio from ${b.id} to ${c.id}`),i.pause(),o.resetEverything(),_.fastQualityChange_(x);return}if(r==="AUDIO"){if(!f.playlistLoader){o.setAudio(!0),o.resetEverything();return}s.setAudio(!0),o.setAudio(!1)}if(p===f.playlistLoader){zy(f.playlistLoader,l);return}s.track&&s.track(c),s.resetEverything(),zy(f.playlistLoader,l)}},Fp={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:i},excludePlaylist:s}=e,o=i.activeTrack(),l=i.activeGroup(),c=(l.filter(p=>p.default)[0]||l[0]).id,f=i.tracks[c];if(o===f){s({error:{message:"Problem encountered loading the default audio track."}});return}H.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const p in i.tracks)i.tracks[p].enabled=i.tracks[p]===f;i.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:i}}=e;H.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const s=i.activeTrack();s&&(s.mode="disabled"),i.onTrackChanged()}},Mx={AUDIO:(r,e,i)=>{if(!e)return;const{tech:s,requestOptions:o,segmentLoaders:{[r]:l}}=i;e.on("loadedmetadata",()=>{const c=e.media();l.playlist(c,o),(!s.paused()||c.endList&&s.preload()!=="none")&&l.load()}),e.on("loadedplaylist",()=>{l.playlist(e.media(),o),s.paused()||l.load()}),e.on("error",Fp[r](r,i))},SUBTITLES:(r,e,i)=>{const{tech:s,requestOptions:o,segmentLoaders:{[r]:l},mediaTypes:{[r]:c}}=i;e.on("loadedmetadata",()=>{const f=e.media();l.playlist(f,o),l.track(c.activeTrack()),(!s.paused()||f.endList&&s.preload()!=="none")&&l.load()}),e.on("loadedplaylist",()=>{l.playlist(e.media(),o),s.paused()||l.load()}),e.on("error",Fp[r](r,i))}},dR={AUDIO:(r,e)=>{const{vhs:i,sourceType:s,segmentLoaders:{[r]:o},requestOptions:l,main:{mediaGroups:c},mediaTypes:{[r]:{groups:f,tracks:p,logger_:b}},mainPlaylistLoader:_}=e,x=Ld(_.main);(!c[r]||Object.keys(c[r]).length===0)&&(c[r]={main:{default:{default:!0}}},x&&(c[r].main.default.playlists=_.main.playlists));for(const w in c[r]){f[w]||(f[w]=[]);for(const D in c[r][w]){let M=c[r][w][D],A;if(x?(b(`AUDIO group '${w}' label '${D}' is a main playlist`),M.isMainPlaylist=!0,A=null):s==="vhs-json"&&M.playlists?A=new Eu(M.playlists[0],i,l):M.resolvedUri?A=new Eu(M.resolvedUri,i,l):M.playlists&&s==="dash"?A=new Iy(M.playlists[0],i,l,_):A=null,M=wt({id:D,playlistLoader:A},M),Mx[r](r,M.playlistLoader,e),f[w].push(M),typeof p[D]>"u"){const q=new H.AudioTrack({id:D,kind:oR(M),enabled:!1,language:M.language,default:M.default,label:D});p[D]=q}}}o.on("error",Fp[r](r,e))},SUBTITLES:(r,e)=>{const{tech:i,vhs:s,sourceType:o,segmentLoaders:{[r]:l},requestOptions:c,main:{mediaGroups:f},mediaTypes:{[r]:{groups:p,tracks:b}},mainPlaylistLoader:_}=e;for(const x in f[r]){p[x]||(p[x]=[]);for(const w in f[r][x]){if(!s.options_.useForcedSubtitles&&f[r][x][w].forced)continue;let D=f[r][x][w],M;if(o==="hls")M=new Eu(D.resolvedUri,s,c);else if(o==="dash"){if(!D.playlists.filter(q=>q.excludeUntil!==1/0).length)return;M=new Iy(D.playlists[0],s,c,_)}else o==="vhs-json"&&(M=new Eu(D.playlists?D.playlists[0]:D.resolvedUri,s,c));if(D=wt({id:w,playlistLoader:M},D),Mx[r](r,D.playlistLoader,e),p[x].push(D),typeof b[w]>"u"){const A=i.addRemoteTextTrack({id:w,kind:"subtitles",default:D.default&&D.autoselect,language:D.language,label:w},!1).track;b[w]=A}}}l.on("error",Fp[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:i,main:{mediaGroups:s},mediaTypes:{[r]:{groups:o,tracks:l}}}=e;for(const c in s[r]){o[c]||(o[c]=[]);for(const f in s[r][c]){const p=s[r][c][f];if(!/^(?:CC|SERVICE)/.test(p.instreamId))continue;const b=i.options_.vhs&&i.options_.vhs.captionServices||{};let _={label:f,language:p.language,instreamId:p.instreamId,default:p.default&&p.autoselect};if(b[_.instreamId]&&(_=wt(_,b[_.instreamId])),_.default===void 0&&delete _.default,o[c].push(wt({id:f},p)),typeof l[f]>"u"){const x=i.addRemoteTextTrack({id:_.instreamId,kind:"captions",default:_.default,language:_.language,label:_.label},!1).track;l[f]=x}}}}},Lx=(r,e)=>{for(let i=0;i<r.length;i++)if(ky(e,r[i])||r[i].playlists&&Lx(r[i].playlists,e))return!0;return!1},hR=(r,e)=>i=>{const{mainPlaylistLoader:s,mediaTypes:{[r]:{groups:o}}}=e,l=s.media();if(!l)return null;let c=null;l.attributes[r]&&(c=o[l.attributes[r]]);const f=Object.keys(o);if(!c)if(r==="AUDIO"&&f.length>1&&Ld(e.main))for(let p=0;p<f.length;p++){const b=o[f[p]];if(Lx(b,l)){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(p=>p.id===i.id)[0]||null},fR={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const s in i)if(i[s].enabled)return i[s];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const s in i)if(i[s].mode==="showing"||i[s].mode==="hidden")return i[s];return null}},pR=(r,{mediaTypes:e})=>()=>{const i=e[r].activeTrack();return i?e[r].activeGroup(i):null},mR=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(b=>{dR[b](b,r)});const{mediaTypes:e,mainPlaylistLoader:i,tech:s,vhs:o,segmentLoaders:{["AUDIO"]:l,main:c}}=r;["AUDIO","SUBTITLES"].forEach(b=>{e[b].activeGroup=hR(b,r),e[b].activeTrack=fR[b](b,r),e[b].onGroupChanged=lR(b,r),e[b].onGroupChanging=uR(b,r),e[b].onTrackChanged=cR(b,r),e[b].getActiveGroup=pR(b,r)});const f=e.AUDIO.activeGroup();if(f){const b=(f.filter(x=>x.default)[0]||f[0]).id;e.AUDIO.tracks[b].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(c.setAudio(!1),l.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 p=()=>{e.AUDIO.onTrackChanged(),s.trigger({type:"usage",name:"vhs-audio-change"})};s.audioTracks().addEventListener("change",p),s.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),o.on("dispose",()=>{s.audioTracks().removeEventListener("change",p),s.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),s.clearTracks("audio");for(const b in e.AUDIO.tracks)s.audioTracks().addTrack(e.AUDIO.tracks[b])},gR=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Gr,activeTrack:Gr,getActiveGroup:Gr,onGroupChanged:Gr,onTrackChanged:Gr,lastTrack_:null,logger_:us(`MediaGroups[${e}]`)}}),r};class Ix{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_=Cn(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 yR extends H.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Ix,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_=us("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const s=i.serverUri||i.serverURL;if(!s){this.logger_(`steering manifest URL is ${s}, cannot request steering manifest.`),this.trigger("error");return}if(s.startsWith("data:")){this.decodeDataUriManifest_(s.substring(s.indexOf(",")+1));return}this.steeringManifest.reloadUri=Cn(e,s),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 s=e?i:this.getRequestURI(i);if(!s){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const o={contentSteeringInfo:{uri:s}};this.trigger({type:"contentsteeringloadstart",metadata:o}),this.request_=this.xhr_({uri:s,requestType:"content-steering-manifest"},(l,c)=>{if(l){if(c.status===410){this.logger_(`manifest request 410 ${l}.`),this.logger_(`There will be no more content steering requests to ${s} this session.`),this.excludedSteeringManifestURLs.add(s);return}if(c.status===429){const b=c.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${l}.`),this.logger_(`content steering will retry in ${b} seconds.`),this.startTTLTimeout_(parseInt(b,10));return}this.logger_(`manifest failed to load ${l}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:o});let f;try{f=JSON.parse(this.request_.responseText)}catch(b){const _={errorType:H.Error.StreamingContentSteeringParserError,error:b};this.trigger({type:"error",metadata:_})}this.assignSteeringProperties_(f);const p={contentSteeringInfo:o.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:p}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new U.URL(e),s=new U.URL(this.proxyServerUrl_);return s.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(s.toString())}decodeDataUriManifest_(e){const i=JSON.parse(U.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new U.URL(e),s=this.getPathway(),o=this.getBandwidth_();if(s){const l=`_${this.manifestType_}_pathway`;i.searchParams.set(l,s)}if(o){const l=`_${this.manifestType_}_throughput`;i.searchParams.set(l,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 s=(o=>{for(const l of o)if(this.availablePathways_.has(l))return l;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==s&&(this.currentPathway=s,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 s=this.setSteeringParams_(e);return i(s)?null:s}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=U.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){U.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 Ix}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&&(Cn(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const vR=(r,e)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(()=>{r.apply(null,s)},e)}},bR=10;let Fa;const _R=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],TR=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},SR=function({currentPlaylist:r,buffered:e,currentTime:i,nextPlaylist:s,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:c,bufferBasedABR:f,log:p}){if(!s)return H.log.warn("We received no playlist to switch to. Please check your stream."),!1;const b=`allowing switch ${r&&r.id||"null"} -> ${s.id}`;if(!r)return p(`${b} as current playlist is not set`),!0;if(s.id===r.id)return!1;const _=!!Tu(e,i).length;if(!r.endList)return!_&&typeof r.partTargetDuration=="number"?(p(`not ${b} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(p(`${b} as current playlist is live`),!0);const x=xy(e,i),w=f?Oi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Oi.MAX_BUFFER_LOW_WATER_LINE;if(c<w)return p(`${b} as duration < max low water line (${c} < ${w})`),!0;const D=s.attributes.BANDWIDTH,M=r.attributes.BANDWIDTH;if(D<M&&(!f||x<l)){let A=`${b} as next bandwidth < current bandwidth (${D} < ${M})`;return f&&(A+=` and forwardBuffer < bufferHighWaterLine (${x} < ${l})`),p(A),!0}if((!f||D>M)&&x>=o){let A=`${b} as forwardBuffer >= bufferLowWaterLine (${x} >= ${o})`;return f&&(A+=` and next bandwidth > current bandwidth (${D} > ${M})`),p(A),!0}return p(`not ${b} as no switching criteria met`),!1};class xR extends H.EventTarget{constructor(e){super(),this.fastQualityChange_=vR(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:s,tech:o,bandwidth:l,externVhs:c,useCueTags:f,playlistExclusionDuration:p,enableLowInitialPlaylist:b,sourceType:_,cacheEncryptionKeys:x,bufferBasedABR:w,leastPixelDiffSelector:D,captionServices:M,experimentalUseMMS:A}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:q}=e;(q===null||typeof q>"u")&&(q=1/0),Fa=c,this.bufferBasedABR=!!w,this.leastPixelDiffSelector=!!D,this.withCredentials=s,this.tech_=o,this.vhs_=o.vhs,this.player_=e.player_,this.sourceType_=_,this.useCueTags_=f,this.playlistExclusionDuration=p,this.maxPlaylistRetries=q,this.enableLowInitialPlaylist=b,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:s,maxPlaylistRetries:q,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=gR(),A&&U.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new U.ManagedMediaSource,this.usingManagedMediaSource_=!0,H.log("Using ManagedMediaSource")):U.MediaSource&&(this.mediaSource=new U.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_=Di(),this.hasPlayed_=!1,this.syncController_=new nR(e),this.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new aR,this.sourceUpdater_=new Cx(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new sR,this.keyStatusMap_=new Map;const N={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:M,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:l,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:x,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new Iy(i,this.vhs_,wt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Eu(i,this.vhs_,wt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Fy(wt(N,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Fy(wt(N,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Z5(wt(N,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((X,W)=>{function oe(){o.off("vttjserror",K),X()}function K(){o.off("vttjsloaded",oe),W()}o.one("vttjsloaded",oe),o.one("vttjserror",K),o.addWebVttScript_()})}),e);const G=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new yR(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_())),_R.forEach(X=>{this[X+"_"]=TR.bind(this,X)}),this.logger_=us("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 $=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one($,()=>{const X=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-X,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,s){const o=this.media(),l=o&&(o.id||o.uri),c=e&&(e.id||e.uri);if(l&&l!==c){this.logger_(`switch media ${l} -> ${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,s)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],s=i?i.activeGroup():null,o=this.contentSteeringController_.getPathway();if(s&&o){const c=(s.length?s[0].playlists:s.playlists).filter(f=>f.attributes.serviceLocation===o);c.length&&this.mediaTypes_[e].activePlaylistLoader.media(c[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=U.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(U.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 s=e.mediaGroups.AUDIO,o=Object.keys(s);let l;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{const f=s.main||o.length&&s[o[0]];for(const p in f)if(f[p].default){l={label:p};break}}if(!l)return i;const c=[];for(const f in s)if(s[f][l.label]){const p=s[f][l.label];if(p.playlists&&p.playlists.length)c.push.apply(c,p.playlists);else if(p.uri)c.push(p);else if(e.playlists.length)for(let b=0;b<e.playlists.length;b++){const _=e.playlists[b];_.attributes&&_.attributes.AUDIO&&_.attributes.AUDIO===f&&c.push(_)}}return c.length?c:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),s=i.targetDuration*1.5*1e3;Ay(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=s,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),mR({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 s;if(this.enableLowInitialPlaylist&&(s=this.selectInitialPlaylist()),s||(s=this.selectPlaylist()),!s||!this.shouldSwitchToMedia_(s)||(this.initialMedia_=s,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(),s=i.targetDuration*1.5*1e3;Ay(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=s,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,s=>{this.player_.trigger(ei({},s))})})}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 s=e.mediaGroups||{};let o=!0;const l=Object.keys(s.AUDIO);for(const c in s.AUDIO)for(const f in s.AUDIO[c])s.AUDIO[c][f].uri||(o=!1);o&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(s.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Fa.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),l.length&&Object.keys(s.AUDIO[l[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_,s=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine(),c=this.tech_.buffered();return SR({buffered:c,currentTime:s,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,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 s=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:s.playlist,error:s})}),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 s=this.audioSegmentLoader_.pendingSegment_;if(!s||!s.segment||!s.segment.syncInfo)return;const o=s.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",s=>{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:bR}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const s=this.getCodecsOrExclude_();s&&this.sourceUpdater_.addOrChangeSourceBuffers(s)};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(s=>{this.mainSegmentLoader_.on(s,o=>{this.player_.trigger(ei({},o))}),this.audioSegmentLoader_.on(s,o=>{this.player_.trigger(ei({},o))}),this.subtitleSegmentLoader_.on(s,o=>{this.player_.trigger(ei({},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 s=i.end(0);let o=s;if(e.start){const l=e.start.timeOffset;l<0?o=Math.max(s+l,i.start(0)):o=Math.min(s,l)}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 s=this.syncController_.getExpiredTime(e,this.duration());if(s===null)return!1;const o=Fa.Playlist.playlistEnd(e,s),l=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return o-l<=sr;const f=c.end(c.length-1);return f-l<=sr&&o-f<=sr}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:s}){if(e=e||this.mainPlaylistLoader_.media(),s=s||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,l=o.filter(Np),c=l.length===1&&l[0]===e;if(o.length===1&&s!==1/0)return H.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 M=this.pathwayAttribute_(e),A=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(M),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(M)},A);return}let D=!1;o.forEach(M=>{if(M===e)return;const A=M.excludeUntil;typeof A<"u"&&A!==1/0&&(D=!0,delete M.excludeUntil)}),D&&(H.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()+s*1e3,e.excludeUntil=f,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const p=this.selectPlaylist();if(!p){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const b=i.internal?this.logger_:H.log.warn,_=i.message?" "+i.message:"";b(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${_} Switching to playlist ${p.id}.`),p.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),p.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const x=p.targetDuration/2*1e3||5*1e3,w=typeof p.lastRequest=="number"&&Date.now()-p.lastRequest<=x;return this.switchMedia_(p,"exclude",c||w)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const s=[],o=e==="all";(o||e==="main")&&s.push(this.mainPlaylistLoader_);const l=[];(o||e==="audio")&&l.push("AUDIO"),(o||e==="subtitle")&&(l.push("CLOSED-CAPTIONS"),l.push("SUBTITLES")),l.forEach(c=>{const f=this.mediaTypes_[c]&&this.mediaTypes_[c].activePlaylistLoader;f&&s.push(f)}),["main","audio","subtitle"].forEach(c=>{const f=this[`${c}SegmentLoader_`];f&&(e===c||e==="all")&&s.push(f)}),s.forEach(c=>i.forEach(f=>{typeof c[f]=="function"&&c[f]()}))}setCurrentTime(e){const i=Tu(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:Fa.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const s=e.media();if(!s)return null;const o=this.syncController_.getMediaSequenceSync(i);if(o&&o.isReliable){const f=o.start,p=o.end;if(!isFinite(f)||!isFinite(p))return null;const b=Fa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,s),_=Math.max(f,p-b);return Di([[f,_]])}const l=this.syncController_.getExpiredTime(s,this.duration());if(l===null)return null;const c=Fa.Playlist.seekable(s,l,Fa.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,s));return c.length?c:null}computeFinalSeekable_(e,i){if(!i)return e;const s=e.start(0),o=e.end(0),l=i.start(0),c=i.end(0);return l>o||s>c?e:Di([[Math.max(s,l),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 s=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||s&&s.length&&this.seekable_.length&&s.start(0)===this.seekable_.start(0)&&s.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${xS(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 s=Fa.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(s=Math.max(s,i.end(i.length-1))),this.mediaSource.duration!==s&&this.sourceUpdater_.setDuration(s)}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 s in i)i[s].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_(),s=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!s)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const s=Pd(this.main(),i),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(o.video=s.video||e.main.videoCodec||XD),e.main.isMuxed&&(o.video+=`,${s.audio||e.main.audioCodec||m1}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||l)&&(o.audio=s.audio||e.main.audioCodec||e.audio.audioCodec||m1,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,_)=>b?rd(_,this.usingManagedMediaSource_):Jg(_),f={};let p;if(["video","audio"].forEach(function(b){if(o.hasOwnProperty(b)&&!c(e[b].isFmp4,o[b])){const _=e[b].isFmp4?"browser":"muxer";f[_]=f[_]||[],f[_].push(o[b]),b==="audio"&&(p=_)}}),l&&p&&i.attributes.AUDIO){const b=i.attributes.AUDIO;this.main().playlists.forEach(_=>{(_.attributes&&_.attributes.AUDIO)===b&&_!==i&&(_.excludeUntil=1/0)}),this.logger_(`excluding audio group ${b} as ${p} does not support codec(s): "${o.audio}"`)}if(Object.keys(f).length){const b=Object.keys(f).reduce((_,x)=>(_&&(_+=", "),_+=`${x} does not support codec(s): "${f[x].join(",")}"`,_),"")+".";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(_=>{const x=(Ws(this.sourceUpdater_.codecs[_]||"")[0]||{}).type,w=(Ws(o[_]||"")[0]||{}).type;x&&w&&x.toLowerCase()!==w.toLowerCase()&&b.push(`"${this.sourceUpdater_.codecs[_]}" -> "${o[_]}"`)}),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(s=>{const o=e[s];if(i.indexOf(o.id)!==-1)return;i.push(o.id);const l=Pd(this.main,o),c=[];l.audio&&!Jg(l.audio)&&!rd(l.audio,this.usingManagedMediaSource_)&&c.push(`audio codec ${l.audio}`),l.video&&!Jg(l.video)&&!rd(l.video,this.usingManagedMediaSource_)&&c.push(`video codec ${l.video}`),l.text&&l.text==="stpp.ttml.im1t"&&c.push(`text codec ${l.text}`),c.length&&(o.excludeUntil=1/0,this.logger_(`excluding ${o.id} for unsupported: ${c.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],s=this.main().playlists,o=Id(Ws(e)),l=jS(o),c=o.video&&Ws(o.video)[0]||null,f=o.audio&&Ws(o.audio)[0]||null;Object.keys(s).forEach(p=>{const b=s[p];if(i.indexOf(b.id)!==-1||b.excludeUntil===1/0)return;i.push(b.id);const _=[],x=Pd(this.mainPlaylistLoader_.main,b),w=jS(x);if(!(!x.audio&&!x.video)){if(w!==l&&_.push(`codec count "${w}" !== "${l}"`),!this.sourceUpdater_.canChangeType()){const D=x.video&&Ws(x.video)[0]||null,M=x.audio&&Ws(x.audio)[0]||null;D&&c&&D.type.toLowerCase()!==c.type.toLowerCase()&&_.push(`video codec "${D.type}" !== "${c.type}"`),M&&f&&M.type.toLowerCase()!==f.type.toLowerCase()&&_.push(`audio codec "${M.type}" !== "${f.type}"`)}_.length&&(b.excludeUntil=1/0,this.logger_(`excluding ${b.id}: ${_.join(" && ")}`))}})}updateAdCues_(e){let i=0;const s=this.seekable();s.length&&(i=s.start(0)),eR(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=Oi.GOAL_BUFFER_LENGTH,s=Oi.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,Oi.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*s,o)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=Oi.BUFFER_LOW_WATER_LINE,s=Oi.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,Oi.MAX_BUFFER_LOW_WATER_LINE),l=Math.max(i,Oi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*s,this.bufferBasedABR?l:o)}bufferHighWaterLine(){return Oi.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){vx(this.inbandTextTracks_,"com.apple.streaming",this.tech_),L5({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,s){const o=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();vx(this.inbandTextTracks_,e,this.tech_),O5({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:o,videoDuration:s})}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,s=>{this.trigger(ei({},s))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const l=this.contentSteeringController_.getAvailablePathways(),c=[];for(const f of i.playlists){const p=f.attributes.serviceLocation;if(p&&(c.push(p),!l.has(p)))return!0}return!!(!c.length&&l.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const s=this.main().playlists,o=new Set;let l=!1;Object.keys(s).forEach(c=>{const f=s[c],p=this.pathwayAttribute_(f),b=p&&e!==p;f.excludeUntil===1/0&&f.lastExcludeReason_==="content-steering"&&!b&&(delete f.excludeUntil,delete f.lastExcludeReason_,l=!0);const x=!f.excludeUntil&&f.excludeUntil!==1/0;!o.has(f.id)&&b&&x&&(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 p=f.activePlaylistLoader.media_;p&&p.attributes.serviceLocation!==e&&(l=!0)}}),l&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,s=this.contentSteeringController_.currentPathwayClones,o=this.contentSteeringController_.nextPathwayClones;if(s&&s.size||o&&o.size){for(const[c,f]of s.entries())o.get(c)||(this.mainPlaylistLoader_.updateOrDeleteClone(f),this.contentSteeringController_.excludePathway(c));for(const[c,f]of o.entries()){const p=s.get(c);if(!p){i.filter(_=>_.attributes["PATHWAY-ID"]===f["BASE-ID"]).forEach(_=>{this.mainPlaylistLoader_.addClonePathway(f,_)}),this.contentSteeringController_.addAvailablePathway(c);continue}this.equalPathwayClones_(p,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 s=e["URI-REPLACEMENT"].PARAMS,o=i["URI-REPLACEMENT"].PARAMS;for(const l in s)if(s[l]!==o[l])return!1;for(const l in o)if(s[l]!==o[l])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(s=>{const o=this.mainPlaylistLoader_.getKeyIdSet(s);!o||!o.size||o.forEach(l=>{const c="usable",f=this.keyStatusMap_.has(l)&&this.keyStatusMap_.get(l)===c,p=s.lastExcludeReason_===i&&s.excludeUntil===1/0;f?f&&p&&(delete s.excludeUntil,delete s.lastExcludeReason_,this.logger_(`enabling playlist ${s.id} because key ID ${l} is ${c}`)):(s.excludeUntil!==1/0&&s.lastExcludeReason_!==i&&(s.excludeUntil=1/0,s.lastExcludeReason_=i,this.logger_(`excluding playlist ${s.id} because the key ID ${l} doesn't exist in the keyStatusMap or is not ${c}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(s=>{const o=s&&s.attributes&&s.attributes.RESOLUTION&&s.attributes.RESOLUTION.height<720,l=s.excludeUntil===1/0&&s.lastExcludeReason_===i;o&&l&&(delete s.excludeUntil,H.log.warn(`enabling non-HD playlist ${s.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const l=(typeof e=="string"?e:Q5(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${l} added to the keyStatusMap`),this.keyStatusMap_.set(l,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 ER=(r,e,i)=>s=>{const o=r.main.playlists[e],l=wy(o),c=Np(o);if(typeof s>"u")return c;s?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 s!==c&&!l&&(s?(i(o),r.trigger({type:"renditionenabled",metadata:f})):r.trigger({type:"renditiondisabled",metadata:f})),s};class CR{constructor(e,i,s){const{playlistController_:o}=e,l=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=Pd(o.main(),i),this.playlist=i,this.id=s,this.enabled=ER(e.playlists,i.id,l)}}const wR=function(r){r.representations=()=>{const e=r.playlistController_.main(),i=Ld(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(s=>!wy(s)).map((s,o)=>new CR(r,s,s.id)):[]}},Px=["seeking","seeked","pause","playing","error"];class AR extends H.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_=us("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),s=()=>this.monitorCurrentTime_(),o=()=>this.techWaiting_(),l=()=>this.resetTimeUpdate_(),c=this.playlistController_,f=["main","subtitle","audio"],p={};f.forEach(_=>{p[_]={reset:()=>this.resetSegmentDownloads_(_),updateend:()=>this.checkSegmentDownloads_(_)},c[`${_}SegmentLoader_`].on("appendsdone",p[_].updateend),c[`${_}SegmentLoader_`].on("playlistupdate",p[_].reset),this.tech_.on(["seeked","seeking"],p[_].reset)});const b=_=>{["main","audio"].forEach(x=>{c[`${x}SegmentLoader_`][_]("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(Px,l),this.tech_.on("canplay",s),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",o),this.tech_.off(Px,l),this.tech_.off("canplay",s),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),f.forEach(_=>{c[`${_}SegmentLoader_`].off("appendsdone",p[_].updateend),c[`${_}SegmentLoader_`].off("playlistupdate",p[_].reset),this.tech_.off(["seeked","seeking"],p[_].reset)}),this.checkCurrentTimeTimeout_&&U.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&U.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=U.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_,s=i[`${e}SegmentLoader_`],o=s.buffered_(),l=m8(this[`${e}Buffered_`],o);if(this[`${e}Buffered_`]=o,l){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:s.playlist_&&s.playlist_.id,buffered:jo(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+sr>=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(Di([this.lastRecordedTime,e]));const s={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:s}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),s=this.tech_.currentTime(),o=this.afterSeekableWindow_(i,s,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let l;if(o&&(l=i.end(i.length-1)),this.beforeSeekableWindow_(i,s)){const M=i.start(0);l=M+(M===i.end(0)?0:sr)}if(typeof l<"u")return this.logger_(`Trying to seek outside of seekable at time ${s} with seekable range ${xS(i)}. Seeking to ${l}.`),this.tech_.setCurrentTime(l),!0;const c=this.playlistController_.sourceUpdater_,f=this.tech_.buffered(),p=c.audioBuffer?c.audioBuffered():null,b=c.videoBuffer?c.videoBuffered():null,_=this.media(),x=_.partTargetDuration?_.partTargetDuration:(_.targetDuration-nr)*2,w=[p,b];for(let M=0;M<w.length;M++){if(!w[M])continue;if(xy(w[M],s)<x)return!1}const D=Pp(f,s);return D.length===0?!1:(l=D.start(0)+sr,this.logger_(`Buffered region starts (${D.start(0)}) just beyond seek point (${s}). Seeking to ${l}.`),this.tech_.setCurrentTime(l),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),s=Tu(i,e);if(s.length&&e+3<=s.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${s.start(0)} -> ${s.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 s=this.tech_.vhs.playlistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:s.audioBuffered(),videoBuffered:s.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const c=Pp(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,s,o=!1){if(!e.length)return!1;let l=e.end(e.length-1)+sr;const c=!s.endList,f=typeof s.partTargetDuration=="number";return c&&(f||o)&&(l=e.end(e.length-1)+s.targetDuration*3),i>l}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:s}){if(!e)return;let o;if(e.length&&i.length){const l=Tu(e,s-3),c=Tu(e,s),f=Tu(i,s);f.length&&!c.length&&l.length&&(o={start:l.end(0),end:f.end(0)})}else Pp(e,s).length||(o=this.gapFromVideoUnderflow_(e,s));return o?(this.logger_(`Encountered a gap in video from ${o.start} to ${o.end}. Seeking to current time ${s}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),s=this.tech_.currentTime(),o=Pp(i,s);if(this.resetTimeUpdate_(),o.length===0||s!==e)return;this.logger_("skipTheGap_:","currentTime:",s,"scheduled currentTime:",e,"nextRange start:",o.start(0)),this.tech_.setCurrentTime(o.start(0)+nr);const l={gapInfo:{from:s,to:o.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:l}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const s=h8(e);for(let o=0;o<s.length;o++){const l=s.start(o),c=s.end(o);if(i-l<4&&i-l>2)return{start:l,end:c}}return null}}const kR={errorInterval:30,getSource(r){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(i)}},Nx=function(r,e){let i=0,s=0;const o=wt(kR,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const l=function(){s&&r.currentTime(s)},c=function(_){_!=null&&(s=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",l),r.src(_),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},f=function(){if(Date.now()-i<o.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!o.getSource||typeof o.getSource!="function"){H.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),o.getSource.call(r,c)},p=function(){r.off("loadedmetadata",l),r.off("error",f),r.off("dispose",p)},b=function(_){p(),Nx(r,_)};r.on("error",f),r.on("dispose",p),r.reloadSourceOnError=b},DR=function(r){Nx(this,r)};var Bx="3.17.0",OR="7.1.0",RR="1.3.1",MR="7.2.0",LR="4.0.2";const Kt={PlaylistLoader:Eu,Playlist:wn,utils:q8,STANDARD_PLAYLIST_SELECTOR:gx,INITIAL_PLAYLIST_SELECTOR:C5,lastBandwidthSelector:gx,movingAverageBandwidthSelector:x5,comparePlaylistBandwidth:Uy,comparePlaylistResolution:S5,xhr:GS()};Object.keys(Oi).forEach(r=>{Object.defineProperty(Kt,r,{get(){return H.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Oi[r]},set(e){if(H.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){H.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Oi[r]=e}})});const Ux="videojs-vhs",qx=function(r,e){const i=e.media();let s=-1;for(let o=0;o<r.length;o++)if(r[o].id===i.id){s=o;break}r.selectedIndex_=s,r.trigger({selectedIndex:s,type:"change"})},IR=function(r,e){e.representations().forEach(i=>{r.addQualityLevel(i)}),qx(r,e.playlists)};Kt.canPlaySource=function(){return H.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const PR=(r,e,i)=>{if(!r)return r;let s={};e&&e.attributes&&e.attributes.CODECS&&(s=Id(Ws(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(s.audio=i.attributes.CODECS);const o=$l(s.video),l=$l(s.audio),c={};for(const f in r)c[f]={},l&&(c[f].audioContentType=l),o&&(c[f].videoContentType=o),e.contentProtection&&e.contentProtection[f]&&e.contentProtection[f].pssh&&(c[f].pssh=e.contentProtection[f].pssh),typeof r[f]=="string"&&(c[f].url=r[f]);return wt(r,c)},NR=(r,e)=>r.reduce((i,s)=>{if(!s.contentProtection)return i;const o=e.reduce((l,c)=>{const f=s.contentProtection[c];return f&&f.pssh&&(l[c]={pssh:f.pssh}),l},{});return Object.keys(o).length&&i.push(o),i},[]),BR=({player:r,sourceKeySystems:e,audioMedia:i,mainPlaylists:s})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const o=i?s.concat([i]):s,l=NR(o,Object.keys(e)),c=[],f=[];return l.forEach(p=>{f.push(new Promise((b,_)=>{r.tech_.one("keysessioncreated",b)})),c.push(new Promise((b,_)=>{r.eme.initializeMediaKeys({keySystems:p},x=>{if(x){_(x);return}b()})}))}),Promise.race([Promise.all(c),Promise.race(f)])},UR=({player:r,sourceKeySystems:e,media:i,audioMedia:s})=>{const o=PR(e,i,s);return o?(r.currentSource().keySystems=o,o&&!r.eme?(H.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Fx=()=>{if(!U.localStorage)return null;const r=U.localStorage.getItem(Ux);if(!r)return null;try{return JSON.parse(r)}catch{return null}},qR=r=>{if(!U.localStorage)return!1;let e=Fx();e=e?wt(e,r):r;try{U.localStorage.setItem(Ux,JSON.stringify(e))}catch{return!1}return e},FR=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,jx=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},Hx=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},zx=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},Vx=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};Kt.supportsNativeHls=function(){if(!xe||!xe.createElement)return!1;const r=xe.createElement("video");return H.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(r.canPlayType(i))}):!1}(),Kt.supportsNativeDash=function(){return!xe||!xe.createElement||!H.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(xe.createElement("video").canPlayType("application/dash+xml"))}(),Kt.supportsTypeNatively=r=>r==="hls"?Kt.supportsNativeHls:r==="dash"?Kt.supportsNativeDash:!1,Kt.isSupported=function(){return H.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Kt.xhr.onRequest=function(r){jx(Kt.xhr,r)},Kt.xhr.onResponse=function(r){Hx(Kt.xhr,r)},Kt.xhr.offRequest=function(r){zx(Kt.xhr,r)},Kt.xhr.offResponse=function(r){Vx(Kt.xhr,r)};const jR=H.getComponent("Component");class $x extends jR{constructor(e,i,s){if(super(i,s.vhs),typeof s.initialBandwidth=="number"&&(this.options_.bandwidth=s.initialBandwidth),this.logger_=us("VhsHandler"),i.options_&&i.options_.playerId){const o=H.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(xe,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],o=>{const l=xe.fullscreenElement||xe.webkitFullscreenElement||xe.mozFullScreenElement||xe.msFullscreenElement;l&&l.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_=wt(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 s=Fx();s&&s.bandwidth&&(this.options_.bandwidth=s.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),s&&s.throughput&&(this.options_.throughput=s.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Oi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Oi.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(s=>{typeof this.source_[s]<"u"&&(this.options_[s]=this.source_[s])}),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=FR(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Kt,this.options_.sourceType=g1(i),this.options_.seekTo=l=>{this.tech_.setCurrentTime(l)},this.options_.player_=this.player_,this.playlistController_=new xR(this.options_);const s=wt({liveRangeSafeTimeDelta:sr},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new AR(s),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const l=H.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}),l.error(c)});const o=this.options_.bufferBasedABR?Kt.movingAverageBandwidthSelector(.55):Kt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.playlistController_.selectInitialPlaylist=Kt.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(l){this.playlistController_.selectPlaylist=l.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(l){this.playlistController_.mainSegmentLoader_.throughput.rate=l,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let l=this.playlistController_.mainSegmentLoader_.bandwidth;const c=U.navigator.connection||U.navigator.mozConnection||U.navigator.webkitConnection,f=1e7;if(this.options_.useNetworkInformationApi&&c){const p=c.downlink*1e3*1e3;p>=f&&l>=f?l=Math.max(l,p):l=p}return l},set(l){this.playlistController_.mainSegmentLoader_.bandwidth=l,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const l=1/(this.bandwidth||1);let c;return this.throughput>0?c=1/this.throughput:c=0,Math.floor(1/(l+c))},set(){H.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:()=>jo(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:()=>jo(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&&qR({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{wR(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_=U.URL.createObjectURL(this.playlistController_.mediaSource),(H.browser.IS_ANY_SAFARI||H.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"),BR({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=UR({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",s=>{this.playlistController_.updatePlaylistByKeyStatus(s.keyId,s.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=H.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{IR(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{qx(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Bx,"mux.js":OR,"mpd-parser":RR,"m3u8-parser":MR,"aes-decrypter":LR}}version(){return this.constructor.version()}canChangeType(){return Cx.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_&&U.URL.revokeObjectURL&&(U.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return G8({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,s=!0,o=2){return KS({programTime:e,playlist:this.playlistController_.media(),retryCount:o,pauseAfterSeek:s,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{jx(this.xhr,e)},this.xhr.onResponse=e=>{Hx(this.xhr,e)},this.xhr.offRequest=e=>{zx(this.xhr,e)},this.xhr.offResponse=e=>{Vx(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(s=>{this.playlistController_.on(s,o=>{this.player_.trigger(ei({},o))})}),i.forEach(s=>{this.playbackWatcher_.on(s,o=>{this.player_.trigger(ei({},o))})})}}const jp={name:"videojs-http-streaming",VERSION:Bx,canHandleSource(r,e={}){const i=wt(H.options,e);return!i.vhs.experimentalUseMMS&&!rd("avc1.4d400d,mp4a.40.2",!1)?!1:jp.canPlayType(r.type,i)},handleSource(r,e,i={}){const s=wt(H.options,i);return e.vhs=new $x(r,e,s),e.vhs.xhr=GS(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const i=g1(r);if(!i)return"";const s=jp.getOverrideNative(e);return!Kt.supportsTypeNatively(i)||s?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,i=!(H.browser.IS_ANY_SAFARI||H.browser.IS_IOS),{overrideNative:s=i}=e;return s}};(()=>rd("avc1.4d400d,mp4a.40.2",!0))()&&H.getTech("Html5").registerSourceHandler(jp,0),H.VhsHandler=$x,H.VhsSourceHandler=jp,H.Vhs=Kt,H.use||H.registerComponent("Vhs",Kt),H.options.vhs=H.options.vhs||{},(!H.getPlugin||!H.getPlugin("reloadSourceOnError"))&&H.registerPlugin("reloadSourceOnError",DR);const gI="",yI="",vI="",HR=H.getComponent("Component");class Vy extends HR{constructor(e,i){var s;super(e,i),this.relatedVideos=(i==null?void 0:i.relatedVideos)||(i==null?void 0:i._relatedVideos)||((s=this.options_)==null?void 0:s.relatedVideos)||[],console.log("relatedVideos1",this.relatedVideos),this.isTouchDevice=this.detectTouchDevice(),this.getVideosToShow=this.getVideosToShow.bind(this),this.getGridConfig=this.getGridConfig.bind(this),this.createVideoItem=this.createVideoItem.bind(this)}setRelatedVideos(e){this.relatedVideos=e||[],console.log("Updated relatedVideos:",this.relatedVideos)}createEl(){const e=super.createEl("div",{className:"vjs-end-screen-overlay"});e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.right="0",e.style.bottom="60px",e.style.display="none",e.style.backgroundColor="rgba(0, 0, 0, 0.8)",e.style.zIndex="100";const i=this.createGrid();return e.appendChild(i),e}createGrid(){var c;const e=H.dom.createEl("div",{className:"vjs-related-videos-grid"});e.style.display="grid",e.style.gap="12px",e.style.padding="20px",e.style.height="100%",e.style.overflowY="auto";const{columns:i,maxVideos:s}=this.getGridConfig();e.style.gridTemplateColumns=`repeat(${i}, 1fr)`;const o=((c=this.options_)==null?void 0:c.relatedVideos)||this.relatedVideos||[];return console.log("createGrid relatedVideos:",o),(o.length>0?o.slice(0,s):this.createSampleVideos().slice(0,s)).forEach(f=>{const p=this.createVideoItem(f);e.appendChild(p)}),e}getGridConfig(){const e=this.player().el(),i=(e==null?void 0:e.offsetWidth)||window.innerWidth;return e!=null&&e.offsetHeight||window.innerHeight,i>=1200?{columns:4,maxVideos:8}:i>=800?{columns:3,maxVideos:6}:i>=500?{columns:2,maxVideos:4}:{columns:1,maxVideos:3}}getVideosToShow(e){return console.log("relatedVideos",this.relatedVideos),this.relatedVideos&&Array.isArray(this.relatedVideos)&&this.relatedVideos.length>0?this.relatedVideos.slice(0,e):this.createSampleVideos().slice(0,e)}createVideoItem(e){const i=H.dom.createEl("div",{className:"vjs-related-video-item"});i.style.position="relative",i.style.backgroundColor="#1a1a1a",i.style.borderRadius="8px",i.style.overflow="hidden",i.style.cursor="pointer",i.style.transition="transform 0.2s ease, box-shadow 0.2s ease",this.isTouchDevice?i.style.touchAction="manipulation":(i.addEventListener("mouseenter",()=>{i.style.transform="scale(1.05)",i.style.boxShadow="0 4px 20px rgba(0, 0, 0, 0.3)"}),i.addEventListener("mouseleave",()=>{i.style.transform="scale(1)",i.style.boxShadow="none"}));const s=this.createThumbnail(e);i.appendChild(s);const o=this.createVideoInfo(e);return i.appendChild(o),this.addClickHandler(i,e),i}createThumbnail(e){const i=H.dom.createEl("img",{className:"vjs-related-video-thumbnail",src:e.thumbnail||this.getPlaceholderImage(e.title),alt:e.title});if(i.style.width="100%",i.style.height="120px",i.style.objectFit="cover",i.style.display="block",e.duration&&e.duration>0){const s=H.dom.createEl("div",{className:"vjs-video-duration"});s.textContent=this.formatDuration(e.duration),s.style.position="absolute",s.style.bottom="50px",s.style.right="8px",s.style.backgroundColor="rgba(0, 0, 0, 0.8)",s.style.color="white",s.style.padding="2px 6px",s.style.borderRadius="4px",s.style.fontSize="12px",s.style.fontWeight="bold",i.durationBadge=s}return i}createVideoInfo(e){const i=H.dom.createEl("div",{className:"vjs-related-video-info"});i.style.padding="12px",i.style.color="white";const s=H.dom.createEl("div",{className:"vjs-related-video-title"});s.textContent=e.title,s.style.fontSize="14px",s.style.fontWeight="bold",s.style.marginBottom="4px",s.style.lineHeight="1.3",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.style.display="-webkit-box",s.style.webkitLineClamp="2",s.style.webkitBoxOrient="vertical";const o=H.dom.createEl("div",{className:"vjs-related-video-meta"});return o.textContent=`${e.author} • ${e.views}`,o.style.fontSize="12px",o.style.color="#aaa",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.style.whiteSpace="nowrap",i.appendChild(s),i.appendChild(o),i}addClickHandler(e,i){const s=()=>{this.player().id()==="video-embed"||window.parent!==window?window.open(`/view?m=${i.id}`,"_blank","noopener,noreferrer"):window.location.href=`/view?m=${i.id}`};this.isTouchDevice?e.addEventListener("touchend",o=>{o.preventDefault(),s()}):e.addEventListener("click",s),e.querySelector("img").durationBadge&&e.appendChild(e.querySelector("img").durationBadge)}formatDuration(e){if(!e||e===0)return"";const i=Math.floor(e/60),s=Math.floor(e%60);return`${i}:${s.toString().padStart(2,"0")}`}getPlaceholderImage(e){const i=["#009931","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7"];let s=0;for(let c=0;c<e.length;c++)s=e.charCodeAt(c)+((s<<5)-s);const o=i[Math.abs(s)%i.length],l=e.charAt(0).toUpperCase();return`data:image/svg+xml,${encodeURIComponent(`
|
||
<svg width="320" height="180" xmlns="http://www.w3.org/2000/svg">
|
||
<rect width="320" height="180" fill="${o}"/>
|
||
<text x="160" y="90" font-family="Arial" font-size="48" font-weight="bold"
|
||
text-anchor="middle" dominant-baseline="middle" fill="white">${l}</text>
|
||
</svg>
|
||
`)}`}detectTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}createSampleVideos(){return[{id:"sample1",title:"React Full Course",author:"Bro Code",views:"2.1M views",duration:1800},{id:"sample2",title:"JavaScript ES6+",author:"Tech Tutorials",views:"850K views",duration:1200},{id:"sample3",title:"CSS Grid Layout",author:"Web Dev Academy",views:"1.2M views",duration:2400},{id:"sample4",title:"Node.js Backend",author:"Code Master",views:"650K views",duration:3600},{id:"sample5",title:"Vue.js Guide",author:"Frontend Pro",views:"980K views",duration:2800},{id:"sample6",title:"Python Data Science",author:"Data Academy",views:"1.5M views",duration:4200}]}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}}H.registerComponent("EndScreenOverlay",Vy);const bI="",zR=H.getComponent("Component");class $y extends zR{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.startTime=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;const e=super.createEl("div",{className:"vjs-autoplay-countdown-overlay"}),i=((c=this.nextVideoData)==null?void 0:c.title)||"Next Video";e.innerHTML=`
|
||
<button class="autoplay-close-button" aria-label="Cancel autoplay" title="Cancel">
|
||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||
<line x1="18" y1="6" x2="6" y2="18"></line>
|
||
<line x1="6" y1="6" x2="18" y2="18"></line>
|
||
</svg>
|
||
</button>
|
||
<div class="autoplay-countdown-content">
|
||
<div class="countdown-label">Up Next</div>
|
||
|
||
<div class="next-video-title">${i}</div>
|
||
${(f=this.nextVideoData)!=null&&f.author?`<div class="next-video-author">${this.nextVideoData.author}</div>`:""}
|
||
|
||
<div class="circular-countdown">
|
||
<svg class="countdown-circle" viewBox="0 0 100 100" width="100" height="100">
|
||
<circle cx="50" cy="50" r="45" stroke="rgba(255,255,255,0.2)" stroke-width="3" fill="none"/>
|
||
<circle class="countdown-progress" cx="50" cy="50" r="45" stroke="white" stroke-width="3" fill="none"
|
||
stroke-dasharray="282.74" stroke-dashoffset="282.74" transform="rotate(-90 50 50)"/>
|
||
<g class="play-icon">
|
||
<circle cx="50" cy="50" r="20" fill="rgba(255,255,255,0.9)" stroke="none"/>
|
||
<path d="M45 40l15 10-15 10z" fill="#000"/>
|
||
</g>
|
||
</svg>
|
||
</div>
|
||
|
||
<span class="autoplay-cancel-button">
|
||
CANCEL
|
||
</span>
|
||
</div>
|
||
`;const s=e.querySelector(".circular-countdown"),o=e.querySelector(".autoplay-cancel-button"),l=e.querySelector(".autoplay-close-button");return s&&s.addEventListener("click",p=>{p.preventDefault(),this.handlePlayNext()}),o&&o.addEventListener("click",p=>{p.preventDefault(),this.handleCancel()}),l&&l.addEventListener("click",p=>{p.preventDefault(),this.handleCancel()}),e.style.display="none",e}startCountdown(){this.isActive=!0,this.currentCountdown=this.countdownSeconds,this.startTime=Date.now(),this.show(),this.updateCountdownDisplay();const e=()=>{if(!this.isActive)return;const i=(Date.now()-this.startTime)/1e3;this.currentCountdown=Math.max(0,this.countdownSeconds-i),this.updateCountdownDisplay(),this.currentCountdown<=0?(this.stopCountdown(),this.handlePlayNext()):requestAnimationFrame(e)};requestAnimationFrame(e)}stopCountdown(){this.isActive=!1,this.hide()}updateCountdownDisplay(){const e=this.el().querySelector(".countdown-progress");if(e){const i=2*Math.PI*45,s=(this.countdownSeconds-this.currentCountdown)/this.countdownSeconds,o=i-i*s;e.style.strokeDashoffset=o}}handlePlayNext(){try{this.stopCountdown(),this.onPlayNext()}catch(e){console.error("Error in handlePlayNext:",e)}}handleCancel(){try{this.stopCountdown(),this.onCancel()}catch(e){console.error("Error in handleCancel:",e)}}show(){this.el()&&(this.el().style.display="flex",requestAnimationFrame(()=>{this.el()&&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),s=Math.floor(e%3600/60),o=e%60;return i>0?`${i}:${s.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${s}:${o.toString().padStart(2,"0")}`}updateNextVideoData(e){var i,s;if(this.nextVideoData=e,this.el()){const o=((i=this.nextVideoData)==null?void 0:i.title)||"Next Video",l=this.el().querySelector(".next-video-title"),c=this.el().querySelector(".next-video-author");l&&(l.textContent=o),c&&((s=this.nextVideoData)!=null&&s.author)&&(c.textContent=this.nextVideoData.author)}}dispose(){this.stopCountdown(),super.dispose()}}H.registerComponent("AutoplayCountdownOverlay",$y);const _I="",VR=H.getComponent("Component");class Gy extends VR{constructor(e,i){super(e,i),this.authorName=i.authorName||"Unknown",this.authorProfile=i.authorProfile||"",this.authorThumbnail=i.authorThumbnail||"",this.videoTitle=i.videoTitle||"Video",this.videoUrl=i.videoUrl||"",this.player().ready(()=>{this.createOverlay()})}createEl(){const e=document.createElement("div");return e.className="vjs-embed-info-overlay",e}createOverlay(){const e=this.player().el(),i=this.el();if(i.style.cssText=`
|
||
position: absolute;
|
||
top: 10px;
|
||
left: 10px;
|
||
z-index: 1000;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 8px 12px;
|
||
max-width: calc(100% - 40px);
|
||
box-sizing: border-box;
|
||
transition: opacity 0.3s ease-in-out;
|
||
`,this.authorThumbnail){const o=document.createElement("div");if(o.className="embed-avatar-container",o.style.cssText=`
|
||
flex-shrink: 0;
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 50%;
|
||
overflow: hidden;
|
||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||
`,this.authorProfile){const l=document.createElement("a");l.href=this.authorProfile,l.target="_blank",l.rel="noopener noreferrer",l.title=this.authorName,l.style.cssText=`
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
`;const c=document.createElement("img");c.src=this.authorThumbnail,c.alt=this.authorName,c.title=this.authorName,c.style.cssText=`
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
display: block;
|
||
`,c.onerror=()=>{c.style.display="none",o.style.display="none"},l.appendChild(c),o.appendChild(l)}else{const l=document.createElement("img");l.src=this.authorThumbnail,l.alt=this.authorName,l.title=this.authorName,l.style.cssText=`
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
display: block;
|
||
`,l.onerror=()=>{l.style.display="none",o.style.display="none"},o.appendChild(l)}i.appendChild(o)}const s=document.createElement("div");if(s.className="embed-title-container",s.style.cssText=`
|
||
flex: 1;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
`,this.videoUrl){const o=document.createElement("a");o.href=this.videoUrl,o.target="_blank",o.rel="noopener noreferrer",o.textContent=this.videoTitle,o.title=this.videoTitle,o.style.cssText=`
|
||
color: #fff;
|
||
text-decoration: none;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
line-height: 1.3;
|
||
display: block;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
transition: color 0.2s ease;
|
||
`,o.addEventListener("mouseenter",()=>{o.style.color="#ccc"}),o.addEventListener("mouseleave",()=>{o.style.color="#fff"}),s.appendChild(o)}else{const o=document.createElement("span");o.textContent=this.videoTitle,o.title=this.videoTitle,o.style.cssText=`
|
||
color: #fff;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
line-height: 1.3;
|
||
display: block;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
`,s.appendChild(o)}i.appendChild(s),e.appendChild(i),this.setupAutoHide()}setupAutoHide(){const e=this.player(),i=this.el(),s=()=>{e.paused()||e.ended()||e.userActive()?(i.style.opacity="1",i.style.visibility="visible"):(i.style.opacity="0",i.style.visibility="hidden")};e.on("pause",()=>{s()}),e.on("play",()=>{s()}),e.on("ended",()=>{s()}),e.on("ready",()=>{s()}),e.on("useractive",()=>{s()}),e.on("userinactive",()=>{s()}),setTimeout(()=>{s()},100)}updateContent(e){e.authorName&&(this.authorName=e.authorName),e.authorProfile&&(this.authorProfile=e.authorProfile),e.authorThumbnail&&(this.authorThumbnail=e.authorThumbnail),e.videoTitle&&(this.videoTitle=e.videoTitle),e.videoUrl&&(this.videoUrl=e.videoUrl);const i=this.el();i.innerHTML="",this.createOverlay()}show(){this.el().style.display="flex"}hide(){this.el().style.display="none"}dispose(){const e=this.el();e&&e.parentNode&&e.parentNode.removeChild(e),super.dispose()}}H.registerComponent("EmbedInfoOverlay",Gy);const TI="",$R=H.getComponent("Component");class Yy extends $R{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 s=null;for(let l=0;l<i.length;l++)if(i[l].kind==="chapters"){s=i[l];break}if(!s||!s.cues)return;this.chaptersData=[];for(let l=0;l<s.cues.length;l++){const c=s.cues[l];this.chaptersData.push({startTime:c.startTime,endTime:c.endTime,chapterTitle:c.text})}this.el().innerHTML="";const o=e.duration();if(!(!o||o===1/0)){for(let l=0;l<s.cues.length;l++){const c=s.cues[l],f=this.createMarker(c,o);this.el().appendChild(f)}this.setupProgressBarHover()}}setupProgressBarHover(){if(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)return;const i=this.player().getChild("controlBar").getChild("progressControl");if(!i)return;const s=i.getChild("seekBar");if(!s)return;const o=s.el();if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=H.dom.createEl("div",{className:"vjs-chapter-floating-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",zIndex:"1000",bottom:"25px",transform:"translateX(-50%)",display:"none",minWidth:"160px",maxWidth:"200px",width:"auto"}),this.chapterTitle=H.dom.createEl("div",{className:"chapter-title"}),this.chapterInfo=H.dom.createEl("div",{className:"chapter-info"}),this.positionInfo=H.dom.createEl("div",{className:"position-info"}),this.chapterImage=H.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.chapterInfo),this.tooltip.appendChild(this.chapterImage),this.tooltip.appendChild(this.positionInfo)),!o.querySelector(".vjs-chapter-floating-tooltip"))try{o.appendChild(this.tooltip)}catch{return}const l=i.el();l.removeEventListener("mouseenter",this.handleMouseEnter),l.removeEventListener("mouseleave",this.handleMouseLeave),l.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=c=>{this.isHovering&&this.updateChapterTooltip(c,o,l)},l.addEventListener("mouseenter",this.handleMouseEnter),l.addEventListener("mouseleave",this.handleMouseLeave),l.addEventListener("mousemove",this.handleMouseMove)}updateChapterTooltip(e,i,s){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const l=i.getBoundingClientRect(),c=s.getBoundingClientRect(),f=e.clientX-l.left,b=Math.max(0,Math.min(1,f/l.width))*o,_=e.clientX-c.left,x=this.findChapterAtTime(b);if(x){const q=X=>{const W=Math.floor(X/60),oe=Math.floor(X%60);return`${W}:${oe.toString().padStart(2,"0")}`},N=q(x.startTime),G=q(x.endTime),$=x.chapterTitle.length>30?x.chapterTitle.substring(0,30)+"...":x.chapterTitle;this.chapterTitle.textContent=$,this.chapterInfo.textContent=`${N} - ${G}`,this.updateSpriteThumbnail(b),this.chapterImage.style.display="block"}else this.chapterTitle.textContent="",this.chapterInfo.textContent="",this.updateSpriteThumbnail(b),this.chapterImage.style.display="block";this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const w=this.tooltip.offsetWidth||240,D=c.width,M=w/2;let A=_;A-M<0?A=M+5:A+M>D&&(A=D-M-5),this.tooltip.style.left=`${A}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";return}const{url:i,frame:s}=this.previewSprite,{width:o,height:l}=s,c=s.seconds||10,f=this.player().duration()||45,p=Math.ceil(f/c),b=Math.min(p,6);let _=Math.floor(e/c);_=Math.min(_,b-1);const x=_,D=-(0*o),M=-(x*l);if(this.chapterImage.style.backgroundImage=`url("${i}")`,this.chapterImage.style.backgroundPosition=`${D}px ${M}px`,this.chapterImage.style.backgroundSize="auto",this.chapterImage.style.backgroundRepeat="no-repeat",this.chapterImage.style.display="block",_>=3&&e>30){const A=-(2*l);this.chapterImage.style.backgroundPosition=`${D}px ${A}px`}}formatTime(e){const i=Math.floor(e/60),s=Math.floor(e%60);return`${i}:${s.toString().padStart(2,"0")}`}createMarker(e,i){const s=H.dom.createEl("div",{className:"vjs-chapter-marker"}),o=e.startTime/i*100;s.style.left=o+"%";const l=H.dom.createEl("div",{className:"vjs-chapter-marker-tooltip"}),c=e.text.length>30?e.text.substring(0,30)+"...":e.text;return l.textContent=c,s.appendChild(l),s.addEventListener("click",f=>{f.stopPropagation(),this.player().currentTime(e.startTime)}),s.style.pointerEvents="auto",s.style.cursor="pointer",s}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const s=e.el();s.removeEventListener("mouseenter",this.handleMouseEnter),s.removeEventListener("mouseleave",this.handleMouseLeave),s.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}H.registerComponent("ChapterMarkers",Yy);const SI="",GR=H.getComponent("Component");class Xy extends GR{constructor(e,i){super(e,i),this.tooltip=null,this.isHovering=!1,this.previewSprite=i.previewSprite||null}createEl(){const e=super.createEl("div",{className:"vjs-sprite-preview-track"});return this.tooltip=null,e}setupProgressBarHover(){if(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)return;const i=this.player().getChild("controlBar").getChild("progressControl");if(!i)return;const s=i.getChild("seekBar");if(!s)return;const o=s.el();if(!this.previewSprite||!this.previewSprite.url)return;if((!this.tooltip||!this.tooltip.nodeType)&&(this.tooltip=H.dom.createEl("div",{className:"vjs-sprite-preview-tooltip"}),Object.assign(this.tooltip.style,{position:"absolute",zIndex:"1000",bottom:"45px",transform:"translateX(-50%)",display:"none",minWidth:"172px",maxWidth:"172px",width:"172px"}),this.spriteImage=H.dom.createEl("div",{className:"sprite-image-preview"}),Object.assign(this.spriteImage.style,{display:"block",overflow:"hidden"}),this.tooltip.appendChild(this.spriteImage)),!o.querySelector(".vjs-sprite-preview-tooltip"))try{o.appendChild(this.tooltip)}catch(c){console.warn("Could not append sprite preview tooltip:",c);return}const l=i.el();l.removeEventListener("mouseenter",this.handleMouseEnter),l.removeEventListener("mouseleave",this.handleMouseLeave),l.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=c=>{this.isHovering&&this.updateSpriteTooltip(c,o,l)},l.addEventListener("mouseenter",this.handleMouseEnter),l.addEventListener("mouseleave",this.handleMouseLeave),l.addEventListener("mousemove",this.handleMouseMove)}updateSpriteTooltip(e,i,s){if(!this.tooltip||!this.isHovering)return;const o=this.player().duration();if(!o)return;const l=i.getBoundingClientRect(),c=s.getBoundingClientRect(),f=e.clientX-l.left,b=Math.max(0,Math.min(1,f/l.width))*o,_=e.clientX-c.left;this.updateSpriteThumbnail(b),this.tooltip.style.visibility="hidden",this.tooltip.style.display="block";const x=this.tooltip.offsetWidth||172,w=c.width,D=x/2;let M=_;M-D<0?M=D+5:M+D>w&&(M=w-D-5),this.tooltip.style.left=`${M}px`,this.tooltip.style.visibility="visible",this.tooltip.style.display="block"}updateSpriteThumbnail(e){if(!this.previewSprite||!this.previewSprite.url){this.spriteImage.style.display="none";return}const{url:i,frame:s}=this.previewSprite,{width:o,height:l}=s,c=s.seconds||10,f=this.player().duration()||45,p=Math.ceil(f/c),b=Math.min(p,6);let _=Math.floor(e/c);_=Math.min(_,b-1);const x=_,D=-(0*o),M=-(x*l);if(this.spriteImage.style.backgroundImage=`url("${i}")`,this.spriteImage.style.backgroundPosition=`${D}px ${M}px`,this.spriteImage.style.backgroundSize="auto",this.spriteImage.style.backgroundRepeat="no-repeat",this.spriteImage.style.width="166px",this.spriteImage.style.height="96px",this.spriteImage.style.display="block",_>=3&&e>30){const A=-(2*l);this.spriteImage.style.backgroundPosition=`${D}px ${A}px`}}formatTime(e){const i=Math.floor(e/60),s=Math.floor(e%60);return`${i}:${s.toString().padStart(2,"0")}`}dispose(){var i;const e=(i=this.player().getChild("controlBar"))==null?void 0:i.getChild("progressControl");if(e){const s=e.el();s.removeEventListener("mouseenter",this.handleMouseEnter),s.removeEventListener("mouseleave",this.handleMouseLeave),s.removeEventListener("mousemove",this.handleMouseMove)}this.tooltip&&this.tooltip.parentNode&&this.tooltip.parentNode.removeChild(this.tooltip),super.dispose()}}H.registerComponent("SpritePreview",Xy);const YR=H.getComponent("Button");class Wy extends YR{constructor(e,i){super(e,i)}createEl(){const e=H.dom.createEl("button",{className:"vjs-next-video-button vjs-control vjs-button",type:"button",title:"Next Video","aria-label":"Next Video","aria-disabled":"false"}),i=H.dom.createEl("span",{className:"vjs-icon-placeholder","aria-hidden":"true"}),s=H.dom.createEl("span",{className:"vjs-control-text","aria-live":"polite"});s.textContent="Next Video";const o=H.dom.createEl("span");return o.innerHTML=`
|
||
<svg width="11" height="11" viewBox="14 14 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<path d="M14 34L28.1667 24L14 14V34ZM30.6667 14V34H34V14H30.6667Z" fill="currentColor"></path>
|
||
</svg>`,e.appendChild(i),e.appendChild(s),e.appendChild(o),this.addTouchTooltipSupport(e),e}addTouchTooltipSupport(e){if(!("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let s=0,o=null;e.addEventListener("touchstart",()=>{s=Date.now()},{passive:!0}),e.addEventListener("touchend",l=>{Date.now()-s<300&&(l.preventDefault(),l.stopPropagation(),e.classList.add("touch-tooltip-active"),o&&clearTimeout(o),o=setTimeout(()=>{e.classList.remove("touch-tooltip-active")},2e3))},{passive:!1})}handleClick(){this.player().trigger("nextVideo")}}H.registerComponent("NextVideoButton",Wy);const XR=H.getComponent("Button");class Qy extends XR{constructor(e,i){if(super(e,i),i.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0){this.hide();return}if(this.userPreferences=i.userPreferences,this.userPreferences){const o=this.userPreferences.getPreference("autoplay");this.isAutoplayEnabled=o===!0}else this.isAutoplayEnabled=!1;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=H.dom.createEl("span",{"aria-hidden":"true",className:"vjs-icon-placeholder vjs-autoplay-icon"}),this.updateIconClass();const i=H.dom.createEl("span",{className:"vjs-control-text"});return i.textContent=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off",e.appendChild(this.iconSpan),e.appendChild(i),this.addTouchSupport(e),e}updateIconClass(){this.iconSpan.className="vjs-icon-placeholder vjs-autoplay-icon",this.isAutoplayEnabled?this.iconSpan.classList.add("vjs-icon-spinner"):this.iconSpan.classList.add("vjs-icon-play-circle")}updateIcon(){this.iconSpan.style.transition="opacity 0.1s ease",this.iconSpan.style.opacity="0",setTimeout(()=>{if(this.updateIconClass(),this.el()){this.el().title=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off",this.el().setAttribute("aria-label",this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off");const e=this.el().querySelector(".vjs-control-text");e&&(e.textContent=this.isAutoplayEnabled?"Autoplay is on":"Autoplay is off")}this.iconSpan.style.opacity="1"},100)}handleClick(){this.isAutoplayEnabled=!this.isAutoplayEnabled,this.userPreferences&&this.userPreferences.setAutoplayPreference(this.isAutoplayEnabled),this.updateIcon(),this.player().trigger("autoplayToggle",{autoplay:this.isAutoplayEnabled})}setAutoplayState(e){this.isAutoplayEnabled=e,this.updateIcon()}addTouchSupport(e){if(!(this.options_.isTouchDevice||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let s=0;e.addEventListener("touchstart",()=>{s=Date.now()},{passive:!0}),e.addEventListener("touchend",o=>{const l=Date.now()-s,c=window.innerWidth<=767;l<500&&c&&(o.preventDefault(),o.stopPropagation(),e.classList.add("touch-active"),setTimeout(()=>{e.classList.remove("touch-active")},1500))},{passive:!1})}}H.registerComponent("AutoplayToggleButton",Qy);const WR=H.getComponent("Component");class Hp extends WR{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=H.dom.createEl("div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return e.innerHTML=`
|
||
<span class="vjs-remaining-time-display" role="timer" aria-live="off">0:00 / 0:00</span>
|
||
`,e}addTouchTooltipSupport(e){if(!("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let s=0,o=null;e.addEventListener("touchstart",()=>{s=Date.now()},{passive:!0}),e.addEventListener("touchend",l=>{Date.now()-s<300&&(l.preventDefault(),l.stopPropagation(),e.classList.add("touch-tooltip-active"),o&&clearTimeout(o),o=setTimeout(()=>{e.classList.remove("touch-tooltip-active")},2e3))},{passive:!1})}updateContent(){const e=this.player(),i=e.currentTime(),s=e.duration(),o=this.el().querySelector(".vjs-remaining-time-display");if(o){const l=this.formatTime(isNaN(i)?0:i),c=this.formatTime(isNaN(s)?0:s);o.textContent=`${l} / ${c}`}}formatTime(e){const{customPrefix:i,customSuffix:s}=this.options_,o=Math.floor(e/3600),l=Math.floor(e%3600/60),c=Math.floor(e%60);let f;return o>0?f=`${o}:${l.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`:f=`${l}:${c.toString().padStart(2,"0")}`,`${i}${f}${s}`}dispose(){super.dispose()}}Hp.prototype.controlText_="",H.registerComponent("CustomRemainingTime",Hp);const xI="",QR=H.getComponent("Component");class zp extends QR{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.isScrolling=!1,this.createOverlay=this.createOverlay.bind(this),this.updateCurrentChapter=this.updateCurrentChapter.bind(this),this.toggleOverlay=this.toggleOverlay.bind(this),this.formatTime=this.formatTime.bind(this),this.getChapterTimeRange=this.getChapterTimeRange.bind(this),this.player().ready(()=>{this.createOverlay(),this.setupChaptersButton()})}formatTime(e){const i=Math.max(0,Math.floor(e)),s=Math.floor(i/3600),o=Math.floor(i%3600/60),l=i%60;return`${String(s).padStart(2,"0")}:${String(o).padStart(2,"0")}:${String(l).padStart(2,"0")}`}getChapterTimeRange(e){const i=this.formatTime(e.startTime),s=this.formatTime(e.endTime||e.startTime);return`${i} - ${s}`}createOverlay(){if(!this.chaptersData||this.chaptersData.length===0)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: auto;
|
||
background: rgba(0, 0, 0, 0.35);
|
||
`,this.overlay.addEventListener("click",_=>{_.target===this.overlay&&this.closeOverlay()});const i=document.createElement("div");i.className="video-chapter",i.style.cssText=`
|
||
pointer-events: auto;
|
||
z-index: 9999999;
|
||
`,this.overlay.appendChild(i);const s=document.createElement("div");s.className="chapter-head",i.appendChild(s);const o=document.createElement("div");o.className="playlist-title",s.appendChild(o);const l=document.createElement("div");l.className="chapter-title",l.innerHTML=`
|
||
<h3><a href="#">${this.seriesTitle}</a></h3>
|
||
<p><a href="#">${this.channelName}</a> <span>1 / ${this.chaptersData.length}</span></p>
|
||
`,o.appendChild(l),this.currentChapterSpan=l.querySelector("span");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 _=this.player().el();_&&_.classList.remove("chapters-open")},c.appendChild(f),o.appendChild(c);const p=document.createElement("div");p.className="chapter-body",p.style.cssText+=`
|
||
-webkit-overflow-scrolling: touch;
|
||
touch-action: pan-y;
|
||
overscroll-behavior: contain;
|
||
`,i.appendChild(p);const b=document.createElement("ul");p.appendChild(b),this.chaptersList=b,this.chaptersData.forEach((_,x)=>{const w=document.createElement("li"),D=document.createElement("div");D.className=`playlist-items ${x===0?"selected":""}`;const M=document.createElement("a");M.href="#",M.onclick=fe=>fe.preventDefault();const A=document.createElement("div");A.className="playlist-drag-handle",A.textContent=x===0?"▶":String(x+1);const q=document.createElement("div");q.className="thumbnail-meta";const N=Math.max(0,Math.floor((_.endTime||_.startTime)-_.startTime)),G=Math.floor(N/3600),$=Math.floor(N%3600/60),X=N%60,W=G>0?`${String(G).padStart(2,"0")}:${String($).padStart(2,"0")}:${String(X).padStart(2,"0")}`:`${String($).padStart(2,"0")}:${String(X).padStart(2,"0")}`,oe=document.createElement("h4");oe.textContent=_.chapterTitle;const K=document.createElement("div");K.className="meta-sub";const pe=document.createElement("span");pe.className="meta-dynamic";const ye=this.getChapterTimeRange(_);pe.textContent=ye,pe.setAttribute("data-duration",W),pe.setAttribute("data-time-range",ye),K.appendChild(pe),q.appendChild(oe),q.appendChild(K);const _e=document.createElement("div");_e.className="thumbnail-action";const de=document.createElement("button");de.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>`,_e.appendChild(de);const le=fe=>{(fe.type==="click"||fe.type==="touchend"&&!this.isScrolling)&&(fe.preventDefault(),this.player().currentTime(_.startTime),this.overlay.style.display="none",this.updateActiveItem(x))};let Z=0;D.addEventListener("touchstart",fe=>{Z=fe.touches[0].clientY,this.isScrolling=!1},{passive:!0}),D.addEventListener("touchmove",fe=>{const Ee=fe.touches[0].clientY;Math.abs(Ee-Z)>10&&(this.isScrolling=!0)},{passive:!0}),D.addEventListener("touchend",le,{passive:!1}),D.addEventListener("click",le),M.appendChild(A),M.appendChild(q),M.appendChild(_e),D.appendChild(M),w.appendChild(D),this.chaptersList.appendChild(w)}),e.appendChild(this.overlay),this.player().on("timeupdate",this.updateCurrentChapter)}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(s=>{s.classList.remove("vjs-lock-showing"),s.style.display="none"})}catch{}}updateCurrentChapter(){if(!this.chaptersList||!this.chaptersData)return;const e=this.player().currentTime(),i=this.chaptersList.querySelectorAll(".playlist-items");let s=-1;i.forEach((o,l)=>{const c=this.chaptersData[l],f=e>=c.startTime&&(l===this.chaptersData.length-1||e<this.chaptersData[l+1].startTime),p=o.querySelector(".playlist-drag-handle"),b=o.querySelector(".meta-dynamic");f?(s=l,o.classList.add("selected"),p&&(p.textContent="▶"),b&&(b.textContent=b.getAttribute("data-time-range")||this.getChapterTimeRange(c))):(o.classList.remove("selected"),p&&(p.textContent=String(l+1)),b&&(b.textContent=b.getAttribute("data-time-range")||this.getChapterTimeRange(c)))}),this.currentChapterSpan&&s!==-1&&(this.currentChapterSpan.textContent=`${s+1} / ${this.chaptersData.length}`)}updateActiveItem(e){this.chaptersList.querySelectorAll(".playlist-items").forEach((s,o)=>{const l=s.querySelector(".playlist-drag-handle"),c=s.querySelector(".meta-dynamic");if(o===e)s.classList.add("selected"),l&&(l.textContent="▶"),c&&(c.textContent=c.getAttribute("data-duration")||"");else if(s.classList.remove("selected"),l&&(l.textContent=String(o+1)),c){const f=c.getAttribute("data-time-range");if(f)c.textContent=f;else{const p=this.chaptersData[o];p&&(c.textContent=this.getChapterTimeRange(p))}}}),this.currentChapterSpan&&(this.currentChapterSpan.textContent=`${e+1} / ${this.chaptersData.length}`)}closeOverlay(){if(this.overlay){this.overlay.style.display="none";const e=this.player().el();e&&e.classList.remove("chapters-open")}}dispose(){this.overlay&&this.overlay.remove();const e=this.player().el();e&&e.classList.remove("chapters-open"),super.dispose()}}zp.prototype.controlText_="Chapters Overlay",H.registerComponent("CustomChaptersOverlay",zp);const EI="";class Ky{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:!0}}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 s={...this.getPreferences(),...e};localStorage.setItem(this.storageKey,JSON.stringify(s))}catch(i){console.warn("Error saving user preferences to localStorage:",i)}}getPreference(e){return this.getPreferences()[e]}setPreference(e,i,s=!1){if(e==="subtitleLanguage"){if(this.isRestoringSubtitles||this.subtitleAutoSaveDisabled&&!s)return;console.trace("Subtitle preference change stack trace")}this.savePreferences({[e]:i})}resetPreferences(){try{localStorage.removeItem(this.storageKey)}catch(e){console.warn("Error resetting user preferences:",e)}}applyToPlayer(e){const i=this.getPreferences();this.subtitleAutoSaveDisabled=!0,setTimeout(()=>{this.subtitleAutoSaveDisabled=!1},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)}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",()=>{this.isRestoringSubtitles||setTimeout(()=>{const i=e.textTracks();let s=null;for(let o=0;o<i.length;o++){const l=i[o];if(l.kind==="subtitles"&&l.mode==="showing"){s=l.language;break}}this.setPreference("subtitleLanguage",s)},100)}),this.setupSubtitleMenuListeners(e)}setupSubtitleMenuListeners(e){setTimeout(()=>{const i=e.getChild("controlBar"),s=["subtitlesButton","captionsButton","subsCapsButton","textTrackButton"];let o=null;for(const l of s){const c=i.getChild(l);if(c){o=c;break}}o||i.children().forEach(c=>{const f=c.name_||c.constructor.name||"Unknown";(f.toLowerCase().includes("subtitle")||f.toLowerCase().includes("caption")||f.toLowerCase().includes("text"))&&(o=c)}),o?(setTimeout(()=>{this.attachMenuItemListeners(e,o)},500),setTimeout(()=>{this.attachMenuItemListeners(e,o)},2e3)):this.setupDOMBasedListeners(e)},1e3)}setupDOMBasedListeners(e){setTimeout(()=>{const i=e.el();i&&i.addEventListener("click",s=>{const o=s.target;(o.closest(".vjs-subtitles-menu-item")||o.closest(".vjs-captions-menu-item")||o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("subtitle"))&&setTimeout(()=>{this.detectActiveSubtitleFromDOM(e,!0)},200),o.closest(".vjs-menu-item")&&o.textContent.toLowerCase().includes("off")&&setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},200)})},1500)}detectActiveSubtitleFromDOM(e,i=!1){if(this.isRestoringSubtitles)return;const s=e.textTracks();let o=null;for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="subtitles"&&c.mode==="showing"){o=c.language;break}}this.setPreference("subtitleLanguage",o,i)}attachMenuItemListeners(e,i){try{const s=i.menu;s&&s.children_&&s.children_.forEach(o=>{if(o.track){const l=o.track,c=o.handleClick.bind(o);o.handleClick=()=>{c(),setTimeout(()=>{l.mode==="showing"?this.setPreference("subtitleLanguage",l.language,!0):this.setPreference("subtitleLanguage",null,!0)},100)}}else if(o.label&&o.label.toLowerCase().includes("off")){const l=o.handleClick.bind(o);o.handleClick=()=>{l(),setTimeout(()=>{this.setPreference("subtitleLanguage",null,!0)},100)}}})}catch(s){console.error("Error setting up subtitle menu listeners:",s)}}applySubtitlePreference(e){const i=this.getPreference("subtitleLanguage"),s=this.getPreference("subtitleEnabled");if(i){this.isRestoringSubtitles=!0;const o=(l=1)=>{const c=e.textTracks();for(let b=0;b<c.length;b++){const _=c[b];_.kind==="subtitles"&&(_.mode="disabled")}const f=(b,_)=>{const x=String(b.language||b.srclang||"").toLowerCase(),w=String(_||"").toLowerCase();return!x||!w?!1:x===w||x.startsWith(w+"-")||w.startsWith(x+"-")};let p=!1;for(let b=0;b<c.length;b++){const _=c[b];if(_.kind==="subtitles"&&f(_,i)){_.mode="showing",p=!0,this.updateSubtitleMenuUI(e,_),this.updateSubtitleButtonVisualState(e,!0),this.setPreference("subtitleEnabled",!0,!0);break}}if(!p&&s)for(let b=0;b<c.length;b++){const _=c[b];if(_.kind==="subtitles"){_.mode="showing";const x=_.language||_.srclang||null;x&&this.setPreference("subtitleLanguage",x,!0),this.setPreference("subtitleEnabled",!0,!0),this.updateSubtitleMenuUI(e,_),this.updateSubtitleButtonVisualState(e,!0),p=!0;break}}setTimeout(()=>{this.isRestoringSubtitles=!1},600),!p&&l<5?setTimeout(()=>o(l+1),l*50):p||(console.warn("Could not find subtitle track for language:",i),this.isRestoringSubtitles=!1)};o();try{const l=e.tech_&&e.tech_.el_||e.el&&e.el().querySelector&&e.el().querySelector("video"),c=l&&l.textTracks;if(c&&typeof c.addEventListener=="function"){const f=()=>setTimeout(()=>o(1),50),p=()=>setTimeout(()=>o(1),50);c.addEventListener("addtrack",f,{once:!0}),c.addEventListener("change",p,{once:!0})}}catch{}}else try{const o=e.textTracks();for(let l=0;l<o.length;l++){const c=o[l];c.kind==="subtitles"&&(c.mode="disabled")}this.updateSubtitleButtonVisualState(e,!1),this.updateCustomSettingsMenuUI(e)}catch(o){console.error("Error applying subtitle preference:",o)}}updateSubtitleButtonVisualState(e,i){try{const o=e.getChild("controlBar").getChild("subtitlesButton");if(o&&o.el()){const l=o.el();i?l.classList.add("vjs-subs-active"):l.classList.remove("vjs-subs-active")}}catch(s){console.error("Error updating subtitle button visual state:",s)}}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):c.selected(!1):c.label&&c.label.toLowerCase().includes("off")&&c.selected(!1)}),this.updateCustomSettingsMenuUI(e)}catch(s){console.error("Error updating subtitle menu UI:",s)}}updateCustomSettingsMenuUI(e){const i=(s=1)=>{try{const l=e.getChild("controlBar").getChild("CustomSettingsMenu");l&&l.refreshSubtitlesSubmenu?l.refreshSubtitlesSubmenu():s<5&&setTimeout(()=>i(s+1),s*200)}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){const s={...this.getPreferences(),subtitleLanguage:e};try{localStorage.setItem(this.storageKey,JSON.stringify(s))}catch(o){console.error("❌ Error force saving subtitle language:",o)}}getAutoplayPreference(){return this.getPreference("autoplay")}setAutoplayPreference(e){this.setPreference("autoplay",e)}}const KR=H.getComponent("Component");class Vp extends KR{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 Ky,this.providedQualities=(i==null?void 0:i.qualities)||null,this.hasSubtitles=(i==null?void 0:i.hasSubtitles)||!1,this.isTouchScrolling=!1,this.touchStartY=0,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(),this.restoreSubtitlePreference()})}createSettingsButton(){const e=this.player().getChild("controlBar");this.settingsButton=e.addChild("button",{controlText:"Settings",className:"vjs-settings-button vjs-control vjs-button settings-clicked"});const i=this.settingsButton.el();i.innerHTML=`
|
||
<span class="vjs-icon-placeholder vjs-icon-cog"></span>
|
||
<span class="vjs-control-text">Settings</span>
|
||
`,i.setAttribute("title","Settings"),i.setAttribute("aria-label","Settings"),this.positionButton(),this.addTouchTooltipSupport(i);const s=this.settingsButton.el();if(s){s.style.pointerEvents="auto",s.style.cursor="pointer",s.style.touchAction="manipulation",s.style.webkitTapHighlightColor="transparent";let o=0,l={x:0,y:0},c=!1;s.addEventListener("touchstart",f=>{o=Date.now(),c=!1;const p=f.touches[0];l={x:p.clientX,y:p.clientY}},{passive:!0}),s.addEventListener("touchend",f=>{if(Date.now()-o<500){const _=f.changedTouches[0],x={x:_.clientX,y:_.clientY};Math.sqrt(Math.pow(x.x-l.x,2)+Math.pow(x.y-l.y,2))<50&&(f.preventDefault(),f.stopPropagation(),c=!0,this.toggleSettings(f))}},{passive:!1}),s.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 s="Off";try{const w=this.player().textTracks();for(let D=0;D<w.length;D++){const M=w[D];if(M.kind==="subtitles"&&M.mode==="showing"){s=M.label||M.language||"Subtitles";break}}}catch{}const o=e===1?"Normal":`${e}`,l=this.getAvailableQualities(),c=l.find(w=>w.value===i)||l[0],f=(c==null?void 0:c.displayLabel)||(c==null?void 0:c.label)||(i?String(i):"Auto"),p=`
|
||
<div class="settings-header">
|
||
<span>Settings</span>
|
||
<button class="settings-close-btn" aria-label="Close settings">
|
||
<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>
|
||
</button>
|
||
</div>`,b=`
|
||
<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>`,x=`
|
||
<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">${s}</span>
|
||
<span class="vjs-icon-placeholder vjs-icon-navigate-next"></span>
|
||
</span>
|
||
</div>`;this.settingsOverlay.innerHTML=p,this.settingsOverlay.innerHTML+=b,this.settingsOverlay.innerHTML+=_,this.hasSubtitles&&(this.settingsOverlay.innerHTML+=x),this.createSpeedSubmenu(),this.createQualitySubmenu(l,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(s=>`
|
||
<div class="speed-option ${s.value===i?"active":""}" data-speed="${s.value}">
|
||
<span>${s.label}</span>
|
||
${s.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 s=`
|
||
<div class="submenu-header">
|
||
<span style="margin-right: 8px;">←</span>
|
||
<span>Quality</span>
|
||
</div>
|
||
`,o=e.map(l=>`
|
||
<div class="quality-option ${l.value===i?"active":""}" data-quality="${l.value}">
|
||
<span class="quality-label">${l.displayLabel||l.label}</span>
|
||
${l.value===i?'<span class="checkmark">✓</span>':""}
|
||
</div>
|
||
`).join("");this.qualitySubmenu.innerHTML=s+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 s=this.player().textTracks();let o=null;for(let c=0;c<s.length;c++){const f=s[c];if(f.kind==="subtitles"&&f.mode==="showing"){o=f.language;break}}const l=[];l.push({label:"Off",lang:null});for(let c=0;c<s.length;c++){const f=s[c];f.kind==="subtitles"&&l.push({label:f.label||f.language||`Track ${c}`,lang:f.language,track:f})}e.innerHTML=l.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 s="Off";for(let l=0;l<i.length;l++){const c=i[l];if(c.kind==="subtitles"&&c.mode==="showing"){s=c.label||c.language||"Subtitles";break}}const o=this.settingsOverlay.querySelector(".current-subtitles");o&&(o.textContent=s)}catch(e){console.error("Error updating current subtitle display:",e)}}startSubtitleSync(){this.updateCurrentSubtitleDisplay(),this.player().on("texttrackchange",()=>{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 s;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 o=typeof window<"u"?window.MEDIA_DATA:null,l=(s=o==null?void 0:o.data)==null?void 0:s.qualities;if(Array.isArray(l)&&l.length){const c=l.map(f=>({label:f.label||f.value||"Auto",value:(f.value||f.label||"auto").toString().toLowerCase(),src:f.src||f.url||f.href,type:f.type||"video/mp4"}));return this.sortAndDecorateQualities(c,e)}}catch{}const i=this.player().currentSources?this.player().currentSources():this.player().currentSrc();if(Array.isArray(i)&&i.length>0){const o=i.map((l,c)=>{const f=l.label||l.res||this.inferLabelFromSrc(l.src)||(c===0?"Auto":`Source ${c+1}`),p=String(f).toLowerCase();return{label:f,value:p,src:l.src,type:l.type||"video/mp4"}});return this.sortAndDecorateQualities(o,e)}return[]}sortAndDecorateQualities(e,i){const s=c=>{const f=i.indexOf(String(c).toLowerCase());return f===-1?999:f};return e.filter(c=>c.src).map(c=>{const f=(c.value||c.label||"").toString().toLowerCase(),p=c.label||c.value||"",_=f==="1080p"?`${p} <sup class="hd-badge">HD</sup>`:p;return{...c,value:f,label:p,displayLabel:_}}).sort((c,f)=>s(c.value)-s(f.value))}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 s=/(\b\d{3,4})p\b/i.exec(e);return s&&s[1]?`${s[1]}p`:null}positionButton(){}setupEventListeners(){const e=this.settingsOverlay.querySelector(".settings-close-btn");if(e){const l=c=>{var p;c.stopPropagation(),this.settingsOverlay.classList.remove("show"),this.settingsOverlay.style.display="none",this.speedSubmenu.style.display="none",this.qualitySubmenu&&(this.qualitySubmenu.style.display="none"),this.subtitlesSubmenu&&(this.subtitlesSubmenu.style.display="none");const f=(p=this.settingsButton)==null?void 0:p.el();f&&f.classList.remove("settings-clicked")};e.addEventListener("click",l),e.addEventListener("touchend",c=>{c.preventDefault(),l(c)},{passive:!1})}this.settingsOverlay.addEventListener("click",l=>{l.stopPropagation(),l.target.closest('[data-setting="playback-speed"]')&&(this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),l.target.closest('[data-setting="quality"]')&&(this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),l.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("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.settingsOverlay.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.settingsOverlay.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}l.target.closest('[data-setting="playback-speed"]')&&(l.preventDefault(),this.speedSubmenu.style.display="flex",this.qualitySubmenu.style.display="none"),l.target.closest('[data-setting="quality"]')&&(l.preventDefault(),this.qualitySubmenu.style.display="flex",this.speedSubmenu.style.display="none"),l.target.closest('[data-setting="subtitles"]')&&(l.preventDefault(),this.refreshSubtitlesSubmenu(),this.subtitlesSubmenu.style.display="flex",this.speedSubmenu.style.display="none",this.qualitySubmenu.style.display="none")},{passive:!1});const i=this.speedSubmenu.querySelector(".submenu-header");i.addEventListener("click",()=>{this.speedSubmenu.style.display="none"}),i.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.speedSubmenu.style.display="none"},{passive:!1});const s=this.qualitySubmenu.querySelector(".submenu-header");s.addEventListener("click",()=>{this.qualitySubmenu.style.display="none"}),s.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.qualitySubmenu.style.display="none"},{passive:!1});const o=this.subtitlesSubmenu.querySelector(".submenu-header");o.addEventListener("click",()=>{this.subtitlesSubmenu.style.display="none"}),o.addEventListener("touchend",l=>{l.preventDefault(),l.stopPropagation(),this.subtitlesSubmenu.style.display="none"},{passive:!1}),this.speedSubmenu.addEventListener("click",l=>{const c=l.target.closest(".speed-option");if(c){const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}}),this.speedSubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.speedSubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.speedSubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".speed-option");if(c){l.preventDefault();const f=parseFloat(c.dataset.speed);this.handleSpeedChange(f,c)}},{passive:!1}),this.qualitySubmenu.addEventListener("click",l=>{const c=l.target.closest(".quality-option");if(c){const f=c.dataset.quality;this.handleQualityChange(f,c)}}),this.qualitySubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.qualitySubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.qualitySubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".quality-option");if(c){l.preventDefault();const f=c.dataset.quality;this.handleQualityChange(f,c)}},{passive:!1}),this.subtitlesSubmenu.addEventListener("click",l=>{const c=l.target.closest(".subtitle-option");if(c){const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}}),this.subtitlesSubmenu.addEventListener("touchstart",l=>{this.touchStartY=l.touches[0].clientY,this.isTouchScrolling=!1},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchmove",l=>{Math.abs(l.touches[0].clientY-this.touchStartY)>10&&(this.isTouchScrolling=!0)},{passive:!0}),this.subtitlesSubmenu.addEventListener("touchend",l=>{if(l.stopPropagation(),this.isTouchScrolling){this.isTouchScrolling=!1;return}const c=l.target.closest(".subtitle-option");if(c){l.preventDefault();const f=c.dataset.lang||null;this.handleSubtitleChange(f,c)}},{passive:!1}),document.addEventListener("click",this.handleClickOutside),this.settingsOverlay.addEventListener("mouseover",l=>{const c=l.target.closest(".settings-item, .speed-option");c&&!c.style.background.includes("0.1")&&(c.style.background="rgba(255, 255, 255, 0.05)")}),this.settingsOverlay.addEventListener("mouseout",l=>{const c=l.target.closest(".settings-item, .speed-option");c&&!c.style.background.includes("0.1")&&(c.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 s=(o=this.settingsButton)==null?void 0:o.el();s&&(i?s.classList.remove("settings-clicked"):s.classList.add("settings-clicked"))}handleSpeedChange(e,i){this.player().playbackRate(e),this.userPreferences.setPreference("playbackRate",e),this.speedSubmenu.querySelectorAll(".speed-option").forEach(l=>{l.classList.remove("active"),l.style.background="transparent";const c=l.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 s=this.settingsOverlay.querySelector(".current-speed"),o=e===1?"Normal":`${e}`;s.textContent=o,this.speedSubmenu.style.display="none"}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 l=this.settingsOverlay.querySelector(".current-quality");if(l.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(),p=c.currentTime(),b=c.playbackRate();let _=null;try{const M=c.textTracks();for(let A=0;A<M.length;A++){const q=M[A];if(q.kind==="subtitles"&&q.mode==="showing"){_=q.language||q.srclang||null;break}}}catch{}_&&(this.userPreferences.setPreference("subtitleLanguage",_,!0),this.userPreferences.setPreference("subtitleEnabled",!0,!0));const x=[];try{const M=c.remoteTextTrackEls?c.remoteTextTrackEls():[];for(let A=0;A<M.length;A++){const q=M[A];(q.kind||"").toLowerCase()==="subtitles"&&x.push({kind:"subtitles",src:q.src,srclang:q.srclang||q.track&&q.track.language||"",label:q.label||q.track&&q.track.label||"",default:!!q.default})}}catch{}if(x.length===0)try{const M=c.textTracks();for(let A=0;A<M.length;A++){const q=M[A];q.kind==="subtitles"&&q.src&&x.push({kind:"subtitles",src:q.src,srclang:q.language||"",label:q.label||"",default:!1})}}catch{}c.addClass("vjs-changing-resolution"),c.isChangingQuality=!0,c.src({src:o.src,type:o.type||"video/mp4"}),f&&c.pause();const w=()=>{try{x.forEach(M=>{M&&M.src&&c.addRemoteTextTrack(M,!1)})}catch{}try{c.playbackRate(b)}catch{}try{isNaN(p)||c.currentTime(p)}catch{}f?c.pause():c.play().catch(()=>{}),setTimeout(()=>{try{const M=c.textTracks();let A=!1;for(let q=0;q<M.length;q++){const N=M[q];if(N.kind==="subtitles"){const G=_&&(N.language===_||N.srclang===_);N.mode=G?"showing":"disabled",G&&(A=!0)}}if(!A){const q=this.userPreferences.getPreference("subtitleLanguage");if(q)for(let N=0;N<M.length;N++){const G=M[N];if(G.kind==="subtitles"&&(G.language===q||G.srclang===q)){G.mode="showing";break}}}}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay(),c.trigger("texttrackchange")},150);try{const M=c.getChild("controlBar"),A=["subtitlesButton","textTrackButton","subsCapsButton"];for(const q of A){const N=M&&M.getChild(q);if(N){typeof N.show=="function"&&N.show();const G=N.el&&N.el();G&&(G.style.display="",G.style.visibility="")}}}catch{}c.removeClass("vjs-changing-resolution")},D=()=>{c.off("loadedmetadata",D),c.one("loadeddata",w)};c.one("loadedmetadata",D)}this.qualitySubmenu&&(this.qualitySubmenu.style.display="none")}handleSubtitleChange(e,i){var f;const o=this.player().textTracks();for(let p=0;p<o.length;p++){const b=o[p];b.kind==="subtitles"&&(b.mode=e&&b.language===e?"showing":"disabled")}this.userPreferences.setPreference("subtitleLanguage",e||null,!0),this.userPreferences.setPreference("subtitleEnabled",!!e,!0),this.subtitlesSubmenu.querySelectorAll(".subtitle-option").forEach(p=>{p.classList.remove("active"),p.style.background="transparent";const b=p.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 l=e?((f=i.querySelector("span"))==null?void 0:f.textContent)||e:"Off",c=this.settingsOverlay.querySelector(".current-subtitles");c&&(c.textContent=l),this.subtitlesSubmenu.style.display="none"}restoreSubtitlePreference(){const e=this.userPreferences.getPreference("subtitleLanguage");if(e){const i=(s=1)=>{try{const o=this.player(),l=o.textTracks(),c=String(e||"").toLowerCase();for(let b=0;b<l.length;b++){const _=l[b];_.kind==="subtitles"&&(_.mode="disabled")}const f=b=>{const _=String(b.language||b.srclang||"").toLowerCase();return!_||!c?!1:_===c||_.startsWith(c+"-")||c.startsWith(_+"-")};let p=!1;for(let b=0;b<l.length;b++){const _=l[b];if(_.kind==="subtitles"&&f(_)){_.mode="showing",p=!0;try{this.userPreferences.setPreference("subtitleEnabled",!0,!0)}catch{}this.refreshSubtitlesSubmenu(),this.updateCurrentSubtitleDisplay();try{o.trigger("texttrackchange")}catch{}break}}if(!p&&s<8){const b=150*s;setTimeout(()=>i(s+1),b)}}catch{s<8&&setTimeout(()=>i(s+1),150*s)}};setTimeout(()=>i(1),300);try{const s=this.player(),o=l=>s.one(l,()=>setTimeout(()=>i(1),50));o("loadedmetadata"),o("loadeddata"),o("canplay")}catch{}}}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 s=(i=this.settingsButton)==null?void 0:i.el();s&&s.classList.remove("settings-clicked")}}addTouchTooltipSupport(e){if(!("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let s=0,o=null;e.addEventListener("touchstart",()=>{s=Date.now()},{passive:!0}),e.addEventListener("touchend",l=>{Date.now()-s<300&&(e.classList.add("touch-tooltip-active"),o&&clearTimeout(o),o=setTimeout(()=>{e.classList.remove("touch-tooltip-active")},2e3))},{passive:!0})}dispose(){document.removeEventListener("click",this.handleClickOutside),this.settingsOverlay&&this.settingsOverlay.remove(),super.dispose()}}Vp.prototype.controlText_="Settings Menu",H.registerComponent("CustomSettingsMenu",Vp);const ZR=H.getComponent("Component");class Zy extends ZR{constructor(e,i){super(e,i),this.seekAmount=i.seekAmount||5,this.isEmbedPlayer=i.isEmbedPlayer||!1,this.showTimeout=null,this.isTouchDevice=this.detectTouchDevice()}detectTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}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){if(this.isTouchDevice)return;const s=this.el(),o=s.querySelector(".vjs-seek-indicator-icon"),l=s.querySelector(".vjs-seek-indicator-text");this.showTimeout&&clearTimeout(this.showTimeout);const c=window.innerWidth<=480,f=window.innerWidth<=768&&window.innerWidth>480;let p,b,_;c?(p="50px",b="20",_="8px"):f?(p="60px",b="22",_="9px"):(p="80px",b="24",_="10px"),e==="forward"?o.innerHTML=`
|
||
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
|
||
<div style="
|
||
width: ${p};
|
||
height: ${p};
|
||
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="${b}" height="${b}" 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: ${_};
|
||
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: ${p};
|
||
height: ${p};
|
||
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="${b}" height="${b}" 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: ${_};
|
||
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: ${p};
|
||
height: ${p};
|
||
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="${b}" height="${b}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
|
||
<path d="M8 5v14l11-7z"/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
`,l.textContent="Play"):(e==="pause"||e==="pause-mobile")&&(o.innerHTML=`
|
||
<div style="display: flex; align-items: center; justify-content: center; animation: youtubeSeekPulse 0.3s ease-out;">
|
||
<div style="
|
||
width: ${p};
|
||
height: ${p};
|
||
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="${b}" height="${b}" fill="white" style="filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));">
|
||
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
`,l.textContent="Pause"),l.textContent="",s.style.cssText=`
|
||
position: absolute !important;
|
||
top: 50% !important;
|
||
left: 50% !important;
|
||
transform: translate(-50%, -50%) !important;
|
||
z-index: 10000 !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;
|
||
margin: 0 !important;
|
||
padding: 0 !important;
|
||
`,e==="forward"||e==="backward"?this.showTimeout=setTimeout(()=>{this.hide()},1e3):(e==="play"||e==="pause"||e==="pause-mobile")&&(this.showTimeout=setTimeout(()=>{this.hide()},500))}showMobilePauseIcon(){if(this.isTouchDevice)return;this.show("pause-mobile");const e=this.el();e.style.pointerEvents="auto !important";const i=s=>{s.preventDefault(),s.stopPropagation(),this.player().paused()?this.player().play():this.player().pause(),this.hide()};e.addEventListener("click",i),e.addEventListener("touchend",i),this.mobileClickHandler=i}hideMobileIcon(){const e=this.el(),i=e.cloneNode(!0);e.parentNode.replaceChild(i,e),i.style.pointerEvents="none !important",this.hide(),this.mobileTimeout&&(clearTimeout(this.mobileTimeout),this.mobileTimeout=null)}hide(){const e=this.el();e.style.opacity="0",setTimeout(()=>{e.style.display="none",e.style.visibility="hidden"},200),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.mobileClickHandler&&(e.removeEventListener("click",this.mobileClickHandler),e.removeEventListener("touchend",this.mobileClickHandler),this.mobileClickHandler=null),e.style.pointerEvents="none !important"}dispose(){this.showTimeout&&clearTimeout(this.showTimeout),super.dispose()}}H.registerComponent("SeekIndicator",Zy);function JR({videoId:r="default-video"}){var K,pe,ye;const e=gt.useRef(null),i=gt.useRef(null),s=gt.useRef(new Ky),o=gt.useRef({}),l=r==="video-embed",c=gt.useMemo(()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,[]),f={}.VITE_DEV_MODE==="true"||window.location.hostname.includes("vercel.app"),p=gt.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{title:"Modi tempora est quaerat numquam",author_name:"Markos Gogoulos",author_profile:"/user/markos/",author_thumbnail:"/media/userlogos/user.jpg",url:"https://videojs.mediacms.io/view?m=meivs1H3R",poster_url:"/media/original/thumbnails/user/markos/d6ae9093cb1648529432f38ee1198200_6BfyhyM.video.mp4.jpg",chapter_data:[{startTime:"00:00:00.000",endTime:"00:00:02.295",chapterTitle:"A1 Lorem ipsum dolor sit amet consectetur adipisicing elit."},{startTime:"00:00:02.295",endTime:"00:00:04.590",chapterTitle:"A2 of Marine Life"},{startTime:"00:00:04.590",endTime:"00:00:06.885",chapterTitle:"A3 Reef Ecosystems"}],related_media:[{friendly_token:"dktSm7iEo",url:"https://demo.mediacms.io/view?m=dktSm7iEo",api_url:"https://demo.mediacms.io/api/v1/media/dktSm7iEo",user:"markos",title:"Sed aliquam consectetur dolor.",description:"Voluptatem quiquia dolorem labore dolore. Dolor etincidunt non etincidunt etincidunt sed. Adipisci eius etincidunt dolor magnam dolor. Dolorem porro etincidunt quaerat. Eius magnam dolorem tempora voluptatem labore. Dolore sed porro ipsum aliquam numquam non dolor. Labore aliquam labore dolor sit quisquam quaerat.",add_date:"2024-10-02T05:28:18.784775-04:00",views:803,media_type:"video",state:"public",duration:12,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/8624c4080afc46eba8b4f27a81eccf27.Birch.mp4_myELKan.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/8624c4080afc46eba8b4f27a81eccf27.tmpb7kerjb2.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:"124.5MB"},{friendly_token:"zK2nirNLC",url:"https://demo.mediacms.io/view?m=zK2nirNLC",api_url:"https://demo.mediacms.io/api/v1/media/zK2nirNLC",user:"markos",title:"University of Copenhagen Mærsk Tower",description:"https://maps.app.goo.gl/ewVAGgqdrb1MD1sF7",add_date:"2025-06-06T00:00:00-04:00",views:632,media_type:"video",state:"public",duration:27,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/6497e960081b4b8abddcf4cbdf2bf4eb_38hpsj6.20250604_080632.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/6497e960081b4b8abddcf4cbdf2bf4eb.tmpjc3_yx1g.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"58.8MB"},{friendly_token:"o7lKzt664",url:"https://demo.mediacms.io/view?m=o7lKzt664",api_url:"https://demo.mediacms.io/api/v1/media/o7lKzt664",user:"markos",title:"Magnam velit ipsum quisquam amet magnam etincidunt.",description:"Magnam sed quisquam quiquia dolor est. Tempora sit etincidunt dolor dolore magnam. Numquam non dolorem eius aliquam non. Consectetur sit consectetur dolor quaerat est. Consectetur amet dolor ut dolor ipsum. Mpla mpla antalya",add_date:"2024-10-02T05:35:10-04:00",views:1378,media_type:"video",state:"public",duration:6,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/95eb092b57c24f52b75691fa382d16bb_Bg99UmX.20240526_123312.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/95eb092b57c24f52b75691fa382d16bb.tmpthrejon6.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:22,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"13.0MB"},{friendly_token:"mFELnYWko",url:"https://demo.mediacms.io/view?m=mFELnYWko",api_url:"https://demo.mediacms.io/api/v1/media/mFELnYWko",user:"markos",title:"kubectl-cheat-sheet.pdf",description:"",add_date:"2024-10-25T04:24:39-04:00",views:1391,media_type:"pdf",state:"public",duration:0,thumbnail_url:null,is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:15,dislikes:9,reported_times:1,featured:!1,user_featured:!1,size:null},{friendly_token:"ZLjVzLcCE",url:"https://demo.mediacms.io/view?m=ZLjVzLcCE",api_url:"https://demo.mediacms.io/api/v1/media/ZLjVzLcCE",user:"markos",title:"Quaerat velit sed numquam ipsum magnam.",description:"Dolore numquam aliquam dolore modi modi. Dolor quaerat est voluptatem ut. Dolor eius tempora magnam etincidunt ipsum modi porro. Etincidunt consectetur est est sed ut. Porro neque sed dolorem dolore. Sed velit quisquam ipsum quisquam consectetur porro.",add_date:"2024-10-02T05:34:03.836032-04:00",views:888,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b5e8dea6a0a3477885db786f2e89fb51.IMG_20240324_141309.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"bvMsRGRxE",url:"https://demo.mediacms.io/view?m=bvMsRGRxE",api_url:"https://demo.mediacms.io/api/v1/media/bvMsRGRxE",user:"markos",title:"Numquam quisquam amet dolore quisquam ipsum ut.",description:"Modi numquam magnam numquam eius labore est dolorem. Voluptatem etincidunt neque ipsum non. Non tempora etincidunt magnam etincidunt. Sed dolor dolore amet quiquia porro sit non. Tempora etincidunt modi sed etincidunt est aliquam. Magnam aliquam ipsum modi dolore. Etincidunt sit eius dolore sed neque porro labore. Eius etincidunt dolorem est quiquia amet aliquam. Quaerat velit labore est dolor.",add_date:"2024-10-02T05:33:02.972212-04:00",views:773,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b9717b02cd8b45ec91d07470933810db.IMG_20231226_140530.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"lsNWKKq5N",url:"https://demo.mediacms.io/view?m=lsNWKKq5N",api_url:"https://demo.mediacms.io/api/v1/media/lsNWKKq5N",user:"markos",title:"Quaerat quaerat numquam porro dolor",description:"Modi dolorem non non neque dolor magnam quisquam. Magnam amet magnam porro. Dolorem quiquia dolorem etincidunt labore ipsum aliquam sed. Eius sed eius sit consectetur quaerat. Voluptatem dolorem porro etincidunt labore aliquam quisquam. Adipisci quisquam dolorem dolorem magnam dolorem ipsum. Consectetur quaerat magnam sit voluptatem.",add_date:"2024-10-02T00:00:00-04:00",views:666,media_type:"video",state:"public",duration:13,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58008fdc69d34c229a85f29076004639.VID_20230917_094453.mp4_Pe8a1dv.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58008fdc69d34c229a85f29076004639.tmp85b478_u.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:3,reported_times:1,featured:!0,user_featured:!1,size:"35.0MB"},{friendly_token:"tsgNaSe6E",url:"https://demo.mediacms.io/view?m=tsgNaSe6E",api_url:"https://demo.mediacms.io/api/v1/media/tsgNaSe6E",user:"markos",title:"Magnam ipsum eius numquam quiquia non adipisci.",description:"Adipisci labore dolorem ipsum quaerat non dolore ut. Velit porro neque non consectetur neque neque. Ut sit tempora tempora. Ipsum ut velit neque. Quaerat labore amet porro porro amet tempora. Sed voluptatem est amet quisquam sed numquam velit. Est ipsum non labore. Consectetur amet neque consectetur dolor ipsum.",add_date:"2024-10-02T05:32:46.253917-04:00",views:824,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/0405f61e131f431793644be3742fcc1a.20240628_235522.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"f9xqzbbJE",url:"https://demo.mediacms.io/view?m=f9xqzbbJE",api_url:"https://demo.mediacms.io/api/v1/media/f9xqzbbJE",user:"markos",title:"Magnam quaerat numquam modi dolore sed amet.",description:"Non non voluptatem neque velit labore. Eius labore non aliquam quisquam adipisci neque. Aliquam ipsum sed ipsum quisquam. Sit quaerat sed dolore non tempora. Ipsum sed labore dolore consectetur. Modi non quisquam sed ut ut dolor quaerat.",add_date:"2024-10-02T05:34:18.498303-04:00",views:844,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/369f44b14f944941881a20e8d5285e78.IMG_20240324_151737.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:3,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"DE3KByBeo",url:"https://demo.mediacms.io/view?m=DE3KByBeo",api_url:"https://demo.mediacms.io/api/v1/media/DE3KByBeo",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:272,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58b35efa3aca454196227c0eb5e2ca75_pkgSAK2.20250517_101207.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58b35efa3aca454196227c0eb5e2ca75.tmpsw6vmsfo.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"62.0MB"},{friendly_token:"M8ktwf8kF",url:"https://demo.mediacms.io/view?m=M8ktwf8kF",api_url:"https://demo.mediacms.io/api/v1/media/M8ktwf8kF",user:"markos",title:"Quaerat voluptatem quisquam neque velit neque.",description:"Aliquam ipsum quisquam dolor. Modi quisquam neque ut ipsum amet. Tempora quaerat ipsum aliquam velit velit porro est. Consectetur neque eius quisquam porro amet sit neque. Modi voluptatem neque modi. Ipsum aliquam labore quaerat.",add_date:"2024-10-02T05:34:32.027708-04:00",views:852,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/48a682227b544388a1b547736668d0ad.IMG_20240324_151743.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:7,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"s2qAmRTJ9",url:"https://demo.mediacms.io/view?m=s2qAmRTJ9",api_url:"https://demo.mediacms.io/api/v1/media/s2qAmRTJ9",user:"markos",title:"Labore neque ipsum labore modi tempora aliquam neque.",description:"Eius voluptatem aliquam sit sit ipsum consectetur. Dolorem velit amet modi. Porro quisquam velit neque dolorem. Dolorem modi quiquia aliquam. Numquam est magnam non numquam modi quisquam est. Sit velit ut labore sit dolore velit modi. Aliquam modi dolorem ut.",add_date:"2024-10-02T05:34:27.197596-04:00",views:779,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/2b786916111947e3ba960d7146ae0424.IMG_20230708_133437.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"8pWsxkOS5",url:"https://demo.mediacms.io/view?m=8pWsxkOS5",api_url:"https://demo.mediacms.io/api/v1/media/8pWsxkOS5",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:321,media_type:"video",state:"public",duration:47,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/d970760faf5745b4b3d0d0cff2b95d86_cvyjd5y.20250517_140535.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/d970760faf5745b4b3d0d0cff2b95d86.tmp3vtt3uip.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:5,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"101.2MB"},{friendly_token:"swcx8A2h1",url:"https://demo.mediacms.io/view?m=swcx8A2h1",api_url:"https://demo.mediacms.io/api/v1/media/swcx8A2h1",user:"markos",title:"Etincidunt dolore eius ut non numquam dolore dolorem.",description:"Etincidunt amet dolorem quisquam tempora. Dolorem dolor modi sit modi labore sit. Labore est sed non numquam. Porro non quaerat dolorem porro tempora sit. Ut neque est etincidunt velit eius. Etincidunt aliquam adipisci sed quiquia modi. Adipisci non sed adipisci velit.",add_date:"2024-10-02T05:38:43-04:00",views:7973,media_type:"video",state:"public",duration:31,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4_bU90dbl.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/fe4933d67b884d4da507dd60e77f7438.tmpdd72kiwh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:230,dislikes:62,reported_times:1,featured:!0,user_featured:!1,size:"65.9MB"},{friendly_token:"rNefa4WtV",url:"https://demo.mediacms.io/view?m=rNefa4WtV",api_url:"https://demo.mediacms.io/api/v1/media/rNefa4WtV",user:"markos",title:"Quaerat modi non eius.",description:"Quisquam ut dolorem dolorem quisquam dolore. Non modi etincidunt labore sit quisquam. Sed neque quaerat quisquam voluptatem. Numquam labore neque etincidunt. Magnam etincidunt porro adipisci.",add_date:"2024-10-02T05:36:46.062913-04:00",views:2683,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/ca0e3af507c64fc5995b9d97e4a8c779.20240527_091011.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:45,dislikes:16,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"LP09dv0mx",url:"https://demo.mediacms.io/view?m=LP09dv0mx",api_url:"https://demo.mediacms.io/api/v1/media/LP09dv0mx",user:"markos",title:"Est ipsum non etincidunt voluptatem adipisci labore.",description:"Est sit voluptatem numquam ut etincidunt. Adipisci sed dolor voluptatem labore. Quiquia est sit eius eius labore velit. Tempora ut tempora neque. Ipsum eius sit labore amet dolorem non non. Quiquia velit amet eius sit ut ut voluptatem. Quiquia sit ut ipsum ipsum neque. Amet etincidunt aliquam consectetur voluptatem sed etincidunt quiquia. Sit eius dolore magnam sed velit consectetur. Etincidunt amet numquam sit porro.",add_date:"2024-10-02T05:31:41.087014-04:00",views:711,media_type:"video",state:"public",duration:26,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/980decd203f245bbb3723cba73a94a11.VID_20230813_104846.mp4_3rwZtxQ.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/980decd203f245bbb3723cba73a94a11.tmpmddawiqe.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:11,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"66.4MB"},{friendly_token:"just_somethi",url:"https://demo.mediacms.io/view?m=just_somethi",api_url:"https://demo.mediacms.io/api/v1/media/just_somethi",user:"markos",title:"Sit consectetur dolore numquam.",description:"Consectetur adipisci neque neque tempora. Amet quiquia ut labore non sit. Dolor aliquam quiquia adipisci dolor dolorem quiquia. Dolore porro modi labore quisquam adipisci numquam non. Dolor consectetur ut est neque.",add_date:"2024-10-02T00:00:00-04:00",views:1288,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7aaa65ac24224fe3a768aa6b7a723b58.20240527_090952.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:28,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"PbsYTGEol",url:"https://demo.mediacms.io/view?m=PbsYTGEol",api_url:"https://demo.mediacms.io/api/v1/media/PbsYTGEol",user:"markos",title:"Voluptatem porro neque tempora dolorem quiquia est dolor.",description:"Labore aliquam dolorem quiquia est ipsum quiquia. Sed est amet non ipsum. Labore etincidunt etincidunt quiquia amet tempora tempora. Aliquam velit ipsum consectetur. Ipsum labore quaerat quiquia aliquam magnam. Quisquam ut velit velit dolorem dolorem. Aliquam quaerat tempora quisquam ut voluptatem voluptatem quiquia.",add_date:"2024-10-02T05:33:48.024941-04:00",views:785,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f01faaa2e7be4c9aa7598ab755898a09.IMG_20240324_141304.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"mkpfy31bY",url:"https://demo.mediacms.io/view?m=mkpfy31bY",api_url:"https://demo.mediacms.io/api/v1/media/mkpfy31bY",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:212,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c2d40995ce7640e3b8cbfee1a2890c51.20250517_183010.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"w2lYWaW8e",url:"https://demo.mediacms.io/view?m=w2lYWaW8e",api_url:"https://demo.mediacms.io/api/v1/media/w2lYWaW8e",user:"markos",title:"Plane view approaching Copenhagen airport",description:"plane view",add_date:"2025-06-06T00:00:00-04:00",views:664,media_type:"video",state:"public",duration:50,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e84f1caf58f44d838456625ffe96173b_LQCWsAe.20250603_110810.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/e84f1caf58f44d838456625ffe96173b.tmp7hm26nok.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:3,reported_times:0,featured:!1,user_featured:!1,size:"108.8MB"},{friendly_token:"qLMrr970w",url:"https://demo.mediacms.io/view?m=qLMrr970w",api_url:"https://demo.mediacms.io/api/v1/media/qLMrr970w",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:215,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/558f53227cc5418c9b7d66a3740fe2f8.20250517_082340.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"elygiagorgechania",url:"https://demo.mediacms.io/view?m=elygiagorgechania",api_url:"https://demo.mediacms.io/api/v1/media/elygiagorgechania",user:"markos",title:"Exit of Elygia Gorge, Chania, Crete",description:"This video is from the exit of Elygia Gorge, Chania, Crete, where it meets the sea!",add_date:"2025-06-15T00:00:00-04:00",views:688,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c1ab03cab3bb46b5854a5e217cfe3013_Nete6ao.VID_20230813_144422.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/c1ab03cab3bb46b5854a5e217cfe3013.tmpjlxkhy0i.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"75.6MB"},{friendly_token:"OxO6BMVZb",url:"https://demo.mediacms.io/view?m=OxO6BMVZb",api_url:"https://demo.mediacms.io/api/v1/media/OxO6BMVZb",user:"markos",title:"Eius velit etincidunt amet tempora ut.",description:"Aliquam eius adipisci adipisci. Quaerat dolor quaerat magnam. Amet ut quaerat sit sed magnam quaerat neque. Neque velit porro labore modi ut ut ut. Non quaerat consectetur dolor eius voluptatem. Quisquam modi amet sed magnam eius. Quisquam dolor dolore aliquam quisquam neque dolore. Quisquam dolor ut ipsum quiquia. Voluptatem quisquam neque quisquam quiquia adipisci. Est modi eius est etincidunt numquam quisquam ut.",add_date:"2024-10-02T05:34:33.461809-04:00",views:1023,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/13299e6838e143fda776bacf7081484e.IMG_20230820_200357.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:4,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"hDHXkdwy0",url:"https://demo.mediacms.io/view?m=hDHXkdwy0",api_url:"https://demo.mediacms.io/api/v1/media/hDHXkdwy0",user:"markos",title:"Modi tempora est quaerat numquam",description:"Magnam voluptatem est magnam dolorem. Etincidunt quiquia aliquam velit tempora porro. Magnam neque eius eius etincidunt ut ipsum. Adipisci labore quaerat modi. Ipsum modi quaerat consectetur est non quaerat sed. Neque ut modi adipisci dolore adipisci dolor ut. Dolor tempora adipisci quisquam. Dolorem consectetur velit adipisci etincidunt voluptatem. Non quisquam voluptatem adipisci. Voluptatem est aliquam porro labore non.",add_date:"2024-10-02T05:36:42-04:00",views:1679,media_type:"video",state:"public",duration:24,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/a3c5642e13624149897f193981ebccf3.VID_20210307_111552.mp4_uEHcD0C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/a3c5642e13624149897f193981ebccf3.tmpempjz6eh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:32,dislikes:12,reported_times:0,featured:!0,user_featured:!1,size:"52.4MB"},{friendly_token:"vDKrrkIVc",url:"https://demo.mediacms.io/view?m=vDKrrkIVc",api_url:"https://demo.mediacms.io/api/v1/media/vDKrrkIVc",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:228,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/50f296fd588240d2ad80a6fb9a5ce7d6.20250518_093811.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"4h3nsvXb1",url:"https://demo.mediacms.io/view?m=4h3nsvXb1",api_url:"https://demo.mediacms.io/api/v1/media/4h3nsvXb1",user:"markos",title:"Dolor voluptatem non quiquia consectetur est numquam sed.",description:"Aliquam ipsum etincidunt neque ipsum. Consectetur ut non velit quaerat porro. Eius ut voluptatem velit aliquam dolor. Non etincidunt est quaerat quaerat. Quiquia est non ipsum numquam. Quisquam amet magnam sed eius quaerat. Magnam porro dolorem dolor. Numquam numquam quaerat est. Quisquam tempora ut quaerat est.",add_date:"2024-10-02T05:32:43.865153-04:00",views:981,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/baca04d3009d4daba302919c25b4325e.IMG_1936.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"HdUU8boQP",url:"https://demo.mediacms.io/view?m=HdUU8boQP",api_url:"https://demo.mediacms.io/api/v1/media/HdUU8boQP",user:"markos",title:"Consectetur adipisci porro quiquia ipsum aliquam etincidunt ut.",description:"Consectetur numquam eius amet est dolor neque modi. Consectetur est amet voluptatem quaerat numquam sed. Porro tempora ut ut. Non dolor amet sit. Labore porro neque dolorem numquam dolore ut. Modi sed adipisci dolore. Numquam magnam est tempora. Neque aliquam labore dolor ipsum porro.",add_date:"2024-10-02T05:34:13.171233-04:00",views:795,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e1df55b16b3b456ea88bf7feb7db6051.IMG_20230708_120717.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:8,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"vy5PTWJZ6",url:"https://demo.mediacms.io/view?m=vy5PTWJZ6",api_url:"https://demo.mediacms.io/api/v1/media/vy5PTWJZ6",user:"markos",title:"Non etincidunt numquam velit.",description:`Etincidunt ut velit ipsum. Labore modi magnam eius quisquam. Dolorem magnam sit quiquia non dolorem tempora. Aliquam labore sed quaerat magnam est aliquam porro. Adipisci adipisci aliquam tempora ut aliquam eius amet. Est etincidunt quiquia dolorem amet consectetur. Ipsum neque dolorem dolore etincidunt.\r
|
||
`,add_date:"2024-10-02T05:33:26-04:00",views:713,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7a9ec6be9ce24a569a246c61d9b03690.IMG_20220528_135153.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:9,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"TAdmfDUlu",url:"https://demo.mediacms.io/view?m=TAdmfDUlu",api_url:"https://demo.mediacms.io/api/v1/media/TAdmfDUlu",user:"markos",title:"Sed neque adipisci dolorem sed.",description:`Quiquia ipsum velit amet. Consectetur porro numquam numquam magnam adipisci dolore. Dolor ipsum ut ut consectetur modi labore. Neque est non amet. Sit quiquia quisquam dolorem. Modi dolore modi dolorem ipsum ipsum. Neque modi modi dolorem quisquam numquam modi quaerat.\r
|
||
\r
|
||
best scenes at 00:00:12 and 00:14`,add_date:"2024-10-02T00:00:00-04:00",views:821,media_type:"video",state:"public",duration:30,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f371a6b2c157451d924bc4f612bf2667_Kh4GigX.Pexels_Videos_2079217_1.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/f371a6b2c157451d924bc4f612bf2667.tmp2jqxf9sr.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:20,dislikes:4,reported_times:0,featured:!0,user_featured:!1,size:"90.0MB"},{friendly_token:"kHd7EKAVH",url:"https://demo.mediacms.io/view?m=kHd7EKAVH",api_url:"https://demo.mediacms.io/api/v1/media/kHd7EKAVH",user:"markos",title:"Tempora magnam velit ipsum neque aliquam adipisci.",description:"Porro dolorem eius sed non eius. Non dolor quiquia dolorem. Modi ut dolor aliquam dolor. Non est dolorem amet consectetur neque quiquia numquam. Aliquam adipisci quiquia voluptatem ipsum quisquam magnam adipisci. Sit adipisci dolor consectetur dolor quaerat. Magnam ut modi tempora. Modi non ipsum tempora etincidunt porro. Ut ut dolor ipsum non consectetur neque quiquia.",add_date:"2024-10-02T05:33:57.651288-04:00",views:1051,media_type:"video",state:"public",duration:54,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/9d3b8425eb08400fa08d90f988bc5ff4.VID_20220821_110509.mp4_JzAol5C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/9d3b8425eb08400fa08d90f988bc5ff4.tmpwlnjum5k.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:26,dislikes:8,reported_times:1,featured:!0,user_featured:!1,size:"136.8MB"},{friendly_token:"Otbc37Yj4",url:"https://demo.mediacms.io/view?m=Otbc37Yj4",api_url:"https://demo.mediacms.io/api/v1/media/Otbc37Yj4",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:311,media_type:"video",state:"public",duration:25,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/dd3af0e1dece43b490bbafc9400a407a_YtfxVr4.20250517_105515.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/dd3af0e1dece43b490bbafc9400a407a.tmpl3iqzl10.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:"54.3MB"},{friendly_token:"a1BP6J0fM",url:"https://demo.mediacms.io/view?m=a1BP6J0fM",api_url:"https://demo.mediacms.io/api/v1/media/a1BP6J0fM",user:"markos",title:"Velit sed magnam quiquia amet.",description:"Numquam quiquia numquam ut etincidunt numquam. Dolore ut sit eius dolorem sed. Neque porro modi dolor ipsum amet dolore quisquam. Ipsum dolore dolor voluptatem eius quiquia etincidunt. Dolore etincidunt amet velit amet ipsum ut. Aliquam etincidunt consectetur est. Consectetur non quiquia voluptatem velit sed quisquam.",add_date:"2024-10-02T05:35:15.434023-04:00",views:997,media_type:"video",state:"public",duration:11,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/32e2cf3ff5fe498da93251034e977d9c.20240527_090548.mp4_qiF5S9H.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/32e2cf3ff5fe498da93251034e977d9c.tmpheuxmj3y.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:"3.5MB"}],media_type:"video",original_media_url:"/media/original/user/markos/d6ae9093cb1648529432f38ee1198200.video.mp4",hls_info:{master_file:"/media/hls/d6ae9093cb1648529432f38ee1198200/master.m3u8","144_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-1/iframes.m3u8","240_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-2/iframes.m3u8","360_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-3/iframes.m3u8","480_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-4/iframes.m3u8","720_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-5/iframes.m3u8","1080_iframe":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-6/iframes.m3u8","144_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-1/stream.m3u8","240_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-2/stream.m3u8","360_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-3/stream.m3u8","480_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-4/stream.m3u8","720_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-5/stream.m3u8","1080_playlist":"/media/hls/d6ae9093cb1648529432f38ee1198200/media-6/stream.m3u8"},encodings_info:{144:{h264:{title:"h264-144",url:"/media/encoded/23/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"0.3MB",encoding_id:1,status:"success"}},240:{h264:{title:"h264-240",url:"/media/encoded/2/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"0.6MB",encoding_id:2,status:"success"}},360:{h264:{title:"h264-360",url:"/media/encoded/3/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"0.8MB",encoding_id:3,status:"success"}},480:{h264:{title:"h264-480",url:"/media/encoded/13/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"1.5MB",encoding_id:4,status:"success"}},720:{h264:{title:"h264-720",url:"/media/encoded/10/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"3.5MB",encoding_id:5,status:"success"}},1080:{h264:{title:"h264-1080",url:"/media/encoded/7/markos/d6ae9093cb1648529432f38ee1198200.d6ae9093cb1648529432f38ee1198200.video.mp4.mp4",progress:100,size:"6.4MB",encoding_id:6,status:"success"}},1440:{},2160:{}}},useRoundedCorners:!1,isPlayList:!1,previewSprite:{url:"https://videojs.mediacms.io/media/original/thumbnails/user/markos/d6ae9093cb1648529432f38ee1198200.video.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"https://videojs.mediacms.io",nextLink:"https://videojs.mediacms.io/view?m=YjGJafibO",urlAutoplay:!0,urlMuted:!1},[]),b=_e=>{if(typeof _e=="number")return _e;if(typeof _e!="string")return 0;const de=_e.split(":");if(de.length!==3)return 0;const le=parseInt(de[0],10)||0,Z=parseInt(de[1],10)||0,fe=parseFloat(de[2])||0;return le*3600+Z*60+fe},_=gt.useMemo(()=>_e=>!_e||!Array.isArray(_e)?[]:_e.map(le=>({startTime:b(le.startTime),endTime:b(le.endTime),chapterTitle:le.chapterTitle})),[]),x=gt.useMemo(()=>(_e,de)=>{var le;if(!_e||!Array.isArray(_e)||_e.length===0)return!1;if(_e.length>1)return!0;if(_e.length===1){const Z=_e[0],fe=b(Z.startTime),Ee=b(Z.endTime),J=(le=Z.chapterTitle)==null?void 0:le.toLowerCase().match(/^(segment|video|full video|chapter|part)$/);if(de&&de>0){const ge=fe<=1&&Math.abs(Ee-de)<=1;if(ge&&J)return!1;if(!ge)return!0}if(fe===0&&J)return!1}return!0},[]),w=gt.useMemo(()=>{var _e,de,le,Z;if((_e=p==null?void 0:p.data)!=null&&_e.chapter_data&&((de=p==null?void 0:p.data)==null?void 0:de.chapter_data.length)>0){const fe=((le=p==null?void 0:p.data)==null?void 0:le.duration)||null;return x(p.data.chapter_data,fe)?_((Z=p==null?void 0:p.data)==null?void 0:Z.chapter_data):[]}return f?[{startTime:"00:00:00.000",endTime:"00:00:04.000",chapterTitle:"Introduction"},{startTime:"00:00:05.000",endTime:"00:00:10.000",chapterTitle:"Overview of Marine Life"},{startTime:"00:00:10.000",endTime:"00:00:15.000",chapterTitle:"Coral Reef Ecosystems"},{startTime:"00:00:15.000",endTime:"00:00:20.000",chapterTitle:"Deep Sea Creatures"},{startTime:"00:00:20.000",endTime:"00:00:30.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:24.000",endTime:"00:00:32.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:32.000",endTime:"00:00:40.000",chapterTitle:"Climate Change Impact"},{startTime:"00:00:40.000",endTime:"00:00:48.000",chapterTitle:"Marine Protected Areas"},{startTime:"00:00:48.000",endTime:"00:00:56.000",chapterTitle:"Sustainable Fishing"},{startTime:"00:00:56.000",endTime:"00:00:64.000",chapterTitle:"Research Methods"},{startTime:"00:00:64.000",endTime:"00:00:72.000",chapterTitle:"Future Challenges"},{startTime:"00:00:72.000",endTime:"00:00:80.000",chapterTitle:"Conclusion"},{startTime:"00:00:80.000",endTime:"00:00:88.000",chapterTitle:"Marine Biodiversity Hotspots"},{startTime:"00:00:88.000",endTime:"00:00:96.000",chapterTitle:"Marine Biodiversity test"},{startTime:"00:00:96.000",endTime:"00:01:04.000",chapterTitle:"Whale Migration Patterns"},{startTime:"00:01:04.000",endTime:"00:01:12.000",chapterTitle:"Plastic Pollution Crisis"},{startTime:"00:01:12.000",endTime:"00:01:20.000",chapterTitle:"Seagrass Meadows"},{startTime:"00:01:20.000",endTime:"00:01:28.000",chapterTitle:"Ocean Acidification"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Marine Archaeology"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Tidal Pool Ecosystems"},{startTime:"00:01:36.000",endTime:"00:01:44.000",chapterTitle:"Commercial Aquaculture"},{startTime:"00:01:44.000",endTime:"00:01:52.000",chapterTitle:"Ocean Exploration Technology"}].map(fe=>({startTime:b(fe.startTime),endTime:b(fe.endTime),chapterTitle:fe.chapterTitle})):[]},[(K=p==null?void 0:p.data)==null?void 0:K.chapter_data,(pe=p==null?void 0:p.data)==null?void 0:pe.duration,f,_,x]),D=(_e,de)=>de==="audio"?_e&&_e.toLowerCase().includes(".mp3")?"audio/mpeg":_e&&_e.toLowerCase().includes(".ogg")?"audio/ogg":_e&&_e.toLowerCase().includes(".wav")?"audio/wav":_e&&_e.toLowerCase().includes(".m4a")?"audio/mp4":"audio/mpeg":_e&&_e.toLowerCase().includes(".webm")?"video/webm":_e&&_e.toLowerCase().includes(".ogg")?"video/ogg":"video/mp4",M=s.current.getQualityPreference(),A=gt.useMemo(()=>{var le,Z,fe,Ee,J,ve,ge,Ue;const _e=()=>{var Me,Ae,ze,Xe,qe,Pe;const te=M;if((Me=p.data)!=null&&Me.hls_info){if(te==="auto"&&p.data.hls_info.master_file)return[{src:p.siteUrl+p.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}];if(te!=="auto"){const be=`${te.replace("p","")}_playlist`;if(p.data.hls_info[be])return[{src:p.siteUrl+p.data.hls_info[be],type:"application/x-mpegURL",label:`${te}p`}]}if(p.data.hls_info.master_file)return[{src:p.siteUrl+p.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}]}if((Ae=p.data)!=null&&Ae.encodings_info){const be=p.data.encodings_info,Le=M;if(Le!=="auto"){const Oe=Le.replace("p","");if(be[Oe]&&be[Oe].h264&&be[Oe].h264.url)return[{src:be[Oe].h264.url,type:D(be[Oe].h264.url,(ze=p.data)==null?void 0:ze.media_type),label:`${Oe}p`}]}const ie=[],Te=Object.keys(be).filter(Oe=>be[Oe]&&be[Oe].h264&&be[Oe].h264.url).sort((Oe,Ye)=>parseInt(Ye)-parseInt(Oe));for(const Oe of Te){const Ye=be[Oe].h264.url;ie.push({src:Ye,type:D(Ye,(Xe=p.data)==null?void 0:Xe.media_type),label:`${Oe}p`})}if(ie.length>0)return ie}if((qe=p.data)!=null&&qe.original_media_url){const be=p.siteUrl+p.data.original_media_url;return[{src:be,type:D(be,(Pe=p.data)==null?void 0:Pe.media_type)}]}return[{src:"/videos/sample-video-white.mp4",type:"video/mp4"}]};return{id:((le=p.data)==null?void 0:le.friendly_token)||"default-video",title:((Z=p.data)==null?void 0:Z.title)||"Video",author_name:((fe=p.data)==null?void 0:fe.author_name)||"Unknown",author_profile:(Ee=p.data)!=null&&Ee.author_profile?p.siteUrl+p.data.author_profile:"",author_thumbnail:(J=p.data)!=null&&J.author_thumbnail?p.siteUrl+p.data.author_thumbnail:"",url:((ve=p.data)==null?void 0:ve.url)||"",poster:(ge=p.data)!=null&&ge.poster_url?p.siteUrl+p.data.poster_url:"",previewSprite:(p==null?void 0:p.previewSprite)||{},useRoundedCorners:p==null?void 0:p.useRoundedCorners,isPlayList:p==null?void 0:p.isPlayList,related_media:((Ue=p.data)==null?void 0:Ue.related_media)||[],nextLink:(p==null?void 0:p.nextLink)||null,urlAutoplay:(p==null?void 0:p.urlAutoplay)||!0,urlMuted:(p==null?void 0:p.urlMuted)||!1,sources:_e()}},[p,M]),q=gt.useMemo(()=>{var J,ve,ge,Ue,te,Me,Ae;const de=(()=>{var Xe;const ze=["auto"];if((Xe=p.data)!=null&&Xe.encodings_info){const qe=Object.keys(p.data.encodings_info).filter(Pe=>{const be=p.data.encodings_info[Pe];return be&&be.h264&&be.h264.url}).map(Pe=>`${Pe}p`).sort((Pe,be)=>parseInt(Pe)-parseInt(be));ze.push(...qe)}else ze.push("144p","240p","360p","480p","720p","1080p","1440p","2160p");return ze})(),le=ze=>{const qe=ze.map(be=>{var Le;return{label:be.label||be.value||"Auto",value:(be.value||be.label||"auto").toString().toLowerCase(),src:be.src||be.url||be.href,type:be.type||D(be.src||be.url||be.href,(Le=p.data)==null?void 0:Le.media_type)}}).filter(be=>be.src),Pe=be=>{const Le=de.indexOf(String(be).toLowerCase());return Le===-1?999:Le};return qe.sort((be,Le)=>Pe(be.value)-Pe(Le.value)),qe},Z=(J=p==null?void 0:p.data)==null?void 0:J.qualities;if(Array.isArray(Z)&&Z.length)return le(Z);if((ve=p.data)!=null&&ve.hls_info&&p.data.hls_info.master_file){const ze=p.data.hls_info,Xe=[];return Xe.push({label:"Auto",value:"auto",src:p.siteUrl+ze.master_file,type:"application/x-mpegURL"}),Object.keys(ze).forEach(qe=>{if(qe.endsWith("_playlist")){const Pe=qe.replace("_playlist","");Xe.push({label:`${Pe}p`,value:`${Pe}p`,src:p.siteUrl+ze[qe],type:"application/x-mpegURL"})}}),le(Xe)}if((ge=p.data)!=null&&ge.encodings_info){const ze=p.data.encodings_info,Xe=[];if(Xe.push({label:"Auto",value:"auto",src:null,type:D(null,(Ue=p.data)==null?void 0:Ue.media_type)}),Object.keys(ze).forEach(qe=>{var Pe;if(ze[qe]&&ze[qe].h264&&ze[qe].h264.url){const be=ze[qe].h264.url;Xe.push({label:`${qe}p`,value:`${qe}p`,src:be,type:D(be,(Pe=p.data)==null?void 0:Pe.media_type)})}}),Xe.length>1)return le(Xe)}const fe=(A==null?void 0:A.sources)&&((te=A.sources[0])==null?void 0:te.src)||null,Ee=(A==null?void 0:A.sources)&&((Me=A.sources[0])==null?void 0:Me.type)||D(fe,(Ae=p.data)==null?void 0:Ae.media_type);return fe?le([{label:"Auto",value:"auto",src:fe,type:Ee}]):[]},[p,A]),N=gt.useMemo(()=>{var _e;return(_e=p==null?void 0:p.data)!=null&&_e.related_media?p.data.related_media.slice(0,12).map(de=>({id:de.friendly_token,title:de.title,author:de.user||de.author_name||"Unknown",views:`${de.views} views`,thumbnail:de.thumbnail_url||de.author_thumbnail,category:de.media_type,url:de.url,duration:de.duration,size:de.size,likes:de.likes,dislikes:de.dislikes,add_date:de.add_date,description:de.description})):[]},[p]),G=[{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}],$=((ye=p==null?void 0:p.data)==null?void 0:ye.subtitles_info)||(f?G:[]),X=$.length>0,W=X?$.map(_e=>({kind:"subtitles",src:_e.src,srclang:_e.srclang,label:_e.label,default:!1})):[],oe=()=>{p.onClickNextCallback&&typeof p.onClickNextCallback=="function"&&p.onClickNextCallback()};return gt.useEffect(()=>{if(e.current&&!i.current){if(e.current.player)return;const _e=setTimeout(()=>{var de;if(!i.current&&e.current&&!e.current.player){i.current=H(e.current,{controls:!0,autoplay:!l,loop:!1,muted:p.urlMuted||!1,poster:A.poster,preload:"auto",sources:A.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:((de=p.data)==null?void 0:de.media_type)==="audio",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:p.id,inactivityTimeout:l?5e3:2e3,language:"en",languages:{},liveui:!1,liveTracker:{trackingThreshold:20,liveTolerance:15},nativeControlsForTouch:!1,normalizeAutoplay:!0,notSupportedMessage:void 0,noUITitleAttributes:!0,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,tap:!0,doubleClick:!0,hotkeys:{fullscreenKey:function(Ee){return Ee.which===70},muteKey:function(Ee){return Ee.which===77},playPauseKey:function(Ee){return Ee.which===75||Ee.which===32},seekForwardKey:function(Ee){return Ee.which===39},seekBackwardKey:function(Ee){return Ee.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:!1,subtitlesButton:!!X,captionsButton:!1,audioTrackButton:!1,liveDisplay:!1,seekToLive:!1,customControlSpacer:!1,chaptersButton:w&&w.length>0},html5:{nativeControlsForTouch:!1,nativeAudioTracks:!1,nativeTextTracks:!1,nativeVideoTracks:!1,preloadTextTracks:!0,playsinline:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),i.current.ready(()=>{var Pe,be,Le;if(s.current.applyToPlayer(i.current),s.current.setupAutoSave(i.current),typeof window<"u"&&(window.videojsPlayers||(window.videojsPlayers={}),window.videojsPlayers[r]=i.current),p.onPlayerInitCallback&&typeof p.onPlayerInitCallback=="function"&&p.onPlayerInitCallback({player:i.current},i.current.el()),p.urlTimestamp!==null&&p.urlTimestamp>=0){const ie=p.urlTimestamp;i.current.readyState()>=1?ie<i.current.duration()?i.current.currentTime(ie):ie>=0&&i.current.play():i.current.one("loadedmetadata",()=>{ie>=0&&ie<i.current.duration()?i.current.currentTime(ie):ie>=0&&i.current.play()})}const Ee=()=>document.hasFocus()||document.visibilityState==="visible"||sessionStorage.getItem("userInteracted")==="true",J=async()=>{const ie=Ee(),Te=s.current.getPreference("muted");try{!p.urlMuted&&ie&&Te!==!0&&i.current.muted(!1),await i.current.play()}catch{if(!i.current.muted())try{if(i.current.muted(!0),await i.current.play(),Te!==!0){const Ye=()=>{i.current&&!i.current.isDisposed()&&(i.current.muted(!1),i.current.trigger("notify","🔊 Sound enabled!"))};if(ie)setTimeout(Ye,100);else{setTimeout(()=>{i.current&&!i.current.isDisposed()&&i.current.trigger("notify","🔇 Click anywhere to enable sound")},1e3);const Ie=()=>{Ye(),sessionStorage.setItem("userInteracted","true"),document.removeEventListener("click",Ie),document.removeEventListener("keydown",Ie),document.removeEventListener("touchstart",Ie)};document.addEventListener("click",Ie,{once:!0}),document.addEventListener("keydown",Ie,{once:!0}),document.addEventListener("touchstart",Ie,{once:!0})}}}catch(Ye){console.error("❌ Even muted autoplay was blocked:",Ye.message)}}};l?setTimeout(()=>{const ie=i.current.getChild("bigPlayButton"),Te=i.current.getChild("controlBar");if(ie){ie.show();const Ge=ie.el();Ge&&(Ge.style.display="block",Ge.style.visibility="visible",Ge.style.opacity="1",Ge.style.zIndex="10")}if(Te){Te.hide();const Ge=Te.el();Ge&&(Ge.style.opacity="0",Ge.style.visibility="hidden",Ge.style.transition="opacity 0.3s ease")}const Oe=i.current.el(),Ye=Oe.querySelector("video"),Ie=Oe.querySelector(".vjs-poster");if(Ye&&Ie&&(Ye.style.opacity="0",Ie.style.zIndex="1",Ie.style.position="absolute",Ie.style.top="0",Ie.style.left="0",Ie.style.width="100%",Ie.style.height="100%"),i.current.userActive(!1),Oe){const Ge=()=>{if(Te){Te.show();const Ze=Te.el();Ze&&(Ze.style.opacity="1",Ze.style.visibility="visible")}i.current.userActive(!0)},Mt=()=>{if(i.current.paused()){if(Te){const Ze=Te.el();Ze&&(Ze.style.opacity="0",Ze.style.visibility="hidden"),setTimeout(()=>{i.current.paused()&&Te.hide()},300)}i.current.userActive(!1)}};Oe.addEventListener("mouseenter",Ge),Oe.addEventListener("mouseleave",Mt),o.current.embedControlsCleanup=()=>{Oe.removeEventListener("mouseenter",Ge),Oe.removeEventListener("mouseleave",Mt)}}},100):(p!=null&&p.urlAutoplay,J()),setTimeout(()=>{const Te=i.current.el().querySelector("video");if(Te){Te.style.touchAction="manipulation";let Oe=0,Ye={x:0,y:0};const Ie=Mt=>{var At;Oe=Date.now();const Ze=Mt.touches[0];Ye={x:Ze.clientX,y:Ze.clientY};const ii=(At=i.current.getChild("controlBar"))==null?void 0:At.getChild("progressControl");if(ii&&ii.el()){const qt=ii.el().getBoundingClientRect(),we=8;Ze.clientY>=qt.top-we&&Ze.clientY<=qt.bottom&&(i.current.seekbarTouching=!0)}},Ge=Mt=>{if(Date.now()-Oe<500&&!i.current.seekbarTouching){const At=Mt.changedTouches[0],qt={x:At.clientX,y:At.clientY};if(Math.sqrt(Math.pow(qt.x-Ye.x,2)+Math.pow(qt.y-Ye.y,2))<50){Mt.preventDefault(),Mt.stopPropagation();const gi=i.current.getChild("controlBar"),Lt=gi?gi.el():null,ui=Lt&&window.getComputedStyle(Lt).opacity!=="0"&&window.getComputedStyle(Lt).visibility!=="hidden",Zt=o.current.seekIndicator,kt=Zt?Zt.el():null,yi=kt&&window.getComputedStyle(kt).opacity!=="0"&&window.getComputedStyle(kt).visibility!=="hidden"&&window.getComputedStyle(kt).display!=="none";let Vn=!1;if(kt&&yi){const An=kt.getBoundingClientRect();Vn=At.clientX>=An.left&&At.clientX<=An.right&&At.clientY>=An.top&&At.clientY<=An.bottom}i.current.paused()?i.current.play():Vn||ui?i.current.pause():(i.current.userActive(!0),Zt&&Zt.showMobilePauseIcon())}}setTimeout(()=>{i.current&&(i.current.seekbarTouching=!1)},50)};Te.addEventListener("touchstart",Ie,{passive:!0}),Te.addEventListener("touchend",Ge,{passive:!1})}},100);const ge=i.current.getChild("controlBar"),Ue=ge.getChild("playToggle");ge.getChild("currentTimeDisplay");const te=ge.getChild("progressControl"),Me=te.getChild("seekBar"),Ae=ge.getChild("chaptersButton");if(l||new URLSearchParams(window.location.search).get("m")&&setTimeout(async()=>{if(i.current&&!i.current.isDisposed())try{await i.current.play()}catch(Oe){if(console.error("ℹ️ Browser prevented play:",Oe.message),!i.current.muted())try{i.current.muted(!0),await i.current.play()}catch(Ye){console.error("ℹ️ Even muted play was blocked:",Ye.message)}}},100),X)try{const ie=s.current.getPreference("subtitleLanguage"),Te=s.current.getPreference("subtitleEnabled"),Oe=(Ie,Ge)=>{const Mt=String(Ie.srclang||Ie.language||"").toLowerCase(),Ze=String(Ge||"").toLowerCase();return!Mt||!Ze?!1:Mt===Ze||Mt.startsWith(Ze+"-")||Ze.startsWith(Mt+"-")};W.map(Ie=>({...Ie,default:!!(Te&&ie&&Oe(Ie,ie))})).forEach(Ie=>{i.current.addRemoteTextTrack(Ie,!1)})}catch{W.forEach(Te=>{i.current.addRemoteTextTrack(Te,!1)})}if(s.current.applySubtitlePreference(i.current),i.current.one("loadeddata",()=>s.current.applySubtitlePreference(i.current)),i.current.one("canplay",()=>s.current.applySubtitlePreference(i.current)),w&&w.length>0){const ie=i.current.addTextTrack("chapters","Chapters","en");w.forEach(Te=>{const Oe=new(window.VTTCue||window.TextTrackCue)(Te.startTime,Te.endTime,Te.chapterTitle);ie.addCue(Oe)})}if(Ue.el(),document.createElement("div"),!l&&(p!=null&&p.nextLink||f)){const ie=new Wy(i.current,{nextLink:p.nextLink}),Te=ge.children().indexOf(Ue);ge.addChild(ie,{},Te+1)}const ze=new Hp(i.current,{displayNegative:!1,customPrefix:"",customSuffix:""}),Xe=ge.children().indexOf(Ue);if(ge.addChild(ze,{},Xe+2),o.current.customRemainingTime=ze,setTimeout(()=>{const ie=ge.getChild("volumePanel");if(ie){const Te=ie.el();if(Te){const Oe=document.createElement("div");Oe.className="vjs-volume-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Te.parentNode.insertBefore(Oe,Te),Oe.appendChild(Te)}}},100),!l)try{const ie=new Qy(i.current,{userPreferences:s.current,isTouchDevice:c}),Te=Ae?ge.children().indexOf(Ae):-1,Oe=Te>0?Te:ge.children().length-3;ge.addChild(ie,{},Oe),o.current.autoplayToggleButton=ie,setTimeout(()=>{ie.updateIcon()},100),setTimeout(()=>{const Ye=ie.el();if(Ye){const Ie=document.createElement("div");Ie.className="vjs-autoplay-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Ye.parentNode.insertBefore(Ie,Ye),Ie.appendChild(Ye)}},150)}catch(ie){console.error("✗ Failed to add autoplay toggle button:",ie)}if(setTimeout(()=>{(()=>{["subtitlesButton","playbackRateMenuButton"].forEach(Ye=>{const Ie=ge.getChild(Ye);if(Ie&&Ie.menuButton_){const Ge=Ie.menuButton_;Ge.off("mouseenter"),Ge.off("mouseleave"),Ge.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())})}else if(Ie){const Ge=Ie.el();Ge&&Ge.addEventListener("click",function(Mt){Mt.preventDefault(),Mt.stopPropagation();const Ze=Ge.querySelector(".vjs-menu");Ze&&(Ze.style.display==="block"?Ze.style.display="none":(document.querySelectorAll(".vjs-menu").forEach(ii=>{ii!==Ze&&(ii.style.display="none")}),Ze.style.display="block"))})}});const Oe=["subtitlesButton","captionsButton","subsCapsButton"];for(const Ye of Oe){const Ie=ge.getChild(Ye);if(Ie&&Ie.el()){const Ge=Ie.el(),Mt=Ge.querySelector(".vjs-menu");Mt&&(Mt.style.display="none");const Ze=qt=>{qt.preventDefault(),qt.stopPropagation();const we=i.current.textTracks();let gi=!1;for(let Lt=0;Lt<we.length;Lt++){const ui=we[Lt];if(ui.kind==="subtitles"&&ui.mode==="showing"){gi=!0;break}}if(gi){for(let Lt=0;Lt<we.length;Lt++){const ui=we[Lt];ui.kind==="subtitles"&&(ui.mode="disabled")}Ge.classList.remove("vjs-subs-active");try{s.current.setPreference("subtitleEnabled",!1,!0)}catch{}}else{const Lt=s.current.getPreference("subtitleLanguage");if(!Lt){let Zt=null;for(let kt=0;kt<we.length;kt++){const yi=we[kt];if(yi.kind==="subtitles"){Zt=yi.language;break}}if(Zt){for(let kt=0;kt<we.length;kt++){const yi=we[kt];yi.kind==="subtitles"&&(yi.mode=yi.language===Zt?"showing":"disabled")}try{s.current.setPreference("subtitleLanguage",Zt,!0)}catch{}try{s.current.setPreference("subtitleEnabled",!0,!0)}catch{}Ge.classList.add("vjs-subs-active")}return}let ui=!1;for(let Zt=0;Zt<we.length;Zt++){const kt=we[Zt];if(kt.kind==="subtitles"){const yi=kt.language===Lt;kt.mode=yi?"showing":"disabled",yi&&(ui=!0)}}if(ui){Ge.classList.add("vjs-subs-active");try{s.current.setPreference("subtitleEnabled",!0,!0)}catch{}}}};Ge.addEventListener("click",Ze,{capture:!0}),Ge.addEventListener("touchend",qt=>{qt.preventDefault(),qt.stopPropagation(),Ze(qt)},{passive:!1}),i.current.on("texttrackchange",()=>{const qt=i.current.textTracks();let we=!1;for(let gi=0;gi<qt.length;gi++){const Lt=qt[gi];if(Lt.kind==="subtitles"&&Lt.mode==="showing"){we=!0;break}}we?Ge.classList.add("vjs-subs-active"):Ge.classList.remove("vjs-subs-active")});const ii=i.current.textTracks();let At=!1;for(let qt=0;qt<ii.length;qt++){const we=ii[qt];if(we.kind==="subtitles"&&we.mode==="showing"){At=!0;break}}At&&Ge.classList.add("vjs-subs-active");break}}})()},1500),te&&Me){if(w&&w.length>0){const Te=new Yy(i.current,{previewSprite:p.previewSprite,isTouchDevice:c});Me.addChild(Te)}else if(p.previewSprite&&!c){const Te=new Xy(i.current,{previewSprite:p.previewSprite,isTouchDevice:c});Me.addChild(Te),setTimeout(()=>{Te.setupProgressBarHover()},100)}}setTimeout(()=>{const ie=document.createElement("div");ie.className="vjs-spacer-control vjs-control",ie.style.flex="1",ie.style.minWidth="1px",ie.style.height="100%";const Te=ge.getChild("durationDisplay");if(Te&&Te.el()){const Oe=ge.el(),Ie=Te.el().nextSibling;Oe.insertBefore(ie,Ie)}},300),setTimeout(()=>{try{const ie=ge.getChild("pictureInPictureToggle"),Te=ge.getChild("fullscreenToggle");ie&&(ge.removeChild(ie),ge.addChild(ie)),Te&&(ge.removeChild(Te),ge.addChild(Te))}catch(ie){console.error("✗ Failed to move PiP/Fullscreen buttons to end:",ie)}},100),w&&w.length>0&&(o.current.chaptersOverlay=new zp(i.current,{chaptersData:w,seriesTitle:((Pe=p==null?void 0:p.data)==null?void 0:Pe.title)||"Chapters",channelName:"Chapter",thumbnail:((be=p==null?void 0:p.data)==null?void 0:be.thumbnail_url)||((Le=p==null?void 0:p.data)==null?void 0:Le.author_thumbnail)||""})),l&&(o.current.embedInfoOverlay=new Gy(i.current,{authorName:A.author_name,authorProfile:A.author_profile,authorThumbnail:A.author_thumbnail,videoTitle:A.title,videoUrl:A.url})),o.current.settingsMenu=new Vp(i.current,{userPreferences:s.current,qualities:q,hasSubtitles:X,isTouchDevice:c});try{i.current.on("loadedmetadata",()=>{var ie;if(o.current.settingsMenu&&o.current.settingsMenu.setQualities){const Te=typeof window<"u"?window.MEDIA_DATA:null,Oe=((ie=Te==null?void 0:Te.data)==null?void 0:ie.qualities)||q;o.current.settingsMenu.setQualities(Oe)}})}catch{}setTimeout(()=>{if(i.current.getChild("controlBar")&&o.current.settingsMenu&&o.current.settingsMenu.settingsButton){const Te=o.current.settingsMenu.settingsButton.el();if(Te){const Oe=document.createElement("div");Oe.className="vjs-settings-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Te.parentNode.insertBefore(Oe,Te),Oe.appendChild(Te)}}},200),setTimeout(()=>{const ie=i.current.getChild("controlBar"),Te=ie==null?void 0:ie.getChild("pictureInPictureToggle");if(Te){const Oe=Te.el();if(Oe){const Ye=document.createElement("div");Ye.className="vjs-pip-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Oe.parentNode.insertBefore(Ye,Oe),Ye.appendChild(Oe)}}},100),setTimeout(()=>{const ie=i.current.getChild("controlBar"),Te=ie==null?void 0:ie.getChild("fullscreenToggle");if(Te){const Oe=Te.el();if(Oe){const Ye=document.createElement("div");Ye.className="vjs-fullscreen-wrapper vjs-menu-button vjs-menu-button-popup vjs-control vjs-button",Oe.parentNode.insertBefore(Ye,Oe),Ye.appendChild(Oe)}}},100),o.current.seekIndicator=new Zy(i.current,{seekAmount:5,isEmbedPlayer:l}),i.current.addChild(o.current.seekIndicator),o.current.seekIndicator.hide();const qe=ie=>{const Te=document.activeElement;if(Te&&(Te.tagName==="INPUT"||Te.tagName==="TEXTAREA"||Te.contentEditable==="true"))return;if(ie.code==="Space"||ie.key===" "){ie.preventDefault(),i.current&&(i.current.paused()?i.current.play():i.current.pause());return}const Ye=5;if(ie.key==="ArrowRight"||ie.keyCode===39){ie.preventDefault();const Ie=i.current.currentTime(),Ge=i.current.duration(),Mt=Math.min(Ie+Ye,Ge);i.current.currentTime(Mt),o.current.seekIndicator&&o.current.seekIndicator.show("forward",Ye)}else if(ie.key==="ArrowLeft"||ie.keyCode===37){ie.preventDefault();const Ie=i.current.currentTime(),Ge=Math.max(Ie-Ye,0);i.current.currentTime(Ge),o.current.seekIndicator&&o.current.seekIndicator.show("backward",Ye)}};document.addEventListener("keydown",qe),o.current.cleanupArrowKeyHandler=()=>{document.removeEventListener("keydown",qe)}}),i.current.on("nextVideo",()=>{oe()});const le=setInterval(()=>{i.current&&!i.current.paused()&&!i.current.ended()&&!(document.querySelector(".vjs-settings-overlay.show")||document.querySelector(".vjs-menu-button-popup.vjs-lock-showing")||document.querySelector(".vjs-texttrack-settings")||document.querySelector(".vjs-menu.vjs-lock-showing"))&&i.current.userActivity_&&Date.now()-i.current.userActivity_>(l?5500:2500)&&i.current.userActive(!1)},1e3);o.current.forceHideInterval=le,i.current.on("play",()=>{if(!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("play"),l){const Ee=i.current.el(),J=Ee.querySelector("video"),ve=Ee.querySelector(".vjs-poster"),ge=i.current.getChild("bigPlayButton");J&&(J.style.opacity="1"),ve&&(ve.style.opacity="0"),ge&&ge.hide()}}),i.current.on("pause",()=>{if(!i.current.isChangingQuality&&o.current.seekIndicator&&o.current.seekIndicator.show("pause"),l&&i.current.currentTime()===0){const Ee=i.current.el(),J=Ee.querySelector("video"),ve=Ee.querySelector(".vjs-poster"),ge=i.current.getChild("bigPlayButton");J&&(J.style.opacity="0"),ve&&(ve.style.opacity="1"),ge&&ge.show()}});let Z=null,fe=null;i.current.on("ended",()=>{if(l){const ge=i.current.getChild("bigPlayButton");ge&&ge.show()}setTimeout(()=>{if(i.current&&!i.current.isDisposed()&&i.current.el()){const Ue=i.current.getChild("controlBar");Ue&&(Ue.show(),Ue.el().style.opacity="1",Ue.el().style.pointerEvents="auto")}},50);const Ee=s.current.getAutoplayPreference(),J=p.nextLink!==null;if(!l&&Ee&&J)if(A.isPlayList)Z&&(i.current.removeChild(Z),Z=null),fe&&(i.current.removeChild(fe),fe=null),oe();else{let ge={title:"Next Video",author:"",duration:0,thumbnail:""};if(N.length>0){const Ue=N[0];ge={title:Ue.title||"Next Video",author:Ue.author||"",duration:Ue.duration||0,thumbnail:Ue.thumbnail||""}}Z&&(i.current.removeChild(Z),Z=null),fe&&(i.current.removeChild(fe),fe=null),fe=new $y(i.current,{nextVideoData:ge,countdownSeconds:5,onPlayNext:()=>{oe()},onCancel:()=>{fe&&(i.current.removeChild(fe),fe=null),ve()}}),i.current.addChild(fe),setTimeout(()=>{fe&&!fe.isDisposed()&&fe.startCountdown()},0)}else ve();function ve(){Z&&(i.current.removeChild(Z),Z=null),Z=new Vy(i.current,{relatedVideos:N}),Z.relatedVideos=N,i.current.addChild(Z),Z.show()}}),i.current.on("play",()=>{Z&&Z.hide(),fe&&fe.stopCountdown()}),i.current.on("seeking",()=>{Z&&Z.hide(),fe&&fe.stopCountdown()}),i.current.on("replay",()=>{Z&&Z.hide(),i.current.currentTime(0),i.current.play()}),i.current.on("error",Ee=>{}),i.current.on("fullscreenchange",()=>{}),i.current.on("volumechange",()=>{}),i.current.on("ratechange",()=>{}),i.current.on("texttrackchange",()=>{}),i.current.ready(()=>{if(i.current.el()){const Ee=i.current.el();Ee.setAttribute("tabindex","0"),Ee.focus()}}),i.current.on("fullscreenchange",()=>{setTimeout(()=>{if(i.current&&i.current.el()){const Ee=i.current.el();if(Ee.setAttribute("tabindex","0"),Ee.focus(),i.current.isFullscreen()){const J=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;J&&(J.setAttribute("tabindex","0"),J.focus())}}},100)})}},0);return()=>{clearTimeout(_e)}}return()=>{o.current&&o.current.cleanupArrowKeyHandler&&o.current.cleanupArrowKeyHandler(),o.current&&o.current.cleanupSeekbarTouch&&o.current.cleanupSeekbarTouch(),o.current&&o.current.embedControlsCleanup&&o.current.embedControlsCleanup(),o.current&&o.current.forceHideInterval&&clearInterval(o.current.forceHideInterval),i.current&&!i.current.isDisposed()&&(i.current.dispose(),i.current=null)}},[]),gt.useEffect(()=>{const _e=()=>{if(i.current&&i.current.el()){const Ee=i.current.el();Ee.setAttribute("tabindex","0"),Ee.focus()}},de=()=>{document.hidden||setTimeout(_e,100)},le=()=>{setTimeout(_e,100)};document.addEventListener("visibilitychange",de),window.addEventListener("focus",le);const fe=[100,500,1e3,2e3].map(Ee=>setTimeout(_e,Ee));return()=>{document.removeEventListener("visibilitychange",de),window.removeEventListener("focus",le),fe.forEach(clearTimeout)}},[]),bn.jsx("video",{ref:e,id:r,className:`video-js vjs-default-skin${A.useRoundedCorners?" video-js-rounded-corners":""}`,tabIndex:"0"})}const CI="",wI="",AI="",eM=H.getComponent("TransientButton");class Gx extends eM{constructor(e,i){super(e,{controlText:"Test Button",position:["bottom","right"],className:"test-button",...i}),this.setupVisibilityHandling()}setupVisibilityHandling(){this.el().style.transition="opacity 0.3s ease",this.player().on("mouseenter",()=>{this.showWithFade()}),this.player().on("mouseleave",()=>{setTimeout(()=>{this.player().paused()||this.hideWithFade()},3e3)}),this.player().on("touchstart",()=>{this.showWithFade()}),this.player().on("touchend",()=>{setTimeout(()=>{this.player().paused()||this.hideWithFade()},3e3)}),this.player().on("useractive",()=>{this.showWithFade()}),this.player().on("userinactive",()=>{this.player().paused()||this.hideWithFade()}),this.player().on("pause",()=>{this.showWithFade()}),this.player().on("play",()=>{this.player().userActive()||this.hideWithFade()})}showWithFade(){this.show(),this.el().style.opacity="1",this.el().style.visibility="visible"}hideWithFade(){this.el().style.opacity="0",setTimeout(()=>{this.el().style.opacity==="0"&&this.hide()},300)}handleClick(){alert("testButton - controls were hidden")}}H.registerComponent("TestButton",Gx);class tM{constructor(e,i,s){this.player=e,this.mediaData=i,this.userPreferences=s}hasUserInteracted(){return document.hasFocus()||document.visibilityState==="visible"||sessionStorage.getItem("userInteracted")==="true"}async handleAutoplay(){if(!this.player.paused()||this.player.seeking())return;const e=this.hasUserInteracted(),i=this.userPreferences.getPreference("muted");try{!this.mediaData.urlMuted&&e&&i!==!0&&this.player.muted(!1),await this.player.play()}catch{if(!this.player.muted())try{this.player.muted(!0),await this.player.play(),i!==!0&&this.restoreSound(e)}catch(o){console.error("❌ Even muted autoplay was blocked:",o.message)}}}restoreSound(e){const i=()=>{this.player&&!this.player.isDisposed()&&(this.player.muted(!1),this.player.trigger("notify","🔊 Sound enabled!"))};if(e)setTimeout(i,100);else{setTimeout(()=>{this.player&&!this.player.isDisposed()&&this.player.trigger("notify","🔇 Click anywhere to enable sound")},1e3);const s=()=>{i(),sessionStorage.setItem("userInteracted","true"),document.removeEventListener("click",s),document.removeEventListener("keydown",s),document.removeEventListener("touchstart",s)};document.addEventListener("click",s,{once:!0}),document.addEventListener("keydown",s,{once:!0}),document.addEventListener("touchstart",s,{once:!0})}}}class iM{constructor(e,i){this.player=e,this.isTouchDevice=i,this.orientationChangeHandler=null,this.screenOrientationHandler=null}setupOrientationHandling(){this.isTouchDevice&&(screen.orientation?(this.screenOrientationHandler=()=>{const e=screen.orientation.type;e.includes("landscape")?this.player.isFullscreen()||this.player.requestFullscreen():e.includes("portrait")&&this.player.isFullscreen()&&this.player.exitFullscreen()},screen.orientation.addEventListener("change",this.screenOrientationHandler)):(this.orientationChangeHandler=()=>{const e=Math.abs(window.orientation)===90;setTimeout(()=>{e&&!this.player.isFullscreen()?this.player.requestFullscreen():!e&&this.player.isFullscreen()&&this.player.exitFullscreen()},100)},window.addEventListener("orientationchange",this.orientationChangeHandler)))}cleanup(){this.screenOrientationHandler&&screen.orientation&&screen.orientation.removeEventListener("change",this.screenOrientationHandler),this.orientationChangeHandler&&window.removeEventListener("orientationchange",this.orientationChangeHandler)}}class nM{constructor(e,i){this.player=e,this.options=i,this.endScreen=null,this.autoplayCountdown=null,this.setupEndScreenHandling()}setupEndScreenHandling(){this.player.on("ended",()=>{this.handleVideoEnded()});const e=()=>{this.endScreen&&this.endScreen.hide(),this.autoplayCountdown&&this.autoplayCountdown.stopCountdown()};this.player.on("play",e),this.player.on("seeking",e)}handleVideoEnded(){const{isEmbedPlayer:e,userPreferences:i,mediaData:s,currentVideo:o,relatedVideos:l,goToNextVideo:c}=this.options;if(e){const b=this.player.getChild("bigPlayButton");b&&b.show()}setTimeout(()=>{if(this.player&&!this.player.isDisposed()){const b=this.player.el();if(b){const _=this.player.getChild("posterImage");_&&(_.hide(),_.el().style.display="none",_.el().style.visibility="hidden",_.el().style.opacity="0"),b.querySelectorAll(".vjs-poster").forEach(M=>{M.style.display="none",M.style.visibility="hidden",M.style.opacity="0"}),b.style.backgroundColor="#000";const w=b.querySelector("video");w&&(w.removeAttribute("poster"),w.style.backgroundColor="#000");const D=this.player.getChild("controlBar");if(D){D.show(),D.el().style.opacity="1",D.el().style.pointerEvents="auto";const M=D.getChild("progressControl");if(M){M.show(),M.el().style.backgroundColor="rgba(0, 0, 0, 0.8)";const A=M.el().querySelector(".vjs-progress-holder");A&&(A.style.backgroundColor="rgba(0, 0, 0, 0.6)")}}}}},50);const f=i.getAutoplayPreference(),p=s.nextLink!==null;!e&&f&&p?o.isPlayList?(this.cleanupOverlays(),c()):this.showAutoplayCountdown(l,c):this.showEndScreen(l)}showAutoplayCountdown(e,i){let s={title:"Next Video",author:"",duration:0,thumbnail:""};if(e.length>0){const o=e[0];s={title:o.title||"Next Video",author:o.author||"",duration:o.duration||0,thumbnail:o.thumbnail||""}}this.cleanupOverlays(),this.autoplayCountdown=new $y(this.player,{nextVideoData:s,countdownSeconds:5,onPlayNext:()=>{i()},onCancel:()=>{this.autoplayCountdown&&(this.player.removeChild(this.autoplayCountdown),this.autoplayCountdown=null),this.showEndScreen(e)}}),this.player.addChild(this.autoplayCountdown),setTimeout(()=>{this.autoplayCountdown&&!this.autoplayCountdown.isDisposed()&&this.autoplayCountdown.startCountdown()},0)}showEndScreen(e){this.endScreen&&(this.player.removeChild(this.endScreen),this.endScreen=null),this.endScreen=new Vy(this.player,{relatedVideos:e}),this.endScreen.relatedVideos=e,this.endScreen.setRelatedVideos&&this.endScreen.setRelatedVideos(e),this.player.addChild(this.endScreen),this.endScreen.show()}cleanupOverlays(){this.endScreen&&(this.player.removeChild(this.endScreen),this.endScreen=null),this.autoplayCountdown&&(this.player.removeChild(this.autoplayCountdown),this.autoplayCountdown=null)}cleanup(){this.cleanupOverlays()}}class sM{constructor(e,i=null,s={}){Fg(this,"handleKeyboardEvent",e=>{this.isInputFocused()||this.handleSpaceKey(e)||this.handleArrowKeys(e)});this.playerRef=e,this.customComponents=i,this.options={seekAmount:5,...s},this.eventHandler=null,this.isActive=!1}isInputFocused(){const e=document.activeElement;return e&&(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.contentEditable==="true")}handleSpaceKey(e){return e.code==="Space"||e.key===" "?(e.preventDefault(),this.playerRef.current&&(this.playerRef.current.paused()?this.playerRef.current.play():this.playerRef.current.pause()),!0):!1}handleArrowKeys(e){const{seekAmount:i}=this.options;return e.key==="ArrowRight"||e.keyCode===39?(e.preventDefault(),this.seekForward(i),!0):e.key==="ArrowLeft"||e.keyCode===37?(e.preventDefault(),this.seekBackward(i),!0):!1}seekForward(e){var l,c;if(!this.playerRef.current)return;const i=this.playerRef.current.currentTime(),s=this.playerRef.current.duration(),o=Math.min(i+e,s);this.playerRef.current.currentTime(o),(c=(l=this.customComponents)==null?void 0:l.current)!=null&&c.seekIndicator&&this.customComponents.current.seekIndicator.show("forward",e)}seekBackward(e){var o,l;if(!this.playerRef.current)return;const i=this.playerRef.current.currentTime(),s=Math.max(i-e,0);this.playerRef.current.currentTime(s),(l=(o=this.customComponents)==null?void 0:o.current)!=null&&l.seekIndicator&&this.customComponents.current.seekIndicator.show("backward",e)}init(){if(this.isActive){console.warn("KeyboardHandler is already active");return}document.addEventListener("keydown",this.handleKeyboardEvent),this.isActive=!0}destroy(){this.isActive&&(document.removeEventListener("keydown",this.handleKeyboardEvent),this.isActive=!1)}updateOptions(e){this.options={...this.options,...e}}updatePlayerRef(e){this.playerRef=e}updateCustomComponents(e){this.customComponents=e}}class rM{constructor(e,i=null,s={}){Fg(this,"handlePlayEvent",()=>{var i,s;const e=this.playerRef.current;e&&(!e.isChangingQuality&&this.options.showSeekIndicators&&((s=(i=this.customComponents)==null?void 0:i.current)!=null&&s.seekIndicator)&&this.customComponents.current.seekIndicator.show("play"),this.options.isEmbedPlayer&&this.handleEmbedPlayerVisibility("play"))});Fg(this,"handlePauseEvent",()=>{var i,s;const e=this.playerRef.current;e&&(!e.isChangingQuality&&this.options.showSeekIndicators&&((s=(i=this.customComponents)==null?void 0:i.current)!=null&&s.seekIndicator)&&this.customComponents.current.seekIndicator.show("pause"),this.options.isEmbedPlayer&&e.currentTime()===0&&this.handleEmbedPlayerVisibility("pause"))});this.playerRef=e,this.customComponents=i,this.options={isEmbedPlayer:!1,showSeekIndicators:!0,...s},this.eventHandlers={},this.isActive=!1}handleEmbedPlayerVisibility(e){const i=this.playerRef.current;if(!i)return;const s=i.el(),o=s.querySelector("video"),l=s.querySelector(".vjs-poster"),c=i.getChild("bigPlayButton");e==="play"?(o&&(o.style.opacity="1"),l&&(l.style.opacity="0"),c&&c.hide()):e==="pause"&&(o&&(o.style.opacity="0"),l&&(l.style.opacity="1"),c&&c.show())}init(){if(this.isActive){console.warn("PlaybackEventHandler is already active");return}const e=this.playerRef.current;if(!e){console.error("Player reference is not available");return}e.on("play",this.handlePlayEvent),e.on("pause",this.handlePauseEvent),this.eventHandlers={play:this.handlePlayEvent,pause:this.handlePauseEvent},this.isActive=!0}destroy(){if(!this.isActive)return;const e=this.playerRef.current;e&&this.eventHandlers&&Object.entries(this.eventHandlers).forEach(([i,s])=>{e.off(i,s)}),this.eventHandlers={},this.isActive=!1}updateOptions(e){this.options={...this.options,...e}}updatePlayerRef(e){this.playerRef=e}updateCustomComponents(e){this.customComponents=e}setSeekIndicatorsEnabled(e){this.options.showSeekIndicators=e}setEmbedPlayerMode(e){this.options.isEmbedPlayer=e}}const aM=r=>{setTimeout(()=>{const e=r.getChild("controlBar");if(!e)return;const i={playToggle:()=>r.paused()?"Play":"Pause",fullscreenToggle:()=>r.isFullscreen()?"Exit fullscreen":"Fullscreen",pictureInPictureToggle:"Picture-in-picture",subtitlesButton:"Subtitles/CC",chaptersButton:"Chapters",audioTrackButton:"Audio tracks",playbackRateMenuButton:"Playback speed"};Object.keys(i).forEach(o=>{const l=e.getChild(o);if(l&&l.el()){const c=l.el(),f=typeof i[o]=="function"?i[o]():i[o];c.setAttribute("title",f),c.setAttribute("aria-label",f),oM(c),o==="playToggle"?(r.on("play",()=>{c.setAttribute("title","Pause"),c.setAttribute("aria-label","Pause")}),r.on("pause",()=>{c.setAttribute("title","Play"),c.setAttribute("aria-label","Play")})):o==="fullscreenToggle"&&r.on("fullscreenchange",()=>{const p=r.isFullscreen()?"Exit fullscreen":"Fullscreen";c.setAttribute("title",p),c.setAttribute("aria-label",p)})}});const s=()=>{[e.getChild("volumePanel"),e.getChild("muteToggle"),e.getChild("volumeControl")].forEach(l=>{if(l&&l.el()){const c=l.el();c.removeAttribute("title"),c.removeAttribute("aria-label"),c.querySelectorAll("*").forEach(p=>{p.removeAttribute("title")})}})};s(),setTimeout(s,100)},500)},oM=r=>{if(!("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0))return;let i=0,s=null;r.addEventListener("touchstart",()=>{i=Date.now()},{passive:!0}),r.addEventListener("touchend",()=>{Date.now()-i<300&&(r.classList.add("touch-tooltip-active"),s&&clearTimeout(s),s=setTimeout(()=>{r.classList.remove("touch-tooltip-active")},2e3))},{passive:!0})};function lM({videoId:r="default-video"}){var ye,_e,de;const e=gt.useRef(null),i=gt.useRef(null),s=gt.useRef(new Ky),o=gt.useRef({}),l=gt.useRef(null),c=gt.useRef(null),f=r==="video-embed",p=gt.useMemo(()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,[]),b={}.VITE_DEV_MODE==="true"||window.location.hostname.includes("vercel.app"),_=gt.useMemo(()=>typeof window<"u"&&window.MEDIA_DATA?window.MEDIA_DATA:{data:{title:"Modi tempora est quaerat numquam",author_name:"Markos Gogoulos",author_profile:"/user/markos/",author_thumbnail:"/media/userlogos/user.jpg",url:"https://demo.mediacms.io/view?m=elygiagorgechania",poster_url:"/media/original/thumbnails/user/markos/c1ab03cab3bb46b5854a5e217cfe3013_3mGZ15f.VID_20230813_144422.mp4.jpg",___chapter_data:[],chapter_data:[{startTime:"00:00:00.000",endTime:"00:00:02.295",chapterTitle:"A1 Lorem ipsum dolor sit amet consectetur adipisicing elit."},{startTime:"00:00:02.295",endTime:"00:00:04.590",chapterTitle:"A2 of Marine Life"},{startTime:"00:00:04.590",endTime:"00:00:06.885",chapterTitle:"A3 Reef Ecosystems"}],related_media:[{friendly_token:"dktSm7iEo",url:"https://demo.mediacms.io/view?m=dktSm7iEo",api_url:"https://demo.mediacms.io/api/v1/media/dktSm7iEo",user:"markos",title:"Sed aliquam consectetur dolor.",description:"Voluptatem quiquia dolorem labore dolore. Dolor etincidunt non etincidunt etincidunt sed. Adipisci eius etincidunt dolor magnam dolor. Dolorem porro etincidunt quaerat. Eius magnam dolorem tempora voluptatem labore. Dolore sed porro ipsum aliquam numquam non dolor. Labore aliquam labore dolor sit quisquam quaerat.",add_date:"2024-10-02T05:28:18.784775-04:00",views:803,media_type:"video",state:"public",duration:12,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/8624c4080afc46eba8b4f27a81eccf27.Birch.mp4_myELKan.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/8624c4080afc46eba8b4f27a81eccf27.tmpb7kerjb2.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:"124.5MB"},{friendly_token:"zK2nirNLC",url:"https://demo.mediacms.io/view?m=zK2nirNLC",api_url:"https://demo.mediacms.io/api/v1/media/zK2nirNLC",user:"markos",title:"University of Copenhagen Mærsk Tower",description:"https://maps.app.goo.gl/ewVAGgqdrb1MD1sF7",add_date:"2025-06-06T00:00:00-04:00",views:632,media_type:"video",state:"public",duration:27,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/6497e960081b4b8abddcf4cbdf2bf4eb_38hpsj6.20250604_080632.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/6497e960081b4b8abddcf4cbdf2bf4eb.tmpjc3_yx1g.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"58.8MB"},{friendly_token:"o7lKzt664",url:"https://demo.mediacms.io/view?m=o7lKzt664",api_url:"https://demo.mediacms.io/api/v1/media/o7lKzt664",user:"markos",title:"Magnam velit ipsum quisquam amet magnam etincidunt.",description:"Magnam sed quisquam quiquia dolor est. Tempora sit etincidunt dolor dolore magnam. Numquam non dolorem eius aliquam non. Consectetur sit consectetur dolor quaerat est. Consectetur amet dolor ut dolor ipsum. Mpla mpla antalya",add_date:"2024-10-02T05:35:10-04:00",views:1378,media_type:"video",state:"public",duration:6,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/95eb092b57c24f52b75691fa382d16bb_Bg99UmX.20240526_123312.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/95eb092b57c24f52b75691fa382d16bb.tmpthrejon6.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:22,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"13.0MB"},{friendly_token:"mFELnYWko",url:"https://demo.mediacms.io/view?m=mFELnYWko",api_url:"https://demo.mediacms.io/api/v1/media/mFELnYWko",user:"markos",title:"kubectl-cheat-sheet.pdf",description:"",add_date:"2024-10-25T04:24:39-04:00",views:1391,media_type:"pdf",state:"public",duration:0,thumbnail_url:null,is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:15,dislikes:9,reported_times:1,featured:!1,user_featured:!1,size:null},{friendly_token:"ZLjVzLcCE",url:"https://demo.mediacms.io/view?m=ZLjVzLcCE",api_url:"https://demo.mediacms.io/api/v1/media/ZLjVzLcCE",user:"markos",title:"Quaerat velit sed numquam ipsum magnam.",description:"Dolore numquam aliquam dolore modi modi. Dolor quaerat est voluptatem ut. Dolor eius tempora magnam etincidunt ipsum modi porro. Etincidunt consectetur est est sed ut. Porro neque sed dolorem dolore. Sed velit quisquam ipsum quisquam consectetur porro.",add_date:"2024-10-02T05:34:03.836032-04:00",views:888,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b5e8dea6a0a3477885db786f2e89fb51.IMG_20240324_141309.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"bvMsRGRxE",url:"https://demo.mediacms.io/view?m=bvMsRGRxE",api_url:"https://demo.mediacms.io/api/v1/media/bvMsRGRxE",user:"markos",title:"Numquam quisquam amet dolore quisquam ipsum ut.",description:"Modi numquam magnam numquam eius labore est dolorem. Voluptatem etincidunt neque ipsum non. Non tempora etincidunt magnam etincidunt. Sed dolor dolore amet quiquia porro sit non. Tempora etincidunt modi sed etincidunt est aliquam. Magnam aliquam ipsum modi dolore. Etincidunt sit eius dolore sed neque porro labore. Eius etincidunt dolorem est quiquia amet aliquam. Quaerat velit labore est dolor.",add_date:"2024-10-02T05:33:02.972212-04:00",views:773,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/b9717b02cd8b45ec91d07470933810db.IMG_20231226_140530.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"lsNWKKq5N",url:"https://demo.mediacms.io/view?m=lsNWKKq5N",api_url:"https://demo.mediacms.io/api/v1/media/lsNWKKq5N",user:"markos",title:"Quaerat quaerat numquam porro dolor",description:"Modi dolorem non non neque dolor magnam quisquam. Magnam amet magnam porro. Dolorem quiquia dolorem etincidunt labore ipsum aliquam sed. Eius sed eius sit consectetur quaerat. Voluptatem dolorem porro etincidunt labore aliquam quisquam. Adipisci quisquam dolorem dolorem magnam dolorem ipsum. Consectetur quaerat magnam sit voluptatem.",add_date:"2024-10-02T00:00:00-04:00",views:666,media_type:"video",state:"public",duration:13,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58008fdc69d34c229a85f29076004639.VID_20230917_094453.mp4_Pe8a1dv.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58008fdc69d34c229a85f29076004639.tmp85b478_u.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:10,dislikes:3,reported_times:1,featured:!0,user_featured:!1,size:"35.0MB"},{friendly_token:"tsgNaSe6E",url:"https://demo.mediacms.io/view?m=tsgNaSe6E",api_url:"https://demo.mediacms.io/api/v1/media/tsgNaSe6E",user:"markos",title:"Magnam ipsum eius numquam quiquia non adipisci.",description:"Adipisci labore dolorem ipsum quaerat non dolore ut. Velit porro neque non consectetur neque neque. Ut sit tempora tempora. Ipsum ut velit neque. Quaerat labore amet porro porro amet tempora. Sed voluptatem est amet quisquam sed numquam velit. Est ipsum non labore. Consectetur amet neque consectetur dolor ipsum.",add_date:"2024-10-02T05:32:46.253917-04:00",views:824,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/0405f61e131f431793644be3742fcc1a.20240628_235522.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"f9xqzbbJE",url:"https://demo.mediacms.io/view?m=f9xqzbbJE",api_url:"https://demo.mediacms.io/api/v1/media/f9xqzbbJE",user:"markos",title:"Magnam quaerat numquam modi dolore sed amet.",description:"Non non voluptatem neque velit labore. Eius labore non aliquam quisquam adipisci neque. Aliquam ipsum sed ipsum quisquam. Sit quaerat sed dolore non tempora. Ipsum sed labore dolore consectetur. Modi non quisquam sed ut ut dolor quaerat.",add_date:"2024-10-02T05:34:18.498303-04:00",views:844,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/369f44b14f944941881a20e8d5285e78.IMG_20240324_151737.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:3,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"DE3KByBeo",url:"https://demo.mediacms.io/view?m=DE3KByBeo",api_url:"https://demo.mediacms.io/api/v1/media/DE3KByBeo",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:272,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/58b35efa3aca454196227c0eb5e2ca75_pkgSAK2.20250517_101207.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/58b35efa3aca454196227c0eb5e2ca75.tmpsw6vmsfo.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"62.0MB"},{friendly_token:"M8ktwf8kF",url:"https://demo.mediacms.io/view?m=M8ktwf8kF",api_url:"https://demo.mediacms.io/api/v1/media/M8ktwf8kF",user:"markos",title:"Quaerat voluptatem quisquam neque velit neque.",description:"Aliquam ipsum quisquam dolor. Modi quisquam neque ut ipsum amet. Tempora quaerat ipsum aliquam velit velit porro est. Consectetur neque eius quisquam porro amet sit neque. Modi voluptatem neque modi. Ipsum aliquam labore quaerat.",add_date:"2024-10-02T05:34:32.027708-04:00",views:852,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/48a682227b544388a1b547736668d0ad.IMG_20240324_151743.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:7,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"s2qAmRTJ9",url:"https://demo.mediacms.io/view?m=s2qAmRTJ9",api_url:"https://demo.mediacms.io/api/v1/media/s2qAmRTJ9",user:"markos",title:"Labore neque ipsum labore modi tempora aliquam neque.",description:"Eius voluptatem aliquam sit sit ipsum consectetur. Dolorem velit amet modi. Porro quisquam velit neque dolorem. Dolorem modi quiquia aliquam. Numquam est magnam non numquam modi quisquam est. Sit velit ut labore sit dolore velit modi. Aliquam modi dolorem ut.",add_date:"2024-10-02T05:34:27.197596-04:00",views:779,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/2b786916111947e3ba960d7146ae0424.IMG_20230708_133437.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:2,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"8pWsxkOS5",url:"https://demo.mediacms.io/view?m=8pWsxkOS5",api_url:"https://demo.mediacms.io/api/v1/media/8pWsxkOS5",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:321,media_type:"video",state:"public",duration:47,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/d970760faf5745b4b3d0d0cff2b95d86_cvyjd5y.20250517_140535.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/d970760faf5745b4b3d0d0cff2b95d86.tmp3vtt3uip.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:5,dislikes:2,reported_times:0,featured:!1,user_featured:!1,size:"101.2MB"},{friendly_token:"swcx8A2h1",url:"https://demo.mediacms.io/view?m=swcx8A2h1",api_url:"https://demo.mediacms.io/api/v1/media/swcx8A2h1",user:"markos",title:"Etincidunt dolore eius ut non numquam dolore dolorem.",description:"Etincidunt amet dolorem quisquam tempora. Dolorem dolor modi sit modi labore sit. Labore est sed non numquam. Porro non quaerat dolorem porro tempora sit. Ut neque est etincidunt velit eius. Etincidunt aliquam adipisci sed quiquia modi. Adipisci non sed adipisci velit.",add_date:"2024-10-02T05:38:43-04:00",views:7973,media_type:"video",state:"public",duration:31,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/fe4933d67b884d4da507dd60e77f7438.VID_20200909_141053.mp4_bU90dbl.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/fe4933d67b884d4da507dd60e77f7438.tmpdd72kiwh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:230,dislikes:62,reported_times:1,featured:!0,user_featured:!1,size:"65.9MB"},{friendly_token:"rNefa4WtV",url:"https://demo.mediacms.io/view?m=rNefa4WtV",api_url:"https://demo.mediacms.io/api/v1/media/rNefa4WtV",user:"markos",title:"Quaerat modi non eius.",description:"Quisquam ut dolorem dolorem quisquam dolore. Non modi etincidunt labore sit quisquam. Sed neque quaerat quisquam voluptatem. Numquam labore neque etincidunt. Magnam etincidunt porro adipisci.",add_date:"2024-10-02T05:36:46.062913-04:00",views:2683,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/ca0e3af507c64fc5995b9d97e4a8c779.20240527_091011.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:45,dislikes:16,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"LP09dv0mx",url:"https://demo.mediacms.io/view?m=LP09dv0mx",api_url:"https://demo.mediacms.io/api/v1/media/LP09dv0mx",user:"markos",title:"Est ipsum non etincidunt voluptatem adipisci labore.",description:"Est sit voluptatem numquam ut etincidunt. Adipisci sed dolor voluptatem labore. Quiquia est sit eius eius labore velit. Tempora ut tempora neque. Ipsum eius sit labore amet dolorem non non. Quiquia velit amet eius sit ut ut voluptatem. Quiquia sit ut ipsum ipsum neque. Amet etincidunt aliquam consectetur voluptatem sed etincidunt quiquia. Sit eius dolore magnam sed velit consectetur. Etincidunt amet numquam sit porro.",add_date:"2024-10-02T05:31:41.087014-04:00",views:711,media_type:"video",state:"public",duration:26,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/980decd203f245bbb3723cba73a94a11.VID_20230813_104846.mp4_3rwZtxQ.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/980decd203f245bbb3723cba73a94a11.tmpmddawiqe.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:11,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:"66.4MB"},{friendly_token:"just_somethi",url:"https://demo.mediacms.io/view?m=just_somethi",api_url:"https://demo.mediacms.io/api/v1/media/just_somethi",user:"markos",title:"Sit consectetur dolore numquam.",description:"Consectetur adipisci neque neque tempora. Amet quiquia ut labore non sit. Dolor aliquam quiquia adipisci dolor dolorem quiquia. Dolore porro modi labore quisquam adipisci numquam non. Dolor consectetur ut est neque.",add_date:"2024-10-02T00:00:00-04:00",views:1288,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7aaa65ac24224fe3a768aa6b7a723b58.20240527_090952.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:28,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"PbsYTGEol",url:"https://demo.mediacms.io/view?m=PbsYTGEol",api_url:"https://demo.mediacms.io/api/v1/media/PbsYTGEol",user:"markos",title:"Voluptatem porro neque tempora dolorem quiquia est dolor.",description:"Labore aliquam dolorem quiquia est ipsum quiquia. Sed est amet non ipsum. Labore etincidunt etincidunt quiquia amet tempora tempora. Aliquam velit ipsum consectetur. Ipsum labore quaerat quiquia aliquam magnam. Quisquam ut velit velit dolorem dolorem. Aliquam quaerat tempora quisquam ut voluptatem voluptatem quiquia.",add_date:"2024-10-02T05:33:48.024941-04:00",views:785,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f01faaa2e7be4c9aa7598ab755898a09.IMG_20240324_141304.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"mkpfy31bY",url:"https://demo.mediacms.io/view?m=mkpfy31bY",api_url:"https://demo.mediacms.io/api/v1/media/mkpfy31bY",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:212,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c2d40995ce7640e3b8cbfee1a2890c51.20250517_183010.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"w2lYWaW8e",url:"https://demo.mediacms.io/view?m=w2lYWaW8e",api_url:"https://demo.mediacms.io/api/v1/media/w2lYWaW8e",user:"markos",title:"Plane view approaching Copenhagen airport",description:"plane view",add_date:"2025-06-06T00:00:00-04:00",views:664,media_type:"video",state:"public",duration:50,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e84f1caf58f44d838456625ffe96173b_LQCWsAe.20250603_110810.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/e84f1caf58f44d838456625ffe96173b.tmp7hm26nok.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:13,dislikes:3,reported_times:0,featured:!1,user_featured:!1,size:"108.8MB"},{friendly_token:"qLMrr970w",url:"https://demo.mediacms.io/view?m=qLMrr970w",api_url:"https://demo.mediacms.io/api/v1/media/qLMrr970w",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:215,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/558f53227cc5418c9b7d66a3740fe2f8.20250517_082340.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:2,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"elygiagorgechania",url:"https://demo.mediacms.io/view?m=elygiagorgechania",api_url:"https://demo.mediacms.io/api/v1/media/elygiagorgechania",user:"markos",title:"Exit of Elygia Gorge, Chania, Crete",description:"This video is from the exit of Elygia Gorge, Chania, Crete, where it meets the sea!",add_date:"2025-06-15T00:00:00-04:00",views:688,media_type:"video",state:"public",duration:29,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c1ab03cab3bb46b5854a5e217cfe3013_Nete6ao.VID_20230813_144422.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/c1ab03cab3bb46b5854a5e217cfe3013.tmpjlxkhy0i.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:0,reported_times:0,featured:!1,user_featured:!1,size:"75.6MB"},{friendly_token:"OxO6BMVZb",url:"https://demo.mediacms.io/view?m=OxO6BMVZb",api_url:"https://demo.mediacms.io/api/v1/media/OxO6BMVZb",user:"markos",title:"Eius velit etincidunt amet tempora ut.",description:"Aliquam eius adipisci adipisci. Quaerat dolor quaerat magnam. Amet ut quaerat sit sed magnam quaerat neque. Neque velit porro labore modi ut ut ut. Non quaerat consectetur dolor eius voluptatem. Quisquam modi amet sed magnam eius. Quisquam dolor dolore aliquam quisquam neque dolore. Quisquam dolor ut ipsum quiquia. Voluptatem quisquam neque quisquam quiquia adipisci. Est modi eius est etincidunt numquam quisquam ut.",add_date:"2024-10-02T05:34:33.461809-04:00",views:1023,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/13299e6838e143fda776bacf7081484e.IMG_20230820_200357.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:4,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"hDHXkdwy0",url:"https://demo.mediacms.io/view?m=hDHXkdwy0",api_url:"https://demo.mediacms.io/api/v1/media/hDHXkdwy0",user:"markos",title:"Modi tempora est quaerat numquam",description:"Magnam voluptatem est magnam dolorem. Etincidunt quiquia aliquam velit tempora porro. Magnam neque eius eius etincidunt ut ipsum. Adipisci labore quaerat modi. Ipsum modi quaerat consectetur est non quaerat sed. Neque ut modi adipisci dolore adipisci dolor ut. Dolor tempora adipisci quisquam. Dolorem consectetur velit adipisci etincidunt voluptatem. Non quisquam voluptatem adipisci. Voluptatem est aliquam porro labore non.",add_date:"2024-10-02T05:36:42-04:00",views:1679,media_type:"video",state:"public",duration:24,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/a3c5642e13624149897f193981ebccf3.VID_20210307_111552.mp4_uEHcD0C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/a3c5642e13624149897f193981ebccf3.tmpempjz6eh.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:32,dislikes:12,reported_times:0,featured:!0,user_featured:!1,size:"52.4MB"},{friendly_token:"vDKrrkIVc",url:"https://demo.mediacms.io/view?m=vDKrrkIVc",api_url:"https://demo.mediacms.io/api/v1/media/vDKrrkIVc",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:228,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/50f296fd588240d2ad80a6fb9a5ce7d6.20250518_093811.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:6,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:null},{friendly_token:"4h3nsvXb1",url:"https://demo.mediacms.io/view?m=4h3nsvXb1",api_url:"https://demo.mediacms.io/api/v1/media/4h3nsvXb1",user:"markos",title:"Dolor voluptatem non quiquia consectetur est numquam sed.",description:"Aliquam ipsum etincidunt neque ipsum. Consectetur ut non velit quaerat porro. Eius ut voluptatem velit aliquam dolor. Non etincidunt est quaerat quaerat. Quiquia est non ipsum numquam. Quisquam amet magnam sed eius quaerat. Magnam porro dolorem dolor. Numquam numquam quaerat est. Quisquam tempora ut quaerat est.",add_date:"2024-10-02T05:32:43.865153-04:00",views:981,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/baca04d3009d4daba302919c25b4325e.IMG_1936.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:16,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"HdUU8boQP",url:"https://demo.mediacms.io/view?m=HdUU8boQP",api_url:"https://demo.mediacms.io/api/v1/media/HdUU8boQP",user:"markos",title:"Consectetur adipisci porro quiquia ipsum aliquam etincidunt ut.",description:"Consectetur numquam eius amet est dolor neque modi. Consectetur est amet voluptatem quaerat numquam sed. Porro tempora ut ut. Non dolor amet sit. Labore porro neque dolorem numquam dolore ut. Modi sed adipisci dolore. Numquam magnam est tempora. Neque aliquam labore dolor ipsum porro.",add_date:"2024-10-02T05:34:13.171233-04:00",views:795,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/e1df55b16b3b456ea88bf7feb7db6051.IMG_20230708_120717.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:8,dislikes:3,reported_times:0,featured:!0,user_featured:!1,size:null},{friendly_token:"vy5PTWJZ6",url:"https://demo.mediacms.io/view?m=vy5PTWJZ6",api_url:"https://demo.mediacms.io/api/v1/media/vy5PTWJZ6",user:"markos",title:"Non etincidunt numquam velit.",description:`Etincidunt ut velit ipsum. Labore modi magnam eius quisquam. Dolorem magnam sit quiquia non dolorem tempora. Aliquam labore sed quaerat magnam est aliquam porro. Adipisci adipisci aliquam tempora ut aliquam eius amet. Est etincidunt quiquia dolorem amet consectetur. Ipsum neque dolorem dolore etincidunt.\r
|
||
`,add_date:"2024-10-02T05:33:26-04:00",views:713,media_type:"image",state:"public",duration:0,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/7a9ec6be9ce24a569a246c61d9b03690.IMG_20220528_135153.jpg.jpg",is_reviewed:!0,preview_url:null,author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:9,dislikes:1,reported_times:1,featured:!0,user_featured:!1,size:null},{friendly_token:"TAdmfDUlu",url:"https://demo.mediacms.io/view?m=TAdmfDUlu",api_url:"https://demo.mediacms.io/api/v1/media/TAdmfDUlu",user:"markos",title:"Sed neque adipisci dolorem sed.",description:`Quiquia ipsum velit amet. Consectetur porro numquam numquam magnam adipisci dolore. Dolor ipsum ut ut consectetur modi labore. Neque est non amet. Sit quiquia quisquam dolorem. Modi dolore modi dolorem ipsum ipsum. Neque modi modi dolorem quisquam numquam modi quaerat.\r
|
||
\r
|
||
best scenes at 00:00:12 and 00:14`,add_date:"2024-10-02T00:00:00-04:00",views:821,media_type:"video",state:"public",duration:30,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/f371a6b2c157451d924bc4f612bf2667_Kh4GigX.Pexels_Videos_2079217_1.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/f371a6b2c157451d924bc4f612bf2667.tmp2jqxf9sr.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:20,dislikes:4,reported_times:0,featured:!0,user_featured:!1,size:"90.0MB"},{friendly_token:"kHd7EKAVH",url:"https://demo.mediacms.io/view?m=kHd7EKAVH",api_url:"https://demo.mediacms.io/api/v1/media/kHd7EKAVH",user:"markos",title:"Tempora magnam velit ipsum neque aliquam adipisci.",description:"Porro dolorem eius sed non eius. Non dolor quiquia dolorem. Modi ut dolor aliquam dolor. Non est dolorem amet consectetur neque quiquia numquam. Aliquam adipisci quiquia voluptatem ipsum quisquam magnam adipisci. Sit adipisci dolor consectetur dolor quaerat. Magnam ut modi tempora. Modi non ipsum tempora etincidunt porro. Ut ut dolor ipsum non consectetur neque quiquia.",add_date:"2024-10-02T05:33:57.651288-04:00",views:1051,media_type:"video",state:"public",duration:54,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/9d3b8425eb08400fa08d90f988bc5ff4.VID_20220821_110509.mp4_JzAol5C.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/9d3b8425eb08400fa08d90f988bc5ff4.tmpwlnjum5k.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:26,dislikes:8,reported_times:1,featured:!0,user_featured:!1,size:"136.8MB"},{friendly_token:"Otbc37Yj4",url:"https://demo.mediacms.io/view?m=Otbc37Yj4",api_url:"https://demo.mediacms.io/api/v1/media/Otbc37Yj4",user:"markos",title:"Kastania Evrytanias, Central Greece",description:"",add_date:"2025-05-19T00:00:00-04:00",views:311,media_type:"video",state:"public",duration:25,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/dd3af0e1dece43b490bbafc9400a407a_YtfxVr4.20250517_105515.mp4.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/dd3af0e1dece43b490bbafc9400a407a.tmpl3iqzl10.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:12,dislikes:1,reported_times:0,featured:!1,user_featured:!1,size:"54.3MB"},{friendly_token:"a1BP6J0fM",url:"https://demo.mediacms.io/view?m=a1BP6J0fM",api_url:"https://demo.mediacms.io/api/v1/media/a1BP6J0fM",user:"markos",title:"Velit sed magnam quiquia amet.",description:"Numquam quiquia numquam ut etincidunt numquam. Dolore ut sit eius dolorem sed. Neque porro modi dolor ipsum amet dolore quisquam. Ipsum dolore dolor voluptatem eius quiquia etincidunt. Dolore etincidunt amet velit amet ipsum ut. Aliquam etincidunt consectetur est. Consectetur non quiquia voluptatem velit sed quisquam.",add_date:"2024-10-02T05:35:15.434023-04:00",views:997,media_type:"video",state:"public",duration:11,thumbnail_url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/32e2cf3ff5fe498da93251034e977d9c.20240527_090548.mp4_qiF5S9H.jpg",is_reviewed:!0,preview_url:"https://demo.mediacms.io/media/encoded/1/markos/32e2cf3ff5fe498da93251034e977d9c.tmpheuxmj3y.gif",author_name:"Markos Gogoulos",author_profile:"https://demo.mediacms.io/user/markos/",author_thumbnail:"https://demo.mediacms.io/media/userlogos/2024/10/02/markos.jpeg",encoding_status:"success",likes:14,dislikes:1,reported_times:0,featured:!0,user_featured:!1,size:"3.5MB"}],media_type:"video",original_media_url:"/media/original/user/markos/f371a6b2c157451d924bc4f612bf2667.Pexels_Videos_2079217_1.mp4",hls_info:{master_file:"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/master.m3u8","240_iframe":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-1/iframes.m3u8","480_iframe":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-2/iframes.m3u8","1080_iframe":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-3/iframes.m3u8","360_iframe":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-4/iframes.m3u8","720_iframe":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-5/iframes.m3u8","240_playlist":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-1/stream.m3u8","480_playlist":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-2/stream.m3u8","1080_playlist":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-3/stream.m3u8","360_playlist":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-4/stream.m3u8","720_playlist":"/media/hls/c1ab03cab3bb46b5854a5e217cfe3013/media-5/stream.m3u8"},encodings_info:{144:{},240:{h264:{title:"h264-240",url:"/media/encoded/2/markos/c1ab03cab3bb46b5854a5e217cfe3013.c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4.mp4",progress:100,size:"2.2MB",encoding_id:4940,status:"success"}},360:{h264:{title:"h264-360",url:"/media/encoded/3/markos/c1ab03cab3bb46b5854a5e217cfe3013.c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4.mp4",progress:100,size:"3.3MB",encoding_id:4941,status:"success"}},480:{h264:{title:"h264-480",url:"/media/encoded/13/markos/c1ab03cab3bb46b5854a5e217cfe3013.c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4.mp4",progress:100,size:"6.0MB",encoding_id:4942,status:"success"}},720:{h264:{title:"h264-720",url:"/media/encoded/10/markos/c1ab03cab3bb46b5854a5e217cfe3013.c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4.mp4",progress:100,size:"17.8MB",encoding_id:4943,status:"success"}},1080:{h264:{title:"h264-1080",url:"/media/encoded/7/markos/c1ab03cab3bb46b5854a5e217cfe3013.c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4.mp4",progress:100,size:"37.2MB",encoding_id:4944,status:"success"}},1440:{},2160:{}}},useRoundedCorners:!0,isPlayList:!1,previewSprite:{url:"https://demo.mediacms.io/media/original/thumbnails/user/markos/c1ab03cab3bb46b5854a5e217cfe3013.VID_20230813_144422.mp4sprites.jpg",frame:{width:160,height:90,seconds:10}},siteUrl:"https://demo.mediacms.io",nextLink:"https://demo.mediacms.io/view?m=elygiagorgechania",urlAutoplay:!0,urlMuted:!1},[]),x=le=>{if(typeof le=="number")return le;if(typeof le!="string")return 0;const Z=le.split(":");if(Z.length!==3)return 0;const fe=parseInt(Z[0],10)||0,Ee=parseInt(Z[1],10)||0,J=parseFloat(Z[2])||0;return fe*3600+Ee*60+J},w=gt.useMemo(()=>le=>!le||!Array.isArray(le)?[]:le.map(fe=>({startTime:x(fe.startTime),endTime:x(fe.endTime),chapterTitle:fe.chapterTitle})),[]),D=gt.useMemo(()=>(le,Z)=>{var fe;if(!le||!Array.isArray(le)||le.length===0)return!1;if(le.length>1)return!0;if(le.length===1){const Ee=le[0],J=x(Ee.startTime),ve=x(Ee.endTime),ge=(fe=Ee.chapterTitle)==null?void 0:fe.toLowerCase().match(/^(segment|video|full video|chapter|part)$/);if(Z&&Z>0){const te=J<=1&&Math.abs(ve-Z)<=1;if(te&&ge)return!1;if(!te)return!0}if(J===0&&ge)return!1}return!0},[]),M=gt.useMemo(()=>{var le,Z,fe,Ee;if((le=_==null?void 0:_.data)!=null&&le.chapter_data&&((Z=_==null?void 0:_.data)==null?void 0:Z.chapter_data.length)>0){const J=((fe=_==null?void 0:_.data)==null?void 0:fe.duration)||null;return D(_.data.chapter_data,J)?w((Ee=_==null?void 0:_.data)==null?void 0:Ee.chapter_data):[]}return b?[{startTime:"00:00:00.000",endTime:"00:00:04.000",chapterTitle:"Introduction"},{startTime:"00:00:05.000",endTime:"00:00:10.000",chapterTitle:"Overview of Marine Life"},{startTime:"00:00:10.000",endTime:"00:00:15.000",chapterTitle:"Coral Reef Ecosystems"},{startTime:"00:00:15.000",endTime:"00:00:20.000",chapterTitle:"Deep Sea Creatures"},{startTime:"00:00:20.000",endTime:"00:00:30.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:24.000",endTime:"00:00:32.000",chapterTitle:"Ocean Conservation"},{startTime:"00:00:32.000",endTime:"00:00:40.000",chapterTitle:"Climate Change Impact"},{startTime:"00:00:40.000",endTime:"00:00:48.000",chapterTitle:"Marine Protected Areas"},{startTime:"00:00:48.000",endTime:"00:00:56.000",chapterTitle:"Sustainable Fishing"},{startTime:"00:00:56.000",endTime:"00:00:64.000",chapterTitle:"Research Methods"},{startTime:"00:00:64.000",endTime:"00:00:72.000",chapterTitle:"Future Challenges"},{startTime:"00:00:72.000",endTime:"00:00:80.000",chapterTitle:"Conclusion"},{startTime:"00:00:80.000",endTime:"00:00:88.000",chapterTitle:"Marine Biodiversity Hotspots"},{startTime:"00:00:88.000",endTime:"00:00:96.000",chapterTitle:"Marine Biodiversity test"},{startTime:"00:00:96.000",endTime:"00:01:04.000",chapterTitle:"Whale Migration Patterns"},{startTime:"00:01:04.000",endTime:"00:01:12.000",chapterTitle:"Plastic Pollution Crisis"},{startTime:"00:01:12.000",endTime:"00:01:20.000",chapterTitle:"Seagrass Meadows"},{startTime:"00:01:20.000",endTime:"00:01:28.000",chapterTitle:"Ocean Acidification"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Marine Archaeology"},{startTime:"00:01:28.000",endTime:"00:01:36.000",chapterTitle:"Tidal Pool Ecosystems"},{startTime:"00:01:36.000",endTime:"00:01:44.000",chapterTitle:"Commercial Aquaculture"},{startTime:"00:01:44.000",endTime:"00:01:52.000",chapterTitle:"Ocean Exploration Technology"}].map(J=>({startTime:x(J.startTime),endTime:x(J.endTime),chapterTitle:J.chapterTitle})):[]},[(ye=_==null?void 0:_.data)==null?void 0:ye.chapter_data,(_e=_==null?void 0:_.data)==null?void 0:_e.duration,b,w,D]),A=(le,Z)=>Z==="audio"?le&&le.toLowerCase().includes(".mp3")?"audio/mpeg":le&&le.toLowerCase().includes(".ogg")?"audio/ogg":le&&le.toLowerCase().includes(".wav")?"audio/wav":le&&le.toLowerCase().includes(".m4a")?"audio/mp4":"audio/mpeg":le&&le.toLowerCase().includes(".webm")?"video/webm":le&&le.toLowerCase().includes(".ogg")?"video/ogg":"video/mp4",q=s.current.getQualityPreference(),N=gt.useMemo(()=>{var fe,Ee,J,ve,ge,Ue,te,Me;const le=()=>{var ze,Xe,qe,Pe,be,Le;const Ae=q;if((ze=_.data)!=null&&ze.hls_info){if(Ae==="auto"&&_.data.hls_info.master_file)return[{src:_.siteUrl+_.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}];if(Ae!=="auto"){const ie=`${Ae.replace("p","")}_playlist`;if(_.data.hls_info[ie])return[{src:_.siteUrl+_.data.hls_info[ie],type:"application/x-mpegURL",label:`${Ae}p`}]}if(_.data.hls_info.master_file)return[{src:_.siteUrl+_.data.hls_info.master_file,type:"application/x-mpegURL",label:"Auto"}]}if((Xe=_.data)!=null&&Xe.encodings_info){const ie=_.data.encodings_info,Te=q;if(Te!=="auto"){const Ie=Te.replace("p","");if(ie[Ie]&&ie[Ie].h264&&ie[Ie].h264.url)return[{src:ie[Ie].h264.url,type:A(ie[Ie].h264.url,(qe=_.data)==null?void 0:qe.media_type),label:`${Ie}p`}]}const Oe=[],Ye=Object.keys(ie).filter(Ie=>ie[Ie]&&ie[Ie].h264&&ie[Ie].h264.url).sort((Ie,Ge)=>parseInt(Ge)-parseInt(Ie));for(const Ie of Ye){const Ge=ie[Ie].h264.url;Oe.push({src:Ge,type:A(Ge,(Pe=_.data)==null?void 0:Pe.media_type),label:`${Ie}p`})}if(Oe.length>0)return Oe}if((be=_.data)!=null&&be.original_media_url){const ie=_.siteUrl+_.data.original_media_url;return[{src:ie,type:A(ie,(Le=_.data)==null?void 0:Le.media_type)}]}return[{src:"/videos/sample-video-white.mp4",type:"video/mp4"}]};return{id:((fe=_.data)==null?void 0:fe.friendly_token)||"default-video",title:((Ee=_.data)==null?void 0:Ee.title)||"Video",author_name:((J=_.data)==null?void 0:J.author_name)||"Unknown",author_profile:(ve=_.data)!=null&&ve.author_profile?_.siteUrl+_.data.author_profile:"",author_thumbnail:(ge=_.data)!=null&&ge.author_thumbnail?_.siteUrl+_.data.author_thumbnail:"",url:((Ue=_.data)==null?void 0:Ue.url)||"",poster:(te=_.data)!=null&&te.poster_url?_.siteUrl+_.data.poster_url:"",previewSprite:(_==null?void 0:_.previewSprite)||{},useRoundedCorners:_==null?void 0:_.useRoundedCorners,isPlayList:_==null?void 0:_.isPlayList,related_media:((Me=_.data)==null?void 0:Me.related_media)||[],nextLink:(_==null?void 0:_.nextLink)||null,urlAutoplay:(_==null?void 0:_.urlAutoplay)||!0,urlMuted:(_==null?void 0:_.urlMuted)||!1,sources:le()}},[_,q]),G=gt.useMemo(()=>{var ge,Ue,te,Me,Ae,ze,Xe;const Z=(()=>{var Pe;const qe=["auto"];if((Pe=_.data)!=null&&Pe.encodings_info){const be=Object.keys(_.data.encodings_info).filter(Le=>{const ie=_.data.encodings_info[Le];return ie&&ie.h264&&ie.h264.url}).map(Le=>`${Le}p`).sort((Le,ie)=>parseInt(Le)-parseInt(ie));qe.push(...be)}else qe.push("144p","240p","360p","480p","720p","1080p","1440p","2160p");return qe})(),fe=qe=>{const be=qe.map(ie=>{var Te;return{label:ie.label||ie.value||"Auto",value:(ie.value||ie.label||"auto").toString().toLowerCase(),src:ie.src||ie.url||ie.href,type:ie.type||A(ie.src||ie.url||ie.href,(Te=_.data)==null?void 0:Te.media_type)}}).filter(ie=>ie.src),Le=ie=>{const Te=Z.indexOf(String(ie).toLowerCase());return Te===-1?999:Te};return be.sort((ie,Te)=>Le(ie.value)-Le(Te.value)),be},Ee=(ge=_==null?void 0:_.data)==null?void 0:ge.qualities;if(Array.isArray(Ee)&&Ee.length)return fe(Ee);if((Ue=_.data)!=null&&Ue.hls_info&&_.data.hls_info.master_file){const qe=_.data.hls_info,Pe=[];return Pe.push({label:"Auto",value:"auto",src:_.siteUrl+qe.master_file,type:"application/x-mpegURL"}),Object.keys(qe).forEach(be=>{if(be.endsWith("_playlist")){const Le=be.replace("_playlist","");Pe.push({label:`${Le}p`,value:`${Le}p`,src:_.siteUrl+qe[be],type:"application/x-mpegURL"})}}),fe(Pe)}if((te=_.data)!=null&&te.encodings_info){const qe=_.data.encodings_info,Pe=[];if(Pe.push({label:"Auto",value:"auto",src:null,type:A(null,(Me=_.data)==null?void 0:Me.media_type)}),Object.keys(qe).forEach(be=>{var Le;if(qe[be]&&qe[be].h264&&qe[be].h264.url){const ie=qe[be].h264.url;Pe.push({label:`${be}p`,value:`${be}p`,src:ie,type:A(ie,(Le=_.data)==null?void 0:Le.media_type)})}}),Pe.length>1)return fe(Pe)}const J=(N==null?void 0:N.sources)&&((Ae=N.sources[0])==null?void 0:Ae.src)||null,ve=(N==null?void 0:N.sources)&&((ze=N.sources[0])==null?void 0:ze.type)||A(J,(Xe=_.data)==null?void 0:Xe.media_type);return J?fe([{label:"Auto",value:"auto",src:J,type:ve}]):[]},[_,N]),$=gt.useMemo(()=>{var le;return(le=_==null?void 0:_.data)!=null&&le.related_media?_.data.related_media.slice(0,12).map(Z=>({id:Z.friendly_token,title:Z.title,author:Z.user||Z.author_name||"Unknown",views:`${Z.views} views`,thumbnail:Z.thumbnail_url||Z.author_thumbnail,category:Z.media_type,url:Z.url,duration:Z.duration,size:Z.size,likes:Z.likes,dislikes:Z.dislikes,add_date:Z.add_date,description:Z.description})):[]},[_]),X=[{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}],W=((de=_==null?void 0:_.data)==null?void 0:de.subtitles_info)||(b?X:[]),oe=W.length>0,K=oe?W.map(le=>({kind:"subtitles",src:le.src,srclang:le.srclang,label:le.label,default:!1})):[],pe=()=>{_.onClickNextCallback&&typeof _.onClickNextCallback=="function"&&_.onClickNextCallback()};return gt.useEffect(()=>{var le;if(e.current&&!i.current){if(e.current.player)return;!i.current&&e.current&&!e.current.player&&(i.current=H(e.current,{controls:!0,autoplay:!f,loop:!1,muted:_.urlMuted||!1,poster:N.poster,preload:"auto",sources:N.sources,aspectRatio:"16:9",audioOnlyMode:!1,audioPosterMode:((le=_.data)==null?void 0:le.media_type)==="audio",autoSetup:void 0,breakpoints:{tiny:300,xsmall:400,small:500,medium:600,large:700,xlarge:800,huge:900},disablePictureInPicture:!1,enableDocumentPictureInPicture:!1,enableSmoothSeeking:!0,experimentalSvgIcons:!0,fluid:!0,fullscreen:{options:{navigationUI:"hide"}},id:_.id,inactivityTimeout:f?5e3:2e3,language:"en",languages:{},liveui:!0,liveTracker:{trackingThreshold:1,liveTolerance:3},nativeControlsForTouch:!0,normalizeAutoplay:!0,notSupportedMessage:void 0,noUITitleAttributes:!0,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,tap:!0,doubleClick:!0,hotkeys:!0},spatialNavigation:{enabled:!0,horizontalSeek:!0},controlBar:{playToggle:!0,progressControl:!0,currentTimeDisplay:!1,durationDisplay:!1,remainingTimeDisplay:!1,volumePanel:{inline:!1,vertical:!0},customControlSpacer:!0,fullscreenToggle:!0,pictureInPictureToggle:!p,playbackRateMenuButton:!1,descriptionsButton:!1,subtitlesButton:!!(oe&&!p),captionsButton:!1,subsCapsButton:!1,audioTrackButton:!0,liveDisplay:!1,seekToLive:!1,chaptersButton:M&&M.length>0},html5:{nativeControlsForTouch:!0,nativeAudioTracks:!0,nativeTextTracks:!0,nativeVideoTracks:!0,preloadTextTracks:!0,playsinline:!0},children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"]}),i.current.ready(()=>{var Xe,qe,Pe;s.current.applyToPlayer(i.current),s.current.setupAutoSave(i.current),aM(i.current);const Z=new Gx(i.current,{});i.current.addChild(Z),o.current.testButton=Z;const fe=new iM(i.current,p);fe.setupOrientationHandling(),o.current.orientationHandler=fe;const Ee=new nM(i.current,{isEmbedPlayer:f,userPreferences:s.current,mediaData:_,currentVideo:N,relatedVideos:$,goToNextVideo:pe});o.current.endScreenHandler=Ee;const J=new tM(i.current,_,s.current);if(typeof window<"u"&&(window.videojsPlayers||(window.videojsPlayers={}),window.videojsPlayers[r]=i.current),_.onPlayerInitCallback&&typeof _.onPlayerInitCallback=="function"&&_.onPlayerInitCallback({player:i.current},i.current.el()),_.urlTimestamp!==null&&_.urlTimestamp>=0){const be=_.urlTimestamp;i.current.readyState()>=1?be<i.current.duration()?i.current.currentTime(be):be>=0&&i.current.play():i.current.one("loadedmetadata",()=>{be>=0&&be<i.current.duration()?i.current.currentTime(be):be>=0&&i.current.play()})}f||J.handleAutoplay();const ve=i.current.getChild("controlBar"),ge=ve.getChild("playToggle"),Ue=ve.getChild("volumePanel"),te=ve.getChild("progressControl"),Me=te==null?void 0:te.getChild("seekBar");if(f||new URLSearchParams(window.location.search).get("m")&&setTimeout(async()=>{if(i.current&&!i.current.isDisposed())try{await i.current.play()}catch(ie){if(console.error("ℹ️ Browser prevented play:",ie.message),!i.current.muted())try{i.current.muted(!0),await i.current.play()}catch(Te){console.error("ℹ️ Even muted play was blocked:",Te.message)}}},100),oe)try{const be=s.current.getPreference("subtitleLanguage"),Le=s.current.getPreference("subtitleEnabled"),ie=(Oe,Ye)=>{const Ie=String(Oe.srclang||Oe.language||"").toLowerCase(),Ge=String(Ye||"").toLowerCase();return!Ie||!Ge?!1:Ie===Ge||Ie.startsWith(Ge+"-")||Ge.startsWith(Ie+"-")};K.map(Oe=>({...Oe,default:!!(Le&&be&&ie(Oe,be))})).forEach(Oe=>{i.current.addRemoteTextTrack(Oe,!1)})}catch{K.forEach(be=>{i.current.addRemoteTextTrack(be,!1)})}if(s.current.applySubtitlePreference(i.current),i.current.one("loadeddata",()=>s.current.applySubtitlePreference(i.current)),i.current.one("canplay",()=>s.current.applySubtitlePreference(i.current)),M&&M.length>0){const be=i.current.addTextTrack("chapters","Chapters","en");M.forEach(Le=>{const ie=new(window.VTTCue||window.TextTrackCue)(Le.startTime,Le.endTime,Le.chapterTitle);be.addCue(ie)})}if(!f&&(_!=null&&_.nextLink||b)){const be=new Wy(i.current,{nextLink:_.nextLink}),Le=ve.children().indexOf(ge);ve.addChild(be,{},Le+1)}const Ae=new Hp(i.current,{displayNegative:!1,customPrefix:"",customSuffix:""}),ze=ve.children().indexOf(Ue);if(ve.addChild(Ae,{},ze+1),o.current.customRemainingTime=Ae,!f)try{const be=new Qy(i.current,{userPreferences:s.current,isTouchDevice:p});ve.addChild(be,{},11),o.current.autoplayToggleButton=be,setTimeout(()=>{be.updateIcon()},0)}catch(be){console.error("✗ Failed to add autoplay toggle button:",be)}if(te&&Me){if(M&&M.length>0){const Le=new Yy(i.current,{previewSprite:_.previewSprite,isTouchDevice:p});Me.addChild(Le)}else if(_.previewSprite&&!p){const Le=new Xy(i.current,{previewSprite:_.previewSprite,isTouchDevice:p});Me.addChild(Le),setTimeout(()=>{Le.setupProgressBarHover()},100)}}setTimeout(()=>{try{const be=ve.getChild("pictureInPictureToggle"),Le=ve.getChild("fullscreenToggle");be&&(ve.removeChild(be),ve.addChild(be)),Le&&(ve.removeChild(Le),ve.addChild(Le))}catch(be){console.error("✗ Failed to move PiP/Fullscreen buttons to end:",be)}}),M&&M.length>0&&(o.current.chaptersOverlay=new zp(i.current,{chaptersData:M,seriesTitle:((Xe=_==null?void 0:_.data)==null?void 0:Xe.title)||"Chapters",channelName:"Chapter",thumbnail:((qe=_==null?void 0:_.data)==null?void 0:qe.thumbnail_url)||((Pe=_==null?void 0:_.data)==null?void 0:Pe.author_thumbnail)||""})),f&&(o.current.embedInfoOverlay=new Gy(i.current,{authorName:N.author_name,authorProfile:N.author_profile,authorThumbnail:N.author_thumbnail,videoTitle:N.title,videoUrl:N.url})),o.current.settingsMenu=new Vp(i.current,{userPreferences:s.current,qualities:G,hasSubtitles:oe,isTouchDevice:p});try{i.current.on("loadedmetadata",()=>{var be;if(o.current.settingsMenu&&o.current.settingsMenu.setQualities){const Le=typeof window<"u"?window.MEDIA_DATA:null,ie=((be=Le==null?void 0:Le.data)==null?void 0:be.qualities)||G;o.current.settingsMenu.setQualities(ie)}})}catch{}l.current=new sM(i,o,{seekAmount:5}),l.current.init(),o.current.cleanupKeyboardHandler=()=>{l.current&&(l.current.destroy(),l.current=null)}}),i.current.on("nextVideo",()=>{pe()}),o.current.seekIndicator=new Zy(i.current,{seekAmount:5,isEmbedPlayer:f}),i.current.addChild(o.current.seekIndicator),o.current.seekIndicator.hide(),c.current=new rM(i,o,{isEmbedPlayer:f,showSeekIndicators:!0}),c.current.init(),o.current.cleanupPlaybackEventHandler=()=>{c.current&&(c.current.destroy(),c.current=null)},i.current.ready(()=>{if(i.current.el()){const Z=i.current.el();Z.setAttribute("tabindex","0"),Z.focus()}}))}},[]),bn.jsx("video",{ref:e,id:r,controls:!0,className:`video-js vjs-fluid vjs-default-skin${N.useRoundedCorners?" video-js-rounded-corners":""}`,preload:"auto",poster:N.poster,tabIndex:"0",children:bn.jsxs("p",{className:"vjs-no-js",children:["To view this video please enable JavaScript, and consider upgrading to a web browser that",bn.jsx("a",{href:"https://videojs.com/html5-video-support/",target:"_blank",children:"supports HTML5 video"})]})})}function Yx({videoId:r="default-video",...e}){return bn.jsx(JR,{videoId:r,...e})}function Xx({videoId:r="default-video",...e}){return bn.jsx(lM,{videoId:r,...e})}const Ud=()=>{const r=document.getElementById("video-js-root-main-old");r&&!r.hasChildNodes()&&If.createRoot(r).render(bn.jsx(gt.StrictMode,{children:bn.jsx(Yx,{videoId:"video-main-old"})}));const e=document.getElementById("video-js-root-embed-old");e&&!e.hasChildNodes()&&If.createRoot(e).render(bn.jsx(gt.StrictMode,{children:bn.jsx(Yx,{videoId:"video-embed-old"})}));const i=document.getElementById("video-js-root-main");i&&!i.hasChildNodes()&&If.createRoot(i).render(bn.jsx(gt.StrictMode,{children:bn.jsx(Xx,{videoId:"video-main"})}));const s=document.getElementById("video-js-root-embed");s&&!s.hasChildNodes()&&If.createRoot(s).render(bn.jsx(gt.StrictMode,{children:bn.jsx(Xx,{videoId:"video-embed"})}))};window.triggerVideoJSMount=Ud,document.addEventListener("triggerVideoJSMount",()=>{Ud()}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ud):Ud(),setInterval(()=>{const r=document.getElementById("video-js-root-embed");r&&!r.hasChildNodes()&&Ud()},1e3)})();
|
||
//# sourceMappingURL=video-js.js.map
|